:root {
  --olive: #314027;
  --gold: #a7874e;
  --bg: #f6f3ec;
  --text: #2b261f;
  --muted: #6a6256;
  --line: #d8cfbf;
  --card: #ffffff;
  --danger: #7a1f1f;
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Arial, sans-serif;
  background: var(--bg);
  color: var(--text);
}

.topbar {
  padding: 18px 20px;
  border-bottom: 1px solid var(--line);
  background: #fff;
  display: flex;
  justify-content: space-between;
  gap: 12px;
  align-items: center;
}

.topbar h1 {
  margin: 0;
  color: var(--olive);
  font-size: 22px;
}

.topbar p {
  margin: 4px 0 0;
  color: var(--muted);
}

.wrap {
  max-width: 1200px;
  margin: 0 auto;
  padding: 18px;
}

.notice {
  padding: 12px 14px;
  border-radius: 8px;
  margin-bottom: 14px;
  border: 1px solid var(--line);
}

.notice.info { background: #f3f8ff; }
.notice.success { background: #eaf7ea; }
.notice.error { background: #fdeeee; border-color: #e4b4b4; color: var(--danger); }

.grid {
  display: grid;
  gap: 14px;
}

.two-col {
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

.three-up {
  grid-template-columns: repeat(3, minmax(0, 1fr));
}

.card {
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 14px;
}

.card h2,
.card h3 {
  margin-top: 0;
  color: var(--olive);
}

.no-margin {
  margin: 0;
}

.muted {
  color: var(--muted);
}

label {
  display: block;
  margin-bottom: 10px;
  font-weight: 600;
  color: #3f382f;
  font-size: 14px;
}

input,
textarea {
  width: 100%;
  border: 1px solid #c6bcaa;
  border-radius: 8px;
  padding: 10px;
  font: inherit;
  margin-top: 6px;
  background: #fff;
  color: var(--text);
}

textarea {
  resize: vertical;
}

.hint {
  margin-top: -4px;
  color: var(--muted);
  font-size: 12px;
}

.row {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  align-items: center;
}

.btn {
  border: 1px solid var(--olive);
  background: #fff;
  color: var(--olive);
  border-radius: 8px;
  padding: 10px 16px;
  font-size: 15px;
  font-weight: 600;
  letter-spacing: 0.02em;
  line-height: 1.35;
  cursor: pointer;
}

.btn.primary {
  background: var(--olive);
  color: #fff;
}

.btn.ghost {
  border-color: #b9af9e;
  color: #4d453a;
}

.inline-check {
  display: flex;
  align-items: center;
  gap: 8px;
  font-weight: 600;
}

.inline-check input {
  width: auto;
  margin: 0;
}

.history {
  margin-top: 10px;
  border-top: 1px dashed #d9cfbd;
  padding-top: 10px;
  max-height: 220px;
  overflow: auto;
}

.history-item {
  border: 1px solid #e4dac9;
  border-radius: 8px;
  padding: 8px;
  margin-bottom: 8px;
  background: #fcfbf8;
  font-size: 13px;
}

.message-list {
  margin-top: 8px;
  max-height: 320px;
  overflow: auto;
}

.message-item {
  border: 1px solid #ddd2c2;
  border-radius: 8px;
  padding: 10px;
  margin-bottom: 8px;
  font-size: 13px;
  background: #fcfbf8;
}

.message-item .meta {
  color: var(--muted);
  font-size: 12px;
  margin-bottom: 6px;
}

.hidden {
  display: none !important;
}

@media (max-width: 900px) {
  .two-col,
  .three-up {
    grid-template-columns: 1fr;
  }
}

