:root {
  --color-bg: #f7f7f5;
  --color-surface: #ffffff;
  --color-border: #e3e2de;
  --color-text: #1f1f1d;
  --color-text-muted: #6b6b66;
  --color-accent: #c1440e;
  --color-accent-hover: #a3390b;
  --color-danger: #b3261e;
  --color-success: #2f6f3e;
  --radius: 10px;
  --shadow: 0 1px 3px rgba(0, 0, 0, 0.06), 0 1px 2px rgba(0, 0, 0, 0.04);
  font-size: 16px;
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  font-family: "Hiragino Sans", "Yu Gothic", -apple-system, BlinkMacSystemFont, sans-serif;
  background: var(--color-bg);
  color: var(--color-text);
  line-height: 1.7;
}

header.site-header {
  background: var(--color-surface);
  border-bottom: 1px solid var(--color-border);
  padding: 1.25rem 1.5rem;
}

header.site-header a {
  color: var(--color-text);
  text-decoration: none;
  font-weight: 700;
  font-size: 1.15rem;
}

main {
  max-width: 960px;
  margin: 0 auto;
  padding: 2rem 1.5rem 4rem;
}

h1 {
  font-size: 1.6rem;
  margin-bottom: 1.5rem;
}

.event-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
  gap: 1.25rem;
}

.event-card {
  background: var(--color-surface);
  border: 1px solid var(--color-border);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  overflow: hidden;
  display: flex;
  flex-direction: column;
  text-decoration: none;
  color: inherit;
  transition: transform 0.15s ease, box-shadow 0.15s ease;
}

.event-card:hover {
  transform: translateY(-2px);
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.08);
}

.event-card__image {
  width: 100%;
  height: 150px;
  object-fit: cover;
  background: #eee;
}

.event-card__body {
  padding: 1rem 1.1rem 1.2rem;
  display: flex;
  flex-direction: column;
  gap: 0.4rem;
  flex: 1;
}

.event-card__title {
  font-weight: 700;
  font-size: 1.05rem;
}

.event-card__meta {
  font-size: 0.88rem;
  color: var(--color-text-muted);
}

.badge {
  display: inline-block;
  font-size: 0.78rem;
  font-weight: 600;
  padding: 0.2rem 0.6rem;
  border-radius: 999px;
  width: fit-content;
}

.badge--open {
  background: #e6f1e8;
  color: var(--color-success);
}

.badge--few {
  background: #fdf1de;
  color: #9a6300;
}

.badge--full {
  background: #f8e6e5;
  color: var(--color-danger);
}

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

.back-link:hover {
  color: var(--color-text);
}

.event-detail {
  background: var(--color-surface);
  border: 1px solid var(--color-border);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  overflow: hidden;
}

.event-detail__image {
  width: 100%;
  max-height: 320px;
  object-fit: cover;
  background: #eee;
}

.event-detail__body {
  padding: 1.75rem;
}

.event-detail__title {
  font-size: 1.5rem;
  margin: 0 0 0.75rem;
}

.info-list {
  list-style: none;
  padding: 0;
  margin: 0 0 1.25rem;
  display: grid;
  gap: 0.4rem;
  font-size: 0.95rem;
}

.info-list li strong {
  display: inline-block;
  width: 5.5em;
  color: var(--color-text-muted);
  font-weight: 600;
}

.capacity-box {
  background: #f4f3f0;
  border-radius: var(--radius);
  padding: 0.9rem 1.1rem;
  margin: 1.25rem 0;
  font-size: 0.92rem;
}

.progress-bar {
  height: 8px;
  background: var(--color-border);
  border-radius: 999px;
  overflow: hidden;
  margin-top: 0.5rem;
}

.progress-bar__fill {
  height: 100%;
  background: var(--color-accent);
}

form.reservation-form {
  margin-top: 1.5rem;
  border-top: 1px solid var(--color-border);
  padding-top: 1.5rem;
  display: grid;
  gap: 1rem;
}

.field {
  display: grid;
  gap: 0.35rem;
}

.field label {
  font-size: 0.88rem;
  font-weight: 600;
}

.field input,
.field textarea {
  font: inherit;
  padding: 0.6rem 0.75rem;
  border: 1px solid var(--color-border);
  border-radius: 8px;
  background: var(--color-bg);
}

.field input:focus,
.field textarea:focus {
  outline: 2px solid var(--color-accent);
  outline-offset: 1px;
}

.field small {
  color: var(--color-text-muted);
  font-size: 0.8rem;
}

button.submit-btn {
  font: inherit;
  font-weight: 700;
  background: var(--color-accent);
  color: #fff;
  border: none;
  padding: 0.75rem 1.25rem;
  border-radius: 8px;
  cursor: pointer;
  transition: background 0.15s ease;
}

button.submit-btn:hover {
  background: var(--color-accent-hover);
}

button.submit-btn:disabled {
  background: #ccc;
  cursor: not-allowed;
}

.message-box {
  padding: 0.85rem 1rem;
  border-radius: 8px;
  font-size: 0.92rem;
  margin-top: 1rem;
}

.message-box--success {
  background: #e6f1e8;
  color: var(--color-success);
}

.message-box--error {
  background: #f8e6e5;
  color: var(--color-danger);
}

.loading,
.empty-state {
  color: var(--color-text-muted);
  padding: 2rem 0;
  text-align: center;
}
