:root {
  --bg: #f5f7fb;
  --card: #ffffff;
  --ink: #0f172a;
  --muted: #475569;
  --line: #dbe2ea;
  --accent: #0f766e;
  --up: #b91c1c;
  --down: #0f4c81;
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  font-family: 'Pretendard', 'Noto Sans KR', sans-serif;
  color: var(--ink);
  background:
    radial-gradient(circle at 0% 0%, rgba(15, 118, 110, 0.08), transparent 35%),
    radial-gradient(circle at 100% 100%, rgba(15, 76, 129, 0.08), transparent 35%),
    var(--bg);
}

.container {
  max-width: 1100px;
  margin: 0 auto;
  padding: 24px 16px 32px;
}

.hero-top {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 12px;
}

.manage-link {
  display: inline-block;
  padding: 8px 12px;
  border-radius: 10px;
  border: 1px solid #0f766e;
  color: #0f766e;
  text-decoration: none;
  font-size: 14px;
  font-weight: 700;
  background: #ecfeff;
}

.hero h1 {
  margin: 4px 0 8px;
  font-size: 32px;
}

.eyebrow {
  margin: 0;
  color: var(--accent);
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.subtext {
  margin: 0 0 8px;
  color: var(--muted);
}

.timestamp {
  margin: 0;
  font-size: 14px;
  color: var(--muted);
}

.panel {
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: 14px;
  padding: 16px;
  margin-top: 16px;
  box-shadow: 0 6px 14px rgba(15, 23, 42, 0.04);
}

.brief-panel {
  background: linear-gradient(120deg, #f0fdfa, #eff6ff);
}

.daily-brief {
  margin: 8px 0 0;
  font-size: 18px;
  line-height: 1.5;
  font-weight: 600;
  color: #0f172a;
}

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

table {
  width: 100%;
  border-collapse: collapse;
  min-width: 980px;
}

th,
td {
  border-bottom: 1px solid var(--line);
  padding: 12px 10px;
  text-align: right;
  white-space: nowrap;
}

th:first-child,
td:first-child {
  text-align: left;
}

tr.selected {
  background: rgba(15, 118, 110, 0.08);
}

.manual-display-row td {
  background: #f8fafc;
  border-bottom: 1px dashed #cbd5e1;
}

.row-link {
  border: 0;
  background: transparent;
  color: #0b3c74;
  cursor: pointer;
  font-size: 15px;
  font-weight: 600;
  padding: 0;
}

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

.up {
  color: var(--up);
  font-weight: 700;
}

.down {
  color: var(--down);
  font-weight: 700;
}

.flat {
  color: var(--muted);
}

.hint {
  margin: 10px 0 0;
  color: var(--muted);
  font-size: 13px;
}

.chart-header {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  align-items: baseline;
}

.chart-header h2 {
  margin: 0;
}

.error {
  margin-top: 12px;
  color: #991b1b;
  font-weight: 600;
}

.hidden {
  display: none;
}

.manual-input {
  width: 100%;
  max-width: 160px;
  border: 1px solid #cbd5e1;
  border-radius: 8px;
  padding: 6px 8px;
  font-size: 13px;
  background: #fff;
}

.manual-save-btn {
  border: 1px solid #0f766e;
  background: #0f766e;
  color: #fff;
  border-radius: 8px;
  padding: 6px 10px;
  cursor: pointer;
  font-size: 13px;
}

.curve-inputs {
  display: flex;
  gap: 10px;
  align-items: center;
  flex-wrap: wrap;
}

.curve-inputs label {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  color: #334155;
  font-size: 12px;
}

.manual-input.curve {
  max-width: 90px;
}

.input-panel h2 {
  margin-top: 0;
}

.input-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(180px, 240px));
  gap: 12px;
}

.input-grid label {
  display: flex;
  flex-direction: column;
  gap: 6px;
  font-size: 13px;
  color: #334155;
}

.input-curve {
  margin-top: 12px;
}

.action-panel {
  display: flex;
  justify-content: flex-end;
}

.curve-display {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

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

.curve-cards {
  display: grid;
  grid-template-columns: repeat(6, minmax(120px, 1fr));
  gap: 10px;
}

.curve-card {
  border: 1px solid #dbe2ea;
  border-radius: 12px;
  padding: 10px;
  background: #f8fafc;
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.curve-card span {
  font-size: 12px;
  color: #475569;
}

.curve-card strong {
  font-size: 18px;
  color: #0f172a;
}

@media (max-width: 768px) {
  .hero h1 {
    font-size: 24px;
  }

  .panel {
    padding: 12px;
  }

  .chart-header {
    flex-direction: column;
    align-items: flex-start;
  }

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

  .curve-cards {
    grid-template-columns: repeat(2, minmax(120px, 1fr));
  }
}
