:root {
  --bg-deep: #08090b;
  --bg: #0e1011;
  --surface: #131513;
  --surface-raised: #191b18;
  --surface-soft: #101210;
  --border: rgba(240, 235, 221, 0.12);
  --border-strong: rgba(240, 235, 221, 0.24);
  --moon: #f0ebdd;
  --text: #f0ebdd;
  --muted: #b8b2a7;
  --quiet: #817f79;
  --violet: #c8df28;
  --violet-strong: #dceb68;
  --violet-soft: rgba(200, 223, 40, 0.1);
  --blue-soft: rgba(115, 103, 128, 0.08);
  --success: #75d8b5;
  --success-soft: rgba(117, 216, 181, 0.12);
  --error: #ff9eae;
  --error-soft: rgba(255, 116, 140, 0.12);
  --warning: #f4c982;
  --shadow: 0 24px 60px rgba(0, 0, 0, 0.32);
  --radius: 18px;
  font-family: Inter, ui-sans-serif, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  color: var(--text);
  background: var(--bg-deep);
}

* { box-sizing: border-box; }

html { min-width: 320px; background: var(--bg-deep); }

body {
  min-height: 100vh;
  margin: 0;
  background:
    radial-gradient(circle at 15% -15%, rgba(200, 223, 40, 0.08), transparent 34rem),
    radial-gradient(circle at 95% 5%, rgba(115, 103, 128, 0.07), transparent 28rem),
    linear-gradient(150deg, var(--bg-deep), var(--bg) 56%, #0b0d0c);
  color: var(--text);
}

body::before {
  position: fixed;
  inset: 0;
  z-index: -2;
  background-image: linear-gradient(rgba(255,255,255,.018) 1px, transparent 1px), linear-gradient(90deg, rgba(255,255,255,.014) 1px, transparent 1px);
  background-size: 42px 42px;
  content: "";
  mask-image: linear-gradient(to bottom, black, transparent 80%);
}

button, input, textarea, select { font: inherit; }

button { color: inherit; }

button, input, select { min-height: 44px; }

button:focus-visible,
input:focus-visible,
textarea:focus-visible,
select:focus-visible,
[tabindex]:focus-visible {
  outline: 3px solid rgba(220, 235, 104, 0.72);
  outline-offset: 3px;
}

[hidden] { display: none !important; }

.ambient {
  position: fixed;
  z-index: -1;
  border-radius: 50%;
  filter: blur(2px);
  opacity: 0.35;
  pointer-events: none;
}

.ambient-one { top: 14%; left: 4%; width: 2px; height: 2px; box-shadow: 0 0 75px 30px rgba(200, 223, 40, .12); }
.ambient-two { right: 8%; bottom: 8%; width: 1px; height: 1px; box-shadow: 0 0 95px 36px rgba(115, 103, 128, .12); }

.eyebrow,
.section-kicker {
  margin: 0 0 7px;
  color: var(--violet-strong);
  font-size: 0.7rem;
  font-weight: 700;
  letter-spacing: 0.18em;
  text-transform: uppercase;
}

.login-view {
  display: grid;
  min-height: 100vh;
  padding: 28px;
  place-items: center;
}

.login-card {
  width: min(100%, 430px);
  padding: clamp(28px, 5vw, 46px);
  border: 1px solid var(--border);
  border-radius: 24px;
  background: linear-gradient(145deg, rgba(25, 31, 52, .93), rgba(14, 18, 34, .96));
  box-shadow: var(--shadow);
  backdrop-filter: blur(18px);
}

.login-card h1 { margin: 0; font-size: clamp(1.9rem, 7vw, 2.5rem); letter-spacing: -0.04em; }
.login-copy { margin: 14px 0 28px; color: var(--muted); line-height: 1.7; }

.stack { display: grid; gap: 9px; }
.stack label, .editor-field label, .field label { color: #c7cde4; font-size: .84rem; font-weight: 650; }
.stack input, .stack select, .stack textarea, .field input, .field select, .field textarea {
  width: 100%;
  margin-bottom: 10px;
  border: 1px solid var(--border-strong);
  border-radius: 10px;
  background: rgba(7, 10, 21, .68);
  color: var(--text);
}
.stack input, .stack select, .field input, .field select { padding: 0 13px; }
.stack textarea { padding: 12px 13px; line-height: 1.6; resize: vertical; }
.field textarea { min-height: 112px; padding: 12px 13px; line-height: 1.55; resize: vertical; }
.form-help { margin: -4px 0 10px; color: var(--quiet); font-size: .75rem; line-height: 1.5; }
.form-message { margin: 2px 0; color: var(--error); font-size: .84rem; }

.button,
.icon-button {
  display: inline-flex;
  min-height: 44px;
  align-items: center;
  justify-content: center;
  border: 1px solid transparent;
  border-radius: 10px;
  cursor: pointer;
  font-size: .86rem;
  font-weight: 700;
  transition: border-color .18s ease, background .18s ease, color .18s ease, transform .18s ease;
}
.button { padding: 0 17px; }
.button:hover:not(:disabled) { transform: translateY(-1px); }
.button:disabled { cursor: not-allowed; opacity: .42; }
.button-primary { background: var(--moon); color: #111527; }
.button-primary:hover:not(:disabled) { background: #fff; }
.button-secondary { border-color: var(--border-strong); background: var(--violet-soft); color: #ded9ff; }
.button-secondary:hover:not(:disabled) { border-color: rgba(182, 170, 255, .5); background: rgba(155, 140, 255, .2); }
.button-ghost { border-color: var(--border); background: transparent; color: var(--muted); }
.button-publish { border-color: rgba(117, 216, 181, .36); background: var(--success-soft); color: var(--success); }
.button-danger { border-color: rgba(255, 158, 174, .3); background: var(--error-soft); color: var(--error); }
.button-wide { width: 100%; }
.icon-button { width: 44px; padding: 0; border-color: var(--border); background: transparent; color: var(--muted); font-size: 1.45rem; }

.app-shell { min-height: 100vh; }
.topbar {
  display: flex;
  min-height: 76px;
  align-items: center;
  justify-content: space-between;
  padding: 13px clamp(18px, 3vw, 42px);
  border-bottom: 1px solid var(--border);
  background: rgba(8, 11, 22, .7);
  backdrop-filter: blur(18px);
}
.brand { margin: 0; font-size: 1.1rem; font-weight: 750; letter-spacing: -.02em; }
.topbar-actions { display: flex; align-items: center; gap: 14px; }
.quiet { color: var(--quiet); font-size: .78rem; }

.module-navigation {
  position: sticky;
  top: 0;
  z-index: 5;
  display: flex;
  gap: 4px;
  padding: 10px clamp(18px, 3vw, 42px);
  border-bottom: 1px solid var(--border);
  background: rgba(8, 9, 11, .82);
  backdrop-filter: blur(18px);
}
.module-tab {
  min-height: 38px;
  padding: 0 18px;
  border: 0;
  border-radius: 999px;
  background: transparent;
  color: var(--muted);
  cursor: pointer;
  font-size: .86rem;
  font-weight: 680;
}
.module-tab:hover { color: var(--text); }
.module-tab.is-active { background: var(--text); color: var(--bg-deep); }

.operations-page {
  width: min(100% - 36px, 1180px);
  margin: 0 auto;
  padding: clamp(34px, 6vw, 78px) 0 72px;
}
.page-heading { display: flex; align-items: end; justify-content: space-between; gap: 28px; }
.page-heading h1 { margin: 0; font-size: clamp(2.1rem, 5vw, 4rem); letter-spacing: -.055em; line-height: 1; }
.page-actions { display: flex; flex-wrap: wrap; justify-content: flex-end; gap: 8px; }
.page-actions input, .page-actions select {
  min-width: 180px;
  padding: 0 13px;
  border: 1px solid var(--border-strong);
  border-radius: 10px;
  background: var(--surface-soft);
  color: var(--text);
}
.page-actions input { min-width: min(280px, 70vw); }
.summary-strip {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  margin: 54px 0 8px;
  padding: 0 4px 14px;
  border-bottom: 1px solid var(--border);
  color: var(--muted);
}
.summary-strip strong { color: var(--text); font-size: 1.65rem; letter-spacing: -.04em; }
.record-list { display: grid; }
.record-row {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 22px;
  width: 100%;
  min-height: 108px;
  padding: 22px 4px;
  border: 0;
  border-bottom: 1px solid var(--border);
  background: transparent;
  color: inherit;
  cursor: pointer;
  text-align: left;
}
.record-row:hover .record-title { color: var(--violet-strong); }
.record-title { margin: 0; font-size: 1.08rem; font-weight: 680; line-height: 1.45; transition: color .18s ease; }
.record-subtitle { display: flex; flex-wrap: wrap; gap: 8px 14px; margin-top: 9px; color: var(--quiet); font-size: .76rem; }
.record-side { display: flex; align-items: center; gap: 12px; }
.record-chevron { color: var(--quiet); font-size: 1.35rem; }
.empty-state { margin-top: 28px; padding: 70px 20px; border: 1px dashed var(--border-strong); border-radius: 16px; color: var(--quiet); text-align: center; }
.status-pill { display: inline-flex; min-height: 27px; align-items: center; padding: 0 9px; border-radius: 999px; background: rgba(240,235,221,.08); color: var(--muted); font-size: .7rem; font-weight: 700; }
.status-pill[data-status="new"] { background: rgba(200,223,40,.11); color: var(--violet-strong); }
.status-pill[data-status="in_progress"] { background: rgba(201,138,84,.13); color: #d9a575; }
.status-pill[data-status="resolved"], .status-pill[data-status="active"] { background: var(--success-soft); color: var(--success); }
.status-pill[data-status="disabled"] { background: var(--error-soft); color: var(--error); }
.monospace { font-family: "SFMono-Regular", Consolas, monospace; overflow-wrap: anywhere; }

.settings-panel {
  display: grid;
  gap: 24px;
  width: min(100%, 720px);
  margin-top: 54px;
  padding: clamp(24px, 4vw, 38px);
  border: 1px solid var(--border);
  border-radius: 16px;
  background: var(--surface);
}
.setting-toggle { display: flex; min-height: 60px; align-items: center; justify-content: space-between; gap: 24px; cursor: pointer; }
.setting-toggle span { display: grid; gap: 7px; }
.setting-toggle strong { font-size: 1rem; }
.setting-toggle small { color: var(--quiet); font-size: .78rem; line-height: 1.55; }
.setting-toggle input { width: 24px; height: 24px; margin: 0; accent-color: var(--violet); }
.setting-field { display: grid; gap: 9px; }
.setting-field label { color: var(--muted); font-size: .84rem; font-weight: 650; }
.setting-field input { width: min(100%, 320px); padding: 0 13px; border: 1px solid var(--border-strong); border-radius: 10px; background: var(--surface-soft); color: var(--text); }
.settings-actions { display: flex; justify-content: flex-end; }

.workspace {
  display: grid;
  grid-template-columns: minmax(210px, .7fr) minmax(420px, 1.85fr) minmax(300px, 1fr);
  gap: 14px;
  width: min(100%, 1680px);
  min-height: calc(100vh - 76px);
  margin: 0 auto;
  padding: 18px;
}
.panel {
  min-width: 0;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  background: linear-gradient(155deg, rgba(20, 25, 43, .86), rgba(13, 17, 31, .9));
  box-shadow: 0 18px 50px rgba(0, 0, 0, .18);
}
.panel-heading { padding: 24px 22px 17px; }
.panel-heading h2 { margin: 0; font-size: 1.15rem; }
.description { margin: 8px 0 0; color: var(--muted); font-size: .83rem; line-height: 1.58; }

.prompt-navigation { display: flex; flex-direction: column; overflow: hidden; }
.prompt-list { display: grid; gap: 6px; padding: 0 10px; }
.prompt-item {
  display: grid;
  width: 100%;
  min-height: 66px;
  padding: 11px 12px;
  border: 1px solid transparent;
  border-radius: 11px;
  background: transparent;
  color: var(--muted);
  cursor: pointer;
  text-align: left;
}
.prompt-list > [role="listitem"] { min-width: 0; }
.prompt-item:hover { background: rgba(255,255,255,.025); color: var(--text); }
.prompt-item[aria-current="page"] { border-color: rgba(155, 140, 255, .28); background: var(--violet-soft); color: var(--text); }
.prompt-item-title { font-size: .88rem; font-weight: 700; }
.prompt-item-meta { display: flex; align-items: center; justify-content: space-between; gap: 7px; margin-top: 5px; color: var(--quiet); font-size: .69rem; }
.navigation-note { margin: auto 18px 20px; padding-top: 22px; color: var(--quiet); font-size: .73rem; line-height: 1.6; }

.status-badge,
.badge {
  display: inline-flex;
  min-height: 24px;
  align-items: center;
  padding: 0 8px;
  border: 1px solid rgba(117, 216, 181, .22);
  border-radius: 999px;
  background: var(--success-soft);
  color: var(--success);
  font-size: .65rem;
  font-weight: 750;
  white-space: nowrap;
}
.status-badge[data-state="draft"], .badge[data-state="draft"] { border-color: rgba(244, 201, 130, .25); background: rgba(244, 201, 130, .1); color: var(--warning); }

.editor-panel { display: flex; flex-direction: column; padding: 24px; }
.editor-header { display: flex; align-items: flex-start; justify-content: space-between; gap: 20px; }
.editor-heading-copy { min-width: 0; }
.title-line { display: flex; align-items: center; gap: 10px; }
.title-line h1 { overflow: hidden; margin: 0; font-size: clamp(1.35rem, 2vw, 1.75rem); letter-spacing: -.035em; text-overflow: ellipsis; white-space: nowrap; }
.version-summary { display: grid; grid-template-columns: repeat(3, 1fr); gap: 1px; margin: 24px 0 20px; overflow: hidden; border: 1px solid var(--border); border-radius: 11px; background: var(--border); }
.version-summary div { padding: 12px 14px; background: var(--surface-soft); }
.version-summary dt { margin-bottom: 5px; color: var(--quiet); font-size: .67rem; }
.version-summary dd { margin: 0; color: #d3d8ed; font-size: .82rem; font-weight: 680; }
.dirty-state { color: var(--success); }
.dirty-state.is-dirty { color: var(--warning); }
.recovery-conflict {
  display: grid;
  gap: 12px;
  margin: 0 0 18px;
  padding: 14px;
  border: 1px solid rgba(244, 201, 130, .3);
  border-radius: 11px;
  background: rgba(244, 201, 130, .08);
}
.recovery-conflict strong { color: var(--warning); font-size: .84rem; }
.recovery-conflict p { margin: 5px 0 0; color: var(--muted); font-size: .76rem; line-height: 1.55; }
.recovery-conflict-actions { display: flex; flex-wrap: wrap; justify-content: flex-end; gap: 8px; }
.editor-field { display: flex; min-height: 0; flex: 1; flex-direction: column; gap: 9px; }
.prompt-content,
.version-content,
.diff-view {
  font-family: "SFMono-Regular", Consolas, "Liberation Mono", monospace;
}
.prompt-content {
  width: 100%;
  min-height: 480px;
  flex: 1;
  padding: 18px;
  border: 1px solid var(--border);
  border-radius: 12px;
  background: rgba(5, 8, 18, .68);
  color: #e6e9f8;
  caret-color: var(--violet-strong);
  font-size: .86rem;
  line-height: 1.75;
  resize: vertical;
}
.prompt-content:disabled { color: var(--quiet); }
.editor-actions { display: flex; justify-content: flex-end; gap: 10px; padding-top: 17px; }

.debug-panel { padding-bottom: 22px; }
.debug-form { padding: 0 20px; }
.field { display: grid; }
.debug-result { margin: 22px 20px 0; padding-top: 20px; border-top: 1px solid var(--border); }
.result-heading { display: flex; align-items: center; justify-content: space-between; }
.result-heading h3 { margin: 0; font-size: .92rem; }
.result-dot { width: 7px; height: 7px; border-radius: 50%; background: var(--success); box-shadow: 0 0 12px var(--success); }
.debug-reply { margin: 13px 0 17px; color: #dfe3f5; font-size: .87rem; line-height: 1.75; white-space: pre-wrap; }
.metrics { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; margin: 0; }
.metrics div { min-width: 0; padding: 10px; border-radius: 9px; background: rgba(5, 8, 18, .5); }
.metrics dt { color: var(--quiet); font-size: .63rem; }
.metrics dd { overflow: hidden; margin: 4px 0 0; color: #cfd4e8; font-size: .72rem; text-overflow: ellipsis; white-space: nowrap; }
.metrics .metric-wide { grid-column: 1 / -1; }

.dialog {
  width: min(calc(100vw - 32px), 1120px);
  max-height: min(86vh, 900px);
  padding: 0;
  overflow: hidden;
  border: 1px solid var(--border-strong);
  border-radius: 18px;
  background: #101525;
  color: var(--text);
  box-shadow: var(--shadow);
}
.dialog::backdrop { background: rgba(3, 5, 12, .76); backdrop-filter: blur(5px); }
.dialog-header { display: flex; align-items: center; justify-content: space-between; padding: 20px 22px; border-bottom: 1px solid var(--border); }
.dialog-header h2, .confirm-dialog h2 { margin: 0; font-size: 1.25rem; }
.version-layout { display: grid; grid-template-columns: 250px minmax(0, 1fr); min-height: 580px; max-height: calc(86vh - 83px); }
.version-list { padding: 12px; overflow-y: auto; border-right: 1px solid var(--border); }
.version-list > [role="listitem"] { min-width: 0; }
.version-item { display: grid; width: 100%; min-height: 62px; margin-bottom: 6px; padding: 10px; border: 1px solid transparent; border-radius: 10px; background: transparent; color: var(--muted); cursor: pointer; text-align: left; }
.version-item[aria-current="true"] { border-color: rgba(155, 140, 255, .3); background: var(--violet-soft); color: var(--text); }
.version-item-title { font-weight: 700; }
.version-item-time { margin-top: 4px; color: var(--quiet); font-size: .68rem; }
.version-detail { min-width: 0; padding: 20px; overflow-y: auto; }
.version-detail-heading { display: flex; align-items: flex-start; justify-content: space-between; gap: 16px; }
.version-detail-heading h3 { margin: 0; }
.version-content { min-height: 155px; max-height: 240px; padding: 14px; overflow: auto; border: 1px solid var(--border); border-radius: 10px; background: rgba(5, 8, 18, .62); color: #d9ddef; font-size: .76rem; line-height: 1.65; white-space: pre-wrap; }
.version-detail h4 { margin: 20px 0 10px; font-size: .8rem; }
.diff-view { display: grid; gap: 3px; font-size: .72rem; }
.diff-row { display: grid; grid-template-columns: 34px minmax(0, 1fr) 34px minmax(0, 1fr); overflow: hidden; border-radius: 6px; background: rgba(5, 8, 18, .48); }
.diff-line-number { padding: 6px 7px; color: #626c8c; text-align: right; user-select: none; }
.diff-line { min-height: 30px; padding: 6px 8px; overflow-wrap: anywhere; white-space: pre-wrap; }
.diff-line.is-removed { background: var(--error-soft); color: #ffc4cd; }
.diff-line.is-added { background: var(--success-soft); color: #bcebd9; }
.is-success { color: var(--success); }
.is-error { color: var(--error); }
.confirm-dialog { width: min(calc(100vw - 32px), 470px); padding: 26px; }
.confirm-dialog p:not(.section-kicker) { color: var(--muted); line-height: 1.7; }
.dialog-actions { display: flex; justify-content: flex-end; gap: 9px; margin-top: 25px; }
.form-dialog, .feedback-dialog { width: min(calc(100vw - 32px), 680px); max-height: 88vh; overflow-y: auto; }
.form-dialog form, .feedback-dialog form { padding: 0 24px 24px; }
.form-dialog .dialog-header, .feedback-dialog .dialog-header { margin: 0 -24px 16px; }
.check-row { display: flex; min-height: 44px; align-items: center; gap: 10px; }
.check-row input { width: 18px; min-height: 18px; margin: 0; }
.split-actions { display: grid; grid-template-columns: auto 1fr auto auto; }
.detail-meta { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; margin: 0; }
.detail-meta div { padding: 12px; border-radius: 10px; background: var(--surface-soft); }
.detail-meta dt { color: var(--quiet); font-size: .68rem; }
.detail-meta dd { margin: 5px 0 0; overflow-wrap: anywhere; font-size: .8rem; }
.feedback-images { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 8px; }
.feedback-images a { min-height: 120px; overflow: hidden; border: 1px solid var(--border); border-radius: 10px; background: var(--surface-soft); }
.feedback-images img { display: block; width: 100%; height: 100%; object-fit: cover; }
.thread-heading { display: flex; align-items: baseline; justify-content: space-between; gap: 12px; margin: 8px 0 12px; }
.thread-heading h3 { margin: 0; font-size: 15px; }
.feedback-thread { display: flex; flex-direction: column; gap: 12px; max-height: 360px; overflow-y: auto; padding: 16px; border: 1px solid var(--border); border-radius: 14px; background: var(--surface-soft); }
.feedback-message { width: min(86%, 520px); padding: 12px 14px; border: 1px solid var(--border); border-radius: 14px; color: var(--text); background: var(--surface); }
.feedback-message[data-sender="admin"] { align-self: flex-end; border-color: color-mix(in srgb, var(--violet) 38%, var(--border)); background: color-mix(in srgb, var(--violet) 7%, var(--surface)); }
.feedback-message[data-sender="user"] { align-self: flex-start; }
.feedback-message-copy { margin: 0; line-height: 1.65; white-space: pre-wrap; overflow-wrap: anywhere; }
.feedback-message-meta { display: flex; justify-content: space-between; gap: 12px; margin-top: 7px; color: var(--muted); font-size: 12px; }
.record-unread { display: inline-flex; align-items: center; gap: 6px; color: var(--error); font-size: 12px; font-weight: 650; }
.record-unread::before { content: ""; width: 7px; height: 7px; border-radius: 50%; background: var(--error); }

.live-status {
  position: fixed;
  right: 20px;
  bottom: 20px;
  z-index: 20;
  max-width: min(420px, calc(100vw - 40px));
  padding: 12px 16px;
  border: 1px solid var(--border-strong);
  border-radius: 10px;
  background: #171d31;
  box-shadow: var(--shadow);
  color: var(--text);
  font-size: .82rem;
  opacity: 0;
  pointer-events: none;
  transform: translateY(8px);
  transition: opacity .18s ease, transform .18s ease;
}
.live-status.is-visible { opacity: 1; transform: translateY(0); }
.live-status[data-tone="success"] { border-color: rgba(117, 216, 181, .32); color: var(--success); }
.live-status[data-tone="error"] { border-color: rgba(255, 158, 174, .32); color: var(--error); }

@media (max-width: 1180px) {
  .workspace { grid-template-columns: 200px minmax(380px, 1.55fr) minmax(280px, 1fr); }
  .editor-panel { padding: 20px; }
}

@media (max-width: 960px) {
  .workspace { grid-template-columns: 1fr; }
  .prompt-navigation { grid-row: 1; }
  .prompt-list { grid-template-columns: repeat(2, minmax(0, 1fr)); padding-bottom: 12px; }
  .navigation-note { display: none; }
  .editor-panel { grid-row: 2; }
  .debug-panel { grid-row: 3; }
  .prompt-content { min-height: 420px; }
  .debug-fields { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 0 12px; }
  .debug-fields > .field-wide, .debug-fields > .base-scene-fields { grid-column: 1 / -1; }
}

@media (max-width: 680px) {
  .topbar { align-items: flex-start; }
  .topbar-actions { align-items: flex-end; flex-direction: column-reverse; gap: 3px; }
  .workspace { padding: 10px; }
  .prompt-list, .debug-fields { grid-template-columns: 1fr; }
  .editor-header, .version-detail-heading { flex-direction: column; }
  .editor-header .button, .version-detail-heading .button { width: 100%; }
  .version-summary { grid-template-columns: 1fr; }
  .editor-actions { display: grid; grid-template-columns: 1fr 1fr; }
  .version-layout { grid-template-columns: 1fr; }
  .version-list { display: flex; min-height: 88px; overflow-x: auto; border-right: 0; border-bottom: 1px solid var(--border); }
  .version-list > [role="listitem"] { min-width: 150px; margin-right: 6px; }
  .version-item { min-width: 150px; margin: 0; }
  .diff-row { grid-template-columns: 28px minmax(0, 1fr); }
  .diff-row > :nth-child(3), .diff-row > :nth-child(4) { border-top: 1px solid var(--border); }
  .module-navigation { overflow-x: auto; }
  .operations-page { width: min(100% - 24px, 1180px); padding-top: 38px; }
  .page-heading { align-items: stretch; flex-direction: column; }
  .page-actions { justify-content: stretch; }
  .page-actions input, .page-actions select, .page-actions button { width: 100%; }
  .summary-strip { margin-top: 36px; }
  .record-row { grid-template-columns: 1fr; gap: 12px; }
  .record-side { justify-content: space-between; }
  .feedback-images { grid-template-columns: 1fr 1fr; }
  .split-actions { grid-template-columns: 1fr 1fr; }
  .split-actions span { display: none; }
  .detail-meta { grid-template-columns: 1fr; }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { scroll-behavior: auto !important; transition-duration: .01ms !important; }
}
