* {
  box-sizing: border-box;
}

:root {
  --game-blue: #1098e8;
  --game-blue-dark: #0677c7;
  --game-mint: #28c7b1;
  --game-coral: #ff6961;
  --game-yellow: #ffd95a;
  --game-lavender: #8b5cf6;
  --game-orange: #ff9f43;
  --game-green: #38c26f;
  --game-ink: #1e3565;
  --game-muted: #5e7397;
  --game-line: rgba(75, 134, 196, 0.26);
  --game-glass: rgba(255, 255, 255, 0.78);
  --game-glass-strong: rgba(255, 255, 255, 0.9);
  --game-shadow: 0 18px 44px rgba(29, 89, 145, 0.22);
  --game-shadow-soft: 0 10px 24px rgba(39, 103, 158, 0.16);
  --game-pop-shadow: 0 9px 0 rgba(30, 53, 101, 0.08), 0 20px 36px rgba(39, 103, 158, 0.18);
}

html {
  min-height: 100%;
}

body {
  background: #dff7ff;
  color: var(--game-ink);
  font-family:
    -apple-system, BlinkMacSystemFont, "Segoe UI", "PingFang SC", "Hiragino Sans GB",
    "Microsoft YaHei", sans-serif;
  margin: 0;
  min-height: 100vh;
  overflow-x: hidden;
}

body::before {
  background-image: url("./assets/game-bg-landscape.png");
  background-position: center;
  background-repeat: no-repeat;
  background-size: cover;
  content: "";
  inset: 0;
  position: fixed;
  z-index: -2;
}

body::after {
  background:
    linear-gradient(180deg, rgba(240, 252, 255, 0.02), rgba(198, 239, 255, 0.22)),
    linear-gradient(90deg, rgba(255, 255, 255, 0.08), rgba(255, 255, 255, 0));
  content: "";
  inset: 0;
  pointer-events: none;
  position: fixed;
  z-index: -1;
}

button,
input,
select {
  font: inherit;
}

button {
  cursor: pointer;
}

button:disabled {
  cursor: not-allowed;
  opacity: 0.58;
}

#app {
  min-height: 100vh;
  position: relative;
}

.login-page {
  align-items: center;
  display: grid;
  min-height: 100vh;
  padding: clamp(18px, 4vw, 40px);
}

.login-card,
.child-overview,
.metric,
.panel,
.unit-card,
.day-row,
.detail-row,
.training-frame,
.control-panel {
  background: var(--game-glass);
  border: 1px solid rgba(255, 255, 255, 0.78);
  border-radius: 8px;
  box-shadow: var(--game-shadow-soft);
  backdrop-filter: blur(18px) saturate(140%);
}

.login-card {
  display: grid;
  gap: 20px;
  margin: 0 auto;
  max-width: 440px;
  padding: clamp(22px, 4vw, 30px);
  position: relative;
  width: 100%;
}

.login-card::before,
.panel::before {
  background: linear-gradient(90deg, var(--game-coral), #19b7f6, var(--game-mint));
  border-radius: 999px;
  content: "";
  height: 5px;
  left: 18px;
  position: absolute;
  right: 18px;
  top: 12px;
}

.login-card,
.panel {
  overflow: hidden;
  position: relative;
}

.brand-block {
  display: grid;
  gap: 8px;
  padding-top: 10px;
  position: relative;
}

.brand-block::before {
  background:
    radial-gradient(circle, #fff 0 18%, transparent 19%),
    radial-gradient(circle, transparent 0 39%, #ff6f6a 40% 47%, transparent 48%),
    radial-gradient(circle, transparent 0 61%, #18aeea 62% 69%, transparent 70%);
  border-radius: 50%;
  box-shadow: 0 8px 18px rgba(0, 142, 204, 0.18);
  content: "";
  height: 54px;
  width: 54px;
}

.brand-block h1,
.page-title h1,
.unit-title h1 {
  line-height: 1.1;
  margin: 0;
}

.brand-block h1 {
  color: var(--game-ink);
  font-size: clamp(30px, 4vw, 38px);
  font-weight: 950;
}

.brand-block span,
.page-title span,
.unit-title span,
.muted {
  color: var(--game-muted);
}

.login-form,
.field {
  display: grid;
  gap: 8px;
}

.field span {
  color: var(--game-ink);
  font-size: 13px;
  font-weight: 900;
}

.field input {
  background: rgba(255, 255, 255, 0.94);
  border: 1px solid rgba(44, 138, 210, 0.28);
  border-radius: 8px;
  box-shadow: inset 0 2px 0 rgba(255, 255, 255, 0.86);
  color: var(--game-ink);
  min-height: 46px;
  outline: none;
  padding: 11px 13px;
}

.field select {
  background: rgba(255, 255, 255, 0.94);
  border: 1px solid rgba(44, 138, 210, 0.28);
  border-radius: 8px;
  box-shadow: inset 0 2px 0 rgba(255, 255, 255, 0.86);
  color: var(--game-ink);
  min-height: 46px;
  outline: none;
  padding: 10px 11px;
}

.field input:focus,
.field select:focus {
  border-color: rgba(16, 152, 232, 0.76);
  box-shadow: 0 0 0 4px rgba(16, 152, 232, 0.15);
}

.quick-login {
  display: grid;
  gap: 10px;
  grid-template-columns: 1fr 1fr;
}

.app-shell {
  min-height: 100vh;
}

.topbar {
  align-items: center;
  background: rgba(255, 255, 255, 0.72);
  border-bottom: 1px solid rgba(255, 255, 255, 0.7);
  box-shadow: 0 10px 28px rgba(43, 107, 168, 0.13);
  display: flex;
  justify-content: space-between;
  min-height: 76px;
  padding: 14px clamp(16px, 4vw, 42px);
  position: sticky;
  top: 0;
  z-index: 10;
  backdrop-filter: blur(18px) saturate(140%);
}

.topbar strong {
  color: var(--game-ink);
  display: block;
  font-size: 19px;
  font-weight: 950;
}

.topbar span {
  color: var(--game-muted);
  display: block;
  font-size: 13px;
  font-weight: 750;
  margin-top: 3px;
}

.content {
  display: grid;
  gap: 18px;
  margin: 0 auto;
  max-width: 1200px;
  padding: 22px clamp(16px, 4vw, 40px) 40px;
  width: 100%;
}

.account-footer {
  display: flex;
  justify-content: center;
  padding: 14px 0 8px;
}

.account-logout-btn {
  background: rgba(255, 255, 255, 0.9);
  border: 1px solid rgba(255, 105, 97, 0.28);
  border-radius: 10px;
  box-shadow: 0 4px 0 rgba(210, 84, 74, 0.16);
  color: #b7332d;
  font-weight: 950;
  min-height: 44px;
  padding: 10px 16px;
  width: 176px;
}

.account-logout-btn:hover,
.account-logout-btn:focus-visible {
  background: #fff5f4;
  outline: none;
  transform: translateY(-1px);
}

.page-head,
.unit-head {
  align-items: center;
  background:
    linear-gradient(135deg, rgba(255, 255, 255, 0.88), rgba(223, 247, 255, 0.72)),
    rgba(255, 255, 255, 0.58);
  border: 1px solid rgba(255, 255, 255, 0.82);
  border-radius: 8px;
  box-shadow: var(--game-pop-shadow);
  display: flex;
  gap: 14px;
  justify-content: space-between;
  padding: 16px;
  overflow: hidden;
  position: relative;
  backdrop-filter: blur(14px) saturate(135%);
}

.page-head::before,
.unit-head::before {
  background: linear-gradient(90deg, var(--game-coral), var(--game-yellow), var(--game-mint), var(--game-blue));
  bottom: 0;
  content: "";
  height: 5px;
  left: 0;
  position: absolute;
  right: 0;
}

.page-head::after {
  background:
    linear-gradient(135deg, rgba(255, 105, 97, 0.18), rgba(255, 217, 90, 0.14)),
    linear-gradient(45deg, transparent 0 34%, rgba(255, 255, 255, 0.36) 35% 45%, transparent 46%);
  content: "";
  height: 138px;
  position: absolute;
  right: -34px;
  top: -42px;
  transform: rotate(9deg);
  width: 208px;
}

.page-head > *,
.unit-head > * {
  position: relative;
  z-index: 1;
}

.page-title h1,
.unit-title h1 {
  color: var(--game-ink);
  font-size: clamp(27px, 3vw, 38px);
  font-weight: 950;
  letter-spacing: 0;
  text-shadow: 0 3px 0 rgba(255, 255, 255, 0.72);
}

.unit-page {
  --unit-color: var(--game-blue);
  --unit-soft: rgba(16, 152, 232, 0.12);
}

.unit-page[data-unit-type="randomDot"] {
  --unit-color: var(--game-coral);
  --unit-soft: rgba(255, 105, 97, 0.14);
}

.unit-page[data-unit-type="sceneDepth"] {
  --unit-color: var(--game-mint);
  --unit-soft: rgba(40, 199, 177, 0.14);
}

.unit-page[data-unit-type="manual"] {
  --unit-color: var(--game-yellow);
  --unit-soft: rgba(255, 217, 90, 0.2);
}

.unit-page[data-unit-type="sets"] {
  --unit-color: var(--game-green);
  --unit-soft: rgba(56, 194, 111, 0.16);
}

.unit-page[data-unit-type="hangBar"] {
  --unit-color: var(--game-lavender);
  --unit-soft: rgba(139, 92, 246, 0.14);
}

.unit-detail-head {
  background:
    linear-gradient(90deg, var(--unit-soft), rgba(255, 255, 255, 0.9) 35%, rgba(236, 250, 255, 0.72)),
    rgba(255, 255, 255, 0.76);
  align-items: center;
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(150px, 210px) auto;
  min-height: 126px;
}

.unit-detail-head::before {
  background: linear-gradient(90deg, var(--unit-color), var(--game-yellow), var(--game-mint), var(--game-blue));
}

.unit-detail-head::after {
  background:
    linear-gradient(135deg, var(--unit-soft), rgba(255, 255, 255, 0.18)),
    var(--unit-art);
  background-position: right -18px center;
  background-repeat: no-repeat;
  background-size: 300px auto;
  opacity: 0.16;
  transform: none;
}

.unit-detail-art {
  align-items: center;
  display: grid;
  justify-items: center;
  min-height: 96px;
  position: relative;
}

.unit-detail-art::before {
  background:
    radial-gradient(circle at 50% 52%, rgba(255, 255, 255, 0.88), rgba(255, 255, 255, 0) 69%),
    var(--unit-soft);
  border: 1px solid rgba(255, 255, 255, 0.78);
  border-radius: 8px;
  content: "";
  inset: 8px 0;
  position: absolute;
}

.unit-detail-art img {
  display: block;
  height: 112px;
  max-width: 210px;
  object-fit: contain;
  position: relative;
  width: 210px;
}

.child-overview {
  background:
    linear-gradient(135deg, rgba(255, 255, 255, 0.94), rgba(232, 251, 255, 0.8)),
    rgba(255, 255, 255, 0.78);
  border: 1px solid rgba(255, 255, 255, 0.82);
  border-radius: 8px;
  box-shadow: var(--game-shadow-soft);
  display: grid;
  gap: 12px;
  grid-template-columns: minmax(150px, 0.62fr) minmax(310px, 1.25fr) minmax(260px, 1fr);
  overflow: hidden;
  padding: 14px 16px;
  position: relative;
  backdrop-filter: blur(16px) saturate(140%);
}

.child-overview::before {
  background: linear-gradient(90deg, rgba(255, 217, 90, 0.34), rgba(40, 199, 177, 0.2), rgba(16, 152, 232, 0.18));
  content: "";
  inset: 0 0 auto;
  height: 5px;
  position: absolute;
}

.overview-copy {
  align-items: center;
  align-content: center;
  display: grid;
  gap: 5px;
  position: relative;
  z-index: 1;
}

.overview-copy span {
  color: var(--game-ink);
  font-size: 15px;
  font-weight: 950;
}

.overview-copy strong {
  color: var(--game-blue-dark);
  font-size: clamp(30px, 4vw, 42px);
  font-weight: 950;
  line-height: 1;
  text-shadow: 0 4px 0 rgba(255, 255, 255, 0.72);
}

.overview-metrics {
  align-items: stretch;
  display: grid;
  gap: 9px;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  position: relative;
  z-index: 1;
}

.child-overview .mission-progress {
  align-content: center;
  background: transparent;
  border: 0;
  box-shadow: none;
  display: grid;
  gap: 9px;
  padding: 0;
  position: relative;
  z-index: 1;
  backdrop-filter: none;
}

.child-overview .mission-progress::before {
  content: none;
}

.mission-progress-track {
  background: rgba(255, 255, 255, 0.74);
  border: 1px solid rgba(44, 138, 210, 0.18);
  border-radius: 999px;
  box-shadow: inset 0 2px 4px rgba(30, 53, 101, 0.08);
  height: 14px;
  overflow: hidden;
  position: relative;
  z-index: 1;
}

.mission-progress-track div {
  background: linear-gradient(90deg, var(--game-coral), var(--game-yellow), var(--game-mint), var(--game-blue));
  border-radius: inherit;
  box-shadow: inset 0 2px 0 rgba(255, 255, 255, 0.45);
  height: 100%;
  transition: width 220ms ease;
}

.mission-progress-dots {
  display: grid;
  gap: 7px;
  grid-template-columns: repeat(auto-fit, minmax(18px, 1fr));
  position: relative;
  z-index: 1;
}

.mission-progress-dots span {
  background: rgba(255, 255, 255, 0.82);
  border: 2px solid rgba(94, 115, 151, 0.24);
  border-radius: 999px;
  box-shadow: inset 0 2px 0 rgba(255, 255, 255, 0.74);
  height: 13px;
}

.mission-progress-dots span.completed {
  background: var(--game-yellow);
  border-color: rgba(255, 255, 255, 0.88);
  box-shadow:
    inset 0 2px 0 rgba(255, 255, 255, 0.52),
    0 4px 9px rgba(239, 183, 0, 0.26);
}

.metric {
  background:
    linear-gradient(135deg, rgba(255, 255, 255, 0.94), rgba(236, 250, 255, 0.78)),
    var(--game-glass);
  border-color: rgba(255, 255, 255, 0.84);
  overflow: hidden;
  padding: 11px 12px 12px;
  position: relative;
}

.metric::before {
  background: var(--metric-color, var(--game-blue));
  border-radius: 999px;
  bottom: 12px;
  content: "";
  left: 9px;
  position: absolute;
  top: 12px;
  width: 5px;
}

.metric::after {
  background: linear-gradient(135deg, var(--metric-soft, rgba(255, 217, 90, 0.34)), rgba(255, 255, 255, 0));
  content: "";
  height: 90px;
  position: absolute;
  right: -18px;
  top: -24px;
  transform: rotate(12deg);
  width: 120px;
}

.metric-complete {
  --metric-color: var(--game-coral);
  --metric-soft: rgba(255, 105, 97, 0.24);
}

.metric-minutes {
  --metric-color: var(--game-blue);
  --metric-soft: rgba(16, 152, 232, 0.2);
}

.metric-accuracy {
  --metric-color: var(--game-mint);
  --metric-soft: rgba(40, 199, 177, 0.22);
}

.metric span {
  color: var(--game-muted);
  display: block;
  font-size: 12px;
  font-weight: 900;
  padding-left: 8px;
  position: relative;
  z-index: 1;
}

.metric strong {
  color: var(--game-ink);
  display: block;
  font-size: clamp(23px, 3vw, 31px);
  font-weight: 950;
  line-height: 1;
  margin-top: 5px;
  padding-left: 8px;
  position: relative;
  text-shadow: 0 4px 0 rgba(255, 255, 255, 0.72);
  z-index: 1;
}

.unit-list,
.day-list,
.detail-list {
  display: grid;
  gap: 12px;
}

.parent-professional-section {
  border-top: 1px solid rgba(44, 138, 210, 0.16);
  display: grid;
  gap: 12px;
  margin-top: 18px;
  padding-top: 18px;
}

.parent-professional-section .section-title h3 {
  color: var(--game-ink);
  font-size: 17px;
  margin: 0;
}

.parent-professional-list {
  display: grid;
  gap: 12px;
}

.parent-professional-card {
  background:
    linear-gradient(135deg, rgba(231, 247, 255, 0.94), rgba(255, 255, 255, 0.92)),
    var(--game-glass);
  border: 1px solid rgba(44, 138, 210, 0.24);
  border-radius: 10px;
  display: grid;
  gap: 12px;
  padding: 14px;
}

.parent-professional-card.status-completed {
  background: linear-gradient(135deg, #e5faef, rgba(255, 255, 255, 0.94));
  border-color: rgba(40, 199, 177, 0.38);
}

.parent-professional-card.status-stopped {
  background: linear-gradient(135deg, #fff0ee, rgba(255, 255, 255, 0.94));
  border-color: rgba(255, 105, 97, 0.38);
}

.parent-professional-card.status-incomplete {
  background: linear-gradient(135deg, #fff7e5, rgba(255, 255, 255, 0.94));
  border-color: rgba(244, 160, 45, 0.38);
}

.parent-professional-head,
.parent-professional-foot {
  align-items: center;
  display: flex;
  gap: 10px;
  justify-content: space-between;
}

.parent-professional-head strong {
  color: var(--game-ink);
  font-size: 15px;
}

.parent-professional-head > span {
  background: rgba(255, 255, 255, 0.82);
  border: 1px solid rgba(44, 138, 210, 0.18);
  border-radius: 999px;
  color: #3d638a;
  font-size: 12px;
  font-weight: 900;
  padding: 5px 9px;
}

.parent-professional-metrics {
  display: grid;
  gap: 8px;
  grid-template-columns: repeat(3, minmax(0, 1fr));
}

.parent-professional-metrics > div {
  background: rgba(255, 255, 255, 0.72);
  border-radius: 8px;
  display: grid;
  gap: 4px;
  padding: 10px;
}

.parent-professional-metrics span,
.parent-professional-foot {
  color: #657991;
  font-size: 11px;
}

.parent-professional-metrics strong {
  color: #173568;
  font-size: 17px;
}

.parent-professional-anomaly {
  color: #445b73;
  font-size: 13px;
  line-height: 1.55;
  margin: 0;
}

.parent-professional-foot {
  align-items: flex-start;
  border-top: 1px solid rgba(44, 138, 210, 0.12);
  padding-top: 9px;
}

.parent-professional-foot span:last-child {
  max-width: 65%;
  text-align: right;
}

.child-home .unit-list {
  gap: 14px;
}

.unit-card,
.day-row,
.detail-row {
  --unit-color: var(--game-blue);
  --unit-soft: rgba(16, 152, 232, 0.12);
  align-items: center;
  background:
    linear-gradient(90deg, var(--unit-soft), rgba(255, 255, 255, 0.9) 32%, rgba(255, 255, 255, 0.78)),
    var(--game-glass);
  border-color: rgba(255, 255, 255, 0.86);
  display: grid;
  gap: 12px;
  grid-template-columns: minmax(0, 1fr) auto;
  min-height: 92px;
  padding: 16px 16px 16px 18px;
  position: relative;
  transition:
    box-shadow 160ms ease,
    transform 160ms ease,
    background 160ms ease;
}

.unit-card {
  grid-template-columns: minmax(0, 1fr) 168px auto;
  min-height: 118px;
  overflow: hidden;
  padding: 15px 16px 15px 18px;
}

.unit-card::after {
  background:
    linear-gradient(90deg, rgba(255, 255, 255, 0), rgba(255, 255, 255, 0.42)),
    var(--unit-art);
  background-position: right 68px center;
  background-repeat: no-repeat;
  background-size: 220px auto;
  content: "";
  inset: 0;
  opacity: 0.18;
  pointer-events: none;
  position: absolute;
}

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

.unit-card:hover,
.day-row:hover {
  background:
    linear-gradient(90deg, var(--unit-soft), rgba(255, 255, 255, 0.98) 34%, rgba(255, 255, 255, 0.88)),
    var(--game-glass-strong);
  box-shadow: var(--game-pop-shadow);
  transform: translateY(-2px);
}

.unit-card:hover .unit-art-panel img {
  transform: translateY(-2px) scale(1.035);
}

.unit-card[data-unit-type="randomDot"],
.detail-row[data-unit-type="randomDot"] {
  --unit-color: var(--game-coral);
  --unit-soft: rgba(255, 105, 97, 0.14);
}

.unit-card[data-unit-type="sceneDepth"],
.detail-row[data-unit-type="sceneDepth"] {
  --unit-color: var(--game-mint);
  --unit-soft: rgba(40, 199, 177, 0.14);
}

.unit-card[data-unit-type="manual"],
.detail-row[data-unit-type="manual"] {
  --unit-color: var(--game-yellow);
  --unit-soft: rgba(255, 217, 90, 0.2);
}

.unit-card[data-unit-type="sets"],
.detail-row[data-unit-type="sets"] {
  --unit-color: var(--game-green);
  --unit-soft: rgba(56, 194, 111, 0.16);
}

.unit-card[data-unit-type="hangBar"],
.detail-row[data-unit-type="hangBar"] {
  --unit-color: var(--game-lavender);
  --unit-soft: rgba(139, 92, 246, 0.14);
}

.unit-card.status-completed,
.detail-row.status-completed {
  background:
    linear-gradient(90deg, rgba(56, 194, 111, 0.18), rgba(255, 255, 255, 0.92) 34%, rgba(234, 255, 243, 0.82)),
    var(--game-glass-strong);
  border-color: rgba(56, 194, 111, 0.36);
}

.unit-art-panel {
  align-items: center;
  align-self: stretch;
  display: grid;
  justify-items: center;
  min-height: 92px;
  min-width: 154px;
  position: relative;
}

.unit-art-panel::before {
  background:
    radial-gradient(circle at 50% 48%, rgba(255, 255, 255, 0.86), rgba(255, 255, 255, 0) 68%),
    var(--unit-soft);
  border: 1px solid rgba(255, 255, 255, 0.72);
  border-radius: 8px;
  content: "";
  inset: 8px 0;
  position: absolute;
}

.unit-art-panel img {
  display: block;
  height: 106px;
  max-width: 168px;
  object-fit: contain;
  position: relative;
  transition:
    transform 160ms ease,
    filter 160ms ease;
  width: 168px;
}

.unit-card.status-completed .unit-mark::after,
.detail-row.status-completed .unit-mark::after {
  background: var(--game-green);
  box-shadow: 0 0 0 4px rgba(56, 194, 111, 0.18);
}

.unit-card.reminder-active {
  animation: reminderNudge 2.4s ease-in-out infinite;
  background: #fff9e8;
  border-color: rgba(255, 105, 97, 0.55);
  box-shadow:
    0 0 0 4px rgba(255, 105, 97, 0.14),
    0 20px 42px rgba(212, 89, 78, 0.22);
  transform-origin: center;
  z-index: 2;
}

.unit-card.reminder-active::before {
  background: var(--game-coral);
}

.reminder-badge {
  align-items: center;
  background: #fff0ee;
  border: 1px solid rgba(255, 105, 97, 0.42);
  border-radius: 999px;
  color: #b7332d;
  display: none;
  font-size: 13px;
  font-weight: 950;
  justify-content: center;
  min-height: 31px;
  padding: 6px 11px;
  white-space: nowrap;
}

.unit-card.reminder-active .reminder-badge {
  display: inline-flex;
}

@keyframes reminderNudge {
  0%,
  72%,
  100% {
    transform: scale(1.025) translateX(0);
  }
  78% {
    transform: scale(1.035) translateX(-4px);
  }
  84% {
    transform: scale(1.035) translateX(4px);
  }
  90% {
    transform: scale(1.03) translateX(-2px);
  }
}

.unit-card::before,
.detail-row::before {
  background: var(--unit-color);
  border-radius: 999px;
  bottom: 12px;
  content: "";
  box-shadow: 0 0 0 4px rgba(255, 255, 255, 0.62);
  left: 8px;
  position: absolute;
  top: 12px;
  width: 7px;
}

.unit-card[data-unit-type="randomDot"]::before,
.detail-row[data-unit-type="randomDot"]::before {
  background: var(--unit-color);
}

.unit-card[data-unit-type="sceneDepth"]::before,
.detail-row[data-unit-type="sceneDepth"]::before {
  background: var(--unit-color);
}

.unit-card[data-unit-type="manual"]::before,
.detail-row[data-unit-type="manual"]::before {
  background: var(--unit-color);
}

.unit-card[data-unit-type="sets"]::before,
.detail-row[data-unit-type="sets"]::before {
  background: var(--unit-color);
}

.unit-card[data-unit-type="hangBar"]::before,
.detail-row[data-unit-type="hangBar"]::before {
  background: var(--unit-color);
}

.day-row {
  appearance: none;
  border: 2px solid transparent;
  color: inherit;
  grid-template-columns: 1fr;
  text-align: left;
  width: 100%;
}

.day-row.selected {
  background: rgba(255, 255, 255, 0.96);
  border-color: var(--game-blue);
  box-shadow:
    0 0 0 4px rgba(16, 152, 232, 0.18),
    0 16px 32px rgba(11, 105, 184, 0.22);
  transform: translateY(-1px);
}

.day-row.selected::after {
  background: linear-gradient(180deg, #45beff, var(--game-blue-dark));
  border-radius: 999px;
  bottom: 12px;
  content: "";
  left: 9px;
  position: absolute;
  top: 12px;
  width: 5px;
}

.unit-main,
.day-main,
.detail-main {
  min-width: 0;
}

.day-main {
  display: grid;
  gap: 8px;
  padding-left: 6px;
}

.day-title-line {
  align-items: center;
  display: flex;
  gap: 8px;
  justify-content: space-between;
  min-width: 0;
}

.day-title-line em {
  background: #e8f5ff;
  border: 1px solid rgba(16, 152, 232, 0.22);
  border-radius: 999px;
  color: var(--game-blue-dark);
  flex: 0 0 auto;
  font-size: 11px;
  font-style: normal;
  font-weight: 950;
  padding: 3px 8px;
}

.unit-main h2,
.day-main h2,
.detail-main h2 {
  align-items: center;
  color: var(--game-ink);
  display: flex;
  font-size: 20px;
  font-weight: 950;
  gap: 10px;
  margin: 0 0 8px;
}

.day-main h2 {
  margin: 0;
}

.unit-mark {
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.98), var(--unit-soft));
  border: 3px solid var(--unit-color);
  border-radius: 50%;
  color: var(--game-blue);
  display: inline-flex;
  flex: 0 0 auto;
  height: 30px;
  position: relative;
  width: 30px;
  box-shadow:
    inset 0 2px 0 rgba(255, 255, 255, 0.78),
    0 5px 12px rgba(30, 53, 101, 0.14);
}

.unit-mark::after {
  background: var(--unit-color);
  border-radius: 50%;
  content: "";
  height: 9px;
  left: 50%;
  position: absolute;
  top: 50%;
  transform: translate(-50%, -50%);
  width: 9px;
}

[data-unit-type="randomDot"] .unit-mark {
  color: var(--unit-color);
}

[data-unit-type="sceneDepth"] .unit-mark {
  color: var(--unit-color);
}

[data-unit-type="manual"] .unit-mark {
  color: var(--unit-color);
}

[data-unit-type="sets"] .unit-mark {
  color: var(--unit-color);
}

[data-unit-type="hangBar"] .unit-mark {
  color: var(--unit-color);
}

.unit-meta,
.day-meta,
.detail-meta {
  color: var(--game-muted);
  display: flex;
  flex-wrap: wrap;
  gap: 8px 14px;
  font-size: 13px;
  font-weight: 850;
}

.unit-meta span,
.detail-meta span {
  background: rgba(255, 255, 255, 0.68);
  border: 1px solid rgba(44, 138, 210, 0.12);
  border-radius: 999px;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.72);
  color: var(--game-muted);
  line-height: 1;
  padding: 6px 9px;
}

.day-unit-dots {
  display: flex;
  flex-wrap: wrap;
  gap: 5px;
}

.day-unit-chip {
  --unit-color: var(--game-blue);
  --unit-text: #fff;
  align-items: center;
  background: rgba(255, 255, 255, 0.82);
  border: 1px dashed rgba(94, 115, 151, 0.34);
  border-radius: 999px;
  color: #7a8aa5;
  display: inline-flex;
  font-size: 11px;
  font-weight: 950;
  gap: 4px;
  line-height: 1;
  min-height: 22px;
  opacity: 0.72;
  padding: 4px 7px;
  white-space: nowrap;
}

.day-unit-chip::before {
  background: #fff;
  border: 2px solid #9aa9bd;
  border-radius: 50%;
  content: "";
  flex: 0 0 auto;
  height: 9px;
  width: 9px;
}

.day-unit-chip.completed {
  background: var(--unit-color);
  border-color: rgba(255, 255, 255, 0.72);
  border-style: solid;
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.42),
    0 4px 10px rgba(30, 53, 101, 0.12);
  color: var(--unit-text);
  opacity: 1;
}

.day-unit-chip.completed::before {
  align-items: center;
  background: rgba(255, 255, 255, 0.94);
  border-color: rgba(255, 255, 255, 0.94);
  color: var(--unit-color);
  content: "✓";
  display: inline-flex;
  font-size: 8px;
  font-weight: 950;
  height: 11px;
  justify-content: center;
  width: 11px;
}

.day-unit-chip[data-unit-type="randomDot"] {
  --unit-color: var(--game-coral);
}

.day-unit-chip[data-unit-type="sceneDepth"] {
  --unit-color: var(--game-mint);
  --unit-text: var(--game-ink);
}

.day-unit-chip[data-unit-type="manual"] {
  --unit-color: #efb700;
  --unit-text: var(--game-ink);
}

.day-unit-chip[data-unit-type="sets"] {
  --unit-color: #38c26f;
  --unit-text: var(--game-ink);
}

.day-unit-chip[data-unit-type="hangBar"] {
  --unit-color: #8b5cf6;
  --unit-text: #fff;
}

.status {
  align-items: center;
  border: 1px solid rgba(255, 255, 255, 0.7);
  border-radius: 999px;
  box-shadow: inset 0 2px 0 rgba(255, 255, 255, 0.55);
  display: inline-flex;
  font-size: 13px;
  font-weight: 950;
  justify-content: center;
  min-height: 31px;
  padding: 6px 11px;
  white-space: nowrap;
}

.status.pending {
  background: #fff9e8;
  border-color: rgba(255, 217, 90, 0.48);
  color: #8a6811;
}

.status.in_progress {
  background: #e2f5ff;
  color: #0879bd;
}

.status.completed {
  background: #e4fbef;
  color: #148252;
}

.primary-btn,
.secondary-btn,
.ghost-btn,
.danger-btn {
  align-items: center;
  border: 1px solid transparent;
  border-radius: 12px;
  display: inline-flex;
  font-weight: 950;
  justify-content: center;
  min-height: 44px;
  min-width: 86px;
  padding: 10px 15px;
  text-decoration: none;
  transition:
    filter 140ms ease,
    transform 140ms ease,
    box-shadow 140ms ease;
}

.primary-btn {
  background: linear-gradient(180deg, #37c8ff, var(--game-blue-dark));
  border-color: rgba(255, 255, 255, 0.5);
  box-shadow:
    0 6px 0 #075d9c,
    0 12px 22px rgba(5, 106, 179, 0.22);
  color: #fff;
  text-shadow: 0 1px 0 rgba(0, 83, 146, 0.28);
}

.secondary-btn {
  background: linear-gradient(180deg, #f1fbff, #d9efff);
  border-color: rgba(16, 152, 232, 0.28);
  box-shadow: 0 4px 0 rgba(91, 160, 209, 0.35);
  color: var(--game-blue-dark);
}

.ghost-btn {
  background: rgba(255, 255, 255, 0.9);
  border-color: rgba(62, 137, 205, 0.26);
  box-shadow: 0 4px 0 rgba(112, 155, 190, 0.22);
  color: var(--game-ink);
}

.native-reminder-btn.active {
  background: #e4fbef;
  border-color: rgba(20, 130, 82, 0.28);
  color: #148252;
}

.danger-btn {
  background: linear-gradient(180deg, #fff0ee, #ffd7d2);
  border-color: rgba(255, 105, 97, 0.34);
  box-shadow: 0 4px 0 rgba(225, 96, 86, 0.28);
  color: #b7332d;
}

.primary-btn:hover,
.primary-btn:focus-visible,
.secondary-btn:hover,
.secondary-btn:focus-visible,
.ghost-btn:hover,
.ghost-btn:focus-visible,
.danger-btn:hover,
.danger-btn:focus-visible {
  filter: brightness(1.03);
  outline: none;
  transform: translateY(-1px);
}

.primary-btn:active,
.secondary-btn:active,
.ghost-btn:active,
.danger-btn:active {
  box-shadow: 0 1px 0 rgba(30, 53, 101, 0.2);
  transform: translateY(3px);
}

.button-row {
  align-items: center;
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

.lens-settings-btn {
  align-items: center;
  background: rgba(255, 255, 255, 0.92);
  border: 1px solid rgba(44, 138, 210, 0.24);
  border-radius: 50%;
  box-shadow: 0 4px 0 rgba(112, 155, 190, 0.22);
  display: inline-grid;
  height: 44px;
  justify-content: center;
  min-width: 44px;
  padding: 0;
  transition:
    filter 140ms ease,
    transform 140ms ease,
    box-shadow 140ms ease;
  width: 44px;
}

.lens-settings-btn:hover,
.lens-settings-btn:focus-visible {
  filter: brightness(1.03);
  outline: none;
  transform: translateY(-1px);
}

.lens-settings-icon {
  display: block;
  height: 22px;
  position: relative;
  width: 30px;
}

.lens-settings-red,
.lens-settings-blue {
  border: 2px solid #fff;
  border-radius: 50%;
  box-shadow: 0 2px 5px rgba(30, 53, 101, 0.22);
  height: 22px;
  position: absolute;
  top: 0;
  width: 22px;
}

.lens-settings-red {
  background: var(--lens-icon-red, #ff0000);
  left: 0;
  z-index: 1;
}

.lens-settings-blue {
  background: var(--lens-icon-blue, #0000b8);
  right: 0;
}

.lens-settings-layout {
  display: grid;
  gap: 16px;
  grid-template-columns: minmax(0, 0.85fr) minmax(0, 0.85fr) minmax(360px, 1.3fr);
}

.lens-settings-panel,
.lens-preview-panel {
  padding: 16px;
}

.display-calibration-panel {
  display: grid;
  gap: 14px;
  grid-column: 1 / -1;
  padding: 16px;
}

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

.display-calibration-grid .field input[readonly] {
  background: rgba(232, 244, 255, 0.86);
  color: var(--game-muted);
}

.display-calibration-actions {
  align-items: center;
  display: flex;
  gap: 14px;
  justify-content: space-between;
}

.display-calibration-actions p {
  color: var(--game-muted);
  font-size: 13px;
  font-weight: 850;
  margin: 0;
}

.lens-calibration-panel {
  display: grid;
  gap: 14px;
  grid-column: 1 / -1;
  padding: 16px;
}

.lens-compat-card {
  background: #eef7ff;
  border: 1px solid rgba(44, 138, 210, 0.24);
  border-radius: 8px;
  display: grid;
  gap: 4px;
  padding: 12px 14px;
}

.lens-compat-card strong {
  color: var(--game-ink);
  font-size: 18px;
  font-weight: 950;
}

.lens-compat-card span {
  color: var(--game-muted);
  font-size: 14px;
  font-weight: 850;
}

.lens-compat-card.good {
  background: #e4fbef;
  border-color: rgba(40, 199, 177, 0.45);
}

.lens-compat-card.warn {
  background: #fff9e8;
  border-color: rgba(255, 217, 90, 0.64);
}

.lens-compat-card.bad {
  background: #fff0ee;
  border-color: rgba(255, 105, 97, 0.44);
}

.lens-mode-row,
.lens-choice-row {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

.lens-choice-btn {
  background: rgba(255, 255, 255, 0.9);
  border: 1px solid rgba(62, 137, 205, 0.26);
  border-radius: 8px;
  box-shadow: 0 3px 0 rgba(112, 155, 190, 0.2);
  color: var(--game-ink);
  font-weight: 950;
  min-height: 38px;
  padding: 8px 12px;
}

.lens-choice-btn.active {
  background: linear-gradient(180deg, #32b8ff, var(--game-blue-dark));
  border-color: rgba(255, 255, 255, 0.5);
  color: #fff;
}

.lens-test-grid {
  display: grid;
  gap: 12px;
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

.lens-test-card {
  background: rgba(255, 255, 255, 0.78);
  border: 1px solid rgba(44, 138, 210, 0.18);
  border-radius: 8px;
  display: grid;
  gap: 10px;
  padding: 12px;
}

.lens-test-card strong {
  color: var(--game-ink);
  font-size: 15px;
  font-weight: 950;
}

.lens-test-card em {
  color: var(--game-muted);
  font-style: normal;
  font-weight: 900;
}

.lens-test-target {
  align-items: center;
  background: var(--target-bg);
  border: 1px solid rgba(44, 138, 210, 0.22);
  border-radius: 8px;
  display: grid;
  min-height: 78px;
  justify-items: center;
}

.lens-test-target span {
  background: var(--target-color);
  border-radius: 50%;
  display: block;
  height: 44px;
  width: 44px;
}

.lens-swatch-grid {
  display: grid;
  gap: 10px;
  grid-template-columns: repeat(auto-fit, minmax(66px, 1fr));
}

.lens-swatch {
  align-items: center;
  background: rgba(255, 255, 255, 0.9);
  border: 2px solid rgba(44, 138, 210, 0.18);
  border-radius: 8px;
  box-shadow: 0 4px 0 rgba(112, 155, 190, 0.18);
  color: var(--game-ink);
  display: grid;
  font-weight: 950;
  gap: 6px;
  justify-items: center;
  min-height: 72px;
  padding: 9px 6px;
}

.lens-swatch.active {
  border-color: var(--game-blue);
  box-shadow:
    0 0 0 4px rgba(16, 152, 232, 0.16),
    0 5px 0 rgba(91, 160, 209, 0.34);
}

.lens-swatch span {
  background: var(--swatch-color);
  border: 2px solid rgba(255, 255, 255, 0.92);
  border-radius: 50%;
  box-shadow: 0 3px 8px rgba(30, 53, 101, 0.22);
  display: block;
  height: 30px;
  width: 30px;
}

.lens-swatch strong {
  font-size: 11px;
  line-height: 1;
}

.lens-custom-grid {
  display: grid;
  gap: 10px;
  grid-template-columns: 90px minmax(0, 1fr);
  margin-top: 14px;
}

.color-field,
.hex-field {
  display: grid;
  gap: 6px;
}

.color-field span,
.hex-field span {
  color: var(--game-ink);
  font-size: 13px;
  font-weight: 950;
}

.color-field input,
.hex-field input {
  background: rgba(255, 255, 255, 0.94);
  border: 1px solid rgba(44, 138, 210, 0.28);
  border-radius: 8px;
  color: var(--game-ink);
  font-weight: 900;
  min-height: 42px;
  padding: 8px 10px;
  width: 100%;
}

.color-field input {
  padding: 4px;
}

.range-field {
  display: grid;
  gap: 9px;
  margin-top: 16px;
}

.range-field span {
  color: var(--game-ink);
  display: flex;
  font-size: 14px;
  font-weight: 950;
  justify-content: space-between;
}

.range-field input {
  accent-color: var(--game-blue);
  width: 100%;
}

.lens-preview-panel {
  display: grid;
  gap: 14px;
}

.lens-preview-frame {
  aspect-ratio: 2 / 1;
  background: #fff;
  border: 1px solid rgba(44, 138, 210, 0.22);
  border-radius: 8px;
  overflow: hidden;
}

.lens-preview-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  justify-content: flex-end;
}

.training-layout {
  display: grid;
  gap: 16px;
  grid-template-columns: minmax(0, 1fr) 318px;
}

.unit-page .training-layout {
  align-items: stretch;
}

.training-layout > *,
.parent-layout > *,
.plan-unit > * {
  min-width: 0;
}

.training-frame {
  aspect-ratio: 16 / 9;
  background:
    radial-gradient(circle at 50% 46%, rgba(255, 255, 255, 0.82), rgba(255, 255, 255, 0.42) 55%, rgba(191, 236, 252, 0.55)),
    linear-gradient(180deg, rgba(255, 255, 255, 0.7), rgba(228, 249, 255, 0.7));
  min-height: 320px;
  overflow: hidden;
  position: relative;
}

.unit-page .training-frame {
  border-color: rgba(255, 255, 255, 0.86);
  box-shadow: var(--game-pop-shadow);
}

.training-frame::before {
  background:
    radial-gradient(circle, rgba(255, 105, 97, 0.42) 0 8%, transparent 9%),
    radial-gradient(circle, transparent 0 36%, rgba(24, 174, 234, 0.35) 37% 42%, transparent 43%);
  border-radius: 50%;
  content: "";
  height: 220px;
  position: absolute;
  right: -70px;
  top: -60px;
  width: 220px;
}

canvas {
  display: block;
  height: 100%;
  position: relative;
  width: 100%;
  z-index: 1;
}

.manual-stage {
  align-items: center;
  background:
    linear-gradient(90deg, rgba(255, 255, 255, 0.86), rgba(255, 255, 255, 0.7)),
    var(--unit-soft);
  display: grid;
  min-height: 320px;
  padding: 28px;
  position: relative;
  z-index: 1;
  overflow: hidden;
}

.manual-stage::before,
.set-stage::before,
.hang-stage::before {
  background-image: var(--unit-art);
  background-position: right 24px center;
  background-repeat: no-repeat;
  background-size: min(42%, 310px) auto;
  content: "";
  inset: 0;
  opacity: 0.22;
  pointer-events: none;
  position: absolute;
}

.set-stage {
  align-items: center;
  background:
    radial-gradient(circle at 50% 45%, rgba(255, 255, 255, 0.95), rgba(227, 249, 255, 0.72)),
    linear-gradient(180deg, rgba(255, 255, 255, 0.7), rgba(218, 248, 229, 0.72));
  display: grid;
  min-height: 320px;
  padding: 28px;
  position: relative;
  text-align: center;
  z-index: 1;
  overflow: hidden;
}

.set-stage strong {
  color: #21a961;
  display: block;
  font-size: clamp(84px, 16vw, 154px);
  font-weight: 950;
  line-height: 0.9;
  text-shadow: 0 8px 0 rgba(28, 142, 83, 0.12);
}

.set-stage > div,
.hang-stage > div {
  position: relative;
  z-index: 1;
}

.set-stage span {
  color: var(--game-ink);
  display: block;
  font-size: 24px;
  font-weight: 950;
  margin-top: 12px;
}

.hang-stage {
  align-items: center;
  background:
    radial-gradient(circle at 50% 42%, rgba(255, 255, 255, 0.94), rgba(235, 229, 255, 0.7)),
    linear-gradient(180deg, rgba(255, 255, 255, 0.72), rgba(232, 247, 255, 0.76));
  display: grid;
  min-height: 320px;
  padding: 28px;
  position: relative;
  text-align: center;
  z-index: 1;
  overflow: hidden;
}

.hang-stage strong {
  color: #6d3fd9;
  display: block;
  font-size: clamp(72px, 13vw, 132px);
  font-weight: 950;
  line-height: 0.95;
}

.hang-stage span {
  color: var(--game-ink);
  display: block;
  font-size: 22px;
  font-weight: 950;
  margin-top: 12px;
}

.manual-steps {
  display: grid;
  gap: 12px;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  position: relative;
  z-index: 1;
}

.manual-step {
  align-items: center;
  background: rgba(255, 255, 255, 0.86);
  border: 1px solid rgba(44, 138, 210, 0.22);
  border-radius: 8px;
  box-shadow: 0 8px 18px rgba(43, 107, 168, 0.12);
  color: var(--game-ink);
  display: grid;
  font-size: 20px;
  font-weight: 950;
  min-height: 98px;
  padding: 18px;
  text-align: center;
}

.control-panel {
  align-content: start;
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.88), rgba(231, 249, 255, 0.76)),
    var(--game-glass);
  display: grid;
  gap: 14px;
  overflow: hidden;
  padding: 16px;
  position: relative;
}

.unit-page .control-panel::before {
  background-image: var(--unit-art);
  background-position: right -32px bottom -20px;
  background-repeat: no-repeat;
  background-size: 210px auto;
  content: "";
  inset: 0;
  opacity: 0.12;
  pointer-events: none;
  position: absolute;
}

.unit-page .control-panel > * {
  position: relative;
  z-index: 1;
}

.unit-page .control-panel::after {
  background: linear-gradient(90deg, var(--unit-color), rgba(255, 255, 255, 0));
  content: "";
  height: 5px;
  left: 14px;
  position: absolute;
  right: 14px;
  top: 10px;
  border-radius: 999px;
}

.timer {
  background:
    radial-gradient(circle at 88% 12%, rgba(255, 217, 90, 0.95), transparent 22%),
    linear-gradient(180deg, #284a8c, #173568);
  border: 1px solid rgba(255, 255, 255, 0.38);
  border-radius: 8px;
  box-shadow:
    inset 0 2px 0 rgba(255, 255, 255, 0.18),
    0 10px 22px rgba(23, 53, 104, 0.18);
  color: #fff;
  padding: 18px;
}

.timer strong {
  display: block;
  font-size: 43px;
  font-variant-numeric: tabular-nums;
  font-weight: 950;
  line-height: 1;
}

.progress-track {
  background: rgba(255, 255, 255, 0.76);
  border: 1px solid rgba(44, 138, 210, 0.2);
  border-radius: 999px;
  height: 12px;
  overflow: hidden;
}

.progress-bar {
  background: linear-gradient(90deg, var(--game-coral), var(--game-yellow), var(--game-mint));
  border-radius: inherit;
  height: 100%;
  width: 0%;
}

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

.choice-grid.three {
  grid-template-columns: repeat(3, minmax(0, 1fr));
}

.professional-flow {
  display: grid;
  gap: 12px;
}

.professional-phase-track {
  display: grid;
  gap: 7px;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  list-style: none;
  margin: 0;
  padding: 0;
}

.professional-phase-track li {
  align-items: center;
  background: rgba(255, 255, 255, 0.72);
  border: 1px solid rgba(44, 138, 210, 0.18);
  border-radius: 8px;
  color: #5b6f89;
  display: grid;
  font-size: 11px;
  font-weight: 850;
  gap: 4px;
  justify-items: center;
  min-height: 58px;
  padding: 7px 4px;
  text-align: center;
}

.professional-phase-track li span {
  align-items: center;
  background: #dfe9f6;
  border-radius: 999px;
  display: inline-flex;
  height: 22px;
  justify-content: center;
  width: 22px;
}

.professional-phase-track li.completed {
  background: #e2f9ee;
  border-color: rgba(40, 199, 177, 0.42);
  color: #117a59;
}

.professional-phase-track li.completed span {
  background: var(--game-mint);
  color: #fff;
}

.professional-stage-card,
.professional-feedback {
  background: rgba(255, 255, 255, 0.82);
  border: 1px solid rgba(44, 138, 210, 0.2);
  border-radius: 8px;
  display: grid;
  gap: 10px;
  padding: 13px;
}

.professional-stage-card.completed {
  background: #e2f9ee;
  border-color: rgba(40, 199, 177, 0.42);
}

.professional-stage-card strong,
.professional-feedback > span {
  color: var(--game-ink);
  font-weight: 950;
}

.professional-stage-card p {
  color: #586c84;
  font-size: 13px;
  line-height: 1.55;
  margin: 0;
}

.professional-hold-time {
  color: #173568;
  font-size: 28px;
  font-variant-numeric: tabular-nums;
  font-weight: 950;
}

.professional-feedback .choice-btn {
  font-size: 12px;
  min-height: 42px;
}

.professional-feedback .choice-btn.warning {
  background: #fff5e5;
  border-color: rgba(244, 160, 45, 0.4);
  color: #9a5b08;
}

.choice-btn,
.set-btn {
  background: rgba(255, 255, 255, 0.92);
  border: 1px solid rgba(44, 138, 210, 0.24);
  border-radius: 8px;
  box-shadow: 0 4px 0 rgba(112, 155, 190, 0.24);
  color: var(--game-ink);
  font-weight: 950;
  min-height: 46px;
  padding: 10px;
  transition:
    background 140ms ease,
    box-shadow 140ms ease,
    transform 140ms ease;
}

.choice-btn:hover,
.set-btn:hover {
  background: #fff;
  transform: translateY(-1px);
}

.choice-btn.correct {
  background: #ddfbec;
  border-color: rgba(40, 199, 177, 0.48);
  color: #10835a;
}

.choice-btn.wrong {
  background: #fff0ee;
  border-color: rgba(255, 105, 97, 0.48);
  color: #b7332d;
}

@media (max-width: 760px) {
  .professional-phase-track {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .parent-professional-metrics {
    grid-template-columns: 1fr;
  }

  .parent-professional-foot {
    display: grid;
  }

  .parent-professional-foot span:last-child {
    max-width: none;
    text-align: left;
  }
}

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

.set-btn {
  font-size: 17px;
  min-height: 54px;
  padding: 12px;
}

.set-btn.done {
  background: linear-gradient(180deg, #e8fff2, #c9f8df);
  border-color: rgba(41, 188, 104, 0.44);
  box-shadow: 0 4px 0 rgba(41, 188, 104, 0.22);
  color: #12864d;
}

.hang-controls {
  display: grid;
  gap: 12px;
}

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

.hang-rep-row {
  align-items: center;
  background: rgba(255, 255, 255, 0.88);
  border: 1px solid rgba(44, 138, 210, 0.2);
  border-radius: 8px;
  display: flex;
  justify-content: space-between;
  min-height: 40px;
  padding: 9px 11px;
}

.hang-rep-row.done {
  background: #e8fff2;
  border-color: rgba(41, 188, 104, 0.35);
}

.hang-rep-row span,
.hang-rep-row strong {
  color: var(--game-ink);
  font-size: 14px;
  font-weight: 950;
}

.hang-stop-btn:disabled {
  box-shadow: none;
}

.result-line {
  color: var(--game-ink);
  font-size: 14px;
  font-weight: 900;
  min-height: 22px;
}

.compact-btn {
  min-height: 36px;
  min-width: 74px;
  padding: 8px 12px;
}

.panel {
  padding: 20px 16px 16px;
}

.analysis-overview,
.analysis-empty {
  display: grid;
  gap: 14px;
}

.analysis-empty p {
  color: var(--game-muted);
  font-weight: 850;
  margin: 0;
}

.analysis-mini-grid,
.analysis-summary,
.report-grid {
  display: grid;
  gap: 12px;
  grid-template-columns: repeat(4, minmax(0, 1fr));
}

.analysis-metric em {
  color: var(--game-muted);
  display: block;
  font-size: 12px;
  font-style: normal;
  font-weight: 850;
  margin-top: 5px;
}

.bar-chart {
  align-items: end;
  background: rgba(255, 255, 255, 0.56);
  border: 1px solid rgba(44, 138, 210, 0.16);
  border-radius: 8px;
  display: grid;
  gap: 8px;
  grid-template-columns: repeat(7, minmax(0, 1fr));
  min-height: 136px;
  padding: 14px 12px 10px;
}

.bar-item {
  align-items: center;
  display: grid;
  gap: 5px;
  grid-template-rows: 1fr auto auto;
  height: 108px;
  justify-items: center;
  min-width: 0;
}

.bar-fill {
  align-self: end;
  background: linear-gradient(180deg, var(--game-yellow), var(--game-blue));
  border-radius: 999px 999px 4px 4px;
  box-shadow: 0 5px 12px rgba(6, 119, 199, 0.18);
  display: block;
  min-height: 6px;
  width: min(70%, 30px);
}

.bar-item small,
.bar-item em {
  color: var(--game-muted);
  font-size: 11px;
  font-style: normal;
  font-weight: 850;
  line-height: 1;
  min-width: 0;
}

.analysis-chart-grid {
  display: grid;
  gap: 14px;
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

.analysis-chart-grid h3,
.report-section h3 {
  color: var(--game-ink);
  font-size: 16px;
  font-weight: 950;
  margin: 0 0 10px;
}

.unit-analysis-grid {
  display: grid;
  gap: 12px;
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

.unit-analysis-card {
  background: rgba(255, 255, 255, 0.82);
  border: 1px solid rgba(44, 138, 210, 0.2);
  border-radius: 8px;
  box-shadow: 0 8px 18px rgba(43, 107, 168, 0.1);
  display: grid;
  gap: 12px;
  padding: 14px;
}

.unit-analysis-head {
  align-items: center;
  display: flex;
  gap: 12px;
  justify-content: space-between;
}

.unit-analysis-head h3 {
  align-items: center;
  color: var(--game-ink);
  display: flex;
  font-size: 17px;
  font-weight: 950;
  gap: 10px;
  margin: 0;
  min-width: 0;
}

.unit-analysis-head strong {
  background: #eef7ff;
  border-radius: 999px;
  color: var(--game-blue-dark);
  flex: 0 0 auto;
  font-size: 14px;
  padding: 6px 10px;
}

.analysis-meta {
  color: var(--game-muted);
  display: flex;
  flex-wrap: wrap;
  gap: 6px 12px;
  font-size: 12px;
  font-weight: 850;
}

.spark-bars {
  align-items: end;
  background: rgba(238, 247, 255, 0.76);
  border-radius: 8px;
  display: grid;
  gap: 4px;
  grid-template-columns: repeat(7, minmax(0, 1fr));
  height: 56px;
  padding: 8px;
}

.spark-bars span {
  background: linear-gradient(180deg, var(--game-coral), var(--game-blue));
  border-radius: 999px 999px 4px 4px;
  display: block;
  min-height: 8px;
}

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

.alert-item {
  align-items: center;
  background: rgba(255, 255, 255, 0.78);
  border: 1px solid rgba(44, 138, 210, 0.18);
  border-left: 5px solid var(--game-blue);
  border-radius: 8px;
  display: grid;
  gap: 4px;
  grid-template-columns: 72px minmax(0, 1fr);
  padding: 12px;
}

.alert-item.ok {
  border-left-color: #38c26f;
}

.alert-item.watch,
.alert-item.attention {
  border-left-color: var(--game-coral);
}

.alert-item strong,
.alert-item span {
  color: var(--game-ink);
  font-weight: 900;
}

.alert-item span {
  color: var(--game-muted);
}

.report-panel {
  background: rgba(255, 255, 255, 0.88);
  border: 1px solid rgba(255, 255, 255, 0.78);
  border-radius: 8px;
  box-shadow: var(--game-shadow);
  display: grid;
  gap: 18px;
  padding: 20px;
}

.report-title {
  border-bottom: 1px solid rgba(44, 138, 210, 0.18);
  display: grid;
  gap: 6px;
  padding-bottom: 14px;
}

.report-title h2 {
  color: var(--game-ink);
  font-size: clamp(24px, 3vw, 34px);
  font-weight: 950;
  margin: 0;
}

.report-title span,
.report-note {
  color: var(--game-muted);
  font-weight: 850;
}

.report-section {
  display: grid;
  gap: 10px;
}

.report-table {
  display: grid;
  gap: 8px;
}

.report-row {
  align-items: center;
  background: rgba(238, 247, 255, 0.7);
  border-radius: 8px;
  display: grid;
  gap: 10px;
  grid-template-columns: minmax(160px, 1.2fr) repeat(3, minmax(90px, 1fr));
  padding: 12px;
}

.report-row strong {
  color: var(--game-ink);
}

.report-row span {
  color: var(--game-muted);
  font-size: 13px;
  font-weight: 850;
}

.parent-layout {
  display: grid;
  gap: 16px;
  grid-template-columns: minmax(300px, 420px) minmax(0, 1fr);
}

.section-title {
  align-items: center;
  display: flex;
  justify-content: space-between;
  margin-bottom: 12px;
}

.section-title h2 {
  color: var(--game-ink);
  font-size: 18px;
  font-weight: 950;
  margin: 0;
}

.plan-toolbar {
  align-items: end;
  display: grid;
  gap: 12px;
  grid-template-columns: minmax(220px, 1fr) auto auto;
  margin-bottom: 16px;
}

.offline-plan-notice {
  background: #fff7df;
  border: 1px solid #f1d68c;
  border-radius: 8px;
  color: #715616;
  margin: 0 0 14px;
  padding: 10px 12px;
}

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

.plan-unit {
  align-items: center;
  background: rgba(255, 255, 255, 0.84);
  border: 1px solid rgba(44, 138, 210, 0.22);
  border-radius: 8px;
  box-shadow: 0 8px 18px rgba(43, 107, 168, 0.1);
  display: grid;
  gap: 12px;
  grid-template-columns: 30px minmax(220px, 1fr) repeat(4, minmax(82px, 120px));
  padding: 12px;
  transition:
    background 140ms ease,
    border-color 140ms ease,
    box-shadow 140ms ease,
    transform 140ms ease;
}

.plan-unit.dragging {
  background: #fff9e8;
  border-color: rgba(16, 152, 232, 0.58);
  box-shadow:
    0 0 0 4px rgba(16, 152, 232, 0.14),
    0 18px 36px rgba(29, 89, 145, 0.22);
  opacity: 0.94;
  transform: scale(1.01);
}

.plan-drag-handle {
  align-items: center;
  background: rgba(238, 247, 255, 0.84);
  border: 1px solid rgba(44, 138, 210, 0.2);
  border-radius: 8px;
  color: var(--game-muted);
  cursor: grab;
  display: inline-flex;
  font-size: 18px;
  font-weight: 950;
  height: 42px;
  justify-content: center;
  line-height: 1;
  touch-action: none;
  user-select: none;
  width: 30px;
}

.plan-unit.dragging .plan-drag-handle {
  cursor: grabbing;
}

.plan-check {
  align-items: center;
  display: flex;
  gap: 10px;
  min-width: 0;
}

.plan-check input {
  accent-color: var(--game-blue);
  height: 20px;
  width: 20px;
}

.plan-check strong,
.plan-check em {
  display: block;
}

.plan-check strong {
  align-items: center;
  display: flex;
  gap: 10px;
  font-weight: 950;
}

.plan-check em {
  color: var(--game-muted);
  font-size: 13px;
  font-style: normal;
  font-weight: 800;
  margin-top: 3px;
}

.field.compact {
  gap: 4px;
}

.field.compact input {
  min-height: 38px;
  width: 100%;
}

.field.compact select {
  min-height: 38px;
  width: 100%;
}

@media (prefers-reduced-motion: reduce) {
  .unit-card.reminder-active {
    animation: none;
    transform: scale(1.025);
  }
}

.error {
  color: #b7332d;
  font-size: 14px;
  font-weight: 900;
  min-height: 20px;
}

@media (orientation: portrait) {
  body::before {
    background-image: url("./assets/game-bg-portrait.png");
    background-position: center;
  }
}

@media (max-width: 980px) {
  .analysis-mini-grid,
  .analysis-summary,
  .analysis-chart-grid,
  .unit-analysis-grid,
  .report-grid,
  .training-layout,
  .lens-settings-layout,
  .display-calibration-grid,
  .lens-test-grid,
  .parent-layout {
    grid-template-columns: 1fr;
  }

  .display-calibration-actions {
    align-items: stretch;
    flex-direction: column;
  }

  .child-overview {
    grid-template-columns: minmax(120px, 0.45fr) minmax(0, 1fr);
  }

  .overview-metrics {
    grid-column: 1 / -1;
  }

  .unit-card {
    grid-template-columns: minmax(0, 1fr) 150px auto;
  }

  .unit-detail-head {
    grid-template-columns: minmax(0, 1fr) minmax(128px, 170px) auto;
  }

  .unit-detail-art img {
    height: 96px;
    width: 170px;
  }

  .unit-art-panel {
    min-width: 138px;
  }

  .unit-art-panel img {
    height: 98px;
    width: 150px;
  }

  .training-frame,
  .manual-stage {
    min-height: 260px;
  }

  .control-panel {
    grid-template-columns: minmax(180px, 1fr) minmax(220px, 1.2fr);
  }

  .control-panel .button-row,
  .control-panel .choice-grid,
  .control-panel .set-grid,
  .control-panel .result-line {
    grid-column: 1 / -1;
  }
}

@media (max-width: 640px) {
  body::after {
    background: linear-gradient(180deg, rgba(255, 255, 255, 0.08), rgba(207, 244, 255, 0.34));
  }

  .login-page {
    align-items: end;
    padding: 18px;
  }

  .topbar,
  .page-head,
  .unit-head {
    align-items: stretch;
    flex-direction: column;
  }

  .topbar {
    min-height: 0;
  }

  .content {
    gap: 14px;
    padding: 14px;
  }

  .page-head,
  .unit-head {
    padding: 14px;
  }

  .unit-detail-head {
    grid-template-columns: 1fr;
  }

  .unit-detail-art {
    display: none;
  }

  .unit-detail-head::after {
    background-position: right -54px center;
    background-size: 240px auto;
    opacity: 0.12;
  }

  .child-overview,
  .overview-metrics {
    grid-template-columns: 1fr;
  }

  .analysis-mini-grid,
  .analysis-summary,
  .report-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .metric {
    padding: 13px 10px;
  }

  .metric strong {
    font-size: 24px;
  }

  .unit-card,
  .day-row,
  .detail-row {
    align-items: stretch;
    grid-template-columns: 1fr;
    min-height: 0;
  }

  .unit-card {
    min-height: 142px;
    padding-right: 14px;
  }

  .unit-card::after {
    background-position: right -26px center;
    background-size: 210px auto;
    opacity: 0.2;
  }

  .unit-art-panel {
    display: none;
  }

  .quick-login,
  .manual-steps,
  .choice-grid,
  .choice-grid.three,
  .set-grid,
  .plan-toolbar,
  .plan-unit,
  .control-panel,
  .report-row,
  .alert-item {
    grid-template-columns: 1fr;
  }

  .training-frame,
  .set-stage,
  .manual-stage {
    aspect-ratio: auto;
    min-height: 230px;
    width: 100%;
  }

  .manual-stage::before,
  .set-stage::before,
  .hang-stage::before {
    background-position: right -28px center;
    background-size: 230px auto;
    opacity: 0.13;
  }

  .button-row,
  .primary-btn,
  .secondary-btn,
  .ghost-btn,
  .danger-btn {
    width: 100%;
  }
}
