/**
 * 토닥티칭 리뉴얼2 ver1 — Soft UI Evolution × LMS Teal
 * UI UX Pro Max 권장: Soft UI Evolution + Education teal (#0D9488)
 * 선생님용: 차분·신뢰 + 가벼운 귀여움 (장난감 clay 과다 지양)
 */

@import url('https://fonts.googleapis.com/css2?family=DM+Sans:ital,wght@0,400;0,500;0,600;0,700;1,400&family=Nunito:wght@600;700;800&display=swap');

:root {
  --color-primary: #0d9488;
  --color-primary-deep: #0f766e;
  --color-on-primary: #ffffff;
  --color-secondary: #2dd4bf;
  --color-accent: #d97706;
  --color-accent-soft: #fff7ed;
  --color-background: #f0fdfa;
  --color-foreground: #134e4a;
  --color-muted: #ccfbf1;
  --color-muted-fg: #5f7a76;
  --color-card: #ffffff;
  --color-border: #99f6e4;
  --color-border-soft: #e0f2f1;
  --color-destructive: #dc2626;
  --color-success: #059669;
  --color-warn: #d97706;
  --color-chip-bg: #ecfdf5;
  --color-sheet: #ffffff;

  --radius-sm: 12px;
  --radius-md: 18px;
  --radius-lg: 24px;
  --radius-xl: 32px;
  --radius-pill: 999px;

  --shadow-soft: 0 8px 24px rgba(13, 148, 136, 0.08), 0 2px 6px rgba(19, 78, 74, 0.04);
  --shadow-card: 0 10px 28px rgba(13, 148, 136, 0.1), inset 0 1px 0 rgba(255, 255, 255, 0.8);
  --shadow-press: 0 4px 12px rgba(13, 148, 136, 0.12);
  --shadow-sheet: 0 -12px 40px rgba(19, 78, 74, 0.14);

  --font-display: 'Nunito', 'DM Sans', system-ui, sans-serif;
  --font-body: 'DM Sans', 'Nunito', system-ui, sans-serif;

  --nav-h: 72px;
  --ease: cubic-bezier(0.34, 1.2, 0.64, 1);
  --ease-out: cubic-bezier(0.22, 1, 0.36, 1);

  --scroll-size: 5px;
  --scroll-track: rgba(13, 148, 136, 0.08);
  --scroll-thumb: rgba(13, 148, 136, 0.35);
  --scroll-thumb-hover: rgba(15, 118, 110, 0.55);
}

*,
*::before,
*::after {
  box-sizing: border-box;
}

/* Overlay scrollbar — 평소 숨김, 스크롤 중에만 표시 (레이아웃 폭 미확보) */
* {
  scrollbar-width: thin;
  scrollbar-color: transparent transparent;
}

*::-webkit-scrollbar {
  width: var(--scroll-size);
  height: var(--scroll-size);
  background: transparent;
}

*::-webkit-scrollbar-track {
  background: transparent;
  border-radius: var(--radius-pill);
}

*::-webkit-scrollbar-thumb {
  background: transparent;
  border-radius: var(--radius-pill);
  border: 1px solid transparent;
  background-clip: padding-box;
  transition: background 160ms ease;
}

*::-webkit-scrollbar-corner {
  background: transparent;
}

*.is-scrolling,
.is-scrolling {
  scrollbar-color: var(--scroll-thumb) transparent;
}

*.is-scrolling::-webkit-scrollbar-thumb,
.is-scrolling::-webkit-scrollbar-thumb {
  background: var(--scroll-thumb);
}

*.is-scrolling::-webkit-scrollbar-thumb:hover,
.is-scrolling::-webkit-scrollbar-thumb:hover {
  background: var(--scroll-thumb-hover);
}

html {
  font-size: 16px;
  -webkit-text-size-adjust: 100%;
  text-size-adjust: 100%;
}

html,
body {
  margin: 0;
  height: 100%;
  font-family: var(--font-body);
  font-size: 16px;
  color: var(--color-foreground);
  background: var(--color-background);
  -webkit-font-smoothing: antialiased;
  overflow: hidden;
}

button,
a,
input,
textarea,
select {
  font: inherit;
}

/* iOS: 포커스 시 자동 줌 방지 (≥16px) */
input,
textarea,
select {
  font-size: 16px;
  line-height: 1.4;
}

button {
  cursor: pointer;
  border: none;
  background: none;
  color: inherit;
}

button:focus-visible,
a:focus-visible,
[tabindex]:focus-visible {
  outline: 3px solid var(--color-secondary);
  outline-offset: 2px;
}

img {
  max-width: 100%;
  display: block;
}

/* —— App shell (뷰어 틀 없음 · 전체 화면) —— */
.app {
  position: relative;
  width: 100%;
  max-width: 430px;
  height: 100%;
  height: 100dvh;
  margin: 0 auto;
  display: flex;
  flex-direction: column;
  min-height: 0;
  background: var(--color-background);
  padding-top: env(safe-area-inset-top, 0px);
  overflow: hidden;
  box-shadow: 0 0 0 1px rgba(19, 78, 74, 0.04);
}

@media (min-width: 431px) {
  body {
    background:
      radial-gradient(900px 500px at 50% -10%, #ccfbf1 0%, transparent 55%),
      #e8f5f2;
  }

  .app {
    box-shadow:
      0 0 0 1px rgba(19, 78, 74, 0.06),
      0 24px 48px rgba(19, 78, 74, 0.1);
  }
}

.app-header {
  padding: 8px 18px 10px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.app-brand {
  display: flex;
  align-items: center;
  gap: 10px;
  min-width: 0;
  appearance: none;
  border: 0;
  margin: 0;
  padding: 0;
  background: transparent;
  color: inherit;
  font: inherit;
  text-align: left;
  cursor: pointer;
  border-radius: 12px;
  transition: opacity 160ms ease, transform 160ms var(--ease);
}

.app-brand:hover {
  opacity: 0.88;
}

.app-brand:active {
  transform: scale(0.98);
}

.app-brand:focus-visible {
  outline: 2px solid var(--color-primary);
  outline-offset: 3px;
}

.mascot {
  width: 40px;
  height: 40px;
  border-radius: 14px;
  background: linear-gradient(145deg, #5eead4, #0d9488);
  box-shadow: var(--shadow-card);
  display: grid;
  place-items: center;
  flex-shrink: 0;
}

.mascot svg {
  width: 22px;
  height: 22px;
  color: white;
}

.brand-text .title {
  font-family: var(--font-display);
  font-weight: 800;
  font-size: 1.05rem;
  line-height: 1.1;
}

.brand-text .sub {
  font-size: 0.72rem;
  color: var(--color-muted-fg);
}

.header-action {
  min-height: 40px;
  min-width: 40px;
  border-radius: var(--radius-pill);
  background: var(--color-card);
  border: 1.5px solid var(--color-border-soft);
  box-shadow: var(--shadow-soft);
  display: grid;
  place-items: center;
  transition: transform 160ms var(--ease);
}

.header-action:active {
  transform: scale(0.94);
}

.header-action svg {
  width: 18px;
  height: 18px;
  color: var(--color-primary-deep);
}

.header-action[aria-expanded='true'] {
  border-color: var(--color-border);
  background: var(--color-chip-bg);
}

/* Help tooltip layer */
.help-wrap {
  position: relative;
  flex-shrink: 0;
}

.help-tip {
  position: absolute;
  top: calc(100% + 10px);
  right: 0;
  z-index: 80;
  width: min(280px, calc(100vw - 32px));
  padding: 14px 14px 12px;
  border-radius: var(--radius-md);
  background: var(--color-card);
  border: 1.5px solid var(--color-border-soft);
  box-shadow: 0 16px 36px rgba(19, 78, 74, 0.16), 0 2px 8px rgba(13, 148, 136, 0.08);
  transform-origin: top right;
  animation: helpTipIn 220ms var(--ease-out);
}

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

.help-tip-arrow {
  position: absolute;
  top: -6px;
  right: 14px;
  width: 12px;
  height: 12px;
  background: var(--color-card);
  border-top: 1.5px solid var(--color-border-soft);
  border-left: 1.5px solid var(--color-border-soft);
  transform: rotate(45deg);
}

.help-tip-title {
  margin: 0 0 6px;
  font-family: var(--font-display);
  font-weight: 800;
  font-size: 0.92rem;
  color: var(--color-primary-deep);
}

.help-tip-body {
  margin: 0;
  font-size: 0.84rem;
  line-height: 1.5;
  color: var(--color-foreground);
}

.help-tip-body strong {
  font-weight: 700;
  color: var(--color-primary-deep);
}

@keyframes helpTipIn {
  from {
    opacity: 0;
    transform: translateY(-6px) scale(0.96);
  }
  to {
    opacity: 1;
    transform: none;
  }
}

/* —— Screens —— */
.screens {
  flex: 1;
  min-height: 0;
  position: relative;
  overflow: hidden;
}

.screens-track {
  display: flex;
  width: 300%;
  height: 100%;
  transform: translate3d(0, 0, 0);
  transition: transform 480ms var(--ease-out);
  will-change: transform;
}

.screens-track[data-active='kids'] {
  transform: translate3d(-33.333333%, 0, 0);
}

.screens-track[data-active='me'] {
  transform: translate3d(-66.666667%, 0, 0);
}

.screens-track > .screen {
  display: flex;
  flex: 0 0 33.333333%;
  width: 33.333333%;
  min-width: 0;
  flex-direction: column;
  height: 100%;
  min-height: 0;
  padding: 0 16px;
  padding-bottom: calc(var(--nav-h) + 12px);
  overflow-x: hidden;
  overflow-y: auto;
  overscroll-behavior: contain;
  box-sizing: border-box;
  animation: none;
}

/* 오늘: 상단 고정 · 학생 목록만 세로 스크롤 */
#screen-today {
  overflow: hidden;
}

#screen-today .section-head,
#screen-today .mode-switch,
#screen-today .slot-row,
#screen-today .slot-meta {
  flex-shrink: 0;
}

.screen-overlay {
  display: none;
  position: absolute;
  inset: 0;
  z-index: 25;
  flex-direction: column;
  height: 100%;
  min-height: 0;
  padding: 0 16px;
  padding-bottom: calc(var(--nav-h) + 12px);
  overflow-y: auto;
  overscroll-behavior: contain;
  background: var(--color-background);
  animation: slideInRight 360ms var(--ease-out);
}

.screen-overlay.is-active {
  display: flex;
}

@keyframes fadeIn {
  from {
    opacity: 0;
    transform: translateY(6px);
  }
  to {
    opacity: 1;
    transform: none;
  }
}

@keyframes slideInRight {
  from {
    opacity: 0.88;
    transform: translateX(18%);
  }
  to {
    opacity: 1;
    transform: none;
  }
}

@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    animation-duration: 0.01ms !important;
    transition-duration: 0.01ms !important;
  }
}

.section-head {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 10px;
  margin: 4px 0 14px;
}

.section-head .section-title {
  margin: 0;
  flex-shrink: 0;
}

.section-head .section-sub {
  margin: 0;
  text-align: right;
  line-height: 1.3;
}

.section-title {
  font-family: var(--font-display);
  font-size: 1.35rem;
  font-weight: 800;
  margin: 4px 0 2px;
  letter-spacing: -0.02em;
}

.section-sub {
  margin: 0 0 14px;
  color: var(--color-muted-fg);
  font-size: 0.84rem;
  line-height: 1.45;
}

/* Mode segment — sliding pill */
.mode-switch {
  position: relative;
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 4px;
  padding: 4px;
  background: var(--color-muted);
  border-radius: var(--radius-pill);
  margin-bottom: 14px;
  border: 1.5px solid var(--color-border);
}

.mode-pill {
  position: absolute;
  top: 4px;
  left: 4px;
  width: calc((100% - 12px) / 2);
  height: calc(100% - 8px);
  border-radius: var(--radius-pill);
  background: var(--color-card);
  box-shadow: var(--shadow-soft);
  pointer-events: none;
  z-index: 0;
  transform: translateX(0);
  transition: transform 420ms cubic-bezier(0.22, 1, 0.36, 1);
  will-change: transform;
}

.mode-switch.is-after .mode-pill {
  transform: translateX(calc(100% + 4px));
}

.mode-switch button {
  position: relative;
  z-index: 1;
  min-height: 44px;
  border-radius: var(--radius-pill);
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 0.92rem;
  color: var(--color-muted-fg);
  background: transparent;
  transition: color 320ms cubic-bezier(0.22, 1, 0.36, 1), transform 160ms cubic-bezier(0.22, 1, 0.36, 1);
}

.mode-switch button.is-active {
  color: var(--color-primary-deep);
}

.mode-switch button:active {
  transform: scale(0.97);
}

/* Mode panels — horizontal slide · 목록은 패널 안에서 스크롤 */
.mode-panels {
  flex: 1;
  min-height: 0;
  overflow: hidden;
  width: 100%;
  margin-inline: -2px;
  padding-inline: 2px;
}

.mode-track {
  display: flex;
  width: 200%;
  height: 100%;
  align-items: stretch;
  transform: translate3d(0, 0, 0);
  transition: transform 480ms cubic-bezier(0.22, 1, 0.36, 1);
  will-change: transform;
}

.mode-track.is-after {
  transform: translate3d(-50%, 0, 0);
}

.mode-track .panel-prep,
.mode-track .panel-after {
  flex: 0 0 50%;
  width: 50%;
  min-width: 0;
  height: 100%;
  min-height: 0;
  box-sizing: border-box;
  padding-inline: 2px;
  overflow-x: hidden;
  overflow-y: auto;
  overscroll-behavior: contain;
  -webkit-overflow-scrolling: touch;
}

/* Slot chips — 가로만 스크롤 (세로 바 방지) */
.slot-row {
  display: flex;
  gap: 8px;
  overflow-x: auto;
  overflow-y: hidden;
  padding: 6px 4px 8px;
  margin: 0 -2px 6px;
  scrollbar-width: thin;
  scrollbar-color: transparent transparent;
}

.slot-row.is-scrolling {
  scrollbar-color: var(--scroll-thumb) transparent;
}

.slot-row::-webkit-scrollbar {
  height: var(--scroll-size);
  width: 0;
  background: transparent;
}

.slot-row::-webkit-scrollbar-track {
  background: transparent;
  border-radius: var(--radius-pill);
  margin: 0 4px;
}

.slot-row::-webkit-scrollbar-thumb {
  background: transparent;
  border-radius: var(--radius-pill);
}

.slot-row.is-scrolling::-webkit-scrollbar-thumb {
  background: linear-gradient(90deg, var(--color-secondary), var(--color-primary));
}

.slot-row.is-scrolling::-webkit-scrollbar-thumb:hover {
  background: var(--color-primary-deep);
}

.slot-chip {
  flex: 0 0 auto;
  min-height: 40px;
  padding: 0 14px;
  border-radius: var(--radius-pill);
  background: #ecfdf5;
  border: 1.5px solid var(--color-border);
  font-weight: 700;
  font-size: 0.88rem;
  color: var(--color-primary-deep);
  transition: all 180ms;
}

.slot-chip:focus {
  outline: none;
}

.slot-chip:focus-visible {
  outline: 2px solid var(--color-secondary);
  outline-offset: 2px;
}

.slot-chip.is-active {
  background: var(--color-primary);
  color: white;
  border-color: var(--color-primary-deep);
  box-shadow: var(--shadow-press);
}

.slot-chip.is-active:focus-visible {
  outline-color: var(--color-primary-deep);
}

.slot-meta {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  margin-bottom: 12px;
}

.slot-meta .count {
  font-size: 0.84rem;
  color: var(--color-muted-fg);
  font-weight: 600;
}

.slot-meta .count strong {
  color: var(--color-primary-deep);
  font-weight: 800;
  font-size: 0.95rem;
}

.slot-status {
  font-size: 0.82rem;
  font-weight: 700;
  font-family: var(--font-display);
  text-align: right;
  line-height: 1.3;
  max-width: 62%;
}

.slot-status[data-state='live'] {
  color: var(--color-primary-deep);
}

.slot-status[data-state='done'] {
  color: var(--color-accent);
}

.slot-status[data-state='soon'] {
  color: var(--color-muted-fg);
}

/* Slot student list crossfade */
.slot-crossfade {
  position: relative;
  min-height: 48px;
}

.slot-crossfade .slot-layer {
  width: 100%;
  transition: opacity 380ms var(--ease-out);
  opacity: 1;
}

.slot-crossfade .slot-layer.is-enter {
  opacity: 0;
}

.slot-crossfade .slot-layer.is-enter.is-show {
  opacity: 1;
}

.slot-crossfade .slot-layer.is-exit {
  position: absolute;
  left: 0;
  right: 0;
  top: 0;
  z-index: 1;
  pointer-events: none;
  opacity: 1;
}

.slot-crossfade .slot-layer.is-exit.is-fade {
  opacity: 0;
}

.slot-empty {
  margin: 8px 0 4px;
  padding: 28px 16px;
  text-align: center;
  border-radius: var(--radius-lg);
  border: 1.5px dashed var(--color-border);
  background: rgba(255, 255, 255, 0.55);
  color: var(--color-muted-fg);
  font-size: 0.9rem;
  line-height: 1.45;
}

/* 수업 시간 없을 때 — 선택 영역 전체 폭 + 안내 가운데 */
.slot-row:has(> .slot-empty),
.slot-row.is-empty {
  display: block;
  overflow: hidden;
  width: 100%;
  margin-left: 0;
  margin-right: 0;
  padding-left: 0;
  padding-right: 0;
}

.slot-row > .slot-empty {
  display: block;
  width: 100%;
  box-sizing: border-box;
  margin: 0;
  text-align: center;
}

/* Student briefing cards — 요약 + 펼침 (ver2 패턴) */
.card-list {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.student-card {
  background: var(--color-card);
  border-radius: var(--radius-lg);
  border: 1.5px solid var(--color-border-soft);
  box-shadow: var(--shadow-soft);
  padding: 0;
  overflow: hidden;
  transition: box-shadow 180ms;
}

.student-card.is-open {
  border-color: var(--color-border);
  box-shadow: var(--shadow-press);
}

.student-card.is-done {
  opacity: 0.72;
}

.card-summary {
  width: 100%;
  display: grid;
  grid-template-columns: 44px minmax(0, 1fr) max-content auto;
  gap: 10px;
  align-items: center;
  text-align: left;
  padding: 12px 12px;
  min-height: 64px;
  transition: background 150ms;
}

.card-summary:hover {
  background: #f0fdfa;
}

.card-summary:active {
  background: #ccfbf1;
}

.card-summary .card-id {
  min-width: 0;
}

.card-summary .card-id .name {
  font-family: var(--font-display);
  font-weight: 800;
  font-size: 1.02rem;
  color: var(--color-foreground);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.card-summary .card-id .grade {
  margin-top: 2px;
  font-size: 0.75rem;
  color: var(--color-muted-fg);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.card-meta {
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  justify-content: center;
  gap: 4px;
  flex-shrink: 0;
  min-width: max-content;
}

.card-meta .chip {
  flex-shrink: 0;
  white-space: nowrap;
  max-width: none;
}

.card-meta .one-line {
  margin-top: 0;
  font-size: 0.78rem;
  color: var(--color-muted-fg);
  text-align: right;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  max-width: 9.5rem;
}

.name-row {
  display: flex;
  align-items: center;
  gap: 6px;
  flex-wrap: wrap;
}

.one-line {
  margin-top: 3px;
  font-size: 0.8rem;
  color: var(--color-muted-fg);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.card-summary .chev {
  width: 16px;
  height: 16px;
  color: var(--color-muted-fg);
  transition: transform 200ms var(--ease-out);
  flex-shrink: 0;
}

.card-summary[aria-expanded="true"] .chev {
  transform: rotate(90deg);
  color: var(--color-primary);
}

.card-expand {
  display: none;
  padding: 0 12px 12px;
  border-top: 1px solid var(--color-border-soft);
}

.student-card.is-open .card-expand {
  display: block;
}

.prep-hint {
  margin: 10px 2px 0;
  font-size: 0.72rem;
  color: var(--color-muted-fg);
  text-align: center;
}

.card-top {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  margin-bottom: 10px;
}

.avatar {
  width: 44px;
  height: 44px;
  border-radius: 16px;
  display: grid;
  place-items: center;
  font-family: var(--font-display);
  font-weight: 800;
  color: white;
  flex-shrink: 0;
  box-shadow: inset 0 -2px 0 rgba(0, 0, 0, 0.08);
}

.avatar.a1 { background: linear-gradient(145deg, #5eead4, #0d9488); }
.avatar.a2 { background: linear-gradient(145deg, #fcd34d, #d97706); }
.avatar.a3 { background: linear-gradient(145deg, #93c5fd, #2563eb); }
.avatar.a4 { background: linear-gradient(145deg, #f9a8d4, #db2777); }

.card-id {
  flex: 1;
  min-width: 0;
}

.card-id .name {
  font-family: var(--font-display);
  font-weight: 800;
  font-size: 1.02rem;
}

.card-id .grade {
  font-size: 0.75rem;
  color: var(--color-muted-fg);
}

.chip-row {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin-top: 6px;
}

.detail-head {
  align-items: center;
}

.detail-head .card-id {
  flex: 1;
  min-width: 0;
}

.detail-head .chip-row {
  margin-top: 0;
  flex-shrink: 0;
}

.detail-head .chip-stack {
  flex-direction: column;
  align-items: flex-end;
  gap: 4px;
}

.detail-head .chip-stack .chip {
  white-space: nowrap;
}

.chip {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 4px 9px;
  border-radius: var(--radius-pill);
  background: var(--color-chip-bg);
  color: var(--color-primary-deep);
  font-size: 0.7rem;
  font-weight: 700;
  border: 1px solid var(--color-border);
}

.chip.warn {
  background: var(--color-accent-soft);
  color: #b45309;
  border-color: #fed7aa;
}

.chip.soft {
  background: #f1f5f9;
  color: #475569;
  border-color: #e2e8f0;
}

.chip svg {
  width: 12px;
  height: 12px;
}

.brief-block {
  margin-top: 10px;
  padding: 10px 11px;
  border-radius: var(--radius-md);
  background: linear-gradient(180deg, #f0fdfa 0%, #ffffff 100%);
  border: 1px solid var(--color-border-soft);
}

.card-expand .brief-block:first-child {
  margin-top: 10px;
}

.brief-block .label {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 0.68rem;
  font-weight: 700;
  letter-spacing: 0.02em;
  text-transform: uppercase;
  color: var(--color-primary);
  margin-bottom: 4px;
}

.brief-block .label svg {
  width: 14px;
  height: 14px;
}

.brief-block p {
  margin: 0;
  font-size: 0.88rem;
  line-height: 1.5;
  color: var(--color-foreground);
  white-space: pre-line;
}

.brief-block.caution {
  background: linear-gradient(180deg, #fff7ed 0%, #ffffff 100%);
  border-color: #fed7aa;
}

.brief-block.caution .label {
  color: #b45309;
}

.card-actions {
  display: flex;
  gap: 8px;
  margin-top: 12px;
}

.btn {
  min-height: 44px;
  padding: 0 16px;
  border-radius: var(--radius-pill);
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 0.9rem;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  transition: transform 160ms var(--ease), box-shadow 180ms, background 180ms;
}

.btn:active {
  transform: scale(0.96);
}

.btn svg {
  width: 18px;
  height: 18px;
}

.btn-primary {
  background: linear-gradient(145deg, #14b8a6, #0d9488);
  color: white;
  box-shadow: 0 8px 18px rgba(13, 148, 136, 0.28);
  flex: 1;
}

.btn-primary:hover {
  background: linear-gradient(145deg, #0d9488, #0f766e);
}

.btn-ghost {
  background: var(--color-card);
  color: var(--color-muted-fg);
  border: 1.5px solid var(--color-border-soft);
}

.btn-accent {
  background: linear-gradient(145deg, #fbbf24, #d97706);
  color: white;
  box-shadow: 0 8px 18px rgba(217, 119, 6, 0.25);
  flex: 1;
}

.btn-accent:disabled,
.btn-accent.is-disabled,
.btn-accent[aria-disabled='true'] {
  opacity: 0.55;
  cursor: not-allowed;
  box-shadow: none;
  filter: grayscale(0.15);
}

.btn-block {
  width: 100%;
}

.btn-sm {
  min-height: 36px;
  padding: 0 12px;
  font-size: 0.78rem;
}

/* After mode list */
.after-hint {
  display: flex;
  gap: 10px;
  align-items: flex-start;
  padding: 12px;
  border-radius: var(--radius-md);
  background: #fff;
  border: 1.5px solid var(--color-border);
  margin-bottom: 12px;
  box-shadow: var(--shadow-soft);
}

.after-hint .bubble {
  width: 36px;
  height: 36px;
  border-radius: 14px;
  background: linear-gradient(145deg, #5eead4, #0d9488);
  display: grid;
  place-items: center;
  flex-shrink: 0;
}

.after-hint .bubble svg {
  width: 18px;
  height: 18px;
  color: white;
}

.after-hint p {
  margin: 0;
  font-size: 0.84rem;
  line-height: 1.45;
}

.after-hint strong {
  font-family: var(--font-display);
}

.todac-row {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 12px;
  background: var(--color-card);
  border-radius: var(--radius-lg);
  border: 1.5px solid var(--color-border-soft);
  box-shadow: var(--shadow-soft);
  min-height: 72px;
  text-align: left;
  width: 100%;
  transition: transform 160ms var(--ease);
}

.todac-row:active {
  transform: scale(0.98);
}

.todac-row .meta {
  flex: 1;
  min-width: 0;
}

.todac-row .meta .name {
  font-family: var(--font-display);
  font-weight: 800;
}

.todac-row .meta .hint {
  font-size: 0.75rem;
  color: var(--color-muted-fg);
}

.todac-row .cta {
  font-size: 0.78rem;
  font-weight: 700;
  color: var(--color-primary);
  white-space: nowrap;
}

.todac-row.is-done .cta {
  color: var(--color-success);
}

/* Bottom nav — sliding pill */
.tabbar {
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  height: var(--nav-h);
  padding: 8px 18px 14px;
  background: rgba(255, 255, 255, 0.92);
  backdrop-filter: blur(12px);
  border-top: 1px solid var(--color-border-soft);
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 4px;
  z-index: 40;
}

.tab-pill {
  position: absolute;
  top: 8px;
  left: 18px;
  width: calc((100% - 36px - 8px) / 3);
  height: calc(100% - 22px);
  border-radius: var(--radius-md);
  background: var(--color-chip-bg);
  pointer-events: none;
  z-index: 0;
  transform: translateX(0);
  transition: transform 420ms cubic-bezier(0.22, 1, 0.36, 1);
  will-change: transform;
}

.tabbar[data-active='kids'] .tab-pill {
  transform: translateX(calc(100% + 4px));
}

.tabbar[data-active='me'] .tab-pill {
  transform: translateX(calc(200% + 8px));
}

.tab {
  position: relative;
  z-index: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 2px;
  min-height: 48px;
  border-radius: var(--radius-md);
  color: var(--color-muted-fg);
  font-size: 0.7rem;
  font-weight: 700;
  background: transparent;
  transition: color 320ms cubic-bezier(0.22, 1, 0.36, 1);
}

.tab svg {
  width: 22px;
  height: 22px;
}

.tab.is-active {
  color: var(--color-primary-deep);
}

/* Bottom sheet */
.sheet-backdrop {
  position: absolute;
  inset: 0;
  background: rgba(15, 23, 42, 0.42);
  opacity: 0;
  pointer-events: none;
  transition: opacity 220ms;
  z-index: 50;
}

.sheet-backdrop.is-open {
  opacity: 1;
  pointer-events: auto;
}

.sheet {
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  max-height: 88%;
  background: var(--color-sheet);
  border-radius: 28px 28px 0 0;
  box-shadow: var(--shadow-sheet);
  z-index: 55;
  transform: translateY(110%);
  transition: transform 320ms var(--ease-out);
  display: flex;
  flex-direction: column;
  padding: 10px 16px calc(18px + env(safe-area-inset-bottom, 0px));
}

.sheet.is-open {
  transform: translateY(0);
}

.sheet-handle {
  width: 42px;
  height: 5px;
  border-radius: 999px;
  background: #cbd5e1;
  margin: 4px auto 12px;
}

.sheet-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  margin-bottom: 8px;
}

.sheet-head h3 {
  margin: 0;
  font-family: var(--font-display);
  font-size: 1.15rem;
  font-weight: 800;
}

.sheet-head .close {
  width: 40px;
  height: 40px;
  border-radius: 14px;
  background: #f1f5f9;
  display: grid;
  place-items: center;
}

.sheet-head .close svg {
  width: 18px;
  height: 18px;
}

.sheet-body {
  overflow-y: auto;
  flex: 1;
  min-height: 0;
  padding-bottom: 8px;
}

.field-label {
  font-size: 0.78rem;
  font-weight: 700;
  color: var(--color-muted-fg);
  margin: 12px 0 8px;
}

.field-hint {
  font-weight: 600;
  color: #94a3b8;
  margin-left: 6px;
}

/* 수업후 체크 — 빠른 탭 입력 */
.post-check {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.post-check-row {
  display: grid;
  grid-template-columns: 64px 1fr;
  gap: 8px;
  align-items: stretch;
}

.post-check-label {
  display: flex;
  align-items: center;
  font-size: 0.78rem;
  font-weight: 800;
  color: var(--color-foreground);
  line-height: 1.2;
}

.seg {
  display: grid;
  gap: 6px;
}

.seg-3 {
  grid-template-columns: repeat(3, 1fr);
}

.seg-4 {
  grid-template-columns: repeat(2, 1fr);
}

@media (min-width: 380px) {
  .seg-4 {
    grid-template-columns: repeat(4, 1fr);
  }
}

.seg-btn {
  min-height: 44px;
  border-radius: var(--radius-sm);
  border: 1.5px solid var(--color-border-soft);
  background: #f8fafc;
  padding: 0 6px;
  font-size: 0.78rem;
  font-weight: 700;
  color: var(--color-muted-fg);
  cursor: pointer;
  touch-action: manipulation;
  transition: background 160ms var(--ease-out), border-color 160ms var(--ease-out),
    color 160ms var(--ease-out), box-shadow 160ms var(--ease-out);
}

.seg-btn:active {
  transform: scale(0.98);
}

.seg-btn.is-on {
  background: var(--color-chip-bg);
  border-color: var(--color-primary);
  color: var(--color-primary-deep);
  box-shadow: var(--shadow-soft);
}

.seg-btn.seg-warn.is-on {
  background: var(--color-accent-soft);
  border-color: var(--color-warn);
  color: #9a3412;
}

@media (prefers-reduced-motion: reduce) {
  .seg-btn,
  .seg-btn:active {
    transition: none;
    transform: none;
  }
}

.memo-input {
  width: 100%;
  min-height: 72px;
  resize: none;
  border-radius: var(--radius-md);
  border: 1.5px solid var(--color-border-soft);
  padding: 12px;
  background: #f8fafc;
  color: var(--color-foreground);
  font-size: 16px;
  line-height: 1.45;
}

.memo-input::placeholder {
  color: #94a3b8;
}

.sheet-footer {
  display: flex;
  flex-direction: column;
  gap: 8px;
  padding-top: 10px;
  border-top: 1px solid var(--color-border-soft);
}

.usage-line {
  text-align: center;
  font-size: 0.72rem;
  color: var(--color-muted-fg);
}

/* Analysis done overlay */
.done-panel {
  text-align: center;
  padding: 8px 4px 4px;
}

.done-mascot {
  width: 72px;
  height: 72px;
  margin: 4px auto 12px;
  border-radius: 24px;
  background: linear-gradient(145deg, #5eead4, #0d9488);
  display: grid;
  place-items: center;
  box-shadow: var(--shadow-card);
  animation: bounceSoft 700ms var(--ease);
}

.done-mascot svg {
  width: 34px;
  height: 34px;
  color: white;
}

@keyframes bounceSoft {
  0% { transform: scale(0.7); }
  55% { transform: scale(1.08); }
  100% { transform: scale(1); }
}

.done-panel h3 {
  font-family: var(--font-display);
  font-size: 1.2rem;
  margin: 0 0 6px;
}

.done-panel .lead {
  margin: 0 0 14px;
  color: var(--color-muted-fg);
  font-size: 0.88rem;
  line-height: 1.45;
}

.preview-card {
  text-align: left;
  padding: 12px;
  border-radius: var(--radius-md);
  background: linear-gradient(180deg, #ecfdf5, #fff);
  border: 1.5px solid var(--color-border);
  margin-bottom: 14px;
}

.preview-card .tag {
  font-size: 0.68rem;
  font-weight: 800;
  color: var(--color-primary);
  text-transform: uppercase;
  letter-spacing: 0.04em;
}

.preview-card p {
  margin: 6px 0 0;
  font-size: 0.88rem;
  line-height: 1.5;
}

/* Kids / Me / Detail / Onboarding */
.search-bar {
  display: flex;
  align-items: center;
  gap: 8px;
  min-height: 48px;
  padding: 0 14px;
  border-radius: var(--radius-pill);
  background: #fff;
  border: 1.5px solid var(--color-border-soft);
  box-shadow: var(--shadow-soft);
  margin-bottom: 14px;
}

.search-bar svg {
  width: 18px;
  height: 18px;
  color: var(--color-muted-fg);
  flex-shrink: 0;
}

.search-bar input {
  flex: 1;
  border: none;
  outline: none;
  background: transparent;
  min-height: 44px;
  font-size: 16px;
}

.kid-item {
  display: flex;
  align-items: center;
  gap: 12px;
  width: 100%;
  text-align: left;
  padding: 12px;
  background: var(--color-card);
  border-radius: var(--radius-lg);
  border: 1.5px solid var(--color-border-soft);
  box-shadow: var(--shadow-soft);
  margin-bottom: 10px;
  transition: transform 160ms;
}

.kid-item:active {
  transform: scale(0.98);
}

.kid-item .chev {
  margin-left: auto;
  color: #94a3b8;
}

.kid-item .chev svg {
  width: 18px;
  height: 18px;
}

.fab-add {
  position: sticky;
  bottom: 8px;
  flex: 0 0 auto;
  align-self: stretch;
  width: 100%;
  margin-top: 12px;
  min-height: 48px;
  max-height: 48px;
  box-sizing: border-box;
}

.profile-card {
  background: var(--color-card);
  border-radius: var(--radius-lg);
  border: 1.5px solid var(--color-border-soft);
  box-shadow: var(--shadow-card);
  padding: 18px 16px;
  text-align: center;
  margin-bottom: 14px;
}

.profile-card .big-avatar {
  width: 64px;
  height: 64px;
  margin: 0 auto 10px;
  border-radius: 22px;
  background: linear-gradient(145deg, #99f6e4, #0d9488);
  display: grid;
  place-items: center;
  color: white;
  font-family: var(--font-display);
  font-weight: 800;
  font-size: 1.4rem;
}

.profile-card h2 {
  margin: 0;
  font-family: var(--font-display);
  font-size: 1.15rem;
}

.profile-card p {
  margin: 4px 0 0;
  color: var(--color-muted-fg);
  font-size: 0.82rem;
}

.stat-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
  margin-bottom: 14px;
}

.stat {
  background: #fff;
  border-radius: var(--radius-md);
  border: 1.5px solid var(--color-border-soft);
  padding: 12px;
  box-shadow: var(--shadow-soft);
}

.stat .k {
  font-size: 0.72rem;
  color: var(--color-muted-fg);
  font-weight: 600;
}

.stat .v {
  font-family: var(--font-display);
  font-weight: 800;
  font-size: 1.2rem;
  margin-top: 2px;
}

.menu-list {
  background: #fff;
  border-radius: var(--radius-lg);
  border: 1.5px solid var(--color-border-soft);
  overflow: hidden;
  box-shadow: var(--shadow-soft);
}

.menu-list button {
  width: 100%;
  min-height: 52px;
  padding: 0 14px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  border-bottom: 1px solid var(--color-border-soft);
  font-weight: 600;
  font-size: 0.9rem;
}

.menu-list button:last-child {
  border-bottom: none;
}

.menu-list .right {
  color: var(--color-muted-fg);
  font-size: 0.8rem;
  display: flex;
  align-items: center;
  gap: 4px;
}

.back-row {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 8px;
}

.back-row-actions {
  margin-left: auto;
  display: flex;
  align-items: center;
  gap: 6px;
}

.back-row > button {
  width: 40px;
  height: 40px;
  border-radius: 14px;
  background: #fff;
  border: 1.5px solid var(--color-border-soft);
  display: grid;
  place-items: center;
  box-shadow: var(--shadow-soft);
}

.back-row > button svg {
  width: 18px;
  height: 18px;
}

.back-row .back-action {
  width: auto;
  min-width: 52px;
  height: 36px;
  padding: 0 12px;
  border-radius: var(--radius-pill);
  border: 1.5px solid var(--color-border-soft);
  background: #fff;
  color: var(--color-foreground);
  font-size: 0.8rem;
  font-weight: 800;
  box-shadow: var(--shadow-soft);
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  justify-content: center;
}

.back-row .back-action:active {
  transform: scale(0.98);
}

.back-row .back-action-danger {
  color: var(--color-destructive);
  border-color: #fecaca;
  background: #fff5f5;
}

.axis-panel {
  display: grid;
  grid-template-columns: minmax(0, 1.05fr) minmax(0, 0.95fr);
  gap: 10px;
  align-items: start;
  margin: 12px 0;
  padding: 12px;
  background: var(--color-card);
  border-radius: var(--radius-lg);
  border: 1.5px solid var(--color-border-soft);
  box-shadow: var(--shadow-soft);
}

.axis-radar {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0;
  min-width: 0;
}

.axis-radar svg {
  width: 100%;
  max-width: 200px;
  height: auto;
  display: block;
  margin-bottom: 0.8rem;
}

.radar-label {
  fill: var(--color-muted-fg);
  font-size: 9px;
  font-weight: 700;
  font-family: var(--font-display), 'Nunito', sans-serif;
}

.radar-prev {
  fill: rgba(148, 163, 184, 0.22);
  stroke: #94a3b8;
  stroke-width: 1.75;
  stroke-linejoin: round;
  stroke-dasharray: 4 3;
}

.radar-now {
  fill: rgba(13, 148, 136, 0.28);
  stroke: #0d9488;
  stroke-width: 2;
  stroke-linejoin: round;
}

.radar-legend {
  display: flex;
  gap: 12px;
  font-size: 0.7rem;
  font-weight: 700;
  color: var(--color-muted-fg);
  margin: 0 0 2px;
}

.radar-legend span {
  display: inline-flex;
  align-items: center;
  gap: 5px;
}

.radar-legend i {
  width: 10px;
  height: 10px;
  border-radius: 3px;
  display: inline-block;
}

.radar-legend .leg-now i {
  background: rgba(13, 148, 136, 0.55);
  box-shadow: inset 0 0 0 1.5px #0d9488;
}

.radar-legend .leg-prev i {
  background: rgba(148, 163, 184, 0.55);
  box-shadow: inset 0 0 0 1.5px #94a3b8;
}

.radar-note {
  margin: 8px 0 4px;
  padding: 8px 4px 6px;
  border-top: 1px solid var(--color-border-soft);
  font-size: 0.72rem;
  line-height: 1.45;
  color: var(--color-foreground);
  text-align: left;
  width: 100%;
  box-sizing: border-box;
}

.axis-scores {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: 6px;
  min-width: 0;
}

.axis-scores li {
  display: flex;
  flex-direction: column;
  gap: 5px;
  padding: 8px 10px;
  border-radius: var(--radius-sm);
  background: #f0fdfa;
  border: 1px solid var(--color-border-soft);
}

.axis-scores .n {
  font-size: 0.72rem;
  font-weight: 700;
  color: var(--color-muted-fg);
}

.axis-scores .bars {
  display: flex;
  gap: 3px;
}

.axis-scores .bars span {
  flex: 1;
  height: 8px;
  border-radius: 4px;
  background: #e2e8f0;
}

.axis-scores .bars span.on {
  background: var(--color-primary);
}

/* legacy axis cards (unused) */
.axis-grid {
  display: none;
}

.detail-actions {
  display: flex;
  flex-direction: column;
  gap: 8px;
  margin-top: 12px;
}


/* 학생 상세 — 수업 배정 */
.enroll-section {
  margin-top: 16px;
  padding: 14px 12px 12px;
  border-radius: var(--radius-lg);
  background: var(--color-card);
  border: 1px solid var(--color-border-soft);
  box-shadow: var(--shadow-soft);
}

.enroll-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  margin-bottom: 10px;
}

.enroll-title {
  margin: 0;
  font-family: var(--font-display);
  font-size: 1rem;
  font-weight: 800;
  color: var(--color-foreground);
}

.btn-enroll-add {
  min-height: 36px;
  padding: 0 12px;
  border-radius: var(--radius-pill);
  border: 1.5px solid var(--color-primary);
  background: var(--color-chip-bg);
  color: var(--color-primary-deep);
  font-size: 0.8rem;
  font-weight: 800;
  cursor: pointer;
}

.enroll-list {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.enroll-card {
  width: 100%;
  text-align: left;
  padding: 12px;
  border-radius: var(--radius-md);
  border: 1.5px solid var(--color-border-soft);
  background: #f8fafc;
  cursor: pointer;
  transition: border-color 160ms, box-shadow 160ms;
}

.enroll-card:active {
  border-color: var(--color-primary);
  box-shadow: var(--shadow-press);
}

.enroll-card-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  margin-bottom: 8px;
}

.enroll-card-name {
  font-family: var(--font-display);
  font-weight: 800;
  font-size: 0.95rem;
  color: var(--color-foreground);
}

.enroll-card-edit {
  font-size: 0.72rem;
  font-weight: 700;
  color: var(--color-primary);
}

.enroll-slot-row {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}

.enroll-slot-chip {
  display: inline-flex;
  align-items: center;
  min-height: 28px;
  padding: 0 10px;
  border-radius: var(--radius-pill);
  background: var(--color-chip-bg);
  color: var(--color-primary-deep);
  font-size: 0.72rem;
  font-weight: 700;
}

.sheet-enroll {
  max-height: 92%;
}

.sheet-enroll .sheet-body {
  position: relative;
}

.enroll-hint {
  margin: 10px 0 0;
  font-size: 0.72rem;
  color: var(--color-muted-fg);
  line-height: 1.4;
}

.enroll-slot-list {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.enroll-time-row {
  display: grid;
  grid-template-columns: minmax(72px, 1.1fr) 70px auto 70px 40px;
  gap: 6px;
  align-items: center;
}

.ios-field {
  min-height: 44px;
  border-radius: 12px;
  border: none;
  background: #eef2f3;
  color: var(--color-foreground);
  font-family: var(--font-display);
  font-size: 1rem;
  font-weight: 700;
  cursor: pointer;
  box-shadow: inset 0 0 0 1px rgba(15, 23, 42, 0.04);
  position: relative;
  padding: 0 22px 0 12px;
  text-align: center;
  touch-action: manipulation;
}

.ios-field::after {
  content: '';
  position: absolute;
  right: 10px;
  top: 50%;
  width: 6px;
  height: 6px;
  border-right: 2px solid #94a3b8;
  border-bottom: 2px solid #94a3b8;
  transform: translateY(-60%) rotate(45deg);
}

.ios-field-num {
  font-variant-numeric: tabular-nums;
  letter-spacing: 0.02em;
}

.ios-field:active {
  background: #e2e8f0;
}

.enroll-colon {
  font-weight: 800;
  color: var(--color-muted-fg);
  text-align: center;
  font-size: 1.1rem;
}

.enroll-row-remove {
  width: 40px;
  height: 44px;
  border-radius: 12px;
  border: none;
  background: #fee2e2;
  color: var(--color-destructive);
  font-size: 1.25rem;
  font-weight: 700;
  line-height: 1;
  cursor: pointer;
}

.btn-enroll-add-row {
  margin-top: 10px;
  width: 100%;
  min-height: 44px;
  border-radius: var(--radius-md);
  border: 1.5px dashed var(--color-primary);
  background: var(--color-chip-bg);
  color: var(--color-primary-deep);
  font-size: 1.4rem;
  font-weight: 800;
  cursor: pointer;
  touch-action: manipulation;
}

.btn-enroll-add-row:active {
  transform: scale(0.99);
}

.ios-picker {
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  z-index: 5;
  background: rgba(242, 242, 247, 0.96);
  backdrop-filter: blur(16px);
  border-radius: 16px 16px 0 0;
  box-shadow: 0 -8px 28px rgba(15, 23, 42, 0.12);
  transform: translateY(110%);
  transition: transform 280ms var(--ease-out);
  overflow: hidden;
}

.ios-picker.is-open {
  transform: translateY(0);
}

.ios-picker[hidden] {
  display: none !important;
}

.ios-picker-toolbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 10px 12px;
  border-bottom: 1px solid rgba(15, 23, 42, 0.08);
  background: rgba(255, 255, 255, 0.72);
}

.ios-picker-title {
  font-size: 0.85rem;
  font-weight: 800;
  color: var(--color-foreground);
}

.ios-picker-cancel,
.ios-picker-done {
  min-height: 36px;
  padding: 0 8px;
  border: none;
  background: transparent;
  font-size: 0.95rem;
  font-weight: 700;
  cursor: pointer;
  color: var(--color-primary);
}

.ios-picker-cancel {
  color: var(--color-muted-fg);
  font-weight: 600;
}

.ios-picker-body {
  position: relative;
  height: 200px;
  overflow: hidden;
}

.ios-picker-highlight {
  position: absolute;
  left: 8px;
  right: 8px;
  top: 50%;
  height: 40px;
  margin-top: -20px;
  border-radius: 10px;
  background: rgba(120, 120, 128, 0.14);
  pointer-events: none;
  z-index: 1;
}

.ios-picker-wheels {
  position: relative;
  z-index: 2;
  display: grid;
  grid-template-columns: 1.2fr 1fr 1fr;
  height: 100%;
}

.ios-wheel {
  height: 100%;
  overflow-y: auto;
  scroll-snap-type: y mandatory;
  -webkit-overflow-scrolling: touch;
  overscroll-behavior: contain;
  padding: 80px 0;
  scrollbar-width: none;
  text-align: center;
}

.ios-wheel::-webkit-scrollbar {
  display: none;
}

.ios-wheel-item {
  height: 40px;
  display: flex;
  align-items: center;
  justify-content: center;
  scroll-snap-align: center;
  font-size: 1.15rem;
  font-weight: 700;
  color: var(--color-foreground);
  font-variant-numeric: tabular-nums;
}

@media (prefers-reduced-motion: reduce) {
  .ios-picker {
    transition: none;
  }
}

#btn-enroll-delete {
  color: var(--color-destructive);
}

/* Mentor chat sheet */
.sheet-mentor {
  max-height: 92%;
  height: min(720px, 92%);
}

.sheet-mentor .sheet-head {
  flex-shrink: 0;
}

.mentor-chat {
  flex: 1;
  min-height: 0;
  overflow-y: auto;
  padding: 4px 16px 12px;
  display: flex;
  flex-direction: column;
  gap: 10px;
  overscroll-behavior: contain;
}

.mentor-msg {
  display: flex;
  max-width: 92%;
}

.mentor-msg-bot {
  align-self: flex-start;
}

.mentor-msg-user {
  align-self: flex-end;
}

.mentor-msg .bubble {
  padding: 10px 12px;
  border-radius: 16px;
  font-size: 0.88rem;
  line-height: 1.5;
  white-space: pre-wrap;
  word-break: break-word;
  overflow-wrap: anywhere;
}

.mentor-msg-bot .bubble {
  background: #f0fdfa;
  border: 1.5px solid var(--color-border-soft);
  color: var(--color-foreground);
  border-bottom-left-radius: 6px;
}

.mentor-msg-user .bubble {
  background: linear-gradient(145deg, #14b8a6, #0d9488);
  color: #fff;
  border-bottom-right-radius: 6px;
}

.mentor-suggest {
  display: flex;
  gap: 6px;
  overflow-x: auto;
  padding: 0 16px 10px;
  flex-shrink: 0;
  scrollbar-width: none;
}

.mentor-suggest::-webkit-scrollbar {
  display: none;
}

.mentor-suggest button {
  flex: 0 0 auto;
  min-height: 34px;
  padding: 0 12px;
  border-radius: var(--radius-pill);
  background: #ecfdf5;
  border: 1.5px solid var(--color-border);
  color: var(--color-primary-deep);
  font-size: 0.75rem;
  font-weight: 700;
  white-space: nowrap;
}

.mentor-suggest button:active {
  transform: scale(0.97);
}

.mentor-compose {
  display: flex;
  align-items: flex-end;
  gap: 8px;
  padding: 10px 16px calc(12px + env(safe-area-inset-bottom, 0px));
  border-top: 1px solid var(--color-border-soft);
  background: #fff;
  flex-shrink: 0;
}

.mentor-input {
  flex: 1;
  min-height: 44px;
  max-height: 96px;
  resize: none;
  border-radius: 16px;
  border: 1.5px solid var(--color-border-soft);
  padding: 10px 12px;
  background: #f8fafc;
  color: var(--color-foreground);
  font-size: 16px;
  line-height: 1.4;
}

.mentor-input::placeholder {
  color: #94a3b8;
}

.mentor-send {
  flex: 0 0 auto !important;
  width: 44px;
  min-height: 44px;
  padding: 0;
  border-radius: 14px;
}

.mentor-send svg {
  width: 18px;
  height: 18px;
}

.mentor-send:disabled {
  opacity: 0.55;
  cursor: not-allowed;
}

.mentor-input:disabled {
  opacity: 0.7;
}

.bubble-typing {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  min-height: 40px;
}

.mentor-typing-label {
  font-size: 0.8rem;
  font-weight: 600;
  color: #64748b;
}

.mentor-typing-dots {
  display: inline-flex;
  align-items: center;
  gap: 4px;
}

.mentor-typing-dots i {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: #14b8a6;
  opacity: 0.35;
  animation: mentor-typing-bounce 1.05s infinite ease-in-out;
}

.mentor-typing-dots i:nth-child(2) {
  animation-delay: 0.15s;
}

.mentor-typing-dots i:nth-child(3) {
  animation-delay: 0.3s;
}

@keyframes mentor-typing-bounce {
  0%,
  80%,
  100% {
    transform: translateY(0);
    opacity: 0.35;
  }
  40% {
    transform: translateY(-3px);
    opacity: 1;
  }
}

.mentor-msg-streaming .bubble::after {
  content: '';
  display: inline-block;
  width: 2px;
  height: 0.95em;
  margin-left: 2px;
  vertical-align: -0.1em;
  background: #0d9488;
  animation: mentor-caret-blink 0.85s step-end infinite;
}

@keyframes mentor-caret-blink {
  50% {
    opacity: 0;
  }
}

/* 온보딩: btn-primary flex:1 이 세로로 커지지 않게 */
#screen-onboard .btn-onboard-submit,
.btn-onboard-submit {
  flex: 0 0 auto;
  width: 100%;
  min-height: 48px;
  margin-top: 8px;
  border-radius: var(--radius-md);
  align-self: stretch;
}

#screen-onboard .form-field-slots {
  flex: 0 0 auto;
}

#screen-onboard .ios-picker {
  position: absolute;
  z-index: 30;
}

.onboard-steps {
  display: flex;
  gap: 6px;
  margin-bottom: 16px;
}

.onboard-steps span {
  flex: 1;
  height: 6px;
  border-radius: 999px;
  background: #d1fae5;
}

.onboard-steps span.is-on {
  background: var(--color-primary);
}

.form-field {
  margin-bottom: 12px;
}

.form-field label {
  display: block;
  font-size: 0.78rem;
  font-weight: 700;
  color: var(--color-muted-fg);
  margin-bottom: 6px;
}

.form-field input,
.form-field select {
  width: 100%;
  min-height: 48px;
  border-radius: var(--radius-md);
  border: 1.5px solid var(--color-border-soft);
  padding: 0 12px;
  background: #fff;
  font-size: 16px;
}

.empty-state {
  text-align: center;
  padding: 36px 16px;
}

.empty-state .icon {
  width: 64px;
  height: 64px;
  margin: 0 auto 12px;
  border-radius: 22px;
  background: linear-gradient(145deg, #ccfbf1, #5eead4);
  display: grid;
  place-items: center;
  box-shadow: var(--shadow-card);
}

.empty-state .icon svg {
  width: 28px;
  height: 28px;
  color: var(--color-primary-deep);
}

.empty-state h3 {
  font-family: var(--font-display);
  margin: 0 0 6px;
}

.empty-state p {
  margin: 0 0 16px;
  color: var(--color-muted-fg);
  font-size: 0.88rem;
  line-height: 1.45;
}

.hidden {
  display: none !important;
}

.panel-prep.is-hidden,
.panel-after.is-hidden {
  display: none;
}

/* legacy hide unused when outside track; track uses slide instead */


/* —— Login —— */
.login-screen {
  min-height: 100dvh;
  min-height: 100vh;
  display: grid;
  place-items: center;
  padding: 24px 16px;
  background:
    radial-gradient(120% 80% at 50% -10%, #99f6e4 0%, transparent 55%),
    linear-gradient(165deg, #f0fdfa 0%, #ccfbf1 48%, #e0f2f1 100%);
}

.login-screen[hidden] {
  display: none !important;
}

.login-card {
  width: min(100%, 380px);
  background: var(--color-card);
  border-radius: var(--radius-xl);
  box-shadow: var(--shadow-soft);
  padding: 28px 22px 24px;
  border: 1px solid rgba(153, 246, 228, 0.65);
}

.login-brand {
  text-align: center;
  margin-bottom: 22px;
}

.login-brand .mascot {
  width: 56px;
  height: 56px;
  margin: 0 auto 12px;
  border-radius: 18px;
  background: linear-gradient(145deg, #5eead4, #0d9488);
  color: #fff;
  display: grid;
  place-items: center;
  box-shadow: var(--shadow-card);
}

.login-brand .mascot svg {
  width: 30px;
  height: 30px;
}

.login-brand h1 {
  font-family: var(--font-display);
  font-size: 1.55rem;
  font-weight: 800;
  margin: 0 0 6px;
  color: var(--color-foreground);
}

.login-brand p {
  margin: 0;
  color: var(--color-muted-fg);
  font-size: 0.9rem;
}

.login-form label {
  display: block;
  font-size: 0.78rem;
  font-weight: 700;
  color: var(--color-muted-fg);
  margin: 12px 0 6px;
}

.login-form input {
  width: 100%;
  min-height: 48px;
  border-radius: var(--radius-md);
  border: 1.5px solid var(--color-border-soft);
  padding: 0 12px;
  background: #fff;
  font-size: 16px;
  color: var(--color-foreground);
}

.login-form input:focus {
  outline: none;
  border-color: var(--color-primary);
  box-shadow: 0 0 0 3px rgba(13, 148, 136, 0.18);
}

.login-form .btn {
  margin-top: 18px;
}

.login-error {
  margin: 10px 0 0;
  color: var(--color-destructive);
  font-size: 0.85rem;
  line-height: 1.4;
}

.app[hidden] {
  display: none !important;
}


.login-hint {
  margin: 8px 0 0;
  color: var(--color-muted-fg);
  font-size: 0.8rem;
  line-height: 1.4;
}

.login-toggle {
  display: block;
  width: 100%;
  margin-top: 16px;
  padding: 10px 8px 0;
  border: 0;
  border-top: 1px solid var(--color-border-soft);
  background: transparent;
  color: var(--color-primary-deep);
  font-size: 0.82rem;
  font-weight: 700;
  cursor: pointer;
  text-align: center;
}

.login-toggle:hover {
  text-decoration: underline;
}

#login-name-wrap[hidden] {
  display: none !important;
}


.login-kakao {
  margin-top: 16px;
}

.login-kakao[hidden] {
  display: none !important;
}

.login-or {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 12px;
  color: var(--color-muted-fg);
  font-size: 0.75rem;
}

.login-or span {
  flex: 1;
  height: 1px;
  background: var(--color-border-soft);
}

.login-or em {
  font-style: normal;
}

.btn-kakao {
  width: 100%;
  min-height: 48px;
  border: 0;
  border-radius: var(--radius-md);
  background: #fee500;
  color: #191919;
  font-size: 0.95rem;
  font-weight: 700;
  cursor: pointer;
  box-shadow: 0 2px 8px rgba(25, 25, 25, 0.08);
}

.btn-kakao:hover {
  filter: brightness(0.97);
}

.auth-modal {
  position: fixed;
  inset: 0;
  z-index: 120;
  display: grid;
  place-items: center;
  padding: 16px;
}

.auth-modal[hidden] {
  display: none !important;
}

.auth-modal-backdrop {
  position: absolute;
  inset: 0;
  background: rgba(19, 78, 74, 0.45);
  backdrop-filter: blur(4px);
}

.auth-modal-panel {
  position: relative;
  width: min(100%, 380px);
  background: #fff;
  border-radius: var(--radius-xl);
  box-shadow: var(--shadow-sheet);
  padding: 22px 20px 16px;
  border: 1px solid var(--color-border-soft);
}

.auth-modal-head {
  text-align: center;
  margin-bottom: 14px;
}

.auth-modal-head h3 {
  margin: 0 0 6px;
  font-family: var(--font-display);
  font-size: 1.1rem;
  font-weight: 800;
}

.auth-modal-head p {
  margin: 0;
  color: var(--color-muted-fg);
  font-size: 0.85rem;
  line-height: 1.4;
}

.auth-tabs {
  display: flex;
  gap: 8px;
  margin-bottom: 14px;
}

.auth-tab {
  flex: 1;
  min-height: 40px;
  border: 0;
  border-radius: var(--radius-sm);
  background: #f1f5f4;
  color: var(--color-muted-fg);
  font-weight: 700;
  font-size: 0.85rem;
  cursor: pointer;
}

.auth-tab.is-on {
  background: var(--color-primary);
  color: #fff;
}

#kakao-pending-panel-register label,
#kakao-pending-panel-link label {
  display: block;
  font-size: 0.78rem;
  font-weight: 700;
  color: var(--color-muted-fg);
  margin: 10px 0 6px;
}

#kakao-pending-panel-register input,
#kakao-pending-panel-link input {
  width: 100%;
  min-height: 48px;
  border-radius: var(--radius-md);
  border: 1.5px solid var(--color-border-soft);
  padding: 0 12px;
  background: #fff;
  font-size: 16px;
}

#kakao-pending-panel-register .btn,
#kakao-pending-panel-link .btn {
  margin-top: 14px;
}

#kakao-pending-panel-link[hidden],
#kakao-pending-panel-register[hidden] {
  display: none !important;
}


/* —— Todac modal (alert/confirm layer) —— */
body.todac-modal-lock {
  overflow: hidden;
}

.todac-modal {
  position: fixed;
  inset: 0;
  z-index: 200;
  display: grid;
  place-items: center;
  padding: 16px;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.2s var(--ease-out);
}

.todac-modal[hidden] {
  display: none !important;
}

.todac-modal.is-open {
  opacity: 1;
  pointer-events: auto;
}

.todac-modal-backdrop {
  position: absolute;
  inset: 0;
  background: rgba(19, 78, 74, 0.45);
  backdrop-filter: blur(5px);
}

.todac-modal-panel {
  position: relative;
  width: min(100%, 380px);
  background: var(--color-card);
  border-radius: var(--radius-xl);
  box-shadow: var(--shadow-sheet);
  border: 1px solid rgba(153, 246, 228, 0.55);
  padding: 22px 20px 16px;
  transform: translateY(12px) scale(0.98);
  transition: transform 0.22s var(--ease);
}

.todac-modal.is-open .todac-modal-panel {
  transform: translateY(0) scale(1);
}

.todac-modal-body {
  display: flex;
  gap: 12px;
  align-items: flex-start;
}

.todac-modal-icon {
  width: 42px;
  height: 42px;
  border-radius: 14px;
  display: grid;
  place-items: center;
  flex-shrink: 0;
  background: var(--color-chip-bg);
  color: var(--color-primary-deep);
}

.todac-modal-icon[data-tone="success"] {
  background: #ecfdf5;
  color: var(--color-success);
}

.todac-modal-icon[data-tone="error"] {
  background: #fef2f2;
  color: var(--color-destructive);
}

.todac-modal-icon[data-tone="warning"] {
  background: #fff7ed;
  color: var(--color-warn);
}

.todac-modal-icon svg {
  width: 22px;
  height: 22px;
}

.todac-modal-copy {
  min-width: 0;
  flex: 1;
  padding-top: 2px;
}

.todac-modal-copy h3 {
  margin: 0 0 6px;
  font-family: var(--font-display);
  font-size: 1.05rem;
  font-weight: 800;
  color: var(--color-foreground);
}

.todac-modal-copy p {
  margin: 0;
  color: var(--color-muted-fg);
  font-size: 0.9rem;
  line-height: 1.5;
  white-space: pre-line;
}

.todac-modal-actions {
  display: flex;
  flex-direction: column-reverse;
  gap: 8px;
  margin-top: 18px;
}

@media (min-width: 420px) {
  .todac-modal-actions {
    flex-direction: row;
    justify-content: flex-end;
  }
}

.todac-modal-btn {
  min-height: 44px;
  padding: 0 16px;
  border-radius: var(--radius-md);
  border: 0;
  font-size: 0.9rem;
  font-weight: 700;
  cursor: pointer;
}

.todac-modal-btn-ghost {
  background: #f1f5f4;
  color: var(--color-muted-fg);
}

.todac-modal-btn-ghost:hover {
  background: #e5eeec;
}

.todac-modal-btn-primary {
  background: var(--color-primary);
  color: #fff;
  box-shadow: var(--shadow-press);
}

.todac-modal-btn-primary:hover {
  background: var(--color-primary-deep);
}

.todac-modal-btn-primary.is-danger {
  background: var(--color-destructive);
  box-shadow: 0 4px 12px rgba(220, 38, 38, 0.2);
}

.todac-modal-btn-primary.is-danger:hover {
  filter: brightness(0.95);
}

.todac-modal-btn[hidden] {
  display: none !important;
}


/* —— Initial assessment —— */
.detail-assess-cta {
  margin: 10px 0 4px;
  padding: 12px;
  border-radius: var(--radius-lg);
  background: linear-gradient(145deg, #ecfdf5, #ccfbf1);
  border: 1.5px solid var(--color-border);
}

.detail-assess-cta[hidden] {
  display: none !important;
}

.detail-assess-cta .usage-line {
  margin: 8px 0 0;
  text-align: center;
}

.assess-progress {
  margin-left: auto;
  font-size: 0.78rem;
  font-weight: 700;
  color: var(--color-primary-deep);
}

.assess-host {
  margin-top: 8px;
}

.assess-axis {
  margin: 0 0 6px;
  font-size: 0.72rem;
  font-weight: 800;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: var(--color-primary-deep);
}

.assess-q {
  margin: 0 0 6px;
  font-family: var(--font-display);
  font-size: 1.15rem;
  font-weight: 800;
  color: var(--color-foreground);
  line-height: 1.35;
}

.assess-hint {
  margin: 0 0 12px;
  font-size: 0.78rem;
  color: var(--color-muted-fg);
}

.assess-scores {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.assess-score {
  display: flex;
  gap: 10px;
  align-items: flex-start;
  width: 100%;
  text-align: left;
  padding: 12px;
  border-radius: var(--radius-md);
  border: 1.5px solid var(--color-border-soft);
  background: #fff;
  cursor: pointer;
  color: var(--color-foreground);
  font-size: 0.88rem;
  line-height: 1.4;
}

.assess-score .n {
  flex-shrink: 0;
  width: 24px;
  font-weight: 800;
  color: var(--color-primary-deep);
  font-variant-numeric: tabular-nums;
}

.assess-score.is-on {
  border-color: var(--color-primary);
  background: #ecfdf5;
  box-shadow: var(--shadow-press);
}

.assess-nav {
  display: flex;
  gap: 8px;
  margin-top: 16px;
  padding-bottom: 8px;
}

.assess-nav .btn {
  flex: 1;
  min-height: 48px;
}


.detail-brief-section {
  margin: 0 0 10px;
}

.detail-brief-section:last-child {
  margin-bottom: 0;
}

.detail-brief-section .k {
  font-size: 0.72rem;
  font-weight: 800;
  color: var(--color-primary-deep);
  margin-bottom: 4px;
}

.detail-brief-section .v {
  margin: 0;
  font-size: 0.88rem;
  line-height: 1.5;
  color: var(--color-foreground);
  white-space: pre-line;
}

.axis-panel.is-empty {
  opacity: 0.72;
}

.radar-legend.is-hidden,
.radar-prev.is-hidden {
  display: none !important;
}

/* ========== Landing (비로그인 첫 화면) ========== */
.landing {
  width: 100%;
  height: 100dvh;
  height: 100vh;
  overflow-x: hidden;
  overflow-y: auto;
  -webkit-overflow-scrolling: touch;
  overscroll-behavior: contain;
  background:
    radial-gradient(ellipse 120% 80% at 10% -10%, rgba(45, 212, 191, 0.22), transparent 55%),
    radial-gradient(ellipse 90% 70% at 100% 0%, rgba(217, 119, 6, 0.1), transparent 50%),
    linear-gradient(180deg, #f0fdfa 0%, #ecfeff 42%, #f8fffe 100%);
  color: var(--color-foreground);
  font-family: var(--font-body);
}

.landing[hidden] {
  display: none !important;
}

.landing-top {
  position: sticky;
  top: 0;
  z-index: 20;
  width: 100%;
  box-sizing: border-box;
  padding: 12px 0;
  padding-top: max(12px, env(safe-area-inset-top));
  background: rgba(240, 253, 250, 0.82);
  backdrop-filter: blur(12px);
  border-bottom: 1px solid rgba(153, 246, 228, 0.45);
}

.landing-shell {
  width: 100%;
  max-width: 1200px;
  margin-left: auto;
  margin-right: auto;
  padding-left: clamp(16px, 4vw, 32px);
  padding-right: clamp(16px, 4vw, 32px);
  box-sizing: border-box;
}

.landing-top-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.landing-brand {
  display: flex;
  align-items: center;
  gap: 10px;
}

.landing-brand .mascot {
  /* 앱 헤더(.mascot)와 동일: 청록 그라데이션 + 흰 아이콘 */
  width: 40px;
  height: 40px;
  border-radius: 14px;
  display: grid;
  place-items: center;
  color: #fff;
  background: linear-gradient(145deg, #5eead4, #0d9488);
  box-shadow: var(--shadow-card);
}

.landing-brand .mascot svg {
  width: 22px;
  height: 22px;
  color: white;
}

.landing-brand-name {
  font-family: var(--font-display);
  font-weight: 800;
  font-size: 1.05rem;
  letter-spacing: -0.02em;
  color: var(--color-foreground);
}

.landing-top-login {
  appearance: none;
  border: 1px solid var(--color-border);
  background: #fff;
  color: var(--color-primary-deep);
  font: inherit;
  font-weight: 700;
  font-size: 0.85rem;
  padding: 8px 14px;
  border-radius: var(--radius-pill);
  cursor: pointer;
  transition: transform 180ms var(--ease), box-shadow 180ms ease, background 180ms ease;
}

.landing-top-login:hover {
  background: var(--color-chip-bg);
  box-shadow: var(--shadow-press);
}

.landing-top-login.is-logged-in {
  background: linear-gradient(145deg, #14b8a6, #0d9488);
  color: #fff;
  border-color: transparent;
  box-shadow: var(--shadow-press);
}

.landing-top-login.is-logged-in:hover {
  background: linear-gradient(145deg, #0d9488, #0f766e);
}

.landing-main {
  width: 100%;
  max-width: none;
  margin: 0;
  padding-bottom: 48px;
  box-sizing: border-box;
}

.landing-hero {
  position: relative;
  overflow: hidden;
  width: 100%;
  box-sizing: border-box;
  padding: 28px 0 16px;
  text-align: center;
}

.landing-hero-grid {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 24px;
}

.landing-hero-copy {
  position: relative;
  z-index: 1;
  width: 100%;
  max-width: 40rem;
}

.landing-hero-blob {
  position: absolute;
  width: 180px;
  height: 180px;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(45, 212, 191, 0.35), transparent 70%);
  top: -40px;
  left: -50px;
  pointer-events: none;
  animation: landingBlob 12s ease-in-out infinite alternate;
}

.landing-hero-blob-2 {
  width: 140px;
  height: 140px;
  background: radial-gradient(circle, rgba(217, 119, 6, 0.18), transparent 70%);
  top: 80px;
  left: auto;
  right: -40px;
  animation-duration: 14s;
  animation-direction: alternate-reverse;
}

@keyframes landingBlob {
  from { transform: translate(0, 0); }
  to { transform: translate(12px, 18px); }
}

.landing-kicker {
  position: relative;
  margin: 0 0 12px;
  font-size: 0.78rem;
  font-weight: 700;
  letter-spacing: 0.04em;
  color: var(--color-primary-deep);
}

.landing-hero-title {
  position: relative;
  margin: 0 0 16px;
  font-family: var(--font-display);
  font-size: clamp(1.45rem, 5.5vw, 1.85rem);
  font-weight: 800;
  line-height: 1.35;
  letter-spacing: -0.03em;
  color: var(--color-foreground);
}

.landing-hero-body {
  position: relative;
  margin: 0 auto 18px;
  max-width: none;
  font-size: 0.95rem;
  line-height: 1.65;
  color: var(--color-muted-fg);
}

.landing-hero-body p {
  margin: 0 0 12px;
}

.landing-dim {
  color: #7a9190;
}

.landing-tagline {
  position: relative;
  margin: 0 auto 20px;
  max-width: none;
  font-family: var(--font-display);
  font-size: 1.05rem;
  font-weight: 800;
  line-height: 1.45;
  color: var(--color-primary-deep);
}

.landing-cta-row {
  position: relative;
  display: flex;
  flex-direction: column;
  gap: 10px;
  align-items: stretch;
  margin: 0 auto;
  width: 100%;
  max-width: 22rem;
}

.landing-cta-row .btn {
  cursor: pointer;
  min-height: 48px;
  border-radius: 16px;
  font-weight: 700;
  transition: transform 180ms var(--ease), box-shadow 180ms ease, background 180ms ease;
}

.landing-cta-row .btn:active {
  transform: scale(0.97);
}

.btn-ghost-teal {
  background: #fff;
  color: var(--color-primary-deep);
  border: 1px solid var(--color-border);
  box-shadow: var(--shadow-soft);
}

.btn-ghost-teal:hover {
  background: var(--color-chip-bg);
}

.btn-ghost-light {
  background: transparent;
  color: #fff;
  border: 1px solid rgba(255, 255, 255, 0.35);
}

.btn-ghost-light:hover {
  background: rgba(255, 255, 255, 0.1);
}

.landing-phone {
  position: relative;
  z-index: 1;
  margin: 0 auto;
  width: 100%;
  max-width: 360px;
  padding: 0;
}

.landing-phone-frame {
  background: linear-gradient(165deg, #ffffff 0%, #f0fdfa 100%);
  border: 1px solid var(--color-border);
  border-radius: 28px;
  padding: 14px 14px 16px;
  box-shadow: var(--shadow-card);
  text-align: left;
  animation: landingPhoneIn 700ms var(--ease-out) both;
}

@keyframes landingPhoneIn {
  from { opacity: 0; transform: translateY(18px) scale(0.98); }
  to { opacity: 1; transform: translateY(0) scale(1); }
}

.landing-phone-bar {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 0.72rem;
  font-weight: 800;
  color: var(--color-primary-deep);
  margin-bottom: 12px;
}

.landing-phone-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--color-primary);
  box-shadow: 0 0 0 4px rgba(13, 148, 136, 0.15);
}

.landing-phone-card {
  background: #fff;
  border: 1px solid var(--color-border-soft);
  border-radius: 16px;
  padding: 12px;
  margin-bottom: 10px;
  box-shadow: 0 4px 14px rgba(13, 148, 136, 0.06);
}

.landing-phone-card-soft {
  background: #f8fffe;
  opacity: 0.95;
}

.landing-phone-name {
  font-size: 0.82rem;
  font-weight: 800;
  color: var(--color-foreground);
}

.landing-phone-chip {
  display: inline-block;
  margin-top: 6px;
  padding: 3px 10px;
  border-radius: var(--radius-pill);
  font-size: 0.68rem;
  font-weight: 800;
  background: var(--color-chip-bg);
  color: var(--color-primary-deep);
  white-space: nowrap;
}

.landing-phone-chip-amber {
  background: var(--color-accent-soft);
  color: #b45309;
}

.landing-phone-line {
  margin: 8px 0 0;
  font-size: 0.78rem;
  line-height: 1.45;
  color: var(--color-muted-fg);
}

.landing-proof {
  text-align: center;
  width: 100%;
  box-sizing: border-box;
  padding: 28px 0;
  border-top: 1px solid rgba(153, 246, 228, 0.35);
  border-bottom: 1px solid rgba(153, 246, 228, 0.35);
  background: rgba(255, 255, 255, 0.45);
}

.landing-stars {
  margin: 0 0 10px;
  color: #d97706;
  letter-spacing: 0.12em;
  font-size: 0.9rem;
}

.landing-proof p:last-child {
  margin: 0 auto;
  max-width: 36rem;
  font-size: 0.92rem;
  line-height: 1.6;
  color: var(--color-muted-fg);
}

.landing-section {
  width: 100%;
  box-sizing: border-box;
  padding: 40px 0;
}

.landing-section-alt {
  background: rgba(255, 255, 255, 0.55);
  border-top: 1px solid rgba(153, 246, 228, 0.3);
  border-bottom: 1px solid rgba(153, 246, 228, 0.3);
}

.landing-h2 {
  margin: 0 0 16px;
  text-align: center;
  font-family: var(--font-display);
  font-size: clamp(1.25rem, 4.8vw, 1.5rem);
  font-weight: 800;
  line-height: 1.4;
  letter-spacing: -0.02em;
}

.landing-h3 {
  margin: 28px 0 14px;
  text-align: center;
  font-family: var(--font-display);
  font-size: 1.05rem;
  font-weight: 800;
  color: var(--color-primary-deep);
}

.landing-lead {
  margin: 0 auto 20px;
  text-align: center;
  max-width: 36rem;
  font-size: 0.92rem;
  line-height: 1.6;
  color: var(--color-muted-fg);
}

.landing-empathy-list,
.landing-levels {
  display: grid;
  grid-template-columns: 1fr;
  gap: 12px;
  margin-bottom: 20px;
  width: 100%;
}

.landing-panel {
  background: #fff;
  border: 1px solid var(--color-border-soft);
  border-radius: var(--radius-lg);
  padding: 16px 16px 14px;
  box-shadow: var(--shadow-soft);
  text-align: left;
}

.landing-panel-accent {
  border-color: rgba(13, 148, 136, 0.35);
  box-shadow: var(--shadow-card);
}

.landing-panel-label {
  margin: 0;
  font-size: 0.7rem;
  font-weight: 800;
  letter-spacing: 0.04em;
  color: #8aa3a0;
}

.landing-panel-label.teal {
  color: var(--color-primary-deep);
}

.landing-panel-title {
  margin: 8px 0 0;
  font-family: var(--font-display);
  font-size: 1rem;
  font-weight: 800;
  line-height: 1.4;
  color: var(--color-foreground);
}

.landing-panel-body {
  margin: 10px 0 0;
  font-size: 0.88rem;
  line-height: 1.55;
  color: var(--color-muted-fg);
}

.landing-link {
  appearance: none;
  border: 0;
  background: none;
  margin-top: 12px;
  padding: 0;
  font: inherit;
  font-size: 0.88rem;
  font-weight: 800;
  color: var(--color-primary-deep);
  cursor: pointer;
  text-align: left;
}

.landing-link:hover {
  text-decoration: underline;
}

.landing-why {
  max-width: 40rem;
  margin: 0 auto;
  text-align: center;
  font-size: 0.95rem;
  line-height: 1.65;
  color: var(--color-muted-fg);
}

.landing-why p {
  margin: 0 0 12px;
}

.landing-why-lead {
  font-weight: 800;
  color: var(--color-foreground);
}

.landing-why-close {
  margin-top: 8px !important;
  font-weight: 700;
  color: var(--color-foreground);
}

.landing-quote-box {
  background: rgba(204, 251, 241, 0.55);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-lg);
  padding: 16px 18px;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.7);
  width: 100%;
  max-width: 48rem;
  margin: 0 auto;
  box-sizing: border-box;
}

.landing-quote-box p {
  margin: 0 0 10px;
  font-size: 0.92rem;
  line-height: 1.5;
  color: var(--color-foreground);
}

.landing-quote-box p:last-child {
  margin-bottom: 0;
}

.landing-flow {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  grid-template-columns: 1fr;
  gap: 10px;
  width: 100%;
}

.landing-flow-step {
  display: flex;
  gap: 12px;
  align-items: flex-start;
  background: #fff;
  border: 1px solid var(--color-border-soft);
  border-radius: var(--radius-md);
  padding: 14px;
  box-shadow: var(--shadow-soft);
}

.landing-flow-step strong {
  display: block;
  font-family: var(--font-display);
  font-size: 0.95rem;
  font-weight: 800;
  margin-bottom: 4px;
}

.landing-flow-step p {
  margin: 0;
  font-size: 0.85rem;
  line-height: 1.5;
  color: var(--color-muted-fg);
}

.landing-flow-num {
  flex-shrink: 0;
  width: 32px;
  height: 32px;
  border-radius: 12px;
  display: grid;
  place-items: center;
  font-size: 0.82rem;
  font-weight: 800;
  color: var(--color-on-primary);
  background: linear-gradient(145deg, var(--color-secondary), var(--color-primary));
  box-shadow: 0 4px 12px rgba(13, 148, 136, 0.25);
}

.landing-flow-step-done {
  border-color: rgba(13, 148, 136, 0.4);
  background: linear-gradient(160deg, #ecfdf5, #fff);
}

.landing-flow-step-done .landing-flow-num {
  background: linear-gradient(145deg, #34d399, #059669);
}

.landing-mentor-quotes {
  display: grid;
  grid-template-columns: 1fr;
  gap: 10px;
  margin: 0 0 18px;
  width: 100%;
}

.landing-mentor-quotes p {
  margin: 0;
  background: #fff;
  border: 1px solid var(--color-border-soft);
  border-radius: 16px;
  padding: 12px 14px;
  font-size: 0.9rem;
  color: var(--color-foreground);
  box-shadow: var(--shadow-soft);
}

.landing-free-list {
  list-style: none;
  margin: 0 auto 20px;
  padding: 0;
  display: grid;
  grid-template-columns: 1fr;
  gap: 8px;
  width: 100%;
  max-width: 48rem;
}

.landing-free-list li {
  display: flex;
  align-items: center;
  gap: 10px;
  background: #fff;
  border: 1px solid var(--color-border-soft);
  border-radius: 14px;
  padding: 12px 14px;
  font-size: 0.9rem;
  font-weight: 600;
  box-shadow: var(--shadow-soft);
}

.landing-free-list li span {
  color: var(--color-primary);
  font-weight: 800;
}

.landing-fine {
  margin: 12px 0 0;
  text-align: center;
  font-size: 0.75rem;
  color: #8aa3a0;
}

.landing-final {
  width: 100%;
  margin: 0;
  padding: 40px 0;
  border-radius: 0;
  background: linear-gradient(165deg, #134e4a 0%, #0f766e 55%, #0d9488 100%);
  color: #ecfdf5;
  text-align: center;
  box-shadow: none;
  box-sizing: border-box;
}

.landing-final .landing-h2 {
  color: #fff;
  margin-bottom: 14px;
}

.landing-final > p {
  margin: 0 auto 10px;
  max-width: 36rem;
  font-size: 0.92rem;
  line-height: 1.6;
  color: rgba(236, 253, 245, 0.85);
}

.landing-final-em {
  font-weight: 700 !important;
  color: #fff !important;
  margin-bottom: 20px !important;
}

.landing-final .landing-cta-row {
  max-width: 28rem;
  margin-left: auto;
  margin-right: auto;
  justify-content: center;
}

.landing-final .btn-primary {
  background: #fff;
  color: var(--color-primary-deep);
  box-shadow: 0 8px 20px rgba(0, 0, 0, 0.18);
}

.landing-final .btn-primary:hover {
  background: #ecfdf5;
}

.landing-foot {
  text-align: center;
  width: 100%;
  box-sizing: border-box;
  padding: 28px 0 max(32px, env(safe-area-inset-bottom));
}

.landing-foot button {
  appearance: none;
  border: 0;
  background: none;
  font: inherit;
  font-size: 0.85rem;
  font-weight: 700;
  color: var(--color-primary-deep);
  cursor: pointer;
  text-decoration: underline;
  text-underline-offset: 3px;
}

.landing-foot p {
  margin: 12px 0 0;
  font-size: 0.75rem;
  color: #8aa3a0;
}

.landing-story-modal {
  position: fixed;
  inset: 0;
  z-index: 80;
  display: flex;
  align-items: flex-end;
  justify-content: center;
}

.landing-story-modal[hidden] {
  display: none !important;
}

.landing-story-backdrop {
  position: absolute;
  inset: 0;
  background: rgba(19, 78, 74, 0.4);
  backdrop-filter: blur(2px);
}

.landing-story-panel {
  position: relative;
  width: min(100%, 420px);
  max-height: min(86dvh, 640px);
  overflow: auto;
  margin: 0;
  padding: 18px 18px max(20px, env(safe-area-inset-bottom));
  background: #fff;
  border-radius: 24px 24px 0 0;
  box-shadow: var(--shadow-sheet);
  animation: landingSheetUp 320ms var(--ease-out);
}

@keyframes landingSheetUp {
  from { transform: translateY(24px); opacity: 0.6; }
  to { transform: translateY(0); opacity: 1; }
}

.landing-story-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 8px;
}

.landing-story-close {
  appearance: none;
  border: 0;
  background: var(--color-muted);
  width: 36px;
  height: 36px;
  border-radius: 12px;
  font-size: 1.35rem;
  line-height: 1;
  color: var(--color-muted-fg);
  cursor: pointer;
}

.landing-story-panel h3 {
  margin: 8px 0 0;
  font-family: var(--font-display);
  font-size: 1.15rem;
  font-weight: 800;
  line-height: 1.4;
}

.landing-story-body {
  margin-top: 14px;
  font-size: 0.92rem;
  line-height: 1.6;
  color: var(--color-muted-fg);
}

.landing-story-body p {
  margin: 0 0 12px;
}

.landing-story-emph {
  font-weight: 700;
  color: var(--color-primary-deep) !important;
}

.landing-story-body .btn {
  margin-top: 8px;
  cursor: pointer;
}

.login-back {
  position: absolute;
  top: max(12px, env(safe-area-inset-top));
  left: 12px;
  z-index: 2;
  display: inline-flex;
  align-items: center;
  gap: 4px;
  appearance: none;
  border: 1px solid var(--color-border-soft);
  background: rgba(255, 255, 255, 0.85);
  border-radius: var(--radius-pill);
  padding: 8px 12px 8px 8px;
  font: inherit;
  font-size: 0.8rem;
  font-weight: 700;
  color: var(--color-primary-deep);
  cursor: pointer;
  box-shadow: var(--shadow-soft);
}

.login-back svg {
  width: 18px;
  height: 18px;
}

.login-back:hover {
  background: #fff;
}

.login-screen {
  position: relative;
}

@media (min-width: 640px) {
  .landing-cta-row {
    flex-direction: row;
    max-width: 28rem;
    justify-content: center;
  }

  .landing-cta-row .btn {
    flex: 1;
  }

  .landing-empathy-list {
    grid-template-columns: repeat(3, 1fr);
  }

  .landing-levels {
    grid-template-columns: repeat(3, 1fr);
  }

  .landing-mentor-quotes {
    grid-template-columns: repeat(3, 1fr);
  }

  .landing-free-list {
    grid-template-columns: repeat(2, 1fr);
  }

  .landing-story-modal {
    align-items: center;
  }

  .landing-story-panel {
    border-radius: 24px;
    margin: 24px;
    max-height: min(80vh, 560px);
  }
}

@media (min-width: 900px) {
  .landing-hero {
    padding-top: 48px;
    padding-bottom: 40px;
    text-align: left;
  }

  .landing-hero-grid {
    display: grid;
    grid-template-columns: minmax(0, 1.15fr) minmax(280px, 0.85fr);
    align-items: center;
    justify-items: stretch;
    gap: clamp(28px, 4vw, 56px);
  }

  .landing-hero-copy {
    max-width: none;
    justify-self: stretch;
  }

  .landing-hero-body,
  .landing-tagline,
  .landing-hero-copy .landing-cta-row {
    margin-left: 0;
    margin-right: 0;
  }

  .landing-hero-copy .landing-cta-row {
    justify-content: flex-start;
  }

  .landing-phone {
    margin: 0;
    max-width: 400px;
    justify-self: end;
    width: 100%;
  }

  .landing-hero-title {
    font-size: clamp(1.75rem, 2.6vw, 2.35rem);
  }

  .landing-flow {
    grid-template-columns: repeat(5, minmax(0, 1fr));
    gap: 12px;
  }

  .landing-flow-step {
    flex-direction: column;
    height: 100%;
  }

  .landing-free-list {
    grid-template-columns: repeat(4, 1fr);
    max-width: none;
  }

  .landing-section .landing-cta-row,
  .landing-final .landing-cta-row {
    margin-left: auto;
    margin-right: auto;
    justify-content: center;
  }
}

@media (prefers-reduced-motion: reduce) {
  .landing-hero-blob,
  .landing-phone-frame,
  .landing-story-panel {
    animation: none !important;
  }
}

