/* LynnX API: tampilan panel komik. Warna diambil dari logo (rambut biru tua, pita kuning). */
:root {
  --paper: #DCE3EB; --panel: #F7F8FA; --ink: #1B2A55; --mute: #4A5780; --soft: #E3E8F1;
  --blue: #2F58B8; --yellow: #F4C430; --red: #B8322B; --green: #1E7A4B; --rule: rgba(27, 42, 85, .22);
  --display: 'Dela Gothic One', 'Arial Black', Impact, sans-serif;
  --body: 'Zen Kaku Gothic New', 'Hiragino Sans', 'Segoe UI', system-ui, sans-serif;
  --mono: ui-monospace, 'SF Mono', Menlo, Consolas, monospace;
}
*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }
body { margin: 0; min-height: 100vh; min-height: 100dvh; display: flex; flex-direction: column; font: 400 1rem/1.7 var(--body); color: var(--ink); background: var(--paper); }
a { color: var(--blue); text-underline-offset: 3px; }
a:hover { color: var(--ink); }
h1, h2, h3 { margin: 0 0 .5em; font-family: var(--display); font-weight: 400; line-height: 1.2; }
h1 { font-size: clamp(1.9rem, 5vw, 3.3rem); line-height: 1.15; }
h2 { font-size: clamp(1.2rem, 2.3vw, 1.6rem); }
h3 { font-size: 1.05rem; }
p { margin: 0 0 1em; }
img { max-width: 100%; }
code, pre { font-family: var(--mono); }
:not(pre) > code { padding: 1px 6px; font-size: .88em; background: var(--soft); border: 1px solid var(--rule); }
:focus-visible { outline: 3px solid var(--blue); outline-offset: 2px; }
.hidden, [hidden] { display: none !important; }
.muted { color: var(--mute); }
.visually-hidden { position: absolute !important; width: 1px; height: 1px; margin: -1px; padding: 0; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0; }

/* ---------- header: bar melayang + laci menu ---------- */
.top { position: sticky; top: 0; z-index: 40; width: 100%; max-width: 1120px; margin: 0 auto; padding: calc(12px + env(safe-area-inset-top, 0px)) 16px 12px; background: var(--paper); }
.topbar { position: relative; display: flex; align-items: center; gap: 10px; padding: 7px 8px; background: var(--panel); border: 2px solid var(--ink); box-shadow: 4px 4px 0 var(--ink); }
.brand { min-width: 0; margin-right: auto; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font: 400 1.25rem/1 var(--display); color: var(--ink); text-decoration: none; }
.icon-btn { position: relative; display: grid; place-items: center; flex: none; width: 42px; height: 42px; padding: 0; color: var(--ink); background: var(--panel); border: 2px solid var(--ink); cursor: pointer; }
.icon-btn:hover { background: var(--yellow); }
.icon-btn[aria-expanded="true"] { background: var(--yellow); }
.icon-btn svg, .drawer svg { width: 22px; height: 22px; flex: none; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }
#navMenu .i-close, #navMenu[aria-expanded="true"] .i-open { display: none; }
#navMenu[aria-expanded="true"] .i-close { display: block; }
.dot { position: absolute; top: -7px; right: -7px; width: 14px; height: 14px; background: var(--yellow); border: 2px solid var(--ink); border-radius: 50%; }
.icon-btn:hover .dot, .icon-btn[aria-expanded="true"] .dot { background: #fff; }
.me { display: block; flex: none; line-height: 0; }
.me img { width: 42px; height: 42px; object-fit: cover; background: #fff; border: 2px solid var(--ink); }
.me:hover img { border-color: var(--blue); }
.topbar .btn-sm { flex: none; padding: 8px 14px; }
.pop { position: absolute; right: 0; top: calc(100% + 10px); z-index: 30; width: min(340px, calc(100vw - 32px)); background: var(--panel); border: 2px solid var(--ink); box-shadow: 4px 4px 0 var(--ink); }
.pop article { padding: 12px 14px; border-top: 1px solid var(--rule); }
.pop article:first-child { border-top: 0; }
.pop p { margin: 2px 0 4px; font-size: .92rem; }
.pop time { font-size: .8rem; color: var(--mute); }
.pop .empty { margin: 0; padding: 14px; color: var(--mute); }

.drawer { position: absolute; left: 16px; right: 16px; top: calc(100% - 2px); z-index: 30; max-width: 360px; max-height: calc(100dvh - 96px); overflow-y: auto; padding: 14px 14px 6px; background: var(--panel); border: 2px solid var(--ink); box-shadow: 4px 4px 0 var(--ink); animation: drop .14s ease-out; }
@keyframes drop { from { opacity: 0; transform: translateY(-6px); } }
.drawer > .btn { display: flex; width: 100%; margin-bottom: 12px; }
.drawer > .btn.on { box-shadow: 3px 3px 0 var(--blue); }
.drawer .out { color: var(--red); }
.menu { margin: 14px -14px 0; padding: 0; list-style: none; border-top: 2px solid var(--ink); }
.menu a, .menu button { display: flex; width: 100%; text-align: left; font: inherit; background: none; border-width: 1px 0 0; border-style: solid; cursor: pointer; align-items: center; gap: 14px; padding: 13px 14px; font-weight: 500; color: var(--ink); text-decoration: none; border-color: var(--rule); }
.menu li:first-child > a, .menu li:first-child > button { border-top-width: 0; }
.menu a:hover, .menu button:hover { background: var(--soft); }
.menu a.on { font-weight: 700; background: #FFF1BF; box-shadow: inset 6px 0 0 var(--yellow); }

/* chip tier di navbar */
.chip { display: flex; flex: none; align-items: stretch; font: 500 .74rem/1 var(--mono); border: 2px solid var(--ink); }
.chip b { display: grid; place-items: center; padding: 0 8px; font-weight: 700; letter-spacing: .04em; text-transform: uppercase; background: var(--yellow); border-right: 2px solid var(--ink); }
.chip i { display: grid; place-items: center; padding: 0 8px; font-style: normal; font-variant-numeric: tabular-nums; background: #fff; }
.chip { height: 34px; }
/* layar sempit: chip disusun dua baris (tier di atas, angka di bawah) supaya bar tetap muat */
@media (max-width: 520px) {
  .chip { flex-direction: column; height: 40px; font-size: .62rem; }
  .chip b, .chip i { flex: 1; padding: 0 6px; }
  .chip b { border-right: 0; border-bottom: 2px solid var(--ink); }
}
@media (max-width: 430px) {
  .top { padding-left: 12px; padding-right: 12px; }
  .topbar { gap: 7px; padding: 6px; }
  .icon-btn, .me img { width: 40px; height: 40px; }
  .brand { font-size: 1.05rem; }
}

/* laci dokumentasi */
.search { display: flex; align-items: center; gap: 10px; margin: 0 0 12px; padding: 0 12px; background: #fff; border: 2px solid var(--ink); }
.search:focus-within { border-color: var(--blue); box-shadow: 0 0 0 3px var(--yellow); }
.search svg { color: var(--mute); }
.search input:focus { border: 0; box-shadow: none; }
.search input { flex: 1; min-width: 0; padding: 11px 0; font: inherit; color: var(--ink); background: none; border: 0; outline: none; }
.drawer.docs .menu { margin-top: 2px; }
.cat { justify-content: flex-start; }
.cat span { flex: 1; }
.cat svg:last-child { transition: transform .15s; }
.cat[aria-expanded="true"] svg:last-child { transform: rotate(180deg); }
.eps { margin: 0; padding: 0 0 8px; list-style: none; }
.menu .eps a { justify-content: space-between; padding: 9px 14px 9px 50px; border-top-width: 0; font-size: .93rem; }
.m { padding: 0 6px; font: 700 .68rem/1.5 var(--mono); font-style: normal; color: #fff; background: var(--green); }
.m.post { background: var(--blue); }
.menu .none { padding: 14px; color: var(--mute); border-top: 1px solid var(--rule); }
.endpoint { scroll-margin-top: 84px; }

/* halaman social media */
.soc-head { display: grid; justify-items: center; gap: 4px; margin: 0 0 12px; padding: 26px 20px 22px; text-align: center; }
.soc-head img { width: 112px; height: 112px; margin-bottom: 12px; object-fit: cover; background: #fff; border: 2px solid var(--ink); box-shadow: 4px 4px 0 var(--ink); }
.soc-head h1 { margin: 0; font-size: clamp(1.7rem, 6vw, 2.4rem); }
.soc-head p { margin: 0; }
.soc-list { display: grid; gap: 12px; }
.soc-item { display: flex; align-items: center; gap: 16px; padding: 14px 16px; color: var(--ink); text-decoration: none; background: var(--panel); border: 2px solid var(--ink); box-shadow: 3px 3px 0 var(--ink); transition: transform .08s, box-shadow .08s; }
.soc-item:hover { color: var(--ink); transform: translate(1px, 1px); box-shadow: 2px 2px 0 var(--ink); }
.soc-ico { display: grid; place-items: center; flex: none; width: 52px; height: 52px; background: var(--yellow); border: 2px solid var(--ink); }
.soc-item svg { width: 24px; height: 24px; flex: none; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }
.soc-item > svg { margin-left: auto; color: var(--blue); }
.soc-txt { display: grid; min-width: 0; line-height: 1.35; }
.soc-txt b { font-size: 1.05rem; }
.soc-txt small { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-size: .92rem; color: var(--mute); }

/* FAQ */
.s-faq { padding: 22px 24px 24px; }
.faq { display: grid; gap: 10px; }
.faq details { background: #fff; border: 2px solid var(--ink); }
.faq summary { display: flex; align-items: center; justify-content: space-between; gap: 16px; padding: 14px 16px; font-weight: 700; list-style: none; cursor: pointer; }
.faq summary::-webkit-details-marker { display: none; }
.faq summary::after { content: '+'; flex: none; font: 400 1.4rem/1 var(--display); color: var(--blue); }
.faq details[open] summary { background: var(--yellow); border-bottom: 2px solid var(--ink); }
.faq details[open] summary::after { content: '\2212'; color: var(--ink); }
.faq p { margin: 0; padding: 14px 16px; max-width: 62ch; }

/* ---------- layout ---------- */
body:has(.shell) .top, body:has(.shell) .foot { max-width: 960px; }
.page, .shell { flex: 1; width: 100%; margin: 0 auto; padding: 6px 16px 48px; }
.page { max-width: 1120px; }
.shell { max-width: 960px; }
.panel, .card { background: var(--panel); border: 2px solid var(--ink); }
.card { padding: 20px; margin: 0 0 12px; }
.card h2 { margin-bottom: 14px; padding-bottom: 10px; border-bottom: 2px solid var(--ink); }
.card > :last-child { margin-bottom: 0; }
.label { display: block; margin-bottom: 6px; font-size: .9rem; font-weight: 700; }

/* ---------- tombol & form ---------- */
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 8px; padding: 11px 20px; font: 700 1rem var(--body); color: var(--ink); background: var(--yellow); border: 2px solid var(--ink); box-shadow: 3px 3px 0 var(--ink); cursor: pointer; text-decoration: none; transition: transform .08s, box-shadow .08s; }
.btn:hover { color: var(--ink); text-decoration: none; transform: translate(1px, 1px); box-shadow: 2px 2px 0 var(--ink); }
.btn:active { transform: translate(3px, 3px); box-shadow: none; }
.btn:disabled { opacity: .5; cursor: not-allowed; transform: none; box-shadow: 3px 3px 0 var(--ink); }
.btn-ghost { background: var(--panel); }
.btn-danger { color: #fff; background: var(--red); }
.btn-danger:hover { color: #fff; }
.btn-sm { padding: 5px 12px; font-size: .88rem; box-shadow: 2px 2px 0 var(--ink); }
input[type=text], input[type=email], input[type=password], input[type=number], select { display: block; width: 100%; padding: 11px 12px; font: inherit; color: var(--ink); background: #fff; border: 2px solid var(--ink); border-radius: 0; outline: none; }
input:focus, select:focus { border-color: var(--blue); box-shadow: 0 0 0 3px var(--yellow); }
input[type=checkbox] { width: 18px; height: 18px; accent-color: var(--ink); }
.field { margin: 0 0 14px; text-align: left; }
.field label, .modal-box label { display: block; margin-bottom: 5px; font-size: .9rem; font-weight: 700; }
.hint { margin: 4px 0 0; font-size: .82rem; color: var(--mute); }
.msg { min-height: 1.3em; margin-top: 10px; font-size: .92rem; font-weight: 500; color: var(--red); }
.msg.ok { color: var(--green); }
pre.wrap { white-space: pre-wrap; word-break: break-all; }
pre { margin: 10px 0; padding: 14px 16px; overflow-x: auto; font-size: .85rem; line-height: 1.6; color: #EEF1F8; background: var(--ink); border: 2px solid var(--ink); }
.code-box { display: flex; align-items: center; justify-content: space-between; gap: 10px; padding: 10px 12px; overflow-x: auto; font-family: var(--mono); font-size: .9rem; color: #EEF1F8; background: var(--ink); border: 2px solid var(--ink); }
.code-box code { padding: 0; color: inherit; background: none; border: 0; }
.row { display: flex; flex-wrap: wrap; gap: 12px; }

/* ---------- halaman masuk / daftar ---------- */
body.auth-page { align-items: center; justify-content: center; padding: 20px 16px; }
.auth { display: grid; width: 100%; max-width: 880px; background: var(--panel); border: 2px solid var(--ink); }
.auth-art { display: none; place-content: center; justify-items: center; gap: 18px; padding: 32px; text-align: center; background-color: var(--yellow); background-image: radial-gradient(rgba(27, 42, 85, .35) 1.5px, transparent 1.8px); background-size: 11px 11px; border-right: 2px solid var(--ink); }
.auth-art img { width: min(100%, 210px); aspect-ratio: 1; object-fit: cover; background: #fff; border: 2px solid var(--ink); box-shadow: 5px 5px 0 var(--ink); }
.auth-art strong { padding: 2px 10px; font: 400 1.4rem var(--display); background: var(--panel); border: 2px solid var(--ink); }
.auth-box { padding: 26px 24px 28px; }
.back { display: inline-block; margin-bottom: 18px; font-weight: 700; color: var(--ink); }
.auth-box h1 { font-size: 2rem; }
.auth-box .sub { margin: 0 0 20px; color: var(--mute); }
.auth-box .btn-main { width: 100%; padding: 13px; }
.captcha-box { display: flex; justify-content: center; margin: 4px 0 12px; min-height: 65px; }
.link-btn { padding: 0; font: inherit; font-weight: 700; color: var(--blue); background: none; border: 0; text-decoration: underline; cursor: pointer; }
.link-btn:disabled { opacity: .5; cursor: not-allowed; }
.auth-links { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 8px 16px; margin-top: 18px; color: var(--mute); font-size: .95rem; }
.auth-links a { font-weight: 700; }
.divider { display: flex; align-items: center; gap: 12px; margin: 20px 0 6px; color: var(--mute); font-size: .88rem; }
.divider::before, .divider::after { content: ''; flex: 1; border-top: 2px solid var(--rule); }
.oauth-btn { display: flex; align-items: center; justify-content: center; gap: 10px; width: 100%; margin-top: 10px; padding: 11px 16px; font-weight: 700; color: var(--ink); background: var(--panel); border: 2px solid var(--ink); text-decoration: none; }
.oauth-btn:hover { color: var(--ink); background: #fff; }
.oauth-btn.github { color: #fff; background: var(--ink); }
.oauth-btn.github:hover { color: #fff; background: var(--blue); }
@media (min-width: 760px) { .auth { grid-template-columns: 5fr 6fr; } .auth-art { display: grid; } .auth-box { padding: 36px 36px 34px; } }

.modal-overlay { position: fixed; inset: 0; z-index: 100; display: none; align-items: center; justify-content: center; padding: 16px; background: rgba(27, 42, 85, .6); }
.modal-overlay.active { display: flex; }
.modal-box { width: 100%; max-width: 420px; max-height: 90vh; overflow-y: auto; padding: 22px; text-align: left; background: var(--panel); border: 2px solid var(--ink); box-shadow: 6px 6px 0 var(--ink); }
.modal-box h3 { margin-bottom: 14px; }
.modal-box .btn { width: 100%; }
.modal-close { display: block; width: 100%; margin-top: 12px; padding: 10px; font: 700 .95rem var(--body); color: var(--ink); background: var(--soft); border: 2px solid var(--ink); cursor: pointer; }
.otp-row { display: flex; gap: 8px; margin: 6px 0 12px; }
.otp-row input { width: 100%; max-width: 46px; height: 52px; padding: 0; font-size: 1.25rem; font-weight: 700; text-align: center; }
.resend-row { margin-top: 14px; font-size: .9rem; color: var(--mute); }

/* ---------- beranda ---------- */
.hero, .grid { display: grid; gap: 10px; grid-template-columns: repeat(12, 1fr); margin-top: 6px; }
.grid { margin-top: 10px; }
.hero > *, .grid > * { min-width: 0; grid-column: 1 / -1; }
.p-title { padding: clamp(22px, 4vw, 46px); }
.p-title h1 { max-width: 13em; margin-bottom: .45em; }
.lead { max-width: 34em; margin: 0 0 24px; font-size: 1.1rem; }
.actions { display: flex; flex-wrap: wrap; gap: 14px; }
.p-art { display: grid; place-items: center; margin: 0; padding: 22px; background-color: var(--yellow); background-image: radial-gradient(rgba(27, 42, 85, .35) 1.5px, transparent 1.8px); background-size: 11px 11px; }
.p-art img { width: min(100%, 150px); aspect-ratio: 1; object-fit: cover; background: #fff; border: 2px solid var(--ink); box-shadow: 5px 5px 0 var(--ink); }
.p-req { padding: 18px 20px 20px; }
.p-req h2 { margin-bottom: 4px; }
.bubble { position: relative; display: flex; flex-wrap: wrap; align-items: baseline; gap: 4px 14px; margin: 16px 8px 6px; padding: 14px 20px; background: var(--panel); border: 2px solid var(--ink); border-radius: 24px; }
.bubble::before { content: ''; position: absolute; left: 34px; top: -12px; width: 20px; height: 20px; background: var(--panel); border-left: 2px solid var(--ink); border-top: 2px solid var(--ink); transform: rotate(45deg); }
.bubble p { flex: 1; min-width: 200px; margin: 0; }
.bubble time { font-size: .85rem; color: var(--mute); }
.s-steps, .s-base, .s-stats, .s-top { padding: 22px 24px 24px; }
.s-top { align-self: start; }
.steps { margin: 0; padding: 0; list-style: none; counter-reset: s; }
.steps li { position: relative; padding: 14px 0 14px 60px; border-top: 1px solid var(--rule); }
.steps li:first-child { border-top: 0; }
.steps li::before { counter-increment: s; content: counter(s); position: absolute; left: 0; top: 14px; display: grid; place-items: center; width: 44px; height: 44px; font: 400 1.3rem var(--display); background: var(--yellow); border: 2px solid var(--ink); }
.steps b { display: block; }
.steps span { color: var(--mute); }
.base-url { display: block; width: 100%; margin: 0 0 14px; padding: 12px; text-align: left; font: 500 1rem var(--mono); color: #EEF1F8; background: var(--ink); border: 2px solid var(--ink); cursor: pointer; word-break: break-all; }
.clock { margin: 4px 0 0; font: 400 clamp(1.8rem, 4vw, 2.5rem) var(--display); font-variant-numeric: tabular-nums; }
.strip { display: grid; padding: 0; }
.strip > div { padding: 22px 24px; border-top: 2px solid var(--ink); }
.strip > div:first-child { border-top: 0; }
.strip p { margin: 0; color: var(--mute); }
.nums { display: grid; grid-template-columns: repeat(3, 1fr); margin: 0 0 22px; border: 2px solid var(--ink); }
.nums > div { padding: 14px 12px; border-left: 2px solid var(--ink); }
.nums > div:first-child { border-left: 0; }
.nums b { display: block; font: 400 clamp(1.3rem, 3.4vw, 2.2rem)/1.15 var(--display); font-variant-numeric: tabular-nums; }
.nums span { font-size: .9rem; color: var(--mute); }
.rows { margin: 0; padding: 0; list-style: none; }
.rows li { display: flex; justify-content: space-between; align-items: baseline; gap: 12px; padding: 9px 0; border-top: 1px solid var(--rule); }
.rows li:first-child { border-top: 0; }
.rows small { display: inline-block; margin-left: 8px; color: var(--mute); font-size: .85rem; }
.s-top .rows small { display: block; margin: 0; }
.rows b { font-variant-numeric: tabular-nums; }
.rows code { word-break: break-all; }
@media (min-width: 860px) {
  .p-title { grid-column: 1 / 9; }
  .p-art { grid-column: 9 / 13; grid-row: 1 / 3; padding: 32px; }
  .p-art img { width: min(100%, 240px); }
  .p-req { grid-column: 1 / 9; }
  .s-steps, .s-stats { grid-column: 1 / 8; }
  .s-base, .s-top { grid-column: 8 / 13; }
  .strip { grid-template-columns: repeat(3, 1fr); }
  .strip > div { border-top: 0; border-left: 2px solid var(--ink); }
  .strip > div:first-child { border-left: 0; }
}
@keyframes draw { from { clip-path: inset(0 100% 0 0); } to { clip-path: inset(0 0 0 0); } }
.hero > * { animation: draw .45s cubic-bezier(.2, .7, .2, 1) both; }
.hero > :nth-child(2) { animation-delay: .12s; }
.hero > :nth-child(3) { animation-delay: .24s; }

/* ---------- footer ---------- */
.foot { width: 100%; max-width: 1120px; margin: 0 auto; padding: 0 16px calc(28px + env(safe-area-inset-bottom, 0px)); }
.foot-grid { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 20px 56px; padding-top: 22px; border-top: 2px solid var(--ink); }
.foot .wm { font: 400 1.25rem var(--display); }
.foot p { margin: 4px 0 0; color: var(--mute); }
.foot nav, .soc { display: flex; flex-direction: column; }
.foot a { color: var(--ink); }
.soc:empty { display: none; }
.copy { margin: 18px 0 0 !important; font-size: .88rem; }

/* ---------- profil ---------- */
.profile-head { display: flex; align-items: center; gap: 16px; }
.avatar { width: 72px; height: 72px; object-fit: cover; background: #fff; border: 2px solid var(--ink); }
.profile-head h2 { margin: 0 0 2px; padding: 0; border: 0; }
.badge { display: inline-block; padding: 0 8px; font-size: .78rem; font-weight: 700; background: var(--yellow); border: 2px solid var(--ink); }
.badge.red { color: #fff; background: var(--red); }
.key-row { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.key-value { flex: 1; min-width: 160px; padding: 9px 12px; overflow-x: auto; white-space: nowrap; font-family: var(--mono); font-size: .9rem; background: var(--soft); border: 2px solid var(--ink); }
.warn { margin-top: 12px; padding: 10px 14px; font-size: .9rem; background: #FFF1BF; border: 2px solid var(--ink); }
.stat-big { margin: 0 0 8px; font: 400 1.4rem var(--display); }
.bar { height: 14px; background: #fff; border: 2px solid var(--ink); }
.bar > i { display: block; width: 0; height: 100%; background: var(--blue); transition: width .4s; }
.chart { display: flex; align-items: flex-end; gap: 8px; height: 130px; }
.chart > div { flex: 1; display: flex; flex-direction: column; justify-content: flex-end; align-items: center; height: 100%; font-size: .75rem; color: var(--mute); }
.chart i { display: block; width: 100%; min-height: 3px; background: var(--blue); }
.chart > div:last-child i { background: var(--yellow); border: 2px solid var(--ink); }
.chart b { color: var(--ink); }

/* ---------- dokumentasi ---------- */
.endpoint { padding: 0; }
.endpoint summary { display: flex; flex-wrap: wrap; align-items: center; gap: 10px; padding: 14px 18px; font-weight: 700; list-style: none; cursor: pointer; }
.endpoint summary::-webkit-details-marker { display: none; }
.endpoint summary::after { content: '+'; margin-left: auto; font: 400 1.3rem var(--display); }
.endpoint[open] summary { border-bottom: 2px solid var(--ink); }
.endpoint[open] summary::after { content: '\2212'; }
.endpoint .body { padding: 0 18px 18px; }
.method { padding: 0 8px; font: 700 .78rem var(--mono); color: #fff; background: var(--green); }
.method.post { background: var(--blue); }
.path { font: 500 .9rem var(--mono); color: var(--mute); word-break: break-all; }
.table-wrap { overflow-x: auto; }
table { width: 100%; border-collapse: collapse; font-size: .92rem; }
th, td { padding: 9px 10px; text-align: left; vertical-align: top; border-bottom: 1px solid var(--rule); }
th { font-size: .85rem; color: var(--mute); border-bottom: 2px solid var(--ink); }
.tabs { display: flex; gap: 6px; margin: 14px 0 0; }
.tabs button, .chips button, .pager button { padding: 5px 14px; font: 700 .88rem var(--body); color: var(--ink); background: var(--panel); border: 2px solid var(--ink); cursor: pointer; }
.tabs button.active, .chips button.active, .pager button.active { background: var(--yellow); }

/* ---------- upload & admin ---------- */
.dropzone { padding: 36px 16px; text-align: center; background: #fff; border: 2px dashed var(--ink); cursor: pointer; }
.dropzone:hover, .dropzone.drag { background: #FFF6D6; }
.dropzone strong { display: block; font-size: 1.1rem; }
.chips { display: flex; flex-wrap: wrap; gap: 8px; }
.chips button { padding: 8px 16px; }
.progress { margin-top: 14px; }
.file-pill { display: flex; align-items: center; justify-content: space-between; gap: 10px; margin-top: 12px; padding: 8px 12px; font-size: .92rem; background: var(--soft); border: 2px solid var(--ink); }
.file-pill span { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.toolbar { display: flex; gap: 10px; align-items: center; margin-bottom: 14px; }
.status-ok { font-weight: 700; color: var(--green); }
.status-ban { font-weight: 700; color: var(--red); }
td code { font-size: .8rem; }
.pager { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 14px; }
.pager button { min-width: 36px; }
.check { display: flex; align-items: center; gap: 8px; margin: 4px 0 14px; }
.check label { margin: 0; }

/* ---------- shop ---------- */
.shell.shop { max-width: 640px; }
body:has(.shop) .top, body:has(.shop) .foot { max-width: 640px; }
.stage { margin-top: 6px; padding: 12px 0 22px; overflow: hidden; background-color: var(--yellow); background-image: radial-gradient(rgba(27, 42, 85, .35) 1.5px, transparent 1.8px); background-size: 11px 11px; }
.track { display: flex; overflow-x: auto; scroll-snap-type: x mandatory; scrollbar-width: none; overscroll-behavior-x: contain; }
.track::-webkit-scrollbar { display: none; }
.track:focus-visible { outline-offset: -6px; }
.slide { display: flex; flex: 0 0 100%; min-width: 0; padding: 30px 22px 12px; scroll-snap-align: center; scroll-snap-stop: always; }
.pad { width: 100%; padding: 40px 24px; text-align: center; }
.plan { position: relative; display: flex; flex-direction: column; width: 100%; max-width: 380px; margin: 0 auto; padding: 36px 24px 24px; text-align: center; background: var(--panel); border: 2px solid var(--ink); box-shadow: 5px 5px 0 var(--ink); }
.plan.hot { box-shadow: 5px 5px 0 var(--blue); }
.plan-flag { position: absolute; top: -17px; left: 50%; padding: 3px 14px; font: 400 .85rem/1.5 var(--display); white-space: nowrap; color: #fff; background: var(--blue); border: 2px solid var(--ink); box-shadow: 2px 2px 0 var(--ink); transform: translateX(-50%); }
.plan-img { display: block; width: 112px; height: 112px; margin: 0 auto 18px; object-fit: cover; background: #fff; border: 2px solid var(--ink); box-shadow: 3px 3px 0 var(--ink); }
.plan h2 { margin: 0 0 6px; font-size: 1.6rem; }
.plan-price { margin: 0 0 20px; font: 400 clamp(1.7rem, 7vw, 2.2rem)/1.2 var(--display); font-variant-numeric: tabular-nums; color: var(--blue); }
.plan-spec, .plan-feat { margin: 0; padding: 0; list-style: none; }
.plan-spec { margin-bottom: 18px; color: var(--mute); }
.plan-spec li { padding: 10px 0; }
.plan-spec li + li { border-top: 2px dashed var(--rule); }
.plan-feat { margin-bottom: 22px; font-weight: 700; }
.plan-feat { margin-top: auto; padding-top: 18px; }
.plan-spec { margin-bottom: 0; }
.plan-feat li { padding: 4px 0; }
.plan-feat .yes { color: var(--green); }
.plan-feat .no { color: var(--mute); font-weight: 500; text-decoration: line-through; }
.plan-btn { width: 100%; padding: 13px; }
.plan-btn:disabled { opacity: 1; color: var(--mute); background: var(--soft); box-shadow: none; }
.plan-left { margin: 10px 0 0; font-size: .88rem; color: var(--mute); }
.pager-row { display: flex; justify-content: center; gap: 12px; padding: 10px 16px 0; }
.pager-row .btn { min-width: 96px; }
.pips { display: flex; justify-content: center; align-items: center; gap: 10px; padding-top: 18px; }
.pips button { position: relative; width: 14px; height: 14px; padding: 0; background: var(--panel); border: 2px solid var(--ink); cursor: pointer; transition: width .15s; }
.pips button::after { content: ''; position: absolute; inset: -9px -3px; }
.pips button.on { width: 30px; background: var(--blue); }
.shop-note { margin: 18px 4px 14px; font-size: .9rem; text-align: center; }
.orders { margin: 0; padding: 0; list-style: none; }
.order { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 10px 16px; padding: 12px 0; border-top: 1px solid var(--rule); }
.order:first-child { padding-top: 0; border-top: 0; }
.order-meta { margin-top: 2px; font-size: .85rem; color: var(--mute); }
.order-meta code { font-size: .8rem; }
.order-side { display: grid; justify-items: end; align-content: start; gap: 8px; margin-left: auto; }
.order-act { display: flex; flex-wrap: wrap; justify-content: flex-end; gap: 6px; }
.badge.green { color: #fff; background: var(--green); }
.sum { margin: 0 0 14px; }
.paylines { margin: 0 0 8px; padding: 0; list-style: none; }
.paylines li { display: flex; align-items: center; justify-content: space-between; gap: 10px; margin-bottom: 8px; padding: 8px 10px; background: #fff; border: 2px solid var(--ink); }
.paylines .payimg { display: block; padding: 8px; text-align: center; }
.paylines .payimg img { display: block; width: 100%; max-width: 280px; margin: 0 auto; }
.paylines span { min-width: 0; overflow-wrap: anywhere; }
.modal-box .btn-sm { width: auto; }
.modal-box .code-box { margin-bottom: 14px; }
.modal-box .hint { margin: 0 0 14px; }
.menu a .ext { display: grid; margin-left: auto; color: var(--mute); }
.menu a .ext svg { width: 16px; height: 16px; }

/* ---------- 404 ---------- */
.lost { max-width: 560px; margin: 8vh auto 0; padding: 32px 28px; }
.lost h1 { font-size: clamp(3.5rem, 14vw, 6rem); margin-bottom: .1em; }

/* ---------- toast ---------- */
.toast { position: fixed; left: 50%; bottom: calc(24px + env(safe-area-inset-bottom, 0px)); z-index: 200; padding: 10px 18px; font-weight: 500; color: #fff; background: var(--ink); border-radius: 16px; opacity: 0; transform: translate(-50%, 10px); pointer-events: none; transition: opacity .2s, transform .2s; }
.toast.show { opacity: 1; transform: translate(-50%, 0); }

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { animation: none !important; transition: none !important; }
}
