:root {
  color-scheme: light;
  --paper: #f4efe6;
  --paper-deep: #ece4d6;
  --sheet: #fbf8f2;
  --sheet-hi: #fffdf9;
  --ink: #1d1616;
  --ink-2: #54484a;
  --ink-3: #6a6162;
  --rule: #ddd2c2;
  --rule-2: #c7b9a6;
  --blood: #b0141d;
  --blood-deep: #8a0d15;
  --blood-wash: #f3ddd6;
  --blood-tint: #faeee9;
  --ok: #2b6743;
  --ok-wash: #e1ecdf;
  --warn: #8f5508;
  --warn-wash: #f5e7cb;
  --blood-fill: #b0141d;
  --blood-fill-hi: #8a0d15;
  --on-blood: #fff8f4;
  --blood-line: rgba(176, 20, 29, .32);
  --hover: rgba(255, 255, 255, .45);
  --hover-ink: rgba(29, 22, 22, .06);
  --glass: rgba(255, 255, 255, .35);
  --placeholder: #aa9f97;
  --shimmer: rgba(255, 255, 255, .55);
  --plate-line: rgba(29, 22, 22, .045);
  --bar-bg: rgba(244, 239, 230, .92);
  --tab-bg: rgba(236, 228, 214, .96);
  --backdrop: rgba(29, 22, 22, .42);
  --shadow-deep: 0 30px 80px -20px rgba(29, 22, 22, .45);
  --grain: .5;
  --logo-filter: none;
  --serif: "Fraunces", Georgia, "Times New Roman", serif;
  --sans: "Geist", ui-sans-serif, system-ui, sans-serif;
  --mono: "Geist Mono", ui-monospace, "SFMono-Regular", monospace;
  --r: 10px;
  --r-sm: 7px;
  --rail: 256px;
  --lift: 0 1px 0 rgba(29, 22, 22, .05), 0 10px 30px -14px rgba(29, 22, 22, .22);
  --focus: 0 0 0 3px rgba(176, 20, 29, .22);
  --ease: cubic-bezier(.2, .7, .2, 1);
}

:root[data-theme="dark"] {
  color-scheme: dark;
  --paper: #141010;
  --paper-deep: #0f0c0c;
  --sheet: #1c1716;
  --sheet-hi: #221c1b;
  --ink: #f1e8de;
  --ink-2: #c7b8ad;
  --ink-3: #93847c;
  --rule: #2f2725;
  --rule-2: #443935;
  --blood: #f2676c;
  --blood-deep: #ff9599;
  --blood-wash: #3d1a1c;
  --blood-tint: #261516;
  --ok: #7cc79a;
  --ok-wash: #162a1f;
  --warn: #e7b25e;
  --warn-wash: #2f2414;
  --blood-fill: #c8333b;
  --blood-fill-hi: #db434b;
  --on-blood: #fff6f2;
  --blood-line: rgba(242, 103, 108, .38);
  --hover: rgba(255, 240, 230, .05);
  --hover-ink: rgba(255, 240, 230, .07);
  --glass: rgba(255, 240, 230, .025);
  --placeholder: #6d605a;
  --shimmer: rgba(255, 240, 230, .08);
  --plate-line: rgba(255, 240, 230, .04);
  --bar-bg: rgba(20, 16, 16, .9);
  --tab-bg: rgba(15, 12, 12, .95);
  --backdrop: rgba(5, 3, 3, .68);
  --shadow-deep: 0 30px 80px -20px rgba(0, 0, 0, .8);
  --lift: 0 1px 0 rgba(0, 0, 0, .3), 0 10px 30px -14px rgba(0, 0, 0, .7);
  --focus: 0 0 0 3px rgba(242, 103, 108, .35);
  --grain: .9;
  --logo-filter: drop-shadow(0 0 .6px rgba(255, 236, 226, .55)) drop-shadow(0 2px 10px rgba(200, 51, 59, .25));
}

::selection { background: var(--blood-wash); color: var(--ink); }

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  min-height: 100dvh;
  background: var(--paper);
  color: var(--ink);
  font: 400 16px/1.55 var(--sans);
  -webkit-font-smoothing: antialiased;
}
body::before {
  content: "";
  position: fixed;
  inset: 0;
  z-index: -1;
  pointer-events: none;
  opacity: var(--grain);
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='180' height='180'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='.85' numOctaves='3' stitchTiles='stitch'/%3E%3CfeColorMatrix values='0 0 0 0 .45 0 0 0 0 .36 0 0 0 0 .3 0 0 0 .09 0'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E");
}
img { display: block; max-width: 100%; }
a { color: var(--blood); text-underline-offset: 3px; }
a:hover { color: var(--blood-deep); }
h1, h2, h3, p { margin: 0; }
button, input, select, textarea { font: inherit; color: inherit; }
[hidden] { display: none !important; }
:focus-visible { outline: 2px solid var(--blood); outline-offset: 2px; }
[tabindex="-1"]:focus, [tabindex="-1"]:focus-visible { outline: none; }

.sprite { position: absolute; width: 0; height: 0; overflow: hidden; }
.ic { width: 20px; height: 20px; flex: none; fill: none; stroke: currentColor; stroke-width: 1.6; stroke-linecap: round; stroke-linejoin: round; }
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.skip { position: absolute; left: 12px; top: -48px; z-index: 50; padding: 10px 14px; background: var(--ink); color: var(--sheet); border-radius: var(--r-sm); text-decoration: none; }
.skip:focus { top: 12px; color: var(--sheet); }

.shell { display: grid; grid-template-columns: var(--rail) minmax(0, 1fr); align-content: start; min-height: 100dvh; }

.rail {
  position: sticky;
  top: 0;
  height: 100dvh;
  display: flex;
  flex-direction: column;
  gap: 28px;
  padding: 28px 18px 20px;
  background: var(--paper-deep);
  border-right: 1px solid var(--rule);
  overflow-y: auto;
}
.brand { display: flex; align-items: center; gap: 12px; color: var(--ink); text-decoration: none; padding: 0 6px; }
.brand:hover { color: var(--ink); }
.brand-logo { width: 44px; height: 44px; object-fit: contain; }
.brand-logo.beat { animation: beat .9s var(--ease); }
.brand-text { display: flex; flex-direction: column; line-height: 1.1; }
.brand-name { font: 600 28px/1 var(--serif); letter-spacing: -.01em; }
.brand-tag { margin-top: 5px; font: 400 10.5px var(--mono); color: var(--ink-3); white-space: nowrap; }

.rail-nav { display: flex; flex-direction: column; gap: 2px; }
.rail-nav a {
  position: relative;
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 10px 12px;
  border-radius: var(--r-sm);
  color: var(--ink-2);
  font-weight: 500;
  text-decoration: none;
  transition: background .15s, color .15s;
}
.rail-nav a:hover { background: var(--hover); color: var(--ink); }
.rail-nav a[aria-current="page"] { background: var(--sheet); color: var(--ink); box-shadow: inset 0 0 0 1px var(--rule); }
.rail-nav a[aria-current="page"]::before {
  content: "";
  position: absolute;
  left: -18px;
  top: 10px;
  bottom: 10px;
  width: 3px;
  border-radius: 0 3px 3px 0;
  background: var(--blood);
}
.rail-nav a[aria-current="page"] .ic { color: var(--blood); }

.ic-fill { fill: currentColor; stroke: none; }

.community {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 12px;
  border: 1px solid var(--rule);
  border-radius: var(--r);
  background: var(--glass);
  color: var(--ink-2);
  text-decoration: none;
  transition: background .15s, border-color .15s, color .15s;
}
.community:hover { background: var(--sheet); border-color: var(--rule-2); color: var(--ink); }
.community-logo { width: 22px; height: 22px; color: #5865f2; }
.community-text { display: flex; flex-direction: column; min-width: 0; line-height: 1.25; }
.community-title { font-weight: 600; font-size: 14px; color: var(--ink); }
.community-sub { font-size: 12px; color: var(--ink-3); }
.community-arrow { width: 15px; height: 15px; margin-left: auto; color: var(--ink-3); transition: transform .15s, color .15s; }
.community:hover .community-arrow { color: var(--blood); transform: translate(1px, -1px); }

.quota { margin-top: auto; padding: 14px; border: 1px solid var(--rule); border-radius: var(--r); background: var(--glass); }
.quota-label { font: 500 11px var(--mono); text-transform: uppercase; letter-spacing: .08em; color: var(--ink-3); }
.quota-value { margin-top: 4px; font: 600 26px/1 var(--serif); }
.quota-of { font: 400 14px var(--sans); color: var(--ink-3); }
.meter { margin-top: 10px; height: 4px; border-radius: 4px; background: var(--rule); overflow: hidden; }
.meter-fill { display: block; height: 100%; width: 0; background: var(--blood); border-radius: 4px; transition: width .5s var(--ease); }
.quota.is-full .quota-value { color: var(--blood); }

.theme { display: flex; align-items: center; justify-content: space-between; gap: 10px; padding: 0 4px; }
.theme-label { font: 500 11px var(--mono); text-transform: uppercase; letter-spacing: .08em; color: var(--ink-3); }
.theme-seg { display: inline-flex; gap: 2px; padding: 3px; border: 1px solid var(--rule); border-radius: 999px; background: var(--glass); }
.theme-seg button { display: grid; place-items: center; width: 34px; height: 28px; padding: 0; border: 0; border-radius: 999px; background: transparent; color: var(--ink-3); cursor: pointer; transition: background .15s, color .15s; }
.theme-seg button:hover { color: var(--ink); }
.theme-seg button[aria-pressed="true"] { background: var(--sheet); color: var(--ink); box-shadow: inset 0 0 0 1px var(--rule-2); }
.theme-seg .ic { width: 16px; height: 16px; }
.brand-logo, .plate-logo, .gate img { filter: var(--logo-filter); }
.topbar-actions { display: flex; align-items: center; gap: 4px; }

.acct { display: flex; align-items: center; gap: 10px; padding: 8px; border-radius: var(--r); color: var(--ink); text-decoration: none; transition: background .15s; }
.acct:hover { background: var(--hover); color: var(--ink); }
.acct[aria-current="page"] { background: var(--sheet); box-shadow: inset 0 0 0 1px var(--rule); }
.avatar {
  display: grid;
  place-items: center;
  width: 36px;
  height: 36px;
  flex: none;
  border-radius: 50%;
  background: var(--blood-wash);
  color: var(--blood-deep);
  font: 600 16px/1 var(--serif);
  overflow: hidden;
}
.avatar img { width: 100%; height: 100%; object-fit: cover; }
.acct-text { min-width: 0; display: flex; flex-direction: column; line-height: 1.25; }
.acct-name { font-weight: 500; font-size: 14px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.acct-plan { font-size: 12px; color: var(--ink-3); }
.acct-plan.pro { color: var(--blood); }
.rail-guest { display: flex; flex-direction: column; gap: 8px; }
.rail-guest p { font-size: 12px; color: var(--ink-3); text-align: center; }

.topbar, .tabbar { display: none; }

.main { min-width: 0; width: 100%; max-width: 940px; padding: 56px clamp(20px, 5vw, 72px) 96px; outline: none; }

.notice {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  margin-bottom: 28px;
  padding: 12px 12px 12px 16px;
  border: 1px solid var(--rule-2);
  border-left: 3px solid var(--blood);
  border-radius: var(--r-sm);
  background: var(--sheet);
  animation: rise .35s var(--ease);
}
.notice > .ic { margin-top: 2px; color: var(--blood); }
.notice p { flex: 1; font-size: 15px; }

.view { animation: rise .45s var(--ease) both; }
.vh { margin-bottom: 36px; }
.fig { font: 500 11.5px var(--mono); letter-spacing: .1em; text-transform: uppercase; color: var(--ink-3); }
.vh h1, .auth-panel h1 {
  margin-top: 12px;
  font: 500 clamp(34px, 5vw, 50px)/1.06 var(--serif);
  letter-spacing: -.008em;
  word-spacing: .04em;
  font-variation-settings: "opsz" 120;
  outline: none;
}
.vh h1 em { font-style: italic; color: var(--blood); }
.lede { margin-top: 12px; max-width: 54ch; font-size: 17px; color: var(--ink-2); }
h2 { font: 600 20px/1.2 var(--serif); letter-spacing: -.01em; }

.field { display: flex; flex-direction: column; gap: 7px; min-width: 0; }
.field > label, .inf-search label, .qty-label, .choice legend { font-size: 14px; font-weight: 500; color: var(--ink); }
.input {
  width: 100%;
  min-height: 48px;
  padding: 11px 14px;
  background: var(--sheet-hi);
  border: 1px solid var(--rule-2);
  border-radius: var(--r-sm);
  font-size: 16px;
  transition: border-color .15s, box-shadow .15s, background .15s;
}
.input::placeholder { color: var(--placeholder); }
.input:hover { border-color: var(--ink-3); }
.input:focus { outline: none; border-color: var(--blood); box-shadow: var(--focus); }
.input[aria-invalid="true"] { border-color: var(--blood); background: var(--blood-tint); }
.input:disabled { opacity: .6; cursor: not-allowed; }
.input-mono { font-family: var(--mono); font-size: 15px; letter-spacing: .01em; }
.input-xl { min-height: 64px; font: 500 26px var(--mono); letter-spacing: .04em; padding: 12px 18px; }
.msg { font-size: 13.5px; color: var(--ink-3); }
.msg-error, .msg.is-error { color: var(--blood); }
.msg.is-ok { color: var(--ok); }

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  min-height: 44px;
  padding: 0 18px;
  border: 1px solid transparent;
  border-radius: var(--r-sm);
  font-weight: 500;
  font-size: 15px;
  text-decoration: none;
  white-space: nowrap;
  cursor: pointer;
  transition: background .15s, border-color .15s, color .15s, transform .08s, box-shadow .15s;
}
.btn:active:not(:disabled) { transform: translateY(1px); }
.btn:disabled { cursor: not-allowed; opacity: .5; }
.btn-primary { background: var(--blood-fill); color: var(--on-blood); box-shadow: 0 1px 0 rgba(0, 0, 0, .12), inset 0 1px 0 rgba(255, 255, 255, .12); }
.btn-primary:hover:not(:disabled) { background: var(--blood-fill-hi); color: var(--on-blood); }
.btn-secondary { background: var(--sheet-hi); border-color: var(--rule-2); color: var(--ink); }
.btn-secondary:hover:not(:disabled) { border-color: var(--ink-3); color: var(--ink); }
.btn-quiet { background: transparent; color: var(--ink-2); }
.btn-quiet:hover:not(:disabled) { background: var(--hover-ink); color: var(--ink); }
.btn-danger { background: var(--blood-tint); border-color: var(--blood-line); color: var(--blood); }
.btn-danger:hover:not(:disabled) { background: var(--blood-wash); color: var(--blood-deep); }
.btn-lg { min-height: 52px; padding: 0 26px; font-size: 16px; }
.btn-sm { min-height: 34px; padding: 0 12px; font-size: 14px; }
.btn-block { width: 100%; }
.btn.is-loading { cursor: progress; opacity: 1; }
.btn.is-loading .btn-label::before {
  content: "";
  display: inline-block;
  width: 14px;
  height: 14px;
  margin-right: 9px;
  vertical-align: -2px;
  border: 2px solid currentColor;
  border-right-color: transparent;
  border-radius: 50%;
  animation: spin .7s linear infinite;
}
.btn.is-loading .ic { display: none; }
.icon-btn {
  display: inline-grid;
  place-items: center;
  width: 40px;
  height: 40px;
  flex: none;
  padding: 0;
  border: 0;
  border-radius: var(--r-sm);
  background: transparent;
  color: var(--ink-2);
  cursor: pointer;
  transition: background .15s, color .15s;
}
.icon-btn:hover { background: var(--hover-ink); color: var(--ink); }

.sender { display: flex; flex-direction: column; gap: 28px; padding-bottom: 40px; border-bottom: 1px solid var(--rule); }
.recent { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; margin-top: 4px; }
.recent-label { font: 500 11px var(--mono); text-transform: uppercase; letter-spacing: .08em; color: var(--ink-3); }
.recent-list { display: flex; gap: 6px; flex-wrap: wrap; }
.chip {
  min-height: 32px;
  padding: 0 12px;
  border: 1px solid var(--rule-2);
  border-radius: 999px;
  background: transparent;
  font: 500 13px var(--mono);
  color: var(--ink-2);
  cursor: pointer;
  transition: border-color .15s, color .15s, background .15s;
}
.chip:hover { border-color: var(--ink-3); color: var(--ink); }
.chip[aria-pressed="true"] { border-color: var(--blood); color: var(--blood); background: var(--blood-tint); }

.choice { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 10px; margin: 0; padding: 0; border: 0; min-width: 0; }
.choice legend { grid-column: 1 / -1; padding: 0; margin-bottom: 10px; }
.option { position: relative; cursor: pointer; }
.option input { position: absolute; opacity: 0; pointer-events: none; }
.option-body {
  display: grid;
  grid-template-columns: auto 1fr;
  grid-template-rows: auto auto;
  column-gap: 10px;
  row-gap: 2px;
  height: 100%;
  padding: 14px 16px;
  border: 1px solid var(--rule-2);
  border-radius: var(--r);
  background: var(--glass);
  transition: border-color .15s, background .15s, box-shadow .15s;
}
.option-body .ic { grid-row: 1 / span 2; margin-top: 2px; color: var(--ink-3); transition: color .15s; }
.option-name { font-weight: 600; }
.option-spec { font-size: 13px; color: var(--ink-3); }
.option:hover .option-body { border-color: var(--ink-3); }
.option input:checked + .option-body { border-color: var(--blood); background: var(--sheet-hi); box-shadow: inset 0 0 0 1px var(--blood); }
.option input:checked + .option-body .ic { color: var(--blood); }
.option input:focus-visible + .option-body { box-shadow: inset 0 0 0 1px var(--blood), var(--focus); }
.option.is-spent .option-spec { color: var(--blood); }

.qty { display: grid; grid-template-columns: auto auto 1fr; align-items: center; gap: 10px 16px; }
.qty-label { grid-column: 1 / -1; }
.stepper { display: flex; align-items: center; gap: 4px; padding: 3px; border: 1px solid var(--rule-2); border-radius: var(--r-sm); background: var(--sheet-hi); }
.stepper:focus-within { border-color: var(--blood); box-shadow: var(--focus); }
.stepper-input { width: 76px; min-height: 40px; padding: 0; border: 0; background: transparent; text-align: center; font: 500 18px var(--mono); box-shadow: none !important; }
.presets { display: flex; gap: 6px; flex-wrap: wrap; }

.send-row { display: flex; align-items: center; gap: 18px; flex-wrap: wrap; }
.send-note { font-size: 14px; color: var(--ink-3); max-width: 46ch; }
.send-note a { font-weight: 500; }

.result {
  display: grid;
  grid-template-columns: 30px minmax(0, 1fr) auto;
  gap: 2px 14px;
  align-items: start;
  margin-top: -6px;
  padding: 16px 12px 16px 16px;
  border: 1px solid var(--rule);
  border-left: 4px solid var(--rule-2);
  border-radius: var(--r);
  background: var(--sheet);
  box-shadow: var(--lift);
  animation: pop .35s var(--ease);
  scroll-margin: 90px 0 110px;
}
.result.is-ok { border-left-color: var(--ok); }
.result.is-warn { border-left-color: var(--warn); }
.result.is-bad, .result.is-pending { border-left-color: var(--blood); }
.result-body { display: flex; flex-direction: column; gap: 2px; min-width: 0; }
.result-kicker { font: 600 11px var(--mono); letter-spacing: .08em; text-transform: uppercase; color: var(--ink-3); }
.result.is-ok .result-kicker { color: var(--ok); }
.result.is-warn .result-kicker { color: var(--warn); }
.result.is-bad .result-kicker, .result.is-pending .result-kicker { color: var(--blood); }
.result-title { font-size: 16.5px; font-weight: 500; overflow-wrap: anywhere; }
.result-title b { font-weight: 600; }
.result-detail { font-size: 14px; color: var(--ink-2); overflow-wrap: anywhere; }
.result-detail .num { font-family: var(--mono); font-size: 13.5px; }
.result-cta { margin-top: 6px; font-size: 14px; font-weight: 500; }
.result-close { margin: -8px -4px 0 0; }

.log-section { padding-top: 32px; }
.section-bar { display: flex; align-items: baseline; justify-content: space-between; gap: 12px; margin-bottom: 14px; }
.section-hint { font-size: 14px; color: var(--ink-3); }
.log { list-style: none; margin: 0; padding: 0; border-top: 1px solid var(--rule); }
.log-item {
  display: grid;
  grid-template-columns: 30px minmax(0, 1fr) auto;
  gap: 4px 14px;
  align-items: start;
  padding: 16px 0;
  border-bottom: 1px solid var(--rule);
}
.log-item.is-new { animation: arrive .5s var(--ease); }
.mark { display: grid; place-items: center; width: 28px; height: 28px; border-radius: 50%; }
.mark .ic { width: 16px; height: 16px; stroke-width: 2; }
.mark.ok { background: var(--ok-wash); color: var(--ok); }
.mark.warn { background: var(--warn-wash); color: var(--warn); }
.mark.bad { background: var(--blood-wash); color: var(--blood); }
.mark.pending { background: transparent; color: var(--blood); }
.log-title { font-weight: 500; overflow-wrap: anywhere; }
.log-title b { font-weight: 600; }
.log-detail { margin-top: 2px; font-size: 14px; color: var(--ink-2); overflow-wrap: anywhere; }
.log-detail .num { font-family: var(--mono); font-size: 13.5px; }
.log-time { font: 400 12.5px var(--mono); color: var(--ink-3); white-space: nowrap; padding-top: 3px; }
.log-cta { margin-top: 6px; font-size: 14px; font-weight: 500; }
.empty {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
  padding: 36px 16px;
  text-align: center;
  color: var(--ink-3);
  border-bottom: 1px solid var(--rule);
}
.empty .ic { width: 26px; height: 26px; stroke-width: 1.3; color: var(--rule-2); }
.empty strong { color: var(--ink-2); font-weight: 500; }
.empty p { font-size: 14px; max-width: 40ch; }

.view-loading { display: flex; align-items: center; gap: 14px; padding: 56px 0; color: var(--ink-3); font-size: 14px; animation: rise .3s var(--ease); }
.pending-line { display: inline-flex; align-items: center; gap: 10px; color: var(--ink-3); }
.pulse { width: 120px; height: 24px; flex: none; fill: none; stroke: var(--blood); stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; stroke-dasharray: 150; stroke-dashoffset: 150; animation: trace 1.4s linear infinite; }
.pulse-sm { width: 64px; height: 16px; }

.stack { display: flex; flex-direction: column; gap: 22px; }

.gate { display: flex; gap: 22px; align-items: flex-start; padding: 28px; border: 1px solid var(--rule); border-radius: var(--r); background: var(--sheet); }
.gate img { width: 56px; height: 56px; flex: none; }
.gate p { margin-top: 8px; color: var(--ink-2); max-width: 52ch; }
.gate-actions { display: flex; gap: 10px; flex-wrap: wrap; margin-top: 18px; }

section + section { margin-top: 40px; }

.rows { list-style: none; margin: 0; padding: 0; border-top: 1px solid var(--rule); }
.row { display: flex; align-items: center; gap: 14px; padding: 14px 0; border-bottom: 1px solid var(--rule); min-height: 64px; }
.row-main { flex: 1; min-width: 0; }
.row-title { font-weight: 500; overflow-wrap: anywhere; }
.row-sub { font-size: 13.5px; color: var(--ink-3); overflow-wrap: anywhere; }
.row-sub .num { font-family: var(--mono); font-size: 13px; }
.row-price { font: 600 17px var(--serif); white-space: nowrap; }

.current-plan { display: flex; align-items: center; gap: 14px; flex-wrap: wrap; margin-bottom: 28px; padding: 16px 20px; border: 1px solid var(--rule); border-left: 3px solid var(--blood); border-radius: var(--r-sm); background: var(--sheet); }
.current-plan p { flex: 1; min-width: 220px; color: var(--ink-2); font-size: 15px; }
.current-plan strong { color: var(--ink); font-weight: 600; }

.compare-wrap { border: 1px solid var(--rule); border-radius: var(--r); background: var(--sheet); overflow: hidden; }
.compare { width: 100%; border-collapse: collapse; table-layout: fixed; }
.compare th, .compare td { padding: 16px 20px; text-align: left; vertical-align: middle; border-bottom: 1px solid var(--rule); }
.compare thead th { font: 600 22px var(--serif); padding-top: 24px; padding-bottom: 18px; }
.compare thead th:first-child { width: 36%; }
.compare tbody th { font-weight: 400; color: var(--ink-2); font-size: 15px; }
.compare tbody td { font-weight: 500; }
.compare tfoot td { border-bottom: 0; padding-top: 20px; padding-bottom: 22px; }
.compare .col-hot { background: var(--blood-tint); }
.compare thead .col-hot { color: var(--blood); box-shadow: inset 0 3px 0 var(--blood); }
.price { font: 600 26px/1 var(--serif); }
.per { font-size: 13px; color: var(--ink-3); margin-left: 4px; font-weight: 400; }
.addons { margin-top: 48px; }

.view-auth { padding-top: 4px; }
.auth { display: grid; grid-template-columns: minmax(0, .9fr) minmax(0, 1fr); gap: clamp(28px, 5vw, 64px); align-items: start; }
.plate {
  position: sticky;
  top: 40px;
  margin: 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 24px;
  aspect-ratio: 4 / 5;
  padding: 32px;
  border: 1px solid var(--rule-2);
  background:
    repeating-linear-gradient(0deg, transparent 0 27px, var(--plate-line) 27px 28px),
    var(--sheet);
}
.plate-corner { position: absolute; width: 14px; height: 14px; border-color: var(--ink-3); border-style: solid; }
.plate-corner.tl { top: 10px; left: 10px; border-width: 1px 0 0 1px; }
.plate-corner.tr { top: 10px; right: 10px; border-width: 1px 1px 0 0; }
.plate-corner.bl { bottom: 10px; left: 10px; border-width: 0 0 1px 1px; }
.plate-corner.br { bottom: 10px; right: 10px; border-width: 0 1px 1px 0; }
.plate-logo { width: 146px; height: 146px; object-fit: contain; animation: beat 2.8s var(--ease) 1s infinite; }
.plate figcaption { display: flex; flex-direction: column; align-items: center; gap: 4px; text-align: center; }
.plate-num { font: 500 11px var(--mono); letter-spacing: .12em; text-transform: uppercase; color: var(--ink-3); }
.plate-cap { font: 500 19px var(--serif); }
.plate-cap em { color: var(--blood); }
.auth-panel { display: flex; flex-direction: column; max-width: 420px; }
.auth-panel h1 { margin-top: 10px; font-size: clamp(32px, 4vw, 42px); }
.auth-panel .lede { font-size: 15.5px; margin-bottom: 24px; }
.dbtn {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 12px;
  min-height: 54px;
  padding: 0 20px;
  border-radius: var(--r);
  background: #5865f2;
  color: #fff;
  font-weight: 600;
  font-size: 16px;
  text-decoration: none;
  box-shadow: 0 1px 0 rgba(0, 0, 0, .08), 0 10px 24px -12px rgba(88, 101, 242, .7);
  transition: background .15s, transform .15s, box-shadow .15s;
}
.dbtn:hover { background: #4752c4; color: #fff; transform: translateY(-1px); }
.dbtn:active { transform: none; }
.dbtn:focus-visible { outline: none; box-shadow: 0 0 0 3px rgba(88, 101, 242, .4); }
.dbtn-logo { width: 24px; height: 24px; }
.dbtn.is-loading { pointer-events: none; opacity: .8; }
.dbtn.is-loading .dbtn-logo { animation: beat 1.2s var(--ease) infinite; }
.dbtn[aria-disabled="true"] { pointer-events: none; opacity: .45; box-shadow: none; }
#discord-off { margin-top: 10px; }
.auth-steps { list-style: none; margin: 26px 0 0; padding: 18px 0 0; border-top: 1px solid var(--rule); display: flex; flex-direction: column; gap: 12px; font-size: 14.5px; color: var(--ink-2); }
.auth-steps li { display: flex; align-items: center; gap: 12px; }
.auth-step-n { display: grid; place-items: center; width: 24px; height: 24px; flex: none; border: 1px solid var(--rule-2); border-radius: 50%; font: 500 12px var(--mono); color: var(--ink-3); }
.auth-privacy { display: flex; gap: 10px; align-items: flex-start; margin-top: 22px; padding: 12px 14px; border-radius: var(--r-sm); background: var(--glass); border: 1px solid var(--rule); font-size: 13.5px; color: var(--ink-3); }
.auth-privacy .ic { width: 16px; height: 16px; margin-top: 2px; color: var(--ok); }
.alert { display: flex; gap: 10px; align-items: flex-start; margin-bottom: 18px; padding: 12px 14px; border-radius: var(--r-sm); background: var(--blood-tint); border: 1px solid var(--blood-line); color: var(--blood-deep); font-size: 14.5px; animation: rise .3s var(--ease); }
.alert .ic { margin-top: 1px; }
.auth-foot { margin-top: 22px; font-size: 14px; color: var(--ink-3); }

.figures { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); margin: 22px 0 40px; border-top: 1px solid var(--rule); border-bottom: 1px solid var(--rule); }
.figures div { padding: 16px 18px 16px 0; }
.figures div + div { padding-left: 18px; border-left: 1px solid var(--rule); }
.figures dt { font: 500 11px var(--mono); letter-spacing: .08em; text-transform: uppercase; color: var(--ink-3); }
.figures dd { margin: 6px 0 0; font: 500 30px/1 var(--serif); font-variant-numeric: tabular-nums; }
.tag { display: inline-flex; align-items: center; gap: 6px; padding: 3px 10px; border-radius: 999px; font: 500 12px var(--mono); white-space: nowrap; background: var(--hover-ink); color: var(--ink-2); }
.skeleton { position: relative; overflow: hidden; height: 14px; border-radius: 4px; background: var(--rule); }
.skeleton::after { content: ""; position: absolute; inset: 0; transform: translateX(-100%); background: linear-gradient(90deg, transparent, var(--shimmer), transparent); animation: shimmer 1.2s infinite; }

.inf-search { display: grid; grid-template-columns: minmax(0, 1fr) auto; grid-template-areas: "label label" "input button" "msg msg"; gap: 7px 12px; align-items: center; }
.inf-search label { grid-area: label; }
.inf-search .input { grid-area: input; }
.inf-search .btn { grid-area: button; min-height: 48px; }
.inf-search .msg { grid-area: msg; }
.inf-out { margin-top: 28px; }
.inf-out .alert { margin: 0; }
.inf-alert .btn { margin-top: 10px; }
.inf-empty { border: 1px dashed var(--rule-2); border-radius: var(--r); }
.inf-loading { margin-bottom: 16px; font-size: 14px; }
.inf-loading .num { font-family: var(--mono); }
.inf-skel { display: grid; gap: 14px; min-height: 180px; align-content: start; }
.inf-skel .skeleton:first-child { width: 45%; height: 18px; }
.inf-skel .skeleton:nth-child(even) { width: 80%; }

.inf-hero { position: relative; border: 1px solid var(--rule); border-radius: var(--r); background: var(--sheet); overflow: hidden; animation: rise .35s var(--ease); }
.inf-banner { display: block; height: 136px; border-radius: 0; border-bottom: 1px solid var(--rule); }
.inf-banner img { object-fit: cover; }
.inf-banner.is-missing { display: none; }
.inf-hero .inf-profile { position: absolute; width: 1px; height: 1px; overflow: hidden; opacity: 0; pointer-events: none; }
.inf-hero.has-profile .inf-profile { position: static; display: block; width: 100%; height: auto; opacity: 1; pointer-events: auto; border-radius: 0; border-bottom: 1px solid var(--rule); background: var(--paper-deep); }
.inf-hero.has-profile .inf-profile img { height: auto; }
.inf-hero.has-profile .inf-banner { display: none; }
.inf-hero.has-profile .inf-avatar { display: none; }
.inf-hero.has-profile .inf-id { grid-template-columns: minmax(0, 1fr) auto; }
.inf-id { display: grid; grid-template-columns: auto minmax(0, 1fr) auto; gap: 18px; align-items: center; padding: 20px; }
.inf-name { margin-top: 4px; font: 500 clamp(24px, 3.4vw, 32px)/1.1 var(--serif); overflow-wrap: anywhere; }
.inf-tags { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 10px; }
.inf-sign { margin-top: 10px; color: var(--ink-2); font-style: italic; overflow-wrap: anywhere; }
.inf-actions { margin-top: 14px; }
.inf-figs { grid-template-columns: repeat(2, minmax(0, 1fr)); margin: 18px 0 22px; }

.inf-img { position: relative; display: grid; place-items: center; overflow: hidden; background: var(--paper-deep); border-radius: var(--r-sm); }
.inf-img img { width: 100%; height: 100%; object-fit: contain; }
.inf-img.is-missing::after { content: "sem imagem"; padding: 4px; font: 500 9.5px var(--mono); letter-spacing: .06em; text-transform: uppercase; text-align: center; color: var(--ink-3); }
.inf-avatar { width: 84px; height: 84px; border: 1px solid var(--rule-2); }
.inf-avatar img { object-fit: cover; }
.inf-badge { width: 64px; height: 64px; background: transparent; }
.inf-badge.is-missing { display: none; }
.inf-title { width: 88px; height: 88px; margin-left: auto; border: 1px solid var(--rule); }

.inf-grid { columns: 2; column-gap: 14px; }
.inf-grid > * { break-inside: avoid; margin-bottom: 14px; }
.inf-card { min-width: 0; padding: 18px 20px; border: 1px solid var(--rule); border-radius: var(--r); background: var(--sheet); animation: fade .4s var(--ease) both; }
.inf-card.is-wide { column-span: all; }
.inf-card h2 { display: flex; align-items: center; gap: 10px; margin-bottom: 8px; font-size: 18px; }
.inf-card h2 .ic { width: 18px; height: 18px; color: var(--blood); }
.inf-list { margin: 0; }
.inf-list div { display: flex; justify-content: space-between; align-items: center; gap: 16px; padding: 9px 0; border-top: 1px solid var(--rule); }
.inf-list div:first-child { border-top: 0; }
.inf-list dt { flex: none; font-size: 14px; color: var(--ink-3); }
.inf-list dd { min-width: 0; margin: 0; font-weight: 500; text-align: right; overflow-wrap: anywhere; }
.inf-na { font: 400 12.5px var(--mono); color: var(--ink-3); }
.inf-muted { font: 400 13.5px var(--mono); color: var(--ink-3); }
.inf-mono { font-family: var(--mono); font-size: 14px; }
.inf-note { font-size: 14px; color: var(--ink-3); }

.inf-pet { display: flex; gap: 12px; margin-bottom: 10px; }
.inf-pet .inf-img { width: 88px; height: 88px; }

.inf-look { display: grid; grid-template-columns: 180px minmax(0, 1fr); gap: 22px; margin-top: 6px; }
.inf-char-wrap { display: flex; flex-direction: column; gap: 8px; }
.inf-char { width: 180px; height: 180px; }
.inf-sub { margin-bottom: 10px; font: 500 11px var(--mono); letter-spacing: .08em; text-transform: uppercase; color: var(--ink-3); }
.inf-items { display: grid; grid-template-columns: repeat(auto-fill, minmax(84px, 1fr)); gap: 10px; margin-bottom: 18px; }
.inf-items:last-child { margin-bottom: 0; }
.inf-look .inf-note + .inf-sub { margin-top: 18px; }
.inf-items .inf-img { width: 100%; aspect-ratio: 1; border: 1px solid var(--rule); }
.inf-items .inf-tip { width: 100%; }

.inf-tip { position: relative; display: block; width: fit-content; min-width: 0; padding: 0; border: 0; border-radius: var(--r-sm); overflow: hidden; background: none; color: inherit; cursor: pointer; }
.inf-tip::after {
  content: attr(data-tip);
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  padding: 6px 7px;
  background: rgba(20, 16, 16, .86);
  color: #fff8f4;
  font: 500 11px/1.35 var(--mono);
  white-space: pre-line;
  overflow-wrap: anywhere;
  text-align: center;
  opacity: 0;
  transform: translateY(6px);
  transition: opacity .15s, transform .15s;
  pointer-events: none;
}
.inf-tip:hover::after, .inf-tip:focus-visible::after, .inf-tip.is-open::after { opacity: 1; transform: none; }
@media (hover: none) {
  .inf-tip:hover:not(.is-open)::after { opacity: 0; transform: translateY(6px); }
}

@media (pointer: coarse) {
  .chip { min-height: 40px; padding: 0 14px; }
  .btn-sm { min-height: 40px; }
}

.toast {
  position: fixed;
  left: 50%;
  bottom: 28px;
  z-index: 80;
  max-width: calc(100vw - 32px);
  padding: 12px 18px;
  border-radius: var(--r-sm);
  background: var(--ink);
  color: var(--sheet);
  font-size: 14.5px;
  box-shadow: var(--lift);
  opacity: 0;
  transform: translate(-50%, 12px);
  pointer-events: none;
  transition: opacity .2s, transform .25s var(--ease);
}
.toast.show { opacity: 1; transform: translate(-50%, 0); }

@keyframes rise { from { opacity: 0; transform: translateY(10px); } to { opacity: 1; transform: none; } }
@keyframes fade { from { opacity: 0; } }
@keyframes arrive { from { opacity: 0; transform: translateY(-6px); background: var(--blood-tint); } to { opacity: 1; transform: none; } }
@keyframes pop { from { opacity: 0; transform: translateY(8px) scale(.98); } to { opacity: 1; transform: none; } }
@keyframes spin { to { transform: rotate(360deg); } }
@keyframes trace { 0% { stroke-dashoffset: 150; } 70% { stroke-dashoffset: 0; } 100% { stroke-dashoffset: -150; } }
@keyframes shimmer { to { transform: translateX(100%); } }
@keyframes beat { 0%, 100% { transform: scale(1); } 14% { transform: scale(1.08); } 28% { transform: scale(.98); } 42% { transform: scale(1.05); } 70% { transform: scale(1); } }

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: .01ms !important; animation-iteration-count: 1 !important; transition-duration: .01ms !important; }
  .pulse { stroke-dashoffset: 0; }
}

@media (max-width: 900px) {
  .shell { grid-template-columns: minmax(0, 1fr); }
  .rail { display: none; }
  .topbar {
    position: sticky;
    top: 0;
    z-index: 30;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    padding: 10px 16px;
    padding-top: max(10px, env(safe-area-inset-top));
    background: var(--bar-bg);
    backdrop-filter: blur(10px);
    border-bottom: 1px solid var(--rule);
  }
  .brand-compact { padding: 0; gap: 8px; }
  .brand-compact .brand-logo { width: 32px; height: 32px; }
  .brand-compact .brand-name { font-size: 22px; }
  .topbar-account { display: flex; align-items: center; gap: 8px; }
  .topbar-account .acct { padding: 2px; border-radius: 50%; }
  .topbar-account .quota-pill { font: 500 12.5px var(--mono); color: var(--ink-2); padding: 5px 10px; border: 1px solid var(--rule-2); border-radius: 999px; }
  .topbar-account .quota-pill.is-full { color: var(--blood); border-color: var(--blood-line); }
  .tabbar {
    position: fixed;
    left: 0;
    right: 0;
    bottom: 0;
    z-index: 30;
    display: grid;
    grid-auto-flow: column;
    grid-auto-columns: minmax(0, 1fr);
    padding: 6px 6px max(6px, env(safe-area-inset-bottom));
    background: var(--tab-bg);
    backdrop-filter: blur(10px);
    border-top: 1px solid var(--rule);
  }
  .tabbar a { display: flex; flex-direction: column; align-items: center; gap: 3px; padding: 6px 2px; border-radius: var(--r-sm); color: var(--ink-3); font-size: 11.5px; font-weight: 500; text-decoration: none; }
  .tabbar a[aria-current="page"] { color: var(--blood); }
  .tabbar a[aria-current="page"] .ic { stroke-width: 2; }
  .main { padding: 32px 16px calc(96px + env(safe-area-inset-bottom)); }
  .toast { bottom: calc(84px + env(safe-area-inset-bottom)); }
  .auth { grid-template-columns: minmax(0, 1fr); }
  .plate { position: static; aspect-ratio: auto; flex-direction: row; justify-content: flex-start; gap: 18px; padding: 18px 22px; }
  .plate-logo { width: 72px; height: 72px; }
  .plate figcaption { align-items: flex-start; text-align: left; }
  .auth-panel { max-width: none; }
}

@media (max-width: 760px) {
  .inf-grid { columns: 1; }
  .inf-look { grid-template-columns: minmax(0, 1fr); }
  .inf-char-wrap { align-items: center; }
}

@media (max-width: 600px) {
  .choice { grid-template-columns: minmax(0, 1fr); }
  .option-body { grid-template-columns: auto 1fr auto; grid-template-rows: auto; align-items: center; padding: 13px 14px; }
  .option-body .ic { grid-row: auto; margin: 0; }
  .option-spec { text-align: right; }
  .input-xl { font-size: 22px; min-height: 58px; }
  .send-row .btn { width: 100%; }
  .qty { grid-template-columns: auto 1fr; }
  .presets { grid-column: 1 / -1; }
  .compare th, .compare td { padding: 13px 10px; font-size: 14px; }
  .compare thead th { font-size: 18px; }
  .compare thead th:first-child { width: 34%; }
  .price { font-size: 20px; }
  .per { display: block; margin: 4px 0 0; }
  .compare .btn { padding: 0 8px; font-size: 14px; }
  .gate { flex-direction: column; padding: 22px; }
  .row { flex-wrap: wrap; }
  .row-main { flex-basis: calc(100% - 120px); }
  .log-item { grid-template-columns: 30px minmax(0, 1fr); }
  .log-time { grid-column: 2; padding-top: 0; }
  .figures { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .figures div:nth-child(3) { padding-left: 0; border-left: 0; }
  .figures div:nth-child(n + 3) { border-top: 1px solid var(--rule); }
  .inf-search { grid-template-columns: minmax(0, 1fr); grid-template-areas: "label" "input" "msg" "button"; }
  .inf-search .btn { margin-top: 8px; }
  .inf-banner { height: 96px; }
  .inf-id { gap: 14px; padding: 16px; }
  .inf-avatar { width: 64px; height: 64px; }
  .inf-badge { width: 44px; height: 44px; }
  .inf-card { padding: 16px; }
  .inf-items { grid-template-columns: repeat(auto-fill, minmax(72px, 1fr)); }
}
