@font-face { font-family: "Paperlogy NN"; src: url("https://cdn.jsdelivr.net/gh/projectnoonnu/2408-3@1.0/Paperlogy-4Regular.woff2") format("woff2"); font-weight: 400; font-display: swap; }
@font-face { font-family: "Paperlogy NN"; src: url("https://cdn.jsdelivr.net/gh/projectnoonnu/2408-3@1.0/Paperlogy-6SemiBold.woff2") format("woff2"); font-weight: 600; font-display: swap; }
@font-face { font-family: "Paperlogy NN"; src: url("https://cdn.jsdelivr.net/gh/projectnoonnu/2408-3@1.0/Paperlogy-7Bold.woff2") format("woff2"); font-weight: 700; font-display: swap; }
@font-face { font-family: "Paperlogy NN"; src: url("https://cdn.jsdelivr.net/gh/projectnoonnu/2408-3@1.0/Paperlogy-8ExtraBold.woff2") format("woff2"); font-weight: 800; font-display: swap; }
@font-face { font-family: "Paperlogy NN"; src: url("https://cdn.jsdelivr.net/gh/projectnoonnu/2408-3@1.0/Paperlogy-9Black.woff2") format("woff2"); font-weight: 900; font-display: swap; }

:root {
  --bg: #ffffff;
  --ink: #1a1a1a;
  --muted: #8b8b8b;
  --line: #d9d9d9;
  --soft: #f6f6f6;
  --accent: #c9a4b4;
  --sans: "Poppins", "Noto Sans KR", sans-serif;
  --brand: "Montserrat", "Noto Sans KR", sans-serif;
}

* { box-sizing: border-box; }
html, body { margin: 0; }
body {
  font-family: var(--sans);
  font-weight: 400;
  color: var(--ink);
  background: var(--bg);
  font-size: 14px;
  line-height: 1.6;
  min-height: 100vh;
  display: flex; flex-direction: column;
}
a { color: inherit; text-decoration: none; }
button { font: inherit; color: inherit; }
main { flex: 1; width: 100%; max-width: 1040px; margin: 0 auto; padding: 0 24px 80px; }

/* ---------- header ---------- */
.top {
  display: grid; grid-template-columns: 1fr auto 1fr; align-items: baseline; gap: 36px;
  padding: 44px 16px 52px;
}
.nav-side { display: flex; gap: 28px; align-items: baseline; }
.nav-l { justify-content: flex-end; }
.nav-drop { position: relative; display: inline-flex; align-items: baseline; gap: 2px; }
.drop-btn { border: 0; background: none; cursor: pointer; font-size: 11px; color: #888; padding: 2px 4px; }
.drop-btn:hover { color: var(--ink); }
.drop-menu {
  position: absolute; top: calc(100% + 8px); left: 50%; transform: translateX(-50%); z-index: 30;
  min-width: 120px; display: none; flex-direction: column; padding: 6px;
  background: #fff; border: 1px solid var(--line); border-radius: 12px; box-shadow: 0 12px 30px rgba(0, 0, 0, .1);
}
.drop-menu::before { content: ""; position: absolute; inset: -10px 0 auto; height: 10px; } /* 마우스가 메뉴로 넘어가는 틈 */
.nav-drop:hover .drop-menu, .nav-drop.open .drop-menu { display: flex; }
.drop-menu a { padding: 8px 12px; border-radius: 8px; font-size: 13px; white-space: nowrap; }
.drop-menu a:hover { background: var(--soft); }
.drop-menu a.active { font-weight: 500; }
body.world-mode .drop-menu { background: #121318; border-color: var(--w-line); }
body.world-mode .drop-menu a:hover { background: rgba(255, 255, 255, .06); }
body.world-mode .drop-btn { color: var(--w-dim); }
.sub-tabs { display: flex; justify-content: center; gap: 6px; margin-top: 18px; }
.sub-tabs a { border: 1px solid var(--line); border-radius: 999px; padding: 4px 14px; font-size: 12px; color: #666; }
.sub-tabs a:hover { border-color: var(--ink); color: var(--ink); }
.sub-tabs a.on { background: var(--ink); border-color: var(--ink); color: #fff; }
.nav-r { justify-content: flex-start; }
.nav-link { font-weight: 300; font-size: 15px; color: #444; }
.nav-link:hover, .nav-link.active { color: var(--ink); text-decoration: underline; text-underline-offset: 5px; }
.brand { font-family: var(--brand); font-weight: 700; font-size: 22px; letter-spacing: .04em; }

/* ---------- pill ---------- */
.pill {
  display: inline-flex; align-items: center; justify-content: center;
  border: 1px solid #bdbdbd; border-radius: 999px;
  background: #fff;
  font-size: 10px; letter-spacing: .04em; line-height: 1;
  padding: 4px 9px;
  color: #555;
}
.pill-btn {
  border: 1px solid #bdbdbd; border-radius: 999px;
  background: #fff; cursor: pointer;
  font-size: 10px; font-weight: 500; letter-spacing: .06em; text-transform: uppercase;
  padding: 5px 13px;
  box-shadow: 0 1px 2px rgba(0, 0, 0, .06);
  transition: background .15s, color .15s, border-color .15s;
}
.pill-btn:hover { background: var(--ink); color: #fff; border-color: var(--ink); }
.pill-btn.dark { background: var(--ink); color: #fff; border-color: var(--ink); }
.pill-btn.dark:hover { background: #444; }

/* ---------- product grid (main) ---------- */
.grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 56px 34px;
}
.item { position: relative; cursor: pointer; }
.item-head { display: flex; justify-content: space-between; align-items: center; margin-bottom: 10px; }
.star {
  border: 0; background: none; cursor: pointer; padding: 0;
  font-size: 17px; line-height: 1; color: #555;
}
.star.on { color: var(--accent); }
.thumb { position: relative; aspect-ratio: 1; display: flex; align-items: center; justify-content: center; }
.thumb img {
  width: 100%; height: 100%; object-fit: contain; display: block;
  transition: transform .35s ease;
}
.item:hover .thumb img { transform: scale(1.04); }
.thumb.empty { background: var(--soft); }
.thumb.empty::after { content: "coming soon"; color: #b5b5b5; font-size: 12px; letter-spacing: .1em; }
.item-name { margin: 14px 0 0; font-size: 13px; }
.item-sub { margin: 0; font-size: 13px; font-weight: 500; }
.item-foot { display: flex; justify-content: flex-end; margin-top: 8px; }

/* ---------- genres (main page toggles) ---------- */
.genres { margin-top: 70px; border-top: 1px solid var(--ink); }
.genre { border-bottom: 1px solid var(--line); }
.genre > summary {
  display: flex; align-items: center; gap: 12px; cursor: pointer; list-style: none;
  padding: 20px 4px; font-family: var(--brand); font-weight: 600; font-size: 15px; letter-spacing: .08em;
}
.genre > summary::-webkit-details-marker { display: none; }
.genre > summary::before { content: "▸"; font-size: 12px; transition: transform .2s; }
.genre[open] > summary::before { transform: rotate(90deg); }
.genre-name { flex: 1; }
.genre-count { font-family: var(--sans); font-weight: 400; font-size: 11px; color: var(--muted); border: 1px solid var(--line); border-radius: 999px; padding: 1px 9px; letter-spacing: 0; }
.genre-body { padding: 14px 0 44px; }
.genre-empty { color: #999; font-size: 13px; margin: 0; padding: 10px 4px; }
.genre-add { margin: 24px 0 0; justify-content: flex-start; }

/* ---------- gallery ---------- */
.page-head { text-align: center; margin: -18px 0 44px; }
.page-head h1 { font-family: var(--brand); font-weight: 600; font-size: 13px; letter-spacing: .3em; margin: 0; }
.page-head p { margin: 4px 0 0; color: var(--muted); font-size: 12px; }
.g-section { margin-bottom: 30px; }
.g-section .block-title { margin-top: 30px; }
.adm-inline { display: none; }
body.admin .adm-inline { display: inline-flex; }
.g-add { margin: 14px 0 0; justify-content: flex-start; }
.gallery { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 18px; }
.shot { margin: 0; cursor: pointer; position: relative; }
.shot .thumb { background: var(--soft); }
.shot:hover .thumb img { transform: scale(1.03); }
.shot-cap { display: flex; justify-content: space-between; align-items: center; margin-top: 6px; font-size: 12px; color: #555; }

/* ---------- world ---------- */
.world { max-width: 720px; margin: 0 auto; }
.world-intro { text-align: center; font-size: 15px; font-weight: 300; margin: 0 0 50px; white-space: pre-line; }
.block-title {
  display: flex; align-items: center; gap: 12px;
  font-family: var(--brand); font-weight: 600; font-size: 12px; letter-spacing: .25em;
  margin: 56px 0 18px;
}
.block-title::after { content: ""; flex: 1; border-top: 1px solid var(--line); }
.chapter { position: relative; display: grid; grid-template-columns: 56px 1fr; gap: 12px; padding: 18px 0; border-bottom: 1px solid #eee; }
.chapter-no { font-family: var(--brand); font-weight: 600; font-size: 12px; color: var(--muted); padding-top: 3px; }
.chapter h3 { font-size: 15px; font-weight: 500; margin: 0 0 4px; }
.chapter p { margin: 0; white-space: pre-line; color: #444; font-weight: 300; }
.factions { display: grid; grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)); gap: 16px; }
.faction { position: relative; border: 1px solid var(--line); border-radius: 14px; padding: 18px; }
.faction-dot { display: inline-block; width: 10px; height: 10px; border-radius: 50%; margin-right: 8px; vertical-align: 1px; }
.faction h3 { margin: 0; font-size: 15px; font-weight: 500; }
.faction p { margin: 6px 0 12px; font-size: 13px; color: #555; font-weight: 300; }
.tags { display: flex; flex-wrap: wrap; gap: 6px; }
.relation {
  position: relative;
  display: grid; grid-template-columns: 1fr auto 1fr; align-items: center; gap: 14px;
  padding: 12px 0; border-bottom: 1px solid #eee;
}
.relation .who:first-child { text-align: right; }

/* ---------- footer ---------- */
.foot {
  display: flex; justify-content: center; align-items: center; gap: 14px;
  padding: 30px 16px 36px; color: var(--muted); font-size: 11px;
}
.admin-btn { border: 0; background: none; cursor: pointer; color: #c4c4c4; font-size: 11px; padding: 0; }
.admin-btn:hover { color: var(--ink); }
body:not(.owner) .owner-only, body:not(.can-edit) .edit-only { display: none !important; }
body:not(.owner) .owner-edit .adm-tools, body:not(.owner) .owner-edit .adm-bar { display: none !important; }
.grade { border: 1px solid var(--line); border-radius: 999px; padding: 1px 9px; font-size: 10px; letter-spacing: .06em; color: #666; }
.member-list { border-top: 1px solid #eee; }
.member-row { display: flex; align-items: center; gap: 10px; padding: 10px 0; border-bottom: 1px solid #eee; }
.member-email { flex: 1; min-width: 0; font-size: 13px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.member-row select { border: 1px solid var(--line); border-radius: 8px; padding: 5px 8px; font-family: var(--sans); font-size: 12px; background: #fff; }
body.admin #edit-btn { color: var(--ink); text-decoration: underline; }

/* ---------- login gate ---------- */
body.locked > :not(.gate):not(.modal):not(script) { display: none !important; }
.gate { min-height: 100vh; display: flex; align-items: center; justify-content: center; padding: 24px; }
.gate[hidden] { display: none; }
.gate-box { width: min(340px, 100%); text-align: center; }
.gate-logo { font-family: var(--brand); font-weight: 700; font-size: 28px; letter-spacing: .04em; margin-bottom: 34px; }
.gate-tabs { display: flex; justify-content: center; gap: 22px; margin-bottom: 22px; }
.gate-tabs button { border: 0; background: none; cursor: pointer; font-size: 14px; color: #999; padding: 2px 0; }
.gate-tabs button.on { color: var(--ink); text-decoration: underline; text-underline-offset: 6px; }
.gate-form { display: grid; gap: 10px; }
.gate-form input {
  width: 100%; border: 1px solid var(--line); border-radius: 10px;
  font-family: var(--sans); font-size: 14px; padding: 11px 14px; outline: none;
}
.gate-form input:focus { border-color: var(--ink); }
.gate-form .pill-btn { padding: 10px; font-size: 11px; margin-top: 4px; }
.gate-msg { min-height: 18px; margin: 0; font-size: 12px; color: #c0392b; }
.gate-desc { font-size: 13px; color: #666; margin: 0 0 16px; }
.gate-link { border: 0; background: none; cursor: pointer; font-size: 12px; color: #999; text-decoration: underline; }

/* ---------- bgm ---------- */
body.has-bgm { padding-bottom: 64px; }
.bgm {
  position: fixed; left: 50%; bottom: 12px; z-index: 45;
  transform: translateX(-50%);
  width: min(720px, calc(100% - 24px));
  display: flex; align-items: center; gap: 12px;
  background: rgba(255, 255, 255, .96); backdrop-filter: blur(8px);
  border: 1px solid var(--line); border-radius: 999px;
  padding: 6px 10px 6px 12px;
  box-shadow: 0 8px 30px rgba(0, 0, 0, .08);
}
.bgm[hidden] { display: none; }
.bgm-left, .bgm-right { display: flex; align-items: center; gap: 2px; flex: none; }
.bgm-right { gap: 10px; }
.bgm-btn {
  width: 32px; height: 32px; border-radius: 50%; flex: none;
  border: 0; background: none; cursor: pointer; color: #444;
  display: inline-flex; align-items: center; justify-content: center; padding: 0;
}
.bgm-btn svg { width: 16px; height: 16px; fill: currentColor; }
.bgm-play svg { width: 14px; height: 14px; }
.bgm-row-icon svg { width: 10px; height: 10px; fill: currentColor; display: block; }
.bgm-list-btn { display: inline-flex; align-items: center; gap: 4px; }
.bgm-list-ico { display: none; }
.bgm-list-ico svg { width: 16px; height: 16px; fill: currentColor; display: block; }
.bgm-btn:hover { background: var(--soft); color: var(--ink); }
.bgm-play { background: var(--ink); color: #fff; font-size: 12px; }
.bgm-play:hover { background: #444; color: #fff; }
.bgm-shuffle { font-size: 15px; color: #bbb; }
.bgm-shuffle.on { color: var(--ink); }
.bgm-mid { flex: 1; min-width: 0; display: flex; align-items: center; gap: 10px; }
.bgm-yt { display: none; width: 64px; height: 36px; border-radius: 6px; overflow: hidden; flex: none; background: #000; }
.bgm-yt.show { display: block; }
.bgm-yt iframe { width: 64px; height: 36px; display: block; }
.bgm-title { font-size: 12px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.bgm-vol { width: 80px; accent-color: var(--ink); }

.bgm-pop h2 { margin-bottom: 4px; }
.bgm-list { border-top: 1px solid #eee; margin-bottom: 22px; max-height: 46vh; overflow: auto; }
.bgm-row { display: flex; align-items: center; gap: 10px; border-bottom: 1px solid #eee; padding: 4px 0; }
.bgm-row.on .bgm-row-title { font-weight: 500; }
.bgm-row-play { flex: 1; min-width: 0; display: flex; align-items: center; gap: 12px; border: 0; background: none; cursor: pointer; padding: 10px 4px; text-align: left; font-size: 14px; }
.bgm-row-icon { width: 14px; font-size: 10px; color: #888; flex: none; }
.bgm-row-title { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.bgm-del { width: 26px; height: 26px; border-radius: 50%; border: 1px solid var(--line); background: #fff; cursor: pointer; font-size: 11px; flex: none; }
.bgm-del:hover { background: var(--ink); color: #fff; }
.bgm-empty { color: #999; font-size: 13px; padding: 16px 0; margin: 0; }
.bgm-add-tabs { display: flex; gap: 8px; margin-bottom: 14px; }

/* ---------- modal ---------- */
.modal {
  position: fixed; inset: 0; z-index: 50;
  display: flex; align-items: center; justify-content: center;
  padding: 24px;
  background: rgba(20, 20, 20, .28);
}
.modal[hidden] { display: none; }
.modal-box {
  position: relative;
  width: min(900px, 100%); max-height: 100%; overflow: auto;
  background: #fff; border-radius: 20px;
  box-shadow: 0 24px 70px rgba(0, 0, 0, .18);
  animation: pop .2s ease;
}
@keyframes pop { from { opacity: 0; transform: translateY(8px); } }
.modal-close {
  position: absolute; top: 16px; right: 18px; z-index: 2;
  border: 0; background: none; cursor: pointer; font-size: 18px; color: #555;
}
.detail { display: grid; grid-template-columns: 1fr 1fr; gap: 36px; padding: 44px 44px 40px; align-items: start; }
.detail-visual { position: sticky; top: 0; }
.variants { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 18px; }
.vtab {
  border: 1px solid var(--line); background: #fff; cursor: pointer;
  font-size: 13px; padding: 7px 13px; color: #333;
  transition: background .15s, color .15s, border-color .15s;
}
.vtab em { font-style: normal; font-size: 11px; color: var(--muted); margin-left: 4px; font-weight: 400; }
.vtab:hover { border-color: var(--ink); }
.vtab.active { background: var(--ink); border-color: var(--ink); color: #fff; font-weight: 500; }
.vtab.active em { color: #fff; }
.outfit-opts { display: flex; gap: 16px; margin-top: 12px; font-size: 13px; color: #444; }
.outfit-opts[hidden] { display: none; }
.outfit-opts label { display: inline-flex; align-items: center; gap: 6px; cursor: pointer; }
.outfit-opts input { accent-color: var(--ink); width: 15px; height: 15px; margin: 0; }
.outfit-opts label:has(input:disabled) { opacity: .45; cursor: default; }
.detail-info .pill { margin-bottom: 14px; }
.detail-info h2 { font-size: 20px; font-weight: 500; margin: 0 0 2px; }
.detail-info .sub { color: var(--muted); font-size: 13px; margin: 0 0 26px; }
.prompt { border-top: 1px solid #eee; padding: 16px 0 6px; }
.prompt-head { display: flex; align-items: center; justify-content: space-between; margin-bottom: 8px; }
.prompt-head b { font-weight: 500; font-size: 14px; }
.copy-btns { display: flex; gap: 6px; }
.prompt-text { white-space: normal; }
.prompt-text p { margin: 0; white-space: pre-wrap; }
.prompt-text p + p { margin-top: 1.1em; }
.prompt-text {
  margin: 0; white-space: pre-wrap; word-break: break-word;
  font-size: 13px; font-weight: 300; line-height: 1.75;
  background: var(--soft); border-radius: 12px; padding: 12px 14px;
  max-height: 240px; overflow: auto;
}

/* ---------- toast ---------- */
.toast {
  position: fixed; left: 50%; bottom: 30px; z-index: 70;
  transform: translateX(-50%);
  background: var(--ink); color: #fff; font-size: 12px;
  padding: 9px 18px; border-radius: 999px;
  animation: pop .2s ease;
}

/* ---------- admin ---------- */
.adm-bar { display: none; justify-content: center; gap: 8px; flex-wrap: wrap; margin: -24px 0 36px; }
body.admin .adm-bar { display: flex; }
.adm-tools { position: absolute; z-index: 3; display: none; gap: 4px; }
body.admin .adm-tools { display: flex; }
.item .adm-tools, .shot .adm-tools { top: 30px; right: 0; }
.chapter .adm-tools, .relation .adm-tools { top: 50%; right: 0; transform: translateY(-50%); }
.faction .adm-tools { top: 12px; right: 12px; }
.adm-tools button {
  width: 26px; height: 26px; border-radius: 50%;
  border: 1px solid var(--line); background: #fff; cursor: pointer; font-size: 11px;
}
.adm-tools button:hover { background: var(--ink); color: #fff; border-color: var(--ink); }
.adm-badge {
  position: fixed; left: 50%; top: 10px; z-index: 40; transform: translateX(-50%);
  display: none;
  background: var(--ink); color: #fff; font-size: 10px; letter-spacing: .2em;
  padding: 4px 12px; border-radius: 999px;
}
body.admin .adm-badge { display: block; }

.form { padding: 44px 44px 36px; max-width: 620px; margin: 0 auto; }
.form h2 { font-family: var(--brand); font-weight: 700; font-size: 18px; letter-spacing: .04em; margin: 0 0 4px; }
.form .desc { color: var(--muted); font-size: 12px; margin: 0 0 24px; }
.field { margin-bottom: 16px; }
.field > label { display: block; margin-bottom: 6px; font-size: 11px; font-weight: 500; letter-spacing: .08em; color: #666; }
.field input[type=text], .field input[type=password], .field textarea, .field select {
  width: 100%;
  border: 1px solid var(--line); border-radius: 10px; background: #fff;
  font-family: var(--sans); font-size: 14px; color: var(--ink);
  padding: 9px 12px; outline: none;
}
.field textarea { min-height: 110px; resize: vertical; font-size: 13px; line-height: 1.7; }
.field input:focus, .field textarea:focus, .field select:focus { border-color: var(--ink); }
.field input[type=color] { width: 48px; height: 34px; border: 1px solid var(--line); border-radius: 8px; background: #fff; padding: 3px; cursor: pointer; }
.field .hint { font-size: 11px; color: var(--muted); margin: 5px 0 0; }
.img-field { display: flex; gap: 14px; align-items: center; }
.img-field .preview { width: 84px; height: 84px; flex: none; border-radius: 10px; background: var(--soft) center / contain no-repeat; }
.variant-edit { border: 1px solid var(--line); border-radius: 14px; padding: 12px; margin-bottom: 10px; display: grid; gap: 8px; }
.variant-top { display: flex; gap: 8px; align-items: center; }
.variant-top .pill-btn { flex: none; white-space: nowrap; }
.v-cap { font-size: 11px; font-weight: 500; color: var(--ink); margin-top: 6px; }
.v-part { display: grid; grid-template-columns: 40px 1fr; align-items: center; gap: 8px; }
.v-part span { font-size: 12px; color: #666; }
.two { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }
.form-actions { display: flex; justify-content: flex-end; gap: 8px; margin-top: 24px; }
.form ol { padding-left: 18px; font-size: 13px; color: #555; }
.form code { background: var(--soft); padding: 1px 5px; border-radius: 4px; font-size: 12px; }
.busy { opacity: .5; pointer-events: none; }

/* ---------- responsive ---------- */
@media (max-width: 760px) {
  .bgm { gap: 6px; padding: 5px 8px; }
  .bgm-vol { display: none; }
  .bgm-btn { width: 28px; height: 28px; }
  main { padding: 0 16px 60px; }
  .top { gap: 18px; padding: 30px 12px 38px; }
  .nav-side { gap: 14px; }
  .brand { font-size: 19px; }
  .nav-link { font-size: 14px; }
  .grid { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 36px 16px; }
  .item-name, .item-sub { font-size: 12px; }
  .gallery { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; }
  .modal { padding: 10px; align-items: flex-end; }
  .modal-box { max-height: 92vh; }
  .detail { grid-template-columns: 1fr; gap: 10px; padding: 36px 20px 24px; }
  .detail-visual { position: static; }
  .detail-visual .thumb { max-width: 300px; margin: 0 auto; width: 100%; }
  .variants { margin-top: 12px; }
  .form { padding: 36px 20px 24px; }
  .two { grid-template-columns: 1fr; gap: 0; }
}

/* ---------- paste / pair info / links ---------- */
.paste-btn { margin: 6px 0 0; }
.pinfo { padding: 44px 44px 40px; }
.pinfo-head { text-align: center; margin-bottom: 30px; }
.pinfo-kicker { font-family: var(--brand); font-weight: 600; font-size: 11px; letter-spacing: .3em; color: var(--muted); margin: 10px 0 2px; }
.pinfo-head h2 { font-size: 22px; font-weight: 500; margin: 0; }
.pinfo-intro { white-space: pre-wrap; font-size: 14px; font-weight: 300; line-height: 1.85; margin: 16px auto 0; max-width: 620px; }
.pinfo-people { display: grid; grid-template-columns: 1fr 1fr; gap: 22px; }
.id-card { border: 1px solid var(--line); border-radius: 16px; padding: 20px; }
.id-photo { width: 150px; margin: 0 auto; }
.id-photo .thumb { aspect-ratio: 3 / 4; border-radius: 10px; overflow: hidden; background: var(--soft); }
.id-photo .thumb img { object-fit: cover; }
.id-photo .thumb.empty::after { content: "PHOTO"; }
.id-code { text-align: center; font-family: var(--brand); font-weight: 700; font-size: 15px; letter-spacing: .14em; text-transform: uppercase; margin: 12px 0 16px; }
.id-rows { display: grid; grid-template-columns: 52px 1fr; margin: 0 0 6px; border-top: 1px solid var(--ink); }
.id-rows dt, .id-rows dd { padding: 8px 0; border-bottom: 1px solid #eee; font-size: 13px; margin: 0; }
.id-rows dt { color: var(--muted); }
.id-block { margin-top: 14px; }
.id-block h4, .id-secret summary { font-family: var(--brand); font-weight: 600; font-size: 11px; letter-spacing: .15em; margin: 0 0 6px; }
.id-block p { margin: 0; font-size: 13px; font-weight: 300; line-height: 1.8; white-space: pre-wrap; }
.id-secret summary { cursor: pointer; list-style: none; }
.id-secret summary::-webkit-details-marker { display: none; }
.id-secret summary::after { content: "  · 눌러서 보기"; font-family: var(--sans); font-weight: 400; letter-spacing: 0; color: var(--muted); }
.id-secret[open] summary::after { content: ""; }
.check { display: inline-flex; align-items: center; gap: 8px; font-size: 14px; cursor: pointer; }
.check input { width: 16px; height: 16px; accent-color: var(--ink); margin: 0; }
.field[hidden] { display: none; }
.form-sec { font-family: var(--brand); font-size: 12px; letter-spacing: .2em; margin: 30px 0 14px; padding-top: 18px; border-top: 1px solid var(--line); }
@media (max-width: 760px) {
  .pinfo { padding: 36px 18px 22px; }
  .pinfo-people { grid-template-columns: 1fr; }
}

.link-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 16px; }
.link-card { position: relative; }
.link-card > a {
  display: flex; flex-direction: column; gap: 6px; height: 100%;
  border: 1px solid var(--line); border-radius: 16px; padding: 20px 20px 16px; background: #fff;
  transition: transform .2s, box-shadow .2s, border-color .2s;
}
.link-card > a:hover { transform: translateY(-3px); border-color: var(--ink); box-shadow: 0 12px 28px -18px rgba(0, 0, 0, .35); }
.link-mono {
  width: 38px; height: 38px; border-radius: 10px; margin-bottom: 8px;
  display: flex; align-items: center; justify-content: center;
  background: var(--ink); color: #fff; font-family: var(--brand); font-weight: 700; font-size: 16px; text-transform: uppercase;
}
.link-title { font-size: 15px; font-weight: 500; line-height: 1.4; word-break: break-word; }
.link-desc { font-size: 13px; color: #666; font-weight: 300; line-height: 1.6; }
.link-host { margin-top: auto; padding-top: 10px; display: flex; justify-content: space-between; align-items: center; font-size: 11px; color: var(--muted); border-top: 1px solid #f0f0f0; }
.link-arrow { font-size: 14px; color: var(--ink); transition: transform .2s; }
.link-card > a:hover .link-arrow { transform: translate(2px, -2px); }
.link-card .adm-tools { top: 14px; right: 14px; }
.link-empty { text-align: center; color: #999; }

/* ============================================================
   ARCH WORLD (어두운 시네마틱 테마)
   ============================================================ */
body.world-mode {
  --w-bg: #06070a; --w-ink: #ece6d8; --w-dim: #9c968a; --w-line: rgba(236, 230, 216, .12);
  --w-gold: #d9d9d9; --w-gold-2: #ffffff; --w-panel: rgba(255, 255, 255, .03);
  --w-display: "Paperlogy", "Paperlogy NN", "Pretendard Variable", Pretendard, sans-serif;
  --w-body: "Pretendard Variable", Pretendard, -apple-system, sans-serif;
  background: var(--w-bg); color: var(--w-ink);
}
body.world-mode .top .nav-link { color: var(--w-dim); }
body.world-mode .top .nav-link:hover, body.world-mode .top .nav-link.active { color: var(--w-ink); }
body.world-mode .brand { color: var(--w-ink); }
body.world-mode .foot { color: #5f5a52; }
body.world-mode .grade { border-color: var(--w-line); color: var(--w-dim); }
body.world-mode main { max-width: none; padding: 0; }
body.world-mode .bgm { background: rgba(14, 15, 19, .92); border-color: var(--w-line); color: var(--w-ink); }
body.world-mode .bgm-btn { color: var(--w-dim); }
body.world-mode .bgm-play { background: #fff; color: #111; }
body.world-mode .bgm-shuffle.on { color: var(--w-gold-2); }
body.world-mode .bgm .pill-btn { background: transparent; color: var(--w-ink); border-color: var(--w-line); }

.world-page { font-family: var(--w-body); }
.world-page .adm-bar { margin: 18px 0 0; }

/* hero */
.w-hero { position: relative; text-align: center; padding: 40px 20px 80px; overflow: hidden; }
.w-hero-bg {
  position: absolute; inset: 0; pointer-events: none;
  background:
    radial-gradient(ellipse 60% 50% at 50% 38%, rgba(255, 255, 255, .16), transparent 70%),
    linear-gradient(transparent 0 calc(100% - 1px), var(--w-line) 0) 0 0 / 100% 80px,
    linear-gradient(90deg, transparent 0 calc(100% - 1px), rgba(236, 230, 216, .05) 0) 0 0 / 80px 100%;
  mask-image: radial-gradient(ellipse 70% 70% at 50% 40%, #000 30%, transparent 75%);
}
.w-emblem { position: relative; width: min(300px, 70vw); height: auto; margin: 0 auto 10px; display: block; }
.e-ring { fill: none; stroke: var(--w-gold); stroke-opacity: .5; stroke-width: 1; }
.e-ring.thin { stroke-opacity: .2; stroke-dasharray: 2 6; }
.e-hex { fill: rgba(255, 255, 255, .05); stroke: var(--w-gold); stroke-opacity: .55; stroke-width: 1; }
.e-spoke { stroke: var(--w-gold); stroke-opacity: .2; }
.e-dot { filter: drop-shadow(0 0 6px currentColor); stroke: #06070a; stroke-width: 3; }
.e-spin { transform-origin: 150px 150px; animation: wspin 60s linear infinite; }
.e-core { font-family: var(--w-display); font-size: 34px; font-weight: 900; fill: var(--w-gold-2); }
@keyframes wspin { to { transform: rotate(360deg); } }
.w-kicker { position: relative; font-family: var(--w-display); font-size: 12px; letter-spacing: .45em; color: var(--w-gold); margin: 0; }
.w-title {
  position: relative; margin: 6px 0 0;
  font-family: var(--w-display); font-weight: 800;
  font-size: clamp(72px, 15vw, 168px); line-height: 1; letter-spacing: .18em; padding-left: .18em;
  background: linear-gradient(180deg, #ffffff 0%, #f2f2f2 45%, #bdbdbd 80%, #7d7d7d 100%);
  -webkit-background-clip: text; background-clip: text; color: transparent;
  text-shadow: 0 0 60px rgba(255, 255, 255, .25);
}
.w-ver { position: relative; font-family: var(--w-display); font-size: 11px; letter-spacing: .5em; color: var(--w-dim); margin: 14px 0 34px; }
.w-quote {
  position: relative; max-width: 640px; margin: 0 auto 26px; padding: 18px 24px;
  border-top: 1px solid var(--w-line); border-bottom: 1px solid var(--w-line);
  font-size: 14px; font-style: italic; color: var(--w-dim); line-height: 1.9;
}
.w-intro { position: relative; font-size: clamp(17px, 2.4vw, 22px); font-weight: 600; line-height: 1.8; margin: 0 auto; max-width: 720px; }
.w-toc { position: relative; display: flex; flex-wrap: wrap; justify-content: center; gap: 8px; margin-top: 46px; }
.w-toc button {
  border: 1px solid var(--w-line); background: rgba(0, 0, 0, .3); color: var(--w-ink); cursor: pointer;
  font-family: var(--w-body); font-size: 12px; padding: 7px 14px; display: inline-flex; gap: 8px; align-items: baseline;
  transition: border-color .2s, color .2s;
}
.w-toc button b { font-family: var(--w-display); color: var(--w-gold); font-size: 11px; }
.w-toc button:hover { border-color: var(--w-gold); }

/* chapters */
.w-body { max-width: 1060px; margin: 0 auto; padding: 0 24px; }
.w-chapter { padding: 90px 0 30px; border-top: 1px solid var(--w-line); }
.w-ch-head { display: flex; align-items: flex-end; gap: 22px; margin-bottom: 36px; }
.w-ch-no {
  font-family: var(--w-display); font-weight: 800; font-size: clamp(64px, 10vw, 110px); line-height: .8;
  color: transparent; -webkit-text-stroke: 1px var(--w-gold);
}
.w-ch-en { font-family: var(--w-display); font-size: 12px; letter-spacing: .4em; color: var(--w-gold); margin: 0 0 6px; }
.w-ch-ko { font-size: clamp(22px, 3.4vw, 34px); font-weight: 900; margin: 0; letter-spacing: -.01em; }
.w-sub {
  display: flex; align-items: center; gap: 14px; margin: 54px 0 20px;
  font-size: 17px; font-weight: 600; color: var(--w-gold-2);
}
.w-sub::after { content: ""; flex: 1; border-top: 1px solid var(--w-line); }
.w-lead { font-size: 16px; line-height: 2; max-width: 820px; margin: 0; }

.w-grid-2 { display: grid; grid-template-columns: 1fr 1fr; gap: 18px; }
.w-panel {
  position: relative; background: var(--w-panel); border: 1px solid var(--w-line); padding: 28px 26px;
  transition: border-color .3s, background .3s;
}
.w-panel:hover { border-color: rgba(255, 255, 255, .45); background: rgba(255, 255, 255, .04); }
.w-panel::before, .w-panel::after { content: ""; position: absolute; width: 14px; height: 14px; border: 1px solid var(--w-gold); }
.w-panel::before { top: -1px; left: -1px; border-right: 0; border-bottom: 0; }
.w-panel::after { bottom: -1px; right: -1px; border-left: 0; border-top: 0; }
.w-panel h3 { font-size: 22px; font-weight: 900; margin: 0 0 12px; }
.w-panel h4 { font-size: 16px; font-weight: 600; margin: 0 0 8px; color: var(--w-gold-2); }
.w-panel p { margin: 0; font-size: 14px; line-height: 1.95; color: #cfc8b9; white-space: normal; }
.w-role-en { font-family: var(--w-display); font-size: 11px; letter-spacing: .35em; color: var(--w-gold) !important; margin: 0 0 6px !important; }

.w-rules { display: grid; grid-template-columns: repeat(2, 1fr); gap: 0 30px; }
.w-rule { position: relative; display: grid; grid-template-columns: 46px 1fr; gap: 10px; padding: 20px 0; border-bottom: 1px solid var(--w-line); }
.w-rule-no { font-family: var(--w-display); font-size: 20px; color: var(--w-gold); }
.w-rule h4 { margin: 0 0 6px; font-size: 16px; }
.w-rule p { margin: 0; font-size: 14px; line-height: 1.9; color: #cfc8b9; }

.w-motto { margin: 40px 0 0; padding: 36px 30px; text-align: center; border: 1px solid var(--w-line); background: radial-gradient(ellipse at center, rgba(255, 255, 255, .08), transparent 70%); }
.w-motto blockquote { margin: 0 0 14px; font-size: clamp(18px, 2.6vw, 24px); font-weight: 900; color: var(--w-gold-2); line-height: 1.6; }
.w-motto figcaption { font-size: 14px; color: var(--w-dim); line-height: 1.9; max-width: 760px; margin: 0 auto; }

.w-ranks { border-top: 1px solid var(--w-line); }
.w-rank { position: relative; display: grid; grid-template-columns: 110px 1fr; gap: 20px; padding: 24px 0; border-bottom: 1px solid var(--w-line); }
.w-rank-grade {
  font-family: var(--w-display); font-weight: 800; font-size: 22px; color: var(--w-gold-2);
  border: 1px solid rgba(255, 255, 255, .5); display: flex; align-items: center; justify-content: center; height: 64px; align-self: start; text-align: center; padding: 4px;
}
.w-rank-grade.mid { font-size: 17px; }
.w-rank-grade.long { font-size: 11px; letter-spacing: .12em; word-break: break-all; }
.w-rank:first-child .w-rank-grade { background: linear-gradient(135deg, rgba(255, 255, 255, .22), transparent); }
.w-rank h4 { margin: 0 0 6px; font-size: 18px; font-weight: 900; }
.w-rank h4 small { font-family: var(--w-display); font-size: 11px; letter-spacing: .3em; color: var(--w-gold); margin-left: 8px; font-weight: 400; }
.w-rank p { margin: 0; font-size: 14px; line-height: 1.9; color: #cfc8b9; }
.w-rank-rep { margin-top: 8px !important; color: var(--w-dim) !important; font-style: italic; }

/* elements */
.w-el-intro { margin-bottom: 30px; }
.w-els { display: grid; grid-template-columns: repeat(3, 1fr); gap: 16px; }
.w-el {
  position: relative; padding: 26px 22px 18px; background: linear-gradient(180deg, color-mix(in srgb, var(--el) 10%, transparent), transparent 55%);
  border: 1px solid color-mix(in srgb, var(--el) 30%, transparent); overflow: hidden;
  transition: transform .3s, box-shadow .3s, border-color .3s;
}
.w-el::before { content: ""; position: absolute; top: -60px; right: -60px; width: 160px; height: 160px; border-radius: 50%; background: var(--el); opacity: .14; filter: blur(30px); }
.w-el:hover { transform: translateY(-4px); border-color: var(--el); box-shadow: 0 18px 40px -20px var(--el); }
.w-el-head { position: relative; display: flex; align-items: center; gap: 14px; margin-bottom: 18px; }
.w-el-icon { font-size: 34px; filter: drop-shadow(0 0 12px var(--el)); }
.w-el-head h3 { margin: 0; font-size: 24px; font-weight: 900; }
.w-el-head p { margin: 0; font-family: var(--w-display); font-size: 12px; letter-spacing: .3em; color: var(--el); }
.w-el dl { position: relative; margin: 0; }
.w-el dt { font-family: var(--w-display); font-size: 11px; letter-spacing: .15em; color: var(--el); margin-top: 12px; }
.w-el dd { margin: 4px 0 0; font-size: 13px; line-height: 1.8; color: #d6d0c3; }
.w-el-rep { position: relative; margin-top: 16px; border-top: 1px solid var(--w-line); padding-top: 10px; }
.w-el-rep summary { cursor: pointer; font-size: 12px; color: var(--w-dim); list-style: none; }
.w-el-rep summary::after { content: " +"; }
.w-el-rep[open] summary::after { content: " −"; }
.w-el-rep p { font-size: 12px; line-height: 1.8; color: #bfb8aa; margin: 8px 0 0; }
.w-el-rep b { color: var(--el); font-weight: 600; margin-right: 4px; }

/* roster */
.w-teams { display: grid; grid-template-columns: 1fr; gap: 18px; }
.w-team { position: relative; border: 1px solid var(--w-line); background: var(--w-panel); }
.w-team header { display: flex; justify-content: space-between; align-items: baseline; gap: 12px; padding: 16px 20px; border-bottom: 1px solid var(--w-line); background: linear-gradient(90deg, rgba(255, 255, 255, .12), transparent); }
.w-team h3 { margin: 0; font-family: var(--w-display); font-size: 16px; letter-spacing: .12em; font-weight: 600; }
.w-team header span { font-family: var(--w-display); font-size: 11px; letter-spacing: .2em; color: var(--w-gold); }
.w-agents-empty { margin: 0; padding: 34px 20px; text-align: center; font-size: 11px; letter-spacing: .4em; color: #4a4a50; }
body.admin .w-team header { padding-right: 160px; }
.w-agents { display: grid; grid-template-columns: repeat(auto-fill, minmax(118px, 1fr)); gap: 14px; padding: 18px 20px 20px; }
.w-agent { margin: 0; position: relative; border: 1px solid var(--w-line); background: #0d0e12; overflow: hidden; transition: transform .3s, border-color .3s, box-shadow .3s; }
.w-agent:hover { transform: translateY(-4px); border-color: var(--el); box-shadow: 0 14px 30px -18px var(--el); }
.w-agent-photo { aspect-ratio: 3 / 4; background: #15161b; }
.w-agent-photo img { width: 100%; height: 100%; object-fit: cover; display: block; }
.w-agent-photo.empty { display: flex; align-items: center; justify-content: center; background: repeating-linear-gradient(45deg, #121318 0 10px, #16171d 10px 20px); }
.w-agent-photo.empty::after { content: "NO PHOTO"; font-size: 10px; letter-spacing: .3em; color: #4a4a50; }
.w-agent figcaption { position: absolute; inset: auto 0 0; padding: 22px 10px 9px; background: linear-gradient(0deg, rgba(6, 7, 10, .95) 30%, transparent); }
.w-agent b { display: block; font-family: var(--w-display); font-size: 15px; font-weight: 700; }
.w-agent small { display: inline-flex; align-items: center; gap: 5px; font-size: 11px; color: var(--el); margin-top: 2px; }
.w-agent small::before { content: ""; width: 6px; height: 6px; border-radius: 50%; background: var(--el); box-shadow: 0 0 6px var(--el); }

/* places */
.w-places { display: grid; grid-template-columns: repeat(2, 1fr); gap: 0 34px; }
.w-place { position: relative; padding: 26px 0 26px 60px; border-bottom: 1px solid var(--w-line); }
.w-place-no { position: absolute; left: 0; top: 26px; font-family: var(--w-display); font-size: 24px; color: var(--w-gold); opacity: .8; }
.w-place-en { font-family: var(--w-display); font-size: 10px; letter-spacing: .25em; color: var(--w-gold); margin: 0 0 4px; }
.w-place h3 { margin: 0 0 8px; font-size: 20px; font-weight: 900; }
.w-place p:last-of-type { margin: 0; font-size: 13.5px; line-height: 1.9; color: #cfc8b9; }
.w-places .w-place:first-child { grid-column: 1 / -1; padding: 34px 0 34px 60px; }
.w-places .w-place:first-child h3 { font-size: 30px; }

/* threats */
.w-threats { display: grid; grid-template-columns: repeat(3, 1fr); gap: 16px; }
.w-threat { position: relative; padding: 26px 22px; border: 1px solid rgba(214, 64, 64, .3); background: linear-gradient(180deg, rgba(214, 64, 64, .08), transparent 60%); }
.w-threat .w-place-en { color: #e2675d; }
.w-threat h3 { margin: 0 0 10px; font-size: 21px; font-weight: 900; }
.w-threat p:last-of-type { margin: 0; font-size: 13.5px; line-height: 1.9; color: #cfc8b9; }
.w-codered {
  display: flex; gap: 20px; align-items: center; margin-top: 22px; padding: 24px 26px;
  border: 1px solid rgba(255, 60, 60, .55); background: repeating-linear-gradient(-45deg, rgba(255, 50, 50, .08) 0 14px, transparent 14px 28px);
}
.w-codered h3 { margin: 0 0 6px; font-family: var(--w-display); letter-spacing: .15em; color: #ff6b5e; font-size: 17px; }
.w-codered p { margin: 0; font-size: 14px; line-height: 1.9; }
.w-siren { flex: none; width: 16px; height: 16px; border-radius: 50%; background: #ff3b30; box-shadow: 0 0 0 0 rgba(255, 59, 48, .7); animation: siren 1.4s infinite; }
@keyframes siren { 70% { box-shadow: 0 0 0 18px rgba(255, 59, 48, 0); } 100% { box-shadow: 0 0 0 0 rgba(255, 59, 48, 0); } }

/* glossary */
.w-terms { border-top: 1px solid var(--w-line); }
.w-term { position: relative; border-bottom: 1px solid var(--w-line); }
.w-term summary { display: flex; justify-content: space-between; align-items: baseline; gap: 16px; padding: 20px 4px; cursor: pointer; list-style: none; }
.w-term summary::-webkit-details-marker { display: none; }
.w-term summary span { font-size: 18px; font-weight: 600; }
.w-term summary span::before { content: "+"; display: inline-block; width: 22px; color: var(--w-gold); font-family: var(--w-display); transition: transform .2s; }
.w-term[open] summary span::before { content: "−"; }
.w-term summary small { font-family: var(--w-display); font-size: 11px; letter-spacing: .3em; color: var(--w-gold); }
.w-term > p { margin: 0 0 24px 26px; font-size: 14px; line-height: 2; color: #cfc8b9; }

.w-end { text-align: center; font-family: var(--w-display); font-size: 11px; letter-spacing: .5em; color: #5f5a52; padding: 80px 0 20px; }

/* 등장 효과 */
.reveal { opacity: 0; transform: translateY(28px); transition: opacity .9s ease, transform .9s ease; }
.reveal.in { opacity: 1; transform: none; }
@media (prefers-reduced-motion: reduce) {
  .reveal { opacity: 1; transform: none; transition: none; }
  .e-spin, .w-siren { animation: none; }
}

/* world 편집 도구 위치 */
.world-page .adm-tools { top: 10px; right: 10px; }
.world-page .adm-tools button { background: #15161b; color: var(--w-ink); border-color: var(--w-line); }

@media (max-width: 860px) {
  .w-grid-2, .w-rules, .w-teams, .w-places, .w-threats { grid-template-columns: 1fr; }
  .w-els { grid-template-columns: 1fr 1fr; }
  .w-places .w-place:first-child { grid-column: auto; }
}
@media (max-width: 560px) {
  .w-body { padding: 0 16px; }
  .w-els { grid-template-columns: 1fr; }
  .w-agents { grid-template-columns: repeat(3, 1fr); gap: 10px; padding: 14px; }
  .w-rank { grid-template-columns: 70px 1fr; gap: 14px; }
  .w-rank-grade { font-size: 16px; height: 52px; }
  .w-rank-grade.mid { font-size: 13px; }
  .w-rank-grade.long { font-size: 9px; letter-spacing: .06em; }
  .w-chapter { padding-top: 64px; }
  .w-ch-head { gap: 14px; }
  .w-place { padding-left: 46px; }
  .w-places .w-place:first-child { padding-left: 46px; }
}

/* World 제목 폰트: 페이퍼로지 */
.w-ch-ko, .w-panel h3, .w-panel h4, .w-rank h4, .w-el-head h3, .w-place h3, .w-threat h3, .w-term summary span, .w-intro, .w-motto blockquote, .w-rule h4, .w-sub {
  font-family: var(--w-display);
}
.w-title { font-weight: 900; letter-spacing: .12em; padding-left: .12em; }
.w-ch-no { font-weight: 900; }
.w-quote { font-style: normal; }
.w-rank-rep { font-style: normal !important; }

/* ============================================================
   반응형 (맨 끝에 두어 위의 규칙보다 우선)
   ============================================================ */
@media (max-width: 960px) {
  .link-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}

@media (max-width: 760px) {
  /* 헤더: 로고 한 줄, 메뉴 한 줄 */
  .top {
    grid-template-columns: 1fr 1fr; grid-template-areas: "brand brand" "l r";
    row-gap: 14px; column-gap: 18px; padding: 26px 16px 30px;
  }
  .top .brand { grid-area: brand; justify-self: center; font-size: 22px; }
  .nav-l { grid-area: l; }
  .nav-r { grid-area: r; }
  .nav-side { gap: 18px; }
  .nav-link { font-size: 14px; }
  .drop-menu { left: 0; transform: none; }

  main { padding: 0 14px 40px; }
  .page-head { margin: 0 0 28px; }

  /* 페어 카드 */
  .grid { gap: 28px 12px; }
  .item-head { margin-bottom: 6px; }
  .pill { font-size: 9px; padding: 3px 7px; max-width: 100%; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
  .item-name { font-size: 12px; margin-top: 10px; }
  .item-sub { font-size: 12px; }
  .item-foot .pill-btn { font-size: 9px; padding: 5px 10px; }
  .genres { margin-top: 44px; }

  /* 링크: 가로형 카드 한 줄씩 */
  .link-grid { grid-template-columns: 1fr; gap: 10px; }
  .link-card > a {
    display: grid; grid-template-columns: 40px minmax(0, 1fr) auto; grid-template-rows: auto auto auto;
    column-gap: 14px; row-gap: 2px; align-items: center; padding: 14px 16px; border-radius: 14px;
  }
  .link-mono { grid-row: 1 / span 3; margin: 0; width: 40px; height: 40px; }
  .link-title { grid-column: 2; font-size: 14px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
  .link-desc { grid-column: 2; font-size: 12px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
  .link-host { grid-column: 2; margin: 0; padding: 0; border: 0; font-size: 11px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; display: block; }
  .link-arrow { grid-column: 3; grid-row: 1 / span 3; }
  .link-host .link-arrow { display: none; }
  .link-card > a::after { content: "↗"; grid-column: 3; grid-row: 1 / span 3; font-size: 16px; }
  .link-card .adm-tools { top: 50%; right: 40px; transform: translateY(-50%); }

  /* footer */
  .foot { flex-wrap: wrap; row-gap: 8px; padding: 24px 16px 30px; }

  /* BGM: 화면 아래에 꽉 차게, 아이폰 하단 여백 고려 */
  body.has-bgm { padding-bottom: calc(76px + env(safe-area-inset-bottom)); }
  .bgm {
    left: 10px; right: 10px; width: auto; transform: none;
    bottom: calc(10px + env(safe-area-inset-bottom));
    gap: 8px; padding: 6px 6px 6px 8px;
  }
  .bgm-left { gap: 0; }
  .bgm-prev, .bgm-vol { display: none; }
  .bgm-btn { width: 34px; height: 34px; }
  .bgm-play { width: 36px; height: 36px; }
  .bgm-title { font-size: 12px; }
  .bgm-yt { width: 48px; height: 27px; }
  .bgm-yt iframe { width: 48px; height: 27px; }
  .bgm-list-btn { width: 36px; height: 36px; padding: 0; justify-content: center; border-radius: 50%; }
  .bgm-list-txt { display: none; }
  .bgm-list-ico { display: block; }

  /* 팝업 / 편집 창 */
  .modal { padding: 0; align-items: flex-end; }
  .modal-box { border-radius: 20px 20px 0 0; max-height: 90vh; width: 100%; padding-bottom: env(safe-area-inset-bottom); }
  .modal-close { top: 10px; right: 12px; }
  .detail { padding: 34px 18px 22px; }
  .detail-visual .thumb { max-width: 240px; }
  .prompt-head { flex-wrap: wrap; gap: 6px; }
  .copy-btns .pill-btn { padding: 6px 12px; }
  .form { padding: 34px 18px 22px; }
  .form-actions { position: sticky; bottom: 0; background: #fff; padding: 12px 0 4px; margin-top: 16px; }
  .variant-top { flex-wrap: wrap; }
  .variant-top input { flex: 1 1 120px; min-width: 0; }
  /* 아이폰은 16px 보다 작은 입력칸을 누르면 화면을 확대함 */
  .field input[type=text], .field input[type=password], .field textarea, .field select, .gate-form input,
  .variant-edit input, .member-row select { font-size: 16px; }

  /* 회원 관리 */
  .member-row { flex-wrap: wrap; }
  .member-email { flex-basis: 100%; }
}

@media (max-width: 760px) {
  .adm-badge { left: 12px; top: 10px; transform: none; font-size: 9px; padding: 3px 10px; }
  .w-hero { padding: 10px 16px 56px; }
  .w-emblem { width: 190px; }
  .w-kicker { font-size: 10px; letter-spacing: .25em; }
  .w-ver { font-size: 10px; letter-spacing: .3em; margin: 10px 0 24px; }
  .w-quote { font-size: 13px; padding: 14px 6px; }
  .w-intro { font-size: 16px; }
  .w-toc { gap: 6px; margin-top: 32px; }
  .w-toc button { padding: 6px 10px; font-size: 11px; }
  .w-ch-no { font-size: 56px; }
  .w-ch-ko { font-size: 21px; }
  .w-panel { padding: 22px 18px; }
  .w-panel h3 { font-size: 19px; }
}

@media (max-width: 380px) {
  .nav-side { gap: 12px; }
  .nav-link { font-size: 13px; }
  .grid { gap: 22px 10px; }
}
