:root {
  color-scheme: light;
  --bg: #15121b;
  --cabinet: #24131d;
  --cabinet-2: #0d3338;
  --panel: #fff8e8;
  --ink: #241a18;
  --muted: #8b806e;
  --line: #d8ad4f;
  --line-dark: #7b4c14;
  --gold: #f4ce58;
  --teal: #0f766e;
  --green: #15803d;
  --red: #b42318;
  --blue: #2563eb;
  --shadow: 0 24px 54px rgba(0, 0, 0, 0.36);
  --topbar-control-height: 56px;
  --academy-bg: url("./assets/magic-academy-stage.png");
  font-family:
    "Kaisei Opti",
    "Yu Mincho",
    "Hiragino Mincho ProN",
    "Yu Gothic UI",
    "Meiryo",
    system-ui,
    -apple-system,
    BlinkMacSystemFont,
    "Segoe UI",
    sans-serif;
}

* {
  box-sizing: border-box;
  scrollbar-width: none;
  -ms-overflow-style: none;
}

body {
  margin: 0;
  min-height: 100vh;
  min-height: 100dvh;
  background:
    linear-gradient(180deg, rgba(9, 7, 12, 0.42), rgba(5, 14, 17, 0.7)),
    var(--academy-bg) center center / cover no-repeat fixed,
    radial-gradient(circle at 50% 62%, rgba(153, 91, 34, 0.22), transparent 34%),
    linear-gradient(135deg, #100b14, #17131f 42%, #061e24);
  color: var(--ink);
  overflow: hidden;
}

body.study-summary-open {
  overflow: hidden;
}

.stage-canvas {
  position: fixed;
  inset: 0;
  z-index: 0;
  display: block;
  width: 100vw;
  height: 100vh;
  height: 100dvh;
  pointer-events: none;
}

.effects-canvas {
  position: fixed;
  inset: 0;
  z-index: 20;
  display: block;
  width: 100vw;
  height: 100vh;
  height: 100dvh;
  pointer-events: none;
}

:root[data-motion="lite"] .stage-canvas,
:root[data-motion="lite"] .effects-canvas {
  display: none;
}

button,
input {
  color: inherit;
  font: inherit;
}

button {
  border: 0;
}

.app-shell {
  position: relative;
  z-index: 1;
  display: grid;
  grid-template-columns: clamp(380px, 20vw, 500px) minmax(0, 1fr);
  height: 100vh;
  height: 100dvh;
  min-height: 100vh;
  min-height: 100dvh;
  max-height: 100vh;
  max-height: 100dvh;
  overflow: hidden;
}

.sidebar {
  border-right: 2px solid rgba(244, 206, 88, 0.72);
  background:
    linear-gradient(180deg, rgba(44, 19, 31, 0.94), rgba(9, 43, 45, 0.96)),
    var(--academy-bg) 7% top / auto 100% no-repeat,
    linear-gradient(180deg, rgba(44, 19, 31, 0.98), rgba(9, 43, 45, 0.98));
  background-blend-mode: normal, soft-light, normal;
  color: #fff8e8;
  padding: 20px;
  min-height: 0;
  max-height: 100vh;
  max-height: 100dvh;
  overflow-y: auto;
  overscroll-behavior: contain;
}

.brand {
  display: flex;
  gap: 11px;
  align-items: center;
  margin-bottom: 16px;
}

.brand-mark {
  display: grid;
  place-items: center;
  width: 50px;
  height: 50px;
  border: 2px solid var(--gold);
  border-radius: 7px;
  background: linear-gradient(145deg, #9f281e, #5f1219);
  color: #fff7d6;
  font-weight: 900;
  box-shadow:
    inset 0 0 0 3px rgba(255, 255, 255, 0.12),
    0 0 16px rgba(244, 206, 88, 0.28);
}

.brand h1 {
  margin: 0;
  font-size: 1.24rem;
  line-height: 1.18;
}

.brand p,
.eyebrow,
.stat-label {
  margin: 0;
  color: #ead7a8;
  font-size: 0.86rem;
  font-weight: 800;
}

.sidebar-data-transfer {
  display: grid;
  gap: 6px;
  margin: 0 0 10px;
}

.sidebar-data-buttons {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 8px;
}

.sidebar-data-button {
  position: relative;
  display: grid;
  grid-template-columns: 42px minmax(0, 1fr);
  align-items: center;
  gap: 8px;
  min-height: 78px;
  overflow: hidden;
  border: 2px solid rgba(255, 229, 134, 0.86);
  border-radius: 9px;
  padding: 8px;
  background:
    linear-gradient(145deg, rgba(36, 205, 215, 0.4), rgba(32, 91, 157, 0.45)),
    rgba(6, 29, 43, 0.96);
  color: #fff8e8;
  text-align: left;
  box-shadow:
    inset 0 1px rgba(255, 255, 255, 0.18),
    0 6px 18px rgba(0, 0, 0, 0.24);
  cursor: pointer;
  transition: border-color 140ms ease, transform 140ms ease, filter 140ms ease, box-shadow 140ms ease;
}

.sidebar-data-button.load {
  background:
    linear-gradient(145deg, rgba(120, 91, 238, 0.48), rgba(235, 76, 151, 0.34)),
    rgba(18, 24, 52, 0.96);
}

.sidebar-data-button:hover {
  border-color: #fff3a8;
  filter: brightness(1.13);
  transform: translateY(-1px);
  box-shadow:
    inset 0 1px rgba(255, 255, 255, 0.24),
    0 9px 22px rgba(41, 190, 225, 0.22);
}

.sidebar-data-button:focus-visible {
  outline: 3px solid #75eaff;
  outline-offset: 2px;
}

.sidebar-data-button:disabled {
  cursor: wait;
  filter: grayscale(0.4);
  opacity: 0.62;
  transform: none;
}

.sidebar-data-button-icon {
  display: grid;
  place-items: center;
  width: 42px;
  height: 48px;
  border: 1px solid rgba(255, 241, 168, 0.86);
  border-radius: 7px;
  background: linear-gradient(145deg, #67edf0, #208fd0 58%, #7164e5);
  color: #061d2b;
  box-shadow: 0 0 14px rgba(87, 227, 239, 0.26);
}

.sidebar-data-button.load .sidebar-data-button-icon {
  background: linear-gradient(145deg, #ffe47a, #ff9d3d 56%, #ff4fa3);
  color: #251124;
  box-shadow: 0 0 14px rgba(255, 176, 74, 0.28);
}

.sidebar-data-button-icon svg {
  width: 23px;
  height: 23px;
  stroke-width: 2.6;
}

.sidebar-data-button-copy {
  display: grid;
  min-width: 0;
  gap: 1px;
}

.sidebar-data-button-copy small {
  color: #9fefff;
  font-size: 0.58rem;
  font-weight: 950;
  letter-spacing: 0.13em;
}

.sidebar-data-button.load .sidebar-data-button-copy small {
  color: #ffd7e7;
}

.sidebar-data-button-copy strong {
  color: #fff8e8;
  font-size: 1.14rem;
  line-height: 1.18;
}

.sidebar-data-button-copy em {
  overflow: hidden;
  color: #ead7a8;
  font-size: 0.62rem;
  font-style: normal;
  font-weight: 800;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.sidebar-data-status {
  min-height: 1.25em;
  margin: 0;
  color: #d5eff2;
  font-size: 0.64rem;
  font-weight: 750;
  line-height: 1.25;
  text-align: center;
}

.sidebar-data-status[data-kind="success"] {
  color: #a6ffd8;
}

.sidebar-data-status[data-kind="error"] {
  color: #ffb6be;
}

.maintenance-entry {
  position: relative;
  display: grid;
  grid-template-columns: 48px minmax(0, 1fr) 22px;
  align-items: center;
  gap: 11px;
  min-height: 76px;
  margin: 0 0 14px;
  border: 2px solid rgba(255, 229, 134, 0.92);
  border-radius: 9px;
  padding: 10px 11px;
  overflow: hidden;
  background:
    linear-gradient(105deg, rgba(40, 220, 246, 0.38), rgba(97, 95, 255, 0.35) 55%, rgba(255, 79, 163, 0.3)),
    rgba(7, 27, 43, 0.96);
  color: #fff8e8;
  text-decoration: none;
  box-shadow:
    inset 4px 0 #ffe176,
    inset 0 1px rgba(255, 255, 255, 0.18),
    0 8px 22px rgba(0, 0, 0, 0.26);
  transition: border-color 140ms ease, transform 140ms ease, filter 140ms ease, box-shadow 140ms ease;
}

.maintenance-entry::after {
  content: "";
  position: absolute;
  right: -30px;
  bottom: -45px;
  width: 120px;
  height: 120px;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(105, 232, 255, 0.24), transparent 68%);
  pointer-events: none;
}

.maintenance-entry:hover {
  border-color: #fff3a8;
  filter: brightness(1.13);
  transform: translateY(-1px);
  box-shadow:
    inset 4px 0 #ffe176,
    inset 0 1px rgba(255, 255, 255, 0.24),
    0 10px 26px rgba(42, 184, 232, 0.24);
}

.maintenance-entry:focus-visible {
  outline: 3px solid #75eaff;
  outline-offset: 3px;
}

.maintenance-entry-icon {
  display: grid;
  place-items: center;
  width: 46px;
  height: 46px;
  border: 1px solid rgba(255, 241, 168, 0.9);
  border-radius: 8px;
  background: linear-gradient(145deg, #ffe47a, #ff9d3d 54%, #ff4fa3);
  color: #251124;
  box-shadow: 0 0 16px rgba(255, 190, 70, 0.32);
}

.maintenance-entry-icon svg {
  width: 25px;
  height: 25px;
  stroke-width: 2.5;
}

.maintenance-entry-copy {
  display: grid;
  min-width: 0;
  gap: 1px;
}

.maintenance-entry-copy small {
  color: #9fefff;
  font-size: 0.62rem;
  font-style: normal;
  font-weight: 950;
  letter-spacing: 0.12em;
}

.maintenance-entry-copy strong {
  color: #fff8e8;
  font-size: 1.13rem;
  line-height: 1.25;
}

.maintenance-entry-copy em {
  overflow: hidden;
  color: #ead7a8;
  font-size: 0.7rem;
  font-style: normal;
  font-weight: 800;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.maintenance-entry-arrow {
  position: relative;
  z-index: 1;
  width: 21px;
  height: 21px;
  color: #fff1a8;
}

.course-switch {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
  margin-bottom: 18px;
}

.course-tab,
.format-tab,
.chapter-button,
.icon-button,
.ghost-button,
.primary-button,
.option-button {
  border: 1px solid rgba(244, 206, 88, 0.62);
  border-radius: 8px;
  cursor: pointer;
  transition:
    border-color 140ms ease,
    background 140ms ease,
    transform 140ms ease,
    box-shadow 140ms ease,
    filter 140ms ease;
}

.course-tab {
  min-height: 58px;
  padding: 12px 10px;
  background: rgba(255, 248, 232, 0.08);
  color: #fff8e8;
  font-size: 1.08rem;
  font-weight: 900;
}

.course-tab.active,
.format-tab.active {
  border-color: #fff1a8;
  background: color-mix(in srgb, var(--active, var(--teal)) 34%, #fff8e8);
  color: #191413;
  box-shadow: 0 0 0 2px rgba(255, 241, 168, 0.22);
}

.format-switch {
  margin-bottom: 18px;
}

.format-switch[hidden] {
  display: none;
}

.sidebar-label {
  margin: 0 0 10px;
  color: #ffe37d;
  font-size: 1rem;
  font-weight: 900;
}

.format-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
}

.format-tab {
  min-height: 50px;
  padding: 10px 12px;
  background: rgba(255, 248, 232, 0.08);
  color: #fff8e8;
  font-size: 1.08rem;
  font-weight: 900;
}

.format-tab:first-child {
  grid-column: 1 / -1;
}

.chapter-list {
  display: grid;
  grid-template-columns: 1fr;
  gap: 7px;
}

.chapter-list.categorized {
  display: flex;
  flex-direction: column;
  gap: 5px;
  min-height: 0;
  overflow-y: auto;
  overscroll-behavior: contain;
}

.chapter-category-section {
  --category-accent: #60d7d6;
  --category-border: rgba(96, 215, 214, 0.76);
  --category-fill-a: rgba(10, 72, 81, 0.9);
  --category-fill-b: rgba(24, 44, 58, 0.82);
  --category-count-bg: rgba(7, 35, 42, 0.72);
  display: grid;
  grid-template-columns: 1fr;
  gap: 5px;
  min-height: 0;
}

.chapter-category-section[data-category="technology"] {
  --category-accent: #3fd3ff;
  --category-border: rgba(88, 211, 255, 0.74);
  --category-fill-a: rgba(6, 72, 92, 0.92);
  --category-fill-b: rgba(16, 50, 68, 0.84);
  --category-count-bg: rgba(4, 37, 52, 0.78);
}

.chapter-category-section[data-category="management"] {
  --category-accent: #ffb15c;
  --category-border: rgba(255, 177, 92, 0.76);
  --category-fill-a: rgba(105, 45, 36, 0.92);
  --category-fill-b: rgba(61, 39, 50, 0.86);
  --category-count-bg: rgba(71, 35, 32, 0.8);
}

.chapter-category-section[data-category="strategy"] {
  --category-accent: #a7df68;
  --category-border: rgba(167, 223, 104, 0.72);
  --category-fill-a: rgba(44, 78, 44, 0.92);
  --category-fill-b: rgba(35, 51, 58, 0.86);
  --category-count-bg: rgba(30, 55, 36, 0.8);
}

.chapter-category-section[data-category="fundamental-year"] {
  --category-accent: #55d6ff;
  --category-border: rgba(85, 214, 255, 0.74);
  --category-fill-a: rgba(8, 75, 92, 0.92);
  --category-fill-b: rgba(19, 51, 63, 0.86);
  --category-count-bg: rgba(4, 43, 58, 0.8);
}

.chapter-category-section[data-category="fundamental-field"] {
  --category-accent: #ffe37d;
  --category-border: rgba(255, 227, 125, 0.74);
  --category-fill-a: rgba(84, 57, 20, 0.92);
  --category-fill-b: rgba(50, 40, 47, 0.86);
  --category-count-bg: rgba(67, 45, 18, 0.82);
}

.chapter-category-section[data-category="aptitude"] {
  --category-accent: #8ee0a1;
  --category-border: rgba(142, 224, 161, 0.72);
  --category-fill-a: rgba(26, 88, 59, 0.9);
  --category-fill-b: rgba(22, 56, 58, 0.86);
  --category-count-bg: rgba(18, 62, 42, 0.82);
}

.chapter-category-section[data-category="info"] {
  --category-accent: #c6a6ff;
  --category-border: rgba(198, 166, 255, 0.72);
  --category-fill-a: rgba(65, 48, 102, 0.9);
  --category-fill-b: rgba(38, 43, 67, 0.86);
  --category-count-bg: rgba(47, 36, 76, 0.82);
}

.chapter-category-section[data-category="math-i"] {
  --category-accent: #35d5ba;
  --category-border: rgba(53, 213, 186, 0.76);
  --category-fill-a: rgba(8, 92, 84, 0.92);
  --category-fill-b: rgba(20, 55, 66, 0.86);
  --category-count-bg: rgba(5, 50, 48, 0.82);
}

.chapter-category-section[data-category="math-a"] {
  --category-accent: #7dd3fc;
  --category-border: rgba(125, 211, 252, 0.74);
  --category-fill-a: rgba(7, 72, 105, 0.9);
  --category-fill-b: rgba(24, 52, 78, 0.86);
  --category-count-bg: rgba(8, 50, 78, 0.82);
}

.chapter-category-section[data-category="math-ii"] {
  --category-accent: #facc15;
  --category-border: rgba(250, 204, 21, 0.74);
  --category-fill-a: rgba(104, 73, 13, 0.9);
  --category-fill-b: rgba(70, 53, 36, 0.86);
  --category-count-bg: rgba(74, 54, 10, 0.82);
}

.chapter-category-section[data-category="math-b"] {
  --category-accent: #fb7185;
  --category-border: rgba(251, 113, 133, 0.72);
  --category-fill-a: rgba(107, 38, 62, 0.9);
  --category-fill-b: rgba(68, 42, 62, 0.86);
  --category-count-bg: rgba(80, 31, 48, 0.82);
}

.chapter-category-section[data-category="math-iii"] {
  --category-accent: #a78bfa;
  --category-border: rgba(167, 139, 250, 0.74);
  --category-fill-a: rgba(73, 55, 125, 0.9);
  --category-fill-b: rgba(46, 46, 82, 0.86);
  --category-count-bg: rgba(54, 42, 91, 0.82);
}

.chapter-category-section[data-category="math-c"] {
  --category-accent: #86efac;
  --category-border: rgba(134, 239, 172, 0.72);
  --category-fill-a: rgba(28, 99, 64, 0.9);
  --category-fill-b: rgba(30, 63, 65, 0.86);
  --category-count-bg: rgba(23, 70, 47, 0.82);
}

.chapter-category-section.collapsed {
  flex: 0 0 auto;
}

.chapter-category-section.expanded {
  flex: 0 0 auto;
}

.chapter-category-section.roadmap-only {
  opacity: 0.82;
}

.chapter-category-toggle {
  position: relative;
  overflow: hidden;
  display: grid;
  grid-template-columns: auto minmax(0, 1fr) auto;
  align-items: center;
  gap: 13px;
  width: 100%;
  min-height: 42px;
  padding: 12px 13px;
  border: 1px solid var(--category-border);
  border-radius: 8px;
  background:
    linear-gradient(90deg, rgba(255, 248, 232, 0.18), rgba(255, 248, 232, 0.04) 42%, rgba(0, 0, 0, 0.1)),
    linear-gradient(90deg, var(--category-fill-a), var(--category-fill-b));
  color: #fff8e8;
  cursor: pointer;
  text-align: left;
  box-shadow:
    inset 5px 0 0 var(--category-accent),
    inset 0 1px 0 rgba(255, 248, 232, 0.14);
  transition:
    border-color 140ms ease,
    background 140ms ease,
    transform 140ms ease,
    filter 140ms ease;
}

.chapter-category-toggle:hover {
  border-color: color-mix(in srgb, var(--category-accent) 70%, #fff8e8);
  transform: translateY(-1px);
  filter: brightness(1.05);
}

.chapter-category-caret {
  width: 0;
  height: 0;
  border-top: 6px solid transparent;
  border-bottom: 6px solid transparent;
  border-left: 8px solid var(--category-accent);
  transform: rotate(90deg);
  transition: transform 140ms ease;
}

.chapter-category-toggle.collapsed .chapter-category-caret {
  transform: rotate(0deg);
}

.chapter-category-name {
  min-width: 0;
  overflow: hidden;
  color: #fff8e8;
  font-size: 1.3rem;
  font-weight: 900;
  line-height: 1.28;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.chapter-category-count {
  display: inline-flex;
  align-items: center;
  min-height: 24px;
  padding: 0 8px;
  border: 1px solid color-mix(in srgb, var(--category-accent) 42%, transparent);
  border-radius: 999px;
  background: var(--category-count-bg);
  color: #fff1a8;
  font-size: 0.84rem;
  font-weight: 900;
  white-space: nowrap;
}

.chapter-roadmap-list {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  border: 1px solid rgba(255, 248, 232, 0.1);
  border-radius: 8px;
  background: rgba(2, 16, 22, 0.46);
  padding: 8px;
}

.chapter-roadmap-list span {
  display: inline-flex;
  align-items: center;
  min-height: 25px;
  border: 1px solid rgba(255, 248, 232, 0.14);
  border-radius: 999px;
  padding: 4px 8px;
  color: rgba(255, 248, 232, 0.76);
  background: rgba(255, 248, 232, 0.06);
  font-size: 0.7rem;
  font-weight: 900;
  line-height: 1;
}

.chapter-button {
  position: relative;
  overflow: hidden;
  display: grid;
  grid-template-columns: auto minmax(0, 1fr) auto;
  gap: 13px;
  align-items: center;
  width: 100%;
  min-height: 76px;
  padding: 12px 13px;
  background:
    linear-gradient(90deg, rgba(255, 248, 232, 0.12), rgba(255, 248, 232, 0.05)),
    rgba(13, 51, 56, 0.64);
  color: #fff8e8;
  text-align: left;
}

.chapter-button::before {
  content: "";
  position: absolute;
  inset: 0;
  width: var(--chapter-progress, 0%);
  background:
    linear-gradient(90deg, rgba(255, 56, 100, 0.8), rgba(255, 185, 40, 0.8), rgba(49, 209, 88, 0.8), rgba(0, 212, 255, 0.78), rgba(112, 107, 255, 0.72));
  opacity: 0.34;
  transition: width 260ms ease;
}

.chapter-button > span {
  position: relative;
  z-index: 1;
}

.chapter-button:hover,
.option-button:hover,
.icon-button:hover,
.ghost-button:hover,
.primary-button:hover {
  transform: translateY(-1px);
  filter: brightness(1.05);
}

.chapter-button.active {
  border-color: #fff1a8;
  background:
    linear-gradient(90deg, rgba(244, 206, 88, 0.36), rgba(255, 248, 232, 0.08)),
    rgba(35, 18, 27, 0.72);
  box-shadow:
    inset 3px 0 0 var(--active, var(--teal)),
    0 0 0 1px rgba(255, 241, 168, 0.16);
}

.chapter-no {
  display: grid;
  place-items: center;
  width: 48px;
  height: 48px;
  border-radius: 7px;
  background: #fff8e8;
  color: #24131d;
  font-weight: 900;
  font-size: 1.14rem;
}

.chapter-name {
  min-width: 0;
  font-weight: 900;
  line-height: 1.28;
  font-size: 1.3rem;
}

.chapter-score {
  color: #f5d78b;
  font-size: 1.05rem;
  font-weight: 900;
  white-space: nowrap;
}

:root[data-course="periodic-table"] .sidebar {
  display: flex;
  flex-direction: column;
}

:root[data-course="periodic-table"] .chapter-list.periodic-element-list {
  flex: 1 1 auto;
  display: grid;
  grid-template-columns: 1fr;
  gap: 2px;
  min-height: 0;
  overflow-y: auto;
  align-content: start;
  padding: 0 0 6px;
  overscroll-behavior: contain;
  scrollbar-width: thin;
}

:root[data-course="periodic-table"] .chapter-list.periodic-element-list::-webkit-scrollbar {
  width: 8px;
}

:root[data-course="periodic-table"] .chapter-list.periodic-element-list::-webkit-scrollbar-thumb {
  border-radius: 999px;
  background: rgba(244, 206, 88, 0.36);
}

.periodic-list-button {
  gap: 9px;
  min-height: 38px;
  padding: 4px 8px;
}

.periodic-list-button .chapter-no {
  width: 32px;
  height: 30px;
  border-radius: 5px;
  font-size: 1rem;
}

.periodic-list-button .chapter-name {
  overflow: hidden;
  font-size: 1.02rem;
  line-height: 1.2;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.periodic-list-button .chapter-score {
  min-width: 34px;
  font-size: 0.84rem;
  text-align: right;
  overflow: hidden;
  text-overflow: ellipsis;
}

.periodic-element-button {
  --element-bg-a: rgba(21, 79, 87, 0.94);
  --element-bg-b: rgba(17, 42, 55, 0.9);
  --element-border: rgba(157, 228, 224, 0.62);
  --element-ink: #fff8e8;
  position: relative;
  overflow: hidden;
  display: grid;
  grid-template-rows: auto minmax(0, 1fr) auto;
  align-items: center;
  width: 52px;
  height: 66px;
  padding: 4px 4px 5px;
  border: 1px solid var(--element-border);
  border-radius: 7px;
  background:
    linear-gradient(180deg, rgba(255, 248, 232, 0.2), rgba(255, 248, 232, 0.04)),
    linear-gradient(145deg, var(--element-bg-a), var(--element-bg-b));
  color: var(--element-ink);
  text-align: center;
  box-shadow:
    inset 0 1px 0 rgba(255, 248, 232, 0.16),
    0 5px 14px rgba(0, 0, 0, 0.12);
  transition:
    border-color 140ms ease,
    transform 140ms ease,
    box-shadow 140ms ease,
    filter 140ms ease;
}

.periodic-element-button::before {
  content: "";
  position: absolute;
  inset: auto 0 0;
  width: var(--chapter-progress, 0%);
  height: 5px;
  background: linear-gradient(90deg, #ff3864, #ffb928, #31d158, #00d4ff);
  opacity: 0.84;
  transition: width 260ms ease;
}

.periodic-element-button:hover {
  transform: translateY(-1px);
  filter: brightness(1.07);
}

.periodic-element-button.active {
  border-color: #fff1a8;
  box-shadow:
    inset 0 0 0 2px rgba(255, 241, 168, 0.36),
    0 0 0 1px rgba(255, 241, 168, 0.2),
    0 9px 20px rgba(0, 0, 0, 0.22);
}

.periodic-number,
.periodic-symbol,
.periodic-name,
.periodic-score {
  position: relative;
  z-index: 1;
  min-width: 0;
}

.periodic-number {
  justify-self: start;
  color: rgba(255, 248, 232, 0.78);
  font-size: 0.62rem;
  font-weight: 900;
  line-height: 1;
}

.periodic-symbol {
  align-self: center;
  color: #fff;
  font-family:
    "Segoe UI",
    "Yu Gothic UI",
    "Meiryo",
    sans-serif;
  font-size: 1.08rem;
  font-weight: 950;
  line-height: 1;
}

.periodic-name {
  overflow: hidden;
  color: rgba(255, 248, 232, 0.94);
  font-size: 0.55rem;
  font-weight: 900;
  line-height: 1.05;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.periodic-score {
  color: rgba(255, 241, 168, 0.9);
  font-size: 0.52rem;
  font-weight: 900;
  line-height: 1;
}

.periodic-type-nonmetal {
  --element-bg-a: rgba(21, 115, 87, 0.94);
  --element-bg-b: rgba(16, 71, 67, 0.92);
  --element-border: rgba(132, 231, 188, 0.68);
}

.periodic-type-noble-gas {
  --element-bg-a: rgba(87, 75, 175, 0.95);
  --element-bg-b: rgba(41, 54, 111, 0.92);
  --element-border: rgba(182, 176, 255, 0.72);
}

.periodic-type-alkali-metal {
  --element-bg-a: rgba(172, 65, 58, 0.95);
  --element-bg-b: rgba(107, 43, 48, 0.94);
  --element-border: rgba(255, 160, 126, 0.72);
}

.periodic-type-alkaline-earth {
  --element-bg-a: rgba(171, 103, 26, 0.95);
  --element-bg-b: rgba(103, 65, 32, 0.94);
  --element-border: rgba(255, 203, 119, 0.74);
}

.periodic-type-transition-metal {
  --element-bg-a: rgba(28, 104, 152, 0.95);
  --element-bg-b: rgba(25, 62, 90, 0.94);
  --element-border: rgba(126, 207, 255, 0.72);
}

.periodic-type-post-transition {
  --element-bg-a: rgba(84, 122, 60, 0.95);
  --element-bg-b: rgba(55, 76, 52, 0.94);
  --element-border: rgba(178, 224, 126, 0.72);
}

.periodic-type-metalloid {
  --element-bg-a: rgba(137, 93, 36, 0.95);
  --element-bg-b: rgba(82, 63, 45, 0.94);
  --element-border: rgba(239, 190, 113, 0.74);
}

.periodic-type-halogen {
  --element-bg-a: rgba(20, 131, 145, 0.96);
  --element-bg-b: rgba(18, 78, 91, 0.94);
  --element-border: rgba(105, 230, 236, 0.74);
}

.periodic-type-lanthanide {
  --element-bg-a: rgba(114, 78, 150, 0.95);
  --element-bg-b: rgba(73, 57, 98, 0.94);
  --element-border: rgba(220, 177, 255, 0.74);
}

.periodic-type-actinide {
  --element-bg-a: rgba(148, 68, 113, 0.95);
  --element-bg-b: rgba(88, 48, 82, 0.94);
  --element-border: rgba(255, 169, 214, 0.74);
}

:root[data-course="advanced-am1"] .sidebar,
:root[data-course="pe-first-info"] .sidebar {
  display: flex;
  flex-direction: column;
}

:root[data-course="advanced-am1"] .chapter-list,
:root[data-course="pe-first-info"] .chapter-list {
  flex: 1 1 auto;
  grid-template-columns: 1fr;
  gap: 2px;
  min-height: 0;
}

:root[data-course="advanced-am1"] .chapter-button,
:root[data-course="pe-first-info"] .chapter-button {
  gap: 9px;
  min-height: 38px;
  padding: 4px 8px;
}

:root[data-course="advanced-am1"] .chapter-no,
:root[data-course="pe-first-info"] .chapter-no {
  width: 30px;
  height: 30px;
  border-radius: 5px;
  font-size: 1rem;
}

:root[data-course="advanced-am1"] .chapter-name,
:root[data-course="pe-first-info"] .chapter-name {
  line-height: 1.2;
  font-size: 1.04rem;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

:root[data-course="advanced-am1"] .chapter-score,
:root[data-course="pe-first-info"] .chapter-score {
  display: none;
}

:root[data-course="advanced-am1"] .chapter-list.categorized,
:root[data-course="pe-first-info"] .chapter-list.categorized {
  align-content: start;
  gap: 3px;
}

:root[data-course="advanced-am1"] .chapter-category-section,
:root[data-course="pe-first-info"] .chapter-category-section {
  gap: 3px;
}

:root[data-course="advanced-am1"] .chapter-category-section.expanded,
:root[data-course="pe-first-info"] .chapter-category-section.expanded {
  grid-template-rows: minmax(38px, auto) repeat(var(--category-chapter-count, 1), minmax(38px, 1fr));
}

:root[data-course="advanced-am1"] .chapter-category-toggle,
:root[data-course="pe-first-info"] .chapter-category-toggle {
  gap: 9px;
  min-height: 38px;
  padding: 4px 8px 4px 13px;
}

:root[data-course="advanced-am1"] .chapter-category-name,
:root[data-course="pe-first-info"] .chapter-category-name {
  font-size: 1.04rem;
  line-height: 1.2;
}

:root[data-course="advanced-am1"] .chapter-category-count,
:root[data-course="pe-first-info"] .chapter-category-count {
  font-size: 0.88rem;
  min-height: 26px;
  padding: 0 7px;
}

.main {
  position: relative;
  display: grid;
  grid-template-rows: auto auto minmax(0, 1fr);
  gap: 11px;
  min-width: 0;
  height: 100vh;
  height: 100dvh;
  min-height: 0;
  max-height: 100vh;
  max-height: 100dvh;
  padding: 20px clamp(16px, 1.7vw, 30px) 18px;
  overflow: auto;
  overscroll-behavior: contain;
  background:
    linear-gradient(90deg, rgba(21, 13, 22, 0.62), rgba(18, 18, 29, 0.08) 46%, rgba(8, 35, 38, 0.38));
}

.main::before {
  content: "";
  position: absolute;
  inset: 0;
  z-index: 0;
  background:
    linear-gradient(90deg, rgba(19, 8, 17, 0.78), rgba(12, 21, 28, 0.18) 48%, rgba(4, 38, 40, 0.62)),
    var(--academy-bg) center top / cover no-repeat;
  opacity: 0.36;
  filter: saturate(1.12) contrast(1.08);
  pointer-events: none;
}

.main::after {
  content: "";
  position: absolute;
  inset: 0;
  z-index: 0;
  background:
    radial-gradient(circle at 49% 55%, rgba(255, 231, 166, 0.16), transparent 28%),
    linear-gradient(180deg, rgba(16, 10, 17, 0.46), rgba(11, 20, 24, 0.24) 42%, rgba(8, 14, 17, 0.58));
  pointer-events: none;
}

.topbar,
.status-band,
.periodic-stage,
.playfield {
  position: relative;
  z-index: 1;
}

.topbar {
  z-index: 30;
  display: grid;
  grid-template-columns: minmax(250px, 0.9fr) minmax(620px, 2.4fr) auto auto;
  gap: 8px;
  align-items: stretch;
  color: #fff8e8;
  border: 1px solid rgba(244, 206, 88, 0.54);
  border-radius: 8px;
  background:
    linear-gradient(90deg, rgba(54, 17, 31, 0.78), rgba(10, 27, 34, 0.74)),
    var(--academy-bg) center 16% / cover no-repeat,
    linear-gradient(90deg, rgba(52, 18, 31, 0.66), rgba(17, 26, 34, 0.62) 52%, rgba(31, 17, 27, 0.66));
  background-blend-mode: normal, soft-light, normal;
  padding: 8px;
  box-shadow:
    inset 0 1px 0 rgba(255, 248, 232, 0.12),
    0 12px 24px rgba(0, 0, 0, 0.2);
  backdrop-filter: blur(3px);
}

.chapter-heading {
  min-width: 0;
  align-self: center;
}

.header-cards {
  order: 3;
  display: grid;
  grid-template-columns: repeat(2, minmax(96px, 118px));
  gap: 7px;
  align-items: stretch;
}

.topbar h2 {
  margin: 2px 0 0;
  color: #fff8e8;
  font-size: clamp(1.24rem, 1.6vw, 1.78rem);
  line-height: 1.16;
  text-shadow: 0 2px 0 rgba(0, 0, 0, 0.34);
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.topbar .eyebrow {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.toolbar,
.quiz-actions {
  display: flex;
  gap: 8px;
  align-items: center;
  flex-wrap: wrap;
}

.topbar .toolbar {
  order: 4;
  flex-wrap: nowrap;
  align-items: stretch;
  height: 100%;
  overflow: visible;
}

.icon-button,
.ghost-button,
.primary-button {
  min-height: 36px;
  padding: 0 11px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 7px;
  font-weight: 900;
}

.topbar .icon-button {
  min-height: var(--topbar-control-height);
}

.icon-button {
  background: rgba(31, 24, 27, 0.54);
  color: #fff8e8;
  box-shadow: inset 0 0 0 1px rgba(255, 248, 232, 0.08);
}

.icon-button.active {
  border-color: #a7f3d0;
  background: rgba(15, 118, 110, 0.62);
}

#favoriteModeButton {
  border-color: rgba(255, 220, 96, 0.56);
}

#favoriteModeButton.active {
  border-color: rgba(255, 220, 96, 0.9);
  background: linear-gradient(180deg, rgba(143, 86, 17, 0.92), rgba(80, 42, 18, 0.86));
  color: #fff1a8;
  box-shadow:
    inset 0 1px 0 rgba(255, 248, 232, 0.2),
    0 0 14px rgba(255, 196, 64, 0.24);
}

#calculationModeButton {
  border-color: rgba(125, 211, 252, 0.5);
}

#calculationModeButton.active {
  border-color: transparent;
  background:
    linear-gradient(180deg, rgba(20, 20, 28, 0.88), rgba(4, 10, 18, 0.94)) padding-box,
    conic-gradient(from 40deg, #ff1744, #ff9100, #ffea00, #00e676, #00b0ff, #651fff, #d500f9, #ff1744) border-box;
  color: #ffffff;
  box-shadow:
    inset 0 1px 0 rgba(255, 248, 232, 0.18),
    0 0 16px rgba(125, 211, 252, 0.24);
}

#nonCalculationModeButton {
  border-color: rgba(203, 213, 225, 0.48);
}

#nonCalculationModeButton.active {
  border-color: rgba(203, 213, 225, 0.92);
  background: linear-gradient(180deg, rgba(71, 85, 105, 0.92), rgba(15, 23, 42, 0.9));
  color: #f8fafc;
  box-shadow:
    inset 0 1px 0 rgba(255, 248, 232, 0.18),
    0 0 16px rgba(148, 163, 184, 0.22);
}

.icon-button:disabled {
  opacity: 0.42;
  cursor: default;
  filter: grayscale(0.45);
}

.icon-button.active [data-lucide="star"] {
  fill: currentColor;
}

.icon-button.danger-button {
  border-color: rgba(255, 150, 120, 0.72);
  background: linear-gradient(180deg, rgba(96, 22, 32, 0.78), rgba(50, 18, 28, 0.72));
}

.icon-button.danger-button:hover,
.icon-button.danger-button:focus-visible {
  border-color: #ffd08a;
  background: linear-gradient(180deg, rgba(148, 38, 45, 0.92), rgba(84, 26, 34, 0.86));
  box-shadow:
    inset 0 0 0 1px rgba(255, 248, 232, 0.16),
    0 0 14px rgba(255, 108, 77, 0.34);
}

.history-menu-wrap {
  position: relative;
  display: inline-flex;
  align-items: stretch;
}

.history-menu {
  position: absolute;
  top: calc(100% + 8px);
  right: 0;
  z-index: 60;
  display: grid;
  gap: 6px;
  min-width: 168px;
  padding: 8px;
  border: 1px solid rgba(244, 206, 88, 0.74);
  border-radius: 8px;
  background:
    linear-gradient(180deg, rgba(39, 18, 29, 0.98), rgba(9, 36, 39, 0.98)),
    var(--academy-bg) center top / cover no-repeat;
  box-shadow:
    0 18px 34px rgba(0, 0, 0, 0.38),
    inset 0 0 0 1px rgba(255, 248, 232, 0.08);
}

.history-menu.hidden {
  display: none;
}

.history-menu-item {
  display: grid;
  grid-template-columns: 18px minmax(0, 1fr);
  gap: 8px;
  align-items: center;
  min-height: 38px;
  padding: 7px 9px;
  border: 1px solid rgba(244, 206, 88, 0.46);
  border-radius: 7px;
  background: rgba(255, 248, 232, 0.08);
  color: #fff8e8;
  font-weight: 900;
  text-align: left;
}

.history-menu-item:hover,
.history-menu-item:focus-visible {
  border-color: #fff1a8;
  background: rgba(15, 118, 110, 0.54);
}

.history-menu-item svg {
  width: 16px;
  height: 16px;
}

.danger-menu-item {
  border-color: rgba(255, 150, 120, 0.72);
  background: rgba(96, 22, 32, 0.72);
}

.history-inline-confirm {
  display: grid;
  gap: 8px;
  margin-top: 4px;
  padding: 10px;
  border: 1px solid rgba(255, 150, 120, 0.72);
  border-radius: 8px;
  background: rgba(96, 22, 32, 0.7);
}

.history-inline-confirm.hidden {
  display: none;
}

.history-inline-title {
  color: #ffe37d;
  font-size: 0.92rem;
  font-weight: 900;
}

.history-inline-message {
  color: #fff8e8;
  font-size: 0.88rem;
  font-weight: 800;
  line-height: 1.45;
}

.history-inline-actions {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 8px;
}

.history-inline-actions .ghost-button,
.history-inline-actions .primary-button {
  min-height: 34px;
  padding: 0 8px;
}

.danger-confirm-button {
  border-color: rgba(255, 150, 120, 0.78);
  background: linear-gradient(180deg, #a3292d, #6a1723);
}

.icon-button svg,
.ghost-button svg,
.primary-button svg {
  width: 17px;
  height: 17px;
}

.ghost-button {
  background: #fff8e8;
  color: #24131d;
}

.primary-button {
  border-color: #fff1a8;
  background: linear-gradient(180deg, #ffe889, #d99420 62%, #9d5212);
  color: #24131d;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.42);
}

.status-band {
  order: 2;
  display: grid;
  grid-template-columns: minmax(118px, 140px) repeat(4, minmax(68px, 90px)) minmax(160px, 1fr);
  gap: 6px;
  align-items: center;
  min-height: var(--topbar-control-height);
  height: 100%;
  border: 1px solid rgba(244, 206, 88, 0.42);
  border-radius: 8px;
  background:
    linear-gradient(90deg, rgba(80, 22, 38, 0.48), rgba(17, 31, 37, 0.66) 46%, rgba(38, 23, 34, 0.54)),
    rgba(31, 17, 27, 0.42);
  padding: 5px 7px;
  color: #fff8e8;
  box-shadow:
    inset 0 1px 0 rgba(255, 248, 232, 0.12),
    inset 0 -1px 0 rgba(244, 206, 88, 0.12);
}

.status-cell {
  position: relative;
  min-width: 0;
  min-height: 32px;
  border: 1px solid rgba(255, 226, 128, 0.2);
  border-radius: 7px;
  background:
    linear-gradient(180deg, rgba(255, 248, 232, 0.08), rgba(255, 248, 232, 0.02)),
    rgba(12, 20, 25, 0.38);
  padding: 4px 7px;
  box-shadow: inset 0 0 16px rgba(0, 0, 0, 0.18);
}

.score-cell {
  border-color: rgba(255, 230, 128, 0.52);
  background:
    linear-gradient(135deg, rgba(126, 29, 29, 0.88), rgba(27, 16, 28, 0.8) 58%, rgba(9, 57, 59, 0.7));
  box-shadow:
    inset 0 1px 0 rgba(255, 248, 232, 0.2),
    0 0 18px rgba(255, 207, 74, 0.1);
}

.status-band strong {
  display: block;
  margin-top: 2px;
  color: #fff1a8;
  font-size: clamp(0.96rem, 0.92vw, 1.1rem);
  line-height: 1.02;
  font-variant-numeric: tabular-nums;
  text-shadow: 0 2px 0 rgba(0, 0, 0, 0.36);
  white-space: nowrap;
}

.score-cell strong {
  font-size: clamp(1.08rem, 1.18vw, 1.38rem);
}

.progress-cell {
  min-width: 0;
  display: grid;
  grid-template-columns: auto minmax(0, 1fr);
  gap: 8px;
  align-items: center;
  border: 1px solid rgba(255, 226, 128, 0.22);
  border-radius: 7px;
  background:
    linear-gradient(180deg, rgba(255, 248, 232, 0.07), rgba(255, 248, 232, 0.015)),
    rgba(10, 18, 23, 0.46);
  padding: 5px 7px;
}

.progress-label {
  color: #f7d570;
  font-size: 0.7rem;
  font-weight: 900;
  letter-spacing: 0;
  white-space: nowrap;
}

.progress-track,
.timer-track,
.score-track {
  height: 10px;
  border-radius: 999px;
  background: rgba(255, 248, 232, 0.22);
  overflow: hidden;
}

.progress-track span,
.timer-track span,
.score-track span {
  display: block;
  width: 0%;
  height: 100%;
  background: linear-gradient(90deg, #16a34a 0%, #33d17a 38%, #facc15 100%);
  transition: width 90ms linear;
}

.timer-track span.danger {
  background: linear-gradient(90deg, #f97316, #ef4444);
}

.playfield {
  display: grid;
  grid-template-columns: minmax(620px, 1fr) clamp(242px, 17vw, 336px);
  grid-template-rows: minmax(0, 1fr);
  gap: clamp(12px, 1.2vw, 18px);
  height: 100%;
  min-height: 0;
  max-height: 100%;
  align-items: stretch;
  align-content: stretch;
  overflow: hidden;
}

.playfield > .quiz-panel {
  height: auto;
  min-height: 0;
  max-height: 100%;
  align-self: stretch;
}

.playfield:has(> .quiz-panel.source-layout:not(.review-layout)) {
  height: auto;
  min-height: 100%;
  max-height: none;
  align-items: start;
  overflow: visible;
}

.playfield > .quiz-panel.source-layout:not(.review-layout) {
  height: auto;
  min-height: 100%;
  max-height: none;
  overflow: visible;
}

.main:has(.quiz-panel.source-layout:not(.review-layout)),
.quiz-panel.source-layout:not(.review-layout) .answer-dock {
  scrollbar-width: thin;
  -ms-overflow-style: auto;
}

.main:has(.quiz-panel.source-layout:not(.review-layout))::-webkit-scrollbar,
.quiz-panel.source-layout:not(.review-layout) .answer-dock::-webkit-scrollbar {
  display: block;
  width: 8px;
  height: 8px;
}

.periodic-stage {
  position: absolute;
  left: 50%;
  top: 51%;
  z-index: 70;
  display: grid;
  grid-template-columns: repeat(18, minmax(42px, 1fr));
  grid-template-rows: repeat(9, minmax(54px, 1fr));
  grid-auto-flow: row;
  gap: 5px;
  width: min(1120px, calc(100% - 28px));
  min-width: 0;
  max-height: min(78vh, 760px);
  overflow: auto;
  padding: 14px;
  border: 2px solid rgba(244, 206, 88, 0.68);
  border-radius: 8px;
  background:
    radial-gradient(circle at 50% 0%, rgba(255, 241, 168, 0.1), transparent 34%),
    linear-gradient(180deg, rgba(18, 12, 20, 0.96), rgba(7, 38, 42, 0.96)),
    var(--academy-bg) center 24% / cover no-repeat,
    rgba(12, 24, 28, 0.9);
  background-blend-mode: normal, soft-light, normal;
  box-shadow:
    inset 0 1px 0 rgba(255, 248, 232, 0.12),
    0 22px 58px rgba(0, 0, 0, 0.5),
    0 0 0 9999px rgba(4, 8, 12, 0.34);
  transform: translate(-50%, -50%);
  overscroll-behavior: contain;
  scrollbar-width: none;
}

.periodic-stage::-webkit-scrollbar {
  display: none;
}

.periodic-stage.hidden {
  display: none;
}

.study-summary-panel {
  box-sizing: border-box;
  position: fixed;
  inset: 0;
  z-index: 80;
  display: grid;
  place-items: stretch;
  align-items: stretch;
  justify-items: stretch;
  width: 100vw;
  width: 100dvw;
  height: 100vh;
  height: 100dvh;
  min-width: 0;
  min-height: 0;
  padding:
    env(safe-area-inset-top)
    env(safe-area-inset-right)
    env(safe-area-inset-bottom)
    env(safe-area-inset-left);
  background:
    radial-gradient(circle at 50% 38%, rgba(111, 239, 183, 0.16), transparent 34%),
    linear-gradient(180deg, rgba(5, 10, 16, 0.72), rgba(9, 12, 20, 0.86));
  backdrop-filter: blur(5px);
  overflow: hidden;
}

.study-summary-panel.hidden {
  display: none;
}

.study-summary-card {
  width: 100%;
  inline-size: 100%;
  height: 100%;
  block-size: 100%;
  max-width: none;
  max-height: none;
  min-width: 0;
  min-height: 0;
  display: grid;
  grid-template-rows: minmax(64px, auto) auto minmax(0, 1fr);
  overflow: hidden;
  border: 0;
  border-radius: 0;
  background:
    linear-gradient(135deg, rgba(35, 13, 28, 0.92), rgba(4, 52, 57, 0.92)),
    var(--academy-bg) center / cover no-repeat,
    rgba(8, 14, 18, 0.94);
  background-blend-mode: normal, soft-light, normal;
  box-shadow:
    inset 0 0 0 1px rgba(255, 248, 232, 0.12),
    0 24px 60px rgba(0, 0, 0, 0.46);
}

.study-summary-bar {
  display: grid;
  grid-template-columns: minmax(150px, auto) minmax(0, 1fr) auto;
  align-items: center;
  gap: 16px;
  padding: clamp(10px, 1vw, 18px) clamp(12px, 1.2vw, 22px);
  border-bottom: 1px solid rgba(244, 206, 88, 0.34);
  background:
    linear-gradient(90deg, rgba(127, 29, 29, 0.48), rgba(6, 58, 62, 0.54)),
    rgba(255, 248, 232, 0.06);
}

.study-summary-title {
  min-width: 0;
}

.study-summary-bar strong {
  display: block;
  margin-top: 1px;
  color: #fff8e8;
  font-size: clamp(1.28rem, 2vw, 2.05rem);
  line-height: 1;
}

.study-summary-bar-stats {
  min-width: 0;
  display: grid;
  grid-template-columns: repeat(5, minmax(72px, 1fr));
  gap: 7px;
  align-items: stretch;
}

.study-summary-bar-stat {
  min-width: 0;
  display: grid;
  align-content: center;
  gap: 2px;
  overflow: hidden;
  border: 1px solid rgba(255, 248, 232, 0.12);
  border-radius: 8px;
  background:
    linear-gradient(180deg, rgba(255, 248, 232, 0.09), rgba(255, 248, 232, 0.025)),
    rgba(3, 18, 24, 0.38);
  padding: 6px 8px;
  box-shadow: inset 0 1px 0 rgba(255, 248, 232, 0.06);
}

.study-summary-bar-stat.strong,
.study-summary-bar-stat.clear {
  border-color: rgba(125, 249, 199, 0.32);
  background:
    linear-gradient(180deg, rgba(125, 249, 199, 0.15), rgba(255, 248, 232, 0.025)),
    rgba(4, 54, 55, 0.46);
}

.study-summary-bar-stat.warm,
.study-summary-bar-stat.neutral {
  border-color: rgba(255, 227, 125, 0.25);
}

.study-summary-bar-stat.danger {
  border-color: rgba(255, 107, 107, 0.36);
  background:
    linear-gradient(180deg, rgba(255, 107, 107, 0.15), rgba(255, 248, 232, 0.02)),
    rgba(76, 19, 28, 0.36);
}

.study-summary-bar-stat.idle {
  opacity: 0.72;
}

.study-summary-bar-stat span,
.study-summary-bar-stat strong,
.study-summary-bar-stat small {
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.study-summary-bar-stat span {
  color: rgba(255, 248, 232, 0.58);
  font-size: 0.54rem;
  font-weight: 950;
  line-height: 1;
}

.study-summary-bar-stat strong {
  margin: 0;
  color: #fff8e8;
  font-size: clamp(0.84rem, 0.9vw, 1rem);
  font-weight: 950;
  line-height: 1.06;
  font-variant-numeric: tabular-nums;
}

.study-summary-bar-stat small {
  color: rgba(255, 248, 232, 0.62);
  font-size: 0.56rem;
  font-weight: 850;
  line-height: 1.08;
}

.study-summary-close {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 7px;
  min-width: 94px;
  min-height: 38px;
  border: 1px solid rgba(244, 206, 88, 0.6);
  border-radius: 7px;
  background:
    linear-gradient(180deg, rgba(255, 248, 232, 0.14), rgba(255, 248, 232, 0.05)),
    rgba(44, 20, 32, 0.64);
  color: #fff8e8;
  font: inherit;
  font-size: 0.82rem;
  font-weight: 900;
  cursor: pointer;
}

.study-summary-close svg {
  width: 16px;
  height: 16px;
}

.study-summary-close:hover,
.study-summary-close:focus-visible {
  border-color: #fff1a8;
  outline: none;
  box-shadow: 0 0 0 3px rgba(255, 241, 168, 0.14);
}

.study-summary-jumpbar {
  min-width: 0;
  display: grid;
  grid-template-columns: repeat(6, minmax(0, 1fr));
  gap: 7px;
  padding: 8px clamp(12px, 1.2vw, 22px);
  border-bottom: 1px solid rgba(244, 206, 88, 0.18);
  background:
    linear-gradient(90deg, rgba(4, 37, 44, 0.72), rgba(38, 18, 31, 0.56)),
    rgba(255, 248, 232, 0.035);
}

.study-summary-jumpbar button {
  min-width: 0;
  min-height: 38px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 7px;
  overflow: hidden;
  border: 1px solid rgba(255, 248, 232, 0.16);
  border-radius: 7px;
  background:
    linear-gradient(180deg, rgba(255, 248, 232, 0.1), rgba(255, 248, 232, 0.025)),
    rgba(2, 20, 24, 0.46);
  color: #fff8e8;
  font: inherit;
  font-size: 0.76rem;
  font-weight: 950;
  cursor: pointer;
}

.study-summary-jumpbar button:hover,
.study-summary-jumpbar button:focus-visible {
  border-color: rgba(125, 249, 199, 0.58);
  outline: none;
  background:
    linear-gradient(180deg, rgba(125, 249, 199, 0.17), rgba(255, 248, 232, 0.04)),
    rgba(3, 49, 52, 0.62);
  box-shadow: 0 0 0 3px rgba(125, 249, 199, 0.1);
}

.study-summary-jumpbar svg {
  flex: 0 0 auto;
  width: 15px;
  height: 15px;
}

.study-summary-jumpbar span {
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.study-summary-layout {
  height: 100%;
  min-height: 0;
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(320px, clamp(340px, 26vw, 520px));
  gap: clamp(10px, 1.25vw, 24px);
  padding: clamp(10px, 1.25vw, 24px);
  overflow: hidden;
}

.study-summary-review,
.executive-study-report {
  min-width: 0;
  min-height: 0;
  border: 1px solid rgba(255, 248, 232, 0.16);
  border-radius: 8px;
  background:
    linear-gradient(135deg, rgba(11, 48, 55, 0.7), rgba(32, 17, 28, 0.72)),
    rgba(255, 248, 232, 0.06);
  box-shadow: inset 0 0 0 1px rgba(255, 248, 232, 0.06);
}

.executive-study-report {
  display: grid;
  grid-template-columns: repeat(12, minmax(0, 1fr));
  align-content: start;
  gap: clamp(12px, 1.05vw, 22px);
  padding: clamp(14px, 1.15vw, 24px);
  overflow: auto;
  scrollbar-width: thin;
}

.executive-study-report > * {
  min-width: 0;
}

.study-summary-panel .study-report-summary,
.study-summary-panel .study-effort,
.study-summary-panel .study-efficiency-panel {
  grid-column: span 4;
  min-height: clamp(126px, 15dvh, 190px);
}

.study-summary-panel .review-coach-panel {
  grid-column: 1 / -1;
}

.study-summary-panel .study-insight-grid {
  grid-column: 1 / -1;
  grid-template-columns: repeat(4, minmax(0, 1fr));
}

.study-summary-panel .review-momentum-panel {
  grid-column: 1 / -1;
}

.study-summary-panel .review-command-deck-panel {
  grid-column: 1 / -1;
}

.study-summary-panel .review-set-blueprint-panel {
  grid-column: 1 / -1;
}

.study-summary-panel .review-outcome-panel {
  grid-column: 1 / -1;
}

.study-summary-panel .review-outcome-panel:empty {
  display: none;
}

.study-summary-panel .review-course-pulse-panel {
  grid-column: 1 / -1;
}

.study-summary-panel .review-course-pulse-panel:empty {
  display: none;
}

.study-summary-panel .review-return-panel {
  grid-column: 1 / -1;
}

.study-summary-panel .review-return-panel:empty {
  display: none;
}

.study-summary-panel .review-next-queue-panel {
  grid-column: 1 / -1;
}

.study-summary-panel .review-age-panel {
  grid-column: 1 / -1;
}

.study-summary-panel .study-continuity-panel {
  grid-column: 1 / -1;
}

.study-summary-panel .exam-readiness-panel {
  grid-column: 1 / -1;
}

.study-summary-panel .study-action-plan,
.study-summary-panel .study-checkpoint-panel,
.study-summary-panel .study-route-panel,
.study-summary-panel .study-rhythm-map,
.study-summary-panel .review-outlook-panel,
.study-summary-panel .review-calendar-panel,
.study-summary-panel .review-sprint-panel,
.study-summary-panel .study-course-matrix,
.study-summary-panel .understanding-summary,
.study-summary-panel .review-session-history,
.study-summary-panel .study-report-list,
.study-summary-panel .study-backup-status {
  grid-column: span 6;
}

.study-summary-panel .study-action-plan,
.study-summary-panel .study-checkpoint-panel,
.study-summary-panel .study-route-panel {
  grid-column: 1 / -1;
}

.study-summary-panel .review-calendar-panel {
  grid-column: 1 / -1;
}

.study-summary-panel .study-week-strip,
.study-summary-panel .study-forecast-panel,
.study-summary-panel .review-dial-panel,
.study-summary-panel .review-focus-panel,
.study-summary-panel .review-recovery-panel,
.study-summary-panel .review-mastery-track,
.study-summary-panel .weakness-panel,
.study-summary-panel .study-running-context,
.study-summary-panel .study-report-tabs,
.study-summary-panel .study-backup-actions {
  grid-column: span 6;
}

.study-summary-review {
  display: flex;
  flex-direction: column;
  gap: clamp(12px, 1vw, 20px);
  padding: clamp(14px, 1.15vw, 24px);
  overflow: auto;
  scrollbar-width: thin;
}

.study-summary-review > .study-summary-section-head {
  order: 1;
}

.study-summary-review > .review-target-panel {
  order: 2;
}

.study-summary-review > .review-today-target-panel {
  order: 3;
}

.study-summary-review > .review-session-planner {
  order: 4;
}

.study-summary-review > .review-load-radar {
  order: 5;
}

.study-summary-review > .review-course-map {
  order: 6;
}

.study-summary-review > .review-curriculum-list {
  order: 7;
}

.study-summary-review > .review-curve-summary {
  order: 8;
}

@media (min-width: 1480px) {
  .study-summary-layout {
    grid-template-columns: minmax(0, 1fr) minmax(360px, clamp(420px, 24vw, 560px));
  }

  .study-action-list,
  .study-course-matrix-list {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .study-summary-panel .review-curriculum-list {
    max-height: clamp(300px, 34dvh, 460px);
  }
}

@media (max-width: 1400px) and (min-width: 981px) {
  .study-summary-layout {
    grid-template-columns: 1fr;
    grid-auto-rows: max-content;
    align-content: start;
    overflow: auto;
    scrollbar-width: thin;
  }

  .executive-study-report {
    grid-template-columns: repeat(12, minmax(0, 1fr));
    min-height: auto;
    overflow: visible;
  }

  .study-summary-review {
    min-height: auto;
    overflow: visible;
  }

  .study-summary-panel .study-report-summary,
  .study-summary-panel .study-effort,
  .study-summary-panel .study-efficiency-panel {
    grid-column: span 4;
  }

  .study-summary-panel .study-insight-grid {
    grid-template-columns: repeat(4, minmax(0, 1fr));
  }
}

.study-summary-section-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding-top: 3px;
}

.study-summary-section-head strong {
  display: block;
  color: #fff8e8;
  font-size: 1.02rem;
  line-height: 1.1;
}

.study-summary-panel .study-report-summary {
  gap: 10px;
}

.study-summary-panel .study-report-summary > div {
  border-color: rgba(255, 241, 168, 0.22);
  background:
    radial-gradient(circle at 28% 18%, rgba(255, 241, 168, 0.16), transparent 34%),
    rgba(255, 248, 232, 0.08);
  padding: clamp(12px, 1vw, 18px);
}

.study-summary-panel .study-report-summary strong {
  margin-top: 5px;
  font-size: clamp(1.45rem, 2.7vw, 2.75rem);
  line-height: 0.98;
  overflow: visible;
  text-overflow: clip;
  white-space: normal;
  overflow-wrap: anywhere;
}

.study-summary-panel .study-effort {
  gap: 8px;
  padding: clamp(12px, 1vw, 18px);
}

.study-summary-panel .study-effort-head span {
  font-size: 0.9rem;
}

.study-summary-panel .study-effort-head strong {
  font-size: clamp(1.55rem, 2.85vw, 2.95rem);
}

.study-summary-panel .study-effort-track {
  height: 14px;
}

.study-summary-panel .study-effort small {
  font-size: 0.78rem;
}

.study-summary-panel .study-effort #studyEffortDetail {
  font-size: 0.9rem;
}

.study-insight-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 8px;
}

.study-insight-card,
.study-action-plan,
.study-checkpoint-panel,
.study-route-panel,
.study-efficiency-panel,
.study-week-strip,
.study-rhythm-map,
.study-continuity-panel,
.study-forecast-panel,
.review-outlook-panel,
.review-calendar-panel,
.review-target-panel,
.review-today-target-panel,
.review-dial-panel,
.review-sprint-panel,
.review-focus-panel,
.review-coach-panel,
.review-momentum-panel,
.review-command-deck-panel,
.review-set-blueprint-panel,
.review-outcome-panel,
.review-course-pulse-panel,
.review-return-panel,
.review-next-queue-panel,
.review-age-panel,
.exam-readiness-panel,
.study-course-matrix,
.review-mastery-track,
.understanding-summary,
.weakness-panel,
.review-session-history {
  min-width: 0;
  border: 1px solid rgba(255, 248, 232, 0.13);
  border-radius: 8px;
  background:
    linear-gradient(135deg, rgba(255, 248, 232, 0.08), rgba(255, 248, 232, 0.03)),
    rgba(4, 22, 28, 0.42);
  box-shadow: inset 0 1px 0 rgba(255, 248, 232, 0.06);
}

.study-insight-card {
  display: grid;
  align-content: space-between;
  min-height: 72px;
  padding: 9px;
}

.study-insight-card span,
.summary-card-head span,
.study-week-head span {
  color: rgba(255, 248, 232, 0.6);
  font-size: 0.58rem;
  font-weight: 950;
  line-height: 1.15;
}

.study-insight-card strong {
  margin-top: 4px;
  color: #fff8e8;
  font-size: clamp(0.94rem, 1.32vw, 1.28rem);
  line-height: 1.02;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.study-insight-card small {
  margin-top: 5px;
  color: rgba(255, 248, 232, 0.66);
  font-size: 0.64rem;
  font-weight: 850;
  line-height: 1.18;
}

.study-insight-card.strong {
  border-color: rgba(111, 239, 183, 0.36);
  background:
    radial-gradient(circle at 18% 18%, rgba(111, 239, 183, 0.18), transparent 42%),
    rgba(4, 54, 55, 0.48);
}

.study-insight-card.warm {
  border-color: rgba(255, 227, 125, 0.34);
  background:
    radial-gradient(circle at 18% 18%, rgba(255, 227, 125, 0.16), transparent 42%),
    rgba(54, 34, 8, 0.34);
}

.study-insight-card.danger {
  border-color: rgba(255, 107, 107, 0.38);
  background:
    radial-gradient(circle at 18% 18%, rgba(255, 107, 107, 0.18), transparent 42%),
    rgba(76, 19, 28, 0.38);
}

.study-week-strip,
.study-action-plan,
.study-checkpoint-panel,
.study-route-panel,
.study-efficiency-panel,
.study-rhythm-map,
.study-continuity-panel,
.study-forecast-panel,
.review-outlook-panel,
.review-calendar-panel,
.review-target-panel,
.review-today-target-panel,
.review-dial-panel,
.review-sprint-panel,
.review-focus-panel,
.review-coach-panel,
.review-momentum-panel,
.review-command-deck-panel,
.review-set-blueprint-panel,
.review-outcome-panel,
.review-course-pulse-panel,
.review-return-panel,
.review-next-queue-panel,
.review-age-panel,
.exam-readiness-panel,
.study-course-matrix,
.review-mastery-track,
.understanding-summary,
.weakness-panel,
.review-session-history {
  display: grid;
  gap: 8px;
  padding: 10px;
}

.summary-card-head,
.study-week-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
}

.summary-card-head strong,
.study-week-head strong {
  color: #fff1a8;
  font-size: 0.78rem;
  font-weight: 950;
  font-variant-numeric: tabular-nums;
}

.study-action-head {
  display: flex;
  align-items: start;
  justify-content: space-between;
  gap: 10px;
}

.study-action-head span {
  display: block;
  color: rgba(255, 248, 232, 0.6);
  font-size: 0.58rem;
  font-weight: 950;
  line-height: 1.15;
}

.study-action-head strong {
  display: block;
  margin-top: 2px;
  color: #fff8e8;
  font-size: 0.94rem;
  line-height: 1.08;
}

.study-action-head small {
  color: #fff1a8;
  font-size: 0.62rem;
  font-weight: 950;
  white-space: nowrap;
}

.study-action-list {
  display: grid;
  gap: 6px;
}

.study-route-panel {
  border-color: rgba(56, 189, 248, 0.2);
  background:
    radial-gradient(circle at 8% 8%, rgba(56, 189, 248, 0.14), transparent 34%),
    radial-gradient(circle at 92% 0%, rgba(255, 227, 125, 0.1), transparent 32%),
    linear-gradient(135deg, rgba(255, 248, 232, 0.075), rgba(125, 249, 199, 0.035)),
    rgba(4, 22, 28, 0.48);
}

.study-route-head {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(220px, 0.55fr);
  gap: 12px;
  align-items: start;
}

.study-route-head span {
  display: block;
  color: rgba(255, 248, 232, 0.6);
  font-size: 0.58rem;
  font-weight: 950;
  line-height: 1.15;
}

.study-route-head strong {
  display: block;
  margin-top: 2px;
  color: #fff8e8;
  font-size: clamp(1rem, 1.42vw, 1.32rem);
  line-height: 1.06;
}

.study-route-head small {
  color: #fff1a8;
  font-size: 0.64rem;
  font-weight: 900;
  line-height: 1.28;
  text-align: right;
}

.study-route-timeline {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
  gap: 7px;
}

.study-route-step {
  appearance: none;
  min-width: 0;
  min-height: clamp(110px, 9dvh, 144px);
  display: grid;
  grid-template-rows: auto minmax(0, 1fr) auto 7px;
  gap: 6px;
  border: 1px solid rgba(255, 248, 232, 0.12);
  border-radius: 8px;
  background:
    linear-gradient(180deg, rgba(255, 248, 232, 0.08), rgba(255, 248, 232, 0.025)),
    rgba(0, 0, 0, 0.16);
  color: #fff8e8;
  padding: 9px;
  font: inherit;
  text-align: left;
  cursor: pointer;
  transition:
    transform 0.16s ease,
    border-color 0.16s ease,
    box-shadow 0.16s ease;
}

.study-route-step:hover,
.study-route-step:focus-visible {
  border-color: rgba(111, 239, 183, 0.72);
  outline: none;
  transform: translateY(-1px);
  box-shadow: 0 0 0 3px rgba(111, 239, 183, 0.1);
}

.study-route-step.danger {
  border-color: rgba(255, 107, 107, 0.36);
  background:
    radial-gradient(circle at 10% 8%, rgba(255, 107, 107, 0.18), transparent 38%),
    rgba(73, 20, 29, 0.38);
}

.study-route-step.warm,
.study-route-step.weak {
  border-color: rgba(255, 227, 125, 0.32);
  background:
    radial-gradient(circle at 10% 8%, rgba(255, 227, 125, 0.14), transparent 38%),
    rgba(55, 36, 10, 0.34);
}

.study-route-step.strong {
  border-color: rgba(111, 239, 183, 0.3);
  background:
    radial-gradient(circle at 10% 8%, rgba(111, 239, 183, 0.14), transparent 38%),
    rgba(5, 52, 52, 0.38);
}

.study-route-step > span {
  display: inline-grid;
  place-items: center;
  width: 24px;
  height: 24px;
  border: 1px solid rgba(255, 248, 232, 0.16);
  border-radius: 50%;
  background: rgba(0, 0, 0, 0.2);
  color: #fff1a8;
  font-size: 0.64rem;
  font-weight: 950;
  line-height: 1;
}

.study-route-step div,
.study-route-step strong,
.study-route-step small,
.study-route-step b {
  min-width: 0;
}

.study-route-step strong,
.study-route-step small {
  display: block;
  overflow: hidden;
  text-overflow: ellipsis;
}

.study-route-step strong {
  color: #fff8e8;
  font-size: 0.82rem;
  font-weight: 950;
  line-height: 1.12;
  overflow-wrap: anywhere;
}

.study-route-step small {
  margin-top: 4px;
  color: rgba(255, 248, 232, 0.66);
  font-size: 0.58rem;
  font-weight: 850;
  line-height: 1.2;
  white-space: normal;
}

.study-route-step b {
  align-self: end;
  color: #fff1a8;
  font-size: 0.9rem;
  font-weight: 950;
  font-variant-numeric: tabular-nums;
  line-height: 1;
}

.study-route-step i {
  position: relative;
  display: block;
  overflow: hidden;
  border-radius: 999px;
  background: rgba(255, 248, 232, 0.08);
}

.study-route-step i::before {
  content: "";
  position: absolute;
  inset: 0 auto 0 0;
  width: var(--route-load);
  min-width: 5px;
  border-radius: inherit;
  background: linear-gradient(90deg, #38bdf8, #7df9c7);
}

.study-route-step.warm i::before,
.study-route-step.weak i::before {
  background: linear-gradient(90deg, #f59e0b, #ffe37d);
}

.study-route-step.danger i::before {
  background: linear-gradient(90deg, #ef4444, #ff9aa2);
}

.study-route-footer {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 6px;
}

.study-route-footer span {
  min-width: 0;
  overflow: hidden;
  border: 1px solid rgba(255, 248, 232, 0.09);
  border-radius: 6px;
  background: rgba(255, 248, 232, 0.055);
  color: rgba(255, 248, 232, 0.62);
  padding: 5px;
  font-size: 0.56rem;
  font-weight: 900;
  text-align: center;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.study-route-footer b {
  color: #fff1a8;
  font-weight: 950;
  font-variant-numeric: tabular-nums;
}

.study-efficiency-panel {
  display: grid;
  gap: 10px;
  padding: 11px;
  border-color: rgba(125, 249, 199, 0.18);
  background:
    radial-gradient(circle at 12% 8%, rgba(125, 249, 199, 0.14), transparent 34%),
    linear-gradient(135deg, rgba(255, 248, 232, 0.08), rgba(255, 248, 232, 0.03)),
    rgba(4, 22, 28, 0.46);
}

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

.study-efficiency-head span {
  display: block;
  color: rgba(255, 248, 232, 0.6);
  font-size: 0.58rem;
  font-weight: 950;
  line-height: 1.15;
}

.study-efficiency-head strong {
  display: block;
  margin-top: 2px;
  color: #fff8e8;
  font-size: 1rem;
  line-height: 1.08;
}

.study-efficiency-head small {
  max-width: 54%;
  color: #fff1a8;
  font-size: 0.62rem;
  font-weight: 900;
  line-height: 1.28;
  text-align: right;
}

.study-efficiency-flow {
  display: grid;
  grid-template-columns:
    minmax(42px, var(--study-flow, 34%))
    minmax(42px, var(--review-flow, 33%))
    minmax(42px, var(--recovery-flow, 33%));
  gap: 4px;
  min-height: 36px;
}

.study-efficiency-flow span {
  position: relative;
  min-width: 0;
  overflow: hidden;
  border: 1px solid rgba(255, 248, 232, 0.1);
  border-radius: 7px;
  background: rgba(255, 248, 232, 0.08);
}

.study-efficiency-flow span::before {
  content: attr(data-label);
  position: absolute;
  inset: auto 7px 5px;
  color: rgba(255, 248, 232, 0.72);
  font-size: 0.52rem;
  font-weight: 950;
  line-height: 1;
  white-space: nowrap;
}

.study-efficiency-flow span:nth-child(1) {
  background: linear-gradient(90deg, rgba(56, 189, 248, 0.68), rgba(14, 165, 233, 0.34));
}

.study-efficiency-flow span:nth-child(2) {
  background: linear-gradient(90deg, rgba(125, 249, 199, 0.72), rgba(16, 185, 129, 0.34));
}

.study-efficiency-flow span:nth-child(3) {
  background: linear-gradient(90deg, rgba(255, 107, 107, 0.78), rgba(127, 29, 29, 0.4));
}

.study-efficiency-flow.strong span:nth-child(3) {
  opacity: 0.58;
}

.review-outlook-panel {
  display: grid;
  gap: 10px;
  padding: 11px;
  border-color: rgba(56, 189, 248, 0.2);
  background:
    radial-gradient(circle at 92% 6%, rgba(56, 189, 248, 0.15), transparent 34%),
    linear-gradient(135deg, rgba(255, 248, 232, 0.08), rgba(125, 249, 199, 0.035)),
    rgba(4, 22, 28, 0.46);
}

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

.review-outlook-head span {
  display: block;
  color: rgba(255, 248, 232, 0.6);
  font-size: 0.58rem;
  font-weight: 950;
  line-height: 1.15;
}

.review-outlook-head strong {
  display: block;
  margin-top: 2px;
  color: #fff8e8;
  font-size: 1rem;
  line-height: 1.08;
}

.review-outlook-head small {
  max-width: 54%;
  color: #fff1a8;
  font-size: 0.62rem;
  font-weight: 900;
  line-height: 1.28;
  text-align: right;
}

.review-outlook-score {
  overflow: hidden;
  height: 9px;
  border: 1px solid rgba(255, 248, 232, 0.12);
  border-radius: 999px;
  background: rgba(0, 0, 0, 0.16);
}

.review-outlook-score span {
  display: block;
  width: var(--review-outlook-score);
  height: 100%;
  border-radius: inherit;
  background: linear-gradient(90deg, #7df9c7, #ffe37d 58%, #ff6b6b);
}

.review-outlook-score.strong span {
  background: linear-gradient(90deg, #38bdf8, #7df9c7);
}

.review-outlook-score.danger span {
  background: linear-gradient(90deg, #ffb86b, #ff6b6b);
}

.review-outlook-bars {
  display: grid;
  grid-template-columns: repeat(15, minmax(0, 1fr));
  gap: 5px;
  min-height: 92px;
}

.review-outlook-day {
  appearance: none;
  min-width: 0;
  display: grid;
  grid-template-rows: auto minmax(34px, 1fr) auto auto;
  gap: 3px;
  align-items: end;
  border: 1px solid rgba(255, 248, 232, 0.11);
  border-radius: 7px;
  background: rgba(255, 248, 232, 0.055);
  color: #fff8e8;
  font: inherit;
  padding: 5px 3px;
  cursor: pointer;
  transition:
    transform 0.16s ease,
    border-color 0.16s ease,
    box-shadow 0.16s ease;
}

.review-outlook-day span,
.review-outlook-day strong,
.review-outlook-day small {
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.review-outlook-day span {
  align-self: start;
  color: rgba(255, 248, 232, 0.58);
  font-size: 0.5rem;
  font-weight: 950;
  line-height: 1;
}

.review-outlook-day i {
  display: block;
  width: 100%;
  height: var(--review-outlook-load);
  min-height: 4px;
  border-radius: 999px 999px 3px 3px;
  background: linear-gradient(180deg, rgba(56, 189, 248, 0.82), rgba(14, 116, 144, 0.5));
  box-shadow: 0 0 12px rgba(56, 189, 248, 0.14);
}

.review-outlook-day.strong i {
  background: linear-gradient(180deg, rgba(125, 249, 199, 0.86), rgba(15, 118, 110, 0.5));
}

.review-outlook-day.warm i {
  background: linear-gradient(180deg, rgba(255, 227, 125, 0.9), rgba(161, 98, 7, 0.54));
}

.review-outlook-day.danger i {
  background: linear-gradient(180deg, rgba(255, 107, 107, 0.92), rgba(127, 29, 29, 0.58));
}

.review-outlook-day strong {
  color: #fff8e8;
  font-size: 0.72rem;
  font-weight: 950;
  line-height: 1;
  text-align: center;
  font-variant-numeric: tabular-nums;
}

.review-outlook-day small {
  color: rgba(255, 248, 232, 0.58);
  font-size: 0.48rem;
  font-weight: 850;
  line-height: 1;
  text-align: center;
}

.review-outlook-day:disabled {
  cursor: default;
  opacity: 0.56;
}

.review-outlook-day:not(:disabled):hover,
.review-outlook-day:not(:disabled):focus-visible {
  border-color: rgba(255, 248, 232, 0.54);
  outline: none;
  transform: translateY(-1px);
  box-shadow: 0 0 0 3px rgba(255, 248, 232, 0.08);
}

.review-outlook-metrics {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 7px;
}

.review-outlook-metric {
  min-width: 0;
  display: grid;
  gap: 3px;
  overflow: hidden;
  border: 1px solid rgba(255, 248, 232, 0.1);
  border-radius: 7px;
  background: rgba(0, 0, 0, 0.14);
  padding: 7px;
}

.review-outlook-metric.strong {
  border-color: rgba(125, 249, 199, 0.24);
  background: rgba(15, 118, 110, 0.16);
}

.review-outlook-metric.warm {
  border-color: rgba(255, 227, 125, 0.24);
  background: rgba(96, 65, 6, 0.18);
}

.review-outlook-metric.danger {
  border-color: rgba(255, 107, 107, 0.28);
  background: rgba(76, 19, 28, 0.24);
}

.review-outlook-metric span,
.review-outlook-metric strong,
.review-outlook-metric small {
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.review-outlook-metric span {
  color: rgba(255, 248, 232, 0.56);
  font-size: 0.52rem;
  font-weight: 950;
}

.review-outlook-metric strong {
  color: #fff8e8;
  font-size: 0.88rem;
  font-weight: 950;
  line-height: 1;
  font-variant-numeric: tabular-nums;
}

.review-outlook-metric small {
  color: rgba(255, 248, 232, 0.62);
  font-size: 0.52rem;
  font-weight: 850;
}

.review-outlook-next {
  display: grid;
}

.review-calendar-panel {
  display: grid;
  gap: 10px;
  padding: 11px;
  border-color: rgba(125, 249, 199, 0.2);
  background:
    radial-gradient(circle at 10% 8%, rgba(125, 249, 199, 0.14), transparent 34%),
    linear-gradient(135deg, rgba(4, 54, 55, 0.48), rgba(33, 17, 29, 0.5)),
    rgba(4, 22, 28, 0.48);
}

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

.review-calendar-head span {
  display: block;
  color: rgba(255, 248, 232, 0.6);
  font-size: 0.58rem;
  font-weight: 950;
  line-height: 1.15;
}

.review-calendar-head strong {
  display: block;
  margin-top: 2px;
  color: #fff8e8;
  font-size: 1rem;
  line-height: 1.08;
}

.review-calendar-head small {
  max-width: 56%;
  color: #fff1a8;
  font-size: 0.62rem;
  font-weight: 900;
  line-height: 1.28;
  text-align: right;
}

.review-calendar-load {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 8px;
  align-items: center;
}

.review-calendar-load span {
  display: block;
  height: 10px;
  overflow: hidden;
  border: 1px solid rgba(255, 248, 232, 0.12);
  border-radius: 999px;
  background: rgba(0, 0, 0, 0.16);
}

.review-calendar-load span::before {
  content: "";
  display: block;
  width: var(--calendar-load);
  height: 100%;
  border-radius: inherit;
  background: linear-gradient(90deg, #7df9c7, #ffe37d 58%, #ff6b6b);
}

.review-calendar-load.strong span::before {
  background: linear-gradient(90deg, #38bdf8, #7df9c7);
}

.review-calendar-load.danger span::before {
  background: linear-gradient(90deg, #ffb86b, #ff6b6b);
}

.review-calendar-load b {
  color: #fff8e8;
  font-size: 0.72rem;
  font-weight: 950;
  font-variant-numeric: tabular-nums;
}

.review-calendar-metrics {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 7px;
}

.review-calendar-metric {
  min-width: 0;
  min-height: 58px;
  display: grid;
  align-content: center;
  gap: 3px;
  overflow: hidden;
  border: 1px solid rgba(255, 248, 232, 0.1);
  border-radius: 7px;
  background:
    linear-gradient(180deg, rgba(255, 248, 232, 0.08), rgba(255, 248, 232, 0.025)),
    rgba(0, 0, 0, 0.14);
  color: #fff8e8;
  padding: 7px;
  font: inherit;
  text-align: left;
  cursor: pointer;
}

.review-calendar-metric:disabled {
  cursor: default;
  opacity: 0.62;
}

.review-calendar-metric:not(:disabled):hover,
.review-calendar-metric:not(:disabled):focus-visible {
  border-color: rgba(125, 249, 199, 0.58);
  outline: none;
  box-shadow: 0 0 0 3px rgba(125, 249, 199, 0.1);
}

.review-calendar-metric.strong {
  border-color: rgba(125, 249, 199, 0.24);
  background: rgba(15, 118, 110, 0.16);
}

.review-calendar-metric.soon {
  border-color: rgba(56, 189, 248, 0.24);
  background: rgba(14, 116, 144, 0.14);
}

.review-calendar-metric.warm {
  border-color: rgba(255, 227, 125, 0.24);
  background: rgba(96, 65, 6, 0.18);
}

.review-calendar-metric.danger {
  border-color: rgba(255, 107, 107, 0.28);
  background: rgba(76, 19, 28, 0.24);
}

.review-calendar-metric span,
.review-calendar-metric strong,
.review-calendar-metric small {
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.review-calendar-metric span {
  color: rgba(255, 248, 232, 0.56);
  font-size: 0.52rem;
  font-weight: 950;
}

.review-calendar-metric strong {
  color: #fff8e8;
  font-size: 0.9rem;
  font-weight: 950;
  line-height: 1;
  font-variant-numeric: tabular-nums;
}

.review-calendar-metric small {
  color: rgba(255, 248, 232, 0.62);
  font-size: 0.52rem;
  font-weight: 850;
}

.review-calendar-grid {
  display: grid;
  grid-template-columns: repeat(10, minmax(0, 1fr));
  gap: 5px;
}

.review-calendar-day {
  appearance: none;
  min-width: 0;
  min-height: 82px;
  display: grid;
  grid-template-rows: auto auto minmax(22px, 1fr) auto;
  gap: 4px;
  align-items: end;
  overflow: hidden;
  border: 1px solid rgba(255, 248, 232, 0.11);
  border-radius: 7px;
  background:
    linear-gradient(180deg, rgba(255, 248, 232, 0.07), rgba(255, 248, 232, 0.025)),
    rgba(3, 18, 24, 0.48);
  color: #fff8e8;
  padding: 6px 5px;
  font: inherit;
  cursor: pointer;
  transition:
    transform 0.16s ease,
    border-color 0.16s ease,
    box-shadow 0.16s ease;
}

.review-calendar-day span,
.review-calendar-day strong,
.review-calendar-day small {
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.review-calendar-day span {
  align-self: start;
  color: rgba(255, 248, 232, 0.58);
  font-size: 0.5rem;
  font-weight: 950;
  line-height: 1;
}

.review-calendar-day strong {
  color: #fff8e8;
  font-size: 0.86rem;
  font-weight: 950;
  line-height: 1;
  text-align: center;
  font-variant-numeric: tabular-nums;
}

.review-calendar-day i {
  position: relative;
  display: block;
  align-self: stretch;
  width: 100%;
  overflow: hidden;
  border-radius: 999px 999px 4px 4px;
  background: rgba(255, 248, 232, 0.08);
}

.review-calendar-day i::before {
  content: "";
  position: absolute;
  inset: auto 0 0;
  height: var(--calendar-day-load);
  min-height: 4px;
  border-radius: inherit;
  background: linear-gradient(180deg, rgba(56, 189, 248, 0.84), rgba(14, 116, 144, 0.5));
  box-shadow: 0 0 12px rgba(56, 189, 248, 0.16);
}

.review-calendar-day i b {
  position: absolute;
  inset: auto 0 0;
  display: block;
  height: var(--calendar-day-weak);
  min-height: 0;
  border-radius: inherit;
  background: linear-gradient(180deg, rgba(255, 107, 107, 0.9), rgba(127, 29, 29, 0.62));
}

.review-calendar-day.future i::before {
  background: linear-gradient(180deg, rgba(125, 249, 199, 0.86), rgba(15, 118, 110, 0.5));
}

.review-calendar-day.soon i::before {
  background: linear-gradient(180deg, rgba(56, 189, 248, 0.88), rgba(14, 116, 144, 0.52));
}

.review-calendar-day.warm i::before {
  background: linear-gradient(180deg, rgba(255, 227, 125, 0.92), rgba(161, 98, 7, 0.54));
}

.review-calendar-day.danger i::before {
  background: linear-gradient(180deg, rgba(255, 107, 107, 0.94), rgba(127, 29, 29, 0.62));
}

.review-calendar-day small {
  color: rgba(255, 248, 232, 0.6);
  font-size: 0.48rem;
  font-weight: 850;
  line-height: 1;
  text-align: center;
}

.review-calendar-day:disabled {
  cursor: default;
  opacity: 0.5;
}

.review-calendar-day:not(:disabled):hover,
.review-calendar-day:not(:disabled):focus-visible {
  border-color: rgba(255, 248, 232, 0.54);
  outline: none;
  transform: translateY(-1px);
  box-shadow: 0 0 0 3px rgba(125, 249, 199, 0.08);
}

.review-sprint-panel {
  display: grid;
  gap: 10px;
  padding: 11px;
  border-color: rgba(255, 227, 125, 0.2);
  background:
    radial-gradient(circle at 8% 0%, rgba(255, 227, 125, 0.14), transparent 32%),
    linear-gradient(135deg, rgba(255, 248, 232, 0.08), rgba(56, 189, 248, 0.04)),
    rgba(4, 22, 28, 0.46);
}

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

.review-sprint-head span {
  display: block;
  color: rgba(255, 248, 232, 0.6);
  font-size: 0.58rem;
  font-weight: 950;
  line-height: 1.15;
}

.review-sprint-head strong {
  display: block;
  margin-top: 2px;
  color: #fff8e8;
  font-size: 1rem;
  line-height: 1.08;
}

.review-sprint-head small {
  max-width: 54%;
  color: #fff1a8;
  font-size: 0.62rem;
  font-weight: 900;
  line-height: 1.28;
  text-align: right;
}

.review-sprint-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 7px;
}

.review-sprint-card {
  appearance: none;
  min-width: 0;
  display: grid;
  gap: 5px;
  overflow: hidden;
  border: 1px solid rgba(255, 248, 232, 0.12);
  border-radius: 8px;
  background:
    linear-gradient(135deg, rgba(255, 248, 232, 0.07), rgba(255, 248, 232, 0.025)),
    rgba(0, 0, 0, 0.14);
  color: #fff8e8;
  font: inherit;
  padding: 9px;
  text-align: left;
  cursor: pointer;
  transition:
    transform 0.16s ease,
    border-color 0.16s ease,
    box-shadow 0.16s ease;
}

.review-sprint-card.warm {
  border-color: rgba(255, 227, 125, 0.26);
  background:
    radial-gradient(circle at 14% 12%, rgba(255, 227, 125, 0.14), transparent 42%),
    rgba(96, 65, 6, 0.2);
}

.review-sprint-card.danger,
.review-sprint-card.weak {
  border-color: rgba(255, 107, 107, 0.28);
  background:
    radial-gradient(circle at 14% 12%, rgba(255, 107, 107, 0.16), transparent 42%),
    rgba(76, 19, 28, 0.24);
}

.review-sprint-card.strong {
  border-color: rgba(125, 249, 199, 0.24);
  background:
    radial-gradient(circle at 14% 12%, rgba(125, 249, 199, 0.14), transparent 42%),
    rgba(15, 118, 110, 0.16);
}

.review-sprint-card span,
.review-sprint-card strong,
.review-sprint-card small,
.review-sprint-card em {
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.review-sprint-card span {
  color: rgba(255, 248, 232, 0.6);
  font-size: 0.54rem;
  font-weight: 950;
  line-height: 1;
}

.review-sprint-card strong {
  color: #fff8e8;
  font-size: 1.04rem;
  font-weight: 950;
  line-height: 1;
  font-variant-numeric: tabular-nums;
}

.review-sprint-card small,
.review-sprint-card em {
  color: rgba(255, 248, 232, 0.64);
  font-size: 0.54rem;
  font-weight: 850;
  line-height: 1.2;
}

.review-sprint-card em {
  color: #fff1a8;
  font-style: normal;
}

.review-sprint-card i {
  display: block;
  height: 6px;
  overflow: hidden;
  border-radius: 999px;
  background: rgba(255, 248, 232, 0.12);
}

.review-sprint-card i::before {
  content: "";
  display: block;
  width: var(--review-sprint-load);
  height: 100%;
  border-radius: inherit;
  background: linear-gradient(90deg, #38bdf8, #7df9c7);
}

.review-sprint-card.warm i::before {
  background: linear-gradient(90deg, #ffb86b, #ffe37d);
}

.review-sprint-card.danger i::before,
.review-sprint-card.weak i::before {
  background: linear-gradient(90deg, #ff6b6b, #ffb86b);
}

.review-sprint-card:disabled {
  cursor: default;
  opacity: 0.56;
}

.review-sprint-card:not(:disabled):hover,
.review-sprint-card:not(:disabled):focus-visible {
  border-color: rgba(255, 248, 232, 0.58);
  outline: none;
  transform: translateY(-1px);
  box-shadow: 0 0 0 3px rgba(255, 248, 232, 0.08);
}

.review-sprint-foot {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  color: rgba(255, 248, 232, 0.62);
  font-size: 0.58rem;
  font-weight: 900;
}

.review-sprint-foot strong {
  color: #fff1a8;
  font-weight: 950;
}

.review-dial-panel {
  display: grid;
  gap: 10px;
  padding: 11px;
  border-color: rgba(111, 239, 183, 0.22);
  background:
    radial-gradient(circle at 9% 12%, rgba(111, 239, 183, 0.14), transparent 34%),
    linear-gradient(135deg, rgba(255, 248, 232, 0.08), rgba(56, 189, 248, 0.04)),
    rgba(4, 22, 28, 0.48);
}

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

.review-dial-head span,
.review-dial-start-row span {
  display: block;
  color: rgba(255, 248, 232, 0.6);
  font-size: 0.58rem;
  font-weight: 950;
  line-height: 1.15;
}

.review-dial-head strong,
.review-dial-start-row strong {
  display: block;
  min-width: 0;
  margin-top: 2px;
  color: #fff8e8;
  font-size: 1rem;
  line-height: 1.08;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.review-dial-head small {
  max-width: 54%;
  color: #fff1a8;
  font-size: 0.62rem;
  font-weight: 900;
  line-height: 1.28;
  text-align: right;
}

.review-dial-modes {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 7px;
}

.review-dial-mode {
  appearance: none;
  min-width: 0;
  display: grid;
  gap: 4px;
  overflow: hidden;
  border: 1px solid rgba(255, 248, 232, 0.12);
  border-radius: 8px;
  background:
    linear-gradient(180deg, rgba(255, 248, 232, 0.07), rgba(255, 248, 232, 0.025)),
    rgba(0, 0, 0, 0.14);
  color: #fff8e8;
  font: inherit;
  padding: 8px;
  text-align: left;
  cursor: pointer;
  transition:
    transform 0.16s ease,
    border-color 0.16s ease,
    box-shadow 0.16s ease;
}

.review-dial-mode.overdue {
  border-color: rgba(255, 107, 107, 0.28);
}

.review-dial-mode.today {
  border-color: rgba(255, 227, 125, 0.26);
}

.review-dial-mode.weak {
  border-color: rgba(251, 146, 60, 0.26);
}

.review-dial-mode.active {
  border-color: rgba(111, 239, 183, 0.74);
  box-shadow:
    inset 0 0 0 1px rgba(111, 239, 183, 0.18),
    0 0 0 3px rgba(111, 239, 183, 0.08);
}

.review-dial-mode span,
.review-dial-mode strong,
.review-dial-mode small {
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.review-dial-mode span {
  color: rgba(255, 248, 232, 0.62);
  font-size: 0.54rem;
  font-weight: 950;
}

.review-dial-mode strong {
  color: #fff8e8;
  font-size: 1rem;
  font-weight: 950;
  line-height: 1;
  font-variant-numeric: tabular-nums;
}

.review-dial-mode small {
  color: rgba(255, 248, 232, 0.62);
  font-size: 0.52rem;
  font-weight: 850;
}

.review-dial-mode i {
  display: block;
  height: 6px;
  overflow: hidden;
  border-radius: 999px;
  background: rgba(255, 248, 232, 0.1);
}

.review-dial-mode i::before {
  content: "";
  display: block;
  width: var(--dial-load);
  height: 100%;
  border-radius: inherit;
  background: linear-gradient(90deg, #38bdf8, #7df9c7);
}

.review-dial-mode.overdue i::before {
  background: linear-gradient(90deg, #ff6b6b, #ffb86b);
}

.review-dial-mode.today i::before {
  background: linear-gradient(90deg, #ffb86b, #ffe37d);
}

.review-dial-mode.weak i::before {
  background: linear-gradient(90deg, #fb923c, #ffe37d);
}

.review-dial-mode:hover,
.review-dial-mode:focus-visible {
  border-color: rgba(255, 248, 232, 0.58);
  outline: none;
  transform: translateY(-1px);
  box-shadow: 0 0 0 3px rgba(255, 248, 232, 0.08);
}

.review-dial-sizes {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 7px;
}

.review-dial-filter-row,
.review-session-filter-row {
  display: grid;
  grid-template-columns: minmax(116px, auto) minmax(0, 1fr);
  gap: 8px;
  align-items: center;
}

.review-dial-filter-row small,
.review-session-filter-row small {
  min-width: 0;
  color: rgba(255, 248, 232, 0.64);
  font-size: 0.58rem;
  font-weight: 850;
  line-height: 1.25;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.review-dial-start-row {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 10px;
  align-items: center;
  border: 1px solid rgba(255, 248, 232, 0.1);
  border-radius: 8px;
  background: rgba(0, 0, 0, 0.14);
  padding: 9px;
}

.review-dial-start-row > div {
  min-width: 0;
}

.review-dial-start-row small {
  display: block;
  margin-top: 3px;
  color: rgba(255, 248, 232, 0.62);
  font-size: 0.56rem;
  font-weight: 850;
}

.review-dial-start {
  min-width: 58px;
  min-height: 36px;
  border: 1px solid rgba(111, 239, 183, 0.54);
  border-radius: 8px;
  background:
    linear-gradient(180deg, rgba(111, 239, 183, 0.22), rgba(8, 86, 84, 0.46)),
    rgba(6, 39, 41, 0.74);
  color: #ecfdf5;
  padding: 0 10px;
  font: inherit;
  font-size: 0.72rem;
  font-weight: 950;
  cursor: pointer;
  transition:
    transform 0.16s ease,
    border-color 0.16s ease,
    box-shadow 0.16s ease;
}

.review-dial-start:disabled {
  cursor: default;
  opacity: 0.5;
}

.review-dial-start:not(:disabled):hover,
.review-dial-start:not(:disabled):focus-visible {
  border-color: #fff1a8;
  outline: none;
  transform: translateY(-1px);
  box-shadow: 0 0 0 3px rgba(111, 239, 183, 0.1);
}

.review-focus-panel {
  display: grid;
  gap: 10px;
  padding: 11px;
  border-color: rgba(125, 249, 199, 0.22);
  background:
    radial-gradient(circle at 92% 12%, rgba(125, 249, 199, 0.14), transparent 34%),
    linear-gradient(135deg, rgba(255, 248, 232, 0.08), rgba(255, 107, 107, 0.035)),
    rgba(4, 22, 28, 0.48);
}

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

.review-focus-head span {
  display: block;
  color: rgba(255, 248, 232, 0.6);
  font-size: 0.58rem;
  font-weight: 950;
  line-height: 1.15;
}

.review-focus-head strong {
  display: block;
  min-width: 0;
  margin-top: 2px;
  color: #fff8e8;
  font-size: 1rem;
  line-height: 1.08;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.review-focus-head small {
  max-width: 54%;
  color: #fff1a8;
  font-size: 0.62rem;
  font-weight: 900;
  line-height: 1.28;
  text-align: right;
}

.review-focus-list {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 8px;
}

.review-focus-card {
  appearance: none;
  min-width: 0;
  display: grid;
  grid-template-columns: auto minmax(0, 1fr) auto;
  gap: 7px 8px;
  align-items: center;
  overflow: hidden;
  border: 1px solid rgba(255, 248, 232, 0.12);
  border-radius: 8px;
  background:
    linear-gradient(135deg, rgba(255, 248, 232, 0.07), rgba(255, 248, 232, 0.02)),
    rgba(0, 0, 0, 0.14);
  color: #fff8e8;
  font: inherit;
  padding: 9px;
  text-align: left;
  cursor: pointer;
  transition:
    transform 0.16s ease,
    border-color 0.16s ease,
    box-shadow 0.16s ease;
}

.review-focus-card.danger {
  border-color: rgba(255, 107, 107, 0.3);
  background:
    radial-gradient(circle at 12% 14%, rgba(255, 107, 107, 0.16), transparent 42%),
    rgba(76, 19, 28, 0.24);
}

.review-focus-card.warm {
  border-color: rgba(255, 227, 125, 0.28);
  background:
    radial-gradient(circle at 12% 14%, rgba(255, 227, 125, 0.15), transparent 42%),
    rgba(96, 65, 6, 0.2);
}

.review-focus-card.strong {
  border-color: rgba(125, 249, 199, 0.24);
  background:
    radial-gradient(circle at 12% 14%, rgba(125, 249, 199, 0.14), transparent 42%),
    rgba(15, 118, 110, 0.16);
}

.review-focus-card:hover,
.review-focus-card:focus-visible {
  border-color: rgba(255, 248, 232, 0.58);
  outline: none;
  transform: translateY(-1px);
  box-shadow: 0 0 0 3px rgba(255, 248, 232, 0.08);
}

.review-focus-badge {
  grid-row: span 2;
  display: inline-grid;
  place-items: center;
  min-width: 40px;
  height: 32px;
  border: 1px solid rgba(255, 241, 168, 0.28);
  border-radius: 8px;
  background: rgba(255, 241, 168, 0.1);
  color: #fff1a8;
  font-size: 0.6rem;
  font-weight: 950;
  white-space: nowrap;
}

.review-focus-main {
  min-width: 0;
  display: grid;
  gap: 2px;
}

.review-focus-main strong,
.review-focus-main small,
.review-focus-detail,
.review-focus-meta span {
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.review-focus-main strong {
  color: #fff8e8;
  font-size: 0.78rem;
  font-weight: 950;
  line-height: 1.08;
  overflow-wrap: anywhere;
  white-space: normal;
}

.review-focus-main small {
  color: rgba(255, 248, 232, 0.6);
  font-size: 0.54rem;
  font-weight: 850;
}

.review-focus-meta {
  min-width: 72px;
  display: grid;
  gap: 3px;
  justify-items: end;
}

.review-focus-meta span {
  max-width: 100%;
  border-radius: 999px;
  background: rgba(255, 248, 232, 0.08);
  color: rgba(255, 248, 232, 0.68);
  padding: 2px 6px;
  font-size: 0.52rem;
  font-weight: 900;
  font-variant-numeric: tabular-nums;
}

.review-focus-meter {
  grid-column: 2 / 4;
  display: block;
  height: 7px;
  overflow: hidden;
  border-radius: 999px;
  background: rgba(255, 248, 232, 0.1);
}

.review-focus-meter b {
  display: block;
  width: var(--review-focus-pressure);
  height: 100%;
  border-radius: inherit;
  background: linear-gradient(90deg, #38bdf8, #7df9c7);
}

.review-focus-card.warm .review-focus-meter b {
  background: linear-gradient(90deg, #ffb86b, #ffe37d);
}

.review-focus-card.danger .review-focus-meter b {
  background: linear-gradient(90deg, #ff6b6b, #ffb86b);
}

.review-focus-detail {
  grid-column: 2 / 4;
  color: rgba(255, 248, 232, 0.62);
  font-size: 0.54rem;
  font-weight: 850;
  line-height: 1.2;
}

.study-efficiency-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 7px;
}

.study-efficiency-metric {
  min-width: 0;
  display: grid;
  gap: 4px;
  align-content: start;
  min-height: 76px;
  border: 1px solid rgba(255, 248, 232, 0.1);
  border-radius: 8px;
  background: rgba(0, 0, 0, 0.14);
  padding: 8px;
}

.study-efficiency-metric span,
.study-efficiency-metric strong,
.study-efficiency-metric small {
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.study-efficiency-metric span {
  color: rgba(255, 248, 232, 0.58);
  font-size: 0.52rem;
  font-weight: 950;
}

.study-efficiency-metric strong {
  color: #fff8e8;
  font-size: 0.94rem;
  font-weight: 950;
  font-variant-numeric: tabular-nums;
}

.study-efficiency-metric small {
  color: rgba(255, 248, 232, 0.62);
  font-size: 0.54rem;
  font-weight: 850;
}

.study-efficiency-metric i {
  display: block;
  height: 7px;
  margin-top: 2px;
  overflow: hidden;
  border-radius: 999px;
  background: rgba(255, 248, 232, 0.08);
}

.study-efficiency-metric i::before {
  content: "";
  display: block;
  width: var(--efficiency-width, 0%);
  height: 100%;
  border-radius: inherit;
  background: linear-gradient(90deg, rgba(148, 163, 184, 0.9), rgba(203, 213, 225, 0.64));
}

.study-efficiency-metric.strong i::before {
  background: linear-gradient(90deg, #7df9c7, #38bdf8);
}

.study-efficiency-metric.warm i::before {
  background: linear-gradient(90deg, #ffe37d, #f59e0b);
}

.study-efficiency-metric.danger i::before {
  background: linear-gradient(90deg, #ff9aa2, #ff6b6b);
}

.study-efficiency-next .study-action-button {
  min-height: 52px;
  border-color: rgba(244, 206, 88, 0.26);
}

.study-action-button {
  min-width: 0;
  min-height: 46px;
  display: grid;
  grid-template-columns: 24px minmax(0, 1fr) minmax(58px, auto);
  gap: 7px;
  align-items: center;
  border: 1px solid rgba(255, 248, 232, 0.12);
  border-radius: 8px;
  background:
    linear-gradient(180deg, rgba(255, 248, 232, 0.08), rgba(255, 248, 232, 0.03)),
    rgba(5, 22, 27, 0.58);
  color: #fff8e8;
  padding: 7px;
  font: inherit;
  text-align: left;
  cursor: pointer;
  transition:
    border-color 0.16s ease,
    box-shadow 0.16s ease,
    transform 0.16s ease;
}

.study-action-button span {
  display: grid;
  place-items: center;
  width: 22px;
  height: 22px;
  border-radius: 999px;
  background: rgba(255, 248, 232, 0.1);
  color: rgba(255, 248, 232, 0.76);
  font-size: 0.66rem;
  font-weight: 950;
}

.study-action-button strong,
.study-action-button small {
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.study-action-button strong {
  color: #fff8e8;
  font-size: 0.78rem;
  font-weight: 950;
}

.study-action-button b {
  color: #fff1a8;
  font-size: 0.76rem;
  font-weight: 950;
  font-variant-numeric: tabular-nums;
  text-align: right;
  white-space: nowrap;
}

.study-action-button small {
  grid-column: 2 / -1;
  color: rgba(255, 248, 232, 0.62);
  font-size: 0.58rem;
  font-weight: 850;
}

.study-action-button:hover,
.study-action-button:focus-visible {
  border-color: rgba(111, 239, 183, 0.72);
  outline: none;
  transform: translateY(-1px);
  box-shadow: 0 0 0 3px rgba(111, 239, 183, 0.1);
}

.study-action-button:disabled {
  cursor: default;
  opacity: 0.52;
  transform: none;
  box-shadow: none;
}

.study-action-button.strong {
  border-color: rgba(111, 239, 183, 0.32);
}

.study-action-button.warm {
  border-color: rgba(255, 227, 125, 0.32);
}

.study-action-button.danger {
  border-color: rgba(255, 107, 107, 0.36);
}

.study-checkpoint-panel {
  border-color: rgba(244, 206, 88, 0.24);
  background:
    radial-gradient(circle at 12% 10%, rgba(244, 206, 88, 0.16), transparent 34%),
    radial-gradient(circle at 90% 0%, rgba(125, 249, 199, 0.12), transparent 36%),
    linear-gradient(135deg, rgba(255, 248, 232, 0.08), rgba(255, 248, 232, 0.03)),
    rgba(19, 26, 26, 0.52);
}

.study-checkpoint-head {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(220px, 0.58fr);
  gap: 12px;
  align-items: start;
}

.study-checkpoint-head span {
  display: block;
  color: rgba(255, 248, 232, 0.6);
  font-size: 0.58rem;
  font-weight: 950;
  line-height: 1.15;
}

.study-checkpoint-head strong {
  display: block;
  margin-top: 2px;
  color: #fff8e8;
  font-size: clamp(1rem, 1.42vw, 1.32rem);
  line-height: 1.06;
}

.study-checkpoint-head small {
  color: #fff1a8;
  font-size: 0.64rem;
  font-weight: 900;
  line-height: 1.28;
  text-align: right;
}

.study-checkpoint-score {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr) auto;
  gap: 10px;
  align-items: center;
  min-height: 34px;
  border: 1px solid rgba(255, 248, 232, 0.11);
  border-radius: 8px;
  background: rgba(0, 0, 0, 0.14);
  padding: 7px 9px;
}

.study-checkpoint-score span,
.study-checkpoint-foot span {
  color: rgba(255, 248, 232, 0.62);
  font-size: 0.6rem;
  font-weight: 950;
}

.study-checkpoint-score strong,
.study-checkpoint-foot b {
  color: #fff1a8;
  font-weight: 950;
  font-variant-numeric: tabular-nums;
}

.study-checkpoint-score i {
  position: relative;
  overflow: hidden;
  height: 8px;
  border-radius: 999px;
  background: rgba(255, 248, 232, 0.08);
}

.study-checkpoint-score i::before {
  content: "";
  position: absolute;
  inset: 0 auto 0 0;
  width: var(--checkpoint-score);
  min-width: 5px;
  border-radius: inherit;
  background: linear-gradient(90deg, #38bdf8, #7df9c7);
}

.study-checkpoint-score.warm i::before {
  background: linear-gradient(90deg, #f59e0b, #ffe37d);
}

.study-checkpoint-score.danger i::before {
  background: linear-gradient(90deg, #ef4444, #ff9aa2);
}

.study-checkpoint-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
  gap: 7px;
}

.study-checkpoint-row {
  appearance: none;
  min-width: 0;
  min-height: 106px;
  display: grid;
  grid-template-columns: 28px minmax(0, 1fr) auto;
  grid-template-rows: minmax(0, 1fr) 8px;
  grid-template-areas:
    "badge main value"
    "bar bar bar";
  gap: 7px;
  align-items: start;
  border: 1px solid rgba(255, 248, 232, 0.12);
  border-radius: 8px;
  background:
    linear-gradient(180deg, rgba(255, 248, 232, 0.08), rgba(255, 248, 232, 0.025)),
    rgba(0, 0, 0, 0.16);
  color: #fff8e8;
  padding: 9px;
  font: inherit;
  text-align: left;
  cursor: pointer;
  transition:
    border-color 0.16s ease,
    box-shadow 0.16s ease,
    transform 0.16s ease;
}

.study-checkpoint-row:hover,
.study-checkpoint-row:focus-visible {
  border-color: rgba(111, 239, 183, 0.72);
  outline: none;
  transform: translateY(-1px);
  box-shadow: 0 0 0 3px rgba(111, 239, 183, 0.1);
}

.study-checkpoint-row:disabled {
  cursor: default;
  transform: none;
  box-shadow: none;
}

.study-checkpoint-row.complete {
  opacity: 0.72;
}

.study-checkpoint-row.danger {
  border-color: rgba(255, 107, 107, 0.36);
  background:
    radial-gradient(circle at 12% 8%, rgba(255, 107, 107, 0.16), transparent 36%),
    rgba(73, 20, 29, 0.38);
}

.study-checkpoint-row.warm {
  border-color: rgba(255, 227, 125, 0.32);
  background:
    radial-gradient(circle at 12% 8%, rgba(255, 227, 125, 0.14), transparent 36%),
    rgba(55, 36, 10, 0.34);
}

.study-checkpoint-row.strong {
  border-color: rgba(111, 239, 183, 0.3);
  background:
    radial-gradient(circle at 12% 8%, rgba(111, 239, 183, 0.14), transparent 36%),
    rgba(5, 52, 52, 0.38);
}

.study-checkpoint-row > span {
  grid-area: badge;
  display: inline-grid;
  place-items: center;
  width: 26px;
  height: 26px;
  border: 1px solid rgba(255, 248, 232, 0.14);
  border-radius: 50%;
  background: rgba(0, 0, 0, 0.22);
  color: #fff1a8;
  font-size: 0.66rem;
  font-weight: 950;
  line-height: 1;
}

.study-checkpoint-row div {
  grid-area: main;
  min-width: 0;
}

.study-checkpoint-row strong,
.study-checkpoint-row small,
.study-checkpoint-row b {
  min-width: 0;
}

.study-checkpoint-row strong,
.study-checkpoint-row small {
  display: block;
  overflow: hidden;
  text-overflow: ellipsis;
}

.study-checkpoint-row strong {
  color: #fff8e8;
  font-size: 0.84rem;
  font-weight: 950;
  line-height: 1.12;
  overflow-wrap: anywhere;
}

.study-checkpoint-row small {
  margin-top: 5px;
  color: rgba(255, 248, 232, 0.66);
  font-size: 0.6rem;
  font-weight: 850;
  line-height: 1.2;
  white-space: normal;
}

.study-checkpoint-row b {
  grid-area: value;
  justify-self: end;
  color: #fff1a8;
  font-size: 0.84rem;
  font-weight: 950;
  font-variant-numeric: tabular-nums;
  line-height: 1;
}

.study-checkpoint-row i {
  grid-area: bar;
  position: relative;
  display: block;
  overflow: hidden;
  align-self: stretch;
  border-radius: 999px;
  background: rgba(255, 248, 232, 0.08);
}

.study-checkpoint-row i::before {
  content: "";
  position: absolute;
  inset: 0 auto 0 0;
  width: var(--checkpoint-progress);
  min-width: 5px;
  border-radius: inherit;
  background: linear-gradient(90deg, #38bdf8, #7df9c7);
}

.study-checkpoint-row.warm i::before {
  background: linear-gradient(90deg, #f59e0b, #ffe37d);
}

.study-checkpoint-row.danger i::before {
  background: linear-gradient(90deg, #ef4444, #ff9aa2);
}

.study-checkpoint-foot {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 6px;
}

.study-checkpoint-foot span {
  min-width: 0;
  overflow: hidden;
  border: 1px solid rgba(255, 248, 232, 0.09);
  border-radius: 6px;
  background: rgba(255, 248, 232, 0.055);
  padding: 5px;
  text-align: center;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.study-week-bars {
  display: grid;
  grid-template-columns: repeat(7, minmax(0, 1fr));
  gap: 6px;
  align-items: end;
  min-height: 86px;
}

.study-week-day {
  min-width: 0;
  display: grid;
  gap: 5px;
  align-items: end;
  text-align: center;
}

.study-week-bar {
  position: relative;
  height: 68px;
  border: 1px solid rgba(255, 248, 232, 0.1);
  border-radius: 999px;
  background: rgba(0, 0, 0, 0.18);
  overflow: hidden;
}

.study-week-bar span {
  position: absolute;
  right: 0;
  bottom: 0;
  left: 0;
  min-height: 4px;
  border-radius: inherit;
  background: linear-gradient(180deg, rgba(148, 163, 184, 0.92), rgba(71, 85, 105, 0.92));
}

.study-week-bar span[data-level="warm"] {
  background: linear-gradient(180deg, #ffe37d, #b7791f);
}

.study-week-bar span[data-level="strong"] {
  background: linear-gradient(180deg, #38bdf8, #0f766e);
}

.study-week-bar span[data-level="clear"] {
  background: linear-gradient(180deg, #7df9c7, #10b981);
}

.study-week-day small {
  color: rgba(255, 248, 232, 0.54);
  font-size: 0.56rem;
  font-weight: 900;
  white-space: nowrap;
}

.study-rhythm-grid {
  display: grid;
  grid-template-columns: repeat(7, minmax(0, 1fr));
  gap: 6px;
}

.study-rhythm-cell {
  min-width: 0;
  display: grid;
  gap: 5px;
  align-content: space-between;
  min-height: 72px;
  overflow: hidden;
  border: 1px solid rgba(255, 248, 232, 0.1);
  border-radius: 8px;
  background:
    linear-gradient(180deg, rgba(255, 248, 232, 0.06), rgba(255, 248, 232, 0.02)),
    rgba(0, 0, 0, 0.14);
  padding: 6px;
}

.study-rhythm-cell.study {
  border-color: rgba(56, 189, 248, 0.24);
}

.study-rhythm-cell.review {
  border-color: rgba(250, 204, 21, 0.26);
}

.study-rhythm-cell.both {
  border-color: rgba(125, 249, 199, 0.3);
  background:
    radial-gradient(circle at 18% 15%, rgba(125, 249, 199, 0.12), transparent 42%),
    rgba(0, 0, 0, 0.14);
}

.study-rhythm-cell span,
.study-rhythm-cell small {
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.study-rhythm-cell span {
  color: rgba(255, 248, 232, 0.56);
  font-size: 0.52rem;
  font-weight: 950;
  text-align: center;
}

.study-rhythm-cell > div {
  position: relative;
  height: 26px;
  overflow: hidden;
  border-radius: 999px;
  background: rgba(255, 248, 232, 0.08);
}

.study-rhythm-cell i,
.study-rhythm-cell b {
  position: absolute;
  right: 0;
  bottom: 0;
  left: 0;
  display: block;
  min-height: 3px;
  border-radius: inherit;
}

.study-rhythm-cell i {
  height: var(--study-load, 4%);
  background: linear-gradient(180deg, #38bdf8, #0f766e);
}

.study-rhythm-cell b {
  height: var(--review-load, 4%);
  width: 46%;
  margin-left: auto;
  background: linear-gradient(180deg, #ffe37d, #f97316);
  box-shadow: 0 0 10px rgba(255, 227, 125, 0.18);
}

.study-rhythm-cell.both b {
  width: 52%;
}

.study-rhythm-cell small {
  color: #fff1a8;
  font-size: 0.52rem;
  font-weight: 950;
  text-align: center;
  font-variant-numeric: tabular-nums;
}

.study-rhythm-stats {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 6px;
}

.study-rhythm-stats span {
  display: inline-flex;
  align-items: center;
  justify-content: space-between;
  gap: 4px;
  min-width: 0;
  border-radius: 999px;
  background: rgba(255, 248, 232, 0.075);
  color: rgba(255, 248, 232, 0.62);
  padding: 5px 7px;
  font-size: 0.54rem;
  font-weight: 900;
  white-space: nowrap;
}

.study-rhythm-stats b {
  color: #fff1a8;
  font-variant-numeric: tabular-nums;
}

.study-rhythm-map p {
  margin: 0;
  border: 1px solid rgba(255, 248, 232, 0.09);
  border-radius: 7px;
  background: rgba(255, 248, 232, 0.055);
  color: rgba(255, 248, 232, 0.72);
  padding: 8px;
  font-size: 0.62rem;
  font-weight: 850;
  line-height: 1.35;
}

.study-continuity-panel {
  border-color: rgba(125, 249, 199, 0.18);
  background:
    radial-gradient(circle at 8% 12%, rgba(125, 249, 199, 0.12), transparent 34%),
    linear-gradient(135deg, rgba(13, 52, 58, 0.56), rgba(43, 22, 34, 0.58)),
    rgba(4, 22, 28, 0.46);
}

.study-continuity-head,
.study-continuity-next {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: center;
  gap: 10px;
}

.study-continuity-head span,
.study-continuity-head small,
.study-continuity-day span,
.study-continuity-day small,
.study-continuity-stat span,
.study-continuity-stat small {
  min-width: 0;
  overflow: hidden;
  color: rgba(255, 248, 232, 0.62);
  font-weight: 950;
  line-height: 1.18;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.study-continuity-head span {
  display: block;
  font-size: 0.58rem;
}

.study-continuity-head strong {
  display: block;
  margin-top: 3px;
  color: #fff8e8;
  font-size: clamp(1.04rem, 1.5vw, 1.5rem);
  font-weight: 950;
  line-height: 1.05;
}

.study-continuity-head small {
  max-width: 410px;
  color: #fff1a8;
  font-size: 0.62rem;
  font-weight: 900;
  line-height: 1.28;
  text-align: right;
  white-space: normal;
}

.study-continuity-calendar {
  display: grid;
  grid-template-columns: repeat(21, minmax(0, 1fr));
  gap: 5px;
}

.study-continuity-day {
  min-width: 0;
  display: grid;
  grid-template-rows: auto minmax(38px, 1fr) auto;
  gap: 4px;
  min-height: 78px;
  overflow: hidden;
  border: 1px solid rgba(255, 248, 232, 0.1);
  border-radius: 7px;
  background:
    linear-gradient(180deg, rgba(255, 248, 232, 0.055), rgba(255, 248, 232, 0.02)),
    rgba(0, 0, 0, 0.15);
  padding: 5px 4px;
}

.study-continuity-day.study {
  border-color: rgba(56, 189, 248, 0.24);
}

.study-continuity-day.review {
  border-color: rgba(255, 227, 125, 0.26);
}

.study-continuity-day.strong {
  border-color: rgba(125, 249, 199, 0.32);
  background:
    radial-gradient(circle at 22% 18%, rgba(125, 249, 199, 0.12), transparent 42%),
    rgba(0, 0, 0, 0.14);
}

.study-continuity-day.danger {
  border-color: rgba(255, 107, 107, 0.38);
  background:
    radial-gradient(circle at 22% 18%, rgba(255, 107, 107, 0.13), transparent 42%),
    rgba(76, 19, 28, 0.2);
}

.study-continuity-day span,
.study-continuity-day small {
  font-size: 0.48rem;
  text-align: center;
}

.study-continuity-day small {
  color: #fff1a8;
  font-variant-numeric: tabular-nums;
}

.study-continuity-day i {
  position: relative;
  align-self: stretch;
  display: block;
  overflow: hidden;
  border-radius: 999px 999px 4px 4px;
  background: rgba(255, 248, 232, 0.085);
}

.study-continuity-day i::before {
  position: absolute;
  right: 0;
  bottom: 0;
  left: 0;
  height: var(--continuity-fill, 0%);
  min-height: 4px;
  border-radius: inherit;
  background: linear-gradient(180deg, rgba(56, 189, 248, 0.86), rgba(15, 118, 110, 0.52));
  content: "";
}

.study-continuity-day.review i::before {
  background: linear-gradient(180deg, rgba(255, 227, 125, 0.92), rgba(194, 65, 12, 0.56));
}

.study-continuity-day.strong i::before {
  background: linear-gradient(180deg, rgba(125, 249, 199, 0.92), rgba(20, 184, 166, 0.54));
}

.study-continuity-day.danger i::before {
  background: linear-gradient(180deg, rgba(255, 107, 107, 0.96), rgba(127, 29, 29, 0.6));
}

.study-continuity-day i b {
  position: absolute;
  right: 2px;
  bottom: 2px;
  left: 2px;
  height: var(--continuity-wrong, 0%);
  min-height: 0;
  border-radius: inherit;
  background: rgba(255, 248, 232, 0.22);
  box-shadow: 0 0 12px rgba(255, 107, 107, 0.18);
}

.study-continuity-stats {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 7px;
}

.study-continuity-stat {
  min-width: 0;
  display: grid;
  gap: 3px;
  border: 1px solid rgba(255, 248, 232, 0.1);
  border-radius: 7px;
  background: rgba(0, 0, 0, 0.15);
  padding: 7px;
}

.study-continuity-stat.strong {
  border-color: rgba(125, 249, 199, 0.25);
  background: rgba(15, 118, 110, 0.17);
}

.study-continuity-stat.warm {
  border-color: rgba(255, 227, 125, 0.26);
  background: rgba(96, 65, 6, 0.18);
}

.study-continuity-stat.danger {
  border-color: rgba(255, 107, 107, 0.3);
  background: rgba(76, 19, 28, 0.24);
}

.study-continuity-stat span {
  font-size: 0.52rem;
}

.study-continuity-stat strong {
  min-width: 0;
  overflow: hidden;
  color: #fff8e8;
  font-size: 0.9rem;
  font-weight: 950;
  line-height: 1;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.study-continuity-stat small {
  font-size: 0.52rem;
  font-weight: 850;
}

.study-continuity-next .study-action-button {
  min-height: 54px;
}

.study-forecast-head {
  display: flex;
  align-items: start;
  justify-content: space-between;
  gap: 10px;
}

.study-forecast-head span {
  display: block;
  color: rgba(255, 248, 232, 0.6);
  font-size: 0.58rem;
  font-weight: 950;
  line-height: 1.15;
}

.study-forecast-head strong {
  display: block;
  margin-top: 2px;
  color: #fff8e8;
  font-size: 0.94rem;
  line-height: 1.08;
}

.study-forecast-head small {
  max-width: 48%;
  color: #fff1a8;
  font-size: 0.62rem;
  font-weight: 900;
  line-height: 1.24;
  text-align: right;
}

.study-forecast-rails {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 8px;
}

.study-forecast-rail {
  min-width: 0;
  display: grid;
  gap: 5px;
  border: 1px solid rgba(255, 248, 232, 0.1);
  border-radius: 8px;
  background: rgba(0, 0, 0, 0.14);
  padding: 7px;
}

.study-forecast-rail > span,
.study-forecast-rail > small {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.study-forecast-rail > span {
  color: rgba(255, 248, 232, 0.58);
  font-size: 0.58rem;
  font-weight: 950;
}

.study-forecast-rail > small {
  color: rgba(255, 248, 232, 0.62);
  font-size: 0.56rem;
  font-weight: 850;
}

.study-forecast-bars {
  height: 72px;
  display: grid;
  grid-template-columns: repeat(7, minmax(0, 1fr));
  align-items: end;
  gap: 4px;
}

.study-forecast-bars i {
  min-height: 4px;
  border-radius: 999px 999px 4px 4px;
  background: linear-gradient(180deg, rgba(148, 163, 184, 0.92), rgba(71, 85, 105, 0.92));
  box-shadow: 0 0 0 1px rgba(255, 248, 232, 0.06);
}

.study-forecast-bars i[data-level="warm"] {
  background: linear-gradient(180deg, #ffe37d, #b7791f);
}

.study-forecast-bars i[data-level="strong"] {
  background: linear-gradient(180deg, #38bdf8, #0f766e);
}

.study-forecast-bars i[data-level="clear"] {
  background: linear-gradient(180deg, #7df9c7, #10b981);
}

.study-forecast-bars i[data-stage="soon"] {
  background: linear-gradient(180deg, #38bdf8, #0ea5e9);
}

.study-forecast-bars i[data-stage="today"] {
  background: linear-gradient(180deg, #ffe37d, #f59e0b);
}

.study-forecast-bars i[data-stage="overdue"] {
  background: linear-gradient(180deg, #ff9aa2, #ff6b6b);
}

.study-forecast-bars i[data-stage="future"] {
  background: linear-gradient(180deg, rgba(125, 249, 199, 0.9), rgba(32, 201, 151, 0.74));
}

.study-course-matrix-list {
  display: grid;
  gap: 6px;
}

.study-course-row {
  min-width: 0;
  display: grid;
  grid-template-columns: minmax(130px, 0.78fr) minmax(64px, 0.8fr) minmax(154px, 0.72fr);
  gap: 8px;
  align-items: center;
  border: 1px solid rgba(255, 248, 232, 0.1);
  border-radius: 8px;
  background:
    linear-gradient(180deg, rgba(255, 248, 232, 0.06), rgba(255, 248, 232, 0.025)),
    rgba(0, 0, 0, 0.14);
  color: #fff8e8;
  padding: 8px;
  font: inherit;
  text-align: left;
  cursor: pointer;
  transition:
    transform 0.16s ease,
    border-color 0.16s ease,
    box-shadow 0.16s ease;
}

.study-course-row.active {
  border-color: rgba(111, 239, 183, 0.38);
  box-shadow: inset 3px 0 0 rgba(111, 239, 183, 0.58);
}

.study-course-row.strong {
  border-color: rgba(111, 239, 183, 0.24);
}

.study-course-row.warm {
  border-color: rgba(255, 227, 125, 0.26);
}

.study-course-row.danger {
  border-color: rgba(255, 107, 107, 0.34);
}

.study-course-row:hover,
.study-course-row:focus-visible {
  border-color: rgba(111, 239, 183, 0.76);
  outline: none;
  transform: translateY(-1px);
  box-shadow: 0 0 0 3px rgba(111, 239, 183, 0.1);
}

.study-course-main,
.study-course-meta {
  min-width: 0;
}

.study-course-main strong,
.study-course-main small {
  display: block;
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.study-course-main strong {
  color: #fff8e8;
  font-size: 0.78rem;
  font-weight: 950;
  line-height: 1.08;
  overflow-wrap: anywhere;
  white-space: normal;
}

.study-course-main small {
  margin-top: 2px;
  color: rgba(255, 248, 232, 0.58);
  font-size: 0.56rem;
  font-weight: 850;
}

.study-course-progress {
  position: relative;
  height: 13px;
  overflow: hidden;
  border-radius: 999px;
  background: rgba(255, 248, 232, 0.08);
}

.study-course-progress i,
.study-course-progress span {
  position: absolute;
  inset: 0 auto 0 0;
  border-radius: inherit;
}

.study-course-progress i {
  background: linear-gradient(90deg, rgba(111, 239, 183, 0.9), rgba(56, 189, 248, 0.74));
}

.study-course-progress span {
  background: linear-gradient(90deg, rgba(255, 227, 125, 0.6), rgba(255, 107, 107, 0.68));
  mix-blend-mode: screen;
  opacity: 0.72;
}

.study-course-meta {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 4px;
}

.study-course-meta span {
  min-width: 0;
  overflow: hidden;
  border: 1px solid rgba(255, 248, 232, 0.09);
  border-radius: 6px;
  background: rgba(255, 248, 232, 0.05);
  color: rgba(255, 248, 232, 0.58);
  padding: 4px;
  font-size: 0.52rem;
  font-weight: 900;
  text-align: center;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.study-course-meta b {
  color: #fff1a8;
  font-weight: 950;
  font-variant-numeric: tabular-nums;
}

.exam-readiness-panel {
  border-color: rgba(244, 206, 88, 0.22);
  background:
    radial-gradient(circle at 12% 0%, rgba(244, 206, 88, 0.12), transparent 34%),
    radial-gradient(circle at 88% 8%, rgba(111, 239, 183, 0.12), transparent 36%),
    linear-gradient(135deg, rgba(67, 31, 19, 0.34), rgba(3, 43, 45, 0.46)),
    rgba(4, 22, 28, 0.48);
}

.exam-readiness-head {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(230px, 0.62fr);
  gap: 12px;
  align-items: start;
}

.exam-readiness-head span,
.exam-readiness-main span {
  display: block;
  color: rgba(255, 248, 232, 0.6);
  font-size: 0.58rem;
  font-weight: 950;
  line-height: 1.15;
}

.exam-readiness-head strong {
  display: block;
  margin-top: 2px;
  color: #fff8e8;
  font-size: clamp(1.05rem, 1.6vw, 1.48rem);
  line-height: 1.04;
}

.exam-readiness-head small {
  color: #fff1a8;
  font-size: 0.68rem;
  font-weight: 900;
  line-height: 1.28;
  text-align: right;
}

.exam-readiness-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 8px;
}

.exam-readiness-card {
  appearance: none;
  min-width: 0;
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(58px, 70px);
  grid-template-areas:
    "main score"
    "bars bars"
    "meta meta";
  gap: 8px;
  align-items: center;
  border: 1px solid rgba(255, 248, 232, 0.12);
  border-radius: 8px;
  background:
    linear-gradient(180deg, rgba(255, 248, 232, 0.08), rgba(255, 248, 232, 0.025)),
    rgba(0, 0, 0, 0.16);
  color: #fff8e8;
  padding: 10px;
  font: inherit;
  text-align: left;
  cursor: pointer;
  transition:
    transform 0.16s ease,
    border-color 0.16s ease,
    box-shadow 0.16s ease;
}

.exam-readiness-card:hover,
.exam-readiness-card:focus-visible {
  border-color: rgba(255, 241, 168, 0.72);
  outline: none;
  transform: translateY(-1px);
  box-shadow: 0 0 0 3px rgba(255, 241, 168, 0.1);
}

.exam-readiness-card.strong {
  border-color: rgba(111, 239, 183, 0.32);
  background:
    radial-gradient(circle at 10% 10%, rgba(111, 239, 183, 0.15), transparent 42%),
    rgba(4, 54, 55, 0.44);
}

.exam-readiness-card.warm {
  border-color: rgba(255, 227, 125, 0.34);
  background:
    radial-gradient(circle at 10% 10%, rgba(255, 227, 125, 0.16), transparent 42%),
    rgba(55, 36, 9, 0.34);
}

.exam-readiness-card.danger {
  border-color: rgba(255, 107, 107, 0.42);
  background:
    radial-gradient(circle at 10% 10%, rgba(255, 107, 107, 0.2), transparent 42%),
    rgba(74, 20, 29, 0.42);
}

.exam-readiness-main {
  grid-area: main;
  min-width: 0;
}

.exam-readiness-main strong,
.exam-readiness-main small {
  display: block;
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
}

.exam-readiness-main strong {
  margin-top: 3px;
  color: #fff8e8;
  font-size: clamp(0.86rem, 1.06vw, 1rem);
  font-weight: 950;
  line-height: 1.12;
  overflow-wrap: anywhere;
  white-space: normal;
}

.exam-readiness-main small {
  margin-top: 4px;
  color: rgba(255, 248, 232, 0.66);
  font-size: 0.62rem;
  font-weight: 850;
  white-space: nowrap;
}

.exam-readiness-score {
  --score-color: #7df9c7;
  grid-area: score;
  justify-self: end;
  width: 58px;
  aspect-ratio: 1;
  display: grid;
  place-items: center;
  position: relative;
  border-radius: 50%;
  background:
    conic-gradient(var(--score-color) var(--readiness), rgba(255, 248, 232, 0.09) 0),
    rgba(0, 0, 0, 0.22);
  box-shadow: inset 0 0 0 1px rgba(255, 248, 232, 0.08);
}

.exam-readiness-card.warm .exam-readiness-score {
  --score-color: #ffe37d;
}

.exam-readiness-card.danger .exam-readiness-score {
  --score-color: #ff6b6b;
}

.exam-readiness-score::before {
  content: "";
  position: absolute;
  inset: 7px;
  border-radius: inherit;
  background: rgba(7, 25, 29, 0.94);
}

.exam-readiness-score b {
  position: relative;
  z-index: 1;
  color: #fff8e8;
  font-size: 1.05rem;
  font-weight: 950;
  font-variant-numeric: tabular-nums;
}

.exam-readiness-score i {
  position: relative;
  z-index: 1;
}

.exam-readiness-bars {
  grid-area: bars;
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 5px;
}

.exam-readiness-bars span {
  position: relative;
  min-width: 0;
  height: 20px;
  overflow: hidden;
  border: 1px solid rgba(255, 248, 232, 0.08);
  border-radius: 6px;
  background: rgba(255, 248, 232, 0.06);
}

.exam-readiness-bars span::before {
  content: "";
  position: absolute;
  inset: 0 auto 0 0;
  width: var(--bar);
  min-width: 3px;
  border-radius: inherit;
  background: linear-gradient(90deg, rgba(56, 189, 248, 0.74), rgba(125, 249, 199, 0.82));
}

.exam-readiness-card.warm .exam-readiness-bars span::before {
  background: linear-gradient(90deg, rgba(245, 158, 11, 0.72), rgba(255, 227, 125, 0.86));
}

.exam-readiness-card.danger .exam-readiness-bars span::before {
  background: linear-gradient(90deg, rgba(239, 68, 68, 0.74), rgba(255, 154, 162, 0.86));
}

.exam-readiness-bars span::after {
  content: attr(data-label);
  position: absolute;
  inset: 0;
  display: grid;
  place-items: center;
  color: rgba(255, 248, 232, 0.78);
  font-size: 0.52rem;
  font-weight: 950;
  line-height: 1;
  text-shadow: 0 1px 6px rgba(0, 0, 0, 0.72);
}

.exam-readiness-meta {
  grid-area: meta;
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 5px;
}

.exam-readiness-meta span,
.exam-readiness-footer span {
  min-width: 0;
  overflow: hidden;
  border: 1px solid rgba(255, 248, 232, 0.09);
  border-radius: 6px;
  background: rgba(255, 248, 232, 0.055);
  color: rgba(255, 248, 232, 0.6);
  padding: 5px;
  font-size: 0.54rem;
  font-weight: 900;
  text-align: center;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.exam-readiness-meta b,
.exam-readiness-footer b {
  color: #fff1a8;
  font-weight: 950;
  font-variant-numeric: tabular-nums;
}

.exam-readiness-footer {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 6px;
}

@media (min-width: 1480px) {
  .study-insight-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .study-action-list,
  .study-course-matrix-list,
  .exam-readiness-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

.understanding-summary-row {
  display: grid;
  grid-template-columns: minmax(88px, 1fr) minmax(0, 1.1fr) 28px;
  gap: 8px;
  align-items: center;
  width: 100%;
  padding: 6px 7px;
  border: 1px solid transparent;
  border-radius: 8px;
  background: transparent;
  cursor: pointer;
  font: inherit;
  text-align: left;
  transition:
    border-color 160ms ease,
    background 160ms ease,
    transform 160ms ease;
}

.understanding-summary-row:not(:disabled):hover,
.understanding-summary-row:not(:disabled):focus-visible {
  border-color: rgba(244, 206, 88, 0.42);
  background: rgba(244, 206, 88, 0.08);
  transform: translateY(-1px);
  outline: none;
}

.understanding-summary-row:disabled {
  cursor: default;
  opacity: 0.62;
}

.understanding-summary-row span {
  color: rgba(255, 248, 232, 0.7);
  font-size: 0.64rem;
  font-weight: 900;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.understanding-summary-row strong {
  color: #fff1a8;
  font-size: 0.72rem;
  font-weight: 950;
  text-align: right;
}

.understanding-summary-track {
  height: 8px;
  border-radius: 999px;
  background: rgba(255, 248, 232, 0.09);
  overflow: hidden;
}

.understanding-summary-track i {
  display: block;
  height: 100%;
  border-radius: inherit;
  background: rgba(148, 163, 184, 0.9);
}

.understanding-summary-row.understanding-lost .understanding-summary-track i {
  background: #ff6b6b;
}

.understanding-summary-row.understanding-confused .understanding-summary-track i {
  background: #ffb86b;
}

.understanding-summary-row.understanding-partial .understanding-summary-track i {
  background: #ffe37d;
}

.understanding-summary-row.understanding-complete .understanding-summary-track i {
  background: #7df9c7;
}

.understanding-summary-row.understanding-worthless .understanding-summary-track i {
  background: #94a3b8;
}

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

.weakness-hero {
  appearance: none;
  min-width: 0;
  display: grid;
  gap: 7px;
  border: 1px solid rgba(255, 248, 232, 0.12);
  border-radius: 8px;
  background:
    linear-gradient(135deg, rgba(255, 248, 232, 0.08), rgba(255, 248, 232, 0.025)),
    rgba(3, 18, 24, 0.58);
  color: #fff8e8;
  padding: 10px;
  font: inherit;
  text-align: left;
  cursor: pointer;
  transition:
    transform 0.16s ease,
    border-color 0.16s ease,
    box-shadow 0.16s ease;
}

.weakness-hero.danger {
  border-color: rgba(255, 107, 107, 0.38);
  background:
    radial-gradient(circle at 16% 12%, rgba(255, 107, 107, 0.18), transparent 40%),
    rgba(72, 20, 29, 0.38);
}

.weakness-hero.warm {
  border-color: rgba(255, 227, 125, 0.34);
  background:
    radial-gradient(circle at 16% 12%, rgba(255, 227, 125, 0.15), transparent 40%),
    rgba(55, 37, 10, 0.34);
}

.weakness-hero.strong {
  border-color: rgba(111, 239, 183, 0.3);
  background:
    radial-gradient(circle at 16% 12%, rgba(111, 239, 183, 0.13), transparent 40%),
    rgba(6, 51, 50, 0.34);
}

.weakness-hero:hover,
.weakness-hero:focus-visible {
  border-color: rgba(255, 241, 168, 0.72);
  outline: none;
  transform: translateY(-1px);
  box-shadow: 0 0 0 3px rgba(255, 241, 168, 0.1);
}

.weakness-hero > span,
.weakness-hero small,
.weakness-hero-grid span {
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.weakness-hero > span {
  color: rgba(255, 248, 232, 0.62);
  font-size: 0.58rem;
  font-weight: 950;
}

.weakness-hero strong {
  min-width: 0;
  color: #fff8e8;
  font-size: clamp(0.98rem, 1.25vw, 1.18rem);
  font-weight: 950;
  line-height: 1.08;
  overflow-wrap: anywhere;
}

.weakness-hero small {
  color: rgba(255, 248, 232, 0.68);
  font-size: 0.62rem;
  font-weight: 850;
}

.weakness-hero-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 6px;
}

.weakness-hero-grid b {
  min-width: 0;
  display: grid;
  gap: 2px;
  border: 1px solid rgba(255, 248, 232, 0.1);
  border-radius: 7px;
  background: rgba(0, 0, 0, 0.16);
  padding: 6px;
  font-weight: 950;
}

.weakness-hero-grid i {
  color: #fff1a8;
  font-style: normal;
  font-size: 0.86rem;
  font-variant-numeric: tabular-nums;
}

.weakness-row {
  appearance: none;
  width: 100%;
  min-width: 0;
  position: relative;
  border: 1px solid rgba(255, 248, 232, 0.1);
  padding: 8px;
  background:
    linear-gradient(90deg, rgba(255, 248, 232, 0.055), rgba(255, 248, 232, 0.02)),
    rgba(0, 0, 0, 0.12);
  color: inherit;
  font: inherit;
  text-align: left;
  display: grid;
  grid-template-columns: 28px minmax(0, 1fr) 14px;
  gap: 8px;
  align-items: stretch;
  cursor: pointer;
  border-radius: 8px;
  transition:
    transform 0.16s ease,
    background 0.16s ease,
    border-color 0.16s ease,
    box-shadow 0.16s ease;
}

.weakness-row::after {
  content: "";
  align-self: center;
  justify-self: end;
  width: 7px;
  height: 7px;
  border-top: 2px solid rgba(255, 248, 232, 0.58);
  border-right: 2px solid rgba(255, 248, 232, 0.58);
  transform: rotate(45deg);
}

.weakness-row.danger {
  border-color: rgba(255, 107, 107, 0.26);
}

.weakness-row.warm {
  border-color: rgba(255, 227, 125, 0.22);
}

.weakness-row.strong {
  border-color: rgba(111, 239, 183, 0.2);
}

.weakness-row:hover,
.weakness-row:focus-visible {
  border-color: rgba(255, 241, 168, 0.58);
  background: rgba(255, 227, 125, 0.075);
  transform: translateX(2px);
  box-shadow: 0 0 0 3px rgba(255, 241, 168, 0.08);
}

.weakness-row:focus-visible {
  outline: none;
}

.weakness-row > b {
  display: inline-grid;
  place-items: center;
  align-self: start;
  width: 28px;
  height: 28px;
  border: 1px solid rgba(255, 227, 125, 0.34);
  border-radius: 7px;
  background: rgba(255, 227, 125, 0.1);
  color: #fff1a8;
  font-size: 0.7rem;
  font-variant-numeric: tabular-nums;
}

.weakness-main {
  min-width: 0;
  display: grid;
  gap: 5px;
}

.weakness-kicker,
.weakness-meta {
  min-width: 0;
  display: flex;
  align-items: center;
  gap: 6px;
}

.weakness-kicker em {
  flex: 0 0 auto;
  border-radius: 999px;
  background: rgba(255, 248, 232, 0.1);
  color: #fff1a8;
  padding: 2px 6px;
  font-size: 0.52rem;
  font-style: normal;
  font-weight: 950;
}

.weakness-kicker small,
.weakness-meta {
  color: rgba(255, 248, 232, 0.6);
  font-size: 0.56rem;
  font-weight: 850;
}

.weakness-kicker small,
.weakness-main strong,
.weakness-meta {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.weakness-main strong {
  color: #fff8e8;
  font-size: 0.76rem;
  line-height: 1.1;
}

.weakness-meter {
  display: block;
  height: 6px;
  max-width: 100%;
  overflow: hidden;
  border-radius: 999px;
  background: rgba(255, 248, 232, 0.08);
}

.weakness-meter i {
  display: block;
  width: var(--weakness-pressure, 0%);
  height: 100%;
  border-radius: inherit;
  background: linear-gradient(90deg, #ffe37d, #ff6b6b);
  box-shadow: 0 0 12px rgba(255, 107, 107, 0.18);
}

.weakness-row.strong .weakness-meter i {
  background: linear-gradient(90deg, #7df9c7, #38bdf8);
}

.weakness-tags {
  min-width: 0;
  display: flex;
  flex-wrap: wrap;
  gap: 4px;
}

.weakness-tags small {
  border: 1px solid rgba(255, 248, 232, 0.1);
  border-radius: 999px;
  background: rgba(255, 248, 232, 0.06);
  color: rgba(255, 248, 232, 0.66);
  padding: 2px 6px;
  font-size: 0.52rem;
  font-weight: 850;
  line-height: 1.15;
}

.review-mastery-meter {
  display: flex;
  min-width: 0;
  height: 14px;
  overflow: hidden;
  border: 1px solid rgba(255, 248, 232, 0.1);
  border-radius: 999px;
  background: rgba(0, 0, 0, 0.16);
}

.review-mastery-meter span {
  min-width: 0;
  height: 100%;
}

.review-mastery-meter .rescue {
  background: linear-gradient(90deg, #fb7185, #ef4444);
}

.review-mastery-meter .due {
  background: linear-gradient(90deg, #facc15, #f59e0b);
}

.review-mastery-meter .growing {
  background: linear-gradient(90deg, #38bdf8, #0ea5e9);
}

.review-mastery-meter .secured {
  background: linear-gradient(90deg, #7df9c7, #0f766e);
}

.review-mastery-stats {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 6px;
}

.review-mastery-stats > div {
  min-width: 0;
  display: grid;
  gap: 3px;
  align-content: center;
  min-height: 48px;
  border: 1px solid rgba(255, 248, 232, 0.1);
  border-radius: 7px;
  background: rgba(0, 0, 0, 0.13);
  padding: 7px;
}

.review-mastery-stats span,
.review-mastery-stats strong {
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.review-mastery-stats span {
  color: rgba(255, 248, 232, 0.56);
  font-size: 0.52rem;
  font-weight: 950;
}

.review-mastery-stats strong {
  color: #fff8e8;
  font-size: 0.82rem;
  font-weight: 950;
  font-variant-numeric: tabular-nums;
}

.review-mastery-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 6px;
}

.review-mastery-card {
  min-width: 0;
  min-height: 70px;
  display: grid;
  align-content: center;
  gap: 3px;
  overflow: hidden;
  border: 1px solid rgba(255, 248, 232, 0.12);
  border-radius: 8px;
  background:
    linear-gradient(180deg, rgba(255, 248, 232, 0.07), rgba(255, 248, 232, 0.025)),
    rgba(3, 18, 24, 0.6);
  color: #fff8e8;
  padding: 7px;
  font: inherit;
  text-align: left;
  cursor: pointer;
  transition:
    transform 0.16s ease,
    border-color 0.16s ease,
    box-shadow 0.16s ease;
}

.review-mastery-card span,
.review-mastery-card strong,
.review-mastery-card small {
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.review-mastery-card span {
  color: rgba(255, 248, 232, 0.58);
  font-size: 0.54rem;
  font-weight: 950;
}

.review-mastery-card strong {
  color: #fff8e8;
  font-size: 1.12rem;
  font-weight: 950;
  font-variant-numeric: tabular-nums;
  line-height: 1;
}

.review-mastery-card small {
  color: rgba(255, 248, 232, 0.62);
  font-size: 0.54rem;
  font-weight: 850;
}

.review-mastery-card i {
  display: block;
  height: 4px;
  overflow: hidden;
  border-radius: 999px;
  background: rgba(255, 248, 232, 0.08);
}

.review-mastery-card i::before {
  content: "";
  display: block;
  width: var(--mastery-load, 0%);
  height: 100%;
  border-radius: inherit;
  background: #38bdf8;
}

.review-mastery-card.rescue {
  border-color: rgba(251, 113, 133, 0.28);
}

.review-mastery-card.rescue i::before {
  background: #fb7185;
  box-shadow: 0 0 10px rgba(251, 113, 133, 0.28);
}

.review-mastery-card.due {
  border-color: rgba(250, 204, 21, 0.28);
}

.review-mastery-card.due i::before {
  background: #facc15;
  box-shadow: 0 0 10px rgba(250, 204, 21, 0.26);
}

.review-mastery-card.growing i::before {
  background: #38bdf8;
  box-shadow: 0 0 10px rgba(56, 189, 248, 0.26);
}

.review-mastery-card.secured {
  border-color: rgba(125, 249, 199, 0.24);
}

.review-mastery-card.secured i::before {
  background: #7df9c7;
  box-shadow: 0 0 10px rgba(125, 249, 199, 0.26);
}

.review-mastery-card.active:hover,
.review-mastery-card.active:focus-visible {
  border-color: rgba(111, 239, 183, 0.74);
  outline: none;
  transform: translateY(-1px);
  box-shadow: 0 0 0 3px rgba(111, 239, 183, 0.1);
}

.review-mastery-card:disabled {
  cursor: default;
  opacity: 0.58;
}

.review-mastery-track p {
  margin: 0;
  border: 1px solid rgba(255, 248, 232, 0.09);
  border-radius: 7px;
  background: rgba(255, 248, 232, 0.055);
  color: rgba(255, 248, 232, 0.72);
  padding: 8px;
  font-size: 0.62rem;
  font-weight: 850;
  line-height: 1.35;
}

.review-history-overview {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 6px;
}

.review-history-overview > div {
  min-width: 0;
  display: grid;
  gap: 3px;
  align-content: center;
  min-height: 58px;
  border: 1px solid rgba(255, 248, 232, 0.1);
  border-radius: 7px;
  background: rgba(0, 0, 0, 0.14);
  padding: 7px;
}

.review-history-overview span,
.review-history-overview small {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  font-weight: 900;
}

.review-history-overview span {
  color: rgba(255, 248, 232, 0.55);
  font-size: 0.52rem;
}

.review-history-overview strong {
  color: #fff8e8;
  font-size: 0.92rem;
  font-weight: 950;
  line-height: 1;
  font-variant-numeric: tabular-nums;
}

.review-history-overview small {
  color: rgba(255, 248, 232, 0.62);
  font-size: 0.54rem;
}

.review-history-sparkline {
  display: flex;
  align-items: end;
  gap: 5px;
  height: 58px;
  border: 1px solid rgba(255, 248, 232, 0.09);
  border-radius: 7px;
  background:
    linear-gradient(180deg, transparent 0 48%, rgba(255, 248, 232, 0.08) 48% 50%, transparent 50%),
    rgba(0, 0, 0, 0.12);
  padding: 7px;
}

.review-history-sparkline span {
  flex: 1 1 0;
  min-width: 5px;
  border-radius: 999px 999px 3px 3px;
  background: linear-gradient(180deg, #7df9c7, #0f766e);
  box-shadow: 0 0 14px rgba(125, 249, 199, 0.15);
}

.review-history-sparkline span.has-wrong {
  background: linear-gradient(180deg, #ffb86b, #a74b1f);
  box-shadow: 0 0 14px rgba(255, 184, 107, 0.13);
}

.review-history-trend {
  display: grid;
  gap: 7px;
  border: 1px solid rgba(125, 249, 199, 0.18);
  border-radius: 8px;
  background:
    radial-gradient(circle at 0% 18%, rgba(125, 249, 199, 0.12), transparent 34%),
    linear-gradient(135deg, rgba(255, 248, 232, 0.06), rgba(56, 189, 248, 0.055)),
    rgba(0, 0, 0, 0.13);
  padding: 8px;
}

.review-history-trend-head {
  display: flex;
  align-items: start;
  justify-content: space-between;
  gap: 10px;
}

.review-history-trend-head span {
  display: block;
  color: rgba(255, 248, 232, 0.58);
  font-size: 0.56rem;
  font-weight: 950;
}

.review-history-trend-head strong {
  display: block;
  margin-top: 2px;
  color: #fff8e8;
  font-size: 0.86rem;
  font-weight: 950;
  line-height: 1.08;
}

.review-history-trend-head small {
  max-width: 56%;
  color: #fff1a8;
  font-size: 0.58rem;
  font-weight: 900;
  line-height: 1.25;
  text-align: right;
}

.review-history-trend-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 6px;
}

.review-history-trend-card {
  min-width: 0;
  display: grid;
  gap: 3px;
  overflow: hidden;
  border: 1px solid rgba(255, 248, 232, 0.1);
  border-radius: 7px;
  background: rgba(255, 248, 232, 0.06);
  padding: 7px;
}

.review-history-trend-card.strong {
  border-color: rgba(125, 249, 199, 0.24);
  background: rgba(15, 118, 110, 0.18);
}

.review-history-trend-card.warm {
  border-color: rgba(255, 227, 125, 0.24);
  background: rgba(96, 65, 6, 0.18);
}

.review-history-trend-card.danger {
  border-color: rgba(255, 107, 107, 0.26);
  background: rgba(76, 19, 28, 0.24);
}

.review-history-trend-card span,
.review-history-trend-card strong,
.review-history-trend-card small {
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.review-history-trend-card span {
  color: rgba(255, 248, 232, 0.56);
  font-size: 0.52rem;
  font-weight: 950;
}

.review-history-trend-card strong {
  color: #fff8e8;
  font-size: 0.84rem;
  font-weight: 950;
  line-height: 1;
  font-variant-numeric: tabular-nums;
}

.review-history-trend-card small {
  color: rgba(255, 248, 232, 0.62);
  font-size: 0.52rem;
  font-weight: 850;
}

.review-history-coach {
  border: 1px solid rgba(255, 248, 232, 0.1);
  border-radius: 7px;
  background: rgba(255, 248, 232, 0.06);
  padding: 8px 9px;
  color: rgba(255, 248, 232, 0.78);
  font-size: 0.66rem;
  font-weight: 900;
  line-height: 1.35;
}

.review-history-coach.strong {
  border-color: rgba(125, 249, 199, 0.26);
  background: rgba(15, 118, 110, 0.18);
  color: #d6fff0;
}

.review-history-coach.warm {
  border-color: rgba(255, 227, 125, 0.24);
  background: rgba(96, 65, 6, 0.24);
  color: #fff1a8;
}

.review-history-coach.danger {
  border-color: rgba(255, 107, 107, 0.28);
  background: rgba(76, 19, 28, 0.28);
  color: #ffd0d0;
}

.review-history-course-map {
  display: grid;
  gap: 8px;
  overflow: hidden;
  border: 1px solid rgba(56, 189, 248, 0.18);
  border-radius: 8px;
  background:
    radial-gradient(circle at 100% 0%, rgba(56, 189, 248, 0.14), transparent 34%),
    linear-gradient(135deg, rgba(255, 248, 232, 0.06), rgba(125, 249, 199, 0.045)),
    rgba(0, 0, 0, 0.14);
  padding: 9px;
}

.review-history-course-head {
  display: flex;
  align-items: start;
  justify-content: space-between;
  gap: 10px;
}

.review-history-course-head span {
  display: block;
  color: rgba(255, 248, 232, 0.58);
  font-size: 0.56rem;
  font-weight: 950;
}

.review-history-course-head strong {
  display: block;
  margin-top: 2px;
  color: #fff8e8;
  font-size: 1rem;
  font-weight: 950;
  line-height: 1.08;
}

.review-history-course-head small {
  max-width: 54%;
  color: #d6fff0;
  font-size: 0.58rem;
  font-weight: 900;
  line-height: 1.28;
  text-align: right;
}

.review-history-course-rows {
  display: grid;
  gap: 6px;
}

.review-history-course-row {
  min-width: 0;
  display: grid;
  grid-template-columns: minmax(0, 1fr) 48px;
  gap: 6px 8px;
  align-items: center;
  border: 1px solid rgba(255, 248, 232, 0.11);
  border-radius: 7px;
  background: rgba(255, 248, 232, 0.055);
  padding: 8px;
  color: inherit;
  font: inherit;
  text-align: left;
  cursor: pointer;
}

.review-history-course-row.strong {
  border-color: rgba(125, 249, 199, 0.25);
  background: rgba(15, 118, 110, 0.16);
}

.review-history-course-row.warm {
  border-color: rgba(255, 227, 125, 0.24);
  background: rgba(96, 65, 6, 0.16);
}

.review-history-course-row.danger {
  border-color: rgba(255, 107, 107, 0.28);
  background:
    radial-gradient(circle at 0% 0%, rgba(255, 107, 107, 0.15), transparent 38%),
    rgba(76, 19, 28, 0.23);
}

.review-history-course-row:disabled {
  cursor: default;
  opacity: 0.56;
}

.review-history-course-row:not(:disabled):hover,
.review-history-course-row:not(:disabled):focus-visible {
  border-color: rgba(125, 249, 199, 0.5);
  outline: none;
  transform: translateY(-1px);
  box-shadow: 0 8px 18px rgba(0, 0, 0, 0.18);
}

.review-history-course-main {
  min-width: 0;
  display: grid;
  gap: 2px;
}

.review-history-course-main em,
.review-history-course-main small,
.review-history-course-row strong,
.review-history-course-meta b,
.review-history-course-action,
.review-history-course-date {
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.review-history-course-main em {
  color: #fff8e8;
  font-size: 0.74rem;
  font-style: normal;
  font-weight: 950;
  line-height: 1.08;
}

.review-history-course-main small,
.review-history-course-date {
  color: rgba(255, 248, 232, 0.62);
  font-size: 0.58rem;
  font-weight: 850;
}

.review-history-course-row strong {
  justify-self: end;
  color: #fff1a8;
  font-size: 0.86rem;
  font-weight: 950;
  font-variant-numeric: tabular-nums;
}

.review-history-course-meter {
  grid-column: 1 / -1;
  display: block;
  overflow: hidden;
  height: 7px;
  border: 1px solid rgba(255, 248, 232, 0.11);
  border-radius: 999px;
  background: rgba(0, 0, 0, 0.18);
}

.review-history-course-meter i {
  display: block;
  width: var(--course-recovery-fill);
  height: 100%;
  border-radius: inherit;
  background: linear-gradient(90deg, #ffb86b, #fff1a8 48%, #7df9c7);
}

.review-history-course-meta {
  min-width: 0;
  display: flex;
  flex-wrap: wrap;
  gap: 4px;
}

.review-history-course-meta b,
.review-history-course-action {
  display: inline-flex;
  align-items: center;
  min-height: 22px;
  border: 1px solid rgba(255, 248, 232, 0.1);
  border-radius: 999px;
  background: rgba(0, 0, 0, 0.16);
  color: rgba(255, 248, 232, 0.72);
  padding: 0 7px;
  font-size: 0.56rem;
  font-weight: 950;
}

.review-history-course-action {
  justify-self: end;
  border-color: rgba(125, 249, 199, 0.26);
  color: #d6fff0;
}

.review-history-course-date {
  grid-column: 1 / -1;
}

.review-impact-panel {
  display: grid;
  gap: 8px;
  overflow: hidden;
  border: 1px solid rgba(56, 189, 248, 0.18);
  border-radius: 8px;
  background:
    radial-gradient(circle at 8% 0%, rgba(56, 189, 248, 0.16), transparent 38%),
    linear-gradient(135deg, rgba(255, 248, 232, 0.07), rgba(125, 249, 199, 0.04)),
    rgba(0, 0, 0, 0.14);
  padding: 9px;
}

.review-impact-panel.strong {
  border-color: rgba(125, 249, 199, 0.26);
}

.review-impact-panel.warm {
  border-color: rgba(255, 227, 125, 0.24);
}

.review-impact-panel.danger {
  border-color: rgba(255, 107, 107, 0.28);
  background:
    radial-gradient(circle at 8% 0%, rgba(255, 107, 107, 0.16), transparent 38%),
    linear-gradient(135deg, rgba(255, 248, 232, 0.06), rgba(255, 184, 107, 0.08)),
    rgba(0, 0, 0, 0.16);
}

.review-impact-head {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr);
  align-items: center;
  gap: 10px;
}

.review-impact-head span,
.review-impact-head small {
  color: rgba(255, 248, 232, 0.62);
  font-weight: 900;
  line-height: 1.28;
}

.review-impact-head span {
  display: block;
  font-size: 0.56rem;
}

.review-impact-head strong {
  display: block;
  color: #fff8e8;
  font-size: 1.45rem;
  font-weight: 950;
  line-height: 0.95;
  font-variant-numeric: tabular-nums;
}

.review-impact-head small {
  justify-self: end;
  max-width: 58%;
  text-align: right;
  color: #fff1a8;
  font-size: 0.6rem;
}

.review-impact-score {
  position: relative;
  overflow: hidden;
  height: 10px;
  border: 1px solid rgba(255, 248, 232, 0.12);
  border-radius: 999px;
  background: rgba(0, 0, 0, 0.18);
}

.review-impact-score span {
  display: block;
  width: var(--review-impact-score);
  height: 100%;
  border-radius: inherit;
  background: linear-gradient(90deg, #ff6b6b, #ffe37d 48%, #7df9c7);
  box-shadow: 0 0 16px rgba(125, 249, 199, 0.18);
}

.review-impact-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 6px;
}

.review-impact-metric {
  min-width: 0;
  display: grid;
  gap: 4px;
  overflow: hidden;
  border: 1px solid rgba(255, 248, 232, 0.1);
  border-radius: 7px;
  background: rgba(255, 248, 232, 0.055);
  padding: 7px;
}

.review-impact-metric.strong {
  border-color: rgba(125, 249, 199, 0.24);
  background: rgba(15, 118, 110, 0.17);
}

.review-impact-metric.warm {
  border-color: rgba(255, 227, 125, 0.24);
  background: rgba(96, 65, 6, 0.18);
}

.review-impact-metric.danger {
  border-color: rgba(255, 107, 107, 0.26);
  background: rgba(76, 19, 28, 0.24);
}

.review-impact-metric span,
.review-impact-metric strong,
.review-impact-metric small {
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.review-impact-metric span {
  color: rgba(255, 248, 232, 0.56);
  font-size: 0.52rem;
  font-weight: 950;
}

.review-impact-metric strong {
  color: #fff8e8;
  font-size: 0.9rem;
  font-weight: 950;
  line-height: 1;
  font-variant-numeric: tabular-nums;
}

.review-impact-metric small {
  color: rgba(255, 248, 232, 0.64);
  font-size: 0.52rem;
  font-weight: 850;
}

.review-impact-metric i {
  display: block;
  overflow: hidden;
  height: 4px;
  border-radius: 999px;
  background: rgba(255, 248, 232, 0.12);
}

.review-impact-metric i::before {
  content: "";
  display: block;
  width: var(--review-impact-fill);
  height: 100%;
  border-radius: inherit;
  background: linear-gradient(90deg, #38bdf8, #7df9c7);
}

.review-impact-metric.danger i::before {
  background: linear-gradient(90deg, #ff6b6b, #ffb86b);
}

.review-impact-metric.warm i::before {
  background: linear-gradient(90deg, #ffb86b, #ffe37d);
}

.review-impact-action {
  appearance: none;
  min-width: 0;
  min-height: 36px;
  border: 1px solid rgba(255, 248, 232, 0.16);
  border-radius: 7px;
  background: linear-gradient(135deg, rgba(56, 189, 248, 0.18), rgba(125, 249, 199, 0.12));
  color: #fff8e8;
  font: inherit;
  font-size: 0.68rem;
  font-weight: 950;
  cursor: pointer;
  transition:
    transform 0.16s ease,
    border-color 0.16s ease,
    box-shadow 0.16s ease;
}

.review-impact-action.danger {
  background: linear-gradient(135deg, rgba(255, 107, 107, 0.24), rgba(255, 184, 107, 0.12));
}

.review-impact-action:disabled {
  cursor: default;
  opacity: 0.55;
}

.review-impact-action:not(:disabled):hover,
.review-impact-action:not(:disabled):focus-visible {
  border-color: rgba(255, 248, 232, 0.52);
  outline: none;
  transform: translateY(-1px);
  box-shadow: 0 0 0 3px rgba(255, 248, 232, 0.08);
}

.review-coach-panel {
  display: grid;
  gap: 10px;
  border-color: rgba(255, 241, 168, 0.24);
  background:
    radial-gradient(circle at 8% 0%, rgba(255, 241, 168, 0.14), transparent 30%),
    radial-gradient(circle at 92% 18%, rgba(125, 249, 199, 0.13), transparent 34%),
    linear-gradient(135deg, rgba(49, 20, 34, 0.62), rgba(4, 54, 55, 0.68)),
    rgba(4, 22, 28, 0.54);
}

.review-coach-head {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(220px, 0.72fr);
  gap: 12px;
  align-items: start;
}

.review-coach-head span {
  display: block;
  color: rgba(255, 248, 232, 0.6);
  font-size: 0.58rem;
  font-weight: 950;
}

.review-coach-head strong {
  display: block;
  margin-top: 2px;
  color: #fff8e8;
  font-size: clamp(1.12rem, 1.6vw, 1.62rem);
  font-weight: 950;
  line-height: 1.05;
  overflow-wrap: anywhere;
}

.review-coach-head small {
  color: #fff1a8;
  font-size: 0.64rem;
  font-weight: 900;
  line-height: 1.32;
  text-align: right;
}

.review-coach-hero {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 12px;
  align-items: center;
  overflow: hidden;
  border: 1px solid rgba(255, 248, 232, 0.12);
  border-radius: 8px;
  background:
    linear-gradient(90deg, rgba(125, 249, 199, 0.2) 0 var(--review-coach-pressure), rgba(255, 248, 232, 0.055) var(--review-coach-pressure)),
    rgba(0, 0, 0, 0.14);
  padding: 10px;
}

.review-coach-hero.overdue,
.review-coach-hero.danger {
  background:
    linear-gradient(90deg, rgba(255, 107, 107, 0.22) 0 var(--review-coach-pressure), rgba(255, 248, 232, 0.055) var(--review-coach-pressure)),
    rgba(76, 19, 28, 0.24);
}

.review-coach-hero.today,
.review-coach-hero.warm {
  background:
    linear-gradient(90deg, rgba(255, 227, 125, 0.22) 0 var(--review-coach-pressure), rgba(255, 248, 232, 0.055) var(--review-coach-pressure)),
    rgba(96, 65, 6, 0.18);
}

.review-coach-hero.weak {
  background:
    linear-gradient(90deg, rgba(251, 146, 60, 0.22) 0 var(--review-coach-pressure), rgba(255, 248, 232, 0.055) var(--review-coach-pressure)),
    rgba(76, 36, 19, 0.22);
}

.review-coach-hero span,
.review-coach-hero strong,
.review-coach-hero small {
  display: block;
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.review-coach-hero span {
  color: rgba(255, 248, 232, 0.6);
  font-size: 0.56rem;
  font-weight: 950;
}

.review-coach-hero strong {
  margin-top: 2px;
  color: #fff8e8;
  font-size: 1rem;
  font-weight: 950;
}

.review-coach-hero small {
  color: rgba(255, 248, 232, 0.68);
  font-size: 0.6rem;
  font-weight: 850;
}

.review-coach-start {
  min-width: 104px;
  min-height: 42px;
  border: 1px solid rgba(255, 241, 168, 0.44);
  border-radius: 8px;
  background:
    linear-gradient(180deg, rgba(255, 241, 168, 0.22), rgba(255, 248, 232, 0.06)),
    rgba(4, 54, 55, 0.72);
  color: #fff8e8;
  font: inherit;
  font-size: 0.76rem;
  font-weight: 950;
  cursor: pointer;
}

.review-coach-start.overdue,
.review-coach-start.danger {
  background:
    linear-gradient(180deg, rgba(255, 107, 107, 0.25), rgba(255, 248, 232, 0.05)),
    rgba(76, 19, 28, 0.74);
}

.review-coach-start.weak {
  background:
    linear-gradient(180deg, rgba(251, 146, 60, 0.25), rgba(255, 248, 232, 0.05)),
    rgba(76, 36, 19, 0.74);
}

.review-coach-start:disabled {
  cursor: default;
  opacity: 0.55;
}

.review-coach-start:not(:disabled):hover,
.review-coach-start:not(:disabled):focus-visible {
  border-color: rgba(255, 248, 232, 0.68);
  outline: none;
  transform: translateY(-1px);
  box-shadow: 0 0 0 3px rgba(255, 241, 168, 0.11);
}

.review-coach-route {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 7px;
}

.review-coach-step {
  position: relative;
  min-width: 0;
  min-height: 92px;
  display: grid;
  grid-template-columns: auto minmax(0, 1fr);
  grid-template-rows: auto auto auto 5px;
  grid-template-areas:
    "num label"
    "num value"
    "num detail"
    "bar bar";
  gap: 3px 7px;
  align-content: center;
  border: 1px solid rgba(255, 248, 232, 0.12);
  border-radius: 8px;
  background:
    linear-gradient(180deg, rgba(255, 248, 232, 0.075), rgba(255, 248, 232, 0.026)),
    rgba(3, 18, 24, 0.58);
  color: #fff8e8;
  padding: 9px;
  font: inherit;
  text-align: left;
  cursor: pointer;
  transition:
    transform 0.16s ease,
    border-color 0.16s ease,
    box-shadow 0.16s ease;
}

.review-coach-step b {
  grid-area: num;
  display: grid;
  place-items: center;
  width: 28px;
  height: 28px;
  border-radius: 999px;
  background: rgba(255, 248, 232, 0.1);
  color: #fff1a8;
  font-size: 0.72rem;
  font-weight: 950;
  font-variant-numeric: tabular-nums;
}

.review-coach-step span {
  grid-area: label;
  color: rgba(255, 248, 232, 0.58);
  font-size: 0.56rem;
  font-weight: 950;
}

.review-coach-step strong {
  grid-area: value;
  color: #fff8e8;
  font-size: 0.96rem;
  font-weight: 950;
  line-height: 1;
  font-variant-numeric: tabular-nums;
}

.review-coach-step small {
  grid-area: detail;
  color: rgba(255, 248, 232, 0.64);
  font-size: 0.56rem;
  font-weight: 850;
}

.review-coach-step i {
  grid-area: bar;
  display: block;
  overflow: hidden;
  border-radius: 999px;
  background: rgba(255, 248, 232, 0.08);
}

.review-coach-step i::before {
  display: block;
  width: 100%;
  height: 100%;
  border-radius: inherit;
  background: #7df9c7;
  content: "";
}

.review-coach-step.overdue,
.review-coach-step.danger {
  border-color: rgba(255, 107, 107, 0.38);
}

.review-coach-step.overdue i::before,
.review-coach-step.danger i::before {
  background: #ff6b6b;
}

.review-coach-step.today {
  border-color: rgba(255, 227, 125, 0.34);
}

.review-coach-step.today i::before {
  background: #ffe37d;
}

.review-coach-step.weak {
  border-color: rgba(251, 146, 60, 0.36);
}

.review-coach-step.weak i::before {
  background: #fb923c;
}

.review-coach-step.soon i::before {
  background: #38bdf8;
}

.review-coach-step.clear {
  opacity: 0.66;
}

.review-coach-step.continue {
  border-color: rgba(125, 249, 199, 0.28);
}

.review-coach-step.active {
  border-color: rgba(255, 241, 168, 0.72);
  box-shadow:
    0 0 0 3px rgba(255, 241, 168, 0.09),
    inset 0 1px 0 rgba(255, 248, 232, 0.1);
}

.review-coach-step:disabled {
  cursor: default;
}

.review-coach-step:not(:disabled):hover,
.review-coach-step:not(:disabled):focus-visible {
  border-color: rgba(255, 248, 232, 0.62);
  outline: none;
  transform: translateY(-1px);
  box-shadow: 0 0 0 3px rgba(255, 248, 232, 0.08);
}

.review-coach-step span,
.review-coach-step strong,
.review-coach-step small {
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.review-coach-metrics {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 7px;
}

.review-coach-metric {
  min-width: 0;
  display: grid;
  gap: 3px;
  border: 1px solid rgba(255, 248, 232, 0.1);
  border-radius: 7px;
  background: rgba(0, 0, 0, 0.14);
  padding: 7px;
}

.review-coach-metric.strong {
  border-color: rgba(125, 249, 199, 0.22);
  background: rgba(15, 118, 110, 0.14);
}

.review-coach-metric.warm,
.review-coach-metric.today {
  border-color: rgba(255, 227, 125, 0.24);
  background: rgba(96, 65, 6, 0.16);
}

.review-coach-metric.danger,
.review-coach-metric.overdue {
  border-color: rgba(255, 107, 107, 0.28);
  background: rgba(76, 19, 28, 0.22);
}

.review-coach-metric.weak {
  border-color: rgba(251, 146, 60, 0.28);
  background: rgba(76, 36, 19, 0.2);
}

.review-coach-metric span,
.review-coach-metric strong,
.review-coach-metric small {
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.review-coach-metric span {
  color: rgba(255, 248, 232, 0.56);
  font-size: 0.52rem;
  font-weight: 950;
}

.review-coach-metric strong {
  color: #fff8e8;
  font-size: 0.9rem;
  font-weight: 950;
  line-height: 1;
  font-variant-numeric: tabular-nums;
}

.review-coach-metric small {
  color: rgba(255, 248, 232, 0.62);
  font-size: 0.52rem;
  font-weight: 850;
}

.review-momentum-panel {
  border-color: rgba(111, 239, 183, 0.24);
  background:
    radial-gradient(circle at 12% 8%, rgba(111, 239, 183, 0.18), transparent 36%),
    linear-gradient(135deg, rgba(9, 61, 62, 0.62), rgba(49, 20, 34, 0.56)),
    rgba(4, 22, 28, 0.5);
}

.review-momentum-head,
.review-momentum-next {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: center;
  gap: 10px;
}

.review-momentum-head span,
.review-momentum-metric span,
.review-momentum-next span {
  color: rgba(255, 248, 232, 0.62);
  font-size: 0.58rem;
  font-weight: 950;
  line-height: 1.15;
}

.review-momentum-head strong {
  display: block;
  margin-top: 3px;
  color: #fff8e8;
  font-size: clamp(1.15rem, 1.75vw, 1.72rem);
  font-weight: 950;
  line-height: 1.02;
  overflow-wrap: anywhere;
}

.review-momentum-score {
  min-width: 86px;
  display: grid;
  gap: 5px;
  justify-items: stretch;
}

.review-momentum-score b {
  justify-self: end;
  color: #fff1a8;
  font-size: clamp(1.28rem, 2.1vw, 2rem);
  font-weight: 950;
  line-height: 1;
  font-variant-numeric: tabular-nums;
}

.review-momentum-score i,
.review-momentum-metric i {
  display: block;
  overflow: hidden;
  border-radius: 999px;
  background: rgba(255, 248, 232, 0.12);
}

.review-momentum-score i {
  width: 86px;
  height: 8px;
}

.review-momentum-score em,
.review-momentum-metric i::before {
  display: block;
  width: var(--momentum-score, var(--momentum-fill, 0%));
  height: 100%;
  border-radius: inherit;
  background: linear-gradient(90deg, #7df9c7, #ffe37d);
  content: "";
}

.review-momentum-score.danger em {
  background: linear-gradient(90deg, #ff6b6b, #ffe37d);
}

.review-momentum-score.warm em {
  background: linear-gradient(90deg, #f59e0b, #ffe37d);
}

.review-momentum-panel p {
  margin: 0;
  color: rgba(255, 248, 232, 0.72);
  font-size: 0.72rem;
  font-weight: 850;
  line-height: 1.42;
}

.review-momentum-spark {
  height: 58px;
  display: grid;
  grid-template-columns: repeat(10, minmax(0, 1fr));
  align-items: end;
  gap: 5px;
  padding: 7px;
  border: 1px solid rgba(255, 248, 232, 0.1);
  border-radius: 7px;
  background: rgba(0, 0, 0, 0.14);
}

.review-momentum-spark span {
  min-height: 8px;
  height: var(--bar, 20%);
  border-radius: 999px 999px 3px 3px;
  background: linear-gradient(180deg, #7df9c7, rgba(125, 249, 199, 0.28));
}

.review-momentum-spark span.miss {
  background: linear-gradient(180deg, #ff6b6b, rgba(255, 107, 107, 0.26));
}

.review-momentum-spark span.empty {
  opacity: 0.38;
}

.review-momentum-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 7px;
}

.review-momentum-metric {
  min-width: 0;
  display: grid;
  gap: 4px;
  padding: 8px;
  border: 1px solid rgba(255, 248, 232, 0.12);
  border-radius: 7px;
  background: rgba(255, 248, 232, 0.06);
}

.review-momentum-metric strong {
  color: #fff8e8;
  font-size: 0.92rem;
  font-weight: 950;
  line-height: 1;
  font-variant-numeric: tabular-nums;
  overflow-wrap: anywhere;
}

.review-momentum-metric small {
  color: rgba(255, 248, 232, 0.62);
  font-size: 0.55rem;
  font-weight: 850;
  line-height: 1.18;
}

.review-momentum-metric i {
  height: 5px;
}

.review-momentum-metric.strong i::before {
  background: linear-gradient(90deg, #14b87a, #7df9c7);
}

.review-momentum-metric.warm i::before {
  background: linear-gradient(90deg, #d97706, #ffe37d);
}

.review-momentum-metric.danger i::before {
  background: linear-gradient(90deg, #dc2626, #ff9f9f);
}

.review-momentum-next {
  padding: 7px;
  border: 1px solid rgba(255, 241, 168, 0.16);
  border-radius: 7px;
  background: rgba(255, 241, 168, 0.06);
}

.review-momentum-next span {
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.review-momentum-start {
  appearance: none;
  min-width: 88px;
  min-height: 34px;
  border: 1px solid rgba(255, 241, 168, 0.28);
  border-radius: 7px;
  background: linear-gradient(135deg, rgba(17, 94, 89, 0.76), rgba(244, 206, 88, 0.18));
  color: #fff8e8;
  font: inherit;
  font-size: 0.72rem;
  font-weight: 950;
  cursor: pointer;
  transition:
    transform 0.16s ease,
    border-color 0.16s ease,
    box-shadow 0.16s ease;
}

.review-momentum-start.danger {
  border-color: rgba(255, 107, 107, 0.38);
  background: linear-gradient(135deg, rgba(127, 29, 29, 0.72), rgba(244, 206, 88, 0.16));
}

.review-momentum-start:disabled {
  cursor: default;
  opacity: 0.56;
}

.review-momentum-start:not(:disabled):hover,
.review-momentum-start:not(:disabled):focus-visible {
  border-color: rgba(255, 248, 232, 0.55);
  outline: none;
  transform: translateY(-1px);
  box-shadow: 0 0 0 3px rgba(255, 248, 232, 0.08);
}

.review-command-deck-panel {
  display: grid;
  gap: 9px;
  border-color: rgba(125, 249, 199, 0.26);
  background:
    radial-gradient(circle at 10% 12%, rgba(125, 249, 199, 0.14), transparent 32%),
    linear-gradient(135deg, rgba(4, 54, 55, 0.74), rgba(31, 24, 40, 0.58)),
    rgba(4, 22, 28, 0.52);
}

.review-command-head {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(180px, 0.82fr);
  align-items: start;
  gap: 12px;
}

.review-command-head span {
  display: block;
  color: rgba(255, 248, 232, 0.58);
  font-size: 0.58rem;
  font-weight: 950;
  letter-spacing: 0;
}

.review-command-head strong {
  display: block;
  margin-top: 2px;
  color: #fff8e8;
  font-size: 1rem;
  font-weight: 950;
  line-height: 1.12;
  overflow-wrap: anywhere;
}

.review-command-head small {
  justify-self: end;
  max-width: 100%;
  color: #fff1a8;
  font-size: 0.62rem;
  font-weight: 900;
  line-height: 1.28;
  text-align: right;
}

.review-command-pressure {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto auto;
  align-items: center;
  gap: 8px;
}

.review-command-pressure span {
  display: block;
  height: 10px;
  overflow: hidden;
  border-radius: 999px;
  background: rgba(255, 248, 232, 0.08);
}

.review-command-pressure span::before {
  content: "";
  display: block;
  width: var(--command-pressure, 0%);
  height: 100%;
  border-radius: inherit;
  background: linear-gradient(90deg, #7df9c7, #ffe37d 62%, #ff6b6b);
  box-shadow: 0 0 14px rgba(255, 227, 125, 0.2);
}

.review-command-pressure.strong span::before {
  background: linear-gradient(90deg, #14b87a, #7df9c7);
}

.review-command-pressure.warm span::before {
  background: linear-gradient(90deg, #f59e0b, #ffe37d);
}

.review-command-pressure.danger span::before {
  background: linear-gradient(90deg, #dc2626, #ff6b6b);
}

.review-command-pressure b {
  color: #fff8e8;
  font-size: 0.78rem;
  font-weight: 950;
  font-variant-numeric: tabular-nums;
  line-height: 1;
}

.review-command-pressure small {
  color: rgba(255, 248, 232, 0.58);
  font-size: 0.56rem;
  font-weight: 950;
  white-space: nowrap;
}

.review-command-cards {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 7px;
}

.review-command-card {
  min-width: 0;
  min-height: 88px;
  display: grid;
  align-content: center;
  gap: 5px;
  border: 1px solid rgba(255, 248, 232, 0.13);
  border-radius: 8px;
  background:
    linear-gradient(180deg, rgba(255, 248, 232, 0.075), rgba(255, 248, 232, 0.026)),
    rgba(3, 18, 24, 0.64);
  color: #fff8e8;
  padding: 9px;
  font: inherit;
  text-align: left;
  cursor: pointer;
  transition:
    transform 0.16s ease,
    border-color 0.16s ease,
    box-shadow 0.16s ease;
}

.review-command-card.overdue,
.review-command-card.danger {
  border-color: rgba(255, 107, 107, 0.4);
}

.review-command-card.today {
  border-color: rgba(255, 227, 125, 0.36);
}

.review-command-card.weak {
  border-color: rgba(251, 146, 60, 0.36);
}

.review-command-card.soon {
  border-color: rgba(56, 189, 248, 0.34);
}

.review-command-card.continue,
.review-command-card.smart,
.review-command-card.future {
  border-color: rgba(125, 249, 199, 0.28);
}

.review-command-card span,
.review-command-card strong,
.review-command-card small {
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.review-command-card span {
  color: rgba(255, 248, 232, 0.58);
  font-size: 0.56rem;
  font-weight: 950;
}

.review-command-card strong {
  color: #fff8e8;
  font-size: 1rem;
  font-weight: 950;
  font-variant-numeric: tabular-nums;
  line-height: 1;
}

.review-command-card small {
  color: rgba(255, 248, 232, 0.64);
  font-size: 0.56rem;
  font-weight: 850;
}

.review-command-card i {
  display: block;
  height: 5px;
  overflow: hidden;
  border-radius: 999px;
  background: rgba(255, 248, 232, 0.08);
}

.review-command-card i::before {
  content: "";
  display: block;
  width: 100%;
  height: 100%;
  border-radius: inherit;
  background: #7df9c7;
}

.review-command-card.overdue i::before,
.review-command-card.danger i::before {
  background: #ff6b6b;
}

.review-command-card.today i::before {
  background: #ffe37d;
}

.review-command-card.weak i::before {
  background: #fb923c;
}

.review-command-card.soon i::before {
  background: #38bdf8;
}

.review-command-card:disabled {
  cursor: default;
  opacity: 0.5;
}

.review-command-card:not(:disabled):hover,
.review-command-card:not(:disabled):focus-visible {
  border-color: rgba(255, 248, 232, 0.58);
  outline: none;
  transform: translateY(-1px);
  box-shadow: 0 0 0 3px rgba(125, 249, 199, 0.1);
}

.review-command-steps {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 7px;
}

.review-command-step {
  min-width: 0;
  display: grid;
  gap: 6px;
  border: 1px solid rgba(255, 248, 232, 0.1);
  border-radius: 8px;
  background: rgba(255, 248, 232, 0.055);
  padding: 8px;
}

.review-command-step div {
  min-width: 0;
  display: grid;
  gap: 3px;
}

.review-command-step span,
.review-command-step strong,
.review-command-step small {
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.review-command-step span {
  color: rgba(255, 248, 232, 0.58);
  font-size: 0.54rem;
  font-weight: 950;
}

.review-command-step strong {
  color: #fff1a8;
  font-size: 0.98rem;
  font-weight: 950;
  line-height: 1;
}

.review-command-step small {
  color: rgba(255, 248, 232, 0.62);
  font-size: 0.54rem;
  font-weight: 850;
}

.review-command-step i {
  display: block;
  height: 6px;
  overflow: hidden;
  border-radius: 999px;
  background: rgba(255, 248, 232, 0.08);
}

.review-command-step i::before {
  content: "";
  display: block;
  width: var(--command-coverage, 0%);
  height: 100%;
  border-radius: inherit;
  background: linear-gradient(90deg, #ff6b6b, #ffe37d 58%, #7df9c7);
}

.review-command-empty {
  border: 1px dashed rgba(255, 248, 232, 0.18);
  border-radius: 8px;
  background: rgba(255, 248, 232, 0.045);
  color: rgba(255, 248, 232, 0.66);
  padding: 10px;
  font-size: 0.66rem;
  font-weight: 850;
  line-height: 1.35;
}

.review-set-blueprint-panel {
  display: grid;
  gap: 9px;
  border-color: rgba(255, 227, 125, 0.24);
  background:
    radial-gradient(circle at 100% 8%, rgba(255, 227, 125, 0.13), transparent 34%),
    linear-gradient(135deg, rgba(31, 24, 40, 0.7), rgba(4, 54, 55, 0.52)),
    rgba(4, 22, 28, 0.5);
}

.review-blueprint-head,
.review-blueprint-actions {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: center;
  gap: 10px;
}

.review-blueprint-head span {
  display: block;
  color: rgba(255, 248, 232, 0.58);
  font-size: 0.58rem;
  font-weight: 950;
}

.review-blueprint-head strong {
  display: block;
  margin-top: 2px;
  color: #fff8e8;
  font-size: 0.98rem;
  font-weight: 950;
  line-height: 1.12;
  overflow-wrap: anywhere;
}

.review-blueprint-head small {
  color: #fff1a8;
  font-size: 0.6rem;
  font-weight: 950;
  line-height: 1.2;
  text-align: right;
}

.review-blueprint-composition {
  display: flex;
  min-width: 0;
  height: 12px;
  overflow: hidden;
  border-radius: 999px;
  background: rgba(255, 248, 232, 0.08);
  box-shadow: inset 0 0 0 1px rgba(255, 248, 232, 0.07);
}

.review-blueprint-composition span {
  min-width: 0;
  height: 100%;
}

.review-blueprint-composition .overdue {
  background: #ff6b6b;
}

.review-blueprint-composition .today {
  background: #ffe37d;
}

.review-blueprint-composition .weak {
  background: #fb923c;
}

.review-blueprint-composition .soon {
  background: #38bdf8;
}

.review-blueprint-composition .future {
  background: #7df9c7;
}

.review-blueprint-metrics {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 6px;
}

.review-blueprint-metrics div {
  min-width: 0;
  overflow: hidden;
  border: 1px solid rgba(255, 248, 232, 0.1);
  border-radius: 7px;
  background: rgba(255, 248, 232, 0.055);
  padding: 7px;
}

.review-blueprint-metrics span,
.review-blueprint-metrics strong {
  display: block;
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.review-blueprint-metrics span {
  color: rgba(255, 248, 232, 0.56);
  font-size: 0.52rem;
  font-weight: 950;
}

.review-blueprint-metrics strong {
  margin-top: 2px;
  color: #fff8e8;
  font-size: 0.92rem;
  font-weight: 950;
  font-variant-numeric: tabular-nums;
  line-height: 1;
}

.review-blueprint-focus {
  display: flex;
  flex-wrap: wrap;
  gap: 5px;
}

.review-blueprint-focus span {
  min-width: 0;
  max-width: 100%;
  display: inline-flex;
  align-items: center;
  gap: 5px;
  overflow: hidden;
  border: 1px solid rgba(255, 248, 232, 0.11);
  border-radius: 999px;
  background: rgba(255, 248, 232, 0.07);
  color: rgba(255, 248, 232, 0.7);
  padding: 4px 7px;
  font-size: 0.56rem;
  font-weight: 850;
  line-height: 1;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.review-blueprint-focus b {
  color: #fff1a8;
  font-variant-numeric: tabular-nums;
}

.review-blueprint-questions {
  display: grid;
  gap: 6px;
}

.review-blueprint-question {
  min-width: 0;
  display: grid;
  grid-template-columns: 30px minmax(0, 1fr) minmax(92px, auto);
  align-items: center;
  gap: 8px;
  overflow: hidden;
  border: 1px solid rgba(255, 248, 232, 0.1);
  border-radius: 8px;
  background:
    linear-gradient(90deg, rgba(255, 248, 232, 0.08), rgba(255, 248, 232, 0.025)),
    rgba(0, 0, 0, 0.13);
  padding: 7px;
}

.review-blueprint-question.overdue {
  border-color: rgba(255, 107, 107, 0.32);
}

.review-blueprint-question.today {
  border-color: rgba(255, 227, 125, 0.28);
}

.review-blueprint-question.weak {
  border-color: rgba(251, 146, 60, 0.3);
}

.review-blueprint-question.soon {
  border-color: rgba(56, 189, 248, 0.27);
}

.review-blueprint-question b {
  display: grid;
  place-items: center;
  width: 30px;
  height: 30px;
  border-radius: 999px;
  background: rgba(255, 248, 232, 0.1);
  color: #fff1a8;
  font-size: 0.7rem;
  font-weight: 950;
  font-variant-numeric: tabular-nums;
}

.review-blueprint-question span,
.review-blueprint-question strong,
.review-blueprint-question small,
.review-blueprint-question em {
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.review-blueprint-question span {
  display: grid;
  gap: 2px;
}

.review-blueprint-question strong {
  color: #fff8e8;
  font-size: 0.72rem;
  font-weight: 950;
}

.review-blueprint-question small {
  color: rgba(255, 248, 232, 0.6);
  font-size: 0.56rem;
  font-weight: 850;
}

.review-blueprint-question em {
  justify-self: end;
  color: rgba(255, 248, 232, 0.68);
  font-size: 0.56rem;
  font-style: normal;
  font-weight: 900;
}

.review-blueprint-question i {
  grid-column: 1 / -1;
  display: block;
  height: 4px;
  overflow: hidden;
  border-radius: 999px;
  background: rgba(255, 248, 232, 0.08);
}

.review-blueprint-question i::before {
  content: "";
  display: block;
  width: var(--blueprint-priority, 0%);
  height: 100%;
  border-radius: inherit;
  background: linear-gradient(90deg, #ff6b6b, #ffe37d 58%, #7df9c7);
}

.review-blueprint-actions p {
  margin: 0;
  color: rgba(255, 248, 232, 0.66);
  font-size: 0.62rem;
  font-weight: 850;
  line-height: 1.3;
}

.review-blueprint-start {
  min-width: 112px;
  min-height: 34px;
  border: 1px solid rgba(255, 227, 125, 0.52);
  border-radius: 8px;
  background:
    linear-gradient(180deg, rgba(255, 227, 125, 0.22), rgba(8, 86, 84, 0.45)),
    rgba(6, 39, 41, 0.78);
  color: #fff8e8;
  padding: 0 10px;
  font: inherit;
  font-size: 0.68rem;
  font-weight: 950;
  cursor: pointer;
  transition:
    transform 0.16s ease,
    border-color 0.16s ease,
    box-shadow 0.16s ease;
}

.review-blueprint-start:hover,
.review-blueprint-start:focus-visible {
  border-color: rgba(125, 249, 199, 0.78);
  outline: none;
  transform: translateY(-1px);
  box-shadow: 0 0 0 3px rgba(125, 249, 199, 0.1);
}

.review-blueprint-empty {
  border: 1px dashed rgba(255, 248, 232, 0.18);
  border-radius: 8px;
  background: rgba(255, 248, 232, 0.045);
  color: rgba(255, 248, 232, 0.66);
  padding: 10px;
  font-size: 0.66rem;
  font-weight: 850;
  line-height: 1.35;
}

.review-outcome-panel {
  display: grid;
  gap: 9px;
  border-color: rgba(125, 249, 199, 0.28);
  background:
    radial-gradient(circle at 12% 10%, rgba(125, 249, 199, 0.14), transparent 32%),
    radial-gradient(circle at 96% 20%, rgba(255, 107, 107, 0.1), transparent 30%),
    linear-gradient(135deg, rgba(4, 54, 55, 0.7), rgba(31, 24, 40, 0.6)),
    rgba(4, 22, 28, 0.52);
}

.review-outcome-head,
.review-outcome-action {
  min-width: 0;
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: center;
  gap: 10px;
}

.review-outcome-head span {
  display: block;
  color: rgba(255, 248, 232, 0.58);
  font-size: 0.58rem;
  font-weight: 950;
}

.review-outcome-head strong {
  display: block;
  margin-top: 2px;
  color: #fff8e8;
  font-size: 1.04rem;
  font-weight: 950;
  line-height: 1.08;
  overflow-wrap: anywhere;
}

.review-outcome-score {
  min-width: 136px;
  display: grid;
  grid-template-columns: auto minmax(72px, 1fr);
  align-items: center;
  gap: 6px;
  border: 1px solid rgba(255, 248, 232, 0.12);
  border-radius: 8px;
  background: rgba(255, 248, 232, 0.06);
  padding: 7px;
}

.review-outcome-score b {
  color: #fff8e8;
  font-size: 1.18rem;
  font-weight: 950;
  font-variant-numeric: tabular-nums;
  line-height: 1;
}

.review-outcome-score i {
  display: block;
  height: 8px;
  overflow: hidden;
  border-radius: 999px;
  background: rgba(255, 248, 232, 0.1);
}

.review-outcome-score i::before {
  content: "";
  display: block;
  width: var(--review-outcome-score, 0%);
  height: 100%;
  border-radius: inherit;
  background: linear-gradient(90deg, #ff6b6b, #ffe37d 58%, #7df9c7);
}

.review-outcome-score.strong i::before {
  background: linear-gradient(90deg, #14b87a, #7df9c7);
}

.review-outcome-score.warm i::before {
  background: linear-gradient(90deg, #f59e0b, #ffe37d);
}

.review-outcome-score.danger i::before {
  background: linear-gradient(90deg, #dc2626, #ff6b6b);
}

.review-outcome-score small {
  grid-column: 1 / -1;
  color: rgba(255, 248, 232, 0.62);
  font-size: 0.54rem;
  font-weight: 900;
  line-height: 1.18;
}

.review-outcome-metrics {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 6px;
}

.review-outcome-metric {
  min-width: 0;
  overflow: hidden;
  border: 1px solid rgba(255, 248, 232, 0.1);
  border-radius: 7px;
  background:
    linear-gradient(180deg, rgba(255, 248, 232, 0.075), rgba(255, 248, 232, 0.025)),
    rgba(3, 18, 24, 0.5);
  padding: 7px;
}

.review-outcome-metric.strong {
  border-color: rgba(125, 249, 199, 0.3);
}

.review-outcome-metric.warm {
  border-color: rgba(255, 227, 125, 0.28);
}

.review-outcome-metric.danger {
  border-color: rgba(255, 107, 107, 0.36);
}

.review-outcome-metric span,
.review-outcome-metric strong,
.review-outcome-metric small {
  display: block;
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.review-outcome-metric span {
  color: rgba(255, 248, 232, 0.56);
  font-size: 0.52rem;
  font-weight: 950;
}

.review-outcome-metric strong {
  margin-top: 3px;
  color: #fff8e8;
  font-size: 0.98rem;
  font-weight: 950;
  font-variant-numeric: tabular-nums;
  line-height: 1;
}

.review-outcome-metric small {
  margin-top: 4px;
  color: rgba(255, 248, 232, 0.62);
  font-size: 0.52rem;
  font-weight: 850;
}

.review-outcome-sankey {
  min-width: 0;
  overflow: hidden;
  border: 1px solid rgba(125, 249, 199, 0.2);
  border-radius: 9px;
  background:
    radial-gradient(circle at 14% 22%, rgba(125, 249, 199, 0.16), transparent 30%),
    radial-gradient(circle at 82% 18%, rgba(255, 227, 125, 0.11), transparent 30%),
    linear-gradient(135deg, rgba(255, 248, 232, 0.075), rgba(255, 248, 232, 0.025));
  padding: 9px;
}

.review-outcome-sankey.empty {
  display: grid;
  gap: 7px;
  border-style: dashed;
  color: rgba(255, 248, 232, 0.72);
}

.review-outcome-sankey.empty span,
.review-outcome-sankey-head span {
  display: block;
  color: rgba(255, 248, 232, 0.56);
  font-size: 0.56rem;
  font-weight: 950;
  line-height: 1;
}

.review-outcome-sankey.empty strong,
.review-outcome-sankey-head strong {
  display: block;
  margin-top: 3px;
  color: #fff8e8;
  font-size: 0.96rem;
  font-weight: 950;
  line-height: 1.1;
}

.review-outcome-sankey.empty p {
  margin: 0;
  color: rgba(255, 248, 232, 0.64);
  font-size: 0.62rem;
  font-weight: 850;
  line-height: 1.36;
}

.review-outcome-sankey-head {
  display: flex;
  align-items: end;
  justify-content: space-between;
  gap: 10px;
  margin-bottom: 6px;
}

.review-outcome-sankey-head small {
  color: rgba(255, 248, 232, 0.66);
  font-size: 0.58rem;
  font-weight: 900;
  white-space: nowrap;
}

.review-sankey-svg {
  display: block;
  width: 100%;
  height: auto;
  min-height: 190px;
}

.review-sankey-link {
  fill: none;
  stroke-linecap: round;
  opacity: 0.82;
}

.review-sankey-link.strong {
  stroke: rgba(125, 249, 199, 0.72);
}

.review-sankey-link.warm {
  stroke: rgba(255, 227, 125, 0.72);
}

.review-sankey-link.danger {
  stroke: rgba(255, 107, 107, 0.72);
}

.review-sankey-link.idle {
  stroke: rgba(255, 248, 232, 0.24);
}

.review-sankey-node rect {
  stroke: rgba(255, 248, 232, 0.12);
  fill: rgba(3, 18, 24, 0.72);
}

.review-sankey-node.strong rect {
  stroke: rgba(125, 249, 199, 0.34);
  fill: rgba(13, 80, 70, 0.82);
}

.review-sankey-node.warm rect {
  stroke: rgba(255, 227, 125, 0.34);
  fill: rgba(88, 61, 8, 0.82);
}

.review-sankey-node.danger rect {
  stroke: rgba(255, 107, 107, 0.38);
  fill: rgba(76, 19, 28, 0.84);
}

.review-sankey-node-label {
  fill: rgba(255, 248, 232, 0.72);
  font-size: 10px;
  font-weight: 900;
}

.review-sankey-node-value {
  fill: #fff8e8;
  font-size: 17px;
  font-weight: 950;
  font-variant-numeric: tabular-nums;
}

.review-sankey-node-detail {
  fill: rgba(255, 248, 232, 0.62);
  font-size: 9px;
  font-weight: 850;
}

.review-outcome-action {
  border: 1px solid rgba(255, 248, 232, 0.1);
  border-radius: 8px;
  background: rgba(255, 248, 232, 0.05);
  padding: 8px;
}

.review-outcome-action p {
  min-width: 0;
  margin: 0;
  color: rgba(255, 248, 232, 0.68);
  font-size: 0.64rem;
  font-weight: 850;
  line-height: 1.34;
}

.review-outcome-start {
  min-width: 116px;
  min-height: 34px;
  border: 1px solid rgba(125, 249, 199, 0.44);
  border-radius: 8px;
  background:
    linear-gradient(180deg, rgba(125, 249, 199, 0.22), rgba(8, 86, 84, 0.48)),
    rgba(6, 39, 41, 0.78);
  color: #fff8e8;
  padding: 0 10px;
  font: inherit;
  font-size: 0.68rem;
  font-weight: 950;
  cursor: pointer;
  transition:
    transform 0.16s ease,
    border-color 0.16s ease,
    box-shadow 0.16s ease;
}

.review-outcome-start.danger {
  border-color: rgba(255, 107, 107, 0.5);
  background:
    linear-gradient(180deg, rgba(255, 107, 107, 0.24), rgba(76, 19, 28, 0.58)),
    rgba(44, 20, 32, 0.76);
}

.review-outcome-start:disabled {
  cursor: default;
  opacity: 0.54;
}

.review-outcome-start:not(:disabled):hover,
.review-outcome-start:not(:disabled):focus-visible {
  border-color: rgba(255, 248, 232, 0.62);
  outline: none;
  transform: translateY(-1px);
  box-shadow: 0 0 0 3px rgba(125, 249, 199, 0.1);
}

.review-course-pulse-panel {
  display: grid;
  gap: 9px;
  border-color: rgba(167, 139, 250, 0.25);
  background:
    radial-gradient(circle at 10% 12%, rgba(167, 139, 250, 0.16), transparent 32%),
    linear-gradient(135deg, rgba(31, 24, 40, 0.72), rgba(4, 54, 55, 0.54)),
    rgba(4, 22, 28, 0.5);
}

.review-course-pulse-head {
  min-width: 0;
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(180px, 0.92fr);
  align-items: start;
  gap: 10px;
}

.review-course-pulse-head span {
  display: block;
  color: rgba(255, 248, 232, 0.58);
  font-size: 0.58rem;
  font-weight: 950;
}

.review-course-pulse-head strong {
  display: block;
  margin-top: 2px;
  color: #fff8e8;
  font-size: 1rem;
  font-weight: 950;
  line-height: 1.1;
  overflow-wrap: anywhere;
}

.review-course-pulse-head small {
  justify-self: end;
  color: #fff1a8;
  font-size: 0.62rem;
  font-weight: 900;
  line-height: 1.28;
  text-align: right;
}

.review-course-pulse-list {
  display: grid;
  gap: 6px;
}

.review-course-pulse-row {
  position: relative;
  min-width: 0;
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(62px, auto) minmax(82px, 0.42fr) minmax(120px, auto) minmax(68px, auto);
  align-items: center;
  gap: 8px;
  overflow: hidden;
  border: 1px solid rgba(255, 248, 232, 0.12);
  border-radius: 8px;
  background:
    linear-gradient(90deg, rgba(125, 249, 199, 0.14) var(--course-pulse-pressure, 0%), rgba(255, 248, 232, 0.045) 0),
    rgba(3, 18, 24, 0.58);
  color: #fff8e8;
  padding: 8px;
  font: inherit;
  text-align: left;
  cursor: pointer;
  transition:
    border-color 0.16s ease,
    box-shadow 0.16s ease,
    transform 0.16s ease;
}

.review-course-pulse-row.danger {
  border-color: rgba(255, 107, 107, 0.4);
  background:
    linear-gradient(90deg, rgba(255, 107, 107, 0.18) var(--course-pulse-pressure, 0%), rgba(255, 248, 232, 0.04) 0),
    rgba(76, 19, 28, 0.34);
}

.review-course-pulse-row.warm {
  border-color: rgba(255, 227, 125, 0.34);
  background:
    linear-gradient(90deg, rgba(255, 227, 125, 0.16) var(--course-pulse-pressure, 0%), rgba(255, 248, 232, 0.04) 0),
    rgba(54, 34, 8, 0.28);
}

.review-course-pulse-row.strong {
  border-color: rgba(125, 249, 199, 0.28);
}

.review-course-pulse-row:disabled {
  cursor: default;
  opacity: 0.58;
}

.review-course-pulse-row:not(:disabled):hover,
.review-course-pulse-row:not(:disabled):focus-visible {
  border-color: rgba(255, 248, 232, 0.58);
  outline: none;
  transform: translateY(-1px);
  box-shadow: 0 0 0 3px rgba(167, 139, 250, 0.11);
}

.review-course-pulse-main,
.review-course-pulse-score,
.review-course-pulse-meta {
  min-width: 0;
}

.review-course-pulse-main strong,
.review-course-pulse-main small,
.review-course-pulse-score b,
.review-course-pulse-score small,
.review-course-pulse-meta b,
.review-course-pulse-row em {
  display: block;
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.review-course-pulse-main strong {
  color: #fff8e8;
  font-size: 0.8rem;
  font-weight: 950;
  line-height: 1.12;
}

.review-course-pulse-main small {
  margin-top: 3px;
  color: rgba(255, 248, 232, 0.62);
  font-size: 0.58rem;
  font-weight: 850;
  line-height: 1.18;
}

.review-course-pulse-score b {
  color: #fff8e8;
  font-size: 0.86rem;
  font-weight: 950;
  font-variant-numeric: tabular-nums;
  line-height: 1;
}

.review-course-pulse-score small {
  margin-top: 3px;
  color: rgba(255, 248, 232, 0.56);
  font-size: 0.52rem;
  font-weight: 850;
}

.review-course-pulse-meter {
  display: block;
  height: 7px;
  overflow: hidden;
  border-radius: 999px;
  background: rgba(255, 248, 232, 0.1);
}

.review-course-pulse-meter i {
  display: block;
  width: var(--course-pulse-pressure, 0%);
  height: 100%;
  border-radius: inherit;
  background: linear-gradient(90deg, #7df9c7, #ffe37d 58%, #ff6b6b);
}

.review-course-pulse-meta {
  display: flex;
  flex-wrap: wrap;
  justify-content: flex-end;
  gap: 4px;
}

.review-course-pulse-meta b {
  max-width: 88px;
  border: 1px solid rgba(255, 248, 232, 0.1);
  border-radius: 999px;
  background: rgba(255, 248, 232, 0.07);
  color: rgba(255, 248, 232, 0.72);
  padding: 3px 6px;
  font-size: 0.52rem;
  font-weight: 900;
}

.review-course-pulse-row em {
  justify-self: end;
  min-width: 56px;
  border: 1px solid rgba(255, 248, 232, 0.16);
  border-radius: 999px;
  background: rgba(255, 248, 232, 0.08);
  color: #fff1a8;
  padding: 5px 8px;
  font-size: 0.58rem;
  font-style: normal;
  font-weight: 950;
  line-height: 1;
  text-align: center;
}

.review-course-pulse-empty {
  border: 1px dashed rgba(255, 248, 232, 0.18);
  border-radius: 8px;
  background: rgba(255, 248, 232, 0.045);
  color: rgba(255, 248, 232, 0.66);
  padding: 10px;
  font-size: 0.66rem;
  font-weight: 850;
  line-height: 1.35;
}

.review-return-panel {
  display: grid;
  gap: 9px;
  border-color: rgba(125, 249, 199, 0.28);
  background:
    radial-gradient(circle at 12% 8%, rgba(125, 249, 199, 0.16), transparent 34%),
    radial-gradient(circle at 96% 12%, rgba(255, 227, 125, 0.12), transparent 32%),
    linear-gradient(135deg, rgba(4, 54, 55, 0.7), rgba(31, 24, 40, 0.58)),
    rgba(4, 22, 28, 0.5);
}

.review-return-head {
  min-width: 0;
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(220px, 0.78fr);
  align-items: start;
  gap: 10px;
}

.review-return-head span {
  display: block;
  color: rgba(255, 248, 232, 0.58);
  font-size: 0.58rem;
  font-weight: 950;
}

.review-return-head strong {
  display: block;
  margin-top: 2px;
  color: #fff8e8;
  font-size: 1.04rem;
  font-weight: 950;
  line-height: 1.08;
  overflow-wrap: anywhere;
}

.review-return-head small {
  justify-self: end;
  color: #fff1a8;
  font-size: 0.62rem;
  font-weight: 900;
  line-height: 1.28;
  text-align: right;
}

.review-return-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 7px;
}

.review-return-card {
  position: relative;
  min-width: 0;
  min-height: 168px;
  display: grid;
  grid-template-columns: auto minmax(0, 1fr) auto;
  grid-template-rows: auto auto auto auto;
  grid-template-areas:
    "yield main action"
    "bar bar bar"
    "meta meta meta"
    "meta meta meta";
  gap: 8px;
  overflow: hidden;
  border: 1px solid rgba(255, 248, 232, 0.13);
  border-radius: 8px;
  background:
    linear-gradient(90deg, rgba(125, 249, 199, 0.16) var(--review-return-yield, 0%), rgba(255, 248, 232, 0.045) 0),
    rgba(3, 18, 24, 0.58);
  color: #fff8e8;
  padding: 9px;
  font: inherit;
  text-align: left;
  cursor: pointer;
  transition:
    border-color 0.16s ease,
    box-shadow 0.16s ease,
    transform 0.16s ease;
}

.review-return-card.danger {
  border-color: rgba(255, 107, 107, 0.42);
  background:
    linear-gradient(90deg, rgba(255, 107, 107, 0.18) var(--review-return-yield, 0%), rgba(255, 248, 232, 0.04) 0),
    rgba(76, 19, 28, 0.33);
}

.review-return-card.warm {
  border-color: rgba(255, 227, 125, 0.34);
  background:
    linear-gradient(90deg, rgba(255, 227, 125, 0.16) var(--review-return-yield, 0%), rgba(255, 248, 232, 0.04) 0),
    rgba(54, 34, 8, 0.28);
}

.review-return-card.strong {
  border-color: rgba(125, 249, 199, 0.3);
}

.review-return-card:not(:disabled):hover,
.review-return-card:not(:disabled):focus-visible {
  border-color: rgba(255, 248, 232, 0.62);
  outline: none;
  transform: translateY(-1px);
  box-shadow: 0 0 0 3px rgba(125, 249, 199, 0.11);
}

.review-return-card:disabled {
  cursor: default;
  opacity: 0.58;
}

.review-return-yield {
  grid-area: yield;
  display: grid;
  place-items: center;
  align-content: center;
  width: 46px;
  min-height: 46px;
  border: 1px solid rgba(255, 248, 232, 0.12);
  border-radius: 8px;
  background: rgba(0, 0, 0, 0.18);
}

.review-return-yield b {
  color: #fff8e8;
  font-size: 1rem;
  font-weight: 950;
  line-height: 1;
  font-variant-numeric: tabular-nums;
}

.review-return-yield small {
  color: rgba(255, 248, 232, 0.58);
  font-size: 0.5rem;
  font-weight: 950;
  line-height: 1;
}

.review-return-main {
  grid-area: main;
  min-width: 0;
}

.review-return-main strong,
.review-return-main small,
.review-return-meta b,
.review-return-card em {
  display: block;
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.review-return-main strong {
  color: #fff8e8;
  font-size: 0.82rem;
  font-weight: 950;
  line-height: 1.12;
}

.review-return-main small {
  margin-top: 4px;
  color: rgba(255, 248, 232, 0.62);
  font-size: 0.56rem;
  font-weight: 850;
  line-height: 1.18;
}

.review-return-card em {
  grid-area: action;
  align-self: start;
  justify-self: end;
  max-width: 68px;
  border: 1px solid rgba(255, 248, 232, 0.16);
  border-radius: 999px;
  background: rgba(255, 248, 232, 0.08);
  color: #fff1a8;
  padding: 5px 7px;
  font-size: 0.56rem;
  font-style: normal;
  font-weight: 950;
  line-height: 1;
  text-align: center;
}

.review-return-bar {
  grid-area: bar;
  display: flex;
  min-width: 0;
  height: 10px;
  overflow: hidden;
  border-radius: 999px;
  background: rgba(255, 248, 232, 0.09);
  box-shadow: inset 0 0 0 1px rgba(255, 248, 232, 0.07);
}

.review-return-bar span {
  min-width: 0;
  height: 100%;
}

.review-return-bar .overdue {
  background: #ff6b6b;
}

.review-return-bar .today {
  background: #ffe37d;
}

.review-return-bar .weak {
  background: #fb923c;
}

.review-return-bar .soon {
  background: #38bdf8;
}

.review-return-bar .future {
  background: #7df9c7;
}

.review-return-meta {
  grid-area: meta;
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 5px;
}

.review-return-meta b {
  border: 1px solid rgba(255, 248, 232, 0.1);
  border-radius: 7px;
  background: rgba(255, 248, 232, 0.07);
  color: rgba(255, 248, 232, 0.72);
  padding: 5px 6px;
  font-size: 0.52rem;
  font-weight: 900;
  text-align: center;
}

.review-return-empty {
  border: 1px dashed rgba(255, 248, 232, 0.18);
  border-radius: 8px;
  background: rgba(255, 248, 232, 0.045);
  color: rgba(255, 248, 232, 0.66);
  padding: 10px;
  font-size: 0.66rem;
  font-weight: 850;
  line-height: 1.35;
}

.review-next-queue-panel {
  border-color: rgba(56, 189, 248, 0.26);
  background:
    radial-gradient(circle at 88% 10%, rgba(56, 189, 248, 0.18), transparent 34%),
    linear-gradient(135deg, rgba(9, 36, 54, 0.68), rgba(31, 24, 40, 0.56)),
    rgba(4, 22, 28, 0.5);
}

.review-next-head,
.review-next-footer {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: center;
  gap: 10px;
}

.review-next-head span,
.review-next-head small,
.review-next-footer span {
  color: rgba(255, 248, 232, 0.62);
  font-size: 0.58rem;
  font-weight: 950;
  line-height: 1.18;
}

.review-next-head strong {
  display: block;
  margin-top: 3px;
  color: #fff8e8;
  font-size: clamp(1.04rem, 1.45vw, 1.42rem);
  font-weight: 950;
  line-height: 1.05;
}

.review-next-head small {
  color: #fff1a8;
  text-align: right;
}

.review-next-list {
  display: grid;
  gap: 6px;
}

.review-next-row {
  position: relative;
  min-width: 0;
  display: grid;
  grid-template-columns: 32px minmax(0, 1fr) minmax(92px, auto);
  gap: 8px;
  align-items: center;
  overflow: hidden;
  border: 1px solid rgba(255, 248, 232, 0.12);
  border-radius: 8px;
  background:
    linear-gradient(180deg, rgba(255, 248, 232, 0.075), rgba(255, 248, 232, 0.03)),
    rgba(3, 18, 24, 0.58);
  color: #fff8e8;
  padding: 8px 8px 12px;
  font: inherit;
  text-align: left;
  cursor: pointer;
  transition:
    border-color 0.16s ease,
    box-shadow 0.16s ease,
    transform 0.16s ease;
}

.review-next-row::after {
  position: absolute;
  right: 8px;
  bottom: 5px;
  left: 8px;
  height: 4px;
  overflow: hidden;
  border-radius: 999px;
  background:
    linear-gradient(90deg, #7df9c7, #ffe37d 62%, #ff6b6b) 0 0 / var(--review-next-priority, 0%) 100% no-repeat,
    rgba(255, 248, 232, 0.08);
  content: "";
}

.review-next-row.overdue {
  border-color: rgba(255, 107, 107, 0.4);
}

.review-next-row.today {
  border-color: rgba(255, 227, 125, 0.36);
}

.review-next-row.weak {
  border-color: rgba(251, 146, 60, 0.36);
}

.review-next-row.soon {
  border-color: rgba(56, 189, 248, 0.36);
}

.review-next-row:hover,
.review-next-row:focus-visible {
  border-color: rgba(111, 239, 183, 0.74);
  outline: none;
  transform: translateY(-1px);
  box-shadow: 0 0 0 3px rgba(111, 239, 183, 0.1);
}

.review-next-row > b {
  display: grid;
  place-items: center;
  width: 28px;
  height: 28px;
  border-radius: 999px;
  background: rgba(255, 248, 232, 0.1);
  color: #fff1a8;
  font-size: 0.72rem;
  font-weight: 950;
  font-variant-numeric: tabular-nums;
}

.review-next-row > span,
.review-next-row > em {
  min-width: 0;
}

.review-next-row strong,
.review-next-row small,
.review-next-row em,
.review-next-row i {
  display: block;
  min-width: 0;
}

.review-next-row strong {
  color: #fff8e8;
  font-size: 0.78rem;
  font-weight: 950;
  line-height: 1.12;
  overflow-wrap: anywhere;
}

.review-next-row small {
  margin-top: 3px;
  color: rgba(255, 248, 232, 0.6);
  font-size: 0.58rem;
  font-weight: 850;
  line-height: 1.22;
  overflow-wrap: anywhere;
}

.review-next-row em {
  justify-self: end;
  color: #fff1a8;
  font-size: 0.62rem;
  font-style: normal;
  font-weight: 950;
  line-height: 1.12;
  text-align: right;
  white-space: nowrap;
}

.review-next-row em i {
  margin-top: 3px;
  color: rgba(255, 248, 232, 0.58);
  font-size: 0.52rem;
  font-style: normal;
}

.review-next-footer {
  padding: 7px;
  border: 1px solid rgba(255, 241, 168, 0.14);
  border-radius: 7px;
  background: rgba(255, 241, 168, 0.055);
}

.review-next-footer span {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.review-next-start {
  appearance: none;
  min-width: 104px;
  min-height: 34px;
  border: 1px solid rgba(56, 189, 248, 0.42);
  border-radius: 7px;
  background: linear-gradient(135deg, rgba(8, 80, 104, 0.78), rgba(244, 206, 88, 0.16));
  color: #fff8e8;
  font: inherit;
  font-size: 0.7rem;
  font-weight: 950;
  cursor: pointer;
  transition:
    transform 0.16s ease,
    border-color 0.16s ease,
    box-shadow 0.16s ease;
}

.review-next-start:hover,
.review-next-start:focus-visible {
  border-color: rgba(255, 248, 232, 0.55);
  outline: none;
  transform: translateY(-1px);
  box-shadow: 0 0 0 3px rgba(56, 189, 248, 0.12);
}

.review-next-empty {
  min-height: 54px;
  display: grid;
  place-items: center;
  border: 1px dashed rgba(255, 248, 232, 0.16);
  border-radius: 8px;
  color: rgba(255, 248, 232, 0.62);
  font-size: 0.68rem;
  font-weight: 850;
  text-align: center;
}

.review-age-panel {
  border-color: rgba(251, 146, 60, 0.24);
  background:
    radial-gradient(circle at 14% 12%, rgba(251, 146, 60, 0.18), transparent 34%),
    linear-gradient(135deg, rgba(70, 32, 22, 0.62), rgba(6, 50, 54, 0.52)),
    rgba(4, 22, 28, 0.5);
}

.review-age-panel.clear {
  border-color: rgba(111, 239, 183, 0.24);
  background:
    radial-gradient(circle at 14% 12%, rgba(111, 239, 183, 0.15), transparent 34%),
    rgba(4, 54, 55, 0.44);
}

.review-age-panel.danger {
  border-color: rgba(255, 107, 107, 0.36);
  background:
    radial-gradient(circle at 14% 12%, rgba(255, 107, 107, 0.18), transparent 34%),
    linear-gradient(135deg, rgba(95, 24, 28, 0.58), rgba(36, 18, 30, 0.62)),
    rgba(4, 22, 28, 0.5);
}

.review-age-head,
.review-age-next {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: center;
  gap: 10px;
}

.review-age-head span,
.review-age-head small,
.review-age-bucket span,
.review-age-bucket small,
.review-age-next span {
  color: rgba(255, 248, 232, 0.62);
  font-size: 0.58rem;
  font-weight: 950;
  line-height: 1.18;
}

.review-age-head strong {
  display: block;
  margin-top: 3px;
  color: #fff8e8;
  font-size: clamp(1.04rem, 1.45vw, 1.42rem);
  font-weight: 950;
  line-height: 1.05;
}

.review-age-head small {
  max-width: 360px;
  text-align: right;
}

.review-age-buckets {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 7px;
}

.review-age-bucket {
  min-width: 0;
  display: grid;
  gap: 4px;
  padding: 8px;
  border: 1px solid rgba(255, 248, 232, 0.12);
  border-radius: 8px;
  background: rgba(255, 248, 232, 0.06);
}

.review-age-bucket.fresh {
  border-color: rgba(111, 239, 183, 0.24);
}

.review-age-bucket.warm {
  border-color: rgba(255, 227, 125, 0.28);
}

.review-age-bucket.stale {
  border-color: rgba(251, 146, 60, 0.32);
}

.review-age-bucket.old {
  border-color: rgba(255, 107, 107, 0.38);
}

.review-age-bucket strong {
  color: #fff8e8;
  font-size: 0.98rem;
  font-weight: 950;
  line-height: 1;
  font-variant-numeric: tabular-nums;
}

.review-age-bucket small {
  font-size: 0.54rem;
  font-weight: 850;
}

.review-age-bucket i {
  display: block;
  height: 5px;
  overflow: hidden;
  border-radius: 999px;
  background: rgba(255, 248, 232, 0.1);
}

.review-age-bucket i::before {
  display: block;
  width: var(--age-fill, 0%);
  height: 100%;
  border-radius: inherit;
  background: linear-gradient(90deg, #7df9c7, #ffe37d);
  content: "";
}

.review-age-bucket.stale i::before {
  background: linear-gradient(90deg, #f59e0b, #ffe37d);
}

.review-age-bucket.old i::before {
  background: linear-gradient(90deg, #dc2626, #ff9f9f);
}

.review-age-next {
  padding: 7px;
  border: 1px solid rgba(255, 241, 168, 0.14);
  border-radius: 7px;
  background: rgba(255, 241, 168, 0.055);
}

.review-age-next span {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.review-age-start {
  appearance: none;
  min-width: 110px;
  min-height: 34px;
  border: 1px solid rgba(251, 146, 60, 0.42);
  border-radius: 7px;
  background: linear-gradient(135deg, rgba(127, 45, 18, 0.76), rgba(244, 206, 88, 0.16));
  color: #fff8e8;
  font: inherit;
  font-size: 0.7rem;
  font-weight: 950;
  cursor: pointer;
  transition:
    transform 0.16s ease,
    border-color 0.16s ease,
    box-shadow 0.16s ease;
}

.review-age-start.clear {
  border-color: rgba(111, 239, 183, 0.36);
  background: linear-gradient(135deg, rgba(17, 94, 89, 0.72), rgba(244, 206, 88, 0.12));
}

.review-age-start.danger {
  border-color: rgba(255, 107, 107, 0.42);
  background: linear-gradient(135deg, rgba(127, 29, 29, 0.78), rgba(244, 206, 88, 0.14));
}

.review-age-start:disabled {
  cursor: default;
  opacity: 0.56;
}

.review-age-start:not(:disabled):hover,
.review-age-start:not(:disabled):focus-visible {
  border-color: rgba(255, 248, 232, 0.55);
  outline: none;
  transform: translateY(-1px);
  box-shadow: 0 0 0 3px rgba(251, 146, 60, 0.12);
}

.review-recovery-panel {
  display: grid;
  gap: 8px;
  border: 1px solid rgba(255, 248, 232, 0.1);
  border-radius: 8px;
  background:
    linear-gradient(135deg, rgba(255, 248, 232, 0.07), rgba(255, 248, 232, 0.02)),
    rgba(0, 0, 0, 0.14);
  padding: 9px;
}

.review-recovery-panel.danger {
  border-color: rgba(255, 107, 107, 0.28);
  background:
    radial-gradient(circle at 14% 12%, rgba(255, 107, 107, 0.16), transparent 38%),
    rgba(54, 15, 24, 0.3);
}

.review-recovery-panel.clear {
  border-color: rgba(111, 239, 183, 0.22);
  background:
    radial-gradient(circle at 14% 12%, rgba(111, 239, 183, 0.12), transparent 38%),
    rgba(5, 42, 42, 0.28);
}

.review-recovery-head {
  display: flex;
  align-items: start;
  justify-content: space-between;
  gap: 10px;
}

.review-recovery-head span,
.review-recovery-head small,
.review-recovery-clear {
  color: rgba(255, 248, 232, 0.64);
  font-size: 0.58rem;
  font-weight: 850;
  line-height: 1.25;
}

.review-recovery-head span {
  display: block;
  font-weight: 950;
}

.review-recovery-head strong {
  display: block;
  margin-top: 2px;
  color: #fff8e8;
  font-size: 0.92rem;
  font-weight: 950;
  line-height: 1.05;
}

.review-recovery-head small {
  max-width: 42%;
  text-align: right;
}

.review-recovery-groups {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 6px;
}

.review-recovery-group,
.review-recovery-start {
  appearance: none;
  min-width: 0;
  border: 1px solid rgba(255, 241, 168, 0.18);
  border-radius: 7px;
  background: rgba(255, 241, 168, 0.07);
  color: #fff8e8;
  font: inherit;
  cursor: pointer;
  transition:
    transform 0.16s ease,
    border-color 0.16s ease,
    box-shadow 0.16s ease;
}

.review-recovery-group {
  display: grid;
  gap: 3px;
  padding: 7px;
  text-align: left;
}

.review-recovery-group span,
.review-recovery-group strong,
.review-recovery-group small {
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.review-recovery-group span {
  color: rgba(255, 248, 232, 0.58);
  font-size: 0.52rem;
  font-weight: 950;
}

.review-recovery-group strong {
  color: #fff1a8;
  font-size: 0.9rem;
  font-weight: 950;
  font-variant-numeric: tabular-nums;
}

.review-recovery-group small {
  color: rgba(255, 248, 232, 0.62);
  font-size: 0.52rem;
  font-weight: 850;
}

.review-recovery-start {
  min-height: 34px;
  justify-self: stretch;
  background: linear-gradient(135deg, rgba(255, 107, 107, 0.22), rgba(255, 241, 168, 0.1));
  font-size: 0.68rem;
  font-weight: 950;
}

.review-recovery-group:hover,
.review-recovery-group:focus-visible,
.review-recovery-start:not(:disabled):hover,
.review-recovery-start:not(:disabled):focus-visible {
  border-color: rgba(255, 241, 168, 0.58);
  outline: none;
  transform: translateY(-1px);
  box-shadow: 0 0 0 3px rgba(255, 241, 168, 0.08);
}

.review-recovery-start:disabled {
  cursor: default;
  opacity: 0.55;
}

.review-history-list {
  display: grid;
  gap: 7px;
}

.review-history-row {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 44px;
  gap: 8px;
  align-items: center;
  border: 1px solid rgba(255, 248, 232, 0.1);
  border-radius: 7px;
  background: rgba(255, 248, 232, 0.06);
  padding: 7px 8px;
}

.review-history-row.perfect {
  border-color: rgba(125, 249, 199, 0.26);
  background:
    radial-gradient(circle at 12% 18%, rgba(125, 249, 199, 0.12), transparent 42%),
    rgba(255, 248, 232, 0.06);
}

.review-history-row.has-wrong {
  border-color: rgba(255, 184, 107, 0.24);
}

.review-history-main {
  min-width: 0;
  display: grid;
  gap: 4px;
}

.review-history-row strong,
.review-history-row span {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.review-history-row strong {
  color: #fff8e8;
  font-size: 0.72rem;
  line-height: 1.1;
}

.review-history-row span {
  color: rgba(255, 248, 232, 0.62);
  font-size: 0.6rem;
  font-weight: 850;
}

.review-history-row i {
  display: block;
  height: 6px;
  max-width: 100%;
  border-radius: 999px;
  background: linear-gradient(90deg, #ffb86b, #7df9c7);
}

.review-history-row b {
  display: inline-grid;
  place-items: center;
  width: 44px;
  height: 30px;
  border: 1px solid rgba(255, 241, 168, 0.22);
  border-radius: 7px;
  color: #fff1a8;
  background: rgba(0, 0, 0, 0.16);
  font-size: 0.72rem;
  font-weight: 950;
}

.review-history-actions {
  grid-column: 1 / -1;
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}

.review-history-action {
  min-height: 28px;
  border: 1px solid rgba(255, 241, 168, 0.24);
  border-radius: 7px;
  background: rgba(255, 241, 168, 0.08);
  color: #fff8e8;
  padding: 0 10px;
  font-size: 0.62rem;
  font-weight: 950;
  cursor: pointer;
}

.review-history-action.danger {
  border-color: rgba(255, 184, 107, 0.34);
  background: rgba(255, 184, 107, 0.12);
  color: #ffe2c2;
}

.review-history-action:disabled {
  cursor: default;
  opacity: 0.38;
}

.review-history-action:not(:disabled):hover,
.review-history-action:not(:disabled):focus-visible {
  transform: translateY(-1px);
  border-color: rgba(125, 249, 199, 0.48);
  box-shadow: 0 8px 18px rgba(0, 0, 0, 0.18);
}

.study-summary-panel .study-running-context {
  min-height: 34px;
  padding: 8px 12px;
  font-size: 0.86rem;
}

.study-summary-panel .study-report-tabs,
.study-summary-panel .study-backup-actions {
  gap: 8px;
}

.study-summary-panel .study-report-tab,
.study-summary-panel .study-backup-button,
.study-summary-panel .study-sync-status {
  min-height: 36px;
  font-size: 0.82rem;
}

.study-summary-panel .study-report-list {
  max-height: none;
  min-height: 0;
  overflow: hidden;
  gap: 7px;
}

.study-summary-panel .study-report-row {
  min-height: 44px;
  padding: 8px 10px;
}

.study-summary-panel .study-report-row strong,
.study-summary-panel .study-report-row time {
  font-size: 0.88rem;
}

.study-summary-panel .study-report-row span {
  font-size: 0.7rem;
}

.study-summary-panel .review-curve-summary {
  gap: 13px;
  padding: 14px;
  border-color: rgba(111, 239, 183, 0.42);
}

.study-summary-panel .review-curve-headline {
  gap: 5px;
}

.study-summary-panel .review-curve-headline > span:first-child {
  color: #ffe37d;
  font-size: 0.66rem;
  font-weight: 950;
}

.study-summary-panel .review-curve-headline strong {
  font-size: clamp(1.32rem, 2.25vw, 2.35rem);
  line-height: 1.02;
}

.study-summary-panel .review-curve-headline span,
.study-summary-panel .review-curve-plot p,
.study-summary-panel .review-curve-warning {
  font-size: 0.78rem;
}

.study-summary-panel .review-curve-stats {
  grid-template-columns: repeat(6, minmax(0, 1fr));
  gap: 9px;
}

.study-summary-panel .review-curve-stats > div {
  padding: 8px;
}

.study-summary-panel .review-curve-stats span {
  font-size: 0.62rem;
}

.study-summary-panel .review-curve-stats strong {
  font-size: 1.05rem;
}

.study-summary-panel .review-forgetting-curve {
  min-height: 300px;
}

.study-summary-panel .review-session-planner {
  gap: 10px;
  padding: 12px;
}

.study-summary-panel .review-session-head strong {
  font-size: 1.05rem;
}

.study-summary-panel .review-session-chip {
  min-height: 36px;
  font-size: 0.74rem;
}

.study-summary-panel .review-curriculum-list {
  max-height: 260px;
  min-height: 72px;
  overflow: auto;
  gap: 7px;
  padding-right: 0;
}

.study-summary-panel .review-curriculum-row {
  min-height: 58px;
  padding: 8px;
}

.study-summary-panel .review-curriculum-main strong {
  font-size: 0.88rem;
}

.study-summary-panel .review-curriculum-meta span {
  min-height: 22px;
  font-size: 0.66rem;
}

.study-summary-panel .review-curriculum-start {
  min-width: 60px;
  min-height: 38px;
  font-size: 0.78rem;
}

@media (min-width: 1480px) {
  .study-summary-panel .review-curriculum-list {
    max-height: clamp(300px, 34dvh, 460px);
  }

  .study-summary-panel .review-curve-stats {
    grid-template-columns: repeat(6, minmax(0, 1fr));
  }
}

@media (max-width: 1100px) {
  .study-summary-layout {
    grid-template-columns: 1fr;
    grid-auto-rows: max-content;
    align-content: start;
    height: 100%;
    overflow: auto;
  }

  .executive-study-report {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .executive-study-report > *,
  .study-summary-panel .study-insight-grid,
  .study-summary-panel .study-efficiency-panel,
  .study-summary-panel .study-action-plan,
  .study-summary-panel .study-checkpoint-panel,
  .study-summary-panel .study-route-panel,
  .study-summary-panel .study-week-strip,
  .study-summary-panel .study-rhythm-map,
  .study-summary-panel .study-continuity-panel,
  .study-summary-panel .study-forecast-panel,
  .study-summary-panel .review-outlook-panel,
  .study-summary-panel .review-calendar-panel,
  .study-summary-panel .review-dial-panel,
  .study-summary-panel .review-sprint-panel,
  .study-summary-panel .review-focus-panel,
  .study-summary-panel .review-coach-panel,
  .study-summary-panel .review-momentum-panel,
  .study-summary-panel .review-command-deck-panel,
  .study-summary-panel .review-set-blueprint-panel,
  .study-summary-panel .review-outcome-panel,
  .study-summary-panel .review-course-pulse-panel,
  .study-summary-panel .review-return-panel,
  .study-summary-panel .review-next-queue-panel,
  .study-summary-panel .review-recovery-panel,
  .study-summary-panel .exam-readiness-panel,
  .study-summary-panel .study-course-matrix,
  .study-summary-panel .review-mastery-track,
  .study-summary-panel .understanding-summary,
  .study-summary-panel .weakness-panel,
  .study-summary-panel .review-session-history,
  .study-summary-panel .study-running-context,
  .study-summary-panel .study-report-tabs,
  .study-summary-panel .study-backup-actions,
  .study-summary-panel .study-backup-status,
  .study-summary-panel .study-report-list {
    grid-column: 1 / -1;
  }

  .study-summary-panel .study-report-summary,
  .study-summary-panel .study-effort {
    grid-column: span 1;
  }

  .study-summary-panel .review-momentum-panel {
    order: -1;
  }

  .study-summary-panel .review-command-deck-panel {
    order: -1;
  }

  .study-summary-panel .review-set-blueprint-panel {
    order: -1;
  }

  .study-summary-panel .review-outcome-panel {
    order: -1;
  }

  .study-summary-panel .review-course-pulse-panel {
    order: -1;
  }

  .study-summary-panel .review-return-panel {
    order: -1;
  }

  .study-summary-panel .review-next-queue-panel {
    order: -1;
  }

  .study-summary-panel .review-age-panel {
    order: -1;
  }

  .executive-study-report,
  .study-summary-review {
    min-height: auto;
    overflow: visible;
  }

  .study-summary-review {
    grid-template-rows: auto auto auto;
  }
}

.periodic-stage .periodic-element-button {
  width: auto;
  min-width: 42px;
  height: clamp(54px, 4.9vw, 70px);
  min-height: 54px;
  padding: 4px;
}

.periodic-stage .periodic-symbol {
  font-size: clamp(0.9rem, 1.28vw, 1.18rem);
}

.periodic-stage .periodic-name {
  font-size: clamp(0.48rem, 0.68vw, 0.62rem);
}

.quiz-panel {
  align-self: stretch;
  min-width: 0;
  min-height: 0;
  height: 100%;
  display: grid;
  grid-template-rows: minmax(132px, 0.9fr) auto auto auto minmax(220px, 1.1fr);
  gap: 11px;
  position: relative;
  overflow: hidden;
  padding: clamp(13px, 1.1vw, 20px);
  border: 3px solid var(--line);
  border-radius: 8px;
  background:
    linear-gradient(180deg, rgba(35, 14, 25, 0.76), rgba(5, 37, 39, 0.82)),
    var(--academy-bg) center center / cover no-repeat,
    linear-gradient(180deg, rgba(56, 24, 35, 0.74), rgba(10, 45, 47, 0.74)),
    rgba(20, 14, 18, 0.82);
  background-blend-mode: normal, soft-light, normal, normal;
  box-shadow: var(--shadow);
  color: #fff8e8;
  backdrop-filter: blur(2px);
}

.quiz-panel.long-question-layout:not(.source-layout):not(.review-layout) {
  grid-template-rows: minmax(300px, 1.35fr) auto auto auto minmax(120px, 0.65fr);
}

.quiz-panel.long-question-layout:not(.source-layout):not(.review-layout) .question-board {
  grid-template-rows: auto auto max-content;
  overflow: hidden auto;
  overscroll-behavior: contain;
}

.quiz-panel.long-question-layout:not(.source-layout):not(.review-layout) .answer-dock {
  min-height: 0;
}

.quiz-panel.source-layout {
  grid-template-rows: minmax(132px, 0.9fr) auto auto auto minmax(220px, 1.1fr);
  align-content: start;
  align-self: stretch;
  height: 100%;
  max-height: 100%;
  overflow-x: hidden;
  overflow-y: hidden;
}

.quiz-panel.source-layout:not(.review-layout) {
  display: flex;
  flex-direction: column;
  align-items: stretch;
  justify-content: flex-start;
  min-height: 0;
}

.playfield > .quiz-panel.source-layout {
  height: var(--source-panel-height, auto);
  min-height: 0;
  max-height: var(--source-panel-height, 100%);
}

.quiz-panel.quiz-custom-layout:not(.review-layout) {
  align-content: stretch;
  overflow-x: hidden;
  overflow-y: auto;
  grid-template-rows:
    minmax(0, var(--quiz-question-size))
    auto
    auto
    auto
    minmax(220px, var(--quiz-answer-size));
}

.quiz-panel.quiz-custom-layout:not(.review-layout) .question-board,
.quiz-panel.quiz-custom-layout:not(.review-layout) .answer-dock {
  min-height: 0;
  height: 100%;
  max-height: 100%;
  overflow: auto;
}

.quiz-panel.quiz-custom-layout.source-layout:not(.review-layout) .question-board {
  grid-template-rows: auto auto auto;
}

.quiz-panel.quiz-custom-layout.source-layout:not(.review-layout) {
  display: flex;
  flex-direction: column;
}

.quiz-panel.quiz-custom-layout.source-layout:not(.review-layout) .question-text.html-question {
  height: auto;
  max-height: none;
  overflow: visible;
}

.quiz-panel::before {
  content: "";
  position: absolute;
  inset: 7px;
  border: 1px solid rgba(255, 241, 168, 0.42);
  border-radius: 5px;
  pointer-events: none;
  box-shadow:
    inset 0 0 34px rgba(244, 206, 88, 0.14),
    0 0 22px rgba(244, 206, 88, 0.08);
}

.quiz-panel.review-layout,
.quiz-panel.source-layout.review-layout {
  --review-question-size: 0.36fr;
  --review-answers-size: 1.1fr;
  --review-feedback-size: 1.54fr;
  align-content: stretch;
  overflow: hidden;
  grid-template-rows:
    minmax(0, var(--review-question-size))
    auto
    auto
    minmax(0, var(--review-answers-size))
    minmax(0, var(--review-feedback-size));
}

.quiz-panel.review-layout.long-question-layout {
  --review-question-size: 1.6fr;
  --review-answers-size: 0.9fr;
  --review-feedback-size: 0.72fr;
}

.quiz-panel.review-layout .question-board,
.quiz-panel.review-layout .answer-dock,
.quiz-panel.review-layout .feedback {
  min-height: 0;
  height: 100%;
  max-height: 100%;
  overflow: auto;
}

.quiz-panel.review-layout .feedback {
  padding-bottom: calc(18px + env(safe-area-inset-bottom));
  scroll-padding-bottom: 18px;
  overscroll-behavior: contain;
  -webkit-overflow-scrolling: touch;
  touch-action: pan-y;
}

.quiz-panel.review-layout .question-board {
  grid-template-rows: auto auto minmax(0, 1fr);
}

.quiz-panel.review-layout.long-question-layout .question-board {
  overflow: hidden auto;
  overscroll-behavior: contain;
}

.quiz-panel.review-layout .question-text {
  min-height: 0;
}

@media (min-width: 981px) {
  .quiz-panel.review-layout .answer-dock .options:has(.option-item.has-explanation) {
    height: auto;
    align-content: start;
    min-height: 0;
    max-height: 100%;
    overflow-y: auto;
    grid-auto-rows: auto;
    grid-template-rows: none;
  }

  .quiz-panel.review-layout .answer-dock .option-item.has-explanation {
    min-height: auto;
    grid-template-rows: auto auto;
  }

  .quiz-panel.review-layout .answer-dock .option-item.has-explanation .option-button {
    align-self: start;
  }

  .quiz-panel.review-layout .answer-dock .option-explanation-card {
    display: block;
    height: auto;
    max-height: min(24vh, 260px);
    overflow: auto;
  }

  .quiz-panel.review-layout .answer-dock .option-explanation-body {
    max-height: none;
    overflow-x: auto;
    overflow-y: visible;
  }
}

.quiz-resize-handle {
  position: relative;
  z-index: 6;
  min-height: 11px;
  margin: -4px 4px;
  cursor: row-resize;
  touch-action: none;
}

.quiz-resize-handle::before {
  content: "";
  position: absolute;
  top: 50%;
  right: 0;
  left: 0;
  height: 5px;
  border: 1px solid rgba(255, 241, 168, 0.22);
  border-radius: 999px;
  background:
    linear-gradient(90deg, transparent, rgba(255, 241, 168, 0.56), transparent),
    rgba(4, 21, 26, 0.62);
  box-shadow:
    inset 0 1px 0 rgba(255, 248, 232, 0.14),
    0 0 12px rgba(244, 206, 88, 0.12);
  transform: translateY(-50%);
}

.quiz-resize-handle:hover::before,
.quiz-resize-handle:focus-visible::before,
.quiz-panel.quiz-resizing .quiz-resize-handle::before {
  border-color: rgba(255, 241, 168, 0.62);
  background:
    linear-gradient(90deg, rgba(0, 214, 214, 0.1), rgba(255, 241, 168, 0.88), rgba(0, 214, 214, 0.1)),
    rgba(4, 34, 38, 0.76);
  box-shadow:
    inset 0 1px 0 rgba(255, 248, 232, 0.22),
    0 0 18px rgba(255, 227, 125, 0.32);
}

.quiz-panel.review-layout .quiz-resize-handle {
  display: none;
}

body.quiz-resizing,
body.quiz-resizing * {
  cursor: row-resize !important;
  user-select: none !important;
}

.result-burst {
  position: fixed;
  inset: 50% auto auto 50%;
  z-index: 1000;
  display: grid;
  place-items: center;
  width: min(calc(100vw - 32px), 960px);
  min-height: clamp(118px, 18vh, 210px);
  max-height: calc(100vh - 32px);
  overflow: hidden;
  pointer-events: none;
  opacity: 0;
  translate: -50% -50%;
  transform: scale(0.72) rotate(-4deg);
}

.result-burst::before,
.result-burst::after {
  content: "";
  position: absolute;
  inset: 0;
  border-radius: 16px;
  pointer-events: none;
}

.result-burst::before {
  background:
    radial-gradient(circle at 50% 50%, rgba(255, 248, 232, 0.9), rgba(255, 206, 75, 0.36) 30%, transparent 57%),
    repeating-conic-gradient(from 0deg, rgba(255, 218, 86, 0.34) 0deg 9deg, transparent 9deg 18deg);
}

.result-burst::after {
  inset: 14%;
  border: 2px solid rgba(255, 241, 168, 0.58);
  background: rgba(18, 11, 17, 0.46);
  box-shadow:
    0 0 34px rgba(255, 212, 95, 0.32),
    inset 0 0 38px rgba(255, 248, 232, 0.1);
}

.result-burst span {
  position: relative;
  z-index: 2;
  color: #ef2f21;
  font-size: clamp(3.4rem, 8vw, 7.6rem);
  font-weight: 900;
  line-height: 0.9;
  text-align: center;
  text-shadow:
    0 5px 0 #fff4c0,
    0 10px 0 #7f1d1d,
    0 0 24px rgba(255, 229, 127, 0.9),
    0 0 54px rgba(255, 91, 72, 0.72);
}

.result-burst small {
  position: relative;
  z-index: 2;
  display: block;
  margin-top: 8px;
  color: #fff8e8;
  font-size: clamp(1rem, 1.65vw, 1.7rem);
  font-weight: 900;
  text-shadow: 0 3px 0 rgba(0, 0, 0, 0.42);
}

.result-burst.show {
  animation: resultBurstIn 3800ms cubic-bezier(0.16, 1, 0.3, 1) both;
}

.result-burst.result-wrong span {
  color: #75c8ff;
  text-shadow:
    0 5px 0 #e5f7ff,
    0 10px 0 #16315f,
    0 0 26px rgba(120, 210, 255, 0.86),
    0 0 58px rgba(70, 100, 255, 0.64);
}

.result-burst.result-wrong::before {
  background:
    radial-gradient(circle at 50% 50%, rgba(229, 247, 255, 0.84), rgba(75, 135, 255, 0.36) 30%, transparent 57%),
    repeating-conic-gradient(from 0deg, rgba(114, 202, 255, 0.26) 0deg 9deg, transparent 9deg 18deg);
}

.result-burst.result-timeout span {
  color: #f8d879;
  text-shadow:
    0 5px 0 #4b1820,
    0 10px 0 #111820,
    0 0 24px rgba(255, 83, 67, 0.72);
}

.result-burst.hidden {
  display: none;
}

@keyframes resultBurstIn {
  0% {
    opacity: 0;
    transform: scale(0.68) rotate(-6deg);
    filter: brightness(1.7);
  }

  18% {
    opacity: 1;
    transform: scale(1.04) rotate(1.5deg);
  }

  34% {
    transform: scale(0.96) rotate(0deg);
  }

  84% {
    opacity: 1;
    transform: scale(1) rotate(0deg);
  }

  100% {
    opacity: 0;
    transform: scale(1.04) rotate(0deg);
  }
}

.rank-card,
.time-card,
.format-card {
  border: 1px solid #c7922f;
  border-radius: 8px;
  background:
    linear-gradient(180deg, rgba(62, 28, 39, 0.95), rgba(8, 53, 54, 0.95));
  color: #fff8e8;
  padding: 6px 8px;
  min-height: 46px;
  box-shadow: inset 0 0 0 1px rgba(255, 248, 232, 0.08);
}

.topbar .rank-card,
.topbar .format-card {
  display: grid;
  align-content: center;
  min-height: var(--topbar-control-height);
  height: 100%;
}

.time-card {
  position: relative;
  overflow: hidden;
  min-height: 14px;
  padding: 0;
  border-radius: 999px;
  background:
    linear-gradient(180deg, rgba(62, 28, 39, 0.95), rgba(8, 53, 54, 0.95));
}

.time-card::after {
  content: "";
  position: absolute;
  pointer-events: none;
}

.time-card::after {
  inset: 0;
  z-index: 4;
  background:
    linear-gradient(115deg, transparent 0 34%, rgba(255, 255, 255, 0.08) 48%, transparent 62%);
  mix-blend-mode: screen;
  opacity: 0.42;
  animation: timerSheen 9s ease-in-out infinite alternate;
}

.rank-card span,
.time-card > span,
.format-card span,
.side-stats span {
  display: block;
  color: #ffe37d;
  font-size: 0.64rem;
  font-weight: 900;
}

.rank-card strong,
.time-card strong,
.format-card strong,
.side-stats strong {
  display: block;
  margin-top: 1px;
  font-size: 0.94rem;
  line-height: 1.1;
}

.time-card > span {
  display: none;
}

.time-card strong {
  position: absolute;
  right: 8px;
  top: calc(50% - 1px);
  bottom: auto;
  z-index: 5;
  display: inline-grid;
  place-items: center;
  height: 12px;
  min-width: 28px;
  transform: translateY(-50%);
  color: #fff1a8;
  font-size: 0.72rem;
  font-variant-numeric: tabular-nums;
  line-height: 1;
  text-align: center;
  text-shadow:
    0 0 4px rgba(0, 0, 0, 0.72),
    0 0 7px rgba(255, 225, 110, 0.46);
}

.time-card .timer-track {
  position: absolute;
  inset: 0;
  z-index: 1;
  height: auto;
  border: 0;
  border-radius: inherit;
  background:
    linear-gradient(180deg, rgba(255, 248, 232, 0.08), rgba(255, 248, 232, 0)),
    rgba(255, 248, 232, 0.1);
  box-shadow:
    inset 0 0 0 1px rgba(255, 248, 232, 0.08),
    inset 0 0 12px rgba(0, 0, 0, 0.34);
}

.time-card .timer-track span {
  position: relative;
  overflow: hidden;
  background:
    linear-gradient(90deg, #ff3864, #ff8a00, #ffe45e, #31d158, #00d4ff, #706bff, #ff4dcb, #ff3864);
  background-size: 280% 100%;
  box-shadow:
    0 0 10px rgba(255, 220, 104, 0.46),
    inset 0 0 6px rgba(255, 255, 255, 0.42);
  animation: timerRainbow 8s linear infinite;
}

.time-card .timer-track span.danger {
  background: linear-gradient(90deg, #ff1f1f, #ff7a00, #ff1f1f);
  background-size: 190% 100%;
  box-shadow:
    0 0 34px rgba(255, 32, 32, 0.86),
    0 0 62px rgba(255, 0, 0, 0.4),
    inset 0 0 14px rgba(255, 255, 255, 0.38);
  animation:
    timerDanger 0.9s ease-in-out infinite alternate,
    timerRainbow 3s linear infinite;
}

.time-card.timer-disabled {
  display: none;
  border-color: rgba(255, 248, 232, 0.26);
  background: linear-gradient(180deg, rgba(42, 35, 39, 0.8), rgba(21, 36, 38, 0.78));
}

.time-card.timer-disabled strong {
  color: rgba(255, 248, 232, 0.74);
  text-shadow: none;
}

.time-card.timer-disabled .timer-track span {
  width: 0%;
  animation: none;
  box-shadow: none;
}

.time-card:has(.timer-track span.danger) {
  border-color: #ff6b4a;
  box-shadow:
    inset 0 0 0 1px rgba(255, 248, 232, 0.08),
    0 0 26px rgba(255, 50, 32, 0.34);
}

@keyframes timerRainbow {
  from {
    background-position: 0% 50%;
  }

  to {
    background-position: 280% 50%;
  }
}

@keyframes timerSheen {
  from {
    transform: translateX(-18%);
  }

  to {
    transform: translateX(18%);
  }
}

@keyframes timerDanger {
  from {
    filter: saturate(1) brightness(1);
  }

  to {
    filter: saturate(1.45) brightness(1.3);
  }
}

.question-board {
  position: relative;
  z-index: 3;
  display: grid;
  grid-template-rows: auto auto minmax(116px, 1fr);
  gap: 10px;
  min-height: 0;
  border: 2px solid #c7922f;
  border-radius: 8px;
  background:
    linear-gradient(180deg, rgba(7, 11, 17, 0.86), rgba(5, 26, 30, 0.9)),
    var(--academy-bg) center 34% / cover no-repeat,
    linear-gradient(180deg, rgba(35, 26, 34, 0.94), rgba(18, 28, 33, 0.92));
  background-blend-mode: normal, soft-light, normal;
  padding: clamp(12px, 1vw, 18px);
  box-shadow:
    inset 0 0 0 1px rgba(255, 248, 232, 0.1),
    inset 0 0 48px rgba(0, 0, 0, 0.22);
  align-content: start;
}

.question-board.advance-ready,
.answer-dock.advance-ready,
.feedback.advance-ready {
  cursor: pointer;
}

.quiz-panel.wheel-scroll-mode .question-text.html-question,
.quiz-panel.wheel-scroll-mode .feedback {
  overscroll-behavior: contain;
}

.question-head {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-bottom: 0;
  align-items: center;
  justify-content: flex-start;
}

.question-source-button {
  display: inline-flex;
  min-height: 24px;
  align-items: center;
  gap: 4px;
  border: 0;
  background: transparent;
  padding: 2px 4px;
  color: rgba(203, 239, 247, 0.78);
  font: inherit;
  font-size: 0.62rem;
  font-weight: 800;
  text-decoration: underline;
  text-decoration-color: rgba(103, 231, 242, 0.48);
  text-underline-offset: 3px;
  cursor: pointer;
}

.question-source-button[hidden],
.question-source-external[hidden] {
  display: none;
}

.question-source-button:hover {
  color: #f8fcff;
  text-decoration-color: #67e7f2;
}

.question-source-button:focus-visible {
  border-radius: 4px;
  outline: 2px solid #ffe681;
  outline-offset: 2px;
}

.question-source-button svg {
  width: 12px;
  height: 12px;
}

.question-source-dialog {
  width: min(calc(100vw - 28px), 560px);
  max-width: 560px;
  border: 1px solid rgba(103, 231, 242, 0.5);
  border-radius: 10px;
  background: rgba(3, 16, 29, 0.97);
  padding: 0;
  color: #f8fcff;
  box-shadow: 0 24px 72px rgba(0, 0, 0, 0.58);
}

.question-source-dialog::backdrop {
  background: rgba(1, 8, 15, 0.68);
  backdrop-filter: blur(3px);
}

.question-source-dialog-card > header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  border-bottom: 1px solid rgba(103, 231, 242, 0.18);
  padding: 13px 14px 11px;
}

.question-source-dialog-card > header > div {
  display: grid;
  gap: 2px;
}

.question-source-dialog-card header small {
  color: rgba(103, 231, 242, 0.72);
  font-size: 0.58rem;
  font-weight: 900;
  letter-spacing: 0.1em;
}

.question-source-dialog-card header strong {
  font-size: 0.98rem;
}

.question-source-close {
  display: grid;
  width: 32px;
  height: 32px;
  flex: 0 0 32px;
  place-items: center;
  border: 1px solid rgba(255, 255, 255, 0.16);
  border-radius: 7px;
  background: rgba(255, 255, 255, 0.06);
  color: #f8fcff;
  cursor: pointer;
}

.question-source-close span {
  font-size: 1.2rem;
  line-height: 1;
}

.question-source-dialog-body {
  display: grid;
  gap: 12px;
  padding: 16px;
}

.question-source-title,
.question-source-usage {
  margin: 0;
  line-height: 1.7;
}

.question-source-title {
  color: #fff3b0;
  font-size: 0.9rem;
  font-weight: 850;
}

.question-source-usage {
  color: rgba(238, 249, 252, 0.78);
  font-size: 0.78rem;
}

.question-source-external {
  display: inline-flex;
  width: fit-content;
  align-items: center;
  gap: 6px;
  color: #78eaf4;
  font-size: 0.78rem;
  font-weight: 800;
  text-underline-offset: 3px;
}

.question-source-external svg {
  width: 14px;
  height: 14px;
}

@media (max-width: 720px) {
  .question-source-button {
    min-height: 22px;
    font-size: 0.58rem;
  }

  .question-source-dialog-body {
    padding: 14px;
  }
}

.chapter-resources {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(136px, 1fr));
  gap: 7px;
  width: min(100%, 980px);
}

.chapter-resources.hidden {
  display: none;
}

.chapter-resource-card {
  min-width: 0;
  display: grid;
  grid-template-columns: auto minmax(0, 1fr);
  grid-template-areas:
    "icon kind"
    "icon title"
    "icon provider";
  column-gap: 8px;
  row-gap: 1px;
  align-items: center;
  overflow: hidden;
  border: 1px solid rgba(255, 248, 232, 0.15);
  border-radius: 8px;
  background:
    linear-gradient(135deg, rgba(255, 248, 232, 0.12), rgba(255, 248, 232, 0.035)),
    rgba(5, 18, 24, 0.72);
  padding: 7px 8px;
  color: #fff8e8;
  text-decoration: none;
  box-shadow: inset 0 1px 0 rgba(255, 248, 232, 0.08);
}

.chapter-resource-card:hover {
  border-color: color-mix(in srgb, var(--active) 62%, #fff8e8);
  transform: translateY(-1px);
}

.chapter-resource-card svg {
  grid-area: icon;
  width: 18px;
  height: 18px;
  color: var(--active);
}

.chapter-resource-card span,
.chapter-resource-card strong,
.chapter-resource-card small {
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.chapter-resource-card span {
  grid-area: kind;
  color: rgba(255, 248, 232, 0.62);
  font-size: 0.58rem;
  font-weight: 950;
  line-height: 1;
}

.chapter-resource-card strong {
  grid-area: title;
  font-size: 0.78rem;
  font-weight: 950;
  line-height: 1.05;
}

.chapter-resource-card small {
  grid-area: provider;
  color: rgba(255, 248, 232, 0.58);
  font-size: 0.58rem;
  font-weight: 850;
  line-height: 1.05;
}

.review-session-hud {
  display: grid;
  gap: 7px;
  width: min(100%, 980px);
  border: 1px solid rgba(111, 239, 183, 0.36);
  border-radius: 8px;
  padding: 9px 10px;
  background:
    linear-gradient(90deg, rgba(37, 88, 72, 0.66), rgba(34, 38, 48, 0.52)),
    rgba(12, 20, 24, 0.62);
  box-shadow:
    inset 0 1px 0 rgba(255, 248, 232, 0.12),
    0 10px 24px rgba(0, 0, 0, 0.14);
}

.review-session-hud.hidden {
  display: none;
}

.review-session-hud-head {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 10px;
}

.review-session-hud-head div {
  display: grid;
  gap: 2px;
  min-width: 0;
}

.review-session-hud-head span {
  color: rgba(166, 255, 215, 0.82);
  font-size: 0.58rem;
  font-weight: 950;
  line-height: 1;
}

.review-session-hud-head strong {
  color: #fff8e8;
  font-size: 0.9rem;
  font-weight: 950;
  line-height: 1.08;
}

.review-session-hud-head small {
  flex: 0 0 auto;
  color: rgba(255, 230, 149, 0.92);
  font-size: 0.7rem;
  font-weight: 900;
  line-height: 1.1;
  text-align: right;
}

.review-session-hud-progress {
  overflow: hidden;
  height: 8px;
  border: 1px solid rgba(255, 248, 232, 0.1);
  border-radius: 999px;
  background: rgba(0, 0, 0, 0.24);
}

.review-session-hud-progress span {
  display: block;
  height: 100%;
  border-radius: inherit;
  background: linear-gradient(90deg, #6fefb7, #ffe26a);
  box-shadow: 0 0 16px rgba(111, 254, 183, 0.36);
}

.review-session-hud-grid {
  display: flex;
  flex-wrap: wrap;
  gap: 5px;
}

.review-session-hud-grid span {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  min-height: 22px;
  border: 1px solid rgba(255, 248, 232, 0.12);
  border-radius: 999px;
  padding: 3px 7px;
  color: rgba(255, 248, 232, 0.74);
  background: rgba(0, 0, 0, 0.18);
  font-size: 0.68rem;
  font-weight: 850;
  line-height: 1.05;
}

.review-session-hud-grid b {
  color: #fff0a3;
  font-weight: 950;
}

.review-session-hud-map {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(28px, 1fr));
  gap: 4px;
}

.review-session-hud-cell {
  min-width: 0;
  min-height: 26px;
  display: grid;
  place-items: center;
  overflow: hidden;
  border: 1px solid rgba(255, 248, 232, 0.12);
  border-radius: 6px;
  background:
    linear-gradient(180deg, rgba(255, 248, 232, 0.08), rgba(255, 248, 232, 0.025)),
    rgba(0, 0, 0, 0.18);
  color: rgba(255, 248, 232, 0.74);
  padding: 0 3px;
  font: inherit;
  cursor: pointer;
  transition:
    border-color 0.16s ease,
    box-shadow 0.16s ease,
    transform 0.16s ease;
}

.review-session-hud-cell span {
  min-width: 0;
  overflow: hidden;
  font-size: 0.62rem;
  font-weight: 950;
  line-height: 1;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.review-session-hud-cell.correct {
  border-color: rgba(111, 239, 183, 0.34);
  background:
    linear-gradient(180deg, rgba(111, 239, 183, 0.22), rgba(111, 239, 183, 0.055)),
    rgba(6, 78, 59, 0.3);
  color: #dfffee;
}

.review-session-hud-cell.wrong {
  border-color: rgba(255, 107, 107, 0.42);
  background:
    linear-gradient(180deg, rgba(255, 107, 107, 0.24), rgba(255, 107, 107, 0.055)),
    rgba(88, 28, 36, 0.32);
  color: #ffe2df;
}

.review-session-hud-cell.pending {
  color: rgba(255, 248, 232, 0.56);
}

.review-session-hud-cell.current {
  border-color: rgba(255, 241, 168, 0.86);
  color: #fff8e8;
  box-shadow:
    0 0 0 2px rgba(255, 241, 168, 0.16),
    inset 0 0 0 1px rgba(255, 248, 232, 0.18);
}

.review-session-hud-cell:hover,
.review-session-hud-cell:focus-visible {
  border-color: rgba(255, 241, 168, 0.82);
  outline: none;
  transform: translateY(-1px);
  box-shadow: 0 0 0 3px rgba(255, 241, 168, 0.1);
}

.understanding-toggle {
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  gap: 5px;
  width: min(100%, 960px);
  flex: 0 1 960px;
  max-width: 100%;
  min-width: 0;
  margin-left: 0;
}

.understanding-choice-button {
  min-width: 0;
  min-height: 40px;
  border: 2px solid rgba(255, 248, 232, 0.18);
  border-radius: 8px;
  padding: 0 10px;
  color: rgba(255, 248, 232, 0.82);
  cursor: pointer;
  font-size: 0.8rem;
  font-weight: 950;
  line-height: 1.08;
  letter-spacing: 0;
  text-align: center;
  white-space: normal;
  text-shadow: 0 1px 0 rgba(0, 0, 0, 0.54);
  box-shadow:
    inset 0 1px 0 rgba(255, 248, 232, 0.12),
    0 2px 0 rgba(0, 0, 0, 0.34);
  opacity: 0.72;
  transition:
    transform 140ms ease,
    opacity 140ms ease,
    filter 140ms ease,
    border-color 140ms ease,
    box-shadow 140ms ease;
}

.understanding-choice-button:hover,
.understanding-choice-button:focus-visible {
  opacity: 0.92;
  filter: brightness(1.08);
  transform: translateY(-1px);
}

.understanding-choice-button.active {
  opacity: 1;
  color: #fffdf6;
  transform: translateY(-2px);
  box-shadow:
    inset 0 1px 0 rgba(255, 248, 232, 0.34),
    0 4px 0 rgba(0, 0, 0, 0.42),
    0 0 16px rgba(255, 248, 232, 0.16);
}

.understanding-choice-button:active {
  transform: translateY(1px);
}

.understanding-choice-button:disabled {
  opacity: 0.44;
  cursor: default;
  transform: none;
}

.understanding-lost {
  border-color: rgba(248, 113, 113, 0.45);
  background: linear-gradient(180deg, rgba(127, 29, 29, 0.78), rgba(69, 10, 10, 0.82));
}

.understanding-lost.active {
  border-color: #fecdd3;
  background: linear-gradient(180deg, #fb7185, #dc2626 58%, #7f1d1d);
  box-shadow:
    inset 0 1px 0 rgba(255, 248, 232, 0.34),
    0 4px 0 rgba(69, 10, 10, 0.68),
    0 0 18px rgba(248, 113, 113, 0.34);
}

.understanding-confused {
  border-color: rgba(251, 146, 60, 0.48);
  background: linear-gradient(180deg, rgba(154, 52, 18, 0.76), rgba(67, 20, 7, 0.84));
}

.understanding-confused.active {
  border-color: #fed7aa;
  background: linear-gradient(180deg, #fdba74, #ea580c 58%, #7c2d12);
  color: #fff7ed;
  box-shadow:
    inset 0 1px 0 rgba(255, 248, 232, 0.34),
    0 4px 0 rgba(67, 20, 7, 0.7),
    0 0 18px rgba(251, 146, 60, 0.34);
}

.understanding-partial {
  border-color: rgba(255, 220, 96, 0.48);
  background: linear-gradient(180deg, rgba(145, 91, 20, 0.78), rgba(82, 45, 17, 0.84));
}

.understanding-partial.active {
  border-color: #fff1a8;
  background: linear-gradient(180deg, #ffe37d, #d19122 58%, #8a4f13);
  color: #24131d;
  text-shadow: 0 1px 0 rgba(255, 248, 232, 0.54);
  box-shadow:
    inset 0 1px 0 rgba(255, 248, 232, 0.42),
    0 4px 0 rgba(91, 52, 11, 0.72),
    0 0 18px rgba(255, 196, 64, 0.32);
}

.understanding-complete {
  border-color: rgba(167, 243, 208, 0.44);
  background: linear-gradient(180deg, rgba(13, 148, 136, 0.68), rgba(13, 82, 72, 0.86));
}

.understanding-complete.active {
  border-color: #a7f3d0;
  background: linear-gradient(180deg, #34d399, #059669 58%, #065f46);
  color: #ecfdf5;
  box-shadow:
    inset 0 1px 0 rgba(255, 248, 232, 0.34),
    0 4px 0 rgba(6, 78, 59, 0.7),
    0 0 18px rgba(52, 211, 153, 0.32);
}

.understanding-worthless {
  border-color: rgba(216, 180, 254, 0.42);
  background: linear-gradient(180deg, rgba(88, 28, 135, 0.72), rgba(46, 16, 101, 0.86));
}

.understanding-worthless.active {
  border-color: #e9d5ff;
  background: linear-gradient(180deg, #a78bfa, #7c3aed 58%, #4c1d95);
  color: #faf5ff;
  box-shadow:
    inset 0 1px 0 rgba(255, 248, 232, 0.34),
    0 4px 0 rgba(46, 16, 101, 0.72),
    0 0 18px rgba(167, 139, 250, 0.32);
}

.calculation-marker-button {
  position: relative;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  min-width: 82px;
  min-height: 40px;
  padding: 0 12px;
  border: 2px solid transparent;
  border-radius: 8px;
  background:
    linear-gradient(180deg, rgba(23, 28, 38, 0.96), rgba(10, 15, 24, 0.96)) padding-box,
    conic-gradient(from 40deg, #f43f5e, #f59e0b, #fef08a, #22c55e, #06b6d4, #6366f1, #c026d3, #f43f5e) border-box;
  color: #fff8e8;
  cursor: pointer;
  font-size: 0.86rem;
  font-weight: 950;
  line-height: 1;
  opacity: 0.72;
  text-shadow: 0 1px 0 rgba(0, 0, 0, 0.62);
  box-shadow:
    inset 0 1px 0 rgba(255, 248, 232, 0.12),
    0 2px 0 rgba(0, 0, 0, 0.36);
  transition:
    transform 140ms ease,
    opacity 140ms ease,
    filter 140ms ease,
    box-shadow 140ms ease;
}

.calculation-marker-button:hover,
.calculation-marker-button:focus-visible {
  opacity: 0.96;
  filter: brightness(1.08);
  transform: translateY(-1px);
}

.calculation-marker-button.active {
  opacity: 1;
  color: #ffffff;
  background:
    linear-gradient(180deg, rgba(20, 20, 28, 0.76), rgba(4, 10, 18, 0.92)) padding-box,
    conic-gradient(from 40deg, #ff1744, #ff9100, #ffea00, #00e676, #00b0ff, #651fff, #d500f9, #ff1744) border-box;
  box-shadow:
    inset 0 1px 0 rgba(255, 248, 232, 0.24),
    0 4px 0 rgba(0, 0, 0, 0.46),
    0 0 18px rgba(125, 211, 252, 0.26),
    0 0 28px rgba(216, 180, 254, 0.2);
}

.calculation-marker-button:active {
  transform: translateY(1px);
}

.calculation-marker-button:disabled {
  opacity: 0.42;
  cursor: default;
  transform: none;
}

.calculation-marker-button svg {
  width: 17px;
  height: 17px;
  stroke-width: 2.8;
}

.question-copy-button {
  position: relative;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  min-width: 88px;
  min-height: 40px;
  padding: 0 14px;
  overflow: hidden;
  border: 2px solid rgba(135, 220, 235, 0.68);
  border-radius: 8px;
  background:
    linear-gradient(180deg, rgba(255, 248, 232, 0.18), rgba(96, 190, 210, 0.08) 44%, rgba(14, 57, 66, 0.88)),
    rgba(18, 42, 50, 0.94);
  color: #e7fbff;
  cursor: pointer;
  font-size: 0.9rem;
  font-weight: 900;
  line-height: 1;
  text-shadow: 0 1px 0 rgba(0, 0, 0, 0.56);
  box-shadow:
    inset 0 1px 0 rgba(255, 248, 232, 0.22),
    inset 0 -1px 0 rgba(7, 28, 35, 0.72),
    0 3px 0 rgba(5, 36, 45, 0.82),
    0 0 0 1px rgba(0, 0, 0, 0.18);
  transition:
    transform 140ms ease,
    border-color 140ms ease,
    background 140ms ease,
    box-shadow 140ms ease,
    filter 140ms ease;
}

.question-copy-button:hover,
.question-copy-button:focus-visible {
  border-color: #c8f7ff;
  background:
    linear-gradient(180deg, rgba(231, 251, 255, 0.24), rgba(96, 190, 210, 0.14)),
    rgba(18, 68, 78, 0.94);
  transform: translateY(-2px);
  filter: brightness(1.08);
  box-shadow:
    inset 0 1px 0 rgba(255, 248, 232, 0.24),
    0 5px 0 rgba(5, 36, 45, 0.72),
    0 0 18px rgba(93, 220, 244, 0.22);
}

.question-copy-button.copied {
  border-color: #a7f3d0;
  background: linear-gradient(180deg, #6ee7b7, #0f766e 62%, #064e3b);
  color: #08251f;
  text-shadow: 0 1px 0 rgba(255, 248, 232, 0.38);
}

.question-copy-button.error {
  border-color: #ffd08a;
  background: linear-gradient(180deg, rgba(148, 38, 45, 0.92), rgba(84, 26, 34, 0.86));
  color: #fff8e8;
}

.question-copy-button:active {
  transform: translateY(2px);
  box-shadow:
    inset 0 2px 4px rgba(5, 22, 27, 0.38),
    0 1px 0 rgba(5, 36, 45, 0.82);
}

.question-copy-button:disabled {
  opacity: 0.56;
  cursor: default;
  transform: none;
  box-shadow:
    inset 0 1px 0 rgba(255, 248, 232, 0.1),
    inset 0 -1px 0 rgba(7, 28, 35, 0.46),
    0 1px 0 rgba(5, 36, 45, 0.5);
}

.question-copy-button svg {
  width: 18px;
  height: 18px;
  stroke-width: 2.8;
}

.question-chip,
.variant-chip {
  display: inline-flex;
  align-items: center;
  min-height: 28px;
  padding: 4px 10px;
  border-radius: 7px;
  font-size: 0.74rem;
  font-weight: 900;
}

.question-chip {
  background: linear-gradient(180deg, #9e2820, #6c131b);
  color: #fff8e8;
  border: 1px solid rgba(255, 241, 168, 0.34);
}

.variant-chip {
  background: linear-gradient(180deg, #0f5f61, #092e34);
  color: #fff8e8;
  border: 1px solid rgba(255, 241, 168, 0.28);
}

.clue-box {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 8px;
}

.clue-box.hidden {
  display: none;
}

.clue-box div {
  border-left: 5px solid var(--active, var(--teal));
  border-radius: 7px;
  background: rgba(255, 248, 232, 0.95);
  color: #241a18;
  padding: 8px 10px;
  line-height: 1.48;
  font-weight: 900;
  font-size: 0.84rem;
}

.clue-box span {
  display: inline-flex;
  margin-right: 8px;
  color: #8b1e1b;
  font-size: 0.68rem;
  font-weight: 900;
}

.question-text {
  display: flex;
  align-items: center;
  justify-content: flex-start;
  min-height: clamp(132px, 22vh, 260px);
  margin: 0;
  white-space: pre-line;
  border: 1px solid rgba(255, 241, 168, 0.42);
  border-radius: 8px;
  background:
    linear-gradient(180deg, rgba(10, 11, 15, 0.72), rgba(12, 31, 34, 0.66));
  color: #fffdf6;
  padding: clamp(18px, 2.2vw, 34px);
  font-size: clamp(2.05rem, 3.64vw, 3.9rem);
  line-height: 1.42;
  font-weight: 900;
  text-align: left;
  text-shadow: 0 2px 0 rgba(0, 0, 0, 0.38);
}

.question-text.typewriting::after {
  content: "|";
  display: inline-block;
  margin-left: 0.12em;
  color: #ffe37d;
  animation: typewriterCaret 0.72s steps(1, end) infinite;
  text-shadow:
    0 0 10px rgba(255, 227, 125, 0.72),
    0 2px 0 rgba(0, 0, 0, 0.38);
}

.question-text.plain-rich-question {
  display: block;
}

.question-text.long-question {
  display: block;
  min-height: auto;
  overflow: visible;
}

.quiz-panel[data-question-density="standard"] .question-text,
.quiz-panel[data-question-density="dense"] .question-text,
.quiz-panel[data-question-density="extended"] .question-text {
  align-items: flex-start;
}

.question-directive-highlight {
  display: inline;
  border-radius: 5px;
  padding: 0.02em 0.18em 0.06em;
  box-decoration-break: clone;
  -webkit-box-decoration-break: clone;
  text-shadow: none;
}

.question-directive-red {
  background: linear-gradient(180deg, rgba(255, 104, 178, 0.38), rgba(171, 45, 126, 0.4));
  color: #fff0f8;
  box-shadow:
    inset 0 -0.12em 0 rgba(255, 112, 195, 0.68),
    0 0 0 1px rgba(255, 128, 203, 0.38),
    0 0 14px rgba(255, 72, 170, 0.14);
}

.question-directive-green {
  background: linear-gradient(180deg, rgba(74, 222, 128, 0.3), rgba(21, 128, 61, 0.34));
  color: #dcfce7;
  box-shadow:
    inset 0 -0.12em 0 rgba(74, 222, 128, 0.52),
    0 0 0 1px rgba(74, 222, 128, 0.28);
}

.question-text.html-question {
  display: block;
  min-height: clamp(96px, 18vh, 220px);
  max-height: clamp(160px, 28vh, 320px);
  overflow: auto;
  white-space: normal;
  color: #fffdf6;
  font-size: clamp(1.79rem, 2.02vw, 2.34rem);
  font-weight: 800;
  line-height: 1.62;
  text-shadow: none;
}

@media (min-width: 1181px) {
  .quiz-panel.source-layout.review-layout .question-text.html-question::before {
    content: "";
    float: right;
    width: clamp(220px, 16vw, 320px);
    aspect-ratio: 16 / 9;
    margin: 0 0 12px 18px;
    border: 1px solid rgba(255, 214, 92, 0.5);
    border-radius: 8px;
    background:
      radial-gradient(circle at 50% 50%, rgba(255, 49, 49, 0.34) 0 6px, transparent 7px),
      linear-gradient(135deg, rgba(255, 255, 255, 0.08), rgba(255, 255, 255, 0) 42%),
      linear-gradient(180deg, rgba(12, 16, 22, 0.72), rgba(5, 10, 15, 0.9));
    box-shadow:
      inset 0 0 0 1px rgba(255, 248, 232, 0.08),
      inset 0 -22px 38px rgba(0, 0, 0, 0.22),
      0 8px 18px rgba(0, 0, 0, 0.24);
    opacity: 0.96;
    pointer-events: none;
  }

  .quiz-panel.source-layout:not(.review-layout) .question-text.html-question {
    padding-right: clamp(12px, 1.2vw, 20px);
  }

  .quiz-panel.source-layout:not(.review-layout) .question-text.html-question::before {
    content: "";
    float: right;
    width: clamp(220px, 16vw, 320px);
    aspect-ratio: 16 / 9;
    margin: 0 0 12px 18px;
    border: 1px solid rgba(255, 214, 92, 0.5);
    border-radius: 8px;
    background:
      radial-gradient(circle at 50% 50%, rgba(255, 49, 49, 0.34) 0 6px, transparent 7px),
      linear-gradient(135deg, rgba(255, 255, 255, 0.08), rgba(255, 255, 255, 0) 42%),
      linear-gradient(180deg, rgba(12, 16, 22, 0.72), rgba(5, 10, 15, 0.9));
    box-shadow:
      inset 0 0 0 1px rgba(255, 248, 232, 0.08),
      inset 0 -22px 38px rgba(0, 0, 0, 0.22),
      0 8px 18px rgba(0, 0, 0, 0.24);
    opacity: 0.96;
    pointer-events: none;
  }
}

.question-text.html-question ul,
.question-text.html-question ol,
.feedback-body ul,
.feedback-body ol {
  margin: 0.65em 0 0.65em 1.4em;
  padding: 0;
}

.question-text.html-question li,
.feedback-body li {
  margin: 0.28em 0;
}

.question-text.html-question table,
.feedback-body table {
  display: block;
  max-width: 100%;
  overflow-x: auto;
  border-collapse: collapse;
}

.question-text.html-question .img_margin,
.question-text.html-question .choice-image,
.feedback-body .img_margin,
.feedback-body .choice-image {
  max-width: 100%;
  overflow-x: auto;
}

.question-text.html-question th,
.question-text.html-question td,
.feedback-body th,
.feedback-body td {
  border: 1px solid currentColor;
  padding: 0.35em 0.55em;
}

.question-text.html-question img,
.option-content img,
.feedback-body img {
  display: inline-block;
  max-width: none;
  height: auto;
  padding: 8px;
  border: 1px solid rgba(48, 37, 29, 0.34);
  border-radius: 4px;
  background: #fff;
  box-shadow:
    0 2px 0 rgba(0, 0, 0, 0.16),
    0 0 0 1px rgba(255, 255, 255, 0.78) inset;
  box-sizing: border-box;
  vertical-align: top;
}

.quiz-panel.math-layout.source-layout:not(.review-layout) .question-text.html-question::before,
.quiz-panel.math-layout.source-layout.review-layout .question-text.html-question::before {
  display: none;
  content: none;
}

.quiz-panel.math-layout.source-layout:not(.review-layout) .question-text.html-question {
  padding-right: clamp(12px, 1.2vw, 20px);
}

.math-question,
.math-explanation {
  display: grid;
  gap: 0.72em;
}

.math-question p,
.math-explanation p {
  margin: 0;
}

.math-formula {
  max-width: 100%;
  overflow-x: auto;
  border: 1px solid rgba(255, 248, 232, 0.14);
  border-radius: 8px;
  background: rgba(255, 248, 232, 0.06);
  padding: 0.42em 0.56em;
}

.question-text .katex-display,
.option-content .katex-display,
.feedback-body .katex-display,
.option-explanation-body .katex-display,
.clue-box .katex-display {
  max-width: 100%;
  overflow-x: auto;
  overflow-y: hidden;
  padding: 0.08em 0;
}

.option-content .katex,
.option-explanation-body .katex,
.feedback-body .katex {
  max-width: 100%;
}

.question-text .graphable-question-formula {
  cursor: zoom-in;
  border-radius: 5px;
}

.question-text .graphable-question-formula:focus-visible {
  outline: 2px solid rgba(125, 211, 252, 0.78);
  outline-offset: 3px;
}

.option-graph-panel {
  position: fixed;
  z-index: 10020;
  width: min(1440px, calc(100vw - 24px));
  max-height: calc(100dvh - 24px);
  overflow: hidden;
  border: 1px solid rgba(116, 226, 255, 0.42);
  border-radius: 8px;
  background:
    linear-gradient(135deg, rgba(14, 23, 55, 0.98) 0%, rgba(10, 68, 82, 0.98) 42%, rgba(32, 21, 71, 0.98) 100%),
    linear-gradient(90deg, rgba(45, 140, 255, 0.18), rgba(68, 214, 170, 0.16), rgba(255, 205, 92, 0.14));
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.14),
    inset 0 0 0 1px rgba(255, 255, 255, 0.045),
    0 22px 52px rgba(2, 8, 23, 0.44),
    0 0 34px rgba(45, 140, 255, 0.12);
}

.option-graph-panel::before {
  content: "";
  position: absolute;
  inset: 0;
  z-index: 0;
  border-radius: inherit;
  background:
    linear-gradient(90deg, rgba(86, 211, 255, 0.24), rgba(78, 230, 178, 0.08), rgba(255, 202, 89, 0.18)),
    repeating-linear-gradient(135deg, rgba(255, 255, 255, 0.035) 0 1px, transparent 1px 10px);
  opacity: 0.55;
  pointer-events: none;
}

.option-graph-panel.open {
  display: grid;
  grid-template-rows: auto minmax(0, 1fr);
}

.option-graph-panel.hidden {
  display: none;
}

.option-graph-popover {
  position: fixed;
  z-index: 10000;
  display: flex;
  align-items: center;
  gap: 10px;
  max-width: min(420px, calc(100vw - 20px));
  border: 1px solid rgba(45, 140, 255, 0.36);
  border-radius: 8px;
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.98), rgba(239, 248, 255, 0.98)),
    #fff;
  color: #0f172a;
  box-shadow:
    0 16px 36px rgba(3, 20, 38, 0.22),
    0 0 0 1px rgba(255, 255, 255, 0.74) inset;
  padding: 8px;
}

.option-graph-popover.hidden {
  display: none;
}

.option-graph-popover::before {
  content: "";
  position: absolute;
  left: -7px;
  top: 50%;
  width: 12px;
  height: 12px;
  border-left: 1px solid rgba(45, 140, 255, 0.28);
  border-bottom: 1px solid rgba(45, 140, 255, 0.28);
  background: rgba(239, 248, 255, 0.98);
  transform: translateY(-50%) rotate(45deg);
}

.option-graph-popover::after {
  content: "";
  position: absolute;
  left: -18px;
  top: -8px;
  width: 20px;
  height: calc(100% + 16px);
}

.option-graph-popover.place-left::before {
  right: -7px;
  left: auto;
  border-right: 1px solid rgba(45, 140, 255, 0.28);
  border-left: 0;
}

.option-graph-popover.place-left::after {
  right: -18px;
  left: auto;
}

.option-graph-popover > div {
  min-width: 0;
  display: grid;
  gap: 2px;
}

.option-graph-popover strong {
  display: block;
  overflow: hidden;
  color: #0f172a;
  font-size: 0.82rem;
  font-weight: 950;
  line-height: 1.16;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.option-graph-popover span {
  color: #475569;
  font-size: 0.72rem;
  font-weight: 850;
}

.option-graph-popover button {
  position: relative;
  z-index: 1;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  flex: 0 0 auto;
  min-height: 34px;
  border: 0;
  border-radius: 7px;
  background: linear-gradient(135deg, #1687ff, #4cc9f0);
  color: #fff;
  padding: 7px 11px;
  font: inherit;
  font-size: 0.8rem;
  font-weight: 950;
  cursor: pointer;
  box-shadow: 0 8px 18px rgba(22, 135, 255, 0.25);
}

.option-graph-popover button:hover,
.option-graph-popover button:focus-visible {
  outline: none;
  box-shadow:
    0 8px 18px rgba(22, 135, 255, 0.32),
    0 0 0 3px rgba(45, 140, 255, 0.18);
}

.option-graph-popover svg {
  width: 15px;
  height: 15px;
}

.option-graph-toolbar {
  position: relative;
  z-index: 1;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  min-height: 42px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.12);
  background:
    linear-gradient(90deg, rgba(38, 90, 140, 0.42), rgba(20, 191, 166, 0.24), rgba(137, 92, 246, 0.32)),
    rgba(4, 17, 29, 0.52);
  padding: 7px 10px;
  cursor: grab;
  touch-action: none;
  user-select: none;
  -webkit-user-select: none;
}

.option-graph-panel.dragging .option-graph-toolbar {
  cursor: grabbing;
}

.option-graph-title {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  color: #f7fdff;
  font-size: 0.86rem;
  font-weight: 950;
  text-shadow: 0 1px 10px rgba(125, 211, 252, 0.28);
}

.option-graph-title svg {
  width: 16px;
  height: 16px;
}

.option-graph-window-actions {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  flex: 0 0 auto;
}

.option-graph-toggle {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  min-height: 31px;
  border: 1px solid rgba(125, 211, 252, 0.66);
  border-radius: 7px;
  background:
    linear-gradient(135deg, rgba(43, 146, 255, 0.82), rgba(29, 203, 173, 0.72)),
    rgba(2, 21, 31, 0.84);
  color: #f4fbff;
  padding: 5px 11px;
  font: inherit;
  font-size: 0.84rem;
  font-weight: 950;
  cursor: pointer;
}

.option-graph-theme-toggle {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  min-height: 34px;
  border: 1px solid rgba(255, 255, 255, 0.22);
  border-radius: 999px;
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.18), rgba(255, 255, 255, 0.06)),
    rgba(5, 16, 30, 0.62);
  color: #f4fbff;
  padding: 4px 11px 4px 5px;
  font: inherit;
  font-size: 0.82rem;
  font-weight: 950;
  cursor: pointer;
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.22),
    0 8px 18px rgba(2, 8, 23, 0.18);
}

.option-graph-toggle:hover,
.option-graph-toggle:focus-visible,
.option-graph-theme-toggle:hover,
.option-graph-theme-toggle:focus-visible {
  outline: none;
  border-color: #c7efff;
  box-shadow: 0 0 0 3px rgba(125, 211, 252, 0.18);
}

.option-graph-theme-toggle[aria-checked="true"] {
  border-color: rgba(134, 239, 172, 0.42);
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.22), rgba(255, 255, 255, 0.08)),
    rgba(16, 185, 129, 0.26);
}

.option-graph-switch-track {
  position: relative;
  width: 48px;
  height: 28px;
  flex: 0 0 auto;
  border-radius: 999px;
  background:
    linear-gradient(180deg, rgba(30, 41, 59, 0.94), rgba(15, 23, 42, 0.94)),
    #111827;
  box-shadow:
    inset 0 1px 2px rgba(0, 0, 0, 0.34),
    inset 0 0 0 1px rgba(255, 255, 255, 0.08);
  transition: background 180ms ease, box-shadow 180ms ease;
}

.option-graph-theme-toggle[aria-checked="true"] .option-graph-switch-track {
  background:
    linear-gradient(135deg, #34c759, #31d6bd),
    #34c759;
  box-shadow:
    inset 0 1px 1px rgba(255, 255, 255, 0.24),
    0 0 18px rgba(52, 199, 89, 0.22);
}

.option-graph-switch-thumb {
  position: absolute;
  top: 3px;
  left: 3px;
  width: 22px;
  height: 22px;
  display: grid;
  place-items: center;
  border-radius: 999px;
  background:
    linear-gradient(180deg, #ffffff, #e8eef7),
    #fff;
  color: #334155;
  box-shadow:
    0 2px 5px rgba(0, 0, 0, 0.28),
    inset 0 1px 0 rgba(255, 255, 255, 0.9);
  transform: translateX(0);
  transition: transform 180ms cubic-bezier(0.2, 0.8, 0.2, 1), color 180ms ease;
}

.option-graph-theme-toggle[aria-checked="true"] .option-graph-switch-thumb {
  color: #0f766e;
  transform: translateX(20px);
}

.option-graph-theme-label {
  min-width: 2.8em;
  color: rgba(247, 253, 255, 0.92);
  text-align: left;
}

.option-graph-toggle svg,
.option-graph-switch-thumb svg {
  width: 16px;
  height: 16px;
}

.option-graph-body {
  position: relative;
  z-index: 1;
  padding: 0 10px 10px;
  min-height: 0;
}

.option-graph-body.hidden {
  display: none;
}

.option-graph-mount {
  height: min(820px, calc(100dvh - 90px));
  min-height: 0;
}

.graphing-calculator-shell {
  display: grid;
  grid-template-columns: minmax(390px, 0.34fr) minmax(0, 1fr);
  gap: 0;
  overflow: hidden;
  height: 100%;
  min-height: 0;
  border: 1px solid rgba(186, 230, 253, 0.22);
  border-radius: 8px;
  background:
    linear-gradient(135deg, #f8fbff, #edf8ff 42%, #f9f5ff),
    #f8fbff;
  color: #0f172a;
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.2),
    0 14px 30px rgba(2, 8, 23, 0.16);
}

.graphing-calculator-shell[data-graphing-theme="dark"] {
  border-color: rgba(148, 163, 184, 0.24);
  background:
    linear-gradient(135deg, #071120 0%, #0d1b35 42%, #071f2a 100%),
    #0b1220;
  color: #e5edf8;
}

.graphing-expression-panel {
  min-width: 0;
  display: grid;
  grid-template-rows: auto minmax(0, 1fr);
  border-right: 1px solid #d7e1ef;
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.96), rgba(236, 248, 255, 0.92)),
    #fff;
}

.graphing-calculator-shell[data-graphing-theme="dark"] .graphing-expression-panel {
  border-right-color: rgba(125, 211, 252, 0.18);
  background:
    linear-gradient(180deg, rgba(8, 17, 35, 0.96), rgba(5, 24, 38, 0.96)),
    #08111f;
}

.graphing-expression-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  min-height: 42px;
  border-bottom: 1px solid #e2e8f0;
  background:
    linear-gradient(90deg, rgba(45, 140, 255, 0.14), rgba(20, 184, 166, 0.1), rgba(245, 158, 11, 0.12));
  padding: 8px 10px;
}

.graphing-calculator-shell[data-graphing-theme="dark"] .graphing-expression-head {
  border-bottom-color: rgba(125, 211, 252, 0.18);
  background:
    linear-gradient(90deg, rgba(45, 140, 255, 0.22), rgba(20, 184, 166, 0.12), rgba(167, 139, 250, 0.16));
}

.graphing-expression-head strong {
  font-size: 0.88rem;
  font-weight: 950;
}

.graphing-add-button,
.graphing-toolbar button,
.graphing-expression-row button {
  border: 1px solid rgba(99, 179, 237, 0.42);
  border-radius: 6px;
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.98), rgba(226, 241, 255, 0.92)),
    #fff;
  color: #102033;
  font: inherit;
  font-size: 0.76rem;
  font-weight: 850;
  cursor: pointer;
}

.graphing-calculator-shell[data-graphing-theme="dark"] .graphing-add-button,
.graphing-calculator-shell[data-graphing-theme="dark"] .graphing-toolbar button,
.graphing-calculator-shell[data-graphing-theme="dark"] .graphing-expression-row button {
  border-color: rgba(125, 211, 252, 0.26);
  background:
    linear-gradient(135deg, rgba(19, 38, 73, 0.92), rgba(8, 64, 75, 0.78)),
    #111c2e;
  color: #e5edf8;
}

.graphing-add-button,
.graphing-toolbar button {
  min-height: 28px;
  padding: 4px 9px;
}

.graphing-expression-list {
  min-height: 0;
  overflow: auto;
  background:
    linear-gradient(180deg, rgba(45, 140, 255, 0.045), transparent 30%),
    transparent;
}

.graphing-expression-row {
  display: grid;
  grid-template-columns: 22px 22px minmax(0, 1fr) auto 28px;
  align-items: center;
  gap: 8px;
  border-bottom: 1px solid rgba(203, 213, 225, 0.56);
  background:
    linear-gradient(90deg, rgba(255, 255, 255, 0.86), rgba(238, 248, 255, 0.6), rgba(245, 241, 255, 0.52));
  padding: 8px;
}

.graphing-calculator-shell[data-graphing-theme="dark"] .graphing-expression-row {
  border-bottom-color: rgba(125, 211, 252, 0.12);
  background:
    linear-gradient(90deg, rgba(14, 33, 64, 0.72), rgba(6, 39, 50, 0.52), rgba(23, 18, 48, 0.58));
}

.graphing-expression-row small {
  grid-column: 3 / 6;
  color: #c0263d;
  font-size: 0.68rem;
  font-weight: 800;
}

.graphing-expression-actions {
  position: relative;
  z-index: 3;
  grid-column: 4;
  grid-row: 1;
  display: flex;
  flex-wrap: nowrap;
  gap: 5px;
  min-width: 0;
}

.graphing-expression-actions button {
  min-height: 30px;
  padding: 4px 8px;
  border-radius: 999px;
  background:
    linear-gradient(135deg, rgba(59, 130, 246, 0.9), rgba(20, 184, 166, 0.82));
  color: #f8fbff;
  font-size: 0.68rem;
  white-space: nowrap;
  box-shadow: 0 7px 15px rgba(14, 116, 144, 0.16);
}

.graphing-expression-field {
  position: relative;
  z-index: 1;
  grid-column: 3;
  grid-row: 1;
  min-width: 0;
  min-height: 42px;
  display: flex;
  align-items: center;
  border: 1px solid rgba(59, 130, 246, 0.18);
  border-radius: 7px;
  overflow-x: auto;
  overflow-y: hidden;
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.98), rgba(239, 248, 255, 0.94)),
    #fff;
  color: #0f172a;
  scrollbar-width: thin;
}

.graphing-expression-row > button[data-graphing-action="delete"] {
  position: relative;
  z-index: 3;
  grid-column: 5;
  grid-row: 1;
}

.graphing-expression-field:focus-within {
  border-color: #2d8cff;
  background: #fff;
  box-shadow: 0 0 0 3px rgba(45, 140, 255, 0.14);
}

.graphing-expression-typeset {
  position: absolute;
  inset: 0;
  z-index: 1;
  display: flex;
  align-items: center;
  overflow-x: auto;
  overflow-y: hidden;
  padding: 7px 9px;
  pointer-events: none;
  white-space: nowrap;
}

.graphing-expression-typeset .katex {
  max-width: none;
  font-size: 1.08rem;
}

.graphing-expression-field.is-empty .graphing-expression-typeset,
.graphing-expression-field.is-error .graphing-expression-typeset {
  display: none;
}

.graphing-expression-field.is-rendered .graphing-expression-input {
  color: transparent;
  caret-color: #2d8cff;
}

.graphing-expression-field.is-rendered .graphing-expression-input::placeholder {
  color: transparent;
}

.graphing-expression-field.is-rendered .graphing-expression-input::selection {
  background: rgba(45, 140, 255, 0.2);
  color: transparent;
}

.graphing-expression-field.is-error {
  border-color: rgba(224, 79, 95, 0.52);
  background: #fff7f8;
}

.graphing-calculator-shell[data-graphing-theme="dark"] .graphing-expression-field {
  border-color: rgba(125, 211, 252, 0.2);
  background:
    linear-gradient(180deg, rgba(15, 23, 42, 0.92), rgba(7, 30, 45, 0.96)),
    #0b1220;
  color: #f8fbff;
}

.graphing-calculator-shell[data-graphing-theme="dark"] .graphing-expression-field:focus-within {
  border-color: #60a5fa;
  background: #0c1525;
  box-shadow: 0 0 0 3px rgba(96, 165, 250, 0.18);
}

.graphing-calculator-shell[data-graphing-theme="dark"] .graphing-expression-field.is-error {
  border-color: rgba(248, 113, 113, 0.58);
  background: rgba(127, 29, 29, 0.28);
}

.graphing-toggle {
  display: inline-grid;
  place-items: center;
  cursor: pointer;
}

.graphing-toggle input {
  position: absolute;
  opacity: 0;
  pointer-events: none;
}

.graphing-toggle span {
  width: 15px;
  height: 15px;
  border: 2px solid #fff;
  border-radius: 50%;
  background: var(--graph-color);
  box-shadow:
    0 0 0 1px rgba(15, 23, 42, 0.22),
    0 0 14px color-mix(in srgb, var(--graph-color) 46%, transparent);
}

.graphing-toggle input:not(:checked) + span {
  opacity: 0.32;
  filter: grayscale(0.8);
}

.graphing-label {
  color: #475569;
  font-size: 0.76rem;
  font-weight: 950;
  min-width: 0;
  overflow: hidden;
  text-align: center;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.graphing-calculator-shell[data-graphing-theme="dark"] .graphing-label {
  color: #b8c7dc;
}

.graphing-expression-input {
  position: relative;
  z-index: 2;
  width: 100%;
  min-width: 0;
  min-height: 40px;
  border: 0;
  border-radius: 0;
  background: transparent;
  color: #0f172a;
  padding: 7px 9px;
  font: 850 0.84rem/1.2 ui-monospace, SFMono-Regular, Consolas, monospace;
}

.graphing-calculator-shell[data-graphing-theme="dark"] .graphing-expression-input {
  background: transparent;
  color: #f8fbff;
}

.graphing-calculator-shell[data-graphing-theme="dark"] .graphing-expression-field.is-rendered .graphing-expression-input {
  color: transparent;
  caret-color: #60a5fa;
}

.graphing-calculator-shell[data-graphing-theme="dark"] .graphing-expression-input::placeholder {
  color: rgba(226, 237, 255, 0.46);
}

.graphing-expression-input:focus {
  outline: none;
}

.graphing-expression-row.has-error .graphing-expression-input {
  color: #0f172a;
}

.graphing-stage {
  min-width: 0;
  min-height: 0;
  display: grid;
  grid-template-rows: auto minmax(0, 1fr);
  background:
    linear-gradient(135deg, #eaf5ff 0%, #f2fbff 46%, #f8f2ff 100%),
    #eef5fb;
}

.graphing-calculator-shell[data-graphing-theme="dark"] .graphing-stage {
  background:
    linear-gradient(135deg, #061121 0%, #0a1a32 40%, #071f26 100%),
    #0a1322;
}

.graphing-toolbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  min-height: 42px;
  border-bottom: 1px solid rgba(147, 197, 253, 0.28);
  background:
    linear-gradient(90deg, rgba(255, 255, 255, 0.9), rgba(228, 247, 255, 0.78), rgba(245, 240, 255, 0.76));
  padding: 7px 10px;
}

.graphing-calculator-shell[data-graphing-theme="dark"] .graphing-toolbar {
  border-bottom-color: rgba(125, 211, 252, 0.18);
  background:
    linear-gradient(90deg, rgba(8, 17, 31, 0.94), rgba(7, 52, 65, 0.78), rgba(30, 23, 62, 0.8));
}

.graphing-toolbar span {
  min-width: 0;
  color: #475569;
  font-size: 0.76rem;
  font-weight: 850;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.graphing-calculator-shell[data-graphing-theme="dark"] .graphing-toolbar span {
  color: #b8c7dc;
}

.graphing-canvas {
  display: block;
  width: 100%;
  height: 100%;
  min-height: 0;
  cursor: grab;
  touch-action: none;
  background:
    linear-gradient(135deg, rgba(45, 140, 255, 0.04), rgba(20, 184, 166, 0.035), rgba(167, 139, 250, 0.045));
}

.graphing-canvas:active {
  cursor: grabbing;
}

.quiz-panel.workbook-layout:not(.review-layout) .question-board {
  grid-template-rows: auto auto minmax(360px, 1fr);
}

.quiz-panel.workbook-layout:not(.review-layout) .question-text.html-question {
  max-height: none;
  min-height: min(68vh, 720px);
  padding: clamp(10px, 1.2vw, 18px);
  background:
    linear-gradient(180deg, rgba(255, 248, 232, 0.08), rgba(255, 248, 232, 0.025)),
    rgba(2, 14, 18, 0.74);
}

.quiz-panel.workbook-layout:not(.review-layout) .question-text.html-question::before {
  display: none;
  content: none;
}

.workbook-page,
.workbook-answer {
  display: grid;
  gap: 12px;
  color: #fffdf6;
}

.workbook-page-head {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px;
}

.workbook-page-head span,
.workbook-page-head small {
  display: inline-flex;
  align-items: center;
  min-height: 27px;
  border: 1px solid rgba(255, 248, 232, 0.16);
  border-radius: 999px;
  padding: 4px 10px;
  color: rgba(255, 248, 232, 0.72);
  background: rgba(255, 248, 232, 0.06);
  font-size: 0.72rem;
  font-weight: 950;
  line-height: 1;
}

.workbook-page-head strong {
  color: #fff8e8;
  font-size: clamp(1.1rem, 1.55vw, 1.55rem);
  font-weight: 950;
  line-height: 1.2;
}

.workbook-image-card {
  display: grid;
  place-items: start center;
  overflow: auto;
  margin: 0;
  border: 1px solid rgba(255, 248, 232, 0.16);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.96);
  padding: clamp(6px, 1vw, 14px);
}

.question-text.html-question img.workbook-image,
.feedback-body img.workbook-image {
  display: block;
  width: min(100%, 1120px);
  max-width: 100%;
  padding: 0;
  border: 0;
  border-radius: 4px;
  background: #fff;
  box-shadow: none;
}

.workbook-answer-preview {
  overflow: hidden;
  border: 1px solid rgba(111, 239, 183, 0.28);
  border-radius: 8px;
  background: rgba(5, 42, 42, 0.64);
}

.workbook-answer-preview summary {
  min-height: 44px;
  display: flex;
  align-items: center;
  padding: 10px 13px;
  color: #dcfff1;
  cursor: pointer;
  font-size: 0.96rem;
  font-weight: 950;
}

.workbook-answer-preview[open] summary {
  border-bottom: 1px solid rgba(111, 239, 183, 0.22);
}

.workbook-answer-preview .workbook-image-card {
  border: 0;
  border-radius: 0;
}

.workbook-self-check-note,
.workbook-answer p {
  margin: 0;
  color: rgba(255, 248, 232, 0.78);
  font-size: 0.9rem;
  font-weight: 850;
  line-height: 1.55;
}

.workbook-source-link {
  color: #8fffe1;
  font-weight: 950;
}

.quiz-panel.workbook-layout .options {
  grid-template-rows: none;
  grid-template-columns: repeat(3, minmax(0, 1fr));
}

.quiz-panel.workbook-layout .option-button {
  min-height: 72px;
}

.quiz-panel.workbook-layout .option-letter {
  min-width: 56px;
}

.quiz-panel.workbook-layout .option-content {
  font-size: clamp(1.18rem, 1.55vw, 1.6rem);
}

.quiz-image[data-preview-ready="true"] {
  cursor: zoom-in;
  touch-action: manipulation;
}

.quiz-image[data-preview-ready="true"]:focus-visible {
  outline: 3px solid rgba(111, 239, 183, 0.96);
  outline-offset: 3px;
}

.pe-question-image {
  display: grid;
  gap: 10px;
  color: #1f140c;
}

.pe-kakomonn-question,
.kougai-question {
  container-type: inline-size;
  display: flex;
  flex-wrap: wrap;
  align-items: flex-start;
  gap: 8px 10px;
  color: #fffdf6;
}

.pe-prompt-image-strip {
  display: grid;
  flex: 1 0 100%;
  justify-items: start;
  gap: 10px;
  max-width: 100%;
  overflow-x: auto;
  padding: 4px 0;
}

.pe-prompt-image-strip img {
  max-width: min(100%, 980px);
}

.pe-kakomonn-prompt,
.kougai-prompt {
  display: grid;
  flex: 1 0 100%;
  min-width: 0;
  gap: 0.7em;
}

.pe-kakomonn-prompt p,
.pe-kakomonn-prompt div,
.kougai-prompt p,
.kougai-prompt div {
  margin: 0;
}

.pe-kakomonn-prompt table,
.kougai-prompt table,
.kougai-explanation table,
.pe-kakomonn-choice-explanations table,
.pe-kakomonn-explanation-main table,
.pe-kakomonn-explanation-summary table {
  background: rgba(255, 253, 246, 0.96);
  color: #1f140c;
}

.pe-kakomonn-choice-explanations {
  margin: 0;
  padding: 0;
  list-style: none;
}

.pe-question-title,
.kougai-question-title,
.kougai-question-subject {
  display: inline-flex;
  align-items: center;
  flex: 0 0 auto;
  min-height: 30px;
  padding: 4px 10px;
  border: 1px solid rgba(164, 112, 20, 0.5);
  border-radius: 6px;
  background: #fff7df;
  color: #3b250d;
  font-size: 0.86rem;
  line-height: 1.15;
  font-weight: 900;
  white-space: nowrap;
}

.kougai-question-subject {
  background: rgba(101, 163, 13, 0.2);
  color: #d9f99d;
}

.question-attempt-stats {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex: 0 0 auto;
  gap: 7px;
  min-height: 30px;
  margin-left: auto;
  padding: 4px 10px;
  border: 1px solid rgba(135, 220, 235, 0.46);
  border-radius: 999px;
  background:
    linear-gradient(180deg, rgba(231, 251, 255, 0.14), rgba(5, 82, 84, 0.34)),
    rgba(8, 27, 32, 0.86);
  color: #e7fbff;
  font-size: 0.78rem;
  line-height: 1.1;
  font-weight: 900;
  white-space: nowrap;
  box-shadow:
    inset 0 1px 0 rgba(255, 248, 232, 0.16),
    0 0 0 1px rgba(0, 0, 0, 0.12);
}

.question-attempt-stats span {
  display: inline-flex;
  align-items: baseline;
  gap: 2px;
}

.question-attempt-stats strong {
  font-size: 1.08em;
}

.question-attempt-stats .stat-correct {
  color: #bbf7d0;
}

.question-attempt-stats .stat-wrong {
  color: #fecdd3;
}

.question-attempt-stats .stat-last {
  color: #dbeafe;
}

.pe-question-field {
  display: inline-flex;
  align-items: center;
  flex: 0 0 auto;
  width: fit-content;
  min-height: 30px;
  padding: 4px 10px;
  border: 1px solid rgba(255, 227, 125, 0.54);
  border-radius: 999px;
  background: linear-gradient(180deg, rgba(255, 227, 125, 0.22), rgba(9, 91, 99, 0.42));
  color: #fff1a8;
  font-size: 0.86rem;
  line-height: 1.15;
  font-weight: 900;
  white-space: nowrap;
}

@container (max-width: 360px) {
  .pe-question-title,
  .pe-question-field,
  .kougai-question-title,
  .kougai-question-subject,
  .question-attempt-stats {
    min-height: 22px;
    padding: 2px 4px;
    font-size: 0.56rem;
    line-height: 1.1;
  }

  .pe-question-title,
  .kougai-question-title {
    word-spacing: -0.18em;
  }
}

.question-text.html-question .pe-question-image img {
  display: block;
  width: auto;
  max-width: 100%;
  padding: 10px;
  border-color: rgba(87, 55, 13, 0.48);
  border-radius: 6px;
  background: #fff;
}

.pe-question-source {
  display: none;
}

.frac {
  display: inline-grid;
  grid-template-rows: auto auto;
  vertical-align: middle;
  text-align: center;
  line-height: 1.05;
  margin: 0 0.15em;
}

.frac > span:first-child {
  border-bottom: 1px solid currentColor;
  padding: 0 0.2em 0.08em;
}

@keyframes typewriterCaret {
  50% {
    opacity: 0;
  }
}

@keyframes spin {
  to {
    transform: rotate(360deg);
  }
}

@keyframes centerNoticeIn {
  0% {
    opacity: 0;
    transform: translate(-50%, -50%) scale(0.88);
  }
  62% {
    opacity: 1;
    transform: translate(-50%, -50%) scale(1.035);
  }
  100% {
    opacity: 1;
    transform: translate(-50%, -50%) scale(1);
  }
}

@keyframes pomodoroNoticeCardIn {
  0% {
    opacity: 0;
    transform: scale(0.88);
  }
  62% {
    opacity: 1;
    transform: scale(1.035);
  }
  100% {
    opacity: 1;
    transform: scale(1);
  }
}

.answer-dock {
  position: relative;
  z-index: 1;
  min-height: 0;
  overflow-x: hidden;
  overflow-y: auto;
  overscroll-behavior: contain;
  border: 2px solid rgba(215, 173, 79, 0.84);
  border-radius: 8px;
  background:
    linear-gradient(180deg, rgba(255, 248, 232, 0.94), rgba(242, 222, 175, 0.9));
  padding: clamp(10px, 1vw, 15px);
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.48);
  scrollbar-gutter: stable;
}

.options {
  display: grid;
  grid-template-columns: 1fr;
  gap: clamp(9px, 0.8vw, 13px);
  min-width: 0;
  max-width: 100%;
}

.option-item {
  min-width: 0;
  display: grid;
  grid-template-columns: minmax(0, 1fr);
}

.options.judge-options {
  grid-template-columns: 1fr;
}

.options:not(.judge-options) .option-item:nth-child(5):last-child {
  grid-column: 1 / -1;
  justify-self: stretch;
  width: 100%;
}

.option-button {
  position: relative;
  display: grid;
  grid-template-columns: 40px minmax(0, 1fr);
  gap: 12px;
  align-items: center;
  width: 100%;
  min-height: clamp(66px, 7.2vh, 104px);
  padding: clamp(11px, 1.05vw, 17px) clamp(16px, 1.35vw, 24px);
  border-color: #b78528;
  background: linear-gradient(180deg, #fffdf6, #f4dfaa 56%, #dbb95d);
  color: #24131d;
  text-align: left;
  line-height: 1.36;
  font-weight: 900;
  font-size: clamp(1.72rem, 2.1vw, 2.42rem);
  cursor: pointer;
  touch-action: manipulation;
  isolation: isolate;
  user-select: none;
  -webkit-user-select: none;
  -webkit-touch-callout: none;
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.72),
    0 4px 0 rgba(116, 72, 18, 0.32);
  transition:
    transform 150ms ease,
    border-color 150ms ease,
    background 150ms ease,
    box-shadow 150ms ease,
    filter 150ms ease;
}

.option-button > span {
  position: relative;
  z-index: 1;
  pointer-events: none;
  user-select: none;
  -webkit-user-select: none;
}

.option-button > span:not(.option-letter) {
  overflow-wrap: anywhere;
}

.option-content {
  min-width: 0;
  max-width: 100%;
  overflow-x: visible;
  font-size: clamp(1.3rem, 1.53vw, 1.74rem);
  font-weight: 850;
}

.option-verdict-badge {
  display: inline-flex;
  align-items: center;
  min-height: 1.55em;
  margin-left: 0.55em;
  border: 1px solid rgba(255, 248, 232, 0.68);
  border-radius: 999px;
  padding: 0.1em 0.5em;
  font-size: 0.56em;
  line-height: 1;
  font-weight: 900;
  vertical-align: 0.18em;
  white-space: nowrap;
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.28),
    0 2px 5px rgba(0, 0, 0, 0.18);
}

.option-verdict-badge.right,
.option-verdict-badge.answer {
  background: linear-gradient(180deg, rgba(39, 199, 120, 0.92), rgba(8, 116, 88, 0.96));
  color: #f0fff6;
}

.option-verdict-badge.wrong {
  background: linear-gradient(180deg, rgba(244, 80, 92, 0.94), rgba(152, 27, 43, 0.98));
  color: #fff6f6;
}

.quiz-panel.source-layout:not(.review-layout) .question-board {
  flex: 0 0 auto;
  grid-template-rows: auto auto auto;
  gap: 6px;
  padding: clamp(10px, 0.85vw, 14px);
  align-self: stretch;
  align-content: start;
  min-height: clamp(260px, 36vh, 420px);
  height: auto;
  max-height: none;
  overflow-x: hidden;
  overflow-y: visible;
}

.quiz-panel.source-layout:not(.review-layout) .question-text.html-question {
  height: auto;
  min-height: 0;
  max-height: none;
  overflow: visible;
  padding: clamp(12px, 1.2vw, 20px);
  font-size: clamp(1.42rem, 1.52vw, 2rem);
  line-height: 1.38;
  overflow-wrap: anywhere;
}

@media (min-width: 1181px) {
  .quiz-panel.source-layout:not(.review-layout) .question-text.html-question {
    min-height: clamp(150px, 12vw, 220px);
    padding-right: clamp(12px, 1.2vw, 20px);
  }
}

.quiz-panel.source-layout:not(.review-layout) .question-text.html-question img.quiz-image {
  width: auto !important;
  height: auto !important;
  max-width: min(100%, 760px) !important;
  max-height: min(34vh, 320px);
  object-fit: contain;
}

@media (min-width: 1181px) and (max-height: 1250px) {
  .quiz-panel.source-layout:not(.review-layout) .question-text.html-question {
    font-size: clamp(1.66rem, 1.74vw, 2.18rem);
    line-height: 1.42;
  }

  .quiz-panel.source-layout:not(.review-layout) .question-text.html-question img.quiz-image {
    max-height: min(30vh, 280px);
  }
}

.quiz-panel.source-layout:not(.review-layout) .question-text.html-question .img_margin,
.quiz-panel.source-layout:not(.review-layout) .question-text.html-question .choice-image,
.quiz-panel.source-layout:not(.review-layout) .question-text.html-question .pe-question-image {
  max-width: 100%;
  overflow: visible;
}

.quiz-panel.source-layout .answer-dock {
  align-self: stretch;
  min-height: clamp(220px, 32vh, 360px);
  height: auto;
  max-height: none;
  padding: 8px;
}

.quiz-panel.quiz-custom-layout.source-layout:not(.review-layout) .answer-dock {
  align-self: stretch;
  min-height: clamp(220px, 32vh, 360px);
  height: auto;
  max-height: none;
}

.quiz-panel.source-layout:not(.review-layout) .answer-dock {
  flex: 0 0 auto;
  min-height: clamp(210px, 30vh, 360px);
  max-height: none;
  overflow-y: auto;
  overscroll-behavior: contain;
  scrollbar-gutter: stable;
}

.quiz-panel.source-layout.inline-choice-feedback:not(.review-layout) .question-board {
  flex: 0 0 auto;
  min-height: clamp(112px, 18vh, 230px);
  max-height: min(24vh, 280px);
}

.quiz-panel.source-layout.inline-choice-feedback:not(.review-layout) .question-text.html-question {
  min-height: 0;
  padding: 8px 10px;
  font-size: clamp(0.92rem, 1.04vw, 1.2rem);
  line-height: 1.28;
  overflow: hidden;
}

.quiz-panel.source-layout.inline-choice-feedback:not(.review-layout) .answer-dock {
  flex: 1 1 auto;
  min-height: 0;
  max-height: none;
}

.quiz-panel.source-layout:not(.review-layout) .feedback:not(.hidden) {
  flex: 0 0 auto;
  min-height: clamp(180px, 28vh, 320px);
  max-height: min(56dvh, 680px);
  overflow-x: auto;
  overflow-y: auto;
  overscroll-behavior: contain;
  scrollbar-gutter: stable;
  scrollbar-width: thin;
  -ms-overflow-style: auto;
}

.quiz-panel.source-layout:not(.review-layout):has(.feedback:not(.hidden)) .answer-dock {
  flex: 0 0 auto;
  max-height: none;
}

.quiz-panel.source-layout:not(.review-layout) .feedback-body {
  overflow-x: auto;
  overflow-y: visible;
}

.quiz-panel.source-layout:not(.review-layout) .feedback:not(.hidden)::-webkit-scrollbar,
.quiz-panel.source-layout:not(.review-layout) .feedback-body::-webkit-scrollbar {
  display: block !important;
  width: 10px;
  height: 10px;
}

.quiz-panel.source-layout.review-layout .question-board {
  min-height: 0;
}

.quiz-panel.source-layout .options {
  gap: 7px;
}

.quiz-panel.source-layout .option-button {
  min-height: clamp(46px, 5.2vh, 74px);
  padding: 7px 14px;
  font-size: clamp(1.4rem, 1.63vw, 1.85rem);
}

.option-button::before,
.option-button::after {
  content: "";
  position: absolute;
  top: 50%;
  width: 0;
  height: 0;
  transform: translateY(-50%);
  border-top: 9px solid transparent;
  border-bottom: 9px solid transparent;
}

.option-button::before {
  left: -1px;
  border-left: 0;
  border-right: 11px solid #0d5459;
}

.option-button::after {
  right: -1px;
  border-right: 0;
  border-left: 11px solid #b78528;
}

.option-button:not(:disabled):hover,
.option-button:not(:disabled):focus-visible {
  z-index: 3;
  border-color: #fff8c9;
  background:
    radial-gradient(circle at 8% 50%, rgba(0, 214, 214, 0.22), transparent 24%),
    linear-gradient(90deg, rgba(11, 122, 120, 0.18), transparent 16%, transparent 84%, rgba(255, 189, 58, 0.28)),
    linear-gradient(180deg, #fffefb, #fff0b8 46%, #f1c243);
  color: #12080f;
  transform: translateY(-3px) scale(1.016);
  filter: brightness(1.14) saturate(1.18);
  outline: 4px solid rgba(255, 230, 122, 0.72);
  outline-offset: 3px;
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.88),
    inset 0 0 0 3px rgba(255, 255, 255, 0.38),
    0 7px 0 rgba(116, 72, 18, 0.46),
    0 0 0 2px rgba(0, 128, 128, 0.54),
    0 0 34px rgba(255, 222, 112, 0.9),
    0 0 22px rgba(0, 214, 214, 0.38),
    0 16px 28px rgba(36, 19, 29, 0.38);
}

.option-button:not(:disabled):hover::before,
.option-button:not(:disabled):focus-visible::before {
  border-right-color: #00a6a6;
  transform: translateY(-50%) translateX(-5px) scale(1.35);
  filter: drop-shadow(0 0 12px rgba(0, 214, 214, 0.9));
}

.option-button:not(:disabled):hover::after,
.option-button:not(:disabled):focus-visible::after {
  border-left-color: #f2b632;
  transform: translateY(-50%) translateX(5px) scale(1.35);
  filter: drop-shadow(0 0 12px rgba(255, 214, 92, 0.9));
}

.option-button:not(:disabled):hover .option-letter,
.option-button:not(:disabled):focus-visible .option-letter {
  transform: scale(1.18);
  background: linear-gradient(180deg, #0e9b95, #052d36);
  color: #fff7c7;
  border-color: rgba(255, 248, 201, 0.86);
  box-shadow:
    0 0 0 3px rgba(255, 248, 201, 0.3),
    0 0 20px rgba(0, 214, 214, 0.74);
}

.option-letter {
  display: grid;
  place-items: center;
  width: 36px;
  height: 36px;
  border-radius: 7px;
  background: linear-gradient(180deg, #0f5f61, #082b31);
  color: #fff8e8;
  font-weight: 900;
  font-size: 1.08rem;
  border: 1px solid rgba(255, 241, 168, 0.32);
  transition:
    transform 150ms ease,
    background 150ms ease,
    box-shadow 150ms ease;
}

.option-button.correct {
  border-color: #16a34a;
  background:
    linear-gradient(90deg, rgba(20, 83, 45, 0.18), transparent 20%),
    linear-gradient(180deg, #dcfce7, #86efac);
  box-shadow:
    inset 0 0 0 3px rgba(22, 163, 74, 0.24),
    0 0 18px rgba(34, 197, 94, 0.28);
}

.option-button.incorrect {
  border-color: #dc2626;
  background:
    linear-gradient(90deg, rgba(127, 29, 29, 0.18), transparent 20%),
    linear-gradient(180deg, #fee2e2, #fca5a5);
  box-shadow:
    inset 0 0 0 3px rgba(220, 38, 38, 0.22),
    0 0 18px rgba(239, 68, 68, 0.3);
}

.option-button.correct .option-letter {
  background: linear-gradient(180deg, #22c55e, #15803d);
  color: #f0fdf4;
}

.option-button.incorrect .option-letter {
  background: linear-gradient(180deg, #ef4444, #991b1b);
  color: #fff7ed;
}

.option-button:disabled {
  cursor: default;
  transform: none;
}

.option-item.has-explanation .option-button {
  border-bottom-right-radius: 0;
  border-bottom-left-radius: 0;
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.72),
    0 1px 0 rgba(116, 72, 18, 0.24);
}

.option-explanation-card {
  display: block;
  padding: 10px 16px 12px 64px;
  border: 2px solid rgba(143, 94, 23, 0.56);
  border-top: 0;
  border-radius: 0 0 8px 8px;
  background:
    linear-gradient(180deg, rgba(255, 253, 246, 0.98), rgba(255, 248, 232, 0.94));
  color: #2b211b;
  font-size: clamp(0.95rem, 1.08vw, 1.18rem);
  line-height: 1.48;
  font-weight: 800;
  overflow: auto;
  box-shadow:
    inset 0 1px 0 rgba(143, 94, 23, 0.12),
    0 2px 0 rgba(0, 0, 0, 0.08);
}

.option-explanation-card.correct {
  border-color: #16a34a;
  background: linear-gradient(180deg, #f0fdf4, #ecfdf5);
  box-shadow:
    inset 0 1px 0 rgba(22, 163, 74, 0.16),
    0 2px 0 rgba(0, 0, 0, 0.08);
}

.option-explanation-card.selected:not(.correct) {
  border-color: #dc2626;
  background: linear-gradient(180deg, #fff1f2, #fff7ed);
}

.option-explanation-body {
  max-width: 100%;
  overflow-x: auto;
}

.option-explanation-body > :first-child {
  margin-top: 0;
}

.option-explanation-body > :last-child {
  margin-bottom: 0;
}

.option-explanation-body ul,
.option-explanation-body ol {
  margin-top: 0;
  margin-bottom: 0;
  padding-left: 1.3em;
}

.option-explanation-body p {
  margin: 0.2em 0;
}

.answer-dock.advance-ready .option-button {
  pointer-events: none;
}

.typing-panel {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto auto;
  gap: 10px;
  align-items: center;
  margin-top: 10px;
}

.typing-panel.hidden {
  display: none;
}

.typing-panel input {
  min-height: 46px;
  border: 2px solid #8f5e17;
  border-radius: 8px;
  background: #fffdf6;
  color: #17212d;
  -webkit-text-fill-color: #17212d;
  caret-color: #0f766e;
  color-scheme: light;
  padding: 0 13px;
  font-size: clamp(1rem, 1.1vw, 1.15rem);
  font-weight: 900;
  line-height: 1.4;
  text-shadow: none;
  opacity: 1;
  outline: none;
}

.typing-panel input::placeholder {
  color: #68717d;
  -webkit-text-fill-color: #68717d;
  opacity: 1;
}

.typing-panel input:disabled {
  background: #edf1f3;
  color: #334155;
  -webkit-text-fill-color: #334155;
  opacity: 1;
}

.typing-panel input:-webkit-autofill,
.typing-panel input:-webkit-autofill:hover,
.typing-panel input:-webkit-autofill:focus {
  -webkit-text-fill-color: #17212d;
  caret-color: #0f766e;
  box-shadow: 0 0 0 1000px #fffdf6 inset;
}

.typing-panel input:focus {
  border-color: var(--active, var(--teal));
  box-shadow: 0 0 0 3px color-mix(in srgb, var(--active, var(--teal)) 24%, transparent);
}

.typing-hint {
  color: var(--muted);
  font-size: 0.86rem;
  font-weight: 900;
}

.feedback {
  position: relative;
  z-index: 1;
  border: 1px solid rgba(143, 94, 23, 0.22);
  border-top: 3px solid rgba(183, 133, 40, 0.48);
  background: rgba(255, 253, 246, 0.96);
  color: #241a18;
  padding: 16px 18px;
  border-radius: 8px;
  max-height: 30vh;
  overflow: auto;
  overscroll-behavior: contain;
  scrollbar-gutter: stable;
  font-size: clamp(1.05rem, 1.25vw, 1.28rem);
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.72),
    0 10px 22px rgba(15, 23, 42, 0.12);
}

.quiz-panel.source-layout .feedback:not(.hidden),
.quiz-panel.review-layout .feedback:not(.hidden) {
  padding-right: 30px;
}

.quiz-panel.source-layout .feedback:not(.hidden)::before,
.quiz-panel.review-layout .feedback:not(.hidden)::before {
  content: "";
  position: absolute;
  top: 56px;
  right: 11px;
  z-index: 2;
  width: 5px;
  height: clamp(44px, 22%, 76px);
  border-radius: 999px;
  background: rgba(123, 76, 20, 0.64);
  pointer-events: none;
}

.quiz-panel.source-layout .feedback:not(.hidden)::after,
.quiz-panel.review-layout .feedback:not(.hidden)::after {
  content: "";
  position: absolute;
  top: 52px;
  right: 9px;
  bottom: 12px;
  z-index: 1;
  width: 9px;
  border-radius: 999px;
  background: rgba(143, 94, 23, 0.14);
  box-shadow: inset 0 0 0 1px rgba(123, 76, 20, 0.18);
  pointer-events: none;
}

.feedback.hidden {
  display: none;
}

.feedback-title {
  color: #7f1d1d;
  font-size: clamp(1.18rem, 1.35vw, 1.42rem);
  font-weight: 900;
  margin-bottom: 8px;
}

.feedback-body {
  margin: 0;
  max-width: 100%;
  overflow-x: auto;
  padding-bottom: 8px;
  line-height: 1.72;
  font-weight: 700;
}

.feedback-main-explanation {
  margin-top: 14px;
  padding-top: 12px;
  border-top: 1px solid rgba(143, 94, 23, 0.28);
}

.review-session-summary {
  display: grid;
  gap: 10px;
  margin: 0 0 14px;
  border: 2px solid rgba(15, 118, 110, 0.28);
  border-radius: 8px;
  background:
    linear-gradient(135deg, rgba(236, 253, 245, 0.96), rgba(255, 251, 235, 0.94)),
    #fffdf6;
  padding: 12px;
  color: #17312e;
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.64),
    0 8px 18px rgba(15, 23, 42, 0.08);
}

.review-session-summary.complete {
  border-color: rgba(22, 163, 74, 0.34);
}

.review-session-summary-head {
  display: grid;
  gap: 3px;
}

.review-session-summary-head span {
  color: #0f766e;
  font-size: 0.68rem;
  font-weight: 950;
  line-height: 1;
}

.review-session-summary-head strong {
  color: #14532d;
  font-size: 1.05rem;
  font-weight: 950;
  line-height: 1.08;
}

.review-session-summary-head small {
  color: #5f3a0e;
  font-size: 0.78rem;
  font-weight: 900;
}

.review-session-summary-meter {
  overflow: hidden;
  height: 9px;
  border: 1px solid rgba(15, 118, 110, 0.18);
  border-radius: 999px;
  background: rgba(15, 118, 110, 0.1);
}

.review-session-summary-meter span {
  display: block;
  height: 100%;
  border-radius: inherit;
  background: linear-gradient(90deg, #0f766e, #facc15);
}

.review-session-summary-grid {
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  gap: 7px;
}

.review-session-summary-grid div {
  min-width: 0;
  border: 1px solid rgba(15, 118, 110, 0.14);
  border-radius: 7px;
  background: rgba(255, 255, 255, 0.62);
  padding: 7px;
}

.review-session-summary-grid span {
  display: block;
  color: #647067;
  font-size: 0.64rem;
  font-weight: 900;
  line-height: 1.1;
}

.review-session-summary-grid strong {
  display: block;
  margin-top: 3px;
  color: #17312e;
  font-size: 0.98rem;
  font-weight: 950;
  line-height: 1.08;
  overflow-wrap: anywhere;
}

.review-session-debrief {
  display: grid;
  gap: 8px;
  border: 1px solid rgba(15, 118, 110, 0.16);
  border-radius: 8px;
  background:
    linear-gradient(135deg, rgba(20, 184, 166, 0.11), rgba(250, 204, 21, 0.08)),
    rgba(255, 255, 255, 0.58);
  padding: 9px;
}

.review-session-debrief-head {
  display: flex;
  align-items: start;
  justify-content: space-between;
  gap: 10px;
}

.review-session-debrief-head span {
  display: block;
  color: #0f766e;
  font-size: 0.6rem;
  font-weight: 950;
  line-height: 1;
}

.review-session-debrief-head strong {
  display: block;
  margin-top: 3px;
  color: #14532d;
  font-size: 0.94rem;
  font-weight: 950;
  line-height: 1.12;
}

.review-session-debrief-head small {
  color: #854d0e;
  font-size: 0.68rem;
  font-weight: 950;
  white-space: nowrap;
}

.review-session-debrief-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 6px;
}

.review-session-debrief-grid div {
  min-width: 0;
  border: 1px solid rgba(15, 118, 110, 0.12);
  border-radius: 7px;
  background: rgba(255, 255, 255, 0.55);
  padding: 6px;
}

.review-session-debrief-grid span,
.review-session-debrief-grid strong {
  display: block;
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.review-session-debrief-grid span {
  color: #647067;
  font-size: 0.58rem;
  font-weight: 900;
}

.review-session-debrief-grid strong {
  margin-top: 3px;
  color: #17312e;
  font-size: 0.82rem;
  font-weight: 950;
}

.review-session-debrief-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 5px;
}

.review-session-debrief-tags span {
  min-width: 0;
  max-width: 100%;
  display: inline-flex;
  align-items: center;
  gap: 5px;
  overflow: hidden;
  border: 1px solid rgba(15, 118, 110, 0.14);
  border-radius: 999px;
  background: rgba(236, 253, 245, 0.68);
  color: #0f3f3a;
  padding: 4px 7px;
  font-size: 0.58rem;
  font-weight: 850;
  line-height: 1;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.review-session-debrief-tags b {
  color: #854d0e;
  font-variant-numeric: tabular-nums;
}

.review-session-debrief p {
  margin: 0;
  color: #5f3a0e;
  font-size: 0.66rem;
  font-weight: 850;
  line-height: 1.34;
}

.review-session-next-play {
  display: grid;
  gap: 8px;
  overflow: hidden;
  border: 1px solid rgba(20, 184, 166, 0.18);
  border-radius: 8px;
  background:
    radial-gradient(circle at 100% 0%, rgba(20, 184, 166, 0.14), transparent 36%),
    linear-gradient(135deg, rgba(255, 255, 255, 0.62), rgba(236, 253, 245, 0.46));
  padding: 9px;
}

.review-session-next-head {
  display: flex;
  align-items: end;
  justify-content: space-between;
  gap: 10px;
}

.review-session-next-head span {
  color: #0f766e;
  font-size: 0.6rem;
  font-weight: 950;
}

.review-session-next-head strong {
  color: #14532d;
  font-size: 0.92rem;
  font-weight: 950;
  line-height: 1.1;
}

.review-session-next-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 7px;
}

.review-session-next-card {
  position: relative;
  min-width: 0;
  display: grid;
  gap: 4px;
  align-content: center;
  min-height: 82px;
  overflow: hidden;
  border: 1px solid rgba(15, 118, 110, 0.16);
  border-radius: 7px;
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.86), rgba(236, 253, 245, 0.72)),
    #ecfdf5;
  color: #17312e;
  padding: 9px;
  font: inherit;
  text-align: left;
  cursor: pointer;
}

.review-session-next-card.primary {
  border-color: rgba(15, 118, 110, 0.38);
  background:
    linear-gradient(135deg, rgba(20, 184, 166, 0.24), rgba(255, 255, 255, 0.72)),
    #ecfdf5;
}

.review-session-next-card.strong {
  border-color: rgba(22, 163, 74, 0.28);
  background:
    linear-gradient(135deg, rgba(22, 163, 74, 0.16), rgba(255, 255, 255, 0.74)),
    #f0fdf4;
}

.review-session-next-card.danger {
  border-color: rgba(245, 158, 11, 0.42);
  background:
    radial-gradient(circle at 0% 0%, rgba(245, 158, 11, 0.18), transparent 42%),
    linear-gradient(135deg, rgba(255, 247, 237, 0.96), rgba(255, 255, 255, 0.72));
}

.review-session-next-card span,
.review-session-next-card strong,
.review-session-next-card small {
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.review-session-next-card span {
  color: #0f766e;
  font-size: 0.6rem;
  font-weight: 950;
}

.review-session-next-card strong {
  color: #17312e;
  font-size: 1.02rem;
  font-weight: 950;
  line-height: 1.04;
}

.review-session-next-card small {
  color: #5f3a0e;
  font-size: 0.62rem;
  font-weight: 850;
}

.review-session-next-card b {
  position: absolute;
  top: 7px;
  right: 7px;
  border: 1px solid rgba(15, 118, 110, 0.18);
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.66);
  color: #0f766e;
  padding: 2px 6px;
  font-size: 0.5rem;
  font-weight: 950;
}

.review-session-next-card:hover,
.review-session-next-card:focus-visible {
  border-color: #f59e0b;
  outline: none;
  box-shadow: 0 0 0 3px rgba(245, 158, 11, 0.14);
}

.review-session-summary-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 7px;
}

.review-session-action {
  min-height: 32px;
  border: 1px solid rgba(15, 118, 110, 0.28);
  border-radius: 7px;
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.82), rgba(236, 253, 245, 0.72)),
    #ecfdf5;
  color: #0f766e;
  padding: 0 10px;
  font: inherit;
  font-size: 0.78rem;
  font-weight: 950;
  cursor: pointer;
}

.review-session-action.primary {
  border-color: rgba(15, 118, 110, 0.72);
  background: linear-gradient(180deg, #14b8a6, #0f766e);
  color: #fffdf6;
}

.review-session-action.ghost {
  border-color: rgba(95, 58, 14, 0.22);
  background: rgba(255, 255, 255, 0.5);
  color: #5f3a0e;
}

.review-session-action:hover,
.review-session-action:focus-visible {
  border-color: #f59e0b;
  outline: none;
  box-shadow: 0 0 0 3px rgba(245, 158, 11, 0.14);
}

.feedback-main-explanation-title {
  display: inline-flex;
  align-items: center;
  width: fit-content;
  min-height: 26px;
  margin-bottom: 8px;
  padding: 3px 9px;
  border-radius: 7px;
  background: rgba(36, 19, 29, 0.12);
  color: #5f3a0e;
  font-size: 0.86rem;
  font-weight: 900;
}

.choice-explanations {
  display: grid;
  gap: 8px;
}

.choice-explanations-title {
  display: inline-flex;
  align-items: center;
  width: fit-content;
  min-height: 28px;
  padding: 3px 10px;
  border-radius: 7px;
  background: #24131d;
  color: #fff1a8;
  font-size: 0.9rem;
  font-weight: 900;
}

.choice-explanation-card {
  overflow: hidden;
  border: 2px solid rgba(143, 94, 23, 0.56);
  border-radius: 8px;
  background: #fffdf6;
  box-shadow: 0 1px 0 rgba(0, 0, 0, 0.12);
}

.choice-explanation-card.correct {
  border-color: #16a34a;
  background: #f0fdf4;
}

.choice-explanation-card.selected:not(.correct) {
  border-color: #dc2626;
  background: #fff1f2;
}

.choice-explanation-head {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr) auto;
  gap: 10px;
  align-items: center;
  padding: 8px 10px;
  border-bottom: 1px solid rgba(143, 94, 23, 0.25);
  background: linear-gradient(180deg, rgba(255, 248, 232, 0.92), rgba(245, 214, 126, 0.42));
}

.choice-explanation-card.correct .choice-explanation-head {
  background: linear-gradient(180deg, #dcfce7, #bbf7d0);
}

.choice-explanation-card.selected:not(.correct) .choice-explanation-head {
  background: linear-gradient(180deg, #ffe4e6, #fecdd3);
}

.choice-explanation-letter {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 34px;
  height: 34px;
  border-radius: 8px;
  background: linear-gradient(180deg, #0f766e, #07545b);
  color: #fff8e8;
  font-weight: 900;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.25);
}

.choice-explanation-card.correct .choice-explanation-letter {
  background: linear-gradient(180deg, #22c55e, #15803d);
}

.choice-explanation-card.selected:not(.correct) .choice-explanation-letter {
  background: linear-gradient(180deg, #ef4444, #991b1b);
}

.choice-explanation-option {
  min-width: 0;
  color: #241a18;
  font-weight: 900;
  overflow-wrap: anywhere;
}

.choice-explanation-badges {
  display: inline-flex;
  gap: 6px;
  align-items: center;
  flex-wrap: wrap;
  justify-content: flex-end;
}

.choice-explanation-badge {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 26px;
  padding: 3px 8px;
  border-radius: 999px;
  color: #fff;
  font-size: 0.82rem;
  font-weight: 900;
  white-space: nowrap;
}

.choice-explanation-badge.correct {
  background: #15803d;
}

.choice-explanation-badge.selected {
  background: #7f1d1d;
}

.choice-explanation-card.correct .choice-explanation-badge.selected {
  background: #0f766e;
}

.choice-explanation-body {
  padding: 10px 12px;
  color: #2b211b;
  line-height: 1.62;
  font-weight: 800;
}

.feedback-actions {
  position: sticky;
  top: 0;
  z-index: 2;
  display: flex;
  gap: 10px;
  align-items: center;
  flex-wrap: wrap;
  margin: 0 0 10px;
  padding: 4px 0 8px;
  background: linear-gradient(180deg, rgba(255, 253, 246, 0.98), rgba(255, 253, 246, 0.86));
}

.compact-button {
  min-height: 32px;
  padding: 0 10px;
}

.attempt-summary {
  color: var(--muted);
  font-size: 1rem;
  font-weight: 800;
}

.attempt-history {
  display: flex;
  gap: 6px;
  flex-wrap: wrap;
  margin-top: 9px;
}

.attempt-pill {
  display: inline-flex;
  gap: 6px;
  align-items: center;
  max-width: 100%;
  min-height: 34px;
  padding: 6px 10px;
  border-radius: 7px;
  border: 1px solid var(--line);
  background: #fff;
  color: #241a18;
  font-size: 0.96rem;
  line-height: 1.5;
}

.attempt-pill.ok {
  border-color: #86efac;
  background: #f0fdf4;
}

.attempt-pill.ng {
  border-color: #fecdd3;
  background: #fff1f2;
}

.attempt-pill small {
  color: var(--muted);
  white-space: nowrap;
}

.quiz-actions {
  position: relative;
  z-index: 1;
  display: grid;
  grid-template-columns: auto minmax(0, 1fr) auto;
  align-items: center;
  gap: 8px;
  width: 100%;
  min-height: 30px;
}

.answer-history-strip {
  grid-column: 1 / -1;
  display: grid;
  grid-template-columns: auto minmax(0, 1fr);
  align-items: center;
  gap: 7px;
  width: 100%;
  min-width: 0;
  min-height: 34px;
  overflow: hidden;
  padding: 3px 5px 5px;
  border-top: 1px solid rgba(101, 221, 242, 0.2);
}

.answer-history-strip.hidden {
  display: none;
}

.answer-history-marks {
  display: flex;
  align-items: center;
  gap: 6px;
  min-width: 0;
  overflow-x: auto;
  overflow-y: hidden;
  padding: 2px 1px 4px;
  scrollbar-width: thin;
  scrollbar-color: rgba(85, 219, 255, 0.62) transparent;
  overscroll-behavior-x: contain;
}

.answer-history-marks::-webkit-scrollbar {
  height: 5px;
}

.answer-history-marks::-webkit-scrollbar-thumb {
  border-radius: 999px;
  background: rgba(85, 219, 255, 0.56);
}

.answer-history-label {
  flex: 0 0 auto;
  padding: 3px 8px;
  border: 1px solid rgba(117, 222, 244, 0.28);
  border-radius: 999px;
  background: rgba(4, 18, 31, 0.94);
  color: #c9f5ff;
  font-size: 0.7rem;
  font-weight: 900;
  line-height: 1;
  white-space: nowrap;
}

.answer-history-mark {
  flex: 0 0 28px;
  display: grid;
  place-items: center;
  width: 28px;
  height: 28px;
  border: 1px solid rgba(255, 255, 255, 0.72);
  border-radius: 50%;
  color: #fff;
  font-family: "Yu Gothic UI", "Meiryo", sans-serif;
  font-size: 1.05rem;
  font-weight: 900;
  line-height: 1;
  text-shadow: 0 1px 2px rgba(0, 0, 0, 0.38);
  box-shadow: inset 0 1px rgba(255, 255, 255, 0.38), 0 2px 7px rgba(0, 0, 0, 0.28);
}

.answer-history-mark.is-correct {
  background: linear-gradient(145deg, #5ee8b2, #10a56e 58%, #087453);
}

.answer-history-mark.is-wrong {
  background: linear-gradient(145deg, #ff7894, #df3157 58%, #951b3a);
}

.answer-history-mark.is-timeout {
  background: linear-gradient(145deg, #ffcf67, #e9772e 58%, #a63f22);
}

.section-search {
  position: relative;
  z-index: 40;
  flex: 0 0 auto;
  display: inline-flex;
  align-items: stretch;
  min-width: 0;
  overflow: visible;
}

.section-search-toggle {
  position: relative;
  width: var(--topbar-control-height);
  min-width: var(--topbar-control-height);
  padding: 0;
}

.section-search-toggle::after {
  content: attr(data-tooltip);
  position: absolute;
  top: calc(100% + 8px);
  left: 50%;
  z-index: 90;
  padding: 6px 9px;
  border: 1px solid rgba(244, 206, 88, 0.42);
  border-radius: 7px;
  background: rgba(22, 18, 22, 0.96);
  color: #fff8e8;
  font-size: 0.72rem;
  line-height: 1.2;
  white-space: nowrap;
  box-shadow: 0 10px 22px rgba(0, 0, 0, 0.32);
  opacity: 0;
  pointer-events: none;
  transform: translate(-50%, -3px);
  transition: opacity 0.16s ease, transform 0.16s ease;
}

.section-search-toggle::before {
  content: "";
  position: absolute;
  top: calc(100% + 3px);
  left: 50%;
  z-index: 91;
  width: 8px;
  height: 8px;
  border-left: 1px solid rgba(244, 206, 88, 0.42);
  border-top: 1px solid rgba(244, 206, 88, 0.42);
  background: rgba(22, 18, 22, 0.96);
  opacity: 0;
  pointer-events: none;
  transform: translate(-50%, -3px) rotate(45deg);
  transition: opacity 0.16s ease, transform 0.16s ease;
}

.section-search:not(.open) .section-search-toggle:hover::after,
.section-search:not(.open) .section-search-toggle:focus-visible::after {
  opacity: 1;
  transform: translate(-50%, 0);
}

.section-search:not(.open) .section-search-toggle:hover::before,
.section-search:not(.open) .section-search-toggle:focus-visible::before {
  opacity: 1;
  transform: translate(-50%, 0) rotate(45deg);
}

.section-search-popover {
  position: absolute;
  top: calc(100% + 8px);
  left: 0;
  z-index: 80;
  width: min(420px, calc(100vw - 36px));
  padding: 6px;
  border: 1px solid rgba(244, 206, 88, 0.52);
  border-radius: 9px;
  background:
    linear-gradient(180deg, rgba(38, 19, 30, 0.97), rgba(10, 30, 36, 0.96)),
    rgba(18, 20, 26, 0.96);
  box-shadow:
    inset 0 1px 0 rgba(255, 248, 232, 0.12),
    0 16px 32px rgba(0, 0, 0, 0.36);
  opacity: 0;
  pointer-events: none;
  transform: translateY(-4px);
  visibility: hidden;
  transition: opacity 0.16s ease, transform 0.16s ease;
}

.section-search.open .section-search-popover {
  opacity: 1;
  pointer-events: auto;
  transform: translateY(0);
  visibility: visible;
}

.section-search-field {
  min-width: 0;
  height: 34px;
  display: grid;
  grid-template-columns: auto minmax(0, 1fr) auto auto;
  align-items: center;
  gap: 6px;
  padding: 0 7px 0 10px;
  border: 1px solid rgba(94, 234, 212, 0.46);
  border-radius: 9px;
  background:
    linear-gradient(180deg, rgba(10, 80, 80, 0.88), rgba(22, 31, 36, 0.82)),
    rgba(7, 32, 39, 0.82);
  color: #dffcf8;
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.12),
    0 0 12px rgba(20, 184, 166, 0.12);
}

.section-search.active .section-search-toggle {
  border-color: rgba(244, 206, 88, 0.9);
  background: linear-gradient(180deg, rgba(143, 86, 17, 0.88), rgba(68, 40, 20, 0.86));
  color: #fff1a8;
}

.section-search.active .section-search-field {
  border-color: rgba(244, 206, 88, 0.78);
  background:
    linear-gradient(180deg, rgba(92, 61, 15, 0.9), rgba(24, 29, 32, 0.84)),
    rgba(42, 26, 12, 0.82);
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.14),
    0 0 14px rgba(244, 206, 88, 0.14);
}

.section-search.empty .section-search-toggle {
  border-color: rgba(248, 113, 113, 0.78);
  background: linear-gradient(180deg, rgba(112, 28, 42, 0.9), rgba(58, 24, 31, 0.86));
  color: #ffe4e6;
}

.section-search.empty .section-search-field {
  border-color: rgba(248, 113, 113, 0.72);
  background:
    linear-gradient(180deg, rgba(98, 24, 32, 0.9), rgba(28, 23, 28, 0.84)),
    rgba(54, 16, 24, 0.82);
}

.section-search-field svg {
  width: 15px;
  height: 15px;
  color: #b7f6ed;
}

.section-search input {
  min-width: 0;
  width: 100%;
  border: 0;
  outline: 0;
  background: transparent;
  color: #fff8e8;
  font: inherit;
  font-size: 0.78rem;
  font-weight: 800;
}

.section-search input::placeholder {
  color: rgba(255, 248, 232, 0.62);
}

.section-search-count {
  white-space: nowrap;
  color: #f7e7a2;
  font-size: 0.7rem;
  font-weight: 900;
}

.section-search-clear {
  width: 22px;
  height: 22px;
  padding: 0;
  display: inline-grid;
  place-items: center;
  border: 1px solid rgba(255, 248, 232, 0.28);
  border-radius: 6px;
  background: rgba(255, 248, 232, 0.08);
  color: #fff8e8;
  cursor: pointer;
}

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

.section-search-clear svg {
  width: 13px;
  height: 13px;
}

.pager {
  display: flex;
  flex-wrap: nowrap;
  gap: 4px;
  justify-content: flex-start;
  min-width: 0;
  width: 100%;
  max-width: none;
  overflow-x: auto;
  overflow-y: hidden;
  padding: 3px 4px 5px;
  overscroll-behavior-x: contain;
  scrollbar-width: thin;
}

.pager::-webkit-scrollbar {
  height: 6px;
}

.pager::-webkit-scrollbar-thumb {
  border-radius: 999px;
  background: rgba(244, 206, 88, 0.42);
}

.pager button {
  position: relative;
  overflow: visible;
  flex: 0 0 28px;
  width: 28px;
  height: 26px;
  border: 1px solid #a46a17;
  border-radius: 5px;
  background: #fff8e8;
  color: #241a18;
  cursor: pointer;
  font-size: 0.78rem;
  font-weight: 900;
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.72),
    0 1px 0 rgba(0, 0, 0, 0.22);
}

.pager button.correct-dot {
  border-color: #16a34a;
  background: linear-gradient(180deg, #22c55e, #15803d);
  color: #f0fdf4;
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.36),
    0 0 0 1px rgba(220, 252, 231, 0.3),
    0 2px 0 rgba(5, 46, 22, 0.5);
}

.pager button.wrong-dot {
  border-color: #ef4444;
  background: linear-gradient(180deg, #ef4444, #991b1b);
  color: #fff7ed;
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.32),
    0 0 0 1px rgba(254, 226, 226, 0.32),
    0 2px 0 rgba(69, 10, 10, 0.55);
}

.pager button.review-dot {
  border-color: #38bdf8;
  background: linear-gradient(180deg, #38bdf8, #0369a1);
  color: #f0f9ff;
}

.pager button.calculation-dot {
  isolation: isolate;
}

.pager button.calculation-dot::before {
  content: "";
  position: absolute;
  inset: 2px;
  border-radius: 4px;
  padding: 2px;
  background: conic-gradient(from 20deg, #ff1744, #ff9100, #ffea00, #00e676, #00b0ff, #651fff, #d500f9, #ff1744);
  pointer-events: none;
  z-index: 1;
  -webkit-mask:
    linear-gradient(#000 0 0) content-box,
    linear-gradient(#000 0 0);
  -webkit-mask-composite: xor;
  mask-composite: exclude;
}

.pager button.calculation-dot.active {
  outline: 0;
  box-shadow:
    inset 0 0 0 1px rgba(4, 11, 18, 0.72),
    inset 0 1px 0 rgba(255, 255, 255, 0.32);
}

.pager button.favorite-dot::after {
  content: attr(data-favorite-mark);
  position: absolute;
  top: -6px;
  right: -6px;
  display: grid;
  place-items: center;
  width: 14px;
  height: 14px;
  border: 1px solid #fff8e8;
  border-radius: 999px;
  background: linear-gradient(180deg, #fff2a8 0%, #f4c542 55%, #a46a17 100%);
  color: #3b2505;
  font-size: 0.58rem;
  line-height: 1;
  text-shadow: 0 1px 0 rgba(255, 248, 232, 0.7);
  box-shadow:
    0 2px 5px rgba(0, 0, 0, 0.34),
    inset 0 1px 0 rgba(255, 255, 255, 0.56);
}

.pager button.understanding-dot::after {
  content: attr(data-understanding-mark);
  position: absolute;
  top: -6px;
  right: -6px;
  display: grid;
  place-items: center;
  width: 14px;
  height: 14px;
  border: 1px solid #fff8e8;
  border-radius: 999px;
  color: #fffdf6;
  font-size: 0.58rem;
  line-height: 1;
  text-shadow: 0 1px 0 rgba(0, 0, 0, 0.44);
  box-shadow:
    0 2px 5px rgba(0, 0, 0, 0.34),
    inset 0 1px 0 rgba(255, 255, 255, 0.56);
}

.pager button.understanding-lost::after {
  background: linear-gradient(180deg, #fb7185 0%, #dc2626 62%, #7f1d1d 100%);
}

.pager button.understanding-confused::after {
  background: linear-gradient(180deg, #fdba74 0%, #ea580c 62%, #7c2d12 100%);
}

.pager button.understanding-partial::after {
  background: linear-gradient(180deg, #fff2a8 0%, #f4c542 55%, #a46a17 100%);
  color: #3b2505;
  text-shadow: 0 1px 0 rgba(255, 248, 232, 0.7);
}

.pager button.understanding-complete::after {
  background: linear-gradient(180deg, #86efac 0%, #16a34a 62%, #166534 100%);
}

.pager button.understanding-worthless::after {
  background: linear-gradient(180deg, #c4b5fd 0%, #7c3aed 62%, #4c1d95 100%);
}

.pager button.active {
  z-index: 2;
  border-color: #fff1a8;
  background:
    linear-gradient(180deg, #b42318 0%, #7f1d1d 62%, #420b12 100%);
  color: #fffdf6;
  transform: none;
  outline: 2px solid rgba(255, 227, 125, 0.96);
  outline-offset: 1px;
  box-shadow:
    0 0 0 2px rgba(127, 29, 29, 0.9),
    0 0 12px rgba(255, 227, 125, 0.62),
    0 3px 8px rgba(0, 0, 0, 0.28),
    inset 0 1px 0 rgba(255, 255, 255, 0.32);
}

.right-rail {
  min-width: 0;
  min-height: 0;
  max-height: 100%;
  display: grid;
  grid-template-rows: repeat(3, auto);
  align-content: start;
  gap: 12px;
  overflow-y: auto;
  overscroll-behavior: contain;
  scrollbar-gutter: stable;
  color: #fff8e8;
}

.score-boss,
.weather-card,
.study-time-card,
.review-curriculum-card,
.side-stats {
  border: 2px solid rgba(244, 206, 88, 0.78);
  border-radius: 8px;
  background:
    linear-gradient(180deg, rgba(33, 17, 28, 0.78), rgba(6, 39, 41, 0.8)),
    var(--academy-bg) right center / auto 100% no-repeat,
    rgba(33, 17, 28, 0.76);
  background-blend-mode: normal, soft-light, normal;
  box-shadow:
    inset 0 0 0 1px rgba(255, 248, 232, 0.1),
    0 16px 30px rgba(0, 0, 0, 0.26);
  backdrop-filter: blur(3px);
}

.score-boss {
  padding: 12px;
}

.score-boss strong {
  display: block;
  color: #ffe37d;
  font-size: clamp(1.24rem, 1.65vw, 2rem);
  line-height: 1;
  text-align: right;
  font-variant-numeric: tabular-nums;
  text-shadow: 0 3px 0 rgba(0, 0, 0, 0.36);
}

.score-boss strong small,
.time-card strong small {
  display: inline-block;
  margin-left: 0.12em;
  font-size: 0.5em;
  line-height: 1;
  vertical-align: baseline;
}

.score-track.large {
  height: 14px;
  margin-top: 10px;
}

.weather-card {
  display: grid;
  gap: 7px;
  padding: 9px;
  background:
    linear-gradient(135deg, rgba(22, 82, 104, 0.74), rgba(44, 20, 32, 0.78)),
    var(--academy-bg) 70% center / auto 100% no-repeat,
    rgba(6, 39, 41, 0.82);
  background-blend-mode: normal, soft-light, normal;
}

.weather-card[data-weather="clear"] {
  background:
    linear-gradient(135deg, rgba(8, 120, 132, 0.76), rgba(127, 29, 29, 0.46)),
    var(--academy-bg) 70% center / auto 100% no-repeat,
    rgba(6, 39, 41, 0.82);
}

.weather-card[data-weather="rain"],
.weather-card[data-weather="storm"] {
  background:
    linear-gradient(135deg, rgba(25, 48, 84, 0.82), rgba(41, 18, 52, 0.78)),
    var(--academy-bg) 70% center / auto 100% no-repeat,
    rgba(6, 22, 42, 0.86);
}

.weather-head {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 30px;
  gap: 8px;
  align-items: center;
}

.weather-head strong {
  display: block;
  margin-top: 1px;
  color: #fff8e8;
  font-size: 0.92rem;
  font-weight: 900;
  line-height: 1.1;
}

.weather-refresh-button {
  display: grid;
  place-items: center;
  width: 30px;
  height: 30px;
  border: 1px solid rgba(244, 206, 88, 0.62);
  border-radius: 7px;
  background: rgba(255, 248, 232, 0.08);
  color: #fff8e8;
  cursor: pointer;
}

.weather-refresh-button:hover,
.weather-refresh-button:focus-visible {
  border-color: #fff1a8;
  outline: none;
  box-shadow: 0 0 0 3px rgba(255, 241, 168, 0.14);
}

.weather-refresh-button:disabled {
  opacity: 0.5;
  cursor: default;
}

.weather-refresh-button svg {
  width: 15px;
  height: 15px;
}

.weather-card.loading .weather-refresh-button svg {
  animation: spin 850ms linear infinite;
}

.weather-main {
  display: grid;
  grid-template-columns: 52px minmax(0, 1fr);
  gap: 9px;
  align-items: center;
}

.weather-temp-readout {
  position: relative;
  isolation: isolate;
  overflow: hidden;
  border: 1px solid rgba(255, 248, 232, 0.12);
  border-radius: 7px;
  padding: 6px 7px;
  background: rgba(255, 248, 232, 0.06);
}

.weather-temp-readout::before {
  content: "";
  position: absolute;
  inset: 0 auto 0 0;
  z-index: -1;
  width: var(--weather-fill, 0%);
  min-width: 3px;
  background:
    linear-gradient(90deg, var(--weather-color, #38bdf8), rgba(255, 248, 232, 0.03));
  opacity: 0.42;
  transition:
    width 420ms ease,
    background-color 220ms ease,
    opacity 220ms ease;
}

.weather-icon {
  position: relative;
  display: block;
  width: 52px;
  height: 52px;
  border: 0;
  border-radius: 50%;
  background-image: url("./assets/weather/weather-cloudy.png");
  background-position: center;
  background-repeat: no-repeat;
  background-size: contain;
  color: transparent;
  font-size: 0;
  line-height: 1;
  overflow: hidden;
  box-shadow:
    0 10px 18px rgba(0, 0, 0, 0.24),
    0 0 18px rgba(95, 189, 255, 0.16);
  filter: saturate(1.08) contrast(1.02);
}

.weather-icon::after {
  content: "";
  position: absolute;
  inset: 0;
  border-radius: inherit;
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.42),
    inset 0 -8px 16px rgba(4, 22, 44, 0.2);
  pointer-events: none;
}

.weather-icon[data-weather-icon="clear"] {
  background-image: url("./assets/weather/weather-clear.png");
}

.weather-icon[data-weather-icon="partly"] {
  background-image: url("./assets/weather/weather-partly.png");
}

.weather-icon[data-weather-icon="cloudy"],
.weather-icon[data-weather-icon="unknown"] {
  background-image: url("./assets/weather/weather-cloudy.png");
}

.weather-icon[data-weather-icon="fog"] {
  background-image: url("./assets/weather/weather-fog.png");
}

.weather-icon[data-weather-icon="drizzle"] {
  background-image: url("./assets/weather/weather-drizzle.png");
}

.weather-icon[data-weather-icon="rain"] {
  background-image: url("./assets/weather/weather-rain.png");
}

.weather-icon[data-weather-icon="storm"] {
  background-image: url("./assets/weather/weather-storm.png");
}

.weather-icon[data-weather-icon="snow"] {
  background-image: url("./assets/weather/weather-snow.png");
}

.weather-card.loading .weather-icon {
  animation: weather-icon-breathe 1.4s ease-in-out infinite;
}

@keyframes weather-icon-breathe {
  0%,
  100% {
    filter: saturate(1.02) contrast(1.01) brightness(0.92);
    transform: scale(0.98);
  }

  50% {
    filter: saturate(1.14) contrast(1.03) brightness(1.05);
    transform: scale(1.02);
  }
}

.weather-main strong {
  position: relative;
  display: block;
  color: #ffe37d;
  font-size: clamp(1.34rem, 1.62vw, 1.82rem);
  font-weight: 900;
  line-height: 1;
  font-variant-numeric: tabular-nums;
  text-shadow: 0 2px 0 rgba(0, 0, 0, 0.34);
}

.weather-main span:not(.weather-icon) {
  position: relative;
  display: block;
  margin-top: 4px;
  color: rgba(255, 248, 232, 0.78);
  font-size: 0.78rem;
  font-weight: 900;
}

.weather-temp-readout[data-weather-tone="cold"] strong,
.weather-temp-readout[data-weather-tone="cool"] strong {
  color: #bae6fd;
}

.weather-temp-readout[data-weather-tone="mild"] strong {
  color: #bbf7d0;
}

.weather-temp-readout[data-weather-tone="warm"] strong {
  color: #fef08a;
}

.weather-temp-readout[data-weather-tone="hot"] strong {
  color: #fed7aa;
}

.weather-temp-readout[data-weather-tone="danger"] strong {
  color: #fecaca;
}

.weather-metrics {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 5px;
}

.weather-metrics div {
  position: relative;
  isolation: isolate;
  overflow: hidden;
  min-width: 0;
  border: 1px solid rgba(255, 248, 232, 0.13);
  border-radius: 6px;
  background: rgba(255, 248, 232, 0.07);
  padding: 5px 6px;
}

.weather-metrics div::before {
  content: "";
  position: absolute;
  inset: 0 auto 0 0;
  z-index: -1;
  width: var(--weather-fill, 0%);
  min-width: 2px;
  background:
    linear-gradient(90deg, var(--weather-color, #38bdf8), rgba(255, 248, 232, 0.02));
  opacity: 0.34;
  transition:
    width 420ms ease,
    opacity 220ms ease,
    background-color 220ms ease;
}

.weather-metrics div[data-weather-note]::after {
  content: attr(data-weather-note);
  position: absolute;
  top: 4px;
  right: 5px;
  z-index: 1;
  max-width: 58%;
  border: 1px solid rgba(255, 248, 232, 0.14);
  border-radius: 999px;
  background: rgba(6, 16, 22, 0.42);
  color: rgba(255, 248, 232, 0.86);
  padding: 1px 5px;
  font-size: 0.48rem;
  font-weight: 950;
  line-height: 1.15;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  pointer-events: none;
}

.weather-metrics div[data-weather-tone="mild"] strong {
  color: #bbf7d0;
}

.weather-metrics div[data-weather-tone="dry"] strong,
.weather-metrics div[data-weather-tone="warm"] strong {
  color: #fde68a;
}

.weather-metrics div[data-weather-tone="cool"] strong,
.weather-metrics div[data-weather-tone="rain"] strong,
.weather-metrics div[data-weather-tone="wind"] strong {
  color: #bfdbfe;
}

.weather-metrics div[data-weather-tone="hot"] strong,
.weather-metrics div[data-weather-tone="wet"] strong {
  color: #fed7aa;
}

.weather-metrics div[data-weather-tone="danger"] {
  border-color: rgba(248, 113, 113, 0.46);
  box-shadow: inset 0 0 0 1px rgba(248, 113, 113, 0.08);
}

.weather-metrics div[data-weather-tone="danger"] strong {
  color: #fecaca;
}

.weather-metrics span,
.weather-card small {
  position: relative;
  display: block;
  color: rgba(255, 248, 232, 0.62);
  font-size: 0.56rem;
  font-weight: 900;
  line-height: 1.15;
}

.weather-metrics strong {
  position: relative;
  display: block;
  margin-top: 2px;
  color: #fff1a8;
  font-size: 0.76rem;
  font-weight: 900;
  font-variant-numeric: tabular-nums;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.weather-card.error {
  border-color: rgba(255, 107, 107, 0.74);
}

.visually-hidden {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0 0 0 0);
  white-space: nowrap;
  border: 0;
}

.study-time-card {
  display: grid;
  grid-template-columns: 1fr;
  gap: 8px;
  padding: 10px;
}

.study-clock,
.study-stopwatch {
  min-width: 0;
  border: 1px solid rgba(255, 248, 232, 0.16);
  border-radius: 8px;
  background:
    linear-gradient(135deg, rgba(127, 29, 29, 0.28), rgba(4, 54, 55, 0.58)),
    rgba(255, 248, 232, 0.06);
  padding: 8px;
  box-shadow: inset 0 0 0 1px rgba(255, 248, 232, 0.06);
}

.study-clock {
  display: grid;
  justify-items: center;
  gap: 6px;
}

.study-report {
  min-width: 0;
  display: grid;
  gap: 8px;
  border: 1px solid rgba(255, 248, 232, 0.16);
  border-radius: 8px;
  background:
    linear-gradient(135deg, rgba(127, 29, 29, 0.2), rgba(4, 54, 55, 0.48)),
    rgba(255, 248, 232, 0.05);
  padding: 8px;
  box-shadow: inset 0 0 0 1px rgba(255, 248, 232, 0.05);
}

.study-time-label {
  display: block;
  color: #ffe37d;
  font-size: 0.62rem;
  font-weight: 900;
  letter-spacing: 0;
}

.study-stopwatch strong {
  display: block;
  margin-top: 2px;
  color: #fff1a8;
  font-size: clamp(1.03rem, 1.16vw, 1.32rem);
  line-height: 1;
  font-variant-numeric: tabular-nums;
  text-shadow: 0 2px 0 rgba(0, 0, 0, 0.34);
}

.analog-clock {
  position: relative;
  width: min(158px, 86%);
  aspect-ratio: 1;
  margin: 3px auto 0;
  border: 4px solid rgba(225, 204, 128, 0.88);
  border-radius: 50%;
  background:
    radial-gradient(circle at 50% 50%, rgba(51, 31, 20, 0.26) 0 3px, transparent 4px),
    radial-gradient(circle at 50% 50%, transparent 0 43%, rgba(83, 59, 32, 0.16) 44% 45%, transparent 46%),
    conic-gradient(
      from -90deg,
      rgba(109, 82, 41, 0.22),
      transparent 16deg,
      rgba(255, 248, 220, 0.34) 44deg,
      transparent 76deg,
      rgba(93, 67, 34, 0.18) 118deg,
      transparent 170deg,
      rgba(255, 246, 210, 0.28) 226deg,
      transparent 290deg,
      rgba(109, 82, 41, 0.22)
    ),
    radial-gradient(circle at 50% 49%, #f2e6bd 0 58%, #d7c28b 59% 66%, #84724b 67% 69%, #1d1712 70% 72%, #c4ad68 73% 77%, #34271a 78% 100%);
  box-shadow:
    inset 0 0 0 2px rgba(255, 248, 217, 0.38),
    inset 0 0 0 8px rgba(36, 24, 16, 0.2),
    inset 0 -18px 28px rgba(58, 37, 22, 0.28),
    inset 0 12px 24px rgba(255, 246, 198, 0.3),
    0 0 0 1px rgba(37, 25, 16, 0.8),
    0 10px 26px rgba(0, 0, 0, 0.34);
}

.analog-clock::before {
  content: "";
  position: absolute;
  inset: 9px;
  border: 2px solid rgba(83, 59, 32, 0.38);
  border-radius: 50%;
  background:
    repeating-conic-gradient(
      from -90deg,
      rgba(60, 40, 24, 0.72) 0deg 1.1deg,
      transparent 1.1deg 6deg
    );
  -webkit-mask: radial-gradient(circle, transparent 0 82%, #000 83% 88%, transparent 89%);
  mask: radial-gradient(circle, transparent 0 82%, #000 83% 88%, transparent 89%);
  pointer-events: none;
}

.analog-clock::after {
  content: "";
  position: absolute;
  inset: 19px;
  border: 1px solid rgba(83, 59, 32, 0.24);
  border-radius: 50%;
  background:
    linear-gradient(45deg, transparent 47%, rgba(110, 82, 41, 0.2) 48% 52%, transparent 53%),
    linear-gradient(-45deg, transparent 47%, rgba(110, 82, 41, 0.16) 48% 52%, transparent 53%);
  opacity: 0.55;
  pointer-events: none;
}

.clock-number {
  position: absolute;
  z-index: 2;
  color: #2a1a12;
  font-family:
    "Times New Roman",
    "Yu Mincho",
    "Hiragino Mincho ProN",
    serif;
  font-size: 0.78rem;
  font-weight: 900;
  line-height: 1;
  text-shadow:
    0 1px 0 rgba(255, 251, 225, 0.78),
    0 0 6px rgba(122, 84, 35, 0.12);
  pointer-events: none;
}

.clock-number.r12 {
  top: 12%;
  left: 50%;
  transform: translate(-50%, -50%);
}

.clock-number.r1 {
  top: 17%;
  left: 67%;
  transform: translate(-50%, -50%);
}

.clock-number.r2 {
  top: 31%;
  left: 81%;
  transform: translate(-50%, -50%);
}

.clock-number.r3 {
  top: 50%;
  left: 87%;
  transform: translate(-50%, -50%);
}

.clock-number.r4 {
  top: 68%;
  left: 81%;
  transform: translate(-50%, -50%);
}

.clock-number.r5 {
  top: 82%;
  left: 67%;
  transform: translate(-50%, -50%);
}

.clock-number.r6 {
  top: 88%;
  left: 50%;
  transform: translate(-50%, -50%);
}

.clock-number.r7 {
  top: 82%;
  left: 33%;
  transform: translate(-50%, -50%);
}

.clock-number.r8 {
  top: 68%;
  left: 19%;
  transform: translate(-50%, -50%);
}

.clock-number.r9 {
  top: 50%;
  left: 13%;
  transform: translate(-50%, -50%);
}

.clock-number.r10 {
  top: 31%;
  left: 19%;
  transform: translate(-50%, -50%);
}

.clock-number.r11 {
  top: 17%;
  left: 33%;
  transform: translate(-50%, -50%);
}

.clock-hand {
  position: absolute;
  z-index: 3;
  left: 50%;
  bottom: 50%;
  border-radius: 999px;
  transform: translateX(-50%) rotate(0deg);
  transform-origin: 50% 100%;
  pointer-events: none;
}

.hour-hand {
  width: 7px;
  height: 28%;
  background:
    linear-gradient(90deg, rgba(240, 209, 124, 0.8), transparent 18% 82%, rgba(240, 209, 124, 0.64)),
    linear-gradient(180deg, #2b1811, #090605);
  box-shadow:
    0 0 0 1px rgba(240, 209, 124, 0.32),
    0 3px 7px rgba(0, 0, 0, 0.28);
}

.minute-hand {
  width: 5px;
  height: 39%;
  background:
    linear-gradient(90deg, rgba(240, 209, 124, 0.76), transparent 20% 80%, rgba(240, 209, 124, 0.58)),
    linear-gradient(180deg, #1d1310, #060403);
  box-shadow:
    0 0 0 1px rgba(240, 209, 124, 0.28),
    0 3px 7px rgba(0, 0, 0, 0.26);
}

.second-hand {
  width: 2px;
  height: 43%;
  background: linear-gradient(180deg, #8f1f1f, #5f1414);
  box-shadow: 0 0 8px rgba(143, 31, 31, 0.3);
}

.hour-hand::after,
.minute-hand::after {
  content: "";
  position: absolute;
  left: 50%;
  top: -4px;
  width: 10px;
  aspect-ratio: 1;
  border: 1px solid rgba(240, 209, 124, 0.62);
  background: #17100d;
  transform: translateX(-50%) rotate(45deg);
}

.minute-hand::after {
  width: 8px;
}

.clock-center {
  position: absolute;
  z-index: 4;
  left: 50%;
  top: 50%;
  width: 15px;
  aspect-ratio: 1;
  border: 2px solid rgba(255, 237, 169, 0.92);
  border-radius: 50%;
  background:
    radial-gradient(circle at 38% 32%, rgba(255, 246, 207, 0.92) 0 16%, transparent 17%),
    radial-gradient(circle, #7d1b1b 0 45%, #2d0f0e 48% 100%);
  box-shadow:
    0 0 0 2px rgba(45, 27, 16, 0.42),
    0 3px 7px rgba(0, 0, 0, 0.38);
  transform: translate(-50%, -50%);
  pointer-events: none;
}

.study-clock small {
  display: block;
  min-height: 1em;
  margin-top: 0;
  color: rgba(255, 248, 232, 0.74);
  font-size: 0.72rem;
  font-weight: 800;
}

.pomodoro-panel {
  display: grid;
  gap: 6px;
  margin-top: 8px;
  padding-top: 8px;
  border-top: 1px solid rgba(255, 248, 232, 0.12);
}

.pomodoro-head,
.study-effort-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
}

.pomodoro-head strong {
  color: #fff1a8;
  font-size: 0.82rem;
  font-weight: 900;
  font-variant-numeric: tabular-nums;
}

.pomodoro-status {
  display: grid;
  gap: 2px;
  justify-items: end;
  min-width: 0;
}

.pomodoro-set-label {
  color: rgba(255, 248, 232, 0.7);
  font-size: 0.64rem;
  font-weight: 900;
  line-height: 1;
  white-space: nowrap;
}

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

.pomodoro-preset select {
  width: 100%;
  min-width: 0;
  height: 32px;
  border: 1px solid rgba(244, 206, 88, 0.48);
  border-radius: 7px;
  background:
    linear-gradient(180deg, rgba(255, 248, 232, 0.16), rgba(255, 248, 232, 0.08)),
    rgba(10, 38, 42, 0.76);
  color: #fff8e8;
  font-size: 0.78rem;
  font-weight: 900;
  outline: none;
  padding: 0 8px;
  cursor: pointer;
}

.pomodoro-preset select:focus-visible {
  border-color: #fff1a8;
  box-shadow: 0 0 0 2px rgba(255, 241, 168, 0.2);
}

.pomodoro-preset option {
  background: #fff8e8;
  color: #241a18;
}

.pomodoro-track,
.study-effort-track {
  position: relative;
  height: 8px;
  overflow: hidden;
  border-radius: 999px;
  background: rgba(255, 248, 232, 0.16);
  box-shadow: inset 0 1px 4px rgba(0, 0, 0, 0.48);
}

.pomodoro-track > span,
.study-effort-track > span {
  position: absolute;
  inset: 0 auto 0 0;
  width: 0;
  border-radius: inherit;
  transition: width 180ms ease;
}

.pomodoro-track > span {
  background: linear-gradient(90deg, #31d37b, #ffe14d);
}

.study-stopwatch.pomodoro-break .pomodoro-track > span {
  background: linear-gradient(90deg, #5cc9ff, #b98cff);
}

.pomodoro-actions {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 36px;
  gap: 7px;
}

.pomodoro-actions .study-time-button[disabled] {
  opacity: 0.42;
  cursor: default;
}

.study-effort {
  display: grid;
  gap: 5px;
  border: 1px solid rgba(244, 206, 88, 0.22);
  border-radius: 7px;
  background:
    linear-gradient(135deg, rgba(33, 150, 127, 0.24), rgba(127, 29, 29, 0.18)),
    rgba(255, 248, 232, 0.06);
  padding: 7px;
}

.study-effort-head span {
  color: rgba(255, 248, 232, 0.8);
  font-size: 0.72rem;
  font-weight: 900;
}

.study-effort-head strong {
  color: #fff1a8;
  font-size: 0.86rem;
  font-weight: 900;
  font-variant-numeric: tabular-nums;
}

.study-effort-track > span {
  background: linear-gradient(90deg, #5a6470, #9ca3af);
}

.study-effort-track > span[data-level="warm"] {
  background: linear-gradient(90deg, #36c983, #ffe14d);
}

.study-effort-track > span[data-level="strong"] {
  background: linear-gradient(90deg, #1fc16b, #ffe14d, #ff9f1a);
}

.study-effort-track > span[data-level="clear"] {
  background: linear-gradient(90deg, #20d67b, #ffe14d, #ff5b9f);
}

.study-effort small {
  color: rgba(255, 248, 232, 0.7);
  font-size: 0.62rem;
  font-weight: 800;
  line-height: 1.2;
}

.study-effort #studyEffortDetail {
  color: #fff1a8;
  font-size: 0.7rem;
  font-weight: 900;
  font-variant-numeric: tabular-nums;
}

.study-report-summary {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 6px;
}

.study-report-summary > div {
  min-width: 0;
  border: 1px solid rgba(255, 248, 232, 0.12);
  border-radius: 7px;
  background: rgba(255, 248, 232, 0.07);
  padding: 7px;
}

.study-report-summary strong {
  display: block;
  margin-top: 2px;
  color: #fff1a8;
  font-size: 0.94rem;
  line-height: 1.1;
  font-variant-numeric: tabular-nums;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.study-running-context {
  min-height: 24px;
  padding: 4px 7px;
  border-radius: 999px;
  background: rgba(255, 248, 232, 0.08);
  color: rgba(255, 248, 232, 0.78);
  font-size: 0.72rem;
  font-weight: 900;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.study-report-tabs {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 5px;
}

.study-report-tab {
  min-width: 0;
  min-height: 28px;
  border: 1px solid rgba(244, 206, 88, 0.42);
  border-radius: 7px;
  background: rgba(44, 20, 32, 0.64);
  color: rgba(255, 248, 232, 0.82);
  font: inherit;
  font-size: 0.72rem;
  font-weight: 900;
  cursor: pointer;
}

.study-report-tab.active {
  border-color: rgba(111, 239, 183, 0.86);
  background:
    linear-gradient(180deg, rgba(33, 150, 127, 0.72), rgba(8, 86, 84, 0.72)),
    rgba(4, 54, 55, 0.82);
  color: #fffdf6;
}

.study-backup-actions {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 5px;
}

.study-backup-button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 5px;
  min-width: 0;
  min-height: 30px;
  border: 1px solid rgba(244, 206, 88, 0.38);
  border-radius: 7px;
  background:
    linear-gradient(180deg, rgba(255, 248, 232, 0.11), rgba(255, 248, 232, 0.04)),
    rgba(44, 20, 32, 0.62);
  color: rgba(255, 248, 232, 0.86);
  font: inherit;
  font-size: 0.72rem;
  font-weight: 900;
  cursor: pointer;
}

.study-backup-button:hover,
.study-backup-button:focus-visible {
  border-color: rgba(111, 239, 183, 0.86);
  color: #fffdf6;
  outline: none;
  box-shadow: 0 0 0 3px rgba(111, 239, 183, 0.12);
}

.study-backup-button svg {
  width: 14px;
  height: 14px;
}

.study-sync-status {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 0;
  min-height: 30px;
  border: 1px solid rgba(255, 248, 232, 0.18);
  border-radius: 7px;
  background: rgba(255, 248, 232, 0.08);
  color: rgba(255, 248, 232, 0.82);
  padding: 4px 7px;
  font-size: 0.72rem;
  font-weight: 900;
  line-height: 1.15;
  text-align: center;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.study-sync-status[data-sync-status="synced"] {
  border-color: rgba(111, 239, 183, 0.46);
  background: rgba(5, 88, 72, 0.42);
  color: #eafff5;
}

.study-sync-status[data-sync-status="syncing"],
.study-sync-status[data-sync-status="merging"] {
  border-color: rgba(87, 197, 255, 0.54);
  background: rgba(14, 94, 141, 0.36);
  color: #e9f8ff;
}

.study-sync-status[data-sync-status="pending"] {
  border-color: rgba(244, 206, 88, 0.44);
  background: rgba(116, 73, 17, 0.34);
  color: #fff4c2;
}

.study-sync-status[data-sync-status="error"] {
  border-color: rgba(255, 107, 107, 0.58);
  background: rgba(127, 29, 29, 0.38);
  color: #ffe4e4;
}

.study-backup-status {
  display: none;
  min-height: 24px;
  border: 1px solid rgba(111, 239, 183, 0.3);
  border-radius: 7px;
  background: rgba(5, 56, 52, 0.44);
  color: rgba(255, 248, 232, 0.84);
  padding: 5px 7px;
  font-size: 0.68rem;
  font-weight: 900;
  line-height: 1.25;
}

.study-backup-status.show {
  display: block;
}

.study-backup-status.error {
  border-color: rgba(255, 107, 107, 0.58);
  background: rgba(127, 29, 29, 0.38);
}

.study-report-list {
  display: grid;
  gap: 5px;
  max-height: 172px;
  overflow: auto;
  padding-right: 2px;
}

.study-report-row {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 8px;
  align-items: center;
  min-height: 38px;
  border: 1px solid rgba(255, 248, 232, 0.1);
  border-radius: 7px;
  background: rgba(5, 22, 27, 0.46);
  padding: 6px 7px;
}

.study-report-row strong,
.study-report-row span {
  display: block;
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.study-report-row strong {
  color: #fff8e8;
  font-size: 0.78rem;
  line-height: 1.15;
}

.study-report-row span {
  margin-top: 2px;
  color: rgba(255, 248, 232, 0.58);
  font-size: 0.64rem;
  font-weight: 800;
}

.study-report-row time {
  color: #fff1a8;
  font-size: 0.78rem;
  font-weight: 900;
  font-variant-numeric: tabular-nums;
  white-space: nowrap;
}

.study-report-empty {
  border: 1px dashed rgba(255, 248, 232, 0.18);
  border-radius: 7px;
  color: rgba(255, 248, 232, 0.62);
  padding: 9px;
  font-size: 0.72rem;
  font-weight: 900;
  text-align: center;
}

.review-curriculum-card {
  display: grid;
  gap: 8px;
  padding: 10px;
  background:
    linear-gradient(135deg, rgba(4, 54, 55, 0.8), rgba(44, 20, 32, 0.74)),
    var(--academy-bg) right center / auto 100% no-repeat,
    rgba(6, 39, 41, 0.82);
  background-blend-mode: normal, soft-light, normal;
}

.review-curriculum-head {
  display: flex;
  align-items: end;
  justify-content: space-between;
  gap: 8px;
}

.review-curriculum-head strong {
  display: block;
  color: #fff8e8;
  font-size: 0.9rem;
  line-height: 1.15;
  font-weight: 900;
}

.review-curriculum-head small {
  color: #fff1a8;
  font-size: 0.66rem;
  font-weight: 900;
  white-space: nowrap;
}

.review-curve-summary-toggle {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 5px;
  min-width: 92px;
  min-height: 30px;
  border: 1px solid rgba(244, 206, 88, 0.58);
  border-radius: 7px;
  background:
    linear-gradient(180deg, rgba(255, 248, 232, 0.12), rgba(255, 248, 232, 0.04)),
    rgba(44, 20, 32, 0.62);
  color: #fff1a8;
  font: inherit;
  font-size: 0.72rem;
  font-weight: 900;
  cursor: pointer;
}

.review-curve-summary-toggle svg {
  width: 14px;
  height: 14px;
  stroke-width: 2.7;
}

.review-curve-summary-toggle.active {
  border-color: rgba(111, 239, 183, 0.88);
  background:
    linear-gradient(180deg, rgba(33, 150, 127, 0.72), rgba(8, 86, 84, 0.72)),
    rgba(4, 54, 55, 0.82);
  color: #fffdf6;
}

.review-curve-summary-toggle:hover,
.review-curve-summary-toggle:focus-visible {
  border-color: #fff1a8;
  outline: none;
  box-shadow: 0 0 0 3px rgba(255, 241, 168, 0.13);
}

.review-curve-summary {
  display: grid;
  gap: 7px;
  border: 1px solid rgba(111, 239, 183, 0.32);
  border-radius: 8px;
  background:
    linear-gradient(180deg, rgba(7, 32, 34, 0.82), rgba(25, 13, 22, 0.74)),
    rgba(6, 39, 41, 0.78);
  padding: 8px;
  box-shadow: inset 0 0 0 1px rgba(255, 248, 232, 0.05);
}

.review-curve-summary.hidden {
  display: none;
}

.review-curve-headline {
  display: grid;
  gap: 2px;
}

.review-course-filter {
  display: grid;
  gap: 8px;
  border: 1px solid rgba(255, 248, 232, 0.12);
  border-radius: 8px;
  background:
    linear-gradient(90deg, rgba(255, 248, 232, 0.08), rgba(255, 248, 232, 0.03)),
    rgba(4, 20, 28, 0.44);
  padding: 9px;
}

.review-course-filter-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  color: rgba(255, 248, 232, 0.7);
  font-size: 0.7rem;
  font-weight: 950;
}

.review-course-filter-head strong {
  color: #fff1a8;
  font-size: 0.82rem;
  font-variant-numeric: tabular-nums;
}

.review-course-chip-list {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}

.review-course-chip {
  min-height: 30px;
  border: 1px solid rgba(255, 248, 232, 0.16);
  border-radius: 999px;
  background: rgba(255, 248, 232, 0.06);
  color: rgba(255, 248, 232, 0.68);
  padding: 0 10px;
  font: inherit;
  font-size: 0.7rem;
  font-weight: 950;
  cursor: pointer;
}

.review-course-chip.active {
  border-color: rgba(111, 239, 183, 0.78);
  background:
    linear-gradient(180deg, rgba(111, 239, 183, 0.24), rgba(8, 86, 84, 0.46)),
    rgba(6, 39, 41, 0.74);
  color: #ecfdf5;
  box-shadow: inset 0 1px 0 rgba(255, 248, 232, 0.14);
}

.review-course-chip:hover,
.review-course-chip:focus-visible {
  border-color: #fff1a8;
  outline: none;
  color: #fff8e8;
}

.review-course-filter small {
  color: rgba(255, 248, 232, 0.5);
  font-size: 0.62rem;
  font-weight: 850;
  line-height: 1.28;
}

.review-target-panel {
  border-color: rgba(125, 249, 199, 0.24);
  background:
    radial-gradient(circle at 12% 0%, rgba(125, 249, 199, 0.15), transparent 34%),
    linear-gradient(135deg, rgba(11, 72, 65, 0.58), rgba(41, 18, 31, 0.58)),
    rgba(3, 18, 24, 0.5);
}

.review-target-head {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 0.95fr);
  align-items: start;
  gap: 10px;
}

.review-target-head span,
.review-target-head small {
  color: rgba(255, 248, 232, 0.62);
  font-weight: 900;
  line-height: 1.28;
}

.review-target-head span {
  display: block;
  font-size: 0.56rem;
  font-weight: 950;
}

.review-target-head strong {
  display: block;
  color: #fff8e8;
  font-size: 1.05rem;
  font-weight: 950;
  line-height: 1.05;
  font-variant-numeric: tabular-nums;
}

.review-target-head small {
  justify-self: end;
  max-width: 100%;
  text-align: right;
  color: #fff1a8;
  font-size: 0.58rem;
}

.review-target-actions {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 6px;
}

.review-target-actions button,
.review-target-chip {
  appearance: none;
  min-width: 0;
  border: 1px solid rgba(255, 248, 232, 0.14);
  color: #fff8e8;
  font: inherit;
  cursor: pointer;
  transition:
    transform 0.16s ease,
    border-color 0.16s ease,
    box-shadow 0.16s ease;
}

.review-target-actions button {
  min-height: 30px;
  border-radius: 7px;
  background: rgba(255, 248, 232, 0.07);
  font-size: 0.62rem;
  font-weight: 950;
}

.review-target-actions button:disabled {
  cursor: default;
  opacity: 0.48;
}

.review-target-actions button:not(:disabled):hover,
.review-target-actions button:not(:disabled):focus-visible,
.review-target-chip:hover,
.review-target-chip:focus-visible {
  border-color: rgba(255, 241, 168, 0.82);
  outline: none;
  transform: translateY(-1px);
  box-shadow: 0 0 0 3px rgba(255, 241, 168, 0.1);
}

.review-target-list {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 6px;
}

.review-target-chip {
  display: grid;
  gap: 4px;
  min-height: 72px;
  overflow: hidden;
  border-radius: 7px;
  background: rgba(255, 248, 232, 0.055);
  padding: 7px;
  text-align: left;
}

.review-target-chip.active {
  border-color: rgba(125, 249, 199, 0.64);
  background:
    linear-gradient(135deg, rgba(125, 249, 199, 0.19), rgba(56, 189, 248, 0.1)),
    rgba(4, 54, 55, 0.52);
}

.review-target-chip.current {
  box-shadow:
    inset 3px 0 0 rgba(255, 241, 168, 0.74),
    inset 0 1px 0 rgba(255, 248, 232, 0.06);
}

.review-target-chip.danger {
  border-color: rgba(255, 107, 107, 0.38);
  background: rgba(76, 19, 28, 0.26);
}

.review-target-chip.warm {
  border-color: rgba(255, 227, 125, 0.34);
  background: rgba(96, 65, 6, 0.2);
}

.review-target-chip.off {
  opacity: 0.6;
}

.review-target-chip span,
.review-target-chip strong {
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.review-target-chip span {
  color: rgba(255, 248, 232, 0.68);
  font-size: 0.58rem;
  font-weight: 950;
}

.review-target-chip strong {
  color: #fff8e8;
  font-size: 0.78rem;
  font-weight: 950;
}

.review-target-chip i {
  display: block;
  overflow: hidden;
  height: 5px;
  border-radius: 999px;
  background: rgba(255, 248, 232, 0.1);
}

.review-target-chip i::before {
  content: "";
  display: block;
  width: var(--target-load);
  height: 100%;
  border-radius: inherit;
  background: linear-gradient(90deg, #7df9c7, #38bdf8);
  box-shadow: 0 0 12px rgba(125, 249, 199, 0.22);
}

.review-target-chip.warm i::before {
  background: linear-gradient(90deg, #ffb86b, #ffe37d);
}

.review-target-chip.danger i::before {
  background: linear-gradient(90deg, #ff6b6b, #ffb86b);
}

.review-today-target-panel {
  border-color: rgba(255, 227, 125, 0.25);
  background:
    radial-gradient(circle at 10% 0%, rgba(255, 227, 125, 0.14), transparent 34%),
    linear-gradient(135deg, rgba(76, 44, 16, 0.5), rgba(4, 54, 55, 0.36)),
    rgba(3, 18, 24, 0.54);
}

.review-today-head {
  display: grid;
  grid-template-columns: minmax(0, 0.7fr) minmax(0, 1fr);
  gap: 10px;
  align-items: start;
}

.review-today-head span,
.review-today-head small,
.review-today-foot span {
  color: rgba(255, 248, 232, 0.62);
  font-weight: 900;
  line-height: 1.28;
}

.review-today-head span {
  display: block;
  font-size: 0.56rem;
  font-weight: 950;
}

.review-today-head strong {
  display: block;
  color: #fff8e8;
  font-size: 1.14rem;
  font-weight: 950;
  line-height: 1.02;
  font-variant-numeric: tabular-nums;
}

.review-today-head small {
  justify-self: end;
  max-width: 100%;
  color: #fff1a8;
  font-size: 0.58rem;
  text-align: right;
}

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

.review-today-meter span {
  display: block;
  overflow: hidden;
  height: 10px;
  border-radius: 999px;
  background: rgba(255, 248, 232, 0.09);
}

.review-today-meter span::before {
  content: "";
  display: block;
  width: var(--today-target, 0%);
  height: 100%;
  border-radius: inherit;
  background: linear-gradient(90deg, #ffb86b, #ffe37d, #7df9c7);
  box-shadow: 0 0 14px rgba(255, 227, 125, 0.22);
}

.review-today-meter.danger span::before {
  background: linear-gradient(90deg, #ff6b6b, #ffb86b, #ffe37d);
}

.review-today-meter.complete span::before {
  background: linear-gradient(90deg, #38bdf8, #7df9c7);
}

.review-today-meter b,
.review-today-foot b {
  color: #fff8e8;
  font-weight: 950;
  font-variant-numeric: tabular-nums;
}

.review-today-meter b {
  font-size: 0.74rem;
}

.review-today-list {
  display: grid;
  gap: 6px;
}

.review-today-row {
  appearance: none;
  min-width: 0;
  min-height: 58px;
  display: grid;
  grid-template-columns: minmax(48px, 0.42fr) minmax(0, 1fr) auto;
  grid-template-rows: auto 5px;
  grid-template-areas:
    "label detail value"
    "bar bar bar";
  align-items: center;
  gap: 4px 8px;
  overflow: hidden;
  border: 1px solid rgba(255, 248, 232, 0.13);
  border-radius: 8px;
  background: rgba(255, 248, 232, 0.055);
  color: #fff8e8;
  padding: 7px;
  font: inherit;
  text-align: left;
  cursor: pointer;
  transition:
    transform 0.16s ease,
    border-color 0.16s ease,
    box-shadow 0.16s ease;
}

.review-today-row:hover,
.review-today-row:focus-visible {
  border-color: rgba(255, 241, 168, 0.82);
  outline: none;
  transform: translateY(-1px);
  box-shadow: 0 0 0 3px rgba(255, 241, 168, 0.1);
}

.review-today-row:disabled {
  cursor: default;
  opacity: 0.55;
  transform: none;
  box-shadow: none;
}

.review-today-row.danger {
  border-color: rgba(255, 107, 107, 0.34);
  background: rgba(76, 19, 28, 0.24);
}

.review-today-row.warm,
.review-today-row.soon {
  border-color: rgba(255, 227, 125, 0.28);
  background: rgba(96, 65, 6, 0.18);
}

.review-today-row.weak {
  border-color: rgba(251, 146, 60, 0.3);
  background: rgba(88, 43, 17, 0.22);
}

.review-today-row.strong {
  border-color: rgba(125, 249, 199, 0.26);
  background: rgba(15, 118, 110, 0.16);
}

.review-today-row span,
.review-today-row strong,
.review-today-row small {
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.review-today-row span {
  grid-area: label;
  color: rgba(255, 248, 232, 0.58);
  font-size: 0.56rem;
  font-weight: 950;
}

.review-today-row strong {
  grid-area: value;
  justify-self: end;
  color: #fff1a8;
  font-size: 0.88rem;
  font-weight: 950;
  font-variant-numeric: tabular-nums;
}

.review-today-row small {
  grid-area: detail;
  color: rgba(255, 248, 232, 0.68);
  font-size: 0.6rem;
  font-weight: 850;
}

.review-today-row i {
  grid-area: bar;
  display: block;
  overflow: hidden;
  height: 5px;
  border-radius: 999px;
  background: rgba(255, 248, 232, 0.09);
}

.review-today-row i::before {
  content: "";
  display: block;
  width: var(--today-row-load, 0%);
  height: 100%;
  border-radius: inherit;
  background: linear-gradient(90deg, #38bdf8, #7df9c7);
}

.review-today-row.danger i::before {
  background: linear-gradient(90deg, #ff6b6b, #ffb86b);
}

.review-today-row.warm i::before,
.review-today-row.soon i::before {
  background: linear-gradient(90deg, #ffb86b, #ffe37d);
}

.review-today-row.weak i::before {
  background: linear-gradient(90deg, #fb923c, #ffe37d);
}

.review-today-foot {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 6px;
}

.review-today-foot span,
.review-today-empty {
  border: 1px solid rgba(255, 248, 232, 0.1);
  border-radius: 7px;
  background: rgba(255, 248, 232, 0.055);
  padding: 6px;
  font-size: 0.58rem;
}

.review-today-empty {
  color: rgba(255, 248, 232, 0.62);
  font-weight: 850;
  line-height: 1.35;
}

.review-curve-headline strong {
  color: #fff8e8;
  font-size: 0.82rem;
  line-height: 1.15;
}

.review-curve-headline span,
.review-curve-plot p,
.review-curve-warning {
  color: rgba(255, 248, 232, 0.66);
  font-size: 0.62rem;
  font-weight: 850;
  line-height: 1.28;
}

.review-curve-stats {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 5px;
}

.review-curve-stats > div {
  min-width: 0;
  border: 1px solid rgba(255, 248, 232, 0.1);
  border-radius: 7px;
  background: rgba(255, 248, 232, 0.06);
  padding: 5px;
}

.review-curve-stats span,
.review-curve-stats strong {
  display: block;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.review-curve-stats span {
  color: rgba(255, 248, 232, 0.58);
  font-size: 0.56rem;
  font-weight: 900;
}

.review-curve-stats strong {
  margin-top: 2px;
  color: #fff1a8;
  font-size: 0.82rem;
  font-weight: 950;
  font-variant-numeric: tabular-nums;
}

.review-upcoming-schedule {
  display: grid;
  gap: 8px;
  border: 1px solid rgba(255, 248, 232, 0.1);
  border-radius: 8px;
  background:
    radial-gradient(circle at 10% 12%, rgba(56, 189, 248, 0.13), transparent 34%),
    rgba(255, 248, 232, 0.05);
  padding: 9px;
}

.review-upcoming-head {
  display: flex;
  justify-content: space-between;
  gap: 10px;
  align-items: start;
}

.review-upcoming-head div {
  min-width: 0;
  display: grid;
  gap: 3px;
}

.review-upcoming-head span {
  color: rgba(255, 248, 232, 0.58);
  font-size: 0.56rem;
  font-weight: 950;
}

.review-upcoming-head strong {
  color: #fff8e8;
  font-size: 0.92rem;
  font-weight: 950;
  line-height: 1.05;
}

.review-upcoming-head small {
  max-width: 58%;
  color: rgba(255, 248, 232, 0.64);
  font-size: 0.6rem;
  font-weight: 850;
  line-height: 1.25;
  text-align: right;
}

.review-upcoming-grid {
  display: grid;
  grid-template-columns: repeat(15, minmax(0, 1fr));
  gap: 5px;
  align-items: end;
}

.review-upcoming-day {
  --load: 4%;
  min-width: 0;
  display: grid;
  grid-template-rows: auto auto 46px auto;
  gap: 4px;
  align-items: end;
  border: 1px solid rgba(255, 248, 232, 0.08);
  border-radius: 7px;
  background: rgba(0, 0, 0, 0.12);
  padding: 5px 4px;
  text-align: center;
  cursor: pointer;
}

.review-upcoming-day span,
.review-upcoming-day small {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.review-upcoming-day span {
  color: rgba(255, 248, 232, 0.58);
  font-size: 0.5rem;
  font-weight: 950;
}

.review-upcoming-day strong {
  color: rgba(255, 248, 232, 0.74);
  font-size: 0.72rem;
  font-weight: 950;
  font-variant-numeric: tabular-nums;
  line-height: 1;
}

.review-upcoming-day i {
  position: relative;
  display: block;
  width: 100%;
  height: 46px;
  border-radius: 999px;
  background: rgba(255, 248, 232, 0.08);
  overflow: hidden;
}

.review-upcoming-day i::after {
  content: "";
  position: absolute;
  right: 0;
  bottom: 0;
  left: 0;
  min-height: 3px;
  height: var(--load);
  border-radius: inherit;
  background: linear-gradient(180deg, rgba(148, 163, 184, 0.9), rgba(71, 85, 105, 0.9));
}

.review-upcoming-day small {
  color: rgba(255, 248, 232, 0.48);
  font-size: 0.48rem;
  font-weight: 900;
}

.review-upcoming-day.active {
  border-color: rgba(56, 189, 248, 0.2);
}

.review-upcoming-day:disabled {
  cursor: default;
  opacity: 0.62;
}

.review-upcoming-day:not(:disabled):hover,
.review-upcoming-day:not(:disabled):focus-visible {
  transform: translateY(-1px);
  border-color: rgba(125, 249, 199, 0.42);
  box-shadow: 0 10px 20px rgba(0, 0, 0, 0.2);
}

.review-upcoming-day.soon i::after {
  background: linear-gradient(180deg, #38bdf8, #0f766e);
}

.review-upcoming-day.today {
  border-color: rgba(255, 227, 125, 0.34);
}

.review-upcoming-day.today i::after {
  background: linear-gradient(180deg, #ffe37d, #b7791f);
}

.review-upcoming-day.overdue {
  border-color: rgba(255, 107, 107, 0.36);
  background: rgba(76, 19, 28, 0.26);
}

.review-upcoming-day.overdue i::after {
  background: linear-gradient(180deg, #ff8a8a, #b91c1c);
}

.review-curve-plot {
  display: grid;
  gap: 5px;
}

.review-forgetting-curve {
  display: block;
  width: 100%;
  height: auto;
  min-height: 118px;
  border: 1px solid rgba(244, 206, 88, 0.18);
  border-radius: 7px;
  background:
    radial-gradient(circle at 18% 18%, rgba(125, 249, 199, 0.13), transparent 36%),
    linear-gradient(180deg, rgba(0, 0, 0, 0.2), rgba(0, 0, 0, 0.08));
}

.review-curve-area {
  fill: url("#forgettingCurveFill");
}

.review-curve-risk-zone {
  fill: rgba(127, 29, 29, 0.18);
}

.review-curve-line {
  fill: none;
  stroke: url("#forgettingCurveStroke");
  stroke-width: 3;
  stroke-linecap: round;
  stroke-linejoin: round;
  filter: drop-shadow(0 0 5px rgba(125, 249, 199, 0.32));
}

.review-curve-axis,
.review-curve-marker line,
.review-curve-tick line,
.review-curve-bubble line,
.review-curve-threshold {
  stroke: rgba(255, 248, 232, 0.22);
  stroke-width: 1;
}

.review-curve-bubble line {
  stroke-dasharray: 2 5;
  opacity: 0.62;
}

.review-curve-threshold {
  stroke-dasharray: 4 4;
}

.review-curve-marker circle {
  fill: #fff1a8;
  stroke: rgba(4, 54, 55, 0.96);
  stroke-width: 1.5;
}

.review-curve-bubble circle {
  fill: rgba(125, 249, 199, 0.72);
  stroke: rgba(255, 248, 232, 0.78);
  stroke-width: 2;
  filter: drop-shadow(0 0 9px rgba(125, 249, 199, 0.34));
}

.review-curve-bubble-soon circle {
  fill: rgba(56, 189, 248, 0.76);
  filter: drop-shadow(0 0 9px rgba(56, 189, 248, 0.34));
}

.review-curve-bubble-today circle {
  fill: rgba(255, 227, 125, 0.82);
  filter: drop-shadow(0 0 10px rgba(255, 227, 125, 0.38));
}

.review-curve-bubble-overdue circle {
  fill: rgba(255, 107, 107, 0.82);
  filter: drop-shadow(0 0 12px rgba(255, 107, 107, 0.42));
}

.review-forgetting-curve text {
  fill: rgba(255, 248, 232, 0.72);
  font-size: 11px;
  font-weight: 900;
}

.review-curve-ylabel,
.review-curve-xlabel,
.review-curve-threshold-label {
  fill: rgba(255, 241, 168, 0.88);
}

.review-curve-bubble-count {
  fill: #071317;
  font-size: 10px;
  font-weight: 950;
  pointer-events: none;
}

.review-curve-empty-label {
  fill: rgba(255, 248, 232, 0.58);
  font-size: 18px;
  font-weight: 950;
}

.review-curve-legend {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.review-curve-legend span {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  color: rgba(255, 248, 232, 0.72);
  font-size: 0.68rem;
  font-weight: 950;
}

.review-curve-legend span::before {
  content: "";
  width: 10px;
  height: 10px;
  border-radius: 999px;
  background: #7df9c7;
  box-shadow: 0 0 8px rgba(125, 249, 199, 0.34);
}

.review-curve-legend .legend-soon::before {
  background: #38bdf8;
  box-shadow: 0 0 8px rgba(56, 189, 248, 0.34);
}

.review-curve-legend .legend-today::before {
  background: #ffe37d;
  box-shadow: 0 0 8px rgba(255, 227, 125, 0.36);
}

.review-curve-legend .legend-overdue::before {
  background: #ff6b6b;
  box-shadow: 0 0 8px rgba(255, 107, 107, 0.38);
}

.review-curve-warning {
  border: 1px solid rgba(255, 107, 107, 0.4);
  border-radius: 7px;
  background: rgba(127, 29, 29, 0.28);
  padding: 5px 7px;
  color: #ffe4e6;
}

.review-session-planner {
  display: grid;
  gap: 8px;
  border: 1px solid rgba(244, 206, 88, 0.22);
  border-radius: 8px;
  background:
    radial-gradient(circle at 12% 12%, rgba(255, 227, 125, 0.14), transparent 34%),
    linear-gradient(135deg, rgba(255, 248, 232, 0.07), rgba(4, 54, 55, 0.24)),
    rgba(4, 20, 28, 0.5);
  padding: 10px;
}

.review-session-head {
  display: flex;
  align-items: end;
  justify-content: space-between;
  gap: 10px;
}

.review-session-head span {
  display: block;
  color: rgba(255, 248, 232, 0.62);
  font-size: 0.6rem;
  font-weight: 950;
}

.review-session-head strong {
  display: block;
  margin-top: 2px;
  color: #fff8e8;
  font-size: 0.94rem;
  line-height: 1.1;
}

.review-session-head small {
  color: #fff1a8;
  font-size: 0.66rem;
  font-weight: 950;
  white-space: nowrap;
}

.review-mission-board {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 6px;
}

.review-mission-button {
  min-width: 0;
  min-height: 72px;
  display: grid;
  align-content: center;
  gap: 3px;
  border: 1px solid rgba(255, 248, 232, 0.14);
  border-radius: 8px;
  background:
    linear-gradient(180deg, rgba(255, 248, 232, 0.08), rgba(255, 248, 232, 0.03)),
    rgba(5, 22, 27, 0.62);
  color: #fff8e8;
  padding: 8px;
  font: inherit;
  text-align: left;
  cursor: pointer;
  transition:
    transform 0.16s ease,
    border-color 0.16s ease,
    box-shadow 0.16s ease;
}

.review-mission-button span,
.review-mission-button strong,
.review-mission-button small {
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.review-mission-button span {
  color: rgba(255, 248, 232, 0.58);
  font-size: 0.58rem;
  font-weight: 950;
}

.review-mission-button strong {
  color: #fff1a8;
  font-size: 0.92rem;
  font-weight: 950;
  font-variant-numeric: tabular-nums;
}

.review-mission-button small {
  color: rgba(255, 248, 232, 0.64);
  font-size: 0.58rem;
  font-weight: 850;
}

.review-mission-button:hover,
.review-mission-button:focus-visible {
  border-color: rgba(111, 239, 183, 0.72);
  outline: none;
  transform: translateY(-1px);
  box-shadow: 0 0 0 3px rgba(111, 239, 183, 0.1);
}

.review-mission-button:disabled {
  cursor: default;
  opacity: 0.52;
  transform: none;
  box-shadow: none;
}

.review-critical-path {
  display: grid;
  gap: 8px;
  border: 1px solid rgba(255, 107, 107, 0.22);
  border-radius: 8px;
  background:
    radial-gradient(circle at 7% 10%, rgba(255, 107, 107, 0.16), transparent 34%),
    linear-gradient(135deg, rgba(255, 248, 232, 0.07), rgba(56, 189, 248, 0.06)),
    rgba(3, 18, 24, 0.56);
  padding: 9px;
}

.review-critical-head {
  display: flex;
  align-items: start;
  justify-content: space-between;
  gap: 10px;
}

.review-critical-head span {
  display: block;
  color: rgba(255, 248, 232, 0.58);
  font-size: 0.56rem;
  font-weight: 950;
}

.review-critical-head strong {
  display: block;
  margin-top: 2px;
  color: #fff8e8;
  font-size: 0.92rem;
  line-height: 1.08;
}

.review-critical-head small {
  max-width: 58%;
  color: #fff1a8;
  font-size: 0.58rem;
  font-weight: 900;
  line-height: 1.25;
  text-align: right;
}

.review-critical-metrics {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 6px;
}

.review-critical-metric {
  min-width: 0;
  display: grid;
  gap: 3px;
  align-content: center;
  min-height: 54px;
  overflow: hidden;
  border: 1px solid rgba(255, 248, 232, 0.1);
  border-radius: 7px;
  background: rgba(255, 248, 232, 0.055);
  padding: 7px;
}

.review-critical-metric.overdue {
  border-color: rgba(255, 107, 107, 0.34);
}

.review-critical-metric.today {
  border-color: rgba(255, 227, 125, 0.3);
}

.review-critical-metric.weak {
  border-color: rgba(251, 146, 60, 0.3);
}

.review-critical-metric.soon {
  border-color: rgba(56, 189, 248, 0.28);
}

.review-critical-metric span,
.review-critical-metric strong,
.review-critical-metric small {
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.review-critical-metric span {
  color: rgba(255, 248, 232, 0.56);
  font-size: 0.52rem;
  font-weight: 950;
}

.review-critical-metric strong {
  color: #fff8e8;
  font-size: 1rem;
  font-weight: 950;
  font-variant-numeric: tabular-nums;
  line-height: 1;
}

.review-critical-metric small {
  color: rgba(255, 248, 232, 0.62);
  font-size: 0.52rem;
  font-weight: 850;
}

.review-critical-steps {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 6px;
}

.review-critical-step {
  min-width: 0;
  display: grid;
  gap: 6px;
  border: 1px solid rgba(255, 248, 232, 0.1);
  border-radius: 8px;
  background:
    linear-gradient(180deg, rgba(255, 248, 232, 0.07), rgba(255, 248, 232, 0.025)),
    rgba(0, 0, 0, 0.14);
  padding: 7px;
}

.review-critical-step-main {
  min-width: 0;
  display: grid;
  gap: 3px;
}

.review-critical-step-main span,
.review-critical-step-main strong,
.review-critical-step-main small {
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.review-critical-step-main span {
  color: rgba(255, 248, 232, 0.56);
  font-size: 0.52rem;
  font-weight: 950;
}

.review-critical-step-main strong {
  color: #fff1a8;
  font-size: 1rem;
  font-weight: 950;
  font-variant-numeric: tabular-nums;
  line-height: 1;
}

.review-critical-step-main small {
  color: rgba(255, 248, 232, 0.62);
  font-size: 0.52rem;
  font-weight: 850;
}

.review-critical-step > i {
  display: block;
  height: 6px;
  overflow: hidden;
  border-radius: 999px;
  background: rgba(255, 248, 232, 0.08);
}

.review-critical-step > i::before {
  content: "";
  display: block;
  width: var(--coverage, 0%);
  height: 100%;
  border-radius: inherit;
  background: linear-gradient(90deg, #ff6b6b, #ffe37d 55%, #7df9c7);
  box-shadow: 0 0 12px rgba(255, 227, 125, 0.22);
}

.review-critical-step-tags {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 4px;
}

.review-critical-step-tags span {
  min-width: 0;
  overflow: hidden;
  border-radius: 999px;
  background: rgba(255, 248, 232, 0.08);
  color: rgba(255, 248, 232, 0.68);
  padding: 4px 5px;
  font-size: 0.5rem;
  font-weight: 900;
  line-height: 1;
  text-align: center;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.review-critical-start {
  min-width: 0;
  min-height: 34px;
  border: 1px solid rgba(255, 227, 125, 0.58);
  border-radius: 8px;
  background:
    linear-gradient(180deg, rgba(255, 227, 125, 0.24), rgba(127, 29, 29, 0.38)),
    rgba(6, 39, 41, 0.74);
  color: #fff8e8;
  padding: 0 10px;
  font: inherit;
  font-size: 0.7rem;
  font-weight: 950;
  cursor: pointer;
  transition:
    transform 0.16s ease,
    border-color 0.16s ease,
    box-shadow 0.16s ease;
}

.review-critical-start:hover,
.review-critical-start:focus-visible {
  border-color: rgba(111, 239, 183, 0.76);
  outline: none;
  transform: translateY(-1px);
  box-shadow: 0 0 0 3px rgba(111, 239, 183, 0.1);
}

.review-stage-plan {
  display: grid;
  gap: 8px;
  border: 1px solid rgba(125, 249, 199, 0.22);
  border-radius: 8px;
  background:
    radial-gradient(circle at 100% 8%, rgba(125, 249, 199, 0.14), transparent 34%),
    linear-gradient(135deg, rgba(4, 54, 55, 0.3), rgba(56, 189, 248, 0.08)),
    rgba(3, 18, 24, 0.56);
  padding: 9px;
}

.review-stage-head {
  display: flex;
  align-items: start;
  justify-content: space-between;
  gap: 10px;
}

.review-stage-head span {
  display: block;
  color: rgba(255, 248, 232, 0.58);
  font-size: 0.56rem;
  font-weight: 950;
}

.review-stage-head strong {
  display: block;
  margin-top: 2px;
  color: #fff8e8;
  font-size: 0.92rem;
  line-height: 1.08;
}

.review-stage-head small {
  max-width: 58%;
  color: #fff1a8;
  font-size: 0.58rem;
  font-weight: 900;
  line-height: 1.25;
  text-align: right;
}

.review-stage-meter {
  display: flex;
  height: 10px;
  overflow: hidden;
  border-radius: 999px;
  background: rgba(255, 248, 232, 0.08);
}

.review-stage-meter span {
  min-width: 0;
  height: 100%;
}

.review-stage-meter .rescue {
  background: #ff6b6b;
}

.review-stage-meter .due {
  background: #ffe37d;
}

.review-stage-meter .growing {
  background: #38bdf8;
}

.review-stage-meter .secured {
  background: #7df9c7;
}

.review-stage-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 6px;
}

.review-stage-card {
  min-width: 0;
  min-height: 82px;
  display: grid;
  align-content: center;
  gap: 4px;
  overflow: hidden;
  border: 1px solid rgba(255, 248, 232, 0.11);
  border-radius: 8px;
  background:
    linear-gradient(180deg, rgba(255, 248, 232, 0.08), rgba(255, 248, 232, 0.025)),
    rgba(3, 18, 24, 0.6);
  color: #fff8e8;
  padding: 7px;
  font: inherit;
  text-align: left;
  cursor: pointer;
  transition:
    transform 0.16s ease,
    border-color 0.16s ease,
    box-shadow 0.16s ease;
}

.review-stage-card.rescue {
  border-color: rgba(255, 107, 107, 0.35);
}

.review-stage-card.due {
  border-color: rgba(255, 227, 125, 0.32);
}

.review-stage-card.growing {
  border-color: rgba(56, 189, 248, 0.28);
}

.review-stage-card.secured {
  border-color: rgba(125, 249, 199, 0.28);
}

.review-stage-card.active:hover,
.review-stage-card.active:focus-visible {
  border-color: rgba(111, 239, 183, 0.78);
  outline: none;
  transform: translateY(-1px);
  box-shadow: 0 0 0 3px rgba(111, 239, 183, 0.1);
}

.review-stage-card:disabled {
  cursor: default;
  opacity: 0.52;
}

.review-stage-card span,
.review-stage-card strong,
.review-stage-card small {
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.review-stage-card span {
  color: rgba(255, 248, 232, 0.58);
  font-size: 0.52rem;
  font-weight: 950;
}

.review-stage-card strong {
  color: #fff8e8;
  font-size: 1.08rem;
  font-weight: 950;
  font-variant-numeric: tabular-nums;
  line-height: 1;
}

.review-stage-card small {
  color: rgba(255, 248, 232, 0.62);
  font-size: 0.52rem;
  font-weight: 850;
}

.review-stage-card i {
  display: block;
  height: 5px;
  overflow: hidden;
  border-radius: 999px;
  background: rgba(255, 248, 232, 0.08);
}

.review-stage-card i::before {
  content: "";
  display: block;
  width: var(--stage-load, 0%);
  height: 100%;
  border-radius: inherit;
  background: #7df9c7;
}

.review-stage-card.rescue i::before {
  background: #ff6b6b;
}

.review-stage-card.due i::before {
  background: #ffe37d;
}

.review-stage-card.growing i::before {
  background: #38bdf8;
}

.review-bottleneck-triage {
  display: grid;
  gap: 8px;
  border: 1px solid rgba(251, 146, 60, 0.24);
  border-radius: 8px;
  background:
    radial-gradient(circle at 0% 10%, rgba(251, 146, 60, 0.15), transparent 34%),
    linear-gradient(135deg, rgba(255, 248, 232, 0.065), rgba(4, 54, 55, 0.19)),
    rgba(3, 18, 24, 0.56);
  padding: 9px;
}

.review-bottleneck-head {
  display: flex;
  align-items: start;
  justify-content: space-between;
  gap: 10px;
}

.review-bottleneck-head span {
  display: block;
  color: rgba(255, 248, 232, 0.58);
  font-size: 0.56rem;
  font-weight: 950;
}

.review-bottleneck-head strong {
  display: block;
  margin-top: 2px;
  color: #fff8e8;
  font-size: 0.9rem;
  line-height: 1.08;
}

.review-bottleneck-head small {
  max-width: 58%;
  color: #fff1a8;
  font-size: 0.58rem;
  font-weight: 900;
  line-height: 1.25;
  text-align: right;
}

.review-bottleneck-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 6px;
}

.review-bottleneck-card {
  min-width: 0;
  min-height: 132px;
  display: grid;
  gap: 6px;
  align-content: start;
  overflow: hidden;
  border: 1px solid rgba(255, 248, 232, 0.11);
  border-radius: 8px;
  background:
    linear-gradient(180deg, rgba(255, 248, 232, 0.075), rgba(255, 248, 232, 0.025)),
    rgba(0, 0, 0, 0.15);
  color: #fff8e8;
  padding: 8px;
  font: inherit;
  text-align: left;
  cursor: pointer;
  transition:
    border-color 0.16s ease,
    box-shadow 0.16s ease,
    transform 0.16s ease;
}

.review-bottleneck-card.overdue {
  border-color: rgba(255, 107, 107, 0.36);
}

.review-bottleneck-card.today {
  border-color: rgba(255, 227, 125, 0.34);
}

.review-bottleneck-card.weak {
  border-color: rgba(251, 146, 60, 0.34);
}

.review-bottleneck-card:hover,
.review-bottleneck-card:focus-visible {
  border-color: rgba(111, 239, 183, 0.76);
  outline: none;
  transform: translateY(-1px);
  box-shadow: 0 0 0 3px rgba(111, 239, 183, 0.1);
}

.review-bottleneck-card span,
.review-bottleneck-card strong,
.review-bottleneck-card em {
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.review-bottleneck-card span {
  color: rgba(255, 248, 232, 0.56);
  font-size: 0.52rem;
  font-weight: 950;
}

.review-bottleneck-card strong {
  color: #fff8e8;
  font-size: 0.72rem;
  font-weight: 950;
  line-height: 1.12;
  white-space: normal;
  overflow-wrap: anywhere;
}

.review-bottleneck-card em {
  color: rgba(255, 248, 232, 0.58);
  font-size: 0.52rem;
  font-style: normal;
  font-weight: 850;
}

.review-bottleneck-bar {
  display: flex;
  min-width: 0;
  height: 8px;
  overflow: hidden;
  border-radius: 999px;
  background: rgba(255, 248, 232, 0.08);
}

.review-bottleneck-bar span {
  min-width: 0;
  height: 100%;
}

.review-bottleneck-bar .overdue {
  background: #ff6b6b;
}

.review-bottleneck-bar .today {
  background: #ffe37d;
}

.review-bottleneck-bar .weak {
  background: #fb923c;
}

.review-bottleneck-bar .soon {
  background: #38bdf8;
}

.review-bottleneck-bar .future {
  background: #7df9c7;
}

.review-bottleneck-meta {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 4px;
}

.review-bottleneck-meta small {
  min-width: 0;
  overflow: hidden;
  border-radius: 999px;
  background: rgba(255, 248, 232, 0.08);
  color: rgba(255, 248, 232, 0.68);
  padding: 4px 5px;
  font-size: 0.5rem;
  font-weight: 900;
  line-height: 1;
  text-align: center;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.review-bottleneck-meta b {
  color: #fff1a8;
  font-variant-numeric: tabular-nums;
}

.review-bottleneck-card > i {
  display: block;
  height: 4px;
  overflow: hidden;
  border-radius: 999px;
  background: rgba(255, 248, 232, 0.07);
}

.review-bottleneck-card > i::before {
  content: "";
  display: block;
  width: var(--bottleneck-load, 0%);
  height: 100%;
  border-radius: inherit;
  background: linear-gradient(90deg, #fb923c, #ffe37d 58%, #7df9c7);
  box-shadow: 0 0 10px rgba(251, 146, 60, 0.22);
}

.review-set-preview {
  display: grid;
  gap: 8px;
  border: 1px solid rgba(111, 239, 183, 0.24);
  border-radius: 8px;
  background:
    radial-gradient(circle at 0% 12%, rgba(111, 239, 183, 0.13), transparent 32%),
    linear-gradient(135deg, rgba(255, 248, 232, 0.07), rgba(4, 54, 55, 0.26)),
    rgba(3, 18, 24, 0.56);
  padding: 9px;
}

.review-set-preview.empty {
  border-color: rgba(255, 248, 232, 0.12);
  opacity: 0.72;
}

.review-set-head {
  display: flex;
  align-items: start;
  justify-content: space-between;
  gap: 10px;
}

.review-set-head span {
  display: block;
  color: rgba(255, 248, 232, 0.58);
  font-size: 0.56rem;
  font-weight: 950;
}

.review-set-head strong {
  display: block;
  margin-top: 2px;
  color: #fff8e8;
  font-size: 0.88rem;
  line-height: 1.08;
}

.review-set-head small {
  color: #fff1a8;
  font-size: 0.58rem;
  font-weight: 950;
  white-space: nowrap;
}

.review-set-composition {
  display: flex;
  min-width: 0;
  height: 12px;
  overflow: hidden;
  border-radius: 999px;
  background: rgba(255, 248, 232, 0.08);
  box-shadow: inset 0 0 0 1px rgba(255, 248, 232, 0.07);
}

.review-set-composition span {
  min-width: 0;
  height: 100%;
}

.review-set-composition .overdue {
  background: #ff6b6b;
}

.review-set-composition .today {
  background: #ffe37d;
}

.review-set-composition .weak {
  background: #fb923c;
}

.review-set-composition .soon {
  background: #38bdf8;
}

.review-set-composition .future {
  background: #6fefb7;
}

.review-set-stats {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 6px;
}

.review-set-stats div {
  min-width: 0;
  overflow: hidden;
  border: 1px solid rgba(255, 248, 232, 0.09);
  border-radius: 7px;
  background: rgba(255, 248, 232, 0.055);
  padding: 6px;
}

.review-set-stats span,
.review-set-stats strong {
  display: block;
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.review-set-stats span {
  color: rgba(255, 248, 232, 0.56);
  font-size: 0.52rem;
  font-weight: 950;
}

.review-set-stats strong {
  margin-top: 2px;
  color: #fff8e8;
  font-size: 0.84rem;
  font-weight: 950;
  font-variant-numeric: tabular-nums;
}

.review-set-focus {
  display: flex;
  flex-wrap: wrap;
  gap: 5px;
}

.review-set-focus span {
  min-width: 0;
  max-width: 100%;
  display: inline-flex;
  align-items: center;
  gap: 5px;
  overflow: hidden;
  border: 1px solid rgba(255, 248, 232, 0.1);
  border-radius: 999px;
  background: rgba(255, 248, 232, 0.07);
  color: rgba(255, 248, 232, 0.7);
  padding: 4px 7px;
  font-size: 0.55rem;
  font-weight: 850;
  line-height: 1;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.review-set-focus b {
  color: #fff1a8;
  font-variant-numeric: tabular-nums;
}

.review-set-actions {
  display: grid;
}

.review-set-start {
  min-width: 0;
  min-height: 34px;
  border: 1px solid rgba(111, 239, 183, 0.58);
  border-radius: 8px;
  background:
    linear-gradient(180deg, rgba(111, 239, 183, 0.25), rgba(8, 86, 84, 0.48)),
    rgba(6, 39, 41, 0.8);
  color: #ecfdf5;
  padding: 0 10px;
  font: inherit;
  font-size: 0.7rem;
  font-weight: 950;
  cursor: pointer;
  transition:
    transform 0.16s ease,
    border-color 0.16s ease,
    box-shadow 0.16s ease;
}

.review-set-start:hover,
.review-set-start:focus-visible {
  border-color: #fff1a8;
  outline: none;
  transform: translateY(-1px);
  box-shadow: 0 0 0 3px rgba(111, 239, 183, 0.1);
}

.review-set-preview p {
  margin: 0;
  color: rgba(255, 248, 232, 0.64);
  font-size: 0.6rem;
  font-weight: 850;
  line-height: 1.28;
}

.review-priority-queue {
  display: grid;
  gap: 7px;
  border: 1px solid rgba(56, 189, 248, 0.2);
  border-radius: 8px;
  background:
    linear-gradient(135deg, rgba(56, 189, 248, 0.09), rgba(255, 248, 232, 0.025)),
    rgba(3, 18, 24, 0.48);
  padding: 8px;
}

.review-priority-head {
  display: flex;
  align-items: start;
  justify-content: space-between;
  gap: 10px;
}

.review-priority-head span {
  display: block;
  color: rgba(255, 248, 232, 0.58);
  font-size: 0.56rem;
  font-weight: 950;
  line-height: 1.15;
}

.review-priority-head strong {
  display: block;
  margin-top: 2px;
  color: #fff8e8;
  font-size: 0.88rem;
  line-height: 1.08;
}

.review-priority-head small {
  color: #fff1a8;
  font-size: 0.58rem;
  font-weight: 950;
  white-space: nowrap;
}

.review-priority-list {
  display: grid;
  gap: 5px;
}

.review-priority-row {
  position: relative;
  min-width: 0;
  display: grid;
  grid-template-columns: auto minmax(0, 1fr) minmax(126px, 0.58fr);
  gap: 7px;
  align-items: center;
  overflow: hidden;
  border: 1px solid rgba(255, 248, 232, 0.11);
  border-radius: 8px;
  background:
    linear-gradient(180deg, rgba(255, 248, 232, 0.07), rgba(255, 248, 232, 0.025)),
    rgba(3, 18, 24, 0.58);
  color: #fff8e8;
  padding: 7px;
  font: inherit;
  text-align: left;
  cursor: pointer;
  transition:
    border-color 0.16s ease,
    box-shadow 0.16s ease,
    transform 0.16s ease;
}

.review-priority-row.overdue {
  border-color: rgba(255, 107, 107, 0.36);
}

.review-priority-row.today {
  border-color: rgba(255, 227, 125, 0.34);
}

.review-priority-row.weak {
  border-color: rgba(251, 146, 60, 0.34);
}

.review-priority-row.soon {
  border-color: rgba(56, 189, 248, 0.3);
}

.review-priority-row:hover,
.review-priority-row:focus-visible {
  border-color: rgba(111, 239, 183, 0.76);
  outline: none;
  transform: translateY(-1px);
  box-shadow: 0 0 0 3px rgba(111, 239, 183, 0.1);
}

.review-priority-rank {
  display: grid;
  place-items: center;
  width: 26px;
  height: 26px;
  border-radius: 999px;
  background: rgba(255, 248, 232, 0.1);
  color: #fff1a8;
  font-size: 0.68rem;
  font-weight: 950;
  font-variant-numeric: tabular-nums;
}

.review-priority-main {
  min-width: 0;
}

.review-priority-main strong,
.review-priority-main small {
  display: block;
  min-width: 0;
  overflow-wrap: anywhere;
  white-space: normal;
}

.review-priority-main strong {
  color: #fff8e8;
  font-size: 0.74rem;
  line-height: 1.1;
}

.review-priority-main small {
  margin-top: 3px;
  color: rgba(255, 248, 232, 0.58);
  font-size: 0.56rem;
  font-weight: 850;
}

.review-priority-meta {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 4px;
  min-width: 0;
}

.review-priority-meta span {
  min-width: 0;
  overflow: hidden;
  border-radius: 999px;
  background: rgba(255, 248, 232, 0.08);
  color: rgba(255, 248, 232, 0.68);
  padding: 4px 6px;
  font-size: 0.52rem;
  font-weight: 900;
  line-height: 1;
  text-align: center;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.review-priority-meta b {
  color: #fff1a8;
  font-variant-numeric: tabular-nums;
}

.review-priority-row > i {
  grid-column: 1 / -1;
  display: block;
  height: 4px;
  overflow: hidden;
  border-radius: 999px;
  background: rgba(255, 248, 232, 0.07);
}

.review-priority-row > i::before {
  content: "";
  display: block;
  width: var(--priority, 0%);
  height: 100%;
  border-radius: inherit;
  background: linear-gradient(90deg, #7df9c7, #ffe37d 62%, #ff6b6b);
  box-shadow: 0 0 10px rgba(255, 227, 125, 0.26);
}

.review-load-radar {
  display: grid;
  gap: 9px;
  border: 1px solid rgba(111, 239, 183, 0.24);
  border-radius: 8px;
  background:
    radial-gradient(circle at 15% 0%, rgba(111, 239, 183, 0.14), transparent 35%),
    linear-gradient(135deg, rgba(4, 54, 55, 0.5), rgba(33, 17, 29, 0.58)),
    rgba(4, 20, 28, 0.58);
  padding: 10px;
  box-shadow: inset 0 1px 0 rgba(255, 248, 232, 0.06);
}

.review-load-head {
  display: flex;
  align-items: start;
  justify-content: space-between;
  gap: 10px;
}

.review-load-head span {
  display: block;
  color: rgba(255, 248, 232, 0.58);
  font-size: 0.58rem;
  font-weight: 950;
}

.review-load-head strong {
  display: block;
  margin-top: 2px;
  color: #fff8e8;
  font-size: 1rem;
  line-height: 1.08;
}

.review-load-head small {
  max-width: 48%;
  color: #fff1a8;
  font-size: 0.62rem;
  font-weight: 900;
  line-height: 1.25;
  text-align: right;
}

.review-load-meter {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 9px;
  align-items: center;
}

.review-load-meter span {
  position: relative;
  height: 10px;
  overflow: hidden;
  border-radius: 999px;
  background: rgba(255, 248, 232, 0.08);
}

.review-load-meter span::before {
  content: "";
  display: block;
  width: var(--pressure, 0%);
  height: 100%;
  border-radius: inherit;
  background: linear-gradient(90deg, #7df9c7, #ffe37d 58%, #ff6b6b);
  box-shadow: 0 0 14px rgba(255, 227, 125, 0.22);
}

.review-load-meter b {
  color: #fff8e8;
  font-size: 0.74rem;
  font-weight: 950;
  font-variant-numeric: tabular-nums;
}

.review-load-metrics {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 6px;
}

.review-load-metric {
  min-width: 0;
  min-height: 76px;
  display: grid;
  align-content: center;
  gap: 3px;
  overflow: hidden;
  border: 1px solid rgba(255, 248, 232, 0.12);
  border-radius: 8px;
  background:
    linear-gradient(180deg, rgba(255, 248, 232, 0.08), rgba(255, 248, 232, 0.03)),
    rgba(3, 18, 24, 0.66);
  color: #fff8e8;
  padding: 7px;
  font: inherit;
  text-align: left;
  cursor: pointer;
  transition:
    transform 0.16s ease,
    border-color 0.16s ease,
    box-shadow 0.16s ease;
}

.review-load-metric span,
.review-load-metric strong,
.review-load-metric small {
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.review-load-metric span {
  color: rgba(255, 248, 232, 0.58);
  font-size: 0.54rem;
  font-weight: 950;
}

.review-load-metric strong {
  color: #fff8e8;
  font-size: 1.14rem;
  font-weight: 950;
  font-variant-numeric: tabular-nums;
  line-height: 1;
}

.review-load-metric small {
  color: rgba(255, 248, 232, 0.6);
  font-size: 0.54rem;
  font-weight: 850;
}

.review-load-metric i {
  display: block;
  height: 4px;
  overflow: hidden;
  border-radius: 999px;
  background: rgba(255, 248, 232, 0.08);
}

.review-load-metric i::before {
  content: "";
  display: block;
  width: var(--load, 0%);
  height: 100%;
  border-radius: inherit;
  background: #7df9c7;
}

.review-load-metric.overdue i::before {
  background: #ff6b6b;
  box-shadow: 0 0 10px rgba(255, 107, 107, 0.32);
}

.review-load-metric.today i::before {
  background: #ffe37d;
  box-shadow: 0 0 10px rgba(255, 227, 125, 0.32);
}

.review-load-metric.soon i::before {
  background: #38bdf8;
  box-shadow: 0 0 10px rgba(56, 189, 248, 0.28);
}

.review-load-metric.weak i::before {
  background: #fb923c;
  box-shadow: 0 0 10px rgba(251, 146, 60, 0.28);
}

.review-load-metric.active {
  border-color: rgba(111, 239, 183, 0.32);
}

.review-load-metric:not(:disabled):hover,
.review-load-metric:not(:disabled):focus-visible {
  border-color: rgba(111, 239, 183, 0.78);
  outline: none;
  transform: translateY(-1px);
  box-shadow: 0 0 0 3px rgba(111, 239, 183, 0.1);
}

.review-load-metric:disabled {
  cursor: default;
  opacity: 0.5;
}

.review-load-lanes {
  display: grid;
  gap: 6px;
}

.review-load-lane {
  min-width: 0;
  display: grid;
  grid-template-columns: minmax(160px, 0.76fr) minmax(0, 1fr);
  gap: 9px;
  align-items: center;
  border: 1px solid rgba(255, 248, 232, 0.1);
  border-radius: 8px;
  background: rgba(0, 0, 0, 0.13);
  padding: 7px;
}

.review-load-lane strong,
.review-load-lane small {
  display: block;
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.review-load-lane strong {
  color: #fff8e8;
  font-size: 0.78rem;
  font-weight: 950;
}

.review-load-lane small {
  margin-top: 2px;
  color: rgba(255, 248, 232, 0.58);
  font-size: 0.56rem;
  font-weight: 850;
}

.review-load-stack {
  position: relative;
  display: flex;
  align-items: stretch;
  height: 12px;
  overflow: hidden;
  border-radius: 999px;
  background: rgba(255, 248, 232, 0.08);
}

.review-load-stack > span {
  min-width: 0;
  height: 100%;
}

.review-load-stack .overdue {
  background: #ff6b6b;
}

.review-load-stack .today {
  background: #ffe37d;
}

.review-load-stack .soon {
  background: #38bdf8;
}

.review-load-stack .weak {
  background: #fb923c;
}

.review-load-stack i {
  position: absolute;
  inset: 0 auto 0 0;
  width: var(--load, 0%);
  border-radius: inherit;
  box-shadow: inset 0 0 0 1px rgba(255, 248, 232, 0.16);
  pointer-events: none;
}

.review-pace-meter {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 6px;
}

.review-pace-card {
  min-width: 0;
  min-height: 64px;
  display: grid;
  align-content: center;
  gap: 3px;
  overflow: hidden;
  border: 1px solid rgba(255, 248, 232, 0.12);
  border-radius: 8px;
  background:
    linear-gradient(180deg, rgba(255, 248, 232, 0.07), rgba(255, 248, 232, 0.025)),
    rgba(3, 18, 24, 0.62);
  padding: 7px;
}

.review-pace-card span,
.review-pace-card strong,
.review-pace-card small {
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.review-pace-card span {
  color: rgba(255, 248, 232, 0.58);
  font-size: 0.56rem;
  font-weight: 950;
}

.review-pace-card strong {
  color: #fff8e8;
  font-size: 0.86rem;
  font-weight: 950;
  font-variant-numeric: tabular-nums;
  line-height: 1.05;
}

.review-pace-card small {
  color: rgba(255, 248, 232, 0.62);
  font-size: 0.55rem;
  font-weight: 850;
}

.review-pace-card i {
  display: block;
  height: 4px;
  overflow: hidden;
  border-radius: 999px;
  background: rgba(255, 248, 232, 0.08);
}

.review-pace-card i::before {
  content: "";
  display: block;
  width: var(--pace, 0%);
  height: 100%;
  border-radius: inherit;
  background: #6fefb7;
  box-shadow: 0 0 10px rgba(111, 239, 183, 0.36);
}

.review-pace-card.current {
  border-color: rgba(111, 239, 183, 0.38);
}

.review-pace-card.overdue i::before {
  background: #ff6b6b;
  box-shadow: 0 0 10px rgba(255, 107, 107, 0.36);
}

.review-pace-card.today i::before {
  background: #ffe37d;
  box-shadow: 0 0 10px rgba(255, 227, 125, 0.36);
}

.review-pace-card.soon i::before {
  background: #38bdf8;
  box-shadow: 0 0 10px rgba(56, 189, 248, 0.32);
}

.review-pace-card.weak i::before {
  background: #fb923c;
  box-shadow: 0 0 10px rgba(251, 146, 60, 0.32);
}

.review-time-budget {
  display: grid;
  gap: 7px;
  border: 1px solid rgba(255, 248, 232, 0.12);
  border-radius: 8px;
  background:
    linear-gradient(135deg, rgba(255, 248, 232, 0.06), rgba(255, 248, 232, 0.02)),
    rgba(3, 18, 24, 0.5);
  padding: 8px;
}

.review-time-budget-head {
  display: flex;
  align-items: start;
  justify-content: space-between;
  gap: 10px;
}

.review-time-budget-head span {
  display: block;
  color: rgba(255, 248, 232, 0.58);
  font-size: 0.56rem;
  font-weight: 950;
}

.review-time-budget-head strong {
  display: block;
  margin-top: 2px;
  color: #fff8e8;
  font-size: 0.86rem;
  line-height: 1.08;
}

.review-time-budget-head small {
  color: #fff1a8;
  font-size: 0.58rem;
  font-weight: 950;
  white-space: nowrap;
}

.review-time-budget-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 6px;
}

.review-time-budget-card {
  min-width: 0;
  display: grid;
  gap: 3px;
  overflow: hidden;
  border: 1px solid rgba(255, 248, 232, 0.1);
  border-radius: 7px;
  background: rgba(255, 248, 232, 0.055);
  padding: 6px;
}

.review-time-budget-card span,
.review-time-budget-card strong,
.review-time-budget-card small {
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.review-time-budget-card span {
  color: rgba(255, 248, 232, 0.56);
  font-size: 0.52rem;
  font-weight: 950;
}

.review-time-budget-card strong {
  color: #fff8e8;
  font-size: 0.8rem;
  font-weight: 950;
  font-variant-numeric: tabular-nums;
}

.review-time-budget-card small {
  color: rgba(255, 248, 232, 0.6);
  font-size: 0.52rem;
  font-weight: 850;
}

.review-time-budget-card i {
  display: block;
  height: 4px;
  overflow: hidden;
  border-radius: 999px;
  background: rgba(255, 248, 232, 0.08);
}

.review-time-budget-card i::before {
  content: "";
  display: block;
  width: var(--budget, 0%);
  height: 100%;
  border-radius: inherit;
  background: #6fefb7;
  box-shadow: 0 0 10px rgba(111, 239, 183, 0.28);
}

.review-time-budget-card.overdue i::before {
  background: #ff6b6b;
  box-shadow: 0 0 10px rgba(255, 107, 107, 0.3);
}

.review-time-budget-card.today i::before {
  background: #ffe37d;
  box-shadow: 0 0 10px rgba(255, 227, 125, 0.3);
}

.review-time-budget-card.soon i::before {
  background: #38bdf8;
  box-shadow: 0 0 10px rgba(56, 189, 248, 0.28);
}

.review-time-budget-card.idle {
  opacity: 0.62;
}

.review-time-budget p {
  margin: 0;
  color: rgba(255, 248, 232, 0.62);
  font-size: 0.6rem;
  font-weight: 850;
  line-height: 1.25;
}

.review-session-controls {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 6px;
}

.review-session-controls.compact {
  grid-template-columns: repeat(3, minmax(0, 1fr));
}

.review-session-chip-wide {
  width: 100%;
  min-width: 116px;
}

.review-session-chip {
  min-width: 0;
  min-height: 32px;
  border: 1px solid rgba(255, 248, 232, 0.14);
  border-radius: 7px;
  background:
    linear-gradient(180deg, rgba(255, 248, 232, 0.08), rgba(255, 248, 232, 0.03)),
    rgba(5, 22, 27, 0.58);
  color: rgba(255, 248, 232, 0.78);
  padding: 0 8px;
  font: inherit;
  font-size: 0.68rem;
  font-weight: 950;
  cursor: pointer;
}

.review-session-chip.active {
  border-color: rgba(111, 239, 183, 0.78);
  background:
    linear-gradient(180deg, rgba(111, 239, 183, 0.22), rgba(8, 86, 84, 0.46)),
    rgba(6, 39, 41, 0.74);
  color: #ecfdf5;
  box-shadow: inset 0 1px 0 rgba(255, 248, 232, 0.14);
}

.review-session-chip:hover,
.review-session-chip:focus-visible {
  border-color: #fff1a8;
  outline: none;
  color: #fff8e8;
}

.review-session-planner p {
  margin: 0;
  color: rgba(255, 248, 232, 0.62);
  font-size: 0.64rem;
  font-weight: 850;
  line-height: 1.35;
}

.review-course-map {
  display: grid;
  gap: 8px;
  border: 1px solid rgba(255, 248, 232, 0.13);
  border-radius: 8px;
  background:
    radial-gradient(circle at 14% 18%, rgba(56, 189, 248, 0.12), transparent 36%),
    linear-gradient(135deg, rgba(255, 248, 232, 0.07), rgba(255, 248, 232, 0.025)),
    rgba(4, 22, 28, 0.46);
  padding: 10px;
}

.review-course-map-head {
  display: flex;
  align-items: start;
  justify-content: space-between;
  gap: 10px;
}

.review-course-map-head span {
  display: block;
  color: rgba(255, 248, 232, 0.6);
  font-size: 0.58rem;
  font-weight: 950;
  line-height: 1.15;
}

.review-course-map-head strong {
  display: block;
  margin-top: 2px;
  color: #fff8e8;
  font-size: 0.94rem;
  line-height: 1.08;
}

.review-course-map-head small {
  color: #fff1a8;
  font-size: 0.62rem;
  font-weight: 950;
  white-space: nowrap;
}

.review-course-map-list {
  display: grid;
  gap: 6px;
}

.review-course-map-row {
  min-width: 0;
  min-height: 62px;
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(178px, 0.7fr) auto;
  gap: 8px;
  align-items: center;
  border: 1px solid rgba(255, 248, 232, 0.12);
  border-radius: 8px;
  background:
    linear-gradient(180deg, rgba(255, 248, 232, 0.07), rgba(255, 248, 232, 0.025)),
    rgba(3, 18, 24, 0.56);
  color: #fff8e8;
  padding: 7px;
  font: inherit;
  text-align: left;
  cursor: pointer;
  transition:
    border-color 0.16s ease,
    box-shadow 0.16s ease,
    transform 0.16s ease;
}

.review-course-map-row.overdue,
.review-course-map-row.failed {
  border-color: rgba(255, 107, 107, 0.38);
}

.review-course-map-row.today,
.review-course-map-row.due {
  border-color: rgba(255, 227, 125, 0.32);
}

.review-course-map-row.weak {
  border-color: rgba(251, 146, 60, 0.32);
}

.review-course-map-row:hover,
.review-course-map-row:focus-visible {
  border-color: rgba(111, 239, 183, 0.72);
  outline: none;
  transform: translateY(-1px);
  box-shadow: 0 0 0 3px rgba(111, 239, 183, 0.1);
}

.review-course-map-row:disabled {
  cursor: default;
  opacity: 0.58;
  transform: none;
  box-shadow: none;
}

.review-course-map-main {
  min-width: 0;
}

.review-course-map-main strong,
.review-course-map-main small {
  display: block;
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.review-course-map-main strong {
  color: #fff8e8;
  font-size: 0.78rem;
  line-height: 1.08;
}

.review-course-map-main small {
  margin-top: 5px;
  color: rgba(255, 248, 232, 0.62);
  font-size: 0.58rem;
  font-weight: 850;
}

.review-course-map-load {
  display: grid;
  gap: 2px;
  height: 30px;
  overflow: hidden;
  border: 1px solid rgba(255, 248, 232, 0.1);
  border-radius: 7px;
  background: rgba(0, 0, 0, 0.18);
  padding: 2px;
}

.review-course-map-load i {
  display: none;
}

.review-course-map-load span {
  display: block;
  height: 4px;
  border-radius: 999px;
  box-shadow: 0 0 0 1px rgba(255, 248, 232, 0.04);
}

.review-course-map-load .overdue {
  background: linear-gradient(90deg, #ff9aa2, #ff6b6b);
}

.review-course-map-load .today {
  background: linear-gradient(90deg, #ffe37d, #f59e0b);
}

.review-course-map-load .soon {
  background: linear-gradient(90deg, #38bdf8, #0ea5e9);
}

.review-course-map-load .weak {
  background: linear-gradient(90deg, #fb923c, #f97316);
}

.review-course-map-meta {
  display: grid;
  grid-template-columns: repeat(2, minmax(36px, 1fr));
  gap: 4px;
  min-width: 84px;
}

.review-course-map-meta span {
  display: inline-flex;
  align-items: center;
  justify-content: space-between;
  gap: 3px;
  min-height: 20px;
  border-radius: 999px;
  background: rgba(255, 248, 232, 0.08);
  color: rgba(255, 248, 232, 0.68);
  padding: 2px 6px;
  font-size: 0.56rem;
  font-weight: 900;
  line-height: 1;
  white-space: nowrap;
}

.review-course-map-meta b {
  color: #fff1a8;
  font-variant-numeric: tabular-nums;
}

.review-curriculum-list {
  display: grid;
  gap: 5px;
  max-height: 210px;
  overflow: auto;
  padding-right: 2px;
}

.review-curriculum-row {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 7px;
  align-items: center;
  min-height: 52px;
  border: 1px solid rgba(255, 248, 232, 0.11);
  border-radius: 7px;
  background: rgba(5, 22, 27, 0.5);
  padding: 6px;
}

.review-curriculum-row.due {
  border-color: rgba(255, 227, 125, 0.38);
}

.review-curriculum-row.weak {
  border-color: rgba(248, 113, 113, 0.32);
}

.review-curriculum-row.active {
  border-color: rgba(111, 239, 183, 0.86);
  box-shadow: 0 0 0 2px rgba(111, 239, 183, 0.1);
}

.review-curriculum-main {
  min-width: 0;
}

.review-curriculum-main strong {
  display: block;
  color: #fff8e8;
  font-size: 0.76rem;
  line-height: 1.15;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.review-curriculum-main small {
  display: block;
  margin-top: 3px;
  color: rgba(255, 248, 232, 0.62);
  font-size: 0.62rem;
  font-weight: 900;
  line-height: 1.15;
}

.review-curriculum-priority {
  position: relative;
  height: 7px;
  margin-top: 7px;
  border: 1px solid rgba(255, 248, 232, 0.11);
  border-radius: 999px;
  background: rgba(0, 0, 0, 0.18);
  overflow: hidden;
}

.review-curriculum-priority span {
  display: block;
  height: 100%;
  min-width: 3px;
  border-radius: inherit;
  background: linear-gradient(90deg, rgba(148, 163, 184, 0.88), rgba(71, 85, 105, 0.88));
}

.review-curriculum-priority[data-level="due"] span {
  background: linear-gradient(90deg, #38bdf8, #ffe37d);
}

.review-curriculum-priority[data-level="today"] span {
  background: linear-gradient(90deg, #ffe37d, #ff9f43);
  box-shadow: 0 0 12px rgba(255, 227, 125, 0.26);
}

.review-curriculum-priority[data-level="weak"] span {
  background: linear-gradient(90deg, #fb7185, #f97316);
  box-shadow: 0 0 12px rgba(251, 113, 133, 0.24);
}

.review-curriculum-priority[data-level="overdue"] span,
.review-curriculum-priority[data-level="failed"] span {
  background: linear-gradient(90deg, #ffb86b, #ff6b6b);
  box-shadow: 0 0 14px rgba(255, 107, 107, 0.3);
}

.review-curriculum-priority[data-level="loading"] span {
  background: linear-gradient(90deg, #94a3b8, #38bdf8);
}

.review-curriculum-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 4px;
  margin-top: 4px;
}

.review-curriculum-meta span {
  display: inline-flex;
  align-items: center;
  gap: 2px;
  min-height: 19px;
  border-radius: 999px;
  background: rgba(255, 248, 232, 0.08);
  color: rgba(255, 248, 232, 0.72);
  padding: 2px 6px;
  font-size: 0.6rem;
  font-weight: 900;
  line-height: 1;
  white-space: nowrap;
}

.review-curriculum-meta b {
  color: #fff1a8;
  font-variant-numeric: tabular-nums;
}

.review-curriculum-start {
  min-width: 48px;
  min-height: 34px;
  border: 1px solid rgba(244, 206, 88, 0.72);
  border-radius: 7px;
  background:
    linear-gradient(180deg, rgba(255, 227, 125, 0.82), rgba(164, 106, 23, 0.86)),
    rgba(44, 20, 32, 0.8);
  color: #fffdf6;
  font: inherit;
  font-size: 0.72rem;
  font-weight: 900;
  cursor: pointer;
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.24),
    0 6px 12px rgba(0, 0, 0, 0.18);
}

.review-curriculum-start.active {
  border-color: rgba(111, 239, 183, 0.9);
  background:
    linear-gradient(180deg, rgba(33, 150, 127, 0.82), rgba(8, 86, 84, 0.82)),
    rgba(4, 54, 55, 0.86);
}

.review-curriculum-start:disabled {
  cursor: default;
  opacity: 0.55;
  filter: grayscale(0.4);
}

.review-curriculum-start:not(:disabled):hover,
.review-curriculum-start:not(:disabled):focus-visible {
  border-color: #fff1a8;
  outline: none;
  box-shadow:
    0 0 0 3px rgba(255, 241, 168, 0.15),
    0 6px 12px rgba(0, 0, 0, 0.18);
}

.review-curriculum-empty {
  border: 1px dashed rgba(255, 248, 232, 0.18);
  border-radius: 7px;
  color: rgba(255, 248, 232, 0.62);
  padding: 9px;
  font-size: 0.72rem;
  font-weight: 900;
  text-align: center;
}

.study-stopwatch-actions {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 36px;
  gap: 7px;
  margin-top: 8px;
}

.study-time-button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  min-width: 0;
  min-height: 34px;
  border: 1px solid rgba(244, 206, 88, 0.72);
  border-radius: 7px;
  background:
    linear-gradient(180deg, rgba(255, 248, 232, 0.14), rgba(255, 248, 232, 0.06)),
    rgba(44, 20, 32, 0.74);
  color: #fff8e8;
  font: inherit;
  font-size: 0.84rem;
  font-weight: 900;
  cursor: pointer;
  box-shadow:
    inset 0 0 0 1px rgba(255, 248, 232, 0.07),
    0 8px 14px rgba(0, 0, 0, 0.18);
}

.study-time-button:hover,
.study-time-button:focus-visible {
  border-color: #fff1a8;
  outline: none;
  box-shadow:
    0 0 0 3px rgba(255, 241, 168, 0.15),
    0 8px 14px rgba(0, 0, 0, 0.18);
}

.study-time-button.active {
  border-color: rgba(111, 239, 183, 0.9);
  background:
    linear-gradient(180deg, rgba(33, 150, 127, 0.72), rgba(8, 86, 84, 0.72)),
    rgba(4, 54, 55, 0.82);
}

.study-time-button.ghost {
  width: 36px;
  padding: 0;
}

.study-time-button svg {
  width: 15px;
  height: 15px;
}

.pomodoro-notice {
  position: fixed;
  z-index: 92;
  inset: 0;
  display: grid;
  place-items: center;
  padding: 16px;
  background: rgba(4, 8, 13, 0.28);
  color: #fff8e8;
  text-align: center;
  pointer-events: auto;
}

.pomodoro-notice-card {
  display: grid;
  justify-items: center;
  width: min(680px, calc(100vw - 32px));
  border: 3px solid rgba(255, 227, 125, 0.96);
  border-radius: 14px;
  background:
    linear-gradient(135deg, rgba(10, 96, 89, 0.98), rgba(47, 22, 62, 0.98)),
    rgba(6, 22, 29, 0.98);
  color: #fff8e8;
  padding: clamp(24px, 3vw, 40px);
  box-shadow:
    0 30px 78px rgba(0, 0, 0, 0.56),
    0 0 42px rgba(111, 239, 183, 0.3),
    inset 0 0 0 1px rgba(255, 248, 232, 0.14);
  cursor: pointer;
  user-select: none;
}

.pomodoro-notice[data-phase="shortBreak"] .pomodoro-notice-card,
.pomodoro-notice[data-phase="longBreak"] .pomodoro-notice-card {
  background:
    linear-gradient(135deg, rgba(42, 63, 122, 0.98), rgba(79, 31, 88, 0.98)),
    rgba(6, 22, 29, 0.98);
  box-shadow:
    0 30px 78px rgba(0, 0, 0, 0.56),
    0 0 42px rgba(117, 191, 255, 0.28),
    inset 0 0 0 1px rgba(255, 248, 232, 0.14);
}

.pomodoro-notice.hidden {
  display: none;
}

.pomodoro-notice.show .pomodoro-notice-card {
  animation: pomodoroNoticeCardIn 240ms ease-out both;
}

.pomodoro-notice-label {
  color: #ffe37d;
  font-size: 0.78rem;
  font-weight: 900;
  letter-spacing: 0;
}

.pomodoro-notice strong {
  display: block;
  margin-top: 8px;
  color: #fffdf6;
  font-size: clamp(2.7rem, 6vw, 6.2rem);
  line-height: 1.02;
  font-weight: 900;
  text-shadow:
    0 5px 0 rgba(0, 0, 0, 0.34),
    0 0 24px rgba(255, 227, 125, 0.28);
}

.pomodoro-notice p {
  max-width: 34em;
  margin: 14px 0 0;
  color: rgba(255, 248, 232, 0.84);
  font-size: clamp(1.02rem, 1.5vw, 1.28rem);
  line-height: 1.5;
  font-weight: 900;
}

.image-preview {
  position: fixed;
  z-index: 120;
  inset: 0;
  display: grid;
  place-items: center;
  padding: clamp(8px, 2vw, 22px);
  color: #fff8e8;
}

.image-preview.hidden {
  display: none;
}

.image-preview-backdrop {
  position: absolute;
  inset: 0;
  border: 0;
  background:
    radial-gradient(circle at 50% 34%, rgba(111, 239, 183, 0.14), transparent 38%),
    rgba(2, 6, 10, 0.84);
  cursor: zoom-out;
}

.image-preview-dialog {
  position: relative;
  z-index: 1;
  display: grid;
  width: min(96vw, 1380px);
  max-height: 94dvh;
  border: 2px solid rgba(244, 206, 88, 0.9);
  border-radius: 10px;
  background:
    linear-gradient(135deg, rgba(10, 57, 59, 0.96), rgba(33, 17, 28, 0.96)),
    rgba(6, 22, 29, 0.98);
  box-shadow:
    0 30px 90px rgba(0, 0, 0, 0.66),
    0 0 36px rgba(244, 206, 88, 0.2),
    inset 0 0 0 1px rgba(255, 248, 232, 0.12);
  overflow: hidden;
}

.image-preview-close {
  position: absolute;
  z-index: 2;
  top: 10px;
  right: 10px;
  display: grid;
  place-items: center;
  width: 42px;
  height: 42px;
  border: 1px solid rgba(255, 248, 232, 0.38);
  border-radius: 8px;
  background: rgba(12, 9, 18, 0.78);
  color: #fffdf6;
  box-shadow: 0 8px 18px rgba(0, 0, 0, 0.34);
  cursor: pointer;
}

.image-preview-close:hover,
.image-preview-close:focus-visible {
  border-color: #fff1a8;
  outline: none;
  box-shadow:
    0 0 0 3px rgba(255, 241, 168, 0.18),
    0 8px 18px rgba(0, 0, 0, 0.34);
}

.image-preview-close svg {
  width: 22px;
  height: 22px;
}

.image-preview-scroll {
  max-height: 94dvh;
  overflow: auto;
  overscroll-behavior: contain;
  -webkit-overflow-scrolling: touch;
  touch-action: pan-x pan-y;
  padding: clamp(12px, 2vw, 22px);
  scrollbar-width: none;
}

.image-preview-scroll::-webkit-scrollbar {
  display: none;
}

.image-preview-scroll img {
  display: block;
  width: clamp(680px, 92vw, 1280px);
  max-width: none;
  height: auto;
  margin: 0 auto;
  touch-action: pan-x pan-y;
  border: 1px solid rgba(48, 37, 29, 0.24);
  border-radius: 6px;
  background: #fff;
  box-shadow:
    0 12px 30px rgba(0, 0, 0, 0.34),
    inset 0 0 0 1px rgba(255, 255, 255, 0.82);
}

.image-preview-open {
  overflow: hidden;
}

.study-activity-check {
  position: fixed;
  z-index: 95;
  top: 50%;
  left: 50%;
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: clamp(18px, 3vw, 30px);
  align-items: center;
  width: min(760px, calc(100vw - 32px));
  min-height: clamp(210px, 30vh, 320px);
  border: 3px solid rgba(255, 227, 125, 0.96);
  border-radius: 14px;
  background:
    linear-gradient(135deg, rgba(120, 27, 34, 0.98), rgba(5, 82, 84, 0.98)),
    rgba(6, 22, 29, 0.98);
  color: #fff8e8;
  padding: clamp(22px, 3vw, 36px);
  box-shadow:
    0 32px 80px rgba(0, 0, 0, 0.62),
    0 0 0 9999px rgba(4, 8, 13, 0.42),
    0 0 42px rgba(255, 227, 125, 0.34),
    0 0 0 1px rgba(255, 248, 232, 0.16) inset;
  transform: translate(-50%, -50%);
  animation: centerNoticeIn 240ms ease-out both;
}

.study-activity-check.hidden {
  display: none;
}

.study-activity-check.warning {
  border-color: #ff9f4a;
  box-shadow:
    0 32px 80px rgba(0, 0, 0, 0.62),
    0 0 0 9999px rgba(4, 8, 13, 0.48),
    0 0 46px rgba(255, 146, 64, 0.5),
    0 0 0 1px rgba(255, 248, 232, 0.16) inset;
}

.study-activity-check.stopped {
  border-color: rgba(255, 107, 107, 0.94);
  background:
    linear-gradient(135deg, rgba(127, 29, 29, 0.98), rgba(44, 20, 32, 0.98)),
    rgba(6, 22, 29, 0.98);
}

.study-activity-label {
  display: block;
  color: #ffe37d;
  font-size: 0.62rem;
  font-weight: 900;
  letter-spacing: 0;
}

.study-activity-check strong {
  display: block;
  margin-top: 8px;
  font-size: clamp(2.3rem, 5vw, 4.8rem);
  line-height: 1.2;
  text-shadow:
    0 4px 0 rgba(0, 0, 0, 0.34),
    0 0 22px rgba(255, 227, 125, 0.28);
}

.study-activity-check p {
  margin: 12px 0 0;
  color: rgba(255, 248, 232, 0.82);
  font-size: clamp(1rem, 1.55vw, 1.28rem);
  font-weight: 800;
  line-height: 1.45;
}

.study-activity-side {
  display: grid;
  gap: 8px;
  justify-items: center;
}

#studyActivityCountdown {
  color: #fff1a8;
  font-size: clamp(2rem, 4vw, 3.6rem);
  font-weight: 900;
  line-height: 1;
  font-variant-numeric: tabular-nums;
  white-space: nowrap;
  text-align: center;
  text-shadow: 0 4px 0 rgba(0, 0, 0, 0.32);
}

.study-activity-confirm {
  min-height: 58px;
  min-width: 160px;
  border: 1px solid rgba(244, 206, 88, 0.9);
  border-radius: 999px;
  background:
    linear-gradient(180deg, rgba(111, 239, 183, 0.82), rgba(8, 86, 84, 0.82)),
    rgba(4, 54, 55, 0.9);
  color: #fffdf6;
  font: inherit;
  font-size: clamp(1.04rem, 1.35vw, 1.22rem);
  font-weight: 900;
  cursor: pointer;
  box-shadow:
    0 8px 14px rgba(0, 0, 0, 0.24),
    inset 0 1px 0 rgba(255, 255, 255, 0.2);
}

.study-activity-confirm:hover,
.study-activity-confirm:focus-visible {
  border-color: #fff1a8;
  outline: none;
  box-shadow:
    0 0 0 3px rgba(255, 241, 168, 0.18),
    0 8px 14px rgba(0, 0, 0, 0.24);
}

.side-stats {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 8px;
  padding: 10px;
}

.side-stats div {
  border: 1px solid rgba(255, 248, 232, 0.16);
  border-radius: 8px;
  background: rgba(255, 248, 232, 0.08);
  padding: 8px;
}

@media (max-width: 1500px) {
  .app-shell {
    min-height: 100vh;
  }

  .playfield {
    grid-template-columns: 1fr;
  }

  .topbar {
    grid-template-columns: minmax(0, 1fr);
  }

  .header-cards,
  .topbar .toolbar,
  .status-band {
    order: initial;
  }

  .status-band {
    grid-template-columns: minmax(118px, 150px) repeat(4, minmax(76px, 1fr)) minmax(180px, 2fr);
  }

  .right-rail {
    grid-template-columns: minmax(150px, 0.75fr) minmax(220px, 1.25fr) minmax(190px, 0.9fr) minmax(220px, 1fr);
    grid-template-rows: auto;
    max-height: none;
    overflow: visible;
    overscroll-behavior: auto;
    scrollbar-gutter: auto;
  }

}

@media (max-width: 1180px) {
  .quiz-panel {
    grid-template-rows: auto auto auto auto minmax(140px, 36vh);
  }

  .question-text {
    min-height: clamp(120px, 18vh, 190px);
    font-size: clamp(1.89rem, 4.16vw, 2.8rem);
  }

  .option-button {
    min-height: 72px;
    font-size: clamp(1.61rem, 3.9vw, 2.16rem);
  }
}

@media (min-width: 1181px) {
  .options:not(.judge-options) .option-item:nth-child(5):last-child {
    grid-column: 1 / -1;
    justify-self: stretch;
    width: 100%;
  }

  .option-button {
    align-content: center;
    min-height: clamp(70px, 8.6vh, 108px);
  }
}

@media (min-width: 1181px) and (max-height: 1180px) {
  :root {
    --topbar-control-height: 48px;
  }

  .app-shell {
    grid-template-columns: clamp(360px, 19vw, 430px) minmax(0, 1fr);
  }

  .sidebar {
    padding: 12px;
  }

  .brand {
    gap: 9px;
    margin-bottom: 10px;
  }

  .brand-mark {
    width: 42px;
    height: 42px;
  }

  .brand h1 {
    font-size: 1.04rem;
  }

  .course-switch,
  .format-switch {
    margin-bottom: 18px;
  }

  .course-tab {
    min-height: 58px;
    padding: 12px 10px;
    font-size: 1.08rem;
  }

  .format-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 10px;
  }

  .format-tab {
    min-height: 50px;
    padding: 10px 12px;
    font-size: 1.08rem;
  }

  .chapter-list {
    grid-template-columns: 1fr;
    gap: 5px;
  }

  .chapter-button {
    grid-template-columns: auto minmax(0, 1fr) auto;
    min-height: 56px;
    padding: 8px 10px;
    gap: 9px;
  }

  .chapter-no {
    width: 36px;
    height: 36px;
    font-size: 1rem;
  }

  .chapter-name {
    font-size: 1.04rem;
    line-height: 1.22;
  }

  .chapter-score {
    display: block;
    font-size: 0.88rem;
  }

  :root[data-course="advanced-am1"] .chapter-score {
    display: none;
  }

  .main {
    gap: 8px;
    padding: 10px 12px;
  }

  .topbar {
    gap: 6px;
    padding: 6px;
  }

  .topbar h2 {
    font-size: clamp(1.12rem, 1.35vw, 1.46rem);
  }

  .header-cards {
    grid-template-columns: repeat(2, minmax(92px, 110px));
    gap: 6px;
  }

  .topbar .icon-button {
    min-height: var(--topbar-control-height);
    padding: 0 9px;
  }

  .status-band {
    grid-template-columns: minmax(104px, 124px) repeat(4, minmax(62px, 78px)) minmax(150px, 1fr);
    gap: 5px;
    padding: 4px 6px;
  }

  .status-cell {
    min-height: 30px;
    padding: 3px 6px;
  }

  .status-band strong {
    font-size: 0.96rem;
  }

  .score-cell strong {
    font-size: 1.12rem;
  }

  .playfield {
    grid-template-columns: minmax(620px, 1fr) clamp(220px, 15vw, 286px);
    gap: 10px;
  }

  .right-rail {
    grid-template-columns: minmax(0, 1fr);
    grid-template-rows: repeat(3, auto);
    gap: 8px;
  }

  .score-boss,
  .weather-card,
  .review-curriculum-card {
    padding: 8px;
  }

  .study-time-card {
    gap: 6px;
    padding: 7px;
  }

  .study-clock,
  .study-stopwatch {
    padding: 7px;
  }

  .score-boss strong {
    font-size: clamp(1.12rem, 1.48vw, 1.62rem);
  }

  .score-track.large {
    height: 10px;
    margin-top: 7px;
  }

  .side-stats {
    gap: 6px;
    padding: 7px;
  }

  .quiz-panel {
    grid-template-rows: minmax(120px, 0.78fr) auto auto auto minmax(240px, 1.22fr);
    gap: 8px;
    padding: 10px;
  }

  .quiz-panel.source-layout:not(.review-layout) {
    grid-template-rows: auto auto auto auto auto;
  }

  .quiz-panel.source-layout:not(.review-layout) .question-board {
    flex: 0 0 auto;
    min-height: clamp(220px, 38vh, 360px);
    max-height: none;
    gap: 5px;
    padding: 8px;
    overflow: visible;
  }

  .quiz-panel.source-layout:not(.review-layout) .question-text.html-question {
    min-height: 0;
    padding: 7px 10px;
    font-size: clamp(0.82rem, 0.9vw, 1.02rem);
    line-height: 1.32;
  }

  .quiz-panel.source-layout .answer-dock,
  .quiz-panel.quiz-custom-layout.source-layout:not(.review-layout) .answer-dock {
    flex: 0 0 auto;
    padding: 6px;
    min-height: clamp(260px, 40vh, 440px);
    max-height: none;
  }

  .quiz-panel.source-layout .options {
    gap: 4px;
  }

  .quiz-panel.source-layout .option-button {
    grid-template-columns: 24px minmax(0, 1fr);
    gap: 7px;
    min-height: clamp(32px, 3.4vh, 40px);
    padding: 3px 8px;
    font-size: clamp(0.78rem, 0.84vw, 0.96rem);
    line-height: 1.14;
  }

  .quiz-panel.source-layout .option-content {
    font-size: clamp(0.78rem, 0.84vw, 0.96rem);
    line-height: 1.14;
  }

  .quiz-panel.source-layout .option-letter {
    width: 22px;
    height: 22px;
    font-size: 0.72rem;
  }

  .quiz-panel.source-layout.inline-choice-feedback:not(.review-layout) .question-board {
    min-height: clamp(100px, 16vh, 190px);
    max-height: min(20vh, 230px);
  }

  .quiz-panel.source-layout.inline-choice-feedback:not(.review-layout) .question-text.html-question {
    padding: 6px 8px;
    font-size: clamp(0.78rem, 0.86vw, 1rem);
    line-height: 1.22;
  }

  .quiz-panel.source-layout.inline-choice-feedback:not(.review-layout) .answer-dock,
  .quiz-panel.quiz-custom-layout.source-layout.inline-choice-feedback:not(.review-layout) .answer-dock {
    flex: 1 1 auto;
    max-height: min(42dvh, 420px);
    overflow-y: auto;
    overscroll-behavior-y: auto;
    -webkit-overflow-scrolling: touch;
    touch-action: pan-y;
  }

  .quiz-panel.review-layout,
  .quiz-panel.source-layout.review-layout {
    --review-question-size: 0.32fr;
    --review-answers-size: 1fr;
    --review-feedback-size: 1.58fr;
    grid-template-rows:
      minmax(0, var(--review-question-size))
      auto
      auto
      minmax(0, var(--review-answers-size))
      minmax(0, var(--review-feedback-size));
  }

  .quiz-panel::before {
    inset: 5px;
  }

  .question-board {
    grid-template-rows: auto auto minmax(74px, 1fr);
    gap: 7px;
    padding: 10px;
  }

  .question-head {
    gap: 6px;
  }

  .review-session-hud {
    gap: 6px;
    padding: 8px;
  }

  .review-session-hud-head strong {
    font-size: 0.78rem;
  }

  .review-session-hud-head small,
  .review-session-hud-grid span {
    font-size: 0.62rem;
  }

  .review-session-hud-grid {
    gap: 4px;
  }

  .review-session-hud-grid span {
    min-height: 20px;
    padding: 2px 6px;
  }

  .understanding-toggle {
    width: min(100%, 760px);
    flex: 0 1 760px;
    order: 3;
    max-width: 100%;
    min-width: 0;
    margin-left: 0;
  }

  .understanding-choice-button {
    min-height: 34px;
    padding: 0 5px;
    font-size: 0.68rem;
    line-height: 1.08;
  }

  .question-chip,
  .variant-chip {
    min-height: 24px;
    padding: 3px 8px;
    font-size: 0.66rem;
  }

  .question-text {
    min-height: clamp(96px, 15vh, 168px);
    padding: 14px 22px;
    font-size: clamp(1.85rem, 2.76vw, 2.91rem);
    line-height: 1.34;
  }

  .time-card {
    min-height: 10px;
  }

  .answer-dock {
    padding: 8px;
  }

  .options {
    gap: 7px;
  }

  .option-button {
    grid-template-columns: 34px minmax(0, 1fr);
    gap: 10px;
    min-height: clamp(50px, 5.5vh, 66px);
    padding: 7px 14px;
    font-size: clamp(1.51rem, 1.79vw, 1.92rem);
    line-height: 1.24;
  }

  .option-letter {
    width: 30px;
    height: 30px;
    font-size: 0.98rem;
  }

  .feedback {
    padding: 10px 14px;
    font-size: clamp(0.96rem, 1.02vw, 1.08rem);
  }

  .quiz-panel.review-layout .feedback {
    padding-bottom: calc(14px + env(safe-area-inset-bottom));
    scroll-padding-bottom: 14px;
  }

  .feedback-title {
    margin-bottom: 5px;
    font-size: clamp(1.02rem, 1.12vw, 1.18rem);
  }

  .review-session-summary-grid {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }

  .review-session-debrief-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .feedback-body {
    line-height: 1.54;
  }

  .feedback-actions {
    margin: 0 0 8px;
  }

  .quiz-actions {
    min-height: 28px;
  }

  .pager {
    gap: 3px;
    padding: 2px 3px 4px;
  }

  .pager button {
    flex-basis: 24px;
    width: 24px;
    height: 24px;
    font-size: 0.72rem;
  }
}

@media (max-width: 1180px) {
  .study-summary-layout {
    grid-template-columns: 1fr;
    grid-auto-rows: max-content;
    align-content: start;
    overflow: auto;
    overscroll-behavior: contain;
    scrollbar-width: none;
  }

  .study-summary-layout::-webkit-scrollbar {
    display: none;
  }

  .executive-study-report,
  .study-summary-review {
    min-height: auto;
    overflow: visible;
  }
}

@media (max-width: 980px) {
  :root {
    --academy-bg: none;
  }

  body {
    overflow: auto;
    background:
      linear-gradient(180deg, rgba(38, 15, 27, 0.98), rgba(6, 39, 41, 0.98)),
      linear-gradient(135deg, #100b14, #17131f 42%, #061e24);
  }

  .stage-canvas,
  .effects-canvas {
    display: none;
  }

  .app-shell {
    grid-template-columns: 1fr;
    height: auto;
    max-height: none;
    overflow: visible;
  }

  .sidebar {
    border-right: 0;
    border-bottom: 2px solid rgba(244, 206, 88, 0.62);
    max-height: none;
    overflow: visible;
  }

  .chapter-list.categorized {
    overflow: visible;
  }

  .quiz-panel,
  .question-board,
  .topbar,
  .status-band,
  .score-boss,
  .weather-card,
  .study-time-card,
  .review-curriculum-card,
  .side-stats {
    backdrop-filter: none;
  }

  .time-card::before,
  .score-track span::after,
  .timer-bar.danger {
    animation: none;
  }

  .result-burst.show {
    animation-duration: 3800ms;
  }

  .study-summary-panel {
    align-items: start;
    padding: 0;
  }

  .study-summary-card {
    width: 100vw;
    width: 100dvw;
    height: 100vh;
    height: 100dvh;
    max-height: none;
    min-height: 0;
  }

  .study-summary-bar {
    grid-template-columns: minmax(0, 1fr) auto;
    padding: 10px 12px;
  }

  .study-summary-bar-stats {
    grid-column: 1 / -1;
    display: flex;
    grid-template-columns: none;
    gap: 5px;
    overflow-x: auto;
    overscroll-behavior-inline: contain;
    scrollbar-width: none;
  }

  .study-summary-bar-stat {
    flex: 0 0 clamp(118px, 30vw, 168px);
    min-height: 48px;
    padding: 6px;
  }

  .study-summary-bar-stat span {
    font-size: 0.48rem;
  }

  .study-summary-bar-stat strong {
    font-size: 0.78rem;
  }

  .study-summary-bar-stat small {
    font-size: 0.5rem;
  }

  .study-summary-jumpbar {
    display: flex;
    gap: 5px;
    padding: 6px 10px;
    overflow-x: auto;
    overscroll-behavior-inline: contain;
    scrollbar-width: none;
  }

  .study-summary-jumpbar button {
    flex: 0 0 clamp(68px, 18vw, 104px);
    min-height: 34px;
    gap: 4px;
    padding: 2px 4px;
    font-size: 0.62rem;
  }

  .study-summary-jumpbar svg {
    width: 14px;
    height: 14px;
  }

  .study-summary-close {
    min-width: 42px;
    width: 42px;
    padding: 0;
  }

  .study-summary-close span {
    display: none;
  }

  .study-summary-layout {
    grid-template-columns: 1fr;
    grid-auto-rows: max-content;
    align-content: start;
    gap: 10px;
    padding: 10px;
    overflow: auto;
    overscroll-behavior: contain;
    scrollbar-width: none;
  }

  .study-summary-layout::-webkit-scrollbar {
    display: none;
  }

  .study-summary-bar-stats::-webkit-scrollbar,
  .study-summary-jumpbar::-webkit-scrollbar {
    display: none;
  }

  .executive-study-report,
  .study-summary-review {
    min-height: auto;
    overflow: visible;
  }

  .study-summary-review {
    grid-template-rows: auto auto auto;
  }

  .study-insight-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .study-week-bars {
    min-height: 72px;
  }

  .study-week-bar {
    height: 54px;
  }

  .study-forecast-rails {
    grid-template-columns: 1fr;
  }

  .study-forecast-head {
    display: grid;
  }

  .study-action-head {
    display: grid;
  }

  .study-efficiency-head {
    display: grid;
  }

  .review-outlook-head {
    display: grid;
  }

  .review-calendar-head {
    display: grid;
  }

  .review-target-head {
    display: grid;
    grid-template-columns: 1fr;
  }

  .review-today-head {
    grid-template-columns: 1fr;
  }

  .review-dial-head {
    display: grid;
  }

  .review-sprint-head {
    display: grid;
  }

  .review-focus-head {
    display: grid;
  }

  .study-forecast-head small {
    max-width: none;
    text-align: left;
  }

  .study-efficiency-head small {
    max-width: none;
    text-align: left;
  }

  .review-outlook-head small {
    max-width: none;
    text-align: left;
  }

  .review-calendar-head small {
    max-width: none;
    text-align: left;
  }

  .review-target-head small {
    max-width: none;
    text-align: left;
  }

  .review-today-head small {
    max-width: none;
    text-align: left;
  }

  .review-dial-head small {
    max-width: none;
    text-align: left;
  }

  .review-sprint-head small {
    max-width: none;
    text-align: left;
  }

  .review-focus-head small {
    max-width: none;
    text-align: left;
  }

  .review-return-head {
    grid-template-columns: 1fr;
  }

  .review-return-head small {
    justify-self: stretch;
    text-align: left;
  }

  .review-return-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .review-coach-head {
    grid-template-columns: 1fr;
  }

  .review-coach-head small {
    max-width: none;
    text-align: left;
  }

  .review-coach-route,
  .review-coach-metrics {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .study-efficiency-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .review-outlook-bars {
    grid-template-columns: repeat(5, minmax(0, 1fr));
  }

  .review-outlook-metrics {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .review-calendar-metrics {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .review-calendar-grid {
    grid-template-columns: repeat(5, minmax(0, 1fr));
  }

  .review-calendar-day {
    min-height: 76px;
  }

  .review-target-list {
    grid-template-columns: 1fr;
  }

  .review-today-row {
    grid-template-columns: minmax(46px, 0.36fr) minmax(0, 1fr) minmax(48px, auto);
    min-height: 62px;
  }

  .review-today-foot {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }

  .review-dial-modes {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .review-sprint-grid {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }

  .study-course-row {
    grid-template-columns: 1fr;
  }

  .study-summary-panel .review-curve-stats {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }

  .review-upcoming-head {
    display: grid;
  }

  .review-upcoming-head small {
    max-width: none;
    text-align: left;
  }

  .review-upcoming-grid {
    grid-template-columns: repeat(15, minmax(48px, 1fr));
    overflow-x: auto;
    padding-bottom: 2px;
  }

  .review-mission-board {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .review-critical-head {
    display: grid;
  }

  .review-critical-head small {
    max-width: none;
    text-align: left;
  }

  .review-critical-metrics {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .review-critical-steps {
    grid-template-columns: 1fr;
  }

  .review-stage-head {
    display: grid;
  }

  .review-stage-head small {
    max-width: none;
    text-align: left;
  }

  .review-stage-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .review-bottleneck-head {
    display: grid;
  }

  .review-bottleneck-head small {
    max-width: none;
    text-align: left;
  }

  .review-bottleneck-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .review-set-head {
    display: grid;
  }

  .review-set-head small {
    white-space: normal;
  }

  .review-set-stats {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .review-priority-head {
    display: grid;
  }

  .review-priority-head small {
    white-space: normal;
  }

  .review-priority-row {
    grid-template-columns: auto minmax(0, 1fr);
  }

  .review-priority-meta {
    grid-column: 1 / -1;
  }

  .review-mastery-stats,
  .review-mastery-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .review-load-head {
    display: grid;
  }

  .review-load-head small {
    max-width: none;
    text-align: left;
  }

  .review-load-metrics {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .review-load-lane {
    grid-template-columns: 1fr;
  }

  .review-course-map-head {
    display: grid;
  }

  .review-course-map-head small {
    white-space: normal;
  }

  .review-course-map-row {
    grid-template-columns: 1fr;
  }

  .review-course-map-meta {
    grid-template-columns: repeat(4, minmax(0, 1fr));
    min-width: 0;
  }

  .review-pace-meter {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .review-time-budget-head {
    display: grid;
  }

  .review-time-budget-head small {
    white-space: normal;
  }

  .review-time-budget-grid {
    grid-template-columns: 1fr;
  }

  .review-session-controls {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .review-session-controls.compact {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }

  .study-summary-panel .review-forgetting-curve {
    min-height: 190px;
  }

  .review-course-chip {
    min-height: 28px;
    padding: 0 8px;
    font-size: 0.64rem;
  }

  .review-course-filter small {
    font-size: 0.58rem;
  }

  .right-rail {
    grid-template-rows: auto auto auto;
    gap: 10px;
  }

  .right-rail .score-boss {
    display: none;
  }

  .main {
    height: auto;
    min-height: auto;
    max-height: none;
    padding: 16px;
    overflow: visible;
    overscroll-behavior: auto;
  }

  .playfield {
    height: auto;
    max-height: none;
    overflow: visible;
  }

  .periodic-stage {
    position: fixed;
    inset: 74px 10px 12px;
    left: auto;
    top: auto;
    grid-template-columns: repeat(18, 42px);
    grid-template-rows: repeat(9, 54px);
    width: auto;
    max-height: none;
    transform: none;
  }

  .periodic-stage .periodic-element-button {
    width: 42px;
    height: 54px;
  }

  .quiz-panel,
  .quiz-panel.source-layout {
    height: auto;
    max-height: none;
    overflow: visible;
  }

  .quiz-panel.source-layout:not(.review-layout) .question-board {
    height: auto;
    max-height: none;
    overflow: visible;
  }

  .quiz-panel.source-layout .answer-dock,
  .quiz-panel.quiz-custom-layout.source-layout:not(.review-layout) .answer-dock {
    height: auto;
    max-height: none;
    overflow: visible;
    overscroll-behavior: auto;
    scrollbar-gutter: auto;
  }

  .quiz-panel.source-layout:not(.review-layout) .question-text.html-question {
    max-height: none;
    overflow: visible;
    font-size: clamp(1rem, 4.2vw, 1.16rem);
    line-height: 1.58;
  }

  .quiz-panel.review-layout,
  .quiz-panel.source-layout.review-layout {
    grid-template-rows: auto auto auto auto auto;
  }

  .quiz-panel.review-layout .question-board,
  .quiz-panel.review-layout .answer-dock,
  .quiz-panel.review-layout .feedback {
    max-height: none;
    overflow: visible;
    overscroll-behavior: auto;
    scrollbar-gutter: auto;
  }

  .topbar {
    grid-template-columns: 1fr;
  }

  .status-band {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }

  .score-cell {
    grid-column: span 1;
  }

  .progress-cell {
    grid-column: 1 / -1;
  }
}

@media (max-width: 720px) {
  .brand h1 {
    font-size: 1.02rem;
  }

  .brand p,
  .eyebrow,
  .stat-label {
    font-size: 0.76rem;
  }

  .course-tab,
  .format-tab {
    min-height: 46px;
    padding: 8px 10px;
    font-size: 0.96rem;
  }

  .sidebar-label {
    font-size: 0.92rem;
  }

  .chapter-category-toggle,
  .chapter-button {
    min-height: 42px;
    padding: 7px 9px;
  }

  .chapter-category-name,
  :root[data-course="advanced-am1"] .chapter-category-name,
  :root[data-course="pe-first-info"] .chapter-category-name,
  .chapter-name,
  :root[data-course="advanced-am1"] .chapter-name,
  :root[data-course="pe-first-info"] .chapter-name {
    font-size: 0.94rem;
    line-height: 1.24;
  }

  .chapter-category-count,
  :root[data-course="advanced-am1"] .chapter-category-count,
  :root[data-course="pe-first-info"] .chapter-category-count,
  .chapter-score {
    font-size: 0.74rem;
  }

  .chapter-no {
    width: 32px;
    height: 32px;
    font-size: 0.9rem;
  }

  .chapter-list {
    grid-template-columns: 1fr;
  }

  .options,
  .options.judge-options,
  .typing-panel,
  .clue-box,
  .right-rail {
    grid-template-columns: 1fr;
  }

  .options:not(.judge-options) .option-item:nth-child(5):last-child {
    width: 100%;
  }

  .status-band {
    grid-template-columns: 1fr 1fr;
    gap: 7px;
    padding: 8px;
  }

  .status-band strong,
  .score-cell strong {
    font-size: 0.96rem;
  }

  .topbar h2 {
    font-size: 1.18rem;
    white-space: normal;
  }

  .score-cell,
  .progress-cell {
    grid-column: 1 / -1;
  }

  .progress-cell {
    grid-template-columns: 1fr;
    gap: 6px;
  }

  .toolbar {
    display: grid;
    grid-template-columns: repeat(3, minmax(74px, 1fr));
  }

  .icon-button {
    min-height: 44px;
    padding: 0 8px;
    font-size: 0.88rem;
  }

  .icon-button span {
    font-size: 0.74rem;
  }

  .question-text {
    min-height: auto;
    padding: 14px 16px;
    font-size: 1.02rem;
    line-height: 1.48;
  }

  .question-text.html-question {
    max-height: none;
    padding: 14px 16px;
    font-size: 0.98rem;
    line-height: 1.58;
  }

  .quiz-panel.source-layout:not(.review-layout) .question-text.html-question,
  .quiz-panel.source-layout .question-text.html-question {
    min-height: auto;
    max-height: none;
    overflow: visible;
    padding: 12px 14px;
    font-size: clamp(0.94rem, 3.9vw, 1.04rem);
    line-height: 1.58;
  }

  .pe-kakomonn-question,
  .kougai-question {
    gap: 6px;
  }

  .pe-question-title,
  .pe-question-field,
  .kougai-question-title,
  .kougai-question-subject {
    min-height: 22px;
    padding: 2px 4px;
    font-size: 0.56rem;
    line-height: 1.1;
  }

  .pe-question-title,
  .kougai-question-title {
    word-spacing: -0.18em;
  }

  .question-chip,
  .variant-chip {
    min-height: 24px;
    padding: 3px 8px;
    font-size: 0.68rem;
  }

  .understanding-toggle {
    width: 100%;
    flex: 1 0 100%;
    order: 3;
    gap: 4px;
    max-width: 100%;
    min-width: 0;
    margin-left: 0;
  }

  .understanding-choice-button {
    min-height: 32px;
    padding: 0 4px;
    border-radius: 6px;
    font-size: 0.58rem;
  }

  .calculation-marker-button,
  .question-copy-button {
    min-width: 38px;
    width: 38px;
    min-height: 34px;
    padding: 0;
    font-size: 0.78rem;
  }

  .calculation-marker-button span,
  .question-copy-button span {
    display: none;
  }

  .calculation-marker-button svg,
  .question-copy-button svg {
    width: 18px;
    height: 18px;
  }

  .answer-dock {
    padding: 8px;
  }

  .quiz-panel.source-layout .answer-dock,
  .quiz-panel.quiz-custom-layout.source-layout:not(.review-layout) .answer-dock {
    max-height: none;
    overflow: visible;
  }

  .quiz-panel.source-layout.inline-choice-feedback:not(.review-layout) .answer-dock,
  .quiz-panel.quiz-custom-layout.source-layout.inline-choice-feedback:not(.review-layout) .answer-dock {
    max-height: min(46dvh, 420px);
    overflow-y: auto;
    overscroll-behavior-y: auto;
    -webkit-overflow-scrolling: touch;
    touch-action: pan-y;
  }

  .option-button,
  .quiz-panel.source-layout .option-button {
    grid-template-columns: 30px minmax(0, 1fr);
    gap: 9px;
    min-height: 46px;
    padding: 7px 10px;
    font-size: 0.88rem;
    line-height: 1.34;
  }

  .option-content {
    font-size: 0.88rem;
    line-height: 1.34;
  }

  .option-letter {
    width: 28px;
    height: 28px;
    font-size: 0.86rem;
  }

  .option-explanation-card {
    padding: 7px 10px 9px 42px;
    font-size: 0.9rem;
    line-height: 1.52;
  }

  .choice-explanation-badge {
    min-height: 22px;
    padding: 2px 7px;
    font-size: 0.72rem;
  }

  .feedback {
    padding: 14px 16px;
    max-height: none;
    overflow: visible;
    overscroll-behavior: auto;
    scrollbar-gutter: auto;
    font-size: 0.9rem;
    line-height: 1.55;
  }

  .feedback-title {
    font-size: 0.98rem;
  }

  .review-session-summary {
    padding: 9px;
  }

  .review-session-summary-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 5px;
  }

  .review-session-summary-grid div {
    padding: 6px;
  }

  .review-session-summary-grid span {
    font-size: 0.58rem;
  }

  .review-session-summary-grid strong {
    font-size: 0.84rem;
  }

  .review-session-debrief {
    padding: 8px;
  }

  .review-session-debrief-head {
    display: grid;
    gap: 3px;
  }

  .review-session-debrief-head small {
    white-space: normal;
  }

  .review-session-debrief-grid {
    grid-template-columns: 1fr;
  }

  .review-session-next-head {
    display: grid;
    justify-content: stretch;
  }

  .review-session-next-grid {
    grid-template-columns: 1fr;
  }

  .review-session-next-card {
    min-height: 68px;
  }

  .review-session-action {
    min-height: 30px;
    padding: 0 8px;
    font-size: 0.7rem;
  }

  .feedback-main-explanation-title,
  .feedback-actions {
    font-size: 0.88rem;
  }

  .result-burst {
    inset: 18px 18px auto;
    min-height: 78px;
  }

  .result-burst span {
    font-size: 1.9rem;
  }

  .result-burst small {
    font-size: 0.76rem;
  }

  .study-report-list {
    max-height: 132px;
  }

  .study-activity-check {
    top: 50%;
    right: auto;
    bottom: auto;
    left: 50%;
    width: min(94vw, 520px);
    min-height: 220px;
    grid-template-columns: 1fr;
    gap: 16px;
    padding: 22px 18px;
  }

  .study-activity-check strong,
  .pomodoro-notice strong {
    font-size: clamp(2.1rem, 12vw, 3.6rem);
  }

  .study-activity-check p,
  .pomodoro-notice p {
    font-size: 0.98rem;
  }

  .study-activity-side {
    grid-template-columns: 1fr;
    align-items: center;
    justify-items: stretch;
  }

  .study-activity-confirm {
    width: 100%;
  }

  .study-report-summary strong {
    font-size: 0.86rem;
  }

  .study-report-row {
    min-height: 34px;
  }

  .quiz-actions {
    display: grid;
    grid-template-columns: 1fr 1fr;
  }

  .pager {
    grid-column: 1 / -1;
    order: -1;
    max-width: 100%;
  }

  .pager button {
    width: 36px;
    height: 32px;
    font-size: 0.82rem;
  }
}

/* Keep the current question unmistakable even when progress and frequency colors compete. */
@keyframes pagerCurrentPulse {
  0%,
  100% {
    transform: translateY(-2px) scale(1.08);
    filter: brightness(1.02) saturate(1.08);
    box-shadow:
      0 0 0 2px rgba(255, 255, 255, 0.94),
      0 0 9px rgba(78, 230, 255, 0.82),
      0 0 17px rgba(255, 72, 173, 0.58),
      inset 0 1px rgba(255, 255, 255, 0.48);
  }

  50% {
    transform: translateY(-3px) scale(1.16);
    filter: brightness(1.24) saturate(1.34);
    box-shadow:
      0 0 0 3px rgba(255, 255, 255, 1),
      0 0 15px rgba(78, 230, 255, 1),
      0 0 28px rgba(255, 72, 173, 0.88),
      0 0 38px rgba(255, 225, 88, 0.5),
      inset 0 1px rgba(255, 255, 255, 0.68);
  }
}

@keyframes pagerCurrentHalo {
  0%,
  100% {
    opacity: 0.7;
    transform: scale(0.96) rotate(-7deg);
  }

  50% {
    opacity: 1;
    transform: scale(1.12) rotate(7deg);
  }
}

.pager button.active {
  z-index: 10;
  border-color: #ffffff;
  background: linear-gradient(145deg, #ff426f, #b832a0 48%, #4d4ed4 100%);
  color: #ffffff;
  outline: 0;
  animation: pagerCurrentPulse 1.25s ease-in-out infinite;
}

.pager button.active .pager-current-indicator {
  position: absolute;
  inset: -6px;
  z-index: 3;
  border-radius: 10px;
  padding: 2px;
  background: conic-gradient(from 20deg, #ffffff, #57ecff, #6b7dff, #f25cff, #ff5577, #ffe35b, #57f0ba, #ffffff);
  filter: drop-shadow(0 0 5px rgba(100, 225, 255, 0.95));
  pointer-events: none;
  -webkit-mask:
    linear-gradient(#000 0 0) content-box,
    linear-gradient(#000 0 0);
  -webkit-mask-composite: xor;
  mask-composite: exclude;
  animation: pagerCurrentHalo 1.25s ease-in-out infinite;
}

:root[data-theme-motion="off"] .pager button.active,
:root[data-theme-motion="off"] .pager button.active .pager-current-indicator {
  animation: none;
}

:root[data-theme-motion="off"] .pager button.active {
  transform: translateY(-2px) scale(1.1) !important;
  filter: brightness(1.15) saturate(1.2) !important;
  box-shadow:
    0 0 0 3px rgba(255, 255, 255, 0.98),
    0 0 15px rgba(78, 230, 255, 0.88),
    0 0 25px rgba(255, 72, 173, 0.7),
    inset 0 1px rgba(255, 255, 255, 0.54) !important;
}

@media (max-width: 980px) {
  .pager button.active .pager-current-indicator {
    inset: -4px;
    border-radius: 8px;
    padding: 2px;
  }
}

@media (prefers-reduced-motion: reduce) {
  .pager button.active,
  .pager button.active .pager-current-indicator {
    animation: none !important;
  }

  .pager button.active {
    transform: translateY(-2px) scale(1.1) !important;
    filter: brightness(1.15) saturate(1.2) !important;
    box-shadow:
      0 0 0 3px rgba(255, 255, 255, 0.98),
      0 0 15px rgba(78, 230, 255, 0.88),
      0 0 25px rgba(255, 72, 173, 0.7),
      inset 0 1px rgba(255, 255, 255, 0.54) !important;
  }
}

/* Pollution-control recurrence: counts exact prompt reuse within the active section. */
.question-frequency-badge {
  appearance: none;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  min-height: 30px;
  padding: 4px 10px;
  border: 1px solid rgba(250, 204, 21, 0.72);
  border-radius: 999px;
  background: linear-gradient(180deg, rgba(75, 55, 16, 0.92), rgba(34, 30, 15, 0.96));
  color: #fff1a8;
  font-size: 0.78rem;
  font-weight: 900;
  line-height: 1;
  white-space: nowrap;
  box-shadow: inset 0 1px rgba(255, 255, 255, 0.16), 0 2px 8px rgba(0, 0, 0, 0.2);
  cursor: pointer;
}

.question-frequency-badge::after {
  content: "";
  width: 7px;
  height: 7px;
  border-right: 2px solid currentColor;
  border-bottom: 2px solid currentColor;
  transform: translateY(-2px) rotate(45deg);
  transition: transform 160ms ease;
}

.question-frequency-badge[aria-expanded="true"]::after {
  transform: translateY(2px) rotate(225deg);
}

.question-frequency-badge:focus-visible {
  outline: 3px solid rgba(56, 189, 248, 0.58);
  outline-offset: 2px;
}

.question-frequency-badge.hidden {
  display: none;
}

.question-frequency-badge.frequent {
  border-color: transparent;
  background:
    linear-gradient(145deg, rgba(18, 28, 42, 0.96), rgba(34, 19, 52, 0.96)) padding-box,
    conic-gradient(from 20deg, #ff3b5c, #ffb020, #f4ef4a, #32d583, #38bdf8, #7c5cff, #ec4899, #ff3b5c) border-box;
  color: #fff7c2;
  box-shadow: 0 0 14px rgba(93, 220, 255, 0.24), inset 0 1px rgba(255, 255, 255, 0.18);
}

.question-frequency-details {
  display: grid;
  grid-template-columns: minmax(150px, auto) minmax(0, 1fr);
  align-items: start;
  gap: 12px 18px;
  margin: 8px 0 10px;
  padding: 12px 14px;
  border: 1px solid rgba(94, 234, 212, 0.42);
  border-radius: 7px;
  background:
    linear-gradient(135deg, rgba(8, 31, 43, 0.96), rgba(20, 28, 55, 0.94)) padding-box,
    linear-gradient(90deg, rgba(45, 212, 191, 0.7), rgba(96, 165, 250, 0.58), rgba(244, 114, 182, 0.55)) border-box;
  color: #eefcff;
  box-shadow: inset 0 1px rgba(255, 255, 255, 0.08), 0 8px 24px rgba(0, 0, 0, 0.18);
}

.question-frequency-details.hidden {
  display: none;
}

.question-frequency-details-head {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 12px;
  padding-top: 4px;
}

.question-frequency-details-head strong {
  font-size: 0.9rem;
  line-height: 1.3;
}

.question-frequency-details-head span {
  color: #a5f3fc;
  font-size: 0.74rem;
  font-weight: 800;
  white-space: nowrap;
}

.question-frequency-history {
  display: flex;
  flex-wrap: wrap;
  gap: 7px;
  margin: 0;
  padding: 0;
  list-style: none;
}

.question-frequency-history li {
  min-width: 0;
}

.question-frequency-history li button {
  appearance: none;
  display: inline-flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 7px;
  width: 100%;
  min-height: 30px;
  padding: 5px 9px;
  border: 1px solid rgba(148, 214, 255, 0.26);
  border-radius: 6px;
  background: rgba(255, 255, 255, 0.075);
  color: inherit;
  font: inherit;
  line-height: 1.15;
  cursor: pointer;
  transition: border-color 140ms ease, background-color 140ms ease, transform 140ms ease;
}

.question-frequency-history li button:hover {
  border-color: rgba(103, 232, 249, 0.72);
  background: rgba(56, 189, 248, 0.14);
  transform: translateY(-1px);
}

.question-frequency-history li button:focus-visible {
  outline: 3px solid rgba(56, 189, 248, 0.52);
  outline-offset: 2px;
}

.question-frequency-history li button:active {
  transform: translateY(0);
}

.question-frequency-history li span {
  color: #d9f5ff;
  font-size: 0.76rem;
}

.question-frequency-history li strong {
  color: #ffe998;
  font-size: 0.82rem;
  white-space: nowrap;
}

.pager button.kougai-repeat-dot {
  border-color: #f59e0b;
}

.pager button .kougai-frequency-count {
  position: absolute;
  top: -6px;
  left: -6px;
  z-index: 5;
  display: grid;
  place-items: center;
  min-width: 15px;
  height: 15px;
  padding-inline: 3px;
  border: 1px solid rgba(255, 250, 230, 0.94);
  border-radius: 999px;
  background: linear-gradient(180deg, #fff1a8 0%, #f59e0b 58%, #92400e 100%);
  color: #2b1704;
  font-size: 0.56rem;
  line-height: 1;
  text-shadow: 0 1px rgba(255, 255, 255, 0.5);
  box-shadow: 0 2px 5px rgba(0, 0, 0, 0.42);
  pointer-events: none;
}

.pager button .kougai-frequency-ring {
  position: absolute;
  inset: -3px;
  z-index: 4;
  border-radius: 7px;
  padding: 2px;
  background: conic-gradient(from 25deg, #ff3155, #ff9f1c, #ffe642, #22c55e, #22d3ee, #4f7cff, #a855f7, #f43f8c, #ff3155);
  pointer-events: none;
  -webkit-mask:
    linear-gradient(#000 0 0) content-box,
    linear-gradient(#000 0 0);
  -webkit-mask-composite: xor;
  mask-composite: exclude;
}

.pager button.kougai-frequent-dot {
  box-shadow: 0 0 10px rgba(56, 189, 248, 0.46), inset 0 1px rgba(255, 255, 255, 0.32);
}

@media (max-width: 980px) {
  .question-frequency-badge {
    min-height: 28px;
    padding: 4px 8px;
    font-size: 0.72rem;
  }

  .question-frequency-details {
    grid-template-columns: 1fr;
    gap: 8px;
    margin-top: 7px;
    padding: 10px;
  }

  .question-frequency-details-head {
    padding-top: 0;
  }

  .question-frequency-history {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .question-frequency-history li {
    min-width: 0;
  }
}

/* Visual theme wardrobe */
:root[data-theme="fantasy"] {
  --academy-bg: url("./assets/magic-academy-stage.png");
  --theme-scene: url("./assets/magic-academy-stage.png");
  --theme-deep: #120c18;
  --theme-panel: rgba(28, 18, 35, 0.92);
  --theme-panel-2: rgba(8, 55, 55, 0.9);
  --theme-line: rgba(231, 188, 80, 0.72);
  --theme-copy: #fff8e5;
  --theme-muted: #dbc995;
  --game-cyan: #56d8c6;
  --game-blue: #2a9ca2;
  --game-violet: #8b58bb;
  --game-pink: #d94f70;
  --game-gold: #f3cd66;
  --game-green: #46d6a1;
  --game-red: #ef6672;
}

:root[data-theme="mediterranean"] {
  --academy-bg: url("./assets/themes/mediterranean-sea.png");
  --theme-scene: url("./assets/themes/mediterranean-sea.png");
  --theme-deep: #023f67;
  --theme-panel: rgba(0, 113, 162, 0.88);
  --theme-panel-2: rgba(0, 167, 185, 0.86);
  --theme-line: rgba(255, 229, 93, 0.88);
  --theme-copy: #f8feff;
  --theme-muted: #c8f7ff;
  --game-cyan: #21d6e8;
  --game-blue: #168cff;
  --game-violet: #8d63eb;
  --game-pink: #ff5683;
  --game-gold: #ffdb4f;
  --game-green: #20d49c;
  --game-red: #ff596d;
  --game-panel: rgba(0, 82, 126, 0.9);
  --game-panel-soft: rgba(0, 126, 154, 0.82);
  --game-line: rgba(151, 244, 255, 0.6);
  --game-shadow: 0 18px 44px rgba(0, 58, 94, 0.28);
}

:root[data-theme="event-horizon"] {
  --academy-bg: url("./assets/themes/event-horizon.png");
  --theme-scene: url("./assets/themes/event-horizon.png");
  --theme-deep: #080916;
  --theme-panel: rgba(13, 13, 31, 0.92);
  --theme-panel-2: rgba(18, 34, 57, 0.9);
  --theme-line: rgba(255, 178, 82, 0.78);
  --theme-copy: #f9f7ff;
  --theme-muted: #c8c8ef;
  --game-cyan: #62d8ff;
  --game-blue: #4d77ff;
  --game-violet: #a264ff;
  --game-pink: #f05ed6;
  --game-gold: #ffb64f;
  --game-green: #50d8b0;
  --game-red: #ff657f;
  --game-panel: rgba(10, 12, 31, 0.92);
  --game-panel-soft: rgba(19, 30, 54, 0.88);
  --game-line: rgba(128, 149, 255, 0.48);
  --game-shadow: 0 18px 48px rgba(2, 2, 14, 0.5);
}

:root[data-theme="okinawa"] {
  --academy-bg: url("./assets/themes/okinawa.png");
  --theme-scene: url("./assets/themes/okinawa.png");
  --theme-deep: #03496a;
  --theme-panel: rgba(0, 90, 118, 0.9);
  --theme-panel-2: rgba(0, 141, 137, 0.86);
  --theme-line: rgba(255, 225, 117, 0.88);
  --theme-copy: #f7ffff;
  --theme-muted: #c6f8f3;
  --game-cyan: #43e2dd;
  --game-blue: #159ad1;
  --game-violet: #7865d8;
  --game-pink: #ff718b;
  --game-gold: #ffe175;
  --game-green: #33d6a1;
  --game-red: #ff6575;
  --season-action: linear-gradient(135deg, #ffe175, #43e2dd 38%, #159ad1 68%, #ff718b);
  --season-action-copy: #043d55;
  --season-answer: linear-gradient(155deg, rgba(0, 125, 143, 0.88), rgba(0, 84, 135, 0.9));
  --season-option: linear-gradient(112deg, #ffffff, #ddfffb 42%, #c8f4e8 72%, #fff0b6);
  --season-option-copy: #07394d;
  --season-option-border: rgba(33, 176, 187, 0.68);
  --season-letter: linear-gradient(145deg, #32d7cd, #0c8fc2 55%, #6d57c7);
  --theme-glass-main: rgba(0, 90, 118, 0.25);
  --theme-glass-sidebar: rgba(0, 66, 86, 0.82);
  --theme-glass-topbar: rgba(0, 91, 112, 0.77);
  --theme-glass-panel: rgba(0, 75, 99, 0.7);
  --theme-glass-question: rgba(0, 57, 78, 0.87);
  --immersive-primary: #57f1e7;
  --immersive-secondary: #ffe17c;
  --immersive-tertiary: #ff7b98;
  --immersive-surface: rgba(0, 76, 96, 0.88);
  --immersive-surface-strong: rgba(0, 46, 66, 0.97);
  --immersive-edge: rgba(255, 227, 121, 0.9);
}

:root[data-theme="hokkaido"] {
  --academy-bg: url("./assets/themes/hokkaido.png");
  --theme-scene: url("./assets/themes/hokkaido.png");
  --theme-deep: #173c55;
  --theme-panel: rgba(34, 76, 101, 0.91);
  --theme-panel-2: rgba(79, 124, 146, 0.87);
  --theme-line: rgba(225, 249, 255, 0.9);
  --theme-copy: #f9fdff;
  --theme-muted: #d8edf7;
  --game-cyan: #9be8f3;
  --game-blue: #58a8d4;
  --game-violet: #7e88cb;
  --game-pink: #d981a5;
  --game-gold: #f5df9a;
  --game-green: #75d6b5;
  --game-red: #ef7a8d;
  --season-action: linear-gradient(135deg, #f5faff, #9be8f3 36%, #58a8d4 68%, #d981a5);
  --season-action-copy: #15364a;
  --season-answer: linear-gradient(155deg, rgba(42, 88, 116, 0.91), rgba(23, 55, 80, 0.93));
  --season-option: linear-gradient(112deg, #ffffff, #eefaff 44%, #d7edf8 75%, #f7eaf0);
  --season-option-copy: #17364a;
  --season-option-border: rgba(128, 190, 216, 0.72);
  --season-letter: linear-gradient(145deg, #a8ebf3, #579fc5 55%, #6d76bd);
  --theme-glass-main: rgba(35, 72, 96, 0.24);
  --theme-glass-sidebar: rgba(20, 52, 74, 0.84);
  --theme-glass-topbar: rgba(31, 68, 92, 0.8);
  --theme-glass-panel: rgba(27, 59, 81, 0.73);
  --theme-glass-question: rgba(18, 46, 67, 0.88);
  --immersive-primary: #b5f2ff;
  --immersive-secondary: #f5df9a;
  --immersive-tertiary: #c49bd2;
  --immersive-surface: rgba(24, 58, 80, 0.9);
  --immersive-surface-strong: rgba(14, 39, 58, 0.97);
  --immersive-edge: rgba(211, 244, 255, 0.9);
}

:root[data-theme="halloween"] {
  --academy-bg: url("./assets/themes/halloween.png");
  --theme-scene: url("./assets/themes/halloween.png");
  --theme-deep: #120822;
  --theme-panel: rgba(35, 13, 55, 0.94);
  --theme-panel-2: rgba(83, 31, 75, 0.91);
  --theme-line: rgba(255, 154, 56, 0.88);
  --theme-copy: #fff8ed;
  --theme-muted: #e8c7e8;
  --game-cyan: #7ddbd4;
  --game-blue: #7254c7;
  --game-violet: #a65bd7;
  --game-pink: #ef5d95;
  --game-gold: #ff9f3f;
  --game-green: #7cd39b;
  --game-red: #ff685f;
  --season-action: linear-gradient(135deg, #ffad42, #e4633d 36%, #a450cf 68%, #49318e);
  --season-action-copy: #21102b;
  --season-answer: linear-gradient(155deg, rgba(48, 15, 65, 0.94), rgba(89, 30, 65, 0.92));
  --season-option: linear-gradient(112deg, #fffdf8, #f6eaf8 43%, #ead8f2 73%, #ffe1bd);
  --season-option-copy: #2c1934;
  --season-option-border: rgba(187, 91, 188, 0.7);
  --season-letter: linear-gradient(145deg, #ff9e38, #a84cba 52%, #51318f);
  --theme-glass-main: rgba(22, 8, 37, 0.34);
  --theme-glass-sidebar: rgba(27, 10, 43, 0.88);
  --theme-glass-topbar: rgba(47, 17, 61, 0.82);
  --theme-glass-panel: rgba(36, 12, 51, 0.78);
  --theme-glass-question: rgba(27, 9, 42, 0.9);
  --immersive-primary: #c77dff;
  --immersive-secondary: #ffad42;
  --immersive-tertiary: #ff628f;
  --immersive-surface: rgba(36, 10, 51, 0.92);
  --immersive-surface-strong: rgba(20, 6, 34, 0.98);
  --immersive-edge: rgba(255, 155, 61, 0.9);
}

:root[data-theme="new-year"] {
  --academy-bg: url("./assets/themes/new-year.png");
  --theme-scene: url("./assets/themes/new-year.png");
  --theme-deep: #4b0b15;
  --theme-panel: rgba(91, 12, 25, 0.93);
  --theme-panel-2: rgba(137, 37, 31, 0.9);
  --theme-line: rgba(247, 211, 116, 0.92);
  --theme-copy: #fffaf0;
  --theme-muted: #f4dcb3;
  --game-cyan: #74d7c7;
  --game-blue: #4c91b6;
  --game-violet: #8e62aa;
  --game-pink: #dc4e65;
  --game-gold: #f5ce69;
  --game-green: #6bc68d;
  --game-red: #e84d51;
  --season-action: linear-gradient(135deg, #f8e4a3, #f2c052 38%, #cf3c3f 70%, #7a1424);
  --season-action-copy: #481019;
  --season-answer: linear-gradient(155deg, rgba(103, 16, 29, 0.94), rgba(64, 10, 20, 0.94));
  --season-option: linear-gradient(112deg, #fffdf7, #fff5da 42%, #f8e7bd 72%, #f4d4d1);
  --season-option-copy: #461d1c;
  --season-option-border: rgba(203, 128, 58, 0.74);
  --season-letter: linear-gradient(145deg, #f7d36d, #d4483e 54%, #7a1525);
  --theme-glass-main: rgba(75, 8, 18, 0.31);
  --theme-glass-sidebar: rgba(70, 8, 18, 0.87);
  --theme-glass-topbar: rgba(96, 13, 24, 0.82);
  --theme-glass-panel: rgba(77, 10, 19, 0.76);
  --theme-glass-question: rgba(64, 8, 17, 0.9);
  --immersive-primary: #f5ce69;
  --immersive-secondary: #fff0bd;
  --immersive-tertiary: #e84d51;
  --immersive-surface: rgba(76, 8, 19, 0.92);
  --immersive-surface-strong: rgba(50, 5, 13, 0.98);
  --immersive-edge: rgba(247, 211, 116, 0.92);
}

:root[data-theme="christmas"] {
  --academy-bg: url("./assets/themes/christmas.png");
  --theme-scene: url("./assets/themes/christmas.png");
  --theme-deep: #072923;
  --theme-panel: rgba(7, 54, 45, 0.94);
  --theme-panel-2: rgba(22, 82, 61, 0.9);
  --theme-line: rgba(238, 218, 158, 0.88);
  --theme-copy: #f8fff9;
  --theme-muted: #cce8d9;
  --game-cyan: #77ddd2;
  --game-blue: #4c9ab1;
  --game-violet: #865e9d;
  --game-pink: #d74365;
  --game-gold: #f0d58a;
  --game-green: #52c486;
  --game-red: #e34e59;
  --season-action: linear-gradient(135deg, #f3dfa0, #4ec58a 37%, #146b51 66%, #d74365);
  --season-action-copy: #082f2a;
  --season-answer: linear-gradient(155deg, rgba(7, 68, 55, 0.93), rgba(75, 16, 37, 0.9));
  --season-option: linear-gradient(112deg, #ffffff, #edf9f2 42%, #d9efe3 73%, #f7dce2);
  --season-option-copy: #10372f;
  --season-option-border: rgba(66, 158, 119, 0.72);
  --season-letter: linear-gradient(145deg, #e8d07d, #2a9d6f 52%, #a92346);
  --theme-glass-main: rgba(6, 40, 34, 0.31);
  --theme-glass-sidebar: rgba(5, 42, 35, 0.87);
  --theme-glass-topbar: rgba(8, 58, 47, 0.82);
  --theme-glass-panel: rgba(7, 48, 39, 0.77);
  --theme-glass-question: rgba(5, 38, 32, 0.9);
  --immersive-primary: #79e4d2;
  --immersive-secondary: #f2d78d;
  --immersive-tertiary: #e34e67;
  --immersive-surface: rgba(5, 49, 40, 0.92);
  --immersive-surface-strong: rgba(3, 32, 27, 0.98);
  --immersive-edge: rgba(239, 220, 166, 0.9);
}

:root[data-theme="hanami"] {
  --academy-bg: url("./assets/themes/hanami.png");
  --theme-scene: url("./assets/themes/hanami.png");
  --theme-deep: #55405b;
  --theme-panel: rgba(95, 54, 87, 0.91);
  --theme-panel-2: rgba(150, 87, 120, 0.87);
  --theme-line: rgba(255, 222, 226, 0.92);
  --theme-copy: #fffaff;
  --theme-muted: #f5dce8;
  --game-cyan: #96ddd3;
  --game-blue: #7697c7;
  --game-violet: #9d6db1;
  --game-pink: #ea7ca8;
  --game-gold: #f3d49a;
  --game-green: #75c997;
  --game-red: #e76d7d;
  --season-action: linear-gradient(135deg, #f7dfa8, #f2a8bf 38%, #ca78a0 67%, #7860a0);
  --season-action-copy: #462c45;
  --season-answer: linear-gradient(155deg, rgba(116, 62, 98, 0.91), rgba(73, 55, 83, 0.93));
  --season-option: linear-gradient(112deg, #ffffff, #fff1f5 42%, #f6dfe9 73%, #eee6f6);
  --season-option-copy: #442e43;
  --season-option-border: rgba(205, 121, 158, 0.7);
  --season-letter: linear-gradient(145deg, #f2b1c7, #c36f9c 52%, #7761a0);
  --theme-glass-main: rgba(88, 52, 82, 0.25);
  --theme-glass-sidebar: rgba(77, 46, 73, 0.84);
  --theme-glass-topbar: rgba(99, 57, 90, 0.79);
  --theme-glass-panel: rgba(87, 52, 80, 0.72);
  --theme-glass-question: rgba(69, 45, 69, 0.88);
  --immersive-primary: #f4afc8;
  --immersive-secondary: #f4dba5;
  --immersive-tertiary: #a98ac9;
  --immersive-surface: rgba(83, 47, 76, 0.9);
  --immersive-surface-strong: rgba(57, 36, 58, 0.97);
  --immersive-edge: rgba(255, 221, 228, 0.92);
}

.theme-backdrop {
  position: fixed;
  inset: 0;
  z-index: 0;
  overflow: hidden;
  pointer-events: none;
  background: var(--theme-deep, #120c18);
}

.theme-backdrop-image,
.theme-backdrop-atmosphere,
.theme-backdrop-particles {
  position: absolute;
  inset: -4%;
  will-change: transform, opacity, background-position;
}

.theme-backdrop-image {
  background: var(--theme-scene) center / cover no-repeat;
  transform: scale(1.06);
}

:root[data-theme="fantasy"] .theme-backdrop-image {
  animation: fantasyBackdropDrift 30s ease-in-out infinite alternate;
}

:root[data-theme="fantasy"] .theme-backdrop-atmosphere {
  background:
    linear-gradient(115deg, transparent 18%, rgba(255, 212, 102, 0.08) 40%, transparent 54%),
    radial-gradient(ellipse at 50% 78%, rgba(20, 220, 183, 0.12), transparent 48%),
    linear-gradient(180deg, rgba(20, 8, 25, 0.1), rgba(5, 22, 25, 0.42));
  background-size: 180% 100%, 100% 100%, 100% 100%;
  animation: fantasyLightSweep 16s ease-in-out infinite;
}

:root[data-theme="fantasy"] .theme-backdrop-particles {
  background-image:
    radial-gradient(circle, rgba(255, 221, 129, 0.78) 0 1px, transparent 2px),
    radial-gradient(circle, rgba(91, 235, 218, 0.55) 0 1px, transparent 2px);
  background-position: 15% 20%, 72% 64%;
  background-size: 120px 150px, 170px 130px;
  opacity: 0.34;
  animation: fantasyMotes 24s linear infinite;
}

:root[data-theme="mediterranean"] .theme-backdrop-image {
  animation: mediterraneanBackdropDrift 28s ease-in-out infinite alternate;
}

:root[data-theme="mediterranean"] .theme-backdrop-atmosphere {
  background:
    repeating-linear-gradient(112deg, transparent 0 38px, rgba(255, 255, 255, 0.11) 43px 47px, transparent 54px 92px),
    linear-gradient(180deg, rgba(111, 238, 255, 0.08), rgba(0, 100, 170, 0.2));
  background-size: 180% 180%, 100% 100%;
  mix-blend-mode: screen;
  animation: mediterraneanCaustics 14s ease-in-out infinite alternate;
}

:root[data-theme="mediterranean"] .theme-backdrop-particles {
  inset: 0;
  background-image:
    radial-gradient(circle, transparent 0 4px, rgba(232, 255, 255, 0.62) 5px 6px, transparent 7px),
    radial-gradient(circle, transparent 0 2px, rgba(232, 255, 255, 0.52) 3px 4px, transparent 5px);
  background-position: 18% 110%, 78% 118%;
  background-size: 170px 230px, 125px 180px;
  opacity: 0.36;
  animation: mediterraneanBubbles 20s linear infinite;
}

:root[data-theme="event-horizon"] .theme-backdrop-image {
  transform-origin: 70% 48%;
  animation: horizonBackdropDrift 34s ease-in-out infinite alternate;
}

:root[data-theme="event-horizon"] .theme-backdrop-atmosphere {
  inset: -20%;
  background:
    conic-gradient(from 210deg at 70% 48%, transparent 0 27%, rgba(92, 128, 255, 0.08) 34%, rgba(255, 175, 74, 0.16) 45%, transparent 57% 100%),
    radial-gradient(ellipse at 70% 48%, transparent 0 14%, rgba(255, 184, 79, 0.12) 17%, rgba(102, 99, 255, 0.08) 23%, transparent 36%);
  mix-blend-mode: screen;
  animation: horizonLensing 22s ease-in-out infinite;
}

:root[data-theme="event-horizon"] .theme-backdrop-particles {
  background-image:
    radial-gradient(circle, rgba(222, 235, 255, 0.78) 0 1px, transparent 1.6px),
    radial-gradient(circle, rgba(255, 185, 88, 0.62) 0 1px, transparent 1.8px);
  background-size: 96px 118px, 151px 132px;
  background-position: 0 0, 35px 20px;
  opacity: 0.28;
  animation: horizonStars 38s linear infinite;
}

:root:is(
  [data-theme="okinawa"],
  [data-theme="hokkaido"],
  [data-theme="halloween"],
  [data-theme="new-year"],
  [data-theme="christmas"],
  [data-theme="hanami"]
) .theme-backdrop-image {
  animation: seasonalBackdropDrift 30s ease-in-out infinite alternate;
}

:root[data-theme="okinawa"] .theme-backdrop-atmosphere {
  background:
    repeating-linear-gradient(112deg, transparent 0 44px, rgba(255,255,255,.12) 49px 53px, transparent 60px 104px),
    radial-gradient(ellipse at 72% 78%, rgba(255, 225, 117, .24), transparent 38%);
  mix-blend-mode: screen;
  animation: mediterraneanCaustics 15s ease-in-out infinite alternate;
}

:root[data-theme="okinawa"] .theme-backdrop-particles {
  background-image:
    radial-gradient(circle, transparent 0 4px, rgba(238,255,255,.7) 5px 6px, transparent 7px),
    radial-gradient(circle, transparent 0 2px, rgba(238,255,255,.55) 3px 4px, transparent 5px);
  background-position: 20% 110%, 76% 118%;
  background-size: 180px 240px, 130px 190px;
  opacity: .34;
  animation: mediterraneanBubbles 21s linear infinite;
}

:root[data-theme="hokkaido"] .theme-backdrop-atmosphere {
  background:
    radial-gradient(ellipse at 24% 12%, rgba(196,255,239,.24), transparent 34%),
    linear-gradient(120deg, rgba(255,255,255,.2), transparent 42%, rgba(153,215,255,.12));
  animation: seasonalGlow 16s ease-in-out infinite alternate;
}

:root[data-theme="hokkaido"] .theme-backdrop-particles,
:root[data-theme="christmas"] .theme-backdrop-particles {
  background-image:
    radial-gradient(circle, rgba(255,255,255,.92) 0 1.2px, transparent 1.8px),
    radial-gradient(circle, rgba(226,246,255,.72) 0 1px, transparent 1.7px);
  background-size: 72px 88px, 111px 126px;
  background-position: 0 0, 32px 18px;
  opacity: .46;
  animation: seasonalSnow 18s linear infinite;
}

:root[data-theme="halloween"] .theme-backdrop-atmosphere {
  background:
    radial-gradient(circle at 78% 22%, rgba(255,177,74,.34) 0 5%, transparent 17%),
    radial-gradient(ellipse at 48% 82%, rgba(170,65,210,.22), transparent 44%);
  animation: seasonalGlow 13s ease-in-out infinite alternate;
}

:root[data-theme="halloween"] .theme-backdrop-particles {
  background-image:
    radial-gradient(circle, rgba(255,159,63,.8) 0 1.2px, transparent 2px),
    radial-gradient(circle, rgba(205,111,255,.62) 0 1px, transparent 1.8px);
  background-size: 96px 122px, 143px 157px;
  opacity: .34;
  animation: fantasyMotes 22s linear infinite;
}

:root[data-theme="new-year"] .theme-backdrop-atmosphere {
  background:
    radial-gradient(circle at 72% 76%, rgba(255,236,167,.48) 0 7%, rgba(244,185,77,.18) 18%, transparent 34%),
    linear-gradient(115deg, transparent 18%, rgba(255,224,139,.18) 48%, transparent 72%);
  animation: seasonalGlow 14s ease-in-out infinite alternate;
}

:root[data-theme="new-year"] .theme-backdrop-particles {
  background-image:
    radial-gradient(circle, rgba(255,229,148,.8) 0 1px, transparent 1.8px),
    radial-gradient(circle, rgba(255,248,217,.65) 0 1px, transparent 1.8px);
  background-size: 106px 134px, 157px 119px;
  opacity: .35;
  animation: fantasyMotes 26s linear infinite;
}

:root[data-theme="christmas"] .theme-backdrop-atmosphere {
  background:
    radial-gradient(circle at 18% 26%, rgba(255,222,128,.24) 0 2%, transparent 11%),
    radial-gradient(circle at 76% 22%, rgba(244,78,102,.22) 0 2%, transparent 10%),
    linear-gradient(130deg, rgba(255,255,255,.08), transparent 42%);
  animation: seasonalGlow 12s ease-in-out infinite alternate;
}

:root[data-theme="hanami"] .theme-backdrop-atmosphere {
  background:
    radial-gradient(ellipse at 24% 18%, rgba(255,248,250,.34), transparent 33%),
    linear-gradient(118deg, rgba(255,229,238,.18), transparent 44%, rgba(180,145,211,.16));
  animation: seasonalGlow 17s ease-in-out infinite alternate;
}

:root[data-theme="hanami"] .theme-backdrop-particles {
  background-image:
    radial-gradient(ellipse, rgba(255,222,231,.9) 0 2px, transparent 3px),
    radial-gradient(ellipse, rgba(246,177,204,.72) 0 2px, transparent 3px);
  background-size: 94px 126px, 137px 111px;
  opacity: .42;
  animation: seasonalPetals 20s linear infinite;
}

@keyframes fantasyBackdropDrift {
  from { transform: scale(1.06) translate3d(-0.5%, -0.3%, 0); }
  to { transform: scale(1.11) translate3d(0.7%, 0.4%, 0); }
}

@keyframes fantasyLightSweep {
  0%, 100% { background-position: 120% 0, 0 0, 0 0; opacity: 0.62; }
  50% { background-position: -70% 0, 0 0, 0 0; opacity: 1; }
}

@keyframes fantasyMotes {
  from { transform: translate3d(0, 5%, 0); }
  to { transform: translate3d(1.5%, -8%, 0); }
}

@keyframes mediterraneanBackdropDrift {
  from { transform: scale(1.06) translate3d(-0.8%, -0.2%, 0); }
  to { transform: scale(1.12) translate3d(0.8%, 0.8%, 0); }
}

@keyframes mediterraneanCaustics {
  from { background-position: 0 0, 0 0; opacity: 0.55; }
  to { background-position: 70% 35%, 0 0; opacity: 0.9; }
}

@keyframes mediterraneanBubbles {
  from { transform: translate3d(0, 10%, 0); }
  to { transform: translate3d(1.5%, -115%, 0); }
}

@keyframes horizonBackdropDrift {
  from { transform: scale(1.06) translate3d(-0.4%, 0.2%, 0); }
  to { transform: scale(1.14) translate3d(0.7%, -0.4%, 0); }
}

@keyframes horizonLensing {
  0%, 100% { transform: rotate(-1.5deg) scale(1); opacity: 0.55; }
  50% { transform: rotate(1.5deg) scale(1.04); opacity: 0.95; }
}

@keyframes horizonStars {
  from { background-position: 0 0, 35px 20px; }
  to { background-position: 96px 118px, -116px 152px; }
}

@keyframes seasonalBackdropDrift {
  from { transform: scale(1.055) translate3d(-.7%, -.35%, 0); }
  to { transform: scale(1.12) translate3d(.9%, .65%, 0); }
}

@keyframes seasonalGlow {
  from { opacity: .58; transform: scale(1); }
  to { opacity: .95; transform: scale(1.035); }
}

@keyframes seasonalSnow {
  from { background-position: 0 -90px, 32px -110px; }
  to { background-position: 36px 130px, -28px 165px; }
}

@keyframes seasonalPetals {
  from { background-position: 0 -110px, 40px -80px; transform: translateX(-1%); }
  to { background-position: 64px 150px, -32px 130px; transform: translateX(2%); }
}

:root[data-theme]:not([data-theme="fantasy"]) .stage-canvas {
  display: none;
}

:root[data-theme] body {
  background: var(--theme-deep);
}

:root[data-theme] .main {
  background:
    linear-gradient(180deg, color-mix(in srgb, var(--theme-deep) 44%, transparent), color-mix(in srgb, var(--theme-panel-2) 66%, transparent)),
    var(--theme-scene) center / cover no-repeat;
}

:root[data-theme] .sidebar {
  border-right-color: var(--theme-line);
  background:
    linear-gradient(180deg, color-mix(in srgb, var(--theme-panel) 96%, transparent), color-mix(in srgb, var(--theme-panel-2) 96%, transparent)),
    var(--theme-scene) 10% center / auto 100% no-repeat;
  color: var(--theme-copy);
}

:root[data-theme] .topbar {
  border-color: color-mix(in srgb, var(--theme-line) 68%, var(--game-cyan));
  background:
    linear-gradient(105deg, color-mix(in srgb, var(--theme-panel) 92%, transparent), color-mix(in srgb, var(--theme-panel-2) 88%, transparent)),
    var(--theme-scene) center 18% / cover no-repeat;
}

:root[data-theme] .topbar .eyebrow,
:root[data-theme] .stat-label,
:root[data-theme] .progress-label {
  color: var(--theme-muted);
}

:root[data-theme] .status-band,
:root[data-theme] .rank-card,
:root[data-theme] .format-card {
  border-color: color-mix(in srgb, var(--theme-line) 58%, transparent);
  background:
    linear-gradient(135deg, color-mix(in srgb, var(--game-cyan) 14%, transparent), color-mix(in srgb, var(--game-violet) 16%, transparent)),
    color-mix(in srgb, var(--theme-panel) 88%, transparent);
}

:root[data-theme] .score-cell {
  border-color: var(--theme-line);
  background:
    linear-gradient(135deg, color-mix(in srgb, var(--game-violet) 48%, transparent), color-mix(in srgb, var(--game-blue) 38%, transparent)),
    var(--theme-panel);
}

:root[data-theme] .quiz-panel {
  border-color: var(--theme-line);
  background:
    linear-gradient(155deg, color-mix(in srgb, var(--theme-panel) 90%, transparent), color-mix(in srgb, var(--theme-panel-2) 90%, transparent)),
    var(--theme-scene) center / cover no-repeat;
}

:root[data-theme] .question-board {
  border-color: color-mix(in srgb, var(--game-cyan) 74%, var(--theme-line));
  background:
    linear-gradient(110deg, color-mix(in srgb, var(--theme-panel) 96%, #071424), color-mix(in srgb, var(--theme-panel-2) 94%, #071424)),
    var(--theme-scene) center / cover no-repeat;
  box-shadow:
    inset 4px 0 var(--game-cyan),
    inset 0 1px rgba(255, 255, 255, 0.1),
    0 14px 28px rgba(0, 0, 0, 0.2);
}

:root[data-theme="fantasy"] .brand::after { content: "GUILD HALL"; }
:root[data-theme="mediterranean"] .brand::after { content: "MARINE DECK"; }
:root[data-theme="okinawa"] .brand::after { content: "ISLAND DECK"; }
:root[data-theme="hokkaido"] .brand::after { content: "SNOW LODGE"; }
:root[data-theme="halloween"] .brand::after { content: "NIGHT HALL"; }
:root[data-theme="new-year"] .brand::after { content: "SUNRISE HALL"; }
:root[data-theme="christmas"] .brand::after { content: "WINTER LODGE"; }
:root[data-theme="hanami"] .brand::after { content: "SAKURA DECK"; }
:root[data-theme="event-horizon"] .brand::after { content: "OBSERVATION"; }
:root[data-theme="fantasy"] .question-board::after { content: "ACTIVE QUEST"; }
:root[data-theme="mediterranean"] .question-board::after { content: "SEA TRIAL"; }
:root[data-theme="okinawa"] .question-board::after { content: "ISLAND TRIAL"; }
:root[data-theme="hokkaido"] .question-board::after { content: "SNOW TRIAL"; }
:root[data-theme="halloween"] .question-board::after { content: "NIGHT TRIAL"; }
:root[data-theme="new-year"] .question-board::after { content: "FIRST TRIAL"; }
:root[data-theme="christmas"] .question-board::after { content: "WINTER TRIAL"; }
:root[data-theme="hanami"] .question-board::after { content: "SPRING TRIAL"; }
:root[data-theme="event-horizon"] .question-board::after { content: "OBSERVATION"; }

:root[data-theme] .progress-track span,
:root[data-theme] .score-track span,
:root[data-theme] .timer-track span {
  background: linear-gradient(90deg, var(--game-cyan), var(--game-blue) 32%, var(--game-violet) 58%, var(--game-pink) 78%, var(--game-gold));
}

:root[data-theme="fantasy"] .course-tab.active,
:root[data-theme="fantasy"] .quiz-actions .primary-button {
  background: linear-gradient(135deg, #ead26e, #d48638 40%, #b54254 68%, #4b968c) !important;
  color: #261621 !important;
}

:root[data-theme="mediterranean"] .course-tab.active,
:root[data-theme="mediterranean"] .quiz-actions .primary-button {
  background: linear-gradient(135deg, #ffed6f, #42e3e1 35%, #1a9eff 66%, #ff6b91) !important;
  color: #023653 !important;
}

:root[data-theme="event-horizon"] .course-tab.active,
:root[data-theme="event-horizon"] .quiz-actions .primary-button {
  background: linear-gradient(135deg, #ffbd52, #ef6e7f 32%, #9c63ff 63%, #4fcfff) !important;
  color: #100d20 !important;
}

:root[data-theme="fantasy"] .answer-dock {
  border-color: rgba(232, 194, 100, 0.58);
  background: linear-gradient(155deg, rgba(31, 21, 34, 0.92), rgba(11, 59, 57, 0.92));
}

:root[data-theme="fantasy"] .option-button,
:root[data-theme="fantasy"] .quiz-panel.source-layout .option-button {
  border-color: rgba(183, 129, 44, 0.7);
  background: linear-gradient(112deg, #fffaf0, #f6e8bd 56%, #e4c46f 100%);
  color: #281a19;
  box-shadow: inset 0 1px #fffdf5, inset 0 -3px rgba(140, 83, 23, 0.18), 0 5px 0 rgba(52, 28, 16, 0.48), 0 10px 20px rgba(0, 0, 0, 0.18);
}

:root[data-theme="fantasy"] .option-letter {
  background: linear-gradient(145deg, #1fa396, #0b5f62 58%, #49316e);
}

:root[data-theme="mediterranean"] .answer-dock {
  border-color: rgba(147, 244, 255, 0.66);
  background: linear-gradient(155deg, rgba(0, 121, 159, 0.82), rgba(10, 90, 164, 0.84));
}

:root[data-theme="mediterranean"] .option-button,
:root[data-theme="mediterranean"] .quiz-panel.source-layout .option-button {
  border-color: rgba(24, 166, 210, 0.64);
  background: linear-gradient(112deg, #ffffff, #e6fcff 38%, #c5f4ef 72%, #fff0b3 100%);
  color: #07334e;
  box-shadow: inset 0 1px white, inset 0 -3px rgba(0, 138, 179, 0.16), 0 5px 0 rgba(0, 73, 109, 0.4), 0 10px 20px rgba(0, 74, 105, 0.18);
}

:root[data-theme="mediterranean"] .option-button::before {
  background: linear-gradient(180deg, #22d9e6, #168cff 48%, #ff668d 78%, #ffdc4f);
}

:root[data-theme="mediterranean"] .option-letter {
  background: linear-gradient(145deg, #22d9d6, #138fd1 54%, #745ad8);
}

:root[data-theme="event-horizon"] .answer-dock {
  border-color: rgba(129, 151, 255, 0.52);
  background: linear-gradient(155deg, rgba(9, 12, 31, 0.94), rgba(27, 22, 57, 0.92));
}

:root[data-theme="event-horizon"] .option-button,
:root[data-theme="event-horizon"] .quiz-panel.source-layout .option-button {
  border-color: rgba(126, 137, 222, 0.64);
  background: linear-gradient(112deg, #fffefa, #edf3ff 38%, #e0e0ff 72%, #ffe6ca 100%);
  color: #16162c;
  box-shadow: inset 0 1px white, inset 0 -3px rgba(84, 73, 169, 0.16), 0 5px 0 rgba(5, 5, 20, 0.58), 0 10px 22px rgba(0, 0, 0, 0.24);
}

:root[data-theme="event-horizon"] .option-button::before {
  background: linear-gradient(180deg, #ffb64f, #ed6586 40%, #9164ff 68%, #55d2ff);
}

:root[data-theme="event-horizon"] .option-letter {
  background: linear-gradient(145deg, #ffad44, #9b54d5 48%, #315bb5);
}

:root:is(
  [data-theme="okinawa"],
  [data-theme="hokkaido"],
  [data-theme="halloween"],
  [data-theme="new-year"],
  [data-theme="christmas"],
  [data-theme="hanami"]
) .course-tab.active,
:root:is(
  [data-theme="okinawa"],
  [data-theme="hokkaido"],
  [data-theme="halloween"],
  [data-theme="new-year"],
  [data-theme="christmas"],
  [data-theme="hanami"]
) .quiz-actions .primary-button {
  background: var(--season-action) !important;
  color: var(--season-action-copy) !important;
}

:root:is(
  [data-theme="okinawa"],
  [data-theme="hokkaido"],
  [data-theme="halloween"],
  [data-theme="new-year"],
  [data-theme="christmas"],
  [data-theme="hanami"]
) .answer-dock {
  border-color: var(--season-option-border);
  background: var(--season-answer);
}

:root:is(
  [data-theme="okinawa"],
  [data-theme="hokkaido"],
  [data-theme="halloween"],
  [data-theme="new-year"],
  [data-theme="christmas"],
  [data-theme="hanami"]
) .option-button,
:root:is(
  [data-theme="okinawa"],
  [data-theme="hokkaido"],
  [data-theme="halloween"],
  [data-theme="new-year"],
  [data-theme="christmas"],
  [data-theme="hanami"]
) .quiz-panel.source-layout .option-button {
  border-color: var(--season-option-border);
  background: var(--season-option);
  color: var(--season-option-copy);
  box-shadow: inset 0 1px white, inset 0 -3px color-mix(in srgb, var(--game-blue) 18%, transparent), 0 5px 0 color-mix(in srgb, var(--theme-deep) 72%, transparent), 0 10px 22px rgba(0,0,0,.2);
}

:root:is(
  [data-theme="okinawa"],
  [data-theme="hokkaido"],
  [data-theme="halloween"],
  [data-theme="new-year"],
  [data-theme="christmas"],
  [data-theme="hanami"]
) .option-button::before,
:root:is(
  [data-theme="okinawa"],
  [data-theme="hokkaido"],
  [data-theme="halloween"],
  [data-theme="new-year"],
  [data-theme="christmas"],
  [data-theme="hanami"]
) .option-letter {
  background: var(--season-letter);
}

.theme-picker {
  position: relative;
  flex: 0 0 auto;
}

.theme-picker-toggle {
  min-width: 96px;
}

.theme-picker-toggle svg {
  color: var(--game-gold);
}

.theme-picker.open .theme-picker-toggle {
  border-color: var(--theme-line);
  background: linear-gradient(135deg, color-mix(in srgb, var(--game-cyan) 52%, transparent), color-mix(in srgb, var(--game-violet) 58%, transparent)), var(--theme-panel);
  box-shadow: 0 0 18px color-mix(in srgb, var(--game-cyan) 30%, transparent);
}

.theme-picker-popover {
  position: fixed;
  z-index: 1200;
  width: min(350px, calc(100vw - 20px));
  max-height: min(760px, calc(100dvh - 20px));
  overflow-y: auto;
  padding: 10px;
  border: 1px solid color-mix(in srgb, var(--theme-line) 78%, white);
  border-radius: 8px;
  background:
    linear-gradient(145deg, color-mix(in srgb, var(--theme-panel) 97%, transparent), color-mix(in srgb, var(--theme-panel-2) 94%, transparent));
  color: var(--theme-copy);
  box-shadow: 0 22px 60px rgba(0, 0, 0, 0.42), inset 0 1px rgba(255, 255, 255, 0.14);
  backdrop-filter: blur(18px) saturate(1.25);
}

.theme-picker-popover.hidden,
.theme-picker-popover[hidden] {
  display: none !important;
}

.theme-picker-heading {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 12px;
  padding: 2px 4px 9px;
}

.theme-picker-heading span {
  color: var(--theme-muted);
  font-size: 0.68rem;
  font-weight: 900;
}

.theme-picker-heading strong {
  font-size: 1rem;
}

.theme-choice {
  display: grid;
  grid-template-columns: 64px minmax(0, 1fr) 22px;
  gap: 10px;
  align-items: center;
  width: 100%;
  min-height: 60px;
  margin-top: 6px;
  padding: 6px;
  border: 1px solid color-mix(in srgb, var(--theme-line) 32%, transparent);
  border-radius: 6px;
  background: rgba(255, 255, 255, 0.07);
  color: inherit;
  text-align: left;
  cursor: pointer;
  transition: transform 160ms ease, border-color 160ms ease, background 160ms ease;
}

.theme-choice:hover,
.theme-choice:focus-visible {
  border-color: var(--theme-line);
  background: rgba(255, 255, 255, 0.13);
  transform: translateY(-1px);
}

.theme-choice.active {
  border-color: var(--theme-line);
  background: linear-gradient(110deg, color-mix(in srgb, var(--game-cyan) 24%, transparent), color-mix(in srgb, var(--game-violet) 20%, transparent));
  box-shadow: inset 3px 0 var(--game-gold);
}

.theme-choice-preview {
  width: 64px;
  height: 46px;
  border: 1px solid rgba(255, 255, 255, 0.45);
  border-radius: 5px;
  background-position: center;
  background-size: cover;
  box-shadow: inset 0 0 18px rgba(0, 0, 0, 0.18);
}

.theme-choice-preview-fantasy { background-image: url("./assets/magic-academy-stage.png"); }
.theme-choice-preview-mediterranean { background-image: url("./assets/themes/mediterranean-sea.png"); }
.theme-choice-preview-okinawa { background-image: url("./assets/themes/okinawa.png"); }
.theme-choice-preview-hokkaido { background-image: url("./assets/themes/hokkaido.png"); }
.theme-choice-preview-halloween { background-image: url("./assets/themes/halloween.png"); }
.theme-choice-preview-new-year { background-image: url("./assets/themes/new-year.png"); }
.theme-choice-preview-christmas { background-image: url("./assets/themes/christmas.png"); }
.theme-choice-preview-hanami { background-image: url("./assets/themes/hanami.png"); }
.theme-choice-preview-horizon { background-image: url("./assets/themes/event-horizon.png"); }

.theme-choice-copy {
  display: grid;
  gap: 2px;
  min-width: 0;
}

.theme-choice-copy strong {
  font-size: 0.98rem;
  line-height: 1.25;
}

.theme-choice-copy small {
  overflow: hidden;
  color: var(--theme-muted);
  font-size: 0.72rem;
  font-weight: 700;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.theme-choice > svg {
  width: 18px;
  opacity: 0;
  color: var(--game-gold);
}

.theme-choice.active > svg {
  opacity: 1;
}

.theme-motion-control {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  margin-top: 10px;
  padding: 11px 6px 2px;
  border-top: 1px solid color-mix(in srgb, var(--theme-line) 34%, transparent);
}

.theme-motion-copy {
  display: flex;
  align-items: center;
  gap: 9px;
  min-width: 0;
}

.theme-motion-copy > svg {
  flex: 0 0 auto;
  width: 20px;
  color: var(--game-gold);
}

.theme-motion-copy > span {
  display: grid;
  gap: 2px;
}

.theme-motion-copy strong {
  font-size: 0.84rem;
  line-height: 1.25;
}

.theme-motion-copy small {
  color: var(--theme-muted);
  font-size: 0.68rem;
  font-weight: 700;
}

.theme-motion-switch {
  position: relative;
  flex: 0 0 auto;
  width: 48px;
  height: 28px;
  padding: 2px;
  border: 1px solid rgba(255, 255, 255, 0.28);
  border-radius: 999px;
  background: rgba(113, 121, 139, 0.58);
  box-shadow: inset 0 2px 5px rgba(0, 0, 0, 0.24);
  cursor: pointer;
  transition: background 180ms ease, border-color 180ms ease, box-shadow 180ms ease;
}

.theme-motion-switch > span {
  display: block;
  width: 22px;
  height: 22px;
  border-radius: 50%;
  background: #fff;
  box-shadow: 0 2px 7px rgba(0, 0, 0, 0.34);
  transform: translateX(0);
  transition: transform 180ms cubic-bezier(0.2, 0.8, 0.2, 1);
}

.theme-motion-switch.active {
  border-color: color-mix(in srgb, var(--game-cyan) 70%, white);
  background: linear-gradient(90deg, var(--game-blue), var(--game-cyan));
  box-shadow: 0 0 14px color-mix(in srgb, var(--game-cyan) 32%, transparent);
}

.theme-motion-switch.active > span {
  transform: translateX(20px);
}

:root[data-theme-motion="off"] .theme-backdrop-image,
:root[data-theme-motion="off"] .theme-backdrop-atmosphere,
:root[data-theme-motion="off"] .theme-backdrop-particles {
  animation: none !important;
  transform: scale(1.03) !important;
  will-change: auto;
}

@media (max-width: 980px) {
  .theme-backdrop-image,
  .theme-backdrop-atmosphere,
  .theme-backdrop-particles {
    inset: -2%;
  }

  .theme-picker-toggle {
    min-width: 44px;
  }

  .theme-picker-toggle span {
    display: none;
  }

  .theme-picker-popover {
    width: min(330px, calc(100vw - 16px));
  }
}

@media (prefers-reduced-motion: reduce) {
  .theme-backdrop-image,
  .theme-backdrop-atmosphere,
  .theme-backdrop-particles {
    animation: none !important;
    transform: scale(1.03) !important;
  }

  .theme-choice {
    transition: none;
  }

  .theme-motion-switch,
  .theme-motion-switch > span {
    transition: none;
  }
}

@media (max-width: 720px) {
  :root {
    --topbar-control-height: 34px;
  }

  .executive-study-report {
    grid-template-columns: 1fr;
  }

  .study-summary-card {
    border-radius: 0;
  }

  .study-summary-bar {
    gap: 7px;
    padding: 8px;
  }

  .study-summary-bar strong {
    font-size: 1.08rem;
  }

  .study-summary-bar-stats {
    grid-template-columns: repeat(5, minmax(0, 1fr));
    gap: 4px;
  }

  .study-summary-bar-stat {
    min-height: 42px;
    padding: 4px 3px;
    gap: 1px;
  }

  .study-summary-jumpbar {
    gap: 4px;
    padding: 5px 8px;
  }

  .study-summary-jumpbar button {
    min-height: 32px;
    gap: 3px;
    padding: 1px 2px;
    font-size: 0.52rem;
  }

  .study-summary-jumpbar svg {
    width: 13px;
    height: 13px;
  }

  .study-summary-layout {
    padding: 8px;
  }

  .study-summary-panel .study-report-summary {
    grid-template-columns: 1fr 1fr;
  }

  .study-summary-panel .study-report-summary,
  .study-summary-panel .study-effort {
    grid-column: 1 / -1;
  }

  .study-summary-panel .study-report-summary strong {
    font-size: 1.36rem;
  }

  .study-summary-panel .review-curve-stats {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .study-summary-panel .review-curve-headline strong {
    font-size: 1.16rem;
  }

  .review-calendar-panel {
    padding: 9px;
  }

  .review-calendar-grid {
    gap: 4px;
  }

  .review-calendar-day {
    min-height: 70px;
    padding: 5px 3px;
  }

  .review-calendar-day strong {
    font-size: 0.76rem;
  }

  .review-coach-panel {
    padding: 9px;
  }

  .review-coach-head {
    gap: 7px;
  }

  .review-coach-head strong {
    font-size: 1.08rem;
  }

  .review-coach-hero {
    grid-template-columns: 1fr;
    align-items: stretch;
  }

  .review-coach-hero span,
  .review-coach-hero strong,
  .review-coach-hero small,
  .review-coach-step span,
  .review-coach-step strong,
  .review-coach-step small,
  .review-coach-metric span,
  .review-coach-metric strong,
  .review-coach-metric small {
    white-space: normal;
  }

  .review-coach-start {
    width: 100%;
  }

  .review-coach-route {
    grid-template-columns: 1fr;
  }

  .review-coach-step {
    min-height: 78px;
    align-content: center;
  }

  .review-coach-metrics {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .study-insight-grid,
  .study-summary-panel .study-insight-grid {
    grid-template-columns: 1fr;
  }

  .study-efficiency-grid {
    grid-template-columns: 1fr;
  }

  .study-efficiency-flow {
    min-height: 30px;
  }

  .study-continuity-head,
  .study-continuity-next {
    grid-template-columns: 1fr;
  }

  .study-continuity-head small {
    max-width: none;
    text-align: left;
  }

  .study-continuity-calendar {
    grid-template-columns: repeat(7, minmax(0, 1fr));
  }

  .study-continuity-day {
    min-height: 66px;
  }

  .study-continuity-stats {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .study-continuity-next .study-action-button {
    width: 100%;
  }

  .study-checkpoint-head {
    grid-template-columns: 1fr;
    gap: 7px;
  }

  .study-checkpoint-head small {
    text-align: left;
  }

  .study-checkpoint-score {
    grid-template-columns: auto minmax(0, 1fr) auto;
  }

  .study-checkpoint-grid {
    grid-template-columns: 1fr;
  }

  .study-checkpoint-row {
    min-height: 86px;
  }

  .study-checkpoint-foot {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }

  .study-route-head {
    grid-template-columns: 1fr;
    gap: 7px;
  }

  .study-route-head small {
    text-align: left;
  }

  .study-route-timeline {
    grid-template-columns: 1fr;
  }

  .study-route-step {
    min-height: 86px;
    grid-template-columns: 28px minmax(0, 1fr) minmax(54px, auto);
    grid-template-rows: auto 7px;
    grid-template-areas:
      "step main value"
      "step bar bar";
    align-items: center;
  }

  .study-route-step > span {
    grid-area: step;
    align-self: start;
  }

  .study-route-step div {
    grid-area: main;
  }

  .study-route-step b {
    grid-area: value;
    justify-self: end;
  }

  .study-route-step i {
    grid-area: bar;
    align-self: stretch;
  }

  .study-route-footer {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }

  .exam-readiness-head {
    grid-template-columns: 1fr;
    gap: 7px;
  }

  .exam-readiness-head small {
    text-align: left;
  }

  .exam-readiness-grid {
    grid-template-columns: 1fr;
  }

  .exam-readiness-card {
    grid-template-columns: 1fr;
    grid-template-areas:
      "main"
      "score"
      "bars"
      "meta";
  }

  .exam-readiness-score {
    justify-self: stretch;
    width: auto;
    min-height: 42px;
    aspect-ratio: auto;
    display: grid;
    grid-template-columns: minmax(42px, auto) minmax(0, 1fr);
    justify-items: center;
    border-radius: 7px;
    background:
      linear-gradient(90deg, var(--score-color) var(--readiness), rgba(255, 248, 232, 0.08) 0),
      rgba(0, 0, 0, 0.22);
  }

  .exam-readiness-score::before {
    inset: 4px;
    border-radius: 5px;
    background: rgba(7, 25, 29, 0.7);
  }

  .exam-readiness-score b {
    justify-self: start;
    padding-left: 10px;
  }

  .exam-readiness-score i::before {
    content: "READY";
    color: rgba(255, 248, 232, 0.72);
    font-size: 0.54rem;
    font-style: normal;
    font-weight: 950;
    line-height: 1;
  }

  .exam-readiness-meta {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .exam-readiness-footer {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }

  .review-outlook-bars {
    min-height: 232px;
  }

  .review-outlook-day {
    grid-template-rows: auto minmax(38px, 1fr) auto auto;
  }

  .review-outlook-metrics {
    grid-template-columns: 1fr 1fr;
  }

  .review-sprint-grid {
    grid-template-columns: 1fr;
  }

  .review-dial-start-row {
    grid-template-columns: 1fr;
  }

  .review-dial-start {
    width: 100%;
  }

  .review-focus-list {
    grid-template-columns: 1fr;
  }

  .review-momentum-head,
  .review-momentum-next {
    grid-template-columns: 1fr;
  }

  .review-momentum-score {
    width: 100%;
  }

  .review-momentum-score b {
    justify-self: start;
  }

  .review-momentum-score i {
    width: 100%;
  }

  .review-momentum-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .review-momentum-next span {
    white-space: normal;
  }

  .review-momentum-start {
    width: 100%;
  }

  .review-command-head {
    grid-template-columns: 1fr;
  }

  .review-command-head small {
    justify-self: stretch;
    text-align: left;
  }

  .review-command-cards {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .review-command-card {
    min-height: 78px;
  }

  .review-command-steps {
    grid-template-columns: 1fr;
  }

  .review-blueprint-head,
  .review-blueprint-actions {
    grid-template-columns: 1fr;
  }

  .review-blueprint-head small {
    text-align: left;
  }

  .review-blueprint-metrics {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .review-blueprint-question {
    grid-template-columns: 30px minmax(0, 1fr);
  }

  .review-blueprint-question em {
    grid-column: 2;
    justify-self: start;
    max-width: 100%;
  }

  .review-blueprint-start {
    width: 100%;
  }

  .review-outcome-head,
  .review-outcome-action {
    grid-template-columns: 1fr;
  }

  .review-outcome-score {
    width: 100%;
    min-width: 0;
  }

  .review-outcome-metrics {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .review-outcome-sankey {
    padding: 8px;
  }

  .review-outcome-sankey-head {
    display: grid;
    gap: 3px;
  }

  .review-outcome-sankey-head small {
    white-space: normal;
  }

  .review-sankey-svg {
    min-height: 170px;
  }

  .review-outcome-action p {
    font-size: 0.62rem;
  }

  .review-outcome-start {
    width: 100%;
  }

  .review-course-pulse-head {
    grid-template-columns: 1fr;
  }

  .review-course-pulse-head small {
    justify-self: stretch;
    text-align: left;
  }

  .review-course-pulse-row {
    grid-template-columns: minmax(0, 1fr) auto;
    align-items: start;
  }

  .review-course-pulse-score {
    justify-self: end;
    text-align: right;
  }

  .review-course-pulse-meter {
    grid-column: 1 / -1;
  }

  .review-course-pulse-meta {
    grid-column: 1;
    justify-content: flex-start;
  }

  .review-course-pulse-row em {
    grid-column: 2;
    justify-self: end;
    align-self: end;
  }

  .review-return-head {
    grid-template-columns: 1fr;
  }

  .review-return-head small {
    justify-self: stretch;
    text-align: left;
  }

  .review-return-grid {
    grid-template-columns: 1fr;
  }

  .review-return-card {
    min-height: 124px;
  }

  .review-return-main strong,
  .review-return-main small {
    white-space: normal;
  }

  .review-next-head,
  .review-next-footer {
    grid-template-columns: 1fr;
  }

  .review-next-head small {
    text-align: left;
  }

  .review-next-row {
    grid-template-columns: 30px minmax(0, 1fr);
  }

  .review-next-row > em {
    grid-column: 2;
    justify-self: start;
    text-align: left;
    white-space: normal;
  }

  .review-next-footer span {
    white-space: normal;
  }

  .review-next-start {
    width: 100%;
  }

  .review-age-head,
  .review-age-next {
    grid-template-columns: 1fr;
  }

  .review-age-head small {
    max-width: none;
    text-align: left;
  }

  .review-age-buckets {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .review-age-next span {
    white-space: normal;
  }

  .review-age-start {
    width: 100%;
  }

  .review-sprint-card {
    grid-template-columns: 54px minmax(0, 1fr);
    align-items: center;
  }

  .review-sprint-card span {
    grid-row: span 3;
    align-self: stretch;
    display: grid;
    place-items: center;
    border-right: 1px solid rgba(255, 248, 232, 0.12);
    padding-right: 8px;
    font-size: 0.66rem;
  }

  .review-sprint-card i {
    grid-column: 2;
  }

  .review-sprint-card em {
    grid-column: 2;
  }

  .review-focus-card {
    grid-template-columns: 48px minmax(0, 1fr);
    align-items: center;
  }

  .review-focus-badge {
    grid-row: span 3;
    align-self: stretch;
    height: auto;
    min-height: 48px;
  }

  .review-focus-meta {
    grid-column: 2;
    grid-template-columns: repeat(2, minmax(0, max-content));
    justify-content: start;
    justify-items: start;
  }

  .review-focus-meter,
  .review-focus-detail {
    grid-column: 2;
  }

  .review-history-overview {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .review-history-trend-head {
    display: grid;
  }

  .review-history-trend-head small {
    max-width: none;
    text-align: left;
  }

  .review-history-trend-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .review-history-course-head {
    display: grid;
  }

  .review-history-course-head small {
    max-width: none;
    text-align: left;
  }

  .review-history-course-row {
    grid-template-columns: minmax(0, 1fr) 44px;
  }

  .review-history-course-action {
    justify-self: start;
  }

  .review-impact-head {
    grid-template-columns: 1fr;
  }

  .review-impact-head small {
    justify-self: start;
    max-width: none;
    text-align: left;
  }

  .review-impact-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .review-recovery-head {
    display: grid;
  }

  .review-recovery-head small {
    max-width: none;
    text-align: left;
  }

  .review-recovery-groups {
    grid-template-columns: 1fr;
  }

  .understanding-summary-row {
    grid-template-columns: minmax(74px, 1fr) minmax(0, 1fr) 24px;
    gap: 6px;
  }

  .weakness-hero-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .weakness-hero-grid b:last-child {
    grid-column: 1 / -1;
  }

  .weakness-row {
    grid-template-columns: 26px minmax(0, 1fr);
  }

  .weakness-row::after {
    display: none;
  }

  .weakness-kicker,
  .weakness-meta {
    display: grid;
    gap: 4px;
  }

  .sidebar {
    padding: 10px;
  }

  .brand {
    gap: 8px;
    margin-bottom: 8px;
  }

  .brand-mark {
    width: 38px;
    height: 38px;
  }

  .brand h1 {
    font-size: 0.95rem;
  }

  .brand p,
  .eyebrow,
  .stat-label {
    font-size: 0.66rem;
  }

  .course-switch,
  .format-switch {
    gap: 6px;
    margin-bottom: 8px;
  }

  .course-tab,
  .format-tab {
    min-height: 38px;
    padding: 6px 8px;
    font-size: 0.82rem;
  }

  .main {
    gap: 6px;
    padding: 8px;
  }

  .topbar {
    gap: 5px;
    padding: 5px;
  }

  .topbar h2 {
    font-size: 0.98rem;
    line-height: 1.12;
  }

  .header-cards {
    grid-template-columns: repeat(2, minmax(62px, 1fr));
    gap: 4px;
  }

  .rank-card,
  .format-card,
  .topbar .rank-card,
  .topbar .format-card {
    min-height: 32px;
    padding: 3px 5px;
  }

  .rank-card span,
  .format-card span {
    font-size: 0.54rem;
  }

  .rank-card strong,
  .format-card strong {
    font-size: 0.72rem;
  }

  .topbar .toolbar {
    display: flex;
    flex-wrap: nowrap;
    gap: 4px;
    overflow-x: auto;
    padding-bottom: 2px;
  }

  .icon-button {
    min-height: 34px;
    padding: 0 6px;
    font-size: 0.72rem;
  }

  .icon-button span {
    font-size: 0.62rem;
  }

  .icon-button svg {
    width: 15px;
    height: 15px;
  }

  .status-band {
    grid-template-columns: repeat(5, minmax(0, 1fr));
    gap: 4px;
    min-height: 0;
    padding: 4px;
  }

  .status-cell {
    min-height: 26px;
    padding: 2px 4px;
  }

  .status-band strong,
  .score-cell strong {
    margin-top: 1px;
    font-size: 0.72rem;
  }

  .score-cell {
    grid-column: auto;
  }

  .progress-cell {
    display: none;
  }

  .playfield {
    gap: 7px;
  }

  .quiz-panel,
  .quiz-panel.source-layout {
    gap: 5px;
    padding: 6px;
    border-width: 2px;
  }

  .quiz-panel::before {
    inset: 3px;
  }

  .question-board {
    grid-template-rows: auto auto auto;
    gap: 5px;
    padding: 6px;
    border-width: 1px;
  }

  .quiz-panel.source-layout:not(.review-layout) .question-board {
    gap: 5px;
    padding: 6px;
    max-height: none;
  }

  .question-head {
    gap: 4px;
  }

  .review-session-hud {
    gap: 5px;
    padding: 6px;
  }

  .review-session-hud-head {
    align-items: flex-start;
  }

  .review-session-hud-head span {
    font-size: 0.5rem;
  }

  .review-session-hud-head strong {
    font-size: 0.68rem;
  }

  .review-session-hud-head small {
    font-size: 0.56rem;
  }

  .review-session-hud-progress {
    height: 6px;
  }

  .review-session-hud-grid {
    gap: 3px;
  }

  .review-session-hud-grid span {
    min-height: 18px;
    padding: 2px 5px;
    font-size: 0.54rem;
  }

  .review-session-hud-map {
    grid-template-columns: repeat(auto-fit, minmax(22px, 1fr));
    gap: 3px;
  }

  .review-session-hud-cell {
    min-height: 21px;
    border-radius: 5px;
    padding: 0 2px;
  }

  .review-session-hud-cell span {
    font-size: 0.54rem;
  }

  .question-chip,
  .variant-chip {
    min-height: 20px;
    padding: 2px 5px;
    border-radius: 5px;
    font-size: 0.56rem;
  }

  .understanding-toggle {
    gap: 3px;
  }

  .understanding-choice-button {
    min-height: 28px;
    padding: 0 2px;
    border-radius: 5px;
    font-size: 0.5rem;
    line-height: 1.05;
  }

  .calculation-marker-button,
  .question-copy-button {
    min-width: 30px;
    width: 30px;
    min-height: 30px;
  }

  .calculation-marker-button svg,
  .question-copy-button svg {
    width: 15px;
    height: 15px;
  }

  .question-text,
  .question-text.html-question {
    padding: 8px 9px;
    border-radius: 6px;
  }

  .question-text {
    font-size: 0.88rem;
    line-height: 1.34;
  }

  .question-text.html-question,
  .quiz-panel.source-layout:not(.review-layout) .question-text.html-question,
  .quiz-panel.source-layout .question-text.html-question {
    padding: 7px 8px;
    font-size: clamp(0.78rem, 3.2vw, 0.9rem);
    line-height: 1.38;
  }

  .question-text.html-question ul,
  .question-text.html-question ol,
  .feedback-body ul,
  .feedback-body ol {
    margin: 0.35em 0 0.35em 1.1em;
  }

  .question-text.html-question li,
  .feedback-body li {
    margin: 0.14em 0;
  }

  .pe-kakomonn-question,
  .kougai-question {
    gap: 4px;
  }

  .pe-question-title,
  .pe-question-field,
  .kougai-question-title,
  .kougai-question-subject {
    min-height: 18px;
    padding: 1px 3px;
    font-size: 0.48rem;
  }

  .answer-dock {
    padding: 5px;
    border-width: 1px;
  }

  .quiz-panel.source-layout .answer-dock,
  .quiz-panel.quiz-custom-layout.source-layout:not(.review-layout) .answer-dock {
    padding: 5px;
    max-height: none;
  }

  .options,
  .options.judge-options,
  .quiz-panel.source-layout .options {
    gap: 5px;
  }

  .option-button,
  .quiz-panel.source-layout .option-button {
    grid-template-columns: 24px minmax(0, 1fr);
    gap: 6px;
    min-height: 40px;
    padding: 5px 7px;
    font-size: 0.78rem;
    line-height: 1.24;
  }

  .option-content {
    font-size: 0.78rem;
    line-height: 1.24;
  }

  .option-letter {
    width: 23px;
    height: 23px;
    border-radius: 5px;
    font-size: 0.72rem;
  }

  .option-explanation-card {
    padding: 5px 7px 6px 32px;
    font-size: 0.78rem;
    line-height: 1.38;
  }

  .time-card {
    min-height: 8px;
  }

  .quiz-actions {
    gap: 5px;
    min-height: 26px;
  }

  .section-search-toggle::before,
  .section-search-toggle::after {
    display: none;
  }

  .section-search-popover {
    position: fixed;
    top: var(--section-search-top, 72px);
    left: var(--section-search-left, 8px);
    width: min(360px, calc(100vw - 16px));
  }

  .section-search-field {
    height: 32px;
    padding-inline: 8px 5px;
  }

  .section-search input {
    font-size: 0.72rem;
  }

  .section-search-count {
    font-size: 0.66rem;
  }

  .ghost-button,
  .primary-button {
    min-height: 32px;
    padding: 0 8px;
    font-size: 0.78rem;
  }

  .pager {
    gap: 3px;
    padding: 2px 2px 3px;
  }

  .pager button {
    flex-basis: 28px;
    width: 28px;
    height: 26px;
    font-size: 0.72rem;
  }

  .feedback {
    padding: 8px 10px;
    font-size: 0.78rem;
    line-height: 1.42;
  }
}

@media (max-width: 430px) {
  .main {
    gap: 5px;
    padding: 6px;
  }

  .header-cards {
    display: none;
  }

  .status-band {
    gap: 3px;
    padding: 3px;
  }

  .status-cell {
    min-height: 23px;
    padding: 2px 3px;
  }

  .stat-label {
    font-size: 0.52rem;
  }

  .status-band strong,
  .score-cell strong {
    font-size: 0.66rem;
  }

  .quiz-panel,
  .quiz-panel.source-layout {
    gap: 4px;
    padding: 5px;
  }

  .question-board {
    gap: 4px;
    padding: 5px;
  }

  .quiz-panel.source-layout:not(.review-layout) .question-board {
    gap: 4px;
    padding: 5px;
  }

  .question-text,
  .question-text.html-question,
  .quiz-panel.source-layout:not(.review-layout) .question-text.html-question,
  .quiz-panel.source-layout .question-text.html-question {
    padding: 6px 7px;
    font-size: 0.74rem;
    line-height: 1.32;
  }

  .answer-dock {
    padding: 4px;
  }

  .quiz-panel.source-layout .answer-dock,
  .quiz-panel.quiz-custom-layout.source-layout:not(.review-layout) .answer-dock {
    padding: 4px;
  }

  .options,
  .options.judge-options,
  .quiz-panel.source-layout .options {
    gap: 4px;
  }

  .option-button,
  .quiz-panel.source-layout .option-button {
    grid-template-columns: 22px minmax(0, 1fr);
    gap: 5px;
    min-height: 36px;
    padding: 4px 6px;
    font-size: 0.72rem;
  }

  .option-content {
    font-size: 0.72rem;
  }

  .option-letter {
    width: 21px;
    height: 21px;
    font-size: 0.68rem;
  }
}

@media (max-width: 980px) {
  .app-shell,
  .main,
  .playfield,
  .quiz-panel,
  .quiz-panel.source-layout {
    height: auto;
    max-height: none;
    overflow: visible;
  }

  .question-board,
  .quiz-panel.source-layout:not(.review-layout) .question-board,
  .quiz-panel.review-layout .question-board,
  .quiz-panel.source-layout.review-layout .question-board {
    max-height: none;
    overflow: visible;
    overscroll-behavior-y: auto;
    scrollbar-gutter: auto;
  }

  .quiz-panel.source-layout:not(.review-layout) .question-board {
    max-height: none;
  }

  .question-text,
  .question-text.html-question,
  .quiz-panel.source-layout:not(.review-layout) .question-text.html-question,
  .quiz-panel.source-layout .question-text.html-question,
  .quiz-panel.review-layout .question-text {
    max-height: none;
    overflow: visible;
    overscroll-behavior: auto;
  }

  .quiz-panel.source-layout:not(.review-layout) .question-text.html-question {
    max-height: none;
  }

  .quiz-panel.source-layout.inline-choice-feedback:not(.review-layout) .question-text.html-question {
    overflow: visible;
  }

  .answer-dock,
  .quiz-panel.source-layout .answer-dock,
  .quiz-panel.source-layout:not(.review-layout) .answer-dock,
  .quiz-panel.source-layout:not(.review-layout):has(.feedback:not(.hidden)) .answer-dock,
  .quiz-panel.quiz-custom-layout.source-layout:not(.review-layout) .answer-dock,
  .quiz-panel.review-layout .answer-dock,
  .quiz-panel.source-layout.review-layout .answer-dock {
    max-height: min(48dvh, 420px);
    overflow-y: auto;
    overscroll-behavior-y: auto;
    -webkit-overflow-scrolling: touch;
    touch-action: pan-y;
    scrollbar-gutter: stable;
  }

  .question-text .quiz-image[data-preview-ready="true"],
  .answer-dock .option-button,
  .answer-dock .option-content,
  .answer-dock .quiz-image[data-preview-ready="true"] {
    touch-action: pan-y;
  }

  .quiz-panel.source-layout.inline-choice-feedback:not(.review-layout) .answer-dock,
  .quiz-panel.quiz-custom-layout.source-layout.inline-choice-feedback:not(.review-layout) .answer-dock {
    max-height: min(48dvh, 420px);
    overflow-y: auto;
    overscroll-behavior-y: auto;
    -webkit-overflow-scrolling: touch;
    touch-action: pan-y;
  }

  .options,
  .options.judge-options,
  .quiz-panel.source-layout .options,
  .answer-dock .options {
    min-height: 0;
  }

  .question-text.html-question img,
  .question-text.html-question img.quiz-image,
  .quiz-panel.source-layout .question-text.html-question img,
  .quiz-panel.review-layout .question-text.html-question img,
  .option-content img,
  .option-content img.quiz-image,
  .option-explanation-body img,
  .option-explanation-body img.quiz-image,
  .feedback-body img,
  .feedback-body img.quiz-image {
    display: block;
    width: auto !important;
    max-width: 100% !important;
    height: auto !important;
    max-height: min(34dvh, 260px) !important;
    object-fit: contain;
  }

  .option-content img,
  .option-explanation-body img,
  .feedback-body img {
    margin-inline: auto;
  }
}

.main:has(.quiz-panel.source-layout:not(.review-layout)),
.quiz-panel.source-layout:not(.review-layout) .question-board,
.quiz-panel.source-layout:not(.review-layout) .question-text,
.quiz-panel.source-layout:not(.review-layout) .answer-dock,
.quiz-panel.source-layout:not(.review-layout) .feedback:not(.hidden),
.quiz-panel.source-layout:not(.review-layout) .feedback-body,
.quiz-panel.review-layout .feedback:not(.hidden),
.quiz-panel.review-layout .feedback-body {
  scrollbar-width: thin;
  -ms-overflow-style: auto;
}

.main:has(.quiz-panel.source-layout:not(.review-layout))::-webkit-scrollbar,
.quiz-panel.source-layout:not(.review-layout) .question-board::-webkit-scrollbar,
.quiz-panel.source-layout:not(.review-layout) .question-text::-webkit-scrollbar,
.quiz-panel.source-layout:not(.review-layout) .answer-dock::-webkit-scrollbar,
.quiz-panel.source-layout:not(.review-layout) .feedback:not(.hidden)::-webkit-scrollbar,
.quiz-panel.source-layout:not(.review-layout) .feedback-body::-webkit-scrollbar,
.quiz-panel.review-layout .feedback:not(.hidden)::-webkit-scrollbar,
.quiz-panel.review-layout .feedback-body::-webkit-scrollbar {
  display: block !important;
  width: 10px;
  height: 10px;
}

.main:has(.quiz-panel.source-layout:not(.review-layout))::-webkit-scrollbar-thumb,
.quiz-panel.source-layout:not(.review-layout) .question-board::-webkit-scrollbar-thumb,
.quiz-panel.source-layout:not(.review-layout) .question-text::-webkit-scrollbar-thumb,
.quiz-panel.source-layout:not(.review-layout) .answer-dock::-webkit-scrollbar-thumb,
.quiz-panel.source-layout:not(.review-layout) .feedback:not(.hidden)::-webkit-scrollbar-thumb,
.quiz-panel.source-layout:not(.review-layout) .feedback-body::-webkit-scrollbar-thumb,
.quiz-panel.review-layout .feedback:not(.hidden)::-webkit-scrollbar-thumb,
.quiz-panel.review-layout .feedback-body::-webkit-scrollbar-thumb {
  border: 2px solid rgba(255, 253, 246, 0.72);
  border-radius: 999px;
  background: rgba(123, 76, 20, 0.58);
}

.main:has(.quiz-panel.source-layout:not(.review-layout))::-webkit-scrollbar-track,
.quiz-panel.source-layout:not(.review-layout) .question-board::-webkit-scrollbar-track,
.quiz-panel.source-layout:not(.review-layout) .question-text::-webkit-scrollbar-track,
.quiz-panel.source-layout:not(.review-layout) .answer-dock::-webkit-scrollbar-track,
.quiz-panel.source-layout:not(.review-layout) .feedback:not(.hidden)::-webkit-scrollbar-track,
.quiz-panel.source-layout:not(.review-layout) .feedback-body::-webkit-scrollbar-track,
.quiz-panel.review-layout .feedback:not(.hidden)::-webkit-scrollbar-track,
.quiz-panel.review-layout .feedback-body::-webkit-scrollbar-track {
  border-radius: 999px;
  background: rgba(255, 248, 232, 0.36);
}

.quiz-panel.review-layout .answer-dock .options:has(.option-item.has-explanation),
.quiz-panel.source-layout.inline-choice-feedback:not(.review-layout) .answer-dock .options:has(.option-item.has-explanation) {
  height: auto;
  min-height: 0;
  align-content: start;
  grid-auto-rows: auto;
  grid-template-rows: none;
}

.quiz-panel.review-layout .answer-dock .option-item,
.quiz-panel.source-layout.inline-choice-feedback:not(.review-layout) .answer-dock .option-item {
  height: auto;
  min-height: auto;
  align-self: start;
}

.quiz-panel.review-layout .answer-dock .option-button,
.quiz-panel.source-layout.inline-choice-feedback:not(.review-layout) .answer-dock .option-button {
  min-height: clamp(40px, 4.4vh, 58px);
}

.quiz-panel.review-layout .answer-dock .option-item.has-explanation,
.quiz-panel.source-layout.inline-choice-feedback:not(.review-layout) .answer-dock .option-item.has-explanation {
  grid-template-rows: auto auto;
}

.quiz-panel.review-layout .answer-dock .option-explanation-card,
.quiz-panel.source-layout.inline-choice-feedback:not(.review-layout) .answer-dock .option-explanation-card {
  height: auto;
  max-height: min(22vh, 240px);
  overflow: auto;
}

.study-summary-panel .study-summary-hero {
  grid-column: 1 / -1;
  order: -40;
  min-width: 0;
}

.study-summary-hero-card {
  min-width: 0;
  display: grid;
  grid-template-columns: minmax(320px, 0.92fr) minmax(460px, 1.08fr);
  grid-template-areas:
    "brief metrics"
    "brief actions";
  gap: clamp(12px, 1vw, 18px);
  border: 1px solid rgba(255, 248, 232, 0.16);
  border-radius: 8px;
  background:
    linear-gradient(135deg, rgba(255, 248, 232, 0.075), rgba(255, 248, 232, 0.028) 38%, rgba(11, 55, 56, 0.16)),
    rgba(4, 18, 22, 0.78);
  padding: clamp(16px, 1.25vw, 24px);
  box-shadow:
    inset 0 1px 0 rgba(255, 248, 232, 0.08),
    0 16px 34px rgba(0, 0, 0, 0.18);
}

.study-summary-hero-card.danger {
  border-color: rgba(255, 107, 107, 0.36);
}

.study-summary-hero-card.warm,
.study-summary-hero-card.weak {
  border-color: rgba(255, 227, 125, 0.32);
}

.study-summary-hero-card.strong {
  border-color: rgba(125, 249, 199, 0.28);
}

.study-summary-hero-main {
  grid-area: brief;
  min-width: 0;
  display: grid;
  grid-template-rows: minmax(0, 1fr) auto;
  gap: clamp(12px, 1vw, 18px);
  align-content: stretch;
  padding-right: clamp(10px, 1.1vw, 20px);
  border-right: 1px solid rgba(255, 248, 232, 0.12);
}

.study-summary-hero-copy {
  min-width: 0;
  display: grid;
  align-content: start;
  gap: 8px;
}

.study-summary-hero-copy span,
.study-summary-hero-metric span,
.study-summary-primary-action span,
.study-summary-next-action span {
  color: rgba(255, 248, 232, 0.68);
  font-size: 0.72rem;
  font-weight: 950;
  line-height: 1.1;
}

.study-summary-hero-copy em {
  justify-self: start;
  display: inline-flex;
  align-items: center;
  min-height: 28px;
  border: 1px solid rgba(255, 248, 232, 0.14);
  border-radius: 999px;
  background: rgba(255, 248, 232, 0.065);
  color: #fff1a8;
  padding: 0 10px;
  font-size: 0.76rem;
  font-style: normal;
  font-weight: 950;
}

.study-summary-hero-copy small {
  color: rgba(255, 248, 232, 0.58);
  font-size: 0.76rem;
  font-weight: 900;
  line-height: 1.1;
}

.study-summary-hero-copy strong {
  color: #fff8e8;
  font-size: clamp(1.7rem, 2.8vw, 3rem);
  line-height: 1.14;
  overflow-wrap: anywhere;
}

.study-summary-hero-copy p {
  max-width: 42ch;
  margin: 0;
  color: rgba(255, 248, 232, 0.78);
  font-size: clamp(0.9rem, 0.92vw, 1rem);
  font-weight: 760;
  line-height: 1.58;
}

.study-summary-primary-action,
.study-summary-next-action {
  appearance: none;
  min-width: 0;
  display: grid;
  border: 1px solid rgba(255, 248, 232, 0.14);
  border-radius: 8px;
  background: rgba(255, 248, 232, 0.055);
  color: #fff8e8;
  font: inherit;
  text-align: left;
  cursor: pointer;
  transition:
    border-color 0.16s ease,
    box-shadow 0.16s ease,
    transform 0.16s ease;
}

.study-summary-primary-action {
  grid-template-columns: auto minmax(0, 1fr) auto;
  grid-template-rows: auto auto;
  align-self: end;
  align-items: center;
  gap: 6px 12px;
  min-height: 82px;
  padding: 14px;
  border-color: rgba(244, 206, 88, 0.42);
  background: rgba(244, 206, 88, 0.09);
}

.study-summary-primary-action strong {
  min-width: 0;
  color: #fff8e8;
  font-size: clamp(1rem, 1.25vw, 1.24rem);
  line-height: 1.16;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.study-summary-primary-action b {
  color: #fff1a8;
  font-size: clamp(1rem, 1.28vw, 1.28rem);
  font-weight: 950;
  line-height: 1.12;
  font-variant-numeric: tabular-nums;
  white-space: nowrap;
}

.study-summary-primary-action span {
  grid-row: 1 / 3;
  display: grid;
  place-items: center;
  width: 42px;
  height: 42px;
  border-radius: 8px;
  background: #f4ce58;
  color: #1e1511;
}

.study-summary-primary-action small,
.study-summary-next-action small {
  min-width: 0;
  color: rgba(255, 248, 232, 0.76);
  font-weight: 850;
  line-height: 1.32;
}

.study-summary-primary-action small {
  grid-column: 2 / -1;
  font-size: 0.74rem;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.study-summary-primary-action:hover,
.study-summary-primary-action:focus-visible,
.study-summary-next-action:hover,
.study-summary-next-action:focus-visible {
  border-color: rgba(125, 249, 199, 0.72);
  outline: none;
  transform: translateY(-1px);
  box-shadow: 0 0 0 3px rgba(125, 249, 199, 0.12);
}

.study-summary-primary-action.danger,
.study-summary-next-action.danger {
  border-color: rgba(255, 107, 107, 0.34);
  box-shadow: inset 3px 0 0 rgba(255, 107, 107, 0.72);
}

.study-summary-primary-action.warm,
.study-summary-primary-action.weak,
.study-summary-next-action.warm,
.study-summary-next-action.weak {
  border-color: rgba(255, 227, 125, 0.32);
  box-shadow: inset 3px 0 0 rgba(255, 227, 125, 0.72);
}

.study-summary-primary-action.strong,
.study-summary-next-action.strong {
  border-color: rgba(125, 249, 199, 0.28);
  box-shadow: inset 3px 0 0 rgba(125, 249, 199, 0.66);
}

.study-summary-hero-metrics {
  grid-area: metrics;
  min-width: 0;
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 8px;
}

.study-summary-hero-metric {
  min-width: 0;
  display: grid;
  align-content: center;
  gap: 5px;
  overflow: hidden;
  border: 1px solid rgba(255, 248, 232, 0.12);
  border-radius: 8px;
  background: rgba(255, 248, 232, 0.045);
  min-height: 92px;
  padding: 12px;
}

.study-summary-hero-metric.strong {
  border-color: rgba(125, 249, 199, 0.3);
}

.study-summary-hero-metric.warm {
  border-color: rgba(255, 227, 125, 0.3);
}

.study-summary-hero-metric.danger {
  border-color: rgba(255, 107, 107, 0.36);
}

.study-summary-hero-metric strong {
  min-width: 0;
  color: #fff8e8;
  font-size: clamp(1.08rem, 1.45vw, 1.52rem);
  font-weight: 950;
  line-height: 1.14;
  font-variant-numeric: tabular-nums;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.study-summary-hero-metric small {
  min-width: 0;
  color: rgba(255, 248, 232, 0.68);
  font-size: 0.7rem;
  font-weight: 850;
  line-height: 1.2;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.study-summary-next-actions {
  grid-area: actions;
  min-width: 0;
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 8px;
  align-content: stretch;
}

.study-summary-next-action {
  min-height: 78px;
  grid-template-columns: 34px minmax(0, 1fr) auto;
  grid-template-rows: auto auto;
  gap: 4px 9px;
  align-items: center;
  padding: 10px;
}

.study-summary-next-action span {
  grid-row: 1 / 3;
  display: grid;
  place-items: center;
  width: 28px;
  height: 28px;
  border-radius: 50%;
  background: rgba(255, 248, 232, 0.12);
  color: #fff1a8;
}

.study-summary-next-action strong,
.study-summary-next-action small {
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.study-summary-next-action strong {
  color: #fff8e8;
  font-size: 0.95rem;
  font-weight: 950;
}

.study-summary-next-action b {
  color: #fff1a8;
  font-size: 0.95rem;
  font-weight: 950;
  font-variant-numeric: tabular-nums;
  white-space: nowrap;
}

.study-summary-next-action small {
  grid-column: 2 / -1;
  font-size: 0.72rem;
}

.study-summary-next-empty {
  grid-column: 1 / -1;
  border: 1px dashed rgba(255, 248, 232, 0.2);
  border-radius: 8px;
  color: rgba(255, 248, 232, 0.72);
  padding: 12px;
  font-size: 0.9rem;
  font-weight: 850;
}

.study-summary-panel .study-report-summary,
.study-summary-panel .study-effort,
.study-summary-panel .study-efficiency-panel {
  min-height: 0;
}

.study-summary-panel .study-report-summary,
.study-summary-panel .study-effort {
  grid-column: span 3;
}

.study-summary-panel .study-efficiency-panel {
  grid-column: span 6;
}

.study-summary-panel .study-action-plan {
  display: none;
}

.study-summary-panel .study-checkpoint-panel {
  order: -29;
  grid-column: span 6;
}

.study-summary-panel .study-route-panel {
  order: -28;
  grid-column: 1 / -1;
}

.study-summary-panel .review-coach-panel {
  order: -27;
  grid-column: 1 / -1;
}

.study-summary-panel .study-insight-grid,
.study-summary-panel .review-momentum-panel,
.study-summary-panel .review-command-deck-panel,
.study-summary-panel .review-set-blueprint-panel,
.study-summary-panel .review-next-queue-panel,
.study-summary-panel .review-age-panel {
  grid-column: span 6;
}

.study-summary-panel .study-continuity-panel,
.study-summary-panel .study-forecast-panel,
.study-summary-panel .review-outlook-panel,
.study-summary-panel .review-calendar-panel,
.study-summary-panel .study-course-matrix,
.study-summary-panel .exam-readiness-panel {
  grid-column: 1 / -1;
}

.study-summary-panel .review-outcome-panel,
.study-summary-panel .review-course-pulse-panel,
.study-summary-panel .review-return-panel,
.study-summary-panel .review-mastery-track,
.study-summary-panel .understanding-summary,
.study-summary-panel .weakness-panel,
.study-summary-panel .review-session-history,
.study-summary-panel .study-report-list {
  grid-column: span 6;
}

.study-summary-panel .study-insight-grid {
  grid-template-columns: repeat(4, minmax(0, 1fr));
}

.executive-study-report {
  gap: clamp(8px, 0.8vw, 14px);
  padding: clamp(10px, 0.95vw, 18px);
}

.study-summary-panel .study-report-summary strong,
.study-summary-panel .study-effort-head strong {
  font-size: clamp(1.26rem, 2.1vw, 2.1rem);
}

.study-action-head strong,
.study-checkpoint-head strong,
.study-route-head strong,
.study-efficiency-head strong,
.review-coach-head strong {
  font-size: clamp(1.05rem, 1.32vw, 1.42rem);
}

.study-action-head small,
.study-checkpoint-head small,
.study-route-head small,
.study-efficiency-head small,
.review-coach-head small {
  font-size: 0.78rem;
  line-height: 1.34;
}

.study-action-button {
  min-height: 54px;
  padding: 9px;
}

.study-action-button strong {
  font-size: 0.92rem;
}

.study-action-button small {
  font-size: 0.7rem;
}

.study-route-step {
  min-height: clamp(82px, 7dvh, 110px);
  grid-template-rows: auto auto auto 7px;
}

.study-route-step strong {
  font-size: 0.95rem;
}

.study-route-step small {
  font-size: 0.68rem;
}

.study-checkpoint-row {
  min-height: 54px;
}

.study-summary-review {
  gap: 10px;
}

.study-summary-panel .review-curriculum-list {
  max-height: clamp(220px, 28dvh, 360px);
}

@media (max-width: 1400px) {
  .study-summary-hero-card {
    grid-template-columns: 1fr;
    grid-template-areas:
      "brief"
      "metrics"
      "actions";
  }

  .study-summary-hero-main {
    padding-right: 0;
    border-right: 0;
  }

  .study-summary-hero-metrics {
    grid-template-columns: repeat(4, minmax(112px, 1fr));
    overflow-x: auto;
    padding-bottom: 2px;
  }

  .study-summary-next-actions {
    grid-template-columns: repeat(3, minmax(180px, 1fr));
    overflow-x: auto;
    padding-bottom: 2px;
  }
}

@media (max-width: 760px) {
  .study-summary-next-actions {
    grid-template-columns: 1fr;
  }
}

/* Final product UI layer: task-first study summary. */
.study-summary-panel {
  --summary-bg: #f4f8fc;
  --summary-surface: #ffffff;
  --summary-ink: #152033;
  --summary-muted: #607086;
  --summary-line: #dce6f2;
  --summary-blue: #2468d8;
  --summary-cyan: #0ea5b5;
  --summary-green: #13885f;
  --summary-amber: #c57908;
  --summary-red: #d33855;
  background:
    radial-gradient(circle at 8% 18%, rgba(255, 255, 255, 0.78) 0 0.34rem, transparent 0.38rem),
    radial-gradient(circle at 18% 74%, rgba(255, 255, 255, 0.48) 0 0.28rem, transparent 0.32rem),
    radial-gradient(circle at 72% 18%, rgba(255, 255, 255, 0.56) 0 0.38rem, transparent 0.44rem),
    radial-gradient(circle at 12% 0%, rgba(40, 189, 255, 0.32), transparent 30%),
    radial-gradient(circle at 90% 6%, rgba(255, 221, 83, 0.34), transparent 28%),
    radial-gradient(circle at 52% 104%, rgba(62, 242, 183, 0.26), transparent 34%),
    linear-gradient(135deg, #e8fbff 0%, #dff8ff 36%, #f7fff5 64%, #fff7d8 100%);
  background-size:
    260px 220px,
    340px 260px,
    300px 240px,
    auto,
    auto,
    auto,
    auto;
  color: var(--summary-ink);
  font-family: "Inter", "Segoe UI", "Helvetica Neue", Arial, sans-serif;
  isolation: isolate;
  animation: none;
  z-index: 120;
}

body.study-summary-open .effects-canvas {
  visibility: hidden;
  opacity: 0;
}

.study-summary-card {
  display: flex;
  flex-direction: column;
  width: 100%;
  inline-size: 100%;
  height: 100%;
  block-size: 100%;
  max-width: none;
  max-height: none;
  overflow: hidden;
  border: 0;
  border-radius: 0;
  background:
    linear-gradient(135deg, rgba(255, 255, 255, 0.94), rgba(232, 251, 255, 0.92) 38%, rgba(255, 250, 226, 0.94)),
    #ffffff;
  box-shadow: none;
}

.study-summary-card::before,
.study-summary-card::after {
  content: none !important;
  display: none !important;
  animation: none !important;
}

.study-summary-bar {
  display: grid;
  grid-template-columns: minmax(150px, 0.72fr) minmax(0, 4.3fr) 42px;
  align-items: center;
  gap: 14px;
  min-height: 76px;
  padding: 12px 16px;
  border-bottom: 1px solid var(--summary-line);
  background:
    radial-gradient(circle at 18% 0%, rgba(255, 255, 255, 0.95), transparent 24%),
    linear-gradient(90deg, #dff8ff 0%, #e9fff9 36%, #fff8d8 72%, #ffe9f5 100%),
    #ffffff;
  box-shadow: inset 0 -2px 0 rgba(42, 205, 238, 0.48);
}

.study-summary-title .study-time-label {
  color: var(--summary-cyan);
  font-size: 0.68rem;
  font-weight: 800;
  text-transform: none;
}

.study-summary-title strong {
  color: var(--summary-ink);
  font-size: 1.14rem;
  line-height: 1.15;
  font-weight: 850;
}

.study-summary-bar-stats {
  display: grid;
  grid-template-columns: repeat(5, minmax(112px, 1fr));
  gap: 8px;
  border: 0;
  scrollbar-width: thin;
  -ms-overflow-style: auto;
}

.study-summary-bar-stat,
.study-summary-bar-stat.strong,
.study-summary-bar-stat.clear,
.study-summary-bar-stat.warm,
.study-summary-bar-stat.neutral,
.study-summary-bar-stat.danger,
.study-summary-bar-stat.idle {
  min-width: 0;
  min-height: 50px;
  border: 1px solid rgba(137, 154, 178, 0.28);
  border-radius: 8px;
  background:
    linear-gradient(135deg, rgba(255, 255, 255, 0.96), rgba(235, 251, 255, 0.88) 58%, rgba(255, 250, 226, 0.78)),
    #ffffff;
  padding: 7px 10px;
  box-shadow: none;
}

.study-summary-bar-stat span,
.study-summary-bar-stat small {
  color: var(--summary-muted);
  font-size: 0.64rem;
  font-weight: 700;
}

.study-summary-bar-stat strong {
  color: var(--summary-ink);
  font-size: 1.05rem;
  font-weight: 850;
}

.study-summary-bar-stat.danger strong {
  color: var(--summary-red);
}

.study-summary-bar-stat.warm strong,
.study-summary-bar-stat.neutral strong {
  color: var(--summary-amber);
}

.study-summary-bar-stat.strong strong,
.study-summary-bar-stat.clear strong {
  color: var(--summary-green);
}

.study-summary-close {
  width: 40px;
  min-width: 40px;
  min-height: 40px;
  border: 1px solid rgba(89, 114, 146, 0.34);
  border-radius: 8px;
  background: linear-gradient(135deg, #ffffff, #e7fbff 70%, #fff4ca);
  color: var(--summary-ink);
  box-shadow: 0 4px 14px rgba(41, 72, 112, 0.12);
}

.study-summary-jumpbar {
  display: flex;
  align-items: center;
  gap: 8px;
  min-height: 48px;
  padding: 7px 16px;
  overflow-x: auto;
  border-bottom: 1px solid var(--summary-line);
  background:
    linear-gradient(90deg, rgba(37, 198, 255, 0.14), rgba(255, 255, 255, 0.76) 42%, rgba(255, 218, 74, 0.16)),
    #f8fbff;
  scrollbar-width: thin;
  -ms-overflow-style: auto;
}

.study-summary-jumpbar button {
  min-height: 34px;
  border: 1px solid rgba(123, 145, 174, 0.24);
  border-radius: 8px;
  background: linear-gradient(135deg, #ffffff, #f0fbff);
  color: #40516a;
  padding: 0 11px;
  font-size: 0.74rem;
  font-weight: 780;
  white-space: nowrap;
}

.study-summary-jumpbar button:hover,
.study-summary-jumpbar button:focus-visible {
  border-color: rgba(36, 104, 216, 0.42);
  background: #edf6ff;
  color: var(--summary-blue);
  box-shadow: none;
}

.study-summary-layout {
  flex: 1;
  min-height: 0;
  display: grid;
  grid-template-columns: minmax(0, 1.42fr) minmax(340px, 0.72fr);
  gap: 14px;
  overflow-y: auto;
  padding: 14px;
  background:
    radial-gradient(circle at 10% 12%, rgba(255, 255, 255, 0.78) 0 0.26rem, transparent 0.3rem),
    radial-gradient(circle at 74% 20%, rgba(255, 255, 255, 0.55) 0 0.2rem, transparent 0.26rem),
    linear-gradient(135deg, #e9faff, #f3fffc 54%, #fff7da);
  background-size:
    220px 180px,
    280px 220px,
    auto;
  scrollbar-width: thin;
  -ms-overflow-style: auto;
}

.executive-study-report,
.study-summary-review {
  min-height: 0;
  border: 0;
  border-radius: 0;
  background: transparent;
  box-shadow: none;
}

.executive-study-report {
  display: grid;
  grid-template-columns: repeat(12, minmax(0, 1fr));
  gap: 12px;
  align-content: start;
  padding: 0;
}

.study-summary-review {
  display: flex;
  flex-direction: column;
  gap: 12px;
  overflow-y: auto;
  padding: 0;
  scrollbar-width: thin;
  -ms-overflow-style: auto;
}

.study-summary-panel .review-coach-panel,
.study-summary-panel .review-momentum-panel,
.study-summary-panel .review-command-deck-panel,
.study-summary-panel .review-set-blueprint-panel,
.study-summary-panel .review-outcome-panel,
.study-summary-panel .review-course-pulse-panel,
.study-summary-panel .review-return-panel,
.study-summary-panel .review-next-queue-panel,
.study-summary-panel .review-age-panel,
.study-summary-panel .study-continuity-panel,
.study-summary-panel .study-forecast-panel,
.study-summary-panel .review-outlook-panel,
.study-summary-panel .review-calendar-panel,
.study-summary-panel .review-dial-panel,
.study-summary-panel .review-sprint-panel,
.study-summary-panel .review-focus-panel,
.study-summary-panel .review-recovery-panel,
.study-summary-panel .study-course-matrix,
.study-summary-panel .exam-readiness-panel,
.study-summary-panel .review-mastery-track,
.study-summary-panel .understanding-summary,
.study-summary-panel .weakness-panel,
.study-summary-panel .review-session-history,
.study-summary-panel .study-running-context,
.study-summary-panel .study-report-tabs,
.study-summary-panel .study-report-list,
.study-summary-panel .review-target-panel,
.study-summary-panel .review-load-radar,
.study-summary-panel .review-course-map,
.study-summary-panel .review-curve-summary {
  display: none !important;
}

.study-summary-panel .study-backup-actions {
  grid-column: 1 / -1;
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 10px;
  align-items: stretch;
  margin: 0;
  padding: 10px;
  border: 1px solid rgba(128, 151, 179, 0.22);
  border-radius: 18px;
  background:
    linear-gradient(135deg, rgba(255, 255, 255, 0.88), rgba(238, 250, 255, 0.82)),
    #ffffff;
  box-shadow: 0 16px 34px rgba(43, 63, 90, 0.1);
}

.study-summary-panel .study-backup-button,
.study-summary-panel .study-sync-status {
  min-height: 42px;
  border: 1px solid rgba(128, 151, 179, 0.22);
  border-radius: 13px;
  background: linear-gradient(180deg, #ffffff, #eef8ff);
  color: #152238;
  font-size: 0.9rem;
  font-weight: 850;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.92);
}

.study-summary-panel .study-backup-button:hover,
.study-summary-panel .study-backup-button:focus-visible {
  border-color: rgba(26, 129, 255, 0.42);
  color: #0756c9;
  box-shadow: 0 0 0 3px rgba(26, 129, 255, 0.12);
}

.study-summary-panel .study-sync-status[data-sync-status="synced"] {
  border-color: rgba(48, 188, 113, 0.3);
  background: linear-gradient(135deg, #f8fffb, #e9fff3);
  color: #047447;
}

.study-summary-panel .study-sync-status[data-sync-status="syncing"],
.study-summary-panel .study-sync-status[data-sync-status="merging"] {
  border-color: rgba(0, 145, 255, 0.3);
  background: linear-gradient(135deg, #f7fbff, #e5f5ff);
  color: #0756c9;
}

.study-summary-panel .study-sync-status[data-sync-status="pending"] {
  border-color: rgba(250, 173, 20, 0.36);
  background: linear-gradient(135deg, #fffdf5, #fff3d6);
  color: #9a5c00;
}

.study-summary-panel .study-sync-status[data-sync-status="error"] {
  border-color: rgba(255, 76, 118, 0.34);
  background: linear-gradient(135deg, #fff8fa, #ffe7ee);
  color: #b81949;
}

@media (max-width: 520px) {
  .study-summary-panel .study-backup-actions {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

.study-summary-panel .study-summary-hero {
  grid-column: 1 / -1;
}

.study-summary-hero-card {
  position: relative;
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(300px, 0.72fr);
  grid-template-areas:
    "head metrics"
    "brief metrics"
    "actions actions";
  gap: 14px 16px;
  min-height: 250px;
  overflow: hidden;
  border: 1px solid rgba(95, 128, 170, 0.26);
  border-radius: 8px;
  background:
    radial-gradient(circle at 10% 12%, rgba(255, 255, 255, 0.95) 0 0.48rem, transparent 0.54rem),
    radial-gradient(circle at 74% 20%, rgba(255, 255, 255, 0.66) 0 0.38rem, transparent 0.44rem),
    linear-gradient(115deg, rgba(255, 255, 255, 0.97), rgba(217, 251, 255, 0.94) 34%, rgba(223, 255, 235, 0.82) 62%, rgba(255, 243, 193, 0.92)),
    #ffffff;
  background-size:
    180px 150px,
    230px 170px,
    auto,
    auto;
  padding: 18px;
  box-shadow: 0 12px 30px rgba(35, 70, 110, 0.1);
}

.study-summary-hero-card::before {
  content: "";
  position: absolute;
  inset: 0 0 auto;
  height: 4px;
  background: linear-gradient(90deg, #23c7ff, #43f7c2 24%, #fff05d 48%, #ff6fb1 72%, #8b6cff 88%, #23c7ff);
  background-size: 180% 100%;
}

.study-summary-hero-card::after {
  content: "";
  position: absolute;
  inset: 4px 0 auto;
  height: 96px;
  pointer-events: none;
  background:
    radial-gradient(circle at 8% 38%, rgba(255, 255, 255, 0.72) 0 3px, transparent 4px),
    radial-gradient(circle at 16% 64%, rgba(255, 255, 255, 0.48) 0 4px, transparent 5px),
    radial-gradient(circle at 28% 24%, rgba(255, 255, 255, 0.62) 0 2px, transparent 3px),
    linear-gradient(100deg, transparent, rgba(39, 211, 255, 0.12), rgba(255, 238, 91, 0.16), transparent);
  background-size: 170px 82px, 220px 92px, 140px 72px, auto;
  opacity: 0.82;
}

.study-summary-hero-card > * {
  position: relative;
  z-index: 1;
}

.study-summary-consulting-head {
  grid-area: head;
  display: flex;
  align-items: center;
  gap: 8px;
  min-width: 0;
}

.study-summary-consulting-head span,
.study-summary-hero-copy span,
.study-summary-hero-copy small {
  color: var(--summary-muted);
  font-size: 0.72rem;
  font-weight: 800;
  text-transform: none;
}

.study-summary-consulting-head em {
  border: 1px solid rgba(211, 56, 85, 0.24);
  border-radius: 8px;
  background: #fff5f7;
  color: var(--summary-red);
  padding: 4px 8px;
  font-size: 0.7rem;
  font-style: normal;
  font-weight: 850;
}

.study-summary-hero-card.warm .study-summary-consulting-head em,
.study-summary-hero-card.weak .study-summary-consulting-head em {
  border-color: rgba(197, 121, 8, 0.28);
  background: #fff8e8;
  color: var(--summary-amber);
}

.study-summary-hero-card.strong .study-summary-consulting-head em {
  border-color: rgba(19, 136, 95, 0.24);
  background: #effbf6;
  color: var(--summary-green);
}

.study-summary-hero-main {
  grid-area: brief;
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(260px, 0.5fr);
  gap: 14px;
  align-items: stretch;
  padding: 0;
  border: 0;
}

.study-summary-hero-copy {
  display: flex;
  flex-direction: column;
  gap: 8px;
  justify-content: center;
}

.study-summary-hero-copy em {
  display: none;
}

.study-summary-hero-copy strong {
  max-width: 720px;
  color: var(--summary-ink);
  font-size: clamp(1.5rem, 1.75vw, 1.86rem);
  font-weight: 850;
  line-height: 1.16;
}

.study-summary-hero-copy p {
  max-width: 640px;
  color: var(--summary-muted);
  font-size: 0.92rem;
  line-height: 1.65;
}

.study-summary-primary-action {
  display: grid;
  grid-template-columns: 38px minmax(0, 1fr) auto;
  grid-template-areas:
    "badge title value"
    "badge detail value";
  align-self: stretch;
  min-width: 260px;
  min-height: 92px;
  border: 1px solid rgba(36, 104, 216, 0.28);
  border-radius: 8px;
  background:
    radial-gradient(circle at 18% 18%, rgba(255, 255, 255, 0.34), transparent 24%),
    linear-gradient(135deg, #2376ff 0%, #18c6dc 45%, #14b88f 100%);
  color: #ffffff;
  padding: 14px;
  box-shadow: 0 14px 28px rgba(36, 104, 216, 0.22);
}

.study-summary-primary-action.danger,
.study-summary-primary-action.warm,
.study-summary-primary-action.weak,
.study-summary-primary-action.strong {
  border-color: rgba(36, 104, 216, 0.28);
  background:
    radial-gradient(circle at 18% 18%, rgba(255, 255, 255, 0.34), transparent 24%),
    linear-gradient(135deg, #2376ff 0%, #18c6dc 45%, #14b88f 100%);
  box-shadow: 0 14px 28px rgba(36, 104, 216, 0.22);
}

.study-summary-primary-action span {
  grid-area: badge;
  display: grid;
  place-items: center;
  width: 32px;
  height: 32px;
  min-width: 32px;
  border: 0;
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.22);
  color: #ffffff;
  padding: 0;
  font-size: 0.68rem;
  font-weight: 850;
}

.study-summary-primary-action strong {
  grid-area: title;
  color: #ffffff;
  font-size: 0.96rem;
  line-height: 1.3;
  font-weight: 850;
  overflow: visible;
  text-overflow: clip;
  white-space: normal;
}

.study-summary-primary-action b {
  grid-area: value;
  align-self: center;
  color: #ffffff;
  font-size: 1.46rem;
  line-height: 1;
  font-weight: 880;
}

.study-summary-primary-action small {
  grid-area: detail;
  color: rgba(255, 255, 255, 0.84);
  font-size: 0.72rem;
  overflow: visible;
  text-overflow: clip;
  white-space: normal;
}

.study-summary-hero-metrics {
  grid-area: metrics;
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 8px;
  align-self: stretch;
  border: 0;
  background: transparent;
}

.study-summary-hero-metric,
.study-summary-hero-metric.strong,
.study-summary-hero-metric.warm,
.study-summary-hero-metric.danger {
  min-height: 92px;
  border: 1px solid rgba(114, 139, 171, 0.22);
  border-radius: 8px;
  background:
    linear-gradient(135deg, rgba(255, 255, 255, 0.96), rgba(232, 251, 255, 0.84) 52%, rgba(255, 249, 218, 0.74)),
    #ffffff;
  padding: 12px;
  box-shadow: none;
}

.study-summary-hero-metric span {
  color: var(--summary-muted);
  font-size: 0.68rem;
  font-weight: 800;
  text-transform: none;
}

.study-summary-hero-metric strong {
  color: var(--summary-ink);
  font-size: 1.62rem;
  line-height: 1.05;
  font-weight: 870;
}

.study-summary-hero-metric.danger strong {
  color: var(--summary-red);
}

.study-summary-hero-metric.warm strong {
  color: var(--summary-amber);
}

.study-summary-hero-metric.strong strong {
  color: var(--summary-green);
}

.study-summary-hero-metric small {
  color: var(--summary-muted);
  font-size: 0.72rem;
  line-height: 1.4;
}

.study-summary-next-actions {
  grid-area: actions;
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 10px;
  border-top: 1px solid rgba(121, 145, 175, 0.22);
  padding-top: 12px;
}

.study-summary-next-action,
.study-summary-next-action.danger,
.study-summary-next-action.warm,
.study-summary-next-action.weak,
.study-summary-next-action.strong {
  min-height: 74px;
  border: 1px solid rgba(121, 145, 175, 0.24);
  border-radius: 8px;
  background:
    linear-gradient(135deg, rgba(255, 255, 255, 0.98), rgba(237, 252, 255, 0.88) 58%, rgba(255, 247, 213, 0.76)),
    #ffffff;
  box-shadow: none;
  padding: 11px;
}

.study-summary-next-action.danger {
  border-left: 4px solid var(--summary-red);
}

.study-summary-next-action.warm,
.study-summary-next-action.weak {
  border-left: 4px solid var(--summary-amber);
}

.study-summary-next-action.strong {
  border-left: 4px solid var(--summary-green);
}

.study-summary-next-action span {
  display: grid;
  place-items: center;
  width: 25px;
  height: 25px;
  border-radius: 8px;
  background: #e9f1fb;
  color: #46617e;
  font-size: 0.72rem;
  font-weight: 850;
}

.study-summary-next-action strong,
.study-summary-next-action b {
  color: var(--summary-ink);
}

.study-summary-next-action strong {
  font-size: 0.86rem;
  line-height: 1.32;
  font-weight: 850;
}

.study-summary-next-action b {
  font-size: 1rem;
  font-weight: 870;
}

.study-summary-next-action small {
  color: var(--summary-muted);
  font-size: 0.71rem;
}

.study-summary-next-empty {
  min-height: 58px;
  border: 1px dashed rgba(96, 112, 134, 0.28);
  border-radius: 8px;
  background: linear-gradient(135deg, #f8fbff, #ecfbff 62%, #fff7da);
  color: var(--summary-muted);
  display: flex;
  align-items: center;
  padding: 12px 14px;
  font-size: 0.86rem;
  font-weight: 700;
}

.study-summary-panel .study-report-summary,
.study-summary-panel .study-effort,
.study-summary-panel .study-efficiency-panel,
.study-summary-panel .study-insight-grid,
.study-summary-panel .study-action-plan,
.study-summary-panel .study-checkpoint-panel,
.study-summary-panel .study-route-panel,
.study-summary-panel .study-week-strip,
.study-summary-panel .study-rhythm-map,
.study-summary-section-head,
.study-summary-panel .review-today-target-panel,
.study-summary-panel .review-session-planner,
.study-summary-panel .review-curriculum-list {
  border: 1px solid rgba(114, 139, 171, 0.22);
  border-radius: 8px;
  background:
    linear-gradient(135deg, rgba(255, 255, 255, 0.98), rgba(239, 252, 255, 0.88) 56%, rgba(255, 249, 220, 0.78)),
    #ffffff;
  box-shadow: 0 10px 24px rgba(35, 70, 110, 0.07);
}

.study-summary-panel .study-report-summary,
.study-summary-panel .study-effort,
.study-summary-panel .study-efficiency-panel {
  grid-column: span 4;
}

.study-summary-panel .study-insight-grid,
.study-summary-panel .study-action-plan,
.study-summary-panel .study-checkpoint-panel,
.study-summary-panel .study-route-panel,
.study-summary-panel .study-week-strip,
.study-summary-panel .study-rhythm-map {
  grid-column: 1 / -1;
}

.study-summary-section-head {
  min-height: 54px;
  border-top: 0;
}

.study-summary-panel .study-report-summary span,
.study-summary-panel .study-report-summary small,
.study-summary-panel .study-effort span,
.study-summary-panel .study-effort small,
.study-summary-panel .study-efficiency-panel span,
.study-summary-panel .study-efficiency-panel small,
.study-summary-panel .study-insight-grid span,
.study-summary-panel .study-insight-grid small,
.study-summary-panel .study-action-plan span,
.study-summary-panel .study-action-plan small,
.study-summary-panel .study-checkpoint-panel span,
.study-summary-panel .study-checkpoint-panel small,
.study-summary-panel .study-route-panel span,
.study-summary-panel .study-route-panel small {
  color: var(--summary-muted);
}

.study-summary-panel .study-report-summary strong,
.study-summary-panel .study-report-summary b,
.study-summary-panel .study-effort strong,
.study-summary-panel .study-effort b,
.study-summary-panel .study-efficiency-panel strong,
.study-summary-panel .study-efficiency-panel b,
.study-summary-panel .study-insight-grid strong,
.study-summary-panel .study-insight-grid b,
.study-summary-panel .study-action-plan strong,
.study-summary-panel .study-action-plan b,
.study-summary-panel .study-checkpoint-panel strong,
.study-summary-panel .study-checkpoint-panel b,
.study-summary-panel .study-route-panel strong,
.study-summary-panel .study-route-panel b {
  color: var(--summary-ink);
}

.review-today-row,
.review-curriculum-row,
.review-set-preview,
.review-session-chip,
.study-checkpoint-row,
.study-route-step,
.insight-card,
.study-summary-panel .study-report-summary > div,
.study-summary-panel .study-effort,
.study-summary-panel .study-efficiency-metric {
  border-radius: 8px;
  box-shadow: none;
}

.study-summary-panel .insight-card,
.study-summary-panel .study-checkpoint-row,
.study-summary-panel .study-route-step,
.study-summary-panel .study-efficiency-metric,
.study-summary-panel .study-report-summary > div {
  border: 1px solid rgba(93, 184, 215, 0.26);
  background:
    radial-gradient(circle at 12% 10%, rgba(255, 255, 255, 0.92), transparent 24%),
    linear-gradient(135deg, #ffffff, #effcff 56%, #fff7d9);
  color: var(--summary-ink);
}

.study-effort-track,
.study-checkpoint-score i,
.study-checkpoint-row i,
.study-route-step i,
.study-efficiency-flow,
.study-efficiency-metric i,
.review-today-meter span,
.review-today-row i,
.review-curriculum-priority,
.review-set-composition {
  height: 7px;
  border-radius: 8px;
  background: linear-gradient(90deg, #d9eef8, #edf8ff, #fff2bf);
}

.study-effort-track span,
.study-checkpoint-score i::before,
.study-checkpoint-row i::before,
.study-route-step i::before,
.study-efficiency-flow span::before,
.study-efficiency-metric i::before,
.review-today-meter span::before,
.review-today-row i::before,
.review-curriculum-priority span {
  border-radius: 8px;
  background: linear-gradient(90deg, #2477ff, #20d6f0 44%, #49efb0 72%, #fff05d);
  box-shadow: none;
}

.study-checkpoint-row.danger i::before,
.study-route-step.danger i::before,
.review-today-row.danger i::before,
.review-curriculum-row.due .review-curriculum-priority span {
  background: linear-gradient(90deg, #d33855, #ffb547);
}

.study-checkpoint-row.warm i::before,
.study-route-step.warm i::before,
.study-route-step.weak i::before,
.review-today-row.warm i::before,
.review-today-row.weak i::before,
.review-curriculum-row.weak .review-curriculum-priority span {
  background: linear-gradient(90deg, #f59f00, #ffe05f);
}

.study-checkpoint-row.strong i::before,
.study-route-step.strong i::before,
.review-today-row.strong i::before {
  background: linear-gradient(90deg, #13885f, #56e6b8);
}

.review-session-chip.active,
.review-curriculum-start,
.review-set-start {
  border-radius: 8px;
  background: linear-gradient(135deg, #2376ff, #18c6dc 45%, #14b88f);
  color: #ffffff;
}

.study-summary-panel .review-curriculum-list::-webkit-scrollbar,
.study-summary-layout::-webkit-scrollbar,
.study-summary-review::-webkit-scrollbar,
.study-summary-jumpbar::-webkit-scrollbar,
.study-summary-bar-stats::-webkit-scrollbar {
  width: 10px;
  height: 10px;
}

.study-summary-panel .review-curriculum-list::-webkit-scrollbar-thumb,
.study-summary-layout::-webkit-scrollbar-thumb,
.study-summary-review::-webkit-scrollbar-thumb,
.study-summary-jumpbar::-webkit-scrollbar-thumb,
.study-summary-bar-stats::-webkit-scrollbar-thumb {
  border: 2px solid rgba(244, 248, 252, 0.9);
  border-radius: 8px;
  background: #9ab0c8;
}

.study-summary-panel .review-curriculum-list::-webkit-scrollbar-track,
.study-summary-layout::-webkit-scrollbar-track,
.study-summary-review::-webkit-scrollbar-track,
.study-summary-jumpbar::-webkit-scrollbar-track,
.study-summary-bar-stats::-webkit-scrollbar-track {
  background: rgba(228, 237, 246, 0.5);
}

@media (max-width: 1180px) {
  .study-summary-layout {
    grid-template-columns: 1fr;
  }

  .study-summary-hero-card {
    grid-template-columns: 1fr;
    grid-template-areas:
      "head"
      "brief"
      "metrics"
      "actions";
  }

  .study-summary-hero-main {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 760px) {
  .study-summary-card {
    width: 100vw;
    height: 100dvh;
    border-radius: 0;
  }

  .study-summary-bar {
    grid-template-columns: minmax(0, 1fr) 38px;
    grid-template-areas:
      "title close"
      "stats stats";
    gap: 9px;
    min-height: 0;
    padding: 10px;
  }

  .study-summary-title {
    grid-area: title;
  }

  .study-summary-title .study-time-label {
    font-size: 0.62rem;
  }

  .study-summary-title strong {
    font-size: 1rem;
  }

  .study-summary-close {
    grid-area: close;
    width: 36px;
    min-width: 36px;
    min-height: 36px;
  }

  .study-summary-bar-stats {
    grid-area: stats;
    grid-template-columns: repeat(5, minmax(118px, 1fr));
    overflow-x: auto;
  }

  .study-summary-layout {
    gap: 10px;
    padding: 10px;
  }

  .study-summary-hero-card {
    gap: 10px;
    padding: 14px;
  }

  .study-summary-hero-copy strong {
    font-size: 1.42rem;
    line-height: 1.2;
  }

  .study-summary-primary-action {
    grid-template-columns: 34px minmax(0, 1fr) auto;
    min-height: 78px;
    padding: 11px;
  }

  .study-summary-hero-metrics {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .study-summary-hero-metric {
    min-height: 82px;
    padding: 10px;
  }

  .study-summary-hero-metric strong {
    font-size: 1.28rem;
  }

  .study-summary-next-actions {
    grid-template-columns: 1fr;
  }
}

/* Professional final lock: keep the study summary clean and production-grade. */
.study-summary-panel {
  --summary-bg: #eef4f8;
  --summary-surface: #ffffff;
  --summary-soft: #f7fafc;
  --summary-ink: #101828;
  --summary-muted: #536579;
  --summary-line: #d8e2eb;
  --summary-accent: #0f8fb3;
  --summary-accent-2: #16a085;
  --summary-red: #d92d45;
  --summary-amber: #c97808;
  --summary-green: #15845f;
  background: var(--summary-bg) !important;
  color: var(--summary-ink) !important;
  font-family: "Inter", "Segoe UI", "Helvetica Neue", Arial, sans-serif !important;
  z-index: 120 !important;
}

body.study-summary-open .effects-canvas {
  visibility: hidden !important;
  opacity: 0 !important;
}

.study-summary-card {
  display: flex !important;
  flex-direction: column !important;
  width: 100% !important;
  inline-size: 100% !important;
  height: 100% !important;
  block-size: 100% !important;
  max-width: none !important;
  max-height: none !important;
  overflow: hidden !important;
  border: 0 !important;
  border-radius: 0 !important;
  background: var(--summary-bg) !important;
  box-shadow: none !important;
}

.study-summary-card::before,
.study-summary-card::after,
.study-summary-hero-card::after {
  content: none !important;
  display: none !important;
  animation: none !important;
}

.study-summary-bar {
  display: grid !important;
  grid-template-columns: minmax(180px, 0.48fr) minmax(0, 4fr) 44px !important;
  align-items: center !important;
  gap: 16px !important;
  min-height: 74px !important;
  padding: 12px 18px !important;
  border-bottom: 1px solid var(--summary-line) !important;
  background: var(--summary-surface) !important;
  box-shadow: none !important;
}

.study-summary-title .study-time-label {
  color: var(--summary-accent) !important;
  font-size: 0.68rem !important;
  font-weight: 800 !important;
  text-transform: none !important;
}

.study-summary-title strong {
  color: var(--summary-ink) !important;
  font-size: 1.16rem !important;
  line-height: 1.16 !important;
  font-weight: 850 !important;
}

.study-summary-bar-stats {
  display: grid !important;
  grid-template-columns: repeat(5, minmax(132px, 1fr)) !important;
  gap: 10px !important;
  border: 0 !important;
  overflow-x: auto !important;
  scrollbar-width: thin !important;
  -ms-overflow-style: auto !important;
}

.study-summary-bar-stat,
.study-summary-bar-stat.strong,
.study-summary-bar-stat.clear,
.study-summary-bar-stat.warm,
.study-summary-bar-stat.neutral,
.study-summary-bar-stat.danger,
.study-summary-bar-stat.idle {
  min-width: 0 !important;
  min-height: 50px !important;
  border: 1px solid var(--summary-line) !important;
  border-radius: 8px !important;
  background: var(--summary-soft) !important;
  padding: 7px 11px !important;
  box-shadow: none !important;
}

.study-summary-bar-stat span,
.study-summary-bar-stat small,
.study-summary-panel span,
.study-summary-panel small {
  color: var(--summary-muted) !important;
}

.study-summary-bar-stat strong,
.study-summary-panel strong,
.study-summary-panel b {
  color: var(--summary-ink) !important;
}

.study-summary-bar-stat.danger strong,
.study-summary-hero-metric.danger strong {
  color: var(--summary-red) !important;
}

.study-summary-bar-stat.warm strong,
.study-summary-bar-stat.neutral strong,
.study-summary-hero-metric.warm strong {
  color: var(--summary-amber) !important;
}

.study-summary-bar-stat.strong strong,
.study-summary-bar-stat.clear strong,
.study-summary-hero-metric.strong strong {
  color: var(--summary-green) !important;
}

.study-summary-close,
.study-summary-jumpbar button {
  border: 1px solid var(--summary-line) !important;
  border-radius: 8px !important;
  background: var(--summary-surface) !important;
  color: var(--summary-ink) !important;
  box-shadow: none !important;
}

.study-summary-jumpbar {
  min-height: 48px !important;
  padding: 7px 18px !important;
  border-bottom: 1px solid var(--summary-line) !important;
  background: #f8fbfd !important;
  scrollbar-width: thin !important;
  -ms-overflow-style: auto !important;
}

.study-summary-layout {
  flex: 1 !important;
  min-height: 0 !important;
  display: grid !important;
  grid-template-columns: minmax(0, 1.55fr) minmax(460px, 0.65fr) !important;
  gap: 16px !important;
  overflow-y: auto !important;
  padding: 16px !important;
  background: var(--summary-bg) !important;
  scrollbar-width: thin !important;
  -ms-overflow-style: auto !important;
}

.executive-study-report {
  display: grid !important;
  grid-template-columns: repeat(12, minmax(0, 1fr)) !important;
  gap: 14px !important;
  align-content: start !important;
  padding: 0 !important;
  border: 0 !important;
  background: transparent !important;
  box-shadow: none !important;
}

.study-summary-review {
  display: flex !important;
  flex-direction: column !important;
  gap: 14px !important;
  overflow-y: auto !important;
  padding: 0 !important;
  border: 0 !important;
  background: transparent !important;
  box-shadow: none !important;
  scrollbar-width: thin !important;
  -ms-overflow-style: auto !important;
}

.study-summary-panel .review-coach-panel,
.study-summary-panel .review-momentum-panel,
.study-summary-panel .review-command-deck-panel,
.study-summary-panel .review-set-blueprint-panel,
.study-summary-panel .review-outcome-panel,
.study-summary-panel .review-course-pulse-panel,
.study-summary-panel .review-return-panel,
.study-summary-panel .review-next-queue-panel,
.study-summary-panel .review-age-panel,
.study-summary-panel .study-continuity-panel,
.study-summary-panel .study-forecast-panel,
.study-summary-panel .review-outlook-panel,
.study-summary-panel .review-calendar-panel,
.study-summary-panel .review-dial-panel,
.study-summary-panel .review-sprint-panel,
.study-summary-panel .review-focus-panel,
.study-summary-panel .review-recovery-panel,
.study-summary-panel .study-course-matrix,
.study-summary-panel .exam-readiness-panel,
.study-summary-panel .review-mastery-track,
.study-summary-panel .understanding-summary,
.study-summary-panel .weakness-panel,
.study-summary-panel .review-session-history,
.study-summary-panel .study-running-context,
.study-summary-panel .study-report-tabs,
.study-summary-panel .study-report-list,
.study-summary-panel .review-target-panel,
.study-summary-panel .review-load-radar,
.study-summary-panel .review-course-map,
.study-summary-panel .review-curve-summary,
.study-summary-panel .study-report-summary,
.study-summary-panel .study-effort,
.study-summary-panel .study-efficiency-panel,
.study-summary-panel .study-insight-grid,
.study-summary-panel .study-action-plan,
.study-summary-panel .study-week-strip,
.study-summary-panel .study-rhythm-map {
  display: none !important;
}

.study-summary-panel .study-summary-hero {
  grid-column: 1 / -1 !important;
}

.study-summary-hero-card {
  position: relative !important;
  display: grid !important;
  grid-template-columns: minmax(320px, 0.95fr) minmax(300px, 0.68fr) !important;
  grid-template-areas: "head metrics" "brief metrics" "actions actions" !important;
  gap: 16px 18px !important;
  min-height: 250px !important;
  overflow: hidden !important;
  border: 1px solid var(--summary-line) !important;
  border-radius: 8px !important;
  background: var(--summary-surface) !important;
  padding: 18px !important;
  box-shadow: 0 8px 22px rgba(16, 24, 40, 0.06) !important;
}

.study-summary-hero-card::before {
  content: "" !important;
  position: absolute !important;
  inset: 0 0 auto !important;
  display: block !important;
  height: 4px !important;
  background: linear-gradient(90deg, var(--summary-accent), var(--summary-accent-2)) !important;
  animation: none !important;
}

.study-summary-hero-main {
  grid-area: brief !important;
  display: grid !important;
  grid-template-columns: minmax(0, 1fr) minmax(250px, 0.48fr) !important;
  gap: 16px !important;
  padding: 0 !important;
  border: 0 !important;
}

.study-summary-hero-copy strong {
  color: var(--summary-ink) !important;
  font-size: clamp(1.55rem, 1.7vw, 2rem) !important;
  line-height: 1.18 !important;
}

.study-summary-hero-copy p {
  color: var(--summary-muted) !important;
  font-size: 0.92rem !important;
  line-height: 1.62 !important;
}

.study-summary-primary-action,
.study-summary-primary-action.danger,
.study-summary-primary-action.warm,
.study-summary-primary-action.weak,
.study-summary-primary-action.strong {
  display: grid !important;
  grid-template-columns: 38px minmax(0, 1fr) auto !important;
  grid-template-areas: "badge title value" "badge detail value" !important;
  min-width: 250px !important;
  min-height: 92px !important;
  border: 1px solid rgba(15, 143, 179, 0.22) !important;
  border-radius: 8px !important;
  background: linear-gradient(135deg, #087aa2, #16a085) !important;
  color: #ffffff !important;
  padding: 14px !important;
  box-shadow: 0 12px 24px rgba(15, 143, 179, 0.18) !important;
}

.study-summary-primary-action span,
.study-summary-primary-action strong,
.study-summary-primary-action b,
.study-summary-primary-action small {
  color: #ffffff !important;
}

.study-summary-primary-action span {
  grid-area: badge !important;
  display: grid !important;
  place-items: center !important;
  width: 32px !important;
  height: 32px !important;
  min-width: 32px !important;
  border-radius: 8px !important;
  background: rgba(255, 255, 255, 0.22) !important;
}

.study-summary-hero-metrics {
  grid-area: metrics !important;
  display: grid !important;
  grid-template-columns: repeat(2, minmax(0, 1fr)) !important;
  gap: 10px !important;
  border: 0 !important;
  background: transparent !important;
}

.study-summary-hero-metric,
.study-summary-hero-metric.strong,
.study-summary-hero-metric.warm,
.study-summary-hero-metric.danger,
.study-summary-next-action,
.study-summary-next-action.danger,
.study-summary-next-action.warm,
.study-summary-next-action.weak,
.study-summary-next-action.strong,
.study-summary-panel .study-checkpoint-row,
.study-summary-panel .study-route-step,
.review-today-row,
.review-curriculum-row,
.review-set-preview,
.review-session-chip {
  border: 1px solid var(--summary-line) !important;
  border-radius: 8px !important;
  background: var(--summary-soft) !important;
  box-shadow: none !important;
}

.study-summary-next-actions {
  grid-area: actions !important;
  display: grid !important;
  grid-template-columns: repeat(3, minmax(0, 1fr)) !important;
  gap: 10px !important;
  border-top: 1px solid var(--summary-line) !important;
  padding-top: 12px !important;
}

.study-summary-next-action.danger { border-left: 4px solid var(--summary-red) !important; }
.study-summary-next-action.warm,
.study-summary-next-action.weak { border-left: 4px solid var(--summary-amber) !important; }
.study-summary-next-action.strong { border-left: 4px solid var(--summary-green) !important; }

.study-summary-next-empty {
  min-height: 58px !important;
  border: 1px dashed #c5d2dd !important;
  border-radius: 8px !important;
  background: var(--summary-soft) !important;
  color: var(--summary-muted) !important;
  display: flex !important;
  align-items: center !important;
  padding: 12px 14px !important;
}

.study-summary-panel .study-checkpoint-panel,
.study-summary-panel .study-route-panel,
.study-summary-section-head,
.study-summary-panel .review-today-target-panel,
.study-summary-panel .review-session-planner,
.study-summary-panel .review-curriculum-list {
  border: 1px solid var(--summary-line) !important;
  border-radius: 8px !important;
  background: var(--summary-surface) !important;
  box-shadow: 0 8px 22px rgba(16, 24, 40, 0.05) !important;
}

.study-summary-panel .study-checkpoint-panel,
.study-summary-panel .study-route-panel {
  grid-column: span 6 !important;
}

.study-effort-track,
.study-checkpoint-score i,
.study-checkpoint-row i,
.study-route-step i,
.review-today-meter span,
.review-today-row i,
.review-curriculum-priority,
.review-set-composition {
  height: 7px !important;
  border-radius: 8px !important;
  background: #e3ebf2 !important;
}

.study-effort-track span,
.study-checkpoint-score i::before,
.study-checkpoint-row i::before,
.study-route-step i::before,
.review-today-meter span::before,
.review-today-row i::before,
.review-curriculum-priority span {
  border-radius: 8px !important;
  background: linear-gradient(90deg, var(--summary-accent), var(--summary-accent-2)) !important;
  box-shadow: none !important;
}

.study-checkpoint-row.danger i::before,
.study-route-step.danger i::before,
.review-today-row.danger i::before,
.review-curriculum-row.due .review-curriculum-priority span { background: var(--summary-red) !important; }
.study-checkpoint-row.warm i::before,
.study-route-step.warm i::before,
.study-route-step.weak i::before,
.review-today-row.warm i::before,
.review-today-row.weak i::before,
.review-curriculum-row.weak .review-curriculum-priority span { background: var(--summary-amber) !important; }
.study-checkpoint-row.strong i::before,
.study-route-step.strong i::before,
.review-today-row.strong i::before { background: var(--summary-green) !important; }

.review-session-chip.active,
.review-curriculum-start,
.review-set-start {
  border-radius: 8px !important;
  background: linear-gradient(135deg, var(--summary-accent), var(--summary-accent-2)) !important;
  color: #ffffff !important;
}

.study-summary-panel .review-curriculum-list::-webkit-scrollbar,
.study-summary-layout::-webkit-scrollbar,
.study-summary-review::-webkit-scrollbar,
.study-summary-jumpbar::-webkit-scrollbar,
.study-summary-bar-stats::-webkit-scrollbar {
  width: 10px !important;
  height: 10px !important;
}

.study-summary-panel .review-curriculum-list::-webkit-scrollbar-thumb,
.study-summary-layout::-webkit-scrollbar-thumb,
.study-summary-review::-webkit-scrollbar-thumb,
.study-summary-jumpbar::-webkit-scrollbar-thumb,
.study-summary-bar-stats::-webkit-scrollbar-thumb {
  border: 2px solid var(--summary-bg) !important;
  border-radius: 8px !important;
  background: #9bacbd !important;
}

@media (max-width: 1180px) {
  .study-summary-layout { grid-template-columns: 1fr !important; }
  .study-summary-hero-card { grid-template-columns: 1fr !important; grid-template-areas: "head" "brief" "metrics" "actions" !important; }
  .study-summary-hero-main { grid-template-columns: 1fr !important; }
  .study-summary-panel .study-checkpoint-panel,
  .study-summary-panel .study-route-panel { grid-column: 1 / -1 !important; }
}

@media (max-width: 760px) {
  .study-summary-bar {
    grid-template-columns: minmax(0, 1fr) 38px !important;
    grid-template-areas: "title close" "stats stats" !important;
    gap: 9px !important;
    padding: 10px !important;
  }
  .study-summary-title { grid-area: title !important; }
  .study-summary-close { grid-area: close !important; width: 36px !important; min-width: 36px !important; min-height: 36px !important; }
  .study-summary-bar-stats { grid-area: stats !important; grid-template-columns: repeat(5, minmax(118px, 1fr)) !important; }
  .study-summary-layout { gap: 10px !important; padding: 10px !important; }
  .study-summary-hero-copy strong { font-size: 1.34rem !important; line-height: 1.22 !important; }
  .study-summary-primary-action { min-width: 0 !important; min-height: 78px !important; }
  .study-summary-hero-metrics { grid-template-columns: repeat(2, minmax(0, 1fr)) !important; }
  .study-summary-next-actions { grid-template-columns: 1fr !important; }
}

/* Professional readability patch for remaining review controls. */
.study-summary-close span {
  display: none !important;
}

.review-today-empty,
.review-set-preview p,
.review-curriculum-empty,
.study-summary-panel .review-session-planner p {
  color: var(--summary-muted) !important;
  opacity: 1 !important;
}

.review-mission-button,
.review-mission-button:disabled,
.review-session-chip,
.review-set-preview,
.review-set-preview.empty {
  opacity: 1 !important;
  color: var(--summary-ink) !important;
  border: 1px solid var(--summary-line) !important;
  border-radius: 8px !important;
  background: var(--summary-soft) !important;
  box-shadow: none !important;
}

.review-mission-button span,
.review-mission-button strong,
.review-mission-button small,
.review-session-chip span,
.review-session-chip strong,
.review-session-chip small,
.review-set-preview span,
.review-set-preview strong,
.review-set-preview small,
.review-set-preview b {
  color: inherit !important;
  opacity: 1 !important;
}

.review-mission-button small,
.review-set-preview small,
.review-session-chip small {
  color: var(--summary-muted) !important;
}

.review-session-chip.active,
.review-session-chip.active span,
.review-session-chip.active strong,
.review-session-chip.active small {
  color: #ffffff !important;
}

/* Landing-page treatment for the study summary. */
.study-summary-panel {
  --summary-bg: #f4fbff;
  --summary-surface: #ffffff;
  --summary-soft: #f6fbff;
  --summary-ink: #0a1730;
  --summary-muted: #52657c;
  --summary-line: #cfe0ec;
  --summary-accent: #0797c6;
  --summary-accent-2: #13b39a;
  --summary-red: #e13a59;
  --summary-amber: #d98b12;
  --summary-green: #128866;
  background:
    linear-gradient(180deg, #ffffff 0%, #f3fbff 44%, #eaf5fb 100%) !important;
}

.study-summary-card {
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.96), rgba(244, 251, 255, 0.98)),
    repeating-linear-gradient(90deg, rgba(7, 151, 198, 0.045) 0 1px, transparent 1px 96px) !important;
}

.study-summary-bar {
  min-height: 78px !important;
  padding: 13px 20px !important;
  border-bottom: 1px solid rgba(194, 214, 226, 0.82) !important;
  background: rgba(255, 255, 255, 0.92) !important;
  backdrop-filter: blur(14px) !important;
}

.study-summary-title .study-time-label {
  color: var(--summary-accent) !important;
  letter-spacing: 0 !important;
}

.study-summary-title strong {
  font-size: 1.24rem !important;
  letter-spacing: 0 !important;
}

.study-summary-bar-stat,
.study-summary-bar-stat.strong,
.study-summary-bar-stat.clear,
.study-summary-bar-stat.warm,
.study-summary-bar-stat.neutral,
.study-summary-bar-stat.danger,
.study-summary-bar-stat.idle {
  min-height: 54px !important;
  border-color: rgba(198, 218, 232, 0.92) !important;
  border-radius: 12px !important;
  background: linear-gradient(180deg, #ffffff, #f6fbff) !important;
}

.study-summary-close,
.study-summary-jumpbar button {
  border-radius: 12px !important;
  background: rgba(255, 255, 255, 0.86) !important;
}

.study-summary-jumpbar {
  min-height: 56px !important;
  padding: 9px 20px !important;
  background: rgba(246, 251, 255, 0.82) !important;
  backdrop-filter: blur(12px) !important;
}

.study-summary-jumpbar button {
  min-height: 38px !important;
  padding: 0 15px !important;
  font-weight: 800 !important;
}

.study-summary-jumpbar button:hover,
.study-summary-jumpbar button:focus-visible {
  border-color: rgba(7, 151, 198, 0.42) !important;
  background: #ffffff !important;
  box-shadow: 0 10px 22px rgba(12, 111, 145, 0.12) !important;
}

.study-summary-layout {
  grid-template-columns: minmax(0, 1.45fr) minmax(420px, 0.68fr) !important;
  gap: 20px !important;
  padding: 20px !important;
  background:
    linear-gradient(180deg, rgba(244, 251, 255, 0.58), rgba(235, 246, 252, 0.92)) !important;
}

.executive-study-report {
  gap: 18px !important;
}

.study-summary-review {
  gap: 16px !important;
}

.study-summary-hero-card {
  grid-template-columns: minmax(360px, 1fr) minmax(360px, 0.86fr) !important;
  grid-template-areas:
    "head metrics"
    "brief metrics"
    "actions actions" !important;
  gap: 20px 26px !important;
  min-height: 390px !important;
  border: 1px solid rgba(125, 193, 220, 0.58) !important;
  border-radius: 22px !important;
  padding: 34px !important;
  background:
    linear-gradient(135deg, rgba(255, 255, 255, 0.98) 0%, rgba(231, 249, 255, 0.98) 45%, rgba(255, 249, 222, 0.94) 100%),
    repeating-linear-gradient(0deg, rgba(7, 151, 198, 0.055) 0 1px, transparent 1px 76px) !important;
  box-shadow: 0 24px 56px rgba(18, 107, 143, 0.14) !important;
}

.study-summary-hero-card::before {
  height: 7px !important;
  background: linear-gradient(90deg, #00a3ff, #18c79a, #ffe15a, #ff7aa9) !important;
}

.study-summary-consulting-head {
  grid-area: head !important;
  display: flex !important;
  align-items: center !important;
  gap: 10px !important;
}

.study-summary-consulting-head span {
  color: #0b607f !important;
  font-size: 0.82rem !important;
  font-weight: 900 !important;
}

.study-summary-consulting-head em {
  border: 1px solid rgba(225, 58, 89, 0.18) !important;
  border-radius: 999px !important;
  background: #fff4f6 !important;
  color: var(--summary-red) !important;
  padding: 7px 12px !important;
  font-size: 0.78rem !important;
  font-style: normal !important;
  font-weight: 900 !important;
}

.study-summary-hero-main {
  grid-template-columns: minmax(0, 1fr) minmax(260px, 0.42fr) !important;
  align-items: center !important;
  gap: 22px !important;
}

.study-summary-hero-copy {
  display: flex !important;
  flex-direction: column !important;
  gap: 10px !important;
}

.study-summary-hero-copy span {
  width: fit-content !important;
  border-radius: 999px !important;
  background: rgba(7, 151, 198, 0.11) !important;
  color: #076988 !important;
  padding: 6px 10px !important;
  font-size: 0.78rem !important;
  font-weight: 900 !important;
}

.study-summary-hero-copy strong {
  max-width: 12em !important;
  color: var(--summary-ink) !important;
  font-size: clamp(2.35rem, 3.6vw, 4.35rem) !important;
  line-height: 1.02 !important;
  letter-spacing: 0 !important;
}

.study-summary-hero-copy p {
  max-width: 44em !important;
  color: #31445d !important;
  font-size: clamp(0.98rem, 1.12vw, 1.18rem) !important;
  line-height: 1.78 !important;
}

.study-summary-primary-action,
.study-summary-primary-action.danger,
.study-summary-primary-action.warm,
.study-summary-primary-action.weak,
.study-summary-primary-action.strong {
  min-width: 260px !important;
  min-height: 118px !important;
  border: 1px solid rgba(255, 255, 255, 0.76) !important;
  border-radius: 18px !important;
  background: linear-gradient(135deg, #067db4 0%, #13b39a 72%, #28c878 100%) !important;
  box-shadow: 0 24px 48px rgba(8, 137, 161, 0.28) !important;
  transform: translateZ(0) !important;
}

.study-summary-primary-action span {
  width: 52px !important;
  height: 52px !important;
  min-width: 52px !important;
  border-radius: 16px !important;
  font-size: 0.66rem !important;
  font-weight: 950 !important;
}

.study-summary-primary-action strong {
  font-size: 1.1rem !important;
  line-height: 1.2 !important;
}

.study-summary-primary-action b {
  font-size: clamp(1.35rem, 2.2vw, 2.1rem) !important;
}

.study-summary-primary-action:hover,
.study-summary-primary-action:focus-visible {
  box-shadow: 0 28px 58px rgba(8, 137, 161, 0.36) !important;
  transform: translateY(-1px) !important;
}

.study-summary-hero-metrics {
  align-self: stretch !important;
  grid-template-columns: repeat(2, minmax(0, 1fr)) !important;
  gap: 12px !important;
  border: 1px solid rgba(189, 214, 229, 0.78) !important;
  border-radius: 20px !important;
  background: rgba(255, 255, 255, 0.78) !important;
  padding: 14px !important;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.8), 0 16px 38px rgba(29, 91, 121, 0.10) !important;
}

.study-summary-hero-metric,
.study-summary-hero-metric.strong,
.study-summary-hero-metric.warm,
.study-summary-hero-metric.danger {
  min-height: 118px !important;
  border-radius: 16px !important;
  border-color: rgba(203, 222, 236, 0.9) !important;
  background: linear-gradient(180deg, #ffffff, #f7fbff) !important;
  padding: 16px !important;
}

.study-summary-hero-metric span {
  font-size: 0.76rem !important;
  font-weight: 850 !important;
}

.study-summary-hero-metric strong {
  margin-top: 4px !important;
  font-size: clamp(1.55rem, 2.4vw, 2.2rem) !important;
}

.study-summary-hero-metric small {
  margin-top: auto !important;
  font-size: 0.78rem !important;
}

.study-summary-next-actions {
  gap: 12px !important;
  border-top: 1px solid rgba(198, 218, 232, 0.8) !important;
  padding-top: 16px !important;
}

.study-summary-next-action,
.study-summary-next-action.danger,
.study-summary-next-action.warm,
.study-summary-next-action.weak,
.study-summary-next-action.strong {
  min-height: 92px !important;
  border-radius: 16px !important;
  background: rgba(255, 255, 255, 0.88) !important;
  padding: 14px !important;
  box-shadow: 0 10px 24px rgba(17, 74, 105, 0.08) !important;
}

.study-summary-next-action span {
  border-radius: 999px !important;
  background: #e7f6fb !important;
  color: #087494 !important;
}

.study-summary-next-action b {
  color: var(--summary-accent) !important;
}

.study-summary-panel .study-checkpoint-panel,
.study-summary-panel .study-route-panel,
.study-summary-section-head,
.study-summary-panel .review-today-target-panel,
.study-summary-panel .review-session-planner,
.study-summary-panel .review-curriculum-list {
  border-radius: 18px !important;
  border-color: rgba(198, 218, 232, 0.9) !important;
  background: rgba(255, 255, 255, 0.92) !important;
  box-shadow: 0 16px 36px rgba(19, 82, 115, 0.08) !important;
}

.study-summary-section-head {
  min-height: 72px !important;
}

.study-checkpoint-row,
.study-route-step,
.review-today-row,
.review-curriculum-row,
.review-set-preview,
.review-session-chip,
.review-mission-button,
.review-mission-button:disabled {
  border-radius: 14px !important;
  background: linear-gradient(180deg, #ffffff, #f8fcff) !important;
}

.review-session-chip.active,
.review-curriculum-start,
.review-set-start {
  border-radius: 14px !important;
  background: linear-gradient(135deg, #0784bf, #13b39a) !important;
}

@media (max-width: 1180px) {
  .study-summary-layout {
    grid-template-columns: 1fr !important;
  }

  .study-summary-hero-card {
    grid-template-columns: 1fr !important;
    grid-template-areas:
      "head"
      "brief"
      "metrics"
      "actions" !important;
    min-height: 0 !important;
  }

  .study-summary-hero-main {
    grid-template-columns: minmax(0, 1fr) minmax(240px, 0.46fr) !important;
  }
}

@media (max-width: 760px) {
  .study-summary-bar {
    min-height: 72px !important;
    padding: 10px !important;
  }

  .study-summary-jumpbar {
    display: grid !important;
    grid-template-columns: repeat(4, minmax(0, 1fr)) !important;
    min-height: 52px !important;
    gap: 8px !important;
    padding: 8px 10px !important;
    overflow: visible !important;
  }

  .study-summary-jumpbar button {
    min-width: 0 !important;
    justify-content: center !important;
    gap: 4px !important;
    padding: 0 6px !important;
  }

  .study-summary-jumpbar button span {
    display: inline !important;
    overflow: visible !important;
    font-size: 0.72rem !important;
    white-space: nowrap !important;
  }

  .study-summary-jumpbar svg {
    width: 15px !important;
    height: 15px !important;
  }

  .study-summary-layout {
    gap: 12px !important;
    padding: 10px !important;
  }

  .study-summary-hero-card {
    gap: 16px !important;
    border-radius: 18px !important;
    padding: 22px 18px 18px !important;
  }

  .study-summary-hero-main {
    grid-template-columns: 1fr !important;
  }

  .study-summary-hero-copy strong {
    max-width: none !important;
    font-size: clamp(2rem, 10vw, 2.75rem) !important;
  }

  .study-summary-primary-action,
  .study-summary-primary-action.danger,
  .study-summary-primary-action.warm,
  .study-summary-primary-action.weak,
  .study-summary-primary-action.strong {
    min-width: 0 !important;
    min-height: 112px !important;
  }

  .study-summary-hero-metrics {
    grid-template-columns: 1fr 1fr !important;
    padding: 10px !important;
  }

  .study-summary-hero-metric,
  .study-summary-hero-metric.strong,
  .study-summary-hero-metric.warm,
  .study-summary-hero-metric.danger {
    min-height: 104px !important;
    padding: 12px !important;
  }

  .study-summary-next-actions {
    grid-template-columns: 1fr !important;
  }
}

/* Immersive stage treatment for the study summary. */
.study-summary-panel {
  --summary-bg: #07182a;
  --summary-surface: rgba(255, 255, 255, 0.88);
  --summary-soft: rgba(255, 255, 255, 0.74);
  --summary-ink: #071226;
  --summary-muted: #365066;
  --summary-line: rgba(216, 232, 244, 0.58);
  --summary-accent: #00a9d6;
  --summary-accent-2: #21c59a;
  --summary-red: #ff5273;
  --summary-amber: #ffd260;
  --summary-green: #25c78d;
  background: #07182a !important;
}

.study-summary-card {
  position: relative !important;
  isolation: isolate !important;
  background:
    linear-gradient(90deg, rgba(4, 11, 28, 0.82) 0%, rgba(5, 34, 58, 0.56) 42%, rgba(250, 253, 255, 0.18) 100%),
    linear-gradient(180deg, rgba(14, 146, 184, 0.22), rgba(255, 213, 80, 0.14) 48%, rgba(4, 16, 32, 0.62) 100%),
    url("./assets/academy-stage.png") center center / cover no-repeat !important;
}

.study-summary-card::before,
.study-summary-card::after {
  content: "" !important;
  position: absolute !important;
  pointer-events: none !important;
  display: block !important;
  z-index: 0 !important;
  animation: none !important;
}

.study-summary-card::before {
  inset: 0 !important;
  background:
    linear-gradient(100deg, rgba(0, 188, 229, 0.20) 0%, transparent 30%, rgba(255, 214, 83, 0.16) 62%, transparent 100%),
    repeating-linear-gradient(115deg, rgba(255, 255, 255, 0.08) 0 1px, transparent 1px 54px) !important;
  mix-blend-mode: screen !important;
}

.study-summary-card::after {
  inset: auto 0 0 !important;
  height: 35% !important;
  background: linear-gradient(180deg, transparent, rgba(3, 11, 24, 0.48)) !important;
}

.study-summary-bar,
.study-summary-jumpbar,
.study-summary-layout {
  position: relative !important;
  z-index: 1 !important;
}

.study-summary-bar {
  border-bottom: 1px solid rgba(255, 255, 255, 0.16) !important;
  background: rgba(5, 18, 35, 0.52) !important;
  backdrop-filter: blur(18px) saturate(1.15) !important;
  box-shadow: 0 12px 34px rgba(0, 0, 0, 0.20) !important;
}

.study-summary-title .study-time-label {
  color: #7fe9ff !important;
}

.study-summary-title strong {
  color: #ffffff !important;
  text-shadow: 0 2px 16px rgba(0, 0, 0, 0.32) !important;
}

.study-summary-bar-stat,
.study-summary-bar-stat.strong,
.study-summary-bar-stat.clear,
.study-summary-bar-stat.warm,
.study-summary-bar-stat.neutral,
.study-summary-bar-stat.danger,
.study-summary-bar-stat.idle {
  border-color: rgba(255, 255, 255, 0.28) !important;
  background: rgba(255, 255, 255, 0.86) !important;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.72), 0 12px 28px rgba(0, 0, 0, 0.12) !important;
}

.study-summary-close,
.study-summary-jumpbar button {
  border-color: rgba(255, 255, 255, 0.36) !important;
  background: rgba(255, 255, 255, 0.18) !important;
  color: #ffffff !important;
  backdrop-filter: blur(12px) !important;
}

.study-summary-close svg,
.study-summary-jumpbar svg {
  color: currentColor !important;
}

.study-summary-jumpbar {
  border-bottom: 1px solid rgba(255, 255, 255, 0.12) !important;
  background: rgba(6, 20, 38, 0.34) !important;
  backdrop-filter: blur(16px) saturate(1.15) !important;
}

.study-summary-jumpbar button span {
  color: #ffffff !important;
}

.study-summary-jumpbar button:hover,
.study-summary-jumpbar button:focus-visible {
  border-color: rgba(126, 233, 255, 0.72) !important;
  background: rgba(255, 255, 255, 0.26) !important;
  box-shadow: 0 14px 32px rgba(0, 174, 214, 0.18) !important;
}

.study-summary-layout {
  background:
    linear-gradient(180deg, rgba(4, 13, 28, 0.18), rgba(4, 13, 28, 0.46)) !important;
}

.study-summary-hero-card {
  min-height: 430px !important;
  border: 1px solid rgba(149, 233, 255, 0.34) !important;
  border-radius: 28px !important;
  padding: 38px !important;
  background:
    linear-gradient(135deg, rgba(5, 25, 48, 0.82) 0%, rgba(5, 105, 132, 0.58) 46%, rgba(253, 241, 180, 0.36) 100%) !important;
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.28),
    inset 0 -1px 0 rgba(255, 255, 255, 0.10),
    0 34px 80px rgba(0, 0, 0, 0.30),
    0 0 0 1px rgba(255, 255, 255, 0.08) !important;
  backdrop-filter: blur(20px) saturate(1.18) !important;
}

.study-summary-hero-card::before {
  height: 8px !important;
  background: linear-gradient(90deg, #08baff, #20d89e, #ffe16b, #ff83b8) !important;
  box-shadow: 0 0 26px rgba(0, 190, 230, 0.45) !important;
}

.study-summary-consulting-head span,
.study-summary-hero-copy span {
  color: #bff6ff !important;
}

.study-summary-consulting-head em {
  border-color: rgba(255, 255, 255, 0.28) !important;
  background: rgba(255, 255, 255, 0.16) !important;
  color: #ffffff !important;
  backdrop-filter: blur(10px) !important;
}

.study-summary-hero-copy span {
  background: rgba(126, 233, 255, 0.16) !important;
}

.study-summary-hero-copy strong {
  max-width: 10.5em !important;
  color: #ffffff !important;
  font-size: 4rem !important;
  line-height: 1.02 !important;
  text-shadow: 0 18px 44px rgba(0, 0, 0, 0.36) !important;
}

.study-summary-hero-copy p {
  max-width: 40em !important;
  color: rgba(242, 252, 255, 0.92) !important;
  font-size: 1.08rem !important;
  text-shadow: 0 4px 18px rgba(0, 0, 0, 0.28) !important;
}

.study-summary-primary-action,
.study-summary-primary-action.danger,
.study-summary-primary-action.warm,
.study-summary-primary-action.weak,
.study-summary-primary-action.strong {
  border-color: rgba(255, 255, 255, 0.48) !important;
  background: linear-gradient(135deg, #0098d8 0%, #15c69a 58%, #ffe068 122%) !important;
  box-shadow: 0 30px 70px rgba(0, 177, 207, 0.34), inset 0 1px 0 rgba(255, 255, 255, 0.36) !important;
}

.study-summary-primary-action span {
  background: rgba(255, 255, 255, 0.22) !important;
}

.study-summary-primary-action:hover,
.study-summary-primary-action:focus-visible {
  box-shadow: 0 34px 84px rgba(0, 177, 207, 0.46), inset 0 1px 0 rgba(255, 255, 255, 0.42) !important;
}

.study-summary-hero-metrics {
  border-color: rgba(255, 255, 255, 0.26) !important;
  background: rgba(255, 255, 255, 0.16) !important;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.28), 0 24px 60px rgba(0, 0, 0, 0.18) !important;
  backdrop-filter: blur(18px) saturate(1.18) !important;
}

.study-summary-hero-metric,
.study-summary-hero-metric.strong,
.study-summary-hero-metric.warm,
.study-summary-hero-metric.danger {
  border-color: rgba(255, 255, 255, 0.25) !important;
  background: rgba(255, 255, 255, 0.86) !important;
  box-shadow: 0 14px 32px rgba(0, 0, 0, 0.12) !important;
}

.study-summary-next-action,
.study-summary-next-action.danger,
.study-summary-next-action.warm,
.study-summary-next-action.weak,
.study-summary-next-action.strong,
.study-summary-next-empty {
  border-color: rgba(255, 255, 255, 0.24) !important;
  background: rgba(255, 255, 255, 0.78) !important;
  box-shadow: 0 16px 38px rgba(0, 0, 0, 0.14) !important;
  backdrop-filter: blur(14px) !important;
}

.study-summary-panel .study-checkpoint-panel,
.study-summary-panel .study-route-panel,
.study-summary-section-head,
.study-summary-panel .review-today-target-panel,
.study-summary-panel .review-session-planner,
.study-summary-panel .review-curriculum-list {
  border-color: rgba(255, 255, 255, 0.28) !important;
  background: rgba(255, 255, 255, 0.84) !important;
  box-shadow: 0 24px 62px rgba(0, 0, 0, 0.18) !important;
  backdrop-filter: blur(16px) saturate(1.12) !important;
}

.study-summary-section-head {
  background: rgba(255, 255, 255, 0.18) !important;
}

.study-summary-section-head span,
.study-summary-section-head strong {
  color: #ffffff !important;
  text-shadow: 0 3px 16px rgba(0, 0, 0, 0.34) !important;
}

.review-today-row,
.review-curriculum-row,
.review-set-preview,
.review-session-chip,
.review-mission-button,
.review-mission-button:disabled,
.study-checkpoint-row,
.study-route-step {
  border-color: rgba(202, 224, 239, 0.82) !important;
  background: rgba(255, 255, 255, 0.82) !important;
}

.review-session-chip.active,
.review-curriculum-start,
.review-set-start {
  background: linear-gradient(135deg, #008fc5, #19bc96) !important;
}

.study-summary-panel .review-curriculum-list::-webkit-scrollbar-thumb,
.study-summary-layout::-webkit-scrollbar-thumb,
.study-summary-review::-webkit-scrollbar-thumb,
.study-summary-jumpbar::-webkit-scrollbar-thumb,
.study-summary-bar-stats::-webkit-scrollbar-thumb {
  border-color: rgba(7, 24, 42, 0.32) !important;
  background: rgba(141, 228, 255, 0.76) !important;
}

@media (max-width: 1180px) {
  .study-summary-hero-copy strong {
    font-size: 3.2rem !important;
  }
}

@media (max-width: 760px) {
  .study-summary-card {
    background:
      linear-gradient(180deg, rgba(5, 17, 34, 0.64), rgba(4, 18, 34, 0.42) 45%, rgba(5, 16, 31, 0.72) 100%),
      url("./assets/academy-stage.png") center top / cover no-repeat !important;
  }

  .study-summary-bar {
    background: rgba(5, 18, 35, 0.64) !important;
  }

  .study-summary-hero-card {
    border-radius: 22px !important;
    padding: 24px 18px 18px !important;
    background: linear-gradient(145deg, rgba(6, 30, 55, 0.84), rgba(3, 112, 139, 0.58), rgba(255, 225, 105, 0.28)) !important;
  }

  .study-summary-hero-copy strong {
    font-size: 2.58rem !important;
  }

  .study-summary-hero-copy p {
    font-size: 0.98rem !important;
  }

  .study-summary-primary-action,
  .study-summary-primary-action.danger,
  .study-summary-primary-action.warm,
  .study-summary-primary-action.weak,
  .study-summary-primary-action.strong {
    min-height: 118px !important;
  }

  .study-summary-hero-metrics {
    background: rgba(255, 255, 255, 0.18) !important;
  }
}

/* Glossy Apple-like glass finish layered over the immersive stage. */
.study-summary-panel {
  --summary-bg: #eef8ff;
  --summary-surface: rgba(255, 255, 255, 0.66);
  --summary-soft: rgba(255, 255, 255, 0.48);
  --summary-ink: #071226;
  --summary-muted: #455d75;
  --summary-line: rgba(255, 255, 255, 0.42);
  --summary-accent: #007aff;
  --summary-accent-2: #34c759;
  --summary-red: #ff375f;
  --summary-amber: #ff9f0a;
  --summary-green: #30d158;
  font-family: -apple-system, BlinkMacSystemFont, "SF Pro Display", "Segoe UI", "Helvetica Neue", Arial, sans-serif !important;
}

.study-summary-card {
  background:
    radial-gradient(circle at 16% 12%, rgba(255, 255, 255, 0.68), transparent 26%),
    radial-gradient(circle at 76% 12%, rgba(106, 214, 255, 0.38), transparent 30%),
    linear-gradient(120deg, rgba(255, 255, 255, 0.22) 0%, rgba(245, 252, 255, 0.14) 42%, rgba(255, 232, 144, 0.18) 100%),
    linear-gradient(180deg, rgba(4, 11, 28, 0.42), rgba(4, 16, 32, 0.62)),
    url("./assets/academy-stage.png") center center / cover no-repeat !important;
}

.study-summary-card::before {
  background:
    linear-gradient(115deg, rgba(255, 255, 255, 0.28) 0%, transparent 18%, transparent 72%, rgba(255, 255, 255, 0.20) 100%),
    repeating-linear-gradient(118deg, rgba(255, 255, 255, 0.09) 0 1px, transparent 1px 62px) !important;
  mix-blend-mode: screen !important;
}

.study-summary-card::after {
  height: 42% !important;
  background: linear-gradient(180deg, transparent, rgba(236, 247, 255, 0.20) 42%, rgba(2, 10, 24, 0.42)) !important;
}

.study-summary-bar {
  border-bottom: 1px solid rgba(255, 255, 255, 0.28) !important;
  background: rgba(245, 250, 255, 0.26) !important;
  backdrop-filter: blur(28px) saturate(1.75) !important;
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.36),
    0 18px 38px rgba(0, 0, 0, 0.16) !important;
}

.study-summary-title .study-time-label {
  color: rgba(219, 248, 255, 0.92) !important;
}

.study-summary-title strong {
  color: #ffffff !important;
  text-shadow: 0 8px 26px rgba(0, 0, 0, 0.34) !important;
}

.study-summary-bar-stat,
.study-summary-bar-stat.strong,
.study-summary-bar-stat.clear,
.study-summary-bar-stat.warm,
.study-summary-bar-stat.neutral,
.study-summary-bar-stat.danger,
.study-summary-bar-stat.idle {
  border-color: rgba(255, 255, 255, 0.46) !important;
  background:
    linear-gradient(145deg, rgba(255, 255, 255, 0.78) 0%, rgba(255, 255, 255, 0.48) 48%, rgba(255, 255, 255, 0.34) 100%) !important;
  backdrop-filter: blur(24px) saturate(1.55) !important;
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.82),
    inset 0 -1px 0 rgba(255, 255, 255, 0.18),
    0 18px 44px rgba(0, 0, 0, 0.14) !important;
}

.study-summary-close,
.study-summary-jumpbar button {
  border-color: rgba(255, 255, 255, 0.44) !important;
  background:
    linear-gradient(145deg, rgba(255, 255, 255, 0.34), rgba(255, 255, 255, 0.18)) !important;
  color: #ffffff !important;
  backdrop-filter: blur(26px) saturate(1.7) !important;
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.55),
    0 14px 30px rgba(0, 0, 0, 0.16) !important;
}

.study-summary-jumpbar {
  background: rgba(245, 250, 255, 0.18) !important;
  backdrop-filter: blur(26px) saturate(1.65) !important;
}

.study-summary-layout {
  background:
    radial-gradient(circle at 20% 0%, rgba(255, 255, 255, 0.16), transparent 34%),
    linear-gradient(180deg, rgba(239, 249, 255, 0.04), rgba(5, 15, 30, 0.34)) !important;
}

.study-summary-hero-card {
  border-color: rgba(255, 255, 255, 0.45) !important;
  background:
    linear-gradient(145deg, rgba(255, 255, 255, 0.68) 0%, rgba(246, 253, 255, 0.42) 42%, rgba(255, 255, 255, 0.24) 100%) !important;
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.88),
    inset 0 -1px 0 rgba(255, 255, 255, 0.22),
    0 42px 96px rgba(0, 0, 0, 0.26),
    0 0 0 1px rgba(255, 255, 255, 0.10) !important;
  backdrop-filter: blur(34px) saturate(1.72) !important;
}

.study-summary-hero-card::before {
  height: 7px !important;
  background: linear-gradient(90deg, #0a84ff, #64d2ff, #30d158, #ffd60a, #ff2d55) !important;
  box-shadow: 0 0 32px rgba(100, 210, 255, 0.55) !important;
}

.study-summary-hero-card::after {
  content: "" !important;
  position: absolute !important;
  inset: 1px !important;
  display: block !important;
  pointer-events: none !important;
  z-index: 0 !important;
  border-radius: inherit !important;
  background:
    linear-gradient(124deg, rgba(255, 255, 255, 0.76) 0%, rgba(255, 255, 255, 0.30) 18%, transparent 38%),
    radial-gradient(circle at 82% 14%, rgba(255, 255, 255, 0.44), transparent 30%) !important;
  opacity: 0.62 !important;
}

.study-summary-hero-card > * {
  position: relative !important;
  z-index: 1 !important;
}

.study-summary-consulting-head span,
.study-summary-hero-copy span {
  color: #0a5c78 !important;
  text-shadow: none !important;
}

.study-summary-consulting-head em {
  border-color: rgba(255, 255, 255, 0.48) !important;
  background:
    linear-gradient(145deg, rgba(255, 255, 255, 0.70), rgba(255, 255, 255, 0.34)) !important;
  color: #d7003a !important;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.78), 0 12px 24px rgba(255, 55, 95, 0.12) !important;
}

.study-summary-hero-copy span {
  background: rgba(255, 255, 255, 0.46) !important;
  backdrop-filter: blur(18px) !important;
}

.study-summary-hero-copy strong {
  color: #071226 !important;
  text-shadow: 0 10px 28px rgba(255, 255, 255, 0.55) !important;
}

.study-summary-hero-copy p {
  color: #20384f !important;
  text-shadow: none !important;
}

.study-summary-primary-action,
.study-summary-primary-action.danger,
.study-summary-primary-action.warm,
.study-summary-primary-action.weak,
.study-summary-primary-action.strong {
  position: relative !important;
  overflow: hidden !important;
  border-color: rgba(255, 255, 255, 0.58) !important;
  background:
    linear-gradient(140deg, #007aff 0%, #00c7be 52%, #30d158 100%) !important;
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.56),
    inset 0 -1px 0 rgba(255, 255, 255, 0.20),
    0 28px 62px rgba(0, 122, 255, 0.30),
    0 18px 36px rgba(48, 209, 88, 0.18) !important;
}

.study-summary-primary-action::before {
  content: "" !important;
  position: absolute !important;
  inset: 0 0 48% !important;
  display: block !important;
  pointer-events: none !important;
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.56), rgba(255, 255, 255, 0.08)) !important;
  opacity: 0.72 !important;
}

.study-summary-primary-action > * {
  position: relative !important;
  z-index: 1 !important;
}

.study-summary-primary-action span {
  background: rgba(255, 255, 255, 0.26) !important;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.44) !important;
}

.study-summary-primary-action:hover,
.study-summary-primary-action:focus-visible {
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.62),
    0 34px 74px rgba(0, 122, 255, 0.38),
    0 22px 44px rgba(48, 209, 88, 0.22) !important;
}

.study-summary-hero-metrics {
  border-color: rgba(255, 255, 255, 0.50) !important;
  background:
    linear-gradient(145deg, rgba(255, 255, 255, 0.44), rgba(255, 255, 255, 0.20)) !important;
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.62),
    0 28px 68px rgba(0, 0, 0, 0.18) !important;
  backdrop-filter: blur(30px) saturate(1.65) !important;
}

.study-summary-hero-metric,
.study-summary-hero-metric.strong,
.study-summary-hero-metric.warm,
.study-summary-hero-metric.danger,
.study-summary-next-action,
.study-summary-next-action.danger,
.study-summary-next-action.warm,
.study-summary-next-action.weak,
.study-summary-next-action.strong,
.study-summary-next-empty,
.study-summary-panel .study-checkpoint-panel,
.study-summary-panel .study-route-panel,
.study-summary-section-head,
.study-summary-panel .review-today-target-panel,
.study-summary-panel .review-session-planner,
.study-summary-panel .review-curriculum-list {
  border-color: rgba(255, 255, 255, 0.52) !important;
  background:
    linear-gradient(145deg, rgba(255, 255, 255, 0.80), rgba(255, 255, 255, 0.52) 55%, rgba(255, 255, 255, 0.36)) !important;
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.90),
    inset 0 -1px 0 rgba(255, 255, 255, 0.22),
    0 24px 58px rgba(0, 0, 0, 0.16) !important;
  backdrop-filter: blur(28px) saturate(1.55) !important;
}

.study-summary-section-head span {
  color: #316074 !important;
  text-shadow: none !important;
}

.study-summary-section-head strong {
  color: #071226 !important;
  text-shadow: none !important;
}

.review-today-row,
.review-curriculum-row,
.review-set-preview,
.review-session-chip,
.review-mission-button,
.review-mission-button:disabled,
.study-checkpoint-row,
.study-route-step {
  border-color: rgba(255, 255, 255, 0.62) !important;
  background: rgba(255, 255, 255, 0.64) !important;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.74), 0 8px 24px rgba(0, 0, 0, 0.08) !important;
  backdrop-filter: blur(18px) saturate(1.35) !important;
}

.review-session-chip.active,
.review-curriculum-start,
.review-set-start {
  border-color: rgba(255, 255, 255, 0.56) !important;
  background: linear-gradient(135deg, #007aff, #00c7be) !important;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.46), 0 18px 34px rgba(0, 122, 255, 0.22) !important;
}

@media (max-width: 760px) {
  .study-summary-card {
    background:
      radial-gradient(circle at 18% 7%, rgba(255, 255, 255, 0.42), transparent 30%),
      linear-gradient(180deg, rgba(245, 251, 255, 0.24), rgba(6, 19, 35, 0.46) 56%, rgba(4, 13, 27, 0.70) 100%),
      url("./assets/academy-stage.png") center top / cover no-repeat !important;
  }

  .study-summary-hero-card {
    background:
      linear-gradient(145deg, rgba(255, 255, 255, 0.70), rgba(238, 251, 255, 0.40), rgba(255, 255, 255, 0.24)) !important;
  }

  .study-summary-hero-copy strong {
    color: #071226 !important;
    text-shadow: 0 8px 24px rgba(255, 255, 255, 0.54) !important;
  }

  .study-summary-hero-copy p {
    color: #20384f !important;
  }
}

/* Apple-inspired Liquid Glass refinement: bright, restrained, and glossy. */
.study-summary-panel {
  --summary-bg: #edf6ff;
  --summary-surface: rgba(255, 255, 255, 0.70);
  --summary-soft: rgba(255, 255, 255, 0.54);
  --summary-ink: #08111f;
  --summary-muted: #526579;
  --summary-line: rgba(255, 255, 255, 0.64);
  --summary-accent: #007aff;
  --summary-accent-2: #5ac8fa;
  --summary-red: #ff2d55;
  --summary-amber: #ff9f0a;
  --summary-green: #34c759;
  background: #edf6ff !important;
  color: var(--summary-ink) !important;
  font-family: -apple-system, BlinkMacSystemFont, "SF Pro Display", "SF Pro Text", "Segoe UI", sans-serif !important;
}

.study-summary-card {
  background:
    radial-gradient(circle at 18% 10%, rgba(255, 255, 255, 0.84), transparent 27%),
    radial-gradient(circle at 76% 8%, rgba(137, 215, 255, 0.30), transparent 31%),
    linear-gradient(180deg, #f7fbff 0%, #edf7ff 54%, #dbeaf7 100%) !important;
}

.study-summary-card::before {
  content: "" !important;
  position: absolute !important;
  inset: -34px !important;
  z-index: 0 !important;
  display: block !important;
  pointer-events: none !important;
  background: url("./assets/academy-stage.png") center center / cover no-repeat !important;
  filter: blur(24px) saturate(1.24) brightness(1.12) !important;
  opacity: 0.36 !important;
  transform: scale(1.04) !important;
  mix-blend-mode: normal !important;
}

.study-summary-card::after {
  content: "" !important;
  position: absolute !important;
  inset: 0 !important;
  z-index: 0 !important;
  display: block !important;
  height: auto !important;
  pointer-events: none !important;
  background:
    linear-gradient(120deg, rgba(255, 255, 255, 0.62) 0%, rgba(255, 255, 255, 0.22) 26%, transparent 54%),
    radial-gradient(circle at 64% 18%, rgba(90, 200, 250, 0.16), transparent 28%),
    linear-gradient(180deg, rgba(255, 255, 255, 0.56), rgba(233, 244, 255, 0.42)) !important;
}

.study-summary-bar {
  grid-template-columns: minmax(180px, 0.42fr) minmax(0, 4.2fr) 46px !important;
  min-height: 82px !important;
  padding: 14px 22px !important;
  border-bottom: 1px solid rgba(255, 255, 255, 0.52) !important;
  background: rgba(255, 255, 255, 0.46) !important;
  box-shadow: 0 16px 42px rgba(38, 71, 98, 0.12), inset 0 1px 0 rgba(255, 255, 255, 0.76) !important;
  backdrop-filter: blur(36px) saturate(1.65) !important;
}

.study-summary-title .study-time-label {
  color: #0a74d5 !important;
  font-size: 0.68rem !important;
  font-weight: 760 !important;
}

.study-summary-title strong {
  color: #071226 !important;
  font-size: 1.24rem !important;
  font-weight: 780 !important;
  text-shadow: none !important;
}

.study-summary-bar-stat,
.study-summary-bar-stat.strong,
.study-summary-bar-stat.clear,
.study-summary-bar-stat.warm,
.study-summary-bar-stat.neutral,
.study-summary-bar-stat.danger,
.study-summary-bar-stat.idle {
  min-height: 56px !important;
  border: 1px solid rgba(255, 255, 255, 0.70) !important;
  border-radius: 18px !important;
  background:
    linear-gradient(145deg, rgba(255, 255, 255, 0.72), rgba(255, 255, 255, 0.44)) !important;
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.90),
    inset 0 -1px 0 rgba(255, 255, 255, 0.20),
    0 18px 38px rgba(34, 74, 103, 0.12) !important;
  backdrop-filter: blur(30px) saturate(1.55) !important;
}

.study-summary-close {
  border-radius: 18px !important;
}

.study-summary-close,
.study-summary-jumpbar button {
  border: 1px solid rgba(255, 255, 255, 0.70) !important;
  background:
    linear-gradient(145deg, rgba(255, 255, 255, 0.60), rgba(255, 255, 255, 0.30)) !important;
  color: #071226 !important;
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.86),
    0 12px 26px rgba(39, 78, 110, 0.12) !important;
  backdrop-filter: blur(30px) saturate(1.55) !important;
}

.study-summary-jumpbar {
  align-self: center !important;
  width: fit-content !important;
  max-width: calc(100% - 40px) !important;
  min-height: 54px !important;
  margin: 12px auto 4px !important;
  padding: 7px !important;
  border: 1px solid rgba(255, 255, 255, 0.60) !important;
  border-radius: 999px !important;
  background: rgba(255, 255, 255, 0.36) !important;
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.72),
    0 18px 44px rgba(35, 70, 104, 0.14) !important;
  backdrop-filter: blur(36px) saturate(1.55) !important;
  overflow-x: auto !important;
}

.study-summary-jumpbar button {
  min-height: 38px !important;
  border-radius: 999px !important;
  padding: 0 16px !important;
  box-shadow: none !important;
}

.study-summary-jumpbar button span {
  color: #071226 !important;
  font-weight: 720 !important;
}

.study-summary-jumpbar button:hover,
.study-summary-jumpbar button:focus-visible {
  border-color: rgba(0, 122, 255, 0.38) !important;
  background: rgba(255, 255, 255, 0.70) !important;
  box-shadow: 0 10px 24px rgba(0, 122, 255, 0.12) !important;
}

.study-summary-layout {
  grid-template-columns: minmax(0, 1.45fr) minmax(430px, 0.64fr) !important;
  gap: 22px !important;
  padding: 22px !important;
  background:
    radial-gradient(circle at 50% 0%, rgba(255, 255, 255, 0.34), transparent 36%),
    linear-gradient(180deg, rgba(255, 255, 255, 0.06), rgba(213, 230, 244, 0.22)) !important;
}

.study-summary-hero-card {
  min-height: 426px !important;
  border: 1px solid rgba(255, 255, 255, 0.72) !important;
  border-radius: 34px !important;
  padding: 42px !important;
  background:
    linear-gradient(145deg, rgba(255, 255, 255, 0.74) 0%, rgba(255, 255, 255, 0.48) 48%, rgba(255, 255, 255, 0.34) 100%) !important;
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.96),
    inset 0 -1px 0 rgba(255, 255, 255, 0.26),
    0 42px 100px rgba(26, 62, 93, 0.20),
    0 1px 0 rgba(255, 255, 255, 0.60) !important;
  backdrop-filter: blur(42px) saturate(1.72) !important;
}

.study-summary-hero-card::before {
  height: 6px !important;
  border-radius: 34px 34px 0 0 !important;
  background: linear-gradient(90deg, #007aff, #64d2ff, #bf5af2, #ff2d55, #ffd60a) !important;
  box-shadow: 0 0 26px rgba(100, 210, 255, 0.38) !important;
}

.study-summary-hero-card::after {
  content: "" !important;
  position: absolute !important;
  inset: 1px !important;
  z-index: 0 !important;
  display: block !important;
  border-radius: inherit !important;
  pointer-events: none !important;
  background:
    linear-gradient(126deg, rgba(255, 255, 255, 0.78) 0%, rgba(255, 255, 255, 0.30) 17%, transparent 43%),
    radial-gradient(circle at 86% 10%, rgba(255, 255, 255, 0.46), transparent 27%),
    linear-gradient(180deg, rgba(255, 255, 255, 0.18), transparent 44%) !important;
  opacity: 0.78 !important;
}

.study-summary-hero-card > * {
  position: relative !important;
  z-index: 1 !important;
}

.study-summary-consulting-head span,
.study-summary-hero-copy span {
  color: #006fbd !important;
  text-shadow: none !important;
}

.study-summary-consulting-head em,
.study-summary-hero-copy span {
  border: 1px solid rgba(255, 255, 255, 0.66) !important;
  border-radius: 999px !important;
  background: rgba(255, 255, 255, 0.48) !important;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.82), 0 10px 22px rgba(40, 76, 108, 0.10) !important;
  backdrop-filter: blur(22px) saturate(1.4) !important;
}

.study-summary-consulting-head em {
  color: #d7003a !important;
}

.study-summary-hero-copy strong {
  max-width: 12em !important;
  color: #071226 !important;
  font-size: clamp(2.85rem, 3.4vw, 4.1rem) !important;
  line-height: 1.05 !important;
  font-weight: 820 !important;
  letter-spacing: 0 !important;
  text-shadow: 0 8px 28px rgba(255, 255, 255, 0.62) !important;
}

.study-summary-hero-copy p {
  max-width: 36em !important;
  color: #23384d !important;
  font-size: 1.05rem !important;
  line-height: 1.68 !important;
  text-shadow: none !important;
}

.study-summary-primary-action,
.study-summary-primary-action.danger,
.study-summary-primary-action.warm,
.study-summary-primary-action.weak,
.study-summary-primary-action.strong {
  min-height: 124px !important;
  border: 1px solid rgba(255, 255, 255, 0.68) !important;
  border-radius: 24px !important;
  background:
    linear-gradient(145deg, #007aff 0%, #00c7be 58%, #64d2ff 100%) !important;
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.62),
    inset 0 -1px 0 rgba(255, 255, 255, 0.18),
    0 30px 70px rgba(0, 122, 255, 0.25),
    0 18px 36px rgba(0, 199, 190, 0.14) !important;
}

.study-summary-primary-action::before {
  content: "" !important;
  position: absolute !important;
  inset: 0 0 50% !important;
  z-index: 0 !important;
  display: block !important;
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.60), rgba(255, 255, 255, 0.08)) !important;
  pointer-events: none !important;
}

.study-summary-primary-action > * {
  position: relative !important;
  z-index: 1 !important;
}

.study-summary-primary-action span {
  border-radius: 18px !important;
  background: rgba(255, 255, 255, 0.24) !important;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.48) !important;
}

.study-summary-primary-action strong {
  font-weight: 760 !important;
}

.study-summary-primary-action b {
  font-weight: 830 !important;
}

.study-summary-primary-action:hover,
.study-summary-primary-action:focus-visible {
  transform: translateY(-1px) !important;
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.70),
    0 34px 82px rgba(0, 122, 255, 0.32),
    0 22px 44px rgba(0, 199, 190, 0.18) !important;
}

.study-summary-hero-metrics {
  border: 1px solid rgba(255, 255, 255, 0.66) !important;
  border-radius: 28px !important;
  background:
    linear-gradient(145deg, rgba(255, 255, 255, 0.54), rgba(255, 255, 255, 0.28)) !important;
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.86),
    0 26px 70px rgba(29, 70, 106, 0.14) !important;
  backdrop-filter: blur(36px) saturate(1.58) !important;
}

.study-summary-hero-metric,
.study-summary-hero-metric.strong,
.study-summary-hero-metric.warm,
.study-summary-hero-metric.danger {
  border: 1px solid rgba(255, 255, 255, 0.72) !important;
  border-radius: 22px !important;
  background:
    linear-gradient(145deg, rgba(255, 255, 255, 0.78), rgba(255, 255, 255, 0.48)) !important;
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.92),
    0 16px 42px rgba(34, 74, 104, 0.10) !important;
  backdrop-filter: blur(28px) saturate(1.45) !important;
}

.study-summary-next-action,
.study-summary-next-action.danger,
.study-summary-next-action.warm,
.study-summary-next-action.weak,
.study-summary-next-action.strong,
.study-summary-next-empty,
.study-summary-panel .study-checkpoint-panel,
.study-summary-panel .study-route-panel,
.study-summary-section-head,
.study-summary-panel .review-today-target-panel,
.study-summary-panel .review-session-planner,
.study-summary-panel .review-curriculum-list {
  border: 1px solid rgba(255, 255, 255, 0.70) !important;
  border-radius: 26px !important;
  background:
    linear-gradient(145deg, rgba(255, 255, 255, 0.76), rgba(255, 255, 255, 0.48)) !important;
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.92),
    inset 0 -1px 0 rgba(255, 255, 255, 0.22),
    0 28px 70px rgba(29, 70, 106, 0.14) !important;
  backdrop-filter: blur(34px) saturate(1.54) !important;
}

.study-summary-section-head {
  min-height: 76px !important;
}

.study-summary-section-head span {
  color: #4e6578 !important;
  text-shadow: none !important;
}

.study-summary-section-head strong {
  color: #071226 !important;
  text-shadow: none !important;
}

.study-checkpoint-row,
.study-route-step,
.review-today-row,
.review-curriculum-row,
.review-set-preview,
.review-session-chip,
.review-mission-button,
.review-mission-button:disabled {
  border: 1px solid rgba(255, 255, 255, 0.72) !important;
  border-radius: 20px !important;
  background: rgba(255, 255, 255, 0.64) !important;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.82), 0 10px 26px rgba(42, 82, 112, 0.08) !important;
  backdrop-filter: blur(22px) saturate(1.34) !important;
}

.review-session-chip.active,
.review-curriculum-start,
.review-set-start {
  border-color: rgba(255, 255, 255, 0.72) !important;
  background: linear-gradient(145deg, #007aff, #5ac8fa) !important;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.52), 0 16px 34px rgba(0, 122, 255, 0.22) !important;
}

.study-effort-track,
.study-checkpoint-score i,
.study-checkpoint-row i,
.study-route-step i,
.review-today-meter span,
.review-today-row i,
.review-curriculum-priority,
.review-set-composition {
  background: rgba(7, 18, 38, 0.10) !important;
}

.study-effort-track span,
.study-checkpoint-score i::before,
.study-checkpoint-row i::before,
.study-route-step i::before,
.review-today-meter span::before,
.review-today-row i::before,
.review-curriculum-priority span {
  background: linear-gradient(90deg, #007aff, #5ac8fa) !important;
}

.study-summary-panel .review-curriculum-list::-webkit-scrollbar-thumb,
.study-summary-layout::-webkit-scrollbar-thumb,
.study-summary-review::-webkit-scrollbar-thumb,
.study-summary-jumpbar::-webkit-scrollbar-thumb,
.study-summary-bar-stats::-webkit-scrollbar-thumb {
  border-color: rgba(255, 255, 255, 0.60) !important;
  background: rgba(0, 122, 255, 0.40) !important;
}

@media (max-width: 1180px) {
  .study-summary-layout {
    grid-template-columns: 1fr !important;
  }

  .study-summary-hero-copy strong {
    font-size: clamp(2.45rem, 5.4vw, 3.6rem) !important;
  }
}

@media (max-width: 760px) {
  .study-summary-card {
    background:
      radial-gradient(circle at 20% 5%, rgba(255, 255, 255, 0.82), transparent 28%),
      linear-gradient(180deg, #eef8ff 0%, #dcecff 54%, #bfd2e6 100%) !important;
  }

  .study-summary-card::before {
    inset: -24px !important;
    filter: blur(20px) saturate(1.18) brightness(1.15) !important;
    opacity: 0.34 !important;
  }

  .study-summary-bar {
    min-height: 74px !important;
    background: rgba(255, 255, 255, 0.42) !important;
  }

  .study-summary-bar-stats {
    grid-template-columns: repeat(3, minmax(0, 1fr)) !important;
    gap: 8px !important;
    overflow: visible !important;
  }

  .study-summary-bar-stat,
  .study-summary-bar-stat.strong,
  .study-summary-bar-stat.clear,
  .study-summary-bar-stat.warm,
  .study-summary-bar-stat.neutral,
  .study-summary-bar-stat.danger,
  .study-summary-bar-stat.idle {
    min-height: 54px !important;
    padding: 8px 10px !important;
  }

  .study-summary-jumpbar {
    width: auto !important;
    max-width: none !important;
    margin: 10px 10px 2px !important;
    border-radius: 24px !important;
    grid-template-columns: repeat(4, minmax(0, 1fr)) !important;
  }

  .study-summary-jumpbar button {
    padding: 0 8px !important;
  }

  .study-summary-layout {
    padding: 10px !important;
  }

  .study-summary-hero-card {
    border-radius: 30px !important;
    padding: 24px 18px 18px !important;
    background:
      linear-gradient(145deg, rgba(255, 255, 255, 0.72), rgba(255, 255, 255, 0.42)) !important;
  }

  .study-summary-hero-copy strong {
    font-size: clamp(2.05rem, 8.4vw, 2.7rem) !important;
  }

  .study-summary-hero-copy p {
    font-size: 0.98rem !important;
  }

  .study-summary-primary-action,
  .study-summary-primary-action.danger,
  .study-summary-primary-action.warm,
  .study-summary-primary-action.weak,
  .study-summary-primary-action.strong {
    min-height: 118px !important;
    border-radius: 24px !important;
  }

  .study-summary-hero-metrics {
    border-radius: 26px !important;
  }

  .study-summary-hero-metric,
  .study-summary-hero-metric.strong,
  .study-summary-hero-metric.warm,
  .study-summary-hero-metric.danger {
    border-radius: 20px !important;
  }
}

/* Review queue readability pass: keep the glass look, but make the study copy usable. */
.study-summary-review {
  gap: 20px !important;
  font-size: 16px !important;
}

.study-summary-review .study-time-label,
.study-summary-review .study-summary-section-head span,
.study-summary-review .review-session-head span,
.study-summary-review .review-set-head span,
.study-summary-review .review-today-head span {
  color: #3d5167 !important;
  font-size: 0.9rem !important;
  line-height: 1.35 !important;
  font-weight: 780 !important;
}

.study-summary-review .study-summary-section-head strong,
.study-summary-review .review-session-head strong,
.study-summary-review .review-set-head strong {
  color: #071226 !important;
  font-size: clamp(1.28rem, 1.15vw, 1.55rem) !important;
  line-height: 1.14 !important;
  font-weight: 840 !important;
}

.study-summary-review .study-summary-section-head small,
.study-summary-review .review-session-head small,
.study-summary-review .review-set-head small {
  color: #40566c !important;
  font-size: 0.98rem !important;
  line-height: 1.45 !important;
  font-weight: 760 !important;
}

.study-summary-panel .review-today-target-panel,
.study-summary-panel .review-session-planner,
.study-summary-panel .review-curriculum-list {
  padding: 18px !important;
}

.study-summary-panel .review-today-target-panel {
  gap: 16px !important;
}

.review-today-head {
  gap: 14px !important;
}

.review-today-head strong {
  font-size: clamp(1.7rem, 2vw, 2.15rem) !important;
  line-height: 1 !important;
  font-weight: 880 !important;
}

.review-today-head small {
  max-width: 46em !important;
  color: #3b5068 !important;
  font-size: 1rem !important;
  line-height: 1.5 !important;
  font-weight: 720 !important;
}

.review-today-meter {
  gap: 12px !important;
}

.review-today-meter b {
  min-width: 52px !important;
  color: #071226 !important;
  font-size: 1.05rem !important;
  line-height: 1 !important;
}

.review-today-row {
  grid-template-columns: minmax(88px, 0.72fr) minmax(0, 1.7fr) minmax(58px, auto) !important;
  min-height: 78px !important;
  padding: 15px 16px !important;
  gap: 12px !important;
}

.review-today-row span,
.review-today-row small {
  color: #364a60 !important;
  font-size: 0.96rem !important;
  line-height: 1.35 !important;
  font-weight: 730 !important;
  overflow: visible !important;
  text-overflow: clip !important;
  white-space: normal !important;
}

.review-today-row strong {
  color: #071226 !important;
  font-size: 1.28rem !important;
  line-height: 1.05 !important;
  font-weight: 870 !important;
}

.review-today-foot {
  gap: 14px !important;
  padding-top: 4px !important;
}

.review-today-foot span {
  color: #3e5268 !important;
  font-size: 0.95rem !important;
  line-height: 1.35 !important;
  font-weight: 760 !important;
}

.review-session-head {
  gap: 14px !important;
}

.review-mission-board {
  gap: 12px !important;
  grid-template-columns: repeat(2, minmax(0, 1fr)) !important;
}

.review-mission-button {
  min-height: 94px !important;
  padding: 15px 16px !important;
  gap: 10px !important;
}

.review-mission-button span {
  color: #4b6075 !important;
  font-size: 0.92rem !important;
  line-height: 1.25 !important;
  font-weight: 780 !important;
}

.review-mission-button strong {
  color: #071226 !important;
  font-size: 1.22rem !important;
  line-height: 1.15 !important;
  font-weight: 850 !important;
}

.review-mission-button small {
  color: #3f546a !important;
  font-size: 0.94rem !important;
  line-height: 1.4 !important;
  font-weight: 700 !important;
}

.review-mission-button span,
.review-mission-button strong,
.review-mission-button small {
  overflow: visible !important;
  text-overflow: clip !important;
  white-space: normal !important;
}

.review-set-preview {
  padding: 18px !important;
  gap: 16px !important;
}

.review-set-stats {
  gap: 12px !important;
  grid-template-columns: repeat(2, minmax(0, 1fr)) !important;
}

.review-set-stats div {
  min-height: 68px !important;
  padding: 12px 14px !important;
}

.review-set-stats span,
.review-set-focus span {
  color: #3f546a !important;
  font-size: 0.92rem !important;
  line-height: 1.3 !important;
  font-weight: 760 !important;
}

.review-set-stats strong {
  color: #071226 !important;
  font-size: 1.25rem !important;
  line-height: 1.05 !important;
  font-weight: 880 !important;
}

.review-set-focus {
  gap: 9px !important;
}

.review-set-focus b {
  color: #071226 !important;
  font-size: 0.98rem !important;
  font-weight: 850 !important;
}

.review-set-stats span,
.review-set-stats strong,
.review-set-focus span {
  overflow: visible !important;
  text-overflow: clip !important;
  white-space: normal !important;
}

.review-set-start,
.review-session-chip {
  min-height: 54px !important;
  padding: 0 16px !important;
  font-size: 1rem !important;
  line-height: 1.1 !important;
  font-weight: 820 !important;
}

.study-summary-panel .review-dial-filter-row small,
.study-summary-panel .review-session-filter-row small {
  color: #3c5167 !important;
  font-size: 0.92rem !important;
  font-weight: 720 !important;
}

.review-set-preview p,
.review-session-planner > p {
  color: #3c5167 !important;
  font-size: 0.98rem !important;
  line-height: 1.55 !important;
  font-weight: 710 !important;
}

.review-curriculum-list {
  gap: 14px !important;
}

.review-curriculum-row {
  grid-template-columns: minmax(0, 1fr) minmax(68px, auto) !important;
  min-height: 98px !important;
  padding: 16px !important;
  gap: 14px !important;
}

.review-curriculum-main {
  gap: 9px !important;
}

.review-curriculum-main strong {
  color: #071226 !important;
  font-size: 1.25rem !important;
  line-height: 1.2 !important;
  font-weight: 850 !important;
}

.review-curriculum-meta {
  gap: 9px 14px !important;
}

.review-curriculum-meta span,
.review-curriculum-main small {
  color: #3e5268 !important;
  font-size: 0.94rem !important;
  line-height: 1.38 !important;
  font-weight: 730 !important;
  overflow: visible !important;
  text-overflow: clip !important;
  white-space: normal !important;
}

.review-curriculum-meta b {
  color: #071226 !important;
  font-size: 1rem !important;
  font-weight: 850 !important;
}

.review-curriculum-start {
  min-width: 68px !important;
  min-height: 56px !important;
  padding: 0 14px !important;
  font-size: 1rem !important;
  font-weight: 840 !important;
}

@media (max-width: 1320px) {
  .study-summary-layout {
    grid-template-columns: 1fr !important;
  }

  .study-summary-hero-copy strong {
    max-width: 10em !important;
    font-size: clamp(2.3rem, 5.6vw, 3.6rem) !important;
    line-height: 1.08 !important;
  }

  .study-summary-review {
    max-width: none !important;
  }
}

@media (max-width: 1180px) {
  .study-summary-review {
    font-size: 15.5px !important;
  }
}

@media (max-width: 760px) {
  .study-summary-review {
    gap: 14px !important;
    font-size: 15px !important;
  }

  .study-summary-panel .review-today-target-panel,
  .study-summary-panel .review-session-planner,
  .study-summary-panel .review-curriculum-list {
    padding: 14px !important;
  }

  .review-today-row {
    grid-template-columns: minmax(0, 1fr) minmax(54px, auto) !important;
    min-height: 86px !important;
  }

  .review-today-row span {
    grid-column: 1 / -1 !important;
  }

  .review-mission-board,
  .review-set-stats {
    grid-template-columns: 1fr !important;
  }

  .review-curriculum-row {
    grid-template-columns: 1fr !important;
  }

  .review-curriculum-start {
    justify-self: stretch !important;
  }
}

/* Restore the forgetting curve as a first-class review surface. */
.study-summary-panel .review-curve-summary {
  display: grid !important;
  gap: 16px !important;
  order: 1 !important;
  border: 1px solid rgba(255, 255, 255, 0.70) !important;
  border-radius: 26px !important;
  background:
    radial-gradient(circle at 12% 0%, rgba(0, 122, 255, 0.14), transparent 34%),
    linear-gradient(145deg, rgba(255, 255, 255, 0.78), rgba(255, 255, 255, 0.50)) !important;
  padding: 18px !important;
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.92),
    inset 0 -1px 0 rgba(255, 255, 255, 0.22),
    0 28px 70px rgba(29, 70, 106, 0.14) !important;
  backdrop-filter: blur(34px) saturate(1.54) !important;
}

.study-summary-panel .review-today-target-panel {
  order: 2 !important;
}

.study-summary-panel .review-session-planner {
  order: 3 !important;
}

.study-summary-panel .review-curriculum-list {
  order: 4 !important;
}

.review-curve-headline {
  gap: 6px !important;
}

.review-curve-headline > span:first-child {
  color: #0a74d5 !important;
  font-size: 0.84rem !important;
  line-height: 1.3 !important;
  font-weight: 820 !important;
}

.review-curve-headline strong {
  color: #071226 !important;
  font-size: clamp(1.55rem, 1.7vw, 2.05rem) !important;
  line-height: 1.08 !important;
  font-weight: 860 !important;
}

.review-curve-headline em {
  color: #071226 !important;
  font-size: 1.05rem !important;
  line-height: 1.35 !important;
  font-style: normal !important;
  font-weight: 790 !important;
}

.review-curve-headline span,
.review-curve-plot p,
.review-curve-warning {
  color: #3d5167 !important;
  font-size: 0.95rem !important;
  line-height: 1.45 !important;
  font-weight: 720 !important;
}

.review-course-filter,
.review-upcoming-schedule {
  border: 1px solid rgba(255, 255, 255, 0.68) !important;
  border-radius: 20px !important;
  background: rgba(255, 255, 255, 0.60) !important;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.82), 0 10px 26px rgba(42, 82, 112, 0.08) !important;
}

.review-course-filter-head,
.review-upcoming-head span,
.review-upcoming-head small {
  color: #3d5167 !important;
  font-size: 0.88rem !important;
  line-height: 1.35 !important;
  font-weight: 760 !important;
}

.review-course-filter-head strong,
.review-upcoming-head strong {
  color: #071226 !important;
  font-size: 1.05rem !important;
  line-height: 1.2 !important;
  font-weight: 850 !important;
}

.review-course-chip {
  min-height: 38px !important;
  border-color: rgba(0, 122, 255, 0.20) !important;
  background: rgba(255, 255, 255, 0.58) !important;
  color: #30485f !important;
  font-size: 0.9rem !important;
  line-height: 1.2 !important;
  font-weight: 770 !important;
}

.review-course-chip.active {
  border-color: rgba(0, 122, 255, 0.48) !important;
  background: linear-gradient(145deg, #007aff, #5ac8fa) !important;
  color: #ffffff !important;
}

.review-course-filter small {
  color: #40566c !important;
  font-size: 0.9rem !important;
  line-height: 1.45 !important;
}

.review-curve-stats {
  grid-template-columns: repeat(3, minmax(0, 1fr)) !important;
  gap: 10px !important;
}

.review-curve-stats > div {
  min-height: 64px !important;
  border: 1px solid rgba(255, 255, 255, 0.68) !important;
  border-radius: 18px !important;
  background: rgba(255, 255, 255, 0.58) !important;
  padding: 12px !important;
}

.review-curve-stats span,
.review-curve-stats strong {
  overflow: visible !important;
  text-overflow: clip !important;
  white-space: normal !important;
}

.review-curve-stats span {
  color: #3f546a !important;
  font-size: 0.88rem !important;
  line-height: 1.25 !important;
  font-weight: 760 !important;
}

.review-curve-stats strong {
  color: #071226 !important;
  font-size: 1.28rem !important;
  line-height: 1.05 !important;
  font-weight: 880 !important;
}

.review-upcoming-grid {
  grid-template-columns: repeat(15, minmax(38px, 1fr)) !important;
  gap: 7px !important;
  overflow-x: auto !important;
  padding-bottom: 2px !important;
}

.review-upcoming-day {
  min-height: 116px !important;
  border-color: rgba(0, 122, 255, 0.12) !important;
  background: rgba(255, 255, 255, 0.48) !important;
}

.review-upcoming-day span,
.review-upcoming-day small {
  color: #40566c !important;
  font-size: 0.78rem !important;
  line-height: 1.2 !important;
  font-weight: 760 !important;
}

.review-upcoming-day strong {
  color: #071226 !important;
  font-size: 0.98rem !important;
}

.review-curve-plot {
  overflow: hidden !important;
  border: 1px solid rgba(255, 255, 255, 0.68) !important;
  border-radius: 20px !important;
  background: rgba(255, 255, 255, 0.56) !important;
  padding: 12px !important;
}

.review-forgetting-curve {
  display: block !important;
  width: 100% !important;
  height: auto !important;
  min-height: 210px !important;
}

.review-forgetting-curve text {
  fill: #40566c !important;
  font-weight: 760 !important;
}

.review-curve-line {
  stroke-width: 3.8 !important;
}

.review-curve-axis,
.review-curve-marker line,
.review-curve-tick line,
.review-curve-bubble line,
.review-curve-threshold {
  stroke: rgba(64, 86, 108, 0.28) !important;
}

.review-curve-risk-zone {
  fill: rgba(255, 45, 85, 0.08) !important;
}

.review-curve-legend {
  flex-wrap: wrap !important;
  gap: 8px 12px !important;
}

.review-curve-legend span {
  color: #30485f !important;
  font-size: 0.88rem !important;
  line-height: 1.2 !important;
  font-weight: 770 !important;
}

@media (max-width: 760px) {
  .study-summary-panel .review-curve-summary {
    padding: 14px !important;
    border-radius: 22px !important;
  }

  .review-curve-stats {
    grid-template-columns: repeat(2, minmax(0, 1fr)) !important;
  }

  .review-forgetting-curve {
    min-height: 180px !important;
  }
}

/* Summary UX reset: one reading path, larger type, fewer competing panels. */
.study-summary-panel {
  --summary-readable-ink: #071226;
  --summary-readable-muted: #2f435a;
  --summary-readable-soft: rgba(255, 255, 255, 0.72);
  --summary-readable-line: rgba(114, 139, 168, 0.24);
  font-size: 17px !important;
}

.study-summary-card {
  background:
    radial-gradient(circle at 18% 8%, rgba(255, 255, 255, 0.9), transparent 30%),
    radial-gradient(circle at 86% 4%, rgba(255, 221, 75, 0.28), transparent 26%),
    radial-gradient(circle at 44% 108%, rgba(90, 200, 250, 0.22), transparent 34%),
    linear-gradient(180deg, #f7fbff 0%, #eaf6ff 46%, #f5fbff 100%) !important;
}

.study-summary-card::before {
  opacity: 0.18 !important;
  filter: blur(30px) saturate(1.08) brightness(1.2) !important;
}

.study-summary-bar {
  grid-template-columns: minmax(180px, 0.34fr) minmax(0, 1fr) 52px !important;
  min-height: 98px !important;
  padding: 18px clamp(18px, 2vw, 34px) !important;
}

.study-summary-title .study-time-label,
.study-summary-bar-stat span,
.study-summary-bar-stat small {
  font-size: 0.86rem !important;
  line-height: 1.25 !important;
}

.study-summary-title strong {
  font-size: 1.55rem !important;
  line-height: 1.05 !important;
}

.study-summary-bar-stats {
  grid-template-columns: repeat(5, minmax(150px, 1fr)) !important;
  gap: 12px !important;
}

.study-summary-bar-stat,
.study-summary-bar-stat.strong,
.study-summary-bar-stat.clear,
.study-summary-bar-stat.warm,
.study-summary-bar-stat.neutral,
.study-summary-bar-stat.danger,
.study-summary-bar-stat.idle {
  min-height: 66px !important;
  border-radius: 18px !important;
  padding: 10px 14px !important;
}

.study-summary-bar-stat strong {
  font-size: 1.32rem !important;
  line-height: 1 !important;
}

.study-summary-jumpbar {
  min-height: 58px !important;
  margin: 14px auto 0 !important;
}

.study-summary-jumpbar button {
  min-height: 42px !important;
  padding: 0 18px !important;
  font-size: 0.98rem !important;
}

.study-summary-layout {
  display: grid !important;
  grid-template-columns: minmax(0, 1fr) !important;
  width: min(100%, 1540px) !important;
  max-width: 1540px !important;
  margin: 0 auto !important;
  gap: 28px !important;
  padding: clamp(18px, 2.2vw, 34px) !important;
  overflow-y: auto !important;
}

.executive-study-report,
.study-summary-review {
  width: 100% !important;
  max-width: none !important;
}

.executive-study-report {
  grid-template-columns: repeat(12, minmax(0, 1fr)) !important;
  gap: 22px !important;
}

.study-summary-panel .study-summary-hero {
  grid-column: 1 / -1 !important;
}

.study-summary-hero-card {
  grid-template-columns: minmax(0, 1fr) !important;
  grid-template-areas:
    "head"
    "brief"
    "metrics"
    "actions" !important;
  gap: 26px !important;
  min-height: 0 !important;
  padding: clamp(34px, 4vw, 58px) !important;
  border-radius: 30px !important;
}

.study-summary-hero-main {
  grid-area: brief !important;
  display: grid !important;
  grid-template-columns: minmax(0, 1fr) !important;
  align-items: stretch !important;
  gap: 26px !important;
  padding: 0 !important;
  border: 0 !important;
}

.study-summary-consulting-head {
  grid-area: head !important;
}

.study-summary-hero-copy strong {
  max-width: none !important;
  font-size: clamp(3.2rem, 4.2vw, 5.2rem) !important;
  line-height: 1.02 !important;
  font-weight: 850 !important;
}

.study-summary-hero-copy p {
  max-width: 42em !important;
  margin-top: 20px !important;
  color: var(--summary-readable-muted) !important;
  font-size: clamp(1.18rem, 1.15vw, 1.42rem) !important;
  line-height: 1.58 !important;
  font-weight: 760 !important;
}

.study-summary-primary-action,
.study-summary-primary-action.danger,
.study-summary-primary-action.warm,
.study-summary-primary-action.weak,
.study-summary-primary-action.strong {
  justify-self: start !important;
  width: min(100%, 560px) !important;
  min-height: 132px !important;
  border-radius: 24px !important;
  padding: 22px !important;
}

.study-summary-primary-action strong {
  font-size: 1.18rem !important;
  line-height: 1.2 !important;
}

.study-summary-primary-action b {
  font-size: clamp(2rem, 2.8vw, 3.2rem) !important;
  line-height: 1 !important;
}

.study-summary-primary-action small {
  font-size: 1rem !important;
  line-height: 1.35 !important;
}

.study-summary-hero-metrics {
  grid-area: metrics !important;
  display: grid !important;
  grid-template-columns: repeat(4, minmax(0, 1fr)) !important;
  gap: 14px !important;
  padding: 0 !important;
  border: 0 !important;
  background: transparent !important;
  box-shadow: none !important;
  backdrop-filter: none !important;
}

.study-summary-hero-metric,
.study-summary-hero-metric.strong,
.study-summary-hero-metric.warm,
.study-summary-hero-metric.danger {
  min-height: 110px !important;
  padding: 18px !important;
}

.study-summary-hero-metric span,
.study-summary-next-action span {
  font-size: 0.92rem !important;
  line-height: 1.25 !important;
}

.study-summary-hero-metric strong {
  font-size: clamp(2rem, 2.2vw, 2.8rem) !important;
  line-height: 1 !important;
}

.study-summary-hero-metric small {
  font-size: 0.98rem !important;
  line-height: 1.35 !important;
}

.study-summary-next-actions {
  grid-area: actions !important;
  display: grid !important;
  grid-template-columns: repeat(3, minmax(0, 1fr)) !important;
  gap: 14px !important;
  border: 0 !important;
  padding: 0 !important;
}

.study-summary-next-action,
.study-summary-next-action.danger,
.study-summary-next-action.warm,
.study-summary-next-action.weak,
.study-summary-next-action.strong,
.study-summary-next-empty {
  min-height: 112px !important;
  padding: 18px !important;
}

.study-summary-next-action strong,
.study-summary-next-empty {
  font-size: 1.16rem !important;
  line-height: 1.25 !important;
}

.study-summary-next-action b {
  font-size: 1.55rem !important;
  line-height: 1 !important;
}

.study-summary-next-action small {
  font-size: 0.98rem !important;
  line-height: 1.35 !important;
}

.study-summary-panel .study-report-summary,
.study-summary-panel .study-effort {
  grid-column: span 6 !important;
  min-height: 132px !important;
  border-radius: 24px !important;
  padding: 22px !important;
}

.study-summary-panel .study-report-summary span,
.study-summary-panel .study-effort-head span,
.study-summary-panel .study-effort small {
  font-size: 1rem !important;
  line-height: 1.4 !important;
}

.study-summary-panel .study-report-summary strong,
.study-summary-panel .study-effort-head strong {
  font-size: clamp(2.1rem, 2.6vw, 3.2rem) !important;
  line-height: 1 !important;
}

.study-summary-panel .study-efficiency-panel,
.study-summary-panel .study-checkpoint-panel,
.study-summary-panel .study-route-panel,
.study-summary-panel .review-dial-panel,
.study-summary-panel .review-sprint-panel,
.study-summary-panel .review-focus-panel {
  display: none !important;
}

.study-summary-review {
  display: grid !important;
  grid-template-columns: minmax(0, 1fr) !important;
  gap: 22px !important;
  overflow: visible !important;
  font-size: 18px !important;
}

.study-summary-section-head,
.study-summary-panel .review-curve-summary,
.study-summary-panel .review-today-target-panel,
.study-summary-panel .review-session-planner,
.study-summary-panel .review-curriculum-list,
.study-summary-panel .study-backup-actions {
  border-radius: 26px !important;
  padding: clamp(22px, 2vw, 32px) !important;
}

.study-summary-section-head {
  min-height: auto !important;
}

.study-summary-section-head span,
.review-curve-headline > span:first-child,
.study-summary-review .review-session-head span,
.study-summary-review .review-set-head span,
.study-summary-review .review-today-head span {
  font-size: 1rem !important;
  line-height: 1.35 !important;
}

.study-summary-section-head strong,
.review-curve-headline strong,
.study-summary-review .review-session-head strong,
.study-summary-review .review-set-head strong,
.study-summary-review .review-today-head strong {
  font-size: clamp(1.8rem, 2vw, 2.45rem) !important;
  line-height: 1.1 !important;
}

.study-summary-review .review-session-head small,
.study-summary-review .review-set-head small,
.study-summary-review .review-today-head small,
.review-curve-headline em,
.review-curve-headline span,
.review-curve-plot p,
.review-curve-warning {
  max-width: none !important;
  font-size: 1.05rem !important;
  line-height: 1.55 !important;
}

.review-today-head,
.review-session-head,
.review-set-head {
  display: flex !important;
  align-items: flex-start !important;
  justify-content: space-between !important;
  gap: 24px !important;
}

.review-mission-board,
.review-session-controls,
.review-session-controls.options,
.review-dial-settings {
  display: grid !important;
  grid-template-columns: repeat(4, minmax(0, 1fr)) !important;
  gap: 12px !important;
}

.review-session-chip,
.review-session-chip-condition,
.review-mission-button,
.review-today-row,
.review-curriculum-row {
  min-height: 78px !important;
  padding: 16px 18px !important;
  font-size: 1.1rem !important;
}

.review-session-chip {
  display: grid !important;
  place-items: center !important;
}

.review-session-chip-condition {
  min-width: 0 !important;
}

.review-mission-button span,
.review-session-chip,
.review-today-row span,
.review-curriculum-meta span,
.review-curriculum-main small,
.review-set-stats span,
.review-set-focus span {
  font-size: 1rem !important;
  line-height: 1.35 !important;
}

.review-mission-button strong,
.review-today-row strong,
.review-curriculum-main strong,
.review-set-stats strong {
  font-size: 1.45rem !important;
  line-height: 1.12 !important;
}

.review-mission-button small,
.review-set-preview p,
.review-session-planner > p,
.review-today-foot span,
.review-course-filter small,
.review-curve-legend span {
  font-size: 1.02rem !important;
  line-height: 1.5 !important;
}

.review-set-stats,
.review-curve-stats {
  grid-template-columns: repeat(4, minmax(0, 1fr)) !important;
  gap: 14px !important;
}

.review-set-stats div,
.review-curve-stats > div {
  min-height: 90px !important;
  padding: 18px !important;
}

.review-curriculum-list {
  max-height: none !important;
  min-height: 0 !important;
}

.review-curriculum-row {
  grid-template-columns: minmax(0, 1fr) minmax(88px, auto) !important;
}

.review-curriculum-start,
.review-set-start,
.study-summary-panel .study-backup-button,
.study-summary-panel .study-sync-status {
  min-height: 58px !important;
  font-size: 1.08rem !important;
}

.study-summary-panel .study-backup-actions {
  grid-template-columns: repeat(4, minmax(0, 1fr)) !important;
  gap: 12px !important;
  margin-top: 0 !important;
}

@media (max-width: 980px) {
  .study-summary-panel {
    font-size: 16px !important;
  }

  .study-summary-bar {
    grid-template-columns: minmax(0, 1fr) 44px !important;
    min-height: 84px !important;
  }

  .study-summary-bar-stats {
    display: none !important;
  }

  .study-summary-jumpbar {
    display: none !important;
  }

  .study-summary-layout {
    gap: 18px !important;
    padding: 14px !important;
  }

  .study-summary-hero-main,
  .study-summary-hero-metrics,
  .study-summary-next-actions,
  .review-mission-board,
  .review-session-controls,
  .review-session-controls.options,
  .review-dial-settings,
  .review-set-stats,
  .review-curve-stats,
  .study-summary-panel .study-backup-actions {
    grid-template-columns: 1fr !important;
  }

  .study-summary-panel .study-report-summary,
  .study-summary-panel .study-effort {
    grid-column: 1 / -1 !important;
  }

  .study-summary-hero-copy strong {
    font-size: clamp(2rem, 7.4vw, 2.4rem) !important;
    line-height: 1.08 !important;
    word-break: keep-all !important;
    overflow-wrap: normal !important;
  }

  .study-summary-hero-card {
    gap: 18px !important;
    padding: 22px 18px !important;
    border-radius: 24px !important;
  }

  .study-summary-hero-copy p {
    max-width: 100% !important;
    font-size: 1.02rem !important;
    line-height: 1.55 !important;
    overflow-wrap: anywhere !important;
  }

  .study-summary-hero-metrics,
  .review-set-stats,
  .review-curve-stats {
    grid-template-columns: repeat(2, minmax(0, 1fr)) !important;
  }

  .study-summary-hero-metric,
  .study-summary-next-action,
  .study-summary-next-action.danger,
  .study-summary-next-action.warm,
  .study-summary-next-action.weak,
  .study-summary-next-action.strong,
  .study-summary-next-empty {
    min-height: 88px !important;
    padding: 14px !important;
  }

  .study-summary-primary-action,
  .study-summary-primary-action.danger,
  .study-summary-primary-action.warm,
  .study-summary-primary-action.weak,
  .study-summary-primary-action.strong {
    display: grid !important;
    grid-template-columns: 56px minmax(0, 1fr) minmax(58px, auto) !important;
    align-items: center !important;
    gap: 8px 12px !important;
    width: 100% !important;
    min-height: 104px !important;
    padding: 16px !important;
  }

  .study-summary-primary-action span {
    grid-row: 1 / 3 !important;
    width: 56px !important;
    height: 56px !important;
    font-size: 0.72rem !important;
  }

  .study-summary-primary-action strong,
  .study-summary-primary-action b,
  .study-summary-primary-action small {
    min-width: 0 !important;
  }

  .study-summary-primary-action strong {
    font-size: 1.12rem !important;
    line-height: 1.18 !important;
    overflow-wrap: anywhere !important;
  }

  .study-summary-primary-action b {
    justify-self: center !important;
    font-size: 1.85rem !important;
    white-space: nowrap !important;
  }

  .study-summary-primary-action small {
    grid-column: 2 / 4 !important;
    font-size: 0.92rem !important;
    line-height: 1.28 !important;
    overflow-wrap: anywhere !important;
  }

  .review-today-head,
  .review-session-head,
  .review-set-head {
    display: grid !important;
  }
}

/* Compact course picker: keep the growing subject list scannable. */
.completed-course-panel {
  display: grid;
  gap: 7px;
  margin-bottom: 7px;
}

.completed-course-toggle {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr) auto auto;
  align-items: center;
  gap: 8px;
  min-height: 36px;
  border: 1px solid rgba(117, 200, 255, 0.28);
  border-radius: 7px;
  background: linear-gradient(135deg, rgba(27, 57, 83, 0.78), rgba(31, 37, 69, 0.76));
  padding: 6px 9px;
  color: rgba(236, 247, 255, 0.88);
  cursor: pointer;
}

.completed-course-toggle:hover,
.completed-course-toggle:focus-visible,
.completed-course-toggle.active {
  border-color: rgba(125, 211, 252, 0.72);
  background: linear-gradient(135deg, rgba(28, 92, 118, 0.86), rgba(66, 48, 108, 0.82));
  color: #fff;
  outline: none;
  box-shadow: inset 0 1px rgba(255, 255, 255, 0.12), 0 0 16px rgba(72, 210, 237, 0.16);
}

.completed-course-toggle > svg {
  display: block !important;
  flex: 0 0 16px !important;
  width: 16px !important;
  min-width: 16px !important;
  max-width: 16px !important;
  height: 16px !important;
  min-height: 16px !important;
  max-height: 16px !important;
}

.completed-course-toggle span {
  min-width: 0;
  font-size: 0.78rem;
  font-weight: 900;
  text-align: left;
}

.completed-course-toggle small {
  display: grid;
  place-items: center;
  min-width: 24px;
  height: 22px;
  border-radius: 999px;
  background: rgba(125, 211, 252, 0.14);
  color: #bcecff;
  font-size: 0.68rem;
  font-weight: 950;
}

.completed-course-chevron {
  transition: transform 160ms ease;
}

.completed-course-toggle.active .completed-course-chevron {
  transform: rotate(180deg);
}

.completed-course-switch {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 7px;
}

.completed-course-switch[hidden],
.completed-course-tab[hidden] {
  display: none !important;
}

.course-switch {
  display: grid !important;
  grid-template-columns: repeat(3, minmax(0, 1fr)) !important;
  gap: 7px !important;
  margin-bottom: 12px !important;
}

.course-tab {
  display: grid !important;
  place-items: center !important;
  min-width: 0 !important;
  min-height: 40px !important;
  padding: 6px 7px !important;
  border-radius: 7px !important;
  font-size: clamp(0.76rem, 0.62vw, 0.9rem) !important;
  line-height: 1.14 !important;
  letter-spacing: 0 !important;
  text-align: center !important;
  white-space: normal !important;
  overflow-wrap: anywhere !important;
}

.course-tab.active {
  box-shadow:
    inset 0 0 0 1px rgba(255, 255, 255, 0.28),
    0 0 0 2px rgba(255, 241, 168, 0.18) !important;
}

@media (min-width: 1181px) and (max-height: 1180px) {
  .course-switch {
    gap: 6px !important;
    margin-bottom: 10px !important;
  }

  .course-tab {
    min-height: 36px !important;
    padding: 5px 6px !important;
    font-size: 0.76rem !important;
  }
}

@media (max-width: 720px) {
  .course-switch {
    gap: 5px !important;
    margin-bottom: 8px !important;
  }

  .course-tab {
    min-height: 34px !important;
    padding: 5px !important;
    font-size: 0.7rem !important;
  }
}

@media (max-width: 980px) {
  .option-graph-panel.open {
    width: calc(100vw - 24px);
  }

  .option-graph-toolbar {
    align-items: stretch;
    flex-direction: column;
  }

  .option-graph-window-actions {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    width: 100%;
  }

  .option-graph-toggle,
  .option-graph-theme-toggle {
    justify-content: center;
    width: 100%;
  }

  .option-graph-mount {
    height: min(620px, calc(100dvh - 142px));
    min-height: 0;
  }

  .graphing-calculator-shell {
    height: 100%;
    min-height: 0;
    grid-template-columns: 1fr;
    grid-template-rows: minmax(190px, auto) minmax(360px, 1fr);
  }

  .graphing-expression-panel {
    border-right: 0;
    border-bottom: 1px solid #d7e1ef;
  }

  .graphing-expression-list {
    max-height: 240px;
  }

  .graphing-expression-row {
    grid-template-columns: 22px 22px minmax(0, 1fr) 28px;
  }

  .graphing-expression-field {
    grid-column: 3;
    grid-row: 1;
  }

  .graphing-expression-actions {
    grid-column: 3 / 5;
    grid-row: 2;
    flex-wrap: wrap;
  }

  .graphing-expression-row > button[data-graphing-action="delete"] {
    grid-column: 4;
    grid-row: 1;
  }

  .graphing-expression-row small {
    grid-column: 3 / 5;
    grid-row: 3;
  }

  .graphing-canvas {
    min-height: 0;
  }

  .chapter-resources {
    grid-template-columns: repeat(2, minmax(0, 1fr)) !important;
  }

  .chapter-resource-card {
    min-height: 58px !important;
  }

  .quiz-panel.workbook-layout,
  .quiz-panel.workbook-layout.source-layout {
    min-height: auto !important;
  }

  .quiz-panel.workbook-layout:not(.review-layout) .question-board {
    grid-template-rows: auto auto minmax(0, auto) !important;
  }

  .quiz-panel.workbook-layout:not(.review-layout) .question-text.html-question {
    min-height: auto !important;
    max-height: none !important;
    overflow: visible !important;
  }

  .quiz-panel.workbook-layout .options {
    grid-template-columns: 1fr !important;
  }

  .quiz-panel.workbook-layout .option-button {
    min-height: 64px !important;
  }

  .workbook-image-card {
    overflow: visible !important;
  }

  .question-text.html-question img.workbook-image,
  .feedback-body img.workbook-image {
    width: 100% !important;
    max-width: 100% !important;
  }
}

/* Workbook pages must stay readable after every later mobile/source-layout lock. */
.quiz-panel.workbook-layout.source-layout .question-text.html-question img.workbook-image,
.quiz-panel.workbook-layout.source-layout .feedback-body img.workbook-image,
.question-text.html-question img.workbook-image,
.feedback-body img.workbook-image {
  width: 100% !important;
  max-width: 100% !important;
  max-height: none !important;
  object-fit: contain !important;
}

@media (min-width: 981px) {
  .quiz-panel.workbook-layout .workbook-image-card {
    place-items: start center !important;
  }

  .quiz-panel.workbook-layout.source-layout .question-text.html-question img.workbook-image,
  .quiz-panel.workbook-layout.source-layout .feedback-body img.workbook-image,
  .quiz-panel.workbook-layout .question-text.html-question img.workbook-image,
  .quiz-panel.workbook-layout .feedback-body img.workbook-image {
    width: 100% !important;
    max-width: 100% !important;
    max-height: none !important;
  }
}

.quiz-panel.workbook-layout .workbook-image-card {
  max-height: clamp(520px, 72vh, 920px) !important;
  overflow-x: hidden !important;
  overflow-y: auto !important;
  overscroll-behavior: contain !important;
  scrollbar-width: thin !important;
  scrollbar-color: color-mix(in srgb, var(--active) 64%, #fff8e8) rgba(2, 14, 18, 0.24) !important;
}

.quiz-panel.workbook-layout .workbook-image-card::-webkit-scrollbar {
  width: 13px !important;
}

.quiz-panel.workbook-layout .workbook-image-card::-webkit-scrollbar-track {
  border-radius: 999px !important;
  background: rgba(2, 14, 18, 0.24) !important;
}

.quiz-panel.workbook-layout .workbook-image-card::-webkit-scrollbar-thumb {
  border: 3px solid rgba(2, 14, 18, 0.24) !important;
  border-radius: 999px !important;
  background: color-mix(in srgb, var(--active) 64%, #fff8e8) !important;
}

@media (max-width: 980px) {
  .quiz-panel.workbook-layout .workbook-image-card {
    max-height: 72vh !important;
  }
}

.main:has(.quiz-panel.workbook-layout),
.quiz-panel.workbook-layout,
.quiz-panel.workbook-layout.source-layout {
  max-height: none !important;
  overflow: visible !important;
}

.quiz-panel.workbook-layout {
  height: auto !important;
  align-content: start !important;
}

.quiz-panel.workbook-layout .question-board,
.quiz-panel.workbook-layout .answer-dock,
.quiz-panel.workbook-layout .feedback:not(.hidden) {
  max-height: none !important;
}

.quiz-panel.workbook-layout .question-text.html-question,
.quiz-panel.workbook-layout .feedback-body,
.quiz-panel.workbook-layout .workbook-page,
.quiz-panel.workbook-layout .workbook-answer {
  min-width: 0 !important;
  max-height: none !important;
  overflow: visible !important;
}

/* Source-course answers should use the empty page space before creating an inner feedback scrollbar. */
.main:has(.quiz-panel.source-layout.review-layout) {
  overflow-y: auto !important;
}

.playfield:has(> .quiz-panel.source-layout.review-layout) {
  height: auto !important;
  min-height: 100% !important;
  max-height: none !important;
  align-items: start !important;
  overflow: visible !important;
}

.playfield > .quiz-panel.source-layout.review-layout {
  display: flex !important;
  flex-direction: column !important;
  align-items: stretch !important;
  height: auto !important;
  min-height: var(--source-panel-height, 100%) !important;
  max-height: none !important;
  overflow: visible !important;
}

.quiz-panel.source-layout.review-layout .question-board,
.quiz-panel.source-layout.review-layout .answer-dock,
.quiz-panel.source-layout.review-layout .feedback:not(.hidden) {
  flex: 0 0 auto !important;
  height: auto !important;
  max-height: none !important;
}

.quiz-panel.source-layout.review-layout .feedback:not(.hidden) {
  min-height: 0 !important;
  overflow-x: hidden !important;
  overflow-y: visible !important;
  overscroll-behavior: auto !important;
  scrollbar-gutter: auto !important;
  padding-right: 18px !important;
}

.quiz-panel.source-layout.review-layout .feedback-body {
  max-height: none !important;
  overflow-x: auto !important;
  overflow-y: visible !important;
}

.quiz-panel.source-layout.review-layout .feedback:not(.hidden)::before,
.quiz-panel.source-layout.review-layout .feedback:not(.hidden)::after {
  display: none !important;
}

.quiz-panel.workbook-layout .workbook-image-card,
.quiz-panel.workbook-layout .workbook-answer-preview .workbook-image-card {
  max-height: clamp(520px, 72vh, 920px) !important;
  overflow-x: hidden !important;
  overflow-y: auto !important;
  overscroll-behavior: contain !important;
  -webkit-overflow-scrolling: touch !important;
  touch-action: pan-y !important;
  scrollbar-gutter: stable !important;
}

@media (max-width: 980px) {
  .quiz-panel.workbook-layout .workbook-image-card,
  .quiz-panel.workbook-layout .workbook-answer-preview .workbook-image-card {
    max-height: 72vh !important;
  }
}

.quiz-panel.workbook-layout .options {
  grid-template-columns: repeat(3, minmax(0, 1fr)) !important;
  gap: clamp(8px, 0.8vw, 14px) !important;
}

.quiz-panel.workbook-layout .option-button {
  display: grid !important;
  grid-template-columns: minmax(0, 1fr) !important;
  place-items: center !important;
  min-height: clamp(54px, 5.4vh, 76px) !important;
  padding: clamp(10px, 1vw, 16px) clamp(14px, 1.3vw, 22px) !important;
  text-align: center !important;
  border-radius: 8px !important;
}

.quiz-panel.workbook-layout .option-button::before,
.quiz-panel.workbook-layout .option-button::after {
  content: none !important;
}

.quiz-panel.workbook-layout .option-content {
  display: block !important;
  width: 100% !important;
  min-width: 0 !important;
  overflow: visible !important;
  color: inherit !important;
  font-size: clamp(1.12rem, 1.35vw, 1.45rem) !important;
  font-weight: 950 !important;
  line-height: 1.2 !important;
  white-space: normal !important;
}

.quiz-panel.workbook-layout .option-letter {
  display: none !important;
}

@media (max-width: 980px) {
  .quiz-panel.workbook-layout .options {
    grid-template-columns: 1fr !important;
  }

  .quiz-panel.workbook-layout .option-button {
    min-height: 58px !important;
  }
}

/* Game HUD refinement: clearer hierarchy, stronger feedback, and a playable rhythm. */
:root {
  --game-cyan: #42e8ff;
  --game-blue: #2487ff;
  --game-violet: #9a63ff;
  --game-pink: #ff4fa3;
  --game-gold: #ffd76a;
  --game-green: #42e6a4;
  --game-red: #ff5e73;
  --game-ink: #07121f;
  --game-panel: rgba(8, 24, 38, 0.92);
  --game-panel-soft: rgba(14, 40, 54, 0.86);
  --game-line: rgba(111, 226, 255, 0.42);
  --game-shadow: 0 18px 44px rgba(1, 8, 20, 0.36);
}

body {
  background:
    linear-gradient(180deg, rgba(7, 14, 29, 0.44), rgba(4, 27, 34, 0.74)),
    var(--academy-bg) center center / cover no-repeat fixed,
    linear-gradient(135deg, #161028 0%, #0a2d42 46%, #10283b 68%, #2a1737 100%);
}

button:focus-visible,
[role="button"]:focus-visible {
  outline: 3px solid color-mix(in srgb, var(--active, var(--game-cyan)) 72%, white);
  outline-offset: 2px;
}

.app-shell,
.main,
.topbar,
.playfield,
.quiz-panel {
  min-width: 0;
}

.sidebar {
  border-right-color: rgba(94, 226, 255, 0.5);
  background:
    linear-gradient(180deg, rgba(24, 19, 50, 0.96), rgba(6, 42, 54, 0.97)),
    var(--academy-bg) 8% top / auto 100% no-repeat;
  box-shadow:
    inset -1px 0 rgba(255, 215, 106, 0.32),
    16px 0 42px rgba(1, 8, 20, 0.28);
}

.brand {
  position: relative;
  min-height: 58px;
  border: 1px solid rgba(97, 225, 255, 0.32);
  border-radius: 8px;
  background:
    linear-gradient(135deg, rgba(72, 54, 150, 0.38), rgba(11, 121, 142, 0.28)),
    rgba(5, 18, 34, 0.7);
  padding: 8px;
  box-shadow:
    inset 0 1px rgba(255, 255, 255, 0.12),
    0 10px 26px rgba(0, 0, 0, 0.2);
}

.brand::after {
  content: "PLAYER HUB";
  position: absolute;
  top: 6px;
  right: 8px;
  color: rgba(156, 238, 255, 0.66);
  font-size: 0.52rem;
  font-weight: 900;
}

.brand-mark {
  width: 44px;
  height: 44px;
  border-color: rgba(255, 229, 134, 0.86);
  background:
    linear-gradient(145deg, rgba(255, 79, 163, 0.92), rgba(122, 67, 255, 0.92) 48%, rgba(24, 161, 217, 0.92));
  box-shadow:
    inset 0 0 0 2px rgba(255, 255, 255, 0.18),
    0 0 20px rgba(125, 115, 255, 0.42);
}

.course-tab {
  position: relative;
  overflow: hidden;
  border-color: rgba(103, 218, 244, 0.25) !important;
  background:
    linear-gradient(145deg, rgba(255, 255, 255, 0.1), rgba(77, 196, 224, 0.04)),
    rgba(7, 20, 36, 0.76) !important;
  color: rgba(244, 251, 255, 0.88) !important;
  box-shadow: inset 0 1px rgba(255, 255, 255, 0.08);
}

.course-tab::after {
  content: "";
  position: absolute;
  inset: auto 8px 0;
  height: 2px;
  background: linear-gradient(90deg, transparent, var(--game-cyan), var(--game-pink), transparent);
  opacity: 0;
  transform: scaleX(0.4);
  transition: opacity 160ms ease, transform 160ms ease;
}

.course-tab:hover {
  border-color: rgba(125, 231, 255, 0.58) !important;
  filter: brightness(1.12);
  transform: translateY(-1px);
}

.course-tab.active {
  border-color: rgba(255, 229, 134, 0.86) !important;
  background:
    linear-gradient(135deg, rgba(74, 225, 255, 0.92), rgba(102, 130, 255, 0.9) 54%, rgba(224, 94, 255, 0.9)) !important;
  color: #06121d !important;
  text-shadow: 0 1px rgba(255, 255, 255, 0.28);
  box-shadow:
    inset 0 1px rgba(255, 255, 255, 0.5),
    0 0 0 1px rgba(255, 215, 106, 0.42),
    0 8px 20px rgba(37, 153, 255, 0.28) !important;
}

.course-tab.active::after {
  opacity: 1;
  transform: scaleX(1);
}

.chapter-category-toggle {
  border-color: rgba(91, 214, 239, 0.32);
  background:
    linear-gradient(90deg, color-mix(in srgb, var(--category-accent) 23%, transparent), transparent 76%),
    rgba(5, 22, 37, 0.86);
  box-shadow: inset 0 1px rgba(255, 255, 255, 0.07);
}

.chapter-button {
  overflow: hidden;
  border-color: rgba(109, 219, 239, 0.25);
  background:
    linear-gradient(90deg, rgba(44, 171, 202, 0.13), transparent 42%),
    rgba(7, 26, 39, 0.82);
  color: rgba(247, 252, 255, 0.9);
  box-shadow: inset 0 1px rgba(255, 255, 255, 0.05);
}

.chapter-button::before {
  background: linear-gradient(90deg, var(--game-cyan), var(--game-blue), var(--game-violet));
  opacity: 0.26;
}

.chapter-button:hover {
  border-color: rgba(125, 235, 255, 0.62);
  background:
    linear-gradient(90deg, rgba(50, 206, 239, 0.2), rgba(119, 85, 255, 0.08)),
    rgba(7, 31, 46, 0.9);
}

.chapter-button.active {
  border-color: rgba(255, 222, 117, 0.94);
  background:
    linear-gradient(100deg, rgba(43, 222, 255, 0.38), rgba(84, 103, 255, 0.24) 58%, rgba(255, 79, 163, 0.22)),
    rgba(8, 33, 49, 0.96);
  box-shadow:
    inset 4px 0 var(--game-gold),
    inset 0 1px rgba(255, 255, 255, 0.16),
    0 0 18px rgba(50, 196, 255, 0.18);
}

.chapter-no {
  border-color: rgba(171, 239, 255, 0.56);
  background: linear-gradient(145deg, rgba(27, 173, 210, 0.88), rgba(47, 76, 160, 0.9));
  color: white;
  box-shadow: inset 0 1px rgba(255, 255, 255, 0.28);
}

.chapter-button.active .chapter-no {
  border-color: #fff0a8;
  background: linear-gradient(145deg, #ffe47a, #ff9d3d 52%, #ff4fa3);
  color: #251124;
  box-shadow: 0 0 16px rgba(255, 190, 70, 0.38);
}

.main {
  width: 100%;
  max-width: 100%;
  background:
    linear-gradient(180deg, rgba(6, 17, 31, 0.42), rgba(3, 31, 38, 0.64)),
    var(--academy-bg) center / cover no-repeat;
}

.topbar {
  max-width: 100%;
  border-color: rgba(94, 219, 255, 0.42);
  background:
    linear-gradient(105deg, rgba(41, 24, 82, 0.9), rgba(7, 59, 78, 0.88) 52%, rgba(31, 26, 66, 0.9)),
    var(--academy-bg) center 16% / cover no-repeat;
  box-shadow:
    inset 0 1px rgba(255, 255, 255, 0.13),
    inset 0 -2px rgba(255, 209, 96, 0.24),
    0 12px 30px rgba(0, 0, 0, 0.24);
}

.topbar h2 {
  color: #ffffff;
  text-shadow: 0 2px rgba(0, 0, 0, 0.4), 0 0 16px rgba(85, 219, 255, 0.18);
}

.topbar .eyebrow {
  color: #9eeeff;
}

.status-band {
  border-color: rgba(113, 222, 247, 0.28);
  background:
    linear-gradient(90deg, rgba(16, 42, 76, 0.72), rgba(10, 59, 69, 0.66) 54%, rgba(44, 26, 73, 0.7)),
    rgba(4, 15, 28, 0.76);
  box-shadow: inset 0 1px rgba(255, 255, 255, 0.08);
}

.status-cell,
.progress-cell {
  border-color: rgba(113, 222, 247, 0.2);
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.09), rgba(255, 255, 255, 0.015)),
    rgba(3, 18, 31, 0.62);
}

.score-cell {
  border-color: rgba(255, 220, 111, 0.62);
  background:
    linear-gradient(135deg, rgba(115, 55, 183, 0.7), rgba(19, 80, 119, 0.72) 58%, rgba(8, 37, 59, 0.76));
}

.stat-label,
.progress-label {
  color: rgba(170, 235, 255, 0.78);
}

.status-band strong {
  color: #f8fcff;
  text-shadow: 0 0 12px rgba(82, 220, 255, 0.2);
}

.score-cell strong {
  color: #ffe47d;
}

.combo-cell strong small {
  color: rgba(173, 234, 255, 0.68);
  font-size: 0.54em;
}

.combo-cell.combo-live {
  border-color: rgba(94, 240, 255, 0.72);
  background:
    linear-gradient(135deg, rgba(28, 154, 219, 0.48), rgba(108, 62, 215, 0.46)),
    rgba(4, 22, 39, 0.78);
  box-shadow: 0 0 calc(8px + var(--answer-combo) * 1px) rgba(66, 232, 255, 0.26);
}

.combo-cell.combo-live strong {
  color: #9ff7ff;
}

.combo-cell.combo-fever {
  border-color: rgba(255, 219, 100, 0.9);
  background:
    linear-gradient(120deg, rgba(255, 79, 163, 0.58), rgba(91, 95, 255, 0.58) 48%, rgba(19, 193, 211, 0.56)),
    rgba(9, 20, 41, 0.86);
  animation: comboFever 900ms ease-in-out infinite alternate;
}

.progress-track,
.timer-track,
.score-track {
  border: 1px solid rgba(144, 227, 255, 0.2);
  background: rgba(2, 11, 23, 0.7);
  box-shadow: inset 0 2px 5px rgba(0, 0, 0, 0.36);
}

.progress-track span,
.score-track span {
  background: linear-gradient(90deg, var(--game-cyan), var(--game-blue) 38%, var(--game-violet) 66%, var(--game-pink) 82%, var(--game-gold));
  box-shadow: 0 0 14px rgba(75, 216, 255, 0.5);
}

.rank-card,
.format-card {
  border-color: rgba(255, 220, 108, 0.6);
  background:
    linear-gradient(145deg, rgba(50, 180, 215, 0.26), rgba(101, 58, 180, 0.32)),
    rgba(5, 24, 39, 0.82);
}

.rank-card strong,
.format-card strong {
  color: #fff2a7;
}

.icon-button {
  border-color: rgba(114, 223, 247, 0.26);
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.09), rgba(255, 255, 255, 0.02)),
    rgba(4, 22, 38, 0.76);
  color: rgba(244, 252, 255, 0.9);
}

.icon-button:hover:not(:disabled) {
  border-color: rgba(127, 235, 255, 0.72);
  background:
    linear-gradient(135deg, rgba(42, 176, 220, 0.34), rgba(119, 74, 223, 0.25)),
    rgba(4, 25, 43, 0.88);
  box-shadow: 0 7px 18px rgba(19, 147, 211, 0.18);
  transform: translateY(-1px);
}

.icon-button.active {
  border-color: rgba(255, 231, 143, 0.82);
  background: linear-gradient(135deg, rgba(38, 203, 220, 0.78), rgba(89, 81, 218, 0.82));
  color: white;
}

.playfield {
  width: 100%;
  max-width: 100%;
}

.quiz-panel {
  border: 1px solid rgba(255, 215, 102, 0.78);
  background:
    linear-gradient(160deg, rgba(30, 21, 62, 0.84), rgba(5, 49, 62, 0.9) 54%, rgba(8, 24, 43, 0.92)),
    var(--academy-bg) center center / cover no-repeat;
  box-shadow:
    inset 0 0 0 1px rgba(86, 225, 255, 0.2),
    var(--game-shadow),
    0 0 34px rgba(42, 188, 255, 0.1);
}

.quiz-panel::before {
  inset: 6px;
  border-color: rgba(87, 224, 255, 0.26);
  box-shadow: inset 0 0 42px rgba(39, 181, 226, 0.08);
}

.question-board {
  border-color: rgba(95, 225, 255, 0.45);
  background:
    linear-gradient(110deg, rgba(11, 26, 49, 0.96), rgba(6, 48, 58, 0.94) 58%, rgba(27, 21, 55, 0.94)),
    var(--academy-bg) center 34% / cover no-repeat;
  box-shadow:
    inset 4px 0 var(--game-cyan),
    inset 0 1px rgba(255, 255, 255, 0.08),
    0 14px 28px rgba(0, 0, 0, 0.18);
}

.question-board::after {
  content: "ACTIVE QUEST";
  position: absolute;
  top: 0;
  right: 0;
  border-bottom: 1px solid rgba(102, 225, 255, 0.28);
  border-left: 1px solid rgba(102, 225, 255, 0.28);
  border-radius: 0 6px 0 8px;
  background: linear-gradient(90deg, rgba(25, 137, 181, 0.32), rgba(113, 69, 200, 0.38));
  color: rgba(183, 241, 255, 0.76);
  padding: 4px 9px;
  font-size: 0.55rem;
  font-weight: 950;
}

.question-head {
  padding: 2px 82px 8px 0;
  border-bottom: 1px solid rgba(103, 219, 242, 0.14);
}

.question-chip {
  border-color: rgba(255, 226, 129, 0.84);
  background: linear-gradient(145deg, #ff597b, #b2266a 58%, #642155);
  color: white;
  box-shadow: 0 0 14px rgba(255, 80, 146, 0.28);
}

.variant-chip {
  border-color: rgba(103, 231, 242, 0.5);
  background: linear-gradient(145deg, rgba(29, 167, 189, 0.88), rgba(33, 79, 126, 0.9));
  color: white;
}

.question-text {
  border-color: rgba(101, 221, 242, 0.26);
  background:
    linear-gradient(135deg, rgba(255, 255, 255, 0.035), rgba(72, 210, 237, 0.025)),
    rgba(3, 16, 29, 0.58);
  color: #f8fcff;
  text-shadow: 0 2px rgba(0, 0, 0, 0.36);
}

.question-directive-highlight {
  border-color: rgba(103, 242, 183, 0.46);
  background: linear-gradient(180deg, rgba(47, 198, 136, 0.38), rgba(20, 107, 87, 0.38));
  color: #e8fff6;
  box-shadow: inset 0 -2px rgba(68, 236, 156, 0.6);
}

.question-directive-highlight.question-directive-red {
  border-color: rgba(255, 135, 211, 0.62);
  background: linear-gradient(180deg, rgba(255, 92, 185, 0.46), rgba(151, 40, 120, 0.44));
  color: #fff1fb;
  box-shadow:
    inset 0 -2px rgba(255, 119, 207, 0.82),
    0 0 0 1px rgba(255, 132, 211, 0.24),
    0 0 16px rgba(255, 72, 178, 0.16);
}

.time-card {
  border-color: rgba(99, 223, 255, 0.34);
  background: rgba(3, 16, 30, 0.72);
  box-shadow: inset 0 1px rgba(255, 255, 255, 0.06);
}

.timer-track span {
  background: linear-gradient(90deg, var(--game-cyan), var(--game-blue), var(--game-violet), var(--game-pink));
  box-shadow: 0 0 14px rgba(67, 224, 255, 0.6);
}

.quiz-actions {
  border-radius: 7px;
  background: rgba(4, 18, 31, 0.52);
  padding: 4px;
}

.quiz-actions .ghost-button,
.quiz-actions .primary-button {
  min-height: 42px;
}

.quiz-actions .ghost-button {
  border-color: rgba(117, 222, 244, 0.38);
  background: linear-gradient(180deg, rgba(239, 251, 255, 0.96), rgba(195, 235, 246, 0.94));
  color: #0a2638;
}

.quiz-actions .primary-button {
  border-color: rgba(255, 232, 147, 0.88);
  background: linear-gradient(135deg, #46e5f2, #4697ff 44%, #9c63ff 74%, #ff65ae);
  color: #ffffff;
  text-shadow: 0 1px rgba(0, 0, 0, 0.28);
  box-shadow: inset 0 1px rgba(255, 255, 255, 0.42), 0 8px 18px rgba(65, 117, 255, 0.26);
}

.pager {
  align-items: center;
  scrollbar-color: rgba(85, 219, 255, 0.68) rgba(3, 15, 28, 0.5);
}

.pager button {
  border-color: rgba(109, 218, 242, 0.34);
  background: linear-gradient(180deg, rgba(238, 250, 255, 0.96), rgba(189, 226, 239, 0.94));
  color: #102a3a;
  box-shadow: inset 0 1px white;
}

.pager button.active {
  border-color: #fff2a6;
  background: linear-gradient(145deg, #ff5d84, #bd397d 56%, #683b9d);
  color: white;
  box-shadow: 0 0 0 2px rgba(255, 235, 139, 0.7), 0 0 16px rgba(255, 82, 149, 0.42);
  transform: translateY(-1px) scale(1.05);
}

.answer-dock {
  border-color: rgba(100, 224, 249, 0.38);
  background:
    linear-gradient(155deg, rgba(14, 46, 64, 0.88), rgba(15, 27, 54, 0.9)),
    rgba(5, 22, 36, 0.92);
  box-shadow:
    inset 0 1px rgba(255, 255, 255, 0.07),
    0 16px 32px rgba(0, 0, 0, 0.18);
}

.option-button,
.quiz-panel.source-layout .option-button {
  border-color: rgba(103, 196, 220, 0.54);
  background:
    linear-gradient(112deg, #fffdf7 0%, #edfaff 42%, #d7f3f6 74%, #ebe1ff 100%);
  color: #10243a;
  text-shadow: none;
  box-shadow:
    inset 0 1px rgba(255, 255, 255, 0.95),
    inset 0 -3px rgba(58, 137, 168, 0.14),
    0 5px 0 rgba(3, 16, 31, 0.38),
    0 9px 18px rgba(0, 0, 0, 0.14);
}

.option-button::before {
  width: 4px;
  height: 100%;
  inset: 0 auto 0 0;
  border: 0;
  background: linear-gradient(180deg, var(--game-cyan), var(--game-blue), var(--game-violet));
  opacity: 0.72;
  transform: none;
}

.option-button::after {
  right: 10px;
  border-left-color: rgba(32, 122, 157, 0.58);
}

.option-button:not(:disabled):hover,
.option-button:not(:disabled):focus-visible {
  border-color: rgba(45, 190, 229, 0.88);
  background: linear-gradient(112deg, #ffffff, #ddf9ff 42%, #caeff5 72%, #e8dcff);
  color: #071d33;
  outline: 0;
  box-shadow:
    inset 0 1px white,
    inset 0 0 0 3px rgba(45, 190, 229, 0.28),
    inset 0 -3px rgba(44, 139, 174, 0.18),
    0 4px 0 rgba(4, 28, 49, 0.42),
    0 8px 18px rgba(20, 151, 203, 0.18);
  transform: translateY(-1px);
}

.option-button:not(:disabled):hover::before,
.option-button:not(:disabled):focus-visible::before {
  opacity: 1;
  transform: none;
  filter: none;
}

.option-button:not(:disabled):hover::after,
.option-button:not(:disabled):focus-visible::after {
  transform: translateY(-50%);
  filter: none;
}

.option-letter {
  border-color: rgba(191, 244, 255, 0.82);
  background: linear-gradient(145deg, #1ebbc9, #237ab8 56%, #554eb0);
  color: white;
  box-shadow: inset 0 1px rgba(255, 255, 255, 0.28), 0 0 12px rgba(30, 174, 215, 0.22);
}

.option-content {
  color: inherit;
  font-weight: 900;
}

.option-button.correct {
  border-color: rgba(91, 239, 175, 0.94);
  background: linear-gradient(110deg, #e7fff3, #aef3d4 58%, #81e9cd 100%);
  color: #06392d;
  box-shadow: inset 0 1px white, 0 0 0 2px rgba(66, 230, 164, 0.18), 0 10px 28px rgba(33, 193, 139, 0.28);
  animation: answerClear 520ms cubic-bezier(0.2, 1.4, 0.4, 1) both;
}

.option-button.incorrect {
  border-color: rgba(255, 98, 122, 0.9);
  background: linear-gradient(110deg, #fff1f4, #ffc2ce 58%, #efa9c5 100%);
  color: #5c1425;
  box-shadow: inset 0 1px white, 0 8px 24px rgba(219, 49, 90, 0.22);
  animation: answerMiss 360ms ease both;
}

.option-button.correct .option-letter {
  background: linear-gradient(145deg, #40e69d, #159b73);
  color: #062f26;
  box-shadow: 0 0 18px rgba(40, 216, 147, 0.48);
}

.option-button.incorrect .option-letter {
  background: linear-gradient(145deg, #ff6d83, #b91d4f);
  color: white;
}

.feedback {
  border: 1px solid rgba(102, 219, 244, 0.42);
  border-left-width: 5px;
  background:
    linear-gradient(135deg, rgba(255, 255, 255, 0.99), rgba(230, 248, 255, 0.98) 66%, rgba(238, 233, 255, 0.98));
  color: #102033;
  box-shadow: 0 14px 30px rgba(1, 10, 23, 0.22);
}

.feedback.feedback-correct {
  border-left-color: var(--game-green);
  box-shadow: inset 0 3px rgba(66, 230, 164, 0.15), 0 14px 30px rgba(1, 10, 23, 0.22);
}

.feedback.feedback-wrong,
.feedback.feedback-timeout {
  border-left-color: var(--game-red);
  box-shadow: inset 0 3px rgba(255, 94, 115, 0.12), 0 14px 30px rgba(1, 10, 23, 0.22);
}

.feedback.feedback-correct .feedback-title {
  color: #08785b;
}

.feedback.feedback-wrong .feedback-title,
.feedback.feedback-timeout .feedback-title {
  color: #bc2348;
}

.result-burst {
  min-height: clamp(130px, 20vh, 230px);
  filter: drop-shadow(0 18px 28px rgba(0, 0, 0, 0.28));
}

.result-burst::before {
  background:
    repeating-conic-gradient(from 0deg, rgba(66, 232, 255, 0.28) 0deg 7deg, transparent 7deg 16deg),
    linear-gradient(125deg, rgba(64, 225, 255, 0.18), rgba(127, 88, 255, 0.3), rgba(255, 78, 164, 0.2));
}

.result-burst::after {
  border-color: rgba(255, 232, 145, 0.72);
  background: linear-gradient(135deg, rgba(11, 31, 58, 0.92), rgba(41, 27, 78, 0.92));
  box-shadow: 0 0 0 3px rgba(82, 224, 255, 0.16), 0 0 34px rgba(101, 96, 255, 0.32);
}

.result-burst span,
.result-burst.result-correct span {
  color: #f8feff;
  text-shadow: 0 4px #077f91, 0 8px #35257f, 0 0 24px rgba(70, 229, 255, 0.9), 0 0 50px rgba(155, 92, 255, 0.62);
}

.result-burst small {
  color: #ffe989;
  letter-spacing: 0.04em;
}

.right-rail > *,
.score-boss,
.weather-card,
.study-time-card,
.review-curriculum-card,
.side-stats {
  border-color: rgba(98, 221, 247, 0.34);
  background:
    linear-gradient(145deg, rgba(30, 31, 72, 0.88), rgba(6, 62, 72, 0.9)),
    var(--academy-bg) 78% center / auto 100% no-repeat;
  box-shadow: inset 0 1px rgba(255, 255, 255, 0.08), 0 12px 26px rgba(0, 0, 0, 0.2);
}

.score-boss strong {
  background: linear-gradient(90deg, #fff3a8, #63eaff 48%, #f68cd0);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}

@keyframes comboFever {
  from { filter: brightness(1); box-shadow: 0 0 12px rgba(75, 222, 255, 0.22); }
  to { filter: brightness(1.16); box-shadow: 0 0 24px rgba(255, 85, 175, 0.34); }
}

@keyframes answerClear {
  0% { transform: scale(0.985); filter: brightness(1.4); }
  55% { transform: scale(1.012); }
  100% { transform: scale(1); filter: brightness(1); }
}

@keyframes answerMiss {
  0%, 100% { transform: translateX(0); }
  25% { transform: translateX(-6px); }
  50% { transform: translateX(5px); }
  75% { transform: translateX(-3px); }
}

@media (min-width: 981px) {
  .app-shell {
    grid-template-columns: clamp(300px, 18vw, 360px) minmax(0, 1fr);
    width: 100vw;
    max-width: 100vw;
  }

  .sidebar {
    padding: 12px;
  }

  .main {
    gap: 9px;
    padding: 10px 12px;
  }

  .topbar {
    grid-template-columns: minmax(210px, 0.72fr) minmax(610px, 2.25fr) auto;
    grid-template-areas:
      "heading status cards"
      "toolbar toolbar toolbar";
    grid-template-rows: minmax(54px, auto) 42px;
    gap: 7px;
    padding: 7px;
  }

  .chapter-heading {
    grid-area: heading;
  }

  .header-cards {
    grid-area: cards;
    order: initial;
    align-self: stretch;
  }

  .status-band {
    grid-area: status;
    order: initial;
    grid-template-columns: minmax(106px, 1.2fr) repeat(5, minmax(58px, 0.72fr)) minmax(142px, 1.65fr);
    height: 100%;
  }

  .topbar .toolbar {
    grid-area: toolbar;
    order: initial;
    justify-content: flex-end;
    min-width: 0;
    min-height: 40px;
    height: 40px;
    overflow-x: auto;
    scrollbar-width: none;
  }

  .topbar .toolbar::-webkit-scrollbar {
    display: none;
  }

  .topbar .icon-button {
    flex: 0 0 auto;
    min-height: 40px;
    height: 40px;
    padding: 0 10px;
  }

  .playfield {
    grid-template-columns: minmax(0, 1fr) clamp(236px, 15vw, 286px);
    overflow: hidden;
  }

  .right-rail {
    height: 100%;
    max-height: 100%;
    overflow-y: auto;
    overscroll-behavior: contain;
  }

  .quiz-panel.source-layout:not(.review-layout) .question-board {
    min-height: clamp(220px, 34vh, 340px);
  }

  .quiz-panel.source-layout:not(.review-layout) .question-text.html-question {
    padding: 14px 18px;
    font-size: clamp(1rem, 1.02vw, 1.23rem);
    line-height: 1.5;
  }

  .quiz-panel.source-layout .answer-dock,
  .quiz-panel.quiz-custom-layout.source-layout:not(.review-layout) .answer-dock {
    min-height: clamp(250px, 35vh, 390px);
  }

  .quiz-panel.source-layout .options {
    gap: 7px;
  }

  .quiz-panel.source-layout .option-button {
    grid-template-columns: 34px minmax(0, 1fr);
    gap: 11px;
    min-height: clamp(48px, 5.1vh, 62px);
    padding: 8px 14px;
    font-size: clamp(0.94rem, 1vw, 1.13rem);
    line-height: 1.28;
  }

  .quiz-panel.source-layout .option-content {
    font-size: inherit;
    line-height: inherit;
  }

  .quiz-panel.source-layout .option-letter {
    width: 30px;
    height: 30px;
    font-size: 0.9rem;
  }
}

@media (min-width: 981px) and (max-width: 1480px) {
  .topbar {
    grid-template-columns: minmax(0, 1fr) auto;
    grid-template-areas:
      "heading cards"
      "status status"
      "toolbar toolbar";
    grid-template-rows: auto auto 42px;
  }

  .status-band {
    min-height: 50px;
  }

  .playfield {
    grid-template-columns: minmax(0, 1fr) 230px;
  }
}

@media (min-width: 981px) and (max-width: 1180px) {
  .app-shell {
    grid-template-columns: 280px minmax(0, 1fr);
  }

  .playfield {
    grid-template-columns: minmax(0, 1fr);
  }

  .right-rail {
    display: none;
  }
}

@media (max-width: 980px) {
  body {
    background: linear-gradient(155deg, #18122d 0%, #073c4b 46%, #152941 72%, #3a183b 100%);
  }

  .main {
    padding: 8px;
  }

  .quiz-panel {
    gap: 8px;
    padding: 8px;
    border-color: rgba(255, 220, 110, 0.72);
  }

  .question-board {
    padding: 10px;
    box-shadow: inset 3px 0 var(--game-cyan), 0 10px 24px rgba(0, 0, 0, 0.2);
  }

  .question-board::after {
    content: "QUEST";
    font-size: 0.48rem;
  }

  .question-head {
    padding-right: 58px;
  }

  .question-text,
  .question-text.html-question,
  .quiz-panel.source-layout:not(.review-layout) .question-text.html-question,
  .quiz-panel.source-layout .question-text.html-question {
    padding: 14px;
    font-size: clamp(1rem, 4.35vw, 1.14rem);
    line-height: 1.62;
  }

  .understanding-toggle {
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 5px;
  }

  .understanding-choice-button {
    min-height: 38px;
    padding: 4px 5px;
    font-size: 0.66rem;
    line-height: 1.2;
  }

  .answer-dock {
    padding: 9px;
  }

  .option-button,
  .quiz-panel.source-layout .option-button {
    grid-template-columns: 32px minmax(0, 1fr);
    min-height: 56px;
    padding: 9px 12px;
    font-size: 0.96rem;
    line-height: 1.42;
    box-shadow: inset 0 1px white, inset 0 -3px rgba(58, 137, 168, 0.13), 0 4px 0 rgba(3, 16, 31, 0.34);
  }

  .option-content {
    font-size: inherit;
    line-height: inherit;
  }

  .option-letter {
    width: 30px;
    height: 30px;
    font-size: 0.9rem;
  }

  .quiz-actions {
    gap: 6px;
  }

  .quiz-actions .ghost-button,
  .quiz-actions .primary-button {
    min-height: 46px;
    font-size: 0.94rem;
  }

  .feedback {
    padding: 16px;
    font-size: 0.96rem;
  }

  .result-burst {
    inset: 50% auto auto 50%;
    width: calc(100vw - 24px);
    min-height: 108px;
  }

  .result-burst span {
    font-size: clamp(2.1rem, 12vw, 3.4rem);
  }

  .result-burst small {
    font-size: 0.88rem;
  }
}

/* Result feedback is a full-viewport layer; keep the message grouped at the visual center. */
.result-burst {
  inset: 0;
  width: 100vw;
  height: 100vh;
  height: 100dvh;
  max-width: none;
  min-height: 100vh;
  min-height: 100dvh;
  max-height: none;
  margin: 0;
  overflow: hidden;
  translate: none;
  transform: none;
  grid-template-rows: auto auto;
  align-content: center;
  justify-items: center;
  gap: clamp(18px, 3vh, 34px);
}

.result-burst::before,
.result-burst::after {
  inset: 0;
  border-radius: 0;
}

.result-burst::after {
  border: 0;
  background: linear-gradient(135deg, rgba(6, 24, 48, 0.88), rgba(45, 24, 84, 0.9));
}

.result-burst span {
  font-size: clamp(4.5rem, 12vw, 11rem);
}

.result-burst small {
  max-width: min(88vw, 980px);
  margin-top: 0;
  padding-inline: 16px;
  font-size: clamp(1.25rem, 3vw, 2.5rem);
  line-height: 1.45;
  text-align: center;
}

.result-burst.result-correct::before {
  background:
    radial-gradient(circle at 50% 48%, rgba(255, 255, 255, 0.68) 0 7%, rgba(94, 234, 212, 0.34) 24%, transparent 54%),
    repeating-conic-gradient(from -4deg, rgba(186, 246, 255, 0.26) 0deg 7deg, rgba(52, 211, 153, 0.07) 7deg 16deg);
}

.result-burst.result-correct::after {
  background:
    radial-gradient(circle at 50% 46%, rgba(153, 246, 228, 0.3), transparent 30%),
    linear-gradient(135deg, rgba(4, 72, 105, 0.94), rgba(8, 145, 154, 0.9) 48%, rgba(30, 96, 145, 0.94));
  box-shadow:
    inset 0 0 150px rgba(103, 232, 249, 0.2),
    inset 0 0 0 2px rgba(204, 251, 241, 0.25);
}

.result-burst.result-correct span {
  color: #f4ffff;
  text-shadow:
    0 5px 0 #087e8b,
    0 10px 0 #07516f,
    0 0 26px rgba(207, 250, 254, 0.96),
    0 0 72px rgba(45, 212, 191, 0.86);
}

.result-burst.result-correct small {
  color: #e6fffb;
  text-shadow: 0 2px 0 rgba(4, 66, 83, 0.72), 0 0 22px rgba(94, 234, 212, 0.72);
}

.result-burst.show {
  animation: resultBurstFullscreen 1600ms ease-out both;
}

@keyframes resultBurstFullscreen {
  0% {
    opacity: 0;
    visibility: visible;
    filter: brightness(1.45) saturate(1.2);
  }

  9%,
  38% {
    opacity: 1;
    visibility: visible;
    filter: brightness(1) saturate(1);
  }

  99% {
    visibility: visible;
  }

  100% {
    opacity: 0;
    visibility: hidden;
    filter: brightness(1.08) saturate(1.08);
  }
}

@keyframes resultBurstFadeOnly {
  0% {
    opacity: 0;
    visibility: visible;
  }

  9%,
  38% {
    opacity: 1;
    visibility: visible;
  }

  99% {
    visibility: visible;
  }

  100% {
    opacity: 0;
    visibility: hidden;
  }
}

@media (prefers-reduced-motion: reduce) {
  .result-burst.show {
    animation: resultBurstFadeOnly 1600ms linear both;
    filter: none;
  }
}

@media (max-width: 720px) {
  .right-rail {
    display: none;
  }

  .question-head {
    gap: 6px;
  }

  .pager button {
    width: 34px;
    height: 34px;
    flex-basis: 34px;
    font-size: 0.82rem;
  }
}

@media (prefers-reduced-motion: reduce) {
  .result-burst.show {
    animation: resultBurstFadeOnly 1600ms linear both;
    transform: none;
  }

  .combo-cell.combo-fever,
  .option-button.correct,
  .option-button.incorrect {
    animation: none;
  }
}

/* Viewport allocation: long plain questions should consume page space, not nested scroll areas. */
@media (min-width: 981px) {
  .main:has(.quiz-panel.long-question-layout:not(.source-layout)),
  .playfield:has(> .quiz-panel.long-question-layout:not(.source-layout)) {
    height: auto;
    min-height: 100%;
    max-height: none;
    overflow-y: auto;
  }

  .main:has(.quiz-panel.long-question-layout:not(.source-layout)) {
    scrollbar-width: thin;
    scrollbar-color: rgba(72, 210, 237, 0.72) rgba(3, 15, 28, 0.38);
    -ms-overflow-style: auto;
  }

  .main:has(.quiz-panel.long-question-layout:not(.source-layout))::-webkit-scrollbar {
    display: block;
    width: 10px;
  }

  .main:has(.quiz-panel.long-question-layout:not(.source-layout))::-webkit-scrollbar-track {
    background: rgba(3, 15, 28, 0.38);
  }

  .main:has(.quiz-panel.long-question-layout:not(.source-layout))::-webkit-scrollbar-thumb {
    border: 2px solid rgba(3, 15, 28, 0.38);
    border-radius: 999px;
    background: linear-gradient(180deg, var(--game-cyan), var(--game-violet));
  }

  .playfield:has(> .quiz-panel.long-question-layout:not(.source-layout)) {
    align-items: start;
    overflow: visible;
  }

  .playfield > .quiz-panel.long-question-layout:not(.source-layout),
  .quiz-panel.long-question-layout.review-layout:not(.source-layout) {
    display: flex;
    flex-direction: column;
    align-items: stretch;
    height: auto;
    min-height: 100%;
    max-height: none;
    overflow: visible;
  }

  .quiz-panel.long-question-layout:not(.source-layout) .question-board,
  .quiz-panel.long-question-layout:not(.source-layout):not(.review-layout) .question-board,
  .quiz-panel.long-question-layout.review-layout:not(.source-layout) .question-board {
    flex: 0 0 auto;
    grid-template-rows: auto auto auto;
    height: auto;
    min-height: 0;
    max-height: none;
    overflow: visible;
    overscroll-behavior: auto;
    scrollbar-gutter: auto;
  }

  .quiz-panel.long-question-layout:not(.source-layout) .question-text.long-question,
  .quiz-panel.long-question-layout.review-layout:not(.source-layout) .question-text.long-question {
    display: block;
    height: auto;
    min-height: 0;
    max-height: none;
    overflow: visible;
    padding: clamp(16px, 1.5vw, 24px);
    font-size: clamp(1.68rem, 1.9vw, 2.3rem);
    line-height: 1.48;
  }

  .quiz-panel.long-question-layout:not(.source-layout) .answer-dock,
  .quiz-panel.long-question-layout.review-layout:not(.source-layout) .answer-dock {
    flex: 0 0 auto;
    height: auto;
    min-height: 0;
    max-height: none;
    overflow: visible;
    overscroll-behavior: auto;
    scrollbar-gutter: auto;
  }

  .quiz-panel.long-question-layout:not(.source-layout) .options,
  .quiz-panel.long-question-layout.review-layout:not(.source-layout) .options {
    height: auto;
    min-height: 0;
    grid-auto-rows: auto;
    align-content: start;
  }

  .quiz-panel.long-question-layout:not(.source-layout) .option-button,
  .quiz-panel.long-question-layout.review-layout:not(.source-layout) .option-button {
    min-height: clamp(62px, 5.8vh, 78px);
    padding: 11px 16px;
    font-size: clamp(1.25rem, 1.35vw, 1.55rem);
    line-height: 1.34;
  }

  .quiz-panel.long-question-layout:not(.source-layout) .option-content,
  .quiz-panel.long-question-layout.review-layout:not(.source-layout) .option-content {
    font-size: inherit;
    line-height: inherit;
  }

  .quiz-panel.long-question-layout:not(.source-layout) .quiz-actions,
  .quiz-panel.long-question-layout.review-layout:not(.source-layout) .quiz-actions {
    flex: 0 0 auto;
    height: auto;
    min-height: 46px;
    overflow: visible;
  }

  .quiz-panel.long-question-layout.review-layout:not(.source-layout) .feedback:not(.hidden) {
    flex: 0 0 auto;
    height: auto;
    min-height: 0;
    max-height: none;
    overflow: visible;
    overscroll-behavior: auto;
    scrollbar-gutter: auto;
    padding-right: 18px;
  }

  .quiz-panel.long-question-layout.review-layout:not(.source-layout) .feedback:not(.hidden)::before,
  .quiz-panel.long-question-layout.review-layout:not(.source-layout) .feedback:not(.hidden)::after {
    display: none;
  }

  .quiz-panel.long-question-layout.review-layout:not(.source-layout) .feedback-body {
    overflow-x: auto;
    overflow-y: visible;
  }
}

@media (max-width: 980px) {
  .quiz-panel.long-question-layout:not(.source-layout),
  .quiz-panel.long-question-layout.review-layout:not(.source-layout) {
    display: flex;
    flex-direction: column;
    align-items: stretch;
    height: auto;
    min-height: 0;
    max-height: none;
    overflow: visible;
  }

  .quiz-panel.long-question-layout:not(.source-layout) .question-board,
  .quiz-panel.long-question-layout:not(.source-layout):not(.review-layout) .question-board,
  .quiz-panel.long-question-layout.review-layout:not(.source-layout) .question-board,
  .quiz-panel.long-question-layout:not(.source-layout) .answer-dock,
  .quiz-panel.long-question-layout.review-layout:not(.source-layout) .answer-dock,
  .quiz-panel.long-question-layout.review-layout:not(.source-layout) .feedback:not(.hidden) {
    flex: 0 0 auto;
    height: auto;
    min-height: 0;
    max-height: none;
    overflow: visible;
    overscroll-behavior: auto;
    scrollbar-gutter: auto;
  }

  .quiz-panel.long-question-layout:not(.source-layout) .options,
  .quiz-panel.long-question-layout.review-layout:not(.source-layout) .options {
    height: auto;
    min-height: 0;
    grid-auto-rows: auto;
    align-content: start;
  }

  .quiz-panel.long-question-layout:not(.source-layout) .question-text.long-question,
  .quiz-panel.long-question-layout.review-layout:not(.source-layout) .question-text.long-question {
    padding: 16px;
    font-size: clamp(1.12rem, 4.8vw, 1.28rem);
    line-height: 1.62;
  }

  .quiz-panel.long-question-layout:not(.source-layout) .option-button,
  .quiz-panel.long-question-layout.review-layout:not(.source-layout) .option-button {
    min-height: 60px;
    padding: 10px 12px;
    font-size: clamp(1.02rem, 4.25vw, 1.15rem);
    line-height: 1.44;
  }

  .quiz-panel.long-question-layout:not(.source-layout) .option-content,
  .quiz-panel.long-question-layout.review-layout:not(.source-layout) .option-content {
    font-size: inherit;
    line-height: inherit;
  }

  .quiz-panel.long-question-layout.review-layout:not(.source-layout) .feedback:not(.hidden)::before,
  .quiz-panel.long-question-layout.review-layout:not(.source-layout) .feedback:not(.hidden)::after {
    display: none;
  }
}

/* Content-density layout: typography and space follow the material, not the course. */
.quiz-panel[data-question-density] .question-text,
.quiz-panel[data-question-density] .question-text.html-question,
.quiz-panel[data-option-density] .option-button,
.quiz-panel[data-option-density] .option-content,
.quiz-panel[data-feedback-density] .feedback,
.quiz-panel[data-feedback-density] .feedback-body {
  text-wrap: pretty;
}

.quiz-panel[data-question-media] .question-text.html-question::before {
  display: none !important;
  content: none !important;
}

.quiz-panel[data-question-density] .question-text.html-question > * {
  width: 100%;
}

/* Plain prompts must contribute their wrapped height before the answer track is laid out. */
@media (min-width: 981px) {
  .quiz-panel:not(.source-layout):not(.review-layout):not(.quiz-custom-layout)[data-question-density="brief"],
  .quiz-panel:not(.source-layout):not(.review-layout):not(.quiz-custom-layout)[data-question-density="standard"] {
    grid-template-rows: max-content auto auto auto minmax(220px, 1fr);
  }

  .quiz-panel:not(.source-layout):not(.review-layout):not(.quiz-custom-layout)[data-question-density="brief"] .question-board,
  .quiz-panel:not(.source-layout):not(.review-layout):not(.quiz-custom-layout)[data-question-density="standard"] .question-board {
    grid-template-rows: auto auto max-content;
    height: auto;
    min-height: 0;
    overflow: visible;
  }

  .quiz-panel:not(.source-layout):not(.review-layout):not(.quiz-custom-layout)[data-question-density="brief"] .question-text,
  .quiz-panel:not(.source-layout):not(.review-layout):not(.quiz-custom-layout)[data-question-density="standard"] .question-text {
    height: auto;
    overflow: visible;
  }
}

.quiz-panel.source-layout:not(.workbook-layout):not(.quiz-custom-layout):not(.review-layout) .question-board {
  display: flex;
  flex: 0 0 auto;
  flex-direction: column;
  height: auto;
  max-height: none;
  overflow: visible;
  scrollbar-gutter: auto;
}

.quiz-panel.source-layout:not(.workbook-layout):not(.quiz-custom-layout):not(.review-layout) .question-text.html-question,
.quiz-panel.source-layout:not(.workbook-layout):not(.quiz-custom-layout):not(.review-layout) .answer-dock {
  flex: 0 0 auto;
  height: auto;
  max-height: none;
  overflow: visible;
  scrollbar-gutter: auto;
}

.quiz-panel.source-layout:not(.workbook-layout):not(.quiz-custom-layout)[data-question-density="brief"] .question-board {
  min-height: clamp(250px, 30vh, 390px);
}

.quiz-panel.source-layout:not(.workbook-layout):not(.quiz-custom-layout)[data-question-density="brief"] .question-text.html-question {
  display: flex;
  flex: 1 1 auto;
  align-items: center;
  min-height: clamp(150px, 20vh, 260px);
}

.quiz-panel.source-layout:not(.workbook-layout):not(.quiz-custom-layout)[data-question-density="standard"] .question-board {
  min-height: clamp(230px, 27vh, 350px);
}

.quiz-panel.source-layout:not(.workbook-layout):not(.quiz-custom-layout)[data-question-density="standard"] .question-text.html-question {
  min-height: 0;
}

.quiz-panel.source-layout:not(.workbook-layout):not(.quiz-custom-layout)[data-question-density="dense"] .question-board,
.quiz-panel.source-layout:not(.workbook-layout):not(.quiz-custom-layout)[data-question-density="extended"] .question-board,
.quiz-panel.source-layout:not(.workbook-layout):not(.quiz-custom-layout)[data-question-density="dense"] .question-text.html-question,
.quiz-panel.source-layout:not(.workbook-layout):not(.quiz-custom-layout)[data-question-density="extended"] .question-text.html-question {
  min-height: 0;
}

.quiz-panel[data-option-density]:not(.workbook-layout):not(.quiz-custom-layout) .answer-dock,
.quiz-panel[data-option-density]:not(.workbook-layout):not(.quiz-custom-layout) .options {
  height: auto;
  max-height: none;
  overflow: visible;
  scrollbar-gutter: auto;
}

.quiz-panel[data-option-density]:not(.workbook-layout):not(.quiz-custom-layout) .options {
  grid-auto-rows: auto;
  align-content: start;
}

.quiz-panel[data-option-density="brief"] .option-button {
  min-height: clamp(66px, 6.4vh, 84px);
  padding: 11px 16px;
}

.quiz-panel[data-option-density="standard"] .option-button {
  min-height: clamp(62px, 6vh, 78px);
  padding: 11px 16px;
}

.quiz-panel[data-option-density="dense"] .option-button,
.quiz-panel[data-option-density="extended"] .option-button {
  height: auto;
  min-height: 58px;
  padding: 12px 16px;
}

.quiz-panel[data-feedback-density]:not(.workbook-layout):not(.quiz-custom-layout) .feedback:not(.hidden),
.quiz-panel[data-feedback-density]:not(.workbook-layout):not(.quiz-custom-layout) .feedback-body {
  height: auto;
  max-height: none;
  overflow-y: visible;
  scrollbar-gutter: auto;
}

.quiz-panel[data-feedback-density]:not(.workbook-layout):not(.quiz-custom-layout) .feedback:not(.hidden)::before,
.quiz-panel[data-feedback-density]:not(.workbook-layout):not(.quiz-custom-layout) .feedback:not(.hidden)::after {
  display: none;
}

@media (min-width: 981px) {
  .main:has(.quiz-panel.content-flow-layout:not(.quiz-custom-layout)),
  .playfield:has(> .quiz-panel.content-flow-layout:not(.quiz-custom-layout)) {
    height: auto;
    min-height: 100%;
    max-height: none;
  }

  .main:has(.quiz-panel.content-flow-layout:not(.quiz-custom-layout)) {
    overflow-y: auto;
  }

  .playfield:has(> .quiz-panel.content-flow-layout:not(.quiz-custom-layout)) {
    align-items: start;
    overflow: visible;
  }

  .playfield > .quiz-panel.content-flow-layout:not(.workbook-layout):not(.quiz-custom-layout) {
    display: flex;
    flex-direction: column;
    align-items: stretch;
    height: max-content;
    min-height: 100%;
    max-height: none;
    overflow: visible;
  }

  .quiz-panel.content-flow-layout:not(.workbook-layout):not(.quiz-custom-layout) .question-board,
  .quiz-panel.content-flow-layout:not(.workbook-layout):not(.quiz-custom-layout) .answer-dock,
  .quiz-panel.content-flow-layout:not(.workbook-layout):not(.quiz-custom-layout) .feedback:not(.hidden) {
    flex: 0 0 auto;
    height: auto;
    max-height: none;
    overflow-y: visible;
  }

  .quiz-panel[data-question-density="brief"] .question-text {
    font-size: clamp(2.2rem, 2.45vw, 3.25rem);
    line-height: 1.4;
  }

  .quiz-panel.source-layout[data-question-density="brief"] .question-text.html-question {
    padding: clamp(20px, 1.7vw, 30px);
    font-size: clamp(1.95rem, 2.05vw, 2.72rem);
    line-height: 1.46;
  }

  .quiz-panel[data-question-density="standard"] .question-text {
    font-size: clamp(1.7rem, 1.9vw, 2.45rem);
    line-height: 1.46;
  }

  .quiz-panel.source-layout[data-question-density="standard"] .question-text.html-question {
    padding: clamp(18px, 1.5vw, 26px);
    font-size: clamp(1.5rem, 1.58vw, 2.05rem);
    line-height: 1.52;
  }

  .quiz-panel[data-question-density="dense"] .question-text,
  .quiz-panel.source-layout[data-question-density="dense"] .question-text.html-question {
    padding: clamp(16px, 1.35vw, 24px);
    font-size: clamp(1.28rem, 1.34vw, 1.72rem);
    line-height: 1.58;
  }

  .quiz-panel[data-question-density="extended"] .question-text,
  .quiz-panel.source-layout[data-question-density="extended"] .question-text.html-question {
    padding: clamp(15px, 1.2vw, 22px);
    font-size: clamp(1.18rem, 1.18vw, 1.52rem);
    line-height: 1.62;
  }

  .quiz-panel[data-option-density="brief"] .option-button,
  .quiz-panel[data-option-density="brief"] .option-content {
    font-size: clamp(1.42rem, 1.5vw, 1.82rem);
    line-height: 1.36;
  }

  .quiz-panel[data-option-density="standard"] .option-button,
  .quiz-panel[data-option-density="standard"] .option-content {
    font-size: clamp(1.22rem, 1.28vw, 1.55rem);
    line-height: 1.42;
  }

  .quiz-panel[data-option-density="dense"] .option-button,
  .quiz-panel[data-option-density="dense"] .option-content {
    font-size: clamp(1.08rem, 1.12vw, 1.32rem);
    line-height: 1.5;
  }

  .quiz-panel[data-option-density="extended"] .option-button,
  .quiz-panel[data-option-density="extended"] .option-content {
    font-size: clamp(1rem, 1.03vw, 1.18rem);
    line-height: 1.56;
  }

  .quiz-panel[data-option-density="brief"] .option-letter {
    width: 36px;
    height: 36px;
    font-size: 1rem;
  }

  .quiz-panel[data-feedback-density="brief"] .feedback,
  .quiz-panel[data-feedback-density="brief"] .feedback-body {
    font-size: clamp(1.16rem, 1.2vw, 1.38rem);
  }

  .quiz-panel[data-feedback-density="standard"] .feedback,
  .quiz-panel[data-feedback-density="standard"] .feedback-body {
    font-size: clamp(1.1rem, 1.12vw, 1.28rem);
  }

  .quiz-panel[data-feedback-density="dense"] .feedback,
  .quiz-panel[data-feedback-density="dense"] .feedback-body,
  .quiz-panel[data-feedback-density="extended"] .feedback,
  .quiz-panel[data-feedback-density="extended"] .feedback-body {
    font-size: clamp(1.02rem, 1.06vw, 1.18rem);
  }

  .quiz-panel[data-question-density="brief"] .kougai-question-title,
  .quiz-panel[data-question-density="brief"] .kougai-question-subject,
  .quiz-panel[data-question-density="brief"] .pe-question-title,
  .quiz-panel[data-question-density="brief"] .pe-question-field,
  .quiz-panel[data-question-density="brief"] .question-attempt-stats {
    min-height: 32px;
    padding: 5px 10px;
    font-size: clamp(0.82rem, 0.76vw, 1rem);
  }
}

@media (max-width: 980px) {
  .quiz-panel.content-flow-layout:not(.workbook-layout):not(.quiz-custom-layout) {
    display: flex;
    flex-direction: column;
    align-items: stretch;
    height: auto;
    min-height: 0;
    max-height: none;
    overflow: visible;
  }

  .quiz-panel.source-layout:not(.workbook-layout):not(.quiz-custom-layout) .question-board,
  .quiz-panel.source-layout:not(.workbook-layout):not(.quiz-custom-layout) .question-text.html-question,
  .quiz-panel.source-layout:not(.workbook-layout):not(.quiz-custom-layout) .answer-dock,
  .quiz-panel.content-flow-layout:not(.workbook-layout):not(.quiz-custom-layout) .feedback:not(.hidden) {
    flex: 0 0 auto;
    height: auto;
    max-height: none;
    overflow: visible;
    scrollbar-gutter: auto;
  }

  .quiz-panel.source-layout:not(.workbook-layout):not(.quiz-custom-layout)[data-question-density="brief"] .question-board {
    min-height: 0;
  }

  .quiz-panel.source-layout:not(.workbook-layout):not(.quiz-custom-layout)[data-question-density="brief"] .question-text.html-question {
    display: flex;
    align-items: center;
    min-height: 150px;
  }

  .quiz-panel[data-question-density="brief"] .question-text {
    padding: 17px;
    font-size: clamp(1.34rem, 5.8vw, 1.62rem);
    line-height: 1.52;
  }

  .quiz-panel.source-layout[data-question-density="brief"] .question-text.html-question {
    font-size: clamp(1.26rem, 5.3vw, 1.5rem);
  }

  .quiz-panel[data-question-density="standard"] .question-text,
  .quiz-panel.source-layout[data-question-density="standard"] .question-text.html-question {
    padding: 16px;
    font-size: clamp(1.12rem, 4.75vw, 1.3rem);
    line-height: 1.58;
  }

  .quiz-panel[data-question-density="dense"] .question-text,
  .quiz-panel.source-layout[data-question-density="dense"] .question-text.html-question {
    padding: 15px;
    font-size: clamp(1.04rem, 4.35vw, 1.18rem);
    line-height: 1.62;
  }

  .quiz-panel[data-question-density="extended"] .question-text,
  .quiz-panel.source-layout[data-question-density="extended"] .question-text.html-question {
    padding: 14px;
    font-size: clamp(1.04rem, 4.25vw, 1.16rem);
    line-height: 1.66;
  }

  .quiz-panel[data-option-density="brief"] .option-button,
  .quiz-panel[data-option-density="brief"] .option-content {
    min-height: 60px;
    font-size: clamp(1.08rem, 4.5vw, 1.2rem);
    line-height: 1.42;
  }

  .quiz-panel[data-option-density="standard"] .option-button,
  .quiz-panel[data-option-density="standard"] .option-content {
    min-height: 58px;
    font-size: clamp(1.02rem, 4.25vw, 1.14rem);
    line-height: 1.48;
  }

  .quiz-panel[data-option-density="dense"] .option-button,
  .quiz-panel[data-option-density="dense"] .option-content,
  .quiz-panel[data-option-density="extended"] .option-button,
  .quiz-panel[data-option-density="extended"] .option-content {
    min-height: 56px;
    font-size: clamp(0.98rem, 4vw, 1.08rem);
    line-height: 1.54;
  }

  .quiz-panel[data-feedback-density] .feedback,
  .quiz-panel[data-feedback-density] .feedback-body {
    font-size: clamp(1rem, 4.1vw, 1.1rem);
    line-height: 1.68;
  }

  .quiz-panel[data-question-density] .kougai-question-title,
  .quiz-panel[data-question-density] .kougai-question-subject,
  .quiz-panel[data-question-density] .pe-question-title,
  .quiz-panel[data-question-density] .pe-question-field,
  .quiz-panel[data-question-density] .question-attempt-stats {
    min-height: 24px;
    padding: 3px 6px;
    font-size: clamp(0.7rem, 3vw, 0.8rem);
    line-height: 1.2;
    word-spacing: 0;
  }
}

/* Visual questions keep media and text density as separate layout axes. */
.quiz-panel.source-layout[data-question-density="visual"]:not(.workbook-layout):not(.quiz-custom-layout) .question-board {
  display: flex;
  flex: 0 0 auto;
  flex-direction: column;
  height: auto;
  max-height: none;
  overflow: visible;
}

.quiz-panel.source-layout[data-question-density="visual"]:not(.workbook-layout):not(.quiz-custom-layout) .question-text.html-question {
  display: block;
  flex: 0 0 auto;
  height: auto;
  max-height: none;
  overflow: visible;
}

.quiz-panel[data-question-density="visual"] .question-text .choice-image,
.quiz-panel[data-question-density="visual"] .question-text .img_margin,
.quiz-panel[data-question-density="visual"] .question-text .pe-question-image {
  max-width: 100%;
  overflow: visible;
}

.quiz-panel[data-question-density="visual"] .question-text .choice-image > li {
  display: block;
  margin: 0;
  padding: 0;
  list-style: none;
}

.quiz-panel[data-question-density="visual"] .question-text .choice-image > li::marker {
  content: "";
}

@media (min-width: 981px) {
  .quiz-panel.source-layout[data-question-density="visual"]:not(.workbook-layout):not(.quiz-custom-layout)[data-question-text-density="brief"] .question-board {
    min-height: clamp(440px, 38vh, 560px);
  }

  .quiz-panel.source-layout[data-question-density="visual"]:not(.workbook-layout):not(.quiz-custom-layout)[data-question-text-density="standard"] .question-board {
    min-height: clamp(500px, 43vh, 620px);
  }

  .quiz-panel.source-layout[data-question-density="visual"]:not(.workbook-layout):not(.quiz-custom-layout)[data-question-text-density="dense"] .question-board,
  .quiz-panel.source-layout[data-question-density="visual"]:not(.workbook-layout):not(.quiz-custom-layout)[data-question-text-density="extended"] .question-board {
    min-height: clamp(570px, 47vh, 680px);
  }

  .quiz-panel.source-layout[data-question-density="visual"]:not(.workbook-layout)[data-question-text-density="brief"] .question-text.html-question {
    padding: clamp(20px, 1.7vw, 30px);
    font-size: clamp(1.9rem, 2vw, 2.65rem);
    line-height: 1.48;
  }

  .quiz-panel.source-layout[data-question-density="visual"]:not(.workbook-layout)[data-question-text-density="standard"] .question-text.html-question {
    padding: clamp(18px, 1.55vw, 28px);
    font-size: clamp(1.65rem, 1.72vw, 2.2rem);
    line-height: 1.5;
  }

  .quiz-panel.source-layout[data-question-density="visual"]:not(.workbook-layout)[data-question-text-density="dense"] .question-text.html-question {
    padding: clamp(18px, 1.45vw, 26px);
    font-size: clamp(1.45rem, 1.52vw, 1.9rem);
    line-height: 1.54;
  }

  .quiz-panel.source-layout[data-question-density="visual"]:not(.workbook-layout)[data-question-text-density="extended"] .question-text.html-question {
    padding: clamp(17px, 1.35vw, 24px);
    font-size: clamp(1.25rem, 1.3vw, 1.62rem);
    line-height: 1.6;
  }

  .quiz-panel.source-layout[data-question-density="visual"]:not(.workbook-layout) .question-text.html-question .choice-image img.quiz-image,
  .quiz-panel.source-layout[data-question-density="visual"]:not(.workbook-layout) .question-text.html-question .img_margin img.quiz-image,
  .quiz-panel.source-layout[data-question-density="visual"]:not(.workbook-layout) .question-text.html-question .pe-question-image img.quiz-image {
    width: min(100%, clamp(460px, 32vw, 900px)) !important;
    max-width: 100% !important;
    max-height: min(42vh, 520px);
    object-fit: contain;
    object-position: left top;
  }
}

@media (max-width: 980px) {
  .quiz-panel.source-layout[data-question-density="visual"]:not(.workbook-layout):not(.quiz-custom-layout) .question-board {
    min-height: 0;
  }

  .quiz-panel.source-layout[data-question-density="visual"]:not(.workbook-layout)[data-question-text-density="brief"] .question-text.html-question {
    padding: 17px;
    font-size: clamp(1.24rem, 5.25vw, 1.46rem);
    line-height: 1.54;
  }

  .quiz-panel.source-layout[data-question-density="visual"]:not(.workbook-layout)[data-question-text-density="standard"] .question-text.html-question,
  .quiz-panel.source-layout[data-question-density="visual"]:not(.workbook-layout)[data-question-text-density="dense"] .question-text.html-question {
    padding: 16px;
    font-size: clamp(1.08rem, 4.65vw, 1.24rem);
    line-height: 1.62;
  }

  .quiz-panel.source-layout[data-question-density="visual"]:not(.workbook-layout)[data-question-text-density="extended"] .question-text.html-question {
    padding: 15px;
    font-size: clamp(1.02rem, 4.3vw, 1.14rem);
    line-height: 1.66;
  }

  .quiz-panel.source-layout[data-question-density="visual"]:not(.workbook-layout) .question-text.html-question .choice-image img.quiz-image,
  .quiz-panel.source-layout[data-question-density="visual"]:not(.workbook-layout) .question-text.html-question .img_margin img.quiz-image,
  .quiz-panel.source-layout[data-question-density="visual"]:not(.workbook-layout) .question-text.html-question .pe-question-image img.quiz-image {
    width: min(100%, 520px) !important;
    max-width: 100% !important;
    max-height: none;
    object-fit: contain;
    object-position: left top;
  }
}

/* One coherent moving scene behind a stationary glass interface. */
:root[data-theme="fantasy"] {
  --theme-glass-main: rgba(12, 21, 27, 0.34);
  --theme-glass-sidebar: rgba(13, 25, 31, 0.82);
  --theme-glass-topbar: rgba(24, 17, 37, 0.78);
  --theme-glass-panel: rgba(8, 30, 38, 0.72);
  --theme-glass-question: rgba(5, 24, 33, 0.86);
}

:root[data-theme="mediterranean"] {
  --theme-glass-main: rgba(0, 91, 127, 0.25);
  --theme-glass-sidebar: rgba(0, 62, 91, 0.8);
  --theme-glass-topbar: rgba(0, 86, 126, 0.74);
  --theme-glass-panel: rgba(0, 80, 112, 0.64);
  --theme-glass-question: rgba(0, 57, 83, 0.84);
}

:root[data-theme="event-horizon"] {
  --theme-glass-main: rgba(5, 6, 18, 0.3);
  --theme-glass-sidebar: rgba(7, 9, 24, 0.84);
  --theme-glass-topbar: rgba(14, 12, 31, 0.8);
  --theme-glass-panel: rgba(8, 12, 29, 0.7);
  --theme-glass-question: rgba(7, 12, 27, 0.87);
}

:root[data-theme] .main {
  background: linear-gradient(180deg, var(--theme-glass-main), color-mix(in srgb, var(--theme-glass-main) 72%, transparent));
}

:root[data-theme] .main::before {
  display: none;
}

:root[data-theme] .sidebar {
  background: linear-gradient(180deg, var(--theme-glass-sidebar), color-mix(in srgb, var(--theme-glass-sidebar) 92%, black));
  backdrop-filter: blur(10px) saturate(1.08);
}

:root[data-theme] .topbar {
  background: linear-gradient(108deg, var(--theme-glass-topbar), color-mix(in srgb, var(--theme-glass-topbar) 82%, transparent));
  backdrop-filter: blur(9px) saturate(1.08);
}

:root[data-theme] .quiz-panel {
  background: linear-gradient(155deg, var(--theme-glass-panel), color-mix(in srgb, var(--theme-glass-panel) 88%, black));
  backdrop-filter: blur(7px) saturate(1.06);
}

:root[data-theme] .question-board {
  background: linear-gradient(110deg, var(--theme-glass-question), color-mix(in srgb, var(--theme-glass-question) 92%, #071424));
  backdrop-filter: blur(5px) saturate(1.04);
}

/* Seasonal themes keep the original layout while giving each glass surface its own atmosphere. */
:root[data-theme="okinawa"] {
  --theme-surface-detail: radial-gradient(circle at 88% 4%, rgba(255, 229, 117, .17), transparent 24%), linear-gradient(118deg, rgba(67, 226, 221, .09), transparent 42%);
}

:root[data-theme="hokkaido"] {
  --theme-surface-detail: linear-gradient(125deg, rgba(235, 251, 255, .15), transparent 28%, rgba(133, 206, 234, .08) 62%, transparent 82%);
}

:root[data-theme="halloween"] {
  --theme-surface-detail: radial-gradient(circle at 86% 2%, rgba(255, 159, 63, .17), transparent 22%), linear-gradient(118deg, rgba(166, 91, 215, .11), transparent 48%);
}

:root[data-theme="new-year"] {
  --theme-surface-detail: linear-gradient(116deg, rgba(247, 211, 116, .15), transparent 27%, rgba(232, 77, 81, .09) 68%, transparent 88%);
}

:root[data-theme="christmas"] {
  --theme-surface-detail: radial-gradient(circle at 8% 14%, rgba(240, 213, 138, .14), transparent 13%), radial-gradient(circle at 91% 8%, rgba(227, 78, 89, .12), transparent 15%);
}

:root[data-theme="hanami"] {
  --theme-surface-detail: radial-gradient(ellipse at 14% 0%, rgba(255, 226, 234, .18), transparent 28%), linear-gradient(120deg, transparent 48%, rgba(234, 124, 168, .09));
}

:root:is(
  [data-theme="okinawa"],
  [data-theme="hokkaido"],
  [data-theme="halloween"],
  [data-theme="new-year"],
  [data-theme="christmas"],
  [data-theme="hanami"]
) .sidebar {
  background: var(--theme-surface-detail), linear-gradient(180deg, var(--theme-glass-sidebar), color-mix(in srgb, var(--theme-glass-sidebar) 92%, black));
}

:root:is(
  [data-theme="okinawa"],
  [data-theme="hokkaido"],
  [data-theme="halloween"],
  [data-theme="new-year"],
  [data-theme="christmas"],
  [data-theme="hanami"]
) .topbar {
  background: var(--theme-surface-detail), linear-gradient(108deg, var(--theme-glass-topbar), color-mix(in srgb, var(--theme-glass-topbar) 82%, transparent));
}

:root:is(
  [data-theme="okinawa"],
  [data-theme="hokkaido"],
  [data-theme="halloween"],
  [data-theme="new-year"],
  [data-theme="christmas"],
  [data-theme="hanami"]
) .quiz-panel {
  background: var(--theme-surface-detail), linear-gradient(155deg, var(--theme-glass-panel), color-mix(in srgb, var(--theme-glass-panel) 88%, black));
}

:root[data-theme-motion="on"][data-theme="fantasy"] .theme-backdrop-image {
  animation-duration: 18s;
}

:root[data-theme-motion="on"][data-theme="mediterranean"] .theme-backdrop-image {
  animation-duration: 15s;
}

:root[data-theme-motion="on"][data-theme="event-horizon"] .theme-backdrop-image {
  animation-duration: 20s;
}

:root[data-theme][data-theme-motion="on"] .theme-backdrop-image {
  animation: none !important;
  transform: scale(1.03) !important;
  will-change: auto;
}

@keyframes fantasyBackdropDrift {
  from { transform: scale(1.045) translate3d(-1.2%, -0.6%, 0); }
  to { transform: scale(1.12) translate3d(1.5%, 1%, 0); }
}

@keyframes mediterraneanBackdropDrift {
  from { transform: scale(1.04) translate3d(-1.8%, -0.8%, 0); }
  to { transform: scale(1.13) translate3d(1.8%, 1.2%, 0); }
}

@keyframes horizonBackdropDrift {
  from { transform: scale(1.045) translate3d(-1.3%, 0.6%, 0); }
  to { transform: scale(1.14) translate3d(1.7%, -0.8%, 0); }
}

@media (max-width: 980px) {
  :root[data-theme] .sidebar,
  :root[data-theme] .topbar,
  :root[data-theme] .quiz-panel,
  :root[data-theme] .question-board {
    backdrop-filter: blur(5px) saturate(1.04);
  }
}

/* OpenRouter tutor */
.llm-teach-button {
  position: relative;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  min-height: 40px;
  padding: 0 14px;
  border: 1px solid rgba(126, 231, 214, 0.7);
  border-radius: 7px;
  background: linear-gradient(180deg, rgba(25, 100, 112, 0.96), rgba(9, 57, 70, 0.96));
  color: #edffff;
  cursor: pointer;
  font-size: 0.86rem;
  font-weight: 900;
  line-height: 1;
  box-shadow: inset 0 1px rgba(255, 255, 255, 0.18), 0 3px 0 rgba(3, 30, 38, 0.76);
  transition: transform 140ms ease, border-color 140ms ease, filter 140ms ease;
}

.llm-teach-button:hover,
.llm-teach-button:focus-visible,
.llm-teach-button.active {
  border-color: #d6fff7;
  filter: brightness(1.12);
  transform: translateY(-1px);
}

.llm-teach-button.has-saved-answer {
  border-color: rgba(255, 255, 255, 0.9);
  background: linear-gradient(110deg, #087fe8 0%, #14bfa9 27%, #e7bd3a 51%, #ef5c91 74%, #8867e8 100%);
  color: #fff;
  box-shadow:
    inset 0 1px rgba(255, 255, 255, 0.45),
    0 0 0 2px rgba(97, 225, 255, 0.18),
    0 4px 13px rgba(95, 82, 220, 0.34);
  text-shadow: 0 1px 2px rgba(22, 23, 55, 0.58);
}

.llm-teach-button.has-saved-answer svg {
  color: #fff;
  filter: drop-shadow(0 1px 2px rgba(16, 31, 62, 0.5));
}

.llm-teach-button:disabled {
  opacity: 0.52;
  cursor: default;
  filter: none;
  transform: none;
}

.llm-teach-button svg {
  width: 18px;
  height: 18px;
  color: #8ff3df;
}

.llm-explanation-panel {
  position: fixed;
  top: max(16px, env(safe-area-inset-top));
  right: max(16px, env(safe-area-inset-right));
  z-index: 1400;
  display: grid;
  grid-template-rows: auto auto auto auto minmax(0, 1fr) auto;
  width: min(980px, calc(100vw - 32px));
  height: calc(100dvh - 32px);
  max-height: calc(100dvh - 32px);
  overflow: hidden;
  border: 1px solid color-mix(in srgb, var(--theme-line) 72%, white);
  border-radius: 8px;
  background:
    linear-gradient(145deg, rgba(23, 83, 100, 0.16), transparent 38%),
    rgba(7, 21, 31, 0.97);
  color: #f5fbff;
  box-shadow: 0 26px 72px rgba(0, 0, 0, 0.52), inset 0 1px rgba(255, 255, 255, 0.12);
  backdrop-filter: blur(18px) saturate(1.12);
  transition: width 180ms ease;
}

.llm-explanation-panel.answer-mode {
  width: min(1320px, calc(100vw - 32px));
}

.llm-explanation-panel.answer-mode .llm-panel-header {
  min-height: 56px;
  padding-block: 7px;
}

.llm-explanation-panel.answer-mode .llm-panel-toolbar {
  padding-block: 5px;
}

.llm-explanation-panel.answer-mode .llm-panel-toolbar select {
  height: 34px;
}

.llm-explanation-panel.answer-mode .llm-panel-status {
  min-height: 26px;
  padding-block: 4px;
}

.llm-explanation-panel.answer-mode .llm-conversation-controls {
  min-height: 108px;
  padding-block: 7px;
}

.llm-panel-header { grid-row: 1; }
.llm-panel-toolbar { grid-row: 2; }
.llm-settings { grid-row: 3; }
.llm-panel-status { grid-row: 4; }
.llm-explanation-body { grid-row: 5; }
.llm-conversation-controls { grid-row: 6; }

.llm-explanation-panel.hidden,
.llm-explanation-panel[hidden] {
  display: none !important;
}

.llm-panel-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  min-height: 68px;
  padding: 11px 12px 11px 18px;
  border-bottom: 1px solid rgba(150, 225, 235, 0.22);
  background:
    linear-gradient(112deg, rgba(20, 112, 121, 0.94), rgba(18, 57, 89, 0.95) 58%, rgba(61, 46, 101, 0.92));
}

.llm-panel-title,
.llm-panel-title > span,
.llm-panel-actions,
.llm-panel-toolbar,
.llm-api-key-row {
  display: flex;
  align-items: center;
}

.llm-panel-title {
  gap: 10px;
  min-width: 0;
}

.llm-panel-title > svg {
  flex: 0 0 auto;
  width: 28px;
  height: 28px;
  color: #8ff3df;
}

.llm-panel-title > span {
  align-items: flex-start;
  flex-direction: column;
  gap: 2px;
}

.llm-panel-title small {
  color: rgba(210, 250, 255, 0.66);
  font-size: 0.62rem;
  font-weight: 900;
}

.llm-panel-title strong {
  font-size: 1.18rem;
  line-height: 1.1;
}

.llm-panel-actions {
  gap: 6px;
}

.llm-panel-actions button {
  width: 38px;
  height: 38px;
  display: grid;
  place-items: center;
  border: 1px solid rgba(188, 239, 246, 0.24);
  border-radius: 7px;
  background: rgba(3, 27, 38, 0.56);
  color: #e9fbff;
  cursor: pointer;
}

.llm-panel-actions button:hover,
.llm-panel-actions button:focus-visible,
.llm-panel-actions button.active {
  border-color: rgba(143, 243, 223, 0.78);
  background: rgba(18, 99, 107, 0.68);
}

.llm-panel-actions svg {
  width: 18px;
  height: 18px;
}

.llm-panel-toolbar {
  gap: 8px;
  padding: 9px 12px;
  border-bottom: 1px solid rgba(150, 225, 235, 0.16);
  background: rgba(3, 17, 27, 0.72);
}

.llm-panel-toolbar label {
  flex: 0 0 auto;
  color: rgba(221, 244, 248, 0.68);
  font-size: 0.72rem;
  font-weight: 900;
}

.llm-panel-toolbar select {
  min-width: 0;
  flex: 1 1 auto;
  height: 38px;
  border: 1px solid rgba(140, 222, 233, 0.3);
  border-radius: 6px;
  background: #0c2838;
  color: #f2fbff;
  padding: 0 32px 0 10px;
  font-size: 0.82rem;
  font-weight: 800;
}

.llm-regenerate-button,
.llm-key-save,
.llm-key-delete {
  flex: 0 0 auto;
  min-height: 38px;
  border: 1px solid rgba(143, 243, 223, 0.5);
  border-radius: 6px;
  background: rgba(18, 99, 107, 0.72);
  color: #efffff;
  padding: 0 11px;
  cursor: pointer;
  font-size: 0.76rem;
  font-weight: 900;
}

.llm-regenerate-button {
  display: inline-flex;
  align-items: center;
  gap: 6px;
}

.llm-regenerate-button svg {
  width: 15px;
  height: 15px;
}

.llm-regenerate-button:disabled,
.llm-key-save:disabled,
.llm-key-delete:disabled {
  opacity: 0.45;
  cursor: default;
}

.llm-settings {
  display: grid;
  gap: 8px;
  padding: 12px;
  border-bottom: 1px solid rgba(150, 225, 235, 0.2);
  background: rgba(8, 31, 43, 0.96);
}

.llm-settings.hidden,
.llm-settings[hidden] {
  display: none !important;
}

.llm-settings-status {
  color: #ffcf77;
  font-size: 0.76rem;
  font-weight: 900;
}

.llm-settings-status.configured {
  color: #8ff3c6;
}

.llm-settings > label {
  color: rgba(232, 247, 250, 0.74);
  font-size: 0.7rem;
  font-weight: 900;
}

.llm-api-key-row {
  gap: 7px;
}

.llm-api-key-row input {
  min-width: 0;
  flex: 1 1 auto;
  height: 40px;
  border: 1px solid rgba(140, 222, 233, 0.34);
  border-radius: 6px;
  outline: 0;
  background: #061b29;
  color: #f5fbff;
  padding: 0 11px;
  font-family: ui-monospace, "Cascadia Code", Consolas, monospace;
  font-size: 0.78rem;
}

.llm-api-key-row input:focus {
  border-color: #8ff3df;
  box-shadow: 0 0 0 3px rgba(82, 219, 198, 0.12);
}

.llm-key-delete {
  border-color: rgba(255, 142, 158, 0.38);
  background: rgba(105, 32, 48, 0.58);
}

.llm-settings p {
  margin: 0;
  color: rgba(215, 236, 240, 0.58);
  font-size: 0.68rem;
  line-height: 1.45;
}

.llm-panel-status {
  min-height: 32px;
  padding: 7px 16px;
  border-bottom: 1px solid rgba(150, 225, 235, 0.14);
  background: rgba(5, 20, 29, 0.88);
  color: rgba(226, 244, 248, 0.7);
  font-size: 0.74rem;
  font-weight: 850;
}

.llm-panel-status[data-kind="loading"] {
  color: #a8eff6;
}

.llm-panel-status[data-kind="success"] {
  color: #8ff3c6;
}

.llm-panel-status[data-kind="error"],
.llm-panel-status[data-kind="setup"] {
  color: #ffb0bb;
}

.llm-panel-status.empty {
  display: none;
}

.llm-explanation-body {
  min-height: 0;
  overflow: auto;
  overscroll-behavior: contain;
  scrollbar-width: thin;
  background:
    linear-gradient(180deg, rgba(236, 247, 250, 0.98), rgba(244, 246, 250, 0.99) 48%, rgba(235, 242, 247, 0.99));
  color: #172534;
  padding: clamp(16px, 2vw, 24px);
  font-family: "Yu Gothic UI", "Meiryo", system-ui, sans-serif;
  font-size: 1rem;
  font-weight: 550;
  line-height: 1.75;
}

.llm-explanation-body .katex-display {
  overflow-x: auto;
  overflow-y: hidden;
  padding: 10px 0;
}

.llm-panel-footer {
  min-height: 20px;
  padding: 0 2px;
  color: rgba(207, 232, 237, 0.58);
  font-size: 0.66rem;
  font-weight: 800;
  text-align: right;
}

.llm-conversation-empty {
  display: grid;
  place-items: center;
  min-height: 100%;
  color: #506779;
  padding: 36px 18px;
  text-align: center;
}

.llm-conversation-empty > span {
  display: grid;
  place-items: center;
  width: 54px;
  height: 54px;
  margin-bottom: 14px;
  border: 1px solid rgba(28, 142, 154, 0.28);
  border-radius: 50%;
  background: linear-gradient(145deg, #d9fbf4, #e5e7ff);
  color: #087a83;
  box-shadow: 0 10px 26px rgba(31, 90, 108, 0.12);
}

.llm-conversation-empty svg {
  width: 25px;
  height: 25px;
}

.llm-conversation-empty strong {
  color: #162f41;
  font-size: 1.08rem;
}

.llm-conversation-empty p {
  max-width: 430px;
  margin: 7px 0 0;
  font-size: 0.86rem;
  line-height: 1.65;
}

.llm-message {
  position: relative;
  min-width: 0;
  margin: 0 0 16px;
}

.llm-message:last-child {
  margin-bottom: 0;
}

.llm-message-assistant {
  padding: clamp(18px, 2.4vw, 26px);
  border: 1px solid rgba(23, 77, 100, 0.15);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.96);
  box-shadow: 0 12px 30px rgba(32, 65, 83, 0.08), inset 3px 0 #24b7aa;
}

.llm-message-user {
  width: fit-content;
  max-width: 86%;
  margin-left: auto;
  padding: 13px 16px;
  border: 1px solid rgba(97, 231, 225, 0.4);
  border-radius: 8px 8px 2px 8px;
  background: linear-gradient(125deg, #116d78, #175881 62%, #574b91);
  color: #f8fdff;
  box-shadow: 0 9px 24px rgba(16, 59, 86, 0.2);
}

.llm-message-user > p,
.llm-message-error > p {
  margin: 0;
  white-space: pre-wrap;
}

.llm-message-error {
  display: flex;
  align-items: flex-start;
  gap: 9px;
  padding: 12px 14px;
  border: 1px solid rgba(205, 61, 83, 0.3);
  border-radius: 7px;
  background: #fff0f2;
  color: #8d2638;
  font-weight: 700;
}

.llm-message-header {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 14px;
  color: #183649;
  line-height: 1;
}

.llm-message-header strong {
  font-size: 0.84rem;
}

.llm-message-header small {
  color: #6b7f8f;
  font-size: 0.68rem;
  font-weight: 750;
}

.llm-message-user .llm-message-header {
  justify-content: flex-end;
  margin-bottom: 7px;
  color: rgba(255, 255, 255, 0.78);
}

.llm-message-avatar {
  display: inline-grid;
  place-items: center;
  width: 27px;
  height: 27px;
  flex: 0 0 auto;
  border-radius: 50%;
  background: linear-gradient(145deg, #d2faf1, #dce5ff);
  color: #08777e;
}

.llm-message-user .llm-message-avatar {
  background: rgba(255, 255, 255, 0.15);
  color: white;
}

.llm-message-avatar svg {
  width: 14px;
  height: 14px;
}

.llm-markdown {
  min-width: 0;
  color: #172534;
  overflow-wrap: anywhere;
}

.llm-markdown > :first-child {
  margin-top: 0 !important;
}

.llm-markdown > :last-child {
  margin-bottom: 0 !important;
}

.llm-markdown h1,
.llm-markdown h2,
.llm-markdown h3,
.llm-markdown h4 {
  color: #102f43;
  line-height: 1.38;
}

.llm-markdown h1 {
  margin: 1.55em 0 0.72em;
  font-size: 1.48rem;
}

.llm-markdown h2 {
  margin: 1.45em 0 0.65em;
  padding-bottom: 7px;
  border-bottom: 1px solid #d9e5ea;
  font-size: 1.26rem;
}

.llm-markdown h3 {
  margin: 1.35em 0 0.56em;
  font-size: 1.1rem;
}

.llm-markdown h4 {
  margin: 1.2em 0 0.5em;
  font-size: 1rem;
}

.llm-markdown p {
  margin: 0.72em 0;
}

.llm-markdown ul,
.llm-markdown ol {
  margin: 0.75em 0;
  padding-left: 1.55em;
}

.llm-markdown li {
  margin: 0.38em 0;
  padding-left: 0.12em;
}

.llm-markdown li::marker {
  color: #098c8d;
  font-weight: 900;
}

.llm-markdown strong {
  color: #073e54;
  font-weight: 900;
}

.llm-markdown blockquote {
  margin: 1em 0;
  padding: 11px 14px;
  border-left: 4px solid #23aaa1;
  background: linear-gradient(90deg, #e8f8f5, #f5f8fb);
  color: #315567;
}

.llm-markdown blockquote p {
  margin: 0;
}

.llm-markdown hr {
  height: 1px;
  margin: 1.35em 0;
  border: 0;
  background: linear-gradient(90deg, transparent, #a6c8cf 15%, #a6c8cf 85%, transparent);
}

.llm-markdown a {
  color: #006d8c;
  font-weight: 800;
  text-decoration-thickness: 1px;
  text-underline-offset: 3px;
}

.llm-markdown code {
  border: 1px solid #d7e2e8;
  border-radius: 4px;
  background: #edf3f6;
  color: #7b2447;
  padding: 0.12em 0.34em;
  font-family: ui-monospace, "Cascadia Code", Consolas, monospace;
  font-size: 0.9em;
}

.llm-markdown pre {
  max-width: 100%;
  overflow-x: auto;
  margin: 1em 0;
  border: 1px solid #203d50;
  border-radius: 7px;
  background: #0d2636;
  color: #eefaff;
  padding: 14px 16px;
}

.llm-markdown pre code {
  border: 0;
  background: none;
  color: inherit;
  padding: 0;
}

.llm-markdown table {
  display: table;
  width: 100%;
  max-width: 100%;
  margin: 1em 0;
  border-spacing: 0;
  border-collapse: collapse;
  table-layout: fixed;
  font-size: clamp(0.82rem, 1.5vw, 0.92rem);
}

.llm-markdown th,
.llm-markdown td {
  min-width: 0;
  border: 1px solid #cedde3;
  padding: 9px 11px;
  overflow-wrap: anywhere;
  word-break: normal;
  white-space: normal;
  text-align: left;
  vertical-align: top;
}

.llm-markdown th {
  background: #e6f3f4;
  color: #163f50;
}

@media (max-width: 680px) {
  .llm-markdown table.llm-responsive-table,
  .llm-markdown table.llm-responsive-table tbody,
  .llm-markdown table.llm-responsive-table tr,
  .llm-markdown table.llm-responsive-table td {
    display: block;
    width: 100%;
  }

  .llm-markdown table.llm-responsive-table {
    border-collapse: separate;
    font-size: 0.9rem;
  }

  .llm-markdown table.llm-responsive-table thead {
    position: absolute;
    width: 1px;
    height: 1px;
    overflow: hidden;
    clip-path: inset(50%);
    white-space: nowrap;
  }

  .llm-markdown table.llm-responsive-table tbody {
    display: grid;
    gap: 10px;
  }

  .llm-markdown table.llm-responsive-table tr {
    overflow: hidden;
    border: 1px solid #c9dce3;
    border-radius: 7px;
    background: rgba(255, 255, 255, 0.78);
    box-shadow: 0 4px 12px rgba(28, 62, 78, 0.08);
  }

  .llm-markdown table.llm-responsive-table td {
    display: grid;
    grid-template-columns: minmax(88px, 32%) minmax(0, 1fr);
    gap: 10px;
    border: 0;
    border-bottom: 1px solid #dce8ec;
    padding: 9px 10px;
  }

  .llm-markdown table.llm-responsive-table td:last-child {
    border-bottom: 0;
  }

  .llm-markdown table.llm-responsive-table td::before {
    content: attr(data-label);
    color: #31596a;
    font-size: 0.78rem;
    font-weight: 900;
    line-height: 1.45;
  }
}

.llm-message-loading {
  display: flex;
  align-items: center;
  gap: 12px;
  width: 112px;
  padding: 12px 14px;
}

.llm-typing-dots {
  display: inline-flex;
  gap: 5px;
}

.llm-typing-dots i {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: #198f91;
  animation: llmTypingDot 1.15s ease-in-out infinite;
}

.llm-typing-dots i:nth-child(2) { animation-delay: 140ms; }
.llm-typing-dots i:nth-child(3) { animation-delay: 280ms; }

.llm-conversation-controls {
  display: grid;
  grid-template-rows: auto auto auto;
  gap: 8px;
  min-height: 132px;
  padding: 10px 12px 8px;
  border-top: 1px solid rgba(150, 225, 235, 0.2);
  background:
    linear-gradient(110deg, rgba(15, 89, 95, 0.16), rgba(77, 54, 112, 0.14)),
    rgba(3, 17, 27, 0.97);
}

.llm-follow-up-suggestions {
  display: flex;
  gap: 7px;
  min-height: 30px;
  overflow-x: auto;
  scrollbar-width: none;
}

.llm-follow-up-suggestions::-webkit-scrollbar {
  display: none;
}

.llm-follow-up-suggestions button {
  min-height: 30px;
  flex: 0 0 auto;
  border: 1px solid rgba(140, 222, 233, 0.3);
  border-radius: 999px;
  background: rgba(17, 54, 70, 0.75);
  color: #dbeef3;
  padding: 0 11px;
  cursor: pointer;
  font-size: 0.7rem;
  font-weight: 850;
}

.llm-follow-up-suggestions button:hover,
.llm-follow-up-suggestions button:focus-visible {
  border-color: #79e6d6;
  background: rgba(27, 100, 107, 0.72);
  color: white;
}

.llm-follow-up-suggestions button:disabled {
  opacity: 0.4;
  cursor: default;
}

.llm-follow-up-form {
  display: flex;
  align-items: flex-end;
  gap: 8px;
  min-width: 0;
  border: 1px solid rgba(151, 224, 235, 0.35);
  border-radius: 8px;
  background: #092434;
  padding: 7px;
  box-shadow: inset 0 1px rgba(255, 255, 255, 0.05);
}

.llm-follow-up-form:focus-within {
  border-color: #72e2d4;
  box-shadow: 0 0 0 3px rgba(67, 206, 190, 0.12), inset 0 1px rgba(255, 255, 255, 0.07);
}

.llm-follow-up-form textarea {
  width: 100%;
  min-width: 0;
  min-height: 38px;
  max-height: 132px;
  resize: none;
  overflow-y: auto;
  border: 0;
  outline: 0;
  background: transparent;
  color: #f2fbff;
  padding: 8px 7px 6px;
  font-family: "Yu Gothic UI", "Meiryo", system-ui, sans-serif;
  font-size: 0.92rem;
  font-weight: 650;
  line-height: 1.5;
}

.llm-follow-up-form textarea::placeholder {
  color: rgba(201, 228, 235, 0.48);
}

.llm-follow-up-form textarea:disabled {
  opacity: 0.55;
}

.llm-follow-up-form button {
  display: grid;
  place-items: center;
  width: 40px;
  height: 40px;
  flex: 0 0 auto;
  border: 1px solid rgba(167, 255, 239, 0.58);
  border-radius: 7px;
  background: linear-gradient(145deg, #14a99e, #267cc1 68%, #6851b0);
  color: white;
  cursor: pointer;
  box-shadow: inset 0 1px rgba(255, 255, 255, 0.24), 0 5px 13px rgba(0, 0, 0, 0.24);
}

.llm-follow-up-form button:hover,
.llm-follow-up-form button:focus-visible {
  filter: brightness(1.14);
}

.llm-follow-up-form button:disabled {
  opacity: 0.35;
  cursor: default;
  filter: none;
}

.llm-follow-up-form button svg {
  width: 18px;
  height: 18px;
}

@keyframes llmTypingDot {
  0%, 60%, 100% { opacity: 0.32; transform: translateY(0); }
  30% { opacity: 1; transform: translateY(-4px); }
}

@media (prefers-reduced-motion: reduce) {
  .llm-typing-dots i {
    animation: none;
    opacity: 0.7;
  }
}

@media (max-width: 980px) {
  .llm-teach-button {
    min-width: 42px;
    width: 42px;
    min-height: 34px;
    padding: 0;
  }

  .llm-teach-button span {
    display: none;
  }

  .llm-explanation-panel {
    top: max(4px, env(safe-area-inset-top));
    right: 4px;
    bottom: max(4px, env(safe-area-inset-bottom));
    left: 8px;
    width: auto;
    height: auto;
    max-height: none;
  }

  .llm-explanation-panel.answer-mode {
    width: auto;
  }

  .llm-explanation-panel.answer-mode .llm-panel-toolbar {
    grid-template-columns: minmax(0, 1fr) auto;
  }

  .llm-explanation-panel.answer-mode .llm-panel-toolbar > label {
    display: none;
  }

  .llm-panel-toolbar {
    display: grid;
    grid-template-columns: auto minmax(0, 1fr) auto;
    gap: 7px;
    padding: 7px 10px;
  }

  .llm-panel-toolbar select {
    width: 100%;
    height: 36px;
  }

  .llm-regenerate-button {
    min-width: 38px;
    min-height: 36px;
    padding: 0 9px;
  }

  .llm-api-key-row {
    flex-wrap: wrap;
  }

  .llm-api-key-row input {
    flex-basis: 100%;
  }

  .llm-explanation-body {
    padding: 12px;
    font-size: 0.98rem;
  }

  .llm-message-assistant {
    padding: 16px;
  }

  .llm-message-user {
    max-width: 94%;
  }

  .llm-conversation-controls {
    min-height: 118px;
    padding-top: 8px;
    padding-bottom: max(8px, env(safe-area-inset-bottom));
  }

  .llm-explanation-panel.answer-mode .llm-conversation-controls {
    min-height: 98px;
    gap: 6px;
  }
}

@media (max-width: 520px) {
  .llm-panel-header {
    min-height: 58px;
    padding: 8px 9px 8px 12px;
  }

  .llm-panel-title small {
    display: none;
  }

  .llm-panel-actions button {
    width: 36px;
    height: 36px;
  }

  .llm-regenerate-button span {
    display: none;
  }

  .llm-panel-status {
    min-height: 28px;
    padding: 5px 12px;
  }
}

/* Immersive study mode: a focused, theme-aware scene without moving the backdrop image. */
:root[data-theme="fantasy"] {
  --immersive-primary: #63efff;
  --immersive-secondary: #ffd56f;
  --immersive-tertiary: #b973ff;
  --immersive-surface: rgba(5, 20, 30, 0.88);
  --immersive-surface-strong: rgba(11, 18, 34, 0.96);
  --immersive-edge: rgba(255, 215, 111, 0.82);
}

:root[data-theme="mediterranean"] {
  --immersive-primary: #3eeaff;
  --immersive-secondary: #ffe56b;
  --immersive-tertiary: #ff729c;
  --immersive-surface: rgba(0, 69, 99, 0.86);
  --immersive-surface-strong: rgba(0, 43, 70, 0.96);
  --immersive-edge: rgba(255, 232, 114, 0.9);
}

:root[data-theme="event-horizon"] {
  --immersive-primary: #8be8ff;
  --immersive-secondary: #ffbd72;
  --immersive-tertiary: #c18aff;
  --immersive-surface: rgba(6, 9, 28, 0.9);
  --immersive-surface-strong: rgba(4, 5, 19, 0.97);
  --immersive-edge: rgba(184, 139, 255, 0.86);
}

.immersive-mode-button {
  position: relative;
  overflow: hidden;
}

.immersive-mode-button::after {
  content: "";
  position: absolute;
  inset: auto 7px 4px;
  height: 2px;
  border-radius: 2px;
  background: linear-gradient(90deg, var(--immersive-primary), var(--immersive-secondary), var(--immersive-tertiary));
  opacity: 0;
  transform: scaleX(0.35);
  transition: opacity 160ms ease, transform 160ms ease;
}

.immersive-mode-button.active {
  border-color: var(--immersive-edge) !important;
  background:
    linear-gradient(135deg, color-mix(in srgb, var(--immersive-primary) 52%, transparent), color-mix(in srgb, var(--immersive-tertiary) 46%, transparent)),
    rgba(4, 23, 38, 0.94) !important;
  box-shadow: 0 0 22px color-mix(in srgb, var(--immersive-primary) 30%, transparent) !important;
}

.immersive-mode-button.active::after {
  opacity: 1;
  transform: scaleX(1);
}

.immersive-frame,
.immersive-hud,
.immersive-scene-intro {
  display: none;
}

body.immersive-mode {
  overflow-x: hidden;
}

body.immersive-mode .app-shell {
  grid-template-columns: minmax(0, 1fr) !important;
  width: 100vw !important;
  max-width: 100vw !important;
}

body.immersive-mode .sidebar,
body.immersive-mode .right-rail {
  display: none !important;
}

body.immersive-mode .main {
  position: relative;
  z-index: 4;
  gap: 12px;
  width: 100%;
  min-height: 100dvh;
  padding: 12px clamp(14px, 2.1vw, 38px) 92px;
  background:
    linear-gradient(90deg, color-mix(in srgb, var(--immersive-primary) 5%, transparent), transparent 16%, transparent 84%, color-mix(in srgb, var(--immersive-tertiary) 6%, transparent)),
    linear-gradient(180deg, rgba(2, 9, 18, 0.12), rgba(2, 13, 23, 0.32));
}

body.immersive-mode .topbar {
  position: relative;
  overflow: visible;
  border: 1px solid color-mix(in srgb, var(--immersive-primary) 62%, transparent);
  background:
    linear-gradient(105deg, color-mix(in srgb, var(--immersive-tertiary) 24%, transparent), transparent 34%, color-mix(in srgb, var(--immersive-primary) 18%, transparent)),
    var(--immersive-surface-strong) !important;
  box-shadow:
    inset 0 1px rgba(255, 255, 255, 0.14),
    inset 0 -2px color-mix(in srgb, var(--immersive-secondary) 36%, transparent),
    0 18px 50px rgba(0, 0, 0, 0.32),
    0 0 34px color-mix(in srgb, var(--immersive-primary) 10%, transparent);
  backdrop-filter: blur(18px) saturate(1.18);
}

body.immersive-mode .topbar::after {
  content: "FOCUS LINK / ACTIVE";
  position: absolute;
  right: 12px;
  bottom: -9px;
  z-index: 2;
  border: 1px solid color-mix(in srgb, var(--immersive-primary) 54%, transparent);
  border-radius: 4px;
  background: var(--immersive-surface-strong);
  color: var(--immersive-primary);
  padding: 2px 8px;
  font-family: ui-monospace, "Cascadia Code", Consolas, monospace;
  font-size: 0.55rem;
  font-weight: 900;
  letter-spacing: 0.08em;
}

body.immersive-mode .playfield,
body.immersive-mode .playfield:has(> .quiz-panel.source-layout:not(.review-layout)),
body.immersive-mode .playfield:has(> .quiz-panel.long-question-layout:not(.source-layout)),
body.immersive-mode .playfield:has(> .quiz-panel.content-flow-layout:not(.quiz-custom-layout)) {
  display: block !important;
  grid-template-columns: minmax(0, 1fr) !important;
  width: 100% !important;
  max-width: none !important;
  min-height: 0 !important;
}

body.immersive-mode .quiz-panel,
body.immersive-mode .playfield > .quiz-panel.source-layout:not(.review-layout),
body.immersive-mode .playfield > .quiz-panel.long-question-layout:not(.source-layout),
body.immersive-mode .playfield > .quiz-panel.content-flow-layout:not(.workbook-layout):not(.quiz-custom-layout) {
  position: relative;
  width: min(100%, 1900px) !important;
  max-width: 1900px !important;
  min-height: 0 !important;
  margin: 0 auto !important;
  border: 1px solid var(--immersive-edge) !important;
  background:
    linear-gradient(132deg, color-mix(in srgb, var(--immersive-primary) 9%, transparent), transparent 28%, color-mix(in srgb, var(--immersive-tertiary) 8%, transparent)),
    linear-gradient(180deg, var(--immersive-surface), color-mix(in srgb, var(--immersive-surface-strong) 94%, transparent)) !important;
  box-shadow:
    inset 0 0 0 1px color-mix(in srgb, var(--immersive-primary) 22%, transparent),
    inset 0 0 70px color-mix(in srgb, var(--immersive-primary) 5%, transparent),
    0 28px 76px rgba(0, 0, 0, 0.42),
    0 0 44px color-mix(in srgb, var(--immersive-primary) 12%, transparent) !important;
  backdrop-filter: blur(14px) saturate(1.12);
}

body.immersive-mode .quiz-panel::before {
  inset: 7px !important;
  border-color: color-mix(in srgb, var(--immersive-primary) 34%, transparent) !important;
  box-shadow:
    inset 0 0 52px color-mix(in srgb, var(--immersive-primary) 7%, transparent),
    0 0 18px color-mix(in srgb, var(--immersive-primary) 6%, transparent) !important;
}

body.immersive-mode .question-board {
  border-color: color-mix(in srgb, var(--immersive-primary) 58%, transparent) !important;
  background:
    linear-gradient(112deg, color-mix(in srgb, var(--immersive-primary) 9%, transparent), transparent 56%, color-mix(in srgb, var(--immersive-tertiary) 10%, transparent)),
    color-mix(in srgb, var(--immersive-surface-strong) 94%, transparent) !important;
  box-shadow:
    inset 4px 0 var(--immersive-primary),
    inset -1px 0 color-mix(in srgb, var(--immersive-tertiary) 35%, transparent),
    0 18px 38px rgba(0, 0, 0, 0.25) !important;
}

body.immersive-mode .question-board::after {
  content: "IMMERSIVE QUEST";
  color: color-mix(in srgb, var(--immersive-primary) 86%, white);
}

body.immersive-mode .question-text {
  color: #fbfeff;
  font-size: clamp(1.35rem, 1.72vw, 2.15rem) !important;
  line-height: 1.62 !important;
  text-shadow: 0 2px 2px rgba(0, 0, 0, 0.42), 0 0 20px color-mix(in srgb, var(--immersive-primary) 9%, transparent);
}

body.immersive-mode .answer-dock {
  border-color: color-mix(in srgb, var(--immersive-primary) 42%, transparent) !important;
  background:
    linear-gradient(135deg, color-mix(in srgb, var(--immersive-primary) 7%, transparent), color-mix(in srgb, var(--immersive-tertiary) 7%, transparent)),
    color-mix(in srgb, var(--immersive-surface-strong) 91%, transparent) !important;
}

body.immersive-mode .option-button {
  min-height: clamp(58px, 7vh, 86px);
  border-color: color-mix(in srgb, var(--immersive-primary) 42%, #b9dce7) !important;
  background:
    linear-gradient(105deg, #ffffff 0%, #e8faff 40%, color-mix(in srgb, var(--immersive-primary) 13%, #eff9ff) 72%, color-mix(in srgb, var(--immersive-tertiary) 12%, #f7f4ff) 100%) !important;
  box-shadow:
    inset 0 1px white,
    inset 0 -3px color-mix(in srgb, var(--immersive-primary) 18%, transparent),
    0 5px 0 rgba(1, 12, 25, 0.5),
    0 12px 28px rgba(0, 0, 0, 0.18) !important;
}

body.immersive-mode .option-content {
  font-size: clamp(1.18rem, 1.35vw, 1.58rem) !important;
  line-height: 1.45 !important;
}

body.immersive-mode .theme-backdrop-atmosphere,
body.immersive-mode .theme-backdrop-particles {
  opacity: 1;
  filter: saturate(1.18) contrast(1.05);
}

body.immersive-mode .theme-backdrop-image {
  animation: none !important;
  transform: scale(1.03) !important;
}

.immersive-frame {
  position: fixed;
  inset: 0;
  z-index: 1000;
  pointer-events: none;
  border: 1px solid color-mix(in srgb, var(--immersive-primary) 38%, transparent);
  box-shadow:
    inset 0 0 70px rgba(0, 0, 0, 0.42),
    inset 0 0 0 6px color-mix(in srgb, var(--immersive-primary) 3%, transparent);
}

body.immersive-mode .immersive-frame {
  display: block;
}

.immersive-corner {
  position: absolute;
  width: clamp(42px, 6vw, 92px);
  height: clamp(42px, 6vw, 92px);
  border-color: var(--immersive-edge);
  filter: drop-shadow(0 0 8px color-mix(in srgb, var(--immersive-primary) 36%, transparent));
}

.immersive-corner::after {
  content: "";
  position: absolute;
  width: 34%;
  height: 34%;
  border-color: color-mix(in srgb, var(--immersive-primary) 72%, white);
}

.immersive-corner-tl { top: 8px; left: 8px; border-top: 3px solid; border-left: 3px solid; }
.immersive-corner-tr { top: 8px; right: 8px; border-top: 3px solid; border-right: 3px solid; }
.immersive-corner-bl { bottom: 8px; left: 8px; border-bottom: 3px solid; border-left: 3px solid; }
.immersive-corner-br { right: 8px; bottom: 8px; border-right: 3px solid; border-bottom: 3px solid; }
.immersive-corner-tl::after { top: 8px; left: 8px; border-top: 1px solid; border-left: 1px solid; }
.immersive-corner-tr::after { top: 8px; right: 8px; border-top: 1px solid; border-right: 1px solid; }
.immersive-corner-bl::after { bottom: 8px; left: 8px; border-bottom: 1px solid; border-left: 1px solid; }
.immersive-corner-br::after { right: 8px; bottom: 8px; border-right: 1px solid; border-bottom: 1px solid; }

.immersive-hud {
  position: fixed;
  right: 50%;
  bottom: max(18px, env(safe-area-inset-bottom));
  z-index: 1200;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  width: min(760px, calc(100vw - 34px));
  min-height: 58px;
  padding: 7px 8px 7px 14px;
  border: 1px solid color-mix(in srgb, var(--immersive-primary) 58%, transparent);
  border-radius: 8px;
  background:
    linear-gradient(110deg, color-mix(in srgb, var(--immersive-primary) 13%, transparent), color-mix(in srgb, var(--immersive-tertiary) 12%, transparent)),
    var(--immersive-surface-strong);
  color: #f5fcff;
  box-shadow:
    inset 0 1px rgba(255, 255, 255, 0.14),
    0 18px 56px rgba(0, 0, 0, 0.48),
    0 0 28px color-mix(in srgb, var(--immersive-primary) 16%, transparent);
  backdrop-filter: blur(20px) saturate(1.18);
  transform: translateX(50%);
}

.immersive-hud[hidden] {
  display: none !important;
}

.immersive-scene-status,
.immersive-scene-status > span:last-child,
.immersive-hud-actions,
.immersive-sound-switch,
.immersive-volume,
.immersive-exit-button {
  display: flex;
  align-items: center;
}

.immersive-scene-status {
  gap: 10px;
  min-width: 0;
}

.immersive-scene-status > span:last-child {
  align-items: flex-start;
  flex-direction: column;
  min-width: 0;
}

.immersive-scene-status small {
  color: color-mix(in srgb, var(--immersive-primary) 72%, white);
  font-family: ui-monospace, "Cascadia Code", Consolas, monospace;
  font-size: 0.56rem;
  font-weight: 900;
  letter-spacing: 0.1em;
}

.immersive-scene-status strong {
  overflow: hidden;
  max-width: 220px;
  font-size: 1rem;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.immersive-pulse {
  width: 10px;
  height: 10px;
  flex: 0 0 auto;
  border-radius: 50%;
  background: var(--immersive-primary);
  box-shadow: 0 0 0 4px color-mix(in srgb, var(--immersive-primary) 14%, transparent), 0 0 16px var(--immersive-primary);
  animation: immersivePulse 1.8s ease-in-out infinite;
}

.immersive-hud-actions {
  gap: 7px;
}

.immersive-sound-switch,
.immersive-exit-button {
  justify-content: center;
  gap: 7px;
  min-height: 42px;
  border: 1px solid color-mix(in srgb, var(--immersive-primary) 35%, transparent);
  border-radius: 6px;
  background: rgba(0, 0, 0, 0.22);
  color: #f5fcff;
  padding: 0 10px;
  cursor: pointer;
  font-size: 0.74rem;
  font-weight: 900;
}

.immersive-sound-switch > svg,
.immersive-exit-button > svg,
.immersive-volume > svg {
  width: 17px;
  height: 17px;
  flex: 0 0 auto;
}

.immersive-sound-switch b {
  position: relative;
  width: 38px;
  height: 22px;
  flex: 0 0 auto;
  border: 1px solid rgba(255, 255, 255, 0.24);
  border-radius: 999px;
  background: rgba(95, 111, 126, 0.52);
  box-shadow: inset 0 2px 5px rgba(0, 0, 0, 0.3);
}

.immersive-sound-switch b i {
  position: absolute;
  top: 2px;
  left: 2px;
  width: 16px;
  height: 16px;
  border-radius: 50%;
  background: white;
  box-shadow: 0 2px 5px rgba(0, 0, 0, 0.34);
  transition: transform 180ms cubic-bezier(0.2, 0.8, 0.2, 1);
}

.immersive-sound-switch.active b {
  border-color: color-mix(in srgb, var(--immersive-primary) 62%, white);
  background: linear-gradient(90deg, var(--immersive-primary), var(--immersive-tertiary));
}

.immersive-sound-switch.active b i {
  transform: translateX(16px);
}

.immersive-volume {
  gap: 7px;
  width: 130px;
  color: color-mix(in srgb, var(--immersive-primary) 75%, white);
}

.immersive-volume input {
  width: 100%;
  accent-color: var(--immersive-primary);
}

.immersive-volume input:disabled {
  opacity: 0.4;
}

.immersive-exit-button {
  border-color: color-mix(in srgb, var(--immersive-secondary) 48%, transparent);
}

.immersive-sound-switch:hover,
.immersive-sound-switch:focus-visible,
.immersive-exit-button:hover,
.immersive-exit-button:focus-visible {
  border-color: var(--immersive-primary);
  background: color-mix(in srgb, var(--immersive-primary) 16%, rgba(0, 0, 0, 0.3));
}

.immersive-scene-intro {
  position: fixed;
  inset: 0;
  z-index: 1500;
  display: grid;
  place-content: center;
  gap: 8px;
  pointer-events: none;
  background:
    linear-gradient(90deg, transparent 0%, rgba(0, 0, 0, 0.62) 28%, rgba(0, 0, 0, 0.68) 72%, transparent 100%);
  color: white;
  text-align: center;
  opacity: 0;
  visibility: hidden;
}

.immersive-scene-intro.show {
  animation: immersiveSceneReveal 1.7s ease both;
  visibility: visible;
}

.immersive-scene-intro span {
  color: var(--immersive-primary);
  font-family: ui-monospace, "Cascadia Code", Consolas, monospace;
  font-size: clamp(0.68rem, 0.9vw, 0.9rem);
  font-weight: 900;
  letter-spacing: 0.18em;
}

.immersive-scene-intro strong {
  background: linear-gradient(90deg, #ffffff, var(--immersive-secondary) 38%, var(--immersive-primary) 70%, #ffffff);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
  font-size: clamp(2.6rem, 7vw, 7rem);
  font-weight: 950;
  line-height: 1;
  text-shadow: 0 18px 60px rgba(0, 0, 0, 0.34);
}

.immersive-scene-intro small {
  color: rgba(240, 250, 255, 0.82);
  font-size: clamp(0.9rem, 1.4vw, 1.35rem);
  font-weight: 850;
  letter-spacing: 0.08em;
}

@keyframes immersivePulse {
  0%, 100% { opacity: 0.68; transform: scale(0.9); }
  50% { opacity: 1; transform: scale(1.08); }
}

@keyframes immersiveSceneReveal {
  0% { opacity: 0; filter: blur(6px); }
  18%, 66% { opacity: 1; filter: blur(0); }
  100% { opacity: 0; filter: blur(2px); }
}

@media (max-width: 980px) {
  body.immersive-mode .main {
    padding: 8px 8px 78px;
  }

  body.immersive-mode .topbar {
    border-radius: 6px;
  }

  body.immersive-mode .question-text {
    font-size: clamp(1.2rem, 5vw, 1.55rem) !important;
  }

  body.immersive-mode .option-content {
    font-size: clamp(1.08rem, 4.4vw, 1.35rem) !important;
  }

  .immersive-frame {
    border-width: 1px;
  }

  .immersive-hud {
    bottom: max(8px, env(safe-area-inset-bottom));
    gap: 8px;
    width: calc(100vw - 16px);
    min-height: 58px;
    padding: 6px 6px 6px 10px;
  }

  .immersive-scene-status small,
  .immersive-volume,
  .immersive-sound-switch > span,
  .immersive-exit-button > span {
    display: none;
  }

  .immersive-scene-status strong {
    max-width: 110px;
    font-size: 0.78rem;
  }

  .immersive-sound-switch,
  .immersive-exit-button {
    width: 42px;
    padding: 0;
  }

  .immersive-sound-switch b {
    display: none;
  }

  .immersive-sound-switch.active {
    color: var(--immersive-primary);
    box-shadow: inset 0 0 0 1px color-mix(in srgb, var(--immersive-primary) 44%, transparent);
  }
}

@media (prefers-reduced-motion: reduce) {
  .immersive-pulse,
  .immersive-scene-intro.show {
    animation: none !important;
  }

  .immersive-scene-intro.show {
    opacity: 1;
  }
}

/* Mobile performance profile: keep the scene, avoid expensive continuous compositing. */
@media (max-width: 980px), (pointer: coarse) {
  :root[data-performance="mobile"] {
    --academy-bg: url("./assets/magic-academy-stage-mobile.webp");
    --theme-scene: url("./assets/magic-academy-stage-mobile.webp");
  }

  :root[data-performance="mobile"][data-theme="mediterranean"] {
    --academy-bg: url("./assets/themes/mediterranean-sea-mobile.webp");
    --theme-scene: url("./assets/themes/mediterranean-sea-mobile.webp");
  }

  :root[data-performance="mobile"][data-theme="event-horizon"] {
    --academy-bg: url("./assets/themes/event-horizon-mobile.webp");
    --theme-scene: url("./assets/themes/event-horizon-mobile.webp");
  }

  :root[data-performance="mobile"][data-theme="okinawa"] {
    --academy-bg: url("./assets/themes/okinawa-mobile.png");
    --theme-scene: url("./assets/themes/okinawa-mobile.png");
  }

  :root[data-performance="mobile"][data-theme="hokkaido"] {
    --academy-bg: url("./assets/themes/hokkaido-mobile.png");
    --theme-scene: url("./assets/themes/hokkaido-mobile.png");
  }

  :root[data-performance="mobile"][data-theme="halloween"] {
    --academy-bg: url("./assets/themes/halloween-mobile.png");
    --theme-scene: url("./assets/themes/halloween-mobile.png");
  }

  :root[data-performance="mobile"][data-theme="new-year"] {
    --academy-bg: url("./assets/themes/new-year-mobile.png");
    --theme-scene: url("./assets/themes/new-year-mobile.png");
  }

  :root[data-performance="mobile"][data-theme="christmas"] {
    --academy-bg: url("./assets/themes/christmas-mobile.png");
    --theme-scene: url("./assets/themes/christmas-mobile.png");
  }

  :root[data-performance="mobile"][data-theme="hanami"] {
    --academy-bg: url("./assets/themes/hanami-mobile.png");
    --theme-scene: url("./assets/themes/hanami-mobile.png");
  }

  :root[data-performance="mobile"] body {
    background:
      linear-gradient(180deg, rgba(9, 7, 12, 0.28), rgba(5, 14, 17, 0.5)),
      var(--theme-deep, #0b1720);
    background-attachment: scroll;
  }

  :root[data-performance="mobile"] body * {
    -webkit-backdrop-filter: none !important;
    backdrop-filter: none !important;
  }

  :root[data-performance="mobile"] .theme-backdrop-image,
  :root[data-performance="mobile"] .theme-backdrop-atmosphere,
  :root[data-performance="mobile"] .theme-backdrop-particles {
    animation: none !important;
    will-change: auto !important;
  }

  :root[data-performance="mobile"] .theme-backdrop-image {
    inset: 0;
    transform: none !important;
  }

  :root[data-performance="mobile"] .theme-backdrop-atmosphere {
    inset: 0;
    opacity: 0.72;
    mix-blend-mode: normal;
  }

  :root[data-performance="mobile"] .theme-backdrop-particles {
    display: none;
  }

  :root[data-performance="mobile"] .chapter-list > * {
    content-visibility: auto;
    contain-intrinsic-size: auto 58px;
  }
}

/* Mobile answers use the page as the only vertical scroller. */
@media (max-width: 980px) {
  .quiz-panel.review-layout .question-board,
  .quiz-panel.source-layout.review-layout .question-board {
    display: flex;
    flex: 0 0 auto;
    flex-direction: column;
    height: auto;
    min-height: 0;
    max-height: none;
    overflow: visible;
    scrollbar-gutter: auto;
  }

  .quiz-panel .answer-dock,
  .quiz-panel.source-layout .answer-dock,
  .quiz-panel.source-layout:not(.review-layout) .answer-dock,
  .quiz-panel.review-layout .answer-dock,
  .quiz-panel.source-layout.review-layout .answer-dock,
  .quiz-panel.quiz-custom-layout.source-layout:not(.review-layout) .answer-dock,
  .quiz-panel .feedback:not(.hidden),
  .quiz-panel .feedback-body {
    height: auto;
    max-height: none;
    overflow: visible;
    scrollbar-gutter: auto;
    overscroll-behavior-y: auto;
    touch-action: pan-y;
  }

  .quiz-panel .option-explanation-card,
  .quiz-panel.source-layout.inline-choice-feedback:not(.review-layout) .answer-dock .option-explanation-card,
  .quiz-panel.review-layout .answer-dock .option-explanation-card {
    height: auto;
    max-height: none;
    overflow: visible;
  }

  .quiz-panel .option-explanation-body {
    height: auto;
    max-height: none;
    overflow-x: auto;
    overflow-y: visible;
  }

  .result-burst {
    position: fixed;
    inset: 0;
    z-index: 1000;
    width: 100vw;
    height: 100vh;
    height: 100dvh;
    max-width: none;
    min-height: 100vh;
    min-height: 100dvh;
    max-height: none;
    margin: 0;
    overflow: hidden;
    translate: none;
    transform: none;
  }
}
