/* 스쿨보드 사이트 — 공책 종이 위에 놓인 앱 */

@font-face {
  font-family: 'Paperlogy';
  font-weight: 800;
  font-display: swap;
  src: url('https://cdn.jsdelivr.net/gh/fonts-archive/Paperlogy/Paperlogy-8ExtraBold.woff2') format('woff2');
}
@font-face {
  font-family: 'Boardmarker';
  font-display: swap;
  src: url('../fonts/boardmarker.woff') format('woff');
}

:root {
  --paper: #F7F9FC;
  --paper-deep: #EDF1F8;
  --white: #FFFFFF;
  --rule: #DCE4F2;
  --margin: #F2A3A3;
  --ink: #18233C;
  --ink-2: #4B5672;
  --ink-3: #6F7A93;
  --line: #D6DEEC;
  --cobalt: #0A4BFF;
  --redpen: #E2362B;

  --gutter: clamp(20px, 8vw, 128px);
  --content-left: calc(var(--gutter) + 36px);
  --content-right: clamp(20px, 5vw, 72px);
  --rule-gap: 34px;
  --font-body: 'Pretendard Variable', Pretendard, -apple-system, BlinkMacSystemFont, 'Segoe UI', 'Malgun Gothic', sans-serif;
  --font-display: 'Paperlogy', var(--font-body);
  --font-hand: 'Boardmarker', var(--font-body);
  --shadow-shot: 0 0 0 1px rgba(24, 35, 60, .1), 0 40px 70px -36px rgba(24, 35, 60, .5);
}

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-padding-top: 84px; }
body {
  margin: 0;
  background: var(--paper);
  color: var(--ink);
  font-family: var(--font-body);
  font-size: 17px;
  line-height: 1.7;
  word-break: keep-all;
  overflow-wrap: break-word;
  -webkit-font-smoothing: antialiased;
  overflow-x: clip;
}
img { display: block; max-width: 100%; height: auto; }
a { color: inherit; }
h1, h2, h3, p, dl, dd, ol, ul, figure { margin: 0; }
ol, ul { padding: 0; list-style: none; }
button { font: inherit; color: inherit; }
:focus-visible { outline: 3px solid var(--cobalt); outline-offset: 3px; border-radius: 6px; }
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }

.skip-link {
  position: absolute; left: 12px; top: -60px; z-index: 100;
  background: var(--ink); color: #fff; padding: 10px 14px; border-radius: 8px;
}
.skip-link:focus { top: 12px; }

/* ---------- 공통: 섹션 머리 ---------- */
.section-head { max-width: 680px; }
.section-head h2 {
  font-family: var(--font-display); font-weight: 800;
  font-size: clamp(32px, 4.2vw, 60px); line-height: 1.14; letter-spacing: -0.03em;
}
.section-head p { margin-top: 18px; font-size: clamp(17px, 1.4vw, 19px); color: var(--ink-2); max-width: 34em; }
.section-head a { color: var(--cobalt); text-underline-offset: 3px; }
section { position: relative; }
.tools, .mobile, .trust, .updates, .guide, .help {
  padding: clamp(80px, 14vh, 150px) var(--content-right) clamp(80px, 14vh, 150px) var(--content-left);
}

/* ---------- 버튼 ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 10px;
  min-height: 52px; padding: 0 22px;
  border-radius: 14px; border: 0; cursor: pointer;
  font-size: 16px; font-weight: 650; text-decoration: none; line-height: 1.3; text-align: center;
  transition: transform .18s ease, background-color .18s ease, box-shadow .18s ease, color .18s ease;
}
.btn-sm { min-height: 40px; padding: 0 16px; font-size: 14px; border-radius: 11px; }
.btn-lg { min-height: 60px; padding: 0 26px; font-size: 17px; border-radius: 16px; }
.btn-ink { background: var(--ink); color: #fff; box-shadow: 0 10px 24px -12px rgba(24, 35, 60, .55); }
.btn-ink:hover { background: #22305A; transform: translateY(-1px); }
.btn-line { color: var(--ink); box-shadow: inset 0 0 0 1.5px var(--ink); background: rgba(255,255,255,.7); }
.btn-line:hover { background: #fff; }
.btn-paper { background: #fff; color: var(--ink); }
.btn-paper:hover { background: var(--paper-deep); transform: translateY(-1px); }
.btn-ghost { color: #fff; box-shadow: inset 0 0 0 1.5px rgba(255,255,255,.45); background: transparent; }
.btn-ghost:hover { box-shadow: inset 0 0 0 1.5px #fff; background: rgba(255,255,255,.06); }
.only-narrow { display: none !important; }

/* ---------- 상단 ---------- */
.nav {
  position: fixed; inset: 0 0 auto 0; z-index: 50;
  display: flex; align-items: center; gap: 24px;
  height: 68px; padding: 0 clamp(16px, 3vw, 40px) 0 var(--gutter);
  transition: background-color .25s ease, box-shadow .25s ease;
}
.nav.is-scrolled, .nav.is-open { background: rgba(247, 249, 252, .9); backdrop-filter: blur(12px); -webkit-backdrop-filter: blur(12px); box-shadow: 0 1px 0 var(--rule); }
.nav-brand { display: flex; align-items: center; gap: 10px; font-weight: 750; font-size: 18px; text-decoration: none; margin-left: 18px; flex: none; }
.nav-brand img { border-radius: 8px; }
.nav-links { display: flex; gap: 22px; margin-left: auto; font-size: 15px; color: var(--ink-2); }
.nav-links a { text-decoration: none; white-space: nowrap; padding: 6px 0; }
.nav-links a:hover { color: var(--ink); }
.nav-cta { flex: none; }
.nav-toggle {
  display: none; position: relative; width: 44px; height: 44px; margin-left: 4px;
  border: 0; background: transparent; cursor: pointer; border-radius: 10px;
}
.nav-toggle span { position: absolute; left: 12px; right: 12px; height: 2px; background: var(--ink); border-radius: 2px; transition: transform .2s ease, top .2s ease; }
.nav-toggle span:first-child { top: 17px; }
.nav-toggle span:last-child { top: 25px; }
.nav.is-open .nav-toggle span:first-child { top: 21px; transform: rotate(45deg); }
.nav.is-open .nav-toggle span:last-child { top: 21px; transform: rotate(-45deg); }

/* ---------- 공책 종이 ---------- */
.paper-rules, .day::after {
  background-image: linear-gradient(to bottom, transparent calc(var(--rule-gap) - 1px), var(--rule) calc(var(--rule-gap) - 1px));
  background-size: 100% var(--rule-gap);
}
.paper-rules { position: absolute; inset: 0; background-position: 0 14px; }
.paper-rules::before, .day::before {
  content: ''; position: absolute; top: 0; bottom: 0; left: var(--gutter);
  width: 1.5px; background: var(--margin); z-index: 1;
}

/* ---------- 첫 화면 + 위젯 분해 ---------- */
.stage { height: 330vh; }
.stage-sticky { position: sticky; top: 0; height: 100vh; height: 100svh; overflow: hidden; }
#stage-canvas { position: absolute; inset: 0; width: 100%; height: 100%; display: block; }
.hero-fallback { display: none; }

.hero-copy {
  position: absolute; z-index: 2;
  left: var(--content-left);
  top: 50%; transform: translateY(-46%);
  width: min(500px, 40vw);
}
.hero-title {
  font-family: var(--font-display); font-weight: 800;
  font-size: clamp(44px, 5.6vw, 84px);
  line-height: 1.1; letter-spacing: -0.035em;
}
.hero-lede { margin-top: 26px; font-size: clamp(17px, 1.35vw, 20px); line-height: 1.65; color: var(--ink-2); max-width: 30em; }
.hero-actions { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 32px; }
.hero-proof { margin-top: 26px; font-size: 15px; color: var(--ink-2); max-width: 30em; }
.hero-proof strong { color: var(--ink); font-weight: 750; }

.js .hero-copy > * { animation: rise .7s cubic-bezier(.2, .7, .2, 1) both; }
.js .hero-copy > :nth-child(2) { animation-delay: .08s; }
.js .hero-copy > :nth-child(3) { animation-delay: .16s; }
.js .hero-copy > :nth-child(4) { animation-delay: .24s; }
@keyframes rise { from { opacity: 0; transform: translateY(18px); } }

/* 빨간펜 메모: 글씨는 손글씨, 선과 동그라미는 깔끔한 도형 */
.hero-notes, .layer-labels { position: absolute; inset: 0; pointer-events: none; z-index: 3; }
.note { position: absolute; left: 0; top: 0; will-change: transform; }
.note-text, .mark-note, .layer-label span {
  font-family: var(--font-hand); color: var(--redpen);
  font-size: 23px; line-height: 1.25; white-space: nowrap;
}
.note-arrow { position: absolute; overflow: visible; }
.note-arrow path, .layer-label path {
  fill: none; stroke: var(--redpen); stroke-width: 2.4; stroke-linecap: round; stroke-linejoin: round;
  stroke-dasharray: 1; stroke-dashoffset: 1;
}
.note-up .note-arrow { left: -6px; bottom: -6px; }
.note-up .note-text { position: absolute; left: 74px; bottom: 50px; }
.note-down .note-arrow { right: -6px; top: -6px; }
.note-down .note-text { position: absolute; right: 70px; top: 52px; }
.note-up.flip .note-arrow { left: auto; right: -6px; transform: scaleX(-1); }
.note-up.flip .note-text { left: auto; right: 74px; }
.note-down.flip .note-arrow { right: auto; left: -6px; transform: scaleX(-1); }
.note-down.flip .note-text { right: auto; left: 70px; }
.note .note-text { opacity: 0; }
.notes-on .note-arrow path { stroke-dashoffset: 0; transition: stroke-dashoffset .6s ease; }
.notes-on .note-arrow path + path { transition-delay: .45s; transition-duration: .25s; }
.notes-on .note-text { opacity: 1; transition: opacity .5s ease .35s; }

.layer-label { position: absolute; left: 0; top: 0; opacity: 0; will-change: transform, opacity; }
.layer-label span { position: absolute; font-size: 22px; background: rgba(255, 255, 255, .92); padding: 0 8px; border-radius: 6px; }
.layer-label svg { position: absolute; overflow: visible; }
.layer-label path { stroke-dashoffset: 0; }
.side-right svg { left: 0; top: -10px; }
.side-right span { left: 42px; top: -16px; }
.side-left svg { right: 0; top: -10px; }
.side-left span { right: 42px; top: -16px; }
.side-top svg { left: -10px; bottom: 0; }
.side-top span { left: 0; bottom: 34px; transform: translateX(-50%); }
.side-bottom svg { left: -10px; top: 0; }
.side-bottom span { left: 0; top: 34px; transform: translateX(-50%); }

.stage-copy {
  position: absolute; z-index: 2;
  left: var(--content-left); bottom: 9vh;
  width: min(400px, 32vw);
  opacity: 0; visibility: hidden;
}
.stage-copy h2 { font-family: var(--font-display); font-weight: 800; font-size: clamp(30px, 3vw, 44px); line-height: 1.18; letter-spacing: -0.03em; }
.stage-copy p { margin-top: 16px; color: var(--ink-2); }

/* WebGL을 못 쓰거나 움직임 줄이기 설정일 때 */
.no-webgl .stage, .reduce-motion .stage { height: auto; }
.no-webgl .stage-sticky, .reduce-motion .stage-sticky { position: relative; height: auto; min-height: 100vh; min-height: 100svh; }
.no-webgl #stage-canvas, .no-webgl .hero-notes, .no-webgl .layer-labels, .no-webgl .stage-copy,
.reduce-motion .layer-labels, .reduce-motion .stage-copy { display: none; }
.no-webgl .hero-fallback {
  display: block; position: absolute; right: 4vw; top: 50%; transform: translateY(-50%) rotate(-2deg);
  width: min(52vw, 820px); border-radius: 14px; box-shadow: 0 40px 80px -30px rgba(24,35,60,.45);
}

/* ---------- 선생님의 하루 ---------- */
.day { padding: 18vh var(--content-right) 16vh var(--content-left); }
.day::after { content: ''; position: absolute; inset: 0; z-index: -1; }
.day-grid {
  display: grid;
  grid-template-columns: minmax(300px, 0.74fr) minmax(0, 1.26fr);
  gap: clamp(32px, 5vw, 80px);
  margin-top: 10vh;
}
.slot { min-height: 88vh; display: flex; flex-direction: column; justify-content: center; padding: 6vh 0; }
.slot-time {
  font-family: var(--font-display); font-weight: 800;
  font-size: clamp(64px, 7.2vw, 112px); line-height: 1; letter-spacing: -0.02em;
  font-variant-numeric: tabular-nums;
  color: var(--rule);
  transition: color .45s ease;
}
.slot h3 { margin-top: 22px; font-size: clamp(24px, 2.2vw, 32px); line-height: 1.3; font-weight: 750; letter-spacing: -0.02em; }
.slot p { margin-top: 14px; color: var(--ink-2); max-width: 28em; }
.slot .slot-uses { margin-top: 18px; font-size: 15px; color: var(--ink-3); }
.slot .slot-uses b { color: var(--ink); font-weight: 650; margin-right: 6px; }
.slot h3, .slot p { transition: opacity .45s ease; }
.js .slot:not(.is-active) h3, .js .slot:not(.is-active) p { opacity: .32; }
.slot.is-active .slot-time { color: var(--ink); }
.slot-shot { display: none; }

.day-screen { position: relative; }
.screen-frame {
  position: sticky; top: calc(50vh - 18vw);
  aspect-ratio: 16 / 10;
  perspective: 1600px;
}
.shot {
  position: absolute; inset: 0; margin: 0;
  opacity: 0; visibility: hidden;
  transform: translateY(40px) rotateX(10deg) scale(.96);
  transform-origin: 50% 100%;
  transition: opacity .5s ease, transform .7s cubic-bezier(.2, .7, .2, 1), visibility 0s linear .7s;
}
.shot.is-active { opacity: 1; visibility: visible; transform: none; transition-delay: 0s; }
.shot > img { width: 100%; height: 100%; object-fit: cover; border-radius: 14px; box-shadow: var(--shadow-shot); }
.shot.shot-phone { display: flex; align-items: center; justify-content: center; }
.shot.shot-phone .phone { height: 100%; width: auto; }

/* 깔끔한 빨간펜 표시 */
.mark { position: absolute; inset: 0; width: 100%; height: 100%; overflow: visible; pointer-events: none; }
.mark rect, .mark ellipse {
  fill: none; stroke: var(--redpen); stroke-width: 4; stroke-linecap: round;
  stroke-dasharray: 1; stroke-dashoffset: 1;
}
.is-active > .mark rect, .is-active > .mark ellipse, .is-shown > .mark rect, .is-shown > .mark ellipse {
  stroke-dashoffset: 0; transition: stroke-dashoffset .7s cubic-bezier(.5, 0, .2, 1) .35s;
}
.mark-note {
  position: absolute; transform: translate(-50%, 0);
  background: #fff; padding: 2px 12px 3px; border-radius: 8px;
  box-shadow: 0 6px 16px -8px rgba(24, 35, 60, .35);
  opacity: 0;
}
.is-active > .mark-note, .is-shown > .mark-note { opacity: 1; transition: opacity .4s ease .85s; }

/* ---------- 휴대폰 틀 ---------- */
.phone {
  position: relative; aspect-ratio: 390 / 844;
  padding: 3.2%; border-radius: 15% / 7%;
  background: #1b2540;
  box-shadow: inset 0 0 0 1.5px #3a4566, 0 40px 60px -30px rgba(24, 35, 60, .55);
}
.phone img { width: 100%; height: 100%; object-fit: cover; border-radius: 12% / 5.6%; }

/* ---------- 도구상자 ---------- */
.tools { background: var(--white); }
.tools-grid {
  display: grid; grid-template-columns: minmax(260px, 0.62fr) minmax(0, 1.38fr);
  gap: clamp(28px, 4vw, 64px); margin-top: 56px; align-items: start;
}
.tool-list { display: flex; flex-direction: column; border-top: 1px solid var(--line); }
.tool-tab {
  display: grid; grid-template-columns: 1fr auto; gap: 2px 12px; align-items: center;
  width: 100%; padding: 16px 4px 16px 0; text-align: left;
  border: 0; border-bottom: 1px solid var(--line); background: none; cursor: pointer;
  transition: padding .2s ease, box-shadow .2s ease;
}
.tool-tab strong { font-size: 18px; font-weight: 700; letter-spacing: -0.01em; }
.tool-tab span { grid-column: 1 / -1; font-size: 15px; color: var(--ink-3); line-height: 1.5; }
.tool-tab em { font-style: normal; font-size: 12px; font-weight: 700; color: var(--cobalt); }
.tool-tab[aria-selected="true"] strong { color: var(--cobalt); }
.tool-tab[aria-selected="true"] { box-shadow: inset 3px 0 0 var(--cobalt); padding-left: 16px; }
.tool-tab:hover strong { color: var(--cobalt); }
.tool-preview { position: sticky; top: 100px; aspect-ratio: 16 / 10; perspective: 1600px; }
.tool-desc { display: none; }
.tools-more { margin-top: 40px; color: var(--ink-2); max-width: 60em; }
.tools-more b { color: var(--ink); }

/* ---------- 모바일 ---------- */
.mobile { background: var(--paper-deep); overflow: hidden; }
.mobile-inner { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1.05fr); gap: clamp(32px, 5vw, 80px); align-items: center; }
.mobile h2 { font-family: var(--font-display); font-weight: 800; font-size: clamp(32px, 4.2vw, 60px); line-height: 1.14; letter-spacing: -0.03em; }
.mobile .lede { margin-top: 18px; font-size: clamp(17px, 1.4vw, 19px); color: var(--ink-2); max-width: 32em; }
.facts { margin-top: 32px; display: grid; gap: 18px; max-width: 34em; }
.facts li { padding-left: 18px; border-left: 3px solid var(--cobalt); color: var(--ink-2); }
.facts strong { display: block; color: var(--ink); font-weight: 700; }
.qr-card { display: flex; align-items: center; gap: 18px; margin-top: 36px; padding: 16px 20px 16px 16px; background: #fff; border-radius: 16px; width: fit-content; box-shadow: 0 0 0 1px var(--line); }
.qr-card img { width: 96px; height: 96px; }
.qr-card p { font-size: 15px; color: var(--ink-2); line-height: 1.55; }
.qr-card a { color: var(--cobalt); font-weight: 650; }
.phones { position: relative; display: flex; justify-content: center; align-items: center; min-height: 600px; perspective: 1800px; }
.phones .phone { position: absolute; width: min(250px, 21vw); transition: transform .6s cubic-bezier(.2, .7, .2, 1); }
.phones .phone:nth-child(1) { transform: translateX(-62%) translateY(5%) rotateY(18deg) rotateZ(-4deg) scale(.88); z-index: 1; }
.phones .phone:nth-child(2) { transform: translateY(-3%); z-index: 3; }
.phones .phone:nth-child(3) { transform: translateX(62%) translateY(5%) rotateY(-18deg) rotateZ(4deg) scale(.88); z-index: 2; }

/* ---------- 데이터 ---------- */
.trust-list { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 0 clamp(28px, 5vw, 80px); margin-top: 48px; max-width: 1100px; }
.trust-list > div { padding: 26px 0 30px; border-top: 1.5px solid var(--ink); }
.trust-list dt { font-size: 21px; font-weight: 750; letter-spacing: -0.01em; }
.trust-list dd { margin-top: 10px; color: var(--ink-2); }

/* ---------- 학교운영위원회 심의 안내 ---------- */
.review-notice { margin-top: 64px; padding: clamp(20px, 3vw, 40px); max-width: 1100px; border: 1px solid var(--line); border-radius: 20px; background: var(--white); }
.review-label { margin-bottom: 12px; color: var(--cobalt); font-size: 14px; font-weight: 750; }
.review-copy h3 { font-family: var(--font-display); font-weight: 800; font-size: clamp(24px, 3vw, 36px); line-height: 1.3; letter-spacing: -0.03em; }
.review-copy > p:not(.review-label) { margin-top: 16px; color: var(--ink-2); max-width: 48em; }
.review-copy strong { color: var(--ink); }
.review-copy .review-source { font-size: 14px; }
.review-source a, .faq details p a { color: var(--cobalt); text-underline-offset: 3px; }
.review-evidence { margin-top: 28px; }
.review-evidence > a { display: block; border: 1px solid var(--line); border-radius: 12px; overflow: hidden; cursor: zoom-in; }
.review-evidence img { width: 100%; }
.review-evidence figcaption { margin-top: 10px; color: var(--ink-2); font-size: 14px; }

/* ---------- 업데이트 ---------- */
.updates { background: var(--white); }
.update-list { margin-top: 48px; max-width: 1100px; border-top: 1px solid var(--line); }
.update { display: grid; grid-template-columns: 180px minmax(0, 1fr); gap: 8px 40px; padding: 30px 0; border-bottom: 1px solid var(--line); }
.update-ver { font-family: var(--font-display); font-weight: 800; font-size: 30px; line-height: 1.1; letter-spacing: -0.02em; }
.update-ver time { display: block; margin-top: 8px; font-family: var(--font-body); font-size: 14px; font-weight: 500; color: var(--ink-3); letter-spacing: 0; }
.update h3 { font-size: 21px; font-weight: 750; line-height: 1.4; letter-spacing: -0.01em; }
.update ul { margin-top: 12px; display: grid; gap: 6px; }
.update li { position: relative; padding-left: 16px; color: var(--ink-2); font-size: 16px; }
.update li::before { content: ''; position: absolute; left: 0; top: .75em; width: 6px; height: 6px; border-radius: 50%; background: var(--cobalt); }
.update li b { color: var(--ink); font-weight: 650; }
.update.is-latest .update-ver { color: var(--cobalt); }

/* ---------- 영상 ---------- */
.guide-grid { display: grid; grid-template-columns: minmax(0, 1.5fr) minmax(240px, 0.5fr); gap: clamp(20px, 3vw, 40px); margin-top: 48px; align-items: start; }
.guide-player { position: relative; aspect-ratio: 16 / 9; border-radius: 16px; overflow: hidden; background: var(--ink); box-shadow: var(--shadow-shot); }
.guide-player iframe { position: absolute; inset: 0; width: 100%; height: 100%; border: 0; }
.guide-poster { position: absolute; inset: 0; padding: 0; border: 0; cursor: pointer; background: var(--ink); }
.guide-poster img { width: 100%; height: 100%; object-fit: cover; opacity: .82; }
.guide-poster .play { position: absolute; left: 50%; top: 50%; width: 78px; height: 78px; margin: -39px 0 0 -39px; border-radius: 50%; background: #fff; box-shadow: 0 10px 30px rgba(0,0,0,.3); transition: transform .2s ease; }
.guide-poster .play::after { content: ''; position: absolute; left: 31px; top: 24px; border-left: 24px solid var(--ink); border-top: 15px solid transparent; border-bottom: 15px solid transparent; }
.guide-poster:hover .play { transform: scale(1.06); }
.guide-list { max-height: min(560px, 38vw); overflow-y: auto; border-top: 1px solid var(--line); }
.guide-list button {
  display: flex; gap: 12px; width: 100%; padding: 13px 4px; text-align: left; cursor: pointer;
  border: 0; border-bottom: 1px solid var(--line); background: none; font-size: 16px;
}
.guide-list button span { color: var(--ink-3); font-variant-numeric: tabular-nums; min-width: 1.6em; }
.guide-list button[aria-current="true"] { color: var(--cobalt); font-weight: 700; }
.guide-list button[aria-current="true"] span { color: var(--cobalt); }

/* ---------- 다운로드 ---------- */
.download { background: var(--ink); color: #fff; padding: clamp(90px, 16vh, 170px) var(--content-right) clamp(90px, 16vh, 170px) var(--content-left); }
.download h2 { font-family: var(--font-display); font-weight: 800; font-size: clamp(40px, 6vw, 92px); line-height: 1.08; letter-spacing: -0.035em; }
.download .lede { margin-top: 22px; font-size: clamp(17px, 1.5vw, 20px); color: rgba(255,255,255,.75); max-width: 32em; }
.download-actions { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 40px; }
.download-meta { margin-top: 24px; font-size: 15px; color: rgba(255,255,255,.6); }
.download-meta #latest-version:not(:empty)::after { content: ', '; }

/* ---------- 설치 도움말 ---------- */
.help { background: var(--white); }
.help-steps { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: clamp(28px, 4vw, 56px); margin-top: 48px; max-width: 1200px; }
.help-step h3 { display: flex; align-items: center; gap: 12px; font-size: 21px; font-weight: 750; line-height: 1.4; }
.step-no { flex: none; display: inline-grid; place-items: center; width: 32px; height: 32px; border-radius: 50%; background: var(--ink); color: #fff; font-size: 15px; font-weight: 700; }
.help-step > p, .seg-panel > p { margin-top: 14px; color: var(--ink-2); }
.help-step strong, .seg-panel strong { color: var(--ink); }
.seg { display: inline-flex; gap: 4px; margin-top: 18px; padding: 4px; border-radius: 12px; background: var(--paper-deep); }
.seg button { min-height: 40px; padding: 0 18px; border: 0; border-radius: 9px; background: transparent; font-size: 15px; font-weight: 650; color: var(--ink-2); cursor: pointer; }
.seg button[aria-selected="true"] { background: #fff; color: var(--ink); box-shadow: 0 1px 3px rgba(24,35,60,.15); }
.help-imgs { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 18px; align-items: flex-start; }
.help-imgs img { max-width: min(100%, 300px); border-radius: 10px; box-shadow: 0 0 0 1px var(--line); background: #fff; }
.faq { margin-top: 72px; max-width: 900px; }
.faq h3 { font-size: 21px; font-weight: 750; margin-bottom: 14px; }
.faq details { border-top: 1px solid var(--line); }
.faq details:last-child { border-bottom: 1px solid var(--line); }
.faq summary {
  position: relative; list-style: none; cursor: pointer;
  padding: 18px 40px 18px 0; font-size: 17px; font-weight: 650;
}
.faq summary::-webkit-details-marker { display: none; }
.faq summary::after { content: ''; position: absolute; right: 8px; top: 50%; width: 10px; height: 10px; margin-top: -7px; border-right: 2px solid var(--ink-2); border-bottom: 2px solid var(--ink-2); transform: rotate(45deg); transition: transform .2s ease; }
.faq details[open] summary::after { transform: rotate(-135deg); margin-top: -2px; }
.faq details p { padding: 0 0 20px; color: var(--ink-2); max-width: 46em; }

/* ---------- 바닥 ---------- */
.foot { padding: 48px var(--content-right) 40px var(--content-left); background: #0F172C; color: rgba(255,255,255,.72); font-size: 14px; }
.foot-top { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 20px; }
.foot-brand { display: flex; align-items: center; gap: 12px; color: #fff; text-decoration: none; font-weight: 750; font-size: 17px; }
.foot-brand img { border-radius: 9px; }
.foot-brand small { display: block; font-weight: 500; font-size: 13px; color: rgba(255,255,255,.6); }
.foot-links { display: flex; flex-wrap: wrap; gap: 6px 22px; }
.foot-links a { text-decoration: none; }
.foot-links a:hover { color: #fff; }
.foot-legal { margin-top: 28px; padding-top: 22px; border-top: 1px solid rgba(255,255,255,.12); font-size: 13px; color: rgba(255,255,255,.5); }
.foot-copy { margin-top: 6px; font-size: 13px; color: rgba(255,255,255,.5); }

/* ---------- 알림 ---------- */
.toast {
  position: fixed; left: 50%; bottom: 24px; z-index: 60; transform: translateX(-50%);
  display: flex; align-items: center; gap: 14px; width: max-content; max-width: calc(100vw - 32px);
  padding: 14px 18px; border-radius: 14px; background: var(--ink); color: #fff; font-size: 15px;
  box-shadow: 0 20px 40px -16px rgba(0,0,0,.45);
}
.toast[hidden] { display: none; }
.toast a { color: #9DB7FF; font-weight: 700; white-space: nowrap; }

/* ================= 태블릿 ================= */
@media (max-width: 1100px) {
  .nav-links { gap: 16px; font-size: 14px; }
  .guide-grid { grid-template-columns: 1fr; }
  .guide-list { max-height: none; display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); column-gap: 24px; }
}
@media (max-width: 980px) {
  .nav-links {
    position: fixed; left: 0; right: 0; top: 68px; z-index: 49;
    flex-direction: column; gap: 0; margin: 0; padding: 8px var(--content-right) 20px var(--content-left);
    background: rgba(247, 249, 252, .98); box-shadow: 0 12px 24px -16px rgba(24,35,60,.3);
    font-size: 17px; color: var(--ink);
    visibility: hidden; opacity: 0; transform: translateY(-8px);
    transition: opacity .2s ease, transform .2s ease, visibility 0s linear .2s;
  }
  .nav-links a { padding: 13px 0; border-bottom: 1px solid var(--rule); }
  .nav.is-open .nav-links { visibility: visible; opacity: 1; transform: none; transition-delay: 0s; }
  .nav-cta { margin-left: auto; }
  .nav-toggle { display: block; }

  .day-grid { grid-template-columns: 1fr; margin-top: 6vh; }
  .day-screen { display: none; }
  .slot { min-height: 0; padding: 6vh 0; }
  .js .slot:not(.is-active) h3, .js .slot:not(.is-active) p { opacity: 1; }
  .slot-time { color: var(--ink); }
  .slot-shot { display: block; position: relative; margin: 28px 0 0; }
  .slot-shot > img { border-radius: 12px; box-shadow: var(--shadow-shot); }
  .slot-shot.shot-phone { display: flex; justify-content: center; }
  .slot-shot.shot-phone .phone { width: min(280px, 64%); }

  .tools-grid { grid-template-columns: 1fr; }
  .tool-preview { position: relative; top: auto; order: -1; aspect-ratio: auto; perspective: none; }
  .tool-preview .shot { position: relative; inset: auto; display: none; opacity: 1; visibility: visible; transform: none; transition: none; }
  .tool-preview .shot.is-active { display: block; }
  .tool-preview .shot > img { height: auto; aspect-ratio: 16 / 10; }
  .tool-list { flex-direction: row; flex-wrap: wrap; gap: 8px; border: 0; }
  .tool-tab { width: auto; display: block; padding: 10px 16px; border: 0; border-radius: 999px; background: var(--paper-deep); }
  .tool-tab strong { font-size: 15px; }
  .tool-tab span, .tool-tab em { display: none; }
  .tool-tab[aria-selected="true"] { background: var(--ink); box-shadow: none; padding-left: 16px; }
  .tool-tab[aria-selected="true"] strong { color: #fff; }
  .tool-desc { display: block; margin-top: 18px; color: var(--ink-2); }

  .mobile-inner { grid-template-columns: 1fr; }
  .phones { min-height: 0; aspect-ratio: 1.15; }
  .phones .phone { width: min(240px, 30vw); }

  .help-steps { grid-template-columns: 1fr; }
}

/* 세로로 긴 태블릿: 첫 화면 글은 위, 3D는 아래 */
@media (min-width: 761px) and (max-aspect-ratio: 1/1) {
  .hero-copy { top: 112px; transform: none; width: min(560px, calc(100vw - var(--content-left) - var(--content-right))); }
  .stage-copy { top: 112px; bottom: auto; width: min(520px, calc(100vw - var(--content-left) - var(--content-right))); }
  .hero-notes { display: none; }
}

/* ================= 휴대폰 ================= */
@media (max-width: 760px) {
  :root { --gutter: 18px; --rule-gap: 30px; --content-left: 36px; --content-right: 18px; }
  body { font-size: 16px; }
  .nav { height: 60px; padding-right: 8px; }
  .nav-links { top: 60px; }
  .nav-brand { margin-left: 8px; font-size: 17px; }
  .nav-cta { display: none; }
  .nav-toggle { margin-left: auto; }
  .only-wide { display: none !important; }
  .only-narrow { display: inline-flex !important; }

  .hero-copy { left: var(--content-left); right: var(--content-right); width: auto; top: 80px; transform: none; }
  .hero-title { font-size: clamp(38px, 11vw, 52px); }
  .hero-lede { margin-top: 14px; font-size: 16px; }
  .hero-actions { margin-top: 20px; gap: 10px; }
  .hero-actions .btn { min-height: 48px; padding: 0 18px; font-size: 15px; }
  .hero-proof { margin-top: 14px; font-size: 14px; }
  .hero-notes { display: none; }
  .stage-copy { left: var(--content-left); right: var(--content-right); width: auto; top: 80px; bottom: auto; }
  .stage-copy h2 { font-size: 30px; }
  .no-webgl .stage-sticky { padding-top: 84px; }
  .no-webgl .hero-copy { position: relative; left: auto; right: auto; top: auto; margin: 0 var(--content-right) 0 var(--content-left); }
  .no-webgl .hero-fallback { position: relative; right: auto; top: auto; transform: none; width: auto; margin: 36px var(--content-right) 48px var(--content-left); }

  .day { padding-top: 12vh; }
  .slot-time { font-size: 60px; }
  .mark-note { font-size: 17px; padding: 1px 8px 2px; }
  .mark rect, .mark ellipse { stroke-width: 6; }

  .phones { aspect-ratio: .95; }
  .phones .phone { width: 44vw; }
  .phones .phone:nth-child(1) { transform: translateX(-56%) translateY(6%) rotateY(16deg) rotateZ(-4deg) scale(.86); }
  .phones .phone:nth-child(3) { transform: translateX(56%) translateY(6%) rotateY(-16deg) rotateZ(4deg) scale(.86); }
  .qr-card { display: none; }

  .trust-list { grid-template-columns: 1fr; }
  .update { grid-template-columns: 1fr; padding: 26px 0; }
  .update-ver { font-size: 26px; }
  .update-ver time { display: inline; margin-left: 10px; }
  .guide-list { grid-template-columns: 1fr; }
  .download-actions .btn { width: 100%; }
  .help-imgs img { max-width: 100%; }
}

@media (prefers-reduced-motion: reduce) {
  .js .hero-copy > * { animation: none; }
  .shot, .shot.is-active, .mark rect, .mark ellipse, .mark-note, .slot-time, .phones .phone { transition: none !important; }
}
