:root {
  color-scheme: light;
  --mint: #35d6c2;
  --mint-deep: #0aa690;
  --mint-soft: #d9faf3;
  --violet: #7b61ff;
  --violet-soft: #eeeaff;
  --coral: #ff8066;
  --coral-soft: #fff0eb;
  --yellow: #f5c84c;
  --yellow-soft: #fff8db;
  --ink: #18213a;
  --ink-soft: #39435e;
  --muted: #76809a;
  --line: rgba(64, 82, 118, .14);
  --panel: rgba(255, 255, 255, .76);
  --panel-solid: #fff;
  --canvas: #f3f8fa;
  --shadow: 0 24px 70px rgba(45, 72, 102, .12);
  --shadow-soft: 0 12px 36px rgba(45, 72, 102, .08);
  --radius-xl: 30px;
  --radius-lg: 22px;
  --radius-md: 16px;
  --radius-sm: 11px;
  --font: "Source Han Sans SC", "Noto Sans CJK SC", "PingFang SC", system-ui, sans-serif;
  --ease: cubic-bezier(.2, .75, .25, 1);
}

* { box-sizing: border-box; }
html { min-width: 320px; background: var(--canvas); scroll-behavior: smooth; }
body { margin: 0; min-height: 100vh; color: var(--ink); font: 15px/1.6 var(--font); overflow-x: hidden; }
button, input, select, textarea { font: inherit; }
button { color: inherit; }
button, [role="button"] { -webkit-tap-highlight-color: transparent; }
button:focus-visible, input:focus-visible, select:focus-visible, textarea:focus-visible { outline: 3px solid rgba(53, 214, 194, .35); outline-offset: 2px; }
button:disabled { cursor: not-allowed; opacity: .45; }
a { color: var(--mint-deep); }
h1, h2, h3, h4, p { margin-top: 0; }
strong, b { font-weight: 720; }

#ambient-canvas { position: fixed; inset: 0; width: 100%; height: 100%; pointer-events: none; z-index: -2; background: radial-gradient(circle at 15% 12%, rgba(53, 214, 194, .13), transparent 28%), radial-gradient(circle at 86% 18%, rgba(123, 97, 255, .12), transparent 30%), linear-gradient(145deg, #fbfdfd 0%, #f1f8f8 54%, #f8f6ff 100%); }
.app-shell { min-height: 100vh; }
.screen { display: none; min-height: 100vh; animation: screen-in .38s var(--ease); }
.screen.is-active { display: block; }
.is-hidden { display: none !important; }
.noscript { margin: 0; padding: 16px; background: var(--coral-soft); text-align: center; }

@keyframes screen-in { from { opacity: 0; transform: translateY(8px); } to { opacity: 1; transform: none; } }
@keyframes breathe { 50% { transform: scale(1.025); opacity: .84; } }
@keyframes orbit { to { transform: rotate(360deg); } }
@keyframes toast-in { from { opacity: 0; transform: translate(-50%, 12px); } to { opacity: 1; transform: translate(-50%, 0); } }

.eyebrow { margin-bottom: 8px; color: var(--mint-deep); font-size: 12px; font-weight: 750; letter-spacing: .15em; text-transform: uppercase; }
.eyebrow > span { display: inline-block; width: 22px; height: 2px; margin-right: 8px; vertical-align: middle; background: var(--mint); }
.panel { background: var(--panel); border: 1px solid rgba(255, 255, 255, .92); border-radius: var(--radius-lg); box-shadow: var(--shadow-soft); backdrop-filter: blur(20px); }
.panel-title { display: flex; align-items: center; justify-content: space-between; gap: 12px; }
.panel-title h3 { margin: 0; font-size: 15px; }

.primary-button, .secondary-button, .quiet-button, .icon-button, .tiny-button { border: 0; cursor: pointer; transition: transform .2s var(--ease), background .2s, box-shadow .2s, color .2s; }
.primary-button:hover, .secondary-button:hover, .quiet-button:hover, .icon-button:hover { transform: translateY(-2px); }
.primary-button { padding: 11px 20px; color: #fff; background: linear-gradient(135deg, var(--mint-deep), var(--mint)); border-radius: 999px; box-shadow: 0 12px 25px rgba(10, 166, 144, .22); font-weight: 720; }
.primary-button:hover { box-shadow: 0 16px 32px rgba(10, 166, 144, .3); }
.secondary-button { padding: 11px 20px; color: var(--violet); background: rgba(255,255,255,.82); border: 1px solid rgba(123,97,255,.2); border-radius: 999px; font-weight: 720; }
.quiet-button { padding: 9px 14px; color: var(--ink-soft); background: rgba(255,255,255,.58); border-radius: 999px; }
.icon-button { width: 44px; height: 44px; background: rgba(255,255,255,.7); border-radius: 50%; font-size: 20px; }
.tiny-button { padding: 4px 9px; color: var(--muted); background: rgba(237,243,246,.8); border-radius: 999px; font-size: 11px; }
.large { min-width: 148px; padding: 14px 24px; }
.danger-button { color: #b33838; background: #fff1f1; }

.tag, .delta-chip, .soft-chip { display: inline-flex; align-items: center; gap: 5px; padding: 5px 9px; border-radius: 999px; font-size: 11px; font-weight: 680; }
.tag { color: var(--violet); background: var(--violet-soft); }
.soft-chip { color: var(--ink-soft); background: #edf3f5; }
.delta-chip.positive { color: #067b68; background: var(--mint-soft); }
.delta-chip.negative { color: #bd4b39; background: var(--coral-soft); }
.delta-chip.neutral { color: #6550c9; background: var(--violet-soft); }

.modal-root { position: fixed; inset: 0; z-index: 100; pointer-events: none; }
.modal-root.is-open { pointer-events: auto; }
.modal-backdrop { display: grid; place-items: center; width: 100%; height: 100%; padding: 20px; background: rgba(24, 33, 58, .28); backdrop-filter: blur(10px); }
.modal-card { width: min(760px, 100%); max-height: min(82vh, 860px); overflow: auto; padding: 24px; background: rgba(255,255,255,.96); border: 1px solid rgba(255,255,255,.9); border-radius: var(--radius-xl); box-shadow: var(--shadow); animation: screen-in .3s var(--ease); }
.modal-header { display: flex; justify-content: space-between; align-items: flex-start; gap: 20px; margin-bottom: 20px; }
.modal-header h2 { margin: 0; font-size: 23px; }
.modal-close { flex: 0 0 auto; }

.toast-root { position: fixed; inset: auto 0 24px; z-index: 150; pointer-events: none; }
.toast { position: relative; left: 50%; width: max-content; max-width: calc(100% - 32px); padding: 11px 17px; color: #fff; background: rgba(24,33,58,.92); border-radius: 999px; box-shadow: var(--shadow-soft); animation: toast-in .3s var(--ease); }

.empty-state { padding: 36px 20px; color: var(--muted); text-align: center; }
.empty-state b { display: block; margin-bottom: 5px; color: var(--ink); font-size: 17px; }
.sr-only { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0,0,0,0); white-space: nowrap; border: 0; }

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { scroll-behavior: auto !important; animation-duration: .001ms !important; animation-iteration-count: 1 !important; transition-duration: .001ms !important; }
}
