/* Shared visual language: quiet typography, clear actions, generous spacing. */
:root {
  --page: #101010;
  --surface: #101010;
  --surface-2: #1c1c1c;
  --ink: #f5f5f5;
  --muted: #a8a8a8;
  --quiet: #949494;
  --line: #2d2d2d;
  --line-strong: #454545;
  --focus: #999;
  --radius: 16px;
  --radius-sm: 10px;
}
html[data-theme="light"] {
  --page: #fff;
  --surface: #fff;
  --surface-2: #f5f5f5;
  --ink: #171717;
  --muted: #666;
  --quiet: #717171;
  --line: #e8e8e8;
  --line-strong: #d5d5d5;
  --inverse: #fff;
  --inverse-ink: #171717;
  --focus: #555;
}
body {
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Arial, sans-serif;
  font-weight: 400;
  line-height: 1.5;
  font-optical-sizing: auto;
}
html:has(.business-dialog[open]), body:has(.business-dialog[open]) { overflow: hidden !important; }
body:has(.business-dialog[open]) > .app { position: fixed; inset: 0; width: 100%; overflow: hidden; }
h1, h2, h3, strong { font-weight: 600; }
h1, h2, h3 { text-wrap: pretty; letter-spacing: -.025em; }
button, input, select, textarea { font-family: inherit; font-weight: 400; }
button, .mini-button, .primary-button, .secondary-button, .guide-link,
.inline-action, .text-button, .file-action, .business-button, .booking-switch { font-weight: 500; }
label { font-size: 14px; font-weight: 400; line-height: 1.5; }
input, select, textarea {
  background: var(--surface);
  border-color: var(--line-strong);
  border-radius: 10px;
  font-size: 16px;
  font-weight: 400;
  min-height: 48px;
}
input::placeholder, textarea::placeholder { color: var(--quiet); font-weight: 400; }
input[type="file"]::file-selector-button { font-weight: 500; background: var(--surface-2); color: var(--ink); }
.form-grid { align-items: start; gap: 20px; }
.field-hint, .form-message, .list-meta { font-size: 13px; line-height: 1.65; font-weight: 400; }
.mini-button, .primary-button, .secondary-button { min-height: 44px; padding-inline: 18px; }
.mini-button { border-color: var(--line); border-radius: 999px; font-size: 14px; }
.primary-button { border-radius: 999px; font-size: 15px; }
.close-button, .workspace-theme { border: 0; background: transparent; box-shadow: none; }
.close-button:hover, .workspace-theme:hover { background: var(--surface-2); }
.workspace-theme { font-size: 20px; }
.page-kicker, .card-kicker { display: none; }
.page-date { font-size: 13px; font-weight: 400; }
.brand-name, .dialog-title { font-size: 22px; font-weight: 600; letter-spacing: -.025em; }
.brand-module { font-size: 12px; }
.booking-switch { border: 0; padding-inline: 14px; }
.booking-signal { display: none; }
.topbar { padding-block: 8px; }
.module-label { display: none; }
.intro h1 { font-size: clamp(36px, 5vw, 64px); line-height: 1.12; font-weight: 500; }
.lead { font-size: 18px; line-height: 1.6; max-width: 500px; }
.result { border: 0; }
.result-title { font-size: 24px; font-weight: 500; }
.orb { box-shadow: none; }
.orb-label { font-weight: 500; letter-spacing: -.02em; }
.footer { font-size: 13px; }
.business-dialog.is-cabinet {
  width: 100vw;
  max-width: none;
  height: var(--workspace-height, 100dvh);
  max-height: none;
  margin: 0;
  inset: var(--workspace-top, 0) 0 auto;
  border: 0;
  border-radius: 0;
  box-shadow: none;
}
.business-dialog.is-cabinet::backdrop { background: var(--page); backdrop-filter: none; }
.dialog-head { padding: 14px 28px; min-height: 72px; background: var(--surface); }
.dialog-subtitle { display: none; }
.dialog-head-actions { gap: 12px; }
.guide-link { border: 0; color: var(--muted); font-size: 14px; }
.cabinet-view { grid-template-columns: 232px minmax(0, 1fr); }
.cabinet-sidebar { background: var(--surface); padding: 24px 16px; }
.cabinet-account { padding: 0 12px 28px; gap: 12px; }
.account-avatar { width: 36px; height: 36px; border-radius: 50%; font-weight: 500; font-size: 14px; background: var(--surface-2); color: var(--ink); }
.cabinet-account strong { font-size: 14px; font-weight: 500; white-space: normal; line-height: 1.4; display: block; overflow: visible; overflow-wrap: anywhere; -webkit-line-clamp: unset; }
.cabinet-account small { font-size: 12px; white-space: normal; overflow: visible; line-height: 1.5; }
.cabinet-nav { gap: 4px; }
.cabinet-nav-button { font-size: 15px; font-weight: 400; min-height: 48px; padding-inline: 12px; }
.cabinet-nav-button[aria-selected="true"] { box-shadow: none; background: var(--surface-2); font-weight: 500; }
.cabinet-nav-button[aria-selected="true"]::before { display: none; }
.cabinet-nav-button svg { width: 18px; height: 18px; }
.cabinet-sidebar-foot { border-top: 0; padding-inline: 12px; }
.cabinet-sidebar-foot .sync-state { display: none; }
.cabinet-main { padding: 40px clamp(28px, 4vw, 72px) 56px; background: var(--surface); }
.cabinet-main > .panel, .cabinet-page-head { width: 100%; max-width: 1080px; margin-inline: auto; }
.cabinet-page-head { align-items: center; margin-bottom: 28px; }
.cabinet-page-head h2 { font-size: 36px; font-weight: 500; line-height: 1.2; margin: 0; letter-spacing: -.03em; }
.panel-copy { margin-top: 0; font-size: 15px; line-height: 1.6; max-width: 680px; }
.overview-hero { padding: 28px; border: 0; background: var(--surface-2); min-height: 190px; gap: 32px; }
.overview-hero h3 { font-size: clamp(28px, 3vw, 38px); font-weight: 500; line-height: 1.2; letter-spacing: -.025em; margin: 10px 0 12px; }
.overview-hero p { font-size: 15px; line-height: 1.6; max-width: 620px; }
.overview-hero .primary-button { min-height: 48px; }
.journey-guide { gap: 12px 20px; padding: 20px 0; font-size: 13px; }
.journey-guide b { border: 0; background: var(--surface-2); width: 22px; height: 22px; font-weight: 500; }
.venue-booking-link { margin-top: 0; padding: 16px 0; border: 0; border-bottom: 1px solid var(--line); border-radius: 0; }
.venue-booking-link strong { font-weight: 500; }
.dashboard-summary { gap: 16px; margin-top: 24px; border: 0; background: transparent; }
.dashboard-summary .metric { background: var(--surface-2); border: 0; border-radius: 12px; padding: 20px; }
.metric strong { font-size: 28px; font-weight: 500; }
.metric span, .metric small { font-size: 12px; font-weight: 400; }
.overview-grid { gap: 32px; margin-top: 32px; }
.overview-stack { gap: 0; }
.workspace-card { border: 0; border-radius: 0; padding: 0 0 24px; background: transparent; }
.overview-stack .workspace-card + .workspace-card { border-top: 1px solid var(--line); padding-top: 24px; }
.workspace-card h3, .section-intro h3 { font-size: 20px; font-weight: 500; line-height: 1.3; margin: 0; }
.workspace-card p { font-size: 14px; line-height: 1.6; }
.workspace-card-head { align-items: center; }
.inline-action { font-size: 13px; }
.session-history { margin-top: 18px; }
.session-history-row { padding: 16px 0; min-height: 76px; gap: 12px; }
.history-title { font-weight: 500; font-size: 14px; }
.history-meta, .history-count { font-size: 12px; font-weight: 400; }
.report-select { font-size: 14px; margin-top: 0; }
.report-stage { border: 0; border-radius: 0; padding: 0; background: transparent; margin-top: 24px; }
.report-summary-line { font-size: 13px; font-weight: 400; color: var(--muted); }
.report-next-step { border: 0; padding: 20px; border-radius: 12px; margin-block: 20px 28px; }
.report-next-step strong { font-weight: 500; font-size: 17px; }
.report-next-step p { font-size: 14px; line-height: 1.65; }
.report-review { margin-top: 28px; }
.report-review-head strong { font-size: 18px; font-weight: 500; }
.review-filters { margin-block: 16px; }
.review-filters .mini-button { border: 0; background: var(--surface-2); color: var(--muted); min-height: 40px; }
.review-filters .is-selected { background: var(--ink); color: var(--page); }
.report-review-row { padding: 20px 0; gap: 24px; }
.report-review-row[data-review-pending="true"] { border-left: 0; }
.report-review-row.is-unknown { background: transparent; }
.report-review-copy strong { font-size: 16px; font-weight: 500; line-height: 1.5; }
.report-review-copy span { font-size: 12px; line-height: 1.6; margin-top: 8px; }
.track-artist { display: block; color: var(--muted); font-size: 14px; font-weight: 400; margin-bottom: 4px; }
.report-review-copy .track-artist { font-size: 14px; margin-top: 0; }
.review-state { font-size: 12px; font-weight: 500; }
.metadata-fix { padding: 14px 0; border: 0; border-top: 1px solid var(--line); background: transparent; border-radius: 0; }
.metadata-fix summary { font-size: 14px; line-height: 1.6; font-weight: 400; }
.metadata-fix-fields { gap: 20px; padding-top: 16px; }
.readiness-row { padding: 14px 0; font-size: 14px; }
.readiness-row strong { font-weight: 500; }
.report-actions { gap: 16px; margin-top: 28px; }
.report-action { border: 0; background: var(--surface-2); border-radius: 12px; padding: 20px; }
.report-action strong { font-weight: 500; font-size: 15px; }
.report-action .report-mark { font-size: 12px; font-weight: 500; }
.report-final-actions { gap: 16px; margin-top: 24px; }
.catalog-head .card-kicker, .catalog-head h3, #catalogBack { display: none; }
.catalog-head { align-items: flex-start; margin-bottom: 24px; gap: 28px; }
.catalog-head .panel-copy { margin: 0; }
.catalog-summary { border: 0; background: transparent; padding: 0; margin-bottom: 24px; min-height: 0; }
.catalog-summary strong { font-size: 20px; font-weight: 500; }
.catalog-summary span, .catalog-summary .sync-state { font-size: 13px; font-weight: 400; }
.catalog-summary > .sync-state { display: none; }
.track-uploader { border: 1px solid var(--line); background: transparent; border-radius: 12px; padding: 0; margin-bottom: 24px; }
.track-uploader > summary { padding: 16px 20px; min-height: 56px; font-size: 15px; font-weight: 500; }
.track-uploader .upload-form { padding: 8px 20px 20px; }
.upload-form > .mini-button { justify-self: start; }
.catalog-search-bar { margin-top: 0; margin-bottom: 12px; gap: 12px; }
.catalog-search-bar .report-select { font-size: 13px; }
#tracksList { border: 0; background: transparent; padding: 0; }
.track-list-row { padding: 20px 0; gap: 24px; }
.list-title { font-size: 16px; font-weight: 500; line-height: 1.5; white-space: normal; }
.list-meta { margin-top: 6px; }
.track-list-row .metadata-fix { margin-top: 12px; padding: 0; border: 0; }
.track-list-row .metadata-fix summary { color: var(--muted); font-size: 13px; }
.account-grid, .admin-users-grid { gap: 32px; }
.profile-card, .password-card, .account-card { border: 0; background: transparent; padding: 0; }
.profile-data dt { font-size: 13px; font-weight: 400; }
.profile-data dd { font-size: 15px; font-weight: 400; }
.more-menu-item, .more-panel-head strong { font-weight: 400; }
.more-panel-head { background: transparent; border: 0; padding: 0 0 24px; margin-bottom: 12px; border-bottom: 1px solid var(--line); border-radius: 0; }
.more-account-avatar { border-radius: 50%; background: var(--surface-2); font-weight: 500; }
.more-panel-title h2 { font-weight: 500; }
.more-panel-title .text-button { min-width: 56px; padding: 0; font-size: 14px; font-weight: 500; color: var(--ink); }
.more-menu-item { font-size: 16px; min-height: 60px; padding-inline: 0; }
.more-logout { font-size: 14px; }
.more-logout .more-menu-label svg { color: inherit; }
.more-menu-label svg { width: 20px; height: 20px; }
.shared-set-list { margin-block: 0 24px; }
.shared-set-list > details > summary { cursor: pointer; min-height: 44px; font-size: 14px; color: var(--muted); }
.shared-set-list .shared-set-row { border: 0; border-top: 1px solid var(--line); border-radius: 0; background: transparent; padding: 16px 0; }
.shared-set-list .shared-set-row strong { font-size: 15px; font-weight: 500; }
.login-view h2 { font-size: 36px; font-weight: 500; line-height: 1.2; }
@media (max-width: 1100px) and (min-width: 841px) {
  .cabinet-view { grid-template-columns: 208px minmax(0, 1fr); }
  .cabinet-main { padding-inline: 32px; }
  .overview-hero { align-items: flex-start; flex-direction: column; gap: 20px; }
  .overview-hero .primary-button { align-self: flex-start; }
  .overview-grid { grid-template-columns: minmax(0,1fr); }
  .account-grid, .admin-users-grid { grid-template-columns: minmax(0,1fr); }
  .overview-stack { grid-template-columns: repeat(2,minmax(0,1fr)); gap: 24px; }
  .overview-stack .workspace-card + .workspace-card { border-top: 0; padding-top: 0; }
}
@media (max-width: 840px) {
  .dialog-head { padding: max(12px,env(safe-area-inset-top)) 24px 12px; min-height: 64px; }
  .dialog-title { font-size: 19px; }
  .dialog-head-actions { gap: 8px; }
  .cabinet-view { grid-template-columns: 1fr; }
  .cabinet-main { padding: 28px max(24px,env(safe-area-inset-right)) 32px max(24px,env(safe-area-inset-left)); }
  .cabinet-page-head { margin-bottom: 24px; }
  .cabinet-page-head h2 { font-size: 30px; font-weight: 500; }
  .cabinet-sidebar { padding: 6px max(6px,env(safe-area-inset-right)) max(6px,env(safe-area-inset-bottom)) max(6px,env(safe-area-inset-left)); }
  .cabinet-nav-button, .cabinet-more-button { min-height: 58px; font-size: 11px; font-weight: 400; padding: 4px 0; gap: 6px; align-items: center; }
  .cabinet-nav-button[aria-selected="true"] { background: transparent; font-weight: 500; }
  .cabinet-nav-button svg, .cabinet-more-button svg { width: 20px; height: 20px; }
  .cabinet-nav-button[aria-selected="true"] svg, .cabinet-more-button[aria-expanded="true"] svg, .cabinet-more-button.is-selected svg { box-shadow: none; background: transparent; }
  .cabinet-nav-button[aria-selected="true"]::after, .cabinet-more-button[aria-expanded="true"]::after, .cabinet-more-button.is-selected::after { content:""; position:absolute; bottom:0; width:18px; height:2px; border-radius:1px; background:var(--ink); }
  .cabinet-nav.is-menu-open .cabinet-nav-button[aria-selected]::after { display:none; }
  .cabinet-nav:has(#cabinetMoreButton[aria-expanded="true"]) .cabinet-nav-button[aria-selected]::after { display:none; }
  .cabinet-more-panel:not([hidden]) { padding: 28px 24px; bottom: calc(71px + env(safe-area-inset-bottom)); }
  .more-panel-title { margin-bottom: 28px; }
  .more-panel-title h2 { font-size: 30px; }
  .more-panel-head strong { font-size: 15px; }
  .more-panel-head small { font-size: 12px; line-height: 1.6; }
  .more-panel-head { padding-bottom: 24px; }
  .overview-hero { padding: 24px; gap: 24px; min-height: 0; }
  .overview-hero h3 { font-size: 28px; line-height: 1.2; }
  .journey-guide { display:grid; grid-template-columns:repeat(2,minmax(0,1fr)); gap:12px 8px; font-size:12px; padding:20px 0 0; }
  .journey-guide span { min-width: 0; gap: 6px; }
  .journey-guide b { width: 20px; height: 20px; flex-shrink: 0; }
  .dashboard-summary { gap: 8px; margin-top: 24px; }
  .dashboard-summary .metric { padding: 14px 10px; border: 0; }
  .dashboard-summary .metric strong { font-size: 24px; }
  .dashboard-summary .metric span { font-size: 11px; }
  .overview-grid { gap: 28px; margin-top: 28px; }
  .overview-stack { grid-template-columns: 1fr; }
  .overview-stack .workspace-card + .workspace-card { padding-top: 24px; }
  .report-stage { padding: 0; margin-top: 24px; }
  .report-next-step { padding: 20px; gap: 16px; margin-block: 20px 24px; }
  .report-review-row { gap: 16px; }
  .report-review-controls .mini-button { flex: 1 1 auto; }
  .report-review-controls > .metadata-fix { flex-basis: 100%; }
  .report-review-copy strong { font-size: 16px; }
  .report-action { padding: 20px; }
  .track-list-row { gap: 12px; }
  .track-list-row > .unknown-actions { width: auto; }
  .catalog-head { gap: 16px; margin-bottom: 20px; }
  .catalog-head-actions { width: 100%; }
  .catalog-summary { margin-bottom: 20px; }
  .track-uploader > summary { padding-inline: 16px; }
  .track-uploader .upload-form { padding-inline: 16px; }
  .form-grid, .metadata-fix-fields { gap: 18px; }
  .login-view { padding: 28px 24px; }
  .intro h1 { font-size: 36px; }
  .lead { font-size: 16px; }
}
@media (max-width: 600px) {
  .app { width: 100%; min-width: 0; padding-inline: 20px; overflow-x: clip; }
  .topbar { flex-wrap: wrap; row-gap: 12px; }
  .topbar .booking-switch { order: 3; width: 100%; padding-inline: 0; justify-content: flex-start; }
  .topbar .booking-switch > span:last-child { display: block; }
  .top-actions { margin-left: auto; }
  .stage, .recognizer { min-width: 0; width: 100%; }
  .recognizer .action-row { flex-wrap: wrap; max-width: 100%; gap: 8px; }
  .action-row > * { min-width: 0; }
  .footer { flex-wrap: wrap; gap: 12px; max-width: 100%; }
}
@media (prefers-contrast: more) {
  :root { --line: #666; --muted: #ccc; }
  html[data-theme="light"] { --line: #888; --muted: #444; }
}
