:root {
  color-scheme: light;
  --background: #f5f7f2;
  --surface: #fffdf8;
  --surface-soft: rgba(255, 255, 255, 0.72);
  --ink: #202229;
  --muted: #777b84;
  --line: rgba(32, 34, 41, 0.09);
  --teal: #168b85;
  --teal-dark: #08736d;
  --rose: #c76369;
  --card-shadow: 0 22px 56px rgba(39, 31, 18, 0.12);
  --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 {
  overflow: hidden;
}

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

.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: min(calc(100vw - 36px), 394px);
  position: fixed;
  left: 50%;
  top: calc(env(safe-area-inset-top) + 8px);
  z-index: 30;
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 14px;
  padding: 2px;
  border-radius: 10px;
  background: rgba(245, 247, 242, 0.94);
  backdrop-filter: blur(10px);
  transform: translateX(-50%);
}

.summary-date,
.section-heading span,
.today-kpi span,
.today-kpi small,
.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: min(220px, 100%);
  margin-left: auto;
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 4px;
  padding: 4px;
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.54);
  box-shadow: inset 0 0 0 1px var(--line);
}

.view-tab {
  min-height: 34px;
  padding: 0 12px;
  border-radius: 6px;
  background: transparent;
  color: var(--muted);
  font-size: 13px;
  font-weight: 850;
}

.view-tab.is-active {
  background: var(--ink);
  color: #fff;
}

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

.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));
  transition:
    top 380ms cubic-bezier(0.2, 0.84, 0.28, 1),
    transform 380ms cubic-bezier(0.2, 0.84, 0.28, 1),
    opacity 260ms ease,
    filter 260ms ease;
  will-change: top, transform, opacity;
  pointer-events: none;
}

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

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

.word-slide[data-carousel-slot="current"] {
  --slot-top: 50%;
  --slot-scale: 1;
  --slot-opacity: 1;
  --slot-z: 3;
  --picture-size: clamp(86px, 26vw, 138px);
  --word-size: clamp(64px, 18vw, 100px);
  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 {
  padding-bottom: clamp(96px, 13vh, 128px);
}

.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: 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.46;
}

.word-slide[data-carousel-slot="following"] {
  --slot-top: 140%;
  --slot-scale: 0.76;
  --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.5;
  --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(86px, 26vw, 138px);
  --word-size: clamp(64px, 18vw, 100px);
  filter: saturate(1);
}

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

.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(86px, 26vw, 138px);
  --word-size: clamp(64px, 18vw, 100px);
  filter: saturate(1);
}

.word-stage.is-retreating .word-slide[data-carousel-slot="current"] {
  --slot-top: 93%;
  --slot-scale: 0.8;
  --slot-opacity: 0.46;
  --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;
}

.slide-picture {
  width: min(var(--picture-size), 42%);
  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 {
  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;
}

.session-progress {
  position: absolute;
  left: clamp(18px, 5vw, 28px);
  right: clamp(18px, 5vw, 28px);
  bottom: clamp(8px, 1.4vh, 12px);
  display: flex;
  justify-content: center;
  gap: 5px;
  pointer-events: none;
}

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

.session-progress-dot {
  width: 4px;
  height: 4px;
  border-radius: 999px;
  background: rgba(32, 34, 41, 0.1);
}

.session-progress-dot[data-filled] {
  background: rgba(22, 139, 133, 0.44);
}

.picture-toggle {
  width: 30px;
  height: 30px;
  padding: 0;
  border-radius: 999px;
  display: grid;
  place-items: center;
  background: transparent;
  color: rgba(32, 34, 41, 0.34);
  box-shadow: inset 0 0 0 1px rgba(32, 34, 41, 0.08);
}

.picture-toggle[hidden],
.word-slide.is-picture-visible .picture-toggle {
  display: none;
}

.picture-toggle svg {
  width: 16px;
  height: 16px;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.8;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.picture-toggle:hover,
.picture-toggle:active {
  color: rgba(32, 34, 41, 0.52);
  background: rgba(255, 255, 255, 0.42);
  transform: translateY(1px);
}

.attempt-bar {
  width: auto;
  position: absolute;
  left: clamp(18px, 5vw, 28px);
  right: clamp(18px, 5vw, 28px);
  bottom: clamp(24px, 3.8vh, 34px);
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 8px;
  padding-top: 0;
}

.attempt {
  min-width: 0;
  height: 50px;
  padding: 0 2px;
  border-radius: 8px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 2px;
  background: rgba(255, 255, 255, 0.48);
  box-shadow: inset 0 0 0 1px rgba(32, 34, 41, 0.07);
  color: rgba(32, 34, 41, 0.68);
  font-size: clamp(12px, 3.1vw, 14px);
  font-weight: 760;
  line-height: 1;
}

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

.attempt:disabled {
  opacity: 0.48;
}

.attempt-icon {
  font-size: 18px;
  font-weight: 900;
  letter-spacing: 0;
  opacity: 0.74;
}

.summary-view {
  display: grid;
  gap: 13px;
  align-content: start;
  padding-top: 2px;
}

.summary-tabs {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 4px;
  padding: 4px;
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.54);
  box-shadow: inset 0 0 0 1px var(--line);
}

.summary-tab {
  min-height: 34px;
  padding: 0 10px;
  border-radius: 6px;
  background: transparent;
  color: var(--muted);
  font-size: 13px;
  font-weight: 850;
}

.summary-tab.is-active {
  background: var(--ink);
  color: #fff;
}

.summary-subpanel {
  display: grid;
  gap: 13px;
}

.summary-subpanel[hidden] {
  display: none;
}

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

.summary-status {
  margin: 0;
  padding: 0 2px 1px;
  color: var(--teal-dark);
  font-size: 13px;
  font-weight: 800;
  line-height: 1.3;
}

.summary-status:empty {
  display: 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;
}

#todaySessionStage {
  flex: 0 0 auto;
  max-width: 42%;
  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;
  text-align: right;
}

.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 {
  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;
}

.today-kpi small {
  line-height: 1.1;
}

.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);
}

.today-outcome-meter {
  height: 12px;
  display: flex;
  overflow: hidden;
  border-radius: 999px;
  background: rgba(32, 34, 41, 0.08);
}

.today-outcome-fill {
  flex: 0 0 0%;
  min-width: 0;
  transition: flex-basis 240ms ease;
}

.today-outcome-pass {
  background: var(--teal);
}

.today-outcome-miss {
  background: var(--rose);
}

.metric-value-line,
.title-with-info {
  min-width: 0;
  display: flex;
  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-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);
}

.overall-progress-section {
  padding: 17px 16px 16px;
  display: grid;
  gap: 13px;
  background: var(--surface);
}

.today-breakdown-section,
.mastery-section {
  padding: 14px;
  display: grid;
  gap: 10px;
  background: var(--surface);
}

.today-breakdown-section .section-heading,
.mastery-section .section-heading {
  margin-bottom: 0;
  padding: 0;
}

.mastery-grid {
  display: grid;
  gap: 8px;
}

.mastery-panel {
  min-width: 0;
  display: grid;
  gap: 8px;
  padding: 10px;
  border-radius: 8px;
  background: rgba(32, 34, 41, 0.035);
}

.mastery-panel-head {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 10px;
}

.mastery-panel-head strong {
  font-size: 14px;
  line-height: 1.1;
  font-weight: 900;
}

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

.mastery-chip-list {
  min-height: 28px;
  display: flex;
  flex-wrap: wrap;
  align-content: start;
  gap: 6px;
}

.mastery-chip-list-scroll {
  max-height: 104px;
  overflow-y: auto;
}

.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;
}

.today-breakdown-list {
  display: grid;
  gap: 8px;
}

.today-breakdown-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 10px 0;
  border-top: 1px solid var(--line);
}

.today-breakdown-row:first-child {
  border-top: 0;
}

.today-breakdown-copy {
  min-width: 0;
  display: grid;
  gap: 3px;
}

.today-breakdown-copy strong {
  font-size: 15px;
  line-height: 1.08;
}

.today-breakdown-copy span,
.today-breakdown-value span {
  color: var(--muted);
  font-size: 12px;
  font-weight: 760;
}

.today-breakdown-value {
  flex: 0 0 auto;
  display: flex;
  align-items: baseline;
  gap: 3px;
}

.today-breakdown-value strong {
  font-size: 24px;
  line-height: 1;
  font-weight: 930;
}

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

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

.overall-progress-section .section-heading {
  margin-bottom: 0;
  padding: 0;
}

#overallProgressPercent {
  font-size: clamp(32px, 9vw, 48px);
  line-height: 1;
  font-weight: 950;
}

#overallProgressText {
  margin: 0;
  color: var(--muted);
  font-size: 14px;
  font-weight: 780;
}

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

.overall-fill,
.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);
}

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

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

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

.phase-head > div {
  display: grid;
  gap: 3px;
}

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

.phase-head span,
.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 {
  min-height: 22px;
  padding: 0 8px;
  border-radius: 999px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background: rgba(32, 34, 41, 0.08);
  color: rgba(32, 34, 41, 0.48);
  font-size: 10px;
  font-weight: 900;
  letter-spacing: 0;
}

.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-locked {
  background: rgba(32, 34, 41, 0.035);
  color: rgba(32, 34, 41, 0.52);
  box-shadow: inset 0 0 0 1px rgba(32, 34, 41, 0.08);
}

.phase-card.is-locked .phase-head span,
.phase-card.is-locked .phase-detail-list,
.phase-card.is-locked .phase-actions > strong {
  color: rgba(32, 34, 41, 0.48);
}

.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-card.is-roadmap-only .phase-fill {
  background: rgba(32, 34, 41, 0.18);
}

.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-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-mastery {
  grid-column: 1 / -1;
  display: grid;
  gap: 7px;
  padding-top: 2px;
}

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

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

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

.progress-mastery-words {
  min-height: 27px;
  max-height: 86px;
  overflow-y: auto;
  display: flex;
  flex-wrap: wrap;
  align-content: start;
  gap: 6px;
}

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

.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;
}

.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);
  }
}
