/* Tabler provides controls and tokens; these rules adapt the existing application layout. */
:root {
  --tblr-primary: #225b45;
  --tblr-primary-rgb: 34, 91, 69;
  --bg: #edf1eb;
  --surface: #fff;
  --surface-2: #e5ebe2;
  --ink: #19271e;
  --muted: #4c5d50;
  --line: #b7c3b8;
  --accent: var(--tblr-primary);
  --accent-2: #d9e6d5;
  --tblr-body-color: var(--ink);
  --tblr-secondary-color: var(--muted);
  --control-height: 36px;
  --control-padding-y: 7px;
  --danger: #d63939;
  --shadow: 0 16px 48px #18273c1a;
  --radius: 12px;
  --font: -apple-system, BlinkMacSystemFont, "Segoe UI", "PingFang SC", "Microsoft YaHei", sans-serif;
}
body { background: var(--bg); }
.ui-icon { width: 20px; height: 20px; flex: none; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }
.button.btn { min-height: var(--control-height); padding: var(--control-padding-y) 12px; line-height: 20px; border-radius: 7px; font-weight: 600; box-shadow: none; transform: none; }
.button.primary { background: var(--accent); border-color: var(--accent); }
.button.primary:hover { background: #173f30; }
.button.secondary { color: #344b3b; background: #fff; border-color: #7d9280; }
.button.secondary:hover { background: var(--surface-2); border-color: #6f8777; }
.button.danger { color: #8a2a20; background: #fae5e1; border-color: #bf7b70; }
.button.btn.compact { min-height: 30px; padding: 4px 9px; }
.btn-loading { pointer-events: none; }
.form-control, .form-select { color: var(--ink); border-color: #829287; border-radius: 7px; font-weight: 400; }
.form-control::placeholder, textarea::placeholder { color: #617063; opacity: 1; }
.form-control:not(textarea), .form-select:not([multiple]) { height: var(--control-height); min-height: var(--control-height); padding-top: var(--control-padding-y); padding-bottom: var(--control-padding-y); line-height: 20px; }
.form-control:focus, .form-select:focus { border-color: #4f785c; box-shadow: 0 0 0 3px #225b4518; }
.icon-button { color: var(--muted); border-radius: 7px; }
.brand-mark, .brand-mark.small { border-radius: 10px; box-shadow: none; background: var(--accent); }
#app { grid-template-columns: 216px minmax(0, 1fr); }
.sidebar { padding: 22px 12px 14px; background: #e3e9df; }
.brand { padding: 0 10px 22px; }
.brand strong { letter-spacing: -.4px; font-size: 18px; }
.brand small { margin-top: 3px; }
.nav-label { font-size: 11px; padding: 18px 12px 8px; color: #526253; }
.project-switch, .sidebar-link { min-height: 38px; border-radius: 7px; color: #344d3e; }
.project-switch { grid-template-columns: 20px minmax(0, 1fr) auto; }
.project-switch > span:not(.project-dot) { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.project-switch.active, .project-switch.active:hover { color: #fff; background: var(--accent); }
.project-switch:hover, .sidebar-link:hover { background: var(--surface-2); }
.project-switch b { min-width: 23px; padding: 1px 5px; border-radius: 5px; background: #d3ddd0; text-align: center; font-size: 11px; }
.project-switch.active b { color: #fff; background: #356b52; }
.sidebar-link { display: flex; align-items: center; gap: 11px; }
.sidebar-help-link { background: #e8eee5; border-color: var(--line); border-radius: 8px; color: var(--muted); }
.sidebar-help-link .ui-icon { color: var(--accent); }
.account { margin-top: 14px; padding: 18px 6px 0; }
.avatar, .principal-avatar { background: var(--accent-2); color: var(--accent); }
.account form button { min-width: 30px; min-height: 36px; }
.main { max-width: 1600px; padding: 26px clamp(20px, 2.5vw, 36px) 40px; }
.workspace-header { align-items: center; margin-bottom: 20px; }
.workspace-header h1 { margin: 2px 0 6px; font-size: 26px; letter-spacing: -.7px; line-height: 1.3; }
.workspace-header .eyebrow { color: #526253; font-size: 11px; letter-spacing: .08em; }
.workspace-header .muted { font-size: 13px; }
.filters { flex-wrap: wrap; gap: 12px; margin-bottom: 12px; }
.tabs { padding: 4px; background: #dbe3d7; border-radius: 8px; gap: 4px; }
.tab { padding: 6px 12px; border-radius: 6px; font-size: 13px; }
.tab.active { color: #fff; background: var(--accent); box-shadow: 0 1px 3px #19271e14; }
.tab span { padding: 1px 5px; border-radius: 4px; background: #c5d3c1; font-size: 10px; }
.tab.active span { background: #356b52; color: #fff; }
.filter-controls { flex: 1; flex-wrap: wrap; }
.filter-select { gap: 8px; }
.filter-select select { min-height: var(--control-height); padding-top: var(--control-padding-y); padding-bottom: var(--control-padding-y); border-radius: 7px; }
.filter-controls .search { width: clamp(190px, 20vw, 300px); border-color: #829287; border-radius: 7px; min-height: var(--control-height); }
.search .form-control { height: calc(var(--control-height) - 2px); min-height: calc(var(--control-height) - 2px); }
.search .ui-icon { width: 17px; height: 17px; }
.search:focus-within { border-color: #4f785c; box-shadow: 0 0 0 3px #225b4518; }
.search input:focus { box-shadow: none; }
.task-panel { border-radius: 10px; box-shadow: 0 2px 4px #18273c03; }
.task-table-head, .task-row { grid-template-columns: 24px minmax(220px, 1fr) 115px 105px 80px; gap: 16px; }
.task-table-head { height: 36px; padding: 0 14px; background: #dfe7da; font-size: 11px; color: #3f5345; letter-spacing: .02em; }
.task-row { padding: 10px 14px; border-color: #cbd5c9; }
.task-row:hover { background: #edf4e9; }
.task-row.selected { background: #dcebd5; }
.task-check { padding: 0; border-radius: 4px; }
.task-copy strong { font-weight: 600; color: #1f3225; }
.task-key { margin-right: 9px; color: #536451; font-size: 11px; font-weight: 500; }
.task-copy small { margin-top: 2px; font-size: 12px; color: #4c5d50; }
.task-supplement { margin-top: 4px; }
.status-pill { min-width: 56px; padding: 3px 7px; font-size: 11px; font-weight: 600; border-radius: 5px; }
.status-pill.todo { background: #f3d18a; color: #61420a; }
.status-pill.working { background: #235e49; color: #fff; }
.status-pill.review { background: #68438b; color: #ffffff; }
.status-pill.done { background: #286840; color: #ffffff; }
.status-pill.canceled { background: #d8dfd5; color: #3c4a3d; }
.status-pill.paused { background: #efc79c; color: #65380e; }
.task-label { padding: 3px 7px; border: 1px solid #a6b8a0; border-radius: 5px; background: #e8eee5; color: #344c37; font-weight: 500; }
.task-label.review-tag { display: inline-flex; align-items: center; justify-content: center; gap: 3px; padding: 2px 5px; min-height: 20px; color: #fff; font-size: 10px; font-weight: 650; line-height: 14px; }
.review-tag .ui-icon { width: 12px; height: 12px; stroke-width: 2.2; }
.task-label.review-pass { background: var(--accent); border-color: var(--accent); }
.task-label.review-pass:hover { color: #fff; background: #173f30; border-color: #173f30; }
.task-label.review-fail { background: #a53428; border-color: #a53428; }
.task-label.review-fail:hover { color: #fff; background: #82271e; border-color: #82271e; }
.task-label:hover { background: var(--accent-2); color: var(--accent); }
.task-label-list:not(.detail-labels)::before { display: none; }
.task-attribution { color: #526253; }
.person { color: #3b5142; font-size: 12px; }
.person .mini-avatar { background: #d8e2d3; color: #3f5745; }
.project-chip { background: #d9e6d5; color: #3d583b; }
.bulk-bar { flex-wrap: wrap; background: #dce9d6; border-color: #9fb497; border-radius: 8px; }
.bulk-bar select { min-width: 125px; }
.pagination { margin: 0; border-top: 1px solid var(--line); }
.empty-state { padding: 72px 20px; }
.empty-illustration { border-radius: 14px; }
.empty-illustration .ui-icon { width: 27px; height: 27px; }
dialog { margin: auto; }
dialog::backdrop { background: #18273c66; backdrop-filter: blur(3px); }
.app-modal { max-width: 100vw; max-height: calc(100dvh - 64px); }
.modal-shell { max-height: calc(100dvh - 64px); border: 1px solid #b7c3b8; border-radius: 12px; }
.modal-shell > header, .drawer-header { padding: 16px 22px; background: #fff; }
.modal-shell h2 { font-size: 19px; font-weight: 600; }
.modal-body { padding: 18px 22px; }
.modal-shell > footer, .drawer-actions { background: #e9efe6; padding: 12px 22px; }
.create-modal { width: min(720px, calc(100vw - 48px)); }
.create-mode-tabs { border-radius: 8px; padding: 4px; background: #e0e8dc; border-color: transparent; }
.create-mode-tabs button { border-radius: 6px; padding: 9px 10px; }
.create-mode-tabs button.active { background: var(--accent); color: #fff; box-shadow: 0 1px 4px #19271e12; }
.create-mode-tabs button.active small { color: #edf3e9; }
.create-mode-hint { color: var(--muted); font-size: 12px; line-height: 1.7; }
.drop-zone { min-height: 84px; padding: 12px; gap: 4px; border-color: #8fa287; background: #f1f5ed; border-radius: 8px; }
.drop-zone > .ui-icon { color: var(--accent); margin-bottom: 4px; }
.drop-zone > small { max-width: 440px; text-align: center; font-size: 11px; }
.drop-zone:hover, .drop-zone.dragging { border-color: var(--accent); background: #e2edda; }
.task-label-option { border-radius: 6px; background: #fff; }
.task-label-option.selected { color: #fff; background: var(--accent); border-color: var(--accent); }
.task-label-create { grid-template-columns: minmax(0, 1fr) auto; }
.task-label-create, .copy-field, .principal-grant { align-items: center; }
.task-label-create > button.button.btn, .copy-field > button.button.btn, .principal-grant > button.button.btn, .bulk-bar > button.button.btn { min-height: var(--control-height); }
.modal-shell > footer > .btn { min-height: var(--control-height); padding: var(--control-padding-y) 12px; line-height: 20px; }
.drawer-actions { flex-wrap: wrap; align-items: center; }
.drawer-action-buttons { min-width: 0; flex-wrap: wrap; }
.field > span, .stack-form > label, .task-label-field legend { font-size: 13px; font-weight: 500; }
.field small { font-size: 11px; line-height: 1.6; }
.field, .stack-form label { gap: 5px; }
.stack-form { gap: 12px; }
.form-grid { gap: 12px; margin-top: 14px; }
.drawer { width: min(760px, 100vw); max-width: 100vw; margin: 0 0 0 auto; }
.drawer-header h2 { margin-top: 4px; font-size: 19px; line-height: 1.4; }
.drawer-content { padding: 16px 20px; background: #fff; font-size: 13px; line-height: 1.5; }
.detail-section { margin-bottom: 16px; }
.detail-section h3 { margin-bottom: 7px; font-size: 12px; font-weight: 600; color: #4c5d50; letter-spacing: .04em; }
.meta-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px; }
.meta-card { padding: 8px 10px; border-radius: 8px; background: #e8eee5; overflow-wrap: anywhere; }
.meta-card small { margin-bottom: 2px; font-size: 11px; }
#detail-dialog .markdown, #detail-dialog .markdown.requirement { font-size: 14px; line-height: 1.5; }
#detail-dialog .markdown :is(p, ul, ol) { margin-bottom: 6px; }
#detail-dialog .markdown li { margin-bottom: 2px; }
#detail-dialog .markdown :is(h4, h5, h6) { margin: 10px 0 5px; font-size: 14px; }
#detail-dialog .detail-label-block { margin-top: 8px; }
#detail-dialog .detail-fold { margin-top: 16px; }
#detail-dialog .detail-fold[open] > summary { margin-bottom: 8px; }
#detail-dialog .detail-fold.review-advice-card { padding: 10px 12px; }
#detail-dialog .timeline-item { padding-bottom: 12px; }
#detail-dialog .run-card { padding: 10px; }
#detail-dialog .image-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px; }
#detail-dialog .attachment-card { display: grid; grid-template-columns: 56px minmax(0, 1fr); align-items: center; gap: 8px; min-height: 70px; padding: 6px; border-radius: 7px; }
#detail-dialog .attachment-card > :first-child { width: 56px; height: 56px; margin: 0; padding: 0; border-radius: 4px; aspect-ratio: 1; }
#detail-dialog .attachment-card > div:last-child { min-width: 0; padding: 0; grid-template-columns: minmax(0, 1fr); gap: 3px; }
#detail-dialog .attachment-card strong { font-size: 13px; line-height: 1.4; }
#detail-dialog .attachment-card small { font-size: 11px; line-height: 1.3; }
#detail-dialog .attachment-video-icon { padding: 0 !important; aspect-ratio: 1 !important; }
#detail-dialog .attachment-video-icon span { font-size: 22px; }
#detail-dialog .attachment-video-icon small { display: none; }
.access-modal { width: min(1080px, calc(100vw - 48px)); }
.settings-layout { display: grid; grid-template-columns: 148px minmax(0, 1fr); padding: 0; background: #e9efe5; min-height: 360px; }
.settings-nav { position: sticky; top: 0; align-self: start; display: grid; gap: 4px; padding: 16px 10px; }
.settings-nav button { display: flex; align-items: center; gap: 8px; padding: 9px 10px; border: 0; border-radius: 7px; background: transparent; color: var(--muted); font-size: 13px; text-align: left; }
.settings-nav button[aria-pressed="true"] { color: #fff; background: var(--accent); font-weight: 600; }
.settings-nav button:hover { color: var(--accent); background: #d7e2d1; }
.settings-nav button[aria-pressed="true"]:hover { color: #fff; background: #173f30; }
.settings-nav .ui-icon { width: 18px; height: 18px; }
.settings-panels { min-width: 0; border-left: 1px solid var(--line); padding: 16px; }
.settings-body { gap: 14px; background: transparent; }
.settings-section { padding: 16px; border-radius: 9px; }
.settings-section > h3 { margin: 0 0 8px; font-size: 15px; font-weight: 600; }
.settings-section > p { margin-bottom: 14px; color: var(--muted); font-size: 12px; line-height: 1.7; }
.settings-section-heading { align-items: center; }
.settings-section-heading > .button { flex: none; }
.settings-stats { border-radius: 9px; }
.settings-stats strong { font-size: 25px; color: #2c4935; }
.inline-create { grid-template-columns: 1fr 1fr; gap: 12px; }
.inline-create > .button { justify-self: end; grid-column: 1 / -1; }
.principal-row { grid-template-columns: minmax(150px, 1fr) auto; gap: 10px; border-radius: 8px; padding: 10px 12px; }
.principal-grant { grid-template-columns: minmax(0, 1fr) auto; grid-column: 1 / -1; grid-row: 2; }
.principal-actions { gap: 6px; }
#requirement-review-form { display: grid; gap: 16px; }
.settings-group { min-width: 0; margin: 0; padding: 0; border: 0; }
.settings-group + .settings-group { padding-top: 16px; border-top: 1px solid var(--line); }
.settings-group > legend { float: none; width: auto; margin: 0 0 12px; padding: 0; font-size: 13px; font-weight: 600; color: #344b3b; }
.settings-form-grid { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 12px; align-items: start; }
.settings-form-grid > .field { min-width: 0; margin: 0; }
.field > .form-label { margin: 0; font-size: 13px; font-weight: 500; }
.input-action { display: grid; grid-template-columns: minmax(0, 1fr) auto; align-items: center; gap: 10px; }
.form-actions { display: flex; flex-wrap: wrap; justify-content: flex-end; gap: 8px; padding-top: 12px; border-top: 1px solid var(--line); }
.token-form > .button { justify-self: end; }
#requirement-review-whitelist-form { display: grid; gap: 12px; }
.settings-toggle { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin: 0; padding: 10px 12px; border: 1px solid var(--line); border-radius: 8px; background: #e9efe6; }
.settings-toggle > span { display: grid; gap: 5px; }
.settings-toggle strong { font-size: 13px; font-weight: 600; }
.settings-toggle small { font-size: 11px; color: var(--muted); }
.settings-toggle .form-check-input { float: none; flex: none; width: 36px; height: 20px; margin: 0; padding: 0; }
.review-option { display: flex; flex-wrap: wrap; align-items: center; gap: 6px 12px; grid-column: 1 / -1; margin: 12px 0; }
.review-option > label { display: inline-flex; align-items: center; gap: 7px; margin: 0; font-size: 13px; font-weight: 600; }
.review-option input { width: 17px; height: 17px; padding: 0; margin: 0; accent-color: var(--accent); }
.review-option small { color: var(--muted); font-size: 11px; }
.account-security { margin: 0; padding-top: 16px; }
.account-security .stack-form { margin-top: 16px; }
.account-security p { margin: 0; font-size: 12px; }
.confirm-dialog #confirm-message { margin: 0; color: #3b5142; line-height: 1.8; white-space: pre-wrap; overflow-wrap: anywhere; }
.confirm-dialog .modal-body { min-height: 86px; }
.review-advice-modal { width: min(820px, calc(100vw - 48px)); }
.review-advice-card { padding: 14px; border: 1px solid var(--line); border-radius: 9px; background: #e9efe6; }
.review-report { min-width: 0; font-size: 13px; }
.review-verdict { display: inline-flex; align-items: center; gap: 7px; max-width: 100%; padding: 4px 8px; border: 1px solid; border-radius: 6px; font-size: 12px; font-weight: 700; line-height: 1.4; overflow-wrap: anywhere; }
.review-verdict-icon { flex: none; font-size: 18px; line-height: 1; }
.review-verdict-passed { color: #fff; background: #17643c; border-color: #17643c; }
.review-verdict-failed { color: #fff; background: #b42318; border-color: #b42318; }
.review-verdict-warning { color: #fff; background: #824400; border-color: #824400; }
.review-verdict-neutral { color: #364641; background: #ecefec; border-color: #c6cec4; }
#review-test-content .review-verdict { display: flex; min-height: 44px; padding: 10px 12px; font-size: 15px; }
#review-test-content .review-verdict-icon { font-size: 22px; }
.review-summary { margin: 6px 0 12px; color: var(--muted); line-height: 1.6; overflow-wrap: anywhere; }
.review-suggestion { padding: 12px; border: 1px solid var(--line); border-radius: 7px; background: #fff; }
.review-advice-heading { display: flex; align-items: center; justify-content: space-between; gap: 10px; margin-bottom: 10px; }
.review-advice-heading h4, .review-missing h4 { margin: 0; font-size: 13px; font-weight: 600; }
.review-advice-heading .button { flex: none; }
.review-suggestion > .markdown { max-height: 300px; overflow: auto; overflow-wrap: anywhere; }
.review-missing { margin-top: 14px; }
.review-missing ul { margin: 8px 0 0; padding-left: 20px; }
.review-missing li + li { margin-top: 10px; }
.review-missing blockquote { margin: 5px 0 0; padding: 5px 9px; border-left: 2px solid var(--line); color: var(--muted); font-size: 12px; overflow-wrap: anywhere; }
.review-missing > p { margin: 6px 0 0; font-size: 12px; }
.review-dialog-note { margin: 14px 0 0; color: var(--muted); font-size: 12px; }
.review-test-note { margin: 0 0 14px; color: var(--muted); font-size: 12px; }
.detail-fold { padding: 0; border: 0; border-radius: 0; }
.detail-fold > summary { color: #4c5d50; font-size: 12px; font-weight: 600; }
.detail-fold[open] > summary { margin-bottom: 10px; }
.detail-fold.review-advice-card { padding: 14px; border: 1px solid var(--line); border-radius: 9px; }
.review-history { margin-top: 7px; padding: 0; border: 0; }
.review-history > summary { font-size: 12px; }
.review-history > .review-report { margin-top: 10px; }
.toast-region { z-index: 1100; max-width: min(440px, calc(100vw - 32px)); }
.app-toast.alert { display: flex; align-items: center; gap: 16px; min-width: 260px; margin: 0; padding: 14px 16px; border-radius: 9px; border: 1px solid #c5e5d2; background: #effbf3; color: #216e40; box-shadow: 0 8px 28px #18273c1a; }
.app-toast.alert-danger { color: #b42a2a; background: #fff3f3; border-color: #f2cccc; }
.app-toast > span { flex: 1; overflow-wrap: anywhere; }
.app-toast .btn-close { flex: none; margin: 0; width: 14px; height: 14px; }
.login-page { background: radial-gradient(ellipse at 50% 0, #d4e2ca, transparent 60%), var(--bg); }
.login-card { padding: 40px; border-radius: 16px; border-color: var(--line); background: #fff; box-shadow: 0 12px 48px #18273c0a; }
.login-card h1 { margin: 16px 0 10px; font-size: 25px; letter-spacing: -.5px; }
.login-card .eyebrow { margin-top: 24px; font-size: 11px; }
.login-copy { font-size: 13px; }
.invite-page { background: var(--bg); }
.invite-auth-card, .invite-account-card, .invite-unavailable { border-radius: 12px; box-shadow: 0 6px 24px #18273c08; }
.invite-hero h1 { font-size: clamp(30px, 5vw, 48px); line-height: 1.15; }
@media (max-width: 1200px) and (min-width: 901px) {
  .filters { align-items: stretch; }
  .filter-controls { justify-content: flex-start; flex-basis: 100%; }
  .filter-controls .search { flex: 1; }
  .task-table-head, .task-row { grid-template-columns: 20px minmax(150px, 1fr) 90px 80px 64px; gap: 10px; }
  .task-row, .task-table-head { padding-left: 14px; padding-right: 14px; }
}
@media (max-width: 900px) {
  :root { --control-height: 40px; --control-padding-y: 9px; }
  .button.btn.compact { min-height: 32px; padding: 5px 10px; }
  #app { display: block; }
  .main { padding: 12px 12px 100px; }
  .mobile-header, .mobile-nav { background: #fffffff5; }
  .mobile-project { min-width: 0; flex: 1; }
  #mobile-project-name { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
  .mobile-header-actions { flex: none; }
  .mobile-help-button { white-space: nowrap; }
  .workspace-header { margin-bottom: 12px; }
  .workspace-header h1 { font-size: 20px; }
  .workspace-header .muted { font-size: 12px; }
  .filters { display: block; }
  .tabs { padding: 4px; }
  .tab { padding: 9px 5px; }
  .filter-controls { display: grid; }
  .filter-controls .search { width: 100%; }
  .task-panel { border: 0; background: transparent; box-shadow: none; }
  .task-row { grid-template-columns: 20px minmax(0, 1fr); gap: 8px; padding: 10px; border: 1px solid var(--line); border-radius: 8px; }
  .task-row:last-child { border: 1px solid var(--line); }
  .task-copy strong { font-size: 13px; line-height: 1.5; }
  .task-copy small { font-size: 11px; }
  .task-supplement > .task-label-list { margin-left: 0; }
  .task-key { display: inline; margin-right: 6px; line-height: 1.5; font-size: 10px; }
  .task-label.review-tag { min-width: 40px; min-height: 24px; }
  .drawer { width: 100vw; }
  .app-modal, .create-modal, .access-modal { width: 100%; height: 100dvh; max-height: 100dvh; margin: 0; }
  .modal-shell { height: 100%; max-height: 100dvh; border-radius: 0; border: 0; }
  .modal-shell > header, .drawer-header { padding: 18px; }
  .modal-body, .drawer-content { padding: 16px; }
  .modal-shell > footer, .drawer-actions { padding: 14px 18px calc(14px + env(safe-area-inset-bottom)); }
  .drawer-actions { display: grid; gap: 12px; }
  .drawer-action-buttons { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px; }
  .drawer-action-buttons > .button:last-child:nth-child(odd) { grid-column: 1 / -1; }
  .settings-layout { display: block; padding: 0; }
  .settings-nav { position: sticky; top: 0; display: flex; overflow-x: auto; padding: 10px 12px; border-bottom: 1px solid var(--line); background: #fff; z-index: 1; }
  .settings-nav button { flex: none; white-space: nowrap; }
  .settings-panels { padding: 12px; border: 0; }
  .settings-section { padding: 14px; }
  .inline-create, .settings-form-grid { grid-template-columns: 1fr; }
  .settings-section-heading { flex-wrap: wrap; gap: 12px; }
  .confirm-dialog { width: calc(100vw - 32px); height: auto; margin: auto; }
  .confirm-dialog .modal-shell { height: auto; max-height: calc(100dvh - 48px); border-radius: 12px; }
  .app-toast.alert { min-width: 0; }
  .toast-region { max-width: none; }
  .bulk-bar { max-height: 50dvh; overflow-y: auto; }
  #detail-dialog .drawer-header { padding: 10px 12px; }
  #detail-dialog .drawer-header h2 { margin: 4px 0 0; font-size: 17px; line-height: 1.4; }
  #detail-dialog .drawer-header .eyebrow { font-size: 10px; }
  #detail-dialog .drawer-content { padding: 10px 12px; font-size: 13px; }
  #detail-dialog .detail-section { margin-bottom: 12px; }
  #detail-dialog .detail-section h3 { margin: 0 0 6px; font-size: 11px; }
  #detail-dialog .markdown, #detail-dialog .markdown.requirement { font-size: 13px; line-height: 1.5; }
  #detail-dialog .markdown :is(p, ul, ol) { margin-bottom: 6px; }
  #detail-dialog .markdown li { margin-bottom: 2px; }
  #detail-dialog .markdown :is(h4, h5, h6) { margin: 10px 0 5px; font-size: 13px; }
  #detail-dialog .meta-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 6px; }
  #detail-dialog .meta-card { padding: 7px 8px; border-radius: 6px; font-size: 12px; overflow-wrap: anywhere; }
  #detail-dialog .meta-card small { margin-bottom: 2px; font-size: 10px; }
  #detail-dialog .detail-label-block { margin-top: 8px; }
  #detail-dialog .image-grid { gap: 6px; }
  #detail-dialog .attachment-card { grid-template-columns: 44px minmax(0, 1fr); gap: 6px; min-height: 58px; }
  #detail-dialog .attachment-card > :first-child { width: 44px; height: 44px; }
  #detail-dialog .attachment-card strong { font-size: 12px; }
  #detail-dialog .attachment-card small { font-size: 10px; }
  #detail-dialog .detail-fold > summary { font-size: 11px; }
  #detail-dialog .detail-fold.review-advice-card { padding: 8px 10px; }
  #detail-dialog .review-report { font-size: 12px; }
  #detail-dialog .review-suggestion { padding: 8px; }
  #detail-dialog .review-suggestion > .markdown { max-height: 180px; }
  #detail-dialog .run-card { padding: 8px; }
  #detail-dialog .timeline-item { padding-bottom: 10px; }
  #detail-dialog .drawer-actions { padding: 8px 12px calc(8px + env(safe-area-inset-bottom)); gap: 6px; }
  #detail-dialog .drawer-action-hint { margin: 0; font-size: 10px; line-height: 1.4; }
  #detail-dialog .drawer-action-buttons { gap: 6px; }
  #detail-dialog .drawer-action-buttons > .button { min-height: 36px; padding: 7px 8px; font-size: 12px; }
  #review-test-dialog .modal-shell > header { padding: 12px; }
  #review-test-title { margin: 0; font-size: 17px; line-height: 1.4; }
}
@media (max-width: 600px) {
  .input-action { grid-template-columns: minmax(0, 1fr); }
  .input-action > .button { justify-self: end; }
}
@media (prefers-reduced-motion: reduce) {
  .app-toast { animation: none; }
}
