:root {
  --ink: #1d2a33;
  --muted: #5a6b74;
  --accent: #e47a55;
  --accent-dark: #c45f3e;
  --sea: #6eb7b2;
  --sky: #d7f0f1;
  --paper: #f7f4ee;
  --background: #f7f4ee;
  --surface: #ffffff;
  --surface-soft: rgba(255, 255, 255, 0.85);
  --surface-muted: #f1f5f7;
  --stroke: #d7e2e8;
  --shadow: 0 20px 50px rgba(29, 42, 51, 0.12);
}

[data-theme="dark"] {
  --ink: #ecf2f4;
  --muted: #a7b2b9;
  --accent: #f19a63;
  --accent-dark: #efb07f;
  --sea: #5fb4ab;
  --sky: #0f1a20;
  --paper: #0d151a;
  --background: #0f171c;
  --surface: #131c22;
  --surface-soft: rgba(19, 28, 34, 0.88);
  --surface-muted: #1a242b;
  --stroke: #2b3a42;
  --shadow: 0 20px 50px rgba(0, 0, 0, 0.35);
}

*,
*::before,
*::after {
  box-sizing: border-box;
}

body {
  margin: 0;
  font-family: "Source Sans 3", "Segoe UI", "Helvetica Neue", sans-serif;
  color: var(--ink);
  background: linear-gradient(120deg, #eef6f6 0%, #f8f3ec 55%, #fff7f0 100%);
  min-height: 100vh;
  line-height: 1.7;
}

p {
  margin: 0 0 16px;
}

p:last-child {
  margin-bottom: 0;
}

body::before {
  content: "";
  position: fixed;
  inset: 0;
  background:
    radial-gradient(circle at 10% 10%, rgba(110, 183, 178, 0.18), transparent 45%),
    radial-gradient(circle at 90% 20%, rgba(228, 122, 85, 0.15), transparent 40%);
  pointer-events: none;
  z-index: -1;
}

[data-theme="dark"] body {
  background: linear-gradient(140deg, #0c1419 0%, #121b20 50%, #0a1014 100%);
}

[data-theme="dark"] body::before {
  background:
    radial-gradient(circle at 12% 10%, rgba(95, 180, 171, 0.18), transparent 45%),
    radial-gradient(circle at 88% 15%, rgba(241, 154, 99, 0.12), transparent 40%);
}

.page {
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}

.site-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  padding: 28px clamp(20px, 4vw, 60px);
  width: min(1200px, 100%);
  margin: 0 auto;
}

.brand {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 8px;
}

.brand-meta {
  display: flex;
  align-items: center;
  gap: 10px;
}

.brand-logo {
  width: auto;
  height: 24px;
  display: block;
}

.brand-title {
  font-family: "Fraunces", "Times New Roman", serif;
  font-size: clamp(22px, 3vw, 34px);
  font-weight: 700;
  line-height: 1.1;
}

.brand-subtitle {
  font-size: 15px;
  color: var(--muted);
}

.nav-wrap {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 12px 18px;
  justify-content: flex-end;
}

.nav-toggle {
  display: none;
  align-items: center;
  gap: 8px;
  border: 1px solid var(--stroke);
  background: var(--surface);
  color: var(--ink);
  border-radius: 999px;
  padding: 8px 12px;
  font-weight: 600;
  cursor: pointer;
}

.nav-toggle-icon {
  position: relative;
  display: block;
  width: 18px;
  height: 2px;
  background: var(--ink);
}

.nav-toggle-icon::before,
.nav-toggle-icon::after {
  content: "";
  position: absolute;
  left: 0;
  width: 100%;
  height: 2px;
  background: var(--ink);
}

.nav-toggle-icon::before {
  top: -5px;
}

.nav-toggle-icon::after {
  top: 5px;
}

.site-nav {
  display: flex;
  flex-wrap: wrap;
  gap: 10px 18px;
  align-items: center;
}

.site-nav a {
  text-decoration: none;
  color: var(--ink);
  font-weight: 600;
  padding: 8px 12px;
  border-radius: 999px;
  transition: all 0.2s ease;
}

.site-nav a:not(.nav-cta):hover {
  background: rgba(110, 183, 178, 0.2);
}

.site-nav .is-active {
  background: var(--ink);
  color: var(--background);
}

.nav-cta {
  background: var(--accent);
  color: #fff;
  padding: 10px 18px;
  border-radius: 999px;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  box-shadow: 0 12px 24px rgba(228, 122, 85, 0.35);
  display: inline-flex;
  align-items: center;
  justify-content: center;
}

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

.theme-toggle {
  border: 1px solid var(--stroke);
  background: transparent;
  color: var(--ink);
  border-radius: 999px;
  width: 38px;
  height: 38px;
  padding: 0;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.2s ease;
  display: inline-flex;
  align-items: center;
  justify-content: center;
}

.theme-toggle:hover {
  border-color: var(--ink);
}

.theme-icon {
  width: 16px;
  height: 16px;
  border-radius: 50%;
  border: 2px solid currentColor;
  display: inline-block;
  position: relative;
}

[data-theme="dark"] .theme-icon {
  background: currentColor;
}

[data-theme="dark"] .theme-icon::after {
  content: "";
  position: absolute;
  width: 10px;
  height: 10px;
  border-radius: 50%;
  background: var(--surface);
  top: -1px;
  right: -1px;
}

main {
  flex: 1;
  padding: 0 clamp(20px, 4vw, 60px) 60px;
  width: min(1200px, 100%);
  margin: 0 auto;
}

.hero,
.page-hero {
  display: grid;
  gap: 32px;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
  align-items: center;
  margin-top: 12px;
}

.hero h1,
.page-hero h1,
h2,
h3 {
  font-family: "Fraunces", "Times New Roman", serif;
}

.hero h1,
.page-hero h1 {
  font-size: clamp(32px, 4vw, 48px);
  margin: 0 0 16px;
}

.lead {
  font-size: 18px;
  color: var(--muted);
  line-height: 1.6;
}

.eyebrow {
  text-transform: uppercase;
  letter-spacing: 0.15em;
  font-size: 12px;
  color: var(--muted);
  font-weight: 600;
}

.hero-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  margin-top: 20px;
}

.button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  text-decoration: none;
  padding: 12px 20px;
  border-radius: 999px;
  background: var(--accent);
  color: #fff;
  font-weight: 600;
  box-shadow: 0 12px 30px rgba(228, 122, 85, 0.3);
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.button:hover {
  transform: translateY(-2px);
  box-shadow: 0 18px 40px rgba(228, 122, 85, 0.35);
}

.button.ghost {
  background: transparent;
  color: var(--ink);
  border: 1px solid var(--stroke);
  box-shadow: none;
}

.card {
  background: var(--surface);
  border-radius: 24px;
  padding: 24px;
  box-shadow: var(--shadow);
}

.summary-list {
  list-style: none;
  padding: 0;
  margin: 16px 0 0;
}

.summary-list li {
  padding: 6px 0;
  color: var(--muted);
}

.note {
  font-size: 14px;
  color: var(--muted);
  margin-top: 16px;
}

.content-grid,
.info-grid {
  display: grid;
  gap: 24px;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  margin: 48px 0;
}

.split-section {
  display: grid;
  gap: 32px;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  align-items: start;
  margin: 40px 0;
}

.highlight {
  background: var(--surface);
  border-radius: 24px;
  padding: 24px;
  border: 1px solid var(--stroke);
}

.bullets {
  list-style: none;
  padding: 0;
  margin: 0;
}

.bullets li {
  padding: 6px 0;
  border-bottom: 1px dashed var(--stroke);
}

.bullets li:last-child {
  border-bottom: 0;
}

.steps {
  display: grid;
  gap: 12px;
  margin-top: 16px;
}

.step {
  background: rgba(110, 183, 178, 0.15);
  padding: 12px 16px;
  border-radius: 16px;
}

.content-block {
  background: var(--surface);
  border-radius: 28px;
  padding: 32px;
  box-shadow: var(--shadow);
  margin-top: 24px;
}

.content-block > * + * {
  margin-top: 16px;
}

.reservation-panel {
  background: var(--surface);
  border-radius: 28px;
  padding: 28px;
  box-shadow: var(--shadow);
  margin-top: 24px;
  display: grid;
  gap: 24px;
}

.calendar {
  display: grid;
  gap: 16px;
}

.calendar-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.calendar-title {
  font-weight: 700;
  font-size: 18px;
  text-transform: capitalize;
}

.calendar-weekdays {
  display: grid;
  grid-template-columns: repeat(7, 1fr);
  gap: 8px;
  font-size: 12px;
  text-transform: uppercase;
  letter-spacing: 0.12em;
  color: var(--muted);
}

.calendar-weekdays span {
  text-align: center;
}

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

.calendar-day {
  min-height: 78px;
  border-radius: 16px;
  border: 1px solid var(--stroke);
  background: var(--surface);
  padding: 10px;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  font-size: 13px;
  transition: all 0.2s ease;
}

.calendar-day a {
  text-decoration: none;
  color: inherit;
  display: flex;
  flex-direction: column;
  gap: 6px;
  height: 100%;
}

.calendar-day.is-empty {
  background: transparent;
  border: none;
}

.calendar-day .day-number {
  font-weight: 700;
}

.calendar-day .day-meta {
  font-size: 11px;
  color: var(--muted);
}

.calendar-day.available {
  border-color: var(--day-border, rgba(110, 183, 178, 0.55));
  background: var(--day-bg, rgba(110, 183, 178, 0.15));
}

.calendar-day.available:hover {
  transform: translateY(-2px);
  box-shadow: var(--shadow);
}

.calendar-day.full {
  background: var(--day-bg, rgba(228, 122, 85, 0.1));
  border-color: var(--day-border, rgba(228, 122, 85, 0.4));
}

.calendar-day.vacation {
  background: rgba(95, 136, 214, 0.16);
  border-color: rgba(95, 136, 214, 0.5);
}

.calendar-day.closed,
.calendar-day.disabled {
  opacity: 0.5;
}

.calendar-day.is-selected {
  border-color: var(--ink);
  box-shadow: 0 12px 24px rgba(29, 42, 51, 0.18);
}

.slot-list h3 {
  margin: 0 0 12px;
}

.slot-grid {
  display: grid;
  gap: 12px;
  grid-template-columns: repeat(auto-fit, minmax(140px, 1fr));
}

.slot-button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 10px 14px;
  border-radius: 12px;
  border: 1px solid var(--stroke);
  text-decoration: none;
  color: var(--ink);
  font-weight: 600;
  background: var(--surface);
  transition: all 0.2s ease;
}

.slot-button:hover {
  border-color: var(--ink);
}

.slot-button.is-selected {
  background: var(--ink);
  color: var(--background);
}

.slot-button.is-disabled {
  opacity: 0.4;
  cursor: not-allowed;
  pointer-events: none;
}

.booking-form {
  display: grid;
  gap: 16px;
}

.summary-box,
.info-box {
  background: var(--surface-muted);
  border-radius: 16px;
  padding: 16px;
}

.checkbox {
  display: flex;
  align-items: flex-start;
  gap: 10px;
}

.checkbox input {
  margin-top: 4px;
}

.summary-box p,
.info-box p {
  margin: 0 0 8px;
}

.summary-box p:last-child,
.info-box p:last-child {
  margin-bottom: 0;
}

code {
  font-family: "SFMono-Regular", "Consolas", "Liberation Mono", monospace;
  background: var(--surface-muted);
  padding: 2px 6px;
  border-radius: 6px;
}

.news-list {
  display: grid;
  gap: 20px;
  margin-top: 32px;
}

.news-card {
  background: var(--surface);
  border-radius: 20px;
  padding: 20px 24px;
  box-shadow: var(--shadow);
}

.news-date {
  font-size: 14px;
  color: var(--muted);
}

.news-body {
  line-height: 1.6;
}

.loading-overlay {
  position: fixed;
  inset: 0;
  background: rgba(10, 16, 20, 0.25);
  display: none;
  align-items: center;
  justify-content: center;
  z-index: 999;
}

.loading-overlay.is-visible {
  display: flex;
}

.loading-card {
  background: var(--surface);
  border-radius: 18px;
  padding: 20px 24px;
  box-shadow: var(--shadow);
  display: flex;
  align-items: center;
  gap: 12px;
  font-weight: 600;
}

.loading-spinner {
  width: 18px;
  height: 18px;
  border-radius: 50%;
  border: 3px solid rgba(110, 183, 178, 0.35);
  border-top-color: var(--accent-dark);
  animation: spin 0.9s linear infinite;
}

.loading-card p {
  margin: 0;
}

.loading-card p:last-child {
  margin-bottom: 0;
}

@keyframes spin {
  to {
    transform: rotate(360deg);
  }
}

.hours {
  width: 100%;
  border-collapse: collapse;
}

.hours td {
  padding: 6px 0;
  border-bottom: 1px dashed var(--stroke);
  color: var(--muted);
}

.hours tr:last-child td {
  border-bottom: 0;
}

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

.site-footer {
  display: grid;
  gap: 12px;
  padding: 24px clamp(20px, 4vw, 60px);
  background: var(--surface-soft);
  border-top: 1px solid var(--stroke);
  font-size: 14px;
  color: var(--muted);
  width: 100%;
  margin: 0 auto;
}

.site-footer a {
  color: inherit;
}

.admin-link {
  display: inline-block;
  margin-left: 12px;
  font-size: 11px;
  opacity: 0.35;
  text-decoration: none;
}

.admin-link:hover {
  opacity: 0.85;
}

.admin-body {
  background: var(--background);
}

.admin-body::before {
  display: none;
}

.admin-shell {
  width: min(1280px, 100%);
  margin: 32px auto 60px;
  padding: 0 20px;
}

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

.admin-user {
  color: var(--muted);
  margin: 0;
}

.admin-actions {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 12px;
}

.admin-nav {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

.admin-nav a {
  text-decoration: none;
  color: var(--ink);
  font-weight: 600;
  padding: 6px 12px;
  border-radius: 999px;
  border: 1px solid var(--stroke);
}

.admin-nav a:hover {
  border-color: var(--ink);
}

.admin-main {
  display: grid;
  gap: 20px;
}

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

.admin-card {
  background: var(--surface);
  border-radius: 20px;
  padding: 24px;
  box-shadow: var(--shadow);
}

.admin-help {
  color: var(--muted);
}

.admin-help-list {
  margin: 10px 0 0;
  padding-left: 18px;
}

.admin-help-list li {
  margin: 6px 0;
}

.editor-toolbar {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 8px;
}

.editor-toolbar .button {
  padding: 6px 12px;
  font-size: 13px;
  box-shadow: none;
}

.editor-toolbar .button:hover {
  transform: none;
  box-shadow: none;
}

.admin-form {
  display: grid;
  gap: 12px;
  margin-top: 16px;
}

.admin-form label {
  font-weight: 600;
}

.admin-form input,
.admin-form textarea,
.admin-form select {
  padding: 10px 12px;
  border-radius: 12px;
  border: 1px solid var(--stroke);
  background: var(--surface);
  color: var(--ink);
  font: inherit;
}

.admin-form textarea {
  resize: vertical;
  min-height: 160px;
}

.textarea-small {
  min-height: 90px;
}


.checkbox {
  display: flex;
  align-items: center;
  gap: 10px;
  font-weight: 600;
}

.form-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  margin-top: 8px;
}

.admin-alert {
  padding: 12px 16px;
  border-radius: 12px;
  background: rgba(110, 183, 178, 0.18);
  border: 1px solid var(--stroke);
}

.admin-alert.error {
  background: rgba(228, 122, 85, 0.2);
}

.admin-alert.success {
  background: rgba(110, 183, 178, 0.2);
}

.admin-row {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  align-items: center;
  gap: 12px;
}

.admin-form-inline {
  grid-template-columns: 1fr;
}

.admin-table {
  display: grid;
  gap: 12px;
  margin-top: 16px;
}

.admin-table-row {
  display: grid;
  grid-template-columns: 120px 1fr 120px 140px;
  gap: 12px;
  padding: 10px 0;
  border-bottom: 1px solid var(--stroke);
}

.admin-table-head {
  font-weight: 700;
  color: var(--muted);
}

.admin-actions-inline {
  display: flex;
  gap: 10px;
  align-items: center;
  flex-direction: column;
}

.admin-actions-inline form {
  margin: 0;
}

.link.danger {
  color: var(--accent);
  background: transparent;
  border: none;
  padding: 0;
  font: inherit;
  cursor: pointer;
}

.admin-list {
  display: grid;
  gap: 12px;
  margin-top: 16px;
}

.admin-list-item {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  align-items: center;
  gap: 12px;
  padding: 12px 16px;
  border: 1px solid var(--stroke);
  border-radius: 14px;
  background: var(--surface);
}

.muted {
  color: var(--muted);
  font-size: 13px;
}

.admin-week {
  display: grid;
  gap: 16px;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  margin-top: 16px;
}

.admin-day {
  border: 1px solid var(--stroke);
  border-radius: 18px;
  padding: 12px;
  background: var(--surface-muted);
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.admin-day-head {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  gap: 8px;
}

.admin-day-name {
  font-weight: 700;
}

.admin-day-date {
  color: var(--muted);
  font-size: 13px;
}

.admin-day-list {
  display: grid;
  gap: 10px;
}

.admin-res-card {
  border-radius: 14px;
  padding: 12px;
  background: var(--surface);
  box-shadow: var(--shadow);
  display: grid;
  gap: 6px;
}

.admin-res-card.is-cancelled {
  opacity: 0.6;
}

.admin-res-top {
  display: flex;
  justify-content: space-between;
  gap: 8px;
  font-size: 13px;
  color: var(--muted);
}

.admin-res-time {
  font-weight: 700;
  color: var(--ink);
}

.admin-res-status {
  font-weight: 600;
}

.admin-res-name {
  font-weight: 700;
}

.admin-res-contact,
.admin-res-note,
.admin-res-notify {
  font-size: 13px;
  color: var(--muted);
}

.admin-res-notify {
  display: flex;
  gap: 12px;
  flex-wrap: wrap;
}

.admin-res-card .admin-actions-inline {
  flex-direction: row;
  flex-wrap: wrap;
  gap: 12px;
  margin-top: 6px;
}

.admin-table-row.reservations {
  grid-template-columns: 140px 110px 1.2fr 1.2fr 90px 160px 120px;
  align-items: start;
}

.notice-row {
  display: flex;
  gap: 6px;
  align-items: center;
  font-size: 13px;
}

.notice-label {
  color: var(--muted);
}

.notice-ok {
  color: #1b8a5a;
  font-weight: 700;
}

.notice-bad {
  color: #cc4b2c;
  font-weight: 700;
}

.notice-details {
  margin-top: 6px;
}

.notice-details summary {
  cursor: pointer;
  font-size: 12px;
  color: var(--muted);
}
}

.reveal {
  animation: fadeUp 0.7s ease both;
}

img {
  max-width: 100%;
  display: block;
}

.gallery {
  display: grid;
  gap: 16px;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
}

.gallery figure {
  margin: 0;
  border-radius: 18px;
  overflow: hidden;
  box-shadow: var(--shadow);
  background: var(--surface);
}

.gallery img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

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

@media (max-width: 860px) {
  .site-header {
    flex-direction: column;
    align-items: flex-start;
    padding: 20px clamp(16px, 4vw, 36px);
  }

  .nav-wrap {
    width: 100%;
    justify-content: space-between;
    position: relative;
  }

  .nav-toggle {
    display: inline-flex;
  }

  .site-nav {
    position: absolute;
    top: calc(100% + 10px);
    right: 0;
    min-width: 240px;
    flex-direction: column;
    align-items: stretch;
    gap: 8px;
    padding: 14px;
    border-radius: 18px;
    border: 1px solid var(--stroke);
    background: var(--surface);
    box-shadow: var(--shadow);
    opacity: 0;
    transform: translateY(-6px);
    pointer-events: none;
    transition: opacity 0.2s ease, transform 0.2s ease;
  }

  .nav-wrap.is-open .site-nav {
    opacity: 1;
    transform: translateY(0);
    pointer-events: auto;
  }

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

  .admin-table-row.reservations {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 640px) {
  main {
    padding: 0 16px 40px;
  }

  .site-nav a {
    padding: 6px 10px;
    font-size: 14px;
  }

  .nav-cta {
    width: 100%;
    justify-content: center;
    text-align: center;
  }

  .site-nav {
    left: 0;
    right: 0;
    min-width: 0;
  }

  .theme-toggle {
    padding: 6px 12px;
    font-size: 13px;
  }

  .hero-actions {
    flex-direction: column;
    align-items: stretch;
  }

  .hero,
  .page-hero {
    gap: 20px;
    margin-top: 0;
  }

  .card,
  .highlight,
  .content-block,
  .news-card {
    padding: 20px;
  }

  .site-footer {
    padding: 20px 16px;
  }

  .gallery {
    grid-template-columns: 1fr;
  }

  .calendar-grid {
    gap: 6px;
  }

  .calendar-day {
    min-height: 66px;
    padding: 8px;
  }

  .slot-grid {
    grid-template-columns: repeat(auto-fit, minmax(120px, 1fr));
  }

  .admin-shell {
    margin: 24px auto 40px;
    padding: 0 16px;
  }

  .admin-nav a {
    font-size: 14px;
  }
}

@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }
}
