:root {
  --bg: #f6f1e7;
  --ink: #17212f;
  --muted: #4f5b6b;
  --line: #cfd7e3;
  --panel: #fffcf7;
  --danger: #b42318;
  --warn: #dc6803;
  --ok: #087443;
  --timeline-bg: #e9edf2;
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  color: var(--ink);
  font-family: "Avenir Next", "Segoe UI", sans-serif;
  background:
    radial-gradient(1200px 500px at 8% 0%, #fff3db 0%, transparent 50%),
    radial-gradient(900px 420px at 95% 100%, #fde4c6 0%, transparent 40%),
    var(--bg);
}

.wrap {
  max-width: 1150px;
  margin: 0 auto;
  padding: 1.8rem 1rem 2.5rem;
}

h1 {
  margin: 0;
  font-size: clamp(1.4rem, 2.8vw, 2.3rem);
}

.sub {
  color: var(--muted);
  margin: 0.45rem 0;
}

.notice {
  border: 1px solid #fdb022;
  background: #fffaeb;
  border-radius: 14px;
  padding: 0.9rem;
  font-size: 0.97rem;
  margin: 0.8rem 0 1rem;
}

.notice-inline {
  display: grid;
  grid-template-columns: 1.6fr 1fr 1fr;
  gap: 0.9rem;
  align-items: start;
}

.notice-copy {
  line-height: 1.45;
  margin: 0;
  padding-left: 1.1rem;
}

.notice-copy li + li {
  margin-top: 0.35rem;
}

.notice-text-col {
  display: grid;
  gap: 0.75rem;
}

#inlineEvidenceImage {
  width: 100%;
  border-radius: 12px;
  border: 1px solid var(--line);
  object-fit: cover;
}

#inlineMapImage {
  width: 100%;
  border-radius: 12px;
  border: 1px solid var(--line);
  object-fit: cover;
}

.inline-video-wrap {
  width: 100%;
  aspect-ratio: 16 / 9;
  border-radius: 12px;
  overflow: hidden;
  border: 1px solid var(--line);
  background: #000;
}

.inline-video-wrap iframe {
  width: 100%;
  height: 100%;
  border: 0;
}

.inline-videos {
  display: grid;
  gap: 0.7rem;
}

.plain {
  border: 1px solid #fca5a5;
  background: #fff1f2;
  border-radius: 14px;
  padding: 0.95rem;
  margin: 0 0 1rem;
}

.plain h3 {
  margin: 0 0 0.35rem;
}

.plain p {
  margin: 0.25rem 0;
  color: #7f1d1d;
  font-size: 1rem;
}

.grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(170px, 1fr));
  gap: 0.7rem;
  margin: 0.8rem 0 1.2rem;
}

.card {
  border: 1px solid var(--line);
  border-radius: 14px;
  background: var(--panel);
  padding: 0.85rem;
}

.label {
  font-size: 0.78rem;
  text-transform: uppercase;
  color: var(--muted);
  letter-spacing: 0.04em;
}

.value {
  margin-top: 0.35rem;
  font-weight: 750;
  font-size: 1.25rem;
}

.panel {
  border: 1px solid var(--line);
  border-radius: 16px;
  background: var(--panel);
  padding: 1rem;
  margin-bottom: 0.95rem;
}

audio {
  width: 100%;
  margin-top: 0.55rem;
}

#timelineWrap {
  position: relative;
  margin-top: 0.55rem;
  border-radius: 10px;
  overflow: hidden;
  border: 1px solid var(--line);
  background: var(--timeline-bg);
}

#timeline {
  width: 100%;
  height: 132px;
  display: block;
}

#cursor {
  position: absolute;
  top: 0;
  bottom: 0;
  width: 3px;
  background: #101828;
  box-shadow: 0 0 0 1px #ffffff80;
  pointer-events: none;
  transform: translateX(0);
}

.legend {
  color: var(--muted);
  font-size: 0.93rem;
  margin-top: 0.5rem;
}

.tiny {
  font-size: 0.9rem;
  color: var(--muted);
  margin-top: 0.4rem;
}

.table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.94rem;
}

.table-scroll {
  width: 100%;
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
}

#sessionTable {
  min-width: 760px;
}

.table th,
.table td {
  border-bottom: 1px solid #e8ecf2;
  text-align: left;
  padding: 0.45rem 0.3rem;
}

.table tr.is-active {
  background: #ffe8cc;
}

.sev-low {
  color: var(--ok);
  font-weight: 700;
}

.sev-mod,
.sev-high {
  color: var(--warn);
  font-weight: 700;
}

.sev-severe {
  color: var(--danger);
  font-weight: 700;
}

.row-btn {
  border: 1px solid #d0d5dd;
  background: #fff;
  color: #1f2937;
  border-radius: 9px;
  padding: 0.2rem 0.5rem;
  cursor: pointer;
  font-size: 0.84rem;
}

.row-btn:hover {
  background: #f9fafb;
}

.row-btn.is-active {
  background: #17212f;
  color: #fff;
  border-color: #17212f;
}

.video-wrap {
  position: relative;
  width: 100%;
  max-width: 900px;
  aspect-ratio: 16 / 9;
  border-radius: 12px;
  overflow: hidden;
  border: 1px solid var(--line);
}

.video-wrap iframe {
  width: 100%;
  height: 100%;
  border: 0;
}

@media (max-width: 1080px) {
  .notice-inline {
    grid-template-columns: 1fr 1fr;
  }
}

@media (max-width: 860px) {
  .notice-inline {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 760px) {
  #sessionTable {
    min-width: 680px;
  }

  #sessionTable th,
  #sessionTable td {
    padding: 0.38rem 0.22rem;
    font-size: 0.86rem;
    white-space: nowrap;
  }

  #sessionTable .row-btn {
    padding: 0.16rem 0.42rem;
    font-size: 0.8rem;
  }
}
