/* ==========================================================================
   译拍即合 Yipact v2 — Design Tokens (Light & Dark Themes)
   Google Clean Canvas + 4-Color Accent System + Apple Spring Motion
   ========================================================================== */

:root,
[data-theme="light"] {
  color-scheme: light;

  /* Pure Canvas & Elevated Surfaces */
  --bg-canvas: #ffffff;
  --bg-elevated: #ffffff;
  --bg-subtle: #f8f9fa;
  --bg-surface: #f1f3f4;
  --bg-surface-hover: #e8eaed;
  --bg-chat: #f5f7fa;
  --bg-chat-dot: rgba(31, 31, 31, 0.045);
  --bg-glass: rgba(255, 255, 255, 0.84);
  --bg-glass-strong: rgba(255, 255, 255, 0.94);
  --bg-backdrop: rgba(15, 23, 42, 0.28);
  --bg-scrim: rgba(15, 23, 42, 0.16);
  --bg-toast: rgba(31, 31, 31, 0.92);
  --ink-toast: #ffffff;
  --bg-tooltip: rgba(26, 29, 34, 0.96);
  --ink-tooltip: #f8f9fa;

  /* Ink / Typography Hierarchy */
  --ink-primary: #1f1f1f;
  --ink-secondary: #5f6368;
  --ink-tertiary: #80868b;
  --ink-disabled: #bdc1c6;
  --ink-inverse: #ffffff;

  /* Google 4-Color Tasteful Accent Palette */
  --g-blue: #4285f4;
  --g-blue-hover: #1a73e8;
  --g-blue-active: #1557b0;
  --g-blue-tint: #e8f0fe;
  --g-blue-tint-hover: #d9e7fd;
  --g-blue-tint-soft: #f1f6fe;
  --g-blue-deep: #174ea6;
  --g-blue-border: rgba(66, 133, 244, 0.22);

  --g-red: #ea4335;
  --g-red-hover: #d93025;
  --g-red-tint: #fce8e6;
  --g-red-deep: #b3261e;
  --g-red-border: rgba(234, 67, 53, 0.24);

  --g-yellow: #fbbc05;
  --g-yellow-tint: #fef7e0;
  --g-yellow-tint-hover: #fdefc3;
  --g-yellow-border: #fde293;
  --g-yellow-deep: #8a5300;

  --g-green: #34a853;
  --g-green-tint: #e6f4ea;
  --g-green-deep: #137333;
  --g-green-border: rgba(52, 168, 83, 0.26);

  /* Message Bubbles */
  --bubble-mine-bg: #e8f0fe;
  --bubble-mine-border: rgba(66, 133, 244, 0.18);
  --bubble-mine-ink: #162447;
  --bubble-peer-bg: #ffffff;
  --bubble-peer-border: rgba(31, 31, 31, 0.08);
  --bubble-peer-ink: #1f1f1f;
  --avatar-bg: linear-gradient(135deg, #e8f0fe 0%, #e6f4ea 100%);
  --avatar-dot-border: #ffffff;

  /* v2 Three Segment Annotation Kinds */
  /* 1. Professional Term (Bold + subtle chip hover) */
  --seg-term-bg: rgba(66, 133, 244, 0.07);
  --seg-term-bg-hover: rgba(66, 133, 244, 0.16);
  --seg-term-ink: #174ea6;

  /* 2. Special Phrase (Dashed underline + click explanation) */
  --seg-phrase-bg: transparent;
  --seg-phrase-bg-hover: rgba(66, 133, 244, 0.1);
  --seg-phrase-underline: rgba(26, 115, 232, 0.62);
  --seg-phrase-active-bg: rgba(66, 133, 244, 0.15);

  /* 3. Pre-meeting Doc Reference (Soft fluorescent yellow highlighter) */
  --seg-doc-bg: rgba(255, 232, 92, 0.56);
  --seg-doc-bg-hover: rgba(255, 221, 51, 0.82);
  --seg-doc-active-bg: rgba(251, 188, 5, 0.42);
  --seg-doc-ink: #2c2000;
  --seg-doc-border: rgba(217, 155, 0, 0.45);
  --memo-highlight-bg: #fef08a;
  --memo-highlight-ink: #1f2937;

  /* Borders & Hairlines */
  --border-hairline: rgba(31, 31, 31, 0.08);
  --border-subtle: rgba(31, 31, 31, 0.12);
  --border-strong: rgba(31, 31, 31, 0.18);
  --border-focus: rgba(66, 133, 244, 0.45);

  /* Shadows — Soft Layered Apple/Google Elevation */
  --shadow-xs: 0 1px 2px rgba(15, 23, 42, 0.05);
  --shadow-sm: 0 2px 8px rgba(15, 23, 42, 0.05), 0 1px 2px rgba(15, 23, 42, 0.04);
  --shadow-md: 0 8px 24px rgba(15, 23, 42, 0.08), 0 2px 6px rgba(15, 23, 42, 0.04);
  --shadow-lg: 0 20px 50px rgba(15, 23, 42, 0.14), 0 4px 14px rgba(15, 23, 42, 0.06);
  --shadow-blue: 0 6px 20px rgba(66, 133, 244, 0.28), 0 2px 6px rgba(66, 133, 244, 0.16);
  --shadow-pill: 0 8px 26px rgba(15, 23, 42, 0.16), 0 2px 6px rgba(15, 23, 42, 0.08);

  /* Home ambient gradients */
  --home-grad-1: rgba(66, 133, 244, 0.055);
  --home-grad-2: rgba(52, 168, 83, 0.045);
  --home-grad-3: rgba(251, 188, 5, 0.04);
  --composer-fade: linear-gradient(
    180deg,
    rgba(245, 247, 250, 0) 0%,
    rgba(245, 247, 250, 0.92) 30%,
    #f5f7fa 100%
  );
  --scrollbar-thumb: rgba(31, 31, 31, 0.15);
  --scrollbar-thumb-hover: rgba(31, 31, 31, 0.26);

  /* Radii */
  --radius-xs: 8px;
  --radius-sm: 12px;
  --radius-md: 16px;
  --radius-lg: 22px;
  --radius-xl: 28px;
  --radius-pill: 9999px;

  /* Typography */
  --font-sans: "Inter", "SF Pro Display", "SF Pro Text", "PingFang SC",
    "Hiragino Sans GB", "Microsoft YaHei UI", -apple-system, BlinkMacSystemFont,
    "Segoe UI", Roboto, sans-serif;
  --font-mono: "SF Mono", "JetBrains Mono", "Cascadia Code", ui-monospace,
    SFMono-Regular, Menlo, Consolas, monospace;

  --text-xs: 12px;
  --text-sm: 13.5px;
  --text-base: 15px;
  --text-md: 16px;
  --text-lg: 19px;
  --text-xl: 24px;
  --text-2xl: 34px;
  --text-hero: clamp(32px, 4.8vw, 48px);

  /* Spacing Scale */
  --space-1: 4px;
  --space-2: 8px;
  --space-3: 12px;
  --space-4: 16px;
  --space-5: 20px;
  --space-6: 24px;
  --space-8: 32px;
  --space-10: 40px;
  --space-12: 48px;

  /* Apple-Inspired Spring Motion Tokens */
  --ease-spring: cubic-bezier(0.22, 1, 0.36, 1);
  --ease-pop: cubic-bezier(0.34, 1.56, 0.64, 1);
  --ease-smooth: cubic-bezier(0.4, 0, 0.2, 1);
  --dur-fast: 150ms;
  --dur-base: 260ms;
  --dur-slow: 420ms;

  /* Layout Dimensions (v2 60/40 Split) */
  --header-height: 60px;
  --chat-left-ratio: 60%;
  --chat-right-ratio: 40%;
  --chat-max-width: 780px;
  --drawer-width: 410px;

  /* Z-Index Layers */
  --z-base: 1;
  --z-sticky: 20;
  --z-floating: 45;
  --z-popover: 55;
  --z-drawer: 65;
  --z-modal: 80;
  --z-toast: 100;
}

/* ==========================================================================
   Dark Theme Palette — Refined Obsidian / Slate (Apple + Google Material Dark)
   ========================================================================== */
[data-theme="dark"] {
  color-scheme: dark;

  --bg-canvas: #13161b;
  --bg-elevated: #1b1f26;
  --bg-subtle: #181c22;
  --bg-surface: #222730;
  --bg-surface-hover: #2b313d;
  --bg-chat: #0e1116;
  --bg-chat-dot: rgba(255, 255, 255, 0.04);
  --bg-glass: rgba(19, 22, 27, 0.84);
  --bg-glass-strong: rgba(22, 26, 32, 0.94);
  --bg-backdrop: rgba(0, 0, 0, 0.62);
  --bg-scrim: rgba(0, 0, 0, 0.45);
  --bg-toast: rgba(37, 42, 52, 0.96);
  --ink-toast: #f1f3f5;
  --bg-tooltip: rgba(34, 39, 48, 0.98);
  --ink-tooltip: #f1f3f5;

  --ink-primary: #eef1f5;
  --ink-secondary: #a4aebc;
  --ink-tertiary: #798394;
  --ink-disabled: #4e5665;
  --ink-inverse: #ffffff;

  --g-blue: #669df6;
  --g-blue-hover: #8ab4f8;
  --g-blue-active: #4285f4;
  --g-blue-tint: rgba(102, 157, 246, 0.18);
  --g-blue-tint-hover: rgba(102, 157, 246, 0.28);
  --g-blue-tint-soft: rgba(102, 157, 246, 0.11);
  --g-blue-deep: #aecbfa;
  --g-blue-border: rgba(102, 157, 246, 0.3);

  --g-red: #f28b82;
  --g-red-hover: #f6aea9;
  --g-red-tint: rgba(242, 139, 130, 0.15);
  --g-red-deep: #fad2cf;
  --g-red-border: rgba(242, 139, 130, 0.3);

  --g-yellow: #fdd663;
  --g-yellow-tint: rgba(253, 214, 99, 0.14);
  --g-yellow-tint-hover: rgba(253, 214, 99, 0.24);
  --g-yellow-border: rgba(253, 214, 99, 0.32);
  --g-yellow-deep: #fde293;

  --g-green: #81c995;
  --g-green-tint: rgba(129, 201, 149, 0.15);
  --g-green-deep: #a8dab5;
  --g-green-border: rgba(129, 201, 149, 0.3);

  --bubble-mine-bg: rgba(66, 133, 244, 0.22);
  --bubble-mine-border: rgba(102, 157, 246, 0.28);
  --bubble-mine-ink: #eaf1ff;
  --bubble-peer-bg: #1b1f27;
  --bubble-peer-border: rgba(255, 255, 255, 0.08);
  --bubble-peer-ink: #eef1f5;
  --avatar-bg: linear-gradient(135deg, rgba(102, 157, 246, 0.24) 0%, rgba(129, 201, 149, 0.22) 100%);
  --avatar-dot-border: #161a20;

  /* Dark-mode three segment kinds (refined, luminous, never glaring) */
  --seg-term-bg: rgba(102, 157, 246, 0.15);
  --seg-term-bg-hover: rgba(102, 157, 246, 0.27);
  --seg-term-ink: #a8c7fa;

  --seg-phrase-bg: transparent;
  --seg-phrase-bg-hover: rgba(138, 180, 248, 0.15);
  --seg-phrase-underline: rgba(138, 180, 248, 0.72);
  --seg-phrase-active-bg: rgba(138, 180, 248, 0.22);

  --seg-doc-bg: rgba(251, 188, 5, 0.24);
  --seg-doc-bg-hover: rgba(251, 188, 5, 0.36);
  --seg-doc-active-bg: rgba(251, 188, 5, 0.42);
  --seg-doc-ink: #fff4cc;
  --seg-doc-border: rgba(253, 214, 99, 0.48);
  --memo-highlight-bg: rgba(251, 188, 5, 0.31);
  --memo-highlight-ink: #fff4ce;

  --border-hairline: rgba(255, 255, 255, 0.08);
  --border-subtle: rgba(255, 255, 255, 0.13);
  --border-strong: rgba(255, 255, 255, 0.22);
  --border-focus: rgba(102, 157, 246, 0.55);

  --shadow-xs: 0 1px 2px rgba(0, 0, 0, 0.28);
  --shadow-sm: 0 2px 10px rgba(0, 0, 0, 0.32), 0 1px 2px rgba(0, 0, 0, 0.24);
  --shadow-md: 0 10px 28px rgba(0, 0, 0, 0.42), 0 2px 8px rgba(0, 0, 0, 0.26);
  --shadow-lg: 0 24px 60px rgba(0, 0, 0, 0.58), 0 6px 18px rgba(0, 0, 0, 0.36);
  --shadow-blue: 0 6px 22px rgba(66, 133, 244, 0.32), 0 2px 6px rgba(0, 0, 0, 0.28);
  --shadow-pill: 0 10px 30px rgba(0, 0, 0, 0.5), 0 2px 8px rgba(0, 0, 0, 0.32);

  --home-grad-1: rgba(66, 133, 244, 0.11);
  --home-grad-2: rgba(52, 168, 83, 0.08);
  --home-grad-3: rgba(251, 188, 5, 0.06);
  --composer-fade: linear-gradient(
    180deg,
    rgba(14, 17, 22, 0) 0%,
    rgba(14, 17, 22, 0.92) 30%,
    #0e1116 100%
  );
  --scrollbar-thumb: rgba(255, 255, 255, 0.16);
  --scrollbar-thumb-hover: rgba(255, 255, 255, 0.28);
}

/* Base Reset & Crisp Rendering */
*,
*::before,
*::after {
  box-sizing: border-box;
}

html,
body {
  margin: 0;
  padding: 0;
  height: 100%;
  background: var(--bg-canvas);
  color: var(--ink-primary);
  font-family: var(--font-sans);
  font-size: var(--text-base);
  line-height: 1.55;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  text-rendering: optimizeLegibility;
}

body {
  overflow: hidden;
}

button,
input,
select,
textarea {
  font-family: inherit;
  font-size: inherit;
  color: inherit;
}

button {
  cursor: pointer;
  border: none;
  background: none;
  padding: 0;
}

button:disabled {
  cursor: not-allowed;
  opacity: 0.55;
}

a {
  color: var(--g-blue);
  text-decoration: none;
}

[hidden] {
  display: none !important;
}

/* Defensive baseline so no SVG icon ever renders unconstrained (zero specificity) */
:where(svg.yipact-icon) {
  width: 16px;
  height: 16px;
  flex-shrink: 0;
  display: inline-block;
  vertical-align: middle;
}

/* Custom Subtle Scrollbars */
::-webkit-scrollbar {
  width: 6px;
  height: 6px;
}

::-webkit-scrollbar-track {
  background: transparent;
}

::-webkit-scrollbar-thumb {
  background: var(--scrollbar-thumb);
  border-radius: var(--radius-pill);
}

::-webkit-scrollbar-thumb:hover {
  background: var(--scrollbar-thumb-hover);
}

/* App Shell */
.app-shell {
  position: relative;
  width: 100%;
  height: 100%;
  overflow: hidden;
  background: var(--bg-canvas);
}

.view-layer {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  display: flex;
  flex-direction: column;
  opacity: 0;
  pointer-events: none;
  transform: translateY(10px) scale(0.992);
  transition: opacity var(--dur-base) var(--ease-spring),
    transform var(--dur-slow) var(--ease-spring);
}

.view-layer.is-active {
  opacity: 1;
  pointer-events: auto;
  transform: translateY(0) scale(1);
}

/* Reusable Crisp Buttons */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 7px;
  height: 42px;
  padding: 0 18px;
  border-radius: var(--radius-pill);
  font-size: var(--text-sm);
  font-weight: 500;
  letter-spacing: -0.005em;
  white-space: nowrap;
  user-select: none;
  transition: background var(--dur-fast) var(--ease-smooth),
    color var(--dur-fast) var(--ease-smooth),
    border-color var(--dur-fast) var(--ease-smooth),
    box-shadow var(--dur-base) var(--ease-spring),
    transform var(--dur-fast) var(--ease-spring);
}

.btn:active:not(:disabled) {
  transform: scale(0.968);
}

.btn svg {
  width: 16px;
  height: 16px;
  flex-shrink: 0;
}

.btn-primary {
  background: var(--g-blue);
  color: var(--ink-inverse);
  box-shadow: var(--shadow-blue);
}

.btn-primary:hover:not(:disabled) {
  background: var(--g-blue-hover);
  transform: translateY(-1px);
}

.btn-secondary {
  background: var(--bg-elevated);
  color: var(--ink-primary);
  border: 1px solid var(--border-subtle);
  box-shadow: var(--shadow-xs);
}

.btn-secondary:hover:not(:disabled) {
  background: var(--bg-surface);
  border-color: var(--border-strong);
}

.btn-tonal {
  background: var(--g-blue-tint);
  color: var(--g-blue-deep);
}

.btn-tonal:hover:not(:disabled) {
  background: var(--g-blue-tint-hover);
}

.btn-ghost {
  background: transparent;
  color: var(--ink-secondary);
}

.btn-ghost:hover:not(:disabled) {
  background: var(--bg-surface);
  color: var(--ink-primary);
}

.btn-danger-ghost {
  background: transparent;
  color: var(--g-red);
}

.btn-danger-ghost:hover:not(:disabled) {
  background: var(--g-red-tint);
  color: var(--g-red-deep);
}

.btn-sm {
  height: 34px;
  padding: 0 13px;
  font-size: 13px;
}

.btn-xs {
  height: 28px;
  padding: 0 10px;
  font-size: 12px;
}

.btn-icon {
  width: 36px;
  height: 36px;
  padding: 0;
  border-radius: var(--radius-pill);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  color: var(--ink-secondary);
  transition: background var(--dur-fast) var(--ease-smooth),
    color var(--dur-fast) var(--ease-smooth),
    transform var(--dur-fast) var(--ease-spring);
}

.btn-icon:hover:not(:disabled) {
  background: var(--bg-surface);
  color: var(--ink-primary);
}

.btn-icon:active:not(:disabled) {
  transform: scale(0.93);
}

.btn-icon svg {
  width: 18px;
  height: 18px;
  flex-shrink: 0;
}

/* Form Controls */
.field-group {
  display: flex;
  flex-direction: column;
  gap: 7px;
}

.field-label {
  font-size: 13px;
  font-weight: 500;
  color: var(--ink-primary);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
}

.field-hint {
  font-size: 12px;
  font-weight: 400;
  color: var(--ink-tertiary);
}

.input,
.select,
.textarea {
  width: 100%;
  padding: 0 14px;
  border-radius: var(--radius-sm);
  border: 1px solid var(--border-subtle);
  background: var(--bg-elevated);
  color: var(--ink-primary);
  font-size: 14.5px;
  outline: none;
  transition: border-color var(--dur-fast) var(--ease-smooth),
    box-shadow var(--dur-fast) var(--ease-smooth),
    background var(--dur-fast) var(--ease-smooth);
}

.input,
.select {
  height: 44px;
}

.textarea {
  min-height: 120px;
  padding: 11px 14px;
  line-height: 1.55;
  resize: vertical;
}

.input:hover,
.select:hover,
.textarea:hover {
  border-color: var(--border-strong);
}

.input:focus,
.select:focus,
.textarea:focus {
  border-color: var(--g-blue);
  box-shadow: 0 0 0 3.5px rgba(66, 133, 244, 0.16);
}

.input::placeholder,
.textarea::placeholder {
  color: var(--ink-tertiary);
}

.select-wrap {
  position: relative;
  display: block;
  width: 100%;
}

select,
select.select,
.select {
  -webkit-appearance: none;
  -moz-appearance: none;
  appearance: none;
  background-color: var(--bg-elevated);
  background-image: none;
}

select::-ms-expand,
.select::-ms-expand {
  display: none;
}

select::picker-icon {
  display: none;
}

.select {
  padding-right: 40px;
  cursor: pointer;
}

.select-chevron {
  position: absolute;
  right: 13px;
  top: 50%;
  transform: translateY(-50%);
  pointer-events: none;
  color: var(--ink-secondary);
  display: flex;
  align-items: center;
  justify-content: center;
}

.select-chevron svg {
  width: 16px;
  height: 16px;
  flex-shrink: 0;
}

/* Apple-Style Segmented Control (Theme Switcher / Mobile Tabs) */
.segmented-control {
  display: grid;
  grid-auto-flow: column;
  grid-auto-columns: 1fr;
  gap: 4px;
  padding: 4px;
  border-radius: 13px;
  background: var(--bg-surface);
  border: 1px solid var(--border-hairline);
}

.segmented-option {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  height: 34px;
  padding: 0 10px;
  border-radius: 9px;
  font-size: 13px;
  font-weight: 550;
  color: var(--ink-secondary);
  transition: background var(--dur-base) var(--ease-spring),
    color var(--dur-fast) var(--ease-smooth),
    box-shadow var(--dur-base) var(--ease-spring),
    transform var(--dur-fast) var(--ease-spring);
}

.segmented-option:hover:not(.is-active) {
  color: var(--ink-primary);
}

.segmented-option.is-active {
  background: var(--bg-elevated);
  color: var(--ink-primary);
  box-shadow: var(--shadow-sm);
}

.segmented-option:active {
  transform: scale(0.97);
}

.segmented-option svg {
  width: 15px;
  height: 15px;
  flex-shrink: 0;
}

/* Standalone Apple-Style Language Switcher Button & Popover */
.lang-trigger-btn {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  height: 34px;
  padding: 0 11px;
  border-radius: var(--radius-pill);
  background: var(--bg-subtle);
  border: 1px solid var(--border-hairline);
  font-size: 12.5px;
  font-weight: 550;
  color: var(--ink-primary);
  white-space: nowrap;
  transition: background var(--dur-fast) var(--ease-smooth),
    border-color var(--dur-fast) var(--ease-smooth),
    transform var(--dur-fast) var(--ease-spring);
}

.lang-trigger-btn:hover {
  background: var(--bg-surface);
  border-color: var(--border-subtle);
}

.lang-trigger-btn:active {
  transform: scale(0.96);
}

.lang-trigger-btn.is-open {
  border-color: var(--g-blue);
  background: var(--g-blue-tint-soft);
}

.lang-trigger-btn svg {
  width: 14px;
  height: 14px;
  flex-shrink: 0;
}

.lang-trigger-btn .lang-globe-icon {
  color: var(--g-blue);
}

.lang-trigger-btn .lang-chev-icon {
  color: var(--ink-tertiary);
  transition: transform var(--dur-fast) var(--ease-spring);
}

.lang-trigger-btn.is-open .lang-chev-icon {
  transform: rotate(180deg);
  color: var(--g-blue);
}

.lang-popover {
  position: fixed;
  z-index: var(--z-popover);
  min-width: 210px;
  max-width: 260px;
  max-height: min(360px, 72vh);
  overflow-y: auto;
  padding: 6px;
  border-radius: var(--radius-md);
  background: var(--bg-glass-strong);
  backdrop-filter: blur(22px) saturate(180%);
  border: 1px solid var(--border-subtle);
  box-shadow: var(--shadow-lg);
  animation: pillPop 200ms var(--ease-spring) both;
}

.lang-popover-head {
  padding: 6px 10px 5px;
  font-size: 11px;
  font-weight: 600;
  color: var(--ink-tertiary);
  letter-spacing: 0.03em;
}

.lang-popover-item {
  width: 100%;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  padding: 8px 10px;
  border-radius: 10px;
  font-size: 13.5px;
  font-weight: 500;
  color: var(--ink-primary);
  text-align: left;
  transition: background var(--dur-fast), color var(--dur-fast);
}

.lang-popover-item:hover {
  background: var(--bg-surface);
}

.lang-popover-item.is-selected {
  background: var(--g-blue-tint-soft);
  color: var(--g-blue-deep);
  font-weight: 600;
}

.lang-item-left {
  display: flex;
  align-items: center;
  gap: 9px;
  min-width: 0;
}

.lang-item-glyph {
  width: 24px;
  height: 24px;
  border-radius: 7px;
  background: var(--bg-surface);
  color: var(--ink-secondary);
  font-size: 11px;
  font-weight: 700;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

.lang-popover-item.is-selected .lang-item-glyph {
  background: var(--g-blue-tint);
  color: var(--g-blue-deep);
}

.lang-popover-item svg {
  width: 15px;
  height: 15px;
  color: var(--g-blue);
  flex-shrink: 0;
}

/* Status Dots */
.status-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  flex-shrink: 0;
  display: inline-block;
}

.status-dot.green {
  background: var(--g-green);
  box-shadow: 0 0 0 3px rgba(52, 168, 83, 0.16);
}

.status-dot.yellow {
  background: var(--g-yellow);
  box-shadow: 0 0 0 3px rgba(251, 188, 5, 0.2);
}

.status-dot.red {
  background: var(--g-red);
  box-shadow: 0 0 0 3px rgba(234, 67, 53, 0.16);
}

.status-dot.blue {
  background: var(--g-blue);
  box-shadow: 0 0 0 3px rgba(66, 133, 244, 0.16);
}

/* Global Toast System */
.toast-container {
  position: fixed;
  top: 18px;
  left: 50%;
  transform: translateX(-50%);
  z-index: var(--z-toast);
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
  pointer-events: none;
  max-width: calc(100vw - 32px);
}

.toast {
  display: inline-flex;
  align-items: center;
  gap: 9px;
  padding: 10px 18px;
  border-radius: var(--radius-pill);
  background: var(--bg-toast);
  backdrop-filter: blur(16px);
  color: var(--ink-toast);
  border: 1px solid rgba(255, 255, 255, 0.08);
  font-size: 13.5px;
  font-weight: 500;
  box-shadow: var(--shadow-pill);
  pointer-events: auto;
  animation: toastEnter 320ms var(--ease-pop) both;
}

.toast.is-leaving {
  animation: toastExit 220ms var(--ease-smooth) forwards;
}

.toast-dot {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: var(--g-blue);
  flex-shrink: 0;
}

.toast.toast-success .toast-dot {
  background: var(--g-green);
}

.toast.toast-error .toast-dot {
  background: var(--g-red);
}

.toast.toast-warning .toast-dot {
  background: var(--g-yellow);
}

/* Brand Logo Lockup */
.brand-lockup {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  user-select: none;
}

.brand-mark {
  width: 34px;
  height: 34px;
  border-radius: 11px;
  background: var(--bg-elevated);
  border: 1px solid var(--border-hairline);
  box-shadow: var(--shadow-xs);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

.brand-mark svg {
  width: 22px;
  height: 22px;
  flex-shrink: 0;
}

.brand-text {
  display: flex;
  align-items: baseline;
  gap: 7px;
}

.brand-cn {
  font-size: 17px;
  font-weight: 650;
  letter-spacing: -0.02em;
  color: var(--ink-primary);
}

.brand-en {
  font-size: 13px;
  font-weight: 500;
  color: var(--ink-secondary);
  letter-spacing: 0.01em;
}
