:root {
  color-scheme: light;
  font-family: Inter, Pretendard, -apple-system, BlinkMacSystemFont, "Segoe UI", "Noto Sans KR", sans-serif;
  --green: #173f3a;
  --green-2: #22665b;
  --cream: #f7f3e9;
  --paper: #fffdf8;
  --ink: #172a27;
  --muted: #61736e;
  --line: #dbe4df;
  --coral: #df6c52;
  --gold: #e9b84c;
  --shadow: 0 18px 50px rgba(23, 63, 58, .10);
}
* { box-sizing: border-box; }
html { scroll-behavior: smooth; background: var(--cream); }
body { margin: 0; min-height: 100vh; color: var(--ink); background: radial-gradient(circle at 92% 3%, rgba(233,184,76,.25), transparent 24rem), var(--cream); }
a { color: inherit; }
button, input { font: inherit; }
.app-header { position: sticky; top: 0; z-index: 20; min-height: 68px; padding: 10px max(18px, env(safe-area-inset-right)) 10px max(18px, env(safe-area-inset-left)); display: flex; align-items: center; justify-content: space-between; border-bottom: 1px solid rgba(23,63,58,.10); background: rgba(247,243,233,.92); backdrop-filter: blur(16px); }
.brand { display: inline-flex; align-items: center; gap: 10px; color: var(--green); text-decoration: none; }
.brand img { width: 44px; height: 44px; border-radius: 13px; box-shadow: 0 5px 16px rgba(23,63,58,.16); }
.brand span { display: grid; line-height: 1.05; }
.brand b { font-size: 1.04rem; letter-spacing: .01em; }
.brand small { margin-top: 5px; color: var(--muted); font-size: .68rem; }
.install-button { min-height: 42px; padding: 0 16px; border: 1px solid var(--green); border-radius: 999px; color: var(--green); background: transparent; font-weight: 850; cursor: pointer; }
.app-shell { width: min(1080px, calc(100% - 32px)); margin: 0 auto; }
.welcome { padding: clamp(48px, 9vw, 92px) 0 40px; }
.eyebrow { margin: 0 0 8px; color: var(--coral); font-size: .76rem; font-weight: 900; letter-spacing: .11em; text-transform: uppercase; }
h1, h2, h3, p { overflow-wrap: break-word; }
h1 { max-width: 720px; margin: 0; color: var(--green); font-size: clamp(2.1rem, 7vw, 4.4rem); line-height: 1.05; letter-spacing: -.045em; }
.welcome > p:not(.eyebrow) { max-width: 620px; margin: 18px 0 0; color: var(--muted); line-height: 1.75; }
.account-summary { width: fit-content; margin-top: 24px; padding: 13px 16px; display: flex; flex-wrap: wrap; gap: 8px 18px; border: 1px solid #cbdcd4; border-radius: 14px; color: #42625b; background: rgba(255,255,255,.58); font-size: .85rem; }
.account-summary strong { color: var(--green); }
.notice, .error { margin: 0 0 20px; padding: 15px 17px; border-radius: 14px; line-height: 1.55; }
.notice { color: #315c52; background: #e6f3ee; }
.error { color: #982f22; background: #ffebe6; }
.learning-section { padding: 30px 0 42px; }
.section-heading { margin-bottom: 18px; display: flex; align-items: end; justify-content: space-between; gap: 16px; }
h2 { margin: 0; color: var(--green); font-size: clamp(1.55rem, 4vw, 2.2rem); letter-spacing: -.025em; }
.section-note { color: var(--muted); font-size: .82rem; font-weight: 750; }
.course-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 18px; }
.course-card { position: relative; min-height: 300px; padding: clamp(22px, 4vw, 32px); display: flex; flex-direction: column; border: 1px solid var(--line); border-radius: 26px; background: var(--paper); box-shadow: var(--shadow); overflow: hidden; }
.course-card::after { content: ""; position: absolute; width: 150px; height: 150px; right: -64px; top: -64px; border-radius: 50%; background: rgba(233,184,76,.14); pointer-events: none; }
.demo-card { background: linear-gradient(145deg, #173f3a, #225e56); color: white; border-color: transparent; }
.demo-card::after { background: rgba(233,184,76,.28); }
.card-top { display: flex; align-items: center; justify-content: space-between; gap: 14px; color: var(--muted); font-size: .76rem; font-weight: 800; }
.demo-card .card-top { color: rgba(255,255,255,.75); }
.course-badge { padding: 6px 9px; border-radius: 999px; color: var(--green); background: #e5f1ed; font-size: .7rem; letter-spacing: .04em; }
.course-badge.free { color: #173f3a; background: var(--gold); }
.course-badge.practice { color: #8e3e2e; background: #ffe6df; }
.course-card h3 { margin: 28px 0 10px; color: var(--green); font-size: clamp(1.35rem, 3vw, 1.8rem); letter-spacing: -.025em; }
.demo-card h3 { color: white; }
.course-card > p { margin: 0 0 22px; color: var(--muted); line-height: 1.65; }
.demo-card > p { color: rgba(255,255,255,.78); }
.primary-action, .locked-action { min-height: 48px; margin-top: auto; padding: 13px 16px; display: inline-flex; align-items: center; justify-content: center; border-radius: 14px; text-decoration: none; font-weight: 900; }
.primary-action { color: white; background: var(--green-2); }
.demo-card .primary-action { color: var(--green); background: white; }
.locked-action { color: #64746f; background: #edf1ef; }
.locked { box-shadow: none; }
.book2-card { grid-column: span 2; }
.part-progress { margin: 4px 0 18px; display: flex; align-items: center; gap: 12px; color: var(--muted); }
.part-progress-bar { height: 8px; flex: 1; border-radius: 999px; background: #e5ebe8; overflow: hidden; }
.part-progress-bar i { height: 100%; display: block; border-radius: inherit; background: linear-gradient(90deg, var(--green-2), #58a493); }
.part-progress-0 { width: 0; }
.part-progress-1 { width: 12.5%; }
.part-progress-2 { width: 25%; }
.part-progress-3 { width: 37.5%; }
.part-progress-4 { width: 50%; }
.part-progress-5 { width: 62.5%; }
.part-progress-6 { width: 75%; }
.part-progress-7 { width: 87.5%; }
.part-progress-8 { width: 100%; }
.part-progress small { white-space: nowrap; }
.part-grid { margin-bottom: 18px; display: grid; grid-template-columns: repeat(8, 1fr); gap: 8px; }
.part-grid a, .part-grid span { min-height: 66px; padding: 9px 5px; display: grid; place-content: center; gap: 4px; border: 1px solid var(--line); border-radius: 12px; text-align: center; text-decoration: none; font-size: .76rem; font-weight: 900; }
.part-grid a { color: var(--green); background: #e8f3ef; border-color: #bcd7ce; }
.part-grid small { color: var(--muted); font-size: .6rem; font-weight: 700; }
.part-locked { color: #8b9693; background: #f1f3f2; }
.connect-card { margin: 34px 0 70px; padding: clamp(24px, 6vw, 44px); border-radius: 28px; color: white; background: var(--green); box-shadow: var(--shadow); }
.connect-card h2 { color: white; }
.connect-card > p:not(.eyebrow) { max-width: 640px; color: rgba(255,255,255,.72); line-height: 1.7; }
.connect-card form { max-width: 640px; margin-top: 28px; }
.connect-card label:not(.check) { display: block; margin: 15px 0 7px; font-size: .83rem; font-weight: 850; }
.connect-card input[type="text"], .connect-card input[type="email"], .connect-card input:not([type]) { width: 100%; min-height: 52px; padding: 0 14px; border: 1px solid rgba(255,255,255,.35); border-radius: 13px; color: var(--ink); background: white; }
.check { margin-top: 16px; display: flex; align-items: flex-start; gap: 10px; color: rgba(255,255,255,.75); font-size: .78rem; line-height: 1.55; }
.check input { margin-top: 3px; flex: 0 0 auto; }
.submit-button { width: 100%; min-height: 52px; margin-top: 20px; border: 0; border-radius: 14px; color: var(--green); background: var(--gold); font-weight: 950; cursor: pointer; }
.privacy-note { font-size: .73rem; }
.disconnect { display: inline-block; margin-top: 12px; color: rgba(255,255,255,.75); font-size: .78rem; }
footer { padding: 28px 20px calc(32px + env(safe-area-inset-bottom)); color: var(--muted); text-align: center; font-size: .72rem; }
@media (max-width: 720px) {
  .app-shell { width: min(100% - 24px, 620px); }
  .welcome { padding-top: 42px; }
  .course-grid { grid-template-columns: 1fr; }
  .book2-card { grid-column: auto; }
  .part-grid { grid-template-columns: repeat(4, 1fr); }
  .course-card { min-height: 280px; border-radius: 22px; }
}
@media (max-width: 380px) {
  .part-grid { grid-template-columns: repeat(2, 1fr); }
  .account-summary { display: grid; }
}
@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } * { animation: none !important; transition: none !important; } }
