:root {
	--bg: #141516; --panel: #1b1c1e; --panel-2: #222326; --fg: #e8e8ea; --muted: #8d9097; --line: #2c2e32; --line-strong: #3b3e44;
	--accent: #5b9bff; --accent-text: #0b1220; --live: #ff4d4d; --danger: #ff7d6b;
	--radius: 4px; --gap: 16px; --page-width: 1240px; color-scheme: dark;
}
@media (prefers-color-scheme: light) {
	:root:not([data-theme]) { --bg: #eceef1; --panel: #ffffff; --panel-2: #f4f5f7; --fg: #1a1b1e; --muted: #656a73; --line: #d9dce1; --line-strong: #bfc4cc; --accent: #1f6feb; --accent-text: #ffffff; --live: #d92d2d; --danger: #c62f1f; color-scheme: light; }
}
:root[data-theme="light"] { --bg: #eceef1; --panel: #ffffff; --panel-2: #f4f5f7; --fg: #1a1b1e; --muted: #656a73; --line: #d9dce1; --line-strong: #bfc4cc; --accent: #1f6feb; --accent-text: #ffffff; --live: #d92d2d; --danger: #c62f1f; color-scheme: light; }
:root[data-theme="dark"] { color-scheme: dark; }

* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body { margin: 0; background: var(--bg); color: var(--fg); font: 15px/1.6 "Noto Sans KR", Inter, -apple-system, "Segoe UI", "Malgun Gothic", sans-serif; -webkit-font-smoothing: antialiased; }
a { color: var(--accent); }
button, input, textarea { font: inherit; color: inherit; }
[hidden] { display: none !important; }
:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }

.menu { position: fixed; top: 10px; left: 10px; z-index: 30; display: flex; align-items: center; }
.menu-items { display: flex; align-items: center; animation: menu-in .18s ease-out; }
@keyframes menu-in { from { opacity: 0; transform: translateX(-8px); } to { opacity: 1; transform: none; } }
.menu-icon { width: 40px; height: 40px; display: grid; place-items: center; padding: 0; border: 0; background: none; color: var(--muted); cursor: pointer; text-decoration: none; }
.menu-icon:hover { color: var(--fg); }
.menu-toggle { color: var(--fg); }
.menu-icon[aria-current="page"] { color: var(--accent); }
.menu-items[hidden] { display: none; }

main.page { max-width: var(--page-width); margin: 0 auto; padding: 72px 16px 56px; }
.eng { color: var(--muted); font-weight: 400; font-size: 0.82em; margin-left: 6px; letter-spacing: 0.02em; text-transform: none; }

.panel { background: var(--panel); border: 1px solid var(--line); border-radius: var(--radius); }
.panel > h2, .panel-title { margin: 0; padding: 10px 14px; font-size: 12px; font-weight: 700; letter-spacing: 0.06em; text-transform: uppercase; color: var(--muted); border-bottom: 1px solid var(--line); }
.panel-body { padding: 14px; }
.hint { color: var(--muted); font-size: 12.5px; margin: 8px 0 0; }

.status-bar { display: flex; flex-wrap: wrap; align-items: center; gap: 6px 22px; padding: 10px 14px; margin-bottom: var(--gap); font-size: 13px; }
.status-bar .cell { display: flex; align-items: baseline; gap: 8px; }
.status-bar .cell small { color: var(--muted); font-size: 11.5px; letter-spacing: 0.06em; text-transform: uppercase; }
.status-bar .mono { font-family: ui-monospace, "SFMono-Regular", Menlo, Consolas, monospace; }
.tally { display: inline-flex; align-items: center; gap: 7px; font-weight: 700; font-size: 12.5px; letter-spacing: 0.08em; }
.tally i { width: 9px; height: 9px; border-radius: 50%; background: var(--muted); display: inline-block; }
.tally.on { color: var(--live); }
.tally.on i { background: var(--live); box-shadow: 0 0 0 3px color-mix(in srgb, var(--live) 25%, transparent); }
.status-bar .estimate { margin-left: auto; color: var(--muted); }

.shell { display: grid; grid-template-columns: 250px minmax(0, 1fr) 290px; gap: var(--gap); align-items: start; }
@media (max-width: 1080px) { .shell { grid-template-columns: minmax(0, 1fr) 280px; } .col-style { grid-column: 1 / -1; order: 3; } .col-center { order: 1; } .col-side { order: 2; } }
@media (max-width: 760px) { .shell { grid-template-columns: minmax(0, 1fr); } .col-center, .col-side, .col-style { grid-column: auto; } .col-center { order: 1; } .col-style { order: 2; } .col-side { order: 3; } }
.col-style, .col-side { display: grid; gap: var(--gap); }

.notice { margin: 0 0 var(--gap); padding: 12px 14px; border: 1px solid var(--line-strong); border-left: 3px solid var(--accent); background: var(--panel); border-radius: var(--radius); color: var(--fg); }

.stage { position: relative; aspect-ratio: 16 / 9; container-type: size; overflow: hidden; background: radial-gradient(120% 140% at 30% 20%, #3a4a66 0%, #1d2433 45%, #0d1018 100%); border-bottom: 1px solid var(--line); }
.stage::after { content: ""; position: absolute; inset: 0; background: repeating-linear-gradient(90deg, transparent 0, transparent calc(100% / 12 - 1px), rgba(255,255,255,0.025) calc(100% / 12 - 1px), rgba(255,255,255,0.025) calc(100% / 12)); pointer-events: none; }
.stage-msg { position: absolute; left: 50%; top: 50%; transform: translate(-50%, -50%); width: 32cqw; font-size: calc(100cqh / 22); line-height: 1.35; text-align: center; word-break: break-all; white-space: pre-wrap; z-index: 1; }
.stage-msg.is-empty { opacity: 0.55; }
.stage-msg .by { display: block; margin-top: 1.35em; }
.stage-tag { position: absolute; left: 10px; top: 8px; z-index: 2; font-size: 11px; letter-spacing: 0.08em; color: rgba(255,255,255,0.55); }

.field { margin: 0 0 18px; }
.field > label, .field > .label { display: block; font-size: 12px; font-weight: 700; letter-spacing: 0.06em; text-transform: uppercase; color: var(--muted); margin: 0 0 8px; }
.seg { display: flex; flex-wrap: wrap; gap: 6px; }
.seg button { border: 1px solid var(--line-strong); background: var(--panel-2); color: var(--fg); padding: 7px 14px; border-radius: var(--radius); cursor: pointer; }
.seg button:hover { border-color: var(--muted); }
.seg button[aria-pressed="true"] { background: var(--accent); border-color: var(--accent); color: var(--accent-text); font-weight: 700; }
textarea, input[type="text"] { width: 100%; background: var(--panel-2); border: 1px solid var(--line-strong); border-radius: var(--radius); padding: 11px 12px; }
textarea { min-height: 112px; resize: vertical; font-size: 17px; line-height: 1.55; }
textarea:focus, input[type="text"]:focus { outline: none; border-color: var(--accent); box-shadow: 0 0 0 3px color-mix(in srgb, var(--accent) 25%, transparent); }
.counter { text-align: right; color: var(--muted); font-size: 12px; margin-top: 4px; font-variant-numeric: tabular-nums; }
.consent { display: flex; gap: 10px; align-items: flex-start; margin: 0 0 16px; font-size: 13.5px; color: var(--fg); }
.consent input { margin-top: 3px; width: 16px; height: 16px; accent-color: var(--accent); flex: none; }
.send { width: 100%; padding: 13px 16px; border: 0; border-radius: var(--radius); background: var(--accent); color: var(--accent-text); font-weight: 800; font-size: 16px; cursor: pointer; }
.send:hover:not(:disabled) { filter: brightness(1.08); }
.send:disabled { opacity: 0.4; cursor: not-allowed; }
.status { margin-top: 10px; min-height: 1.5em; font-size: 14px; }
.status.error { color: var(--danger); }
.status .eng-line { color: var(--muted); font-size: 12.5px; }
.status.error .eng-line { color: var(--danger); opacity: 0.8; }
.ticket { margin-top: 14px; padding: 12px 14px; border: 1px solid var(--line-strong); border-left: 3px solid var(--accent); background: var(--panel-2); border-radius: var(--radius); }
.ticket h3 { margin: 0 0 4px; font-size: 15px; }
.ticket p { margin: 0; color: var(--muted); }

.style-list { display: grid; gap: 8px; padding: 12px; }
.style-item { display: block; width: 100%; text-align: left; border: 1px solid var(--line); background: var(--panel-2); border-radius: var(--radius); padding: 0; cursor: pointer; overflow: hidden; }
.style-item:hover { border-color: var(--muted); }
.style-item[aria-pressed="true"] { border-color: var(--accent); box-shadow: 0 0 0 1px var(--accent); }
.style-item .swatch { display: grid; place-items: center; height: 54px; background: radial-gradient(120% 140% at 30% 20%, #3a4a66 0%, #1d2433 55%, #0d1018 100%); font-size: 21px; line-height: 1.2; }
.style-item .swatch span { display: inline-block; }
.style-item .name { display: block; padding: 6px 10px; font-size: 12.5px; color: var(--muted); border-top: 1px solid var(--line); }
.style-item[aria-pressed="true"] .name { color: var(--fg); }

.rows { list-style: none; margin: 0; padding: 0; }
.rows li { padding: 10px 14px; border-bottom: 1px solid var(--line); word-break: break-word; }
.rows li:last-child { border-bottom: 0; }
.rows .meta { display: flex; justify-content: space-between; gap: 8px; font-size: 12px; color: var(--muted); margin-bottom: 2px; }
.rows .text { font-size: 15px; }
.rows .by { font-size: 12.5px; color: var(--muted); }
.badge { font-size: 11px; font-weight: 700; letter-spacing: 0.04em; padding: 1px 6px; border: 1px solid var(--line-strong); border-radius: 2px; color: var(--muted); white-space: nowrap; }
.badge.wait { color: var(--accent); border-color: var(--accent); }
.empty { color: var(--muted); padding: 14px; margin: 0; font-size: 14px; }
.link-btn { border: 0; background: none; color: var(--muted); text-decoration: underline; cursor: pointer; font-size: 12.5px; padding: 0; }
.link-btn:hover { color: var(--fg); }
.panel-foot { padding: 10px 14px; border-top: 1px solid var(--line); display: flex; flex-direction: column; gap: 6px; }

#home { min-height: calc(100vh - 150px); display: grid; align-items: center; }
.home-center { width: 100%; }
.hook { text-align: center; padding: 0 0 28px; }
.hook-ko { margin: 0; font-family: "Noto sans KR", serif; font-size: clamp(16px, 2vw, 22px); color: var(--muted); }
.hook-ko strong { font-weight: 800; font-size: clamp(26px, 3.6vw, 40px); color: var(--fg); letter-spacing: -0.02em; }
.hook-en { margin: 6px 0 0; font-family: "Playfair Display", Georgia, serif; font-style: italic; font-size: 14px; color: var(--muted); }
.live-list { list-style: none; margin: 0 auto; padding: 0; max-width: 640px; border-top: 1px solid var(--line); }
.live-list li { border-bottom: 1px solid var(--line); }
.live-item { display: flex; align-items: center; gap: 14px; padding: 16px 6px; color: var(--fg); text-decoration: none; font-size: 17px; }
a.live-item:hover { background: var(--panel); }
.live-item .dot { width: 9px; height: 9px; border-radius: 50%; background: var(--line-strong); flex: none; }
.live-item.is-on .dot { background: #2fbf5b; box-shadow: 0 0 8px rgba(47, 191, 91, 0.7); }
.live-item.is-off { color: var(--muted); cursor: default; }
.live-item .state { margin-left: auto; font-size: 12px; color: var(--muted); letter-spacing: 0.04em; }
.live-item.is-on .state { color: #2fbf5b; }
.doc .wall-list, .wall-list { list-style: none; margin: 18px 0 0; padding: 0; border-top: 1px solid var(--line); }
.wall-list li { padding: 14px 4px; border-bottom: 1px solid var(--line); }
.wall-body { margin: 0; font-size: 16px; line-height: 1.55; overflow-wrap: anywhere; }
.wall-by { margin: 2px 0 0; font-size: 13px; color: var(--muted); }

.doc { max-width: 780px; }
.doc h1 { margin: 12px 0 6px; font-size: 30px; letter-spacing: -0.02em; font-family: "Nanum Myeongjo", "Noto Serif KR", serif; font-weight: 800; }
.doc .lead { color: var(--muted); margin: 0 0 20px; }
.doc h2 { margin: 30px 0 8px; padding-top: 18px; border-top: 1px solid var(--line); font-size: 18px; }
.doc ul, .doc ol { padding-left: 22px; }
.doc li { margin-bottom: 5px; }
.doc table { width: 100%; border-collapse: collapse; margin: 8px 0; font-size: 14px; }
.doc th, .doc td { text-align: left; vertical-align: top; padding: 8px 10px; border: 1px solid var(--line); }
.doc th { background: var(--panel); color: var(--muted); font-weight: 600; width: 28%; }
.doc .updated { color: var(--muted); font-size: 13px; }
.seg button .eng, .style-item .name .eng { margin-left: 6px; font-size: 11.5px; opacity: 0.7; }
.seg button[aria-pressed="true"] .eng { color: inherit; opacity: 0.85; }
