/* =====================================================================
   Edgarversum – gemeinsame Optik für alle Spiele
   ===================================================================== */
:root {
    --bg: #1e3a8a;
    --on-bg: #ffffff;
    --accent: #0ea5e9;
    --accent-dark: #0369a1;
    --ring: #38bdf8;
}
* { box-sizing: border-box; }
html, body { margin: 0; min-height: 100%; }
body {
    font-family: 'Fredoka', 'Arial Rounded MT Bold', system-ui, sans-serif;
    font-weight: 500;
    background: var(--bg);
    background-attachment: fixed;
    color: #1e293b;
    touch-action: manipulation;
    -webkit-tap-highlight-color: transparent;
    user-select: none;
    -webkit-user-select: none;
    overflow-x: hidden;
}
button { font-family: inherit; }
#app {
    max-width: 540px;
    margin: 0 auto;
    min-height: 100vh;
    min-height: 100dvh;
    display: flex;
    flex-direction: column;
    padding: 12px 16px 28px;
}

/* --- Kopfleiste --- */
.topbar { display: flex; align-items: center; gap: 8px; margin-bottom: 12px; }
.spacer { flex: 1; }
.pill {
    background: rgba(255,255,255,.95);
    border-radius: 999px;
    padding: 8px 16px;
    font-weight: 700;
    font-size: 1.3rem;
    box-shadow: 0 4px 12px rgba(0,0,0,.18);
    display: flex; align-items: center; gap: 6px;
}
.pill.bump { animation: bump .4s; }
.icon-btn {
    border: none;
    background: rgba(255,255,255,.95);
    width: 48px; height: 48px;
    border-radius: 50%;
    font-size: 1.4rem;
    box-shadow: 0 4px 12px rgba(0,0,0,.18);
    cursor: pointer; padding: 0;
    flex-shrink: 0;
}
.icon-btn:active { transform: scale(.92); }
#sync-status { font-size: 1.1rem; opacity: .85; width: 28px; text-align: center; }

/* --- Bildschirme --- */
.screen { display: none; flex: 1; flex-direction: column; align-items: center; gap: 14px; }
.screen.active { display: flex; animation: fadeUp .35s ease-out; }
.screen-title { color: var(--on-bg); font-size: 1.8rem; font-weight: 700; margin: 4px 0; text-align: center; }
.screen-sub { color: var(--on-bg); opacity: .9; font-size: 1.2rem; margin: 0; text-align: center; }

.card {
    background: #fff;
    border-radius: 22px;
    padding: 18px;
    width: 100%;
    box-shadow: 0 10px 25px rgba(0,0,0,.16);
    text-align: center;
}

.btn {
    display: block; width: 100%;
    border: none; border-radius: 16px;
    padding: 16px 20px;
    font-size: 1.4rem; font-weight: 700;
    color: #fff;
    background: var(--accent);
    box-shadow: 0 6px 0 var(--accent-dark), 0 10px 20px rgba(0,0,0,.15);
    cursor: pointer;
    transition: transform .1s, box-shadow .1s;
}
.btn:active { transform: translateY(5px); box-shadow: 0 1px 0 var(--accent-dark); }
.btn:disabled { background: #94a3b8; box-shadow: 0 6px 0 #64748b; cursor: default; transform: none; }
.btn.green  { background: #22c55e; box-shadow: 0 6px 0 #16a34a; }
.btn.orange { background: #f59e0b; box-shadow: 0 6px 0 #d97706; }
.btn.white  { background: #fff; color: #1e293b; box-shadow: 0 6px 0 #cbd5e1; }
.btn.big { padding: 20px; font-size: 1.6rem; }

.speak-btn {
    border: none; background: #e0f2fe; color: #0369a1;
    width: 46px; height: 46px; border-radius: 50%;
    font-size: 1.35rem; cursor: pointer; flex-shrink: 0;
    box-shadow: 0 3px 0 #bae6fd;
}
.speak-btn:active { transform: translateY(2px); box-shadow: none; }
.speak-btn.talking { animation: bump .6s infinite; }

/* --- Willkommen --- */
.world-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; width: 100%; }
.world-card {
    border: 4px solid rgba(255,255,255,.4);
    border-radius: 20px;
    padding: 18px 8px;
    cursor: pointer;
    text-align: center;
    box-shadow: 0 8px 18px rgba(0,0,0,.2);
}
.world-card:active { transform: scale(.96); }
.world-card .w-icon { font-size: 3.2rem; display: block; }
.world-card .w-name { font-size: 1.25rem; font-weight: 700; margin-top: 6px; display: block; }

/* --- Basis --- */
.logo {
    font-size: 2.3rem; font-weight: 700; color: var(--on-bg);
    letter-spacing: .5px; text-shadow: 0 3px 0 rgba(0,0,0,.18);
}
.home-card { display: flex; align-items: center; gap: 14px; text-align: left; }
.avatar { font-size: 4.6rem; line-height: 1; animation: float 3s ease-in-out infinite; }
.home-right { flex: 1; min-width: 0; }
.home-hello { font-size: 1.15rem; color: #64748b; font-weight: 600; }
.rank-name { font-size: 1.35rem; font-weight: 700; color: #1e3a8a; margin: 2px 0; }
.xp-bar { height: 16px; background: #e2e8f0; border-radius: 999px; overflow: hidden; margin: 6px 0 4px; }
.xp-fill { height: 100%; background: linear-gradient(90deg, #facc15, #f97316); border-radius: 999px; transition: width .6s; }
.xp-text { font-size: .95rem; color: #64748b; }

.game-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; width: 100%; }
.game-tile {
    border: none; border-radius: 24px; padding: 18px 10px 14px;
    color: #fff; cursor: pointer; text-align: center;
    box-shadow: 0 7px 0 rgba(0,0,0,.25), 0 12px 24px rgba(0,0,0,.2);
    position: relative;
}
.game-tile:active { transform: translateY(5px); box-shadow: 0 2px 0 rgba(0,0,0,.25); }
.game-tile .g-icon { font-size: 3.4rem; display: block; line-height: 1.1; }
.game-tile .g-name { font-size: 1.3rem; font-weight: 700; display: block; margin-top: 6px; }
.game-tile .g-sub { font-size: .95rem; opacity: .92; display: block; margin-top: 2px; }
.game-tile .g-badge {
    position: absolute; top: -8px; right: -6px; background: #facc15; color: #78350f;
    font-size: .9rem; font-weight: 700; padding: 3px 10px; border-radius: 999px; transform: rotate(8deg);
}
.home-buttons { width: 100%; display: flex; flex-direction: column; gap: 14px; margin-top: 6px; }
.shop-hint { color: var(--on-bg); font-weight: 600; text-align: center; font-size: 1.1rem; }

/* --- Level --- */
.level-list { width: 100%; display: flex; flex-direction: column; gap: 12px; }
.level-group { color: var(--on-bg); font-weight: 700; font-size: 1.25rem; margin: 6px 4px -2px; }
.level-card {
    display: flex; align-items: center; gap: 14px;
    background: #fff; border: none; border-radius: 20px;
    padding: 14px 16px; width: 100%;
    box-shadow: 0 6px 0 #cbd5e1, 0 10px 20px rgba(0,0,0,.12);
    cursor: pointer; text-align: left;
}
.level-card:active:not(.locked) { transform: translateY(4px); box-shadow: 0 2px 0 #cbd5e1; }
.level-card.locked { opacity: .62; cursor: default; }
.level-icon { font-size: 2.4rem; width: 52px; text-align: center; }
.level-info { flex: 1; }
.level-name { font-size: 1.3rem; font-weight: 700; color: #1e293b; }
.level-sub { font-size: .98rem; color: #64748b; margin-top: 2px; }
.mini-bar { height: 10px; background: #e2e8f0; border-radius: 999px; overflow: hidden; margin-top: 6px; }
.mini-fill { height: 100%; background: var(--accent); border-radius: 999px; }
.level-coins { font-weight: 700; color: #b45309; font-size: 1.05rem; white-space: nowrap; }

/* --- Gemeinsame Spiel-Elemente --- */
.mission-head { width: 100%; display: flex; align-items: center; justify-content: space-between; gap: 8px; color: var(--on-bg); font-weight: 700; font-size: 1.1rem; }
.dots { display: flex; gap: 4px; font-size: 1.5rem; flex-shrink: 0; }
.dot { opacity: .25; filter: grayscale(1); transition: all .3s; }
.dot.on { opacity: 1; filter: none; transform: scale(1.15); }
.task-row { display: flex; align-items: center; gap: 10px; }
.task-row .task-texts { flex: 1; text-align: center; }

.float-coins {
    position: fixed; z-index: 1001; pointer-events: none;
    font-size: 2.3rem; font-weight: 700; color: #f59e0b;
    text-shadow: 0 2px 0 #fff, 0 0 12px rgba(255,255,255,.8);
    animation: floatUp 1.4s ease-out forwards;
}
.success { animation: successPulse 1s ease-out; }
.error { animation: shake .5s cubic-bezier(.36,.07,.19,.97) both; }

/* --- Schatz --- */
.treasure-card { margin-top: 20px; padding: 30px 18px; }
.treasure-icon { font-size: 7rem; display: inline-block; transition: transform .5s; }
.treasure-open .treasure-icon { transform: scale(1.25) rotate(8deg); }
.treasure-title { font-size: 1.9rem; color: #1e3a8a; font-weight: 700; margin: 10px 0; }
.treasure-line { font-size: 1.3rem; color: #334155; margin: 6px 0; }
.unlock-note { background: #fef3c7; color: #92400e; border-radius: 14px; padding: 10px; font-weight: 600; margin-top: 10px; font-size: 1.15rem; }
.unlock-note.green { background: #dcfce7; color: #166534; }
.unlock-go { display: block; width: 100%; border: 3px solid #f59e0b; font-family: inherit; cursor: pointer; animation: unlockPulse 1.4s ease-in-out infinite; }
.unlock-go .go { display: block; margin-top: 8px; background: #16a34a; color: #fff; border-radius: 12px; padding: 10px; font-size: 1.3rem; }
@keyframes unlockPulse { 0%,100% { transform: scale(1); } 50% { transform: scale(1.03); } }

/* --- Shop --- */
/* Kategorien brechen in mehrere Zeilen um – so sind immer alle sichtbar (auch am Notebook ohne Wischen) */
.tabs { display: flex; flex-wrap: wrap; justify-content: center; gap: 8px; width: 100%; }
.tab {
    flex: 1 1 auto; border: none; border-radius: 14px; padding: 12px 14px; white-space: nowrap;
    font-size: 1.1rem; font-weight: 600;
    background: rgba(255,255,255,.7); color: #334155; cursor: pointer;
}
.tab.active { background: #fff; box-shadow: 0 4px 12px rgba(0,0,0,.15); color: #1e3a8a; }
.shop-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; width: 100%; }
.shop-item { background: #fff; border-radius: 20px; padding: 12px; text-align: center; box-shadow: 0 8px 18px rgba(0,0,0,.14); display: flex; flex-direction: column; gap: 8px; }
.shop-item.equipped { outline: 4px solid #22c55e; }
.preview { height: 88px; border-radius: 14px; display: flex; align-items: center; justify-content: center; font-size: 3rem; background: #f1f5f9; overflow: hidden; }
.preview svg { height: 80px; width: 80px; }
.item-name { font-weight: 700; font-size: 1.1rem; color: #1e293b; }
.shop-item .btn { font-size: 1.1rem; padding: 10px 6px; box-shadow: 0 4px 0 var(--accent-dark); }
.shop-item .btn.green { box-shadow: 0 4px 0 #16a34a; }
.shop-item .btn.white { box-shadow: 0 4px 0 #cbd5e1; border: 2px solid #e2e8f0; }

/* --- Dialog & Hinweise --- */
.modal { position: fixed; inset: 0; background: rgba(15,23,42,.55); display: flex; align-items: center; justify-content: center; z-index: 2000; padding: 20px; }
.modal.hidden { display: none; }
.modal-box { background: #fff; border-radius: 24px; padding: 24px; width: 100%; max-width: 380px; text-align: center; animation: pop .3s; }
.modal-icon { font-size: 4rem; }
.modal-title { font-size: 1.6rem; font-weight: 700; color: #1e3a8a; margin: 8px 0; }
.modal-text { font-size: 1.2rem; color: #475569; margin-bottom: 18px; }
.modal-buttons { display: flex; gap: 12px; }
.toast {
    position: fixed; left: 50%; top: 18%;
    background: #fff; border-radius: 22px; padding: 18px 26px; z-index: 1500;
    box-shadow: 0 20px 40px rgba(0,0,0,.3); text-align: center; font-weight: 700;
    font-size: 1.45rem; color: #1e3a8a; max-width: 90vw;
    transform: translateX(-50%); animation: toastPop .35s;
}
.toast .t-icon { font-size: 3.5rem; display: block; }

@keyframes fadeUp { from { opacity: 0; transform: translateY(14px); } to { opacity: 1; transform: none; } }
@keyframes pop { 0% { transform: scale(.7); opacity: 0; } 70% { transform: scale(1.05); } 100% { transform: scale(1); opacity: 1; } }
@keyframes toastPop { 0% { transform: translateX(-50%) scale(.7); opacity: 0; } 100% { transform: translateX(-50%) scale(1); opacity: 1; } }
@keyframes bump { 50% { transform: scale(1.18); } }
@keyframes float { 50% { transform: translateY(-8px); } }
@keyframes floatUp { 0% { opacity: 0; transform: translate(-50%, 0) scale(.6); } 20% { opacity: 1; transform: translate(-50%, -20px) scale(1.1); } 100% { opacity: 0; transform: translate(-50%, -120px) scale(1); } }
@keyframes successPulse { 0% { transform: scale(1); } 50% { transform: scale(1.05); } 100% { transform: scale(1); } }
@keyframes shake {
    10%, 90% { transform: translate3d(-4px, 0, 0); }
    20%, 80% { transform: translate3d(8px, 0, 0); }
    30%, 50%, 70% { transform: translate3d(-12px, 0, 0); }
    40%, 60% { transform: translate3d(12px, 0, 0); }
}

/* =====================================================================
   Spiel: Uhr-Mission
   ===================================================================== */
.uhr-task { padding: 14px 16px; }
.task-prompt { font-size: 1.2rem; color: #64748b; font-weight: 600; }
.task-time { font-size: 2.3rem; color: #1e40af; font-weight: 700; margin: 2px 0 10px; min-height: 1.2em; }
.options { display: grid; grid-template-columns: 1fr; gap: 10px; }
.options .btn { font-size: 1.45rem; padding: 13px; }
.options .btn.wrong { background: #fca5a5; box-shadow: 0 6px 0 #f87171; animation: shake .4s; }
.options .btn.right { background: #22c55e; box-shadow: 0 6px 0 #16a34a; color: #fff; }
.clock-container {
    width: min(100%, 56vh);
    aspect-ratio: 1;
    background: #fff;
    border-radius: 50%;
    box-shadow: 0 0 0 6px var(--ring), 0 15px 35px rgba(0,0,0,.25);
    position: relative;
    margin-top: 6px;
}
.clock-container svg { width: 100%; height: 100%; touch-action: none; display: block; }
.clock-container svg text { pointer-events: none; font-family: 'Fredoka', sans-serif; }
.hand { cursor: grab; }
.clock-container.locked .hand { cursor: default; }
.clock-container.success { animation: successPulse 1s ease-out; box-shadow: 0 0 0 6px #22c55e, 0 15px 35px rgba(34,197,94,.5); }

/* =====================================================================
   Spiel: Zahlenmonster
   ===================================================================== */
.monster-stage { position: relative; height: 118px; width: 100%; display: flex; align-items: flex-end; justify-content: center; }
.monster { font-size: 6rem; line-height: 1; animation: monsterIdle 2.4s ease-in-out infinite; transform-origin: 50% 100%; }
.monster.eat { animation: monsterEat .7s ease-out; }
.monster.sad { animation: monsterSad .6s ease-out; filter: grayscale(.6); }
.food-fly { position: absolute; left: 50%; bottom: -60px; font-size: 2.6rem; pointer-events: none; animation: feed .6s ease-in forwards; }
.monster-bubble {
    position: absolute; right: 4%; top: 0; background: #fff; border-radius: 16px 16px 16px 4px;
    padding: 6px 12px; font-weight: 600; font-size: 1.05rem; color: #334155; box-shadow: 0 4px 10px rgba(0,0,0,.15);
    opacity: 0; transition: opacity .3s; max-width: 45%;
}
.monster-bubble.show { opacity: 1; }
@keyframes monsterIdle { 50% { transform: translateY(-6px) scale(1.02, .98); } }
@keyframes monsterEat { 0% { transform: scale(1); } 30% { transform: scale(1.25, .8); } 60% { transform: scale(.9, 1.15); } 100% { transform: scale(1); } }
@keyframes monsterSad { 20%, 60% { transform: rotate(-8deg); } 40%, 80% { transform: rotate(8deg); } }
@keyframes feed { 0% { transform: translate(-50%, 0) scale(1); opacity: 1; } 100% { transform: translate(-50%, -150px) scale(.3); opacity: 0; } }

.board {
    width: 100%; border-radius: 22px; padding: 14px 14px 16px;
    box-shadow: 0 10px 25px rgba(0,0,0,.2); text-align: center;
    border: 6px solid #8b5a2b;
    background: #1f3a2e; color: #fff;
}
.board.grid-paper { border-color: #cbd5e1; }
.board-row { display: flex; align-items: center; gap: 8px; }
.board-row .speak-btn, .board-row .help-btn { flex-shrink: 0; }
.help-btn {
    border: none; background: #fef3c7; color: #92400e; height: 46px; border-radius: 999px;
    padding: 0 14px; font-size: 1.1rem; font-weight: 700; cursor: pointer; box-shadow: 0 3px 0 #fde68a;
}
.help-btn:active { transform: translateY(2px); box-shadow: none; }
.m-task { flex: 1; font-size: 2.6rem; font-weight: 700; white-space: nowrap; letter-spacing: 1px; }
.m-answer {
    display: inline-block; min-width: 1.9em; padding: 0 .2em; border-radius: 12px;
    background: rgba(255,255,255,.18); border-bottom: 4px solid currentColor;
}
.m-answer.blink::after { content: '|'; animation: blink 1s steps(1) infinite; opacity: .6; }
@keyframes blink { 50% { opacity: 0; } }
.board.right .m-answer { background: #22c55e; color: #fff; border-color: #16a34a; }
.board.wrong .m-answer { background: #f87171; color: #fff; }

.m-help { margin-top: 12px; display: none; background: #fff; color: #334155; border-radius: 16px; padding: 12px; }
.m-help.show { display: block; animation: fadeUp .3s; }
.m-help .hint { font-size: 1.25rem; font-weight: 700; color: #1e40af; margin-top: 8px; }
.field20 { display: inline-flex; flex-direction: column; gap: 6px; }
.f-row { display: flex; gap: 12px; }
.f-five { display: flex; gap: 4px; }
.d { width: 20px; height: 20px; border-radius: 50%; display: inline-block; background: #e2e8f0; position: relative; }
.d.a { background: #3b82f6; }
.d.b { background: #f97316; }
.d.x { background: #93c5fd; }
.d.x::after { content: '✕'; position: absolute; inset: 0; color: #dc2626; font-size: 18px; line-height: 20px; font-weight: 700; }
.blocks { display: flex; gap: 14px; justify-content: center; flex-wrap: wrap; align-items: flex-end; }
.block-num { display: flex; gap: 4px; align-items: flex-end; flex-wrap: wrap; justify-content: center; max-width: 230px; }
.bar { display: flex; flex-direction: column-reverse; gap: 2px; }
.bar i { width: 13px; height: 9px; border-radius: 2px; display: block; }
.ones { display: grid; grid-template-columns: repeat(5, 12px); gap: 3px; align-content: end; }
.ones i { width: 12px; height: 12px; border-radius: 50%; display: block; }
.c-a i { background: #3b82f6; } .c-b i { background: #f97316; }
.block-plus { font-size: 1.8rem; font-weight: 700; color: #475569; align-self: center; }
.array { display: inline-flex; flex-direction: column; gap: 5px; }
.array .a-row { display: flex; gap: 4px; align-items: center; }
.array .a-row .gap { width: 6px; }
.array .d { width: 16px; height: 16px; }
.array .a-row:nth-child(5n) { margin-bottom: 5px; }

.numpad { display: grid; grid-template-columns: repeat(3, 1fr); gap: 10px; width: 100%; }
.numpad button {
    border: none; border-radius: 18px; background: #fff; color: #1e293b;
    font-size: 2rem; font-weight: 700; padding: 12px 0; cursor: pointer;
    box-shadow: 0 5px 0 #cbd5e1;
}
.numpad button:active { transform: translateY(4px); box-shadow: 0 1px 0 #cbd5e1; }
.numpad .np-del { background: #fee2e2; box-shadow: 0 5px 0 #fca5a5; }
.numpad .np-ok { background: #22c55e; color: #fff; box-shadow: 0 5px 0 #16a34a; }
.numpad button:disabled { opacity: .5; }

/* =====================================================================
   Spiel: Lese-Detektiv
   ===================================================================== */
.l-card { position: relative; padding: 14px 14px 18px; overflow: hidden; }
.l-main { min-height: 150px; display: flex; align-items: center; justify-content: center; padding: 6px 4px; }
.l-pic { font-size: 7rem; line-height: 1.1; animation: pop .35s; }
.l-word { font-size: 3.4rem; font-weight: 700; color: #1e293b; letter-spacing: 2px; animation: pop .35s; }
.l-riddle { font-size: 1.85rem; font-weight: 600; color: #1e293b; line-height: 1.45; animation: pop .35s; }
.l-under { min-height: 0; }
.l-hintword { display: inline-block; font-size: 2.4rem; font-weight: 700; color: #334155; letter-spacing: 2px; animation: fadeUp .3s; }
.l-hintword b { color: #dc2626; background: #fef3c7; border-radius: 8px; padding: 0 6px; }
/* Silbenbögen wie in der Schule: abwechselnd blau und rot, mit Bogen darunter */
.syl { display: inline-block; padding: 0 0 3px; border-bottom: 3px solid currentColor; border-radius: 0 0 50% 50% / 0 0 10px 10px; margin: 0; }
.sy1 { color: #2563eb; }
.sy2 { color: #dc2626; }
.l-stamp {
    position: absolute; right: 10px; top: 52px; font-size: 4.6rem; opacity: 0; pointer-events: none;
    filter: drop-shadow(0 4px 6px rgba(0,0,0,.25));
}
.l-stamp.show { animation: stampIn .5s cubic-bezier(.2,1.6,.4,1) forwards; }
@keyframes stampIn { 0% { opacity: 0; transform: scale(2.4) rotate(-30deg); } 100% { opacity: 1; transform: scale(1) rotate(-12deg); } }

.l-options { display: grid; gap: 12px; width: 100%; }
.l-options .btn { padding: 12px 6px; }
.l-options.opt-letter, .l-options.opt-pic { grid-template-columns: repeat(3, 1fr); }
.l-options.opt-letter .btn { font-size: 3rem; padding: 14px 4px; }
.l-options.opt-letter .btn small { font-size: 1.9rem; margin-left: 4px; opacity: .7; }
.l-options.opt-pic .btn { font-size: 4rem; padding: 10px 4px; line-height: 1.2; }
.l-options.opt-word { grid-template-columns: 1fr; }
.l-options.opt-word .btn { font-size: 2.3rem; letter-spacing: 1px; }
.l-options .btn.wrong { background: #fca5a5; box-shadow: 0 6px 0 #f87171; animation: shake .4s; }
.l-options .btn.wrong .syl { color: #7f1d1d; }
.l-options .btn.right { background: #22c55e; box-shadow: 0 6px 0 #16a34a; color: #fff; }
.l-options .btn.right .syl { color: #fff; }
.l-options .btn:disabled:not(.right):not(.wrong) { background: #fff; color: #1e293b; box-shadow: 0 6px 0 #cbd5e1; opacity: .75; }
.l-buddy { position: relative; width: 100%; display: flex; justify-content: flex-start; padding-left: 6px; min-height: 70px; }
.l-buddy-icon { font-size: 3.6rem; cursor: pointer; animation: monsterIdle 2.4s ease-in-out infinite; transform-origin: 50% 100%; }
.l-buddy .monster-bubble { left: 80px; right: auto; top: 6px; max-width: 60%; }

/* =====================================================================
   Eltern-Bereich
   ===================================================================== */
.parent-link {
    margin-top: 18px; border: none; background: rgba(255,255,255,.22); color: var(--on-bg);
    font-size: .95rem; font-weight: 600; padding: 8px 16px; border-radius: 999px; cursor: pointer;
    position: relative; overflow: hidden; opacity: .8;
}
.parent-link .fill { position: absolute; left: 0; top: 0; bottom: 0; width: 0; background: rgba(255,255,255,.45); }
.parent-link.holding .fill { width: 100%; transition: width 1.5s linear; }
.parent-link span { position: relative; }

.p-wrap { width: 100%; display: flex; flex-direction: column; gap: 14px; text-align: left; }
.p-card { background: #fff; border-radius: 20px; padding: 16px; box-shadow: 0 10px 25px rgba(0,0,0,.14); color: #1e293b; }
.p-card h2 { margin: 0 0 10px; font-size: 1.25rem; display: flex; align-items: center; gap: 8px; }
.p-card h3 { margin: 14px 0 6px; font-size: 1.05rem; color: #475569; }
.p-muted { color: #64748b; font-size: .95rem; }
.p-tiles { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.p-tile { background: #f1f5f9; border-radius: 14px; padding: 10px 12px; }
.p-tile b { display: block; font-size: 1.6rem; }
.p-tile span { color: #64748b; font-size: .9rem; }
.p-week { display: grid; grid-template-columns: repeat(7, 1fr); gap: 6px; align-items: end; height: 150px; margin-top: 6px; }
.p-day { display: flex; flex-direction: column; align-items: center; justify-content: flex-end; height: 100%; gap: 3px; }
.p-bars { display: flex; gap: 2px; align-items: flex-end; height: 100px; }
.p-bar { width: 12px; border-radius: 4px 4px 0 0; min-height: 2px; }
.p-bar.c { background: #22c55e; }
.p-bar.w { background: #f87171; }
.p-day small { font-size: .78rem; color: #64748b; }
.p-day .num { font-size: .8rem; font-weight: 700; color: #334155; }
.p-legend { display: flex; gap: 14px; font-size: .85rem; color: #64748b; margin-top: 8px; }
.p-legend i { display: inline-block; width: 10px; height: 10px; border-radius: 3px; margin-right: 4px; }
.p-table { width: 100%; border-collapse: collapse; font-size: .95rem; }
.p-table td { padding: 7px 4px; border-bottom: 1px solid #e2e8f0; vertical-align: middle; }
.p-table td:nth-child(n+2) { text-align: right; white-space: nowrap; }
.p-quote { display: inline-block; min-width: 46px; text-align: center; border-radius: 999px; padding: 1px 8px; font-weight: 700; font-size: .85rem; }
.q-good { background: #dcfce7; color: #166534; } .q-mid { background: #fef3c7; color: #92400e; } .q-low { background: #fee2e2; color: #991b1b; }
.p-chips { display: flex; flex-wrap: wrap; gap: 6px; }
.p-chip { background: #fff7ed; border: 1px solid #fed7aa; border-radius: 999px; padding: 4px 10px; font-size: .95rem; }
.p-chip em { font-style: normal; color: #c2410c; font-weight: 700; margin-left: 4px; }
.p-btn {
    border: none; border-radius: 12px; padding: 10px 14px; font-size: 1rem; font-weight: 600; cursor: pointer;
    background: #e0f2fe; color: #075985; box-shadow: 0 3px 0 #bae6fd;
}
.p-btn:active { transform: translateY(2px); box-shadow: none; }
.p-btn.small { padding: 5px 10px; font-size: .85rem; }
.p-btn.danger { background: #fee2e2; color: #991b1b; box-shadow: 0 3px 0 #fecaca; }
.p-btn.gold { background: #fef3c7; color: #92400e; box-shadow: 0 3px 0 #fde68a; }
.p-row { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; }
.p-lock { font-size: .85rem; }

.pin-box { text-align: center; }
.pin-dots { display: flex; justify-content: center; gap: 14px; margin: 14px 0 18px; }
.pin-dots i { width: 20px; height: 20px; border-radius: 50%; border: 3px solid #94a3b8; display: inline-block; }
.pin-dots i.on { background: #1e3a8a; border-color: #1e3a8a; }
.pin-dots.shake { animation: shake .4s; }
.pin-box .numpad { max-width: 320px; margin: 0 auto; }
.game-grid .game-tile:last-child:nth-child(odd) { grid-column: 1 / -1; }

/* =====================================================================
   Spiel: Rekord-Jagd
   ===================================================================== */
.r-score { background: rgba(255,255,255,.95); color: #166534; border-radius: 999px; padding: 4px 14px; font-size: 1.3rem; }
.r-timebar { position: relative; width: 100%; height: 26px; background: rgba(255,255,255,.35); border-radius: 999px; overflow: hidden; }
.r-timefill { height: 100%; width: 100%; background: linear-gradient(90deg, #22c55e, #84cc16); border-radius: 999px; transition: width .1s linear; }
.r-timefill.hurry { background: linear-gradient(90deg, #ef4444, #f97316); animation: bump .5s infinite; }
.r-time { position: absolute; inset: 0; display: flex; align-items: center; justify-content: center; font-weight: 700; color: #1e293b; text-shadow: 0 1px 0 #fff; }
.r-card { padding: 12px 14px; }
.r-q { flex: 1; min-height: 150px; display: flex; align-items: center; justify-content: center; }
.r-math { font-size: 3.2rem; font-weight: 700; color: #1e40af; letter-spacing: 1px; }
.r-q .l-pic { font-size: 6rem; }
.r-clock { width: 170px; height: 170px; }
.r-opts { display: grid; gap: 12px; width: 100%; }
.r-opts.r-num { grid-template-columns: repeat(3, 1fr); }
.r-opts.r-num .btn { font-size: 2.4rem; padding: 16px 4px; }
.r-opts.r-text .btn { font-size: 1.7rem; padding: 14px 6px; }
.r-opts .btn.wrong { background: #fca5a5; box-shadow: 0 6px 0 #f87171; animation: shake .4s; }
.r-opts .btn.right { background: #22c55e; box-shadow: 0 6px 0 #16a34a; color: #fff; }
.r-best { color: var(--on-bg); font-weight: 600; font-size: 1.15rem; }
.r-count {
    position: fixed; inset: 0; z-index: 1800; display: flex; align-items: center; justify-content: center;
    font-size: 9rem; font-weight: 700; color: #fff; background: rgba(15,23,42,.45); text-shadow: 0 6px 20px rgba(0,0,0,.4);
}
.r-count.hidden { display: none; }
.r-count.pop { animation: pop .5s; }

/* Überraschungs-Kachel */
.game-tile.surprise {
    background: repeating-linear-gradient(45deg, #f472b6 0 18px, #fb7185 18px 36px);
    border: 3px dashed rgba(255,255,255,.8);
}
.game-tile.surprise .g-icon { animation: float 2s ease-in-out infinite; }
.game-tile.wiggle { animation: shake .45s; }

/* =====================================================================
   Spiel: Tresor-Knacker
   ===================================================================== */
.t-card { padding: 12px 14px 14px; }
.t-safe { flex: 1; display: flex; align-items: center; justify-content: center; gap: 10px; }
.t-safe-icon { font-size: 3.4rem; transition: transform .4s; }
.t-safe-icon.open { transform: scale(1.3) rotate(-10deg); }
.t-code { display: flex; gap: 4px; }
.t-ball { font-style: normal; font-size: 1.9rem; line-height: 1; }
.t-ball.hidden { filter: grayscale(1); opacity: .5; }
.t-legend { font-size: .9rem; color: #64748b; margin: 6px 0 8px; }
.t-rows { max-height: 34vh; overflow-y: auto; display: flex; flex-direction: column; gap: 6px; }
.t-row { display: flex; align-items: center; justify-content: space-between; background: #f1f5f9; border-radius: 14px; padding: 6px 12px; }
.t-row.help { background: #fef3c7; }
.t-row .t-ball { font-size: 1.7rem; margin-right: 4px; }
.t-fb { font-size: 1.35rem; letter-spacing: 2px; }
.t-empty { padding: 10px; }
.t-current { display: flex; gap: 10px; justify-content: center; width: 100%; }
.t-slot {
    width: 64px; height: 64px; border-radius: 50%; border: 4px dashed rgba(255,255,255,.85);
    background: rgba(255,255,255,.25); font-size: 2.4rem; cursor: pointer; padding: 0;
}
.t-slot.fixed { border-style: solid; border-color: #facc15; background: rgba(250,204,21,.25); }
.t-palette { display: grid; grid-template-columns: repeat(3, 1fr); gap: 10px; width: 100%; }
.t-color {
    border: none; border-radius: 18px; background: #fff; font-size: 2.6rem; padding: 8px 0;
    box-shadow: 0 5px 0 #cbd5e1; cursor: pointer;
}
.t-color:active { transform: translateY(4px); box-shadow: 0 1px 0 #cbd5e1; }
.t-actions { display: grid; grid-template-columns: 1fr 2fr; gap: 10px; width: 100%; }

/* =====================================================================
   Spiel: Muster-Profi
   ===================================================================== */
.u-card { padding: 12px 14px 16px; }
.u-seq { display: flex; flex-wrap: wrap; justify-content: center; gap: 6px; margin: 14px 0 6px; }
.u-item { font-size: 2.5rem; line-height: 1.2; min-width: 1.2em; }
.u-item.num { font-size: 1.9rem; font-weight: 700; color: #1e40af; background: #eff6ff; border-radius: 12px; padding: 4px 10px; min-width: 2.2em; }
.u-item.q { background: #fef3c7; border-radius: 12px; padding: 0 6px; animation: bump 1.4s infinite; }
.u-item.q.solved { background: #22c55e; color: #fff; animation: pop .4s; }
.u-help { display: none; margin-top: 10px; background: #fff7ed; border-radius: 14px; padding: 10px; color: #9a3412; font-weight: 600; }
.u-help.show { display: block; animation: fadeUp .3s; }
.u-unit { font-size: 2.2rem; letter-spacing: 4px; margin-top: 4px; }
.u-diffs { display: flex; justify-content: center; flex-wrap: wrap; gap: 8px; margin-top: 6px; font-size: 1.3rem; }
.u-diffs span { background: #fed7aa; border-radius: 10px; padding: 2px 8px; }
.u-diffs .q { background: #fde68a; }
.u-opts { display: grid; grid-template-columns: repeat(3, 1fr); gap: 12px; width: 100%; }
.u-opts .btn { font-size: 3rem; padding: 12px 4px; line-height: 1.2; }
.u-opts.num .btn { font-size: 2.3rem; }
.u-opts .btn.wrong, .w-opts .btn.wrong { background: #fca5a5; box-shadow: 0 6px 0 #f87171; animation: shake .4s; }
.u-opts .btn.right, .w-opts .btn.right { background: #22c55e; box-shadow: 0 6px 0 #16a34a; color: #fff; }

/* =====================================================================
   Spiel: Waagen-Rätsel
   ===================================================================== */
.w-card { padding: 12px 10px 14px; }
.w-scales { display: flex; flex-direction: column; gap: 14px; margin: 10px 0 4px; }
.w-scale { position: relative; padding-bottom: 22px; }
.w-beam {
    display: flex; align-items: flex-end; justify-content: space-between; gap: 6px;
    border-bottom: 6px solid #64748b; border-radius: 4px; padding: 0 4px 2px;
    transform: rotate(var(--tilt)); transition: transform .6s cubic-bezier(.3,1.5,.5,1);
}
.w-pan { flex: 1; display: flex; flex-wrap: wrap; justify-content: center; gap: 2px; min-height: 44px; align-items: flex-end;
         background: #f1f5f9; border-radius: 10px 10px 4px 4px; padding: 4px; }
.w-it { font-size: 1.9rem; line-height: 1.1; }
.w-it.q { background: #fef3c7; border-radius: 10px; padding: 0 6px; font-weight: 700; color: #92400e; }
.w-it.q.solved { background: #22c55e; color: #fff; animation: pop .4s; }
.w-mid { font-size: 1.6rem; font-weight: 700; color: #475569; padding: 0 4px 6px; min-width: 18px; text-align: center; }
.w-foot { position: absolute; left: 50%; bottom: 0; width: 0; height: 0; transform: translateX(-50%);
          border-left: 14px solid transparent; border-right: 14px solid transparent; border-bottom: 22px solid #64748b; }
.w-q .w-pan { outline: 3px dashed #fbbf24; outline-offset: 2px; }
.w-group { display: flex; flex-wrap: wrap; justify-content: center; align-items: center; gap: 6px; font-size: 1.7rem; margin-top: 6px; }
.w-group span { background: #fff; border-radius: 10px; padding: 0 6px; }
.w-group s { opacity: .45; }
.w-order { font-size: 2rem; letter-spacing: 6px; margin: 6px 0 2px; filter: blur(5px); }
.w-opts { display: grid; grid-template-columns: repeat(3, 1fr); gap: 12px; width: 100%; }
.w-opts .btn { font-size: 2.4rem; padding: 12px 4px; }
.w-opts.sym .btn { font-size: 3rem; }
.p-select { width: 100%; font-size: 1rem; padding: 10px; border-radius: 12px; border: 2px solid #cbd5e1; background: #fff; font-family: inherit; }

/* Legendäre Shop-Sachen + Spar-Balken */
.shop-item { position: relative; }
.shop-item.legend { outline: 4px solid #f59e0b; background: linear-gradient(180deg, #fffbeb, #fff); box-shadow: 0 0 18px rgba(245,158,11,.55), 0 8px 18px rgba(0,0,0,.14); }
.shop-item.legend.equipped { outline-color: #22c55e; }
.legend-tag { position: absolute; top: -10px; left: 50%; transform: translateX(-50%); background: #f59e0b; color: #fff;
    font-size: .8rem; font-weight: 700; padding: 2px 10px; border-radius: 999px; white-space: nowrap; z-index: 1; }
.save-bar { position: relative; height: 18px; background: #e2e8f0; border-radius: 999px; overflow: hidden; }
.save-bar div { height: 100%; background: linear-gradient(90deg, #facc15, #f97316); border-radius: 999px; }
.save-bar span { position: absolute; inset: 0; display: flex; align-items: center; justify-content: center; font-size: .78rem; font-weight: 700; color: #334155; }

/* Hundertertafel (Zehner-Sprünge) */
.h100 { display: grid; grid-template-columns: repeat(10, 1fr); gap: 2px; max-width: 320px; margin: 0 auto; }
.h100 i { font-style: normal; font-size: .72rem; font-weight: 600; background: #f1f5f9; color: #94a3b8; border-radius: 4px; padding: 3px 0; }
.h100 i.start { background: #2563eb; color: #fff; }
.h100 i.path { background: #bfdbfe; color: #1e3a8a; }
.h100 i.goal { background: #facc15; color: #78350f; font-size: .9rem; }

/* =====================================================================
   Spiel: Wort-Werkstatt (eigene große Tastatur)
   ===================================================================== */
.s-card { padding: 12px 12px 16px; }
.s-pic { flex: 1; display: flex; justify-content: center; min-height: 120px; align-items: center; }
.s-slots { display: flex; flex-wrap: wrap; justify-content: center; gap: 6px; margin-top: 10px; min-height: 64px; }
.s-slot {
    min-width: 54px; height: 64px; padding: 0 6px; border-radius: 14px; border: 3px dashed #94a3b8; background: #f8fafc;
    font-size: 2.2rem; font-weight: 700; color: #1e293b; font-family: inherit; display: inline-flex; align-items: center; justify-content: center;
}
.s-slot.filled { border-style: solid; border-color: #3b82f6; background: #eff6ff; cursor: pointer; }
.s-slot.gap { border-color: #f59e0b; background: #fef3c7; color: #b45309; animation: bump 1.4s infinite; }
.s-slot.right, .s-typed span.right { border-color: #16a34a !important; background: #dcfce7 !important; color: #166534; animation: none; }
.s-slot.wrong, .s-typed span.wrong { border-color: #dc2626 !important; background: #fee2e2 !important; color: #991b1b; animation: shake .4s; }
.s-fixed { font-size: 2.2rem; font-weight: 700; color: #1e293b; display: inline-flex; align-items: center; height: 64px; padding: 0 2px; }
.s-tray { display: flex; flex-wrap: wrap; justify-content: center; gap: 10px; width: 100%; }
.s-tile {
    min-width: 64px; height: 68px; padding: 0 10px; border: none; border-radius: 16px; background: #fff; color: #1e293b;
    font-size: 2.3rem; font-weight: 700; font-family: inherit; box-shadow: 0 5px 0 #cbd5e1; cursor: pointer;
}
.s-tile.big { min-width: 90px; height: 80px; font-size: 2.6rem; }
.s-tile:active { transform: translateY(4px); box-shadow: 0 1px 0 #cbd5e1; }
.s-tile.used { visibility: hidden; }
.s-tile.wrong { background: #fca5a5; box-shadow: 0 5px 0 #f87171; animation: shake .4s; }
.s-tile.right { background: #22c55e; color: #fff; box-shadow: 0 5px 0 #16a34a; }
.glow { animation: glowPulse 1s ease-in-out 3 !important; }
@keyframes glowPulse { 50% { box-shadow: 0 0 0 6px #facc15, 0 0 24px #facc15; transform: scale(1.08); } }
.s-typed { display: flex; flex-wrap: wrap; justify-content: center; align-items: center; gap: 3px; min-height: 64px; }
.s-typed span { font-size: 2.3rem; font-weight: 700; color: #1e293b; border-bottom: 3px solid #94a3b8; min-width: 30px; text-align: center; border-radius: 4px; }
.s-cursor { border-bottom: 3px solid #3b82f6 !important; animation: blink 1s steps(1) infinite; min-width: 26px; height: 2.6rem; }
.s-keys { display: grid; grid-template-columns: repeat(6, 1fr); gap: 7px; width: 100%; }
.s-keys.hidden, .s-tray.hidden, .s-actions.hidden { display: none; }
.s-keys button {
    border: none; border-radius: 12px; background: #fff; color: #1e293b; font-size: 1.75rem; font-weight: 700;
    font-family: inherit; padding: 10px 0; box-shadow: 0 4px 0 #cbd5e1; cursor: pointer;
}
.s-keys button.vowel { background: #fef3c7; box-shadow: 0 4px 0 #fde68a; }
.s-keys button:active { transform: translateY(3px); box-shadow: 0 1px 0 #cbd5e1; }
.s-actions { display: grid; grid-template-columns: 1fr 2fr; gap: 10px; width: 100%; }

/* =====================================================================
   Spiel: Zahlen-Dreher-Detektiv  (Zehner BLAU, Einer ROT)
   ===================================================================== */
.zb { color: #2563eb; }
.zr { color: #dc2626; }
.zu { color: #94a3b8; }
.z-card { padding: 12px 14px 16px; }
.z-main { min-height: 120px; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 8px; margin-top: 6px; }
.z-ear { border: none; background: #e0f2fe; border-radius: 50%; width: 110px; height: 110px; font-size: 3.4rem; cursor: pointer; box-shadow: 0 6px 0 #bae6fd; }
.z-ear:active { transform: translateY(4px); box-shadow: 0 2px 0 #bae6fd; }
.z-ear.talking { animation: bump .6s infinite; }
.z-word { font-size: 2.2rem; font-weight: 700; letter-spacing: .5px; word-break: break-word; }
.z-word.small { font-size: 1.6rem; }
.z-input { display: flex; gap: 10px; }
.z-slot { width: 74px; height: 84px; border-radius: 16px; border: 4px solid currentColor; background: #fff; font-size: 3rem; font-weight: 700;
    display: inline-flex; align-items: center; justify-content: center; opacity: .55; }
.z-slot.active { opacity: 1; animation: bump 1.4s infinite; }
.z-slot.ok { background: #dcfce7; opacity: 1; animation: none; }
.z-slot.bad { background: #fee2e2; opacity: 1; animation: shake .4s; }
.z-labels { display: flex; gap: 10px; font-weight: 700; font-size: .95rem; }
.z-labels span { width: 74px; text-align: center; }
.z-blocks { display: flex; gap: 16px; align-items: flex-end; }
.z-bars { display: flex; gap: 4px; }
.z-bar { width: 14px; height: 80px; border-radius: 4px; background: repeating-linear-gradient(180deg, #3b82f6 0 7px, #93c5fd 7px 8px); }
.z-dots { display: grid; grid-template-columns: repeat(5, 16px); gap: 4px; }
.z-dot { width: 16px; height: 16px; border-radius: 50%; background: #ef4444; }
.z-txt { font-size: 1.4rem; font-weight: 700; color: #334155; }
.z-big { font-size: 3rem; font-weight: 700; margin-top: 4px; }
.z-opts { display: grid; grid-template-columns: repeat(3, 1fr); gap: 12px; width: 100%; }
.z-opts:empty { display: none; }
.z-opts .btn { font-size: 2.6rem; padding: 14px 4px; }
.z-opts .btn.wrong { background: #fca5a5; box-shadow: 0 6px 0 #f87171; animation: shake .4s; }
.z-opts .btn.right { background: #22c55e; box-shadow: 0 6px 0 #16a34a; color: #fff; }
.numpad.hidden { display: none; }
.l-options.opt-pair .btn { font-size: 2.6rem; letter-spacing: -4px; }
/* --- Sammelkarte (assets/karte.js) --- */
.home-card { position: relative; cursor: pointer; }
.home-card-badge { position: absolute; top: -10px; right: -6px; font-size: 1.8rem; transform: rotate(12deg); }
.home-row { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; width: 100%; }
.home-row .btn { padding-left: 6px; padding-right: 6px; }
.tc { width: 100%; max-width: 420px; margin: 0 auto; border-radius: 26px; padding: 10px; box-shadow: 0 12px 30px rgba(0,0,0,.3); }
.tc.bronze { background: linear-gradient(135deg, #b45309, #fcd9a8 45%, #92400e); }
.tc.silver { background: linear-gradient(135deg, #64748b, #f1f5f9 45%, #475569); }
.tc.gold { background: linear-gradient(135deg, #b45309, #fde047 40%, #fffbeb 55%, #ca8a04); }
.tc.rainbow { background: linear-gradient(135deg, #ef4444, #f59e0b, #22c55e, #3b82f6, #a855f7); animation: tcShine 4s linear infinite; background-size: 300% 300%; }
@keyframes tcShine { 0% { background-position: 0% 50%; } 100% { background-position: 300% 50%; } }
.tc-inner { background: #fffdf5; border-radius: 18px; padding: 12px; }
.tc-head { display: flex; justify-content: space-between; align-items: baseline; font-weight: 700; }
.tc-name { font-size: 1.7rem; color: #1e293b; }
.tc-hp { font-size: 1.6rem; color: #dc2626; }
.tc-hp small { font-size: .8rem; color: #64748b; }
.tc-pic { position: relative; border-radius: 14px; height: 170px; display: flex; align-items: center; justify-content: center; margin: 8px 0; border: 3px solid rgba(0,0,0,.15); }
.tc-avatar { font-size: 6.5rem; line-height: 1; animation: float 3s ease-in-out infinite; }
.tc-buddy { position: absolute; right: 10px; bottom: 6px; font-size: 2.2rem; }
.tc-type { text-align: center; font-weight: 700; color: #92400e; background: #fef3c7; border-radius: 999px; padding: 4px 10px; margin-bottom: 8px; }
.tc-stats { display: flex; flex-direction: column; gap: 6px; }
.tc-row { display: flex; align-items: center; gap: 10px; width: 100%; border: none; background: #f1f5f9; border-radius: 12px; padding: 8px 12px; font-family: inherit; font-size: 1.2rem; cursor: pointer; color: #1e293b; }
.tc-row:active { transform: scale(.98); background: #e2e8f0; }
.tc-ic { font-size: 1.6rem; }
.tc-sn { flex: 1; text-align: left; font-weight: 600; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; font-size: 1.1rem; }
.tc-v { font-size: 1.6rem; color: #1e3a8a; min-width: 2.5em; text-align: right; }
.tc-plus { background: #dcfce7; color: #166534; font-weight: 700; font-size: .95rem; border-radius: 999px; padding: 2px 8px; }
.tc-foot { display: flex; justify-content: space-between; font-size: .85rem; color: #64748b; margin-top: 8px; }
.tc-hint { color: var(--on-bg); font-weight: 600; text-align: center; font-size: 1.1rem; margin: 6px 0; }
/* --- Anmeldung / Konten (assets/konto.js) --- */
#konto { position: fixed; inset: 0; z-index: 2500; overflow-y: auto; background: linear-gradient(160deg, #0f172a 0%, #1e3a8a 100%); padding: 16px; }
.k-box { max-width: 480px; margin: 0 auto; display: flex; flex-direction: column; gap: 14px; align-items: stretch; color: #e0f2fe; text-align: center; }
.k-head { display: grid; grid-template-columns: 56px 1fr 56px; align-items: center; gap: 6px; }
.k-head h1 { margin: 0; font-size: 1.9rem; }
.k-back, .k-say { width: 56px; height: 56px; border-radius: 50%; border: none; background: #fff; font-size: 1.6rem; cursor: pointer; }
.k-kids { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.k-kids:empty { display: none; }
.k-kid { border: none; border-radius: 22px; background: #fff; color: #1e293b; padding: 14px 8px; font-family: inherit; font-size: 1.4rem; font-weight: 700; cursor: pointer; display: flex; flex-direction: column; align-items: center; gap: 4px; box-shadow: 0 6px 0 rgba(0,0,0,.25); }
.k-kid:active { transform: translateY(4px); box-shadow: 0 2px 0 rgba(0,0,0,.25); }
.k-av { font-size: 3.6rem; line-height: 1.1; }
.k-small { margin: 0; font-size: 1.1rem; opacity: .95; }
.k-msg { margin: 0; min-height: 1.4em; font-size: 1.15rem; font-weight: 600; color: #fde68a; }
.k-input { font-family: inherit; font-size: 1.8rem; padding: 14px; border-radius: 16px; border: 3px solid #38bdf8; text-align: center; width: 100%; box-sizing: border-box; }
.k-avatars { display: grid; grid-template-columns: repeat(4, 1fr); gap: 10px; }
.k-avpick { font-size: 2.8rem; border: none; border-radius: 18px; background: #fff; padding: 8px 0; cursor: pointer; }
.k-me { font-size: 4.5rem; line-height: 1; }
.k-slots { display: flex; justify-content: center; gap: 12px; }
.k-slot { width: 74px; height: 74px; border-radius: 18px; background: rgba(255,255,255,.15); border: 3px dashed rgba(255,255,255,.6); display: flex; align-items: center; justify-content: center; font-size: 2.8rem; }
.k-slot.on { border-style: solid; border-color: #facc15; }
.k-slots.bad .k-slot { border-color: #f87171; background: rgba(248,113,113,.3); animation: kShake .4s; }
@keyframes kShake { 25% { transform: translateX(-6px); } 75% { transform: translateX(6px); } }
.k-pad { display: grid; grid-template-columns: repeat(3, 1fr); gap: 12px; }
.k-pic { font-size: 3rem; border: none; border-radius: 20px; background: #fff; padding: 12px 0; cursor: pointer; box-shadow: 0 5px 0 rgba(0,0,0,.25); }
.k-pic:active { transform: translateY(3px); box-shadow: 0 2px 0 rgba(0,0,0,.25); }
.k-big { font-size: 3rem; margin: 0; letter-spacing: 6px; }
