/* Penwork 사이트. 종이 위에 잉크가 먼저 쓰는 페이지. */

:root {
  --paper: #FBFBF8;
  --sheet: #FFFFFF;
  --ink: #15181E;
  --ink-2: #4A505C;
  --ink-3: #6E7480;
  --blue: #2447B2;
  --blue-wash: rgba(36, 71, 178, .08);
  --marker: #FFE14A;
  --red: #D6463A;
  --grid: rgba(36, 71, 178, .085);
  --rule: rgba(21, 24, 30, .1);
  --night: #101218;
  --night-2: #191C24;
  --pad: clamp(20px, 5vw, 72px);
  --max: 1360px;
  --font: 'Pretendard Variable', Pretendard, -apple-system, BlinkMacSystemFont, 'Apple SD Gothic Neo', 'Noto Sans KR', system-ui, sans-serif;
  --mono: ui-monospace, 'SF Mono', SFMono-Regular, Menlo, Consolas, monospace;
  --ease: cubic-bezier(.2, .7, .1, 1);
}

*, *::before, *::after { box-sizing: border-box; }
html { background: var(--paper); color: var(--ink); -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  font-family: var(--font);
  font-size: 18px;
  line-height: 1.65;
  font-feature-settings: 'ss06';
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
  word-break: keep-all;
  overflow-wrap: break-word;
  overflow-x: clip;
}
html[lang="en"] body { word-break: normal; }
img, svg, canvas { max-width: 100%; }
a { color: inherit; }
button { font: inherit; color: inherit; cursor: pointer; }
:focus-visible { outline: 3px solid var(--blue); outline-offset: 3px; border-radius: 6px; }
::selection { background: var(--marker); color: var(--ink); }

.visually-hidden {
  position: absolute !important; width: 1px; height: 1px; padding: 0; margin: -1px;
  overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0;
}
.skip {
  position: fixed; left: 12px; top: -80px; z-index: 300;
  background: var(--ink); color: var(--paper); padding: 10px 16px; border-radius: 10px;
  font-weight: 650; text-decoration: none;
}
.skip:focus { top: 12px; }

section[id] { scroll-margin-top: 76px; }
.no-ink .hero-note, .no-ink .propose, .no-ink .replay { display: none; }

/* ---------- 글자 ---------- */

.h2 {
  font-size: clamp(40px, 5.6vw, 86px);
  line-height: 1.04;
  font-weight: 760;
  letter-spacing: -0.038em;
  margin: 0;
  max-width: 15em;
}
html[lang="en"] .h2 { letter-spacing: -0.035em; max-width: 13em; }
.body {
  font-size: clamp(17px, 1.35vw, 20px);
  line-height: 1.7;
  color: var(--ink-2);
  max-width: 33em;
  margin: 1.1em 0 0;
}
.section-head { max-width: var(--max); margin: 0 auto clamp(40px, 6vw, 84px); }
.fineprint { max-width: 1240px; margin: 18px auto 0; font-size: 14px; color: var(--ink-3); }

/* ---------- 단추 ---------- */

.btn {
  --h: 56px;
  display: inline-flex; align-items: center; justify-content: center;
  height: var(--h); padding: 0 28px; border-radius: 999px;
  background: var(--ink); color: var(--paper);
  font-weight: 650; font-size: 17px; letter-spacing: -0.01em;
  text-decoration: none; border: 0; white-space: nowrap;
  transition: background-color .35s var(--ease);
  will-change: transform;
}
.btn > span { display: inline-block; will-change: transform; }
.btn:hover { background: var(--blue); }
.btn-small { --h: 40px; padding: 0 18px; font-size: 14.5px; }
.btn-big { --h: 72px; padding: 0 40px; font-size: 21px; }
.btn-line { background: transparent; color: var(--ink); box-shadow: inset 0 0 0 1.5px var(--ink); --h: 46px; padding: 0 22px; font-size: 15.5px; }
.btn-line:hover { background: var(--ink); color: var(--paper); }
.chip-btn {
  display: inline-flex; align-items: center; height: 32px; padding: 0 14px; border-radius: 999px;
  font-size: 13.5px; font-weight: 650; background: rgba(21, 24, 30, .06); color: var(--ink);
}
.chip-apply { background: var(--ink); color: var(--paper); }

.scribble { position: relative; text-decoration: none; }
.scribble .scrib {
  position: absolute; left: -3%; bottom: -0.42em; width: 106%; height: 0.6em; overflow: visible; pointer-events: none;
}
.scribble .scrib path { fill: none; stroke: var(--blue); stroke-width: 2.2; stroke-linecap: round; transition: stroke-dashoffset .5s var(--ease); }
.scribble:hover .scrib path, .scribble:focus-visible .scrib path, .scribble[aria-current="page"] .scrib path { stroke-dashoffset: 0 !important; }

/* ---------- 머리 ---------- */

.nav {
  position: fixed; inset: 0 0 auto 0; z-index: 50;
  display: flex; align-items: center; gap: 28px;
  height: 68px; padding: 0 var(--pad);
  transition: transform .5s var(--ease), background-color .3s, box-shadow .3s;
}
.nav.is-solid, .nav.is-scrolled { background: rgba(251, 251, 248, .88); backdrop-filter: saturate(1.4) blur(14px); -webkit-backdrop-filter: saturate(1.4) blur(14px); box-shadow: 0 1px 0 rgba(21, 24, 30, .06); }
.nav.is-hidden { transform: translateY(-100%); }
.nav-logo { display: inline-flex; align-items: center; gap: 10px; text-decoration: none; font-weight: 780; font-size: 19px; letter-spacing: -0.03em; }
.nav-penpal { width: 24px; height: 24px; display: inline-block; }
.nav-links { display: flex; gap: 28px; margin-left: 24px; font-size: 15px; font-weight: 580; }
.nav-end { margin-left: auto; display: flex; align-items: center; gap: 22px; font-size: 15px; font-weight: 580; }

/* ---------- 여는 화면 ---------- */

.pre {
  position: fixed; inset: 0; z-index: 200; background: var(--paper);
  display: grid; place-items: center;
}
html:not(.js) .pre, html.seen .pre { display: none; }
.pre-art { width: min(440px, 82vw); height: auto; overflow: visible; }
.pre-skip { position: absolute; right: 24px; bottom: 22px; background: none; border: 0; font-size: 14px; font-weight: 600; color: var(--ink-2); }

/* ---------- 첫 화면 ---------- */

.hero {
  position: relative; min-height: 100svh;
  display: grid; grid-template-columns: minmax(0, 1.04fr) minmax(0, .96fr);
  align-items: center; gap: clamp(24px, 4vw, 72px);
  padding: 116px var(--pad) 96px;
  max-width: calc(var(--max) + 2 * var(--pad)); margin: 0 auto;
}
.hero::before {
  content: ''; position: absolute; inset: 0 calc(50% - 50vw); z-index: -1;
  background-image: linear-gradient(var(--grid) 1px, transparent 1px), linear-gradient(90deg, var(--grid) 1px, transparent 1px);
  background-size: 28px 28px;
  -webkit-mask-image: radial-gradient(ellipse 60% 70% at 72% 46%, #000 35%, transparent 78%);
  mask-image: radial-gradient(ellipse 60% 70% at 72% 46%, #000 35%, transparent 78%);
}
.hero-doodles { position: absolute; inset: 0; pointer-events: none; z-index: -1; }
.hero-doodles svg { position: absolute; overflow: visible; fill: none; stroke-linecap: round; stroke-linejoin: round; }
.status {
  display: inline-flex; align-items: center; gap: 10px; margin: 0;
  padding: 6px 14px 6px 10px; border-radius: 999px; background: var(--blue-wash);
  font-size: 14px; font-weight: 640; color: var(--blue);
}
.status-dot { position: relative; width: 8px; height: 8px; border-radius: 50%; background: var(--blue); }
.status-dot::after {
  content: ''; position: absolute; inset: -5px; border-radius: 50%; border: 2px solid var(--blue);
  animation: pulse 2.2s var(--ease) infinite;
}
@keyframes pulse { 0% { transform: scale(.4); opacity: .9; } 80%, 100% { transform: scale(1.4); opacity: 0; } }
.hero-title {
  font-size: clamp(66px, 11.6vw, 196px);
  line-height: .9; font-weight: 820; letter-spacing: -0.058em;
  margin: .26em 0 .24em; margin-left: -0.04em;
}
html[lang="en"] .hero-title { font-size: clamp(50px, 6.9vw, 124px); letter-spacing: -0.05em; }
.hero-title, .h2, .doc-title { overflow-wrap: normal; word-break: keep-all; }
.hero-lead { font-size: clamp(17px, 1.42vw, 21px); line-height: 1.7; color: var(--ink-2); max-width: 31em; margin: 0; }
.hero-actions { display: flex; align-items: center; flex-wrap: wrap; gap: 18px 30px; margin-top: 38px; }
.link-hand { font-weight: 680; font-size: 17px; }
.hero-platform { margin: 22px 0 0; font-size: 15px; color: var(--ink-3); }
.hero-stage { position: relative; perspective: 1500px; }
.sheet {
  position: relative; width: min(100%, 560px); aspect-ratio: 300 / 384; margin-left: auto;
  background-color: var(--sheet); border-radius: 22px;
  background-image: linear-gradient(var(--grid) 1px, transparent 1px), linear-gradient(90deg, var(--grid) 1px, transparent 1px);
  background-size: 22px 22px; background-position: -1px 10px;
  box-shadow: 0 1px 1px rgba(21, 24, 30, .05), 0 38px 70px -34px rgba(21, 24, 30, .38), 0 14px 28px -16px rgba(21, 24, 30, .14);
  transform: rotateX(7deg) rotateY(-13deg) rotateZ(1.2deg);
  transform-style: preserve-3d;
}
.sheet-head { position: absolute; top: 4.2%; left: 6%; right: 6%; display: flex; justify-content: space-between; font-size: 13px; font-weight: 640; color: var(--ink-3); }
.sheet-ink { position: absolute; left: 0; top: 6.2%; width: 100%; height: 93.8%; overflow: visible; }
.sheet-penpal { position: absolute; top: -40px; right: 14%; width: 58px; height: 58px; }
.propose {
  position: absolute; right: -9%; top: 53%; width: min(262px, 60%);
  background: var(--paper); border-radius: 18px; padding: 14px 16px 16px;
  box-shadow: 0 24px 50px -24px rgba(21, 24, 30, .45), 0 0 0 1px rgba(21, 24, 30, .05);
  font-size: 14.5px; line-height: 1.55; opacity: 0; visibility: hidden;
  transform: translateZ(40px);
}
.propose p { margin: 8px 0 12px; }
.propose-head { display: flex; align-items: center; gap: 8px; font-size: 14px; }
.propose-avatar { width: 22px; height: 22px; display: inline-block; }
.propose-num { margin-left: auto; width: 22px; height: 22px; border-radius: 50%; background: var(--blue); color: #fff; font-size: 12.5px; font-weight: 700; display: grid; place-items: center; }
.propose-actions { display: flex; gap: 8px; }
.toast {
  position: absolute; left: 50%; bottom: 5%; transform: translate(-50%, 0);
  background: var(--ink); color: var(--paper); padding: 10px 16px; border-radius: 999px;
  font-size: 13.5px; white-space: nowrap; opacity: 0; visibility: hidden;
}
.replay {
  position: absolute; right: 5%; bottom: 3.6%; background: none; border: 0; padding: 6px 4px;
  font-size: 13px; font-weight: 640; color: var(--ink-3); opacity: 0; visibility: hidden;
}
.hero-note { position: absolute; left: -14%; top: -2%; width: 42%; overflow: visible; pointer-events: none; }
.scroll-cue {
  position: absolute; left: var(--pad); bottom: 26px; display: flex; align-items: flex-end; gap: 10px;
  color: var(--ink-3); font-size: 13px; font-weight: 600; text-decoration: none;
}
.scroll-cue svg { width: 18px; height: 42px; fill: none; stroke: currentColor; stroke-width: 2.2; stroke-linecap: round; stroke-linejoin: round; }

/* ---------- 흐르는 띠 ---------- */

.marquee { padding: clamp(28px, 4vw, 56px) 0; overflow: hidden; }
.marquee-row { display: flex; white-space: nowrap; }
.marquee-track { display: inline-flex; align-items: center; gap: .55em; padding-right: .55em; flex: none; will-change: transform; }
.marquee-type { font-size: clamp(40px, 6.6vw, 108px); font-weight: 780; letter-spacing: -0.045em; line-height: 1.1; }
.mq-drop {
  display: inline-block; width: .3em; height: .4em; flex: none;
  background: var(--blue);
  -webkit-mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 100 100'%3E%3Cpath d='M56 3C64 20 88 36 88 60C88 83 71 98 50 98C29 98 12 83 12 60C12 38 46 22 56 3Z'/%3E%3C/svg%3E") center / contain no-repeat;
  mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 100 100'%3E%3Cpath d='M56 3C64 20 88 36 88 60C88 83 71 98 50 98C29 98 12 83 12 60C12 38 46 22 56 3Z'/%3E%3C/svg%3E") center / contain no-repeat;
}
.marquee-hand { height: clamp(64px, 8vw, 120px); margin-top: clamp(10px, 1.4vw, 20px); }
.marquee-hand .marquee-track { gap: clamp(40px, 6vw, 96px); padding-right: clamp(40px, 6vw, 96px); height: 100%; }
.marquee-hand svg { height: 100%; width: auto; overflow: visible; flex: none; }

/* ---------- Cursor 비교 ---------- */

.cursor-inner {
  min-height: 100svh; max-width: calc(var(--max) + 2 * var(--pad)); margin: 0 auto;
  display: grid; grid-template-columns: minmax(0, .84fr) minmax(0, 1.16fr); align-items: center;
  gap: clamp(32px, 5vw, 84px); padding: 112px var(--pad) 64px;
}
.cursor-copy .h2 { font-size: clamp(36px, 4.4vw, 66px); }
.compare { margin-top: 38px; font-size: 16px; }
.compare-row { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1.15fr); gap: 20px; padding: 13px 0; border-top: 1px solid var(--rule); }
.compare-row > span:first-child { color: var(--ink-3); }
.compare-row > span:last-child { font-weight: 620; }
.compare-head { font-size: 13.5px; font-weight: 700; color: var(--ink-2); border-top: 0; padding-top: 0; }
.compare-head > span:first-child { color: var(--ink-2); }
.tick { width: 18px; height: 18px; margin: 0 8px -3px 0; fill: none; stroke: var(--blue); stroke-width: 4.5; stroke-linecap: round; stroke-linejoin: round; }
.cursor-stage {
  position: relative; aspect-ratio: 4 / 3.25; border-radius: 24px; overflow: hidden;
  background: var(--night); box-shadow: 0 40px 80px -42px rgba(16, 18, 24, .6);
}
.editor { position: absolute; inset: 0; color: #C9CFDB; font-family: var(--mono); font-size: clamp(11.5px, 1.02vw, 14.5px); line-height: 1.8; }
.editor-bar { height: 46px; display: flex; align-items: center; justify-content: space-between; padding: 0 18px; background: var(--night-2); font-family: var(--font); font-size: 13px; color: #8F97A6; }
.editor-tab { color: #E8EBF1; font-weight: 600; }
.editor-status { display: inline-flex; align-items: center; gap: 8px; }
.editor-status i { width: 7px; height: 7px; border-radius: 50%; background: #7AA2FF; animation: blink 1.1s steps(2) infinite; }
@keyframes blink { 50% { opacity: .2; } }
.editor-code { margin: 0; padding: 18px 20px; white-space: pre; overflow: hidden; }
.editor-code .cl { display: block; min-height: 1.8em; }
.editor-code .ln { display: inline-block; width: 2.4ch; margin-right: 1.6ch; text-align: right; color: #464C59; }
.editor-code .ct { display: inline-block; vertical-align: top; overflow: hidden; white-space: pre; width: calc(var(--c, 0) * 1ch); }
.editor-code .caret { display: inline-block; width: 2px; height: 1.2em; margin-left: 1px; vertical-align: -0.2em; background: #7AA2FF; animation: blink 1s steps(2) infinite; }
.k-fence { color: #6C7484; } .k-block { color: #7AA2FF; } .k-word { color: #C6A8FF; } .k-str { color: #F1C76E; }
.k-math { color: #8ED7A5; } .k-head { color: #FF9C8F; } .k-box { color: #FFB86B; } .k-num { color: #EEF1F6; }
.cursor-stage .cursor-paper { position: absolute; inset: 0; background-color: var(--sheet); background-size: 24px 24px; border-radius: 0; box-shadow: none; }
.cursor-ink { position: absolute; left: 7%; top: 8%; width: 86%; height: 84%; overflow: visible; }
.cursor-applied { position: absolute; right: 22px; bottom: 20px; opacity: 0; }

/* ---------- 펜팔 데모 ---------- */

.penpal { padding: clamp(96px, 14vh, 180px) var(--pad); }
.device {
  max-width: 1240px; margin: 0 auto; border-radius: clamp(26px, 3vw, 40px);
  background: var(--ink); padding: clamp(8px, 1vw, 13px);
  box-shadow: 0 60px 100px -60px rgba(21, 24, 30, .6);
}
.device-bar {
  display: flex; align-items: center; gap: 14px; height: 58px; padding: 0 14px 0 16px;
  background: #F3F3EF; border-radius: clamp(18px, 2.2vw, 28px) clamp(18px, 2.2vw, 28px) 0 0;
}
.device-back svg { width: 22px; height: 22px; fill: none; stroke: var(--ink); stroke-width: 2.2; stroke-linecap: round; stroke-linejoin: round; display: block; }
.device-title { font-weight: 720; font-size: 15px; white-space: nowrap; }
.device-tools { display: flex; gap: 4px; margin-left: 12px; }
.device-tools i {
  width: 34px; height: 34px; border-radius: 10px; display: block; background: var(--ink);
  -webkit-mask: var(--m) center / 20px 20px no-repeat; mask: var(--m) center / 20px 20px no-repeat;
}
.device-tools i:nth-child(2) { background-color: var(--blue); }
.t-hand { --m: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M8 13V5.5a1.5 1.5 0 0 1 3 0V12M11 11.5v-7a1.5 1.5 0 0 1 3 0V12M14 11.5V6.5a1.5 1.5 0 0 1 3 0V14c0 4-2.5 7-6 7-2.5 0-4-1-5.5-3.5L4 14.5a1.5 1.5 0 0 1 2.5-1.6L8 15'/%3E%3C/svg%3E"); }
.t-pen { --m: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M4 20l1.2-4.6L15.8 4.8a2 2 0 0 1 2.8 0l.6.6a2 2 0 0 1 0 2.8L8.6 18.8z'/%3E%3C/svg%3E"); }
.t-marker { --m: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M9 15l-3 3h-3l3-3M8 13l6-9 6 6-9 6zM4 21h16'/%3E%3C/svg%3E"); }
.t-eraser { --m: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M7 20h11M5.5 15.5l9-9a2 2 0 0 1 2.8 0l2.2 2.2a2 2 0 0 1 0 2.8L11 20H8z'/%3E%3C/svg%3E"); }
.t-lasso { --m: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M7 16.5C4.5 15 3 13 3 10.5 3 6.4 7 3 12 3s9 3.4 9 7.5S17 18 12 18c-1 0-2-.1-2.8-.4M7 16.5c0 1.5 1 2.5 2.4 2.5 1.2 0 1.6 1 1 2'/%3E%3C/svg%3E"); }
.device-controls { margin-left: auto; display: flex; align-items: center; gap: 14px; }
.ctl { display: flex; align-items: center; gap: 8px; font-size: 13px; font-weight: 600; color: var(--ink-2); }
.ctl input { width: 76px; }
.ctl-btn {
  height: 32px; padding: 0 12px; border-radius: 999px; border: 0; background: #fff;
  box-shadow: inset 0 0 0 1px rgba(21, 24, 30, .14); font-size: 13px; font-weight: 640;
}
.ctl-btn:disabled { opacity: .38; cursor: default; }
.device-chip { width: 38px; height: 38px; flex: none; }
.device-body {
  display: grid; grid-template-columns: minmax(0, 1fr) clamp(300px, 29vw, 360px);
  height: clamp(580px, 74vh, 740px); background: var(--paper);
  border-radius: 0 0 clamp(18px, 2.2vw, 28px) clamp(18px, 2.2vw, 28px); overflow: hidden;
}
.note {
  overflow-y: auto; overscroll-behavior: contain; padding: 26px clamp(20px, 3.4vw, 52px) 120px;
  background-color: var(--sheet);
  background-image: linear-gradient(var(--grid) 1px, transparent 1px), linear-gradient(90deg, var(--grid) 1px, transparent 1px);
  background-size: 24px 24px; scroll-behavior: smooth;
}
.note:focus-visible { outline-offset: -4px; }
.note-head { display: flex; justify-content: space-between; font-size: 13.5px; color: var(--ink-3); margin-bottom: 10px; }
.note-head b { color: var(--ink); font-weight: 720; }
.q { position: relative; padding: 18px 0 14px; }
.q + .q { border-top: 1px dashed rgba(21, 24, 30, .14); }
.q-text { display: flex; gap: 12px; margin: 0 0 10px; font-size: 15.5px; line-height: 1.62; background: rgba(255, 255, 255, .86); }
.q-text b {
  flex: none; width: 26px; height: 26px; margin-top: 1px; border-radius: 50%; background: var(--ink); color: var(--paper);
  display: grid; place-items: center; font-size: 13px;
}
.q-sum .q-text { font-weight: 720; }
.q-sum .q-text b { display: none; }
.q-work { position: relative; }
.q-work > svg { display: block; width: 100%; height: auto; overflow: visible; }
.q-work .ink path { stroke-width: calc(var(--w) * var(--k, 1) * 1px); }
.ghost rect { fill: rgba(36, 71, 178, .045); stroke: var(--blue); stroke-dasharray: 5 5; stroke-width: 1.3; vector-effect: non-scaling-stroke; }
.ghost .ghost-ink { opacity: .22; }
.ghost circle { fill: var(--blue); }
.ghost text { fill: #fff; font: 700 8px var(--font); text-anchor: middle; dominant-baseline: central; }
.blank rect { fill: none; stroke: rgba(21, 24, 30, .18); stroke-dasharray: 3 5; stroke-width: 1; vector-effect: non-scaling-stroke; }
.blank text { fill: var(--ink-3); font: 600 7px var(--font); text-anchor: middle; dominant-baseline: central; }
.sticky {
  position: absolute; right: 2%; top: 6px; width: min(48%, 250px); z-index: 2;
  background: #FFF1A0; color: var(--ink); padding: 12px 14px 15px; border-radius: 3px;
  font-size: 13.5px; line-height: 1.55; box-shadow: 0 16px 24px -16px rgba(60, 50, 0, .45);
  transform: rotate(-2.2deg); transform-origin: 70% 0;
}
.sticky b { display: flex; align-items: center; gap: 6px; font-size: 12.5px; margin-bottom: 4px; }
.sticky b span { width: 16px; height: 16px; display: inline-block; }
.chat { display: flex; flex-direction: column; min-height: 0; border-left: 1px solid rgba(21, 24, 30, .08); background: var(--paper); }
.chat-head { position: relative; display: flex; align-items: center; gap: 10px; padding: 14px 16px 10px; font-size: 15px; }
.chat-face { width: 28px; height: 28px; display: inline-block; }
.memory { margin-left: auto; border: 0; padding: 5px 11px; border-radius: 999px; background: var(--blue-wash); color: var(--blue); font-size: 12.5px; font-weight: 680; }
.memory-pop {
  position: absolute; top: 50px; right: 12px; z-index: 5; width: 246px; padding: 12px 14px;
  background: #fff; border-radius: 14px; box-shadow: 0 20px 40px -20px rgba(21, 24, 30, .4), 0 0 0 1px rgba(21, 24, 30, .06);
  font-size: 13.5px; display: none;
}
.memory[aria-expanded="true"] + .memory-pop { display: block; }
.memory-pop p { margin: 0 0 6px; font-weight: 700; font-size: 12.5px; color: var(--ink-2); }
.memory-pop ul { margin: 0; padding-left: 1.1em; }
.chat-log { flex: 1; min-height: 0; overflow-y: auto; overscroll-behavior: contain; padding: 4px 16px 16px; display: flex; flex-direction: column; gap: 12px; }
.chat-hello { margin: 0; padding: 10px 12px; border-radius: 14px; background: rgba(21, 24, 30, .045); font-size: 13.5px; color: var(--ink-2); }
.msg-user {
  align-self: flex-end; max-width: 88%; background: var(--ink); color: var(--paper);
  padding: 9px 13px; border-radius: 16px 16px 4px 16px; font-size: 14px; line-height: 1.5;
}
.msg-bot { display: grid; grid-template-columns: 24px minmax(0, 1fr); gap: 8px; font-size: 14px; line-height: 1.58; }
.msg-bot .face { width: 24px; height: 24px; margin-top: 2px; }
.msg-body { background: #fff; padding: 10px 12px; border-radius: 4px 16px 16px 16px; box-shadow: 0 1px 2px rgba(21, 24, 30, .06), 0 0 0 1px rgba(21, 24, 30, .04); }
.msg-body p { margin: 0; }
.msg-typing { display: flex; align-items: center; gap: 8px; font-size: 13.5px; color: var(--ink-3); }
.msg-actions { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 10px; }
.msg-actions button { border: 0; height: 30px; padding: 0 12px; border-radius: 999px; font-size: 13px; font-weight: 660; background: rgba(21, 24, 30, .06); }
.msg-actions .is-primary { background: var(--ink); color: var(--paper); }
.msg-actions button:disabled { opacity: .4; cursor: default; }
.msg-markup { margin-top: 10px; }
.msg-markup summary { font-size: 12.5px; font-weight: 680; color: var(--blue); cursor: pointer; }
.msg-markup pre, .code {
  margin: 8px 0 0; padding: 10px 12px; border-radius: 10px; background: var(--night); color: #D9DEE7;
  font: 11.5px/1.65 var(--mono); white-space: pre; overflow: auto; max-height: 240px;
}
.msg-note { font-size: 12.5px; color: var(--ink-3); padding-left: 32px; }
.chat-suggest { padding: 10px 14px 10px; border-top: 1px solid rgba(21, 24, 30, .06); }
.chat-suggest > p { margin: 0 0 8px; font-size: 12.5px; font-weight: 680; color: var(--ink-3); }
.chips { display: flex; flex-wrap: wrap; gap: 6px; }
.chip {
  border: 0; text-align: left; padding: 7px 11px; border-radius: 12px; font-size: 13px; font-weight: 600; line-height: 1.35;
  background: #fff; box-shadow: inset 0 0 0 1px rgba(21, 24, 30, .13); transition: box-shadow .2s, background-color .2s;
}
.chip:hover { box-shadow: inset 0 0 0 1.5px var(--ink); }
.chip.is-done { background: var(--blue-wash); box-shadow: none; color: var(--blue); }
.chip:disabled { opacity: .5; cursor: default; }
.chat-input { display: flex; align-items: center; gap: 10px; margin: 0 12px 12px; height: 44px; padding: 0 7px 0 14px; border-radius: 999px; background: #fff; box-shadow: inset 0 0 0 1px rgba(21, 24, 30, .1); color: var(--ink-3); font-size: 14px; }
.chat-input i { font-style: normal; font-size: 18px; color: var(--ink-2); }
.chat-input .send { margin-left: auto; width: 30px; height: 30px; border-radius: 50%; background: var(--ink); opacity: .2; }

/* ---------- 그림 ---------- */

.figures { padding: clamp(96px, 14vh, 180px) 0 0; }
.figures .section-head { padding: 0 var(--pad); }
.tour { position: relative; height: 100svh; overflow: hidden; background-color: #F6F6F2; }
.tour-world { position: absolute; inset: 0; width: 100%; height: 100%; display: block; }
.tour-world .fig-cap { font: 600 4.6px var(--font); fill: var(--ink-3); }
.tour-caption {
  position: absolute; left: var(--pad); bottom: clamp(24px, 6vh, 60px); width: min(430px, 40vw);
  padding: 22px 24px 20px; border-radius: 20px; background: rgba(251, 251, 248, .94);
  -webkit-backdrop-filter: blur(10px); backdrop-filter: blur(10px);
  box-shadow: 0 30px 60px -36px rgba(21, 24, 30, .45), 0 0 0 1px rgba(21, 24, 30, .05);
}
.tour-caption .cap-count { margin: 0 0 6px; font-size: 13px; font-weight: 700; color: var(--blue); }
.tour-caption h3 { margin: 0; font-size: clamp(24px, 2.4vw, 34px); line-height: 1.15; font-weight: 760; letter-spacing: -0.03em; }
.tour-caption p { margin: 8px 0 0; font-size: 15.5px; line-height: 1.62; color: var(--ink-2); }
.tour-caption .code { max-height: 180px; margin-top: 14px; font-size: 11px; }
.tour-caption .code-label { margin: 14px 0 0; font-size: 12px; font-weight: 700; color: var(--ink-3); }
.tour-progress { position: absolute; right: var(--pad); bottom: clamp(30px, 6vh, 64px); display: flex; gap: 6px; }
.tour-progress i { width: 26px; height: 4px; border-radius: 4px; background: rgba(21, 24, 30, .14); transition: background-color .3s; }
.tour-progress i.on { background: var(--ink); }
.fig-list { display: none; }
.fig-cat { padding: 0 var(--pad); margin-bottom: 64px; }
.fig-cat h3 { font-size: 26px; letter-spacing: -0.02em; margin: 0; }
.fig-cat > p { color: var(--ink-2); margin: 6px 0 18px; font-size: 16px; }
.fig-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: 14px; }
.fig-card { margin: 0; background: var(--sheet); border-radius: 16px; padding: 14px; box-shadow: inset 0 0 0 1px rgba(21, 24, 30, .06); }
.fig-card svg { display: block; width: 100%; height: auto; aspect-ratio: 1.15; overflow: visible; }
.fig-card figcaption { margin-top: 8px; font-size: 13px; font-weight: 600; color: var(--ink-2); }

/* ---------- 폰트가 아닙니다 ---------- */

.font {
  max-width: calc(var(--max) + 2 * var(--pad)); margin: 0 auto; padding: clamp(110px, 16vh, 200px) var(--pad);
  display: grid; grid-template-columns: minmax(0, .78fr) minmax(0, 1.22fr); gap: clamp(32px, 5vw, 88px); align-items: center;
}
.font-copy .btn { margin-top: 30px; }
.font-block + .font-block { margin-top: 30px; }
.font-label { margin: 0 0 10px; font-size: 14px; font-weight: 680; color: var(--ink-2); }
.font-type { padding: 18px 22px; border-radius: 18px; background: var(--sheet); box-shadow: inset 0 0 0 1px rgba(21, 24, 30, .06); }
.font-type p { margin: 0; font-size: clamp(17px, 1.75vw, 25px); line-height: 1.75; font-weight: 520; letter-spacing: -0.01em; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
mark { background: linear-gradient(transparent 52%, var(--marker) 52%, var(--marker) 92%, transparent 92%); color: inherit; padding: 0 .04em; }
.font-hand { display: block; width: 100%; height: auto; overflow: visible; border-radius: 18px; background-color: var(--sheet); box-shadow: inset 0 0 0 1px rgba(21, 24, 30, .06); }

/* ---------- 써 보기 ---------- */

.try { padding: clamp(96px, 14vh, 180px) var(--pad); max-width: calc(var(--max) + 2 * var(--pad)); margin: 0 auto; }
.try .section-head { margin-bottom: 34px; }
.try-tabs { display: inline-flex; gap: 2px; padding: 4px; margin-bottom: 26px; border-radius: 999px; background: rgba(21, 24, 30, .055); }
.try-tabs [role="tab"] { border: 0; background: none; height: 42px; padding: 0 20px; border-radius: 999px; font-size: 15px; font-weight: 660; color: var(--ink-2); }
.try-tabs [aria-selected="true"] { background: var(--sheet); color: var(--ink); box-shadow: 0 2px 6px rgba(21, 24, 30, .1); }
.try-panel { display: grid; grid-template-columns: minmax(260px, .66fr) minmax(0, 1.34fr); gap: clamp(20px, 3vw, 44px); }
.try-panel[hidden] { display: none; }
#panel-draw { grid-template-columns: 1fr; }
.field > span { display: block; margin-bottom: 8px; font-size: 14px; font-weight: 680; color: var(--ink-2); }
.try-input {
  width: 100%; resize: vertical; min-height: 120px; padding: 14px 16px; border-radius: 16px; border: 0;
  background: var(--sheet); box-shadow: inset 0 0 0 1.5px rgba(21, 24, 30, .14);
  font: 17px/1.55 var(--font); color: var(--ink);
}
.try-input:focus { outline: none; box-shadow: inset 0 0 0 2px var(--blue), 0 0 0 5px rgba(36, 71, 178, .12); }
.opts { display: grid; gap: 16px; margin-top: 22px; }
.opt { display: flex; align-items: center; gap: 10px; font-size: 14px; font-weight: 640; color: var(--ink-2); }
.opt > span { min-width: 4.6em; }
.opt input[type="range"] { flex: 1; max-width: 200px; }
.opts .btn { justify-self: start; }
.swatch {
  width: 26px; height: 26px; border-radius: 50%; border: 0; background: var(--c); padding: 0;
  box-shadow: 0 0 0 3px var(--paper), 0 0 0 4.5px transparent; transition: box-shadow .2s;
}
.swatch[aria-checked="true"], .swatch[aria-pressed="true"] { box-shadow: 0 0 0 3px var(--paper), 0 0 0 4.5px var(--c); }
.seg { height: 32px; padding: 0 13px; border-radius: 999px; border: 0; background: var(--sheet); box-shadow: inset 0 0 0 1px rgba(21, 24, 30, .14); font-size: 13.5px; font-weight: 620; }
.seg[aria-checked="true"] { background: var(--ink); color: var(--paper); box-shadow: none; }
.try-note { margin: 18px 0 0; font-size: 13.5px; color: var(--ink-3); }
input[type="range"] { accent-color: var(--ink); }
.paper { position: relative; border-radius: 22px; background-color: var(--sheet); box-shadow: inset 0 0 0 1px rgba(21, 24, 30, .06); overflow: hidden; }
.paper-grid { background-image: linear-gradient(var(--grid) 1px, transparent 1px), linear-gradient(90deg, var(--grid) 1px, transparent 1px); background-size: 24px 24px; }
.paper-lined { background-image: linear-gradient(transparent calc(100% - 1px), rgba(36, 71, 178, .16) 0); background-size: 100% 36px; background-position: 0 12px; }
.paper-plain { background-image: none; }
.try-paper { min-height: 440px; }
.try-ink { display: block; width: 100%; min-height: 440px; overflow: visible; }
.try-ink .word { cursor: pointer; outline: none; }
.try-ink .word .hit { fill: transparent; }
.try-ink .word:hover .hit, .try-ink .word:focus-visible .hit { fill: rgba(255, 225, 74, .45); }
.try-ink .word:focus-visible .hit { stroke: var(--blue); stroke-width: 1.5; }
.draw-bar { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; margin-bottom: 14px; }
.tool { height: 38px; padding: 0 15px; border-radius: 999px; border: 0; background: var(--sheet); box-shadow: inset 0 0 0 1px rgba(21, 24, 30, .14); font-size: 14px; font-weight: 640; }
.tool[aria-pressed="true"] { background: var(--ink); color: var(--paper); box-shadow: none; }
.draw-sep { width: 1px; height: 22px; background: rgba(21, 24, 30, .14); margin: 0 6px; }
.draw-paper { height: clamp(400px, 58vh, 580px); touch-action: none; }
.draw-canvas { position: absolute; inset: 0; width: 100%; height: 100%; touch-action: none; cursor: crosshair; }
.draw-hint { position: absolute; left: 50%; top: 50%; transform: translate(-50%, -50%); margin: 0; font-size: 19px; font-weight: 640; color: var(--ink-3); pointer-events: none; transition: opacity .4s; }
.draw-penpal { position: absolute; right: 20px; bottom: 16px; width: 64px; height: 64px; pointer-events: none; }

/* ---------- 아이폰 ---------- */

.phone {
  max-width: calc(var(--max) + 2 * var(--pad)); margin: 0 auto; padding: clamp(96px, 14vh, 180px) var(--pad);
  display: grid; grid-template-columns: minmax(0, .82fr) minmax(0, 1.18fr); gap: clamp(32px, 5vw, 80px); align-items: center;
}
.phones { position: relative; display: flex; justify-content: center; gap: clamp(18px, 3.4vw, 56px); perspective: 1700px; padding: 30px 0 10px; }
.iphone { margin: 0; width: clamp(180px, 21vw, 290px); transform-style: preserve-3d; }
.iphone-b { margin-top: 90px; }
.iphone-screen { padding: 3.4%; border-radius: 15% / 7.2%; background: #0E0F12; box-shadow: 0 50px 90px -46px rgba(21, 24, 30, .6); }
.iphone-screen img { display: block; width: 100%; height: auto; border-radius: 12% / 5.6%; }
.iphone figcaption { margin-top: 18px; text-align: center; font-size: 14px; font-weight: 660; color: var(--ink-2); }
.phone-marks { position: absolute; inset: 0; width: 100%; height: 100%; overflow: visible; pointer-events: none; fill: none; stroke: var(--blue); stroke-width: 2.4; stroke-linecap: round; stroke-linejoin: round; }

/* ---------- 약속 ---------- */

.promise { max-width: calc(var(--max) + 2 * var(--pad)); margin: 0 auto; padding: clamp(96px, 14vh, 180px) var(--pad); }
.promise-list { list-style: none; margin: clamp(40px, 6vw, 72px) 0 0; padding: 0; display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: clamp(34px, 4.4vw, 60px) clamp(32px, 6vw, 104px); }
.promise-item { display: grid; grid-template-columns: 46px minmax(0, 1fr); gap: 18px; align-items: start; }
.promise-check { width: 44px; height: 44px; fill: none; stroke: var(--blue); stroke-width: 3.6; stroke-linecap: round; stroke-linejoin: round; }
.promise-item h3 { margin: 4px 0 10px; font-size: clamp(22px, 2.3vw, 31px); line-height: 1.25; font-weight: 740; letter-spacing: -0.025em; }
.promise-item h3 span { position: relative; }
.promise-item h3 .under { position: absolute; left: -2%; bottom: -0.32em; width: 104%; height: 0.5em; overflow: visible; fill: none; stroke: var(--marker); stroke-width: 7; stroke-linecap: round; z-index: -1; }
.promise-item p { margin: 0; color: var(--ink-2); font-size: 17px; max-width: 27em; }

/* ---------- 마지막 ---------- */

.cta { max-width: calc(var(--max) + 2 * var(--pad)); margin: 0 auto; padding: clamp(80px, 12vh, 160px) var(--pad) clamp(100px, 14vh, 170px); }
.cta-ink { display: block; width: 100%; height: auto; overflow: visible; }
.cta-row { display: flex; align-items: center; gap: 20px; margin-top: clamp(24px, 3vw, 40px); }
.cta-penpal { flex: none; width: 66px; height: 66px; }
.cta-text { margin: 0; max-width: 30em; font-size: clamp(18px, 1.7vw, 23px); line-height: 1.6; color: var(--ink-2); }
.cta-actions { display: flex; flex-wrap: wrap; align-items: center; gap: 22px 34px; margin-top: 40px; }
.cta-mail { font-size: 18px; font-weight: 660; }

/* ---------- 바닥 ---------- */

.foot {
  max-width: calc(var(--max) + 2 * var(--pad)); margin: 0 auto; padding: 40px var(--pad) 44px;
  display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 16px 40px; font-size: 14.5px; color: var(--ink-2);
  border-top: 1px solid var(--rule);
}
.foot-brand { display: flex; align-items: center; gap: 10px; color: var(--ink); font-size: 18px; font-weight: 780; letter-spacing: -0.03em; }
.foot-penpal { width: 24px; height: 24px; display: inline-block; }
.foot-links { display: flex; flex-wrap: wrap; justify-self: end; gap: 10px 26px; }
.foot-links a { text-decoration: none; }
.foot-made, .foot-copy { margin: 0; }
.foot-copy { justify-self: end; }

/* ---------- 지원 쪽 ---------- */

.doc { max-width: 780px; margin: 0 auto; padding: 150px var(--pad) 100px; }
.doc-title { margin: 0; font-size: clamp(46px, 6.4vw, 80px); line-height: 1; font-weight: 800; letter-spacing: -0.05em; }
.doc-lead { margin: 22px 0 0; font-size: clamp(18px, 1.6vw, 21px); color: var(--ink-2); }
.doc-block h2 { margin: 64px 0 14px; font-size: 26px; font-weight: 740; letter-spacing: -0.02em; }
.doc-block p { margin: 0; color: var(--ink-2); }
.doc a { color: var(--blue); text-underline-offset: 3px; }
.faq-item { border-top: 1px solid var(--rule); }
.faq-item:last-child { border-bottom: 1px solid var(--rule); }
.faq-item summary { display: flex; justify-content: space-between; gap: 20px; padding: 18px 0; cursor: pointer; list-style: none; font-weight: 680; font-size: 17.5px; }
.faq-item summary::-webkit-details-marker { display: none; }
.faq-item summary::after { content: ''; flex: none; width: 12px; height: 12px; margin-top: 7px; border-right: 2px solid var(--ink-2); border-bottom: 2px solid var(--ink-2); transform: rotate(45deg); transition: transform .3s var(--ease); }
.faq-item[open] summary::after { transform: rotate(-135deg); margin-top: 12px; }
.faq-a p { margin: 0 0 20px; color: var(--ink-2); max-width: 36em; }

/* ---------- 약관 ---------- */

.legal { max-width: calc(1180px + 2 * var(--pad)); margin: 0 auto; padding: 150px var(--pad) 100px; }
.legal-head { max-width: 900px; }
.legal-head .doc-title span { position: relative; display: inline-block; }
.legal-under { position: absolute; left: -1%; bottom: -0.16em; width: 102%; height: 0.32em; overflow: visible; pointer-events: none; }
.legal-under path { fill: none; stroke: var(--blue); stroke-width: 2.6; stroke-linecap: round; }
.legal-date { margin: 22px 0 0; font-size: 15px; font-weight: 620; color: var(--ink-3); }
.legal-grid { display: grid; grid-template-columns: 248px minmax(0, 1fr); gap: clamp(32px, 5vw, 84px); align-items: start; margin-top: clamp(44px, 6vw, 76px); }
.toc { position: sticky; top: 100px; max-height: calc(100vh - 130px); overflow: auto; font-size: 14px; }
.toc-toggle { display: none; }
.toc-list { list-style: none; margin: 0; padding: 0; border-left: 1px solid var(--rule); }
.toc-list a {
  display: block; margin-left: -1px; padding: 7px 0 7px 16px; border-left: 2px solid transparent;
  color: var(--ink-3); text-decoration: none; line-height: 1.45; transition: color .25s, border-color .25s;
}
.toc-list a:hover { color: var(--ink); }
.toc-list a.on { color: var(--ink); font-weight: 650; border-left-color: var(--blue); }
.legal-body { max-width: 46em; font-size: 17px; line-height: 1.8; color: var(--ink-2); }
.legal-body > p:first-child { font-size: 18.5px; line-height: 1.75; color: var(--ink); }
.legal-body h2 { margin: 68px 0 16px; font-size: clamp(22px, 2vw, 27px); line-height: 1.3; font-weight: 740; letter-spacing: -0.02em; color: var(--ink); scroll-margin-top: 100px; }
.legal-body > h2:first-child { margin-top: 0; }
.legal-body p { margin: 0 0 14px; }
.legal-body ul, .legal-body ol { margin: 0 0 16px; padding-left: 1.35em; }
.legal-body li { margin: 6px 0; padding-left: .2em; }
.legal-body li::marker { color: var(--ink-3); }
.legal-body strong { color: var(--ink); font-weight: 660; }
.legal-body a { color: var(--blue); text-underline-offset: 3px; }
.legal-body .note { margin: 26px 0 10px; padding: 18px 22px; border-radius: 18px; background: var(--blue-wash); color: var(--ink); font-size: 16.5px; line-height: 1.72; }
.legal-body .table-wrap { margin: 10px 0 24px; overflow-x: auto; -webkit-overflow-scrolling: touch; border-radius: 16px; background: var(--sheet); box-shadow: inset 0 0 0 1px var(--rule); }
.legal-body table { width: 100%; min-width: 560px; border-collapse: collapse; font-size: 15px; line-height: 1.62; }
.legal-body th { padding: 12px 16px; text-align: left; font-size: 13.5px; font-weight: 700; color: var(--ink-2); background: rgba(21, 24, 30, .03); border-bottom: 1px solid var(--rule); }
.legal-body td { padding: 13px 16px; vertical-align: top; border-bottom: 1px solid var(--rule); }
.legal-body tr:last-child td { border-bottom: 0; }
.legal-body td:first-child { min-width: 8.5em; color: var(--ink); font-weight: 620; }
.legal-top { margin: 64px 0 0; font-size: 14.5px; font-weight: 640; }
.legal-top a { color: var(--ink-2); text-decoration: none; }

/* ---------- 덮개 ---------- */

.margin { position: fixed; left: clamp(8px, 1.3vw, 20px); top: 0; width: 14px; height: 100vh; z-index: 6; pointer-events: none; overflow: visible; }
.margin path { fill: none; stroke: rgba(214, 70, 58, .5); stroke-width: 1.6; stroke-linecap: round; }
.trail { position: fixed; inset: 0; width: 100vw; height: 100vh; z-index: 4; pointer-events: none; }
.cursor-dot {
  position: fixed; left: 0; top: 0; z-index: 120; width: 10px; height: 10px; margin: -5px 0 0 -5px;
  border-radius: 50%; background: var(--ink); pointer-events: none; opacity: 0;
  transition: width .3s var(--ease), height .3s var(--ease), margin .3s var(--ease), background-color .3s, opacity .3s;
}
html.has-cursor .cursor-dot { opacity: 1; }
.cursor-dot.is-link { width: 46px; height: 46px; margin: -23px 0 0 -23px; background: rgba(36, 71, 178, .16); }
.cursor-dot.is-pen { width: 6px; height: 6px; margin: -3px 0 0 -3px; background: var(--blue); }
html.has-cursor, html.has-cursor a, html.has-cursor button, html.has-cursor [role="tab"], html.has-cursor .word, html.has-cursor summary, html.has-cursor .draw-canvas { cursor: none; }
.grain {
  position: fixed; inset: 0; z-index: 90; pointer-events: none; opacity: .05;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='180' height='180'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='.85' numOctaves='3' stitchTiles='stitch'/%3E%3CfeColorMatrix values='0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 .7 0'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E");
}

/* ---------- 좁은 화면 ---------- */

@media (max-width: 1100px) {
  .device-tools { display: none; }
  .nav-links { gap: 20px; margin-left: 12px; }
}
@media (max-width: 960px) {
  .nav-links { display: none; }
  .hero { grid-template-columns: 1fr; padding-top: 104px; padding-bottom: 110px; }
  .hero-stage { margin-top: 28px; }
  .sheet { margin: 0 auto; width: min(100%, 520px); transform: rotateX(4deg) rotateY(-4deg) rotateZ(-1deg); }
  .propose { right: -2%; top: auto; bottom: 10%; }
  .hero-note { left: -4%; top: -14%; width: 40%; }
  .cursor-inner { grid-template-columns: 1fr; min-height: 0; padding-top: 40px; }
  .device-body { grid-template-columns: 1fr; height: auto; }
  .note { height: 480px; }
  .chat { border-left: 0; border-top: 1px solid rgba(21, 24, 30, .08); }
  .chat-log { max-height: 320px; min-height: 160px; }
  .device-bar { height: auto; min-height: 58px; flex-wrap: wrap; padding: 10px 14px; row-gap: 8px; }
  .device-controls { margin-left: 0; order: 5; width: 100%; flex-wrap: wrap; }
  .device-chip { margin-left: auto; }
  .tour { display: none; }
  .fig-list { display: block; }
  .font, .phone { grid-template-columns: 1fr; }
  .iphone { width: min(38vw, 300px); }
  .try-panel { grid-template-columns: 1fr; }
  .promise-list { grid-template-columns: 1fr; }
  .margin { display: none; }
  .foot { grid-template-columns: 1fr; }
  .foot-links, .foot-copy { justify-self: start; }
  .legal { padding-top: 116px; }
  .legal-grid { grid-template-columns: minmax(0, 1fr); gap: 24px; }
  .toc { position: static; max-height: none; padding: 0 18px; border-radius: 16px; background: var(--sheet); box-shadow: inset 0 0 0 1px var(--rule); }
  .toc-toggle { display: flex; align-items: center; justify-content: space-between; width: 100%; height: 50px; padding: 0; border: 0; background: none; font-size: 15px; font-weight: 680; }
  .toc-toggle::after { content: ''; width: 9px; height: 9px; margin-right: 4px; border-right: 2px solid var(--ink-2); border-bottom: 2px solid var(--ink-2); transform: rotate(45deg) translateY(-3px); transition: transform .3s var(--ease); }
  .toc.is-open .toc-toggle::after { transform: rotate(-135deg) translateY(-2px); }
  .toc-list { display: none; border-left: 0; padding-bottom: 12px; }
  .toc.is-open .toc-list { display: block; }
  .toc-list a { padding-left: 0; border-left: 0; }
  .legal-body { font-size: 16.5px; }
}
@media (max-width: 600px) {
  body { font-size: 17px; }
  .nav { height: 60px; gap: 14px; }
  .nav-end { gap: 14px; }
  .nav-lang { font-size: 14px; }
  .hero-title { font-size: clamp(58px, 17vw, 96px); }
  html[lang="en"] .hero-title { font-size: clamp(48px, 13.6vw, 80px); }
  .propose { width: 72%; padding: 12px 13px 13px; font-size: 13.5px; }
  .sheet-penpal { width: 46px; height: 46px; top: -32px; }
  .hero-note { display: none; }
  .scroll-cue { display: none; }
  .ctl input { width: 64px; }
  .iphone { width: 44vw; }
  .iphone-b { margin-top: 56px; }
  .font-type p { font-size: 15px; }
  .btn-big { --h: 62px; padding: 0 30px; font-size: 18px; }
}

@media print {
  .nav, .foot, .toc, .grain, .margin, .cursor-dot, .skip, .legal-top, .trail { display: none !important; }
  html, body { background: #fff; }
  .legal { padding: 0; }
  .legal-grid { display: block; margin-top: 24px; }
  .legal-body { max-width: none; color: #000; }
  .legal-body .table-wrap { overflow: visible; box-shadow: none; }
  .legal-body table { min-width: 0; }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: .001ms !important; animation-iteration-count: 1 !important; transition-duration: .001ms !important; scroll-behavior: auto !important; }
  .pre { display: none; }
  .sheet { transform: none; }
}
