﻿/* 大肥鱼 · 人格与计费调试台 — mobile-first, dark "deep sea" theme */
:root {
  --bg: #060f16;
  --bg-2: #0a1721;
  --card: #0f2130;
  --card-2: #142a3a;
  --line: #1e3a4b;
  --line-soft: #162c3a;
  --text: #e9f2f6;
  --muted: #8fa9b7;
  --dim: #607d8d;
  --accent: #ff8a5c;
  --accent-2: #4dd4c0;
  --accent-3: #7aa2ff;
  --warn: #ffc857;
  --danger: #ff6b6b;
  --ok: #4ade80;
  --radius: 18px;
  --radius-sm: 12px;
  --shadow: 0 18px 40px rgba(0, 0, 0, 0.35);
  --safe-bottom: env(safe-area-inset-bottom, 0px);
  color-scheme: dark;
}

* { box-sizing: border-box; }
html, body { margin: 0; padding: 0; }
body {
  background:
    radial-gradient(900px 500px at 90% -10%, rgba(255, 138, 92, 0.12), transparent 60%),
    radial-gradient(700px 500px at -10% 8%, rgba(77, 212, 192, 0.10), transparent 55%),
    var(--bg);
  color: var(--text);
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", "PingFang SC", "Hiragino Sans GB",
    "Microsoft YaHei", "Noto Sans SC", sans-serif;
  font-size: 15px;
  line-height: 1.6;
  min-height: 100dvh;
  -webkit-font-smoothing: antialiased;
}
a { color: var(--accent-2); text-decoration: none; }
a:hover { text-decoration: underline; }
button, input, textarea, select { font: inherit; color: inherit; }
img { max-width: 100%; }
h1, h2, h3, h4 { margin: 0 0 8px; line-height: 1.3; font-weight: 650; }
h1 { font-size: 22px; }
h2 { font-size: 18px; }
h3 { font-size: 15px; }
p { margin: 0 0 10px; }
small, .small { font-size: 12px; }
.muted { color: var(--muted); }
.dim { color: var(--dim); }
.mono { font-family: "SFMono-Regular", Consolas, "Liberation Mono", monospace; }
.center { text-align: center; }
.nowrap { white-space: nowrap; }
.hidden { display: none !important; }
.grow { flex: 1; }
.row { display: flex; align-items: center; gap: 10px; }
.row.wrap { flex-wrap: wrap; }
.between { justify-content: space-between; }
.stack { display: flex; flex-direction: column; gap: 12px; }
.stack.tight { gap: 8px; }
.grid-2 { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; }
.grid-3 { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 8px; }

.app-shell {
  max-width: 560px;
  margin: 0 auto;
  padding: 16px 16px calc(88px + var(--safe-bottom));
  min-height: 100dvh;
}
.app-shell.no-nav { padding-bottom: 24px; }

/* ---------- top bar ---------- */
.topbar {
  position: sticky;
  top: 0;
  z-index: 30;
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px 0 12px;
  background: linear-gradient(180deg, rgba(6, 15, 22, 0.96), rgba(6, 15, 22, 0.82) 70%, transparent);
  backdrop-filter: blur(8px);
}
.topbar .title { font-weight: 650; font-size: 16px; }
.topbar .sub { color: var(--muted); font-size: 12px; }
.icon-btn {
  width: 38px; height: 38px; border-radius: 12px; border: 1px solid var(--line);
  background: var(--card); color: var(--text); display: inline-flex; align-items: center;
  justify-content: center; cursor: pointer; font-size: 18px; flex: 0 0 auto;
}
.icon-btn:hover { border-color: var(--accent); }
.icon-btn.ghost { background: transparent; border-color: transparent; }

/* ---------- cards ---------- */
.card {
  background: linear-gradient(180deg, rgba(20, 42, 58, 0.95), rgba(15, 33, 48, 0.95));
  border: 1px solid var(--line-soft);
  border-radius: var(--radius);
  padding: 16px;
  box-shadow: var(--shadow);
}
.card + .card { margin-top: 12px; }
.card.flat { box-shadow: none; background: var(--card); }
.card.accent {
  border-color: rgba(255, 138, 92, 0.35);
  background: linear-gradient(160deg, rgba(255, 138, 92, 0.16), rgba(15, 33, 48, 0.9) 55%);
}
.card-title { display: flex; align-items: center; justify-content: space-between; gap: 10px; margin-bottom: 10px; }
.card-title h2, .card-title h3 { margin: 0; }
.section-title { display: flex; align-items: center; justify-content: space-between; margin: 22px 0 10px; }
.section-title h2 { margin: 0; font-size: 17px; }

/* ---------- buttons ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 6px;
  min-height: 42px; padding: 0 16px; border-radius: 12px; border: 1px solid var(--line);
  background: var(--card-2); color: var(--text); font-weight: 600; cursor: pointer;
  transition: transform 0.05s ease, border-color 0.15s ease, background 0.15s ease;
  text-decoration: none; white-space: nowrap;
}
.btn:hover { border-color: var(--accent); text-decoration: none; }
.btn:active { transform: translateY(1px); }
.btn:disabled { opacity: 0.5; cursor: not-allowed; }
.btn.primary {
  background: linear-gradient(135deg, #ff9468, #ff7043);
  border-color: transparent; color: #1c0d07;
}
.btn.secondary { background: rgba(77, 212, 192, 0.12); border-color: rgba(77, 212, 192, 0.4); color: #b8fff2; }
.btn.ghost { background: transparent; }
.btn.danger { background: rgba(255, 107, 107, 0.12); border-color: rgba(255, 107, 107, 0.42); color: #ffb4b4; }
.btn.small { min-height: 34px; padding: 0 10px; font-size: 13px; border-radius: 10px; }
.btn.block { width: 100%; }
.btn-row { display: flex; gap: 8px; flex-wrap: wrap; }

/* ---------- chips / badges ---------- */
.chip {
  display: inline-flex; align-items: center; gap: 5px; padding: 3px 9px; border-radius: 999px;
  border: 1px solid var(--line); background: rgba(255, 255, 255, 0.03);
  font-size: 12px; color: var(--muted); white-space: nowrap;
}
.chip.accent { border-color: rgba(255, 138, 92, 0.45); color: #ffc3a8; background: rgba(255, 138, 92, 0.1); }
.chip.ok { border-color: rgba(74, 222, 128, 0.4); color: #b9f6ca; background: rgba(74, 222, 128, 0.08); }
.chip.warn { border-color: rgba(255, 200, 87, 0.4); color: #ffe3a3; background: rgba(255, 200, 87, 0.08); }
.chip.danger { border-color: rgba(255, 107, 107, 0.45); color: #ffb4b4; background: rgba(255, 107, 107, 0.08); }
.chip.teal { border-color: rgba(77, 212, 192, 0.4); color: #b8fff2; background: rgba(77, 212, 192, 0.08); }
.badge { display: inline-block; padding: 1px 7px; border-radius: 6px; font-size: 11px; letter-spacing: 0.02em; }

/* ---------- forms ---------- */
.field { margin-bottom: 14px; }
.field > label { display: block; font-size: 13px; color: var(--muted); margin-bottom: 6px; }
.field .hint { font-size: 12px; color: var(--dim); margin-top: 5px; }
.input, .textarea, .select {
  width: 100%; padding: 11px 12px; border-radius: 12px; border: 1px solid var(--line);
  background: rgba(3, 10, 15, 0.55); color: var(--text); outline: none;
  transition: border-color 0.15s ease, box-shadow 0.15s ease;
}
.input:focus, .textarea:focus, .select:focus {
  border-color: var(--accent); box-shadow: 0 0 0 3px rgba(255, 138, 92, 0.12);
}
.textarea { min-height: 96px; resize: vertical; line-height: 1.55; }
.textarea.tall { min-height: 150px; }
.select { appearance: none; background-image: linear-gradient(45deg, transparent 50%, var(--muted) 50%),
  linear-gradient(135deg, var(--muted) 50%, transparent 50%);
  background-position: calc(100% - 18px) 50%, calc(100% - 13px) 50%;
  background-size: 5px 5px, 5px 5px; background-repeat: no-repeat; padding-right: 32px; }
.input-group { display: flex; gap: 8px; }
.input-group .input { flex: 1; }
.checkbox { display: flex; align-items: flex-start; gap: 8px; font-size: 13px; color: var(--muted); }
.checkbox input { margin-top: 3px; accent-color: var(--accent); }
input[type=range] { width: 100%; accent-color: var(--accent); }
.slider-row { display: flex; align-items: center; gap: 10px; margin-bottom: 8px; }
.slider-row .label { width: 64px; font-size: 13px; color: var(--muted); }
.slider-row .value { width: 26px; text-align: right; font-size: 13px; color: var(--accent); }
.field-error { color: var(--danger); font-size: 12px; margin-top: 4px; }

/* ---------- avatar ---------- */
.avatar { border-radius: 50%; object-fit: cover; background: var(--card-2); flex: 0 0 auto; display: block; }
.avatar.xs { width: 28px; height: 28px; }
.avatar.sm { width: 40px; height: 40px; }
.avatar.md { width: 56px; height: 56px; }
.avatar.lg { width: 84px; height: 84px; }
.avatar.xl { width: 112px; height: 112px; }
.avatar.square { border-radius: 22px; }

/* ---------- persona cards ---------- */
.persona-grid { display: flex; flex-direction: column; gap: 10px; }
.persona-card {
  display: flex; gap: 12px; align-items: center; padding: 12px; border-radius: var(--radius);
  border: 1px solid var(--line-soft); background: var(--card); text-decoration: none;
  color: var(--text); position: relative;
}
.persona-card:hover { border-color: rgba(255, 138, 92, 0.45); text-decoration: none; }
.persona-card .body { flex: 1; min-width: 0; }
.persona-card .name { font-weight: 650; display: flex; align-items: center; gap: 6px; }
.persona-card .meta { font-size: 12px; color: var(--muted); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.persona-card .actions { display: flex; flex-direction: column; gap: 6px; }
.persona-card .actions .btn { min-height: 30px; padding: 0 9px; font-size: 12px; }
.draft-flag { position: absolute; top: -7px; right: 12px; }

/* ---------- chat ---------- */
.chat-shell {
  display: flex; flex-direction: column; height: 100dvh; max-width: 560px; margin: 0 auto;
}
.chat-head {
  position: sticky; top: 0; z-index: 20; display: flex; align-items: center; gap: 10px;
  padding: 10px 14px; border-bottom: 1px solid var(--line-soft);
  background: rgba(6, 15, 22, 0.92); backdrop-filter: blur(10px);
}
.chat-head .name { font-weight: 650; font-size: 15px; }
.chat-head .sub { font-size: 11px; color: var(--muted); }
.chat-body {
  flex: 1; overflow-y: auto; padding: 16px 14px 8px; display: flex; flex-direction: column; gap: 12px;
  scroll-behavior: smooth;
}
.msg { display: flex; gap: 8px; align-items: flex-end; max-width: 88%; }
.msg.user { align-self: flex-end; flex-direction: row-reverse; }
.msg .bubble {
  padding: 10px 13px; border-radius: 16px; background: var(--card-2);
  border: 1px solid var(--line-soft); white-space: pre-wrap; word-break: break-word;
}
.msg.user .bubble { background: linear-gradient(135deg, #ff9468, #f4724a); color: #1d0d06; border-color: transparent; }
.msg .meta-line { font-size: 10px; color: var(--dim); margin-top: 4px; }
.msg.system { align-self: center; max-width: 100%; }
.msg.system .bubble { background: rgba(255, 200, 87, 0.08); border-color: rgba(255, 200, 87, 0.25); font-size: 12px; color: #ffe3a3; }
.chat-composer {
  position: sticky; bottom: 0; padding: 8px 12px calc(10px + var(--safe-bottom));
  background: linear-gradient(0deg, rgba(6, 15, 22, 0.98), rgba(6, 15, 22, 0.86) 75%, transparent);
  border-top: 1px solid var(--line-soft);
}
.composer-box {
  display: flex; align-items: flex-end; gap: 8px; padding: 8px; border-radius: 18px;
  background: var(--card); border: 1px solid var(--line);
}
.composer-box textarea {
  flex: 1; border: none; background: transparent; resize: none; outline: none;
  max-height: 120px; min-height: 24px; padding: 6px; line-height: 1.5;
}
.send-btn {
  width: 42px; height: 42px; border-radius: 14px; border: none; flex: 0 0 auto;
  background: linear-gradient(135deg, #ff9468, #ff7043); color: #1c0d07; font-size: 18px;
  cursor: pointer; display: inline-flex; align-items: center; justify-content: center;
}
.send-btn:disabled { opacity: 0.5; }
.typing { display: inline-flex; gap: 4px; align-items: center; }
.typing i { width: 6px; height: 6px; border-radius: 50%; background: var(--muted); animation: blink 1.2s infinite; }
.typing i:nth-child(2) { animation-delay: 0.2s; }
.typing i:nth-child(3) { animation-delay: 0.4s; }
@keyframes blink { 0%, 60%, 100% { opacity: 0.25; } 30% { opacity: 1; } }

/* ---------- list rows ---------- */
.list { display: flex; flex-direction: column; }
.list-row {
  display: flex; align-items: center; gap: 10px; padding: 11px 0; border-bottom: 1px solid var(--line-soft);
}
.list-row:last-child { border-bottom: none; }
.list-row .main { flex: 1; min-width: 0; }
.list-row .title { font-weight: 600; font-size: 14px; }
.list-row .sub { font-size: 12px; color: var(--muted); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.list-row .trail { font-size: 13px; color: var(--text); text-align: right; }
.list-row .trail small { display: block; color: var(--dim); }

/* ---------- tabs ---------- */
.tabs { display: flex; gap: 6px; padding: 4px; border-radius: 12px; background: rgba(3, 10, 15, 0.5); border: 1px solid var(--line-soft); overflow-x: auto; }
.tab {
  flex: 1; min-width: max-content; padding: 7px 12px; border-radius: 9px; border: none; background: transparent;
  color: var(--muted); font-size: 13px; font-weight: 600; cursor: pointer; white-space: nowrap;
}
.tab.active { background: var(--card-2); color: var(--text); box-shadow: inset 0 0 0 1px var(--line); }
.tab-panel { display: none; }
.tab-panel.active { display: block; }

/* ---------- stats ---------- */
.stat-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px; }
.stat { padding: 11px 12px; border-radius: 13px; background: rgba(255, 255, 255, 0.03); border: 1px solid var(--line-soft); }
.stat .k { font-size: 11px; color: var(--muted); }
.stat .v { font-size: 17px; font-weight: 650; margin-top: 2px; }
.stat .v.smallish { font-size: 14px; }
.money-big { font-size: 28px; font-weight: 700; letter-spacing: -0.01em; }
.money-big .unit { font-size: 13px; color: var(--muted); font-weight: 500; }

/* ---------- tables ---------- */
.table-wrap { overflow-x: auto; margin: 0 -4px; }
table.data { width: 100%; border-collapse: collapse; font-size: 12px; }
table.data th, table.data td { padding: 8px 6px; text-align: left; border-bottom: 1px solid var(--line-soft); white-space: nowrap; }
table.data th { color: var(--dim); font-weight: 500; font-size: 11px; }
table.data td.num, table.data th.num { text-align: right; }
.empty { padding: 22px 10px; text-align: center; color: var(--dim); font-size: 13px; }

/* ---------- banners ---------- */
.banner {
  display: flex; gap: 10px; align-items: flex-start; padding: 11px 13px; border-radius: 13px;
  font-size: 13px; border: 1px solid var(--line); background: rgba(255, 255, 255, 0.03);
}
.banner .ico { font-size: 16px; line-height: 1.4; }
.banner.warn { border-color: rgba(255, 200, 87, 0.35); background: rgba(255, 200, 87, 0.07); color: #ffe3a3; }
.banner.danger { border-color: rgba(255, 107, 107, 0.35); background: rgba(255, 107, 107, 0.07); color: #ffc0c0; }
.banner.ok { border-color: rgba(74, 222, 128, 0.3); background: rgba(74, 222, 128, 0.06); color: #c3f8d4; }
.banner.info { border-color: rgba(122, 162, 255, 0.35); background: rgba(122, 162, 255, 0.07); color: #cddafd; }

/* ---------- bottom nav ---------- */
.bottom-nav {
  position: fixed; left: 0; right: 0; bottom: 0; z-index: 40;
  display: flex; justify-content: center;
  padding: 6px 12px calc(6px + var(--safe-bottom));
  background: linear-gradient(0deg, rgba(6, 15, 22, 0.98), rgba(6, 15, 22, 0.86) 70%, transparent);
  backdrop-filter: blur(10px);
}
.bottom-nav .inner {
  width: 100%; max-width: 560px; display: flex; gap: 4px; padding: 5px;
  border-radius: 18px; border: 1px solid var(--line); background: rgba(15, 33, 48, 0.92);
}
.nav-item {
  flex: 1; display: flex; flex-direction: column; align-items: center; gap: 2px;
  padding: 6px 2px; border-radius: 12px; color: var(--muted); font-size: 10px; text-decoration: none;
}
.nav-item .ico { font-size: 17px; line-height: 1.1; }
.nav-item.active { color: var(--accent); background: rgba(255, 138, 92, 0.1); }
.nav-item:hover { text-decoration: none; color: var(--text); }

/* ---------- sheets / modal ---------- */
.sheet-mask {
  position: fixed; inset: 0; z-index: 100; background: rgba(2, 8, 12, 0.7);
  display: flex; align-items: flex-end; justify-content: center; padding: 0; backdrop-filter: blur(3px);
}
.sheet {
  width: 100%; max-width: 560px; max-height: 86dvh; overflow-y: auto;
  background: var(--bg-2); border: 1px solid var(--line); border-bottom: none;
  border-radius: 22px 22px 0 0; padding: 18px 18px calc(22px + var(--safe-bottom));
  animation: sheet-up 0.18s ease-out;
}
@keyframes sheet-up { from { transform: translateY(24px); opacity: 0.6; } to { transform: none; opacity: 1; } }
.sheet-head { display: flex; align-items: center; justify-content: space-between; margin-bottom: 12px; }
.sheet-head h2 { margin: 0; font-size: 17px; }
.sheet-close { border: none; background: transparent; color: var(--muted); font-size: 22px; cursor: pointer; padding: 0 4px; }

/* ---------- toast ---------- */
.toast {
  position: fixed; left: 50%; bottom: calc(96px + var(--safe-bottom)); transform: translateX(-50%) translateY(10px);
  z-index: 200; padding: 10px 16px; border-radius: 12px; font-size: 13px; max-width: 88vw;
  background: #17303f; border: 1px solid var(--line); color: var(--text); box-shadow: var(--shadow);
  opacity: 0; pointer-events: none; transition: opacity 0.2s ease, transform 0.2s ease;
}
.toast.show { opacity: 1; transform: translateX(-50%) translateY(0); }
.toast.error { border-color: rgba(255, 107, 107, 0.45); color: #ffc4c4; }
.toast.ok { border-color: rgba(74, 222, 128, 0.4); color: #c8f9d8; }

/* ---------- avatars picker ---------- */
.avatar-picker { display: grid; grid-template-columns: repeat(6, minmax(0, 1fr)); gap: 8px; }
.avatar-option {
  aspect-ratio: 1; border-radius: 50%; border: 2px solid transparent; padding: 0; overflow: hidden;
  background: var(--card-2); cursor: pointer; position: relative;
}
.avatar-option img { width: 100%; height: 100%; object-fit: cover; display: block; }
.avatar-option.selected { border-color: var(--accent); box-shadow: 0 0 0 3px rgba(255, 138, 92, 0.22); }
.avatar-edit { display: flex; gap: 14px; align-items: center; }
.avatar-edit .avatar { border: 2px solid rgba(255, 255, 255, 0.08); }

/* ---------- template cards ---------- */
.template-list { display: flex; flex-direction: column; gap: 8px; }
.template-card {
  display: flex; gap: 11px; align-items: center; width: 100%; text-align: left;
  padding: 11px; border-radius: 15px; border: 1px solid var(--line-soft); background: var(--card);
  color: var(--text); cursor: pointer;
}
.template-card:hover { border-color: rgba(255, 138, 92, 0.4); }
.template-card .name { font-weight: 650; }
.template-card .desc { font-size: 12px; color: var(--muted); }
.template-card .arrow { color: var(--dim); }

/* ---------- misc ---------- */
.divider { height: 1px; background: var(--line-soft); margin: 14px 0; }
.kv { display: flex; justify-content: space-between; gap: 12px; padding: 7px 0; border-bottom: 1px dashed var(--line-soft); font-size: 13px; }
.kv:last-child { border-bottom: none; }
.kv .k { color: var(--muted); }
.kv .v { text-align: right; word-break: break-all; }
.code-block {
  background: #04121a; border: 1px solid var(--line); border-radius: 12px; padding: 10px 12px;
  font-family: "SFMono-Regular", Consolas, monospace; font-size: 11.5px; white-space: pre-wrap;
  word-break: break-word; max-height: 260px; overflow: auto; color: #b9d5e2;
}
.skeleton {
  border-radius: 12px; background: linear-gradient(90deg, #0e2130 25%, #16303f 37%, #0e2130 63%);
  background-size: 400% 100%; animation: shimmer 1.4s ease infinite; height: 14px;
}
@keyframes shimmer { 0% { background-position: 100% 0; } 100% { background-position: 0 0; } }
.fab {
  position: fixed; right: max(16px, calc(50vw - 264px)); bottom: calc(92px + var(--safe-bottom));
  width: 52px; height: 52px; border-radius: 18px; border: none; z-index: 35;
  background: linear-gradient(135deg, #ff9468, #ff7043); color: #1c0d07; font-size: 26px;
  box-shadow: 0 14px 30px rgba(255, 112, 67, 0.32); cursor: pointer;
  display: inline-flex; align-items: center; justify-content: center;
}
.fab:hover { filter: brightness(1.05); }
.file-drop {
  border: 1.5px dashed var(--line); border-radius: 15px; padding: 22px 14px; text-align: center;
  color: var(--muted); cursor: pointer; background: rgba(255, 255, 255, 0.02);
}
.file-drop:hover, .file-drop.drag { border-color: var(--accent); color: var(--text); }
.progress-line { height: 3px; border-radius: 2px; background: rgba(255,255,255,0.08); overflow: hidden; }
.progress-line > i { display: block; height: 100%; background: var(--accent); width: 30%; }
.diff-table td { vertical-align: top; white-space: pre-wrap; word-break: break-word; }
.tag-list { display: flex; flex-wrap: wrap; gap: 6px; }

@media (min-width: 720px) {
  .app-shell { padding-top: 28px; }
  .persona-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .persona-card { height: 100%; }
}

/* ---------- dark-theme checkboxes (native controls are almost invisible) ---------- */
input[type="checkbox"] {
  width: 18px; height: 18px; accent-color: var(--accent); flex: 0 0 auto; cursor: pointer;
}
.template-card input[type="checkbox"] {
  appearance: none; -webkit-appearance: none; width: 20px; height: 20px;
  border: 2px solid var(--line); border-radius: 7px; background: rgba(255,255,255,0.04);
  position: relative; margin: 0; transition: background 0.15s ease, border-color 0.15s ease;
}
.template-card input[type="checkbox"]:hover { border-color: var(--accent); }
.template-card input[type="checkbox"]:checked {
  background: var(--accent); border-color: var(--accent);
}
.template-card input[type="checkbox"]:checked::after {
  content: "✓"; position: absolute; inset: 0; display: flex; align-items: center;
  justify-content: center; color: #1c0d07; font-size: 13px; font-weight: 800; line-height: 1;
}
.checkbox input[type="checkbox"] { appearance: auto; -webkit-appearance: auto; }
.tabs.wrap { flex-wrap: wrap; overflow: visible; }
.tabs.wrap .tab { flex: 0 0 auto; }

/* safety intervention bubble */
.msg.safety .bubble {
  border-color: rgba(255, 107, 107, 0.45);
  background: rgba(255, 107, 107, 0.08);
  color: #ffd6d6;
}
.msg.safety .meta-line { color: #ff9d9d; }
.chat-body .system .bubble { max-width: 100%; }

/* AstrBot install guide */
.timeline { display:flex; flex-direction:column; gap:10px; margin-top:10px; }
.timeline-item { display:flex; gap:10px; align-items:flex-start; }
.timeline-item .time { flex:0 0 46px; color:var(--accent); font-variant-numeric:tabular-nums; font-size:12px; padding-top:2px; }
.code-log { background:#08131b; border:1px solid var(--line); border-radius:10px; padding:10px; font-size:11px; color:#9fd8c8; white-space:pre-wrap; word-break:break-all; margin-top:8px; }

/* ===== anime whale-girl theme (2026-10-28) ===== */
:root {
  --bg: #071225;
  --bg-2: #0a1a35;
  --card: rgba(17, 32, 60, 0.82);
  --card-2: #14284a;
  --line: #2b4a7a;
  --line-soft: rgba(112, 160, 220, 0.18);
  --text: #f4f8ff;
  --muted: #a9bdd9;
  --dim: #7390b3;
  --accent: #ff7eb6;
  --accent-2: #63e6ff;
  --accent-3: #a78bfa;
  --warn: #ffd479;
  --danger: #ff6b8a;
  --ok: #5ee6b0;
  --shadow: 0 22px 55px rgba(2, 8, 24, 0.45);
}
body {
  background:
    radial-gradient(900px 600px at 88% -8%, rgba(255, 126, 182, 0.18), transparent 60%),
    radial-gradient(760px 560px at -10% 8%, rgba(99, 230, 255, 0.14), transparent 58%),
    radial-gradient(640px 480px at 50% 112%, rgba(167, 139, 250, 0.13), transparent 60%),
    var(--bg);
  background-attachment: fixed;
}
body::before {
  content: "";
  position: fixed; inset: 0; z-index: 0; pointer-events: none;
  background-image: radial-gradient(circle, rgba(160, 225, 255, 0.40) 1.2px, transparent 1.6px), url("/static/mascot/hero.svg");
  background-repeat: repeat, no-repeat;
  background-size: 54px 54px, 520px 520px;
  background-position: 0 0, right -120px top 18%;
  opacity: 0.18;
  mask-image: linear-gradient(to bottom, rgba(0,0,0,.9), rgba(0,0,0,.25) 55%, transparent);
}
@media (max-width: 820px) { body::before { background-image: radial-gradient(circle, rgba(160, 225, 255, 0.40) 1.2px, transparent 1.6px); background-size: 54px 54px; } }
.nav-item .ico img { width: 24px; height: 24px; border-radius: 7px; display: block; }
body::after {
  content: "";
  position: fixed; left: -140px; bottom: -180px; width: 420px; height: 420px; z-index: 0;
  background: radial-gradient(circle, rgba(255, 126, 182, 0.18), transparent 68%);
  pointer-events: none; filter: blur(10px);
}
.app-shell { position: relative; z-index: 1; }
.card {
  background: linear-gradient(165deg, rgba(23, 43, 78, 0.92), rgba(12, 25, 48, 0.88));
  border: 1px solid rgba(112, 170, 235, 0.22);
  box-shadow: 0 18px 44px rgba(2, 8, 24, 0.35), inset 0 1px 0 rgba(255, 255, 255, 0.04);
  backdrop-filter: blur(14px);
}
.card.accent {
  border-color: rgba(255, 126, 182, 0.36);
  background: linear-gradient(150deg, rgba(255, 126, 182, 0.14), rgba(12, 25, 48, 0.9) 58%);
}
.btn.primary {
  background: linear-gradient(135deg, #ff9bc7, #ff6f9f 55%, #b47bff);
  border-color: transparent;
  color: #240b1a;
  box-shadow: 0 8px 22px rgba(255, 111, 159, 0.28);
}
.btn.secondary {
  background: rgba(99, 230, 255, 0.10);
  border-color: rgba(99, 230, 255, 0.38);
  color: #c8f8ff;
}
.tab.active { color: #fff; border-color: rgba(255, 126, 182, 0.65); background: rgba(255, 126, 182, 0.14); }
.money-big {
  background: linear-gradient(120deg, #fff, #9ff3ff 45%, #ffb3d2);
  -webkit-background-clip: text; background-clip: text; color: transparent;
}
.login-mascot {
  display: block; width: 190px; height: 190px; margin: 0 auto;
  border-radius: 32px; background: #fff; object-fit: cover;
  border: 2px solid rgba(255,255,255,.65);
  box-shadow: 0 20px 38px rgba(72, 180, 255, 0.35);
  animation: dfy-floaty 5.5s ease-in-out infinite;
}
.anime-hero {
  display: flex; align-items: center; gap: 12px;
  padding: 10px 12px; margin-bottom: 12px;
  border-radius: 20px;
  border: 1px solid rgba(255, 126, 182, 0.30);
  background:
    radial-gradient(300px 160px at 92% 10%, rgba(255, 126, 182, 0.22), transparent 60%),
    linear-gradient(145deg, rgba(28, 52, 92, 0.94), rgba(15, 30, 58, 0.9));
  box-shadow: 0 18px 40px rgba(2, 8, 24, 0.32);
  overflow: hidden;
}
.anime-hero img {
  width: 92px; height: 92px; flex: 0 0 auto; border-radius: 18px;
  border: 1px solid rgba(255, 255, 255, 0.16);
  box-shadow: 0 10px 22px rgba(0,0,0,.28);
}
.hero-name { font-size: 21px; font-weight: 800; letter-spacing: .02em; }
.hero-badge {
  display: inline-block; margin-left: 4px; padding: 1px 8px; border-radius: 999px;
  font-size: 10px; font-weight: 600; vertical-align: middle;
  color: #2a0a1c; background: linear-gradient(120deg, #ffc2dc, #ff8fbb);
}
.sticker-grid { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 8px; }
.sticker-grid a {
  display: flex; flex-direction: column; align-items: center; gap: 4px;
  color: var(--muted); text-decoration: none;
}
.sticker-grid img {
  width: 100%; aspect-ratio: 1; object-fit: cover;
  border-radius: 14px; border: 1px solid rgba(112, 170, 235, 0.22);
  background: #0b1a33; transition: transform .18s ease, border-color .18s ease;
}
.sticker-grid a:hover img { transform: translateY(-2px) scale(1.03); border-color: rgba(255,126,182,.6); }
.sticker-grid span { font-size: 10px; }
.chat-empty { display: flex; flex-direction: column; align-items: center; gap: 4px; padding: 22px 0 8px; }
.chat-empty img { width: 118px; height: 118px; border-radius: 26px; animation: dfy-floaty 5s ease-in-out infinite; filter: drop-shadow(0 12px 22px rgba(80,180,255,.28)); }
@keyframes dfy-floaty { 0%,100% { transform: translateY(0); } 50% { transform: translateY(-7px); } }
@media (max-width: 380px) { .login-mascot { width: 150px; height: 150px; } .anime-hero img { width: 78px; height: 78px; } }

/* anime accents: chat bubbles / send */
.msg.user .bubble {
  background: linear-gradient(135deg, #ff9bc7, #ff6f9f);
  color: #2a0b1a; border-color: transparent;
}
.send-btn {
  background: linear-gradient(135deg, #ff9bc7, #ff6f9f 60%, #b47bff);
  color: #2a0b1a;
  box-shadow: 0 8px 20px rgba(255,111,159,.28);
}



/* ============================================================
   蓝白二次元皮肤（Dafeiyu Blue-White Anime Skin）
   ============================================================ */
:root {
  --bg: #f4fbff;
  --bg-2: #e8f5ff;
  --card: #ffffff;
  --card-2: #f3fbff;
  --line: #b9dcff;
  --line-soft: #dcefff;
  --text: #123452;
  --muted: #5d7f9e;
  --dim: #89a7c1;
  --accent: #2478e8;
  --accent-2: #00a7c4;
  --accent-3: #7bc7ff;
  --warn: #e7a51a;
  --danger: #e44f5f;
  --ok: #1e9e63;
  --shadow: 0 18px 42px rgba(35, 111, 205, 0.16);
  color-scheme: light;
}
html { color-scheme: light; }
body {
  background:
    radial-gradient(820px 460px at 92% -8%, rgba(123, 199, 255, 0.55), transparent 62%),
    radial-gradient(720px 460px at -12% 10%, rgba(0, 167, 196, 0.18), transparent 60%),
    linear-gradient(180deg, #fbfeff 0%, #eef9ff 45%, #e4f4ff 100%);
  color: var(--text);
}
body::after {
  content: "";
  position: fixed; inset: 0; z-index: -1; pointer-events: none;
  background-image:
    radial-gradient(circle, rgba(36, 120, 232, 0.13) 1.1px, transparent 1.4px),
    linear-gradient(115deg, transparent 48%, rgba(255,255,255,.55) 49%, transparent 50%);
  background-size: 18px 18px, 240px 240px;
  opacity: .42;
  mask-image: linear-gradient(to bottom, rgba(0,0,0,.65), transparent 80%);
}
a { color: #0b79c9; }
.topbar {
  background: linear-gradient(180deg, rgba(255,255,255,.96), rgba(244,251,255,.86) 72%, transparent);
  border-bottom: 1px solid rgba(185, 220, 255, .55);
}
.topbar .title { color: #0f3457; letter-spacing: .2px; }
.topbar .sub { color: #5b83a7; }

.card {
  background: linear-gradient(180deg, #ffffff 0%, #f6fcff 100%);
  border: 1px solid rgba(146, 199, 247, .72);
  box-shadow: 0 14px 34px rgba(45, 121, 201, .12), inset 0 1px 0 rgba(255,255,255,.9);
}
.card.accent {
  background:
    radial-gradient(420px 220px at 100% 0%, rgba(123, 199, 255, .30), transparent 65%),
    linear-gradient(180deg, #ffffff, #eef9ff);
  border-color: rgba(87, 166, 238, .8);
}
.card-title h3 { color: #103a61; }
.stat {
  background: rgba(255, 255, 255, .86);
  border: 1px solid rgba(185, 220, 255, .85);
  box-shadow: inset 0 1px 0 rgba(255,255,255,.9);
}
.stat .k { color: #6f92b0; }
.stat .v { color: #0e3a61; }
.btn {
  background: #ffffff;
  border: 1px solid #b9dcff;
  color: #15537f;
  box-shadow: 0 4px 12px rgba(45,121,201,.08);
}
.btn:hover { background: #f2faff; }
.btn.primary {
  background: linear-gradient(135deg, #3d9bff 0%, #2478e8 55%, #0b63cf 100%);
  border-color: transparent;
  color: #fff;
  box-shadow: 0 10px 22px rgba(36, 120, 232, .30);
}
.btn.primary:hover { filter: brightness(1.04); }
.btn.ghost { background: rgba(255,255,255,.55); color: #38698f; }
.icon-btn { background: #fff; border-color: #c6e3ff; color: #1c5f99; }
.icon-btn.ghost { background: rgba(255,255,255,.55); }
.input, .textarea, .select {
  background: #fff;
  border: 1px solid #b9dcff;
  color: #123452;
  box-shadow: inset 0 1px 2px rgba(45,121,201,.06);
}
.input::placeholder, .textarea::placeholder { color: #9bb8d1; }
.input:focus, .textarea:focus, .select:focus {
  border-color: #4d9df0;
  box-shadow: 0 0 0 3px rgba(77,157,240,.18);
}
.chip { background: #f2faff; border-color: #c5e3ff; color: #39709a; }
.chip.accent { background: #eaf5ff; border-color: #9bcdfb; color: #1769b0; }
.chip.ok { background: #e9fbf2; border-color: #9fe2c0; color: #148052; }
.chip.warn { background: #fff8e6; border-color: #f0d48b; color: #9b6a08; }
.chip.danger, .chip.bad { background: #fff0f1; border-color: #f2b8bf; color: #b62e3d; }
.chip.teal { background: #e8fbff; border-color: #9fe4ef; color: #08748a; }
.banner {
  background: rgba(255,255,255,.8);
  border: 1px solid #c3e2ff;
  color: #2b5f88;
}
.banner.info { background: #eef8ff; border-color: #b7dcff; color: #245f92; }
.banner.warn { background: #fff8e6; border-color: #f0d48b; color: #8b6008; }
.banner.danger { background: #fff0f1; border-color: #f2b8bf; color: #a82a38; }
.banner.ok { background: #eafbf3; border-color: #a7e4c4; color: #14744d; }
.progress { background: #e4f2ff; border: 1px solid #cbe6ff; }
.progress .bar { background: linear-gradient(90deg, #7bc7ff, #2478e8); }
.code-log {
  background: #f7fcff; border: 1px solid #cbe6ff; color: #245f8b;
}
.bottom-nav {
  background: linear-gradient(0deg, rgba(255,255,255,.98), rgba(244,251,255,.9) 72%, transparent);
  border-top: 1px solid rgba(185,220,255,.55);
}
.bottom-nav .inner { background: rgba(255,255,255,.94); border-color: #c6e3ff; box-shadow: 0 10px 26px rgba(45,121,201,.14); }
.nav-item { color: #6b90ae; }
.nav-item.active { color: #1268c4; background: #e8f4ff; }
.sheet { background: #f7fcff; border-color: #c6e3ff; }
.sheet-mask { background: rgba(20, 60, 100, .30); }
.msg .bubble {
  background: #ffffff;
  border: 1px solid #c6e3ff;
  color: #153a5b;
  box-shadow: 0 5px 14px rgba(45,121,201,.10);
}
.msg.user .bubble {
  background: linear-gradient(135deg, #56adff, #2478e8);
  border-color: transparent;
  color: #fff;
  box-shadow: 0 8px 18px rgba(36,120,232,.25);
}
.msg.system .bubble { background: #fff8e6; border-color: #f0d48b; color: #8b6008; }
.anime-hero {
  background:
    radial-gradient(240px 130px at 100% 0%, rgba(123,199,255,.40), transparent 70%),
    linear-gradient(135deg, #ffffff, #eaf7ff);
  border: 1px solid #b9dcff;
  box-shadow: 0 12px 28px rgba(45,121,201,.12);
}
.hero-name { color: #0d3a61; }
.hero-badge { background: #e5f3ff; color: #1b6db8; border: 1px solid #b9dcff; }
.sticker-grid a { background: #fff; border-color: #c6e3ff; box-shadow: 0 6px 16px rgba(45,121,201,.08); }
.sticker-grid span { color: #477493; }
.login-mascot { border-color: #d7ecff; box-shadow: 0 18px 38px rgba(45,121,201,.22); }
.timeline-item { border-left-color: #a9d6ff; }
.timeline .time { color: #2478e8; }
code { background: #eef8ff; color: #145f9e; }

/* ============================================================
   白底漫画 / 贴纸风（Manga Sticker Skin）
   ============================================================ */
:root {
  --ink: #0a3358;
  --ink-soft: #2f5f8d;
  --paper: #fbfdff;
  --bg: #f3faff;
  --bg-2: #eaf6ff;
  --card: #ffffff;
  --card-2: #f7fcff;
  --line: #0a3358;
  --line-soft: #b9dcff;
  --text: #0a3358;
  --muted: #4f7393;
  --dim: #7e9db8;
  --accent: #1f74d8;
  --accent-2: #0a9fbd;
  --accent-3: #79c5ff;
  --warn: #c88700;
  --danger: #d33b4c;
  --ok: #158557;
  --shadow: 7px 7px 0 rgba(10, 51, 88, .14);
  --comic-font: "Comic Sans MS", "Segoe Print", "Microsoft YaHei", "PingFang SC", sans-serif;
  color-scheme: light;
}
body {
  background-color: #f3faff;
  background-image:
    radial-gradient(circle at 18% 12%, rgba(121, 197, 255, .28), transparent 28%),
    radial-gradient(circle at 88% 4%, rgba(10, 159, 189, .16), transparent 24%),
    radial-gradient(rgba(10, 51, 88, .10) 1px, transparent 1.2px);
  background-size: auto, auto, 15px 15px;
}
body::after {
  content: "";
  position: fixed; inset: 0; z-index: -1; pointer-events: none;
  background:
    repeating-linear-gradient(115deg, transparent 0 46px, rgba(31,116,216,.05) 47px 48px, transparent 49px 92px);
  opacity: .7;
}
.card {
  border: 2px solid var(--ink);
  border-radius: 22px 26px 20px 24px;
  box-shadow: 7px 7px 0 rgba(10, 51, 88, .14);
  background: #fff;
}
.card.accent {
  box-shadow: 8px 8px 0 rgba(31, 116, 216, .18);
  background:
    radial-gradient(340px 180px at 100% 0%, rgba(121,197,255,.28), transparent 65%),
    #fff;
}
.card-title h3 {
  font-family: var(--comic-font);
  font-weight: 900;
  letter-spacing: .4px;
}
.card-title h3::after {
  content: "";
  display: block; width: 46px; height: 4px; margin-top: 3px;
  border-radius: 3px; background: var(--accent);
  transform: rotate(-2.5deg);
}
.btn {
  border: 2px solid var(--ink);
  border-radius: 13px 15px 12px 14px;
  box-shadow: 3px 3px 0 rgba(10, 51, 88, .18);
  font-family: var(--comic-font);
  font-weight: 800;
  transition: transform .08s ease, box-shadow .08s ease;
}
.btn:hover { transform: translate(-1px, -1px); box-shadow: 5px 5px 0 rgba(10,51,88,.18); }
.btn:active { transform: translate(2px, 2px); box-shadow: 1px 1px 0 rgba(10,51,88,.18); }
.btn.primary {
  background: linear-gradient(180deg, #2b8bf3, #1f74d8);
  color: #fff;
  border-color: var(--ink);
  box-shadow: 4px 4px 0 rgba(10, 51, 88, .26);
}
.btn.ghost { background: #fff; color: var(--ink); }
.chip {
  border: 2px solid var(--ink);
  border-radius: 999px;
  font-family: var(--comic-font);
  font-weight: 800;
  box-shadow: 2px 2px 0 rgba(10, 51, 88, .14);
  transform: rotate(-1.5deg);
}
.chip.ok { background: #e9fbf2; color: #14724d; border-color: #0f6b49; }
.chip.warn { background: #fff6d9; color: #8a5c00; border-color: #8a5c00; }
.chip.bad, .chip.danger { background: #fff0f2; color: #a92b3a; border-color: #a92b3a; }
.stat {
  border: 2px solid #a9d2f5;
  border-radius: 15px 18px 14px 17px;
  box-shadow: 3px 3px 0 rgba(10, 51, 88, .10);
  background: #fff;
}
.input, .textarea, .select {
  border: 2px solid var(--ink);
  border-radius: 13px 15px 12px 14px;
  box-shadow: 3px 3px 0 rgba(10, 51, 88, .10);
  background: #fff;
}
.input:focus, .textarea:focus, .select:focus {
  border-color: var(--accent);
  box-shadow: 0 0 0 4px rgba(121,197,255,.35), 3px 3px 0 rgba(10,51,88,.10);
}
.banner {
  border: 2px solid var(--ink);
  border-radius: 15px 18px 14px 17px;
  box-shadow: 4px 4px 0 rgba(10, 51, 88, .12);
  font-weight: 600;
}
.progress { border: 2px solid var(--ink); border-radius: 999px; background:#fff; }
.progress .bar { background: repeating-linear-gradient(45deg, #2b8bf3 0 8px, #4ba4ff 8px 16px); }
.code-log { border: 2px solid var(--ink); border-radius: 13px; background:#f7fcff; }
.topbar {
  border-bottom: 2px solid var(--ink);
  background: linear-gradient(180deg, rgba(255,255,255,.98), rgba(255,255,255,.9) 75%, transparent);
}
.topbar .title { font-family: var(--comic-font); font-weight: 900; letter-spacing: .5px; }
.bottom-nav { border-top: 2px solid var(--ink); }
.bottom-nav .inner {
  border: 2px solid var(--ink);
  box-shadow: 4px 4px 0 rgba(10,51,88,.14);
  background: #fff;
}
.nav-item { font-family: var(--comic-font); font-weight: 800; }
.nav-item.active { background: #e8f4ff; color: #135fae; border: 1.5px solid #9cc8f5; }
.anime-hero {
  position: relative;
  overflow: visible;
  border: 2px solid var(--ink);
  border-radius: 22px 26px 20px 24px;
  box-shadow: 7px 7px 0 rgba(10, 51, 88, .14);
  padding: 16px;
}
.anime-hero img {
  border: 2px solid var(--ink);
  border-radius: 18px;
  background: #fff;
  transform: rotate(-2deg);
  box-shadow: 3px 3px 0 rgba(10,51,88,.12);
}
.hero-name { font-family: var(--comic-font); font-weight: 900; }
.hero-badge {
  border: 2px solid var(--ink);
  border-radius: 999px;
  font-weight: 800;
  transform: rotate(-2deg);
  display: inline-block;
}
.manga-bubble {
  position: relative;
  display: inline-block;
  width: max-content;
  max-width: 220px;
  padding: 8px 13px;
  border: 2.5px solid var(--ink);
  border-radius: 18px 20px 16px 19px;
  background: #fff;
  color: var(--ink);
  font-family: var(--comic-font);
  font-weight: 900;
  font-size: 13px;
  line-height: 1.35;
  box-shadow: 3px 3px 0 rgba(10,51,88,.14);
  transform: rotate(-2deg);
  z-index: 3;
}
.manga-bubble::after {
  content: "";
  position: absolute;
  left: 26px; bottom: -11px;
  width: 16px; height: 16px;
  background: #fff;
  border-right: 2.5px solid var(--ink);
  border-bottom: 2.5px solid var(--ink);
  transform: rotate(45deg);
}
.hero-bubble { position: absolute; top: -16px; right: 12px; }
.login-bubble {
  margin: -12px auto 12px;
  display: block;
  position: relative;
  z-index: 3;
}
.login-bubble::after { left: 50%; margin-left: -8px; }
.login-mascot {
  border: 3px solid var(--ink);
  border-radius: 26px 30px 24px 28px;
  box-shadow: 7px 7px 0 rgba(10,51,88,.16);
  transform: rotate(-1.5deg);
}
.sticker-grid a {
  border: 2px solid var(--ink);
  border-radius: 15px 18px 14px 17px;
  box-shadow: 3px 3px 0 rgba(10,51,88,.12);
  background: #fff;
  transition: transform .1s ease;
}
.sticker-grid a:nth-child(odd) { transform: rotate(-1.5deg); }
.sticker-grid a:nth-child(even) { transform: rotate(1.2deg); }
.sticker-grid a:hover { transform: rotate(0) translateY(-2px); }
.sticker-grid img { border: 1.5px solid var(--ink); border-radius: 10px; }
.sticker-grid span { font-family: var(--comic-font); font-weight: 800; }
.msg .bubble {
  border: 2px solid var(--ink);
  border-radius: 16px 18px 14px 17px;
  box-shadow: 3px 3px 0 rgba(10,51,88,.10);
}
.msg.user .bubble { border-color: var(--ink); }
.sheet { border: 2px solid var(--ink); box-shadow: 7px 7px 0 rgba(10,51,88,.14); }
.timeline-item { border-left: 3px solid #9cc8f5; }
.timeline .time { font-family: var(--comic-font); font-weight: 900; }
h1, h2, h3, .title { font-family: var(--comic-font); }

.login-mascot.comic-mascot {
  width: min(320px, 88vw);
  height: auto;
  border: 0;
  border-radius: 24px;
  box-shadow: 7px 7px 0 rgba(10, 51, 88, .14);
  transform: rotate(-1deg);
  background: #fff;
}

.login-mascot.comic-mascot { width: min(390px, 92vw); }
.login-tabs .tab, .tab {
  border: 2px solid var(--ink);
  border-radius: 12px 14px 11px 13px;
  font-family: var(--comic-font);
  font-weight: 800;
  background: #fff;
  color: var(--ink);
}
.tab.active {
  background: linear-gradient(180deg, #2b8bf3, #1f74d8);
  color: #fff;
  box-shadow: 3px 3px 0 rgba(10,51,88,.18);
}

:root { --comic-font: "Comic Sans MS", "YouYuan", "幼圆", "Microsoft YaHei", "PingFang SC", sans-serif; }
.manga-strip {
  position: relative;
  height: 270px;
  margin: 14px 0 16px;
  border: 2.5px solid var(--ink);
  border-radius: 22px 26px 20px 24px;
  overflow: hidden;
  background: #fff;
  box-shadow: 7px 7px 0 rgba(10, 51, 88, .14);
  transform: rotate(-.5deg);
}
.manga-strip img {
  width: 100%; height: 100%; object-fit: cover; object-position: center 38%;
  display: block;
}
.manga-strip-label {
  position: absolute; left: 12px; bottom: 10px;
  padding: 5px 11px;
  background: #fff;
  border: 2px solid var(--ink);
  border-radius: 10px 13px 9px 12px;
  font-family: var(--comic-font);
  font-weight: 900;
  font-size: 12px;
  color: var(--ink);
  box-shadow: 3px 3px 0 rgba(10,51,88,.16);
  transform: rotate(-2deg);
}
.hero-bubble { top: -14px; right: 10px; }
@media (max-width: 420px) {
  .manga-strip { height: 220px; }
  .manga-strip img { object-position: center 35%; }
}

.manga-strip.compact { height: 210px; margin-top: 10px; }
.manga-strip.compact img { object-position: center 34%; }

@media (min-width: 900px) {
  .app-shell { max-width: 760px; padding-top: 24px; }
  .bottom-nav .inner, .sheet { max-width: 760px; }
  .manga-strip { height: 320px; }
  .manga-strip img { object-position: center 40%; }
}

.connect-guide { margin-bottom: 14px; }
.guide-steps { display: grid; gap: 8px; margin-top: 12px; }
.guide-step {
  display: flex; align-items: flex-start; gap: 9px;
  padding: 8px 10px; border: 2px solid var(--ink);
  border-radius: 12px 14px 11px 13px; background: #fff;
  box-shadow: 3px 3px 0 rgba(10,51,88,.10);
}
.guide-num {
  flex: 0 0 22px; width: 22px; height: 22px; border-radius: 50%;
  background: var(--accent); color: #fff; border: 2px solid var(--ink);
  display: inline-flex; align-items: center; justify-content: center;
  font-weight: 900; font-family: var(--comic-font);
}

.connect-hero {
  position: relative;
  display: flex; align-items: center; gap: 12px;
  margin: 6px 0 16px;
  padding: 18px 16px;
  border: 3px solid var(--ink);
  border-radius: 24px 28px 22px 26px;
  background:
    radial-gradient(260px 160px at 100% 0%, rgba(255,255,255,.35), transparent 65%),
    linear-gradient(135deg, #2b8bf3, #135fc4);
  color: #fff;
  box-shadow: 8px 8px 0 rgba(10,51,88,.22);
  overflow: hidden;
}
.connect-hero-copy { position: relative; z-index: 2; flex: 1; }
.connect-kicker {
  display: inline-block; padding: 3px 9px; margin-bottom: 8px;
  background: #fff; color: #135fc4; border: 2px solid var(--ink);
  border-radius: 999px; font-family: var(--comic-font); font-weight: 900; font-size: 11px;
  transform: rotate(-1.5deg);
}
.connect-hero h2 {
  color: #fff; font-family: var(--comic-font); font-weight: 900;
  font-size: 24px; line-height: 1.2; margin-bottom: 6px;
  text-shadow: 2px 2px 0 rgba(10,51,88,.35);
}
.connect-hero p { color: rgba(255,255,255,.92); font-size: 12px; line-height: 1.5; margin-bottom: 12px; }
.connect-hero-btn {
  background: #fff; color: #0f4f9e; border: 2px solid var(--ink);
  box-shadow: 4px 4px 0 rgba(10,51,88,.28);
  font-size: 15px; padding: 11px 15px;
}
.connect-hero-art {
  position: absolute; right: -12px; bottom: -10px;
  width: 145px; height: 145px; object-fit: contain;
  opacity: .92; transform: rotate(3deg);
  filter: drop-shadow(0 8px 12px rgba(0,0,0,.20));
  pointer-events: none;
}
@media (max-width: 380px) {
  .connect-hero-art { width: 105px; height: 105px; right: -8px; bottom: -6px; }
  .connect-hero h2 { font-size: 21px; }
}

.connect-fab {
  position: fixed; right: 14px; bottom: calc(82px + var(--safe-bottom));
  z-index: 45;
  display: inline-flex; align-items: center; gap: 5px;
  padding: 10px 14px;
  background: linear-gradient(180deg, #2b8bf3, #135fc4);
  color: #fff !important;
  border: 2px solid var(--ink);
  border-radius: 999px;
  font-family: var(--comic-font);
  font-weight: 900;
  font-size: 13px;
  text-decoration: none !important;
  box-shadow: 4px 4px 0 rgba(10,51,88,.22);
}
.connect-fab .ico { font-size: 15px; }
/* Local companion inbox: the badge only reflects persisted App messages. */
.bottom-nav .ico { position: relative; }
.nav-unread { position: absolute; top: -5px; right: -12px; min-width: 17px; padding: 1px 4px; border-radius: 12px; background: #a63850; color: #fff; font: 700 10px/15px sans-serif; text-align: center; border: 1px solid #fff; }
.nav-unread[hidden] { display: none; }
