:root {
  color-scheme: light;
  --google-blue: #0b57d0;
  --google-blue-hover: #0842a0;
  --google-blue-soft: #d3e3fd;
  --google-blue-pale: #edf4ff;
  --google-red: #d93025;
  --google-red-soft: #fce8e6;
  --google-yellow: #f9ab00;
  --google-yellow-soft: #fef7e0;
  --google-green: #188038;
  --google-green-soft: #e6f4ea;
  --ink: #1f1f1f;
  --muted: #5f6368;
  --line: #c4c7c5;
  --line-soft: #e1e3e1;
  --surface: #ffffff;
  --surface-low: #f8fafd;
  --surface-high: #f0f4f9;
  --shadow-1: 0 1px 2px rgba(60, 64, 67, .12), 0 1px 3px 1px rgba(60, 64, 67, .08);
  --shadow-2: 0 4px 8px 3px rgba(60, 64, 67, .12), 0 1px 3px rgba(60, 64, 67, .18);
  --font: "Google Sans Flex", "Google Sans", Roboto, Arial, sans-serif;
  font-family: var(--font);
  font-optical-sizing: auto;
}

* { box-sizing: border-box; }

html {
  min-width: 320px;
  background: var(--surface);
  scroll-behavior: smooth;
}

body {
  min-width: 320px;
  min-height: 100vh;
  margin: 0;
  color: var(--ink);
  background: var(--surface);
  font-family: var(--font);
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

button, input, textarea { font: inherit; }
button { -webkit-tap-highlight-color: transparent; }
button:not(:disabled), [role="button"]:not([aria-disabled="true"]) { cursor: pointer; }
button:focus-visible, input:focus-visible, textarea:focus-visible, [tabindex]:focus-visible, a:focus-visible {
  outline: 3px solid var(--google-blue);
  outline-offset: 2px;
}
button:active:not(:disabled) { transform: scale(.97); }
h1, h2, p { margin-top: 0; }
svg { display: block; width: 1.5rem; height: 1.5rem; fill: currentColor; }

.visually-hidden {
  position: absolute !important;
  width: 1px !important;
  height: 1px !important;
  padding: 0 !important;
  margin: -1px !important;
  overflow: hidden !important;
  clip: rect(0, 0, 0, 0) !important;
  white-space: nowrap !important;
  border: 0 !important;
}

.app-bar {
  position: sticky;
  z-index: 100;
  top: 0;
  width: 100%;
  padding-top: env(safe-area-inset-top);
  border-bottom: 1px solid #e8eaed;
  background: rgba(255, 255, 255, .94);
  box-shadow: 0 1px 2px rgba(60, 64, 67, .06);
  backdrop-filter: blur(16px);
}

.app-bar::after {
  position: absolute;
  right: 0;
  bottom: -1px;
  left: 0;
  height: 2px;
  background: linear-gradient(90deg, var(--google-blue) 0 25%, var(--google-red) 25% 50%, var(--google-yellow) 50% 75%, var(--google-green) 75% 100%);
  content: "";
  opacity: .9;
}

.app-bar-inner {
  display: flex;
  width: min(100%, 1120px);
  min-height: 64px;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  margin: 0 auto;
  padding: 8px max(20px, env(safe-area-inset-right)) 8px max(20px, env(safe-area-inset-left));
}

.app-brand { display: flex; min-width: 0; align-items: center; gap: 11px; }
.brand-icon {
  display: grid;
  width: 40px;
  height: 40px;
  flex: 0 0 auto;
  place-items: center;
  background: transparent;
}
.app-logo { display: block; width: 30px; height: 30px; object-fit: contain; }
h1 {
  overflow: hidden;
  margin: 0;
  font-size: clamp(1.05rem, 2.2vw, 1.25rem);
  font-variation-settings: "wght" 620;
  font-weight: 620;
  letter-spacing: -.015em;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.export-button {
  position: relative;
  display: grid;
  width: 44px;
  height: 44px;
  flex: 0 0 auto;
  place-items: center;
  border: 0;
  border-radius: 50%;
  background: transparent;
  color: var(--google-blue);
  transition: background-color .18s ease, box-shadow .18s ease, transform .1s ease;
}
.export-button::before {
  position: absolute;
  inset: 5px;
  border-radius: inherit;
  background: var(--google-blue-soft);
  content: "";
  opacity: 0;
  transform: scale(.75);
  transition: opacity .18s ease, transform .18s ease;
}
.export-button svg { position: relative; z-index: 1; }
.export-button:hover { background: var(--google-blue-pale); }
.export-button:hover::before { opacity: .62; transform: scale(1); }
.export-button:disabled { color: #9aa0a6; cursor: wait; }
.export-button.is-busy { background: var(--google-blue-pale); cursor: wait; }
.export-button.is-busy svg { opacity: .12; }
.export-button.is-busy::after {
  position: absolute;
  z-index: 2;
  width: 20px;
  height: 20px;
  border: 2px solid rgba(11, 87, 208, .22);
  border-top-color: var(--google-blue);
  border-radius: 50%;
  content: "";
  animation: export-spin .72s linear infinite;
}

.app-main {
  width: min(100%, 1000px);
  margin: 0 auto;
  padding: clamp(24px, 5vw, 48px) max(20px, env(safe-area-inset-right)) max(72px, env(safe-area-inset-bottom)) max(20px, env(safe-area-inset-left));
}

.panel {
  overflow: hidden;
  border: 1px solid var(--line-soft);
  border-radius: 24px;
  background: var(--surface-low);
  box-shadow: var(--shadow-1);
  transition: box-shadow .2s ease;
}
.panel:focus-within { box-shadow: 0 1px 2px rgba(60, 64, 67, .12), 0 4px 16px rgba(11, 87, 208, .08); }
.panel-toggle {
  display: flex;
  width: 100%;
  min-height: 80px;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 16px 20px;
  border: 0;
  border-bottom: 1px solid var(--line-soft);
  background: var(--google-blue-pale);
  color: var(--ink);
  text-align: left;
  transition: background-color .18s ease, transform .1s ease;
}
.panel-toggle:hover { background: #e3edff; }
.panel-toggle[aria-expanded="false"] { border-bottom-color: transparent; }
.panel-title-group, .section-title-group { display: flex; min-width: 0; align-items: center; gap: 13px; }
.panel-icon, .section-icon {
  display: grid;
  width: 44px;
  height: 44px;
  flex: 0 0 auto;
  place-items: center;
  border-radius: 14px;
}
.panel-icon { background: var(--google-blue-soft); color: var(--google-blue); }
.panel-title-copy { display: grid; min-width: 0; gap: 2px; }
.panel-kicker, .eyebrow {
  margin: 0;
  color: var(--google-blue);
  font-size: .72rem;
  font-variation-settings: "wght" 650;
  font-weight: 650;
  letter-spacing: .055em;
  text-transform: uppercase;
}
.panel-toggle strong { display: block; font-size: 1.08rem; font-variation-settings: "wght" 620; font-weight: 620; }
.chevron {
  display: grid;
  width: 40px;
  height: 40px;
  flex: 0 0 auto;
  place-items: center;
  border-radius: 50%;
  color: var(--google-blue);
  transition: background-color .18s ease, transform .22s ease;
}
.panel-toggle:hover .chevron { background: rgba(11, 87, 208, .09); }
.panel-toggle[aria-expanded="false"] .chevron { transform: rotate(180deg); }

#incident-form { padding: clamp(18px, 4vw, 28px); }
.field-grid { display: grid; grid-template-columns: 1fr; gap: 22px; }
.field {
  display: grid;
  gap: 8px;
  margin: 0;
  color: #3c4043;
  font-size: .88rem;
  font-variation-settings: "wght" 600;
  font-weight: 600;
}
.field small, .media-field small {
  color: var(--muted);
  font-size: .75rem;
  font-variation-settings: "wght" 430;
  font-weight: 430;
  line-height: 1.45;
}
.field-full { grid-column: 1 / -1; }
.field input, .field textarea {
  width: 100%;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: var(--surface);
  color: var(--ink);
  caret-color: var(--google-blue);
  padding: 13px 14px;
  transition: border-color .18s ease, box-shadow .18s ease, background-color .18s ease;
}
.field input:hover, .field textarea:hover { border-color: #80868b; }
.field input:focus, .field textarea:focus { border-color: var(--google-blue); outline: 0; box-shadow: 0 0 0 1px var(--google-blue); }
.field textarea { min-height: 124px; resize: vertical; line-height: 1.55; }
.date-row { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 10px; }

.compact-button, .media-button, .text-button {
  border: 1px solid var(--line);
  border-radius: 999px;
  background: var(--surface);
  color: var(--google-blue);
  font-variation-settings: "wght" 600;
  font-weight: 600;
  transition: border-color .18s ease, background-color .18s ease, box-shadow .18s ease, transform .1s ease;
}
.compact-button { min-height: 46px; padding: 0 18px; }
.compact-button:hover, .text-button:hover { border-color: #a8c7fa; background: var(--google-blue-pale); }
.media-field { padding: 0; border: 0; }
.media-field legend { padding: 0; margin-bottom: 9px; }
.media-actions { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; }
.media-button {
  display: flex;
  min-height: 50px;
  align-items: center;
  justify-content: center;
  gap: 9px;
  padding: 10px 16px;
  border-color: #a8c7fa;
  color: var(--google-blue);
}
.media-button:nth-child(2) { border-color: #a8dab5; color: var(--google-green); }
.media-button:hover { background: var(--google-blue-pale); box-shadow: 0 1px 2px rgba(60, 64, 67, .1); }
.media-button:nth-child(2):hover { background: var(--google-green-soft); }
.media-button svg { width: 1.25rem; height: 1.25rem; flex: 0 0 auto; }

.drop-zone {
  display: flex;
  min-height: 118px;
  align-items: center;
  justify-content: center;
  gap: 12px;
  padding: 20px;
  border: 2px dashed #a8c7fa;
  border-radius: 18px;
  background: var(--google-blue-pale);
  color: var(--google-blue);
  text-align: left;
  transition: border-color .18s ease, background-color .18s ease, box-shadow .18s ease, transform .18s ease;
}
.drop-zone:hover { border-color: var(--google-blue); background: #e3edff; box-shadow: 0 2px 8px rgba(11, 87, 208, .08); }
.drop-zone.dragging { border-color: var(--google-blue); background: var(--google-blue-soft); box-shadow: 0 0 0 4px rgba(11, 87, 208, .12); transform: scale(1.01); }
.drop-zone-icon {
  display: grid;
  width: 46px;
  height: 46px;
  flex: 0 0 auto;
  place-items: center;
  border-radius: 14px;
  background: var(--surface);
  box-shadow: var(--shadow-1);
}
.drop-zone > span:last-child { display: grid; gap: 3px; }
.drop-zone strong { font-size: .88rem; font-variation-settings: "wght" 620; font-weight: 620; }
.drop-zone small { color: var(--muted); font-size: .75rem; }

.selected-media { display: grid; grid-template-columns: repeat(auto-fill, minmax(145px, 1fr)); gap: 12px; }
.selected-item {
  position: relative;
  min-width: 0;
  overflow: hidden;
  border: 1px solid var(--line-soft);
  border-radius: 16px;
  background: var(--surface);
  box-shadow: 0 1px 2px rgba(60, 64, 67, .08);
}
.selected-item img, .selected-item video { display: block; width: 100%; height: 110px; object-fit: cover; background: #202124; }
.selected-meta { padding: 10px 11px; }
.selected-name {
  display: block;
  overflow: hidden;
  color: var(--ink);
  font-size: .73rem;
  font-variation-settings: "wght" 600;
  font-weight: 600;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.selected-size { color: var(--muted); font-size: .68rem; }
.remove-file {
  position: absolute;
  top: 7px;
  right: 7px;
  display: grid;
  width: 30px;
  height: 30px;
  place-items: center;
  border: 0;
  border-radius: 50%;
  background: rgba(32, 33, 36, .82);
  color: white;
  box-shadow: 0 1px 4px rgba(0, 0, 0, .25);
  font-size: 1rem;
}
.remove-file:hover { background: var(--google-red); }

.retry-banner, .progress-panel { margin-top: 18px; padding: 14px 16px; border-radius: 16px; }
.retry-banner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  background: var(--google-yellow-soft);
  color: #744700;
}
.retry-banner p { margin: 0; font-size: .82rem; font-variation-settings: "wght" 540; font-weight: 540; }
.text-button { flex: 0 0 auto; padding: 8px 12px; border-color: currentColor; background: transparent; color: inherit; font-size: .75rem; }
.progress-panel { background: var(--google-blue-pale); }
.progress-copy { display: flex; justify-content: space-between; gap: 10px; margin-bottom: 8px; color: var(--muted); font-size: .78rem; font-variation-settings: "wght" 560; font-weight: 560; }
progress { display: block; width: 100%; height: 7px; overflow: hidden; border: 0; border-radius: 99px; accent-color: var(--google-blue); }

.primary-button {
  width: 100%;
  min-height: 50px;
  margin-top: 22px;
  padding: 12px 24px;
  border: 0;
  border-radius: 999px;
  background: var(--google-blue);
  color: white;
  box-shadow: 0 1px 2px rgba(60, 64, 67, .2);
  font-variation-settings: "wght" 620;
  font-weight: 620;
  letter-spacing: .01em;
  transition: background-color .18s ease, box-shadow .18s ease, transform .1s ease;
}
.primary-button:hover:not(:disabled) { background: var(--google-blue-hover); box-shadow: var(--shadow-2); }
.primary-button:disabled { background: #e3e3e3; color: #8a8a8a; box-shadow: none; cursor: wait; }

.timeline-section { margin-top: clamp(36px, 7vw, 64px); }
.section-heading { display: flex; align-items: center; justify-content: space-between; gap: 16px; padding: 0 4px 18px; }
.section-icon { background: var(--google-green-soft); color: var(--google-green); }
h2 {
  margin: 2px 0 0;
  font-size: clamp(1.25rem, 3vw, 1.55rem);
  font-variation-settings: "wght" 620;
  font-weight: 620;
  letter-spacing: -.02em;
}
.incident-count {
  flex: 0 0 auto;
  padding: 6px 11px;
  border-radius: 999px;
  background: var(--surface-high);
  color: var(--muted);
  font-size: .75rem;
  font-variation-settings: "wght" 560;
  font-weight: 560;
}

.timeline {
  position: relative;
  display: grid;
  grid-template-columns: minmax(0, 1fr) 64px minmax(0, 1fr);
  row-gap: 24px;
  padding: 8px 0 4px;
}
.timeline::before {
  position: absolute;
  top: 12px;
  bottom: 12px;
  left: 50%;
  width: 3px;
  transform: translateX(-50%);
  border-radius: 99px;
  background: linear-gradient(180deg, var(--google-blue), var(--google-red) 35%, var(--google-yellow) 68%, var(--google-green));
  content: "";
  opacity: .82;
}
.timeline.is-empty::before { display: none; }
.empty-state { grid-column: 1 / -1; padding: 42px 24px; border: 1px dashed #a8c7fa; border-radius: 20px; background: var(--google-blue-pale); color: var(--muted); text-align: center; }
.timeline-item {
  --event-color: var(--google-blue);
  position: relative;
  display: grid;
  grid-template-columns: minmax(0, 1fr) 64px minmax(0, 1fr);
  grid-column: 1 / -1;
  align-items: start;
}
.timeline-item--red { --event-color: var(--google-red); }
.timeline-item--yellow { --event-color: var(--google-yellow); }
.timeline-item--green { --event-color: var(--google-green); }
.timeline-item::after {
  position: absolute;
  z-index: 0;
  top: 34px;
  left: calc(50% - 32px);
  width: 32px;
  height: 2px;
  background: #d9e2f3;
  content: "";
}
.timeline-item--right::after { left: 50%; }
.timeline-marker {
  z-index: 2;
  grid-row: 1;
  grid-column: 2;
  justify-self: center;
  width: 18px;
  height: 18px;
  margin-top: 26px;
  border: 4px solid var(--surface);
  border-radius: 50%;
  background: var(--event-color);
  box-shadow: 0 0 0 1px #a8c7fa, 0 1px 3px rgba(60, 64, 67, .22);
}
.incident-card {
  position: relative;
  z-index: 1;
  grid-row: 1;
  padding: 18px;
  border: 1px solid var(--line-soft);
  border-radius: 18px;
  background: var(--surface);
  box-shadow: var(--shadow-1);
  transition: border-color .2s ease, box-shadow .2s ease, transform .2s ease;
  animation: card-arrive .3s ease both;
}
.timeline-item--left .incident-card { grid-column: 1; }
.timeline-item--right .incident-card { grid-column: 3; }
.incident-card:hover { border-color: #d2e3fc; box-shadow: var(--shadow-2); transform: translateY(-1px); }
.incident-header { display: flex; align-items: flex-start; justify-content: space-between; gap: 8px; margin-bottom: 7px; }
.incident-header-meta { display: flex; min-width: 0; flex: 1 1 auto; flex-wrap: wrap; align-items: center; gap: 6px; padding-top: 4px; }
.incident-date { color: var(--event-color); font-size: .88rem; font-variation-settings: "wght" 650; font-weight: 650; }
.updated-badge, .legacy-badge { padding: 4px 9px; border-radius: 999px; font-size: .65rem; font-variation-settings: "wght" 600; font-weight: 600; }
.updated-badge { background: var(--google-yellow-soft); color: #7a4d00; }
.legacy-badge { background: var(--google-red-soft); color: var(--google-red); }
.incident-description {
  margin: 0;
  color: #3c4043;
  font-size: .93rem;
  font-variation-settings: "wght" 430;
  font-weight: 430;
  line-height: 1.5;
  white-space: pre-wrap;
  word-break: break-word;
}

.media-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 190px), 1fr)); gap: 10px; margin-top: 14px; }
.media-card {
  min-width: 0;
  overflow: hidden;
  border: 1px solid var(--line-soft);
  border-radius: 14px;
  background: var(--surface-low);
  transition: box-shadow .18s ease, transform .18s ease;
}
.media-card:hover { box-shadow: var(--shadow-1); transform: translateY(-1px); }
.media-preview-button { position: relative; display: block; width: 100%; height: auto; aspect-ratio: 16 / 9; padding: 0; overflow: hidden; border: 0; background: #202124; }
.media-preview-button img { display: block; width: 100%; height: 100%; object-fit: cover; transition: transform .24s ease; }
.media-preview-button:hover img { transform: scale(1.035); }
.media-fallback { display: grid; width: 100%; height: 100%; place-items: center; padding: 16px; color: white; font-size: .8rem; text-align: center; }
.play-mark {
  position: absolute;
  inset: 50% auto auto 50%;
  display: grid;
  width: 50px;
  height: 50px;
  place-items: center;
  transform: translate(-50%, -50%);
  border: 2px solid white;
  border-radius: 50%;
  background: rgba(0, 0, 0, .58);
  color: white;
  box-shadow: 0 2px 8px rgba(0, 0, 0, .3);
  font-size: 1.2rem;
}
.legacy-video { display: block; width: 100%; max-height: 280px; background: #202124; }
.card-actions { display: flex; flex-wrap: wrap; justify-content: flex-end; gap: 6px; margin-top: 10px; padding-top: 0; }
.card-button {
  min-height: 36px;
  padding: 7px 13px;
  border: 0;
  border-radius: 999px;
  background: transparent;
  color: var(--google-blue);
  font-size: .76rem;
  font-variation-settings: "wght" 600;
  font-weight: 600;
  transition: background-color .18s ease, color .18s ease, transform .1s ease;
}
.card-button:hover { background: var(--google-blue-pale); }
.card-button.danger { color: var(--google-red); }
.card-button.danger:hover { background: var(--google-red-soft); }
.incident-action-buttons { flex: 0 0 auto; flex-wrap: nowrap; gap: 2px; margin: -7px -7px 0 0; }
.card-icon-button {
  display: grid;
  width: 40px;
  height: 40px;
  min-height: 40px;
  place-items: center;
  padding: 0;
  border-radius: 50%;
}
.card-icon-button svg { width: 19px; height: 19px; }
.edit-form { display: grid; gap: 10px; margin-top: 15px; padding: 16px; border-radius: 16px; background: var(--surface-high); }
.edit-form[hidden] { display: none; }
.edit-field { display: grid; gap: 6px; color: #3c4043; font-size: .78rem; font-variation-settings: "wght" 600; font-weight: 600; }
.edit-form input, .edit-form textarea { width: 100%; padding: 11px 12px; border: 1px solid var(--line); border-radius: 10px; background: var(--surface); }
.edit-form input:focus, .edit-form textarea:focus { border-color: var(--google-blue); outline: 0; box-shadow: 0 0 0 1px var(--google-blue); }
.edit-form textarea { min-height: 92px; resize: vertical; }

.toast-region {
  position: fixed;
  z-index: 1200;
  right: max(18px, env(safe-area-inset-right));
  bottom: max(18px, env(safe-area-inset-bottom));
  display: grid;
  max-width: min(420px, calc(100vw - 36px));
  gap: 9px;
}
.toast { padding: 14px 17px; border-radius: 14px; background: #303134; color: white; box-shadow: var(--shadow-2); font-size: .84rem; line-height: 1.45; animation: toast-in .24s ease both; }
.toast.error { background: #a50e0e; }
.toast.success { background: var(--google-green); }

.media-modal { position: fixed; z-index: 1000; inset: 0; display: grid; place-items: center; padding: 20px; }
.media-modal[hidden] { display: none; }
.media-modal :focus-visible { outline-color: #ffffff; outline-offset: 3px; }
.media-modal-backdrop { position: absolute; inset: 0; background: rgba(32, 33, 36, .84); backdrop-filter: blur(5px); }
.media-modal-card {
  position: relative;
  display: grid;
  grid-template-rows: auto minmax(0, 1fr) auto;
  width: min(1100px, 96vw);
  max-height: 94vh;
  overflow: hidden;
  border-radius: 24px;
  background: #202124;
  color: white;
  box-shadow: 0 24px 70px rgba(0, 0, 0, .45);
  animation: modal-in .2s ease both;
}
.media-modal-header { display: flex; min-height: 58px; align-items: center; justify-content: space-between; gap: 12px; padding: 10px 14px 10px 20px; }
.media-modal-header h2 { overflow: hidden; margin: 0; font-size: .96rem; text-overflow: ellipsis; white-space: nowrap; }
.modal-close {
  display: grid;
  width: 42px;
  height: 42px;
  place-items: center;
  border: 0;
  border-radius: 50%;
  background: transparent;
  color: white;
  font-size: 1.7rem;
  line-height: 1;
  transition: background-color .18s ease;
}
.modal-close:hover { background: rgba(255, 255, 255, .12); }
.media-modal-content { display: grid; min-height: 0; max-height: calc(94vh - 116px); place-items: center; overflow: auto; background: #111315; }
.media-modal-content img, .media-modal-content video { display: block; max-width: 100%; max-height: calc(94vh - 124px); object-fit: contain; }
.media-modal-content iframe { width: min(960px, 94vw); height: min(72vh, 720px); border: 0; background: #111315; }
.drive-link { justify-self: center; margin: 10px 16px 14px; color: #a8c7fa; font-size: .82rem; font-variation-settings: "wght" 600; font-weight: 600; }
.body-modal-open { overflow: hidden; }
[hidden] { display: none !important; }

@keyframes card-arrive { from { opacity: 0; transform: translateY(8px); } to { opacity: 1; transform: translateY(0); } }
@keyframes toast-in { from { opacity: 0; transform: translateY(8px) scale(.98); } to { opacity: 1; transform: translateY(0) scale(1); } }
@keyframes modal-in { from { opacity: 0; transform: scale(.97); } to { opacity: 1; transform: scale(1); } }
@keyframes export-spin { to { transform: rotate(360deg); } }

@media (max-width: 760px) {
  .timeline { display: block; padding: 6px 0 2px; }
  .timeline::before { left: 17px; transform: translateX(-50%); }
  .timeline-item { grid-template-columns: 34px minmax(0, 1fr); margin-bottom: 18px; }
  .timeline-item:last-child { margin-bottom: 0; }
  .timeline-item--left .incident-card,
  .timeline-item--right .incident-card { grid-column: 2; }
  .timeline-marker { grid-column: 1; }
  .timeline-item::after,
  .timeline-item--right::after { left: 17px; width: 17px; }
}

@media (max-width: 640px) {
  .app-bar-inner { min-height: 58px; padding-right: max(12px, env(safe-area-inset-right)); padding-left: max(12px, env(safe-area-inset-left)); }
  .brand-icon { width: 36px; height: 36px; }
  .app-logo { width: 27px; height: 27px; }
  .app-main { padding-top: 20px; padding-right: max(12px, env(safe-area-inset-right)); padding-left: max(12px, env(safe-area-inset-left)); }
  .panel { border-radius: 20px; }
  .panel-toggle { min-height: 72px; padding: 14px 16px; }
  .panel-icon, .section-icon { width: 40px; height: 40px; border-radius: 13px; }
  #incident-form { padding: 18px 16px 20px; }
  .date-row, .media-actions { grid-template-columns: 1fr; }
  .compact-button { min-height: 44px; }
  .drop-zone { min-height: 108px; padding: 16px; }
  .retry-banner { align-items: flex-start; flex-direction: column; }
  .section-heading { align-items: flex-end; }
  .media-grid { grid-template-columns: 1fr; }
  .card-actions { justify-content: flex-start; }
  .media-modal { padding: 0; }
  .media-modal-card { width: 100vw; max-height: 100dvh; border-radius: 0; }
}

@media (max-width: 390px) {
  h1 { max-width: 210px; font-size: 1rem; }
  .panel-kicker { display: none; }
  .panel-title-group, .section-title-group { gap: 10px; }
  .selected-media { grid-template-columns: 1fr 1fr; }
}

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

@media print {
  @page { margin: 14mm; }
  body { padding: 0; background: white; }
  .no-print, .entry-panel, .toast-region, .media-modal { display: none !important; }
  .app-bar { position: static; border-bottom: 1px solid #dadce0; box-shadow: none; }
  .app-bar::after { display: none; }
  .app-bar-inner { justify-content: flex-start; padding: 0 0 16px; }
  .app-main { width: 100%; padding: 20px 0 0; }
  .timeline-section { margin-top: 0; }
  .timeline { display: block; padding-left: 0; }
  .timeline::before, .timeline-marker, .timeline-item::after { display: none; }
  .timeline-item { display: block; margin: 0 0 12px; }
  .incident-card { width: 100%; break-inside: avoid; box-shadow: none; }
  .card-actions { display: none; }
  .media-grid { grid-template-columns: repeat(2, 1fr); }
  .media-preview-button { height: 120px; }
  .play-mark { display: none; }
}
