  :root {
    color-scheme: light;
    --bg: #fff8ee; --card: #ffffff; --ink: #3a2e2a; --muted: #7d6d64; --line: #f1e3d3;
    --coral: #ff6b5b; --sun: #ffc23d; --sky: #4cb7f0; --pink: #ff8fc1; --mint: #3fc28a; --grape: #9b7bea;
    --head: "Fredoka", "Nunito", system-ui, sans-serif;
  }
  * { box-sizing: border-box; }
  body {
    margin: 0; color: var(--ink); background-color: var(--bg);
    background-image:
      radial-gradient(circle at 12% 30%, #ffd9cf 0 3px, transparent 4px),
      radial-gradient(circle at 82% 18%, #cdeafb 0 3px, transparent 4px),
      radial-gradient(circle at 60% 72%, #ffe9b0 0 3px, transparent 4px),
      radial-gradient(circle at 30% 85%, #d6f3e5 0 3px, transparent 4px);
    background-size: 220px 220px;
    font: 17px/1.55 "Nunito", system-ui, -apple-system, "Segoe UI", sans-serif;
  }
  .wrap { max-width: 1100px; margin: 0 auto; padding-inline: 16px; }

  .bunting { display: block; width: 100%; height: 56px; }

  header { text-align: center; padding-block: 8px 28px; }
  .brand { margin: 0; display: inline-flex; flex-wrap: wrap; justify-content: center; align-items: center; gap: 0 0.28em;
    font-family: var(--head); font-weight: 700; font-size: clamp(2.6rem, 9vw, 4.8rem); line-height: 1.05; letter-spacing: -0.01em; }
  .bday, .srt { display: inline-flex; align-items: baseline; white-space: nowrap; }
  .l { display: inline-block; color: var(--k); transform: rotate(var(--r)) translateY(var(--y, 0));
    text-shadow: 0 0.06em 0 rgba(90, 50, 20, 0.12); }
  .candle { position: relative; }
  .candle::before { content: ""; position: absolute; left: 50%; top: 0.06em; width: 0.2em; height: 0.3em;
    transform: translateX(-50%); border-radius: 50% 50% 50% 50% / 62% 62% 38% 38%;
    background: radial-gradient(circle at 50% 72%, #fff6b0 0 22%, #ffb11b 48%, #ff6b2b 80%);
    animation: flicker 1.4s ease-in-out infinite alternate; transform-origin: 50% 100%; }
  @keyframes flicker { from { transform: translateX(-50%) rotate(-5deg) scaleY(0.92); } to { transform: translateX(-50%) rotate(5deg) scaleY(1.06); } }
  @media (prefers-reduced-motion: reduce) { .candle::before { animation: none; } }
  .srt { color: #2f7fc4; text-shadow: 0 0.06em 0 #d8eefb; }
  .tick { display: inline-block; width: 0.62em; height: 0.62em; margin-left: 0.18em; flex: none; align-self: center;
    transform: rotate(-10deg) translateY(-0.04em); filter: drop-shadow(0 0.05em 0 #bfead5); }
  .tagline { font-family: var(--head); font-weight: 500; font-size: clamp(1.15rem, 3vw, 1.5rem); color: var(--ink);
    margin: 14px 0 26px; }
  .tagline em { font-style: normal; background: linear-gradient(transparent 60%, #ffe08a 60%); padding: 0 4px; }
  h1 { font-family: var(--head); font-weight: 600; font-size: clamp(1.4rem, 3.6vw, 2rem); line-height: 1.15;
    margin: 0 auto 10px; max-width: 30ch; text-wrap: balance; }
  h1 .hl { background: linear-gradient(transparent 62%, #ffe08a 62%); padding: 0 4px; }
  .lede { margin: 0 auto; max-width: 38rem; color: var(--muted); font-size: 1.05rem; }

  .controls { display: flex; flex-direction: column; align-items: center; gap: 12px; padding-bottom: 8px; }
  .chips { display: flex; flex-wrap: wrap; justify-content: center; gap: 10px; }
  .chip { font: 600 0.98rem var(--head); border: 2px solid var(--c, var(--coral)); color: var(--ink); background: #fff;
    border-radius: 999px; padding: 8px 18px; cursor: pointer; transition: transform .12s; }
  .chip:hover { transform: translateY(-2px); }
  .chip[aria-pressed="true"] { background: var(--c, var(--coral)); color: #fff; }
  .opts { display: flex; flex-wrap: wrap; justify-content: center; gap: 16px; color: var(--muted); font-size: 0.95rem; }
  .opts select { font: inherit; border: 2px solid var(--line); border-radius: 10px; padding: 4px 8px; background: #fff; color: var(--ink); }
  .opts input { accent-color: var(--coral); }
  .filter { position: relative; }
  .filter summary { list-style: none; display: inline-flex; align-items: center; gap: 6px; cursor: pointer;
    font: 600 0.95rem var(--head); color: var(--ink); background: #fff; border: 2px solid var(--line); border-radius: 10px; padding: 4px 12px; }
  .filter summary::-webkit-details-marker { display: none; }
  .filter summary svg { width: 18px; height: 18px; }
  .filter[open] summary { border-color: var(--grape); }
  .filter .dot { width: 8px; height: 8px; border-radius: 50%; background: var(--coral); }
  .fpanel { position: absolute; z-index: 5; top: calc(100% + 8px); right: 0; background: #fff; border-radius: 14px;
    padding: 14px 16px; box-shadow: 0 10px 30px rgba(60, 30, 10, .18); white-space: nowrap; }
  header { position: relative; }
  .forvenues { position: absolute; top: -6px; right: 16px; font-size: 0.85rem; color: var(--muted); text-decoration: none;
    background: #fff; border-radius: 999px; padding: 4px 12px; box-shadow: 0 2px 0 var(--line); }
  .forvenues strong { color: var(--mint); }
  @media (max-width: 600px) { .forvenues { position: static; display: inline-block; margin-bottom: 10px; } }
  .pc { display: inline-flex; gap: 6px; margin: 0; }
  .pc input { font: inherit; border: 2px solid var(--line); border-radius: 10px; padding: 4px 10px; background: #fff; color: var(--ink); width: 9.5em; }
  .pc button { font: 600 0.95rem var(--head); border: 0; border-radius: 10px; padding: 4px 12px; background: var(--sky); color: #fff; cursor: pointer; }
  .pcmsg { flex-basis: 100%; text-align: center; font-size: 0.88rem; color: #c0392b; }

  main { padding-block: 12px 56px; }
  .results { margin: 0 0 22px; text-align: center; font-family: var(--head); font-weight: 600; font-size: 1.15rem; }
  .results small { display: block; font: 600 0.85rem "Nunito", sans-serif; color: var(--muted); margin-top: 2px; }
  .grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(290px, 1fr)); gap: 26px; }
  .card { position: relative; background: var(--card); border-radius: 22px; padding: 0; box-shadow: 0 6px 0 var(--line), 0 10px 24px rgba(120, 80, 40, .07);
    display: flex; flex-direction: column; gap: 12px; }
  .badge { position: absolute; top: 12px; right: 12px; z-index: 1; transform: rotate(4deg); background: var(--sun); color: var(--ink);
    font: 700 1.25rem var(--head); padding: 8px 14px; border-radius: 14px; box-shadow: 0 3px 0 rgba(0,0,0,.08); text-align: center; line-height: 1.1; }
  .badge small { display: block; font: 600 0.68rem "Nunito", sans-serif; opacity: .8; }
  .badge small.from { margin-bottom: -2px; }
  .badge.ask { background: #fff; border: 2px dashed var(--muted); font-size: 0.95rem; }
  .card h2 { font: 600 1.3rem/1.2 var(--head); margin: 4px 0 0; }
  .card { gap: 0; }
  .body { flex: 1; display: flex; flex-direction: column; gap: 10px; padding: 14px 20px 18px; }
  .teaser { margin: 0; font-size: 1.02rem; color: var(--ink); max-width: 40ch; }
  .hl-list { list-style: none; margin: 0; padding: 0; display: flex; flex-wrap: wrap; gap: 8px; }
  .hl-list li { background: #fff; border: 2px solid #f6deb0; border-radius: 999px; padding: 3px 12px 3px 8px;
    font-size: 0.88rem; font-weight: 700; }
  .hl-list li::before { content: "✓"; display: inline-grid; place-items: center; width: 18px; height: 18px; margin-right: 6px;
    border-radius: 50%; background: var(--mint); color: #fff; font-size: 0.7rem; }
  .cover { position: relative; margin: 0; aspect-ratio: 16 / 9; border-radius: 22px 22px 0 0; overflow: hidden;
    background-color: var(--soft);
    background-image: radial-gradient(circle, color-mix(in srgb, var(--c) 28%, transparent) 2.5px, transparent 3px);
    background-size: 22px 22px; display: grid; place-items: center; border-bottom: 6px solid var(--c); }
  .cover .poster { position: absolute; left: 16px; bottom: 14px; max-width: 58%; text-align: left;
    font: 700 clamp(1.35rem, 2.3vw, 1.75rem)/1.08 var(--head); color: var(--c); text-wrap: balance;
    text-shadow: 0 3px 0 #fff, 0 -2px 0 #fff, 2px 0 0 #fff, -2px 0 0 #fff; }
  .cover .icon { font-size: 3.4rem; letter-spacing: 0.08em; filter: drop-shadow(0 4px 0 rgba(0,0,0,.06)); transform: rotate(-6deg); }
  .cover img { width: 100%; height: 100%; object-fit: cover; display: block; }
  .featured { position: absolute; top: 14px; left: 0; z-index: 1; background: var(--coral); color: #fff;
    font: 700 0.85rem var(--head); padding: 5px 14px 5px 12px; border-radius: 4px 999px 999px 4px;
    box-shadow: 0 3px 0 rgba(0,0,0,.12); letter-spacing: 0.02em; }
  .card.is-featured { background: #fffbea; box-shadow: 0 0 0 4px var(--sun), 0 8px 0 #f6deb0, 0 14px 30px rgba(200, 140, 20, .18); }
  .card.is-featured h2 { font-size: 1.6rem; }
  @media (min-width: 700px) {
    .card.is-featured { grid-column: 1 / -1; flex-direction: row; align-items: flex-start; min-height: 300px; }
    .card.is-featured .cover { flex: 0 0 46%; height: 300px; aspect-ratio: auto; border-radius: 22px 0 0 22px;
      border-bottom: 0; border-right: 6px solid var(--sun); }
    .card.is-featured .body { padding: 26px 28px 22px; min-height: 300px; justify-content: center; }
  }
  .area { color: var(--muted); font-size: 0.92rem; }
  .tags { display: flex; flex-wrap: wrap; gap: 6px; }
  .tag { font-size: 0.82rem; font-weight: 700; padding: 3px 10px; border-radius: 999px; background: var(--soft); color: var(--ink); }
  .actions { margin-top: auto; display: flex; justify-content: space-between; align-items: center; gap: 8px;
    border-top: 2px dotted var(--line); padding-top: 12px; }
  .more { font: 600 0.95rem var(--head); color: var(--c); background: none; border: 0; padding: 4px 0; cursor: pointer; }
  .more::after { content: " →"; }
  .web { font-family: var(--head); font-weight: 600; font-size: 0.92rem; text-decoration: none;
    color: var(--ink); background: var(--soft); padding: 4px 12px; border-radius: 999px; }
  a { color: #d9452f; }
  dialog.sheet { border: 0; padding: 0; border-radius: 24px; width: min(560px, calc(100vw - 32px)); max-height: 85vh;
    background: #fff; color: var(--ink); box-shadow: 0 20px 60px rgba(60, 30, 10, .25); }
  dialog.sheet::backdrop { background: rgba(58, 46, 42, .45); }
  .sheet-head { position: sticky; top: 0; background: var(--soft); padding: 20px 56px 16px 22px; border-bottom: 6px solid var(--c); }
  .sheet-head h3 { font: 600 1.5rem/1.2 var(--head); margin: 0 0 4px; }
  .sheet-head .area { margin: 0; }
  .x { position: absolute; top: 14px; right: 14px; width: 36px; height: 36px; border-radius: 50%; border: 0; background: #fff;
    font-size: 1.3rem; line-height: 1; cursor: pointer; color: var(--ink); }
  .sheet-body { padding: 18px 22px 24px; overflow-y: auto; }
  .sheet-body h4 { font: 600 1.05rem var(--head); margin: 18px 0 8px; }
  .facts { display: flex; flex-wrap: wrap; gap: 8px; }
  .fact { background: var(--soft); border-radius: 999px; padding: 4px 12px; font-size: 0.9rem; font-weight: 600; }
  .prices, .checks { list-style: none; margin: 0; padding: 0; }
  .prices li { display: flex; justify-content: space-between; gap: 16px; padding: 8px 0; border-bottom: 1px dashed var(--line); }
  .prices li:last-child { border-bottom: 0; }
  .prices b { text-align: right; white-space: normal; font-weight: 700; }
  .checks li { position: relative; padding: 3px 0 3px 28px; }
  .checks li::before { content: "✓"; position: absolute; left: 0; top: 3px; width: 20px; height: 20px; border-radius: 50%;
    background: var(--c); color: #fff; font-size: 0.75rem; display: grid; place-items: center; font-weight: 700; }
  .tip { margin: 0; background: #fff6dc; border-radius: 12px; padding: 10px 14px 10px 32px; font-size: 0.95rem; }
  .tip li { padding: 2px 0; }
  .muted { color: var(--muted); margin: 0; }
  .claim { margin-top: 20px; padding-top: 14px; border-top: 2px dotted var(--line); font-size: 0.9rem; color: var(--muted); }
  .claim strong { color: var(--ink); }
  .claim a { color: #d9452f; font-weight: 700; }
  .sheet-body dt { font-weight: 700; font-size: 0.78rem; color: var(--muted); text-transform: uppercase; letter-spacing: .04em; }
  .sheet-body dd { margin: 2px 0 14px; overflow-wrap: anywhere; }
  .sheet-body dd a { font-weight: 700; }
  .sheet-cta { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 22px; }
  .sheet-cta a { font: 600 0.95rem var(--head); text-decoration: none; padding: 8px 16px; border-radius: 999px;
    background: var(--soft); color: var(--ink); overflow-wrap: anywhere; }
  .sheet-cta a.primary { background: var(--c); color: #fff; }
  @media (max-width: 600px) {
    dialog.sheet { width: 100vw; max-width: 100vw; margin: auto 0 0; border-radius: 24px 24px 0 0; max-height: 88vh;
      padding-bottom: env(safe-area-inset-bottom, 0px); }
  }
  .right { display: inline-flex; gap: 8px; align-items: center; }
  .cmp { font: 600 0.88rem var(--head); border: 2px solid var(--line); background: #fff; color: var(--ink);
    border-radius: 999px; padding: 3px 11px; cursor: pointer; }
  .cmp[aria-pressed="true"] { background: var(--grape); border-color: var(--grape); color: #fff; }
  .cmp:disabled { opacity: .45; cursor: not-allowed; }
  .card:has(.cmp[aria-pressed="true"]) { outline: 3px solid var(--grape); outline-offset: 3px; }

  .tray { position: fixed; left: 0; right: 0; bottom: 0; z-index: 10; padding: 0 12px calc(12px + env(safe-area-inset-bottom, 0px)); }
  .tray-in { max-width: 900px; margin: 0 auto; background: #fff; border-radius: 18px; padding: 10px 12px;
    box-shadow: 0 10px 40px rgba(60, 30, 10, .25); border: 3px solid var(--grape);
    display: flex; flex-wrap: wrap; align-items: center; gap: 10px; }
  .tray-picks { flex: 1; display: flex; flex-wrap: wrap; gap: 6px; min-width: 0; }
  .pick { display: inline-flex; align-items: center; gap: 6px; background: #f1ebff; border-radius: 999px; padding: 4px 6px 4px 12px;
    font-weight: 700; font-size: 0.9rem; }
  .pick button { border: 0; background: #fff; border-radius: 50%; width: 22px; height: 22px; cursor: pointer; line-height: 1; }
  .slot { border: 2px dashed var(--line); border-radius: 999px; padding: 3px 12px; color: var(--muted); font-size: 0.85rem; }
  .tray-btns { display: flex; gap: 8px; }
  .tray-clear { font: 600 0.9rem var(--head); background: none; border: 0; color: var(--muted); cursor: pointer; }
  .tray-go { font: 600 1rem var(--head); background: var(--grape); color: #fff; border: 0; border-radius: 999px; padding: 8px 18px; cursor: pointer; }
  .tray-go:disabled { opacity: .5; cursor: not-allowed; }
  body:has(.tray:not([hidden])) main { padding-bottom: 120px; }

  dialog.sheet.wide { width: min(980px, calc(100vw - 32px)); --c: var(--grape); --soft: #f1ebff; }
  .ctable-wrap { overflow-x: auto; }
  .ctable { border-collapse: separate; border-spacing: 0; width: 100%; min-width: 560px; font-size: 0.93rem; }
  .ctable th, .ctable td { text-align: left; vertical-align: top; padding: 10px 12px; border-bottom: 1px dashed var(--line); }
  .ctable thead th { background: var(--colsoft); border-bottom: 5px solid var(--colc); font: 600 1.05rem/1.2 var(--head); }
  .ctable tbody th { position: sticky; left: 0; background: #fff; color: var(--muted); font-size: 0.78rem; text-transform: uppercase;
    letter-spacing: .04em; width: 120px; }
  .ctable td ul { margin: 0; padding-left: 18px; }
  .ctable .big { font: 700 1.2rem var(--head); }
  .win { display: inline-block; margin-left: 6px; background: var(--mint); color: #fff; font: 700 0.72rem var(--head);
    padding: 2px 8px; border-radius: 999px; vertical-align: middle; }
  .ctable a { color: #d9452f; font-weight: 700; }
  .empty { text-align: center; color: var(--muted); padding: 40px 0; }

  .note { margin-top: 40px; background: #fff; border-radius: 22px; padding: 22px; text-align: center;
    border: 3px dashed var(--pink); }
  .note h3 { font: 600 1.25rem var(--head); margin: 0 0 6px; }
  footer { text-align: center; color: var(--muted); font-size: 0.85rem; padding-block: 8px 40px; }

.sr { position: absolute !important; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden;
  clip: rect(0 0 0 0); white-space: nowrap; border: 0; }

.card h2 .vlink { color: inherit; text-decoration: none; }
.card h2 .vlink:hover { text-decoration: underline; }
.vlink { color: #d9452f; font-weight: 700; }
.browse { margin-top: 36px; text-align: center; }
.browse h2 { font: 600 1.3rem var(--head); margin: 0 0 10px; }
.browse .links { display: flex; flex-wrap: wrap; justify-content: center; gap: 8px; margin-bottom: 18px; }
.browse .links a { background: #fff; border-radius: 999px; padding: 6px 14px; text-decoration: none; font-weight: 700;
  color: var(--ink); box-shadow: 0 2px 0 var(--line); }

.prov { margin: 12px 0 0; font-size: 0.85rem; color: var(--muted); background: #f6f1ea; border-radius: 10px; padding: 8px 12px; }

.card { cursor: pointer; transition: transform .15s ease, box-shadow .15s ease; }
.card:hover { transform: translateY(-3px); box-shadow: 0 9px 0 var(--line), 0 16px 30px rgba(120, 80, 40, .12); }
.card.is-featured:hover { box-shadow: 0 0 0 4px var(--sun), 0 11px 0 #f6deb0, 0 18px 36px rgba(200, 140, 20, .22); }
@media (prefers-reduced-motion: reduce) { .card, .card:hover { transition: none; transform: none; } }

.pagelink { display: inline-block; margin-top: 10px; font: 600 0.92rem var(--head); text-decoration: none; color: var(--ink);
  background: #fff; border-radius: 999px; padding: 5px 14px; box-shadow: 0 2px 0 rgba(0,0,0,.06); }
.pagelink:hover { text-decoration: underline; }

/* Dialogs: keep content inside the panel and scroll it there (fixes overflow on phones). */
dialog.sheet[open] { display: flex; flex-direction: column; overflow: hidden; }
dialog.sheet .sheet-head { flex: none; }
dialog.sheet .sheet-body { flex: 1 1 auto; min-height: 0; overflow-y: auto; -webkit-overflow-scrolling: touch; }
.sheet-head h3:focus { outline: none; }
.prices li > span { flex: 0 1 45%; }
@media (max-width: 600px) {
  .prices li { flex-direction: column; gap: 2px; }
  .prices li > span { flex: none; color: var(--muted); font-size: 0.9rem; }
  .prices b { text-align: left; }
}

/* Keep the panel header above scrolled content (checklist ticks are positioned elements). */
.sheet-head { position: sticky; top: 0; z-index: 3; }
.sheet-head h3:focus, .sheet-head h3:focus-visible { outline: none; }

/* While a panel is open the page behind is frozen (see lockScroll in index), and swipes never pass through. */
body.locked { position: fixed; left: 0; right: 0; overflow: hidden; }
dialog.sheet, dialog.sheet .sheet-body { overscroll-behavior: contain; }

/* Phones: a proper bottom sheet that fits the *visible* screen (dvh excludes Safari's toolbars). */
@media (max-width: 600px) {
  dialog.sheet { max-height: 85vh; max-height: 85dvh; margin: auto 0 0; }
  dialog.sheet .sheet-head { padding-top: 26px; }
  dialog.sheet .sheet-head::before { content: ""; position: absolute; top: 9px; left: 50%; width: 42px; height: 5px;
    margin-left: -21px; border-radius: 3px; background: rgba(58, 46, 42, .25); }
  dialog.sheet .x { top: 18px; }
}

/* Comparison on phones: one section per topic, venues stacked and colour-coded. */
.cstack { display: none; }
@media (max-width: 600px) {
  .ctable { display: none; }
  .ctable-wrap { overflow-x: visible; }
  .cstack { display: block; }
  .cstack section { padding: 12px 0 14px; border-bottom: 1px dashed var(--line); }
  .cstack section:last-child { border-bottom: 0; }
  .cstack h5 { margin: 0 0 8px; font: 700 0.78rem "Nunito", sans-serif; color: var(--muted); text-transform: uppercase; letter-spacing: .05em; }
  .cv { border-left: 5px solid var(--colc); padding: 4px 0 4px 10px; margin-bottom: 8px; }
  .cv > b { display: block; font: 600 0.92rem var(--head); margin-bottom: 2px; }
  .cv ul { margin: 0; padding-left: 18px; }
  .cv .big { font: 700 1.15rem var(--head); }
}

/* Phones: centred floating card (gaps on all sides) instead of a bottom sheet. */
@media (max-width: 600px) {
  dialog.sheet, dialog.sheet.wide { width: calc(100vw - 24px); max-width: calc(100vw - 24px); margin: auto;
    border-radius: 22px; max-height: 85vh; max-height: 85dvh; padding-bottom: 0; }
  dialog.sheet .sheet-head { padding-top: 18px; }
  dialog.sheet .sheet-head::before { display: none; }
  dialog.sheet .x { top: 12px; }
}
