/* Desi look (2026-11-03, Sameer: "I want this app design to have a very desi india trucks style… the truck number
   painters… apply those things to our game's interface and make a switch to go back to normal").
   Everything here is scoped to html.desi, which main.js sets from Settings → Look (hexdrop.desi). Off = the normal look.
   The rules only change colours, fonts, shadows and painted backgrounds: no size, padding or position changes, so
   nothing moves and every button keeps its hit area. Art direction: a hand-painted Punjab truck at night. A peacock-
   blue enamel ground, with cream plates, canary-yellow block letters, signal red and leaf green painted on top, a warm
   black outline round everything and hard offset shadows (painters never blur). Full spec in CLAUDE.md. */

html.desi {
  --tk-cream: #F4E7C3; --tk-ivory: #FBF3DC; --tk-ink: #1B1612;
  --tk-yellow: #FFC81E; --tk-yellow-hot: #FFD95A; --tk-yellow-shade: #B8860B;
  --tk-orange: #F26B1D; --tk-red: #D8232A; --tk-red-shade: #7A0F14;
  --tk-green: #1E8A3C; --tk-green-shade: #0E4F22; --tk-jade: #12A58B;
  --tk-blue: #1B6FD1; --tk-blue-shade: #0E3B73; --tk-peacock: #0E4C8A; --tk-peacock-deep: #072E56;
  --tk-pink: #E6388C; --tk-plum: #6A1E78; --tk-gold: #C9962A; --tk-white: #FFFDF6;
  --tk-silver: #CFD3D6; --tk-radium: #C6FF2E;

  /* The normal look's roles, re-pointed: most of the interface re-paints from these alone. */
  --gold: var(--tk-yellow);
  --gold-hot: var(--tk-yellow-hot);
  --coral: var(--tk-red);
  --violet: var(--tk-pink);
  --aqua: var(--tk-jade);
  --green: #3BCF6B;
  --ink: var(--tk-ink);
  --text: var(--tk-white);
  --muted: rgba(255, 253, 246, 0.72);
  --glass: rgba(9, 40, 84, 0.86);
  --glass-strong: rgba(7, 34, 72, 0.95);
  --line: rgba(255, 220, 120, 0.22);
  --line-strong: rgba(255, 220, 120, 0.48);
  --cut: inset(0);   /* square sheet-metal plates (the clickable box gets a hair larger, never smaller) */
  --display: 'Bungee', 'Chakra Petch', 'Barlow', system-ui, sans-serif;
  --comic: 'Yatra One', 'Lilita One', Impact, sans-serif;

  /* Painted patterns: a phool-patti flower band, pink scallops, and the jhalar chain with tassels. */
  --tk-flower: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='32' height='32' viewBox='0 0 32 32'%3E%3Crect width='32' height='32' fill='%23F4E7C3'/%3E%3Cpath d='M6 20 Q11 13 16 17 Q11 21 6 20Z' fill='%231E8A3C' stroke='%231B1612' stroke-width='1'/%3E%3Cpath d='M26 20 Q21 13 16 17 Q21 21 26 20Z' fill='%231E8A3C' stroke='%231B1612' stroke-width='1'/%3E%3Cg fill='%23D8232A' stroke='%231B1612' stroke-width='1'%3E%3Ccircle cx='16' cy='9' r='3.6'/%3E%3Ccircle cx='21.7' cy='13.1' r='3.6'/%3E%3Ccircle cx='19.5' cy='19.8' r='3.6'/%3E%3Ccircle cx='12.5' cy='19.8' r='3.6'/%3E%3Ccircle cx='10.3' cy='13.1' r='3.6'/%3E%3C/g%3E%3Ccircle cx='16' cy='15' r='3' fill='%23FFC81E' stroke='%231B1612' stroke-width='1'/%3E%3C/svg%3E");
  --tk-scallop: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='16' height='9' viewBox='0 0 16 9'%3E%3Cpath d='M0 9 A8 8 0 0 1 16 9Z' fill='%23E6388C' stroke='%231B1612' stroke-width='1.5'/%3E%3C/svg%3E");
  --tk-jhalar: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='48' height='24' viewBox='0 0 48 24'%3E%3Cpath d='M0 2 Q8 10 16 2 Q24 10 32 2 Q40 10 48 2' fill='none' stroke='%23C9962A' stroke-width='2.5'/%3E%3Cpath d='M0 2 Q8 10 16 2 Q24 10 32 2 Q40 10 48 2' fill='none' stroke='%231B1612' stroke-width='1' stroke-dasharray='2 2'/%3E%3Cg fill='none' stroke='%23C9962A' stroke-width='1.5'%3E%3Ccircle cx='8' cy='8' r='2.2'/%3E%3Ccircle cx='24' cy='8' r='2.2'/%3E%3Ccircle cx='40' cy='8' r='2.2'/%3E%3C/g%3E%3Cg stroke='%231B1612' stroke-width='1'%3E%3Cpath d='M5 10h6l-1 13h-4z' fill='%23D8232A'/%3E%3Cpath d='M21 10h6l-1 13h-4z' fill='%231E8A3C'/%3E%3Cpath d='M37 10h6l-1 13h-4z' fill='%23FFC81E'/%3E%3C/g%3E%3C/svg%3E");
  --tk-hazard: repeating-linear-gradient(-45deg, var(--tk-red) 0 10px, var(--tk-ink) 10px 12px, var(--tk-yellow) 12px 22px, var(--tk-ink) 22px 24px);
  --tk-hard: 4px 4px 0 var(--tk-ink);
}

/* --- Grounds ---------------------------------------------------------------------------------------- */
html.desi, html.desi body { background: var(--tk-peacock); }
html.desi #start { background: radial-gradient(ellipse at 50% 0%, #15609F 0%, var(--tk-peacock) 45%, var(--tk-peacock-deep) 100%); }
html.desi #start.scrolled .start-head, html.desi .lobby-head, html.desi .side-panel, html.desi .side-head, html.desi .tune-tools {
  background: var(--tk-peacock-deep);
}
html.desi .start-head, html.desi .lobby-head, html.desi .side-head { box-shadow: 0 2px 0 var(--tk-ink), 0 4px 0 var(--tk-red); }   /* the bumper band */

/* Panels: enamel blue, a strip of painted flowers along the top and bottom edge (a background layer, so
   nothing moves; 9 px, inside every panel's padding so it never covers a label), a red bumper line, and a hard black offset shadow instead of the soft glow. */
html.desi .panel {
  background:
    var(--tk-flower) top left / 9px 9px repeat-x,
    var(--tk-flower) bottom left / 9px 9px repeat-x,
    linear-gradient(var(--tk-ink), var(--tk-ink)) 0 9px / 100% 1px no-repeat,
    linear-gradient(var(--tk-ink), var(--tk-ink)) 0 calc(100% - 9px) / 100% 1px no-repeat,
    linear-gradient(180deg, rgba(14, 76, 138, 0.94), rgba(7, 34, 72, 0.97));
  border-color: var(--tk-ink);
  border-radius: 4px;
  box-shadow: var(--tk-hard);
}
/* Small or phone-height panels: thinner flowers, so text near the edge is never covered. */
@media (max-width: 700px), (max-height: 560px) {
  html.desi .panel {
    background:
      var(--tk-flower) top left / 7px 7px repeat-x,
      var(--tk-flower) bottom left / 7px 7px repeat-x,
      linear-gradient(180deg, rgba(14, 76, 138, 0.94), rgba(7, 34, 72, 0.97));
    box-shadow: 3px 3px 0 var(--tk-ink);
  }
}

/* Side panels are solid (the review, #7: the enamel above is a little see-through, and the menu or the results
   text showed through Shop, Profile and Settings). A solid colour under the same paint. */
html.desi .panel.side-panel { background-color: var(--tk-peacock-deep); }

/* --- Lettering: big block capitals with a 3D shade, outlined in warm black ----------------------------- */
html.desi .brand h1, html.desi .side-brand span, html.desi #message .big, html.desi .garage-head h2 {
  font-family: 'Yatra One', 'Lilita One', Impact, sans-serif;
  font-style: normal; font-weight: 400;
  background: none; -webkit-background-clip: initial; background-clip: initial; -webkit-text-fill-color: initial;
  color: var(--tk-yellow);
  -webkit-text-stroke: 0.045em var(--tk-ink); paint-order: stroke fill;
  filter: none;
  text-shadow:
    -0.015em -0.015em 0 var(--tk-ivory),
     0.03em 0.03em 0 var(--tk-ink),
     0.06em 0.06em 0 var(--tk-yellow-shade),
     0.09em 0.09em 0 var(--tk-yellow-shade),
     0.12em 0.12em 0 var(--tk-ink);
}
/* Headings on a cream nameplate: red letters with a blue block, pink scallops above and below. */
html.desi #lobby-title, html.desi .results h2, html.desi .side-panel h2 {
  position: relative;
  font-family: 'Yatra One', 'Lilita One', Impact, sans-serif; font-style: normal; font-weight: 400;
  background: var(--tk-cream);
  background-clip: border-box; -webkit-background-clip: border-box; -webkit-text-fill-color: initial;
  color: var(--tk-red);
  -webkit-text-stroke: 1px var(--tk-ink); paint-order: stroke fill;
  text-shadow: 1px 1px 0 var(--tk-ink), 2px 2px 0 var(--tk-blue), 3px 3px 0 var(--tk-ink);
  box-shadow: inset 0 0 0 2px var(--tk-ink), 3px 3px 0 var(--tk-ink);
  border-radius: 0;
}
html.desi .results h2::before, html.desi .results h2::after, html.desi #lobby-title::after {
  content: ''; position: absolute; left: 0; right: 0; height: 9px; pointer-events: none;
  background: var(--tk-scallop) repeat-x center / 16px 9px;
}
html.desi .results h2::before { top: -8px; }
/* (2026-11-06: "Lobby · Room CODE" wraps to two lines in the lobby's panel, and with no room inside the plate the top
   line's letters were cut off by its edge.) */
html.desi #lobby-title { padding: 6px 8px 4px; line-height: 1.3; }
html.desi .results h2::after, html.desi #lobby-title::after { bottom: -8px; transform: scaleY(-1); }

/* Buttons, chips and labels (Bungee via --display): a little less letter spacing, since Bungee is wide. */
html.desi button { letter-spacing: 0.02em; }
html.desi h3.label, html.desi .side-panel h3, html.desi .label-inline { letter-spacing: 0.12em; }
html.desi button.secondary, html.desi .pill, html.desi h3.label, html.desi .side-panel h3 { text-shadow: 1px 1px 0 var(--tk-ink), 2px 2px 0 var(--tk-ink); }
html.desi h3.label::before { background: var(--tk-silver); box-shadow: inset 0 0 0 1px var(--tk-gold), 1px 1px 0 var(--tk-ink); }   /* a shisha mirror piece */
html.desi .side-panel h3 { color: var(--tk-jade); }

/* The room code and keys: a yellow number plate. */
html.desi #lobby-title .code, html.desi .key-chip kbd {
  font-family: 'Rubik Mono One', 'Bungee', monospace;
  color: var(--tk-ink); background: var(--tk-yellow);
  box-shadow: inset 0 0 0 2px var(--tk-ink), 2px 2px 0 var(--tk-ink);
  -webkit-text-stroke: 0; text-shadow: none; letter-spacing: 0.08em;
}

/* --- Start screen ------------------------------------------------------------------------------------- */
/* The jhalar: a chain of tassels hanging from the header (not on short screens, and not over the Diwali toran). */
html.desi .start-head::after {
  content: ''; position: absolute; left: 0; right: 0; top: 100%; height: 24px; pointer-events: none;
  background: var(--tk-jhalar) repeat-x left top / 48px 24px; z-index: 1;
}
html.desi.diwali .start-head::after { display: none; }
@media (max-height: 520px), (max-width: 420px) { html.desi .start-head::after { display: none; } }
@media (prefers-reduced-motion: no-preference) {
  html.desi .start-head::after { animation: tk-sway 1.8s ease-in-out infinite alternate; transform-origin: 50% 0; }
}
@keyframes tk-sway { from { transform: rotate(-0.6deg); } to { transform: rotate(0.6deg); } }

html.desi .play-big { background: linear-gradient(180deg, var(--tk-yellow-hot) 0 48%, var(--tk-yellow) 48% 100%); color: var(--tk-ink); box-shadow: inset 0 0 0 3px var(--tk-ink), var(--tk-hard); }
html.desi .play-word { font-family: 'Yatra One', 'Lilita One', Impact, sans-serif; font-style: normal; letter-spacing: 0.06em; color: var(--tk-white); -webkit-text-stroke: 1.5px var(--tk-ink); paint-order: stroke fill; text-shadow: 2px 2px 0 var(--tk-ink), 4px 4px 0 var(--tk-red); }
html.desi .start-tiles .start-tile, html.desi .event-banner, html.desi .events-banner, html.desi .training-banner { box-shadow: inset 0 0 0 2px var(--tk-ink), 3px 3px 0 var(--tk-ink); }
html.desi .foot-link { background: #0B3F74; }
html.desi .foot-link:hover, html.desi button.icon:hover { background: #124E8C; }

/* --- Game picker tiles: cream plates, yellow when picked ---------------------------------------------- */
html.desi .gp-tile { background: var(--tk-cream); color: var(--tk-ink); box-shadow: inset 0 0 0 2px var(--tk-ink); }
html.desi .gp-tile[aria-pressed="true"] { background: var(--tk-yellow); box-shadow: inset 0 0 0 2px var(--tk-ink), inset 0 0 0 4px var(--tk-ivory); }
html.desi .gp-stage { background-color: var(--tk-peacock-deep); }
html.desi .gp-kicker { color: var(--tk-jade); letter-spacing: 0.08em; }
html.desi .gp-name { font-family: 'Yatra One', 'Lilita One', Impact, sans-serif; -webkit-text-stroke-color: var(--tk-ink); text-shadow: 3px 3px 0 var(--tk-red-shade); }
html.desi .gp-hexnum { background: var(--tk-yellow); color: var(--tk-ink); filter: drop-shadow(2px 2px 0 var(--tk-ink)); }

/* --- Lobby -------------------------------------------------------------------------------------------- */
html.desi #lobby-players li { background: rgba(244, 231, 195, 0.08); box-shadow: inset 0 0 0 1px var(--line); }
html.desi #action-button { background: var(--tk-hazard); color: var(--tk-yellow); }
html.desi #action-button::before { background: rgba(7, 34, 72, 0.96); }
html.desi #action-button.is-ready { background: repeating-linear-gradient(-45deg, var(--tk-green) 0 10px, var(--tk-ink) 10px 12px, var(--tk-yellow) 12px 22px, var(--tk-ink) 22px 24px); }

/* --- In-race HUD: outline and colour only; it stays see-through over the road ----------------------- */
html.desi .pill { background: var(--glass-strong); color: var(--tk-white); filter: drop-shadow(1px 1px 0 var(--tk-ink)); }
html.desi #floor { background: var(--tk-yellow); color: var(--tk-ink); text-shadow: none; }
html.desi #floor.safe { background: var(--tk-green); color: var(--tk-white); }
html.desi #floor.danger, html.desi #lives { background: linear-gradient(180deg, var(--tk-red), var(--tk-red-shade)); color: var(--tk-white); }
html.desi #jump-fill { background: var(--tk-hazard); }
@media (prefers-reduced-motion: no-preference) {
  html.desi #jump-fill { background-size: 34px 100%; animation: tk-march 0.4s linear infinite; }
}
@keyframes tk-march { to { background-position: 34px 0; } }
html.desi .diya-count { background: var(--tk-yellow); color: var(--tk-ink); box-shadow: 2px 2px 0 var(--tk-ink); border: 2px solid var(--tk-ink); }
html.desi #toast { background: var(--tk-ink); color: var(--tk-white); box-shadow: 0 0 0 2px var(--tk-yellow); }
/* (2026-11-03, WP-F of the CrazyGames fix plan: the grey box behind the phone's notices is gone; the plan asks for
   "the grey box behind the feed removed", it covered the road at 844 x 390. The notices keep their own colours.) */
/* Phone buttons: painted pedals (colour and shadow only: Customise moves them by transform). */
html.desi #touch [data-control] { box-shadow: inset 0 0 0 3px var(--tk-ink), 0 4px 0 var(--tk-ink); }
html.desi #touch [data-control="jump"] { background: linear-gradient(180deg, #FFE27A 0 48%, var(--tk-yellow) 48%); color: var(--tk-ink); }
html.desi #touch [data-control="bash"] { background: var(--tk-red); color: var(--tk-white); }
html.desi #touch [data-control="fire"] { background: linear-gradient(180deg, var(--tk-orange) 0 50%, var(--tk-red) 50%); color: var(--tk-white); }
html.desi #touch [data-control="gas"] { background: linear-gradient(180deg, var(--tk-green) 0 50%, var(--tk-green-shade) 50%); color: var(--tk-white); }

/* --- Results and podium -------------------------------------------------------------------------------- */
html.desi #message { border-color: var(--tk-ink); }
html.desi #message b { color: var(--tk-yellow); }
html.desi .results li { background: rgba(244, 231, 195, 0.08); }
html.desi .results .place { color: var(--tk-ink); font-family: 'Rubik Mono One', 'Bungee', monospace; filter: drop-shadow(2px 2px 0 var(--tk-ink)); }
html.desi .results .p1 .place { background: var(--tk-yellow); }
html.desi .results .p2 .place { background: var(--tk-silver); }
html.desi .results .p3 .place { background: #D2843C; }
html.desi .results .stars { color: var(--tk-yellow); text-shadow: 1px 1px 0 var(--tk-ink); }

/* --- Settings and side panels --------------------------------------------------------------------------- */
html.desi .switch { background: var(--tk-ink); box-shadow: inset 0 0 0 2px var(--tk-gold); }
html.desi .switch:checked { background: var(--tk-jade); }
html.desi input[type="range"] { accent-color: var(--tk-yellow); }
html.desi .side-panel h3::after { background: repeating-linear-gradient(90deg, var(--tk-gold) 0 6px, #8A6418 6px 12px); }

/* --- Comic words ---------------------------------------------------------------------------------------- */
html.desi .comic-burst b { paint-order: stroke fill; text-shadow: 0.06em 0.06em 0 var(--tk-ink), 0.12em 0.12em 0 var(--tk-red-shade); }

/* --- Tailgate plaque (2026-11-04): the comic words in the Desi look ---------------------------------------------------
   Sameer, on the round's end starburst: "Its so ugly and basic. Design it with our desired aesthetic", the loading
   view's "Horn OK Please" tailgate. overlay.js builds .tg-* (instead of .comic-burst) only in html.desi. Everything is
   sized in em from --fs, which overlay.js sets once per word from its length and the screen, so one set of rules fits
   GAYA! to CATCH SOMEONELONG!. Kinds: .mid (upper third, clear of the car), .top (a slim strip by the top; the big ones
   blinded him), .end (a round's end: the screen for a beat, then hung on the results card as its header). */
html.desi .tg-overlay {
  position: fixed; inset: 0; z-index: 9; pointer-events: none; overflow: hidden;
  display: grid; justify-items: center; align-content: start; padding-top: var(--tg-top, 20vh);
}
html.desi .tg-overlay.end { --tg-top: max(12px, calc(var(--vh, 100vh) * 0.5 - var(--fs) * 1.25)); }
html.desi .tg-overlay.mid { --tg-top: calc(var(--vh, 100vh) * 0.17); }
html.desi .tg-overlay.top { --tg-top: calc(70px + env(safe-area-inset-top)); }
@media (max-height: 500px) {
  html.desi .tg-overlay.mid { --tg-top: calc(56px + env(safe-area-inset-top)); }
  html.desi .tg-overlay.top { --tg-top: calc(48px + env(safe-area-inset-top)); }
}
html.desi .tg-overlay.docked { z-index: 6; }   /* (hung on the card: under the side panels, like the card) */
html.desi .tg-overlay.docked .tg-plate { transform: rotate(-0.8deg); transition: transform 0.5s; }   /* (less tilt hung up, so its low corner clears the headline) */
html.desi body.round-over:has(.tg-overlay.docked) #jump { visibility: hidden; }   /* (the jump meter, done with, under its left tail at 1280 wide) */
html.desi .tg-overlay.gone { opacity: 0; transition: opacity 0.25s; }
html.desi .tg-pos { position: relative; font-size: var(--fs); }
html.desi .tg-swing { position: relative; transform-origin: 50% calc(-1 * var(--pivot, 45vh)); }
html.desi .tg-plate { position: relative; transform: rotate(-1.6deg); }   /* (a hand-painted tilt; the sub plate answers it) */

/* The chains it hangs on: brass links with an ink outline, up off the top of the screen; hooked on the card, short. */
html.desi .tg-chain {
  position: absolute; bottom: calc(100% - 0.16em); width: 0.13em; min-width: 7px; height: 120vh; left: 20%; transform: translateX(-50%);
  background: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='10' height='26' viewBox='0 0 10 26'%3E%3Cellipse cx='5' cy='7' rx='3.4' ry='5.6' fill='none' stroke='%231B1612' stroke-width='3.4'/%3E%3Cellipse cx='5' cy='7' rx='3.4' ry='5.6' fill='none' stroke='%23E8B53A' stroke-width='1.6'/%3E%3Crect x='3.6' y='12.5' width='2.8' height='13.5' rx='1.4' fill='%23C9962A' stroke='%231B1612' stroke-width='1.2'/%3E%3C/svg%3E") bottom center / 100% auto repeat-y;
}
html.desi .tg-chain.r { left: 80%; }
html.desi .tg-chain::after, html.desi .tg-overlay.hooked .tg-chain::before {   /* the ring bolts */
  content: ''; position: absolute; left: 50%; bottom: -0.1em; width: 0.26em; height: 0.26em; min-width: 12px; min-height: 12px; transform: translateX(-50%);
  border-radius: 50%; background: radial-gradient(circle at 38% 35%, #FFE7A0, var(--tk-gold) 55%, #7A5A10); box-shadow: 0 0 0 2px var(--tk-ink);
}
html.desi .tg-overlay.hooked .tg-chain { height: 0.45em; }
html.desi .tg-overlay.hooked .tg-chain::before { bottom: auto; top: -0.12em; background: radial-gradient(circle, transparent 34%, #FFE7A0 38%, var(--tk-gold) 60%, #7A5A10 72%); }

/* The enamel board: pink scallops along the top, brush streaks, a sheen; ringed ink, canary, ink; a hard ink shadow */
html.desi .tg-board {
  position: relative; z-index: 1; padding: 0.5em 0.72em; border-radius: 0.2em;
  background:
    url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='22' height='12' viewBox='0 0 22 12'%3E%3Cpath d='M0 0 A11 11 0 0 0 22 0Z' fill='%23E6388C' stroke='%231B1612' stroke-width='1.6' stroke-linejoin='round'/%3E%3Ccircle cx='11' cy='3.4' r='2' fill='%23FFC81E'/%3E%3C/svg%3E") left 0 top 0.13em / 0.3em 0.165em repeat-x,
    repeating-linear-gradient(90deg, rgba(255, 255, 255, 0.04) 0 2px, transparent 2px 0.5em),
    radial-gradient(120% 140% at 30% 0%, rgba(255, 255, 255, 0.16), transparent 55%),
    linear-gradient(180deg, #1A66B5 0%, var(--tk-peacock) 55%, #093766 100%);
  box-shadow: inset 0 0 0 0.04em var(--tk-ink), inset 0 0 0 0.09em var(--tk-yellow), inset 0 0 0 0.125em var(--tk-ink), 0.1em 0.1em 0 var(--tk-ink);
}
html.desi .tg-board::before {   /* the signwriter's cream pinstripe */
  content: ''; position: absolute; inset: 0.36em 0.24em 0.3em; border: max(1.5px, 0.03em) dashed rgba(251, 243, 220, 0.75); border-radius: 0.16em; pointer-events: none;
}
html.desi .tg-board::after {   /* the barber-pole bumper along the bottom */
  content: ''; position: absolute; left: 0.125em; right: 0.125em; bottom: 0.125em; height: 0.13em; min-height: 5px;
  background: var(--tk-hazard); background-size: 34px 34px; box-shadow: 0 -2px 0 var(--tk-ink); border-radius: 0 0 0.08em 0.08em;
}
/* A loss (GAYA!): a near-black board, dark-red scallops, red trim and a red-and-maroon bumper */
html.desi .tg-overlay.loss .tg-board {
  background:
    url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='22' height='12' viewBox='0 0 22 12'%3E%3Cpath d='M0 0 A11 11 0 0 0 22 0Z' fill='%237A0F14' stroke='%231B1612' stroke-width='1.6' stroke-linejoin='round'/%3E%3Ccircle cx='11' cy='3.4' r='2' fill='%23D8232A'/%3E%3C/svg%3E") left 0 top 0.13em / 0.3em 0.165em repeat-x,
    repeating-linear-gradient(90deg, rgba(255, 255, 255, 0.03) 0 2px, transparent 2px 0.5em),
    radial-gradient(120% 140% at 30% 0%, rgba(255, 255, 255, 0.1), transparent 55%),
    linear-gradient(180deg, #34293A 0%, var(--tk-ink) 55%, #0C0907 100%);
  box-shadow: inset 0 0 0 0.04em var(--tk-ink), inset 0 0 0 0.09em var(--tk-red), inset 0 0 0 0.125em var(--tk-ink), 0.1em 0.1em 0 var(--tk-ink);
}
html.desi .tg-overlay.loss .tg-board::after { background: repeating-linear-gradient(-45deg, var(--tk-red) 0 10px, var(--tk-ink) 10px 12px, var(--tk-red-shade) 12px 22px, var(--tk-ink) 22px 24px); }

/* The lettering, like HORN OK PLEASE: Bungee, an 8-way ink outline, a stacked red, deep-red and ink shade. The first
   word in the call's paint (--accent), the rest cream. The "!" is painted as a letter. */
html.desi .tg-word {
  position: relative; z-index: 1; display: flex; flex-wrap: wrap; justify-content: center; align-items: center; column-gap: 0.32em; row-gap: 0.06em;
  margin: 0; padding: 0.08em 0.06em 0.12em 0; font: 400 1em/1.02 'Bungee', 'Lilita One', Impact, sans-serif; text-transform: uppercase; letter-spacing: 0.01em; white-space: nowrap;
}
html.desi .tg-overlay.stack .tg-word { flex-direction: column; }
html.desi .tg-word span {
  display: block; color: var(--tk-cream);
  text-shadow:
    -0.035em -0.035em 0 var(--tk-ink), 0.035em -0.035em 0 var(--tk-ink), -0.035em 0.035em 0 var(--tk-ink), 0.035em 0.035em 0 var(--tk-ink),
    0 -0.04em 0 var(--tk-ink), 0 0.04em 0 var(--tk-ink), -0.04em 0 0 var(--tk-ink), 0.04em 0 0 var(--tk-ink),
    0.06em 0.06em 0 var(--tk-red), 0.08em 0.08em 0 var(--tk-red), 0.1em 0.1em 0 #8E1218, 0.12em 0.12em 0 #8E1218,
    0.14em 0.14em 0 var(--tk-ink), 0.16em 0.16em 0 var(--tk-ink);
}
html.desi .tg-word span:first-child { color: var(--accent, var(--tk-yellow)); }

/* Marigolds at the four corners */
html.desi .tg-flower { position: absolute; z-index: 2; width: 0.58em; height: 0.58em; min-width: 18px; min-height: 18px; filter: drop-shadow(0.03em 0.04em 0 rgba(27, 22, 18, 0.6)); }
html.desi .tg-flower.tl { left: -0.2em; top: -0.2em; transform: rotate(-12deg); }
html.desi .tg-flower.tr { right: -0.2em; top: -0.2em; transform: rotate(14deg); }
html.desi .tg-flower.bl { left: -0.2em; bottom: -0.2em; transform: rotate(10deg); }
html.desi .tg-flower.br { right: -0.2em; bottom: -0.2em; transform: rotate(-16deg); }

/* The jhalar: a tassel fringe hanging off the bottom edge, swaying */
html.desi .tg-fringe {
  position: absolute; z-index: 0; left: 0.42em; right: 0.42em; top: calc(100% - 0.06em); height: 0.42em; transform-origin: 50% 0;
  background: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='44' height='30' viewBox='0 0 44 30'%3E%3Cpath d='M0 3 Q11 13 22 3 Q33 13 44 3' fill='none' stroke='%231B1612' stroke-width='2.6'/%3E%3Cpath d='M0 3 Q11 13 22 3 Q33 13 44 3' fill='none' stroke='%23FFC81E' stroke-width='1.1'/%3E%3Ccircle cx='11' cy='11' r='2.8' fill='%23FFC81E' stroke='%231B1612' stroke-width='1.2'/%3E%3Cpath d='M11 13.6 L6.6 27 H15.4Z' fill='%23D8232A' stroke='%231B1612' stroke-width='1.3' stroke-linejoin='round'/%3E%3Ccircle cx='33' cy='11' r='2.8' fill='%23FFC81E' stroke='%231B1612' stroke-width='1.2'/%3E%3Cpath d='M33 13.6 L28.6 27 H37.4Z' fill='%231E8A3C' stroke='%231B1612' stroke-width='1.3' stroke-linejoin='round'/%3E%3C/svg%3E") center top / auto 100% repeat-x;
  animation: tg-tassel 1.3s ease-in-out infinite alternate;
  transition: height 0.3s, opacity 0.2s;
}
html.desi .tg-overlay.docked .tg-fringe { height: 0.3em; }
@media (max-height: 520px) { html.desi .tg-overlay.docked .tg-fringe { opacity: 0; } }   /* (hung on a phone's card it would touch the headline) */

/* The sub line. A cheer: cream Yatra One on a red OK plate ringed canary and ink. An instruction (over 22 letters): ink
   Barlow on a cream plate with a red inner ring and two screws, to read at a glance. Tilted to answer the board. */
html.desi .tg-sub {
  position: relative; z-index: 2; display: block; width: max-content; max-width: min(88vw, 22em); margin: 0.5em auto 0; transform: rotate(1.4deg);
  padding: 0.12em 0.95em 0.2em; border-radius: 2em; text-align: center; white-space: normal; text-wrap: balance;
  font: 400 max(15px, calc(var(--fs) * 0.36))/1.2 'Yatra One', 'Lilita One', sans-serif; letter-spacing: 0.04em;
  color: var(--tk-ivory); background: var(--tk-red);
  box-shadow: 0 0 0 0.1em var(--tk-ink), 0 0 0 0.22em var(--tk-yellow), 0 0 0 0.32em var(--tk-ink), 0.26em 0.3em 0 0.32em var(--tk-ink);
  text-shadow: 0.06em 0.06em 0 var(--tk-ink);
  transition: opacity 0.18s;
}
html.desi .tg-sub:empty { display: none; }
html.desi .tg-sub.long {
  max-width: min(92vw, 30em); margin-top: 0.15em; padding: 0.45em calc(0.7em + 10px) 0.4em; border-radius: 0.3em;
  font: 800 max(13px, calc(var(--fs) * 0.34))/1.2 'Barlow', system-ui, sans-serif; letter-spacing: 0.01em;
  color: var(--tk-ink); background: var(--tk-cream); text-shadow: none;
  box-shadow: inset 0 0 0 2px var(--tk-ink), inset 0 0 0 4px var(--tk-cream), inset 0 0 0 5px var(--tk-red), 3px 3px 0 var(--tk-ink);
}
html.desi .tg-sub.long::before, html.desi .tg-sub.long::after {   /* two screws */
  content: ''; position: absolute; top: 50%; width: 6px; height: 6px; margin-top: -3px; border-radius: 50%;
  background: radial-gradient(circle at 35% 35%, #fff, #9AA0A6); box-shadow: 0 0 0 1.5px var(--tk-ink);
}
html.desi .tg-sub.long::before { left: 0.5em; }
html.desi .tg-sub.long::after { right: 0.5em; }
html.desi .tg-overlay.docked .tg-sub { opacity: 0; }   /* (hung on the card: its headline says it) */

/* A glint across the enamel just after it lands */
html.desi .tg-shine {
  position: absolute; inset: 0.125em; z-index: 1; pointer-events: none; border-radius: 0.1em;
  background: linear-gradient(105deg, transparent 0 40%, rgba(255, 255, 255, 0.38) 47%, rgba(255, 255, 255, 0.08) 52%, transparent 58%) -150% 0 / 250% 100% no-repeat;
  animation: tg-shine 0.8s calc(var(--drop) * 0.55) ease-out both;
}
/* The shockwave as the chains snap tight: an ink-and-canary ring bursting off the board */
html.desi .tg-shock {
  position: absolute; inset: 0; z-index: 0; border-radius: 0.25em; opacity: 0;
  box-shadow: 0 0 0 0.07em var(--tk-yellow), 0 0 0 0.13em var(--tk-ink);
  animation: tg-shock 0.5s calc(var(--drop) * 0.4) ease-out both;
}
html.desi .tg-overlay.mid .tg-shock { animation-name: tg-shock-small; }
/* Sparks off the landing (a round's end): marigolds, diyas, stars and petals, up and out from behind the board */
html.desi .tg-sparks { position: absolute; inset: 0; z-index: 0; }
html.desi .tg-sparks i {
  position: absolute; left: var(--ox); top: 45%; width: calc(var(--s) * 1em); height: calc(var(--s) * 1em); margin: calc(var(--s) * -0.5em) 0 0 calc(var(--s) * -0.5em); opacity: 0;
  animation: tg-spark var(--dur, 1s) calc(var(--drop) * 0.4 + var(--d, 0s)) cubic-bezier(0.12, 0.75, 0.3, 1) both;
}
html.desi .tg-sparks svg { display: block; width: 100%; height: 100%; overflow: visible; }
html.desi .tg-overlay.docked .tg-sparks { visibility: hidden; }
/* Ribbon tails, swallow-cut and painted in the hazard stripes of the call's colour, out past the card's sides once hung */
html.desi .tg-tail { position: absolute; z-index: 0; top: 0.42em; bottom: -0.3em; width: 1.5em; display: none; filter: drop-shadow(0.08em 0.08em 0 var(--tk-ink)); }
html.desi .tg-tail.l { left: -0.95em; transform-origin: 100% 50%; }
html.desi .tg-tail.r { right: -0.95em; transform-origin: 0 50%; }
html.desi .tg-tail i, html.desi .tg-tail i::after { position: absolute; inset: 0; display: block; content: ''; }
html.desi .tg-tail i { background: var(--tk-ink); }
html.desi .tg-tail i::after { inset: 0.06em; background: repeating-linear-gradient(-45deg, var(--tail) 0 0.16em, var(--tk-ink) 0.16em 0.19em, var(--tk-yellow) 0.19em 0.35em, var(--tk-ink) 0.35em 0.38em); }
html.desi .tg-tail.l i { clip-path: polygon(0 0, 100% 0, 100% 100%, 0 100%, 0.5em 50%); }
html.desi .tg-tail.l i::after { clip-path: polygon(0 0, 100% 0, 100% 100%, 0 100%, 0.44em 50%); }
html.desi .tg-tail.r i { clip-path: polygon(0 0, 100% 0, calc(100% - 0.5em) 50%, 100% 100%, 0 100%); }
html.desi .tg-tail.r i::after { clip-path: polygon(0 0, 100% 0, calc(100% - 0.44em) 50%, 100% 100%, 0 100%); }
html.desi .tg-overlay.docked .tg-tail { display: block; animation: tg-tail 0.36s 0.3s cubic-bezier(0.25, 1.6, 0.45, 1) both; }

/* Behind the round's end word: a ring of painted petals, turning a little, and the screen's edges dimmed */
html.desi .tg-glow {
  position: absolute; inset: 0; z-index: -1; pointer-events: none;
  background: radial-gradient(75% 70% at 50% var(--glow-y, 45%), transparent 30%, rgba(5, 22, 44, 0.6));
  animation: tg-fade 0.3s ease-out both; transition: opacity 0.4s;
}
html.desi .tg-rays {
  position: absolute; left: 50%; top: var(--glow-y, 45%); width: min(calc(var(--fs) * 9.5), 125vmin); height: auto; aspect-ratio: 1; translate: -50% -50%; opacity: 0.55;
  animation: tg-rays 0.9s calc(var(--drop) * 0.3) cubic-bezier(0.2, 1.3, 0.4, 1) both, tg-turn 3s linear both;
}
@media (max-height: 520px) {   /* (a phone on its side: softer, so the car still shows) */
  html.desi .tg-glow { background: radial-gradient(75% 70% at 50% var(--glow-y, 45%), transparent 40%, rgba(5, 22, 44, 0.32)); }
  html.desi .tg-rays { opacity: 0.3; }
}
html.desi .tg-overlay.docked .tg-glow { opacity: 0; }

/* The results card waits unseen (and untouchable) while the plaque has the screen, then rises in under it */
html.desi body.tg-hero #message, html.desi body.tg-hero #action-button { opacity: 0; translate: 0 18px; pointer-events: none; }
html.desi body.tg-reveal #message { transition: opacity 0.38s 0.2s ease-out, translate 0.38s 0.2s cubic-bezier(0.2, 0.9, 0.3, 1.1); }
html.desi body.tg-reveal #action-button { transition: opacity 0.3s 0.3s ease-out, translate 0.3s 0.3s ease-out; }

/* Motion: it drops in on its chains, lands with a squash and a bounce, swings like a pendulum and settles */
html.desi .tg-swing { animation: tg-drop var(--drop) cubic-bezier(0.55, 0, 0.9, 0.5) both; }
html.desi .tg-board { animation: tg-squash var(--drop) linear both; }
html.desi .tg-overlay.skip :is(.tg-swing, .tg-board, .tg-shine, .tg-shock, .tg-sparks i, .tg-rays) { animation: none; }
@keyframes tg-drop {
  0%   { transform: translateY(-115vh) rotate(calc(var(--amp) * -1.2deg)); }
  40%  { transform: translateY(0) rotate(calc(var(--amp) * 1deg)); animation-timing-function: cubic-bezier(0.2, 0.7, 0.4, 1); }
  50%  { transform: translateY(calc(var(--fs) * -0.14)) rotate(calc(var(--amp) * 0.2deg)); animation-timing-function: cubic-bezier(0.5, 0, 0.8, 0.4); }
  58%  { transform: translateY(0) rotate(calc(var(--amp) * -0.6deg)); }
  72%  { transform: translateY(0) rotate(calc(var(--amp) * 0.36deg)); }
  86%  { transform: translateY(0) rotate(calc(var(--amp) * -0.16deg)); }
  100% { transform: translateY(0) rotate(0deg); }
}
@keyframes tg-squash { 0%, 38% { scale: 1 1; } 42% { scale: 1.06 0.88; } 49% { scale: 0.97 1.05; } 56%, 100% { scale: 1 1; } }
@keyframes tg-shine { to { background-position: 250% 0; } }
@keyframes tg-tassel { from { transform: skewX(-5deg); } to { transform: skewX(5deg); } }
@keyframes tg-shock { 0% { opacity: 0.95; transform: scale(1); } 45% { opacity: 0.3; } 100% { opacity: 0; transform: scale(1.22, 1.7); } }   /* (the fade front-loaded: a lingering ring read as a misprinted ghost frame) */
@keyframes tg-shock-small { 0% { opacity: 0.8; transform: scale(1); } 45% { opacity: 0.25; } 100% { opacity: 0; transform: scale(1.12, 1.4); } }
@keyframes tg-spark {
  0% { transform: translate(0, 0) scale(0.2) rotate(0); opacity: 0; }
  12%, 70% { opacity: 1; }
  100% { transform: translate(calc(var(--tx) * 1em), calc(var(--ty) * 1em)) scale(1) rotate(var(--r)); opacity: 0; }
}
@keyframes tg-tail { from { transform: scaleX(0); } }
@keyframes tg-rays { from { scale: 0.35; opacity: 0; } }
@keyframes tg-turn { from { rotate: -10deg; } to { rotate: 14deg; } }
@keyframes tg-fade { from { opacity: 0; } }
@media (prefers-reduced-motion: reduce) {   /* no drop, swing, squash, sway, glint or sparks: it fades in */
  html.desi .tg-swing, html.desi .tg-board, html.desi .tg-fringe, html.desi .tg-rays, html.desi .tg-overlay.docked .tg-tail { animation: none; }
  html.desi .tg-shine, html.desi .tg-shock, html.desi .tg-sparks { display: none; }
  html.desi .tg-overlay { animation: tg-fade 0.2s ease-out both; }
}
