:root {
  /* Αιγαίο */
  --bg: #f4f9fc;
  --card: #ffffff;
  --ink: #0b3d6e;
  --muted: #4f6c88;
  --accent: #0d5eaf;
  --accent-dark: #094a8a;
  --accent-soft: #e3eff9;
  --green: #2e9d4a;
  --green-dark: #20783a;
  --green-soft: #e5f6ea;
  --red: #e0534a;
  --red-dark: #b43b33;
  --red-soft: #fdeaea;
  --amber: #8a5200;
  --amber-soft: #fff3e0;
  --gold: #f2b705;
  --gold-dark: #c48f00;
  --silver: #c9d6e3;    /* the podium's pedestals: --ink on --silver, white on --bronze, #3a2a00 on --gold */
  --bronze: #8a5424;
  --border: #d6e5ef;
  --sea: #cfeaf7;
  --sand: #f7e9c6;
  --land-edge: #b8a47a;
  --nb: #ebe6da;
  --nb-edge: #d4ccbb;
  --grass: #a9d78c;
  --sea-top: #e3f4fc;
  --sea-mid: #8fd0f0;
  --sea-deep: #3d9fd8;
  --sign: #fff6dc;
  --sign-ink: #4a2d00;
  --ember: #c2410c;
  /* fills that carry white text, and the ✓/✗ inks — each pair ≥ 4.5:1 in this mode */
  --btn: #0d5eaf;
  --ok: #1b6b33;
  --bad: #b3261e;
  --pick: #a14d00;
  --ok-ink: #1b6b33;
  --bad-ink: #b3261e;
  --accent-ink: #0d5eaf;
  --radius: 16px;
  --shadow: 0 2px 8px rgba(0, 60, 120, .08), 0 6px 20px rgba(0, 60, 120, .06);
}

@media (prefers-color-scheme: dark) {
  :root {
    /* Αιγαίο τη νύχτα */
    --bg: #0b1e33;
    --card: #13263b;
    --ink: #e3eef8;
    --muted: #9fb6cc;
    --accent: #4f9be0;
    --accent-dark: #2f74b5;
    --accent-soft: #1b3552;
    --green: #4cc26a;
    --green-dark: #2f8f49;
    --green-soft: #173a26;
    --red: #f0716a;
    --red-dark: #b8453f;
    --red-soft: #3c1f22;
    --amber: #ffb74d;
    --amber-soft: #3a2f1d;
    --gold: #f5c542;
    --gold-dark: #b8901a;
    --silver: #52637a;  /* dark enough for the night's light --ink */
    --bronze: #8a5424;
    --border: #25405c;
    --sea: #10304f;
    --sand: #cdbf98;
    --land-edge: #8f8260;
    --nb: #2a3a4b;
    --nb-edge: #3a4c60;
    --grass: #3f6b47;
    --sea-top: #0b1e33;
    --sea-mid: #10304f;
    --sea-deep: #163d63;
    --sign: #fff6dc;
    --sign-ink: #4a2d00;
    --ember: #c2410c;
    --btn: #2a6db0;
    --ok: #237a3d;
    --bad: #c62828;
    --pick: #a14d00;
    --ok-ink: #4cc26a;
    --bad-ink: #f0716a;
    --accent-ink: #7db8ea;
    --shadow: 0 2px 10px rgba(0, 0, 0, .35);
  }
}

* { box-sizing: border-box; }
html, body { margin: 0; padding: 0; }
body {
  background: var(--bg);
  color: var(--ink);
  font-family: 'Manrope', -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
}

#app {
  max-width: 760px; margin: 0 auto;
  padding: 0 max(16px, env(safe-area-inset-right)) calc(60px + max(env(safe-area-inset-bottom), var(--ad-h, 0px))) max(16px, env(safe-area-inset-left));   /* --ad-h: the band the ad banner blocks (js/ads.js) */
}

.topbar {
  display: flex; align-items: center; justify-content: space-between;
  padding: calc(14px + env(safe-area-inset-top, 0px)) 2px 10px;   /* under the status bar when the app is drawn edge to edge */
  position: sticky; top: 0; background: var(--bg); z-index: 10;
}
.brand {
  font-family: inherit;
  font-size: 18px; font-weight: 700; color: var(--ink);
  background: none; border: none; cursor: pointer; padding: 6px 8px; border-radius: 8px;
}
.brand:hover { background: var(--accent-soft); }
.topbar-right { font-size: 14px; color: var(--muted); }

button:focus-visible, a:focus-visible, summary:focus-visible, input:focus-visible, textarea:focus-visible, .place:focus-visible {
  outline: 3px solid var(--accent-ink); outline-offset: 4px;
}

h1 { font-size: 26px; margin: 18px 0 4px; }
.subtitle { color: var(--muted); margin: 0 0 22px; font-size: 15px; }

/* ---- home cards ---- */
.cards { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; }
@media (max-width: 560px) { .cards { grid-template-columns: 1fr; } }

.cat-card {
  background: var(--card); border: 1px solid var(--border); border-radius: var(--radius);
  padding: 18px; cursor: pointer; box-shadow: var(--shadow);
  transition: transform .12s ease, box-shadow .12s ease;
  text-align: left; font: inherit; color: inherit; width: 100%;
}
.cat-card:hover { transform: translateY(-2px); box-shadow: 0 6px 20px rgba(43,38,32,.12); }
.cat-card .emoji { font-size: 28px; }
.cat-card h3 { margin: 8px 0 2px; font-size: 17px; }
.cat-card .meta { color: var(--muted); font-size: 13px; margin-bottom: 10px; }

.progress-track {
  height: 8px; border-radius: 6px; background: var(--border); overflow: hidden;
  display: flex;
}
.progress-fill { height: 100%; background: var(--green); }
.progress-fill.wrongpart { background: var(--red); }
.progress-label { font-size: 12px; color: var(--muted); margin-top: 6px; }

.cat-card.special { border-color: var(--red); }
.cat-card.special.exam { border-color: var(--accent); }
.badge {
  display: inline-block; font-size: 12px; font-weight: 600; padding: 2px 10px;
  border-radius: 20px; background: var(--red-soft); color: var(--bad-ink);
}
.badge.blue { background: var(--accent-soft); color: var(--accent-ink); }

.home-actions { margin-top: 26px; display: flex; gap: 10px; flex-wrap: wrap; }

/* ---- quiz ---- */
.quiz-head { display: flex; align-items: center; justify-content: space-between; margin: 14px 0 6px; gap: 10px; }
.quiz-head .where { font-size: 14px; color: var(--muted); }
.quiz-progress { font-variant-numeric: tabular-nums; font-size: 14px; color: var(--muted); white-space: nowrap; }

.qbar { height: 6px; border-radius: 4px; background: var(--border); overflow: hidden; margin-bottom: 18px; }
.qbar > div { height: 100%; background: var(--accent); transition: width .2s ease; }

.qcard {
  background: var(--card); border: 1px solid var(--border); border-radius: var(--radius);
  padding: 22px; box-shadow: var(--shadow);
}
.qnum { font-size: 13px; font-weight: 600; color: var(--accent); letter-spacing: .4px; margin-bottom: 8px; }
.qtext { font-size: 18px; font-weight: 600; margin-bottom: 18px; white-space: pre-line; }
.qimg { max-width: 100%; border-radius: 10px; border: 1px solid var(--border); margin-bottom: 16px; }

.qimgs { display: flex; flex-wrap: wrap; gap: 12px; margin-bottom: 16px; }
.qimgs figure { margin: 0; flex: 1 1 180px; max-width: 320px; }
.qimgs figcaption { font-weight: 700; color: var(--accent); margin-bottom: 4px; }
.qimgs .qimg { margin-bottom: 0; width: 100%; object-fit: contain; }
.answer-reveal .qimgs { margin-top: 12px; margin-bottom: 0; }
.answer-reveal .qimgs .qimg { max-width: 420px; }

.open-input {
  width: 100%; padding: 12px 14px; border-radius: 10px; resize: vertical;
  border: 1.5px solid var(--border); background: var(--bg); color: var(--ink);
  font: inherit; margin-bottom: 4px;
}
.open-input:focus { outline: none; border-color: var(--accent); }
.open-input.input-ok { border-color: var(--green); background: var(--green-soft); }
.open-input.input-bad { border-color: var(--red); background: var(--red-soft); }

/* Γλώσσα: κείμενο ανάγνωσης */
details.reading {
  border: 1px solid var(--border); border-radius: 10px;
  background: var(--bg); margin-bottom: 16px;
}
details.reading summary {
  cursor: pointer; padding: 12px 14px; font-weight: 600; color: var(--accent);
  list-style-position: inside;
}
details.reading .reading-body {
  padding: 4px 16px 14px; white-space: pre-line; font-size: 15px; line-height: 1.7;
}
details.reading .src { margin-top: 10px; font-size: 12px; color: var(--muted); font-style: italic; }

.orig-sentence {
  padding: 10px 14px; border-left: 3px solid var(--accent); background: var(--accent-soft);
  border-radius: 0 8px 8px 0; margin-bottom: 12px; font-weight: 600;
}

/* Γλώσσα: πλέγμα θεμάτων */
.ggrid { display: grid; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: 10px; }
.gtile {
  background: var(--card); border: 1.5px solid var(--border); border-radius: 10px;
  padding: 10px 12px; cursor: pointer; font: inherit; color: inherit; text-align: left;
  display: flex; flex-direction: column; gap: 4px; min-height: 86px;
}
.gtile:hover { border-color: var(--accent); }
.gtile b { font-size: 16px; }
.gtile .gtitle {
  font-size: 12px; color: var(--muted); line-height: 1.3;
  display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden;
}
.gtile .gscore { font-size: 12px; font-weight: 700; margin-top: auto; }
.gtile.done { border-color: var(--green); }
.gtile.done .gscore { color: var(--ok-ink); }
.gtile.haswrong { border-color: var(--red); }
.gtile.haswrong .gscore { color: var(--bad-ink); }
.gtile.started { border-color: var(--amber); }
.gtile.started .gscore { color: var(--amber); }

/* feedback */
.feedback { margin-top: 18px; padding: 14px 16px; border-radius: 10px; font-weight: 600; }
.feedback.ok { background: var(--green-soft); color: var(--ok-ink); }
.feedback.bad { background: var(--red-soft); color: var(--bad-ink); }
.feedback .detail { font-weight: 400; color: var(--ink); margin-top: 8px; white-space: pre-line; }

.answer-reveal {
  margin-top: 16px; padding: 14px 16px; border-radius: 10px;
  background: var(--accent-soft); white-space: pre-line;
}
.answer-reveal .lbl { font-size: 12px; font-weight: 700; color: var(--accent); letter-spacing: .5px; margin-bottom: 6px; }

.actions { margin-top: 20px; display: flex; gap: 10px; flex-wrap: wrap; }

.btn {
  font: inherit; font-weight: 800; padding: 11px 20px; border-radius: 12px; cursor: pointer;
  border: 1.5px solid transparent; transition: transform .08s, box-shadow .08s, filter .1s;
}
.btn:hover:not(:disabled) { filter: brightness(1.06); }
.btn.primary { background: var(--btn); color: #fff; box-shadow: 0 4px 0 var(--accent-dark); }
.btn.good { background: var(--ok); color: #fff; box-shadow: 0 4px 0 var(--green-dark); }
.btn.bad { background: var(--bad); color: #fff; box-shadow: 0 4px 0 var(--red-dark); }
.btn.primary:active:not(:disabled), .btn.good:active:not(:disabled), .btn.bad:active:not(:disabled) {
  transform: translateY(3px); box-shadow: 0 1px 0 rgba(0, 0, 0, .25);
}
.btn.ghost { background: transparent; color: var(--ink); border-color: var(--border); }
.btn:disabled { opacity: .5; cursor: default; }
.tf-no.btn { box-shadow: 0 4px 0 var(--red-dark); }
.tf-yes.btn { box-shadow: 0 4px 0 var(--green-dark); }

/* summary */
.summary { text-align: center; padding: 40px 20px; }
.summary .big { font-size: 52px; margin-bottom: 6px; }
.summary h2 { margin: 0 0 8px; }
.summary p { color: var(--muted); }
.summary .stats-row { display: flex; justify-content: center; gap: 26px; margin: 22px 0; }
.summary .stat b { display: block; font-size: 26px; }
.summary .stat span { font-size: 13px; color: var(--muted); }

.empty { text-align: center; color: var(--muted); padding: 50px 20px; }
.empty .big { font-size: 44px; margin-bottom: 10px; }

/* exam review */
.exam-verdict {
  text-align: center; padding: 26px 20px; border-radius: var(--radius);
  margin: 16px 0 20px; border: 1.5px solid var(--border); background: var(--card);
}
.exam-verdict.pass { border-color: var(--green); background: var(--green-soft); }
.exam-verdict.fail { border-color: var(--red); background: var(--red-soft); }
.exam-verdict .big { font-size: 44px; }
.exam-verdict h2 { margin: 6px 0; }
.exam-verdict p { margin: 4px 0; }

.rev-section { margin: 28px 0 12px; font-size: 18px; padding-bottom: 6px; border-bottom: 2px solid var(--border); }
.qcard.review { margin-bottom: 14px; padding: 18px; }
.qcard.review.rev-ok { border-left: 4px solid var(--green); }
.qcard.review.rev-bad { border-left: 4px solid var(--red); }
.qcard.review.rev-pending { border-left: 4px solid var(--amber); }
.rev-line { margin: 4px 0; }
.rev-line .good, .rev-line.good { color: var(--ok-ink); }
.rev-tag { font-size: 12px; font-weight: 700; padding: 1px 8px; border-radius: 12px; background: var(--amber-soft); color: var(--amber); }
.rev-tag.ok { background: var(--green-soft); color: var(--ok-ink); }
.rev-tag.bad { background: var(--red-soft); color: var(--bad-ink); }

.footer-note { margin-top: 30px; font-size: 13px; color: var(--muted); text-align: center; }
.footer-note a { color: var(--muted); }

/* ---- formats: shared ---- */
.fmt { margin-top: 4px; }
@keyframes pop { 0% { transform: scale(1); } 40% { transform: scale(1.04); } 100% { transform: scale(1); } }
@keyframes shake { 0%, 100% { transform: translateX(0); } 20%, 60% { transform: translateX(-6px); } 40%, 80% { transform: translateX(6px); } }
.is-ok, .tile.correct { animation: pop .3s ease; }
.is-bad, .tile.wrong { animation: shake .35s ease; }
@media (prefers-reduced-motion: reduce) {
  .is-ok, .is-bad, .tile.correct, .tile.wrong { animation: none; }
}

/* ---- format: tiles (multiple choice) ---- */
.tiles { display: grid; gap: 10px; }
.tile {
  display: flex; gap: 12px; align-items: flex-start; width: 100%; text-align: left;
  background: var(--card); border: 2px solid var(--border); border-bottom-width: 4px; border-radius: 14px;
  padding: 12px 14px; cursor: pointer; font: inherit; color: inherit;
  transition: transform .08s, border-color .1s, background .1s;
}
.tile .key { font-weight: 800; color: var(--accent); min-width: 22px; }
.tile:hover:not(:disabled) { border-color: var(--accent); }
.tile:active:not(:disabled) { transform: translateY(2px); border-bottom-width: 2px; }
.tile.selected { border-color: var(--accent); background: var(--accent-soft); }
.tile.correct { border-color: var(--green); background: var(--green-soft); }
.tile.wrong { border-color: var(--red); background: var(--red-soft); }
.tile:disabled { cursor: default; }
.fmt-tf3 .tiles { grid-template-columns: repeat(3, 1fr); }
.fmt-tf3 .tile { flex-direction: column; align-items: center; justify-content: center; text-align: center; font-weight: 700; }
.fmt-tf3 .tile .key { display: none; }

/* ---- format: tf (Σωστό/Λάθος cards) ---- */
.tf-dots { display: flex; gap: 6px; margin-bottom: 12px; }
.tf-dots i { flex: 1; height: 6px; border-radius: 4px; background: var(--border); }
.tf-dots i.cur { background: var(--accent); }
.tf-dots i.ok { background: var(--green); }
.tf-dots i.bad { background: var(--red); }
.tf-card {
  min-height: 120px; background: var(--card); border: 2px solid var(--border); border-radius: 18px;
  padding: 18px; font-size: 17px; font-weight: 700; box-shadow: var(--shadow); margin-bottom: 14px;
  touch-action: pan-y; user-select: none; white-space: pre-line;
}
.tf-card.is-ok { border-color: var(--green); background: var(--green-soft); }
.tf-card.is-bad { border-color: var(--red); background: var(--red-soft); }
.tf-correct { margin-top: 10px; font-size: 14px; color: var(--ok-ink); }
.tf-buttons { display: flex; gap: 10px; }
.tf-buttons .btn { flex: 1; font-size: 16px; padding: 13px; color: #fff; }
.tf-no { background: var(--bad); }
.tf-yes { background: var(--ok); }
.tf-list { display: grid; gap: 10px; }
.tf-row { background: var(--card); border: 1.5px solid var(--border); border-radius: 14px; padding: 12px; }
.tf-text { font-weight: 600; margin-bottom: 8px; }
.tf-toggle { display: flex; gap: 8px; }
.tf-toggle button {
  flex: 1; font: inherit; font-weight: 700; padding: 8px; border-radius: 10px; cursor: pointer;
  border: 2px solid var(--border); background: var(--bg); color: inherit;
}
.tf-toggle button.selected { border-color: var(--accent); background: var(--accent-soft); }

/* ---- format: match (tap the pairs) ---- */
.match-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.match-col { display: grid; gap: 8px; align-content: start; }
.m-item {
  font: inherit; font-size: 14px; font-weight: 600; text-align: left; color: inherit; cursor: pointer;
  background: var(--card); border: 2px solid var(--border); border-radius: 12px; padding: 9px 10px; min-height: 44px;
}
.m-item.picking { border-color: var(--accent); box-shadow: 0 0 0 3px var(--accent-soft); }
.m-item.pair-0 { border-color: #0d5eaf; background: rgba(13, 94, 175, .14); }
.m-item.pair-1 { border-color: #e08a00; background: rgba(224, 138, 0, .16); }
.m-item.pair-2 { border-color: #8e5cf7; background: rgba(142, 92, 247, .15); }
.m-item.pair-3 { border-color: #00a38a; background: rgba(0, 163, 138, .15); }
.m-item.pair-4 { border-color: #e0509e; background: rgba(224, 80, 158, .15); }
.m-item.pair-5 { border-color: #7a8a1f; background: rgba(122, 138, 31, .17); }
.m-item.correct { border-color: var(--green); background: var(--green-soft); }
.m-item.wrong { border-color: var(--red); background: var(--red-soft); }
.m-fix { display: block; font-size: 12px; color: var(--ok-ink); margin-top: 4px; }

/* ---- formats: chips (word bank) & typed (type into the gap) ---- */
.cloze { font-size: 17px; line-height: 2.3; font-weight: 600; white-space: pre-line; }
.cloze .blank {
  display: inline-block; min-width: 84px; min-height: 32px; vertical-align: middle; margin: 0 3px;
  font: inherit; font-size: 15px; line-height: 1.3; color: inherit; cursor: pointer;
  background: transparent; border: none; border-bottom: 3px solid var(--accent); padding: 2px 6px;
}
.cloze .blank.filled { background: var(--btn); color: #fff; border-radius: 9px; border-bottom-color: transparent; }
.cloze .blank.focus { box-shadow: 0 0 0 3px var(--accent-soft); }
.cloze .blank.correct { background: var(--ok); }
.cloze .blank.wrong { background: var(--bad); }
.cloze .fix { font-size: 13px; color: var(--ok-ink); font-weight: 700; margin: 0 4px; }
.cloze .rev-blank { padding: 1px 8px; border-radius: 8px; color: #fff; }
.cloze .rev-blank.ok { background: var(--ok); }
.cloze .rev-blank.bad { background: var(--bad); }
.per { display: inline-flex; gap: 4px; vertical-align: middle; margin: 0 3px; }
.per button {
  font: inherit; font-size: 14px; font-weight: 700; padding: 3px 9px; border-radius: 9px; line-height: 1.3;
  border: 2px solid var(--border); background: var(--card); color: inherit; cursor: pointer; min-height: 32px;
}
.per button.selected { border-color: var(--accent); background: var(--accent-soft); }
.per.correct button.selected { border-color: var(--green); background: var(--green-soft); }
.per.wrong button.selected { border-color: var(--red); background: var(--red-soft); }
.per button.answer { outline: 2px dashed var(--green); }
.bank { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 14px; }
.bank .chip {
  font: inherit; font-size: 14px; font-weight: 800; padding: 7px 12px; border-radius: 12px; cursor: pointer; color: inherit;
  background: var(--card); border: 2px solid var(--border); border-bottom-width: 4px; min-height: 44px;
}
.bank .chip.used { opacity: .3; }
.cloze.typed .gap {
  font: inherit; font-size: 15px; width: 11em; max-width: 60vw; margin: 0 3px; padding: 3px 8px; vertical-align: middle;
  border: none; border-bottom: 3px solid var(--accent); background: var(--accent-soft); color: inherit; border-radius: 6px 6px 0 0;
}
.cloze.typed .gap.input-ok { border-bottom-color: var(--green); background: var(--green-soft); }
.cloze.typed .gap.input-bad { border-bottom-color: var(--red); background: var(--red-soft); }

/* ---- format: recall (type & collect) ---- */
.recall-slots { display: flex; gap: 6px; margin-bottom: 10px; }
.recall-slots i { flex: 1; height: 10px; border-radius: 6px; background: var(--border); }
.recall-slots i.on { background: var(--green); }
.recall-form { display: flex; gap: 8px; }
.recall-form .open-input { margin: 0; }
.recall-form .btn { padding: 0 18px; font-size: 20px; }
.recall-chips { display: flex; flex-wrap: wrap; gap: 6px; margin: 12px 0 4px; }
.rchip { background: var(--bg); border: 1.5px solid var(--border); border-radius: 14px; padding: 4px 10px; font-weight: 700; font-size: 13px; }
.rchip.ok { background: var(--green-soft); border-color: var(--green); color: var(--ok-ink); }
.rchip.bad { background: var(--red-soft); border-color: var(--red); color: var(--bad-ink); }
.linkish { font: inherit; font-size: 12px; background: none; border: none; color: inherit; text-decoration: underline; cursor: pointer; display: inline-flex; align-items: center; min-height: 32px; padding: 0 6px; }

/* ---- format: map (pick the pin) ---- */
.map-prompt { font-weight: 800; font-size: 16px; margin-bottom: 8px; min-height: 24px; }
.map-box {
  position: relative; width: 100%; max-width: 440px; aspect-ratio: 320 / 274; margin: 0 auto;
  border-radius: 14px; overflow: hidden; background: var(--sea);
}
.gmap { position: absolute; inset: 0; width: 100%; height: 100%; }
.gmap .gr { fill: var(--sand); stroke: var(--land-edge); stroke-width: .8; vector-effect: non-scaling-stroke; }
.gmap .nb path { fill: var(--nb); stroke: var(--nb-edge); stroke-width: .6; vector-effect: non-scaling-stroke; }
.gmap .pin-lead { stroke: var(--ink); stroke-width: 1.2; stroke-dasharray: 3 3; vector-effect: non-scaling-stroke; }
.gmap .pin-anchor { fill: var(--ink); }
.pin {
  position: absolute; width: 32px; height: 32px; margin: -16px 0 0 -16px; padding: 0; border-radius: 50%;
  display: grid; place-items: center; font: inherit; font-weight: 800; font-size: 14px; color: #fff; cursor: pointer;
  background: var(--btn); border: 3px solid #fff; box-shadow: 0 2px 6px rgba(0, 40, 80, .35);
}
.pin:disabled { cursor: default; }
.pin.picked { background: var(--pick); }
.pin.is-ok { background: var(--ok); }
.pin.is-bad { background: var(--bad); }
.pin.is-answer { background: var(--ok); box-shadow: 0 0 0 4px rgba(27, 107, 51, .35); }
.pin .pin-name {
  position: absolute; top: 30px; left: 50%; transform: translateX(-50%); white-space: nowrap; pointer-events: none;
  font-size: 11px; font-weight: 800; color: var(--ink); background: var(--card); border-radius: 8px; padding: 1px 6px;
  box-shadow: 0 1px 3px rgba(0, 40, 80, .2);
}
.pin .pin-name:empty { display: none; }
.pin .pin-name.up { top: auto; bottom: 30px; }
.pin .pin-name.right, .pin .pin-name.left { top: 50%; transform: translateY(-50%); }
.pin .pin-name.right { left: 34px; }
.pin .pin-name.left { left: auto; right: 34px; }
.map-names { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 10px; }
.name-chip {
  font: inherit; font-size: 13px; font-weight: 700; padding: 4px 10px; border-radius: 14px; cursor: pointer;
  border: 1.5px solid var(--border); background: var(--card); color: inherit; min-height: 32px;
}
.name-chip.now { border-color: var(--accent); color: var(--accent); }
.name-chip.set { background: var(--accent-soft); }
/* pick questions: one field per picked pin for its name */
.name-field { display: flex; align-items: center; gap: 8px; flex: 1 1 100%; }
.name-field .pin-tag {
  flex: none; width: 28px; height: 28px; border-radius: 50%; display: grid; place-items: center;
  background: var(--btn); color: #fff; font-weight: 800; font-size: 13px;
}
.name-field input {
  flex: 1; min-width: 0; font: inherit; font-size: 16px; padding: 8px 12px; min-height: 40px;
  border: 1.5px solid var(--border); border-radius: 10px; background: var(--card); color: inherit;
}
.name-field input:focus { outline: none; border-color: var(--accent); }
.map-official .qimgs { margin-top: 10px; }
.map-official-rev { margin-top: 8px; }
.map-official-rev summary { cursor: pointer; font-weight: 700; color: var(--accent); }
.map-official-rev .qimgs { margin-top: 8px; }

@keyframes rise { from { transform: translateY(6px); opacity: 0; } to { transform: none; opacity: 1; } }
.feedback { animation: rise .25s ease; }
@media (prefers-reduced-motion: reduce) { .feedback { animation: none; } }

/* A focused study surface, shared by practice and exam question formats. */
.quiz-shell { padding-top: 22px; }
.quiz-shell .quiz-head { margin: 0 0 16px; gap: 18px; align-items: flex-end; }
.quiz-head > div { min-width: 0; }
.quiz-mode { display: block; font-size: 10px; font-weight: 800; letter-spacing: 1.5px; color: var(--accent-ink); margin-bottom: 5px; }
.quiz-head .where { display: block; font-size: 14px; line-height: 1.5; }
.quiz-progress { font-size: 13px; background: var(--card); border: 1px solid var(--border); border-radius: 12px; padding: 7px 12px; }
.quiz-progress b { font-size: 18px; color: var(--ink); }
.quiz-shell .qbar { height: 4px; margin-bottom: 28px; }
.quiz-shell .qcard { border-radius: 22px; padding: 30px; box-shadow: 0 8px 32px rgba(0, 40, 80, .035); }
.quiz-shell .qnum { font-size: 11px; font-weight: 700; letter-spacing: .7px; color: var(--muted); margin-bottom: 12px; }
.quiz-shell .qtext { font-size: 22px; line-height: 1.55; font-weight: 700; letter-spacing: -.35px; margin: 0 0 26px; outline: none; }
.quiz-shell .tile { border-width: 1.5px; border-radius: 13px; padding: 15px 16px; align-items: baseline; min-height: 54px; }
.quiz-shell .tile .key { font-size: 12px; flex-shrink: 0; text-align: center; min-width: 26px; line-height: 26px; border-radius: 7px; background: var(--accent-soft); color: var(--accent-ink); }
.quiz-shell .tile.selected { box-shadow: 0 0 0 1px var(--accent); }
.quiz-shell .tile.correct, .quiz-shell .tile.wrong { box-shadow: none; }
.quiz-shell .tile:active:not(:disabled) { border-bottom-width: 1.5px; transform: translateY(1px); }
.quiz-shell .tiles { gap: 10px; }
.quiz-shell .btn { min-height: 46px; font-weight: 700; box-shadow: none; }
.quiz-shell .btn:active:not(:disabled) { transform: translateY(1px); box-shadow: none; }
.quiz-shell .feedback { margin-top: 22px; border-radius: 13px; padding: 16px 18px; line-height: 1.6; }
.quiz-shell #feedbackArea .actions { justify-content: flex-end; }
.quiz-shell .qcard:has(#nextBtn) .actions:has(> [data-act="check"]) { display: none; }
.quiz-shell .quiz-exit { justify-content: center; margin-top: 18px; }
.quiz-shell .quiz-exit .btn { font-size: 12px; border-color: transparent; color: var(--muted); min-height: 44px; }
.quiz-shell .quiz-exit .btn:hover { color: var(--ink); background: var(--accent-soft); }
.quiz-shell .tf-card { box-shadow: none; border-width: 1.5px; }
.quiz-shell .bank .chip { border-width: 1.5px; font-weight: 700; }
.quiz-shell .fmt-tf3 .tile { align-items: center; }

/* ---- place links (js/places.js): a name in a Γεωγραφία card opens Wikipedia or the map ---- */
.place {
  border-radius: 3px; cursor: pointer; color: var(--accent-ink);
  text-decoration: underline dotted; text-decoration-thickness: 1.5px; text-underline-offset: 3px;
  -webkit-box-decoration-break: clone; box-decoration-break: clone;
}
.place[aria-expanded="true"] { background: var(--accent-soft); }
.place-menu {
  position: fixed; z-index: 20; display: flex; flex-direction: column; gap: 2px; min-width: 150px; padding: 6px;
  background: var(--card); border: 1px solid var(--border); border-radius: 12px; box-shadow: var(--shadow);
}
.place-menu a {
  display: flex; align-items: center; min-height: 32px; padding: 4px 10px; border-radius: 8px;
  color: var(--accent-ink); font-size: 15px; font-weight: 700; text-decoration: none;
}
.place-menu a:hover, .place-menu a:focus-visible { background: var(--accent-soft); }
.links-toggle {
  flex-shrink: 0; width: 32px; height: 32px; margin-left: auto; padding: 0; cursor: pointer;
  border: 1px solid var(--border); border-radius: 10px; background: var(--card); font-size: 15px; line-height: 1;
}
.links-toggle[aria-pressed="false"] { opacity: .45; filter: grayscale(1); }
@media (max-width: 560px) {
  .quiz-shell { padding-top: 14px; }
  .quiz-shell .qbar { margin-bottom: 18px; }
  .quiz-shell .qcard { padding: 21px 18px; border-radius: 18px; }
  .quiz-shell .qtext { font-size: 19px; line-height: 1.55; margin-bottom: 22px; }
  .quiz-shell .tile { padding: 12px; gap: 10px; font-size: 15px; }
  .quiz-shell .quiz-head { gap: 12px; }
  .quiz-shell #feedbackArea .actions > .btn { width: 100%; }
  .quiz-shell .fmt-tf3 .tile { font-size: 13px; padding: 10px 6px; }
  .topbar { gap: 8px; }
  .brand { font-size: 16px; padding: 6px 0; }
  .topbar-right { font-size: 12px; text-align: right; }
}

/* ---- Κουίζ Ελλάδα (js/kouiz-play.js): the quiz home, a round, the result. Accents: white on --ember, --amber on
   --bg, --card or --amber-soft, the ✓/✗ inks on the soft fills. Nothing is fixed to the bottom: #app's padding clears --ad-h ---- */
.kouiz-view { max-width: 520px; margin: 0 auto; padding: 18px 0 8px; display: flex; flex-direction: column; gap: 14px; }
.k-play { background: var(--ember); color: #fff; width: 100%; min-height: 52px; font-size: 17px; box-shadow: 0 4px 0 rgba(90, 30, 5, .55); }
.k-play:active:not(:disabled) { transform: translateY(3px); box-shadow: 0 1px 0 rgba(90, 30, 5, .55); }

/* the quiz home (kouiz-play renderHome): the header and its record ribbon, the sea (the 3D quiz map or its flat SVG),
   the big «Παίξε», the scoreboard (--ink by day, --card at night: see the dark block below) */
.k-head { display: flex; align-items: center; justify-content: space-between; gap: 10px; }
.k-eyebrow { margin: 0; font-size: 11px; font-weight: 800; letter-spacing: 1.6px; color: var(--amber); }
.k-head h1 { margin: 2px 0 0; font-size: 27px; font-weight: 800; line-height: 1.15; letter-spacing: -.8px; }
.k-ribbon {
  flex: none; display: flex; flex-direction: column; align-items: center; padding: 6px 11px 7px; border-radius: 14px 14px 6px 6px;
  background: var(--gold); color: #3a2a00; box-shadow: 0 3px 0 var(--gold-dark);
  font-size: 10px; font-weight: 800; letter-spacing: 1px; line-height: 1.2; text-align: center;
}
.k-ribbon b { font-size: 17px; letter-spacing: -.3px; font-variant-numeric: tabular-nums; }
.k-ribbon em { font-style: normal; letter-spacing: .4px; }
.k-sea {
  position: relative; height: 360px; border-radius: 22px; overflow: hidden;
  background: linear-gradient(180deg, var(--sea-top) 0%, var(--sea-mid) 100%); box-shadow: inset 0 0 0 1px var(--border), 0 4px 0 var(--border);
}
.k-chart {
  position: absolute; z-index: 2; left: 50%; top: 11px; transform: translateX(-50%); padding: 3px 10px; border-radius: 99px; pointer-events: none;
  background: var(--card); color: var(--muted); font-size: 10px; font-weight: 800; letter-spacing: 1.4px; white-space: nowrap;
  box-shadow: 0 1px 4px rgba(0, 30, 60, .15);
}
.k-sea .k-gl { position: absolute; inset: 0; height: auto; border-radius: 0; }
.gl-pill.k-pill {
  min-height: 28px; padding: 5px 9px; border-radius: 99px; font-size: 11px; font-weight: 800; line-height: 16px;
  box-shadow: 0 0 0 1px rgba(11, 61, 110, .1), 0 2px 8px rgba(0, 30, 60, .17); transition: box-shadow .15s, background .15s;
}
.gl-pill.k-pill.up { transform: translate(-50%, -100%); }   /* stands above its anchor, north of the island */
.gl-pill.k-pill .n { font-weight: 600; color: var(--muted); font-variant-numeric: tabular-nums; }
.gl-pill.k-pill:hover { box-shadow: 0 0 0 2px var(--accent), 0 2px 8px rgba(0, 30, 60, .17); }
.gl-pill.k-pill[aria-pressed="true"] { background: var(--sign); color: var(--sign-ink); box-shadow: 0 0 0 2px var(--gold-dark), 0 4px 12px rgba(120, 80, 0, .3); }
.gl-pill.k-pill[aria-pressed="true"] .n { color: inherit; }
.k-sea .k-arch { position: absolute; inset: 0; width: 100%; height: 100%; max-width: none; margin: 0; }
.k-arch .k-lane { fill: none; stroke: rgba(255, 255, 255, .85); stroke-width: 2; stroke-dasharray: 3 7; stroke-linecap: round; }
.k-arch .ilabel-bg { stroke: rgba(11, 61, 110, .12); stroke-width: 1; }
.k-arch .isl[aria-pressed="true"] .sand { filter: drop-shadow(0 0 6px rgba(255, 255, 255, .95)); }
.k-arch .isl[aria-pressed="true"] .ilabel-bg { fill: var(--sign); stroke: var(--gold-dark); stroke-width: 1.5; }
.k-arch .isl[aria-pressed="true"] .ilabel { fill: var(--sign-ink); }
.k-arch .isl:focus-visible .ilabel-bg { stroke: var(--accent-ink); stroke-width: 2.5; }
/* the big button: «Παίξε» and «Μονομαχία» on the quiz home, «Ταξίδεψε» under the exam home's map (game.css .travel) */
.k-home .k-play, .home-view .k-play {
  position: relative; overflow: hidden; display: flex; align-items: center; justify-content: space-between; gap: 12px;
  min-height: 84px; margin-top: 2px; padding: 12px 14px 12px 20px; border: 0; border-radius: 24px; text-align: left;
  background-image: linear-gradient(135deg, rgba(255, 255, 255, 0) 0%, rgba(70, 20, 0, .22) 100%);
  box-shadow: 0 6px 0 rgba(90, 30, 5, .8), 0 18px 26px -14px rgba(194, 65, 12, .75);
}
.k-home .k-play::before, .home-view .k-play::before { content: ""; position: absolute; right: -34px; top: -46px; width: 170px; height: 170px; border-radius: 50%; background: rgba(255, 255, 255, .08); }
.k-home .k-play::after, .home-view .k-play::after {
  content: ""; position: absolute; right: 0; bottom: 0; width: 150px; height: 26px; opacity: .22;
  background: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='40' height='26'%3E%3Cpath d='M0 14 q10 -9 20 0 t20 0 V26 H0z' fill='white'/%3E%3C/svg%3E") repeat-x bottom;
}
.k-home .k-play:active:not(:disabled), .home-view .k-play:active:not(:disabled) { transform: translateY(4px); box-shadow: 0 2px 0 rgba(90, 30, 5, .8); }
.k-play-txt { position: relative; z-index: 1; display: flex; flex-direction: column; min-width: 0; }
.k-play-txt b { font-size: 32px; font-weight: 800; line-height: 1.05; letter-spacing: -1.2px; }
.k-play-txt small { margin-top: 5px; font-size: 12px; font-weight: 700; }   /* «Χιούμορ & Memes · …» stays on one line at 360 px */
.k-disc { position: relative; z-index: 1; flex: none; display: grid; place-items: center; width: 56px; height: 56px; border-radius: 50%; background: #fff; box-shadow: 0 4px 0 rgba(0, 0, 0, .18); }
.k-disc svg { margin-left: 4px; fill: var(--ember); }
/* «Μονομαχία» right under «Παίξε»: the same button in the sea's blue (white on --btn), crossed swords in its disc */
.k-home .k-play.k-duel {
  margin-top: 0; background: var(--btn); background-image: linear-gradient(135deg, rgba(255, 255, 255, 0) 0%, rgba(0, 25, 70, .25) 100%);
  box-shadow: 0 6px 0 rgba(4, 38, 84, .85), 0 18px 26px -14px rgba(13, 94, 175, .75);
}
.k-home .k-play.k-duel:active:not(:disabled) { box-shadow: 0 2px 0 rgba(4, 38, 84, .85); }
.k-duel .k-disc { font-size: 26px; line-height: 1; }
/* the group duel's promo on the quiz home (kouiz-play): a gold tab on «Μονομαχία» (#3a2a00 on --gold), hanging from the
   button's top edge left of its disc, and a card above the map (.k-promo, styled with the start screen's strip, see
   .promo-duel), both until this device has played a battle */
.k-duel .k-badge {
  position: absolute; z-index: 2; top: 0; right: 82px; padding: 2px 9px 3px; border-radius: 0 0 10px 10px;
  background: var(--gold); color: #3a2a00; font-size: 10px; font-weight: 800; letter-spacing: .5px; line-height: 14px; white-space: nowrap;
}
.k-board { margin-top: 4px; padding: 9px 16px 8px; border-radius: 20px; background: var(--ink); color: #fff; border: 1px solid transparent; }
.k-board-head { display: flex; justify-content: space-between; align-items: center; font-size: 11px; line-height: 16px; font-weight: 800; letter-spacing: 1.6px; opacity: .78; }
.k-board-grid { display: grid; grid-template-columns: 1fr 1fr; margin-top: 2px; }
.k-cell { min-width: 0; padding: 5px 0 4px; }
.k-cell:nth-child(even) { padding-left: 14px; border-left: 1px solid rgba(255, 255, 255, .16); }
.k-cell:nth-child(n+3) { border-top: 1px solid rgba(255, 255, 255, .16); }
.k-valrow { display: flex; align-items: center; gap: 8px; }
.k-val { font-size: 21px; font-weight: 800; line-height: 24px; letter-spacing: -.5px; color: var(--gold); font-variant-numeric: tabular-nums; }
.k-lab { display: block; font-size: 11.5px; line-height: 15px; color: #fff; opacity: .78; }
.k-pips { display: grid; grid-template-columns: repeat(5, 6px); gap: 2px; }   /* two rows of five: «10/10» and its pips fit a 360 px cell */
.k-pips i { width: 6px; height: 6px; border-radius: 2px; background: rgba(255, 255, 255, .16); }
.k-pips i.on { background: var(--gold); }
.k-board .k-bar { max-width: 72px; height: 6px; margin-right: 12px; border-radius: 6px; background: rgba(255, 255, 255, .16); }
.k-board .k-bar i { background: var(--gold); transition: none; }
@media (prefers-color-scheme: dark) {
  .k-board { background: var(--card); border-color: var(--border); color: var(--ink); }
  .k-lab { color: var(--ink); }
  .k-arch .k-lane { stroke: rgba(255, 255, 255, .28); }
}

.k-topic { font-size: 12px; font-weight: 800; letter-spacing: 1.4px; color: var(--muted); }
.k-timer { display: flex; align-items: center; gap: 10px; }
.k-bar { flex: 1; height: 8px; border-radius: 8px; background: var(--border); overflow: hidden; }
.k-bar i { display: block; width: 100%; height: 100%; border-radius: inherit; background: linear-gradient(90deg, var(--gold), var(--ember)); transition: width .2s linear; }
.k-timer b { min-width: 3.4em; text-align: right; font-size: 14px; font-variant-numeric: tabular-nums; }
.k-slot { position: relative; }   /* a battle round's two slots, which js/battle.js fills: above the timer, under the answers */
.k-q { margin: 6px 0 4px; font-size: 21px; line-height: 1.45; font-weight: 700; letter-spacing: -.3px; outline: none; }
.k-answers { display: grid; gap: 10px; }
.k-ans {
  position: relative; width: 100%; min-height: 54px; padding: 13px 16px; text-align: left; cursor: pointer;
  font: inherit; font-size: 16px; font-weight: 600; color: var(--ink); background: var(--card);
  border: 1.5px solid var(--border); border-radius: 13px; transition: border-color .1s, background .1s;
}
.k-ans:hover:not(:disabled) { border-color: var(--amber); }
.k-ans:disabled { cursor: default; }
.k-ans:disabled:not(.is-ok):not(.is-bad) { opacity: .6; }
.k-ans.is-ok { background: var(--green-soft); color: var(--ok-ink); border-color: var(--green); }
.k-ans.is-bad { background: var(--red-soft); color: var(--bad-ink); border-color: var(--red); }

.k-result { position: relative; overflow: hidden; text-align: center; }
.k-big { display: block; font-size: 56px; font-weight: 800; line-height: 1; letter-spacing: -1px; color: var(--amber); font-variant-numeric: tabular-nums; }
.k-score span { display: block; margin-top: 8px; font-size: 14px; color: var(--muted); }
.k-record { background: var(--amber-soft); color: var(--amber); border: 1px solid var(--amber); border-radius: 14px; padding: 10px; font-weight: 800; }
.k-missed { text-align: left; background: var(--card); border: 1px solid var(--border); border-radius: 14px; padding: 14px 16px; }
.k-missed h2 { margin: 0 0 6px; font-size: 15px; }
.k-missed ul { margin: 0; padding-left: 18px; }
.k-missed li { margin: 6px 0; font-size: 14px; line-height: 1.5; color: var(--muted); }
.k-missed li b { color: var(--ok-ink); }
.k-btns { display: grid; gap: 10px; margin-top: 4px; }
.k-btns .btn { width: 100%; min-height: 48px; }
@media (prefers-reduced-motion: reduce) { .k-bar i, .k-ans { transition: none; } }
@media (max-width: 560px) {
  .kouiz-view { padding-top: 10px; gap: 12px; }
  .k-sea { height: 304px; }
  .k-q { font-size: 19px; }
  .k-ans { font-size: 15px; padding: 12px 14px; }
}
@media (max-width: 352px) {   /* a 320 px panel or less: smaller pills, so Θεσμοί, Όλα and Πολιτισμός fit one row */
  .gl-pill.k-pill { font-size: 10px; padding: 5px 7px; }
}

/* ---- the start screen (views.renderStart) and the ⇄ mode switch in the top bar ---- */
.start-view { max-width: 520px; margin: 0 auto; padding: 18px 0 8px; display: flex; flex-direction: column; gap: 12px; }
.start-view .eyebrow { margin: 6px 0 0; font-size: 11px; font-weight: 800; letter-spacing: 1.6px; color: var(--accent); }
.start-view h1 { margin: 0 0 4px; font-size: 26px; line-height: 1.25; letter-spacing: -.5px; }
.mode-card {
  font: inherit; text-align: left; display: flex; align-items: flex-start; gap: 12px; width: 100%; padding: 16px 14px; cursor: pointer;
  background: var(--card); color: var(--ink); border: 1.5px solid var(--border); border-radius: var(--radius); box-shadow: var(--shadow);
}
.mode-card:hover, .mode-card:focus-visible { border-color: var(--accent); }
.mode-ico { flex: none; width: 40px; height: 40px; border-radius: 12px; display: grid; place-items: center; font-size: 22px; background: var(--accent-soft); }
.mode-text { display: flex; flex-direction: column; gap: 4px; }
.mode-text b { font-size: 17px; }
.mode-text span { font-size: 14px; line-height: 1.45; color: var(--muted); }
.start-foot { margin: 6px 0 0; text-align: center; font-size: 13px; color: var(--muted); }
/* the group duel's promo, one look in two places: the strip above the two modes on the start screen (.promo-duel) and the
   card above the quiz home's map (.k-promo): white on --btn, the avatars or swords at 24 px, a gold pill (#3a2a00 on --gold) */
.promo-duel, .k-promo {
  font: inherit; text-align: left; display: flex; align-items: center; gap: 10px; width: 100%; padding: 10px 12px; cursor: pointer;
  background: var(--btn); color: #fff; border: 0; border-radius: 16px; box-shadow: 0 4px 0 rgba(4, 38, 84, .85);
}
.promo-duel:active, .k-promo:active { transform: translateY(3px); box-shadow: 0 1px 0 rgba(4, 38, 84, .85); }
.promo-e, .k-promo-e { flex: none; font-size: 24px; line-height: 1; }
.promo-duel b, .k-promo b { display: block; font-size: 14px; line-height: 1.3; }
.promo-duel small, .k-promo small { display: block; font-size: 12px; line-height: 1.35; }
.promo-go, .k-promo-go {
  flex: none; margin-left: auto; padding: 6px 12px; border-radius: 99px; background: var(--gold); color: #3a2a00;
  font-size: 12px; font-weight: 800; white-space: nowrap;
}
.mode-switch {
  font: inherit; font-size: 18px; font-weight: 800; min-width: 44px; min-height: 40px; padding: 4px 10px; cursor: pointer;
  background: var(--card); color: var(--ink); border: 1.5px solid var(--border); border-radius: 99px;
}
.mode-switch:hover, .mode-switch:focus-visible { border-color: var(--accent); }

/* the quiz home's top row: «← Αρχική οθόνη» left, settings right; a round's «Τερματισμός» sits quietly under the answers.
   .sr-only is text for screen readers only (the round's live region) */
.k-top { display: flex; align-items: center; justify-content: space-between; gap: 10px; margin-bottom: -10px; }
.k-back {
  min-height: 44px; padding: 0 2px; border: 0; background: none; cursor: pointer;
  font: inherit; font-size: 14px; font-weight: 700; color: var(--accent-ink);
}
.k-back:hover { text-decoration: underline; }
.k-exit { display: flex; justify-content: center; margin-top: 4px; }
.k-exit .btn { font-size: 12px; border-color: transparent; color: var(--muted); min-height: 44px; }
.k-exit .btn:hover { color: var(--ink); background: var(--accent-soft); }
.sr-only { position: absolute; width: 1px; height: 1px; margin: -1px; padding: 0; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0; }

/* ---- Μονομαχία (js/battle.js): the invitation, the join screen, the 3-2-1 and their messages, in the quiz's look.
   The QR code keeps black on white in both palettes (a camera needs the contrast); everything else is a token.
   Accents: --amber on --bg or --card, white on --btn ---- */
.duel-title { margin: 2px 0 0; font-size: 27px; font-weight: 800; line-height: 1.15; letter-spacing: -.8px; }
.duel-topic { margin: 6px 0 0; font-size: 14px; font-weight: 700; color: var(--amber); }   /* the topic the invitation is of */
.duel-card {
  display: flex; flex-direction: column; align-items: center; gap: 8px; padding: 18px 16px 16px; text-align: center;
  background: var(--card); border: 1px solid var(--border); border-radius: 20px; box-shadow: var(--shadow);
}
.duel-qr { width: min(232px, 100%); aspect-ratio: 1; border-radius: 12px; overflow: hidden; background: #fff; }
.duel-qr svg { display: block; width: 100%; height: 100%; }
.duel-qr.is-wait { background: var(--accent-soft); }
.duel-code {
  margin: 4px 0 0; padding-left: 6px; font-size: 34px; font-weight: 800; line-height: 1.1; letter-spacing: 6px;
  color: var(--ink); font-variant-numeric: tabular-nums;
}
.duel-hint { margin: 0; font-size: 14px; line-height: 1.45; color: var(--muted); }
.duel-status { margin: 0; min-height: 1.45em; text-align: center; font-size: 15px; font-weight: 700; line-height: 1.45; color: var(--amber); }
.duel-join { display: flex; flex-direction: column; gap: 8px; padding-top: 14px; border-top: 1px solid var(--border); }
.duel-join label { font-size: 13px; font-weight: 700; color: var(--muted); }
.duel-join-row { display: flex; gap: 8px; }
.duel-input {
  flex: 1; min-width: 0; min-height: 48px; padding: 0 14px; font: inherit; font-size: 18px; font-weight: 800; letter-spacing: 3px;
  text-transform: uppercase; color: var(--ink); background: var(--card); border: 1.5px solid var(--border); border-radius: 12px;
}
.duel-input:focus { border-color: var(--accent); }
.duel-join .btn { min-height: 48px; }
.duel-err { margin: 0; font-size: 13px; font-weight: 700; line-height: 1.45; color: var(--bad-ink); }
.duel-err:empty { display: none; }
.duel-countdown { align-items: center; text-align: center; padding-top: 36px; }
.duel-vs { display: flex; align-items: center; justify-content: center; gap: 14px; margin: 0; font-size: 18px; font-weight: 800; }
.duel-count { font-size: 112px; font-weight: 800; line-height: 1; color: var(--amber); font-variant-numeric: tabular-nums; }
.duel-msg {
  display: flex; flex-direction: column; align-items: center; gap: 10px; padding: 26px 18px; text-align: center;
  background: var(--card); border: 1px solid var(--border); border-radius: 20px;
}
.duel-msg-ico { font-size: 40px; line-height: 1; }
.duel-msg p { margin: 0; font-size: 17px; font-weight: 700; line-height: 1.45; }
/* the lobby: the crew (a chip per player, --ink on --card; a newcomer's pops in; the dashed one for the seats still
   free is --muted on the page), the picker (eight creatures; mine on --sign ringed in --gold-dark, one another player
   holds greyed) and «Ξεκίνα», the quiz's ember button (.k-play: white on --ember) */
.duel-crew { display: flex; flex-wrap: wrap; justify-content: center; gap: 8px; }
.duel-crew:empty { display: none; }
.duel-chip {
  display: inline-flex; align-items: center; gap: 6px; min-height: 36px; padding: 4px 12px 4px 7px;
  font: inherit; font-size: 13px; font-weight: 800; color: var(--ink); background: var(--card);
  border: 1.5px solid var(--border); border-radius: 99px;
}
button.duel-chip { min-height: 44px; cursor: pointer; }      /* mine on the invitation: a tap opens the picker */
button.duel-chip:hover, button.duel-chip:focus-visible, button.duel-chip[aria-expanded="true"] { border-color: var(--gold-dark); }
.duel-chip-e { font-size: 20px; line-height: 1; }
.duel-chip.is-new { animation: duel-pop .4s ease-out; }
.duel-chip.is-wait { color: var(--muted); background: transparent; border-style: dashed; }
@keyframes duel-pop { from { transform: scale(.4); opacity: 0; } to { transform: scale(1); opacity: 1; } }
.duel-pick { display: grid; grid-template-columns: repeat(4, 1fr); gap: 8px; }
.duel-pick[hidden] { display: none; }
.duel-pick.is-cool { opacity: .45; }                            /* 1.5 s after a tap, as the reactions row (below) */
.duel-pick.is-cool .duel-av { cursor: default; pointer-events: none; }
.duel-av {
  display: grid; place-items: center; aspect-ratio: 1; min-height: 48px; padding: 0; cursor: pointer;
  font: inherit; font-size: 30px; line-height: 1; background: var(--card); border: 1.5px solid var(--border); border-radius: 16px;
}
.duel-av[aria-pressed="true"] { background: var(--sign); border-color: var(--gold-dark); box-shadow: 0 0 0 2px var(--gold-dark); }
.duel-av:disabled { cursor: default; opacity: .6; }          /* off while a round runs; one another player holds, more so */
.duel-av.is-taken { cursor: default; opacity: .35; filter: grayscale(1); }
.duel-start { margin-top: 2px; }
.duel-later { margin-top: -6px; text-align: center; font-size: 13px; }
@media (prefers-reduced-motion: reduce) { .duel-chip.is-new { animation: none; } }

/* ---- Μονομαχία's round and result (js/battle.js): the round's slots, the wait after the round (the race strip and
   «N/M τελείωσαν»), then the podium, the ranking, the review and the host's next round (below) ---- */
.k-opp { margin: -6px 0 0; font-size: 13px; font-weight: 800; letter-spacing: .3px; color: var(--muted); font-variant-numeric: tabular-nums; }
/* the round's top slot: the race strip (the quiz home's sea; a boat per player with its avatar on a --card tag, mine
   bigger, glowing and on top, the island at the end; boats at the same count sit apart, each seat on its own spot,
   inside the strip at both ends: below), my streak flame on its lower edge and, for a second after a memes answer,
   a sticker over the question (both --sign-ink on --sign). The bottom slot: the four reactions on a --card pill, greyed
   for 1.5 s after a tap, and the floats rising from them with the sender's avatar. Under reduced motion nothing
   glides, pops or rises: the boats jump, the sticker just shows, and a float stands still over its button */
.duel-race-box:empty { display: none; }
.duel-race {
  position: relative; height: 64px; overflow: hidden; border-radius: 16px;
  background: linear-gradient(180deg, var(--sea-top) 0%, var(--sea-mid) 100%); box-shadow: inset 0 0 0 1px var(--border);
}
.duel-lane { position: absolute; left: 14px; right: 14px; top: 43px; border-top: 2px dashed rgba(255, 255, 255, .9); }
.duel-goal { position: absolute; right: 6px; top: 22px; font-size: 22px; line-height: 1; }
.duel-boat {
  --dx: 0px; --dy: 0px;
  position: absolute; top: 24px; font-size: 20px; line-height: 1;
  transform: translate(calc(-50% + var(--dx)), var(--dy)); transition: left .6s ease-out;
}
/* each seat's spot: its row (SEATS index % 3) 0, 10 or 18 px down, and 7 px behind, level or ahead so that every row
   and every column holds each of the three once (index / 3 the column): eight spots, no two alike. 7 px keeps a boat
   and its tag inside the strip at 0/10 and at 10/10 on a 288 px strip, mine (24 px) included; 18 px keeps them above
   its lower edge */
.duel-boat.is-row1 { --dy: 10px; }
.duel-boat.is-row2 { --dy: 18px; }
.duel-boat.is-row1.is-col0, .duel-boat.is-row2.is-col1, .duel-boat.is-row0.is-col2 { --dx: 7px; }
.duel-boat.is-row2.is-col0, .duel-boat.is-row0.is-col1, .duel-boat.is-row1.is-col2 { --dx: -7px; }
.duel-boat i {
  position: absolute; left: 50%; bottom: 100%; margin-bottom: 1px; padding: 0 4px; transform: translateX(-50%);
  font-style: normal; font-size: 11px; line-height: 1.5; background: var(--card); border-radius: 99px;
}
.duel-boat.is-me { z-index: 1; top: 20px; font-size: 24px; filter: drop-shadow(0 0 4px var(--gold)); }
.duel-streak {
  position: absolute; left: 50%; bottom: -11px; z-index: 2; margin: 0; padding: 1px 10px; transform: translateX(-50%);
  font-size: 12px; font-weight: 800; line-height: 1.5; white-space: nowrap;
  color: var(--sign-ink); background: var(--sign); border: 1.5px solid var(--gold-dark); border-radius: 99px;
}
.duel-pop {
  position: fixed; left: 50%; top: 38%; z-index: 30; padding: 10px 18px; transform: translateX(-50%) rotate(-4deg); pointer-events: none;
  font-size: 24px; font-weight: 800; line-height: 1.3; white-space: nowrap;
  color: var(--sign-ink); background: var(--sign); border: 2px solid var(--gold-dark); border-radius: 18px;
  box-shadow: 0 6px 18px rgba(120, 80, 0, .3); animation: duel-pop-in .3s ease-out;
}
.duel-streak[hidden], .duel-pop[hidden] { display: none; }
@keyframes duel-pop-in {
  from { transform: translateX(-50%) rotate(-4deg) scale(.4); opacity: 0; }
  to { transform: translateX(-50%) rotate(-4deg) scale(1); opacity: 1; }
}
.duel-react {
  display: flex; justify-content: space-around; padding: 4px;
  background: var(--card); border: 1.5px solid var(--border); border-radius: 99px; transition: opacity .2s;
}
.duel-react-btn {
  min-width: 48px; min-height: 44px; padding: 0; cursor: pointer; font: inherit; font-size: 24px; line-height: 1;
  background: none; border: 0; border-radius: 99px;
}
.duel-react-btn:hover, .duel-react-btn:focus-visible { background: var(--accent-soft); }
.duel-react.is-cool { opacity: .45; }
.duel-react.is-cool .duel-react-btn { cursor: default; pointer-events: none; }
.duel-float {
  position: absolute; bottom: 8px; z-index: 3; transform: translateX(-50%); pointer-events: none;
  font-size: 24px; line-height: 1; text-align: center; animation: duel-up 1.6s ease-out forwards;
}
.duel-float small { display: block; margin-top: 2px; padding: 0 4px; font-size: 11px; line-height: 1.5; background: var(--card); border-radius: 99px; }
@keyframes duel-up { from { transform: translateX(-50%); opacity: 1; } to { transform: translate(-50%, -120px); opacity: 0; } }
@media (prefers-reduced-motion: reduce) {
  .duel-boat, .duel-react { transition: none; }
  .duel-pop, .duel-float { animation: none; }
}
/* the wait after one's own round: under the race strip, how many of the round's players have finished */
.duel-done { margin: -4px 0 0; font-size: 13px; font-weight: 800; color: var(--muted); font-variant-numeric: tabular-nums; }
.duel-done:empty { display: none; }
/* the result. The podium: silver, gold, bronze from left to right, the avatars standing on them (a crown over the
   gold's), #3a2a00 on --gold, --ink on --silver, white on --bronze; each comes in as revealed (is-shown), at once under
   reduced motion. The ranking on --card, my row --sign-ink on --sign. The review: each question with its answer in
   --ok-ink, my mark (✓ --ok-ink, ✗ --bad-ink, — --muted) and «το βρήκαν k/m» in --muted */
.duel-podium { display: flex; align-items: flex-end; justify-content: center; gap: 8px; min-height: 200px; padding-top: 56px; }
.duel-ped {
  position: relative; flex: 0 1 108px; min-width: 0; display: flex; flex-direction: column; align-items: center;
  padding: 10px 6px 8px; border-radius: 14px 14px 6px 6px; text-align: center; font-size: 12px; font-weight: 700; line-height: 1.3;
  box-shadow: inset 0 -6px 0 rgba(0, 0, 0, .12);
  opacity: 0; transform: translateY(28px); transition: opacity .35s ease-out, transform .45s cubic-bezier(.2, 1.4, .4, 1);
}
.duel-ped.is-shown { opacity: 1; transform: none; }
.duel-ped.is-gold {
  background: var(--gold);
  color: #3a2a00;
  min-height: 136px;
}
.duel-ped.is-silver {
  background: var(--silver);
  color: var(--ink);
  min-height: 104px;
}
.duel-ped.is-bronze {
  background: var(--bronze);
  color: #fff;
  min-height: 86px;
}
.duel-ped-e { position: absolute; left: 0; right: 0; bottom: 100%; margin-bottom: 2px; font-size: 32px; line-height: 1.1; overflow-wrap: anywhere; }
.duel-ped.is-gold .duel-ped-e::before { content: "👑"; display: block; font-size: 18px; line-height: 1; transform: rotate(-12deg); }
.duel-ped-who { max-width: 100%; overflow-wrap: anywhere; }
.duel-ped-pts { margin-top: 4px; font-size: 17px; font-weight: 800; font-variant-numeric: tabular-nums; }
.duel-ped-ok { font-variant-numeric: tabular-nums; }
.duel-rank {
  margin: 0; padding: 0; list-style: none; text-align: left; overflow: hidden;
  background: var(--card); border: 1px solid var(--border); border-radius: 16px;
}
.duel-rk { display: flex; align-items: center; gap: 8px; padding: 9px 14px; font-size: 14px; border-top: 1px solid var(--border); }
.duel-rk:first-child { border-top: 0; }
.duel-place { flex: none; width: 24px; font-weight: 800; color: var(--muted); font-variant-numeric: tabular-nums; }
.duel-name { flex: 1; min-width: 0; font-weight: 700; }
.duel-me { font-style: normal; font-weight: 800; }
.duel-rk .duel-ok { font-size: 12px; color: var(--muted); font-variant-numeric: tabular-nums; }
.duel-pts { min-width: 3.4em; text-align: right; font-weight: 800; font-variant-numeric: tabular-nums; }
.duel-gone { font-size: 12px; font-weight: 700; color: var(--muted); }
.duel-rk.is-left .duel-name { color: var(--muted); }
.duel-rank .is-me { background: var(--sign); color: var(--sign-ink); }
.duel-rank .is-me .duel-place, .duel-rank .is-me .duel-ok { color: var(--sign-ink); }
/* the host's buttons: «Ρεβάνς» and «Άλλο θέμα» side by side, «QR» small under them */
.duel-host { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.duel-host[hidden] { display: none; }
.duel-host .btn.ghost { grid-column: 1 / -1; justify-self: center; width: auto; min-width: 96px; min-height: 44px; }
.duel-qs { text-align: left; background: var(--card); border: 1px solid var(--border); border-radius: 14px; padding: 10px 14px 4px; }
.duel-qs-h { margin: 0 0 2px; font-size: 13px; font-weight: 800; letter-spacing: .3px; color: var(--muted); }
.duel-list { margin: 0; padding: 0; list-style: none; }
.duel-row { display: grid; grid-template-columns: minmax(0, 1fr) auto; column-gap: 10px; padding: 9px 0; border-top: 1px solid var(--border); }
.duel-q { font-size: 13.5px; line-height: 1.4; color: var(--ink); }
.duel-a { display: block; margin-top: 2px; font-weight: 700; color: var(--ok-ink); }
.duel-mark { grid-row: span 2; align-self: center; min-width: 24px; text-align: center; font-size: 17px; font-weight: 800; }
.duel-mark.is-ok { color: var(--ok-ink); }
.duel-mark.is-bad { color: var(--bad-ink); }
.duel-mark.is-none { color: var(--muted); }
.duel-found { grid-column: 1; margin-top: 3px; font-size: 12px; font-weight: 700; color: var(--muted); }
/* the host's sheets over the result (the topics, the QR again), above the banner's band (--ad-h): the page dimmed */
.duel-sheet-box {
  position: fixed; inset: 0; z-index: 40; display: flex; align-items: flex-end; justify-content: center;
  padding-bottom: var(--ad-h, 0px); background: rgba(11, 30, 51, .55);
}
.duel-sheet-box:empty { display: none; }
.duel-sheet {
  width: 100%; max-width: 520px; display: flex; flex-direction: column; gap: 12px; padding: 18px 16px max(18px, env(safe-area-inset-bottom));
  text-align: left; color: var(--ink); background: var(--card); border-radius: 24px 24px 0 0; box-shadow: 0 -8px 30px rgba(0, 0, 0, .25);
  animation: duel-sheet-up .25s ease-out;
}
.duel-sheet-h { margin: 0; font-size: 19px; font-weight: 800; line-height: 1.25; letter-spacing: -.3px; }
.duel-sheet .duel-qr, .duel-sheet .duel-code { align-self: center; }
@keyframes duel-sheet-up { from { transform: translateY(40px); opacity: 0; } to { transform: none; opacity: 1; } }
/* the topic chips: a pill each, the chosen one white on --btn */
.k-chips { display: flex; flex-wrap: wrap; gap: 8px; }
.k-chip {
  min-height: 44px; padding: 6px 14px; cursor: pointer; font: inherit; font-size: 14px; font-weight: 700;
  color: var(--ink); background: var(--card); border: 1.5px solid var(--border); border-radius: 99px;
}
.k-chip:hover { border-color: var(--btn); }
.k-chip[aria-pressed="true"] { background: var(--btn); color: #fff; border-color: var(--btn); }
@media (prefers-reduced-motion: reduce) {
  .duel-ped { transition: none; }
  .duel-sheet { animation: none; }
}
.duel-get { margin: 0; text-align: center; font-size: 14px; }
.duel-get a { font-weight: 700; color: var(--accent-ink); }

/* ---- «Ακρόαση»: the bank read aloud (js/akroasi.js) ---- */
.ak-view { display: flex; flex-direction: column; gap: 14px; }
.ak-view h1 { margin: 0; }
.ak-intro { margin: 0; color: var(--muted); line-height: 1.5; }
.ak-card { background: var(--card); border: 1px solid var(--border); border-radius: 18px; padding: 16px 18px; min-height: 150px; }
.ak-label { display: flex; justify-content: space-between; gap: 12px; margin: 0; font-size: 12px; font-weight: 700; letter-spacing: .06em; text-transform: uppercase; color: var(--muted); }
.ak-q { margin: 10px 0 0; font-size: 19px; font-weight: 700; line-height: 1.4; }
.ak-a { margin: 12px 0 0; padding: 10px 14px; border-left: 4px solid var(--ok); border-radius: 0 12px 12px 0; color: var(--ok-ink); font-weight: 700; line-height: 1.4; }
.ak-a[hidden], .ak-hint[hidden], .ak-field[hidden] { display: none; }
.ak-empty { margin: 0; color: var(--muted); }
.ak-controls { display: flex; gap: 10px; align-items: stretch; }
.ak-play { flex: 1; min-height: 58px; font-size: 18px; }
.ak-step { min-width: 58px; min-height: 58px; font-size: 20px; padding: 0; }
.ak-hint { margin: 0; padding: 10px 12px; border: 1px dashed var(--border); border-radius: 12px; font-size: 13px; line-height: 1.45; color: var(--muted); background: var(--card); }
.ak-options { display: grid; gap: 12px; }
.ak-field { display: flex; flex-direction: column; gap: 6px; font-size: 13px; font-weight: 700; }
.ak-field select { font: inherit; font-weight: 600; min-height: 44px; padding: 8px 12px; border-radius: 12px; border: 1px solid var(--border); background: var(--card); color: var(--ink); }
