:root {
  --cream: #faf6f1;
  --paper: #fffdf9;
  --brown: #2b2118;
  --brown-soft: #6f6258;
  --terracotta: #c45c26;
  --gold: #c9a46b;
  --sage: #1f5c5a;
  --sage-soft: #e6f0ef;
  --line: #e7ddd2;
  --shadow: 0 10px 30px rgba(43, 33, 24, 0.08);
  --radius: 18px;
}

* { box-sizing: border-box; }
html { background: var(--cream); color: var(--brown); font-size: 16px; }
body { margin: 0; background: var(--cream); color: var(--brown); font-family: "Manrope", system-ui, sans-serif; line-height: 1.6; }
a { color: inherit; }
.page-shell { width: min(1180px, calc(100% - 40px)); margin-inline: auto; }

.site-header { background: rgba(250,246,241,.94); border-bottom: 1px solid var(--line); position: sticky; top: 0; z-index: 20; }
.header-shell { align-items: center; display: flex; justify-content: space-between; margin-inline: auto; min-height: 76px; width: min(1180px, calc(100% - 40px)); }
.brand { align-items: center; display: flex; text-decoration: none; }
.brand-mark { align-items: center; background: var(--terracotta); border-radius: 50%; color: white; display: inline-flex; font-family: sans-serif; font-size: 1rem; height: 38px; justify-content: center; margin-right: 10px; width: 38px; }
.brand-copy { display: flex; flex-direction: column; line-height: 1.05; }
.brand-copy strong { font-family: "Fraunces", serif; font-size: 1.4rem; }
.brand-copy small { color: var(--sage); font-size: .66rem; font-weight: 700; letter-spacing: .1em; margin-top: 4px; text-transform: uppercase; }
.header-link { color: var(--brown-soft); font-size: .85rem; font-weight: 700; text-decoration: none; }
.header-link:hover { color: var(--terracotta); }

.directory-hero { min-height: 510px; overflow: hidden; position: relative; }
.directory-hero img { height: 100%; inset: 0; object-fit: cover; position: absolute; width: 100%; }
.hero-shade { background: linear-gradient(90deg, rgba(40,22,14,.88), rgba(40,22,14,.55) 46%, rgba(40,22,14,.08) 78%); inset: 0; position: absolute; }
.hero-content { color: white; padding-block: 105px 90px; position: relative; }
.eyebrow { color: var(--terracotta); font-size: .78rem; font-weight: 700; letter-spacing: .15em; margin: 0 0 12px; text-transform: uppercase; }
.hero-content .eyebrow { color: #efb066; }
h1, h2, h3 { font-family: "Fraunces", Georgia, serif; line-height: 1.06; margin-top: 0; }
.hero-content h1 { font-size: clamp(3.4rem, 7vw, 6.2rem); letter-spacing: -.045em; margin-bottom: 22px; max-width: 760px; }
.hero-copy { font-size: 1.08rem; margin: 0; max-width: 510px; }

.directory-workspace { padding-block: 74px 100px; }
.section-heading h2 { font-size: clamp(2.1rem, 4vw, 3.35rem); margin-bottom: 30px; }
.browse-panel { align-items: end; background: var(--paper); border: 1px solid var(--line); box-shadow: var(--shadow); display: grid; gap: 18px; grid-template-columns: 1.6fr repeat(3, 1fr) auto; padding: 24px; }
.browse-panel label { display: block; font-size: .78rem; font-weight: 700; letter-spacing: .08em; margin-bottom: 7px; text-transform: uppercase; }
.browse-panel input, .browse-panel select { appearance: none; background-color: transparent; border: 0; border-bottom: 1px solid var(--brown); border-radius: 0; color: var(--brown); font: inherit; height: 44px; outline-offset: 4px; padding: 6px 26px 6px 0; width: 100%; }
.browse-panel select { background-image: linear-gradient(45deg, transparent 50%, var(--brown) 50%); background-position: right 8px center; background-repeat: no-repeat; background-size: 6px 6px; }
.primary-button { background: var(--terracotta); border: 0; color: white; cursor: pointer; font: inherit; font-size: .84rem; font-weight: 700; min-height: 46px; padding: 12px 20px; }
.primary-button:hover { background: #ad482f; }
.clear-link { font-size: .82rem; grid-column: 1 / -1; justify-self: end; }

.restaurant-grid { display: grid; gap: 24px; grid-template-columns: repeat(3, minmax(0, 1fr)); margin-top: 48px; }
.restaurant-card { background: var(--paper); border: 1px solid var(--line); min-width: 0; transition: transform .2s ease, box-shadow .2s ease; }
.restaurant-card:hover { box-shadow: var(--shadow); transform: translateY(-4px); }
.card-link { display: block; height: 100%; text-decoration: none; }
.card-image { align-items: center; background: linear-gradient(135deg, var(--terracotta), #7e3528); color: rgba(255,255,255,.9); display: flex; font-family: "Fraunces", serif; font-size: 4.6rem; height: 180px; justify-content: center; }
.restaurant-card:nth-child(3n+2) .card-image { background: linear-gradient(135deg, var(--sage), #394033); }
.restaurant-card:nth-child(3n) .card-image { background: linear-gradient(135deg, var(--gold), #8b5d28); }
.card-body { padding: 22px; }
.card-topline { align-items: center; color: var(--brown-soft); display: flex; font-size: .72rem; font-weight: 700; justify-content: space-between; letter-spacing: .1em; text-transform: uppercase; }
.status { color: var(--sage); }
.card-body h3 { font-size: 1.7rem; margin: 14px 0 4px; }
.branch, .location-name, .address { margin: 2px 0; }
.branch, .address { color: var(--brown-soft); font-size: .9rem; }
.tag-list { display: flex; flex-wrap: wrap; gap: 7px; list-style: none; margin: 18px 0; padding: 0; }
.tag-list li { border: 1px solid var(--line); border-radius: 100px; font-size: .72rem; font-weight: 700; padding: 4px 10px; }
.view-link { border-top: 1px solid var(--line); display: flex; font-size: .8rem; font-weight: 700; justify-content: space-between; margin-top: 20px; padding-top: 14px; text-transform: uppercase; }
.empty-state { background: var(--paper); border: 1px solid var(--line); margin-top: 48px; padding: 55px; text-align: center; }
.empty-state h3 { font-size: 2rem; margin-bottom: 8px; }

.detail-page { min-height: 75vh; padding-block: 30px 100px; }
.breadcrumb { color: var(--brown-soft); display: flex; flex-wrap: wrap; font-size: .82rem; gap: 9px; margin-bottom: 30px; }
.breadcrumb a { text-decoration-thickness: 1px; text-underline-offset: 3px; }
.detail-hero { background: var(--paper); border: 1px solid var(--line); border-radius: 28px; box-shadow: var(--shadow); display: grid; grid-template-columns: minmax(0, 1.08fr) minmax(360px, .92fr); overflow: hidden; }
.detail-photo { background: #1b1410; min-height: 520px; overflow: hidden; position: relative; }
.detail-photo img { height: 100%; inset: 0; object-fit: cover; position: absolute; width: 100%; }
.detail-photo-stock::after { background: linear-gradient(0deg, rgba(27,20,16,.78), transparent 58%); content: ""; inset: 0; position: absolute; }
.stock-photo-overlay { bottom: 0; color: white; left: 0; padding: 34px; position: absolute; right: 0; z-index: 1; }
.stock-photo-overlay p { margin: 0; }
.stock-photo-name { font-family: "Fraunces", serif; font-size: clamp(2rem, 4vw, 3.5rem); font-weight: 700; line-height: 1.05; }
.stock-photo-branch { font-size: 1rem; margin-top: 6px !important; }
.stock-photo-label { color: rgba(255,255,255,.78); font-size: .72rem; font-weight: 700; letter-spacing: .08em; margin-top: 18px !important; text-transform: uppercase; }
.detail-photo-fallback { align-items: center; background: linear-gradient(145deg, var(--sage), #123b3a); color: white; display: flex; flex-direction: column; justify-content: center; padding: 40px; text-align: center; }
.detail-photo-fallback::before { background: radial-gradient(circle, rgba(255,255,255,.12) 0 2px, transparent 3px); background-size: 24px 24px; content: ""; inset: 0; opacity: .35; position: absolute; }
.fallback-mark { align-items: center; background: rgba(255,255,255,.12); border: 1px solid rgba(255,255,255,.28); border-radius: 50%; display: flex; flex-direction: column; height: 150px; justify-content: center; position: relative; width: 150px; }
.fallback-mark span { font-size: 3.5rem; line-height: 1; }
.detail-photo-fallback p { font-size: .78rem; font-weight: 700; letter-spacing: .1em; margin: 24px 0 0; position: relative; text-transform: uppercase; }
.detail-photo-fallback .fallback-name { font-family: "Fraunces", serif; font-size: 2rem; letter-spacing: -.02em; margin-bottom: -12px; text-transform: none; }
.detail-header { align-items: flex-start; display: flex; flex-direction: column; justify-content: center; padding: clamp(34px, 5vw, 66px); }
.detail-header h1 { font-size: clamp(2.8rem, 5vw, 5rem); letter-spacing: -.045em; margin-bottom: 8px; }
.detail-branch { color: var(--brown-soft); font-size: 1.15rem; margin: 0; }
.detail-status { background: var(--sage-soft); border-radius: 999px; color: var(--sage); font-size: .72rem; font-weight: 700; margin-top: 18px; padding: 7px 12px; text-transform: uppercase; }
.detail-tags { margin-block: 20px 0; }
.detail-tags li { background: var(--sage-soft); border: 0; color: var(--sage); }
.detail-intro { color: var(--brown-soft); font-size: 1.02rem; margin: 22px 0 0; max-width: 42rem; }
.detail-actions { display: flex; flex-wrap: wrap; gap: 9px; margin-top: 26px; }
.detail-action { border: 1px solid var(--line); border-radius: 999px; font-size: .82rem; font-weight: 700; padding: 10px 16px; text-decoration: none; }
.detail-action:hover { border-color: var(--terracotta); }
.primary-action { background: var(--terracotta); border-color: var(--terracotta); color: white; }
.primary-action:hover { background: #a3481b; border-color: #a3481b; }
.detail-grid { display: grid; gap: 20px; grid-template-columns: repeat(2, minmax(0, 1fr)); margin-top: 24px; }
.detail-panel { background: var(--paper); border: 1px solid var(--line); border-radius: var(--radius); min-height: 280px; padding: 34px; }
.detail-panel h2 { font-size: 2rem; margin-bottom: 24px; }
.panel-kicker { color: var(--terracotta); font-size: .72rem; font-weight: 700; letter-spacing: .12em; margin: 0 0 8px; text-transform: uppercase; }
.strong-detail { font-weight: 700; margin-bottom: 0; }
.muted-detail { color: var(--brown-soft); }
.contact-list, .contact-list dd { margin: 0; }
.contact-list div { border-bottom: 1px solid var(--line); padding-block: 12px; }
.contact-list div:first-child { padding-top: 0; }
.contact-list div:last-child { border-bottom: 0; }
.contact-list dt { color: var(--brown-soft); font-size: .72rem; font-weight: 700; text-transform: uppercase; }
.contact-list dd { font-weight: 600; }
.contact-list dd a { text-decoration-color: var(--terracotta); text-underline-offset: 3px; }
.contact-list dd span { color: var(--brown-soft); font-weight: 400; }

.site-footer { background: var(--brown); color: rgba(255,255,255,.72); display: flex; font-size: .78rem; justify-content: space-between; padding: 34px max(20px, calc((100vw - 1180px) / 2)); }
.site-footer p { margin: 0; }
.footer-brand { color: white; font-family: "Fraunces", serif; font-size: 1.15rem; font-weight: 700; }

.header-nav { align-items: center; display: flex; flex-wrap: wrap; justify-content: flex-end; gap: 12px 18px; min-width: 0; }
.header-nav form { margin: 0; }
.header-user { color: var(--brown-soft); font-size: .82rem; max-width: 24ch; overflow-wrap: anywhere; }
.header-shell { gap: 16px; padding-block: 12px; }
.header-shell .brand { flex-shrink: 0; }
.header-button { background: none; border: 0; color: inherit; cursor: pointer; font: inherit; font-size: .82rem; font-weight: 700; padding: 0; text-decoration: underline; text-underline-offset: 3px; }
.message-shell { margin: 18px auto 0; width: min(100% - 40px, 1180px); }
.site-message { background: var(--sage-soft); border: 1px solid var(--sage); border-radius: 12px; color: var(--sage); font-weight: 700; padding: 14px 18px; }
.form-page { min-height: 70vh; padding: 54px 20px 100px; }
.form-card { background: var(--paper); border: 1px solid var(--line); border-radius: 24px; box-shadow: var(--shadow); margin: 0 auto; max-width: 520px; padding: clamp(28px, 5vw, 52px); }
.form-card-wide { max-width: 680px; }
.form-card h1 { font-size: clamp(2.5rem, 6vw, 4rem); margin: 4px 0 12px; }
.public-form { display: grid; gap: 22px; margin-top: 30px; }
.form-field { display: grid; gap: 8px; }
.form-field label { font-size: .82rem; font-weight: 700; }
.form-field input:not([type="checkbox"]), .form-field select, .form-field textarea { background: white; border: 1px solid var(--line); border-radius: 10px; color: inherit; font: inherit; padding: 12px; width: 100%; }
.form-field small { color: var(--brown-soft); }
.checkbox-field { align-items: start; grid-template-columns: auto 1fr; }
.checkbox-field input { margin-top: 4px; }
.checkbox-field small, .checkbox-field .errorlist { grid-column: 2; }
.errorlist { color: #8b241d; list-style: none; margin: 0; padding: 0; }
.form-alert { background: #fff2ee; border: 1px solid #c96754; border-radius: 12px; color: #70221a; padding: 14px 18px; }
.form-alert h2 { font-size: 1.4rem; margin-top: 0; }
.form-alert p:last-child { margin-bottom: 0; }
.form-submit { background: var(--terracotta); border: 0; border-radius: 999px; color: white; cursor: pointer; font: inherit; font-weight: 700; justify-self: start; padding: 12px 20px; }
.form-submit:hover { background: #a3481b; }

@media (max-width: 980px) {
  .browse-panel { grid-template-columns: repeat(2, 1fr); }
  .primary-button { align-self: stretch; }
  .restaurant-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}

@media (max-width: 640px) {
  .page-shell { width: min(100% - 28px, 1180px); }
  .header-shell { min-height: 66px; width: min(100% - 28px, 1180px); }
  .header-nav > .header-link:first-child { display: none; }
  .header-shell { align-items: flex-start; flex-direction: column; gap: 12px; }
  .header-nav { justify-content: flex-start; width: 100%; }
  .header-user { flex-basis: 100%; max-width: none; }
  .directory-hero { min-height: 470px; }
  .hero-shade { background: linear-gradient(90deg, rgba(40,22,14,.84), rgba(40,22,14,.28)); }
  .hero-content { padding-block: 90px 60px; }
  .hero-content h1 { font-size: clamp(3rem, 15vw, 4.5rem); }
  .directory-workspace { padding-block: 52px 72px; }
  .browse-panel, .restaurant-grid, .detail-grid, .detail-hero { grid-template-columns: 1fr; }
  .browse-panel { padding: 20px; }
  .restaurant-grid { margin-top: 32px; }
  .card-image { height: 145px; }
  .breadcrumb { margin-bottom: 42px; }
  .detail-photo { min-height: 330px; }
  .detail-header { padding: 32px 24px 38px; }
  .detail-header h1 { font-size: clamp(2.8rem, 14vw, 4rem); }
  .detail-panel { min-height: 0; padding: 28px 24px; }
  .site-footer { flex-direction: column; gap: 8px; }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { scroll-behavior: auto !important; transition: none !important; }
}

/* Private account overview and activity history. */
.account-page { margin: 0 auto; max-width: 1100px; padding: 42px 20px 80px; }
.account-heading { margin-bottom: 28px; }
.account-heading h1 { font-size: clamp(2.4rem, 6vw, 4rem); margin: 8px 0; }
.account-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 24px; }
.account-panel { background: var(--paper); border: 1px solid var(--line); border-radius: 20px; padding: clamp(20px, 3vw, 32px); margin-bottom: 24px; min-width: 0; }
.account-panel h2 { margin-top: 0; }
.account-email, .account-activity-copy { overflow-wrap: anywhere; }
.account-count, .account-meta { color: var(--brown-soft); font-size: .9rem; }
.account-count { margin-left: 8px; }
.account-activity { display: flex; align-items: center; flex-wrap: wrap; gap: 16px; padding: 20px 0; border-top: 1px solid var(--line); }
.account-activity h3, .account-activity p { margin: 0 0 6px; }
.account-activity-copy { flex: 1; min-width: 180px; }
.account-thumbnail { width: 96px; height: 96px; object-fit: cover; border-radius: 12px; }
.account-status { display: inline-block; border: 1px solid var(--line); border-radius: 12px; padding: 6px 12px; font-size: .85rem; font-weight: 700; }
.account-pagination { display: flex; flex-wrap: wrap; gap: 18px; align-items: center; margin-top: 16px; }
@media (max-width: 700px) { .account-grid { grid-template-columns: 1fr; gap: 0; } .header-nav { flex-wrap: wrap; gap: 10px; } }

.account-status-pending { color: #a51b12; background: #fff0ed; border: 2px solid #b42318; font-weight: 800; }

/* Custom artwork is reserved for establishment averages. */
.establishment-rating { display: flex; flex-wrap: wrap; align-items: center; gap: 8px 16px; margin: 16px 0; }
.establishment-rating p { margin: 0; }
.rating-thumbs { display: inline-flex; flex: 0 0 auto; gap: 2px; align-items: center; }
.rating-thumbs img { display: block; width: 40px; height: 40px; object-fit: contain; }
.rating-label { font-weight: 500; }
@media (max-width: 480px) { .rating-thumbs img { width: 34px; height: 34px; } }

/* Saved places: controls sit outside each restaurant card's navigation link. */
.restaurant-card { display: flex; flex-direction: column; }
.restaurant-card .card-link { height: auto; flex: 1; }
.card-save { padding: 0 22px 22px; }
.save-place-form { margin: 0; }
.save-place-button { display: inline-block; border: 1px solid var(--terracotta); border-radius: 999px; padding: 11px 17px; min-height: 44px; background: var(--paper, #fff); color: var(--brown); font: inherit; font-size: .85rem; font-weight: 700; cursor: pointer; text-decoration: none; }
.save-place-button:hover { background: var(--cream); }
.save-place-button:focus-visible { outline: 3px solid var(--terracotta); outline-offset: 3px; }
.save-place-button.is-saved { background: var(--cream); border-color: var(--sage); }
.detail-save { margin-top: 18px; }
.saved-places-page .restaurant-grid { margin-bottom: 24px; }
.unavailable-place { padding: 22px; }
.unavailable-place h2 { font-size: 1.25rem; }
