/* ════════════════════════════════════════════════════════════════════
   yli-paixnidi.css — «Επίλεξε ύλη και παιχνίδι» (js/yli-paixnidi.js).
   Μόνο οι ρόλοι του θέματος (css/tokens.css «ΘΕΜΑΤΑ 60-30-10»):
     --c-dom / --c-dom-2   φόντο & κάρτες (60)
     --c-sec / --c-sec-2   δομικά: ακμές, ζώνες κεφαλίδων (30)
     --c-acc · --acc-fill / --on-acc · --terra (= --c-acc-text)   επιλογή, «Παίξε» (10)
   Κανένα σταθερό χρώμα, καμία μετατροπή σε κεφαλαία. Τα γκρίζα παιχνίδια
   κρατούν κείμενο με αντίθεση AA: σβήνει μόνο το σήμα, όχι τα γράμματα.
   ════════════════════════════════════════════════════════════════════ */

.yp {
  --yp-ink: var(--hk-ink, var(--c-ink, var(--fg)));
  --yp-mut: var(--hk-mut, var(--c-muted, var(--muted)));
  --yp-card: var(--c-dom-2, var(--card));
  --yp-sink: var(--hk-sink, var(--sink));
  --yp-edge: var(--hk-edge, color-mix(in srgb, var(--c-sec-2, var(--line)) 34%, transparent));
  --yp-acc: var(--hk-acc, var(--c-acc, var(--sym-terra)));
  --yp-band: color-mix(in srgb, var(--c-sec, var(--sec, var(--line))) 16%, var(--yp-card));
  display: grid; gap: 16px; margin-top: 8px; color: var(--yp-ink); font-family: var(--sans);
}
.yp *, .yp *::before, .yp *::after { box-sizing: border-box; }
:where(.yp) button { font: inherit; color: inherit; }
.yp :focus-visible { outline: 3px solid var(--terra); outline-offset: 2px; }

.yp-cols { display: grid; grid-template-columns: minmax(280px, 380px) minmax(0, 1fr); gap: 20px; align-items: start; }
.yp-col { background: var(--yp-card); border: 1px solid var(--yp-edge); border-radius: var(--hk-r2, 16px); padding: 16px; min-width: 0;
  box-shadow: var(--hk-sh1, 0 8px 20px -14px var(--shadow)); }
.yp-col--u { position: sticky; top: 16px; max-height: calc(100vh - 190px); overflow: auto; overscroll-behavior: contain; }

.yp-hd { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin: -16px -16px 12px; padding: 12px 16px;
  background: var(--yp-band); border-bottom: 1px solid var(--yp-edge); border-radius: var(--hk-r2, 16px) var(--hk-r2, 16px) 0 0; }
.yp-ghd .yp-hd { margin-bottom: 12px; }
.yp-h { display: flex; align-items: center; gap: 10px; margin: 0; font-family: var(--disp); font-weight: 600; font-size: 20px; line-height: 1.1; }
.yp-h__n { display: inline-grid; place-items: center; width: 28px; height: 28px; border-radius: 50%; background: var(--acc-fill); color: var(--on-acc); font-family: var(--sans); font-size: 14px; font-weight: 800; }
.yp-count { font-size: 13px; font-weight: 700; color: var(--yp-mut); white-space: nowrap; }
.yp-gh { margin: 16px 2px 8px; font-family: var(--sans); font-size: 13px; font-weight: 700; letter-spacing: .02em; color: var(--yp-mut); }
.yp-empty, .yp-hint { margin: 8px 2px; font-family: var(--serif); font-size: 15px; line-height: 1.5; color: var(--yp-mut); }

/* ── η ύλη ── */
.yp-units { display: grid; gap: 6px; }
.yp-unit { display: grid; grid-template-columns: 22px minmax(0, 1fr) auto; align-items: start; gap: 10px; width: 100%; text-align: left; cursor: pointer;
  padding: 10px 12px; border-radius: 12px; border: 1.5px solid var(--yp-edge); background: var(--yp-card); transition: border-color .15s, background .15s; }
.yp-unit:hover { border-color: var(--hk-edge-hi, var(--yp-acc)); }
.yp-unit__box { width: 20px; height: 20px; margin-top: 1px; border-radius: 6px; border: 2px solid var(--c-sec-2, var(--line-bold)); background: var(--yp-card); display: grid; place-items: center; }
.yp-unit.is-on { border-color: var(--yp-acc); background: color-mix(in srgb, var(--yp-acc) 12%, var(--yp-card)); }
.yp-unit.is-on .yp-unit__box { background: var(--acc-fill); border-color: var(--acc-fill); }
.yp-unit.is-on .yp-unit__box::after { content: ''; width: 10px; height: 6px; border: solid var(--on-acc); border-width: 0 0 2.5px 2.5px; transform: translateY(-1px) rotate(-45deg); }
.yp-unit__b { display: grid; gap: 2px; min-width: 0; }
.yp-unit__t { font-family: var(--disp); font-weight: 600; font-size: 16px; line-height: 1.15; }
.yp-unit.is-on .yp-unit__t { color: var(--terra); }
.yp-unit__s { font-family: var(--serif); font-size: 13.5px; line-height: 1.35; color: var(--yp-mut); }
.yp-unit__x { font-family: var(--serif); font-size: 12.5px; line-height: 1.35; color: var(--yp-mut); }
.yp-unit--all { margin-bottom: 4px; }
.yp-unit.is-off { cursor: default; background: transparent; border-style: dashed; }
.yp-unit.is-off .yp-unit__box { border-style: dashed; }
.yp-unit.is-off:hover { border-color: var(--yp-edge); }
.yp-lock { align-self: center; padding: 3px 8px; border-radius: 999px; font-size: 11.5px; font-weight: 700; color: var(--yp-ink); background: var(--yp-card); border: 1px solid var(--yp-edge); }
.yp-next { display: none; }

/* ── τα παιχνίδια ── */
.yp-search { width: 100%; padding: 11px 14px; border-radius: 999px; border: 1.5px solid var(--c-sec-2, var(--line-bold)); background: var(--yp-card); color: var(--yp-ink); font: inherit; font-size: 15px; }
.yp-search::placeholder { color: var(--yp-mut); }
.yp-search:focus { outline: none; border-color: var(--yp-acc); }
.yp-types { display: flex; flex-wrap: wrap; gap: 6px; margin: 10px 0 14px; }
.yp-type { cursor: pointer; padding: 6px 12px; border-radius: 999px; border: 1px solid var(--yp-edge); background: var(--yp-card); font-size: 13.5px; font-weight: 700; color: var(--yp-ink); }
.yp-type:hover { border-color: var(--yp-acc); }
.yp-type.is-on { background: var(--acc-fill); border-color: var(--acc-fill); color: var(--on-acc); }
.yp-games { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(auto-fill, minmax(210px, 1fr)); gap: 10px; }
.yp-gi { min-width: 0; }
.yp-game { display: grid; grid-template-columns: 48px minmax(0, 1fr); gap: 12px; align-items: center; width: 100%; height: 100%; text-align: left; cursor: pointer;
  padding: 10px 12px; border-radius: 14px; border: 1.5px solid var(--yp-edge); background: var(--yp-card); transition: border-color .15s, transform .15s, box-shadow .15s; }
.yp-game:hover { border-color: var(--hk-edge-hi, var(--yp-acc)); transform: translateY(-2px); box-shadow: var(--hk-sh1, none); }
.yp-game__mk { width: 48px; height: 48px; border-radius: 12px; padding: 6px; background: var(--yp-sink); color: var(--terra-dk, var(--terra)); display: grid; place-items: center; }
.yp-game__illu { display: grid; place-items: center; width: 100%; height: 100%; }
.yp-game__illu svg { width: 100%; height: 100%; display: block; }
.yp-game__b { display: grid; gap: 2px; min-width: 0; }
.yp-game__nm { font-family: var(--disp); font-weight: 600; font-size: 16px; line-height: 1.15; }
.yp-game__ty { font-size: 12.5px; font-weight: 700; color: var(--yp-mut); }
.yp-game__fl { justify-self: start; margin-top: 2px; padding: 2px 8px; border-radius: 999px; font-size: 11.5px; font-weight: 700;
  background: color-mix(in srgb, var(--yp-acc) 14%, transparent); color: var(--terra); }
.yp-game__fl.is-whole { background: var(--yp-sink); color: var(--yp-ink); border: 1px solid var(--yp-edge); }
.yp-game__why { font-family: var(--serif); font-size: 12.5px; line-height: 1.3; color: var(--yp-mut); }
.yp-game.is-on { border-color: var(--yp-acc); background: color-mix(in srgb, var(--yp-acc) 12%, var(--yp-card)); box-shadow: 0 0 0 2px var(--yp-acc); }
.yp-game.is-on .yp-game__nm { color: var(--terra); }
.yp-game.is-off { cursor: default; border-style: dashed; background: transparent; }
.yp-game.is-off:hover { transform: none; box-shadow: none; border-color: var(--yp-edge); }
.yp-game.is-off .yp-game__mk { filter: grayscale(1); opacity: .45; }
.yp-off { margin-top: 18px; }
.yp-off__s { cursor: pointer; display: inline-flex; align-items: center; gap: 8px; padding: 6px 2px; font-weight: 700; font-size: 14px; color: var(--yp-ink); }
.yp-off[open] .yp-off__s { margin-bottom: 10px; }

/* ── η σύνοψη και το «Παίξε» ── */
.yp-bar { position: sticky; bottom: 12px; z-index: 5; display: flex; align-items: center; justify-content: space-between; gap: 16px; padding: 12px 14px 12px 18px;
  border-radius: 18px; background: var(--yp-card); border: 1.5px solid var(--yp-acc); box-shadow: var(--hk-sh2, 0 22px 44px -22px var(--shadow)); }
.yp-bar__tx { display: grid; gap: 2px; min-width: 0; }
.yp-bar__sum { font-family: var(--disp); font-weight: 600; font-size: 17px; line-height: 1.2; text-wrap: balance; }
.yp-bar__sum .yp-nw { white-space: nowrap; }
.yp-bar__tx small { font-size: 13px; color: var(--yp-mut); }
.yp-play { flex: none; display: inline-flex; align-items: center; gap: 8px; cursor: pointer; padding: 12px 24px; border-radius: 999px; border: 0;
  background: var(--acc-fill); color: var(--on-acc); font-family: var(--sans); font-weight: 800; font-size: 16px; }
.yp-play:hover { filter: brightness(1.06); }
.yp-play[disabled] { cursor: default; filter: none; background: var(--yp-sink); color: var(--yp-mut); border: 1px solid var(--yp-edge); }
.yp-play__ic { font-size: 12px; }

/* ── τα βήματα του κινητού ── */
.yp-steps { display: none; }
@media (max-width: 760px) {
  .yp-cols { grid-template-columns: 1fr; }
  .yp-col--u { position: static; max-height: none; overflow: visible; }
  .yp-steps { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; position: sticky; top: 0; z-index: 6; padding: 6px 0; background: var(--c-dom, var(--bg)); }
  .yp-step { display: grid; grid-template-columns: 28px minmax(0, 1fr); gap: 8px; align-items: center; text-align: left; cursor: pointer;
    padding: 8px 10px; border-radius: 14px; border: 1.5px solid var(--yp-edge); background: var(--yp-card); }
  .yp-step__n { display: grid; place-items: center; width: 28px; height: 28px; border-radius: 50%; background: var(--yp-sink); font-weight: 800; font-size: 14px; }
  .yp-step__t { display: grid; min-width: 0; }
  .yp-step__t b { font-size: 14.5px; }
  .yp-step__t small { font-size: 12px; color: var(--yp-mut); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
  .yp-step[aria-selected="true"] { border-color: var(--yp-acc); background: color-mix(in srgb, var(--yp-acc) 12%, var(--yp-card)); }
  .yp-step[aria-selected="true"] .yp-step__n { background: var(--acc-fill); color: var(--on-acc); }
  .yp[data-step="1"] .yp-col--g, .yp[data-step="2"] .yp-col--u { display: none; }
  .yp-next { display: flex; align-items: center; justify-content: center; gap: 8px; width: 100%; margin-top: 14px; padding: 12px; cursor: pointer;
    border-radius: 999px; border: 1.5px solid var(--yp-acc); background: transparent; color: var(--terra); font-weight: 800; font-size: 15px; }
  .yp-games { grid-template-columns: 1fr; }
  .yp-bar { bottom: 8px; padding: 10px 10px 10px 14px; gap: 10px; }
  .yp-bar__sum { font-size: 15px; }
  .yp-play { padding: 11px 18px; font-size: 15px; }
}

/* ── οι είσοδοι ── */
/* Αρχική · «Τα μαθήματά σου»: μικρό «Παιχνίδια» μέσα στο πλακίδιο, πάνω από τον σύνδεσμο του πλακιδίου. */
.hk-sc__ypc { display: none; }
.hk-s-learn .hk-sc__ypc { position: relative; z-index: 3; display: inline-flex; align-items: center; gap: 5px; margin-top: 6px; padding: 4px 10px 4px 8px; border-radius: 999px;
  font-family: var(--sans); font-size: 12.5px; font-weight: 700; background: var(--c-dom-2, var(--card)); color: var(--terra); border: 1px solid color-mix(in srgb, var(--hk-acc) 40%, transparent); }
.hk-s-learn .hk-sc__ypc .hk-ic { width: 15px; height: 15px; display: inline-grid; }
.hk-s-learn .hk-sc__ypc .hk-ic svg { width: 100%; height: 100%; }
.hk-s-learn .hk-sc__ypc:hover { background: var(--acc-fill); color: var(--on-acc); border-color: var(--acc-fill); }
@media (max-width: 720px) {
  .hk-subj .hk-sc__ypc { position: relative; z-index: 3; display: inline-flex; align-items: center; gap: 5px; margin-top: 4px; padding: 3px 9px 3px 7px; border-radius: 999px;
    font-family: var(--sans); font-size: 12px; font-weight: 700; background: var(--c-dom-2, var(--card)); color: var(--terra); border: 1px solid color-mix(in srgb, var(--hk-acc) 40%, transparent); }
  .hk-subj .hk-sc__ypc .hk-ic { width: 14px; height: 14px; display: inline-grid; }
}
/* Σελίδα τάξης: «Διάλεξε ύλη & παιχνίδι» κάτω από το «Όλα» του ραφιού. */
.hk-shelf__yp { display: inline-flex; align-items: center; justify-content: space-between; gap: 8px; margin-top: 8px; padding: 9px 14px; border-radius: 999px;
  background: var(--acc-fill); color: var(--on-acc); font-family: var(--sans); font-weight: 800; font-size: 13.5px; text-decoration: none; }
.hk-shelf__yp:hover { filter: brightness(1.06); }
.hk-shelf__yp .hk-shelf__ar { display: inline-grid; width: 16px; height: 16px; }
.hk-shelf__yp .hk-shelf__ar svg { width: 100%; height: 100%; }
