/* 모듈 1 웹선 — 지상 승강장 · 역 안내 표지판 (밝은 미색 + 코랄 + 노란 안전선) */
:root {
  --bg: #FAF7F2;
  --paper: #FFFFFF;
  --ink: #22262E;
  --muted: #555B67;
  --coral: #E4572E;
  --coral-dk: #A9381A;
  --coral-pale: #FCE6DE;
  --yellow: #F2C230;
  --opus: #1F3A68;
  --sonnet: #D9A21B;
  --green: #1E7A4C;
  --rail: #CFC8BC;
}
* { box-sizing: border-box; }
a { overflow-wrap: anywhere; }
html { -webkit-text-size-adjust: 100%; }
body { margin: 0; background: var(--bg); color: var(--ink); font-family: "Pretendard Variable", Pretendard, system-ui, sans-serif; font-weight: 500; line-height: 1.65; font-size: 16px; overflow-x: hidden; }
a { color: var(--coral-dk); }
code { font-family: ui-monospace, Consolas, monospace; font-size: .88em; background: #F1EBE2; padding: 1px 5px; border-radius: 4px; word-break: break-all; }
strong { font-weight: 800; }
.skip { position: absolute; left: -9999px; }
.skip:focus { left: 12px; top: 12px; background: var(--ink); color: #fff; padding: 8px 12px; z-index: 9; }
:focus-visible { outline: 3px solid var(--coral-dk); outline-offset: 2px; }

.btn { display: inline-flex; align-items: center; justify-content: center; min-height: 44px; padding: 8px 16px; border-radius: 4px; font: inherit; font-weight: 800; text-decoration: none; cursor: pointer; border: 2px solid transparent; }
.btn-coral { background: var(--coral-dk); color: #fff; }
.btn-coral:hover { background: #8E2D12; }
.btn-line { background: var(--paper); color: var(--ink); border-color: var(--ink); }
.btn-line:hover { background: var(--coral-pale); }
.btn-sm { min-height: 38px; padding: 6px 12px; font-size: 14px; }

/* 노란 안전선 */
.stripe { height: 18px; background: repeating-linear-gradient(-45deg, var(--yellow) 0 18px, #2A2A2A 18px 26px); }
.stripe-thin { height: 10px; margin: 0 0 18px; border-radius: 0 0 4px 4px; }

/* 승강장 지붕 */
.canopy { background: var(--paper); border-bottom: 1px solid var(--rail); }
.canopy-band { background: var(--ink); color: #fff; padding: 10px 16px; display: flex; flex-wrap: wrap; gap: 10px; align-items: center; justify-content: space-between; }
.canopy-line { margin: 0; font-weight: 800; display: flex; align-items: center; gap: 8px; }
.roundel { width: 34px; height: 34px; border-radius: 50%; background: var(--coral-dk); color: #fff; display: inline-grid; place-items: center; font-weight: 900; border: 3px solid #fff; }
.canopy-links { display: flex; flex-wrap: wrap; gap: 8px; }
.canopy-links .btn-line { background: transparent; color: #fff; border-color: #fff; }
.canopy-links .btn-line:hover { background: #ffffff22; }
.canopy-body { max-width: 1120px; margin: 0 auto; padding: 26px 16px 22px; }
.kicker { margin: 0; color: var(--muted); font-weight: 700; }
.canopy-body h1 { margin: 6px 0 8px; font-size: clamp(28px, 5.4vw, 50px); line-height: 1.2; font-weight: 900; letter-spacing: -.02em; }
.unit { margin: 0; display: inline-block; background: var(--coral-pale); color: var(--coral-dk); padding: 4px 12px; border-radius: 4px; font-weight: 800; }

main { max-width: 1120px; margin: 0 auto; padding: 0 16px; }
.plate-h { font-size: 21px; font-weight: 900; margin: 0 0 12px; display: flex; flex-wrap: wrap; align-items: baseline; gap: 4px 10px; }
.plate-h small { font-size: 14px; font-weight: 600; color: var(--muted); }

/* 지난 이야기 게시판 */
.recap { display: grid; grid-template-columns: minmax(0, 1fr) 320px; gap: 16px; margin: 26px 0; }
.recap-board { background: var(--paper); border: 2px solid var(--ink); padding: 16px 18px; position: relative; }
.recap-board::before, .recap-board::after { content: ""; position: absolute; top: 8px; width: 10px; height: 10px; border-radius: 50%; background: var(--coral); }
.recap-board::before { left: 8px; } .recap-board::after { right: 8px; }
.recap-board h2 { margin: 0 0 6px; font-size: 18px; }
.recap-board h2 span { color: var(--muted); font-weight: 600; }
.recap-board p { margin: 0 0 8px; }
.recap-prev { font-weight: 800; }
.recap-map { background: var(--paper); border: 1px solid var(--rail); padding: 12px; color: var(--ink); }
.recap-map-label { margin: 0 0 4px; font-size: 13px; color: var(--muted); font-weight: 700; }
.minimap { width: 100%; }

/* 키오스크 */
.kiosk { margin: 26px 0; background: var(--paper); border: 1px solid var(--rail); border-top: 6px solid var(--coral); padding: 16px; }
.kiosk-row { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 10px; margin-bottom: 12px; }
.kiosk-wide { grid-column: 1 / -1; }
.kiosk label { display: flex; flex-direction: column; gap: 4px; min-width: 0; font-size: 14px; font-weight: 800; }
.kiosk input, .noticeboard input, textarea { width: 100%; min-width: 0; font: inherit; font-size: 16px; padding: 10px 12px; border: 2px solid var(--ink); border-radius: 4px; background: #fff; color: var(--ink); }
textarea { resize: vertical; font-size: 15px; }
.kiosk input:focus, .noticeboard input:focus, textarea:focus { outline: none; border-color: var(--coral-dk); box-shadow: 0 0 0 3px var(--coral-pale); }

/* 노선도 */
.tracks { margin: 26px 0 10px; }
.tracks-head { display: flex; justify-content: space-between; gap: 8px; flex-wrap: wrap; align-items: baseline; }
.stamp-count { margin: 0; font-weight: 900; color: var(--coral-dk); }
.route { overflow-x: auto; background: var(--paper); border: 1px solid var(--rail); padding: 10px 6px 6px; -webkit-overflow-scrolling: touch; }
.route-list { list-style: none; margin: 0; padding: 0; display: flex; min-width: max-content; position: relative; }
.route-list::before { content: ""; position: absolute; left: 50px; right: 50px; top: 25px; height: 10px; background: var(--coral); }
.route-item.is-optional .stn-dot { border-style: dashed; }
.stn { position: relative; width: 100px; display: flex; flex-direction: column; align-items: center; gap: 4px; background: none; border: 0; font: inherit; color: var(--ink); cursor: pointer; padding: 6px 2px; }
.stn-dot { width: 32px; height: 32px; border-radius: 50%; background: #fff; border: 5px solid var(--ink); }
.stn-id { font-weight: 900; font-size: 15px; }
.stn-name { font-size: 12.5px; line-height: 1.35; text-align: center; color: var(--muted); }
.stn.is-stamped .stn-dot { background: var(--coral-dk); border-color: var(--ink); }
.stn.is-stamped .stn-dot::after { content: "✓"; color: #fff; font-weight: 900; font-size: 15px; display: grid; place-items: center; height: 100%; }
.stn.is-current .stn-dot { transform: scale(1.25); box-shadow: 0 0 0 4px var(--yellow); }
.stn.is-current .stn-name { color: var(--ink); font-weight: 800; }
.files-all { margin: 8px 0 0; font-size: 14px; }
.files-all a { font-weight: 800; }

/* 승강장 = 역 하나 */
.platform { margin: 18px 0 34px; outline: none; }
.sign { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 2.2fr) minmax(0, 1fr); background: var(--paper); border: 3px solid var(--ink); }
.sign-side { display: flex; align-items: center; padding: 10px; background: #F4F0EA; }
.sign-next { justify-content: flex-end; text-align: right; }
.sign-side button { background: none; border: 0; font: inherit; font-weight: 800; color: var(--ink); cursor: pointer; text-align: inherit; padding: 6px; min-height: 44px; }
.sign-side button:hover { color: var(--coral-dk); text-decoration: underline; }
.sign-end { font-size: 14px; color: var(--muted); font-weight: 700; }
.sign-main { text-align: center; padding: 18px 12px 12px; }
.sign-roundel { display: inline-grid; place-items: center; min-width: 64px; height: 64px; padding: 0 10px; border-radius: 32px; background: var(--coral); color: #fff; font-size: 26px; font-weight: 900; border: 4px solid var(--ink); }
.sign-name { margin: 10px 0 4px; font-size: clamp(22px, 3.6vw, 34px); font-weight: 900; line-height: 1.25; }
.sign-sub { margin: 0; color: var(--muted); font-size: 14px; }
.opt { color: var(--coral-dk); }
.sign-band { grid-column: 1 / -1; display: flex; justify-content: space-between; background: var(--coral); color: #1A0D08; font-weight: 900; padding: 6px 14px; }

.pf-grid { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1.25fr); gap: 20px; }
.scene { border-left: 6px solid var(--coral); background: var(--paper); padding: 10px 14px; margin-bottom: 14px; }
.scene p { margin: 0; }
.scene span { display: block; font-size: 12px; font-weight: 900; letter-spacing: .05em; color: var(--muted); }
.scene-prev { color: var(--muted); padding-bottom: 8px; border-bottom: 1px dashed var(--rail); margin-bottom: 8px !important; }
.scene-now span { color: var(--coral-dk); }
.scene-now { font-weight: 700; }
.facts { margin: 0 0 12px; display: grid; grid-template-columns: 92px minmax(0, 1fr); gap: 6px 10px; }
.facts dt { font-weight: 900; font-size: 14px; padding-top: 2px; }
.facts dd { margin: 0; }
mark.feat { background: linear-gradient(transparent 55%, #F9D86A 55%); color: inherit; font-weight: 800; padding: 0 2px; }
.files { list-style: none; margin: 0 0 12px; padding: 0; display: grid; gap: 6px; }
.file { display: flex; flex-direction: column; padding: 10px 12px; background: var(--paper); border: 2px solid var(--ink); border-left: 10px solid var(--coral); text-decoration: none; color: var(--ink); }
.file:hover { background: var(--coral-pale); }
.file-label { font-weight: 800; }
.file-label::before { content: "↓ "; color: var(--coral-dk); font-weight: 900; }
.file-name { font-size: 12px; color: var(--muted); word-break: break-all; }
.pf-intro, .pf-extra { background: #FFF8E6; border: 1px solid #E9D9A8; padding: 8px 14px; margin-bottom: 12px; }
.pf-extra h3 { margin: 6px 0 4px; font-size: 16px; }
.note { border-left: 4px solid var(--yellow); padding: 0 10px; }
.note p { margin: 4px 0; }
.steps { background: var(--paper); border: 1px solid var(--rail); padding: 0 14px; margin-bottom: 12px; }
.steps summary { cursor: pointer; font-weight: 800; padding: 10px 0; min-height: 44px; }
ul, ol { padding-left: 22px; }

.stamp { display: flex; align-items: center; gap: 12px; width: 100%; min-height: 56px; background: var(--paper); border: 2px dashed var(--ink); padding: 8px 12px; font: inherit; font-weight: 800; cursor: pointer; color: var(--ink); }
.stamp-ring { width: 46px; height: 46px; border-radius: 50%; border: 3px solid var(--rail); color: var(--muted); display: grid; place-items: center; font-weight: 900; transform: rotate(-12deg); flex: none; }
.stamp.is-on { border-style: solid; background: var(--coral-pale); }
.stamp.is-on .stamp-ring { border-color: var(--coral-dk); color: var(--coral-dk); }

.prompt { background: var(--paper); border: 2px solid var(--ink); margin-bottom: 14px; }
.prompt-bar { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; background: var(--ink); color: #fff; padding: 6px 6px 6px 12px; }
.prompt-tag { font-weight: 800; font-size: 14px; margin-right: auto; }
.copy-btn, .keep-btn, .del-btn { min-height: 40px; padding: 6px 14px; border-radius: 4px; border: 2px solid #fff; font: inherit; font-weight: 800; cursor: pointer; font-size: 14px; }
.copy-btn { background: var(--yellow); color: #1C1A12; border-color: var(--yellow); }
.copy-btn.is-done { background: #9BE3B9; border-color: #9BE3B9; }
.keep-btn, .del-btn { background: transparent; color: #fff; }
.keep-btn:hover, .del-btn:hover { background: #ffffff22; }
.prompt-text { margin: 0; padding: 14px; white-space: pre-wrap; word-break: break-word; font-family: inherit; font-size: 15px; line-height: 1.75; }
.ph { background: #FFE4D9; color: var(--coral-dk); font-weight: 800; padding: 0 3px; border-bottom: 2px solid var(--coral); }
.ph.is-filled { background: #DFF3E6; color: var(--green); border-bottom-color: var(--green); }
.ph-free { background: #F1EBE2; color: var(--ink); border-bottom: 2px dotted var(--ink); }

.mbadge { display: inline-block; font-size: 12px; font-weight: 900; padding: 2px 10px; border-radius: 3px; margin-right: 4px; }
.mbadge-opus { background: var(--opus); color: #fff; }
.mbadge-sonnet { background: var(--sonnet); color: #1C1A12; }
.mbadge-none { background: #E8E2D8; color: var(--ink); }

.plates { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 12px; margin-top: 18px; }
.plate { background: var(--paper); border: 2px solid var(--ink); padding: 0 14px 10px; min-width: 0; }
.plate h3 { margin: 0 -14px 8px; padding: 8px 14px; font-size: 16px; display: flex; align-items: center; gap: 8px; color: #fff; }
.plate h3 span { width: 26px; height: 26px; border-radius: 50%; background: #fff; display: grid; place-items: center; font-weight: 900; }
.plate-check h3 { background: var(--green); } .plate-check h3 span { color: var(--green); }
.plate-stuck h3 { background: var(--coral-dk); } .plate-stuck h3 span { color: var(--coral-dk); }
.plate-go h3 { background: var(--ink); } .plate-go h3 span { color: var(--ink); }
.plate ul { margin: 0; }
.w11-call { margin: 14px 0 0; }
.tbl { overflow-x: auto; }
.tbl table { border-collapse: collapse; }
.tbl td, .tbl th { border: 1px solid var(--rail); padding: 6px 8px; font-size: 14px; }

/* 지시문 모음 게시판 */
.noticeboard { margin: 34px 0; background: #EFE7DA; border: 3px solid var(--ink); padding: 16px; }
.nb-grid { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1.4fr); gap: 16px; }
.nb-form label { display: flex; flex-direction: column; gap: 4px; font-weight: 800; font-size: 14px; margin-bottom: 10px; }
.nb-actions { display: flex; gap: 8px; flex-wrap: wrap; }
.nb-list { list-style: none; margin: 0; padding: 0; display: grid; gap: 10px; max-height: 560px; overflow-y: auto; }
.nb-note .prompt { margin: 0; transform: rotate(-.3deg); box-shadow: 3px 3px 0 #0002; }
.nb-note:nth-child(even) .prompt { transform: rotate(.3deg); }
.nb-empty { color: var(--muted); padding: 20px; background: #fff8; border: 2px dashed var(--rail); }
.nb-diag { margin-top: 14px; background: var(--paper); border: 1px solid var(--rail); padding: 0 12px 12px; }
.nb-diag summary { cursor: pointer; font-weight: 800; padding: 10px 0; min-height: 44px; }
.save-msg { color: var(--green); font-size: 14px; font-weight: 700; min-height: 1em; }

.homework { margin: 34px 0; background: var(--paper); border: 1px solid var(--rail); border-left: 10px solid var(--yellow); padding: 16px; }
.homework p { margin: 6px 0; }
.chk { display: inline-flex; gap: 8px; align-items: flex-start; cursor: pointer; }
.chk input { width: 20px; height: 20px; margin-top: 3px; accent-color: var(--coral-dk); flex: none; }
.homework ul { list-style: none; padding-left: 0; }
.homework ul ul { padding-left: 28px; }
.homework li { margin: 6px 0; }

.safety-wall { margin: 34px 0; background: var(--ink); color: #fff; padding: 0 0 14px; }
.safety-wall h2 { margin: 0 0 8px; padding: 12px 16px; background: var(--yellow); color: #1C1A12; border-bottom: 12px solid transparent; border-image: repeating-linear-gradient(-45deg, var(--yellow) 0 12px, #2A2A2A 12px 20px) 12; }
.safety-wall ol { margin: 0; padding: 0 16px 0 40px; }
.safety-wall li { margin: 6px 0; }
.safety-wall strong { color: var(--yellow); }

.faq { margin: 34px 0; }
.faq-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; }
.qa { background: var(--paper); border: 2px solid var(--ink); padding: 0 14px; align-self: start; }
.qa summary { cursor: pointer; font-weight: 800; padding: 10px 0; min-height: 44px; display: flex; gap: 8px; align-items: center; }
.qa-n { width: 26px; height: 26px; border-radius: 50%; background: var(--coral-dk); color: #fff; display: inline-grid; place-items: center; font-size: 13px; flex: none; }
.qa p { margin: 0 0 12px; }
.foot p { text-align: center; padding: 18px 16px 34px; margin: 0; color: var(--muted); font-size: 14px; }

@media (max-width: 860px) {
  .recap, .pf-grid, .nb-grid { grid-template-columns: minmax(0, 1fr); }
  .plates, .faq-grid { grid-template-columns: minmax(0, 1fr); }
  .sign { grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); }
  .sign-main { grid-column: 1 / -1; grid-row: 1; }
}
@media (max-width: 600px) {
  .kiosk-row { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .facts { grid-template-columns: minmax(0, 1fr); }
  .facts dd { margin-bottom: 6px; }
  .sign-side button, .sign-end { font-size: 13px; }
}
