/* Desktop polish: keep the existing blue/Pretendard identity, make evidence easier to scan,
 * and give the team entry and centered dialogs the same quiet hierarchy. Loaded after calm.css. */
@media (min-width: 1100px) {
  :root {
    --card-pad: 20px;
    --gap: 16px;
    --text-3: color-mix(in srgb, var(--text-2) 82%, var(--surface-2));
    --desktop-link: var(--accent-2);
    --desktop-action: var(--accent-2);
    --desktop-action-hover: color-mix(in srgb, var(--accent-2) 90%, var(--text));
    --desktop-success: color-mix(in srgb, var(--success) 65%, var(--text));
    --desktop-warning: color-mix(in srgb, var(--warning) 50%, var(--text));
    --desktop-danger: color-mix(in srgb, var(--danger) 70%, var(--text));
    --desktop-scroll: color-mix(in srgb, var(--text-2) 45%, var(--surface-2));
  }
  :root[data-density="compact"] { --card-pad: 14px; --gap: 12px; }
  @media (prefers-color-scheme: dark) {
    :root:not([data-theme="light"]) { --desktop-action: color-mix(in srgb, var(--accent) 72%, var(--bg-sunken)); --desktop-action-hover: color-mix(in srgb, var(--accent) 82%, var(--bg-sunken)); }
  }
  :root[data-theme="dark"] { --desktop-action: color-mix(in srgb, var(--accent) 72%, var(--bg-sunken)); --desktop-action-hover: color-mix(in srgb, var(--accent) 82%, var(--bg-sunken)); }

  /* Browser surfaces and control states use the same palette in both themes. */
  body { line-height: 1.55; }
  * { scrollbar-width: thin; scrollbar-color: var(--desktop-scroll) transparent; }
  *::-webkit-scrollbar { width: 10px; height: 10px; }
  *::-webkit-scrollbar-track { background: transparent; }
  *::-webkit-scrollbar-thumb { background: var(--desktop-scroll); border: 3px solid transparent; background-clip: padding-box; border-radius: var(--r-full); }
  *::-webkit-scrollbar-thumb:hover { background-color: var(--text-2); }
  ::selection { background: var(--accent-soft); color: var(--text); }
  input, textarea { caret-color: var(--accent); }
  input::placeholder, textarea::placeholder { color: var(--text-3); opacity: 1; }
  .auth [hidden], .modal [hidden], .cand-selection-toolbar[hidden], .cand-compare-toolbar[hidden] { display: none !important; }
  a { text-underline-offset: 3px; text-decoration-thickness: 1px; }
  :is(.shell, .modal, .content-dialog-wrap, .auth) :is(a, button, input, select, textarea, summary, [tabindex]):focus-visible { outline: 2px solid var(--accent); outline-offset: 3px; }
  :is(button, input, select, textarea):disabled, .btn[aria-disabled="true"] { opacity: 1; cursor: not-allowed; color: var(--text-3); background: var(--surface-2); border-color: var(--border); box-shadow: none; }
  .btn { min-height: 36px; box-shadow: none; }
  .btn-sm, .btn-xs { min-height: 30px; }
  .btn-lg { min-height: 44px; }
  .btn:active { transform: none; }
  :is(.btn-primary, .own-dashboard .btn-primary, .home-dashboard .btn-primary) { background: var(--desktop-action); color: var(--text-inv); box-shadow: none; }
  :is(.btn-primary, .own-dashboard .btn-primary, .home-dashboard .btn-primary):hover:not(:disabled):not([aria-disabled="true"]) { background: var(--desktop-action-hover); }
  .btn-primary:disabled, .btn-primary[aria-disabled="true"] { color: var(--text-3); background: var(--surface-2); }
  .chip:disabled, .seg button:disabled, .tabs button:disabled, .icon-btn:disabled { color: var(--text-3); background: var(--surface-2); box-shadow: none; }
  .input, .select { min-height: 36px; }
  .input.sm, .select.sm { min-height: 30px; }
  .seg { align-items: stretch; }
  .seg button { min-height: 30px; }
  .seg button:hover:not(.active):not(:disabled), .tabs button:hover:not(.active):not(:disabled) { background: var(--surface-2); color: var(--text); }
  .seg button.active { box-shadow: none; }
  .chip.active .muted { color: inherit; }
  .xs { font-size: 12px; }
  .small { font-size: 12.5px; }
  :is(.table, .tbl, .crt-table, .st-row, .stat .val, .cand-metrics, .metric-grid, .dc-meta, .own-coverage, .sd-count) { font-variant-numeric: tabular-nums lining-nums; }

  /* A consistent desktop heading, section rhythm and quiet app shell. */
  .topbar { padding-inline: 28px; background: var(--bg-elev); backdrop-filter: none; -webkit-backdrop-filter: none; }
  .brand .logo { background: var(--desktop-action); box-shadow: none; }
  .side-nav .nav-sec-btn { letter-spacing: 0; padding-top: 12px; }
  .side-nav .nav-sub a { padding-block: 6px; }
  .side-nav :is(.nav-link.active, .nav-sub a.active) { color: var(--desktop-link); }
  .page { padding: 28px 28px 64px; }
  .page-head { align-items: flex-start; margin-bottom: 24px; gap: 16px 24px; }
  .page-head > * { min-width: 0; }
  .page-head > .row:last-child { flex-wrap: wrap; }
  .page-head h1 { font-size: 28px; line-height: 1.3; letter-spacing: -.025em; text-wrap: balance; }
  .page-head p { max-width: 72ch; margin-top: 8px; font-size: 13.5px; line-height: 1.6; overflow-wrap: anywhere; }
  .section-head { align-items: center; flex-wrap: wrap; gap: 8px 12px; margin: 28px 0 12px; }
  .section-head h3, .card-head h3 { font-size: 15px; line-height: 1.4; }
  .card-head { padding-block: 16px; flex-wrap: wrap; }
  .card, .ref-card, .board-card { box-shadow: none; }
  :is(.brand-card, .ref-card, .board-card):hover { transform: none; box-shadow: none; border-color: var(--border-strong); }
  .brand-card { padding: 20px; gap: 16px; }
  .brand-card .kpis { gap: 10px; }
  .brand-card .kpis div { font-size: 12px; }
  .live { color: var(--desktop-success); }
  .live i { animation: none; box-shadow: none; }
  .win-badge { background: var(--warning-soft); color: var(--desktop-warning); box-shadow: none; }
  .note, .own-refresh-note { border-left-width: 1px; }
  .home-weekly { border-top-width: 1px; border-top-color: var(--border); }
  .filters-row, .st-filters { gap: 10px 12px; margin-bottom: 16px; }
  .tabs { margin-bottom: 20px; scrollbar-width: thin; }
  .tabs::-webkit-scrollbar { display: block; height: 8px; }
  .tabs button { min-height: 40px; padding-inline: 16px; }
  .menu-tabs a { min-height: 36px; display: inline-flex; align-items: center; }

  /* Candidate comparison already uses .table; give it the same readable table surface as .tbl. */
  .table-wrap { width: 100%; max-width: 100%; overflow-x: auto; border: 1px solid var(--border); border-radius: var(--r); background: var(--surface); overscroll-behavior-inline: contain; }
  table.table { width: 100%; border-collapse: collapse; font-size: 13px; }
  :is(.table, .tbl, .crt-table) th { color: var(--text-2); font-size: 12px; line-height: 1.4; font-weight: 600; padding: 12px; text-align: left; letter-spacing: 0; text-transform: none; border-bottom: 1px solid var(--border); }
  :is(.table, .tbl, .crt-table) td { padding: 14px 12px; line-height: 1.55; border-bottom: 1px solid var(--border); }
  :is(.table, .tbl, .crt-table) tbody tr:last-child td { border-bottom: 0; }
  :is(.table, .tbl) :is(th.num, td.num) { text-align: right; }
  .cand-table { table-layout: fixed; min-width: 980px; }
  /* Existing inline nowrap must yield so nine headings fit without covering the next column. */
  .cand-table th { vertical-align: top; white-space: normal !important; }
  .cand-table td { vertical-align: top; overflow-wrap: anywhere; }
  .cand-table input[type="checkbox"] { width: 16px; height: 16px; margin: 4px 0; accent-color: var(--desktop-action); }
  .cand-table :is(th, td):first-child { width: 48px; min-width: 0; text-align: center; }
  .cand-table th:nth-child(2) { width: 156px; }
  .cand-table th:nth-child(3) { width: 88px; }
  .cand-table th:nth-child(4) { width: 174px; }
  .cand-table th:nth-child(5) { width: 104px; }
  .cand-table th:nth-child(6) { width: 86px; }
  .cand-table th:nth-child(7) { width: 118px; }
  .cand-table th:nth-child(8) { width: 88px; }
  .cand-table th:nth-child(9) { width: 118px; }
  .cand-table td:nth-child(3) { min-width: 0; max-width: none; }
  .cand-table :is(td:nth-child(3), td:nth-child(5), td:nth-child(6)) { white-space: nowrap; }
  .cand-sort { white-space: normal; min-height: 32px; line-height: 1.4; }
  .cand-handle { display: inline-block; max-width: 100%; white-space: normal; overflow-wrap: anywhere; }
  .cand-table tbody tr:hover td, .cand-table tbody tr:focus-visible td { background: var(--accent-soft); }
  .cand-table td .xs { margin-top: 3px; white-space: normal; }
  .cand-entry { gap: 24px; padding-block: 16px 20px; margin-bottom: 20px; }
  .cand-entry > div { min-width: 0; }
  .cand-entry > .btn { flex: none; }
  .cand-error { color: var(--desktop-danger); }
  .cand-selection-toolbar, .cand-compare-toolbar { display: flex; align-items: center; flex-wrap: wrap; gap: 10px 16px; padding: 12px 16px; margin-bottom: 12px; background: var(--surface-2); border: 1px solid var(--border); border-radius: var(--r); }
  .cand-selection-toolbar > .row, .cand-compare-toolbar > .row { flex-wrap: wrap; }
  .modal.cand-compare, .modal:has(.cand-compare-wrap) { max-width: 1200px; }
  .cand-compare-wrap { max-width: 100%; max-height: min(640px, calc(100dvh - 260px)); overflow: auto; background: var(--surface); border: 1px solid var(--border); border-radius: var(--r); overscroll-behavior: contain; }
  table.cand-compare-table { width: 100%; min-width: 800px; table-layout: fixed; border-collapse: separate; border-spacing: 0; font-size: 13px; font-variant-numeric: tabular-nums; }
  .cand-compare-table :is(th, td) { padding: 14px 16px; vertical-align: top; text-align: left; line-height: 1.55; border-bottom: 1px solid var(--border); overflow-wrap: anywhere; }
  .cand-compare-table thead th { position: sticky; top: 0; z-index: 2; background: var(--surface-2); font-size: 14px; }
  .cand-compare-table :is(th, td):first-child { position: sticky; left: 0; z-index: 1; width: 172px; background: var(--surface-2); border-right: 1px solid var(--border); font-weight: 600; }
  .cand-compare-table thead th:first-child { z-index: 3; }
  .cand-compare-table tbody tr:last-child :is(th, td) { border-bottom: 0; }

  /* Keep full desktop rows available through horizontal scrolling, including at exactly 1100px. */
  .st-filters > .row { flex: 1 1 440px; }
  .st-filters :is(.st-brand, .st-q) { min-height: 36px; }
  .st-filters .st-q { flex: 0 1 220px; margin-left: 0; }
  .st-filters .chip { min-height: 30px; }
  .st-tiles, .st-big, .sd-summary, .jgrid { gap: 16px; }
  .st-tile, .st-num, .stat { padding: 18px 20px; }
  .st-tile .val { white-space: normal; overflow-wrap: anywhere; }
  button.st-tile.on { box-shadow: none; background: var(--accent-soft); }
  .st-sorts { margin-top: 4px; align-items: center; }
  .st-table { overflow-x: auto; }
  .st-row { min-width: 920px; grid-template-columns: 56px minmax(200px, 2fr) minmax(105px, 1fr) minmax(136px, 1fr) minmax(175px, 1.25fr) minmax(110px, .85fr); gap: 16px; padding: 14px 16px; }
  .st-row > :last-child { display: block; }
  .st-headrow { color: var(--text-2); padding-block: 12px; line-height: 1.45; }
  a.st-row:hover { text-decoration: none; }
  a.st-row:hover .st-name b { color: var(--desktop-link); }
  .store-page .up, .store-page .mv.up, .store-line .up { color: var(--desktop-success); }
  .store-page .down, .store-page .mv.down { color: var(--desktop-danger); }
  :root .store-page .conf.c-low, .st-status .warn { color: var(--desktop-warning); }
  .st-hero { grid-template-columns: 220px minmax(0, 1fr); gap: 28px; }
  .st-hero-body h1 { font-size: 24px; line-height: 1.45; overflow-wrap: anywhere; }
  .sd-table { max-width: 100%; overflow-x: auto; padding-bottom: 4px; }
  .sd-row { min-width: 1040px; grid-template-columns: minmax(180px, 1.1fr) 172px minmax(300px, 2fr) minmax(160px, 1fr) 116px; padding: 16px; }
  .sd-row.sd-headrow { display: grid; padding-block: 8px; color: var(--text-2); font-size: 12px; }
  .sd-pipe { margin-bottom: 16px; gap: 8px; }
  .dc-legend { gap: 16px 24px; }
  .dc-src { margin-bottom: 24px; scroll-margin-top: calc(var(--topbar-h) + 20px); }
  .dc-tbl :is(td, th[scope="row"]) { padding-top: 16px; padding-bottom: 16px; }
  .dc-why { line-height: 1.6; }

  /* Centered reviews: generous section boundaries, readable figures and a stable scrolling body. */
  .modal-wrap, .content-dialog-wrap { padding: 32px; }
  .modal { max-height: calc(100dvh - 64px); border-radius: var(--r-lg); box-shadow: var(--sh-lg); }
  .modal-head { padding: 22px 24px 16px; gap: 16px; flex: none; }
  .modal-head h2 { font-size: 18px; line-height: 1.4; overflow-wrap: anywhere; }
  .modal-body { min-height: 0; padding: 4px 24px 24px; gap: 20px; overscroll-behavior: contain; }
  .modal-foot { padding: 16px 24px; align-items: center; flex-wrap: wrap; gap: 10px 16px; flex: none; }
  .content-dialog-wrap .drawer { height: min(850px, calc(100dvh - 64px)); border-radius: var(--r-lg); }
  .content-dialog-wrap .drawer .detail { padding: 24px 28px 32px; gap: 24px; }
  .drawer .detail section h4 { font-size: 13px; letter-spacing: 0; text-transform: none; }
  .cand-detail-head { gap: 24px; }
  .cand-detail-head p { margin-top: 6px; max-width: 75ch; line-height: 1.6; }
  .cand-metrics { gap: 20px; padding-block: 20px; }
  .cand-metrics dd { margin: 8px 0; font-size: 26px; line-height: 1.3; }
  .cand-detail h3 { font-size: 15px; margin-bottom: 10px; }
  .cand-detail-secondary { gap: 24px; }
  .cand-detail .cand-detail-secondary { padding-top: 20px; }
  .cand-detail .cand-posts { gap: 16px; }
  .cand-evidence ul { line-height: 1.8; }
  .crt-kpi .lbl, .crt-kpi .sub { font-size: 12px; }

  /* Home keeps selection first; guidance and secondary operational details share a quieter rhythm. */
  .home-guide { border-color: var(--border); }
  .home-guide h2, .influencer-start h2, .today-head h2 { font-size: 21px; line-height: 1.4; }
  .home-guide-steps { margin-top: 16px; }
  .home-guide-steps li { padding: 16px; }
  .home-guide-steps p { line-height: 1.65; }
  .influencer-start { margin-bottom: 28px; padding-bottom: 24px; }
  .influencer-start .section-head { margin-top: 24px; }
  .influencer-steps { margin-top: 20px; }
  .influencer-steps a { padding-block: 14px; gap: 8px; }
  .home-section-head { margin-top: 32px; }
  .home-section-head h2 { font-size: 19px; }

  /* Team workspace entry: restrained surfaces and product purpose, with blue reserved for actions. */
  .auth { min-height: 100dvh; max-width: 1280px; margin-inline: auto; grid-template-columns: minmax(0, 1fr) minmax(420px, .9fr); background: var(--surface); border-inline: 1px solid var(--border); }
  .auth .hero { background: var(--surface-2); color: var(--text); padding: 56px; }
  .auth .hero .logo { width: 32px; height: 32px; display: grid; place-items: center; border-radius: var(--r-sm); background: var(--desktop-action); color: var(--text-inv); box-shadow: none; }
  .auth .hero h1 { font-size: 34px; line-height: 1.35; letter-spacing: -.025em; max-width: 20ch; margin-top: 40px; text-wrap: balance; }
  .auth .hero p { color: var(--text-2); font-size: 14px; line-height: 1.75; max-width: 56ch; margin-top: 16px; }
  .auth-hero-copy { max-width: 520px; }
  .auth-features { display: grid; gap: 0; list-style: none; margin: 36px 0 0; padding: 0; max-width: 520px; }
  .auth-features li { display: flex; align-items: flex-start; gap: 12px; padding: 18px 0; border-top: 1px solid var(--border); font-size: 13px; color: var(--text-2); line-height: 1.65; }
  .auth-features li > svg { flex: none; margin-top: 2px; color: var(--desktop-link); }
  .auth-features li > div { min-width: 0; }
  .auth-features b { display: block; font-size: 14px; color: var(--text); margin-bottom: 4px; }
  .auth .hero .auth-hero-foot { color: var(--text-2); font-size: 12.5px; line-height: 1.6; border-top: 1px solid var(--border); padding-top: 18px; margin-top: 32px; }
  .auth .form { background: var(--surface); padding: 56px 48px; }
  .auth .form > div, .auth-signin { width: 100%; max-width: 400px; }
  .auth .form h2 { line-height: 1.4; letter-spacing: -.02em; }
  .auth .field { gap: 8px; }
  .auth .field label { font-size: 13px; }
  .auth .input { min-height: 44px; }
  .auth .form a { color: var(--desktop-link); }
  .auth .demo-box { border: 1px solid var(--border); background: var(--surface-2); font-size: 13px; line-height: 1.7; }
  .auth-password { position: relative; }
  .auth-password .input { padding-right: 48px; }
  .auth-password [data-password-toggle] { position: absolute; top: 50%; right: 6px; transform: translateY(-50%); width: 36px; height: 36px; display: grid; place-items: center; border-radius: var(--r-sm); color: var(--text-2); }
  .auth-password [data-password-toggle]:hover:not(:disabled) { background: var(--surface-2); color: var(--text); }
  .auth-error { color: var(--desktop-danger); background: var(--danger-soft); border: 1px solid color-mix(in srgb, var(--danger) 35%, var(--border)); border-radius: var(--r-sm); padding: 12px 14px; font-size: 13px; line-height: 1.6; }
  .auth-note { margin-top: 20px; color: var(--text-2); font-size: 12.5px; line-height: 1.7; }
}
