/* 야코위키 문서 인터페이스 — 밴드 서스테인 내부 패러디 위키 */
:root {
  --bg: #fff; --surface: #fff; --text: #333; --text-sub: #777;
  --link: #0275d8; --link-red: #d9534f; --border: #d5d5d5;
  --border-strong: #aaa; --soft: #f5f5f5; --soft-2: #ececec;
  --nav-bg: #00a495; --nav-hover: rgba(0, 0, 0, .13);
  --infobox-head: #dceff1; --infobox-sub: #f5fbfb;
  --notice-bg: #fff8dd; --notice-border: #e7ce70; --table-head: #eee;
  --hl: #fff0b3; --shadow: 0 1px 2px rgba(0, 0, 0, .13);
}
:root[data-theme="dark"] {
  --bg: #202124; --surface: #27282b; --text: #dedede; --text-sub: #a9a9a9;
  --link: #70b8f0; --link-red: #ff7e78; --border: #4b4d51;
  --border-strong: #6b6d71; --soft: #2e3034; --soft-2: #393b3f;
  --nav-bg: #087c73; --nav-hover: rgba(0, 0, 0, .24);
  --infobox-head: #27565a; --infobox-sub: #293638;
  --notice-bg: #423a22; --notice-border: #746337; --table-head: #36383c;
  --hl: #594c22; --shadow: 0 1px 2px rgba(0, 0, 0, .35);
}
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --bg: #202124; --surface: #27282b; --text: #dedede; --text-sub: #a9a9a9;
    --link: #70b8f0; --link-red: #ff7e78; --border: #4b4d51;
    --border-strong: #6b6d71; --soft: #2e3034; --soft-2: #393b3f;
    --nav-bg: #087c73; --nav-hover: rgba(0,0,0,.24); --infobox-head: #27565a;
    --infobox-sub: #293638; --notice-bg: #423a22; --notice-border: #746337;
    --table-head: #36383c; --hl: #594c22; --shadow: 0 1px 2px rgba(0,0,0,.35);
  }
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0; background: var(--bg); color: var(--text);
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", "Apple SD Gothic Neo",
    "Malgun Gothic", "맑은 고딕", Arial, sans-serif;
  font-size: 14px; line-height: 1.65; word-break: keep-all; overflow-wrap: break-word;
}
a { color: var(--link); text-decoration: none; }
a:hover { text-decoration: underline; }
a.new { color: var(--link-red); }
button, input { font: inherit; }

/* ── 상단 바 ── */
.nav {
  position: sticky; top: 0; z-index: 50; display: flex; align-items: center;
  min-height: 56px; padding: 0 24px; gap: 6px; color: #fff; background: var(--nav-bg);
  box-shadow: 0 1px 3px rgba(0, 0, 0, .22);
}
.nav a { color: #fff; }
.nav > .nav-icon:first-child { display: none; }
.nav-icon, .nav button.theme {
  width: 36px; height: 56px; border: 0; padding: 0; display: grid; place-items: center;
  color: #fff; background: transparent; cursor: pointer; border-radius: 0; transition: background .15s;
}
.nav-icon:hover, .nav button.theme:hover { background: var(--nav-hover); text-decoration: none; }
.nav-icon svg { width: 18px; height: 18px; fill: currentColor; }
.nav .brand {
  width: 132px; height: 42px; overflow: hidden; flex: 0 0 132px;
  /* 원본 로고의 양끝이 잘리지 않도록 표시 영역에 여백을 둔다. */
}
.nav .brand-mark {
  display: block; width: 100%; height: 100%;
  background: url('/img/yakowiki.png') center / 190px auto no-repeat;
}
.nav .brand:hover { opacity: .88; text-decoration: none; }
.nav-search {
  position: relative; flex: 0 1 440px; max-width: 440px;
  margin-left: max(24px, calc(50vw - 382px));
}
.nav .search {
  width: 100%; height: 30px; border: 1px solid rgba(0, 0, 0, .18); border-radius: 2px;
  padding: 0 39px 0 10px; color: #333; background: #fff; font-size: 13px; outline: 0;
}
.nav .search:focus { box-shadow: 0 0 0 2px rgba(255,255,255,.38); }
.search-submit {
  position: absolute; right: 0; top: 0; width: 32px; height: 30px; border: 0;
  border-left: 1px solid #ddd; color: #555; background: #f7f7f7; cursor: pointer;
}
.search-submit svg { width: 15px; height: 15px; fill: currentColor; }
.nav .spacer { flex: 1; }
.nav button.theme { font-size: 16px; }

/* ── 문서 상단 ── */
.wrap { max-width: 1280px; margin: 0 auto; padding: 22px 22px 82px; }
.document-head { position: relative; border-bottom: 1px solid var(--border-strong); padding: 0 0 8px; margin-bottom: 6px; }
.title-area { padding-right: 174px; }
h1.doc-title { margin: 0; color: var(--text); font-size: 28px; line-height: 1.35; font-weight: 700; letter-spacing: -.7px; }
.doc-meta { margin: 3px 0 15px; color: var(--text-sub); font-size: 12px; }
.doc-tools { position: absolute; right: 0; bottom: 7px; display: flex; gap: 3px; }
.doc-tool {
  display: inline-flex; align-items: center; gap: 4px; min-height: 27px; padding: 3px 8px;
  border: 1px solid var(--border); border-radius: 2px; color: var(--text-sub); background: var(--soft); font-size: 12px;
}
.doc-tool:hover { background: var(--soft-2); color: var(--text); text-decoration: none; }
.doc-tool svg { width: 12px; height: 12px; fill: currentColor; }

/* ── 알림과 둘러보기 틀 ── */
.notice { border: 1px solid var(--notice-border); background: var(--notice-bg); padding: 9px 12px; font-size: 13px; margin: 0 0 14px; }
.notice strong { font-weight: 700; }
.navbox { border: 1px solid var(--border-strong); margin: 0 0 17px; font-size: 13px; background: var(--surface); }
.navbox summary { padding: 6px 12px; color: var(--text); background: var(--infobox-head); font-weight: 700; cursor: pointer; list-style: none; text-align: center; }
.navbox summary::-webkit-details-marker { display: none; }
.navbox summary::after { content: " [펼치기 · 접기]"; margin-left: 2px; color: var(--text-sub); font-size: 11px; font-weight: 400; }
.navbox[open] summary::after { content: " [접기]"; }
.navbox .nb-body { padding: 7px 12px; }
.navbox .nb-row { display: flex; gap: 9px; border-top: 1px solid var(--border); padding: 5px 0; }
.navbox .nb-row:first-child { border-top: 0; }
.navbox .nb-label { flex: 0 0 92px; color: var(--text-sub); font-weight: 700; }
.navbox .nb-val { flex: 1; }

/* ── 본문 요소 ── */
.infobox { float: right; width: 330px; margin: 0 0 18px 22px; border: 2px solid var(--border-strong); border-collapse: collapse; background: var(--surface); font-size: 13px; }
.infobox td, .infobox th { border: 1px solid var(--border); padding: 5px 8px; vertical-align: middle; }
.infobox .ib-title { padding: 8px 6px; background: var(--infobox-head); color: var(--text); text-align: center; font-size: 16px; font-weight: 700; }
.infobox .ib-title .sub { display: block; margin-top: 1px; color: var(--text-sub); font-size: 11px; font-weight: 400; }
.infobox .ib-img { padding: 0; text-align: center; }
.infobox .ib-img img { display: block; width: 100%; }
.infobox .ib-caption { padding: 4px 5px; color: var(--text-sub); background: var(--infobox-sub); text-align: center; font-size: 11px; }
.infobox th { width: 88px; background: var(--infobox-sub); text-align: center; font-weight: 700; white-space: nowrap; }
.infobox .ib-section { background: var(--infobox-head); text-align: center; font-size: 13px; font-weight: 700; }
.toc { display: inline-block; min-width: 270px; margin: 5px 0 23px; padding: 9px 18px 9px 12px; border: 1px solid var(--border-strong); background: var(--surface); font-size: 13px; box-shadow: var(--shadow); }
.toc .toc-head { margin-bottom: 4px; font-weight: 700; }
.toc ul { margin: 0; padding: 0; list-style: none; }
.toc ul ul { padding-left: 17px; }
.toc li { margin: 1px 0; }
.toc .num, h2.sec .num, h3.sec .num { margin-right: 4px; color: var(--text-sub); font-weight: 400; }
h2.sec { clear: none; margin: 34px 0 11px; padding: 0 0 5px; border-bottom: 2px solid var(--border-strong); color: var(--text); font-size: 21px; line-height: 1.45; font-weight: 700; letter-spacing: -.45px; }
h3.sec { margin: 26px 0 8px; padding: 0 0 4px; border-bottom: 1px solid var(--border); color: var(--text); font-size: 17px; line-height: 1.45; font-weight: 700; }
h2.sec::after, h3.sec::after { content: "[편집]"; margin-left: 7px; color: var(--link); font-size: 11px; font-weight: 400; vertical-align: middle; }
p { margin: 9px 0; }
ul.body, ol.body { margin: 9px 0; padding-left: 24px; }
ul.body li, ol.body li { margin: 4px 0; }
blockquote { margin: 14px 0; padding: 10px 16px; border-left: 4px solid var(--border-strong); background: var(--soft); font-style: italic; }
blockquote .by { display: block; margin-top: 6px; color: var(--text-sub); text-align: right; font-size: 12px; font-style: normal; }
mark { padding: 0 2px; color: var(--text); background: var(--hl); }
del { color: var(--text-sub); }
table.wiki { width: 100%; margin: 14px 0; border: 2px solid var(--border-strong); border-collapse: collapse; background: var(--surface); font-size: 13px; }
table.wiki th, table.wiki td { padding: 6px 9px; border: 1px solid var(--border); }
table.wiki th { background: var(--table-head); text-align: center; font-weight: 700; }
table.wiki td.c { text-align: center; }
.table-scroll { overflow-x: auto; }
sup.fn a { font-size: 11px; vertical-align: super; }
.footnotes { margin-top: 35px; padding-top: 12px; border-top: 1px solid var(--border); color: var(--text-sub); font-size: 12px; }
.footnotes ol { margin: 6px 0; padding-left: 22px; }
.footnotes li { margin: 3px 0; }
.footnotes li:target { background: var(--hl); }
footer.doc-foot { margin-top: 44px; padding-top: 14px; border-top: 1px solid var(--border); color: var(--text-sub); font-size: 12px; }

/* ── 대문 ── */
.home-lead { display: grid; grid-template-columns: minmax(0, 1fr) 270px; gap: 15px; margin: 5px 0 26px; }
.home-card { border: 1px solid var(--border); background: var(--surface); }
.home-card-title { padding: 6px 10px; background: var(--soft-2); font-weight: 700; }
.home-card-body { padding: 10px 12px; font-size: 13px; }
.home-card-body ul { margin: 0; padding-left: 18px; }

@media (max-width: 720px) {
  .nav { min-height: 50px; padding: 0 12px; gap: 4px; }
  .nav-icon, .nav button.theme { width: 34px; height: 50px; }
  .nav .brand { width: 122px; flex-basis: 122px; height: 40px; }
  .nav .brand-mark { background-size: 180px auto; }
  .nav-search { flex: 1 1 auto; margin-left: 12px; max-width: none; }
  .nav .spacer, .nav-icon.optional { display: none; }
  .nav .search { font-size: 12px; }
  .wrap { padding: 17px 12px 60px; }
  .title-area { padding-right: 0; }
  h1.doc-title { font-size: 23px; }
  .document-head { padding-bottom: 40px; }
  .doc-tools { right: auto; left: 0; bottom: 7px; }
  .doc-tool { min-height: 25px; padding: 3px 7px; }
  .infobox { float: none; width: 100%; margin: 0 0 17px; }
  .navbox .nb-row { flex-direction: column; gap: 1px; }
  .navbox .nb-label { flex: none; }
  .home-lead { grid-template-columns: 1fr; }
}
