:root {
  --bg: #f6f6f3; --card: #ffffff; --ink: #1d1d1b; --muted: #6a6a66; --line: #e3e2dd;
  --accent: #c4302b; --accent-ink: #ffffff; --accent-soft: #fbeceb;
  --ok: #2e7d32; --warn: #a15c00; --err: #c62828; --warn-soft: #fff4e5; --ok-soft: #edf7ee;
  --radius: 10px;
  --font: "Pretendard", "Apple SD Gothic Neo", "Malgun Gothic", "Hiragino Sans", "Yu Gothic", "Microsoft JhengHei", "PingFang TC", system-ui, sans-serif;
}
@media (prefers-color-scheme: dark) {
  :root {
    --bg: #161615; --card: #1f1f1d; --ink: #ecebe6; --muted: #a3a29c; --line: #34332f;
    --accent: #e0544e; --accent-soft: #3a2221; --warn-soft: #3a2d17; --ok-soft: #1e3020;
  }
}
* { box-sizing: border-box; }
html, body { margin: 0; }
body { background: var(--bg); color: var(--ink); font-family: var(--font); font-size: 15px; line-height: 1.6; }
a { color: var(--accent); }
h1, h2, h3 { line-height: 1.3; margin: 0 0 8px; }
h2 { font-size: 18px; } h3 { font-size: 15px; }
p { margin: 0 0 10px; }
.muted { color: var(--muted); } .small { font-size: 13px; }
.sr { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); }

.top { display: flex; align-items: center; gap: 16px; padding: 12px 24px; border-bottom: 1px solid var(--line); background: var(--card); position: sticky; top: 0; z-index: 5; }
.brand { display: flex; align-items: center; gap: 8px; font-weight: 700; color: var(--ink); text-decoration: none; font-size: 17px; }
.logo { width: 22px; height: 22px; border-radius: 5px; background: var(--accent) linear-gradient(var(--accent-ink), var(--accent-ink)) no-repeat; background-size: 12px 2px; background-position: 5px 7px; box-shadow: inset 5px 11px 0 -5px transparent; position: relative; }
.logo::after { content: ""; position: absolute; left: 5px; top: 11px; width: 12px; height: 2px; background: var(--accent-ink); box-shadow: 0 4px 0 -0px var(--accent-ink); }
.nav { flex: 1; } .nav a { color: var(--muted); text-decoration: none; } .nav a:hover { color: var(--ink); }
.lang-switch { color: var(--muted); text-decoration: none; font-size: 14px; padding: 4px 10px; border: 1px solid var(--line); border-radius: 8px; white-space: nowrap; }
.lang-switch:hover { color: var(--ink); border-color: var(--muted); }
.nav a { white-space: nowrap; }
:lang(ko) { word-break: keep-all; overflow-wrap: anywhere; }
@media (max-width: 520px) {
  .top { flex-wrap: wrap; gap: 8px 10px; }
  .brand { font-size: 15px; margin-right: auto; }
  .top .nav { order: 5; flex-basis: 100%; font-size: 14px; }
  .top .btn.small { padding: 4px 8px; }
}
.lang select { font: inherit; padding: 4px 8px; border-radius: 8px; border: 1px solid var(--line); background: var(--card); color: var(--ink); }

.layout { display: grid; grid-template-columns: minmax(0, 1fr) 300px; gap: 20px; max-width: 1120px; margin: 24px auto; padding: 0 16px; }
@media (max-width: 860px) { .layout { grid-template-columns: 1fr; } .top { padding: 12px 16px; } }
.card { background: var(--card); border: 1px solid var(--line); border-radius: var(--radius); padding: 18px 20px; margin-bottom: 16px; }
.card.notice { border-color: var(--accent); background: var(--accent-soft); }
.card.ok { border-color: var(--ok); background: var(--ok-soft); }
.card.warn { border-color: var(--warn); background: var(--warn-soft); }
.row { display: flex; gap: 8px; flex-wrap: wrap; align-items: center; }
.row.end { justify-content: flex-end; margin-top: 8px; }
.row.between { justify-content: space-between; margin: 6px 0; }

textarea { width: 100%; font: 14px/1.5 ui-monospace, SFMono-Regular, Menlo, Consolas, monospace; padding: 10px 12px; border: 1px solid var(--line); border-radius: 8px; background: var(--bg); color: var(--ink); resize: vertical; }
textarea:focus { outline: 2px solid var(--accent); outline-offset: 1px; }
.check { display: flex; align-items: center; gap: 8px; margin: 8px 0; font-size: 14px; }

.btn { font: inherit; font-size: 14px; padding: 8px 16px; border-radius: 8px; border: 1px solid var(--line); background: var(--card); color: var(--ink); cursor: pointer; text-decoration: none; display: inline-block; }
.btn:hover { border-color: var(--muted); }
.btn.primary { background: var(--accent); border-color: var(--accent); color: var(--accent-ink); font-weight: 600; }
.btn.ghost { background: transparent; }
.btn.small { padding: 4px 10px; font-size: 13px; }
.btn:disabled { opacity: .5; cursor: not-allowed; }
.btn.disabled { opacity: .5; cursor: not-allowed; pointer-events: none; }
.pending-note { margin-top: 10px; font-weight: 600; }

.progress { height: 10px; background: var(--line); border-radius: 99px; overflow: hidden; margin: 12px 0 8px; }
#bar { height: 100%; width: 0; background: var(--accent); transition: width .4s; }
#bar.indeterminate { width: 30%; animation: slide 1.4s infinite ease-in-out; }
@keyframes slide { 0% { margin-left: -30%; } 100% { margin-left: 100%; } }
.now { font-weight: 600; margin: 4px 0; overflow-wrap: anywhere; }
.banner { border: 1px solid var(--warn); background: var(--warn-soft); border-radius: 8px; padding: 12px 14px; margin: 10px 0; }
.logbox summary { cursor: pointer; color: var(--muted); font-size: 13px; margin-top: 8px; }
.log { list-style: none; padding: 0; margin: 8px 0 0; max-height: 240px; overflow: auto; font: 12.5px/1.5 ui-monospace, Menlo, Consolas, monospace; }
.log li.ok { color: var(--ok); } .log li.warn { color: var(--warn); } .log li.error { color: var(--err); }

.exports { display: flex; flex-wrap: wrap; gap: 8px; margin: 10px 0 12px; }
.results { list-style: none; padding: 0; margin: 0; max-height: 360px; overflow: auto; border-top: 1px solid var(--line); }
.results li { padding: 6px 0; border-bottom: 1px solid var(--line); overflow-wrap: anywhere; }
.results li.fail a { color: var(--err); }
.related { background: var(--bg); border-radius: 8px; padding: 8px 12px; }

.history { list-style: none; padding: 0; margin: 0; }
.history li { display: flex; flex-direction: column; align-items: flex-start; gap: 6px; padding: 10px 0; border-bottom: 1px solid var(--line); }
.h-info { min-width: 0; overflow-wrap: anywhere; }

.links, .tips { padding-left: 18px; margin: 0; } .links li, .tips li { margin: 4px 0; font-size: 14px; }
.video { position: relative; padding-top: 56.25%; border-radius: 8px; overflow: hidden; margin-bottom: 8px; background: #000; }
.video iframe { position: absolute; inset: 0; width: 100%; height: 100%; border: 0; }

dialog { border: 1px solid var(--line); border-radius: 12px; background: var(--card); color: var(--ink); max-width: 640px; width: calc(100% - 32px); padding: 22px 24px; }
dialog::backdrop { background: rgba(0,0,0,.45); }
.notice-list { padding-left: 18px; } .notice-list li { margin: 6px 0; }

.foot { max-width: 1120px; margin: 0 auto 32px; padding: 0 16px; color: var(--muted); font-size: 13px; display: flex; gap: 16px; flex-wrap: wrap; }

/* 홈·가이드 글 */
.article { max-width: 760px; margin: 32px auto; padding: 0 16px; }
.article h1 { font-size: 30px; margin-bottom: 12px; }
.article h2 { font-size: 21px; margin-top: 28px; }
.article p, .article li { font-size: 16px; }
.hero { padding: 28px 24px; background: var(--card); border: 1px solid var(--line); border-radius: 14px; margin-bottom: 24px; }
.hero .btn { margin-top: 8px; }
.ad-slot { margin: 24px 0; min-height: 0; }
.steps { counter-reset: s; list-style: none; padding: 0; }
.steps li { counter-increment: s; padding-left: 40px; position: relative; margin: 12px 0; }
.steps li::before { content: counter(s); position: absolute; left: 0; top: 0; width: 28px; height: 28px; border-radius: 50%; background: var(--accent); color: var(--accent-ink); display: grid; place-items: center; font-weight: 700; font-size: 14px; }

.field { display: flex; align-items: center; gap: 10px; margin: 10px 0 2px; font-size: 14px; flex-wrap: wrap; }
.field select { font: inherit; padding: 6px 10px; border-radius: 8px; border: 1px solid var(--line); background: var(--card); color: var(--ink); }
.ts-switch { display: flex; gap: 16px; align-items: center; flex-wrap: wrap; margin: 12px 0 4px; padding: 10px 12px; background: var(--bg); border-radius: 8px; font-size: 14px; }
.ts-switch > span { font-weight: 600; }
.ts-switch label { display: flex; align-items: center; gap: 6px; cursor: pointer; }

.addr-guide { background: var(--bg); border-radius: 8px; padding: 10px 14px; margin: 8px 0 4px; font-size: 13.5px; }
.addr-title { font-weight: 600; margin: 0 0 6px; }
.addr-kinds { list-style: none; padding: 0; margin: 0 0 8px; display: grid; gap: 6px; }
.addr-kinds li { display: grid; grid-template-columns: 6.5em 1fr; gap: 2px 10px; }
.addr-kinds b { grid-row: span 2; }
.addr-kinds code { font: 12.5px ui-monospace, Menlo, Consolas, monospace; color: var(--muted); overflow-wrap: anywhere; }
.addr-notes { margin: 0; padding-left: 18px; color: var(--muted); }
.addr-notes li { margin: 2px 0; }
@media (max-width: 560px) { .addr-kinds li { grid-template-columns: 1fr; } .addr-kinds b { grid-row: auto; } }
