:root {
  color-scheme: light;
  font-family: Inter, "Segoe UI", "Hiragino Sans", "Yu Gothic", sans-serif;
  color: #172033;
  background: #eef5f7;
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  height: 100vh;
  overflow: hidden;
}

.shell {
  display: flex;
  flex-direction: column;
  width: min(1800px, calc(100vw - 32px));
  height: 100vh;
  margin: 0 auto;
  padding: 24px 0;
}

.header {
  flex: 0 0 auto;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 14px;
}

.eyebrow {
  margin: 0 0 6px;
  color: #278377;
  font-size: 13px;
  font-weight: 700;
}

h1,
h2 {
  margin: 0;
}

h1 {
  font-size: 28px;
}

h2 {
  font-size: 17px;
}

.status {
  min-width: 96px;
  padding: 8px 12px;
  border: 1px solid #cdd7e3;
  border-radius: 999px;
  background: #fff;
  color: #6c788a;
  text-align: center;
  font-weight: 700;
}

.status.live {
  border-color: #43bca8;
  color: #06786c;
}

.toolbar {
  flex: 0 0 auto;
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-bottom: 14px;
}

button {
  height: 38px;
  border: 1px solid #20887b;
  border-radius: 7px;
  padding: 0 16px;
  background: #20887b;
  color: #fff;
  font-size: 14px;
  font-weight: 700;
  cursor: pointer;
}

button:disabled {
  border-color: #c6d0dc;
  background: #dce4ec;
  cursor: not-allowed;
}

button.secondary {
  border-color: #cbd5e1;
  background: #fff;
  color: #475569;
}

.grid {
  flex: 1 1 auto;
  min-height: 0;
  display: grid;
  grid-template-columns: minmax(0, 1.1fr) minmax(0, 1fr) minmax(0, 1fr);
  gap: 16px;
}

.panel {
  min-height: 0;
  display: flex;
  flex-direction: column;
  border: 1px solid #d9e2ec;
  border-radius: 8px;
  background: #fff;
  box-shadow: 0 12px 30px rgba(38, 59, 91, 0.08);
}

.panel-title {
  flex: 0 0 auto;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  border-bottom: 1px solid #e6edf5;
  padding: 14px 16px;
  color: #64748b;
}

.panel-actions {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 10px;
  min-width: 0;
}

.mini-button {
  height: 28px;
  border-color: #cbd5e1;
  background: #fff;
  color: #475569;
  padding: 0 10px;
  font-size: 12px;
  white-space: nowrap;
}

.partial {
  flex: 1 1 auto;
  min-height: 0;
  overflow: auto;
  padding: 18px;
  font-size: clamp(18px, 1.45vw, 28px);
  line-height: 1.7;
  white-space: pre-wrap;
  word-break: break-word;
}

.final-list {
  flex: 1 1 auto;
  min-height: 0;
  margin: 0;
  padding: 12px 18px 12px 42px;
  overflow: auto;
  line-height: 1.65;
}

.final-list li {
  margin: 0 0 10px;
}

.events {
  flex: 1 1 auto;
  min-height: 0;
  overflow: auto;
  padding: 12px 16px;
  font-family: "Cascadia Mono", "Consolas", monospace;
  font-size: 13px;
  line-height: 1.55;
  white-space: pre-wrap;
}

.event {
  border-bottom: 1px solid #eef2f7;
  padding: 8px 0;
}

.event strong {
  color: #0f766e;
}

@media (max-width: 760px) {
  body {
    height: auto;
    overflow: auto;
  }

  .shell {
    width: min(100vw - 20px, 1180px);
    height: auto;
    padding: 18px 0;
  }

  .header {
    align-items: flex-start;
    flex-direction: column;
  }

  .grid {
    grid-template-columns: 1fr;
  }

  .partial {
    min-height: 160px;
    font-size: 22px;
  }

  .final-list,
  .events {
    height: 260px;
    min-height: 260px;
  }
}
