:root {
  --bg: #faf6f1;
  --card-bg: #ffffff;
  --text: #2b2320;
  --text-muted: #6b6058;
  --accent: #c96a3f;
  --accent-dark: #a8532f;
  --border: #e6ddd3;
  --love: #c96a3f;
  --like: #d99a4e;
  --neutral: #9a9088;
  --dislike: #7d8ba1;
  --conditional: #8a9a6b;
  --never_tried: #b8b0a8;
  --danger: #b3403a;
}

@media (prefers-color-scheme: dark) {
  :root {
    --bg: #1c1815;
    --card-bg: #2a2420;
    --text: #f0e9e2;
    --text-muted: #b0a598;
    --border: #423a33;
  }
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  font-family: "Hiragino Kaku Gothic ProN", "Yu Gothic", "Segoe UI", system-ui, sans-serif;
  background: var(--bg);
  color: var(--text);
  line-height: 1.6;
}

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

h1 {
  font-size: 1.4rem;
  margin: 0 0 4px;
}

h2 {
  font-size: 1.1rem;
  margin: 24px 0 8px;
  color: var(--accent-dark);
}

p.subtitle {
  color: var(--text-muted);
  margin-top: 0;
  font-size: 0.9rem;
}

.card {
  background: var(--card-bg);
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 16px;
  margin-bottom: 16px;
}

.nav-list {
  display: flex;
  flex-direction: column;
  gap: 12px;
  margin-top: 16px;
}

.nav-button {
  display: block;
  text-align: center;
  padding: 16px;
  border-radius: 12px;
  background: var(--accent);
  color: #fff;
  text-decoration: none;
  font-weight: bold;
  font-size: 1rem;
  border: none;
  cursor: pointer;
}

.nav-button.secondary {
  background: var(--card-bg);
  color: var(--accent-dark);
  border: 1px solid var(--accent);
}

input[type="text"],
input[type="password"] {
  width: 100%;
  padding: 12px;
  border-radius: 8px;
  border: 1px solid var(--border);
  background: var(--card-bg);
  color: var(--text);
  font-size: 1rem;
  margin-top: 4px;
  margin-bottom: 12px;
}

label {
  font-weight: bold;
  font-size: 0.9rem;
}

button.primary {
  background: var(--accent);
  color: #fff;
  border: none;
  border-radius: 8px;
  padding: 12px 20px;
  font-size: 1rem;
  font-weight: bold;
  cursor: pointer;
  width: 100%;
}

button.primary:disabled {
  opacity: 0.5;
  cursor: not-allowed;
}

.error {
  color: var(--danger);
  font-size: 0.9rem;
  margin-top: 8px;
}

.tier-badge {
  display: inline-block;
  padding: 2px 10px;
  border-radius: 999px;
  font-size: 0.75rem;
  font-weight: bold;
  color: #fff;
  margin-bottom: 6px;
}

.tier-love { background: var(--love); }
.tier-like { background: var(--like); }
.tier-neutral { background: var(--neutral); }
.tier-dislike { background: var(--dislike); }
.tier-conditional { background: var(--conditional); }
.tier-never_tried { background: var(--never_tried); }

.item-list {
  list-style: none;
  margin: 0 0 12px;
  padding: 0;
}

.item-list li {
  padding: 6px 0;
  border-bottom: 1px solid var(--border);
}

.item-list li:last-child {
  border-bottom: none;
}

.item-note {
  color: var(--text-muted);
  font-size: 0.85rem;
}

.back-link {
  display: inline-block;
  margin-bottom: 16px;
  color: var(--text-muted);
  text-decoration: none;
  font-size: 0.9rem;
}

.empty-state {
  color: var(--text-muted);
  text-align: center;
  padding: 24px 0;
}
