/* Markets NI — the Days Out NI look (Clear Sky palette, sky band, sun-yellow actions). */
:root {
  --bg: #F6F8FB; --bg-2: #EEF2F7; --panel: #FFFFFF; --panel-2: #F6F9FC;
  --border: #E1E6EF; --border-strong: #B5C0CE;
  --text: #1A2233; --muted: #4D5A6E; --muted-dim: #7A8898;
  --accent: #F4B82A; --accent-soft: #FFE8A3; --accent-deep: #D89A0F;
  --sky: #2E84BD; --sky-soft: #BFDBF0; --green: #1F8F5E; --green-soft: #D5EFE2;
  --amber: #B7791F; --amber-soft: #FFF1CC;
  --band-top: #2F7FB6; --band-bot: #2E84BD;
  --spring: cubic-bezier(0.34, 1.56, 0.64, 1);
  --shadow: 0 1px 2px rgba(20,35,60,.07), 0 6px 20px rgba(20,35,60,.10);
  /* one colour per kind of market */
  --k-christmas: #C8372D; --k-makers: #7846C2; --k-food: #1F8F5E; --k-halloween: #E07B16;
  --k-easter: #D14E96; --k-vintage: #8A6236; --k-community: #3F62B8; --k-carboot: #5C6E88; --k-regular: #2E84BD;
  /* size bands */
  --b-overnight: #C8372D; --b-drive: #F0A815; --b-local: #2E84BD;
}
* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; background: var(--band-top); }
body { margin: 0; font: 15.5px/1.55 "Inter", -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif; background: var(--bg); color: var(--text); -webkit-font-smoothing: antialiased; touch-action: manipulation; min-height: 100lvh; }
h1, h2, h3, .poppins { font-family: "Poppins", "Inter", sans-serif; }
a { color: var(--sky); }
.wrap { max-width: 760px; margin: 0 auto; padding: 0 16px; }
button { font-family: inherit; cursor: pointer; }

/* ---------- band ---------- */
.topstrip { display: none; }
@media (display-mode: standalone) { .topstrip { display: block; position: fixed; top: 0; left: 0; right: 0; height: calc(env(safe-area-inset-top) + 12px); background: var(--band-top); z-index: 100; pointer-events: none; } }
header { position: relative; padding: calc(env(safe-area-inset-top) + 12px) 0 24px; background-color: var(--band-top);
  background-image: radial-gradient(120% 70% at 85% 30%, rgba(255,255,255,.10) 0%, rgba(255,255,255,0) 60%), linear-gradient(180deg, var(--band-top) 0%, #3A8CC6 45%, var(--band-bot) 100%); }
header::after { content: ""; position: absolute; left: 0; right: 0; bottom: -1px; height: 18px; background: var(--bg); border-top-left-radius: 100% 18px; pointer-events: none; }
header .wrap { position: relative; z-index: 1; }
.headerrow { position: relative; text-align: center; }
header h1 { margin: 0; display: flex; flex-direction: column; align-items: center; gap: 3px; font-size: 27px; font-weight: 800; letter-spacing: -.03em; line-height: 1; color: #fff; padding: 0 52px; }
header .region { color: #FFCE3D; }
header .band-tag { font-family: "Inter", sans-serif; font-size: 10px; font-weight: 700; letter-spacing: .2em; text-transform: uppercase; color: rgba(255,255,255,.85); }
.cta.icon-only { position: absolute; top: 50%; transform: translateY(-50%); width: 42px; height: 42px; border-radius: 50%; border: 0; background: var(--accent); color: #1A2233; display: inline-flex; align-items: center; justify-content: center; box-shadow: 0 3px 10px rgba(10,40,70,.25); text-decoration: none; transition: transform .25s var(--spring); }
.cta.icon-only:active { transform: translateY(-50%) scale(.92); }
.theme-btn { left: 0; } .share-btn { right: 0; }
.theme-btn .i-sun { display: none; } [data-theme="dark"] .theme-btn .i-sun { display: block; } [data-theme="dark"] .theme-btn .i-moon { display: none; }
.modebar { display: grid; grid-template-columns: 1fr 1fr 1fr; gap: 3px; padding: 4px; margin: 14px 0 0; background: rgba(255,255,255,.96); border: 1px solid rgba(255,255,255,.7); border-radius: 999px; box-shadow: 0 4px 14px rgba(10,40,70,.18); }
.modebar button { display: flex; align-items: center; justify-content: center; gap: 7px; background: transparent; color: var(--muted); border: 0; padding: 10px 6px; border-radius: 999px; font-size: 14.5px; font-weight: 700; font-family: "Poppins", sans-serif; white-space: nowrap; transition: background .2s, color .2s; }
.modebar button svg { width: 19px; height: 19px; flex: none; }
.modebar button.active { background: var(--accent); color: var(--text); box-shadow: 0 2px 6px rgba(212,154,15,.30); }

/* ---------- search ---------- */
.searchbar { position: sticky; top: 0; z-index: 30; padding: 6px 0 10px; background: linear-gradient(var(--bg) 80%, rgba(246,248,251,0)); }
.search { display: flex; align-items: center; gap: 8px; background: #fff; border-radius: 999px; padding: 6px 6px 6px 16px; position: relative; box-shadow: var(--shadow); }
.search::before { content: ""; position: absolute; inset: 0; border-radius: inherit; padding: 2px; background: linear-gradient(135deg, #FFD64A, #4FA4D2); -webkit-mask: linear-gradient(#000 0 0) content-box, linear-gradient(#000 0 0); -webkit-mask-composite: xor; mask-composite: exclude; pointer-events: none; }
.s-ico { color: var(--muted-dim); flex: none; }
.search input { flex: 1; min-width: 0; border: 0; outline: 0; font: inherit; font-size: 16px; background: transparent; color: var(--text); padding: 8px 0; }
.search input::-webkit-search-cancel-button { display: none; }
.q-clear { border: 0; background: var(--bg-2); width: 30px; height: 30px; border-radius: 50%; color: var(--muted); display: grid; place-items: center; }
.q-clear[hidden] { display: none; }
.q-clear svg { width: 15px; height: 15px; }
.s-filter { display: flex; align-items: center; gap: 6px; border: 0; background: var(--accent); color: var(--text); font-weight: 700; font-size: 14.5px; border-radius: 999px; padding: 9px 14px; }
.s-filter svg { width: 18px; height: 18px; fill: none; stroke: currentColor; stroke-width: 2.2; stroke-linecap: round; }
.s-filter b { background: var(--text); color: #fff; border-radius: 999px; font-size: 11.5px; padding: 1px 7px; }
.s-help { position: relative; border: 0; width: 36px; height: 36px; border-radius: 50%; background: #E3F0FA; color: var(--sky); font-weight: 800; font-size: 16px; }
.s-help .dot { position: absolute; top: 2px; right: 2px; width: 8px; height: 8px; border-radius: 50%; background: #E2475B; }
.s-help .dot[hidden] { display: none; }

/* ---------- filter box ---------- */
.filterbox { background: #fff; border-radius: 22px; padding: 16px; margin-bottom: 14px; box-shadow: var(--shadow); position: relative; }
.filterbox[hidden] { display: none; }
.fb-row h3 { font-size: 12px; text-transform: uppercase; letter-spacing: .12em; color: var(--muted); margin: 6px 0 8px; }
.chips { display: flex; flex-wrap: wrap; gap: 8px; margin-bottom: 8px; }
.chips button { border: 1.5px solid var(--border-strong); background: #fff; color: var(--text); border-radius: 999px; padding: 8px 13px; font-size: 14px; font-weight: 600; transition: transform .2s var(--spring); }
.chips button.on { background: var(--accent); border-color: var(--accent-deep); }
.chips button:active { transform: scale(.95); }
.fb-foot { display: flex; justify-content: space-between; gap: 10px; margin-top: 10px; }
.btn-sun, .btn-ghost, .btn-sky { border: 0; border-radius: 999px; padding: 12px 20px; font-weight: 700; font-size: 15px; text-decoration: none; display: inline-flex; align-items: center; gap: 8px; justify-content: center; }
.btn-sun { background: var(--accent); color: var(--text); box-shadow: 0 3px 10px rgba(212,154,15,.3); }
.btn-ghost { background: var(--bg-2); color: var(--text); }
.btn-sky { background: var(--sky); color: #fff; }

/* ---------- gradient outline (every card / tile) ---------- */
.go { position: relative; background: #fff; border-radius: 20px; }
.go::before { content: ""; position: absolute; inset: 0; border-radius: inherit; padding: 2px; background: linear-gradient(135deg, var(--c, #4FA4D2), #FFD64A); -webkit-mask: linear-gradient(#000 0 0) content-box, linear-gradient(#000 0 0); -webkit-mask-composite: xor; mask-composite: exclude; pointer-events: none; }

/* ---------- welcome + hero ---------- */
.welcome { padding: 16px 18px; margin: 4px 0 14px; --c: #4FA4D2; }
.welcome h2 { margin: 0 0 6px; font-size: 19px; }
.welcome p { margin: 0 0 8px; color: var(--muted); font-size: 14.5px; }
.welcome .ticks { margin: 6px 0 10px; padding: 0; list-style: none; font-size: 14.5px; }
.welcome .ticks li { padding-left: 26px; position: relative; margin: 4px 0; }
.welcome .ticks li::before { content: ""; position: absolute; left: 2px; top: 5px; width: 14px; height: 8px; border-left: 3px solid var(--green); border-bottom: 3px solid var(--green); transform: rotate(-45deg); }
.hero { border-radius: 24px; overflow: hidden; color: #fff; margin: 4px 0 14px; background: radial-gradient(120% 90% at 90% 0%, #FFD64A33, transparent 55%), linear-gradient(160deg, #1F5E8A, #2E84BD); box-shadow: var(--shadow); }
.hero-top { padding: 18px 18px 14px; }
.hero .kicker { display: inline-block; background: var(--accent); color: var(--text); font-weight: 800; font-size: 12px; letter-spacing: .08em; text-transform: uppercase; border-radius: 999px; padding: 4px 11px; }
.hero h2 { margin: 10px 0 4px; font-size: 26px; line-height: 1.12; letter-spacing: -.02em; }
.hero p { margin: 0 0 12px; color: #FFE7A0; font-weight: 600; font-size: 14.5px; }
.hero-stats { display: grid; grid-template-columns: repeat(3, 1fr); border-top: 1px solid rgba(255,255,255,.18); }
.hero-stats button { background: transparent; border: 0; color: #fff; text-align: left; padding: 12px 14px; border-right: 1px solid rgba(255,255,255,.18); }
.hero-stats button:last-child { border-right: 0; }
.hero-stats b { display: block; font-family: "Poppins", sans-serif; font-size: 22px; line-height: 1.1; }
.hero-stats span { font-size: 12.5px; color: rgba(255,255,255,.85); }

/* ---------- segmented ---------- */
.seg { display: grid; grid-auto-flow: column; grid-auto-columns: 1fr; gap: 3px; padding: 4px; background: #fff; border-radius: 999px; box-shadow: var(--shadow); margin: 0 0 14px; }
.seg button { border: 0; background: transparent; border-radius: 999px; padding: 10px 6px; font-weight: 700; font-size: 14px; color: var(--muted); }
.seg button.active { background: var(--accent); color: var(--text); }
.seg.small button { font-size: 13px; padding: 8px 4px; }

/* ---------- feed ---------- */
.wk { display: flex; align-items: baseline; justify-content: space-between; margin: 20px 2px 8px; border-bottom: 2px solid var(--border); padding-bottom: 6px; }
.wk h3 { margin: 0; font-size: 13px; letter-spacing: .14em; text-transform: uppercase; }
.wk span { color: var(--muted); font-size: 13px; font-weight: 600; }
.card { display: flex; gap: 12px; padding: 12px; margin: 0 0 10px; cursor: pointer; transition: transform .25s var(--spring); --c: var(--k-makers); }
.card:active { transform: scale(.985); }
.datebox { flex: none; width: 58px; border-radius: 14px; background: var(--bg-2); text-align: center; padding: 7px 0 6px; align-self: flex-start; }
.datebox .dw { font-size: 11px; font-weight: 800; text-transform: uppercase; letter-spacing: .08em; color: var(--muted); }
.datebox .dd { font-family: "Poppins", sans-serif; font-weight: 800; font-size: 24px; line-height: 1.05; }
.datebox .dm { font-size: 11.5px; font-weight: 700; color: var(--c); text-transform: uppercase; }
.datebox.likely { background: var(--amber-soft); }
.datebox.conf { background: var(--green-soft); }
.cbody { min-width: 0; flex: 1; }
.thumb { flex: none; width: 76px; height: 76px; border-radius: 14px; object-fit: cover; align-self: flex-start; background: var(--bg-2); }
.sh-hero { margin: 4px 0 0; border-radius: 20px; overflow: hidden; position: relative; aspect-ratio: 16 / 9; background: var(--bg-2); }
.sh-hero img { width: 100%; height: 100%; object-fit: cover; display: block; }
.sh-hero.poster img { object-fit: contain; background: #10202f; }
.sh-hero small { position: absolute; right: 8px; bottom: 8px; background: rgba(0,0,0,.55); color: #fff; font-size: 11px; border-radius: 8px; padding: 2px 7px; }
.nextbig { padding: 14px 16px; margin: 12px 0; --c: #1F8F5E; display: flex; gap: 14px; align-items: center; }
.nextbig .nb-label { font-size: 12px; font-weight: 800; letter-spacing: .12em; text-transform: uppercase; color: var(--muted); }
.nextbig .nb-date { font-family: "Poppins", sans-serif; font-weight: 800; font-size: 20px; line-height: 1.2; }
.nextbig .nb-note { font-size: 13px; color: var(--muted); }
.actbar { position: sticky; bottom: 0; z-index: 3; display: flex; gap: 10px; padding: 12px 16px calc(env(safe-area-inset-bottom) + 12px); margin-top: 14px; background: linear-gradient(rgba(246,248,251,0), var(--bg) 30%); }
.actbar a, .actbar button { flex: 1; min-height: 52px; font-size: 16px; border-radius: 16px; }
.actbar .btn-sun { box-shadow: 0 6px 18px rgba(212,154,15,.45); }
.actbar .btn-sky { background: var(--sky); color: #fff; }
.contact-list { list-style: none; padding: 0; margin: 0; }
.contact-list li { padding: 6px 0; border-bottom: 1px solid var(--border); font-size: 14.5px; }
.contact-list li:last-child { border-bottom: 0; }
.cname { font-family: "Poppins", sans-serif; font-weight: 700; font-size: 16.5px; line-height: 1.25; margin: 1px 0 3px; }
.cwhere { color: var(--muted); font-size: 13.5px; margin-bottom: 7px; }
.tags { display: flex; flex-wrap: wrap; gap: 5px; }
.tag { font-size: 12px; font-weight: 700; border-radius: 999px; padding: 3px 9px; background: var(--bg-2); color: var(--muted); white-space: nowrap; }
.tag.kind { background: color-mix(in srgb, var(--c) 13%, white); color: var(--c); }
.tag.conf { background: var(--green-soft); color: var(--green); }
.tag.likely { background: var(--amber-soft); color: var(--amber); }
.tag.past { background: var(--bg-2); color: var(--muted); }
.tag.band-overnight { background: #FCE3E1; color: var(--b-overnight); }
.tag.band-drive { background: #FFF1CC; color: #9A6A00; }
.tag.apply { background: var(--text); color: #fff; }
.empty { text-align: center; padding: 30px 16px; color: var(--muted); }
.empty b { display: block; color: var(--text); font-size: 17px; margin-bottom: 4px; }
.more { display: block; margin: 8px auto 20px; }

/* kind colours */
[data-k="christmas"] { --c: var(--k-christmas); } [data-k="makers"] { --c: var(--k-makers); } [data-k="food"] { --c: var(--k-food); }
[data-k="halloween"] { --c: var(--k-halloween); } [data-k="easter"] { --c: var(--k-easter); } [data-k="vintage"] { --c: var(--k-vintage); }
[data-k="community"] { --c: var(--k-community); } [data-k="carboot"] { --c: var(--k-carboot); } [data-k="regular"] { --c: var(--k-regular); }

/* ---------- calendar ---------- */
.cal-legend { display: flex; gap: 14px; justify-content: center; font-size: 13px; color: var(--muted); font-weight: 600; margin: -4px 0 10px; }
.lg { display: inline-block; width: 10px; height: 10px; border-radius: 50%; margin-right: 5px; vertical-align: -1px; }
.lg.conf { background: var(--green); } .lg.likely { background: var(--accent); border: 1px dashed var(--amber); } .lg.past { background: var(--muted-dim); }
.month { padding: 14px 12px 12px; margin-bottom: 14px; --c: #4FA4D2; }
.month h3 { margin: 0 4px 10px; font-size: 18px; display: flex; justify-content: space-between; align-items: baseline; }
.month h3 small { font-family: "Inter", sans-serif; font-size: 13px; color: var(--muted); font-weight: 600; }
.grid { display: grid; grid-template-columns: repeat(7, 1fr); gap: 4px; }
.grid .dow { text-align: center; font-size: 11px; font-weight: 800; color: var(--muted-dim); letter-spacing: .06em; padding-bottom: 2px; }
.day { aspect-ratio: 1 / 1.05; border: 0; border-radius: 12px; background: var(--panel-2); display: flex; flex-direction: column; align-items: center; justify-content: flex-start; padding: 5px 0 0; font-weight: 700; font-size: 14px; color: var(--text); position: relative; min-width: 0; transition: transform .2s var(--spring); }
.day.blank { background: transparent; pointer-events: none; }
.day.has { background: #FFF6D8; }
.day.has.hot { background: #FFE58F; }
.day.sel { outline: 3px solid var(--sky); outline-offset: -1px; }
.day.today { color: var(--sky); text-decoration: underline; text-underline-offset: 3px; }
.day:active { transform: scale(.92); }
.day .dots { display: flex; gap: 2px; margin-top: 4px; flex-wrap: wrap; justify-content: center; max-width: 90%; }
.day .dots i { width: 6px; height: 6px; border-radius: 50%; background: var(--green); }
.day .dots i.likely { background: var(--accent); } .day .dots i.past { background: var(--muted-dim); }
.day .n { position: absolute; bottom: 3px; font-size: 10px; color: var(--muted); font-weight: 700; }
.daylist { margin-top: 12px; }
.daylist h4 { margin: 4px 4px 10px; font-size: 15px; }

/* ---------- map ---------- */
#view-map { position: relative; }
.map-tools { padding-top: 0; }
#mapCanvas { height: calc(100vh - 260px); min-height: 520px; margin: 0 0 8px; border-radius: 20px; border: 1px solid var(--border); overflow: hidden; background: var(--panel); }
@media (pointer: coarse) { #mapCanvas { height: 75vh; height: 75svh; min-height: 280px; max-height: 75svh; } }
.mapdates { margin: 0 0 10px; }
.chiprow { display: flex; gap: 7px; overflow-x: auto; padding: 2px 2px 8px; scrollbar-width: none; -webkit-overflow-scrolling: touch; }
.chiprow::-webkit-scrollbar { display: none; }
.chiprow button { flex: none; border: 1.5px solid var(--border-strong); background: var(--panel); color: var(--text); border-radius: 999px; padding: 8px 13px; font-size: 14px; font-weight: 700; transition: transform .2s var(--spring); }
.chiprow button.on { background: var(--accent); border-color: var(--accent-deep); color: #1A2233; }
.chiprow button:active { transform: scale(.95); }
.pick { display: flex; gap: 10px; flex-wrap: wrap; margin: 2px 0 8px; }
.pick[hidden] { display: none; }
.pick label { flex: 1 1 140px; justify-content: space-between; display: flex; align-items: center; gap: 8px; font-weight: 700; font-size: 14px; background: var(--panel); border-radius: 14px; padding: 6px 10px; box-shadow: var(--shadow); }
.pick input { min-width: 0; flex: 1; font: inherit; border: 1px solid var(--border); border-radius: 10px; padding: 5px 8px; background: var(--panel-2); color: var(--text); }
.mapcount { font-weight: 700; color: var(--muted); font-size: 14px; padding: 0 4px; }
.mapcount b { color: var(--text); }
.mk.likely { background: #fff; border: 2px dashed var(--amber); box-shadow: none; }
#mapList { margin-top: 6px; }
.map-key { display: flex; gap: 14px; justify-content: center; font-size: 13px; color: var(--muted); font-weight: 600; padding: 4px 0 10px; }
.mk { display: inline-block; width: 12px; height: 12px; border-radius: 50%; margin-right: 5px; vertical-align: -1px; border: 2px solid #fff; box-shadow: 0 0 0 1px rgba(0,0,0,.15); }
.mk.overnight { background: var(--b-overnight); } .mk.drive { background: var(--b-drive); } .mk.local { background: var(--b-local); }
.maplibregl-popup-content { border-radius: 16px; padding: 12px 14px; font-family: "Inter", sans-serif; box-shadow: var(--shadow); max-width: 260px; }
.pop-name { font-family: "Poppins", sans-serif; font-weight: 700; font-size: 15px; line-height: 1.25; }
.pop-when { color: var(--muted); font-size: 13px; margin: 3px 0 8px; }
.pop-btn { border: 0; background: var(--accent); border-radius: 999px; padding: 7px 14px; font-weight: 700; font-size: 13.5px; }

/* ---------- detail sheet ---------- */
.sheet-back { position: fixed; inset: 0; background: rgba(15,30,50,.45); z-index: 60; }
.sheet { position: fixed; left: 0; right: 0; bottom: 0; z-index: 61; max-height: 90lvh; overflow-y: auto; background: var(--bg); border-radius: 26px 26px 0 0; padding: 0; animation: up .35s var(--spring); -webkit-overflow-scrolling: touch; }
@media (min-width: 800px) { .sheet { left: 50%; width: 720px; margin-left: -360px; } }
@keyframes up { from { transform: translateY(40%); opacity: .4; } to { transform: none; opacity: 1; } }
.sheet[hidden], .sheet-back[hidden] { display: none; }
.sh-top { position: sticky; top: 0; z-index: 2; background: var(--bg); padding: 10px 16px 6px; display: flex; align-items: center; gap: 10px; border-radius: 26px 26px 0 0; }
.sh-top .grab { width: 44px; height: 5px; border-radius: 9px; background: var(--border-strong); margin: 0 auto; }
.sh-close { position: absolute; left: 12px; top: 8px; border: 0; background: var(--bg-2); border-radius: 999px; padding: 8px 14px; font-weight: 700; font-size: 14px; }
.sh-body { padding: 10px 16px 0; }
.sh-body h2 { margin: 18px 0 6px; font-size: 23px; line-height: 1.15; letter-spacing: -.01em; }
.sh-where { color: var(--muted); margin-bottom: 10px; }
.box { padding: 14px 16px; margin: 12px 0; }
.box h3 { margin: 0 0 8px; font-size: 13px; letter-spacing: .12em; text-transform: uppercase; color: var(--muted); }
.dl { list-style: none; margin: 0; padding: 0; }
.dl li { display: flex; gap: 10px; align-items: baseline; padding: 7px 0; border-bottom: 1px solid var(--border); font-size: 14.5px; }
.dl li:last-child { border-bottom: 0; }
.dl .when { font-weight: 700; flex: 1; }
.dl .note { display: block; font-weight: 500; color: var(--muted); font-size: 12.5px; }
.why { margin: 0; padding-left: 20px; color: var(--muted); font-size: 14.5px; }
.apply-box { --c: #1A2233; }
.apply-box p { margin: 4px 0; font-size: 14.5px; }
.apply-box .btn-sun { margin-top: 8px; }
.links { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 6px; }
.links a.btn-sun { background: var(--accent); }
.links a { font-size: 14px; font-weight: 700; text-decoration: none; background: var(--bg-2); color: var(--text); border-radius: 999px; padding: 8px 13px; }
.src { font-size: 12.5px; color: var(--muted); word-break: break-word; }
.desc { font-size: 14.5px; color: var(--muted); }

/* ---------- help pop ---------- */
.pop { position: fixed; z-index: 70; left: 50%; top: 90px; transform: translateX(-50%); width: min(92vw, 460px); background: #fff; border-radius: 22px; padding: 18px; box-shadow: 0 14px 50px rgba(15,30,50,.3); max-height: 80lvh; overflow-y: auto; }
.pop[hidden] { display: none; }
.pop h3 { margin: 0 0 8px; }
.pop p, .pop li { font-size: 14.5px; color: var(--muted); }
.pop ul { padding-left: 18px; }

footer { padding: 26px 16px 70px; color: var(--muted); font-size: 14px; text-align: center; }
footer .small { font-size: 12.5px; }
.ver { position: fixed; right: 8px; bottom: calc(env(safe-area-inset-bottom) + 6px); font-size: 11px; color: var(--muted-dim); background: rgba(255,255,255,.8); border-radius: 8px; padding: 1px 6px; z-index: 20; }
.newver { position: fixed; left: 50%; transform: translateX(-50%); bottom: calc(env(safe-area-inset-bottom) + 14px); background: var(--text); color: #fff; font-weight: 700; padding: 12px 18px; border-radius: 999px; z-index: 80; cursor: pointer; box-shadow: var(--shadow); }
.newver[hidden] { display: none; }
body.mode-map footer { display: none; }

/* ---------- v9: the whole band stays at the top while you scroll (the Workforce NI way, his ask) ----------
   An opaque band pinned at the very top is also what stops iOS 26's blur under the clock. app.js sets --band-h. */
header { position: sticky; top: 0; z-index: 35; padding-bottom: 20px; }
@media (display-mode: standalone) { header { padding-top: calc(env(safe-area-inset-top) + 14px); } }
.searchbar { top: calc(var(--band-h, 0px) - 2px); }
#feed, #feedSeg, #filterBox, .wk, #scopeBar, #mapCanvas, #calendar { scroll-margin-top: calc(var(--band-h, 0px) + 64px); }

/* ---------- dark mode ---------- */
[data-theme="dark"] {
  --bg: #0F1B28; --bg-2: #1A2A3B; --panel: #16263A; --panel-2: #1B2D42; --border: #2A3D55; --border-strong: #3B526E;
  --text: #EAF1F8; --muted: #A9B8C9; --muted-dim: #7F92A8; --band-top: #17324A; --band-bot: #12283B;
  --green-soft: #173A2C; --amber-soft: #3A3018; --sky-soft: #1D3A55; --shadow: 0 1px 2px rgba(0,0,0,.4), 0 6px 20px rgba(0,0,0,.35);
  color-scheme: dark;
}
[data-theme="dark"] header { background-image: linear-gradient(180deg, var(--band-top) 0%, var(--band-bot) 100%); }
[data-theme="dark"] .modebar { background: #1A2A3B; border-color: #2A3D55; }
[data-theme="dark"] .search, [data-theme="dark"] .filterbox, [data-theme="dark"] .seg, [data-theme="dark"] .go,
[data-theme="dark"] .pop, [data-theme="dark"] .chips button { background: var(--panel); color: var(--text); }
[data-theme="dark"] .search input { color: var(--text); }
[data-theme="dark"] .day { background: var(--panel-2); color: var(--text); }
[data-theme="dark"] .day.has { background: #3A3018; } [data-theme="dark"] .day.has.hot { background: #5A4612; }
[data-theme="dark"] .tag.kind { background: color-mix(in srgb, var(--c) 28%, #16263A); color: color-mix(in srgb, var(--c) 55%, white); }
[data-theme="dark"] .tag.band-overnight { background: #4A1F1C; color: #FFB4AC; } [data-theme="dark"] .tag.band-drive { background: #3A3018; color: #FFD66B; }
[data-theme="dark"] .tag.apply { background: var(--accent); color: #1A2233; }
[data-theme="dark"] .s-help { background: #1D3A55; color: #9FD0F5; }
[data-theme="dark"] .ver { background: rgba(15,27,40,.8); }
[data-theme="dark"] .actbar { background: linear-gradient(rgba(15,27,40,0), var(--bg) 30%); }
[data-theme="dark"] .maplibregl-popup-content { background: var(--panel); color: var(--text); }
[data-theme="dark"] .maplibregl-popup-tip { border-top-color: var(--panel) !important; border-bottom-color: var(--panel) !important; }
[data-theme="dark"] .searchbar { background: linear-gradient(var(--bg) 80%, rgba(15,27,40,0)); }
[data-theme="dark"] a { color: #8CC8F2; }
[data-theme="dark"] .links a, [data-theme="dark"] .btn-ghost { background: var(--bg-2); color: var(--text); }

/* =================== v3 — Days Out swipe row + market cards =================== */
.theme-btn { left: 14px; } .share-btn { right: 14px; }
@media (max-width: 420px) { header h1 { padding: 0 58px; } }

/* the swipe row (focal point) */
.today { margin: 4px 0 6px; }
.td-track { display: flex; gap: 14px; overflow-x: auto; scroll-snap-type: x mandatory; border-radius: 26px; scrollbar-width: none; -webkit-overflow-scrolling: touch; overscroll-behavior-x: contain; }
.td-track::-webkit-scrollbar { display: none; }
.td-card { position: relative; flex: 0 0 100%; scroll-snap-align: start; scroll-snap-stop: always; display: flex; flex-direction: column; overflow: hidden; border-radius: 26px; background: #0E2A47; color: #fff; box-shadow: var(--shadow); isolation: isolate; min-height: 330px; }
.td-card > img { position: absolute; top: 0; right: 0; width: 72%; height: 100%; object-fit: cover; z-index: -2; }
.td-card::before { content: ""; position: absolute; inset: 0; z-index: -1; background: linear-gradient(90deg, #0E2A47 0%, #0E2A47 30%, rgba(14,42,71,.82) 52%, rgba(14,42,71,.25) 100%), linear-gradient(0deg, rgba(10,30,52,.95) 0%, rgba(10,30,52,0) 42%); }
.td-in { flex: 1; padding: 16px 18px 6px; display: flex; flex-direction: column; align-items: flex-start; }
.td-top { width: 100%; display: flex; align-items: center; justify-content: space-between; gap: 10px; }
.td-date { padding: 5px 12px; border-radius: 999px; background: #FFCE3D; color: #1A2233; font-size: 12px; font-weight: 800; letter-spacing: .06em; text-transform: uppercase; }
.td-next { display: inline-flex; align-items: center; gap: 6px; height: 36px; padding: 0 6px 0 12px; border: 0; border-radius: 999px; color: #fff; background: rgba(255,255,255,.2); -webkit-backdrop-filter: blur(8px); backdrop-filter: blur(8px); font: inherit; transition: transform .3s var(--spring); }
.td-next small { font-size: 12px; font-weight: 800; }
.td-next span { width: 26px; height: 26px; border-radius: 50%; display: grid; place-items: center; background: #FFCE3D; color: #1A2233; font-size: 19px; font-weight: 800; line-height: 1; }
.td-next:active { transform: scale(.92); }
.td-kick { margin-top: 14px; font-size: 12px; font-weight: 800; letter-spacing: .14em; text-transform: uppercase; color: rgba(255,255,255,.8); }
.td-in h2 { margin: 6px 0 0; max-width: 92%; font-size: clamp(25px, 7vw, 34px); font-weight: 800; letter-spacing: -0.035em; line-height: 1.08; color: #fff; text-shadow: 0 2px 16px rgba(0,0,0,.35); }
.td-in h2 span { display: block; }
.td-ev h2 span { font-size: clamp(22px, 6vw, 28px); display: -webkit-box; -webkit-line-clamp: 3; -webkit-box-orient: vertical; overflow: hidden; }
.td-in h2 em { display: block; margin-top: 6px; font-style: normal; font-size: 15px; letter-spacing: -0.01em; line-height: 1.3; color: #FFCE3D; font-weight: 800; }
.td-cta { margin: auto 0 14px; display: inline-flex; align-items: center; gap: 8px; padding: 12px 20px; border: 0; border-radius: 999px; background: #FFCE3D; color: #1A2233; font: inherit; font-weight: 800; font-size: 16px; box-shadow: 0 4px 14px rgba(240,168,21,.35); transition: transform .3s var(--spring); }
.td-in h2 + .td-cta { margin-top: 16px; }
.td-cta:active { transform: scale(.96); }
.td-stats { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); border-top: 1px solid rgba(255,255,255,.14); background: rgba(6,22,40,.55); -webkit-backdrop-filter: blur(6px); backdrop-filter: blur(6px); }
.td-stat { display: flex; flex-direction: column; align-items: flex-start; gap: 2px; padding: 12px; border: 0; background: transparent; color: #fff; font: inherit; text-align: left; min-width: 0; }
.td-stat + .td-stat { border-left: 1px solid rgba(255,255,255,.14); }
.td-stat b { font-size: 20px; font-weight: 800; line-height: 1.1; }
.td-stat small { font-size: 11.5px; font-weight: 700; line-height: 1.2; color: rgba(255,255,255,.78); }
.td-nav { display: flex; justify-content: center; padding: 10px 0 4px; }
.td-dots { display: flex; gap: 7px; flex-wrap: wrap; justify-content: center; }
.td-dots button { width: 8px; height: 8px; padding: 0; border: 0; border-radius: 999px; background: var(--border-strong); transition: width .35s var(--spring), background .2s; }
.td-dots button.on { width: 22px; background: var(--accent-deep); }

/* the market card (Days Out event card) */
.mcard { display: grid; grid-template-columns: clamp(130px, 40%, 230px) 1fr; grid-template-rows: 1fr auto; grid-template-areas: "hero body" "hero foot"; gap: 8px 14px; padding: 12px; margin: 0 0 12px; background: var(--panel); border: 1px solid var(--border); border-radius: 18px; box-shadow: var(--shadow); cursor: pointer; transition: transform .25s var(--spring); --c: var(--k-makers); }
.mcard:active { transform: scale(.985); }
.mc-hero { grid-area: hero; position: relative; min-height: 150px; border-radius: 14px; overflow: hidden; background: linear-gradient(140deg, color-mix(in srgb, var(--c) 26%, var(--panel)), color-mix(in srgb, var(--c) 8%, var(--panel))); }
.mc-hero img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; display: block; }
.mc-flag { position: absolute; top: 8px; left: 8px; z-index: 2; background: var(--accent); color: #1A2233; font-size: 10px; font-weight: 800; letter-spacing: .04em; text-transform: uppercase; padding: 4px 9px; border-radius: 999px; box-shadow: 0 2px 8px rgba(0,0,0,.22); }
.mc-when { position: absolute; left: 8px; bottom: 8px; z-index: 2; display: flex; flex-direction: column; align-items: center; min-width: 50px; padding: 6px 9px; background: linear-gradient(160deg, #2E84BD 0%, #1F5E8A 100%); border-radius: 12px; box-shadow: 0 4px 12px rgba(10,30,50,.42); color: #fff; }
.mc-when.likely { background: linear-gradient(160deg, #F0A815 0%, #B7791F 100%); }
.mc-when.past { background: linear-gradient(160deg, #7A8898 0%, #4D5A6E 100%); }
.mc-when .d1, .mc-when .d3 { font-size: 9.5px; font-weight: 800; letter-spacing: .1em; text-transform: uppercase; color: rgba(255,255,255,.85); }
.mc-when .d2 { font-size: 22px; font-weight: 800; line-height: 1; margin: 1px 0; font-family: "Poppins", sans-serif; }
.mc-body { grid-area: body; min-width: 0; align-self: start; }
.mc-body h3 { margin: 0 0 6px; font-size: 18px; font-weight: 700; line-height: 1.25; display: -webkit-box; -webkit-box-orient: vertical; -webkit-line-clamp: 2; overflow: hidden; }
.mc-meta { display: flex; gap: 4px; align-items: flex-start; font-size: 13px; color: var(--muted); }
.mc-meta svg { flex: none; width: 15px; height: 15px; margin-top: 2px; fill: none; stroke: #C8372D; stroke-width: 2.2; }
.mc-meta span { display: -webkit-box; -webkit-box-orient: vertical; -webkit-line-clamp: 2; overflow: hidden; }
.mc-why { margin: 5px 0 0; font-size: 13px; font-weight: 700; color: var(--amber); }
.mc-why .wl-overnight { color: var(--b-overnight); } .mc-why .wl-drive { color: #9A6A00; } .mc-why .wl-likely { color: var(--amber); font-weight: 600; }
.mc-desc { margin: 6px 0 0; font-size: 13.5px; line-height: 1.45; color: var(--muted); display: -webkit-box; -webkit-box-orient: vertical; -webkit-line-clamp: 2; overflow: hidden; }
.mc-foot { grid-area: foot; display: flex; align-items: center; gap: 6px; flex-wrap: wrap; border-top: 1px solid var(--border); padding-top: 9px; }
.mc-pills { display: flex; flex-wrap: wrap; gap: 5px; flex: 1 1 auto; }
.mc-acts { display: flex; gap: 4px; margin-left: auto; }
.ib { width: 34px; height: 34px; border: 0; border-radius: 50%; background: var(--bg-2); color: var(--muted); display: grid; place-items: center; }
.ib svg { width: 18px; height: 18px; fill: none; stroke: currentColor; stroke-width: 2.1; stroke-linecap: round; stroke-linejoin: round; }
.mcard.is-major { grid-template-columns: 1fr; grid-template-areas: "hero" "body" "foot"; border: 2px solid var(--accent); }
.mcard.is-major .mc-hero { height: 200px; }
.mcard.is-major h3 { font-size: 21px; font-weight: 800; }
[data-theme="dark"] .mcard { background: var(--panel); }
[data-theme="dark"] .mc-why .wl-drive { color: #FFD66B; } [data-theme="dark"] .mc-why .wl-overnight { color: #FF9C93; }

/* =================== v4 — you, scope bar, weekly & car boots =================== */
.mc-mi { margin-left: auto; padding-left: 8px; color: var(--green); font-weight: 800; white-space: nowrap; }
.wl-rg { color: var(--sky); }
.scopebar { display: grid; grid-template-columns: 1.2fr 1fr 1fr; gap: 8px; margin: 6px 0 12px; }
.scopebar button { display: flex; flex-direction: column; align-items: center; gap: 1px; border: 1.5px solid var(--border-strong); background: var(--panel); color: var(--text); border-radius: 999px; padding: 9px 6px; font-weight: 800; font-size: 14.5px; transition: transform .2s var(--spring); }
.scopebar button small { font-size: 11px; font-weight: 600; color: var(--muted); }
.scopebar button.on { background: var(--accent); border-color: var(--accent-deep); color: #1A2233; }
.scopebar button.on small { color: #5a4300; }
.scopebar button:active { transform: scale(.95); }
.you-back { position: fixed; inset: 0; z-index: 90; background: rgba(15,30,50,.5); display: flex; align-items: flex-end; justify-content: center; }
.you-back[hidden] { display: none; }
@media (min-width: 700px) { .you-back { align-items: center; } }
.you-card { width: min(100%, 520px); max-height: 92lvh; overflow-y: auto; background: var(--bg); border-radius: 28px 28px 0 0; padding: 22px 18px calc(env(safe-area-inset-bottom) + 18px); animation: up .35s var(--spring); }
@media (min-width: 700px) { .you-card { border-radius: 28px; } }
.you-card h2 { margin: 0 0 6px; font-size: 25px; letter-spacing: -.02em; }
.you-card h3 { margin: 16px 0 8px; font-size: 13px; letter-spacing: .12em; text-transform: uppercase; color: var(--muted); }
.you-lead { margin: 0 0 16px; color: var(--muted); font-weight: 600; }
.you-big { display: grid; gap: 12px; }
.you-big button { display: grid; grid-template-columns: 64px 1fr; grid-template-rows: auto auto; column-gap: 14px; align-items: center; text-align: left; padding: 16px; border-radius: 22px; border: 2px solid var(--border); background: var(--panel); color: var(--text); box-shadow: var(--shadow); transition: transform .25s var(--spring); }
.you-big button svg { grid-row: 1 / 3; width: 56px; height: 56px; padding: 8px; border-radius: 18px; background: #FFF1CC; fill: none; stroke: #1F5E8A; stroke-width: 2.6; stroke-linecap: round; stroke-linejoin: round; }
.you-big button:nth-child(2) svg { background: #D5EFE2; stroke: #1F8F5E; }
.you-big button b { font-family: "Poppins", sans-serif; font-size: 20px; font-weight: 800; }
.you-big button small { color: var(--muted); font-size: 14px; font-weight: 600; }
.you-big button.on { border-color: var(--accent-deep); }
.you-big button:active { transform: scale(.97); }
.you-gps { width: 100%; margin-bottom: 12px; }
.you-towns button.on, .you-miles button.on { background: var(--accent); border-color: var(--accent-deep); color: #1A2233; }
#youSel { width: 100%; font: inherit; padding: 11px 12px; border-radius: 14px; border: 1.5px solid var(--border-strong); background: var(--panel); color: var(--text); }
.you-foot { display: flex; justify-content: space-between; gap: 10px; margin-top: 18px; }
.you-foot .btn-sun[disabled] { opacity: .45; }
.you-sum { display: flex; align-items: center; justify-content: space-between; gap: 10px; background: var(--bg-2); border-radius: 16px; padding: 8px 8px 8px 14px; margin-bottom: 8px; }
.you-sum .btn-ghost { padding: 8px 14px; background: var(--panel); }
.wk-kinds { margin: 0 0 4px; }
.wk-more { grid-column: 1 / -1; font-size: 14px; }
.wk-more p { margin: 6px 0; }
.wk-tap { font-size: 12.5px; font-weight: 700; color: var(--sky); margin-left: auto; }

.seg button { line-height: 1.15; } #feedSeg button { font-size: 13.5px; }

/* v5 — type row above the list and the map */
.typerow { margin: 2px 0 10px; }
#typeRowMap { margin-top: 6px; }
.typerow button { display: inline-flex; align-items: center; gap: 7px; font-size: 13.5px; padding: 7px 12px; }
.typerow button.on { background: var(--sun, #FFCE3D); border-color: var(--sun-deep, #E0A800); color: #1d2a36; }
.kdot { width: 9px; height: 9px; border-radius: 50%; flex: none; background: var(--kc, #9aa7b4); }
.k-christmas { --kc: #D64545; } .k-makers { --kc: #8E5BD8; } .k-food { --kc: #3FA34D; } .k-vintage { --kc: #B07A3B; }
.k-carboot { --kc: #4A7FC1; } .k-halloween { --kc: #F07B1D; } .k-easter { --kc: #E59BC4; } .k-community { --kc: #2BA6A0; }
.k-collectors { --kc: #1F5E8A; } .k-shows { --kc: #6B8E23; }

/* v6 — sellers: deadlines, My markets, Tell us, Market news, guide */
.tag.dl { background: #FFE3D6; color: #A3410F; }
.tag.dl.hot { background: #E5484D; color: #fff; }
.ib.sv.on { background: var(--accent-soft); color: var(--accent-deep); }
.ib.sv.on svg, .btn-save.on svg { fill: currentColor; }
.btn-save { display: inline-flex; align-items: center; gap: 6px; border: 1.5px solid var(--border-strong); background: var(--panel); color: var(--text); border-radius: 999px; padding: 10px 14px; font: inherit; font-weight: 800; }
.btn-save svg { width: 18px; height: 18px; fill: none; stroke: currentColor; stroke-width: 2; stroke-linejoin: round; }
.btn-save.on { background: var(--accent-soft); border-color: var(--accent); color: #6B4A00; }
.applynote { margin: 10px 0 0; padding: 12px 14px; border-radius: 16px; background: #FFF1EA; color: #7A300A; font-size: 15px; }
.fixline { margin: 18px 0 8px; text-align: center; }
.linkish { border: 0; background: none; padding: 0; font: inherit; font-weight: 700; color: var(--sky); text-decoration: underline; text-underline-offset: 3px; cursor: pointer; }
.mine-head { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin: 8px 0 12px; }
.mine-head h3 { margin: 0; font-size: 20px; } .mine-head span { color: var(--muted); font-size: 14px; }
.mine-empty { text-align: center; padding: 26px 18px; margin: 10px 0; border-radius: 22px; background: var(--panel); border: 1.5px dashed var(--border-strong); }
.mine-empty h3 { margin: 8px 0 6px; font-size: 20px; } .mine-empty p { color: var(--muted); margin: 6px auto; max-width: 420px; }
.me-star svg { width: 46px; height: 46px; fill: var(--accent-soft); stroke: var(--accent-deep); stroke-width: 1.6; stroke-linejoin: round; }
.mine-note { color: var(--muted-dim); text-align: center; margin: 14px 0; }
.feedfoot { margin: 26px 0 10px; display: grid; gap: 14px; }
.tellrow, .newsbox { position: relative; padding: 18px 16px; border-radius: 22px; background: var(--panel); }
.tellrow::before, .newsbox::before { content: ""; position: absolute; inset: 0; border-radius: inherit; padding: 2px; pointer-events: none;
  background: linear-gradient(135deg, var(--sky), var(--accent) 55%, var(--sky));
  -webkit-mask: linear-gradient(#000 0 0) content-box, linear-gradient(#000 0 0); -webkit-mask-composite: xor; mask-composite: exclude; }
.tellrow h3, .newsbox h3 { margin: 0 0 4px; font-size: 19px; line-height: 1.2; }
.tellrow p, .newsbox p { margin: 0 0 12px; color: var(--muted); }
.tr-b { display: flex; flex-wrap: wrap; gap: 8px; margin-bottom: 12px; }
#newsForm { display: grid; grid-template-columns: minmax(0, 2fr) minmax(0, 3fr); gap: 8px; }
#newsForm input, .tell input, .tell select, .tell textarea { width: 100%; min-width: 0; box-sizing: border-box; font: inherit; font-size: 16px; color: var(--text); padding: 12px 13px; border-radius: 13px; border: 1.5px solid var(--border-strong); background: var(--panel-2); }
#newsForm button { grid-column: 1 / -1; }
#newsMsg, #tellMsg { margin: 10px 0 0; } .err { color: #C2372F !important; font-weight: 700; }
.hp { position: absolute !important; left: -9999px !important; width: 1px; height: 1px; opacity: 0; }
.tell form { display: grid; gap: 12px; margin: 14px 0 24px; }
.tell label { display: grid; gap: 5px; font-weight: 700; font-size: 14px; }
.tell-done { text-align: center; padding: 30px 10px; } .td-tick { width: 64px; height: 64px; border-radius: 50%; margin: 0 auto; display: grid; place-items: center; font-size: 34px; font-weight: 900; color: #fff; background: var(--green); }
.guide .box { margin-top: 12px; }
.ticks { margin: 6px 0 0; padding: 0; list-style: none; display: grid; gap: 8px; }
.ticks li { position: relative; padding-left: 26px; } .ticks li::before { content: "✓"; position: absolute; left: 2px; top: 0; font-weight: 900; color: var(--green); }
.guide-cta { display: flex; flex-wrap: wrap; gap: 8px; margin: 16px 0 6px; }
[data-theme="dark"] .tag.dl { background: #5A2A14; color: #FFD2BC; }
[data-theme="dark"] .applynote { background: #3A2216; color: #FFD2BC; }
[data-theme="dark"] .btn-save.on { color: #FFE8A3; background: #4A3A10; }
.actbar .btn-save { flex: 0 0 auto; width: 54px; padding: 0; justify-content: center; border-radius: 16px; }
.actbar .btn-save svg { width: 24px; height: 24px; }
