:root {
  --screen-ink: #153445;
  --screen-teal: #0d6873;
  --screen-teal-dark: #084d59;
  --screen-yellow: #f6c84c;
  --screen-aqua: #64d8ff;
  --screen-mint: #72dec0;
  --screen-coral: #ef7867;
}

html, body { width: 100%; min-width: 320px; min-height: 100%; }
body { margin: 0; color: var(--screen-ink); background: var(--screen-teal); font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif; }
button, input, textarea { font: inherit; letter-spacing: 0; }
.hidden { display: none !important; }

.screen-loading-layer {
  position: fixed;
  z-index: 1000;
  inset: 0;
  display: grid;
  grid-template-columns: 120px minmax(0, 380px);
  place-content: center;
  align-items: center;
  gap: 22px;
  color: #fff;
  background: #102438;
  transition: opacity .25s ease, visibility .25s ease;
}
.screen-loading-layer img { width: 112px; height: 126px; object-fit: contain; }
.screen-loading-layer div { display: grid; gap: 5px; }
.screen-loading-layer strong { color: var(--screen-yellow); font-size: 22px; }
.screen-loading-layer span { color: #c9dce5; }
body:not(.screen-loading) .screen-loading-layer { opacity: 0; visibility: hidden; pointer-events: none; }

.screen-wordmark { display: inline-flex; align-items: center; gap: 10px; color: var(--screen-ink); text-decoration: none; }
.screen-wordmark-mascot { width: 62px; height: 68px; object-fit: contain; object-position: center bottom; }
.screen-wordmark > span { min-width: 0; display: grid; gap: 5px; }
.screen-wordmark b { color: #d99c00; font-size: 29px; font-weight: 950; line-height: .9; }
.screen-wordmark b strong { color: var(--screen-teal); }
.screen-wordmark small { display: flex; align-items: center; gap: 7px; color: #536f79; font-size: 14px; font-weight: 880; line-height: 1.1; white-space: nowrap; }
.screen-wordmark small img { width: 24px; height: 24px; object-fit: cover; border: 1px solid #d9e7e9; border-radius: 50%; }
.screen-wordmark.compact .screen-wordmark-mascot { width: 52px; height: 58px; }
.screen-wordmark.compact b { font-size: 25px; }

.screen-login {
  min-height: 100dvh;
  display: grid;
  grid-template-columns: minmax(0, 1.1fr) minmax(430px, .9fr);
  background: #f7fbfa;
}
.screen-login-brand { min-width: 0; position: relative; overflow: hidden; padding: clamp(24px, 5vw, 70px); color: #fff; background: #123d50; }
.screen-login-brand .screen-wordmark { position: relative; z-index: 2; padding: 8px 12px 8px 5px; background: rgba(255,255,255,.96); border-radius: 8px; }
.screen-login-message { width: min(650px, 70%); position: relative; z-index: 2; margin-top: clamp(70px, 13vh, 150px); }
.screen-login-message > span { color: #9be9d9; font-size: 13px; font-weight: 900; text-transform: uppercase; }
.screen-login-message h1 { margin: 10px 0 18px; color: var(--screen-yellow); font-size: clamp(42px, 5.5vw, 76px); line-height: 1; }
.screen-login-message p { margin: 0; color: #d7e8ec; font-size: 19px; line-height: 1.6; }
.screen-login-mascot { width: min(46vw, 570px); max-height: 76vh; position: absolute; right: clamp(-110px, -4vw, -25px); bottom: -5px; object-fit: contain; object-position: right bottom; filter: drop-shadow(0 20px 24px rgba(0,0,0,.25)); }
.screen-login-form { width: min(470px, calc(100% - 48px)); margin: auto; display: grid; gap: 10px; }
.screen-eyebrow { margin: 0; color: var(--screen-teal); font-size: 12px; font-weight: 900; text-transform: uppercase; }
.screen-login-form h2 { margin: 0 0 18px; font-size: 42px; }
.screen-login-form label { margin-top: 6px; color: #4c6874; font-size: 13px; font-weight: 850; }
.screen-login-form input { width: 100%; min-height: 52px; padding: 12px 14px; color: var(--screen-ink); background: #fff; border: 1px solid #b9ced4; border-radius: 7px; outline: 0; }
.screen-login-form input:focus { border-color: var(--screen-teal); box-shadow: 0 0 0 4px rgba(13,104,115,.12); }
.screen-password-field { position: relative; }
.screen-password-field input { padding-right: 58px; }
.screen-password-field button { width: 48px; height: 48px; position: absolute; top: 2px; right: 2px; padding: 10px; color: #496876; background: transparent; border: 0; }
.screen-password-field svg { width: 100%; height: 100%; fill: none; stroke: currentColor; stroke-width: 1.8; }
.screen-password-field button.is-visible .screen-eye-slash { display: none; }
.screen-primary { min-height: 50px; padding: 12px 18px; display: inline-flex; align-items: center; justify-content: center; gap: 9px; color: #fff; background: var(--screen-teal); border: 1px solid var(--screen-teal-dark); border-radius: 7px; font-weight: 900; }
.screen-primary:hover { background: var(--screen-teal-dark); }
.screen-primary:disabled { opacity: .65; cursor: progress; }
.screen-error { min-height: 20px; margin: 2px 0; color: #b73c35; font-size: 13px; font-weight: 760; }
.screen-signup-link { margin-top: 14px; padding: 15px; display: flex; justify-content: space-between; gap: 12px; background: #e9f7f4; border-radius: 7px; }
.screen-signup-link a, .screen-back-link { color: var(--screen-teal); font-weight: 850; }
.screen-back-link { justify-self: center; margin-top: 10px; font-size: 13px; }

.free-practice { min-height: 100dvh; color: #fff; background: #102438; }
.free-practice-header { min-height: 78px; padding: 8px clamp(18px, 4vw, 60px); display: flex; align-items: center; justify-content: space-between; gap: 20px; background: #fff; }
.free-practice-header > div { display: flex; align-items: center; gap: 10px; }
.free-practice-header > div span { width: 44px; height: 44px; display: grid; place-items: center; color: var(--screen-ink); background: var(--screen-yellow); border-radius: 50%; font-weight: 900; }
.free-practice-header button { min-height: 40px; padding: 8px 12px; color: #506977; background: #f4f8f8; border: 1px solid #cfdee1; border-radius: 6px; font-weight: 800; }
.free-practice-stage { min-height: calc(100dvh - 78px); padding: clamp(30px, 6vw, 84px); display: grid; grid-template-columns: minmax(0, 1.05fr) minmax(380px, .95fr); gap: 60px; align-items: center; }
.free-practice-copy { display: grid; justify-items: start; gap: 20px; }
.free-practice-copy .screen-eyebrow { color: #8fe3d0; }
.free-practice-copy h1 { max-width: 700px; margin: 0; color: var(--screen-yellow); font-size: clamp(48px, 7vw, 92px); line-height: .95; }
.free-practice-copy > p { max-width: 680px; margin: 0; color: #d2e2e8; font-size: 20px; line-height: 1.55; }
.free-practice-copy > a { color: #aee9df; font-weight: 820; }
.free-practice-facts { display: flex; flex-wrap: wrap; gap: 8px; }
.free-practice-facts span { padding: 8px 11px; color: #17344a; background: #fff7d1; border-radius: 5px; font-size: 12px; font-weight: 900; }
.free-practice-copy .screen-primary { min-height: 58px; padding-inline: 24px; color: #17344a; background: var(--screen-yellow); border-color: #e1ac20; font-size: 18px; }
.free-practice-visual { min-height: 620px; position: relative; display: grid; place-items: end center; }
.free-practice-visual > img { width: min(420px, 90%); max-height: 560px; position: relative; z-index: 2; object-fit: contain; filter: drop-shadow(0 20px 25px rgba(0,0,0,.32)); }
.free-speech { width: min(360px, 90%); position: absolute; z-index: 3; top: 20px; left: 0; padding: 18px 20px; color: var(--screen-ink); background: #fff7d1; border: 3px solid var(--screen-yellow); border-radius: 8px; font-weight: 850; line-height: 1.45; }
.free-board { width: 220px; aspect-ratio: 1; position: absolute; right: 0; bottom: 90px; display: grid; grid-template-columns: repeat(3, 1fr); gap: 6px; padding: 10px; background: #0d6873; border: 3px solid var(--screen-aqua); border-radius: 8px; transform: rotate(7deg); }
.free-board i { display: grid; place-items: center; background: #fff; border-radius: 5px; }
.free-board i.star::after { content: "★"; color: var(--screen-yellow); font-size: 34px; text-shadow: 0 0 12px #fff4a8; }

.narha-screen {
  width: 100%;
  min-height: 100dvh;
  padding: clamp(14px, 2vw, 28px);
  display: grid;
  grid-template-rows: minmax(0, 2.25fr) minmax(190px, .72fr);
  gap: clamp(12px, 1.5vw, 20px);
  overflow: hidden;
  color: #fff;
  background: var(--screen-teal);
}
.narha-screen.no-bottom-widgets { grid-template-rows: minmax(0, 1fr); }
.narha-screen-top { min-height: 0; display: grid; grid-template-columns: minmax(280px, .82fr) minmax(0, 2.18fr); gap: clamp(14px, 1.7vw, 24px); }
.narha-screen.no-photos .narha-screen-top { grid-template-columns: minmax(0, 1fr); }
.screen-photo-panel { min-width: 0; min-height: 0; position: relative; overflow: hidden; display: grid; place-items: center; background: #154f58; border: 2px solid rgba(255,255,255,.38); border-radius: 8px; }
.screen-photo-backdrop { position: absolute; inset: -20px; background-position: center; background-size: cover; opacity: .28; filter: blur(12px); transform: scale(1.12); }
.screen-photo-panel > img { width: 100%; height: 100%; position: relative; z-index: 1; object-fit: contain; }
.screen-photo-arrow { width: 46px; height: 58px; position: absolute; z-index: 3; top: 50%; padding: 0; display: grid; place-items: center; color: #fff; background: rgba(8,45,55,.62); border: 1px solid rgba(255,255,255,.4); border-radius: 50%; transform: translateY(-50%); font-size: 38px; }
.screen-photo-arrow.previous { left: 10px; }
.screen-photo-arrow.next { right: 10px; }
.screen-photo-dots { position: absolute; z-index: 3; bottom: 12px; display: flex; gap: 7px; }
.screen-photo-dots i { width: 8px; height: 8px; display: block; background: rgba(255,255,255,.62); border-radius: 50%; }
.screen-photo-dots i.active { width: 11px; height: 11px; background: #fff; }
.screen-clock-panel { min-width: 0; min-height: 0; display: grid; grid-template-rows: auto minmax(0, 1fr) auto auto; align-items: center; justify-items: center; text-align: center; }
.screen-child-bar { width: 100%; min-height: clamp(66px, 7vw, 88px); display: flex; align-items: center; gap: 10px; }
.screen-child-bar > img { width: clamp(62px, 6vw, 82px); height: clamp(68px, 7vw, 88px); object-fit: contain; object-position: center bottom; }
.screen-speech { min-width: 0; position: relative; flex: 1; padding: 12px 16px; color: var(--screen-ink); background: #fff4bf; border-radius: 8px; box-shadow: 0 3px 8px rgba(0,0,0,.14); text-align: left; font-size: clamp(14px, 1.4vw, 20px); font-weight: 900; }
.screen-speech::before { content: ""; position: absolute; top: 50%; left: -12px; border-width: 11px 12px 11px 0; border-style: solid; border-color: transparent #fff4bf transparent transparent; transform: translateY(-50%); }
.screen-child-avatar { width: clamp(54px, 5vw, 66px); aspect-ratio: 1; padding: 0; display: grid; place-items: center; color: var(--screen-ink); background: var(--screen-yellow); border: 3px solid #fff; border-radius: 50%; box-shadow: 0 4px 10px rgba(0,0,0,.2); font-size: clamp(17px, 1.8vw, 23px); font-weight: 950; }
.screen-time { align-self: end; font-size: clamp(108px, 16.5vw, 260px); font-weight: 760; line-height: .85; white-space: nowrap; }
.screen-date { font-size: clamp(31px, 4.3vw, 68px); font-weight: 900; text-transform: lowercase; }
.screen-phrase { width: min(100%, 1160px); min-height: clamp(70px, 11vh, 170px); padding: 10px 24px; display: grid; place-items: center; color: #ffeb3b; font-size: clamp(27px, 3.5vw, 54px); font-weight: 950; line-height: 1.15; }
.screen-widgets { min-height: 0; display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: clamp(10px, 1.4vw, 18px); }
.screen-widget { min-width: 0; min-height: 180px; padding: clamp(16px, 2vw, 24px); display: grid; grid-template-columns: auto minmax(0, 1fr) auto; gap: clamp(12px, 1.4vw, 18px); align-items: center; color: #fff; background: rgba(5,57,66,.63); border: 2px solid rgba(255,255,255,.33); border-radius: 8px; text-align: left; box-shadow: 0 8px 22px rgba(0,0,0,.12); }
.screen-widget:hover { border-color: #fff; background: rgba(5,57,66,.8); transform: translateY(-2px); }
.screen-widget-icon { width: clamp(50px, 5vw, 72px); aspect-ratio: 1; display: grid; place-items: center; color: var(--screen-aqua); background: rgba(255,255,255,.11); border-radius: 50%; }
.screen-widget-icon svg { width: 62%; fill: none; stroke: currentColor; stroke-width: 3; stroke-linecap: round; stroke-linejoin: round; }
.checklist-widget .screen-widget-icon { color: var(--screen-mint); }
.challenge-widget .screen-widget-icon { color: var(--screen-yellow); }
.screen-widget > span:nth-child(2) { min-width: 0; display: grid; gap: 3px; }
.screen-widget small { color: #bce0e6; font-size: clamp(11px, .9vw, 14px); font-style: normal; font-weight: 800; text-transform: uppercase; }
.screen-widget strong { overflow: hidden; font-size: clamp(22px, 2.2vw, 34px); text-overflow: ellipsis; white-space: nowrap; }
.screen-widget em { overflow: hidden; color: #fff; font-size: clamp(13px, 1.15vw, 18px); font-style: normal; line-height: 1.35; text-overflow: ellipsis; }
.screen-widget > b { min-width: 48px; min-height: 48px; padding: 8px; display: grid; place-items: center; color: var(--screen-ink); background: var(--screen-yellow); border-radius: 50%; font-size: 16px; }
.screen-widget > b.hidden { display: none; }
.chat-widget > b { color: #fff; background: var(--screen-coral); }

.screen-panel-dialog { width: min(1180px, calc(100% - 24px)); height: min(780px, calc(100dvh - 24px)); max-height: calc(100dvh - 24px); padding: 0; overflow: hidden; color: #fff; background: #102438; border: 1px solid #6b92a8; border-radius: 8px; box-shadow: inset 0 7px 0 var(--screen-yellow), 0 24px 60px rgba(3,12,20,.42); }
.screen-panel-dialog::backdrop { background: rgba(3,14,22,.88); }
.screen-panel-shell { height: 100%; min-height: 0; display: grid; grid-template-rows: auto minmax(0, 1fr); }
.screen-panel-shell > header { min-height: 84px; padding: 18px 22px; display: flex; justify-content: space-between; gap: 20px; align-items: center; border-bottom: 1px solid rgba(255,255,255,.13); }
.screen-panel-shell > header p { margin: 0; color: #8ec5ff; font-size: 11px; font-weight: 900; text-transform: uppercase; }
.screen-panel-shell > header h2 { margin: 3px 0 0; color: var(--screen-yellow); font-size: 30px; }
.screen-panel-shell > header button { width: 44px; height: 44px; padding: 0; color: #fff; background: #24384b; border: 1px solid #6c859a; border-radius: 50%; font-size: 26px; }
.screen-panel-content { min-height: 0; overflow: auto; padding: 22px; }
.screen-empty { min-height: 300px; display: grid; place-items: center; align-content: center; gap: 10px; color: #c4d9e2; text-align: center; }
.screen-empty img { width: 110px; height: 125px; object-fit: contain; }

.routine-list { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 16px; }
.routine-card { min-width: 0; padding: 18px; display: grid; gap: 14px; color: #fff; background: #17384b; border: 2px solid #4e7183; border-radius: 8px; text-align: left; box-shadow: 0 12px 24px rgba(0,0,0,.16); }
.routine-card:hover, .routine-card:focus-visible { border-color: var(--screen-mint); background: #1b4257; transform: translateY(-2px); }
.routine-card.night:hover, .routine-card.night:focus-visible { border-color: var(--screen-aqua); }
.routine-card header { display: grid; grid-template-columns: 52px minmax(0, 1fr) auto; gap: 12px; align-items: center; }
.routine-moment-icon { width: 52px; height: 52px; display: grid; place-items: center; color: #17344a; background: var(--screen-yellow); border-radius: 50%; }
.routine-card.night .routine-moment-icon { color: #fff; background: #3979a4; }
.routine-moment-icon svg { width: 30px; height: 30px; fill: none; stroke: currentColor; stroke-width: 2.2; stroke-linecap: round; stroke-linejoin: round; }
.routine-card h3 { margin: 0; color: #fff; font-size: 22px; line-height: 1.15; }
.routine-card p { margin: 4px 0 0; color: #bcd3dc; font-size: 13px; }
.routine-card header b { color: var(--screen-yellow); font-size: 25px; }
.routine-card.night header b { color: #9fdcff; }
.routine-preview { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 8px; }
.routine-preview > span { min-width: 0; position: relative; overflow: hidden; aspect-ratio: 1; background: #fff; border: 2px solid rgba(255,255,255,.42); border-radius: 7px; }
.routine-preview img { width: 100%; height: 100%; display: block; object-fit: cover; }
.routine-preview i { width: 24px; height: 24px; position: absolute; top: 5px; right: 5px; display: grid; place-items: center; color: #fff; background: rgba(12,87,70,.92); border-radius: 50%; font-style: normal; font-weight: 950; opacity: 0; }
.routine-preview .done i { opacity: 1; }
.routine-progress { height: 11px; overflow: hidden; background: #dfe9eb; border-radius: 999px; }
.routine-progress i { height: 100%; display: block; background: var(--screen-mint); border-radius: inherit; }
.routine-card footer { min-width: 0; display: flex; justify-content: space-between; gap: 12px; align-items: center; color: #c5dae2; font-size: 13px; font-weight: 760; }
.routine-card footer strong { color: var(--screen-yellow); white-space: nowrap; }
.routine-detail-toolbar { margin-bottom: 16px; display: grid; grid-template-columns: auto auto minmax(160px, 1fr); gap: 14px; align-items: center; }
.routine-detail-toolbar > div:first-of-type { display: flex; gap: 7px; align-items: baseline; }
.routine-detail-toolbar > div:first-of-type span { color: #b9cfda; font-size: 13px; }
.routine-detail-toolbar .routine-progress { max-width: 520px; }
.routine-items { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 14px; }
.routine-item { min-width: 0; position: relative; overflow: hidden; display: grid; grid-template-rows: auto minmax(70px, auto); color: var(--screen-ink); background: #fff; border: 2px solid #bfd2d8; border-radius: 8px; }
.routine-item.completed { background: #e6f7f0; border-color: #74c9ad; }
.routine-pictogram { width: 100%; min-width: 0; aspect-ratio: 1; position: relative; overflow: hidden; padding: 0; display: block; background: #e8f1f2; border: 0; border-bottom: 1px solid #c9d9dc; border-radius: 0; }
button.routine-pictogram { cursor: pointer; }
button.routine-pictogram:hover img { transform: scale(1.025); }
.routine-pictogram img { width: 100%; height: 100%; display: block; object-fit: cover; transition: transform .18s ease; }
.routine-play-badge { width: 44px; height: 44px; position: absolute; left: 10px; bottom: 10px; display: grid; place-items: center; color: #17344a; background: var(--screen-yellow); border: 3px solid #fff; border-radius: 50%; box-shadow: 0 4px 10px rgba(0,0,0,.2); }
.routine-play-badge svg { width: 22px; height: 22px; fill: currentColor; stroke: currentColor; }
.routine-check { width: 44px; height: 44px; position: absolute; z-index: 2; top: 9px; right: 9px; padding: 0; display: grid; place-items: center; color: var(--screen-teal); background: rgba(255,255,255,.94); border: 3px solid #799da8; border-radius: 50%; box-shadow: 0 3px 9px rgba(0,0,0,.18); font-size: 23px; font-weight: 950; }
.routine-item.completed .routine-check { color: #fff; background: #2ca67f; border-color: #2ca67f; }
.routine-item-copy { min-width: 0; padding: 13px 14px 15px; text-align: center; }
.routine-item-copy strong { display: block; font-size: 17px; line-height: 1.2; }
.routine-item-copy small { display: block; margin-top: 3px; color: #687e88; }
.panel-back { min-height: 40px; padding: 8px 12px; color: #fff; background: transparent; border: 1px solid #70889b; border-radius: 6px; font-weight: 820; }

.kid-chat { height: 100%; min-height: 0; display: grid; grid-template-columns: 270px minmax(0, 1fr); overflow: hidden; border: 1px solid rgba(255,255,255,.14); border-radius: 8px; }
.kid-chat-presets { min-height: 0; overflow: auto; padding: 14px; display: grid; align-content: start; gap: 18px; background: #173248; }
.kid-chat-presets section { display: grid; gap: 7px; }
.kid-chat-presets h3 { margin: 0 0 3px; color: #b8d8e4; font-size: 12px; text-transform: uppercase; }
.kid-chat-presets button { min-height: 48px; padding: 9px 10px; display: grid; grid-template-columns: 32px 1fr; gap: 8px; align-items: center; color: #fff; background: #24485c; border: 1px solid #557488; border-radius: 7px; text-align: left; font-weight: 800; }
.kid-chat-presets button.alert { color: #2d2521; background: #ffd36e; border-color: #e8ae28; }
.kid-chat-presets button b { width: 30px; height: 30px; display: grid; place-items: center; background: rgba(255,255,255,.24); border-radius: 50%; }
.kid-chat-flow { min-width: 0; min-height: 0; display: grid; grid-template-rows: minmax(0, 1fr) auto; background: #eaf3f1; }
.kid-chat-messages { min-height: 0; overflow: auto; padding: 18px; display: flex; flex-direction: column; gap: 8px; }
.kid-message { max-width: min(78%, 590px); padding: 10px 12px; align-self: flex-start; color: #17344a; background: #fff; border-radius: 4px 8px 8px 8px; box-shadow: 0 1px 3px rgba(0,0,0,.1); }
.kid-message.mine { align-self: flex-end; background: #fff2ac; border-radius: 8px 4px 8px 8px; }
.kid-message.alert { border-left: 5px solid var(--screen-coral); }
.kid-message p { margin: 0; white-space: pre-wrap; line-height: 1.4; }
.kid-message small { margin-top: 4px; display: block; color: #70818a; text-align: right; }
.kid-chat-composer { padding: 10px; display: grid; grid-template-columns: minmax(0, 1fr) 52px; gap: 8px; background: #fff; border-top: 1px solid #cadbdc; }
.kid-chat-composer textarea { min-width: 0; min-height: 48px; max-height: 110px; padding: 12px; resize: none; color: var(--screen-ink); background: #f4f8f8; border: 1px solid #b9ced4; border-radius: 7px; }
.kid-chat-composer button { width: 52px; height: 52px; padding: 0; display: grid; place-items: center; color: #fff; background: var(--screen-teal); border: 0; border-radius: 50%; font-size: 23px; }

.challenge-panel { min-height: 100%; display: grid; grid-template-columns: minmax(280px, .72fr) minmax(0, 1.28fr); gap: 20px; }
.challenge-hero { min-height: 430px; padding: 28px; display: grid; place-items: center; align-content: center; gap: 11px; color: var(--screen-ink); background: #fff7d1; border: 3px solid var(--screen-yellow); border-radius: 8px; text-align: center; }
.challenge-flag { width: 82px; height: 82px; display: grid; place-items: center; color: var(--screen-teal); background: #fff; border-radius: 50%; }
.challenge-flag svg { width: 56px; height: 56px; fill: none; stroke: currentColor; stroke-width: 4; stroke-linecap: round; stroke-linejoin: round; }
.challenge-hero .challenge-eyebrow { margin: 0; color: #8b6810; font-size: 12px; font-weight: 950; text-transform: uppercase; }
.challenge-hero h3 { max-width: 380px; margin: 0; font-size: 32px; line-height: 1.08; }
.challenge-streak { display: flex; gap: 10px; align-items: end; }
.challenge-streak strong { color: var(--screen-teal); font-size: 76px; line-height: .9; }
.challenge-streak span { max-width: 70px; padding-bottom: 5px; color: #526d76; font-weight: 900; line-height: 1.05; text-align: left; }
.challenge-hero .challenge-message { max-width: 330px; margin: 4px 0 0; color: #657881; line-height: 1.45; }
.challenge-progress-panel { min-width: 0; display: grid; align-content: center; gap: 18px; }
.challenge-progress-panel > header { display: flex; justify-content: space-between; gap: 20px; align-items: end; }
.challenge-progress-panel > header span { color: #9cc3d3; font-size: 12px; font-weight: 900; text-transform: uppercase; }
.challenge-progress-panel > header h3 { margin: 3px 0 0; color: #fff; font-size: 27px; }
.challenge-progress-panel > header b { color: var(--screen-yellow); font-size: 13px; }
.challenge-week { align-content: center; display: grid; grid-template-columns: repeat(7, minmax(0, 1fr)); gap: 8px; }
.challenge-day { min-width: 0; min-height: 136px; display: grid; place-items: center; align-content: center; gap: 8px; background: rgba(255,255,255,.08); border: 1px solid rgba(255,255,255,.23); border-radius: 8px; }
.challenge-day span { color: #bcd1da; font-size: 12px; font-weight: 900; text-transform: uppercase; }
.challenge-day b { font-size: 25px; }
.challenge-day small { min-height: 14px; color: #9fc0cc; font-size: 10px; font-weight: 850; }
.challenge-day.today { border: 2px solid var(--screen-yellow); }
.challenge-day.today small { color: var(--screen-yellow); }
.challenge-day.done { color: #153d32; background: var(--screen-mint); border-color: #a9f0da; }
.challenge-day.done span, .challenge-day.done small { color: #245f52; }
.challenge-companion { min-height: 118px; padding: 10px 18px 10px 8px; display: grid; grid-template-columns: 92px minmax(0, 1fr); gap: 8px; align-items: center; color: var(--screen-ink); background: #fff; border-left: 7px solid var(--screen-yellow); border-radius: 7px; }
.challenge-companion img { width: 88px; height: 100px; object-fit: contain; object-position: center bottom; }
.challenge-companion p { margin: 0; line-height: 1.4; }

.profile-panel { display: grid; grid-template-columns: 260px minmax(0, 1fr); gap: 22px; }
.profile-identity { min-height: 420px; padding: 24px; display: grid; place-items: center; align-content: center; gap: 12px; color: var(--screen-ink); background: #fff; border-radius: 8px; text-align: center; }
.profile-identity .screen-child-avatar { width: 100px; font-size: 32px; }
.profile-identity h3 { margin: 0; font-size: 29px; }
.profile-identity p { margin: 0; color: #687f89; }
.profile-identity button { min-height: 42px; padding: 9px 13px; color: #fff; background: #173248; border: 0; border-radius: 6px; font-weight: 850; }
.profile-metrics { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 12px; align-content: start; }
.profile-metric { min-height: 132px; padding: 18px; display: grid; align-content: center; gap: 4px; background: rgba(255,255,255,.09); border: 1px solid rgba(255,255,255,.2); border-radius: 8px; }
.profile-metric strong { color: var(--screen-yellow); font-size: 37px; }
.profile-metric span { color: #d7e5ea; }
.profile-note { grid-column: 1 / -1; padding: 20px; color: #fff; background: rgba(255,244,191,.1); border-left: 5px solid var(--screen-yellow); border-radius: 6px; font-size: 19px; line-height: 1.45; }

.screen-toast { min-width: 220px; max-width: min(440px, calc(100% - 30px)); position: fixed; z-index: 1200; left: 50%; bottom: 22px; padding: 12px 16px; color: #fff; background: #173248; border: 1px solid #7590a0; border-radius: 7px; box-shadow: 0 12px 30px rgba(0,0,0,.25); text-align: center; font-weight: 800; opacity: 0; pointer-events: none; transform: translate(-50%, 12px); transition: .18s ease; }
.screen-toast.visible { opacity: 1; transform: translate(-50%, 0); }

@media (orientation: portrait), (max-width: 820px) {
  .screen-loading-layer { grid-template-columns: 78px minmax(0, 250px); padding: 20px; }
  .screen-loading-layer img { width: 74px; height: 86px; }
  .screen-login { grid-template-columns: 1fr; }
  .screen-login-brand { min-height: 360px; padding: 22px; }
  .screen-login-message { width: 68%; margin-top: 45px; }
  .screen-login-message h1 { font-size: clamp(34px, 10vw, 54px); }
  .screen-login-message p { font-size: 15px; }
  .screen-login-mascot { width: 63vw; right: -14vw; }
  .screen-login-form { padding: 36px 0 50px; }
  .free-practice-stage { grid-template-columns: 1fr; gap: 20px; }
  .free-practice-visual { min-height: 430px; }
  .free-practice-visual > img { max-height: 390px; }
  .narha-screen { min-height: 100dvh; grid-template-rows: minmax(0, 1.85fr) minmax(0, 1.15fr); overflow: auto; }
  .narha-screen-top { grid-template-columns: 1fr; grid-template-rows: minmax(260px, .82fr) minmax(400px, 1.18fr); }
  .narha-screen.no-photos .narha-screen-top { grid-template-rows: minmax(520px, 1fr); }
  .screen-time { font-size: clamp(92px, 29vw, 190px); }
  .screen-date { font-size: clamp(27px, 7vw, 46px); }
  .screen-phrase { min-height: 90px; font-size: clamp(23px, 6vw, 38px); }
  .screen-widgets { grid-template-columns: 1fr; }
  .screen-widget { min-height: 130px; }
  .routine-list { grid-template-columns: 1fr; }
  .routine-items { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .routine-detail-toolbar { grid-template-columns: auto minmax(0, 1fr); }
  .routine-detail-toolbar .routine-progress { grid-column: 1 / -1; max-width: none; }
  .kid-chat { grid-template-columns: 1fr; grid-template-rows: auto minmax(0, 1fr); }
  .kid-chat-presets { overflow-x: auto; display: flex; }
  .kid-chat-presets section { min-width: 220px; }
  .challenge-panel, .profile-panel { grid-template-columns: 1fr; }
  .challenge-hero { min-height: 320px; }
  .challenge-week { grid-template-columns: repeat(4, minmax(0, 1fr)); }
  .profile-metrics { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}

@media (max-width: 520px) {
  .screen-wordmark-mascot { width: 48px; height: 54px; }
  .screen-wordmark b { font-size: 23px; }
  .screen-wordmark small { font-size: 11px; }
  .screen-login-brand { min-height: 330px; }
  .screen-login-message { width: 78%; }
  .screen-login-mascot { opacity: .75; }
  .screen-signup-link { align-items: flex-start; flex-direction: column; }
  .free-practice-header { align-items: flex-start; }
  .free-practice-header > div { align-items: flex-end; flex-direction: column; }
  .free-practice-stage { padding: 28px 18px; }
  .free-practice-copy h1 { font-size: 45px; }
  .free-practice-visual { min-height: 380px; }
  .free-board { width: 150px; }
  .narha-screen { padding: 10px; gap: 10px; }
  .narha-screen-top { grid-template-rows: 220px minmax(390px, 1fr); }
  .screen-child-bar > img { width: 56px; height: 64px; }
  .screen-speech { padding: 9px 10px; font-size: 12px; }
  .screen-child-avatar { width: 48px; }
  .screen-widget { grid-template-columns: 45px minmax(0, 1fr) 42px; padding: 13px; }
  .screen-widget strong { font-size: 23px; }
  .screen-widget em { font-size: 13px; }
  .screen-panel-dialog { width: calc(100% - 10px); height: calc(100dvh - 10px); max-height: calc(100dvh - 10px); }
  .screen-panel-content { padding: 12px; }
  .routine-card { padding: 13px; }
  .routine-card header { grid-template-columns: 44px minmax(0, 1fr) auto; gap: 9px; }
  .routine-moment-icon { width: 44px; height: 44px; }
  .routine-card h3 { font-size: 18px; }
  .routine-card header b { font-size: 20px; }
  .routine-items { grid-template-columns: 1fr; }
  .routine-item { min-height: 108px; grid-template-columns: 108px minmax(0, 1fr); grid-template-rows: 108px; }
  .routine-pictogram { height: 108px; aspect-ratio: auto; border-right: 1px solid #c9d9dc; border-bottom: 0; }
  .routine-item-copy { align-self: center; padding: 12px 48px 12px 12px; text-align: left; }
  .routine-item-copy strong { font-size: 16px; }
  .routine-item-copy small { font-size: 11px; }
  .routine-check { width: 38px; height: 38px; top: 9px; right: 9px; }
  .routine-play-badge { width: 36px; height: 36px; left: 7px; bottom: 7px; }
  .challenge-week { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .challenge-progress-panel > header { align-items: start; flex-direction: column; }
  .challenge-companion { grid-template-columns: 76px minmax(0, 1fr); }
  .challenge-companion img { width: 72px; height: 86px; }
  .profile-metrics { grid-template-columns: 1fr; }
}
