/* Studio: calm, professional, hand-written. No gradients, glow, uppercase badges or hover lifts. */
:root {
  color-scheme: light;
  --blue: #3772a3;
  --blue-hover: #2f6491;
  --blue-dark: #244c6e;
  --tint: #eaf1f7;
  --tint-2: #f3f7fb;
  --ink: #1a2733;
  --muted: #5b6b7a;
  --faint: #8494a3;
  --line: #dfe6ec;
  --line-strong: #c9d3dc;
  --bg: #f4f6f8;
  --panel: #fff;
  --green: #1a7f4b;
  --green-bg: #e5f5ec;
  --amber: #805509;
  --amber-bg: #fdf3dd;
  --red: #b42318;
  --red-bg: #fdecec;
  --red-line: #f4c8c8;
  --radius: 8px;
  --radius-lg: 10px;
  --shadow-pop: 0 8px 28px rgba(16, 35, 56, .14), 0 1px 3px rgba(16, 35, 56, .08);
  --font: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Arial, sans-serif;
  --mono: ui-monospace, SFMono-Regular, Consolas, "Liberation Mono", monospace;
}

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body { margin: 0; background: var(--bg); color: var(--ink); font: 15px/1.55 var(--font); }
a { color: var(--blue); text-decoration: none; }
a:hover { text-decoration: underline; }
button, input, select, textarea { font: inherit; color: inherit; }
img, svg { display: block; }
[hidden] { display: none !important; }
:focus-visible { outline: 3px solid #8fb5d4; outline-offset: 2px; }
h1 { font-size: 26px; line-height: 1.25; font-weight: 650; letter-spacing: -.4px; color: var(--blue-dark); margin: 0; overflow-wrap: anywhere; }
h1:focus { outline: none; }
h2 { font-size: 17px; line-height: 1.35; font-weight: 650; color: var(--blue-dark); margin: 0 0 12px; }
h3 { font-size: 16px; font-weight: 650; margin: 0 0 6px; color: var(--ink); }
p { margin: 0 0 12px; }
kbd { font: 12px/1 var(--mono); padding: 2px 5px; border: 1px solid var(--line-strong); border-bottom-width: 2px; border-radius: 4px; background: var(--panel); color: var(--ink); }
.muted { color: var(--muted); }
.small { font-size: 13px; }
.hint { font-size: 13px; color: var(--muted); margin: 6px 0 0; }
.optional { font-weight: 400; color: var(--faint); font-size: 12px; margin-left: 4px; }
.text-warn { color: var(--amber); }
.visually-hidden { position: absolute !important; width: 1px !important; height: 1px !important; min-width: 0 !important; padding: 0 !important; margin: -1px !important; overflow: hidden !important; clip: rect(0 0 0 0) !important; white-space: nowrap !important; border: 0 !important; }
.offscreen { position: fixed; left: -9999px; top: 0; opacity: 0; }
.skip-link { position: absolute; left: 12px; top: -48px; z-index: 100; background: var(--panel); padding: 8px 12px; border-radius: var(--radius); border: 1px solid var(--line); }
.skip-link:focus { top: 10px; }

/* ---------- icons ---------- */
.icon { width: 18px; height: 18px; flex: 0 0 auto; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }
.icon-xs { width: 13px; height: 13px; }
.icon-sm { width: 16px; height: 16px; }
.icon-xl { width: 40px; height: 40px; stroke-width: 1.4; }

/* ---------- buttons ---------- */
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 7px; min-height: 38px; padding: 7px 14px; border: 1px solid var(--line-strong); border-radius: var(--radius); background: var(--panel); color: var(--ink); font-weight: 500; cursor: pointer; text-decoration: none; white-space: nowrap; transition: border-color .12s, background-color .12s; position: relative; }
.btn:hover { border-color: var(--blue); text-decoration: none; }
.btn:disabled, .btn.is-disabled { opacity: .55; cursor: not-allowed; }
.btn[aria-busy=true] { cursor: progress; }
.btn-primary { background: var(--blue); border-color: var(--blue); color: #fff; }
.btn-primary:hover { background: var(--blue-hover); border-color: var(--blue-hover); }
.btn-danger { background: var(--red); border-color: var(--red); color: #fff; }
.btn-danger:hover { background: #9a1d13; border-color: #9a1d13; }
.btn-quiet { background: transparent; border-color: transparent; color: var(--blue); }
.btn-quiet:hover { background: var(--tint); border-color: transparent; }
.btn-sm { min-height: 32px; padding: 4px 10px; font-size: 14px; gap: 6px; }
.btn-block { width: 100%; }
label.btn:focus-within { outline: 3px solid #8fb5d4; outline-offset: 2px; }
.icon-button { display: inline-flex; align-items: center; justify-content: center; width: 34px; height: 34px; padding: 0; border: 1px solid transparent; border-radius: var(--radius); background: transparent; color: var(--muted); cursor: pointer; }
.icon-button:hover { background: var(--tint); color: var(--ink); }
.icon-button[data-menu-toggle][aria-expanded=true] { background: var(--tint); color: var(--ink); }
.link-button { border: 0; background: none; padding: 0; color: var(--blue); cursor: pointer; font-size: inherit; display: inline-flex; align-items: center; gap: 5px; }
.link-button:hover { text-decoration: underline; }
.link-button.danger { color: var(--red); }
.button-row { display: flex; flex-wrap: wrap; gap: 8px; }

/* ---------- forms ---------- */
input:where(:not([type=checkbox]):not([type=radio]):not([type=file])), select, textarea { display: block; width: 100%; min-width: 0; padding: 9px 11px; border: 1px solid var(--line-strong); border-radius: 7px; background: var(--panel); color: var(--ink); }
input:focus, select:focus, textarea:focus { border-color: var(--blue); outline: 3px solid #d4e3f0; outline-offset: 0; }
input[readonly] { background: var(--bg); }
textarea { resize: vertical; min-height: 64px; }
input[type=checkbox], input[type=radio] { width: 16px; height: 16px; margin: 0; accent-color: var(--blue); flex: 0 0 auto; }
.field { display: grid; gap: 6px; margin: 0; padding: 0; border: 0; min-width: 0; }
.field > label, .field > legend, .label-row label { font-size: 14px; font-weight: 600; color: var(--ink); }
legend { padding: 0; margin-bottom: 6px; }
fieldset { border: 0; margin: 0; padding: 0; min-width: 0; }
.label-row { display: flex; justify-content: space-between; align-items: baseline; gap: 10px; }
.small-link { font-size: 13px; }
.stack { display: grid; gap: 16px; }
.check { display: flex; align-items: center; gap: 9px; font-size: 14px; cursor: pointer; }
.check-list { display: grid; gap: 8px; padding: 10px 12px; border: 1px solid var(--line); border-radius: var(--radius); max-height: 220px; overflow: auto; }
.radio-list { display: grid; gap: 6px; }
.radio-row { display: flex; align-items: center; gap: 10px; padding: 10px 12px; border: 1px solid var(--line); border-radius: var(--radius); cursor: pointer; }
.radio-row:has(input:checked) { border-color: var(--blue); background: var(--tint-2); }
.radio-cards { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }
.radio-cards.stack { grid-template-columns: 1fr; }
.radio-card { display: flex; gap: 10px; align-items: flex-start; padding: 11px 12px; border: 1px solid var(--line); border-radius: var(--radius); cursor: pointer; font-size: 14px; }
.radio-card input { margin-top: 3px; }
.radio-card > span { display: grid; gap: 2px; }
.radio-card .muted { font-size: 13px; line-height: 1.4; }
.radio-card:has(input:checked) { border-color: var(--blue); background: var(--tint-2); }
.password-wrap { position: relative; }
.password-wrap input { padding-right: 44px; }
.password-toggle { position: absolute; right: 3px; top: 50%; transform: translateY(-50%); }
.password-tools { display: flex; gap: 8px; }
.copy-row { display: flex; gap: 8px; }
.copy-row input { font-family: var(--mono); font-size: 13px; }
.strength { height: 4px; border-radius: 2px; background: var(--line); overflow: hidden; margin-top: 4px; }
.strength-bar { display: block; height: 100%; width: 0; background: var(--line-strong); transition: width .2s; }
.strength-bar.level-1 { width: 33%; background: #c98a1b; }
.strength-bar.level-2 { width: 66%; background: var(--blue); }
.strength-bar.level-3 { width: 100%; background: var(--green); }

.alert { padding: 10px 13px; border-radius: 7px; margin: 0; font-size: 14px; overflow-wrap: anywhere; }
.alert-error { background: var(--red-bg); color: var(--red); border: 1px solid var(--red-line); }
.alert-warn { background: var(--amber-bg); color: #5c3d06; border: 1px solid #f1dfb6; }
.mono { font-family: var(--mono); font-size: 13px; }
.callout { display: flex; gap: 10px; align-items: flex-start; margin-top: 14px; padding: 12px 14px; border-radius: var(--radius); background: var(--tint); color: var(--blue-dark); font-size: 14px; }
.callout .icon { margin-top: 2px; }

/* ---------- top bar ---------- */
.topbar { background: var(--panel); border-bottom: 1px solid var(--line); position: sticky; top: 0; z-index: 30; }
.topbar-inner { max-width: 1240px; margin: 0 auto; padding: 0 24px; height: 60px; display: flex; align-items: center; gap: 28px; }
.brand { display: flex; align-items: center; gap: 14px; text-decoration: none; flex: 0 0 auto; }
.brand:hover { text-decoration: none; }
.logo { height: 30px; width: auto; }
.brand-label { font-size: 14px; font-weight: 600; color: var(--blue-dark); border-left: 1px solid var(--line); padding-left: 14px; }
.mainnav { display: flex; gap: 4px; align-self: stretch; }
.mainnav a { display: flex; align-items: center; padding: 0 12px; color: var(--muted); font-weight: 500; border-bottom: 2px solid transparent; margin-bottom: -1px; text-decoration: none; }
.mainnav a:hover { color: var(--ink); }
.mainnav a[aria-current=page] { color: var(--blue-dark); border-bottom-color: var(--blue); }
.usermenu { margin-left: auto; position: relative; }
.usermenu-button { display: flex; align-items: center; gap: 8px; padding: 4px 8px 4px 4px; border: 1px solid transparent; border-radius: 20px; background: transparent; cursor: pointer; color: var(--ink); }
.usermenu-button:hover, .usermenu-button[aria-expanded=true] { background: var(--tint); }
.usermenu-name { font-size: 14px; max-width: 160px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.avatar { display: inline-flex; align-items: center; justify-content: center; width: 30px; height: 30px; border-radius: 50%; background: var(--tint); color: var(--blue-dark); font-size: 12px; font-weight: 650; flex: 0 0 auto; letter-spacing: .2px; }
.avatar-sm { width: 24px; height: 24px; font-size: 10.5px; }
.avatars { display: inline-flex; }
.avatars .avatar { border: 2px solid var(--panel); margin-left: -6px; }
.avatars .avatar:first-child { margin-left: 0; }
.avatar-more { background: var(--bg); color: var(--muted); }

/* ---------- menus ---------- */
.menu-wrap { position: relative; display: inline-flex; }
.menu { position: absolute; top: calc(100% + 6px); left: 0; z-index: 40; min-width: 210px; padding: 5px; background: var(--panel); border: 1px solid var(--line); border-radius: var(--radius-lg); box-shadow: var(--shadow-pop); }
.menu-right { left: auto; right: 0; }
.menu-up { top: auto; bottom: calc(100% + 6px); }
/* an open menu floats above everything, positioned from JS against the viewport, so no
   scrolling table or panel can clip it */
.menu.is-floating { position: fixed; right: auto; bottom: auto; z-index: 70; max-height: calc(100vh - 16px); overflow-y: auto; }
.menu [role=menuitem] { display: flex; align-items: center; gap: 9px; width: 100%; padding: 8px 10px; border: 0; border-radius: 6px; background: none; color: var(--ink); text-align: left; cursor: pointer; font-size: 14px; white-space: nowrap; text-decoration: none; }
.menu [role=menuitem]:hover, .menu [role=menuitem]:focus-visible { background: var(--tint); outline: none; }
.menu [role=menuitem] .icon { color: var(--muted); }
.menu [role=menuitem].danger, .menu [role=menuitem].danger .icon { color: var(--red); }
.menu [role=menuitem].danger:hover { background: var(--red-bg); }
.menu-head { display: grid; padding: 8px 10px 10px; border-bottom: 1px solid var(--line); margin-bottom: 5px; font-size: 14px; }
.menu-head span { color: var(--muted); font-size: 13px; overflow-wrap: anywhere; }

/* ---------- layout ---------- */
.wrap { max-width: 1240px; margin: 0 auto; padding: 28px 24px 64px; }
.wrap:focus { outline: none; }
body.has-tray .wrap { padding-bottom: calc(40px + var(--tray-h, 100px)); }
body.has-bottom-bar .wrap { padding-bottom: calc(40px + var(--bottom-bar, 0px) + var(--tray-h, 0px)); }
.page-head { display: flex; justify-content: space-between; align-items: flex-start; gap: 16px 24px; margin-bottom: 20px; flex-wrap: wrap; }
.page-head > div:first-child { min-width: 0; flex: 1 1 320px; }
.page-head p.muted { margin: 6px 0 0; }
.page-actions { display: flex; gap: 8px; align-items: center; flex-wrap: wrap; }
.panel { background: var(--panel); border: 1px solid var(--line); border-radius: var(--radius-lg); }
.card { padding: 20px 22px; }
.card-head { display: flex; justify-content: space-between; align-items: baseline; gap: 12px; flex-wrap: wrap; margin-bottom: 12px; }
.card-head h2 { margin: 0; }
h2 .icon { display: inline-block; vertical-align: -2px; margin-right: 6px; color: var(--muted); }
.crumbs { margin-bottom: 10px; font-size: 14px; }
.crumbs a { display: inline-flex; align-items: center; gap: 4px; color: var(--muted); }
.crumbs a:hover { color: var(--blue); }

/* ---------- banners ---------- */
.banners:empty { display: none; }
.banner { border-bottom: 1px solid var(--line); }
.banner-inner { max-width: 1240px; margin: 0 auto; padding: 12px 24px; display: flex; gap: 12px; align-items: flex-start; }
.banner-icon { margin-top: 2px; }
.banner-text { display: grid; gap: 2px; font-size: 14px; min-width: 0; flex: 1; }
.banner-warn { background: var(--amber-bg); color: #5c3d06; }
.banner-warn .banner-icon { color: var(--amber); }
.banner-info { background: var(--tint); color: var(--blue-dark); }
.inline-banner { border: 0; border-radius: var(--radius); margin-bottom: 16px; }
.inline-banner .banner-inner { padding: 10px 14px; }
.pending-list { list-style: none; margin: 8px 0 0; padding: 0; display: grid; gap: 6px; }
.pending-list li { display: flex; flex-wrap: wrap; align-items: center; gap: 4px 12px; padding: 8px 10px; background: rgba(255, 255, 255, .6); border-radius: 7px; }
.pending-name { font-weight: 600; overflow-wrap: anywhere; }
.pending-actions { display: flex; gap: 6px; margin-left: auto; }
.pending-actions label.btn { cursor: pointer; }

/* ---------- skeletons ---------- */
.skeleton { display: block; border-radius: 6px; background: #e7ecf0; animation: pulse 1.4s ease-in-out infinite; }
@keyframes pulse { 50% { opacity: .55; } }
@media (prefers-reduced-motion: reduce) { .skeleton { animation: none; } }
.skeleton-title { width: 240px; max-width: 70%; height: 28px; margin-bottom: 20px; }
.skeleton-row { height: 64px; margin-bottom: 10px; }
.page-loading { padding-top: 4px; }
.skeleton-list { padding: 6px 0; }
.skeleton-item { display: flex; gap: 14px; align-items: center; padding: 12px 16px; }
.skeleton-item + .skeleton-item { border-top: 1px solid var(--line); }
.skeleton-thumb { width: 72px; height: 42px; flex: 0 0 auto; }
.skeleton-lines { display: grid; gap: 8px; flex: 1; }
.skeleton-line { height: 12px; width: 55%; }
.skeleton-line.short { width: 30%; }
.skeleton-player { aspect-ratio: 16 / 9; border-radius: var(--radius-lg); }
.skeleton-panel { min-height: 320px; border-radius: var(--radius-lg); }

/* ---------- empty states ---------- */
.empty { text-align: center; padding: 48px 24px; background: var(--panel); border: 1px dashed var(--line-strong); border-radius: var(--radius-lg); color: var(--muted); }
.empty-icon { margin: 0 auto 12px; color: var(--faint); }
.empty h3 { color: var(--ink); }
.empty p { max-width: 460px; margin: 0 auto 16px; }
.empty .btn { margin-top: 4px; }
.empty-error .empty-icon { color: var(--red); }

/* ---------- toolbar, search, segmented ---------- */
.toolbar { display: flex; flex-wrap: wrap; gap: 10px 16px; align-items: center; justify-content: space-between; margin-bottom: 14px; }
.toolbar-left, .toolbar-right { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; }
.toolbar-right { gap: 12px; }
.search { position: relative; flex: 0 1 340px; min-width: 200px; }
.search input { padding-left: 36px; }
.search-icon { position: absolute; left: 11px; top: 50%; transform: translateY(-50%); color: var(--faint); pointer-events: none; }
.search-sm { flex-basis: 220px; min-width: 160px; }
.search-sm input { min-height: 38px; padding-top: 6px; padding-bottom: 6px; }
.segmented { display: inline-flex; padding: 3px; border: 1px solid var(--line); border-radius: var(--radius); background: var(--panel); }
.segmented button { border: 0; background: none; padding: 6px 14px; border-radius: 6px; color: var(--muted); cursor: pointer; font-weight: 500; }
.segmented button[aria-pressed=true] { background: var(--tint); color: var(--blue-dark); }
.select-sm { min-height: 34px; padding: 5px 30px 5px 10px !important; font-size: 14px; width: auto !important; }

/* ---------- project list ---------- */
.project-list { list-style: none; margin: 0; padding: 0; overflow: hidden; }
.project-row + .project-row { border-top: 1px solid var(--line); }
.project-link { display: flex; align-items: center; gap: 16px; padding: 16px 18px; color: inherit; text-decoration: none; }
.project-link:hover { background: var(--tint-2); text-decoration: none; }
.project-link:hover .project-name { color: var(--blue); }
.project-icon { width: 42px; height: 42px; border-radius: var(--radius); background: var(--tint); color: var(--blue); display: inline-flex; align-items: center; justify-content: center; flex: 0 0 auto; }
.project-main { display: grid; gap: 3px; min-width: 0; flex: 1; }
.project-title { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }
.project-name { font-weight: 600; font-size: 16px; color: var(--ink); overflow-wrap: anywhere; }
.project-meta { display: flex; flex-wrap: wrap; gap: 4px 16px; font-size: 13.5px; color: var(--muted); }
.project-meta > span { display: inline-flex; align-items: center; gap: 5px; }
.project-activity { font-size: 13px; color: var(--faint); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.project-note { font-size: 13px; color: var(--muted); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-style: italic; }
.project-side { display: flex; align-items: center; gap: 14px; flex: 0 0 auto; }
.chevron { color: var(--faint); }
.list-foot { margin: 10px 2px 0; }

/* ---------- status and chips ---------- */
.status { display: inline-flex; align-items: center; gap: 6px; font-size: 13px; font-weight: 500; padding: 2px 9px 2px 8px; border-radius: 20px; background: var(--bg); color: var(--muted); border: 1px solid var(--line); white-space: nowrap; }
.status::before { content: ""; width: 7px; height: 7px; border-radius: 50%; background: currentColor; opacity: .85; }
.status-planned { color: #5b6b7a; }
.status-editing { color: var(--blue); background: var(--tint-2); border-color: #d3e1ee; }
.status-review { color: var(--amber); background: var(--amber-bg); border-color: #f1dfb6; }
.status-approved { color: var(--green); background: var(--green-bg); border-color: #c4e6d3; }
.status-changes { color: #9a3d12; background: #fdf0e8; border-color: #f2d3bf; }
.status-published { color: #3f4b57; background: #eef1f4; }
.status-select { position: relative; display: inline-flex; align-items: center; }
.status-select select { appearance: none; -webkit-appearance: none; width: auto; min-height: 32px; padding: 4px 30px 4px 12px; border-radius: 20px; font-size: 13.5px; font-weight: 500; cursor: pointer; background: var(--panel); }
.status-select .icon { position: absolute; right: 11px; pointer-events: none; color: var(--muted); }
.status-select.status-editing select { border-color: #b7cde2; color: var(--blue-dark); }
.status-select.status-review select { border-color: #e9cf95; color: var(--amber); }
.status-select.status-approved select { border-color: #a9d8bd; color: var(--green); }
.status-select.status-changes select { border-color: #ecc4ab; color: #9a3d12; }
.chip { display: inline-flex; align-items: center; gap: 4px; padding: 1px 8px; border-radius: 5px; font-size: 12.5px; font-weight: 500; background: var(--bg); color: var(--muted); white-space: nowrap; border: 1px solid var(--line); }
.chip-version { background: var(--tint); color: var(--blue-dark); border-color: #d3e1ee; font-variant-numeric: tabular-nums; }
.chip-ok { background: var(--green-bg); color: var(--green); border-color: #c4e6d3; }
.chip-warn { background: var(--amber-bg); color: var(--amber); border-color: #f1dfb6; }
.chip-muted { background: var(--bg); color: var(--muted); }
.chip-new { background: var(--tint); color: var(--blue-dark); border-color: #c9dbeb; }
.project-hint { font-size: 12.5px; color: var(--muted); white-space: nowrap; }
a.chip:hover { text-decoration: none; border-color: currentColor; }
.chip-lg { font-size: 14px; padding: 5px 10px; border-radius: var(--radius); }

/* ---------- project page ---------- */
.project-head { margin-bottom: 8px; }
.project-head-main { display: grid; gap: 10px; min-width: 0; flex: 1 1 auto; }
.project-title-row { display: flex; align-items: flex-start; gap: 12px; justify-content: space-between; min-width: 0; }
.project-title-row h1 { min-width: 0; }
.project-title-row .menu-wrap { flex: 0 0 auto; }
.fact-plain { color: var(--muted); }
.fact-plain:hover { color: var(--blue); }
.next-step { display: flex; align-items: center; flex-wrap: wrap; gap: 8px 12px; margin: 14px 0 0; padding: 10px 14px; border: 1px solid #d3e1ee; border-radius: var(--radius); background: var(--tint-2); color: var(--blue-dark); font-size: 14.5px; max-width: 860px; }
.next-step > .icon { color: var(--blue); }
.next-text { flex: 1 1 240px; min-width: 0; }
.next-step:empty { display: none; }
.invite-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.invite-fields .field > label { font-weight: 500; font-size: 13.5px; }
.project-facts { display: flex; flex-wrap: wrap; align-items: center; gap: 8px 18px; font-size: 14px; color: var(--muted); }
.fact { display: inline-flex; align-items: center; gap: 6px; min-width: 0; }
.fact.link-button { color: var(--blue); }
.brief { max-width: 760px; font-size: 14px; }
.brief summary { cursor: pointer; color: var(--blue); width: fit-content; }
.brief-text { margin-top: 8px; padding: 12px 14px; background: var(--panel); border: 1px solid var(--line); border-radius: var(--radius); white-space: pre-wrap; overflow-wrap: anywhere; color: var(--ink); }
.tabs { display: flex; gap: 4px; border-bottom: 1px solid var(--line); margin: 18px 0 16px; overflow-x: auto; scrollbar-width: none; }
.tabs::-webkit-scrollbar { display: none; }
.tabs a { display: inline-flex; align-items: center; gap: 8px; padding: 10px 12px; color: var(--muted); font-weight: 500; border-bottom: 2px solid transparent; margin-bottom: -1px; white-space: nowrap; text-decoration: none; }
.tabs a:hover { color: var(--ink); text-decoration: none; }
.tabs a[aria-current=page] { color: var(--blue-dark); border-bottom-color: var(--blue); }
.tab-count { font-size: 12px; min-width: 20px; padding: 0 6px; border-radius: 10px; background: var(--bg); color: var(--muted); text-align: center; font-variant-numeric: tabular-nums; }
.tabs a[aria-current=page] .tab-count { background: var(--tint); color: var(--blue-dark); }
.tab-new { width: 7px; height: 7px; border-radius: 50%; background: var(--blue); margin-left: -3px; }
.tab-short { display: none; }
.only-sm { display: none !important; }

/* ---------- file list ---------- */
.file-list { list-style: none; margin: 0; padding: 0; }
.file-row { display: flex; align-items: center; gap: 14px; padding: 12px 16px; }
.file-row + .file-row { border-top: 1px solid var(--line); }
.file-row:hover { background: var(--tint-2); }
.file-row.is-uploading { opacity: .7; }
.file-thumb { position: relative; width: 80px; height: 45px; flex: 0 0 auto; border-radius: 6px; background: var(--bg); border: 1px solid var(--line); color: var(--faint); display: inline-flex; align-items: center; justify-content: center; overflow: hidden; }
.file-thumb img { width: 100%; height: 100%; object-fit: cover; }
.file-thumb.kind-video { color: var(--blue); }
.thumb-play { position: absolute; right: 4px; bottom: 4px; width: 20px; height: 20px; border-radius: 50%; background: rgba(16, 35, 56, .7); color: #fff; display: inline-flex; align-items: center; justify-content: center; }
.thumb-play .icon { width: 10px; height: 10px; fill: currentColor; stroke-width: 1; margin-left: 1px; }
.file-main { flex: 1; min-width: 0; display: grid; gap: 2px; }
.file-title { display: flex; align-items: center; gap: 8px; min-width: 0; }
.file-name { font-weight: 550; color: var(--ink); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; min-width: 0; }
a.file-name:hover { color: var(--blue); }
.file-meta { display: flex; flex-wrap: wrap; align-items: center; gap: 0 2px; font-size: 13px; color: var(--muted); }
.file-comments { display: inline-flex; align-items: center; gap: 4px; margin-left: 12px; color: var(--muted); }
.file-comments:hover { color: var(--blue); text-decoration: none; }
.file-actions { display: flex; align-items: center; gap: 6px; flex: 0 0 auto; }

/* ---------- activity ---------- */
.activity { margin-top: 32px; max-width: 760px; }
.activity h2 { font-size: 15px; }
.activity-list { list-style: none; margin: 0 0 8px; padding: 0; display: grid; gap: 10px; }
.activity-list li { display: flex; gap: 10px; align-items: flex-start; font-size: 14px; }
.activity-line { flex: 1; min-width: 0; display: flex; flex-wrap: wrap; align-items: baseline; gap: 2px 8px; }
.activity-text { min-width: 0; overflow-wrap: anywhere; color: var(--muted); }
.activity-text strong { color: var(--ink); font-weight: 600; }
.activity-list time { white-space: nowrap; color: var(--faint); }
.activity-note { flex: 1 1 100%; color: var(--ink); font-style: italic; overflow-wrap: anywhere; white-space: pre-line; }

/* ---------- dialogs ---------- */
dialog.modal { width: min(520px, calc(100% - 24px)); max-height: calc(100vh - 32px); padding: 0; border: 1px solid var(--line); border-radius: 12px; background: var(--panel); color: var(--ink); box-shadow: var(--shadow-pop); }
dialog.modal-wide { width: min(720px, calc(100% - 24px)); }
dialog::backdrop { background: rgba(16, 35, 56, .45); }
.modal-form { display: grid; gap: 16px; padding: 20px 22px 18px; }
.modal-head { display: flex; justify-content: space-between; align-items: flex-start; gap: 12px; }
.modal-head h2 { margin: 2px 0 0; font-size: 18px; overflow-wrap: anywhere; }
.modal-head .icon-button { margin: -4px -8px 0 0; }
.modal-desc { margin: -8px 0 0; font-size: 14px; }
.modal-body { display: grid; gap: 16px; }
.modal-message { margin: 0; color: var(--muted); overflow-wrap: anywhere; }
.modal-actions { display: flex; justify-content: flex-end; gap: 8px; padding-top: 4px; flex-wrap: wrap; }

/* ---------- toasts ---------- */
.toasts { position: fixed; left: 50%; bottom: 24px; transform: translateX(-50%); z-index: 60; display: grid; gap: 8px; width: min(460px, calc(100% - 24px)); pointer-events: none; }
body.has-tray .toasts, body.has-sheet .toasts, body.has-bottom-bar .toasts { bottom: auto; top: 72px; }
.toast { display: flex; align-items: flex-start; gap: 10px; padding: 11px 10px 11px 14px; border-radius: var(--radius-lg); background: #1f2d3a; color: #fff; box-shadow: var(--shadow-pop); font-size: 14px; pointer-events: auto; animation: toast-in .16s ease-out; }
.toast > span { flex: 1; padding-top: 1px; overflow-wrap: anywhere; }
.toast .icon { margin-top: 2px; }
.toast-success > .icon { color: #7fd1a5; }
.toast-error { background: #fff; color: var(--red); border: 1px solid var(--red-line); }
.toast-info > .icon { color: #9cc1e0; }
.toast-close { width: 26px; height: 26px; color: inherit; opacity: .7; }
.toast-close:hover { opacity: 1; background: rgba(127, 127, 127, .15); }
.toast-out { opacity: 0; transition: opacity .18s; }
@keyframes toast-in { from { opacity: 0; transform: translateY(6px); } }
@media (prefers-reduced-motion: reduce) { .toast { animation: none; } }

/* ---------- drop overlay ---------- */
.drop-overlay { position: fixed; inset: 0; z-index: 50; background: rgba(234, 241, 247, .92); display: flex; align-items: center; justify-content: center; padding: 16px; pointer-events: none; }
.drop-overlay-inner { display: grid; justify-items: center; gap: 12px; padding: 40px 48px; border: 2px dashed var(--blue); border-radius: 14px; background: var(--panel); color: var(--blue-dark); text-align: center; max-width: 520px; }
.drop-overlay-inner p { margin: 0; font-size: 18px; font-weight: 600; }
.drop-overlay.is-blocked .drop-overlay-inner { border-color: var(--line-strong); color: var(--muted); }

/* ---------- upload tray ---------- */
.tray { position: fixed; right: 20px; bottom: 20px; z-index: 45; width: 400px; max-width: calc(100% - 24px); max-height: min(70vh, 620px); display: flex; flex-direction: column; background: var(--panel); border: 1px solid var(--line); border-radius: 12px; box-shadow: var(--shadow-pop); overflow: hidden; }
.tray-head { display: flex; align-items: center; gap: 4px; padding: 6px 6px 6px 4px; border-bottom: 1px solid var(--line); }
.tray-toggle { flex: 1; min-width: 0; display: grid; text-align: left; gap: 0; padding: 4px 10px; border: 0; background: none; cursor: pointer; border-radius: var(--radius); }
.tray-toggle:hover { background: var(--tint-2); }
.tray-title { font-weight: 600; font-size: 14.5px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.tray-detail { font-size: 13px; color: var(--muted); font-variant-numeric: tabular-nums; }
.tray-detail:empty { display: none; }
.tray-head-actions { display: flex; }
.tray-total { padding: 0 14px; margin-top: -1px; }
.tray-total .progress { height: 3px; border-radius: 0; }
.tray-body { overflow-y: auto; }
.tray.is-collapsed .tray-body { display: none; }
.tray.is-collapsed .tray-head { border-bottom: 0; }
.tray.is-offline .tray-detail { color: var(--amber); }
.tray-list { list-style: none; margin: 0; padding: 4px 0; }
.tray-item { padding: 9px 14px 10px; display: grid; gap: 6px; }
.tray-item + .tray-item { border-top: 1px solid var(--line); }
.tray-item-row { display: flex; align-items: center; gap: 8px; min-width: 0; }
.tray-item-icon { color: var(--muted); display: inline-flex; }
.tray-item.is-done .tray-item-icon { color: var(--green); }
.tray-item.is-error .tray-item-icon { color: var(--red); }
.tray-item-name { flex: 1; min-width: 0; font-size: 14px; font-weight: 500; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.tray-item-actions { display: flex; align-items: center; gap: 2px; }
.tray-item-actions .icon-button { width: 28px; height: 28px; }
.tray-item-meta { font-size: 12.5px; color: var(--muted); font-variant-numeric: tabular-nums; overflow-wrap: anywhere; }
.tray-item.is-error .tray-item-meta { color: var(--red); }
.tray-item.is-canceled .tray-item-name { color: var(--muted); text-decoration: line-through; }
.tray-item.is-lost .tray-item-meta, .tray-item.is-lost .tray-item-icon { color: var(--amber); }
.progress { display: block; height: 6px; border-radius: 3px; background: #e7ecf0; overflow: hidden; }
.progress-sm { height: 4px; }
.progress-bar { display: block; height: 100%; width: 0; background: var(--blue); border-radius: inherit; transition: width .3s linear; }
.tray-item.is-paused .progress-bar { background: var(--faint); }
.tray-item.is-error .progress-bar { background: var(--red); }
.tray-item.is-completing .progress-bar { width: 100% !important; }

.tray-notify:empty { display: none; }
.notify-card { display: grid; gap: 10px; margin: 10px; padding: 14px; border: 1px solid #cfe0ee; border-radius: var(--radius-lg); background: var(--tint-2); }
.notify-head { display: flex; gap: 10px; align-items: flex-start; }
.notify-head > div { display: grid; font-size: 14px; min-width: 0; overflow-wrap: anywhere; }
.notify-head .muted { font-size: 13px; }
.notify-ok { color: var(--green); margin-top: 2px; }
.notify-question { margin: 0; font-weight: 600; font-size: 14.5px; }
.notify-recipients { display: grid; gap: 6px; }
.notify-one { margin: 0; font-size: 14px; color: var(--ink); }
.notify-card textarea { min-height: 54px; font-size: 14px; }
.notify-actions { display: flex; gap: 8px; flex-wrap: wrap; }
.notify-loading { margin: 0; font-size: 13px; }
.notify-card .hint { margin: 0; }
.notify-slot:empty { display: none; }
.notify-slot { margin: 0 0 14px; }
.notify-slot .notify-card { margin: 0; max-width: 620px; }
.notify-slot .notify-card + .notify-card { margin-top: 10px; }
.notify-in-tray { padding: 12px; gap: 8px; }
.notify-in-tray textarea { min-height: 44px; }
.notify-sheet { position: fixed; left: 0; right: 0; bottom: var(--bottom-bar, 0px); z-index: 46; max-height: 70vh; overflow-y: auto; background: var(--panel); border-top: 1px solid var(--line); box-shadow: var(--shadow-pop); padding: 4px 0 calc(4px + env(safe-area-inset-bottom, 0px)); }
.notify-sheet .notify-card { margin: 8px 10px; }
body.has-sheet .wrap { padding-bottom: calc(40px + var(--sheet-h, 0px) + var(--tray-h, 0px)); }

/* ---------- download all ---------- */
.download-panel { margin: 0 0 14px; padding: 10px 14px 12px; max-width: 620px; }
.download-head { display: flex; align-items: center; gap: 8px; font-size: 14px; }
.download-head strong { flex: 1; }
.download-head .icon { color: var(--blue); }
.download-panel .hint { margin: 4px 0 6px; }
.download-list { list-style: none; margin: 6px 0 0; padding: 0; display: grid; gap: 2px; max-height: 220px; overflow-y: auto; font-size: 13.5px; }
.download-list li { display: flex; align-items: baseline; gap: 10px; padding: 3px 0; }
.download-name { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.download-list li.is-waiting .download-name { color: var(--muted); }

/* ---------- review ---------- */
.review-head { align-items: flex-end; }
.review-title { min-width: 0; flex: 1 1 360px; display: grid; gap: 6px; }
.review-title h1 { font-size: 22px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.review-meta { display: flex; flex-wrap: wrap; align-items: center; gap: 6px 14px; font-size: 14px; }
.older-open { display: flex; flex-wrap: wrap; align-items: center; gap: 4px 6px; margin: 0; font-size: 13.5px; color: var(--muted); }
.older-open .icon { color: var(--amber); }
.version-select { position: relative; display: inline-flex; align-items: center; }
.version-select select { appearance: none; -webkit-appearance: none; width: auto; min-height: 30px; padding: 3px 28px 3px 10px; font-size: 13.5px; font-weight: 500; color: var(--blue-dark); background: var(--tint); border-color: #d3e1ee; cursor: pointer; }
.version-select .icon { position: absolute; right: 9px; pointer-events: none; color: var(--blue-dark); }
.approve-slot { display: inline-flex; align-items: center; gap: 6px; }
.approve-slot:empty { display: none; }
.review-grid { display: grid; grid-template-columns: minmax(0, 1fr) 360px; gap: 20px; align-items: start; }
.review-loading .review-grid { margin-top: 8px; }
.player-col { min-width: 0; }
.player-box { background: #0f1720; border-radius: var(--radius-lg); overflow: hidden; display: flex; flex-direction: column; align-items: center; justify-content: center; min-height: 220px; }
.player { display: block; width: 100%; max-height: calc(100vh - 240px); background: #000; }
.player-image { max-width: 100%; max-height: calc(100vh - 220px); object-fit: contain; background: #0f1720; }
.audio-wrap { display: grid; justify-items: center; gap: 22px; width: 100%; padding: 48px 24px; color: #9db4c8; }
.player-audio { width: min(560px, 100%); }
.player-fallback { display: grid; justify-items: center; gap: 4px; text-align: center; padding: 56px 24px; color: #c8d4df; }
.player-fallback .icon { color: #8fa6ba; margin-bottom: 8px; }
.player-fallback p { margin: 0; }
.player-fallback strong { color: #fff; font-size: 16px; }
.player-fallback .muted { color: #9fb1c1; margin-bottom: 14px; }
.player-note { margin: 0; padding: 8px 12px; color: #c8d4df; font-size: 13px; text-align: center; }
.timeline { margin-top: 12px; }
.timeline-track { position: relative; height: 26px; cursor: pointer; }
.timeline-track::before { content: ""; position: absolute; left: 0; right: 0; top: 11px; height: 4px; border-radius: 2px; background: #dfe6ec; }
.timeline-played { position: absolute; left: 0; top: 11px; height: 4px; width: 0; border-radius: 2px; background: var(--blue); pointer-events: none; }
.timeline-markers { position: absolute; inset: 0; }
.marker { position: absolute; top: 4px; width: 14px; height: 18px; margin-left: -7px; padding: 0; border: 0; background: none; cursor: pointer; }
.marker::before { content: ""; position: absolute; left: 3px; top: 1px; width: 8px; height: 8px; border-radius: 50%; background: #d48a12; border: 2px solid var(--panel); box-sizing: content-box; }
.marker:hover::before, .marker:focus-visible::before { background: var(--amber); transform: scale(1.25); }
.marker.is-resolved::before { background: var(--faint); }
.timeline-times { display: flex; justify-content: space-between; font-size: 12.5px; color: var(--muted); font-variant-numeric: tabular-nums; }
.shortcuts { margin: 10px 0 0; display: flex; flex-wrap: wrap; align-items: center; gap: 4px 6px; }
.shortcuts kbd + kbd { margin-left: -2px; }
.comments-col { display: flex; flex-direction: column; max-height: calc(100vh - 140px); position: sticky; top: 76px; min-height: 300px; }
/* the upload tray sits bottom right: the panel ends above it, so Send feedback stays visible */
body.has-tray .comments-col { max-height: calc(100vh - 92px - var(--tray-h, 0px)); }
.comments-head { display: flex; justify-content: space-between; align-items: baseline; gap: 10px; padding: 14px 16px 10px; border-bottom: 1px solid var(--line); }
.comments-head h2 { margin: 0; font-size: 15px; }
.comment-list { list-style: none; margin: 0; padding: 0; overflow-y: auto; flex: 1; min-height: 80px; }
.comment { padding: 12px 16px; border-bottom: 1px solid var(--line); transition: background-color .4s; }
.comment.is-resolved { opacity: .62; }
.comment.is-flash { background: var(--amber-bg); }
.comment-head { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; font-size: 14px; }
.comment-body { margin: 6px 0 0; white-space: pre-wrap; overflow-wrap: anywhere; font-size: 14.5px; }
.timecode { display: inline-flex; align-items: center; margin-right: 7px; padding: 0 6px; border: 1px solid #f1dfb6; border-radius: 5px; background: var(--amber-bg); color: var(--amber); font: 600 12.5px/20px var(--mono); cursor: pointer; vertical-align: 1px; }
.timecode:hover { border-color: var(--amber); }
.comment-actions { display: flex; gap: 14px; margin-top: 6px; font-size: 13px; }
.comment-sent { display: flex; align-items: center; gap: 5px; margin: 4px 0 0; }
.comment-sent .icon { color: var(--green); }
.whole { color: var(--muted); font-weight: 500; }
.comment-actions:empty { display: none; }
.comment-actions .link-button { color: var(--muted); }
.comment-actions .link-button:hover { color: var(--blue); }
.comment-actions .link-button.danger:hover { color: var(--red); }
.comment-edit { display: grid; gap: 8px; margin-top: 8px; }
.comment-edit-actions { display: flex; justify-content: flex-end; gap: 6px; }
.comment-empty { padding: 22px 16px; font-size: 14px; }
.comment-form { display: grid; gap: 8px; padding: 12px 16px; border-top: 1px solid var(--line); background: var(--tint-2); }
.comment-form textarea { min-height: 72px; background: var(--panel); }
.comment-form .hint { margin: 0; font-size: 12.5px; }
.comment-form-row { display: flex; justify-content: space-between; align-items: center; gap: 10px; }
.time-toggle { display: inline-flex; align-items: center; gap: 7px; font-size: 13.5px; color: var(--muted); cursor: pointer; }
.time-toggle #comment-time { font-family: var(--mono); color: var(--amber); font-weight: 600; }
.feedback-bar { padding: 12px 16px 14px; border-top: 1px solid var(--line); }
.feedback-bar .hint { text-align: center; }

/* ---------- team ---------- */
.table-wrap { overflow-x: auto; }
.table { width: 100%; border-collapse: collapse; font-size: 14px; }
.table th { text-align: left; font-weight: 600; font-size: 13px; color: var(--muted); padding: 10px 14px; border-bottom: 1px solid var(--line); white-space: nowrap; }
.table td { padding: 12px 14px; border-bottom: 1px solid var(--line); vertical-align: middle; }
.table tbody tr:last-child td { border-bottom: 0; }
.table tbody tr:hover { background: var(--tint-2); }
.table tr.is-disabled .person strong, .table tr.is-disabled td { color: var(--muted); }
.cell-person { display: flex; align-items: center; gap: 12px; min-width: 220px; }
.person { display: grid; min-width: 0; }
.person strong { font-weight: 600; }
.person-email { font-size: 13px; overflow-wrap: anywhere; }
.cell-actions { width: 48px; text-align: right; }
.storage-card { margin-top: 24px; max-width: 760px; }
.storage-total strong { font-size: 18px; color: var(--blue-dark); }
.usage-list { list-style: none; margin: 0 0 12px; padding: 0; display: grid; gap: 8px; }
.usage-list li { display: grid; grid-template-columns: minmax(0, 220px) 1fr auto; align-items: center; gap: 12px; font-size: 14px; }
.usage-name { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.usage-bar { height: 6px; border-radius: 3px; background: #e7ecf0; overflow: hidden; }
.usage-fill { display: block; height: 100%; width: 0; background: var(--blue); border-radius: inherit; }
.usage-size { font-variant-numeric: tabular-nums; color: var(--muted); font-size: 13px; text-align: right; min-width: 70px; }

/* ---------- settings ---------- */
.settings-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 18px; max-width: 980px; align-items: start; }
.switch-row { display: flex; gap: 14px; align-items: flex-start; cursor: pointer; }
.switch-row > span:last-child { display: grid; gap: 3px; font-size: 14px; }
.switch-row.is-disabled { cursor: not-allowed; opacity: .65; }
.switch { position: relative; flex: 0 0 auto; width: 40px; height: 24px; margin-top: 1px; }
.switch input { position: absolute; inset: 0; width: 100%; height: 100%; opacity: 0; margin: 0; cursor: inherit; z-index: 1; }
.switch-ui { position: absolute; inset: 0; border-radius: 12px; background: var(--line-strong); transition: background-color .15s; }
.switch-ui::after { content: ""; position: absolute; left: 3px; top: 3px; width: 18px; height: 18px; border-radius: 50%; background: #fff; box-shadow: 0 1px 2px rgba(0, 0, 0, .2); transition: transform .15s; }
.switch input:checked + .switch-ui { background: var(--green); }
.switch input:checked + .switch-ui::after { transform: translateX(16px); }
.switch input:focus-visible + .switch-ui { outline: 3px solid #8fb5d4; outline-offset: 2px; }

/* ---------- auth pages ---------- */
.auth-body { min-height: 100vh; display: flex; }
.auth-wrap { flex: 1; display: flex; flex-direction: column; align-items: center; justify-content: center; padding: 32px 16px; }
.auth-card { width: min(420px, 100%); background: var(--panel); border: 1px solid var(--line); border-radius: 12px; padding: 32px 30px 28px; }
.auth-logo { height: 34px; width: auto; margin-bottom: 26px; }
.auth-card h1 { font-size: 23px; margin-bottom: 6px; }
.auth-card > p.muted, .auth-card #forgot-start > p.muted, .auth-card #forgot-done > p.muted { margin-bottom: 22px; }
.auth-card form { margin: 0; }
.auth-switch { margin: 20px 0 0; font-size: 14px; text-align: center; }
.auth-used { margin: 18px 0 0; padding: 12px 14px; border-radius: var(--radius); background: var(--tint-2); border: 1px solid #d3e1ee; font-size: 14.5px; text-align: center; }
.auth-used a { font-weight: 600; }
.not-found-card h1 { margin-bottom: 6px; }
.not-found-card .btn { margin-top: 4px; }
.auth-foot { margin: 18px 0 0; font-size: 13px; color: var(--faint); }

/* ---------- responsive ---------- */
@media (max-width: 1100px) {
  .review-grid { grid-template-columns: minmax(0, 1fr) 320px; }
}
@media (max-width: 900px) {
  .review-grid { display: block; }
  .comments-col { margin-top: 12px; }
  /* phone review: the player stays at the top while the comments scroll under it, the
     comment box comes right after the player, Send feedback is a bar at the bottom */
  .player-col { position: sticky; top: 60px; z-index: 6; background: var(--bg); padding-bottom: 4px; }
  .player { max-height: 38vh; }
  .player-image { max-height: 38vh; }
  .comments-col, body.has-tray .comments-col { position: static; max-height: none; min-height: 0; }
  .comment-list { max-height: none; overflow: visible; }
  .comment-form { order: -2; border-top: 0; border-bottom: 1px solid var(--line); border-radius: var(--radius-lg) var(--radius-lg) 0 0; }
  .comments-head { order: -1; }
  .feedback-bar { position: fixed; left: 0; right: 0; bottom: 0; z-index: 44; background: var(--panel); border-top: 1px solid var(--line); box-shadow: 0 -4px 16px rgba(16, 35, 56, .08); padding: 10px 16px calc(10px + env(safe-area-inset-bottom, 0px)); }
  .feedback-bar .hint { margin-top: 4px; }
  /* writing a comment with the keyboard open: the player scrolls away and is smaller, the
     Send feedback bar steps aside, so the comment box and its Comment button keep their room */
  body.is-commenting .player-col { position: static; }
  body.is-commenting .player, body.is-commenting .player-image { max-height: 30vh; }
  body.is-commenting .feedback-bar { display: none; }
  .settings-grid { grid-template-columns: 1fr; }
}
/* touch screens: 40 px targets, no keyboard hints */
@media (hover: none) and (pointer: coarse) {
  .kbd-hint, .shortcuts { display: none; }
  .comment-actions { gap: 4px; margin-left: -8px; }
  .comment-actions .link-button { min-height: 40px; padding: 0 8px; }
  .timecode { min-height: 32px; padding: 0 9px; }
  .timeline-track { height: 40px; }
  .timeline-track::before { top: 18px; }
  .timeline-played { top: 18px; }
  .marker { top: 0; width: 40px; height: 40px; margin-left: -20px; }
  .marker::before { left: 14px; top: 13px; width: 10px; height: 10px; }
  .icon-button { width: 40px; height: 40px; }
  .tray-item-actions .icon-button { width: 40px; height: 40px; }
}
@media (max-width: 720px) {
  .topbar-inner { padding: 0 12px; gap: 10px; height: 56px; }
  .logo { height: 24px; }
  .brand { gap: 10px; }
  .brand-label { padding-left: 10px; font-size: 13px; }
  .mainnav a { padding: 0 8px; font-size: 14px; }
  .usermenu-name, .usermenu-button > .icon { display: none; }
  .usermenu-button { padding: 3px; }
  .wrap { padding: 20px 16px 56px; }
  .banner-inner { padding: 10px 16px; }
  h1 { font-size: 22px; }
  .hide-sm { display: none; }
  .not-sm { display: none !important; }
  .only-sm { display: inline-block !important; }
  .comment-actions { gap: 4px; margin-left: -8px; }
  .comment-actions .link-button { min-height: 40px; padding: 0 8px; }
  .tray-item-actions .icon-button { width: 40px; height: 40px; }
  .file-row { padding: 11px 12px; gap: 10px; flex-wrap: wrap; }
  .file-thumb { width: 64px; height: 36px; }
  .file-main { flex: 1 1 calc(100% - 80px); }
  .file-actions { margin-left: 74px; }
  .file-actions .btn-sm { min-height: 40px; padding: 4px 12px; }
  .project-link { padding: 14px 14px; gap: 12px; align-items: flex-start; }
  .project-icon { width: 36px; height: 36px; }
  .project-side .avatars { display: none; }
  .project-activity { white-space: normal; }
  .search { flex: 1 1 100%; }
  .toolbar-right { width: 100%; justify-content: space-between; }
  .tray { right: 8px; left: 8px; bottom: calc(8px + var(--bottom-bar, 0px) + var(--sheet-h, 0px)); width: auto; max-width: none; max-height: 60vh; }
  .invite-grid { grid-template-columns: 1fr; }
  .project-head .page-actions { display: none; }
  .toasts { bottom: 16px; }
  body.has-tray .toasts, body.has-sheet .toasts, body.has-bottom-bar .toasts { top: 64px; }
  .radio-cards { grid-template-columns: 1fr; }
  .modal-form { padding: 18px 16px 16px; }
  .modal-actions .btn { flex: 1 1 auto; }
  .team-table thead { display: none; }
  .team-table, .team-table tbody, .team-table tr, .team-table td { display: block; width: 100%; }
  .team-table tr { position: relative; padding: 12px 14px; border-bottom: 1px solid var(--line); }
  .team-table tbody tr:last-child { border-bottom: 0; }
  .team-table td { border: 0; padding: 2px 0; }
  .team-table td[data-label] { display: flex; justify-content: space-between; gap: 12px; font-size: 13.5px; padding-left: 42px; }
  .team-table td[data-label]::before { content: attr(data-label); color: var(--muted); }
  .team-table td.cell-person { display: flex; min-width: 0; padding-right: 40px; margin-bottom: 6px; }
  .tabs { gap: 0; }
  .tabs a { padding: 10px 9px; gap: 6px; font-size: 14px; }
  .tab-count { min-width: 18px; padding: 0 5px; }
  .tab-long { display: none; }
  .tab-short { display: inline; }
  .team-table .cell-actions { position: absolute; top: 12px; right: 8px; width: auto; padding: 0; }
  .usage-list li { grid-template-columns: minmax(0, 1fr) auto; }
  .usage-bar { grid-column: 1 / -1; grid-row: 2; }
  .review-title h1 { white-space: normal; font-size: 19px; }
  .review-head { align-items: flex-start; margin-bottom: 12px; }
  .shortcuts { display: none; }
  .kbd-hint { display: none; }
  .player-col { top: 56px; }
  .auth-card { padding: 26px 20px 22px; }
}
@media (max-width: 420px) {
  .brand-label { display: none; }
  .hide-xs { display: none; }
  .mainnav a { padding: 0 7px; }
  .page-actions .btn { padding: 7px 11px; }
}
@media (max-width: 420px) {
  .btn-icon-sm { padding: 7px 9px; }
}
@media print {
  .topbar, .tray, .toasts, .banners { display: none; }
}
