.samplebar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  border: 1px solid #b9a07463;
  border-radius: 9px;
  padding: 6px 10px;
  font-size: 0.81rem;
  background: #413b403d;
  color: #ecdbb8;
}
.samplebar a {
  text-decoration: underline;
  text-underline-offset: 3px;
}
.tree-scene,
.encounter {
  position: relative;
  isolation: isolate;
  overflow: hidden;
  border-radius: 18px;
}
.tree-scene > i {
  position: absolute;
  inset: 0;
  pointer-events: none;
  background:
    radial-gradient(ellipse at 52% 28%, #f9de9e81, transparent 29%),
    radial-gradient(ellipse at 40% 51%, #c3caff66, transparent 20%);
  mix-blend-mode: screen;
  opacity: var(--glow);
}
.glow-tree > i {
  animation: tree-light 2.2s both;
}
.encounter-lights {
  position: absolute;
  inset: 0;
  overflow: hidden;
  pointer-events: none;
}
.encounter-lights i {
  position: absolute;
  left: calc(5% + var(--i) * 8%);
  top: calc(12% + mod(var(--i) * 17, 70) * 1%);
  width: 4px;
  height: 7px;
  border-radius: 90% 20% 80% 20%;
  background: #c6c0ff;
  box-shadow: 0 0 8px 2px #bcabfc8f;
  animation: petal calc(3.8s + var(--i) * 0.13s) ease-in-out infinite;
  animation-delay: calc(-0.44s * var(--i));
}
.oracle .encounter-lights i {
  width: 2px;
  height: 2px;
  top: calc(18% + var(--i) * 5%);
  background: #ffe7b2;
  box-shadow: 0 0 9px 2px #ffd491a1;
}
.oracle.obtained .hero {
  animation: card-turn 0.85s cubic-bezier(0.2, 0.7, 0.3, 1) backwards;
}
.valley.obtained .hero {
  animation: flower-light 1.25s ease-out backwards;
}
@keyframes card-turn {
  from {
    transform: perspective(650px) rotateY(-54deg) scale(0.91);
    filter: brightness(0.65);
  }
  to {
    transform: perspective(650px) rotateY(0) scale(1);
    filter: brightness(1);
  }
}
@keyframes petal {
  0%,
  100% {
    opacity: 0;
    transform: translate(-12px, 24px) rotate(10deg);
  }
  55% {
    opacity: 0.9;
    transform: translate(10px, -10px) rotate(75deg);
  }
}
@keyframes flower-light {
  0% {
    filter: brightness(0.6);
  }
  40% {
    filter: brightness(1.32);
  }
  100% {
    filter: brightness(1);
  }
}
@keyframes tree-light {
  0% {
    opacity: 0;
    transform: scale(0.75);
  }
  70% {
    opacity: 1;
  }
  100% {
    opacity: var(--glow);
    transform: scale(1);
  }
}

/* State marks sit above the supplied artwork and leave links and native long-press available. */
.hero > h2,
.hero > p {
  position: relative;
  z-index: 1;
}
.band-reader::before,
.band-reader::after,
.trail-line,
.tree-seed {
  pointer-events: none;
}
.band-reader::before,
.band-reader::after {
  content: "";
  position: absolute;
}
.band-reader::before {
  left: 27%;
  right: 27%;
  bottom: 16%;
  height: 19%;
  border-radius: 50%;
  border: 1px solid #d1c5ffaa;
  box-shadow:
    0 0 12px #b0a9fc66,
    inset 0 0 8px #ece0ff44;
}
.band-waiting::after {
  left: 24%;
  right: 24%;
  top: 21%;
  height: 2px;
  background: linear-gradient(
    90deg,
    transparent,
    #b9f0ff,
    #fff0ca,
    #b9f0ff,
    transparent
  );
  box-shadow: 0 2px 11px #b2c9ffbb;
}
.band-identified::before,
.band-confirmed::before {
  border-color: #f5d7a1;
  box-shadow: 0 0 17px #e8c98888;
}
.band-confirmed::after {
  content: "✓";
  display: grid;
  place-items: center;
  top: 16px;
  right: 16px;
  width: 31px;
  height: 31px;
  border: 1px solid #efd5a2;
  border-radius: 50%;
  color: #f6e0b2;
  background: #1c263ceb;
}
.band-expired::before {
  opacity: 0.27;
  border-style: dashed;
}
.trail-line {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  fill: none;
  stroke-linecap: round;
}
.trail-line path {
  vector-effect: non-scaling-stroke;
}
.trail-shadow {
  stroke: #1c143c99;
  stroke-width: 4.5px;
}
.trail-ink {
  stroke: #f5d495;
  stroke-width: 1.8px;
}
.pin.seen::before {
  content: "";
  display: inline-block;
  width: 5px;
  height: 5px;
  background: #f3d18b;
  margin-right: 3px;
  vertical-align: middle;
  border-radius: 50%;
}
[data-scene="point"] .hero::after,
.specimen::after {
  content: "";
  position: absolute;
  width: 44px;
  height: 44px;
  right: 15px;
  top: 15px;
  border: 1px solid #e6d3a77a;
  border-radius: 50%;
  pointer-events: none;
  background: radial-gradient(
    circle at center,
    #ffe6b2 0 2px,
    transparent 3px 14px,
    #efe6c554 14px 15px,
    transparent 16px
  );
}
.specimen::after {
  width: 32px;
  height: 32px;
  background: transparent;
  border-style: dashed;
}
.specimen.found::after {
  content: "✧";
  display: grid;
  place-items: center;
  color: #f1d9ad;
  font-size: 22px;
  border-style: solid;
  background: #131c37a8;
}
.theme {
  position: relative;
  overflow: hidden;
  background-color: #18223d;
}
.theme img {
  transform-origin: center 65%;
}
[data-scene="home"] .hero::after,
[data-scene="news"] .hero::after,
[data-scene="return"] .hero::after,
.specimen::before {
  content: "";
  pointer-events: none;
  position: absolute;
  inset: -16%;
  background: radial-gradient(ellipse at 48% 42%, #d8ccff48, transparent 42%);
  opacity: 0;
}
[data-scene="news"] .hero::after {
  background:
    radial-gradient(ellipse at 40% 39%, #95eeff77, transparent 28%),
    radial-gradient(ellipse at 65% 48%, #e3c5ff55, transparent 28%);
}
[data-scene="return"] .hero::after {
  background: linear-gradient(
    108deg,
    transparent 35%,
    #f5d19355 50%,
    transparent 63%
  );
}
[data-scene="profile"][data-tab="visits"]
  .chips
  + .list-group
  .rowlink::before {
  content: "";
  width: 8px;
  height: 8px;
  border: 1px solid #e2c998;
  background: #413e46;
  transform: rotate(45deg);
}
.ticket {
  border-left: 3px solid #d7bc86;
}
.ticket.redeemed {
  border-left-color: #8f9aaf;
}
.ticket.redeemed .tag {
  border: 2px double #b9c6bc;
  color: #d0e2d5;
  border-radius: 5px;
  transform: rotate(-7deg);
}
.ticket.expired {
  border-left-color: #808398;
}
.poster {
  height: auto;
}
.tree-seed {
  position: absolute;
  left: 51%;
  top: 29%;
  width: 12px;
  height: 12px;
  border-radius: 50%;
  opacity: 0;
  background: #fff0c6;
  box-shadow: 0 0 12px 5px #e7b87c99;
}
.encounter-lights i {
  top: var(--y, 44%);
}
[data-scene="help"] summary {
  cursor: pointer;
  list-style: none;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}
[data-scene="help"] summary::-webkit-details-marker {
  display: none;
}
[data-scene="help"] summary::after {
  content: "+";
  color: var(--gold);
  font:
    normal 23px Georgia,
    serif;
}
[data-scene="help"] details[open] summary::after {
  transform: rotate(45deg);
}
#main[aria-busy="true"] button[data-do] {
  cursor: progress;
}

@media (prefers-reduced-motion: no-preference) {
  .primary:active,
  .secondary:active,
  .choice:active,
  .chip:active {
    transform: scale(0.978);
  }
  .primary,
  .secondary,
  .choice,
  .chip {
    transition:
      transform 0.14s ease,
      background-color 0.18s ease;
  }
  .band-idle::before {
    animation: reader-wave 2.8s ease-out 2;
  }
  .band-waiting::before {
    animation: reader-wave 1.9s ease-out infinite;
  }
  .band-waiting::after {
    animation: reader-scan 1.9s ease-in-out infinite;
  }
  .band-identified::before {
    animation: reader-lock 0.55s ease-out both;
  }
  .band-confirmed::after,
  .specimen.found::after {
    animation: stamp-in 0.5s cubic-bezier(0.16, 0.75, 0.25, 1.14) both;
  }
  .trail-ink {
    stroke-dasharray: 1;
    animation: trace-path 1.7s cubic-bezier(0.25, 0.75, 0.24, 1) both;
  }
  .map .pin {
    animation: pin-appear 0.38s ease-out backwards;
  }
  .map .pin:nth-of-type(2) {
    animation-delay: 0.15s;
  }
  .map .pin:nth-of-type(3) {
    animation-delay: 0.28s;
  }
  .map .pin:nth-of-type(4) {
    animation-delay: 0.42s;
  }
  .map .pin:nth-of-type(5) {
    animation-delay: 0.55s;
  }
  .map .pin:nth-of-type(6) {
    animation-delay: 0.68s;
  }
  [data-scene="point"] .hero::after {
    animation: compass-find 1.3s ease-out both;
  }
  [data-scene="home"] .hero::after,
  [data-scene="news"] .hero::after,
  [data-scene="return"] .hero::after,
  .specimen.found::before {
    animation: pass-light 2.4s ease-out both;
  }
  [data-scene="home"] .tag::before {
    content: "";
    display: inline-block;
    width: 5px;
    height: 5px;
    border-radius: 50%;
    background: #f0cf8c;
    margin-right: 6px;
    animation: time-tick 2s ease-in-out infinite;
  }
  [data-element="water"] img {
    animation: tide 3.4s ease-in-out 2;
  }
  [data-element="wood"] img {
    animation: sprout 1.4s cubic-bezier(0.18, 0.76, 0.22, 1.1) both;
  }
  [data-element="earth"] img {
    animation: settle 0.95s cubic-bezier(0.2, 0.8, 0.4, 1) both;
  }
  [data-element="wind"] img {
    animation: wind-turn 2s ease-in-out 2;
  }
  .receipt,
  [data-scene="collection"] .rowlink,
  [data-scene="profile"] .chips + .list-group .rowlink,
  [data-scene="scenes"] .choice,
  [data-scene="news"] .rowlink {
    animation: leaf-in 0.42s ease-out backwards;
  }
  :is(.rowlink, .choice):nth-child(2) {
    animation-delay: 0.055s;
  }
  :is(.rowlink, .choice):nth-child(3) {
    animation-delay: 0.1s;
  }
  :is(.rowlink, .choice):nth-child(4) {
    animation-delay: 0.15s;
  }
  [data-scene="collection"] .chip.active,
  [data-scene="profile"] .chip.active {
    animation: select-tab 0.33s ease-out;
  }
  [data-scene="collection"] .empty .ornament,
  [data-scene="coupons"] .empty .ornament,
  [data-scene="wallet"] .stats strong,
  [data-scene="profile"] .stats strong {
    animation: ink-appear 0.65s ease-out both;
  }
  .stats.balance-settled > div:nth-child(2) strong {
    animation: debit 0.65s ease-out;
  }
  .stats.balance-settled > div:nth-child(3) strong {
    animation: credit 0.72s 0.1s ease-out both;
  }
  .ticket {
    animation: leaf-in 0.4s ease-out backwards;
  }
  .ticket.fresh-ticket {
    animation: issue-ticket 0.6s ease-out both;
  }
  .ticket.fresh-stamp .tag {
    animation: stamp-in 0.48s cubic-bezier(0.2, 0.85, 0.35, 1.1) both;
  }
  .glow-tree .tree-seed {
    animation: seed-rise 1.8s ease-out both;
  }
  .poster.developed {
    animation: open-scroll 1s cubic-bezier(0.2, 0.68, 0.3, 1) both;
  }
  [data-scene="scroll"] .hero,
  [data-scene="result"] .in > .hero {
    animation: tree-wait 2.8s ease-out both;
  }
  [data-scene="return"] .time {
    animation: credit 0.65s ease-out both;
  }
  [data-scene="help"] summary::after {
    transition: transform 0.22s ease-out;
  }
  [data-scene="help"] details[open] p,
  dialog[open] {
    animation: leaf-in 0.24s ease-out both;
  }
}
@keyframes reader-wave {
  0% {
    transform: scale(0.7);
    opacity: 0.2;
  }
  34% {
    opacity: 0.95;
  }
  100% {
    transform: scale(1.27);
    opacity: 0.15;
  }
}
@keyframes reader-scan {
  0%,
  100% {
    transform: translateY(0);
    opacity: 0.2;
  }
  50% {
    transform: translateY(71px);
    opacity: 0.95;
  }
}
@keyframes reader-lock {
  from {
    transform: scale(1.32);
    opacity: 0.3;
  }
  to {
    transform: scale(1);
    opacity: 1;
  }
}
@keyframes stamp-in {
  from {
    transform: translateY(-7px) scale(1.65) rotate(-15deg);
    opacity: 0.15;
  }
  72% {
    transform: scale(0.92) rotate(-5deg);
  }
}
@keyframes trace-path {
  from {
    stroke-dashoffset: 1;
  }
  to {
    stroke-dashoffset: 0;
  }
}
@keyframes pin-appear {
  from {
    opacity: 0.4;
    transform: translate(-50%, -65%) scale(0.87);
  }
  to {
    opacity: 1;
    transform: translate(-50%, -50%) scale(1);
  }
}
@keyframes compass-find {
  from {
    transform: scale(1.45) rotate(50deg);
    opacity: 0;
  }
  55% {
    opacity: 1;
  }
  to {
    transform: scale(1) rotate(0);
  }
}
@keyframes pass-light {
  0% {
    transform: translateX(-22%);
    opacity: 0;
  }
  42% {
    opacity: 1;
  }
  100% {
    transform: translateX(22%);
    opacity: 0;
  }
}
@keyframes time-tick {
  50% {
    opacity: 0.3;
  }
}
@keyframes tide {
  0%,
  100% {
    transform: translateY(0) rotate(0);
  }
  50% {
    transform: translateY(-3px) rotate(-4deg);
  }
}
@keyframes sprout {
  from {
    transform: scale(0.78, 0.67) rotate(-10deg);
    opacity: 0.55;
  }
  75% {
    transform: scale(1.035) rotate(2deg);
  }
}
@keyframes settle {
  0% {
    transform: translateY(-9px);
    opacity: 0.55;
  }
  62% {
    transform: translateY(2px) scale(1.035, 0.96);
  }
}
@keyframes wind-turn {
  0%,
  100% {
    transform: rotate(0);
  }
  45% {
    transform: rotate(10deg) translateX(2px);
  }
  72% {
    transform: rotate(-3deg);
  }
}
@keyframes leaf-in {
  from {
    opacity: 0.4;
    transform: translateY(6px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}
@keyframes select-tab {
  from {
    box-shadow: inset 0 -2px transparent;
  }
  50% {
    box-shadow: inset 0 -2px #f2d5a1;
  }
}
@keyframes ink-appear {
  from {
    opacity: 0.25;
    transform: scale(0.94);
  }
}
@keyframes debit {
  35% {
    transform: translateY(4px);
    opacity: 0.55;
  }
}
@keyframes credit {
  0% {
    transform: translateY(5px);
    opacity: 0.55;
  }
  48% {
    color: #fff0c4;
    transform: translateY(-2px);
  }
}
@keyframes issue-ticket {
  from {
    transform: translateY(-8px) rotate(-1.8deg);
    opacity: 0.3;
  }
}
@keyframes open-scroll {
  from {
    clip-path: inset(0 0 87% 0 round 8px);
  }
  to {
    clip-path: inset(0 round 8px);
  }
}
@keyframes seed-rise {
  0% {
    transform: translate(-24px, 83px) scale(0.25);
    opacity: 0;
  }
  34% {
    opacity: 1;
  }
  76% {
    transform: translate(0, 0) scale(0.8);
    opacity: 1;
  }
  100% {
    transform: scale(2.2);
    opacity: 0;
  }
}
@keyframes tree-wait {
  from {
    filter: brightness(0.72);
  }
  to {
    filter: brightness(1);
  }
}
