/* account-membership.css */
/* Membership is part of account settings; color is reserved for small cues. */
.membership-panel { margin-top: 24px; color: #20242e; font-size: 14px; }
.membership-panel .membership-label { font-size: 13px; font-weight: 500; color: #646b78; margin: 0 0 12px; }
.membership-panel .account-summary { padding: 20px; border: 1px solid #d9e6fa; border-top: 3px solid #efb52e; background: #fff; border-radius: 16px; }
.membership-panel .account-summary strong { font-size: 20px; }
.membership-panel p { line-height: 1.7; }
.membership-panel .account-summary p { color: #646b78; margin: 10px 0 0; }
.membership-panel .subscription-summary, .membership-panel .plan, .membership-panel .mini-checkout { margin-top: 16px; padding: 20px; border: 1px solid #dbe2ed; border-radius: 16px; background: #fff; }
.membership-panel h2 { margin: 0 0 12px; font-size: 17px; }
.membership-panel .price { margin: 0; font-size: 32px; font-weight: 700; }
.membership-panel .price small { font-size: 13px; font-weight: 400; }
.membership-panel .small { font-size: 13px; color: #646b78; }
.membership-panel .actions { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 16px; }
.membership-panel button, .membership-panel .button { padding: 12px 16px; min-height: 44px; border: 0; border-radius: 12px; font: inherit; font-weight: 600; background: #1767e8; color: #fff; cursor: pointer; text-decoration: none; }
.membership-panel button:disabled { opacity: .55; cursor: wait; }
.membership-panel .secondary { background: #edf4ff; color: #1767e8; }
.membership-panel .mini-checkout { text-align: center; }
.membership-panel .mini-checkout img { display: block; width: min(100%, 240px); height: auto; margin: 12px auto; }
.membership-panel .notice { background: #fff7db; padding: 14px; border-radius: 12px; }
.membership-panel summary { cursor: pointer; color: #1767e8; padding: 12px 0; }
.membership-panel li { padding: 10px 0; line-height: 1.7; }
.account-more { margin-top: 24px; color: #646b78; font-size: 13px; }
.account-more summary { cursor: pointer; padding: 12px 0; }
.account-more button { margin-top: 8px; min-height: 44px; border: 1px solid #e5e9ef; border-radius: 12px; background: #fff; color: #646b78; padding: 10px 16px; cursor: pointer; }
.membership-panel :focus-visible, .account-more :focus-visible { outline: 3px solid #efb52e; outline-offset: 3px; }

/* reading-tutorial.css */
.reading-tutorial {
  position: absolute;
  left: 0;
  right: 0;
  bottom: calc(100% + 10px);
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  align-items: end;
  gap: inherit;
  color: #20242e;
  text-align: center;
  pointer-events: none;
}

.reading-tutorial p {
  --tooltip-background: #e3f1ec;
  position: relative;
  margin: 0;
  padding: 10px 8px;
  border-radius: 12px;
  background: var(--tooltip-background);
  font: 500 13px/1.4 system-ui;
}

.reading-tutorial p + p {
  --tooltip-background: #fbefd9;
}

.reading-tutorial p::after {
  content: "";
  position: absolute;
  bottom: -7px;
  left: calc(50% - 7px);
  border-left: 7px solid transparent;
  border-right: 7px solid transparent;
  border-top: 7px solid var(--tooltip-background);
}

.word-stage.has-reading-tutorial .carousel-window {
  min-height: 430px;
}

.word-stage.has-reading-tutorial .word-slide[data-carousel-slot="current"] .word-card {
  padding-bottom: clamp(196px, 28vh, 224px);
}

/* styles.css */
:root {
  color-scheme: light;
  --background: #fcfcfd;
  --surface: #ffffff;
  --surface-soft: rgba(255, 255, 255, 0.72);
  --ink: #20242e;
  --muted: #777b84;
  --line: rgba(32, 34, 41, 0.09);
  --teal: #168b85;
  --teal-dark: #08736d;
  --rose: #c76369;
  --card-shadow: 0 12px 30px rgba(32, 36, 46, 0.07), 0 2px 5px rgba(32, 36, 46, 0.04);
  --reader-red: #e52521;
  --reader-blue: #1767e8;
  --reader-gold: #efb52e;
  --reader-blue-soft: #edf4ff;
  --practice-carousel-height: clamp(340px, calc(100dvh - 210px), 650px);
  --practice-word-font: "Comic Sans MS", "Comic Sans", "Comic Neue", "Chalkboard SE", "Marker Felt", "Bradley Hand", cursive;
  font-family: ui-rounded, "SF Pro Rounded", "Avenir Next Rounded", system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}

* {
  box-sizing: border-box;
}

html,
body {
  width: 100%;
  min-height: 100%;
  margin: 0;
}

body {
  background: var(--background);
  color: var(--ink);
}

body.has-info-open,
body.has-onboarding-open,
body.has-round-celebration {
  overflow: hidden;
}

button {
  border: 0;
  font: inherit;
  color: inherit;
  -webkit-tap-highlight-color: transparent;
}

.practice-view button {
  touch-action: manipulation;
}

.app {
  width: 100%;
  min-height: 100dvh;
  display: grid;
  grid-template-rows: auto minmax(0, 1fr);
  gap: 14px;
  padding: calc(env(safe-area-inset-top) + 62px) 18px calc(env(safe-area-inset-bottom) + 18px);
  background: var(--background);
}

.app-header {
  width: fit-content;
  position: fixed;
  right: max(18px, calc((100vw - 394px) / 2));
  top: calc(env(safe-area-inset-top) + 8px);
  z-index: 30;
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 8px;
  max-width: calc(100vw - 36px);
  padding: 2px;
  border-radius: 10px;
  background: transparent;
  backdrop-filter: blur(10px);
}

.summary-date,
.section-heading span,
.today-kpi span,
.progress-copy span,
.recent-meta,
.recent-time {
  margin: 0;
  color: var(--muted);
  font-size: 12px;
  font-weight: 760;
  letter-spacing: 0;
}

.section-heading h2 {
  margin: 0;
  letter-spacing: 0;
}

.view-tabs {
  flex: 0 0 auto;
  width: 112px;
}

.view-toggle {
  position: relative;
  isolation: isolate;
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  align-items: center;
  width: 100%;
  min-height: 44px;
  padding: 4px;
  border-radius: 10px;
  background: rgba(255, 255, 255, .36);
  box-shadow: inset 0 0 0 1px var(--line);
  color: var(--muted);
  font-size: 11px;
  font-weight: 750;
  cursor: pointer;
  touch-action: manipulation;
}

.view-toggle::before {
  content: "";
  position: absolute;
  z-index: -1;
  top: 4px;
  bottom: 4px;
  left: 4px;
  width: calc((100% - 8px) / 2);
  border-radius: 7px;
  background: var(--surface);
  box-shadow: 0 1px 4px rgba(32, 36, 46, 0.08);
  transition: transform 160ms ease;
}

.view-toggle::after {
  content: "";
  position: absolute;
  bottom: 7px;
  left: calc(25% - 1px);
  width: 5px;
  height: 5px;
  border-radius: 50%;
  background: var(--reader-red);
  pointer-events: none;
  transition: left 160ms ease;
}
.view-toggle[aria-checked="true"]::before { transform: translateX(100%); }
.view-toggle[aria-checked="true"]::after { left: calc(75% - 4px); }
.view-toggle[aria-checked="false"] span:first-child,
.view-toggle[aria-checked="true"] span:last-child { color: var(--ink); }
.view-toggle:focus-visible { outline: 3px solid var(--reader-blue); outline-offset: 3px; }

@media (prefers-reduced-motion: reduce) {
  .view-toggle::before, .view-toggle::after { transition: none; }
}

.view-panel[hidden] {
  display: none;
}

[hidden], .word-stage[hidden] { display: none !important; }
.reading-toolbar, .reading-summary { color: var(--muted); font-size: 13px; line-height: 1.5; }
.reading-toolbar { display: flex; align-items: center; justify-content: flex-end; gap: 12px; padding: 8px 4px; }
.reading-toolbar button, .reading-summary button { background: transparent; color: var(--teal-dark); padding: 8px; font-size: 13px; }
.practice-view:has(.reading-toolbar:not([hidden])) { grid-template-rows: auto minmax(0, 1fr); }
.reading-panel { align-self: center; text-align: center; padding: 20px 16px; max-height: calc(100dvh - 130px); overflow: auto; border-radius: 16px; background: var(--surface); }
.reading-panel h2 { font-size: 24px; margin: 14px 0; }
.reading-panel h3 { font-size: 15px; margin: 22px 0 10px; }
.reading-panel p { font-size: 14px; line-height: 1.65; }
.reading-star { display: block; font-size: 48px; color: var(--teal); }
.reading-muted { color: var(--muted); font-size: 12px; line-height: 1.7; }
.reading-choice { min-height: 44px; padding: 12px 16px; border-radius: 8px; font-size: 16px; color: var(--teal-dark); background: rgba(22,139,133,.09); }
.reading-panel > .reading-choice { margin-top: 16px; }
.reading-panel.pattern-lesson {
  display: grid;
  grid-template-rows: auto 1fr auto;
  gap: clamp(12px, 2.5dvh, 22px);
  min-height: min(calc(var(--practice-carousel-height) * .86), calc(100dvh - 130px));
  margin-block: calc(var(--practice-carousel-height) * .07) 0;
  padding: clamp(18px, 3dvh, 28px) clamp(18px, 5vw, 28px) clamp(24px, 3.8dvh, 34px);
}
.pattern-lesson .pattern-lesson-eyebrow { margin: 0; color: var(--muted); font-size: 13px; font-weight: 760; }
.pattern-lesson-content { display: grid; align-content: center; gap: clamp(12px, 2dvh, 18px); min-width: 0; }
.pattern-lesson .pattern-lesson-example {
  --word-size: clamp(52px, 16vw, 86px);
  display: grid;
  gap: clamp(10px, 1.7dvh, 16px);
}
.pattern-lesson-word { display: block; white-space: nowrap; }
.pattern-lesson-word.is-long-word { font-size: clamp(34px, 10vw, 52px); }
.pattern-lesson .pattern-lesson-caption { max-width: 29ch; margin: 0 auto; color: var(--muted); font-size: 14px; line-height: 1.55; }
.pattern-lesson-next .attempt-icon { color: var(--reader-red); }
.pattern-lesson-repeat .attempt-icon { color: var(--reader-blue); }
.pattern-lesson-action.pattern-lesson-next { background: var(--reader-blue-soft); color: var(--ink); }
@media (max-width: 350px) {
  .pattern-lesson-controls .pattern-lesson-action { gap: 5px; }
  .pattern-lesson-action .attempt-icon { font-size: 20px; }
}
.reading-choices { display: grid; gap: 8px; }
.reading-summary { padding: 18px; margin-bottom: 20px; background: var(--surface); border-radius: 12px; }
.reading-summary > div { display: flex; align-items: center; justify-content: space-between; gap: 8px; }
.reading-summary h2 { font-size: 17px; margin: 0; color: var(--ink); }
.reading-summary p { margin: 10px 0 0; }
/* Parent controls use the same quiet surfaces and blue accent as the reader overview. */
.practice-settings-card { margin: 20px 0; padding: 22px; border-radius: 20px; background: var(--surface); }
.parent-account-header { width: 100%; min-width: 0; display: flex; align-items: center; gap: 14px; margin: 0 0 20px; padding: 12px 4px 16px; border-radius: 18px; background: transparent; text-align: left; cursor: pointer; }
.parent-account-header:focus-visible { outline: 3px solid var(--reader-blue); outline-offset: 3px; }
.parent-account-header:hover { background: #edf4ff80; }
.parent-account-avatar { width: 64px; height: 64px; flex: 0 0 64px; border: 3px solid var(--surface); border-radius: 50%; overflow: hidden; display: grid; place-items: center; background: var(--reader-blue-soft); color: var(--parent-accent); font-size: 26px; font-weight: 700; }
.parent-account-avatar img { width: 100%; height: 100%; object-fit: cover; }
.parent-account-label { flex: 1; min-width: 0; }
.parent-account-label strong { display: block; margin: 0; font-size: clamp(20px, 5.5vw, 25px); line-height: 1.25; letter-spacing: -.5px; overflow: hidden; white-space: nowrap; text-overflow: ellipsis; }
.parent-account-label > span { display: block; margin-top: 7px; font-size: 12px; line-height: 1.5; color: var(--parent-secondary); }
.parent-account-chevron { flex: 0 0 auto; font-size: 29px; font-weight: 400; color: var(--parent-secondary); padding: 0 4px; }
.parent-account-details { width: min(420px, calc(100% - 28px)); max-height: calc(100dvh - 40px); overflow: auto; padding: 24px; border: 1px solid var(--line); border-radius: 24px; color: var(--ink); background: var(--surface); box-shadow: var(--card-shadow); }
.parent-account-details::backdrop { background: #20222966; }
.parent-account-details-heading { display: flex; align-items: center; justify-content: space-between; gap: 12px; }
.parent-account-details-heading h2 { margin: 0; font-size: 21px; }
.parent-account-details-heading button { min-width: 44px; min-height: 44px; border-radius: 50%; background: var(--parent-fill); cursor: pointer; font-size: 25px; }
.parent-account-language { display: grid; grid-template-columns: minmax(0, 1fr) auto; align-items: center; gap: 12px; margin: 12px 0 16px; padding: 6px 8px 6px 12px; border-radius: 12px; background: var(--parent-fill); font-size: 14px; font-weight: 700; }
.parent-language { display: flex; padding: 3px; border-radius: 10px; background: var(--reader-blue-soft); }
.parent-language button { min-height: 44px; padding: 7px 10px; border-radius: 8px; background: transparent; color: var(--parent-secondary); font-size: 12px; font-weight: 700; cursor: pointer; }
.parent-language button[aria-pressed="true"] { background: var(--surface); color: var(--parent-accent); box-shadow: 0 2px 7px rgba(32, 56, 50, .1); }
.parent-language button:focus-visible { outline: 3px solid var(--reader-blue); outline-offset: 2px; }
.parent-account-details > p { margin: 12px 0; font-size: 14px; line-height: 1.6; color: var(--parent-secondary); overflow-wrap: anywhere; }
.parent-account-details > .parent-account-full-name { color: var(--ink); font-size: 18px; font-weight: 700; }
.parent-account-actions { display: grid; gap: 10px; margin-top: 20px; font-size: 14px; }
.parent-account-actions button, .parent-account-actions a { min-height: 44px; padding: 12px 16px; border: 1px solid var(--parent-divider); border-radius: 12px; background: transparent; color: var(--parent-accent); font: inherit; text-align: center; text-decoration: none; cursor: pointer; }
.parent-account-actions #accountSignIn { background: var(--reader-blue); color: #fff; border-color: var(--reader-blue); }
.practice-settings-heading { display: flex; align-items: center; justify-content: space-between; gap: 12px; }
.practice-settings-heading h2 { margin: 0; font-size: 19px; letter-spacing: -.4px; }
.practice-settings-heading button { min-height: 44px; padding: 8px 14px; border-radius: 9px; background: var(--reader-blue-soft); color: var(--parent-accent); font-size: 13px; font-weight: 650; cursor: pointer; }
.practice-settings-intro { margin: 7px 0 18px; color: #5c6268; font-size: 13px; line-height: 1.6; }
.practice-settings-values { margin: 0; }
.practice-settings-values > div { display: flex; align-items: baseline; justify-content: space-between; gap: 16px; padding: 11px 0; border-top: 1px solid var(--line); font-size: 13px; line-height: 1.5; }
.practice-settings-values dt { color: #52595d; }
.practice-settings-values dd { margin: 0; text-align: right; color: var(--ink); font-weight: 600; max-width: 60%; }
.practice-settings-plan { margin: 14px 0 0; padding: 12px; border-radius: 9px; background: var(--parent-fill); color: var(--parent-accent); font-size: 12px; line-height: 1.6; }
.practice-settings-saved { font-size: 12px; line-height: 1.6; color: var(--parent-accent); }
.reading-settings { width: min(460px, calc(100% - 24px)); max-height: calc(100dvh - 32px); overflow: auto; border: 1px solid var(--line); border-radius: 22px; padding: 24px; color: var(--ink); background: var(--surface); box-shadow: 0 30px 80px #0003; }
.reading-settings::backdrop { background: #20222966; backdrop-filter: blur(4px); }
.visually-hidden { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip-path: inset(50%); white-space: nowrap; border: 0; }
.practice-settings-eyebrow { color: var(--parent-accent); font-size: 10px; font-weight: 750; letter-spacing: 1.4px; }
.reading-settings h2 { margin: 6px 0 8px; font-size: 25px; letter-spacing: -.7px; }
.reading-settings p { font-size: 12px; line-height: 1.6; color: #596266; }
#readingSettingsIntro { margin: 0 0 20px; font-size: 14px; }
.practice-setting-section { border-top: 1px solid var(--line); padding-top: 18px; margin-top: 8px; }
.practice-setting-section h3 { font-size: 15px; margin: 0; }
.practice-setting-section > p { margin: 6px 0 12px; }
.reading-settings select { width: 100%; min-height: 46px; margin: 8px 0 14px; border: 1px solid var(--parent-divider); border-radius: 10px; background: var(--surface); color: var(--ink); padding: 10px; font: inherit; font-size: 14px; }
.reading-settings fieldset { display: flex; flex-wrap: wrap; gap: 8px; padding: 12px 0; border: 0; margin: 0; min-width: 0; }
.reading-unit { display: flex; align-items: center; gap: 6px; min-height: 40px; padding: 6px 10px; border-radius: 8px; background: var(--parent-fill); font-size: 12px; }
.reading-unit input { accent-color: var(--reader-blue); width: 18px; height: 18px; }
.reading-settings .practice-amount { display: block; padding: 0; margin: 18px 0; }
.practice-amount legend { padding: 0; font-weight: 650; font-size: 15px; }
.practice-amount p { margin: 5px 0 12px; }
.practice-segments { display: grid; grid-template-columns: repeat(3, minmax(0,1fr)); gap: 4px; padding: 4px; background: var(--parent-fill); border-radius: 12px; }
.practice-segments label { position: relative; cursor: pointer; min-width: 0; }
.practice-segments input { position: absolute; inset: 0; opacity: 0; margin: 0; width: 100%; height: 100%; cursor: pointer; }
.practice-segments span { display: flex; justify-content: center; align-items: center; min-height: 44px; padding: 8px 4px; border-radius: 9px; color: var(--ink); font-size: 14px; font-weight: 600; }
.practice-segments input:checked + span { color: #fff; background: var(--parent-accent); box-shadow: 0 2px 4px #1767e820; }
.practice-segments input:focus-visible + span { outline: 3px solid var(--ink); outline-offset: 2px; }
.reading-settings .practice-recommendation { color: var(--parent-accent); margin-top: 0; font-size: 12px; }
.practice-plan-preview { background: var(--parent-fill); border: 1px solid var(--parent-divider); border-radius: 12px; padding: 13px 14px; }
.practice-plan-preview > span { font-size: 11px; font-weight: 650; color: var(--parent-secondary); }
.practice-plan-preview p { margin: 5px 0 0; color: var(--parent-accent); font-weight: 650; }
.reading-settings-actions { position: sticky; bottom: -24px; display: flex; justify-content: flex-end; gap: 8px; margin: 12px -24px -24px; padding: 14px 24px 20px; background: var(--surface); border-top: 1px solid var(--line); }
.reading-settings-actions button { min-height: 44px; padding: 10px 16px; border-radius: 10px; background: var(--parent-fill); color: var(--ink); font-size: 13px; cursor: pointer; }
.reading-settings-actions button[type=submit] { background: var(--parent-accent); color: white; font-weight: 650; }
.practice-settings-card button:focus-visible, .reading-settings button:focus-visible, .reading-settings select:focus-visible { outline: 3px solid var(--parent-accent); outline-offset: 3px; }
@media (max-width: 360px) {
  .reading-settings { padding: 18px; }
  .reading-settings-actions { bottom: -18px; margin: 12px -18px -18px; padding: 12px 18px 18px; }
  .practice-settings-card { padding: 18px; }
}
#readingSettingsError { color: #a54232; }
#readingSyncNotice { position: fixed; z-index: 100; left: 16px; right: 16px; bottom: 16px; padding: 16px; border-radius: 10px; background: #fff1d6; color: #573e20; }
.is-reading-session .carousel-window { height: clamp(340px, calc(100dvh - 250px), 590px); }

.is-reading-session .word-card { padding-bottom: 92px; }
.is-reading-session .word-slide[data-carousel-slot=current].is-sentence-card.is-picture-visible { --picture-size: clamp(120px, min(60vw, 25dvh), 230px); }
@media (max-height: 650px) {
  .reading-toolbar { padding: 2px 0; font-size: 12px; }
  .is-reading-session .carousel-window { height: max(300px, calc(100dvh - 218px)); }
  .is-reading-session .word-card { padding-top: 16px; padding-bottom: 84px; }
}

.practice-view {
  min-height: 0;
  display: grid;
  grid-template-rows: minmax(0, 1fr);
}

.word-stage {
  min-height: 0;
  align-self: center;
  width: 100%;
  cursor: pointer;
  touch-action: pan-x;
  user-select: none;
}

.carousel-window {
  width: 100%;
  height: clamp(430px, calc(100dvh - 190px), 650px);
  position: relative;
  overflow: hidden;
  border-radius: 8px;
  -webkit-mask-image: linear-gradient(to bottom, transparent 0%, #000 9%, #000 91%, transparent 100%);
  mask-image: linear-gradient(to bottom, transparent 0%, #000 9%, #000 91%, transparent 100%);
}

.word-slide {
  --slot-top: 50%;
  --slot-scale: 0.78;
  --slot-opacity: 0.42;
  --slot-z: 1;
  --picture-size: clamp(64px, 20vw, 112px);
  --word-size: clamp(40px, 12vw, 68px);
  width: 100%;
  height: 76%;
  position: absolute;
  top: var(--slot-top);
  left: 0;
  right: 0;
  z-index: var(--slot-z);
  opacity: var(--slot-opacity);
  filter: saturate(0.8);
  transform: translateY(-50%) scale(var(--slot-scale));
  will-change: top, transform, opacity;
  pointer-events: none;
}

/* Change positions during the move, then reset the recycled slots in one paint. */
.word-stage.is-advancing .word-slide,
.word-stage.is-retreating .word-slide {
  transition:
    top 520ms cubic-bezier(0.2, 0.84, 0.28, 1),
    transform 520ms cubic-bezier(0.2, 0.84, 0.28, 1),
    opacity 260ms ease,
    filter 260ms ease;

}

.word-card,
.reading-panel.pattern-lesson {
  border-radius: 18px;
  box-shadow: inset 0 0 0 1px rgba(32, 36, 46, 0.025), var(--card-shadow);
}

.word-card {
  width: 100%;
  height: 100%;
  position: relative;
  padding: clamp(22px, 4.3vh, 38px) clamp(16px, 5vw, 28px) clamp(16px, 3vh, 24px);
  background: var(--surface-soft);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: var(--card-content-gap, clamp(12px, 2.2vh, 22px));
}

.word-slide[data-carousel-slot="previous"] {
  --slot-top: 16%;
  --slot-scale: 0.76;
  --slot-opacity: 0.32;
}

.word-slide[data-carousel-slot="current"] {
  --slot-top: 50%;
  --slot-scale: 1;
  --slot-opacity: 1;
  --slot-z: 3;
  --picture-size: clamp(180px, min(64vw, 28dvh), 240px);
  --word-size: clamp(64px, 18vw, 100px);
  --card-content-gap: clamp(8px, 1.4vh, 14px);
  filter: saturate(1);
  pointer-events: auto;
}

.word-slide[data-carousel-slot="current"] .word-card,
.word-stage.is-retreating .word-slide[data-carousel-slot="previous"] .word-card,
.word-stage.is-advancing .word-slide[data-carousel-slot="next"] .word-card {
  background: var(--surface);
}

.word-slide[data-carousel-slot="current"] .word-card,
.word-stage.is-advancing .word-slide[data-carousel-slot="next"] .word-card,
.word-stage.is-retreating .word-slide[data-carousel-slot="previous"] .word-card {
  padding-top: clamp(18px, 3vh, 28px);
  padding-bottom: clamp(86px, 11vh, 108px);
}

.word-slide[data-carousel-slot="previous"] .word-card,
.word-stage.is-advancing .word-slide[data-carousel-slot="current"] .word-card {
  flex-direction: column-reverse;
  gap: 8px;
}

.word-stage.is-retreating .word-slide[data-carousel-slot="previous"] .word-card {
  flex-direction: column;
  gap: var(--card-content-gap, clamp(12px, 2.2vh, 22px));
}

.word-slide[data-carousel-slot="previous"] .slide-word,
.word-stage.is-advancing .word-slide[data-carousel-slot="current"] .slide-word {
  color: rgba(32, 34, 41, 0.78);
  transform: translateY(clamp(-108px, -13vh, -72px));
}

.word-stage.is-retreating .word-slide[data-carousel-slot="previous"] .slide-word {
  color: var(--ink);
  transform: none;
}

.word-slide[data-carousel-slot="previous"] .slide-picture,
.word-stage.is-advancing .word-slide[data-carousel-slot="current"] .slide-picture {
  opacity: 0.58;
  transform: translateY(18px) scale(0.86);
}

.word-slide[data-carousel-slot="next"] {
  --slot-top: 93%;
  --slot-scale: 0.8;
  --slot-opacity: 0;
  visibility: hidden;
}

.word-slide[data-carousel-slot="following"] {
  --slot-top: 140%;
  --slot-scale: 0.76;
  --slot-opacity: 0;
  visibility: hidden;
}

.word-stage.is-sentence-reading:not(.is-reading-session):not(.is-advancing):not(.is-retreating) .word-slide:not([data-carousel-slot="current"]) {
  --slot-opacity: 0;
}

.word-stage.is-advancing .word-slide[data-carousel-slot="previous"] {
  --slot-top: -40%;
  --slot-scale: 0.7;
  --slot-opacity: 0;
}

.word-stage.is-advancing .word-slide[data-carousel-slot="current"] {
  --slot-top: 16%;
  --slot-scale: 0.76;
  --slot-opacity: 0.32;
  --slot-z: 1;
  --picture-size: clamp(64px, 20vw, 112px);
  --word-size: clamp(40px, 12vw, 68px);
  filter: saturate(0.8);
  pointer-events: none;
}

.word-stage.is-advancing .word-slide[data-carousel-slot="next"] {
  --slot-top: 50%;
  --slot-scale: 1;
  --slot-opacity: 1;
  --slot-z: 3;
  --picture-size: clamp(180px, min(64vw, 28dvh), 240px);
  --word-size: clamp(64px, 18vw, 100px);
  --card-content-gap: clamp(8px, 1.4vh, 14px);
  filter: saturate(1);
  /* The successor is settled at this boundary; reveal it only as it enters. */
  visibility: visible;
}

.word-stage.is-advancing .word-slide[data-carousel-slot="following"] {
  --slot-top: 93%;
  --slot-scale: 0.8;
  --slot-opacity: 0.30;
}

.word-stage.is-retreating .word-slide[data-carousel-slot="previous"] {
  --slot-top: 50%;
  --slot-scale: 1;
  --slot-opacity: 1;
  --slot-z: 3;
  --picture-size: clamp(180px, min(64vw, 28dvh), 240px);
  --word-size: clamp(64px, 18vw, 100px);
  --card-content-gap: clamp(8px, 1.4vh, 14px);
  filter: saturate(1);
}

.word-stage.is-retreating .word-slide[data-carousel-slot="current"] {
  --slot-top: 93%;
  --slot-scale: 0.8;
  --slot-opacity: 0.30;
  --slot-z: 1;
  --picture-size: clamp(64px, 20vw, 112px);
  --word-size: clamp(40px, 12vw, 68px);
  filter: saturate(0.8);
  pointer-events: none;
}

.word-stage.is-retreating .word-slide[data-carousel-slot="next"] {
  --slot-top: 140%;
  --slot-scale: 0.76;
  --slot-opacity: 0;
}

.word-stage.is-resetting .word-slide {
  transition: none;
}

@media (max-height: 700px) {
  .word-slide[data-carousel-slot="current"],
  .word-stage.is-advancing .word-slide[data-carousel-slot="next"],
  .word-stage.is-retreating .word-slide[data-carousel-slot="previous"] {
    --picture-size: clamp(160px, min(58vw, 27dvh), 200px);
  }
}

.slide-picture {
  width: min(var(--picture-size), 72%);
  aspect-ratio: 1;
  display: grid;
  place-items: center;
  font-size: var(--picture-size);
  line-height: 1;
  transform-origin: center;
  transition: transform 180ms ease;
}

.slide-picture img {
  width: 100%;
  height: 100%;
  object-fit: contain;
  display: block;
}

.slide-picture.is-emoji-picture {
  width: auto;
  aspect-ratio: auto;
}

.word-slide.is-picture-hidden .slide-picture {
  display: none;
}

.slide-picture.is-pulsing {
  transform: scale(1.06);
}

.slide-word,
.pattern-lesson .pattern-lesson-example {
  width: 100%;
  margin: 0;
  color: var(--ink);
  font-family: var(--practice-word-font);
  font-size: var(--word-size);
  font-weight: 700;
  line-height: 1.05;
  letter-spacing: 0;
  font-variant-ligatures: none;
  overflow-wrap: anywhere;
  text-align: center;
}

.slide-word.is-word-pair {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: clamp(12px, 2.5dvh, 24px);
}

.word-pair-line {
  display: block;
  white-space: nowrap;
}

@media (max-height: 650px) {
  .word-slide[data-carousel-slot="current"] .slide-word.is-word-pair {
    font-size: min(var(--word-size), 10dvh);
    gap: 8px;
  }
}

.word-slide[data-carousel-slot="current"] .slide-word.is-sound-groups-visible.is-long-word {
  --word-size: clamp(64px, 18vw, 90px);
  white-space: nowrap;
}

.word-slide[data-carousel-slot="current"].is-sentence-card {
  --picture-size: clamp(150px, min(52vw, 23dvh), 200px);
}

.word-slide.is-sentence-card .word-card {
  gap: clamp(10px, 1.8vh, 16px);
}

.slide-word.is-sentence-text {
  max-width: 360px;
  padding-inline: 4px;
  font-size: clamp(32px, 8.8vw, 48px);
  line-height: 1.2;
  overflow-wrap: normal;
  word-break: normal;
  text-wrap: balance;
}

.word-slide.is-sentence-card.is-picture-visible .slide-word.is-sentence-text {
  font-size: clamp(22px, 6.5vw, 36px);
}

.word-slide[data-carousel-slot="current"].is-sentence-card .word-card {
  padding-inline: clamp(18px, 5vw, 30px);
}

@media (max-height: 620px), (max-width: 340px) {
  .word-slide[data-carousel-slot="current"].is-sentence-card {
    --picture-size: clamp(104px, min(42vw, 20dvh), 130px);
  }

  .word-slide[data-carousel-slot="current"].is-sentence-card .word-card {
    gap: 8px;
    padding: 12px 14px 78px;
  }

  .slide-word.is-sentence-text {
    max-width: 286px;
    font-size: clamp(25px, 7.8vw, 32px);
    line-height: 1.12;
  }
}

.sound-group,
.pattern-lesson-highlight {
  display: inline-block;
  margin-inline: 0.015em;
  padding: 0.015em 0.075em 0.045em;
  border-radius: 0.18em;
  background: rgba(23, 103, 232, 0.10);
  box-shadow: inset 0 -0.055em 0 rgba(23, 103, 232, 0.38);
  color: #164f99;
}

.sound-group {
  transform-origin: 50% 85%;
  animation: sound-group-reveal 300ms cubic-bezier(0.2, 0.84, 0.28, 1) both;
  animation-delay: calc(var(--sound-group-index, 0) * 35ms);
}

@keyframes sound-group-reveal {
  from {
    opacity: 0;
    transform: translateY(0.1em) scale(0.88);
  }
  to {
    opacity: 1;
    transform: translateY(0) scale(1);
  }
}

@media (prefers-reduced-motion: reduce) {
  .sound-group {
    animation: none;
  }
}

.session-journey {
  position: absolute;
  left: clamp(18px, 5vw, 28px);
  right: clamp(18px, 5vw, 28px);
  bottom: clamp(7px, 1.2vh, 10px);
  display: grid;
  grid-auto-flow: column;
  grid-auto-columns: minmax(0, 1fr);
  align-items: center;
  gap: 3px;
  pointer-events: none;
}

.session-journey[hidden] {
  display: none;
}

.journey-step {
  min-width: 0;
  height: 6px;
  position: relative;
  border-radius: 999px;
  background: rgba(32, 34, 41, 0.09);
  box-shadow: inset 0 1px 1px rgba(255, 255, 255, 0.7);
}

.journey-step[data-completed] {
  background: #8abcf7;
}

.journey-step[data-active]::after {
  content: "★";
  width: min(20px, calc(100% + 2px));
  aspect-ratio: 1;
  position: absolute;
  left: 50%;
  top: 50%;
  display: grid;
  place-items: center;
  border-radius: 50%;
  background: #f0f1f4;
  color: var(--reader-gold);
  font-size: 15px;
  line-height: 1;
  box-shadow: 0 0 0 3px rgba(240, 241, 244, 0.65);
  transform: translate(-50%, -50%);
  animation: travelerArrive 300ms cubic-bezier(0.2, 0.9, 0.25, 1.3) both;
}

.practice-feedback {
  min-height: 44px;
  display: grid;
  place-items: center;
  gap: 8px;
  color: var(--teal-dark);
  text-align: center;
}

.practice-feedback[hidden] {
  display: none;
}

.feedback-title {
  margin: 0;
  font-size: 14px;
  font-weight: 850;
}

.word-stage.is-word-success .word-slide[data-carousel-slot="current"] .word-card {
  animation: cardSuccess 480ms cubic-bezier(0.2, 0.85, 0.25, 1.15) both;
}

.word-stage.is-word-success .slide-word {
  color: var(--ink);
}

.word-stage.is-helping .word-slide[data-carousel-slot="current"] .word-card {
  box-shadow:
    inset 0 0 0 2px rgba(255, 190, 77, 0.28),
    var(--card-shadow);
}

.word-stage.is-helping .attempt:first-child {
  background: rgba(255, 209, 102, 0.22);
  color: #73551c;
}

.word-stage.is-helping .attempt:last-child {
  background: var(--reader-blue-soft);
  color: var(--ink);
}

.word-stage.is-replaying .word-slide[data-carousel-slot="current"] .word-card {
  box-shadow:
    inset 0 0 0 2px rgba(255, 190, 77, 0.42),
    0 24px 62px rgba(92, 67, 20, 0.15);
}

.word-stage.is-replay-anticipation .slide-word,
.word-stage.is-replay-guided .slide-word,
.word-stage.is-replay-encore .slide-word,
.word-stage.is-replay-reward .slide-word {
  animation: none;
  color: var(--ink);
  opacity: 1;
  transform: none;
}

.word-stage.is-replay-reward .practice-feedback::before {
  content: "★";
  color: #e8a823;
  font-size: 22px;
  line-height: 1;
  text-shadow: 0 5px 14px rgba(232, 168, 35, 0.28);
  animation: replayReward 520ms cubic-bezier(0.18, 0.9, 0.2, 1.3) both;
}

.word-stage.is-replaying .attempt:disabled,
.word-stage.is-replay-reward .attempt:disabled {
  opacity: 0.88;
}

.attempt-bar,
.pattern-lesson-controls {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 8px;
}

.attempt-bar {
  width: auto;
  position: absolute;
  left: clamp(18px, 5vw, 28px);
  right: clamp(18px, 5vw, 28px);
  bottom: clamp(24px, 3.8vh, 34px);
  padding-top: 0;
}

.attempt,
.pattern-lesson-action {
  min-width: 0;
  min-height: 50px;
  padding: 8px 6px;
  border-radius: 12px;
  display: flex;
  flex-direction: row;
  align-items: center;
  justify-content: center;
  gap: 8px;
  background: var(--surface);
  box-shadow: inset 0 0 0 1px rgba(32, 36, 46, 0.10);
  color: #444954;
  font-size: clamp(12px, 3.4vw, 14px);
  font-weight: 760;
  line-height: 1;
}

.attempt:active,
.pattern-lesson-action:active {
  background: var(--reader-blue-soft);
  color: var(--ink);
  transform: translateY(2px) scale(0.97);
}

.practice-view button:not(#listeningIndicator):not([data-reading-start]):active,
.practice-view button.is-input-accepted {
  outline: 3px solid rgba(23, 103, 232, 0.42);
  outline-offset: 2px;
}

.practice-view[data-input-locked] button:not(#listeningIndicator) {
  cursor: wait;
}

.practice-view[data-input-locked] .attempt {
  opacity: 0.55;
}

.practice-view[data-input-locked] .attempt.is-input-accepted {
  opacity: 1;
  background: var(--reader-blue-soft);
  color: var(--ink);
}

.practice-view[data-input-locked] .attempt[data-outcome="unsure"] [data-attempt-label] {
  font-size: 0;
}

.practice-view[data-input-locked] .attempt[data-outcome="unsure"] [data-attempt-label]::after {
  content: "One moment…";
  font-size: clamp(12px, 3.1vw, 14px);
}

.attempt:disabled {
  opacity: 0.48;
}

.attempt-icon {
  flex: 0 0 auto;
  font-size: 23px;
  font-weight: 900;
  letter-spacing: 0;
  opacity: 1;
}

.attempt[data-outcome="good"] .attempt-icon { color: var(--reader-red); }
.attempt[data-outcome="unsure"] .attempt-icon { color: var(--reader-blue); }
.attempt:focus-visible,
.pattern-lesson-action:focus-visible { outline: 3px solid var(--reader-blue); outline-offset: 3px; }

.round-celebration-backdrop {
  position: fixed;
  inset: 0;
  z-index: 80;
  padding: max(24px, env(safe-area-inset-top)) 20px max(24px, env(safe-area-inset-bottom));
  display: grid;
  place-items: center;
  background: rgba(32, 34, 41, 0.28);
  backdrop-filter: blur(10px);
}

.round-celebration-backdrop[hidden] {
  display: none;
}

.round-celebration {
  width: min(100%, 360px);
  padding: 28px 24px 24px;
  border-radius: 22px;
  background: #fffdf8;
  color: var(--ink);
  text-align: center;
  box-shadow: 0 30px 80px rgba(32, 34, 41, 0.22);
  animation: celebrationEnter 420ms cubic-bezier(0.2, 0.9, 0.25, 1.12) both;
}

.celebration-path {
  height: 74px;
  position: relative;
  display: flex;
  align-items: flex-end;
  justify-content: center;
  gap: 9px;
  margin-bottom: 12px;
}

.celebration-path span {
  width: 36px;
  height: 13px;
  border-radius: 999px;
  background: rgba(22, 139, 133, 0.22);
  transform: translateY(var(--celebration-step, 0)) rotate(var(--celebration-tilt, 0));
}

.celebration-path span:nth-child(2) {
  --celebration-step: -10px;
  --celebration-tilt: -4deg;
}

.celebration-path span:nth-child(3) {
  --celebration-step: -22px;
  --celebration-tilt: 3deg;
}

.celebration-path span:nth-child(4) {
  --celebration-step: -34px;
  --celebration-tilt: -3deg;
}

.celebration-path span:nth-child(5) {
  --celebration-step: -46px;
}

.celebration-path strong {
  width: 38px;
  height: 38px;
  position: absolute;
  right: 16px;
  top: 0;
  display: grid;
  place-items: center;
  border-radius: 50%;
  background: #ffd166;
  color: #725315;
  font-size: 18px;
  box-shadow: 0 8px 20px rgba(255, 177, 42, 0.28);
  animation: celebrationStar 620ms 180ms cubic-bezier(0.2, 0.9, 0.2, 1.35) both;
}

.celebration-eyebrow {
  margin: 0 0 8px;
  color: var(--teal-dark);
  font-size: 12px;
  font-weight: 900;
  letter-spacing: 0.1em;
}

.round-celebration h2 {
  margin: 0;
  font-size: 30px;
  line-height: 1.15;
}

.round-celebration > p:not(.celebration-eyebrow) {
  margin: 10px 0 0;
  color: var(--muted);
  font-size: 15px;
  font-weight: 700;
  line-height: 1.55;
}

.round-celebration .celebration-note {
  margin-top: 4px;
  font-size: 13px;
}

.celebration-finish {
  width: 100%;
  min-height: 50px;
  margin-top: 22px;
  border-radius: 12px;
  background: var(--teal);
  color: #fff;
  font-weight: 900;
  box-shadow: 0 10px 24px rgba(8, 115, 109, 0.2);
}

.celebration-finish:active {
  background: var(--teal-dark);
  transform: translateY(1px);
}

@keyframes travelerArrive {
  from { opacity: 0; transform: translate(-50%, -50%) scale(0.45) rotate(-24deg); }
  to { opacity: 1; transform: translate(-50%, -50%) scale(1) rotate(0); }
}

@keyframes cardSuccess {
  0% { transform: scale(1); }
  42% { transform: scale(1.018) rotate(-0.3deg); }
  100% { transform: scale(1); }
}

@keyframes replayReward {
  from { opacity: 0; transform: translateY(8px) scale(0.35) rotate(-26deg); }
  to { opacity: 1; transform: translateY(0) scale(1) rotate(0); }
}

@keyframes celebrationEnter {
  from { opacity: 0; transform: translateY(24px) scale(0.94); }
  to { opacity: 1; transform: translateY(0) scale(1); }
}

@keyframes celebrationStar {
  from { opacity: 0; transform: translateY(24px) scale(0.35) rotate(-32deg); }
  to { opacity: 1; transform: translateY(0) scale(1) rotate(0); }
}

@media (prefers-reduced-motion: reduce) {
  .journey-step[data-active]::after,
  .word-stage.is-replay-reward .practice-feedback::before,
  .word-stage.is-word-success .word-slide[data-carousel-slot="current"] .word-card,
  .round-celebration,
  .celebration-path strong {
    animation: none;
  }
}

.summary-view {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  min-width: 0;
  gap: 13px;
  align-content: start;
  padding-top: 2px;
}

.today-report-section {
  border-radius: 8px;
  background: var(--surface-soft);
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.72);
}

.daily-tip-card {
  position: relative;
  padding: 14px 42px 14px 15px;
  border-radius: 8px;
  display: grid;
  gap: 9px;
  overflow: hidden;
  isolation: isolate;
  background:
    linear-gradient(135deg, rgba(255, 209, 102, 0.56), rgba(255, 255, 255, 0.78) 42%, rgba(90, 200, 250, 0.26)),
    rgba(255, 255, 255, 0.9);
  box-shadow:
    inset 0 0 0 1px rgba(255, 255, 255, 0.82),
    0 14px 34px rgba(32, 34, 41, 0.08),
    0 0 0 1px rgba(255, 145, 77, 0.24);
  animation: dailyTipPop 220ms ease-out both;
}

.daily-tip-card[hidden] {
  display: none;
}

.daily-tip-card::before {
  content: "";
  position: absolute;
  inset: 0 auto 0 0;
  width: 7px;
  background: linear-gradient(to bottom, #ff6b6b, #ffd166 33%, #22c55e 66%, #3b82f6);
}

.daily-tip-card::after {
  content: "";
  position: absolute;
  top: 9px;
  right: -20px;
  width: 86px;
  height: 18px;
  transform: rotate(18deg);
  background: repeating-linear-gradient(90deg, #ff6b6b 0 14px, #ffd166 14px 28px, #5ac8fa 28px 42px);
  opacity: 0.7;
}

.daily-tip-card > * {
  position: relative;
  z-index: 1;
}

.daily-tip-head {
  display: flex;
  align-items: center;
  gap: 8px;
  color: #91520d;
  font-size: 11px;
  font-weight: 920;
  line-height: 1;
}

.daily-tip-head span:first-child {
  padding: 5px 8px;
  border-radius: 999px;
  background: #fff3bf;
  box-shadow: inset 0 0 0 1px rgba(255, 145, 77, 0.32);
}

.daily-tip-head span:last-child {
  color: #2f7d69;
}

.daily-tip-card h2 {
  margin: 0;
  color: var(--ink);
  font-size: 18px;
  line-height: 1.05;
  font-weight: 930;
}

.daily-tip-body {
  margin: 0;
  padding: 9px 10px;
  border: 2px dashed rgba(255, 107, 107, 0.5);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.74);
  color: var(--ink);
  font-size: clamp(22px, 6vw, 30px);
  line-height: 1.08;
  font-weight: 930;
  letter-spacing: 0;
  word-break: break-word;
  overflow-wrap: anywhere;
}

.daily-tip-prompt {
  margin: 0;
  display: grid;
  gap: 5px;
  color: #5a5360;
  font-size: 13px;
  line-height: 1.35;
  font-weight: 780;
}

.daily-tip-instruction-title {
  color: #91520d;
  font-size: 12px;
  line-height: 1;
  font-weight: 930;
}

.daily-tip-steps {
  margin: 0;
  padding-left: 18px;
  display: grid;
  gap: 3px;
}

.daily-tip-steps li {
  padding-left: 2px;
}

.daily-tip-dismiss {
  width: 28px;
  height: 28px;
  position: absolute;
  top: 10px;
  right: 10px;
  padding: 0;
  border-radius: 999px;
  display: grid;
  place-items: center;
  background: rgba(32, 34, 41, 0.05);
  color: var(--muted);
  font-size: 18px;
  font-weight: 760;
  line-height: 1;
  z-index: 2;
}

.daily-tip-dismiss:active {
  transform: translateY(1px);
}

@keyframes dailyTipPop {
  from {
    opacity: 0;
    transform: translateY(8px) scale(0.98);
  }

  to {
    opacity: 1;
    transform: translateY(0) scale(1);
  }
}

@media (prefers-reduced-motion: reduce) {
  .daily-tip-card {
    animation: none;
  }
}

.section-heading h2 {
  font-size: 20px;
  line-height: 1.05;
  font-weight: 920;
}

.today-report-section {
  padding: 15px;
  display: grid;
  gap: 13px;
  background: var(--surface);
}

.today-report-head {
  display: flex;
  align-items: start;
  justify-content: space-between;
  gap: 12px;
}

.today-report-head h2 {
  margin: 0 0 5px;
  font-size: 20px;
  line-height: 1.05;
  font-weight: 920;
}

.today-empty-state {
  min-height: 86px;
  padding: 16px;
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: center;
  gap: 12px;
  border-top: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
}

.today-empty-state[hidden] {
  display: none;
}

.today-empty-copy {
  min-width: 0;
}

.today-empty-state strong {
  display: block;
  color: var(--ink);
  font-size: 18px;
  line-height: 1.1;
  font-weight: 920;
  white-space: nowrap;
}

.today-empty-state p {
  margin: 5px 0 0;
  max-width: 220px;
  color: var(--muted);
  font-size: 12px;
  line-height: 1.35;
  font-weight: 760;
}

.today-start-button {
  min-height: 34px;
  padding: 0 13px;
  border-radius: 999px;
  background: var(--ink);
  color: #fff;
  font-size: 13px;
  font-weight: 880;
}

.today-start-button:active {
  transform: translateY(1px);
}

#todaySessionStage {
  flex: 0 1 auto;
  max-width: calc(100% - 96px);
  padding: 5px 8px;
  border-radius: 999px;
  background: rgba(22, 139, 133, 0.09);
  color: var(--teal-dark);
  font-size: 11px;
  font-weight: 900;
  line-height: 1.15;
  overflow: hidden;
  text-align: right;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.today-kpi-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  border-top: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
}

.today-kpi-grid[hidden] {
  display: none;
}

.today-kpi {
  min-width: 0;
  min-height: 86px;
  padding: 11px 8px;
  display: grid;
  align-content: center;
  gap: 4px;
  background: transparent;
  text-align: left;
}

.today-kpi + .today-kpi {
  border-left: 1px solid var(--line);
}

.today-kpi strong {
  color: var(--ink);
  font-size: clamp(30px, 8vw, 44px);
  line-height: 0.92;
  font-weight: 950;
}

.today-kpi span {
  color: var(--ink);
  font-weight: 900;
}

.outcome-filter {
  cursor: pointer;
  transition:
    background 160ms ease,
    color 160ms ease,
    box-shadow 160ms ease;
}

.outcome-filter:active {
  transform: translateY(1px);
}

.outcome-filter:focus-visible {
  outline: 2px solid rgba(22, 139, 133, 0.5);
  outline-offset: -2px;
}

.outcome-filter.is-active {
  background: rgba(22, 139, 133, 0.08);
  color: var(--teal-dark);
  box-shadow: inset 0 0 0 1px rgba(22, 139, 133, 0.14);
}

.outcome-pass strong {
  color: var(--teal-dark);
}

.outcome-miss strong {
  color: var(--rose);
}

.metric-value-line,
.title-with-info {
  min-width: 0;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 5px;
}

.metric-value-line strong,
.title-with-info strong {
  min-width: 0;
}

#todayLevel {
  font-size: clamp(16px, 4.8vw, 22px);
  line-height: 1.05;
}

.info-button {
  flex: 0 0 auto;
  width: 18px;
  height: 18px;
  padding: 0;
  border-radius: 999px;
  display: grid;
  place-items: center;
  background: rgba(255, 255, 255, 0.34);
  color: rgba(32, 34, 41, 0.34);
  box-shadow: inset 0 0 0 1px rgba(32, 34, 41, 0.06);
  font-size: 10px;
  font-weight: 900;
  line-height: 1;
}

.info-button[hidden] {
  display: none;
}

.info-button-small {
  width: 16px;
  height: 16px;
  font-size: 9px;
}

.info-button:active {
  background: rgba(22, 139, 133, 0.12);
  color: var(--teal-dark);
  transform: translateY(1px);
}

.mastery-empty {
  color: var(--muted);
  font-size: 12px;
  font-weight: 760;
}

.mastery-chip {
  min-width: 0;
  max-width: 100%;
  padding: 5px 8px;
  border-radius: 999px;
  background: rgba(22, 139, 133, 0.1);
  color: var(--teal-dark);
  box-shadow: inset 0 0 0 1px rgba(22, 139, 133, 0.14);
  font-size: 12px;
  font-weight: 850;
  line-height: 1;
}

.mastery-empty {
  margin: 0;
}

.progress-section,
.recent-section {
  padding: 0;
}

.recent-section[hidden] {
  display: none;
}

.section-heading {
  display: flex;
  justify-content: space-between;
  align-items: end;
  gap: 12px;
  margin-bottom: 10px;
  padding: 0 2px;
}

.phase-track {
  height: 10px;
  overflow: hidden;
  border-radius: 999px;
  background: rgba(32, 34, 41, 0.08);
}

.phase-fill {
  width: 0%;
  height: 100%;
  border-radius: inherit;
  background: var(--teal);
  transition: width 240ms ease;
}

.phase-list {
  display: grid;
  gap: 10px;
}

.phase-card {
  display: grid;
  gap: 10px;
  padding: 14px;
  border-radius: 8px;
  background: var(--surface-soft);
  box-shadow: inset 0 0 0 1px var(--line);
  transition: box-shadow 180ms ease, background 180ms ease;
}

.phase-head {
  display: flex;
  gap: 12px;
}

.phase-head {
  justify-content: space-between;
}

.phase-head {
  align-items: start;
}

.phase-title-block {
  min-width: 0;
  display: grid;
  gap: 5px;
  cursor: pointer;
  -webkit-tap-highlight-color: transparent;
}

.phase-label-line {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 7px;
}

.phase-actions {
  flex: 0 0 auto;
  display: grid;
  justify-items: end;
  gap: 6px;
}

.phase-label-line > span:first-child,
.phase-detail-list {
  color: var(--muted);
  font-size: 12px;
  font-weight: 780;
}

.phase-head strong {
  font-size: 18px;
  line-height: 1.05;
}

.phase-actions > strong {
  font-size: 22px;
  white-space: nowrap;
}

.phase-lock-badge {
  display: inline-flex;
  align-items: center;
  color: rgba(32, 34, 41, 0.48);
  font-size: 10px;
  font-weight: 900;
  letter-spacing: 0;
  line-height: 1;
}

.phase-lock-badge[hidden] {
  display: none;
}

.phase-expand {
  min-height: 26px;
  padding: 0 9px;
  border-radius: 999px;
  background: rgba(32, 34, 41, 0.06);
  color: var(--muted);
  box-shadow: inset 0 0 0 1px rgba(32, 34, 41, 0.07);
  font-size: 12px;
  font-weight: 830;
}

.phase-expand[aria-expanded="true"] {
  background: rgba(22, 139, 133, 0.11);
  color: var(--teal-dark);
}

.phase-card.is-current-phase {
  box-shadow: inset 0 0 0 1px rgba(22, 139, 133, 0.24);
}

.phase-card.is-previous-phase {
  box-shadow: inset 0 0 0 1px rgba(22, 139, 133, 0.12);
}

.phase-card.is-previous-phase .phase-title-block {
  cursor: pointer;
}

.phase-card.is-roadmap-phase {
  gap: 0;
  padding: 9px 2px;
  border-radius: 0;
  background: transparent;
  box-shadow: none;
}

.phase-card.is-current-phase + .phase-card.is-roadmap-phase,
.phase-card.is-roadmap-phase + .phase-card.is-roadmap-phase {
  border-top: 1px solid rgba(32, 34, 41, 0.07);
}

.phase-card.is-roadmap-phase .phase-title-block {
  cursor: default;
}

.phase-card.is-roadmap-phase .phase-head {
  align-items: baseline;
}

.phase-card.is-roadmap-phase .phase-head strong {
  color: rgba(32, 34, 41, 0.66);
  font-size: 16px;
}

.phase-card.is-expanded {
  background: rgba(255, 255, 255, 0.68);
  box-shadow: inset 0 0 0 1px rgba(22, 139, 133, 0.28), 0 14px 36px rgba(32, 34, 41, 0.06);
}

.phase-card.is-locked {
  color: rgba(32, 34, 41, 0.34);
}

.phase-card.is-locked .phase-label-line > span:first-child,
.phase-card.is-locked .phase-lock-badge,
.phase-card.is-locked .phase-detail-list,
.phase-card.is-locked .progress-word-status,
.phase-card.is-locked .phase-actions > strong {
  color: rgba(32, 34, 41, 0.3);
}

.phase-card.is-locked .phase-head strong {
  color: rgba(32, 34, 41, 0.36);
}

.phase-card.is-locked .phase-fill {
  background: rgba(32, 34, 41, 0.24);
}

.phase-card.is-locked .phase-expand {
  background: rgba(32, 34, 41, 0.04);
  color: rgba(32, 34, 41, 0.44);
  box-shadow: inset 0 0 0 1px rgba(32, 34, 41, 0.08);
}

.phase-details {
  display: grid;
  gap: 10px;
  padding-top: 2px;
}

.phase-details[hidden] {
  display: none;
}

.phase-detail-list {
  margin: 0;
  padding-left: 18px;
  line-height: 1.35;
}

.phase-detail-list li + li {
  margin-top: 4px;
}

.progress-list,
.recent-list {
  display: grid;
  gap: 10px;
}

.progress-row {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  gap: 9px 12px;
  padding: 12px;
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.58);
  box-shadow: inset 0 0 0 1px var(--line);
}

.progress-row.is-phase-mastery-only {
  padding: 2px 0 0;
  border-radius: 0;
  background: transparent;
  box-shadow: none;
}

.progress-copy {
  display: grid;
  gap: 3px;
}

.progress-copy strong {
  font-size: 16px;
}

.progress-meter {
  grid-column: 1 / -1;
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: center;
  gap: 8px;
}

.progress-track {
  height: 7px;
  border-radius: 999px;
  overflow: hidden;
  background: rgba(32, 34, 41, 0.08);
}

.progress-fill {
  width: 0%;
  height: 100%;
  border-radius: inherit;
  background: var(--teal);
  transition: width 240ms ease;
}

.progress-percent {
  min-width: 34px;
  color: var(--teal-dark);
  font-size: 12px;
  font-weight: 900;
  line-height: 1;
  text-align: right;
}

.progress-word-status {
  grid-column: 1 / -1;
  display: grid;
  gap: 10px;
  padding-top: 2px;
}

.progress-word-section {
  display: grid;
  gap: 7px;
}

.progress-word-section-head {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 10px;
}

.progress-word-section-head strong {
  font-size: 13px;
  line-height: 1.1;
}

.progress-word-section-head span {
  color: var(--muted);
  font-size: 11px;
  font-weight: 800;
}

.progress-word-list {
  min-height: 27px;
  max-height: 92px;
  overflow-y: auto;
  display: flex;
  flex-wrap: wrap;
  align-content: start;
  gap: 6px;
  overscroll-behavior: contain;
}

.progress-word-list .mastery-chip {
  padding: 5px 7px;
  font-size: 11px;
}

.progress-word-section.is-unmastered .mastery-chip {
  background: rgba(245, 247, 242, 0.92);
  color: var(--ink);
  box-shadow: inset 0 0 0 1px rgba(32, 34, 41, 0.08);
}

.info-backdrop {
  position: fixed;
  inset: 0;
  z-index: 20;
  padding: 18px;
  display: flex;
  align-items: flex-end;
  justify-content: center;
  background: rgba(32, 34, 41, 0.28);
}

.info-backdrop[hidden] {
  display: none;
}

.info-panel {
  width: min(100%, 430px);
  position: relative;
  padding: 18px;
  border-radius: 8px;
  background: var(--surface);
  box-shadow: 0 24px 64px rgba(32, 34, 41, 0.2), inset 0 0 0 1px rgba(255, 255, 255, 0.76);
}

.info-close {
  width: 30px;
  height: 30px;
  position: absolute;
  top: 12px;
  right: 12px;
  padding: 0;
  border-radius: 999px;
  display: grid;
  place-items: center;
  background: rgba(32, 34, 41, 0.06);
  color: var(--muted);
  font-size: 20px;
  line-height: 1;
}

.info-eyebrow {
  margin: 0 38px 5px 0;
  color: var(--teal-dark);
  font-size: 12px;
  font-weight: 850;
}

.info-panel h2 {
  margin: 0 38px 10px 0;
  font-size: 22px;
  line-height: 1.08;
  font-weight: 930;
}

#infoBody {
  margin: 0;
  color: var(--muted);
  font-size: 14px;
  font-weight: 720;
  line-height: 1.45;
}

.info-list {
  margin: 12px 0 0;
  padding-left: 18px;
  color: var(--ink);
  font-size: 14px;
  font-weight: 760;
  line-height: 1.4;
}

.info-list li + li {
  margin-top: 5px;
}

.onboarding-backdrop {
  position: fixed;
  inset: 0;
  z-index: 80;
  padding: calc(env(safe-area-inset-top) + 14px) 14px calc(env(safe-area-inset-bottom) + 14px);
  display: grid;
  place-items: center;
  background: rgba(32, 34, 41, 0.34);
  backdrop-filter: blur(12px);
}

.onboarding-backdrop[hidden] {
  display: none;
}

.onboarding-panel {
  width: min(100%, 430px);
  max-height: min(760px, calc(100dvh - env(safe-area-inset-top) - env(safe-area-inset-bottom) - 28px));
  min-height: min(650px, calc(100dvh - env(safe-area-inset-top) - env(safe-area-inset-bottom) - 28px));
  display: grid;
  grid-template-rows: minmax(0, 1fr) auto;
  overflow: hidden;
  border-radius: 8px;
  background: var(--surface);
  box-shadow: 0 30px 86px rgba(32, 34, 41, 0.26), inset 0 0 0 1px rgba(255, 255, 255, 0.82);
}

.onboarding-track-viewport {
  min-height: 0;
  overflow: hidden;
  touch-action: pan-y;
}

.onboarding-track {
  height: 100%;
  display: flex;
  transition: transform 300ms cubic-bezier(0.2, 0.84, 0.28, 1);
  will-change: transform;
}

.onboarding-slide {
  min-width: 100%;
  padding: clamp(18px, 5vw, 24px);
  display: grid;
  grid-template-rows: auto auto;
  align-content: start;
  gap: clamp(18px, 4vh, 26px);
  overflow-y: auto;
}

.onboarding-shot {
  min-height: clamp(218px, 36dvh, 286px);
  display: grid;
  place-items: center;
  overflow: hidden;
  border-radius: 8px;
  background:
    radial-gradient(circle at 18% 16%, rgba(22, 139, 133, 0.16), transparent 32%),
    linear-gradient(145deg, #f6f3e9, #eef4f1);
  box-shadow: inset 0 0 0 1px rgba(32, 34, 41, 0.07);
}

.onboarding-mini-card {
  width: min(78%, 250px);
  min-height: 205px;
  position: relative;
  padding: 22px 18px 58px;
  border-radius: 8px;
  display: grid;
  justify-items: center;
  align-content: center;
  gap: 8px;
  background: rgba(255, 253, 248, 0.9);
  box-shadow: 0 18px 42px rgba(39, 31, 18, 0.13);
}

.onboarding-mini-picture {
  width: 74px;
  height: 74px;
  display: grid;
  place-items: center;
}

.onboarding-mini-picture img {
  width: 100%;
  height: 100%;
  object-fit: contain;
  display: block;
}

.onboarding-mini-word,
.onboarding-reveal-word {
  color: var(--ink);
  font-family: var(--practice-word-font);
  font-size: 48px;
  line-height: 1;
  letter-spacing: 0;
}

.onboarding-mini-round {
  color: var(--muted);
  font-size: 12px;
  font-weight: 850;
}

.onboarding-mini-dots {
  display: flex;
  justify-content: center;
  gap: 5px;
}

.onboarding-mini-dot {
  width: 5px;
  height: 5px;
  border-radius: 999px;
  background: rgba(32, 34, 41, 0.12);
}

.onboarding-mini-dot[data-filled] {
  background: rgba(22, 139, 133, 0.72);
}

.onboarding-mini-actions {
  position: absolute;
  left: 15px;
  right: 15px;
  bottom: 15px;
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 7px;
}

.onboarding-mini-action {
  min-height: 38px;
  display: grid;
  place-items: center;
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.66);
  color: rgba(32, 34, 41, 0.7);
  font-size: 12px;
  font-weight: 850;
  text-align: center;
}

.onboarding-mini-action:first-child {
  color: var(--teal-dark);
}

.onboarding-mini-action:last-child {
  color: var(--rose);
}

.onboarding-reveal-grid {
  width: min(88%, 310px);
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
}

.onboarding-reveal-pane {
  min-height: 188px;
  padding: 14px 10px;
  border-radius: 8px;
  display: grid;
  justify-items: center;
  align-content: center;
  gap: 12px;
  background: rgba(255, 253, 248, 0.72);
  box-shadow: inset 0 0 0 1px rgba(32, 34, 41, 0.06);
}

.onboarding-reveal-pane.is-revealed {
  background: rgba(255, 253, 248, 0.94);
}

.onboarding-reveal-label,
.onboarding-summary-title,
.onboarding-pace-label {
  color: var(--muted);
  font-size: 12px;
  font-weight: 900;
}

.onboarding-help-pill {
  min-height: 28px;
  padding: 0 12px;
  border-radius: 8px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background: rgba(255, 209, 102, 0.22);
  color: #73551c;
  box-shadow: inset 0 0 0 1px rgba(190, 141, 43, 0.14);
  font-size: 11px;
  font-weight: 900;
}

.onboarding-summary-preview,
.onboarding-pace-preview {
  width: min(84%, 290px);
  padding: 18px;
  border-radius: 8px;
  display: grid;
  gap: 14px;
  background: rgba(255, 253, 248, 0.92);
  box-shadow: 0 18px 42px rgba(39, 31, 18, 0.12);
}

.onboarding-summary-metrics {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  border-top: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
}

.onboarding-summary-metric {
  min-height: 74px;
  display: grid;
  align-content: center;
  gap: 4px;
}

.onboarding-summary-metric + .onboarding-summary-metric {
  padding-left: 14px;
  border-left: 1px solid var(--line);
}

.onboarding-summary-metric span,
.onboarding-phase-preview span {
  color: var(--muted);
  font-size: 12px;
  font-weight: 850;
}

.onboarding-summary-metric strong {
  color: var(--ink);
  font-size: 38px;
  line-height: 0.95;
  font-weight: 950;
}

.onboarding-phase-preview {
  display: grid;
  gap: 8px;
}

.onboarding-phase-track {
  height: 10px;
  overflow: hidden;
  border-radius: 999px;
  background: rgba(32, 34, 41, 0.08);
}

.onboarding-phase-fill {
  width: 62%;
  height: 100%;
  display: block;
  border-radius: inherit;
  background: var(--teal);
}

.onboarding-pace-preview {
  align-content: center;
  min-height: 190px;
}

.onboarding-pace-rule {
  color: var(--ink);
  font-size: 36px;
  line-height: 1.04;
  font-weight: 950;
  letter-spacing: 0;
}

.onboarding-copy {
  display: grid;
  gap: 8px;
}

.onboarding-eyebrow {
  margin: 0;
  color: var(--teal-dark);
  font-size: 12px;
  font-weight: 900;
}

.onboarding-title {
  margin: 0;
  color: var(--ink);
  font-size: 32px;
  line-height: 1.06;
  font-weight: 950;
  letter-spacing: 0;
}

.onboarding-body {
  max-width: 32em;
  margin: 0;
  color: var(--muted);
  font-size: 15px;
  font-weight: 730;
  line-height: 1.45;
}

.onboarding-footer {
  padding: 14px clamp(18px, 5vw, 24px) clamp(16px, 5vw, 24px);
  display: grid;
  gap: 12px;
  border-top: 1px solid var(--line);
}

.onboarding-dots {
  display: flex;
  justify-content: center;
  gap: 7px;
}

.onboarding-dot {
  width: 8px;
  height: 8px;
  padding: 0;
  border-radius: 999px;
  background: rgba(32, 34, 41, 0.16);
}

.onboarding-dot.is-active {
  width: 22px;
  background: var(--teal);
}

.onboarding-actions {
  display: grid;
  grid-template-columns: minmax(0, 0.78fr) minmax(0, 1.22fr);
  gap: 9px;
}

.onboarding-actions.is-first {
  grid-template-columns: 1fr;
}

.onboarding-secondary,
.onboarding-primary {
  min-width: 0;
  min-height: 48px;
  padding: 0 14px;
  border-radius: 8px;
  font-size: 15px;
  font-weight: 900;
  text-align: center;
}

.onboarding-secondary {
  background: rgba(32, 34, 41, 0.06);
  color: rgba(32, 34, 41, 0.68);
}

.onboarding-secondary[hidden] {
  visibility: hidden;
}

.onboarding-primary {
  background: var(--ink);
  color: #fff;
}

.onboarding-secondary:active,
.onboarding-primary:active {
  transform: translateY(1px);
}

@media (max-width: 380px) {
  .onboarding-title {
    font-size: 29px;
  }

  .onboarding-pace-rule {
    font-size: 32px;
  }
}

.empty-state {
  margin: 0;
  color: var(--muted);
  font-size: 14px;
  line-height: 1.3;
}

.recent-row {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 4px 10px;
  padding: 10px 0;
  border-top: 1px solid var(--line);
}

.recent-word {
  font-size: 16px;
  font-weight: 860;
}

.recent-meta {
  grid-column: 1;
}

.recent-time {
  grid-column: 2;
  grid-row: 1 / span 2;
  align-self: center;
}

@media (min-width: 740px) {
  body {
    display: grid;
    place-items: center;
  }

  .app {
    width: min(430px, 100vw);
    min-height: min(932px, 100dvh);
    border-left: 1px solid var(--line);
    border-right: 1px solid var(--line);
  }
}

/* A revealed card opens into a picture above the reading and action area. */
.is-reading-session .carousel-window { mask-image: none; -webkit-mask-image: none; }
.word-slide[data-carousel-slot="current"].is-picture-visible .word-card {
  padding: 0 0 88px;
  overflow: hidden;
  justify-content: flex-start;
  gap: 0;
  border-radius: 18px;
}
.word-slide[data-carousel-slot="current"].is-picture-visible .slide-picture {
  width: 100%;
  height: 58%;
  flex: 0 0 58%;
  position: relative;
  aspect-ratio: auto;
  background: #fff3d3;
  overflow: hidden;
}
.word-slide[data-carousel-slot="current"].is-picture-visible .slide-picture img {
  width: 100%;
  height: 100%;
  object-fit: contain;
  position: absolute;
  inset: 0;
}
.word-slide[data-carousel-slot="current"].is-picture-visible .slide-word {
  flex: 1;
  min-height: 0;
  max-width: none;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 12px 22px;
  font-size: clamp(44px, 12vw, 72px);
}
.word-slide[data-carousel-slot="current"].is-picture-visible .slide-word.is-sentence-text {
  display: grid;
  place-content: center;
  font-size: clamp(22px, 6.5vw, 34px);
  line-height: 1.18;
}
.word-slide[data-carousel-slot="current"].is-picture-visible .slide-picture.is-pulsing { transform: none; }
.reading-summary > div { flex-wrap: wrap; }
@media (max-height: 650px) {
  .word-slide[data-carousel-slot="current"].is-picture-visible .word-card { padding-bottom: 80px; }
  .word-slide[data-carousel-slot="current"].is-picture-visible .slide-picture { height: 52%; flex-basis: 52%; }
  .word-slide[data-carousel-slot="current"].is-picture-visible .slide-word { padding: 8px 16px; font-size: 42px; }
  .word-slide[data-carousel-slot="current"].is-picture-visible .slide-word.is-sentence-text { font-size: 23px; }
}

/* Blend baked-in white paper edges into the word illustration panel. */
.word-slide[data-carousel-slot="current"]:not(.is-sentence-card).is-picture-visible .slide-picture img {
  width: min(100%, var(--picture-size));
  left: 50%;
  right: auto;
  transform: translateX(-50%);
  mix-blend-mode: multiply;
}

/* Keep the previous card available without showing a provisional successor. */
.is-reading-session .carousel-window {
  /* Keep focus/scroll-into-view from shifting this fixed carousel and clipping art. */
  overflow: clip;
  height: var(--practice-carousel-height);
  -webkit-mask-image: linear-gradient(to bottom, transparent 0%, #000 9%, #000 91%, transparent 100%);
  mask-image: linear-gradient(to bottom, transparent 0%, #000 9%, #000 91%, transparent 100%);
}
.is-reading-session .word-slide[data-carousel-slot=current] { height: 76%; }
.word-stage:not(.is-sentence-reading) .word-slide { height: 86%; }
.word-stage:not(.is-sentence-reading) .carousel-window {
  -webkit-mask-image: linear-gradient(to bottom, transparent 0%, #000 5%, #000 95%, transparent 100%);
  mask-image: linear-gradient(to bottom, transparent 0%, #000 5%, #000 95%, transparent 100%);
}
.is-reading-session:not(.is-advancing):not(.is-retreating) .word-slide[data-carousel-slot=previous] .slide-word {
  position: absolute;
  top: 33%;
  transform: translateY(-50%);
  font-size: clamp(30px, 8vw, 42px);
  color: rgba(32, 34, 41, .68);
}

/* The sentence compatibility reader retains its existing card layout. */
.practice-view { grid-template-rows: minmax(0, 1fr); }
.is-reading-session:not(.is-advancing):not(.is-retreating) .word-slide:not([data-carousel-slot=current]) .slide-word.is-sentence-text {
  max-width: 100%; padding-inline: 16px; box-sizing: border-box;
  font-size: clamp(16px, 4.5vw, 23px); white-space: nowrap;
  overflow: hidden; text-overflow: ellipsis; display: block;
}
.is-reading-session .word-slide[data-carousel-slot=current].is-sentence-card.is-picture-visible .slide-picture { height: 72%; flex-basis: 72%; }
.is-reading-session .word-slide[data-carousel-slot=current].is-sentence-card.is-picture-visible .slide-word { font-size: clamp(21px, 5.5vw, 30px); padding: 6px 16px; }

/* Give the revealed illustration most of the space above the action row. */
.is-reading-session .word-slide[data-carousel-slot=current].is-picture-visible .slide-picture { height: 72%; flex-basis: 72%; }
.is-reading-session .word-slide[data-carousel-slot=current].is-picture-visible .slide-word { padding-block: 4px; }
@media (max-height: 650px), (max-width: 340px) {
  .is-reading-session .word-slide[data-carousel-slot=current].is-picture-visible .slide-picture { height: 62%; flex-basis: 62%; }
  .is-reading-session .word-slide[data-carousel-slot=current].is-sentence-card.is-picture-visible .slide-picture { height: 56%; flex-basis: 56%; }
}

/* Each revealed pair keeps its word and illustration in the same row. */
.word-slide[data-carousel-slot=current].is-word-pair-card.is-picture-visible .slide-picture { display: none; }
.word-slide[data-carousel-slot=current].is-word-pair-card.is-picture-visible .slide-word {
  display: grid; grid-template-rows: repeat(2, minmax(0, 1fr));
  width: 100%; height: 100%; padding: 12px 22px; gap: 0;
  font-size: clamp(36px, 11vw, 52px); line-height: 1.05;
}
.word-slide.is-picture-visible .word-pair-line {
  display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
  align-items: center; gap: 12px; width: 100%; height: 100%; min-height: 0;
}
.word-slide.is-picture-visible .word-pair-line + .word-pair-line { border-top: 1px solid var(--line); }
.word-pair-text { justify-self: center; border-radius: 6px; }
.word-pair-picture { display: block; width: 100%; height: 100%; min-height: 0; max-height: 160px; object-fit: contain; mix-blend-mode: multiply; }
.word-pair-line.is-speaking .word-pair-text { color: #08736d; background: #e0f1e9; box-shadow: 0 0 0 5px #e0f1e9; }
@media (max-height: 650px), (max-width: 340px) {
  .word-slide[data-carousel-slot=current].is-word-pair-card.is-picture-visible .slide-word { font-size: 34px; padding: 6px 16px; }
  .word-pair-picture { max-height: 108px; }
}

/* Word evidence details reuse the existing flower sheet and accessible controls. */
.phonics-review-due { font-size: .72rem; color: #875719; background: #fff0cf; padding: .16rem .4rem; border-radius: .5rem; }
.phonics-evidence { display: block; flex-basis: 100%; font-size: .72rem; color: #616b66; }
.flower-word-chip[data-skill-id] { flex-wrap: wrap; }

/* Quiet color at the paper edges keeps the unillustrated word in focus.
   The separate success rim remains responsible for post-answer celebration. */
.word-card::after {
  content: "";
  position: absolute;
  inset: 0;
  border-radius: inherit;
  pointer-events: none;
  background:
    linear-gradient(transparent 38%, rgba(229, 37, 33, .22) 52%, transparent 66%) left / 1px 100% no-repeat,
    linear-gradient(transparent 32%, rgba(23, 103, 232, .20) 46%, transparent 60%) right / 1px 100% no-repeat,
    linear-gradient(to right, transparent 74%, rgba(239, 181, 46, .30)) bottom / 100% 1px no-repeat;
  opacity: 0;
}
.word-slide[data-carousel-slot="current"] .word-card::after,
.word-stage.is-advancing .word-slide[data-carousel-slot="next"] .word-card::after,
.word-stage.is-retreating .word-slide[data-carousel-slot="previous"] .word-card::after { opacity: 1; }
.word-stage.is-advancing .word-slide[data-carousel-slot="current"] .word-card::after,
.word-stage.is-retreating .word-slide[data-carousel-slot="current"] .word-card::after { opacity: 0; }

.word-stage:not(.is-advancing):not(.is-retreating) .word-slide[data-carousel-slot="current"].is-picture-hidden:not(.is-sentence-card) .slide-word:not(.is-long-word):not(.is-word-pair),
.word-stage.is-advancing .word-slide[data-carousel-slot="next"].is-picture-hidden:not(.is-sentence-card) .slide-word:not(.is-long-word):not(.is-word-pair),
.word-stage.is-retreating .word-slide[data-carousel-slot="previous"].is-picture-hidden:not(.is-sentence-card) .slide-word:not(.is-long-word):not(.is-word-pair) {
  font-size: var(--focused-word-size, clamp(64px, 20vw, 100px));
}
.slide-word.is-short-word { --focused-word-size: clamp(88px, 30vw, 140px); }
.story-card::after { opacity: 1; }

/* Word artwork sits on the white card; sentence scenes retain their panel. */
.word-slide[data-carousel-slot="current"]:not(.is-sentence-card).is-picture-visible .slide-picture { background: #fff; }
.word-slide[data-carousel-slot="current"]:not(.is-sentence-card).is-picture-visible .slide-picture img,
.word-pair-picture { mix-blend-mode: normal; }

/* card-effects.css */
.reading-keepsakes { display:flex; align-items:center; gap:8px; margin-left:auto; }
.star-collection { display:flex; align-items:center; gap:5px; color:var(--ink); font-size:12px; white-space:nowrap; font-variant-numeric:tabular-nums; }
.star-collection > span { color:var(--reader-gold); font-size:20px; }
.star-collection strong { font-weight:600; }
.collection-note { color:#8b703d; font-size:14px; margin:12px 0; }
.card-reward { position:fixed; pointer-events:none; z-index:80; }
.reward-rim { position:absolute; inset:-3px; border-radius:inherit; overflow:hidden; padding:3px; opacity:0; -webkit-mask:linear-gradient(#fff 0 0) content-box,linear-gradient(#fff 0 0); -webkit-mask-composite:xor; mask:linear-gradient(#fff 0 0) content-box,linear-gradient(#fff 0 0); mask-composite:exclude; }
.reward-rim::before { content:''; position:absolute; width:150vmax; height:150vmax; left:50%; top:50%; background:conic-gradient(#f5b82e,#ef7b85,#a97ce2,#4caadf,#46bb99,#f5b82e); transform:translate(-50%,-50%) rotate(-80deg); }
.is-success .reward-rim { animation:reward-reveal 2000ms ease both; }
.is-success .reward-rim::before { animation:reward-turn 2000ms ease both; }
.reward-glint { position:absolute; right:-9px; top:94px; font-size:22px; color:#d0b16a; opacity:0; }
.is-success .reward-glint { animation:reward-reveal 1200ms ease both; }
.reward-box { position:absolute; top:88px; left:calc(50% - 16px); width:32px; height:23px; border:1px solid #b38b48; border-radius:3px 3px 7px 7px; background:linear-gradient(135deg,#e7c37f,#cfaa64); color:#fff4d3; text-align:center; opacity:0; }
.reward-box i { position:absolute; left:-3px; top:-5px; width:36px; height:9px; border:1px solid #b38b48; border-radius:3px; background:#edd299; transform-origin:15% 100%; }
.is-help .reward-box { animation:reward-reveal 1200ms ease both; }
.is-help .reward-box i { animation:reward-open 1200ms ease both; }
.reward-star { position:absolute; left:calc(50% - 12px); top:66px; width:24px; line-height:28px; text-align:center; font-size:26px; color:#dcb45e; text-shadow:0 0 18px #ebc76950; animation:reward-flight 1200ms cubic-bezier(.22,.65,.3,1) both; }
@keyframes reward-reveal { 0%,100% { opacity:0; } 15%,72% { opacity:1; } }
@keyframes reward-turn { to { transform:translate(-50%,-50%) rotate(280deg); } }
@keyframes reward-open { 0%,12%,100% { transform:rotate(0); } 32%,73% { transform:translate(-3px,-9px) rotate(-24deg); } }
@keyframes reward-flight { 0%,12% { opacity:0; transform:translate(0,15px) scale(.3); } 30% { opacity:1; transform:translate(0,-34px) scale(1.1); } 48% { opacity:1; transform:translate(0,-38px) scale(1); } 87% { opacity:1; transform:translate(var(--star-x),var(--star-y)) scale(.45); } 100% { opacity:0; transform:translate(var(--star-x),var(--star-y)) scale(.3); } }
@media (prefers-reduced-motion:reduce) { .reward-star,.reward-box,.reward-glint { display:none; } .reward-rim::before { animation:none!important; } .is-help .reward-rim { background:#d6bc7b; animation:reward-reveal 1200ms ease both; } }

/* completion.css */
/* Sunshine Story Bay. Raster illustration layers keep the toy diorama intact;
   the short welcome/celebration motion never blocks a reading interaction. */
.reading-victory {
  --bay-ink: #15284c;
  --bay-blue: #0078c7;
  padding: 0;
  max-height: none;
  overflow: hidden;
  border-radius: 28px;
  background: #fff;
  text-align: center;
  color: var(--bay-ink);
  box-shadow: 0 12px 32px rgba(20, 82, 121, .09);
}
.story-bay-scene {
  position: relative;
  height: clamp(250px, 41svh, 370px);
  overflow: hidden;
  isolation: isolate;
  background: #4dccf6;
}
.story-bay-scene img { position: absolute; display: block; pointer-events: none; user-select: none; }
.bay-backdrop { inset: 0; width: 100%; height: 100%; object-fit: cover; }
.bay-boat {
  width: 79%; height: 87%; object-fit: contain; left: 7%; bottom: 3%;
  transform-origin: 50% 85%; animation: bay-boat-rock 2.4s ease-in-out 2;
}
.bay-star {
  width: 25%; height: 25%; object-fit: contain; left: 38%; top: 1%;
  animation: bay-star-cheer 1.5s ease-in-out 3;
}
.bay-bubble { width: 12%; height: auto; aspect-ratio: 1; opacity: .9; animation: bay-bubble-rise 4.8s ease-in-out both; }
.bay-bubble-left { left: 5%; top: 49%; }
.bay-bubble-right { right: 4%; top: 24%; width: 9%; animation-duration: 4.4s; }
.bay-bubble-high { left: 41%; top: 9%; width: 7%; animation-duration: 4s; }
.bay-wave { width: 116%; height: 33%; left: -8%; bottom: -1%; object-fit: fill; animation: bay-wave-roll 2.4s ease-in-out 2; }
.victory-copy { position: relative; padding: 21px 22px 18px; background: #fff; }
.victory-kicker { display: block; color: #9b4c13; font-size: 11px; font-weight: 800; letter-spacing: 2px; line-height: 1.3; }
.reading-victory .victory-title {
  display: block; margin: 7px 0 9px; color: var(--bay-ink);
  font-family: ui-rounded, "SF Pro Rounded", "Avenir Next Rounded", system-ui, sans-serif;
  font-size: clamp(27px, 7.7vw, 33px); line-height: 1.12; font-weight: 900; letter-spacing: -.9px;
}
.victory-tally { display: block; margin: 0; font-size: 13px; line-height: 1.5; color: #405273; }
.reading-victory .victory-note { display: block; margin: 10px 0 16px; font-size: 14px; line-height: 1.5; color: #405273; }
.reading-victory .collection-note { margin: 15px 0 17px; color: #93501a; font-size: 14px; font-weight: 650; }
.reading-victory .victory-rest, .reading-victory .victory-again {
  display: flex; align-items: center; justify-content: center; text-align: center;
}
.reading-victory .victory-rest {
  box-sizing: border-box; margin: 0; width: 100%; min-height: 51px;
  padding: 12px 16px; border: 1px solid #168fe1; border-radius: 24px;
  background: var(--bay-blue); color: #fff; font-size: 18px; line-height: 25px; font-weight: 800;
  box-shadow: inset 0 3px 0 rgba(255, 255, 255, .28), 0 4px 0 #0064ac, 0 7px 12px rgba(13, 90, 148, .12);
  cursor: pointer; transition: transform .15s, box-shadow .15s;
}
.reading-victory .victory-rest:active { transform: translateY(3px); box-shadow: inset 0 2px 0 rgba(255,255,255,.2), 0 1px 0 #0064ac; }
.reading-victory .victory-rest:disabled { opacity: .55; cursor: wait; }
.reading-victory .victory-again { margin: 10px auto 0; padding: 8px 18px; min-height: 44px; border: 0; background: transparent; color: #405273; font-size: 14px; line-height: 24px; cursor: pointer; }
.reading-victory button:focus-visible { outline: 3px solid #15284c; outline-offset: -5px; }
.victory-rest::after, .victory-again::after, .reading-door::after { border: 0; }
.session-welcome .reading-door { display: block; width: 100%; margin: 0; padding: 0; border: 0; border-radius: 0; overflow: hidden; background: #4dccf6; cursor: pointer; }
.session-welcome .victory-copy { padding: 21px 22px 27px; }
.session-welcome .victory-title { max-width: 315px; margin: 0 auto 10px; }
.session-welcome .victory-note { margin: 0; font-size: 15px; }
.session-welcome .victory-tally { margin: 11px 0 18px; font-size: 12px; }
.session-welcome .victory-rest { min-height: 54px; }
/* The welcome and carousel are mutually exclusive, including during entry. */
.session-welcome:not([hidden]) + .word-stage { display: none; }
.reading-panel.reading-entry-transition,
.word-stage.reading-entry-transition .word-slide.is-current .word-card {
  animation: bay-entry-in .28s ease-out;
}
/* The quiet ground reaches the viewport edges, including the home-indicator
   area. Only the foreground reacts; the card and its safe-area spacing stay put. */
.reading-shore {
  position: fixed; inset: auto 0 0; z-index: 0;
  height: clamp(100px, 19dvh, 170px);
  overflow: hidden; pointer-events: none; user-select: none;
}
.reading-shore img { display: block; pointer-events: none; user-select: none; }
.shore-background {
  position: absolute; inset: auto 0 0; width: 100%; height: clamp(60px, 12dvh, 110px);
  object-fit: cover; object-position: center bottom;
}
.shore-reaction { position: absolute; inset: 0; visibility: hidden; opacity: 0; }
.shore-reaction-success img {
  position: absolute; bottom: 0; left: 50%; transform: translateX(-50%);
  width: min(100%, 480px); height: calc(100% - 34px);
  object-fit: contain; object-position: center bottom;
}
.shore-caption { color: #77716b; font-size: 14px; font-weight: 650; line-height: 1.4; }
.shore-reaction-success .shore-caption { display: block; text-align: center; padding-top: 2px; }
.shore-reaction-help img { position: absolute; right: -4px; bottom: -5px; width: clamp(82px, 25vw, 112px); height: auto; }
.shore-reaction-help .shore-caption {
  position: absolute; right: clamp(94px, 29vw, 128px);
  bottom: max(18px, calc(env(safe-area-inset-bottom) + 10px));
}
.reading-shore[data-reaction="success"] .shore-reaction-success,
.reading-shore[data-reaction="help"] .shore-reaction-help {
  visibility: visible; animation: shore-response 1600ms ease-out both;
}
.word-stage.is-reading-session:not(.is-sentence-reading) { padding-bottom: clamp(90px, 17dvh, 160px); }
.is-reading-session:not(.is-sentence-reading) .carousel-window { z-index: 1; }
.word-stage:not(.is-reading-session) .reading-shore, .word-stage.is-sentence-reading .reading-shore { display: none; }
.is-reading-session:not(.is-sentence-reading) .carousel-window { height: clamp(340px, calc(100dvh - 320px), 560px); }
@keyframes shore-response {
  0% { opacity: 0; transform: translateY(24px); }
  16%, 78% { opacity: 1; transform: translateY(0); }
  100% { opacity: 0; transform: translateY(16px); }
}
@keyframes bay-boat-rock { 0%, 100% { transform: translateY(0) rotate(-1deg); } 50% { transform: translateY(-7px) rotate(1.5deg); } }
@keyframes bay-wave-roll { 0%, 100% { transform: translateX(-1%); } 50% { transform: translateX(1%) translateY(4px); } }
@keyframes bay-star-cheer { 0%, 100% { transform: translateY(0) rotate(-5deg); } 50% { transform: translateY(-5px) rotate(5deg) scale(1.04); } }
@keyframes bay-bubble-rise { from { transform: translateY(23px) scale(.85); opacity: .1; } 35% { opacity: .9; } to { transform: translateY(-12px) scale(1); opacity: .85; } }
@keyframes bay-entry-in { from { opacity: .85; transform: scale(.98); } }
@media (max-width: 350px), (max-height: 700px) {
  .story-bay-scene { height: 235px; }
  .victory-copy, .session-welcome .victory-copy { padding: 15px 20px 20px; }
  .reading-victory .victory-title { font-size: 27px; }
  .reading-victory .victory-note { margin: 8px 0 12px; font-size: 13px; }
  .reading-victory .collection-note { margin: 12px 0; }
  .session-welcome .victory-tally { margin: 8px 0 14px; }
  .reading-shore { height: 92px; }
  .shore-background { height: 58px; }
  .shore-reaction-success img { height: 66px; }
  .shore-reaction-help img { width: 78px; }
  .shore-reaction-help .shore-caption { right: 88px; }
  .shore-caption { font-size: 12px; }
  .word-stage.is-reading-session:not(.is-sentence-reading) { padding-bottom: 70px; }
  .is-reading-session:not(.is-sentence-reading) .carousel-window { height: max(340px, calc(100dvh - 245px)); }
}
@media (max-height: 600px) { .story-bay-scene { height: 210px; } }
@media (prefers-reduced-motion: reduce) {
  .story-bay-scene img,
  .reading-panel.reading-entry-transition,
  .word-stage.reading-entry-transition .word-slide.is-current .word-card { animation: none; }
  .reading-victory .victory-rest { transition: none; }
  .reading-shore[data-reaction] .shore-reaction { animation: none; transform: none; }
  .reading-shore[data-reaction="success"] .shore-reaction-success,
  .reading-shore[data-reaction="help"] .shore-reaction-help { opacity: 1; }
}

/* reader-progress.css */
:root { --parent-fill: #f2f7ff; --parent-secondary: #606979; --parent-divider: #dfe7f3; --parent-accent: #164f99; --parent-gold-soft: #fff5cf; }
/* A compact reading report: numbers first, settings before the full phase chart. */
.summary-view { gap: 18px; padding-bottom: 28px; }
.parent-section-heading { display: flex; justify-content: space-between; align-items: center; gap: 12px; }
.parent-eyebrow { margin: 0; color: var(--parent-secondary); font-size: 9px; font-weight: 750; letter-spacing: 1.6px; }
.parent-settings-shortcut { min-height: 44px; padding: 10px 13px; border: 1px solid var(--parent-divider); border-radius: 10px; background: transparent; color: var(--parent-accent); font-size: 13px; font-weight: 650; cursor: pointer; }
.parent-settings-shortcut span { margin-left: 5px; }
.parent-section-heading h2 { margin: 0; font-size: 16px; line-height: 1.3; letter-spacing: -.3px; }
.parent-section-heading > span { color: var(--parent-secondary); font-size: 10px; font-weight: 500; text-align: right; }
.parent-today { padding: 18px 20px 14px; border-radius: 18px; background: var(--surface); color: var(--ink); box-shadow: inset 0 0 0 1px var(--parent-divider); }
.parent-today-numbers { display: grid; grid-template-columns: repeat(2,minmax(0,1fr)); margin: 14px 0 10px; }
.parent-today-numbers > div { display: flex; align-items: baseline; gap: 9px; min-width: 0; }
.parent-today-numbers > div + div { padding-left: 18px; border-left: 1px solid var(--parent-divider); }
.parent-today-numbers strong { font-size: 36px; line-height: 1; font-weight: 750; letter-spacing: -1.5px; font-variant-numeric: tabular-nums; }
.parent-today-numbers span { max-width: 70px; color: var(--parent-secondary); font-size: 11px; line-height: 1.35; }
.parent-count-note { margin: 10px 0 0; color: var(--parent-secondary); font-size: 10px; line-height: 1.5; }
.parent-time-use { margin-top: 14px; padding-top: 12px; border-top: 1px solid var(--parent-divider); }
.parent-time-heading, .parent-time-values > div { display: flex; align-items: center; justify-content: space-between; gap: 10px; }
.parent-time-heading { color: var(--ink); font-size: 11px; font-weight: 650; }
.parent-time-heading strong { color: var(--ink); font-size: 15px; font-variant-numeric: tabular-nums; }
.parent-time-bar { display: flex; overflow: hidden; height: 9px; margin: 9px 0 8px; border-radius: 999px; background: var(--parent-divider); }
.parent-time-bar > span { min-width: 0; height: 100%; }
.parent-time-bar .is-words, .parent-time-values i.is-words { background: var(--reader-blue); }
.parent-time-bar .is-sentences, .parent-time-values i.is-sentences { background: var(--reader-gold); }
.parent-time-values { display: grid; grid-template-columns: repeat(2,minmax(0,1fr)); gap: 8px 18px; }
.parent-time-values > div > span { display: flex; align-items: center; gap: 6px; min-width: 0; color: var(--ink); font-size: 10px; line-height: 1.35; }
.parent-time-values i { flex: 0 0 auto; width: 8px; height: 8px; border-radius: 50%; }
.parent-time-values strong { flex: 0 0 auto; color: var(--ink); font-size: 11px; font-variant-numeric: tabular-nums; }
.parent-time-note { margin: 7px 0 0; color: var(--parent-secondary); font-size: 9px; line-height: 1.4; }
.parent-empty { display: flex; align-items: center; justify-content: space-between; gap: 8px; margin-top: 8px; border-top: 1px solid var(--parent-divider); padding-top: 5px; font-size: 11px; }
.parent-empty button { min-height: 36px; padding: 4px 0 4px 8px; background: transparent; color: var(--parent-accent); font-size: 11px; font-weight: 650; cursor: pointer; }
.parent-overview { display: grid; grid-template-columns: .9fr 1.1fr; padding: 2px 2px 4px; color: var(--ink); }
.parent-overview h2 { margin: 0; font-size: 19px; letter-spacing: -.45px; line-height: 1.3; }
.phonics-overview { padding-right: 18px; border-right: 1px solid var(--parent-divider); }
#readerProgress { min-width: 0; padding-left: 20px; }
.parent-pattern { margin: 4px 0 14px; color: var(--parent-secondary); font-size: 11px; line-height: 1.4; overflow-wrap: anywhere; }
.phonics-ready-ring { width: 92px; height: 92px; position: relative; display: grid; place-items: center; border-radius: 50%; background: conic-gradient(var(--reader-blue) var(--ready),var(--parent-divider) 0); }
.phonics-ready-ring::before { content: ""; position: absolute; inset: 7px; border-radius: 50%; background: var(--background); }
.phonics-ring-value { position: relative; display: flex; align-items: baseline; gap: 3px; }
.phonics-ring-value strong { font-size: 27px; line-height: 1; letter-spacing: -1px; }
.phonics-ring-value span { color: var(--parent-secondary); font-size: 12px; }
.parent-stat-label { margin: 8px 0 0; color: var(--parent-secondary); font-size: 11px; }
.reader-sentence-counts { display: grid; grid-template-columns: repeat(2,minmax(0,1fr)); gap: 10px; }
.reader-sentence-count { min-width: 0; }
.reader-sentence-value { display: flex; align-items: center; gap: 5px; }
.reader-sentence-value strong { font-size: 31px; line-height: 1.15; letter-spacing: -1px; font-variant-numeric: tabular-nums; }
.reader-sentence-value .reader-feedback-icon { flex-shrink: 0; width: 16px; height: 16px; font-size: 11px; }
.reader-sentence-label { display: block; margin-top: 6px; color: var(--parent-secondary); font-size: 11px; line-height: 1.4; }
.reader-current-story { margin-top: 14px; padding-top: 10px; border-top: 1px solid var(--parent-divider); }
.reader-story-phase { margin: 0 0 3px; color: var(--parent-secondary); font-size: 10px; line-height: 1.4; }
.reader-current-story h3 { margin: 0; color: var(--ink); font-size: 12px; line-height: 1.4; font-weight: 650; overflow-wrap: anywhere; }
.reader-story-counts { display: flex; flex-wrap: wrap; gap: 4px 10px; margin: 7px 0 4px; font-size: 12px; line-height: 1.4; font-variant-numeric: tabular-nums; }
.reader-story-counts .is-independent { color: var(--parent-accent); }
.reader-story-counts .is-assisted { color: #795900; }
.reader-story-counts .is-remaining { color: var(--parent-secondary); font-size: 10px; align-self: center; }
.reader-story-status, .reader-story-earned { margin: 0; color: var(--parent-secondary); font-size: 10px; line-height: 1.5; }
.reader-story-earned { margin-top: 3px; color: var(--parent-accent); }
.reader-history-total { margin: 0 0 10px; font-size: 12px; color: var(--parent-secondary); }
.reader-visual { margin-top: 15px; }
.reader-feedback { display: grid; gap: 5px; margin-top: 8px; }
.reader-feedback-row { display: grid; grid-template-columns: 18px 22px minmax(0,1fr); align-items: center; gap: 5px; color: var(--parent-secondary); font-size: 10px; }
.reader-feedback-row strong { font-size: 16px; line-height: 1.2; font-variant-numeric: tabular-nums; color: var(--ink); }
.reader-feedback-icon { display: grid; place-items: center; width: 18px; height: 18px; border-radius: 50%; font-size: 12px; font-weight: 750; }
.is-independent .reader-feedback-icon { color: var(--parent-accent); background: var(--reader-blue-soft); }
.is-assisted .reader-feedback-icon { color: #795900; background: var(--parent-gold-soft); }
.reader-visual > .reader-window:first-child { margin: 0 0 6px; }
.reader-read-bar { display: flex; gap: 2px; height: 9px; }
.reader-read-bar span { flex: 1; min-width: 0; border-radius: 2px; }
.reader-read-bar .is-independent { background: var(--reader-blue); }
.reader-read-bar .is-assisted { background: repeating-linear-gradient(135deg,var(--reader-gold) 0 2px,var(--parent-gold-soft) 2px 4px); }
.reader-window { margin: 6px 0 0; color: var(--parent-secondary); font-size: 10px; line-height: 1.4; }
.summary-view .practice-settings-card { margin: 0; padding: 18px 20px; border-radius: 18px; }
.summary-view .practice-settings-heading { margin-bottom: 10px; }
.summary-view .practice-settings-heading h2 { font-size: 17px; }
.summary-view .practice-settings-values > div { padding: 8px 0; font-size: 12px; }
.summary-view .practice-settings-plan { margin-top: 9px; padding: 10px; font-size: 11px; }
.parent-phase-chart { padding-top: 7px; }
.parent-phase-chart .parent-section-heading { margin-bottom: 8px; }
.parent-phase-chart .phase-list { gap: 0; }
.parent-phase-chart .phase-card { padding: 12px 0; gap: 8px; border: 0; border-top: 1px solid var(--parent-divider); border-radius: 0; background: transparent; box-shadow: none; }
.parent-phase-chart .phase-head { gap: 10px; align-items: center; }
.parent-phase-chart .phase-title-block { gap: 3px; }
.parent-phase-chart .phase-label-line > span:first-child { font-size: 9px; font-weight: 600; text-transform: uppercase; letter-spacing: .6px; color: var(--parent-secondary); }
.parent-phase-chart .phase-card .phase-head strong { font-size: 13px; line-height: 1.3; font-weight: 600; color: var(--ink); }
.parent-phase-chart .phase-actions { display: flex; align-items: center; gap: 8px; }
.parent-phase-chart .phase-card .phase-actions > strong { color: var(--ink); font-size: 12px; font-variant-numeric: tabular-nums; }
.parent-phase-chart .phase-track { height: 5px; background: var(--parent-divider); }
.parent-phase-chart .phase-expand { min-width: 44px; min-height: 44px; padding: 4px; background: transparent; box-shadow: none; color: var(--parent-accent); font-size: 10px; cursor: pointer; }
.parent-phase-chart .phase-expand[aria-expanded="true"] { text-decoration: underline; }
.parent-phase-chart .phase-lock-badge { color: var(--parent-secondary); font-size: 9px; font-weight: 500; }
.parent-phase-chart .phase-card.is-current-phase .phase-label-line > span:first-child { color: var(--parent-accent); font-weight: 800; }
.parent-phase-chart .phase-card.is-current-phase .phase-label-line > span:first-child::after { content: " · NOW"; }
.parent-phase-chart .phase-card.is-locked .phase-head strong { color: var(--parent-secondary); }
.parent-phase-chart .phase-details { padding: 8px 12px 12px; background: var(--surface); border-radius: 12px; }
.parent-phase-chart .phase-detail-list { display: none; }
.parent-phase-chart .phase-details .progress-row { padding: 9px 0; }
.parent-phase-chart .title-with-info { gap: 4px; }
.parent-phase-chart .info-button { min-width: 28px; min-height: 28px; }
.parent-progress-tabs { display: flex; gap: 4px; width: fit-content; padding: 3px; margin: 4px 0 12px; border: 1px solid var(--parent-divider); border-radius: 11px; background: #ffffff50; }
.parent-progress-tabs button { min-width: 102px; min-height: 44px; padding: 9px 18px; border-radius: 8px; color: var(--parent-secondary); background: transparent; font-size: 13px; font-weight: 650; cursor: pointer; transition: background-color 160ms ease, color 160ms ease; }
.parent-progress-tabs button:hover { background: var(--reader-blue-soft); }
.parent-progress-tabs button[aria-selected="true"] { color: #fff; background: var(--parent-accent); }
.phase-chart-caption { margin: 0 0 10px; color: var(--parent-secondary); font-size: 11px; line-height: 1.4; }
.reader-phase-legend { display: flex; flex-wrap: wrap; gap: 8px 13px; margin-bottom: 12px; color: var(--parent-secondary); font-size: 10px; line-height: 1.5; }
.reader-phase-legend > span { display: flex; align-items: center; gap: 5px; }
.reader-phase-legend i { display: grid; place-items: center; width: 14px; height: 14px; border-radius: 4px; font-size: 10px; font-style: normal; font-weight: 750; }
.reader-phase-legend .is-independent { color: #fff; background: var(--reader-blue); }
.reader-phase-legend .is-assisted { color: var(--ink); background: var(--reader-gold); }
.reader-phase-legend .is-untried { background: var(--parent-divider); }
.reader-phase-row { padding: 12px 0; border-top: 1px solid var(--parent-divider); }
.reader-phase-heading { display: flex; align-items: center; justify-content: space-between; gap: 16px; }
.reader-phase-title { min-width: 0; }
.reader-phase-title > span { color: var(--parent-secondary); font-size: 9px; font-weight: 600; text-transform: uppercase; letter-spacing: .6px; }
.reader-phase-title h3 { margin: 3px 0 0; color: var(--ink); font-size: 13px; line-height: 1.3; font-weight: 600; }
.reader-phase-count { flex-shrink: 0; color: var(--ink); font-size: 13px; font-variant-numeric: tabular-nums; }
.reader-phase-track { display: flex; overflow: hidden; height: 7px; margin-top: 10px; border-radius: 4px; background: var(--parent-divider); }
.reader-phase-fill { flex-shrink: 0; height: 100%; transition: width 180ms ease; }
.reader-phase-fill.is-independent { background: var(--reader-blue); }
.reader-phase-fill.is-assisted { background: repeating-linear-gradient(135deg,var(--reader-gold) 0 2px,var(--parent-gold-soft) 2px 4px); }
.reader-phase-outcomes { display: flex; gap: 14px; margin-top: 6px; color: var(--parent-secondary); font-size: 10px; font-variant-numeric: tabular-nums; }
.reader-phase-outcomes .is-independent { color: var(--parent-accent); }
.reader-phase-outcomes .is-assisted { color: #795900; }
.reader-phase-outcomes > span:last-child { margin-left: auto; }
.reader-recent-details { margin-top: 12px !important; }
#readerRecentAttempts { padding: 0 2px 16px; }
#readerRecentAttempts .reader-visual { margin-top: 0; }
#readerRecentAttempts .reader-feedback { grid-template-columns: 1fr 1fr; gap: 12px; }
.parent-progress-panel:focus-visible { outline: 2px solid var(--parent-accent); outline-offset: 4px; }
.parent-details { width: 100%; margin: 0; border-top: 1px solid var(--parent-divider); }
.parent-details > summary { display: flex; justify-content: space-between; align-items: center; gap: 10px; min-height: 48px; padding: 12px 2px; color: var(--ink); font-size: 13px; font-weight: 600; list-style: none; cursor: pointer; }
.parent-details > summary::-webkit-details-marker { display: none; }
.parent-details > summary::after { content: "+"; font-size: 20px; font-weight: 400; }
.parent-details[open] > summary::after { content: "−"; }
#wordActivityDetails .today-kpi-grid { grid-template-columns: repeat(2,minmax(0,1fr)); }
.parent-guidance .reading-summary { padding: 14px; margin: 0 0 12px; }
.summary-view button:focus-visible, .summary-view summary:focus-visible { outline: 3px solid var(--parent-accent); outline-offset: 3px; }
.parent-settings-shortcut:hover { background: var(--reader-blue-soft); }
.parent-settings-shortcut:active { transform: translateY(1px); }
.summary-view.is-active .parent-today { animation: parent-summary-in 240ms ease-out both; }
.summary-view.is-active .parent-overview { animation: parent-summary-in 280ms 40ms ease-out both; }
@keyframes parent-summary-in { from { opacity: 0; transform: translateY(5px); } to { opacity: 1; transform: translateY(0); } }
@media (max-width: 350px) {
  .parent-today { padding: 16px; }
  .parent-today-numbers strong { font-size: 31px; }
  .parent-today-numbers > div + div { padding-left: 12px; }
  .parent-time-values { grid-template-columns: 1fr; gap: 5px; }
  #readerProgress { padding-left: 14px; }
  .phonics-overview { padding-right: 14px; }
  .summary-view .practice-settings-card { padding: 16px; }
  .parent-phase-chart .phase-actions { gap: 3px; }
  .reader-sentence-counts { gap: 6px; }
  .reader-sentence-value { gap: 3px; }
  .reader-sentence-value strong { font-size: 25px; }
  .reader-sentence-label { font-size: 10px; }
}
@media (prefers-reduced-motion: reduce) {
  .summary-view.is-active .parent-today, .summary-view.is-active .parent-overview { animation: none; }
  .summary-view .phase-fill, .summary-view .progress-fill { transition: none; }
  .parent-progress-tabs button, .reader-phase-fill { transition: none; }
}

/* Reading evidence appears in the Sentence attempts sheet. */
.parent-reading-progress .parent-section-heading h2 { font-size: 21px; }
.parent-reading-progress .phase-chart-caption { margin-top: 8px; font-size: 13px; }
.parent-reading-progress .reader-phase-legend { font-size: 12px; }
.parent-reading-progress .reader-phase-title h3 { font-size: 15px; }
.parent-reading-progress .reader-phase-count { font-size: 16px; }

/* Shared neutral surfaces keep the overview and practice settings cohesive. */
.parent-today .summary-date, .parent-today > .parent-count-note { color: var(--parent-secondary); }
.summary-view .practice-settings-card { background: #fff; }
.summary-view .practice-settings-heading button { background: var(--reader-blue-soft); color: var(--parent-accent); }
.summary-view .practice-settings-heading button:hover { background: var(--reader-blue-soft); }
.summary-view .practice-settings-plan { background: var(--parent-fill); color: var(--parent-accent); box-shadow: inset 3px 0 0 var(--reader-gold); }
.summary-view .practice-settings-values dt { color: var(--parent-secondary); }
.summary-view .practice-settings-values > div { border-color: var(--parent-divider); }

/* story-reading.css */
/* Story Bay colours stay in the chrome so the sentence and its artwork lead. */
.story-reading {
  --story-ink: #15284c;
  --story-blue: #0078c7;
  --story-muted: #405273;
  --story-soft: #edf6ff;
  --story-line: #d4e5f5;
  --story-gold: #efb52e;
  color: var(--story-ink);
}
.story-reading { border-radius: 28px; background: #fff; overflow: hidden; box-shadow: 0 12px 32px #14527917; }
.reading-panel.story-reading { padding: 0; max-height: none; }
.story-copy { padding: clamp(20px, 5vw, 32px); display: grid; gap: 20px; }
.story-copy > * { margin: 0; min-width: 0; }
.story-kicker { color: #93501a; font-size: .78rem; font-weight: 700; letter-spacing: .07em; }
.story-title { color: var(--story-ink); font-size: clamp(29px, 7vw, 38px); line-height: 1.16; }
.story-sentence { color: var(--story-ink); font-family: 'Nunito', sans-serif; font-size: clamp(28px, 7vw, 38px); line-height: 1.35; padding-block: 20px; overflow-wrap: break-word; }
.story-note { color: var(--story-muted); line-height: 1.6; }
.story-illustration { display: block; width: 100%; height: auto; object-fit: contain; border-radius: 18px; }
.story-reading > .story-illustration { border-radius: 0; max-height: 320px; }
.story-controls { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; }
.story-button {
  display: flex;
  align-items: center;
  justify-content: center;
  text-align: center;
  min-width: 0;
  min-height: 50px;
  border-radius: 24px;
  padding: 12px 10px;
  border: 1px solid var(--story-line);
  background: var(--story-soft);
  color: var(--story-ink);
  font: inherit;
  font-weight: 700;
  line-height: 1.25;
  cursor: pointer;
}
.story-button.is-primary { background: var(--story-blue); color: #fff; border-color: #168fe1; box-shadow: inset 0 3px 0 #ffffff47, 0 4px 0 #0064ac; }
.story-button.is-primary:active:not(:disabled) { transform: translateY(2px); box-shadow: inset 0 2px 0 #ffffff33, 0 2px 0 #0064ac; }
.story-button:focus-visible { outline: 3px solid var(--story-ink); outline-offset: 4px; }
.story-button:disabled { opacity: .45; cursor: default; }
.story-audio-status { color: var(--story-muted); font-size: .85rem; min-height: 1.2em; }
.story-progress { display: flex; flex-wrap: nowrap; gap: 5px; width: 100%; }
.story-progress > span { flex: 1 1 0; min-width: 0; height: 6px; border-radius: 8px; background: var(--story-line); }
.story-progress > .is-done { background: var(--story-blue); }
.story-progress > .is-current { background: var(--story-gold); }
.app:has(.practice-view.is-active .story-retell-copy) .app-header { position: absolute; }
.story-retell-copy { padding: 18px clamp(12px, 3.6vw, 18px) 22px; gap: 16px; }
.reading-panel .story-retell-copy .story-title {
  max-width: 21ch;
  margin: 0 auto 2px;
  font-size: clamp(23px, 6.7vw, 30px);
  line-height: 1.17;
  letter-spacing: -.018em;
  text-wrap: balance;
}
.story-retell-scenes { display: flex; flex-direction: column; gap: 12px; }
.story-retell-scene > .story-illustration, .story-retell-scene > .story-atlas { border-radius: 14px; }
.story-moral { margin: 18px 0; padding: 14px 16px; border-left: 3px solid var(--story-gold); color: var(--story-ink); background: var(--story-soft); border-radius: 0 10px 10px 0; }
.story-moral p { margin: 0; font-size: 17px; line-height: 1.55; }
.story-moral .story-moral-label { margin-bottom: 5px; font-size: 12px; font-weight: 700; color: var(--story-muted); }
.story-retell-status:empty { display: none; }
.story-retell-text { font-size: .9rem; color: var(--story-ink); line-height: 1.5; background: var(--story-soft); padding: 12px; border-radius: 12px; }
@media (prefers-reduced-motion: no-preference) { .story-reading .story-illustration { animation: story-picture-in .2s ease-out; } @keyframes story-picture-in { from { opacity: 0; } to { opacity: 1; } } }

.story-atlas { position: relative; width: 100%; aspect-ratio: 1; overflow: hidden; border-radius: 18px; }
.story-atlas > img { position: absolute; width: calc(var(--atlas-columns) * 100%); max-width: none; height: calc(var(--atlas-rows) * 100%); left: calc(var(--atlas-column) * -100%); top: calc(var(--atlas-row) * -100%); object-fit: fill; border-radius: 0; }

/* Use the familiar practice card: picture above reading, actions at the foot. */
.reading-panel.story-reading:has(.story-card-shell) { padding: 0; max-height: none; overflow: visible; background: transparent; box-shadow: none; }
.story-copy.story-card-shell { padding: 0; gap: 12px; }
.story-card-shell > .story-kicker { font-size: 12px; }
.word-card.story-card { height: clamp(390px, calc(100dvh - 260px), 520px); padding: 0; display: grid; grid-template-rows: minmax(0, 1fr) auto; align-items: stretch; justify-content: stretch; gap: 0; overflow: hidden; background: var(--surface); border-radius: 18px; }
.story-card.is-revealed { border-radius: 18px; }
.story-card-body { min-height: 0; display: grid; }
.story-card.is-revealed .story-card-body { grid-template-rows: minmax(0, 1fr) auto; }
.reading-panel .story-card .story-sentence { margin: 0; max-width: none; padding: 18px 20px; display: grid; place-content: center; font-family: var(--practice-word-font); font-size: clamp(32px, 8.8vw, 42px); line-height: 1.2; text-wrap: balance; overflow-wrap: normal; }
.reading-panel .story-card.is-revealed .story-sentence { min-height: 84px; padding: 12px 18px; font-size: clamp(23px, 6.5vw, 30px); }
.story-card-picture { position: relative; min-height: 0; display: grid; place-items: center; overflow: hidden; background: #fff; container-type: size; }
.story-card-picture > img { width: 100%; height: 100%; object-fit: contain; border-radius: 0; }
.story-card-picture > .story-atlas { width: min(100cqw, calc(100cqh * var(--scene-ratio))); border-radius: 0; }
.story-card-footer { padding: 0 clamp(16px, 5vw, 28px) 18px; display: grid; gap: 8px; }
.story-card .story-controls { gap: 8px; }
.story-card .story-button { min-height: 50px; border-radius: 24px; padding: 8px 4px; font-size: 14px; }
.story-card .attempt { border: 0; background: var(--surface); color: var(--story-muted); }
.story-card .attempt:active { background: var(--reader-blue-soft); color: var(--ink); }
.story-card .attempt:first-child .attempt-icon { color: var(--reader-red); }
.story-card .attempt:last-child .attempt-icon { color: var(--reader-blue); }
.story-card .story-button:not(.attempt):not(.is-primary) { background: var(--surface); border-color: var(--story-line); color: var(--story-muted); }
.story-card .story-audio-status { margin: 0; min-height: 18px; font-size: 12px; line-height: 1.5; }
@media (max-height: 650px), (max-width: 340px) {
  .reading-panel .story-card .story-sentence { font-size: 30px; padding: 12px 16px; }
  .reading-panel .story-card.is-revealed .story-sentence { min-height: 74px; padding: 8px 14px; font-size: 23px; }
  .story-card-footer { padding-bottom: 14px; }
}

/* A short, spoken invitation bridges the word warm-up and the story. */
.story-cover-picture { aspect-ratio: 4 / 3; position: relative; display: grid; place-items: center; overflow: hidden; background: #fff; container-type: size; }
.story-cover-picture > img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: contain; border-radius: 0; }
.story-cover-picture > .story-atlas { width: min(100cqw, calc(100cqh * var(--scene-ratio))); border-radius: 0; }
.story-cover-copy { padding: 20px; gap: 12px; }
.reading-panel .story-cover-copy .story-title { margin: 0; font-size: 28px; line-height: 1.15; }
.reading-panel .story-teaser { margin: 0; font-size: 18px; line-height: 1.45; color: var(--story-muted); text-wrap: balance; }
@media (max-width: 340px), (max-height: 650px) {
  .story-cover-copy { padding: 16px; gap: 9px; }
  .reading-panel .story-cover-copy .story-title { font-size: 24px; }
  .reading-panel .story-teaser { font-size: 16px; }
}

/* listening.css */
.listening-panel { margin: 1rem 0; padding: 1rem; border: 1px solid var(--parent-divider); border-radius: 16px; background: var(--surface); color: var(--ink); }
.listening-panel summary { font-weight: 700; cursor: pointer; color: var(--parent-accent); }
.listening-panel p { line-height: 1.5; }
.listening-consent { display: flex; gap: .6rem; align-items: flex-start; line-height: 1.5; margin: .8rem 0; }
.listening-consent input { margin-top: .3rem; min-width: 18px; accent-color: var(--reader-blue); }
.listening-actions { display: flex; flex-wrap: wrap; gap: .5rem; }
.listening-panel button, .listening-indicator button { font: inherit; padding: .55rem .8rem; min-height: 40px; border: 1px solid #72947c; border-radius: 10px; background: white; color: #243b34; cursor: pointer; }
.listening-panel button { border-color: var(--parent-divider); background: var(--surface); color: var(--parent-accent); }
/* A quiet visual dot with a full touch target and an accessible stop action. */
.word-card .listening-indicator { position: absolute; top: 6px; right: 6px; width: 44px; height: 44px; min-height: 44px; padding: 0; border: 0; border-radius: 50%; background: transparent; display: grid; place-items: center; cursor: pointer; z-index: 5; }
.listening-indicator[hidden] { display: none; }
.listening-dot { width: 8px; height: 8px; border-radius: 50%; background: #c87973; box-shadow: 0 0 0 4px #c8797312; }
.listening-indicator:focus-visible { outline: 2px solid #ae605a; outline-offset: -4px; }
.listening-indicator:hover .listening-dot { background: #b55e58; }
.listening-comparisons { margin-top: 1.1rem; }
.listening-settings { margin-top: 1.1rem; padding-top: 1rem; border-top: 1px solid var(--parent-divider); }
.listening-settings > summary { font-size: .85rem; }
.settings-heading { display: flex; align-items: center; justify-content: space-between; gap: 1rem; }
.settings-heading button { width: 44px; height: 44px; border-radius: 50%; background: var(--parent-fill); color: var(--ink); font-size: 24px; cursor: pointer; }
.settings-tabs { display: flex; gap: 4px; padding: 4px; margin: 16px 0 22px; background: var(--parent-fill); border-radius: 12px; }
.settings-tabs button { flex: 1; padding: 10px 3px; min-height: 44px; border-radius: 9px; background: transparent; color: var(--parent-secondary); font: inherit; font-size: 12px; cursor: pointer; }
.settings-tabs button[aria-selected="true"] { background: var(--surface); color: var(--parent-accent); box-shadow: 0 1px 4px #0001; font-weight: 700; }
#settingsListening .listening-settings { border: 0; margin: 0; padding: 0; }
#settingsListening .listening-actions button { display: inline-flex; align-items: center; min-height: 44px; padding: 10px 12px; border-radius: 10px; background: var(--reader-blue-soft); color: var(--parent-accent); font: inherit; font-size: 13px; cursor: pointer; border: 1px solid var(--parent-divider); }
#settingsListening .listening-consent { font-size: 13px; }
#settingsListening .listening-consent input { flex: 0 0 18px; }
.listening-panel .listening-settings-link { border: 0; background: transparent; padding: 0; color: var(--parent-accent); text-decoration: underline; font-size: .82rem; }
.listening-comparisons h3 { margin: 0; font-size: 1.12rem; }
.listening-caption, .listening-empty { color: var(--parent-secondary); font-size: .88rem; }
.listening-totals { display: grid; grid-template-columns: repeat(3,minmax(0,1fr)); gap: .5rem; margin: 1rem 0; }
.listening-total { border: 1px solid var(--parent-divider); border-radius: 12px; padding: .75rem .5rem; background: var(--surface); text-align: center; }
.listening-total strong { display: block; font-size: 1.5rem; line-height: 1.3; }
.listening-total span { font-size: .75rem; color: var(--parent-secondary); }
.listening-result { padding: 1rem; margin-top: .65rem; background: var(--surface); border: 1px solid var(--parent-divider); border-radius: 14px; }
.listening-result[data-comparison="different"] { border-color: var(--reader-gold); background: var(--surface); }
.listening-result-header { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: .45rem; }
.listening-word { margin: 0; font-size: 1.25rem; overflow-wrap: anywhere; }
.listening-badge { border-radius: 20px; padding: .25rem .55rem; font-size: .75rem; font-weight: 700; background: var(--parent-fill); color: var(--parent-secondary); }
[data-comparison="match"] .listening-badge { background: var(--reader-blue-soft); color: var(--parent-accent); }
[data-comparison="different"] .listening-badge { background: var(--reader-gold); color: var(--ink); }
.listening-labels { display: grid; grid-template-columns: 1fr 1fr; gap: .75rem; margin: .9rem 0 0; }
.listening-labels > div + div { border-left: 1px solid var(--parent-divider); padding-left: .75rem; }
.listening-labels dt { color: var(--parent-secondary); font-size: .72rem; margin-bottom: .25rem; }
.listening-labels dd { margin: 0; font-size: .92rem; font-weight: 600; line-height: 1.4; }
.listening-result details { margin-top: .8rem; font-size: .84rem; color: var(--parent-secondary); }
.listening-result details summary { font-weight: 500; }
.listening-result-footer { display: flex; align-items: center; justify-content: space-between; gap: .75rem; margin-top: .75rem; }
.listening-result time { color: var(--parent-secondary); font-size: .7rem; }
.listening-panel .listening-delete-row { padding: .3rem .5rem; min-height: 36px; font-size: .75rem; border-color: var(--parent-divider); color: var(--parent-secondary); }

/* weekly.css */
/* A keepsake page, rather than another performance dashboard. */
.weekly-entry { margin:24px 0; padding:24px; background:#f8edce; border-radius:24px; display:flex; align-items:center; justify-content:space-between; gap:20px; color:#33463c; border:1px solid #e9d9b0; }
.weekly-entry[hidden] { display:none; }
.weekly-entry h2 { font-size:21px; margin:8px 0; }
.weekly-entry p { font-size:13px; margin:0; color:#647063; }
.weekly-entry button { flex-shrink:0; border-radius:24px; background:#36766a; color:#fff; padding:13px 20px; font:inherit; font-size:13px; cursor:pointer; }
.weekly-eyebrow { font-size:10px; font-weight:750; letter-spacing:1.4px; color:#687b68; }
.weekly-dialog { width:min(820px,calc(100% - 24px)); max-height:calc(100dvh - 24px); padding:0; border:0; border-radius:28px; background:#fffaf0; color:#304639; box-shadow:0 24px 100px #23372d38; overflow:auto; }
.weekly-dialog::backdrop { background:#283e3780; backdrop-filter:blur(6px); }
.weekly-dialog * { box-sizing:border-box; }
.weekly-dialog button,.weekly-dialog select { font:inherit; cursor:pointer; min-height:44px; }
.weekly-dialog button:focus-visible,.weekly-dialog select:focus-visible { outline:3px solid #417f76; outline-offset:3px; }
.weekly-toolbar { display:flex; align-items:center; gap:12px; padding:16px 24px; position:sticky; top:0; z-index:10; background:#fffaf0f5; border-bottom:1px solid #e6e6cf; }
.weekly-brand { font-size:10px; letter-spacing:1.2px; font-weight:750; margin-right:auto; }
#weeklyClose { background:#efeddf; color:#3b5747; width:44px; border-radius:50%; border:0; font-size:25px; flex-shrink:0; }
.weekly-history { display:flex; gap:10px; flex-wrap:wrap; padding:14px 28px 0; align-items:center; font-size:11px; color:#697366; }
.weekly-history select { min-height:36px; max-width:100%; background:transparent; border:1px solid #e0dfcc; border-radius:10px; padding:5px 9px; color:#52634f; }
#weeklyStatus { width:100%; min-height:16px; }
.weekly-hero { text-align:center; padding:0 70px 42px; }
.weekly-date { display:inline-block; padding:6px 15px; background:#f7e4aa; border-radius:4px; transform:rotate(-2deg); font-size:11px; font-weight:600; letter-spacing:1px; margin:0 0 20px; }
.weekly-hero h1 { font-size:clamp(26px,4.5vw,40px); letter-spacing:-1.2px; line-height:1.28; margin:0 auto 20px; max-width:630px; color:#325843; }
.weekly-intro { font-size:15px; line-height:1.9; max-width:540px; margin:auto; color:#667160; }
.weekly-phase-highlight { color:#244e3b; background:#f6df96; padding:.08em .3em; border-radius:5px; font-weight:750; box-decoration-break:clone; -webkit-box-decoration-break:clone; }
.weekly-art { width:320px; max-width:100%; height:190px; margin:0 auto 10px; position:relative; overflow:hidden; }
.weekly-hill { position:absolute; bottom:10px; width:200px; height:70px; background:#d4dfba; border-radius:100% 100% 0 0; left:0; transform:rotate(-6deg); }
.weekly-hill.second { left:140px; bottom:5px; background:#b9d3b7; transform:rotate(10deg); }
.weekly-sun { position:absolute; width:48px; height:48px; background:#edbc5a; border-radius:50%; left:58px; top:32px; box-shadow:0 0 0 10px #edbc5a20; }
.weekly-cloud { position:absolute; width:72px; height:20px; background:#ebe6d5; top:39px; right:25px; border-radius:30px; }
.weekly-cloud::before { content:''; position:absolute; width:38px; height:30px; bottom:4px; left:14px; background:inherit; border-radius:50%; }
.weekly-book { position:absolute; width:110px; height:116px; background:#d8866e; border:4px solid #ad6753; border-radius:9px 16px 16px 9px; bottom:17px; left:110px; transform:rotate(-10deg); box-shadow:6px 7px 0 #4d6f3922,inset 7px 0 #b56854; animation:weekly-book-arrive .65s cubic-bezier(.2,1.4,.4,1) both; }
.weekly-book::before { content:''; position:absolute; height:10px; left:3px; right:5px; bottom:3px; border-radius:5px; background:#fff7dc; border-bottom:2px solid #efdfb8; }
.weekly-book::after { content:'✦'; position:absolute; color:#ffe8a7; font-size:25px; right:12px; top:5px; }
.weekly-eyes { position:absolute; width:7px; height:10px; background:#573f30; border-radius:50%; left:27px; top:43px; box-shadow:35px 0 #573f30; }
.weekly-smile { position:absolute; left:42px; top:56px; width:18px; height:12px; border:3px solid #573f30; border-top:0; border-radius:0 0 15px 15px; }
.weekly-bookmark { position:absolute; background:#ead587; width:17px; height:42px; left:182px; top:48px; transform:rotate(8deg); clip-path:polygon(0 0,100% 0,100% 100%,50% 80%,0 100%); }
.weekly-spark { position:absolute; font-size:33px; color:#b2a1ce; top:87px; left:67px; }
.weekly-spark.two { left:auto; right:37px; top:94px; color:#ce8967; font-size:27px; }
.weekly-section { padding:34px 44px; border-top:1px dashed #dfdfc9; }
.weekly-section h2 { font-size:23px; line-height:1.4; margin:10px 0 24px; letter-spacing:-.5px; }
.weekly-section p { font-size:14px; line-height:1.8; }
.weekly-trail { background:#edf3df; }
.weekly-metrics { display:flex; flex-wrap:wrap; gap:22px 26px; padding:8px 0 15px; }
.weekly-metric { flex:1; min-width:92px; }
.weekly-metric strong { font-size:38px; font-weight:750; display:block; line-height:1.2; color:#3c6e53; }
.weekly-metric span { font-size:11px; color:#61765d; display:block; margin-top:9px; }
.weekly-section .weekly-detail { font-size:12px; color:#70806b; }
.weekly-section .weekly-current { color:#466c53; font-size:12px; border-top:1px solid #cfddc1; padding-top:12px; }
.weekly-focus { background:#f9e8df; }
.weekly-focus .weekly-eyebrow { color:#a16e5b; }
.weekly-word-tags { display:flex; gap:10px; flex-wrap:wrap; margin:18px 0 0; }
.weekly-word-tags span { padding:7px 16px; background:#fff9f1; border-radius:9px; color:#9a6553; font-size:17px; font-weight:700; transform:rotate(-3deg); }
.weekly-word-tags span:nth-child(even) { transform:rotate(3deg); }
.weekly-next { background:#ece7f3; }
.weekly-next .weekly-eyebrow { color:#8b7aa5; }
.weekly-action { display:flex; align-items:baseline; gap:18px; }
.weekly-action>span { font-size:23px; font-weight:700; color:#a18cb8; }
.weekly-action p { margin:10px 0; }
.weekly-stage-note { padding-top:18px; border-top:1px solid #d6cde1; color:#6c627a; }
.weekly-footer { text-align:center; padding:28px 36px 34px; }
.weekly-footer p { max-width:580px; margin:0 auto 20px; font-size:11px; color:#7c8274; line-height:1.8; }
#weeklyDone { padding:13px 28px; background:#39766a; border:0; border-radius:25px; color:white; transition:transform .2s,background .2s; }
#weeklyDone:hover { transform:translateY(-2px); background:#2c6459; }
.weekly-loading { text-align:center; padding:60px 24px; font-size:22px; }
@keyframes weekly-book-arrive { from { opacity:0;transform:translateY(20px) rotate(-18deg); } to { opacity:1;transform:translateY(0) rotate(-10deg); } }
@media(max-width:600px) { .weekly-entry { padding:20px; display:block; }.weekly-entry button { margin-top:18px; }.weekly-dialog { border-radius:20px; }.weekly-toolbar { padding:10px 12px; gap:6px; }.weekly-brand { max-width:180px; line-height:1.7; font-size:8px; }.weekly-history { padding:12px 20px 0; }.weekly-hero { padding:0 24px 32px; }.weekly-hero h1 { font-size:28px; }.weekly-intro { font-size:14px; }.weekly-section { padding:28px 24px; }.weekly-section h2 { font-size:21px; }.weekly-metrics { gap:22px 15px; }.weekly-metric { flex-basis:27%; min-width:75px; }.weekly-metric strong { font-size:33px; }.weekly-metric span { font-size:10px; }.weekly-footer { padding:26px 24px; } }
@media(prefers-reduced-motion:reduce) { .weekly-dialog * { animation:none!important;transition:none!important;scroll-behavior:auto!important; } }

/* parent-feedback.css */
.parent-feedback-entry,.parent-feedback-dialog{--feedback-muted:#626773;--feedback-red-hover:#c91f1b}
.parent-feedback-entry{display:grid;grid-template-columns:36px minmax(0,1fr) auto;align-items:center;gap:10px;background:var(--surface);border-radius:16px;padding:10px 12px;margin:6px 0 16px;color:var(--ink);box-shadow:inset 0 0 0 1px var(--line)}
.parent-feedback-entry h2{margin:0 0 2px;font-size:15px;letter-spacing:-.2px;color:var(--reader-blue)}.parent-feedback-entry p{margin:0;font-size:11px;line-height:1.35;color:var(--feedback-muted)}.parent-feedback-entry>div{min-width:0}
.parent-feedback-bubble{position:relative;display:block;width:36px;height:34px;background:var(--reader-gold);border-radius:12px 12px 5px 12px;transform:rotate(-8deg);font-size:11px;text-align:right;padding-right:4px;color:var(--ink)}.parent-feedback-bubble i{position:absolute;left:7px;top:9px;font-style:normal;font-size:16px;letter-spacing:1px}
#parentFeedbackOpen,.parent-feedback-send{border:0;background:var(--reader-red);color:var(--surface);border-radius:12px;padding:10px 12px;min-height:40px;font:inherit;font-size:12px;font-weight:700;cursor:pointer;transition:transform .18s,background .18s}
#parentFeedbackOpen:hover,.parent-feedback-send:hover{background:var(--feedback-red-hover);transform:translateY(-2px)}#parentFeedbackOpen{white-space:nowrap}.parent-feedback-send:disabled{opacity:.65;cursor:wait;transform:none}
.parent-feedback-dialog{width:min(540px,calc(100vw - 28px));max-height:calc(100dvh - 30px);box-sizing:border-box;border:0;border-radius:26px;background:var(--surface);color:var(--ink);padding:32px;box-shadow:0 24px 90px #20242e33;overflow:auto}.parent-feedback-dialog::backdrop{background:#20242e66}
.parent-feedback-close{position:absolute;right:15px;top:14px;border:0;background:var(--reader-blue-soft);color:var(--reader-blue);width:42px;height:42px;border-radius:50%;font-size:25px;cursor:pointer}.parent-feedback-eyebrow{font-size:10px;font-weight:800;letter-spacing:1.6px;color:var(--reader-blue);margin:4px 0 14px}.parent-feedback-dialog h2{font-size:29px;line-height:1.15;letter-spacing:-.6px;margin:0 30px 12px 0}.parent-feedback-intro{font-size:14px;color:var(--feedback-muted);margin:0 0 24px}.parent-feedback-dialog fieldset{border:0;padding:0;margin:0 0 20px}.parent-feedback-dialog legend,.parent-feedback-field{font-size:13px;font-weight:700}.parent-feedback-types{display:flex;flex-wrap:wrap;gap:8px;margin-top:10px}.parent-feedback-types label{position:relative;cursor:pointer}.parent-feedback-types input{position:absolute;opacity:0;width:1px;height:1px}.parent-feedback-types span{display:block;border:1px solid var(--line);border-radius:12px;padding:10px 12px;font-size:12px;background:var(--surface)}.parent-feedback-types input:checked+span{background:var(--reader-blue-soft);border-color:var(--reader-blue);color:var(--reader-blue)}.parent-feedback-types input:focus-visible+span{outline:3px solid var(--reader-blue);outline-offset:3px}
.parent-feedback-field{display:block}.parent-feedback-field span{font-size:11px;color:var(--feedback-muted);font-weight:400}.parent-feedback-field textarea,.parent-feedback-field input{display:block;box-sizing:border-box;width:100%;margin-top:8px;border:1px solid var(--line);border-radius:12px;padding:13px;font:inherit;font-size:16px;font-weight:400;color:var(--ink);background:var(--surface)}.parent-feedback-field textarea{resize:vertical;min-height:110px;max-height:240px}.parent-feedback-count{text-align:right;font-size:10px;color:var(--feedback-muted);margin:5px 0 18px}.parent-feedback-privacy{font-size:11px;line-height:1.6;color:var(--feedback-muted);margin:17px 0}.parent-feedback-dialog .parent-feedback-send{width:100%}#parentFeedbackStatus{font-size:13px;line-height:1.5;color:var(--reader-red)}.parent-feedback-dialog :focus-visible{outline:3px solid var(--reader-blue);outline-offset:3px}#parentFeedbackThanks{text-align:center;padding-top:20px}#parentFeedbackThanks h2{margin:12px 0}#parentFeedbackThanks p{font-size:15px;line-height:1.7;margin-bottom:28px}.parent-feedback-thanks-icon{display:inline-grid;place-items:center;width:78px;height:78px;border-radius:50%;background:var(--reader-blue-soft);color:var(--reader-blue);font-size:48px;animation:feedback-arrive .25s ease-out}@keyframes feedback-arrive{from{transform:scale(.7);opacity:0}to{transform:scale(1);opacity:1}}
@media(max-width:600px){.parent-feedback-entry p,.parent-feedback-button-detail{display:none}.parent-feedback-dialog{padding:28px 22px}.parent-feedback-dialog h2{font-size:26px}}
@media(prefers-reduced-motion:reduce){.parent-feedback-entry *,.parent-feedback-dialog *{animation:none!important;transition:none!important}}

/* parent-story-library.css */
.parent-story-toolbar { display: grid; grid-template-columns: minmax(0,1fr) auto; gap: 6px 12px; align-items: end; margin: 18px 0 14px; }
.parent-story-toolbar label { color: var(--parent-secondary); font-size: 12px; font-weight: 650; }
.parent-story-toolbar select { grid-row: 2; margin: 0; }
.parent-story-summary { grid-column: 2; grid-row: 2; align-self: center; color: var(--parent-secondary); font-size: 10px; white-space: nowrap; }
.parent-story-list { display: grid; gap: 7px; }
.parent-story-card { display: grid; grid-template-columns: 27px minmax(0,1fr) 22px; align-items: center; gap: 9px; width: 100%; min-height: 66px; padding: 10px 10px 10px 8px; border: 1px solid var(--parent-divider); border-radius: 12px; background: var(--surface); color: var(--ink); font: inherit; text-align: left; cursor: pointer; transition: border-color .16s, background .16s, transform .16s; }
.parent-story-card:hover { border-color: var(--parent-accent); background: var(--parent-fill); transform: translateY(-1px); }
.parent-story-number { align-self: start; padding-top: 2px; color: var(--parent-secondary); font-size: 10px; font-variant-numeric: tabular-nums; }
.parent-story-card-copy { display: grid; gap: 3px; min-width: 0; }
.parent-story-card-copy strong { overflow-wrap: anywhere; font-size: 14px; line-height: 1.35; }
.parent-story-card-copy small { color: var(--parent-secondary); font-size: 10px; line-height: 1.4; }
.parent-story-card-copy .parent-story-focus { color: var(--parent-accent); }
.parent-story-arrow { color: var(--parent-accent); font-size: 18px; }
.parent-story-note { margin: 12px 0 0; color: var(--parent-secondary); font-size: 10px; line-height: 1.55; }
.parent-story-detail[hidden], [data-story-browser][hidden] { display: none; }
.parent-story-detail { min-width: 0; }
.parent-story-back { min-height: 44px; margin: 2px 0 14px; padding: 8px 0; border: 0; background: transparent; color: var(--parent-accent); font: inherit; font-size: 12px; font-weight: 700; cursor: pointer; }
.parent-story-heading { padding: 0 0 16px; border-bottom: 1px solid var(--parent-divider); }
.parent-story-eyebrow { display: block; margin-bottom: 7px; color: var(--parent-accent); font-size: 10px; font-weight: 750; letter-spacing: .04em; }
.reading-settings .parent-story-heading h4 { margin: 0 0 7px; color: var(--ink); font-size: 25px; line-height: 1.2; letter-spacing: -.5px; }
.reading-settings .parent-story-detail-meta { margin: 0; font-size: 11px; }
.parent-story-sentences { margin: 0 0 20px; padding: 0; list-style: none; counter-reset: story-sentence; }
.parent-story-sentences > li { position: relative; padding: 18px 0 18px 27px; border-bottom: 1px solid var(--parent-divider); counter-increment: story-sentence; }
.parent-story-sentences > li::before { content: counter(story-sentence, decimal-leading-zero); position: absolute; top: 24px; left: 0; color: var(--parent-secondary); font-size: 9px; }
.reading-settings .parent-story-sentence { margin: 0; color: var(--ink); font-family: "Comic Sans MS", "Chalkboard SE", ui-rounded, system-ui, sans-serif; font-size: 22px; line-height: 1.45; overflow-wrap: anywhere; }
.parent-story-audio { display: flex; flex-wrap: wrap; gap: 5px; margin-top: 7px; }
.parent-story-audio:empty { display: none; }
.parent-story-audio button { min-height: 40px; padding: 7px 10px; border: 0; border-radius: 8px; background: var(--parent-fill); color: var(--parent-accent); font: inherit; font-size: 11px; font-weight: 700; cursor: pointer; }
.parent-story-audio button.is-effect { background: transparent; font-weight: 550; }
.parent-story-audio button[aria-pressed="true"] { background: var(--parent-accent); color: white; }
.parent-story-picture { position: relative; width: 100%; margin: 12px 0 0; overflow: hidden; border-radius: 10px; background: var(--parent-fill); aspect-ratio: 1.5; }
.parent-story-picture img { position: absolute; display: block; max-width: none; object-fit: fill; }
.parent-story-retell { margin: 22px 0; padding: 2px 0 2px 14px; border-left: 3px solid var(--reader-gold); }
.parent-story-retell strong { color: var(--parent-accent); font-size: 11px; }
.parent-story-moral { margin-top: 18px; padding: 13px 15px; background: var(--parent-fill); border-radius: 10px; }
.parent-story-moral p { line-height: 1.6; }
.reading-settings .parent-story-retell p { margin: 5px 0 0; color: var(--ink); font-size: 15px; }
.parent-story-notes { padding-top: 10px; border-top: 1px solid var(--parent-divider); font-size: 11px; line-height: 1.6; }
.parent-story-notes summary { min-height: 44px; padding: 10px 0; color: var(--parent-accent); font-weight: 700; cursor: pointer; }
.reading-settings .parent-story-notes p { margin: 9px 0; font-size: 11px; }
.parent-story-notes ul { padding-left: 18px; }
.parent-story-controls { display: flex; justify-content: space-between; gap: 10px; margin-top: 10px; padding-top: 10px; border-top: 1px solid var(--parent-divider); }
.parent-story-controls button { min-height: 44px; padding: 7px 0; border: 0; background: transparent; color: var(--parent-accent); font: inherit; font-size: 12px; font-weight: 700; cursor: pointer; }
.parent-story-controls button:disabled { opacity: .35; cursor: default; }
@media (max-width: 360px) {
  .parent-story-toolbar { grid-template-columns: 1fr; }
  .parent-story-toolbar select, .parent-story-summary { grid-column: 1; grid-row: auto; }
  .parent-story-summary { justify-self: start; }
}

/* parent-flower.css */
/* A stable seven-stage data flower, with native buttons for every stage. */
.app-header .parent-brand { display: none; flex: 1 1 auto; min-width: 0; font-size: 16px; font-weight: 800; letter-spacing: -.6px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.app-header.is-summary .parent-brand { display: block; }
.app-header.is-summary { width: min(calc(100vw - 36px), 394px); }
.summary-view { gap: 24px; }
.parent-flower-overview { margin-top: 0; }
.parent-phase-chart > .parent-progress-tabs { margin-top: 16px; }
.progress-flower { position: relative; width: 100%; aspect-ratio: 400 / 410; }
.flower-canvas { display: block; width: 100%; height: 100%; cursor: pointer; }
.flower-label { position: absolute; z-index: 1; width: 20%; height: 20%; min-width: 44px; min-height: 44px; padding: 0; transform: translate(-50%, -50%); border-radius: 50%; background: transparent; cursor: pointer; }
.flower-label:focus-visible { outline: 3px solid var(--petal-ink); outline-offset: 3px; }
.flower-insight { margin-top: 22px; }
.flower-insight h1 { margin: 0; font-size: clamp(27px, 7.5vw, 34px); line-height: 1.22; font-weight: 780; letter-spacing: -1px; text-wrap: balance; }
.flower-insight > p { margin: 14px 0 0; color: #656b77; font-size: 15px; line-height: 1.75; }
.parent-summary-list { display: grid; gap: 15px; margin: 20px 0 0; padding: 0 0 0 20px; }
.parent-summary-list li { padding-left: 3px; color: #505966; font-size: 15px; line-height: 1.65; overflow-wrap: anywhere; }
.parent-summary-list li::marker { color: var(--reader-blue); font-size: 13px; }
.parent-summary-list strong { color: var(--ink); font-weight: 750; }
.parent-summary-note { margin: 15px 0 0; color: #656b77; font-size: 12px; line-height: 1.6; }
.flower-detail { margin-top: 16px; padding: 14px 16px; border: 1px solid var(--line); border-radius: 16px; background: var(--surface); }
.flower-detail[hidden] { display: none; }
.flower-detail-heading, .flower-detail-row { display: flex; align-items: center; justify-content: space-between; gap: 12px; }
.flower-detail-heading h3 { margin: 0; font-size: 16px; }
.flower-detail-close { min-height: 44px; padding: 8px; color: var(--parent-accent); background: transparent; cursor: pointer; }
.flower-detail-row { margin: 0; padding: 10px 0; border-top: 1px solid var(--line); font-size: 13px; }
.flower-detail-row strong { flex-shrink: 0; font-variant-numeric: tabular-nums; }
.flower-detail-note { margin: 8px 0 0; color: #717681; font-size: 12px; line-height: 1.5; }
.parent-overview { display: block; border-top: 1px solid var(--line); padding: 20px 0 0; }
#readerProgress { padding: 0; }
.parent-overview h2 { font-size: 21px; }
.parent-overview .reader-sentence-counts { margin-top: 16px; }
.parent-overview .reader-sentence-label { font-size: 13px; }
.parent-overview .reader-window, .parent-overview .parent-pattern { font-size: 12px; }
.parent-overview .reader-current-story { margin-top: 16px; padding-top: 12px; }
.parent-overview .reader-current-story h3 { font-size: 15px; }
.parent-overview .reader-story-phase, .parent-overview .reader-story-status, .parent-overview .reader-story-earned { font-size: 12px; }
.summary-view > .parent-feedback-entry { margin-top: 8px; }
@media (max-width: 350px) {
  .app-header .parent-brand { font-size: 14px; }
  .app-header.is-summary { gap: 4px; }
  .app-header .view-tabs { width: 100px; }
}

.flower-sample-label {
  border: 0;
  font-size: 20px;
  line-height: 1.05;
  font-weight: 700;
}

.flower-sample-label strong {
  font-size: 13px;
}

.flower-assessment-sample h4 { margin-bottom: 0; }
.flower-assessment-sample .flower-word-list {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  padding: 0;
  list-style: none;
}
[data-flower-view="assessment"] .flower-label {
  border: 0;
  width: 23%;
  height: 23%;
  padding: 3px;
  font-size: 11px;
  line-height: 1.12;
}

[data-flower-view="assessment"] .flower-label strong {
  display: inline-block;
  margin-top: 3px;
  font-size: 15px;
  line-height: 1.05;
}

.flower-assessment-sample .flower-word-chip {
  padding: 6px 10px;
  border-radius: 10px;
  background: var(--reader-blue-soft);
  line-height: 1.5;
}

@media (max-width: 350px) {
  [data-flower-view="assessment"] .flower-label { font-size: 10px; }
  [data-flower-view="assessment"] .flower-label strong { font-size: 12px; }
}

/* word-attempts.css */
/* The word list and its inspector share the existing activity sheet. */
.word-activity-item { display:flex; min-width:0; }
button.word-activity-word { cursor:pointer; font-family:inherit; color:inherit; text-align:left; transition:border-color .16s,background .16s,transform .16s; }
button.word-activity-word:hover { background:#eff7f1; border-color:#9bbca8; transform:translateY(-2px); }
.is-unsure button.word-activity-word:hover { background:#fbf0df; border-color:#cfa875; }
.word-activity-arrow { font-size:20px; color:#8b9a8f; margin-left:4px; font-weight:400; }
.is-unsure .word-activity-arrow { color:#b48b58; }
.word-activity-hint { margin:26px 0 0; color:#717a75; font-size:12px; line-height:1.6; }
.word-attempts { color:#24352b; font-size:14px; line-height:1.55; animation:word-inspector-enter .18s ease-out; }
.word-inspector-nav { display:flex; align-items:center; justify-content:space-between; gap:16px; margin:0 0 22px; }
.word-inspector-nav button { padding:8px 0; border:0; background:transparent; font:inherit; color:#39644c; cursor:pointer; }
.word-inspector-back { font-weight:600!important; }
.word-inspector-refresh { font-size:12px!important; color:#778278!important; }
.word-inspector-header { display:flex; flex-wrap:wrap; align-items:center; gap:10px 16px; }
.word-inspector-eyebrow { flex:0 0 100%; font-size:10px; letter-spacing:.12em; font-weight:650; color:#849184; margin:0; }
.word-inspector-header h3 { margin:0; font-size:42px; letter-spacing:-1.5px; line-height:1.15; color:#20272b; overflow-wrap:anywhere; }
.word-inspector-result { font-size:11px; font-weight:600; padding:6px 10px; border-radius:22px; color:#236449; background:#e0eee5; }
.word-inspector-result.is-assisted { color:#8a581f; background:#f7ead8; }
.word-inspector-meta { color:#768176; font-size:12px; margin:10px 0 20px; overflow-wrap:anywhere; }
.word-inspector-reads { display:flex; flex-wrap:wrap; gap:7px; margin:0 0 22px; }
.word-inspector-reads button { border:1px solid #dce5dd; background:#fffefa; font:inherit; font-size:11px; border-radius:9px; padding:8px 10px; cursor:pointer; color:#677368; }
.word-inspector-reads button[aria-pressed="true"] { color:#236449; border-color:#9db9a7; background:#e9f2ec; }
.word-inspector-step { border-top:1px solid #dce4db; padding:20px 0; }
.word-inspector-step-heading { display:flex; align-items:center; gap:10px; margin-bottom:11px; }
.word-inspector-number { display:grid; place-items:center; flex:0 0 24px; width:24px; height:24px; border-radius:50%; background:#e8eee5; color:#59735a; font-size:11px; font-weight:650; }
.word-inspector-step h3 { color:#24302a; font-size:17px; letter-spacing:-.3px; margin:0; }
.word-inspector-description { color:#34483a; font-size:14px; line-height:1.65; margin:8px 0; }
.word-inspector-note { font-size:12px; line-height:1.65; color:#748073; margin:10px 0; overflow-wrap:anywhere; }
.word-inspector-facts { display:flex; flex-wrap:wrap; gap:8px 16px; color:#6d7b6a; font-size:11px; margin:12px 0; }
.word-inspector-step.is-assisted .word-inspector-number { color:#8a581f; background:#f7ead8; }
.word-inspector-step.is-independent .word-inspector-number { color:#236449; background:#e0eee5; }
.word-inspector-state { display:flex; align-items:center; flex-wrap:wrap; gap:12px; margin:12px 0; padding:17px 20px; border-radius:14px; background:#e8f0e9; color:#567660; font-size:15px; }
.word-inspector-state strong { color:#236449; font-size:20px; letter-spacing:-.35px; }
.word-inspector-state-arrow { color:#9baf9e; }
.word-inspector-evidence { display:flex; gap:24px; padding:6px 0 14px; }
.word-inspector-evidence>div { display:flex; flex-direction:column; gap:4px; }
.word-inspector-evidence strong { font-size:24px; line-height:1.2; color:#3f5f49; font-variant-numeric:tabular-nums; }
.word-inspector-evidence span { font-size:11px; color:#7a8778; }
.word-inspector-disclosure { margin:14px 0 0; }
.word-inspector-disclosure>summary { cursor:pointer; color:#5c735d; font-size:12px; font-weight:550; }
.word-inspector-disclosure p { font-size:12px; color:#69786b; line-height:1.6; }
.word-inspector-disclosure pre { white-space:pre-wrap; overflow-wrap:anywhere; max-height:320px; overflow:auto; background:#edf1e9; padding:13px; border-radius:9px; font-size:11px; line-height:1.55; color:#526153; }
.word-inspector-call { margin:10px 0; padding:10px 0; border-top:1px solid #dde5da; }
.word-inspector-call>summary { cursor:pointer; font-size:12px; color:#526b55; }
.word-inspector-footer { display:flex; flex-wrap:wrap; align-items:baseline; gap:12px; border-top:1px solid #dce4db; padding:15px 0 5px; }
.word-inspector-footer>.word-inspector-disclosure { flex:1; margin:0; min-width:0; }
.word-inspector-footer button { font:inherit; color:#5c735d; font-size:11px; border:1px solid #d6dfd1; border-radius:9px; background:#fffefa; padding:8px 11px; cursor:pointer; }
.word-inspector-status { padding:11px 14px; background:#f8eddc; color:#8a632b; border-radius:10px; font-size:12px; }
.word-inspector-loading { color:#82907f; font-size:13px; }
.word-attempts button:focus-visible,button.word-activity-word:focus-visible { outline:3px solid #80a88c; outline-offset:3px; }
.word-inspector-header h3:focus { outline:none; }
@keyframes word-inspector-enter { from { opacity:0; transform:translateY(6px); } to { opacity:1; transform:translateY(0); } }
@media(max-width:450px) { .word-inspector-header h3 { font-size:36px; } .word-inspector-header { gap:12px; } .word-inspector-evidence { gap:22px; } .word-inspector-step { padding:18px 0; } .word-inspector-state { padding:14px 15px; } }
@media(prefers-reduced-motion:reduce) { .word-attempts { animation:none; } button.word-activity-word { transition:none; } button.word-activity-word:hover { transform:none; } }
.word-inspector-result.is-unknown { color:#637267; background:#e9ede7; }
.word-inspector-step.is-unknown .word-inspector-number { color:#637267; background:#e9ede7; }

/* parent-panels.css */
/* Mobile subpages leave a glimpse of the parent screen above the sheet. */
body:has(dialog[open]) { overflow: hidden; }
.parent-sheet, dialog.parent-sheet-existing {
  box-sizing: border-box; position: fixed; inset: auto 0 0; margin: 0 auto;
  width: min(680px, 100%); max-width: 100%; height: 90dvh; max-height: 90dvh;
  border: 0; border-radius: 30px 30px 0 0; background: var(--background, #fcfcfd);
  color: var(--ink, #20242e); box-shadow: 0 -12px 70px #20242e29;
  overflow: auto; overscroll-behavior: contain; padding: 24px 24px max(32px, env(safe-area-inset-bottom));
}
.parent-sheet { padding: 0; }
.parent-sheet[open], dialog.parent-sheet-existing[open] { animation: parent-sheet-enter .28s cubic-bezier(.2,.8,.2,1); }
.parent-sheet::backdrop, dialog.parent-sheet-existing::backdrop { background: #20242e59; backdrop-filter: blur(4px); }
.parent-sheet-heading { position: sticky; top: 0; z-index: 3; padding: 20px 24px 18px; background: var(--background, #fcfcfd); }
.parent-sheet-heading h2 { margin: 32px 0 0; font-size: clamp(28px, 7vw, 38px); line-height: 1.12; letter-spacing: -1px; text-wrap: balance; }
.parent-sheet-close, dialog.parent-sheet-existing #settingsClose, dialog.parent-sheet-existing #parentFeedbackClose, dialog.parent-sheet-existing #weeklyClose {
  display: flex; align-items: center; justify-content: center;
  margin-left: auto; width: 44px; height: 44px; min-height: 44px; padding: 0;
  border: 1px solid var(--parent-divider); border-radius: 50%; background: #ffffffc9; color: var(--ink);
  font: 300 34px/1 system-ui, sans-serif; cursor: pointer;
}
.parent-sheet-body { padding: 0 24px max(32px, env(safe-area-inset-bottom)); }
.parent-sheet :focus-visible { outline: 3px solid var(--reader-blue); outline-offset: 3px; }
.parent-sheet-body > .in-parent-sheet { margin: 0; padding: 0; border: 0; width: 100%; }
.parent-sheet-body > details.in-parent-sheet > summary { display: none; }
.parent-details > summary::after { content: '›'; }
.parent-sheet-body > .flower-detail { background: transparent; border-radius: 0; }
.parent-sheet-body .flower-detail-heading { display: none; }
.parent-sheet-body .flower-detail-row { padding: 18px 0; font-size: 16px; }
.parent-sheet-body .flower-detail-note { margin-top: 20px; font-size: 14px; line-height: 1.65; }
.parent-sheet-frame { display: block; height: 66dvh; border: 0; background: white; }
.parent-sheet-existing .settings-heading, .parent-sheet-existing .weekly-toolbar { position: sticky; top: -24px; z-index: 3; background: var(--background, #fcfcfd); }
.parent-sheet-existing .parent-feedback-close { position: sticky; top: 0; right: 0; z-index: 3; }
.parent-sheet-existing .parent-feedback-eyebrow { margin-top: 12px; }
.parent-sheet-existing .reading-settings-actions { bottom: -32px; }
.parent-sheet-body > .info-panel { position: static; box-shadow: none; max-height: none; background: transparent; }
.parent-sheet-body > .info-panel > .info-close, .parent-sheet-body > .info-panel > h2 { display: none; }
@keyframes parent-sheet-enter { from { transform: translateY(60px); opacity: .5; } to { transform: translateY(0); opacity: 1; } }
@media (min-width: 740px) { .parent-sheet, dialog.parent-sheet-existing { bottom: 24px; height: min(820px, 88dvh); max-height: 88dvh; border-radius: 30px; } }
@media (prefers-reduced-motion: reduce) { .parent-sheet[open], dialog.parent-sheet-existing[open] { animation: none; } }

/* Both attempt totals open their corresponding reading detail sheets. */
.parent-today-numbers > .today-activity-open { display: flex; align-items: baseline; gap: 9px; min-height: 54px; min-width: 0; padding: 0 12px 0 0; background: transparent; color: inherit; text-align: left; cursor: pointer; border-radius: 8px; }
.parent-today-numbers > .today-activity-open:hover { background: #20242e0a; }
.parent-today-numbers > .today-activity-open:focus-visible { outline: 3px solid var(--ink); outline-offset: 4px; }
.parent-today-numbers > .today-activity-open + .today-activity-open { padding-left: 18px; padding-right: 0; border-left: 1px solid var(--parent-divider); border-radius: 0 8px 8px 0; }
.parent-today-numbers .today-activity-arrow { margin-left: auto; align-self: center; font-size: 25px; color: var(--parent-secondary); }
.word-activity-date { margin: 0 0 20px; font-size: 13px; color: var(--parent-secondary); }
.word-activity-overview { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.word-activity-metric { display: flex; flex-direction: column; gap: 8px; padding: 22px 20px; border-radius: 22px; }
.word-activity-metric.is-good { background: var(--reader-blue-soft); color: var(--parent-accent); }
.word-activity-metric.is-unsure { background: var(--parent-gold-soft); color: #795900; }
.word-activity-metric strong { font-size: 44px; font-weight: 750; line-height: 1; letter-spacing: -1.5px; font-variant-numeric: tabular-nums; }
.word-activity-metric > span { font-size: 13px; font-weight: 600; }
.word-activity-note { margin: 16px 0 30px; color: var(--parent-secondary); font-size: 12px; line-height: 1.6; }
.word-activity-group + .word-activity-group { margin-top: 30px; padding-top: 26px; border-top: 1px solid var(--line); }
.word-activity-group h3 { display: flex; align-items: center; gap: 10px; margin: 0 0 18px; font-size: 19px; letter-spacing: -.4px; }
.word-activity-symbol { display: grid; place-items: center; width: 28px; height: 28px; border-radius: 50%; background: var(--reader-blue-soft); color: var(--parent-accent); font-size: 17px; }
.is-unsure .word-activity-symbol { background: var(--parent-gold-soft); color: #795900; }
.word-activity-words { display: flex; flex-wrap: wrap; gap: 10px; margin: 0; padding: 0; list-style: none; }
.word-activity-word { display: flex; align-items: baseline; gap: 9px; padding: 12px 16px; border: 1px solid var(--parent-divider); border-radius: 14px; background: var(--surface); font-size: 19px; font-weight: 600; }
.is-unsure .word-activity-word { border-color: #eed58d; }
.word-activity-word small { color: var(--parent-secondary); font-size: 11px; font-weight: 500; }
.word-activity-empty { margin: 0; color: var(--parent-secondary); font-size: 14px; line-height: 1.6; }

/* Petal subpages combine a compact stage summary with the complete word targets. */
.flower-stage-description { margin: 0 0 28px; color: var(--parent-secondary); font-size: 15px; line-height: 1.7; }
.flower-target-heading { display: flex; align-items: baseline; justify-content: space-between; gap: 12px; margin-bottom: 14px; }
.flower-target-heading h3 { margin: 0; font-size: 22px; letter-spacing: -.5px; }
.flower-pattern { padding: 0; border: 0; background: transparent; }
.flower-pattern + .flower-pattern { margin-top: 32px; padding-top: 28px; border-top: 1px solid var(--line); }
.flower-pattern h4 { margin: 0 0 14px; font-size: 16px; line-height: 1.45; }
.flower-word-group + .flower-word-group { margin-top: 22px; }
.flower-word-heading { display: flex; flex-wrap: wrap; justify-content: space-between; align-items: baseline; gap: 5px 12px; margin-bottom: 10px; }
.flower-word-heading h5 { margin: 0; font-size: 14px; }
.flower-word-list { display: flex; flex-wrap: wrap; gap: 8px; padding: 0; margin: 0; list-style: none; }
.flower-word-chip { display: flex; align-items: baseline; gap: 7px; max-width: 100%; padding: 8px 11px; border: 1px solid var(--parent-divider); border-radius: 10px; background: var(--surface); color: var(--ink); font-size: 15px; font-weight: 600; overflow-wrap: anywhere; }
.is-ready .flower-word-chip { color: var(--parent-accent); background: var(--reader-blue-soft); border-color: var(--parent-divider); }
.flower-word-emoji { font-size: 16px; }
.flower-words-empty { margin: 0; color: var(--parent-secondary); font-size: 12px; line-height: 1.6; }

/* One quiet, aligned readiness summary beside the petal title. */
.parent-sheet-title-row { display: flex; align-items: center; gap: 20px; margin-top: 28px; }
.parent-sheet-title-row h2 { flex: 1; min-width: 0; margin: 0; font-size: clamp(26px, 7vw, 34px); text-wrap: pretty; }
.flower-stage-score { flex: 0 0 auto; text-align: right; color: var(--stage-ink); }
.flower-stage-total { white-space: nowrap; font-size: 23px; line-height: 1.15; font-variant-numeric: tabular-nums; letter-spacing: -.6px; }
.flower-stage-total strong { font-size: 34px; font-weight: 750; }
.flower-stage-total > span { color: var(--parent-secondary); font-weight: 500; }
.flower-stage-caption { display: block; margin-top: 4px; font-size: 11px; line-height: 1.4; font-weight: 600; }

@media (max-width: 350px) { .parent-today-numbers > .today-activity-open { gap: 6px; padding-right: 8px; } .parent-today-numbers > .today-activity-open + .today-activity-open { padding-left: 10px; } }

/* reading-chart.css */
.parent-reading-trend { padding: 27px 0 10px; border-top: 1px solid var(--line); color: var(--ink); font-family: ui-rounded, "SF Pro Rounded", "Avenir Next Rounded", system-ui, sans-serif; }
.reading-trend-heading { display:flex; align-items:center; justify-content:space-between; flex-wrap:wrap; gap:8px 12px; }
.reading-trend-heading h2 { margin:0; font-size:27px; font-weight:780; letter-spacing:-.9px; }
.reading-estimate-label { max-width:105px; color:#777b84; font-size:11px; line-height:1.4; text-align:left; flex-shrink:0; }
.reading-trend-value { display:flex; align-items:center; justify-content:space-between; gap:12px; width:100%; margin-top:5px; }
.reading-trend-value > strong { display:block; color:var(--reader-blue); font-size:23px; font-weight:780; line-height:1.3; letter-spacing:-.5px; text-align:right; overflow-wrap:anywhere; }
.reading-trend-value.is-estimate { width:auto; margin-left:auto; gap:9px; }
.reading-trend-value.is-estimate .reading-estimate-label { text-align:right; }
.reading-trend-value.is-estimate > strong { font-size:42px; line-height:1.05; letter-spacing:-1.5px; }
.reading-trend-value.is-collecting > strong { font-size:25px; letter-spacing:-.7px; margin:12px 0 0; }
.reading-chart-control { width:100%; touch-action:pan-y; border-radius:12px; margin-top:9px; cursor:crosshair; }
.reading-chart-control:focus-visible { outline:2px solid var(--reader-blue); outline-offset:5px; }
.reading-trend-svg { display:block; width:100%; overflow:visible; }
.reading-grid { stroke:#d8dde2; stroke-width:.7; stroke-dasharray:4 4; opacity:.65; }
.reading-axis, .reading-day { fill:#777b84; font-size:12px; font-weight:550; }
.reading-axis { font-size:14px; }
.reading-edge-label { font-size:11px; }
.reading-axis-caption { font-size:9px; fill:#777b84; }
.reading-target { stroke:#aa7b00; stroke-width:1.1; stroke-dasharray:4 4; }
.reading-target-label { fill:var(--ink); font-size:11px; font-weight:650; }
.reading-grade { fill:#777b84; font-size:10px; }
.reading-trend-line { fill:none; stroke-width:2.1; stroke-linecap:round; }
.reading-trend-line.is-retained { stroke-dasharray:4 4; opacity:.7; }
.reading-band-marker { opacity:0; }
.is-today .reading-band-marker,.is-selected .reading-band-marker { opacity:1; }
.reading-trend-ink circle { transition:r 150ms ease-out, stroke-width 150ms ease-out; }
.reading-trend-ink .is-selected .reading-estimate-dot { r:6.7; stroke:#fff; stroke-width:2.5; }
.reading-trend-ink .is-selected rect { stroke:var(--reader-blue); stroke-width:2.5; }
.reading-trend-legend { display:flex; justify-content:center; flex-wrap:wrap; gap:8px 23px; color:#777b84; font-size:11px; margin:8px 0 0; }
.reading-trend-legend span { display:flex; align-items:center; gap:8px; }
.reading-legend-dot { width:9px; height:9px; background:var(--reader-blue); border-radius:50%; }
.reading-legend-band { width:26px; height:12px; border-radius:10px; background:linear-gradient(90deg,#1767e833,#1767e82b); }
.reading-selected { margin:16px 0 0; padding:10px 0; color:#164f99; font-size:12px; line-height:1.6; border-bottom:1px solid var(--line); }
.reading-trend-summary { margin-top:27px; }
.reading-trend-summary h3 { margin:0 0 11px; font-size:22px; line-height:1.3; font-weight:760; letter-spacing:-.6px; text-wrap:balance; }
.reading-trend-summary p { margin:8px 0; color:#707681; font-size:13px; line-height:1.65; }
.reading-trend-summary strong { color:#164f99; font-weight:720; }
.reading-trend-details { margin-top:17px; font-size:12px; color:#656b77; line-height:1.65; }
.reading-trend-details > summary { display:flex; align-items:center; gap:8px; list-style:none; color:#164f99; font-size:14px; font-weight:650; min-height:44px; cursor:pointer; }
.reading-trend-details > summary::-webkit-details-marker { display:none; }
.reading-trend-details > summary span { font-size:23px; transition:transform 160ms ease; }
.reading-trend-details[open] > summary span { transform:rotate(90deg); }
.reading-trend-details table { border-collapse:collapse; width:100%; margin-top:18px; text-align:left; }
.reading-trend-details th,.reading-trend-details td { padding:8px 4px; border-bottom:1px solid var(--line); vertical-align:top; }
.reading-trend-details th { font-weight:600; }
.reading-trend-details th small { display:block; font-weight:400; max-width:145px; font-size:10px; }
.reading-trend-details caption { text-align:left; font-weight:650; margin-bottom:5px; }
.reading-rating-version { overflow-wrap:anywhere; font-size:10px; }
.reading-enter .reading-trend-ink { animation:reading-reveal 650ms cubic-bezier(.16,1,.3,1) both; }
@keyframes reading-reveal { from { clip-path:inset(0 100% 0 0); opacity:.35; } to { clip-path:inset(0); opacity:1; } }
@media(max-width:350px) { .reading-trend-heading h2 { font-size:24px; } .reading-trend-value > strong { font-size:21px; } .reading-trend-value.is-estimate > strong { font-size:36px; } .reading-trend-value.is-collecting > strong { font-size:23px; } .reading-trend-summary h3 { font-size:20px; } }
@media(prefers-reduced-motion:reduce) { .reading-enter .reading-trend-ink { animation:none; } .reading-trend-ink circle,.reading-trend-details > summary span { transition:none; } }

/* embedded-viewport.css */
/* Only the hosted Mini Program view owns browser gestures. Ordinary web pages
   retain browser zoom. Vertical content and nested sheets remain scrollable. */
html.mini-app-viewport {
  width: 100%;
  overflow-x: hidden;
  overflow-x: clip;
}
html.mini-app-viewport body {
  max-width: 100%;
  overflow-x: hidden;
  overflow-x: clip;
}
html.mini-app-viewport,
html.mini-app-viewport body,
html.mini-app-viewport body * {
  touch-action: pan-y;
  overscroll-behavior: none;
}
html.mini-app-viewport .word-stage {
  /* The app owns the one-finger downward card gesture. */
  touch-action: none;
}
html.mini-app-viewport input,
html.mini-app-viewport select,
html.mini-app-viewport textarea {
  font-size: max(1em, 16px);
}
