:root {
  --surface: #ffffff;
  --bg-soft: #f8fafc;
  --bg-muted: #f4f4f5;
  --text: #0f172a;
  --text-secondary: #475569;
  --muted: #64748b;
  --primary: #2563eb;
  --primary-hover: #1d4ed8;
  --primary-soft: #eff6ff;
  --ring: #93c5fd;
  --border: #e4e4e7;
  --border-strong: #cbd5e1;
  --danger: #991b1b;
  --danger-bg: #fee2e2;
  --warning: #b45309;
  --on-primary: #ffffff;

  --bg: var(--surface);
  --bg-page: var(--surface);
  --card: var(--surface);
  --accent: var(--primary);
  --input: var(--border);
  --radius: 10px;
  --radius-lg: 16px;
  --space: 16px;
  --font: "Outfit", system-ui, sans-serif;
  --shadow-card: 0 12px 40px -16px rgba(15, 23, 42, 0.18);
  --shadow-subtle: 0 1px 2px rgba(15, 23, 42, 0.05);
  --shadow-tool: 0 20px 50px -24px rgba(15, 23, 42, 0.22), 0 0 0 1px rgba(15, 23, 42, 0.04);
}


*,
*::before,
*::after {
  box-sizing: border-box;
}

html {
  font-size: 16px;
  scroll-behavior: smooth;
}

body {
  margin: 0;
  font-family: var(--font);
  line-height: 1.6;
  color: var(--text);
  background: var(--bg);
  -webkit-font-smoothing: antialiased;
  font-feature-settings: "ss01";
}

body.hv-studio {
  min-height: 100vh;
  background: var(--bg-page);
}

.skip {
  position: absolute;
  left: -9999px;
  top: 0;
  padding: 8px 16px;
  background: var(--primary);
  color: var(--surface);
  z-index: 100;
}

.skip:focus {
  left: var(--space);
  top: var(--space);
}

.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;
}

.wrap {
  width: min(72rem, 100% - 32px);
  margin-inline: auto;
}

.hv-hero .wrap {
  width: min(68rem, 100% - 32px);
}

.scroll-mt-20 {
  scroll-margin-top: 5rem;
}

.site-header {
  background: rgba(255, 255, 255, 0.92);
  backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--border);
  box-shadow: var(--shadow-subtle);
  position: sticky;
  top: 0;
  z-index: 20;
}

.header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  min-height: 56px;
  gap: var(--space);
}

.brand {
  display: flex;
  align-items: center;
  gap: 10px;
  text-decoration: none;
  color: var(--text);
  font-weight: 600;
  transition: opacity 0.15s ease;
}

.brand:hover {
  opacity: 0.92;
}

.brand-mark {
  flex-shrink: 0;
  width: 32px;
  height: 32px;
  border-radius: 8px;
  display: grid;
  place-items: center;
  background: var(--bg-soft);
  box-shadow: 0 0 0 1px rgba(24, 24, 27, 0.12);
  transition: transform 0.15s ease;
}

.brand:hover .brand-mark {
  transform: scale(1.04);
}

.brand-mark .gf-site-icon,
.brand-mark img {
  display: block;
  width: 32px;
  height: 32px;
  border-radius: 6px;
}

.brand-text {
  font-weight: 600;
  font-size: 1rem;
  letter-spacing: 0.02em;
}

.site-nav a {
  color: var(--muted);
  text-decoration: none;
  font-weight: 600;
  font-size: 13px;
  padding: 6px 10px;
  border-radius: var(--radius);
}

.site-nav a:hover {
  color: var(--text);
  background: var(--bg-soft);
}

.site-footer {
  margin-top: 64px;
  padding: 32px 0 48px;
  border-top: 1px solid var(--border);
  background: var(--bg);
}

.footer-inner {
  text-align: center;
}

.footer-tag {
  color: var(--muted);
  margin: 0 0 12px;
  font-size: 14px;
}

.footer-nav {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 16px;
  margin-bottom: 16px;
}

.footer-nav a {
  color: var(--muted);
  font-size: 14px;
  text-decoration: none;
}

.footer-nav a:hover {
  color: var(--text);
}

.footer-copy {
  margin: 0;
  font-size: 12px;
  color: var(--muted);
}

.hv-hero {
  padding: 0.85rem 0 1.25rem;
  max-height: none;
  overflow: visible;
}

.hv-hero-wrap {
  display: flex;
  flex-direction: column;
  gap: 0.65rem;
  min-height: 0;
  max-height: none;
}

.hv-hero-intro {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  justify-content: center;
  gap: 0.35rem 0.75rem;
  text-align: center;
  margin: 0;
  padding: 0;
}

.hv-hero-title {
  margin: 0;
  font-size: clamp(1.25rem, 2.4vw, 1.5rem);
  font-weight: 700;
  letter-spacing: -0.03em;
  line-height: 1.2;
  color: var(--text);
}

.hv-hero-lead {
  margin: 0;
  font-size: 0.9375rem;
  font-weight: 400;
  line-height: 1.4;
  color: var(--muted);
}

.hv-hero-lead::before {
  content: "— ";
  color: var(--muted);
}

.hv-hero-peer {
  margin: 0.35rem 0 0;
  font-size: 0.8125rem;
  line-height: 1.45;
  text-align: center;
  color: var(--muted);
}

.hv-hero-peer a {
  color: var(--muted);
  font-weight: 500;
  text-decoration: none;
}

.hv-hero-peer a:hover {
  color: var(--primary);
  text-decoration: underline;
  text-underline-offset: 2px;
}

#hv-tool.hv-workspace {
  flex: 0 1 auto;
  min-height: 0;
  display: flex;
  flex-direction: column;
  gap: 0;
  overflow: visible;
  margin-top: 0;
}

.hv-tool-topbar {
  display: flex;
  flex-direction: column;
  gap: 6px;
  padding: 10px 12px 12px;
  border-bottom: 1px solid var(--border);
  background: var(--bg);
  flex-shrink: 0;
}

.hv-tool-topbar > .hv-tool-topbar-label {
  display: block;
  margin: 0 0 2px;
}

.hv-face-wrap {
  display: flex;
  align-items: center;
  gap: 6px;
  min-width: 0;
}

.hv-face-rail {
  display: flex;
  gap: 8px;
  flex: 1;
  min-width: 0;
  overflow-x: auto;
  overflow-y: hidden;
  scroll-behavior: smooth;
  scrollbar-width: none;
  padding: 2px 0;
}

.hv-face-rail::-webkit-scrollbar {
  display: none;
}

.hv-face-nav {
  flex: 0 0 auto;
  width: 28px;
  height: 28px;
  border-radius: 999px;
  border: 1px solid var(--border);
  background: var(--surface);
  color: var(--text-secondary);
  cursor: pointer;
  font-size: 18px;
  line-height: 1;
  padding: 0;
}

.hv-face-nav:hover {
  border-color: var(--border-strong);
  background: var(--bg-soft);
}

.hv-face {
  flex: 0 0 auto;
  width: 84px;
  border: 1px solid var(--border);
  background: var(--surface);
  border-radius: 12px;
  padding: 5px 5px 7px;
  cursor: pointer;
  text-align: center;
  font: inherit;
  color: inherit;
}

.hv-face:hover {
  border-color: var(--ring);
  background: var(--bg-soft);
}

.hv-face-art {
  display: block;
  height: 64px;
  border-radius: 8px;
  overflow: hidden;
}

.hv-face-art svg {
  display: block;
  width: 100%;
  height: 100%;
}

.hv-face-name {
  display: block;
  margin-top: 5px;
  font-size: 12px;
  font-weight: 650;
  line-height: 1.2;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.hv-face-h {
  display: block;
  margin-top: 1px;
  font-size: 12px;
  font-weight: 500;
  line-height: 1.2;
  color: var(--muted);
  white-space: nowrap;
}

.hv-face-note {
  margin: 0;
  font-size: 12px;
  color: var(--warning);
}

.hv-quick-menu > summary.hv-canvas-btn {
  font-weight: 650;
  border-color: var(--border);
  background: linear-gradient(180deg, var(--surface) 0%, var(--bg-soft) 100%);
}

.hv-quick-menu[open] > summary.hv-canvas-btn {
  border-color: var(--ring);
  background: var(--primary-soft);
  color: var(--primary);
  box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.12);
}

.hv-quick-menu .hv-canvas-menu-body {
  left: 0;
  right: auto;
  min-width: min(24rem, 94vw);
  max-width: 27rem;
  max-height: min(58vh, 22.5rem);
  overflow: auto;
  padding: 12px 12px 14px;
  gap: 10px;
  border-radius: 14px;
  border-color: var(--border);
  box-shadow:
    0 4px 6px -1px rgba(15, 23, 42, 0.06),
    0 16px 32px -8px rgba(15, 23, 42, 0.14);
  scrollbar-width: thin;
  scrollbar-color: var(--border-strong) transparent;
}

.hv-quick-menu-lead {
  margin: 0;
  padding: 0 2px 2px;
  font-size: 12px;
  line-height: 1.4;
  color: var(--muted);
}

.hv-quick-block + .hv-quick-block {
  padding-top: 10px;
  border-top: 1px solid var(--bg-muted);
}

.hv-quick-block-title {
  margin: 0 0 8px;
  padding: 0 2px;
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--muted);
}

.hv-quick-scenes {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 8px;
}

.hv-quick-scene {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 6px 8px 6px 6px;
  min-height: 52px;
  border: 1px solid color-mix(in srgb, var(--hv-ink) 18%, var(--border));
  border-radius: 12px;
  background: linear-gradient(135deg, var(--hv-tint) 0%, var(--surface) 72%);
  font: inherit;
  color: inherit;
  cursor: pointer;
  text-align: left;
  transition:
    border-color 0.15s ease,
    box-shadow 0.15s ease,
    transform 0.12s ease;
}

.hv-quick-scene:hover {
  border-color: color-mix(in srgb, var(--hv-ink) 42%, var(--ring));
  box-shadow: 0 4px 12px color-mix(in srgb, var(--hv-ink) 12%, transparent);
  transform: translateY(-1px);
}

.hv-quick-scene:active {
  transform: translateY(0);
}

.hv-quick-scene-art {
  flex: 0 0 40px;
  width: 40px;
  height: 44px;
  border-radius: 8px;
  overflow: hidden;
  background: color-mix(in srgb, var(--hv-tint) 55%, var(--surface));
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.65);
}

.hv-quick-scene-art svg {
  display: block;
  width: 100%;
  height: 100%;
}

.hv-quick-scene-text {
  display: flex;
  flex-direction: column;
  gap: 2px;
  min-width: 0;
}

.hv-quick-scene-label {
  font-size: 12px;
  font-weight: 700;
  line-height: 1.2;
  color: var(--text);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.hv-quick-scene-sub {
  font-size: 12px;
  font-weight: 600;
  line-height: 1.2;
  color: color-mix(in srgb, var(--hv-ink) 65%, var(--muted));
}

.hv-quick-people {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}

.hv-quick-pill {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  max-width: 100%;
  padding: 5px 10px 5px 8px;
  border: 1px solid color-mix(in srgb, var(--hv-ink) 14%, var(--border));
  border-radius: 999px;
  background: linear-gradient(180deg, var(--surface) 0%, var(--hv-tint) 140%);
  font: inherit;
  color: inherit;
  cursor: pointer;
  transition:
    border-color 0.15s ease,
    background 0.15s ease,
    box-shadow 0.15s ease;
}

.hv-quick-pill:hover {
  border-color: color-mix(in srgb, var(--hv-ink) 35%, var(--ring));
  background: var(--hv-tint);
  box-shadow: 0 2px 8px color-mix(in srgb, var(--hv-ink) 10%, transparent);
}

.hv-quick-pill-dot {
  flex: 0 0 auto;
  width: 8px;
  height: 8px;
  border-radius: 999px;
  background: var(--hv-ink);
  box-shadow: 0 0 0 2px color-mix(in srgb, var(--hv-ink) 20%, var(--surface));
}

.hv-quick-pill-name {
  font-size: 12px;
  font-weight: 650;
  line-height: 1.2;
  color: var(--text);
}

.hv-quick-pill-h {
  font-size: 12px;
  font-weight: 600;
  line-height: 1.2;
  color: var(--muted);
}

.hv-quick-pill-h::before {
  content: "·";
  margin-right: 4px;
  color: var(--border-strong);
  font-weight: 400;
}

@media (max-width: 639px) {
  .hv-face-nav {
    display: none;
  }
}

.hv-tool-topbar-label {
  font-size: 12px;
  font-weight: 600;
  color: var(--muted);
  text-transform: uppercase;
  letter-spacing: 0.06em;
  flex-shrink: 0;
}

.hv-tool-topbar .hv-toolbar-presets {
  flex: 1;
  justify-content: flex-start;
}

.hv-tool-topbar .hv-chip {
  font-size: 12px;
  font-weight: 600;
  padding: 5px 11px;
  min-height: 30px;
  border-color: var(--border);
  background: var(--surface);
  color: var(--text-secondary);
}

.hv-tool-topbar .hv-chip:hover {
  color: var(--text);
  border-color: var(--border-strong);
  background: var(--primary-soft);
}

@media (max-width: 639px) {
  .hv-hero-intro {
    flex-direction: column;
    align-items: center;
    gap: 0.2rem;
  }

  .hv-hero-lead::before {
    content: none;
  }
}

.hv-drop-panel {
  flex: 1;
  min-height: 0;
  display: flex;
  flex-direction: column;
  border-radius: 0;
  background: transparent;
  padding: 0;
  box-shadow: none;
}

.hv-tool-shell {
  flex: 0 1 auto;
  min-height: 0;
  display: flex;
  flex-direction: column;
  gap: 0;
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: 20px;
  padding: 0;
  box-shadow: var(--shadow-tool);
  overflow: hidden;
}

.hv-tool-grid {
  flex: 1;
  min-height: 0;
  display: grid;

  grid-template-columns: 1fr;
  grid-template-rows: minmax(0, auto) minmax(0, 1fr);
  gap: 8px;
}

.hv-toolbar {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: flex-start;
  gap: 0.5rem 0.75rem;
  margin: 0;
  flex-shrink: 0;
}

.hv-unit-toggle {
  display: inline-flex;
  padding: 2px;
  border-radius: 999px;
  border: 1px solid var(--border);
  background: var(--bg-soft);
  box-shadow: inset 0 1px 2px rgba(28, 28, 34, 0.06);
  flex-shrink: 0;
}

.hv-unit-btn {
  border: none;
  background: transparent;
  color: var(--muted);
  font: inherit;
  font-size: 12px;
  font-weight: 600;
  padding: 6px 12px;
  border-radius: 999px;
  cursor: pointer;
  min-height: 34px;
}

.hv-unit-btn.is-active {
  background: var(--primary);
  color: var(--surface);
  box-shadow: 0 1px 2px rgba(37, 99, 235, 0.35);
  border: 1px solid transparent;
}

.hv-toolbar-presets {
  display: flex;
  flex-wrap: nowrap;
  gap: 6px;
  flex: 1 1 auto;
  min-width: 0;
  overflow-x: auto;
  overflow-y: hidden;
  -webkit-overflow-scrolling: touch;
  scrollbar-width: none;
}

.hv-toolbar-presets::-webkit-scrollbar {
  display: none;
}

.hv-chip {
  border: 1px solid var(--border);
  background: var(--card);
  color: var(--text);
  font: inherit;
  font-size: 0.8125rem;
  font-weight: 600;
  padding: 6px 12px;
  border-radius: 999px;
  cursor: pointer;
  min-height: 34px;
  flex-shrink: 0;
}

.hv-chip:hover {
  border-color: var(--border);
  background: var(--bg-soft);
  color: var(--text);
}

.hv-input-pane {
  border-right: none;
  border-bottom: 1px solid var(--border);
  padding: 14px 14px 16px;
  background: var(--bg);
  min-height: 0;
}

.hv-pane-tabs {
  display: flex;
  gap: 4px;
  padding: 3px;
  border-radius: 12px;
  border: 1px solid var(--border);
  background: var(--bg-muted);
  flex-shrink: 0;
}

.hv-pane-tab {
  flex: 1;
  border: none;
  background: transparent;
  color: var(--muted);
  font: inherit;
  font-size: 13px;
  font-weight: 650;
  line-height: 1.2;
  min-height: 36px;
  padding: 6px 10px;
  border-radius: 9px;
  cursor: pointer;
}

.hv-pane-tab.is-active {
  background: var(--surface);
  color: var(--text);
  box-shadow: 0 1px 2px rgba(24, 24, 27, 0.08);
}

.hv-pane-tab:disabled {
  opacity: 0.42;
  cursor: not-allowed;
}

.hv-pane-tabs--4 .hv-pane-tab {
  flex: 1 1 0;
  min-width: 0;
  font-size: 12px;
  font-weight: 700;
  padding: 6px 5px;
  min-height: 34px;
}

@media (min-width: 768px) {
  .hv-pane-tabs--4 .hv-pane-tab {
    font-size: 12px;
    padding: 6px 7px;
  }
}

.hv-pane-settings {
  overflow-x: hidden;
  overflow-y: auto;
  -webkit-overflow-scrolling: touch;
  padding: 2px 2px 12px;
  scrollbar-width: thin;
  scrollbar-color: var(--border) transparent;
}

.hv-pane-settings-title {
  margin: 0 0 10px;
  font-size: 14px;
  font-weight: 700;
  line-height: 1.25;
  color: var(--text);
}

.hv-pane-settings .hv-sheet-label:first-of-type {
  margin-top: 0;
}

.hv-grid-modes {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 4px;
  padding: 3px;
  margin-bottom: 4px;
  border-radius: 10px;
  border: 1px solid var(--border);
  background: var(--bg-soft);
}

.hv-grid-mode-btn {
  min-height: 34px;
  display: flex;
  align-items: center;
  justify-content: center;
  border: none;
  border-radius: 8px;
  background: transparent;
  color: var(--text);
  font: inherit;
  font-size: 12px;
  font-weight: 600;
  line-height: 1.2;
  padding: 6px 4px;
  cursor: pointer;
}

.hv-grid-mode-btn.is-active {
  background: var(--primary-soft);
  color: var(--primary-hover);
  box-shadow: inset 0 0 0 1px color-mix(in srgb, var(--primary) 22%, transparent);
}

.hv-grid-mode-btn:focus-visible {
  outline: 2px solid var(--primary);
  outline-offset: 1px;
}

@media (min-width: 420px) {
  .hv-pane-settings .hv-grid-modes {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }
}

.hv-pane-settings-hint {
  margin: 8px 0 0;
  font-size: 12px;
  line-height: 1.4;
  color: var(--muted);
}

.hv-arrange-field {
  display: flex;
  flex-direction: column;
  gap: 4px;
  margin: 10px 0 4px;
  padding: 10px 0 8px;
  border-bottom: 1px solid var(--bg-muted);
}

.hv-arrange-label {
  font-size: 13px;
  font-weight: 650;
  color: var(--text);
}

.hv-arrange-hint {
  font-size: 12px;
  color: var(--muted);
}

.hv-arrange-select {
  width: 100%;
  margin-top: 2px;
  padding: 8px 10px;
  border: 1px solid var(--border);
  border-radius: 10px;
  background: var(--surface);
  font: inherit;
  font-size: 13px;
  font-weight: 600;
  color: var(--text);
}

.hv-fig-handle {
  touch-action: none;
}

.hv-fig-dragging {
  cursor: grabbing !important;
  opacity: 0.94;
  filter: drop-shadow(0 6px 14px rgba(15, 23, 42, 0.18));
}

.hv-pane-body {
  flex: 1 1 auto;
  min-height: 0;
  display: flex;
  flex-direction: column;
  margin-top: 10px;
}

.hv-pane-panel {
  flex: 1 1 auto;
  min-height: 0;
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.hv-pane-panel[hidden] {
  display: none !important;
}

#hv-pane-add .hv-draft {
  flex: 1 1 auto;
  margin-top: 0;
  min-height: 12rem;
}

#hv-pane-add .hv-draft {
  border-style: solid;
  border-radius: 12px;
  background: var(--surface);
}

#hv-pane-add .hv-add {
  flex-shrink: 0;
  margin-top: 0;
}

.hv-pane-full {
  margin: 0 0 8px;
  font-size: 13px;
  line-height: 1.45;
  color: var(--muted);
  font-weight: 500;
}

.hv-panel-head {
  display: flex;
  flex-wrap: wrap;
  align-items: flex-start;
  justify-content: space-between;
  gap: 10px 12px;
  margin-bottom: 12px;
  flex-shrink: 0;
}

.hv-panel-kicker {
  min-width: 0;
}

.hv-panel-title {
  margin: 0;
  font-size: 0.95rem;
  font-weight: 700;
  letter-spacing: -0.02em;
  color: var(--text);
}

.hv-panel-sub {
  margin: 2px 0 0;
  font-size: 12px;
  line-height: 1.4;
  color: var(--muted);
  font-weight: 500;
}

.hv-draft {
  display: flex;
  flex-direction: column;
  gap: 8px;
  margin-top: 12px;
  padding: 12px;
  border: 1px dashed var(--border);
  border-radius: 14px;
  background: var(--bg-soft);
}

.hv-draft[hidden] {
  display: none;
}

.hv-input-pane .hv-add {
  width: 100%;
  margin-top: 12px;
  border-radius: 12px;
  min-height: 42px;
  font-size: 14px;
  letter-spacing: -0.01em;
  box-shadow: 0 1px 0 rgba(255, 255, 255, 0.2) inset, 0 8px 16px -10px rgba(37, 99, 235, 0.7);
}

.hv-input-pane .hv-add:hover {
  background: var(--primary-hover);
}

.hv-input-pane.hv-panel--pulse {
  animation: hv-panel-pulse 0.55s ease;
}

@keyframes hv-panel-pulse {
  0%,
  100% {
    box-shadow: inset 0 0 0 0 rgba(37, 99, 235, 0);
  }
  40% {
    box-shadow: inset 0 0 0 2px rgba(37, 99, 235, 0.45);
  }
}

.hv-board {
  position: relative;
  margin: 0;
  min-height: 0;
  display: flex;
  flex-direction: column;
  gap: 6px;
  background: var(--surface);
  flex: 1;
  height: 100%;
  overflow: hidden;
}

.hv-canvas-toolbar {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 8px 12px;
  padding: 8px 12px;
  min-width: 0;
  border: none;
  border-bottom: 1px solid var(--bg-muted);
  border-radius: 0;
  background: var(--surface);
  flex-shrink: 0;
}

.hv-canvas-toolbar-cluster {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 4px;
}

.hv-canvas-toolbar-cluster--end {
  margin-left: auto;
}

.hv-toolbar-divider {
  width: 1px;
  height: 22px;
  background: var(--border);
  margin: 0 4px;
}

.hv-zoom-cluster {
  display: inline-flex;
  align-items: stretch;
  gap: 1px;
  padding: 2px;
  border-radius: 10px;
  background: linear-gradient(180deg, var(--bg-muted) 0%, var(--bg-muted) 100%);
  border: 1px solid var(--border);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.7);
}

.hv-zoom-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 36px;
  height: 32px;
  padding: 0;
  border: none;
  border-radius: 8px;
  background: transparent;
  color: var(--text-secondary);
  cursor: pointer;
}

.hv-zoom-btn:hover {
  background: var(--surface);
  color: var(--text);
  box-shadow: 0 1px 3px rgba(15, 23, 42, 0.08);
}

.hv-zoom-btn:active {
  transform: scale(0.97);
}

.hv-zoom-btn:focus-visible {
  outline: 2px solid var(--primary);
  outline-offset: 1px;
}

.hv-zoom-ico {
  display: block;
  width: 20px;
  height: 20px;
  flex-shrink: 0;
}

.hv-zoom-pct {
  font-size: 12px;
  font-weight: 600;
  color: var(--muted);
  min-width: 2.75rem;
  text-align: center;
  padding: 4px 6px;
  border: none;
  border-radius: 8px;
  background: transparent;
  cursor: pointer;
  font: inherit;
}

.hv-zoom-pct:hover {
  background: var(--bg-soft);
  color: var(--text-secondary);
}

.hv-icon-btn,
.hv-canvas-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  min-height: 32px;
  min-width: 32px;
  padding: 0 10px;
  border: 1px solid transparent;
  border-radius: 8px;
  background: transparent;
  color: var(--text-secondary);
  font: inherit;
  font-size: 13px;
  font-weight: 600;
  cursor: pointer;
}

.hv-icon-btn:hover,
.hv-canvas-btn:hover {
  background: var(--bg-soft);
  border-color: var(--border);
}

.hv-icon-btn:disabled {
  opacity: 0.35;
  cursor: not-allowed;
}

.hv-icon-btn:disabled:hover {
  background: transparent;
  border-color: transparent;
}

.hv-canvas-btn--primary {
  background: var(--primary);
  color: var(--surface);
  border-color: var(--primary);
}

.hv-canvas-btn--primary:hover {
  background: var(--primary-hover);
  border-color: var(--primary-hover);
  color: var(--surface);
}

.hv-canvas-menu {
  position: relative;
}

.hv-canvas-menu summary {
  list-style: none;
  cursor: pointer;
}

.hv-canvas-menu summary::-webkit-details-marker {
  display: none;
}

.hv-canvas-menu-body {
  position: absolute;
  z-index: 8;
  right: 0;
  top: calc(100% + 4px);
  display: flex;
  flex-direction: column;
  gap: 6px;
  padding: 8px;
  min-width: 11rem;
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: 10px;
  box-shadow: 0 10px 28px rgba(15, 23, 42, 0.12);
}

.hv-settings-hub {
  min-width: 12.5rem;
  gap: 4px;
  padding: 6px;
}

.hv-settings-hub-btn {
  display: flex;
  align-items: center;
  gap: 8px;
  width: 100%;
  padding: 8px 10px;
  border: none;
  border-radius: 8px;
  background: transparent;
  font: inherit;
  font-size: 13px;
  font-weight: 600;
  color: var(--text);
  text-align: left;
  cursor: pointer;
}

.hv-settings-hub-btn:hover {
  background: var(--bg-soft);
}

.hv-settings-hub-ico {
  width: 1.25rem;
  text-align: center;
  opacity: 0.85;
}

.hv-chart-sheet {
  position: absolute;
  inset: 0;
  z-index: 12;
  display: flex;
  align-items: flex-start;
  justify-content: flex-start;
  padding: 12px;
  background: rgba(15, 23, 42, 0.22);
  backdrop-filter: blur(2px);
}

.hv-chart-sheet[hidden] {
  display: none !important;
}

.hv-chart-sheet-card {
  width: min(320px, 100%);
  max-height: min(92%, calc(100% - 24px));
  overflow: auto;
  padding: 14px 14px 12px;
  border-radius: 14px;
  border: 1px solid var(--border);
  background: var(--surface);
  box-shadow: 0 18px 40px rgba(15, 23, 42, 0.18);
}

.hv-chart-sheet-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  margin-bottom: 12px;
}

.hv-chart-sheet-head h3 {
  margin: 0;
  font-size: 15px;
  font-weight: 700;
}

.hv-chart-sheet-close {
  width: 32px;
  height: 32px;
  border: none;
  border-radius: 8px;
  background: transparent;
  font-size: 22px;
  line-height: 1;
  color: var(--muted);
  cursor: pointer;
}

.hv-chart-sheet-close:hover {
  background: var(--bg-muted);
  color: var(--text);
}

.hv-sheet-label {
  margin: 12px 0 6px;
  font-size: 12px;
  font-weight: 700;
  color: var(--muted);
  text-transform: uppercase;
  letter-spacing: 0.04em;
}

.hv-sheet-label:first-of-type {
  margin-top: 0;
}

.hv-setting-row--switch {
  justify-content: space-between;
  padding: 8px 0;
  border-bottom: 1px solid var(--bg-muted);
}

.hv-setting-row--switch:last-of-type {
  border-bottom: none;
}

.hv-sheet-range {
  display: grid;
  grid-template-columns: 1fr auto;
  grid-template-rows: auto auto;
  gap: 4px 8px;
  align-items: center;
  margin-bottom: 8px;
  font-size: 13px;
  color: var(--text);
}

.hv-sheet-range input[type="range"] {
  grid-column: 1 / -1;
  width: 100%;
}

.hv-sheet-range strong {
  font-size: 12px;
  color: var(--text-secondary);
}

.hv-seg--4 {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 4px;
  padding: 3px;
  border-radius: 10px;
  border: 1px solid var(--border);
  background: var(--bg-soft);
}

.hv-seg--4 .hv-seg-btn {
  min-height: 32px;
  font-size: 12px;
  padding: 0 4px;
}

.hv-sheet-color {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px;
  margin-top: 10px;
  font-size: 13px;
  color: var(--text);
}

.hv-sheet-color input[type="color"] {
  width: 40px;
  height: 32px;
  padding: 0;
  border: 1px solid var(--border);
  border-radius: 8px;
  cursor: pointer;
}

.hv-sheet-color .hv-color-hex,
.hv-sheet-color #hv-opt-grid-color-hex {
  flex: 1;
  min-width: 6rem;
  padding: 6px 8px;
  border: 1px solid var(--border);
  border-radius: 8px;
  font: inherit;
  font-size: 12px;
  font-weight: 600;
  text-transform: uppercase;
}

.hv-bg-tiles {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 6px;
}

.hv-bg-tile {
  min-height: 40px;
  border: 1.5px solid var(--border);
  border-radius: 10px;
  background: var(--surface);
  font: inherit;
  font-size: 12px;
  font-weight: 600;
  cursor: pointer;
}

.hv-bg-tile[data-hv-bg="studio"] {
  background: linear-gradient(180deg, var(--surface), var(--bg-soft));
}

.hv-bg-tile[data-hv-bg="paper"] {
  background: linear-gradient(180deg, var(--bg-soft), var(--bg-muted));
}

.hv-bg-tile[data-hv-bg="sky"] {
  background: linear-gradient(180deg, var(--primary-soft), var(--primary-soft));
}

.hv-bg-tile[data-hv-bg="stage"] {
  background: linear-gradient(180deg, var(--bg-soft), var(--border));
}

.hv-bg-tile.is-active {
  border-color: var(--primary);
  box-shadow: 0 0 0 1px rgba(37, 99, 235, 0.25);
}

.hv-sheet-link {
  display: block;
  width: 100%;
  margin-top: 14px;
  padding: 0;
  border: none;
  background: none;
  font: inherit;
  font-size: 13px;
  font-weight: 600;
  color: var(--primary);
  text-align: left;
  cursor: pointer;
}

.hv-sheet-link:hover {
  text-decoration: underline;
}

.hv-setting-row {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 13px;
  color: var(--text);
  cursor: pointer;
}

.hv-summary {
  font-size: 15px;
  font-weight: 600;
  margin: 0;
  padding: 10px 16px 0;
  text-align: center;
  line-height: 1.45;
  flex-shrink: 0;
  color: var(--text);
  background: transparent;
  letter-spacing: 0.01em;
}

.hv-panel {
  min-height: 0;
  display: flex;
  flex-direction: column;
  gap: 6px;
  overflow: visible;
}

.hv-lineup {
  flex: 0 1 auto;
  overflow: visible;
  display: flex;
  flex-direction: column;
  gap: 10px;
  margin: 0;
}

#hv-tool.hv-tool--many .hv-panel {
  overflow: hidden;
}

#hv-tool.hv-tool--many .hv-lineup {
  flex: 1;
  min-height: 0;
  overflow-y: auto;
  scrollbar-width: thin;
  scrollbar-color: var(--border) transparent;
}

.hv-person {
  display: flex;
  flex-direction: column;
  gap: 0;
  padding: 0;
  border: none;
  border-radius: 12px;
  background: transparent;
  box-shadow: none;
  flex-shrink: 0;
  overflow: hidden;
}

.hv-person-bar-row {
  display: flex;
  align-items: stretch;
  gap: 6px;
}

.hv-person-bar {
  flex: 1;
  display: flex;
  align-items: center;
  gap: 8px;
  min-height: 40px;
  padding: 0 12px;
  border: 1px solid var(--border);
  border-radius: 10px;
  background: var(--surface);
  color: var(--text);
  font: inherit;
  font-size: 13px;
  font-weight: 600;
  cursor: pointer;
  text-align: left;
}

.hv-person-dot {
  width: 10px;
  height: 10px;
  border-radius: 50%;
  flex-shrink: 0;
}

.hv-person.is-open .hv-person-bar {
  background: var(--bg-soft);
  border-color: var(--border);
}

.hv-person-bar-text {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  flex: 1;
}

.hv-person-bar-chev {
  margin-left: auto;
  flex-shrink: 0;
  width: 28px;
  height: 28px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 8px;
  background: var(--bg-muted);
  color: var(--text-secondary);
}

.hv-person-bar-chev svg {
  width: 18px;
  height: 18px;
  display: block;
}

.hv-person.is-open .hv-person-bar-chev {
  background: var(--border);
  color: var(--text);
}

.hv-person-trash {
  width: 40px;
  border: 1px solid var(--border);
  border-radius: 10px;
  background: var(--surface);
  color: var(--muted);
  font-size: 18px;
  line-height: 1;
  cursor: pointer;
}

.hv-person-trash:disabled {
  opacity: 0.35;
  cursor: not-allowed;
}

.hv-person.is-open {
  overflow: visible;
}

.hv-person.is-open .hv-person-bar {
  border-radius: 10px 10px 0 0;
}

.hv-person-editor {
  display: flex;
  flex-direction: column;
  gap: 8px;
  min-width: 0;
  padding: 10px;
  border: 1px solid var(--border);
  border-top: none;
  border-radius: 0 0 12px 12px;
  background: var(--surface);
}

.hv-seg {
  display: grid;
  grid-template-columns: 1fr 1fr;
  border: 1px solid var(--border);
  border-radius: 12px;
  overflow: hidden;
  background: var(--surface);
}

.hv-seg--3 {
  grid-template-columns: 1.1fr 1fr 1fr;
}

.hv-seg-label,
.hv-seg-btn {
  min-height: 40px;
  display: flex;
  align-items: center;
  justify-content: center;
  border: none;
  background: var(--surface);
  color: var(--text);
  font: inherit;
  font-size: 14px;
  font-weight: 600;
}

.hv-seg-label {
  color: var(--text-secondary);
  border-right: 1px solid var(--border);
}

.hv-seg-btn {
  cursor: pointer;
  border-left: 1px solid var(--border);
}

.hv-seg-btn.is-active {
  background: var(--primary-soft);
  color: var(--primary-hover);
}

.hv-prefix-field {
  display: flex;
  align-items: center;
  min-height: 42px;
  border: 1px solid var(--border);
  border-radius: 12px;
  overflow: hidden;
  background: var(--surface);
}

.hv-prefix {
  flex: 0 0 4.5rem;
  padding: 0 12px;
  color: var(--text-secondary);
  font-size: 14px;
  font-weight: 600;
  border-right: 1px solid var(--border);
}

.hv-prefix-field .hv-name {
  border: none;
  border-radius: 0;
  min-height: 40px;
  box-shadow: none;
}

.hv-name-row .hv-field-label {
  display: block;
}

.hv-person-editor .hv-name-row .hv-name,
.hv-draft .hv-name--draft {
  width: 100%;
  box-sizing: border-box;
  min-height: 42px;
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 8px 12px;
  background: var(--surface);
}

.hv-person-editor .hv-fields input[type="number"] {
  border-radius: 12px;
}

.hv-color-tray {
  display: grid;
  grid-template-columns: repeat(7, minmax(0, 1fr));
  align-items: center;
  gap: 4px;
  width: 100%;
  max-width: 100%;
  min-width: 0;
  box-sizing: border-box;
  padding: 8px;
  border: 1px solid var(--border);
  border-radius: 14px;
  background: var(--bg-soft);
  overflow: visible;
}

.hv-color-custom {
  position: relative;
  min-width: 0;
  width: 100%;
}

.hv-color-swatch--more {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 100%;
  aspect-ratio: 1;
  border-radius: 8px;
  background: var(--surface);
  color: #64748b;
  border: 1px solid var(--border);
  box-shadow: none;
}

.hv-color-swatch--more.is-active {
  border-color: var(--text);
}

.hv-ico {
  display: block;
  width: 15px;
  height: 15px;
  flex-shrink: 0;
  pointer-events: none;
}

.hv-color-custom-panel {
  position: fixed;
  z-index: 1200;
  left: 0;
  top: 0;
  width: min(276px, calc(100vw - 48px));
  padding: 0;
  border-radius: 12px;
  border: 1px solid var(--border);
  background: var(--surface);
  box-shadow: 0 12px 32px rgba(15, 23, 42, 0.14);
  overflow: hidden;
}

.hv-color-custom-panel[hidden] {
  display: none !important;
}

.hv-color-custom-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  margin: 0;
  padding: 8px 10px 7px 12px;
  font-size: 13px;
  font-weight: 600;
  color: var(--text);
  border-bottom: 1px solid var(--border);
}

.hv-color-custom-close {
  width: 28px;
  height: 28px;
  border: none;
  border-radius: 8px;
  background: transparent;
  color: var(--muted);
  font-size: 20px;
  line-height: 1;
  cursor: pointer;
}

.hv-color-custom-close:hover {
  background: var(--bg-muted);
  color: var(--text);
}

.hv-cp-body {
  padding: 12px;
}

.hv-cp-sv {
  position: relative;
  height: 130px;
  border-radius: 8px;
  border: 1px solid var(--border);
  background: linear-gradient(to top, #000, transparent),
    linear-gradient(to right, #fff, hsl(var(--cp-h, 200) 100% 50%));
  touch-action: none;
  cursor: crosshair;
}

.hv-cp-hue {
  position: relative;
  height: 14px;
  margin-top: 12px;
  border-radius: 999px;
  border: 1px solid var(--border);
  background: linear-gradient(90deg, #f00, #ff0, #0f0, #0ff, #00f, #f0f, #f00);
  touch-action: none;
  cursor: pointer;
}

.hv-cp-dot {
  position: absolute;
  width: 18px;
  height: 18px;
  margin: -9px 0 0 -9px;
  border: 2px solid #fff;
  border-radius: 50%;
  box-shadow: 0 0 0 1px rgba(15, 23, 42, 0.35), 0 1px 2px rgba(15, 23, 42, 0.2);
  pointer-events: none;
}

.hv-cp-dot--hue {
  top: 50%;
}

.hv-cp-tabs {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 2px;
  margin-top: 12px;
  padding: 2px;
  border: 1px solid var(--border);
  border-radius: 8px;
  background: var(--bg-muted);
}

.hv-cp-tab {
  min-height: 28px;
  border: none;
  border-radius: 6px;
  background: transparent;
  color: var(--muted);
  font: inherit;
  font-size: 12px;
  font-weight: 600;
  cursor: pointer;
}

.hv-cp-tab.is-active {
  color: var(--text);
  background: var(--surface);
  box-shadow: inset 0 0 0 1px var(--border);
}

.hv-cp-in {
  display: block;
  width: 100%;
  box-sizing: border-box;
  margin-top: 10px;
  padding: 8px 10px;
  border: 1px solid var(--border);
  border-radius: 8px;
  font: inherit;
  font-size: 13px;
  font-weight: 600;
  color: var(--text);
  text-transform: uppercase;
  text-align: center;
}

.hv-cp-in:focus {
  outline: 2px solid var(--ring);
  outline-offset: 1px;
  border-color: transparent;
}

.hv-cp-body::after {
  content: "HEX";
  display: block;
  margin-top: 6px;
  font-size: 12px;
  font-weight: 600;
  text-align: center;
  color: var(--muted);
}

.hv-color-hex-cap {
  display: block;
  margin-top: 4px;
  font-size: 12px;
  font-weight: 600;
  letter-spacing: 0.06em;
  color: var(--muted);
}

.hv-field-label {
  margin: 0;
  font-size: 12px;
  font-weight: 600;
  color: var(--muted);
  letter-spacing: 0.01em;
}

.hv-labeled-row {
  display: grid;
  gap: 6px;
}

.hv-labeled-row--tabs {
  grid-template-columns: minmax(4.5rem, auto) 1fr;
  align-items: center;
  column-gap: 10px;
}

.hv-labeled-row--stack {
  grid-template-columns: 1fr;
}

.hv-labeled-row--color {
  grid-template-columns: minmax(4.5rem, auto) 1fr;
  align-items: center;
  column-gap: 8px;
}

.hv-labeled-row--color .hv-color-row {
  justify-content: flex-end;
  gap: 7px;
  padding: 0;
}

.hv-gender-toggle {
  display: inline-flex;
  width: 100%;
  max-width: 11.5rem;
  margin-left: auto;
  padding: 2px;
  border-radius: 999px;
  border: 1px solid var(--border);
  background: var(--bg-soft);
  box-shadow: inset 0 1px 2px rgba(15, 23, 42, 0.04);
}

.hv-gender-btn {
  flex: 1;
  min-height: 32px;
  border: none;
  border-radius: 999px;
  background: transparent;
  color: var(--muted);
  font: inherit;
  font-size: 12px;
  font-weight: 600;
  cursor: pointer;
  padding: 0 10px;
  line-height: 1;
}

.hv-gender-btn.is-active {
  background: var(--primary);
  color: var(--surface);
  box-shadow: 0 1px 2px rgba(37, 99, 235, 0.35);
}

.hv-gender-btn:focus-visible {
  outline: 2px solid var(--ring);
  outline-offset: 1px;
}

.hv-person-name-row {
  display: flex;
  align-items: center;
  gap: 8px;
}

.hv-person-name-row .hv-name {
  flex: 1;
}

.hv-color-row {
  display: block;

  padding: 2px 0 4px;
  min-width: 0;
}

.hv-color-swatch {
  width: 100%;
  height: auto;
  aspect-ratio: 1;
  max-width: 100%;
  padding: 0;
  border: 2px solid transparent;
  border-radius: 8px;
  cursor: pointer;
  box-sizing: border-box;
  box-shadow: none;
}

.hv-color-swatch:hover {
  transform: scale(1.04);
}

.hv-avatar-row {
  gap: 8px;
}

.hv-avatar-picker {
  display: inline-grid;
  grid-template-columns: repeat(3, 40px);
  gap: 5px;
  width: fit-content;
  max-width: 100%;
  padding: 6px;
  border-radius: 8px;
  border: 1px solid var(--border);
  background: var(--surface);
}

.hv-avatar-opt {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 40px;
  height: 44px;
  padding: 2px;
  border: 1.5px solid transparent;
  border-radius: 6px;
  background: var(--bg-soft);
  cursor: pointer;
}

.hv-avatar-opt:hover {
  border-color: var(--border);
  background: var(--surface);
}

.hv-avatar-opt.is-active {
  border-color: var(--primary);
  box-shadow: 0 0 0 1px rgba(79, 70, 229, 0.25);
  background: var(--surface);
}

.hv-avatar-opt-svg {
  display: block;
  width: 26px;
  height: 30px;
  flex-shrink: 0;
}

.hv-color-swatch.is-active {
  border-color: var(--text);
  box-shadow: none;
}

.hv-person-head {
  display: flex;
  align-items: center;
  gap: 6px;
}

@media (max-width: 767px) {
  .hv-person-head {
    flex-wrap: wrap;
  }

  .hv-name {
    min-width: 0;
    width: 100%;
  }
}

.hv-person-color {
  width: 4px;
  height: 28px;
  border-radius: 4px;
  flex-shrink: 0;
}

.hv-name {
  flex: 1;
  min-height: 40px;
  padding: 8px 10px;
  border: 1px solid var(--input);
  border-radius: var(--radius);
  font: inherit;
  font-size: 14px;
  font-weight: 600;
  background: var(--card);
}

.hv-fields {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 6px;
}

.hv-fields input[type="number"] {
  width: 100%;
  min-height: 40px;
  padding: 8px 10px;
  border: 1px solid var(--input);
  border-radius: var(--radius);
  font: inherit;
  font-size: 15px;
  background: var(--card);
  color: var(--text);
}

.hv-name:focus,
.hv-fields input[type="number"]:focus {
  outline: none;
  border-color: var(--ring);
  box-shadow: 0 0 0 3px rgba(156, 156, 168, 0.22);
}

.hv-fields input.hv-cm {
  grid-column: 1 / -1;
}

.hv-remove {
  border: none;
  background: transparent;
  color: var(--muted);
  font-size: 12px;
  cursor: pointer;
  text-decoration: underline;
  min-height: 34px;
  padding: 0 4px;
  flex-shrink: 0;
}

.hv-actions-bar {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: flex-start;
  gap: 6px;
  flex-shrink: 0;
  border-top: 1px solid var(--border);
  padding-top: 8px;
  margin: 0;
}

.hv-actions-bar .btn {
  margin: 0;
  width: auto;
  border-radius: 999px;
}

.hv-actions-bar .btn-secondary {
  border: 1px solid var(--border);
}

.hv-actions-bar .btn-ghost {
  border-style: dashed;
}

.btn-invert {
  background: var(--primary);
  color: var(--surface);
  border: 1px solid var(--primary);
}

.btn-invert:hover {
  background: var(--primary-hover);
  border-color: var(--primary-hover);
  color: var(--surface);
}

.hv-add {
  flex: 0 0 auto;
}

.hv-share-menu {
  position: relative;
}

.hv-share-menu summary {
  list-style: none;
  cursor: pointer;
}

.hv-share-menu summary::-webkit-details-marker {
  display: none;
}

.hv-share-menu-body {
  position: absolute;
  z-index: 5;
  right: 0;
  bottom: calc(100% + 4px);
  display: flex;
  flex-direction: column;
  gap: 4px;
  padding: 6px;
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: 8px;
  box-shadow: 0 8px 24px rgba(15, 23, 42, 0.12);
  min-width: 7rem;
}

.btn-sm {
  min-height: 34px;
  padding: 0 12px;
  font-size: 13px;
  border-radius: 8px;
}

.hv-accuracy {
  font-size: 12px;
  color: var(--muted);
  margin: 0;
  text-align: left;
  flex-shrink: 0;
  line-height: 1.2;
}

.hv-feedback {
  min-height: 0;
  padding: 0;
  font-size: 12px;
}

.hv-tool--many .hv-tool-grid {
  grid-template-rows: minmax(0, 0.33fr) minmax(0, 0.67fr);
}

.hv-tool--many .hv-accuracy {
  display: none;
}

.hv-person--mini {
  padding: 4px 5px;
  gap: 2px;
  border-radius: 8px;
}

.hv-person--mini .hv-person-head {
  flex-wrap: nowrap;
  gap: 4px;
}

.hv-person--mini .hv-person-color {
  width: 100%;
  height: 3px;
  border-radius: 3px;
  flex-shrink: 0;
}

.hv-person--mini .hv-name {
  min-height: 26px;
  padding: 3px 5px;
  font-size: 12px;
  width: 100%;
}

.hv-person--mini .hv-fields {
  gap: 3px;
}

.hv-person--mini .hv-fields input[type="number"] {
  min-height: 26px;
  padding: 2px 4px;
  font-size: 12px;
}

.hv-person--mini .hv-remove {
  font-size: 15px;
  font-weight: 700;
  min-height: 26px;
  line-height: 1;
  padding: 0 5px;
  text-decoration: none;
  flex-shrink: 0;
}

@media (min-width: 768px) {
  .hv-tool-grid {
    grid-template-columns: minmax(300px, 340px) minmax(0, 1fr);
    grid-template-rows: 1fr;
    align-items: stretch;
    gap: 0;
    min-height: min(78vh, 760px);
  }

  .hv-input-pane {
    border-bottom: none;
    border-right: 1px solid var(--border);
    padding: 18px 16px 20px;
    max-height: none;
    overflow: hidden;
    height: 100%;
  }

  .hv-pane-body {
    flex: 1;
    min-height: 0;
  }

  #hv-pane-people .hv-lineup {
    flex: 1 1 auto;
    min-height: 0;
  }

  #hv-tool.hv-tool--many .hv-input-pane {
    max-height: min(76vh, 680px);
    overflow: hidden;
  }

  .hv-chart-viewport {
    flex: 1 1 auto;
    min-height: 0;
    height: auto;
    margin: 0;
  }

  .hv-tool--many .hv-tool-grid {
    grid-template-rows: 1fr;
    grid-template-columns: minmax(260px, 300px) minmax(0, 1fr);
  }

  .hv-tool--many .hv-lineup {
    gap: 3px;
  }

  .hv-tool--many .hv-person--mini {
    display: grid;
    grid-template-columns: 3px minmax(0, 1fr) 2.35rem 2.35rem auto;
    align-items: center;
    gap: 4px;
    padding: 2px 5px;
  }

  .hv-tool--many .hv-person--mini .hv-person-head,
  .hv-tool--many .hv-person--mini .hv-fields {
    display: contents;
  }

  .hv-tool--many .hv-person--mini .hv-person-color {
    width: 3px;
    height: 24px;
    grid-row: 1;
  }

  .hv-tool--many .hv-person--mini .hv-name {
    grid-column: 2;
    width: auto;
    min-height: 28px;
    font-size: 12px;
  }

  .hv-tool--many .hv-person--mini .hv-ft {
    grid-column: 3;
  }

  .hv-tool--many .hv-person--mini .hv-in {
    grid-column: 4;
  }

  .hv-tool--many .hv-person--mini .hv-cm {
    grid-column: 3 / 5;
  }

  .hv-tool--many .hv-person--mini .hv-remove {
    grid-column: 5;
  }
}

@media (min-width: 1024px) {
  .hv-board {
    min-height: 100%;
  }
}

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 44px;
  padding: 0 20px;
  border-radius: 8px;
  font-weight: 600;
  font-size: 15px;
  cursor: pointer;
  border: none;
  font-family: inherit;
}

.btn-primary {
  background: var(--primary);
  color: var(--surface);
  width: 100%;
  margin-top: 8px;
}

.btn-primary:hover {
  background: var(--primary-hover);
}

.btn-primary:focus-visible,
.btn-secondary:focus-visible,
.btn-ghost:focus-visible {
  outline: 2px solid var(--primary);
  outline-offset: 2px;
}

.btn-secondary {
  background: var(--card);
  border: 1px solid var(--border);
  color: var(--text);
  font-weight: 600;
}

.btn-secondary:hover {
  border-color: var(--border);
  background: var(--bg-soft);
}

.btn-ghost {
  background: transparent;
  border: 1px dashed var(--border);
  color: var(--muted);
  width: 100%;
  margin-top: 8px;
}

.hv-chart-viewport {
  flex: 1 1 auto;
  min-height: min(52vh, 420px);
  height: auto;
  position: relative;
  overflow: hidden;
  margin: 0;
  border: none;
  border-radius: 0;
  background: var(--surface);
}

.hv-chart-zoom {
  width: 100%;
  height: 100%;
  min-height: 180px;
  transform-origin: center bottom;
  transition: transform 0.15s ease;
}

.hv-chart-wrap {
  width: 100%;
  height: 100%;
  min-height: 180px;
  display: flex;
  align-items: stretch;
  justify-content: flex-start;
}

.hv-chart {
  display: block;
  width: 100%;
  height: 100%;
  max-height: 100%;
}

.hv-chart text.hv-chart-text {
  text-rendering: geometricPrecision;
  -webkit-font-smoothing: antialiased;
  font-variant-numeric: tabular-nums;
}

.hv-fig-actions-pop {
  box-sizing: border-box;
  display: flex;
  align-items: stretch;
  gap: 4px;
  width: 100%;
  height: 100%;
  padding: 4px;
  border-radius: 10px;
  background: var(--surface);
  border: 1px solid var(--border-strong);
  box-shadow: 0 6px 18px rgba(15, 23, 42, 0.14);
}

.hv-fig-act {
  flex: 1 1 50%;
  display: inline-flex;
  flex-direction: row;
  align-items: center;
  justify-content: center;
  gap: 5px;
  min-width: 0;
  padding: 0 6px;
  border: none;
  border-radius: 7px;
  background: var(--bg-soft);
  color: var(--text);
  cursor: pointer;
  font: inherit;
  font-size: 12px;
  font-weight: 650;
  line-height: 1.1;
}

.hv-fig-act > span {
  white-space: nowrap;
  pointer-events: none;
}

.hv-fig-act:hover:not(:disabled) {
  background: var(--bg-muted);
  color: var(--text);
}

.hv-fig-act--danger:hover:not(:disabled) {
  background: var(--danger-bg);
  color: var(--danger);
}

.hv-fig-act:disabled,
.hv-fig-act.is-disabled {
  opacity: 0.38;
  cursor: not-allowed;
}

.hv-fig-act:focus-visible {
  outline: 2px solid var(--primary);
  outline-offset: 1px;
}

.hv-fig-actions-pop .hv-ico {
  width: 14px;
  height: 14px;
}

.hv-fig-act--danger {
  color: var(--danger);
  background: color-mix(in srgb, var(--danger-bg) 55%, var(--surface));
}

.hv-exports {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 16px;
}

.hv-exports .btn-secondary,
.hv-exports .btn-ghost {
  flex: 1 1 140px;
  width: auto;
  margin: 0;
}

.hv-modal[hidden] {
  display: none;
}

.hv-modal {
  position: fixed;
  inset: 0;
  z-index: 80;
  display: grid;
  place-items: center;
  padding: 24px;
}

.hv-modal-backdrop {
  position: absolute;
  inset: 0;
  background: rgba(24, 24, 27, 0.45);
}

.hv-modal-card {
  position: relative;
  width: min(28rem, 100%);
  background: var(--surface);
  border-radius: 16px;
  box-shadow: 0 24px 60px rgba(15, 23, 42, 0.22);
  padding: 20px 20px 16px;
}

.hv-modal-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
}

.hv-modal-head h3 {
  margin: 0;
  font-size: 1.125rem;
  letter-spacing: -0.02em;
}

.hv-modal-x {
  border: none;
  background: transparent;
  color: var(--muted);
  font-size: 22px;
  line-height: 1;
  width: 32px;
  height: 32px;
  border-radius: 8px;
  cursor: pointer;
}

.hv-modal-x:hover {
  background: var(--bg-muted);
  color: var(--text);
}

.hv-modal-copy {
  margin: 10px 0 0;
  color: var(--text-secondary);
  font-size: 0.9375rem;
  line-height: 1.5;
}

.hv-modal-actions {
  display: flex;
  justify-content: flex-end;
  gap: 8px;
  margin-top: 18px;
}

.hv-modal-cancel,
.hv-modal-confirm {
  min-height: 36px;
  padding: 0 14px;
  border-radius: 999px;
  font: inherit;
  font-size: 14px;
  font-weight: 600;
  cursor: pointer;
}

.hv-modal-cancel {
  background: var(--surface);
  border: 1px solid var(--border);
  color: var(--text);
}

.hv-modal-confirm {
  background: var(--primary);
  border: 1px solid var(--primary);
  color: var(--surface);
}

.hv-modal-confirm:hover {
  background: var(--primary-hover);
}

.hv-copy-msg {
  font-size: 13px;
  color: var(--muted);
  align-self: center;
}

.hv-feedback {
  border: none;
  background: none;
  color: var(--muted);
  text-decoration: underline;
  text-underline-offset: 2px;
  cursor: pointer;
  font: inherit;
  padding: 8px 0;
  min-height: 44px;
}

.hv-feedback:hover {
  color: var(--text);
}

.hv-section-head {
  margin: 0 auto 2rem;
  max-width: 42rem;
  text-align: center;
}

.hv-section-title {
  margin: 0;
  font-size: clamp(1.35rem, 2.4vw, 1.75rem);
  font-weight: 600;
  letter-spacing: -0.03em;
  line-height: 1.25;
  color: var(--text);
  text-align: center;
}

.hv-section-lead {
  margin: 1rem 0 0;

  font-size: 0.9375rem;
  line-height: 1.65;
  color: var(--muted);
  text-align: center;
}

.hv-body-text {
  font-size: 0.9375rem;
  line-height: 1.65;
  color: var(--muted);
}

.hv-home {
  background: var(--bg);
}

.hv-section {
  border-top: 1px solid var(--border);
  padding: 4rem 0;
  background: var(--bg);
}

.hv-section .hv-use-list,
.hv-section .hv-related-list {
  max-width: 42rem;
  margin-inline: auto;
  text-align: center;
}

.hv-section.hv-faq .hv-faq-item {
  max-width: 40rem;
  margin-inline: auto;
}

.hv-section .hv-faq-item {
  text-align: left;
}

.hv-section .hv-use-list {
  list-style-position: inside;
  padding-left: 0;
  text-align: center;
}

.hv-section .hv-related-list {
  list-style: none;
  padding: 0;
  text-align: center;
}

.prose.hv-section {
  max-width: 48rem;
  margin-inline: auto;
}

.prose.hv-section h2,
.prose.hv-section h3 {
  margin-top: 2.5rem;
  margin-bottom: 0.75rem;
  font-size: clamp(1.35rem, 2.4vw, 1.75rem);
  font-weight: 600;
  letter-spacing: -0.03em;
  line-height: 1.25;
  color: var(--text);
  text-align: center;
}

.prose.hv-section p,
.prose.hv-section li {
  margin-left: auto;
  margin-right: auto;
  max-width: 42rem;
  text-align: center;
  font-size: 0.9375rem;
  line-height: 1.65;
  color: var(--muted);
}

.prose.hv-section strong {
  color: var(--text);
}

.prose.hv-section ul,
.prose.hv-section ol {
  padding-left: 0;
  list-style-position: inside;
  text-align: center;
}

.hv-use-list {
  padding-left: 1.25rem;
  margin: 0;
}

.hv-use-list li {
  margin-bottom: 12px;
}

.hv-preset-row {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 8px;
}

.hv-preset-row .hv-chip,
.hv-preset-row button {
  flex: 0 1 auto;
}

.hv-next-grid {
  display: grid;
  gap: 12px;
  grid-template-columns: repeat(auto-fit, minmax(160px, 1fr));
  max-width: 48rem;
  margin-inline: auto;
}

.hv-next-card {
  min-height: 72px;
  padding: 16px;
  border-radius: var(--radius);
  border: 1px solid var(--border);
  background: var(--card);
  font-weight: 600;
  cursor: pointer;
  text-align: left;
}

.hv-next-card:hover {
  border-color: var(--border);
  background: var(--bg);
  box-shadow: var(--shadow-subtle);
}

.hv-faq-item {
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 14px 18px;
  margin-bottom: 10px;
  background: var(--card);
  box-shadow: var(--shadow-subtle);
}

.hv-faq-item summary {
  cursor: pointer;
  font-weight: 600;
}

.hv-related-list {
  list-style: none;
  padding: 0;
  margin: 0;
}

.hv-related-list a {
  color: var(--text);
  font-weight: 600;
  text-decoration: underline;
  text-underline-offset: 2px;
}

.prose p {
  max-width: 70ch;
}

.blog-list {
  list-style: none;
  padding: 0;
  margin: 24px 0 0;
}

.blog-list li {
  margin-bottom: 16px;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  background: var(--card);
}

.blog-list a {
  display: block;
  padding: 20px;
  text-decoration: none;
  color: inherit;
}

.blog-list-title {
  display: block;
  font-weight: 700;
  margin-bottom: 6px;
}

.blog-list-desc {
  display: block;
  font-size: 14px;
  color: var(--muted);
}

.post-date {
  color: var(--muted);
  font-size: 14px;
}

.post-cta {
  margin-top: 2.25rem;
  padding: 1.1rem 1.15rem;
  border: 1px solid var(--line, #e2e8f0);
  border-radius: 12px;
  background: #f8fafc;
}

.post-cta-title {
  font-size: 1.05rem;
  font-weight: 700;
  margin: 0 0 0.45rem;
}

.post-cta p {
  margin: 0;
}

.post-back {
  margin-top: 32px;
}

@media (max-width: 767px) {
  #hv-tool.hv-tool--many .hv-lineup {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 6px;
    align-content: start;
    overflow-x: hidden;
    overflow-y: visible;
  }

  #hv-tool.hv-tool--many .hv-person {
    min-width: 0;
  }

  #hv-tool.hv-tool--many .hv-person-bar {
    min-width: 0;
  }

  #hv-tool.hv-tool--many .hv-tool-grid {
    grid-template-rows: auto minmax(280px, 1.1fr);
  }

  #hv-tool.hv-tool--many .hv-chart-viewport {
    min-height: min(52vh, 400px);
  }

  .hv-lineup:has(.hv-person:nth-child(2):last-child) {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    overflow: hidden;
  }
}

@media (max-width: 640px) {
  .hv-hero-peer {
    display: none;
  }

  .hv-exports .btn-secondary,
  .hv-exports .btn-ghost {
    flex: 1 1 100%;
  }

  .site-nav {
    font-size: 13px;
  }

  /* 图表工具栏：避免 undo 与 Clear/Share 单独折到乱序的第二行 */
  .hv-canvas-toolbar {
    flex-direction: column;
    align-items: stretch;
    flex-wrap: nowrap;
    gap: 6px;
    padding: 8px 10px;
  }

  .hv-canvas-toolbar-cluster {
    flex-wrap: nowrap;
    width: 100%;
    min-width: 0;
    gap: 3px;
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
    scrollbar-width: none;
  }

  .hv-canvas-toolbar-cluster::-webkit-scrollbar {
    display: none;
  }

  .hv-canvas-toolbar-cluster--end {
    margin-left: 0;
    justify-content: flex-end;
    overflow-x: visible;
    flex-shrink: 0;
  }

  .hv-canvas-toolbar .hv-toolbar-divider {
    height: 20px;
    margin: 0 2px;
    flex-shrink: 0;
  }

  .hv-canvas-toolbar .hv-canvas-btn {
    padding: 0 8px;
    font-size: 13px;
    flex-shrink: 0;
  }

  .hv-canvas-toolbar .hv-zoom-btn {
    width: 34px;
    height: 30px;
  }

  .hv-canvas-toolbar .hv-zoom-pct {
    min-width: 2.5rem;
    padding: 4px 4px;
    flex-shrink: 0;
  }
}