/* Cute — 贴纸通行证与非对称操作台。只覆盖表现层，保留全部业务 DOM 钩子。 */
:root {
  color-scheme: dark;
  --font: "PingFang SC", "Microsoft YaHei", "Noto Sans CJK SC", "Source Han Sans SC", "Hiragino Sans GB", system-ui, sans-serif;
  --navy: #161b32;
  --plum: #5d2260;
  --violet: #974292;
  --coral: #f2979b;
  --butter: #ffed9b;
  --paper: #fff4f6;
  --bg: var(--navy);
  --card: rgba(32, 27, 57, .88);
  --card-strong: #2a2142;
  --border: rgba(242, 151, 155, .34);
  --text: #fff4f6;
  --dim: #d8c6d9;
  --accent: var(--coral);
  --accent2: var(--butter);
  --danger: #ff9b9f;
  --ok: #a8e6cf;
  --warn: var(--butter);
  --shadow: 7px 8px 0 rgba(10, 11, 27, .42);
  --glow: 5px 6px 0 rgba(151, 66, 146, .34);
  --radius: 22px;
  --bar: linear-gradient(90deg, var(--violet), var(--coral));
  --veil: linear-gradient(105deg, rgba(22,27,50,.78), rgba(22,27,50,.48) 52%, rgba(93,34,96,.60));
  --hero-op: .74;
}

html { background: var(--navy); scrollbar-color: var(--violet) var(--navy); }
body {
  min-width: 0;
  min-height: 100dvh;
  background: var(--navy);
  color: var(--text);
  font-family: var(--font);
  font-size: 16px;
  line-height: 1.6;
}
body::before, body::after { inset: 0; z-index: 1; animation: none; }
body::before { background: var(--veil); }
body::after { background: radial-gradient(circle at 90% 86%, rgba(242,151,155,.14), transparent 32%); }
::selection { color: var(--navy); background: var(--butter); }
::-webkit-scrollbar-thumb { background: var(--violet); }
button, a, input, summary { -webkit-tap-highlight-color: transparent; }
button:focus-visible, a:focus-visible, input:focus-visible, summary:focus-visible, [tabindex]:focus-visible {
  outline: 3px solid var(--butter);
  outline-offset: 3px;
}
.dim { color: var(--dim); }
.small { font-size: 12px; }
.hidden, .hidden-view, [data-brand-asset][hidden], [data-background-video][hidden] { display: none !important; }

.auth-hero {
  position: fixed;
  inset: 0;
  z-index: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  opacity: var(--hero-op);
  filter: saturate(.92) brightness(.82);
  pointer-events: none;
}
.background-wash { position: fixed; inset: 0; z-index: 1; pointer-events: none; background: rgba(22,27,50,.18); }
#view-auth, #view-console { position: relative; z-index: 2; animation: fadein .24s ease-out; }
#view-auth::before { display: none; }
.glass {
  background: var(--card);
  border: 2px solid var(--border);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  backdrop-filter: blur(15px) saturate(1.06);
  -webkit-backdrop-filter: blur(15px) saturate(1.06);
}
.card { padding: 24px; }
.section-overline, .hero-overline, .auth-kicker, .license-kicker {
  display: block;
  color: var(--butter);
  font-size: 11px;
  font-weight: 800;
  letter-spacing: .17em;
  line-height: 1.5;
}

/* 控件：奶黄主操作、深色字、清晰按压反馈。 */
.btn {
  min-height: 44px;
  padding: 9px 17px;
  border: 2px solid rgba(242,151,155,.32);
  border-radius: 14px;
  background: #342646;
  color: var(--text);
  font-weight: 700;
  box-shadow: 0 3px 0 #11152a;
  transition: transform .16s ease-out, background-color .16s ease-out, border-color .16s ease-out, box-shadow .16s ease-out;
}
.btn:hover:not(:disabled) { background: #453052; border-color: var(--coral); box-shadow: 0 5px 0 #11152a; transform: translateY(-2px); }
.btn:active:not(:disabled) { transform: translateY(2px); box-shadow: 0 1px 0 #11152a; }
.btn.primary, .mode-tab.active, .seg-btn.active, .mode-chip.active {
  color: var(--navy);
  background: var(--butter);
  border: 2px solid var(--butter);
  box-shadow: 0 4px 0 var(--violet);
  font-weight: 800;
}
.btn.primary:hover:not(:disabled), .mode-tab.active:hover { color: var(--navy); background: #fff3b8; border-color: #fff3b8; }
.btn.ghost { background: transparent; box-shadow: none; }
.btn.small { min-height: 44px; padding: 7px 13px; font-size: 13px; }
.btn.tiny { min-height: 40px; }
.btn.danger { color: #ffb6ba; border-color: rgba(255,155,159,.64); background: rgba(93,34,60,.44); }
.btn:disabled { opacity: .5; }
.icon-btn { min-width: 44px; min-height: 44px; color: var(--text); border-radius: 12px; }
.icon-btn:hover { color: var(--butter); background: #3b2a4d; }
.inp {
  min-height: 48px;
  padding: 11px 14px;
  border: 2px solid rgba(216,198,217,.28);
  border-radius: 13px;
  background: rgba(17,19,40,.76);
  color: var(--text);
  font-size: 16px;
  transition: border-color .16s ease-out, box-shadow .16s ease-out, background-color .16s ease-out;
}
.inp::placeholder { color: #b7a8bd; }
.inp:hover { border-color: rgba(242,151,155,.55); }
.inp:focus { background: #171a31; border-color: var(--coral); box-shadow: 0 0 0 3px rgba(242,151,155,.17); }
.fld { margin-bottom: 14px; }
.fld-label { color: #eadde8; font-weight: 700; }
.chk input, .sess-check, .pick-item input, .entry-opt input { accent-color: var(--coral); }
.fs { border-color: rgba(242,151,155,.30); background: rgba(18,20,40,.28); }
.fs legend, .sub-t { color: var(--dim); }
.grid2, .grid3 { gap: 0 14px; }
.form-msg { color: #ffb6ba; }
.form-msg.ok { color: var(--ok); }
.verify-hint { border-color: var(--butter); color: var(--butter); background: rgba(255,237,155,.07); }
.ts-demo, .ts-error, .ts-loading {
  padding: 12px 14px;
  border: 1px dashed rgba(255,237,155,.54);
  border-radius: 13px;
  background: rgba(255,237,155,.07);
  color: #f4e8d0;
  font-size: 13px;
  line-height: 1.55;
}

/* 登录：左侧贴纸海报，右侧水平五页签入口。 */
.auth-wrap {
  width: min(1380px, 100%);
  max-width: none;
  min-height: 100dvh;
  margin: 0 auto;
  padding: clamp(32px, 5vw, 72px);
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(420px, 500px);
  align-items: center;
  gap: clamp(42px, 7vw, 108px);
}
.auth-brand { position: relative; min-width: 0; padding: 0; text-align: left; }
.brand-line { justify-content: flex-start; gap: 20px; }
.brand-logo-lg {
  width: 92px;
  height: 92px;
  padding: 8px;
  border: 2px solid var(--coral);
  border-radius: 27px;
  background: var(--butter);
  object-fit: contain;
  box-shadow: 7px 7px 0 var(--plum);
  transform: rotate(-5deg);
  animation: none;
}
.auth-brand h1 {
  margin: 0;
  color: var(--paper);
  background: none;
  -webkit-text-fill-color: currentColor;
  font-size: clamp(68px, 8vw, 112px);
  font-weight: 850;
  line-height: .98;
  letter-spacing: -.055em;
  animation: none;
}
.auth-brand .slogan { max-width: 490px; margin: 26px 0 0; color: #eadde8; font-size: 17px; line-height: 1.85; }
.auth-photo {
  position: relative;
  width: min(470px, 88%);
  min-height: 250px;
  margin-top: 26px;
  border-bottom: 2px dashed rgba(242,151,155,.48);
}
.auth-mascot {
  position: static;
  display: block;
  width: min(285px, 68%);
  max-height: 280px;
  margin: 0 0 -2px 36px;
  object-fit: contain;
  filter: drop-shadow(12px 14px 0 rgba(93,34,96,.58));
  transform: rotate(-3deg);
  animation: none;
}
.photo-caption {
  position: absolute;
  right: 16px;
  bottom: 38px;
  padding: 7px 14px;
  border: 2px solid var(--navy);
  border-radius: 8px;
  color: var(--navy);
  background: var(--coral);
  box-shadow: 4px 4px 0 var(--butter);
  font-size: 13px;
  font-weight: 800;
  transform: rotate(5deg);
}
.auth-spark { position: absolute; top: 18px; right: 40px; width: 58px; transform: rotate(10deg); }
.auth-orbits { max-width: 520px; margin-top: 24px; justify-content: flex-start; gap: 9px; }
.orbit-chip {
  padding: 7px 13px;
  border: 1px solid rgba(255,237,155,.42);
  border-radius: 10px;
  color: #f3e7ef;
  background: rgba(22,27,50,.58);
  font-size: 12px;
  animation: none;
}
.orbit-chip::before { display: none; }
.orbit-chip:nth-child(2n) { transform: rotate(1.5deg); }
.auth-card {
  position: relative;
  min-width: 0;
  padding: 28px;
  border-color: rgba(255,237,155,.38);
  border-radius: 28px;
  background: rgba(33,27,56,.92);
  box-shadow: 10px 12px 0 rgba(93,34,96,.64);
}
.auth-card::before {
  content: "ACCESS / 05";
  position: absolute;
  top: -15px;
  right: 25px;
  padding: 4px 12px;
  border: 2px solid var(--navy);
  border-radius: 7px;
  color: var(--navy);
  background: var(--coral);
  font-size: 10px;
  font-weight: 900;
  letter-spacing: .12em;
  transform: rotate(3deg);
}
.auth-top { margin-bottom: 20px; }
.auth-welcome { display: block; color: var(--paper); font-size: 23px; }
.auth-subtitle { display: block; margin-top: 4px; }
.auth-head-skull { width: 48px; height: 48px; object-fit: contain; transform: rotate(8deg); }
.auth-tabs {
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  gap: 5px;
  margin: 0 0 24px;
  padding: 5px;
  border: 0;
  border-radius: 14px;
  background: rgba(12,15,32,.58);
}
.auth-tab {
  min-width: 0;
  min-height: 44px;
  padding: 7px 4px;
  border: 0;
  border-radius: 10px;
  color: #d8c6d9;
  font-size: 12px;
  white-space: nowrap;
}
.auth-tab:hover { color: var(--paper); background: #3c2c4e; }
.auth-tab.active { color: var(--navy); background: var(--coral); box-shadow: none; font-weight: 800; }
.auth-go { width: 100%; margin-top: 6px; justify-content: space-between; padding-inline: 20px; }
.demo-enter { width: 100%; margin-top: 10px; justify-content: space-between; padding-inline: 20px; border-style: dashed; color: var(--butter); }
.demo-enter:hover:not(:disabled) { color: var(--navy); background: var(--coral); }
.auth-pane > .dim.small { line-height: 1.7; }

/* 顶部工作条：不固定、不侧栏，品牌与 Token 是第一层信息。 */
#view-console:not(.hidden-view) { display: block; }
.topbar {
  position: relative;
  inset: auto;
  z-index: 40;
  display: flex;
  width: min(1500px, calc(100% - 40px));
  max-width: none;
  min-height: 76px;
  margin: 20px auto 0;
  padding: 12px 16px;
  flex-direction: row;
  align-items: center;
  gap: 14px;
  border: 2px solid rgba(242,151,155,.34);
  border-radius: 20px;
  background: rgba(25,24,48,.90);
  box-shadow: 6px 7px 0 rgba(93,34,96,.45);
}
.topbar-row { display: flex; min-width: 0; flex: 1; align-items: center; gap: 10px; flex-wrap: wrap; }
.topbar-row2 { position: static; flex: 0 0 auto; justify-content: flex-end; flex-wrap: nowrap; }
.topbar .brand { display: inline-flex; align-items: center; gap: 10px; color: var(--paper); }
.topbar .brand > span { display: flex; flex-direction: column; align-items: flex-start; gap: 0; line-height: 1.15; }
.topbar .brand b { color: var(--paper); background: none; -webkit-text-fill-color: currentColor; font-size: 21px; }
.topbar .brand small { margin-top: 4px; color: var(--coral); font-size: 8px; font-weight: 900; letter-spacing: .19em; }
.brand-logo { width: 45px; height: 45px; padding: 3px; border: 2px solid var(--coral); border-radius: 13px; background: var(--butter); object-fit: contain; transform: rotate(-4deg); }
.user-email { max-width: 210px; border-color: rgba(216,198,217,.24); background: rgba(93,34,96,.35); color: #eadde8; }
.token-chip {
  position: relative;
  gap: 8px;
  min-height: 46px;
  padding: 7px 13px;
  border: 2px solid rgba(255,237,155,.45);
  border-radius: 13px;
  background: rgba(255,237,155,.09);
  color: #f4e8d0;
}
.token-chip b { color: var(--butter); font-size: 20px; }
.token-chip .peak-badge { color: var(--navy); background: var(--butter); }
.token-chip.low-bal, .token-chip.low-bal b { color: #ffb6ba; }
#btn-refresh-balance { margin: 0; }
#conn-state { color: #d8c6d9; }
.topbar-row .spacer { flex: 1; }
.topbar::after { display: none; }

/* 十二列非对称操作台：账号在右，走势图与钥匙串在左。 */
.console-wrap {
  width: min(1500px, 100%);
  max-width: none;
  margin: 0 auto;
  padding: 24px 20px 56px;
  display: grid;
  grid-template-columns: repeat(12, minmax(0, 1fr));
  grid-template-areas:
    "hero hero hero hero hero hero hero stats stats stats stats stats"
    "mode mode mode mode mode mode mode mode mode mode mode mode"
    "spark spark spark spark accounts accounts accounts accounts accounts accounts accounts accounts"
    "add add add add accounts accounts accounts accounts accounts accounts accounts accounts";
  align-items: start;
  gap: 20px;
}
.hero-stack { grid-area: hero; display: grid; gap: 14px; min-width: 0; }
.hero-stack > .console-hero { grid-area: auto; }
.console-hero {
  position: relative;
  min-height: 260px;
  padding: 32px 210px 30px 32px;
  overflow: hidden;
  display: block;
  border: 2px solid rgba(255,237,155,.42);
  border-radius: 26px;
  background: rgba(93,34,96,.72);
  box-shadow: 8px 9px 0 rgba(12,14,31,.48);
}
.console-hero::before {
  content: "CUTE PASS";
  position: absolute;
  right: -33px;
  top: 26px;
  width: 150px;
  padding: 4px 0;
  color: var(--navy);
  background: var(--butter);
  font-size: 10px;
  font-weight: 900;
  letter-spacing: .12em;
  text-align: center;
  transform: rotate(42deg);
}
.hero-copy { position: relative; z-index: 2; }
.console-hero h2 { margin: 12px 0 14px; color: var(--paper); font-size: clamp(36px, 4vw, 56px); line-height: 1.08; letter-spacing: -.04em; }
.console-hero h2 span { color: var(--butter); }
.console-hero p { max-width: 480px; margin: 0; color: #f0e1ec; font-size: 14px; line-height: 1.75; }
.hero-note { display: inline-flex; margin-top: 18px; padding: 5px 11px; border: 1px solid rgba(255,237,155,.46); border-radius: 8px; color: var(--butter); background: rgba(22,27,50,.26); font-size: 12px; }
.console-hero .hero-character { position: absolute; z-index: 1; right: 12px; bottom: -6px; width: 205px; max-height: 245px; object-fit: contain; filter: drop-shadow(9px 9px 0 rgba(22,27,50,.38)); transform: rotate(3deg); }
.console-hero .hero-star { position: absolute; right: 168px; top: 72px; width: 47px; transform: rotate(-12deg); }
.stat-grid { grid-area: stats; display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 14px; perspective: none; }
.stat-card { min-width: 0; min-height: 123px; padding: 18px; border-radius: 19px; background: rgba(32,27,57,.90); }
.stat-card:nth-child(1) { background: rgba(32,27,57,.94); }
.stat-card:nth-child(2) { background: rgba(93,34,96,.80); transform: rotate(1deg); }
.stat-card:nth-child(3) { background: rgba(70,39,76,.90); transform: rotate(-1deg); }
.stat-card:nth-child(4) { background: rgba(58,45,66,.92); }
.stat-card::before { display: none; }
.stat-k { color: #e5d5e2; font-size: 12px; font-weight: 700; }
.stat-v { margin-top: 7px; color: var(--butter); font-size: clamp(24px, 2.5vw, 34px); line-height: 1.2; }
.stat-io { color: #d8c6d9; font-size: 11px; }
.mode-deck { grid-area: mode; min-width: 0; padding: 20px; border-radius: 23px; }
.mode-deck .acc-head { display: flex; padding: 0 0 16px; flex-direction: row; align-items: center; border-bottom: 1px dashed rgba(242,151,155,.35); }
.acc-title { display: inline-block; margin: 3px 12px 0 0; color: var(--paper); font-size: 20px; }
.mode-account-count { color: #d8c6d9; font-size: 12px; }
.mode-select { display: none; }
.mode-tabs {
  display: grid;
  grid-template-columns: repeat(6, minmax(0, 1fr));
  gap: 9px;
  margin-top: 16px;
  padding: 0;
  overflow: visible;
  border: 0;
  border-radius: 0;
  background: transparent;
}
.mode-tab {
  min-width: 0;
  min-height: 64px;
  padding: 9px 8px;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 7px;
  border: 2px solid rgba(216,198,217,.23);
  border-radius: 15px;
  color: #eadde8;
  background: rgba(19,20,42,.54);
  white-space: normal;
}
.mode-tab:nth-child(2n) { transform: rotate(.6deg); }
.mode-tab:hover { color: var(--paper); background: #3d2a50; transform: translateY(-2px); }
.mode-tab.active { transform: rotate(-1deg); }
.mode-icon { width: 29px; height: 29px; object-fit: contain; }
.beta-badge { color: var(--navy); background: var(--coral); }
.mode-tab.active .beta-badge { color: var(--navy); background: var(--coral); }
.mode-deck-note { margin: 12px 0 0; color: #cdbbd0; font-size: 12px; }
#announcement, #space-notice, #automatch, #kick-notes { grid-column: 1 / -1; }
.banner { border: 2px solid rgba(242,151,155,.32); background: rgba(32,27,57,.92); }
.banner-tag { color: var(--navy); background: var(--coral); }

.acc-sec { grid-area: accounts; min-width: 0; padding: 22px; }
.account-section-head { display: flex; align-items: center; justify-content: space-between; gap: 16px; padding-bottom: 16px; border-bottom: 2px solid rgba(242,151,155,.23); }
.account-section-head h3 { margin: 3px 0 0; color: var(--paper); font-size: 24px; }
.account-live { padding: 4px 10px; border: 1px solid var(--ok); border-radius: 8px; color: var(--ok); font-size: 12px; transform: rotate(2deg); }
.ops-row { display: flex; gap: 9px; margin-top: 16px; }
.ops-row .btn { min-width: 0; }
#fish-ops, #mode-ops { gap: 9px; }
.sel-line { color: #d8c6d9; }
.sel-hint.warn-text { color: var(--butter); }
.resume-inner { border-left: 0; border: 2px dashed var(--coral); border-radius: 14px; background: rgba(93,34,96,.32); }
.acc-table-wrap { margin-top: 14px; overflow-x: auto; }
.acc-table { width: 100%; min-width: 820px; color: var(--text); font-size: 12px; }
.acc-table th { padding: 10px 8px; color: #d8c6d9; background: rgba(151,66,146,.17); border-bottom: 2px solid rgba(242,151,155,.26); }
.acc-table td { padding: 11px 8px; border-bottom-color: rgba(216,198,217,.15); }
.acc-row:hover, .acc-row.open { background-color: rgba(151,66,146,.20); background-image: none; }
.acc-row.failed .acc-name { color: #ffb6ba; }
.acc-row.offline td { color: #c4b3c7; }
.acc-row.offline .acc-name { color: var(--paper); }
.acc-name { color: var(--paper); }
.acc-sub > td { border-bottom-color: rgba(242,151,155,.24); }
.sub-inner { padding-left: 38px; }
.badge { background: rgba(17,19,40,.48); }
.badge-green { color: var(--ok); border-color: rgba(168,230,207,.62); }
.badge-blue { color: var(--butter); border-color: rgba(255,237,155,.62); }
.badge-gray, .badge-off { color: #d8c6d9; background: rgba(17,19,40,.36); }
.badge-red { color: #ffb6ba; border-color: #ff9b9f; }
.chip { background: #302440; border-color: rgba(216,198,217,.24); }
.chip.tag { color: var(--navy); background: var(--coral); }
.chip.warn { color: var(--butter); }
.chip i { color: #cdbbd0; }
.empty-box { padding: 30px 0 16px; color: #d8c6d9; }
.empty-art { display: block; width: 155px; margin: 0 auto 12px; filter: drop-shadow(7px 8px 0 rgba(93,34,96,.5)); }
.empty-action { margin-top: 14px; }
.row-menu, .theme-menu { color: var(--text); background: #251e3c; border: 2px solid var(--coral); box-shadow: var(--shadow); }
.row-menu-item, .theme-item { min-height: 44px; color: var(--text); }
.row-menu-item:hover, .theme-item:hover { background: #493050; }
.row-menu-item.danger { color: #ffb6ba; }

.tok-spark { grid-area: spark; min-height: 154px; margin: 0; padding: 18px; background: rgba(32,27,57,.90); }
.tok-spark .spark-head { color: var(--paper); }
.spark-svg { height: 68px; }
.spark-dot { background: var(--coral); }
.spark-labels { color: #cdbbd0; font-size: 10px; }
.spark-labels .today { color: var(--butter); }
#add-sec {
  grid-area: add;
  position: relative;
  min-height: 210px;
  margin: 0;
  padding: 22px;
  overflow: hidden;
  border-style: dashed;
  background: rgba(93,34,96,.68);
}
.add-heading { display: flex; align-items: center; gap: 12px; flex-wrap: wrap; }
.add-heading > b { color: var(--paper); font-size: 21px; }
.add-heading .section-overline { flex-basis: 100%; }
.add-security { position: relative; z-index: 1; max-width: 360px; margin: 12px 0 18px; line-height: 1.7; }
#add-sec .add-form { position: relative; z-index: 1; grid-template-columns: 1fr; gap: 10px; }
.add-form-actions { position: relative; z-index: 1; margin-top: 10px; }
.add-sticker { position: absolute; right: -6px; bottom: -10px; width: 105px; opacity: .68; transform: rotate(-7deg); pointer-events: none; }
#add-sec #btn-toggle-add { position: relative; z-index: 2; }
.back-top { width: 46px; height: 46px; bottom: calc(20px + env(safe-area-inset-bottom)); border: 2px solid var(--coral); background: #2a2142; color: var(--butter); }

/* 弹窗与动态表单沿用业务模板，但统一为 Cute 深色票面。 */
.modal-wrap { z-index: 90; }
.modal-mask { background: rgba(9,10,25,.70); backdrop-filter: blur(5px); }
.modal {
  padding: 0;
  color: var(--text);
  background: #211b38;
  border: 2px solid var(--coral);
  border-radius: 23px;
  box-shadow: 10px 12px 0 rgba(93,34,96,.55);
}
.modal-head { padding: 18px 20px 12px; border-bottom: 1px dashed rgba(242,151,155,.30); }
.modal-title { color: var(--paper); font-size: 19px; }
.modal-body { padding: 16px 20px 20px; color: var(--text); }
.modal .btn, .modal .seg-btn, .modal .step-btn, .modal .ws-tg { min-height: 44px; }
.modal .grid2, .modal .grid3 { gap: 0 12px; }
.modal .mini-table th { color: #d8c6d9; }
.modal .mini-table td, .modal .mini-table th { border-bottom-color: rgba(216,198,217,.18); }
.modal .inp, .modal .map-pick, .modal .step-btn { background-color: #19182f; color: var(--text); }
.op-group { margin: 0; padding: 14px 0; }
.op-group:first-child { padding-top: 0; }
.op-group + .op-group { border-top: 1px solid rgba(216,198,217,.18); }
.op-group-name { color: #e7d8e4; font-weight: 700; }
.op-group-note, .row-menu-note { color: #d8c6d9; line-height: 1.6; }
.op-grid-two, .row-action-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.row-action-grid { display: grid; gap: 8px; }
.row-action-grid .btn { min-width: 0; padding: 9px 8px; white-space: normal; }
.row-menu-note { padding: 10px 12px; border-top: 1px solid rgba(216,198,217,.18); font-size: 12px; }
.optional-sec { padding: 0; }
.optional-sec summary { min-height: 44px; display: flex; align-items: center; color: var(--butter); font-weight: 700; cursor: pointer; }
.optional-sec[open] summary { margin-bottom: 12px; }
.map-grid { gap: 10px; }
.map-pick { min-height: 54px; border: 2px solid rgba(216,198,217,.24); border-radius: 15px; background: #302440; color: var(--text); }
.map-pick:hover { border-color: var(--coral); box-shadow: var(--glow); }
.map-closed { color: #c4b3c7; }
.seg { background: #17162c; border-color: rgba(216,198,217,.22); }
.seg-btn { color: #d8c6d9; }
.step-btn { border-color: rgba(242,151,155,.34); }
.entry-opt { background: #302440; border-color: rgba(216,198,217,.24); }
.ws-head { color: #d8c6d9; }
.ws-head, .ws-row { border-bottom-color: rgba(216,198,217,.17); }
.ws-tg { color: #d8c6d9; border-color: rgba(216,198,217,.25); }
.ws-tg.on, .keep-chip { color: var(--butter); border-color: var(--coral); background: rgba(242,151,155,.10); }
.keep-chip.ws-p, .ws-tg-p.on { color: var(--ok); border-color: var(--ok); }
.keep-chip.ws-r, .ws-tg-r.on { color: var(--butter); border-color: var(--butter); }
.amount-link { min-height: 44px; color: var(--butter); text-decoration-color: var(--coral); }
.wan-hint { color: var(--butter); }
.err-box, .ok-box { background: rgba(17,19,40,.52); }
.aoff-item, .token-cell { background: #302440; border-color: rgba(216,198,217,.23); }
.reel-bar { background: #17162c; }
.toast { color: var(--text); background: #2a2142; border: 2px solid var(--coral); border-radius: 14px; }
.toast-error { color: #ffb6ba; }

/* 金额小票与 72 小时记录。 */
.receipt-entry {
  min-width: 62px;
  min-height: 34px;
  padding: 5px 9px;
  border: 2px solid var(--butter);
  border-radius: 10px;
  color: var(--navy);
  background: var(--butter);
  font-size: 12px;
  font-weight: 850;
  box-shadow: 3px 3px 0 var(--violet);
}
.receipt-entry:hover { color: var(--navy); background: #fff3b8; }
.receipt-arrow { color: var(--plum); }
.modal-wrap.receipt-popover { display: block; padding: 0; }
.receipt-popover .modal-mask { background: transparent; backdrop-filter: none; }
.receipt-popover .modal { position: absolute; width: min(440px, calc(100vw - 24px)); max-width: none; max-height: calc(100dvh - 24px); background: #211b38; }
.receipt-popover .mini-table { font-size: 12px; }
.receipt-choice-list { display: grid; gap: 8px; }
.receipt-choice {
  display: flex; width: 100%; min-height: 58px; padding: 10px 14px;
  align-items: center; justify-content: space-between; gap: 12px;
  border: 1px solid rgba(242,151,155,.35); border-radius: 13px;
  background: #302440; color: var(--text); text-align: left; cursor: pointer;
}
.receipt-choice:hover { background: #453052; }
.receipt-choice span { min-width: 0; display: grid; gap: 3px; }
.receipt-choice b, .receipt-choice small { overflow-wrap: anywhere; }
.receipt-choice small { color: #d8c6d9; }
.receipt-choice strong { flex-shrink: 0; color: var(--butter); }
.receipt-filter-note, .receipt-empty { color: #d8c6d9; font-size: 12px; line-height: 1.6; }
.stats-filter { display: grid; grid-template-columns: minmax(0,1fr) minmax(0,1fr) auto auto; gap: 8px; margin-bottom: 8px; }
.stats-retention { color: #d8c6d9; font-size: 12px; }
.stats-record-list { display: grid; gap: 8px; }
.stats-record { display: flex; min-width: 0; padding: 12px; align-items: center; gap: 12px; border: 1px solid rgba(216,198,217,.22); border-radius: 13px; background: #302440; }
.stats-record-main { flex: 1; min-width: 0; }
.stats-record-head { display: flex; justify-content: space-between; gap: 8px; flex-wrap: wrap; }
.stats-record-head span, .stats-record-line { color: #d8c6d9; }
.stats-record-line, .stats-record-bigs { margin-top: 5px; font-size: 13px; overflow-wrap: anywhere; }
.stats-record-bigs { color: var(--butter); }
.stats-record-delete { flex-shrink: 0; }
.stats-preview, .stats-preview img { max-width: 100%; height: auto; }
.rate-chip { border-color: var(--ok); background: rgba(168,230,207,.09); }
.modal-wrap.sheet-bottom { align-items: flex-end; padding: 0; }
.modal-wrap.sheet-bottom .modal { width: 100%; max-width: 760px; max-height: calc(100dvh - 48px); border-radius: 25px 25px 0 0; padding-bottom: env(safe-area-inset-bottom); }

/* 背景设置。 */
.bg-settings { display: grid; gap: 18px; }
.bg-settings-note { margin: 0; line-height: 1.6; }
.bg-setting { display: grid; gap: 6px; }
.bg-setting-head { display: flex; align-items: center; justify-content: space-between; gap: 16px; font-size: 14px; font-weight: 700; }
.bg-setting-head output { color: var(--butter); font-size: 13px; font-variant-numeric: tabular-nums; }
.bg-background-seg { margin: 0; }
.bg-background-seg .seg-btn { min-height: 44px; }
.bg-background-seg .seg-btn:hover { color: var(--text); background: rgba(216,198,217,.10); }
.bg-background-seg .seg-btn.active:hover { background: linear-gradient(120deg, var(--accent), var(--accent2)); }
.bg-range { width: 100%; height: 44px; margin: 0; accent-color: var(--coral); cursor: pointer; }
.bg-color-range { appearance: none; -webkit-appearance: none; background: transparent; }
.bg-color-range::-webkit-slider-runnable-track { height: 10px; border: 1px solid rgba(255,244,246,.34); border-radius: 99px; background: linear-gradient(90deg, #2a2142, #745184 52%, #d9bde9); }
.bg-color-range::-webkit-slider-thumb { width: 24px; height: 24px; margin-top: -8px; appearance: none; -webkit-appearance: none; border: 3px solid var(--paper); border-radius: 50%; background: var(--coral); box-shadow: 2px 3px 0 rgba(22,27,50,.42); }
.bg-color-range::-moz-range-track { height: 10px; border: 1px solid rgba(255,244,246,.34); border-radius: 99px; background: linear-gradient(90deg, #2a2142, #745184 52%, #d9bde9); }
.bg-color-range::-moz-range-thumb { width: 20px; height: 20px; border: 3px solid var(--paper); border-radius: 50%; background: var(--coral); box-shadow: 2px 3px 0 rgba(22,27,50,.42); }
.bg-color-scale { display: flex; justify-content: space-between; color: #d8c6d9; font-size: 11px; }
.bg-tint-note { margin: 0; line-height: 1.55; }
.bg-settings-footer { display: flex; align-items: center; justify-content: space-between; gap: 12px; }

/* 按住颜色滑条时，仅临时撤掉周围磨砂与浓色卡片，弹窗本身保持可读。 */
body.color-previewing .modal-mask { background: rgba(9,10,25,.16); backdrop-filter: none; -webkit-backdrop-filter: none; }
body.color-previewing #view-console .glass,
body.color-previewing #view-console .topbar,
body.color-previewing #view-console .console-hero,
body.color-previewing #view-console .stat-card,
body.color-previewing #view-console #add-sec {
  backdrop-filter: none !important;
  -webkit-backdrop-filter: none !important;
}
body.color-previewing #view-console .glass:not(.modal),
body.color-previewing #view-console .topbar { background-color: rgba(22,27,50,.26) !important; }
body.color-previewing #view-console .console-hero { background: rgba(93,34,96,.22) !important; }
body.color-previewing #view-console .stat-card { background: rgba(32,27,57,.24) !important; }
body.color-previewing #view-console #add-sec { background: rgba(93,34,96,.20) !important; }

#boot-skeleton { background: var(--navy); }
.skeleton-copy { width: min(420px, 74vw); }
.skel-mascot { width: 82px; height: 82px; object-fit: contain; }
.skel-line, .skel-block { background: #342646; }

@media (max-width: 1199px) {
  .console-wrap {
    grid-template-areas:
      "hero hero hero hero hero hero hero hero hero hero hero hero"
      "stats stats stats stats stats stats stats stats stats stats stats stats"
      "mode mode mode mode mode mode mode mode mode mode mode mode"
      "accounts accounts accounts accounts accounts accounts accounts accounts accounts accounts accounts accounts"
      "spark spark spark spark spark spark add add add add add add";
  }
  .console-hero { min-height: 220px; }
  .stat-grid { grid-template-columns: repeat(4, minmax(0,1fr)); }
  .stat-card { min-height: 108px; }
  .topbar-row2 { flex-wrap: wrap; }
}

@media (max-width: 900px) {
  .auth-wrap { grid-template-columns: minmax(0,1fr); gap: 28px; padding: 34px 24px 44px; }
  .auth-brand { display: grid; grid-template-columns: minmax(0,1fr) 180px; align-items: start; column-gap: 20px; }
  .auth-brand .brand-line, .auth-brand .slogan, .auth-brand .auth-orbits { grid-column: 1; }
  .auth-brand h1 { font-size: 68px; }
  .auth-brand .slogan { margin-top: 18px; font-size: 15px; }
  .auth-photo { grid-column: 2; grid-row: 1 / 4; width: 180px; min-height: 210px; margin: 0; }
  .auth-mascot { width: 175px; margin: 20px 0 0; }
  .photo-caption { right: 0; bottom: 20px; }
  .auth-spark { right: 0; width: 40px; }
  .auth-orbits { margin-top: 18px; }
  .auth-card { width: min(600px, 100%); margin: 0 auto; }
  .topbar { width: calc(100% - 24px); margin-top: 12px; flex-direction: column; align-items: stretch; }
  .topbar-row2 { display: grid; grid-template-columns: minmax(0,1fr) auto; width: 100%; justify-content: flex-start; flex-wrap: nowrap; }
  .topbar-row2 .theme-anchor, .topbar-row2 .theme-anchor .btn { width: 100%; }
  .topbar-row2 > #btn-logout { width: auto; }
  .topbar-row #btn-refresh-balance { margin: 0; }
  .connection-copy, #token-est { display: none; }
  .console-wrap { padding: 18px 12px 44px; gap: 14px; }
  .mode-tabs { grid-template-columns: repeat(3, minmax(0,1fr)); }
  .ops-row { display: grid; grid-template-columns: repeat(3, minmax(0,1fr)); }
  #fish-ops, #mode-ops { display: contents; }
  .ops-row .spacer { display: none; }
  .ops-row .btn { width: 100%; min-width: 0; padding-inline: 8px; }
  .acc-table { min-width: 760px; }
  .acc-table .col-game { display: none; }
  .card { padding: 18px; }
  .stats-filter { grid-template-columns: repeat(2, minmax(0,1fr)); }
  .stats-filter .btn { width: 100%; }
  .glass { backdrop-filter: blur(9px); -webkit-backdrop-filter: blur(9px); }
}

@media (max-width: 700px) {
  .console-wrap {
    grid-template-areas: "hero hero hero hero hero hero hero hero hero hero hero hero" "mode mode mode mode mode mode mode mode mode mode mode mode" "stats stats stats stats stats stats stats stats stats stats stats stats" "accounts accounts accounts accounts accounts accounts accounts accounts accounts accounts accounts accounts" "spark spark spark spark spark spark spark spark spark spark spark spark" "add add add add add add add add add add add add";
  }
  .stat-grid { grid-template-columns: repeat(2, minmax(0,1fr)); }
  .console-hero { min-height: 240px; }
  .ops-row { display: grid; grid-template-columns: repeat(3, minmax(0,1fr)); }
  #fish-ops, #mode-ops { display: contents; }
  .ops-row .spacer { display: none; }
  .ops-row .btn { width: 100%; padding-inline: 7px; font-size: 12px; }
  .acc-table-wrap { overflow: visible; }
  .acc-table, .acc-table tbody { display: block; width: 100%; min-width: 0; }
  .acc-table thead { display: none; }
  .acc-table .acc-row {
    display: grid;
    grid-template-columns: 30px minmax(0,1fr) auto auto;
    grid-template-areas: "check name name menu" ". state amount amount" ". map map map" ". ready ready ready";
    gap: 10px 8px;
    align-items: center;
    padding: 15px 2px;
    border-bottom: 1px solid rgba(216,198,217,.20);
  }
  .acc-table .acc-row td { display: block; width: auto; padding: 0; border: 0; overflow: visible; text-overflow: clip; white-space: normal; }
  .acc-table .col-check { grid-area: check; min-height: 44px; display: flex !important; align-items: center; }
  .acc-table td.acc-name { grid-area: name; font-size: 14px; line-height: 1.45; overflow-wrap: anywhere; }
  .acc-table .col-state { grid-area: state; }
  .acc-table .col-amount { grid-area: amount; text-align: right; font-size: 13px; }
  .acc-table .col-map { grid-area: map; text-align: left; font-size: 12px; }
  .acc-table .col-ready { grid-area: ready; color: #d8c6d9; font-size: 12px; }
  .acc-table .col-menu { grid-area: menu; }
  .acc-table .acc-row > .col-game, .acc-table .acc-row > .col-note { display: none; }
  .acc-table .acc-sub, .acc-table .acc-sub.open { display: none; }
  .acc-table .acc-row .col-map > .sub-inner { margin: 8px 0 2px; padding: 12px; border: 1px dashed rgba(216,198,217,.35); border-radius: 14px; background: rgba(48,36,64,.72); }
  .acc-table .acc-row .sub-inner .sess-chips { margin-top: 0; }
  .acc-table .acc-row .sub-inner .chip { height: auto; min-height: 26px; white-space: normal; overflow-wrap: anywhere; word-break: break-word; }
  .acc-table .col-amount::before, .acc-table .col-map::before { display: block; margin-bottom: 3px; color: #d8c6d9; font-size: 11px; }
  .acc-table .col-amount::before { content: "金额"; }
  .acc-table .col-map::before { content: "地图·房间"; }
  .acc-table .col-ready::before { content: "准备 · "; }
  .acc-table .badge { font-size: 11px; padding: 4px 7px; }
  .sub-inner { padding: 12px 4px 16px 38px; }
}

@media (max-width: 520px) {
  .auth-wrap { padding: 24px 14px 34px; gap: 22px; }
  .auth-brand { display: block; }
  .brand-logo-lg { width: 64px; height: 64px; border-radius: 19px; }
  .brand-line { gap: 14px; }
  .auth-brand h1 { font-size: 54px; }
  .auth-kicker { font-size: 9px; }
  .auth-brand .slogan { max-width: calc(100% - 118px); font-size: 14px; line-height: 1.75; }
  .auth-photo { position: absolute; right: 0; top: 74px; width: 120px; min-height: 150px; border: 0; }
  .auth-mascot { width: 120px; margin: 0; }
  .photo-caption { right: 0; bottom: 4px; padding: 4px 8px; font-size: 10px; }
  .auth-spark { display: none; }
  .auth-orbits { max-width: 100%; gap: 6px; }
  .orbit-chip { padding: 5px 9px; font-size: 11px; }
  .auth-card { padding: 22px 17px; border-radius: 23px; }
  .auth-tabs { grid-template-columns: repeat(3, minmax(0,1fr)); }
  .auth-tab { font-size: 12px; }
  .topbar { padding: 10px; }
  .topbar-row { gap: 8px; }
  .topbar .brand > span { display: none; }
  .brand-logo { width: 42px; height: 42px; }
  .user-email { order: 5; max-width: 100%; }
  .token-chip { flex: 1 1 145px; }
  .top-actions { display: contents; }
  .topbar-row2 { display: grid; grid-template-columns: 1fr auto; width: 100%; }
  .topbar-row2 .theme-anchor, .topbar-row2 .theme-anchor .btn { width: 100%; }
  .console-wrap { padding-inline: 10px; }
  .console-hero { min-height: 250px; padding: 24px 112px 22px 20px; border-radius: 22px; }
  .console-hero h2 { font-size: 34px; }
  .console-hero p { font-size: 12px; }
  .console-hero .hero-character { right: -12px; width: 140px; }
  .console-hero .hero-star { right: 90px; top: 105px; width: 34px; }
  .hero-overline { font-size: 9px; }
  .hero-note { font-size: 10px; }
  .mode-deck, .acc-sec { padding: 15px; }
  .mode-deck .acc-head { align-items: flex-start; }
  .acc-title { display: block; font-size: 19px; }
  .mode-tab { min-height: 58px; padding: 7px 4px; gap: 4px; font-size: 11px; }
  .mode-icon { width: 21px; height: 21px; }
  .stat-grid { gap: 10px; }
  .stat-card { min-height: 104px; padding: 14px; }
  .stat-v { font-size: 24px; }
  .stat-io { font-size: 10px; }
  .account-section-head h3 { font-size: 21px; }
  .account-live { font-size: 10px; }
  .ops-row { gap: 7px; }
  .ops-row .btn { min-height: 46px; font-size: 11px; }
  .card { padding: 16px; }
  .modal-wrap { padding: max(12px, env(safe-area-inset-top)) max(12px, env(safe-area-inset-right)) max(12px, env(safe-area-inset-bottom)) max(12px, env(safe-area-inset-left)); }
  .modal { max-height: calc(100dvh - 24px); }
  .modal-head, .modal-body { padding-inline: 15px; }
  .modal .grid2, .modal .grid3 { gap: 0 8px; }
  .op-grid { grid-template-columns: repeat(2, minmax(0,1fr)); }
  .receipt-popover .modal { max-height: min(66dvh, calc(100dvh - 24px)); }
  .stats-record { align-items: stretch; flex-direction: column; }
  .stats-record-delete { align-self: flex-end; }
  .bg-settings-footer { align-items: stretch; flex-direction: column; }
}

@media (max-width: 380px) {
  .auth-brand .slogan { max-width: calc(100% - 100px); }
  .auth-photo { width: 105px; }
  .auth-mascot { width: 105px; }
  .console-hero { padding-right: 94px; }
  .console-hero h2 { font-size: 30px; }
  .console-hero .hero-character { width: 120px; }
  .mode-tab { font-size: 10px; }
  .mode-icon { display: none; }
}

/* 业务内容不依赖滚动触发：全页截图、查找与键盘导航时始终可见。 */
.fx-reveal, .fx-stag { opacity: 1; transform: none; }

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { scroll-behavior: auto !important; animation: none !important; transition-duration: .01ms !important; }
  .auth-hero { display: none; }
  .brand-logo-lg, .auth-mascot, .console-hero .hero-character { transform: none; }
}
html[data-fx="off"] .brand-logo-lg, html[data-fx="off"] .auth-mascot { animation: none; }

/* 用户单图标素材：只落在留白与卡片外沿，不进入业务控件层。 */
.sticker-decor {
  position: absolute;
  z-index: 1;
  object-fit: contain;
  pointer-events: none;
  user-select: none;
  filter: drop-shadow(4px 5px 0 rgba(22,27,50,.28));
}
.mode-deck, .acc-sec { position: relative; }
.mode-sticker { top: 8px; right: 20px; width: 66px; transform: rotate(7deg); }
.account-sticker { top: 11px; right: 108px; width: 52px; transform: rotate(-6deg); }
.spark-zone { position: relative; grid-area: spark; min-width: 0; }
.spark-zone:has(#tok-spark.hidden) { display: none; }
.tok-spark { grid-area: auto; }
.tok-spark .spark-head { padding-right: 72px; }
.spark-sticker { top: -24px; right: 17px; width: 62px; transform: rotate(5deg); }

@media (max-width: 700px) {
  .mode-sticker { top: 10px; right: 14px; width: 50px; }
  .account-sticker { right: 96px; width: 43px; }
  .tok-spark .spark-head { padding-right: 56px; }
  .spark-sticker { top: -20px; right: 13px; width: 48px; }
}
@media (max-width: 520px) {
  .tok-spark .spark-head { padding-right: 0; }
  .mode-sticker, .account-sticker, .spark-sticker { display: none; }
}

/* 六种玩法各自一张素材表情；窄屏改为上下排列，保留辨识度。 */
.mode-icon {
  width: 36px;
  height: 36px;
  flex: 0 0 36px;
  object-fit: contain;
  filter: drop-shadow(2px 3px 0 rgba(22,27,50,.26));
  transform: rotate(-5deg);
  transition: transform 160ms ease-out;
  pointer-events: none;
  user-select: none;
}
.mode-tab:nth-child(2n) .mode-icon { transform: rotate(5deg); }
.mode-tab:hover .mode-icon, .mode-tab.active .mode-icon { transform: translateY(-2px) rotate(-7deg) scale(1.08); }
.mode-tab:nth-child(2n):hover .mode-icon, .mode-tab:nth-child(2n).active .mode-icon { transform: translateY(-2px) rotate(7deg) scale(1.08); }
.mode-menu-icon { filter: drop-shadow(1px 2px 0 rgba(22,27,50,.25)); }
@media (max-width: 900px) {
  .mode-tab .mode-icon { width: 28px; height: 28px; flex-basis: 28px; }
}
@media (max-width: 520px) {
  .mode-tab { flex-direction: column; gap: 3px; }
  .mode-tab .mode-icon { display: block; width: 24px; height: 24px; flex-basis: 24px; }
}
@media (max-width: 380px) {
  .mode-tab .mode-icon { display: block; width: 22px; height: 22px; flex-basis: 22px; }
}

/* 原图透明边距较大的三枚图标单独放大，视觉重量与其余玩法一致。 */
.mode-tab[data-mode="fishing"] .mode-icon,
.mode-tab[data-mode="mojin"] .mode-icon,
.mode-tab[data-mode="lily"] .mode-icon { width: 46px; height: 46px; flex-basis: 46px; }
@media (max-width: 900px) {
  .mode-tab[data-mode="fishing"] .mode-icon,
  .mode-tab[data-mode="mojin"] .mode-icon,
  .mode-tab[data-mode="lily"] .mode-icon { width: 36px; height: 36px; flex-basis: 36px; }
}
@media (max-width: 520px) {
  .mode-tab[data-mode="fishing"] .mode-icon,
  .mode-tab[data-mode="mojin"] .mode-icon,
  .mode-tab[data-mode="lily"] .mode-icon { width: 31px; height: 31px; flex-basis: 31px; }
}
@media (max-width: 380px) {
  .mode-tab[data-mode="fishing"] .mode-icon,
  .mode-tab[data-mode="mojin"] .mode-icon,
  .mode-tab[data-mode="lily"] .mode-icon { width: 30px; height: 30px; flex-basis: 30px; }
}

/* 近期 Token 统计卡：小表情靠右下角，数字与输入输出保持完整。 */
.stat-card { position: relative; }
.stat-sticker { right: 9px; bottom: 8px; width: 44px; opacity: .94; transform: rotate(6deg); }
.stat-card:nth-child(2n) .stat-sticker { transform: rotate(-6deg); }
@media (max-width: 1199px) {
  .stat-sticker { width: 38px; }
}
@media (max-width: 520px) {
  .stat-sticker { right: 7px; bottom: 7px; width: 32px; }
}
@media (max-width: 380px) {
  .stat-sticker { width: 30px; }
}
