:root {
  --bg: #ffffff;
  --fg: #1a1a1a;
  --muted: #6b7280;
  --line: #e5e7eb;
  --accent: #2563eb;
  --accent-fg: #ffffff;
  --card: #f9fafb;
  --error: #b91c1c;
}
@media (prefers-color-scheme: dark) {
  :root {
    --bg: #0f1115;
    --fg: #e5e7eb;
    --muted: #9aa4b2;
    --line: #232833;
    --accent: #3b82f6;
    --card: #161a21;
    --error: #f87171;
  }
}
* {
  box-sizing: border-box;
}
body {
  margin: 0;
  font:
    16px/1.5 system-ui,
    -apple-system,
    Segoe UI,
    Roboto,
    sans-serif;
  background: var(--bg);
  color: var(--fg);
}
.topbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 14px 20px;
  border-bottom: 1px solid var(--line);
  position: sticky;
  top: 0;
  background: var(--bg);
}
.brand {
  font-weight: 700;
  font-size: 1.2rem;
}
.topbar-actions {
  display: flex;
  gap: 8px;
}
.cart-btn {
  border: 1px solid var(--line);
  background: var(--card);
  color: var(--fg);
  border-radius: 999px;
  padding: 8px 14px;
  cursor: pointer;
}
.container {
  max-width: 900px;
  margin: 0 auto;
  padding: 20px;
}
.muted {
  color: var(--muted);
}
.error {
  color: var(--error);
}
.banner {
  background: var(--accent);
  color: var(--accent-fg);
  padding: 10px 14px;
  border-radius: 10px;
  margin-bottom: 12px;
}
.about {
  color: var(--muted);
  margin-bottom: 8px;
}
.rating {
  font-weight: 600;
  margin: 6px 0 18px;
}
h2 {
  margin: 26px 0 12px;
  font-size: 1.25rem;
}
.search {
  width: 100%;
  border: 1px solid var(--line);
  border-radius: 10px;
  padding: 10px 14px;
  margin: 6px 0 4px;
  background: var(--bg);
  color: var(--fg);
  font: inherit;
}
.search:focus {
  outline: 2px solid var(--accent);
  outline-offset: 1px;
}
.grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
  gap: 14px;
}
.card {
  border: 1px solid var(--line);
  background: var(--card);
  border-radius: 12px;
  padding: 14px;
  display: flex;
  flex-direction: column;
  gap: 6px;
}
.card-name {
  font-weight: 600;
}
.card-desc {
  color: var(--muted);
  font-size: 0.9rem;
  flex: 1;
}
.card-foot {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-top: 6px;
}
.card-actions {
  display: flex;
  align-items: center;
  gap: 6px;
}
.wish-toggle {
  border: 1px solid var(--line);
  background: var(--bg);
  color: var(--muted);
  border-radius: 8px;
  padding: 7px 10px;
  cursor: pointer;
  line-height: 1;
}
.wish-toggle.on {
  color: #e0245e;
  border-color: #e0245e;
}
.badge-pill {
  display: block;
  padding: 8px 0;
}
.btn {
  border: 1px solid var(--line);
  background: var(--bg);
  color: var(--fg);
  border-radius: 8px;
  padding: 7px 14px;
  cursor: pointer;
}
.btn.primary {
  background: var(--accent);
  color: var(--accent-fg);
  border-color: var(--accent);
  width: 100%;
  margin-top: 12px;
}
.review {
  border-top: 1px solid var(--line);
  padding: 10px 0;
}
.stars {
  color: #f59e0b;
}
.cart-dialog {
  border: 1px solid var(--line);
  border-radius: 14px;
  max-width: 420px;
  width: calc(100% - 32px);
  color: var(--fg);
  background: var(--bg);
  padding: 0;
}
.cart-dialog::backdrop {
  background: rgba(0, 0, 0, 0.4);
}
.cart-head {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 14px 16px;
  border-bottom: 1px solid var(--line);
}
#cart-body,
#wish-body {
  padding: 16px;
}
.booking-dialog {
  max-width: 460px;
  max-height: 92vh;
}
#booking-body {
  padding: 16px;
  max-height: 80vh;
  overflow-y: auto;
}
.booking-form {
  display: flex;
  flex-direction: column;
  gap: 12px;
}
.bk-field {
  display: flex;
  flex-direction: column;
  gap: 4px;
}
.bk-label {
  font-size: 0.85rem;
  font-weight: 600;
  color: var(--muted);
}
.booking-form .search {
  margin: 0;
}
.bk-slot-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(92px, 1fr));
  gap: 8px;
}
.bk-slot {
  border: 1px solid var(--line);
  background: var(--bg);
  color: var(--fg);
  border-radius: 8px;
  padding: 8px 6px;
  cursor: pointer;
  font: inherit;
}
.bk-slot:hover {
  border-color: var(--accent);
}
.bk-slot.sel {
  background: var(--accent);
  color: var(--accent-fg);
  border-color: var(--accent);
}
#giftcard-body {
  padding: 16px;
}
.gc-result {
  margin-top: 4px;
}
.gc-balance {
  font-size: 1.8rem;
  font-weight: 700;
}
.gc-link {
  display: inline-block;
  margin-bottom: 8px;
  text-decoration: underline;
}
.cart-line {
  display: flex;
  justify-content: space-between;
  padding: 6px 0;
}
.cart-total {
  display: flex;
  justify-content: space-between;
  font-weight: 700;
  border-top: 1px solid var(--line);
  margin-top: 8px;
  padding-top: 10px;
}
.link {
  background: none;
  border: none;
  color: var(--muted);
  cursor: pointer;
  font-size: 1rem;
}
.review-form {
  display: flex;
  flex-direction: column;
  gap: 10px;
  max-width: 480px;
}
.star-pick .star {
  font-size: 1.8rem;
  cursor: pointer;
  color: #f59e0b;
}
.ta {
  width: 100%;
  min-height: 100px;
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 10px;
  background: var(--bg);
  color: var(--fg);
  font: inherit;
}
#payment-element {
  margin: 8px 0;
}
.pagenav {
  display: flex;
  gap: 14px;
  flex-wrap: wrap;
  margin-bottom: 14px;
}
.pagenav a,
.back {
  color: var(--accent);
  text-decoration: none;
}
.back {
  display: inline-block;
  margin-bottom: 10px;
}
.page-body {
  white-space: pre-wrap;
  line-height: 1.7;
}
.foot {
  border-top: 1px solid var(--line);
  padding: 20px;
  text-align: center;
}

/* ── Keyboard focus ───────────────────────────────────────────────────────────────────────────────
   Exactly ONE :focus rule existed here (.search), and several controls override the browser default,
   so a keyboard user could not see where they were on any button, cart control, booking slot, dialog
   close or star. :focus-visible so a mouse click does not leave a ring behind, with a :focus
   fallback for browsers that lack it. WCAG 2.4.7. */
.btn:focus-visible,
.cart-btn:focus-visible,
.link:focus-visible,
.bk-slot:focus-visible,
.wish-toggle:focus-visible,
.star-pick .star:focus-visible,
a:focus-visible,
button:focus-visible,
select:focus-visible,
textarea:focus-visible,
input:focus-visible,
[tabindex]:focus-visible {
  outline: 3px solid var(--accent, #4f46e5);
  outline-offset: 2px;
  border-radius: 6px;
}
/* Older engines: no :focus-visible support means fall back to :focus rather than nothing at all. */
@supports not selector(:focus-visible) {
  .btn:focus,
  .cart-btn:focus,
  .link:focus,
  .bk-slot:focus,
  .wish-toggle:focus,
  a:focus,
  button:focus,
  select:focus,
  textarea:focus,
  input:focus {
    outline: 3px solid var(--accent, #4f46e5);
    outline-offset: 2px;
  }
}

/* Tap targets: 34px controls on a phone are below the 44px guidance (2.5.5). The dialog close was a
   zero-padding .link at roughly 16px — the hardest control on the page to hit and the one every
   customer needs. */
.link {
  min-width: 44px;
  min-height: 44px;
  padding: 6px 10px;
}
.btn,
.cart-btn,
.wish-toggle {
  min-height: 44px;
}
.star-pick .star {
  min-width: 44px;
  min-height: 44px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
}

/* The rating stars are real <button>s now (they were spans with onclick, i.e. mouse-only), so the
   default button chrome has to come off or five grey boxes appear where the stars were. */
.star-pick .star {
  background: none;
  border: 0;
  padding: 0;
  font: inherit;
  color: inherit;
  cursor: pointer;
  line-height: 1;
}

/* ── Checkout form ────────────────────────────────────────────────────────────────────────────────
   Replaces three native prompt()/confirm() dialogs. Everything here is a real labelled control so it
   can be read, filled and corrected — including on a phone, where the old flow gave a QWERTY
   keyboard for a phone number and died outright if the browser suppressed dialogs. */
.co-form {
  display: grid;
  gap: 14px;
}
.co-h {
  margin: 0;
  font-size: 1.05rem;
}
.co-field {
  display: grid;
  gap: 5px;
  font-size: 0.92rem;
  font-weight: 600;
}
.co-field input {
  font: inherit;
  font-weight: 400;
  padding: 11px 12px;
  min-height: 44px;
  border: 1px solid var(--line);
  border-radius: 10px;
  width: 100%;
}
.co-note {
  margin: -6px 0 0;
  font-size: 0.82rem;
}
.co-group {
  border: 1px solid var(--line);
  border-radius: 12px;
  padding: 12px 14px;
  margin: 0;
  display: grid;
  gap: 8px;
}
.co-group legend {
  font-size: 0.92rem;
  font-weight: 600;
  padding: 0 6px;
}
/* The whole row is the target, not just the 13px radio dot. */
.co-radio {
  display: flex;
  align-items: center;
  gap: 10px;
  min-height: 44px;
  cursor: pointer;
}
.co-radio input {
  width: 20px;
  height: 20px;
}
.co-err {
  margin: 0;
  color: var(--danger, #b91c1c);
  font-size: 0.9rem;
  min-height: 1.2em;
}
.co-actions {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
}
