:root {
  --forest: #1B4D3E;
  --gold: #D4A017;
  --cream: #F6F1E7;
  --ink: #142018;
}

* { box-sizing: border-box; -webkit-tap-highlight-color: transparent; }
html { text-size-adjust: 100%; }
html, body { margin: 0; padding: 0; }
body {
  min-height: 100dvh;
  color: var(--cream);
  background: var(--forest);
  font-family: "Noto Sans Devanagari", sans-serif;
  font-weight: 400;
  line-height: 1.5;
}
body::before {
  content: "";
  position: fixed;
  inset: 0;
  z-index: -2;
  background: var(--forest) url("felt.webp") center/cover;
}
body::after {
  content: "";
  position: fixed;
  inset: 0;
  z-index: -1;
  background: linear-gradient(180deg, rgba(27, 77, 62, .62), rgba(20, 32, 24, .5));
}
button, input { font: inherit; color: inherit; }
button {
  appearance: none;
  -webkit-appearance: none;
  background: none;
  border: 0;
  padding: 0;
  cursor: pointer;
}
img { display: block; max-width: 100%; }
::selection { background: var(--gold); color: var(--ink); }
button:focus-visible, input:focus-visible { outline: 3px solid var(--gold); outline-offset: 2px; }

#splash {
  position: fixed;
  inset: 0;
  z-index: 80;
  display: grid;
  place-items: center;
  align-content: center;
  text-align: center;
  background: var(--forest) url("felt.webp") center/cover;
}
#splash img {
  width: 120px;
  height: 120px;
  border: 3px solid var(--gold);
}
#splash p {
  margin: 14px 0 0;
  font-size: 32px;
  font-weight: 700;
}
.nos {
  margin: 24px;
  text-align: center;
}

.col { width: min(440px, 100%); margin: 0 auto; }
.sticky {
  position: sticky;
  top: 0;
  z-index: 15;
  padding: calc(10px + env(safe-area-inset-top)) 14px 10px;
  background: linear-gradient(180deg, rgba(27, 77, 62, .96), rgba(27, 77, 62, .88));
}
.top { display: flex; align-items: center; justify-content: space-between; gap: 12px; }
.brand { display: flex; align-items: center; gap: 10px; min-width: 0; }
.brand img { width: 42px; height: 42px; object-fit: contain; }
.brand strong { display: block; font-size: 20px; font-weight: 700; }
.brand small { display: block; color: var(--gold); font-size: 13px; font-weight: 600; }
.bell {
  position: relative;
  width: 46px;
  height: 46px;
  border-radius: 14px;
  border: 2px solid transparent;
  background: rgba(246, 241, 231, .08);
}
.bell.on { border-color: var(--gold); }
.bell img { width: 28px; height: 28px; margin: 8px auto; object-fit: contain; }
.bell i {
  position: absolute;
  top: -6px;
  right: -6px;
  min-width: 20px;
  height: 20px;
  padding: 0 4px;
  border-radius: 999px;
  background: var(--gold);
  color: var(--ink);
  font-size: 12px;
  font-style: normal;
  font-weight: 700;
  line-height: 20px;
}

.marquee {
  display: block;
  width: 100%;
  margin-top: 10px;
  overflow: hidden;
  border-radius: 999px;
  border: 2px solid var(--gold);
  background: var(--ink);
  color: var(--cream);
}
.marquee-track {
  display: flex;
  width: max-content;
  animation: march 16s linear infinite;
}
.marquee.is-paused .marquee-track { animation-play-state: paused; }
.marquee-track span {
  padding: 7px 0;
  white-space: nowrap;
  font-weight: 600;
}
@keyframes march { to { transform: translateX(-50%); } }
.marquee-cap { margin: 6px 2px 0; font-size: 12px; color: var(--gold); font-weight: 600; }
@media (prefers-reduced-motion: reduce) {
  .marquee-track { animation: none; }
}

.stage { padding: 14px 14px 20px; }
.col { padding-bottom: 318px; }
h1 { margin: 0 0 4px; font-size: 28px; font-weight: 700; }
.lead { margin: 0 0 12px; color: var(--gold); font-weight: 600; }
.banner {
  margin: 0 0 12px;
  padding: 8px 12px;
  border-radius: 12px;
  border: 1px solid var(--gold);
  background: rgba(20, 32, 24, .45);
  font-weight: 600;
}

.paper {
  background: var(--cream);
  color: var(--ink);
  border-radius: 18px;
  border: 1px solid rgba(212, 160, 23, .55);
  box-shadow: 0 12px 28px rgba(20, 32, 24, .18);
}
.rcard { width: 100%; margin: 0 0 12px; padding: 14px; text-align: left; }
.tag {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 2px 10px 2px 4px;
  border-radius: 999px;
  background: var(--forest);
  color: var(--cream);
  font-size: 13px;
  font-weight: 700;
}
.tag img { width: 18px; height: 18px; object-fit: contain; }
.rcard h2 { margin: 8px 0; font-size: 22px; }
.rcard p, .tale p, .pin-card p, .sheet p { margin: 0 0 4px; }
.hero-row { display: flex; align-items: center; gap: 12px; margin-bottom: 12px; }
.hero-row img { width: 72px; height: 72px; object-fit: contain; }

.filters { display: flex; gap: 8px; margin-bottom: 12px; }
.filters button, .hours button, .ob-nav button, .wide, .pool button, .add button {
  border-radius: 14px;
  border: 3px solid transparent;
  background: var(--cream);
  color: var(--ink);
  font-weight: 700;
}
.filters button, .hours button { min-height: 40px; padding: 0 12px; }
.filters button.on, .hours button.on, .chips button.on { border-color: var(--gold); }
.tale { width: 100%; margin: 0 0 12px; padding: 14px; text-align: left; }
.tale .row { display: flex; justify-content: space-between; gap: 8px; align-items: center; }
.ghost {
  margin-top: 8px;
  min-height: 36px;
  padding: 0 12px;
  border-radius: 999px;
  border: 2px solid var(--forest);
  color: var(--forest);
  font-weight: 700;
}
.ghost.on { background: var(--forest); color: var(--cream); }

.chips { display: flex; gap: 5px; overflow-x: auto; padding-bottom: 8px; }
.chips button {
  flex: 0 0 auto;
  width: 38px;
  height: 38px;
  border-radius: 50%;
  border: 3px solid transparent;
  background: var(--cream);
  color: var(--ink);
  font-weight: 700;
}
.q { margin: 8px 0 10px; font-size: 22px; font-weight: 700; }
.board-art { width: min(220px, 70%); margin: 0 auto 8px; }
.slots { list-style: none; margin: 0 0 10px; padding: 0; }
.slots li {
  display: grid;
  grid-template-columns: 36px 1fr auto;
  gap: 8px;
  align-items: center;
  margin-bottom: 6px;
  padding: 8px 10px;
  border-radius: 12px;
  background: rgba(246, 241, 231, .12);
  border: 1px solid rgba(212, 160, 23, .35);
}
.slots li.open { background: var(--cream); color: var(--ink); }
.slots span, .slots em { font-weight: 700; color: var(--gold); }
.slots li.open span, .slots li.open em { color: var(--forest); }
.pips { display: flex; gap: 8px; margin-bottom: 8px; }
.pips i {
  width: 18px;
  height: 18px;
  border-radius: 50%;
  border: 2px solid var(--gold);
  background: transparent;
}
.pips i.on { background: var(--gold); }
.pool { display: grid; gap: 8px; }
.pool button { width: 100%; min-height: 48px; padding: 10px 12px; text-align: left; }
.pool button:disabled { opacity: .72; }
.pool button.ok { border-color: var(--gold); }
.pool button.bad { opacity: .45; }
.scoreline { display: flex; justify-content: space-between; gap: 8px; margin: 8px 0; font-weight: 700; }
.wide {
  width: 100%;
  min-height: 48px;
  margin-top: 10px;
  padding: 0 14px;
}

.stats { display: grid; grid-template-columns: repeat(4, 1fr); gap: 6px; margin-bottom: 10px; }
.stats div, .week i, .heatstrip b {
  background: rgba(20, 32, 24, .4);
  border: 1px solid rgba(212, 160, 23, .45);
  border-radius: 12px;
  text-align: center;
}
.stats div { padding: 6px 2px; }
.stats span, .heatstrip small { display: block; font-size: 12px; color: var(--gold); font-weight: 600; }
.stats b { font-size: 18px; }
.flip {
  display: block;
  width: 148px;
  height: 208px;
  margin: 8px auto;
  perspective: 900px;
}
.flip-in {
  position: relative;
  width: 100%;
  height: 100%;
  transform-style: preserve-3d;
  transition: transform .55s ease;
}
.flip.show .flip-in { transform: rotateY(180deg); }
.back, .front {
  position: absolute;
  inset: 0;
  border-radius: 16px;
  overflow: hidden;
  -webkit-backface-visibility: hidden;
  backface-visibility: hidden;
}
.back { background: var(--forest) url("card.webp") center/cover; border: 2px solid var(--gold); }
.front {
  display: grid;
  place-items: center;
  align-content: center;
  background: var(--cream);
  color: var(--ink);
  transform: rotateY(180deg);
  border: 2px solid var(--gold);
}
.front .mark { font-size: 64px; line-height: 1; }
.front em { font-style: normal; font-weight: 700; font-size: 22px; }
.note { min-height: 28px; margin: 0; text-align: center; font-weight: 700; color: var(--gold); }
.note.bad { color: var(--cream); }
.gwin {
  margin-top: 8px;
  padding: 12px;
  border-radius: 22px;
  border: 3px solid var(--gold);
  background: rgba(20, 32, 24, .55);
  box-shadow: inset 0 0 0 1px rgba(212, 160, 23, .35), 0 0 24px rgba(212, 160, 23, .16);
}
.gwin p { margin: 0 0 8px; text-align: center; font-weight: 700; color: var(--gold); }
.gwin .grid { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }
.gwin button {
  min-height: 64px;
  border-radius: 14px;
  border: 1px solid rgba(246, 241, 231, .28);
  background: rgba(246, 241, 231, .06);
}
.gwin button strong { display: block; color: var(--gold); font-size: 26px; line-height: 1; }
.gwin button:disabled { opacity: .4; }

.week { display: grid; grid-template-columns: repeat(7, 1fr); gap: 4px; margin: 12px 0; }
.week i {
  display: grid;
  min-height: 74px;
  place-items: center;
  align-content: center;
  font-style: normal;
  font-weight: 700;
  padding: 4px 0;
}
.week i b { font-size: 12px; color: var(--gold); }
.week i.done { background: var(--gold); color: var(--ink); }
.week i.done b { color: var(--ink); }
.week i.skip { border-style: dashed; border-color: var(--gold); }
.week i.today { box-shadow: inset 0 0 0 2px var(--cream); }
.pair { display: grid; gap: 8px; }
.day-note { margin: 8px 0 0; font-weight: 600; }

.table-wrap { width: 100%; overflow-x: auto; border: 2px solid var(--gold); border-radius: 14px; background: rgba(20, 32, 24, .45); }
table { width: 100%; border-collapse: collapse; font-size: 14px; }
th, td { padding: 8px 6px; text-align: center; border-bottom: 1px solid rgba(246, 241, 231, .12); }
th { color: var(--gold); font-weight: 700; }
.heatstrip {
  display: flex;
  align-items: flex-end;
  gap: 6px;
  height: 140px;
  margin-top: 8px;
  padding: 10px;
  border-radius: 16px;
  border: 2px solid var(--gold);
  background: rgba(20, 32, 24, .4);
}
.heatstrip span { flex: 1; display: flex; flex-direction: column; justify-content: flex-end; align-items: center; height: 100%; gap: 4px; }
.heatstrip b {
  display: block;
  width: 100%;
  background: var(--gold);
  border: 0;
  border-radius: 8px 8px 3px 3px;
  min-height: 8px;
}
.heatstrip small { color: var(--cream); }

.pin-grid { display: grid; gap: 8px; }
.pin-card, .pin-slot {
  padding: 12px;
  text-align: left;
}
.pin-slot {
  border-radius: 18px;
  border: 2px dashed rgba(212, 160, 23, .7);
  min-height: 72px;
}
.pin-card h2 { margin: 0 0 4px; font-size: 18px; }
.add { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 12px; }
.add button { padding: 8px 10px; }

.note-card { padding: 12px; margin-bottom: 10px; }
.note-card h2 { margin: 0 0 8px; font-size: 18px; }
.note-card input {
  display: block;
  width: 100%;
  margin-top: 6px;
  padding: 10px 12px;
  border-radius: 12px;
  border: 2px solid rgba(27, 77, 62, .25);
  background: #fffdf8;
  color: var(--ink);
}

.remind { padding: 14px; }
.switch {
  width: 100%;
  min-height: 52px;
  border-radius: 14px;
  border: 3px solid var(--gold);
  background: var(--forest);
  color: var(--cream);
  font-weight: 700;
}
.switch.on { background: var(--gold); color: var(--ink); }
.hours { display: flex; flex-wrap: wrap; gap: 8px; margin: 12px 0; }

.veil {
  position: fixed;
  inset: 0;
  z-index: 40;
  display: grid;
  align-items: end;
  background: rgba(20, 32, 24, .58);
}
.sheet {
  padding: 16px 16px calc(16px + env(safe-area-inset-bottom));
  border-radius: 22px 22px 0 0;
  border-top: 4px solid var(--gold);
  max-height: 82dvh;
  overflow: auto;
}
.sheet h2 { margin: 8px 0; }
.facts { margin: 8px 0 12px; padding-left: 18px; }
.facts li { margin: 4px 0; }
.sheet .row { display: flex; gap: 8px; }
.sheet .row button { flex: 1; }

.ob {
  width: min(440px, calc(100% - 24px));
  margin: 24px auto;
  padding: 18px 16px 16px;
}
.dots { display: flex; gap: 6px; margin-bottom: 8px; }
.dots i { width: 28px; height: 6px; border-radius: 99px; background: rgba(27, 77, 62, .2); }
.dots i.on { background: var(--gold); }
.suits { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; margin: 12px 0; }
.suits button {
  min-height: 84px;
  border-radius: 16px;
  border: 3px solid rgba(27, 77, 62, .2);
  background: #fffdf8;
  color: var(--ink);
  font-weight: 700;
}
.suits button strong { display: block; font-size: 28px; }
.suits button.on { border-color: var(--gold); box-shadow: 0 0 0 2px var(--gold); }
.ob-nav { display: flex; gap: 8px; margin-top: 8px; }
.ob-nav button { flex: 1; min-height: 48px; }
.ob-nav button:disabled { opacity: .4; }
.warn { min-height: 24px; margin: 6px 0 0; color: var(--forest); font-weight: 700; }
.shake { animation: wobble .35s linear; }
@keyframes wobble {
  20% { transform: translateX(-6px); }
  40% { transform: translateX(6px); }
  60% { transform: translateX(-3px); }
  80% { transform: translateX(3px); }
}

.dock {
  position: fixed;
  left: 50%;
  bottom: 0;
  z-index: 30;
  width: min(440px, 100%);
  transform: translateX(-50%);
  padding-bottom: env(safe-area-inset-bottom);
  background: var(--ink);
}
.tools {
  display: grid;
  grid-template-columns: repeat(5, 1fr);
  gap: 6px;
  padding: 8px 10px;
  background: rgba(20, 32, 24, .92);
  border-top: 2px solid var(--gold);
}
.tools button {
  min-height: 36px;
  border-radius: 12px;
  border: 3px solid transparent;
  background: var(--cream);
  color: var(--ink);
  font-size: 14px;
  font-weight: 700;
}
.tools button.on { border-color: var(--gold); box-shadow: 0 0 0 2px var(--gold); }
.table {
  position: relative;
  height: 248px;
  margin: 0 8px 8px;
  border-radius: 90px 90px 22px 22px;
  background: #8a5a22 url("wood.webp") center/cover;
  box-shadow: inset 0 0 0 3px var(--gold), 0 -10px 24px rgba(20, 32, 24, .28);
}
.table::before {
  content: "";
  position: absolute;
  inset: 16px 18px;
  border-radius: 78px;
  border: 1px dashed rgba(212, 160, 23, .55);
  pointer-events: none;
}
.seat {
  position: absolute;
  z-index: 2;
  width: 78px;
  min-height: 42px;
  border-radius: 999px;
  border: 3px solid rgba(27, 77, 62, .35);
  background: var(--cream);
  color: var(--ink);
  font-weight: 700;
}
.seat.on { border-color: var(--gold); box-shadow: 0 0 0 2px var(--gold); }
.seat.n { top: 10px; left: 50%; transform: translateX(-50%); }
.seat.e { right: 10px; top: 50%; transform: translateY(-50%); }
.seat.s { bottom: 10px; left: 50%; transform: translateX(-50%); }
.seat.w { left: 10px; top: 50%; transform: translateY(-50%); }
.seat.n.on { transform: translateX(-50%) translateY(-3px); }
.seat.s.on { transform: translateX(-50%) translateY(3px); }
.seat.w.on { transform: translateY(-50%) translateX(-3px); }
.seat.e.on { transform: translateY(-50%) translateX(3px); }
.hub {
  position: absolute;
  z-index: 2;
  left: 50%;
  top: 50%;
  width: 118px;
  height: 118px;
  transform: translate(-50%, -50%);
  border-radius: 50%;
  border: 3px solid transparent;
}
.hub.on { border-color: var(--gold); box-shadow: 0 0 0 2px var(--gold); }
.hub .ring { width: 100%; height: 100%; object-fit: contain; }
.hub .pip {
  position: absolute;
  left: 50%;
  top: 50%;
  width: 40px;
  height: 56px;
  transform: translate(-50%, -50%);
  object-fit: contain;
}
