:root {
  --bg: #f3f0ea;
  --panel: #fffdf8;
  --ink: #1f1a17;
  --muted: #6f6259;
  --line: #d9cec3;
  --accent: #9c3d12;
  --accent-soft: #f7dfd3;
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  color: var(--ink);
  background:
    radial-gradient(circle at top left, rgba(156, 61, 18, 0.12), transparent 28%),
    linear-gradient(180deg, #efe7dd 0%, var(--bg) 340px);
  font-family: "SUIT Variable", "Pretendard Variable", sans-serif;
}

.shell {
  width: min(1240px, calc(100% - 32px));
  margin: 0 auto;
  padding: 24px 0 48px;
}

.hero,
.panel {
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: 8px;
}

.hero {
  padding: 22px;
  margin-bottom: 14px;
}

.eyebrow {
  margin: 0 0 8px;
  color: var(--accent);
  font-size: 13px;
  font-weight: 700;
  text-transform: uppercase;
}

h1 {
  margin: 0 0 10px;
  font-size: 30px;
}

.hero-copy {
  margin: 0 0 14px;
  color: var(--muted);
  line-height: 1.6;
}

.notice-copy {
  margin: 0;
  color: var(--muted);
  font-size: 14px;
  line-height: 1.6;
}

.hero-actions,
.live-actions,
.live-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  align-items: center;
}

.hero-actions {
  margin-bottom: 16px;
}

.status-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 10px;
  margin-bottom: 10px;
}

.compact-status {
  grid-template-columns: repeat(3, minmax(0, 1fr));
}

.compact-four {
  grid-template-columns: repeat(4, minmax(0, 1fr));
}

.status-card {
  padding: 12px 14px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff;
}

.status-label {
  display: block;
  margin-bottom: 6px;
  color: var(--muted);
  font-size: 12px;
}

.status-value {
  display: block;
  font-size: 22px;
  line-height: 1.1;
}

.status-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-bottom: 12px;
  color: var(--muted);
  font-size: 13px;
}

.section-kicker {
  margin: -4px 0 12px;
  color: var(--muted);
  font-size: 13px;
}

.mini-reference-panel {
  margin: -2px 0 12px;
  padding: 12px 14px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff;
}

.mini-reference-head {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  margin-bottom: 10px;
}

.mini-reference-title {
  margin: 0;
  font-size: 15px;
}

.mini-reference-copy {
  color: var(--muted);
  font-size: 13px;
}

.mini-reference-list {
  display: grid;
  grid-template-columns: repeat(6, minmax(0, 1fr));
  gap: 6px;
}

.mini-reference-item {
  display: grid;
  gap: 4px;
  padding: 8px 10px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fbf5ef;
}

.mini-reference-item strong {
  font-size: 13px;
}

.mini-reference-item span {
  color: var(--muted);
  font-size: 11px;
}

.mini-reference-item.is-current {
  border-color: rgba(156, 61, 18, 0.22);
  background: #f7dfd3;
}

.mini-reference-item.is-current strong,
.mini-reference-item.is-current span {
  color: var(--accent);
}

.filters {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  align-items: end;
}

.filters label {
  display: grid;
  gap: 6px;
}

.filters span {
  font-size: 13px;
  color: var(--muted);
}

input,
select,
button {
  height: 40px;
  padding: 0 12px;
  border: 1px solid var(--line);
  border-radius: 6px;
  background: #fff;
  color: var(--ink);
  font: inherit;
}

button,
.download {
  background: var(--accent);
  color: #fff;
  border: 0;
  text-decoration: none;
  cursor: pointer;
}

.secondary,
.secondary-link {
  background: var(--accent-soft);
  color: var(--accent);
  border: 1px solid rgba(156, 61, 18, 0.18);
}

.panel {
  overflow: hidden;
}

.panel-body {
  padding: 18px;
}

table {
  width: 100%;
  border-collapse: collapse;
}

th,
td {
  padding: 11px 12px;
  border-bottom: 1px solid var(--line);
  text-align: left;
  vertical-align: middle;
}

th {
  background: #fbf5ef;
  font-size: 13px;
}

.date-separator-row td {
  padding: 10px 12px 6px;
  border-bottom: 0;
  border-top: 1px solid rgba(156, 61, 18, 0.16);
  background: transparent;
}

.date-separator-chip {
  display: inline-flex;
  align-items: center;
  height: 20px;
  padding: 0 8px;
  border-radius: 999px;
  background: #f9f3ee;
  color: #7c5a4d;
  border: 1px solid rgba(124, 90, 77, 0.12);
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0;
}

.waveform {
  display: block;
  width: 220px;
  max-width: 100%;
  height: auto;
}

.waveform-track {
  position: relative;
  display: inline-block;
  width: 220px;
  max-width: 100%;
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff;
  cursor: pointer;
}

.waveform-track:focus-visible {
  outline: 2px solid rgba(227, 90, 67, 0.42);
  outline-offset: 2px;
}

.waveform-progress {
  position: absolute;
  inset: 0 auto 0 0;
  width: 0;
  background: linear-gradient(90deg, rgba(227, 90, 67, 0.18), rgba(227, 90, 67, 0.08));
  pointer-events: none;
  z-index: 1;
}

.waveform-playhead {
  position: absolute;
  top: 0;
  bottom: 0;
  left: 0;
  width: 2px;
  background: #e35a43;
  box-shadow: 0 0 0 1px rgba(255, 255, 255, 0.42);
  transform: translateX(-1px);
  pointer-events: none;
  z-index: 2;
}

audio {
  width: 220px;
  max-width: 100%;
}

.download {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 68px;
  height: 34px;
  border-radius: 6px;
  padding: 0 12px;
  gap: 6px;
  font-size: 13px;
}

.table-link {
  display: inline-flex;
  flex-direction: column;
  gap: 4px;
  color: var(--accent);
  text-decoration: none;
  font-weight: 600;
}

.table-link:hover {
  text-decoration: underline;
}

.event-id {
  color: var(--muted);
  font-size: 11px;
  font-weight: 700;
}

.event-time {
  color: var(--accent);
  font-size: 14px;
}

.assessment-cell {
  display: grid;
  gap: 5px;
  min-width: 180px;
}

.assessment-badge {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: fit-content;
  min-width: 46px;
  height: 24px;
  padding: 0 10px;
  border-radius: 999px;
  font-size: 12px;
  font-weight: 700;
  border: 1px solid transparent;
}

.assessment-badge.is-strong {
  background: #f7dfd3;
  border-color: rgba(156, 61, 18, 0.18);
  color: var(--accent);
}

.assessment-badge.is-maybe {
  background: #f6f1ea;
  border-color: rgba(111, 98, 89, 0.18);
  color: #6f6259;
}

.assessment-badge.is-weak {
  background: #f1f5f9;
  border-color: rgba(71, 85, 105, 0.18);
  color: #475569;
}

.assessment-copy,
.detail-assessment-copy {
  color: var(--muted);
  font-size: 12px;
  line-height: 1.45;
}

.live-hero {
  display: grid;
  gap: 14px;
}

.live-meta {
  color: var(--muted);
  font-size: 14px;
}

.live-status {
  margin: 0;
  color: var(--accent);
  font-weight: 700;
}

#liveAudio {
  width: min(640px, 100%);
}

.empty {
  text-align: center;
  color: var(--muted);
}

.detail-layout {
  display: grid;
  gap: 18px;
}

.reference-panel {
  margin-top: 18px;
}

.pager {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  justify-content: center;
  align-items: center;
  width: fit-content;
  max-width: 100%;
  margin: 16px auto 0;
  padding: 6px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: rgba(255, 253, 248, 0.92);
  box-shadow: 0 10px 24px rgba(31, 26, 23, 0.05);
}

.pager-link {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 36px;
  height: 36px;
  padding: 0 12px;
  border: 1px solid transparent;
  border-radius: 999px;
  background: #fff;
  color: var(--ink);
  text-decoration: none;
  font-weight: 600;
  transition: background-color 120ms ease, color 120ms ease, border-color 120ms ease, transform 120ms ease;
}

.pager-link:hover {
  border-color: rgba(156, 61, 18, 0.18);
  background: #fff8f3;
  color: var(--accent);
  transform: translateY(-1px);
}

.pager-link.is-current {
  background: var(--accent);
  border-color: var(--accent);
  color: #fff;
  font-weight: 700;
}

.pager-link.is-disabled {
  color: var(--muted);
  background: #f6f1ea;
  border-color: transparent;
}

.reference-table-wrap {
  overflow-x: auto;
}

.reference-table {
  width: 100%;
  border-collapse: collapse;
}

.reference-table tr.is-current td {
  background: #f7dfd3;
  color: var(--accent);
  font-weight: 700;
}

.detail-panel {
  overflow: hidden;
}

.section-title {
  margin: 0 0 10px;
  font-size: 18px;
}

.detail-waveform {
  display: block;
  width: 100%;
  max-width: 100%;
  height: auto;
}

.detail-waveform-track {
  display: block;
  width: 100%;
  max-width: 100%;
}

.detail-audio {
  width: min(720px, 100%);
}

.detail-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 14px;
}

.detail-assessment {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px;
  margin: 0 0 12px;
}

.meta-list {
  display: grid;
  gap: 12px;
  margin: 0;
}

.meta-list div {
  display: grid;
  gap: 6px;
  padding: 12px 0;
  border-bottom: 1px solid var(--line);
}

.meta-list dt {
  color: var(--muted);
  font-size: 13px;
}

.meta-list dd {
  margin: 0;
  word-break: break-word;
}

.stats-grid {
  display: grid;
  grid-template-columns: 1.3fr 1fr;
  gap: 14px;
  margin-bottom: 14px;
}

.inline-stats-grid {
  margin-top: 0;
}

.lower-stats-grid {
  margin-top: 20px;
}

.summary-board {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
  margin-bottom: 8px;
}

.summary-board .status-card {
  padding: 10px 12px;
}

.summary-board .status-label {
  margin-bottom: 5px;
  font-size: 11px;
}

.summary-board .status-value {
  font-size: 19px;
}

.stats-summary-grid {
  margin-bottom: 0;
}

.compact-stats-list .stats-item {
  padding: 8px 10px;
}

.inline-stats-grid .panel-body {
  padding: 14px;
}

.stats-table {
  width: 100%;
  border-collapse: collapse;
}

.stats-table th,
.stats-table td {
  padding: 8px 10px;
}

.stats-table th {
  font-size: 13px;
}

.stats-time {
  font-size: 18px;
}

.stats-list {
  display: grid;
  gap: 8px;
}

.stats-item {
  display: grid;
  gap: 5px;
  padding: 10px 12px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff;
  color: var(--ink);
  text-decoration: none;
}

.stats-item:hover {
  border-color: rgba(156, 61, 18, 0.22);
  background: #fff8f3;
}

.stats-item-head,
.stats-item-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  align-items: center;
}

.stats-item-head span,
.stats-item-meta span {
  color: var(--muted);
  font-size: 13px;
}

.patch-notes-scroll {
  display: grid;
  gap: 10px;
  max-height: 260px;
  overflow-y: auto;
  padding-right: 4px;
}

.patch-note {
  padding: 10px 12px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff;
}

.patch-note-head {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  align-items: baseline;
  margin-bottom: 8px;
}

.patch-note-head strong {
  color: var(--accent);
  font-size: 13px;
}

.patch-note-head span {
  color: var(--muted);
  font-size: 13px;
}

.patch-note-list {
  margin: 0;
  padding-left: 18px;
  display: grid;
  gap: 4px;
  color: var(--ink);
  font-size: 13px;
  line-height: 1.5;
}

@media (max-width: 900px) {
  .status-grid,
  .compact-status,
  .compact-four {
    grid-template-columns: 1fr;
  }

  .mini-reference-list {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .stats-grid {
    grid-template-columns: 1fr;
  }

  .summary-board {
    grid-template-columns: 1fr;
  }

  .panel {
    overflow-x: auto;
  }

  table {
    min-width: 920px;
  }
}
