/* Mahjong Wild — styles.
   Art direction (1.0): a lacquer games box opened at dusk. Plum lacquer, moon ivory, petal pink, celadon, brass.
   The signature element is the tile-button: ivory face, coloured backing, and it really presses down.
   1.1 adds the Mahjong Wild wordmark, a slim play-screen bar, round thumb buttons and the level-complete overlay. */

@font-face { font-family: "Fraunces"; src: url("../fonts/fraunces.woff2") format("woff2"); font-weight: 100 900; font-style: normal; font-display: swap; }
@font-face { font-family: "Fraunces"; src: url("../fonts/fraunces-italic.woff2") format("woff2"); font-weight: 100 900; font-style: italic; font-display: swap; }
@font-face { font-family: "Atkinson Hyperlegible Next"; src: url("../fonts/atkinson-next.woff2") format("woff2"); font-weight: 200 800; font-style: normal; font-display: swap; }
@font-face { font-family: "MW Glyphs Sans"; src: url("../fonts/mahjong-glyphs.1.2.0.woff2") format("woff2"); font-weight: 100 900; font-style: normal; font-display: block; }
@font-face { font-family: "MW Glyphs Serif"; src: url("../fonts/mahjong-glyphs-serif.1.2.0.woff2") format("woff2"); font-weight: 100 900; font-style: normal; font-display: block; }

:root {
  /* 1.2: the plum lacquer became the deep teal pond of the new icon; the pink accent became mint, button backs jade green */
  --plum-0: #041C22; --plum: #072A31; --plum-2: #0C3A42; --plum-3: #134952; --plum-4: #1F5F66;
  --ivory: #F6EEDC; --bone: #E2D5BB; --bone-2: #D9CAA5; --ink: #13262A;
  --petal: #8FE3CF; --petal-deep: #178A4A; --celadon: #9ED8C0; --jade: #2F8F78; --brass: #D8B26A; --brass-deep: #9C7A3C;
  --text: #F6EEDC; --muted: rgba(246, 238, 220, 0.72); --faint: rgba(246, 238, 220, 0.42); --hair: rgba(216, 178, 106, 0.3);
  --font-d: "Fraunces", "Iowan Old Style", Georgia, serif;
  --font: "Atkinson Hyperlegible Next", "Atkinson Hyperlegible", Verdana, system-ui, sans-serif;
  --pad: 16px;
}

* { box-sizing: border-box; }
html, body { height: 100%; margin: 0; overflow: hidden; overscroll-behavior: none; }
body {
  background: var(--plum-0); color: var(--text); font: 400 16px/1.45 var(--font);
  -webkit-tap-highlight-color: transparent; -webkit-user-select: none; user-select: none; -webkit-text-size-adjust: 100%;
  touch-action: manipulation; -webkit-font-smoothing: antialiased;
}
button { font: inherit; color: inherit; cursor: pointer; touch-action: manipulation; }
button:disabled { cursor: default; }
h1, h2, h3, p { margin: 0; }
h1, h2, h3 { font-family: var(--font-d); font-weight: 600; letter-spacing: -0.01em; line-height: 1.1; font-variation-settings: "SOFT" 100, "opsz" 72; }
small { font-size: 0.82em; }
.i { display: inline-block; vertical-align: middle; flex: none; }
:focus { outline: none; }
:focus-visible { outline: 3px solid var(--celadon); outline-offset: 3px; border-radius: 8px; }
[hidden] { display: none !important; }

#bg { position: fixed; inset: 0; width: 100%; height: 100%; display: block; background: #0B2A33; }
#scrim { position: fixed; inset: 0; pointer-events: none; transition: background 0.6s ease; background: radial-gradient(120% 90% at 50% 36%, rgba(4, 28, 34, 0.22), rgba(4, 28, 34, 0.68)); }
body[data-screen="game"] #scrim { background: radial-gradient(95% 75% at 50% 50%, rgba(4, 28, 34, 0.46), rgba(4, 28, 34, 0.8)); }
body[data-screen="game"][data-mode="zen"] #scrim { background: radial-gradient(95% 75% at 50% 50%, rgba(4, 28, 34, 0.34), rgba(4, 28, 34, 0.7)); }
body[data-screen="game"][data-mode="moonveil"] #scrim { background: radial-gradient(95% 75% at 50% 50%, rgba(16, 10, 34, 0.6), rgba(10, 6, 22, 0.88)); }
body[data-screen="title"] #scrim { background: radial-gradient(110% 80% at 50% 42%, rgba(4, 28, 34, 0.3), rgba(4, 28, 34, 0.78)); }
body[data-screen="style"] #scrim { background: linear-gradient(180deg, rgba(4, 28, 34, 0.5) 0, rgba(4, 28, 34, 0.12) 22%, rgba(4, 28, 34, 0.2) 40%, rgba(4, 28, 34, 0.86) 62%); }

/* ---------- boot ---------- */
#boot { position: fixed; inset: 0; z-index: 60; display: grid; place-content: center; justify-items: center; gap: 18px; background: var(--plum); transition: opacity 0.6s ease; color: var(--muted); }
#boot.gone { opacity: 0; pointer-events: none; }
.boot-lantern { width: 46px; height: 58px; border-radius: 46% 46% 44% 44% / 30% 30% 34% 34%; background: radial-gradient(circle at 50% 58%, #FFF6D8, #F6C445 46%, #1F5F66); box-shadow: 0 0 38px rgba(127, 224, 196, 0.55); animation: glow 1.6s ease-in-out infinite; }
@keyframes glow { 50% { box-shadow: 0 0 60px rgba(255, 220, 150, 0.8); transform: translateY(-3px); } }

/* ---------- app frame ---------- */
#app {
  position: fixed; inset: 0; display: grid; grid-template-rows: minmax(0, 1fr) auto; grid-template-columns: minmax(0, 1fr);
  padding: env(safe-area-inset-top, 0px) env(safe-area-inset-right, 0px) env(safe-area-inset-bottom, 0px) env(safe-area-inset-left, 0px);
}
.screen { grid-row: 1; grid-column: 1; display: none; flex-direction: column; min-height: 0; min-width: 0; }
.screen.on, .screen.leave { display: flex; }
.screen.enter { animation: scrIn 0.36s cubic-bezier(0.2, 0.8, 0.2, 1) both; }
.screen.enter.from-back { animation-name: scrInBack; }
.screen.leave { animation: scrOut 0.22s ease both; pointer-events: none; }
@keyframes scrIn { from { opacity: 0; transform: translateY(14px) scale(0.985); } }
@keyframes scrInBack { from { opacity: 0; transform: translateY(-10px) scale(0.985); } }
@keyframes scrOut { to { opacity: 0; transform: scale(0.98); } }

.scroll { flex: 1; min-height: 0; overflow-y: auto; overflow-x: hidden; -webkit-overflow-scrolling: touch; padding: 4px var(--pad) 28px; scrollbar-width: thin; scrollbar-color: var(--plum-4) transparent; }
.tray {
  background: linear-gradient(180deg, rgba(18, 70, 78, 0.94), rgba(10, 50, 58, 0.95)); border: 1px solid var(--hair); border-radius: 20px;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.07), 0 14px 32px rgba(0, 0, 0, 0.32);
}

/* ---------- tile buttons ---------- */
.tb {
  --back: var(--jade); position: relative; display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  min-height: 50px; padding: 0 22px; border: 0; border-radius: 14px; white-space: nowrap;
  font: 700 17px/1 var(--font); color: var(--ink); background: linear-gradient(165deg, #FFFDF5 0%, #F1E5C9 100%);
  box-shadow: inset 0 1px 0 #fff, inset 0 0 0 1px rgba(120, 90, 40, 0.14), 0 3px 0 var(--bone-2), 0 7px 0 var(--back), 0 8px 0 rgba(0, 0, 0, 0.35), 0 14px 20px rgba(0, 0, 0, 0.32);
  margin-bottom: 8px; transition: transform 0.08s ease, box-shadow 0.08s ease, filter 0.2s;
}
.tb:active:not(:disabled), .tb.pressed { transform: translateY(5px); box-shadow: inset 0 1px 0 #fff, inset 0 0 0 1px rgba(120, 90, 40, 0.14), 0 1px 0 var(--bone-2), 0 2px 0 var(--back), 0 3px 0 rgba(0, 0, 0, 0.35), 0 5px 8px rgba(0, 0, 0, 0.3); }
.tb.primary { --back: var(--petal-deep); }
.tb.brass { --back: var(--brass-deep); }
.tb.danger { --back: #B5352B; }
.tb.big { min-height: 60px; padding: 0 30px; font-size: 20px; border-radius: 17px; }
.tb.wide { width: 100%; }
.tb:disabled { filter: saturate(0.4) brightness(0.72); }
@media (hover: hover) { .tb:hover:not(:disabled):not(:active) { transform: translateY(-1px); filter: brightness(1.03); } }

.ghost {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px; min-height: 48px; padding: 0 16px; border-radius: 13px;
  border: 1px solid var(--hair); background: rgba(246, 238, 220, 0.06); color: var(--text); font-weight: 600; transition: background 0.15s, transform 0.08s;
}
.ghost:active { transform: translateY(2px); background: rgba(246, 238, 220, 0.14); }
.ghost.small { min-height: 40px; padding: 0 14px; font-size: 15px; }
.ghost.wide { width: 100%; }
.ghost.danger { color: #FFB1A6; border-color: rgba(255, 140, 120, 0.4); }
.ghost:disabled { opacity: 0.6; }
@media (hover: hover) { .ghost:hover { background: rgba(246, 238, 220, 0.12); } }
.chipbtn { display: grid; place-items: center; width: 46px; height: 46px; flex: none; border-radius: 14px; border: 1px solid var(--hair); background: rgba(10, 50, 58, 0.8); color: var(--text); transition: transform 0.08s, background 0.15s; }
.chipbtn:active { transform: scale(0.93); }
.chipbtn:disabled { opacity: 0.35; }
.pill { display: inline-flex; align-items: center; gap: 5px; height: 34px; padding: 0 12px; border-radius: 17px; background: rgba(10, 50, 58, 0.8); border: 1px solid var(--hair); color: var(--brass); font-variant-numeric: tabular-nums; }
.pill b { color: var(--text); font: 700 1.05em/1 var(--font-d); } .pill small { color: var(--faint); }
.pill.small { height: 28px; padding: 0 10px; font-size: 14px; }
.row { display: flex; gap: 12px; align-items: center; margin-top: 18px; }
.row.end { justify-content: flex-end; } .row.wrap { flex-wrap: wrap; }
.fine { font-size: 13.5px; color: var(--faint); }
.lead { color: var(--muted); margin-top: 8px; }

/* ---------- top bar & nav ---------- */
.topbar { display: flex; align-items: center; gap: 12px; padding: 12px var(--pad) 10px; min-height: 66px; }
.topbar-title { flex: 1; min-width: 0; }
.topbar-title h1 { font-size: 28px; }
.topbar-title p { color: var(--muted); font-size: 14.5px; margin-top: 2px; }
.topbar-right { display: flex; gap: 8px; align-items: center; }
.brand { flex: 1; display: flex; align-items: center; gap: 9px; font: 700 22px/1 var(--font-d); font-variation-settings: "SOFT" 100, "opsz" 72; }
.brand .lantern-svg { filter: drop-shadow(0 0 8px rgba(127, 224, 196, 0.6)); }

#nav { grid-row: 2; grid-column: 1; display: none; justify-content: space-around; padding: 6px 6px 8px; background: linear-gradient(180deg, rgba(10, 50, 58, 0.86), rgba(4, 28, 34, 0.97)); border-top: 1px solid var(--hair); }
#nav.on { display: flex; }
#nav button { flex: 1; max-width: 110px; display: flex; flex-direction: column; align-items: center; gap: 3px; padding: 7px 2px 4px; border: 0; background: none; color: var(--faint); font-size: 12.5px; font-weight: 600; border-radius: 12px; position: relative; transition: color 0.2s; }
#nav button.active { color: var(--ivory); }
#nav button.active::before { content: ""; position: absolute; top: 0; width: 26px; height: 3px; border-radius: 2px; background: var(--petal); box-shadow: 0 0 10px var(--petal); }
#nav .nav-brand { display: none; }

/* ---------- title ---------- */
#s-title { align-items: center; justify-content: center; overflow: hidden; }
.title-wrap { display: flex; flex-direction: column; align-items: center; text-align: center; padding: 20px; max-width: 100%; }
.title-lantern { transform-origin: 50% 0; animation: sway 6s ease-in-out infinite; filter: drop-shadow(0 0 22px rgba(127, 224, 196, 0.65)); margin-bottom: 4px; }
@keyframes sway { 0%, 100% { transform: rotate(-3.5deg); } 50% { transform: rotate(3.5deg); } }
.wordmark {
  font: 900 clamp(60px, 19vw, 120px)/0.86 var(--font-d); letter-spacing: -0.025em; font-variation-settings: "SOFT" 100, "WONK" 1, "opsz" 144;
  background: linear-gradient(180deg, #FFFBEF 18%, #F6DFAE 62%, #F2A7B8 100%); -webkit-background-clip: text; background-clip: text; color: transparent;
  filter: drop-shadow(0 3px 0 rgba(4, 36, 40, 0.7)) drop-shadow(0 12px 26px rgba(0, 0, 0, 0.5)); padding: 0.06em 0.04em 0.1em;
}
.wordmark span { display: block; animation: wordIn 0.9s cubic-bezier(0.2, 0.9, 0.2, 1) both; }
.wordmark span + span { animation-delay: 0.12s; }
@keyframes wordIn { from { opacity: 0; transform: translateY(22px); } }
.title-sub { font: 500 clamp(17px, 4.6vw, 22px)/1 var(--font-d); font-variation-settings: "SOFT" 100; color: var(--celadon); letter-spacing: 0.02em; margin-top: 6px; animation: wordIn 0.9s 0.25s both; }
.title-tiles { display: flex; justify-content: center; margin: 26px 0 30px; min-height: 60px; }
.tt { display: inline-block; margin: 0 -2px; transform: translateY(var(--dip)) rotate(var(--tilt)); animation: ttDeal 0.75s cubic-bezier(0.2, 1.25, 0.4, 1) both; animation-delay: calc(var(--i) * 85ms + 350ms); }
.tt canvas { display: block; animation: ttBob 4.8s ease-in-out infinite; animation-delay: calc(var(--i) * -0.7s); filter: drop-shadow(0 10px 12px rgba(0, 0, 0, 0.4)); }
@keyframes ttDeal { from { opacity: 0; transform: translateY(-70px) rotate(calc(var(--tilt) - 14deg)) scale(1.15); } }
@keyframes ttBob { 50% { transform: translateY(-7px); } }
#title-play { animation: wordIn 0.8s 1.05s both; min-width: 190px; }
.title-wrap .fine { margin-top: 18px; animation: wordIn 0.8s 1.25s both; }

/* ---------- home ---------- */
.home-inner { max-width: 1120px; margin: 0 auto; display: grid; gap: 16px; }
.level-chip { display: flex; align-items: center; gap: 9px; padding: 4px 14px 4px 4px; border-radius: 26px; border: 1px solid var(--hair); background: rgba(10, 50, 58, 0.8); text-align: left; }
.level-chip span b { display: block; font-size: 14.5px; line-height: 1.15; } .level-chip span small { color: var(--faint); font-size: 12px; }
.lv-ring { position: relative; display: inline-grid; place-items: center; flex: none; }
.lv-ring svg { position: absolute; inset: 0; width: 100%; height: 100%; }
.lv-ring b { font: 700 1em/1 var(--font-d); position: relative; }
.lv-track { fill: rgba(10, 50, 58, 0.9); stroke: rgba(246, 238, 220, 0.16); stroke-width: 3.5; }
.lv-fill { fill: none; stroke: var(--brass); stroke-width: 3.5; stroke-linecap: round; }
.continue-strip { display: flex; align-items: center; gap: 12px; width: 100%; padding: 10px 14px; border-radius: 16px; border: 1px solid var(--hair); background: rgba(10, 50, 58, 0.84); text-align: left; }
.cs-ic { display: grid; place-items: center; width: 40px; height: 40px; border-radius: 12px; background: var(--accent); color: var(--ink); flex: none; }
.cs-text { flex: 1; } .cs-text b { display: block; } .cs-text small { color: var(--muted); }

.hero { display: grid; grid-template-columns: 1fr auto; gap: 6px 14px; padding: 18px 18px 14px; position: relative; overflow: hidden; }
.hero::before { content: ""; position: absolute; inset: 0; background: radial-gradient(80% 120% at 100% 0, rgba(127, 224, 196, 0.22), transparent 60%); pointer-events: none; }
.hero-text { min-width: 0; position: relative; }
.hero-chapter { color: var(--petal); font-weight: 700; font-size: 14.5px; }
.hero h2 { font-size: 40px; font-weight: 800; margin: 2px 0 4px; }
.hero-line { color: var(--muted); font-size: 15.5px; min-height: 2.8em; }
.hero-meter { height: 8px; border-radius: 4px; background: rgba(246, 238, 220, 0.12); margin-top: 12px; overflow: hidden; }
.hero-meter i { display: block; height: 100%; min-width: 8px; border-radius: 4px; background: linear-gradient(90deg, var(--petal), var(--brass)); }
.hero-count { display: flex; justify-content: space-between; font-size: 14px; color: var(--muted); margin-top: 6px; }
.hero-stars { color: var(--brass); display: inline-flex; align-items: center; gap: 4px; }
.hero-side { position: relative; align-self: center; }
.hero-side canvas { display: block; width: 120px; height: 120px; filter: drop-shadow(0 8px 10px rgba(0, 0, 0, 0.35)); }
.hero-actions { grid-column: 1 / -1; display: flex; gap: 12px; align-items: flex-start; margin-top: 12px; position: relative; }
.hero-actions .tb { flex: 1; }
.hero-actions .ghost { min-height: 60px; }

.mode-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 14px 12px; }
.mode-tile {
  position: relative; display: flex; flex-direction: column; align-items: flex-start; gap: 3px; text-align: left; padding: 14px 13px 14px; border: 0; border-radius: 18px;
  color: var(--ink); background: linear-gradient(165deg, #FFFDF5 0%, #F0E4C8 100%); margin-bottom: 9px; min-height: 148px;
  box-shadow: inset 0 1px 0 #fff, inset 0 0 0 1px rgba(120, 90, 40, 0.14), 0 3px 0 var(--bone-2), 0 9px 0 var(--accent), 0 10px 0 rgba(0, 0, 0, 0.3), 0 16px 22px rgba(0, 0, 0, 0.3);
  box-shadow: inset 0 1px 0 #fff, inset 0 0 0 1px rgba(120, 90, 40, 0.14), 0 3px 0 var(--bone-2), 0 9px 0 color-mix(in srgb, var(--accent) 72%, #3a1a34), 0 10px 0 rgba(0, 0, 0, 0.3), 0 16px 22px rgba(0, 0, 0, 0.3);
  transition: transform 0.09s ease, box-shadow 0.09s ease;
}
.mode-tile:active { transform: translateY(6px); box-shadow: inset 0 1px 0 #fff, inset 0 0 0 1px rgba(120, 90, 40, 0.14), 0 1px 0 var(--bone-2), 0 3px 0 var(--accent), 0 4px 0 rgba(0, 0, 0, 0.3), 0 6px 8px rgba(0, 0, 0, 0.3); }
.mt-ic { display: grid; place-items: center; width: 50px; height: 50px; border-radius: 14px; margin-bottom: 6px; background: var(--accent); color: var(--ink); box-shadow: inset 0 2px 3px rgba(8, 40, 44, 0.28), inset 0 -1px 0 rgba(255, 255, 255, 0.5); }
.mt-ic { background: color-mix(in srgb, var(--accent) 34%, #FBF3DD); color: color-mix(in srgb, var(--accent) 52%, #13262A); }
.mode-tile strong { font: 700 19px/1.1 var(--font-d); font-variation-settings: "SOFT" 100, "opsz" 72; }
.mode-tile small { font-size: 13.5px; line-height: 1.3; color: rgba(16, 36, 40, 0.74); }
.mode-tile em { font-style: normal; font-weight: 700; font-size: 12.5px; margin-top: auto; padding-top: 6px; color: rgba(16, 36, 40, 0.62); }
.mt-dot { position: absolute; top: 12px; right: 12px; width: 12px; height: 12px; border-radius: 50%; background: var(--petal-deep); box-shadow: 0 0 0 4px rgba(23, 138, 74, 0.25); animation: dot 1.8s ease-in-out infinite; }
@keyframes dot { 50% { box-shadow: 0 0 0 9px rgba(23, 138, 74, 0); } }
.home-foot { text-align: center; color: var(--faint); font-size: 13.5px; padding: 10px 0 4px; }

/* ---------- modals ---------- */
.modal { position: fixed; inset: 0; z-index: 30; display: grid; place-items: center; padding: 14px; background: rgba(2, 18, 22, 0.66); animation: fade 0.22s ease both; padding-bottom: calc(14px + env(safe-area-inset-bottom, 0px)); }
.modal.out { animation: fadeOut 0.22s ease both; }
.modal-card { position: relative; width: min(100%, 480px); max-height: 100%; overflow-y: auto; padding: 24px 20px 14px; animation: cardIn 0.36s cubic-bezier(0.2, 1.1, 0.3, 1) both; }
.modal.out .modal-card { animation: cardOut 0.2s ease both; }
.modal.small .modal-card { width: min(100%, 410px); }
.modal h2 { font-size: 28px; }
.modal h3 { font-size: 16px; font-family: var(--font); font-weight: 700; color: var(--muted); margin: 16px 0 8px; }
@keyframes fade { from { opacity: 0; } } @keyframes fadeOut { to { opacity: 0; } }
@keyframes cardIn { from { opacity: 0; transform: translateY(26px) scale(0.95); } }
@keyframes cardOut { to { opacity: 0; transform: translateY(12px) scale(0.97); } }
.x { position: absolute; top: 12px; right: 12px; width: 40px; height: 40px; display: grid; place-items: center; border-radius: 12px; border: 0; background: rgba(246, 238, 220, 0.08); color: var(--muted); }
.sheet-head { display: flex; gap: 14px; align-items: center; padding-right: 44px; }
.sheet-ic { display: grid; place-items: center; width: 64px; height: 76px; border-radius: 14px; flex: none; color: var(--ink); background: linear-gradient(165deg, #FFFDF5, #F0E4C8); box-shadow: 0 3px 0 var(--bone-2), 0 7px 0 var(--accent), 0 12px 14px rgba(0, 0, 0, 0.3); margin-bottom: 8px; }
.sheet-head p { color: var(--muted); margin-top: 4px; }
.rules { margin: 18px 0 0; padding: 0; list-style: none; display: grid; gap: 10px; }
.rules li { position: relative; padding-left: 22px; color: var(--text); }
.rules li::before { content: ""; position: absolute; left: 3px; top: 0.5em; width: 9px; height: 9px; border-radius: 3px; background: var(--brass); transform: rotate(45deg); }
.sheet-best { margin-top: 16px; padding: 10px 14px; border-radius: 12px; background: rgba(246, 238, 220, 0.07); color: var(--muted); }
.sheet-best b { color: var(--brass); }
.pause-list { display: grid; gap: 10px; margin-top: 18px; }
.pause-toggles { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.ghost.toggle { opacity: 0.7; } .ghost.toggle.on { opacity: 1; border-color: var(--celadon); color: var(--celadon); }
.modal.pause .fine, .modal .fine { margin-top: 12px; text-align: center; }

/* results */
.modal.result .modal-card { text-align: center; }
.res-kicker { color: var(--petal); font-weight: 700; }
.modal.result h2 { font-size: 32px; font-weight: 800; margin-top: 2px; }
.res-stars { display: flex; justify-content: center; gap: 8px; margin: 14px 0 6px; }
.res-stars i { color: rgba(246, 238, 220, 0.16); transform: scale(0.82); }
.res-stars i:nth-child(2) { transform: translateY(-8px) scale(0.92); }
.res-stars i.on { color: var(--brass); animation: starPop 0.55s cubic-bezier(0.2, 1.7, 0.4, 1) both; filter: drop-shadow(0 0 12px rgba(216, 178, 106, 0.75)); }
.res-stars i.on:nth-child(2) { animation-name: starPopMid; }
@keyframes starPop { from { transform: scale(0) rotate(-40deg); } to { transform: scale(1) rotate(0); } }
@keyframes starPopMid { from { transform: translateY(-8px) scale(0) rotate(-40deg); } to { transform: translateY(-8px) scale(1.14) rotate(0); } }
.goals { list-style: none; margin: 10px auto 0; padding: 0; display: grid; gap: 5px; text-align: left; width: fit-content; color: var(--faint); font-size: 15px; }
.goals li { display: flex; gap: 8px; align-items: center; } .goals li.on { color: var(--text); } .goals li.on .i { color: var(--celadon); }
.goals.stars-goals li .i { color: rgba(246, 238, 220, 0.25); } .goals.stars-goals li.on .i { color: var(--brass); }
.res-stats { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; margin-top: 14px; }
.res-stats div { padding: 9px 6px; border-radius: 12px; background: rgba(246, 238, 220, 0.07); }
.res-stats small { display: block; color: var(--faint); font-size: 12.5px; } .res-stats b { font: 700 19px/1.2 var(--font-d); font-variant-numeric: tabular-nums; }
.res-badge { display: inline-flex; gap: 6px; align-items: center; margin-top: 10px; padding: 5px 14px; border-radius: 20px; background: rgba(216, 178, 106, 0.16); color: var(--brass); font-weight: 700; }
.res-badge.flame { background: rgba(127, 224, 196, 0.16); color: var(--petal); }
.res-score { font: 900 60px/1 var(--font-d); color: var(--brass); margin-top: 6px; font-variant-numeric: tabular-nums; text-shadow: 0 0 24px rgba(216, 178, 106, 0.4); }
.res-lantern { margin: 0 auto 6px; filter: drop-shadow(0 0 16px rgba(127, 224, 196, 0.6)); }
.xp-block { margin-top: 14px; text-align: left; }
.xp-row { display: flex; justify-content: space-between; font-size: 14px; color: var(--muted); margin-bottom: 5px; } .xp-row span:last-child { color: var(--celadon); font-weight: 700; }
.xp-bar { height: 10px; border-radius: 5px; background: rgba(246, 238, 220, 0.12); overflow: hidden; }
.xp-bar i { display: block; height: 100%; width: 100%; transform-origin: 0 50%; border-radius: 5px; background: linear-gradient(90deg, var(--celadon), #D7F3C8); transition: transform 1.1s cubic-bezier(0.3, 0.8, 0.3, 1); }
.xp-up { display: flex; align-items: center; justify-content: center; gap: 6px; color: var(--brass); font-weight: 700; margin-bottom: 8px; }
.unlocks { display: grid; gap: 8px; margin-top: 12px; }
.unlock { display: flex; align-items: center; gap: 10px; text-align: left; padding: 8px 10px; border-radius: 14px; background: linear-gradient(90deg, rgba(216, 178, 106, 0.2), rgba(216, 178, 106, 0.05)); border: 1px solid var(--hair); animation: cardIn 0.5s 1.4s both; }
.unlock div { flex: 1; } .unlock small { display: block; color: var(--brass); font-weight: 700; } .unlock-pic { display: grid; place-items: center; width: 46px; height: 46px; } .unlock-pic canvas { border-radius: 8px; }
.scores { list-style: none; margin: 12px 0 0; padding: 0; display: grid; gap: 4px; text-align: left; }
.scores li { display: grid; grid-template-columns: 26px auto 1fr; gap: 8px; align-items: baseline; padding: 6px 10px; border-radius: 10px; }
.scores li span { color: var(--faint); font-variant-numeric: tabular-nums; } .scores li b { font: 700 17px var(--font-d); font-variant-numeric: tabular-nums; } .scores li small { color: var(--muted); text-align: right; }
.scores li.me { background: rgba(216, 178, 106, 0.18); outline: 1px solid var(--hair); }
.level-pic { display: grid; place-items: center; margin: 12px 0 2px; }
.level-meta { text-align: center; color: var(--muted); font-size: 14.5px; }
.quick-row { display: flex; gap: 10px; overflow-x: auto; padding: 4px 2px 10px; scrollbar-width: none; }
.quick { flex: none; width: 78px; display: flex; flex-direction: column; align-items: center; gap: 6px; padding: 10px 4px 8px; border-radius: 14px; border: 1px solid transparent; background: rgba(246, 238, 220, 0.06); color: var(--muted); }
.quick.on { border-color: var(--brass); color: var(--text); background: rgba(216, 178, 106, 0.14); }
.quick small { font-size: 12px; line-height: 1.15; text-align: center; } .quick-bg { width: 60px; height: 60px; border-radius: 10px; } .quick-pic { height: 60px; display: grid; place-items: center; }

/* ---------- toasts ---------- */
#toasts { position: fixed; z-index: 40; top: calc(10px + env(safe-area-inset-top, 0px)); left: 0; right: 0; display: grid; justify-items: center; gap: 8px; pointer-events: none; padding: 0 12px; }
.toast { display: flex; align-items: center; gap: 10px; max-width: 440px; padding: 10px 16px 10px 12px; border-radius: 16px; background: rgba(10, 50, 58, 0.96); border: 1px solid var(--hair); box-shadow: 0 10px 26px rgba(0, 0, 0, 0.45); animation: toastIn 0.4s cubic-bezier(0.2, 1.2, 0.3, 1) both; }
.toast.out { animation: toastOut 0.35s ease both; }
.toast b { display: block; line-height: 1.25; } .toast small { color: var(--muted); display: block; line-height: 1.25; }
.toast-ic { display: grid; place-items: center; width: 38px; height: 38px; border-radius: 12px; background: rgba(246, 238, 220, 0.1); flex: none; }
.toast.brass { border-color: var(--brass); } .toast.brass .toast-ic { background: linear-gradient(160deg, #F3D48A, #B98F45); color: var(--ink); }
@keyframes toastIn { from { opacity: 0; transform: translateY(-20px) scale(0.94); } } @keyframes toastOut { to { opacity: 0; transform: translateY(-14px); } }

/* ---------- game ---------- */
#s-game.on, #s-game.leave { display: grid; grid-template-columns: minmax(0, 1fr); grid-template-rows: auto auto minmax(0, 1fr) auto; grid-template-areas: "a" "bar" "board" "b"; }
.hud-a { grid-area: a; display: flex; align-items: center; gap: 10px; padding: 8px 12px 6px; }
.hud-title { flex: 1 1 40px; min-width: 0; display: flex; flex-direction: column; }
.hud-title strong { font: 700 20px/1.1 var(--font-d); font-variation-settings: "SOFT" 100, "opsz" 72; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.hud-title span { font-size: 13px; color: var(--muted); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.hud-stats { display: flex; gap: 5px; flex-wrap: wrap; justify-content: flex-end; flex: none; max-width: 72%; }
.chip { display: inline-flex; align-items: center; gap: 4px; height: 30px; padding: 0 9px; border-radius: 15px; background: rgba(10, 50, 58, 0.82); border: 1px solid rgba(216, 178, 106, 0.22); font-size: 14.5px; font-variant-numeric: tabular-nums; color: var(--muted); }
.chip b { color: var(--text); font: 700 1.04em/1 var(--font-d); font-variant-numeric: tabular-nums lining-nums; }
.chip.score { color: var(--brass); } .chip.time { color: var(--celadon); } .chip.warn { color: #FF9C8A; border-color: rgba(255, 140, 120, 0.6); } .chip.warn b { color: #FFD1C8; }
.hud-bar { grid-area: bar; height: 4px; margin: 2px 14px 0; border-radius: 2px; background: rgba(246, 238, 220, 0.13); overflow: hidden; }
.hud-bar i { display: block; height: 100%; background: linear-gradient(90deg, var(--celadon), var(--brass)); transform-origin: 0 50%; transform: scaleX(0); transition: transform 0.5s cubic-bezier(0.3, 0.8, 0.3, 1); border-radius: 2px; }
.hud-bar.timer { height: 7px; border-radius: 4px; } .hud-bar.timer i { transition: transform 0.25s linear; background: linear-gradient(90deg, #FFB454, #FFE6A0); }
.hud-bar.timer.low i { background: #FF7A66; }
#board-area { grid-area: board; position: relative; min-height: 0; min-width: 0; overflow: hidden; }
#board, #fx { position: absolute; inset: 0; width: 100%; height: 100%; display: block; }
#fx { touch-action: none; }
.hud-b { grid-area: b; display: flex; justify-content: center; gap: 12px; padding: 8px 14px 10px; }
.tb.act { flex: 1; max-width: 160px; min-height: 58px; flex-direction: column; gap: 3px; padding: 6px 6px; font-size: 13.5px; }
.tb.act .ic { display: grid; place-items: center; height: 24px; }
.tb.act.glow { animation: actGlow 1.2s ease-in-out infinite; }
@keyframes actGlow { 50% { box-shadow: inset 0 1px 0 #fff, 0 3px 0 var(--bone-2), 0 7px 0 var(--back), 0 8px 0 rgba(0, 0, 0, 0.35), 0 0 0 7px rgba(158, 216, 192, 0.55), 0 0 30px rgba(158, 216, 192, 0.8); } }
#combo { display: none; flex-direction: column; align-items: center; gap: 3px; padding: 4px 10px 5px; border-radius: 14px; background: rgba(10, 50, 58, 0.86); border: 1px solid rgba(255, 214, 120, 0.6); box-shadow: 0 0 16px rgba(255, 200, 100, 0.35); flex: none; }
#combo.on { display: flex; animation: comboIn 0.3s cubic-bezier(0.2, 1.6, 0.4, 1) both; }
@keyframes comboIn { from { transform: scale(0.5); opacity: 0; } }
#combo b { font: 800 19px/1 var(--font-d); color: #FFE6A0; }
#combo i { display: block; width: 40px; height: 4px; border-radius: 2px; background: rgba(246, 238, 220, 0.16); overflow: hidden; }
#combo u { display: block; height: 100%; background: #FFE6A0; transform-origin: 0 50%; }
#coach { position: absolute; left: 0; right: 0; bottom: 8px; display: grid; justify-items: center; padding: 0 12px; pointer-events: none; }
#coach.pop .coach-card { animation: cardIn 0.4s cubic-bezier(0.2, 1.2, 0.3, 1) both; }
.coach-card { pointer-events: auto; display: flex; align-items: center; gap: 12px; max-width: 520px; width: 100%; padding: 12px 12px 12px 14px; border-radius: 18px; background: linear-gradient(165deg, #FFFDF5, #F0E4C8); color: var(--ink); box-shadow: 0 3px 0 var(--bone-2), 0 8px 0 var(--jade), 0 16px 26px rgba(0, 0, 0, 0.45); margin-bottom: 10px; }
.coach-card p { flex: 1; } .coach-card p b { display: block; font: 700 17.5px/1.2 var(--font-d); } .coach-card p span { display: block; font-size: 14.5px; margin-top: 3px; color: rgba(16, 36, 40, 0.78); }
.coach-step { font: 700 13px var(--font); color: var(--jade); white-space: nowrap; align-self: flex-start; padding-top: 2px; }
.coach-card .ghost { color: var(--ink); border-color: rgba(16, 36, 40, 0.25); background: rgba(16, 36, 40, 0.06); }
.zen-banner { position: absolute; inset: 0; display: grid; place-content: center; justify-items: center; gap: 6px; text-align: center; pointer-events: none; animation: fade 0.8s ease both; }
.zen-banner.out { animation: fadeOut 0.6s ease both; }
.zen-banner p { font: 600 30px var(--font-d); font-variation-settings: "SOFT" 100; } .zen-banner small { color: var(--muted); font-size: 15px; }
.zen-ring { width: 84px; height: 84px; border-radius: 50%; border: 2px solid var(--celadon); margin-bottom: 10px; animation: breathe 2.6s ease-in-out both; box-shadow: 0 0 30px rgba(158, 216, 192, 0.4), inset 0 0 20px rgba(158, 216, 192, 0.25); }
@keyframes breathe { 0% { transform: scale(0.6); opacity: 0; } 50% { transform: scale(1.15); opacity: 1; } 100% { transform: scale(0.9); opacity: 0.6; } }
#s-game.calm .hud-bar { opacity: 0.45; } #s-game.calm .chip { background: rgba(10, 50, 58, 0.55); border-color: transparent; }
body.left-handed .hud-a, body.left-handed .hud-b { flex-direction: row-reverse; }
body.left-handed .hud-stats { justify-content: flex-start; }
body.large-tiles .hud-a { padding-top: 4px; padding-bottom: 2px; } body.large-tiles .hud-b { padding-top: 4px; padding-bottom: 6px; } body.large-tiles .tb.act { min-height: 50px; }

/* ---------- journey map ---------- */
.map { max-width: 560px; margin: 0 auto; }
.chapter { margin-bottom: 14px; }
.chapter-head { display: flex; align-items: center; gap: 12px; padding: 10px 12px; border-radius: 18px; background: rgba(10, 50, 58, 0.84); border: 1px solid var(--hair); }
.chapter-head div { flex: 1; min-width: 0; } .chapter-head small { color: var(--petal); font-weight: 700; } .chapter-head h2 { font-size: 22px; } .chapter-head p { color: var(--muted); font-size: 14px; margin-top: 2px; }
.chapter-thumb { width: 56px; height: 56px; border-radius: 14px; flex: none; box-shadow: 0 0 0 1px var(--hair); }
.chapter-path { position: relative; }
.path-svg { position: absolute; left: 0; top: 0; overflow: visible; }
.path-base { fill: none; stroke: rgba(246, 238, 220, 0.3); stroke-width: 4; stroke-linecap: round; stroke-dasharray: 0.5 11; }
.path-done { fill: none; stroke: var(--brass); stroke-width: 4; stroke-linecap: round; filter: drop-shadow(0 0 6px rgba(216, 178, 106, 0.6)); }
.node { position: absolute; transform: translate(-50%, -50%); width: 56px; height: 76px; padding: 0; border: 0; background: none; display: flex; flex-direction: column; align-items: center; }
.node-face { --back: var(--jade); display: grid; place-items: center; width: 50px; height: 60px; border-radius: 12px; font: 700 21px/1 var(--font-d); color: var(--ink); background: linear-gradient(165deg, #FFFDF5, #EFE2C4); box-shadow: inset 0 1px 0 #fff, 0 2px 0 var(--bone-2), 0 6px 0 var(--back), 0 7px 0 rgba(0, 0, 0, 0.3), 0 11px 14px rgba(0, 0, 0, 0.35); transition: transform 0.08s; }
.node:active:not(:disabled) .node-face { transform: translateY(4px); }
.node.done .node-face { --back: var(--brass-deep); }
.node.current .node-face { --back: var(--petal-deep); animation: nodePulse 1.8s ease-in-out infinite; }
.node.finale .node-face { background: linear-gradient(165deg, #FFF3C4, #F0B739); }
@keyframes nodePulse { 50% { box-shadow: inset 0 1px 0 #fff, 0 2px 0 var(--bone-2), 0 6px 0 var(--back), 0 7px 0 rgba(0, 0, 0, 0.3), 0 0 0 7px rgba(127, 224, 196, 0.4), 0 0 26px rgba(127, 224, 196, 0.7); } }
.node.locked .node-face { background: linear-gradient(165deg, #1E4E55, #123A41); color: rgba(207, 237, 230, 0.45); box-shadow: 0 2px 0 #0B2A30, 0 6px 0 #071E23, 0 10px 12px rgba(0, 0, 0, 0.3); }
.node .stars { margin-top: 9px; display: flex; gap: 0; }
.stars i { color: rgba(246, 238, 220, 0.2); display: inline-flex; } .stars i.on { color: var(--brass); }
.node-here { position: absolute; top: -27px; left: 50%; transform: translateX(-50%); animation: ttBob 2s ease-in-out infinite; filter: drop-shadow(0 0 8px rgba(127, 224, 196, 0.8)); }
.chapter.closed .chapter-head { opacity: 0.65; }
.map-end { text-align: center; color: var(--faint); padding: 6px 0 20px; }

/* ---------- classic ---------- */
.form-grid { max-width: 1120px; margin: 0 auto; display: grid; grid-template-columns: 1fr; gap: 14px; }
.form-card { position: relative; display: grid; grid-template-columns: 132px 1fr; gap: 14px; align-items: center; padding: 12px 14px; text-align: left; color: var(--text); transition: transform 0.1s; }
.form-card:active { transform: scale(0.985); }
.form-pic { width: 132px !important; height: 72px !important; }
.form-text h2 { font-size: 22px; } .form-text p { color: var(--muted); font-size: 14.5px; margin: 3px 0 5px; } .form-text small { color: var(--brass); font-weight: 600; }
.form-tick { position: absolute; top: 10px; right: 10px; width: 26px; height: 26px; border-radius: 13px; display: grid; place-items: center; background: var(--jade); color: #fff; }

/* ---------- daily ---------- */
.daily-inner { max-width: 560px; margin: 0 auto; display: grid; gap: 14px; }
.streak { display: flex; align-items: center; gap: 14px; padding: 14px 16px; }
.streak > div:nth-child(2) { flex: 1; } .streak b { font: 700 22px/1.1 var(--font-d); display: block; } .streak small { color: var(--muted); }
.streak-flame { color: var(--faint); } .streak-flame.lit { color: var(--petal); filter: drop-shadow(0 0 10px rgba(127, 224, 196, 0.7)); animation: flick 1.4s ease-in-out infinite; }
@keyframes flick { 50% { transform: scale(1.08) rotate(-3deg); } }
.streak-side { display: grid; grid-template-columns: auto auto; gap: 0 8px; align-items: baseline; text-align: right; } .streak-side b { font-size: 17px; }
.cal { padding: 12px 12px 14px; }
.cal-head { display: flex; align-items: center; justify-content: space-between; margin-bottom: 10px; } .cal-head h2 { font-size: 21px; } .cal-head .chipbtn { width: 40px; height: 40px; }
.cal-grid { display: grid; grid-template-columns: repeat(7, 1fr); gap: 6px; }
.cal-grid > span { text-align: center; color: var(--faint); font-size: 13px; font-weight: 700; padding-bottom: 2px; }
.day { position: relative; aspect-ratio: 1; border-radius: 12px; border: 1px solid transparent; background: rgba(246, 238, 220, 0.07); color: var(--text); display: grid; place-items: center; padding: 0; font-variant-numeric: tabular-nums; }
.day b { font-weight: 600; } .day .i { position: absolute; right: 3px; bottom: 3px; }
.day:disabled { opacity: 0.3; }
.day.gold { background: linear-gradient(160deg, #F3D48A, #C79C4E); color: var(--ink); } .day.gold b { font-weight: 800; }
.day.caught { background: rgba(158, 216, 192, 0.2); border-color: rgba(158, 216, 192, 0.55); }
.day.today { border-color: var(--petal); box-shadow: 0 0 0 2px rgba(127, 224, 196, 0.35); }
.day.sel { outline: 3px solid var(--ivory); outline-offset: 1px; }
.day-panel { display: flex; align-items: center; gap: 12px; padding: 14px 16px; }
.day-panel > div { flex: 1; } .day-panel small { color: var(--petal); font-weight: 700; } .day-panel h2 { font-size: 24px; } .day-panel p { color: var(--muted); font-size: 14.5px; margin-top: 3px; }

/* ---------- style ---------- */
.style-stage { position: relative; height: clamp(120px, 24vh, 230px); margin: 0 var(--pad); display: grid; place-items: center; }
#style-preview { position: absolute; inset: 0; width: 100%; height: 100%; display: block; }
.stage-note { position: absolute; bottom: -22px; left: 0; right: 0; text-align: center; font-size: 13.5px; color: var(--ivory); text-shadow: 0 1px 6px rgba(0, 0, 0, 0.8); }
.seg { display: flex; gap: 6px; margin: 30px var(--pad) 10px; padding: 5px; border-radius: 16px; background: rgba(4, 28, 34, 0.8); border: 1px solid var(--hair); max-width: 440px; }
.seg button { flex: 1; display: flex; align-items: center; justify-content: center; gap: 7px; min-height: 42px; border: 0; border-radius: 12px; background: none; color: var(--muted); font-weight: 700; }
.seg button.on { background: linear-gradient(165deg, #FFFDF5, #F0E4C8); color: var(--ink); box-shadow: 0 2px 0 var(--bone-2), 0 4px 0 var(--petal-deep); }
.style-list { max-width: 1120px; margin: 0 auto; display: grid; grid-template-columns: 1fr; gap: 10px; }
.style-card { display: grid; grid-template-columns: 1fr auto; grid-template-areas: "pic state" "text text"; gap: 8px 10px; align-items: center; padding: 12px 14px; text-align: left; color: var(--text); }
.style-card.bgcard { grid-template-columns: auto 1fr; grid-template-areas: "pic text" "pic state"; }
.style-card.active { border-color: var(--brass); box-shadow: inset 0 0 0 1px var(--brass), 0 14px 32px rgba(0, 0, 0, 0.32); }
.style-card.shown:not(.active) { border-color: var(--celadon); }
.style-strip { grid-area: pic; display: flex; gap: 2px; min-height: 40px; align-items: center; } .style-strip canvas { display: block; }
.bg-thumb { grid-area: pic; width: 92px !important; height: 64px !important; border-radius: 12px; box-shadow: 0 0 0 1px var(--hair); }
.style-text { grid-area: text; } .style-text b { display: block; font: 700 18px/1.2 var(--font-d); } .style-text small { color: var(--muted); display: block; margin-top: 2px; }
.style-state { grid-area: state; justify-self: end; display: inline-flex; align-items: center; gap: 5px; padding: 6px 12px; border-radius: 14px; font-size: 13.5px; font-weight: 700; background: rgba(246, 238, 220, 0.1); white-space: nowrap; }
.bgcard .style-state { justify-self: start; }
.style-card.active .style-state { background: var(--jade); color: #fff; } .style-card.locked .style-state { color: var(--faint); }

/* ---------- trophies ---------- */
.trophy-grid { max-width: 1120px; margin: 0 auto; display: grid; grid-template-columns: 1fr; gap: 10px; }
.trophy { display: flex; gap: 12px; align-items: center; padding: 12px 14px; }
.trophy div { flex: 1; } .trophy b { display: block; font: 700 17.5px/1.2 var(--font-d); } .trophy small { color: var(--muted); display: block; margin-top: 2px; } .trophy em { display: block; font-style: normal; font-size: 12.5px; color: var(--brass); margin-top: 4px; }
.medal { display: grid; place-items: center; width: 52px; height: 52px; border-radius: 50%; flex: none; background: rgba(246, 238, 220, 0.07); color: var(--faint); border: 2px dashed rgba(246, 238, 220, 0.2); }
.trophy.got .medal { background: radial-gradient(circle at 35% 30%, #FFE9B0, #D8B26A 55%, #9C7A3C); color: #4A300C; border: 2px solid #F3D48A; box-shadow: 0 0 18px rgba(216, 178, 106, 0.45), inset 0 -3px 5px rgba(90, 60, 10, 0.35); }
.trophy:not(.got) b { color: var(--muted); }

/* ---------- stats ---------- */
.stats-inner, .settings-inner { max-width: 760px; margin: 0 auto; display: grid; gap: 14px; }
.profile { display: flex; gap: 16px; align-items: center; padding: 16px; }
.profile > div { flex: 1; min-width: 0; } .profile small { color: var(--petal); font-weight: 700; } .profile h2 { font-size: 27px; margin: 1px 0 9px; } .profile p { color: var(--muted); font-size: 14px; margin-top: 7px; }
.profile .lv-ring b { font-size: 30px; } .profile .xp-bar i { background: linear-gradient(90deg, var(--brass), #F6E3AE); }
.stat-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 10px; }
.stat { padding: 12px 14px; display: grid; gap: 1px; position: relative; } .stat b { font: 700 24px/1.15 var(--font-d); font-variant-numeric: tabular-nums; } .stat small { color: var(--muted); }
.stat-ic { position: absolute; top: 12px; right: 12px; color: var(--brass); opacity: 0.8; }
.table-card { padding: 16px; } .table-card h2 { font-size: 20px; margin-bottom: 8px; }
table { width: 100%; border-collapse: collapse; font-variant-numeric: tabular-nums; } th { text-align: left; color: var(--faint); font-size: 13px; font-weight: 700; padding: 4px 0; } td { padding: 8px 0; border-top: 1px solid rgba(246, 238, 220, 0.09); } th:not(:first-child), td:not(:first-child) { text-align: right; }
.dot { display: inline-block; width: 10px; height: 10px; border-radius: 3px; margin-right: 8px; transform: rotate(45deg); }
.empty { color: var(--muted); }

/* ---------- settings ---------- */
.set { padding: 14px 16px 6px; } .set h2 { font-size: 20px; margin-bottom: 4px; color: var(--brass); }
.set-row { display: flex; align-items: center; gap: 14px; padding: 12px 0; border-top: 1px solid rgba(246, 238, 220, 0.09); min-height: 60px; }
.set h2 + .set-row { border-top: 0; }
.set-row > div { flex: 1; min-width: 0; } .set-row b { display: block; } .set-row small { display: block; color: var(--muted); line-height: 1.3; margin-top: 2px; }
.set-row.slider label { display: flex; align-items: center; gap: 9px; width: 108px; flex: none; } .set-row.slider output { width: 34px; text-align: right; color: var(--muted); font-variant-numeric: tabular-nums; }
.switch { position: relative; width: 58px; height: 34px; flex: none; border-radius: 17px; border: 1px solid var(--hair); background: rgba(246, 238, 220, 0.1); transition: background 0.2s; padding: 0; }
.switch i { position: absolute; top: 3px; left: 3px; width: 26px; height: 26px; border-radius: 50%; background: var(--bone); box-shadow: 0 2px 4px rgba(0, 0, 0, 0.4); transition: transform 0.22s cubic-bezier(0.3, 1.4, 0.5, 1), background 0.2s; }
.switch.on { background: var(--jade); border-color: var(--celadon); } .switch.on i { transform: translateX(24px); background: #fff; }
input[type=range] { flex: 1; min-width: 0; height: 34px; margin: 0; background: none; -webkit-appearance: none; appearance: none; touch-action: pan-y; }
input[type=range]::-webkit-slider-runnable-track { height: 8px; border-radius: 4px; background: linear-gradient(90deg, var(--brass), rgba(246, 238, 220, 0.18)); }
input[type=range]::-moz-range-track { height: 8px; border-radius: 4px; background: linear-gradient(90deg, var(--brass), rgba(246, 238, 220, 0.18)); }
input[type=range]::-webkit-slider-thumb { -webkit-appearance: none; width: 28px; height: 28px; margin-top: -10px; border-radius: 9px; border: 0; background: linear-gradient(165deg, #FFFDF5, #EADDBD); box-shadow: 0 2px 0 var(--bone-2), 0 4px 0 var(--jade), 0 6px 8px rgba(0, 0, 0, 0.4); }
input[type=range]::-moz-range-thumb { width: 28px; height: 28px; border-radius: 9px; border: 0; background: linear-gradient(165deg, #FFFDF5, #EADDBD); box-shadow: 0 2px 0 var(--bone-2), 0 4px 0 var(--jade), 0 6px 8px rgba(0, 0, 0, 0.4); }
.mute-btn { color: var(--celadon); border-color: rgba(158, 216, 192, 0.5); } .mute-btn.off { color: #FFB1A6; border-color: rgba(255, 140, 120, 0.5); }
.about { text-align: center; padding: 14px 10px 6px; color: var(--muted); display: grid; gap: 4px; justify-items: center; } .about b { color: var(--text); } .about .fine { max-width: 460px; margin-top: 6px; }
.about-mark { filter: drop-shadow(0 0 10px rgba(127, 224, 196, 0.6)); }

/* ================= larger screens ================= */
@media (min-width: 600px) {
  :root { --pad: 24px; }
  .mode-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 18px 16px; }
  .form-grid, .style-list, .trophy-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 14px; }
  .stat-grid { grid-template-columns: repeat(4, 1fr); }
  .hero { padding: 24px 24px 18px; } .hero h2 { font-size: 52px; } .hero-side canvas { width: 150px !important; height: 150px !important; }
  .hero-actions .tb { flex: 0 1 300px; }
  .wordmark span { display: inline; } .wordmark { font-size: clamp(72px, 12vw, 128px); }
  .hud-a { padding: 12px 20px 8px; } .hud-title strong { font-size: 25px; } .chip { height: 36px; font-size: 16.5px; padding: 0 14px; border-radius: 18px; }
  .hud-b { gap: 18px; padding: 10px 20px 16px; } .tb.act { max-width: 200px; min-height: 66px; font-size: 15px; }
  .chipbtn { width: 50px; height: 50px; }
  .modal-card { padding: 30px 28px 20px; }
  .title-tiles { margin: 34px 0 38px; }
}
@media (min-width: 900px) {
  #app { grid-template-columns: auto minmax(0, 1fr); grid-template-rows: minmax(0, 1fr); }
  .screen { grid-column: 1 / -1; } .screen.with-nav { grid-column: 2; }
  #nav { grid-row: 1; grid-column: 1; flex-direction: column; justify-content: flex-start; gap: 6px; width: 104px; padding: 18px 8px; border-top: 0; border-right: 1px solid var(--hair); background: linear-gradient(90deg, rgba(4, 28, 34, 0.94), rgba(10, 50, 58, 0.8)); }
  #nav button { flex: none; max-width: none; width: 100%; padding: 12px 2px 9px; font-size: 13.5px; }
  #nav button.active::before { top: 50%; left: 0; width: 4px; height: 30px; transform: translateY(-50%); }
  #nav button.active { background: rgba(246, 238, 220, 0.07); }
  #nav .nav-brand { display: grid; place-items: center; margin-bottom: 14px; filter: drop-shadow(0 0 10px rgba(127, 224, 196, 0.6)); }
  .home-inner { grid-template-columns: minmax(340px, 430px) minmax(0, 1fr); align-items: start; gap: 22px 26px; padding-top: 8px; }
  .continue-strip, .home-foot { grid-column: 1 / -1; }
  .home-top .brand { font-size: 26px; }
  .hero { grid-template-columns: 1fr; } .hero-side { justify-self: center; grid-row: 1; } .hero-side canvas { width: 190px !important; height: 190px !important; } .hero-actions .tb { flex: 1; }
  .mode-tile { min-height: 184px; padding: 18px 16px; } .mode-tile strong { font-size: 22px; } .mode-tile small { font-size: 14.5px; } .mt-ic { width: 58px; height: 58px; }
  .form-grid, .style-list, .trophy-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .topbar-title h1 { font-size: 34px; } .topbar { padding-top: 20px; }
  .style-stage { height: clamp(160px, 28vh, 260px); }
}

/* landscape play: controls move to the sides so the board gets the full height */
@media (orientation: landscape) and (max-height: 620px), (orientation: landscape) and (min-width: 1000px) {
  #s-game.on, #s-game.leave { grid-template-columns: minmax(136px, 200px) minmax(0, 1fr) minmax(96px, 150px); grid-template-rows: auto auto minmax(0, 1fr); grid-template-areas: "a board b" "bar board b" ". board b"; }
  .hud-a { flex-direction: column; align-items: flex-start; gap: 12px; padding: 14px 6px 8px 16px; }
  .hud-title { flex: none; } .hud-stats { flex-direction: column; align-items: flex-start; max-width: none; gap: 7px; }
  .hud-bar { margin: 4px 6px 0 16px; }
  .hud-b { flex-direction: column; justify-content: center; gap: 16px; padding: 10px 16px 10px 6px; }
  .tb.act { flex: none; width: 100%; max-width: none; }
  body.left-handed #s-game.on { grid-template-columns: minmax(96px, 150px) minmax(0, 1fr) minmax(136px, 200px); grid-template-areas: "b board a" "b board bar" "b board ."; }
  body.left-handed .hud-a { flex-direction: column; align-items: flex-end; padding: 14px 16px 8px 6px; } body.left-handed .hud-b { flex-direction: column; padding: 10px 6px 10px 16px; }
  body.left-handed .hud-stats { align-items: flex-end; } body.left-handed .hud-title { text-align: right; } body.left-handed .hud-bar { margin: 4px 16px 0 6px; }
  #coach { bottom: 2px; }
}
@media (orientation: landscape) and (max-height: 480px) {
  .hud-a { gap: 8px; padding-top: 8px; } .chip { height: 28px; font-size: 13.5px; } .tb.act { min-height: 50px; } .hud-b { gap: 12px; }
  .title-lantern { display: none; } .wordmark { font-size: 56px; } .wordmark span { display: inline; } .title-tiles { margin: 10px 0 14px; } .title-wrap .fine { display: none; }
  .topbar { min-height: 54px; padding-top: 6px; padding-bottom: 4px; }
  #nav { padding: 2px 6px 3px; } #nav button { flex-direction: row; justify-content: center; gap: 6px; padding: 5px 2px; }
  .style-stage { height: 90px; }
}
@media (max-width: 359px) { .hero h2 { font-size: 34px; } .hero-side canvas { width: 96px !important; height: 96px !important; } .mode-tile { min-height: 156px; } .chip { padding: 0 8px; font-size: 13.5px; } }
@media (max-height: 640px) and (orientation: portrait) { .title-lantern svg { width: 54px; height: 68px; } .title-tiles { margin: 14px 0 18px; } .wordmark { font-size: clamp(52px, 17vw, 80px); } }

/* ---------- reduce motion ---------- */
body.reduce-motion *, body.reduce-motion *::before, body.reduce-motion *::after { animation-duration: 0.001s !important; animation-delay: 0s !important; animation-iteration-count: 1 !important; transition-duration: 0.001s !important; }

/* numerals are set in the display face throughout */
.hero-count, .level-chip small, .xp-row, td, .day b, .set-row output, .streak-side b, .level-meta, .topbar-title p { font-family: var(--font-d); font-variant-numeric: tabular-nums lining-nums; }

/* result buttons: quiet choices share a row, the main action gets the full width below */
.modal.result .row.wrap { justify-content: center; }
.modal.result .row.wrap .ghost { flex: 1 1 0; }
.modal.result .row.wrap .tb { flex: 1 1 100%; order: 5; }
@media (max-width: 420px) { .chip .i { width: 14px; height: 14px; } .chip { padding: 0 8px; font-size: 13.5px; } .hud-a { gap: 8px; } }

body[data-screen="game"] .toast { padding: 7px 14px 7px 8px; } body[data-screen="game"] .toast:not(.long) small { display: none; } body[data-screen="game"] .toast-ic { width: 32px; height: 32px; }
@media (max-width: 400px) { .hud-title strong { font-size: 18px; } }

/* ---------- polish pass 1: fill bigger screens properly ---------- */
@media (min-width: 600px) and (min-height: 900px) {
  .home-inner { gap: 22px; padding-top: 10px; }
  .hero { padding: 30px 30px 22px; } .hero h2 { font-size: 64px; } .hero-line { font-size: 18px; } .hero-chapter { font-size: 16px; }
  .hero-side canvas { width: 190px !important; height: 190px !important; }
  .mode-tile { min-height: 214px; padding: 20px 18px; border-radius: 22px; } .mode-tile strong { font-size: 24px; } .mode-tile small { font-size: 15.5px; } .mode-tile em { font-size: 14px; }
  .mt-ic { width: 62px; height: 62px; border-radius: 17px; margin-bottom: 10px; } .mt-ic .i { width: 36px; height: 36px; }
  .home-top .brand { font-size: 27px; } .tb.big { min-height: 68px; font-size: 22px; }
}
@media (min-width: 900px) {
  #s-home .scroll { display: grid; align-content: center; }
  .home-inner { width: 100%; max-width: 1240px; grid-template-columns: minmax(380px, 470px) minmax(0, 1fr); }
  .hero { padding: 30px 30px 24px; } .hero h2 { font-size: 60px; } .hero-side canvas { width: 230px !important; height: 230px !important; }
  .mode-tile { min-height: 228px; } .mode-grid { gap: 22px 20px; }
  .title-lantern svg { width: 104px; height: 130px; }
  .title-tiles { margin: 40px 0 44px; } #title-play { min-width: 240px; min-height: 68px; font-size: 22px; }
}
@media (orientation: landscape) and (max-height: 620px) {
  #s-game.on, #s-game.leave { grid-template-columns: minmax(112px, 140px) minmax(0, 1fr) minmax(88px, 112px); }
  body.left-handed #s-game.on { grid-template-columns: minmax(88px, 112px) minmax(0, 1fr) minmax(112px, 140px); }
  .hud-a { padding: 10px 4px 6px 12px; gap: 8px; } .hud-title strong { font-size: 18px; } .hud-b { padding: 8px 12px 8px 4px; gap: 10px; }
  .tb.act { min-height: 52px; font-size: 12.5px; } .chipbtn { width: 42px; height: 42px; }
}

.res-trophies { display: flex; flex-wrap: wrap; justify-content: center; gap: 6px; margin-top: 12px; }
.res-trophy { display: inline-flex; align-items: center; gap: 6px; padding: 4px 12px 4px 4px; border-radius: 16px; background: rgba(216, 178, 106, 0.16); border: 1px solid var(--hair); color: var(--brass); font-weight: 700; font-size: 14px; animation: cardIn 0.5s 1s both; }
.medal.mini { width: 24px; height: 24px; border-radius: 50%; display: grid; place-items: center; background: radial-gradient(circle at 35% 30%, #FFE9B0, #D8B26A 55%, #9C7A3C); color: #4A300C; border: 0; }

@media (min-width: 900px) { .map { max-width: 700px; } .chapter-head h2 { font-size: 26px; } .node { width: 64px; height: 86px; } .node-face { width: 58px; height: 70px; font-size: 24px; border-radius: 14px; } }
.mute-chip.off { color: #FFB1A6; border-color: rgba(255, 140, 120, 0.5); }
.home-top { gap: 8px; }

/* chip labels: icons only on a phone held upright, words as well wherever there is room */
.chip small { display: none; font-size: 0.86em; color: var(--muted); }
@media (min-width: 700px) { .chip small { display: inline; } }
@media (orientation: landscape) and (max-height: 620px), (orientation: landscape) and (min-width: 1000px) { .chip small { display: inline; } .hud-stats .chip { width: 100%; justify-content: flex-start; } .hud-stats .chip b { margin-left: auto; } .hud-stats { width: 100%; } }
.chip small { white-space: nowrap; }
@media (orientation: landscape) and (max-height: 620px) { .hud-stats .chip small { font-size: 12px; } .hud-stats .chip { padding: 0 8px; } }
@media (orientation: landscape) and (min-width: 1000px) and (min-height: 621px) {
  #s-game.on, #s-game.leave { grid-template-columns: minmax(200px, 250px) minmax(0, 1fr) minmax(150px, 190px); }
  body.left-handed #s-game.on { grid-template-columns: minmax(150px, 190px) minmax(0, 1fr) minmax(200px, 250px); }
  .hud-a { padding: 24px 10px 12px 26px; gap: 16px; } .hud-title strong { font-size: 32px; } .hud-title span { font-size: 16px; }
  .hud-stats { gap: 9px; } .hud-stats .chip { height: 44px; font-size: 17px; padding: 0 16px; border-radius: 22px; } .chip .i { width: 20px; height: 20px; }
  .hud-bar { margin: 8px 10px 0 26px; height: 6px; border-radius: 3px; }
  .hud-b { padding: 16px 26px 16px 10px; gap: 22px; } .tb.act { min-height: 86px; font-size: 16px; border-radius: 18px; } .tb.act .i { width: 30px; height: 30px; } .tb.act .ic { height: 32px; }
  #combo { padding: 7px 16px 8px; border-radius: 18px; } #combo b { font-size: 26px; } #combo i { width: 60px; height: 5px; }
  body.left-handed .hud-a { padding: 24px 26px 12px 10px; } body.left-handed .hud-b { padding: 16px 10px 16px 26px; } body.left-handed .hud-bar { margin: 8px 26px 0 10px; }
}

/* ---------- polish pass 3 ---------- */
#s-home .scroll { display: flex; flex-direction: column; }
.home-inner { width: 100%; margin: auto; }
@media (min-width: 600px) and (min-height: 700px) {
  .modal-card { width: min(100%, 560px); font-size: 17.5px; }
  .modal.small .modal-card { width: min(100%, 470px); }
  .modal.result h2 { font-size: 40px; } .res-stars .i { width: 58px; height: 58px; } .res-stats b { font-size: 23px; } .res-stats small { font-size: 14px; } .goals { font-size: 17px; }
  .modal .tb { min-height: 58px; font-size: 19px; } .modal .ghost { min-height: 54px; }
}


/* =====================================================================
   1.1 — Mahjong Wild
   ===================================================================== */
:root { --wild: #F6D46B; --leaf: #2E8F6B; --leaf-deep: #1A5E45; }

/* ---------- wordmark ---------- */
.logo { display: flex; flex-direction: column; align-items: center; line-height: 0.86; margin: 0; filter: drop-shadow(0 3px 0 rgba(4, 36, 40, 0.7)) drop-shadow(0 12px 26px rgba(0, 0, 0, 0.5)); }
.logo-a { font: 700 clamp(30px, 9.5vw, 54px)/1 var(--font-d); letter-spacing: 0.06em; text-transform: uppercase; color: var(--ivory); font-variation-settings: "SOFT" 100, "opsz" 72; animation: wordIn 0.9s cubic-bezier(0.2, 0.9, 0.2, 1) both; }
.logo-b { font: 900 clamp(92px, 31vw, 168px)/0.9 var(--font-d); letter-spacing: -0.03em; font-variation-settings: "SOFT" 100, "WONK" 1, "opsz" 144; font-style: italic;
  background: linear-gradient(180deg, #FFF6D8 10%, var(--wild) 48%, #F2A7B8 100%); -webkit-background-clip: text; background-clip: text; color: transparent; padding: 0 0.08em 0.06em; animation: wildIn 1s 0.12s cubic-bezier(0.2, 1.4, 0.4, 1) both; }
@keyframes wildIn { from { opacity: 0; transform: scale(0.6) rotate(-6deg); } }
.title-sub { margin-top: 10px; }
.title-corner { position: absolute; top: calc(10px + env(safe-area-inset-top, 0px)); right: calc(12px + env(safe-area-inset-right, 0px)); display: flex; gap: 8px; z-index: 2; }
#s-title { position: relative; }
.play-big { min-width: min(300px, 86vw); min-height: 76px !important; gap: 14px !important; border-radius: 20px !important; }
.play-big span { display: flex; flex-direction: column; align-items: flex-start; gap: 3px; }
.play-big b { font: 800 28px/1 var(--font-d); font-variation-settings: "SOFT" 100, "opsz" 72; }
.play-big small { font: 600 14px/1.1 var(--font); color: rgba(16, 36, 40, 0.66); }
#title-play { animation: wordIn 0.8s 0.9s both; }
.ghost.more { margin-top: 6px; min-height: 52px; padding: 0 22px; font-size: 17px; animation: wordIn 0.8s 1.05s both; }
#title-install { margin-top: 10px; min-height: 0; animation: wordIn 0.8s 1.15s both; display: grid; justify-items: center; }
.install-btn { min-height: 46px; color: var(--celadon); border-color: rgba(158, 216, 192, 0.5); }
.inapp-note { display: flex; gap: 10px; align-items: flex-start; text-align: left; max-width: 360px; padding: 10px 14px; border-radius: 14px; background: rgba(246, 212, 107, 0.14); border: 1px solid rgba(246, 212, 107, 0.5); color: var(--ivory); }
.inapp-note b { display: block; font-size: 15px; } .inapp-note small { display: block; color: var(--muted); margin-top: 2px; }
.brand-tile { display: inline-grid; place-items: center; width: 30px; height: 36px; border-radius: 8px; background: linear-gradient(165deg, #FFFDF5, #EFE2C4); color: #C42B22; box-shadow: 0 2px 0 var(--bone-2), 0 5px 0 var(--leaf); margin-bottom: 4px; }

/* ---------- play screen: slim bar ---------- */
.hud-a { gap: 8px; padding: 6px 10px 4px; }
.hud-a .hud-stats { flex: 1; max-width: none; display: flex; flex-wrap: nowrap; justify-content: space-around; gap: 4px; min-width: 0; }
.stat-cell { position: relative; display: flex; flex-direction: column; align-items: center; min-width: 0; flex: 1 1 0; padding: 2px 4px; border-radius: 12px; transition: background 0.3s; }
.stat-cell small { font-size: 12.5px; color: var(--muted); font-weight: 600; letter-spacing: 0.02em; line-height: 1.15; white-space: nowrap; }
.stat-cell b { font: 800 21px/1.12 var(--font-d); font-variant-numeric: tabular-nums lining-nums; color: var(--ivory); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; max-width: 100%; }
.stat-cell.name b { font-size: 18px; }
.stat-cell.score b { color: var(--wild); }
.stat-cell.score.glow b { animation: scoreGlow 0.6s ease-out; }
@keyframes scoreGlow { 30% { text-shadow: 0 0 14px rgba(246, 212, 107, 0.95), 0 0 2px #fff; transform: scale(1.12); } }
.stat-cell.on-streak::after { content: attr(data-streak); position: absolute; top: -2px; right: -6px; padding: 1px 6px; border-radius: 9px; font: 800 12.5px/1.3 var(--font); color: #2A1C2B; background: linear-gradient(160deg, #FFD1DC, #F27A9B); box-shadow: 0 0 12px rgba(127, 224, 196, 0.8); animation: comboIn 0.3s cubic-bezier(0.2, 1.6, 0.4, 1) both; }
.stat-cell.pairs b { color: var(--celadon); }
.stat-cell.warn b { color: #FF9C8A; } .stat-cell.time b { color: var(--celadon); }
.hud-a .chipbtn { width: 46px; height: 46px; }
#g-bar[hidden] { display: none; }

/* round thumb buttons */
.hud-b { align-items: flex-end; gap: clamp(18px, 7vw, 44px); padding: 6px 14px max(10px, env(safe-area-inset-bottom, 0px)); }
.rb { display: flex; flex-direction: column; align-items: center; gap: 5px; padding: 0; border: 0; background: none; color: var(--ivory); font: 700 13.5px/1 var(--font); }
.rb-face { --back: var(--leaf); display: grid; place-items: center; width: 68px; height: 68px; border-radius: 50%; color: var(--ink);
  background: radial-gradient(circle at 38% 30%, #FFFFFF 0%, #FBF4E2 38%, #EADBB8 100%);
  box-shadow: inset 0 1px 0 #fff, inset 0 -3px 6px rgba(120, 90, 40, 0.18), 0 3px 0 var(--bone-2), 0 7px 0 var(--back), 0 8px 0 rgba(0, 0, 0, 0.35), 0 14px 18px rgba(0, 0, 0, 0.35);
  margin-bottom: 7px; transition: transform 0.08s ease, box-shadow 0.08s ease, filter 0.2s; }
.rb.primary .rb-face { --back: #C9A227; }
.rb.small .rb-face { width: 54px; height: 54px; }
.rb:active:not(:disabled) .rb-face { transform: translateY(5px); box-shadow: inset 0 1px 0 #fff, 0 1px 0 var(--bone-2), 0 2px 0 var(--back), 0 3px 0 rgba(0, 0, 0, 0.35), 0 5px 8px rgba(0, 0, 0, 0.3); }
.rb:disabled { opacity: 0.45; } .rb:disabled .rb-face { filter: saturate(0.3); }
.rb .lb { text-shadow: 0 1px 3px rgba(0, 0, 0, 0.6); }
.rb.glow .rb-face { animation: rbGlow 1.2s ease-in-out infinite; }
@keyframes rbGlow { 50% { box-shadow: inset 0 1px 0 #fff, 0 3px 0 var(--bone-2), 0 7px 0 var(--back), 0 0 0 8px rgba(158, 216, 192, 0.55), 0 0 30px rgba(158, 216, 192, 0.85); } }
body.left-handed .hud-b { flex-direction: row-reverse; }
body.large-tiles .rb-face { width: 60px; height: 60px; } body.large-tiles .rb.small .rb-face { width: 50px; height: 50px; }

/* notices in play sit just under the bar, never over it */
body[data-screen="game"] #toasts { top: calc(66px + env(safe-area-inset-top, 0px)); }

/* ---------- level complete ---------- */
.modal.complete .modal-card { text-align: center; padding-top: 20px; }
.home-x { left: 12px; right: auto; }
.cp-word { font: 900 clamp(46px, 14vw, 64px)/1 var(--font-d) !important; font-style: italic; letter-spacing: -0.02em; margin: 4px 0 2px; font-variation-settings: "SOFT" 100, "WONK" 1, "opsz" 144;
  background: linear-gradient(180deg, #FFF6D8 10%, var(--wild) 55%, #F2A7B8 100%); -webkit-background-clip: text; background-clip: text; color: transparent; animation: wildIn 0.8s cubic-bezier(0.2, 1.5, 0.4, 1) both; padding: 0 0.1em 0.06em; }
.cp-score { display: grid; justify-items: center; margin: 6px 0 2px; }
.cp-score small { color: var(--muted); font-weight: 600; }
.cp-score b { font: 800 40px/1.05 var(--font-d); color: var(--wild); font-variant-numeric: tabular-nums lining-nums; }
.cp-score.glow b { animation: scoreGlow 0.7s ease-out; }
.cp-score em { font-style: normal; color: var(--celadon); font-weight: 700; font-size: 14px; }
.gift-row { display: flex; align-items: center; gap: 10px; margin: 16px 4px 4px; }
.gift-bar { flex: 1; display: grid; grid-template-columns: repeat(10, 1fr); gap: 4px; }
.gift-bar i { height: 12px; border-radius: 6px; background: rgba(246, 238, 220, 0.14); }
.gift-bar i.on { background: linear-gradient(90deg, var(--celadon), var(--wild)); box-shadow: 0 0 8px rgba(246, 212, 107, 0.45); }
.gift-bar.fill i.on { animation: segIn 0.35s both; } .gift-bar.fill i.on:nth-child(n) { animation-delay: calc(var(--d, 0) * 1ms); }
@keyframes segIn { from { transform: scaleY(0.2); opacity: 0.2; } }
.gift-box { display: grid; place-items: center; width: 52px; height: 52px; border-radius: 15px; flex: none; color: #7A2E18; background: linear-gradient(165deg, #FFE9A8, #F2B544); box-shadow: 0 3px 0 #B9822A, 0 8px 14px rgba(0, 0, 0, 0.35); }
.gift-box.ready { animation: giftBob 1.1s ease-in-out infinite; box-shadow: 0 3px 0 #B9822A, 0 0 0 6px rgba(246, 212, 107, 0.35), 0 0 26px rgba(246, 212, 107, 0.8); }
.gift-box.shake { animation: giftShake 0.12s linear infinite; }
@keyframes giftBob { 50% { transform: translateY(-4px) rotate(-4deg); } }
@keyframes giftShake { 25% { transform: rotate(-9deg) scale(1.08); } 75% { transform: rotate(9deg) scale(1.08); } }
.gift-note { color: var(--muted); font-size: 14.5px; }
.gift-open { margin-top: 14px; padding: 12px; border-radius: 16px; background: rgba(246, 212, 107, 0.1); border: 1px solid rgba(246, 212, 107, 0.45); animation: cardIn 0.5s cubic-bezier(0.2, 1.3, 0.3, 1) both; }
.gift-item { display: flex; align-items: center; gap: 12px; text-align: left; margin-top: 8px; }
.gift-item b { display: block; } .gift-item small { color: var(--muted); display: block; line-height: 1.3; }
.gift-pics { display: flex; gap: 4px; flex: none; }
.modal.complete .tb.big.wide { margin-top: 18px; min-height: 72px; font-size: 26px; font-family: var(--font-d); }
.ghost.small.again { margin: 4px auto 2px; color: var(--muted); border-color: transparent; background: none; }

/* ---------- what's new ---------- */
.news { list-style: none; margin: 14px 0 6px; padding: 0; display: grid; gap: 11px; text-align: left; }
.news li { display: flex; gap: 12px; align-items: flex-start; }
.news-ic { display: grid; place-items: center; width: 40px; height: 40px; flex: none; border-radius: 12px; color: var(--ink); background: linear-gradient(165deg, #FFFDF5, #EFE2C4); box-shadow: 0 2px 0 var(--bone-2), 0 4px 0 var(--leaf); }
.news b { display: block; font-size: 16.5px; } .news small b { display: inline; font-size: inherit; color: var(--ivory); } .news small { display: block; color: var(--muted); font-size: 14.5px; line-height: 1.35; margin-top: 1px; }
.modal.whatsnew .modal-card { text-align: center; }
.modal.whatsnew .tb.big { margin-top: 14px; }

/* ---------- install guide ---------- */
.guide { list-style: none; margin: 14px 0 0; padding: 0; display: grid; gap: 14px; }
.guide li { display: flex; gap: 12px; align-items: flex-start; }
.guide-n { display: grid; place-items: center; width: 34px; height: 34px; flex: none; border-radius: 50%; background: var(--wild); color: var(--ink); font: 800 18px var(--font-d); }
.guide b { display: block; font-size: 17px; } .guide small { display: block; color: var(--muted); margin: 2px 0 8px; }
.guide-pic { display: block; width: 100%; max-width: 260px; border-radius: 14px; }
.install-row #set-install-box { margin-top: 8px; display: grid; justify-items: start; }

/* small segmented choice in settings */
.seg.mini { display: flex; padding: 3px; gap: 3px; border-radius: 13px; background: rgba(246, 238, 220, 0.08); border: 1px solid var(--hair); flex: none; }
.seg.mini button { border: 0; background: none; color: var(--muted); font-weight: 700; font-size: 14px; padding: 9px 11px; border-radius: 10px; min-height: 40px; }
.seg.mini button.on { background: var(--ivory); color: var(--ink); }
.about p + p { margin-top: 0; }

/* ---------- larger screens and sideways phones ---------- */
@media (min-width: 600px) {
  .hud-a { padding: 10px 20px 6px; } .stat-cell b { font-size: 26px; } .stat-cell small { font-size: 14px; }
  .rb-face { width: 80px; height: 80px; } .rb.small .rb-face { width: 62px; height: 62px; } .rb { font-size: 15px; }
  .hud-b { padding-bottom: 16px; }
}
@media (orientation: landscape) and (max-height: 620px), (orientation: landscape) and (min-width: 1000px) {
  .hud-a { flex-direction: column; align-items: stretch; }
  .hud-a .hud-stats { flex: none; flex-direction: column; align-items: stretch; gap: 8px; }
  .stat-cell { flex-direction: row; justify-content: space-between; align-items: baseline; padding: 6px 12px; background: rgba(10, 50, 58, 0.6); border: 1px solid rgba(216, 178, 106, 0.2); }
  .stat-cell.on-streak::after { top: -8px; right: -4px; }
  .hud-a { position: relative; }
  .hud-a #g-pause, .hud-a #g-back, .hud-a #g-zoom { position: static; }
  .hud-b { flex-direction: column; align-items: center; justify-content: center; gap: 12px; }
  body.left-handed .hud-b { flex-direction: column; }
}
@media (orientation: landscape) and (max-height: 620px) {
  .rb-face { width: 56px; height: 56px; margin-bottom: 5px; } .rb.small .rb-face { width: 46px; height: 46px; } .rb { font-size: 12px; gap: 3px; }
  .stat-cell b { font-size: 17px; } .stat-cell { padding: 3px 8px; }
  .hud-a { gap: 6px; }
}
@media (max-height: 640px) and (orientation: portrait) { .logo-b { font-size: clamp(70px, 24vw, 110px); } .play-big { min-height: 64px !important; } }
@media (orientation: landscape) and (max-height: 480px) { .logo { flex-direction: row; gap: 14px; align-items: baseline; } .logo-b { font-size: 64px; } .logo-a { font-size: 30px; } .ghost.more { margin-top: 2px; } }
@media (min-width: 900px) and (min-height: 700px) { .play-big { min-width: 340px; } }
#title-play.play-big { min-width: min(320px, 86vw); min-height: 76px; }
@media (min-width: 900px) and (min-height: 700px) { #title-play.play-big { min-width: 360px; min-height: 88px; } #title-play.play-big b { font-size: 34px; } #title-play.play-big small { font-size: 16px; } .ghost.more { min-height: 58px; font-size: 18px; padding: 0 28px; } }
/* in play, a notice is a single compact line under the bar */
body[data-screen="game"] .toast { max-width: min(440px, calc(100vw - 24px)); }
body[data-screen="game"] .toast.long small { font-size: 13px; }
.home-top .brand span:last-child { white-space: nowrap; }
@media (max-width: 400px) { .home-top .brand { font-size: 19px; gap: 7px; } .level-chip span small { display: none; } }
.set-row.stack { flex-direction: column; align-items: stretch; gap: 10px; }
.set-row.stack .seg.mini { align-self: flex-start; }
.set-row.stack .seg.mini button { padding: 9px 18px; font-size: 15px; }

/* =====================================================================
   1.2 — the Crisp refresh: deep teal pond, polished ivory, restrained gold, jade-green button backs.
   One light source (upper left). Gold is for rewards; sparkles only on matches, wins and a slow title glint.
   ===================================================================== */
:root { --gold: #F6CF5A; --gold-deep: #A8661A; --mint: #8FE3CF; --pond: #0D4650; --pond-2: #17616B; --btn-back: #178A4A; --sq: #1F5F66; --sq-line: #9CC7C2; }
#bg { background: #0B3A44; }
#scrim { background: radial-gradient(120% 90% at 50% 40%, rgba(4, 28, 34, 0.05), rgba(4, 28, 34, 0.45)); }
body[data-screen="title"] #scrim { background: radial-gradient(110% 80% at 50% 40%, rgba(4, 28, 34, 0), rgba(4, 28, 34, 0.35)); }
body[data-screen="game"] #scrim { background: linear-gradient(180deg, rgba(4, 28, 34, 0.72) 0, rgba(4, 28, 34, 0) 110px, rgba(4, 28, 34, 0) calc(100% - 180px), rgba(4, 28, 34, 0.75) 100%), radial-gradient(95% 75% at 50% 50%, rgba(4, 28, 34, 0.05), rgba(4, 28, 34, 0.4)); }
body[data-screen="game"][data-mode="zen"] #scrim { background: radial-gradient(95% 75% at 50% 50%, rgba(4, 28, 34, 0.08), rgba(4, 28, 34, 0.5)); }

/* square teal buttons (top corners) */
.chipbtn { width: 52px; height: 52px; border-radius: 16px; background: var(--sq); border: 2px solid var(--sq-line); color: #F4FBF9; box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.15), 0 4px 10px rgba(0, 0, 0, 0.25); }
.chipbtn .i { stroke-width: 2.6; }

/* ivory buttons stand on a jade-green base */
.tb { --back: var(--btn-back); }
.tb.primary { --back: var(--btn-back); }

/* ---------- title ---------- */
#s-title { justify-content: stretch; }
#s-title .title-wrap { flex: 1; width: 100%; max-width: 560px; margin: 0 auto; justify-content: space-between; padding: calc(64px + env(safe-area-inset-top, 0px)) 22px max(14px, env(safe-area-inset-bottom, 0px)); min-height: 0; }
.title-top { display: flex; flex-direction: column; align-items: center; flex: 1; justify-content: center; min-height: 0; }
.title-bottom { display: flex; flex-direction: column; align-items: center; width: 100%; padding-top: 10px; }
.t-hero { position: relative; width: calc(var(--hw) * 2.25); height: calc(var(--hw) * 1.62); margin: 0 auto 6px; flex: none; animation: wordIn 0.9s both; }
.t-hero::before { content: ""; position: absolute; inset: -30% -25%; background: radial-gradient(closest-side, rgba(140, 240, 220, 0.22), rgba(140, 240, 220, 0)); pointer-events: none; }
.hero-tile { position: absolute; top: 0; line-height: 0; filter: drop-shadow(5px 10px 12px rgba(0, 18, 22, 0.5)); }
.hero-tile canvas { display: block; }
.hero-tile.ht0 { left: 0; transform: rotate(-10deg); transform-origin: 70% 90%; }
.hero-tile.ht1 { right: 0; top: 4%; transform: rotate(9deg); transform-origin: 30% 90%; }
.glint { position: absolute; z-index: 2; transform: translate(-50%, -50%) scale(0); opacity: 0; filter: drop-shadow(0 0 4px rgba(255, 220, 120, 0.9)); pointer-events: none; }
.t-hero .glint { animation: titleGlint 9s var(--gd, 0s) ease-in-out infinite; }
@keyframes titleGlint { 0%, 88%, 100% { opacity: 0; transform: translate(-50%, -50%) scale(0) rotate(0); } 93% { opacity: 1; transform: translate(-50%, -50%) scale(1) rotate(45deg); } }
.logo { filter: drop-shadow(0 3px 0 rgba(4, 30, 34, 0.55)) drop-shadow(0 10px 22px rgba(0, 0, 0, 0.4)); line-height: 0.9; }
.logo-a { font: 700 clamp(26px, 8vw, 44px)/1 var(--font-d); letter-spacing: 0.32em; margin-right: -0.32em; color: #FBF3DE; font-variation-settings: "SOFT" 0, "opsz" 72; }
.logo-b { font: 900 clamp(84px, 27vw, 150px)/0.95 var(--font-d); font-style: italic; letter-spacing: -0.02em;
  background: linear-gradient(180deg, #FFF3BF 8%, #F6CF5A 46%, #E3A62E 78%, #C9861F 100%); -webkit-background-clip: text; background-clip: text; color: transparent;
  filter: drop-shadow(0 2px 0 #8A5A12) drop-shadow(0 0 1px #7A4A0A); padding: 0 0.1em 0.08em; }
.title-sub { font: 500 clamp(17px, 4.9vw, 22px)/1.2 var(--font); color: #CFEDE6; letter-spacing: 0.01em; margin-top: 8px; }
.play-big { width: 100%; max-width: 440px; min-height: 84px !important; justify-content: flex-start !important; padding: 0 22px !important; gap: 16px !important; border-radius: 26px !important; background: linear-gradient(180deg, #FFFEF8, #F1E6CB) !important; }
.play-big .play-dot { display: grid; flex-direction: row; align-items: center; justify-content: center; place-items: center; width: 50px; height: 50px; border-radius: 50%; background: #1E8E4C; color: #FFFFFF; flex: none; box-shadow: inset 0 -3px 0 rgba(0, 0, 0, 0.18); }
.play-dot .i { fill: currentColor; stroke-width: 1.5; margin-left: 3px; }
.play-big b { font: 800 clamp(27px, 8vw, 34px)/1 var(--font-d); color: #13262A; font-variation-settings: "SOFT" 0, "opsz" 72; letter-spacing: -0.01em; }
.play-big small { font: 600 15.5px/1.1 var(--font); color: rgba(19, 38, 42, 0.62); margin-top: 2px; }
#title-play.play-big { min-width: 0; }
.ghost.more { width: 76%; max-width: 330px; min-height: 58px; margin-top: 12px; border-radius: 18px; font-size: 18px; font-weight: 700; background: rgba(255, 255, 255, 0.07); border: 1.5px solid rgba(156, 199, 194, 0.45); color: #F4FBF9; }
#s-title .fine { margin-top: 16px; color: rgba(207, 237, 230, 0.78); font-size: 14px; }
.title-corner .chipbtn { background: rgba(31, 95, 102, 0.55); border-color: rgba(156, 199, 194, 0.4); }
@media (max-height: 700px) and (orientation: portrait) { .play-big { min-height: 72px !important; } .ghost.more { min-height: 50px; margin-top: 8px; } #s-title .fine { margin-top: 10px; } #s-title .title-wrap { padding-top: calc(58px + env(safe-area-inset-top, 0px)); } }
@media (orientation: landscape) and (max-height: 620px) {
  #s-title .title-wrap { flex-direction: row; align-items: center; justify-content: center; gap: 28px; max-width: 900px; padding-top: 16px; }
  .title-top { flex: 0 1 auto; } .title-bottom { flex: 0 1 380px; }
  .t-hero { display: none; }
}
@media (min-width: 900px) and (min-height: 700px) { #s-title .title-wrap { max-width: 620px; } }
/* wide screens that aren't tall enough for the stacked title (laptops, tablets on their side): logo left, buttons right */
@media (orientation: landscape) and (min-height: 621px) and (max-height: 820px) {
  #s-title .title-wrap { flex-direction: row; align-items: center; justify-content: center; gap: 56px; max-width: 1040px; padding-top: 20px; }
  .title-top { flex: 0 1 auto; } .title-bottom { flex: 0 1 420px; padding-top: 0; }
}

/* ---------- play screen ---------- */
.hud-a { padding: 10px 14px 6px; gap: 6px; align-items: center; }
.stat-cell { padding: 2px 2px; }
.stat-cell small { font: 700 13.5px/1.2 var(--font); text-transform: uppercase; letter-spacing: 0.1em; color: #CFE3E0; }
.stat-cell b { font: 800 29px/1.1 var(--font); color: #FFFFFF; font-variant-numeric: tabular-nums lining-nums; }
.stat-cell.name b { font-size: 20px; }
.stat-cell.score b { color: var(--gold); }
.stat-cell.pairs b, .stat-cell.time b { color: var(--mint); }
/* polish 5: the streak badge sits beside the score, clear of the word "Score" */
.stat-cell.on-streak::after { top: auto; bottom: 4px; right: -8px; color: #13262A; background: linear-gradient(160deg, #FFF1B0, #F6C445); box-shadow: 0 0 10px rgba(246, 196, 69, 0.7); font-size: 12px; }
@media (orientation: portrait) { .stat-cell.on-streak::after { bottom: -13px; right: auto; left: 50%; translate: -50% 0; } }
@media (max-width: 380px) { .stat-cell small { font-size: 12px; letter-spacing: 0.06em; } .stat-cell b { font-size: 25px; } .hud-a .chipbtn { width: 46px; height: 46px; } }
.hud-a .chipbtn { width: 52px; height: 52px; }
/* round thumb buttons: all three the same size, ivory on a green base, bolder icons */
.hud-b { gap: clamp(22px, 9vw, 52px); padding: 6px 14px max(14px, env(safe-area-inset-bottom, 0px)); }
.rb { font: 700 17px/1 var(--font); color: #F4FBF9; gap: 8px; }
.rb-face, .rb.small .rb-face { width: 74px; height: 74px; color: #0E3B44; background: linear-gradient(180deg, #FFFEF8, #EFE4C8);
  box-shadow: inset 0 2px 0 #fff, 0 0 0 1.5px rgba(120, 95, 50, 0.3), 0 5px 0 var(--btn-back), 0 9px 14px rgba(0, 0, 0, 0.35); margin-bottom: 5px; }
.rb.primary .rb-face { --back: var(--btn-back); }
.rb-face .i { stroke-width: 2.6; }
.rb:active:not(:disabled) .rb-face { transform: translateY(4px); box-shadow: inset 0 2px 0 #fff, 0 0 0 1.5px rgba(120, 95, 50, 0.3), 0 1px 0 var(--btn-back), 0 3px 6px rgba(0, 0, 0, 0.3); }
@keyframes rbGlow { 50% { box-shadow: inset 0 2px 0 #fff, 0 5px 0 var(--btn-back), 0 0 0 8px rgba(56, 214, 180, 0.5), 0 0 30px rgba(56, 214, 180, 0.8); } }
body.large-tiles .rb-face, body.large-tiles .rb.small .rb-face { width: 64px; height: 64px; }
@media (min-width: 600px) { .rb-face, .rb.small .rb-face { width: 84px; height: 84px; } .stat-cell b { font-size: 32px; } .stat-cell small { font-size: 14.5px; } }
@media (orientation: landscape) and (max-height: 620px) { .rb-face, .rb.small .rb-face { width: 58px; height: 58px; } .rb { font-size: 13px; } .stat-cell b { font-size: 20px; } .stat-cell small { font-size: 11.5px; } .chipbtn, .hud-a .chipbtn { width: 46px; height: 46px; } }
@media (orientation: landscape) and (max-height: 620px), (orientation: landscape) and (min-width: 1000px) { .stat-cell { background: rgba(10, 50, 58, 0.7); border-color: rgba(156, 199, 194, 0.3); } }
body[data-screen="game"] #toasts { top: calc(78px + env(safe-area-inset-top, 0px)); }

/* ---------- cards: teal with a gold hairline ---------- */
.modal { background: rgba(2, 20, 24, 0.62); }
.modal-card.tray, .modal .tray { background: linear-gradient(180deg, #16606A 0%, #0F4D56 55%, #0C434B 100%); border: 1.5px solid rgba(214, 180, 96, 0.75); box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.12), 0 18px 40px rgba(0, 0, 0, 0.45); }
.res-kicker { color: var(--mint); }

/* ---------- level complete ---------- */
.modal.complete .modal-card { position: relative; overflow: visible; border-radius: 30px; padding: 26px 22px 18px; }
.modal.complete .modal-card { overflow-y: auto; }
.modal.complete .res-kicker { font: 700 15px/1.2 var(--font); letter-spacing: 0.22em; text-transform: uppercase; color: var(--mint); }
.cp-word { font: 900 clamp(46px, 14.5vw, 70px)/1.02 var(--font-d) !important; font-style: italic; letter-spacing: -0.015em;
  background: linear-gradient(180deg, #FFF3BF 8%, #F6CF5A 48%, #E3A62E 80%, #C9861F 100%) !important; -webkit-background-clip: text !important; background-clip: text !important; color: transparent;
  filter: drop-shadow(0 2px 0 #7A4A0A); margin: 6px 0 4px; }
.cp-stars { gap: 4px; margin: 10px 0 4px; align-items: flex-end; }
.cp-stars i { width: 76px; height: 76px; transform: scale(0.85); color: inherit; display: block; }
.cp-stars i:nth-child(2) { width: 96px; height: 96px; transform: translateY(-10px) scale(0.85); }
.cp-stars i svg { display: block; filter: grayscale(1) brightness(0.55); opacity: 0.35; transition: filter 0.3s, opacity 0.3s; }
.cp-stars i.on svg { filter: drop-shadow(0 4px 6px rgba(0, 0, 0, 0.3)); opacity: 1; }
.cp-stars i.on { transform: scale(1); filter: none; }
.cp-stars i.on:nth-child(2) { transform: translateY(-10px); }
.cp-score small { font: 700 15px/1.2 var(--font); letter-spacing: 0.16em; text-transform: uppercase; color: #CFE3E0; }
.cp-score b { font: 800 clamp(52px, 16vw, 72px)/1 var(--font-d); color: #FFE08A; text-shadow: 0 3px 0 rgba(90, 55, 8, 0.75); margin-top: 4px; }
.cp-chips { display: flex; flex-wrap: wrap; justify-content: center; gap: 10px; margin: 14px 0 2px; }
.cp-chip { display: inline-flex; align-items: center; gap: 8px; padding: 9px 16px; border-radius: 22px; border: 1.5px solid rgba(214, 180, 96, 0.7); background: rgba(8, 40, 46, 0.35); color: #F4FBF9; font: 700 16.5px/1.1 var(--font); animation: cardIn 0.5s 1.2s both; }
.cp-chip .i { color: var(--gold); stroke-width: 3; }
.gift-row { margin: 18px 2px 4px; gap: 12px; }
.gift-bar { gap: 6px; }
.gift-bar i { height: 16px; border-radius: 8px; background: rgba(255, 255, 255, 0.12); }
.gift-bar i.on { background: linear-gradient(180deg, #FFE9A0, #F6C445 60%, #E0A22E); box-shadow: 0 0 8px rgba(246, 207, 90, 0.5); }
.gift-box { width: 54px; height: 50px; background: none; box-shadow: none; border-radius: 0; color: inherit; }
.gift-box.ready { box-shadow: none; filter: drop-shadow(0 0 12px rgba(246, 212, 107, 0.9)); }
.gift-note { text-align: left; color: #E6F4F1; font-size: 16px; margin-top: 6px; }
.modal.complete .tb.big.wide { margin-top: 20px; min-height: 76px; font: 800 32px/1 var(--font-d); border-radius: 24px; color: #13262A; gap: 14px; }
.modal.complete .tb.big.wide .i { color: #178A4A; stroke-width: 3.2; }
.cp-links { display: flex; justify-content: center; align-items: center; gap: 18px; margin-top: 6px; }
.cp-links > i { width: 2px; height: 26px; background: rgba(207, 227, 224, 0.4); border-radius: 1px; }
.linkbtn { display: inline-flex; align-items: center; gap: 8px; min-height: 48px; padding: 0 8px; border: 0; background: none; color: #F4FBF9; font: 700 19px/1 var(--font); }
.linkbtn:active { opacity: 0.7; }
.modal.complete .glint { animation: cpGlint 1.6s var(--gd, 0s) ease-out 1 both; }
@keyframes cpGlint { 0% { opacity: 0; transform: translate(-50%, -50%) scale(0) rotate(0); } 35% { opacity: 1; transform: translate(-50%, -50%) scale(1.1) rotate(45deg); } 100% { opacity: 0.85; transform: translate(-50%, -50%) scale(0.9) rotate(90deg); } }

/* calm mode and reduce motion: no glints or sparkles at all */
body.calm .glint, body.reduce-motion .glint { display: none; }

/* 1.2 What's new: the little tile pair on top of the card */
.wn-hero { display: flex; justify-content: center; gap: 4px; margin: -4px 0 6px; --hw: 54px; }
.wn-hero .hero-tile { position: relative; left: auto; right: auto; top: auto; filter: drop-shadow(2px 5px 6px rgba(0, 18, 22, 0.5)); }
.wn-hero .hero-tile.ht0 { transform: rotate(-8deg); } .wn-hero .hero-tile.ht1 { transform: rotate(7deg); }
/* while a result card is up, trophy toasts drop to the bottom so they never cover the praise word or stars */
body:has(.modal.result:not(.out)) #toasts { top: auto; bottom: calc(14px + env(safe-area-inset-bottom, 0px)); }
/* landscape HUD (stat cells in a row): the streak badge sits on the corner, clear of the number */
@media (orientation: landscape) and (max-height: 620px), (orientation: landscape) and (min-width: 1000px) { .stat-cell.on-streak::after { top: -9px; bottom: auto; right: -6px; left: auto; translate: none; } }
/* phones on their side: keep the logo stacked and sized to the screen height so it never runs off the edge */
@media (orientation: landscape) and (max-height: 620px) {
  .logo { flex-direction: column; align-items: center; gap: 0; }
  .logo-a { font-size: clamp(20px, 6.5vh, 34px); }
  .logo-b { font-size: clamp(62px, 21vh, 120px); }
  .title-sub { font-size: 17px; }
  #s-title .title-wrap { gap: 40px; padding-left: 20px; padding-right: 20px; }
  .title-bottom { flex: 0 1 360px; min-width: 0; }
}
