/* Rang – Diwali games (shown 7–25 Nov 2026 only; add ?diwali to the address to see it any time) */

html.dw-lock { overflow: hidden; }

/* ---------- Entry points ---------- */
.dw-open-btn { gap: .55em; }
.dw-open-btn svg { width: 1.15em; height: 1.15em; flex: none; }

.dw-teaser { position: fixed; z-index: 56; left: 16px; bottom: calc(16px + env(safe-area-inset-bottom, 0px)); width: min(380px, calc(100vw - 32px));
  display: grid; grid-template-columns: auto 1fr auto; align-items: center; gap: 12px; padding: 10px 44px 10px 14px;
  background: var(--white); color: var(--ink); border: 1.5px solid var(--ink); border-radius: 999px; box-shadow: 0 14px 40px rgba(0,0,0,.18);
  opacity: 0; transform: translateY(18px); pointer-events: none; transition: opacity .5s var(--ease), transform .5s var(--ease); }
.dw-teaser.is-in { opacity: 1; transform: none; pointer-events: auto; }
.sound-hint:not([hidden]) ~ .dw-teaser { bottom: calc(78px + env(safe-area-inset-bottom, 0px)); }
.menu-open .dw-teaser { display: none; }
.dw-teaser-ico { width: 38px; height: 30px; }
.dw-teaser-txt { display: grid; gap: 1px; min-width: 0; }
.dw-teaser-hi { font: 400 1.125rem/1.15 var(--deva); }
.dw-teaser-sub { font: 400 .75rem/1.3 var(--sans); color: var(--text); }
.dw-teaser-go { display: flex; align-items: center; }
.dw-teaser-go .btn { min-height: 40px; padding: 0 1.1em; font-size: .875rem; }
.dw-teaser.is-in .dw-teaser-go .btn { animation: dw-ping 2.6s ease-out 1.2s infinite; }
@keyframes dw-ping { 0% { box-shadow: 0 0 0 0 rgba(180,32,42,.5); } 70%, 100% { box-shadow: 0 0 0 14px rgba(180,32,42,0); } }
.dw-teaser-x { position: absolute; top: 50%; right: 4px; transform: translateY(-50%); width: 40px; height: 40px; border: 0; background: transparent; color: var(--muted); font: 400 1.4rem/1 var(--sans); cursor: pointer; border-radius: 50%; }
.dw-teaser-x:hover { color: var(--ink); }
@media (max-width: 420px) { .dw-teaser-sub { display: none; } .dw-teaser { gap: 10px; } }

/* ---------- Overlay ---------- */
.dw { --dw-bg: #fff; --dw-fg: #000; --dw-muted: #696969; --dw-line: #d8d8d8; --dw-chip: #fff; --dw-chip-fg: #000;
  position: fixed; inset: 0; z-index: 120; background: var(--dw-bg); color: var(--dw-fg); overflow-x: hidden; overflow-y: auto; overscroll-behavior: contain;
  font-family: var(--sans); transition: background-color .9s var(--ease), color .6s var(--ease); }
.dw[hidden] { display: none; }
.dw.is-lit, .dw.is-night { --dw-bg: #0a0a0a; --dw-fg: #fff; --dw-muted: #b5b5b5; --dw-line: #3a3a3a; --dw-chip: #161616; --dw-chip-fg: #fff; }
.dw.is-lit.tp-on { --dw-bg: #fff; --dw-fg: #000; --dw-muted: #696969; --dw-line: #d8d8d8; --dw-chip: #fff; --dw-chip-fg: #000; }
.dw-fx { position: fixed; inset: 0; width: 100%; height: 100%; pointer-events: none; z-index: 3; }

.dw-bar { position: sticky; top: 0; z-index: 4; width: min(960px, 100%); margin: 0 auto; display: flex; align-items: center; gap: 10px;
  padding: calc(10px + env(safe-area-inset-top, 0px)) 16px 8px; background: var(--dw-bg); transition: background-color .9s var(--ease); }
.dw-tabs { display: flex; gap: 4px; padding: 3px; border: 1.5px solid var(--dw-fg); border-radius: 999px; min-width: 0; }
.dw-tab { min-height: 38px; padding: 0 15px; border: 0; border-radius: 999px; background: transparent; color: var(--dw-fg); font: 500 .875rem/1 var(--sans); cursor: pointer; white-space: nowrap; transition: background-color .2s, color .2s; }
.dw-tab[aria-selected="true"] { background: var(--dw-fg); color: var(--dw-bg); }
.dw-tab:focus-visible, .dw-icon:focus-visible, .dw-x:focus-visible { outline: 3px solid var(--red); outline-offset: 2px; }
.dw-bar-r { display: flex; align-items: center; gap: 8px; flex: none; margin-left: auto; }
.dw-back { min-height: 40px; padding: 0 14px 0 10px; border: 1.5px solid var(--dw-fg); border-radius: 999px; background: transparent; color: var(--dw-fg); font: 500 .875rem/1 var(--sans); cursor: pointer; display: inline-flex; align-items: center; gap: 6px; white-space: nowrap; }
.dw-back span { font-size: 1.25rem; line-height: 0; }
.dw-back:hover { background: var(--dw-fg); color: var(--dw-bg); }
.dw-back:focus-visible { outline: 3px solid var(--red); outline-offset: 2px; }
.dw-bar-t { margin: 0; font: 600 1.0625rem/1 var(--sans); }
.dw.on-hub .dw-tabs, .dw.on-hub .dw-back, .dw:not(.on-hub) .dw-bar-t { display: none; }
.dw-icon { width: 46px; height: 46px; border-radius: 50%; border: 1.5px solid var(--dw-fg); background: transparent; color: var(--dw-fg); display: grid; place-items: center; cursor: pointer; padding: 0; }
.dw-icon svg { width: 22px; height: 22px; display: block; }
.dw-icon .dw-mut, .dw-icon[aria-pressed="true"] .dw-wave { display: none; }
.dw-icon[aria-pressed="true"] .dw-mut { display: inline; }
@media (max-width: 560px) {
  .dw-bar { flex-wrap: wrap; row-gap: 8px; }
  .dw-tabs { order: 3; flex: 1 1 100%; }
  .dw-tab { flex: 1 1 0; padding: 0 6px; font-size: .8125rem; }
  .dw-icon, .dw-x { width: 42px; height: 42px; }
}
@media (max-width: 400px) { .dw-tab { padding: 0 3px; font-size: .75rem; } .dw-tabs { gap: 2px; } }
.dw-panel[hidden], .tp[hidden], .am[hidden], .ss[hidden], .ld[hidden], .dw-hub[hidden] { display: none; }

/* ---------- Cover: pick a game ---------- */
.dw-hub { position: relative; z-index: 2; width: min(960px, 100%); min-height: calc(100% - 66px); margin: 0 auto; padding: 0 16px calc(24px + env(safe-area-inset-bottom, 0px));
  display: flex; flex-direction: column; align-items: center; gap: 8px; text-align: center; }
.hub-toran { width: 100%; height: 66px; overflow: hidden; margin-bottom: 2px; }
.hub-toran svg { display: block; }
.hub-kick { margin: 0; font: 400 clamp(2.25rem, 7vw, 3.5rem)/1.1 var(--deva); }
.hub-title { margin: 0; font: 600 clamp(1.375rem, 4vw, 2rem)/1.2 var(--sans); letter-spacing: -.01em; text-wrap: balance; }
.hub-sub { margin: 0; color: var(--dw-muted); font: 400 .9375rem/1.5 var(--sans); }
.hub-games { width: 100%; display: grid; grid-template-columns: repeat(6, 1fr); gap: 16px; margin-top: 14px; }
.hub-games > .hub-game { grid-column: span 2; }
.hub-games > .hub-game:nth-child(4) { grid-column: 2 / span 2; }
@media (max-width: 900px) and (min-width: 721px) {
  .hub-games { grid-template-columns: repeat(4, 1fr); }
  .hub-games > .hub-game:nth-child(4) { grid-column: span 2; }
  .hub-games > .hub-game:nth-child(5) { grid-column: 2 / span 2; }
}
.hub-game { display: grid; grid-template-rows: auto 1fr auto; justify-items: center; gap: 12px; padding: 24px 18px 20px; border: 1.5px solid var(--dw-fg); border-radius: 22px;
  background: #fff; color: var(--dw-fg); font: inherit; text-align: center; cursor: pointer; transition: transform .25s var(--spring), box-shadow .25s; }
.hub-game:hover { transform: translateY(-4px); box-shadow: 0 14px 30px rgba(0,0,0,.12); }
.hub-game:focus-visible { outline: 3px solid var(--red); outline-offset: 3px; }
.hub-ico { width: 100px; height: 100px; display: grid; place-items: center; }
.hub-ico svg { width: 100%; height: 100%; }
.hub-txt { display: grid; gap: 6px; }
.hub-txt b { font: 600 1.125rem/1.25 var(--sans); }
.hub-txt span { font: 400 .875rem/1.45 var(--sans); color: var(--dw-muted); }
.hub-go { align-self: end; min-height: 42px; padding: 0 24px; border-radius: 999px; background: var(--red); color: #fff; display: inline-flex; align-items: center; font: 600 .9375rem/1 var(--sans); }
.hub-foot { margin: 16px 0 0; font: 500 .8125rem/1.4 var(--sans); color: var(--dw-muted); }
@media (max-width: 720px) {
  .hub-games { grid-template-columns: 1fr; gap: 10px; margin-top: 8px; }
  .hub-games > .hub-game, .hub-games > .hub-game:nth-child(4), .hub-games > .hub-game:nth-child(5) { grid-column: auto; }
  .hub-game { grid-template-columns: 64px 1fr auto; grid-template-rows: auto; justify-items: start; align-items: center; gap: 12px; padding: 12px 12px 12px 14px; text-align: left; border-radius: 18px; }
  .hub-ico { width: 64px; height: 64px; }
  .hub-go { min-height: 38px; padding: 0 16px; }
  .hub-txt b { font-size: 1rem; }
  .hub-txt span { font-size: .8125rem; }
  .hub-toran { height: 58px; }
}

.dw-panel { position: relative; z-index: 2; width: min(720px, 100%); min-height: calc(100% - 66px); margin: 0 auto; padding: 4px 16px calc(18px + env(safe-area-inset-bottom, 0px));
  display: flex; flex-direction: column; align-items: center; gap: 12px; }
.dw-top { width: 100%; display: flex; align-items: flex-start; justify-content: space-between; gap: 12px; }
.dw-titles { min-width: 0; }
.dw-kick { margin: 0; font: 400 1.75rem/1.15 var(--deva); color: inherit; }
.dw-title { margin: 2px 0 0; font: 600 1.25rem/1.25 var(--sans); letter-spacing: -.005em; color: inherit; }
.dw-sub { margin: 4px 0 0; font: 400 .875rem/1.45 var(--sans); color: var(--dw-muted); max-width: 34em; }
.dw-x { flex: none; width: 46px; height: 46px; border-radius: 50%; border: 1.5px solid var(--dw-fg); background: transparent; color: var(--dw-fg); font: 300 1.75rem/1 var(--sans); cursor: pointer; display: grid; place-items: center; transition: background-color .2s, color .2s; }
.dw-x:hover { background: var(--dw-fg); color: var(--dw-bg); }

.dw-stage { --b: min(calc(100vw - 32px), calc(100vh - 372px), 600px); --b: min(calc(100vw - 32px), calc(100dvh - 372px), 600px);
  position: relative; width: 100%; display: grid; place-items: center; }
.dw-stage::before { content: ""; position: absolute; left: 50%; top: 50%; width: calc(max(var(--b), 250px) * 2.2); aspect-ratio: 1; transform: translate(-50%, -50%); pointer-events: none;
  background: radial-gradient(circle closest-side, rgba(255,160,50,.42) 0, rgba(255,130,25,.20) 42%, rgba(255,120,20,.06) 72%, rgba(255,120,20,0) 100%); opacity: 0; transition: opacity 1.2s var(--ease); }
.dw.is-lit .dw-stage::before { opacity: 1; }
.dw-board { position: relative; width: max(var(--b), 250px); aspect-ratio: 1; border-radius: 50%; background: #fff; overflow: hidden;
  box-shadow: 0 0 0 1.5px #000, 0 12px 40px rgba(0,0,0,.12); transition: box-shadow 1s var(--ease); touch-action: none; }
.dw.is-lit .dw-board { box-shadow: 0 0 0 1.5px rgba(255,255,255,.75); }
.dw-bg, .dw-art { position: absolute; inset: 0; width: 100%; height: 100%; display: block; }
.dw-art { cursor: crosshair; touch-action: none; }
.dw-hint { position: absolute; left: 50%; top: 50%; transform: translate(-50%, 54px); margin: 0; padding: 6px 14px; border-radius: 999px; background: rgba(255,255,255,.92); border: 1px solid var(--dw-line);
  font: 500 .8125rem/1.2 var(--sans); color: #333; pointer-events: none; white-space: nowrap; transition: opacity .4s; }
.dw-hint.is-off, .dw.is-lit .dw-hint { opacity: 0; }

.dw-diya { position: absolute; left: 50%; top: 50%; width: 21%; transform: translate(-50%, -62%) scale(.2); opacity: 0; pointer-events: none; transition: transform .9s var(--spring), opacity .5s; }
.dw-diya svg { display: block; width: 100%; height: auto; overflow: visible; }
.dw.is-lit .dw-diya { transform: translate(-50%, -62%) scale(1); opacity: 1; }
.dw-flame { transform-origin: 50px 41px; animation: dw-flick 1.3s ease-in-out infinite alternate; }
.dw-flame-glow { transform-origin: 50px 30px; animation: dw-glow 1.9s ease-in-out infinite alternate; }
@keyframes dw-flick { 0% { transform: scale(1, 1) rotate(-1.5deg); } 50% { transform: scale(.94, 1.07) rotate(1.8deg); } 100% { transform: scale(1.03, .96) rotate(-1deg); } }
@keyframes dw-glow { from { opacity: .55; transform: scale(.92); } to { opacity: .95; transform: scale(1.1); } }

/* ---------- Tools ---------- */
.dw-tools { width: 100%; display: grid; gap: 10px; justify-items: center; }
.dw-swatches { display: flex; flex-wrap: wrap; justify-content: center; gap: 8px; }
.dw-sw { width: 34px; height: 34px; border-radius: 50%; border: 2px solid transparent; background: var(--c); cursor: pointer; padding: 0; position: relative; box-shadow: 0 0 0 1px rgba(0,0,0,.18); transition: transform .2s var(--spring); }
.dw-sw::after { content: ""; position: absolute; inset: -6px; }          /* 46px touch target */
.dw.is-lit .dw-sw { box-shadow: 0 0 0 1px rgba(255,255,255,.35); }
.dw-sw[aria-checked="true"] { transform: scale(1.18); border-color: var(--dw-bg); box-shadow: 0 0 0 2.5px var(--dw-fg); }
.dw-row { display: flex; flex-wrap: wrap; justify-content: center; gap: 8px; }
.dw-chip { min-height: 42px; padding: 0 16px; border-radius: 999px; border: 1.5px solid var(--dw-fg); background: var(--dw-chip); color: var(--dw-chip-fg); font: 500 .875rem/1 var(--sans); cursor: pointer; display: inline-flex; align-items: center; gap: 8px; transition: background-color .2s, color .2s, opacity .2s; }
.dw-chip:hover:not(:disabled) { background: var(--dw-fg); color: var(--dw-bg); }
.dw-chip:disabled { opacity: .38; cursor: default; }
.dw-chip[aria-pressed="true"], .dw-chip[aria-checked="true"] { background: var(--dw-fg); color: var(--dw-bg); }
.dw-size { padding: 0 14px; min-width: 46px; justify-content: center; }
.dw-size i { display: block; border-radius: 50%; background: currentColor; }
.dw-size[data-w="6"] i { width: 6px; height: 6px; } .dw-size[data-w="12"] i { width: 11px; height: 11px; } .dw-size[data-w="22"] i { width: 18px; height: 18px; }

.dw-name { width: 100%; display: flex; justify-content: center; }
.dw-name input { width: min(100%, 360px); min-height: 48px; padding: 0 20px; border-radius: 999px; border: 1.5px solid var(--dw-fg); background: var(--dw-chip); color: var(--dw-chip-fg);
  font: 500 1rem/1.2 var(--sans); text-align: center; transition: background-color .3s, color .3s; }
.dw-name input::placeholder { color: var(--dw-muted); font-weight: 400; opacity: 1; }
.dw-name input:focus-visible { outline: 3px solid var(--red); outline-offset: 2px; }
/* the site's hover dot widens a button, which makes a wrapping row of buttons jump; keep buttons still inside the games */
.dw .btn::before { display: none; }
.dw .btn:focus-visible { outline: 3px solid var(--red); outline-offset: 3px; }
.dw-actions { width: 100%; display: flex; flex-wrap: wrap; justify-content: center; gap: 10px; margin-top: 2px; }
.dw-actions .btn { min-height: 52px; }
.dw-actions [hidden] { display: none; }
.dw.is-lit .dw-actions .btn-red { --bg: var(--red); }
.dw .btn-line { --fg: var(--dw-fg); --bd: var(--dw-fg); }
.dw .btn-line:hover { --bg: var(--dw-fg); --fg: var(--dw-bg); }
.dw-save { --bg: var(--white); --fg: var(--ink); --bd: var(--white); }
.dw-note { margin: 2px 0 0; text-align: center; font: 400 .75rem/1.5 var(--sans); color: var(--dw-muted); max-width: 36em; }
.dw-status { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }

/* ---------- Picture sheet ---------- */
.dw-pic { position: fixed; inset: 0; z-index: 6; display: grid; place-items: center; padding: 16px; background: rgba(0,0,0,.88); overflow-y: auto; }
.dw-pic-card { display: grid; justify-items: center; gap: 12px; width: min(100%, 360px); color: #fff; }
.dw-pic-card img { display: block; width: auto; height: auto; max-width: 100%; max-height: calc(100vh - 190px); max-height: calc(100dvh - 190px); border-radius: 14px; box-shadow: 0 0 60px rgba(255,140,30,.25); -webkit-touch-callout: default; user-select: auto; }
.dw-pic-note { margin: 0; text-align: center; font: 400 .8125rem/1.45 var(--sans); color: #cfcfcf; }
.dw-pic-row { display: flex; flex-wrap: wrap; justify-content: center; gap: 10px; }
.dw-pic .btn-line { --fg: #fff; --bd: rgba(255,255,255,.7); }
.dw-pic .btn-line:hover { --bg: #fff; --fg: #000; }

/* ---------- Teen Patti ---------- */
.tp, .am, .ss, .ld { position: relative; z-index: 2; width: min(720px, 100%); min-height: calc(100% - 66px); margin: 0 auto; padding: 4px 16px calc(18px + env(safe-area-inset-bottom, 0px));
  display: flex; flex-direction: column; align-items: center; gap: 10px; }
.tp-top { width: 100%; }
.tp-bank { display: flex; flex-wrap: wrap; justify-content: center; gap: 8px; margin: 0; padding: 0; list-style: none; }
.tp-bank li { min-height: 32px; padding: 0 14px; border: 1px solid var(--dw-line); border-radius: 999px; display: inline-flex; align-items: center; gap: 8px; font: 500 .8125rem/1 var(--sans); color: var(--dw-muted); }
.tp-bank b { font-weight: 600; color: var(--dw-fg); font-variant-numeric: tabular-nums; }
.tp-bank b { display: inline-block; }
.tp-bank b.is-bump { animation: tp-bump .45s var(--spring); }
@keyframes tp-bump { 0% { transform: scale(1.4); color: #FFD54F; } 100% { transform: none; } }
.tp-coin { display: inline-block; width: 1.15em; height: 1.15em; margin-left: -4px; border-radius: 50%; background: var(--red);
  box-shadow: inset 0 0 0 2px var(--red), inset 0 0 0 3.5px rgba(255,255,255,.8); }
.tp-tag { margin-left: 8px; padding: 2px 8px; border: 1px solid var(--dw-line); border-radius: 999px; font-size: .625rem; letter-spacing: .08em; color: var(--dw-fg); }
.tp-tag:empty { display: none; }
.tp-acts .btn { min-height: 46px; padding: 0 1.15em; font-size: .9375rem; }
.tp-hand .tp-card[aria-label="Your face-down card"] { cursor: pointer; }
.tp-table { width: 100%; display: grid; justify-items: center; gap: 10px; padding: 12px 0; border-radius: 32px; background: radial-gradient(ellipse at 50% 50%, rgba(255,150,40,.13), rgba(255,150,40,0) 70%); }
.tp-side { display: grid; justify-items: center; gap: 8px; }
.tp-who { margin: 0; font: 600 .6875rem/1.2 var(--sans); letter-spacing: .14em; text-transform: uppercase; color: var(--dw-muted); }
.tp-hand { --w: clamp(60px, min(24vw, 15vh), 108px); display: flex; gap: 10px; min-height: calc(var(--w) * 1.4); }
.tp-hand-name { margin: 0; min-height: 1.4em; font: 500 .875rem/1.4 var(--sans); text-align: center; }
.tp-result { margin: 0; min-height: 1.5em; max-width: 30em; text-align: center; font: 600 1.0625rem/1.4 var(--sans); }
.tp-result.is-win { color: var(--red); }
.tp-tip { margin: 0; min-height: 1.4em; text-align: center; font: 400 .8125rem/1.4 var(--sans); color: var(--dw-muted); }
.tp-card { width: var(--w); aspect-ratio: 5 / 7; position: relative; display: block; flex: none; perspective: 800px; padding: 0; border: 0; border-radius: 10px; background: none; color: inherit; font: inherit;
  transition: transform .35s var(--ease), opacity .35s var(--ease); }
.tp-card.is-new { opacity: 0; transform: translateY(-26px) scale(.92); }
button.tp-card:not(:disabled) { cursor: pointer; }
button.tp-card:not(:disabled):hover { transform: translateY(-6px); }
button.tp-card:focus-visible { outline: 3px solid var(--red); outline-offset: 3px; }
.tp-in { position: absolute; inset: 0; transform-style: preserve-3d; transform: rotateY(180deg); transition: transform .55s var(--ease); }
.tp-card.is-up .tp-in { transform: none; }
.tp-face, .tp-back { position: absolute; inset: 0; border-radius: 10px; overflow: hidden; -webkit-backface-visibility: hidden; backface-visibility: hidden; }
.tp-face { background: #fff; color: #111; box-shadow: inset 0 0 0 1.5px #111, 0 8px 20px rgba(0,0,0,.12); transition: box-shadow .4s; }
.tp-card.is-red .tp-face { color: #B4202A; }
.tp-c { position: absolute; top: 6%; left: 9%; display: grid; justify-items: center; font: 600 calc(var(--w) * .2)/1 var(--sans); }
.tp-c i { font-style: normal; font-size: .8em; line-height: 1.15; }
.tp-c2 { top: auto; left: auto; bottom: 6%; right: 9%; transform: rotate(180deg); }
.tp-mid { position: absolute; inset: 0; display: grid; place-items: center; font: 400 calc(var(--w) * .46)/1 var(--sans); }
.tp-mid.is-face { font: 700 calc(var(--w) * .4)/1 var(--sans); }
.tp-back { transform: rotateY(180deg); display: grid; place-items: center; background: #111;
  box-shadow: 0 8px 20px rgba(0,0,0,.18), inset 0 0 0 1.5px rgba(255,255,255,.85), inset 0 0 0 5px #111, inset 0 0 0 6px rgba(255,255,255,.3); }
.tp-mark { position: relative; display: block; width: 56%; }
.tp-mark img { display: block; width: 100%; height: auto; }
.tp-mark i { position: absolute; left: 21.756%; top: 1.829%; width: 13.957%; aspect-ratio: 1; border-radius: 50%; background: #B4202A; }
.tp-card.is-win .tp-face { box-shadow: inset 0 0 0 1.5px #111, 0 0 0 3px #F2A900, 0 0 26px rgba(242,169,0,.45); }
.tp .dw-save { --bg: var(--ink); --fg: var(--white); --bd: var(--ink); }
.tp-rules { width: min(100%, 440px); padding-top: 8px; border-top: 1px solid var(--dw-line); font: 400 .8125rem/1.5 var(--sans); color: var(--dw-muted); }
.tp-rules summary { min-height: 40px; display: flex; align-items: center; cursor: pointer; font-weight: 600; color: var(--dw-fg); }
.tp-rules summary:focus-visible { outline: 3px solid var(--red); outline-offset: 2px; border-radius: 6px; }
.tp-rules ol { margin: 4px 0 0; padding-left: 1.3em; display: grid; gap: 4px; }
.tp-rules b { font-weight: 600; color: var(--dw-fg); }
.tp-rules p { margin: 8px 0 0; }

/* ---------- Teen Patti game types ---------- */
.tp-vars { display: flex; flex-wrap: wrap; justify-content: center; gap: 8px; }
.tp-var { min-height: 38px; padding: 0 14px; }
.tp-var-note { margin: -2px 0 0; max-width: 34em; text-align: center; font: 400 .8125rem/1.45 var(--sans); color: var(--dw-muted); }
.tp-jk { display: grid; justify-items: center; gap: 4px; }
.tp-jk[hidden] { display: none; }
.tp-jk .tp-hand { --w: clamp(46px, min(16vw, 10vh), 72px); }
.tp-card.is-wild .tp-face::after { content: "\2605"; position: absolute; top: 5%; right: 9%; color: #F2A900; font: 400 calc(var(--w) * .22)/1 var(--sans); }
.tp-card.is-wild .tp-face { box-shadow: inset 0 0 0 1.5px #111, inset 0 0 0 4px #FFE08A, 0 8px 20px rgba(0,0,0,.12); }

/* ---------- Art Match ---------- */
.am-grid { width: min(100%, 460px); display: grid; grid-template-columns: repeat(4, 1fr); gap: clamp(8px, 2.4vw, 12px); }
.am-card { position: relative; aspect-ratio: 1; padding: 0; border: 0; border-radius: 12px; background: none; color: inherit; font: inherit; cursor: pointer; perspective: 800px; }
.am-card:disabled { cursor: default; }
.am-card:focus-visible { outline: 3px solid var(--red); outline-offset: 3px; }
.am-in { position: absolute; inset: 0; transform-style: preserve-3d; transform: rotateY(180deg); transition: transform .45s var(--ease); }
.am-card.is-up .am-in { transform: none; }
.am-face, .am-back { position: absolute; inset: 0; border-radius: 12px; overflow: hidden; -webkit-backface-visibility: hidden; backface-visibility: hidden; }
.am-face { display: grid; grid-template-rows: 1fr auto; justify-items: center; align-items: center; padding: 10% 6% 7%; background: #fff; box-shadow: inset 0 0 0 1.5px #111, 0 6px 16px rgba(0,0,0,.1); transition: box-shadow .4s; }
.am-face svg { width: 74%; height: 100%; max-height: 100%; min-height: 0; }
.am-name { font: 500 clamp(.625rem, 2.5vw, .8125rem)/1.1 var(--sans); color: #333; }
.am-back { transform: rotateY(180deg); display: grid; place-items: center; background: #111;
  box-shadow: 0 6px 16px rgba(0,0,0,.16), inset 0 0 0 1.5px rgba(255,255,255,.85), inset 0 0 0 5px #111, inset 0 0 0 6px rgba(255,255,255,.3); }
.am-back .tp-mark { width: 50%; }
.am-card.is-match .am-face { box-shadow: inset 0 0 0 1.5px #111, 0 0 0 3px #F2A900, 0 0 22px rgba(242,169,0,.45); }
.am-card.is-match { animation: am-pop .45s var(--spring); }
@keyframes am-pop { 50% { transform: scale(1.08); } }

/* ---------- Swar Smriti ---------- */
.ss-dots { display: flex; flex-wrap: wrap; justify-content: center; gap: 6px; min-height: 12px; max-width: min(100%, 460px); }
.ss-dots i { width: 11px; height: 11px; border-radius: 50%; border: 1.5px solid #111; transition: background-color .15s, transform .15s; }
.ss-dots i.is-play { background: #B4202A; border-color: #B4202A; transform: scale(1.25); }
.ss-dots i.is-done { background: #111; }
.ss-harm { width: min(100%, 560px); padding: 10px 10px 12px; border-radius: 18px; background: #111; box-shadow: 0 14px 30px rgba(0,0,0,.18); }
.ss-bellows { position: relative; height: 40px; margin-bottom: 10px; border-radius: 10px 10px 4px 4px; display: grid; place-items: center;
  background: repeating-linear-gradient(180deg, #2b2b2b 0 6px, #474747 6px 8px); transition: transform .3s var(--ease); }
.ss-harm.is-listen .ss-bellows { animation: ss-breathe 1.2s ease-in-out infinite alternate; }
@keyframes ss-breathe { from { transform: scaleY(1); } to { transform: scaleY(.82); } }
.ss-mark { width: 42px; }
.ss-keys { display: flex; gap: 4px; padding: 4px; border-radius: 8px; background: #000; touch-action: manipulation; -webkit-user-select: none; user-select: none; }
.ss-key { flex: 1 1 0; min-width: 0; height: clamp(124px, 24vh, 184px); padding: 0 0 12px; border: 0; border-radius: 2px 2px 9px 9px; background: #fff; color: #111;
  display: flex; flex-direction: column; justify-content: flex-end; align-items: center; gap: 4px; cursor: pointer; font: inherit;
  box-shadow: inset 0 -7px 0 #e4e0d8; transition: background-color .12s, color .12s, transform .12s, box-shadow .12s; -webkit-tap-highlight-color: transparent; }
.ss-key b { font: 400 clamp(1.15rem, 4.6vw, 1.65rem)/1 var(--deva); }
.ss-key span { font: 500 clamp(.625rem, 2.4vw, .75rem)/1 var(--sans); color: #696969; }
.ss-key:focus-visible { outline: 3px solid #F2A900; outline-offset: -3px; }
.ss-key.is-on { background: #B4202A; color: #fff; box-shadow: inset 0 -7px 0 #8F1620, 0 0 22px rgba(180,32,42,.55); transform: translateY(2px); }
.ss-key.is-on span { color: #fff; }
.ss-key.is-hit { background: #F2A900; color: #111; box-shadow: inset 0 -7px 0 #C98B00; transform: translateY(3px); }
.ss-key.is-hit span { color: #111; }
.ss-key.is-bad { background: #3a3a3a; color: #fff; }
.ss-key.is-bad span { color: #ddd; }
.ss-key.is-ans { box-shadow: inset 0 0 0 3px #B4202A, inset 0 -7px 0 #e4e0d8; }
.ss-tune { margin: -4px 0 0; max-width: 34em; min-height: 1.4em; text-align: center; font: 400 1.0625rem/1.5 var(--deva); color: #111; }
.ss-tune span { display: block; font: 500 .8125rem/1.4 var(--sans); color: var(--dw-muted); }
.ss .tp-var:disabled { opacity: .45; cursor: default; }
.ss [hidden] { display: none !important; }
.ss-views { margin-bottom: -4px; }
/* Learn a tune */
.ss-lhead { width: 100%; display: grid; justify-items: center; gap: 10px; }
.ss-pick { display: flex; align-items: center; gap: 10px; max-width: 100%; font: 600 .875rem/1 var(--sans); color: #111; }
.ss-sel { min-width: 0; max-width: min(78vw, 360px); min-height: 42px; padding: 0 38px 0 16px; border: 1.5px solid #111; border-radius: 999px; color: #111; font: 500 .9375rem/1.2 var(--sans);
  background: #fff url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='8'%3E%3Cpath d='M1 1l5 5 5-5' fill='none' stroke='%23111' stroke-width='2'/%3E%3C/svg%3E") no-repeat right 14px center; -webkit-appearance: none; appearance: none; cursor: pointer; text-overflow: ellipsis; }
.ss-sel:focus-visible { outline: 3px solid var(--red); outline-offset: 2px; }
.ss-sel:disabled { opacity: .55; cursor: default; }
.ss-by { margin: -4px 0 0; font: 400 .8125rem/1.4 var(--sans); color: var(--dw-muted); text-align: center; }
.ss-notes { display: flex; flex-wrap: wrap; justify-content: center; gap: 5px; max-width: min(100%, 560px); min-height: 28px; }
.ss-notes span { min-width: 34px; padding: 4px 8px; border: 1.5px solid #111; border-radius: 999px; font: 500 .8125rem/1.15 var(--sans); text-align: center; color: #111; background: #fff; transition: background-color .15s, color .15s; }
.ss-notes span.is-done { background: #111; color: #fff; }
.ss-notes span.is-cur { background: #F2A900; border-color: #F2A900; }
.ss-notes span.is-hide { min-width: 22px; padding: 4px 6px; }
.ss-hint { margin: -6px 0 0; max-width: 34em; text-align: center; font: 400 .8125rem/1.45 var(--sans); color: var(--dw-muted); }
.ss-keys.is-chroma { position: relative; gap: 3px; }
.ss-keys.is-chroma .ss-key { height: clamp(132px, 26vh, 196px); padding-bottom: 9px; }
.ss-keys.is-chroma .ss-key b { font-size: clamp(.9rem, 3.4vw, 1.35rem); }
.ss-keys.is-chroma .ss-key span { font-size: clamp(.5625rem, 2vw, .6875rem); }
.ss-key.is-blk { position: absolute; top: 4px; z-index: 2; width: calc((100% - 4px) * .062); height: 56%; padding: 0 0 7px; border-radius: 0 0 6px 6px;
  background: #1c1c1c; color: #fff; box-shadow: inset 0 -5px 0 #3a3a3a, 0 3px 6px rgba(0,0,0,.45); }
.ss-keys.is-chroma .ss-key.is-blk { height: 56%; padding-bottom: 7px; }
.ss-keys.is-chroma .ss-key.is-blk b { font-size: clamp(.6875rem, 2.4vw, .95rem); }
.ss-keys.is-chroma .ss-key.is-blk span { font-size: clamp(.5rem, 1.7vw, .625rem); color: #c9c9c9; }
.ss-key.is-komal b { text-decoration: underline; text-decoration-thickness: 2px; text-underline-offset: .18em; }
.ss-key.is-tivra b { position: relative; }
.ss-key.is-tivra b::before { content: ""; position: absolute; left: 50%; top: -.45em; width: 2px; height: .4em; margin-left: -1px; background: currentColor; }
.ss-key.is-blk.is-on { background: #B4202A; box-shadow: inset 0 -5px 0 #8F1620, 0 0 18px rgba(180,32,42,.6); }
.ss-key.is-blk.is-hit { background: #F2A900; color: #111; }
.ss-key.is-blk.is-hit span { color: #111; }
.ss-key.is-next { box-shadow: inset 0 0 0 3px #F2A900, inset 0 -7px 0 #e4e0d8, 0 0 0 2px #F2A900; animation: ss-glow 1s ease-in-out infinite alternate; }
.ss-key.is-blk.is-next { box-shadow: inset 0 0 0 3px #F2A900, 0 0 14px rgba(242,169,0,.8); }
@keyframes ss-glow { from { background-color: #fff; } to { background-color: #FFF1C7; } }
.ss-key.is-blk.is-next { animation: ss-glow-b 1s ease-in-out infinite alternate; }
@keyframes ss-glow-b { from { background-color: #1c1c1c; } to { background-color: #5a4300; } }

/* ---------- Page decorations ---------- */
.dw-toran { position: absolute; left: 0; right: 0; top: var(--hdr-h, 72px); height: 66px; overflow: hidden; pointer-events: none; }
.dw-toran svg { display: block; }
.dw-kandil { position: absolute; z-index: 3; top: calc(var(--hdr-h, 72px) + 30px); width: clamp(34px, 4.6vw, 58px); pointer-events: none; transform-origin: 50% 0; animation: dw-sway 3.6s ease-in-out infinite alternate; }
.dw-kandil.l { left: clamp(8px, 5vw, 80px); }
.dw-kandil.r { right: clamp(8px, 5vw, 80px); animation-delay: -1.8s; }
.dw-kandil svg { display: block; width: 100%; height: auto; overflow: visible; filter: drop-shadow(0 6px 12px rgba(232,89,12,.35)); }
@keyframes dw-sway { from { transform: rotate(-4deg); } to { transform: rotate(4deg); } }
.dw-diyas { display: flex; justify-content: center; flex-wrap: nowrap; gap: clamp(10px, 3.5vw, 40px); margin: 0 0 18px; pointer-events: none; grid-column: 1 / -1; width: 100%; }
.dw-diyas svg { width: clamp(30px, 4vw, 42px); height: auto; overflow: visible; }
.dw-pagefx { position: fixed; inset: 0; width: 100%; height: 100%; z-index: 58; pointer-events: none; }
@media print { .dw-toran, .dw-kandil, .dw-diyas, .dw-pagefx { display: none; } }

/* ---------- Short landscape screens (phones on their side) ---------- */
@media (max-height: 540px) and (orientation: landscape) {
  .dw-panel { width: 100%; max-width: 1000px; display: grid; grid-template-columns: auto 1fr; align-items: center; column-gap: 28px; padding-top: 10px; }
  .dw-top { grid-column: 2; grid-row: 1; }
  .dw-stage { grid-column: 1; grid-row: 1 / span 5; }
  .dw-stage { --b: calc(100vh - 92px); --b: calc(100dvh - 92px); }
  .dw-board { width: max(var(--b), 220px); }
  .dw-tools, .dw-name, .dw-actions, .dw-note { grid-column: 2; }
  .dw-sub { display: none; }
}
@media (max-width: 380px) { .dw-sw { width: 30px; height: 30px; } .dw-chip { padding: 0 13px; } }

@media (prefers-reduced-motion: reduce) {
  .dw, .dw-board, .dw-diya, .dw-teaser { transition-duration: .01ms; }
  .dw-flame, .dw-flame-glow, .dw-teaser.is-in .dw-teaser-go .btn { animation: none; }
  .tp-in, .tp-card { transition: none; }
  .hub-game { transition: none; }
  .dw-kandil { animation: none; }
  .am-in { transition: none; } .am-card.is-match { animation: none; }
  .ss-key, .ss-dots i, .ss-bellows { transition: none; } .ss-harm.is-listen .ss-bellows { animation: none; }
  .ss-key.is-next, .ss-key.is-blk.is-next { animation: none; }
  .tp-bank b.is-bump { animation: none; }
}
