/* hihappyhour — "pau hana" palette: late-afternoon sand by day, after-dusk indigo by night. */
:root {
  --bg: #f6e7d4;
  --bg-2: #f1dcc4;
  --surface: #fffaf3;
  --ink: #2a1633;
  --muted: #74586a;
  --line: rgba(42, 22, 51, 0.13);
  --coral: #e2502f;
  --gold: #f0a12e;
  --rose: #c23a68;
  --night: #3a1f5c;
  --on: #1f8a5b;
  --focus: #1d5fd1;
  --tab-on-bg: #2a1633;
  --tab-on-ink: #fff3e3;
  --shadow: 0 1px 0 rgba(42, 22, 51, 0.06), 0 6px 18px -10px rgba(58, 31, 92, 0.35);
  --sky: linear-gradient(180deg, #ffd27a 0%, #ff9a4d 38%, #ef5b4c 62%, #c23a68 82%, #5b2a72 100%);
  --glow: linear-gradient(90deg, var(--gold), var(--coral) 55%, var(--rose));
  --display: "DM Serif Display", "Iowan Old Style", Georgia, serif;
  --body: "Karla", system-ui, -apple-system, "Segoe UI", sans-serif;
  color-scheme: light;
}
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --bg: #160e28;
    --bg-2: #1d1434;
    --surface: #241a3f;
    --ink: #fbeee0;
    --muted: #bba6c6;
    --line: rgba(251, 238, 224, 0.14);
    --coral: #ff7a59;
    --gold: #ffc061;
    --rose: #ff5d8f;
    --night: #0d0819;
    --on: #5fd6a0;
    --focus: #8fb8ff;
    --tab-on-bg: #fbeee0;
    --tab-on-ink: #1d1434;
    --shadow: 0 1px 0 rgba(0, 0, 0, 0.3), 0 8px 22px -12px rgba(0, 0, 0, 0.8);
    --sky: linear-gradient(180deg, #ff9a4d 0%, #e5534b 30%, #a8326a 55%, #4a2270 78%, #1d1434 100%);
    color-scheme: dark;
  }
}
:root[data-theme="dark"] {
  --bg: #160e28; --bg-2: #1d1434; --surface: #241a3f; --ink: #fbeee0; --muted: #bba6c6;
  --line: rgba(251, 238, 224, 0.14); --coral: #ff7a59; --gold: #ffc061; --rose: #ff5d8f;
  --night: #0d0819; --on: #5fd6a0; --focus: #8fb8ff; --tab-on-bg: #fbeee0; --tab-on-ink: #1d1434;
  --sky: linear-gradient(180deg, #ff9a4d 0%, #e5534b 30%, #a8326a 55%, #4a2270 78%, #1d1434 100%);
  color-scheme: dark;
}

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font: 400 1rem/1.45 var(--body);
  overflow-x: hidden;
}
body.locked { overflow: hidden; }
a { color: inherit; }
img { display: block; max-width: 100%; }
:focus-visible { outline: 3px solid var(--focus); outline-offset: 2px; border-radius: 6px; }

.wrap { max-width: 640px; margin: 0 auto; padding: 0 16px 32px; }

/* ---- masthead: a striped sun sinking into the Pacific ---- */
.top {
  position: relative;
  margin: 0 -16px;
  padding: 22px 20px 18px;
  color: #fff7ec;
  background: var(--sky);
  overflow: hidden;
  border-radius: 0 0 28px 28px;
}
.horizon { position: absolute; inset: 0; pointer-events: none; }
.horizon::after { /* ocean */
  content: ""; position: absolute; left: 0; right: 0; bottom: 0; height: 30%;
  background:
    repeating-linear-gradient(180deg, rgba(255, 255, 255, 0.16) 0 2px, transparent 2px 9px),
    linear-gradient(180deg, rgba(58, 31, 92, 0.25), rgba(29, 20, 52, 0.75));
}
.sun {
  position: absolute; right: -18px; bottom: 22%;
  width: 168px; height: 84px;
  border-radius: 84px 84px 0 0;
  background: linear-gradient(180deg, #fff3b0, #ffc65a 60%, #ff8a3d);
  -webkit-mask: repeating-linear-gradient(180deg, #000 0 10px, transparent 10px 13px);
  mask: repeating-linear-gradient(180deg, #000 0 10px, transparent 10px 13px);
  opacity: 0.92;
}
.brand {
  position: relative; margin: 0;
  font: italic 400 clamp(2.1rem, 9vw, 2.9rem)/1 var(--display);
  letter-spacing: -0.02em;
  text-shadow: 0 2px 14px rgba(90, 30, 80, 0.35);
}
.brand span { font-style: normal; }
.clock {
  position: relative; margin: 10px 0 0;
  display: flex; flex-wrap: wrap; align-items: baseline; gap: 4px 10px;
}
.clock time {
  font: 700 1.2rem/1.2 var(--body);
  font-variant-numeric: tabular-nums;
  background: rgba(29, 20, 52, 0.35);
  padding: 3px 10px; border-radius: 999px;
  backdrop-filter: blur(4px);
}
.tz { font-size: 0.82rem; opacity: 0.9; letter-spacing: 0.04em; text-transform: uppercase; }

/* ---- tabs ---- */
.tabs {
  position: sticky; top: 0; z-index: 5;
  display: grid; grid-template-columns: 1fr 1fr; gap: 4px;
  margin: 14px 0 12px; padding: 4px;
  background: var(--bg-2);
  border: 1px solid var(--line);
  border-radius: 999px;
  box-shadow: 0 6px 14px -12px rgba(0, 0, 0, 0.5);
}
.tab {
  display: block; text-align: center; text-decoration: none;
  padding: 10px 8px; border-radius: 999px;
  font-weight: 700; letter-spacing: 0.01em;
  color: var(--muted);
  transition: background-color 0.2s, color 0.2s;
}
.tab[aria-selected="true"] { background: var(--tab-on-bg); color: var(--tab-on-ink); }
.no-js .tab[aria-selected="true"] { background: none; color: var(--muted); }

/* ---- first paint: the HTML holds no time-dependent content (it would be the deploy time).
   Until app.mjs has rendered Hawaii-time status and added .live, keep these regions hidden
   (space kept, so nothing jumps). Without JS the neutral fallback shows instead. ---- */
.js:not(.live) #clock, .js:not(.live) .panel-body, .js:not(.live) #place-status, .js:not(.live) #ad { visibility: hidden; }
.no-js #clock { display: none; }
.nojs-note { margin: 10px 2px; color: var(--muted); font-size: 0.92rem; }
.status-box .nojs-note { margin: 0; }
.all-places { margin: 6px 0 0; padding-left: 1.2em; }
.all-places li { padding: 4px 0; }
.all-places a { color: var(--ink); font-weight: 700; }

/* ---- ad slot (always reserved, never reorders the list) ---- */
.ad-slot { margin: 0 0 18px; min-height: 76px; }
.ad { display: block; border-radius: 18px; }
.ad-house {
  padding: 14px 16px; text-decoration: none;
  border: 1.5px dashed color-mix(in srgb, var(--coral) 55%, transparent);
  background: color-mix(in srgb, var(--coral) 6%, var(--surface));
}
.ad-house-text { display: block; font: 400 1.02rem/1.3 var(--display); }
.ad-house-cta { display: block; margin-top: 4px; font-size: 0.88rem; color: var(--coral); font-weight: 700; }
.ad-paid { padding: 12px 14px 14px; background: var(--surface); box-shadow: var(--shadow); border: 1px solid var(--line); }
.ad-label { margin: 0 0 8px; font-size: 0.7rem; font-weight: 700; letter-spacing: 0.14em; text-transform: uppercase; color: var(--muted); }
.ad-row { display: flex; gap: 12px; align-items: flex-start; }
.ad-row img { width: 84px; height: 84px; flex: none; object-fit: cover; border-radius: 14px; }
.ad-row > div { min-width: 0; }
.ad-headline { margin: 0; font: 400 1.1rem/1.25 var(--display); overflow-wrap: anywhere; }
.ad-place, .ad-hours { margin: 3px 0 0; font-size: 0.9rem; color: var(--muted); }
.ad-place a { color: var(--ink); font-weight: 700; }
.ad-dir {
  display: inline-block; margin-top: 8px; padding: 6px 12px; border-radius: 999px;
  background: var(--glow); color: #fff; font-weight: 700; font-size: 0.88rem; text-decoration: none;
}

/* ---- panels ---- */
.js .panel:not(.active) { display: none; }
.panel-title { margin: 22px 0 4px; font: 400 1.5rem/1.1 var(--display); }
.js .panel-title { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.group {
  display: flex; align-items: center; gap: 8px;
  margin: 18px 2px 10px;
  font: 700 0.78rem/1 var(--body); letter-spacing: 0.14em; text-transform: uppercase; color: var(--muted);
}
.panel-body > .group:first-child { margin-top: 4px; }
.dot { width: 9px; height: 9px; border-radius: 50%; background: var(--on); box-shadow: 0 0 0 0 var(--on); animation: pulse 2.4s infinite; }
@keyframes pulse { 0% { box-shadow: 0 0 0 0 color-mix(in srgb, var(--on) 60%, transparent); } 70%, 100% { box-shadow: 0 0 0 9px transparent; } }

.list { list-style: none; margin: 0; padding: 0; display: grid; gap: 10px; }
.card {
  display: flex; gap: 12px; align-items: flex-start;
  padding: 12px; border-radius: 18px;
  background: var(--surface); border: 1px solid var(--line); box-shadow: var(--shadow);
}
.card.is-soon { background: color-mix(in srgb, var(--surface) 70%, var(--bg)); box-shadow: none; }
.body { flex: 1; min-width: 0; }

.thumb {
  position: relative; flex: none;
  width: 72px; height: 72px; padding: 0; border: 0; border-radius: 14px; overflow: hidden;
  background: var(--bg-2); cursor: pointer;
}
.thumb img { width: 100%; height: 100%; object-fit: cover; }
.thumb .count {
  position: absolute; right: 4px; bottom: 4px; min-width: 20px; padding: 1px 6px;
  font-size: 0.72rem; font-weight: 700; color: #fff; background: rgba(20, 10, 30, 0.7); border-radius: 999px;
}
.thumb.initials {
  display: grid; place-items: center; cursor: default;
  font: 400 1.45rem/1 var(--display); color: #fff;
  background: linear-gradient(145deg, hsl(var(--h) 70% 58%), hsl(calc(var(--h) + 40) 62% 40%));
}

.name { margin: 0; font: 400 1.14rem/1.2 var(--display); overflow-wrap: anywhere; }
.name a { text-decoration: none; }
.name a:hover { text-decoration: underline; text-underline-offset: 3px; }
.when { margin: 4px 0 0; display: flex; flex-wrap: wrap; gap: 2px 8px; align-items: baseline; font-size: 0.9rem; }
.status { font-weight: 700; color: var(--coral); font-variant-numeric: tabular-nums; }
.is-on .status { color: var(--on); }
.hours { color: var(--muted); overflow-wrap: anywhere; }

.bar { height: 6px; margin: 8px 0 2px; border-radius: 999px; background: var(--line); overflow: hidden; }
.bar span { display: block; height: 100%; border-radius: inherit; background: var(--glow); transition: width 0.6s ease; }

.deals { list-style: none; margin: 8px 0 0; padding: 0; font-size: 0.9rem; }
.deals li { display: flex; gap: 6px; align-items: baseline; padding: 3px 0; border-top: 1px dotted var(--line); }
.deals li:first-child { border-top: 0; }
.deals span { min-width: 0; overflow-wrap: anywhere; }
.deals em { font-style: normal; color: var(--muted); font-size: 0.84rem; }
.deals b { margin-left: auto; padding-left: 8px; font-variant-numeric: tabular-nums; }
.deals .more a { color: var(--coral); font-weight: 700; text-decoration: none; }
.what { margin: 6px 0 0; font-size: 0.92rem; }
.stale {
  display: inline-block; margin: 8px 0 0; padding: 2px 8px; border-radius: 6px;
  font-size: 0.78rem; font-weight: 700; color: var(--muted); background: var(--bg-2);
}

.next {
  margin-top: 6px; padding: 16px 14px 14px; border-radius: 22px;
  background: linear-gradient(160deg, color-mix(in srgb, var(--night) 92%, transparent), var(--night));
  color: #fbeee0;
}
.next-line { margin: 0; font: 400 1.45rem/1.15 var(--display); }
.next-sub { margin: 4px 0 12px; font-size: 0.88rem; opacity: 0.8; }
.next .card { color: var(--ink); }
.empty { padding: 24px 4px; color: var(--muted); }

/* ---- footer ---- */
.foot { margin-top: 36px; padding-top: 16px; border-top: 1px solid var(--line); font-size: 0.85rem; color: var(--muted); }
.foot p { margin: 0 0 8px; }
.foot a { color: var(--ink); font-weight: 700; }

/* ---- gallery ---- */
.gallery {
  position: fixed; inset: 0; z-index: 50;
  display: grid; grid-template-rows: auto 1fr;
  background: #0c0616; color: #fbeee0;
}
.gallery[hidden] { display: none; }
.g-top { display: flex; align-items: center; gap: 12px; padding: 10px 12px 10px 16px; }
.g-title { margin: 0; flex: 1; min-width: 0; font: 400 1.1rem/1.2 var(--display); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.g-count { margin: 0; font-size: 0.85rem; opacity: 0.8; font-variant-numeric: tabular-nums; }
.g-close, .g-nav {
  border: 0; color: #fff; background: rgba(255, 255, 255, 0.14); cursor: pointer;
  width: 44px; height: 44px; border-radius: 50%; font-size: 1.6rem; line-height: 1;
}
.g-stage { margin: 0; min-height: 0; display: flex; flex-direction: column; justify-content: center; align-items: center; padding: 0 12px 16px; touch-action: pan-y; user-select: none; }
.g-stage img { max-width: 100%; max-height: calc(100vh - 150px); max-height: calc(100dvh - 150px); object-fit: contain; border-radius: 10px; }
.g-stage figcaption { padding-top: 10px; font-size: 0.9rem; opacity: 0.85; text-align: center; }
.g-nav { position: absolute; top: 50%; transform: translateY(-50%); }
.g-prev { left: 10px; }
.g-next { right: 10px; }
.gallery.single .g-nav { display: none; }

@media (min-width: 720px) {
  .top { margin: 16px 0 0; border-radius: 28px; padding: 30px 28px 24px; }
  .sun { width: 220px; height: 110px; right: 24px; }
  .thumb { width: 84px; height: 84px; }
}

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

/* ---- place pages ---- */
.sr { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.back { margin: 14px 2px 12px; font-size: 0.92rem; }
.back a, .plinks a { color: var(--ink); font-weight: 700; }
.place-head { display: flex; gap: 12px; align-items: center; margin: 4px 0 14px; }
.place-name { margin: 0; font: 400 1.9rem/1.08 var(--display); overflow-wrap: anywhere; }
.addr { margin: 4px 0 0; color: var(--muted); font-size: 0.92rem; }
.status-box { padding: 12px 14px; border-radius: 16px; background: var(--surface); border: 1px solid var(--line); box-shadow: var(--shadow); }
.pstat { margin: 0; display: flex; gap: 6px; align-items: center; flex-wrap: wrap; }
.pstat + .pstat { margin-top: 6px; }
.pstat.is-on strong { color: var(--on); }
.plinks { display: flex; flex-wrap: wrap; gap: 8px 18px; margin: 14px 2px 0; }
.sec { margin: 26px 0 8px; font: 400 1.4rem/1.1 var(--display); }
.week { width: 100%; border-collapse: collapse; table-layout: fixed; }
.week th, .week td { padding: 9px 4px; border-top: 1px solid var(--line); vertical-align: top; text-align: left; }
.c-day { width: 3.6em; }
.week th { font-size: 0.82rem; letter-spacing: 0.08em; text-transform: uppercase; color: var(--muted); }
.week td { overflow-wrap: anywhere; }
.week .win + .win { margin-top: 8px; }
.win-time { margin: 0; }
.none { color: var(--muted); }
.unconf { display: inline-block; font-size: 0.78rem; font-weight: 700; color: var(--rose); }
.is-unconf { opacity: 0.8; }
.shows { list-style: none; margin: 0; padding: 0; }
.shows li { padding: 8px 2px; border-top: 1px solid var(--line); }
.checked { margin: 22px 2px 0; font-size: 0.85rem; color: var(--muted); }
.credit { margin: 4px 2px 0; font-size: 0.85rem; color: var(--muted); }
