/* 링크드클래스 첫 화면 — 칠판과 판서
   칠판 #234a3b · 초록 #13795f · 형광펜 #ffd43b · 잉크 #18201c · 분필 #f2efe4
   Pretendard(본문·제목) + Nanum Pen Script(칠판 글씨만) */
body.home {
  --primary: #13795f; --primary-strong: #0e624c; --primary-soft: #5fbf9f; --accent: #e6f3ee;
  --foreground: #18201c; --muted-foreground: #58625d; --border: #e1e6e3;
  --board-1: #2c5848; --board-2: #1f4234; --chalk: #f2efe4; --chalk-y: #ffd43b; --chalk-r: #ff9c8f;
  --ink: #18201c; --paper-2: #f3f5f4; --hand: 'Nanum Pen Script', 'Pretendard Variable', cursive;
  background: #fff; color: var(--ink);
}
.home .brand-mark { background: none; padding: 0; width: 30px; height: 30px; box-shadow: none; }
.home .brand-mark img { width: 30px; height: 30px; display: block; }
.home .btn-primary { background: var(--primary); box-shadow: none; }
.home .btn-primary:hover { background: var(--primary-strong); }
.home .btn svg { transform: none !important; }

/* ---------- 히어로 ---------- */
.h-hero { padding: clamp(28px, 5vw, 64px) 0 clamp(56px, 7vw, 96px); }
.h-hero .container { display: grid; gap: clamp(32px, 4vw, 56px); align-items: center; }
@media (min-width: 1040px) { .h-hero .container { grid-template-columns: minmax(0, 5fr) minmax(0, 7fr); } }
.h-copy h1 { font-size: clamp(2.2rem, 1.2rem + 3.4vw, 3.6rem); line-height: 1.18; letter-spacing: -.035em; font-weight: 800; word-break: keep-all; }
.h-copy .lead { margin-top: 20px; max-width: 34em; font-size: clamp(16px, .5vw + 14px, 18.5px); line-height: 1.7; color: var(--muted-foreground); word-break: keep-all; }
.h-act { display: flex; flex-wrap: wrap; align-items: center; gap: 12px 20px; margin-top: 30px; }
.h-act .plain { font-weight: 700; color: var(--ink); text-decoration: underline; text-decoration-color: var(--chalk-y); text-decoration-thickness: 4px; text-underline-offset: 5px; }
.h-fine { margin-top: 16px; font-size: 14px; color: var(--muted-foreground); }

/* 강의실 화면 (실제 앱 모양 그대로) */
.room { border-radius: 18px; background: #e6eae8; box-shadow: 0 30px 60px -32px rgba(18, 40, 30, .45), 0 0 0 1px rgba(24, 32, 28, .08); overflow: hidden; }
.room-top { display: flex; align-items: center; gap: 10px; padding: 10px 14px; background: #fff; border-bottom: 1px solid #e1e6e3; }
.room-top .back { width: 18px; height: 18px; color: #4a544f; flex: none; }
.room-top .t { min-width: 0; flex: 1; }
.room-top b { display: block; font-size: 14.5px; line-height: 1.25; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.room-top small { display: flex; align-items: center; gap: 6px; font-size: 12px; color: #7d8781; }
.room-top small i { width: 7px; height: 7px; border-radius: 50%; background: #f0374a; box-shadow: 0 0 0 3px #ffe9eb; }
.room-top .code { flex: none; padding: 6px 12px; border-radius: 10px; background: #fff5c7; color: #5a4500; font-weight: 800; letter-spacing: .12em; font-size: 14px; }
.room-stage { position: relative; padding: 12px 12px 64px; }
.board-svg { display: block; width: 100%; height: auto; border-radius: 4px; box-shadow: 0 10px 24px -14px rgba(0, 0, 0, .5); }
.room-bar { position: absolute; left: 50%; bottom: 12px; transform: translateX(-50%); display: flex; align-items: center; gap: 2px; padding: 5px; border-radius: 14px; background: #fff; box-shadow: 0 6px 20px -8px rgba(0, 0, 0, .25); }
.room-bar span { display: grid; place-items: center; width: 34px; height: 34px; border-radius: 10px; color: #4a544f; }
.room-bar span.on { background: #18201c; color: #fff; }
.room-bar svg { width: 18px; height: 18px; }
.room-bar .dot { width: 18px; height: 18px; border-radius: 50%; background: var(--chalk); box-shadow: inset 0 0 0 1px #cfd6d2; }
.room-bar .sep { width: 1px; height: 20px; background: #e1e6e3; margin: 0 3px; border-radius: 0; }
.toast { position: absolute; right: 22px; top: 22px; display: flex; align-items: center; gap: 8px; padding: 9px 13px 9px 10px; border-radius: 12px; background: #fff; font-size: 13px; font-weight: 650; box-shadow: 0 10px 26px -10px rgba(0, 0, 0, .35); opacity: 0; transform: translateY(-6px); transition: opacity .35s, transform .35s; pointer-events: none; }
.toast.show { opacity: 1; transform: none; }
.toast .av { display: grid; place-items: center; width: 26px; height: 26px; border-radius: 50%; background: #fbe9f0; color: #d6407a; font-size: 11px; font-weight: 800; }
.toast svg { width: 16px; height: 16px; color: var(--primary); }
.room-foot { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin-top: 12px; font-size: 13.5px; color: var(--muted-foreground); }
.replay { display: inline-flex; align-items: center; gap: 6px; font-weight: 700; color: var(--primary-strong); padding: 6px 2px; }
.replay svg { width: 16px; height: 16px; }
@media (max-width: 560px) {
  .room-stage { padding: 8px 8px 56px; }
  .room-bar span { width: 30px; height: 30px; }
  .room-bar .hide-s { display: none; }
  .toast { right: 12px; top: 12px; font-size: 12px; }
  .room-top .code { font-size: 12.5px; padding: 5px 9px; }
}

/* ---------- 공통 영역 ---------- */
.blk { padding: clamp(64px, 8vw, 112px) 0; }
.blk h2 { font-size: clamp(1.65rem, 1rem + 2vw, 2.45rem); line-height: 1.25; letter-spacing: -.03em; font-weight: 800; word-break: keep-all; }
.blk .sub { margin-top: 14px; max-width: 36em; font-size: 16.5px; line-height: 1.7; color: var(--muted-foreground); word-break: keep-all; }

/* ---------- 직접 써 보기 ---------- */
.try { background: var(--paper-2); }
.try .container { display: grid; gap: 32px; align-items: center; }
@media (min-width: 960px) { .try .container { grid-template-columns: minmax(0, 4fr) minmax(0, 7fr); gap: 56px; } }
.try-list { margin: 22px 0 0; padding: 0; list-style: none; display: grid; gap: 10px; font-size: 15px; color: var(--muted-foreground); line-height: 1.6; }
.try-list b { color: var(--ink); }
.pad { position: relative; border-radius: 14px; padding: 12px; background: #8a6a45; background: linear-gradient(#93714b, #7b5c3b); box-shadow: 0 24px 48px -28px rgba(40, 30, 10, .6); }
.pad canvas { display: block; width: 100%; aspect-ratio: 16 / 9; border-radius: 4px; touch-action: none; cursor: crosshair; background: radial-gradient(120% 100% at 30% 20%, var(--board-1), var(--board-2)); }
.pad .hint { position: absolute; left: 50%; top: 42%; transform: translate(-50%, -50%) rotate(-3deg); font-family: var(--hand); font-size: clamp(30px, 4vw, 46px); color: rgba(242, 239, 228, .55); pointer-events: none; white-space: nowrap; transition: opacity .3s; }
.pad.used .hint { opacity: 0; }
.pad-tools { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; margin-top: 12px; }
.chalk-btn { width: 36px; height: 36px; border-radius: 50%; border: 3px solid transparent; background-clip: padding-box; box-shadow: 0 0 0 1px rgba(0, 0, 0, .15); }
.chalk-btn[aria-pressed="true"] { border-color: #fff; box-shadow: 0 0 0 2px #18201c; }
.pad-tools .sp { flex: 1; }
.pad-tools .clear { padding: 8px 14px; border-radius: 10px; background: rgba(255, 255, 255, .9); font-weight: 700; font-size: 14px; color: #3a2a18; }
@media (max-width: 560px) { .pad canvas { aspect-ratio: 4 / 3; } }

/* ---------- 수업 흐름 ---------- */
.flow-row { display: grid; gap: 14px 40px; padding: 36px 0; border-top: 2px solid var(--ink); }
.flow-row:last-child { border-bottom: 1px solid var(--border); }
@media (min-width: 880px) { .flow-row { grid-template-columns: 200px minmax(0, 1fr); } }
.flow-row .flow-when { margin: 0; font-family: var(--hand); font-size: 44px; line-height: 1; color: var(--primary); transform: rotate(-2deg); transform-origin: left; }
.flow-row h3 { font-size: clamp(1.25rem, 1rem + .8vw, 1.6rem); letter-spacing: -.02em; font-weight: 800; }
.flow-row p { margin-top: 10px; max-width: 40em; font-size: 16px; line-height: 1.75; color: var(--muted-foreground); word-break: keep-all; }
.flow-row p b { color: var(--ink); }
.flow-shot { margin-top: 24px; border-radius: 14px; overflow: hidden; box-shadow: 0 0 0 1px rgba(24, 32, 28, .1), 0 24px 50px -30px rgba(18, 40, 30, .45); }
.flow-shot img { display: block; width: 100%; height: auto; }
.flow-shot figcaption { padding: 10px 14px; font-size: 13.5px; color: var(--muted-foreground); background: #fff; border-top: 1px solid var(--border); }
.blk-head { margin-bottom: 36px; }

/* ---------- 학생 ---------- */
.stu { background: var(--paper-2); }
.stu .container { display: grid; gap: 40px; align-items: center; }
@media (min-width: 980px) { .stu .container { grid-template-columns: minmax(0, 6fr) minmax(0, 5fr); gap: 64px; } }
.phone { padding: 10px; border-radius: 30px; background: #18201c; box-shadow: 0 30px 60px -30px rgba(0, 0, 0, .5); }
.phone img { display: block; width: 100%; height: auto; border-radius: 21px; }
.phone-cap { margin-top: 12px; font-size: 13.5px; color: var(--muted-foreground); }
.s-btns { margin: 22px 0 0; padding: 0; list-style: none; display: grid; gap: 12px; }
.s-btns li { display: grid; grid-template-columns: 108px 1fr; gap: 12px; align-items: baseline; font-size: 15.5px; line-height: 1.6; color: var(--muted-foreground); }
.s-btns b { color: var(--ink); white-space: nowrap; }
.join { margin-top: 32px; padding: 20px; border-radius: 16px; background: #fff; box-shadow: 0 0 0 1px var(--border); }
.join label { display: block; font-weight: 800; font-size: 16px; }
.join .why { display: block; margin-top: 4px; font-size: 14px; color: var(--muted-foreground); }
.join .join-alt { margin-top: 12px; }
.join .join-alt a { color: inherit; font-weight: 700; text-decoration: underline; text-underline-offset: 3px; }
.join-row { display: flex; gap: 8px; margin-top: 14px; }
.join-row input { flex: 1; min-width: 0; width: 0; height: 54px; padding: 0 14px; border: 0; border-radius: 12px; background: #fff5c7; color: #5a4500; font: 800 22px/1 'Pretendard Variable', Pretendard, sans-serif; letter-spacing: .3em; text-align: center; outline: none; box-shadow: inset 0 0 0 2px transparent; }
.join-row input::placeholder { color: #a8903c; letter-spacing: .02em; font-weight: 600; font-size: 16px; }
.join-row input:focus { box-shadow: inset 0 0 0 2px #b98a00; }
.join-row .btn { height: 54px; padding-inline: 24px; }
.join-err { margin: 8px 0 0; font-size: 13.5px; color: #c62b31; }
.join-err:empty { display: none; }

/* ---------- 분야 ---------- */
.seg-rows { margin-top: 32px; display: grid; gap: 12px; }
.seg-row { display: grid; gap: 6px 28px; padding: 22px 22px; border-radius: 16px; background: #fff; box-shadow: 0 0 0 1px var(--border); color: inherit; transition: box-shadow .2s, background .2s; }
@media (min-width: 820px) { .seg-row { grid-template-columns: 200px minmax(0, 1fr) auto; align-items: center; padding: 24px 28px; } }
.seg-row b { font-size: 1.22rem; font-weight: 800; letter-spacing: -.02em; }
.seg-row p { font-size: 15.5px; line-height: 1.65; color: var(--muted-foreground); word-break: keep-all; }
.seg-row .go { justify-self: start; display: inline-flex; align-items: center; gap: 4px; margin-top: 6px; padding: 10px 14px 10px 18px; border-radius: 999px; background: var(--accent); color: var(--primary-strong); font-weight: 750; font-size: 14.5px; white-space: nowrap; transition: background .2s, color .2s; }
@media (min-width: 820px) { .seg-row .go { margin-top: 0; } }
.seg-row .go svg { width: 16px; height: 16px; }
.seg-row:hover, .seg-row:focus-visible { box-shadow: 0 0 0 2px var(--primary); background: #fbfdfc; }
.seg-row:hover .go, .seg-row:focus-visible .go { background: var(--primary); color: #fff; }

/* ---------- 마지막 ---------- */
.last { padding: 0 0 clamp(64px, 8vw, 104px); }
.last-board { position: relative; padding: clamp(40px, 6vw, 72px) clamp(24px, 5vw, 64px); border-radius: 14px; border: 12px solid #86663f; background: radial-gradient(120% 100% at 30% 20%, var(--board-1), var(--board-2)); color: var(--chalk); }
.last-board h2 { font-family: var(--hand); font-weight: 400; font-size: clamp(2.6rem, 1.6rem + 3.6vw, 4.4rem); line-height: 1.05; letter-spacing: 0; color: var(--chalk); }
.last-board p { margin: 14px 0 28px; font-size: 16.5px; color: rgba(242, 239, 228, .8); }
.last-board .btn-primary { background: var(--chalk-y); color: #3d2f00; }
.last-board .btn-primary:hover { background: #ffe066; }
.last-board .tray { position: absolute; left: 10%; right: 10%; bottom: -12px; height: 8px; border-radius: 4px 4px 0 0; background: #6f522f; }

@media (prefers-reduced-motion: reduce) { .toast { transition: none; } }
.nw { white-space: nowrap; }
@media (max-width: 400px) { .h-copy h1 .nw { white-space: normal; } }
.replay { white-space: nowrap; }
@media (max-width: 560px) {
  .toast { top: auto; bottom: 60px; left: 12px; right: auto; max-width: calc(100% - 24px); }
  .room-foot span { font-size: 13px; }
}

/* ===== 분야별 페이지 ===== */
.h-kicker { margin-bottom: 14px; font-family: var(--hand); font-size: 34px; line-height: 1; color: var(--primary); transform: rotate(-2deg); transform-origin: left; }
.why-rows { margin-top: 32px; border-top: 2px solid var(--ink); }
.why-row { display: grid; gap: 8px 48px; padding: 28px 0; border-bottom: 1px solid var(--border); }
@media (min-width: 880px) { .why-row { grid-template-columns: minmax(0, 5fr) minmax(0, 7fr); align-items: baseline; } }
.why-row .was { font-size: 16px; line-height: 1.65; color: var(--muted-foreground); text-decoration: line-through; text-decoration-color: rgba(229, 72, 77, .7); text-decoration-thickness: 2px; word-break: keep-all; }
.why-row h3 { font-size: clamp(1.15rem, 1rem + .5vw, 1.4rem); font-weight: 800; letter-spacing: -.02em; word-break: keep-all; }
.why-row div p { margin-top: 8px; font-size: 16px; line-height: 1.7; color: var(--muted-foreground); word-break: keep-all; }
.shot-sec { background: var(--paper-2); }
.shot-wide { display: grid; gap: 28px; }
.shot-wide > div { order: -1; }
.shot-phone { display: grid; gap: 36px; align-items: center; }
@media (min-width: 900px) { .shot-phone { grid-template-columns: 340px minmax(0, 1fr); gap: 72px; } }
.phone.tall { max-width: 340px; margin: 0 auto; }
.phone.tall img { aspect-ratio: 390 / 800; object-fit: cover; object-position: top; }
.feats { display: grid; gap: 36px 40px; margin-top: 36px; }
@media (min-width: 680px) { .feats { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (min-width: 1040px) { .feats { grid-template-columns: repeat(3, minmax(0, 1fr)); } }
.feat { padding-top: 18px; border-top: 2px solid var(--ink); }
.feat h3 { font-size: 1.2rem; font-weight: 800; letter-spacing: -.02em; }
.feat p { margin-top: 8px; font-size: 15.5px; line-height: 1.65; color: var(--muted-foreground); }
.feat ul { margin: 12px 0 0; padding: 0; list-style: none; display: grid; gap: 6px; }
.feat li { position: relative; padding-left: 16px; font-size: 15px; line-height: 1.55; }
.feat li::before { content: ''; position: absolute; left: 0; top: .72em; width: 8px; height: 2px; background: var(--primary); }
.flow-sec { background: #fff; }
.flow-dl { margin: 14px 0 0; display: grid; gap: 10px; }
.flow-dl div { display: grid; grid-template-columns: 112px 1fr; gap: 12px; font-size: 15.5px; line-height: 1.6; }
.flow-dl dt { font-weight: 800; }
.flow-dl dd { margin: 0; color: var(--muted-foreground); word-break: keep-all; }
.stu-solo .container { grid-template-columns: 1fr; max-width: 820px; }
.steps { margin: 32px 0 0; padding: 0; list-style: none; display: grid; gap: 28px 32px; }
@media (min-width: 760px) { .steps { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (min-width: 1100px) { .steps { grid-template-columns: repeat(4, minmax(0, 1fr)); } }
.steps li { display: flex; gap: 14px; }
.steps .n { flex: none; font-family: var(--hand); font-size: 54px; line-height: .8; color: var(--primary); }
.steps b { font-size: 1.08rem; }
.steps p { margin-top: 6px; font-size: 15px; line-height: 1.6; color: var(--muted-foreground); word-break: keep-all; }
.plan-note { margin-top: 36px; padding: 18px 20px; border-radius: 12px; background: #fff5c7; color: #4a3a00; font-size: 15.5px; line-height: 1.7; word-break: keep-all; }
.plan-note a { font-weight: 800; color: #4a3a00; text-decoration: underline; text-underline-offset: 3px; white-space: nowrap; }
.faq-sec { background: var(--paper-2); }
.faq { margin-top: 28px; border-top: 2px solid var(--ink); }
.qa { border-bottom: 1px solid var(--line-2, #cfd6d2); }
.qa summary { list-style: none; cursor: pointer; display: flex; justify-content: space-between; gap: 16px; padding: 20px 2px; font-size: 1.05rem; font-weight: 750; }
.qa summary::-webkit-details-marker { display: none; }
.qa summary::after { content: '+'; flex: none; font-size: 24px; line-height: 1; font-weight: 400; color: var(--primary); }
.qa[open] summary::after { content: '–'; }
.qa p { margin: 0 0 20px; max-width: 46em; font-size: 15.5px; line-height: 1.75; color: var(--muted-foreground); word-break: keep-all; }
.last-act { display: flex; flex-wrap: wrap; align-items: center; gap: 14px 22px; }
.last-link { color: var(--chalk); font-weight: 700; text-decoration: underline; text-underline-offset: 4px; }
.seg-page .sticky-cta .btn-primary { background: var(--primary); }
.seg-page .h-copy h1 { font-size: clamp(2rem, 1.2rem + 2.4vw, 2.85rem); }
.seg-page .toast { top: auto; bottom: 64px; }
@media (max-width: 560px) { .seg-page .toast { bottom: 58px; } }

/* ===== 수업별 사용법 고르기 ===== */
.h-pick { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; margin-top: 22px; padding-top: 20px; border-top: 1px solid var(--border); }
.h-pick span { width: 100%; font-size: 14px; font-weight: 700; color: var(--ink); }
.h-pick a { padding: 8px 14px; border-radius: 999px; box-shadow: inset 0 0 0 1.5px var(--line-2, #cfd6d2); font-size: 14.5px; font-weight: 700; color: var(--ink); background: #fff; transition: box-shadow .15s, background .15s, color .15s; }
.h-pick a:hover, .h-pick a:focus-visible { background: var(--primary); color: #fff; box-shadow: none; }
.pick { padding-top: clamp(16px, 3vw, 40px); }
.pick-grid { display: grid; gap: 16px; margin-top: 28px; }
@media (min-width: 640px) { .pick-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 20px; } }
@media (min-width: 1120px) { .pick-grid { grid-template-columns: repeat(4, minmax(0, 1fr)); } }
.pick-card { display: flex; flex-direction: column; border-radius: 18px; overflow: hidden; background: #fff; box-shadow: 0 0 0 1px var(--border); color: inherit; transition: box-shadow .2s, transform .2s; }
.pick-img { display: block; aspect-ratio: 16 / 9; background: var(--paper-2); border-bottom: 1px solid var(--border); }
.pick-img img { display: block; width: 100%; height: 100%; object-fit: cover; }
.pick-body { display: flex; flex-direction: column; flex: 1; gap: 6px; padding: 18px 18px 20px; }
.pick-who { font-size: 13.5px; font-weight: 650; color: var(--primary-strong); }
.pick-body b { font-size: 1.3rem; font-weight: 800; letter-spacing: -.02em; }
.pick-what { font-size: 14.5px; line-height: 1.6; color: var(--muted-foreground); word-break: keep-all; flex: 1; }
.pick-card .go { align-self: stretch; justify-content: center; display: inline-flex; align-items: center; gap: 4px; margin-top: 12px; padding: 12px 14px; border-radius: 12px; background: var(--accent); color: var(--primary-strong); font-weight: 750; font-size: 14.5px; transition: background .2s, color .2s; }
.pick-card .go svg { width: 16px; height: 16px; }
.pick-card:hover, .pick-card:focus-visible { box-shadow: 0 0 0 2px var(--primary), 0 18px 36px -24px rgba(18, 40, 30, .5); transform: translateY(-2px); }
.pick-card:hover .go, .pick-card:focus-visible .go { background: var(--primary); color: #fff; }
@media (max-width: 639px) {
  .pick-card { display: grid; grid-template-columns: 112px 1fr; }
  .pick-img { aspect-ratio: auto; height: 100%; border-bottom: 0; border-right: 1px solid var(--border); }
  .pick-img img { object-position: left top; }
  .pick-body { padding: 14px 14px 16px; gap: 4px; }
  .pick-body b { font-size: 1.12rem; }
  .pick-what { font-size: 13.5px; }
  .pick-card .go { margin-top: 8px; padding: 9px 12px; font-size: 13.5px; }
}
@media (prefers-reduced-motion: reduce) { .pick-card { transition: none; } .pick-card:hover { transform: none; } }
