:root {
  --navy-950: #0b1220;
  --navy-900: #111a2e;
  --navy-800: #1b2945;
  --blue-700: #1d4ed8;
  --blue-600: #2563eb;
  --blue-100: #dbeafe;
  --blue-50: #eff6ff;
  --slate-900: #172033;
  --slate-700: #3f4b61;
  --slate-600: #596579;
  --slate-500: #748096;
  --slate-300: #cbd3df;
  --slate-200: #e2e7ef;
  --slate-100: #f1f4f8;
  --slate-50: #f7f9fc;
  --white: #fff;
  --green-700: #167246;
  --green-100: #dcfce7;
  --amber-800: #92400e;
  --amber-100: #fef3c7;
  --red-700: #b42318;
  --red-100: #fee4e2;
  --shadow: 0 14px 40px rgba(15, 23, 42, .08);
  /* Semantic colors keep surface white separate from white text on the navy rail. */
  --page: var(--slate-50);
  --surface: var(--white);
  --surface-muted: var(--slate-100);
  --text: var(--slate-900);
  --text-strong: var(--slate-700);
  --text-muted: var(--slate-600);
  --text-subtle: var(--slate-500);
  --border: var(--slate-200);
  --input-border: var(--slate-300);
  --input-border-strong: var(--slate-500);
  --primary: var(--blue-700);
  --primary-hover: #1e40af;
  --control-hover: #2563eb;
  --primary-foreground: var(--white);
  --link: var(--blue-700);
  --focus-ring: #fbbf24;
  --topbar-bg: rgba(255, 255, 255, .96);
  --info-bg: var(--blue-50);
  --info-emphasis: var(--blue-100);
  --info-text: #1e3a8a;
  --info-border: #bfdbfe;
  --success-bg: var(--green-100);
  --success-text: var(--green-700);
  --success-border: #a7f3d0;
  --success-message-bg: #f0fdf4;
  --warning-bg: var(--amber-100);
  --warning-text: var(--amber-800);
  --warning-border: #fde68a;
  --warning-message-bg: #fffbeb;
  --error-bg: var(--red-100);
  --error-text: var(--red-700);
  --error-border: #fecaca;
  --error-message-bg: #fff5f5;
  --upload-border: #93c5fd;
  --upload-error-border: #fda29b;
  --upload-error-bg: #fff6f5;
  --login-shadow: 0 24px 70px rgba(4, 12, 28, .2);
  color-scheme: light;
  font-family: "Yu Gothic UI", "Hiragino Kaku Gothic ProN", Meiryo, system-ui, sans-serif;
  color: var(--text);
  background: var(--page);
}

/* Design Form design_20260904083327_4b560c / v0 ncZfpcsxLXo.
   Input outlines are stronger than decorative card separators. */
html[data-theme="dark"] {
  --page: #12161c;
  --surface: #1b212a;
  --surface-muted: #212832;
  --text: #e7ebf0;
  --text-strong: #c9d2de;
  --text-muted: #9aa6b4;
  --text-subtle: #9aa6b4;
  --border: #2b333d;
  --input-border: #748096;
  --primary: #5b9df2;
  --primary-hover: #7cb2f5;
  --control-hover: #5b9df2;
  --primary-foreground: #0b1420;
  --link: #8fc1ff;
  --focus-ring: #7ab8ff;
  --topbar-bg: rgba(27, 33, 42, .96);
  --info-bg: #16283f;
  --info-emphasis: #243d5c;
  --info-text: #8fc1ff;
  --info-border: #365a86;
  --success-bg: #10321f;
  --success-text: #7edba0;
  --success-border: #386849;
  --success-message-bg: #10321f;
  --warning-bg: #382b16;
  --warning-text: #f5cc78;
  --warning-border: #85672f;
  --warning-message-bg: #382b16;
  --error-bg: #391620;
  --error-text: #ff98a6;
  --error-border: #925363;
  --error-message-bg: #391620;
  --upload-border: #7ab8ff;
  --upload-error-border: #ff98a6;
  --upload-error-bg: #391620;
  --shadow: 0 8px 24px rgba(0, 0, 0, .12);
  --login-shadow: 0 12px 32px rgba(0, 0, 0, .18);
  color-scheme: dark;
}

* { box-sizing: border-box; }
html { min-width: 0; }
body { margin: 0; background: var(--page); }
button, input { font: inherit; }
a { color: inherit; }
h1, h2, h3, p { margin-top: 0; }
h1 { margin-bottom: 4px; font-size: clamp(1.15rem, 2vw, 1.45rem); }
h2 { margin-bottom: 10px; font-size: clamp(1.55rem, 3vw, 2.2rem); line-height: 1.3; }
h3 { margin-bottom: 8px; font-size: 1.15rem; }
p { color: var(--text-muted); line-height: 1.7; }
small { color: var(--text-muted); }

.skip-link { position: fixed; z-index: 100; top: 8px; left: 8px; padding: 10px 14px; color: var(--primary-foreground); background: var(--primary); border-radius: 8px; transform: translateY(-160%); }
.skip-link:focus { transform: translateY(0); }

.app-shell { display: grid; grid-template-columns: 250px minmax(0, 1fr); min-height: 100vh; }
.side-rail { position: sticky; top: 0; display: flex; flex-direction: column; min-height: 100vh; max-height: 100vh; padding: 20px 14px; color: #dbe5f6; background: var(--navy-950); overflow-y: auto; }
.brand { display: flex; align-items: center; gap: 12px; min-height: 56px; padding: 8px; color: var(--white); text-decoration: none; border-radius: 12px; }
.brand-mark { display: inline-grid; place-items: center; width: 42px; min-width: 42px; height: 42px; color: var(--navy-950); background: #fff; border-radius: 11px; font-weight: 900; }
.brand-copy { display: grid; gap: 2px; }
.brand-copy small { color: #9fb0ca; font-size: .7rem; }
.rail-label { margin: 26px 10px 8px; color: #8292aa; font-size: .7rem; font-weight: 800; letter-spacing: .14em; }
.primary-nav { display: grid; gap: 6px; }
.primary-nav a { display: flex; align-items: center; gap: 11px; min-height: 48px; padding: 9px 11px; color: #bdcaDC; border: 1px solid transparent; border-radius: 11px; text-decoration: none; font-weight: 700; }
.primary-nav a:hover { color: var(--white); background: var(--navy-900); }
.primary-nav a[aria-current="page"] { color: var(--white); border-color: #334665; background: var(--navy-800); }
.nav-icon { display: inline-grid; place-items: center; width: 30px; min-width: 30px; height: 30px; border: 1px solid #4a5a73; border-radius: 9px; font-size: .75rem; font-weight: 900; }
.rail-account { display: grid; gap: 4px; margin-top: auto; padding: 16px 10px 4px; border-top: 1px solid #26344c; }
.rail-account small { color: #91a1b9; }
.rail-account strong { overflow-wrap: anywhere; }
.rail-logout { min-height: 44px; margin-top: 8px; padding: 0; color: #c5d0e0; border: 0; background: transparent; text-align: left; text-decoration: underline; cursor: pointer; }

.workspace { min-width: 0; }
.topbar { position: sticky; z-index: 10; top: 0; min-height: 86px; padding: 18px clamp(20px, 4vw, 48px); border-bottom: 1px solid var(--border); background: var(--topbar-bg); backdrop-filter: blur(12px); }
.topbar p { margin-bottom: 0; font-size: .85rem; }
main { width: min(1180px, 100%); margin: 0 auto; padding: 36px clamp(20px, 4vw, 48px) 64px; }

.message-stack { display: grid; gap: 10px; margin-bottom: 20px; }
.message { padding: 14px 16px; border: 1px solid var(--border); border-radius: 12px; background: var(--surface); font-weight: 700; }
.message.success { color: var(--success-text); border-color: var(--success-border); background: var(--success-message-bg); }
.message.error { color: var(--error-text); border-color: var(--error-border); background: var(--error-message-bg); }

.hero { display: flex; align-items: flex-start; justify-content: space-between; gap: 24px; margin-bottom: 26px; }
.hero p:last-child { margin-bottom: 0; }
.screen-identity { padding: 22px 24px; border: 1px solid var(--info-border); border-radius: 17px; background: linear-gradient(135deg, var(--surface), var(--info-bg)); }
.eyebrow { margin-bottom: 7px; color: var(--link); font-size: .72rem; font-weight: 900; letter-spacing: .14em; text-transform: uppercase; }
.muted { color: var(--text-muted); }
.card { padding: 24px; border: 1px solid var(--border); border-radius: 17px; background: var(--surface); box-shadow: var(--shadow); }
.card-grid { display: grid; grid-template-columns: repeat(12, 1fr); gap: 18px; }
.section-card { grid-column: span 8; display: grid; grid-template-columns: 58px minmax(0, 1fr) auto; align-items: center; gap: 20px; }
.section-card p { margin-bottom: 0; }
.section-icon, .empty-icon { display: inline-grid; place-items: center; width: 56px; height: 56px; color: var(--link); border: 1px solid var(--info-border); border-radius: 14px; background: var(--info-bg); font-weight: 900; }

.button { display: inline-flex; align-items: center; justify-content: center; gap: 6px; min-height: 44px; padding: 0 17px; border: 1px solid transparent; border-radius: 10px; text-decoration: none; font-weight: 800; cursor: pointer; }
.button.primary { color: var(--primary-foreground); background: var(--primary); }
.button.primary:hover { background: var(--primary-hover); }
.button.secondary { color: var(--text-strong); border-color: var(--input-border); background: var(--surface); }
.button.secondary:hover { border-color: var(--control-hover); color: var(--link); }
.button.small { min-height: 44px; padding: 0 12px; font-size: .82rem; }
.button.full { width: 100%; }
.button.long-label { min-height: 52px; padding-block: 8px; text-align: center; }
.button[disabled] { opacity: .65; cursor: wait; }

.badge-row { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 14px; }
.badge { display: inline-flex; align-items: center; min-height: 30px; padding: 4px 10px; border-radius: 999px; font-size: .75rem; font-weight: 900; white-space: nowrap; }
.badge.success { color: var(--success-text); background: var(--success-bg); }
.badge.warning { color: var(--warning-text); background: var(--warning-bg); }
.badge.danger { color: var(--error-text); background: var(--error-bg); }
.badge.neutral { color: var(--text-strong); background: var(--surface-muted); }

.breadcrumbs { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; margin-bottom: 20px; color: var(--text-subtle); font-size: .82rem; }
.breadcrumbs a { color: var(--link); }
.job-card { display: flex; align-items: center; justify-content: space-between; gap: 24px; }
.job-card p { margin-bottom: 0; }
.job-list { display: grid; gap: 16px; }

.case-grid, .developer-grid { display: grid; grid-template-columns: minmax(0, 7fr) minmax(300px, 5fr); gap: 18px; align-items: start; }
.form-stack { display: grid; gap: 17px; }
.drop-zone { display: grid; justify-items: center; gap: 12px; padding: 28px 18px; border: 2px dashed var(--upload-border); border-radius: 14px; background: var(--info-bg); text-align: center; }
.drop-zone.has-error { border-color: var(--upload-error-border); background: var(--upload-error-bg); }
.drop-zone > span { color: var(--text-muted); font-size: .82rem; }
.drop-zone input[type="file"] { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0, 0, 0, 0); white-space: nowrap; border: 0; }
.drop-zone input[type="file"]:focus-visible + .button { outline: 3px solid var(--focus-ring); outline-offset: 3px; }
.selected-file { overflow-wrap: anywhere; }
.info-box, .warning-box { padding: 14px 16px; border: 1px solid var(--info-border); border-radius: 12px; color: var(--info-text); background: var(--info-bg); }
.warning-box { color: var(--warning-text); border-color: var(--warning-border); background: var(--warning-message-bg); }
.info-box p, .warning-box p { margin: 5px 0 0; color: inherit; font-size: .85rem; }
.setup-intro { margin-bottom: 20px; }
.space-top { margin-top: 20px; }
.section-heading { display: flex; align-items: end; justify-content: space-between; gap: 18px; margin-bottom: 12px; }
.section-heading h3 { margin-bottom: 0; }
.history-list { display: grid; gap: 10px; margin-top: 16px; }
.history-item { padding: 14px; border: 1px solid var(--border); border-radius: 12px; }
.history-item > strong, .history-item > small { display: block; overflow-wrap: anywhere; }
.history-item > small { margin-top: 5px; }
.history-actions { display: flex; align-items: center; justify-content: space-between; gap: 10px; margin-top: 12px; }
.job-error { margin: 10px 0 0; color: var(--error-text); font-size: .85rem; }
.privacy-note { margin: 16px 0 0; color: var(--text-subtle); font-size: .78rem; }
.mini-empty { padding: 24px 12px; color: var(--text-muted); text-align: center; }
.mini-empty p { margin: 7px 0 0; }
.empty-state { display: grid; justify-items: center; gap: 10px; padding: 48px 24px; text-align: center; }

.table-wrap { overflow-x: auto; border: 1px solid var(--border); border-radius: 15px; background: var(--surface); box-shadow: var(--shadow); }
table { width: 100%; min-width: 760px; border-collapse: collapse; }
th, td { padding: 15px 16px; border-bottom: 1px solid var(--border); text-align: left; vertical-align: middle; }
th { color: var(--text-muted); background: var(--page); font-size: .75rem; }
tr:last-child td { border-bottom: 0; }
.permission-on { color: var(--success-text); font-weight: 800; }
.permission-chip { display: inline-flex; margin: 2px 4px 2px 0; padding: 5px 9px; color: var(--success-text); border-radius: 999px; background: var(--success-bg); font-size: .78rem; font-weight: 800; }
.permission-chip.is-paused { color: var(--error-text); background: var(--error-bg); }
.audit-table { min-width: 620px; }

.form-card { width: min(100%, 680px); }
.field { display: grid; gap: 7px; }
.field label { font-size: .82rem; font-weight: 900; }
.field input:not([type="checkbox"]) { width: 100%; min-height: 46px; padding: 0 13px; border: 1px solid var(--input-border); border-radius: 10px; background: var(--surface); }
.field small { line-height: 1.55; }
.field ul, .field-errors ul, .form-alert ul { margin: 0; padding-left: 20px; }
.field-errors, .form-alert { padding: 11px 13px; color: var(--error-text); border-radius: 10px; background: var(--error-bg); font-size: .85rem; }
.check-field { display: flex; align-items: center; gap: 11px; min-height: 48px; padding: 11px 13px; border: 1px solid var(--border); border-radius: 11px; font-weight: 800; cursor: pointer; }
.check-field input { width: 20px; height: 20px; accent-color: var(--primary); }
.permission-fieldset { display: grid; gap: 10px; min-width: 0; margin: 0; padding: 16px; border: 1px solid var(--border); border-radius: 12px; }
.permission-fieldset legend { padding: 0 6px; font-size: .82rem; font-weight: 900; }
.permission-fieldset > p { margin: 0; font-size: .84rem; }
.permission-options { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 9px; }
.form-actions { display: flex; justify-content: flex-end; gap: 10px; padding-top: 6px; }
.password-field { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 8px; }
.password-field > * { min-width: 0; }
.password-field .button { min-height: 46px; }
.field input[aria-invalid="true"] { border-color: var(--error-text); box-shadow: 0 0 0 1px var(--error-text); }

.feature-list { display: grid; }
.feature-row { display: flex; align-items: center; justify-content: space-between; gap: 18px; padding: 15px 0; border-bottom: 1px solid var(--border); }
.feature-row:last-child { border-bottom: 0; }
.feature-row p { margin: 3px 0 0; font-size: .84rem; }
.guard-card ul { padding-left: 20px; color: var(--text-strong); line-height: 1.8; }
.admin-preparation-card { display: flex; align-items: center; justify-content: space-between; gap: 24px; margin-bottom: 18px; border-color: var(--info-border); }
.admin-preparation-card p { margin-bottom: 6px; }
.admin-preparation-card small { display: block; line-height: 1.6; }
.role-summary-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 12px; }
.role-summary-card { padding: 18px; border: 1px solid var(--border); border-radius: 14px; background: var(--surface); }
.role-summary-card.destination { border-color: var(--info-border); background: var(--info-bg); }
.role-summary-card p { margin-bottom: 0; font-size: .84rem; }
.role-mark { display: inline-grid; place-items: center; width: 36px; height: 36px; margin-bottom: 12px; color: var(--link); border-radius: 10px; background: var(--info-emphasis); font-size: .78rem; font-weight: 900; }
.prework-warning { width: min(100%, 680px); }
.section-setting { align-items: flex-start; }
.section-setting-actions { display: grid; justify-items: end; gap: 9px; }
.inline-setting-form { display: flex; flex-wrap: wrap; justify-content: flex-end; align-items: center; gap: 8px; }
.inline-setting-form input[type="password"] { min-height: 44px; width: 180px; padding: 0 10px; border: 1px solid var(--input-border); border-radius: 9px; }
.compact-check { display: inline-flex; align-items: center; gap: 6px; min-height: 44px; font-size: .8rem; font-weight: 800; }
.compact-check input { width: 18px; height: 18px; accent-color: var(--primary); }
.catalog-counts { display: flex; flex-wrap: wrap; justify-content: flex-end; gap: 7px; }
.catalog-section-list { display: grid; gap: 18px; }
.catalog-section { padding: 0; overflow: hidden; }
.catalog-section-header { display: grid; grid-template-columns: minmax(0, 1fr) minmax(280px, auto); align-items: start; gap: 24px; padding: 22px 24px; background: var(--page); border-bottom: 1px solid var(--border); }
.catalog-section-header p { margin-bottom: 5px; }
.catalog-section-header code, .catalog-app-meta code { overflow-wrap: anywhere; }
.catalog-app-list { display: grid; }
.catalog-app-row { display: grid; grid-template-columns: minmax(0, 1.25fr) minmax(180px, .7fr) minmax(260px, .9fr); align-items: start; gap: 22px; padding: 22px 24px; border-bottom: 1px solid var(--border); }
.catalog-app-row:last-child { border-bottom: 0; }
.catalog-app-main p { margin-bottom: 0; }
.catalog-app-meta { display: grid; gap: 9px; min-width: 0; margin: 0; }
.catalog-app-meta div { display: grid; grid-template-columns: 90px minmax(0, 1fr); gap: 8px; }
.catalog-app-meta dt { color: var(--text-subtle); font-size: .72rem; font-weight: 800; }
.catalog-app-meta dd { min-width: 0; margin: 0; overflow-wrap: anywhere; font-size: .82rem; font-weight: 700; }
.work-app-state-form { display: grid; gap: 10px; min-width: 0; }
.compact-field { gap: 4px; }
.compact-field select, .compact-field input { width: 100%; min-width: 0; min-height: 44px; padding: 0 10px; border: 1px solid var(--input-border); border-radius: 9px; background: var(--surface); }
.sr-only { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0, 0, 0, 0); white-space: nowrap; border: 0; }

.login-page { min-height: 100vh; background: linear-gradient(135deg, var(--navy-950) 0 42%, var(--page) 42%); }
.login-main { display: grid; place-items: center; min-height: 100vh; padding: 28px 18px; }
.login-card { width: min(100%, 440px); padding: 32px; border: 1px solid var(--border); border-radius: 19px; background: var(--surface); box-shadow: var(--login-shadow); }
.login-brand { display: flex; align-items: center; gap: 12px; margin-bottom: 26px; }
.login-brand .brand-mark { color: var(--white); background: var(--navy-950); }
.login-help { margin: 20px 0 0; color: var(--text-subtle); font-size: .78rem; }
.setup-card { width: min(100%, 470px); }
.setup-card .muted { margin-bottom: 22px; }

:focus-visible { outline: 3px solid var(--focus-ring); outline-offset: 3px; }

/* The picker is progressive enhancement: hidden until theme.js is available. */
.theme-picker[hidden] { display: none; }
.theme-picker { display: flex; align-items: center; gap: 8px; min-width: 0; max-width: 100%; }
.theme-picker label { flex: 0 0 auto; color: var(--text-muted); font-size: .78rem; font-weight: 800; }
.theme-picker select { width: 150px; max-width: 100%; min-width: 0; min-height: 44px; padding: 0 10px; border: 1px solid var(--input-border-strong); border-radius: 9px; color: var(--text); background: var(--surface); font: inherit; font-size: .82rem; cursor: pointer; }
.topbar { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 12px 20px; }
.topbar > div { min-width: 0; }
.topbar .theme-picker { margin-left: auto; }
.login-appearance { display: flex; justify-content: flex-end; margin: -10px 0 20px; }
.login-appearance:has(.theme-picker[hidden]) { display: none; }

html[data-theme="dark"] :where(input:not([type="checkbox"]):not([type="radio"]), select, textarea) { color: var(--text); background-color: var(--surface); border-color: var(--input-border); }
html[data-theme="dark"] input::placeholder,
html[data-theme="dark"] textarea::placeholder { color: var(--text-muted); opacity: 1; }
html[data-theme="dark"] input[aria-invalid="true"],
html[data-theme="dark"] select[aria-invalid="true"],
html[data-theme="dark"] textarea[aria-invalid="true"] { border-color: var(--error-text); }
html[data-theme="dark"] .button[disabled],
html[data-theme="dark"] input:disabled,
html[data-theme="dark"] select:disabled,
html[data-theme="dark"] textarea:disabled { color: var(--text-muted); background: var(--surface-muted); border-color: var(--input-border); opacity: 1; }
html[data-theme="dark"] .message.info { color: var(--info-text); border-color: var(--info-border); background: var(--info-bg); }
html[data-theme="dark"] .message.warning { color: var(--warning-text); border-color: var(--warning-border); background: var(--warning-message-bg); }

@media (prefers-reduced-motion: no-preference) {
  body, .topbar, .card, .login-card, .theme-picker select {
    transition: background-color .15s ease, color .15s ease, border-color .15s ease;
  }
}

@media (max-width: 900px) {
  .app-shell { grid-template-columns: 84px minmax(0, 1fr); }
  .side-rail { padding-inline: 11px; }
  .brand { justify-content: center; }
  .brand-copy, .rail-label { display: none; }
  .primary-nav .nav-label, .rail-account small, .rail-account strong { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0, 0, 0, 0); clip-path: inset(50%); white-space: nowrap; border: 0; }
  .primary-nav a { justify-content: center; padding-inline: 6px; }
  .rail-account { padding-inline: 2px; }
  .rail-logout { font-size: 0; text-align: center; }
  .rail-logout::after { content: "退出"; font-size: .75rem; }
  .section-card { grid-column: 1 / -1; }
  .case-grid, .developer-grid { grid-template-columns: 1fr; }
  .role-summary-grid { grid-template-columns: 1fr; }
  .catalog-app-row { grid-template-columns: minmax(0, 1fr) minmax(220px, .8fr); }
  .work-app-state-form { grid-column: 1 / -1; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr) auto; align-items: end; }
}

@media (max-width: 640px) {
  .app-shell { display: block; }
  .side-rail { position: static; min-height: auto; max-height: none; flex-direction: row; align-items: center; gap: 8px; padding: 10px 12px; overflow-x: auto; }
  .brand { padding: 0; }
  .brand-mark { width: 40px; min-width: 40px; height: 40px; }
  .primary-nav { display: flex; gap: 6px; }
  .primary-nav a { min-width: 50px; min-height: 44px; }
  .rail-account { margin: 0 0 0 auto; padding: 0; border: 0; }
  .rail-logout { min-width: 48px; margin: 0; }
  .topbar { position: static; min-height: 76px; padding: 15px 18px; }
  .topbar p { display: none; }
  main { padding: 24px 16px 44px; }
  .hero { display: block; }
  .hero .badge, .hero .button { margin-top: 10px; }
  .screen-identity { padding: 18px; }
  .section-heading, .admin-preparation-card { display: grid; grid-template-columns: minmax(0, 1fr); align-items: stretch; justify-content: stretch; }
  .workspace, main, main > *, .admin-preparation-card, .admin-preparation-card > *, .role-summary-grid, .role-summary-card, .catalog-section-list, .catalog-section, .catalog-section-header, .catalog-section-header > *, .catalog-app-list, .catalog-app-row, .catalog-app-row > *, .section-setting-actions, .inline-setting-form, .work-app-state-form { min-width: 0; max-width: 100%; }
  .section-heading .button, .admin-preparation-card .button { width: 100%; }
  .button.long-label { white-space: normal; overflow-wrap: anywhere; }
  .section-card { grid-template-columns: 50px minmax(0, 1fr); padding: 18px; }
  .section-card .button { grid-column: 1 / -1; width: 100%; }
  .job-card { display: block; }
  .job-card .button { width: 100%; margin-top: 16px; }
  .card { padding: 18px; border-radius: 14px; }
  .drop-zone { padding: 20px 12px; }
  .form-actions { display: grid; grid-template-columns: 1fr; }
  .form-actions .button { width: 100%; }
  .login-page { background: var(--page); }
  .login-card { padding: 25px 20px; }
  .feature-row.section-setting { display: grid; }
  .section-setting-actions { justify-items: start; }
  .inline-setting-form { justify-content: flex-start; }
  .inline-setting-form, .inline-setting-form label, .inline-setting-form input[type="password"], .inline-setting-form .button { width: 100%; }
  .permission-options { grid-template-columns: 1fr; }
  .responsive-table { overflow: visible; border: 0; background: transparent; box-shadow: none; }
  .responsive-table table, .responsive-table tbody, .responsive-table tr, .responsive-table td { display: block; width: 100%; min-width: 0; }
  .responsive-table thead { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0, 0, 0, 0); white-space: nowrap; border: 0; }
  .responsive-table tr { margin-bottom: 12px; border: 1px solid var(--border); border-radius: 14px; background: var(--surface); box-shadow: var(--shadow); overflow: hidden; }
  .responsive-table td { display: grid; grid-template-columns: minmax(92px, .8fr) minmax(0, 1.4fr); gap: 10px; padding: 12px 14px; border-bottom: 1px solid var(--border); overflow-wrap: anywhere; }
  .responsive-table td:last-child { border-bottom: 0; }
  .responsive-table td::before { content: attr(data-label); color: var(--text-subtle); font-size: .72rem; font-weight: 900; }
  .responsive-table td .button { width: 100%; }
  .catalog-counts { justify-content: flex-start; }
  .catalog-section-header, .catalog-app-row { grid-template-columns: minmax(0, 1fr); padding: 18px; }
  .catalog-app-row { gap: 16px; }
  .work-app-state-form { grid-column: auto; grid-template-columns: 1fr; }
  .catalog-app-meta div { grid-template-columns: 105px minmax(0, 1fr); }
  .catalog-section-header code, .catalog-app-meta code { white-space: normal; word-break: break-all; }
  .password-field { grid-template-columns: minmax(0, 1fr) 64px; }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { scroll-behavior: auto !important; transition: none !important; }
}
.field select, .field textarea {
  width: 100%; min-height: 44px; padding: 10px 12px;
  border: 1px solid var(--input-border); border-radius: 10px;
  background: var(--surface); color: var(--text); font: inherit;
}
.field textarea { min-height: 120px; resize: vertical; }
.field input[type="checkbox"] { width: 22px; min-height: 22px; accent-color: var(--primary); }
.form-actions { flex-wrap: wrap; }
.catalog-section-header .form-actions { margin-top: 12px; }
.form-card { max-width: 780px; }
