:root {
  --bg: #fff7e6;
  --bg2: #ffe9c2;
  --ink: #3b2f2f;
  --muted: #8a7a6a;
  --card: #ffffff;
  --accent: #ff7a59;
  --accent2: #2bb3a3;
  --gold: #ffc43d;
  --green: #5cc66a;
  --amber: #ffb74d;
  --gray: #d9d2c7;
  --shadow: 0 10px 30px rgba(80, 50, 20, 0.15);
  --font: "Andika", "Century Gothic", "Comic Sans MS", "Segoe UI", system-ui, sans-serif;
}

* { box-sizing: border-box; }
html, body { height: 100%; margin: 0; }
body {
  font-family: var(--font);
  color: var(--ink);
  background: radial-gradient(circle at 20% 10%, var(--bg2), var(--bg) 60%);
  overflow: hidden;
  -webkit-user-select: none; user-select: none;
  cursor: default;
}
button { font-family: inherit; cursor: pointer; }

#app { position: relative; width: 100vw; height: 100vh; }
.screen {
  position: absolute; inset: 0;
  display: none; flex-direction: column; align-items: center; justify-content: center;
  gap: 2vmin; padding: 2vmin; text-align: center;
}
.screen.active { display: flex; }

h1 { font-size: 7vmin; margin: 0; color: var(--accent); }
h2 { font-size: 5vmin; margin: 0; }

.big-btn {
  font-size: 5vmin; padding: 2.5vmin 7vmin; border: 0; border-radius: 100px;
  background: var(--accent); color: #fff; box-shadow: var(--shadow);
  transition: transform .12s;
}
.big-btn:hover, .big-btn:focus { transform: scale(1.05); outline: 0.6vmin solid var(--gold); }
.hint-text { color: var(--muted); font-size: 2.2vmin; margin: 0; }
kbd { background: #fff; border: 1px solid var(--gray); border-radius: 6px; padding: 0 .4em; font-family: inherit; }

/* ---------- Menu ---------- */
.menu-grid { display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); gap: 2.4vmin; width: min(97vw, 190vmin); }
.mode-card {
  position: relative; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 1vmin;
  background: var(--card); border: 0.8vmin solid transparent; border-radius: 4vmin; padding: 4vmin 2vmin;
  box-shadow: var(--shadow); min-height: 34vmin; transition: transform .15s, border-color .15s;
}
.mode-card .icon { font-size: 10vmin; line-height: 1; }
.mode-card .label { font-size: 3.2vmin; font-weight: 700; }
.mode-card .sub { font-size: 2.2vmin; color: var(--muted); }
.mode-card .lock { display: none; position: absolute; top: 1.5vmin; right: 1.5vmin; font-size: 4vmin; }
.mode-card.locked { opacity: .55; filter: grayscale(.6); }
.mode-card.locked .lock { display: block; }
.mode-card.selected, .mode-card:hover { transform: translateY(-1vmin) scale(1.03); border-color: var(--gold); }

/* ---------- Play screen ---------- */
#screen-play { justify-content: flex-start; gap: 0; padding: 0; }
.hud { width: 100%; display: flex; align-items: center; gap: 2vmin; padding: 1.5vmin 2vmin; }
.icon-btn { font-size: 4vmin; background: var(--card); border: 0; border-radius: 50%; width: 7vmin; height: 7vmin; box-shadow: var(--shadow); }
.stars { font-size: 3vmin; white-space: nowrap; color: var(--muted); min-width: 8vmin; text-align: right; }
.badges { flex: 1; display: flex; gap: 1.5vmin; justify-content: center; align-items: center; min-height: 8vmin; }
.badge {
  display: flex; flex-direction: column; align-items: center; background: var(--card); border-radius: 2vmin;
  padding: 0.6vmin 1.8vmin; box-shadow: var(--shadow); min-width: 12vmin; transition: transform .2s;
}
.badge .bl { font-size: 4.2vmin; font-weight: 700; line-height: 1.1; }
.badge .bs { font-size: 2.2vmin; letter-spacing: .15em; }
.badge .bs .off { color: var(--gray); }
.badge.earned { animation: badgePop .7s ease-out; }
@keyframes badgePop { 0% { transform: scale(1); } 40% { transform: scale(1.25) rotate(-4deg); } 100% { transform: scale(1); } }
.word-row .emoji.count { font-size: 4.5vmin; letter-spacing: .05em; max-width: 44vmin; line-height: 1.2; word-break: break-all; text-align: center; }

.overlay { position: absolute; inset: 0; display: none; align-items: center; justify-content: center; background: rgba(255, 247, 230, 0.85); z-index: 6; }
.overlay.show { display: flex; }
.overlay-card { background: var(--card); border-radius: 5vmin; box-shadow: var(--shadow); padding: 5vmin 8vmin; text-align: center; animation: pop .5s ease-out; }
.overlay-card h2 { color: var(--accent); font-size: 7vmin; }
.stage-letters { display: flex; gap: 3vmin; justify-content: center; margin: 3vmin 0; }
.stage-letter { display: flex; flex-direction: column; align-items: center; background: var(--bg2); border-radius: 3vmin; padding: 2vmin 3vmin; }
.stage-letter b { font-size: 10vmin; line-height: 1; }
.stage-letter span { font-size: 3vmin; }
.stage-next { font-size: 4vmin; color: var(--accent2); margin: 0; font-weight: 700; }
.timer { width: 24vmin; height: 2vmin; background: #fff; border-radius: 100px; overflow: hidden; box-shadow: inset 0 0 0 2px var(--gray); }
.timer-fill { height: 100%; width: 100%; background: var(--accent2); transition: width 1s linear; }

.stage { flex: 1; width: 100%; display: flex; align-items: center; justify-content: center; gap: 4vmin; min-height: 0; position: relative; }
.letter-card {
  background: var(--card); border-radius: 5vmin; box-shadow: var(--shadow);
  min-width: 46vmin; min-height: 46vmin; padding: 2vmin 5vmin;
  display: flex; flex-direction: column; align-items: center; justify-content: center;
  transition: transform .2s;
}
.letter-card.pop { animation: pop .45s ease-out; }
.letter-card.shake { animation: shake .4s ease-in-out; }
.big-letter { font-size: 30vmin; line-height: 1; font-weight: 700; color: var(--ink); white-space: nowrap; }
.big-letter.mystery { color: var(--gray); }
.big-letter.dim { color: var(--muted); font-size: 20vmin; }
.big-letter .lc { font-size: .75em; margin-left: .12em; }
.word-row { display: flex; align-items: center; gap: 2vmin; font-size: 5vmin; min-height: 9vmin; color: var(--muted); }
.word-row .emoji { font-size: 9vmin; line-height: 1; }

.big-letter.picture { font-size: 24vmin; }

/* Word row: the letters of a name or word, lit as they are said and pressed */
.word-row-top { display: none; gap: 1.6vmin; justify-content: center; padding: 1vmin 2vmin 0; width: 100%; }
.word-row-top.show { display: flex; }
.wl {
  width: 11vmin; height: 13vmin; border-radius: 2.4vmin; background: #fff; box-shadow: var(--shadow);
  display: flex; align-items: center; justify-content: center; font-size: 8.5vmin; font-weight: 700;
  color: var(--gray); border-bottom: 1.2vmin solid var(--gray); transition: transform .2s, background .3s, color .3s;
}
.word-row-top.long .wl { width: 8.5vmin; height: 10.5vmin; font-size: 6.5vmin; }
.wl.current { color: var(--ink); border-bottom-color: var(--gold); box-shadow: 0 0 0 0.5vmin #fff, 0 0 3vmin 0.8vmin var(--gold); animation: pulse 1s infinite; transform: scale(1.08); }
.wl.done { color: #fff; background: var(--accent2); border-bottom-color: #1f8f82; }
.wl.saying { transform: scale(1.18) translateY(-0.8vmin); background: var(--gold); color: var(--ink); border-bottom-color: #d9a21e; box-shadow: 0 0 4vmin 1vmin var(--gold); }
.wl.done.saying { background: var(--gold); color: var(--ink); }
.wl.pop { animation: pop .45s ease-out; }

/* Profiles */
.profile-list { display: flex; flex-wrap: wrap; gap: 3vmin; justify-content: center; max-width: 90vw; }
.profile-card {
  display: flex; flex-direction: column; align-items: center; gap: 0.6vmin; background: var(--card); border: 0.8vmin solid transparent;
  border-radius: 4vmin; padding: 3vmin 4vmin; min-width: 22vmin; box-shadow: var(--shadow); transition: transform .15s, border-color .15s;
}
.profile-card .avatar { font-size: 12vmin; line-height: 1.1; }
.profile-card .pname { font-size: 4vmin; font-weight: 700; }
.profile-card .pstars { font-size: 2.4vmin; color: var(--muted); }
.profile-card.selected, .profile-card:hover { transform: translateY(-1vmin) scale(1.04); border-color: var(--gold); }
.btn.ghost { background: transparent; border-color: transparent; color: var(--muted); font-size: 2.4vmin; }
.btn.ghost:hover { color: var(--ink); border-color: var(--gray); }
.btn.ghost.small { font-size: 2vmin; }
.hint-text.tiny { font-size: 1.8vmin; }
.row.center { justify-content: center; }

.setup-form { display: flex; flex-direction: column; align-items: center; gap: 1.5vmin; background: var(--card); border-radius: 4vmin; padding: 4vmin 6vmin; box-shadow: var(--shadow); max-width: 92vw; }
.setup-form h1 { font-size: 5.5vmin; }
.setup-label { font-size: 2.6vmin; color: var(--muted); }
.avatar-grid { display: grid; grid-template-columns: repeat(6, 1fr); gap: 1.2vmin; }
.avatar-pick { font-size: 6vmin; line-height: 1.2; background: var(--bg); border: 0.6vmin solid transparent; border-radius: 2vmin; padding: 0.8vmin 1.4vmin; }
.avatar-pick.selected { border-color: var(--gold); background: #fff; transform: scale(1.1); }
#setup-name { font: inherit; font-size: 5vmin; text-align: center; padding: 1.2vmin 2vmin; border: 0.5vmin solid var(--gray); border-radius: 2vmin; width: 50vmin; max-width: 80vw; color: var(--ink); -webkit-user-select: text; user-select: text; }
#setup-name:focus { outline: none; border-color: var(--accent2); }

.profile-admin { display: flex; flex-direction: column; gap: 6px; }
.prof-row { display: flex; flex-wrap: wrap; gap: 6px 10px; align-items: center; padding: 8px 10px; border: 1px solid #eee; border-radius: 10px; }
.prof-row .pn { flex: 1 1 120px; }
.prof-row .muted { flex: 0 0 100%; order: 9; }
.prof-row.current { border-color: var(--accent2); background: #f2fbf9; }
.prof-row .pa { font-size: 26px; }
.prof-row .pn { font-weight: 700; }
.prof-row .btn { padding: 4px 9px; font-size: 12px; }

/* ---------- On-screen keyboard ---------- */
.keyboard { width: 100%; padding: 1vmin 2vmin 2.5vmin; display: flex; flex-direction: column; gap: 1vmin; align-items: center; transition: opacity .3s; }
.keyboard.hidden { opacity: 0; pointer-events: none; }
.krow { display: flex; gap: 1vmin; justify-content: center; }
.krow.row-hl .key { background: #fff3cf; }
.key {
  width: 7.5vmin; height: 7.5vmin; border-radius: 1.4vmin; background: #fff; box-shadow: 0 0.5vmin 0 var(--gray);
  display: flex; align-items: center; justify-content: center; font-size: 3.6vmin; font-weight: 700; color: var(--ink);
  transition: transform .08s, background .2s;
}
.key.pressed { transform: translateY(0.4vmin); box-shadow: 0 0.1vmin 0 var(--gray); background: #e9f7f5; }
.key.glow { background: var(--gold); box-shadow: 0 0 0 0.6vmin #fff, 0 0 3vmin 1vmin var(--gold); animation: pulse 1s infinite; }
.key.glow.big { transform: scale(1.35); z-index: 2; }
.key.flash { background: var(--green); color: #fff; }

.hand { position: fixed; display: none; font-size: 9vmin; pointer-events: none; z-index: 5; animation: bob .7s infinite alternate ease-in-out; transform: translate(-50%, 0); }
.hand.show { display: block; }

/* ---------- Owl mascot ---------- */
.owl { width: 26vmin; height: 26vmin; flex: 0 0 auto; }
.owl.owl-big { width: 34vmin; height: 34vmin; }
.owl svg { width: 100%; height: 100%; overflow: visible; }
.owl .eye-lid { transform-origin: center; animation: blink 5s infinite; }
.owl.happy svg { animation: bounce .6s ease-in-out 2; }
.owl.thinking svg { animation: tilt 1.6s ease-in-out infinite; }
.owl.oops svg { animation: wobble .5s ease-in-out 1; }
.owl.cheer svg { animation: bounce .5s ease-in-out 4; }
.owl .mouth-happy { display: none; }
.owl.happy .mouth-happy, .owl.cheer .mouth-happy { display: block; }
.owl.happy .beak, .owl.cheer .beak { display: none; }
/* Mascot pictures (pictures/mascot-<mood>.webp) replace the drawing when present */
.owl.has-img svg { display: none; }
.owl img.mascot-img { display: block; width: 100%; height: 100%; object-fit: contain; -webkit-user-drag: none; }
.owl.happy img.mascot-img { animation: bounce .6s ease-in-out 2; }
.owl.thinking img.mascot-img { animation: tilt 1.6s ease-in-out infinite; }
.owl.oops img.mascot-img { animation: wobble .5s ease-in-out 1; }
.owl.cheer img.mascot-img { animation: bounce .5s ease-in-out 4; }

/* 3D mascot (model-viewer) */
.owl.has-3d svg, .owl.has-3d img.mascot-img, .owl.has-3d .puppet { display: none; }  /* one mascot at a time */
.owl .mascot-3d { display: block; width: 100%; height: 100%; background: transparent; --poster-color: transparent; --progress-bar-color: transparent; --progress-bar-height: 0; }
.owl.has-3d .mascot-3d { animation: breathe 3.4s ease-in-out infinite; transform-origin: 50% 90%; }
.owl.has-3d.happy .mascot-3d { animation: bounce .6s ease-in-out 2; }
.owl.has-3d.cheer .mascot-3d { animation: bounce .5s ease-in-out 4; }
.owl.has-3d.thinking .mascot-3d { animation: tilt 1.6s ease-in-out infinite; }
.owl.has-3d.oops .mascot-3d { animation: wobble .5s ease-in-out 1; }
.owl.has-3d.sleep .mascot-3d { animation: breathe 5s ease-in-out infinite; filter: brightness(.85); }

/* Puppet mascot: body + two wing layers + eyelids, all positioned in % of the figure */
.owl .puppet { position: relative; width: 100%; height: 100%; }
.owl .puppet .pl { position: absolute; display: block; -webkit-user-drag: none; }
.owl .puppet .body { left: 0; top: 0; width: 100%; height: 100%; object-fit: contain; }
.owl .puppet .wing { z-index: -1; }
.owl .puppet .wing-r { transform: scaleX(-1); }
.owl .puppet .lid { position: absolute; border-radius: 50%; opacity: 0; transform: scaleY(0); transform-origin: 50% 0; transition: transform .08s ease-out, opacity .05s; }
.owl.blink .puppet .lid { opacity: 1; transform: scaleY(1); }
.owl.happy .puppet .lid, .owl.cheer .puppet .lid { opacity: 1; transform: scaleY(.45); }
.owl.sleep .puppet .lid { opacity: 1; transform: scaleY(1); }
/* idle: a slow breath and a gentle wing sway */
.owl.has-puppet .puppet { animation: breathe 3.4s ease-in-out infinite; transform-origin: 50% 90%; }
.owl.has-puppet .wing-l { animation: swayL 3.4s ease-in-out infinite; }
.owl.has-puppet .wing-r { animation: swayR 3.4s ease-in-out infinite; }
/* moods */
.owl.has-puppet.happy .puppet { animation: bounce .6s ease-in-out 2; }
.owl.has-puppet.cheer .puppet { animation: bounce .5s ease-in-out 4; }
.owl.has-puppet.cheer .wing-l { animation: flapL .32s ease-in-out 8 alternate; }
.owl.has-puppet.cheer .wing-r { animation: flapR .32s ease-in-out 8 alternate; }
.owl.has-puppet.happy .wing-l { animation: flapL .45s ease-in-out 4 alternate; }
.owl.has-puppet.happy .wing-r { animation: flapR .45s ease-in-out 4 alternate; }
.owl.has-puppet.thinking .puppet { animation: tilt 1.6s ease-in-out infinite; }
.owl.has-puppet.oops .puppet { animation: wobble .5s ease-in-out 1; }
.owl.has-puppet.sleep .puppet { animation: breathe 5s ease-in-out infinite; }
.owl.has-puppet.sleep .wing-l, .owl.has-puppet.sleep .wing-r { animation: none; }
@keyframes breathe { 0%, 100% { transform: scale(1); } 50% { transform: scale(1.015, 1.03); } }
@keyframes swayL { 0%, 100% { transform: rotate(0); } 50% { transform: rotate(3deg); } }
@keyframes swayR { 0%, 100% { transform: scaleX(-1) rotate(0); } 50% { transform: scaleX(-1) rotate(3deg); } }
@keyframes flapL { from { transform: rotate(-4deg); } to { transform: rotate(22deg); } }
@keyframes flapR { from { transform: scaleX(-1) rotate(-4deg); } to { transform: scaleX(-1) rotate(22deg); } }

/* ---------- Done ---------- */
.done-stars { font-size: 5vmin; max-width: 80vw; line-height: 1.4; }

/* ---------- Parent ---------- */
.parent { justify-content: flex-start; align-items: stretch; background: #f7f3ec; overflow: auto; padding: 0; -webkit-user-select: text; user-select: text; cursor: auto; text-align: left; }
.parent-inner { width: min(1200px, 100%); margin: 0 auto; padding: 16px 20px 60px; font-size: 15px; }
.parent-header { display: flex; justify-content: space-between; align-items: center; }
.parent h2 { font-size: 26px; }
.parent h3 { font-size: 17px; margin: 22px 0 8px; color: var(--accent2); }
.parent-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 24px; }
@media (max-width: 900px) { .parent-grid { grid-template-columns: 1fr; } }
.panel { background: #fff; border-radius: 14px; padding: 16px 18px; box-shadow: var(--shadow); }
.parent label { display: flex; flex-direction: column; gap: 4px; margin: 8px 0; font-size: 14px; color: var(--muted); }
.parent input[type=text], .parent input[type=number], .parent select { font: inherit; font-size: 15px; padding: 7px 9px; border: 1px solid var(--gray); border-radius: 8px; color: var(--ink); background: #fff; }
.parent input[type=range] { width: 100%; }
.btn { font-size: 14px; padding: 8px 14px; border-radius: 8px; border: 1px solid var(--gray); background: #fff; color: var(--ink); }
.btn:hover { border-color: var(--accent2); }
.btn.danger { color: #b3261e; }
.btn.primary { background: var(--accent2); color: #fff; border-color: var(--accent2); }
.btn.recording { background: #ffd6d0; border-color: var(--accent); }
.file-btn { position: relative; overflow: hidden; display: inline-flex; flex-direction: row !important; margin: 0 !important; color: var(--ink) !important; cursor: pointer; }
.file-btn input { position: absolute; inset: 0; opacity: 0; cursor: pointer; }
.row { display: flex; gap: 8px; align-items: center; margin: 8px 0; }
.row.wrap { flex-wrap: wrap; }
.muted { color: var(--muted); }
.small { font-size: 12px; }

.letter-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(64px, 1fr)); gap: 6px; }
.lg { border-radius: 10px; padding: 6px 4px; text-align: center; background: var(--gray); color: #fff; border: 3px solid transparent; }
.lg b { display: block; font-size: 20px; }
.lg small { display: block; font-size: 11px; opacity: .95; }
.lg.learning { background: var(--amber); }
.lg.known { background: var(--green); }
.lg.mastered { background: var(--gold); color: var(--ink); }
.lg.active { border-color: var(--accent); }
.legend { display: flex; flex-wrap: wrap; gap: 12px; font-size: 12px; color: var(--muted); margin-top: 8px; align-items: center; }
.sw { display: inline-block; width: 12px; height: 12px; border-radius: 3px; margin-right: 4px; vertical-align: -1px; }
.sw-new { background: var(--gray); } .sw-learning { background: var(--amber); } .sw-known { background: var(--green); } .sw-mastered { background: var(--gold); }
.table-wrap { max-height: 220px; overflow: auto; }
table { width: 100%; border-collapse: collapse; font-size: 13px; }
th, td { text-align: left; padding: 5px 6px; border-bottom: 1px solid #eee; }

.rec-list { max-height: 320px; overflow: auto; border: 1px solid #eee; border-radius: 8px; }
.rec-row { display: grid; grid-template-columns: 1fr auto auto auto; gap: 6px; align-items: center; padding: 6px 10px; border-bottom: 1px solid #f1ede6; font-size: 13px; }
.rec-row .has { color: var(--green); font-weight: 700; }
.rec-row .btn { padding: 4px 9px; font-size: 12px; }

/* ---------- Confetti + toast ---------- */
#confetti { position: fixed; inset: 0; pointer-events: none; z-index: 10; }
.toast { position: fixed; left: 50%; bottom: 3vmin; transform: translateX(-50%); background: var(--ink); color: #fff; padding: 10px 16px; border-radius: 10px; font-size: 14px; opacity: 0; transition: opacity .3s; z-index: 20; pointer-events: none; }
.toast.show { opacity: .95; }

/* ---------- Animations ---------- */
@keyframes pop { 0% { transform: scale(.9); } 50% { transform: scale(1.08); } 100% { transform: scale(1); } }
@keyframes shake { 0%, 100% { transform: translateX(0); } 25% { transform: translateX(-1.2vmin); } 75% { transform: translateX(1.2vmin); } }
@keyframes pulse { 0%, 100% { filter: brightness(1); } 50% { filter: brightness(1.18); } }
@keyframes bob { from { transform: translate(-50%, 0); } to { transform: translate(-50%, -2vmin); } }
@keyframes blink { 0%, 92%, 100% { transform: scaleY(0); } 95% { transform: scaleY(1); } }
@keyframes bounce { 0%, 100% { transform: translateY(0); } 50% { transform: translateY(-4vmin); } }
@keyframes tilt { 0%, 100% { transform: rotate(0); } 50% { transform: rotate(-7deg); } }
@keyframes wobble { 0%, 100% { transform: rotate(0); } 30% { transform: rotate(5deg); } 60% { transform: rotate(-5deg); } }

@media (prefers-reduced-motion: reduce) {
  * { animation: none !important; transition: none !important; }
}

/* When a name/word row is showing, give it room by shrinking the card. */
#screen-play:has(.word-row-top.show) .letter-card { min-height: 34vmin; min-width: 40vmin; }
#screen-play:has(.word-row-top.show) .big-letter { font-size: 22vmin; }
#screen-play:has(.word-row-top.show) .big-letter.picture { font-size: 18vmin; }
#screen-play:has(.word-row-top.show) .owl { width: 20vmin; height: 20vmin; }

/* Recording studio */
.studio { background: #f7f3ec; }
.studio-card { background: var(--card); border-radius: 4vmin; box-shadow: var(--shadow); padding: 3vmin 5vmin; width: min(92vw, 110vmin); display: flex; flex-direction: column; align-items: center; gap: 1.2vmin; text-align: center; }
.studio-top { width: 100%; display: flex; justify-content: space-between; align-items: center; font-size: 2.4vmin; }
.studio-letter { font-size: 18vmin; line-height: 1; font-weight: 700; color: var(--accent2); }
.studio-letter.is-name { font-size: 14vmin; }
.studio-card h2 { font-size: 4.2vmin; }
.studio-say { font-size: 6vmin; font-weight: 700; color: var(--accent); }
.studio-hint { font-size: 2.4vmin; color: var(--muted); max-width: 80vmin; margin: 0; }
.studio-status { font-size: 2.6vmin; color: var(--muted); min-height: 3.4vmin; }
.studio-status.ok { color: #2e9e5b; }
.studio-status.live { color: #b3261e; font-weight: 700; animation: pulse 1s infinite; }
.studio-buttons .big-btn { font-size: 3.4vmin; padding: 1.6vmin 4vmin; }
.studio-buttons .big-btn.live { background: #b3261e; }
.studio-buttons .btn { font-size: 2.4vmin; padding: 1.2vmin 2.2vmin; }
.studio-dots { display: flex; flex-wrap: wrap; gap: 0.8vmin; justify-content: center; max-width: 90vmin; }
.studio-dots .dot { width: 2.4vmin; height: 2.4vmin; border-radius: 50%; background: var(--gray); cursor: pointer; }
.studio-dots .dot.done { background: var(--green); }
.studio-dots .dot.cur { box-shadow: 0 0 0 0.5vmin var(--gold); }
.studio-top { flex-wrap: wrap; gap: 1vmin; }
.studio-top .row { margin: 0; }
label.inline { display: inline-flex; flex-direction: row; align-items: center; gap: 0.8vmin; font-size: 2.2vmin; color: var(--muted); }
label.inline select { font: inherit; font-size: 2.2vmin; padding: 0.4vmin 0.8vmin; border-radius: 1vmin; border: 1px solid var(--gray); }
label.inline.small { font-size: 2vmin; }
.progress { width: 100%; height: 1.2vmin; background: #eee; border-radius: 100px; overflow: hidden; }
.progress-fill { height: 100%; width: 0; background: var(--green); transition: width .3s; }
.level { width: 60vmin; max-width: 90%; height: 1.6vmin; background: #f1ede6; border-radius: 100px; overflow: hidden; }
.level-fill { height: 100%; width: 0; background: linear-gradient(90deg, var(--green), var(--gold), var(--accent)); transition: width .06s; }

/* Custom pictures (pictures/<key>.webp) scale with the text they replace */
img.pic { height: 1.15em; width: 1.15em; object-fit: contain; vertical-align: -0.2em; -webkit-user-drag: none; }
.big-letter.picture img.pic { height: 1em; width: 1em; vertical-align: middle; }

/* ---------- Brand, About, bundled pictures ---------- */
.brand { margin: 0; font-size: 2.6vmin; font-weight: 700; letter-spacing: .08em; text-transform: uppercase; color: var(--accent2); }
.link-btn { background: none; border: 0; padding: 0; color: var(--accent2); text-decoration: underline; font: inherit; cursor: pointer; }
.link-btn:hover { color: var(--accent); }
.about-inner { width: min(760px, 100%); }
.about-head { display: flex; gap: 16px; align-items: center; }
.about-head p { margin: 2px 0; }
.about-icon { width: 72px; height: 72px; border-radius: 16px; flex: 0 0 auto; }
.about-name { font-size: 24px; font-weight: 700; color: var(--accent); }
.about p, .about li { line-height: 1.45; }
.about-list { padding-left: 20px; margin: 6px 0; }
.about-list li { margin: 4px 0; }
.about a { color: var(--accent2); }
.about code { font-size: 13px; background: #f3efe8; padding: 1px 4px; border-radius: 4px; }

/* Interface pictures (menu icons, lock, pointing hand) rendered from the bundled set */
.mode-card .icon img.pic, .mode-card .lock img.pic, .hand img.pic { height: 1em; width: 1em; vertical-align: middle; }
.picwrap { display: inline-block; line-height: 1; }
.word-row .emoji .picwrap img.pic { height: 1em; width: 1em; vertical-align: middle; }
.word-row .emoji.count .picwrap { display: inline; }
.word-row .emoji.count img.pic { height: 0.9em; width: 0.9em; margin: 0 .05em; vertical-align: middle; }
.profile-card .avatar img.pic, .avatar-pick img.pic, .studio-letter img.pic { height: 1em; width: 1em; vertical-align: middle; }
