:root {
  color-scheme: light;
  --paper: #f6f1ea;
  --surface: #fffdf9;
  --surface-strong: #ffffff;
  --ink: #211b17;
  --muted: #74675f;
  --line: #e4d8cb;
  --warm: #a95f2a;
  --warm-dark: #713816;
  --herb: #173f2d;
  --herb-soft: #e7f0e8;
  --gold: #d79522;
  --danger: #a7352a;
  --shadow: 0 18px 44px rgba(57, 37, 22, 0.11);
  --soft-shadow: 0 8px 24px rgba(57, 37, 22, 0.08);
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  min-height: 100vh;
  font-family: Inter, -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Arial, sans-serif;
  background:
    radial-gradient(circle at top left, rgba(215, 149, 34, 0.14), transparent 34rem),
    linear-gradient(135deg, #fffaf3 0%, var(--paper) 46%, #edf3ec 100%);
  color: var(--ink);
}

button,
input,
textarea,
select {
  font: inherit;
}

button {
  border: 0;
  cursor: pointer;
}

input,
textarea,
select,
button {
  letter-spacing: 0;
}

.layout {
  display: grid;
  grid-template-columns: 264px minmax(0, 1fr);
  min-height: 100vh;
}

.side {
  position: sticky;
  top: 0;
  height: 100vh;
  padding: 30px 18px;
  border-right: 1px solid rgba(228, 216, 203, 0.86);
  background: rgba(255, 253, 249, 0.78);
  backdrop-filter: blur(18px);
}

.brand {
  display: flex;
  align-items: center;
  gap: 13px;
  min-height: 72px;
  margin: 0 4px 28px;
}

.logoMark,
.brandLogo {
  width: 58px;
  height: 58px;
  border: 1px solid rgba(255, 255, 255, 0.58);
  border-radius: 8px;
  background: #fffaf3;
  box-shadow: 0 14px 26px rgba(23, 63, 45, 0.22);
}

.logoMark {
  display: grid;
  place-items: center;
  flex: 0 0 58px;
  color: #fffaf3;
  background: var(--herb);
  font-size: 1.15rem;
  font-weight: 950;
}

.brandLogo {
  display: none;
  object-fit: cover;
}

.brandName,
.brandSub {
  font-weight: 900;
  line-height: 1;
}

.brandName {
  font-size: 1.08rem;
}

.brandSub {
  margin-top: 4px;
  color: var(--warm);
  font-size: 1.28rem;
}

.nav {
  display: grid;
  gap: 8px;
}

.nav button,
.settings {
  display: flex;
  align-items: center;
  gap: 12px;
  width: 100%;
  min-height: 48px;
  padding: 12px 14px;
  border-radius: 8px;
  background: transparent;
  color: #66584f;
  font-weight: 800;
  text-align: left;
}

.nav button:hover,
.settings:hover {
  background: rgba(23, 63, 45, 0.06);
}

.nav button.active {
  color: white;
  background: var(--herb);
  box-shadow: 0 12px 24px rgba(23, 63, 45, 0.2);
}

.settings {
  position: absolute;
  right: 18px;
  bottom: 24px;
  left: 18px;
  width: auto;
}

.main {
  width: min(100%, 1120px);
  padding: 38px 42px 72px;
}

.top {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 20px;
  margin-bottom: 16px;
}

.eyebrow {
  color: var(--warm-dark);
  font-size: 0.78rem;
  font-weight: 900;
  letter-spacing: 0;
  text-transform: uppercase;
}

.title {
  margin: 6px 0 0;
  font-size: clamp(2rem, 4vw, 3.2rem);
  line-height: 1;
  letter-spacing: 0;
}

.near,
.save {
  min-height: 46px;
  border-radius: 8px;
  padding: 12px 18px;
  color: #fff;
  background: var(--herb);
  box-shadow: var(--soft-shadow);
  font-weight: 900;
}

.near {
  color: var(--herb);
  background: var(--surface-strong);
}

.search {
  width: 100%;
  padding: 18px 20px;
  border: 1px solid var(--line);
  border-radius: 8px;
  outline: none;
  background: rgba(255, 255, 255, 0.92);
  box-shadow: inset 0 1px 2px rgba(33, 27, 23, 0.04);
  font-size: 1.05rem;
}

.search:focus,
.form input:focus,
.form textarea:focus,
.form select:focus {
  border-color: rgba(23, 63, 45, 0.58);
  box-shadow: 0 0 0 4px rgba(23, 63, 45, 0.1);
}

.chips {
  display: flex;
  gap: 10px;
  overflow: auto;
  padding: 16px 0 20px;
}

.mealChips {
  padding-top: 0;
}

.searchHint {
  margin: -8px 0 18px;
  font-weight: 750;
}

.chip,
.pill {
  min-height: 40px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--surface-strong);
  color: #4a4039;
  font-weight: 850;
}

.chip {
  flex: 0 0 auto;
  padding: 10px 18px;
}

.chip.active {
  border-color: var(--warm);
  color: white;
  background: var(--warm);
}

.findNearby {
  border-color: var(--herb);
  color: #fff;
  background: var(--herb);
}

.cards {
  display: grid;
  gap: 14px;
}

.card {
  display: grid;
  grid-template-columns: 170px minmax(0, 1fr) 38px;
  gap: 18px;
  padding: 14px;
  border: 1px solid rgba(228, 216, 203, 0.9);
  border-radius: 8px;
  background: rgba(255, 253, 249, 0.94);
  box-shadow: var(--soft-shadow);
  transition: transform 160ms ease, box-shadow 160ms ease;
}

.card[data-card-directions] {
  cursor: pointer;
}

.card:hover {
  transform: translateY(-1px);
  box-shadow: var(--shadow);
}

.card[data-card-directions]:active {
  transform: scale(0.995);
}

.photo {
  width: 170px;
  height: 132px;
  object-fit: cover;
  border-radius: 8px;
  background: #eadfd2;
}

.card h2 {
  margin: 2px 0 5px;
  font-size: 1.45rem;
  line-height: 1.12;
  letter-spacing: 0;
}

.meta,
.small {
  color: var(--muted);
}

.address {
  margin: 7px 0 8px;
  color: #57493f;
  font-weight: 700;
}

.rating {
  margin: 8px 0;
  color: var(--gold);
  font-weight: 900;
}

.open {
  color: #24703e;
}

.badge {
  display: inline-block;
  margin: 0 0 9px;
  padding: 5px 9px;
  border-radius: 8px;
  color: var(--warm-dark);
  background: #f5e5cf;
  font-size: 0.88rem;
  font-weight: 850;
}

.lastBox {
  margin-top: 10px;
  padding: 12px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #f8eee1;
}

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

.pill {
  padding: 9px 14px;
}

.details {
  border-color: var(--herb);
  color: #fff;
  background: var(--herb);
}

.star {
  align-self: start;
  color: var(--warm);
  background: transparent;
  font-size: 1.9rem;
}

.panel {
  margin-top: 16px;
  padding: 22px;
  border: 1px solid rgba(228, 216, 203, 0.95);
  border-radius: 8px;
  background: rgba(255, 253, 249, 0.94);
  box-shadow: var(--soft-shadow);
}

.panel h2 {
  margin-top: 0;
  letter-spacing: 0;
}

.form {
  display: grid;
  gap: 12px;
  max-width: 680px;
}

.form input,
.form textarea,
.form select {
  width: 100%;
  padding: 14px 15px;
  border: 1px solid var(--line);
  border-radius: 8px;
  outline: none;
  background: var(--surface-strong);
}

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

.fieldLabel {
  margin-bottom: -4px;
  color: #57493f;
  font-weight: 900;
}

.form input[list] {
  font-size: 1rem;
}

.subPanel {
  display: grid;
  gap: 10px;
  padding: 14px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fbf4ea;
}

.subPanel h3 {
  margin: 0;
}

.guestRow {
  display: grid;
  grid-template-columns: minmax(120px, 0.8fr) minmax(160px, 1.2fr);
  gap: 10px;
}

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

.visit {
  margin-top: 12px;
  padding-top: 12px;
  border-top: 1px solid var(--line);
}

.visit p {
  margin: 9px 0;
}

.ratingBreakdown {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin: 10px 0;
  color: var(--gold);
  font-weight: 900;
}

.ratingBreakdown b {
  color: var(--ink);
}

.photoGrid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(104px, 1fr));
  gap: 8px;
  margin: 12px 0;
}

.photoGrid img {
  width: 100%;
  aspect-ratio: 1;
  object-fit: cover;
  border-radius: 8px;
  background: #eadfd2;
}

.guestList {
  display: grid;
  gap: 8px;
  margin: 12px 0;
}

.guestMeal {
  display: grid;
  grid-template-columns: minmax(90px, 0.7fr) minmax(140px, 1.3fr);
  gap: 10px;
  padding: 9px 10px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fffaf3;
}

.guestMeal span:first-child {
  font-weight: 900;
}

.visitControls {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 12px;
}

.danger {
  border-color: #e8b5ac;
  color: var(--danger);
  background: #fff7f4;
}

.empty,
.notice {
  padding: 18px;
  border: 1px dashed var(--line);
  border-radius: 8px;
  color: var(--muted);
  background: rgba(255, 253, 249, 0.72);
}

.notice {
  border-style: solid;
  color: #57493f;
  background: #f8eee1;
}

.detailPanel h3 {
  margin-top: 22px;
}

.detailPhoto {
  width: min(100%, 560px);
  aspect-ratio: 16 / 9;
  object-fit: cover;
  display: block;
  margin: 14px 0;
  border-radius: 8px;
  background: #eadfd2;
}

.nearPanel {
  margin-bottom: 16px;
}

.nearbyMap {
  display: none;
  width: 100%;
  height: 260px;
  margin: 14px 0;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #eadfd2;
  overflow: hidden;
}

@media (max-width: 860px) {
  .layout {
    display: block;
  }

  .side {
    position: relative;
    height: auto;
    padding: 16px;
    border-right: 0;
    border-bottom: 1px solid var(--line);
  }

  .brand {
    min-height: 54px;
    margin-bottom: 14px;
  }

  .brandLogo {
    width: 48px;
    height: 48px;
  }

  .logoMark {
    flex-basis: 48px;
    width: 48px;
    height: 48px;
  }

  .nav {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }

  .nav button {
    justify-content: center;
    min-height: 44px;
    padding: 10px 8px;
    font-size: 0.84rem;
    text-align: center;
  }

  .settings {
    display: none;
  }

  .main {
    padding: 22px 16px 64px;
  }

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

  .near {
    align-self: flex-start;
  }

  .card {
    grid-template-columns: 98px minmax(0, 1fr) 30px;
    gap: 12px;
  }

  .photo {
    width: 98px;
    height: 98px;
  }

  .card h2 {
    font-size: 1.15rem;
  }

  .pill {
    padding: 8px 10px;
  }

  .guestRow,
  .guestMeal {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 460px) {
  .brandName,
  .brandSub {
    font-size: 1rem;
  }

  .card {
    grid-template-columns: 1fr 30px;
  }

  .photo {
    grid-column: 1 / -1;
    width: 100%;
    height: 150px;
  }
}
