@font-face {
  font-family: TiroGrove;
  src: url("tiro.woff2") format("woff2");
  font-weight: 400;
  font-style: normal;
  font-display: swap;
}
@font-face {
  font-family: SiliguriInk;
  src: url("siliguri.woff2") format("woff2");
  font-weight: 500;
  font-style: normal;
  font-display: swap;
}
@font-face {
  font-family: SiliguriInk;
  src: url("siliguribold.woff2") format("woff2");
  font-weight: 700;
  font-style: normal;
  font-display: swap;
}

:root {
  --night: #0C1610;
  --luck: #1B8A3E;
  --leaf: #8FCB3A;
  --gold: #F2C14E;
  --ink: #0C1610;
  --mist: #D7E8C4;
  --mute: #7A9268;
}

* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
  -webkit-tap-highlight-color: transparent;
  text-decoration: none;
}

html, body {
  min-height: 100%;
  background: var(--night);
  color: var(--mist);
  font-family: SiliguriInk, "Noto Sans Bengali", sans-serif;
  overflow: hidden;
  font-feature-settings: "kern" 1, "liga" 1, "calt" 1, "locl" 1;
}

html, body, input, textarea, button {
  -webkit-text-decoration-skip: none;
  text-decoration-skip-ink: none;
}

::spelling-error { text-decoration: none; }
::grammar-error { text-decoration: none; }
::selection { background: var(--leaf); color: var(--ink); }

button, a, u, em, strong, h1, h2, h3, p, span, li, small, b, dt, dd, label {
  text-decoration: none;
}

img { display: block; max-width: 100%; }

button {
  font: inherit;
  color: inherit;
  background: none;
  border: 0;
  cursor: pointer;
}

[hidden] { display: none !important; }

h1, h2, h3 {
  font-family: TiroGrove, "Noto Serif Bengali", serif;
  font-weight: 400;
  letter-spacing: 0.01em;
  color: #F7F1D2;
}

.kicker {
  font-size: 0.72rem;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--gold);
}

.lead, .note {
  color: var(--mute);
  line-height: 1.45;
}

.note { font-size: 0.92rem; }

.haze-field,
.grove-field {
  position: absolute;
  inset: 0;
  pointer-events: none;
}

.haze-field {
  background:
    radial-gradient(circle at 50% 42%, rgba(12, 22, 16, 0.18), rgba(12, 22, 16, 0.88) 62%),
    linear-gradient(180deg, rgba(12, 22, 16, 0.55), rgba(12, 22, 16, 0.92)),
    url("haze.webp") center / cover no-repeat;
}

.grove-field {
  background:
    radial-gradient(circle at 50% 78%, rgba(27, 138, 62, 0.35), transparent 46%),
    linear-gradient(180deg, rgba(12, 22, 16, 0.42), rgba(12, 22, 16, 0.88)),
    url("grove.webp") center / cover no-repeat;
}

.glints {
  position: absolute;
  inset: 0;
  pointer-events: none;
  overflow: hidden;
}

.glints i {
  position: absolute;
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: radial-gradient(circle, #fff6c4 0 28%, var(--gold) 40%, transparent 72%);
  animation: glint 4.8s ease-in-out infinite;
}

.glints.dim i { opacity: 0.55; }

.glints i:nth-child(odd) { animation-duration: 6.2s; }
.glints i:nth-child(3n) { width: 5px; height: 5px; animation-duration: 5.4s; }

@keyframes glint {
  0%, 100% { opacity: 0.15; transform: scale(0.7); }
  50% { opacity: 1; transform: scale(1.25); }
}

.veil {
  position: fixed;
  inset: 0;
  z-index: 40;
  display: grid;
  place-items: center;
}

.veil.is-on { opacity: 1; }

.splash-core {
  position: relative;
  text-align: center;
  display: grid;
  gap: 10px;
  justify-items: center;
  padding: 24px;
}

.splash-mark {
  width: min(220px, 62vw);
  filter: drop-shadow(0 0 24px rgba(143, 203, 58, 0.55));
  animation: leafspin 1.5s ease both;
}

@keyframes leafspin {
  from { transform: rotate(-18deg) scale(0.7); opacity: 0; }
  to { transform: rotate(0) scale(1); opacity: 1; }
}

.splash-core h1 {
  font-size: clamp(2.4rem, 9vw, 3.4rem);
  color: var(--gold);
}

.splash-line { color: var(--leaf); }

.splash-bar {
  width: 148px;
  height: 6px;
  border-radius: 99px;
  background: rgba(27, 138, 62, 0.35);
  overflow: hidden;
}

.splash-bar i {
  display: block;
  height: 100%;
  width: 0;
  background: linear-gradient(90deg, var(--luck), var(--leaf), var(--gold));
  animation: splashfill 1.5s linear forwards;
}

@keyframes splashfill {
  to { width: 100%; }
}

#onboard {
  position: fixed;
  inset: 0;
  z-index: 30;
  display: flex;
  flex-direction: column;
  overflow: auto;
  padding: calc(14px + env(safe-area-inset-top)) 16px calc(16px + env(safe-area-inset-bottom));
}

.liquid-wrap {
  position: relative;
  z-index: 2;
  margin-bottom: 10px;
}

.liquid {
  height: 14px;
  border-radius: 99px;
  background: rgba(12, 22, 16, 0.55);
  border: 1px solid rgba(143, 203, 58, 0.35);
  overflow: hidden;
}

.liquid b {
  display: block;
  height: 100%;
  width: 0;
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.25), transparent 42%),
    repeating-linear-gradient(90deg, #8FCB3A 0 12px, #1B8A3E 12px 24px);
  background-size: 100% 100%, 48px 100%;
  animation: liquidwave 1.1s linear infinite;
  transition: width 0.2s linear;
}

@keyframes liquidwave {
  to { background-position: 0 0, 48px 0; }
}

.liquid-read {
  margin-top: 6px;
  font-size: 0.8rem;
  color: var(--gold);
}

.scene {
  position: relative;
  z-index: 2;
  flex: 1;
  display: flex;
  flex-direction: column;
  gap: 10px;
  min-height: 0;
}

.scene h2 { font-size: 1.4rem; }

.seed {
  position: relative;
  flex: 1;
  min-height: 200px;
  border-radius: 28px;
  overflow: hidden;
  touch-action: manipulation;
}

.seed .dot {
  position: absolute;
  left: 50%;
  top: 46%;
  width: 26px;
  height: 26px;
  margin: -13px 0 0 -13px;
  border-radius: 50%;
  background: radial-gradient(circle at 30% 30%, #fff, var(--gold) 40%, var(--luck));
  box-shadow: 0 0 22px var(--gold);
  animation: seedpulse 1.3s ease-in-out infinite;
  transition: transform 0.7s cubic-bezier(0.2, 0.8, 0.2, 1), opacity 0.6s;
}

@keyframes seedpulse {
  0%, 100% { transform: scale(1); box-shadow: 0 0 14px var(--gold); }
  50% { transform: scale(1.28); box-shadow: 0 0 32px var(--leaf); }
}

.seed .trunk {
  position: absolute;
  left: 50%;
  bottom: 18%;
  width: 8px;
  height: 0;
  margin-left: -4px;
  border-radius: 8px 8px 2px 2px;
  background: linear-gradient(180deg, #8FCB3A, #3a2a16);
  transform-origin: bottom center;
  transition: height 0.8s ease;
}

.seed .canopy {
  position: absolute;
  left: 50%;
  top: 54%;
  width: 18px;
  height: 18px;
  margin: -9px 0 0 -9px;
  border-radius: 50%;
  background:
    radial-gradient(circle at 40% 40%, rgba(143, 203, 58, 0.95), rgba(27, 138, 62, 0.2) 70%, transparent 72%);
  transform: scale(0.2);
  opacity: 0;
  transition: transform 0.9s ease, opacity 0.6s, top 0.8s;
}

.luck-leaf {
  position: absolute;
  width: 92px;
  display: grid;
  justify-items: center;
  gap: 4px;
  opacity: 0;
  transform: scale(0.4) translateY(12px);
  transition: 0.55s ease;
  pointer-events: none;
}

.luck-leaf img { width: 54px; filter: drop-shadow(0 6px 10px rgba(0, 0, 0, 0.35)); }
.luck-leaf b { font-size: 0.72rem; color: var(--leaf); text-align: center; }
.luck-leaf.one { left: 8%; top: 18%; }
.luck-leaf.two { right: 8%; top: 14%; }
.luck-leaf.three { left: 36%; top: 6%; }

.seed.g1 .dot { animation: none; transform: scale(1.6); }
.seed.g1 .trunk { height: 46px; }
.seed.g1 .canopy { opacity: 1; transform: scale(3.2); top: 48%; }
.seed.g1 .luck-leaf.one { opacity: 1; transform: none; }

.seed.g2 .dot { opacity: 0.4; transform: scale(0.6); }
.seed.g2 .trunk { height: 92px; }
.seed.g2 .canopy { opacity: 1; transform: scale(6.4); top: 38%; }
.seed.g2 .luck-leaf.one,
.seed.g2 .luck-leaf.two { opacity: 1; transform: none; }

.seed.g3 .dot { opacity: 0; }
.seed.g3 .trunk { height: 128px; width: 12px; margin-left: -6px; }
.seed.g3 .canopy { opacity: 1; transform: scale(9.2); top: 30%; }
.seed.g3 .luck-leaf { opacity: 1; transform: none; }

.hang-branch {
  position: relative;
  min-height: 118px;
  border-radius: 22px;
  background: rgba(12, 22, 16, 0.42);
  border: 1px dashed rgba(242, 193, 78, 0.35);
  padding: 28px 12px 12px;
}

.limb-line {
  position: absolute;
  left: 8%;
  right: 8%;
  top: 16px;
  height: 8px;
  border-radius: 99px;
  background: linear-gradient(90deg, #3a2a16, #1B8A3E 30%, #8FCB3A 70%, #3a2a16);
  box-shadow: 0 2px 0 rgba(242, 193, 78, 0.35);
}

.limb-line.thin {
  height: 5px;
  top: 10px;
}

.hang-branch p {
  text-align: center;
  color: var(--gold);
  font-size: 0.86rem;
  margin-top: 8px;
}

.hang-slots,
.pin-row,
.hang-pool {
  display: flex;
  justify-content: center;
  gap: 12px;
  flex-wrap: wrap;
  min-height: 72px;
}

.hang-pool { margin-top: 8px; }

.drag-leaf,
.pin-chip {
  width: 92px;
  display: grid;
  justify-items: center;
  gap: 4px;
  padding: 6px;
  touch-action: none;
  cursor: grab;
}

.drag-leaf img,
.pin-chip img { width: 56px; pointer-events: none; }
.drag-leaf b,
.pin-chip b { font-size: 0.78rem; color: var(--gold); }

.drag-leaf.is-held { opacity: 0.35; }
.drag-leaf.ghost {
  position: fixed;
  z-index: 80;
  pointer-events: none;
  margin: 0;
}

.catch-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 8px 12px;
  position: relative;
  z-index: 2;
}

.catch-meta.slim { gap: 8px; }

.catch-meta label {
  display: flex;
  gap: 6px;
  align-items: center;
  padding: 6px 10px;
  border-radius: 999px;
  background: rgba(12, 22, 16, 0.5);
  border: 1px solid rgba(143, 203, 58, 0.28);
  font-size: 0.82rem;
  color: var(--mute);
}

.catch-meta b { color: var(--gold); }

.tint {
  width: 14px;
  height: 14px;
  border-radius: 50%;
  background: var(--leaf);
  box-shadow: 0 0 8px currentColor;
}

.catch-yard {
  position: relative;
  flex: 1;
  min-height: 220px;
  border-radius: 24px;
  overflow: hidden;
  background:
    radial-gradient(circle at 50% 0%, rgba(143, 203, 58, 0.16), transparent 40%),
    rgba(12, 22, 16, 0.45);
  border: 1px solid rgba(143, 203, 58, 0.22);
}

.catch-yard.deep { min-height: 280px; }

.fall {
  position: absolute;
  width: 58px;
  top: -70px;
  left: 10%;
  background: none;
  filter: drop-shadow(0 8px 8px rgba(0, 0, 0, 0.35));
}

.fall img { width: 58px; pointer-events: none; }
.fall.lime img { filter: hue-rotate(8deg) saturate(1.15); }
.fall.gold img { filter: sepia(0.85) saturate(2.4) hue-rotate(6deg); }
.fall.luck img { filter: hue-rotate(-18deg) saturate(1.3) brightness(0.72); }

.ask-opts {
  display: grid;
  gap: 8px;
}

.ask-opts button {
  text-align: left;
  padding: 12px 14px;
  border-radius: 18px 28px 16px 30px;
  background: rgba(27, 138, 62, 0.22);
  border: 1px solid rgba(143, 203, 58, 0.28);
  color: var(--mist);
}

.ask-opts button:hover,
.ask-opts button.is-on {
  background: var(--leaf);
  color: var(--ink);
}

.ask-opts button.is-miss {
  background: rgba(120, 32, 32, 0.4);
}

.cta {
  align-self: center;
  min-width: 180px;
  padding: 12px 22px;
  border-radius: 999px 999px 40% 40%;
  background: var(--leaf);
  color: var(--ink);
  font-weight: 700;
  box-shadow: 0 8px 20px rgba(143, 203, 58, 0.25);
}

.cta.ghost {
  background: transparent;
  color: var(--gold);
  border: 1px solid rgba(242, 193, 78, 0.45);
  box-shadow: none;
}

.cta:disabled {
  opacity: 0.4;
  cursor: default;
}

#onboardGo {
  position: relative;
  z-index: 3;
  margin-top: 8px;
}

#hall {
  position: fixed;
  inset: 0;
  display: flex;
  flex-direction: column;
  background:
    linear-gradient(180deg, rgba(12, 22, 16, 0.55), rgba(12, 22, 16, 0.88)),
    url("grove.webp") center / cover no-repeat;
}

.banyan-rail {
  position: relative;
  padding: calc(6px + env(safe-area-inset-top)) 8px 0;
  flex: 0 0 auto;
}

.rail-limb {
  display: block;
  width: 100%;
  height: 44px;
}

.rail-pills {
  display: flex;
  justify-content: space-around;
  gap: 6px;
  margin-top: -18px;
  padding: 0 4px 4px;
}

.pill {
  flex: 1;
  max-width: 92px;
  display: grid;
  justify-items: center;
  gap: 1px;
  padding: 10px 6px 12px;
  color: #F7F1D2;
  background:
    radial-gradient(120% 80% at 50% 18%, rgba(143, 203, 58, 0.2), transparent 58%),
    linear-gradient(180deg, rgba(27, 138, 62, 0.28), rgba(12, 22, 16, 0.72));
  border: 1px solid rgba(242, 193, 78, 0.28);
  border-radius: 48% 52% 46% 54% / 36% 34% 66% 64%;
  box-shadow: inset 0 -10px 0 rgba(12, 22, 16, 0.15);
}

.pill img { width: 22px; height: 22px; object-fit: contain; }
.pill span { font-weight: 700; font-size: 0.92rem; line-height: 1; }
.pill small { font-size: 0.66rem; color: var(--gold); }

.pill.is-on {
  background: var(--leaf);
  color: var(--ink);
  border-color: var(--leaf);
}

.pill.is-on small { color: #163116; }

.pin-limb {
  position: relative;
  min-height: 78px;
  padding: 22px 10px 4px;
}

.pin-chip {
  width: 72px;
}

.pin-chip img { width: 44px; }

.hall-main {
  flex: 1;
  min-height: 0;
  overflow: auto;
  padding: 4px 14px 8px;
}

.pane { display: none; }
.pane.is-on { display: block; }
#panePata.is-on,
#paneDin.is-on {
  display: flex;
  flex-direction: column;
  gap: 10px;
  min-height: 100%;
}

.hang-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 18px 12px;
  padding: 8px 2px 20px;
}

.hang {
  display: flex;
  flex-direction: column;
  align-items: center;
}

.petiole {
  width: 2px;
  height: 16px;
  background: linear-gradient(var(--gold), var(--luck));
}

.leaf-card {
  position: relative;
  width: 100%;
  min-height: 132px;
  padding: 18px 12px 16px;
  display: grid;
  justify-items: center;
  gap: 6px;
  text-align: center;
  color: #F7F1D2;
  background:
    radial-gradient(120% 70% at 50% 12%, rgba(143, 203, 58, 0.28), transparent 50%),
    linear-gradient(165deg, rgba(27, 138, 62, 0.5), rgba(12, 22, 16, 0.86));
  border: 1px solid rgba(242, 193, 78, 0.32);
  border-radius: 50% 50% 46% 46% / 34% 34% 66% 66%;
  box-shadow: 0 10px 18px rgba(0, 0, 0, 0.22);
}

.leaf-card::before {
  content: "";
  position: absolute;
  left: 50%;
  top: 10%;
  bottom: 14%;
  width: 2px;
  transform: translateX(-50%);
  background: linear-gradient(var(--gold), var(--leaf));
  opacity: 0.55;
}

.leaf-card::after {
  content: "";
  position: absolute;
  left: 22%;
  right: 22%;
  top: 38%;
  height: 1px;
  background: linear-gradient(90deg, transparent, rgba(143, 203, 58, 0.45), transparent);
  transform: rotate(-8deg);
}

.hang:nth-child(odd) .leaf-card { transform: rotate(-3deg); }
.hang:nth-child(even) .leaf-card { transform: rotate(2.4deg); }
.hang:nth-child(3n) .leaf-card { transform: rotate(-1.2deg); }

.leaf-card img {
  width: 40px;
  height: 40px;
  object-fit: contain;
  position: relative;
  z-index: 1;
}

.leaf-card strong,
.leaf-card em {
  position: relative;
  z-index: 1;
  font-style: normal;
}

.leaf-card strong { font-size: 0.95rem; }
.leaf-card em { font-size: 0.72rem; color: var(--gold); }

.leaflet {
  position: fixed;
  inset: 0;
  z-index: 25;
  display: grid;
  place-items: end center;
}

.veil-hit {
  position: absolute;
  inset: 0;
  background: rgba(12, 22, 16, 0.55);
}

.leaflet-card {
  position: relative;
  width: min(420px, 100%);
  padding: 22px 18px calc(18px + env(safe-area-inset-bottom));
  border-radius: 36px 36px 0 0;
  background:
    linear-gradient(180deg, rgba(27, 138, 62, 0.35), rgba(12, 22, 16, 0.96)),
    url("haze.webp") center / cover no-repeat;
  display: grid;
  gap: 10px;
  justify-items: center;
  text-align: center;
}

.leaflet-card img { width: 64px; }
.leaflet-card ol {
  width: 100%;
  text-align: left;
  padding-left: 18px;
  color: var(--mist);
  display: grid;
  gap: 6px;
}

.acts {
  display: flex;
  justify-content: center;
  gap: 8px;
  flex-wrap: wrap;
}

.acts.pair { width: 100%; }
.acts.pair .cta { flex: 1; min-width: 0; }

.quiz-done {
  display: grid;
  justify-items: center;
  gap: 8px;
  padding: 16px 0;
}

.quiz-done img { width: 72px; }
.quiz-done h3 {
  font-size: 2.4rem;
  color: var(--gold);
}

.hold-coin {
  position: relative;
  width: 168px;
  height: 168px;
  margin: 12px auto 0;
  display: grid;
  place-items: center;
  touch-action: none;
}

.hold-coin img {
  width: 118px;
  filter: drop-shadow(0 0 18px rgba(242, 193, 78, 0.45));
}

.hold-ring {
  position: absolute;
  inset: 0;
  border-radius: 50%;
  background: conic-gradient(var(--leaf) var(--hold, 0%), rgba(143, 203, 58, 0.12) 0);
  mask: radial-gradient(circle at center, transparent 62%, #000 64%);
}

.stamp-strip {
  flex: 0 0 auto;
  padding: 4px 12px calc(8px + env(safe-area-inset-bottom));
  border-top: 1px solid rgba(242, 193, 78, 0.18);
  background: rgba(12, 22, 16, 0.72);
}

.stamp-row {
  display: flex;
  justify-content: space-between;
  gap: 6px;
  max-width: 420px;
  margin: 0 auto;
}

.stamp-row i {
  flex: 1;
  height: 8px;
  border-radius: 99px;
  background: rgba(143, 203, 58, 0.16);
  box-shadow: inset 0 0 0 1px rgba(242, 193, 78, 0.16);
}

.stamp-row i.on {
  background: linear-gradient(90deg, var(--luck), var(--gold));
}

@media (min-width: 720px) {
  .hang-grid { grid-template-columns: repeat(4, 1fr); }
  .hall-main,
  #onboard { max-width: 880px; margin: 0 auto; width: 100%; }
  .catch-yard.deep { min-height: 360px; }
  .pill { max-width: 120px; }
}

@media (min-width: 1080px) {
  .hang-grid { gap: 22px 18px; }
  .leaf-card { min-height: 150px; }
}

@media (max-width: 380px) {
  .pill span { font-size: 0.8rem; }
  .leaf-card { min-height: 118px; padding: 14px 8px 12px; }
}
