
:root {
  --bg: #f4f0e8;
  --ink: #151515;
  --muted: #6d675e;
  --card: #fffdf8;
  --line: #d8d0c4;
  --accent: #d94833;
  --accent-dark: #b93424;
  --shadow: 0 24px 80px rgba(35, 26, 16, .12);
}

* { box-sizing: border-box; }

html { color-scheme: light; }

body {
  margin: 0;
  min-height: 100vh;
  color: var(--ink);
  background:
    radial-gradient(circle at 12% 8%, rgba(217,72,51,.08), transparent 28rem),
    radial-gradient(circle at 88% 42%, rgba(39,101,80,.08), transparent 34rem),
    var(--bg);
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}

button, select, a { -webkit-tap-highlight-color: transparent; }

.shell {
  width: min(760px, calc(100% - 28px));
  margin: 0 auto;
  padding: 48px 0 38px;
}

.hero { text-align: center; margin-bottom: 30px; }

.eyebrow {
  display: inline-flex;
  align-items: center;
  border: 1px solid var(--ink);
  border-radius: 999px;
  padding: 7px 11px;
  font-size: 11px;
  line-height: 1;
  font-weight: 800;
  letter-spacing: .14em;
}

h1 {
  margin: 18px 0 8px;
  font-family: Georgia, "Times New Roman", serif;
  font-size: clamp(48px, 10vw, 86px);
  line-height: .86;
  letter-spacing: -.055em;
  font-weight: 500;
}

h1 span { color: var(--accent); font-style: italic; }

.hero p {
  margin: 18px 0 0;
  color: var(--muted);
  font-size: 16px;
}

.panel {
  background: rgba(255,253,248,.78);
  backdrop-filter: blur(10px);
  border: 1px solid var(--line);
  border-radius: 20px;
  box-shadow: 0 10px 40px rgba(35,26,16,.05);
}

.filters {
  display: grid;
  grid-template-columns: 1fr 1.35fr .85fr 1.15fr;
  gap: 10px;
  padding: 12px;
}

.field { min-width: 0; }

label {
  display: block;
  margin: 0 0 6px 4px;
  color: var(--muted);
  font-size: 10px;
  font-weight: 800;
  letter-spacing: .08em;
  text-transform: uppercase;
}

select {
  width: 100%;
  height: 46px;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: var(--card);
  color: var(--ink);
  padding: 0 34px 0 12px;
  font: inherit;
  font-size: 14px;
  outline: none;
}

select:focus { border-color: var(--ink); }

.spin {
  width: 100%;
  min-height: 64px;
  margin: 14px 0 0;
  border: 0;
  border-radius: 18px;
  background: var(--ink);
  color: white;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 12px;
  font: inherit;
  font-weight: 850;
  font-size: 17px;
  cursor: pointer;
  box-shadow: 0 14px 34px rgba(21,21,21,.18);
  transition: transform .15s ease, background .15s ease;
}

.spin:hover { transform: translateY(-1px); background: #000; }
.spin:active { transform: translateY(1px) scale(.995); }
.spin:disabled { opacity: .65; cursor: wait; }

.dice { font-size: 25px; line-height: 1; display: inline-block; }
.spin.loading .dice { animation: rotate .7s linear infinite; }
@keyframes rotate { to { transform: rotate(360deg); } }

.status {
  min-height: 26px;
  padding: 11px 6px 0;
  color: var(--muted);
  text-align: center;
  font-size: 13px;
}

.status.error {
  color: #a62c20;
  font-weight: 650;
}

.restaurant-card {
  overflow: hidden;
  margin-top: 10px;
  border-radius: 28px;
  border: 1px solid var(--line);
  background: var(--card);
  box-shadow: var(--shadow);
  animation: reveal .35s ease both;
}

.hidden { display: none !important; }

@keyframes reveal {
  from { opacity: 0; transform: translateY(12px) scale(.99); }
  to { opacity: 1; transform: translateY(0) scale(1); }
}

.photo-wrap {
  position: relative;
  height: clamp(250px, 48vw, 370px);
  background: #ddd5c8;
}

.photo-wrap img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.photo-shade {
  position: absolute;
  inset: 0;
  background: linear-gradient(to bottom, rgba(0,0,0,.08), transparent 55%, rgba(0,0,0,.18));
  pointer-events: none;
}

.top-badges {
  position: absolute;
  top: 14px;
  left: 14px;
  right: 14px;
  display: flex;
  justify-content: space-between;
  align-items: start;
}

.badge {
  min-height: 36px;
  display: inline-flex;
  align-items: center;
  border-radius: 999px;
  padding: 0 12px;
  background: rgba(255,255,255,.94);
  color: var(--ink);
  backdrop-filter: blur(8px);
  font-size: 13px;
  font-weight: 850;
  box-shadow: 0 5px 14px rgba(0,0,0,.12);
}

.rating { background: var(--accent); color: #fff; }

.card-body { padding: 24px; }

.surprise {
  color: var(--accent);
  font-size: 10px;
  font-weight: 900;
  letter-spacing: .16em;
}

h2 {
  margin: 8px 0 7px;
  font-family: Georgia, "Times New Roman", serif;
  font-size: clamp(34px, 7vw, 55px);
  line-height: .96;
  letter-spacing: -.04em;
  font-weight: 500;
}

.categories {
  color: var(--muted);
  font-size: 14px;
  line-height: 1.45;
}

.facts {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 10px;
  margin: 21px 0 18px;
}

.fact {
  border: 1px solid var(--line);
  border-radius: 14px;
  padding: 12px 14px;
  background: #faf6ee;
}

.fact-label {
  display: block;
  color: var(--muted);
  font-size: 10px;
  font-weight: 750;
  letter-spacing: .07em;
  text-transform: uppercase;
}

.fact strong { display: block; margin-top: 3px; font-size: 18px; }

.address {
  padding: 0 2px;
  color: #403d38;
  font-size: 14px;
  line-height: 1.55;
}

.actions {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
  margin-top: 22px;
}

.primary-link, .secondary {
  min-height: 50px;
  border-radius: 13px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font: inherit;
  font-size: 14px;
  font-weight: 850;
  text-decoration: none;
  cursor: pointer;
}

.primary-link {
  background: var(--accent);
  color: #fff;
  border: 1px solid var(--accent);
}

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

.secondary {
  background: transparent;
  color: var(--ink);
  border: 1px solid var(--line);
}

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

footer {
  display: flex;
  flex-direction: column;
  gap: 4px;
  padding: 28px 10px 0;
  text-align: center;
  color: #817a70;
  font-size: 11px;
  line-height: 1.4;
}

@media (max-width: 620px) {
  .shell { width: min(100% - 20px, 760px); padding-top: 30px; }
  .filters { grid-template-columns: 1fr 1fr; }
  .field:nth-child(2) { grid-column: 1 / -1; grid-row: 1; }
  .facts { grid-template-columns: 1fr 1fr; }
  #reservationFact { grid-column: 1 / -1; }
  .spin { min-height: 62px; }
  .card-body { padding: 20px; }
}

@media (max-width: 430px) {
  .actions { grid-template-columns: 1fr; }
  .photo-wrap { height: 280px; }
}
