:root {
  color-scheme: dark;
  --panel: #1c3263;
  --tile: #263f76;
  --rim: #8ea7cf;
  --text: #f4f6fb;
  --muted: #bdcce7;
  --gold: #ffd35c;
  --ok: #9bf5a7;
  --bad: #ffc4bb;
  font: 15px/1.5 "Segoe UI", Roboto, Arial, sans-serif;
  color: var(--text);
  background: linear-gradient(#3d8fd6, #164a86) fixed #164a86;
}
* { box-sizing: border-box; }
body { margin: 0; }
[hidden] { display: none !important; }
.top, nav, .actions, .row { display: flex; gap: .65rem; flex-wrap: wrap; align-items: center; }
.top { justify-content: space-between; padding: .75rem 1.3rem; background: #142a54db; border-bottom: 2px solid #8ea7cf70; }
.brand { font-size: 1.25rem; font-weight: 800; text-decoration: none; color: var(--text); }
.brand span, h1, h2, h3 { color: var(--gold); }
nav a, nav button { color: inherit; background: none; border: 0; border-radius: 6px; font: inherit; font-weight: 600; text-decoration: none; padding: .35rem .65rem; cursor: pointer; }
nav a:hover, nav button:hover, nav a[aria-current] { color: var(--gold); background: #ffffff20; }
main { max-width: 1120px; margin: auto; padding: 1.45rem 1rem 3rem; }
.panel { background: var(--panel); border: 2px solid var(--rim); border-radius: 12px; padding: 1.2rem 1.3rem; margin-bottom: 1.1rem; box-shadow: 0 6px 18px #07163255; }
h1, h2, h3 { font-size: 1.2rem; margin: 0 0 .85rem; }
h3 { font-size: 1rem; margin-bottom: .3rem; }
p { margin: .55rem 0; }
label { display: block; font-weight: 600; min-width: 0; }
label input, label select { display: block; width: 100%; margin-top: .3rem; padding: .55rem .65rem; color: var(--text); background: #0f1f43; border: 1px solid var(--rim); border-radius: 7px; font: inherit; }
:focus-visible { outline: 2px solid var(--gold); outline-offset: 3px; }
.login { max-width: 420px; margin: 2.6rem auto; }
.login label { margin-bottom: .85rem; }
.btn { display: inline-block; padding: .58rem 1.2rem; font: inherit; font-weight: 750; color: #2d1600; text-align: center; text-decoration: none; background: linear-gradient(#ffd068, #f39631); border: 2px solid #ffe7a0; border-radius: 9px; box-shadow: 0 3px #a05510; cursor: pointer; }
.btn:hover { filter: brightness(1.08); }
.btn.small { padding: .35rem .75rem; font-size: .9rem; }
.btn.full { display: block; width: 100%; }
.btn.secondary { background: var(--tile); color: var(--text); border-color: var(--rim); box-shadow: none; }
.btn:disabled { filter: grayscale(.85); opacity: .7; cursor: default; }
.center { text-align: center; }
.muted { color: var(--muted); }
.good, .message.ok { color: var(--ok); }
.message { background: #17294f; color: var(--bad); border: 1px solid var(--rim); border-radius: 8px; padding: .6rem .9rem; margin: 0 0 1rem; }
.badge { display: inline-block; border-radius: 12px; padding: .12rem .65rem; font-size: .84rem; font-weight: 850; letter-spacing: .03em; background: #395082; color: var(--text); }
.badge.supporter { color: #271a00; background: var(--gold); }
.badge.donator { color: #13072b; background: #d6a9ff; }
.donation { padding: .75rem 1rem; margin-top: .7rem; background: #ffd35c17; border: 1px solid #ffd35c85; border-radius: 9px; }
.table-wrap { overflow-x: auto; margin: .55rem 0; }
.tiers { width: 100%; border-collapse: collapse; font-size: .92rem; }
.tiers th, .tiers td { padding: .4rem .6rem; text-align: left; border-bottom: 1px solid #8ea7cf55; white-space: nowrap; }
.tiers thead th { color: var(--muted); font-weight: 650; }
.tiers td:nth-child(n+3), .tiers thead th:nth-child(n+3) { text-align: right; }
.tiers tr.current { background: #ffd35c26; }
.tiers tr.current td { font-weight: 750; }
code { font: 800 1.1rem/1.5 ui-monospace, monospace; letter-spacing: .1em; padding: .2rem .55rem; color: var(--gold); background: #0f1f43; border: 1px dashed var(--gold); border-radius: 7px; }
.kv { display: grid; grid-template-columns: max-content minmax(0, 1fr); gap: .25rem 1rem; margin: .55rem 0; }
.kv dt { color: var(--muted); }
.kv dd { margin: 0; font-weight: 650; overflow-wrap: anywhere; }
.characters { display: grid; grid-template-columns: repeat(auto-fill, minmax(min(280px, 100%), 1fr)); gap: .85rem; }
.character { background: var(--tile); border: 1px solid var(--rim); border-radius: 9px; padding: .8rem; min-width: 0; }
.character h3 { overflow-wrap: anywhere; }
.character .btn { margin-top: .45rem; }
.pages { justify-content: center; margin-top: 1.2rem; }
.small { font-size: .85rem; }
.sr { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.msg { margin: .45rem 0 0; min-height: 1.4em; font-weight: 650; }
.msg.ok { color: var(--ok); }
.msg.bad { color: var(--bad); }

/* Send Items: catalog beside the selected item, like the Ninja Rebirth Account Center. */
.cols { display: grid; grid-template-columns: minmax(0, 1fr) 340px; gap: 1.1rem; align-items: start; }
.toolbar { display: flex; gap: .65rem; flex-wrap: wrap; margin-bottom: .8rem; }
.toolbar select, .toolbar input, .qty input { padding: .55rem .65rem; color: var(--text); background: #0f1f43; border: 1px solid var(--rim); border-radius: 7px; font: inherit; }
.toolbar select { min-width: 200px; }
.toolbar input { flex: 1; min-width: 180px; }
.tabs { display: flex; gap: .4rem; flex-wrap: wrap; margin-bottom: .8rem; }
.tabs button { padding: .3rem .8rem; color: var(--text); background: #12254d; border: 1px solid var(--rim); border-radius: 999px; font: inherit; font-size: .88rem; font-weight: 650; cursor: pointer; }
.tabs button:hover { border-color: var(--gold); }
.tabs button.on { color: #2d1600; background: var(--gold); border-color: var(--gold); }
.bulkbar { display: flex; gap: .65rem; flex-wrap: wrap; align-items: center; }
.bulkbar .muted { font-size: .85rem; }
.grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(104px, 1fr)); gap: .6rem; }
.tile { position: relative; display: flex; flex-direction: column; align-items: center; gap: .3rem; min-width: 0; padding: .55rem .35rem .5rem; color: var(--text); background: var(--tile); border: 1px solid var(--rim); border-radius: 9px; font: inherit; cursor: pointer; }
.tile:hover { border-color: var(--gold); }
.tile.sel { border-color: var(--gold); box-shadow: 0 0 0 2px var(--gold) inset; }
.tile.done { opacity: .5; }
.tile .name { font-size: .8rem; line-height: 1.25; text-align: center; overflow: hidden; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow-wrap: anywhere; }
.tile .count { position: absolute; top: 4px; right: 4px; padding: 0 .35rem; color: #082b10; background: var(--ok); border-radius: 8px; font-size: .7rem; font-weight: 850; }
/* The game's bag slot: a 78x78 picture under its 84x84 quality frame. */
.slot { --s: .8; position: relative; display: inline-block; flex: none; width: calc(84px * var(--s)); height: calc(84px * var(--s)); }
.slot.big { --s: 1; }
.slot img { position: absolute; left: calc(3px * var(--s)); top: calc(3px * var(--s)); width: calc(78px * var(--s)); height: calc(78px * var(--s)); }
.slot::after { content: ""; position: absolute; inset: 0; background: url(/account/icons/itemcolor.png) no-repeat;
  background-size: calc(700px * var(--s)) calc(84px * var(--s)); background-position: calc(var(--frame) * var(--s)) 0; }
.detail { position: sticky; top: 1rem; }
.detail .head { display: flex; gap: .85rem; align-items: center; margin-bottom: .6rem; }
.detail .head h3 { margin: 0 0 .2rem; font-size: 1.05rem; overflow-wrap: anywhere; }
.detail .desc { margin: 0 0 .9rem; color: var(--muted); font-size: .92rem; }
.qty { display: flex; gap: .4rem; align-items: center; margin: .35rem 0 .7rem; }
.qty input { width: 100%; min-width: 0; text-align: center; font-weight: 700; }
.qty button { flex: none; width: 40px; height: 38px; color: var(--text); background: #12254d; border: 1px solid var(--rim); border-radius: 7px; font: inherit; font-weight: 800; cursor: pointer; }
.qty button.max { width: auto; padding: 0 .75rem; }
@media (max-width: 900px) {
  .cols { grid-template-columns: 1fr; }
  .detail { position: static; }
}
@media (max-width: 620px) {
  .top { padding: .7rem 1rem; }
  .panel { padding: .95rem; }
  main { padding-top: 1rem; }
  .grid { grid-template-columns: repeat(auto-fill, minmax(92px, 1fr)); }
}
