*, *::before, *::after { box-sizing: border-box; }
:root {
  color-scheme: light;
  --page: #f5f7f8; --card: #ffffff; --foreground: #14161b; --muted: #f3f4f6; --muted-foreground: #5d6573;
  --border: #e7e9ee; --border-soft: #f0f1f4;
  --brand: #d41c3f; --brand-press: #b3132f; --brand-fg: #ffffff; --brand-ink: #b8132f;
  --brand-soft: #fff1f3; --brand-border: #f6c9d2;
  --banner: #6e0c1f; --banner-2: #8d1329;
  --gold: #f2b01e; --gold-deep: #c98500; --gold-soft: #fff7e3;
  --green: #0a9d63; --green-ink: #087a4d; --green-soft: #e6f6ef;
  --amber: #e8870c; --amber-ink: #a95705; --amber-soft: #fdf1e1;
  --red-ink: #c01c3c; --red-soft: #fde9ed;
  --r-tag: 6px; --r-sm: 8px; --r-ctrl: 12px; --r-btn: 14px; --r-card: 16px; --r-pop: 20px; --r-pill: 999px;
  --shadow: 0 1px 2px rgba(17,24,39,.04), 0 6px 20px -10px rgba(17,24,39,.14);
  --shadow-pop: 0 18px 50px -16px rgba(17,24,39,.32);
  --focus-ring: 0 0 0 2px #fff, 0 0 0 4px var(--brand);
  --dur-1: 120ms; --dur-2: 160ms;
  --ease-out: cubic-bezier(.2,.8,.2,1); --ease-exit: cubic-bezier(.4,0,.6,1); --ease-pop: cubic-bezier(.2,1.1,.3,1);
  --font: Signika, "Segoe UI", sans-serif;
  --mono: "Cascadia Mono", Consolas, "Liberation Mono", monospace;
}
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: 1ms !important; animation-iteration-count: 1 !important; transition-duration: 1ms !important; }
}

html { scrollbar-gutter: stable; -webkit-text-size-adjust: 100%; }
body { margin: 0; background: var(--page); color: var(--foreground); font: 16px/1.55 var(--font); }
body.tool { font-size: 13px; line-height: 1.5; }
a { color: var(--brand-ink); text-underline-offset: 3px; }
b, strong, .tnum { font-variant-numeric: tabular-nums; }
h1, h2, h3 { text-wrap: balance; line-height: 1.25; }
p { text-wrap: pretty; }
.mono { font-family: var(--mono); font-size: .94em; }
.muted { color: var(--muted-foreground); }
.hidden { display: none !important; }
.spacer { flex: 1; }
svg.i { width: 18px; height: 18px; flex: none; fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }
:where(a, button, summary, input, select, textarea, [tabindex]):focus-visible { outline: 2px solid transparent; box-shadow: var(--focus-ring); }

.top { position: sticky; top: 0; z-index: 20; background: rgba(255,255,255,.97); border-bottom: 1px solid var(--border); }
.top-in { max-width: 1200px; margin: 0 auto; height: 68px; padding: 0 16px; display: flex; align-items: center; gap: 18px; }
.logo { display: flex; align-items: center; gap: 10px; color: var(--foreground); text-decoration: none; font-weight: 700; font-size: 18px; white-space: nowrap; line-height: 1.15; }
.logo img { width: 38px; height: 38px; }
.logo small { display: block; font-size: 12px; font-weight: 500; color: var(--muted-foreground); }
.links { flex: 1; display: flex; justify-content: center; gap: 6px; }
.links a { padding: 8px 16px; border-radius: var(--r-btn); color: #374151; text-decoration: none; font-weight: 600; transition: background-color var(--dur-1), color var(--dur-1); }
.links a:hover { background: var(--brand-soft); color: var(--brand-ink); }
.links a[aria-current="page"] { color: var(--brand-ink); background: var(--brand-soft); }
.userbox { display: flex; align-items: center; gap: 10px; min-height: 44px; }
.balance-chip { display: inline-flex; flex-direction: column; align-items: flex-end; padding: 4px 12px; border-radius: var(--r-btn); background: var(--gold-soft); border: 1px solid #f6e2b3; color: var(--foreground); text-decoration: none; line-height: 1.2; transition: border-color var(--dur-1); }
.balance-chip:hover { border-color: var(--gold); }
.balance-chip small { font-size: 11.5px; color: var(--muted-foreground); }
.balance-chip b { font-size: 15px; }
.menu { position: relative; }
.menu summary { list-style: none; display: inline-flex; align-items: center; gap: 8px; height: 44px; padding: 0 12px; border-radius: var(--r-btn); border: 1px solid var(--border); background: #fff; cursor: pointer; font-weight: 600; max-width: 180px; }
.menu summary::-webkit-details-marker { display: none; }
.menu summary span { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.menu[open] summary { border-color: var(--brand-border); }
.menu .drop { position: absolute; right: 0; top: calc(100% + 6px); min-width: 200px; background: #fff; border: 1px solid var(--border); border-radius: var(--r-ctrl); box-shadow: var(--shadow-pop); padding: 6px; display: flex; flex-direction: column; z-index: 200; animation: drop var(--dur-2) var(--ease-out); }
.menu .drop a, .menu .drop button { display: flex; align-items: center; gap: 10px; padding: 10px 12px; border: 0; background: none; border-radius: var(--r-sm); font: inherit; font-size: 15px; color: var(--foreground); text-decoration: none; cursor: pointer; text-align: left; }
.menu .drop a:hover, .menu .drop button:hover { background: var(--muted); }
@keyframes drop { from { opacity: 0; transform: translateY(4px); } }

.wrap { max-width: 1200px; margin: 0 auto; padding: 24px 16px 56px; display: flex; flex-direction: column; gap: 22px; }
.wrap.narrow { max-width: 820px; }
.wrap.auth { max-width: 460px; }

.btn { display: inline-flex; align-items: center; justify-content: center; gap: 8px; height: 46px; padding: 0 20px; border-radius: var(--r-btn); border: 1px solid transparent; font: inherit; font-size: 15px; font-weight: 700; cursor: pointer; white-space: nowrap; text-decoration: none; transition: background-color var(--dur-1), border-color var(--dur-1), color var(--dur-1), transform var(--dur-1); }
.btn:active { transform: scale(.97); }
.btn:disabled { opacity: .5; cursor: not-allowed; transform: none; }
.btn.primary { background: var(--brand); color: var(--brand-fg); }
.btn.primary:hover:not(:disabled) { background: var(--brand-press); }
.btn.outline { background: #fff; border-color: var(--brand-border); color: var(--brand-ink); }
.btn.outline:hover:not(:disabled) { background: var(--brand-soft); }
.btn.plain { background: #fff; border-color: var(--border); color: var(--foreground); }
.btn.plain:hover:not(:disabled) { background: var(--muted); }
.btn.danger { background: var(--brand); color: #fff; }
.btn.danger:hover:not(:disabled) { background: var(--brand-press); }
.btn.big { height: 54px; font-size: 17px; letter-spacing: .02em; }
.btn.sm { height: 38px; padding: 0 14px; font-size: 14px; }
.btn.block { width: 100%; }
body.tool .btn { height: 34px; padding: 0 13px; font-size: 12.5px; border-radius: var(--r-ctrl); }
body.tool .btn.sm { height: 30px; padding: 0 10px; }
.iconbtn { width: 40px; height: 40px; border-radius: var(--r-ctrl); border: 1px solid var(--border); background: #fff; color: var(--muted-foreground); display: inline-grid; place-items: center; cursor: pointer; transition: color var(--dur-1), border-color var(--dur-1); }
.iconbtn:hover { color: var(--brand-ink); border-color: var(--brand-border); }
.iconbtn.sm { width: 34px; height: 34px; border-radius: var(--r-sm); }
.iconbtn.sm svg.i { width: 16px; height: 16px; }
.spin { animation: spin 1s linear infinite; }
@keyframes spin { to { transform: rotate(360deg); } }

.panel { background: var(--card); border: 1px solid var(--border); border-radius: var(--r-card); box-shadow: var(--shadow); min-width: 0; }
.phead { display: flex; align-items: center; gap: 10px; padding: 16px 20px; border-bottom: 1px solid var(--border-soft); flex-wrap: wrap; }
.phead h2, .phead h3 { margin: 0; font-size: 19px; font-weight: 700; }
.phead .d { font-size: 14px; color: var(--muted-foreground); }
.pbody { padding: 20px; }
.sec-title { display: flex; align-items: center; gap: 10px; margin: 0; font-size: 22px; font-weight: 800; }
.sec-title::before { content: ""; width: 5px; height: 22px; border-radius: 3px; background: var(--brand); }
body.tool .phead { padding: 12px 16px; }
body.tool .phead h2, body.tool .phead h3 { font-size: 14px; }
body.tool .pbody { padding: 16px; }

.hero-grid { display: grid; grid-template-columns: minmax(0, 1fr) 340px; gap: 18px; }
.banner { position: relative; overflow: hidden; border-radius: var(--r-card); background: var(--banner); color: #fff; padding: 34px 36px; min-height: 280px; display: flex; flex-direction: column; justify-content: center; }
.banner .art { position: absolute; right: 24px; bottom: 14px; width: 250px; height: auto; }
.banner .tag { display: inline-flex; width: fit-content; padding: 4px 12px; border-radius: var(--r-pill); background: rgba(255,255,255,.14); font-size: 12px; font-weight: 800; letter-spacing: .1em; text-transform: uppercase; }
.banner h1 { position: relative; margin: 14px 0 0; font-size: 36px; font-weight: 800; letter-spacing: -.02em; max-width: 15em; }
.banner h1 em { font-style: normal; color: var(--gold); }
.banner ul { position: relative; margin: 16px 0 0; padding: 0; list-style: none; display: flex; flex-direction: column; gap: 6px; max-width: 30em; color: #ffe3e8; }
.banner li { display: flex; gap: 8px; align-items: baseline; }
.banner li::before { content: ""; flex: none; width: 7px; height: 7px; border-radius: 50%; background: var(--gold); transform: translateY(-2px); }
.walletbox { background: #fff; border: 1px solid var(--border); border-radius: var(--r-card); box-shadow: var(--shadow); overflow: hidden; display: flex; flex-direction: column; }
.walletbox .tabs { display: grid; grid-template-columns: 1fr 1fr; }
.walletbox .tabs span { padding: 14px 10px; text-align: center; font-weight: 800; font-size: 14px; letter-spacing: .02em; }
.walletbox .tabs span:last-child { background: var(--brand); color: #fff; }
.walletbox .in { padding: 20px; display: flex; flex-direction: column; gap: 14px; flex: 1; }
.walletbox .bal { font-size: 30px; font-weight: 800; letter-spacing: -.02em; font-variant-numeric: tabular-nums; }
.walletbox .hint { font-size: 14px; color: var(--muted-foreground); }

.notice-bar { display: flex; align-items: center; gap: 12px; padding: 14px 18px; background: #fff; border: 1px solid var(--brand-border); border-radius: var(--r-card); color: var(--brand-ink); font-weight: 600; }
.notice-bar svg.i { color: var(--brand); }
.notice-bar[hidden] { display: none; }
.notice-bar.ctv { margin-top: -10px; }
.notice-bar.ctv a { color: var(--brand); text-decoration: underline; white-space: nowrap; }

.grid-cards { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 16px; padding: 18px; background: #fff; border: 1px solid var(--brand-border); border-radius: var(--r-card); }
.pcard { display: flex; flex-direction: column; border: 1px solid var(--border); border-radius: var(--r-card); background: #fff; overflow: hidden; transition: border-color var(--dur-1), box-shadow var(--dur-1); }
.pcard:hover { border-color: var(--brand-border); box-shadow: var(--shadow); }
.pcard .pic { position: relative; aspect-ratio: 16 / 10; background: var(--gold-soft); display: grid; place-items: center; border-bottom: 1px solid #f6e8c4; }
.pcard .pic svg { width: 62%; height: auto; }
.pcard .pic .badge { position: absolute; top: 10px; left: 10px; }
.pcard .body { padding: 14px; display: flex; flex-direction: column; gap: 6px; flex: 1; }
.pcard h3 { margin: 0; font-size: 18px; font-weight: 800; font-variant-numeric: tabular-nums; }
.pcard .meta { font-size: 13.5px; color: var(--muted-foreground); }
.pcard .row { margin-top: auto; padding-top: 8px; display: flex; align-items: center; justify-content: space-between; gap: 10px; }
.pcard .price { color: var(--brand-ink); font-weight: 800; font-size: 19px; font-variant-numeric: tabular-nums; }
.pcard .btn { height: 40px; padding: 0 16px; border-radius: var(--r-pill); }
.pcard.custom .pic { background: var(--brand-soft); border-bottom-color: var(--brand-border); }

.steps-strip { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 14px; }
.steps-strip { margin: 0; padding: 0; }
.steps-strip li { list-style: none; background: #fff; border: 1px solid var(--border); border-radius: var(--r-card); padding: 16px; display: flex; flex-direction: column; gap: 6px; }
.steps-strip li > b:first-child { display: inline-grid; place-items: center; width: 30px; height: 30px; border-radius: 50%; background: var(--brand-soft); color: var(--brand-ink); font-weight: 800; }
.steps-strip span { font-size: 15px; }

.field { display: flex; flex-direction: column; gap: 7px; }
.field label { font-size: 14px; font-weight: 700; }
.field .hint { font-size: 13px; color: var(--muted-foreground); line-height: 1.5; }
.field .err { font-size: 13px; color: var(--red-ink); }
.input { width: 100%; height: 48px; border-radius: var(--r-ctrl); border: 1.4px solid var(--border); background: #fff; padding: 0 14px; font: inherit; font-size: 16px; font-weight: 600; color: var(--foreground); outline: 2px solid transparent; transition: border-color var(--dur-1), box-shadow var(--dur-1); }
.input::placeholder { color: #9aa1ac; font-weight: 400; }
.input:focus { border-color: var(--brand); box-shadow: 0 0 0 3px var(--brand-soft); }
.input[aria-invalid="true"] { border-color: var(--brand); }
textarea.input { height: auto; min-height: 80px; padding: 10px 14px; resize: vertical; font-weight: 500; }
body.tool .input { height: 36px; font-size: 13px; }
body.tool .field label { font-size: 12px; }
body.tool .field .hint { font-size: 11.5px; }
.form { display: flex; flex-direction: column; gap: 16px; }
.row { display: flex; gap: 12px; flex-wrap: wrap; align-items: center; }
.stepper { display: flex; align-items: center; gap: 8px; }
.stepper .input { width: 100px; text-align: center; }
.stepper .iconbtn { width: 48px; height: 48px; font-size: 22px; font-weight: 700; color: var(--foreground); }

.pill { display: inline-flex; align-items: center; gap: 6px; height: 38px; padding: 0 14px; border-radius: var(--r-pill); border: 1px solid var(--border); background: #fff; color: var(--foreground); font: inherit; font-size: 14px; font-weight: 700; cursor: pointer; transition: background-color var(--dur-1), border-color var(--dur-1), color var(--dur-1); }
.pill:hover { border-color: var(--brand-border); }
.pill[aria-pressed="true"] { background: var(--brand-soft); border-color: var(--brand); color: var(--brand-ink); }
.pill .n { font-size: 12px; color: var(--muted-foreground); font-variant-numeric: tabular-nums; }
body.tool .pill { height: 28px; font-size: 12px; padding: 0 10px; }

.badge { display: inline-flex; align-items: center; height: 26px; padding: 0 11px; border-radius: var(--r-pill); font-size: 13px; font-weight: 700; white-space: nowrap; background: var(--muted); color: var(--muted-foreground); }
.badge.amber { background: var(--amber-soft); color: var(--amber-ink); }
.badge.green { background: var(--green-soft); color: var(--green-ink); }
.badge.blue { background: #e8f0fe; color: #1a4fb8; }
.badge.red { background: var(--red-soft); color: var(--red-ink); }
.badge.gold { background: var(--gold); color: #3b2600; }
body.tool .badge { height: 21px; font-size: 11.5px; padding: 0 8px; }

.notice { border-radius: var(--r-ctrl); padding: 12px 14px; font-size: 15px; background: var(--muted); }
.notice.amber { background: var(--amber-soft); }
.notice.red { background: var(--red-soft); }
.notice.green { background: var(--green-soft); }
.notice.gold { background: var(--gold-soft); border: 1px solid #f6e2b3; color: #6b4600; }
.notice.gold b { color: #8f5b00; }
.checks { display: flex; flex-direction: column; }
.dialog .check { min-height: 44px; font-weight: 600; }
.dialog .check input { width: 20px; height: 20px; }
body.tool .notice { font-size: 12.5px; padding: 10px 12px; }

.kv { display: grid; grid-template-columns: minmax(0, auto) minmax(0, 1fr); gap: 10px 18px; margin: 0; }
.kv dt { color: var(--muted-foreground); font-size: 15px; }
.kv dd { margin: 0; font-weight: 700; text-align: right; overflow-wrap: anywhere; font-variant-numeric: tabular-nums; }
body.tool .kv dt { font-size: 12.5px; }
.total { display: flex; justify-content: space-between; align-items: baseline; gap: 12px; padding-top: 14px; border-top: 1px dashed var(--border); }
.total .v { font-size: 26px; font-weight: 800; color: var(--brand-ink); font-variant-numeric: tabular-nums; }

.copyrow { display: flex; align-items: center; gap: 10px; padding: 10px 0; border-bottom: 1px solid var(--border-soft); }
.copyrow:last-child { border-bottom: 0; }
.copyrow .l { color: var(--muted-foreground); font-size: 14px; min-width: 110px; }
.copyrow .v { flex: 1; min-width: 0; font-weight: 700; overflow-wrap: anywhere; font-variant-numeric: tabular-nums; }
.copyrow.key { background: var(--brand-soft); border: 1px solid var(--brand-border); border-radius: var(--r-ctrl); padding: 10px 12px; margin: 6px 0; }
.copyrow.key .v { font-family: var(--mono); font-size: 21px; color: var(--brand-ink); letter-spacing: .04em; }
.qr { display: block; width: 100%; max-width: 280px; aspect-ratio: 540 / 640; height: auto; margin: 0 auto; border-radius: var(--r-ctrl); background: #fff; border: 1px solid var(--border); object-fit: contain; }
.grid2 { display: grid; grid-template-columns: minmax(0, 1fr) minmax(300px, 380px); gap: 20px; align-items: start; }
.grid2.pay { grid-template-columns: minmax(200px, 280px) minmax(0, 1fr); align-items: center; }
.bigprice { font-family: var(--mono); font-size: 32px; font-weight: 700; font-variant-numeric: tabular-nums; overflow-wrap: anywhere; }
.bigprice .pin { color: var(--brand-ink); background: var(--brand-soft); border-radius: var(--r-tag); padding: 0 4px; }

.stages { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 8px; margin: 0; padding: 0; list-style: none; }
.stages li { display: flex; flex-direction: column; gap: 6px; font-size: 14px; color: var(--muted-foreground); font-weight: 600; }
.stages li::before { content: ""; height: 5px; border-radius: 5px; background: var(--border); }
.stages li.done::before { background: var(--green); }
.stages li.now::before { background: var(--brand); }
.stages li.now { color: var(--brand-ink); }
.stages li.done { color: var(--green-ink); }

.list { display: flex; flex-direction: column; }
.order-row { display: grid; grid-template-columns: minmax(0, 1.2fr) minmax(0, 1fr) minmax(0, .8fr) auto; gap: 14px; align-items: center; padding: 14px 20px; border-bottom: 1px solid var(--border-soft); color: inherit; text-decoration: none; transition: background-color var(--dur-1); }
.order-row:last-child { border-bottom: 0; }
a.order-row:hover { background: var(--muted); }
.order-row .id { font-family: var(--mono); font-weight: 700; }
.order-row .t { font-size: 13px; color: var(--muted-foreground); }
.order-row .num { text-align: right; font-weight: 800; font-variant-numeric: tabular-nums; }
.num.plus { color: var(--green-ink); }
.num.minus { color: var(--red-ink); }

.empty { padding: 40px 20px; text-align: center; color: var(--muted-foreground); }
.empty b { display: block; color: var(--foreground); font-size: 17px; margin-bottom: 4px; }
.skel { height: 18px; border-radius: var(--r-tag); background: var(--muted); animation: skel 1.3s ease-in-out infinite; }
.skel.w45 { width: 45%; } .skel.w60 { width: 60%; } .skel.w80 { width: 80%; } .skel.mt { margin-top: 14px; }
.skel-card { aspect-ratio: 3 / 4; border-radius: var(--r-card); }
@keyframes skel { 50% { opacity: .55; } }

.table-wrap { overflow-x: auto; }
table.t { width: 100%; border-collapse: collapse; font-size: 12.5px; }
table.t th { text-align: left; font-weight: 700; color: var(--muted-foreground); font-size: 11.5px; padding: 9px 12px; border-bottom: 1px solid var(--border); white-space: nowrap; background: #fff; position: sticky; top: 0; }
table.t td { padding: 10px 12px; border-bottom: 1px solid var(--border-soft); vertical-align: top; }
table.t td.r, table.t th.r { text-align: right; font-variant-numeric: tabular-nums; }
table.t tr.click { cursor: pointer; transition: background-color var(--dur-1); }
table.t tr.click:hover, table.t tr.click:focus-visible { background: var(--muted); }
table.t .wrap-text { min-width: 200px; max-width: 360px; overflow-wrap: anywhere; white-space: pre-wrap; }

.prose h2 { font-size: 22px; margin: 0 0 8px; }
.prose h3 { font-size: 18px; margin: 18px 0 6px; }
.prose ol, .prose ul { padding-left: 22px; margin: 8px 0; }
.prose li { margin: 4px 0; }
.prose p { margin: 8px 0; max-width: 70ch; }

.foot { margin-top: 24px; background: #fff; border-top: 1px solid var(--border); }
.foot-in { max-width: 1200px; margin: 0 auto; padding: 36px 16px 26px; display: grid; grid-template-columns: 1.4fr 1fr 1fr 1.2fr; gap: 28px; }
.foot h4 { margin: 0 0 12px; font-size: 16px; }
.foot a { display: block; color: var(--muted-foreground); text-decoration: none; padding: 3px 0; }
.foot a:hover { color: var(--brand-ink); }
.foot .about p { color: var(--muted-foreground); margin: 10px 0 0; font-size: 15px; }
.foot .support { background: var(--brand-soft); border: 1px solid var(--brand-border); border-radius: var(--r-card); padding: 14px 16px; font-size: 15px; color: #4b5563; }
.foot-bar { max-width: 1200px; margin: 0 auto; padding: 14px 16px 18px; border-top: 1px solid var(--border-soft); font-size: 14px; color: var(--muted-foreground); }

.toasts { position: fixed; bottom: 16px; right: 16px; z-index: 9999; display: flex; flex-direction: column; gap: 10px; width: min(380px, calc(100vw - 32px)); }
.toast { display: flex; gap: 10px; align-items: flex-start; padding: 12px 14px; border-radius: var(--r-pop); background: #fff; border: 1px solid var(--border); box-shadow: var(--shadow-pop); animation: toastIn .36s cubic-bezier(.18,1.12,.32,1); }
.toast.ok { background: #effaf4; border-color: #c9ecd9; }
.toast.err { background: #fff1f3; border-color: var(--brand-border); }
.toast .tt { font-weight: 700; font-size: 14px; }
.toast .tm { font-size: 14px; color: var(--muted-foreground); }
.toast .x { margin-left: auto; border: 0; background: none; color: var(--muted-foreground); cursor: pointer; padding: 2px; border-radius: var(--r-sm); }
.toast.out { animation: toastOut .3s var(--ease-exit) forwards; }
@keyframes toastIn { from { opacity: 0; transform: translateY(-8px) scale(.98); } }
@keyframes toastOut { to { opacity: 0; transform: translateY(-6px); } }

.overlay { position: fixed; inset: 0; z-index: 60; background: rgba(15,17,22,.5); display: grid; place-items: center; padding: 16px; animation: fade .18s ease-out; }
.dialog { width: min(480px, 100%); max-height: calc(100dvh - 32px); overflow: auto; background: #fff; border-radius: var(--r-pop); box-shadow: var(--shadow-pop); padding: 22px; animation: pop .26s var(--ease-pop); }
.dialog.wide { width: min(860px, 100%); }
.dialog h3 { margin: 0 0 8px; font-size: 19px; }
.dialog .acts { display: flex; justify-content: flex-end; gap: 10px; margin-top: 18px; flex-wrap: wrap; }
.dialog .kv { margin: 14px 0; }
.dialog > h3:not(:first-child) { margin-top: 20px; font-size: 15px; }
.overlay.closing { opacity: 0; transition: opacity .2s var(--ease-exit); }
.overlay.closing .dialog { pointer-events: none; }
@keyframes fade { from { opacity: 0; } }
@keyframes pop { from { opacity: 0; transform: scale(.94); } }

.mnav { position: fixed; left: 12px; right: 12px; bottom: calc(10px + env(safe-area-inset-bottom)); z-index: 20; display: none; justify-content: space-around; padding: 6px; background: #fff; border: 1px solid var(--border); border-radius: var(--r-pop); box-shadow: var(--shadow-pop); }
.mnav a { display: flex; flex-direction: column; align-items: center; gap: 3px; min-width: 64px; min-height: 48px; justify-content: center; border-radius: 16px; font-size: 12px; font-weight: 700; color: #4b5563; text-decoration: none; }
.mnav a svg.i { width: 21px; height: 21px; }
.mnav a[aria-current="page"] { color: var(--brand-ink); background: var(--brand-soft); }

.stats { margin-top: 16px; gap: 11px; }
.hs { flex: 1 1 150px; min-width: 0; background: var(--muted); border: 1px solid var(--border-soft); border-radius: var(--r-ctrl); padding: 10px 13px; }
.hs .l { font-size: 11.5px; font-weight: 700; color: var(--muted-foreground); }
.hs .v { margin-top: 4px; font-size: 22px; font-weight: 800; font-variant-numeric: tabular-nums; }
.hs .v.warn { color: var(--amber-ink); }
.hs.click { cursor: pointer; transition: border-color var(--dur-1); }
.hs.click:hover { border-color: var(--brand-border); }
.hs.click .l { display: flex; justify-content: space-between; gap: 6px; }
.hs .see { flex: none; color: var(--brand-ink); font-weight: 700; }
.check { display: flex; align-items: center; gap: 8px; font-weight: 600; cursor: pointer; }
.check input { flex: none; width: 16px; height: 16px; accent-color: var(--brand); }
.settings { display: grid; grid-template-columns: repeat(auto-fill, minmax(240px, 1fr)); gap: 16px; align-items: start; }
.settings .presets { gap: 6px; }
.settings .acts, .settings .check, .settings .wide { grid-column: 1 / -1; }
.acts { display: flex; gap: 10px; flex-wrap: wrap; }
.search { width: min(320px, 100%); }
.notice.note { white-space: pre-wrap; overflow-wrap: anywhere; font-family: var(--mono); font-size: 12px; }
.admin-hero { background: #fff; border: 1px solid var(--border); border-radius: var(--r-card); padding: 18px 20px; box-shadow: var(--shadow); }
.admin-hero h1 { margin: 0; font-size: 24px; }
.admin-hero .sub { margin: 4px 0 0; color: var(--muted-foreground); font-size: 12.5px; }
.admin-hero .health { gap: 8px; margin-top: 10px; }
.admin-hero .health .badge { white-space: normal; height: auto; min-height: 26px; overflow-wrap: anywhere; }
.badge.ml { margin-left: 6px; }
.admin-hero .sales { margin-top: 14px; border: 1px solid var(--border-soft); border-radius: var(--r-ctrl); }
.dates { gap: 6px; flex-wrap: nowrap; }
body.tool .dates .input { width: 140px; font-weight: 500; }
@media (max-width: 768px) {
  .toasts { bottom: calc(92px + env(safe-area-inset-bottom)); }
  body.tool .input { font-size: 16px; height: 42px; }
  body.tool .dialog .pill { height: 38px; font-size: 13px; }
  body.tool .dialog .btn { height: 42px; }
}
@media (max-width: 768px) { .admin-tabs { scroll-margin-top: 72px; } .admin-hero { padding: 16px; } .admin-hero .hs { flex-basis: 120px; } table.t td:not(.wrap-text) { white-space: nowrap; } .dates { width: 100%; } body.tool .dates .input { flex: 1; width: auto; min-width: 0; } }
.stock-strip small { font-size: 13px; color: var(--muted-foreground); }

@media (max-width: 1080px) {
  .grid-cards { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .hero-grid { grid-template-columns: minmax(0, 1fr); }
  .foot-in { grid-template-columns: 1fr 1fr; }
}
@media (max-width: 900px) { .grid2, .grid2.pay { grid-template-columns: minmax(0, 1fr); } }
@media (max-width: 768px) {
  .links, .top .hide-sm { display: none; }
  .mnav { display: flex; }
  body { padding-bottom: 92px; }
  .top-in { height: 62px; gap: 10px; }
  .logo small { display: none; }
  .logo { font-size: 16px; }
  .banner { padding: 24px 20px 120px; min-height: 0; }
  .banner h1 { font-size: 27px; }
  .banner .art { width: 170px; right: 10px; bottom: 6px; }
  .grid-cards { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; padding: 10px; }
  .pcard .body { padding: 10px; }
  .pcard h3 { font-size: 15.5px; }
  .pcard .price { font-size: 16px; }
  .pcard .row { flex-direction: column; align-items: stretch; }
  .steps-strip { grid-template-columns: 1fr 1fr; }
  .foot-in { grid-template-columns: 1fr; gap: 18px; }
  .order-row { grid-template-columns: minmax(0, 1fr) auto; padding: 14px 16px; }
  .order-row .hide-sm { display: none; }
  .pbody { padding: 16px; }
  .bigprice { font-size: 27px; }
  .userbox .who { display: none; }
}

.stock-strip { display: grid; grid-template-columns: 1.4fr 1fr 1fr; gap: 0; background: #fff; border: 1px solid var(--border); border-radius: var(--r-card); overflow: hidden; }
.stock-strip div { padding: 14px 18px; display: flex; flex-direction: column; gap: 2px; border-left: 1px solid var(--border-soft); }
.stock-strip div:first-child { border-left: 0; background: var(--gold-soft); }
.stock-strip span { font-size: 13.5px; color: var(--muted-foreground); font-weight: 600; }
.stock-strip b { font-size: 20px; font-weight: 800; }
.stock-strip div:first-child b { font-size: 26px; color: #8f5b00; }
@media (max-width: 768px) { .stock-strip { grid-template-columns: 1fr 1fr; } .stock-strip div:first-child { grid-column: 1 / -1; } .stock-strip div:nth-child(2) { border-left: 0; } .stock-strip div:first-child b { font-size: 22px; } }
.banner .game-line { position: relative; display: flex; align-items: center; gap: 14px; flex-wrap: wrap; }
.banner .game-line img { width: 120px; height: auto; }
.pcard .gicon { position: absolute; top: 8px; right: 8px; width: 40px; height: 40px; border-radius: 10px; border: 2px solid #fff; box-shadow: var(--shadow); }
.pcard .game { display: flex; align-items: center; gap: 6px; font-size: 13px; font-weight: 600; color: #4b5563; }
.pcard .game img { border-radius: 5px; }
.foot-bar { line-height: 1.7; }
@media (max-width: 768px) { .banner .game-line img { width: 92px; } .pcard .gicon { width: 32px; height: 32px; } }
@media (max-width: 768px) {
  .copyrow .l { min-width: 88px; font-size: 13px; }
  .copyrow.key .v { font-size: 17px; letter-spacing: .02em; }
}
.itemlist { display: flex; flex-direction: column; gap: 6px; max-height: min(46vh, 380px); overflow-y: auto; margin: 8px 0 12px; padding: 2px; }
.item-opt { display: flex; align-items: center; gap: 12px; width: 100%; min-height: 52px; padding: 6px 10px; border: 1px solid var(--border); border-radius: var(--r-ctrl); background: #fff; font: inherit; text-align: left; cursor: pointer; transition: border-color var(--dur-1), background-color var(--dur-1); }
.item-opt:hover { border-color: var(--brand-border); }
.item-opt[aria-selected="true"] { border-color: var(--brand); background: var(--brand-soft); }
.item-opt img, .item-opt .noicon { width: 40px; height: 40px; flex: none; border-radius: 8px; background: var(--muted); }
.item-opt .nm { flex: 1; min-width: 0; font-weight: 700; overflow-wrap: anywhere; }
.item-opt .id { font-size: 13px; color: var(--muted-foreground); font-variant-numeric: tabular-nums; }
.dialog .input[type=search] { margin-top: 6px; }
@media (max-width: 768px) { .kv { grid-template-columns: minmax(0, 1.15fr) minmax(0, 1fr); } }

.guide-all{display:inline-block;margin:14px 18px 0;font-weight:600}
main>section[hidden]{display:none!important}
.row.nowrap { flex-wrap: nowrap; }
.row.nowrap .input { flex: 1; min-width: 0; }
.who-card { display: flex; align-items: center; justify-content: space-between; gap: 10px; flex-wrap: wrap; padding: 10px 12px; border: 1px solid var(--brand-border); background: var(--brand-soft); border-radius: var(--r-ctrl); }
.linkbtn { border: 0; background: none; padding: 0; font: inherit; color: var(--brand-ink); text-decoration: underline; text-underline-offset: 3px; cursor: pointer; }
.recent-list { list-style: none; margin: 0; padding: 6px 20px; display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); column-gap: 28px; }
.recent-list li { display: flex; align-items: center; gap: 12px; padding: 11px 0; border-top: 1px solid var(--border-soft); min-width: 0; }
.recent-list li:nth-child(-n+2) { border-top: 0; }
.recent-list img { flex: none; }
.recent-list .tx { flex: 1; min-width: 0; overflow-wrap: anywhere; font-size: 15px; }
.recent-list .t { font-size: 13px; color: var(--muted-foreground); }
.recent-list .amt { font-weight: 800; color: var(--brand-ink); font-variant-numeric: tabular-nums; white-space: nowrap; }
@media (max-width: 768px) { .recent-list { grid-template-columns: minmax(0, 1fr); padding: 4px 16px; } .recent-list li:nth-child(n+6) { display: none; } .recent-list li:nth-child(2) { border-top: 1px solid var(--border-soft); } }
.preorder { display: flex; align-items: center; gap: 16px; padding: 16px 20px; background: var(--gold-soft); border: 1px solid #f6e2b3; border-radius: var(--r-card); }
.preorder > div { flex: 1; min-width: 0; }
.preorder h2 { margin: 0; font-size: 19px; font-weight: 800; color: #8f5b00; }
.preorder p { margin: 4px 0 0; color: #4b3a12; }
@media (max-width: 768px) { .preorder { flex-direction: column; align-items: stretch; padding: 14px 16px; } }
.menu .drop-head { padding: 8px 12px 10px; margin-bottom: 4px; border-bottom: 1px solid var(--border-soft); font-weight: 700; font-size: 15px; overflow-wrap: anywhere; }

.wrap.acct { display: grid; grid-template-columns: 280px minmax(0, 1fr); align-items: start; }
.acct-side { position: sticky; top: 88px; padding: 18px; display: flex; flex-direction: column; gap: 14px; }
.acct-who { display: flex; align-items: center; gap: 12px; min-width: 0; }
.acct-who .nm { min-width: 0; }
.acct-who h1 { margin: 0; font-size: 20px; overflow-wrap: anywhere; }
.acct-who .muted { font-size: 13.5px; }
.avatar { flex: none; width: 48px; height: 48px; border-radius: 50%; display: grid; place-items: center; background: var(--brand); color: #fff; font-weight: 800; font-size: 21px; }
.acct-nav { display: flex; flex-direction: column; gap: 2px; padding-top: 12px; border-top: 1px solid var(--border-soft); }
.acct-nav a, .acct-nav button { display: flex; align-items: center; gap: 10px; min-height: 44px; padding: 0 12px; border: 0; border-radius: var(--r-ctrl); background: none; font: inherit; font-size: 15px; font-weight: 600; color: #374151; text-decoration: none; cursor: pointer; text-align: left; transition: background-color var(--dur-1), color var(--dur-1); }
.acct-nav a:hover, .acct-nav button:hover { background: var(--muted); }
.acct-nav a[aria-current="page"] { background: var(--brand-soft); color: var(--brand-ink); }
.acct-nav a:nth-child(3) { margin-top: 8px; }
.acct-nav button { color: var(--red-ink); }
.acct-main { display: flex; flex-direction: column; gap: 18px; min-width: 0; }
.acct-sec { display: flex; flex-direction: column; gap: 18px; scroll-margin-top: 80px; }
.acct-sec[hidden] { display: none; }
.acct .stats { margin-top: 0; }
.hs .s { margin-top: 2px; font-size: 13px; color: var(--muted-foreground); }
.dd-row { display: inline-flex; align-items: center; justify-content: flex-end; gap: 10px; flex-wrap: wrap; }
.dd-row .code { color: var(--brand-ink); letter-spacing: .04em; }
.stage-grid { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 10px; }
.stage-tile { display: flex; flex-direction: column; gap: 2px; padding: 12px 14px; border-radius: var(--r-ctrl); border: 1px solid var(--border); background: var(--muted); color: var(--muted-foreground); text-decoration: none; font-size: 14px; font-weight: 700; transition: border-color var(--dur-1); }
.stage-tile:hover { border-color: var(--brand-border); }
.stage-tile b { font-size: 24px; color: var(--foreground); }
.stage-tile.blue { background: #eef3fe; color: #1a4fb8; }
.stage-tile.amber { background: var(--amber-soft); color: var(--amber-ink); }
.stage-tile.green { background: var(--green-soft); color: var(--green-ink); }
.ses-row { display: flex; align-items: center; gap: 12px; padding: 14px 20px; border-bottom: 1px solid var(--border-soft); }
.ses-row:last-child { border-bottom: 0; }
.ses-row .nm { flex: 1; min-width: 0; }
.ses-row .dev { font-weight: 700; overflow-wrap: anywhere; }
.ses-row .t { font-size: 13px; color: var(--muted-foreground); }
.dev-ic { flex: none; width: 38px; height: 38px; border-radius: var(--r-ctrl); display: grid; place-items: center; background: var(--muted); color: var(--muted-foreground); }
.pw-form { max-width: 440px; }
@media (max-width: 900px) {
  .wrap.acct { grid-template-columns: minmax(0, 1fr); }
  .acct-side { position: static; }
  .acct-nav { display: grid; grid-template-columns: 1fr 1fr; gap: 6px; }
  .acct-nav a, .acct-nav button { min-height: 42px; padding: 0 10px; font-size: 14px; background: var(--muted); }
  .acct-nav a:nth-child(3) { margin-top: 0; }
  .stage-grid { grid-template-columns: 1fr 1fr; }
}
@media (max-width: 768px) { .ses-row { padding: 12px 16px; flex-wrap: wrap; } .ses-row .btn { margin-left: auto; } }
@media (max-width: 400px) {
  .top-in { gap: 8px; padding: 0 12px; }
  .logo { font-size: 14.5px; gap: 8px; }
  .logo img { width: 32px; height: 32px; }
  .userbox { gap: 6px; }
  .userbox .btn.sm { padding: 0 10px; }
}
