/* ============================================================
   CZE7 v1.10 — stylesheet
   Three tabs, three palettes, one grammar.
   ============================================================ */

:root {
  --font: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Ubuntu, sans-serif;
  --mono: ui-monospace, 'SF Mono', 'Cascadia Mono', Menlo, Consolas, monospace;
  --emoji: 'Apple Color Emoji', 'Segoe UI Emoji', 'Noto Color Emoji', sans-serif;
  --ease: cubic-bezier(.22, 1, .36, 1);
  --t: .55s var(--ease);

  /* default = Q&A theme */
  --bg: #100e1c;
  --bg2: #17132b;
  --panel: rgba(255, 255, 255, .045);
  --panel2: rgba(255, 255, 255, .075);
  --ink: #ece9f7;
  --dim: #9d97bd;
  --accent: #a78bfa;
  --accent2: #f0abfc;
  --line: rgba(167, 139, 250, .26);
  --line-strong: rgba(167, 139, 250, .5);
  --radius: 18px;
  --radius-sm: 12px;
  --corner: 0;
  --glow: 0 0 34px rgba(167, 139, 250, .22);
}

body[data-tab='wind'] {
  --bg: #041820;
  --bg2: #062a34;
  --ink: #e2fbff;
  --dim: #86b8c4;
  --accent: #22d3ee;
  --accent2: #5eead4;
  --line: rgba(34, 211, 238, .26);
  --line-strong: rgba(34, 211, 238, .55);
  --radius: 24px 8px 24px 8px;
  --radius-sm: 16px 5px 16px 5px;
  --glow: 0 0 34px rgba(34, 211, 238, .2);
}

body[data-tab='moto'] {
  --bg: #120e0d;
  --bg2: #1d1513;
  --ink: #f6ece9;
  --dim: #b39a94;
  --accent: #ef4444;
  --accent2: #f59e0b;
  --line: rgba(239, 68, 68, .3);
  --line-strong: rgba(239, 68, 68, .6);
  --radius: 4px;
  --radius-sm: 3px;
  --corner: 12px;
  --glow: 0 0 34px rgba(239, 68, 68, .2);
}

* { margin: 0; padding: 0; box-sizing: border-box; }

html { scroll-behavior: smooth; }

body {
  font-family: var(--font);
  background: var(--bg);
  color: var(--ink);
  min-height: 100vh;
  overflow-x: hidden;
  transition: background var(--t), color var(--t);
  -webkit-font-smoothing: antialiased;
}

/* ---------- background effects (kept at ~10%) ---------- */

.bgfx { position: fixed; inset: 0; pointer-events: none; z-index: 0; overflow: hidden; }
.bgfx::before {
  content: ''; position: absolute; inset: -20%;
  background:
    radial-gradient(45% 38% at 18% 12%, var(--accent) 0%, transparent 62%),
    radial-gradient(42% 40% at 84% 78%, var(--accent2) 0%, transparent 62%);
  opacity: .10;
  filter: blur(38px);
  transition: opacity var(--t);
  animation: drift 26s var(--ease) infinite alternate;
}
@keyframes drift { from { transform: translate3d(-2%, -1%, 0) scale(1); } to { transform: translate3d(2%, 2%, 0) scale(1.06); } }

.bgfx .texture { position: absolute; inset: 0; opacity: .10; transition: opacity var(--t), background-image var(--t); }
body[data-tab='qa'] .bgfx .texture {
  background-image: radial-gradient(circle at 1px 1px, var(--accent) 1px, transparent 0);
  background-size: 34px 34px;
}
body[data-tab='wind'] .bgfx .texture {
  background-image: repeating-radial-gradient(circle at 50% 120%, transparent 0 38px, var(--accent) 38px 39px);
}
body[data-tab='moto'] .bgfx .texture {
  /* toned down in v1.01: 1px lines, twice the spacing, and masked away
     from the middle of the page so they never sit under running text */
  background-image: repeating-linear-gradient(115deg, var(--accent) 0 1px, transparent 1px 26px);
  opacity: .05;
  -webkit-mask-image: linear-gradient(90deg, #000 0%, transparent 26%, transparent 74%, #000 100%);
  mask-image: linear-gradient(90deg, #000 0%, transparent 26%, transparent 74%, #000 100%);
}

/* ---------- shell ---------- */

.shell { position: relative; z-index: 1; max-width: 1080px; margin: 0 auto; padding: 0 20px 90px; }

/* ---------- header ---------- */

.topbar {
  position: sticky; top: 0; z-index: 40;
  display: flex; align-items: center; gap: 14px;
  padding: 14px 0 12px;
  background: linear-gradient(to bottom, var(--bg) 62%, transparent);
  transition: background var(--t);
}

.brand {
  display: flex; align-items: center; gap: 9px;
  font-weight: 800; font-size: 1.24rem; letter-spacing: .04em;
  cursor: pointer; border: 0; background: none; color: var(--ink);
  font-family: var(--font);
}
.brand .mark {
  width: 30px; height: 30px; display: grid; place-items: center;
  border-radius: 9px; background: linear-gradient(140deg, var(--accent), var(--accent2));
  color: #0b0b12; font-weight: 900; font-size: 1.02rem;
  box-shadow: var(--glow); transition: box-shadow var(--t), background var(--t);
}
.brand:hover .mark { animation: pop .5s var(--ease); }
@keyframes pop { 40% { transform: scale(1.16) rotate(-7deg); } }

.spacer { flex: 1; }

.tools { display: flex; align-items: center; gap: 8px; }

.iconbtn {
  height: 36px; min-width: 36px; padding: 0 10px;
  display: inline-flex; align-items: center; justify-content: center; gap: 6px;
  border: 1px solid var(--line); border-radius: var(--radius-sm);
  background: var(--panel); color: var(--ink);
  cursor: pointer; font-size: .84rem; font-family: var(--font);
  transition: border-color .2s, background .2s, transform .2s var(--ease), box-shadow .2s;
}
.iconbtn:hover { border-color: var(--line-strong); background: var(--panel2); transform: translateY(-1px); box-shadow: var(--glow); }
.iconbtn:active { transform: translateY(0) scale(.97); }
.iconbtn .emo { font-family: var(--emoji); font-size: 1.05rem; line-height: 1; }

.langswitch { display: flex; gap: 4px; padding: 3px; border: 1px solid var(--line); border-radius: var(--radius-sm); background: var(--panel); }
.langbtn {
  display: inline-flex; align-items: center; gap: 6px;
  padding: 4px 9px; border: 0; border-radius: calc(var(--radius-sm) - 3px);
  background: transparent; color: var(--dim); cursor: pointer;
  font-family: var(--font); font-size: .76rem; font-weight: 700; letter-spacing: .05em;
  transition: background .2s, color .2s, transform .2s var(--ease);
}
.langbtn:hover { color: var(--ink); transform: translateY(-1px); }
.langbtn[aria-pressed='true'] { background: var(--panel2); color: var(--ink); box-shadow: inset 0 0 0 1px var(--line-strong); }
.flag { display: block; border-radius: 3px; }
.langbtn .flag { width: 21px; height: 14px; }

/* ---------- tabs ---------- */

.tabs { display: flex; gap: 8px; margin: 6px 0 22px; flex-wrap: wrap; }
.tab {
  position: relative; padding: 11px 20px;
  border: 1px solid var(--line); border-radius: var(--radius);
  background: var(--panel); color: var(--dim);
  font-family: var(--font); font-size: .95rem; font-weight: 650; cursor: pointer;
  transition: color .25s, border-color .25s, background .25s, transform .25s var(--ease);
  overflow: hidden;
}
body[data-tab='moto'] .tab { clip-path: polygon(var(--corner) 0, 100% 0, 100% calc(100% - var(--corner)), calc(100% - var(--corner)) 100%, 0 100%, 0 var(--corner)); }
.tab:hover { color: var(--ink); transform: translateY(-2px); border-color: var(--line-strong); }
.tab[aria-selected='true'] { color: #0d0b14; border-color: transparent; background: linear-gradient(130deg, var(--accent), var(--accent2)); box-shadow: var(--glow); }
.tab[aria-selected='true']::after {
  content: ''; position: absolute; inset: 0;
  background: linear-gradient(105deg, transparent 30%, rgba(255, 255, 255, .55) 50%, transparent 70%);
  transform: translateX(-120%); animation: shimmer 3.4s var(--ease) infinite;
}
@keyframes shimmer { 0% { transform: translateX(-120%); } 55%, 100% { transform: translateX(120%); } }

/* ---------- panels & cards ---------- */

.panel {
  border: 1px solid var(--line); border-radius: var(--radius);
  background: var(--panel); backdrop-filter: blur(9px);
  padding: 18px; transition: border-color .25s, background var(--t), border-radius var(--t);
}
body[data-tab='moto'] .panel { border-left: 3px solid var(--accent); }
/* solid-ish ground under motorsport text, so the diagonals never read through it */
body[data-tab='moto'] .card,
body[data-tab='moto'] .panel,
body[data-tab='moto'] .stat { background: rgba(24, 17, 15, .72); }
body[data-tab='moto'] .card:hover,
body[data-tab='moto'] .stat:hover { background: rgba(34, 24, 21, .86); }

.statrow { display: grid; grid-template-columns: repeat(3, 1fr); gap: 10px; margin-bottom: 18px; }
.stat {
  border: 1px solid var(--line); border-radius: var(--radius-sm);
  background: var(--panel); padding: 13px 15px; cursor: default;
  transition: border-color .2s, transform .25s var(--ease), background .2s, border-radius var(--t);
}
.stat:hover { border-color: var(--line-strong); transform: translateY(-2px); background: var(--panel2); }
.stat .n { font-size: 1.85rem; font-weight: 800; line-height: 1; font-variant-numeric: tabular-nums; letter-spacing: -.02em; }
.stat .n.accent { background: linear-gradient(120deg, var(--accent), var(--accent2)); -webkit-background-clip: text; background-clip: text; color: transparent; }
.stat .k { font-size: .74rem; color: var(--dim); margin-top: 5px; letter-spacing: .07em; text-transform: uppercase; }

.chips { display: flex; gap: 7px; flex-wrap: wrap; margin-bottom: 16px; }
.chip {
  padding: 7px 13px; border: 1px solid var(--line); border-radius: 999px;
  background: transparent; color: var(--dim); cursor: pointer;
  font-family: var(--font); font-size: .8rem; font-weight: 600;
  transition: all .2s var(--ease);
}
body[data-tab='moto'] .chip { border-radius: 3px; }
.chip:hover { color: var(--ink); border-color: var(--line-strong); transform: translateY(-1px); }
.chip[aria-pressed='true'] { background: var(--accent); border-color: var(--accent); color: #0d0b14; font-weight: 750; }

.list { display: flex; flex-direction: column; gap: 10px; }

.card {
  position: relative;
  border: 1px solid var(--line); border-radius: var(--radius);
  background: var(--panel); padding: 15px 17px;
  transition: border-color .22s, transform .3s var(--ease), background .22s, box-shadow .25s, border-radius var(--t);
  animation: reveal .5s var(--ease) both;
}
body[data-tab='moto'] .card { clip-path: polygon(var(--corner) 0, 100% 0, 100% calc(100% - var(--corner)), calc(100% - var(--corner)) 100%, 0 100%, 0 var(--corner)); }
.card:hover { border-color: var(--line-strong); transform: translateY(-2px); background: var(--panel2); box-shadow: var(--glow); }
@keyframes reveal { from { opacity: 0; transform: translateY(14px); } to { opacity: 1; transform: none; } }

/* ---------- Q&A ---------- */

/* answer control, top-right of every question card */
.q-card { position: relative; }
.q-card .q-text { padding-right: 128px; }

.q-answer-btn {
  position: absolute; top: 11px; right: 12px;
  display: inline-flex; align-items: center; gap: 6px;
  padding: 5px 11px;
  border: 1px solid var(--line); border-radius: 999px;
  background: transparent; color: var(--dim);
  font-family: var(--font); font-size: .76rem; font-weight: 650;
  cursor: pointer; opacity: .5;
  transition: opacity .2s, color .2s, border-color .2s, background .2s, transform .2s var(--ease);
}
body[data-tab='moto'] .q-answer-btn { border-radius: 3px; }
.q-card:hover .q-answer-btn { opacity: 1; }
.q-answer-btn:hover,
.q-answer-btn:focus-visible {
  opacity: 1; color: var(--ink);
  border-color: var(--line-strong); background: var(--panel2);
  transform: translateY(-1px);
}
.q-answer-btn .ico { font-size: .9rem; line-height: 1; }
.q-answer-btn.has { color: var(--accent); border-color: var(--line-strong); opacity: .75; }
.q-card.editing .q-answer-btn { opacity: 1; background: var(--panel2); color: var(--ink); }

/* inline answer editor */
.q-edit {
  margin-top: 12px; padding: 12px 14px;
  border-left: 3px solid var(--accent);
  border-radius: 0 var(--radius-sm) var(--radius-sm) 0;
  background: rgba(0, 0, 0, .26);
  animation: reveal .35s var(--ease) both;
}
.q-edit .lab {
  display: block; font-size: .68rem; letter-spacing: .12em; text-transform: uppercase;
  color: var(--accent); margin-bottom: 7px; font-weight: 750;
}
.q-edit-text {
  width: 100%; min-height: 78px; resize: vertical;
  padding: 11px 13px; border: 1px solid var(--line); border-radius: var(--radius-sm);
  background: rgba(0, 0, 0, .3); color: var(--ink);
  font-family: var(--font); font-size: .95rem; line-height: 1.5;
}
.q-edit-text:focus { outline: 0; border-color: var(--accent); box-shadow: var(--glow); }
.q-edit-row { display: flex; gap: 8px; align-items: center; flex-wrap: wrap; margin-top: 10px; }

/* password prompt */
.modal.unlock { display: none; place-items: center; }
.modal.unlock.on { display: grid; }
.unlock-box {
  width: 100%; max-width: 380px;
  border: 1px solid var(--line-strong); border-radius: 16px;
  background: #0d0b16; padding: 22px;
  box-shadow: 0 30px 80px rgba(0, 0, 0, .7);
  animation: rise .3s var(--ease);
}
.unlock-box h2 { font-size: 1.05rem; font-weight: 750; margin-bottom: 7px; }
.unlock-box p { font-size: .84rem; color: var(--dim); line-height: 1.5; margin-bottom: 15px; }
.unlock-box input { margin-bottom: 13px; }
.unlock-row { display: flex; gap: 8px; align-items: center; }
.unlock-row .btn { flex: none; }

/* dev console: read-only answer preview now that answering lives on the page */
.modq-a {
  margin-top: 8px; padding: 8px 11px;
  border-left: 2px solid var(--accent); border-radius: 0 8px 8px 0;
  background: rgba(255, 255, 255, .04); font-size: .84rem; line-height: 1.45;
}
.modq-a.empty { color: var(--dim); font-style: italic; border-left-color: var(--line); }

.askbox { display: flex; gap: 10px; align-items: stretch; margin-bottom: 8px; }
.askbox textarea {
  flex: 1; min-height: 58px; max-height: 190px; resize: vertical;
  padding: 14px 16px; border: 1px solid var(--line); border-radius: var(--radius-sm);
  background: rgba(0, 0, 0, .22); color: var(--ink);
  font-family: var(--font); font-size: .97rem; line-height: 1.45;
  transition: border-color .2s, box-shadow .2s, border-radius var(--t);
}
.askbox textarea:focus { outline: 0; border-color: var(--accent); box-shadow: var(--glow); }
.askbox textarea::placeholder { color: var(--dim); }

.btn {
  padding: 11px 22px; border: 0; border-radius: var(--radius-sm);
  background: linear-gradient(130deg, var(--accent), var(--accent2)); color: #0d0b14;
  font-family: var(--font); font-weight: 750; font-size: .93rem; cursor: pointer; white-space: nowrap;
  transition: transform .2s var(--ease), box-shadow .2s, filter .2s, border-radius var(--t);
}
.askbox .btn { padding: 0 22px; }
.btn:hover { transform: translateY(-2px); box-shadow: var(--glow); filter: brightness(1.08); }
.btn:active { transform: translateY(0) scale(.98); }
.btn[disabled] { opacity: .45; cursor: not-allowed; transform: none; box-shadow: none; }
.btn.ghost { background: transparent; color: var(--ink); border: 1px solid var(--line); padding: 9px 16px; }
.btn.ghost:hover { border-color: var(--line-strong); }
.btn.danger { background: linear-gradient(130deg, #ef4444, #f97316); color: #fff; }
.btn.sm { padding: 6px 12px; font-size: .8rem; border-radius: 9px; }

.formnote { font-size: .78rem; color: var(--dim); min-height: 1.1em; }
.panel > .formnote:last-child { min-height: 0; }
.formnote.err { color: #fca5a5; }
.formnote.ok { color: var(--accent2); }

.q-text { font-size: 1.02rem; line-height: 1.5; }
.q-meta { display: flex; align-items: center; gap: 9px; margin-top: 9px; font-size: .74rem; color: var(--dim); }
.q-answer {
  margin-top: 12px; padding: 12px 14px 12px 15px;
  border-left: 3px solid var(--accent); border-radius: 0 var(--radius-sm) var(--radius-sm) 0;
  background: rgba(255, 255, 255, .05); font-size: .95rem; line-height: 1.5;
  animation: reveal .45s var(--ease) both;
}
.q-answer .lab { display: block; font-size: .68rem; letter-spacing: .12em; text-transform: uppercase; color: var(--accent); margin-bottom: 5px; font-weight: 750; }
.pin { color: var(--accent2); font-family: var(--emoji); }

.dot { width: 7px; height: 7px; border-radius: 50%; background: var(--dim); flex: none; }
.dot.on { background: var(--accent2); box-shadow: 0 0 9px var(--accent2); }

/* ---------- events ---------- */

.ev { display: grid; grid-template-columns: 66px 1fr auto; gap: 15px; align-items: center; cursor: pointer; }
.ev .date {
  text-align: center; border-right: 1px solid var(--line); padding-right: 13px;
  transition: border-color .2s;
}
.ev .date .d { font-size: 1.45rem; font-weight: 800; line-height: 1; font-variant-numeric: tabular-nums; }
.ev .date .m { font-size: .7rem; text-transform: uppercase; letter-spacing: .1em; color: var(--dim); margin-top: 3px; }
.ev .date .y { font-size: .62rem; color: var(--dim); opacity: .65; margin-top: 2px; }
.ev .name { font-size: .99rem; font-weight: 650; line-height: 1.35; }
.ev .sub { display: flex; align-items: center; gap: 7px; margin-top: 6px; font-size: .78rem; color: var(--dim); flex-wrap: wrap; }
.ev .sub .flag { width: 19px; height: 13px; }
.ev .right { display: flex; flex-direction: column; align-items: flex-end; gap: 6px; }

.pill {
  padding: 4px 10px; border-radius: 999px; font-size: .7rem; font-weight: 700;
  letter-spacing: .05em; border: 1px solid var(--line); color: var(--dim); white-space: nowrap;
}
body[data-tab='moto'] .pill { border-radius: 3px; }
.pill.accent { color: var(--accent); border-color: var(--line-strong); }
.pill.live {
  color: #0d0b14; border-color: transparent; position: relative; overflow: hidden;
  background: linear-gradient(120deg, var(--accent), var(--accent2));
}
.pill.live::after {
  content: ''; position: absolute; inset: 0;
  background: linear-gradient(105deg, transparent 30%, rgba(255, 255, 255, .6) 50%, transparent 70%);
  transform: translateX(-120%); animation: shimmer 2.2s var(--ease) infinite;
}
.pill.warn { color: var(--accent2); border-color: var(--accent2); opacity: .8; }
.pill.past { opacity: .45; }

.card.is-live { border-color: var(--line-strong); box-shadow: var(--glow); }
.card.is-past { opacity: .45; }

.emptystate { height: 26px; }

/* ---------- tooltip ---------- */

#tip {
  position: fixed; z-index: 900; max-width: 320px;
  padding: 9px 12px; border-radius: 11px;
  border: 1px solid var(--line-strong);
  background: rgba(12, 10, 20, .97); color: var(--ink);
  font-size: .81rem; line-height: 1.45;
  box-shadow: 0 14px 40px rgba(0, 0, 0, .55);
  opacity: 0; transform: translateY(5px); pointer-events: none;
  transition: opacity .16s, transform .16s var(--ease);
}
#tip.on { opacity: 1; transform: none; }
#tip .tip-title { display: block; font-weight: 750; color: var(--accent); margin-bottom: 3px; font-size: .78rem; }

/* ---------- footer strip ---------- */

.strip {
  display: flex; align-items: center; gap: 14px; flex-wrap: wrap;
  margin-top: 26px; font-size: .74rem; color: var(--dim);
}
.strip .sep { opacity: .35; }

/* ---------- dev console ---------- */

/* the console lives on the lock button in the top-right toolbar (v1.01) */
#devbtn.unlocked { border-color: var(--accent); box-shadow: var(--glow); }

.modal {
  position: fixed; inset: 0; z-index: 200; display: none;
  background: rgba(5, 4, 10, .74); backdrop-filter: blur(5px);
  padding: 24px; overflow-y: auto;
}
.modal.on { display: block; animation: fade .25s var(--ease); }
@keyframes fade { from { opacity: 0; } to { opacity: 1; } }

.modal-box {
  max-width: 900px; margin: 0 auto;
  border: 1px solid var(--line-strong); border-radius: 16px;
  background: #0d0b16; box-shadow: 0 30px 80px rgba(0, 0, 0, .7);
  animation: rise .3s var(--ease);
}
@keyframes rise { from { transform: translateY(22px); opacity: 0; } to { transform: none; opacity: 1; } }
.modal-head {
  display: flex; align-items: center; gap: 12px;
  padding: 15px 18px; border-bottom: 1px solid var(--line);
}
.modal-head h2 { font-size: 1rem; font-weight: 750; }
.vbadge {
  font-family: var(--mono); font-size: .74rem; padding: 3px 9px; border-radius: 7px;
  border: 1px solid var(--line-strong); color: var(--accent);
}
.modal-body { padding: 18px; display: flex; flex-direction: column; gap: 18px; }

.devsec { border: 1px solid var(--line); border-radius: 12px; overflow: hidden; }
.devsec > summary {
  padding: 11px 14px; cursor: pointer; font-weight: 700; font-size: .88rem;
  background: rgba(255, 255, 255, .035); list-style: none;
  display: flex; align-items: center; gap: 8px;
}
.devsec > summary::-webkit-details-marker { display: none; }
.devsec > summary::before { content: '▸'; color: var(--accent); transition: transform .2s; }
.devsec[open] > summary::before { transform: rotate(90deg); }
.devsec .devsec-body { padding: 14px; display: flex; flex-direction: column; gap: 12px; }

.kv { display: grid; grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); gap: 9px; }
.kv .item { border: 1px solid var(--line); border-radius: 9px; padding: 9px 11px; }
.kv .item b { display: block; font-size: 1.15rem; font-variant-numeric: tabular-nums; }
.kv .item span { font-size: .7rem; color: var(--dim); text-transform: uppercase; letter-spacing: .06em; }

.statusline { display: flex; align-items: center; gap: 9px; font-size: .86rem; padding: 9px 11px; border-radius: 9px; border: 1px solid var(--line); }
.statusline.ok { border-color: rgba(94, 234, 212, .5); color: #99f6e4; }
.statusline.bad { border-color: rgba(248, 113, 113, .55); color: #fca5a5; }

input[type='text'], input[type='password'], input[type='date'], input[type='url'], select, textarea.dev {
  width: 100%; padding: 9px 11px; border: 1px solid var(--line); border-radius: 9px;
  background: rgba(0, 0, 0, .3); color: var(--ink); font-family: var(--font); font-size: .87rem;
}
input:focus, select:focus, textarea:focus { outline: 0; border-color: var(--accent); }
label.f { display: flex; flex-direction: column; gap: 5px; font-size: .74rem; color: var(--dim); }
.grid2 { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.row { display: flex; gap: 8px; align-items: center; flex-wrap: wrap; }
.switchrow { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 8px 0; border-bottom: 1px dashed var(--line); }
.switchrow:last-child { border-bottom: 0; }

.logbox {
  max-height: 260px; overflow-y: auto; font-family: var(--mono); font-size: .74rem;
  border: 1px solid var(--line); border-radius: 9px; padding: 10px; background: rgba(0, 0, 0, .3);
}
.logbox div { padding: 2px 0; border-bottom: 1px solid rgba(255, 255, 255, .045); }
.logbox .lvl-error { color: #fca5a5; }
.logbox .lvl-warn { color: #fcd34d; }
.logbox .lvl-info { color: var(--dim); }

.modlist { display: flex; flex-direction: column; gap: 9px; max-height: 400px; overflow-y: auto; }
.modq { border: 1px solid var(--line); border-radius: 10px; padding: 11px; }
.modq .t { font-size: .9rem; margin-bottom: 8px; }

/* ---------- confetti ---------- */

#confetti { position: fixed; inset: 0; pointer-events: none; z-index: 800; }

/* ---------- mobile ---------- */

body.force-mobile .shell { max-width: 460px; }
body.force-mobile .statrow { grid-template-columns: repeat(3, 1fr); gap: 7px; }
body.force-mobile .stat { padding: 11px 10px; }
body.force-mobile .stat .n { font-size: 1.45rem; }
body.force-mobile .stat .k { font-size: .62rem; letter-spacing: .04em; }
body.force-mobile .ev { grid-template-columns: 56px 1fr; }
body.force-mobile .ev .right { flex-direction: row; align-items: center; grid-column: 1 / -1; flex-wrap: wrap; }
body.force-mobile .askbox { flex-direction: column; }
body.force-mobile .btn { padding: 14px 22px; }
body.force-mobile .tab { flex: 1; text-align: center; padding: 14px 12px; }
body.force-mobile .chip { padding: 10px 15px; font-size: .85rem; }
body.force-mobile .grid2 { grid-template-columns: 1fr; }

@media (max-width: 720px) {
  .shell { padding: 0 14px 90px; }
  .statrow { grid-template-columns: repeat(3, 1fr); gap: 7px; }
  .stat { padding: 11px 10px; }
  .stat .n { font-size: 1.45rem; }
  .stat .k { font-size: .62rem; letter-spacing: .04em; }
  .ev { grid-template-columns: 56px 1fr; }
  .ev .right { flex-direction: row; align-items: center; grid-column: 1 / -1; flex-wrap: wrap; }
  .askbox { flex-direction: column; }
  .tabs .tab { flex: 1; text-align: center; }
  .brand span.word { display: none; }
  .grid2 { grid-template-columns: 1fr; }
  .modal { padding: 10px; }
}

/* four tools in the bar now — keep them on one line on narrow phones */
@media (max-width: 410px) {
  .topbar { gap: 8px; }
  .tools { gap: 5px; }
  .iconbtn { height: 32px; min-width: 32px; padding: 0 6px; }
  .iconbtn .emo { font-size: .95rem; }
  .langswitch { gap: 2px; padding: 2px; }
  .langbtn { padding: 4px 6px; gap: 4px; font-size: .68rem; }
  .langbtn .flag { width: 18px; height: 12px; }
}

@media (max-width: 560px) {
  .q-card .q-text { padding-right: 0; }
  .q-answer-btn { position: static; margin-bottom: 10px; opacity: 1; }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: .001ms !important; transition-duration: .001ms !important; }
}
