:root {
  --night-0: #0f1629;
  --night-1: #17233f;
  --night-2: #24375f;
  --ink: #fff8ef;
  --ink-soft: #d2c0ab;
  --gold: #f3d28a;
  --gold-deep: #e2b45a;
  --rose: #ff9ec8;
  --rose-deep: #ff7eb3;
  --sky: #9ed0ff;
  --mint: #8fe3d0;
  --danger: #ff8b8b;
  --card: rgba(255, 248, 240, 0.08);
  --card-solid: rgba(255, 251, 246, 0.96);
  --line: rgba(243, 210, 138, 0.32);
  --line-soft: rgba(255, 248, 240, 0.1);
  --shadow: 0 20px 56px rgba(5, 10, 24, 0.42);
  --shadow-soft: 0 10px 28px rgba(5, 10, 24, 0.22);
  --radius: 30px;
  --font-display: "ZCOOL XiaoWei", "Cormorant Garamond", serif;
  --font-body: "Nunito", "PingFang SC", "Microsoft YaHei", sans-serif;
  --font-fairy: "Cormorant Garamond", "ZCOOL XiaoWei", serif;
  --safe-b: env(safe-area-inset-bottom, 0px);
  --ease: cubic-bezier(0.22, 1, 0.36, 1);
  --glass:
    linear-gradient(165deg, rgba(255,250,244,.16), rgba(255,250,244,.05) 42%, rgba(240,208,132,.05));
}

*, *::before, *::after { box-sizing: border-box; }
html {
  scroll-behavior: smooth;
  overflow-x: hidden;
  max-width: 100%;
}
button, input, select { font: inherit; color: inherit; }

body {
  margin: 0;
  min-height: 100vh;
  min-height: 100dvh;
  color: var(--ink);
  font-family: var(--font-body);
  font-size: 15px;
  font-weight: 700;
  line-height: 1.55;
  -webkit-font-smoothing: antialiased;
  -webkit-tap-highlight-color: transparent;
  background:
    radial-gradient(ellipse 80% 50% at 50% -8%, #4a5f96 0%, transparent 58%),
    radial-gradient(ellipse 42% 36% at 92% 12%, rgba(255, 168, 204, 0.2), transparent 55%),
    radial-gradient(ellipse 38% 32% at 8% 72%, rgba(243, 210, 138, 0.14), transparent 52%),
    linear-gradient(180deg, var(--night-0) 0%, var(--night-1) 48%, #0c1324 100%);
  overflow-x: hidden;
  padding-top: env(safe-area-inset-top, 0px);
  padding-bottom: calc(88px + var(--safe-b));
}

/* —— Disney night sky —— */
.sky {
  position: fixed; inset: 0; pointer-events: none; z-index: 0; overflow: hidden;
}
.vignette {
  position: absolute; inset: 0;
  background:
    radial-gradient(ellipse 75% 70% at 50% 40%, transparent 40%, rgba(8, 12, 24, 0.45) 100%);
}
.starfield {
  position: absolute; inset: 0;
  opacity: .55;
  background-image:
    radial-gradient(1px 1px at 8% 18%, rgba(255,248,230,.9), transparent),
    radial-gradient(1.2px 1.2px at 22% 32%, rgba(255,210,230,.75), transparent),
    radial-gradient(1px 1px at 36% 12%, rgba(255,248,230,.7), transparent),
    radial-gradient(1.4px 1.4px at 48% 28%, rgba(200,230,255,.8), transparent),
    radial-gradient(1px 1px at 63% 16%, rgba(255,248,230,.85), transparent),
    radial-gradient(1px 1px at 78% 38%, rgba(255,210,230,.7), transparent),
    radial-gradient(1.2px 1.2px at 88% 22%, rgba(255,248,230,.8), transparent),
    radial-gradient(1px 1px at 14% 55%, rgba(255,248,230,.55), transparent),
    radial-gradient(1px 1px at 70% 62%, rgba(200,230,255,.5), transparent),
    radial-gradient(1.3px 1.3px at 42% 70%, rgba(255,248,230,.45), transparent);
}
.moon {
  position: absolute;
  top: 6%; right: 9%;
  width: 92px; height: 92px;
  border-radius: 50%;
  background:
    radial-gradient(circle at 32% 30%, #fffaf0, #f6d998 42%, #e4b35a 78%);
  box-shadow:
    0 0 0 1px rgba(255, 248, 230, 0.18) inset,
    0 0 44px rgba(243, 210, 138, 0.5),
    0 0 110px rgba(243, 210, 138, 0.22);
  animation: moon-glow 7s ease-in-out infinite;
}
.moon i {
  position: absolute;
  right: 10px; top: 14px;
  width: 28px; height: 28px; border-radius: 50%;
  background: radial-gradient(circle at 40% 40%, rgba(255,255,255,.35), transparent 70%);
  filter: blur(.2px);
}
.castle {
  position: absolute;
  left: 50%;
  bottom: -2%;
  width: min(980px, 145vw);
  height: 44vh;
  transform: translateX(-50%);
  opacity: 0.2;
  background:
    linear-gradient(180deg, transparent 0%, rgba(12, 18, 36, 0.25) 28%, rgba(12, 18, 36, 0.72) 100%),
    radial-gradient(ellipse 42% 58% at 50% 100%, rgba(243, 210, 138, 0.22), transparent 72%);
  mask-image: linear-gradient(180deg, transparent, black 34%, black);
}
.castle::before,
.castle::after {
  content: "";
  position: absolute;
  bottom: 8%;
  background: linear-gradient(180deg, rgba(255,248,230,0.12), rgba(255,255,255,0.02));
  border-radius: 10px 10px 0 0;
}
.castle::before {
  left: 41%; width: 52px; height: 30%;
  box-shadow:
    -78px 22px 0 -8px rgba(255,248,230,0.07),
    78px 32px 0 -10px rgba(255,248,230,0.06),
    0 -20px 0 -16px rgba(243, 210, 138, 0.28);
}
.castle::after {
  left: 52%; width: 36px; height: 24%;
  border-radius: 50% 50% 0 0;
  box-shadow: 0 -14px 0 -12px rgba(255, 158, 200, 0.18);
}

.fairy {
  position: absolute;
  width: 3px; height: 3px;
  border-radius: 50%;
  background: #fff6d6;
  box-shadow: 0 0 12px 3px rgba(243, 210, 138, 0.75);
  animation: twinkle 3.2s ease-in-out infinite;
}
.f1 { top: 12%; left: 14%; animation-delay: .2s; }
.f2 { top: 18%; left: 28%; width: 2px; height: 2px; animation-delay: .8s; }
.f3 { top: 10%; left: 55%; animation-delay: 1.1s; background: #ffd0e6; }
.f4 { top: 22%; left: 72%; animation-delay: .4s; }
.f5 { top: 35%; left: 8%; animation-delay: 1.6s; }
.f6 { top: 40%; right: 18%; background: #c9e7ff; animation-delay: .9s; }
.f7 { top: 58%; left: 22%; animation-delay: 1.9s; }
.f8 { top: 48%; right: 30%; width: 2px; height: 2px; animation-delay: 1.3s; }
.f9 { top: 15%; left: 42%; width: 2px; height: 2px; animation-delay: 2.2s; background: #fff0b8; }
.f10 { top: 28%; right: 8%; animation-delay: 1.5s; background: #ffd0e6; }

.mist {
  position: absolute; border-radius: 50%; filter: blur(56px); opacity: .38;
}
.m1 {
  width: 300px; height: 300px;
  background: rgba(255, 158, 200, 0.22);
  top: -70px; left: -50px;
  animation: floaty 14s ease-in-out infinite;
}
.m2 {
  width: 280px; height: 280px;
  background: rgba(158, 208, 255, 0.15);
  bottom: 10%; right: -60px;
  animation: floaty 16s ease-in-out infinite reverse;
}
.m3 {
  width: 220px; height: 220px;
  background: rgba(243, 210, 138, 0.12);
  top: 38%; left: 40%;
  animation: floaty 18s ease-in-out infinite;
}

@keyframes moon-glow {
  0%, 100% { box-shadow: 0 0 40px rgba(240,208,132,.4), 0 0 90px rgba(240,208,132,.18); }
  50% { box-shadow: 0 0 55px rgba(240,208,132,.6), 0 0 120px rgba(240,208,132,.28); }
}
@keyframes twinkle {
  0%, 100% { opacity: .25; transform: scale(.8); }
  50% { opacity: 1; transform: scale(1.35); }
}
@keyframes floaty {
  0%, 100% { transform: translateY(0); }
  50% { transform: translateY(16px); }
}
@keyframes bob {
  0%, 100% { transform: translateY(0) rotate(-1.5deg); }
  50% { transform: translateY(-8px) rotate(1.5deg); }
}
@keyframes shine {
  0% { transform: translateX(-130%) skewX(-18deg); }
  100% { transform: translateX(230%) skewX(-18deg); }
}
@keyframes pop-in {
  from { opacity: 0; transform: translateY(18px); }
  to { opacity: 1; transform: none; }
}
@keyframes soft-fade {
  from { opacity: 0; transform: translateY(10px) scale(.985); }
  to { opacity: 1; transform: none; }
}
@keyframes ribbon {
  from { opacity: 0; letter-spacing: .28em; }
  to { opacity: 1; letter-spacing: .14em; }
}
@keyframes pulse-ring {
  0% { box-shadow: 0 0 0 0 rgba(240,208,132,.35); }
  70% { box-shadow: 0 0 0 14px rgba(240,208,132,0); }
  100% { box-shadow: 0 0 0 0 rgba(240,208,132,0); }
}
@keyframes spark-fly {
  0% { opacity: 1; transform: translate(0,0) scale(1); }
  100% { opacity: 0; transform: translate(var(--x), var(--y)) scale(.2); }
}

.shell {
  position: relative;
  z-index: 1;
  width: min(980px, calc(100% - 22px));
  margin: 0 auto;
}

.hero {
  padding: 18px 0 26px;
  text-align: center;
  animation: pop-in .9s var(--ease) both;
}

.dedication {
  margin: 0 auto 10px;
  max-width: 34ch;
  font-family: var(--font-fairy);
  font-style: italic;
  font-size: 12px;
  font-weight: 500;
  color: rgba(255, 236, 210, 0.82);
  letter-spacing: .14em;
  animation: ribbon 1.2s var(--ease) both;
  text-shadow: 0 0 18px rgba(243, 210, 138, 0.25);
}

.reveal {
  opacity: 0;
  animation: soft-fade .75s var(--ease) both;
  animation-delay: var(--d, 0s);
}

.chapter {
  font-family: var(--font-fairy);
  font-style: italic;
  font-size: 11px;
  font-weight: 600;
  letter-spacing: .12em;
  color: rgba(240, 208, 132, 0.72);
  margin-bottom: 4px;
}

.ornament {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 12px;
  margin: 0 auto 18px;
  max-width: 240px;
  color: var(--gold);
}
.ornament span {
  flex: 1;
  height: 1px;
  background: linear-gradient(90deg, transparent, rgba(243,210,138,.7), transparent);
  box-shadow: 0 0 8px rgba(243,210,138,.25);
}
.ornament i {
  font-style: normal;
  font-size: 12px;
  opacity: .9;
  text-shadow: 0 0 12px rgba(243,210,138,.55);
}

.topbar {
  display: flex; justify-content: space-between; gap: 10px; margin-bottom: 10px;
}
.pill {
  display: inline-flex; align-items: center; gap: 7px;
  padding: 8px 13px; border-radius: 999px;
  background: linear-gradient(180deg, rgba(255,250,244,.12), rgba(255,250,244,.05));
  border: 1px solid rgba(243, 210, 138, 0.28);
  box-shadow: 0 8px 20px rgba(0,0,0,.15), inset 0 1px 0 rgba(255,255,255,.12);
  font-size: 12px; font-weight: 800; color: var(--ink-soft);
  backdrop-filter: blur(14px);
}
.pill.live { color: var(--gold); }
.pill.soft { color: #d7e9ff; border-color: rgba(158,208,255,.28); }
.pill .dot {
  width: 8px; height: 8px; border-radius: 50%;
  background: var(--mint);
  box-shadow: 0 0 0 4px rgba(143,227,208,.18);
  animation: twinkle 1.8s ease infinite;
}

.mascot-wrap {
  position: relative;
  width: 176px; margin: 4px auto 12px;
}
.mascot-glow {
  position: absolute; inset: 8% 4% 6%;
  background:
    radial-gradient(circle, rgba(243,210,138,.62), rgba(255,158,200,.22) 45%, transparent 72%);
  filter: blur(12px);
}
.mascot-wrap::before {
  content: "";
  position: absolute;
  inset: 18% 16% 22%;
  border-radius: 50%;
  border: 1px solid rgba(243,210,138,.22);
  box-shadow: 0 0 24px rgba(243,210,138,.15);
}
.mascot {
  width: 176px; height: 176px; display: block;
  animation: bob 3.2s ease-in-out infinite;
  filter: drop-shadow(0 18px 26px rgba(0,0,0,.38));
  position: relative; z-index: 1;
}
.speech {
  position: absolute;
  right: -26px; top: 8px;
  z-index: 2;
  background: linear-gradient(180deg, #fffdf8, #fff1e6);
  color: #5a3d4a;
  border: 1px solid rgba(243, 210, 138, 0.6);
  font-family: var(--font-fairy);
  font-style: italic;
  font-size: 13px; font-weight: 600;
  padding: 8px 13px;
  border-radius: 18px 18px 18px 5px;
  box-shadow: 0 12px 28px rgba(0,0,0,.22), inset 0 1px 0 rgba(255,255,255,.8);
  white-space: nowrap;
  animation: pop-in .9s .15s var(--ease) both;
}

.eyebrow {
  margin: 0;
  font-family: var(--font-fairy);
  font-style: italic;
  font-size: 14px; font-weight: 600;
  letter-spacing: .14em;
  color: var(--gold);
  text-transform: capitalize;
  text-shadow: 0 0 20px rgba(243,210,138,.35);
}
.hero-brand {
  margin: 8px 0 10px;
  font-family: var(--font-display);
  font-size: clamp(3.3rem, 13vw, 5.1rem);
  line-height: .95;
  letter-spacing: .05em;
  text-shadow:
    0 2px 0 rgba(255,255,255,.06),
    0 10px 34px rgba(0,0,0,.3);
}
.hero-brand span {
  background: linear-gradient(120deg, #fff4c8 0%, #f3d28a 38%, #ff9ec8 100%);
  -webkit-background-clip: text; background-clip: text; color: transparent;
  filter: drop-shadow(0 0 18px rgba(243,210,138,.25));
}
.hero-sub {
  margin: 0 auto 14px;
  max-width: 28ch;
  color: var(--ink-soft);
  font-weight: 700;
  font-size: 14px;
  line-height: 1.6;
}

.account-card {
  position: relative;
  display: flex; align-items: center; justify-content: space-between; gap: 12px;
  text-align: left;
  max-width: 460px; margin: 0 auto 18px;
  padding: 16px 18px;
  border-radius: 24px;
  background:
    radial-gradient(circle at 100% 0%, rgba(255,158,200,.18), transparent 42%),
    radial-gradient(circle at 0% 100%, rgba(243,210,138,.1), transparent 40%),
    var(--glass);
  border: 1px solid var(--line);
  box-shadow: var(--shadow), inset 0 1px 0 rgba(255,255,255,.16);
  backdrop-filter: blur(18px);
  transition: transform .25s var(--ease), border-color .25s, box-shadow .25s;
  overflow: hidden;
}
.account-card::before {
  content: "";
  position: absolute; inset: 1px;
  border-radius: 23px;
  border: 1px solid rgba(255,255,255,.06);
  pointer-events: none;
}
.account-card:hover {
  transform: translateY(-2px);
  border-color: rgba(255, 158, 200, 0.45);
  box-shadow: 0 22px 50px rgba(5,10,24,.45), inset 0 1px 0 rgba(255,255,255,.2);
}
.jewel {
  position: absolute;
  width: 7px; height: 7px;
  border-radius: 2px;
  background: linear-gradient(135deg, #fff3c4, #ff9ec8);
  box-shadow: 0 0 10px rgba(243,210,138,.55);
  transform: rotate(45deg);
  opacity: .85;
}
.jewel.j1 { top: 10px; left: 12px; }
.jewel.j2 { bottom: 10px; right: 12px; background: linear-gradient(135deg, #c9e7ff, #f3d28a); }
.account-label {
  font-family: var(--font-fairy);
  font-style: italic;
  font-size: 12px; color: var(--gold);
  letter-spacing: .06em;
}
.account-row { margin-top: 4px; }
.account-select {
  appearance: none;
  -webkit-appearance: none;
  border: 1px solid rgba(243, 210, 138, 0.4);
  background:
    linear-gradient(135deg, rgba(255,250,244,.2), rgba(243,210,138,.12)),
    url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='8' viewBox='0 0 12 8'%3E%3Cpath d='M1 1l5 5 5-5' stroke='%23f3d28a' stroke-width='1.6' fill='none' stroke-linecap='round'/%3E%3C/svg%3E") right 12px center / 12px no-repeat;
  color: var(--ink);
  font-family: var(--font-display);
  font-size: 1.3rem;
  padding: 7px 36px 7px 13px;
  border-radius: 15px;
  min-width: 148px;
  max-width: 220px;
  cursor: pointer;
  outline: none;
  box-shadow: inset 0 1px 0 rgba(255,255,255,.14);
}
.account-select:focus {
  border-color: rgba(255, 158, 200, 0.6);
  box-shadow: 0 0 0 3px rgba(255, 158, 200, 0.16), inset 0 1px 0 rgba(255,255,255,.18);
}
.account-select option { color: #2a2130; background: #fffaf4; }
.account-meta {
  margin-top: 7px;
  font-size: 12px; font-weight: 800;
  color: #ffe0ef;
  letter-spacing: .01em;
  text-shadow: 0 1px 8px rgba(0,0,0,.25);
}

.modal {
  position: fixed; inset: 0; z-index: 80;
  display: grid; place-items: center;
  padding: 20px;
  background: rgba(12, 16, 32, 0.55);
  backdrop-filter: blur(8px);
}
.modal[hidden] { display: none !important; }
.modal-card {
  width: min(360px, 100%);
  padding: 24px 22px 18px;
  border-radius: 26px;
  background:
    radial-gradient(circle at 100% 0%, rgba(255,158,200,.16), transparent 40%),
    linear-gradient(160deg, #314572, #1d2b4d 58%, #141d34);
  border: 1px solid rgba(243, 210, 138, 0.4);
  box-shadow: 0 28px 70px rgba(0, 0, 0, 0.4), inset 0 1px 0 rgba(255,255,255,.12);
  color: var(--ink);
  animation: soft-fade .35s var(--ease) both;
}
.modal-card h3 {
  margin: 0;
  font-family: var(--font-display);
  font-size: 1.35rem;
  color: var(--gold);
}
.modal-sub {
  margin: 8px 0 16px;
  font-size: 13px;
  color: var(--ink-soft);
  font-weight: 700;
}
.modal-label {
  display: block;
  font-size: 12px;
  color: var(--rose);
  font-weight: 800;
  margin-bottom: 6px;
}
.modal-input {
  width: 100%;
  box-sizing: border-box;
  border-radius: 14px;
  border: 1px solid rgba(240, 208, 132, 0.3);
  background: rgba(255, 250, 244, 0.08);
  color: var(--ink);
  padding: 12px 14px;
  font-size: 15px;
  font-weight: 700;
  outline: none;
}
.modal-input::placeholder { color: rgba(201, 184, 164, 0.7); }
.modal-input:focus {
  border-color: rgba(255, 158, 200, 0.55);
  box-shadow: 0 0 0 3px rgba(255, 158, 200, 0.12);
}
.modal-actions {
  display: flex; justify-content: flex-end; gap: 10px;
  margin-top: 18px;
}

.quick-chips {
  display: flex; flex-wrap: wrap; justify-content: center; gap: 8px;
  margin-bottom: 14px;
}
.chip {
  display: inline-flex; align-items: center; justify-content: center; gap: 6px;
  border: 1px solid rgba(243,210,138,.32);
  background: linear-gradient(180deg, rgba(255,255,255,.08), rgba(255,255,255,.03));
  color: var(--ink-soft);
  border-radius: 999px;
  padding: 9px 15px;
  font-size: 13px; font-weight: 800;
  cursor: pointer;
  transition: .22s var(--ease);
  min-height: 42px;
  backdrop-filter: blur(10px);
  box-shadow: inset 0 1px 0 rgba(255,255,255,.08);
}
.chip-short { display: none; }
.chip:hover { transform: translateY(-1px); color: var(--ink); border-color: rgba(243,210,138,.5); }
.chip.active {
  color: #2a2130;
  border-color: transparent;
  background: linear-gradient(135deg, #ffe7ad 0%, #f4c36a 45%, #ff9ec8 100%);
  box-shadow: 0 12px 26px rgba(243, 210, 138, 0.32), inset 0 1px 0 rgba(255,255,255,.45);
}

.hero-actions {
  display: flex; flex-wrap: wrap; justify-content: center; gap: 10px;
}
.btn {
  appearance: none; border: none; border-radius: 999px;
  padding: 14px 26px; min-height: 52px;
  font-family: inherit; font-size: 15px; font-weight: 800;
  cursor: pointer; position: relative; overflow: hidden;
  transition: transform .2s var(--ease), box-shadow .2s, opacity .2s, border-color .2s;
  letter-spacing: .02em;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  text-align: center;
}
.btn:active { transform: scale(.97); }
.btn:disabled { opacity: .55; cursor: wait; }
.btn.primary {
  background: linear-gradient(135deg, #fff0c2 0%, #f3c66a 42%, #ff9ec8 100%);
  color: #2a2130;
  box-shadow:
    0 14px 34px rgba(243, 210, 138, 0.32),
    inset 0 1px 0 rgba(255,255,255,.55);
}
.btn.primary:hover {
  transform: translateY(-1px);
  box-shadow: 0 18px 40px rgba(243, 210, 138, 0.42), inset 0 1px 0 rgba(255,255,255,.6);
}
.btn.primary.pulse-once { animation: pulse-ring .9s var(--ease); }
.btn.primary .btn-shine {
  position: absolute; inset: 0;
  background: linear-gradient(90deg, transparent, rgba(255,255,255,.55), transparent);
  animation: shine 3.2s ease-in-out infinite;
}
.btn.ghost {
  background: linear-gradient(180deg, rgba(255,255,255,.08), rgba(255,255,255,.03));
  color: var(--gold);
  border: 1px solid rgba(243,210,138,.42);
  backdrop-filter: blur(10px);
  box-shadow: inset 0 1px 0 rgba(255,255,255,.1);
}
.btn.ghost:hover { border-color: rgba(255,158,200,.45); color: #ffe7b5; }
.btn.miss {
  background: linear-gradient(135deg, rgba(255,158,200,.22), rgba(243,210,138,.14));
  color: #ffd0e4;
  border: 1px solid rgba(255,158,200,.5);
  box-shadow: 0 10px 24px rgba(255,120,180,.14), inset 0 1px 0 rgba(255,255,255,.12);
  gap: 8px;
}
.btn.miss:hover {
  transform: translateY(-1px);
  color: #fff;
  border-color: rgba(255,180,210,.7);
}
.btn.miss .miss-heart {
  display: inline-block;
  color: #ff7eb3;
  animation: miss-beat 1.4s ease-in-out infinite;
}
.btn.miss.sending { opacity: .7; pointer-events: none; }
@keyframes miss-beat {
  0%, 100% { transform: scale(1); }
  40% { transform: scale(1.18); }
  55% { transform: scale(1); }
}

.miss-fab {
  display: none;
  position: fixed;
  left: max(12px, env(safe-area-inset-left));
  bottom: calc(78px + var(--safe-b, 0px));
  z-index: 40;
  border: 1px solid rgba(255,158,200,.45);
  background: linear-gradient(145deg, rgba(40,28,42,.92), rgba(28,20,34,.94));
  color: #ffd0e4;
  border-radius: 999px;
  padding: 10px 14px 10px 12px;
  font-family: inherit;
  font-size: 12px;
  font-weight: 800;
  cursor: pointer;
  align-items: center;
  gap: 6px;
  box-shadow: 0 10px 28px rgba(0,0,0,.35), 0 0 0 1px rgba(255,158,200,.12);
  backdrop-filter: blur(10px);
}
.miss-fab span {
  color: #ff7eb3;
  font-size: 15px;
  animation: miss-beat 1.4s ease-in-out infinite;
}
.miss-fab em { font-style: normal; letter-spacing: .02em; }
.miss-fab:active { transform: scale(.96); }
.miss-fab.sending { opacity: .65; pointer-events: none; }

.btn.tiny {
  min-height: 40px; padding: 8px 13px; font-size: 12px;
  background: linear-gradient(180deg, rgba(255,255,255,.1), rgba(255,255,255,.04));
  color: var(--gold);
  border: 1px solid rgba(243,210,138,.38);
  white-space: nowrap;
  box-shadow: inset 0 1px 0 rgba(255,255,255,.1);
}
.btn.full { width: 100%; margin-top: 14px; }

.hero-meta {
  margin: 12px 0 0;
  font-size: 13px; font-weight: 800; color: var(--ink-soft);
}

.panel {
  position: relative;
  background: var(--glass);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 20px;
  margin-bottom: 14px;
  box-shadow: var(--shadow), inset 0 1px 0 rgba(255,255,255,.14);
  backdrop-filter: blur(18px);
  transition: border-color .25s var(--ease), transform .25s var(--ease), box-shadow .25s;
}
.panel::after {
  content: "";
  position: absolute; inset: 1px;
  border-radius: calc(var(--radius) - 1px);
  border: 1px solid rgba(255,255,255,.05);
  pointer-events: none;
}
.panel:hover {
  border-color: rgba(243, 210, 138, 0.48);
  box-shadow: 0 22px 54px rgba(5,10,24,.45), inset 0 1px 0 rgba(255,255,255,.18);
}
.panel.cute {
  background:
    radial-gradient(circle at 0% 0%, rgba(255,158,200,.14), transparent 46%),
    radial-gradient(circle at 100% 0%, rgba(243,210,138,.1), transparent 40%),
    var(--glass);
  border-color: rgba(243, 210, 138, 0.4);
}

.section-head {
  display: flex; justify-content: space-between; align-items: center;
  gap: 10px; margin-bottom: 14px;
}
.section-head h3 {
  margin: 0;
  font-family: var(--font-display);
  font-size: 1.45rem; font-weight: 400;
  display: flex; align-items: center; gap: 8px;
  color: #fff8ee;
}
.badge {
  display: inline-grid; place-items: center;
  width: 28px; height: 28px; border-radius: 10px;
  background: linear-gradient(135deg, rgba(240,208,132,.35), rgba(255,158,200,.28));
  font-style: normal; font-size: 13px;
  color: var(--gold);
  border: 1px solid rgba(240,208,132,.35);
}
.tag-soft {
  font-size: 12px; font-weight: 800; color: var(--ink-soft);
  background: rgba(255,255,255,.06);
  border: 1px solid rgba(240,208,132,.22);
  padding: 5px 10px; border-radius: 999px;
}
.linkish {
  border: none; background: transparent;
  color: var(--gold); font-weight: 800; font-size: 12px;
  cursor: pointer; padding: 6px 0;
}

.simple-row {
  display: grid;
  grid-template-columns: 1.4fr .8fr;
  gap: 10px;
}
.field { display: flex; flex-direction: column; gap: 6px; }
.field.grow { min-width: 0; }
.field label {
  font-size: 12px; font-weight: 800; color: var(--ink-soft);
}
.field input, .field select, .field textarea {
  width: 100%;
  border: 1px solid rgba(240,208,132,.28);
  background: rgba(255,250,244,.95);
  color: #3d2b35;
  border-radius: 16px;
  padding: 12px;
  font-weight: 800;
  outline: none;
  min-height: 46px;
  transition: border-color .2s, box-shadow .2s;
  font: inherit;
  resize: vertical;
}
.field input:focus, .field select:focus, .field textarea:focus {
  border-color: var(--gold-deep);
  box-shadow: 0 0 0 4px rgba(240,208,132,.18);
}
.field textarea { min-height: 72px; line-height: 1.45; }

.plan-lead {
  margin: -4px 0 14px;
  font-size: 13px;
  font-weight: 700;
  color: var(--ink-soft);
  line-height: 1.5;
}
.plan-form { margin-bottom: 16px; }
.plan-form .btn.full { margin-top: 12px; }
.plan-list {
  display: flex;
  flex-direction: column;
  gap: 10px;
}
.plan-card {
  border-radius: 18px;
  padding: 14px 16px;
  background: linear-gradient(180deg, rgba(255,255,255,.08), rgba(255,255,255,.03));
  border: 1px solid rgba(243,210,138,.22);
}
.plan-card-top {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 10px;
  margin-bottom: 6px;
}
.plan-kind {
  font-size: 11px;
  font-weight: 800;
  letter-spacing: .04em;
  color: #ffc7dc;
}
.plan-status {
  font-size: 11px;
  font-weight: 800;
  padding: 4px 10px;
  border-radius: 999px;
  border: 1px solid transparent;
}
.plan-status.pending {
  color: #ffe7b5;
  border-color: rgba(243,210,138,.4);
  background: rgba(243,210,138,.12);
}
.plan-status.approved {
  color: #c8f0d8;
  border-color: rgba(120,210,160,.4);
  background: rgba(80,180,120,.14);
}
.plan-status.rejected {
  color: #ffc7c7;
  border-color: rgba(255,140,140,.35);
  background: rgba(180,70,70,.14);
}
.plan-card h4 {
  margin: 0 0 4px;
  font-size: 16px;
  font-weight: 800;
  color: #fff8ee;
}
.plan-card p {
  margin: 0;
  font-size: 12px;
  font-weight: 700;
  color: rgba(247,239,230,.58);
  line-height: 1.45;
}
.plan-reply {
  margin-top: 8px !important;
  color: #ffd0e4 !important;
}
.plan-empty {
  text-align: center;
  padding: 18px 10px;
  font-size: 13px;
  font-weight: 700;
  color: rgba(247,239,230,.45);
}
.toggle {
  display: flex; align-items: center; gap: 8px;
  min-height: 46px; padding: 0 12px;
  border-radius: 16px;
  border: 1px solid rgba(240,208,132,.28);
  background: rgba(255,250,244,.95);
  color: #3d2b35;
  cursor: pointer; font-size: 14px; font-weight: 800;
}
.toggle input { accent-color: #e0b45a; width: 18px; height: 18px; }

.advanced { margin-top: 12px; }
.controls {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 10px;
}

.metrics {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 10px;
}
.metrics-hero { grid-template-columns: 1.15fr 1.15fr 1fr 1fr; }
.metric {
  border-radius: 22px;
  padding: 14px 10px;
  text-align: center;
  border: 1px solid rgba(243,210,138,.28);
  background: rgba(255,250,244,.96);
  color: #3d2b35;
  box-shadow: 0 12px 26px rgba(0,0,0,.12), inset 0 1px 0 rgba(255,255,255,.75);
  transition: transform .2s var(--ease), box-shadow .2s;
}
.metric:hover { transform: translateY(-2px); box-shadow: 0 16px 30px rgba(0,0,0,.16); }
.metric.big { padding: 18px 12px; }
.metric.big strong { font-size: 1.8rem; }
.metric label {
  display: block; font-size: 11px; font-weight: 800;
  color: #9a7382; margin-bottom: 6px;
  letter-spacing: .04em;
}
.metric strong {
  font-family: var(--font-fairy);
  font-size: 1.45rem; font-weight: 700;
}
.metric strong.up { color: #149a78; }
.metric strong.down { color: #e35d5d; }
.m1 { background: linear-gradient(165deg, #fff9f2, #ffe6f1 80%); }
.m2 { background: linear-gradient(165deg, #fffaf2, #ffe4b0 80%); }
.m4 { background: linear-gradient(165deg, #fff7f7, #ffe0e0 80%); }
.m5 { background: linear-gradient(165deg, #f4fffb, #d7fff1 80%); }

.mini-stats {
  display: flex; flex-wrap: wrap; gap: 8px 14px;
  margin-top: 12px; justify-content: center;
  font-size: 12px; font-weight: 800; color: var(--ink-soft);
}
.mini-stats b {
  color: var(--gold);
  font-family: var(--font-fairy);
  font-weight: 700;
}

.chart-panel {
  background:
    radial-gradient(circle at 100% 0%, rgba(255,158,200,.08), transparent 40%),
    rgba(255,250,244,.97);
  border-radius: 22px;
  border: 1px solid rgba(243,210,132,.28);
  padding: 10px;
  overflow: hidden;
  box-shadow: inset 0 1px 0 rgba(255,255,255,.7);
}
#equityChart { width: 100%; height: 250px; display: block; }

.split { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.subpanel {
  background: rgba(255,250,244,.95);
  color: #3d2b35;
  border: 1px solid rgba(240,208,132,.25);
  border-radius: 20px;
  padding: 14px;
}
.subpanel h4 {
  margin: 0 0 12px;
  font-size: 13px; font-weight: 800; color: #9a7382;
}

.bar-list { display: flex; flex-direction: column; gap: 10px; }
.bar-row {
  display: grid; grid-template-columns: 72px 1fr 64px;
  gap: 8px; align-items: center; font-size: 12px; font-weight: 800;
}
.bar-row .track {
  height: 10px; border-radius: 999px; background: #ffe8f2;
  overflow: hidden; position: relative;
}
.bar-row .fill {
  position: absolute; inset: 0 auto 0 0; width: 0; border-radius: inherit;
  background: linear-gradient(90deg, #ff9ec8, #f0d084);
  transition: width .85s var(--ease);
}
.bar-row .fill.neg {
  background: linear-gradient(90deg, #ff9b9b, #ffd0d0);
  left: auto; right: 0;
}
.bar-row .val.pos { color: #1aa884; }
.bar-row .val.neg { color: #e35d5d; }

.table-wrap {
  overflow: auto; max-height: 360px;
  border-radius: 18px;
  border: 1px solid rgba(240,208,132,.25);
  background: rgba(255,250,244,.96);
  color: #3d2b35;
  -webkit-overflow-scrolling: touch;
}
table { width: 100%; border-collapse: collapse; font-size: 12px; font-weight: 800; }
th, td {
  padding: 11px 12px; text-align: left;
  border-bottom: 1px solid #ffe8f2; white-space: nowrap;
}
th {
  position: sticky; top: 0; z-index: 1;
  background: #fff4e8; color: #9a7382; font-size: 11px;
}
.tag {
  display: inline-block; padding: 3px 8px; border-radius: 999px;
  font-size: 11px; background: #fff0f6; color: #d95f8f;
}
.tag.trend { background: #e9fff8; color: #0ca678; }
.pnl-pos { color: #1aa884; }
.pnl-neg { color: #e35d5d; }
.empty {
  text-align: center; color: #9a7382;
  padding: 30px 12px !important; white-space: normal !important;
}
.empty-rich {
  display: grid; place-items: center; gap: 4px;
  padding: 8px 0;
}
.empty-rich .empty-icon {
  width: 42px; height: 42px; border-radius: 16px;
  display: grid; place-items: center;
  margin-bottom: 4px;
  background: linear-gradient(135deg, #ffe29a, #ff9ec8);
  color: #2a2130;
  box-shadow: 0 8px 18px rgba(240,208,132,.25);
}
.empty-rich small {
  display: block;
  max-width: 26ch;
  font-size: 11px;
  font-weight: 700;
  color: #b08999;
  line-height: 1.45;
}

.footer {
  display: flex; justify-content: space-between; align-items: flex-end;
  gap: 14px;
  padding: 22px 4px 18px;
  color: var(--ink-soft);
  border-top: 1px solid rgba(240,208,132,.16);
  margin-top: 6px;
}
.footer-note {
  display: flex; flex-direction: column; gap: 4px;
  font-family: var(--font-fairy);
  font-style: italic;
}
.footer-note strong {
  font-size: 14px; font-weight: 700; color: var(--gold);
}
.footer-note span {
  font-size: 12px; font-weight: 600;
  max-width: 28ch; line-height: 1.45;
}
.footer-right {
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  gap: 6px;
  font-family: var(--font-fairy);
  font-style: italic;
  font-size: 12px; font-weight: 600;
  opacity: .8;
  white-space: nowrap;
}
.footer-aside {
  font-style: normal;
  font-size: 12px;
  font-weight: 700;
  color: rgba(255, 199, 220, 0.72);
  text-decoration: none;
  border-bottom: 1px solid rgba(255, 158, 200, 0.28);
  padding-bottom: 1px;
}
.footer-aside:hover { color: #ffd0e4; }

.dock {
  position: fixed; left: 0; right: 0; bottom: 0; z-index: 25;
  padding: 12px 16px calc(12px + var(--safe-b));
  background: linear-gradient(180deg, transparent, rgba(12,18,36,.7) 24%, rgba(12,18,36,.94));
  backdrop-filter: blur(14px);
  display: none;
}
.dock-btn {
  width: 100%;
  box-shadow: 0 14px 34px rgba(243,210,138,.34), inset 0 1px 0 rgba(255,255,255,.5);
}

.status-toast {
  position: fixed; left: 50%; bottom: calc(84px + var(--safe-b));
  transform: translate(-50%, 14px);
  z-index: 30; max-width: min(92vw, 360px);
  padding: 12px 16px; border-radius: 999px;
  background: rgba(255, 250, 244, 0.95);
  color: #3d2b35;
  border: 1px solid rgba(240,208,132,.45);
  font-size: 13px; font-weight: 800; text-align: center;
  opacity: 0; pointer-events: none;
  transition: .3s var(--ease);
  box-shadow: 0 14px 30px rgba(0,0,0,.25);
}
.status-toast.show { opacity: 1; transform: translate(-50%, 0); }

.loading {
  position: fixed; inset: 0; z-index: 40;
  background: rgba(20, 28, 51, .55);
  backdrop-filter: blur(10px);
  display: grid; place-items: center;
}
.loading[hidden] { display: none !important; }
.loading-card {
  width: min(86vw, 300px);
  background: linear-gradient(165deg, #fffdf8, #ffe8f2 70%, #ffe9c8);
  border-radius: 32px; padding: 30px 22px;
  text-align: center;
  border: 1px solid rgba(243,210,138,.55);
  box-shadow: var(--shadow), inset 0 1px 0 rgba(255,255,255,.7);
  color: #3d2b35;
}
.spin-wrap {
  width: 74px; height: 74px; margin: 0 auto 10px;
  border-radius: 24px;
  display: grid; place-items: center;
  background: linear-gradient(135deg, #ffe29a, #ff9ec8);
  animation: bob 1.1s ease-in-out infinite;
  box-shadow: 0 10px 24px rgba(240,208,132,.35);
}
.spin { font-size: 28px; color: #2a2130; }
.loading-card p { margin: 0; font-weight: 800; color: #8a4d66; }
.loading-sub { margin-top: 6px !important; font-size: 12px; color: #9a7382 !important; }
.loading-steps {
  display: flex; justify-content: center; gap: 6px;
  margin-top: 14px;
}
.loading-steps span {
  width: 7px; height: 7px; border-radius: 50%;
  background: #f0c9d8;
  transition: .25s var(--ease);
}
.loading-steps span.on {
  background: linear-gradient(135deg, #f0d084, #ff9ec8);
  transform: scale(1.25);
  box-shadow: 0 0 0 3px rgba(240,208,132,.18);
}

.sparkle-burst {
  position: fixed; inset: 0; pointer-events: none; z-index: 50;
  overflow: hidden;
}
.sparkle-burst i {
  position: absolute; left: 50%; top: 42%;
  width: 6px; height: 6px; margin: -3px;
  border-radius: 50%;
  background: #fff3c4;
  box-shadow: 0 0 10px rgba(240,208,132,.8);
  animation: spark-fly .95s var(--ease) forwards;
}
.sparkle-burst i:nth-child(odd) { background: #ff9ec8; }
.sparkle-burst i:nth-child(3n) { background: #c9e7ff; width: 4px; height: 4px; }

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: .01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: .01ms !important;
  }
  .reveal { opacity: 1; }
}

@media (max-width: 900px) {
  .controls { grid-template-columns: 1fr 1fr; }
  .metrics, .metrics-hero { grid-template-columns: 1fr 1fr; }
  .split { grid-template-columns: 1fr; }
  .dock { display: block; }
  /* 底部已有常驻 CTA，避免英雄区再叠一个同款按钮 */
  .hero-actions .btn.primary { display: none; }
  .hero-actions { justify-content: center; }
  .hero-actions .btn.ghost {
    width: min(100%, 320px);
    min-height: 48px;
  }
  #btnRun2 { display: none; }
}

@media (max-width: 560px) {
  .shell {
    width: 100%;
    max-width: 100%;
    padding: 0 10px;
    box-sizing: border-box;
    margin: 0;
  }
  .hero { padding: 12px 0 18px; }
  .topbar { margin-bottom: 6px; }
  .pill { padding: 7px 10px; font-size: 11px; }
  .dedication {
    font-size: 11px;
    letter-spacing: .08em;
    max-width: 30ch;
    line-height: 1.45;
    margin-bottom: 6px;
  }
  .hero-brand { font-size: 2.6rem; margin: 2px 0 6px; }
  .eyebrow { font-size: 12px; letter-spacing: .1em; }
  .hero-sub {
    font-size: 12px;
    max-width: 26ch;
    margin-bottom: 8px;
  }
  .ornament { margin-bottom: 10px; max-width: 160px; }
  .simple-row, .controls { grid-template-columns: 1fr; }
  .hero-actions { flex-direction: column; }
  .hero-actions .btn { width: 100%; }
  .panel { padding: 14px; border-radius: 24px; margin-bottom: 12px; }
  .section-head h3 { font-size: 1.28rem; }
  .chapter { font-size: 10px; }

  .mascot-wrap {
    width: 112px;
    margin: 0 auto 4px;
    overflow: visible;
    text-align: center;
  }
  .mascot { width: 112px; height: 112px; margin: 0 auto; }
  .mascot-wrap::before { inset: 16% 14% 20%; }
  .speech {
    position: static;
    display: inline-block;
    margin: 0 auto 2px;
    right: auto;
    top: auto;
    transform: none;
    font-size: 10px;
    padding: 5px 10px;
    max-width: none;
    white-space: nowrap;
    border-radius: 12px;
  }

  .account-card {
    flex-direction: column;
    align-items: stretch;
    gap: 12px;
    padding: 14px;
    border-radius: 22px;
    max-width: none;
    margin-bottom: 14px;
  }
  .account-actions {
    width: 100% !important;
    display: block !important;
  }
  .account-actions .btn.tiny {
    display: block !important;
    width: 100% !important;
    min-height: 44px;
    font-size: 13px;
    text-align: center !important;
    padding: 12px 16px !important;
    letter-spacing: 0.08em;
  }
  .account-select {
    width: 100%;
    max-width: none;
    min-width: 0;
    font-size: 1.35rem;
    min-height: 46px;
  }
  .account-meta {
    font-size: 11px;
    line-height: 1.45;
    word-break: break-word;
  }
  .jewel.j2 { display: none; }

  .quick-chips {
    display: flex !important;
    flex-direction: column !important;
    flex-wrap: nowrap !important;
    gap: 6px !important;
    margin: 0 0 10px;
    width: 100% !important;
    max-width: 100% !important;
    box-sizing: border-box;
  }
  .quick-chips .chip {
    display: flex !important;
    visibility: visible !important;
    opacity: 1 !important;
    justify-content: center;
    align-items: center;
    min-height: 40px;
    width: 100% !important;
    max-width: 100% !important;
    padding: 9px 12px;
    font-size: 13px;
    box-sizing: border-box !important;
  }
  /* 小屏用完整文案，更清晰 */
  .quick-chips .chip-full { display: inline !important; }
  .quick-chips .chip-short { display: none !important; }

  .metric { padding: 12px 8px; border-radius: 18px; }
  .metric.big { padding: 14px 8px; }
  .metric.big strong { font-size: 1.45rem; }
  .metric strong { font-size: 1.2rem; }
  .metric label { font-size: 10px; margin-bottom: 4px; }
  .mini-stats { gap: 6px 10px; font-size: 11px; }

  #equityChart { height: 200px; }
  .table-wrap { max-height: 300px; border-radius: 16px; }
  th, td { padding: 10px 10px; font-size: 11px; }

  .footer {
    flex-direction: column;
    align-items: center;
    text-align: center;
    padding: 16px 4px 10px;
  }
  .footer-note span { max-width: 28ch; font-size: 11px; }
  .moon { width: 48px; height: 48px; top: 4%; right: 8px; opacity: .9; }
  .status-toast {
    bottom: calc(86px + var(--safe-b));
    width: min(92vw, 340px);
    font-size: 12px;
    padding: 11px 14px;
  }
  .dock {
    padding: 10px 14px calc(12px + var(--safe-b));
  }
  .dock-btn {
    min-height: 54px;
    font-size: 16px;
    letter-spacing: .03em;
  }
  .hero-actions .btn.miss { display: none; }
  .miss-fab { display: inline-flex; }
  .loading-card { width: min(88vw, 300px); padding: 26px 18px; }
  .modal { padding: 16px; align-items: end; }
  .modal-card {
    width: 100%;
    border-radius: 24px 24px 18px 18px;
    margin-bottom: calc(8px + var(--safe-b));
  }
  .modal-actions .btn { min-height: 44px; flex: 1; }
  .modal-actions { gap: 8px; }
  .bar-row { grid-template-columns: 56px 1fr 56px; font-size: 11px; }
}

@media (max-width: 380px) {
  .hero-brand { font-size: 2.55rem; }
  .chip { font-size: 12px; padding: 8px 4px; }
  .pill.soft { letter-spacing: -0.02em; }
  .account-meta { font-size: 10.5px; }
}