/* 텍스버스 소개 사이트 — ‘원고지와 잉크’ (앱과 같은 색·글꼴). 상자는 선 대신 종이 두께로, 강조는 교정 표시로. */
:root {
  --paper: #DDE5DE; --slip: #EAEFEA; --deep: #CFDAD2; --ink: #10241F; --muted: #4A5F57; --line: #B9C9BF;
  --grid: #3E8E6A; --grid-text: #2B6B4E; --brass: #A07418; --warn: #8A4B14;
  --night: #10241F; --night-ink: #DDE5DE; --night-muted: #9DB3A8; --night-line: #1C3A31; --night-accent: #8FD3B4; --night-brass: #D9B65A;
  --serif: 'Hahmlet', 'Noto Serif KR', serif; --sans: 'IBM Plex Sans KR', system-ui, sans-serif;
}
@media (prefers-color-scheme: dark) {
  :root { --paper: #10241F; --slip: #17322B; --deep: #22403A; --ink: #DDE5DE; --muted: #9DB3A8; --line: #2C4A40; --grid-text: #8FD3B4; --brass: #D9B65A; --warn: #E7B98A; --night: #0B1A16; }
}
* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body { margin: 0; background: var(--paper); color: var(--ink); font: 400 16px/1.7 var(--sans); word-break: keep-all; }
a { color: inherit; }
a:focus-visible, button:focus-visible, input:focus-visible, summary:focus-visible { outline: 2px solid var(--grid); outline-offset: 3px; }
.wrap { width: min(1080px, 100% - 40px); margin: 0 auto; }
.narrow { width: min(720px, 100% - 40px); margin: 0 auto; }
.serif { font-family: var(--serif); }
.muted { color: var(--muted); }

/* 머리띠 */
.top { display: flex; align-items: center; justify-content: space-between; gap: 16px; padding: 18px 0; }
.logo { font: 900 22px/1 var(--serif); letter-spacing: -0.5px; text-decoration: none; }
.top nav { display: flex; align-items: center; gap: 22px; font-size: 15px; }
.top nav a { text-decoration: none; }
.top nav a:hover { text-decoration: underline; text-underline-offset: 4px; }
@media (max-width: 640px) { .top nav .hide-sm { display: none; } }

/* 버튼: 주요 = 잉크, 보통 = 짙은 종이 */
.btn { display: inline-flex; align-items: center; justify-content: center; min-height: 48px; padding: 0 22px; font: 700 15px/1 var(--sans); text-decoration: none; border: 0; cursor: pointer; background: var(--deep); color: var(--ink); }
.btn.ink { background: var(--ink); color: var(--paper); }
.btn:hover { filter: brightness(0.94); }
.btn.small { min-height: 40px; padding: 0 16px; font-size: 14px; }

/* 첫 화면: 노선도 (사이트에서 가장 큰 한 가지) */
.hero { padding: 28px 0 8px; }
.hero h1 { margin: 0; }
/* 원고지 제목 (앱과 같은 모양): 초록 칸, 한 칸에 한 글자, Hahmlet 가장 굵게 */
.ms-row { display: grid; grid-template-columns: repeat(var(--n), 1fr); border-top: 1.5px solid var(--grid); border-left: 1.5px solid var(--grid); width: min(100%, calc(var(--n) * 76px)); }
.ms-row span { aspect-ratio: 1; display: grid; place-items: center; border-right: 1px solid var(--grid); border-bottom: 1.5px solid var(--grid); font: 900 clamp(26px, 4.2vw, 46px)/1 var(--serif); color: var(--ink); }
.ms-row span:nth-child(var(--n)) { border-right-width: 1.5px; }
.ms-phone { display: none; }
@media (max-width: 700px) { .ms-desk { display: none; } .ms-phone { display: grid; } .ms-row span { font-size: clamp(24px, 8vw, 34px); } }
.hero .lead { font: 400 18px/1.75 var(--serif); max-width: 32em; margin: 18px 0 0; }
.map { margin: 28px 0 0; }
.map svg { display: block; width: 100%; height: auto; overflow: visible; }
.map .map-phone { display: none; }
@media (max-width: 700px) { .map .map-desk { display: none; } .map .map-phone { display: block; } }
.st { cursor: pointer; }
.st:focus { outline: none; }
.st circle { fill: var(--paper); stroke: var(--c); stroke-width: 6; transition: r .15s; }
.st:hover circle, .st:focus-visible circle { stroke-width: 9; }
.st.on circle { fill: var(--c); }
.st .n { font: 700 17px var(--serif); fill: var(--ink); }
.st .s { font: 400 12px var(--sans); fill: var(--muted); }
.st.on .n { text-decoration: underline; text-underline-offset: 5px; }
@media (prefers-color-scheme: dark) { .st[data-k="p"] circle { --c: #DDE5DE !important; } }

/* 역을 누르면 열리는 밤 원고지 (체험판) */
.night { background: #0E201B; color: #DDE5DE; padding: 40px 0 44px; margin-top: 36px;
  background-image: repeating-linear-gradient(transparent 0 39px, #1A362E 39px 40px); scroll-margin-top: 12px; }
.night-col { width: min(660px, 100% - 40px); margin: 0 auto; }
.night .where { font: 400 14px/40px var(--sans); color: #9DB3A8; }
.night .story { font: 400 clamp(20px, 3vw, 26px)/40px var(--serif); margin: 0 0 40px; min-height: 120px; }
.night .story:focus { outline: none; }
.night .ask { font-size: 13px; line-height: 40px; color: #9DB3A8; }
.night button.choice { display: flex; width: 100%; align-items: center; gap: 14px; min-height: 56px; padding: 0; background: none; border: 0; border-top: 1px solid #1F4037; color: #DDE5DE; font: 400 19px/1.4 var(--serif); text-align: left; cursor: pointer; }
.night button.choice::before { content: ''; width: 2px; height: 24px; background: #8FD3B4; flex: none; }
.night button.choice .meta { margin-left: auto; font: 400 12px/1 var(--sans); color: #8FD3B4; }
.night button.choice:hover { background: rgba(143, 211, 180, 0.06); }
.night .btn.ink { background: #8FD3B4; color: #0E201B; }
.night .btn:not(.ink) { background: transparent; color: #DDE5DE; box-shadow: inset 0 0 0 1px #2C4A40; }
.night .row { display: flex; gap: 8px; flex-wrap: wrap; margin-top: 8px; }
.roll { display: flex; gap: 12px; align-items: center; border: 1px solid #8FD3B4; padding: 10px 12px; margin-bottom: 20px; animation: ink .42s ease-out; }
.roll b { min-width: 48px; height: 48px; display: grid; place-items: center; border: 1.5px solid currentColor; font: 700 21px/1 var(--sans); }
.roll.good { color: #8FD3B4; } .roll.bad { color: #F0A8A0; border-color: #F0A8A0; }
.roll small { display: block; color: #9DB3A8; font-size: 12px; }
.relic { display: flex; align-items: center; gap: 16px; margin: 0 0 18px; color: #D9B65A; animation: ink .5s ease-out; }
.relic .seal { width: 62px; height: 62px; border: 3px double #D9B65A; display: grid; grid-template-columns: 1fr 1fr; place-items: center; font: 900 17px/1 var(--serif); transform: rotate(-6deg); padding: 6px; flex: none; }
.relic small { color: #C9B27A; }
@keyframes ink { from { opacity: 0; transform: scale(1.08); } to { opacity: 1; transform: none; } }
@media (prefers-reduced-motion: reduce) { .roll, .relic { animation: none; } .st circle { transition: none; } }

/* 구역 */
section { padding: 72px 0; }
section h2 { font: 700 30px/1.3 var(--serif); margin: 0 0 10px; letter-spacing: -0.4px; }

/* 읽는다 · 쓴다 · 가져온다: 세 줄 나란히 */
.what .verbs { display: grid; grid-template-columns: repeat(3, 1fr); gap: 40px; margin-bottom: 36px; }
.verb h2 { font: 900 38px/1.1 var(--serif); margin: 0 0 14px; }
.verb p { margin: 0; }
@media (max-width: 800px) { .what .verbs { grid-template-columns: 1fr; gap: 28px; } }

/* 작가가 되는 길: 노선 한 줄 */
.authors { background: var(--slip); }
.authors .intro { max-width: 34em; margin: 0 0 36px; }
.route { list-style: none; margin: 0 0 36px; padding: 0; display: grid; grid-template-columns: repeat(4, 1fr); position: relative; }
.route::before { content: ''; position: absolute; left: 13px; right: calc(25% - 16px); top: 11px; height: 8px; background: var(--ink); }
.route li { position: relative; padding: 46px 20px 0 0; }
.route li::before { content: ''; position: absolute; left: 0; top: 0; width: 18px; height: 18px; border: 6px solid var(--ink); background: var(--slip); border-radius: 50%; }
.route li:last-child::before { background: var(--ink); }
.route b { display: block; font: 700 19px/1.3 var(--serif); margin-bottom: 6px; }
.route span { font-size: 15px; color: var(--muted); }
@media (max-width: 760px) {
  .route { grid-template-columns: 1fr; gap: 26px; }
  .route::before { left: 11px; right: auto; top: 12px; bottom: 30px; width: 8px; height: auto; }
  .route li { padding: 0 0 0 48px; }
}
.authors .row { display: flex; gap: 22px; align-items: center; flex-wrap: wrap; }

/* 출시 알림 */
.notify-wrap { padding-bottom: 40px; }
.notify { display: grid; gap: 14px; max-width: 560px; }
.notify .muted { margin: 0; }
.notify h2 { margin: 0; font: 700 26px/1.3 var(--serif); }
.field { display: flex; gap: 10px; flex-wrap: wrap; }
.field input[type=email] { flex: 1 1 240px; min-height: 48px; border: 0; border-bottom: 1.5px solid var(--ink); background: transparent; font: 400 17px/1 var(--sans); color: var(--ink); padding: 0 2px; }
.check { display: flex; gap: 10px; align-items: flex-start; font-size: 14px; color: var(--muted); cursor: pointer; }
.check input { width: 18px; height: 18px; margin-top: 3px; accent-color: var(--ink); flex: none; }
.msg { font-size: 14px; min-height: 22px; margin: 0; }
.msg.err { color: var(--warn); } .msg.ok { color: var(--grid-text); }

/* 약관 같은 긴 글 */
.doc { padding: 24px 0 64px; }
.doc h1 { font: 700 30px/1.3 var(--serif); margin: 12px 0 16px; }
.doc h2 { font: 700 19px/1.4 var(--serif); margin: 36px 0 8px; }
.doc p, .doc li { font-size: 16px; }
.doc ul { padding-left: 20px; }
.doc .q { font-weight: 700; margin: 22px 0 4px; }

/* 바닥 */
footer { background: var(--deep); padding: 40px 0 48px; font-size: 13px; color: var(--muted); margin-top: 40px; }
footer .links { display: flex; flex-wrap: wrap; gap: 18px; font-size: 14px; color: var(--ink); margin-bottom: 16px; }
footer .links a { text-decoration: none; } footer .links a:hover { text-decoration: underline; }
footer p { margin: 2px 0; }
.sr { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); }
