/* ============================================================
   LearningFast Memory — στυλ
   Παλέτα και γραμματοσειρές από το learning-fast.com (styles/main.css)
   ============================================================ */
:root {
  --primary: #7C6FD9;
  --primary-dark: #5F52B8;
  --accent: #FFD166;
  --accent-dark: #C99A12;
  --pink: #E87DA6;
  --sky: #5FC2DE;
  --leaf: #6FCB92;
  --leaf-dark: #2E8A57;
  --coral: #FF9478;
  --bg: #FBF9FF;
  --surface: #FFFFFF;
  --text: #3B3358;
  --muted: #6E6590;
  --line: #E2DCF3;
  --primary-tint: #EAE7FA;
  --pink-tint: #FBE6EE;
  --sky-tint: #E3F5FA;
  --leaf-tint: #E5F7EC;
  --sun-tint: #FEF6E4;
  --card-back: linear-gradient(140deg, #EAE7FA 0%, #E3F5FA 55%, #FBE6EE 100%);
  --card-edge: #CFC7F0;
  --radius: 20px;
  --shadow: 0 10px 30px rgba(59, 51, 88, .08);
  --head: 'Comfortaa', 'Trebuchet MS', 'Segoe UI', sans-serif;
  --body: 'Nunito', 'Segoe UI', 'Helvetica Neue', Arial, sans-serif;
}
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --bg: #1E1A33; --surface: #2A2546; --text: #F1EEFF; --muted: #BDB5DD; --line: #423B66;
    --primary-tint: #352E5C; --pink-tint: #4A2F45; --sky-tint: #22405A; --leaf-tint: #24453A; --sun-tint: #4A4130;
    --card-back: linear-gradient(140deg, #E4DFF8 0%, #DCEFF6 55%, #F5DFE8 100%); /* ανοιχτό, για να διαβάζεται το μωβ λογότυπο */
    --card-edge: #8F84D6; --shadow: 0 10px 30px rgba(0, 0, 0, .3);
  }
}
:root[data-theme="dark"] {
  --bg: #1E1A33; --surface: #2A2546; --text: #F1EEFF; --muted: #BDB5DD; --line: #423B66;
  --primary-tint: #352E5C; --pink-tint: #4A2F45; --sky-tint: #22405A; --leaf-tint: #24453A; --sun-tint: #4A4130;
  --card-back: linear-gradient(140deg, #E4DFF8 0%, #DCEFF6 55%, #F5DFE8 100%); /* ανοιχτό, για να διαβάζεται το μωβ λογότυπο */
  --card-edge: #8F84D6; --shadow: 0 10px 30px rgba(0, 0, 0, .3);
}

* { box-sizing: border-box; }
html, body { margin: 0; padding: 0; }
body {
  background: var(--bg); color: var(--text); font-family: var(--body);
  font-size: 19px; line-height: 1.5; min-height: 100vh; overflow-x: hidden;
  -webkit-tap-highlight-color: transparent;
}
h1, h2, h3 { font-family: var(--head); font-weight: 700; line-height: 1.25; margin: 0; }
h1:focus, h2:focus { outline: none; }
button { font: inherit; color: inherit; cursor: pointer; touch-action: manipulation; }
button:disabled { cursor: default; opacity: .45; }
:focus-visible { outline: 4px solid var(--primary-dark); outline-offset: 3px; }
[hidden] { display: none !important; }
.sr { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.center { text-align: center; }
.note { color: var(--muted); font-size: .92rem; }

.screen { display: none; min-height: 100vh; min-height: 100dvh; }
.screen.on { display: block; }
.wrap { max-width: 820px; margin: 0 auto; padding: 20px 16px 40px; }
.wrap.wide { max-width: 1200px; }
.panel { background: var(--surface); border: 2px solid var(--line); border-radius: var(--radius); padding: clamp(18px, 4vw, 32px); box-shadow: var(--shadow); }
.row { display: flex; justify-content: space-between; align-items: center; gap: 12px; flex-wrap: wrap; margin-top: 24px; }
.row.top { margin-top: 0; }

/* ---------- κουμπιά ---------- */
.btn {
  border: 0; border-radius: 999px; padding: 14px 28px; min-height: 56px;
  font-family: var(--head); font-weight: 700; font-size: 1.05rem;
  background: var(--primary-dark); color: #fff; box-shadow: 0 4px 0 #463C8F;
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
}
.btn:active:not(:disabled) { transform: translateY(3px); box-shadow: 0 1px 0 #463C8F; }
.btn.alt { background: var(--accent); color: #3A2A00; box-shadow: 0 4px 0 var(--accent-dark); }
.btn.alt:active { box-shadow: 0 1px 0 var(--accent-dark); }
.btn.ghost { background: transparent; color: var(--text); box-shadow: inset 0 0 0 2px var(--line); }
.btn.ghost:active { transform: none; }
.btn.small { padding: 8px 18px; min-height: 48px; font-size: .95rem; }
.btn.danger { color: #B3264A; }
.linkbtn { background: none; border: 0; color: var(--muted); text-decoration: underline; font-size: .95rem; padding: 10px; }
.iconbtn {
  width: 52px; height: 52px; border-radius: 50%; border: 2px solid var(--line); background: var(--surface);
  display: inline-grid; place-items: center; font-size: 1.3rem; flex: 0 0 auto; padding: 0;
}
.round {
  width: 52px; height: 52px; border-radius: 50%; border: 0; background: var(--primary-tint); color: var(--primary-dark);
  font-size: 1.6rem; font-weight: 800; line-height: 1;
}

/* ---------- αρχική ---------- */
/* η αρχική γεμίζει την οθόνη, ώστε τα δικαιώματα να μένουν στο κάτω μέρος */
#home.on { display: flex; flex-direction: column; }
#home .wrap { width: 100%; }
#home .copy { margin-top: auto; }
/* σύνδεσμος προς το site, όπως στα άλλα παιχνίδια του LearningFast (μόνο στην αρχική) */
#home { position: relative; }
.site-back-link {
  position: absolute; top: 16px; left: 16px; z-index: 2;
  display: inline-flex; align-items: center; min-height: 44px; padding: 8px 18px; border-radius: 999px;
  background: var(--surface); color: var(--primary-dark); font-weight: 700; font-size: .95rem;
  text-decoration: none; box-shadow: var(--shadow); border: 2px solid var(--line); transition: transform .15s ease;
}
.site-back-link:hover { transform: translateY(-2px); }
@media (prefers-color-scheme: dark) { :root:not([data-theme="light"]) .site-back-link { color: #CFC7F8; } }
:root[data-theme="dark"] .site-back-link { color: #CFC7F8; }
/* σε στενές οθόνες το logo κατεβαίνει, ώστε να μην πέφτει πάνω στον σύνδεσμο */
@media (max-width: 700px) { #home .hero { padding-top: 72px; } }
.hero { text-align: center; padding: clamp(16px, 4vh, 40px) 16px 8px; }
.logo { display: block; width: clamp(110px, 18vw, 160px); height: auto; margin: 0 auto 4px; }
/* στη σκοτεινή εμφάνιση τα μωβ γράμματα του logo χρειάζονται ανοιχτό φόντο */
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) .logo { background: #FBF9FF; border-radius: 22px; padding: 8px 14px; }
}
:root[data-theme="dark"] .logo { background: #FBF9FF; border-radius: 22px; padding: 8px 14px; }
.hero h1 { font-size: clamp(2rem, 7vw, 3.2rem); color: var(--text); }
.subtitle { font-size: clamp(1.1rem, 3vw, 1.35rem); color: var(--muted); margin: 8px 0 0; }
.modes { display: grid; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); gap: 16px; margin: 20px 0; }
.mode {
  border: 3px solid transparent; border-radius: 26px; padding: 22px 16px; min-height: 140px;
  display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 10px;
  font-family: var(--head); font-weight: 700; font-size: 1.2rem; box-shadow: var(--shadow);
}
.mode .ico { font-size: 2.6rem; line-height: 1; }
.mode[data-mode="solo"] { background: var(--sky-tint); border-color: var(--sky); }
.mode[data-mode="versus"] { background: var(--pink-tint); border-color: var(--pink); }
.mode[data-mode="coop"] { background: var(--leaf-tint); border-color: var(--leaf); }
.mode:active { transform: translateY(2px); }
.homebar { display: flex; justify-content: center; gap: 12px; flex-wrap: wrap; }
.copy { text-align: center; padding: 16px; font-size: .85rem; color: var(--muted); }

/* ---------- επιλογή ---------- */
.steps { color: var(--muted); font-weight: 700; margin: 0 0 4px; font-size: .95rem; }
#setup h2 { font-size: clamp(1.5rem, 5vw, 2rem); margin-bottom: 16px; }
.pick { display: grid; gap: 14px; }
.levels { grid-template-columns: repeat(auto-fit, minmax(170px, 1fr)); }
.collections { grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)); }
.opt {
  background: var(--surface); border: 3px solid var(--line); border-radius: 22px; padding: 16px 12px;
  display: flex; flex-direction: column; align-items: center; gap: 4px; text-align: center; position: relative;
}
.opt b { font-family: var(--head); font-size: 1.08rem; }
.opt small { color: var(--muted); font-size: .95rem; }
.opt .olvl { font-size: .85rem; color: var(--muted); font-weight: 700; }
.opt[aria-checked="true"] { border-color: var(--primary-dark); background: var(--primary-tint); }
/* το ✓ κάθεται πάνω στη γωνία, έξω από την περιοχή του κειμένου, ώστε να μην το καλύπτει σε στενές κάρτες */
.opt[aria-checked="true"]::after {
  content: '✓'; position: absolute; top: -11px; right: -11px; width: 30px; height: 30px; border-radius: 50%;
  background: var(--primary-dark); color: #fff; display: grid; place-items: center; font-weight: 800; font-size: 1rem;
  box-shadow: 0 0 0 3px var(--bg);
}
.pick { padding: 12px 12px 4px; margin: -12px -12px 0; }
.cimg { width: 96px; height: 96px; object-fit: contain; background: #fff; border-radius: 16px; margin-bottom: 6px; }
.pairsrow { display: flex; align-items: center; justify-content: center; gap: 14px; margin-top: 20px; font-weight: 700; flex-wrap: wrap; }
.pairsrow output { min-width: 7.5em; text-align: center; font-family: var(--head); font-size: 1.1rem; }
.pl { width: 44px; height: 44px; border-radius: 50%; display: grid; place-items: center; font-family: var(--head); font-weight: 700; color: #fff; flex: 0 0 auto; }
.pl.p1, .pchip.p1 { --pc: #2C8FAF; --pt: var(--sky-tint); }
.pl.p2, .pchip.p2 { --pc: #C24D7E; --pt: var(--pink-tint); }
.pl { background: var(--pc); }

/* ---------- παίκτες ---------- */
.people { grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); max-height: 46vh; overflow-y: auto; }
.people .opt { padding: 14px 10px; min-height: 76px; justify-content: center; }
.lastinfo {
  display: flex; gap: 12px; align-items: flex-start; background: var(--sun-tint); border: 2px solid #E8C25A;
  border-radius: 18px; padding: 12px 16px; margin: 0 0 14px; font-size: .98rem; line-height: 1.45;
}
#whoinfo { margin: 14px 0 0; }
.lastinfo .lico { font-size: 1.5rem; line-height: 1.2; }
.lastinfo small { display: block; color: var(--muted); margin-top: 4px; }
.addbox { margin-top: 18px; padding-top: 14px; border-top: 2px dashed var(--line); }
.addrow { display: flex; gap: 10px; flex-wrap: wrap; }
.addrow input, .slot input, .slot select, .tfilter select {
  flex: 1 1 200px; min-width: 0; border: 3px solid var(--line); border-radius: 999px; padding: 12px 18px;
  font: inherit; background: var(--surface); color: var(--text); min-height: 52px;
}
.addbox .note { margin: 6px 4px 0; }
.addbox .note:empty { display: none; }
.addlabel { display: block; font-weight: 700; margin: 0 4px 8px; }
.slots { display: grid; grid-template-columns: repeat(auto-fit, minmax(260px, 1fr)); gap: 16px; }
.slot { display: flex; flex-direction: column; gap: 10px; background: var(--surface); border: 2px solid var(--line); border-radius: 20px; padding: 14px; }
/* σε κάθετη στοίβα το flex-basis θα γινόταν ύψος· τα πεδία κρατούν το φυσικό τους ύψος */
.slot input, .slot select { flex: none; width: 100%; }
.slotlabel { display: flex; align-items: center; gap: 10px; font-family: var(--head); font-weight: 700; }
.slot .lastinfo { margin: 0; }
.note.err { color: #B3264A; font-weight: 700; }
.setplayers { display: flex; flex-direction: column; gap: 6px; align-items: flex-start; margin-top: 18px; padding: 14px 4px 0; border-top: 1px solid var(--line); }
.setplayers small { color: var(--muted); font-size: .88rem; }
.plist { list-style: none; padding: 0; margin: 10px 0; display: grid; gap: 8px; }
.plist li { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; background: var(--surface); border: 2px solid var(--line); border-radius: 16px; padding: 10px 14px; }
.plist .pinfo { flex: 1 1 220px; display: flex; flex-direction: column; }
.plist small { color: var(--muted); font-size: .88rem; }
.tfilter { font-weight: 700; display: flex; align-items: center; gap: 10px; flex-wrap: wrap; max-width: 520px; }
#teacher h4 { margin: 14px 0 8px; font-family: var(--head); }
.hist.sum { margin-bottom: 8px; }

/* ---------- παιχνίδι ---------- */
#play.on { display: flex; flex-direction: column; height: 100vh; height: 100dvh; }
.hud { display: flex; align-items: center; gap: 10px; padding: 10px 16px 6px; flex: 0 0 auto; flex-wrap: wrap; }
.status { flex: 1 1 auto; font-weight: 700; font-size: 1.05rem; min-width: 0; }
.status b { font-family: var(--head); font-size: 1.2rem; }
.timer { font-weight: 700; font-variant-numeric: tabular-nums; color: var(--muted); }
.btn.hint { background: var(--accent); color: #3A2A00; box-shadow: 0 4px 0 var(--accent-dark); }
.players { display: flex; justify-content: center; align-items: center; gap: 10px; padding: 0 16px 4px; flex: 0 0 auto; flex-wrap: wrap; }
.pchip {
  display: inline-flex; align-items: center; gap: 8px; padding: 6px 16px; border-radius: 999px;
  border: 3px solid var(--line); background: var(--surface); font-weight: 700; min-height: 48px;
}
.pchip .arrow { width: 1em; color: var(--pc); }
.pchip.turn { border-color: var(--pc); background: var(--pt); box-shadow: 0 0 0 3px var(--pt); }
.pchip .pscore { font-family: var(--head); }
.pchip.win { border-color: var(--pc); background: var(--pt); }
.team { font-size: 1.5rem; }
.msgbar { display: flex; align-items: center; justify-content: center; gap: 10px; padding: 2px 16px 8px; flex: 0 0 auto; min-height: 3.4em; }
.msg { margin: 0; font-weight: 700; font-size: clamp(1rem, 2.6vw, 1.2rem); text-align: center; padding: 6px 16px; border-radius: 14px; }
.msg:empty { visibility: hidden; }
.msg.good { background: var(--leaf-tint); }
.msg.good::before { content: '★ '; color: var(--leaf-dark); }
.msg.try { background: var(--sky-tint); }
.msg.info { background: var(--primary-tint); }
.msgbar .speak { width: 44px; height: 44px; font-size: 1.1rem; }

.board { flex: 1 1 auto; min-height: 0; overflow: hidden; padding: 4px 16px 16px; }
.board.scroll { overflow-y: auto; }
.grid {
  display: grid; grid-template-columns: repeat(var(--cols, 4), var(--size, 120px)); gap: var(--gap, 12px);
  justify-content: center; align-content: center; min-height: 100%;
}
.board.scroll .grid { align-content: start; }

/* ---------- κάρτα ---------- */
.card {
  width: var(--size); height: var(--size); padding: 0; border: 0; background: none;
  perspective: 900px; border-radius: calc(var(--size) * .14);
}
.card .inner {
  position: relative; display: block; width: 100%; height: 100%;
  transform-style: preserve-3d; transition: transform .35s ease;
}
.card.up .inner { transform: rotateY(180deg); }
.face {
  position: absolute; inset: 0; display: grid; place-items: center;
  border-radius: calc(var(--size) * .14); backface-visibility: hidden; -webkit-backface-visibility: hidden;
}
.face.back { background: var(--card-back); border: 3px solid var(--card-edge); box-shadow: 0 4px 0 var(--card-edge); }
.face.back .brandmark { width: 80%; height: auto; user-select: none; pointer-events: none; }
.face.front { background: #fff; border: 3px solid #D9D3EE; transform: rotateY(180deg); box-shadow: 0 4px 0 #D9D3EE; }
.face { overflow: hidden; }
/* απόλυτη θέση: το ύψος % δεν εφαρμόζεται αξιόπιστα μέσα σε grid, και οι ψηλές εικόνες (π.χ. αετός) ξέφευγαν */
.face.front img {
  position: absolute; top: 8%; left: 8%; width: 84%; height: 84%;
  object-fit: contain; user-select: none; pointer-events: none;
}
.tick {
  position: absolute; top: 6%; right: 6%; width: max(22px, 22%); height: max(22px, 22%); border-radius: 50%;
  background: var(--leaf-dark); color: #fff; display: none; place-items: center; font-weight: 800;
  font-size: max(13px, calc(var(--size) * .13));
}
.card.matched .face.front { border-color: var(--leaf); box-shadow: 0 4px 0 var(--leaf); }
.card.matched .tick { display: grid; }
.card.hinted .face.front { border: 4px dashed #E0A800; box-shadow: 0 0 0 4px var(--sun-tint); }
.card:not(.up):not(.matched):hover .face.back { filter: brightness(1.04); }
.grid.locked .card { cursor: default; }
.card:focus-visible { outline: 4px solid var(--primary-dark); outline-offset: 4px; }
.card.pop .inner { animation: pop .45s ease; }
@keyframes pop { 0% { transform: rotateY(180deg) scale(1); } 45% { transform: rotateY(180deg) scale(1.06); } 100% { transform: rotateY(180deg) scale(1); } }

#skipprev { white-space: nowrap; }

/* ---------- αποτελέσματα ---------- */
.bigicon { font-size: 3.4rem; line-height: 1.2; }
#res-title { font-size: clamp(1.5rem, 5vw, 2.1rem); margin-top: 6px; }
.lead { font-size: 1.1rem; margin: 8px 0 14px; }
.scores { display: flex; justify-content: center; gap: 10px; flex-wrap: wrap; margin-bottom: 10px; }
.stats { display: grid; grid-template-columns: repeat(auto-fit, minmax(120px, 1fr)); gap: 10px; margin: 14px 0; }
.stats div { background: var(--primary-tint); border-radius: 16px; padding: 10px 8px; }
.stats dt { font-size: .88rem; color: var(--muted); font-weight: 700; }
.stats dd { margin: 2px 0 0; font-family: var(--head); font-weight: 700; font-size: 1.45rem; }
.resbtns { display: flex; justify-content: center; gap: 12px; flex-wrap: wrap; margin-top: 18px; }

/* ---------- οδηγίες ---------- */
.howlist { list-style: none; padding: 0; margin: 18px 0; display: grid; gap: 12px; }
.howlist li { display: flex; align-items: center; gap: 16px; background: var(--sky-tint); border-radius: 18px; padding: 12px 16px; font-size: 1.1rem; }
.hico { font-size: 1.7rem; flex: 0 0 96px; text-align: center; white-space: nowrap; }

/* ---------- ρυθμίσεις ---------- */
.setlist { display: grid; gap: 8px; margin-top: 16px; }
.sw { display: flex; align-items: flex-start; gap: 14px; padding: 12px 4px; border-bottom: 1px solid var(--line); cursor: pointer; }
.sw input {
  appearance: none; -webkit-appearance: none; width: 58px; height: 34px; border-radius: 999px; background: #BDB6D6;
  position: relative; flex: 0 0 auto; margin: 2px 0 0; cursor: pointer; transition: background .2s;
}
.sw input::after {
  content: ''; position: absolute; top: 4px; left: 4px; width: 26px; height: 26px; border-radius: 50%; background: #fff;
  transition: transform .2s; box-shadow: 0 1px 3px rgba(0,0,0,.25);
}
.sw input:checked { background: var(--primary-dark); }
.sw input:checked::after { transform: translateX(24px); }
.swt { display: flex; flex-direction: column; }
.swt small { color: var(--muted); font-size: .88rem; }
.sub { margin-left: 30px; padding-left: 14px; border-left: 3px solid var(--line); }
.sub .pairsrow { justify-content: flex-start; margin: 8px 0 12px; }
.range { padding: 14px 4px; }
.rrow { display: flex; align-items: center; gap: 14px; margin-top: 8px; }
.rrow input { flex: 1; accent-color: var(--primary-dark); height: 32px; }
.rrow output { min-width: 5.5em; font-weight: 700; }

/* ---------- εκπαιδευτικός ---------- */
.gate { max-width: 480px; margin: 6vh auto 0; }
.gate input { width: 100%; border: 3px solid var(--line); border-radius: 14px; padding: 12px 16px; font: inherit; font-size: 1.3rem; background: var(--surface); color: var(--text); }
.tablewrap { overflow-x: auto; border: 2px solid var(--line); border-radius: 14px; background: var(--surface); }
.hist { border-collapse: collapse; width: 100%; font-size: .88rem; }
.hist th, .hist td { padding: 8px 10px; text-align: left; border-bottom: 1px solid var(--line); white-space: nowrap; }
.hist th { background: var(--primary-tint); position: sticky; top: 0; }
.tag { background: var(--sun-tint); border: 1px solid #E0A800; border-radius: 8px; padding: 1px 8px; }
#teacher h3 { margin-top: 22px; }

/* ---------- διάλογος ---------- */
dialog {
  border: 0; border-radius: var(--radius); padding: 24px; max-width: min(440px, calc(100vw - 32px));
  background: var(--surface); color: var(--text); box-shadow: 0 20px 60px rgba(0,0,0,.25); font-size: 1.15rem; text-align: center;
}
dialog::backdrop { background: rgba(30, 26, 51, .45); }
dialog .row { justify-content: center; margin-top: 16px; }

/* ---------- μικρές οθόνες ---------- */
@media (max-width: 520px) {
  body { font-size: 17px; }
  .hud { padding: 8px 10px 4px; gap: 8px; }
  .board { padding: 4px 10px 10px; }
  .btn.hint { padding: 8px 14px; }
  /* η λέξη κρύβεται οπτικά αλλά μένει για τους αναγνώστες οθόνης, ώστε η γραμμή να χωράει σε μία σειρά */
  .flabel { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
  .iconbtn { width: 46px; height: 46px; }
  .mode { min-height: 110px; }
  .resbtns .btn { width: 100%; }
}
/* πολύ στενά κινητά (π.χ. iPhone SE): μία σειρά στην πάνω γραμμή, παίκτες δίπλα-δίπλα, μικρότερο μήνυμα */
@media (max-width: 380px) {
  .hud { gap: 6px; }
  .iconbtn { width: 42px; height: 42px; font-size: 1.1rem; }
  .btn.hint { padding: 6px 12px; min-height: 42px; font-size: .9rem; }
  .players { flex-wrap: nowrap; gap: 6px; padding: 0 8px 4px; }
  .pchip { padding: 4px 10px; min-height: 40px; gap: 4px; font-size: .88rem; min-width: 0; }
  .pchip .pname { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
  .team { font-size: 1.1rem; }
  .msgbar { min-height: 2.6em; padding: 0 8px 6px; gap: 6px; }
  .msg { font-size: .92rem; padding: 4px 10px; }
  .msgbar .speak { width: 36px; height: 36px; }
}
@media (max-height: 520px) and (orientation: landscape) {
  .hud { padding-top: 4px; }
  .msgbar { min-height: 2.6em; padding-bottom: 4px; }
  .msg { padding: 2px 12px; }
}

/* ============================================================
   ΒΑΘΟΣ — φόντο, κάρτες-πλαίσια και κουμπιά που «πατιούνται»
   Μόνο εμφάνιση: μεγέθη/αποστάσεις μένουν ίδια (ελεγμένα σε κινητά/τάμπλετ).
   ============================================================ */
:root {
  --card-shadow: 0 18px 44px rgba(59, 51, 88, .12), 0 2px 6px rgba(59, 51, 88, .06);
  --accent-stripe: linear-gradient(90deg, var(--sky) 0%, var(--primary) 50%, var(--pink) 100%);
}
/* απαλές παστέλ κηλίδες στο φόντο· στην οθόνη παιχνιδιού το φόντο μένει απλό */
body {
  background-color: var(--bg);
  background-image:
    radial-gradient(circle at 8% 12%, var(--sky-tint) 0, transparent 32%),
    radial-gradient(circle at 92% 8%, var(--pink-tint) 0, transparent 30%),
    radial-gradient(circle at 88% 88%, var(--leaf-tint) 0, transparent 34%),
    radial-gradient(circle at 10% 92%, var(--sun-tint) 0, transparent 30%);
  background-attachment: fixed;
}
body[data-screen="play"] { background-image: none; }

/* κάρτα-πλαίσιο με χρωματιστή λωρίδα επάνω */
.homecard, .panel {
  position: relative; overflow: hidden;
  background: var(--surface); border: 2px solid var(--line); box-shadow: var(--card-shadow);
}
.homecard::before, .panel::before {
  content: ''; position: absolute; left: 0; right: 0; top: 0; height: 6px; background: var(--accent-stripe);
}
.homewrap { padding-top: clamp(56px, 9vh, 80px); padding-bottom: 12px; }
.homecard { border-radius: 32px; padding: 8px clamp(16px, 4vw, 40px) clamp(18px, 3vw, 28px); }
.homecard .hero { padding-top: clamp(16px, 3vh, 28px); }
@media (max-width: 700px) { #home .hero { padding-top: 16px; } }
.setupcard { margin-top: 4px; }
.stephead { display: flex; align-items: center; justify-content: space-between; gap: 12px; flex-wrap: wrap; margin-bottom: 2px; }
.stephead .steps { margin: 0; }
.stepdots { list-style: none; margin: 0; padding: 0; display: flex; gap: 6px; }
.stepdots li { width: 26px; height: 8px; border-radius: 999px; background: var(--line); }
.stepdots li.done { background: var(--sky); }
.stepdots li.cur { background: var(--primary-dark); width: 38px; }
.setupnav { margin-top: 26px; padding-top: 18px; border-top: 2px dashed var(--line); }

/* κουμπιά λειτουργίας: περίγραμμα + «βάση» από κάτω */
.mode { border-width: 3px; transition: transform .15s ease, box-shadow .15s ease; }
.mode[data-mode="solo"] { box-shadow: 0 6px 0 #3FA3C0, var(--shadow); }
.mode[data-mode="versus"] { box-shadow: 0 6px 0 #C95F89, var(--shadow); }
.mode[data-mode="coop"] { box-shadow: 0 6px 0 #4FA872, var(--shadow); }
.mode:hover { transform: translateY(-2px); }
.mode:active { transform: translateY(4px); box-shadow: 0 2px 0 var(--line); }

/* δευτερεύοντα κουμπιά: λευκό σώμα, περίγραμμα, μικρή «βάση» */
.btn.ghost { background: var(--surface); box-shadow: inset 0 0 0 2px var(--line), 0 3px 0 var(--line); }
.btn.ghost:active { transform: translateY(2px); box-shadow: inset 0 0 0 2px var(--line), 0 1px 0 var(--line); }
.btn:hover:not(:disabled) { filter: brightness(1.04); }

/* επιλογές (παίκτες, επίπεδα, συλλογές) */
.opt { box-shadow: 0 4px 0 var(--line); transition: transform .12s ease, box-shadow .12s ease, border-color .12s ease; }
.opt:hover { transform: translateY(-2px); border-color: #CFC7F0; }
.opt[aria-checked="true"] { box-shadow: 0 4px 0 var(--primary-dark); }
.opt:active { transform: translateY(2px); box-shadow: 0 1px 0 var(--line); }
.slot, .plist li { box-shadow: 0 3px 0 var(--line); }
/* εστίαση πληκτρολογίου: διακεκομμένη τιρκουάζ, για να μη μοιάζει με το μωβ «επιλεγμένο» */
.opt:focus-visible { outline: 3px dashed #1F7FA0; outline-offset: 5px; }

/* πάνω γραμμή παιχνιδιού: ήρεμη λευκή μπάρα με περίγραμμα */
.hud { background: var(--surface); border-bottom: 2px solid var(--line); box-shadow: 0 4px 12px rgba(59, 51, 88, .05); padding-bottom: 10px; margin-bottom: 6px; }

/* ---------- λιγότερη κίνηση ---------- */
@media (prefers-reduced-motion: reduce) {
  .card .inner { transition: none; }
  .card.pop .inner { animation: none; }
  .sw input, .sw input::after { transition: none; }
  .mode, .opt, .site-back-link { transition: none; }
  .mode:hover, .opt:hover, .site-back-link:hover { transform: none; }
}
