/* 공통 화면 요소: 온보딩 · 카드 · 탭 · 오늘 막대 · 화면 모드 선택 · 학습 원리 */
.page-title { font-size: 28px; letter-spacing: -0.02em; margin-bottom: 4px; }
.page-head { margin-bottom: 20px; }
.stack { display: flex; flex-direction: column; gap: 14px; }
.sub { font-size: 17px; margin: 22px 0 10px; }
.card .sub:first-child { margin-top: 0; }
.center { text-align: center; }
.back-link { display: inline-flex; align-items: center; gap: 4px; color: var(--muted); text-decoration: none; font-weight: 600; margin-bottom: 14px; }
.empty { text-align: center; padding: 40px 20px; display: grid; gap: 10px; justify-items: center; }
.notice { display: flex; gap: 8px; align-items: flex-start; background: var(--warn-bg); color: var(--ink); padding: 12px 14px; border-radius: 12px; font-size: 14px; margin-top: 18px; }

.onboard { min-height: 100vh; display: flex; justify-content: center; }
.onboard-inner { width: 100%; max-width: 520px; padding: 20px 20px 28px; display: flex; flex-direction: column; min-height: 100vh; }
.focus-top-plain { display: flex; align-items: center; gap: 12px; margin-bottom: 28px; }
.onboard-body { flex: 1; display: flex; flex-direction: column; gap: 14px; animation: slideup 0.3s ease; }
.onboard-body h2 { font-size: 24px; letter-spacing: -0.02em; }
.onboard-hero { text-align: center; display: grid; justify-items: center; gap: 12px; margin-bottom: 10px; }
.onboard-hero h1 { font-size: 28px; line-height: 1.3; letter-spacing: -0.03em; }
.brand-mark.big { width: 64px; height: 64px; font-size: 30px; border-radius: 18px; }
.loop-list { list-style: none; padding: 0; margin: 0; display: grid; gap: 10px; }
.loop-row { display: flex; gap: 14px; align-items: center; background: var(--surface); border: 1px solid var(--line); border-radius: 14px; padding: 12px 14px; }
.loop-row .tag { min-width: 56px; text-align: center; }
.text-input.big { font-size: 20px; padding: 16px 18px; }

.choice-list { display: grid; gap: 10px; }
.choice-list.three { grid-template-columns: repeat(3, 1fr); }
.choice { text-align: left; border: 1.5px solid var(--line); background: var(--surface); padding: 14px 16px; border-radius: 14px; font-weight: 600; }
.choice.on { border-color: var(--accent); box-shadow: 0 0 0 3px color-mix(in srgb, var(--accent) 18%, transparent); }
.choice-list.three .choice { text-align: center; display: grid; gap: 2px; }
.choice-list.three .choice small { display: block; }

.stats { display: grid; grid-template-columns: repeat(4, 1fr); gap: 12px; margin-bottom: 32px; }
.stat { display: flex; align-items: center; gap: 14px; padding: 16px; text-decoration: none; }
.stat b { font-size: 17px; }
.stat-icon { width: 46px; height: 46px; border-radius: 14px; display: grid; place-items: center; flex-shrink: 0; }
.stat-icon.flame { background: color-mix(in srgb, var(--review) 14%, transparent); color: var(--review); }
.stat-icon.review { background: color-mix(in srgb, var(--shadow) 14%, transparent); color: var(--shadow); }
.week { flex-direction: column; align-items: stretch; gap: 6px; }
.bars { display: flex; justify-content: space-between; align-items: flex-end; height: 62px; gap: 4px; }
.bar-col { display: flex; flex-direction: column; align-items: center; gap: 4px; font-size: 11px; color: var(--muted); flex: 1; }
.bar { width: 100%; max-width: 18px; border-radius: 5px; background: var(--line); }
.bar.on { background: var(--speak); }

@media (max-width: 1000px) { .stats { grid-template-columns: repeat(2, 1fr); } }
@media (max-width: 560px) {
  
  .stats { grid-template-columns: 1fr 1fr; }
  .stat { padding: 12px; gap: 10px; }
  
  .choice-list.three { grid-template-columns: 1fr; }
}

.path { list-style: none; padding: 0; margin: 0 0 32px; display: grid; gap: 12px; position: relative; }
.path::before { content: ""; position: absolute; left: 21px; top: 24px; bottom: 24px; width: 3px; background: var(--line); border-radius: 3px; }

.preview h2 { font-size: 18px; margin-bottom: 12px; }

.example { display: flex; justify-content: space-between; gap: 12px; align-items: center; padding: 14px 16px; }
.example .en { font-weight: 700; font-size: 17px; }
.note { font-size: 13px; color: var(--accent-ink); display: flex; gap: 4px; align-items: center; margin-top: 4px; }

.right { color: var(--ok-ink); font-weight: 700; }

.progress-wrap { flex: 1; display: flex; }
.counter { min-width: 48px; text-align: right; }

.dialog { display: grid; gap: 12px; }

.blank { display: inline-block; padding: 0 10px; margin: 0 2px; border-radius: 8px; background: color-mix(in srgb, var(--accent) 14%, transparent); color: var(--accent-ink); font-weight: 800; border-bottom: 3px solid var(--accent); line-height: 1.6; }
.big { font-size: 22px; font-weight: 700; line-height: 1.45; }

.verdict-icon { width: 34px; height: 34px; border-radius: 50%; background: var(--v); color: #fff; display: grid; place-items: center; }
.score { margin-left: auto; font-weight: 800; }

.corrected { font-weight: 600; }

.finish { display: grid; justify-items: center; text-align: center; gap: 12px; padding-top: 30px; animation: pop 0.3s ease; }
.finish h1 { font-size: 26px; letter-spacing: -0.02em; }

.finish-actions { width: 100%; display: grid; gap: 10px; margin-top: 10px; }

.msg { display: flex; gap: 10px; align-items: flex-start; animation: slideup 0.2s ease; }
.msg.me { justify-content: flex-end; }

.review-list { display: grid; gap: 12px; }
.review-item { display: grid; gap: 8px; }

.review-item .ko { font-weight: 700; font-size: 17px; }

.field { display: grid; gap: 6px; font-weight: 600; font-size: 14px; }
.toggle-row { display: flex; justify-content: space-between; align-items: center; gap: 16px; cursor: pointer; }
.switch { appearance: none; width: 48px; height: 28px; border-radius: 99px; background: var(--line); position: relative; cursor: pointer; flex-shrink: 0; transition: background 0.2s; }
.switch::after { content: ""; position: absolute; top: 3px; left: 3px; width: 22px; height: 22px; border-radius: 50%; background: #fff; transition: transform 0.2s; box-shadow: 0 1px 3px rgba(0,0,0,.2); }
.switch:checked { background: var(--speak); }
.switch:checked::after { transform: translateX(20px); }
.kv { display: grid; grid-template-columns: auto 1fr; gap: 6px 16px; margin: 0; }
.kv dt { color: var(--muted); }
.kv dd { margin: 0; font-weight: 600; }
.settings .card { margin-bottom: 14px; }
input[type="range"] { accent-color: var(--speak); width: 100%; }

.self-start { justify-self: start; }
.row-between { display: flex; justify-content: space-between; align-items: center; gap: 10px; }

.badge { font-size: 12px; font-weight: 800; padding: 3px 10px; border-radius: 99px; }
.badge.ok { background: color-mix(in srgb, var(--ok) 16%, var(--surface)); color: var(--ok-ink); }
.badge.no { background: color-mix(in srgb, var(--bad) 14%, var(--surface)); color: var(--bad); }

.type-row.show { display: flex; }

@keyframes glow { 50% { box-shadow: 0 0 0 6px color-mix(in srgb, var(--speak) 12%, transparent); } }
.field-error { color: var(--bad); font-size: 14px; font-weight: 600; }

@media (prefers-color-scheme: dark) { :root:not([data-theme="light"]) .sheet { --v-ink: var(--v); } }
:root[data-theme="dark"] .sheet { --v-ink: var(--v); }

.track-desc { margin: 0 0 18px; font-size: 14px; }

.row-wrap { display: flex; flex-wrap: wrap; gap: 10px; }

.seg { display: inline-flex; background: var(--surface-2); border-radius: 12px; padding: 4px; gap: 4px; justify-self: start; }

textarea.text-input { resize: vertical; line-height: 1.5; }
.quick { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; }

.blank.empty { min-width: 74px; text-align: center; color: color-mix(in srgb, var(--accent-ink) 55%, transparent); }

@keyframes orb-breathe { 50% { transform: scale(1.05); } }
@keyframes orb-speak { 0%, 100% { transform: scale(1); } 30% { transform: scale(1.13); } 60% { transform: scale(0.97); } }
@keyframes orb-think { 50% { transform: scale(0.88); filter: saturate(0.6); } }
@keyframes orb-ripple { from { transform: scale(1); opacity: 0.8; } to { transform: scale(1.7); opacity: 0; } }

.research { display: grid; gap: 16px; }
.research-head { display: grid; gap: 8px; max-width: 660px; }
.research-head .chip { justify-self: start; }
.research h2 { font-size: clamp(22px, 4vw, 28px); letter-spacing: -0.02em; line-height: 1.3; }
.study-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(180px, 1fr)); gap: 12px; }
.study { display: grid; gap: 6px; align-content: start; }
.study-tag { justify-self: start; font-size: 12px; font-weight: 800; color: var(--free-ink); background: color-mix(in srgb, var(--free) 12%, var(--surface)); padding: 3px 9px; border-radius: 99px; }
.study-cite { font-size: 12px; color: var(--muted); font-style: italic; }
.applied { display: grid; gap: 12px; }
.applied h3 { font-size: 17px; }
.applied ul { list-style: none; margin: 0; padding: 0; display: grid; gap: 12px; }
.applied li { display: flex; gap: 12px; align-items: flex-start; }
.applied .stat-icon { width: 36px; height: 36px; border-radius: 10px; background: color-mix(in srgb, var(--speak) 14%, var(--surface)); color: var(--speak-ink); }
.why-page { display: grid; gap: 18px; }
.refs ul { display: grid; gap: 6px; padding-left: 18px; margin: 10px 0 0; }
.why-card { display: flex; align-items: center; gap: 14px; text-decoration: none; color: inherit; margin-bottom: 16px; }
.why-card > div { flex: 1; }
.why-card .stat-icon { width: 40px; height: 40px; background: color-mix(in srgb, var(--free) 14%, var(--surface)); color: var(--free-ink); }

.today-strip { display: grid; grid-template-columns: repeat(3, 1fr) 1.2fr; gap: 10px; margin: 4px 0 22px; }
.today-item { display: flex; align-items: center; gap: 12px; padding: 12px 14px; border-radius: 16px; background: var(--surface); border: 1px solid var(--line); text-decoration: none; color: inherit; min-width: 0; }
.today-item > div { display: grid; line-height: 1.3; min-width: 0; }
.today-item b { font-size: 15px; white-space: nowrap; }
.today-item .stat-icon { width: 40px; height: 40px; border-radius: 12px; }
.today-item.week { flex-direction: column; align-items: stretch; gap: 4px; padding: 10px 14px; }
.today-item.week .bars { height: 40px; display: flex; }
.today-item.week > p { display: block; }

@media (max-width: 820px) {
  .today-strip { grid-template-columns: repeat(3, 1fr); gap: 8px; }
  .today-item.week { display: none; }
  .today-item { padding: 10px; gap: 8px; }
}
@media (max-width: 560px) {
  .today-item { flex-direction: column; align-items: flex-start; }
  .today-item b { font-size: 14px; }
  .today-item .stat-icon, .today-item .ring { width: 32px !important; height: 32px !important; }
}

.segmented { display: inline-flex; padding: 4px; gap: 4px; border-radius: 14px; background: var(--surface-2); align-self: flex-start; }
.segmented .seg { display: inline-flex; align-items: center; gap: 6px; border: 0; background: none; padding: 8px 14px; border-radius: 10px; font-weight: 700; color: var(--ink-2); }
.segmented .seg.on { background: var(--surface); color: var(--brand-ink); box-shadow: var(--shadow-1); }

.stack-sm { display: grid; gap: 6px; }
.type-row.show { display: flex; }

.chip.ok { background: var(--ok-bg); color: var(--ok-ink); }

.pos { font-size: 12px; color: var(--muted); font-style: italic; }

.stack-sm { grid-template-columns: minmax(0, 1fr); }

.field-chip { border: 1.5px solid var(--line); background: var(--surface); color: var(--ink-2); border-radius: 99px; padding: 7px 14px; font-weight: 700; font-size: 14px; }
.field-chip small { color: var(--accent-ink); font-weight: 800; }
.field-chip:hover { border-color: var(--accent); }
.field-chip.on { background: var(--accent-strong); border-color: var(--accent-strong); color: var(--on-accent); }
.field-chip.on small { color: inherit; }

@media (max-width: 560px) {
  /* 주제 타일은 두 줄로 (세로로 길어지지 않게) */
  
  
  
  
}
