:root {
  --bg: #f7f1e5;
  --ink: #221c18;
  --accent: #c93a2f;
  --accent-soft: #e57a58;
  --gold: #c89d2a;
  --card: #fffaf1;
  --line: #d8c9af;
}

* {
  box-sizing: border-box;
}

[hidden] {
  display: none !important;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  font-family: "Manrope", sans-serif;
  color: var(--ink);
  background: radial-gradient(circle at 15% 10%, #ffe6c7 0%, transparent 45%),
    radial-gradient(circle at 80% 30%, #ffd6d0 0%, transparent 40%), var(--bg);
  min-height: 100vh;
  line-height: 1.5;
}

.page-glow {
  position: fixed;
  inset: 0;
  pointer-events: none;
  background-image: linear-gradient(to right, transparent 0 95%, rgba(0, 0, 0, 0.03) 95% 96%, transparent 96% 100%);
  background-size: 56px 56px;
  mix-blend-mode: multiply;
}

.site-header,
main,
.site-footer {
  width: min(1020px, 92vw);
  margin-inline: auto;
  position: relative;
  z-index: 1;
}

.site-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 1.1rem 0;
  border-bottom: 1px solid var(--line);
}

.logo-wrap {
  display: flex;
  align-items: center;
  gap: 0.55rem;
}

.logo-star {
  color: var(--accent);
  font-size: 1.15rem;
}

.logo-name {
  margin: 0;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  font-size: 0.83rem;
  font-weight: 800;
}

.site-nav {
  display: flex;
  gap: 1rem;
}

.site-nav a {
  text-decoration: none;
  color: inherit;
  font-weight: 700;
  font-size: 0.92rem;
}

.site-nav .nav-btn {
  margin-top: 0;
  padding: 0.5rem 0.9rem;
  font-size: 0.84rem;
}

main {
  padding-block: 1.8rem 4rem;
}

section {
  margin-top: 3.2rem;
}

.eyebrow {
  margin: 0;
  text-transform: uppercase;
  letter-spacing: 0.12em;
  font-size: 0.72rem;
  font-weight: 800;
  color: var(--accent);
}

h1,
h2,
h3 {
  font-family: "Fraunces", serif;
  line-height: 1.08;
  margin: 0.4rem 0 0.8rem;
}

h1 {
  font-size: clamp(2.2rem, 5vw, 4.4rem);
}

h1 span {
  display: block;
  font-size: clamp(1.35rem, 3vw, 2.25rem);
  color: #594638;
  font-weight: 400;
}

h2 {
  font-size: clamp(1.6rem, 3.6vw, 2.5rem);
}

.hero-copy {
  max-width: 58ch;
  font-size: 1.05rem;
}

.admin-hero h1 {
  max-width: 16ch;
}

.cta,
.ghost-btn {
  margin-top: 0.6rem;
  display: inline-block;
  border-radius: 999px;
  padding: 0.72rem 1.15rem;
  text-decoration: none;
  cursor: pointer;
  font-weight: 800;
  transition: transform 180ms ease, background-color 180ms ease;
}

.cta {
  border: none;
  background: var(--accent);
  color: #fff;
}

.cta:hover {
  background: var(--accent-soft);
  transform: translateY(-2px);
}

.ghost-btn {
  border: 1px solid var(--line);
  background: #fff;
}

.card-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 1rem;
}

.star-card {
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: 16px;
  padding: 1.1rem;
  box-shadow: 0 8px 20px rgba(36, 26, 16, 0.05);
}

.card-stars {
  margin: 0;
  color: var(--gold);
  letter-spacing: 0.08em;
  font-size: 1.1rem;
}

.koko-hearts {
  display: inline-flex;
  gap: 0.24rem;
  align-items: center;
}

.star-card h3 {
  margin-top: 0.45rem;
}

.timeline ol {
  margin: 0;
  padding: 0;
  list-style: none;
  border-left: 2px dashed var(--line);
  padding-left: 1rem;
  display: grid;
  gap: 0.95rem;
}

.timeline li {
  position: relative;
}

.timeline li::before {
  content: "";
  position: absolute;
  width: 0.58rem;
  height: 0.58rem;
  border-radius: 50%;
  background: var(--accent);
  left: -1.35rem;
  top: 0.36rem;
}

.moment-date {
  margin: 0;
  font-weight: 800;
}

.reviews blockquote {
  margin: 0;
  background: #231913;
  color: #ffeddd;
  padding: 1.25rem;
  border-radius: 14px;
  font-family: "Fraunces", serif;
  font-size: clamp(1.2rem, 2.6vw, 1.8rem);
}

.panel {
  border: 1px solid var(--line);
  border-radius: 18px;
  background: linear-gradient(155deg, #fffbf4, #ffeede);
  padding: 1.15rem;
}

.book-note {
  margin: 0 0 0.6rem;
  font-weight: 600;
}

.restaurant-form {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 0.85rem;
}

label {
  display: grid;
  gap: 0.35rem;
  font-weight: 700;
  font-size: 0.9rem;
}

input,
select,
textarea {
  width: 100%;
  border: 1px solid #ccb89a;
  background: #fffefb;
  border-radius: 10px;
  padding: 0.62rem 0.7rem;
  font: inherit;
  color: inherit;
}

.date-input,
.flatpickr-input {
  letter-spacing: 0.02em;
  font-weight: 700;
  border: 1px solid #d4b689;
  background:
    linear-gradient(180deg, #fffefb, #fff7ee);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.9);
  padding-right: 2.2rem;
}

.date-input:focus,
.flatpickr-input:focus {
  outline: 0;
  border-color: #d14a66;
  box-shadow: 0 0 0 3px rgba(209, 74, 102, 0.15);
}

.flatpickr-input[readonly] {
  cursor: pointer;
}

textarea {
  resize: vertical;
}

/* Themed flatpickr calendar */
.flatpickr-calendar {
  border: 1px solid #d6bd96;
  border-radius: 14px;
  box-shadow: 0 18px 36px rgba(74, 44, 22, 0.2);
  background: #fff8ef;
}

.flatpickr-months,
.flatpickr-weekdays {
  background: #fff1e0;
}

.flatpickr-current-month .flatpickr-monthDropdown-months,
.flatpickr-current-month input.cur-year,
.flatpickr-weekday {
  color: #4e3425;
  font-weight: 700;
}

.flatpickr-day {
  border-radius: 8px;
  color: #4e3425;
}

.flatpickr-day:hover {
  background: #ffe8ca;
  border-color: #ffe8ca;
}

.flatpickr-day.today {
  border-color: #d14a66;
}

.flatpickr-day.selected,
.flatpickr-day.startRange,
.flatpickr-day.endRange {
  background: #d14a66;
  border-color: #d14a66;
}

fieldset {
  border: 0;
  margin: 0;
  padding: 0;
}

legend {
  margin-bottom: 0.35rem;
  font-weight: 700;
  font-size: 0.9rem;
}

.wide {
  grid-column: 1 / -1;
}

.heart-rating {
  display: inline-flex;
  flex-direction: row-reverse;
  gap: 0.38rem;
}

.heart-rating input {
  position: absolute;
  opacity: 0;
  pointer-events: none;
}

.heart-rating label {
  color: #ccb89a;
  font-size: 1.4rem;
  cursor: pointer;
  transition: color 140ms ease, transform 140ms ease;
}

.heart-rating label:hover,
.heart-rating label:hover ~ label {
  color: #d14d66;
  transform: translateY(-1px);
}

.heart-rating input:checked ~ label {
  color: #d14d66;
}

.form-actions {
  display: flex;
  gap: 0.7rem;
  align-items: center;
  flex-wrap: wrap;
  margin-bottom: 0.8rem;
}

.form-status {
  margin: 0;
  font-size: 0.85rem;
  font-weight: 700;
}

.auth-wrap {
  max-width: 420px;
  margin-inline: auto;
}

.auth-form {
  display: grid;
  gap: 0.85rem;
}

.auth-main {
  min-height: 100vh;
  display: grid;
  place-items: center;
  width: min(1020px, 92vw);
  margin-inline: auto;
}

.auth-screen .panel {
  width: min(420px, 92vw);
}

.book-head {
  margin-top: 1rem;
  display: flex;
  justify-content: flex-end;
}

.filter-wrap {
  max-width: 190px;
}

.restaurant-grid {
  margin-top: 1rem;
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 1rem;
}

.empty-state {
  border: 1px dashed var(--line);
  border-radius: 14px;
  padding: 1.2rem;
  background: #fffbf4;
  grid-column: 1 / -1;
}

.restaurant-card {
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: 14px;
  overflow: hidden;
  box-shadow: 0 8px 18px rgba(36, 26, 16, 0.08);
}

.card-photo {
  width: 100%;
  aspect-ratio: 4 / 3;
  object-fit: cover;
  background: #f2e9dd;
}

.card-body {
  padding: 0.88rem;
}

.card-head {
  display: flex;
  justify-content: space-between;
  gap: 0.5rem;
  align-items: flex-start;
}

.card-head h3 {
  margin: 0;
  font-size: 1.2rem;
}

.meta {
  margin: 0.25rem 0 0.35rem;
  font-size: 0.87rem;
  font-weight: 600;
  color: #624f41;
}

.review {
  margin: 0;
  font-size: 0.95rem;
}

.card-foot {
  margin-top: 0.7rem;
  display: flex;
  justify-content: flex-start;
  gap: 0.5rem;
  align-items: center;
}

.date {
  margin: 0;
  font-size: 0.8rem;
  color: #6f5a4a;
}

.delete-btn {
  border: 1px solid var(--line);
  background: #fff;
  border-radius: 8px;
  padding: 0.3rem 0.5rem;
  font-size: 0.78rem;
  cursor: pointer;
}

.site-footer {
  border-top: 1px solid var(--line);
  padding: 1.15rem 0 2rem;
  font-size: 0.92rem;
}

.reveal {
  opacity: 0;
  transform: translateY(16px);
  transition: opacity 500ms ease, transform 500ms ease;
}

.reveal.in {
  opacity: 1;
  transform: translateY(0);
}

@media (max-width: 980px) {
  .restaurant-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (max-width: 800px) {
  .card-grid,
  .restaurant-grid {
    grid-template-columns: 1fr;
  }

  .site-nav {
    gap: 0.7rem;
  }

  .site-nav a {
    font-size: 0.82rem;
  }

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

  .filter-wrap {
    max-width: none;
    width: 100%;
  }
}

/* Public page visual refresh */
.public-page {
  background:
    radial-gradient(95vw 70vh at 8% 6%, rgba(255, 205, 139, 0.6), transparent 62%),
    radial-gradient(85vw 65vh at 90% 18%, rgba(255, 162, 176, 0.44), transparent 58%),
    linear-gradient(160deg, #fdf5e8 0%, #fdeee7 45%, #f7e8ee 100%);
}

.public-page .site-header {
  position: sticky;
  top: 0.85rem;
  z-index: 30;
  padding: 0.85rem 1rem;
  border: 1px solid rgba(216, 201, 175, 0.75);
  border-radius: 14px;
  background: rgba(255, 251, 244, 0.78);
  backdrop-filter: blur(12px);
}

.public-page main {
  padding-top: 2.3rem;
}

.public-page .hero {
  margin-top: 1.4rem;
  padding: 2rem 2rem 1.9rem;
  border: 1px solid rgba(216, 201, 175, 0.7);
  border-radius: 22px;
  background:
    radial-gradient(circle at 86% 16%, rgba(255, 205, 154, 0.5), transparent 40%),
    linear-gradient(155deg, rgba(255, 252, 246, 0.94), rgba(255, 239, 229, 0.9));
  box-shadow: 0 26px 52px rgba(88, 51, 28, 0.11);
  position: relative;
  overflow: hidden;
}

.public-page .hero::after {
  content: "";
  position: absolute;
  width: 240px;
  height: 240px;
  right: -70px;
  bottom: -95px;
  border-radius: 50%;
  background: radial-gradient(circle at 35% 35%, rgba(201, 58, 47, 0.33), rgba(201, 58, 47, 0));
  pointer-events: none;
}

.public-page .hero h1 {
  max-width: 15ch;
}

.public-page .hero-copy {
  max-width: 52ch;
  font-size: 1.16rem;
}

.public-page .cta {
  background: linear-gradient(135deg, #d14a3c, #c62b22);
  box-shadow: 0 10px 22px rgba(198, 43, 34, 0.34);
}

.public-page .card-grid {
  gap: 1.25rem;
}

.public-page .star-card {
  border-radius: 18px;
  position: relative;
  overflow: hidden;
  box-shadow: 0 18px 28px rgba(54, 33, 17, 0.11);
  transition: transform 240ms ease, box-shadow 240ms ease;
}

.public-page .star-card::before {
  content: "";
  position: absolute;
  inset: 0 0 auto 0;
  height: 8px;
  background: linear-gradient(90deg, #d14a3c, #e6942f, #d14a3c);
}

.public-page .star-card:hover {
  transform: translateY(-4px);
  box-shadow: 0 24px 35px rgba(54, 33, 17, 0.16);
}

.public-page .timeline ol {
  border: none;
  padding-left: 0;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 0.9rem;
}

.public-page .timeline li {
  border: 1px solid var(--line);
  border-radius: 14px;
  padding: 0.9rem 0.95rem;
  background: #fffaf2;
}

.public-page .timeline li::before {
  display: none;
}

.public-page .reviews blockquote {
  border: 1px solid rgba(216, 201, 175, 0.65);
  box-shadow: 0 14px 25px rgba(35, 25, 19, 0.18);
}

.public-page #book.panel {
  border-radius: 22px;
  background:
    radial-gradient(circle at 90% 12%, rgba(255, 195, 170, 0.35), transparent 40%),
    linear-gradient(154deg, #fffbf5, #fff2e5);
}

.public-page .restaurant-grid {
  gap: 1.15rem;
}

.public-page .restaurant-card {
  border-radius: 18px;
  transition: transform 220ms ease, box-shadow 220ms ease;
}

.public-page .restaurant-card:hover {
  transform: translateY(-3px);
  box-shadow: 0 18px 28px rgba(44, 24, 11, 0.16);
}

.public-page .card-photo {
  aspect-ratio: 16 / 10;
}

@media (max-width: 980px) {
  .public-page .timeline ol {
    grid-template-columns: 1fr;
  }

  .public-page .hero {
    padding: 1.5rem 1.2rem 1.4rem;
  }
}

@media (max-width: 800px) {
  .public-page .site-header {
    top: 0;
    border-radius: 0 0 12px 12px;
    border-left: none;
    border-right: none;
  }

  .public-page .hero h1 {
    max-width: none;
  }
}
