/* 정시퇴마 사내 위키. The look follows the game: an indigo night, pink and gold lights, yellow paper talismans with
   red ink, chunky Jua lettering, and the paperwork of an office that would rather go home. */

@font-face { font-family: "Jua"; src: url("/fonts/jua.woff2") format("woff2"); font-display: block; }
@font-face { font-family: "Pretendard"; font-weight: 500; src: url("/fonts/pretendard-500.woff2") format("woff2"); font-display: swap; }
@font-face { font-family: "Pretendard"; font-weight: 800; src: url("/fonts/pretendard-800.woff2") format("woff2"); font-display: swap; }

:root {
  --night: #0e0b22; --deep: #090716; --panel: #17133a; --panel2: #1f1a4b; --line: #2f2969; --line2: #443c8c;
  --text: #f3f0ff; --dim: #aaa4d8; --faint: #7d77b0;
  --pink: #ff6fb5; --gold: #ffd24a; --mint: #3de3da; --violet: #8f6bff;
  --fu: #ffcf33; --fu-ink: #d3261c; --paper: #fff6dc; --paper-ink: #2b2140;
  --c: var(--pink);
  --display: "Jua", "Pretendard", system-ui, sans-serif;
  --body: "Pretendard", -apple-system, "Apple SD Gothic Neo", "Noto Sans KR", "Malgun Gothic", system-ui, sans-serif;
  --r: 18px; --pop: 0 5px 0 var(--deep);
}
*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; scroll-padding-top: 92px; -webkit-text-size-adjust: 100%; scrollbar-gutter: stable; }
html.locked { overflow: hidden; }       /* a dialog is open: the page behind stays put */
body {
  margin: 0; color: var(--text); font: 500 16px/1.7 var(--body); background: var(--night);
  background-image: radial-gradient(900px 520px at 85% -8%, rgba(143, 107, 255, .22), transparent 70%),
    radial-gradient(700px 480px at -5% 30%, rgba(255, 111, 181, .10), transparent 70%),
    radial-gradient(circle at 1px 1px, rgba(255, 255, 255, .045) 1.2px, transparent 1.6px);
  background-size: auto, auto, 22px 22px; background-attachment: fixed;
  -webkit-font-smoothing: antialiased; text-rendering: optimizeLegibility; word-break: keep-all; overflow-wrap: anywhere;
}
img { max-width: 100%; height: auto; display: block; }
a { color: inherit; text-decoration: none; }
h1, h2, h3 { font-family: var(--display); font-weight: 400; line-height: 1.2; margin: 0; letter-spacing: -.01em; }
p { margin: 0; }
button, input, select { font: inherit; color: inherit; }
:focus-visible { outline: 3px solid var(--gold); outline-offset: 3px; border-radius: 8px; }
.wrap { width: min(1180px, 100% - 40px); margin-inline: auto; }
.skip { position: absolute; left: -999px; top: 8px; z-index: 99; background: var(--gold); color: #1b1235; padding: 8px 14px; border-radius: 10px; }
.skip:focus { left: 12px; }
main { min-height: 60vh; padding-bottom: 96px; }
main section { margin-top: 64px; }

/* ---------- the header */
.top { position: sticky; top: 0; z-index: 30; background: rgba(14, 11, 34, .82); backdrop-filter: blur(14px) saturate(1.3); border-bottom: 1px solid var(--line); }
.top .wrap { display: flex; align-items: center; gap: 22px; height: 68px; }
.brand { display: flex; align-items: center; gap: 10px; flex: none; }
.brand img { height: 46px; width: auto; filter: drop-shadow(0 3px 0 rgba(0, 0, 0, .35)); transition: transform .2s; }
.brand:hover img { transform: rotate(-3deg) scale(1.04); }
.brand span { font: 400 13px var(--display); color: #1b1235; background: var(--fu); border: 2px solid var(--fu-ink); border-radius: 6px; padding: 1px 7px 0; transform: rotate(-4deg); }
.nav { display: flex; gap: 2px; flex: 1; min-width: 0; }
.tools { display: flex; align-items: center; gap: 10px; flex: none; }
.find { display: flex; align-items: center; gap: 8px; background: var(--panel); border: 1px solid var(--line); border-radius: 12px; padding: 7px 10px 7px 12px; cursor: pointer; color: var(--dim); transition: border-color .15s, color .15s; }
.find:hover { border-color: var(--line2); color: var(--text); }
svg { width: 18px; height: 18px; fill: none; stroke: currentColor; stroke-width: 2.2; stroke-linecap: round; flex: none; }
kbd { font: 500 12px ui-monospace, SFMono-Regular, Menlo, monospace; border: 1px solid var(--line2); border-radius: 6px; padding: 0 6px; color: var(--dim); }

/* ---------- shared pieces */
.fu { display: inline-block; font: 400 14px/1 var(--display); color: var(--fu-ink); background: var(--fu); border: 2px solid var(--fu-ink); border-radius: 5px;
  padding: 6px 10px 4px; box-shadow: inset 0 0 0 2px var(--fu), inset 0 0 0 3px rgba(211, 38, 28, .55); transform: rotate(-2.5deg); white-space: nowrap; }
.stamp { display: inline-grid; place-items: center; font: 400 13px/1 var(--display); color: #ff5a4f; border: 2px solid currentColor; border-radius: 99px; padding: 5px 10px 3px;
  transform: rotate(-7deg); box-shadow: inset 0 0 0 2px var(--night), inset 0 0 0 3px currentColor; white-space: nowrap; opacity: .95; }
.stamp.blue { color: #7fb6ff; } .stamp.gold { color: var(--gold); }
.stamp.big { font-size: 26px; padding: 20px 16px 16px; border-width: 3px; border-radius: 50%; box-shadow: inset 0 0 0 3px var(--paper), inset 0 0 0 5px currentColor; color: #d3261c; }
.tag { font: 500 12.5px/1 var(--body); font-style: normal; color: var(--text); background: rgba(255, 255, 255, .08); border: 1px solid rgba(255, 255, 255, .12); border-radius: 99px; padding: 5px 9px; white-space: nowrap; }
.btn { display: inline-flex; align-items: center; gap: 8px; font: 400 18px/1 var(--display); padding: 15px 22px 13px; border-radius: 14px; border: 2px solid transparent; cursor: pointer; transition: transform .12s, box-shadow .12s, background .15s; }
.btn.gold { color: #2a1640; background: linear-gradient(180deg, #ffe07a, #ffb93c); box-shadow: 0 5px 0 #b3760f; }
.btn.ghost { color: var(--text); border-color: rgba(255, 255, 255, .35); background: rgba(14, 11, 34, .45); backdrop-filter: blur(6px); }
.btn:hover { filter: brightness(1.08); } .btn.ghost:hover { border-color: #fff; } .btn:active { transform: translateY(3px); box-shadow: 0 1px 0 #b3760f; }
.sec-head { display: flex; align-items: center; gap: 14px; margin-bottom: 22px; flex-wrap: wrap; }
.sec-head h2 { font-size: clamp(26px, 3vw, 34px); }
.sec-head p { color: var(--dim); flex: 1 1 300px; }
.more { margin-left: auto; font: 400 15px var(--display); color: var(--dim); border: 1px solid var(--line); border-radius: 99px; padding: 6px 14px 4px; transition: color .15s, border-color .15s; }
.more::after { content: " →"; } .more:hover { color: var(--gold); border-color: var(--gold); }
.crumbs { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; font-size: 13.5px; color: var(--faint); margin-bottom: 18px; }
.crumbs a:hover { color: var(--text); } .crumbs i { font-style: normal; opacity: .6; } .crumbs span { color: var(--dim); }
.pagehead { padding-top: 44px; margin-bottom: 30px; }
.pagehead h1, .guidepage h1 { font-size: clamp(38px, 6vw, 62px); margin: 14px 0 12px; text-shadow: 0 4px 0 var(--deep); }
.lead { color: var(--dim); font-size: 17.5px; max-width: 62ch; }
.note { color: var(--faint); font-size: 14.5px; margin-top: 14px; }
.note a, .prose a { color: var(--gold); border-bottom: 1px dashed rgba(255, 210, 74, .5); }
.empty { text-align: center; color: var(--dim); padding: 60px 0; font: 400 20px var(--display); }
.say { position: relative; margin: 18px 0; padding: 16px 20px; background: var(--panel2); border: 2px solid var(--line2); border-radius: 18px 18px 18px 4px; font-size: 17px; }
.say:not(.memo) { border-left: 7px solid var(--c); }
.say.memo { margin-top: 26px; background: var(--paper); color: var(--paper-ink); border-color: #e8d59a; border-radius: 6px; transform: rotate(-.6deg); box-shadow: 0 8px 20px rgba(0, 0, 0, .3); }
.say.memo::before { content: "현장 메모"; font: 400 13px/1 var(--display); color: #b3541b; display: block; margin: 0 0 8px; vertical-align: 0; }
.pager { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; margin-top: 72px; }
.pager a { background: var(--panel); border: 2px solid var(--line); border-radius: var(--r); padding: 16px 20px; transition: border-color .15s, background .15s; }
.pager a:last-child { text-align: right; } .pager a:hover { border-color: var(--gold); background: var(--panel2); }
.pager span { display: block; font-size: 13px; color: var(--faint); } .pager b { font: 400 21px var(--display); }

/* ---------- filters */
.filters { display: flex; flex-wrap: wrap; gap: 12px 14px; align-items: center; margin-bottom: 26px; padding: 14px; background: rgba(23, 19, 58, .7); border: 1px solid var(--line); border-radius: var(--r); }
.q { display: flex; align-items: center; gap: 10px; flex: 1 1 260px; background: var(--deep); border: 2px solid var(--line); border-radius: 12px; padding: 0 12px; color: var(--dim); }
.q:focus-within { border-color: var(--gold); color: var(--text); }
.q input { flex: 1; min-width: 0; background: none; border: 0; outline: 0; padding: 11px 0; }
.pickone { display: flex; align-items: center; gap: 8px; color: var(--dim); font-size: 14px; }
.pickone select { background: var(--deep); border: 2px solid var(--line); border-radius: 12px; padding: 10px 12px; }
.chips { display: flex; flex-wrap: wrap; gap: 6px; flex-basis: 100%; }
.chips button { background: none; border: 1px solid var(--line2); color: var(--dim); border-radius: 99px; padding: 5px 12px; font-size: 13.5px; cursor: pointer; transition: all .12s; }
.chips button:hover { color: var(--text); border-color: var(--text); }
.chips button.on { background: var(--pink); border-color: var(--pink); color: #2a0f2a; font-weight: 800; }
.filters output { margin-left: auto; color: var(--faint); font-size: 13.5px; font-variant-numeric: tabular-nums; }
[data-item][hidden] { display: none !important; }

/* ---------- staff: company ID cards */
.idgrid { display: grid; grid-template-columns: repeat(auto-fill, minmax(168px, 1fr)); gap: 18px; }
.idgrid.short { grid-template-columns: repeat(6, 1fr); }
.idcard { position: relative; display: flex; flex-direction: column; background: var(--panel); border: 2px solid var(--line); border-radius: var(--r); overflow: hidden; box-shadow: var(--pop);
  transition: border-color .16s, box-shadow .16s; }
.idcard:hover { border-color: var(--c); box-shadow: var(--pop), 0 0 34px color-mix(in srgb, var(--c) 40%, transparent); }
.idcard .slot { position: absolute; z-index: 2; top: 9px; left: 50%; width: 34px; height: 8px; margin-left: -17px; border-radius: 99px; background: var(--deep); box-shadow: inset 0 1px 2px #000; }
.idcard .pic { display: block; aspect-ratio: 440 / 430; overflow: hidden; background: radial-gradient(circle at 50% 38%, color-mix(in srgb, var(--c) 78%, #fff 0%), color-mix(in srgb, var(--c) 40%, var(--panel)) 60%, var(--panel) 105%); }
.idcard .pic img { width: 100%; height: 100%; object-fit: cover; object-position: top; transition: transform .25s; }
.idcard:hover .pic img { transform: scale(1.06); }
.idcard .who { display: flex; flex-wrap: wrap; align-items: baseline; gap: 2px 8px; padding: 11px 14px 0; }
.idcard .who b { font: 400 21px var(--display); white-space: nowrap; }
.idcard .who i { font-style: normal; font-size: 12px; color: var(--c); border: 1px solid currentColor; border-radius: 6px; padding: 0 6px; white-space: nowrap; filter: brightness(1.25); }
.idcard .role { padding: 2px 14px 13px; color: var(--dim); font-size: 13.5px; }
.idcard::after { content: ""; height: 5px; background: var(--c); margin-top: auto; }

/* ---------- cards: talismans */
.fugrid { display: grid; grid-template-columns: repeat(auto-fill, minmax(270px, 1fr)); gap: 14px; }
.fugrid.two { grid-template-columns: repeat(2, 1fr); } .fugrid.three { grid-template-columns: repeat(3, 1fr); }
.own { margin-top: 30px; } .own h2 { font-size: 24px; margin-bottom: 14px; }
.words { margin: 22px 0 0; display: grid; grid-template-columns: auto 1fr; gap: 8px 16px; font-size: 14.5px; }
.words dt { font: 400 15px var(--display); color: var(--gold); white-space: nowrap; scroll-margin-top: 100px; } .words dd { margin: 0; color: var(--dim); }
.words.wide { grid-template-columns: auto 1fr auto 1fr; gap: 12px 20px; font-size: 15px; background: var(--panel); border: 2px solid var(--line); border-radius: var(--r); padding: 22px 24px; }
.words dt:target { color: var(--pink); }
.fucard { position: relative; display: flex; gap: 14px; align-items: center; background: var(--panel); border: 2px solid var(--line); border-radius: var(--r); padding: 12px 14px; box-shadow: var(--pop);
  transition: border-color .14s, background .14s; }
.fucard:hover { border-color: var(--c); background: var(--panel2); }
.fucard .emblem { width: 72px; height: 72px; flex: none; border-radius: 50%; background: radial-gradient(circle, color-mix(in srgb, var(--c) 45%, transparent), transparent 70%); transition: transform .25s; }
.fucard:hover .emblem { transform: rotate(-10deg) scale(1.1); }
.fucard .body { min-width: 0; display: flex; flex-direction: column; gap: 6px; }
.fucard b { font: 400 19px/1.2 var(--display); }
.fucard small { color: var(--faint); font-size: 12.5px; }
.tags { display: flex; flex-wrap: wrap; gap: 5px; }
.tags.big { margin: 16px 0 4px; } .tags.big .tag { font-size: 14px; padding: 7px 12px; }
.first { position: absolute; top: -9px; right: 12px; font: 400 12px/1 var(--display); font-style: normal; color: var(--fu-ink); background: var(--fu); border: 1.5px solid var(--fu-ink); border-radius: 5px; padding: 4px 6px 2px; transform: rotate(3deg); }

/* ---------- cases */
.casegrid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 18px; }
.casegrid.all { grid-template-columns: repeat(auto-fill, minmax(250px, 1fr)); }
.casefile { position: relative; display: block; aspect-ratio: 3 / 4; border-radius: var(--r); overflow: hidden; border: 2px solid var(--line); box-shadow: var(--pop); isolation: isolate; transition: border-color .16s, box-shadow .16s; }
.casefile:hover { border-color: var(--c); box-shadow: var(--pop), 0 0 30px color-mix(in srgb, var(--c) 35%, transparent); }
.casefile .scene { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; z-index: -2; transition: transform .5s; }
.casefile:hover .scene { transform: scale(1.07); }
.casefile::before { content: ""; position: absolute; inset: 0; z-index: -1; background: linear-gradient(180deg, rgba(14, 11, 34, .1) 20%, color-mix(in srgb, var(--c) 30%, rgba(14, 11, 34, .92)) 78%, rgba(14, 11, 34, .97)); }
.casefile .bossart { position: absolute; right: -6%; bottom: 20%; width: 62%; filter: drop-shadow(0 8px 12px rgba(0, 0, 0, .55)); transition: transform .25s; }
.casefile:hover .bossart { transform: translateY(-6px) scale(1.05) rotate(2deg); }
.casefile .no { position: absolute; top: 14px; left: 14px; font: 400 14px/1 var(--display); color: var(--fu-ink); background: var(--fu); border: 2px solid var(--fu-ink); border-radius: 5px; padding: 6px 9px 4px; transform: rotate(-3deg); }
.casefile .txt { position: absolute; left: 16px; right: 16px; bottom: 15px; }
.casefile b { display: block; font: 400 25px/1.15 var(--display); text-shadow: 0 3px 0 rgba(0, 0, 0, .5); }
.casefile small { color: var(--dim); font-size: 13px; }

/* ---------- home */
main .hero { margin-top: 0; }
.hero { position: relative; min-height: min(78vh, 720px); display: flex; align-items: center; overflow: hidden; isolation: isolate; border-bottom: 2px solid var(--line); }
.hero-bg img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; z-index: -3; }
.hero::before { content: ""; position: absolute; inset: 0; z-index: -2; background: linear-gradient(90deg, rgba(14, 11, 34, .93) 0%, rgba(14, 11, 34, .72) 34%, rgba(14, 11, 34, 0) 62%), linear-gradient(0deg, var(--night) 0%, rgba(14, 11, 34, 0) 22%); }
@keyframes bob { 50% { transform: translateY(-9px); } }
.hero-grid { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1.08fr); gap: 44px; align-items: center; }
.hero-copy { padding: 56px 0 70px; }
.trailer { display: flex; flex-direction: column; gap: 12px; }
.trailer .yt { position: relative; display: block; width: 100%; aspect-ratio: 16 / 9; padding: 0; border: 2px solid rgba(255, 255, 255, .22); border-radius: 20px; overflow: hidden; background: var(--deep); cursor: pointer;
  box-shadow: 0 24px 50px rgba(0, 0, 0, .55), 0 0 0 6px rgba(255, 111, 181, .12); }
.trailer .yt img { width: 100%; height: 100%; object-fit: cover; transition: transform .4s ease, filter .25s; }
.trailer button.yt:hover img { transform: scale(1.035); filter: brightness(1.06); }
.trailer .play { position: absolute; left: 50%; top: 50%; width: 92px; height: 92px; margin: -46px 0 0 -46px; border-radius: 50%; background: rgba(255, 111, 181, .92);
  box-shadow: 0 0 0 10px rgba(255, 111, 181, .25), 0 10px 26px rgba(0, 0, 0, .5); transition: transform .15s; }
.trailer .play::after { content: ""; position: absolute; left: 36px; top: 28px; border-style: solid; border-width: 18px 0 18px 30px; border-color: transparent transparent transparent #fff; }
.trailer button.yt:hover .play { transform: scale(1.08); } .trailer button.yt:focus-visible { outline: 3px solid var(--gold); outline-offset: 3px; }
.trailer .meta { display: flex; justify-content: space-between; align-items: center; gap: 12px; width: 100%; padding: 0 4px; }
.trailer .cap { display: flex; gap: 8px; align-items: baseline; font: 400 17px/1 var(--display); text-shadow: 0 2px 6px rgba(9, 7, 22, .9); }
.trailer .cap i { font: 800 13px/1 var(--body); font-style: normal; color: var(--dim); }
.trailer .yt-link { font-size: 14px; color: var(--dim); } .trailer .yt-link:hover { color: var(--text); }
.hero-copy .logo { width: min(330px, 62vw); margin: 0 0 6px -8px; filter: drop-shadow(0 8px 0 rgba(0, 0, 0, .35)); animation: pop .7s cubic-bezier(.2, 1.5, .4, 1) both; }
@keyframes pop { from { transform: scale(.6) rotate(-8deg); opacity: 0; } }
.hero h1 { font-size: clamp(34px, 5.2vw, 60px); text-shadow: 0 4px 0 var(--deep); }
.hero h1 em { font-style: normal; color: var(--gold); }
.hero p { margin: 16px 0 26px; color: #d9d4f7; max-width: 44ch; font-size: 17px; text-shadow: 0 1px 8px rgba(14, 11, 34, .9); }
.cta { display: flex; flex-wrap: wrap; gap: 12px; }
.ticker { display: flex; align-items: center; background: var(--deep); border-bottom: 1px solid var(--line); overflow: hidden; }
.ticker > b { flex: none; font: 400 15px/1 var(--display); color: #2a1640; background: var(--pink); padding: 13px 16px 11px; z-index: 1; }
.rail { overflow: hidden; flex: 1; mask-image: linear-gradient(90deg, transparent, #000 4%, #000 96%, transparent); }
.run { display: flex; gap: 46px; width: max-content; padding: 10px 0; animation: slide 110s linear infinite; }
.ticker:hover .run { animation-play-state: paused; }
.run a { white-space: nowrap; color: var(--dim); font-size: 14.5px; } .run a:hover { color: var(--text); }
.run i { font-style: normal; color: var(--gold); margin-right: 8px; } .run u { text-decoration: none; color: var(--faint); margin-left: 8px; }
@keyframes slide { to { transform: translateX(-50%); } }
.stores { display: flex; flex-wrap: wrap; align-items: center; gap: 10px 12px; margin-top: 22px; }
.stores .soon { font: 400 15px/1 var(--display); color: var(--gold); letter-spacing: .04em; padding: 7px 11px 6px; border: 2px dashed rgba(255, 210, 74, .55); border-radius: 10px; background: rgba(14, 11, 34, .55); }
.stores .store { display: block; opacity: .42; cursor: not-allowed; }
.stores a.store { opacity: 1; cursor: pointer; transition: transform .15s; }
.stores a.store:hover { transform: translateY(-2px); }
.stores .store img { height: 40px; width: auto; }
.field { display: grid; grid-template-columns: auto minmax(0, 600px); justify-content: center; align-items: center; gap: 56px; margin-top: 46px; padding: 30px 36px; background: linear-gradient(120deg, var(--panel2), var(--panel) 60%); border: 2px solid var(--line); border-radius: calc(var(--r) + 6px); box-shadow: var(--pop); }
.field .phone { width: 236px; aspect-ratio: 360 / 780; padding: 7px; border-radius: 34px; background: #05040d; border: 2px solid var(--line2); box-shadow: 0 18px 40px rgba(0, 0, 0, .5), 0 0 0 6px rgba(143, 107, 255, .12); }
.field .phone video { width: 100%; height: 100%; object-fit: cover; border-radius: 27px; background: var(--deep); display: block; }
.field h2 { font: 400 clamp(28px, 3.4vw, 40px)/1.2 var(--display); margin: 14px 0 12px; } .field h2 em { font-style: normal; color: var(--gold); }
.field p { color: #d9d4f7; max-width: 46ch; margin: 0 0 18px; }
.field .beats { display: flex; flex-wrap: wrap; gap: 8px; padding: 0; margin: 0; list-style: none; counter-reset: beat; }
.field .beats li { counter-increment: beat; font: 400 15px/1 var(--display); padding: 8px 12px 7px; border-radius: 10px; background: rgba(14, 11, 34, .5); border: 2px solid var(--line2); }
.field .beats li::before { content: counter(beat) ". "; color: var(--pink); }
@media (max-width: 720px) { .field { grid-template-columns: 1fr; justify-items: center; text-align: center; gap: 22px; padding: 24px 18px; } .field .phone { width: min(220px, 62vw); } .field p { margin-inline: auto; } .field .beats { justify-content: center; } .stores { justify-content: flex-start; } }
.field .try { margin-top: 20px; }
.demo { display: grid; grid-template-columns: minmax(0, 520px) minmax(0, 1fr); gap: 40px; align-items: start; margin-top: 10px; }
.demo-stage { position: relative; width: 100%; aspect-ratio: 1080 / 1900; border-radius: 26px; overflow: hidden; background: var(--deep); border: 2px solid var(--line2); box-shadow: var(--pop), 0 24px 50px rgba(0, 0, 0, .45); touch-action: none; user-select: none; -webkit-user-select: none; }
.demo-stage canvas { display: block; width: 100%; height: 100%; touch-action: none; }
.demo-cover { position: absolute; inset: 0; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 12px; background: rgba(9, 7, 22, .55); }
.demo-cover img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; z-index: -1; filter: blur(2px) brightness(.7); }
.demo-cover .btn { font-size: 24px; padding: 18px 30px 16px; } .demo-cover small { color: var(--dim); }
.demo.on .demo-cover { display: none; }
.demo-side .how { padding: 0; margin: 16px 0 20px; list-style: none; counter-reset: how; display: grid; gap: 12px; }
.demo-side .how li { counter-increment: how; background: var(--panel); border: 2px solid var(--line); border-radius: var(--r); padding: 14px 16px; color: #d9d4f7; }
.demo-side .how b { display: block; font: 400 20px/1.2 var(--display); color: var(--gold); margin-bottom: 4px; } .demo-side .how b::before { content: counter(how) ". "; color: var(--pink); }
.demo-side .note { color: var(--faint); font-size: 14px; margin-top: 16px; }
@media (max-width: 820px) { .demo { grid-template-columns: 1fr; } .demo-stage { max-width: 480px; margin: 0 auto; } }
.lang { position: relative; }
.lang summary { list-style: none; display: inline-flex; align-items: center; gap: 6px; cursor: pointer; padding: 7px 11px; border-radius: 12px; border: 2px solid var(--line); color: var(--dim); font-size: 14px; }
.lang summary::-webkit-details-marker { display: none; }
.lang summary svg { width: 18px; height: 18px; fill: none; stroke: currentColor; stroke-width: 1.6; }
.lang[open] summary, .lang summary:hover { color: var(--text); border-color: var(--line2); }
.lang > div { position: absolute; right: 0; top: calc(100% + 6px); z-index: 30; display: grid; min-width: 150px; padding: 6px; background: var(--panel); border: 2px solid var(--line2); border-radius: 14px; box-shadow: var(--pop), 0 14px 30px rgba(0, 0, 0, .45); }
.lang > div a { padding: 8px 12px; border-radius: 9px; color: var(--dim); } .lang > div a:hover { background: var(--panel2); color: var(--text); }
.lang > div a[aria-current] { color: var(--gold); }
@media (max-width: 820px) { .lang summary span { display: none; } }
/* Japanese and Chinese wrap by character with the usual line-start rules. */
html:is([lang="ja"], [lang="zh-Hans"], [lang="zh-Hant"]) body { word-break: normal; line-break: strict; }
html:is([lang="ja"], [lang="zh-Hans"], [lang="zh-Hant"]) .hero h1 { font-size: clamp(30px, 4.2vw, 50px); line-height: 1.25; }
.counts { display: grid; grid-template-columns: repeat(5, 1fr); gap: 14px; margin-top: 34px; }
.counts a { background: var(--panel); border: 2px solid var(--line); border-radius: var(--r); padding: 16px 18px 12px; box-shadow: var(--pop); transition: border-color .14s, background .14s; }
.counts a:hover { border-color: var(--gold); background: var(--panel2); }
.counts b { display: block; font: 400 40px/1 var(--display); color: var(--gold); } .counts span { color: var(--dim); font-size: 14px; }
.today { display: grid; grid-template-columns: 1fr 1fr; gap: 18px; margin-top: 34px; }
.duty, .pick { position: relative; display: flex; gap: 18px; align-items: center; background: linear-gradient(120deg, color-mix(in srgb, var(--c) 22%, var(--panel)), var(--panel) 62%); border: 2px solid var(--line); border-radius: 22px;
  padding: 22px; box-shadow: var(--pop); min-height: 190px; overflow: hidden; transition: border-color .16s, box-shadow .16s; }
.duty:hover, .pick:hover { border-color: var(--c); }
.duty img, .pick img { transition: transform .25s; } .duty:hover img { transform: scale(1.05); transform-origin: 50% 100%; } .pick:hover img { transform: rotate(-8deg) scale(1.08); }
.duty .fu, .pick .fu { position: absolute; top: 14px; left: 14px; z-index: 2; }
.duty img { width: 170px; flex: none; align-self: flex-end; margin: 0 -6px -22px -10px; }
.pick img { width: 124px; flex: none; margin-top: 16px; filter: drop-shadow(0 6px 10px rgba(0, 0, 0, .4)); }
.today .txt { display: flex; flex-direction: column; gap: 4px; min-width: 0; padding-top: 22px; }
.today b { font: 400 30px/1.1 var(--display); } .today i { font-style: normal; color: var(--dim); font-size: 14px; }
.today q { quotes: none; color: var(--text); font-size: 15px; margin-top: 6px; display: -webkit-box; -webkit-line-clamp: 3; -webkit-box-orient: vertical; overflow: hidden; }
.today .txt span { font-size: 15px; } .pick q { color: var(--gold); }
.two { display: grid; grid-template-columns: 1.15fr 1fr; gap: 40px; }
.chiprow { display: flex; flex-wrap: wrap; gap: 10px; }
.chip { display: flex; align-items: center; gap: 8px; background: var(--panel); border: 2px solid var(--line); border-radius: 99px; padding: 5px 16px 5px 6px; transition: border-color .12s, background .12s; }
.chip:hover { border-color: var(--pink); background: var(--panel2); }
.chip img { width: 44px; height: 44px; object-fit: contain; } .chip span { font: 400 16px var(--display); }
.notes { list-style: none; margin: 0; padding: 0; display: grid; gap: 10px; counter-reset: n; }
.notes li a { display: grid; grid-template-columns: auto 1fr; gap: 2px 14px; background: var(--panel); border: 2px solid var(--line); border-radius: var(--r); padding: 14px 18px; transition: border-color .14s, background .14s; }
.notes li a::before { counter-increment: n; content: counter(n, decimal-leading-zero); grid-row: span 3; font: 400 30px/1 var(--display); color: var(--line2); align-self: center; }
.notes li a:hover { border-color: var(--gold); background: var(--panel2); } .notes li a:hover::before { color: var(--gold); }
.notes b { font: 400 19px var(--display); } .notes span { color: var(--dim); font-size: 14px; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.notes i { font-style: normal; font-size: 12.5px; color: var(--pink); }
.notes.big { grid-template-columns: repeat(2, 1fr); gap: 16px; } .notes.big li a { padding: 20px 22px; height: 100%; } .notes.big b { font-size: 23px; } .notes.big span { -webkit-line-clamp: 4; }

/* ---------- a personnel file, a talisman sheet */
.profile, .cardpage, .guidepage { padding-top: 40px; }
.sheet { display: grid; grid-template-columns: minmax(0, 5fr) minmax(0, 6fr); gap: 44px; align-items: start; }
.portrait { position: relative; margin: 0; border-radius: 28px; border: 2px solid var(--line); overflow: visible;
  background: radial-gradient(circle at 50% 30%, color-mix(in srgb, var(--c) 70%, transparent), color-mix(in srgb, var(--c) 18%, var(--panel)) 62%, var(--panel)); box-shadow: 0 8px 0 var(--deep), 0 0 80px color-mix(in srgb, var(--c) 22%, transparent); }
.portrait::before { content: ""; position: absolute; inset: 0; border-radius: 26px; background: radial-gradient(circle at 2px 2px, rgba(255, 255, 255, .16) 2px, transparent 2.6px) 0 0 / 20px 20px; mask-image: linear-gradient(180deg, #000, transparent 70%); }
.portrait > img:first-child { position: relative; width: 100%; cursor: zoom-in; filter: drop-shadow(0 14px 18px rgba(0, 0, 0, .4)); }
.portrait .sd { position: absolute; right: -22px; bottom: -26px; width: 34%; filter: drop-shadow(0 8px 0 rgba(0, 0, 0, .35)); animation: bob 4s ease-in-out infinite; }
.file h1 { font-size: clamp(44px, 7vw, 76px); margin: 12px 0 8px; text-shadow: 0 5px 0 var(--deep); }
.file h1 small, .banner h1 small { display: block; font: 800 15px var(--body); letter-spacing: .14em; text-transform: uppercase; color: var(--c); filter: brightness(1.3); margin-top: 4px; text-shadow: none; }
.title { display: flex; flex-wrap: wrap; align-items: center; gap: 10px; color: var(--dim); font-size: 17px; }
.title b { font: 400 16px/1 var(--display); color: #1b1235; background: var(--c); border-radius: 8px; padding: 6px 10px 4px; }
.bio { font-size: 16.5px; color: #e2defa; }
.skills, .effects { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; margin-top: 22px; }
.skills > div, .effects > div { background: var(--panel); border: 2px solid var(--line); border-radius: var(--r); padding: 16px 18px; }
.skills span, .effects span { font: 400 13px/1 var(--display); color: var(--dim); }
.skills b { display: block; font: 400 22px var(--display); margin: 4px 0 2px; }
.skills p, .effects p { color: #e2defa; font-size: 15.5px; }
.skills .burst { border-color: color-mix(in srgb, var(--c) 60%, var(--line)); background: linear-gradient(140deg, color-mix(in srgb, var(--c) 20%, var(--panel)), var(--panel)); }
.effects { grid-template-columns: 1fr; } .effects p { font-size: 17px; margin-top: 4px; }
.effects .plus { border-color: rgba(255, 210, 74, .55); background: linear-gradient(140deg, rgba(255, 210, 74, .12), var(--panel)); } .effects .plus span { color: var(--gold); }
.up { color: var(--gold); font-weight: 800; font-size: 1.12em; } .up::after { content: "▲"; font-size: .55em; vertical-align: .5em; margin-left: 1px; }
.chg { color: var(--gold); }
.fu-plate { margin: 0; display: grid; place-items: center; padding: 40px 0; border-radius: 28px; border: 2px solid var(--line); background: radial-gradient(circle at 50% 45%, color-mix(in srgb, var(--c) 46%, transparent), var(--panel) 72%); box-shadow: 0 8px 0 var(--deep); }
.fu-plate .paper { display: flex; flex-direction: column; align-items: center; gap: 12px; width: min(250px, 62%); aspect-ratio: 3 / 6.6; border-radius: 6px; padding: 26px 16px;
  background: radial-gradient(ellipse 62% 30% at 50% 36%, rgba(255, 216, 74, .92), rgba(255, 216, 74, 0) 100%), radial-gradient(ellipse 80% 16% at 50% 88%, rgba(255, 214, 60, .85), rgba(255, 214, 60, 0) 100%), var(--motif, none) center / cover no-repeat, linear-gradient(180deg, #ffd84a, #ffc21f);
  box-shadow: inset 0 0 0 5px #ffd13a, inset 0 0 0 8px var(--fu-ink), 0 22px 40px rgba(0, 0, 0, .5); transform: rotate(-4deg); animation: sway 5s ease-in-out infinite; }
@keyframes sway { 50% { transform: rotate(3deg) translateY(-8px); } }
.fu-plate img { width: 76%; margin-top: 14%; filter: drop-shadow(0 6px 0 rgba(120, 40, 0, .25)); }
.fu-plate b { font: 400 30px/1.15 var(--display); color: var(--fu-ink); text-align: center; margin-top: auto; }
.fu-plate i { font: 800 10.5px var(--body); font-style: normal; letter-spacing: .12em; text-transform: uppercase; color: #a8421a; text-align: center; margin-bottom: 8%; }
.outfits { display: grid; grid-template-columns: repeat(auto-fill, minmax(230px, 1fr)); gap: 18px; }
.outfits figure { margin: 0; background: var(--panel); border: 2px solid var(--line); border-radius: var(--r); overflow: hidden; }
.outfits img { width: 100%; aspect-ratio: 3 / 4; object-fit: cover; object-position: top; cursor: zoom-in; background: radial-gradient(circle at 50% 30%, color-mix(in srgb, var(--c) 55%, transparent), transparent 70%); }
.outfits figcaption { padding: 12px 16px 14px; display: grid; grid-template-columns: 1fr auto; gap: 2px 10px; }
.outfits b { font: 400 20px var(--display); } .outfits span { grid-column: 1 / -1; color: var(--dim); font-size: 14px; }
.grade { font: 400 12px/1 var(--display); font-style: normal; border-radius: 6px; padding: 5px 8px 3px; align-self: center; color: #1b1235; background: #9ec3ff; }
.grade.g1 { background: #d6a0ff; } .grade.g2 { background: var(--gold); }
.lines { list-style: none; margin: 0; padding: 0; columns: 2; column-gap: 18px; }
.lines li { break-inside: avoid; display: grid; grid-template-columns: 86px 1fr; gap: 12px; align-items: start; margin-bottom: 10px; }
.lines span { font: 400 13px/1 var(--display); color: var(--dim); text-align: right; padding-top: 14px; }
.lines q { quotes: none; background: var(--panel); border: 1px solid var(--line); border-radius: 4px 16px 16px 16px; padding: 10px 14px; font-size: 15px; }

/* ---------- a case file */
.banner { position: relative; isolation: isolate; padding: 40px 0 44px; border-bottom: 2px solid var(--line); overflow: hidden; }
.banner > img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; object-position: 50% 30%; z-index: -2; filter: saturate(1.1); }
.banner::after { content: ""; position: absolute; inset: 0; z-index: -1; background: linear-gradient(90deg, rgba(14, 11, 34, .94), color-mix(in srgb, var(--c) 26%, rgba(14, 11, 34, .7)) 60%, rgba(14, 11, 34, .35)); }
.banner h1 { font-size: clamp(42px, 7vw, 80px); margin-top: 14px; text-shadow: 0 5px 0 var(--deep); }
.docrow { display: grid; grid-template-columns: 1.4fr 1fr; gap: 26px; margin-top: 36px; align-items: start; }
.paper { position: relative; background: var(--paper); color: var(--paper-ink); border-radius: 6px; padding: 26px 30px 30px; box-shadow: 0 14px 34px rgba(0, 0, 0, .4); transform: rotate(-.5deg);
  background-image: repeating-linear-gradient(0deg, transparent 0 31px, rgba(43, 33, 64, .09) 31px 32px); }
.paper .hd { display: block; font: 400 22px var(--display); border-bottom: 3px double var(--paper-ink); padding-bottom: 8px; margin-bottom: 14px; }
.paper dl { margin: 0; display: grid; grid-template-columns: 84px 1fr; gap: 12px 14px; font-size: 16.5px; } .paper dt { font: 400 15px var(--display); color: #7a6c96; padding-top: 3px; } .paper dd { margin: 0; }
.paper .stamp { position: absolute; right: 22px; top: 10px; transform: rotate(-14deg); opacity: .85; font-size: 21px; padding: 15px 12px 12px; }
.side { display: grid; gap: 14px; }
.rule { background: linear-gradient(140deg, color-mix(in srgb, var(--c) 24%, var(--panel)), var(--panel)); border: 2px solid color-mix(in srgb, var(--c) 55%, var(--line)); border-radius: var(--r); padding: 16px 18px; }
.rule span { font: 400 14px var(--display); color: var(--gold); } .rule p { font-size: 16px; }
.hire { display: flex; align-items: center; gap: 14px; background: var(--panel); border: 2px solid var(--line); border-radius: var(--r); padding: 0 16px 0 0; overflow: hidden; transition: border-color .14s, background .14s; }
.hire:hover { border-color: var(--c); background: var(--panel2); }
.hire img { width: 96px; background: radial-gradient(circle at 50% 40%, var(--c), transparent 75%); } .hire i { display: block; font-style: normal; color: var(--dim); font-size: 13px; } .hire b { font: 400 21px var(--display); }
.foes { display: grid; grid-template-columns: 1fr 1fr; gap: 18px; }
.foe { display: grid; grid-template-columns: 150px 1fr; gap: 16px; align-items: center; background: var(--panel); border: 2px solid var(--line); border-radius: 22px; padding: 18px; box-shadow: var(--pop); transition: border-color .14s, background .14s; }
.foe:hover { border-color: var(--pink); } .foe img { transition: transform .25s; } .foe:hover img { transform: scale(1.07) rotate(-3deg); }
.foe.boss { border-color: rgba(255, 210, 74, .55); background: linear-gradient(140deg, rgba(255, 210, 74, .1), var(--panel)); }
.foe img { width: 150px; height: 150px; object-fit: contain; filter: drop-shadow(0 8px 10px rgba(0, 0, 0, .45)); }
.foe .txt { display: flex; flex-direction: column; gap: 5px; } .foe i { font: 400 13px/1 var(--display); font-style: normal; color: var(--pink); } .foe.boss i { color: var(--gold); }
.foe b { font: 400 27px/1.1 var(--display); } .foe q { quotes: none; font-size: 14.5px; color: var(--text); background: var(--deep); border-radius: 4px 12px 12px 12px; padding: 8px 12px; } .foe .txt > span { color: var(--dim); font-size: 14.5px; }
.again { list-style: none; margin: 0; padding: 0; display: grid; gap: 10px; }
.again li { display: grid; grid-template-columns: 96px 1fr; gap: 16px; align-items: center; background: var(--panel); border: 1px solid var(--line); border-radius: 14px; padding: 12px 18px; }
.again span { font: 400 15px var(--display); color: var(--pink); }

/* ---------- spirits, relics, the board */
.spiritgrid { display: grid; grid-template-columns: repeat(auto-fill, minmax(330px, 1fr)); gap: 16px; }
.spirit { display: grid; grid-template-columns: 112px 1fr; gap: 16px; align-items: center; background: var(--panel); border: 2px solid var(--line); border-radius: var(--r); padding: 14px 16px; scroll-margin-top: 100px; transition: border-color .2s; }
.spirit:target { border-color: var(--gold); box-shadow: 0 0 0 4px rgba(255, 210, 74, .25); }
.spirit.boss { border-color: rgba(255, 210, 74, .5); background: linear-gradient(140deg, rgba(255, 210, 74, .09), var(--panel)); } .spirit.elite { border-color: rgba(255, 111, 181, .45); }
.spirit img { width: 112px; height: 112px; object-fit: contain; filter: drop-shadow(0 6px 8px rgba(0, 0, 0, .45)); }
.spirit h3 { font-size: 23px; } .spirit h3 small, .relic h3 small { font: 500 12px var(--body); color: var(--faint); margin-left: 8px; }
.spirit p { color: #dcd8f5; font-size: 14.5px; margin: 4px 0 8px; }
.tier { font: 400 12px/1 var(--display); font-style: normal; color: var(--dim); } .spirit.boss .tier { color: var(--gold); } .spirit.elite .tier { color: var(--pink); }
.spirit footer { display: flex; flex-wrap: wrap; gap: 6px; align-items: center; font-size: 12.5px; }
.spirit footer a, .hp { border: 1px solid var(--line2); border-radius: 99px; padding: 2px 9px; color: var(--dim); } .spirit footer a:hover { color: var(--gold); border-color: var(--gold); }
.hp { color: #ff9aa8; border-color: rgba(255, 154, 168, .45); }
.relicgrid { display: grid; grid-template-columns: repeat(auto-fill, minmax(330px, 1fr)); gap: 16px; }
.relic { position: relative; display: grid; grid-template-columns: 96px 1fr; gap: 16px; align-items: center; background: var(--panel); border: 2px solid var(--line); border-radius: var(--r); padding: 14px 18px; scroll-margin-top: 100px; }
.relic.rare { border-color: rgba(255, 210, 74, .5); } .relic:target { box-shadow: 0 0 0 4px rgba(255, 210, 74, .25); }
.relic img { width: 96px; height: 96px; filter: drop-shadow(0 6px 8px rgba(0, 0, 0, .4)); } .relic h3 { font-size: 22px; } .relic p { color: #dcd8f5; font-size: 15px; }
.relic .stamp { position: absolute; top: 10px; right: 12px; }
.board { columns: 4 250px; column-gap: 18px; }
.postit { break-inside: avoid; margin: 0 0 18px; padding: 18px 18px 14px; border-radius: 4px 4px 18px 4px; color: #2b2140; background: #ffe98a; box-shadow: 0 8px 16px rgba(0, 0, 0, .35); --tilt: -.8deg; transform: rotate(var(--tilt)); transition: transform .15s, box-shadow .15s; }
.postit:nth-child(even) { --tilt: .9deg; } .postit:hover { transform: rotate(var(--tilt)) scale(1.035); box-shadow: 0 14px 26px rgba(0, 0, 0, .5); z-index: 1; position: relative; }
.postit.m1 { background: #ffc4e1; } .postit.m2 { background: #bff0ec; } .postit.m3 { background: #d9ccff; } .postit.m4 { background: #ffd9a8; }
.postit i { font: 400 12px/1 var(--display); font-style: normal; background: rgba(43, 33, 64, .85); color: #fff; border-radius: 5px; padding: 4px 7px 2px; }
.postit p { margin: 10px 0 8px; font-size: 15.5px; line-height: 1.6; } .postit a, .postit > span { display: block; text-align: right; font: 400 15px var(--display); color: #5a4a80; } .postit a:hover { color: #d3261c; }

/* ---------- the handbook */
.reading { display: grid; grid-template-columns: minmax(0, 1fr) 280px; gap: 56px; margin-top: 40px; align-items: start; }
.prose h2 { font-size: 30px; margin: 46px 0 12px; padding-left: 16px; border-left: 6px solid var(--pink); } .prose h2:first-child { margin-top: 0; }
.prose p { font-size: 17.5px; line-height: 1.9; color: #e6e2fb; max-width: 66ch; }
.reading aside { position: sticky; top: 96px; background: var(--panel); border: 2px solid var(--line); border-radius: var(--r); padding: 20px; }
.reading aside h3 { font-size: 16px; color: var(--dim); margin: 0 0 10px; } .reading aside h3:not(:first-child) { margin-top: 24px; }
.toc, .others { margin: 0; padding: 0; list-style: none; display: grid; gap: 6px; counter-reset: t; }
.toc a::before { counter-increment: t; content: counter(t) ". "; color: var(--pink); } .toc a:hover, .others a:hover { color: var(--gold); } .others b { font: 400 16px var(--display); }

/* ---------- support */
.contact { display: flex; flex-wrap: wrap; align-items: center; gap: 16px 22px; background: var(--panel); border: 2px solid var(--line); border-radius: var(--r); padding: 22px 24px; }
.contact p { color: var(--dim); font-size: 14.5px; flex: 1 1 260px; } .contact p a { color: var(--gold); border-bottom: 1px dashed rgba(255, 210, 74, .5); }
.faq { margin: 34px 0 0; display: grid; gap: 14px; }
.faq dt { font: 400 23px var(--display); padding-left: 16px; border-left: 6px solid var(--pink); margin-top: 14px; }
.faq dd { margin: 0; color: #e2defa; font-size: 16.5px; max-width: 70ch; } .faq dd a { color: var(--gold); border-bottom: 1px dashed rgba(255, 210, 74, .5); }

/* ---------- the office, the wardrobe */
.floor .sec-head { align-items: baseline; }
.shots { display: grid; grid-template-columns: repeat(3, 1fr); gap: 14px; }
.shots figure { margin: 0; border: 2px solid var(--line); border-radius: var(--r); overflow: hidden; background: var(--panel); transition: border-color .16s, box-shadow .16s; }
.shots figure:hover { border-color: var(--gold); }
.shots img { width: 100%; aspect-ratio: 3 / 2; object-fit: cover; cursor: zoom-in; transition: transform .3s; } .shots figure:hover img { transform: scale(1.04); }
.shots figcaption { padding: 10px 14px 12px; font-size: 14.5px; color: #e2defa; } .shots em { font: 400 13px var(--display); font-style: normal; color: var(--gold); margin-right: 8px; }
.wardrobe { display: grid; grid-template-columns: repeat(auto-fill, minmax(240px, 1fr)); gap: 18px; }
.outfit { display: block; background: var(--panel); border: 2px solid var(--line); border-radius: var(--r); overflow: hidden; box-shadow: var(--pop); transition: border-color .16s, box-shadow .16s; }
.outfit:hover { border-color: var(--c); box-shadow: var(--pop), 0 0 30px color-mix(in srgb, var(--c) 35%, transparent); }
.outfit img { transition: transform .3s; transform-origin: 50% 0; } .outfit:hover img { transform: scale(1.04); }
.outfit img { width: 100%; aspect-ratio: 3 / 4; object-fit: cover; object-position: top; background: radial-gradient(circle at 50% 30%, color-mix(in srgb, var(--c) 60%, transparent), transparent 72%); }
.outfit span { display: grid; grid-template-columns: 1fr auto; gap: 2px 10px; padding: 12px 16px 14px; } .outfit b { font: 400 19px var(--display); } .outfit i { grid-column: 1 / -1; font-style: normal; color: var(--dim); font-size: 14px; }

/* ---------- search, zoom, footer */
dialog { color: var(--text); border: 0; padding: 0; background: none; max-width: none; max-height: none; overscroll-behavior: contain; }
dialog:focus, dialog:focus-visible { outline: none; }
dialog::backdrop { background: rgba(6, 4, 18, .8); backdrop-filter: blur(6px); }
dialog[open], dialog[open]::backdrop { animation: fade .16s ease-out; }
@keyframes fade { from { opacity: 0; } }
.search { width: min(680px, 100% - 24px); margin: 9vh auto 0; }
.search .bar { display: flex; align-items: center; gap: 12px; background: var(--panel2); border: 2px solid var(--gold); border-radius: 18px; padding: 4px 12px 4px 18px; box-shadow: 0 20px 60px rgba(0, 0, 0, .6); }
.search input { flex: 1; min-width: 0; background: none; border: 0; outline: 0; font-size: 19px; padding: 14px 0; }
.search .bar button { background: none; border: 1px solid var(--line2); border-radius: 8px; color: var(--dim); font-size: 12px; padding: 4px 8px; cursor: pointer; }
.search .out { margin-top: 10px; max-height: 62vh; overflow: auto; background: var(--panel); border: 2px solid var(--line); border-radius: 18px; padding: 8px; display: none; }
.search .out.has { display: block; }
.search .out a { display: grid; grid-template-columns: 48px 1fr auto; gap: 12px; align-items: center; padding: 8px 12px; border-radius: 12px; }
.search .out a.sel, .search .out a:hover { background: var(--panel2); outline: 2px solid var(--pink); }
.search .out img, .search .out .noimg { width: 48px; height: 48px; object-fit: contain; border-radius: 10px; background: var(--deep); }
.search .out a > div { min-width: 0; }
.search .out b { font: 400 18px var(--display); display: block; } .search .out span { color: var(--dim); font-size: 13.5px; display: block; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.search .out em { font: 400 12px var(--display); font-style: normal; color: var(--gold); border: 1px solid rgba(255, 210, 74, .4); border-radius: 99px; padding: 3px 9px 1px; white-space: nowrap; }
.search .out p { padding: 22px; text-align: center; color: var(--dim); }
.zoom { position: fixed; inset: 0; width: 100%; height: 100%; margin: 0; display: none; place-items: center; cursor: zoom-out; touch-action: none; }
.zoom[open] { display: grid; }
.zoom figure { margin: 0; display: grid; justify-items: center; gap: 14px; }
.zoom img { width: auto; height: auto; max-width: 94vw; max-height: calc(100vh - 120px); border-radius: 16px; background: radial-gradient(circle at 50% 35%, #3b3080, var(--panel) 78%);
  box-shadow: 0 30px 80px #000; opacity: 0; }
.zoom img.ready { opacity: 1; animation: grow .22s cubic-bezier(.2, .9, .3, 1.15); }
@keyframes grow { from { opacity: 0; transform: scale(.94); } }
.zoom figcaption { font: 400 18px var(--display); text-align: center; text-shadow: 0 2px 6px #000; min-height: 1.4em; }
.zoom button { position: absolute; top: 14px; right: 14px; width: 46px; height: 46px; border-radius: 50%; border: 2px solid var(--line2); background: var(--panel); font: 400 24px/1 var(--display); cursor: pointer; }
.zoom button:hover { border-color: var(--gold); color: var(--gold); }
.foot { border-top: 2px solid var(--line); background: var(--deep); padding: 44px 0 50px; color: var(--dim); font-size: 14.5px; }
.foot .wrap { display: grid; grid-template-columns: 1.2fr 1fr; gap: 30px 60px; }
.foot img { width: 150px; margin-bottom: 10px; } .foot nav { display: grid; grid-template-columns: repeat(2, auto); gap: 6px 30px; align-content: start; justify-content: start; font: 400 17px var(--display); }
.foot nav a:hover { color: var(--gold); } .fine { grid-column: 1 / -1; color: var(--faint); font-size: 13px; border-top: 1px solid var(--line); padding-top: 18px; }
.lost { padding: 14vh 0; text-align: center; } .lost h1 { font-size: clamp(40px, 7vw, 72px); margin: 18px 0 10px; } .lost p { color: var(--dim); margin-bottom: 28px; }

/* ---------- smaller screens */
@media (max-width: 1080px) {
  .idgrid.short { grid-template-columns: repeat(4, 1fr); } .casegrid { grid-template-columns: repeat(2, 1fr); } .words.wide { grid-template-columns: auto 1fr; }
  .counts { grid-template-columns: repeat(5, 1fr); gap: 10px; } .counts b { font-size: 32px; }
  .two, .reading { grid-template-columns: 1fr; gap: 0; } .reading aside { position: static; margin-top: 40px; }
}
@media (max-width: 820px) {
  .top .wrap { flex-wrap: wrap; height: auto; padding: 8px 0 0; gap: 8px 12px; } .brand img { height: 38px; } .tools { margin-left: auto; } .find span, .find kbd { display: none; }
  html { scroll-padding-top: 120px; }
  .hero { min-height: 0; align-items: flex-start; } .hero-grid { grid-template-columns: 1fr; gap: 0; } .hero-copy { display: contents; } .hero-copy .logo { order: 1; margin-top: 28px; } .hero h1 { order: 2; } .trailer { order: 3; margin: 18px 0 2px; } .hero p { order: 4; } .cta { order: 5; } .stores { order: 6; margin-bottom: 30px; } .trailer .play { width: 70px; height: 70px; margin: -35px 0 0 -35px; } .trailer .play::after { left: 27px; top: 21px; border-width: 14px 0 14px 23px; } .hero::before { background: linear-gradient(180deg, rgba(14, 11, 34, .9) 0%, rgba(14, 11, 34, .55) 46%, rgba(14, 11, 34, .1) 70%), linear-gradient(0deg, var(--night), transparent 16%); }
  .counts { grid-template-columns: repeat(3, 1fr); } .counts a:nth-child(n + 4) { grid-column: span 1; } .today, .sheet, .docrow, .foes, .skills, .notes.big, .foot .wrap { grid-template-columns: 1fr; }
  .sheet { gap: 34px; } .portrait { max-width: 420px; margin-inline: auto; } .portrait .sd { right: -8px; } .fu-plate { padding: 28px 0; }
  .idgrid.short { grid-template-columns: repeat(3, 1fr); } .idgrid { grid-template-columns: repeat(auto-fill, minmax(140px, 1fr)); gap: 12px; } .idcard .who b { font-size: 18px; }
  .fugrid.two, .fugrid.three { grid-template-columns: 1fr; } .shots { grid-template-columns: 1fr; } .lines { columns: 1; } .lines li { grid-template-columns: 74px 1fr; }
  .foe { grid-template-columns: 104px 1fr; } .foe img { width: 104px; height: 104px; } .duty img { width: 128px; } .pick img { width: 92px; } .today b { font-size: 25px; }
  main section { margin-top: 48px; } .again li { grid-template-columns: 1fr; gap: 2px; } .paper { padding: 22px 20px 26px; } .paper dl { grid-template-columns: 1fr; gap: 2px; } .paper dd { margin-bottom: 10px; }
}
@media (max-width: 480px) { .idgrid.short { grid-template-columns: repeat(2, 1fr); } .casegrid { grid-template-columns: 1fr 1fr; gap: 12px; } .casefile b { font-size: 20px; } .counts span { font-size: 12.5px; } }
@media (prefers-reduced-motion: reduce) { *, *::before, *::after { animation: none !important; transition: none !important; } html { scroll-behavior: auto; } }


/* ---------- community (/community/, site/community.js): what people write uses the system faces, since the
   site's fonts are cut down to the glyphs the wiki itself prints */
.cm-page { display: grid; grid-template-columns: minmax(0, 1fr) 300px; gap: 28px; align-items: start; }
.ugc { font-family: -apple-system, BlinkMacSystemFont, "Apple SD Gothic Neo", "Noto Sans KR", "Noto Sans JP", "Noto Sans SC", "Malgun Gothic", "Segoe UI", system-ui, sans-serif; }
.btn.small { font-size: 15.5px; padding: 10px 15px 8px; border-radius: 11px; }
.btn.small.gold { box-shadow: 0 3px 0 #b3760f; }
.btn:disabled { cursor: default; filter: none; transform: none; }
.cm-linkbtn { background: none; border: 0; padding: 4px 2px; color: var(--dim); cursor: pointer; font-size: 14px; border-bottom: 1px dashed transparent; }
.cm-linkbtn:hover { color: var(--gold); border-bottom-color: rgba(255, 210, 74, .5); } .cm-linkbtn.faint { color: var(--faint); }
.cm-account { display: flex; flex-wrap: wrap; align-items: center; gap: 8px 12px; margin-bottom: 16px; padding: 12px 16px; background: var(--panel); border: 1px solid var(--line); border-radius: var(--r); }
.cm-account p { flex: 1 1 260px; color: var(--dim); font-size: 14px; } .cm-hello { font: 400 18px var(--display); color: var(--text); margin-right: auto; }
.cm-flash { margin: 0 0 14px; padding: 10px 14px; border-radius: 12px; background: rgba(61, 227, 218, .12); border: 1px solid rgba(61, 227, 218, .45); color: #c9fffb; }
.cm-flash.bad { background: rgba(255, 90, 79, .12); border-color: rgba(255, 90, 79, .5); color: #ffd3cf; }
.cm-loading, .cm-center { text-align: center; color: var(--dim); padding: 20px 0; }
.cm-bar { margin-bottom: 18px; } .cm-bar .cm-write { margin-left: auto; }
.cm-search button { flex: none; }
.cm-list { list-style: none; margin: 0; padding: 0; display: grid; gap: 8px; }
.cm-row { display: grid; grid-template-columns: auto minmax(0, 1fr); gap: 4px 12px; align-items: center; background: var(--panel); border: 2px solid var(--line); border-radius: 14px; padding: 12px 16px; transition: border-color .14s, background .14s; }
.cm-row:hover { border-color: var(--gold); background: var(--panel2); }
.cm-row .cm-title { font-weight: 700; font-size: 16.5px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.cm-row .cm-meta { grid-column: 2; }
.cm-cc { font-style: normal; color: var(--pink); font-size: 14px; margin-left: 6px; }
.cm-cat { font: 400 13px/1 var(--display); font-style: normal; padding: 5px 9px 4px; border-radius: 99px; white-space: nowrap; color: #1b1235; background: var(--dim); }
.cm-cat.c-free { background: #b9b2ec; } .cm-cat.c-guide { background: var(--mint); } .cm-cat.c-bug { background: #ff8a7f; } .cm-cat.c-idea { background: var(--gold); }
.cm-meta { display: flex; flex-wrap: wrap; align-items: center; gap: 2px 12px; color: var(--faint); font-size: 13.5px; font-variant-numeric: tabular-nums; }
.cm-who { color: var(--dim); font-weight: 600; } .cm-tag { color: var(--faint); font-weight: 500; margin-left: 2px; }
.cm-badge { font: 800 10.5px/1 var(--body); font-style: normal; color: #2a0f2a; background: var(--pink); border-radius: 99px; padding: 3px 6px 2px; margin-left: 5px; vertical-align: 2px; }
.cm-pager { display: flex; justify-content: space-between; align-items: center; margin-top: 18px; color: var(--dim); font-size: 14px; }
.cm-backrow { margin-bottom: 10px; }
.cm-post { background: var(--panel); border: 2px solid var(--line); border-radius: var(--r); padding: 22px 24px; box-shadow: var(--pop); }
.cm-post h2 { font-size: clamp(22px, 3vw, 28px); font-weight: 800; margin: 12px 0 8px; line-height: 1.35; overflow-wrap: anywhere; }
.cm-post header { border-bottom: 1px solid var(--line); padding-bottom: 14px; }
.cm-body { white-space: pre-wrap; overflow-wrap: anywhere; word-break: normal; font-size: 16.5px; line-height: 1.75; padding: 20px 0 24px; min-height: 80px; }
.cm-body a, .cm-text a { color: var(--gold); border-bottom: 1px dashed rgba(255, 210, 74, .5); word-break: break-all; }
.cm-post footer { display: flex; flex-wrap: wrap; align-items: center; gap: 10px; border-top: 1px solid var(--line); padding-top: 14px; }
.cm-post footer .cm-tools { margin-left: auto; }
.cm-tools { display: flex; flex-wrap: wrap; gap: 4px 12px; }
.cm-thread { margin-top: 30px; } .cm-thread h3 { font-size: 24px; margin-bottom: 12px; } .cm-thread h3 small { color: var(--pink); font-size: 18px; }
.cm-comments, .cm-replies { list-style: none; margin: 0; padding: 0; display: grid; gap: 10px; }
.cm-comment { background: var(--panel); border: 1px solid var(--line); border-radius: 14px; padding: 12px 16px; }
.cm-comment.gone > p { color: var(--faint); font-size: 14px; }
.cm-replies { margin-top: 10px; } .cm-replies .cm-comment { background: var(--panel2); border-left: 4px solid var(--line2); }
.cm-text { white-space: pre-wrap; overflow-wrap: anywhere; word-break: normal; margin: 6px 0 4px; }
.cm-cform { display: grid; gap: 10px; margin-top: 14px; padding: 14px; background: rgba(23, 19, 58, .7); border: 1px solid var(--line); border-radius: 14px; }
.cm-cform.reply { margin: 10px 0 0; }
.cm form textarea, .cm form input:not([type=search]), .cm form select, .cm-dialog input { width: 100%; background: var(--deep); border: 2px solid var(--line); border-radius: 12px; padding: 10px 12px; color: var(--text); }
.cm form textarea { resize: vertical; min-height: 84px; font: 500 16px/1.6 var(--body); }
.cm form textarea:focus, .cm form input:focus, .cm form select:focus, .cm-dialog input:focus { border-color: var(--gold); outline: 0; }
.cm-anon { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.cm-anon label, .cm-field, .cm-dialog label { display: grid; gap: 4px; font-size: 13.5px; color: var(--dim); }
.cm-ts { grid-column: 1 / -1; min-height: 0; } .cm-ts:empty { display: none; }
.cm-actions { display: flex; flex-wrap: wrap; justify-content: flex-end; align-items: center; gap: 10px; }
.cm-count { color: var(--faint); font-size: 12.5px; margin-right: auto; font-variant-numeric: tabular-nums; }
.cm-field .cm-count { justify-self: end; margin: 0; }
.cm-form { display: grid; gap: 14px; background: var(--panel); border: 2px solid var(--line); border-radius: var(--r); padding: 22px 24px; }
.cm-form h2 { font-size: 28px; } .cm-field.short { max-width: 280px; }
.cm-dialog { max-width: min(420px, 92vw); background: var(--panel); color: var(--text); border: 2px solid var(--line2); border-radius: 18px; padding: 20px; box-shadow: 0 20px 60px rgba(0, 0, 0, .6); }
.cm-dialog::backdrop { background: rgba(5, 4, 14, .65); }
.cm-ask { display: grid; gap: 14px; } .cm-ask p { white-space: pre-line; }
.cm-rules { position: sticky; top: 96px; background: var(--panel); border: 2px solid var(--line); border-radius: var(--r); padding: 18px 20px; }
.cm-rules h2 { font-size: 21px; margin-bottom: 10px; } .cm-rules ol { margin: 0; padding-left: 20px; display: grid; gap: 6px; font-size: 14px; color: #d9d4f7; }
.cm-rules .note { font-size: 13px; }
.cm-admin-list { list-style: none; margin: 0; padding: 0; display: grid; gap: 10px; }
.cm-admin-list li { background: var(--panel); border: 1px solid var(--line); border-radius: 14px; padding: 12px 16px; display: grid; gap: 6px; }
.cm-admin-list li.is-hidden { border-color: rgba(255, 90, 79, .5); }
.cm-admin-list code { font-size: 12px; color: var(--faint); }
.cm-admin-list .cm-text { max-height: 9em; overflow: auto; }
.cm-token { max-width: 420px; }
@media (max-width: 1080px) { .cm-page { grid-template-columns: 1fr; } .cm-rules { position: static; } }
@media (max-width: 560px) {
  .cm-row { grid-template-columns: 1fr; padding: 10px 12px; } .cm-row .cm-cat { justify-self: start; } .cm-row .cm-meta { grid-column: 1; }
  .cm-post, .cm-form { padding: 16px; } .cm-anon { grid-template-columns: 1fr; } .cm-bar .cm-write { margin-left: 0; }
}

/* ---- top menu, grouped (2026-11-24): two dropdowns, two links and the demo button; a drawer on phones ---- */
.nav { align-items: center; gap: 4px; }
.nav > a, .nav-trigger { font: 400 18px var(--display); color: var(--dim); padding: 8px 12px; border-radius: 12px; white-space: nowrap; transition: color .15s, background .15s; }
.nav-trigger { display: inline-flex; align-items: center; gap: 5px; background: none; border: 0; cursor: pointer; }
.nav-trigger svg { width: 12px; height: 12px; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; transition: transform .18s; }
.nav > a:hover, .nav-trigger:hover, .nav-group.open .nav-trigger { color: var(--text); background: rgba(255, 255, 255, .06); }
.nav > a.nav-link[aria-current], .nav-group.here .nav-trigger { color: #1b1235; background: var(--gold); box-shadow: 0 3px 0 #b98a12; }
.nav-group { position: relative; }
.nav-group.open .nav-trigger svg { transform: rotate(180deg); }
.nav-panel { position: absolute; left: -8px; top: calc(100% + 10px); z-index: 40; width: 320px; padding: 8px; display: grid; gap: 2px;
  background: var(--panel); border: 2px solid var(--line2); border-radius: 18px; box-shadow: var(--pop), 0 18px 40px rgba(0, 0, 0, .5);
  opacity: 0; visibility: hidden; transform: translateY(-6px); transition: opacity .16s, transform .16s, visibility 0s .16s; }
.nav-panel::before { content: ""; position: absolute; left: 0; right: 0; top: -12px; height: 12px; }
.nav-group.open .nav-panel { opacity: 1; visibility: visible; transform: none; transition: opacity .16s, transform .16s; }
.nav-panel a { display: grid; grid-template-columns: 42px 1fr; gap: 12px; align-items: center; padding: 8px 10px; border-radius: 12px; color: var(--text); }
.nav-panel a:hover, .nav-panel a:focus-visible { background: var(--panel2); outline: none; }
.nav-panel a[aria-current] { background: color-mix(in srgb, var(--gold) 16%, transparent); }
.nav-panel .ico { width: 42px; height: 42px; border-radius: 12px; display: grid; place-items: center; overflow: hidden; background: var(--deep); border: 1px solid var(--line); }
.nav-panel .ico img { width: 100%; height: 100%; object-fit: cover; }
.nav-panel .ico svg { width: 22px; height: 22px; fill: var(--pink); }
.nav-panel .t { display: grid; gap: 1px; min-width: 0; }
.nav-panel b { font: 400 17px/1.2 var(--display); }
.nav-panel small { font-size: 12.5px; color: var(--dim); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.nav > a.nav-cta { margin-left: 6px; color: #2a1640; background: linear-gradient(180deg, #ffe07a, #ffb93c); box-shadow: 0 3px 0 #b3760f; font-size: 17px; padding: 7px 14px; }
.nav > a.nav-cta:hover { filter: brightness(1.06); background: linear-gradient(180deg, #ffe07a, #ffb93c); color: #2a1640; }
.nav > a.nav-cta[aria-current] { outline: 2px solid #fff; outline-offset: 2px; }
.menu-btn { display: none; place-items: center; width: 40px; height: 40px; border-radius: 12px; background: var(--panel); border: 1px solid var(--line); color: var(--text); cursor: pointer; }
.menu-btn svg { width: 22px; height: 22px; fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; }
.nav-scrim { position: fixed; inset: 0; z-index: 44; background: rgba(5, 3, 15, .55); backdrop-filter: blur(2px); }
@media (min-width: 821px) { .nav-scrim { display: none; } }
@media (max-width: 1100px) and (min-width: 821px) { .nav > a, .nav-trigger { font-size: 16.5px; padding: 7px 9px; } .nav-panel { width: 290px; } }
@media (max-width: 820px) {
  .top { backdrop-filter: none; -webkit-backdrop-filter: none; background: rgba(14, 11, 34, .97); }      /* (a blur would make the drawer's fixed box relative to the header) */
  .top .wrap { flex-wrap: nowrap !important; height: 60px !important; padding: 0 !important; }
  .menu-btn { display: grid; }
  .nav { position: fixed; top: 0; right: 0; bottom: 0; z-index: 45; width: min(340px, 86vw); margin: 0 !important; padding: 18px 14px 28px !important; order: 0 !important;
    flex-direction: column; align-items: stretch; gap: 6px; overflow-y: auto !important; overflow-x: hidden !important; background: var(--night); border-left: 2px solid var(--line2);
    box-shadow: -20px 0 50px rgba(0, 0, 0, .5); transform: translateX(105%); transition: transform .22s ease; visibility: hidden; }
  html.menu-open .nav { transform: none; visibility: visible; }
  .nav > a, .nav-trigger { font-size: 19px; padding: 10px 12px; }
  .nav-trigger { width: 100%; justify-content: space-between; pointer-events: none; color: var(--faint); font-size: 14px; letter-spacing: .06em; padding: 14px 12px 4px; background: none !important; box-shadow: none !important; }
  .nav-trigger svg { display: none; }
  .nav-panel { position: static; width: auto; opacity: 1; visibility: visible; transform: none; padding: 0; border: 0; box-shadow: none; background: none; }
  .nav > a.nav-cta { margin: 14px 0 0; text-align: center; font-size: 19px; padding: 12px; }
  .nav-group.here .nav-trigger { color: var(--gold); }
}
