:root { color-scheme: light; font-family: ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif; color: #24352e; background: #f7f5ef; }
* { box-sizing: border-box; }
body { margin: 0; min-width: 320px; }
button, input, select { font: inherit; }
button { cursor: pointer; }
button:disabled { opacity: .58; cursor: wait; }
button:focus-visible, a:focus-visible, input:focus-visible, select:focus-visible { outline: 3px solid #267763; outline-offset: 3px; }
[hidden] { display: none !important; }
.shell { width: min(1120px, calc(100% - 36px)); margin: auto; }
.topbar { min-height: 86px; display: flex; align-items: center; justify-content: space-between; gap: 16px; border-bottom: 1px solid #e6e5db; }
.brand { display: inline-flex; align-items: center; gap: 10px; text-decoration: none; color: #193d32; font-size: 1.18rem; font-weight: 800; letter-spacing: -.04em; }
.brand-mark { display: block; width: 38px; height: 38px; border-radius: 10px; object-fit: contain; }
.account-nav { display: flex; align-items: center; gap: 16px; }
.language-control { display: flex; align-items: center; gap: 7px; color: #28664e; font-size: .88rem; font-weight: 700; margin-inline-start: auto; }
.language-control select { width: auto; min-height: 44px; padding: 7px 9px; }
.account-email { max-width: 240px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; color: #64756b; font-size: .89rem; }
.text-button, .back-button { border: 0; background: none; color: #28664e; font-weight: 700; min-height: 48px; padding: 8px 4px; }
.text-button:hover, .back-button:hover { text-decoration: underline; }
.loading-state { padding: 90px 0; color: #64756b; text-align: center; }
.auth-layout { display: grid; grid-template-columns: 1fr minmax(320px, 440px); gap: clamp(32px, 8vw, 100px); align-items: center; min-height: calc(100vh - 86px); padding: 48px 0 80px; }
.welcome-panel { position: relative; overflow: hidden; }
.welcome-logo { display: block; width: clamp(96px, 20vw, 150px); height: auto; margin-bottom: 24px; border-radius: 22%; }
.eyebrow { color: #43836a; font-weight: 800; font-size: .75rem; letter-spacing: .15em; text-transform: uppercase; margin-bottom: 12px; }
h1, h2, p { margin-top: 0; }
h1 { font-size: clamp(2.4rem, 6vw, 4.8rem); line-height: 1.06; letter-spacing: -.06em; margin-bottom: 22px; }
h2 { font-size: 1.35rem; line-height: 1.22; letter-spacing: -.035em; margin-bottom: 13px; }
.welcome-panel > p { color: #607068; font-size: 1.1rem; line-height: 1.6; max-width: 510px; }
.welcome-art { height: 195px; display: flex; align-items: center; gap: 24px; color: #57927a; font-size: 4rem; }
.art-sun, .art-star { display: inline-grid; place-items: center; border-radius: 30px; width: 120px; height: 120px; background: #dcebd8; transform: rotate(-10deg); }
.art-path { color: #d59c5b; transform: rotate(-20deg); }
.art-star { background: #f5e3c9; color: #b47c41; width: 85px; height: 85px; font-size: 3.2rem; transform: rotate(14deg); }
.welcome-panel .quiet { font-size: .9rem; }
.auth-card, .surface-card { background: #fff; border: 1px solid #e8e9df; border-radius: 24px; box-shadow: 0 12px 35px rgba(42, 64, 47, .04); }
.auth-card { padding: clamp(24px, 5vw, 38px); }
.auth-card h2 { font-size: 1.75rem; margin: 28px 0 7px; }
.muted { color: #67776d; line-height: 1.55; }
.auth-tabs { display: grid; grid-template-columns: 1fr 1fr; gap: 4px; background: #f0f2eb; border-radius: 14px; padding: 4px; }
.tab { min-height: 45px; border: 0; border-radius: 11px; background: none; color: #52675b; font-weight: 700; }
.tab.active { background: #fff; color: #193d32; box-shadow: 0 2px 6px rgba(20, 51, 37, .08); }
form label:not(.checkbox-row) { display: block; margin: 18px 0 7px; color: #2f4036; font-weight: 700; font-size: .9rem; }
input:not([type="checkbox"]):not([type="radio"]), select { width: 100%; min-height: 50px; padding: 11px 14px; border: 1px solid #cbd7cc; border-radius: 11px; background: #fff; color: #24352e; }
input:hover, select:hover { border-color: #6b9a80; }
.checkbox-row { display: flex; align-items: flex-start; gap: 11px; margin-top: 20px; color: #43594a; line-height: 1.4; font-size: .88rem; }
.checkbox-row input { width: 20px; height: 20px; flex: none; accent-color: #28664e; }
.fine-print { font-size: .8rem; line-height: 1.5; color: #718076; margin: 15px 0 0; }
.form-error { color: #9b3f31; background: #fff0ed; border-radius: 9px; padding: 10px 12px; font-size: .9rem; margin: 16px 0 0; }
.primary-button, .secondary-button, .danger-button { min-height: 50px; border-radius: 12px; padding: 10px 19px; font-weight: 800; }
.primary-button { border: 1px solid #24583f; background: #24583f; color: #fff; display: inline-flex; align-items: center; justify-content: space-between; gap: 30px; }
.primary-button:hover { background: #19462f; }
.auth-card .primary-button, .dialog-form .primary-button { width: 100%; margin-top: 22px; }
.secondary-button { border: 1px solid #b9d0bd; background: #eff5eb; color: #24583f; }
.secondary-button:hover { background: #e4f0e1; }
.danger-button { border: 1px solid #a53d32; background: #fff; color: #a53d32; }
.danger-button:hover { background: #fff0ec; }
.content-view { padding: 62px 0 90px; }
.section-heading { display: flex; align-items: flex-start; justify-content: space-between; gap: 20px; }
.content-view h1 { font-size: clamp(2.3rem, 5vw, 4rem); margin-bottom: 10px; }
.profile-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); gap: 18px; margin-top: 34px; }
.profile-card, .add-card { min-height: 190px; border-radius: 22px; padding: 24px; text-align: left; }
.profile-card { border: 1px solid #e2e9db; background: #fff; display: flex; flex-direction: column; align-items: flex-start; box-shadow: 0 8px 25px rgba(42, 64, 47, .035); }
.profile-card:hover { border-color: #7da78a; transform: translateY(-2px); }
.profile-card .avatar { margin-bottom: auto; }
.avatar, .hero-avatar { display: inline-grid; place-items: center; flex: none; width: 64px; height: 64px; border-radius: 20px; background: #e3efe5; color: #37775c; font-size: 2.5rem; }
.avatar.star, .hero-avatar.star { background: #f8e9d4; color: #b4813e; }
.avatar.moon, .hero-avatar.moon { background: #e6e7f3; color: #6966a9; }
.avatar.leaf, .hero-avatar.leaf { background: #e5f1df; color: #679148; }
.avatar.comet, .hero-avatar.comet { background: #e4eef9; color: #376da5; }
.avatar.fox, .hero-avatar.fox { background: #fff0dc; color: #ab6932; }
.avatar.robot, .hero-avatar.robot { background: #e6ebf0; color: #506a82; }
.avatar.dragon, .hero-avatar.dragon { background: #f2e8f5; color: #78528b; }
.profile-name { display: block; font-size: 1.28rem; font-weight: 800; margin-top: 14px; color: #24352e; }
.profile-band { display: block; color: #68786f; margin-top: 4px; font-size: .9rem; }
.add-card { border: 2px dashed #b7cbb6; background: transparent; color: #28664e; display: flex; align-items: center; gap: 14px; font-weight: 800; margin-top: 18px; min-height: 78px; width: min(100%, 360px); }
.add-card span { font-size: 2rem; line-height: 1; }
.add-card:hover { background: #edf4e9; }
.back-button { margin-bottom: 28px; }
.child-hero { display: flex; align-items: center; gap: 22px; margin-bottom: 35px; }
.hero-avatar { width: 100px; height: 100px; border-radius: 30px; font-size: 4rem; }
.child-hero h1 { margin: 0 0 6px; }
.child-hero .muted { margin: 0; }
.subject-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 16px; margin-bottom: 24px; }
.subject-card { min-height: 118px; border: 1px solid #b9d0bd; border-radius: 20px; padding: 22px; background: #eaf3e7; color: #193d32; text-align: left; display: flex; flex-direction: column; justify-content: center; gap: 7px; }
.subject-card strong { font-size: 1.5rem; }
.subject-card span { color: #476653; }
.subject-card:not(.subject-coming):hover { background: #dcebd8; }
.subject-coming { background: #f3f3ee; border-color: #e5e6de; color: #59675e; }
.grade-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: 14px; margin-top: 30px; }
.grade-card, .game-card { border: 1px solid #dce6d9; border-radius: 18px; padding: 22px; background: #fff; color: #24352e; text-align: left; }
.grade-card { min-height: 105px; display: flex; flex-direction: column; justify-content: center; gap: 6px; }
.grade-card strong { font-size: 1.3rem; }
.grade-card span, .game-card > span:not(.eyebrow):not(.play-label) { color: #67776d; }
.grade-card:hover, .game-card:hover { border-color: #6b9a80; background: #f7faf5; }
.skill-grid { display: grid; gap: 28px; margin-top: 28px; }
.topic-section { min-width: 0; }
.topic-title { margin: 0 0 12px; font-size: 1.25rem; }
.topic-games { display: grid; grid-template-columns: repeat(auto-fill, minmax(250px, 1fr)); gap: 16px; }
.game-card { min-height: 195px; display: flex; flex-direction: column; gap: 8px; }
.game-card strong { font-size: 1.5rem; }
.game-card .eyebrow { margin: 0; }
.game-card:disabled { cursor: default; }
.game-card.level-locked { background: #f3f5f0; border-color: #e3e7df; }
.game-card.level-locked .play-label { color: #5e7163; }
.level-stars { display: inline-block; color: #ab7323 !important; font-size: 1.4rem; letter-spacing: .06em; line-height: 1.2; }
.play-label { margin-top: auto; font-weight: 800; color: #28664e; }
.game-view { width: min(760px, 100%); margin: 0 auto; }
.game-topline { display: flex; justify-content: space-between; gap: 12px; color: #526e5d; font-weight: 800; }
.game-progress { display: flex; gap: 8px; margin: 14px 0 34px; }
.progress-dot { height: 11px; flex: 1; border-radius: 10px; background: #dce3d9; }
.progress-dot.current { background: #a5c8a7; }
.progress-dot.done { background: #28664e; }
.game-content { position: relative; background: #fff; border: 1px solid #e4e9df; border-radius: 24px; padding: clamp(22px, 5vw, 40px); }
.game-skill { color: #62776a; font-weight: 700; margin-bottom: 16px; }
.game-content .question-prompt { font-size: clamp(2rem, 5vw, 3.5rem); margin-bottom: 32px; }
.answer-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 12px; }
.answer-button { min-height: 84px; padding: 12px 5px; border: 2px solid #bdd5bf; border-radius: 15px; background: #f5faf3; color: #193d32; font-size: clamp(1.25rem, 3vw, 1.8rem); font-weight: 800; }
.answer-button:hover:not(:disabled) { background: #e4f0e1; border-color: #488869; }
.answer-button.incorrect { background: #fff0ed; border-color: #bc6a5d; color: #8d3e34; }
.answer-button.correct { background: #e2f1e2; border-color: #33805b; }
.solve-form { margin-bottom: 18px; }
.solve-form label { display: block; margin-bottom: 8px; font-weight: 700; }
.solve-controls { display: flex; flex-wrap: wrap; gap: 12px; }
.solve-controls input { flex: 1 1 160px; max-width: 260px; min-height: 56px; padding: 10px 14px; border: 2px solid #bdd5bf; border-radius: 14px; font: inherit; font-size: 1.4rem; }
.solve-controls input:focus-visible { outline: 3px solid #28664e; outline-offset: 2px; }
.game-feedback { margin-top: 20px; padding: 16px; border-radius: 12px; line-height: 1.5; font-weight: 650; }
.game-feedback.hint { background: #f6f0dc; color: #6c5325; }
.game-feedback.try-again { background: #fff0ed; color: #823e34; }
.game-feedback.correct { background: #e8f4e7; color: #24583f; }
.hint-button { display: block; min-height: 48px; padding: 8px 0; margin-top: 16px; border: 0; background: none; color: #28664e; font-weight: 800; text-decoration: underline; }
.correct-check { position: absolute; z-index: 1; top: 50%; left: 50%; display: grid; place-items: center; width: 96px; height: 96px; border-radius: 50%; background: #e2f1e2; color: #247348; border: 4px solid #247348; box-shadow: 0 8px 28px #24583f33; font-size: 4.5rem; font-weight: 800; line-height: 1; transform: translate(-50%, -50%); pointer-events: none; }
.build-board { display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); gap: 10px; max-width: 570px; }
.build-tile { min-height: 76px; border: 2px solid #b9d0bd; border-radius: 14px; background: #f4f8f1; color: #53886d; font-size: 2rem; }
.build-tile.selected { background: #dcebd8; border-color: #28664e; box-shadow: inset 0 0 0 3px #fff; }
.build-count { font-weight: 800; font-size: 1.3rem; margin: 14px 0; }
.number-line { display: grid; direction: ltr; grid-template-columns: repeat(11, minmax(0, 1fr)); align-items: center; gap: 2px; border-top: 4px solid #458769; padding-top: 12px; margin: 55px 0 32px; }
.number-point { min-width: 0; min-height: 64px; border: 2px solid transparent; border-radius: 10px; background: #f0f6ef; color: #193d32; font-weight: 800; }
.number-point:hover, .number-point.correct { border-color: #28664e; background: #dcebd8; }
.balance { display: inline-block; background: #f6f0dc; color: #624817; border-radius: 12px; padding: 12px 18px; font-weight: 800; }
.prize-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(170px, 1fr)); gap: 16px; margin-top: 28px; }
.prize-item { display: flex; flex-direction: column; align-items: flex-start; gap: 10px; padding: 20px; border: 1px solid #e2e9db; border-radius: 20px; background: #fff; }
.prize-item .secondary-button { width: 100%; margin-top: auto; }
.round-finish h1 { font-size: clamp(2rem, 5vw, 3.3rem); }
.round-finish { position: relative; overflow: hidden; }
.finish-stars .level-stars { font-size: clamp(2.7rem, 8vw, 4rem); }
.confetti { pointer-events: none; position: absolute; inset: 0; overflow: hidden; }
.confetti i { display: none; }
.primary-button:disabled { opacity: .55; cursor: wait; }
.round-finish p { color: #52675b; line-height: 1.6; }
.feedback-prompt { display: flex; flex-direction: column; gap: 6px; background: #f6f0dc; padding: 18px; border-radius: 14px; line-height: 1.5; }
.finish-actions { display: flex; gap: 12px; flex-wrap: wrap; margin-top: 25px; }
.journey-grid, .settings-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 20px; }
.surface-card { padding: clamp(24px, 4vw, 32px); }
.card-heading { display: flex; align-items: center; gap: 12px; margin-bottom: 18px; }
.card-heading h2 { margin: 0; }
.card-icon { display: inline-grid; place-items: center; width: 42px; height: 42px; border-radius: 12px; background: #e9f3e6; color: #37775c; font-size: 1.4rem; }
.empty-state { background: #f6f8f2; border-radius: 16px; padding: 21px; color: #617468; line-height: 1.55; }
.empty-state strong { display: block; color: #294737; margin-bottom: 4px; }
.next-card p { color: #607068; line-height: 1.6; }
.skill-row { border-top: 1px solid #e8ece5; padding: 15px 0; }
.skill-row:first-child { border-top: 0; }
.skill-title { font-weight: 800; text-transform: capitalize; }
.skill-meta { color: #69796e; font-size: .87rem; margin-top: 5px; }
.settings-grid { margin-top: 34px; align-items: start; }
.settings-grid .danger-card { grid-column: 1 / -1; }
.manage-list { margin: 22px 0; }
.manage-row { display: flex; justify-content: space-between; align-items: center; gap: 12px; padding: 13px 0; border-bottom: 1px solid #edf0ea; }
.manage-row strong { display: block; }
.manage-row small { color: #6d7b71; }
.small-button { min-height: 44px; padding: 8px 10px; border: 1px solid #c9d9c7; background: #fff; color: #28664e; border-radius: 9px; font-weight: 700; }
.small-button:hover { background: #eff5eb; }
.manage-actions { display: flex; gap: 6px; }
.small-button.remove { color: #a53d32; border-color: #ecc9c1; }
#guest-setup { max-width: 760px; margin: 0 auto 28px; }
#guest-form { display: flex; gap: 12px; align-items: end; flex-wrap: wrap; }
#guest-form label { width: 100%; }
#guest-form input { flex: 1 1 220px; }
#guest-setup nav { margin-top: 36px; }
#guest-setup .grade-grid { margin-top: 16px; }
a.grade-card, a.primary-button { text-decoration: none; display: inline-flex; align-items: center; }
dialog { width: min(520px, calc(100% - 24px)); max-height: min(92vh, 850px); overflow-y: auto; border: 1px solid #e8e9df; border-radius: 22px; padding: 0; box-shadow: 0 30px 90px rgba(21, 46, 30, .25); }
dialog::backdrop { background: rgba(22, 41, 29, .47); }
.dialog-form { padding: clamp(24px, 5vw, 34px); }
.dialog-heading { display: flex; align-items: start; justify-content: space-between; gap: 12px; }
.dialog-heading h2 { font-size: 1.6rem; }
.icon-button { width: 48px; height: 48px; border: 0; background: #f2f4ee; border-radius: 13px; color: #345443; font-size: 1.8rem; line-height: 1; }
.avatar-options { display: flex; gap: 9px; border: 0; padding: 0; margin: 17px 0 4px; }
.avatar-options legend { font-size: .9rem; font-weight: 700; margin-bottom: 9px; }
.avatar-options label { margin: 0 !important; flex: 1; cursor: pointer; }
.avatar-options input { position: absolute; opacity: 0; }
.avatar-options span { display: grid; place-items: center; min-height: 74px; border: 2px solid #d8e4d7; border-radius: 12px; font-size: 1.6rem; }
.avatar-options small { display: block; font-size: .65rem; font-weight: 700; }
.avatar-options input:checked + span { border-color: #28664e; background: #edf5ea; }
.avatar-options input:focus-visible + span { outline: 3px solid #267763; outline-offset: 3px; }
#confirm-form .danger-button { width: 100%; margin-top: 20px; }
@media (max-width: 760px) { .auth-layout, .journey-grid, .settings-grid { grid-template-columns: 1fr; } .auth-layout { gap: 12px; padding-top: 35px; } .welcome-panel h1 { font-size: 2.7rem; } .welcome-art, .welcome-panel .quiet { display: none; } .auth-card { margin-bottom: 45px; } .content-view { padding-top: 38px; } .section-heading { display: block; } .section-heading .secondary-button { margin-top: 15px; } .settings-grid .danger-card { grid-column: auto; } }
@media (max-width: 500px) { .shell { width: calc(100% - 28px); } .topbar { min-height: 70px; } .brand { font-size: 1rem; } .account-email { display: none; } .child-hero { gap: 15px; } .hero-avatar { width: 75px; height: 75px; font-size: 3rem; border-radius: 22px; } .profile-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; } .profile-card { min-height: 175px; padding: 17px; } .avatar { width: 55px; height: 55px; font-size: 2.1rem; } .profile-name { font-size: 1.08rem; } .subject-grid { grid-template-columns: 1fr; } .answer-grid { gap: 7px; } .answer-button { min-height: 72px; } }
[dir="rtl"] .back-button { direction: rtl; }
@media (max-width: 500px) { .language-control > span { display: none; } .number-point { font-size: .75rem; padding: 0; } .build-tile { min-height: 64px; } }
@media (prefers-reduced-motion: no-preference) { .profile-card, .add-card, .primary-button, .secondary-button { transition: background-color .16s, border-color .16s, transform .16s; } }
@media (prefers-reduced-motion: no-preference) {
  .correct-check { animation: correct-pop .6s ease-out both; }
  .round-finish .confetti i { display: block; position: absolute; top: -15px; left: calc(5% + var(--i) * 6%); width: 8px; height: 13px; border-radius: 2px; background: hsl(calc(var(--i) * 52deg) 72% 58%); animation: confetti-fall 1.6s ease-out both; animation-delay: calc(var(--i) * 35ms); }
  @keyframes correct-pop { from { opacity: 0; transform: translate(-50%, -50%) scale(.5); } 30% { opacity: 1; transform: translate(-50%, -50%) scale(1.1); } to { opacity: 1; transform: translate(-50%, -50%) scale(1); } }
  @keyframes confetti-fall { from { opacity: 1; transform: translateY(0) rotate(0); } to { opacity: 0; transform: translateY(230px) rotate(450deg); } }
}

/* Shared colors, shape, and spacing for the learner and adult screens. */
:root {
  --ink: #20364b;
  --muted: #526779;
  --canvas: #fff9ed;
  --paper: #ffffff;
  --line: #d7e4e5;
  --teal: #11647a;
  --teal-dark: #0b4f61;
  --teal-soft: #e3f3f6;
  --coral: #c95043;
  --coral-soft: #fff0e9;
  --sun: #f5c45b;
  --sun-soft: #fff1ca;
  --lilac-soft: #eeeafb;
  --mint-soft: #e7f5e8;
  --radius-card: 24px;
  --radius-control: 14px;
  --shadow-card: 0 12px 30px rgba(31, 60, 76, .08);
  color: var(--ink);
  background: var(--canvas);
}
body { background: radial-gradient(circle at 8% 12%, #fff0ca 0, transparent 28%), radial-gradient(circle at 92% 45%, #e4f5f7 0, transparent 30%), var(--canvas); }
h1, h2, .brand, .profile-name, .subject-card strong, .grade-card strong, .game-card strong { font-family: ui-rounded, "Trebuchet MS", ui-sans-serif, system-ui, sans-serif; }
h1, h2 { color: var(--ink); }
.muted, .fine-print, .account-email, .profile-band, .skill-meta, .grade-card span, .game-card > span:not(.eyebrow):not(.play-label) { color: var(--muted); }
.topbar { border-color: var(--line); }
.brand { color: var(--ink); letter-spacing: -.025em; }
.brand-mark { border-radius: 13px; }
.eyebrow { color: var(--teal); letter-spacing: .11em; }
.text-button, .back-button, .language-control, .play-label, .hint-button { color: var(--teal); }
.auth-card, .surface-card, .game-content, .prize-item { border: 1px solid var(--line); border-radius: var(--radius-card); background: var(--paper); box-shadow: var(--shadow-card); }
.welcome-panel { padding: 18px 0; }
.welcome-panel h1 { max-width: 640px; }
.welcome-panel > p { color: var(--muted); }
.welcome-art { color: var(--teal); }
.art-sun { background: var(--sun-soft); color: #906215; }
.art-star { background: var(--lilac-soft); color: #6556a1; }
.art-path { color: var(--coral); }
.auth-tabs { background: var(--teal-soft); }
.tab { color: var(--teal-dark); }
.tab.active { color: var(--ink); }
input:not([type="checkbox"]):not([type="radio"]), select { border-color: #a9c4ca; border-radius: var(--radius-control); color: var(--ink); }
input:hover, select:hover { border-color: var(--teal); }
button:focus-visible, a:focus-visible, input:focus-visible, select:focus-visible { outline-color: var(--coral); }
.checkbox-row input { accent-color: var(--teal); }
.primary-button, .secondary-button, .danger-button { border-radius: var(--radius-control); min-height: 52px; }
.primary-button { background: var(--teal); border-color: var(--teal); color: #fff; }
.primary-button:hover { background: var(--teal-dark); }
.secondary-button { background: var(--teal-soft); border-color: #a9cbd2; color: var(--teal-dark); }
.secondary-button:hover { background: #d2edf1; }
.danger-button, .small-button.remove { color: #a93b31; }
.content-view { padding-top: clamp(38px, 6vw, 70px); }
.profile-card, .grade-card, .game-card, .add-card { border-radius: var(--radius-card); box-shadow: var(--shadow-card); }
.profile-card { border: 2px solid #dce9e9; background: var(--paper); }
.profile-card:nth-child(4n + 2) { background: #fff5df; border-color: #f4dfaa; }
.profile-card:nth-child(4n + 3) { background: #f2effe; border-color: #ded7f5; }
.profile-card:nth-child(4n + 4) { background: #eaf7f6; border-color: #c9e9e7; }
.profile-card:hover { border-color: var(--teal); }
.avatar, .hero-avatar { border-radius: 22px; }
.profile-name { color: var(--ink); }
.add-card { border: 2px dashed #78aab5; background: #edf8f8; color: var(--teal-dark); }
.add-card:hover { background: #dff2f3; }
.child-hero { padding: clamp(20px, 4vw, 30px); border: 1px solid #d4e9e6; border-radius: var(--radius-card); background: linear-gradient(115deg, #e6f6ef, #e7f4fa 70%, #f3edff); }
.subject-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.subject-card { min-height: 178px; border: 2px solid #b5dde3; background: var(--teal-soft); color: var(--ink); border-radius: var(--radius-card); box-shadow: var(--shadow-card); justify-content: flex-start; gap: 6px; }
.subject-card span { color: var(--muted); }
.subject-card:not(.subject-coming):hover { background: #d2edf2; border-color: var(--teal); }
.subject-icon { display: inline-grid; place-items: center; width: 52px; height: 52px; margin-bottom: 10px; border-radius: 16px; background: var(--paper); color: var(--teal-dark) !important; font: 800 1.7rem ui-rounded, "Trebuchet MS", sans-serif; }
.subject-coming { background: #f3f3f7; border-color: #e3e3eb; }
.subject-coming .subject-icon { color: #6d7186 !important; }
.prize-card { background: var(--sun-soft); border-color: #efd78f; }
.prize-card .subject-icon { color: #936016 !important; }
.prize-card:not(.subject-coming):hover { background: #ffe9ac; border-color: #bd8a27; }
.grade-card, .game-card { border: 2px solid var(--line); background: var(--paper); }
.grade-card { min-height: 120px; text-decoration: none; color: var(--ink); background: linear-gradient(135deg, var(--paper) 70%, var(--teal-soft)); }
.grade-card:nth-child(4n + 2) { background: linear-gradient(135deg, var(--paper) 70%, var(--sun-soft)); }
.grade-card:nth-child(4n + 3) { background: linear-gradient(135deg, var(--paper) 70%, var(--lilac-soft)); }
.grade-card:nth-child(4n + 4) { background: linear-gradient(135deg, var(--paper) 70%, var(--mint-soft)); }
.grade-card:hover, .game-card:hover { border-color: var(--teal); background-color: #f7fcfc; }
.game-card { border-inline-start: 6px solid var(--teal); }
.game-card.level-locked { border-inline-start-color: #aab9be; background: #f3f6f6; box-shadow: none; }
.topic-title { padding-bottom: 10px; border-bottom: 2px solid var(--line); }
.game-topline, .game-skill { color: var(--teal-dark); }
.progress-dot { background: #dbe9ec; }
.progress-dot.current { background: var(--sun); }
.progress-dot.done { background: var(--teal); }
.answer-button, .build-tile, .number-point { background: #f4fbfb; border-color: #a9d2d9; color: var(--ink); border-radius: var(--radius-control); }
.answer-button:hover:not(:disabled), .build-tile:hover:not(:disabled), .number-point:hover:not(:disabled) { background: #dff2f4; border-color: var(--teal); }
.answer-button.correct, .build-tile.selected, .number-point.correct { background: var(--mint-soft); border-color: #32744f; }
.answer-button.incorrect, .game-feedback.try-again, .form-error { background: var(--coral-soft); }
.game-feedback.hint, .feedback-prompt, .balance { background: var(--sun-soft); }
.game-feedback.correct { background: var(--mint-soft); }
.correct-check { background: var(--mint-soft); }
.card-icon { background: var(--lilac-soft); color: #63569e; }
.empty-state { background: var(--teal-soft); color: var(--muted); }
.small-button { border-radius: 10px; }
.avatar-options input:checked + span { border-color: var(--teal); background: var(--teal-soft); }
@media (max-width: 760px) { .subject-grid { grid-template-columns: 1fr; } .subject-card { min-height: 112px; display: grid; grid-template-columns: 52px 1fr; align-content: center; column-gap: 15px; } .subject-card .subject-icon { grid-row: span 2; margin: 0; } }
@media (max-width: 500px) { .topbar { flex-wrap: wrap; padding: 8px 0; } .topbar .brand { flex: 1 0 60%; } .language-control { margin-inline-start: 0; } .child-hero { align-items: flex-start; } .subject-card { min-height: 104px; } }
@media (prefers-reduced-motion: no-preference) { .subject-card, .grade-card, .game-card, .answer-button { transition: background-color .16s, border-color .16s, transform .16s; } .subject-card:hover:not(.subject-coming), .grade-card:hover, .game-card:hover:not(:disabled) { transform: translateY(-2px); } }
