/* Вікно Time Town. Айдентика та сама, що у вікні Мафії: ніч кольору індиго, латунь, тепле світло ліхтаря.
 * Шапка-місто, нижня панель, пігулки валют і підказки — спільна «рамка» ядра (town/tt-shell.css); тут — лише своє. */
:root {
  --bg: #0F1220; --card: #171B2B; --inset: #121626; --line: #272C40; --line2: #1F2436; --chip: #262B40;
  --text: #ECE7DA; --muted: #B7B3BD; --soft: #D2CDC4; --gold: #E2BE6A; --gold2: #F2D28E; --goldbg: #262019;
  --green: #7FC9A0; --ink: #1A1407; --night: #94B5F5;
  --serif: 'Playfair Display', Georgia, serif;
  --num: "IBM Plex Sans", "Segoe UI", system-ui, sans-serif;
  --safe-top: calc(var(--tg-safe-area-inset-top, 0px) + var(--tg-content-safe-area-inset-top, 0px));
}
* { box-sizing: border-box; -webkit-tap-highlight-color: transparent; }
html, body { margin: 0; background: var(--bg); color: var(--text); font-family: "IBM Plex Sans", "Segoe UI", system-ui, sans-serif; overflow-x: hidden; }
body { min-height: 100vh; }
button { font: inherit; color: inherit; }
button:focus-visible, a:focus-visible, [role="button"]:focus-visible { outline: 2px solid var(--gold2); outline-offset: 2px; }
[hidden] { display: none !important; }

/* спільне */
.pane-in { animation: panein .24s ease-out; }
@keyframes panein { from { opacity: 0; transform: translateY(8px); } }
.section { padding: 14px 16px; }
.label { font-family: var(--serif); font-size: 17px; font-weight: 700; line-height: 1.25; color: var(--text); margin: 0 0 10px; }
.label.mt { margin-top: 22px; }
.cap { font-size: 13px; color: var(--muted); line-height: 1.45; }
.note { font-size: 13px; color: var(--muted); line-height: 1.5; margin-top: 10px; }
.card { background: var(--card); border: 1px solid var(--line2); border-radius: 18px; padding: 14px 16px; }
.card + .card { margin-top: 10px; }
.grid3 { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 8px; }
.stat { background: var(--card); border: 1px solid var(--line2); border-radius: 12px; padding: 12px 6px; text-align: center; min-width: 0; }
.stat b { display: block; font-size: 22px; font-weight: 600; line-height: 1.2; font-family: var(--num); font-variant-numeric: tabular-nums; overflow-wrap: anywhere; }
.stat span { display: block; font-size: 13px; line-height: 1.25; color: var(--muted); }
.card .stat { background: var(--inset); border-color: transparent; }
.btn { flex: 1; min-height: 46px; padding: 8px 14px; border-radius: 12px; border: 1px solid var(--line); background: var(--card); font-weight: 600; font-size: 15px; cursor: pointer; display: flex; align-items: center; justify-content: center; gap: 6px; text-align: center; }
.btn.primary { background: var(--gold); color: var(--ink); border-color: var(--gold); }
.btn:disabled { background: var(--line); color: var(--muted); border-color: var(--line); cursor: default; }
.btn:active:not(:disabled) { transform: scale(.98); }
.btns { display: flex; gap: 8px; flex-wrap: wrap; margin-top: 14px; }
.btns .btn { flex: 1 1 140px; }
.badge { display: inline-block; padding: 2px 9px; border-radius: 999px; font-size: 12px; font-weight: 600; line-height: 1.5; white-space: nowrap; border: 1px solid var(--line); color: var(--soft); }
.badge.available { color: var(--green); border-color: rgba(127,201,160,.45); background: rgba(127,201,160,.08); }
.badge.test { color: var(--gold2); border-color: rgba(226,190,106,.5); background: rgba(226,190,106,.08); }
.badge.soon { color: var(--night); border-color: rgba(143,178,245,.4); background: rgba(143,178,245,.07); }
.gate { min-height: 60vh; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 10px; padding: 32px 24px; text-align: center; }
.gate .em { font-size: 44px; line-height: 1; }
.gate h1 { margin: 0; font-family: var(--serif); font-size: 22px; line-height: 1.2; }
.gate p { margin: 0; max-width: 320px; color: var(--soft); font-size: 15px; line-height: 1.5; }
.gate .btn { flex: none; min-width: 200px; margin-top: 8px; }

/* ігри */
.gcard { display: flex; gap: 12px; align-items: flex-start; width: 100%; padding: 14px; background: var(--card); border: 1px solid var(--line2); border-radius: 18px; cursor: pointer; text-align: left; }
.gcard + .gcard { margin-top: 10px; }
.gcard:active { border-color: var(--line); }
.g-em { flex: none; width: 52px; height: 52px; border-radius: 14px; background: var(--inset); border: 1px solid var(--line); display: flex; align-items: center; justify-content: center; font-size: 28px; line-height: 1; }
.g-main { flex: 1; min-width: 0; }
.g-title { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.g-title b { font-family: var(--serif); font-size: 18px; font-weight: 700; line-height: 1.2; }
.g-short { margin-top: 4px; font-size: 14px; line-height: 1.4; color: var(--soft); }
.g-meta { margin-top: 6px; font-size: 13px; color: var(--muted); }
.g-foot { display: flex; align-items: center; justify-content: space-between; gap: 10px; margin-top: 10px; }
.g-foot .more { font-size: 13px; color: var(--muted); }
.g-play { flex: none; min-height: 44px; min-width: 96px; padding: 8px 16px; border-radius: 12px; border: 1px solid var(--gold); background: var(--gold); color: var(--ink); font-weight: 700; font-size: 15px; cursor: pointer; }
.gcard.soon { align-items: center; padding: 10px 14px; min-height: 64px; }
.gcard.soon .g-em { width: 44px; height: 44px; font-size: 22px; filter: saturate(.6); }
.gcard.soon .g-title b { font-size: 16px; }
.gcard.soon .g-short { font-size: 13px; color: var(--muted); }
.gcard .chev { flex: none; align-self: center; color: var(--muted); font-size: 20px; }

/* сторінка гри */
.g-hero { display: flex; gap: 14px; align-items: center; }
.g-hero .g-em { width: 68px; height: 68px; border-radius: 18px; font-size: 36px; }
.g-hero h1 { margin: 0 0 6px; font-family: var(--serif); font-size: 24px; line-height: 1.15; overflow-wrap: anywhere; }
.g-tags { display: flex; gap: 6px; flex-wrap: wrap; }
.g-about { margin: 14px 0 0; font-size: 15px; line-height: 1.55; color: var(--soft); }
.where { display: flex; align-items: center; gap: 12px; min-height: 48px; }
.where + .where { border-top: 1px solid var(--line2); margin-top: 8px; padding-top: 8px; }
.where .ic { flex: none; width: 36px; height: 36px; border-radius: 10px; background: var(--inset); display: flex; align-items: center; justify-content: center; font-size: 18px; }
.where b { display: block; font-size: 15px; font-weight: 600; }
.where span { display: block; font-size: 13px; color: var(--muted); overflow-wrap: anywhere; }

/* що є в грі (режими й розділи) */
.acts { padding: 6px 14px; }
.act { display: flex; align-items: center; gap: 12px; padding: 10px 0; }
.act + .act { border-top: 1px solid var(--line2); }
.act .ic { flex: none; width: 40px; height: 40px; border-radius: 12px; background: var(--inset); border: 1px solid var(--line); display: flex; align-items: center; justify-content: center; font-size: 20px; line-height: 1; }
.act .tx { flex: 1; min-width: 0; }
.act b { display: block; font-size: 15px; font-weight: 600; }
.act .tx span { display: block; font-size: 13px; color: var(--muted); line-height: 1.4; margin-top: 2px; overflow-wrap: anywhere; }
.act .tx .cmd { color: var(--soft); }
.act-b { flex: none; min-height: 44px; min-width: 88px; padding: 8px 12px; border-radius: 12px; border: 1px solid var(--line); background: var(--inset); font-weight: 600; font-size: 14px; cursor: pointer; white-space: nowrap; }
.act-b.go { background: var(--gold); border-color: var(--gold); color: var(--ink); }

/* профіль, гардероб і склад — спільний модуль ядра (town/town-profile.css); місце під нижнє меню дає рамка (tt-shell.css) */

/* 🧠 квізи: каталог (сітка з обкладинками), сторінка квізу, гра, підсумок */
.mt14 { margin-top: 14px; }
.sr { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); }
.q-h1 { margin: 0 0 6px; font-family: var(--serif); font-size: 26px; line-height: 1.15; overflow-wrap: anywhere; }
.q-sub { margin-top: 4px; }
.q-tools { display: flex; gap: 8px; margin-top: 16px; }
.q-sort { flex: 1; }
.q-sort select, .e-field select { width: 100%; min-height: 46px; padding: 8px 12px; border-radius: 12px; border: 1px solid var(--line); background: var(--card); color: var(--text); font: inherit; font-size: 15px; }
.q-new { flex: none; }
.q-chips { display: flex; gap: 6px; overflow-x: auto; margin: 12px -16px 0; padding: 0 16px 4px; scrollbar-width: none; }
.chip { flex: none; min-height: 36px; padding: 6px 14px; border-radius: 999px; border: 1px solid var(--line); background: var(--card); font-size: 14px; font-weight: 600; cursor: pointer; color: var(--soft); }
.chip.on { background: var(--gold); border-color: var(--gold); color: var(--ink); }
.qgrid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; margin-top: 14px; }
.qcard { background: var(--card); border: 1px solid var(--line2); border-radius: 16px; overflow: hidden; cursor: pointer; display: flex; flex-direction: column; }
.qcard:active { border-color: var(--line); }
.qc-top { position: relative; aspect-ratio: 1 / 1; background: var(--inset); }
.qc-img { display: block; width: 100%; height: 100%; object-fit: cover; }
.qc-ph { display: flex; align-items: center; justify-content: center; font-size: 56px; background: radial-gradient(circle at 30% 20%, #2B2F4A, #141829 70%); }
.qc-ph.big { font-size: 80px; }
.qc-badges { position: absolute; top: 8px; right: 8px; display: flex; flex-direction: column; align-items: flex-end; gap: 4px; }
.qb { display: inline-block; padding: 2px 8px; border-radius: 999px; font-size: 11px; font-weight: 800; letter-spacing: .3px; text-transform: uppercase; background: rgba(10,12,22,.82); border: 1px solid var(--line); color: var(--soft); }
.qb.up { color: var(--green); border-color: rgba(127,201,160,.5); text-transform: none; }
.qb.easy { color: var(--green); border-color: rgba(127,201,160,.5); }
.qb.mid { color: var(--gold2); border-color: rgba(226,190,106,.55); }
.qb.hard { color: #F0A893; border-color: rgba(217,119,95,.55); }
.qb.draft { position: absolute; top: 8px; left: 8px; color: var(--night); border-color: rgba(143,178,245,.5); }
.qc-body { padding: 10px 12px 12px; display: flex; flex-direction: column; gap: 4px; flex: 1; }
.qc-title { font-size: 15px; line-height: 1.3; font-weight: 600; overflow-wrap: anywhere; }
.qc-meta { font-size: 12px; color: var(--muted); }
.qc-tags { display: flex; flex-wrap: wrap; gap: 4px; margin-top: 2px; }
.qc-tags span { font-size: 11px; color: var(--soft); border: 1px solid var(--line); border-radius: 999px; padding: 1px 7px; max-width: 100%; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.q-hero { position: relative; aspect-ratio: 16 / 9; background: var(--inset); overflow: hidden; }
.q-hero .qc-badges { top: 12px; right: 12px; }
.q-name { font-family: var(--serif); font-size: 18px; font-weight: 700; margin-bottom: 8px; }
.q-head { display: flex; justify-content: space-between; align-items: baseline; font-size: 14px; color: var(--muted); }
.q-head b { color: var(--gold2); font-family: var(--num); font-variant-numeric: tabular-nums; font-size: 16px; }
.q-bar { height: 6px; border-radius: 999px; background: var(--inset); margin: 10px 0 14px; overflow: hidden; }
.q-bar i { display: block; height: 100%; width: 100%; background: linear-gradient(90deg, var(--gold), var(--gold2)); transform-origin: left; animation: qtime linear forwards; }
.q-bar i.stop { animation: none; transform: scaleX(0); opacity: .4; }
@keyframes qtime { from { transform: scaleX(1); } to { transform: scaleX(0); background: #D9775F; } }
.q-card { text-align: center; padding: 16px; }
.q-img { display: block; width: 100%; max-height: 46vh; object-fit: contain; border-radius: 12px; background: #000; margin-bottom: 10px; }
.q-clue { font-size: 46px; line-height: 1.25; letter-spacing: 4px; overflow-wrap: anywhere; }
.q-text { margin: 10px 0 0; font-size: 16px; line-height: 1.5; color: var(--soft); }
.q-opts { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; margin-top: 12px; }
.q-opt { min-height: 60px; padding: 10px 12px; border-radius: 14px; border: 1px solid var(--line); background: var(--card); font-weight: 600; font-size: 15px; line-height: 1.3; cursor: pointer; overflow-wrap: anywhere; }
.q-opt:active:not(:disabled) { transform: scale(.98); border-color: var(--gold); }
.q-opt:disabled { cursor: default; }
.q-opt.right { background: rgba(127,201,160,.16); border-color: var(--green); color: var(--green); }
.q-opt.wrong { background: rgba(217,119,95,.16); border-color: #D9775F; color: #F0A893; }
.q-opt.dim { opacity: .45; }
.q-res { margin-top: 12px; }
.q-res b { font-size: 16px; }
.q-res p { margin: 6px 0 0; font-size: 14px; line-height: 1.5; color: var(--soft); }
.q-res.ok { border-color: rgba(127,201,160,.45); }
.q-res.bad { border-color: rgba(217,119,95,.45); }
.q-final { text-align: center; }
.q-final .q-big { font-size: 60px; line-height: 1; margin-top: 10px; }
.q-final h1 { margin: 10px 0 0; font-family: var(--serif); font-size: 30px; color: var(--gold2); }
.q-final .label, .q-final .card { text-align: left; }
.q-top { display: flex; justify-content: space-between; gap: 10px; padding: 7px 0; font-size: 15px; }
.q-top + .q-top { border-top: 1px solid var(--line2); }
.q-top.me { color: var(--gold2); }
.q-top b { font-family: var(--num); font-variant-numeric: tabular-nums; }

.q-duel { margin-top: 16px; border-color: rgba(226,190,106,.35); }
.q-duel p { margin: 6px 0 12px; font-size: 14px; line-height: 1.5; color: var(--soft); }
.q-duel .btn { width: 100%; }

/* каталог — плитки як у бібліотеці Steam */
.cat-tools { display: flex; gap: 8px; margin-top: 14px; }
.cat-search { flex: 1 1 55%; }
.cat-search input { width: 100%; min-height: 46px; padding: 8px 12px; border-radius: 12px; border: 1px solid var(--line); background: var(--card); color: var(--text); font: inherit; font-size: 15px; }
.cat-tools .q-sort { flex: 1 1 45%; }
.tiles { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 8px; margin-top: 12px; }
.tile { position: relative; aspect-ratio: 2 / 3; border-radius: 10px; overflow: hidden; cursor: pointer; border: 1px solid var(--line2);
  background: radial-gradient(120% 80% at 30% 15%, var(--h1), var(--h2) 75%); }
.tile:active { transform: scale(.98); }
.tile-img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.tile-em { position: absolute; top: 35%; left: 50%; transform: translate(-50%, -50%); font-size: 46px; filter: drop-shadow(0 6px 14px rgba(0,0,0,.45)); }
.tile-foot { position: absolute; left: 0; right: 0; bottom: 0; padding: 26px 7px 7px; background: linear-gradient(transparent, rgba(5,7,14,.92) 45%); }
.tile-name { font-family: var(--serif); font-size: 13.5px; font-weight: 700; line-height: 1.15; color: #fff; text-shadow: 0 1px 3px rgba(0,0,0,.7); overflow-wrap: anywhere; }
.tile-desc { margin-top: 3px; font-size: 11px; line-height: 1.3; color: rgba(255,255,255,.92); max-height: 4.1em; overflow-y: auto; overscroll-behavior: contain;
  -webkit-overflow-scrolling: touch; scrollbar-width: none; touch-action: pan-y; padding-bottom: 2px;
  -webkit-mask-image: linear-gradient(#000 70%, transparent); mask-image: linear-gradient(#000 70%, transparent); }
.tile-desc::-webkit-scrollbar { display: none; }
.tile-desc.end { -webkit-mask-image: none; mask-image: none; }
.tile-cat { position: absolute; top: 6px; left: 6px; max-width: calc(100% - 12px); padding: 1px 7px; border-radius: 999px; font-size: 9.5px; font-weight: 700;
  background: rgba(10,12,22,.72); border: 1px solid var(--line); color: rgba(255,255,255,.85); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.tile-badge { position: absolute; top: 28px; left: 6px; padding: 1px 7px; border-radius: 999px; font-size: 9px; font-weight: 800; text-transform: uppercase; letter-spacing: .3px;
  background: rgba(10,12,22,.82); border: 1px solid var(--line); color: var(--gold2); }
.tile-badge.soon { color: var(--night); }
.tile.soon .tile-em { opacity: .55; filter: grayscale(.4); }
.gw-banner { display: flex; align-items: center; gap: 12px; padding: 14px; border-radius: 18px; cursor: pointer;
  background: linear-gradient(120deg, rgba(226,190,106,.22), rgba(217,119,95,.14)); border: 1px solid rgba(226,190,106,.45); }
.gw-banner:active { transform: scale(.99); }
.gw-b-em { font-size: 34px; flex: none; }
.gw-b-main { flex: 1; display: flex; flex-direction: column; gap: 2px; }
.gw-b-main b { font-family: var(--serif); font-size: 18px; }
.gw-b-main span { font-size: 13px; color: var(--soft); }

/* 🎁 розіграші */
.gw-card + .gw-card { margin-top: 10px; }
.gw-prize { font-family: var(--serif); font-size: 20px; font-weight: 700; color: var(--gold2); }
.gw-prize span { font-family: var(--num); font-size: 14px; color: var(--soft); font-weight: 600; }
.gw-title { display: block; margin-top: 4px; font-size: 16px; }
.gw-about { margin: 6px 0 0; font-size: 14px; line-height: 1.5; color: var(--soft); white-space: pre-wrap; }
.gw-meta { display: flex; flex-direction: column; gap: 3px; margin-top: 10px; font-size: 13px; color: var(--muted); }
.gw-wins { margin: 10px 0 6px; }
.gw-w { padding: 5px 0; font-size: 15px; }
.gw-w + .gw-w { border-top: 1px solid var(--line2); }
.gw-w.me { color: var(--gold2); font-weight: 600; }
.gw-w.old { color: var(--muted); font-size: 13px; }
.gw-reroll { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 10px; }
.gw-reroll select, .gw-reroll input, .g-quick textarea, .gw-row input { min-height: 40px; padding: 8px 10px; border-radius: 10px; border: 1px solid var(--line); background: var(--inset); color: var(--text); font: inherit; font-size: 14px; }
.gw-reroll input { flex: 1 1 140px; }
.g-quick textarea { width: 100%; margin-top: 8px; resize: vertical; }
.gw-row { display: flex; align-items: center; justify-content: space-between; gap: 10px; margin-top: 8px; }
.gw-row label { font-size: 14px; color: var(--soft); display: flex; align-items: center; gap: 8px; }
.gw-row input { width: 70px; }
.gw-row .btn { flex: none; }
.seg3 { display: flex; gap: 6px; flex-wrap: wrap; }

/* конструктор квізів */
.btn.small { flex: none; min-height: 40px; padding: 6px 12px; font-size: 14px; }
.btn.danger { color: #F0A893; border-color: rgba(217,119,95,.5); }
.icon-b { min-width: 40px; min-height: 40px; border-radius: 10px; border: 1px solid var(--line); background: var(--inset); cursor: pointer; font-size: 15px; }
.icon-b:disabled { opacity: .35; cursor: default; }
.linkish { background: none; border: 0; color: var(--gold2); font-weight: 600; font-size: 14px; padding: 10px 0; cursor: pointer; }
.e-field { display: block; margin-top: 12px; }
.e-field > span, .e-cap { display: block; font-size: 13px; color: var(--muted); margin-bottom: 6px; }
.e-field input, .e-field textarea, .e-opt input { width: 100%; min-height: 46px; padding: 10px 12px; border-radius: 12px; border: 1px solid var(--line); background: var(--inset); color: var(--text); font: inherit; font-size: 15px; }
.e-field textarea { min-height: 84px; resize: vertical; }
.e-field input:focus, .e-field textarea:focus, .e-opt input:focus, .e-field select:focus { outline: 2px solid var(--gold2); outline-offset: 1px; }
.e-row { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.e-pic { display: flex; gap: 12px; align-items: center; margin-top: 8px; }
.e-pic img, .e-pic-ph { width: 96px; height: 72px; flex: none; border-radius: 12px; object-fit: cover; background: var(--inset); border: 1px solid var(--line); display: flex; align-items: center; justify-content: center; font-size: 26px; }
.e-pic-b { display: flex; flex-wrap: wrap; gap: 6px; }
.e-q { margin-top: 12px; }
.e-q-head { display: flex; justify-content: space-between; align-items: center; gap: 8px; }
.e-q-head span { display: flex; gap: 6px; }
.e-opts { margin-top: 12px; }
.e-opt { display: flex; gap: 8px; align-items: center; margin-top: 6px; }
.e-radio { flex: none; width: 40px; height: 40px; border-radius: 50%; border: 2px solid var(--line); background: var(--inset); color: var(--ink); font-weight: 800; cursor: pointer; }
.e-radio.on { background: var(--green); border-color: var(--green); }
.e-form > .btn { width: 100%; margin-top: 12px; }
.e-bar { position: sticky; bottom: calc(var(--tts-nav-h, 58px) + 8px); display: flex; gap: 8px; margin-top: 16px; padding: 8px; background: rgba(15,18,32,.92); border: 1px solid var(--line2); border-radius: 16px; backdrop-filter: blur(8px); z-index: 5; }
.e-bar .btn { flex: 1; }

@media (prefers-reduced-motion: reduce) { .pane-in { animation: none; } }
.e-field input::placeholder, .e-field textarea::placeholder, .e-opt input::placeholder { color: var(--muted); opacity: .7; }

/* ---------- конструктор квізів v2: кроки, питання номерками, медіа, перевірка ---------- */
.e-top { position: sticky; top: 0; z-index: 6; display: flex; align-items: center; gap: 8px; margin: -4px -2px 6px; padding: 8px 2px;
  background: rgba(15,18,32,.94); backdrop-filter: blur(8px); border-bottom: 1px solid var(--line2); }
.e-steps { display: flex; gap: 6px; flex: 1; min-width: 0; }
.e-step { display: flex; align-items: center; gap: 6px; min-height: 40px; padding: 4px 10px 4px 4px; border-radius: 999px; border: 1px solid var(--line); background: var(--card); color: var(--muted); font-size: 13px; font-weight: 600; cursor: pointer; }
.e-step i { width: 28px; height: 28px; border-radius: 50%; display: grid; place-items: center; font-style: normal; font-weight: 800; border: 1px solid var(--line); background: var(--inset); }
.e-step.on { border-color: var(--gold); color: var(--text); }
.e-step.on i { background: var(--gold); color: var(--ink); border-color: var(--gold); }
.e-step.done i { background: rgba(127,201,160,.15); color: var(--green); border-color: rgba(127,201,160,.5); }
.e-step span { white-space: nowrap; }
.e-next { flex: none; min-height: 40px; padding: 6px 12px; font-size: 14px; }
@media (max-width: 420px) { .e-step:not(.on) span { display: none; } .e-step:not(.on) { padding-right: 4px; } }
.e-kicker { margin-top: 14px; font-size: 12px; font-weight: 700; letter-spacing: .12em; text-transform: uppercase; color: var(--muted); }
.e-restore { margin-top: 12px; border-color: var(--gold); }
.e-restore span { display: block; font-size: 13px; color: var(--muted); margin-top: 2px; }
.e-lab { display: flex; justify-content: space-between; align-items: baseline; gap: 10px; margin-bottom: 6px; }
.e-lab.mt { margin-top: 16px; }
.e-lab b { font-size: 15px; color: var(--text); font-weight: 600; }
.e-lab em { font-style: normal; font-size: 12.5px; color: var(--muted); text-align: right; }
.e-field > span.e-lab { display: flex; }
.req { color: #F0A893; font-style: normal; }
.e-cnt { display: block; text-align: right; font-size: 12px; color: var(--muted); margin-top: 4px; font-variant-numeric: tabular-nums; }
.e-cnt.solo { margin-top: 4px; }
.e-help { display: block; font-style: normal; font-size: 12.5px; color: var(--muted); margin-top: 2px; }
.chips.e-cats { flex-wrap: wrap; overflow: visible; }
.chip.big { min-height: 44px; padding: 8px 14px; font-size: 14.5px; }
.e-kinds { display: flex; flex-wrap: wrap; gap: 8px; }
.e-tags { display: flex; flex-wrap: wrap; align-items: center; gap: 6px; min-height: 48px; padding: 6px 8px; border-radius: 12px; border: 1px solid var(--line); background: var(--inset); }
.e-tag { display: inline-flex; align-items: center; gap: 4px; padding: 3px 4px 3px 10px; border-radius: 999px; background: var(--chip); font-size: 13.5px; }
.e-tag button { width: 26px; height: 26px; border-radius: 50%; border: 0; background: transparent; color: var(--muted); cursor: pointer; }
#e-tag { flex: 1; min-width: 120px; min-height: 36px; border: 0; background: transparent; color: var(--text); font: inherit; font-size: 15px; }
#e-tag:focus { outline: none; }
.e-tags:focus-within { outline: 2px solid var(--gold2); outline-offset: 1px; }
.e-h-row { display: flex; justify-content: space-between; align-items: flex-end; gap: 10px; }
.e-sum { text-align: right; }
.e-sum b { display: block; font-size: 18px; font-variant-numeric: tabular-nums; }
.e-sum span { font-size: 12.5px; color: var(--muted); }
.e-qnav { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 12px; }
.e-qn { position: relative; width: 44px; height: 44px; border-radius: 50%; border: 1px solid var(--line); background: var(--card); color: var(--soft); font-weight: 700; cursor: pointer; }
.e-qn.on { border: 2px solid var(--gold); color: var(--text); }
.e-qn.bad::after { content: ""; position: absolute; top: 1px; right: 1px; width: 10px; height: 10px; border-radius: 50%; background: var(--gold2); border: 2px solid var(--bg); }
.e-qn.ok { color: var(--green); }
.e-qn.add { border-style: dashed; color: var(--muted); font-size: 20px; }
.e-q { margin-top: 14px; }
.e-q-head .badge { margin-left: 8px; }
.e-q-head b { font-size: 18px; }
.e-q-head .linkish { margin-left: auto; }
.linkish.danger { color: #F0A893; }
.linkish:disabled { opacity: .35; cursor: default; }
.e-drop { margin-top: 10px; }
.e-drop-b { width: 100%; display: flex; flex-direction: column; align-items: center; gap: 4px; padding: 22px 14px; border-radius: 16px; border: 2px dashed var(--line); background: var(--inset); color: var(--text); cursor: pointer; text-align: center; }
.e-drop-b i { font-style: normal; font-size: 28px; }
.e-drop-b b { font-size: 15px; }
.e-drop-b span { font-size: 12.5px; color: var(--muted); line-height: 1.4; max-width: 34ch; }
.e-drop.has img { width: 100%; max-height: 260px; object-fit: contain; border-radius: 14px; background: #000; }
.e-drop.has audio { width: 100%; }
.e-drop .btns { margin-top: 8px; }
.e-right { border-color: rgba(127,201,160,.55) !important; }
.btn.dashed { width: 100%; margin-top: 8px; border-style: dashed; background: transparent; color: var(--soft); }
.e-qfoot { display: flex; gap: 8px; margin-top: 16px; }
.e-qmove { display: flex; gap: 14px; justify-content: center; }
.e-check { margin-top: 14px; padding: 6px 14px; }
.e-ck { display: flex; align-items: center; gap: 10px; padding: 10px 0; }
.e-ck + .e-ck { border-top: 1px solid var(--line2); }
.e-ck i { flex: none; width: 26px; text-align: center; font-style: normal; font-size: 18px; color: var(--muted); }
.e-ck > div { flex: 1; min-width: 0; }
.e-ck b { display: block; font-size: 14.5px; font-weight: 600; overflow-wrap: anywhere; }
.e-ck span { display: block; font-size: 12.5px; color: var(--muted); }
.e-ck.warn b { color: var(--gold2); }
.e-preview { max-width: 230px; }
.e-preview .qcard { cursor: default; }
.e-rules { margin-top: 14px; }
.e-rules ul { margin: 6px 0 0; padding-left: 18px; color: var(--soft); font-size: 13.5px; line-height: 1.5; }
.q-audio { display: flex; justify-content: center; padding: 14px 0 6px; }
.q-audio .btn { flex: none; min-width: 160px; }
.e-bar.final { flex-wrap: wrap; }
.e-bar.final .btn.primary { order: -1; flex-basis: 100%; }

/* ---------- 🔤 Словограй ---------- */
.sl-top { display: grid; grid-template-columns: 40px 1fr 40px; align-items: center; margin-top: 4px; }
.sl-hint { justify-self: center; width: 64px; height: 64px; border-radius: 50%; border: 0; font-size: 30px; cursor: pointer;
  background: radial-gradient(circle at 35% 30%, #FFC56B, #F08A24); box-shadow: 0 6px 18px rgba(240,138,36,.35); }
.sl-hint:disabled { opacity: .4; box-shadow: none; }
.sl-hint:active { transform: scale(.95); }
.sl-more { width: 40px; height: 40px; border: 0; background: none; color: var(--muted); font-size: 24px; cursor: pointer; }
.sl-hint-cap { text-align: center; color: var(--muted); font-size: 13px; margin: 6px 0 10px; }
.sl-menu { display: grid; gap: 2px; padding: 6px; }
.sl-menu button { text-align: left; background: none; border: 0; color: var(--text); padding: 11px 10px; border-radius: 10px; font: inherit; cursor: pointer; }
.sl-menu button:active { background: var(--chip); }
.sl-rules p { margin: 8px 0; color: var(--soft); font-size: 14px; line-height: 1.45; }
.sl-meta { display: flex; flex-wrap: wrap; gap: 6px 16px; align-items: center; font-size: 14px; color: var(--muted); margin: 0 2px 8px; }
.sl-meta b { color: var(--text); }
.sl-day { margin-left: auto; font-size: 12px; color: var(--gold); border: 1px solid var(--goldbg); background: var(--goldbg); padding: 2px 8px; border-radius: 99px; }
.sl-form { display: flex; gap: 8px; margin-bottom: 10px; }
.sl-form input { flex: 1; min-width: 0; height: 50px; padding: 0 14px; border-radius: 14px; border: 1.5px solid var(--line); background: var(--inset);
  color: var(--text); font: 17px/1 inherit; font-family: inherit; }
.sl-form input:focus { outline: none; border-color: var(--gold); }
.sl-go { width: 50px; height: 50px; border-radius: 14px; border: 0; background: var(--gold); color: var(--ink); font-size: 22px; font-weight: 700; cursor: pointer; }
.sl-go:disabled { opacity: .5; }
.sl-msg { color: var(--soft); font-size: 14px; margin: 0 2px 10px; }
.sl-list { display: grid; gap: 6px; }
.sl-row { position: relative; display: flex; align-items: center; justify-content: space-between; gap: 10px; height: 44px; padding: 0 14px;
  border-radius: 12px; background: var(--card); overflow: hidden; }
.sl-row i { position: absolute; left: 0; top: 0; bottom: 0; opacity: .28; border-radius: 12px 0 0 12px; }
.sl-row::before { content: ""; position: absolute; left: 0; top: 0; bottom: 0; width: 5px; }
.sl-row b, .sl-row span { position: relative; }
.sl-row b { font-weight: 600; font-size: 16px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.sl-row span { font-family: var(--num); font-variant-numeric: tabular-nums; font-weight: 600; }
.sl-row.hot i, .sl-row.hot::before { background: #3FBF7F; }
.sl-row.warm i, .sl-row.warm::before { background: #E8B931; }
.sl-row.cold i, .sl-row.cold::before { background: #E0565B; }
.sl-row.last { border: 2px solid var(--gold); margin-bottom: 12px; }
.sl-win { text-align: center; display: grid; gap: 6px; padding: 18px; margin-bottom: 12px; }
.sl-win b { font-size: 18px; }
.sl-win span { color: var(--soft); font-size: 14px; }
.sl-win .btns { margin-top: 8px; }
.sl-big { font-size: 40px; }
.sl-arch { display: grid; grid-template-columns: repeat(auto-fill, minmax(84px, 1fr)); gap: 8px; }
.sl-ag { position: relative; display: grid; gap: 2px; justify-items: center; padding: 12px 6px; border-radius: 14px; border: 1px solid var(--line);
  background: var(--card); color: var(--text); font: inherit; cursor: pointer; }
.sl-ag b { font-family: var(--num); }
.sl-ag span { font-size: 13px; color: var(--muted); }
.sl-ag em { font-style: normal; font-size: 11px; color: var(--gold); }
.sl-ag.solved { border-color: rgba(63,191,127,.5); }

/* ---------- ♟ ⛀ 🚢 настільні ігри (js/board.js) ---------- */
.bd .g-hero { margin-bottom: 8px; }
.bd-sides .btn { flex: 1 1 90px; }
.bd-list { padding: 4px 6px; }
.bd-item { display: flex; align-items: center; gap: 10px; width: 100%; padding: 12px 10px; background: none; border: 0; border-bottom: 1px solid var(--line2); color: var(--text); font: inherit; text-align: left; cursor: pointer; }
.bd-item:last-child { border-bottom: 0; }
.bd-item span { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-weight: 600; }
.bd-item em { font-style: normal; font-size: 13px; color: var(--muted); }
.bd-item em.on { color: var(--gold); font-weight: 700; }
.bd-item b { color: var(--muted); }
.bd-head { display: grid; grid-template-columns: 1fr auto 1fr; align-items: center; gap: 8px; margin-bottom: 10px; }
.bd-p { min-width: 0; padding: 8px 10px; border-radius: 12px; background: var(--card); border: 1px solid var(--line2); font-size: 14px; font-weight: 600; }
.bd-p span { display: block; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.bd-p.me { text-align: right; }
.bd-p.on { border-color: var(--gold); box-shadow: 0 0 0 1px var(--gold) inset; }
.bd-mid { text-align: center; display: flex; flex-direction: column; gap: 2px; font-size: 13px; color: var(--muted); }
.bd-mid b { font-weight: 600; }
.bd-mid b.go { color: var(--gold); }
.bd-clock { font-family: var(--num); font-variant-numeric: tabular-nums; font-size: 16px; color: var(--text); }
.bd-clock.low { color: var(--red); }
.bd-board { display: grid; grid-template-columns: repeat(8, 1fr); width: 100%; max-width: 440px; margin: 0 auto; aspect-ratio: 1; border-radius: 10px; overflow: hidden; border: 2px solid var(--line); user-select: none; -webkit-user-select: none; }
.bd-board .sq { position: relative; border: 0; padding: 0; margin: 0; aspect-ratio: 1; display: flex; align-items: center; justify-content: center; cursor: pointer; font: inherit; color: inherit; -webkit-tap-highlight-color: transparent; }
.bd-board.chess .sq.l { background: #EAD9B8; }
.bd-board.chess .sq.d { background: #A97E55; }
.bd-board.checkers .sq.l { background: #E9DDC4; cursor: default; }
.bd-board.checkers .sq.d { background: #6E4A33; }
.bd-board .sq.last { box-shadow: inset 0 0 0 100px rgba(232, 196, 92, .35); }
.bd-board .sq.sel { box-shadow: inset 0 0 0 100px rgba(120, 200, 120, .45); }
.bd-board .sq.chk { box-shadow: inset 0 0 0 100px rgba(220, 60, 60, .55); }
.bd-board .sq.tgt::after { content: ""; width: 30%; height: 30%; border-radius: 50%; background: rgba(30, 30, 30, .35); }
.bd-board.checkers .sq.tgt::after { background: rgba(140, 230, 140, .7); }
.bd-board .sq.cap::after { content: ""; position: absolute; inset: 4%; border-radius: 50%; border: 4px solid rgba(30, 30, 30, .35); }
.bd-board .sq.can { box-shadow: inset 0 0 0 3px rgba(232, 196, 92, .8); }
.bd-board .rk, .bd-board .fl { position: absolute; font-style: normal; font-size: 10px; font-weight: 700; color: rgba(40, 25, 10, .65); pointer-events: none; }
.bd-board .rk { top: 2px; left: 3px; }
.bd-board .fl { bottom: 1px; right: 3px; }
.pc { font-style: normal; font-size: min(9.5vw, 46px); line-height: 1; pointer-events: none; font-family: "Segoe UI Symbol", "DejaVu Sans", "Noto Sans Symbols2", serif; }
.pc.w { color: #FFFDF6; text-shadow: 0 0 1px #000, 0 1px 0 #000, 1px 0 0 #000, -1px 0 0 #000, 0 -1px 0 #000, 0 2px 3px rgba(0,0,0,.45); }
.pc.b { color: #1D1A17; text-shadow: 0 0 1px #F4E8D2, 0 1px 2px rgba(0,0,0,.4); }
.bd-promo .pc { font-size: 34px; }
.bd-promo .btn { flex: 1 1 60px; }
.ck { width: 78%; height: 78%; border-radius: 50%; pointer-events: none; display: flex; align-items: center; justify-content: center; }
.ck.w { background: radial-gradient(circle at 35% 30%, #FFF9EC, #D9CBB0 70%); box-shadow: 0 2px 0 #9C8A6B, 0 3px 6px rgba(0,0,0,.45), inset 0 0 0 3px rgba(150, 130, 100, .35); }
.ck.b { background: radial-gradient(circle at 35% 30%, #59504A, #1A1614 70%); box-shadow: 0 2px 0 #000, 0 3px 6px rgba(0,0,0,.5), inset 0 0 0 3px rgba(255, 255, 255, .08); }
.ck.king::after { content: "♛\FE0E"; font-size: min(5.5vw, 24px); color: #C9A646; text-shadow: 0 1px 1px rgba(0,0,0,.6); }
.ck.ghost { opacity: .55; }
.bd-flag { text-align: center; margin: 10px 0 0; font-weight: 700; color: var(--gold); }
.bd-flag.soft { color: var(--soft); font-weight: 600; font-size: 14px; }
.bd-note { text-align: center; }
.bd-end, .bd-offer, .bd-promo { margin-top: 12px; text-align: center; }
.bd-end b { display: block; font-size: 17px; }
.bd-end span { display: block; color: var(--gold); margin-top: 4px; }
.bd-offer { margin: 0 0 10px; }
.bd-tools { margin-top: 12px; }
.bd-cap { font-size: 13px; color: var(--muted); margin: 12px 0 6px; text-align: center; }
.bd-sea { display: grid; grid-template-columns: 18px repeat(10, 1fr); gap: 2px; width: 100%; max-width: 420px; margin: 0 auto; user-select: none; -webkit-user-select: none; }
.bd-sea.small { max-width: 250px; }
.bd-sea .ax { font-size: 10px; color: var(--muted); display: flex; align-items: center; justify-content: center; }
.bd-sea .c { aspect-ratio: 1; border: 0; padding: 0; border-radius: 3px; background: #1D3A5F; position: relative; font: inherit; -webkit-tap-highlight-color: transparent; }
.bd-sea.small .c { border-radius: 2px; }
.bd-sea button.c { cursor: pointer; }
.bd-sea.enemy.aim .c.fog:hover { background: #2C5788; }
.bd-sea .c.ship { background: #8A97A8; }
.bd-sea .c.ship.pick { background: var(--gold); }
.bd-sea .c.miss::after { content: ""; position: absolute; left: 38%; top: 38%; width: 24%; height: 24%; border-radius: 50%; background: #9DB7D6; }
.bd-sea .c.hit { background: #C2532F; }
.bd-sea .c.hit::after, .bd-sea .c.sunk::after { content: "✕"; position: absolute; inset: 0; display: flex; align-items: center; justify-content: center; color: #FFE7D6; font-size: 70%; font-weight: 700; }
.bd-sea .c.sunk { background: #5B2418; }
.bd-sea .c.now { box-shadow: 0 0 0 2px var(--gold); }
.bd-sea.place .c { cursor: pointer; }
.bd-fleet { text-align: center; margin-top: 10px; font-size: 14px; color: var(--soft); }
.bd-fleet b { color: #8A97A8; letter-spacing: -1px; margin: 0 3px; }
.bd-ttt { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; width: 100%; max-width: 330px; margin: 6px auto 0; aspect-ratio: 1; }
.bd-ttt .t { aspect-ratio: 1; border-radius: 16px; border: 1px solid var(--line2); background: var(--card); font-size: min(16vw, 72px); line-height: 1; font-weight: 700; display: flex; align-items: center; justify-content: center; cursor: pointer; color: var(--text); padding: 0; -webkit-tap-highlight-color: transparent; }
.bd-ttt .t:disabled { cursor: default; color: var(--text); }
.bd-ttt .t.x { color: #E8C45C; }
.bd-ttt .t.o { color: #8FB8F0; }
.bd-ttt .t.last { border-color: var(--gold); }
.bd-ttt .t.win { background: var(--goldbg); border-color: var(--gold); }
/* шапка настільних ігор: «Морський бій», «Хрестики-нолики» не влазять поруч із гаманцями — назва йде рядком нижче */
body.bd-on .tts-head-in { flex-wrap: wrap; }
body.bd-on .tts-head-t { order: 3; flex: 1 1 100%; min-width: 0; }
body.bd-on .tts-title { overflow-wrap: normal; }

/* ---------- 🎣 Рибалка (js/fish.js) ---------- */
.fi-tabs { display: grid; grid-template-columns: repeat(4, 1fr); gap: 6px; margin: 4px 0 10px; }
.fi-tabs button { min-width: 0; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; padding: 9px 2px; border-radius: 12px; border: 1px solid var(--line2); background: var(--card); color: var(--muted); font: inherit; font-size: 12px; cursor: pointer; }
.fi-tabs button[aria-selected="true"] { color: var(--text); border-color: var(--gold, #E2B85A); }
.fi-meta { display: flex; flex-wrap: wrap; gap: 6px 12px; font-size: 13px; color: var(--muted); margin: 2px 2px 10px; }
.fi-pond { position: relative; height: 190px; border-radius: 18px; overflow: hidden; margin-bottom: 12px;
  background: linear-gradient(#1B2547 0 45%, #1F3E66 45%, #07101F); }
.fi-moon { position: absolute; right: 14%; top: 12%; width: 26px; height: 26px; border-radius: 50%; background: #F4E7BE; box-shadow: 0 0 30px #F6DC8C88; }
.fi-line { position: absolute; left: 62%; top: 0; width: 1px; height: 54%; background: #E6ECFF99; }
.fi-float { position: absolute; left: calc(62% - 6px); top: calc(54% - 6px); width: 12px; height: 12px; border-radius: 50%;
  background: linear-gradient(#fff 0 50%, #E04A4A 50%); transition: transform .2s; }
.fi-ring { position: absolute; left: calc(62% - 16px); top: calc(54% - 6px); width: 32px; height: 12px; border-radius: 50%; border: 1px solid #9FC2F0; opacity: 0; }
.fi-pond.idle .fi-float, .fi-pond.result .fi-float { opacity: .35; }
.fi-pond.wait .fi-float { animation: fi-bob 1.6s ease-in-out infinite; }
.fi-pond.bite .fi-float { animation: fi-dive .35s ease-in-out infinite alternate; }
.fi-pond.wait .fi-ring, .fi-pond.bite .fi-ring { animation: fi-ring 1.8s ease-out infinite; }
.fi-pond .fi-ring.r2 { animation-delay: .9s; }
@keyframes fi-bob { 50% { transform: translateY(3px); } }
@keyframes fi-dive { to { transform: translateY(14px) scale(.8); } }
@keyframes fi-ring { from { opacity: .7; transform: scale(.6); } to { opacity: 0; transform: scale(2.4); } }
.fi-say { text-align: center; color: var(--muted); margin: 4px 0 10px; }
.fi-say.hot { color: var(--text); font-weight: 700; font-size: 18px; }
.fi-big { width: 100%; padding: 15px; font-size: 17px; }
.fi-big.pulse { animation: fi-pulse .5s ease-in-out infinite alternate; }
@keyframes fi-pulse { to { transform: scale(1.04); } }
.fi-msg { text-align: center; margin-top: 10px; color: var(--muted); }
.fi-res { display: flex; flex-direction: column; align-items: center; gap: 4px; text-align: center; margin-bottom: 12px; }
.fi-res.miss b { font-weight: 600; }
.fi-em { font-size: 34px; line-height: 1; }
.fi-rar { font-size: 13px; color: var(--muted); }
.fi-badge { font-style: normal; font-size: 12px; padding: 3px 10px; border-radius: 99px; background: #E2B85A33; color: #F6DC8C; }
.fi-list { padding: 4px 8px; }
.fi-row { display: flex; align-items: center; gap: 10px; padding: 10px 2px; border-bottom: 1px solid var(--line2); }
.fi-row:last-child { border-bottom: 0; }
.fi-row .fi-em { font-size: 26px; }
.fi-tx { flex: 1; display: flex; flex-direction: column; min-width: 0; }
.fi-tx span { font-size: 12px; color: var(--muted); }
.fi-list + .fi-big { margin-top: 12px; }
.fi-rod { display: flex; flex-direction: column; align-items: center; gap: 6px; text-align: center; margin-bottom: 12px; }
.fi-rod span { color: var(--muted); font-size: 13px; }
.fi-book { display: grid; grid-template-columns: repeat(auto-fill, minmax(96px, 1fr)); gap: 8px; }
.fi-cell { display: flex; flex-direction: column; align-items: center; gap: 3px; padding: 10px 6px; border-radius: 14px; background: var(--card); border: 1px solid var(--line2); text-align: center; }
.fi-cell b { font-size: 13px; }
.fi-cell span { font-size: 11px; color: var(--muted); }
.fi-cell.unknown { opacity: .55; }
.r-uncommon { border-color: #4FB47766; } .r-rare { border-color: #4A8FE066; } .r-epic { border-color: #A46BF066; } .r-legendary { border-color: #E2B85AAA; }
.fi-res.r-uncommon .fi-rar { color: #6FD497; } .fi-res.r-rare .fi-rar { color: #7FB2F0; } .fi-res.r-epic .fi-rar { color: #C59BFF; } .fi-res.r-legendary .fi-rar { color: #F6DC8C; }
@media (prefers-reduced-motion: reduce) { .fi-pond *, .fi-big.pulse { animation: none !important; } }

/* ---------- 💼 Робота (js/work.js) ---------- */
.wk-tabs { grid-template-columns: repeat(2, 1fr); }
.wk-ride { display: flex; flex-direction: column; align-items: center; gap: 6px; text-align: center; margin-bottom: 12px; }
.wk-bar { width: 100%; height: 10px; border-radius: 99px; background: var(--line2); overflow: hidden; margin-top: 4px; }
.wk-bar i { display: block; height: 100%; background: linear-gradient(90deg, #E2B85A, #F6DC8C); transition: width .25s linear; }
.wk-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 8px; margin: 4px 0 12px; }
.wk-cell { aspect-ratio: 1; border-radius: 14px; border: 1px solid var(--line2); background: linear-gradient(#3A3246, #231C2C);
  font: inherit; font-size: 24px; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 2px; cursor: pointer; color: var(--text); }
button.wk-cell:active { transform: scale(.94); }
.wk-cell.open { background: var(--card); cursor: default; }
.wk-cell.open em { font-style: normal; font-size: 11px; color: var(--muted); }
.wk-cell.boom { background: #5A1F1F; border-color: #E04A4A88; }
.wk-cell.ghost { opacity: .45; }
.wk-legend .fi-row { padding: 6px 2px; }
.wk-cash { font-size: 15px; color: var(--text) !important; }
@media (prefers-reduced-motion: reduce) { .wk-bar i { transition: none; } }

/* ---------- 🏙 Місто (кнопка над каталогом і сторінка) ---------- */
.town-list { display: flex; flex-direction: column; gap: 10px; }
.town-card { display: flex; align-items: center; gap: 12px; width: 100%; padding: 14px; border-radius: 16px; border: 1px solid var(--line2);
  background: var(--card); color: var(--text); font: inherit; text-align: left; cursor: pointer; }
.town-card:active { transform: scale(.98); }
.town-em { font-size: 30px; line-height: 1; }
.town-tx { flex: 1; display: flex; flex-direction: column; gap: 2px; min-width: 0; }
.town-tx span { font-size: 13px; color: var(--muted); }

/* Місто й Розіграші — поруч одним рядом над каталогом */
.banner-row { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 8px; margin-bottom: 12px; }
.banner-row .gw-banner { flex-direction: column; align-items: flex-start; gap: 4px; padding: 10px; position: relative; min-width: 0; }
.banner-row .gw-b-em { font-size: 24px; }
.banner-row .gw-b-main { min-width: 0; }
.banner-row .gw-b-main b { font-size: 15px; }
.banner-row .gw-b-main span { font-size: 12px; line-height: 1.3; color: var(--text); }
.banner-row .chev { position: absolute; top: 8px; right: 10px; }
.town-banner { background: linear-gradient(120deg, rgba(127,201,160,.2), rgba(148,181,245,.14)); border-color: rgba(127,201,160,.45); }
.site-banner { background: linear-gradient(120deg, rgba(148,181,245,.2), rgba(190,160,245,.12)); border-color: rgba(148,181,245,.45); }
/* ---------- сторінка гри: обкладинка зверху ---------- */
.g-cover { position: relative; height: 150px; border-radius: 18px; overflow: hidden; background: linear-gradient(160deg, var(--h1), var(--h2)); border: 1px solid var(--line); }
.g-cover img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.g-cover-em { position: absolute; inset: 0; display: flex; align-items: center; justify-content: center; font-size: 64px; }
.g-cover-tx { position: absolute; left: 0; right: 0; bottom: 0; padding: 28px 14px 12px; background: linear-gradient(transparent, rgba(0,0,0,.82) 55%); }
.g-cover-tx h1 { margin: 0; font-family: var(--serif); font-size: 24px; line-height: 1.15; color: #fff; overflow-wrap: anywhere; }
.g-cover-tx span { display: block; margin-top: 2px; font-size: 13px; color: rgba(255,255,255,.9); }
.g-cover + .g-tags { margin-top: 10px; }
.btns .btn.wide { flex-basis: 100%; }

/* розіграші: шаблони й перевірка жеребу */
.gw-tpls { display: flex; flex-wrap: wrap; gap: 6px; }
.gw-fp code, .gw-proof code { font-size: 11px; word-break: break-all; }
.gw-proof { margin-top: 10px; padding: 10px 12px; border-radius: 12px; border: 1px solid var(--line2); background: var(--card2, rgba(255,255,255,.03)); display: flex; flex-direction: column; gap: 6px; }
.gw-proof.ok { border-color: rgba(127,201,160,.5); }
.gw-proof.bad { border-color: rgba(240,110,98,.6); }
.gw-ord { display: flex; flex-direction: column; gap: 2px; font-size: 13px; }
.gw-ord .skip { color: var(--muted); text-decoration: line-through; }

/* Аркади (з 04.12): зал автоматів — неонова вивіска, підлога-сітка, автомати з екраном і пультом */
.arc-page { position: relative; padding: 8px 2px 120px; background:
  linear-gradient(transparent 55%, rgba(47,224,208,.07)),
  repeating-linear-gradient(90deg, rgba(47,224,208,.07) 0 1px, transparent 1px 40px) bottom / 100% 45% no-repeat; }
.arc-sign { margin: 6px auto 4px; width: fit-content; padding: 8px 22px 10px; border: 2px solid #FF4FB0; border-radius: 14px;
  box-shadow: 0 0 12px rgba(255,79,176,.55), inset 0 0 12px rgba(255,79,176,.35); background: rgba(20,6,30,.6); }
.arc-sign span { font-family: var(--serif); font-size: 30px; font-weight: 800; letter-spacing: .06em; color: #FFE9F6;
  text-shadow: 0 0 6px #FF4FB0, 0 0 18px #FF4FB0, 0 0 34px rgba(255,79,176,.6); animation: arc-flick 2.4s 1 both; }
@keyframes arc-flick { 0%, 8%, 14% { opacity: .25; } 10%, 18%, 100% { opacity: 1; } }
.arc-sub { margin: 8px 0 16px; text-align: center; font-size: 13px; color: #9FF3EA; text-shadow: 0 0 8px rgba(47,224,208,.5); }
.arc-hall { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 14px 12px; }
.arc-cab { position: relative; display: flex; flex-direction: column; cursor: pointer; border-radius: 14px 14px 6px 6px; padding: 0 8px 8px;
  background: linear-gradient(90deg, #2C1A58, #5A35A8 50%, #2C1A58); box-shadow: 0 10px 24px rgba(0,0,0,.5), 0 0 0 1px rgba(255,255,255,.06);
  transition: transform .15s, box-shadow .15s; -webkit-tap-highlight-color: transparent; }
.arc-cab:active { transform: scale(.97); }
.arc-cab:focus-visible { outline: 2px solid #2FE0D0; outline-offset: 3px; }
.arc-top { margin: 0 -8px; padding: 8px 6px; border-radius: 14px 14px 0 0; background: #FF4FB0; color: #fff; text-align: center;
  font-family: var(--serif); font-weight: 800; font-size: 14px; line-height: 1.15; text-shadow: 0 0 8px rgba(255,255,255,.6); overflow-wrap: anywhere; }
.arc-screen { position: relative; margin-top: 8px; aspect-ratio: 4 / 5; border-radius: 10px; overflow: hidden; background: #04101F;
  border: 3px solid #120A2A; box-shadow: 0 0 0 1px #2FE0D0, 0 0 14px rgba(47,224,208,.45); }
.arc-screen img { width: 100%; height: 100%; object-fit: cover; object-position: top; }
.arc-screen::after { content: ""; position: absolute; inset: 0; pointer-events: none; border-radius: 6px;
  background: repeating-linear-gradient(transparent 0 2px, rgba(0,0,0,.22) 2px 3px), radial-gradient(120% 90% at 50% 40%, transparent 60%, rgba(0,0,0,.55)); }
.arc-em { position: absolute; inset: 0; display: grid; place-items: center; font-size: 44px; }
.arc-start { position: absolute; left: 0; right: 0; bottom: 10px; z-index: 1; text-align: center; font: 700 11px/1 ui-monospace, monospace;
  letter-spacing: .12em; text-transform: uppercase; color: #F6DC8C; text-shadow: 0 0 6px rgba(246,220,140,.9); animation: arc-blink 1.2s steps(2, start) infinite; }
@keyframes arc-blink { to { visibility: hidden; } }
.arc-panel { position: relative; height: 26px; margin: 8px -4px 0; border-radius: 4px 4px 8px 8px; background: linear-gradient(#6A44C0, #2A1A55);
  clip-path: polygon(0 0, 100% 0, 96% 100%, 4% 100%); }
.arc-panel i { position: absolute; border-radius: 50%; }
.arc-stick { left: 16%; top: 4px; width: 12px; height: 12px; background: #FF4F6A; box-shadow: 0 6px 0 -3px #B8B8C8; }
.arc-b { top: 8px; width: 9px; height: 9px; }
.arc-b.b1 { left: 52%; background: #2FE0D0; } .arc-b.b2 { left: 66%; background: #F6DC8C; } .arc-b.b3 { left: 80%; background: #FF4FB0; }
.arc-foot { margin-top: 8px; font-size: 11.5px; line-height: 1.3; color: rgba(255,255,255,.88); text-align: center; }
.arc-cab.off { cursor: default; filter: saturate(.35) brightness(.8); }
.arc-cab.off .arc-top { background: #4A3A70; text-shadow: none; }
.arc-noise { position: absolute; inset: 0; opacity: .5; background:
  repeating-radial-gradient(circle at 30% 40%, rgba(255,255,255,.18) 0 1px, transparent 1px 3px),
  repeating-radial-gradient(circle at 70% 60%, rgba(255,255,255,.12) 0 1px, transparent 1px 4px); animation: arc-noise .25s steps(3) infinite; }
@keyframes arc-noise { 33% { transform: translate(-2px, 1px); } 66% { transform: translate(1px, -2px); } }
.arc-cab.off .arc-start { animation: none; color: #B9B1D0; text-shadow: none; }
@media (prefers-reduced-motion: reduce) { .arc-sign span, .arc-start, .arc-noise { animation: none; } .arc-cab { transition: none; } }

/* Швидке жеребкування: новий результат блимає — видно, що жереб пройшов ще раз */
.q-flash { animation: qflash .5s ease-out; }
@keyframes qflash { from { opacity: .2; transform: scale(.97); } }

/* 🎁 Розіграші v2: список із вкладками й пошуком, сторінка розіграшу з обкладинкою, форма з умовами */
.gw-bar { display: flex; gap: 8px; margin-top: 12px; }
.gw-bar input { flex: 1; min-width: 0; min-height: 42px; padding: 8px 12px; border-radius: 12px; border: 1px solid var(--line); background: var(--inset); color: var(--text); font: inherit; font-size: 14px; }
.gw-bar .btn { flex: none; }
.gw-tabs { margin: 10px 0; }
.gw-list { padding: 4px 0; }
.gw-row2 { display: flex; align-items: center; gap: 12px; width: 100%; padding: 10px 14px; border: 0; background: none; color: inherit; font: inherit; text-align: left; cursor: pointer; }
.gw-row2 + .gw-row2 { border-top: 1px solid var(--line2); }
.gw-row2:active { background: var(--inset); }
.gw-th { flex: none; width: 52px; height: 52px; border-radius: 12px; background: var(--inset) center / cover no-repeat; display: grid; place-items: center; font-size: 26px; }
.gw-r-main { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 2px; }
.gw-r-main b { font-size: 15px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.gw-r-prize { font-size: 13px; color: var(--gold2); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.gw-r-meta { font-size: 12px; color: var(--muted); font-variant-numeric: tabular-nums; }
.gw-r-go { flex: none; font-size: 22px; color: var(--muted); }
.gw-list > .cap { padding: 12px 14px; }
.gwp-hero { position: relative; margin-top: 4px; }
.gwp-cover { width: 100%; aspect-ratio: 16 / 9; border-radius: 18px; background: var(--inset) center / cover no-repeat; display: grid; place-items: center; font-size: 64px; }
.gwp-cover.none { background: linear-gradient(135deg, rgba(232, 184, 92, .25), rgba(120, 90, 200, .25)); }
.gwp-cd { position: absolute; left: 10px; bottom: 10px; padding: 6px 12px; border-radius: 12px; background: rgba(10, 14, 30, .78); color: #fff; font-weight: 700; font-variant-numeric: tabular-nums; backdrop-filter: blur(6px); }
.gwp-head { margin-top: 12px; }
.gwp-st { display: inline-block; padding: 2px 10px; border-radius: 10px; font-size: 12px; background: var(--inset); color: var(--soft); }
.gwp-st.active { color: #6FD49A; }
.gwp-head .q-h1 { margin: 6px 0 2px; }
.gwp-tiles { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; margin: 14px 0 6px; }
.gwp-tiles > div { display: flex; flex-direction: column; align-items: center; gap: 2px; padding: 12px 6px; border-radius: 14px; background: var(--card, var(--inset)); border: 1px solid var(--line2); text-align: center; }
.gwp-tiles b { font-size: 15px; font-variant-numeric: tabular-nums; }
.gwp-tiles small { font-size: 12px; color: var(--muted); }
.gw-conds > div { padding: 4px 0; font-size: 14px; }
.gw-inv { margin-top: 10px; padding: 10px 12px; border-radius: 12px; background: var(--inset); display: flex; flex-direction: column; gap: 2px; }
.gw-inv.ok b { color: #6FD49A; }
.gw-inv span { font-size: 13px; color: var(--soft); }
.gw-cov .gwp-cover { margin-bottom: 8px; }
.gw-sw { display: flex; align-items: flex-start; gap: 10px; margin: 10px 0; cursor: pointer; }
.gw-sw input { width: 20px; height: 20px; margin-top: 2px; flex: none; accent-color: var(--gold2); }
.gw-sw span { display: flex; flex-direction: column; gap: 2px; }
.gw-sw small { font-size: 12px; color: var(--muted); }
/* розіграші: правила й скарга */
.gw-links { margin: 0 0 8px; }
.gw-rules p { margin: 0 0 10px; line-height: 1.45; }
.gw-rules p:last-child { margin-bottom: 0; }
.gw-report { display: flex; flex-direction: column; gap: 10px; margin-top: 12px; }
.gw-report input { width: 100%; }
