/* Nakama hub. Fonts are self-hosted subsets (tools/build_fonts.py), no external requests. */
@font-face { font-family: "Shippori Mincho"; font-weight: 800; font-display: swap; src: url(../fonts/shippori-800.woff2?v=15025ac2ea) format("woff2"); }
@font-face { font-family: "Zen Kaku Gothic New"; font-weight: 400; font-display: swap; src: url(../fonts/zenkaku-400.woff2?v=744185ecea) format("woff2"); }
@font-face { font-family: "Zen Kaku Gothic New"; font-weight: 500; font-display: swap; src: url(../fonts/zenkaku-500.woff2?v=b3aef3501c) format("woff2"); }
@font-face { font-family: "Zen Kaku Gothic New"; font-weight: 700; font-display: swap; src: url(../fonts/zenkaku-700.woff2?v=440d0ee3c9) format("woff2"); }
@font-face { font-family: "Shojumaru"; font-display: swap; src: url(../fonts/games/shojumaru.ttf?v=8607110ef4) format("truetype"); }
@font-face { font-family: "Cinzel"; font-weight: 700; font-display: swap; src: url(../fonts/games/cinzel-bold.ttf?v=9c4523bfd2) format("truetype"); }
@font-face { font-family: "Geologica"; font-weight: 100 900; font-display: swap; src: url(../fonts/games/geologica.ttf?v=9124d9e88a) format("truetype"); }
@font-face { font-family: "Lilita One"; font-display: swap; src: url(../fonts/games/lilita-one.ttf?v=f5b641c45c) format("truetype"); }
@font-face { font-family: "Yuji Syuku"; font-display: swap; src: url(../fonts/games/yuji-syuku-sub.woff2?v=de10c7f6e7) format("woff2"); }

:root {
  --bg: #160E0B;
  --bg-deep: #0F0A08;
  --surface: #1E1410;
  --surface-2: #2B1C15;
  --line: #3A2A22;
  --line-2: #3A2A22;
  --line-3: #5A4336;
  --text: #EFE6D2;
  --text-2: #D9CDB8;
  --muted: #B9A994;
  --ok: #4ADE80;
  --off: #8A8894;
  --err: #FF8A8E;
  --c-unbound: #F08A4B;
  --c-bleach: #EF5B5F;
  --c-isekai: #B794F6;
  --c-everlusting: #FFD66B;
  --serif: "Shippori Mincho", "Yu Mincho", serif;
  --sans: "Zen Kaku Gothic New", "Segoe UI", system-ui, sans-serif;
  --radius: 12px;
}

* { box-sizing: border-box; }
html { color-scheme: dark; }
body {
  margin: 0; min-height: 100vh; display: flex; flex-direction: column;
  background: var(--bg); color: var(--text);
  font-family: var(--sans); font-size: 15px; line-height: 1.55;
}
main { flex: 1 0 auto; }
a { color: var(--text); }
a:hover { color: #fff; }
h1, h2, h3, p { margin: 0; }
.wrap { width: 100%; max-width: 1240px; margin: 0 auto; padding: 0 24px; }
.muted { color: var(--muted); }
.mono, input.mono { font-family: Consolas, "Cascadia Mono", monospace; letter-spacing: 0.04em; }
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
:focus-visible { outline: 2px solid var(--text); outline-offset: 2px; }
[hidden] { display: none !important; }

/* ---- top bar ---- */
.topbar { background: var(--bg-deep); border-bottom: 1px solid var(--line); }
.topbar-in { display: flex; flex-wrap: wrap; align-items: center; gap: 12px 20px; padding-top: 14px; padding-bottom: 14px; }
.brand { display: flex; align-items: center; gap: 12px; text-decoration: none; }
.brand-mark {
  width: 40px; height: 40px; border-radius: 8px; background: var(--text); color: var(--bg);
  display: flex; align-items: center; justify-content: center; font-family: var(--serif); font-weight: 800; font-size: 24px;
}
.brand-name { font-family: var(--serif); font-weight: 800; font-size: 24px; letter-spacing: 0.02em; }
.mainnav { display: flex; flex-wrap: wrap; gap: 4px; flex: 1 1 auto; }
.mainnav a, .nav-soon { padding: 10px 14px; border-radius: 6px; text-decoration: none; color: var(--text-2); }
.mainnav a[aria-current="page"] { background: var(--surface-2); color: var(--text); font-weight: 500; }
.nav-soon { color: var(--muted); cursor: default; }
.nav-soon small { font-size: 11px; border: 1px solid var(--line-3); border-radius: 999px; padding: 0 6px; margin-left: 2px; }
.topbar-user { display: flex; align-items: center; gap: 10px; margin-left: auto; }
.topbar-user form { margin: 0; }
.avatar {
  flex: 0 0 auto; width: 36px; height: 36px; border-radius: 50%; background: #E8C27A; color: var(--bg);
  display: flex; align-items: center; justify-content: center; font-weight: 700;
}
.avatar-xs { width: 30px; height: 30px; font-size: 13px; }
.avatar-lg { width: 44px; height: 44px; font-size: 18px; }
img.avatar-face { display: block; object-fit: cover; background: #2B1C15; border: 2px solid #C9A25E; }
img.avatar-xs { border-width: 1px; }
.av-0 { background: #E8C27A; } .av-1 { background: #8FD3C8; } .av-2 { background: #9DB8F5; } .av-3 { background: #F2A7C3; }
.av-4 { background: #C9B6F2; } .av-5 { background: #F5B38A; } .av-6 { background: #A8D99B; } .av-7 { background: #E6A0A0; }
.uname { font-weight: 500; }

/* ---- buttons ---- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px; min-height: 44px; padding: 0 18px;
  border-radius: 8px; border: 1px solid var(--line-3); background: transparent; color: var(--text);
  font: inherit; font-weight: 500; text-decoration: none; cursor: pointer; white-space: nowrap;
}
.btn:hover { background: var(--surface-2); color: var(--text); }
.btn-primary { background: #F08A4B; border-color: #F08A4B; color: #160E0B; font-weight: 700; }
.btn-primary:hover { background: #FFA36A; border-color: #FFA36A; color: #160E0B; }
.btn-big { min-height: 48px; padding: 0 22px; font-weight: 700; }
.btn-line { border-color: var(--text); background: #160E0B66; }
.btn-paper { background: #F2EEE6; border-color: #F2EEE6; color: #111114; border-radius: 0; font-weight: 700; }
.btn-paper:hover { background: #fff; color: #111114; }
.btn-ghost { border-color: transparent; color: var(--text-2); }
.btn-small { min-height: 36px; padding: 0 12px; font-size: 14px; }
.btn-wide { width: 100%; }
.btn-disabled { border-style: dashed; color: var(--muted); cursor: default; }
.btn-disabled:hover { background: transparent; color: var(--muted); }
.text-link { font-weight: 700; }

/* ---- forms ---- */
.form { display: flex; flex-direction: column; gap: 16px; margin-top: 20px; }
.field { display: flex; flex-direction: column; gap: 6px; }
.field label { font-weight: 500; font-size: 14px; }
input[type="text"], input:not([type]), input[type="password"], select, textarea {
  width: 100%; min-height: 44px; padding: 0 12px; border-radius: 8px; border: 1px solid var(--line-3);
  background: var(--bg); color: var(--text); font: inherit;
}
input:focus, select:focus { border-color: var(--text-2); outline: none; box-shadow: 0 0 0 2px rgba(236, 232, 225, 0.25); }
.hint { font-size: 13px; color: var(--muted); }
.check { display: flex; align-items: center; gap: 10px; min-height: 32px; cursor: pointer; }
.check input { width: 18px; height: 18px; accent-color: var(--text); }
.note { border-radius: 8px; padding: 12px 14px; margin-top: 16px; display: flex; flex-direction: column; gap: 10px; }
.note-ok { background: #142A1D; border: 1px solid #22553A; color: #CFF5DD; }
.note-err { background: #2E1618; border: 1px solid #5E2A2E; color: #FFD7D9; }
.copy-row { display: flex; gap: 8px; flex-wrap: wrap; }
.copy-row input { flex: 1 1 280px; }

/* ---- auth pages ---- */
.auth { display: flex; flex-wrap: wrap; align-items: center; justify-content: center; gap: 48px; padding-top: 64px; padding-bottom: 64px; }
.auth-card {
  flex: 0 1 420px; background: var(--surface); border: 1px solid var(--line-2); border-radius: var(--radius); padding: 32px;
}
.auth-title { font-family: var(--serif); font-weight: 800; font-size: 32px; line-height: 1.2; margin-bottom: 6px; }
.auth-alt { margin-top: 20px; font-size: 14px; color: var(--muted); }
.auth-worlds { display: flex; flex-direction: column; gap: 14px; }
.world {
  width: 76px; height: 76px; border-radius: var(--radius); border: 1px solid var(--line-2); background: var(--surface);
  display: flex; align-items: center; justify-content: center; font-family: var(--serif); font-weight: 800; font-size: 48px;
}
.w-unbound { color: var(--c-unbound); }
.w-bleach { color: var(--c-bleach); }
.w-isekai { color: var(--c-isekai); }
.w-everlusting { color: var(--c-everlusting); }

/* ---- home ---- */
.kicker { color: var(--muted); font-size: 13px; letter-spacing: 0.14em; text-transform: uppercase; margin-bottom: 8px; }
.display { font-family: var(--serif); font-weight: 800; font-size: clamp(36px, 5vw, 60px); line-height: 1.1; }
.display-small { font-size: clamp(30px, 4vw, 42px); margin-bottom: 24px; }
.lead { margin-top: 16px; max-width: 640px; color: #B9B6BE; font-size: 17px; }
.section-title { font-family: var(--serif); font-weight: 800; font-size: 26px; margin-bottom: 16px; }

.game-status { display: flex; align-items: center; gap: 8px; font-size: 14px; }
.dot { flex: 0 0 auto; width: 8px; height: 8px; border-radius: 50%; background: var(--off); }
.status-online .dot { background: var(--ok); }

.columns { display: flex; flex-wrap: wrap; gap: 32px; align-items: flex-start; padding-top: 48px; padding-bottom: 64px; }
.col-main { flex: 999 1 560px; min-width: 0; }
.col-side { flex: 1 1 300px; min-width: 0; display: flex; flex-direction: column; gap: 20px; }
.card {
  min-width: 0; background: var(--surface); border: 1px solid var(--line-2); border-radius: var(--radius); padding: 20px;
  display: flex; flex-direction: column; gap: 10px;
}
.card-title { font-size: 16px; font-weight: 700; }
.empty { flex-direction: row; align-items: center; gap: 16px; padding: 28px 24px; color: var(--text-2); }
.empty svg { flex: 0 0 auto; color: var(--muted); }
.discord { display: flex; flex-direction: column; align-items: flex-start; gap: 10px; padding-top: 12px; margin-top: 2px; border-top: 1px solid var(--line); }
.btn-discord { background: #4752C4; border-color: #4752C4; color: #FFFFFF; }
.btn-discord:hover { background: #5865F2; border-color: #5865F2; color: #FFFFFF; }

/* ---- admin ---- */
.page { padding-top: 40px; padding-bottom: 64px; display: flex; flex-direction: column; gap: 24px; }
.page > .note { margin-top: 0; }
.page .card { padding: 24px; gap: 16px; }
.page .section-title { margin-bottom: 0; }
.inline-form { display: flex; flex-wrap: wrap; align-items: flex-end; gap: 12px; }
.inline-form .grow { flex: 1 1 260px; }
.inline-form select { min-width: 160px; }
.table-box { position: relative; overflow-x: auto; border: 1px solid var(--line-2); border-radius: 8px; }
table { width: 100%; border-collapse: collapse; font-size: 14px; }
th, td { text-align: left; padding: 10px 14px; border-top: 1px solid var(--line); vertical-align: middle; white-space: nowrap; }
thead th { border-top: 0; background: var(--bg-deep); color: var(--muted); font-weight: 500; white-space: nowrap; }
td.actions { text-align: right; }
td.actions form { display: inline-block; margin: 0 0 0 6px; }
.pill { display: inline-block; padding: 2px 10px; border-radius: 999px; font-size: 12px; font-weight: 500; white-space: nowrap; background: var(--surface-2); color: var(--text-2); }
.pill-open, .pill-active { background: #173325; color: #8EF0B4; }
.pill-locked, .pill-revoked { background: #3A1C1F; color: #FFB3B6; }
.pill-cooldown, .pill-no_password { background: #3A3018; color: #FFD98A; }

/* ---- forum ---- */
.area-unbound { --accent: var(--c-unbound); }
.area-bleach { --accent: var(--c-bleach); }
.area-isekai { --accent: var(--c-isekai); }
.area-everlusting { --accent: var(--c-everlusting); }
.area-camp { --accent: var(--text-2); }
.small { font-size: 13px; }
.text-strong { color: var(--text); }
.grow { flex: 1 1 320px; min-width: 0; }
.page-narrow { max-width: 960px; }
.page-head { display: flex; flex-wrap: wrap; align-items: flex-end; gap: 12px 16px; }
.page-head .display-small { margin-bottom: 4px; }
.head-actions { display: flex; flex-wrap: wrap; gap: 10px; }
.head-actions form { margin: 0; }
.crumbs { display: flex; flex-wrap: wrap; gap: 8px; font-size: 14px; color: var(--muted); }
.crumbs a { color: var(--muted); }
.crumb-area { color: var(--accent); }
.section-head { display: flex; align-items: center; gap: 12px; margin-bottom: 16px; }
.section-head .section-title { flex: 1 1 auto; margin-bottom: 0; }
.ico { flex: 0 0 auto; color: var(--muted); }
.tag { display: inline-block; padding: 0 8px; border-radius: 4px; border: 1px solid var(--line-3); font-size: 12px; font-weight: 700; color: var(--text-2); }
.tag-unbound { border-color: var(--c-unbound); color: var(--c-unbound); }
.tag-bleach { border-color: var(--c-bleach); color: var(--c-bleach); }
.tag-isekai { border-color: var(--c-isekai); color: var(--c-isekai); }
.tag-everlusting { border-color: var(--c-everlusting); color: var(--c-everlusting); }
.dot-unread { flex: 0 0 auto; width: 10px; height: 10px; border-radius: 50%; border: 1px solid var(--line-3); }
.is-unread .dot-unread { background: var(--text); border-color: var(--text); }
.thread-title .dot-unread { width: 8px; height: 8px; }

.area { background: var(--surface); border: 1px solid var(--line-2); border-top: 3px solid var(--accent); border-radius: var(--radius); overflow: hidden; }
.area-head { display: flex; align-items: center; gap: 14px; padding: 18px 22px; border-bottom: 1px solid var(--line); }
.area-mark {
  width: 40px; height: 40px; border-radius: 8px; background: var(--surface-2); color: var(--accent);
  display: flex; align-items: center; justify-content: center; font-family: var(--serif); font-weight: 800; font-size: 22px;
}
.area-head > div { line-height: 1.25; }
.area-kicker { color: var(--accent); font-size: 12px; font-weight: 700; letter-spacing: 0.16em; }
.area-name { font-family: var(--serif); font-weight: 800; font-size: 24px; }
.board-list, .thread-list, .gallery, .thumbs { list-style: none; margin: 0; padding: 0; }
.board-row { display: flex; flex-wrap: wrap; align-items: center; gap: 8px 20px; padding: 14px 22px; border-top: 1px solid var(--line); }
.board-row:first-child { border-top: 0; }
.board-main { flex: 1 1 260px; min-width: 0; display: flex; flex-direction: column; text-decoration: none; line-height: 1.35; }
.board-name { font-size: 16px; font-weight: 500; }
.is-unread .board-name { font-weight: 700; }
.board-desc { font-size: 13px; color: var(--muted); }
.board-count { flex: 0 0 110px; font-size: 13px; color: var(--muted); line-height: 1.35; }
.board-count strong { color: var(--text); }
.board-last { flex: 0 1 300px; min-width: 0; display: flex; flex-direction: column; font-size: 13px; color: var(--muted); line-height: 1.35; }
.board-last a { color: var(--text-2); text-decoration: none; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.board-last a:hover { text-decoration: underline; }

.thread-list { background: var(--surface); border: 1px solid var(--line-2); border-radius: var(--radius); overflow: hidden; }
.thread-list.accent-top { border-top: 3px solid var(--accent); }
.thread-row { display: flex; flex-wrap: wrap; align-items: center; gap: 6px 16px; padding: 14px 20px; border-top: 1px solid var(--line); }
.thread-row:first-child { border-top: 0; }
.thread-row.is-pinned { background: var(--surface-2); }
.thread-main { flex: 1 1 300px; min-width: 0; display: flex; flex-direction: column; gap: 2px; }
.thread-title { display: block; font-size: 16px; font-weight: 500; line-height: 1.4; }
.thread-title > * { vertical-align: middle; }
.thread-title .dot-unread, .thread-title .ico { display: inline-block; margin-right: 6px; }
.thread-title .pill, .thread-title a + .ico { margin-left: 6px; }
.thread-title a { text-decoration: none; overflow-wrap: anywhere; }
.thread-title a:hover { text-decoration: underline; }
.is-unread .thread-title { font-weight: 700; }
.thread-meta { font-size: 13px; color: var(--muted); }
.thread-replies { flex: 0 0 72px; display: flex; flex-direction: column; align-items: flex-end; font-size: 12px; color: var(--muted); line-height: 1.25; }
.thread-replies strong { font-size: 16px; color: var(--text); }
.thread-last { flex: 0 0 150px; display: flex; flex-direction: column; font-size: 13px; color: var(--muted); text-decoration: none; line-height: 1.35; }
.thread-last span { color: var(--text-2); }
.thread-last:hover span { text-decoration: underline; }
.chips { display: flex; flex-wrap: wrap; gap: 8px; margin-bottom: 16px; }
.chip { min-height: 40px; padding: 0 16px; border-radius: 999px; border: 1px solid var(--line-3); display: inline-flex; align-items: center; text-decoration: none; font-size: 14px; color: var(--text-2); }
.chip.is-on { background: var(--text); border-color: var(--text); color: var(--bg); font-weight: 500; }
.chip-unbound.is-on { background: var(--c-unbound); border-color: var(--c-unbound); }
.chip-bleach.is-on { background: var(--c-bleach); border-color: var(--c-bleach); }
.chip-isekai.is-on { background: var(--c-isekai); border-color: var(--c-isekai); }
.chip-everlusting.is-on { background: var(--c-everlusting); border-color: var(--c-everlusting); }
.more-link { margin-top: 12px; }

.pager { display: flex; flex-wrap: wrap; gap: 6px; justify-content: center; }
.pager-num, .pager-step {
  min-width: 40px; height: 40px; padding: 0 12px; border-radius: 8px; border: 1px solid var(--line-3);
  display: inline-flex; align-items: center; justify-content: center; text-decoration: none;
}
.pager-num[aria-current] { background: var(--text); border-color: var(--text); color: var(--bg); font-weight: 700; }
.pager-gap { align-self: center; color: var(--muted); }

.thread-h1 { font-family: var(--serif); font-weight: 800; font-size: clamp(26px, 3.5vw, 38px); line-height: 1.2; margin-bottom: 6px; overflow-wrap: anywhere; }
.page-head .muted .pill { margin-right: 4px; }
.modbar { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; padding: 10px 14px; border: 1px dashed var(--line-3); border-radius: var(--radius); }
.modbar form { margin: 0; display: flex; flex-wrap: wrap; gap: 6px; max-width: 100%; min-width: 0; }
.modbar-label { font-size: 13px; color: var(--muted); margin-left: 4px; }
.modbar select { min-height: 36px; width: auto; max-width: 240px; flex: 1 1 160px; min-width: 0; font-size: 14px; }
.btn-danger { border-color: #5E2A2E; color: #FFB3B6; }
.btn-danger:hover { background: #2E1618; color: #FFD7D9; }
.posts { display: flex; flex-direction: column; gap: 16px; }
.post { background: var(--surface); border: 1px solid var(--line-2); border-radius: var(--radius); padding: 22px 24px; display: flex; flex-direction: column; gap: 14px; min-width: 0; }
.post:target { border-color: var(--accent); }
.post.is-deleted { background: transparent; border-style: dashed; padding: 14px 24px; }
.post-head { display: flex; align-items: center; gap: 12px; }
.post-who { line-height: 1.3; }
.post-time { display: inline-block; margin-left: 6px; font-size: 13px; color: var(--muted); text-decoration: none; }
.post-time:hover { text-decoration: underline; }
.post-body { overflow-wrap: anywhere; }
.post-body > :not(:first-child) { margin-top: 10px; }
.post-body ul, .post-body ol { margin: 0; padding-left: 22px; }
.post-body blockquote { margin: 0; padding: 4px 14px; border-left: 3px solid var(--line-3); color: var(--text-2); }
.post-body blockquote p + p { margin-top: 6px; }
.post-body code { font-family: Consolas, "Cascadia Mono", monospace; font-size: 0.92em; background: var(--surface-2); padding: 1px 5px; border-radius: 4px; }
.post-body pre { margin: 0; padding: 12px 14px; background: var(--bg-deep); border: 1px solid var(--line-2); border-radius: 8px; overflow-x: auto; }
.post-body pre code { background: none; padding: 0; }
.gallery { display: flex; flex-wrap: wrap; gap: 10px; }
.gallery li { flex: 0 1 auto; min-width: 0; }
.gallery a { display: block; }
.gallery img { display: block; height: 220px; width: auto; max-width: 100%; object-fit: cover; border-radius: 8px; border: 1px solid var(--line-2); }
.post-actions { display: flex; flex-wrap: wrap; gap: 4px; margin-top: -4px; }
.post-actions form { margin: 0; }

.compose { padding: 24px; gap: 18px; }
.field-row { display: flex; flex-wrap: wrap; gap: 16px; }
.field-row .field:first-child:not(.grow) { flex: 1 1 260px; }
.field-row .grow { flex: 3 1 340px; }
.form-actions { display: flex; flex-wrap: wrap; justify-content: flex-end; gap: 10px; border-top: 1px solid var(--line); padding-top: 18px; }
.editor { display: flex; flex-direction: column; gap: 8px; }
.editor-head { display: flex; flex-wrap: wrap; align-items: flex-end; gap: 8px; }
.editor-label { flex: 1 1 auto; font-weight: 500; font-size: 14px; }
.editor-tabs { display: flex; gap: 4px; }
.editor-tabs button { min-height: 36px; padding: 0 14px; border-radius: 8px; border: 1px solid var(--line-3); background: transparent; color: var(--text-2); font: inherit; font-size: 14px; cursor: pointer; }
.editor-tabs button[aria-selected="true"] { background: var(--text); border-color: var(--text); color: var(--bg); }
.editor-box { border: 1px solid var(--line-3); border-radius: 8px; overflow: hidden; }
.editor-box:focus-within { border-color: var(--text-2); }
.toolbar { display: flex; flex-wrap: wrap; gap: 2px; padding: 6px; background: var(--bg-deep); border-bottom: 1px solid var(--line); }
.toolbar button { min-width: 36px; height: 36px; border-radius: 6px; border: 0; background: transparent; color: var(--text); font: inherit; cursor: pointer; display: inline-flex; align-items: center; justify-content: center; gap: 6px; }
.toolbar button:hover { background: var(--surface-2); }
.toolbar .toolbar-text { padding: 0 10px; font-size: 14px; }
.toolbar-sep { width: 1px; margin: 4px 6px; background: var(--line-2); }
.editor textarea { display: block; width: 100%; min-height: 200px; border: 0; border-radius: 0; padding: 14px; background: var(--bg); resize: vertical; }
.editor textarea:focus { outline: none; box-shadow: none; }
.editor-preview { min-height: 200px; border: 1px solid var(--line-3); border-radius: 8px; padding: 14px 16px; background: var(--bg); }
.uploads { display: flex; flex-direction: column; gap: 10px; margin-top: 8px; }
.uploads-title { font-weight: 500; font-size: 14px; }
.uploads-title .muted { font-weight: 400; }
.thumbs { display: flex; flex-wrap: wrap; gap: 12px; }
.thumb { width: 160px; border: 1px solid var(--line-2); border-radius: 8px; overflow: hidden; background: var(--bg); }
.thumb img { display: block; width: 160px; height: 100px; object-fit: cover; }
.thumb-bar { display: flex; align-items: center; gap: 6px; padding: 6px 8px; font-size: 12px; color: var(--text-2); min-height: 0; }
.thumb-bar span { flex: 1 1 auto; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.thumb-bar button { width: 28px; height: 28px; border-radius: 6px; border: 0; background: transparent; color: var(--muted); cursor: pointer; }
.thumb-bar.check input { width: 16px; height: 16px; }
.thumb-add label {
  position: relative; width: 160px; height: 136px; border: 1px dashed var(--line-3); border-radius: 8px;
  display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 6px; color: var(--muted); font-size: 13px; cursor: pointer;
}
.thumb-add label:hover, .thumb-add label:focus-within { border-color: var(--text-2); color: var(--text); }
.uploads .note { margin-top: 0; }

/* ---- members + profiles ---- */
.me-link { display: flex; align-items: center; gap: 10px; text-decoration: none; }
.avatar-xl { width: 96px; height: 96px; font-family: var(--serif); font-weight: 800; font-size: 44px; }
.dot-on, .status-online .dot { background: var(--ok); }
.tag-everlusting { border-color: var(--c-everlusting); color: var(--c-everlusting); }
.member-list { list-style: none; margin: 0; padding: 0; background: var(--surface); border: 1px solid var(--line-2); border-radius: var(--radius); overflow: hidden; }
.member-row { display: flex; flex-wrap: wrap; align-items: center; gap: 10px 16px; padding: 16px 20px; border-top: 1px solid var(--line); }
.member-row:first-child { border-top: 0; }
.member-main { flex: 1 1 220px; min-width: 0; line-height: 1.35; }
.member-name { font-weight: 700; font-size: 17px; text-decoration: none; margin-right: 6px; }
.member-name:hover { text-decoration: underline; }
.member-status { display: flex; align-items: center; gap: 8px; font-size: 13px; color: var(--muted); margin-top: 2px; }
.member-games { display: flex; flex-wrap: wrap; gap: 6px; }
.online-list { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 10px; }
.online-list li { display: flex; align-items: center; gap: 10px; }
.online-list a { flex: 1 1 auto; text-decoration: none; font-weight: 500; }
.online-list a:hover { text-decoration: underline; }

.profile-head { padding-top: 40px; }
.profile-who { display: flex; flex-wrap: wrap; align-items: center; gap: 20px 24px; }
.profile-name { font-family: var(--serif); font-weight: 800; font-size: clamp(34px, 5vw, 44px); line-height: 1.1; margin-bottom: 6px; }
.profile-name .tag { font-family: var(--sans); font-size: 13px; vertical-align: middle; }
.game-tabs { display: flex; flex-wrap: wrap; margin-top: 28px; border-bottom: 1px solid var(--line); }
.game-tab { padding: 14px 22px 12px; text-decoration: none; border-bottom: 3px solid transparent; margin-bottom: -1px; display: flex; flex-direction: column; line-height: 1.3; color: #B9B6BE; }
.game-tab strong { font-size: 17px; }
.game-tab-kicker { font-size: 11px; font-weight: 700; letter-spacing: 0.16em; color: var(--muted); }
.game-tab-sub { font-size: 13px; color: var(--muted); min-height: 1.3em; }
.game-tab:hover { color: var(--text); }
.game-tab[aria-current] { color: var(--text); border-bottom-color: var(--accent); }
.game-tab[aria-current] .game-tab-kicker { color: var(--accent); }
.tab-unbound { --accent: var(--c-unbound); } .tab-bleach { --accent: var(--c-bleach); }
.tab-isekai { --accent: var(--c-isekai); } .tab-everlusting { --accent: var(--c-everlusting); }
.game-panel { position: relative; overflow: hidden; }
.panel-in { padding-top: 44px; padding-bottom: 56px; display: flex; flex-direction: column; gap: 40px; position: relative; }
.panel-foot { font-size: 13px; opacity: 0.75; }
.bar { display: block; width: 100%; height: 12px; }

/* Unbound: lacquer + ember, Shojumaru */
.panel-unbound { background: #160E0B; color: #EFE6D2; border-top: 1px solid #3A2A22; }
.panel-unbound .panel-foot { color: #B9A994; }
.u-layout { display: flex; flex-wrap: wrap; gap: 40px; align-items: flex-start; }
.u-side { flex: 1 1 280px; min-width: 0; display: flex; flex-direction: column; gap: 24px; }
.u-main { flex: 999 1 560px; min-width: 0; display: flex; flex-direction: column; gap: 44px; }
.u-card { display: flex; flex-direction: column; align-items: center; text-align: center; gap: 10px; padding: 28px 20px; border: 1px solid #3A2A22; background: #1E1410; }
.u-ring { position: relative; width: 140px; height: 140px; }
.u-ring svg { position: absolute; inset: 0; }
.u-disc { position: absolute; inset: 14px; border-radius: 50%; background: #2B1C15; border: 2px solid #C9A25E; display: flex; align-items: center; justify-content: center; font-family: var(--serif); font-weight: 800; font-size: 48px; }
img.u-face { width: calc(100% - 28px); height: calc(100% - 28px); object-fit: cover; }
.u-name { font-family: "Shojumaru", var(--serif); font-size: 22px; line-height: 1.25; overflow-wrap: break-word; max-width: 100%; }
.u-muted, .u-sub { color: #B9A994; }
.u-sub { font-size: 13px; letter-spacing: 0.12em; text-transform: uppercase; margin-bottom: 8px; }
.u-power { display: flex; flex-direction: column; line-height: 1.2; }
.u-power span { font-size: 12px; letter-spacing: 0.14em; color: #B9A994; text-transform: uppercase; }
.u-power strong { font-size: 26px; color: #F08A4B; }
.u-facts { margin: 0; display: grid; grid-template-columns: 1fr auto; gap: 10px 16px; border-top: 1px solid #3A2A22; padding-top: 18px; }
.u-facts dt { color: #B9A994; } .u-facts dd { margin: 0; font-weight: 700; }
.u-h { display: flex; align-items: baseline; gap: 14px; border-bottom: 1px solid #3A2A22; padding-bottom: 10px; margin-bottom: 18px; font-family: "Shojumaru", var(--serif); font-weight: 400; font-size: 24px; }
.u-h span { font-family: var(--serif); font-weight: 800; font-size: 22px; color: #F08A4B; }
.u-team { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(auto-fill, minmax(190px, 1fr)); gap: 12px; }
.u-hero { border: 1px solid #3A2A22; background: #1E1410; padding: 14px 16px; display: flex; align-items: center; gap: 12px; }
.u-hdisc { width: 48px; height: 48px; flex: 0 0 auto; border-radius: 50%; background: #2B1C15; border: 2px solid #C9A25E; object-fit: cover; display: flex; align-items: center; justify-content: center; font-family: var(--serif); font-weight: 800; font-size: 20px; color: #C9A25E; }
.u-htext { display: flex; flex-direction: column; gap: 3px; min-width: 0; }
.u-hero.is-reserve { background: transparent; border-style: dashed; }
.u-role { font-size: 12px; letter-spacing: 0.12em; color: #B9A994; text-transform: uppercase; }
.u-hero strong { font-size: 17px; }
.q1 { color: #EFE6D2; } .q2 { color: #8FDC7A; } .q3 { color: #8EC5FF; } .q4 { color: #D59CF5; } .q5 { color: #F5A55C; }
.u-recent { list-style: none; margin: 0; padding: 0; }
.u-recent li { display: flex; align-items: center; gap: 14px; padding: 12px 0; border-top: 1px solid #3A2A22; }
.u-recent li:last-child { border-bottom: 1px solid #3A2A22; }
.u-seal { width: 36px; height: 36px; flex: 0 0 auto; background: #A3241B; color: #F7E9D7; display: flex; align-items: center; justify-content: center; font-family: var(--serif); font-weight: 800; }
.u-seal.is-secret { background: #C9A25E; color: #160E0B; }
.u-gold { color: #C9A25E; font-size: 13px; }
.u-map { display: flex; flex-wrap: wrap; gap: 20px 32px; align-items: center; }
.u-bar-label { display: flex; justify-content: space-between; font-size: 14px; color: #B9A994; margin-bottom: 8px; }
.u-bar-label strong { color: #EFE6D2; }

/* Reishi Vanguard: paper, ink, one red */
.panel-bleach { background: #F2EEE6; color: #111114; }
.panel-bleach .panel-foot, .b-muted { color: #4A474F; }
.b-vertical { position: absolute; right: 24px; top: 40px; writing-mode: vertical-rl; font-family: "Yuji Syuku", var(--serif); font-size: 150px; line-height: 1; opacity: 0.06; pointer-events: none; }
.b-head { display: flex; flex-wrap: wrap; gap: 24px 40px; align-items: flex-end; border-bottom: 2px solid #111114; padding-bottom: 28px; }
.b-face { width: 112px; height: 112px; flex: 0 0 auto; object-fit: cover; border: 2px solid #111114; background: #E4DED3; align-self: center; }
.b-kicker { font-size: 13px; font-weight: 700; letter-spacing: 0.22em; color: #B0101F; text-transform: uppercase; }
.b-name { font-family: var(--serif); font-weight: 800; font-size: clamp(48px, 7vw, 84px); line-height: 1.05; margin: 6px 0; overflow-wrap: anywhere; }
.b-power { text-align: right; display: flex; flex-direction: column; }
.b-power span { font-size: 12px; font-weight: 700; letter-spacing: 0.22em; color: #4A474F; text-transform: uppercase; }
.b-power strong { font-family: var(--serif); font-weight: 800; font-size: 60px; line-height: 1.05; }
.b-stats { margin: 0; display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); border-top: 1px solid #111114; border-bottom: 1px solid #111114; }
.b-stats div { padding: 14px 0 14px 18px; border-left: 1px solid #C9C3B8; }
.b-stats div:first-child { padding-left: 0; border-left: 0; }
.b-stats dt { font-size: 13px; color: #4A474F; } .b-stats dd { margin: 0; font-family: var(--serif); font-weight: 800; font-size: 28px; }
.b-h { display: flex; flex-wrap: wrap; align-items: baseline; gap: 8px 16px; margin-bottom: 16px; }
.b-h h2 { font-family: var(--serif); font-weight: 800; font-size: 28px; }
.b-num { font-family: "Yuji Syuku", var(--serif); font-size: 32px; color: #B0101F; }
.b-right { margin-left: auto; font-size: 14px; }
.b-stages { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); border-left: 1px solid #111114; border-top: 1px solid #111114; }
.b-stages li { border-right: 1px solid #111114; border-bottom: 1px solid #111114; padding: 10px 12px; min-height: 68px; display: flex; flex-direction: column; justify-content: space-between; }
.b-stages span { font-size: 12px; letter-spacing: 0.08em; }
.b-stages strong { font-family: var(--serif); font-weight: 800; font-size: 26px; line-height: 1; }
.b-stages .is-top { background: #111114; color: #F2EEE6; }
.b-stages .is-low { color: #4A474F; }
.b-stages .is-open { color: #66626B; }
.b-cols { display: flex; flex-wrap: wrap; gap: 40px; }
.b-cols > .grow { flex: 1 1 420px; }
.b-tourney-col { flex: 1 1 320px; min-width: 0; }
.b-partners { list-style: none; margin: 0; padding: 0; border-top: 1px solid #111114; }
.b-partners li { display: flex; align-items: center; gap: 14px; padding: 12px 0; border-bottom: 1px solid #C9C3B8; }
.b-partners .grow { display: flex; flex-direction: column; line-height: 1.3; }
.b-badge { width: 42px; height: 42px; flex: 0 0 auto; border: 1px solid #111114; display: flex; align-items: center; justify-content: center; font-family: var(--serif); font-weight: 800; font-size: 20px; }
.b-badge.is-main { background: #111114; color: #F2EEE6; }
img.b-badge { object-fit: cover; background: #E4DED3; }
img.b-badge.is-main { border: 2px solid #B0101F; }
.b-sub { margin: 24px 0 10px; font-size: 13px; letter-spacing: 0.18em; color: #4A474F; text-transform: uppercase; }
.b-equip { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(6, minmax(0, 1fr)); gap: 8px; }
.b-equip li { aspect-ratio: 1; border: 1px solid #111114; display: flex; align-items: flex-end; justify-content: center; padding-bottom: 6px; font-size: 12px; }
.b-equip .is-ultimate { border: 2px solid #E07A1F; }
.b-equip .is-empty { border-style: dashed; border-color: #8C8790; color: #4A474F; }
.b-tourney { background: #111114; color: #F2EEE6; padding: 22px; display: flex; flex-direction: column; gap: 12px; }
.b-tag { font-size: 13px; letter-spacing: 0.16em; color: #C9C3B8; }
.b-round { font-family: var(--serif); font-weight: 800; font-size: 32px; line-height: 1.15; }
.b-tourney dl { margin: 0; display: grid; grid-template-columns: 1fr auto; gap: 8px 16px; font-size: 14px; border-top: 1px solid #3A3A40; padding-top: 12px; }
.b-tourney dt { color: #C9C3B8; } .b-tourney dd { margin: 0; font-weight: 700; }

/* Waifu Overlord: violet night, round, Lilita One */
.panel-isekai { background: #1C1530; color: #F6EFFF; font-family: "Geologica", var(--sans); }
.panel-isekai .panel-foot, .i-muted { color: #C3B6DA; }
.i-top { display: flex; flex-wrap: wrap; gap: 14px; align-items: center; }
.i-top > .i-chips { flex: 1 1 520px; }
.i-avatar { position: relative; width: 120px; height: 120px; flex: 0 0 auto; }
.i-avatar-pic { position: absolute; inset: 15%; width: 70%; height: 70%; object-fit: cover; }
.i-avatar-frame { position: absolute; inset: 0; width: 100%; height: 100%; }
.i-chips { display: grid; grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)); gap: 14px; }
.i-chip { background: #271E40; border-radius: 20px; padding: 18px 20px; display: flex; flex-direction: column; gap: 2px; font-size: 13px; color: #C3B6DA; }
.i-chip strong { font-family: "Lilita One", var(--sans); font-weight: 400; font-size: 36px; line-height: 1.1; color: #F6EFFF; }
.i-gold { color: #FFD27A !important; } .i-pink { color: #FF8FB8 !important; } .i-mint { color: #8FE3C8 !important; }
.i-h { font-family: "Lilita One", var(--sans); font-weight: 400; font-size: 30px; margin-bottom: 16px; }
.i-h-small { font-size: 24px; margin-bottom: 12px; }
.i-girls { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(auto-fill, minmax(180px, 1fr)); gap: 16px; }
.i-girl { background: #271E40; border-radius: 20px; border: 2px solid var(--rc); overflow: hidden; }
.rarity-mythic { --rc: #FF6FA8; } .rarity-legendary { --rc: #FFC75A; } .rarity-epic { --rc: #C38BFF; } .rarity-rare { --rc: #6FB7FF; }
.i-portrait { position: relative; aspect-ratio: 3 / 4; background: #33284F; display: flex; align-items: flex-end; justify-content: center; }
.i-portrait svg { width: 70%; fill: #463A68; }
.i-card { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; object-position: top; }
.i-rarity { position: absolute; top: 10px; left: 10px; padding: 2px 10px; border-radius: 999px; background: var(--rc); color: #1C1530; font-size: 12px; font-weight: 700; }
.i-girl-text { padding: 12px 14px 14px; display: flex; flex-direction: column; gap: 4px; }
.i-girl-text strong { font-family: "Lilita One", var(--sans); font-weight: 400; font-size: 20px; line-height: 1.1; }
.i-stars span { color: #463A68; } .i-stars span.on { color: #FFD27A; }
.i-cols { display: flex; flex-wrap: wrap; gap: 20px; }
.i-box { flex: 1 1 320px; background: #271E40; border-radius: 20px; padding: 22px; }
.i-pets { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 10px; }
.i-pets li { display: flex; align-items: center; gap: 10px; }
.i-pet-mark { width: 12px; height: 12px; border-radius: 50%; border: 2px solid #8FE3C8; flex: 0 0 auto; }
.i-pet-mark.is-placed { background: #8FE3C8; }
.i-pet-icon { width: 40px; height: 40px; flex: 0 0 auto; border-radius: 50%; border: 2px solid transparent; }
.i-pet-icon.is-placed { border-color: #8FE3C8; }
.i-pass { display: grid; grid-template-columns: repeat(20, minmax(0, 1fr)); gap: 4px; }
.i-pass span { height: 14px; border-radius: 4px; background: #3A2F55; }
.i-pass span.prem { background: #5A4A2E; }
.i-pass span.on { background: #B794F6; }
.i-pass span.on.prem { background: #FFD27A; }

/* Everlusting Life: night blue + gold, Cinzel */
.panel-everlusting { background: #070B1C; color: #F2F5FF; font-family: "Geologica", var(--sans); border-top: 1px solid #1F3576; }
.panel-everlusting .panel-foot, .e-muted { color: #9FB0D8; }
.e-hero { display: flex; flex-wrap: wrap; gap: 24px 28px; align-items: center; background: #0D1630; border: 1px solid #1F3576; border-radius: 16px; padding: 26px; }
.e-avatar { width: 110px; height: 110px; border-radius: 50%; border: 3px solid #FFD66B; background: #0F1834; display: flex; align-items: center; justify-content: center; font-family: "Cinzel", var(--serif); font-weight: 700; font-size: 44px; color: #FFD66B; }
img.e-avatar { object-fit: cover; padding: 0; }
.e-kicker { font-size: 12px; letter-spacing: 0.2em; color: #FFD66B; font-weight: 700; }
.e-name { font-family: "Cinzel", var(--serif); font-weight: 700; font-size: 36px; line-height: 1.15; overflow-wrap: anywhere; }
.e-big { display: flex; gap: 28px; flex-wrap: wrap; }
.e-big div { display: flex; flex-direction: column; align-items: center; text-align: center; }
.e-big strong { font-family: "Cinzel", var(--serif); font-weight: 700; font-size: 42px; line-height: 1; }
.e-big span { font-size: 13px; color: #9FB0D8; margin-top: 6px; }
.e-gold { color: #FFD66B; }
.e-h { font-family: "Cinzel", var(--serif); font-weight: 700; font-size: 26px; margin-bottom: 16px; }
.e-h-small { font-size: 22px; margin-bottom: 12px; }
.e-army { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(auto-fill, minmax(170px, 1fr)); gap: 14px; }
.e-army li { background: #0D1630; border: 1px solid var(--gc); border-radius: 14px; overflow: hidden; }
.grade-1 { --gc: #56648C; } .grade-2 { --gc: #7FA2FF; } .grade-3 { --gc: #FFD66B; }
.e-portrait { aspect-ratio: 1 / 1; background: #0F1834; display: flex; align-items: center; justify-content: center; font-family: "Cinzel", var(--serif); font-weight: 700; font-size: 40px; color: var(--gc); }
img.e-portrait { display: block; width: 100%; height: auto; object-fit: cover; }
.e-unit { padding: 10px 12px 12px; display: flex; flex-direction: column; line-height: 1.35; }
.e-stars { color: #FFD66B; }
.e-cols { display: flex; flex-wrap: wrap; gap: 20px; }
.e-box { flex: 1 1 320px; background: #0D1630; border: 1px solid #1F3576; border-radius: 16px; padding: 22px; }
.e-box dl { margin: 0; display: grid; grid-template-columns: 1fr auto; gap: 10px 16px; }
.e-box dt { color: #9FB0D8; } .e-box dd { margin: 0; font-weight: 700; }

/* admin: game accounts */
.links-table th[scope="row"] { font-weight: 700; color: var(--text); vertical-align: top; padding-top: 14px; }
.links-table td { white-space: normal; vertical-align: top; min-width: 180px; }
.links-table td form { margin: 6px 0 0; }
.links-table td form .btn-ghost { padding-left: 0; }
.link-form { display: flex; flex-wrap: wrap; gap: 6px; }
.link-form select { min-height: 36px; width: auto; max-width: 220px; font-size: 14px; }
.linked { display: block; }
.th-unbound { color: var(--c-unbound) !important; } .th-bleach { color: var(--c-bleach) !important; }
.th-isekai { color: var(--c-isekai) !important; } .th-everlusting { color: var(--c-everlusting) !important; }
.columns-tight { padding: 0; }
.free-list { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 8px; font-size: 14px; }
.push-list { margin: 0; display: grid; grid-template-columns: auto 1fr; gap: 8px 16px; font-size: 14px; }
.push-list dt { font-weight: 700; } .push-list dd { margin: 0; display: flex; flex-direction: column; }
.push-stale { color: #FFB3B6; }

/* ---- start page: Unbound in front, Bleach as the next gate ---- */
.is-home .topbar { position: absolute; left: 0; right: 0; z-index: 5; border-bottom: 0; background: linear-gradient(#160E0BEE, #160E0B00); }
.is-home .mainnav a { color: var(--text); }
.is-home .mainnav a[aria-current="page"] { background: #EFE6D21F; }
.hero { position: relative; min-height: 680px; overflow: hidden; background: var(--bg) url(/art/unbound/site/konoha.webp) center top / cover no-repeat; }
.hero::after { content: ""; position: absolute; inset: 0; background: linear-gradient(90deg, #160E0BD9 0%, #160E0B80 38%, #160E0B00 62%), linear-gradient(#160E0B00 55%, #160E0B 100%); }
.hero-in { position: relative; z-index: 2; display: flex; flex-direction: column; align-items: flex-start; gap: 18px; padding-top: 150px; padding-bottom: 150px; }
.hero-h { width: 100%; font-family: var(--serif); font-weight: 800; font-size: 56px; line-height: 1.1; }
.hero-logo { display: block; width: min(560px, 100%); height: auto; margin-left: -14px; }
.hero-claim { max-width: 480px; font-size: 18px; color: #F4ECDD; }
.hero-btns { display: flex; flex-wrap: wrap; gap: 12px; }
.hero-figure { position: absolute; z-index: 1; right: max(24px, calc(50% - 620px)); bottom: 60px; height: 560px; width: auto; }
.hero .game-status { color: #F4ECDD; }
.hero .status-online .dot { animation: pulse 2.4s ease-in-out infinite; }
@keyframes pulse { 50% { box-shadow: 0 0 0 6px #4ADE8033; } }
.leaf { position: absolute; z-index: 2; top: -30px; width: 18px; height: auto; opacity: 0.9; animation: leaf-fall linear infinite; }
.leaf-1 { left: 58%; animation-duration: 13s; }
.leaf-2 { left: 74%; animation-duration: 17s; animation-delay: -6s; }
.leaf-3 { left: 90%; animation-duration: 15s; animation-delay: -11s; }
.leaf-4 { left: 40%; animation-duration: 19s; animation-delay: -3s; }
@keyframes leaf-fall { 100% { transform: translate(-220px, 760px) rotate(540deg); } }
.roster { position: relative; z-index: 3; margin-top: -96px; }
.roster-in { display: flex; flex-wrap: wrap; align-items: center; gap: 14px 32px; min-height: 96px; padding: 18px 24px; background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); }
.roster-title { font-size: 13px; font-weight: 500; letter-spacing: 0.14em; text-transform: uppercase; color: var(--muted); }
.roster-list { list-style: none; margin: 0; padding: 0; display: flex; flex-wrap: wrap; gap: 12px 32px; }
.roster-who { display: flex; align-items: center; gap: 12px; min-height: 56px; text-decoration: none; }
.roster-who strong, .roster-who small { display: block; line-height: 1.3; }
.roster-who small { font-size: 13px; color: var(--muted); }
.roster-who .avatar { width: 56px; height: 56px; transition: transform 0.15s; }
.roster-who:hover .avatar { transform: translateY(-2px); }
.gate { position: relative; background: #090A0E url(/art/bleach/site/hueco.webp) center top / cover no-repeat; color: #F2EEE6; }
.gate::after { content: ""; position: absolute; inset: 0; background: linear-gradient(90deg, #090A0EE6 0%, #090A0E80 45%, #090A0E1A 75%); }
.gate-in { position: relative; z-index: 2; display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 32px; padding-top: 72px; padding-bottom: 72px; }
.gate-text { flex: 1 1 420px; min-width: 0; display: flex; flex-direction: column; align-items: flex-start; gap: 18px; }
.gate-logo { display: block; width: min(460px, 100%); height: auto; }
.gate-soon { margin-bottom: 6px; font-size: 13px; font-weight: 700; letter-spacing: 0.22em; text-transform: uppercase; color: #FF7B80; }
.gate-date { font-family: var(--serif); font-weight: 800; font-size: clamp(56px, 8vw, 96px); line-height: 1; }
.gate-lead { max-width: 460px; font-size: 17px; color: #D9D6D0; }
.gate-sign { flex: 0 0 auto; width: 112px; padding: 24px 0 28px; display: flex; flex-direction: column; align-items: center; gap: 18px; background: #F2EEE6; color: #111114; box-shadow: 0 18px 40px #000000B3; transform-origin: top center; animation: sign-sway 6s ease-in-out infinite; }
.gate-sign b { writing-mode: vertical-rl; font-family: "Yuji Syuku", var(--serif); font-weight: 400; font-size: 48px; line-height: 1; }
.gate-sign i { width: 14px; height: 14px; border-radius: 50%; background: #B0101F; }
@keyframes sign-sway { 50% { transform: rotate(1.5deg); } }

/* ---- forum overview: worlds with board tiles ---- */
.realm { border-radius: var(--radius); overflow: hidden; border: 1px solid var(--line); }
.realm-banner { position: relative; display: flex; align-items: center; min-height: 190px; padding: 20px 28px; overflow: hidden; background-size: cover; background-repeat: no-repeat; }
.realm-unbound .realm-banner { background-color: var(--surface-2); background-image: linear-gradient(90deg, #160E0BE0 0%, #160E0B66 45%, #160E0B00 75%), url(/art/unbound/site/konoha.webp); background-position: center 26%; }
.realm-bleach .realm-banner { background-color: #090A0E; background-image: linear-gradient(90deg, #090A0EE6 0%, #090A0E8C 50%, #090A0E1A 80%), url(/art/bleach/site/hueco.webp); background-position: center 20%; }
.realm-logo { display: block; width: min(330px, 70vw); height: auto; }
.realm-figure { position: absolute; right: 90px; bottom: -96px; height: 320px; width: auto; }
.realm-head { display: flex; align-items: center; gap: 14px; padding: 18px 22px; background: var(--surface); border-bottom: 1px solid var(--line); }
.tiles { list-style: none; margin: 0; padding: 0; display: flex; flex-wrap: wrap; gap: 1px; background: var(--line); }
.tile-cell { flex: 1 1 200px; min-width: 0; display: flex; }
.tile { position: relative; flex: 1 1 auto; min-width: 0; min-height: 230px; padding: 20px; display: flex; flex-direction: column; gap: 10px; background: var(--surface); text-decoration: none; transition: background 0.15s; }
.tile:hover { background: var(--surface-2); color: var(--text); }
.tile-seal { flex: 0 0 auto; width: 52px; height: 52px; border-radius: 4px; display: flex; align-items: center; justify-content: center; background: #A3241B; color: #F7E9D7; font-family: var(--serif); font-weight: 800; font-size: 30px; transition: transform 0.15s; }
.tile:hover .tile-seal { transform: rotate(-6deg) scale(1.08); }
.tile-name { font-size: 17px; font-weight: 700; line-height: 1.3; }
.tile-desc { font-size: 13px; line-height: 1.35; color: var(--muted); }
.tile-last { margin-top: auto; display: flex; align-items: center; gap: 8px; padding-top: 10px; border-top: 1px solid var(--line); font-size: 13px; line-height: 1.3; }
.tile-last > span:last-child { min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.tile-empty { margin-top: auto; padding-top: 10px; border-top: 1px solid var(--line); font-size: 13px; font-weight: 700; color: #F08A4B; }
.tile-empty.is-quiet { font-weight: 400; color: var(--muted); }
.tile-new { position: absolute; right: 16px; top: 20px; padding: 0 8px; border-radius: 999px; background: #F08A4B; color: #160E0B; font-size: 12px; font-weight: 700; }
.tile-wait { flex-direction: column; justify-content: center; gap: 4px; padding: 20px; background: #111114; color: #F2EEE6; }
.tile-wait strong { font-family: var(--serif); font-weight: 800; font-size: 30px; line-height: 1.1; }
.tile-wait span { font-size: 13px; color: #C9C3B8; }
.realm-bleach { border-color: #C9C3B8; }
.realm-bleach .tiles { background: #C9C3B8; }
.realm-bleach .tile { min-height: 170px; background: #F2EEE6; color: #111114; }
.realm-bleach .tile:hover { background: #fff; color: #111114; }
.realm-bleach .tile-seal { background: transparent; border: 2px solid #111114; border-radius: 0; color: #B0101F; }
.realm-bleach .tile-desc { color: #4A474F; }
.realm-bleach .tile-last, .realm-bleach .tile-empty { border-top-color: #C9C3B8; }
.realm-bleach .tile-empty { color: #B0101F; }
.realm-bleach .tile-empty.is-quiet { color: #4A474F; }
.realm-bleach .tile-new { background: #B0101F; color: #F2EEE6; }
.realm-camp .tile-seal { background: #C9A25E; color: #160E0B; }
.realm-camp .realm-head .tile-seal { width: 44px; height: 44px; font-size: 26px; }
.realm-camp .tile { min-height: 190px; }

/* ---- guide threads: pinned, closed, written by an admin ---- */
.guide-band { position: relative; background: var(--bg); }
.guide-band-unbound { background: var(--bg) url(/art/unbound/site/konoha.webp) center 30% / cover no-repeat; }
.guide-band::after { content: ""; position: absolute; inset: 0; background: linear-gradient(90deg, #160E0BF2 0%, #160E0BCC 60%, #160E0B66 100%), linear-gradient(#160E0B00 60%, #160E0B 100%); }
.guide-band-in { position: relative; z-index: 2; max-width: 1040px; display: flex; flex-wrap: wrap; align-items: center; gap: 16px 24px; padding-top: 32px; padding-bottom: 44px; }
.guide-seal { width: 88px; height: 88px; font-size: 52px; transform: rotate(-4deg); }
.guide-band .crumbs { margin-bottom: 10px; }
.guide-band .crumbs a, .guide-meta { color: var(--text-2); }
.guide-meta .pill { margin-right: 4px; }
.is-guide-page { max-width: 1040px; padding-top: 8px; }
.post-body.is-guide { display: flex; flex-direction: column; gap: 22px; }
.post-body.is-guide > :not(:first-child) { margin-top: 0; }
.post-body.is-guide > p:first-child { font-size: 18px; }
.g-h { font-family: var(--serif); font-weight: 800; font-size: 24px; line-height: 1.2; margin: 0 0 -10px; }
.g-reward { display: flex; flex-wrap: wrap; align-items: center; gap: 16px 20px; padding: 18px 22px; border-radius: 8px; background: #C9A25E; color: #160E0B; }
.g-reward-seal { flex: 0 0 auto; width: 60px; height: 60px; border: 3px solid #160E0B; border-radius: 50%; display: flex; align-items: center; justify-content: center; font-family: var(--serif); font-weight: 800; font-size: 32px; transform: rotate(-8deg); }
.g-reward div { flex: 1 1 300px; min-width: 0; }
.g-reward strong { display: block; font-size: 19px; line-height: 1.3; }
.g-reward p { margin-top: 2px; }
.post-body ol.g-steps { list-style: none; margin: 0; padding: 0; counter-reset: guide; display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; }
.g-steps li { counter-increment: guide; display: flex; gap: 14px; padding: 14px 16px; background: var(--bg); border: 1px solid var(--line); border-radius: 8px; }
.g-steps li::before { content: counter(guide); flex: 0 0 auto; width: 36px; height: 36px; border-radius: 4px; display: flex; align-items: center; justify-content: center; background: #A3241B; color: #F7E9D7; font-family: var(--serif); font-weight: 800; font-size: 20px; }
.g-steps strong, .g-steps span { display: block; }
.g-steps strong { line-height: 1.3; }
.g-steps span { margin-top: 2px; font-size: 14px; color: var(--text-2); }
.g-steps em { font-style: normal; color: #F7A671; }
.g-cta { display: flex; flex-wrap: wrap; align-items: center; gap: 12px 20px; }
.g-cta span { flex: 1 1 280px; font-size: 14px; color: var(--text-2); }
.post-body .g-cta a { text-decoration: none; color: #160E0B; }
.g-private { display: flex; align-items: flex-start; gap: 14px; padding: 14px 16px; border: 1px dashed var(--line-3); border-radius: 8px; }
.g-private b { flex: 0 0 auto; width: 36px; height: 36px; border: 2px solid #E25A4E; border-radius: 4px; display: flex; align-items: center; justify-content: center; color: #FF8A7E; font-family: var(--serif); font-weight: 800; font-size: 20px; }

.privacy .card { gap: 8px; }
.privacy-list { margin: 0; padding-left: 20px; display: flex; flex-direction: column; gap: 6px; }

/* ---- footer ---- */
.footer { border-top: 1px solid var(--line); }
.footer-in { display: flex; flex-wrap: wrap; gap: 8px 24px; justify-content: space-between; padding-top: 20px; padding-bottom: 20px; font-size: 13px; color: var(--muted); }
.lang-link { color: var(--text-2); }

@media (max-width: 640px) {
  .wrap { padding-left: 16px; padding-right: 16px; }
  .mainnav { order: 3; flex-basis: 100%; }
  .topbar-user .uname { display: none; }
  .auth { padding-top: 32px; gap: 24px; }
  .auth-card { padding: 24px; flex-basis: 100%; }
  .auth-worlds { flex-direction: row; order: -1; }
  .world { width: 56px; height: 56px; font-size: 30px; }
  .is-home .topbar { position: static; background: var(--bg-deep); }
  .hero { min-height: 560px; background-position: 62% top; }
  .hero::after { background: linear-gradient(#160E0BB3 0%, #160E0B99 55%, #160E0B 100%); }
  .hero-in { padding-top: 56px; padding-bottom: 130px; }
  .hero-figure { display: none; }
  .gate-sign { width: 84px; }
  .gate-sign b { font-size: 36px; }
  .realm-banner { min-height: 150px; padding: 16px; }
  .realm-figure { display: none; }
  .guide-seal { width: 60px; height: 60px; font-size: 36px; }
  .post-body ol.g-steps { grid-template-columns: minmax(0, 1fr); }
  .tile-cell { flex-basis: 150px; }
  .tile { min-height: 190px; padding: 14px; }
  .empty { flex-direction: column; align-items: flex-start; }
  .board-row, .thread-row { padding-left: 16px; padding-right: 16px; }
  .thread-main { flex-basis: 0; }
  .thread-last { flex-direction: row; flex-wrap: wrap; gap: 0 6px; }
  .thread-last span::after { content: " ·"; }
  .board-count, .thread-replies { display: none; }
  .board-last { flex: 1 1 100%; padding-left: 30px; }
  .thread-last { flex: 1 1 100%; padding-left: 52px; }
  .post { padding: 16px; }
  .compose { padding: 16px; }
  .thumb, .thumb img, .thumb-add label { width: 140px; }
  .toolbar-sep, .toolbar-label { display: none; }
  .profile-head { padding-top: 24px; }
  .game-tab { padding: 12px 14px 10px; flex: 1 1 45%; }
  .b-stats { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .b-stats div:nth-child(3) { padding-left: 0; border-left: 0; }
  .b-stages { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .b-equip { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .b-vertical { font-size: 90px; }
  .i-pass { grid-template-columns: repeat(10, minmax(0, 1fr)); }
  .i-girls, .e-army { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; }
  .e-hero { padding: 20px; }
  .e-name { font-size: 28px; }
  .toolbar .toolbar-text { padding: 0; }
}

@media (prefers-reduced-motion: reduce) {
  .leaf { display: none; }
  .hero .status-online .dot, .gate-sign { animation: none; }
}
