:root { --accent: #8a68c1; --accent-soft: #eee8fa; --ink: #26384a; --muted: #687b8e; --good: #2f9e73; --bad: #e45f55; }
* { box-sizing: border-box; }
body {
    margin: 0;
    min-height: 100vh;
    padding: 22px;
    font-family: "Trebuchet MS", "Gill Sans", sans-serif;
    color: var(--ink);
    background: radial-gradient(circle at 10% 10%, var(--accent-soft), transparent 30rem), linear-gradient(145deg, #fffaf0, #edf9ff 65%, #fff0e8);
}
a { color: inherit; }
.shell { width: min(1050px, 100%); margin: 0 auto; }
.top-row { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin: 4px 0 18px; }
.back { display: inline-flex; align-items: center; gap: 8px; color: #52687b; font-weight: 800; text-decoration: none; }
.back:hover { color: var(--accent); }
.mute { flex-shrink: 0; display: grid; place-items: center; width: 42px; height: 42px; border-radius: 999px; font-size: 1.15rem; background: rgba(255, 255, 255, .85); box-shadow: 0 8px 20px rgba(42, 68, 88, .12); cursor: pointer; }
.mute:hover { background: #fff; }
.notify { flex-shrink: 0; display: grid; place-items: center; width: 42px; height: 42px; border-radius: 999px; font-size: 1.15rem; background: rgba(255, 255, 255, .85); box-shadow: 0 8px 20px rgba(42, 68, 88, .12); cursor: pointer; }
.notify:hover { background: #fff; }
.notify.active { box-shadow: 0 0 0 3px var(--accent-soft), 0 8px 20px rgba(42, 68, 88, .12); }
.player { display: none; flex-shrink: 0; align-items: center; gap: 6px; padding: 10px 16px; border: 0; border-radius: 999px; color: #52687b; font: inherit; font-weight: 800; background: rgba(255, 255, 255, .85); box-shadow: 0 8px 20px rgba(42, 68, 88, .12); cursor: pointer; }
.player:hover { color: var(--accent); background: #fff; }
.card { position: relative; padding: clamp(22px, 4vw, 42px); border-radius: 32px; background: rgba(255, 255, 255, .88); box-shadow: 0 22px 60px rgba(42, 68, 88, .14); }
.gate { display: none; position: absolute; inset: 0; z-index: 5; align-items: center; justify-content: center; padding: 20px; border-radius: 32px; background: rgba(255, 253, 248, .97); }
.gate-box { width: min(360px, 100%); padding: 28px; border-radius: 24px; background: #fff; box-shadow: 0 20px 50px rgba(42, 68, 88, .18); text-align: center; }
.gate-box p { margin: 0 0 14px; font: 700 1.2rem Georgia, "Times New Roman", serif; color: #213346; }
.gate-row { display: flex; gap: 10px; }
.gate-row input { flex: 1; }
.creature-pick { display: none; position: absolute; inset: 0; z-index: 5; align-items: center; justify-content: center; padding: 20px; border-radius: 32px; background: rgba(255, 253, 248, .97); }
.creature-box { width: min(460px, 100%); padding: 28px; border-radius: 24px; background: #fff; box-shadow: 0 20px 50px rgba(42, 68, 88, .18); text-align: center; }
.creature-box p { margin: 0 0 18px; font: 700 1.2rem Georgia, "Times New Roman", serif; color: #213346; }
.creature-options { display: flex; justify-content: center; gap: 14px; flex-wrap: wrap; }
.creature-option { display: flex; flex-direction: column; align-items: center; gap: 8px; width: 118px; padding: 14px; border: 2px solid #dce5eb; border-radius: 20px; background: #fbfcfd; font: inherit; font-weight: 700; font-size: .82rem; color: var(--ink); cursor: pointer; }
.creature-option:hover { border-color: var(--accent); background: var(--accent-soft); }
.creature-option img { width: 64px; height: 64px; border-radius: 16px; object-fit: cover; }
.head { display: grid; grid-template-columns: 1fr auto; gap: 22px; align-items: center; }
.badges { display: flex; flex-wrap: wrap; gap: 8px; }
.badge { display: inline-block; padding: 8px 13px; border-radius: 999px; color: var(--accent); background: var(--accent-soft); font-size: .78rem; font-weight: 800; letter-spacing: .08em; text-transform: uppercase; }
.badge.level { color: #fff; background: var(--accent); }
h1 { margin: 12px 0 8px; font: 700 clamp(2.1rem, 6vw, 4rem)/1 Georgia, "Times New Roman", serif; color: #213346; }
.intro { max-width: 660px; margin: 0; color: var(--muted); line-height: 1.55; }
.mascot { display: grid; place-items: center; width: 112px; height: 112px; border-radius: 30px; background: linear-gradient(145deg, var(--accent-soft), #fff); font-size: 3.8rem; box-shadow: inset 0 0 0 1px rgba(38, 56, 74, .06); overflow: hidden; }
.mascot img { width: 100%; height: 100%; object-fit: cover; border-radius: 30px; }
.stats { display: grid; grid-template-columns: repeat(3, 1fr); gap: 12px; margin: 26px 0 18px; }
.stat { padding: 15px 17px; border-radius: 18px; background: #f8fafb; }
.stat span { display: block; margin-bottom: 7px; color: var(--muted); font-size: .72rem; font-weight: 800; letter-spacing: .08em; text-transform: uppercase; }
.stat strong { font-size: 1.35rem; }
.game { display: grid; grid-template-columns: 1.35fr .65fr; gap: 18px; }
.panel { padding: clamp(20px, 4vw, 32px); border-radius: 25px; background: #fbfcfd; box-shadow: inset 0 0 0 1px rgba(38, 56, 74, .07); }
.label { color: var(--accent); font-size: .77rem; font-weight: 800; letter-spacing: .1em; text-transform: uppercase; }
#question { min-height: 112px; display: grid; place-items: center; margin: 14px 0; text-align: center; font: 700 clamp(1.7rem, 5vw, 3.2rem)/1.2 Georgia, "Times New Roman", serif; color: #26384a; }
.answer-row { display: flex; gap: 10px; }
input { min-width: 0; flex: 1; padding: 14px 16px; border: 2px solid #dce5eb; border-radius: 16px; font-family: inherit; font-size: 1.35rem; font-weight: 700; text-align: center; color: var(--ink); background: #fff; }
input:focus { outline: 4px solid color-mix(in srgb, var(--accent) 16%, transparent); border-color: var(--accent); }
button { border: 0; border-radius: 16px; padding: 14px 20px; font-family: inherit; font-size: 1rem; font-weight: 800; cursor: pointer; }
.primary { color: #fff; background: var(--accent); }
.secondary { width: 100%; margin-top: 12px; color: var(--accent); background: var(--accent-soft); }
button:disabled, input:disabled { opacity: .55; cursor: not-allowed; }
#feedback { min-height: 48px; padding-top: 14px; text-align: center; font-weight: 800; line-height: 1.4; }
#feedback.good { color: var(--good); }
#feedback.bad { color: var(--bad); }
.progress-label { display: flex; justify-content: space-between; gap: 12px; margin: 18px 0 9px; color: var(--muted); font-size: .85rem; }
.track { display: grid; grid-template-columns: repeat(10, 1fr); gap: 6px; }
.dot { height: 12px; border-radius: 20px; background: #dfe7ec; }
.dot.current { background: var(--accent); box-shadow: 0 0 0 3px var(--accent-soft); }
.dot.good { background: var(--good); }
.dot.bad { background: var(--bad); }
.dashboard h2 { margin: 0 0 14px; font: 700 1.5rem Georgia, serif; }
.dash-row { display: flex; justify-content: space-between; gap: 14px; padding: 13px 0; border-bottom: 1px solid #e4eaee; }
.dash-row span { color: var(--muted); }
.tip { margin: 18px 0 0; padding: 13px; border-radius: 15px; color: #5b4a16; background: #fff6cd; font-size: .9rem; line-height: 1.45; }
.summary { display: none; margin-top: 14px; padding: 18px; border-radius: 18px; color: #245c48; background: #e5f7ef; text-align: center; line-height: 1.55; }
.reward { display: none; align-items: center; gap: 14px; margin-top: 12px; padding: 14px 16px; border-radius: 18px; color: #5b4a16; background: #fff6cd; font-weight: 800; line-height: 1.4; }
.reward img { flex-shrink: 0; width: 60px; height: 60px; border-radius: 14px; object-fit: cover; box-shadow: 0 8px 18px rgba(42, 68, 88, .18); }
@media (max-width: 800px) { .game { grid-template-columns: 1fr; } }
@media (max-width: 570px) { body { padding: 10px; } .card { border-radius: 24px; } .head { grid-template-columns: 1fr; } .mascot { display: none; } .stats { grid-template-columns: 1fr 1fr 1fr; gap: 6px; } .stat { padding: 12px 8px; text-align: center; } .stat strong { font-size: 1rem; } .answer-row { flex-direction: column; } .answer-row button { width: 100%; } }
