/* «Слово дня» — веб-версия. Одна раскладка, три темы: значения приходят переменными (--bg, --c …) из ThemeTokens (C#),
   а украшения тем — классами .t-paper (газета), .t-candy (леденцы), .t-chalk (мел). Телефон — .ph, ПК — .pc. */

@font-face { font-family: 'Playfair Display'; src: url('../fonts/PlayfairDisplay.woff2') format('woff2'); font-weight: 400 900; font-display: swap; }
@font-face { font-family: 'IBM Plex Sans'; src: url('../fonts/IBMPlexSans.woff2') format('woff2'); font-weight: 100 700; font-display: swap; }
@font-face { font-family: 'Rubik'; src: url('../fonts/Rubik.woff2') format('woff2'); font-weight: 300 900; font-display: swap; }
@font-face { font-family: 'Caveat'; src: url('../fonts/Caveat.woff2') format('woff2'); font-weight: 400 700; font-display: swap; }
@font-face { font-family: 'Nunito'; src: url('../fonts/Nunito.woff2') format('woff2'); font-weight: 200 1000; font-display: swap; }

*, *::before, *::after { box-sizing: border-box; }
html, body { margin: 0; height: 100%; }
body { background: #F5F0E6; color: #1E1A15; font-family: 'IBM Plex Sans', system-ui, sans-serif; -webkit-tap-highlight-color: transparent; overscroll-behavior: none; }
button { font: inherit; color: inherit; cursor: pointer; }
button:disabled { cursor: default; opacity: .55; }
input { font: inherit; }
a { color: inherit; }

/* ---------- загрузка ---------- */
.boot { position: fixed; inset: 0; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 18px; background: #F5F0E6; }
.boot-title { font-family: 'Playfair Display', Georgia, serif; font-weight: 800; font-size: 44px; color: #1E1A15; }
.boot-rule { width: 220px; height: 3px; border-top: 3px solid #1E1A15; border-bottom: 1px solid #1E1A15; height: 7px; }
.boot-tiles { display: flex; gap: 6px; }
.boot-tiles i { width: 26px; height: 26px; border: 1.5px solid #CFC5B3; animation: boot 1.4s ease-in-out infinite; }
.boot-tiles i:nth-child(2) { animation-delay: .12s; } .boot-tiles i:nth-child(3) { animation-delay: .24s; }
.boot-tiles i:nth-child(4) { animation-delay: .36s; } .boot-tiles i:nth-child(5) { animation-delay: .48s; }
@keyframes boot { 40% { background: #2F6B45; border-color: #2F6B45; } 70% { background: #C8902A; border-color: #C8902A; } }
#blazor-error-ui { display: none; position: fixed; bottom: 0; left: 0; right: 0; padding: 12px 16px; background: #B0303C; color: #fff; z-index: 1000; }
#blazor-error-ui .reload { color: #fff; font-weight: 600; margin-left: 8px; }

/* ---------- корень ---------- */
.app { position: fixed; inset: 0; display: flex; flex-direction: column; background: var(--bg); color: var(--ink); font-family: var(--f-body), system-ui, sans-serif; overflow: hidden; }
.app ::selection { background: var(--p); color: var(--p-ink); }
.scroll { overflow-y: auto; overflow-x: hidden; -webkit-overflow-scrolling: touch; scrollbar-width: thin; scrollbar-color: var(--rule) transparent; }
.grow { flex: 1; min-height: 0; }
.muted { color: var(--ink2); }
.dim { color: var(--ink3); }
.ok { color: var(--c); }
.bad { color: var(--danger); }
.center { text-align: center; }
.row-flex { display: flex; align-items: center; gap: 10px; }
.col-flex { display: flex; flex-direction: column; gap: 10px; }
.head { font-family: var(--f-head), Georgia, serif; font-weight: var(--w-head); }
.caps { font-size: 11px; letter-spacing: .14em; text-transform: uppercase; color: var(--ink2); }
.t-candy .caps, .t-chalk .caps { letter-spacing: .02em; text-transform: none; font-size: 13px; font-weight: 700; }
.t-chalk .caps { font-family: 'Caveat', cursive; font-size: 20px; font-weight: 700; color: var(--ink2); }
.num { font-variant-numeric: tabular-nums; }

/* ---------- шапка страницы (телефон) ---------- */
.hdr { flex: none; height: 58px; padding: 0 10px; display: flex; align-items: center; gap: 6px; }
.hdr-title { flex: 1; min-width: 0; display: flex; flex-direction: column; }
.hdr-title .head { font-size: 24px; line-height: 1.1; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.hdr-title.center { align-items: center; }
.hdr-sub { font-size: 10.5px; letter-spacing: .14em; text-transform: uppercase; color: var(--ink2); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.t-candy .hdr-sub, .t-chalk .hdr-sub { letter-spacing: 0; text-transform: none; font-size: 12.5px; font-weight: 700; }
.t-chalk .hdr-title .head { font-size: 32px; }
.icon-btn { width: 44px; height: 44px; flex: none; border: 0; background: none; display: flex; align-items: center; justify-content: center; color: var(--ink); border-radius: 50%; }
.icon-btn:hover { background: color-mix(in srgb, var(--ink) 7%, transparent); }
.t-candy .icon-btn.boxed { background: var(--surface); border: var(--ow) solid var(--outline); box-shadow: 0 3px 0 var(--outline); }
.rule2 { flex: none; margin: 0 16px; border-top: 3px solid var(--ink); border-bottom: 1px solid var(--ink); height: 7px; }
.t-candy .rule2 { border: 0; height: 2px; background: repeating-linear-gradient(90deg, var(--outline) 0 10px, transparent 10px 16px); opacity: .25; }
.t-chalk .rule2 { border: 0; height: 6px; background: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='120' height='6'%3E%3Cpath d='M1 3c20-2 40 2 60-0.5s40-1 58 1' fill='none' stroke='%23F1EFE4' stroke-width='2' stroke-linecap='round' opacity='.7'/%3E%3C/svg%3E") repeat-x center; }
.pill { display: inline-flex; align-items: center; gap: 6px; height: 28px; padding: 0 11px; border: 1px solid var(--ink); border-radius: 999px; font-size: 12.5px; font-weight: 600; white-space: nowrap; background: none; }
.t-candy .pill { height: 34px; border: var(--ow) solid var(--outline); background: var(--surface); box-shadow: 0 3px 0 var(--outline); font-weight: 700; font-size: 14px; }
.t-candy .pill .coin { width: 14px; height: 14px; border-radius: 50%; background: #FFB020; border: 2px solid var(--outline); }
.t-chalk .pill { border: 2px dashed var(--ink2); border-radius: 12px 4px 12px 5px; font-weight: 700; }
.lang-btn { height: 30px; padding: 0 10px; border: 1px solid var(--ink); background: none; border-radius: 999px; font-size: 12px; font-weight: 600; color: var(--ink); }
.t-candy .lang-btn { background: var(--primary-ink); color: #fff; border: 0; height: 34px; font-weight: 700; }
.t-chalk .lang-btn { border: 2px dashed var(--ink2); border-radius: 10px 4px 10px 4px; }

/* ---------- разделитель с подписью ---------- */
.sec { display: flex; align-items: center; gap: 10px; margin: 16px 16px 4px; }
.sec .caps { white-space: nowrap; }
.sec::after { content: ''; flex: 1; border-top: 1px solid var(--ink); }
.t-candy .sec::after { border-top: 2px dotted var(--rule); }
.t-chalk .sec::after { border-top: 2px dashed var(--hair); }

/* ---------- карточки и кнопки ---------- */
.card { background: var(--surface); border: 1px solid var(--ink); }
.card.soft { border-color: var(--rule); }
.t-candy .card { border: var(--ow) solid var(--outline); border-radius: var(--r-card); box-shadow: 0 var(--lip) 0 var(--outline); }
.t-candy .card.soft { box-shadow: none; border-color: var(--rule); }
.t-chalk .card { background: transparent; border: 2.5px dashed var(--ink); border-radius: 22px 8px 26px 10px / 10px 24px 8px 22px; }
.t-chalk .card.soft { border: 2px dashed var(--hair); background: var(--surface); }
.btn { height: 48px; padding: 0 18px; border: 0; background: var(--primary); color: var(--primary-ink); font-weight: 600; font-size: 15px; display: inline-flex; align-items: center; justify-content: center; gap: 8px; border-radius: var(--r-btn-s); }
.btn.sm { height: 36px; font-size: 13.5px; padding: 0 12px; }
.btn.block { width: 100%; }
.btn2 { height: 48px; padding: 0 16px; background: none; border: 1px solid var(--ink); color: var(--ink); font-weight: 600; font-size: 15px; display: inline-flex; align-items: center; justify-content: center; gap: 8px; border-radius: var(--r-btn-s); }
.btn2.sm { height: 34px; font-size: 13px; padding: 0 12px; }
.t-candy .btn { border: var(--ow) solid var(--outline); box-shadow: 0 4px 0 var(--outline); border-radius: 16px; font-weight: 800; font-size: 17px; }
.t-candy .btn.sm { font-size: 14px; height: 36px; border-radius: 12px; box-shadow: 0 3px 0 var(--outline); white-space: nowrap; }
.t-candy .btn:active, .t-candy .btn2:active { transform: translateY(3px); box-shadow: 0 1px 0 var(--outline); }
.t-candy .btn2 { border: var(--ow) solid var(--outline); background: var(--surface); box-shadow: 0 4px 0 var(--outline); border-radius: 16px; font-weight: 700; }
.t-chalk .btn { border-radius: 14px 6px 16px 6px / 6px 16px 6px 14px; font-family: 'Caveat', cursive; font-weight: 700; font-size: 26px; }
.t-chalk .btn.sm { font-size: 21px; white-space: nowrap; }
.t-chalk .btn2 { border: 2px dashed var(--ink); border-radius: 14px 6px 16px 6px / 6px 16px 6px 14px; font-weight: 700; }
.link { background: none; border: 0; padding: 6px; color: var(--ink2); font-size: 13px; text-decoration: underline; text-underline-offset: 3px; }
.input { height: 42px; padding: 0 12px; border: 1px solid var(--key-border); background: var(--bg); color: var(--ink); font-size: 15px; outline: none; width: 100%; border-radius: var(--r-key); }
.input:focus { border-color: var(--ink); }
.t-candy .input { border: 2px solid var(--outline); border-radius: 12px; background: var(--surface); }
.t-chalk .input { border: 2px dashed var(--ink2); background: transparent; }
.field { display: flex; flex-direction: column; gap: 5px; font-size: 13px; font-weight: 600; }

/* ---------- сегменты, переключатели, ползунок ---------- */
.seg { display: flex; border: 1px solid var(--ink); }
.seg button { flex: 1; min-width: 0; height: 34px; border: 0; border-right: 1px solid var(--ink); background: var(--surface); color: var(--ink); font-size: 12.5px; padding: 0 6px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.seg button:last-child { border-right: 0; }
.seg button.on { background: var(--ink); color: var(--bg); font-weight: 600; }
.t-candy .seg { border: var(--ow) solid var(--outline); border-radius: 999px; overflow: hidden; }
.t-candy .seg button { border-right: 2px solid var(--outline); font-weight: 600; }
.t-candy .seg button.on { background: var(--primary-ink); color: #fff; }
.t-chalk .seg { border: 2px dashed var(--ink2); border-radius: 12px 5px 14px 6px / 6px 14px 5px 12px; overflow: hidden; }
.t-chalk .seg button { background: transparent; border-right: 2px dashed var(--hair); font-weight: 700; }
.t-chalk .seg button.on { background: var(--primary); color: var(--primary-ink); }
.tabs { display: flex; gap: 18px; font-size: 14px; }
.tabs button { border: 0; background: none; padding: 4px 0; color: var(--ink2); }
.tabs button.on { color: var(--ink); font-weight: 700; text-decoration: underline; text-underline-offset: 6px; text-decoration-thickness: 2px; }
.toggle { width: 44px; height: 26px; flex: none; padding: 0; border: 1px solid var(--ink); border-radius: 999px; position: relative; background: var(--surface); }
.toggle i { position: absolute; top: 3px; left: 3px; width: 18px; height: 18px; border-radius: 50%; background: var(--ink); transition: left .18s; }
.toggle.on { background: var(--ink); }
.toggle.on i { left: 21px; background: var(--bg); }
.t-candy .toggle { border: 2px solid var(--outline); }
.t-candy .toggle.on { background: var(--c); }
.t-chalk .toggle { border: 2px dashed var(--ink2); background: transparent; }
.t-chalk .toggle.on { background: var(--c); border-style: solid; border-color: var(--c); }
.t-chalk .toggle.on i { background: var(--c-ink); }
.slider { -webkit-appearance: none; appearance: none; width: 130px; height: 3px; background: var(--rule); outline: none; accent-color: var(--ink); }
.slider::-webkit-slider-thumb { -webkit-appearance: none; width: 16px; height: 16px; border-radius: 50%; background: var(--ink); cursor: pointer; }
.slider::-moz-range-thumb { width: 16px; height: 16px; border: 0; border-radius: 50%; background: var(--ink); cursor: pointer; }

/* ---------- клетки ---------- */
.board { display: flex; flex-direction: column; align-items: center; gap: var(--gap, 7px); }
.brow { display: flex; gap: var(--gap, 7px); }
.tile { width: var(--ts, 58px); height: var(--ts, 58px); flex: none; display: flex; align-items: center; justify-content: center;
  font-family: var(--f-tile), Georgia, serif; font-weight: var(--w-tile); font-size: calc(var(--ts, 58px) * var(--tile-scale)); line-height: 1;
  text-transform: uppercase; border: var(--tile-ebw) solid var(--tile-empty-border); background: var(--tile-empty); color: var(--tile-ink);
  border-radius: var(--r-tile); user-select: none; }
.t-chalk .tile { border-radius: var(--hand); }
.t-chalk .tile.e { border-style: dashed; }
.tile.t { border: var(--tile-bw) solid var(--tile-typed-border); background: var(--tile-typed); animation: pop .09s ease-out; }
.t-candy .tile.t, .t-candy .tile.c, .t-candy .tile.p, .t-candy .tile.a { border: var(--tile-bw) solid var(--outline); box-shadow: 0 var(--lip) 0 var(--outline); }
.tile.c { background: var(--c); color: var(--c-ink); border-color: var(--c); }
.tile.p { background: var(--p); color: var(--p-ink); border-color: var(--p); }
.tile.a { background: var(--a); color: var(--a-ink); border-color: var(--a); }
.t-candy .tile.c, .t-candy .tile.p, .t-candy .tile.a { border-color: var(--outline); }
.tile.sm { --ts: 34px; }
@keyframes pop { 50% { transform: scale(1.08); } }

/* открытие строки: до середины — набранная клетка, после — цвет отметки. Анимацию выбирает вещь магазина (data-flip) */
.tile.rv { --tb: var(--tile-typed); --tbd: var(--tile-typed-border); --tk: var(--tile-ink);
  animation-duration: var(--flip-ms, 300ms); animation-timing-function: ease-in-out; animation-fill-mode: both; animation-delay: calc(var(--i) * var(--flip-ms, 300ms) * .85); }
.tile.rv.c { --mb: var(--c); --mk: var(--c-ink); } .tile.rv.p { --mb: var(--p); --mk: var(--p-ink); } .tile.rv.a { --mb: var(--a); --mk: var(--a-ink); }
[data-flip="flip_turn"] .tile.rv { animation-name: flip-turn; }
[data-flip="flip_stamp"] .tile.rv { animation-name: flip-stamp; }
[data-flip="flip_chalk"] .tile.rv { animation-name: flip-chalk; }
[data-flip="flip_pixels"] .tile.rv { animation-name: flip-pixels; animation-timing-function: steps(6, end); }
[data-flip="flip_drop"] .tile.rv { animation-name: flip-drop; animation-timing-function: cubic-bezier(.3,1.4,.5,1); }
@keyframes flip-turn {
  0% { transform: rotateX(0); background: var(--tb); color: var(--tk); border-color: var(--tbd); }
  49.9% { transform: rotateX(90deg); background: var(--tb); color: var(--tk); border-color: var(--tbd); }
  50% { transform: rotateX(90deg); background: var(--mb); color: var(--mk); border-color: var(--mb); }
  100% { transform: rotateX(0); background: var(--mb); color: var(--mk); border-color: var(--mb); } }
@keyframes flip-stamp {
  0% { transform: scale(1.7) rotate(-8deg); opacity: 0; background: var(--mb); color: var(--mk); border-color: var(--mb); }
  70% { transform: scale(.94) rotate(1deg); opacity: 1; }
  100% { transform: scale(1) rotate(0); opacity: 1; background: var(--mb); color: var(--mk); border-color: var(--mb); } }
@keyframes flip-chalk {
  0% { clip-path: inset(0 100% 0 0); background: var(--mb); color: var(--mk); border-color: var(--mb); }
  100% { clip-path: inset(0 0 0 0); background: var(--mb); color: var(--mk); border-color: var(--mb); } }
@keyframes flip-pixels {
  0% { filter: blur(6px) contrast(3); opacity: .2; background: var(--mb); color: var(--mk); border-color: var(--mb); }
  100% { filter: none; opacity: 1; background: var(--mb); color: var(--mk); border-color: var(--mb); } }
@keyframes flip-drop {
  0% { transform: translateY(-140%); opacity: 0; background: var(--mb); color: var(--mk); border-color: var(--mb); }
  100% { transform: translateY(0); opacity: 1; background: var(--mb); color: var(--mk); border-color: var(--mb); } }
.brow.shk0 { animation: shake0 .42s; } .brow.shk1 { animation: shake1 .42s; }
@keyframes shake0 { 10%, 90% { transform: translateX(-2px); } 20%, 80% { transform: translateX(4px); } 30%, 50%, 70% { transform: translateX(-7px); } 40%, 60% { transform: translateX(7px); } }
@keyframes shake1 { 10%, 90% { transform: translateX(-2px); } 20%, 80% { transform: translateX(4px); } 30%, 50%, 70% { transform: translateX(-7px); } 40%, 60% { transform: translateX(7px); } }
.brow.won .tile { animation: hop .5s ease both; animation-delay: calc(var(--i) * 90ms + 200ms); }
@keyframes hop { 30% { transform: translateY(-14px); } 55% { transform: translateY(0); } 70% { transform: translateY(-4px); } }
.reduce .tile, .reduce .brow { animation: none !important; }

/* мини-доски: превью на главной, соперники */
.mini { display: flex; flex-direction: column; gap: var(--mg, 3px); }
.mini > div { display: flex; gap: var(--mg, 3px); }
.mini i { width: var(--ms, 16px); height: var(--ms, 16px); background: var(--tile-empty); border: 1px solid var(--tile-empty-border); }
.mini i.c { background: var(--c); border-color: var(--c); } .mini i.p { background: var(--p); border-color: var(--p); } .mini i.a { background: var(--a); border-color: var(--a); }
.t-candy .mini i { border-radius: 5px; border: 2px solid var(--outline); }
.t-chalk .mini i { border-radius: 6px 3px 7px 3px / 3px 7px 3px 6px; }

/* ---------- клавиатура ---------- */
.kb { flex: none; display: flex; flex-direction: column; align-items: center; gap: 7px; padding: 6px 4px 12px; user-select: none; }
.kb-row { display: flex; gap: 4px; width: 100%; justify-content: center; }
.key { flex: 1 1 0; max-width: var(--kw, 40px); min-width: 0; height: var(--kh, 50px); padding: 0; border: var(--key-bw) solid var(--key-border); border-radius: var(--r-key);
  background: var(--key-bg); color: var(--key-ink); font-weight: 600; font-size: 15px; text-transform: uppercase; display: flex; align-items: center; justify-content: center; position: relative; overflow: hidden; touch-action: manipulation; }
.key.wide { max-width: calc(var(--kw, 40px) * 1.7); flex-grow: 1.6; font-size: 11.5px; text-transform: none; }
.key.enter { background: var(--key-enter); color: var(--key-enter-ink); border-color: var(--key-enter); }
.key.c { background: var(--c); color: var(--c-ink); border-color: var(--c); }
.key.p { background: var(--p); color: var(--p-ink); border-color: var(--p); }
.key.a { background: var(--key-a); color: var(--key-a-ink); border-color: var(--key-a); }
.key:active { filter: brightness(.92); }
.t-candy .key { border: var(--key-bw) solid var(--outline); box-shadow: 0 var(--key-lip) 0 var(--outline); font-weight: 700; }
.t-candy .key:active { transform: translateY(2px); box-shadow: 0 1px 0 var(--outline); }
.t-candy .key.enter { font-weight: 800; }
.t-chalk .kb { background: var(--kb-bg); border-top: 4px solid var(--kb-edge); box-shadow: inset 0 6px 8px rgba(0,0,0,.25); padding-top: 12px; }
.t-chalk .key { border: 0; border-radius: 6px 3px 7px 3px / 3px 7px 3px 6px; font-weight: 700; }
.key .q { position: absolute; inset: 0; display: grid; grid-template-columns: 1fr 1fr; grid-template-rows: 1fr 1fr; }
.key .q span.c { background: var(--c); } .key .q span.p { background: var(--p); } .key .q span.a { background: var(--a); }
.key .lbl { position: relative; z-index: 1; }
.key.quad .lbl { text-shadow: 0 0 3px var(--key-bg), 0 0 2px var(--key-bg); }
.hint-line { font-size: 12px; color: var(--ink2); text-align: center; padding: 2px 0 4px; }

/* ---------- Ава ---------- */
.ava { display: flex; gap: 12px; align-items: flex-start; padding: 10px 14px; background: var(--surface); border: 1px solid var(--rule); }
.ava-av { width: 30px; height: 30px; flex: none; border-radius: 50%; overflow: hidden; box-sizing: border-box; display: flex; align-items: center; justify-content: center; }
.ava-av img { width: 100%; height: 100%; display: block; border-radius: 50%; object-fit: cover; }
.ava-body { display: flex; flex-direction: column; gap: 2px; min-width: 0; }
.ava-text { font-family: var(--f-head), serif; font-style: italic; font-weight: 600; font-size: 16px; line-height: 1.3; }
.ava.btn-like { cursor: pointer; text-align: left; width: 100%; color: var(--ink); }
.t-candy .ava { border: var(--ow) solid var(--outline); border-radius: 18px 18px 18px 4px; box-shadow: 0 4px 0 var(--outline); background: var(--surface); }
.t-candy .ava-av { border: 2.5px solid var(--outline); width: 38px; height: 38px; }
.t-candy .ava-text { font-style: normal; font-weight: 500; font-size: 15px; }
.t-candy .ava .caps { color: var(--accent); }
.t-chalk .ava { background: transparent; border: 2px dashed var(--accent); border-radius: 24px 10px 28px 12px / 12px 26px 10px 24px; align-items: center; }
.t-chalk .ava-av { border: 2px solid var(--accent); }
.t-chalk .ava-text { font-style: normal; font-size: 22px; font-weight: 600; line-height: 1.1; }
.t-chalk .ava .caps { color: var(--accent); }

/* ---------- нижние вкладки ---------- */
.tabbar { flex: none; height: 66px; display: flex; border-top: 3px double var(--ink); background: var(--bg); padding-bottom: env(safe-area-inset-bottom); }
.tabbar button { flex: 1; border: 0; background: none; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 4px; font-size: 11px; color: var(--ink2); }
.tabbar button.on { color: var(--ink); font-weight: 600; box-shadow: inset 0 3px 0 var(--ink); }
.t-candy .tabbar { margin: 0 14px 14px; border: var(--ow) solid var(--outline); border-radius: 22px; box-shadow: 0 4px 0 var(--outline); background: var(--surface); padding: 0 6px; height: 64px; align-items: center; }
.t-candy .tabbar button { height: 48px; border-radius: 16px; font-weight: 500; color: var(--ink); }
.t-candy .tabbar button.on { box-shadow: none; background: var(--primary); border: 2px solid var(--outline); font-weight: 700; }
.t-chalk .tabbar { height: 74px; background: var(--kb-bg); border-top: 4px solid var(--kb-edge); box-shadow: inset 0 6px 8px rgba(0,0,0,.25); }
.t-chalk .tabbar button { color: #E8D9C4; font-weight: 700; font-size: 12px; }
.t-chalk .tabbar button.on { color: var(--primary); box-shadow: none; }

/* ---------- главная ---------- */
.home { flex: 1; min-height: 0; display: flex; flex-direction: column; }
.mast { flex: none; padding: 16px 20px 0; display: flex; flex-direction: column; gap: 10px; }
.mast-top { display: flex; justify-content: space-between; align-items: center; }
.mast h1 { margin: 0; text-align: center; font-family: var(--f-head), serif; font-weight: var(--w-head); font-size: 50px; line-height: 1; letter-spacing: -.01em; }
.mast .rule2 { margin: 0; }
.mast-bot { display: flex; justify-content: space-between; align-items: center; }
.langs { display: flex; gap: 10px; font-size: 12px; letter-spacing: .12em; }
.langs button { border: 0; background: none; padding: 2px 0; color: var(--ink2); font-weight: 500; }
.langs button.on { color: var(--ink); font-weight: 700; text-decoration: underline; text-underline-offset: 3px; }
.t-candy .mast h1 { text-align: left; font-size: 36px; }
.t-candy .langs { border: 2px solid var(--outline); border-radius: 999px; overflow: hidden; gap: 0; letter-spacing: 0; }
.t-candy .langs button { padding: 4px 9px; font-weight: 700; color: var(--ink); }
.t-candy .langs button.on { background: var(--primary-ink); color: #fff; text-decoration: none; }
.t-chalk .mast h1 { text-align: left; font-size: 60px; line-height: .95; }
.mast h1.long { font-size: 40px; } .t-candy .mast h1.long { font-size: 32px; } .t-chalk .mast h1.long { font-size: 48px; }
.t-chalk .langs button.on { text-decoration: none; border-bottom: 3px solid var(--primary); }
.today-card { margin: 18px 20px 0; padding: 16px 18px 18px; display: flex; flex-direction: column; gap: 12px; }
.today-top { display: flex; justify-content: space-between; align-items: baseline; gap: 8px; }
.today-mid { display: flex; align-items: center; gap: 16px; }
.today-big { font-family: var(--f-head), serif; font-weight: 700; font-size: 22px; }
.t-chalk .today-big { font-size: 30px; }
.today-foot { display: flex; justify-content: space-between; align-items: center; gap: 8px; font-size: 13px; color: var(--ink2); }
.t-candy .today-foot { color: var(--ink); font-weight: 700; }
.modes { margin: 0 20px; display: flex; flex-direction: column; }
.mode { display: flex; align-items: center; gap: 14px; padding: 11px 0; border: 0; border-bottom: 1px solid var(--rule); background: none; text-align: left; color: var(--ink); width: 100%; }
.mode-ic { width: 34px; height: 34px; flex: none; border: 1px solid var(--ink); display: flex; align-items: center; justify-content: center; }
.mode-txt { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 1px; }
.mode-title { font-family: var(--f-head), serif; font-weight: 700; font-size: 18px; }
.mode-hint { font-size: 12.5px; color: var(--ink2); }
.mode-tag { font-size: 12px; font-weight: 600; color: var(--ink2); white-space: nowrap; }
.t-candy .modes { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.t-candy .mode { flex-direction: column; align-items: flex-start; gap: 8px; padding: 12px; border: var(--ow) solid var(--outline); border-radius: 20px; box-shadow: 0 4px 0 var(--outline); background: var(--surface); }
.t-candy .mode:last-child { grid-column: 1 / -1; flex-direction: row; align-items: center; }
.t-candy .mode-ic { width: 40px; height: 40px; border-radius: 12px; border: 2px solid var(--outline); background: var(--tint, #7EE0B5); }
.t-candy .mode-title { font-weight: 700; font-size: 16px; }
.t-candy .mode-tag { display: none; }
.t-chalk .mode { border-bottom: 2px dashed var(--hair); padding: 9px 4px; }
.t-chalk .mode-ic { border: 0; color: var(--accent); }
.t-chalk .mode-title { font-size: 26px; line-height: 1; }
.t-chalk .mode-tag { color: var(--primary); font-weight: 700; }

/* ---------- игра ---------- */
.game { flex: 1; min-height: 0; display: flex; flex-direction: column; }
.board-area { flex: 1; min-height: 0; container-type: size; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 8px; padding: 8px 0; }
.attempt-line { font-size: 12px; letter-spacing: .1em; text-transform: uppercase; color: var(--ink2); }
.t-candy .attempt-line, .t-chalk .attempt-line { letter-spacing: 0; text-transform: none; font-size: 13px; font-weight: 700; }
.t-chalk .attempt-line { font-family: 'Caveat', cursive; font-size: 22px; }
.msg { min-height: 20px; font-size: 13.5px; font-weight: 600; color: var(--danger); text-align: center; }
.ava-line { margin: 0 16px; }
.four-grid { flex: 1; min-height: 0; display: grid; grid-template-columns: 1fr 1fr; gap: 10px 14px; padding: 10px 18px 0; align-content: start; justify-items: center; }
.four-label { margin-top: 3px; font-size: 11.5px; font-weight: 600; color: var(--ink2); text-align: center; }
.four-label.ok { color: var(--c); }
.blitz-bar { margin: 0 16px; height: 4px; background: var(--rule); }
.blitz-bar i { display: block; height: 4px; background: var(--ink); transition: width .9s linear; }
.blitz-clock { height: 36px; padding: 0 12px; background: var(--ink); color: var(--bg); display: flex; align-items: center; gap: 8px; font-family: var(--f-head), serif; font-weight: 700; font-size: 22px; font-variant-numeric: tabular-nums; }
.blitz-clock.low { background: var(--danger); color: #fff; }
.t-candy .blitz-clock { border-radius: 999px; border: 2px solid var(--outline); background: var(--primary); color: var(--primary-ink); }
.t-chalk .blitz-clock { background: transparent; color: var(--primary); border: 2px dashed var(--primary); border-radius: 12px 5px 14px 6px; }
.trio { margin: 14px 20px 0; display: grid; grid-template-columns: repeat(3, 1fr); }
.trio > div { display: flex; flex-direction: column; padding-left: 14px; border-right: 1px solid var(--rule); }
.trio > div:first-child { padding-left: 0; }
.trio > div:last-child { border-right: 0; }
.trio b { font-family: var(--f-head), serif; font-weight: 800; font-size: 30px; line-height: 1; }
.trio span { font-size: 12px; color: var(--ink2); }
.chips { margin: 12px 16px 0; display: flex; gap: 6px; flex-wrap: wrap; }
.chip { height: 28px; padding: 0 10px; border: 1px solid var(--c); color: var(--c); display: inline-flex; align-items: center; gap: 6px; font-size: 12.5px; font-weight: 600; }
.chip b { font-family: var(--f-head), serif; letter-spacing: .04em; text-transform: uppercase; }
.chip.miss { border-color: var(--rule); color: var(--ink3); }
.t-candy .chip { border-radius: 999px; border-width: 2px; }
.t-chalk .chip { border-style: dashed; border-radius: 10px 4px 10px 4px; }

/* ---------- итог ---------- */
.result { flex: 1; min-height: 0; display: flex; flex-direction: column; }
.result-head { padding: 16px 20px 0; display: flex; flex-direction: column; align-items: center; gap: 4px; }
.result-kicker { font-size: 11px; letter-spacing: .16em; text-transform: uppercase; color: var(--c); font-weight: 600; }
.result-kicker.lost { color: var(--danger); }
.t-candy .result-kicker, .t-chalk .result-kicker { letter-spacing: 0; text-transform: none; font-size: 15px; font-weight: 800; }
.result-word { margin: 0; font-family: var(--f-head), serif; font-weight: 800; font-size: 60px; line-height: 1; letter-spacing: .06em; text-transform: uppercase; text-align: center; }
.t-chalk .result-word { font-size: 72px; letter-spacing: .02em; }
.dist { margin: 0 20px; display: flex; flex-direction: column; gap: 5px; }
.dist-row { display: flex; align-items: center; gap: 8px; font-size: 12px; }
.dist-row > span:first-child { width: 12px; color: var(--ink2); }
.dist-bar { height: 15px; min-width: 20px; background: var(--ink); color: var(--bg); font-size: 10.5px; display: flex; align-items: center; justify-content: flex-end; padding: 0 5px; }
.dist-bar.me { background: var(--c); color: var(--c-ink); }
.t-candy .dist-bar { border-radius: 6px; background: var(--primary-ink); }
.t-chalk .dist-bar { background: var(--ink2); color: var(--bg); border-radius: 3px 6px 3px 6px; }
.t-candy .dist-bar.me, .t-chalk .dist-bar.me { background: var(--c); color: var(--c-ink); }
.dist-bar.zero, .t-candy .dist-bar.zero, .t-chalk .dist-bar.zero { background: var(--rule); color: var(--ink2); }
.btn-pair { margin: 18px 16px 0; display: flex; gap: 10px; }
.btn-pair > * { flex: 1; }
.more { margin: 8px 16px 0; display: flex; gap: 8px; }
.more button { flex: 1; height: 40px; padding: 0 6px; border: 1px solid var(--rule); background: var(--surface); font-size: 13px; font-weight: 600; color: var(--ink); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.t-candy .more button { border: 2px solid var(--outline); border-radius: 14px; box-shadow: 0 3px 0 var(--outline); }
.t-chalk .more button { border: 2px dashed var(--hair); background: transparent; border-radius: 10px 4px 10px 4px; }
.next-line { padding: 14px 0 18px; text-align: center; font-size: 12px; color: var(--ink2); }

/* ---------- списки ---------- */
.list { margin: 0 16px; display: flex; flex-direction: column; }
.lrow { min-height: 44px; display: flex; align-items: center; gap: 12px; border-bottom: 1px solid var(--hair); font-size: 14px; padding: 6px 0; }
.lrow.big { min-height: 60px; border-bottom-color: var(--ink); }
.lrow .place { width: 30px; flex: none; font-weight: 600; color: var(--ink2); }
.lrow.big .place { font-family: var(--f-head), serif; font-weight: 800; font-size: 32px; line-height: 1; color: var(--ink); }
.lrow .who { flex: 1; min-width: 0; display: flex; flex-direction: column; }
.lrow .who b { font-weight: 600; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.lrow .meta { font-size: 12.5px; color: var(--ink2); white-space: nowrap; }
.lrow .val { font-family: var(--f-head), serif; font-weight: 700; font-size: 18px; font-variant-numeric: tabular-nums; }
.t-chalk .lrow { border-bottom: 2px dashed var(--hair); }
.me-bar { margin: 0 16px 16px; min-height: 52px; padding: 0 12px; background: var(--ink); color: var(--bg); display: flex; align-items: center; gap: 12px; font-size: 14px; }
.me-bar .place { font-family: var(--f-head), serif; font-weight: 800; font-size: 20px; min-width: 38px; }
.t-candy .me-bar { border-radius: 18px; background: var(--primary-ink); color: #fff; }
.t-chalk .me-bar { background: var(--surface); color: var(--ink); border: 2px dashed var(--primary); border-radius: 14px 6px 16px 6px; }
.empty { padding: 30px 20px; text-align: center; color: var(--ink2); font-size: 14px; line-height: 1.45; }

/* аватар и ник */
.av { width: var(--as, 32px); height: var(--as, 32px); flex: none; border-radius: 50%; display: inline-flex; align-items: center; justify-content: center; color: #fff; font-weight: 600; font-size: calc(var(--as, 32px) * .42); position: relative; }
.av.frame_gold { box-shadow: 0 0 0 2px var(--bg), 0 0 0 4px #C8902A; }
.av.frame_stamp { outline: 2px dashed var(--ink); outline-offset: 2px; border-radius: 4px; }
.av.frame_laurel { box-shadow: 0 0 0 2px var(--bg), 0 0 0 4px #2F6B45, 0 0 0 6px var(--bg), 0 0 0 7px #2F6B45; }
.av.frame_ink { box-shadow: 0 0 0 3px var(--ink); }

/* ---------- статистика ---------- */
.stat4 { margin: 14px 16px 0; display: grid; grid-template-columns: repeat(4, 1fr); }
.stat4 > div { display: flex; flex-direction: column; align-items: center; border-left: 1px solid var(--rule); }
.stat4 > div:first-child { border-left: 0; }
.stat4 b { font-family: var(--f-head), serif; font-weight: 800; font-size: 28px; line-height: 1.1; }
.stat4 span { font-size: 11.5px; color: var(--ink2); text-align: center; }
.cal { margin: 0 20px; display: grid; grid-template-columns: repeat(7, minmax(0, 1fr)); gap: 4px; }
.cal > span { height: 36px; display: flex; flex-direction: column; align-items: center; justify-content: center; line-height: 1.1; font-size: 11px; }
.cal .wd { height: auto; color: var(--ink2); }
.cal .d { border: 1px dashed var(--rule); color: var(--ink3); }
.cal .d.won { background: var(--c); color: var(--c-ink); border: 0; }
.cal .d.lost { border: 1px solid var(--key-border); color: var(--ink3); }
.cal .d.today { border: 2px solid var(--ink); background: var(--surface); color: var(--ink); }
.cal .d.today.won { background: var(--c); color: var(--c-ink); }
.cal .d b { font-size: 12px; }
.t-candy .cal .d { border-radius: 8px; }
.t-chalk .cal .d { border-radius: 6px 3px 7px 3px / 3px 7px 3px 6px; }
.pair { margin: 12px 16px 16px; display: flex; gap: 8px; }
.pair > div { flex: 1; padding: 8px 10px; display: flex; flex-direction: column; font-size: 12px; color: var(--ink2); }
.pair b { font-size: 14px; color: var(--ink); }

/* ---------- магазин ---------- */
.cats { flex: none; margin: 12px 0 0; padding: 0 16px; display: flex; gap: 6px; overflow-x: auto; scrollbar-width: none; }
.cats::-webkit-scrollbar { display: none; }
.cats button { height: 32px; padding: 0 12px; border: 1px solid var(--ink); background: none; font-size: 13px; white-space: nowrap; color: var(--ink); }
.cats button.on { background: var(--ink); color: var(--bg); font-weight: 600; }
.t-candy .cats button { border: 2px solid var(--outline); border-radius: 999px; font-weight: 600; }
.t-candy .cats button.on { background: var(--primary); color: var(--primary-ink); }
.t-chalk .cats button { border: 2px dashed var(--ink2); border-radius: 10px 4px 10px 4px; }
.t-chalk .cats button.on { background: var(--primary); color: var(--primary-ink); border-style: solid; border-color: var(--primary); }
.themes { padding: 0 16px; display: flex; gap: 10px; overflow-x: auto; scrollbar-width: none; }
.theme-card { width: 170px; flex: none; display: flex; flex-direction: column; }
.theme-card.trying { box-shadow: 0 0 0 3px var(--p); }
.theme-prev { height: 108px; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 4px; border-bottom: 1px solid var(--ink); }
.theme-body { padding: 10px; display: flex; flex-direction: column; gap: 8px; }
.theme-name { font-family: var(--f-head), serif; font-weight: 700; font-size: 18px; }
.shop-row { min-height: 54px; display: flex; align-items: center; gap: 10px; border-bottom: 1px solid var(--hair); padding: 6px 0; }
.shop-row .who { flex: 1; min-width: 0; display: flex; flex-direction: column; }
.shop-row .who b { font-weight: 600; font-size: 14.5px; }
.shop-row .who span { font-size: 12px; color: var(--ink2); }
.price { font-size: 12.5px; font-weight: 600; white-space: nowrap; }
.price.on { color: var(--c); }
.tryon { position: sticky; bottom: 0; margin: 12px 16px; padding: 10px 12px; display: flex; align-items: center; gap: 10px; background: var(--ink); color: var(--bg); }
.tryon span { flex: 1; font-size: 13.5px; }
.tryon button { height: 34px; padding: 0 12px; border: 1px solid var(--bg); background: none; color: var(--bg); font-weight: 600; font-size: 13px; }
.tryon button.main { background: var(--bg); color: var(--ink); }
.t-candy .tryon { border-radius: 18px; background: var(--primary-ink); }

/* ---------- комната ---------- */
.code-big { font-family: var(--f-head), serif; font-weight: 800; font-size: 44px; line-height: 1.05; letter-spacing: .18em; }
.rivals { margin: 12px 16px 0; display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.rival { padding: 8px 10px; display: flex; gap: 10px; align-items: center; min-width: 0; }
.rival .who { display: flex; flex-direction: column; min-width: 0; }
.rival .who b { font-weight: 600; font-size: 14px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.rival .score { font-family: var(--f-head), serif; font-weight: 700; font-size: 18px; }
.rival .st { font-size: 11.5px; color: var(--ink2); }
.rival .st.ok { color: var(--c); }
.rival.off { opacity: .55; }
.banner { margin: 10px 16px 0; padding: 7px 12px; border: 0; border-top: 1px solid var(--ink); border-bottom: 1px solid var(--ink); text-align: center; font-size: 13px; }
button.banner { display: block; cursor: pointer; }
.t-candy .banner { border: 2px solid var(--outline); border-radius: 14px; background: var(--surface); }
.t-chalk .banner { border-top: 2px dashed var(--hair); border-bottom: 2px dashed var(--hair); }
.free-slot { height: 42px; display: flex; align-items: center; gap: 12px; color: var(--ink3); font-size: 13.5px; }
.free-slot i { width: 32px; height: 32px; border-radius: 50%; border: 1.5px dashed var(--key-border); }
.setting-block { display: flex; flex-direction: column; gap: 5px; }
.setting-block > span { font-size: 13px; font-weight: 600; }

/* ---------- настройки ---------- */
.set-row { min-height: 48px; display: flex; align-items: center; gap: 10px; border-bottom: 1px solid var(--hair); padding: 5px 0; }
.set-row.stack { flex-wrap: wrap; padding: 8px 0 10px; }
.set-row.stack .who { flex-basis: 100%; }
.set-row.stack .seg { width: 100% !important; }
.set-row .who { flex: 1; min-width: 0; display: flex; flex-direction: column; }
.set-row .who b { font-weight: 500; font-size: 14.5px; }
.set-row .who span { font-size: 12px; color: var(--ink2); }
.set-row select { height: 32px; border: 1px solid var(--ink); background: var(--surface); color: var(--ink); font-size: 13px; padding: 0 6px; border-radius: var(--r-key); }

/* ---------- окна, всплывающие ---------- */
.toasts { position: fixed; left: 0; right: 0; bottom: 92px; display: flex; flex-direction: column; align-items: center; gap: 8px; pointer-events: none; z-index: 60; }
.toast { max-width: min(92vw, 420px); padding: 10px 16px; background: var(--ink); color: var(--bg); font-size: 14px; font-weight: 600; text-align: center; box-shadow: 0 6px 20px rgba(0,0,0,.18); animation: toast-in .18s ease-out; }
.t-candy .toast { border-radius: 16px; border: 2px solid var(--outline); background: var(--primary-ink); color: #fff; }
.t-chalk .toast { border-radius: 12px 5px 14px 6px; background: var(--primary); color: var(--primary-ink); }
@keyframes toast-in { from { transform: translateY(10px); opacity: 0; } }
.pc .toasts { bottom: 40px; }
.conn { position: fixed; top: 0; left: 0; right: 0; padding: 6px 12px; text-align: center; font-size: 13px; font-weight: 600; background: var(--danger); color: #fff; z-index: 70; }
.modal-back { position: fixed; inset: 0; background: rgba(20, 16, 12, .45); display: flex; align-items: center; justify-content: center; z-index: 80; padding: 16px; }
.modal { width: min(400px, 100%); max-height: 90vh; overflow-y: auto; background: var(--bg); color: var(--ink); padding: 18px; display: flex; flex-direction: column; gap: 12px; border: 1px solid var(--ink); }
.modal h2 { margin: 0; font-family: var(--f-head), serif; font-weight: var(--w-head); font-size: 26px; }
.t-candy .modal { border: var(--ow) solid var(--outline); border-radius: 24px; box-shadow: 0 6px 0 var(--outline); }
.t-chalk .modal { border: 2.5px dashed var(--ink); border-radius: 22px 8px 26px 10px / 10px 24px 8px 22px; }

/* ---------- эффекты победы ---------- */
.fx-layer { position: fixed; inset: 0; pointer-events: none; z-index: 90; overflow: hidden; }
.fx-confetti { position: absolute; top: -20px; animation: confetti linear forwards; }
@keyframes confetti { to { transform: translate(var(--dx), 110vh) rotate(var(--rot)); } }
.fx-spark { position: absolute; width: 6px; height: 6px; border-radius: 50%; opacity: 0; animation: spark 1.1s ease-out forwards; }
@keyframes spark { 0% { opacity: 1; transform: translate(0, 0); } 100% { opacity: 0; transform: translate(var(--x), calc(var(--y) + 40px)); } }
.fx-letter { position: absolute; top: -50px; font-family: var(--f-tile, serif); font-weight: 800; animation: letterfall ease-in forwards; }
@keyframes letterfall { to { transform: translateY(115vh) rotate(var(--rot)); } }
.fx-bubble { position: absolute; bottom: -60px; border-radius: 50%; border: 2px solid; background: rgba(255,255,255,.25); animation: bubble ease-out forwards; }
@keyframes bubble { to { transform: translate(var(--dx), -115vh); opacity: .2; } }
.fx-extra { position: absolute; left: 50%; top: 18%; width: min(88vw, 420px); transform: translateX(-50%) rotate(-3deg); background: #FBF8F2; color: #1E1A15; border: 3px double #1E1A15;
  padding: 14px 18px; display: flex; flex-direction: column; align-items: center; gap: 4px; text-align: center; box-shadow: 0 12px 40px rgba(0,0,0,.25); animation: extra 3.4s ease forwards; }
.fx-extra small { font: 600 11px 'IBM Plex Sans', sans-serif; letter-spacing: .2em; text-transform: uppercase; color: #B0303C; }
.fx-extra b { font: 800 30px/1.05 'Playfair Display', serif; }
.fx-extra span { font: italic 600 14px 'Playfair Display', serif; color: #5E554A; }
@keyframes extra { 0% { transform: translateX(-50%) rotate(-540deg) scale(.1); opacity: 0; } 18% { transform: translateX(-50%) rotate(-3deg) scale(1); opacity: 1; } 85% { opacity: 1; } 100% { opacity: 0; transform: translateX(-50%) rotate(-3deg) scale(1.03); } }

/* ---------- ПК ---------- */
.pc-bar { flex: none; height: 40px; display: flex; align-items: center; background: var(--surface2); border-bottom: 1px solid var(--rule); gap: 10px; padding: 0 14px; }
.pc-logo { width: 20px; height: 20px; background: var(--ink); color: var(--bg); display: flex; align-items: center; justify-content: center; font-family: var(--f-head), serif; font-weight: 800; font-size: 13px; }
.t-candy .pc-logo { border-radius: 6px; background: var(--primary); color: var(--primary-ink); }
.t-chalk .pc-logo { border-radius: 6px 3px 7px 3px; background: var(--primary); color: var(--primary-ink); }
.pc-bar .who { display: flex; align-items: center; gap: 8px; font-size: 13px; }
.pc-mast { flex: none; padding: 14px 28px 0; display: grid; grid-template-columns: 1fr auto 1fr; align-items: end; gap: 16px; }
.pc-mast h1 { margin: 0; text-align: center; font-family: var(--f-head), serif; font-weight: var(--w-head); font-size: 46px; line-height: 1; }
.t-chalk .pc-mast h1 { font-size: 58px; }
.pc .rule2 { margin: 12px 28px 0; }
.pc-main { flex: 1; min-height: 0; padding: 0 28px; display: grid; grid-template-columns: 270px minmax(0, 1fr) 300px; }
.pc-main.two { grid-template-columns: 250px minmax(0, 1fr); }
.pc-col { min-height: 0; overflow-y: auto; scrollbar-width: thin; }
.pc-left { padding: 18px 24px 18px 0; border-right: 1px solid var(--rule); display: flex; flex-direction: column; gap: 10px; }
.pc-right { padding: 18px 0 18px 24px; border-left: 1px solid var(--rule); display: flex; flex-direction: column; gap: 10px; }
.pc-center { padding: 16px 28px 14px; display: flex; flex-direction: column; }
.t-chalk .pc-left, .t-chalk .pc-right { border-color: var(--hair); border-style: dashed; border-width: 0 2px 0 0; }
.t-chalk .pc-right { border-width: 0 0 0 2px; }
.nav-item { height: 38px; display: flex; align-items: center; gap: 10px; padding: 0 10px; border: 0; border-bottom: 1px solid var(--hair); background: none; color: var(--ink); text-align: left; width: 100%; }
.nav-item span { flex: 1; font-size: 14px; font-weight: 500; }
.nav-item small { font-size: 11.5px; opacity: .75; }
.nav-item.on { background: var(--ink); color: var(--bg); border-bottom-color: var(--ink); }
.t-candy .nav-item { border-radius: 12px; border: 0; margin-bottom: 4px; }
.t-candy .nav-item.on { background: var(--primary); color: var(--primary-ink); border: 2px solid var(--outline); }
.t-chalk .nav-item { border-bottom: 2px dashed var(--hair); }
.t-chalk .nav-item.on { background: var(--surface); color: var(--primary); }
.statgrid { display: grid; grid-template-columns: 1fr 1fr; gap: 10px 14px; }
.statgrid > div { display: flex; flex-direction: column; border-top: 1px solid var(--ink); padding-top: 4px; }
.statgrid b { font-family: var(--f-head), serif; font-weight: 700; font-size: 26px; line-height: 1.15; }
.statgrid span { font-size: 12px; color: var(--ink2); }
.lang-card { display: flex; justify-content: space-between; align-items: center; padding: 8px 10px; font-size: 13.5px; width: 100%; color: var(--ink); text-align: left; }
.pc .board-area { justify-content: flex-start; gap: 14px; }
.pc .kb { padding-bottom: 4px; }
.pc .game, .pc .result, .pc .home { flex: 1; }
.pc .page-in-center .hdr { padding-left: 0; padding-right: 0; }
.pc .page-in-center .rule2 { margin: 0; }
.pc .page-in-center .sec, .pc .page-in-center .list, .pc .page-in-center .stat4, .pc .page-in-center .cal, .pc .page-in-center .dist,
.pc .page-in-center .pair, .pc .page-in-center .cats, .pc .page-in-center .themes, .pc .page-in-center .me-bar, .pc .page-in-center .rivals { margin-left: 0; margin-right: 0; padding-left: 0; padding-right: 0; }
.pc-center.narrow > * { width: 100%; max-width: 820px; margin-left: auto; margin-right: auto; }
.pc .page-in-center .cal { max-width: 560px; }
.pc .wide-content { max-width: 760px; width: 100%; margin: 0 auto; }

@media (prefers-reduced-motion: reduce) { .tile, .brow, .toast { animation: none !important; } }
