/* Melody — editorial sticker desk. Visual layer only; business hooks stay unchanged. */
:root {
  --font: "Helvetica Neue", "PingFang SC", "Microsoft YaHei", "Noto Sans CJK SC", sans-serif;
  --font-display: "Copperplate", "Copperplate Gothic Light", "PingFang SC", "Microsoft YaHei", sans-serif;
  --font-mono: "Menlo", "SFMono-Regular", "Consolas", "PingFang SC", "Microsoft YaHei", monospace;
  --bg: #f5f5f5;
  --card: rgba(255, 255, 255, .9);
  --card-strong: #ffffff;
  --border: #d3d3d3;
  --text: #141413;
  --dim: #555552;
  --accent: #fb44ee;
  --accent2: #98b8fe;
  --danger: #9c1958;
  --ok: #286a58;
  --warn: #76520d;
  --shadow: none;
  --glow: 0 0 0 2px rgba(152, 184, 254, .5);
  --radius: 2px;
  --bar: linear-gradient(90deg, #98b8fe, #fb44ee);
  --aur1: rgba(152, 184, 254, .12);
  --aur2: rgba(251, 68, 238, .08);
  --aur3: rgba(255, 255, 255, .4);
  --veil: linear-gradient(105deg, rgba(245,245,245,.92), rgba(245,245,245,.62) 52%, rgba(245,245,245,.86));
  --hero-op: .62;
}

html { background: #f5f5f5; scrollbar-color: #141413 #f5f5f5; }
body {
  min-height: 100dvh;
  color: #141413;
  background: #f5f5f5;
  font-family: var(--font);
  font-size: 16px;
  line-height: 1.6;
}
body::before { z-index: 1; background: var(--veil); animation: none; }
body::after { z-index: 1; background: none; animation: none; }
::selection { color: #ffffff; background: #141413; }
::-webkit-scrollbar-thumb { background: #141413; border: 2px solid #f5f5f5; }
button:focus-visible, a:focus-visible, input:focus-visible, summary:focus-visible {
  outline: 3px solid #98b8fe;
  outline-offset: 3px;
}

.glass {
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: 0;
  box-shadow: none;
  backdrop-filter: blur(12px) saturate(1.05);
  -webkit-backdrop-filter: blur(12px) saturate(1.05);
}
#view-auth, #view-console { position: relative; z-index: 2; animation: none; }
.auth-hero {
  z-index: 0;
  opacity: var(--hero-op);
  filter: saturate(.9) brightness(.86);
}
.hidden, .hidden-view, [data-brand-asset][hidden], [data-background-video][hidden] { display: none !important; }
.small { font-size: 13px; }
.dim { color: var(--dim); }

/* Controls: outlined filters invert on selection, with a soft pill transition on hover. */
.btn {
  min-height: 44px;
  padding: 9px 16px;
  color: #141413;
  background: #ffffff;
  border: 1px solid #141413;
  border-radius: 4px;
  box-shadow: none;
  font-family: var(--font);
  font-weight: 650;
  transition: color .2s ease, background-color .2s ease, border-radius .2s ease, transform .2s ease;
}
.btn:hover:not(:disabled) {
  color: #ffffff;
  background: #141413;
  border-color: #141413;
  border-radius: 100px;
  box-shadow: none;
  transform: none;
}
.btn:active:not(:disabled) { transform: scale(.97); }
.btn.primary {
  color: #141413;
  background: #fb44ee;
  border: 1px solid #141413;
  box-shadow: none;
}
.btn.primary:hover:not(:disabled) { color: #ffffff; background: #141413; }
.btn.ghost { background: transparent; border-color: #8b8b88; }
.btn.danger { color: #9c1958; background: #ffffff; border-color: #9c1958; }
.btn.small { min-height: 40px; }
.btn.tiny { min-height: 36px; }
.btn:disabled { opacity: .48; }

.inp {
  min-height: 48px;
  padding: 11px 13px;
  color: #141413;
  background: #ffffff;
  border: 1px solid #a9a9a6;
  border-radius: 0;
  font-family: var(--font);
  font-size: 16px;
}
.inp:hover { border-color: #141413; }
.inp:focus {
  background: #ffffff;
  border-color: #141413;
  outline: 2px solid #98b8fe;
  outline-offset: 1px;
  box-shadow: none;
}
.fld-label, .fld-hint { color: #555552; }
.auth-orbits, .mode-tabs, .stat-grid, .ops-row { font-family: var(--font-mono); }

/* Full-height media layout: brand gallery left, contained sign-in panel right. */
.auth-wrap {
  width: 100%;
  max-width: none;
  min-height: 100dvh;
  margin: 0;
  padding: 0;
  display: grid;
  grid-template-columns: minmax(0, 1.35fr) minmax(390px, .65fr);
  gap: 0;
}
.auth-brand {
  position: relative;
  min-width: 0;
  min-height: 100dvh;
  padding: clamp(28px, 4.5vw, 72px);
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(180px, .48fr);
  grid-template-rows: auto 1fr auto auto;
  align-content: stretch;
  gap: 0 24px;
  text-align: left;
  background: rgba(245,245,245,.44);
  border-right: 1px solid #141413;
}
.brand-line {
  grid-column: 1 / -1;
  display: flex;
  align-items: flex-start;
  justify-content: flex-start;
  gap: 18px;
}
.brand-logo-lg {
  width: 76px;
  height: 76px;
  flex: none;
  padding: 5px;
  object-fit: contain;
  background: #ffffff;
  border: 1px solid #141413;
  border-radius: 0;
  box-shadow: none;
  animation: none;
}
.auth-kicker {
  display: block;
  margin: 3px 0 13px;
  color: #141413;
  font-family: var(--font-mono);
  font-size: 11px;
  font-weight: 700;
  letter-spacing: .18em;
}
.auth-brand h1 {
  margin: 0;
  color: #141413;
  background: none;
  -webkit-text-fill-color: currentColor;
  font-family: var(--font-display);
  font-size: clamp(64px, 8.5vw, 136px);
  font-weight: 800;
  line-height: .88;
  letter-spacing: -.055em;
  text-transform: uppercase;
  animation: none;
}
.auth-brand h1::after {
  content: "PLAY DESK / 06 MODES";
  display: block;
  margin-top: 19px;
  font-family: var(--font-mono);
  font-size: 11px;
  font-weight: 600;
  line-height: 1.4;
  letter-spacing: .16em;
}
.auth-brand .slogan {
  grid-column: 1;
  grid-row: 2;
  align-self: start;
  max-width: 32ch;
  margin: 40px 0 24px;
  color: #141413;
  font-size: clamp(17px, 1.5vw, 22px);
  line-height: 1.75;
}
.auth-mascot {
  grid-column: 2;
  grid-row: 2 / 4;
  align-self: center;
  justify-self: center;
  width: min(320px, 100%);
  max-height: 390px;
  margin: 20px 0 0;
  object-fit: contain;
  filter: none;
  animation: none;
}
.auth-orbits {
  grid-column: 1;
  grid-row: 3;
  align-self: end;
  display: flex;
  justify-content: flex-start;
  flex-wrap: wrap;
  gap: 8px;
  max-width: none;
  margin: 12px 0 0;
}
.orbit-chip {
  padding: 7px 11px;
  color: #141413;
  background: #98b8fe;
  border: 1px solid #141413;
  border-radius: 0;
  box-shadow: none;
  font-family: var(--font-mono);
  font-size: 11px;
  animation: none;
}
.orbit-chip:nth-child(even) { background: #fb44ee; }
.orbit-chip::before { display: none; }
.sticker-mosaic {
  grid-column: 1 / -1;
  grid-row: 4;
  display: grid;
  grid-template-columns: repeat(8, minmax(0, 1fr));
  margin-top: 32px;
  border-top: 1px solid #141413;
  border-left: 1px solid #141413;
}
.sticker-mosaic img {
  display: block;
  width: 100%;
  height: 82px;
  padding: 5px;
  object-fit: contain;
  background: rgba(255,255,255,.72);
  border-right: 1px solid #141413;
  border-bottom: 1px solid #141413;
  transition: background-color .2s ease;
}
.sticker-mosaic img:hover { background: #98b8fe; }
.auth-card {
  align-self: center;
  width: auto;
  margin: clamp(20px, 3vw, 48px);
  padding: 0;
  display: block;
  overflow: hidden;
  color: #141413;
  background: rgba(255,255,255,.95);
  border: 1px solid #141413;
  border-radius: 0;
  box-shadow: 10px 10px 0 rgba(152,184,254,.72);
}
.auth-top { margin: 0; padding: 25px 25px 0; }
.auth-welcome { color: #141413; font-size: 21px; }
.auth-subtitle { color: #555552; }
.auth-cloud { display: none; }
.auth-tabs {
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  gap: 0;
  margin: 24px 0 0;
  padding: 0;
  background: #f5f5f5;
  border-top: 1px solid #141413;
  border-bottom: 1px solid #141413;
  border-radius: 0;
}
.auth-tab {
  min-width: 0;
  min-height: 48px;
  padding: 8px 4px;
  color: #141413;
  background: transparent;
  border: 0;
  border-right: 1px solid #d3d3d3;
  border-radius: 0;
  font-size: 12px;
  white-space: normal;
}
.auth-tab:last-child { border-right: 0; }
.auth-tab:hover { color: #141413; background: #98b8fe; }
.auth-tab.active { color: #ffffff; background: #141413; box-shadow: none; }
.auth-pane { min-width: 0; padding: 24px 25px 27px; }
.form-msg { color: #9c1958; }
.form-msg.ok { color: #286a58; }
.ts-demo { color: #141413; background: #f5f5f5; border: 1px dashed #141413; border-radius: 0; }
#boot-skeleton { color: #141413; background: #f5f5f5; }
.skel-mascot { object-fit: contain; }

/* Console: sticky outlined header and dense editorial work grid. */
.topbar {
  position: sticky;
  inset: 0 0 auto;
  z-index: 50;
  width: 100%;
  max-width: none;
  min-height: 72px;
  margin: 0;
  padding: 10px 20px;
  display: flex;
  flex-direction: row;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 10px 18px;
  background: rgba(245,245,245,.95);
  border: 0;
  border-bottom: 1px solid #141413;
  border-radius: 0;
  box-shadow: none;
}
.topbar-row, .topbar-row:first-child {
  width: auto;
  display: flex;
  flex: 1;
  flex-direction: row;
  align-items: center;
  flex-wrap: wrap;
  gap: 9px;
}
.topbar-row2 {
  position: static;
  display: flex;
  flex: 0 0 auto;
  flex-direction: row;
  align-items: center;
  gap: 8px;
  margin: 0;
}
.topbar .brand { justify-content: flex-start; margin: 0 8px 0 0; text-align: left; }
.topbar .brand > span { display: inline-flex; flex-direction: row; align-items: baseline; gap: 6px; }
.topbar .brand > span::after { display: none; }
.brand, .brand b {
  color: #141413;
  background: none;
  -webkit-text-fill-color: currentColor;
  font-family: var(--font-display);
  letter-spacing: .01em;
}
.brand-logo {
  width: 46px;
  height: 46px;
  margin: 0;
  padding: 3px;
  object-fit: contain;
  background: #ffffff;
  border: 1px solid #141413;
  border-radius: 0;
}
.topbar::after {
  content: "Melodychichi / LICENSED DESK";
  display: block;
  order: 2;
  margin: 0;
  color: #555552;
  font-family: var(--font-mono);
  font-size: 9px;
  letter-spacing: .12em;
}
.topbar .token-chip {
  min-height: 40px;
  padding: 7px 12px;
  display: inline-flex;
  flex-direction: row;
  gap: 7px;
  color: #141413;
  background: #98b8fe;
  border: 1px solid #141413;
  border-radius: 0;
  text-align: left;
}
.topbar .token-chip b { display: inline; color: #141413; font-family: var(--font-mono); font-size: inherit; }
.topbar .user-email { max-width: 210px; color: #141413; background: #ffffff; border: 1px solid #8b8b88; border-radius: 0; }
.topbar-row #btn-refresh-balance { width: auto; margin: 0; }
.topbar-row .spacer { display: none; }
.topbar-row2 .theme-anchor, .topbar-row2 .theme-anchor .btn, .topbar-row2 .btn { width: auto; }
.topbar .more-menu { top: calc(100% + 8px); bottom: auto; }

.console-wrap {
  width: min(1460px, 100%);
  max-width: none;
  margin: 0 auto;
  padding: 24px 24px 56px;
  display: grid;
  grid-template-columns: minmax(0, 1fr) 320px;
  grid-template-areas:
    "notice notice"
    "desk desk"
    "stats stats"
    "accounts add"
    "spark add";
  gap: 20px;
}
#notice-stack { grid-area: notice; gap: 10px; }
.console-hero {
  grid-area: desk;
  min-height: 190px;
  padding: 32px 300px 32px 32px;
  display: flex;
  align-items: center;
  overflow: hidden;
  color: #141413;
  background: rgba(255,255,255,.86);
  border: 1px solid #141413;
  border-radius: 0;
  box-shadow: none;
}
.console-hero h2 {
  margin: 0 0 10px;
  color: #141413;
  font-family: var(--font-display);
  font-size: clamp(30px, 4.2vw, 58px);
  line-height: 1.12;
  letter-spacing: -.035em;
}
.console-hero h2 span { color: #c125b7; }
.console-hero p { margin: 0; color: #141413; font-size: 16px; }
.console-hero img { width: 245px; right: 28px; bottom: -3px; filter: none; }
.hero-note {
  margin-top: 18px;
  padding: 5px 10px;
  color: #141413;
  background: #98b8fe;
  border: 1px solid #141413;
  border-radius: 0;
  font-family: var(--font-mono);
  font-size: 11px;
}
.stat-grid {
  grid-area: stats;
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 0;
  border-top: 1px solid #141413;
  border-left: 1px solid #141413;
}
.stat-card, .stat-card:nth-child(1), .stat-card:nth-child(2), .stat-card:nth-child(3), .stat-card:nth-child(4) {
  min-height: 122px;
  padding: 19px 21px;
  background: rgba(255,255,255,.9);
  border: 0;
  border-right: 1px solid #141413;
  border-bottom: 1px solid #141413;
  border-radius: 0;
  box-shadow: none;
}
.stat-card:nth-child(even) { background: rgba(245,245,245,.92); }
.stat-card:hover { box-shadow: none; }
.stat-k { color: #555552; font-size: 12px; font-weight: 650; }
.stat-v, .stat-card .stat-v { margin-top: 8px; color: #141413; font-family: var(--font-mono); font-size: 30px; }
.stat-io { color: #555552; }
.tok-spark { grid-area: spark; margin: 0; background: #ffffff; border: 1px solid #141413; border-radius: 0; }
.acc-sec { grid-area: accounts; min-width: 0; }
#add-sec { grid-area: add; margin: 0; }
.card {
  padding: 0;
  background: rgba(255,255,255,.92);
  border: 1px solid #141413;
  border-radius: 0;
}
.acc-head {
  display: grid;
  grid-template-columns: 1fr;
  gap: 15px;
  margin: 0;
  padding: 20px;
  border-bottom: 1px solid #141413;
}
.acc-title, #add-sec .row > b { color: #141413; font-size: 20px; }
.mode-tabs {
  display: grid;
  grid-template-columns: repeat(6, minmax(0, 1fr));
  gap: 0;
  padding: 0;
  background: #ffffff;
  border: 1px solid #141413;
  border-radius: 0;
}
.mode-tab {
  min-width: 0;
  min-height: 66px;
  padding: 8px 6px;
  justify-content: center;
  color: #141413;
  background: #ffffff;
  border: 0;
  border-right: 1px solid #d3d3d3;
  border-radius: 0;
  font-size: 12px;
}
.mode-tab:last-child { border-right: 0; }
.mode-tab:hover { color: #141413; background: #98b8fe; transform: none; }
.mode-tab.active { color: #ffffff; background: #141413; box-shadow: none; }
.mode-tab.active .beta-badge { color: #141413; background: #fb44ee; }
.mode-icon { width: 30px; height: 30px; object-fit: contain; border-radius: 0; }
.beta-badge { color: #141413; background: #fb44ee; border-radius: 0; }
.ops-row {
  display: grid;
  grid-template-columns: repeat(6, minmax(0, 1fr));
  gap: 8px;
  margin: 0;
  padding: 18px 20px 0;
}
.ops-row .btn { min-width: 0; padding-inline: 9px; }
.ops-row .spacer { display: none; }
#fish-ops, #mode-ops { display: contents; }
.sel-line { margin: 0; padding: 10px 20px 15px; color: #555552; }
#resume-bar { margin: 0 20px 16px; }
.resume-inner { border: 1px solid #141413; border-left: 1px solid #141413; border-radius: 0; }
.acc-table-wrap { margin: 0; overflow-x: auto; }
.acc-table { min-width: 760px; color: #141413; font-size: 13px; }
.acc-table th {
  padding: 10px;
  color: #141413;
  background: #f5f5f5;
  border-top: 1px solid #141413;
  border-bottom: 1px solid #141413;
  border-radius: 0;
  font-family: var(--font-mono);
  font-size: 11px;
}
.acc-table td { border-bottom-color: #d3d3d3; }
.acc-row:hover, .acc-row.open { background: #f5f5f5; }
.badge { border-radius: 0; }
.badge-blue { color: #141413; background: #98b8fe; border-color: #141413; }
.badge-green { color: #286a58; }
#add-sec { padding: 22px; background: rgba(255,255,255,.92); border: 1px solid #141413; }
#add-sec .add-form { grid-template-columns: 1fr; gap: 10px; }
.empty-art { width: 145px; filter: none; }
.empty-box { color: #555552; }
.back-top { border-radius: 0; }

/* Dialogs and compact receipts keep the same outlined editorial language. */
.modal {
  color: #141413;
  background: #ffffff;
  border: 1px solid #141413;
  border-radius: 0;
  box-shadow: 10px 10px 0 rgba(152,184,254,.72);
}
.modal-mask { background: rgba(20,20,19,.42); backdrop-filter: blur(3px); }
.modal-title, .modal-body { color: #141413; }
.modal-head { padding-top: 20px; }
.modal .btn, .modal .seg-btn, .modal .step-btn, .modal .ws-tg { min-height: 44px; }
.theme-menu, .row-menu, .more-menu, .fx-menu { border: 1px solid #141413; border-radius: 0; box-shadow: 5px 5px 0 rgba(152,184,254,.62); }
.theme-item, .row-menu-item { border-radius: 0; }
.theme-item:hover, .row-menu-item:hover { color: #141413; background: #98b8fe; }
.toast { color: #141413; background: #ffffff; border: 1px solid #141413; border-radius: 0; box-shadow: 5px 5px 0 rgba(152,184,254,.65); }
.seg, .mode-chip { border-radius: 0; }
.seg-btn.active, .mode-chip.active { color: #ffffff; background: #141413; box-shadow: none; }
.amount-link { color: #141413; text-decoration-color: #fb44ee; }
.receipt-entry { color: #141413; background: #fb44ee; border: 1px solid #141413; border-radius: 0; box-shadow: none; }
.receipt-entry:hover { color: #ffffff; background: #141413; }
.receipt-arrow { color: currentColor; }
.receipt-choice, .stats-record, .aoff-item, .map-pick, .entry-opt { border-radius: 0; }
.wan-hint { color: #141413; background: #98b8fe; border-radius: 0; }

/* License gate */
.license-brand { color: #141413; font-family: var(--font-display); }
.license-brand img { padding: 3px; object-fit: contain; background: #ffffff; border: 1px solid #141413; }
.license-card {
  overflow: hidden;
  background: rgba(255,255,255,.96);
  border: 1px solid #141413;
  border-radius: 0;
  box-shadow: 10px 10px 0 rgba(152,184,254,.72);
}
.license-content { padding: 40px 36px 34px; }
.license-kicker { color: #141413; font-family: var(--font-mono); }
.license-content h1 { color: #141413; font-family: var(--font-display); letter-spacing: -.025em; }
.license-intro, .license-hint, .license-label { color: #141413; }
.license-art { background: #98b8fe; border-left: 1px solid #141413; }
.license-art::before, .license-art::after { display: none; }
.license-art p { color: #141413; font-family: var(--font-mono); }
.license-message { color: #141413; }

@media (min-width: 1101px) {
  .acc-head { grid-template-columns: 1fr; }
  .ops-row { grid-template-columns: repeat(6, minmax(0, 1fr)); }
}

@media (max-width: 1100px) {
  .auth-wrap { grid-template-columns: minmax(0, 1fr) minmax(370px, .8fr); }
  .auth-brand { padding: 32px; }
  .auth-brand h1 { font-size: clamp(60px, 8vw, 94px); }
  .sticker-mosaic { grid-template-columns: repeat(4, minmax(0, 1fr)); }
  .topbar { position: sticky; width: 100%; margin: 0; padding: 10px 14px; }
  .topbar::after { display: none; }
  .console-wrap {
    padding: 18px 16px 44px;
    grid-template-columns: minmax(0, 1fr);
    grid-template-areas: "notice" "desk" "stats" "accounts" "spark" "add";
  }
  #add-sec .add-form { grid-template-columns: 1fr 1fr; }
}

@media (max-width: 900px) {
  .auth-wrap { grid-template-columns: minmax(0, 1fr); }
  .auth-brand {
    min-height: auto;
    padding: 28px 24px;
    grid-template-columns: minmax(0, 1fr) 170px;
    border-right: 0;
    border-bottom: 1px solid #141413;
  }
  .auth-brand h1 { font-size: clamp(58px, 12vw, 90px); }
  .auth-brand .slogan { margin-top: 28px; }
  .auth-mascot { position: static; width: 165px; max-height: 230px; }
  .sticker-mosaic { margin-top: 26px; }
  .sticker-mosaic img { height: 72px; }
  .auth-card { margin: 22px; }
  .console-hero { min-height: 155px; padding: 24px 180px 24px 24px; }
  .console-hero img { width: 170px; right: 12px; }
  .stat-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .acc-head { display: flex; padding: 16px; }
  .mode-tabs { display: none; }
  .mode-select { display: inline-flex; }
  .ops-row { grid-template-columns: repeat(3, minmax(0, 1fr)); padding: 14px 14px 0; }
  .sel-line { padding-inline: 14px; }
  .card { padding: 0; }
  #add-sec { padding: 18px; }
  .license-art { border-left: 0; border-bottom: 1px solid #141413; }
}

@media (max-width: 520px) {
  .auth-brand { display: block; padding: 22px 16px; }
  .brand-logo-lg { width: 58px; height: 58px; }
  .auth-brand h1 { font-size: clamp(46px, 15vw, 66px); }
  .auth-brand .slogan { max-width: 34ch; margin: 24px 0 18px; font-size: 16px; }
  .auth-mascot { display: none; }
  .auth-orbits { max-width: none; }
  .sticker-mosaic { grid-template-columns: repeat(4, minmax(0, 1fr)); margin-top: 22px; }
  .sticker-mosaic img { height: 66px; }
  .auth-card { margin: 14px 12px 22px; box-shadow: 6px 6px 0 rgba(152,184,254,.72); }
  .auth-top { padding: 20px 18px 0; }
  .auth-tabs { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .auth-tab { min-height: 46px; border-bottom: 1px solid #d3d3d3; }
  .auth-pane { padding: 20px 18px; }
  .topbar { padding: 8px 10px; }
  .topbar-row { gap: 7px; }
  .topbar .brand > span { font-size: 13px; }
  .brand-logo { width: 38px; height: 38px; }
  .topbar .token-chip { flex: 1 1 150px; justify-content: center; }
  .topbar-row2 { display: grid; grid-template-columns: 1fr 1fr; width: 100%; }
  .topbar-row2 .theme-anchor, .topbar-row2 .theme-anchor .btn, .topbar-row2 .btn { width: 100%; }
  .console-wrap { padding: 12px 10px 38px; gap: 12px; }
  .console-hero { min-height: 130px; padding: 18px 110px 18px 16px; }
  .console-hero h2 { font-size: 25px; }
  .console-hero p { font-size: 13px; line-height: 1.55; }
  .console-hero img { width: 108px; right: 2px; }
  .hero-note { margin-top: 10px; font-size: 10px; }
  .stat-card { min-height: 100px; padding: 13px; }
  .stat-card .stat-v { font-size: 23px; }
  .ops-row { gap: 7px; }
  .ops-row .btn { min-height: 44px; font-size: 12px; }
  #add-sec .add-form { grid-template-columns: 1fr; }
  .license-content { padding: 26px 20px; }
  .license-card { box-shadow: 6px 6px 0 rgba(152,184,254,.72); }
  .modal { box-shadow: 5px 5px 0 rgba(152,184,254,.72); }
}

@media (prefers-reduced-motion: reduce) {
  .auth-hero { display: none; }
  .sticker-mosaic img, .btn, .auth-tab, .mode-tab { transition: none; }
  .auth-mascot, .brand-logo-lg { animation: none; }
}

/* 2026-11 验收修订：统一粉蓝渐变、贴纸层级与真正的手机账号卡片。 */
:root {
  --bg: #ffffff;
  --card: rgba(255, 255, 255, .9);
  --border: rgba(28, 22, 22, .22);
  --text: #1c1616;
  --dim: #656066;
  --accent2: #b3c0fe;
  --sticker-pink: #deafd2;
  --bar: linear-gradient(115deg, #b3c0fe 0%, #deafd2 54%, #fb44ee 135%);
  --veil:
    radial-gradient(circle at 8% 8%, rgba(179, 192, 254, .28), transparent 28%),
    radial-gradient(circle at 92% 32%, rgba(222, 175, 210, .24), transparent 32%),
    linear-gradient(115deg, rgba(255,255,255,.9), rgba(255,255,255,.68) 52%, rgba(255,247,252,.86));
}
html, body { background: #ffffff; }
body { color: var(--text); }
body::before { background: var(--veil); }
.glass, .card {
  background: linear-gradient(135deg, rgba(255,255,255,.94), rgba(255,248,252,.86));
  border-color: #1c1616;
  border-radius: 20px;
}
.btn {
  border-color: #1c1616;
  border-radius: 12px;
  font-weight: 700;
}
.btn:hover:not(:disabled) { border-radius: 12px; }
.btn.primary {
  color: #1c1616;
  background: linear-gradient(115deg, #b3c0fe, #deafd2 58%, #fb44ee 145%);
  border-color: #1c1616;
}
.btn.primary:hover:not(:disabled) { color: #ffffff; background: #1c1616; }
.inp { border-radius: 12px; }

/* 登录页：标题、说明与贴纸各自有稳定的位置，不再互相挤压。 */
.brand-line { align-items: center; }
.auth-brand { background: linear-gradient(145deg, rgba(255,255,255,.44), rgba(179,192,254,.12) 52%, rgba(222,175,210,.16)); }
.auth-brand h1 { font-family: var(--font); line-height: .95; letter-spacing: -.06em; }
.auth-card { border-radius: 22px; box-shadow: 8px 8px 0 rgba(179,192,254,.55); }
.auth-tab.active { background: linear-gradient(115deg, #1c1616, #493747); }
.orbit-chip { border-radius: 999px; }
.orbit-chip:nth-child(odd) { background: #dce1ff; }
.orbit-chip:nth-child(even) { background: #f2d7e8; }
.sticker-mosaic { overflow: hidden; border: 1px solid #1c1616; border-radius: 18px; }
.sticker-mosaic img { background: rgba(255,255,255,.72); }
.sticker-mosaic img:nth-child(3n+2) { background: rgba(179,192,254,.25); }
.sticker-mosaic img:nth-child(3n) { background: rgba(222,175,210,.24); }

/* 顶栏：桌面保持一行；手机采用明确的网格区域。 */
.topbar {
  background: linear-gradient(110deg, rgba(255,255,255,.97), rgba(239,231,248,.95));
  border-bottom-color: #1c1616;
}
.topbar .token-chip {
  background: linear-gradient(115deg, #dce1ff, #f2d7e8);
  border-color: #1c1616;
  border-radius: 12px;
}
.brand-logo { border-radius: 12px; }
.topbar-row2 .btn { border-radius: 12px; }

/* 主视觉：文字和主插画是两列，贴纸只落在插画区域。 */
.console-hero {
  position: relative;
  min-height: 210px;
  padding: 32px;
  display: grid;
  grid-template-columns: minmax(0, 1fr) 230px;
  align-items: center;
  gap: 24px;
  overflow: hidden;
  background:
    radial-gradient(circle at 88% 12%, rgba(255,255,255,.74), transparent 28%),
    linear-gradient(120deg, rgba(255,255,255,.96), rgba(179,192,254,.52) 58%, rgba(222,175,210,.62));
  border: 1px solid #1c1616;
  border-radius: 24px;
}
.console-hero > div:first-child { position: relative; z-index: 2; min-width: 0; }
.console-hero h2 { font-family: var(--font); font-weight: 800; line-height: 1.2; letter-spacing: -.045em; }
.console-hero h2 span { color: #9c318c; }
.console-hero p { max-width: 34ch; line-height: 1.75; }
.console-hero > img[data-brand-asset] {
  position: relative;
  inset: auto;
  z-index: 1;
  justify-self: center;
  width: 220px;
  max-width: 100%;
  max-height: 205px;
  object-fit: contain;
}
.hero-note {
  display: inline-flex;
  margin-top: 18px;
  background: rgba(255,255,255,.7);
  border-color: #1c1616;
  border-radius: 999px;
}
.hero-stickers { position: absolute; inset: 0; z-index: 1; pointer-events: none; }
.hero-stickers img { position: absolute; object-fit: contain; }
.hero-sticker-heart { top: 13px; right: 184px; width: 50px; transform: rotate(-10deg); }
.hero-sticker-bow { right: 12px; bottom: 8px; width: 54px; transform: rotate(9deg); }

/* 数据区：同一基线、同一内边距，贴纸不占用数据空间。 */
.stat-grid {
  gap: 1px;
  overflow: hidden;
  background: #1c1616;
  border: 1px solid #1c1616;
  border-radius: 20px;
}
.stat-card, .stat-card:nth-child(1), .stat-card:nth-child(2), .stat-card:nth-child(3), .stat-card:nth-child(4) {
  position: relative;
  min-width: 0;
  min-height: 132px;
  padding: 20px;
  background: rgba(255,255,255,.96);
  border: 0;
  border-radius: 0;
}
.stat-card:nth-child(1) { background: linear-gradient(145deg, #ffffff, #eef0ff); }
.stat-card:nth-child(2) { background: linear-gradient(145deg, #ffffff, #f8eaf3); }
.stat-card:nth-child(3) { background: linear-gradient(145deg, #ffffff, #e9ecff); }
.stat-card:nth-child(4) { background: linear-gradient(145deg, #ffffff, #f5e3ef); }
.stat-k { padding-right: 42px; color: #656066; }
.stat-v, .stat-card .stat-v { line-height: 1.2; font-variant-numeric: tabular-nums; }
.stat-io { align-items: baseline; font-variant-numeric: tabular-nums; }
.stat-sticker { position: absolute; top: 11px; right: 12px; width: 38px; height: 38px; object-fit: contain; pointer-events: none; }
.tok-spark { border-radius: 18px; }

/* 账号与添加区使用同一套标题尺度。 */
.acc-sec { min-width: 0; border-radius: 20px; }
.acc-head {
  padding: 18px 20px;
  background: linear-gradient(110deg, rgba(179,192,254,.2), rgba(222,175,210,.18));
  border-bottom-color: #1c1616;
  border-radius: 20px 20px 0 0;
}
.acc-heading { display: flex; align-items: center; gap: 10px; min-width: 0; }
.acc-title { line-height: 1.3; }
.section-sticker { width: 42px; height: 42px; flex: none; object-fit: contain; }
.mode-select { white-space: nowrap; }
.ops-row { align-items: stretch; }
.ops-row .btn { min-height: 46px; }
.sel-line {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 8px 16px;
  line-height: 1.55;
}
.sel-hint { min-width: 0; overflow-wrap: anywhere; }
#add-sec { position: relative; border-radius: 20px; background: linear-gradient(140deg, rgba(255,255,255,.94), rgba(222,175,210,.18)); }
#add-sec .row:first-child { align-items: center; }
.add-sticker { width: 48px; height: 48px; margin-left: auto; object-fit: contain; }
.modal { border-radius: 20px; box-shadow: 7px 7px 0 rgba(179,192,254,.55); }
.license-card { border-radius: 22px; }
.license-art { background: linear-gradient(145deg, #dce1ff, #f2d7e8); }

@media (max-width: 900px) {
  .console-hero { grid-template-columns: minmax(0, 1fr) 165px; min-height: 180px; padding: 25px; }
  .console-hero > img[data-brand-asset] { width: 165px; }
  .hero-sticker-heart { right: 128px; }
  .stat-card, .stat-card:nth-child(1), .stat-card:nth-child(2), .stat-card:nth-child(3), .stat-card:nth-child(4) { min-height: 116px; padding: 17px; }
  .acc-head { display: flex; flex-direction: row; align-items: center; justify-content: space-between; flex-wrap: wrap; }
  .acc-table { width: 100%; min-width: 0; }
  .sel-line { margin: 0 14px 12px; padding: 12px 0; }
}

@media (max-width: 600px) {
  .topbar-row:first-child {
    width: 100%;
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto auto;
    grid-template-areas: "brand token token" "email redeem refresh";
    gap: 8px;
  }
  .topbar .brand { grid-area: brand; min-width: 0; margin: 0; }
  .topbar .user-email { grid-area: email; min-width: 0; max-width: 100%; width: 100%; box-sizing: border-box; }
  .topbar .token-chip { grid-area: token; width: 100%; min-width: 0; justify-content: center; box-sizing: border-box; }
  #btn-redeem { grid-area: redeem; width: 100%; }
  #btn-refresh-balance { grid-area: refresh; width: 100%; }
  .topbar-row2 { width: 100%; }
}

@media (max-width: 520px) {
  .auth-brand { border-radius: 0 0 22px 22px; }
  .auth-card { border-radius: 18px; }
  .sticker-mosaic { border-radius: 14px; }
  .console-wrap { padding-inline: 10px; }
  .console-hero {
    min-height: 178px;
    padding: 22px 17px;
    grid-template-columns: minmax(0, 1fr) 100px;
    gap: 8px;
    border-radius: 20px;
  }
  .console-hero h2 { margin-bottom: 9px; font-size: 26px; line-height: 1.24; }
  .console-hero p { font-size: 13px; line-height: 1.65; }
  .console-hero > img[data-brand-asset] { width: 104px; max-height: 130px; align-self: end; }
  .hero-note { max-width: 100%; margin-top: 12px; padding: 5px 8px; font-size: 9px; line-height: 1.45; }
  .hero-sticker-heart { display: none; }
  .hero-sticker-bow { right: 3px; bottom: 3px; width: 38px; }
  .stat-card, .stat-card:nth-child(1), .stat-card:nth-child(2), .stat-card:nth-child(3), .stat-card:nth-child(4) { min-height: 116px; padding: 15px 13px; }
  .stat-card .stat-v { font-size: 25px; }
  .stat-sticker { top: 8px; right: 8px; width: 30px; height: 30px; }
  .stat-k { padding-right: 31px; }
  .stat-io { gap: 5px; font-size: 10px; }
  .acc-head { padding: 15px 14px; gap: 12px; }
  .acc-title { font-size: 19px; }
  .section-sticker { width: 36px; height: 36px; }
  .ops-row { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px; padding: 14px 14px 0; }
  .ops-row .btn { width: 100%; min-height: 46px; font-size: 13px; }
  .sel-line { flex-direction: column; gap: 5px; font-size: 12px; }

  /* 关键修复：覆盖桌面 min-width，账号、勾选框和⋯按钮全部留在屏内。 */
  .acc-table-wrap { width: 100%; min-width: 0; overflow: visible; }
  .acc-table, .acc-table tbody, #acc-tbody { display: block; width: 100% !important; min-width: 0 !important; }
  .acc-table { table-layout: auto !important; font-size: 13px; }
  .acc-table thead { display: none; }
  #acc-tbody { display: grid; gap: 12px; padding: 12px; box-sizing: border-box; }
  .acc-table .acc-row {
    display: grid;
    width: 100%;
    min-width: 0;
    box-sizing: border-box;
    grid-template-columns: 32px minmax(0, 1fr) auto;
    grid-template-areas:
      "check name menu"
      ". state amount"
      ". map map"
      ". ready ready";
    align-items: center;
    gap: 11px 8px;
    margin: 0;
    padding: 14px 12px;
    background: rgba(255,255,255,.9);
    border: 1px solid rgba(28,22,22,.2);
    border-radius: 16px;
  }
  .acc-table .acc-row.open { background: linear-gradient(135deg, #ffffff, #f4efff); }
  .acc-table .acc-row td {
    display: block;
    width: auto;
    min-width: 0;
    max-width: 100%;
    padding: 0;
    overflow: visible;
    border: 0;
    white-space: normal;
    text-overflow: clip;
  }
  .acc-table .col-check { grid-area: check; display: flex !important; align-items: center; justify-content: center; min-height: 44px; }
  .acc-table td.acc-name { grid-area: name; font-size: 15px; line-height: 1.45; overflow-wrap: anywhere; word-break: break-word; }
  .acc-table .col-state { grid-area: state; width: auto; }
  .acc-table .col-amount { grid-area: amount; width: auto; text-align: right; }
  .acc-table .col-map { grid-area: map; width: auto; min-width: 0; text-align: left; line-height: 1.55; }
  .acc-table .col-ready { grid-area: ready; width: auto; text-align: left; }
  .acc-table .col-menu { grid-area: menu; width: auto; display: flex; gap: 6px; align-items: center; justify-content: flex-end; }
  .acc-table .col-menu .receipt-open-btn { min-height: 32px; padding: 2px 10px; }
  .acc-table .col-menu .row-menu-btn { width: 44px !important; height: 44px !important; border-radius: 12px !important; }
  .acc-table .sess-check { width: 20px; height: 20px; margin: 0; }
  .acc-table .col-amount::before, .acc-table .col-map::before { margin-bottom: 4px; font-size: 11px; }
  .acc-table .col-ready::before { font-size: 11px; }
  .acc-table .badge { font-size: 11px; }
  .acc-table .acc-row > .col-map > .sub-inner,
  .acc-table .sub-inner,
  .acc-table .sess-chips { width: 100%; min-width: 0; max-width: 100%; box-sizing: border-box; }
  .acc-table .sess-chips { display: flex; flex-wrap: wrap; gap: 6px; }
  .acc-table .sess-chips .chip { max-width: 100%; height: auto; white-space: normal; overflow-wrap: anywhere; word-break: break-word; }
  .receipt-entry { max-width: 100%; }
  .add-sticker { width: 40px; height: 40px; }
  .modal-wrap { box-sizing: border-box; }
  .modal { width: 100%; max-width: 100%; box-sizing: border-box; border-radius: 18px; }
}

@media (max-width: 360px) {
  .topbar .brand > span { font-size: 12px; }
  .brand-logo { width: 34px; height: 34px; }
  .console-hero { grid-template-columns: minmax(0, 1fr) 82px; padding-inline: 14px; }
  .console-hero h2 { font-size: 23px; }
  .console-hero > img[data-brand-asset] { width: 86px; }
  .stat-card .stat-v { font-size: 22px; }
  .acc-table .acc-row {
    grid-template-areas: "check name menu" ". state state" ". amount amount" ". map map" ". ready ready";
  }
  .acc-table .col-amount { text-align: left; }
}

/* 素材贴纸的呼吸感：仅 4px 缓慢漂浮，错开节奏；报警与状态标识不参与。 */
@keyframes melody-sticker-float {
  0%, 100% { transform: translate3d(0, 0, 0) rotate(-.5deg); }
  50% { transform: translate3d(0, -4px, 0) rotate(.5deg); }
}
.sticker-mosaic img,
.stat-sticker,
.section-sticker,
.add-sticker,
.auth-mascot,
.console-hero > img[data-brand-asset],
.license-art img,
.empty-art {
  transform-origin: 50% 60%;
  animation: melody-sticker-float 5.8s ease-in-out infinite;
  will-change: transform;
}
.sticker-mosaic img:nth-child(2n),
.stat-card:nth-child(2) .stat-sticker { animation-delay: -1.7s; }
.sticker-mosaic img:nth-child(3n),
.stat-card:nth-child(3) .stat-sticker { animation-delay: -3.1s; }
.sticker-mosaic img:nth-child(5n),
.stat-card:nth-child(4) .stat-sticker { animation-delay: -4.4s; }
.section-sticker, .add-sticker { animation-delay: -2.2s; }
.console-hero > img[data-brand-asset], .auth-mascot { animation-duration: 6.6s; }

html[data-fx="off"] .sticker-mosaic img,
html[data-fx="off"] .stat-sticker,
html[data-fx="off"] .section-sticker,
html[data-fx="off"] .add-sticker,
html[data-fx="off"] .auth-mascot,
html[data-fx="off"] .console-hero > img[data-brand-asset],
html[data-fx="off"] .license-art img,
html[data-fx="off"] .empty-art {
  animation: none !important;
  will-change: auto;
}
@media (prefers-reduced-motion: reduce) {
  .sticker-mosaic img,
  .stat-sticker,
  .section-sticker,
  .add-sticker,
  .auth-mascot,
  .console-hero > img[data-brand-asset],
  .license-art img,
  .empty-art {
    animation: none !important;
    will-change: auto;
  }
}
