/* Shared workspace chrome: the web, installed PWA, and Mac shell use this file. */
:root {
  color-scheme: light;
  --ink: var(--pc-color-ink);
  --navy: var(--pc-color-navy);
  --paper: var(--pc-color-paper);
  --surface: #ffffff;
  --surface-soft: var(--pc-color-paper);
  --line: var(--pc-color-line);
  --muted: var(--pc-color-muted);
  --accent: var(--pc-color-accent);
  --accent-dark: var(--pc-color-action);
  --accent-soft: var(--pc-color-soft);
  --green: var(--pc-color-success);
  --shadow: 0 12px 36px rgba(26,39,68,.12);
  --radius: var(--pc-radius-card);
  --topbar: 56px;
  --rail: 216px;
}
* { box-sizing: border-box; }
html { min-height: 100%; background: var(--paper); }
body { min-height: 100%; margin: 0; color: var(--ink); background: var(--paper); font: 15px/1.5 'Space Grotesk', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif; }
button, input, textarea, select { font: inherit; }
button, a { -webkit-tap-highlight-color: transparent; }
a, button { color: inherit; }
[hidden] { display: none !important; }
:focus-visible { outline: 3px solid var(--pc-color-accent); outline-offset: 3px; }
.skip-link { position: fixed; z-index: 100; top: 8px; left: 8px; transform: translateY(-160%); background: var(--navy); color: white; padding: 10px 14px; border-radius: var(--pc-radius-control); }
.skip-link:focus { transform: none; }

.topbar { position: sticky; z-index: 30; top: 0; height: var(--topbar); display: flex; align-items: center; justify-content: space-between; padding: 0 24px 0 18px; border-bottom: 1px solid var(--line); background: var(--surface); }
.brand { display: inline-flex; align-items: center; gap: 9px; color: var(--navy); text-decoration: none; font: 900 17px/1 'Nunito', sans-serif; letter-spacing: -.025em; }
.brand img { width: 26px; height: 26px; object-fit: contain; }
.topbar-actions { position: relative; display: flex; align-items: center; gap: 14px; }
.account-button { min-height: 44px; border: 0; background: transparent; display: flex; align-items: center; gap: 9px; border-radius: var(--pc-radius-control); padding: 5px 8px; cursor: pointer; font-size: 13px; font-weight: 500; }
.account-button:hover { background: var(--surface-soft); }
.avatar { width: 30px; height: 30px; display: inline-grid; place-items: center; flex: none; border-radius: 50%; background: var(--pc-color-soft); color: var(--navy); font: 600 11px/1 'Space Grotesk', sans-serif; overflow: hidden; }
.avatar img { width: 100%; height: 100%; object-fit: cover; }
.account-popover { position: absolute; z-index: 50; top: calc(100% + 8px); right: 0; width: min(280px, calc(100vw - 24px)); padding: 16px; border: 1px solid var(--line); border-radius: 10px; background: white; box-shadow: var(--shadow); }
.account-popover p { margin: 0 0 12px; color: var(--muted); overflow-wrap: anywhere; }
.release-banner { position: sticky; z-index: 25; top: var(--topbar); display: flex; align-items: center; justify-content: center; gap: 12px; min-height: 46px; padding: 7px 16px; background: var(--navy); color: white; }
.workspace-layout { min-height: calc(100vh - var(--topbar)); display: grid; grid-template-columns: var(--rail) minmax(0,1fr); }
.project-rail { position: sticky; top: var(--topbar); align-self: start; height: calc(100vh - var(--topbar)); padding: 20px 12px; overflow-y: auto; border-right: 1px solid var(--line); background: var(--pc-color-paper); }
.release-banner:not([hidden]) + .workspace-layout .project-rail { top: calc(var(--topbar) + 46px); height: calc(100vh - var(--topbar) - 46px); }
.workspace-nav-link { min-height: 44px; display: flex; align-items: center; gap: 11px; padding: 10px 12px; border-radius: var(--pc-radius-control); text-decoration: none; font-weight: 600; }
.workspace-nav-link[aria-current="page"] { color: var(--navy); background: var(--pc-color-soft); }
.workspace-nav-link:hover { background: var(--pc-color-paper); }
.rail-heading { display: flex; align-items: center; justify-content: space-between; margin-top: 26px; padding: 0 10px 5px; color: var(--muted); font-size: 11px; font-weight: 500; }
.project-nav-group { margin: 12px 0 22px; }
.project-nav-group h2 { margin: 0 10px 6px; color: var(--muted); font-size: 11px; font-weight: 500; }
.project-nav-link { width: 100%; min-height: 42px; border: 0; display: grid; grid-template-columns: 24px minmax(0,1fr); align-items: center; gap: 9px; padding: 7px 10px; border-radius: var(--pc-radius-control); background: transparent; text-align: left; cursor: pointer; font-size: 12px; }
.project-nav-link:hover { background: var(--pc-color-paper); }
.project-nav-link[aria-current="page"] { background: var(--pc-color-soft); color: var(--navy); }
.project-nav-link span:nth-child(2) { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-weight: 500; }
.project-dot { width: 24px; height: 24px; display: grid; place-items: center; border: 1px solid var(--pc-color-line); border-radius: 5px; background: white; color: var(--pc-color-subtle); font-size: 9px; font-weight: 600; }
.role-chip { display: inline-flex; align-items: center; padding: 3px 7px; border-radius: 5px; background: var(--surface-soft); color: var(--muted); font-size: 11px; font-weight: 500; white-space: nowrap; }
#app-main { min-width: 0; padding: 36px 40px 60px; }
.page { max-width: 1280px; margin: 0 auto; }
.page-heading { display: flex; align-items: center; justify-content: space-between; gap: 24px; margin-bottom: 26px; }
.page-heading h1 { margin: 0; font: 800 28px/1.2 'Nunito', sans-serif; letter-spacing: -.025em; color: var(--navy); }
.page-heading p:not(.eyebrow) { margin: 5px 0 0; color: var(--muted); font-size: 13px; }
.heading-actions { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }
.eyebrow { margin: 0 0 8px; color: var(--muted); font-size: 12px; font-weight: 500; }
.button, .icon-button { border: 1px solid transparent; cursor: pointer; transition: background .15s, border-color .15s; }
.button { min-height: 44px; padding: 9px 14px; border-radius: var(--pc-radius-control); font-size: 14px; font-weight: 600; white-space: nowrap; }
.button:disabled, .icon-button:disabled { opacity: .5; cursor: not-allowed; }
.button-primary { background: var(--accent-dark); color: white; }
.button-primary:hover { background: var(--pc-color-action-hover); }
.button-secondary { border-color: var(--pc-color-line); background: white; color: var(--navy); }
.button-secondary:hover, .button-quiet:hover { border-color: var(--pc-color-subtle); background: var(--surface-soft); }
.button-quiet { border-color: var(--line); background: white; color: var(--ink); }
.button-danger { border-color: #efc0ba; background: #fff8f7; color: #b42318; }
.button-small { min-height: 36px; padding: 7px 11px; font-size: 12px; }
.icon-button { width: 44px; height: 44px; border-radius: var(--pc-radius-control); display: inline-grid; place-items: center; background: transparent; border-color: transparent; color: var(--muted); font-size: 20px; line-height: 1; }
.icon-button:hover { background: var(--pc-color-soft); color: var(--navy); }

.library-toolbar { display: flex; align-items: center; justify-content: space-between; gap: 20px; margin-bottom: 30px; padding-bottom: 16px; border-bottom: 1px solid var(--line); }
.project-filters { display: flex; flex-wrap: wrap; gap: 4px; }
.project-filter { min-height: 36px; border: 0; border-radius: var(--pc-radius-control); background: transparent; padding: 8px 12px; color: var(--muted); font-size: 12px; font-weight: 500; cursor: pointer; }
.project-filter[aria-pressed="true"] { color: var(--navy); background: var(--pc-color-paper); font-weight: 600; }
.project-filter:hover { background: var(--surface-soft); }
.search-wrap { position: relative; width: 280px; flex: 0 1 280px; }
.search-wrap::before { content: ''; position: absolute; left: 12px; top: 12px; width: 10px; height: 10px; border: 1.5px solid var(--muted); border-radius: 50%; pointer-events: none; }
.search-wrap::after { content: ''; position: absolute; left: 22px; top: 22px; width: 5px; height: 1.5px; background: var(--muted); transform: rotate(45deg); pointer-events: none; }
.search-wrap input { width: 100%; height: 38px; padding: 8px 12px 8px 34px; border: 1px solid var(--line); border-radius: var(--pc-radius-control); background: var(--surface); font-size: 12px; color: var(--ink); }
.section-heading { display: flex; align-items: baseline; justify-content: space-between; gap: 12px; margin: 0 0 12px; }
.section-heading h2 { margin: 0; color: var(--ink); font-size: 13px; font-weight: 600; }
.section-heading span { color: var(--muted); font-size: 12px; }
.card-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(min(100%,240px),1fr)); gap: 20px; }
.project-library { margin-top: 30px; }
.project-card { min-width: 0; border: 1px solid var(--line); border-radius: var(--radius); overflow: hidden; background: white; transition: border-color .15s, box-shadow .15s; }
.project-card:hover { border-color: var(--pc-color-subtle); box-shadow: 0 4px 16px rgba(26,39,68,.06); }
.card-button { width: 100%; border: 0; padding: 0; background: transparent; text-align: left; cursor: pointer; }
.project-card > .card-button { display: block; height: 100%; }
.project-card:focus-within { transition: none; box-shadow: inset 0 0 0 3px var(--pc-color-accent); }
html[data-pc-surface] .project-card > .card-button:focus-visible { outline-offset: -4px; }
.project-card-preview { position: relative; aspect-ratio: 16/10; overflow: hidden; border-bottom: 1px solid var(--line); background: var(--pc-color-paper); }
.project-thumbnail { width: 100%; height: 100%; display: block; object-fit: cover; object-position: top center; }
.project-preview-empty { height: 100%; display: flex; align-items: center; justify-content: center; flex-direction: column; gap: 12px; color: var(--muted); font-size: 11px; }
.project-mark { width: 44px; height: 44px; display: grid; place-items: center; border: 1px solid var(--pc-color-line); border-radius: 10px; background: white; color: var(--pc-color-muted); font-size: 15px; font-weight: 500; }
.project-card-preview > .visibility-badge { position: absolute; top: 12px; right: 12px; }
.visibility-badge { display: inline-flex; align-items: center; padding: 4px 8px; border: 1px solid rgba(26,39,68,.1); border-radius: 5px; font-size: 10px; font-weight: 500; line-height: 1.35; background: rgba(255,255,255,.96); color: var(--navy); }
.project-card-caption { padding: 14px 16px 13px; }
.project-card h3 { margin: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; color: var(--navy); font-size: 14px; font-weight: 600; }
.project-origin { display: block; margin-top: 3px; overflow: hidden; color: var(--muted); font-size: 11px; text-overflow: ellipsis; white-space: nowrap; }
.card-meta { display: flex; align-items: center; justify-content: space-between; gap: 10px; margin-top: 16px; }
.project-updated, .project-role { color: var(--muted); font-size: 11px; white-space: nowrap; }
.project-role { text-transform: capitalize; }
.recent-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(min(100%,240px),1fr)); gap: 12px; }
.recent-card { min-width: 0; padding: 13px 15px; border: 1px solid var(--line); border-radius: 8px; background: white; }
.recent-card:hover { background: var(--surface-soft); }
.recent-card h3 { margin: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; color: var(--navy); font-size: 12px; font-weight: 500; }
.recent-card p { margin: 3px 0 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; color: var(--muted); font-size: 11px; }
.search-empty { padding: 40px 20px; text-align: center; color: var(--muted); }
.empty-state { max-width: 580px; margin: 80px auto; padding: 32px; border: 1px solid var(--line); border-radius: var(--pc-radius-card); background: white; text-align: center; }
.empty-state h2, .empty-state h3 { margin: 0 0 8px; color: var(--navy); font: 800 20px/1.3 'Nunito', sans-serif; }
.empty-state p { margin: 0 0 20px; color: var(--muted); }

.project-header { display: flex; align-items: center; justify-content: space-between; gap: 20px; margin-bottom: 28px; }
.breadcrumb { padding: 0; border: 0; background: transparent; color: var(--muted); font-size: 11px; cursor: pointer; margin-bottom: 12px; }
.breadcrumb:hover { color: var(--navy); }
.project-title { display: flex; align-items: center; gap: 14px; }
.project-header h1 { margin: 0; color: var(--navy); font: 800 28px/1.2 'Nunito', sans-serif; letter-spacing: -.025em; }
.project-header p { margin: 4px 0 0; color: var(--muted); font-size: 12px; }
.tabs { display: flex; gap: 24px; margin-bottom: 24px; border-bottom: 1px solid var(--line); overflow-x: auto; }
.tab { position: relative; border: 0; padding: 10px 0 13px; background: transparent; cursor: pointer; font-size: 12px; font-weight: 500; color: var(--muted); }
.tab[aria-selected="true"] { color: var(--navy); font-weight: 600; }
.tab[aria-selected="true"]::after { content: ''; position: absolute; bottom: 0; left: 0; right: 0; height: 2px; background: var(--accent); }
.panel { padding: 24px; border: 1px solid var(--line); border-radius: 10px; background: white; }
.panel-heading { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin-bottom: 24px; }
.panel-heading h2 { margin: 0; color: var(--navy); font-size: 14px; font-weight: 600; }
.review-list { margin: 0 -24px -24px; }
.review-list-labels { display: grid; grid-template-columns: minmax(0,1fr) 100px 134px; gap: 20px; padding: 10px 24px; border-top: 1px solid var(--line); background: var(--pc-color-paper); color: var(--muted); font-size: 10px; }
.review-card { display: grid; grid-template-columns: minmax(0,1fr) 100px 134px; gap: 20px; align-items: center; padding: 18px 24px; border-top: 1px solid var(--line); }
.review-card:hover { background: var(--pc-color-paper); }
.review-card h3 { margin: 0; color: var(--navy); font-size: 13px; font-weight: 500; }
.review-card p { margin: 3px 0 0; color: var(--muted); font-size: 11px; }
.page-url { overflow-wrap: anywhere; }
.review-created { color: var(--muted); font-size: 11px; }
.url-count { font-size: 11px; color: var(--muted); }
.settings-list { margin: 24px 0 0; }
.settings-list > div { display: grid; grid-template-columns: minmax(140px,.6fr) 1fr; gap: 16px; padding: 13px 0; border-bottom: 1px solid var(--line); }
.settings-list dt { color: var(--muted); }
.settings-list dd { margin: 0; overflow-wrap: anywhere; }
label, legend { display: block; margin: 16px 0 6px; font-size: 12px; font-weight: 500; }
input[type="text"], input[type="email"], input[type="number"], input[type="url"], textarea, select { width: 100%; border: 1px solid var(--pc-color-line); border-radius: var(--pc-radius-control); background: white; padding: 10px 11px; color: var(--ink); font-size: 13px; }
textarea { resize: vertical; }
.field-note { color: var(--muted); font-weight: 400; }
fieldset { margin: 20px 0 0; padding: 14px; border: 1px solid var(--line); border-radius: 8px; }
legend { padding: 0 5px; }
.choice, .toggle-row { display: flex; align-items: flex-start; gap: 10px; margin: 10px 0; font-weight: 400; cursor: pointer; }
.choice input, .toggle-row input { margin-top: 4px; accent-color: var(--accent); }
.choice b, .toggle-row b { display: block; font-size: 12px; font-weight: 500; }
.choice small, .toggle-row small { display: block; color: var(--muted); font-size: 11px; }
.additional-settings { margin-top: 20px; padding-top: 14px; border-top: 1px solid var(--line); }
.additional-settings summary { cursor: pointer; color: var(--muted); font-size: 12px; }
.form-error { min-height: 20px; color: #b42318; font-size: 12px; }
.inline-form { display: grid; grid-template-columns: minmax(170px,1fr) minmax(120px,.45fr) auto; align-items: end; gap: 12px; margin-bottom: 24px; }
.member-list { display: grid; }
.member-row { display: grid; grid-template-columns: 32px minmax(0,1fr) minmax(110px,.4fr) auto; align-items: center; gap: 12px; padding: 14px 0; border-top: 1px solid var(--line); }
.member-row p { margin: 0; overflow: hidden; text-overflow: ellipsis; font-size: 12px; }
.member-row small { color: var(--muted); font-size: 11px; }
.member-row > .role-chip { justify-self: start; }
.invite-result { display: flex; gap: 8px; margin-top: 12px; }
.invite-result input { min-width: 0; font-family: 'Space Mono', monospace; font-size: 11px; }
.access-note { padding: 12px 14px; border-radius: var(--pc-radius-control); background: var(--surface-soft); color: var(--muted); font-size: 12px; }
.panel + .panel { margin-top: 24px; }
.connect-lede { margin: -12px 0 20px; color: var(--muted); font-size: 12px; }
.connect-option { padding: 20px 0; border-top: 1px solid var(--line); }
.connect-option:last-child { padding-bottom: 0; }
.connect-option h3 { display: flex; align-items: center; gap: 8px; margin: 0 0 6px; color: var(--navy); font-size: 13px; font-weight: 600; }
.connect-option > p { margin: 0 0 12px; color: var(--muted); font-size: 12px; }
.connect-form { display: grid; grid-template-columns: minmax(180px,1fr) minmax(100px,.4fr) minmax(130px,.5fr) auto; align-items: end; gap: 12px; }
.connect-form label { margin-top: 0; }
.connect-file { margin: 12px 0; }
.connect-file summary { cursor: pointer; color: var(--muted); font-size: 12px; }
.connect-path { margin: 12px 0 6px; font: 400 11px/1.5 var(--pc-font-mono); color: var(--navy); }
.connect-code { margin: 0 0 8px; padding: 12px 14px; overflow-x: auto; border: 1px solid var(--line); border-radius: var(--pc-radius-control); background: var(--surface-soft); color: var(--ink); font: 400 11px/1.6 var(--pc-font-mono); white-space: pre; }
.connect-option .access-note { margin: 12px 0 0; }
.connect-option .invite-result input { flex: 1; font-family: var(--pc-font-mono); }
.dialog { width: min(560px,calc(100vw - 32px)); max-height: calc(100vh - 48px); overflow: auto; border: 1px solid var(--line); border-radius: var(--pc-radius-card); padding: 0; box-shadow: 0 28px 80px rgba(26,39,68,.2); }
.dialog::backdrop { background: rgba(26,39,68,.32); }
.dialog form { padding: 28px; }
.dialog-heading { display: flex; justify-content: space-between; gap: 20px; align-items: flex-start; }
.dialog-heading h2 { margin: 0; color: var(--navy); font: 800 24px/1.2 'Nunito',sans-serif; }
.dialog-actions { display: flex; justify-content: flex-end; gap: 10px; margin-top: 20px; }
.auth-page, .error-page { min-height: calc(100vh - var(--topbar) - 100px); display: grid; place-items: center; }
.auth-card { width: min(400px,100%); padding: 32px; border: 1px solid var(--line); border-radius: var(--pc-radius-card); background: white; text-align: center; }
.auth-card img { width: 52px; height: 52px; object-fit: contain; }
.auth-card h1 { margin: 20px 0 10px; color: var(--navy); font: 800 25px/1.2 'Nunito', sans-serif; }
.auth-card p { color: var(--muted); font-size: 13px; }
.auth-card .button { width: 100%; margin-top: 12px; min-height: 44px; }
/* A focused login card over the home background; error/update cards stay separate. */
#app-main.auth-main { padding: 0; }
.auth-welcome {
  min-height: calc(100svh - var(--topbar));
  padding: 32px 24px;
}
.auth-sign-in {
  position: relative; z-index: 1; width: min(400px, 100%); padding: 32px;
  text-align: center; box-shadow: var(--pc-shadow-card);
}
.auth-sign-in img { width: 48px; height: 48px; }
.auth-sign-in .eyebrow { margin: 20px 0 0; color: var(--muted); font: 400 10px/1.5 var(--pc-font-mono); text-transform: uppercase; letter-spacing: .1em; }
.auth-sign-in h1 { margin: 20px 0 12px; font-size: 28px; line-height: 1.15; letter-spacing: -.025em; }
.auth-sign-in p:not(.eyebrow) { margin: 0; font-size: 14px; line-height: 1.6; }
.auth-sign-in .button { min-height: 52px; margin-top: 24px; font-size: 15px; }
.auth-legal { display: flex; justify-content: center; gap: 24px; margin-top: 20px; }
.auth-legal a { display: inline-flex; align-items: center; min-height: 44px; color: var(--muted); font-size: 12px; text-decoration: underline; text-underline-offset: 3px; }
.auth-legal a:hover { color: var(--navy); }
@media (max-width: 440px) {
  .auth-welcome { padding: 24px 16px; }
  .auth-sign-in { padding: 28px 24px; }
  .auth-sign-in h1 { font-size: 26px; }
}
@media (max-height: 600px) { .auth-welcome { padding-block: 20px; } }
.update-required { border-top: 3px solid var(--accent); }
.app-shell[data-view="auth"] .workspace-layout, .app-shell[data-view="review"] .workspace-layout { grid-template-columns: minmax(0,1fr); }
.app-shell[data-view="review"] .project-rail { display: none; }
#app-main.review-main { padding: 0; height: calc(100vh - var(--topbar)); overflow: hidden; background: white; }
.release-banner:not([hidden]) + .workspace-layout #app-main.review-main { height: calc(100vh - var(--topbar) - 46px); }
.review-shell { height: 100%; display: grid; grid-template-rows: 44px minmax(0,1fr); }
.review-bar { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 4px 16px; border-bottom: 1px solid var(--line); background: var(--pc-color-paper); }
.review-bar-main { display: flex; min-width: 0; align-items: center; gap: 12px; }
.review-bar-title { min-width: 0; }
.review-bar-title b, .review-bar-title small { display: block; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.review-bar-title b { font-size: 12px; font-weight: 500; }
.review-bar-title small { color: var(--muted); font-size: 10px; }
.review-frame { width: 100%; height: 100%; border: 0; background: white; }
.toast { position: fixed; z-index: 100; right: 20px; bottom: 20px; max-width: min(420px,calc(100vw - 40px)); padding: 12px 16px; border-radius: 8px; background: var(--navy); color: white; box-shadow: var(--shadow); }
.noscript { margin: 30px; padding: 18px; background: #fff3cd; }
.loading-state { min-height: calc(100vh - var(--topbar) - 100px); display: grid; place-content: center; justify-items: center; color: var(--muted); }
.loading-pin { width: 18px; height: 18px; border-radius: 50%; border: 2px solid var(--line); border-top-color: var(--accent); animation: loading-spin .8s linear infinite; }
@keyframes loading-spin { to { transform: rotate(360deg); } }
@media (max-width: 1100px) { #app-main { padding: 28px; } .library-toolbar { gap: 12px; } .project-filter { padding: 8px 10px; } .search-wrap { flex-basis: 220px; } }
@media (max-width: 820px) {
  .workspace-layout { grid-template-columns: minmax(0,1fr); }
  .project-rail { position: static; width: 100%; height: auto; padding: 8px 16px; border-right: 0; border-bottom: 1px solid var(--line); overflow: auto; display: flex; align-items: center; gap: 12px; }
  .workspace-nav-link { flex: none; min-height: 40px; padding: 8px 10px; font-size: 12px; }
  .rail-heading { display: none; }
  #project-nav { display: flex; flex: none; gap: 6px; }
  .project-nav-group { display: contents; }
  .project-nav-group h2 { display: none; }
  .project-nav-link { width: auto; max-width: 190px; min-width: 140px; }
  #app-main { padding: 26px 20px 48px; }
  .library-toolbar { align-items: stretch; flex-direction: column-reverse; gap: 14px; }
  .search-wrap { width: 100%; flex-basis: auto; }
  .search-wrap input { height: 44px; }
  .search-wrap::before { top: 15px; } .search-wrap::after { top: 25px; }
  .project-filter { min-height: 44px; }
  .inline-form { grid-template-columns: minmax(0,1fr); }
  .connect-form { grid-template-columns: minmax(0,1fr); }
  .member-row { grid-template-columns: 30px minmax(0,1fr) auto; }
  .member-row select { grid-column: 2/-1; }
  .button { min-height: 44px; }
}
@media (max-width: 540px) {
  .topbar { padding: 0 12px; }
  .brand { font-size: 16px; gap: 7px; }
  .brand img { width: 24px; height: 24px; }
  #account-name { display: none; }
  .topbar-actions { gap: 6px; }
  .topbar-actions .button { padding: 8px; font-size: 11px; }
  .page-heading { align-items: flex-start; flex-direction: column; gap: 18px; margin-bottom: 22px; }
  .page-heading h1 { font-size: 26px; }
  .page-heading .heading-actions { width: 100%; gap: 8px; }
  .page-heading .heading-actions .button { flex: 1; padding: 9px 10px; font-size: 11px; }
  .project-filters { justify-content: space-between; gap: 0; }
  .project-filter { padding: 8px; font-size: 11px; }
  .card-grid, .recent-grid { gap: 16px; }
  .recent-grid { grid-template-columns: none; grid-auto-flow: column; grid-auto-columns: minmax(180px,65%); gap: 10px; overflow-x: auto; padding: 3px; margin: -3px; }
  .recent-card { padding: 10px 12px; }
  .project-header { align-items: flex-start; flex-direction: column; gap: 18px; }
  .project-header h1 { font-size: 26px; }
  .project-title { gap: 10px; }
  .panel { padding: 18px; }
  .review-list { margin: 0 -18px -18px; }
  .review-list-labels { display: none; }
  .review-card { grid-template-columns: minmax(0,1fr) auto; gap: 12px; padding: 18px; }
  .review-card .button { grid-column: 1/-1; width: 100%; }
  .review-created { font-size: 10px; }
  .review-bar { padding: 4px 8px; gap: 8px; }
  .review-bar-title small { display: none; }
  .review-bar .button { min-height: 36px; padding: 6px 8px; font-size: 11px; }
  .dialog form { padding: 22px; }
  .settings-list > div { grid-template-columns: minmax(0,1fr); gap: 5px; }
}
@media (prefers-reduced-motion: reduce) { *, *::before, *::after { scroll-behavior: auto !important; animation-duration: .001ms !important; animation-iteration-count: 1 !important; transition-duration: .001ms !important; } }

@media (hover: none) { .button-small, .tab, .project-nav-link, .project-filter { min-height: 44px; } input[type="text"], input[type="email"], input[type="number"], input[type="url"], textarea, select { min-height: 44px; font-size: 16px; } }
