:root {
  --bg: #f5f1e8;
  --surface: #fffdf8;
  --ink: #1f2a33;
  --muted: #5f6b73;
  --accent: #0f766e;
  --accent-soft: #dff6f2;
  --border: #d9d2c5;
  --warn: #92400e;
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  font-family: "Segoe UI", "PingFang SC", sans-serif;
  background:
    radial-gradient(circle at top right, rgba(15, 118, 110, 0.12), transparent 28%),
    linear-gradient(180deg, #f8f4ec 0%, var(--bg) 100%);
  color: var(--ink);
}

.page {
  max-width: 1200px;
  margin: 0 auto;
  padding: 24px;
}

.hero {
  margin-bottom: 20px;
}

.hero h1,
.card h2 {
  margin: 0 0 8px;
}

.layout {
  display: grid;
  gap: 16px;
}

.card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 16px;
  padding: 18px;
  box-shadow: 0 10px 30px rgba(31, 42, 51, 0.05);
}

.section-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 12px;
  margin-bottom: 12px;
}

button,
input,
select {
  font: inherit;
}

button {
  border: none;
  background: var(--accent);
  color: white;
  padding: 10px 14px;
  border-radius: 10px;
  cursor: pointer;
}

input[type="file"],
input[type="text"],
input[type="password"],
select {
  width: 100%;
  border: 1px solid var(--border);
  border-radius: 10px;
  padding: 10px 12px;
  background: white;
}

form {
  display: grid;
  gap: 12px;
}

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

.list,
.summary-grid,
.table-wrap {
  display: grid;
  gap: 12px;
}

.snapshot-item {
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 12px;
  background: white;
}

.snapshot-item.active {
  border-color: var(--accent);
  background: var(--accent-soft);
}

.summary-grid {
  grid-template-columns: repeat(auto-fit, minmax(140px, 1fr));
  margin-bottom: 16px;
}

.summary-card {
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 12px;
  background: white;
}

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

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

.badge {
  display: inline-block;
  border-radius: 999px;
  padding: 4px 8px;
  background: var(--accent-soft);
  color: var(--accent);
  font-size: 12px;
}

.share-shell {
  max-width: 980px;
  margin: 0 auto;
  padding: 32px 24px;
}

.notice {
  padding: 12px;
  border-radius: 12px;
  background: #fff7ed;
  color: var(--warn);
  border: 1px solid #fdba74;
}

@media (max-width: 720px) {
  .page,
  .share-shell {
    padding: 16px;
  }

  .section-header {
    align-items: stretch;
    flex-direction: column;
  }
}

.snapshot-item.static {
  cursor: default;
}

.inline-form {
  display: grid;
  gap: 12px;
  grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
  align-items: end;
}

.diff-group {
  border: 1px solid var(--border);
  border-radius: 14px;
  padding: 14px;
  background: white;
  margin-top: 14px;
}

.diff-group-head {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 12px;
  margin-bottom: 12px;
}

.diff-row-grid {
  display: grid;
  gap: 12px;
}

.diff-row {
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 12px;
}

.diff-row.current {
  background: #fcfffb;
}

.diff-row-label {
  font-weight: 700;
  margin-bottom: 10px;
}

.diff-cells {
  display: grid;
  gap: 10px;
  grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
}

.diff-cell {
  border: 1px solid var(--border);
  border-radius: 10px;
  padding: 10px;
  background: #fffdfa;
}

.diff-cell.changed {
  border-color: var(--accent);
  background: var(--accent-soft);
}

.diff-cell-title {
  display: block;
  font-size: 12px;
  color: var(--muted);
  margin-bottom: 4px;
}

.diff-cell-value {
  display: block;
  word-break: break-word;
}
