@import url('https://fonts.googleapis.com/css2?family=Comfortaa:wght@500;700&display=swap');

:root {
  --bg: #fbf7ef;
  --ink: #5a5468;
  --soft: #8d8699;
  --blue: #a9c8e3;   --blue-d: #86a9c8;
  --sage: #b5d3b0;   --sage-d: #94b78f;
  --butter: #f4dd95; --butter-d: #dbc174;
  --peach: #f4bfa3;  --peach-d: #d9a084;
  --lav: #cdbfe3;    --lav-d: #ac9ccb;
  --rose: #efbbc4;   --rose-d: #d298a3;
  --sand: #efe7d8;   --sand-d: #d6cbb6;
}

* { box-sizing: border-box; -webkit-tap-highlight-color: transparent; }
html, body { margin: 0; min-height: 100%; }
body {
  background: var(--bg);
  background-image:
    radial-gradient(circle at 12% 18%, rgba(169,200,227,.18) 0 90px, transparent 91px),
    radial-gradient(circle at 88% 12%, rgba(244,221,149,.22) 0 70px, transparent 71px),
    radial-gradient(circle at 80% 88%, rgba(239,187,196,.18) 0 110px, transparent 111px),
    radial-gradient(circle at 8% 85%, rgba(181,211,176,.2) 0 80px, transparent 81px);
  background-attachment: fixed;
  color: var(--ink);
  font-family: 'Comfortaa', 'Segoe UI', system-ui, sans-serif;
  font-weight: 700;
  user-select: none;
  -webkit-user-select: none;
}
button { font-family: inherit; font-weight: inherit; cursor: pointer; }
#app { max-width: 900px; margin: 0 auto; padding: 14px 16px 40px; }

/* ---------- τουβλάκι ---------- */
.brick {
  --c: var(--sand); --d: var(--sand-d);
  position: relative;
  background:
    linear-gradient(180deg, rgba(255,255,255,.38) 0, rgba(255,255,255,0) 22%),
    linear-gradient(90deg, rgba(0,0,0,.06) 0, rgba(0,0,0,0) 10%, rgba(0,0,0,0) 90%, rgba(0,0,0,.08) 100%),
    var(--c);
  border: 0;
  border-radius: 10px;
  color: var(--ink);
  margin-top: 16px;
  box-shadow:
    inset 0 3px 0 rgba(255,255,255,.45),
    inset 0 -5px 0 rgba(0,0,0,.07),
    0 7px 0 var(--d),
    0 14px 18px rgba(90, 80, 100, .14);
  transition: transform .1s, box-shadow .1s;
}
.brick::before { /* κυλινδρικά κουμπάκια lego */
  content: ""; position: absolute; left: 10px; right: 10px; top: -12px; height: 14px;
  background:
    radial-gradient(ellipse 10px 4.5px at 16px 5px, color-mix(in srgb, var(--c) 62%, #fff) 96%, transparent 100%) 0 0 / 32px 14px space,
    radial-gradient(ellipse 6px 2.2px at 16px 5px, color-mix(in srgb, var(--c) 88%, #000) 96%, transparent 100%) 0 0 / 32px 14px space,
    linear-gradient(90deg, transparent 5px, var(--d) 5px, var(--c) 12px, var(--c) 19px, var(--d) 27px, transparent 27px) 0 5px / 32px 9px space;
  pointer-events: none;
}
.brick.flat::before { display: none; }
button.brick:active { transform: translateY(5px); box-shadow: inset 0 3px 0 rgba(255,255,255,.45), inset 0 -5px 0 rgba(0,0,0,.07), 0 2px 0 var(--d); }
.c-blue   { --c: var(--blue);   --d: var(--blue-d); }
.c-sage   { --c: var(--sage);   --d: var(--sage-d); }
.c-butter { --c: var(--butter); --d: var(--butter-d); }
.c-peach  { --c: var(--peach);  --d: var(--peach-d); }
.c-lav    { --c: var(--lav);    --d: var(--lav-d); }
.c-rose   { --c: var(--rose);   --d: var(--rose-d); }
.c-sand   { --c: var(--sand);   --d: var(--sand-d); }

/* ---------- κεφαλίδα ---------- */
.top { display: flex; align-items: center; gap: 12px; margin-bottom: 6px; }
.top .ttl { flex: 1; font-size: 20px; text-align: center; }
.round-btn {
  width: 48px; height: 48px; border-radius: 50%; border: 0; font-size: 22px;
  background: #fff; color: var(--ink); box-shadow: 0 4px 0 var(--sand-d), 0 8px 14px rgba(90,80,100,.1);
}
.round-btn:active { transform: translateY(3px); box-shadow: 0 1px 0 var(--sand-d); }
.prog { display: flex; gap: 6px; justify-content: center; min-height: 18px; margin: 4px 0 2px; }
.prog i { width: 22px; height: 12px; border-radius: 4px; background: var(--sand-d); opacity: .5; transition: all .3s; }
.prog i.on { background: var(--sage-d); opacity: 1; }
.prompt { text-align: center; font-size: 22px; margin: 16px 0 6px; line-height: 1.5; min-height: 34px; }
.prompt .inl {
  display: inline-block; padding: 0 12px; margin: 0 4px; border-radius: 12px;
  background: var(--butter); box-shadow: 0 3px 0 var(--butter-d); font-size: 28px;
}
.toast { text-align: center; min-height: 26px; color: var(--peach-d); font-size: 17px; margin: 4px 0; }

/* ---------- αρχική ---------- */
.hero { text-align: center; margin: 14px 0 6px; }
.hero h1 { font-size: 34px; margin: 0; letter-spacing: .5px; }
.hero p { color: var(--soft); margin: 6px 0 0; font-size: 17px; }
.lego-logo { display: flex; justify-content: center; gap: 6px; margin-bottom: 8px; }
.lego-logo b { width: 38px; height: 28px; border-radius: 7px; display: block; }
.letters { display: grid; grid-template-columns: repeat(auto-fill, minmax(104px, 1fr)); gap: 12px 14px; margin-top: 26px; }
.letter-tile {
  padding: 16px 4px 12px; font-size: 38px; line-height: 1.1;
}
.letter-tile small { display: block; margin-top: 6px; font-size: 14px; color: var(--ink); opacity: .7; letter-spacing: 2px; }

/* ---------- χάρτης σταδίων ---------- */
.stage-hero { display: flex; justify-content: center; margin: 10px 0 24px; }
.stage-hero .brick { padding: 10px 38px 14px; font-size: 76px; line-height: 1.1; }
.stages { display: grid; grid-template-columns: repeat(auto-fit, minmax(250px, 1fr)); gap: 14px 18px; }
.stage-card {
  display: flex; align-items: center; gap: 14px; text-align: left; padding: 14px 18px; font-size: 19px;
}
.stage-card .num {
  width: 44px; height: 44px; border-radius: 50%; background: rgba(255,255,255,.7);
  display: grid; place-items: center; font-size: 22px; flex: none;
}
.stage-card .ico { font-size: 28px; margin-left: auto; }
.stage-card .tick { position: absolute; top: -8px; right: -6px; width: 30px; height: 30px; border-radius: 50%;
  background: var(--sage-d); color: #fff; display: grid; place-items: center; font-size: 16px; z-index: 3; }

/* ---------- πλέγματα ---------- */
.grid { display: grid; gap: 14px 14px; margin: 22px auto 0; max-width: 720px; }
.grid.g4 { grid-template-columns: repeat(4, 1fr); }
.grid.g5 { grid-template-columns: repeat(5, 1fr); }
.cell { min-height: 80px; font-size: 44px; line-height: 1; padding: 14px 4px; }
.cell.found { --c: var(--sage); --d: var(--sage-d); animation: pop .35s; pointer-events: none; }
.cell.found::after { content: "✓"; position: absolute; right: 7px; top: 4px; font-size: 15px; color: #fff; }
.cell.paint-u { --c: var(--blue); --d: var(--blue-d); animation: pop .35s; pointer-events: none; }
.cell.paint-l { --c: var(--butter); --d: var(--butter-d); animation: pop .35s; pointer-events: none; }
.card { min-height: 112px; font-size: 58px; padding: 18px 4px 10px; }
.card .cap { display: block; font-size: 15px; margin-top: 6px; min-height: 18px; }
.card.found { --c: var(--sage); --d: var(--sage-d); animation: pop .35s; pointer-events: none; }

.shake { animation: shake .35s; }
@keyframes shake { 0%,100% { transform: translateX(0); } 25% { transform: translateX(-7px); } 75% { transform: translateX(7px); } }
@keyframes pop { 0% { transform: scale(.88); } 60% { transform: scale(1.08); } 100% { transform: scale(1); } }

/* ---------- κραγιόνια ---------- */
.tools { display: flex; justify-content: center; gap: 22px; margin-top: 12px; flex-wrap: wrap; }
.tool { padding: 8px 22px 10px; font-size: 18px; min-width: 150px; opacity: .75; }
.tool b { display: block; font-size: 40px; line-height: 1.1; }
.tool.sel { opacity: 1; transform: translateY(-4px); box-shadow: 0 10px 0 var(--d), 0 18px 22px rgba(90,80,100,.15); outline: 4px solid rgba(255,255,255,.9); }

/* ---------- στάδιο 4 ---------- */
.fill-pic { text-align: center; font-size: 96px; margin-top: 8px; }
.word-row { display: flex; justify-content: center; gap: 6px; flex-wrap: wrap; margin-top: 14px; }
.lt { width: 52px; height: 64px; font-size: 38px; display: grid; place-items: center; padding: 0; }
.slot {
  width: 56px; height: 68px; margin-top: 12px; border: 4px dashed var(--lav-d); border-radius: 16px;
  background: rgba(205,191,227,.2); display: grid; place-items: center; font-size: 38px; color: var(--ink);
}
.slot.ok { border: 0; background: var(--sage); box-shadow: 0 6px 0 var(--sage-d); animation: pop .4s; }
.choices { display: flex; justify-content: center; gap: 20px; margin-top: 34px; flex-wrap: wrap; }
.choice { width: 92px; height: 92px; font-size: 52px; padding: 0; }
.choice.gone { opacity: .25; pointer-events: none; }

/* ---------- lego ένωσης ---------- */
.joinrow { display: flex; justify-content: center; margin: 34px 0 10px; perspective: 700px; }
.syl {
  display: inline-grid; place-items: center; padding: 0 26px; position: relative;
  min-width: 128px; height: 128px; font-size: 76px; border-radius: 18px; margin-top: 14px;
}
.syl.small { min-width: 96px; height: 100px; font-size: 52px; padding: 0 20px; }
.syl:not(.last) { border-radius: 10px 0 0 10px; box-shadow: inset -3px 0 0 rgba(0,0,0,.09), inset 0 3px 0 rgba(255,255,255,.45), inset 0 -5px 0 rgba(0,0,0,.07), 0 7px 0 var(--d), 0 14px 18px rgba(90,80,100,.14); }
.syl + .syl { border-radius: 0 10px 10px 0; box-shadow: inset 3px 0 0 rgba(255,255,255,.25), inset 0 3px 0 rgba(255,255,255,.45), inset 0 -5px 0 rgba(0,0,0,.07), 0 7px 0 var(--d), 0 14px 18px rgba(90,80,100,.14); }
.syl + .syl:not(.last) { border-radius: 0; }
.syl .sock { display: none; }
.syl .t { position: relative; z-index: 1; }
.syl.tap { cursor: pointer; }
.flip-out { transform: rotateX(90deg); transition: transform .22s ease-in; }
.flip-in { animation: flipin .26s ease-out; }
@keyframes flipin { from { transform: rotateX(-90deg); } to { transform: none; } }
.reading { text-align: center; font-size: 64px; min-height: 84px; margin-top: 22px; letter-spacing: 4px; }
.reading.hide { visibility: hidden; }
.actions { display: flex; justify-content: center; gap: 18px; margin-top: 14px; flex-wrap: wrap; }
.big-btn { padding: 14px 28px; font-size: 20px; border-radius: 18px; min-width: 150px; }
.dots { display: flex; justify-content: center; gap: 8px; margin-top: 18px; }
.dots i { width: 14px; height: 14px; border-radius: 50%; background: var(--sand-d); opacity: .6; }
.dots i.on { background: var(--sage-d); opacity: 1; }

/* ---------- λέξεις ---------- */
.word-bricks { display: flex; justify-content: center; margin: 30px 0 8px; flex-wrap: nowrap; }
.opts { display: flex; justify-content: center; gap: 22px; margin-top: 30px; flex-wrap: wrap; }
.opt { width: 112px; height: 112px; font-size: 64px; padding: 0; }
.opt.right { --c: var(--sage); --d: var(--sage-d); animation: pop .4s; }

/* ---------- τέλος σταδίου ---------- */
.overlay { position: fixed; inset: 0; background: rgba(251,247,239,.88); display: grid; place-items: center; z-index: 50; overflow: hidden; }
.overlay .box { text-align: center; padding: 20px; position: relative; z-index: 2; }
.overlay h2 { font-size: 40px; margin: 0 0 6px; }
.overlay p { color: var(--soft); font-size: 20px; margin: 0 0 22px; }
.overlay .row { display: flex; gap: 16px; justify-content: center; flex-wrap: wrap; }
.confetti { position: absolute; top: -30px; width: 22px; height: 16px; border-radius: 4px; animation: fall linear forwards; }
@keyframes fall { to { transform: translateY(110vh) rotate(540deg); } }

.gone { opacity: .25; pointer-events: none; }

@media (max-width: 560px) {
  .grid.g4 { gap: 10px; }
  .grid.g5 { gap: 8px; grid-template-columns: repeat(4, 1fr); }
  .cell { font-size: 36px; min-height: 68px; }
  .card { font-size: 46px; min-height: 96px; }
  .syl { min-width: 100px; height: 104px; font-size: 56px; padding: 0 18px; }
  .syl.small { min-width: 78px; height: 84px; font-size: 40px; padding: 0 14px; }
  .lt { width: 40px; height: 54px; font-size: 30px; }
  .slot { width: 44px; height: 58px; }
  .reading { font-size: 50px; }
}

.stage5 { position: relative; }
.side-btn { position: absolute; top: -6px; right: 0; padding: 12px 16px; font-size: 15px; z-index: 5; }
.chips { display: flex; flex-wrap: wrap; gap: 10px 14px; justify-content: center; max-width: 440px; margin: 0 auto 26px; }
.chip { min-width: 70px; height: 62px; font-size: 30px; opacity: .45; padding: 0 12px; }
.chip.sel { opacity: 1; outline: 4px solid rgba(255,255,255,.95); }
@media (max-width: 700px) { .side-btn { position: static; display: block; margin: 0 auto; } }

.chips-label { flex-basis: 100%; text-align: center; margin: 4px 0 0; color: var(--soft); font-size: 16px; }
.stage5 { --gap: 130px; }
.stage5 .syl.last { margin-left: var(--gap); transition: margin-left .4s cubic-bezier(.3,1.35,.5,1); touch-action: none; }
.stage5 .joinrow.joined .syl.last { margin-left: 0; }
.stage5 .joinrow.dragging .syl.last { transition: none; }
.stage5 .joinrow:not(.joined) .syl.syl.syl { border-radius: 10px; box-shadow: inset 0 3px 0 rgba(255,255,255,.45), inset 0 -5px 0 rgba(0,0,0,.07), 0 7px 0 var(--d), 0 14px 18px rgba(90,80,100,.14); }
@media (max-width: 560px) { .stage5 { --gap: 60px; } }
.side-btn { position: static; display: block; margin: 8px 0 0 auto; }
.stage5 { display: flex; flex-direction: column; }
.stage5 .side-btn { align-self: flex-end; margin: 8px 0 0; }
@media (max-width: 700px) { .stage5 .side-btn { align-self: center; } }
.stage5 .side-btn { position: relative; }
.build-area { display: flex; justify-content: center; align-items: center; gap: 70px; margin-top: 24px; flex-wrap: wrap; }
.build-row { margin: 0; }
.syl-ph { min-width: 128px; height: 128px; margin-top: 14px; border: 4px dashed var(--lav-d); border-radius: 12px; background: rgba(205,191,227,.18); }
.syl-ph.last { border-left-width: 0; border-radius: 0 12px 12px 0; }
.build .syl-ph:not(.last) { border-right-width: 0; border-radius: 12px 0 0 12px; }
.vcol { display: grid; grid-auto-flow: column; grid-template-rows: repeat(6, auto); gap: 4px 18px; }
.vcol .syl.small { min-width: 104px; height: 58px; font-size: 32px; padding: 0 14px; margin-top: 16px; border-radius: 10px !important; cursor: pointer; }
.vcol .syl.last { margin-left: 0; }
.vcol .syl.small.gone { opacity: .25; pointer-events: auto; }
.build .syl.tap { cursor: pointer; }
@media (max-width: 700px) { .build-area { gap: 24px; } .syl-ph { min-width: 100px; height: 104px; } .vcol { grid-template-rows: repeat(4, auto); } }
.stage5.build .syl.last { margin-left: 0; }

/* =========================================================
   Όλα σε μία οθόνη — χωρίς κύλιση πάνω/κάτω
   ========================================================= */
html, body { height: 100%; overflow: hidden; }
#app { height: 100dvh; display: flex; flex-direction: column; padding: 8px 16px 16px; }
.top { margin-bottom: 0; }
.round-btn { width: 42px; height: 42px; font-size: 20px; }
.top .ttl { font-size: clamp(15px, 2.6vh, 20px); }
.prog { margin: 2px 0; min-height: 14px; }
.prog i { height: 10px; }
.prompt { font-size: clamp(15px, 3vh, 22px); margin: clamp(2px, 1vh, 10px) 0 0; min-height: 0; line-height: 1.3; }
.prompt .inl { font-size: clamp(18px, 3.8vh, 28px); }
.toast { min-height: clamp(14px, 2.8vh, 22px); margin: 2px 0; font-size: clamp(13px, 2.3vh, 17px); }
.play { flex: 1; min-height: 0; display: flex; flex-direction: column; justify-content: center; }
.actions { margin-top: clamp(8px, 2vh, 14px); }
.big-btn { padding: clamp(8px, 1.6vh, 14px) 24px; font-size: clamp(16px, 2.6vh, 20px); }

/* αρχική + χάρτης σταδίων */
.hero { margin: 0; }
.hero h1 { font-size: clamp(24px, 4.6vh, 34px); }
.hero p { font-size: clamp(14px, 2.4vh, 17px); margin-top: 2px; }
.lego-logo { margin-bottom: 4px; }
.lego-logo b { width: 30px; height: 20px; }
.letters { flex: 1; min-height: 0; align-content: space-evenly; margin-top: 8px; gap: clamp(14px, 2.4vh, 22px) 12px; grid-template-columns: repeat(auto-fit, minmax(92px, 1fr)); }
.letter-tile { padding: clamp(6px, 1.4vh, 14px) 4px clamp(6px, 1.2vh, 12px); font-size: clamp(24px, 5vh, 38px); margin-top: 0; }
.letter-tile small { font-size: clamp(10px, 1.6vh, 13px); margin-top: 2px; letter-spacing: 1px; }
.stage-hero { margin: clamp(2px, 1vh, 10px) 0 clamp(8px, 2vh, 20px); }
.stage-hero .brick { font-size: clamp(40px, 10vh, 76px); padding: 6px 34px 10px; }
.stages { flex: 1; min-height: 0; align-content: space-evenly; gap: clamp(14px, 2.6vh, 22px) 18px; }
.stage-card { padding: clamp(8px, 1.6vh, 14px) 18px; font-size: clamp(15px, 2.6vh, 19px); margin-top: 0; }
.stage-card .num { width: clamp(32px, 5vh, 44px); height: clamp(32px, 5vh, 44px); font-size: clamp(16px, 2.6vh, 22px); }
.stage-card .ico { font-size: clamp(20px, 3.6vh, 28px); }

/* πλέγματα */
.grid { margin-top: clamp(14px, 2.6vh, 22px); gap: clamp(16px, 3vh, 22px) 14px; width: 100%; }
.grid .brick { margin-top: 0; }
.cell { min-height: clamp(46px, 11vh, 84px); font-size: clamp(26px, 6vh, 44px); padding: 0 4px; }
.card { min-height: clamp(60px, 15vh, 112px); font-size: clamp(30px, 8vh, 58px); padding: 6px 4px; }
.card .cap { font-size: clamp(10px, 1.8vh, 14px); margin-top: 2px; min-height: 12px; }
.tools { margin-top: 4px; gap: 16px; }
.tool { padding: 4px 18px 8px; min-width: 120px; font-size: clamp(13px, 2.2vh, 18px); }
.tool b { font-size: clamp(24px, 5vh, 40px); }

/* στάδιο 4 */
.fill-pic { font-size: clamp(50px, 15vh, 96px); margin-top: 0; line-height: 1.1; }
.word-row { margin-top: clamp(8px, 2vh, 14px); }
.lt { width: clamp(38px, 8vh, 52px); height: clamp(46px, 10vh, 64px); font-size: clamp(26px, 5.6vh, 38px); margin-top: 8px; }
.slot { width: clamp(40px, 8.4vh, 56px); height: clamp(50px, 10.6vh, 68px); font-size: clamp(26px, 5.6vh, 38px); margin-top: 8px; }
.choices { margin-top: clamp(14px, 4vh, 34px); gap: clamp(12px, 3vw, 20px); }
.choice { width: clamp(60px, 13vh, 92px); height: clamp(60px, 13vh, 92px); font-size: clamp(34px, 7.5vh, 52px); }

/* στάδια 5, 6 (lego) */
.joinrow { margin: clamp(10px, 3vh, 30px) 0 4px; }
.syl { min-width: clamp(96px, 18vh, 128px); height: clamp(84px, 18vh, 128px); font-size: clamp(46px, 11vh, 76px); margin-top: 14px; }
.stage5 { --gap: clamp(50px, 10vw, 130px); }
.syl-ph { min-width: clamp(96px, 18vh, 128px); height: clamp(84px, 18vh, 128px); margin-top: 14px; }
.build-area { margin-top: clamp(4px, 2vh, 20px); gap: clamp(24px, 6vw, 70px); }
.vcol { grid-template-rows: repeat(6, auto); gap: 0 14px; }
.vcol .syl.small { height: clamp(36px, 7vh, 58px); font-size: clamp(20px, 4.4vh, 32px); margin-top: 14px; min-width: 96px; }
.side-btn { padding: clamp(6px, 1.4vh, 12px) 16px; font-size: clamp(12px, 2vh, 15px); margin-top: 0 !important; }
.word-bricks { margin: clamp(8px, 3vh, 30px) 0 4px; }
.word-bricks .syl.small { min-width: clamp(76px, 14vh, 96px); height: clamp(64px, 13vh, 100px); font-size: clamp(32px, 7vh, 52px); }
.opts { margin-top: clamp(14px, 3.4vh, 30px); gap: clamp(12px, 3vw, 22px); }
.opt { width: clamp(66px, 15vh, 112px); height: clamp(66px, 15vh, 112px); font-size: clamp(36px, 8.6vh, 64px); }
.reading { font-size: clamp(36px, 8vh, 64px); min-height: 0; margin-top: 10px; }
@media (max-width: 560px) {
  .grid.g4 { gap: 16px 10px; }
  .vcol { grid-template-rows: repeat(4, auto); }
  .vcol .syl.small { min-width: 78px; }
  .lt { width: clamp(30px, 11vw, 40px); }
}
.syl, .syl-ph { min-width: clamp(96px, 22vh, 150px); height: clamp(84px, 22vh, 150px); }
.syl { font-size: clamp(46px, 13vh, 88px); }
.vcol .syl.small { min-width: 96px; height: clamp(36px, 7vh, 58px); font-size: clamp(20px, 4.4vh, 32px); }
.word-bricks .syl.small { min-width: clamp(76px, 16vh, 110px); height: clamp(64px, 16vh, 110px); font-size: clamp(32px, 8.5vh, 60px); }
.tools + .grid { margin-top: clamp(22px, 4vh, 30px); }

/* Τα κουμπιά ελέγχου είναι απλά (όχι lego) — lego είναι μόνο τα γράμματα/εικόνες που μαθαίνουν */
.big-btn, .side-btn, .stage-card {
  background: var(--c);
  border-radius: 999px;
  margin-top: 0;
  box-shadow: 0 3px 0 var(--d), 0 8px 14px rgba(90, 80, 100, .10);
}
.stage-card { border-radius: 20px; }
.big-btn::before, .side-btn::before, .stage-card::before { display: none; }
.big-btn:active, .side-btn:active, .stage-card:active { transform: translateY(3px); box-shadow: 0 0 0 var(--d); }
.stage-card .num { background: rgba(255, 255, 255, .6); }
.stage5 .side-btn { margin: 0 !important; }

/* αρχική: πλοήγηση, logo, δικαιώματα */
.home-top { gap: 10px; }
.home-top .spacer { flex: 1; }
.pill-btn { background: #fff; color: var(--ink); text-decoration: none; border: 0; border-radius: 999px; padding: 10px 16px; font-size: clamp(12px, 2vh, 15px); white-space: nowrap; box-shadow: 0 3px 0 var(--sand-d), 0 8px 14px rgba(90,80,100,.08); }
.pill-btn:active { transform: translateY(3px); box-shadow: 0 0 0 var(--sand-d); }
.brand-logo { display: block; margin: 0 auto 2px; height: clamp(40px, 9vh, 72px); width: auto; }
.copy { text-align: center; margin: 10px 0 0; font-size: clamp(11px, 1.8vh, 14px); color: var(--soft); font-weight: 500; }
.letters { margin-top: 4px; }

/* εικόνες λέξεων */
.pic { display: block; object-fit: contain; pointer-events: none; -webkit-user-drag: none; }
.card .pic { height: clamp(44px, 11vh, 84px); max-width: 88%; margin: 0 auto; }
.fill-pic .pic { height: clamp(70px, 20vh, 140px); max-width: 70vw; margin: 0 auto; }
.opt .pic { width: 84%; height: 84%; margin: 0 auto; }

/* στάδιο 3: μεγάλες κάρτες που γεμίζουν την οθόνη */
.grid.cards { --ch: clamp(70px, calc((100dvh - 270px) / 3), 250px); max-width: min(100%, 1180px); gap: clamp(18px, 3vh, 26px) clamp(12px, 1.6vw, 22px); }
.grid.cards .card { min-height: var(--ch); padding: 6px 4px; }
.grid.cards .card .pic { height: calc(var(--ch) - 30px); max-width: 92%; }
.grid.cards .card { font-size: calc(var(--ch) * .5); }
.grid.cards .card .cap { font-size: clamp(12px, 2.2vh, 18px); }

/* πιο φαρδιά σελίδα για μεγάλες οθόνες */
#app { max-width: 1240px; }
.letters { max-width: 980px; width: 100%; margin-left: auto; margin-right: auto; }
.stages { max-width: 920px; width: 100%; margin-left: auto; margin-right: auto; }
.grid.cards { max-width: min(100%, calc(var(--ch) * 4.7 + 80px)); }

/* στάδιο 4: μεγάλη εικόνα, γράμματα και επιλογές */
.fill-pic { font-size: clamp(60px, 30vh, 260px); }
.fill-pic .pic { height: clamp(90px, 32vh, 340px); max-width: 80vw; }
.lt { width: clamp(36px, min(8.5vh, 6.4vw), 90px); height: clamp(46px, 11vh, 112px); font-size: clamp(26px, min(6.4vh, 5vw), 66px); }
.slot { width: clamp(40px, min(9vh, 6.8vw), 96px); height: clamp(50px, 11.6vh, 118px); font-size: clamp(26px, min(6.4vh, 5vw), 66px); }
.word-row { gap: clamp(5px, 1vh, 10px); }
.choices { margin-top: clamp(16px, 4.5vh, 48px); gap: clamp(14px, 3vw, 30px); }
.choice { width: clamp(64px, 14vh, 150px); height: clamp(64px, 14vh, 150px); font-size: clamp(36px, 8vh, 84px); }

/* στάδιο 7: μεγάλα lego λέξης και εικόνες επιλογής */
.word-bricks .syl.small { min-width: clamp(78px, 18vh, 170px); height: clamp(66px, 17vh, 150px); font-size: clamp(32px, 9vh, 80px); }
.opts { margin-top: clamp(16px, 4vh, 44px); gap: clamp(14px, 2.4vw, 30px); }
.opt { width: clamp(80px, min(24vh, 22vw), 240px); height: clamp(80px, min(24vh, 22vw), 240px); font-size: clamp(40px, 12vh, 120px); }
.opt .pic { width: 88%; height: 88%; }

/* ονόματα λέξεων (για τη δασκάλα) κάτω από τις εικόνες */
.grid.cards .card { display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 2px; }
.grid.cards .card .pic { height: calc(var(--ch) - 46px); }
.grid.cards .card .cap { font-size: clamp(9px, 1.5vh, 12px); font-weight: 500; color: var(--soft); margin: 0; min-height: 0; letter-spacing: .2px; line-height: 1.2; }

/* ονόματα: κρυφά, εμφανίζονται με το κουμπί «Βοήθεια» (ή όταν βρεθεί η σωστή εικόνα) */
.grid.cards .card .cap { visibility: hidden; }
.grid.cards.show-names .card .cap, .grid.cards .card.found .cap { visibility: visible; }
.pill-btn.on { background: var(--butter); box-shadow: 0 3px 0 var(--butter-d); }

@media (max-height: 560px) { .vcol { grid-template-rows: repeat(4, auto); } }

/* στάδιο 8: Γράφω τις λέξεις */
.write-pic { text-align: center; line-height: 1.1; font-size: clamp(50px, 18vh, 200px); }
.write-pic .pic { height: clamp(70px, 22vh, 250px); max-width: 70vw; margin: 0 auto; }
.write-slots, .write-bank { display: flex; flex-wrap: wrap; justify-content: center; gap: clamp(6px, 1.2vh, 12px); }
.write-slots { margin-top: clamp(10px, 2.6vh, 24px); min-height: clamp(48px, 11vh, 108px); }
.write-bank { margin-top: clamp(14px, 3.4vh, 34px); min-height: clamp(48px, 11vh, 108px); gap: clamp(8px, 1.6vh, 16px) clamp(10px, 1.6vw, 18px); }
.wslot { width: clamp(38px, min(9vh, 7vw), 86px); height: clamp(46px, 11vh, 108px); margin-top: 0; padding: 0; border-radius: 14px; font-size: clamp(26px, min(6.4vh, 5.4vw), 62px); display: grid; place-items: center; }
.wslot.empty { border: 4px dashed var(--lav-d); background: rgba(205, 191, 227, .18); box-shadow: none; }
.wslot.locked { opacity: .92; }
.wslot.ok { background: var(--sage); box-shadow: 0 6px 0 var(--sage-d); animation: pop .4s; }
.brick.tile { width: clamp(46px, min(10vh, 8vw), 96px); height: clamp(46px, min(10vh, 8vw), 96px); font-size: clamp(26px, min(6.2vh, 5.4vw), 58px); padding: 0; margin-top: 12px; }

.wslot.accent-pick { cursor: pointer; animation: pulse 1.4s ease-in-out infinite; }
@keyframes pulse { 0%, 100% { transform: translateY(0); } 50% { transform: translateY(-4px); } }
.wslot.accent-pick.shake { animation: shake .35s; }
