
@font-face {
  font-family: "Inter Variable";
  src: url("../vendor/fonts/inter-latin-wght-normal.woff2") format("woff2-variations");
  font-weight: 100 900;
  font-style: normal;
  font-display: swap;
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}
@font-face {
  font-family: "JetBrains Mono Variable";
  src: url("../vendor/fonts/jetbrains-mono-latin-wght-normal.woff2") format("woff2-variations");
  font-weight: 100 800;
  font-style: normal;
  font-display: swap;
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}

:root {
  color-scheme: light;

  --bg: #f5f3ee;
  --surface: #ffffff;
  --surface-2: #f6f4ef;
  --surface-3: #edeae2;
  --line: #e5e2d8;
  --line-strong: #d4d0c3;
  --text: #26281f;
  --text-2: #565a4c;
  --text-3: #8b8f80;

  --accent: #20634b;
  --accent-hover: #174d3b;
  --accent-soft: #e9f0ea;
  --accent-soft-2: #d7e5da;
  --accent-text: #1e5c46;
  --ring: rgba(32, 99, 75, 0.15);

  --ok: #2e7d46;
  --ok-soft: #eef6ee;
  --ok-line: #cde4d2;
  --warn: #96611a;
  --warn-soft: #faf3e0;
  --warn-line: #e7d8ab;
  --err: #b03a2a;
  --err-hover: #8f2e20;
  --err-soft: #fbeeec;
  --err-line: #ecc7bf;

  --ink: #181e19;
  --ink-2: #20281f;
  --ink-line: #2b332a;
  --ink-text: #d8ddd2;
  --ink-mut: #8b948a;
  --ink-accent: #79b39a;

  --radius-s: 5px;
  --radius: 8px;
  --radius-l: 12px;

  --glass: rgba(255, 255, 255, 0.84);
  --glass-2: rgba(255, 255, 255, 0.68);
  --glass-line: rgba(229, 226, 216, 0.9);
  --blur: 12px;
  --shadow-1: 0 1px 2px rgba(30, 33, 24, 0.05);
  --shadow-2: 0 1px 2px rgba(30, 33, 24, 0.04), 0 10px 28px rgba(30, 33, 24, 0.08);
  --shadow-3: 0 6px 16px rgba(30, 33, 24, 0.09), 0 24px 56px rgba(30, 33, 24, 0.15);
  --glow: 0 0 0 1px rgba(32, 99, 75, 0.18), 0 8px 30px rgba(32, 99, 75, 0.16);
  --font: 13.5px/1.65 "Inter Variable", "Inter", system-ui, "Segoe UI", "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei", sans-serif;
  --mono: "JetBrains Mono Variable", ui-monospace, "Cascadia Mono", Consolas, "Courier New", monospace;
}

* { box-sizing: border-box; scrollbar-width: thin; scrollbar-color: #c9c5b7 transparent; }
html, body { height: 100%; }

body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font: var(--font);
  -moz-osx-font-smoothing: grayscale;
  text-rendering: optimizeLegibility;
}

::selection { background: rgba(32, 99, 75, 0.22); }

a { color: var(--accent-text); text-decoration: none; }
a:hover { text-decoration: underline; }
h1, h2, h3 { line-height: 1.35; }

.hidden { display: none !important; }
.muted { color: var(--text-3); font-size: 12px; }
.mono { font-family: var(--mono); }
.grow { flex: 1 1 auto; }

#main-view { display: flex; min-height: 100vh; }

#sidebar {
  width: 232px;
  flex: 0 0 auto;
  display: flex;
  flex-direction: column;
  gap: 6px;
  padding: 18px 12px 14px;
  background: var(--ink);
  color: var(--ink-text);
  position: sticky;
  top: 0;
  height: 100vh;
  overflow-y: auto;
}

.brand-block {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 0 8px 14px;
}
.brand-logo {
  width: 32px;
  height: 32px;
  flex: 0 0 auto;
  border-radius: 8px;
  background: var(--accent);
  display: grid;
  place-items: center;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.14);
}
.brand-logo svg { width: 18px; height: 18px; }
.brand-text {
  font-size: 14.5px;
  font-weight: 650;
  letter-spacing: 0.02em;
  color: #eef1ea;
}

#nav { display: flex; flex-direction: column; gap: 2px; }
.nav-group {
  margin: 16px 10px 5px;
  font-size: 10.5px;
  font-weight: 600;
  letter-spacing: 0.12em;
  color: var(--ink-mut);
}
.nav-group:first-child { margin-top: 4px; }
#nav a {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 7px 10px;
  border-radius: 7px;
  color: var(--ink-text);
  font-size: 13px;
  font-weight: 500;
  position: relative;
  transition: background 0.16s ease, color 0.16s ease, transform 0.16s ease;
}
#nav a:hover { background: var(--ink-2); color: #eef1ea; text-decoration: none; transform: translateX(3px); }
#nav a.on {
  background: linear-gradient(90deg, rgba(121, 179, 154, 0.2), rgba(121, 179, 154, 0.07));
  color: #f4f8f3;
  font-weight: 600;
  box-shadow: inset 2px 0 0 var(--ink-accent);
}
#nav a.on::after {
  content: "";
  position: absolute;
  right: 9px;
  top: 50%;
  width: 5px;
  height: 5px;
  margin-top: -2.5px;
  border-radius: 50%;
  background: var(--ink-accent);
  box-shadow: 0 0 8px rgba(121, 179, 154, 0.9);
  animation: dot-pulse 2.2s ease-in-out infinite;
}
#nav a.on .nav-ico { color: var(--ink-accent); }
.nav-ico { display: inline-grid; place-items: center; flex: 0 0 auto; color: var(--ink-mut); transition: color 0.16s ease, transform 0.2s ease; }
#nav a:hover .nav-ico { color: var(--ink-accent); transform: scale(1.12); }
.nav-ico svg, svg.nav-ico { width: 15px; height: 15px; }

#sidebar-footer {
  margin-top: auto;
  padding-top: 12px;
  display: flex;
  flex-direction: column;
  gap: 8px;
  border-top: 1px solid var(--ink-line);
}

.user-card {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 9px 10px;
  background: var(--ink-2);
  border: 1px solid var(--ink-line);
  border-radius: 9px;
}
.avatar {
  width: 32px;
  height: 32px;
  flex: 0 0 auto;
  border-radius: 7px;
  background: #2b3a31;
  color: #a3d2bc;
  font-weight: 700;
  font-size: 14px;
  display: grid;
  place-items: center;
  text-transform: uppercase;
}
.u-meta { display: flex; flex-direction: column; min-width: 0; flex: 1; }
.u-name { font-size: 13px; font-weight: 600; color: #e8ece2; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.u-credits { color: var(--ink-mut); font-size: 11.5px; font-variant-numeric: tabular-nums; }
.u-badges { display: flex; flex-wrap: wrap; gap: 4px; margin-top: 4px; }
.badge {
  display: inline-block;
  padding: 0 6px;
  border-radius: 4px;
  font-size: 10.5px;
  line-height: 16px;
  background: rgba(121, 179, 154, 0.16);
  color: #a9d3bd;
}
.badge.warn { background: rgba(201, 162, 39, 0.16); color: #d9c07a; }

#content { flex: 1 1 auto; min-width: 0; padding: 28px 34px 44px; max-width: 1220px; width: 100%; margin: 0 auto; }

.page-head {
  display: flex;
  align-items: flex-end;
  gap: 16px;
  margin: 2px 0 20px;
}
.ph-title {
  margin: 0;
  font-size: 19px;
  font-weight: 650;
  letter-spacing: -0.015em;
  line-height: 1.3;
}
.ph-desc { margin: 3px 0 0; color: var(--text-3); font-size: 12.5px; }
.ph-actions { margin-left: auto; display: flex; gap: 8px; align-items: center; flex-wrap: wrap; }

.crumb { font-size: 12.5px; color: var(--text-3); display: inline-block; margin-bottom: 10px; }
.crumb:hover { color: var(--accent-text); }

.card {
  background: var(--glass);
  border: 1px solid var(--glass-line);
  border-radius: 12px;
  padding: 18px;
  margin-bottom: 16px;
  box-shadow: var(--shadow-1);
  backdrop-filter: blur(var(--blur)) saturate(1.15);
  min-width: 0;
  transition: transform 0.22s cubic-bezier(0.22, 1, 0.36, 1), box-shadow 0.22s ease, border-color 0.22s ease;
}
.card:hover {
  transform: translateY(-2px);
  box-shadow: var(--shadow-2);
  border-color: var(--accent-soft-2);
}
.card > h2 {
  margin: -2px -18px 16px;
  padding: 0 18px 11px;
  border-bottom: 1px solid var(--line);
  font-size: 13.5px;
  font-weight: 600;
  letter-spacing: 0.01em;
  color: var(--text);
  display: flex;
  align-items: center;
  gap: 8px;
}
.card > h2 .muted { font-weight: 400; }

.row { display: flex; gap: 10px; flex-wrap: wrap; align-items: center; }
.stack { display: flex; flex-direction: column; gap: 10px; }
.grid2 { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }

button {
  appearance: none;
  background: var(--surface);
  border: 1px solid var(--line-strong);
  color: var(--text);
  border-radius: 7px;
  padding: 7px 14px;
  font-size: 13px;
  font-family: inherit;
  font-weight: 500;
  line-height: 1.5;
  cursor: pointer;
  box-shadow: none;
  position: relative;
  overflow: hidden;
  transition: background 0.15s ease, border-color 0.15s ease, color 0.15s ease,
    transform 0.15s ease, box-shadow 0.15s ease;
}
button:hover { background: var(--surface-2); border-color: #c2beb0; }
button:focus-visible { outline: none; border-color: var(--accent); box-shadow: 0 0 0 3px var(--ring); }
button:active { background: var(--surface-3); transform: translateY(1px) scale(0.985); }
button:disabled { opacity: 0.45; cursor: not-allowed; transform: none; }

button.primary {
  background: linear-gradient(135deg, #2a7258, var(--accent) 55%, var(--accent-hover));
  border-color: var(--accent);
  color: #fff;
  font-weight: 600;
  box-shadow: 0 1px 2px rgba(23, 77, 59, 0.25), inset 0 1px 0 rgba(255, 255, 255, 0.16);
}
button.primary:hover {
  background: linear-gradient(135deg, #2f8063, var(--accent-hover));
  border-color: var(--accent-hover);
  box-shadow: 0 4px 14px rgba(32, 99, 75, 0.32), inset 0 1px 0 rgba(255, 255, 255, 0.16);
  transform: translateY(-1px);
}
button.primary:active { background: var(--accent-hover); transform: translateY(0) scale(0.985); }
button.primary:focus-visible { outline: none; border-color: var(--accent); box-shadow: 0 0 0 3px var(--ring), 0 4px 14px rgba(32, 99, 75, 0.28); }

button.ghost { background: transparent; border-color: transparent; }
button.ghost:hover { background: var(--surface-3); border-color: transparent; }
button.ghost:active { background: var(--line); }

button.danger {
  background: var(--surface);
  border-color: var(--err-line);
  color: var(--err);
}
button.danger:hover { background: var(--err-soft); border-color: #e0b0a6; color: var(--err-hover); }
button.danger:focus-visible { border-color: var(--err); box-shadow: 0 0 0 3px rgba(176, 58, 42, 0.15); }

button.small-btn { padding: 3px 10px; font-size: 12px; border-radius: 6px; }
button.block { width: 100%; }

input, select, textarea {
  background: var(--surface);
  border: 1px solid var(--line-strong);
  color: var(--text);
  border-radius: 7px;
  padding: 8px 11px;
  font-size: 13px;
  font-family: inherit;
  width: 100%;
  transition: border-color 0.13s ease, box-shadow 0.13s ease;
}
input::placeholder, textarea::placeholder { color: #a9a796; }
input:hover, select:hover, textarea:hover { border-color: #c2beb0; }
input:focus, select:focus, textarea:focus {
  outline: none;
  border-color: var(--accent);
  box-shadow: 0 0 0 3px var(--ring);
}
textarea { resize: vertical; min-height: 90px; }
label.check { display: flex; gap: 8px; align-items: center; font-size: 13px; color: var(--text-2); cursor: pointer; }
label.check input { width: auto; accent-color: var(--accent); }

.fld { display: flex; flex-direction: column; gap: 5px; }
.fld label { font-size: 12px; font-weight: 600; color: var(--text-2); letter-spacing: 0.02em; }

table { width: 100%; border-collapse: collapse; font-size: 13px; }
th, td {
  text-align: left;
  padding: 9px 12px;
  border-bottom: 1px solid var(--line);
  vertical-align: top;
}
th {
  color: var(--text-3);
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.07em;
  white-space: nowrap;
  border-bottom-color: var(--line-strong);
  padding-top: 4px;
  background: linear-gradient(180deg, var(--surface-2), transparent);
}
tbody tr { transition: background 0.15s ease, box-shadow 0.15s ease; }
tbody tr:hover td { background: var(--surface-2); }
tbody tr:hover td:first-child { box-shadow: inset 2px 0 0 var(--accent-soft-2); }
td.mono { font-size: 12px; }
.tbl-wrap { overflow-x: auto; border-radius: 8px; max-width: 100%; min-width: 0; }
.tbl-wrap table { min-width: 640px; }

.tag {
  display: inline-block;
  border-radius: 4px;
  padding: 1px 8px;
  font-size: 11.5px;
  line-height: 19px;
  background: var(--surface-3);
  border: 1px solid var(--line);
  color: var(--text-2);
  margin-right: 4px;
  white-space: nowrap;
}
.tag.ok { color: var(--ok); background: var(--ok-soft); border-color: var(--ok-line); }
.tag.err { color: var(--err); background: var(--err-soft); border-color: var(--err-line); }
.tag.warn { color: var(--warn); background: var(--warn-soft); border-color: var(--warn-line); }
.dot { display: inline-block; width: 8px; height: 8px; border-radius: 50%; margin-right: 6px; }

.stat-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(158px, 1fr)); gap: 12px; margin-bottom: 16px; }
.stat {
  background: var(--glass);
  border: 1px solid var(--glass-line);
  border-radius: 12px;
  padding: 13px 16px 12px;
  box-shadow: var(--shadow-1);
  backdrop-filter: blur(var(--blur)) saturate(1.15);
  position: relative;
  overflow: hidden;
  transition: transform 0.22s cubic-bezier(0.22, 1, 0.36, 1), box-shadow 0.22s ease, border-color 0.22s ease;
}
.stat:hover { transform: translateY(-3px); box-shadow: var(--shadow-2); border-color: var(--accent-soft-2); }

.stat::after {
  content: "";
  position: absolute;
  left: 0;
  right: 0;
  top: 0;
  height: 2px;
  background: linear-gradient(90deg, transparent, var(--accent) 45%, #58a488 70%, transparent);
  opacity: 0.35;
  transform: scaleX(0.25);
  transform-origin: left;
  transition: opacity 0.3s ease, transform 0.35s cubic-bezier(0.22, 1, 0.36, 1);
}
.stat:hover::after { opacity: 1; transform: scaleX(1); }
.stat b {
  display: block;
  font-size: 22px;
  font-weight: 650;
  font-variant-numeric: tabular-nums;
  letter-spacing: -0.015em;
  margin: 3px 0 1px;
}
.stat span { color: var(--text-3); font-size: 11.5px; font-weight: 500; letter-spacing: 0.03em; }
.stat-ico {
  position: absolute;
  right: 12px;
  top: 12px;
  width: 30px;
  height: 30px;
  border-radius: 8px;
  display: grid;
  place-items: center;
  background: var(--accent-soft);
  color: var(--accent-text);
  opacity: 0.9;
  transition: transform 0.25s cubic-bezier(0.34, 1.56, 0.64, 1), background 0.2s ease;
}
.stat:hover .stat-ico { transform: scale(1.1) rotate(-6deg); background: var(--accent-soft-2); }
.stat-ico svg { width: 15px; height: 15px; }

.bar-chart { display: flex; align-items: flex-end; gap: 5px; height: 150px; padding: 22px 2px 20px; border-bottom: 1px solid var(--line); }

.bar-chart .muted { margin: auto; }
.bar-chart .bar {
  flex: 1 1 0;
  min-height: 3px;
  background: var(--accent-soft-2);
  border-radius: 3px 3px 0 0;
  position: relative;
  transition: background 0.13s ease;
}
.bar-chart .bar:hover { background: var(--accent); }
.bar-chart .bar span {
  position: absolute;
  bottom: -18px;
  left: 50%;
  transform: translateX(-50%);
  font-size: 10px;
  font-family: var(--mono);
  color: var(--text-3);
  white-space: nowrap;
}
.bar-chart .bar em {
  position: absolute;
  top: -17px;
  left: 50%;
  transform: translateX(-50%);
  font-size: 10px;
  font-style: normal;
  font-family: var(--mono);
  color: var(--text-3);
  white-space: nowrap;
}

.form-msg { font-size: 13px; min-height: 18px; }
.form-msg.err { color: var(--err); }
.form-msg.ok { color: var(--ok); }

#auth-view {
  min-height: 100vh;
  display: grid;
  grid-template-columns: minmax(420px, 46%) 1fr;
  background: var(--bg);
}

.auth-side {
  background: var(--ink);
  color: var(--ink-text);
  padding: 48px 52px 36px;
  display: flex;
  flex-direction: column;
  min-height: 100vh;
  position: relative;
  overflow: hidden;
}
.as-brand { display: flex; align-items: center; gap: 12px; }
.as-logo {
  width: 40px;
  height: 40px;
  flex: 0 0 auto;
  border-radius: 10px;
  background: var(--accent);
  display: grid;
  place-items: center;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.14);
}
.as-logo svg { width: 22px; height: 22px; }
.auth-brand h1 { margin: 0; font-size: 18px; font-weight: 650; letter-spacing: 0.02em; color: #eef1ea; line-height: 1.3; }
.as-tagline { margin: 2px 0 0; color: var(--ink-mut); font-size: 12.5px; letter-spacing: 0.02em; }

.as-pitch { margin-top: auto; margin-bottom: auto; padding: 56px 0 40px; display: flex; flex-direction: column; gap: 30px; max-width: 380px; }
.as-item { display: flex; gap: 14px; align-items: flex-start; }
.as-item .nav-ico { color: var(--ink-accent); margin-top: 1px; }
.as-item .nav-ico svg { width: 18px; height: 18px; }
.as-item b { display: block; color: #e8ece2; font-size: 13.5px; font-weight: 600; letter-spacing: 0.01em; }
.as-item p { margin: 3px 0 0; color: var(--ink-mut); font-size: 12.5px; line-height: 1.6; }

.as-foot {
  margin: 0;
  padding-top: 18px;
  border-top: 1px solid var(--ink-line);
  color: #6f796f;
  font-size: 11.5px;
  letter-spacing: 0.02em;
}

.auth-main { display: grid; place-items: center; padding: 40px 24px; }
.auth-panel { width: 100%; max-width: 392px; }
.auth-panel .form-msg { min-height: 18px; }
.auth-foot { margin: 18px 0 0; text-align: center; color: var(--text-3); font-size: 12px; }

.tabs {
  display: flex;
  gap: 20px;
  border-bottom: 1px solid var(--line);
  margin-bottom: 16px;
  flex-wrap: wrap;
}
.tabs button {
  background: transparent;
  border: 0;
  border-radius: 0;
  color: var(--text-3);
  padding: 6px 2px 9px;
  margin-bottom: -1px;
  border-bottom: 2px solid transparent;
  font-size: 13.5px;
  font-weight: 500;
}
.tabs button:hover { background: transparent; color: var(--text); }
.tabs button.on { color: var(--text); border-bottom-color: var(--accent); font-weight: 600; }
.tabs.small { gap: 14px; }
.tabs.small button { font-size: 12.5px; padding-bottom: 8px; }

#toast-root {
  position: fixed;
  right: 18px;
  bottom: 18px;
  z-index: 30;
  display: flex;
  flex-direction: column;
  gap: 8px;
  pointer-events: none;
}
#toast-root .toast { pointer-events: auto; }
.toast {
  background: var(--surface);
  border: 1px solid var(--line);
  border-left: 2px solid var(--accent);
  padding: 10px 15px;
  border-radius: 8px;
  max-width: 380px;
  font-size: 13px;
  box-shadow: var(--shadow-3);
  animation: rise-in 0.18s ease-out;
}
.toast.err { border-left-color: var(--err); }

@keyframes rise-in {
  from { transform: translateY(8px); opacity: 0; }
  to { transform: none; opacity: 1; }
}

.dialog-back {
  position: fixed;
  inset: 0;
  background: rgba(24, 28, 22, 0.42);
  backdrop-filter: blur(2px);
  z-index: 20;
  display: flex;
  align-items: flex-start;
  justify-content: center;
  padding: 6vh 16px;
  animation: fade-in 0.15s ease-out;
}
.dialog {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius-l);
  padding: 20px;
  width: 100%;
  max-width: 780px;
  max-height: 86vh;
  overflow: auto;
  box-shadow: var(--shadow-3);
  animation: rise-in 0.16s ease-out;
}
.dialog h2 { margin: 0 0 12px; font-size: 15.5px; font-weight: 650; letter-spacing: -0.01em; }
.dialog h3 { margin: 18px 0 8px; font-size: 13px; color: var(--text-2); }
.dialog .tbl-wrap { margin: 0 -6px; padding: 0 6px; }

@keyframes fade-in {
  from { opacity: 0; }
  to { opacity: 1; }
}

pre.json {
  background: var(--surface-2);
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 12px;
  overflow: auto;
  max-height: 380px;
  font-size: 12px;
  margin: 6px 0 0;
  font-family: var(--mono);
  white-space: pre-wrap;
  word-break: break-all;
  color: var(--text-2);
}

.pg-layout {
  display: grid;
  grid-template-columns: 264px 1fr;
  gap: 16px;
  height: calc(100vh - 56px);
}
.pg-list { display: flex; flex-direction: column; min-height: 0; gap: 10px; }
.pg-list .list-body { overflow-y: auto; flex: 1; margin: 0 -4px; padding: 0 4px; }

.conv-item {
  padding: 8px 11px;
  border-radius: 7px;
  cursor: pointer;
  display: flex;
  justify-content: space-between;
  gap: 8px;
  align-items: center;
  font-size: 13px;
  color: var(--text-2);
  transition: background 0.12s ease;
}
.conv-item:hover { background: var(--surface-2); color: var(--text); }
.conv-item.on { background: var(--accent-soft); color: var(--accent-text); font-weight: 500; }
.conv-item .t { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }

.chat-box {
  display: flex;
  flex-direction: column;
  min-height: 0;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: var(--surface);
  box-shadow: var(--shadow-1);
  overflow: hidden;
}
.chat-head {
  padding: 10px 16px;
  border-bottom: 1px solid var(--line);
  display: flex;
  gap: 8px;
  align-items: center;
  flex-wrap: wrap;
  background: var(--surface);
}
.chat-head select { width: auto; }
.chat-head b { margin-right: auto; font-size: 13.5px; font-weight: 600; letter-spacing: -0.005em; }

#chat-scroll {
  flex: 1;
  overflow-y: auto;
  padding: 18px;
  display: flex;
  flex-direction: column;
  gap: 12px;
  background: var(--surface-2);
}
.msg {
  max-width: 84%;
  border-radius: 12px;
  padding: 9px 13px;
  white-space: pre-wrap;
  word-break: break-word;
  box-shadow: none;
  animation: msg-in 0.26s cubic-bezier(0.22, 1, 0.36, 1) both;
}
.msg.user {
  align-self: flex-end;
  background: linear-gradient(135deg, #2a7258, var(--accent));
  color: #fff;
  border-bottom-right-radius: 3px;
  box-shadow: 0 2px 10px rgba(32, 99, 75, 0.22);
  transform-origin: bottom right;
}
.msg.assistant {
  align-self: flex-start;
  background: var(--surface);
  border: 1px solid var(--line);
  border-bottom-left-radius: 3px;
  box-shadow: var(--shadow-1);
  transform-origin: bottom left;
}
@keyframes msg-in {
  from { opacity: 0; transform: translateY(10px) scale(0.96); }
  to { opacity: 1; transform: none; }
}
.msg .meta {
  font-size: 11px;
  color: var(--text-3);
  margin-top: 6px;
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 4px;
}
.msg.user .meta { color: rgba(255, 255, 255, 0.72); }
.msg .branch-btn { margin-right: 6px; font-size: 11px; padding: 1px 8px; }
.msg.user .branch-btn { color: rgba(255, 255, 255, 0.85); }
.msg.user .branch-btn:hover { background: rgba(255, 255, 255, 0.14); }
.msg .md { white-space: normal; }

.chat-input {
  border-top: 1px solid var(--line);
  padding: 12px;
  display: flex;
  gap: 10px;
  align-items: flex-end;
  background: var(--surface);
}
.chat-input textarea { min-height: 44px; max-height: 180px; }
.chat-input button { flex: 0 0 auto; min-width: 76px; white-space: nowrap; }

.md { line-height: 1.7; word-break: break-word; }
.md h1, .md h2, .md h3 {
  border-bottom: 1px solid var(--line);
  padding-bottom: 6px;
  margin: 14px 0 8px;
}
.md h1 { font-size: 1.3em; }
.md h2 { font-size: 1.16em; }
.md h3 { font-size: 1.05em; }
.md p { margin: 7px 0; }
.md ul, .md ol { margin: 7px 0; padding-left: 22px; }
.md li { margin: 3px 0; }
.md pre {
  background: var(--surface-2);
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 12px;
  overflow: auto;
}
.md code {
  background: var(--surface-3);
  border: 1px solid var(--line);
  border-radius: 4px;
  padding: 1px 5px;
  font-family: var(--mono);
  font-size: 0.92em;
}
.md pre code {
  padding: 0;
  background: none;
  border: 0;
  font-size: 12px;
}
.md pre code.hljs { background: transparent; padding: 0; display: block; }
.md blockquote {
  border-left: 2px solid var(--line-strong);
  margin: 8px 0;
  padding: 2px 12px;
  color: var(--text-2);
  background: none;
  border-radius: 0;
}
.md a { text-decoration: underline; }

.ann-item {
  padding: 9px 10px;
  margin: 0 -10px;
  border-radius: 7px;
  cursor: pointer;
  transition: background 0.12s ease;
}
.ann-item:hover { background: var(--surface-2); }
.ann-item + .ann-item { margin-top: 2px; }

.mail-title.unread { color: var(--text); font-weight: 600; }
.mail-item { border-bottom: 1px solid var(--line); }
.mail-row { cursor: pointer; }
.mail-row:hover { background: var(--surface-2); }

.perm-chips { display: flex; flex-wrap: wrap; gap: 6px; }
.perm-chip {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  background: var(--surface-3);
  border: 1px solid var(--line);
  border-radius: 5px;
  padding: 3px 10px;
  font-size: 12px;
  font-family: var(--mono);
}
.perm-chip button { background: none; border: 0; box-shadow: none; color: var(--err); padding: 0; font-size: 13px; cursor: pointer; }
.perm-chip button:hover { background: none; color: var(--err-hover); border: 0; box-shadow: none; }

.kv { display: grid; grid-template-columns: 168px 1fr; gap: 9px 14px; align-items: start; }
.kv label { color: var(--text-3); font-size: 12.5px; padding-top: 9px; }

.pager { display: flex; gap: 8px; align-items: center; margin-top: 12px; }
.pager .muted { font-variant-numeric: tabular-nums; }

html { scroll-behavior: smooth; }
* { scrollbar-color: rgba(32, 99, 75, 0.32) transparent; }

.bg-fx {
  position: fixed;
  inset: 0;
  z-index: -1;
  overflow: hidden;
  background:
    radial-gradient(1200px 800px at 85% -10%, rgba(32, 99, 75, 0.08), transparent 60%),
    radial-gradient(1000px 700px at -15% 110%, rgba(201, 162, 39, 0.06), transparent 60%),
    linear-gradient(180deg, #f7f5f0, #f1eee6);
}
.bg-aurora { position: absolute; inset: 0; filter: blur(72px); }
.bg-aurora i { position: absolute; display: block; border-radius: 50%; will-change: transform; }
.bg-aurora .b1 {
  width: 56vmax; height: 56vmax;
  left: -12vmax; top: -18vmax;
  background: radial-gradient(circle at 35% 35%, rgba(32, 99, 75, 0.20), rgba(32, 99, 75, 0.07) 55%, transparent 72%);
  animation: drift-1 46s ease-in-out infinite alternate;
}
.bg-aurora .b2 {
  width: 48vmax; height: 48vmax;
  right: -16vmax; top: 22vh;
  background: radial-gradient(circle at 60% 40%, rgba(58, 142, 110, 0.16), rgba(58, 142, 110, 0.05) 55%, transparent 72%);
  animation: drift-2 58s ease-in-out infinite alternate;
}
.bg-aurora .b3 {
  width: 44vmax; height: 44vmax;
  left: 24vw; bottom: -22vmax;
  background: radial-gradient(circle at 50% 50%, rgba(201, 162, 39, 0.12), rgba(201, 162, 39, 0.04) 55%, transparent 72%);
  animation: drift-3 52s ease-in-out infinite alternate;
}
.bg-grid {
  position: absolute;
  inset: 0;
  background-image:
    linear-gradient(rgba(38, 40, 31, 0.04) 1px, transparent 1px),
    linear-gradient(90deg, rgba(38, 40, 31, 0.04) 1px, transparent 1px);
  background-size: 44px 44px;
  mask-image: radial-gradient(ellipse 90% 80% at 50% 0%, #000 30%, transparent 78%);
}

.bg-spark {
  position: absolute;
  inset: 0 0 -320px;
  background-image:
    radial-gradient(1.6px 1.6px at 22% 28%, rgba(32, 99, 75, 0.35), transparent 100%),
    radial-gradient(1px 1px at 64% 62%, rgba(32, 99, 75, 0.26), transparent 100%),
    radial-gradient(1.2px 1.2px at 41% 84%, rgba(201, 162, 39, 0.30), transparent 100%),
    radial-gradient(1px 1px at 83% 16%, rgba(58, 142, 110, 0.30), transparent 100%),
    radial-gradient(1.4px 1.4px at 9% 55%, rgba(32, 99, 75, 0.22), transparent 100%);
  background-size: 360px 320px;
  background-repeat: repeat;
  opacity: 0.55;
  animation: spark-rise 48s linear infinite;
}

@keyframes drift-1 {
  0%   { transform: translate(0, 0) scale(1); }
  50%  { transform: translate(9vw, 7vh) scale(1.12); }
  100% { transform: translate(3vw, 14vh) scale(0.96); }
}
@keyframes drift-2 {
  0%   { transform: translate(0, 0) scale(1); }
  50%  { transform: translate(-8vw, -6vh) scale(1.08); }
  100% { transform: translate(-4vw, 9vh) scale(1.16); }
}
@keyframes drift-3 {
  0%   { transform: translate(0, 0) scale(1) rotate(0deg); }
  50%  { transform: translate(6vw, -9vh) scale(1.1) rotate(8deg); }
  100% { transform: translate(-5vw, -4vh) scale(0.94) rotate(-6deg); }
}
@keyframes spark-rise {
  from { transform: translateY(0); }
  to   { transform: translateY(-320px); }
}

@keyframes card-in {
  from { opacity: 0; transform: translateY(16px) scale(0.985); }
  to   { opacity: 1; transform: none; }
}
@keyframes pop-in {
  0%   { opacity: 0; transform: scale(0.85); }
  60%  { opacity: 1; transform: scale(1.03); }
  100% { opacity: 1; transform: scale(1); }
}
@keyframes dot-pulse {
  0%, 100% { opacity: 1; box-shadow: 0 0 8px rgba(121, 179, 154, 0.9); }
  50%      { opacity: 0.5; box-shadow: 0 0 2px rgba(121, 179, 154, 0.35); }
}
@keyframes glow-pulse {
  0%, 100% { box-shadow: 0 1px 2px rgba(0, 0, 0, 0.2), inset 0 1px 0 rgba(255, 255, 255, 0.14); }
  50%      { box-shadow: 0 0 20px 2px rgba(121, 179, 154, 0.5), inset 0 1px 0 rgba(255, 255, 255, 0.14); }
}
@keyframes spin-slow { to { transform: rotate(360deg); } }
@keyframes shimmer {
  from { background-position: -400px 0; }
  to   { background-position: 400px 0; }
}
@keyframes bar-grow { from { transform: scaleY(0); } to { transform: scaleY(1); } }
@keyframes ripple-out {
  to { transform: scale(1); opacity: 0; }
}
@keyframes toast-in {
  from { opacity: 0; transform: translateX(44px) scale(0.95); }
  to   { opacity: 1; transform: none; }
}
@keyframes toast-out {
  to { opacity: 0; transform: translateX(28px) scale(0.96); }
}
@keyframes sheet-up {
  from { transform: translateY(56px); opacity: 0; }
  to   { transform: none; opacity: 1; }
}
@keyframes bar-grad-shift {
  0%, 100% { background-position: 0% 50%; }
  50%      { background-position: 100% 50%; }
}

#content > * { animation: card-in 0.5s cubic-bezier(0.22, 1, 0.36, 1) both; }
#content > *:nth-child(1) { animation-delay: 0.02s; }
#content > *:nth-child(2) { animation-delay: 0.08s; }
#content > *:nth-child(3) { animation-delay: 0.14s; }
#content > *:nth-child(4) { animation-delay: 0.2s; }
#content > *:nth-child(5) { animation-delay: 0.26s; }
#content > *:nth-child(6) { animation-delay: 0.32s; }
#content > *:nth-child(7) { animation-delay: 0.38s; }
#content > *:nth-child(8) { animation-delay: 0.44s; }
.stat-grid .stat { animation: card-in 0.5s cubic-bezier(0.22, 1, 0.36, 1) both; }
.stat-grid .stat:nth-child(1) { animation-delay: 0.08s; }
.stat-grid .stat:nth-child(2) { animation-delay: 0.16s; }
.stat-grid .stat:nth-child(3) { animation-delay: 0.24s; }
.stat-grid .stat:nth-child(4) { animation-delay: 0.32s; }
.stat-grid .stat:nth-child(5) { animation-delay: 0.4s; }
.stat-grid .stat:nth-child(6) { animation-delay: 0.48s; }
.stat-grid .stat:nth-child(7) { animation-delay: 0.56s; }
.stat-grid .stat:nth-child(8) { animation-delay: 0.64s; }

.dot { animation: dot-pulse 2.4s ease-in-out infinite; }

.brand-logo { animation: glow-pulse 4.5s ease-in-out infinite; }
.as-logo { position: relative; }
.as-logo::before {
  content: "";
  position: absolute;
  inset: -4px;
  border-radius: 14px;
  background: conic-gradient(from 0deg, transparent 0deg 285deg, rgba(121, 179, 154, 0.95) 330deg, transparent 360deg);
  animation: spin-slow 5.5s linear infinite;
}

.as-logo svg, .brand-logo svg,
.as-logo .logo-img, .brand-logo .logo-img { position: relative; z-index: 1; }

@supports (background-clip: text) {
  .ph-title {
    background: linear-gradient(115deg, var(--text) 25%, var(--accent-text) 75%, #3d8a6b);
    background-clip: text;
    color: transparent;
  }
  .auth-brand h1 {
    background: linear-gradient(115deg, #f2f5ee 15%, #a8d8bf 55%, #6cb193 90%);
    background-clip: text;
    color: transparent;
  }

  .auth-mobile-brand .auth-brand h1 {
    background: linear-gradient(115deg, var(--text) 25%, var(--accent-text) 75%, #3d8a6b);
    background-clip: text;
  }
}

button.primary::before {
  content: "";
  position: absolute;
  top: 0;
  bottom: 0;
  left: -80%;
  width: 50%;
  background: linear-gradient(105deg, transparent, rgba(255, 255, 255, 0.35), transparent);
  transform: skewX(-22deg);
  transition: left 0.55s ease;
  pointer-events: none;
}
button.primary:hover::before { left: 130%; }
.ripple {
  position: absolute;
  border-radius: 50%;
  background: rgba(32, 99, 75, 0.22);
  transform: scale(0);
  animation: ripple-out 0.55s ease-out forwards;
  pointer-events: none;
}
button.primary .ripple,
#sidebar .ripple,
#mobile-topbar .ripple { background: rgba(255, 255, 255, 0.45); }

.tabs button { position: relative; }
.tabs button::after {
  content: "";
  position: absolute;
  left: 0;
  right: 0;
  bottom: -1px;
  height: 2px;
  border-radius: 2px;
  background: linear-gradient(90deg, var(--accent), #58a488);
  transform: scaleX(0);
  transform-origin: left;
  transition: transform 0.28s cubic-bezier(0.22, 1, 0.36, 1);
}
.tabs button:hover::after { transform: scaleX(0.4); }
.tabs button.on::after { transform: scaleX(1); }
.tabs button.on { border-bottom-color: transparent; }

.toast {
  background: rgba(255, 255, 255, 0.94);
  border-left-width: 3px;
  backdrop-filter: blur(10px) saturate(1.1);
  animation: toast-in 0.3s cubic-bezier(0.34, 1.4, 0.64, 1) both;
}
.toast.out { animation: toast-out 0.22s ease-in both; }

.dialog-back { backdrop-filter: blur(6px) saturate(1.1); }
.dialog {
  background: rgba(255, 255, 255, 0.94);
  backdrop-filter: blur(16px) saturate(1.2);
  animation: pop-in 0.28s cubic-bezier(0.34, 1.3, 0.64, 1) both;
}

.bar-chart .bar {
  background: linear-gradient(180deg, #58a488, var(--accent-soft-2));
  transform-origin: bottom;
  animation: bar-grow 0.7s cubic-bezier(0.22, 1, 0.36, 1) both;
}
.bar-chart .bar:hover {
  background: linear-gradient(180deg, var(--accent), #2a7258);
  box-shadow: 0 0 14px rgba(32, 99, 75, 0.35);
}

.skel-wrap { display: flex; flex-direction: column; gap: 14px; }
.skel {
  border-radius: 10px;
  background: linear-gradient(90deg, #ece9e0 25%, #f7f5ef 45%, #ece9e0 65%);
  background-size: 800px 100%;
  animation: shimmer 1.4s linear infinite;
}
.skel-title { height: 30px; width: 220px; margin: 4px 0 8px; }
.skel-row { display: grid; grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); gap: 12px; }
.skel-row .skel { height: 86px; border-radius: 12px; }
.skel-block { height: 190px; }
.skel-block.short { height: 120px; width: 72%; }

.auth-panel {
  background: rgba(255, 255, 255, 0.9);
  border: 1px solid rgba(255, 255, 255, 0.75);
  border-radius: 16px;
  padding: 26px 24px;
  box-shadow: var(--shadow-3), 0 0 0 1px rgba(32, 99, 75, 0.05);
  backdrop-filter: blur(18px) saturate(1.25);
  position: relative;
  overflow: hidden;
  animation: pop-in 0.45s cubic-bezier(0.34, 1.3, 0.64, 1) 0.12s both;
}
.auth-panel::before {
  content: "";
  position: absolute;
  left: 0;
  right: 0;
  top: 0;
  height: 3px;
  background: linear-gradient(90deg, var(--accent), #58a488 45%, #c9a227 80%, transparent);
  background-size: 200% 100%;
  animation: bar-grad-shift 7s ease-in-out infinite;
}
.auth-mobile-brand { display: none; }

.auth-side::before, .auth-side::after {
  content: "";
  position: absolute;
  border-radius: 50%;
  pointer-events: none;
}
.auth-side::before {
  width: 480px; height: 480px;
  left: -140px; top: -160px;
  background: radial-gradient(circle, rgba(121, 179, 154, 0.17), transparent 65%);
  animation: drift-2 40s ease-in-out infinite alternate;
}
.auth-side::after {
  width: 540px; height: 540px;
  right: -190px; bottom: -210px;
  background: radial-gradient(circle, rgba(32, 99, 75, 0.3), transparent 65%);
  animation: drift-1 48s ease-in-out infinite alternate;
}
.as-brand { animation: card-in 0.5s cubic-bezier(0.22, 1, 0.36, 1) both; position: relative; }
.as-pitch { position: relative; }
.as-item { animation: card-in 0.55s cubic-bezier(0.22, 1, 0.36, 1) both; }
.as-item:nth-child(1) { animation-delay: 0.16s; }
.as-item:nth-child(2) { animation-delay: 0.3s; }
.as-item:nth-child(3) { animation-delay: 0.44s; }
.as-item:hover .nav-ico { transform: scale(1.2); }
.as-foot { animation: fade-in 0.9s ease 0.6s both; position: relative; }
.auth-brand { position: relative; }

#mobile-topbar {
  display: none;
  position: sticky;
  top: 0;
  z-index: 45;
  height: 54px;
  align-items: center;
  gap: 6px;
  padding: 0 10px;
  background: rgba(24, 30, 25, 0.93);
  backdrop-filter: blur(14px) saturate(1.2);
  color: var(--ink-text);
  border-bottom: 1px solid var(--ink-line);
}
#btn-menu {
  color: var(--ink-text);
  background: transparent;
  border-color: transparent;
  width: 40px;
  height: 40px;
  display: grid;
  place-items: center;
  border-radius: 8px;
  flex: 0 0 auto;
  overflow: hidden;
}
#btn-menu:hover { background: var(--ink-2); border-color: transparent; }
.tb-brand { display: flex; align-items: center; gap: 8px; font-size: 14px; color: #eef1ea; min-width: 0; }
.tb-brand b { font-weight: 600; letter-spacing: 0.02em; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.tb-logo {
  width: 26px;
  height: 26px;
  flex: 0 0 auto;
  border-radius: 7px;
  background: linear-gradient(135deg, #2a7258, var(--accent-hover));
  display: grid;
  place-items: center;
}
.tb-logo svg { width: 15px; height: 15px; }
.tb-spacer { flex: 1; }
.tb-credits { font-size: 12px; color: var(--ink-accent); white-space: nowrap; }

#drawer-backdrop {
  position: fixed;
  inset: 0;
  z-index: 50;
  background: rgba(18, 22, 18, 0.45);
  backdrop-filter: blur(3px);
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.26s ease;
}
body.drawer-open #drawer-backdrop { opacity: 1; pointer-events: auto; }
body.drawer-open { overflow: hidden; }

@media (max-width: 1080px) {
  .pg-layout { grid-template-columns: 1fr; height: auto; }
  .pg-list { max-height: 300px; }
  .chat-box { height: calc(100vh - 200px); min-height: 480px; }
}
@media (max-width: 960px) {
  #auth-view { grid-template-columns: 1fr; }
  .auth-side { display: none; }
  .auth-main { min-height: 100vh; padding: 9vh 20px 40px; }

  .auth-mobile-brand {
    display: flex;
    align-items: center;
    gap: 12px;
    justify-self: start;
    margin-bottom: 22px;
    animation: card-in 0.5s cubic-bezier(0.22, 1, 0.36, 1) both;
  }
}
@media (max-width: 900px) {
  .grid2 { grid-template-columns: 1fr; }
  #content { padding: 18px 16px 32px; }
  #sidebar { width: 64px; padding: 12px 8px; }
  .brand-text, .nav-group, #nav a .lbl, .u-meta { display: none; }
  #nav a { justify-content: center; padding: 10px 0; }
  #nav a:hover { transform: none; }
  #nav a.on::after { display: none; }
  .user-card { justify-content: center; padding: 6px; }
  #btn-logout { padding: 8px 0; }
  .kv { grid-template-columns: 1fr; gap: 4px; }
  .kv label { padding-top: 6px; }
}

@media (max-width: 640px) {
  #main-view { display: block; }
  #mobile-topbar {
    display: flex;
    height: calc(54px + env(safe-area-inset-top));
    padding-top: env(safe-area-inset-top);
  }

  #sidebar {
    position: fixed;
    left: 0;
    top: 0;
    bottom: 0;
    width: min(78vw, 300px);
    height: 100vh;
    height: 100dvh;
    z-index: 60;
    padding: calc(14px + env(safe-area-inset-top)) 12px calc(14px + env(safe-area-inset-bottom));
    transform: translateX(-105%);
    transition: transform 0.3s cubic-bezier(0.22, 1, 0.36, 1);
    border-right: 1px solid var(--ink-line);
  }
  body.drawer-open #sidebar { transform: none; box-shadow: var(--shadow-3); }

  .brand-text { display: inline; }
  .nav-group { display: block; }
  #nav a .lbl { display: inline; }
  .u-meta { display: flex; }
  #nav a { justify-content: flex-start; padding: 10px 10px; }
  .user-card { justify-content: flex-start; padding: 9px 10px; }
  #sidebar-footer { flex-direction: column; align-items: stretch; }
  #btn-logout { justify-content: center; }

  #content {
    padding: 16px 14px calc(32px + env(safe-area-inset-bottom));
  }

  input, select, textarea { font-size: 16px; }
  button:not(.small-btn) { min-height: 40px; }

  .page-head { flex-wrap: wrap; align-items: center; gap: 10px; }
  .ph-title { font-size: 17.5px; }
  .ph-actions { margin-left: 0; width: 100%; }
  .ph-actions .btn, .ph-actions button { flex: 1 1 auto; }
  .stat-grid { grid-template-columns: repeat(2, 1fr); gap: 10px; }
  .stat b { font-size: 19px; }
  .stat-ico { width: 26px; height: 26px; right: 10px; top: 10px; }
  .msg { max-width: 92%; }
  .chat-head b { flex-basis: 100%; }
  .md pre, pre.json { max-height: 300px; }

  .dialog-back { align-items: flex-end; padding: 0; }
  .dialog {
    max-width: 100%;
    border-radius: 18px 18px 0 0;
    max-height: 90vh;
    max-height: 90dvh;
    margin-bottom: 0;
    padding-bottom: calc(20px + env(safe-area-inset-bottom));
    animation: sheet-up 0.3s cubic-bezier(0.22, 1, 0.36, 1) both;
  }
  .kv { grid-template-columns: 1fr; }

  #toast-root {
    left: 12px;
    right: 12px;
    bottom: calc(14px + env(safe-area-inset-bottom));
  }
  #toast-root .toast { max-width: none; width: 100%; }

  .bg-aurora { filter: blur(50px); }
  .card, .stat { backdrop-filter: blur(6px) saturate(1.1); }
}

@media (prefers-reduced-motion: reduce) {
  * { animation: none !important; transition: none !important; }
}

@font-face {
  font-family: "Lora Variable";
  src: url("../vendor/fonts/lora-latin-wght-normal.woff2") format("woff2-variations");
  font-weight: 400 700;
  font-style: normal;
  font-display: swap;
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}

:root {

  --font-display: "Lora Variable", Georgia, "Times New Roman", "Noto Serif SC", "Source Han Serif SC", "Noto Serif CJK SC", "Songti SC", "SimSun", serif;

  --leaf: #4d9d6e;
  --leaf-soft: #e7f1e6;
  --blossom: #d9938a;
  --blossom-soft: #f8ece8;
}

#auth-view, #main-view { position: relative; z-index: 1; }

.logo-img { display: block; width: 100%; height: 100%; object-fit: contain; border-radius: inherit; }
.as-logo .logo-img { width: 25px; height: 25px; border-radius: 7px; }
.brand-logo .logo-img { width: 20px; height: 20px; border-radius: 5px; }
.tb-logo .logo-img { width: 17px; height: 17px; border-radius: 4px; }

.petals { position: fixed; inset: 0; z-index: 0; pointer-events: none; overflow: hidden; }
.petals i {
  position: absolute;
  top: -5vh;
  width: 11px;
  height: 11px;
  border-radius: 130% 0 130% 0;
  background: linear-gradient(135deg, rgba(140, 186, 148, 0.65), rgba(140, 186, 148, 0.18));
  opacity: 0;
  animation: petal-fall 17s linear infinite;
  will-change: transform;
}
.petals i:nth-child(1) { left: 5%;  animation-delay: 0s;    animation-duration: 17.5s; }
.petals i:nth-child(2) { left: 17%; animation-delay: 4.2s;  animation-duration: 19s;   --ps: 0.72; }
.petals i:nth-child(3) { left: 28%; animation-delay: 9.1s;  animation-duration: 15.5s; }
.petals i:nth-child(4) { left: 39%; animation-delay: 2.4s;  animation-duration: 20s;   --ps: 0.85; }
.petals i:nth-child(5) { left: 50%; animation-delay: 11.6s; animation-duration: 16.5s; --ps: 0.65; }
.petals i:nth-child(6) { left: 61%; animation-delay: 6.3s;  animation-duration: 18.5s; }
.petals i:nth-child(7) { left: 71%; animation-delay: 13.2s; animation-duration: 15s;   --ps: 0.78; }
.petals i:nth-child(8) { left: 82%; animation-delay: 1.6s;  animation-duration: 19.5s; }
.petals i:nth-child(9) { left: 91%; animation-delay: 8.1s;  animation-duration: 17s;   --ps: 0.7; }
.petals i:nth-child(10){ left: 96%; animation-delay: 14.4s; animation-duration: 21s;   --ps: 0.9; }
.petals i:nth-child(3n) { background: linear-gradient(135deg, rgba(222, 160, 150, 0.6), rgba(222, 160, 150, 0.16)); }
.petals i:nth-child(4n) { background: linear-gradient(135deg, rgba(206, 178, 88, 0.5), rgba(206, 178, 88, 0.14)); }
@keyframes petal-fall {
  0%   { transform: translate3d(0, -6vh, 0) rotate(0deg) scale(var(--ps, 1)); opacity: 0; }
  7%   { opacity: 0.42; }
  48%  { transform: translate3d(5.5vw, 52vh, 0) rotate(215deg) scale(var(--ps, 1)); }
  88%  { opacity: 0.34; }
  100% { transform: translate3d(-3vw, 108vh, 0) rotate(440deg) scale(var(--ps, 1)); opacity: 0; }
}

.rv {
  opacity: 0;
  transform: translateY(18px);
  transition: opacity 0.65s cubic-bezier(0.22, 1, 0.36, 1), transform 0.65s cubic-bezier(0.22, 1, 0.36, 1);
  transition-delay: var(--rvd, 0s);
}
.rv.in { opacity: 1; transform: none; }

.ph-title {
  font-family: var(--font-display);
  font-size: 23px;
  font-weight: 560;
  letter-spacing: 0.005em;
}

.sec-head { display: flex; align-items: baseline; gap: 12px; margin: 28px 2px 14px; }
.sec-no {
  font-family: var(--mono);
  font-size: 11px;
  font-weight: 650;
  letter-spacing: 0.16em;
  color: var(--accent-text);
  transform: translateY(-1px);
}
.sec-title {
  margin: 0;
  font-family: var(--font-display);
  font-size: 19.5px;
  font-weight: 600;
  letter-spacing: 0.01em;
  color: var(--text);
}
.sec-line { flex: 1 1 20px; border-top: 1px solid var(--line); transform: translateY(-4px); }
.sec-sub { color: var(--text-3); font-size: 12px; white-space: nowrap; }
a.sec-sub:hover { color: var(--accent-text); text-decoration: none; }

.hero-welcome {
  position: relative;
  overflow: hidden;
  border-radius: 16px;
  padding: 26px 32px 24px;
  margin: 2px 0 18px;
  background:
    radial-gradient(640px 300px at 88% -20%, rgba(121, 179, 154, 0.2), transparent 65%),
    radial-gradient(520px 280px at -8% 130%, rgba(201, 162, 39, 0.11), transparent 60%),
    linear-gradient(118deg, #1b231d, var(--ink) 52%, #213027);
  border: 1px solid var(--ink-line);
  color: var(--ink-text);
  box-shadow: var(--shadow-2);
}
.hw-spring-char {
  position: absolute;
  right: 26px;
  bottom: -38px;
  font-family: var(--font-display);
  font-size: 172px;
  line-height: 1;
  color: rgba(121, 179, 154, 0.075);
  pointer-events: none;
  user-select: none;
}
.hw-top { position: relative; display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }
.hw-status {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  font-size: 11.5px;
  letter-spacing: 0.03em;
  color: var(--ink-accent);
  border: 1px solid rgba(121, 179, 154, 0.28);
  background: rgba(121, 179, 154, 0.09);
  padding: 3px 11px;
  border-radius: 999px;
}
.hw-status .dot { margin: 0; background: #6cc077; animation: dot-pulse 2.4s ease-in-out infinite; }
.hw-hello { position: relative; margin: 15px 0 2px; color: var(--ink-mut); font-size: 12.5px; letter-spacing: 0.05em; }
.hw-title {
  position: relative;
  margin: 0;
  font-family: var(--font-display);
  font-weight: 550;
  font-size: 27px;
  line-height: 1.42;
  letter-spacing: 0.015em;
  color: #f0f4ee;
  max-width: 620px;
}
@supports (background-clip: text) {
  .hw-title {
    background: linear-gradient(118deg, #f4f7f0 25%, #bcdcc9 68%, #8cc7a8 100%);
    background-clip: text;
    color: transparent;
  }
}
.hw-kpi { position: relative; margin-top: 14px; color: var(--ink-mut); font-size: 12.5px; }
.hw-kpi b { color: #a9d3bd; font-weight: 600; font-variant-numeric: tabular-nums; }
.hw-row { display: flex; align-items: flex-end; gap: 14px; flex-wrap: wrap; }
.hw-actions { margin-left: auto; display: flex; gap: 8px; flex-wrap: wrap; position: relative; }

.hero-welcome button.ghost,
.wallet-hero button.ghost { color: var(--ink-text); }
.hero-welcome button.ghost:hover,
.wallet-hero button.ghost:hover { background: rgba(255, 255, 255, 0.09); border-color: transparent; color: #fff; }
.hero-welcome button.primary,
.wallet-hero button.primary {
  background: linear-gradient(135deg, #45a07b, #2e7d5d);
  border-color: rgba(121, 179, 154, 0.55);
  box-shadow: 0 2px 14px rgba(32, 99, 75, 0.5), inset 0 1px 0 rgba(255, 255, 255, 0.22);
}
.hero-welcome button.primary:hover,
.wallet-hero button.primary:hover { background: linear-gradient(135deg, #4fae86, #34896a); }

.qs-grid { display: grid; grid-template-columns: minmax(0, 1.65fr) minmax(0, 1fr); gap: 14px; align-items: stretch; }
.qs-terminal {
  display: flex;
  flex-direction: column;
  min-height: 296px;
  background: linear-gradient(180deg, #161d17, #121813);
  border: 1px solid #2b332a;
  border-radius: 13px;
  overflow: hidden;
  box-shadow: var(--shadow-2);
}
.qs-head {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 10px 14px;
  border-bottom: 1px solid rgba(121, 179, 154, 0.14);
  background: rgba(255, 255, 255, 0.025);
  flex-wrap: wrap;
}
.qs-dots { display: inline-flex; gap: 6px; flex: 0 0 auto; }
.qs-dots i { width: 10px; height: 10px; border-radius: 50%; }
.qs-dots i:nth-child(1) { background: #e0655a; }
.qs-dots i:nth-child(2) { background: #e2b93b; }
.qs-dots i:nth-child(3) { background: #63bd7c; }
.qs-tabs { margin-left: auto; display: flex; gap: 3px; flex-wrap: wrap; }
.qs-tabs button {
  background: transparent;
  border: 0;
  border-radius: 6px;
  color: #8b948a;
  font-size: 11.5px;
  padding: 4px 11px;
  font-family: var(--mono);
  cursor: pointer;
  transition: background 0.15s ease, color 0.15s ease;
  overflow: visible;
}
.qs-tabs button:hover { color: #cfe0d2; background: rgba(255, 255, 255, 0.05); }
.qs-tabs button.on { color: #a9d3bd; background: rgba(121, 179, 154, 0.15); }
.qs-copy { margin-left: 4px; flex: 0 0 auto; }
.qs-body { flex: 1; padding: 15px 18px; overflow: auto; }
.qs-body pre {
  margin: 0;
  font-family: var(--mono);
  font-size: 12.5px;
  line-height: 1.78;
  color: #c9d8c9;
  white-space: pre-wrap;
  word-break: break-word;
}
.qs-body .hljs-attr, .qs-body .hljs-attribute { color: #8fc7a8; }
.qs-body .hljs-string { color: #c9b458; }
.qs-body .hljs-keyword, .qs-body .hljs-built_in { color: #7fb39a; }
.qs-body .hljs-comment { color: #5f6b60; }
.qs-body .hljs-title.function_ { color: #d0b06e; }
.qs-caret {
  display: inline-block;
  width: 7px;
  height: 1em;
  margin-left: 2px;
  vertical-align: text-bottom;
  background: #79b39a;
  animation: caret-blink 1.05s steps(1) infinite;
}
.qs-base {
  display: flex;
  align-items: center;
  gap: 9px;
  padding: 10px 14px;
  border-top: 1px dashed rgba(121, 179, 154, 0.22);
  font-size: 12px;
  color: var(--ink-mut);
  flex-wrap: wrap;
}
.qs-base code {
  font-family: var(--mono);
  color: #a9d3bd;
  background: rgba(121, 179, 154, 0.09);
  padding: 2px 9px;
  border-radius: 5px;
}
.qs-base button { margin-left: auto; background: transparent; border-color: rgba(121, 179, 154, 0.3); color: var(--ink-text); }
.qs-base button:hover { background: rgba(121, 179, 154, 0.12); border-color: rgba(121, 179, 154, 0.45); color: #fff; }

.qs-steps {
  display: flex;
  flex-direction: column;
  justify-content: center;
  background: var(--glass);
  border: 1px solid var(--glass-line);
  border-radius: 13px;
  padding: 6px 18px;
  backdrop-filter: blur(var(--blur)) saturate(1.15);
  box-shadow: var(--shadow-1);
}
.qs-step { display: flex; gap: 13px; padding: 15px 0; align-items: flex-start; }
.qs-step + .qs-step { border-top: 1px dashed var(--line); }
.qs-step .n {
  flex: 0 0 auto;
  width: 30px;
  height: 30px;
  border-radius: 50%;
  display: grid;
  place-items: center;
  background: var(--accent-soft);
  color: var(--accent-text);
  font-family: var(--mono);
  font-size: 12.5px;
  font-weight: 650;
  border: 1px solid var(--accent-soft-2);
}
.qs-step b { display: block; font-size: 13px; font-weight: 600; color: var(--text); }
.qs-step p { margin: 3px 0 0; font-size: 12.5px; color: var(--text-3); line-height: 1.62; }
.qs-step code.chip,
.step-card code.chip {
  font-family: var(--mono);
  font-size: 11.5px;
  background: var(--surface-3);
  border: 1px solid var(--line);
  padding: 1px 6px;
  border-radius: 4px;
  white-space: normal;
  word-break: break-all;
}

.model-strip { display: grid; grid-template-columns: repeat(auto-fit, minmax(218px, 1fr)); gap: 12px; }
.model-card {
  position: relative;
  display: flex;
  flex-direction: column;
  gap: 9px;
  background: var(--glass);
  border: 1px solid var(--glass-line);
  border-radius: 12px;
  padding: 14px 15px 13px;
  box-shadow: var(--shadow-1);
  backdrop-filter: blur(var(--blur)) saturate(1.15);
  overflow: hidden;
  transition: transform 0.25s cubic-bezier(0.22, 1, 0.36, 1), box-shadow 0.25s ease, border-color 0.25s ease;
}
.model-card:hover { transform: translateY(-3px); box-shadow: var(--shadow-2); border-color: var(--accent-soft-2); }
.mc-top { display: flex; align-items: center; gap: 8px; min-width: 0; }
.mc-name {
  font-family: var(--mono);
  font-size: 12.5px;
  font-weight: 650;
  color: var(--text);
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.mc-pool { margin-left: auto; flex: 0 0 auto; }
.mc-desc {
  color: var(--text-3);
  font-size: 12px;
  line-height: 1.55;
  min-height: 37px;
  max-height: 37px;
  overflow: hidden;
  line-clamp: 2;
}
.mc-prices { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }
.mc-prices div { background: var(--surface-2); border: 1px solid var(--line); border-radius: 7px; padding: 6px 9px 5px; }
.mc-prices span { display: block; font-size: 10.5px; color: var(--text-3); letter-spacing: 0.04em; }
.mc-prices b { font-family: var(--mono); font-size: 12.5px; font-weight: 600; color: var(--text); font-variant-numeric: tabular-nums; }
.mc-foot { display: flex; align-items: center; gap: 8px; margin-top: auto; padding-top: 9px; border-top: 1px dashed var(--line); font-size: 11px; color: var(--text-3); white-space: nowrap; }
.mc-bar { flex: 1; height: 4px; min-width: 26px; border-radius: 3px; background: var(--surface-3); overflow: hidden; }
.mc-bar i {
  display: block;
  height: 100%;
  border-radius: 3px;
  background: linear-gradient(90deg, var(--accent), #58a488);
  width: var(--w, 0%);
  transform-origin: left;
  animation: bar-x 0.9s cubic-bezier(0.22, 1, 0.36, 1) both;
  animation-delay: var(--d, 0s);
}
.mc-bar.warn i { background: linear-gradient(90deg, #b98a2c, #d9b95c); }
.mc-bar.err i { background: linear-gradient(90deg, #b03a2a, #cd6a58); }

.plaza-tools { display: flex; gap: 10px; align-items: center; flex-wrap: wrap; margin-bottom: 14px; }
.plaza-tools input { max-width: 250px; }
.plaza-tools select { max-width: 150px; width: auto; }
.plaza-count { margin-left: auto; color: var(--text-3); font-size: 12px; }
.plaza-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(252px, 1fr)); gap: 12px; }

.steps-band { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 12px; margin-bottom: 4px; }
.step-card {
  position: relative;
  background: var(--glass);
  border: 1px solid var(--glass-line);
  border-radius: 12px;
  padding: 16px 17px;
  box-shadow: var(--shadow-1);
  backdrop-filter: blur(var(--blur)) saturate(1.15);
  transition: transform 0.25s cubic-bezier(0.22, 1, 0.36, 1), box-shadow 0.25s ease, border-color 0.25s ease;
}
.step-card:hover { transform: translateY(-3px); box-shadow: var(--shadow-2); border-color: var(--accent-soft-2); }
.step-card .n {
  width: 30px;
  height: 30px;
  border-radius: 50%;
  display: grid;
  place-items: center;
  background: var(--accent-soft);
  color: var(--accent-text);
  font-family: var(--mono);
  font-size: 12.5px;
  font-weight: 650;
  border: 1px solid var(--accent-soft-2);
  margin-bottom: 10px;
}
.step-card b { display: block; font-size: 13.5px; font-weight: 600; color: var(--text); }
.step-card p { margin: 4px 0 0; font-size: 12.5px; color: var(--text-3); line-height: 1.62; }
.step-card::after {
  content: "→";
  position: absolute;
  right: -14px;
  top: 50%;
  transform: translateY(-50%);
  color: var(--text-3);
  font-size: 15px;
  z-index: 1;
}
.step-card:last-child::after { display: none; }

.doc-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(238px, 1fr)); gap: 12px; }
.doc-card {
  display: flex;
  flex-direction: column;
  gap: 8px;
  color: inherit;
  text-decoration: none;
  background: var(--glass);
  border: 1px solid var(--glass-line);
  border-radius: 12px;
  padding: 15px;
  box-shadow: var(--shadow-1);
  backdrop-filter: blur(var(--blur)) saturate(1.15);
  transition: transform 0.25s cubic-bezier(0.22, 1, 0.36, 1), box-shadow 0.25s ease, border-color 0.25s ease;
}
.doc-card:hover {
  transform: translateY(-3px);
  box-shadow: var(--shadow-2);
  border-color: var(--accent-soft-2);
  text-decoration: none;
}
.doc-card .d-ico {
  width: 34px;
  height: 34px;
  border-radius: 9px;
  background: var(--accent-soft);
  color: var(--accent-text);
  display: grid;
  place-items: center;
}
.doc-card .d-ico svg { width: 17px; height: 17px; }
.doc-card b { font-size: 13.5px; font-weight: 600; color: var(--text); }
.doc-card .go {
  margin-top: auto;
  padding-top: 9px;
  border-top: 1px dashed var(--line);
  color: var(--accent-text);
  font-size: 12px;
  display: flex;
  align-items: center;
  gap: 4px;
}
.doc-card:hover .go .nav-ico { transform: translateX(3px); }
.doc-card .go .nav-ico { transition: transform 0.2s ease; }
.doc-card .go .nav-ico svg { width: 13px; height: 13px; }

.client-chips { display: flex; flex-wrap: wrap; gap: 8px; }
.client-chip {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  padding: 6px 13px;
  background: var(--surface);
  border: 1px solid var(--line-strong);
  border-radius: 999px;
  font-size: 12.5px;
  color: var(--text-2);
  transition: transform 0.18s ease, border-color 0.18s ease, color 0.18s ease, box-shadow 0.18s ease;
  cursor: default;
}
.client-chip:hover { border-color: var(--accent-soft-2); color: var(--accent-text); transform: translateY(-1px); box-shadow: var(--shadow-1); }
.client-chip .nav-ico { color: var(--accent-text); }
.client-chip .nav-ico svg { width: 14px; height: 14px; }

.wallet-hero {
  position: relative;
  overflow: hidden;
  border-radius: 16px;
  padding: 26px 30px 24px;
  margin: 2px 0 16px;
  background:
    radial-gradient(560px 280px at 92% -30%, rgba(121, 179, 154, 0.22), transparent 65%),
    radial-gradient(460px 260px at -6% 130%, rgba(201, 162, 39, 0.12), transparent 60%),
    linear-gradient(118deg, #1b231d, var(--ink) 55%, #22301f);
  border: 1px solid var(--ink-line);
  color: var(--ink-text);
  box-shadow: var(--shadow-2);
  display: grid;
  grid-template-columns: minmax(0, 1.15fr) minmax(0, 1fr);
  gap: 18px;
  align-items: center;
}
.wh-label { font-size: 11.5px; letter-spacing: 0.1em; color: var(--ink-mut); margin-bottom: 6px; }
.wh-amount {
  font-family: var(--font-display);
  font-size: 40px;
  font-weight: 560;
  line-height: 1.2;
  color: #f2f6ef;
  font-variant-numeric: tabular-nums;
}
.wh-unit { font-size: 13.5px; color: var(--ink-mut); margin-left: 9px; }
.wh-note { margin-top: 8px; color: #6f796f; font-size: 11.5px; }
.wh-side { display: flex; flex-direction: column; gap: 8px; min-width: 0; }
.wh-redeem { display: flex; gap: 8px; flex-wrap: wrap; }
.wh-redeem input {
  background: rgba(255, 255, 255, 0.07);
  border-color: rgba(121, 179, 154, 0.28);
  color: #e8ece2;
  flex: 1 1 140px;
}
.wh-redeem input::placeholder { color: rgba(216, 221, 210, 0.42); }
.wh-redeem input:hover { border-color: rgba(121, 179, 154, 0.45); }
.wh-redeem input:focus { border-color: var(--ink-accent); box-shadow: 0 0 0 3px rgba(121, 179, 154, 0.18); }
.wallet-hero .form-msg { min-height: 16px; font-size: 12px; }
.wallet-hero .form-msg.ok { color: #9ed3ae; }
.wallet-hero .form-msg.err { color: #e6a49a; }
.wh-redeem-note { color: var(--ink-mut); font-size: 11.5px; }

.streak { display: flex; gap: 10px; align-items: flex-end; flex-wrap: wrap; padding: 6px 0 2px; }
.streak-day { display: flex; flex-direction: column; align-items: center; gap: 5px; font-size: 10.5px; color: var(--text-3); }
.streak-day i {
  width: 26px;
  height: 26px;
  border-radius: 50%;
  border: 1px solid var(--line-strong);
  background: var(--surface-2);
  display: grid;
  place-items: center;
  font-style: normal;
  font-size: 10.5px;
  color: var(--text-3);
  font-family: var(--mono);
  transition: transform 0.2s ease;
}
.streak-day:hover i { transform: translateY(-2px); }
.streak-day.on i {
  background: linear-gradient(135deg, #45a07b, #2e7d5d);
  border-color: transparent;
  color: #fff;
  box-shadow: 0 2px 8px rgba(32, 99, 75, 0.3);
}
.streak-day.on { color: var(--accent-text); font-weight: 600; }
.streak-cap { margin: 2px 0 10px; }

.empty {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 9px;
  padding: 36px 12px;
  text-align: center;
  color: var(--text-3);
}
.empty .e-ico {
  width: 46px;
  height: 46px;
  border-radius: 14px;
  background: var(--accent-soft);
  color: var(--accent-text);
  display: grid;
  place-items: center;
  box-shadow: inset 0 0 0 1px var(--accent-soft-2);
  animation: float-y 3.6s ease-in-out infinite;
}
.empty .e-ico svg { width: 21px; height: 21px; }
.empty b { color: var(--text-2); font-size: 13.5px; font-weight: 600; }
.empty p { margin: 0; font-size: 12.5px; max-width: 320px; line-height: 1.6; }
.empty button { margin-top: 4px; }
@keyframes float-y {
  0%, 100% { transform: translateY(0); }
  50%      { transform: translateY(-5px); }
}

.reward-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; margin-bottom: 14px; }
.reward-card {
  position: relative;
  overflow: hidden;
  display: flex;
  align-items: center;
  gap: 13px;
  background: var(--glass);
  border: 1px solid var(--glass-line);
  border-radius: 12px;
  padding: 16px 18px;
  box-shadow: var(--shadow-1);
  backdrop-filter: blur(var(--blur)) saturate(1.15);
  transition: transform 0.25s cubic-bezier(0.22, 1, 0.36, 1), box-shadow 0.25s ease, border-color 0.25s ease;
}
.reward-card:hover { transform: translateY(-2px); box-shadow: var(--shadow-2); border-color: var(--accent-soft-2); }
.reward-card .r-ico {
  flex: 0 0 auto;
  width: 40px;
  height: 40px;
  border-radius: 12px;
  display: grid;
  place-items: center;
  background: var(--accent-soft);
  color: var(--accent-text);
}
.reward-card .r-ico svg { width: 19px; height: 19px; }
.reward-card span { display: block; color: var(--text-3); font-size: 12px; }
.reward-card b { display: block; font-size: 20px; font-weight: 650; color: var(--text); font-variant-numeric: tabular-nums; margin-top: 1px; }

.as-hero { margin-top: 46px; max-width: 420px; position: relative; animation: card-in 0.55s cubic-bezier(0.22, 1, 0.36, 1) 0.08s both; }
.as-kicker {
  margin: 0 0 13px;
  font-family: var(--mono);
  font-size: 10.5px;
  letter-spacing: 0.3em;
  color: var(--ink-accent);
}
.as-headline {
  margin: 0;
  font-family: var(--font-display);
  font-size: 31px;
  line-height: 1.45;
  font-weight: 540;
  letter-spacing: 0.015em;
  color: #eff3ec;
}
@supports (background-clip: text) {
  .as-headline {
    background: linear-gradient(118deg, #f4f7f0 22%, #b9dcc7 62%, #79b39a 96%);
    background-clip: text;
    color: transparent;
  }
}
.as-sub { margin: 13px 0 0; color: var(--ink-mut); font-size: 12.5px; line-height: 1.8; }

.as-pitch { margin-top: 30px; margin-bottom: auto; padding: 4px 0 28px; gap: 20px; max-width: 420px; }

.as-term {
  position: relative;
  border: 1px solid var(--ink-line);
  background: rgba(0, 0, 0, 0.28);
  border-radius: 10px;
  padding: 11px 14px;
  display: flex;
  flex-direction: column;
  gap: 5px;
  font-family: var(--mono);
  font-size: 11.5px;
  color: #9fb4a3;
  animation: card-in 0.55s cubic-bezier(0.22, 1, 0.36, 1) 0.5s both;
}
.as-term-line { display: flex; align-items: center; gap: 9px; white-space: nowrap; overflow: hidden; }
.t-mth { color: #79b39a; font-weight: 650; }
.t-path { color: #d8ddd2; }
.t-ok { color: #8fd0a5; }
.t-dim { color: #5f6b60; }
.t-url { color: #a9d3bd; }
.t-caret { width: 6px; height: 12px; background: #79b39a; display: inline-block; animation: caret-blink 1.05s steps(1) infinite; }

.as-stat-row { display: flex; gap: 30px; padding: 16px 2px 0; animation: card-in 0.55s cubic-bezier(0.22, 1, 0.36, 1) 0.58s both; }
.as-stat b {
  display: block;
  font-family: var(--font-display);
  font-size: 21px;
  font-weight: 560;
  color: #e9efe6;
  font-variant-numeric: tabular-nums;
}
.as-stat span { color: #6f796f; font-size: 11px; letter-spacing: 0.05em; }

.ann-item { position: relative; padding-left: 15px; }
.ann-item::before {
  content: "";
  position: absolute;
  left: 1px;
  top: 17px;
  width: 5px;
  height: 5px;
  border-radius: 50%;
  background: var(--accent-soft-2);
  box-shadow: 0 0 0 3px var(--accent-soft);
  transition: background 0.15s ease, box-shadow 0.15s ease;
}
.ann-item:hover::before { background: var(--accent); box-shadow: 0 0 0 3px var(--accent-soft-2); }

@keyframes caret-blink {
  0%, 55% { opacity: 1; }
  56%, 100% { opacity: 0; }
}
@keyframes bar-x {
  from { transform: scaleX(0); }
  to   { transform: scaleX(1); }
}

@media (max-width: 1080px) {
  .qs-grid { grid-template-columns: 1fr; }
}
@media (max-width: 900px) {
  .hero-welcome { padding: 22px 22px 20px; }
  .hw-title { font-size: 22px; }
  .hw-spring-char { font-size: 120px; bottom: -26px; right: 14px; }
  .as-headline { font-size: 26px; }
  .as-hero { margin-top: 32px; }
  .wallet-hero { grid-template-columns: 1fr; padding: 22px; }
  .wh-amount { font-size: 33px; }
  .steps-band { grid-template-columns: 1fr; }
  .step-card::after { display: none; }
  .reward-grid { grid-template-columns: 1fr; }
  .as-term { display: none; }
}
@media (max-width: 640px) {
  .hw-actions { width: 100%; margin-left: 0; }
  .hw-actions button { flex: 1 1 auto; }
  .qs-head { gap: 8px; }
  .qs-copy { margin-left: auto; }
  .qs-tabs { order: 3; width: 100%; margin: 4px 0 0; }
  .qs-body pre { font-size: 11.5px; }
  .as-stat-row { gap: 20px; }
  .sec-head { margin: 22px 0 12px; }
  .sec-title { font-size: 17.5px; }
}

.app-foot {
  margin-top: 30px;
  padding: 16px 2px 4px;
  border-top: 1px solid var(--line);
  display: flex;
  align-items: center;
  gap: 12px;
  flex-wrap: wrap;
}
.app-foot .af-left { display: flex; align-items: baseline; gap: 10px; min-width: 0; }
.app-foot b { font-size: 13px; font-weight: 650; letter-spacing: 0.01em; }
.app-foot .af-right { margin-left: auto; display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }
.af-dot { width: 4px; height: 4px; border-radius: 50%; background: var(--line-strong); display: inline-block; }

.stat-band { display: grid; grid-template-columns: repeat(auto-fit, minmax(184px, 1fr)); gap: 12px; margin-bottom: 16px; }
.band-item {
  display: flex;
  align-items: center;
  gap: 13px;
  background: var(--glass);
  border: 1px solid var(--glass-line);
  border-radius: 12px;
  padding: 13px 16px;
  box-shadow: var(--shadow-1);
  backdrop-filter: blur(var(--blur)) saturate(1.15);
  transition: transform 0.25s cubic-bezier(0.22, 1, 0.36, 1), box-shadow 0.25s ease, border-color 0.25s ease;
}
.band-item:hover { transform: translateY(-3px); box-shadow: var(--shadow-2); border-color: var(--accent-soft-2); }
.band-ico {
  width: 38px;
  height: 38px;
  border-radius: 11px;
  background: var(--accent-soft);
  color: var(--accent-text);
  display: grid;
  place-items: center;
  flex: 0 0 auto;
  animation: band-bob 3.4s ease-in-out infinite;
}
.band-item:nth-child(2) .band-ico { animation-delay: 0.45s; }
.band-item:nth-child(3) .band-ico { animation-delay: 0.9s; }
.band-item:nth-child(4) .band-ico { animation-delay: 1.35s; }
.band-ico svg { width: 18px; height: 18px; }
.band-meta { min-width: 0; }
.band-meta b { display: block; font-size: 20px; font-weight: 650; font-variant-numeric: tabular-nums; letter-spacing: -0.01em; line-height: 1.25; }
.band-meta span { color: var(--text-3); font-size: 11.5px; letter-spacing: 0.03em; }
@keyframes band-bob {
  0%, 100% { transform: translateY(0) rotate(0deg); }
  50%      { transform: translateY(-4px) rotate(-3deg); }
}

.model-ticker {
  position: relative;
  overflow: hidden;
  border: 1px solid var(--glass-line);
  border-radius: 12px;
  background: var(--glass);
  backdrop-filter: blur(var(--blur)) saturate(1.15);
  box-shadow: var(--shadow-1);
  margin: 0 0 18px;
  padding: 11px 0;
  mask-image: linear-gradient(90deg, transparent, #000 7%, #000 93%, transparent);
}
.ticker-track { display: flex; width: max-content; animation: ticker-slide 32s linear infinite; }
.model-ticker:hover .ticker-track { animation-play-state: paused; }
.ticker-group { display: flex; align-items: center; gap: 34px; padding-right: 34px; }
.ticker-chip { display: inline-flex; align-items: center; gap: 8px; font-family: var(--mono); font-size: 12px; color: var(--text-2); white-space: nowrap; }
.ticker-chip i {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: var(--accent);
  box-shadow: 0 0 0 3px var(--accent-soft);
  animation: dot-pulse 2.2s ease-in-out infinite;
  flex: 0 0 auto;
}
.ticker-chip.warn i { background: var(--warn); box-shadow: 0 0 0 3px var(--warn-soft); }
.ticker-chip.err i { background: var(--err); box-shadow: 0 0 0 3px var(--err-soft); }
.ticker-chip em { font-style: normal; color: var(--text-3); font-size: 10.5px; }
@keyframes ticker-slide { to { transform: translateX(-50%); } }

.call-list { display: flex; flex-direction: column; }
.call-row {
  display: flex;
  align-items: center;
  gap: 11px;
  padding: 10px 4px;
  border-bottom: 1px dashed var(--line);
  font-size: 12.5px;
  flex-wrap: wrap;
}
.call-row:last-child { border-bottom: 0; }
.call-row .st { width: 8px; height: 8px; border-radius: 50%; flex: 0 0 auto; }
.call-row .st.ok { background: var(--ok); box-shadow: 0 0 0 3px var(--ok-soft); }
.call-row .st.err { background: var(--err); box-shadow: 0 0 0 3px var(--err-soft); }
.call-row .cm { font-family: var(--mono); font-weight: 600; color: var(--text); }
.call-row .mut { color: var(--text-3); font-size: 11.5px; }
.call-row .rt { margin-left: auto; color: var(--text-3); font-size: 11.5px; font-variant-numeric: tabular-nums; white-space: nowrap; }

.note-list { display: grid; grid-template-columns: repeat(auto-fit, minmax(224px, 1fr)); gap: 12px; }
.note-item {
  display: flex;
  gap: 12px;
  align-items: flex-start;
  padding: 13px 15px;
  background: var(--surface-2);
  border: 1px dashed var(--line);
  border-radius: 10px;
  transition: border-color 0.2s ease, transform 0.2s ease, background 0.2s ease;
}
.note-item:hover { border-color: var(--accent-soft-2); background: var(--accent-soft); transform: translateY(-2px); }
.note-item .nav-ico { color: var(--accent-text); margin-top: 2px; flex: 0 0 auto; }
.note-item .nav-ico svg { width: 16px; height: 16px; }
.note-item b { display: block; font-size: 12.5px; font-weight: 600; color: var(--text); }
.note-item p { margin: 3px 0 0; font-size: 12px; color: var(--text-3); line-height: 1.62; }

#chat-scroll .empty { margin: auto; }
#chat-scroll .empty .row { justify-content: center; }

@media (max-width: 640px) {
  .app-foot .af-right { margin-left: 0; }
  .stat-band { grid-template-columns: repeat(2, 1fr); }
  .band-meta b { font-size: 17px; }
  .call-row .rt { margin-left: 0; width: 100%; }
}

.pw-wrap { position: relative; display: block; }
.pw-wrap input { width: 100%; padding-right: 38px; }
.pw-toggle {
  position: absolute;
  right: 5px;
  top: 50%;
  transform: translateY(-50%);
  width: 30px;
  height: 30px;
  display: grid;
  place-items: center;
  border: 0;
  border-radius: 6px;
  background: transparent;
  color: var(--text-3);
  cursor: pointer;
  padding: 0;
  box-shadow: none;
  transition: color 0.15s ease, background 0.15s ease;
}
.pw-toggle:hover { color: var(--accent-text); background: var(--surface-3); border-color: transparent; }
.pw-toggle:active { transform: translateY(-50%) scale(0.92); }
.pw-toggle:focus-visible { outline: none; color: var(--accent-text); box-shadow: 0 0 0 2px var(--ring); }
.pw-toggle svg { width: 15px; height: 15px; }

.back-top {
  position: fixed;
  right: 22px;
  bottom: 72px;
  z-index: 35;
  width: 40px;
  height: 40px;
  border-radius: 50%;
  background: var(--glass);
  border: 1px solid var(--glass-line);
  backdrop-filter: blur(10px) saturate(1.15);
  box-shadow: var(--shadow-2);
  display: grid;
  place-items: center;
  color: var(--text-2);
  opacity: 0;
  pointer-events: none;
  transform: translateY(10px) scale(0.9);
  transition: opacity 0.25s ease, transform 0.3s cubic-bezier(0.22, 1, 0.36, 1),
    background 0.15s ease, color 0.15s ease, border-color 0.15s ease;
}
.back-top.show { opacity: 1; pointer-events: auto; transform: none; }
.back-top:hover {
  background: var(--surface);
  color: var(--accent-text);
  border-color: var(--accent-soft-2);
  transform: translateY(-2px);
}
.back-top:active { transform: translateY(0) scale(0.94); }
.back-top:focus-visible { outline: none; border-color: var(--accent); box-shadow: 0 0 0 3px var(--ring); }
.back-top svg.nav-ico { width: 16px; height: 16px; }

.chart-empty {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 7px;
  margin: auto;
  color: var(--text-2);
  font-size: 13px;
  font-weight: 600;
}
.chart-empty .ce-ico {
  width: 42px;
  height: 42px;
  border-radius: 13px;
  background: var(--accent-soft);
  color: var(--accent-text);
  display: grid;
  place-items: center;
  box-shadow: inset 0 0 0 1px var(--accent-soft-2);
  animation: float-y 3.6s ease-in-out infinite;
}
.chart-empty .ce-ico svg { width: 19px; height: 19px; }
.chart-empty .muted { font-weight: 400; }

.pg-empty .e-ico {
  width: 56px;
  height: 56px;
  border-radius: 18px;
  background: linear-gradient(135deg, var(--accent-soft), var(--accent-soft-2));
  position: relative;
  animation: none;
}
.pg-empty .e-ico::before {
  content: "";
  position: absolute;
  inset: -6px;
  border-radius: 22px;
  border: 1px solid var(--accent-soft-2);
  animation: halo-pulse 2.8s ease-in-out infinite;
}
.pg-empty .e-ico svg { width: 24px; height: 24px; }
.pg-empty b { font-size: 15px; }
.pg-empty .row { justify-content: center; }
@keyframes halo-pulse {
  0%, 100% { transform: scale(1); opacity: 0.7; }
  50%      { transform: scale(1.14); opacity: 0.2; }
}

@media (max-width: 640px) {
  .back-top { right: 14px; bottom: calc(72px + env(safe-area-inset-bottom)); width: 38px; height: 38px; }
  .pw-wrap input { padding-right: 36px; }
  .pw-toggle { width: 28px; height: 28px; }
}

.route-guide {
  margin: 10px 0 12px;
  padding-left: 20px;
  display: grid;
  gap: 7px;
  font-size: 13px;
  line-height: 1.65;
  color: var(--text-2);
}
.route-guide li::marker { color: var(--accent); font-weight: 500; }
.route-guide b { color: var(--text); font-weight: 500; }

.route-sim-out {
  margin-top: 10px;
  padding: 11px 13px;
  border: 1px solid var(--accent-soft-2);
  border-radius: 10px;
  background: var(--accent-soft);
  font-size: 13px;
  line-height: 1.7;
  color: var(--text-2);
  word-break: break-word;
}
.route-sim-out b { color: var(--accent-text); font-weight: 500; }
.route-sim-out.muted { background: var(--surface-2); border-color: var(--line); }

.route-sim-row select { width: auto; flex: 1 1 170px; min-width: 0; }

#public-view { min-height: 100vh; display: flex; flex-direction: column; }

#pub-topbar {
  position: sticky;
  top: 0;
  z-index: 30;
  background: var(--glass);
  border-bottom: 1px solid var(--glass-line);
  backdrop-filter: blur(var(--blur)) saturate(1.15);
}
.pub-top {
  max-width: 1080px;
  margin: 0 auto;
  padding: 10px 20px;
  display: flex;
  align-items: center;
  gap: 18px;
}
.pub-brand { display: flex; align-items: center; gap: 10px; color: var(--text); flex: 0 0 auto; }
.pub-brand:hover { text-decoration: none; }
.pub-brand .as-logo { width: 32px; height: 32px; border-radius: 8px; }
.pub-brand .as-logo .logo-img { width: 19px; height: 19px; border-radius: 5px; }
.pub-brand-name { font-weight: 650; font-size: 15px; letter-spacing: 0.01em; white-space: nowrap; }
.pub-links { display: flex; align-items: center; gap: 2px; min-width: 0; }
.pub-links a {
  padding: 6px 12px;
  border-radius: var(--radius);
  color: var(--text-2);
  font-size: 13px;
  font-weight: 550;
  white-space: nowrap;
  transition: background 0.15s ease, color 0.15s ease;
}
.pub-links a:hover { background: var(--surface-3); color: var(--text); text-decoration: none; }
.pub-links a.on { color: var(--accent-text); background: var(--accent-soft); }
.pub-spacer { flex: 1 1 auto; }
.pub-actions { display: flex; align-items: center; gap: 8px; flex: 0 0 auto; }
.pub-menu-btn { display: none; }

.pub-drawer { flex-direction: column; gap: 2px; padding: 8px 16px 14px; border-top: 1px solid var(--line); }
.pub-drawer a {
  display: flex; align-items: center; gap: 10px;
  padding: 9px 10px; border-radius: var(--radius);
  color: var(--text-2); font-size: 13.5px; font-weight: 550;
}
.pub-drawer a:hover { background: var(--surface-3); text-decoration: none; }
.pub-drawer a.on { color: var(--accent-text); background: var(--accent-soft); }
.pub-drawer-sep { height: 1px; background: var(--line); margin: 6px 2px; }
#pub-drawer-actions { display: flex; gap: 8px; padding: 4px 2px 2px; }

#pub-content {
  flex: 1 1 auto;
  width: 100%;
  max-width: 1080px;
  margin: 0 auto;
  padding: 8px 20px 40px;
}
.pub-foot {
  border-top: 1px solid var(--line);
  padding: 18px 20px calc(20px + env(safe-area-inset-bottom));
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  flex-wrap: wrap;
  font-size: 12px;
  color: var(--text-2);
}
.pub-foot-dim { color: var(--text-3); }
.pub-foot-link { color: var(--text-3); }
.pub-foot-link:hover { color: var(--accent-text); }

.home-hero { padding: 46px 0 10px; }
.home-hero .as-kicker { color: var(--accent-text); }
.home-title {
  margin: 0;
  font-family: var(--font-display);
  font-weight: 560;
  font-size: 34px;
  line-height: 1.4;
  letter-spacing: 0.015em;
  color: var(--text);
  max-width: 640px;
}
.home-sub { margin: 14px 0 0; font-size: 13.5px; line-height: 1.85; color: var(--text-2); max-width: 620px; }
.home-cta { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; margin-top: 22px; }
.home-stats { margin-top: 26px; }

.as-brand-link { display: flex; align-items: center; gap: 12px; color: inherit; }
.as-brand-link:hover { text-decoration: none; }
.as-brand-link:hover h1 { color: #ffffff; }
.brand-link { display: flex; align-items: center; gap: 10px; color: inherit; }
.brand-link:hover { text-decoration: none; }

@media (max-width: 760px) {
  .pub-links { display: none; }
  .pub-menu-btn { display: grid; }
  .pub-brand-name { font-size: 14px; }
}
@media (max-width: 640px) {
  .pub-top { padding: 9px 14px; gap: 10px; }
  #pub-content { padding: 4px 14px 32px; }
  .home-hero { padding: 30px 0 6px; }
  .home-title { font-size: 26px; }
  .home-sub { font-size: 13px; }
  .pub-actions .small-btn { padding: 5px 10px; font-size: 12px; }
  .pub-foot { font-size: 11.5px; }
}

.band-item b.band-phrase { font-size: 17px; font-weight: 650; letter-spacing: 0.01em; line-height: 1.2; }

/* ---------------- 每日签到 / 顶栏签到入口 ---------------- */

.checkin-card {
  display: flex;
  align-items: center;
  gap: 18px;
  flex-wrap: wrap;
  padding: 16px 18px;
  background: linear-gradient(120deg, var(--accent-soft) 0%, var(--glass) 58%, var(--warn-soft) 100%);
  border-color: var(--accent-soft-2);
}

.checkin-main { display: flex; align-items: center; gap: 13px; min-width: 0; flex: 1 1 280px; }

.checkin-ico {
  display: grid;
  place-items: center;
  width: 40px;
  height: 40px;
  flex: none;
  border-radius: 11px;
  background: var(--accent);
  color: #fff;
  box-shadow: 0 6px 16px rgba(32, 99, 75, 0.22);
}
.checkin-ico .nav-ico { width: 19px; height: 19px; stroke-width: 2; }

.checkin-txt { min-width: 0; }
.checkin-txt b { display: block; font-size: 14.5px; font-weight: 650; letter-spacing: 0.01em; }
.checkin-txt p { margin: 3px 0 0; font-size: 12.5px; line-height: 1.6; color: var(--text-2); }

.checkin-msg { display: block; margin-top: 5px; font-size: 12.5px; }
.checkin-msg:empty { display: none; }
.checkin-msg.ok { color: var(--ok); }
.checkin-msg.err { color: var(--err); }

.checkin-week { display: flex; align-items: center; gap: 6px; flex-wrap: wrap; }
.cw-day {
  display: grid;
  place-items: center;
  width: 26px;
  height: 26px;
  border-radius: 50%;
  font-size: 11.5px;
  color: var(--text-3);
  background: var(--surface);
  border: 1px solid var(--line);
}
.cw-day.on { background: var(--accent); border-color: var(--accent); color: #fff; font-weight: 600; }
.cw-day.today { box-shadow: 0 0 0 2px var(--ring); }

.checkin-btn { flex: none; min-width: 104px; }
.checkin-btn[disabled] { opacity: 0.72; }

.tb-checkin {
  flex: none;
  padding: 4px 10px;
  border-radius: 999px;
  border: 1px solid var(--accent-soft-2);
  background: var(--accent-soft);
  color: var(--accent-text);
  font: inherit;
  font-size: 12px;
  font-weight: 600;
  cursor: pointer;
}
.tb-checkin:hover { background: var(--accent-soft-2); }
.tb-checkin[disabled], .tb-checkin.done {
  background: transparent;
  color: var(--text-3);
  border-color: var(--line);
  cursor: default;
}

@media (max-width: 640px) {
  .checkin-card { gap: 12px; padding: 14px; }
  .checkin-week { order: 3; }
  .checkin-btn { order: 4; width: 100%; min-width: 0; padding: 10px 14px; }
}

/* ---------------- 移动端顶栏：品牌可省略，签到与积分不可被裁 ---------------- */

.tb-brand { flex: 0 1 auto; }
.tb-brand b { min-width: 0; }
.tb-spacer { flex: 0 1 8px; }
.tb-credits { flex: none; }
#mobile-topbar .tb-checkin { flex: none; margin-left: auto; }
#mobile-topbar .tb-checkin + .tb-credits { margin-left: 8px; }

@media (max-width: 400px) {
  #mobile-topbar { gap: 5px; padding: 0 8px; }
  .tb-brand b { max-width: 96px; }
  .tb-credits { font-size: 11.5px; }
}

/* ---------------- 表格：紧凑列不换行 ----------------
   十几列的表在窄屏上会被压成"每格一个字宽"，时间被拆成三行、
   行高撑到几百像素。紧凑列一律 nowrap，让表格按内容撑开并靠
   .tbl-wrap 横向滚动，而不是把文字竖排。 */
td.nowrap, th.nowrap { white-space: nowrap; }
.tbl-wrap td.mono, .tbl-wrap th.mono { white-space: nowrap; }

/* 列数很多的表（管理员日志/用户表）：窄屏给一个下限宽度，
   让列宽由内容决定，而不是把文本压成每格一两个字、行高撑到上百像素。 */
@media (max-width: 760px) {
  .tbl-wrap table.tbl-wide { min-width: 920px; }
}

/* 缓存命中：token 列旁边的轻量标记（命中越多折扣越大，值得在列表里可见） */
.tag.tok-cache {
  margin-left: 6px;
  background: var(--accent-soft);
  border: 1px solid var(--accent-soft-2);
  color: var(--accent-text);
  font-weight: 600;
}
.call-row .st.warn { background: var(--warn); box-shadow: 0 0 0 3px var(--warn-soft); }

/* ---------------- 弹窗页脚：关闭按钮独立成行、右对齐 ----------------
   弹窗正文自带「创建/取消」时，默认的「关闭」会另起一行并和它们一样左对齐，
   手机上看像多冒出来一排按钮。给它一条分隔线并右对齐，读起来才像页脚。 */
.dialog-actions {
  justify-content: flex-end;
  margin-top: 16px;
  padding-top: 12px;
  border-top: 1px dashed var(--line);
}

.dialog-actions .ghost { font-size: 12.5px; }

/* 2026-10-28 后台用户管理：内容区加宽 + 操作列吸附（避免左滑才能点通过/拒绝） */
#content.admin-wide { max-width: 1680px; }
table.admin-users { font-size: 12px; }
table.admin-users th, table.admin-users td { padding: 6px 8px; white-space: nowrap; }
table.admin-users th:last-child,
table.admin-users td:last-child {
  position: sticky;
  right: 0;
  z-index: 2;
  background: var(--surface);
  box-shadow: -10px 0 14px -10px rgba(0, 0, 0, 0.18);
}
table.admin-users tbody tr:hover td:last-child { background: var(--surface-2); }
