:root {
  --bg-deep: #16110D;
  --surface: #241C15;
  --surface-2: #2F251B;
  --line: #3D2F20;
  --gold: #C99A44;
  --gold-soft: #E4C176;
  --plum: #8C3E52;
  --cream: #F3E9D6;
  --muted: #9C8F7C;
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  background: #0D0B08;
  color: var(--cream);
  font-family: 'Inter', -apple-system, sans-serif;
  min-height: 100vh;
}

a {
  color: var(--gold-soft);
}

.app-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 18px 24px;
  border-bottom: 1px solid var(--line);
  background: var(--bg-deep);
}

.brand a {
  font-family: Georgia, serif;
  font-weight: 700;
  font-size: 20px;
  color: var(--gold-soft);
  letter-spacing: 0.02em;
  text-decoration: none;
}

.nav-links {
  display: flex;
  align-items: center;
  gap: 16px;
  font-size: 13px;
}

.nav-links form {
  display: inline;
}

.nav-links button.linklike {
  background: none;
  border: none;
  color: var(--gold-soft);
  cursor: pointer;
  font: inherit;
  padding: 0;
}

.container {
  max-width: 720px;
  margin: 0 auto;
  padding: 24px 20px 80px;
}

.stats {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1px;
  background: var(--line);
  border: 1px solid var(--line);
  border-radius: 10px;
  overflow: hidden;
  margin-bottom: 24px;
}

.stat {
  background: var(--surface);
  padding: 16px 8px;
  text-align: center;
}

.stat b {
  display: block;
  font-size: 22px;
  color: var(--gold-soft);
  font-weight: 600;
}

.stat small {
  font-size: 11px;
  color: var(--muted);
  letter-spacing: 0.05em;
}

.section-label {
  font-size: 12px;
  color: var(--muted);
  letter-spacing: 0.12em;
  margin: 0 0 12px;
  text-transform: uppercase;
}

.entry {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 16px;
  overflow: hidden;
  margin-bottom: 18px;
}

.entry-carousel { position: relative; }

.entry-carousel-track {
  display: flex;
  overflow-x: auto;
  scroll-snap-type: x mandatory;
  -webkit-overflow-scrolling: touch;
  scrollbar-width: none;
}
.entry-carousel-track::-webkit-scrollbar { display: none; }

.entry-slide {
  flex: 0 0 100%;
  scroll-snap-align: start;
  scroll-snap-stop: always;
  display: block;
}
.entry-slide img {
  display: block;
  width: 100%;
  height: 280px;
  object-fit: cover;
  background: var(--surface-2);
}

.entry-dots {
  position: absolute;
  left: 0;
  right: 0;
  bottom: 10px;
  display: flex;
  justify-content: center;
  gap: 6px;
  pointer-events: none;
}
.entry-dot {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: rgba(243, 233, 214, 0.4);
  box-shadow: 0 0 3px rgba(0, 0, 0, 0.5);
  transition: background 0.15s ease, transform 0.15s ease;
}
.entry-dot.active {
  background: var(--gold-soft);
  transform: scale(1.3);
}

.entry-body { padding: 16px 18px; }
.entry-top { display: flex; justify-content: space-between; gap: 8px; }
.entry-name {
  font-weight: 600;
  font-size: 18px;
  color: var(--cream);
  text-decoration: none;
}
.entry-name:hover { color: var(--gold-soft); text-decoration: underline; }
.entry-date { font-size: 12px; color: var(--muted); white-space: nowrap; }
.stars { margin: 6px 0 6px; color: var(--gold); font-size: 14px; }
.stars .off { color: var(--line); }
.entry-note { font-size: 13.5px; color: var(--muted); line-height: 1.6; }
.entry-footer {
  display: flex;
  justify-content: flex-end;
  gap: 16px;
  font-size: 12.5px;
  padding: 0 18px 16px;
}

.empty-state {
  color: var(--muted);
  font-size: 13px;
  padding: 24px;
  text-align: center;
  border: 1px dashed var(--line);
  border-radius: 12px;
}

.btn {
  display: inline-block;
  background: linear-gradient(145deg, var(--gold-soft), var(--gold));
  color: #241505;
  font-weight: 600;
  border: none;
  border-radius: 8px;
  padding: 10px 18px;
  font-size: 14px;
  cursor: pointer;
  text-decoration: none;
}

.btn.secondary {
  background: var(--surface-2);
  color: var(--cream);
  border: 1px solid var(--line);
}

.btn.danger {
  background: var(--plum);
  color: var(--cream);
}

.fab {
  position: fixed;
  right: 24px;
  bottom: 24px;
  width: 52px;
  height: 52px;
  border-radius: 50%;
  background: linear-gradient(145deg, var(--gold-soft), var(--gold));
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 26px;
  font-weight: 700;
  color: #241505;
  text-decoration: none;
  box-shadow: 0 6px 16px rgba(0, 0, 0, 0.4);
}

.form-card {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 12px;
  padding: 20px;
  max-width: 420px;
  margin: 0 auto;
}

.form-card h2 {
  margin-top: 0;
  font-family: Georgia, serif;
  color: var(--gold-soft);
}

.field { margin-bottom: 14px; }
.field label { display: block; font-size: 12px; color: var(--muted); margin-bottom: 4px; }
.field input, .field select, .field textarea {
  width: 100%;
  background: var(--surface-2);
  border: 1px solid var(--line);
  border-radius: 6px;
  padding: 9px 10px;
  color: var(--cream);
  font: inherit;
}
.field .errorlist { color: #E08A8A; font-size: 12px; list-style: none; padding: 0; margin: 4px 0 0; }

.field input[type="file"] {
  padding: 8px 10px;
  font-size: 12.5px;
  color: var(--muted);
}

.photo-grid {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin: 8px 0;
}
.photo-grid:empty { margin: 0; }

.photo-thumb {
  position: relative;
  width: 88px;
  height: 88px;
  border-radius: 8px;
  overflow: hidden;
  border: 1px solid var(--line);
}
.photo-thumb img { display: block; width: 100%; height: 100%; object-fit: cover; }

.photo-remove {
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 3px;
  background: rgba(13, 11, 8, 0.78);
  color: var(--cream);
  font-size: 9.5px;
  padding: 3px 0;
  cursor: pointer;
}
.photo-remove input { margin: 0; }

.form-actions { display: flex; gap: 10px; margin-top: 18px; }

.auth-wrap {
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 24px;
}

.messages { list-style: none; padding: 0; margin: 0 0 16px; }
.messages li { background: var(--surface-2); border: 1px solid var(--line); padding: 8px 12px; border-radius: 6px; font-size: 13px; margin-bottom: 6px; }

.star-rating {
  display: inline-flex;
  flex-direction: row-reverse;
  justify-content: flex-end;
  gap: 1px;
}
.star-rating input { display: none; }
.star-rating label {
  font-size: 26px;
  line-height: 1;
  color: var(--line);
  cursor: pointer;
  transition: color 0.1s ease;
}
.star-rating label:hover,
.star-rating label:hover ~ label,
.star-rating input:checked ~ label {
  color: var(--gold);
}

.radar-card {
  background: var(--surface-2);
  border: 1px solid var(--line);
  border-radius: 10px;
  padding: 14px;
  margin-bottom: 16px;
}
.radar-card .chart-wrap { position: relative; height: 220px; }
.radar-title {
  font-size: 11px;
  color: var(--muted);
  letter-spacing: 0.1em;
  text-transform: uppercase;
  margin-bottom: 8px;
}

.back-link { margin-bottom: 14px; font-size: 12.5px; }

.detail-title {
  font-family: Georgia, serif;
  color: var(--gold-soft);
  margin: 0 0 4px;
  font-size: 24px;
}
.detail-meta { font-size: 12.5px; color: var(--muted); }
.detail-note {
  margin-top: 14px;
  font-size: 14px;
  color: var(--cream);
  line-height: 1.7;
}

.slider-row { margin-bottom: 14px; }
.slider-row .slider-top {
  display: flex;
  justify-content: space-between;
  font-size: 12px;
  color: var(--muted);
  margin-bottom: 4px;
}
.slider-row .slider-value {
  font-family: 'JetBrains Mono', monospace;
  color: var(--gold-soft);
  font-weight: 600;
}
.slider-row input[type="range"] {
  width: 100%;
  accent-color: var(--gold);
  background: transparent;
  padding: 0;
}

.pagination {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin: 18px 0 90px;
  font-size: 13px;
}
.pagination a { color: var(--gold-soft); text-decoration: none; }
.pagination .disabled { color: var(--muted); opacity: 0.45; }
.pagination .page-current {
  font-family: 'JetBrains Mono', monospace;
  color: var(--muted);
}

/* ページ見出し（ヘッダのブランド名ではなく、各ページの主題） */
.page-title {
  font-family: Georgia, serif;
  font-size: 22px;
  font-weight: 700;
  margin: 0 0 4px;
  color: var(--cream);
}
.page-lead {
  margin: 0 0 18px;
  font-size: 13px;
  color: var(--muted);
}

/* 投稿者表示 */
.avatar {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 26px;
  height: 26px;
  border-radius: 50%;
  background: var(--surface-2);
  border: 1px solid var(--line);
  color: var(--gold-soft);
  font-size: 12px;
  font-weight: 600;
  flex-shrink: 0;
}
.avatar-lg { width: 44px; height: 44px; font-size: 18px; }
.entry-author {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 10px;
}
/* 投稿者名はリンクではないため、リンク色(--gold-soft)を避け、
   日付と同じ情報密度のメタ情報として読ませる。 */
.entry-author-name {
  font-size: 12.5px;
  font-weight: 500;
  color: var(--muted);
}

/* マイページのプロフィール見出し */
.profile-head {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 18px;
}
.profile-head .page-title { margin: 0; }

/* フォーム全体に対するエラー（認証失敗など、特定の入力欄に紐づかないもの） */
.form-errors {
  border: 1px solid var(--plum);
  background: rgba(140, 62, 82, 0.15);
  border-radius: 8px;
  padding: 10px 12px;
  margin-bottom: 14px;
}
.form-errors p {
  margin: 0;
  font-size: 13px;
  color: #F0B8C0;
}
.form-errors p + p { margin-top: 4px; }
