/* 娅娅 · 晨光水族箱
   深海的底色，清晨的光，和一条慢慢长大的小鱼。 */

:root {
  --bg: #061019;
  --ink: #f6eddd;
  --ink-dim: #a6b9ba;
  --ink-faint: #6e878a;
  --gold: #ffd09a;
  --gold-deep: #f3a970;
  --coral: #ff9d7f;
  --aqua: #8fe7d6;
  --violet: #c8b6ff;
  --line: rgba(255, 221, 178, 0.11);
  --line-strong: rgba(255, 221, 178, 0.22);
  --panel: rgba(14, 31, 39, 0.66);
  --panel-solid: #0d1d25;
  --radius: 22px;
  --radius-sm: 14px;
  --shadow: 0 34px 80px -42px rgba(0, 0, 0, 0.9);
  --font: "Microsoft YaHei UI", "Microsoft YaHei", "PingFang SC", "Hiragino Sans GB", "Noto Sans SC", sans-serif;
  --serif: "Cambria", "Georgia", "Songti SC", "SimSun", serif;
}

* { box-sizing: border-box; }

html, body { height: 100%; }

body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font-family: var(--font);
  font-size: 14px;
  line-height: 1.6;
  overflow: hidden;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

button, input, textarea, select { font: inherit; color: inherit; }
button { cursor: pointer; border: none; background: none; }
button:disabled { cursor: not-allowed; opacity: 0.5; }
input, textarea { outline: none; }
::selection { background: rgba(255, 190, 130, 0.3); color: #fff8ec; }
[hidden] { display: none !important; }

.sprite { position: absolute; width: 0; height: 0; overflow: hidden; }

svg.icon {
  width: 16px;
  height: 16px;
  flex: 0 0 auto;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.8;
  stroke-linecap: round;
  stroke-linejoin: round;
  vertical-align: -2px;
}

/* ---------------------------------------------------------- 背景 */

.ambient { position: fixed; inset: 0; overflow: hidden; pointer-events: none; z-index: 0; }
.ambient::before {
  content: "";
  position: absolute;
  inset: 0;
  background:
    radial-gradient(1000px 700px at 12% -12%, rgba(255, 158, 104, 0.22), transparent 62%),
    radial-gradient(760px 560px at 92% 4%, rgba(120, 226, 208, 0.1), transparent 60%),
    radial-gradient(900px 760px at 52% 112%, rgba(96, 62, 138, 0.22), transparent 62%),
    linear-gradient(160deg, #07131c 0%, #061019 48%, #050d13 100%);
}
.ambient-glow {
  position: absolute;
  border-radius: 50%;
  filter: blur(80px);
  opacity: 0.55;
  animation: drift 26s ease-in-out infinite alternate;
}
.glow-warm { width: 520px; height: 420px; top: -160px; left: -100px; background: rgba(255, 146, 92, 0.28); }
.glow-aqua { width: 420px; height: 380px; right: -120px; top: 18%; background: rgba(88, 214, 196, 0.14); animation-delay: -8s; }
.glow-violet { width: 500px; height: 460px; left: 32%; bottom: -260px; background: rgba(120, 88, 190, 0.2); animation-delay: -15s; }
.grain {
  position: absolute;
  inset: 0;
  opacity: 0.045;
  mix-blend-mode: overlay;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='160' height='160'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='.9' numOctaves='3'/%3E%3C/filter%3E%3Crect width='160' height='160' filter='url(%23n)' opacity='.7'/%3E%3C/svg%3E");
}
@keyframes drift {
  from { transform: translate3d(0, 0, 0) scale(1); }
  to { transform: translate3d(26px, -20px, 0) scale(1.08); }
}

/* ---------------------------------------------------------- 框架 */

.app {
  position: relative;
  z-index: 1;
  display: grid;
  grid-template-columns: 326px minmax(0, 1fr);
  height: 100vh;
}

.sidebar {
  display: flex;
  flex-direction: column;
  gap: 13px;
  min-height: 0;
  padding: 20px 20px 14px;
  border-right: 1px solid rgba(255, 221, 178, 0.07);
  background: linear-gradient(180deg, rgba(8, 21, 28, 0.78), rgba(5, 13, 18, 0.9));
  backdrop-filter: blur(26px);
}

.main { display: flex; flex-direction: column; min-width: 0; min-height: 0; }

/* ---------------------------------------------------------- 品牌 */

.brand { display: flex; align-items: center; gap: 11px; min-height: 42px; }
.brand-mark {
  width: 40px; height: 40px;
  display: grid; place-items: center;
  border-radius: 13px;
  color: #ffce95;
  background: linear-gradient(145deg, rgba(255, 208, 154, 0.2), rgba(255, 143, 110, 0.06));
  border: 1px solid rgba(255, 208, 154, 0.22);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.14), 0 8px 24px -12px rgba(255, 168, 112, 0.55);
}
.brand-mark svg { width: 30px; height: 30px; }
.brand-text { display: flex; flex-direction: column; line-height: 1.15; }
.brand-text strong { font-size: 20px; letter-spacing: 0.14em; font-weight: 600; }
.brand-text span { margin-top: 4px; font-size: 8.5px; letter-spacing: 0.22em; color: var(--ink-faint); }
.brand-tag {
  margin-left: auto;
  font-size: 9.5px; letter-spacing: 0.12em;
  color: rgba(255, 208, 154, 0.62);
  border: 1px solid rgba(255, 208, 154, 0.2);
  border-radius: 999px;
  padding: 3px 8px;
}

/* ---------------------------------------------------------- 水族箱 */

.tank {
  position: relative;
  height: 300px;
  flex: 0 0 auto;
  border-radius: 22px;
  border: 1px solid rgba(255, 221, 178, 0.22);
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.035), rgba(255, 255, 255, 0.012));
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.05), 0 10px 30px -22px rgba(0, 0, 0, 0.8);
}

.mascot { position: absolute; inset: 0; pointer-events: none; }
.fish-float {
  position: absolute;
  left: 50%; bottom: 24px;
  width: 340px; height: 276px;
  margin-left: -170px;
  transform: scale(var(--fish-scale, 0.84));
  transform-origin: 50% 82%;
  transition: left 1s cubic-bezier(0.2, 0.8, 0.2, 1), top 1s cubic-bezier(0.2, 0.8, 0.2, 1), transform 1.2s cubic-bezier(0.2, 0.8, 0.2, 1);
  pointer-events: auto;
  cursor: grab;
  touch-action: none;
}
.fish-float.dragging { cursor: grabbing; transition: none; }
.fish-float:hover .blush { opacity: 0.78; }
.fish-img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: contain;
  display: block;
  user-select: none;
  -webkit-user-drag: none;
  opacity: 0;
  transition: opacity 0.22s ease;
  filter: drop-shadow(0 8px 18px rgba(0, 0, 0, 0.45));
}
.fish-img.active { opacity: 1; }
.fish-float { perspective: 700px; }
.fish-turn {
  position: absolute;
  inset: 0;
  transform-style: preserve-3d;
  transition: transform 0.5s cubic-bezier(0.2, 0.7, 0.3, 1);
  will-change: transform;
}
.fish-shadow {
  position: absolute;
  left: 18%;
  right: 18%;
  bottom: 3%;
  height: 8%;
  border-radius: 50%;
  background: radial-gradient(ellipse at center, rgba(3, 12, 18, 0.6), rgba(3, 12, 18, 0) 72%);
  filter: blur(4px);
  z-index: 0;
  pointer-events: none;
}
.fish {
  position: absolute;
  inset: 0;
  z-index: 1;
  animation: breathe 6.5s ease-in-out infinite;
  transform-origin: 50% 90%;
}
@keyframes breathe {
  0%, 100% { transform: translateY(0) rotate(0deg) scale(1); }
  50% { transform: translateY(-3px) rotate(-0.4deg) scale(1.006); }
}
.fish-aura { display: none; }
@keyframes swim {
  0%, 100% { transform: translate(0, 0) rotate(0deg); }
  30% { transform: translate(-5px, -8px) rotate(-1.6deg); }
  66% { transform: translate(4px, 5px) rotate(1.1deg); }
}
.fish-img.pop { animation: pop 0.5s ease; }
@keyframes pop {
  0% { transform: scale(1); }
  35% { transform: scale(1.07, 0.93); }
  70% { transform: scale(0.95, 1.05); }
  100% { transform: scale(1); }
}

.tail { animation: tail 3.8s ease-in-out infinite; transform-origin: 64px 122px; }
@keyframes tail { 0%, 100% { transform: rotate(0deg) scaleX(1); } 50% { transform: rotate(-6deg) scaleX(0.94); } }
.fin-top { animation: finTop 4.4s ease-in-out infinite; transform-origin: 212px 52px; }
@keyframes finTop { 0%, 100% { transform: rotate(0deg); } 50% { transform: rotate(-4deg); } }
.side-fin { animation: sideFin 4.2s ease-in-out infinite; transform-origin: 158px 178px; }
@keyframes sideFin { 0%, 100% { transform: rotate(0deg); } 50% { transform: rotate(-9deg); } }
.belly { animation: belly 8.5s ease-in-out infinite; transform-box: fill-box; transform-origin: 50% 80%; }
@keyframes belly { 0%, 100% { transform: scaleY(1); } 50% { transform: scaleY(1.035); } }
.spout { animation: spout 9.5s infinite; }
@keyframes spout {
  0%, 82%, 100% { opacity: 0; }
  84% { opacity: 0.95; }
  92% { opacity: 0.9; }
  96% { opacity: 0; }
}
.aura { animation: aura 6.4s ease-in-out infinite; }
@keyframes aura { 0%, 100% { opacity: 0.7; } 50% { opacity: 1; } }
.eye { animation: blink 6.4s infinite; transform-box: fill-box; transform-origin: center; }
@keyframes blink {
  0%, 91%, 95%, 100% { transform: scaleY(1); }
  93% { transform: scaleY(0.08); }
}
.pupil { transition: transform 0.35s ease-out; }
.spark-fx {
  position: fixed;
  pointer-events: none;
  z-index: 90;
  font-size: 13px;
  animation: sparkRise 1.3s ease-out forwards;
}
@keyframes sparkRise {
  0% { transform: translate(0, 0) scale(0.6); opacity: 1; }
  100% { transform: translate(var(--dx, 0px), var(--dy, -46px)) scale(1.15); opacity: 0; }
}

.msg-actions { display: flex; gap: 8px; margin-top: 8px; flex-wrap: wrap; }
.msg-actions .mini-btn { font-size: 11px; padding: 4px 10px; }
.factcheck-box {
  margin-top: 8px;
  padding: 9px 11px;
  border-radius: 12px;
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid rgba(150, 200, 255, 0.18);
  font-size: 11.5px;
  line-height: 1.55;
  color: #cfd9dd;
}
.factcheck-box b { display: block; color: #bfe3ff; margin-bottom: 2px; }
.factcheck-box span { font-size: 10.5px; color: #8fa3ab; }
.factcheck-box p { margin: 6px 0 4px; }
.factcheck-box a { color: #8ec5ff; text-decoration: none; font-size: 11px; }
.token-stats { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; margin-bottom: 10px; }
.token-stats > div { background: rgba(255,255,255,0.04); border: 1px solid rgba(150,200,255,0.16); border-radius: 10px; padding: 8px 10px; }
.token-stats b { display: block; font-size: 11px; color: #bfe3ff; margin-bottom: 2px; }
.token-stats span { font-size: 11.5px; }

.mascot[data-stage="weiguang"] {
  --fish-scale: 0.9;
  --fish-a: #e2f2ff; --fish-b: #8ec5ff; --fish-c: #5f9dff;
  --fin-a: rgba(130, 185, 255, 0.95); --fin-b: rgba(84, 140, 240, 0.6);
  --glow: rgba(140, 190, 255, 0.55);
}
.mascot[data-stage="chenlu"] {
  --fish-scale: 0.96;
  --fish-a: #dfeeff; --fish-b: #7db8ff; --fish-c: #4f8dff;
  --fin-a: rgba(122, 176, 255, 0.95); --fin-b: rgba(72, 128, 238, 0.62);
  --glow: rgba(130, 182, 255, 0.6);
}
.mascot[data-stage="zhaoxia"] {
  --fish-scale: 1.0;
  --fish-a: #e0e9ff; --fish-b: #8fa8ff; --fish-c: #6f7ff0;
  --fin-a: rgba(140, 165, 255, 0.95); --fin-b: rgba(108, 124, 240, 0.66);
  --glow: rgba(150, 172, 255, 0.65);
}
.mascot[data-stage="xiguang"] {
  --fish-scale: 1.04;
  --fish-a: #dfe9ff; --fish-b: #77a9ff; --fish-c: #4d7dff;
  --fin-a: rgba(122, 170, 255, 0.98); --fin-b: rgba(74, 122, 246, 0.7);
  --glow: rgba(160, 190, 255, 0.7);
}
.mascot[data-stage="xihe"] {
  --fish-scale: 1.08;
  --fish-a: #e2e4ff; --fish-b: #9a96ff; --fish-c: #7f6ae8;
  --fin-a: rgba(150, 148, 255, 0.98); --fin-b: rgba(124, 104, 230, 0.62);
  --glow: rgba(176, 168, 255, 0.75);
}
.stop-a { stop-color: var(--fish-a); }
.stop-b { stop-color: var(--fish-b); }
.stop-c { stop-color: var(--fish-c); }
.stop-fin-a { stop-color: var(--fin-a); }
.stop-fin-b { stop-color: var(--fin-b); }
.stop-glow { stop-color: var(--glow); }
.mascot[data-stage="xiguang"] .crown,
.mascot[data-stage="xihe"] .crown { opacity: 1; }
.mascot[data-stage="xihe"] .halo { opacity: 1; animation: halo 5s ease-in-out infinite; }
@keyframes halo { 0%, 100% { opacity: 0.35; } 50% { opacity: 0.9; } }

.tank-label {
  position: absolute;
  left: 14px; right: 14px; bottom: 10px;
  display: flex; align-items: center; justify-content: space-between;
  z-index: 4;
  pointer-events: none;
}
.tank-stage {
  font-size: 10.5px; letter-spacing: 0.16em;
  color: rgba(255, 223, 184, 0.85);
  text-shadow: 0 2px 10px rgba(0, 0, 0, 0.8);
}
.tank-mood { font-size: 10.5px; color: rgba(190, 224, 219, 0.65); }

.speech {
  position: absolute;
  z-index: 6;
  left: 13px; right: 13px; bottom: 34px;
  max-height: 98px;
  overflow: auto;
  padding: 9px 12px;
  border-radius: 14px;
  font-size: 11.5px;
  line-height: 1.62;
  color: #f4e9d6;
  background: rgba(6, 18, 24, 0.88);
  border: 1px solid rgba(255, 214, 166, 0.2);
  box-shadow: 0 12px 30px -18px rgba(0, 0, 0, 0.9);
  backdrop-filter: blur(10px);
  animation: speechIn 0.45s cubic-bezier(0.2, 0.9, 0.2, 1);
}
.speech::after {
  content: "";
  position: absolute;
  left: 26px; top: -5px;
  width: 9px; height: 9px;
  background: rgba(6, 18, 24, 0.86);
  border-left: 1px solid rgba(255, 214, 166, 0.2);
  border-top: 1px solid rgba(255, 214, 166, 0.2);
  transform: rotate(45deg);
}
@keyframes speechIn { from { opacity: 0; transform: translateY(-6px); } to { opacity: 1; transform: none; } }

/* ---------------------------------------------------------- 娅娅信息 */

.pet-meta { flex: 0 0 auto; padding: 0 3px; }
.pet-name-row { display: flex; align-items: baseline; gap: 9px; }
.pet-name-row h1 { margin: 0; font-size: 22px; letter-spacing: 0.1em; font-weight: 600; }
.stage-badge {
  font-size: 10px;
  letter-spacing: 0.08em;
  color: #ffd3a0;
  padding: 2px 8px;
  border-radius: 999px;
  border: 1px solid rgba(255, 208, 154, 0.24);
  background: rgba(255, 190, 130, 0.08);
}
.pet-stage-title { margin: 4px 0 9px; font-size: 11.5px; color: var(--ink-faint); }
.xp-line { display: flex; align-items: center; gap: 9px; font-size: 10.5px; color: var(--ink-dim); }
.xp-line .lv { letter-spacing: 0.04em; color: var(--gold); }
.xp-line .lv b { font-family: var(--serif); font-size: 13px; }
.xp-track {
  flex: 1;
  height: 3px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.08);
  overflow: hidden;
}
.xp-track i {
  display: block;
  height: 100%;
  width: 0%;
  border-radius: inherit;
  background: linear-gradient(90deg, #ffbe83, #ffe1b3 55%, #9fe9d8);
  box-shadow: 0 0 12px rgba(255, 190, 130, 0.55);
  transition: width 0.8s cubic-bezier(0.2, 0.8, 0.2, 1);
}
.xp-track.large { height: 5px; max-width: 320px; }
.xp-text { font-variant-numeric: tabular-nums; color: var(--ink-faint); }

.care-row { display: flex; gap: 7px; flex: 0 0 auto; }
.care-btn {
  flex: 1;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 5px;
  height: 35px;
  border-radius: 11px;
  border: 1px solid rgba(255, 221, 178, 0.1);
  background: rgba(255, 240, 220, 0.035);
  color: var(--ink-dim);
  font-size: 11px;
  transition: 0.2s;
}
.care-btn .icon { width: 13px; height: 13px; }
.care-btn:hover { color: var(--gold); border-color: rgba(255, 208, 154, 0.3); background: rgba(255, 208, 154, 0.07); transform: translateY(-1px); }

/* ---------------------------------------------------------- 导航 */

.nav { display: flex; flex-direction: column; gap: 3px; margin-top: 2px; }
.nav-item {
  position: relative;
  display: grid;
  grid-template-columns: 22px 1fr auto;
  align-items: center;
  gap: 10px;
  padding: 10px 12px;
  border-radius: 12px;
  color: var(--ink-dim);
  text-align: left;
  transition: 0.2s;
}
.nav-item .icon { width: 17px; height: 17px; color: var(--ink-faint); transition: 0.2s; }
.nav-item span { font-size: 13px; letter-spacing: 0.04em; }
.nav-item em { font-style: normal; font-size: 9.5px; color: rgba(142, 166, 168, 0.55); letter-spacing: 0.04em; }
.nav-item:hover { color: var(--ink); background: rgba(255, 245, 230, 0.045); }
.nav-item.active {
  color: #ffe1ba;
  background: linear-gradient(90deg, rgba(255, 190, 130, 0.14), rgba(255, 190, 130, 0.02));
  box-shadow: inset 0 0 0 1px rgba(255, 208, 154, 0.1);
}
.nav-item.active::before {
  content: "";
  position: absolute; left: 0; top: 11px; bottom: 11px;
  width: 2px; border-radius: 2px;
  background: linear-gradient(180deg, #ffe0b0, #ff9f7c);
  box-shadow: 0 0 10px rgba(255, 180, 120, 0.7);
}
.nav-item.active .icon { color: var(--gold); }
.nav-item.active em { color: rgba(255, 208, 154, 0.55); }

.side-foot {
  margin-top: auto;
  padding-top: 4px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  font-size: 10px;
  color: var(--ink-faint);
}
.engine-pill {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 4px 9px;
  border-radius: 999px;
  border: 1px solid rgba(143, 231, 214, 0.16);
  background: rgba(143, 231, 214, 0.05);
  color: rgba(180, 235, 225, 0.8);
}
.engine-pill i { width: 5px; height: 5px; border-radius: 50%; background: var(--aqua); box-shadow: 0 0 8px var(--aqua); }
.engine-pill b { font-weight: 500; }
.engine-pill.offline { border-color: rgba(255, 208, 154, 0.16); background: rgba(255, 208, 154, 0.05); color: rgba(255, 216, 170, 0.8); }
.engine-pill.offline i { background: var(--gold); box-shadow: 0 0 8px var(--gold); }
.side-version { letter-spacing: 0.1em; opacity: 0.6; }
.mem-meta { display: flex; align-items: center; gap: 8px; margin-top: 8px; flex-wrap: wrap; }
.mem-strength { position: relative; display: inline-block; width: 54px; height: 4px; border-radius: 999px; background: rgba(255, 255, 255, 0.1); overflow: hidden; }
.mem-strength i { position: absolute; inset: 0 auto 0 0; border-radius: 999px; background: rgba(255, 208, 154, 0.75); }
.mem-strength.strong i { background: rgba(140, 226, 190, 0.85); }
.mem-strength.weak i { background: rgba(255, 255, 255, 0.3); }
.mem-entities { font-size: 10.5px; color: rgba(190, 224, 219, 0.72); letter-spacing: 0.04em; }
.mem-mention { font-size: 10.5px; color: rgba(255, 208, 154, 0.7); }
.mem-mention.recent { color: rgba(190, 224, 219, 0.55); }
.icon-btn.muted { opacity: 0.38; }
.icon-btn.muted:hover { opacity: 0.7; }

/* ---------------------------------------------------------- 顶栏 */

.topbar {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 20px;
  padding: 22px 30px 12px;
  flex: 0 0 auto;
}
.eyebrow {
  margin: 0 0 5px;
  font-size: 9px;
  letter-spacing: 0.26em;
  text-transform: uppercase;
  color: rgba(255, 202, 148, 0.6);
}
.topbar-title h2 {
  margin: 0;
  font-size: 25px;
  font-weight: 500;
  letter-spacing: 0.04em;
}
.topbar-side { display: flex; align-items: center; gap: 12px; }
.stat-chips { display: flex; gap: 7px; }
.chip {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  height: 30px;
  padding: 0 10px;
  border-radius: 999px;
  border: 1px solid rgba(255, 221, 178, 0.09);
  background: rgba(255, 244, 228, 0.035);
  font-size: 10px;
  color: var(--ink-faint);
}
.chip .icon { width: 12px; height: 12px; color: rgba(255, 191, 133, 0.75); }
.chip b { font-family: var(--serif); font-size: 13px; font-weight: 600; color: var(--ink); font-variant-numeric: tabular-nums; }
.chip em { font-style: normal; }
.chip.due b { color: #ffcfa0; }
.icon-btn {
  width: 36px; height: 36px;
  display: grid; place-items: center;
  border-radius: 11px;
  border: 1px solid rgba(255, 221, 178, 0.1);
  background: rgba(255, 244, 228, 0.035);
  color: var(--ink-dim);
  transition: 0.2s;
}
.icon-btn:hover { color: var(--gold); border-color: rgba(255, 208, 154, 0.3); transform: rotate(12deg); }

/* ---------------------------------------------------------- 视图 */

.views { position: relative; flex: 1; min-height: 0; }
.view {
  height: 100%;
  overflow-y: auto;
  padding: 6px 30px 28px;
  animation: viewIn 0.35s ease;
}
@keyframes viewIn { from { opacity: 0; transform: translateY(6px); } to { opacity: 1; transform: none; } }
#view-chat { overflow: hidden; display: flex; flex-direction: column; padding-bottom: 12px; }
#view-chat.active { display: flex; }

::-webkit-scrollbar { width: 8px; height: 8px; }
::-webkit-scrollbar-track { background: transparent; }
::-webkit-scrollbar-thumb { background: rgba(255, 225, 190, 0.13); border-radius: 999px; border: 2px solid transparent; background-clip: content-box; }
::-webkit-scrollbar-thumb:hover { background: rgba(255, 225, 190, 0.24); background-clip: content-box; }

/* ---------------------------------------------------------- 对话 */

.chat-wrap { width: 100%; max-width: 850px; margin: 0 auto; height: 100%; display: flex; flex-direction: column; min-height: 0; }
.chat-scroll {
  flex: 1;
  min-height: 0;
  overflow-y: auto;
  padding: 6px 6px 8px;
  scroll-behavior: smooth;
  -webkit-mask-image: linear-gradient(to bottom, transparent 0, #000 26px);
  mask-image: linear-gradient(to bottom, transparent 0, #000 26px);
}
.chat-inner { display: flex; flex-direction: column; }
.chat-day {
  align-self: center;
  display: flex; align-items: center; gap: 10px;
  margin: 8px 0 18px;
  font-size: 10px;
  letter-spacing: 0.12em;
  color: var(--ink-faint);
}
.chat-day::before, .chat-day::after { content: ""; width: 42px; height: 1px; background: linear-gradient(90deg, transparent, rgba(255, 221, 178, 0.18)); }
.chat-day::after { background: linear-gradient(90deg, rgba(255, 221, 178, 0.18), transparent); }
.chat-list { display: flex; flex-direction: column; gap: 18px; }

.msg { display: flex; gap: 10px; max-width: 100%; animation: msgIn 0.32s ease; }
@keyframes msgIn { from { opacity: 0; transform: translateY(8px); } to { opacity: 1; transform: none; } }
.msg-avatar {
  width: 30px; height: 30px;
  flex: 0 0 auto;
  display: grid; place-items: center;
  border-radius: 50%;
  overflow: hidden;
  color: #ffd6a4;
  background: linear-gradient(150deg, rgba(255, 208, 154, 0.22), rgba(255, 143, 110, 0.08));
  border: 1px solid rgba(255, 208, 154, 0.22);
}
.msg-avatar img { width: 100%; height: 100%; object-fit: cover; display: block; }

/* ---- 表情框 ---- */
.sticker-btn {
  flex: 0 0 auto;
  width: 34px; height: 34px;
  display: grid; place-items: center;
  border-radius: 10px;
  border: 1px solid rgba(255, 221, 178, 0.18);
  background: rgba(255, 255, 255, 0.03);
  color: #ffd6a4;
  font-size: 17px; line-height: 1;
  cursor: pointer;
  transition: 0.18s;
}
.sticker-btn:hover { background: rgba(255, 208, 154, 0.12); border-color: rgba(255, 208, 154, 0.35); }
.sticker-panel {
  margin-bottom: 8px;
  border-radius: 14px;
  border: 1px solid rgba(255, 221, 178, 0.16);
  background: rgba(255, 255, 255, 0.035);
  padding: 10px 12px 12px;
  backdrop-filter: blur(12px);
}
.sticker-head { display: flex; align-items: center; justify-content: space-between; margin-bottom: 8px; }
.sticker-head > span { font-size: 11px; color: rgba(240, 231, 217, 0.6); letter-spacing: 0.04em; }
.sticker-head-actions { display: flex; align-items: center; gap: 6px; }
.sticker-desc {
  width: 170px; height: 26px;
  padding: 0 9px;
  border-radius: 8px;
  border: 1px solid rgba(255, 221, 178, 0.16);
  background: rgba(255, 255, 255, 0.04);
  color: var(--ink);
  font-size: 11.5px;
  font-family: inherit;
}
.sticker-desc::placeholder { color: rgba(240, 231, 217, 0.32); }
.sticker-desc:focus { outline: none; border-color: rgba(255, 208, 154, 0.45); }
.sticker-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(56px, 1fr));
  gap: 8px;
  max-height: 190px;
  overflow-y: auto;
}
.sticker-cell {
  position: relative;
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 10px;
  background: rgba(255, 255, 255, 0.04);
  padding: 4px;
  aspect-ratio: 1;
  cursor: pointer;
  overflow: hidden;
  transition: 0.16s;
}
.sticker-cell:hover { border-color: rgba(255, 208, 154, 0.45); transform: translateY(-1px); }
.sticker-cell img { width: 100%; height: 100%; object-fit: contain; display: block; }
.sticker-edit {
  position: absolute; top: 2px; left: 2px;
  width: 15px; height: 15px; border-radius: 50%;
  display: none; place-items: center;
  background: rgba(0, 0, 0, 0.65); color: #ffd6a4;
  font-size: 9px; line-height: 1;
  cursor: pointer;
}
.sticker-cell:hover .sticker-edit { display: grid; }
.sticker-del {
  position: absolute; top: 2px; right: 2px;
  width: 15px; height: 15px; border-radius: 50%;
  display: none; place-items: center;
  background: rgba(0, 0, 0, 0.65); color: #ffd6a4;
  font-size: 9px; line-height: 1;
  cursor: pointer;
}
.sticker-cell:hover .sticker-del { display: grid; }
.sticker-empty { margin: 6px 2px; font-size: 11.5px; color: rgba(240, 231, 217, 0.45); }
.msg-sticker .sticker-body { gap: 4px; }
.sticker-bubble {
  max-width: 132px; max-height: 132px;
  border-radius: 12px;
  display: block;
  object-fit: contain;
  background: rgba(255, 255, 255, 0.03);
}
.msg-avatar .icon { width: 15px; height: 15px; }
.msg-body { display: flex; flex-direction: column; gap: 5px; max-width: min(76%, 620px); }
.msg-bubble {
  position: relative;
  padding: 11px 15px;
  border-radius: 16px 16px 16px 5px;
  background: rgba(255, 247, 235, 0.055);
  border: 1px solid rgba(255, 221, 178, 0.1);
  color: #f2e8d8;
  font-size: 13.5px;
  line-height: 1.75;
  word-break: break-word;
  white-space: pre-wrap;
}
.msg-meta { font-size: 9.5px; color: var(--ink-faint); letter-spacing: 0.04em; padding: 0 3px; }
.msg.user { justify-content: flex-end; }
.msg.user .msg-body { align-items: flex-end; }
.msg.user .msg-bubble {
  border-radius: 16px 16px 5px 16px;
  background: linear-gradient(135deg, #ffd9a7, #ffb489);
  border-color: transparent;
  color: #2d1709;
  box-shadow: 0 12px 30px -18px rgba(255, 170, 110, 0.65);
}
.msg.user .msg-meta { text-align: right; }

.mem-chips { display: flex; flex-wrap: wrap; gap: 5px; margin-top: 8px; padding-top: 8px; border-top: 1px dashed rgba(255, 221, 178, 0.12); }
.mem-chip {
  display: inline-flex; align-items: center; gap: 4px;
  max-width: 100%;
  padding: 3px 8px;
  border-radius: 999px;
  font-size: 9.5px;
  color: rgba(255, 214, 170, 0.8);
  background: rgba(255, 208, 154, 0.06);
  border: 1px solid rgba(255, 208, 154, 0.12);
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
  transition: 0.2s;
}
.mem-chip:hover { border-color: rgba(255, 208, 154, 0.3); background: rgba(255, 208, 154, 0.1); }
.mem-chip .icon { width: 10px; height: 10px; }

.typing { display: flex; align-items: center; gap: 5px; padding: 12px 4px 4px; color: var(--ink-faint); font-size: 10.5px; }
.typing em { font-style: normal; margin-left: 4px; letter-spacing: 0.05em; }
.typing-dot { width: 5px; height: 5px; border-radius: 50%; background: rgba(255, 208, 154, 0.75); animation: dot 1.3s ease-in-out infinite; }
.typing-dot:nth-child(2) { animation-delay: 0.15s; }
.typing-dot:nth-child(3) { animation-delay: 0.3s; }
@keyframes dot { 0%, 60%, 100% { opacity: 0.25; transform: translateY(0); } 30% { opacity: 1; transform: translateY(-3px); } }

.empty-chat {
  margin: 8vh auto 0;
  max-width: 430px;
  text-align: center;
  color: var(--ink-dim);
}
.empty-chat .empty-mark { margin: 0 auto 18px; width: 56px; height: 56px; border-radius: 50%; display: grid; place-items: center; border: 1px solid rgba(255, 208, 154, 0.16); background: rgba(255, 208, 154, 0.05); color: var(--gold); }
.empty-chat h3 { margin: 0 0 8px; font-size: 17px; font-weight: 500; color: var(--ink); letter-spacing: 0.04em; }
.empty-chat p { margin: 0; font-size: 12.5px; line-height: 1.8; color: var(--ink-faint); }

.chat-bottom { flex: 0 0 auto; padding-top: 4px; }
.quick-row { display: flex; gap: 6px; overflow-x: auto; padding: 2px 2px 8px; scrollbar-width: none; }
.quick-row::-webkit-scrollbar { display: none; }
.quick-row button {
  flex: 0 0 auto;
  padding: 5px 10px;
  border-radius: 999px;
  border: 1px solid rgba(255, 221, 178, 0.1);
  background: rgba(255, 244, 228, 0.025);
  font-size: 10.5px;
  color: var(--ink-faint);
  transition: 0.2s;
}
.quick-row button:hover { color: var(--gold); border-color: rgba(255, 208, 154, 0.28); background: rgba(255, 208, 154, 0.06); }
.composer {
  display: flex;
  align-items: flex-end;
  gap: 10px;
  padding: 7px 8px 7px 16px;
  border-radius: 20px;
  border: 1px solid rgba(255, 221, 178, 0.13);
  background: rgba(10, 24, 31, 0.78);
  box-shadow: 0 22px 50px -32px rgba(0, 0, 0, 0.9), inset 0 1px 0 rgba(255, 255, 255, 0.04);
  backdrop-filter: blur(18px);
  transition: 0.25s;
}
.composer:focus-within { border-color: rgba(255, 208, 154, 0.32); box-shadow: 0 22px 60px -30px rgba(255, 160, 100, 0.3), inset 0 1px 0 rgba(255, 255, 255, 0.05); }
.composer textarea {
  flex: 1;
  min-height: 38px;
  max-height: 140px;
  padding: 8px 0;
  border: none;
  background: transparent;
  resize: none;
  font-size: 13.5px;
  line-height: 1.6;
  color: var(--ink);
}
.composer textarea::placeholder { color: rgba(142, 166, 168, 0.55); }
.send-btn {
  width: 40px; height: 40px;
  flex: 0 0 auto;
  display: grid; place-items: center;
  border-radius: 13px;
  background: linear-gradient(140deg, #ffe0b3, #ffb185);
  color: #331a0b;
  box-shadow: 0 10px 24px -10px rgba(255, 170, 110, 0.65);
  transition: 0.2s;
}
.send-btn .icon { width: 17px; height: 17px; stroke-width: 2; }
.send-btn:hover { transform: translateY(-1px) scale(1.02); filter: brightness(1.04); }
.send-btn:active { transform: scale(0.96); }
.compose-hint { margin: 7px 0 0; text-align: center; font-size: 9.5px; color: rgba(120, 145, 147, 0.75); letter-spacing: 0.03em; }

/* ---------------------------------------------------------- 通用面板与表单 */

.panel {
  position: relative;
  padding: 19px 21px;
  border-radius: var(--radius);
  border: 1px solid rgba(255, 221, 178, 0.09);
  background:
    linear-gradient(180deg, rgba(255, 246, 232, 0.035), rgba(255, 246, 232, 0.012)),
    rgba(11, 27, 34, 0.62);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.035), var(--shadow);
  backdrop-filter: blur(16px);
}
.panel-head { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin-bottom: 13px; }
.panel-head h3 { margin: 0; font-size: 14px; font-weight: 600; letter-spacing: 0.05em; }
.panel-note { font-size: 10px; color: var(--ink-faint); letter-spacing: 0.03em; }
.muted { color: var(--ink-dim); }
.small { font-size: 11px; }
.hint { font-size: 10.5px; color: var(--ink-faint); line-height: 1.6; }

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  height: 38px;
  padding: 0 16px;
  border-radius: 11px;
  border: 1px solid transparent;
  font-size: 12px;
  letter-spacing: 0.03em;
  transition: 0.2s;
  white-space: nowrap;
}
.btn .icon { width: 14px; height: 14px; }
.btn.primary { background: linear-gradient(135deg, #ffe0b4, #ffb086); color: #2f1809; box-shadow: 0 12px 28px -14px rgba(255, 170, 110, 0.7); }
.btn.primary:hover { filter: brightness(1.04); transform: translateY(-1px); }
.btn.ghost { border-color: rgba(255, 221, 178, 0.14); background: rgba(255, 244, 228, 0.03); color: var(--ink-dim); }
.btn.ghost:hover { color: var(--gold); border-color: rgba(255, 208, 154, 0.3); background: rgba(255, 208, 154, 0.06); }
.btn.danger { border-color: rgba(255, 140, 120, 0.3); color: #ffb3a2; background: rgba(255, 120, 100, 0.07); }
.btn.danger:hover { background: rgba(255, 120, 100, 0.13); }
.btn.small { height: 30px; padding: 0 11px; font-size: 10.5px; border-radius: 9px; }
.btn-row { display: flex; gap: 8px; flex-wrap: wrap; margin-top: 10px; }

.mini-btn {
  display: inline-flex; align-items: center; gap: 4px;
  padding: 4px 9px;
  border-radius: 8px;
  border: 1px solid rgba(255, 221, 178, 0.12);
  background: rgba(255, 244, 228, 0.03);
  font-size: 10px;
  color: var(--ink-dim);
  transition: 0.2s;
}
.mini-btn .icon { width: 11px; height: 11px; }
.mini-btn:hover { color: var(--gold); border-color: rgba(255, 208, 154, 0.3); }

.field {
  width: 100%;
  padding: 9px 12px;
  border-radius: 10px;
  border: 1px solid rgba(255, 221, 178, 0.12);
  background: rgba(4, 14, 19, 0.45);
  color: var(--ink);
  font-size: 12px;
  transition: 0.2s;
}
.field::placeholder { color: rgba(130, 155, 157, 0.55); }
.field:focus { border-color: rgba(255, 208, 154, 0.36); background: rgba(4, 14, 19, 0.6); }
textarea.field { resize: vertical; min-height: 60px; line-height: 1.65; }
.stack-form { display: flex; flex-direction: column; gap: 7px; padding: 10px 0 12px; }
.form-row { display: flex; gap: 7px; }
.form-row .field { flex: 1; min-width: 0; }

.empty-state {
  padding: 22px 10px;
  text-align: center;
  border: 1px dashed rgba(255, 221, 178, 0.12);
  border-radius: 13px;
  color: var(--ink-faint);
  font-size: 11px;
  line-height: 1.8;
}
.empty-state .icon { width: 20px; height: 20px; color: rgba(255, 208, 154, 0.45); margin-bottom: 4px; }

/* ---------------------------------------------------------- 共学 */

.learn-grid { display: grid; grid-template-columns: minmax(0, 1.06fr) minmax(0, 0.94fr); gap: 15px; align-content: start; }
.focus-panel { grid-column: 1 / -1; display: flex; align-items: center; gap: 30px; padding: 24px 28px; }
.focus-ring-wrap { position: relative; width: 186px; height: 186px; flex: 0 0 auto; }
.focus-ring { width: 100%; height: 100%; transform: rotate(-90deg); }
.ring-track { fill: none; stroke: rgba(255, 245, 230, 0.07); stroke-width: 7; }
.ring-fill {
  fill: none;
  stroke: url(#ringGrad);
  stroke-width: 7;
  stroke-linecap: round;
  stroke-dasharray: 477.5;
  stroke-dashoffset: 477.5;
  filter: drop-shadow(0 0 6px rgba(255, 186, 130, 0.4));
  transition: stroke-dashoffset 0.6s cubic-bezier(0.2, 0.8, 0.2, 1);
}
.ring-center { position: absolute; inset: 0; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 5px; }
.ring-center b { font-family: var(--serif); font-size: 27px; font-weight: 500; letter-spacing: 0.04em; font-variant-numeric: tabular-nums; }
.ring-center span { font-size: 9.5px; color: var(--ink-faint); letter-spacing: 0.04em; text-align: center; padding: 0 20px; }
.focus-side { flex: 1; min-width: 0; }
.focus-side h3 { margin: 0 0 5px; font-size: 18px; font-weight: 500; letter-spacing: 0.03em; }
.focus-side > .muted { margin: 0 0 12px; font-size: 11.5px; line-height: 1.7; }
.focus-side .field { margin-bottom: 9px; }
.preset-row { display: flex; gap: 6px; margin-bottom: 4px; }
.preset-row button {
  padding: 4px 10px;
  border-radius: 999px;
  border: 1px solid rgba(255, 221, 178, 0.11);
  font-size: 10px;
  color: var(--ink-faint);
  transition: 0.2s;
}
.preset-row button:hover { color: var(--gold); }
.preset-row button.active { color: #2f1809; background: linear-gradient(135deg, #ffe0b4, #ffb186); border-color: transparent; }
.learn-stats { display: flex; flex-wrap: wrap; gap: 14px; margin-top: 16px; padding-top: 12px; border-top: 1px solid rgba(255, 221, 178, 0.08); font-size: 10px; color: var(--ink-faint); }
.learn-stats b { font-family: var(--serif); color: var(--gold); font-size: 12px; font-weight: 600; }

.goal-list { display: flex; flex-direction: column; }
.goal-item { padding: 10px 0; border-top: 1px solid rgba(255, 221, 178, 0.07); }
.goal-item:first-child { border-top: none; padding-top: 0; }
.goal-top { display: flex; align-items: baseline; gap: 8px; }
.goal-top h4 { margin: 0; font-size: 12.5px; font-weight: 500; flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.goal-top span { font-size: 9.5px; color: var(--ink-faint); font-variant-numeric: tabular-nums; }
.goal-bar { height: 4px; margin: 7px 0 6px; border-radius: 999px; background: rgba(255, 255, 255, 0.07); overflow: hidden; }
.goal-bar i { display: block; height: 100%; border-radius: inherit; background: linear-gradient(90deg, #ffc28b, #9fe8d8); transition: width 0.5s ease; }
.goal-foot { display: flex; align-items: center; justify-content: space-between; gap: 6px; }
.goal-foot .muted { font-size: 9.5px; }
.goal-actions { display: flex; gap: 4px; opacity: 0.6; transition: 0.2s; }
.goal-item:hover .goal-actions { opacity: 1; }
.goal-actions button { width: 22px; height: 22px; border-radius: 6px; display: grid; place-items: center; color: var(--ink-faint); border: 1px solid transparent; }
.goal-actions button:hover { color: var(--gold); border-color: rgba(255, 208, 154, 0.2); }
.goal-actions .icon { width: 11px; height: 11px; }
.goal-item.done .goal-top h4 { color: var(--ink-faint); text-decoration: line-through; }
.goal-item.done .goal-bar i { background: rgba(143, 231, 214, 0.45); }

.review-area { min-height: 152px; }
.review-card {
  padding: 14px 15px;
  border-radius: 14px;
  border: 1px solid rgba(255, 221, 178, 0.12);
  background: linear-gradient(160deg, rgba(255, 214, 170, 0.055), rgba(255, 255, 255, 0.015));
}
.review-subject { font-size: 9px; letter-spacing: 0.1em; color: rgba(255, 200, 145, 0.7); }
.review-question { margin: 7px 0 10px; font-size: 14.5px; line-height: 1.65; }
.review-answer { margin: 10px 0 0; padding-top: 10px; border-top: 1px dashed rgba(255, 221, 178, 0.14); font-size: 12px; line-height: 1.75; color: var(--ink-dim); white-space: pre-wrap; }
.review-actions { display: flex; align-items: center; justify-content: space-between; gap: 8px; }
.review-hint { font-size: 9.5px; color: var(--ink-faint); }
.rating-row { display: flex; gap: 6px; margin-top: 11px; }
.rate-btn { flex: 1; height: 31px; border-radius: 9px; font-size: 10.5px; border: 1px solid; transition: 0.2s; }
.rate-btn.forgot { color: #ffb1a0; border-color: rgba(255, 140, 120, 0.24); background: rgba(255, 120, 100, 0.06); }
.rate-btn.fuzzy { color: #ffd39d; border-color: rgba(255, 200, 140, 0.24); background: rgba(255, 190, 120, 0.06); }
.rate-btn.good { color: #9fe8d8; border-color: rgba(143, 231, 214, 0.24); background: rgba(120, 220, 200, 0.06); }
.rate-btn:hover { filter: brightness(1.18); transform: translateY(-1px); }
.cards-foot { display: flex; align-items: center; justify-content: space-between; gap: 10px; margin-top: 11px; }

.teach-input { margin: 10px 0 2px; min-height: 74px; }
.lesson-list { display: flex; flex-direction: column; margin-top: 6px; max-height: 210px; overflow-y: auto; }
.lesson-item { padding: 9px 0; border-top: 1px solid rgba(255, 221, 178, 0.07); }
.lesson-item h4 { margin: 0 0 3px; font-size: 11.5px; font-weight: 500; color: #ffe0b8; }
.lesson-item p { margin: 0; font-size: 10.5px; line-height: 1.65; color: var(--ink-faint); display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }

.question-text { margin: 2px 0 4px; font-size: 15px; line-height: 1.7; }
.question-subject { margin: 0 0 12px; }
.question-answer { margin: 12px 0 0; padding: 12px; border-radius: 10px; background: rgba(143, 231, 214, 0.055); border: 1px solid rgba(143, 231, 214, 0.12); font-size: 11.5px; line-height: 1.75; color: #d9eee7; white-space: pre-wrap; }

/* ---------------------------------------------------------- 记忆 */

.memory-toolbar { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; margin-bottom: 16px; }
.search-wrap {
  flex: 1;
  min-width: 220px;
  display: flex;
  align-items: center;
  gap: 8px;
  height: 38px;
  padding: 0 13px;
  border-radius: 11px;
  border: 1px solid rgba(255, 221, 178, 0.1);
  background: rgba(10, 24, 31, 0.6);
}
.search-wrap .icon { width: 14px; height: 14px; color: var(--ink-faint); }
.search-wrap input { flex: 1; min-width: 0; border: none; background: none; font-size: 12px; }
.search-wrap input::placeholder { color: rgba(130, 155, 157, 0.55); }
.filter-chips { display: flex; gap: 5px; flex-wrap: wrap; }
.filter-chips button {
  padding: 5px 9px;
  border-radius: 999px;
  font-size: 9.5px;
  color: var(--ink-faint);
  border: 1px solid rgba(255, 221, 178, 0.08);
  transition: 0.2s;
}
.filter-chips button:hover { color: var(--gold); }
.filter-chips button.active { color: #2f1809; background: linear-gradient(135deg, #ffe0b4, #ffb186); border-color: transparent; }
.toolbar-actions { display: flex; gap: 6px; margin-left: auto; }

.memory-layout { display: grid; grid-template-columns: minmax(0, 1fr) 350px; gap: 16px; align-items: start; }
.memory-main { min-width: 0; }
.memory-summary { font-size: 10.5px; color: var(--ink-faint); margin: 2px 2px 10px; letter-spacing: 0.02em; }
.memory-summary b { color: var(--gold); font-family: var(--serif); font-size: 13px; }
.memory-list { display: flex; flex-direction: column; gap: 9px; }
.memory-card {
  padding: 13px 15px 12px;
  border-radius: 15px;
  border: 1px solid rgba(255, 221, 178, 0.09);
  background: rgba(14, 31, 39, 0.55);
  transition: 0.2s;
  cursor: pointer;
}
.memory-card:hover { border-color: rgba(255, 208, 154, 0.24); background: rgba(18, 38, 47, 0.7); transform: translateY(-1px); }
.mem-card-head { display: flex; align-items: center; gap: 7px; }
.kind {
  font-size: 8.5px;
  letter-spacing: 0.05em;
  padding: 2px 7px;
  border-radius: 999px;
  border: 1px solid currentColor;
  opacity: 0.9;
}
.kind-fact { color: #a9d8d2; }
.kind-preference { color: #ffc79c; }
.kind-goal { color: #ffd76f; }
.kind-event { color: #c4b4ff; }
.kind-person { color: #ffa9b5; }
.kind-skill { color: #8fd8ff; }
.kind-lesson { color: #9fe8c4; }
.kind-insight { color: #e0c6ff; }
.mem-date { margin-left: auto; font-size: 9px; color: var(--ink-faint); font-variant-numeric: tabular-nums; }
.mem-actions { display: flex; gap: 2px; opacity: 0.35; transition: 0.2s; }
.memory-card:hover .mem-actions { opacity: 1; }
.mem-actions button { width: 23px; height: 23px; border-radius: 6px; display: grid; place-items: center; color: var(--ink-faint); }
.mem-actions button:hover { color: var(--gold); background: rgba(255, 208, 154, 0.08); }
.mem-actions .icon { width: 11px; height: 11px; }
.memory-card h4 { margin: 7px 0 3px; font-size: 12.5px; font-weight: 500; letter-spacing: 0.01em; }
.memory-card p { margin: 0; font-size: 11px; line-height: 1.65; color: var(--ink-dim); display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.mem-tags { margin-top: 7px; font-size: 9px; color: rgba(255, 200, 145, 0.5); letter-spacing: 0.02em; }
.memory-empty { padding: 50px 20px; }

.graph-panel { position: sticky; top: 4px; }
.graph-wrap { position: relative; width: 100%; height: 310px; border-radius: 14px; background: radial-gradient(circle at 50% 45%, rgba(255, 196, 140, 0.07), transparent 65%), rgba(4, 14, 19, 0.35); overflow: hidden; }
#memory-graph { width: 100%; height: 100%; display: block; }
.graph-legend { display: flex; flex-wrap: wrap; gap: 5px 11px; margin: 10px 0 8px; font-size: 9px; color: var(--ink-faint); }
.graph-legend span { display: inline-flex; align-items: center; gap: 4px; }
.graph-legend i { width: 5px; height: 5px; border-radius: 50%; }

/* ---------------------------------------------------------- 成长 */

.growth-hero { display: flex; align-items: center; justify-content: space-between; gap: 30px; padding: 24px 28px; }
.growth-stage-name { margin: 0 0 3px; font-size: 31px; font-weight: 500; letter-spacing: 0.08em; background: linear-gradient(100deg, #fff0d3, #ffc58f 55%, #a9e8d9); -webkit-background-clip: text; background-clip: text; color: transparent; }
.growth-title { margin: 0 0 14px; font-size: 11.5px; color: var(--ink-faint); letter-spacing: 0.04em; }
.growth-xp { display: flex; align-items: center; gap: 10px; font-size: 10px; color: var(--ink-faint); }
.growth-xp > span:first-child { color: var(--gold); font-family: var(--serif); font-size: 13px; }
.growth-xp .xp-track { width: 240px; flex: 0 1 240px; }
.growth-figures { display: flex; gap: 26px; }
.growth-figures div { display: flex; flex-direction: column; align-items: center; gap: 2px; }
.growth-figures b { font-family: var(--serif); font-size: 25px; font-weight: 500; color: #ffe1b8; font-variant-numeric: tabular-nums; }
.growth-figures span { font-size: 9.5px; color: var(--ink-faint); letter-spacing: 0.06em; }

.stage-panel { margin-top: 15px; }
.stage-path { display: flex; align-items: flex-start; padding: 8px 4px 4px; }
.stage-step { position: relative; flex: 1; display: flex; flex-direction: column; align-items: center; gap: 4px; text-align: center; min-width: 0; }
.stage-step::after {
  content: "";
  position: absolute;
  top: 16px; left: calc(50% + 22px);
  width: calc(100% - 44px);
  height: 1px;
  background: rgba(255, 221, 178, 0.1);
}
.stage-step:last-child::after { display: none; }
.stage-step.reached::after { background: linear-gradient(90deg, rgba(255, 190, 130, 0.55), rgba(255, 190, 130, 0.18)); }
.stage-dot {
  width: 33px; height: 33px;
  display: grid; place-items: center;
  border-radius: 50%;
  border: 1px solid rgba(255, 221, 178, 0.16);
  background: rgba(8, 20, 26, 0.8);
  font-family: var(--serif);
  font-size: 11px;
  color: var(--ink-faint);
  z-index: 1;
  transition: 0.3s;
}
.stage-step.reached .stage-dot { border-color: rgba(255, 203, 150, 0.45); color: #ffe0b8; background: rgba(255, 190, 130, 0.09); }
.stage-step.current .stage-dot {
  color: #2d1709;
  background: linear-gradient(135deg, #ffe3b8, #ffb083);
  border-color: transparent;
  box-shadow: 0 0 22px rgba(255, 176, 120, 0.45);
}
.stage-step b { font-size: 10.5px; font-weight: 500; color: var(--ink-dim); }
.stage-step.current b { color: #ffe0b8; }
.stage-step span { font-size: 8.5px; color: var(--ink-faint); }

.growth-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 15px; margin-top: 15px; }
.radar-wrap { height: 245px; }
#radar-canvas { width: 100%; height: 100%; display: block; }
.achievement-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 7px; max-height: 245px; overflow-y: auto; padding-right: 2px; }
.ach-item {
  display: flex;
  align-items: flex-start;
  gap: 8px;
  padding: 8px 9px;
  border-radius: 10px;
  border: 1px solid rgba(255, 221, 178, 0.08);
  background: rgba(255, 246, 232, 0.025);
}
.ach-item .ach-icon { font-size: 16px; line-height: 1.2; filter: saturate(0.9); }
.ach-item b { display: block; font-size: 10px; font-weight: 500; }
.ach-item span { display: block; font-size: 8.5px; color: var(--ink-faint); line-height: 1.45; margin-top: 1px; }
.ach-item.locked { opacity: 0.36; filter: grayscale(1); }

.weekly-chart { display: flex; align-items: flex-end; justify-content: space-between; gap: 6px; height: 190px; padding-top: 10px; }
.week-col { flex: 1; display: flex; flex-direction: column; align-items: center; gap: 5px; height: 100%; justify-content: flex-end; }
.week-bar-wrap { flex: 1; width: 100%; display: flex; align-items: flex-end; justify-content: center; }
.week-bar { width: 55%; max-width: 22px; min-height: 3px; border-radius: 6px 6px 3px 3px; background: linear-gradient(180deg, rgba(255, 206, 154, 0.85), rgba(255, 160, 110, 0.35)); box-shadow: 0 0 14px rgba(255, 180, 120, 0.18); transition: height 0.5s ease; }
.week-col.today .week-bar { background: linear-gradient(180deg, #fff0cd, #ffb486); box-shadow: 0 0 18px rgba(255, 190, 130, 0.4); }
.week-value { font-size: 8.5px; color: var(--ink-faint); font-variant-numeric: tabular-nums; }
.week-label { font-size: 9px; color: var(--ink-faint); }
.week-col.today .week-label { color: var(--gold); }

.diary-list { display: flex; flex-direction: column; gap: 0; max-height: 250px; overflow-y: auto; }
.diary-item { padding: 9px 0; border-top: 1px solid rgba(255, 221, 178, 0.07); }
.diary-item:first-child { border-top: none; padding-top: 0; }
.diary-head { display: flex; align-items: baseline; gap: 7px; margin-bottom: 3px; }
.diary-day { font-size: 10px; color: #ffd39f; letter-spacing: 0.04em; font-variant-numeric: tabular-nums; }
.diary-mood { font-size: 8.5px; color: var(--ink-faint); border: 1px solid rgba(255, 221, 178, 0.1); border-radius: 999px; padding: 1px 6px; }
.diary-text { margin: 0; font-size: 10.5px; line-height: 1.7; color: var(--ink-dim); white-space: pre-wrap; }

.log-list { display: flex; flex-direction: column; gap: 0; }
.log-item { display: grid; grid-template-columns: 14px 1fr auto; gap: 10px; align-items: start; padding: 8px 0; border-top: 1px solid rgba(255, 221, 178, 0.06); }
.log-item:first-child { border-top: none; }
.log-dot { width: 6px; height: 6px; margin-top: 7px; border-radius: 50%; background: rgba(255, 200, 145, 0.5); box-shadow: 0 0 8px rgba(255, 190, 130, 0.35); justify-self: center; }
.log-body b { display: block; font-size: 10.5px; font-weight: 500; }
.log-body span { display: block; font-size: 9px; color: var(--ink-faint); margin-top: 1px; }
.log-xp { font-size: 9px; color: var(--gold); font-variant-numeric: tabular-nums; }
.log-time { font-size: 8.5px; color: rgba(120, 145, 147, 0.7); margin-top: 2px; }

/* ---------------------------------------------------------- 弹窗 */

.modal-backdrop {
  position: fixed;
  inset: 0;
  z-index: 100;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 24px;
  background: rgba(3, 9, 13, 0.72);
  backdrop-filter: blur(9px);
  animation: fadeIn 0.25s ease;
}
@keyframes fadeIn { from { opacity: 0; } to { opacity: 1; } }
.modal {
  width: min(640px, 94vw);
  max-height: 86vh;
  overflow-y: auto;
  padding: 26px 28px;
  border-radius: 24px;
  border: 1px solid rgba(255, 221, 178, 0.15);
  background:
    radial-gradient(120% 80% at 15% 0%, rgba(255, 176, 120, 0.09), transparent 55%),
    #0c1b22;
  box-shadow: 0 50px 120px -40px rgba(0, 0, 0, 0.95), inset 0 1px 0 rgba(255, 255, 255, 0.05);
  animation: modalIn 0.3s cubic-bezier(0.2, 0.9, 0.2, 1);
}
@keyframes modalIn { from { opacity: 0; transform: translateY(14px) scale(0.985); } to { opacity: 1; transform: none; } }
.modal.narrow { width: min(470px, 94vw); }
.modal-head { display: flex; align-items: flex-start; justify-content: space-between; gap: 16px; margin-bottom: 18px; }
.modal-head h3 { margin: 0 0 3px; font-size: 19px; font-weight: 500; letter-spacing: 0.05em; }
.modal-head p { margin: 0; font-size: 10.5px; color: var(--ink-faint); }
.modal-close { width: 30px; height: 30px; border-radius: 8px; display: grid; place-items: center; color: var(--ink-faint); border: 1px solid rgba(255, 221, 178, 0.1); }
.modal-close:hover { color: var(--gold); }
.modal-close .icon { width: 13px; height: 13px; }
.modal-section { padding: 15px 0; border-top: 1px solid rgba(255, 221, 178, 0.08); }
.modal-section:first-of-type { border-top: none; padding-top: 0; }
.modal-section h4 { margin: 0 0 4px; font-size: 12px; font-weight: 600; letter-spacing: 0.04em; }
.modal-section .hint { margin: 0 0 10px; }
.modal-actions { display: flex; justify-content: flex-end; gap: 8px; margin-top: 20px; }
.modal-actions .spacer { margin-right: auto; }

.provider-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; margin-bottom: 12px; }
.provider-tile {
  display: flex;
  flex-direction: column;
  gap: 2px;
  padding: 10px 12px;
  border-radius: 11px;
  border: 1px solid rgba(255, 221, 178, 0.1);
  background: rgba(255, 246, 232, 0.02);
  text-align: left;
  transition: 0.2s;
}
.provider-tile b { font-size: 11.5px; font-weight: 500; }
.provider-tile span { font-size: 9px; color: var(--ink-faint); line-height: 1.5; }
.provider-tile:hover { border-color: rgba(255, 208, 154, 0.25); }
.provider-tile.active { border-color: rgba(255, 208, 154, 0.5); background: rgba(255, 190, 130, 0.08); box-shadow: inset 0 0 0 1px rgba(255, 208, 154, 0.12); }
.provider-tile.active b { color: var(--gold); }
.provider-fields { display: flex; flex-direction: column; gap: 8px; }
.provider-fields label { display: flex; flex-direction: column; gap: 4px; font-size: 9.5px; color: var(--ink-faint); letter-spacing: 0.04em; }
.field-row { display: flex; gap: 8px; align-items: flex-end; }
.field-row .field { flex: 1; }
.test-result { margin-top: 8px; font-size: 10.5px; min-height: 16px; }
.test-result.ok { color: #9fe8c8; }
.test-result.fail { color: #ffb1a0; }
.key-state { font-size: 9.5px; color: rgba(255, 205, 155, 0.65); }

/* ---------------------------------------------------------- 引导 */

.onboard {
  position: fixed;
  inset: 0;
  z-index: 120;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 24px;
  background: radial-gradient(80% 70% at 50% 30%, rgba(30, 62, 70, 0.55), rgba(3, 9, 13, 0.9));
  backdrop-filter: blur(14px);
}
.onboard-card {
  width: min(540px, 94vw);
  max-height: 90vh;
  overflow-y: auto;
  padding: 34px 34px 28px;
  border-radius: 28px;
  border: 1px solid rgba(255, 221, 178, 0.16);
  background:
    radial-gradient(110% 70% at 20% 0%, rgba(255, 174, 118, 0.14), transparent 60%),
    linear-gradient(180deg, #0e2028, #0a171e);
  box-shadow: 0 60px 140px -50px rgba(0, 0, 0, 1), inset 0 1px 0 rgba(255, 255, 255, 0.06);
  text-align: center;
  animation: modalIn 0.5s cubic-bezier(0.2, 0.9, 0.2, 1);
}
.onboard-fish { width: 120px; height: 90px; margin: 0 auto 8px; position: relative; }
.onboard-fish::before { content: ""; position: absolute; inset: 10% 5%; background: radial-gradient(circle, rgba(255, 190, 130, 0.35), transparent 70%); filter: blur(16px); }
.onboard-fish svg { width: 100%; height: 100%; position: relative; }
.onboard h2 { margin: 0 0 6px; font-size: 25px; font-weight: 500; letter-spacing: 0.1em; }
.onboard .lead { margin: 0 auto 22px; max-width: 380px; font-size: 11.5px; line-height: 1.85; color: var(--ink-dim); }
.onboard label { display: block; text-align: left; font-size: 9.5px; letter-spacing: 0.08em; color: var(--ink-faint); margin-bottom: 5px; }
.onboard .field { margin-bottom: 12px; height: 40px; }
.onboard .advanced { text-align: left; margin-top: 4px; border-top: 1px solid rgba(255, 221, 178, 0.08); padding-top: 12px; }
.onboard .advanced summary { cursor: pointer; font-size: 10px; color: var(--ink-faint); list-style: none; }
.onboard .advanced summary::-webkit-details-marker { display: none; }
.onboard .advanced summary::before { content: "+ "; color: var(--gold); }
.onboard .advanced[open] summary::before { content: "− "; }
.onboard .btn-row { justify-content: center; margin-top: 6px; }
.onboard .skip { display: inline-block; margin-top: 13px; font-size: 10px; color: var(--ink-faint); border-bottom: 1px dashed rgba(255, 221, 178, 0.18); }
.onboard .skip:hover { color: var(--gold); }

/* ---------------------------------------------------------- 提示与特效 */

.toasts { position: fixed; right: 24px; bottom: 24px; z-index: 200; display: flex; flex-direction: column; gap: 8px; pointer-events: none; }
.toast {
  display: flex;
  align-items: flex-start;
  gap: 9px;
  min-width: 220px;
  max-width: 330px;
  padding: 11px 14px;
  border-radius: 12px;
  border: 1px solid rgba(255, 221, 178, 0.16);
  background: rgba(11, 27, 34, 0.94);
  box-shadow: 0 20px 40px -20px rgba(0, 0, 0, 0.9);
  backdrop-filter: blur(16px);
  animation: toastIn 0.32s cubic-bezier(0.2, 0.9, 0.2, 1);
  pointer-events: auto;
}
.toast.out { animation: toastOut 0.3s ease forwards; }
@keyframes toastIn { from { opacity: 0; transform: translateX(16px); } to { opacity: 1; transform: none; } }
@keyframes toastOut { to { opacity: 0; transform: translateX(16px); } }
.toast-icon { flex: 0 0 auto; font-size: 14px; line-height: 1.3; }
.toast-body b { display: block; font-size: 11px; font-weight: 500; margin-bottom: 1px; }
.toast-body span { display: block; font-size: 9.5px; line-height: 1.55; color: var(--ink-faint); }
.toast.success { border-color: rgba(143, 231, 214, 0.25); }
.toast.warn { border-color: rgba(255, 175, 120, 0.3); }

.levelup {
  position: fixed;
  inset: 0;
  z-index: 150;
  display: grid;
  place-items: center;
  pointer-events: none;
  background: radial-gradient(circle at 50% 52%, rgba(255, 196, 140, 0.18), transparent 55%);
  animation: levelFade 4.2s ease forwards;
}
@keyframes levelFade { 0% { opacity: 0; } 12% { opacity: 1; } 78% { opacity: 1; } 100% { opacity: 0; } }
.levelup-card { text-align: center; transform: translateY(-4vh); }
.levelup-card .eyebrow { color: #ffd6a1; }
.levelup-card h2 { margin: 4px 0 4px; font-size: 34px; font-weight: 500; letter-spacing: 0.16em; color: #fff2da; text-shadow: 0 0 40px rgba(255, 176, 110, 0.55); }
.levelup-card p { margin: 0; font-size: 12px; color: rgba(255, 224, 188, 0.8); letter-spacing: 0.08em; }
.levelup-ring { width: 150px; height: 150px; margin: 0 auto 12px; border-radius: 50%; border: 1px solid rgba(255, 208, 154, 0.35); display: grid; place-items: center; font-family: var(--serif); font-size: 42px; color: #ffe3b8; box-shadow: 0 0 70px rgba(255, 180, 120, 0.35), inset 0 0 40px rgba(255, 180, 120, 0.14); animation: levelPulse 2s ease-in-out infinite; }
@keyframes levelPulse { 0%, 100% { transform: scale(1); } 50% { transform: scale(1.04); } }

.heart-fx, .food-fx, .zzz-fx {
  position: fixed;
  z-index: 160;
  pointer-events: none;
  font-size: 15px;
  animation: floatUp 1.5s ease-out forwards;
}
@keyframes floatUp {
  0% { opacity: 0; transform: translate(0, 0) scale(0.7); }
  18% { opacity: 1; }
  100% { opacity: 0; transform: translate(var(--dx, 10px), -90px) scale(1.05); }
}

/* ---------------------------------------------------------- 补充细节 */

.memory-detail {
  margin: 0 0 14px;
  font-size: 13px;
  line-height: 1.9;
  color: var(--ink-dim);
  white-space: pre-wrap;
}

.check-line {
  display: flex;
  align-items: center;
  gap: 7px;
  font-size: 10.5px;
  color: var(--ink-dim);
  cursor: pointer;
  user-select: none;
}
.check-line input { accent-color: #ffb185; width: 13px; height: 13px; }

select.field {
  appearance: none;
  padding-right: 30px;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='10' height='6'%3E%3Cpath d='M1 1l4 4 4-4' fill='none' stroke='%23a6b9ba' stroke-width='1.4' stroke-linecap='round'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 12px center;
}
select.field option { background: #0d1d25; color: var(--ink); }

body.modal-open { overflow: hidden; }

/* ---------------------------------------------------------- 响应式 */

@media (max-width: 1180px) {
  .app { grid-template-columns: 296px minmax(0, 1fr); }
  .topbar { padding: 20px 22px 10px; }
  .view { padding: 6px 22px 24px; }
  .growth-figures { gap: 16px; }
  .memory-layout { grid-template-columns: minmax(0, 1fr) 300px; }
}

@media (max-width: 1020px) {
  .learn-grid { grid-template-columns: 1fr; }
  .focus-panel { grid-column: auto; }
  .growth-grid { grid-template-columns: 1fr; }
  .memory-layout { grid-template-columns: 1fr; }
  .graph-panel { display: none; }
  .focus-panel { flex-direction: column; gap: 18px; text-align: center; }
  .focus-side { width: 100%; text-align: left; }
}

@media (max-width: 860px) {
  body { overflow: auto; }
  .app { display: block; height: auto; }
  .sidebar {
    position: sticky; top: 0; z-index: 60;
    flex-direction: row; align-items: center; gap: 8px;
    height: auto; padding: 9px 14px;
    border-right: none; border-bottom: 1px solid rgba(255, 221, 178, 0.08);
  }
  .brand-mark { width: 32px; height: 32px; border-radius: 10px; }
  .brand-mark svg { width: 24px; height: 24px; }
  .brand-text strong { font-size: 16px; }
  .brand-text span, .brand-tag, .tank, .pet-meta, .care-row, .side-foot { display: none; }
  .nav { flex-direction: row; margin-left: auto; gap: 2px; }
  .nav-item { display: flex; padding: 7px 9px; gap: 5px; }
  .nav-item em { display: none; }
  .nav-item span { font-size: 11px; }
  .nav-item.active::before { display: none; }
  .main { height: auto; }
  .topbar { padding: 14px 16px 8px; }
  .topbar-title h2 { font-size: 19px; }
  .stat-chips .chip:nth-child(2) { display: none; }
  .views { height: auto; }
  .view { height: auto; overflow: visible; padding: 8px 16px 36px; }
  #view-chat { height: calc(100vh - 128px); padding-bottom: 8px; }
  .focus-panel { padding: 18px; }
  .growth-hero { flex-direction: column; align-items: flex-start; gap: 16px; }
  .growth-figures { width: 100%; justify-content: space-between; }
  .memory-toolbar .toolbar-actions { margin-left: 0; }
  .achievement-grid { grid-template-columns: 1fr; }
  .provider-grid { grid-template-columns: 1fr; }
  .modal { padding: 20px; }
  .toasts { left: 16px; right: 16px; bottom: 16px; }
  .toast { max-width: none; }
}

@media (max-height: 780px) and (min-width: 861px) {
  .tank { height: 240px; }
  .fish-float { width: 300px; height: 214px; margin-left: -150px; bottom: 18px; }
  .pet-stage-title { display: none; }
  .nav-item { padding: 8px 12px; }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: 0.01ms !important; animation-iteration-count: 1 !important; transition-duration: 0.01ms !important; scroll-behavior: auto !important; }
}

/* ---- 四层记忆 ---- */
.layers-bar { display: grid; grid-template-columns: repeat(4, 1fr); gap: 8px; margin-bottom: 12px; }
.layer-chip {
  display: flex; flex-direction: column; gap: 3px; align-items: flex-start;
  padding: 9px 12px; border-radius: 12px; cursor: pointer;
  border: 1px solid rgba(255, 221, 178, 0.14);
  background: rgba(255, 255, 255, 0.035);
  color: var(--ink); text-align: left; transition: 0.16s;
  font-family: inherit;
}
.layer-chip:hover { border-color: rgba(255, 208, 154, 0.42); background: rgba(255, 208, 154, 0.07); }
.layer-chip b { font-size: 17px; font-weight: 600; color: #ffd6a4; }
.layer-chip span { font-size: 11px; color: rgba(240, 231, 217, 0.6); }
.persona-panel, .summary-panel { margin-bottom: 12px; }
.persona-list { display: flex; flex-direction: column; gap: 9px; margin-top: 4px; }
.persona-row { display: flex; flex-direction: column; gap: 5px; }
.persona-row label { font-size: 11.5px; color: rgba(240, 231, 217, 0.62); letter-spacing: 0.03em; }
.persona-row textarea {
  width: 100%; min-height: 44px; resize: vertical;
  padding: 9px 11px; border-radius: 10px;
  border: 1px solid rgba(255, 221, 178, 0.14);
  background: rgba(255, 255, 255, 0.035); color: var(--ink);
  font-size: 12.5px; line-height: 1.6; font-family: inherit;
}
.persona-row textarea:focus { outline: none; border-color: rgba(255, 208, 154, 0.45); }
.summary-list { display: flex; flex-direction: column; gap: 8px; margin-top: 10px; }
.summary-item { padding: 9px 11px; border-radius: 10px; background: rgba(255, 255, 255, 0.035); border: 1px solid rgba(255, 255, 255, 0.06); font-size: 12px; line-height: 1.65; color: rgba(240, 231, 217, 0.82); }
.summary-item em { display: block; margin-top: 4px; font-style: normal; font-size: 10.5px; color: rgba(240, 231, 217, 0.4); }

/* ---- 云端访问口令 ---- */
.pin-overlay {
  position: fixed; inset: 0; z-index: 900;
  display: grid; place-items: center;
  background: rgba(4, 10, 16, 0.72);
  backdrop-filter: blur(6px);
}
.pin-box {
  width: min(360px, 86vw);
  padding: 22px 20px;
  border-radius: 16px;
  border: 1px solid rgba(255, 221, 178, 0.2);
  background: #0d1a26;
  box-shadow: 0 18px 60px rgba(0, 0, 0, 0.5);
  display: flex; flex-direction: column; gap: 10px;
}
.pin-box h3 { margin: 0; font-size: 16px; color: #ffd6a4; }
.pin-box p { margin: 0; font-size: 12px; color: rgba(240, 231, 217, 0.6); }
.pin-input {
  padding: 10px 12px; border-radius: 10px;
  border: 1px solid rgba(255, 221, 178, 0.2);
  background: rgba(255, 255, 255, 0.05);
  color: var(--ink); font-size: 14px; font-family: inherit;
}
.pin-input:focus { outline: none; border-color: rgba(255, 208, 154, 0.55); }
.pin-actions { display: flex; justify-content: flex-end; gap: 8px; margin-top: 2px; }
