:root {
  --bg: #f3efe5;
  --bg-accent: #e1d2b7;
  --panel: rgba(255, 252, 247, 0.9);
  --text: #2d241c;
  --muted: #6b5c4a;
  --line: rgba(76, 57, 35, 0.14);
  --brand: #9f4f2f;
  --brand-dark: #6b2f18;
  --shadow: 0 18px 40px rgba(76, 57, 35, 0.12);
  --font-display: "Iowan Old Style", "Palatino Linotype", serif;
  --font-body: "Avenir Next", "PingFang SC", "Microsoft YaHei", sans-serif;
}

* { box-sizing: border-box; }
body {
  margin: 0;
  font-family: var(--font-body);
  color: var(--text);
  background:
    radial-gradient(circle at top left, rgba(159, 79, 47, 0.14), transparent 28%),
    linear-gradient(180deg, var(--bg) 0%, #faf6ef 100%);
}

.shell {
  width: min(1100px, calc(100vw - 32px));
  margin: 0 auto;
  padding: 32px 0 64px;
}

.hero {
  display: flex;
  justify-content: space-between;
  gap: 24px;
  align-items: end;
  margin-bottom: 24px;
}

.hero.compact { align-items: center; }
.eyebrow {
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--brand);
  font-size: 12px;
  margin: 0 0 8px;
}

h1, h2, h3 {
  font-family: var(--font-display);
  margin: 0 0 12px;
}

h1 { font-size: clamp(32px, 5vw, 56px); line-height: 1.04; }
h2 { font-size: 26px; }
h3 { font-size: 18px; }

.lede, .muted, p { color: var(--muted); line-height: 1.7; }

.panel {
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: 22px;
  padding: 22px;
  box-shadow: var(--shadow);
  backdrop-filter: blur(12px);
}

.grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 20px;
  margin: 20px 0;
}

label {
  display: block;
  margin-bottom: 10px;
  font-weight: 600;
}

input {
  width: 100%;
  border: 1px solid var(--line);
  border-radius: 16px;
  padding: 14px 16px;
  font-size: 16px;
  background: rgba(255,255,255,0.86);
}

.actions { margin-top: 16px; }
button, .ghost-link {
  appearance: none;
  border: none;
  border-radius: 999px;
  padding: 12px 18px;
  font-size: 15px;
  text-decoration: none;
  display: inline-block;
}

button {
  background: linear-gradient(135deg, var(--brand), var(--brand-dark));
  color: white;
  cursor: pointer;
}

.ghost-link {
  background: rgba(255,255,255,0.65);
  color: var(--text);
  border: 1px solid var(--line);
}

pre {
  white-space: pre-wrap;
  word-break: break-word;
  background: #f8f1e6;
  border-radius: 16px;
  padding: 16px;
  border: 1px solid var(--line);
  overflow: auto;
}

.table-wrap { overflow: auto; }
table {
  width: 100%;
  border-collapse: collapse;
  min-width: 480px;
}

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

th {
  font-size: 13px;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--brand);
}

.log-card { margin-bottom: 18px; }
.log-meta {
  display: flex;
  gap: 14px;
  flex-wrap: wrap;
  color: var(--muted);
  font-size: 14px;
  margin-bottom: 12px;
}

.loading-overlay {
  position: fixed;
  inset: 0;
  display: none;
  justify-content: center;
  align-items: center;
  background: rgba(243, 239, 229, 0.75);
  backdrop-filter: blur(6px);
}

.loading-card {
  background: white;
  border-radius: 18px;
  padding: 20px 24px;
  box-shadow: var(--shadow);
}

@media (max-width: 768px) {
  .hero,
  .grid { grid-template-columns: 1fr; display: grid; }
  .hero { align-items: start; }
  .shell { width: min(100vw - 20px, 1100px); padding-top: 20px; }
}
