/* Base styles for all games. Themes set the colour tokens (theme.json "colors" -> CSS vars)
   and may add a theme.css for shapes and effects. Big touch targets (min 64px), no reading needed. */
:root {
  --bg: #fff7e6; --bg2: #ffe2b8; --ink: #2b2118; --accent: #ff7a3d;
  --tile: #ffffff; --tile-ink: #2b2118; --good: #2fb36d; --soft: #ffd08a;
  --bad: #e5484d;
  --radius: 22px;
  --font: ui-rounded, "SF Pro Rounded", "Nunito", "Arial Rounded MT Bold", system-ui, sans-serif;
  --letter-font: "Andika", "Comic Neue", ui-rounded, "Arial Rounded MT Bold", system-ui, sans-serif;
  color-scheme: light;
}
* { box-sizing: border-box; }
html, body { margin: 0; min-height: 100%; }
body {
  background: radial-gradient(circle at 20% 0%, var(--bg2), var(--bg) 60%) fixed, var(--bg);
  color: var(--ink); font-family: var(--font); font-size: 18px;
  -webkit-tap-highlight-color: transparent; touch-action: manipulation; overflow-x: hidden;
}
button, a.big-btn, a.icon-btn, a.game-card, a.play-next, a.lc-game, a.kid-btn, label.kid-btn { font-family: inherit; cursor: pointer; text-decoration: none; }
button, a.icon-btn, a.lc-game { color: inherit; }
button { border: none; background: none; font-size: inherit; }
#app { max-width: 1100px; margin: 0 auto; padding: 0 16px 120px; }
h1, h2 { margin: .3em 0; }
h2 { font-size: 1.15rem; opacity: .85; }
.note { font-size: .9rem; opacity: .7; }
[hidden] { display: none !important; }

/* ---------- game bar */
.bar { position: sticky; top: 0; z-index: 5; display: flex; align-items: center; gap: 10px; padding: 10px 0; background: linear-gradient(var(--bg) 70%, transparent); }
.icon-btn { width: 60px; height: 60px; border-radius: 50%; display: grid; place-items: center; font-size: 30px; background: var(--tile); box-shadow: 0 3px 0 rgba(0,0,0,.15); }
.icon-btn:active { transform: translateY(2px); box-shadow: none; }
.dots { flex: 1; display: flex; justify-content: center; gap: 8px; flex-wrap: wrap; }
.dot { width: 18px; height: 18px; border-radius: 50%; background: var(--soft); opacity: .6; transition: .3s; }
.dot.now { opacity: 1; transform: scale(1.4); background: var(--accent); }
.dot.ok { opacity: 1; background: var(--good); }
.dot.retry { opacity: 1; background: var(--accent); }
.coins { font-size: 24px; padding: 8px 14px; border-radius: 999px; background: var(--tile); color: var(--tile-ink); white-space: nowrap; }
.coins.big { font-size: 30px; }

/* ---------- stage */
.stage { min-height: 70vh; display: flex; flex-direction: column; align-items: center; justify-content: flex-start; gap: 22px; padding-top: 10px; }
.start { display: flex; flex-direction: column; align-items: center; gap: 18px; margin-top: 4vh; }
.start-icon { font-size: 72px; }
.big-play { width: 140px; height: 140px; border-radius: 50%; font-size: 64px; background: var(--accent); color: #fff; box-shadow: 0 8px 0 rgba(0,0,0,.2); animation: pulse 1.6s infinite; }
.big-play:active { transform: translateY(4px); box-shadow: 0 3px 0 rgba(0,0,0,.2); }
@keyframes pulse { 50% { transform: scale(1.06); } }
.lesson-badge { padding: 6px 14px; border-radius: 999px; background: var(--tile); }
.prompt { display: flex; align-items: center; justify-content: center; gap: 18px; min-height: 120px; }
.prompt-hint { min-width: 10px; }
.big-ear { width: 110px; height: 110px; border-radius: 50%; font-size: 56px; background: var(--tile); box-shadow: 0 6px 0 rgba(0,0,0,.15); }
.big-ear:active, .pic-btn:active { transform: scale(.95); }

/* ---------- tiles */
.tile-grid { display: grid; grid-template-columns: repeat(2, minmax(120px, 190px)); gap: 20px; }
@media (min-width: 700px) { .tile-grid { grid-template-columns: repeat(4, 170px); } }
.tile { min-width: 64px; min-height: 64px; background: var(--tile); color: var(--tile-ink); border: 4px solid var(--accent); border-radius: var(--radius); box-shadow: 0 6px 0 rgba(0,0,0,.18); transition: transform .15s, opacity .3s; user-select: none; -webkit-user-select: none; }
.tile:active { transform: translateY(3px); box-shadow: 0 2px 0 rgba(0,0,0,.18); }
.letter-tile { aspect-ratio: 1; display: grid; place-items: center; }
.letter-tile .glyph { font-family: var(--letter-font); font-size: clamp(56px, 11vw, 96px); line-height: 1; }
.letter-tile.small { width: 96px; }
.letter-tile.small .glyph { font-size: 52px; }
[data-tile-shape="square"] .tile { border-radius: 8px; }
[data-tile-shape="blob"] .tile { border-radius: 42% 58% 55% 45% / 50% 45% 55% 50%; }
[data-tile-shape="shield"] .tile { border-radius: 18px 18px 50% 50% / 18px 18px 40% 40%; }
.tile[data-shape="square"] { border-radius: 8px; } .tile[data-shape="blob"] { border-radius: 42% 58% 55% 45% / 50% 45% 55% 50%; } .tile[data-shape="shield"] { border-radius: 18px 18px 50% 50% / 18px 18px 40% 40%; }
.right { background: var(--good) !important; color: #fff !important; border-color: var(--good) !important; transform: scale(1.08); }
.dim { opacity: .35; }
.shake { animation: shake .4s; }
@keyframes shake { 20%, 60% { transform: translateX(-10px) rotate(-3deg); } 40%, 80% { transform: translateX(10px) rotate(3deg); } }
.mini-tile { display: inline-grid; place-items: center; min-width: 40px; height: 40px; padding: 0 6px; margin: 2px; border-radius: 10px; background: var(--tile); color: var(--tile-ink); border: 2px solid var(--accent); font-family: var(--letter-font); font-size: 24px; }

/* ---------- pictures */
.pic, .pic-sm, .pic-md, .pic-lg, .pic-xl { display: inline-grid; place-items: center; line-height: 1; }
img.pic, img.pic-sm, img.pic-md, img.pic-lg, img.pic-xl { object-fit: contain; border-radius: 14px; }
.pic-sm { font-size: 56px; } img.pic-sm { width: 64px; height: 64px; }
.pic-md { font-size: 64px; } img.pic-md { width: 80px; height: 80px; }
.pic-lg { font-size: 84px; } img.pic-lg { width: 110px; height: 110px; }
.pic-xl { font-size: 120px; } img.pic-xl { width: 160px; height: 160px; }
.pic-btn { padding: 8px 18px; border-radius: 28px; background: var(--tile); box-shadow: 0 6px 0 rgba(0,0,0,.12); }
.pic-btn.pop { animation: pop .6s; }
@keyframes pop { 50% { transform: scale(1.2) rotate(-4deg); } }
.row { display: flex; align-items: center; gap: 14px; flex-wrap: wrap; }
.prompt.row { flex-direction: row; }

/* ---------- hol van */
.slots { display: flex; gap: 16px; flex-wrap: wrap; justify-content: center; }
.slot-btn { min-width: 150px; height: 90px; border-radius: var(--radius); background: var(--tile); color: var(--tile-ink); border: 4px solid var(--accent); font-size: 28px; display: flex; align-items: center; justify-content: center; gap: 8px; box-shadow: 0 6px 0 rgba(0,0,0,.15); }
.slot-btn span { opacity: .35; } .slot-btn span.on { opacity: 1; color: var(--accent); font-size: 36px; }
.slot-btn.right span.on { color: #fff; }
.word-reveal { display: flex; gap: 4px; font-family: var(--letter-font); font-size: 52px; visibility: hidden; }
.word-reveal.show { visibility: visible; }
.wg { padding: 0 4px; border-radius: 10px; }
.wg.hit, .wg.target { background: var(--accent); color: #fff; }
.wg.target { min-width: 44px; text-align: center; }

/* ---------- párbaj */
.duel { display: flex; align-items: center; gap: 18px; flex-wrap: wrap; justify-content: center; }
.duel-card { width: min(42vw, 230px); min-height: 200px; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 8px; background: var(--tile); color: var(--tile-ink); border: 4px solid var(--accent); border-radius: var(--radius); box-shadow: 0 6px 0 rgba(0,0,0,.18); }
.duel-text { font-family: var(--letter-font); font-size: 46px; }
.vs { font-size: 44px; }

/* ---------- szótagépítő */
.builder { display: flex; align-items: center; gap: 10px; padding: 16px; border-radius: 30px; background: rgba(255,255,255,.35); transition: .4s; }
.builder-decor { font-size: 54px; }
.syl-slots { display: flex; gap: 14px; transition: gap .6s; }
.builder.blend .syl-slots { gap: 0; }
.syl-slot { min-width: 110px; height: 96px; border: 4px dashed var(--accent); border-radius: var(--radius); display: grid; place-items: center; font-size: 34px; opacity: .8; transition: .3s; }
.syl-slot.filled { border-style: solid; background: var(--tile); color: var(--tile-ink); opacity: 1; }
.builder.blend .syl-slot { border-radius: 0; border-left-width: 0; border-right-width: 0; }
.builder.blend .syl-slot:first-child { border-radius: var(--radius) 0 0 var(--radius); border-left-width: 4px; }
.builder.blend .syl-slot:last-child { border-radius: 0 var(--radius) var(--radius) 0; border-right-width: 4px; }
.syl-slot.lit { background: var(--accent); color: #fff; }
.syl-text { font-family: var(--letter-font); font-size: 44px; }
.syl-tray { display: flex; gap: 16px; flex-wrap: wrap; justify-content: center; }
.syl-tile { min-width: 120px; height: 96px; font-family: var(--letter-font); font-size: 44px; touch-action: none; }
.syl-tile.used { visibility: hidden; }
.syl-tile.dragging { z-index: 10; position: relative; transition: none; }

/* ---------- betűrajz */
.trace-wrap { width: 100%; display: flex; justify-content: center; }
.trace-canvas { background: var(--tile); border-radius: 28px; box-shadow: 0 6px 0 rgba(0,0,0,.12); touch-action: none; }

/* ---------- hosszú vagy rövid */
.stretch { --stretch: 1; height: 120px; min-width: 120px; width: calc(120px * var(--stretch)); border-radius: 60px; background: var(--accent); color: #fff; font-family: var(--letter-font); font-size: 72px; box-shadow: 0 8px 0 rgba(0,0,0,.18); transition: width .08s linear; touch-action: none; user-select: none; -webkit-user-select: none; }
.stretch.held { background: var(--good); }
.stretch.long { width: 300px; } .stretch.short { width: 120px; }
.len-row { display: flex; gap: 24px; }
.len-btn { min-width: 110px; height: 70px; border-radius: 35px; background: var(--tile); color: var(--accent); font-size: 32px; box-shadow: 0 5px 0 rgba(0,0,0,.15); }

/* ---------- olvasd */
.read-word { font-family: var(--letter-font); font-size: clamp(64px, 14vw, 110px); padding: 10px 30px; border-radius: 30px; background: var(--tile); color: var(--tile-ink); box-shadow: 0 6px 0 rgba(0,0,0,.12); }
.syl { padding: 0 4px; border-radius: 14px; transition: .2s; }
.syl.lit { background: var(--accent); color: #fff; }
.syl-dot { opacity: .35; }
.pic-grid { display: flex; gap: 18px; flex-wrap: wrap; justify-content: center; }
.pic-choice { width: 150px; height: 150px; border-radius: var(--radius); background: var(--tile); border: 4px solid var(--accent); box-shadow: 0 6px 0 rgba(0,0,0,.15); display: grid; place-items: center; }

/* ---------- mascot + effects */
.mascot { --size: 96px; width: var(--size); height: var(--size); display: grid; place-items: center; }
.mascot img { width: 100%; height: 100%; object-fit: contain; }
.mascot-emoji { font-size: calc(var(--size) * .8); line-height: 1; }
.mascot.bob { animation: bob 2.4s ease-in-out infinite; }
.mascot.happy { animation: hop .6s; }
.mascot.oops { animation: tilt .6s; }
@keyframes bob { 50% { transform: translateY(-8px); } }
@keyframes hop { 30% { transform: translateY(-26px) scale(1.1); } 60% { transform: translateY(0) scale(.95); } }
@keyframes tilt { 30% { transform: rotate(-12deg); } 70% { transform: rotate(8deg); } }
.game-mascot { position: fixed; left: 10px; bottom: 10px; z-index: 4; pointer-events: none; }
.particle { position: fixed; z-index: 50; font-size: 34px; pointer-events: none; transform: translate(-50%, -50%); animation: fly 1s ease-out forwards; }
@keyframes fly { to { transform: translate(calc(-50% + var(--dx)), calc(-50% + var(--dy))) rotate(var(--rot)) scale(.4); opacity: 0; } }
.toast { position: fixed; left: 50%; bottom: 24px; transform: translateX(-50%); z-index: 60; padding: 12px 20px; border-radius: 999px; background: var(--ink); color: var(--bg); font-size: 18px; animation: toast 1.6s; max-width: 90vw; }
@keyframes toast { 0% { opacity: 0; transform: translate(-50%, 20px); } 10%, 85% { opacity: 1; transform: translate(-50%, 0); } 100% { opacity: 0; } }

/* ---------- results */
.result-card { display: flex; flex-direction: column; align-items: center; gap: 14px; padding: 24px; border-radius: 32px; background: var(--tile); color: var(--tile-ink); box-shadow: 0 8px 0 rgba(0,0,0,.12); min-width: min(420px, 92vw); }
.result-row { display: flex; align-items: center; gap: 10px; font-size: 30px; flex-wrap: wrap; justify-content: center; }
.result-row .big { font-size: 48px; }
.prize { font-size: 90px; animation: pop 1s; }
.collectible-img { width: 96px; height: 96px; object-fit: contain; }
.prize-name { font-size: 26px; }
.result-actions { display: flex; gap: 20px; margin-top: 8px; }
.big-btn { display: inline-grid; place-items: center; min-width: 96px; min-height: 80px; padding: 0 20px; border-radius: 26px; background: var(--accent); color: #fff; font-size: 36px; box-shadow: 0 6px 0 rgba(0,0,0,.2); }
.big-btn.small { min-height: 56px; font-size: 22px; }
.big-btn:active { transform: translateY(3px); box-shadow: 0 2px 0 rgba(0,0,0,.2); }
.badge { display: inline-flex; align-items: center; gap: 4px; padding: 4px 10px; border-radius: 999px; background: var(--soft); font-size: 16px; }
.badge.missing { opacity: .35; filter: grayscale(1); }
.empty { text-align: center; margin-top: 10vh; }
.big-emoji { font-size: 90px; }
.error { white-space: pre-wrap; background: #fee; color: #900; padding: 12px; border-radius: 8px; font-size: 13px; }

/* ---------- helper panel */
.teach-toggle { background: var(--accent); }
.teacher-panel { position: fixed; left: 0; right: 0; bottom: 0; z-index: 8; background: var(--ink); color: var(--bg); padding: 12px 16px calc(12px + env(safe-area-inset-bottom)); border-radius: 22px 22px 0 0; transform: translateY(calc(100% - 46px)); transition: transform .3s; box-shadow: 0 -6px 20px rgba(0,0,0,.25); max-height: 60vh; overflow: auto; }
.teacher-panel.open { transform: none; }
.tp-head { font-weight: 700; cursor: pointer; }
.tp-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; margin: 10px 0; }
.tp-wide { grid-column: 1 / -1; }
.tp-label { font-size: 13px; text-transform: uppercase; letter-spacing: .05em; opacity: .7; margin: 6px 0 4px; }
.tp-answer { font-family: var(--letter-font); font-size: 34px; }
.tp-say { font-size: 22px; padding: 4px 8px; border-radius: 10px; }
.tp-say.flash { animation: flash 1.2s; }
@keyframes flash { 0%, 60% { background: var(--accent); color: #fff; } }
.tp-tip { font-size: 16px; line-height: 1.35; }
.tp-actions { display: flex; flex-wrap: wrap; gap: 10px; }
.tp-actions button { padding: 12px 16px; border-radius: 14px; background: rgba(255,255,255,.15); color: inherit; font-size: 17px; }
.tp-toggle.on { background: var(--accent); color: #fff; }
.tp-got { background: var(--good) !important; color: #fff; }

/* ---------- hub */
.hub-head { display: flex; align-items: center; gap: 16px; padding: 16px 0; flex-wrap: wrap; }
.hub-mascot { position: relative; cursor: pointer; }
.level { position: absolute; right: -6px; bottom: 0; padding: 2px 8px; border-radius: 999px; background: var(--accent); color: #fff; font-size: 14px; }
.hub-title { flex: 1; min-width: 220px; }
.hub-title h1 { font-size: clamp(28px, 6vw, 44px); }
.who { display: flex; gap: 10px; flex-wrap: wrap; }
.who-btn { display: flex; align-items: center; gap: 8px; padding: 8px 14px; border-radius: 999px; background: var(--tile); color: var(--tile-ink); border: 3px solid transparent; opacity: .6; }
.who-btn.on { border-color: var(--accent); opacity: 1; }
.who-av { font-size: 26px; }
.play-next { display: flex; align-items: center; justify-content: center; gap: 18px; margin: 8px auto 20px; padding: 18px; max-width: 520px; border-radius: 40px; background: var(--accent); color: #fff; font-size: 54px; box-shadow: 0 8px 0 rgba(0,0,0,.2); animation: pulse 2s infinite; }
.play-next .mini-tile { font-size: 34px; height: 56px; min-width: 56px; }
.games { display: grid; grid-template-columns: repeat(auto-fill, minmax(130px, 1fr)); gap: 14px; }
.game-card { display: flex; flex-direction: column; align-items: center; gap: 4px; padding: 16px 8px; border-radius: var(--radius); background: var(--tile); color: var(--tile-ink); box-shadow: 0 5px 0 rgba(0,0,0,.12); }
.game-card:active { transform: translateY(3px); }
.gc-icon { font-size: 56px; }
.gc-title { font-size: 15px; opacity: .8; }
.panel { margin-top: 22px; padding: 14px; border-radius: 24px; background: rgba(255,255,255,.4); }
.letter-map { display: grid; grid-template-columns: repeat(auto-fill, minmax(64px, 1fr)); gap: 8px; }
.letter-map.small { grid-template-columns: repeat(auto-fill, minmax(52px, 1fr)); }
.map-tile { position: relative; min-height: 64px; border-radius: 16px; background: var(--tile); color: var(--tile-ink); display: flex; flex-direction: column; align-items: center; justify-content: center; border: 3px solid transparent; }
.map-tile .glyph { font-family: var(--letter-font); font-size: 30px; line-height: 1; }
.map-tile .stars { font-size: 11px; color: var(--accent); }
.map-tile .flag { position: absolute; top: -6px; right: -4px; font-size: 14px; }
.map-tile.picked { border-color: var(--accent); background: var(--accent); color: #fff; }
.lv-locked { opacity: .35; }
.lv-new { border-color: var(--soft) !important; }
.lv-learning { border-color: var(--accent) !important; }
.lv-good { border-color: var(--good) !important; }
.lv-mastered { border-color: var(--good) !important; background: var(--good) !important; color: #fff !important; }
.lv-mastered .stars { color: #fff; }
.legend { display: flex; gap: 8px; flex-wrap: wrap; margin-top: 10px; font-size: 13px; }
.legend .lg { padding: 2px 10px; border-radius: 999px; background: var(--tile); color: var(--tile-ink); border: 3px solid transparent; }
.shelf { display: flex; gap: 12px; flex-wrap: wrap; }
.shelf-item { position: relative; width: 74px; height: 74px; border-radius: 18px; background: var(--tile); display: grid; place-items: center; font-size: 44px; }
.shelf-item.missing { filter: grayscale(1) brightness(.4); opacity: .25; }
.shelf-item .collectible-img { width: 60px; height: 60px; }
.shelf-item .count { position: absolute; right: 4px; bottom: 2px; font-size: 13px; color: var(--tile-ink); }
.theme-row { display: flex; gap: 10px; flex-wrap: wrap; }
.theme-chip { display: flex; align-items: center; gap: 8px; padding: 10px 16px; border-radius: 999px; border: 4px solid; opacity: .75; }
.theme-chip.on { opacity: 1; transform: scale(1.06); box-shadow: 0 4px 0 rgba(0,0,0,.2); }
.tc-icon { font-size: 30px; }
.theme-chip .by { font-size: 12px; opacity: .8; }
.lesson-row { display: flex; gap: 12px; flex-wrap: wrap; }
.lesson-card { padding: 12px; border-radius: 20px; background: var(--tile); color: var(--tile-ink); min-width: 200px; }
.lc-head { display: flex; align-items: center; gap: 8px; }
.lc-emoji { font-size: 34px; }
.lc-letters { font-family: var(--letter-font); opacity: .7; }
.lc-games { display: flex; gap: 8px; flex-wrap: wrap; margin-top: 8px; }
.lc-game { width: 60px; height: 60px; border-radius: 16px; background: var(--soft); display: grid; place-items: center; font-size: 32px; }
.helper-area.collapsed .badges { opacity: .8; }
.badges { display: flex; gap: 8px; flex-wrap: wrap; align-items: center; }
.points { font-size: 14px; opacity: .7; }
.quick { margin: 10px 0; }
.workshop-link { margin-top: 12px; font-size: 22px; }
.settings { margin-top: 30px; }
.gear { font-size: 28px; opacity: .5; }
.settings-body { display: flex; flex-direction: column; gap: 8px; padding: 12px; border-radius: 16px; background: var(--tile); color: var(--tile-ink); font-size: 15px; }

/* ---------- workshop */
.ws-head { display: flex; align-items: center; gap: 14px; padding: 12px 0; }
.ws-tabs { display: flex; gap: 8px; flex-wrap: wrap; position: sticky; top: 0; z-index: 5; padding: 6px 0; background: var(--bg); }
.ws-tab { display: flex; align-items: center; gap: 6px; padding: 10px 16px; border-radius: 999px; background: var(--tile); color: var(--tile-ink); font-size: 18px; }
.ws-tab.on { background: var(--accent); color: #fff; }
.ws-tab-icon { font-size: 26px; }
.ws-split { display: grid; grid-template-columns: 1fr; gap: 16px; }
@media (min-width: 860px) { .ws-split { grid-template-columns: 1fr 320px; } .ws-side { position: sticky; top: 70px; align-self: start; } }
.ws-form { display: flex; flex-direction: column; gap: 14px; }
.ws-field { padding: 14px; border-radius: 20px; background: rgba(255,255,255,.55); }
.ws-label { font-weight: 700; margin-bottom: 8px; font-size: 19px; }
.kid-input { width: 100%; padding: 12px 14px; border-radius: 14px; border: 3px solid var(--soft); font: inherit; font-size: 20px; background: #fff; color: #222; }
.kid-input.small { width: auto; min-width: 120px; flex: 1; }
.kid-btn { display: inline-flex; align-items: center; gap: 6px; padding: 10px 14px; border-radius: 14px; background: var(--tile); color: var(--tile-ink); border: 3px solid var(--soft); font-size: 18px; }
.kid-btn.on { border-color: var(--accent); background: var(--accent); color: #fff; }
.kid-btn.rec.on { background: var(--bad); color: #fff; animation: pulse 1s infinite; }
.big-emoji-btn { font-size: 30px; }
.game-toggle { flex-direction: column; }
.big-emoji-inline { font-size: 32px; }
.emoji-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(48px, 1fr)); gap: 6px; margin: 8px 0; }
.emoji-btn { height: 48px; border-radius: 12px; background: var(--tile); font-size: 28px; border: 3px solid transparent; display: grid; place-items: center; }
.emoji-btn img { width: 36px; height: 36px; object-fit: contain; }
.emoji-btn.on { border-color: var(--accent); }
.popover { position: relative; z-index: 6; padding: 8px; border-radius: 16px; background: var(--bg); box-shadow: 0 6px 20px rgba(0,0,0,.25); }
.presets { display: flex; gap: 10px; flex-wrap: wrap; margin-bottom: 10px; }
.preset { width: 54px; height: 54px; border-radius: 50%; border: 3px solid #fff; box-shadow: 0 2px 6px rgba(0,0,0,.2); }
.color-pick { display: flex; flex-direction: column; align-items: center; gap: 4px; font-size: 15px; }
.color-pick input { width: 64px; height: 64px; border: none; border-radius: 16px; padding: 0; background: none; }
.chips { display: flex; gap: 8px; flex-wrap: wrap; margin: 6px 0; }
.chip { display: inline-flex; align-items: center; gap: 6px; padding: 8px 12px; border-radius: 999px; background: var(--tile); color: var(--tile-ink); font-size: 16px; }
.chips.ideas .chip { opacity: .75; border: 2px dashed var(--soft); }
.chip-x { font-size: 13px; opacity: .6; }
.collect-edit { display: flex; flex-direction: column; gap: 8px; }
.collect-row { display: flex; gap: 8px; align-items: center; flex-wrap: wrap; }
.collect-row .emoji-btn { width: 56px; height: 56px; }
.ws-preview { display: flex; flex-direction: column; align-items: center; gap: 12px; padding: 20px; border-radius: 28px; box-shadow: 0 8px 24px rgba(0,0,0,.15); }
.ws-preview .tile { width: 130px; }
.pv-title { font-size: 22px; font-weight: 700; }
.pv-coins { padding: 6px 14px; border-radius: 999px; }
.pv-shelf { display: flex; gap: 6px; font-size: 30px; flex-wrap: wrap; justify-content: center; }
.pv-shelf img { width: 36px; height: 36px; object-fit: contain; }
.ws-actions { display: flex; gap: 12px; flex-wrap: wrap; align-items: center; margin: 10px 0; }
.ws-list { margin-top: 20px; display: flex; flex-direction: column; gap: 8px; }
.ws-item { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; padding: 10px; border-radius: 18px; background: rgba(255,255,255,.55); }
.ws-item-icon { width: 48px; height: 48px; border-radius: 14px; display: grid; place-items: center; font-size: 30px; background: var(--tile); }
.drawing-pick, .gallery { display: flex; gap: 8px; flex-wrap: wrap; }
.drawing-thumb img, .gallery-item img { width: 72px; height: 72px; border-radius: 12px; background: #fff; object-fit: contain; }
.gallery-item { display: flex; flex-direction: column; align-items: center; gap: 4px; }
.gallery-item img { width: 120px; height: 120px; }
.draw-pad { display: flex; flex-direction: column; gap: 10px; align-items: flex-start; }
.draw-canvas { border-radius: 20px; background: #fff; box-shadow: 0 4px 14px rgba(0,0,0,.15); touch-action: none; max-width: 100%; }
.draw-tools { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; }
.swatches, .sizes { display: flex; gap: 6px; flex-wrap: wrap; }
.swatch { width: 40px; height: 40px; border-radius: 50%; border: 3px solid #ccc; }
.swatch.on { border-color: var(--ink); transform: scale(1.15); }
.size-btn { width: 44px; height: 44px; border-radius: 12px; background: var(--tile); display: grid; place-items: center; border: 3px solid transparent; }
.size-btn span { display: block; border-radius: 50%; background: var(--ink); }
.size-btn.on { border-color: var(--accent); }
.word-list { display: flex; flex-direction: column; gap: 8px; }
.word-row, .rec-row { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }
.word-pic { width: 56px; height: 56px; display: grid; place-items: center; font-size: 40px; border-radius: 14px; background: var(--tile); }
.word-pic img { width: 100%; height: 100%; object-fit: contain; border-radius: 14px; }
.word-pic.big { width: 72px; height: 72px; font-size: 52px; }
.word-text { font-family: var(--letter-font); font-size: 26px; }
.new-word { display: flex; gap: 10px; align-items: center; margin: 10px 0; flex-wrap: wrap; }
.new-word .kid-input { flex: 1; min-width: 160px; }
.recorder { display: inline-flex; gap: 6px; }
.ideas-list { display: flex; flex-direction: column; gap: 10px; margin-top: 12px; }
.idea { padding: 12px; border-radius: 16px; background: rgba(255,255,255,.6); display: flex; gap: 10px; align-items: center; flex-wrap: wrap; }
.idea p { margin: 0; flex: 1; min-width: 200px; }
.idea-date { font-size: 13px; opacity: .6; }
textarea.kid-input { resize: vertical; }

@media (max-width: 520px) {
  .tile-grid { grid-template-columns: repeat(2, 1fr); gap: 14px; }
  .slot-btn { min-width: 96px; }
  .syl-slot { min-width: 84px; height: 80px; }
  .syl-tile { min-width: 96px; height: 80px; font-size: 36px; }
  .pic-choice { width: 110px; height: 110px; }
  .icon-btn { width: 52px; height: 52px; font-size: 26px; }
  .coins { font-size: 20px; padding: 6px 10px; }
}
@media (prefers-reduced-motion: reduce) { *, *::before, *::after { animation: none !important; transition: none !important; } }
