/* SilverScreener. An art-deco picture house: the site name sits on a cinema roofline, session times are old
   paper tickets (red bands, white middle), and everything else stays flat and quiet.
   Palette: pink #dbb9c6, teal #2288a2, red #b61711, sage #bcc4b3. The other colours below are tints and
   shades of those four, plus white for the ticket paper. */

@font-face { font-family: "Limelight"; src: url("../fonts/limelight-latin-400-normal.woff2") format("woff2"); font-display: swap; }
@font-face { font-family: "Josefin Sans"; font-weight: 400; src: url("../fonts/josefin-sans-latin-400-normal.woff2") format("woff2"); font-display: swap; }
@font-face { font-family: "Josefin Sans"; font-weight: 600; src: url("../fonts/josefin-sans-latin-600-normal.woff2") format("woff2"); font-display: swap; }
@font-face { font-family: "Josefin Sans"; font-weight: 700; src: url("../fonts/josefin-sans-latin-700-normal.woff2") format("woff2"); font-display: swap; }
@font-face { font-family: "Press Start 2P"; src: url("../fonts/press-start-2p-latin-400-normal.woff2") format("woff2"); font-display: swap; }
@font-face { font-family: "Rokkitt"; font-weight: 700; src: url("../fonts/rokkitt-latin-700-normal.woff2") format("woff2"); font-display: swap; }
@font-face { font-family: "IBM Plex Sans Thai"; font-weight: 400; src: url("../fonts/ibm-plex-sans-thai-latin-400-normal.woff2") format("woff2"); font-display: swap; unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD; }
@font-face { font-family: "IBM Plex Sans Thai"; font-weight: 600; src: url("../fonts/ibm-plex-sans-thai-latin-600-normal.woff2") format("woff2"); font-display: swap; unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD; }
@font-face { font-family: "IBM Plex Sans Thai"; font-weight: 400; src: url("../fonts/ibm-plex-sans-thai-thai-400-normal.woff2") format("woff2"); font-display: swap; unicode-range: U+0E01-0E5B, U+200C-200D, U+25CC; }
@font-face { font-family: "IBM Plex Sans Thai"; font-weight: 600; src: url("../fonts/ibm-plex-sans-thai-thai-600-normal.woff2") format("woff2"); font-display: swap; unicode-range: U+0E01-0E5B, U+200C-200D, U+25CC; }
@font-face { font-family: "IBM Plex Sans Cyr"; font-weight: 400; src: url("../fonts/ibm-plex-sans-cyrillic-400-normal.woff2") format("woff2"); font-display: swap; unicode-range: U+0301, U+0400-045F, U+0490-0491, U+04B0-04B1, U+2116; }
@font-face { font-family: "IBM Plex Sans Cyr"; font-weight: 600; src: url("../fonts/ibm-plex-sans-cyrillic-600-normal.woff2") format("woff2"); font-display: swap; unicode-range: U+0301, U+0400-045F, U+0490-0491, U+04B0-04B1, U+2116; }

:root {
  --pink: #dbb9c6;
  --teal: #2288a2;
  --red: #b61711;
  --sage: #bcc4b3;
  --ink: #16323b;          /* text and outlines: a deep shade of the teal */
  --ink-soft: #4d6168;
  --teal-deep: #176f86;    /* teal dark enough for white text on it */
  --paper: #f1f3ed;        /* page: a tint of the sage */
  --ticket: #ffffff;       /* ticket paper */
  --line: #cfd6c8;
  --pink-soft: #f4e6eb;
  --teal-soft: #d9ecf1;
  --radius-s: 3px;
  --radius-m: 6px;
  --ctl-h: 170px;          /* height of the sticky controls, measured by app.js */
  --font-ui: "IBM Plex Sans Thai", "IBM Plex Sans Cyr", "Noto Sans Thai", system-ui, -apple-system, "Segoe UI", sans-serif;
  --font-head: "Josefin Sans", "IBM Plex Sans Thai", "IBM Plex Sans Cyr", "Gill Sans", "Futura", system-ui, sans-serif;
  --font-sign: "Limelight", "Broadway", "Josefin Sans", "IBM Plex Sans Thai", fantasy;
  --font-time: "Rokkitt", "Josefin Sans", "IBM Plex Sans Thai", Georgia, serif;
  color-scheme: light;
}
/* Chinese uses the system fonts every phone and computer already has. */
:root:lang(zh) {
  --font-ui: "IBM Plex Sans Thai", "PingFang SC", "Hiragino Sans GB", "Noto Sans CJK SC", "Noto Sans SC", "Microsoft YaHei", system-ui, sans-serif;
  --font-head: "Josefin Sans", "IBM Plex Sans Thai", "PingFang SC", "Hiragino Sans GB", "Noto Sans CJK SC", "Noto Sans SC", "Microsoft YaHei", system-ui, sans-serif;
}

* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body { margin: 0; background: var(--paper); color: var(--ink); font: 15px/1.5 var(--font-ui); }
a { color: inherit; }
button, select, input { font: inherit; color: inherit; }
:focus-visible { outline: 3px solid var(--teal); outline-offset: 2px; }
[hidden] { display: none !important; }
.wrap { max-width: 1080px; margin: 0 auto; padding: 0 14px; }

/* ---------- marquee: the site name on a cinema roofline ---------- */
.marquee { position: relative; height: 172px; overflow: hidden; background: var(--pink); border-bottom: 4px solid var(--ink); padding-top: env(safe-area-inset-top, 0px); box-sizing: content-box; }
.marquee .deco { position: absolute; left: 50%; bottom: 0; height: 172px; width: auto; aspect-ratio: 1000 / 204; transform: translateX(-50%); overflow: visible; }
.sign {
  position: absolute; left: 50%; bottom: 8px; transform: translateX(-50%);
  display: grid; justify-items: center; gap: 1px; padding: 7px 26px 6px; text-decoration: none; white-space: nowrap;
  background: var(--red); color: #fff; border: 2px solid var(--ink);
  /* a row of marquee bulbs along the top and bottom edges of the sign */
  box-shadow: inset 0 0 0 3px var(--red), inset 0 0 0 4px var(--pink);
}
.sign::before, .sign::after {
  content: ""; position: absolute; left: 10px; right: 10px; height: 4px;
  background: radial-gradient(circle 2px at 50% 50%, #fff 96%, transparent) 0 0 / 12px 4px repeat-x;
}
.sign::before { top: -9px; } .sign::after { bottom: -9px; }
.sign-name { font: 400 38px/1 var(--font-sign); letter-spacing: 0.03em; }
.sign-th { font: 600 12.5px/1.2 var(--font-ui); letter-spacing: 0.08em; color: var(--pink-soft); }
.lang-sel {
  position: absolute; z-index: 2; top: calc(8px + env(safe-area-inset-top, 0px)); right: 10px; max-width: 9.5em;
  border: 2px solid var(--ink); background: var(--ticket); border-radius: var(--radius-s); padding: 4px 8px; cursor: pointer; font-size: 14px; min-height: 34px;
}
@media (max-width: 640px) {
  .marquee, .marquee .deco { height: 136px; }
  .sign { padding: 6px 18px 5px; }
  .sign-name { font-size: 29px; }
}

/* ---------- next screenings near me ---------- */
.next-row { padding-top: 12px; padding-bottom: 10px; display: flex; justify-content: center; }
.next-btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px; cursor: pointer; min-height: 46px; padding: 9px 22px 8px;
  background: var(--red); color: #fff; border: 2px solid var(--ink); border-radius: var(--radius-s);
  font: 700 16px/1.2 var(--font-head); letter-spacing: 0.02em; box-shadow: 3px 3px 0 var(--ink);
}
.next-btn:active { transform: translate(2px, 2px); box-shadow: 1px 1px 0 var(--ink); }
.next-btn[aria-pressed="true"] { background: var(--teal-deep); }
.next-btn[disabled] { opacity: 0.7; cursor: progress; }
@media (max-width: 640px) { .next-btn { width: 100%; } }

/* ---------- sticky controls ---------- */
.top { position: sticky; top: 0; z-index: 20; background: var(--paper); border-top: 1px solid var(--line); border-bottom: 2px solid var(--ink); padding-top: 8px; }
.chip-btn {
  border: 1.5px solid var(--ink); background: var(--ticket); border-radius: var(--radius-s);
  padding: 5px 12px 4px; cursor: pointer; font: 600 14px/1.4 var(--font-head); min-height: 34px;
}
.chip-btn[aria-pressed="true"] { background: var(--teal-deep); color: #fff; }
.where { display: flex; gap: 8px; align-items: center; padding-bottom: 8px; }
.loc-btn {
  flex: 1; min-width: 0; display: flex; align-items: center; gap: 6px; text-align: left;
  border: 1.5px solid var(--ink); background: var(--ticket); border-radius: var(--radius-s); padding: 7px 10px; cursor: pointer; min-height: 40px;
}
.loc-btn span { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.loc-btn svg { flex: none; color: var(--red); }
.where select { border: 1.5px solid var(--ink); background: var(--ticket); border-radius: var(--radius-s); padding: 7px 8px; min-height: 40px; }

/* ---------- date strip ---------- */
.dates { display: flex; gap: 6px; overflow-x: auto; padding: 2px 0 10px; scrollbar-width: none; scroll-snap-type: x proximity; }
.dates::-webkit-scrollbar { display: none; }
.date {
  flex: none; scroll-snap-align: start; width: 54px; padding: 0 0 5px; text-align: center; cursor: pointer; overflow: hidden;
  border: 1.5px solid var(--ink); background: var(--ticket); border-radius: var(--radius-s); position: relative;
}
.date .dw { display: block; font: 600 11.5px/1 var(--font-head); padding: 5px 0 3px; margin-bottom: 3px; background: var(--sage); color: var(--ink); }
.date .dn { display: block; font: 700 21px/1.05 var(--font-time); }
.date .dm { display: block; font-size: 11px; line-height: 1.2; color: var(--ink-soft); }
.date.pred { border-style: dashed; }
.date.pred .dw { background: var(--pink); }
.date.pred .dn::before { content: "≈"; font-size: 14px; margin-right: 1px; }
.date.hol::after { content: ""; position: absolute; top: 5px; right: 5px; width: 6px; height: 6px; border-radius: 50%; background: var(--red); }
.date[aria-pressed="true"] { background: var(--teal-deep); border-style: solid; color: #fff; }
.date[aria-pressed="true"] .dw { background: var(--ink); color: #fff; }
.date[aria-pressed="true"] .dm { color: #fff; }

.views { display: flex; gap: 6px; align-items: center; padding-bottom: 10px; }
.views .chip-btn { flex: none; }
.views .spacer { flex: 1; }
#filtersBtn { display: inline-flex; align-items: center; gap: 5px; }
/* Set by app.js when the view buttons and Filters do not fit on one line (longer languages on narrow phones). */
.views.tight { gap: 4px; }
.views.tight .chip-btn { padding-left: 9px; padding-right: 9px; }
.views.tightest .chip-btn { font-size: 12.5px; padding-left: 6px; padding-right: 6px; }
.views.tighter .fl-text { position: absolute; width: 1px; height: 1px; overflow: hidden; clip-path: inset(50%); white-space: nowrap; }
.count { font-size: 12px; background: var(--red); color: #fff; border-radius: 999px; padding: 0 6px; margin-left: 4px; }

/* ---------- page grid: side adverts on wide screens ---------- */
.shell { display: block; }
.rail { display: none; }
@media (min-width: 1440px) {
  .shell { display: grid; grid-template-columns: 160px minmax(0, 1080px) 160px; justify-content: center; gap: 24px; align-items: start; }
  .shell > .wrap { width: 100%; margin: 0; }
  .rail { display: block; position: sticky; top: calc(var(--ctl-h) + 14px); margin-top: 14px; }
}
.ad-label { display: block; font: 600 10.5px/1 var(--font-head); letter-spacing: 0.08em; color: var(--ink-soft); margin-bottom: 4px; }
.ad-empty {
  display: grid; place-items: center; width: 100%; height: 100%; color: var(--ink-soft); font: 600 13px var(--font-head);
  border: 1.5px dashed var(--ink-soft); background: repeating-linear-gradient(135deg, transparent 0 14px, rgb(22 50 59 / 0.05) 14px 28px);
}

/* advert shown before a predicted day */
.adgate { position: fixed; inset: 0; z-index: 80; display: grid; place-items: center; padding: 16px; background: rgb(22 50 59 / 0.82); }
.adgate-in { width: min(100%, 720px); background: var(--paper); border: 2px solid var(--ink); padding: 10px 12px 12px; }
.adbox { aspect-ratio: 16 / 9; background: var(--ink); overflow: hidden; }
.adbox > *, .adbox a > * { display: block; width: 100%; height: 100%; border: 0; object-fit: cover; }
.adbox .ad-empty { display: grid; color: #fff; border-color: #fff; }
.adgate-foot { display: flex; justify-content: flex-end; margin-top: 10px; }
.adgate-foot .primary[disabled] { background: var(--ink-soft); cursor: wait; }

/* ---------- layout ---------- */
.layout { display: grid; gap: 18px; padding-top: 14px; padding-bottom: 40px; }
@media (min-width: 960px) {
  .layout { grid-template-columns: 280px 1fr; align-items: start; }
  .filters { position: sticky; top: calc(var(--ctl-h) + 14px); display: block !important; max-height: calc(100vh - var(--ctl-h) - 28px); overflow: auto; }
  #filtersBtn, .filters .close { display: none; }
}

/* ---------- filters ---------- */
.filters { background: var(--ticket); border: 1.5px solid var(--ink); border-radius: var(--radius-s); padding: 12px 14px 16px; }
@media (max-width: 959px) {
  .filters { position: fixed; inset: auto 0 0 0; z-index: 40; max-height: 82vh; overflow: auto; border-width: 2px 0 0; box-shadow: 0 -12px 40px rgb(22 50 59 / 0.3); }
}
.filters h2 { font: 700 17px/1.3 var(--font-head); margin: 0 0 4px; display: flex; gap: 12px; align-items: center; }
.filters h2 .grow { flex: 1; }
.fgroup { border: 0; margin: 14px 0 0; padding: 0; }
.fgroup legend { font: 700 14px/1.3 var(--font-head); margin-bottom: 6px; padding: 0; }
.opts { display: flex; flex-wrap: wrap; gap: 6px; }
.opt { position: relative; }
.opt input { position: absolute; opacity: 0; inset: 0; margin: 0; cursor: pointer; }
.opt span { display: inline-block; border: 1.5px solid var(--line); border-radius: var(--radius-s); padding: 3px 10px; font-size: 13.5px; background: var(--paper); }
.opt input:checked + span { background: var(--teal-soft); border-color: var(--teal-deep); font-weight: 600; }
.opt input:focus-visible + span { outline: 3px solid var(--teal); outline-offset: 2px; }
.frow { display: flex; gap: 8px; align-items: center; flex-wrap: wrap; font-size: 14px; }
.frow select { border: 1.5px solid var(--line); background: var(--paper); border-radius: var(--radius-s); padding: 4px 6px; }
.toggle { display: flex; align-items: center; gap: 8px; font-size: 14px; margin-top: 8px; }
.toggle input { accent-color: var(--teal-deep); }
.link-btn { background: none; border: 0; color: var(--teal-deep); cursor: pointer; padding: 4px 0; font-size: 14px; text-decoration: underline; }
.scrim { position: fixed; inset: 0; background: rgb(22 50 59 / 0.4); z-index: 30; }
@media (min-width: 960px) { .scrim { display: none; } }

/* ---------- highlighted blocks: next screenings, festivals, special screenings ---------- */
.layout > main, .places > div, .cinema .films > div, .trow .what, .srow .what { min-width: 0; }
.block { margin: 0 0 16px; border: 2px solid var(--ink); position: relative; }
.block > h2 { margin: 0; padding: 7px 12px 5px; font: 700 15px/1.3 var(--font-head); letter-spacing: 0.04em; display: flex; align-items: center; gap: 8px; }
.block > h2 svg { flex: none; }
.block-body { padding: 10px 12px 12px; }
.block.fest { background: var(--teal-soft); }
.block.fest > h2 { background: var(--teal-deep); color: #fff; }
.block.special { background: var(--pink-soft); }
.block.special > h2 { background: var(--red); color: #fff; }
.fest-item { display: flex; flex-wrap: wrap; gap: 2px 12px; align-items: baseline; padding: 6px 0; border-top: 1px solid rgb(22 50 59 / 0.2); }
.fest-item:first-child { border-top: 0; padding-top: 0; }
.fest-item b { font: 700 15.5px/1.3 var(--font-head); }
.fest-item .when { font-weight: 600; }
.fest-item .on { background: var(--red); color: #fff; font: 700 11.5px/1 var(--font-head); padding: 4px 6px 2px; letter-spacing: 0.04em; }
.fest-item .venues { flex-basis: 100%; font-size: 13.5px; color: var(--ink-soft); }
.srow { display: grid; grid-template-columns: auto 1fr auto; gap: 12px; align-items: center; padding: 8px 0; border-top: 1px solid rgb(22 50 59 / 0.2); }
.srow:first-child { border-top: 0; padding-top: 0; }
.srow .what b { display: block; font: 700 15.5px/1.3 var(--font-head); }
.block .hint { margin: 0; }
.nextbar { display: flex; flex-wrap: wrap; gap: 6px 14px; align-items: center; margin: 0 0 14px; padding: 8px 12px; background: var(--teal-deep); color: #fff; border: 2px solid var(--ink); font-weight: 600; }
.nextbar .grow { flex: 1; min-width: 12em; }
.nextbar .chip-btn { color: var(--ink); }

/* ---------- list ---------- */
.notice { font-size: 14px; color: var(--ink-soft); margin: 0 0 12px; }
.notice.pred { color: var(--ink); background: var(--pink-soft); border-left: 4px solid var(--pink); padding: 8px 10px; }
.opening { margin: 0 0 16px; font-size: 14px; }
.opening b { display: block; margin-bottom: 4px; }
.opening .tags { display: flex; flex-wrap: wrap; gap: 6px; }
.opening .tags span { border: 1.5px dashed var(--ink-soft); border-radius: var(--radius-s); padding: 2px 10px; background: var(--pink-soft); }

.film { display: grid; grid-template-columns: 64px 1fr; gap: 4px 12px; padding: 14px 0 16px; border-top: 2px solid var(--ink); }
.film:first-of-type { border-top: 0; }
.poster {
  width: 64px; aspect-ratio: 2 / 3; border: 1.5px solid var(--ink); grid-row: span 2;
  /* without a poster: a deco fan in the palette */
  background: repeating-conic-gradient(from -90deg at 50% 100%, var(--sage) 0 12deg, var(--pink) 12deg 24deg) center / cover no-repeat;
}
.film h3, .cinema h3 { margin: 0; font: 700 18px/1.25 var(--font-head); }
.film .alt, .cinema .alt { font-size: 13px; color: var(--ink-soft); font-weight: 400; }
.facts { display: flex; flex-wrap: wrap; gap: 4px 12px; align-items: center; font-size: 13px; color: var(--ink-soft); margin-top: 3px; }
.tag { font: 600 12px/1.5 var(--font-head); border-radius: var(--radius-s); padding: 1px 6px 0; background: var(--ticket); border: 1.5px solid var(--ink); color: var(--ink); }
.tag.blockbuster { background: var(--red); color: #fff; }
.tag.independent { background: var(--teal-soft); }
.tag.rescreening { background: var(--pink); }
.tag.event { background: var(--sage); }
.imdb { display: inline-flex; align-items: baseline; gap: 4px; text-decoration: none; font: 700 12.5px/1.5 var(--font-head); color: var(--ink); background: var(--ticket); border: 1.5px solid var(--ink); border-radius: var(--radius-s); padding: 1px 6px 0; white-space: nowrap; }
.imdb i { font-style: normal; font-weight: 600; color: var(--ink-soft); }
a.imdb:hover { background: var(--pink-soft); }
.places { grid-column: 1 / -1; display: grid; gap: 12px; margin-top: 8px; }
.place-head { display: flex; align-items: center; gap: 8px; font-size: 14px; }
.place-head .name { font-weight: 600; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.place-head .dist { color: var(--ink-soft); flex: none; }
.place-head .buy { margin-left: auto; }
.dot { width: 10px; height: 10px; flex: none; border: 1.5px solid var(--ink); background: var(--sage); }
.dot.major { background: var(--red); } .dot.sf { background: var(--teal); } .dot.special { background: var(--pink); border-radius: 50%; }
.from { font-size: 12.5px; color: var(--ink-soft); margin-top: 2px; }
.from b { font-weight: 600; color: var(--ink); }
/* "Show predicted times": dashed like a predicted ticket, so the two read as one family. */
.pred-btn { display: inline-flex; align-items: center; gap: 6px; margin-top: 8px; padding: 6px 12px; border: 1.5px dashed var(--ink); border-radius: 3px;
  background: var(--pink-soft); color: var(--ink); font: 600 14px/1.2 var(--font-head); cursor: pointer; }
.pred-btn:hover { background: var(--pink); }
.pred-btn span { font-size: 17px; }
.adgate-note { margin-top: 10px; padding: 10px 12px; border: 1.5px dashed var(--ink); background: var(--pink-soft); }
.adgate-note b { display: block; font-family: var(--font-head); font-size: 16px; }
.adgate-note p { margin: 4px 0 0; font-size: 14.5px; line-height: 1.45; }
.poster { position: relative; display: grid; place-items: center; overflow: hidden; }
.poster-initial { font: 400 30px/1 "Limelight", var(--font-head); color: var(--ink); background: rgb(241 243 237 / 0.85); padding: 6px 8px 2px; border: 1.5px solid var(--ink); }
.poster-img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.buy {
  flex: none; display: inline-block; text-decoration: none; white-space: nowrap; cursor: pointer;
  font: 700 13px/1.3 var(--font-head); color: #fff; background: var(--red); border: 1.5px solid var(--ink); border-radius: var(--radius-s); padding: 5px 10px 3px;
}
.buy:hover { background: var(--ink); }

.cinema { padding: 14px 0 16px; border-top: 2px solid var(--ink); }
.cinema:first-of-type { border-top: 0; }
.cinema .head { display: flex; gap: 8px; align-items: baseline; }
.cinema .head h3 { flex: 1; min-width: 0; }
.cinema .head .dot { align-self: center; }
.cinema .links { display: flex; gap: 14px; align-items: center; font-size: 13px; margin-top: 6px; }
.cinema .links a:not(.buy) { color: var(--teal-deep); }
.cinema .films { display: grid; gap: 12px; margin-top: 12px; }
.cfilm-title { display: flex; flex-wrap: wrap; gap: 4px 8px; align-items: center; font-size: 14.5px; font-weight: 600; }
.cfilm-title .buy { margin-left: auto; }

/* ---------- tickets: red band, white middle, red band ---------- */
.stubs { display: flex; gap: 9px; overflow-x: auto; padding: 5px 2px 7px; scrollbar-width: thin; }
.stub {
  --band: var(--red); --band-ink: #fff; --notch: 5px;
  flex: none; display: grid; grid-template-rows: auto 1fr auto; min-width: 76px; text-align: center; text-decoration: none; color: var(--ink);
  background: var(--ticket); border: 1.5px solid var(--band); border-radius: 2px;
  /* a half-round bite out of each side, as on a torn ticket */
  -webkit-mask: radial-gradient(circle var(--notch) at 0 50%, transparent 97%, #000), radial-gradient(circle var(--notch) at 100% 50%, transparent 97%, #000);
  -webkit-mask-composite: source-in; mask-composite: intersect;
}
.stub .bt, .stub .bb {
  display: block; min-height: 7px; padding: 0 9px; background: var(--band); color: var(--band-ink);
  font: 700 10.5px/1 var(--font-head); letter-spacing: 0.06em; white-space: nowrap;
}
.stub .bt:not(:empty) { padding-top: 4px; padding-bottom: 2px; }
.stub .bb:not(:empty) { padding-top: 4px; padding-bottom: 2px; }
.stub .mid { display: grid; align-content: center; padding: 5px 11px 3px; border-top: 1px dashed transparent; }
.stub .tm { font: 700 23px/1 var(--font-time); font-variant-numeric: tabular-nums; letter-spacing: 0.01em; }
.stub .fx { font: 600 10.5px/1.3 var(--font-head); color: var(--ink-soft); white-space: nowrap; }
/* predicted: pink bands, dashed outline, ≈ before the time */
.stub.pred { --band: var(--pink); --band-ink: var(--ink); border-style: dashed; border-color: var(--ink-soft); }
.stub.pred .tm::before { content: "≈"; font-size: 15px; margin-right: 1px; }
/* 80%+ sold: the bottom band carries the warning and the paper turns pink */
.stub.warn { background: var(--pink-soft); border-width: 2px; }
.stub.full { --band: var(--sage); --band-ink: var(--ink); }
.stub.full .tm { text-decoration: line-through; color: var(--ink-soft); }
.stub.past { opacity: 0.45; }
a.stub:hover .tm { color: var(--red); }
.stub:active { transform: translateY(1px); }

/* Times view */
.trow { display: grid; grid-template-columns: 96px 1fr auto; gap: 12px; padding: 10px 0; border-top: 1px solid var(--line); align-items: center; }
.trow:first-of-type { border-top: 0; }
.trow .stub, .srow .stub { min-width: 0; width: 96px; }
.trow .what { font-size: 14px; min-width: 0; }
.trow .what b { display: block; font: 700 15.5px/1.3 var(--font-head); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.trow .what .place-head, .srow .what .place-head { font-size: 13px; }
@media (max-width: 480px) {
  .trow, .srow { grid-template-columns: 84px 1fr auto; gap: 10px; }
  .trow .stub, .srow .stub { width: 84px; }
  .trow .buy, .srow .buy { font-size: 12px; padding: 5px 7px 3px; }
}

.empty { padding: 30px 0; font-size: 15px; }
.empty b { display: block; font: 700 18px/1.3 var(--font-head); margin-bottom: 4px; }
.more { margin: 16px 0; }

/* ---------- location sheet ---------- */
.sheet { position: fixed; inset: 0; z-index: 50; background: var(--paper); overflow: auto; }
.sheet .wrap { padding-top: 12px; padding-bottom: 30px; }
.sheet-head { display: flex; justify-content: space-between; align-items: center; }
.sheet-head h2 { margin: 0; font: 700 20px/1.3 var(--font-head); }
.search { display: flex; gap: 8px; margin: 12px 0; }
.search input { flex: 1; min-width: 0; border: 1.5px solid var(--ink); border-radius: var(--radius-s); padding: 9px 11px; background: var(--ticket); }
.primary { background: var(--teal-deep); color: #fff; border: 1.5px solid var(--ink); border-radius: var(--radius-s); padding: 9px 14px 7px; cursor: pointer; min-height: 42px; font: 700 14.5px/1.3 var(--font-head); }
.results { list-style: none; margin: 0; padding: 0; }
.results li button { width: 100%; text-align: left; border: 0; border-bottom: 1px solid var(--line); background: none; padding: 10px 2px; cursor: pointer; }
.results small { display: block; color: var(--ink-soft); }
.areas { display: flex; flex-wrap: wrap; gap: 6px; margin: 10px 0 14px; }
#map { height: 46vh; min-height: 280px; border: 1.5px solid var(--ink); margin-top: 10px; }
.hint { font-size: 13px; color: var(--ink-soft); }

/* ---------- footer ---------- */
.foot { font-size: 13px; color: var(--ink-soft); padding: 18px 14px calc(40px + env(safe-area-inset-bottom, 0px)); border-top: 2px solid var(--ink); }
.demo-banner { background: var(--ink); color: #fff; font-size: 13.5px; padding: 8px 14px; text-align: center; }
.foot p { margin: 4px 0; }
.foot a { color: var(--teal-deep); }
.legend { display: flex; flex-wrap: wrap; gap: 8px 12px; align-items: center; margin-bottom: 10px; }
.legend .stub { min-width: 0; }
.legend .stub .tm { font-size: 15px; }
.legend .stub .mid { padding: 3px 9px 1px; }

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

/* ---------- plain pages (about, admin) ---------- */
.page { max-width: 760px; margin: 0 auto; padding: 18px 16px 60px; }
.page h1 { font: 400 30px/1.2 var(--font-sign); margin: 8px 0 12px; }
.page h2 { font: 700 19px/1.3 var(--font-head); margin: 26px 0 8px; }
.page p, .page li { max-width: 70ch; }
.page a { color: var(--teal-deep); }
.page table { border-collapse: collapse; width: 100%; font-size: 13.5px; }
.page th, .page td { text-align: left; border-bottom: 1px solid var(--line); padding: 6px 6px; vertical-align: top; }
.page input, .page select, .page textarea { border: 1.5px solid var(--ink-soft); background: var(--ticket); border-radius: var(--radius-s); padding: 5px 7px; }
.page .row { display: flex; gap: 8px; flex-wrap: wrap; align-items: center; margin: 6px 0; }
.page .ok { color: var(--teal-deep); } .page .bad { color: var(--red); }
.page pre { background: var(--ticket); border: 1.5px solid var(--line); padding: 10px; overflow: auto; font-size: 12.5px; }
@media (max-width: 480px) { .trow .what b { white-space: normal; } }

/* ---------- map view: pixel Thailand when zoomed out, street map when zoomed in ---------- */
.map-view { min-width: 0; }
#bigMap { position: relative; height: min(74vh, 760px); min-height: 420px; border: 2px solid var(--ink); background: var(--teal); z-index: 0; }
#bigMap.retro { cursor: zoom-in; }
.px-map { image-rendering: pixelated; image-rendering: crisp-edges; }
.px-you { background: #fff; border: 3px solid var(--ink); box-shadow: 0 0 0 3px var(--pink); animation: px-blink 1s steps(2, jump-none) infinite; }
@keyframes px-blink { from { background: #fff; } to { background: var(--red); } }
.map-hud { position: absolute; inset: 0; z-index: 500; pointer-events: none; display: flex; flex-direction: column; justify-content: space-between; padding: 10px; }
.map-hud > * { pointer-events: auto; align-self: flex-start; }
.hud-top { display: grid; gap: 8px; background: var(--ink); color: #fff; padding: 10px 12px 8px; border: 2px solid #fff; font: 400 11px/1.5 "Press Start 2P", var(--font-head); text-transform: uppercase; }
.hud-top b { font-weight: 400; color: var(--pink); }
.hud-top span { font-size: 9px; }
.hud-btns { display: flex; flex-wrap: wrap; gap: 8px; margin-top: auto; }
.hud-btns button { cursor: pointer; background: var(--ticket); color: var(--ink); border: 2px solid var(--ink); border-radius: var(--radius-s); padding: 7px 12px 5px; font: 700 13.5px/1.3 var(--font-head); box-shadow: 2px 2px 0 var(--ink); }
.hud-btns button.hot { background: var(--red); color: #fff; }
#bigMap.retro .hud-btns button { border-radius: 0; font: 400 10px/1.6 "Press Start 2P", var(--font-head); text-transform: uppercase; padding: 9px 10px 7px; }
.cine-pin span { display: block; width: 22px; height: 22px; border: 2.5px solid var(--ink); box-shadow: 0 0 0 2px #fff; }
.cine-pin:hover span, .cine-pin:focus span { transform: scale(1.2); }
.cine-pop .leaflet-popup-content-wrapper { border-radius: 0; border: 2px solid var(--ink); box-shadow: 3px 3px 0 var(--ink); background: var(--ticket); color: var(--ink); }
.cine-pop .leaflet-popup-content { margin: 9px 11px 10px; font: 13.5px/1.4 var(--font-ui); }
.cine-pop .leaflet-popup-tip { background: var(--ink); box-shadow: none; }
.pop b { font: 700 15px/1.25 var(--font-head); margin-right: 6px; }
.pop .km { color: var(--ink-soft); font-size: 12.5px; white-space: nowrap; }
.pop ul { list-style: none; margin: 6px 0 8px; padding: 0; border-top: 2px solid var(--red); }
.pop li { display: flex; justify-content: space-between; gap: 10px; padding: 3px 0; border-bottom: 1px dashed var(--line); }
.pop li i { font-style: normal; color: var(--ink-soft); white-space: nowrap; font-size: 12.5px; }
.pop li.more { color: var(--ink-soft); }
.pop p { margin: 6px 0 8px; color: var(--ink-soft); }
.leaflet-container { font-family: var(--font-ui); }
@media (prefers-reduced-motion: reduce) { .px-you { animation: none; } }
.hud-note { background: var(--ticket); border: 2px solid var(--ink); padding: 6px 10px; font-size: 13px; max-width: 30em; }
