/* Chockies: Word Rivals - the game's own look on top of the studio kit (kit.css): the logo, the menus, the board in
   its walnut tray, biscuit tiles, the rack, the café counter, Festival Rush, results. Animations are transform and
   opacity only; "Animations: off" (body.no-anim is not needed: fx.js checks the setting) keeps them short. */

:root { --tile1: #fff0c9; --tile2: #f5d18e; --tile3: #e2ad62; --tile-ink: #5e3213; --board: #f8ecd3; --grid: #d8bd8c;
  --dl: #9ed6ec; --dl2: #7cc3e0; --tl: #4f8fe0; --tl2: #3471c4; --dw: #f6b3c4; --dw2: #ec8fa9; --tw: #e0505e; --tw2: #bf2f3f; }
#app.land .modal-body { min-height: 0; overflow-y: auto; overscroll-behavior: contain; }
#game { position: absolute; inset: 0; z-index: 5; }
#game[hidden] { display: none !important; }

/* ---------------------------------------------------------------- the logo (letters as tiles on a plank) */
.wr-logo { position: relative; display: flex; flex-direction: column; align-items: center; margin: 0 auto; width: 300px; filter: drop-shadow(0 8px 10px rgba(0, 0, 0, 0.45)); }
.wr-logo-top { position: relative; z-index: 2; font-family: 'Lilita One', sans-serif; font-size: 50px; line-height: 1; letter-spacing: 1px; margin-bottom: -10px; white-space: nowrap;
  color: #ffb52e; -webkit-text-stroke: 10px #4a2108; paint-order: stroke fill; text-shadow: 0 5px 0 #4a2108, 0 9px 8px rgba(0, 0, 0, 0.35); transform: rotate(-3deg); }
.wr-logo-top::after { content: attr(data-text); position: absolute; left: 0; top: 0; -webkit-text-stroke: 0; text-shadow: none;
  background: linear-gradient(180deg, #fff8b8 0%, #ffe14a 34%, #ffab24 70%, #f27a10 100%); -webkit-background-clip: text; background-clip: text; color: transparent; }
.wr-logo-plank { position: relative; padding: 16px 22px 18px; border-image: url('assets/kit/ui/sign_plank.webp') 42% 20% fill / 30px 56px stretch; display: flex; flex-direction: column; gap: 6px; align-items: center; }
.wr-logo-plank::after { content: ''; position: absolute; left: 50%; bottom: 6px; width: 60px; height: 7px; transform: translateX(-50%); border-radius: 4px;
  background: linear-gradient(90deg, #111 0 33%, #ffd23f 33% 66%, #e0303a 66%); box-shadow: 0 1px 0 rgba(255, 255, 255, 0.3); }
.wr-row { display: flex; gap: 4px; }
.wr-logo .lt { --s: 34px; position: relative; width: var(--s); height: var(--s); border-radius: 7px; display: inline-flex; align-items: center; justify-content: center;
  font-family: 'Baloo', sans-serif; font-size: 25px; line-height: 1; color: var(--tile-ink); padding-top: 3px;
  background: radial-gradient(circle at 25% 20%, rgba(255, 255, 255, 0.6), transparent 45%), linear-gradient(155deg, var(--tile1), var(--tile2) 55%, var(--tile3));
  box-shadow: inset 0 1.5px 0 rgba(255, 255, 255, 0.9), inset 0 -2.5px 0 rgba(150, 90, 30, 0.55), 0 3px 3px rgba(40, 15, 0, 0.45);
  transform: rotate(calc((var(--k) - 2) * 1.6deg)) translateY(calc(sin(var(--k) * 1.3) * 2px)); text-shadow: 0 1px 0 rgba(255, 255, 255, 0.7); }
.wr-logo .wr-row:last-child .lt { --s: 38px; font-size: 28px; background: radial-gradient(circle at 25% 20%, rgba(255, 255, 255, 0.55), transparent 45%), linear-gradient(155deg, #ffe58a, #ffc93c 55%, #f0a01c); }
.wr-logo .lt i { position: absolute; right: 4px; bottom: 2px; width: 4px; height: 4px; border-radius: 50%; background: rgba(140, 80, 25, 0.35); }
.wr-logo.small { transform: scale(0.72); transform-origin: top center; margin-bottom: -40px; }

/* ---------------------------------------------------------------- title screen */
.title-screen { position: absolute; inset: 0; display: flex; flex-direction: column; align-items: center; justify-content: flex-start; padding-top: calc(40px + var(--safe-top)); cursor: pointer; }
.ts-logo { margin-top: 10px; animation: wr-drop 0.8s cubic-bezier(0.2, 0.9, 0.3, 1.2) both; }
.ts-hero { position: absolute; left: 0; right: 0; bottom: 70px; height: 52%; pointer-events: none; }
.ts-hero img { position: absolute; bottom: 0; height: 100%; filter: drop-shadow(0 12px 12px rgba(0, 0, 0, 0.45)); }
.ts-hero .mr { left: -6%; animation: wr-in-left 0.9s 0.2s cubic-bezier(0.2, 0.9, 0.3, 1) both; }
.ts-hero .mme { right: -6%; height: 96%; animation: wr-in-right 0.9s 0.35s cubic-bezier(0.2, 0.9, 0.3, 1) both; }
.ts-tap { position: absolute; bottom: calc(30px + var(--safe-bottom)); font-family: 'Lilita One'; font-size: 28px; animation: wr-pulse 1.6s ease-in-out infinite; }
@keyframes wr-drop { from { transform: translateY(-60px) scale(0.8); opacity: 0; } }
@keyframes wr-in-left { from { transform: translateX(-60%); opacity: 0; } }
@keyframes wr-in-right { from { transform: translateX(60%); opacity: 0; } }
@keyframes wr-pulse { 50% { transform: scale(1.08); } }

/* ---------------------------------------------------------------- home */
.wr-home { gap: 8px; min-height: 100%; }
.wr-home .home-top .me { position: relative; display: flex; align-items: center; gap: 8px; padding: 4px 18px 5px 4px; max-width: 250px; min-width: 0; }
.wr-home .me .meta { display: flex; flex-direction: column; align-items: flex-start; gap: 3px; min-width: 0; }
.wr-home .me .nm { font-family: 'Lilita One'; font-size: 16px; max-width: 170px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; color: #fff; }
.wr-home .me .lvl { display: flex; align-items: center; gap: 6px; font-family: 'Baloo'; font-size: 13px; color: #ffe7a8; line-height: 1; }
.wr-home .me .lvbar { display: block; width: 74px; height: 9px; border-radius: 5px; background: rgba(0, 0, 0, 0.45); box-shadow: inset 0 0 0 1px rgba(255, 220, 160, 0.3); overflow: hidden; }
.wr-home .me .lvbar i { display: block; height: 100%; border-radius: 5px; background: linear-gradient(180deg, #ffe066, #f0a91c); }
.home-logo-wrap { margin-top: 2px; position: relative; z-index: 3; }
.wr-home .wr-logo { transform: scale(0.86); transform-origin: top center; margin-bottom: -18px; }
.wr-home .home-hero { flex: 1; height: auto; min-height: 128px; max-height: 260px; margin: -6px -16px -4px; position: relative; }
.wr-home .home-hero .mr, .wr-home .home-hero .mme { width: auto; height: calc(100% + 22px); min-height: 150px; max-height: 280px; bottom: -14px; max-width: none; }
.wr-home .home-hero .mr { left: -4px; }
.wr-home .home-hero .mme { right: -4px; height: calc(100% + 14px); }
.hero-tiles { position: absolute; left: 50%; bottom: 18px; transform: translateX(-50%); display: flex; gap: 4px; }
.hero-tiles span { display: block; --c: 34px; animation: wr-bob 3s ease-in-out infinite; animation-delay: calc(var(--k) * -0.7s); }
.hero-tiles .tile { position: relative; width: 34px; height: 34px; }
@keyframes wr-bob { 50% { transform: translateY(-6px) rotate(3deg); } }
.mode-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; position: relative; z-index: 3; }
.mode-card { position: relative; border: 0; min-height: 104px; padding: 10px 10px 10px 12px; display: flex; flex-direction: column; justify-content: flex-end; align-items: flex-start; text-align: left; color: #fff;
  border-radius: 20px; overflow: hidden; box-shadow: inset 0 2px 0 rgba(255, 255, 255, 0.35), inset 0 -4px 0 rgba(0, 0, 0, 0.22), 0 0 0 3px #3a1a08, 0 7px 0 #3a1a08, 0 12px 16px rgba(0, 0, 0, 0.35);
  transition: transform 0.1s; }
.mode-card:active { transform: translateY(3px); }
.mode-card::before { content: ''; position: absolute; inset: 0; background: radial-gradient(circle at 80% 0%, rgba(255, 255, 255, 0.35), transparent 55%); pointer-events: none; }
.mode-card b { font-family: 'Lilita One'; font-size: 21px; line-height: 1; -webkit-text-stroke: 4px #3a1a08; paint-order: stroke fill; position: relative; z-index: 1; }
.mode-card small { font-family: 'Nunito'; font-weight: 800; font-size: 11.5px; line-height: 1.15; margin-top: 3px; text-shadow: 0 1px 2px rgba(0, 0, 0, 0.6); position: relative; z-index: 1; max-width: 100%; }
.mode-card .mc-art { position: absolute; right: -4px; top: -4px; width: 66px; height: 66px; transform: rotate(10deg); }
.mode-card .mc-art img { width: 100%; height: 100%; object-fit: contain; filter: drop-shadow(0 4px 3px rgba(0, 0, 0, 0.35)); }
.mode-card.classic { background: linear-gradient(160deg, #46c66f, #1e8c48); }
.mode-card.rush { background: linear-gradient(160deg, #ffb13b, #e9661a); }
.mode-card.crew { background: linear-gradient(160deg, #f27aa5, #c43b72); }
.mode-card.districts { background: linear-gradient(160deg, #5aa5f0, #2b62c4); }
.tile-grid.five { grid-template-columns: repeat(5, 1fr); gap: 6px; padding-top: 6px; padding-bottom: 6px; position: relative; z-index: 3; }
.tile-grid.four { grid-template-columns: repeat(4, 1fr); gap: 8px; padding-top: 6px; padding-bottom: 6px; position: relative; z-index: 3; }
.tile-grid.four .tile-btn { min-height: 80px; padding: 4px 2px 6px; }
.tile-grid.four .tile-btn img { width: 44px; height: 38px; }
.tile-grid.four .tile-btn span { font-size: 13px; }
.tile-grid.five .tile-btn { min-height: 76px; padding: 4px 2px 6px; }
.tile-grid.five .tile-btn img { width: 40px; height: 36px; }
.tile-grid.five .tile-btn span { font-size: 12px; }

/* ---------------------------------------------------------------- setup */
.setup, .settings, .stats, .online { display: flex; flex-direction: column; gap: 12px; max-width: 520px; margin: 0 auto; }
.mode-intro { display: flex; gap: 10px; align-items: center; }
.mode-intro img { width: 54px; height: 54px; object-fit: contain; flex: none; }
.mode-intro p { margin: 0; font-family: 'Nunito'; font-weight: 700; font-size: 13.5px; line-height: 1.3; }
.seg.who button { flex: 1; }
.seg { display: flex; flex-wrap: wrap; }
.seg button { flex: 1 1 auto; }
.lbl { font-family: 'Lilita One'; font-size: 17px; color: var(--ink); }
.lbl small { font-family: 'Nunito'; font-size: 12px; font-weight: 700; }
.rivals { display: grid; grid-template-columns: repeat(6, 1fr); gap: 4px; }
.rival { border: 0; background: none; padding: 2px; display: flex; flex-direction: column; align-items: center; gap: 2px; opacity: 0.55; filter: grayscale(0.6); transition: opacity 0.15s, transform 0.15s; }
.rival .avatar { width: 48px; height: 48px; border-color: #c9a26e; }
.rival small { font-family: 'Nunito'; font-weight: 800; font-size: 10px; line-height: 1.05; text-align: center; color: var(--ink); }
.rival.on { opacity: 1; filter: none; transform: translateY(-2px); }
.rival.on .avatar { border-color: #ffd23f; box-shadow: 0 0 0 3px #3a1a08, 0 4px 8px rgba(0, 0, 0, 0.35); }
.field { display: flex; flex-direction: column; gap: 6px; }
.field small { font-family: 'Nunito'; font-weight: 700; font-size: 12px; }
.seats { display: flex; flex-direction: column; gap: 6px; }
.seat-line { display: flex; align-items: center; gap: 8px; }
.seat-line .text-input { flex: 1; min-width: 0; height: 40px; border-radius: 12px; border: 2px solid #c9a26e; padding: 0 10px; font-family: 'Nunito'; font-weight: 800; font-size: 16px; background: #fffaf0; color: var(--ink); }
.icon-btn.small { width: 36px; height: 36px; }
.play-go { --h: 64px; font-size: 28px; margin: 4px 0 18px; position: sticky; bottom: calc(10px + var(--safe-bottom)); z-index: 6; }
.rival .avatar.bust { overflow: hidden; background: radial-gradient(circle at 50% 35%, #fff6e3, #f0d9b0); }
.rival .avatar.bust img { width: 120%; height: 120%; margin: -2% 0 0 -10%; object-fit: contain; object-position: center top; }
.seat .avatar.sm img, .pod-row .avatar img, .rv-row .avatar img, .log-row .avatar img { object-fit: cover; object-position: center 18%; }
.cafe-pick { position: relative; width: 100%; min-height: 88px; border: 0; border-radius: 16px; padding: 10px 12px; color: #fff; text-align: left; display: flex; flex-direction: column; justify-content: flex-end; gap: 2px;
  background: #3b2416 center / cover no-repeat; box-shadow: inset 0 -60px 40px -10px rgba(20, 8, 0, 0.75), 0 0 0 3px #3a1a08, 0 6px 10px rgba(0, 0, 0, 0.3); overflow: hidden; }
.cafe-pick b { font-family: 'Lilita One'; font-size: 20px; -webkit-text-stroke: 3px #3a1a08; paint-order: stroke fill; }
.cafe-pick small { font-family: 'Nunito'; font-weight: 800; font-size: 12px; text-shadow: 0 1px 2px #000; }
.cafe-pick.on { box-shadow: inset 0 -60px 40px -10px rgba(20, 8, 0, 0.75), 0 0 0 3px #ffd23f, 0 0 0 6px #3a1a08; }
.cafe-pick[disabled] { filter: grayscale(0.85) brightness(0.7); }
.cafe-pick .lock { position: absolute; right: 10px; top: 10px; width: 34px; }
.cafe-pick .wr-stars { position: absolute; right: 10px; bottom: 10px; }
.cafe-list { display: flex; flex-direction: column; gap: 10px; }
.wr-stars { display: flex; gap: 2px; align-items: center; }
.wr-stars img { width: 22px; height: 22px; object-fit: contain; }
.wr-stars.big { justify-content: center; gap: 4px; }
.wr-stars.big img { width: 56px; height: 56px; }
.wr-stars.big img:nth-child(2) { transform: translateY(-10px) scale(1.15); }

/* ---------------------------------------------------------------- settings, stats */
.avatar-pick { display: grid; grid-template-columns: repeat(6, 1fr); gap: 6px; }
.avatar-pick button { border: 0; background: none; padding: 0; }
.avatar-pick .avatar { width: 46px; height: 46px; border-color: #c9a26e; }
.avatar-pick .on .avatar { border-color: #ffd23f; box-shadow: 0 0 0 3px #3a1a08; }
.big-name { font-family: 'Lilita One'; font-size: 24px; }
.stat-card { display: flex; align-items: center; gap: 10px; }
.stat-card img { width: 46px; height: 46px; object-fit: contain; }
.stat-card b { font-family: 'Lilita One'; font-size: 18px; display: block; }
.stat-card small { display: block; font-family: 'Nunito'; font-weight: 700; font-size: 12.5px; }
.stat-card .pts { font-family: 'Baloo'; font-size: 26px; text-align: center; line-height: 1; }
.stat-card .pts small { font-size: 10px; }
.cafe-stars { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; margin-top: 8px; }
.cafe-stars > span { display: flex; flex-direction: column; font-family: 'Nunito'; font-weight: 800; font-size: 12px; }
.credits-modal h3 { font-family: 'Lilita One'; font-size: 16px; margin: 10px 0 4px; }
.credits-modal p { margin: 4px 0; }

/* ---------------------------------------------------------------- the match */
.mt { position: absolute; inset: 0; display: flex; flex-direction: column; overflow: hidden; }
.mt-table { position: absolute; inset: 52px 0 0; background: linear-gradient(180deg, rgba(40, 18, 4, 0.25), rgba(40, 18, 4, 0) 18%, rgba(30, 12, 2, 0.35)), url('assets/brand/tex_wood.webp') center / 420px auto;
  box-shadow: inset 0 18px 24px -12px rgba(0, 0, 0, 0.55); }
.mt-top { position: relative; z-index: 4; display: flex; align-items: center; gap: 5px; padding: calc(4px + var(--safe-top)) 6px 4px; min-height: 56px;
  background: linear-gradient(180deg, rgba(36, 16, 4, 0.78), rgba(36, 16, 4, 0.45)); }
.mt-menu { width: 42px; height: 42px; flex: none; }
.mt-seats { flex: 1; display: flex; gap: 4px; min-width: 0; }
.seat { --seat: #e2453c; position: relative; flex: 1; min-width: 0; display: grid; grid-template-columns: 26px 1fr; grid-template-rows: auto auto; column-gap: 4px; align-items: center;
  padding: 3px 5px 3px 3px; border-radius: 12px; background: linear-gradient(180deg, #fff6e3, #f0dcb6); box-shadow: inset 0 -2px 0 rgba(120, 70, 20, 0.25), 0 2px 0 #3a1a08, 0 0 0 2px #3a1a08;
  transition: transform 0.2s, box-shadow 0.2s; }
.seat .avatar.sm { grid-row: 1 / span 2; width: 26px; height: 26px; border-width: 2px; border-color: var(--seat); }
.seat .nm { font-family: 'Nunito'; font-weight: 900; font-size: 10px; line-height: 1.1; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; color: var(--ink); }
.seat .sc { font-family: 'Baloo'; font-size: 17px; line-height: 1; color: var(--ink); }
.seat .sc.bump { animation: wr-bump 0.5s ease-out; }
@keyframes wr-bump { 30% { transform: scale(1.45); color: #1e8c48; } }
.seat.turn { transform: translateY(-1px); background: linear-gradient(180deg, #fff3b0, #ffd23f); box-shadow: inset 0 -2px 0 rgba(150, 90, 0, 0.35), 0 2px 0 #3a1a08, 0 0 0 2px #3a1a08, 0 0 14px 3px rgba(255, 210, 63, 0.75); }
.seat.turn::after { content: ''; position: absolute; left: 50%; bottom: -9px; transform: translateX(-50%); border: 6px solid transparent; border-top-color: #ffd23f; filter: drop-shadow(0 2px 0 #3a1a08); }
.seat .think { position: absolute; right: 4px; top: 3px; display: none; gap: 2px; }
.seat .think u { width: 4px; height: 4px; border-radius: 50%; background: #7a4a2b; animation: wr-think 1s infinite; }
.seat .think u:nth-child(2) { animation-delay: 0.15s; } .seat .think u:nth-child(3) { animation-delay: 0.3s; }
.seat.thinking .think { display: flex; }
@keyframes wr-think { 50% { transform: translateY(-3px); opacity: 0.4; } }
.seat .done-mark { display: none; position: absolute; right: -5px; top: -6px; width: 18px; height: 18px; background: url('assets/kit/icons/icon_check.webp') center / contain no-repeat; }
.seat.done .done-mark { display: block; animation: wr-bump 0.4s; }
.mode-crew .seat .sc { display: none; }
.mode-crew .seat { grid-template-rows: auto; }
.mt-side { display: flex; gap: 4px; align-items: center; flex: none; }
.bag-chip, .served-chip, .round-chip { display: flex; flex-direction: column; align-items: center; justify-content: center; min-width: 44px; height: 44px; border-radius: 12px; padding: 0 4px;
  background: rgba(20, 8, 0, 0.55); box-shadow: inset 0 0 0 2px rgba(255, 220, 160, 0.25); color: #fff; }
.bag-chip img, .served-chip img { width: 22px; height: 22px; object-fit: contain; }
.bag-chip b, .served-chip b, .round-chip b { font-family: 'Baloo'; font-size: 15px; line-height: 1; }
.round-chip small { font-family: 'Nunito'; font-weight: 900; font-size: 9px; text-transform: uppercase; opacity: 0.85; }
.timer-ring { --p: 1; position: relative; width: 44px; height: 44px; border-radius: 50%; display: flex; align-items: center; justify-content: center;
  background: conic-gradient(#ffd23f calc(var(--p) * 360deg), rgba(255, 255, 255, 0.15) 0); box-shadow: 0 0 0 2px #3a1a08; }
.timer-ring::before { content: ''; position: absolute; inset: 5px; border-radius: 50%; background: #3b2416; }
.timer-ring b { position: relative; font-family: 'Baloo'; font-size: 17px; color: #fff; }
.timer-ring.low { background: conic-gradient(#ff4d4d calc(var(--p) * 360deg), rgba(255, 255, 255, 0.15) 0); animation: wr-pulse 0.5s infinite; }

.mt-main { position: relative; z-index: 2; flex: 1; display: flex; flex-direction: column; min-height: 0; }
.mt-boardbox { position: relative; display: flex; justify-content: center; padding: 6px 0 0; }
.mt-panel { flex: 1; display: flex; flex-direction: column; min-height: 0; }

/* the board */
.bd-wrap { --c: 24px; position: relative; width: 374px; height: 374px; padding: 7px; border-radius: 14px;
  background: url('assets/brand/tex_walnut.webp') center / cover; box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.25), inset 0 -2px 0 rgba(0, 0, 0, 0.3), 0 10px 18px rgba(0, 0, 0, 0.5); }
.bd-view { position: relative; width: 360px; height: 360px; overflow: hidden; border-radius: 8px; touch-action: none; box-shadow: 0 0 0 1px rgba(60, 25, 5, 0.6); }
.bd-zoom { position: absolute; left: 0; top: 0; width: 360px; height: 360px; transform-origin: 0 0; }
.bd { position: absolute; inset: 0; display: grid; grid-template-columns: repeat(15, 1fr); grid-template-rows: repeat(15, 1fr); gap: 1px; padding: 1px;
  background: var(--grid); }
.sq { position: relative; border-radius: 3px; background: var(--board); display: flex; align-items: center; justify-content: center; overflow: hidden;
  font-family: 'Lilita One', sans-serif; font-size: 8.5px; letter-spacing: 0.2px; line-height: 1; }
.sq span { position: relative; }
.sq.dl { background: linear-gradient(160deg, var(--dl), var(--dl2)); color: #215f7e; }
.sq.tl { background: linear-gradient(160deg, var(--tl), var(--tl2)); color: #fff; }
.sq.dw { background: linear-gradient(160deg, var(--dw), var(--dw2)); color: #872540; }
.sq.tw { background: linear-gradient(160deg, var(--tw), var(--tw2)); color: #fff; }
.sq.st { background: radial-gradient(circle at 40% 35%, #fff3a6, #ffc93c 55%, #ee9a12); }
.sq.st em { width: 76%; height: 76%; background: url('assets/kit/icons/icon_star.webp') center / contain no-repeat; filter: drop-shadow(0 1px 0 rgba(120, 60, 0, 0.5)); }
.sq.drop { box-shadow: inset 0 0 0 2px #2bb673, inset 0 0 8px rgba(43, 182, 115, 0.8); }
.sq.mark { box-shadow: inset 0 0 0 2px #ffd23f; }
.bd-tiles { position: absolute; inset: 1px; z-index: 2; }
.bd-tiles .tile { position: absolute; width: 23px; height: 23px; margin: 0; --c: 23px; }
.bd-cursor { position: absolute; width: 24px; height: 24px; margin: 0; border-radius: 4px; box-shadow: inset 0 0 0 2px #2bb673; pointer-events: none; z-index: 3; animation: wr-blink 1s steps(2) infinite; }
.bd-cursor::after { content: '▶'; position: absolute; right: -2px; top: 50%; transform: translateY(-50%); font-size: 9px; color: #1e8c48; }
.bd-cursor[data-dir="V"]::after { content: '▼'; right: auto; left: 50%; top: auto; bottom: -3px; transform: translateX(-50%); }
@keyframes wr-blink { 50% { box-shadow: inset 0 0 0 2px rgba(43, 182, 115, 0.35); } }
.bd-unzoom { position: absolute; right: 12px; top: 12px; z-index: 6; width: 34px; height: 34px; border-radius: 50%; border: 0; font-family: 'Baloo'; font-size: 24px; line-height: 1;
  color: #fff; background: rgba(40, 18, 4, 0.75); box-shadow: 0 0 0 2px #ffd23f; }

/* districts */
.bd-districts { position: absolute; inset: 1px; display: grid; grid-template-columns: repeat(3, 1fr); grid-template-rows: repeat(3, 1fr); pointer-events: none; z-index: 1; }
.dist { --lead: transparent; position: relative; box-shadow: inset 0 0 0 1px rgba(90, 45, 10, 0.55); }
.dist::before { content: ''; position: absolute; inset: 0; background: var(--lead); opacity: 0.22; transition: background 0.4s; }
.dist.led { box-shadow: inset 0 0 0 2px var(--lead); }
.dist-sign { position: absolute; left: 2px; top: 2px; display: flex; gap: 2px; align-items: center; padding: 0 3px; border-radius: 4px; background: rgba(255, 250, 238, 0.82);
  font-family: 'Nunito'; font-weight: 900; font-size: 6.5px; color: #5a3010; line-height: 1.4; }
.dist-sign i { font-style: normal; color: #1e8c48; }
.districts .sq.dl, .districts .sq.tl, .districts .sq.dw, .districts .sq.tw { opacity: 0.92; }
.districts .bd-tiles { z-index: 2; }

/* tiles */
.tile { --c: 46px; position: relative; display: flex; align-items: center; justify-content: center; width: var(--c); height: var(--c); border-radius: 20%;
  color: var(--tile-ink); user-select: none; -webkit-user-select: none;
  background: radial-gradient(circle at 16% 16%, rgba(150, 85, 30, 0.32) 0 1px, transparent 1.6px), radial-gradient(circle at 84% 16%, rgba(150, 85, 30, 0.32) 0 1px, transparent 1.6px),
    radial-gradient(circle at 16% 84%, rgba(150, 85, 30, 0.32) 0 1px, transparent 1.6px),
    radial-gradient(circle at 28% 22%, rgba(255, 255, 255, 0.55), transparent 44%), linear-gradient(155deg, var(--tile1) 0%, var(--tile2) 52%, var(--tile3) 100%);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.9), inset 0 -2px 0 rgba(150, 88, 28, 0.6), inset 0 0 0 1px rgba(150, 88, 28, 0.3), 0 1.5px 1.5px rgba(50, 20, 2, 0.5); }
.tile b { font-family: 'Baloo', 'Nunito', sans-serif; font-weight: 400; font-size: calc(var(--c) * 0.64); line-height: 1; margin-top: calc(var(--c) * 0.1); margin-right: calc(var(--c) * 0.04);
  text-shadow: 0 1px 0 rgba(255, 255, 255, 0.65), 0 -0.5px 0 rgba(90, 45, 10, 0.3); }
.tile i { position: absolute; right: 9%; bottom: 4%; font-style: normal; font-family: 'Baloo', sans-serif; font-size: calc(var(--c) * 0.27); line-height: 1; opacity: 0.85; }
.tile.blank b { color: #b46a1e; font-style: italic; }
.tile[data-o] { box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.9), inset 0 -3px 0 var(--own), inset 0 0 0 1px rgba(150, 88, 28, 0.3), 0 1.5px 1.5px rgba(50, 20, 2, 0.5); }
.tile.last { box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.9), inset 0 -2px 0 rgba(150, 88, 28, 0.6), 0 0 0 1.5px #ffb81c, 0 0 6px 1px rgba(255, 190, 40, 0.75); }
.tile[data-o].last { box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.9), inset 0 -3px 0 var(--own), 0 0 0 1.5px #ffb81c, 0 0 6px 1px rgba(255, 190, 40, 0.75); }
.tile.pend { z-index: 4; cursor: grab; transform: translateY(-1px);
  background: radial-gradient(circle at 28% 22%, rgba(255, 255, 255, 0.6), transparent 44%), linear-gradient(155deg, #fffbe6 0%, #ffe39b 52%, #f4c063 100%);
  box-shadow: inset 0 1px 0 #fff, inset 0 -2px 0 rgba(150, 88, 28, 0.55), 0 0 0 1.5px #ffd23f, 0 3px 4px rgba(40, 15, 0, 0.5); }
.tile.pend.good { box-shadow: inset 0 1px 0 #fff, inset 0 -2px 0 rgba(150, 88, 28, 0.55), 0 0 0 2px #2bb673, 0 3px 4px rgba(40, 15, 0, 0.5); }
.tile.pend.bad { box-shadow: inset 0 1px 0 #fff, inset 0 -2px 0 rgba(150, 88, 28, 0.55), 0 0 0 2px #e2453c, 0 3px 4px rgba(40, 15, 0, 0.5); }
.tile.pop { animation: wr-pop 0.22s ease-out; }
@keyframes wr-pop { from { transform: scale(1.35); } }
.tile.stamp { animation: wr-stamp 0.6s ease-out; }
@keyframes wr-stamp { 0% { transform: scale(1.3); filter: brightness(1.3); } 40% { transform: scale(0.92); } 100% { transform: scale(1); } }
.tile.glow { animation: wr-glow 1.4s ease-out; }
@keyframes wr-glow { 20% { filter: brightness(1.25) drop-shadow(0 0 6px #ffd23f); } }
.tile.shake { animation: wr-shake 0.5s; }
@keyframes wr-shake { 20%, 60% { transform: translateX(-3px) rotate(-4deg); } 40%, 80% { transform: translateX(3px) rotate(4deg); } }
.tile.dragging { opacity: 0.25; }
.drag-ghost { position: absolute; left: 0; top: 0; z-index: 50; pointer-events: none; filter: drop-shadow(0 10px 8px rgba(0, 0, 0, 0.45)); }
.drag-ghost .tile { --c: 46px; transform: rotate(-4deg) scale(1.06); }
.fx-fly { position: absolute; z-index: 40; pointer-events: none; }
.fx-fly .tile { box-shadow: inset 0 1px 0 #fff, inset 0 -2px 0 rgba(150, 88, 28, 0.6), 0 6px 8px rgba(0, 0, 0, 0.45); }

/* score preview above the board */
.mt-preview { position: absolute; left: 50%; bottom: -10px; transform: translate(-50%, 6px); z-index: 7; max-width: 92%; padding: 4px 12px 5px; border-radius: 14px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
  background: rgba(30, 12, 2, 0.9); color: #fff; font-family: 'Nunito'; font-weight: 900; font-size: 13px; box-shadow: 0 0 0 2px #ffd23f, 0 4px 8px rgba(0, 0, 0, 0.4);
  opacity: 0; transition: opacity 0.15s, transform 0.15s; pointer-events: none; }
.mt-preview.show, .mt-preview.warn { opacity: 1; transform: translate(-50%, 0); }
.mt-preview b { font-family: 'Baloo'; color: #ffd23f; font-size: 16px; margin-left: 4px; }
.mt-preview em { color: #7dffb5; font-style: normal; }
.mt-preview .bad { color: #ff8a80; text-decoration: line-through; }
.mt-preview.ok { box-shadow: 0 0 0 2px #2bb673, 0 4px 8px rgba(0, 0, 0, 0.4); }
.mt-preview.warn { box-shadow: 0 0 0 2px #e2453c, 0 4px 8px rgba(0, 0, 0, 0.4); }

/* the info strip: who said what */
.mt-info { position: relative; flex: 1; min-height: 64px; display: flex; flex-direction: column; justify-content: center; gap: 6px; padding: 12px 10px 2px; }
.mt-info .say-row { display: flex; align-items: flex-end; gap: 6px; }
.recent { display: flex; flex-direction: column; gap: 3px; }
.recent:empty { display: none; }
.recent div { display: flex; align-items: center; gap: 6px; padding: 2px 8px 2px 2px; border-radius: 12px; background: rgba(30, 12, 2, 0.45); color: #fff; font-family: 'Nunito'; font-weight: 800; font-size: 12px; }
.recent img { width: 20px; height: 20px; border-radius: 50%; object-fit: cover; background: #f3e2c2; }
.recent b { font-family: 'Baloo'; font-weight: 400; font-size: 13px; letter-spacing: 0.3px; }
.recent .grow { min-width: 0; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.recent .pts { font-family: 'Baloo'; font-size: 14px; color: #ffd23f; }
.recent .off { text-decoration: line-through; opacity: 0.7; }
.say { flex: 1; display: flex; align-items: flex-end; gap: 4px; min-width: 0; }
.say .bust { width: 78px; height: 78px; object-fit: contain; flex: none; filter: drop-shadow(0 4px 4px rgba(0, 0, 0, 0.45)); margin-bottom: -4px; }
.say .bust.person { width: 52px; height: 52px; border-radius: 50%; border: 3px solid #ffd23f; object-fit: cover; background: #f3e2c2; margin-bottom: 4px; }
.say .bubble { position: relative; flex: 1; min-width: 0; padding: 7px 11px 8px; border-radius: 16px; background: #fffaf0; color: var(--ink); box-shadow: 0 0 0 2px #3a1a08, 0 4px 6px rgba(0, 0, 0, 0.3); margin-bottom: 10px; }
.say .bubble::before { content: ''; position: absolute; left: -9px; bottom: 10px; border: 7px solid transparent; border-right-color: #3a1a08; border-left: 0; }
.say .bubble::after { content: ''; position: absolute; left: -6px; bottom: 11px; border: 6px solid transparent; border-right-color: #fffaf0; border-left: 0; }
.say .bubble p { margin: 0; font-family: 'Nunito'; font-weight: 800; font-size: 13.5px; line-height: 1.22; }
.say .bubble small { display: block; font-family: 'Baloo'; font-size: 13px; color: #b0601a; margin-top: 2px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.say .bubble small:empty { display: none; }
.say.in .bubble { animation: wr-bubble 0.35s cubic-bezier(0.2, 0.9, 0.3, 1.3); transform-origin: left bottom; }
.say.in .bust { animation: wr-bust 0.45s cubic-bezier(0.2, 0.9, 0.3, 1.3); }
@keyframes wr-bubble { from { transform: scale(0.6); opacity: 0; } }
@keyframes wr-bust { from { transform: translateY(20px) scale(0.8); opacity: 0.2; } }
.mini-map { flex: none; display: grid; grid-template-columns: repeat(3, 15px); gap: 2px; padding: 3px; border-radius: 6px; background: rgba(20, 8, 0, 0.55); margin-bottom: 10px; }
.mini-map i { --lead: rgba(255, 255, 255, 0.18); width: 15px; height: 15px; border-radius: 3px; background: var(--lead); font-style: normal; font-family: 'Baloo'; font-size: 10px; color: #fff; display: flex; align-items: center; justify-content: center; line-height: 1; }

/* Café Crew: the counter */
.mode-crew .mt-info { flex-direction: column; align-items: stretch; gap: 4px; padding: 10px 6px 0; }
.counter { display: flex; gap: 5px; min-height: 76px; }
.order { position: relative; flex: 1; min-width: 0; display: flex; flex-direction: column; align-items: center; padding: 22px 5px 5px; margin-top: 18px; border-radius: 14px; text-align: center;
  background: linear-gradient(180deg, #fffaf0, #f3e2c2); box-shadow: 0 0 0 2px #3a1a08, 0 4px 6px rgba(0, 0, 0, 0.3); transition: transform 0.2s, box-shadow 0.2s; }
.order .cust { position: absolute; top: -20px; width: 40px; height: 40px; object-fit: contain; filter: drop-shadow(0 2px 2px rgba(0, 0, 0, 0.35)); }
.order .otext b { display: block; font-family: 'Lilita One'; font-size: 12.5px; line-height: 1.05; color: #a2361c; }
.order .otext small { display: block; font-family: 'Nunito'; font-weight: 800; font-size: 10.5px; line-height: 1.15; color: var(--ink); margin-top: 1px; }
.order .pat { display: flex; gap: 3px; margin-top: 3px; }
.order .pat i { width: 10px; height: 10px; border-radius: 50%; background: rgba(0, 0, 0, 0.15); box-shadow: inset 0 -1px 0 rgba(0, 0, 0, 0.15); }
.order .pat i.on { background: radial-gradient(circle at 35% 30%, #ffe08a, #e08a14); }
.order.hurry .pat i.on { background: radial-gradient(circle at 35% 30%, #ff9b8a, #d63a2a); animation: wr-pulse 0.8s infinite; }
.order.match { transform: translateY(-4px); box-shadow: 0 0 0 2px #3a1a08, 0 0 0 5px #2bb673, 0 0 16px 4px rgba(43, 182, 115, 0.6); }
.order.arrive { animation: wr-arrive 0.5s cubic-bezier(0.2, 0.9, 0.3, 1.3); }
@keyframes wr-arrive { from { transform: translateY(-30px) scale(0.7); opacity: 0; } }
.order.served { box-shadow: 0 0 0 2px #3a1a08, 0 0 0 5px #ffd23f, 0 0 20px 6px rgba(255, 210, 63, 0.8); }
.order.leaving { animation: wr-leave 0.8s ease-in forwards; }
.order.gone { filter: grayscale(0.8); }
@keyframes wr-leave { 40% { transform: translateY(-8px) scale(1.05); } 100% { transform: translateY(-40px) scale(0.6); opacity: 0; } }
.counter .empty { flex: 1; display: flex; align-items: center; justify-content: center; font-family: 'Nunito'; font-weight: 800; font-size: 13px; color: #fff; text-shadow: 0 1px 2px #000; margin-top: 18px; }
.crew-say { display: flex; align-items: center; gap: 6px; min-height: 30px; }
.crew-say img { width: 28px; height: 28px; border-radius: 50%; object-fit: cover; border: 2px solid #ffd23f; background: #f3e2c2; }
.crew-say p { margin: 0; font-family: 'Nunito'; font-weight: 800; font-size: 12.5px; color: #fff; text-shadow: 0 1px 2px #000; flex: 1; }
.crew-say.in { animation: wr-bubble 0.3s ease-out; }

/* the rack */
.mt-rack { position: relative; height: 66px; margin: 0 6px; flex: none; }
.rack-bar { position: absolute; left: 0; right: 0; bottom: 0; height: 22px; border-radius: 8px 8px 12px 12px;
  background: linear-gradient(180deg, #a8693a, #7a4520 60%, #5a3014); box-shadow: inset 0 2px 0 rgba(255, 220, 170, 0.35), 0 6px 10px rgba(0, 0, 0, 0.45); }
.rack-bar::before { content: ''; position: absolute; left: 6px; right: 6px; top: -6px; height: 8px; border-radius: 4px; background: linear-gradient(180deg, #8e5530, #6b3b18); box-shadow: inset 0 1px 0 rgba(255, 220, 170, 0.3); }
.rack-tiles { position: absolute; inset: 0 0 8px; }
.rack-tiles .tile { --c: var(--rk, 46px); position: absolute; left: 0; bottom: 0; width: var(--rk, 46px); height: var(--rk, 46px); cursor: grab; touch-action: none;
  transition: transform 0.22s cubic-bezier(0.2, 0.8, 0.2, 1); box-shadow: inset 0 1.5px 0 rgba(255, 255, 255, 0.9), inset 0 -3px 0 rgba(150, 88, 28, 0.6), inset 0 0 0 1px rgba(150, 88, 28, 0.3), 0 3px 3px rgba(40, 15, 0, 0.55); }
.rack-tiles .tile.sel { margin-bottom: 10px; box-shadow: inset 0 1.5px 0 #fff, inset 0 -3px 0 rgba(150, 88, 28, 0.6), 0 0 0 2.5px #ffd23f, 0 8px 8px rgba(40, 15, 0, 0.5); }
.rack-tiles .tile.drawn { animation: wr-drawn 0.45s cubic-bezier(0.2, 0.9, 0.3, 1.3) both; }
@keyframes wr-drawn { from { opacity: 0; margin-bottom: 40px; } }

/* the buttons under the rack */
.mt-actions { flex: none; display: flex; align-items: center; gap: 6px; padding: 6px 8px calc(8px + var(--safe-bottom)); }
.mt-actions .icon-btn { width: 52px; height: 52px; flex-direction: column; gap: 0; position: relative; display: inline-flex; align-items: center; justify-content: center; }
.mt-actions .icon-btn img { width: 26px; height: 26px; }
.mt-actions .icon-btn small { font-family: 'Lilita One'; font-size: 9.5px; color: #fff; -webkit-text-stroke: 2.5px #3a1a08; paint-order: stroke fill; line-height: 1; margin-top: 1px; }
.mt-actions .icon-btn[disabled] { filter: grayscale(0.8) brightness(0.7); }
.mt-actions .icon-btn .badge-dot { position: absolute; right: -5px; top: -5px; width: 20px; height: 20px; font-size: 11px; font-style: normal; }
.mt-actions .play-btn { --h: 54px; font-size: 22px; min-width: 0; padding-left: 10px; padding-right: 10px; white-space: nowrap; }
.mt-actions .play-btn .pv { font-family: 'Baloo'; }
.mt-actions .challenge-btn { --h: 54px; font-size: 16px; padding: 4px 10px 8px; animation: wr-pulse 1.4s infinite; }

/* pass & play cover, overlays */
.mt-cover, .mt-overlay { position: absolute; inset: 0; z-index: 20; display: flex; align-items: center; justify-content: center; padding: 16px; }
.mt-cover { background: rgba(25, 10, 2, 0.82); backdrop-filter: blur(6px); -webkit-backdrop-filter: blur(6px); }
.mt-overlay { background: rgba(25, 10, 2, 0.55); }
.cover-card { text-align: center; color: #fff; display: flex; flex-direction: column; align-items: center; gap: 10px; }
.cover-card h3 { font-family: 'Lilita One'; font-size: 28px; -webkit-text-stroke: 4px #3a1a08; paint-order: stroke fill; }
.cover-card p { font-family: 'Nunito'; font-weight: 800; margin: 0; }
.avatar.lg { width: 96px; height: 96px; }

/* Festival Rush reveal */
.reveal { width: 100%; max-width: 360px; display: flex; flex-direction: column; gap: 8px; animation: wr-drop 0.4s cubic-bezier(0.2, 0.9, 0.3, 1.2); }
.rv-head { display: flex; align-items: center; gap: 8px; }
.rv-head img { width: 70px; height: 70px; object-fit: contain; margin: -18px 0 -6px -6px; }
.rv-head h3 { font-family: 'Lilita One'; font-size: 22px; }
.rv-head small { font-family: 'Nunito'; font-weight: 800; font-size: 12.5px; color: var(--muted); }
.rv-list { display: flex; flex-direction: column; gap: 5px; }
.rv-row { position: relative; display: flex; align-items: center; gap: 8px; padding: 5px 8px; border-radius: 12px; background: rgba(120, 70, 20, 0.08); }
.rv-row.win { background: linear-gradient(90deg, #fff1a8, #ffe066); box-shadow: 0 0 0 2px #e0a419; }
.rv-row .nm { font-family: 'Nunito'; font-weight: 900; font-size: 13px; width: 86px; flex: none; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.rv-row .w { flex: 1; font-family: 'Baloo'; font-size: 15px; min-width: 0; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.rv-row .w i { font-family: 'Nunito'; font-size: 12px; color: var(--muted); }
.rv-row .pts { font-family: 'Baloo'; font-size: 20px; }
.top-badge { position: absolute; right: 6px; top: -8px; font-style: normal; font-family: 'Lilita One'; font-size: 10px; color: #fff; padding: 1px 6px; border-radius: 8px; background: #e2453c; box-shadow: 0 0 0 1.5px #3a1a08; }

/* results */
.results { width: 100%; max-width: 380px; max-height: 100%; overflow-y: auto; display: flex; flex-direction: column; gap: 10px; animation: wr-drop 0.5s cubic-bezier(0.2, 0.9, 0.3, 1.2); }
.res-head { display: flex; align-items: center; gap: 6px; }
.res-head img { width: 92px; height: 92px; object-fit: contain; margin: -30px -4px -6px -10px; flex: none; filter: drop-shadow(0 4px 4px rgba(0, 0, 0, 0.3)); }
.res-head h2 { font-family: 'Lilita One'; font-size: 28px; line-height: 1; }
.bubble-line { margin: 4px 0 0; font-family: 'Nunito'; font-weight: 800; font-size: 13px; color: var(--muted); }
.podium { display: flex; flex-direction: column; gap: 6px; }
.pod-row { display: flex; align-items: center; gap: 8px; padding: 6px 10px 6px 6px; border-radius: 14px; background: rgba(120, 70, 20, 0.08); }
.pod-row.p1 { background: linear-gradient(90deg, #fff1a8, #ffd23f); box-shadow: 0 0 0 2px #e0a419; }
.pod-row .place { width: 26px; height: 26px; border-radius: 50%; display: flex; align-items: center; justify-content: center; font-family: 'Baloo'; font-size: 16px; color: #fff; background: #8a6b55; flex: none; }
.pod-row.p1 .place { background: #e0a419; }
.pod-row .avatar { width: 42px; height: 42px; }
.pod-row b { font-family: 'Lilita One'; font-size: 17px; display: block; }
.pod-row small { font-family: 'Nunito'; font-weight: 700; font-size: 11.5px; display: block; color: var(--muted); }
.pod-row .pts { font-family: 'Baloo'; font-size: 26px; }
.dist-res { display: grid; grid-template-columns: repeat(3, 1fr); gap: 4px; }
.dist-res i { --lead: rgba(0, 0, 0, 0.1); font-style: normal; padding: 4px; border-radius: 8px; background: var(--lead); color: #fff; text-align: center; text-shadow: 0 1px 2px rgba(0, 0, 0, 0.6); }
.rules-body .dist-res i { --lead: #b5895a; }
.dist-res b { display: block; font-family: 'Nunito'; font-weight: 900; font-size: 10.5px; line-height: 1.1; }
.dist-res small { font-family: 'Baloo'; font-size: 13px; }
.res-crew { text-align: center; display: flex; flex-direction: column; align-items: center; gap: 4px; }
.res-crew h3 { font-family: 'Lilita One'; font-size: 22px; }
.res-crew p { margin: 0; font-family: 'Nunito'; font-weight: 800; }
.crew-faces { display: flex; flex-wrap: wrap; justify-content: center; gap: 2px; margin-top: 4px; }
.crew-faces img { width: 34px; height: 34px; object-fit: contain; }
.crew-faces img.sad { filter: grayscale(0.8); opacity: 0.6; }
.res-xp { text-align: center; font-family: 'Lilita One'; font-size: 16px; color: #b0601a; }
.res-xp img { width: 20px; vertical-align: -4px; }
.res-btns .row { gap: 8px; }
.res-btns .btn.small { align-self: center; }
.struck { text-decoration: line-through; color: #b0301a; }

/* modals of the match */
.blank-grid { display: grid; grid-template-columns: repeat(6, 1fr); gap: 6px; margin-top: 8px; }
.tile-pick { border: 0; background: none; padding: 0; display: flex; justify-content: center; }
.tile-pick .tile { --c: 40px; }
.ex-rack { display: flex; justify-content: center; gap: 5px; margin-top: 10px; flex-wrap: wrap; }
.ex-t { border: 0; background: none; padding: 0; transition: transform 0.15s; }
.ex-t .tile { --c: 42px; }
.ex-t.on { transform: translateY(-10px); }
.ex-t.on .tile { box-shadow: 0 0 0 3px #2f7fd8, 0 6px 8px rgba(0, 0, 0, 0.35); }
.log-list { display: flex; flex-direction: column; gap: 5px; max-height: 52vh; overflow-y: auto; }
.log-row { display: flex; align-items: center; gap: 8px; padding: 4px 6px; border-radius: 10px; background: rgba(120, 70, 20, 0.08); font-family: 'Nunito'; font-weight: 800; font-size: 13px; }
.log-row b { font-family: 'Baloo'; font-size: 15px; font-weight: 400; }
.log-row .pts { font-family: 'Baloo'; font-size: 18px; }
.rules-modal .tabs { display: flex; flex-wrap: wrap; }
.rules-body { max-height: 56vh; overflow-y: auto; font-family: 'Nunito'; font-weight: 700; font-size: 13.5px; line-height: 1.35; }
.rules-body p { margin: 0 0 8px; }
.rules-body h3 { font-family: 'Lilita One'; font-size: 17px; margin: 10px 0 6px; }
.legend { display: flex; flex-direction: column; gap: 4px; }
.legend-row { display: flex; align-items: center; gap: 8px; }
.legend-row b { font-family: 'Lilita One'; font-weight: 400; font-size: 13px; min-width: 110px; color: #a2361c; }
.sq-demo { width: 28px; height: 28px; border-radius: 5px; display: inline-flex; align-items: center; justify-content: center; font-family: 'Lilita One'; font-size: 9px; flex: none; background: var(--board); box-shadow: inset 0 0 0 1px var(--grid); }
.sq-demo.dl { background: var(--dl); color: #215f7e; } .sq-demo.tl { background: var(--tl); color: #fff; } .sq-demo.dw { background: var(--dw); color: #872540; } .sq-demo.tw { background: var(--tw); color: #fff; }
.sq-demo.st { background: radial-gradient(circle, #fff3a6, #ffc93c 55%, #ee9a12); }
.sq-demo.st em { width: 20px; height: 20px; background: url('assets/kit/icons/icon_star.webp') center / contain no-repeat; }
.tile-values { display: flex; flex-wrap: wrap; gap: 5px; }
.tile-values .tv { display: flex; flex-direction: column; align-items: center; }
.tile-values .tile { --c: 30px; }
.tile-values small { font-family: 'Baloo'; font-size: 11px; color: var(--muted); }

/* effects */
.fx-canvas { position: absolute; inset: 0; z-index: 60; pointer-events: none; }
.fx-pop { position: absolute; z-index: 45; pointer-events: none; font-family: 'Baloo'; font-size: 30px; color: #fff; -webkit-text-stroke: 5px #3a1a08; paint-order: stroke fill; text-shadow: 0 3px 0 #3a1a08; white-space: nowrap; }
.fx-pop.big { font-size: 42px; color: #ffd23f; }
.fx-pop.heart { color: #ff6b8a; font-size: 34px; }
.fx-banner { position: absolute; left: 0; right: 0; top: 34%; z-index: 55; display: flex; align-items: center; justify-content: center; pointer-events: none; }
.fx-banner .rays { position: absolute; width: 360px; height: 360px; background: url('assets/kit/ui/glow_rays.webp') center / contain no-repeat; opacity: 0.85; animation: wr-spin 6s linear infinite; }
.fx-banner .plate { position: relative; min-width: 250px; padding: 14px 26px 16px; text-align: center; border-image: url('assets/kit/ui/ribbon_gold.webp') 40% 30% fill / 30px 60px stretch; }
.fx-banner.seven .plate { border-image-source: url('assets/kit/ui/ribbon_red.webp'); }
.fx-banner b { display: block; font-family: 'Lilita One'; font-size: 32px; line-height: 1; color: #fff; -webkit-text-stroke: 5px #3a1a08; paint-order: stroke fill; }
.fx-banner small { display: block; font-family: 'Lilita One'; font-size: 17px; color: #fff6c9; -webkit-text-stroke: 3px #3a1a08; paint-order: stroke fill; margin-top: 2px; }
@keyframes wr-spin { to { transform: rotate(360deg); } }
.mt-loading { position: absolute; inset: 0; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 14px; color: #fff; font-family: 'Lilita One'; font-size: 20px; }
.spinner { width: 54px; height: 54px; border-radius: 50%; border: 6px solid rgba(255, 255, 255, 0.2); border-top-color: #ffd23f; animation: wr-spin 0.9s linear infinite; }

/* ---------------------------------------------------------------- landscape (the player's switch): board left, the rest right */
#app.land .mt { flex-direction: row; }
#app.land .mt-table { inset: 0; }
#app.land .mt-top { position: absolute; right: 0; top: 0; left: 375px; min-height: 54px; background: none; padding: 6px 8px 0 6px; }
#app.land .mt-main { flex-direction: row; padding-top: 0; }
#app.land .mt-boardbox { width: 375px; flex: none; padding: 0; align-items: center; height: 100%; }
#app.land .bd-wrap { width: 368px; height: 368px; padding: 4px; }
#app.land .mt-panel { padding-top: 58px; }
#app.land .mt-preview { bottom: 6px; }
#app.land .mt-info { min-height: 0; }
#app.land .counter { min-height: 66px; }
.rules-body b, .mode-intro p b { color: #a2361c; font-weight: 900; }
/* the Chockies Account sign-in window (chockies.js) */
.signin-art { display: flex; align-items: flex-end; justify-content: center; gap: 4px; margin: -6px 0 6px; }
.signin-art img { width: 86px; max-height: 110px; object-fit: contain; filter: drop-shadow(0 4px 4px rgba(0, 0, 0, 0.35)); }
.chockies-signin .modal-body p { font-family: 'Nunito'; font-weight: 800; font-size: 15px; }
