@import url("https://fonts.googleapis.com/css2?family=Fraunces:opsz,wght@9..144,500;9..144,700&family=Space+Grotesk:wght@400;500;600&display=swap");

:root {
  --ink: #1c1b1a;
  --muted: #6b625b;
  --accent: #c84b31;
  --accent-dark: #9f3221;
  --mist: #f4efe9;
  --paper: #fff8f1;
  --sunset: radial-gradient(circle at top left, #ffe2c2, #f4efe9 55%, #fdf7f2);
  --shadow: 0 12px 24px rgba(28, 27, 26, 0.12);
}

* {
  box-sizing: border-box;
}

[v-cloak] {
  display: none;
}

body {
  margin: 0;
  font-family: "Space Grotesk", "Trebuchet MS", sans-serif;
  color: var(--ink);
  background: var(--sunset);
  min-height: 100vh;
}

.page {
  max-width: 1200px;
  margin: 0 auto;
  padding: 32px 24px 64px;
  animation: fadeUp 0.8s ease both;
}

.topbar {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 12px 18px;
  border-radius: 14px;
  background: rgba(255, 255, 255, 0.8);
  box-shadow: var(--shadow);
  margin-bottom: 24px;
  position: sticky;
  top: 16px;
  z-index: 10;
  backdrop-filter: blur(6px);
}

.brand {
  font-family: "Fraunces", "Georgia", serif;
  font-weight: 700;
  font-size: 1.1rem;
}

.topbar-links {
  display: flex;
  gap: 12px;
  align-items: center;
}

.topbar-link,
.topbar-button {
  text-decoration: none;
  font-size: 0.9rem;
  font-weight: 600;
  color: var(--ink);
  background: transparent;
  border: none;
  padding: 8px 12px;
  border-radius: 10px;
  cursor: pointer;
}

.topbar-link:hover,
.topbar-button:hover {
  background: #f3e5d7;
}

.hero {
  display: flex;
  flex-wrap: wrap;
  gap: 24px;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 32px;
}

.eyebrow {
  letter-spacing: 0.25em;
  text-transform: uppercase;
  font-size: 0.72rem;
  color: var(--muted);
  margin: 0 0 8px;
}

.hero h1 {
  font-family: "Fraunces", "Georgia", serif;
  font-weight: 700;
  margin: 0 0 12px;
  font-size: clamp(2.4rem, 4vw, 3.6rem);
}

.subhead {
  margin: 0;
  max-width: 560px;
  color: var(--muted);
  font-size: 1rem;
  line-height: 1.6;
}

.hero-panel {
  background: var(--paper);
  border-radius: 20px;
  padding: 20px 24px;
  box-shadow: var(--shadow);
  display: grid;
  gap: 16px;
  min-width: 240px;
}

.panel-label {
  margin: 0 0 6px;
  color: var(--muted);
  font-size: 0.8rem;
  text-transform: uppercase;
  letter-spacing: 0.08em;
}

.month-controls {
  display: flex;
  align-items: center;
  gap: 12px;
}

.month-controls button {
  border: none;
  background: var(--accent);
  color: white;
  width: 36px;
  height: 36px;
  border-radius: 50%;
  font-size: 1rem;
  cursor: pointer;
}

.month-controls button:hover {
  background: var(--accent-dark);
}

#monthLabel {
  font-weight: 600;
  font-size: 1.1rem;
}

.toggle-group {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 8px;
}

.toggle-group button {
  border: 1px solid transparent;
  background: #f3e5d7;
  padding: 10px 12px;
  border-radius: 10px;
  font-weight: 600;
  cursor: pointer;
}

.toggle-group button.active {
  background: var(--ink);
  color: white;
}

.admin-link {
  text-decoration: none;
  font-size: 0.85rem;
  color: var(--accent-dark);
  font-weight: 600;
}

.controls {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 16px;
  background: rgba(255, 255, 255, 0.7);
  padding: 16px;
  border-radius: 16px;
  backdrop-filter: blur(6px);
  margin-bottom: 16px;
  animation: fadeUp 0.8s ease 0.1s both;
}

.control {
  display: grid;
  gap: 6px;
  font-size: 0.9rem;
}

.control span {
  color: var(--muted);
  font-size: 0.8rem;
  text-transform: uppercase;
  letter-spacing: 0.08em;
}

.control input,
.control select {
  padding: 10px 12px;
  border-radius: 10px;
  border: 1px solid #e2d6c9;
  background: white;
  font-family: inherit;
}

.control textarea {
  padding: 10px 12px;
  border-radius: 10px;
  border: 1px solid #e2d6c9;
  background: white;
  font-family: inherit;
  resize: vertical;
}

.primary,
.ghost,
.danger {
  border: none;
  border-radius: 10px;
  padding: 10px 14px;
  font-weight: 600;
  cursor: pointer;
  font-family: inherit;
}

.primary {
  background: var(--accent);
  color: white;
}

.primary:hover {
  background: var(--accent-dark);
}

.ghost {
  background: #f3e5d7;
  color: var(--ink);
}

.danger {
  background: #f1c1b6;
  color: #7c1f12;
}

.status {
  font-size: 0.9rem;
  color: var(--muted);
  margin-bottom: 16px;
}

.calendar-view {
  background: var(--paper);
  border-radius: 20px;
  padding: 20px;
  box-shadow: var(--shadow);
  animation: fadeUp 0.8s ease 0.15s both;
}

.calendar-grid {
  display: grid;
  grid-template-columns: repeat(7, 1fr);
  gap: 12px;
}

.calendar-grid .weekday {
  font-size: 0.75rem;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: var(--muted);
  text-align: center;
}

.day-cell {
  border-radius: 16px;
  background: #fffdfb;
  padding: 10px;
  min-height: 120px;
  border: 1px solid #f1e6db;
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.day-cell .date-number {
  font-weight: 600;
  font-size: 0.9rem;
  color: var(--accent-dark);
}

.event-chip {
  background: #fbe3cf;
  border-radius: 10px;
  padding: 6px 8px;
  font-size: 0.75rem;
  line-height: 1.4;
}

.event-chip strong {
  display: block;
}

.event-chip-button {
  background: none;
  border: none;
  padding: 0;
  text-align: left;
  font: inherit;
  color: inherit;
  cursor: pointer;
}

.list-view {
  display: grid;
  gap: 16px;
}

.detail-view {
  margin-bottom: 20px;
}

.detail-card {
  background: var(--paper);
  border-radius: 18px;
  padding: 20px;
  box-shadow: var(--shadow);
  display: flex;
  justify-content: space-between;
  gap: 16px;
  align-items: flex-start;
  flex-wrap: wrap;
}

.detail-card h2 {
  margin: 4px 0 8px;
  font-family: "Fraunces", "Georgia", serif;
}

.detail-meta {
  margin: 4px 0;
  color: var(--muted);
}

.detail-notes {
  margin: 8px 0 0;
  color: var(--ink);
}

.admin-shell {
  display: grid;
  gap: 24px;
}

.admin-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 20px;
}

.admin-card {
  background: var(--paper);
  border-radius: 18px;
  padding: 20px;
  box-shadow: var(--shadow);
  display: grid;
  gap: 14px;
}

.admin-card h2 {
  margin: 0;
  font-family: "Fraunces", "Georgia", serif;
  font-size: 1.35rem;
}

.actions {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
  margin-top: 15px;
}

.row-actions {
  display: flex;
  gap: 8px;
  align-items: center;
}

.admin-card .event-row {
  grid-template-columns: 1fr auto;
  align-items: center;
}

.list-scroll {
  max-height: 360px;
  overflow-y: auto;
  padding-right: 6px;
}

.notice {
  font-size: 0.85rem;
  color: var(--muted);
  margin: 0;
}

.list-group {
  background: var(--paper);
  border-radius: 18px;
  padding: 18px;
  box-shadow: var(--shadow);
  animation: fadeUp 0.6s ease both;
}

.list-group h3 {
  margin: 0 0 12px;
  font-family: "Fraunces", "Georgia", serif;
  font-size: 1.4rem;
}

.event-row {
  display: grid;
  grid-template-columns: minmax(140px, 180px) 1fr;
  gap: 12px;
  padding: 10px 0;
  border-top: 1px dashed #e2d6c9;
}

.event-row:first-of-type {
  border-top: none;
}

.event-row-button {
  width: 100%;
  background: none;
  border: none;
  text-align: left;
  font: inherit;
  color: inherit;
  cursor: pointer;
}

.event-meta {
  color: var(--muted);
  font-size: 0.85rem;
}

.event-title {
  font-weight: 600;
}

.hidden {
  display: none;
}

@keyframes fadeUp {
  from {
    opacity: 0;
    transform: translateY(12px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@media (max-width: 720px) {
  .hero {
    flex-direction: column;
    align-items: flex-start;
  }

  .event-row {
    grid-template-columns: 1fr;
  }

  .calendar-grid {
    grid-template-columns: repeat(2, 1fr);
  }
}
