/* anything with the hidden attribute is gone, whatever its display rule says
   (this bit twice: the clock and the day-bar bubble both stayed on screen) */
[hidden] { display: none !important; }

:root {
  --bg: #fbf6ef;
  --surface: #ffffff;
  --surface-2: #f4ece1;
  --ink: #1f2433;
  --ink-2: #5b6070;
  --line: #e6dccd;
  --accent: #b5485f;
  --gold: #b88a2e;
  --fri: #8a8f98;
  --sat: #c2417a;
  --secret: #2b7fb3;
  --shadow: 0 10px 30px rgba(31, 36, 51, .14);
  --radius: 14px;
  color-scheme: light;
}
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --bg: #14161d; --surface: #1c1f28; --surface-2: #252935; --ink: #f1ece4; --ink-2: #a8adbb;
    --line: #333845; --accent: #e57a93; --gold: #d9b35f; --fri: #9aa0aa; --sat: #ec6fa2; --secret: #5fb0e0;
    --shadow: 0 10px 30px rgba(0, 0, 0, .45); color-scheme: dark;
  }
}
:root[data-theme="dark"] {
  --bg: #14161d; --surface: #1c1f28; --surface-2: #252935; --ink: #f1ece4; --ink-2: #a8adbb;
  --line: #333845; --accent: #e57a93; --gold: #d9b35f; --fri: #9aa0aa; --sat: #ec6fa2; --secret: #5fb0e0;
  --shadow: 0 10px 30px rgba(0, 0, 0, .45); color-scheme: dark;
}

* { box-sizing: border-box; }
html, body { margin: 0; height: 100%; }
body {
  background: var(--bg); color: var(--ink);
  font: 15px/1.5 'DM Sans', system-ui, sans-serif;
  -webkit-font-smoothing: antialiased;
}
a { color: var(--accent); }
button { font: inherit; color: inherit; cursor: pointer; -webkit-user-select: none; user-select: none; }
.actions a { -webkit-user-select: none; user-select: none; }
h1, h2, h3 { font-family: 'Fraunces', Georgia, serif; font-weight: 700; letter-spacing: -.01em; margin: 0; }

.app { display: grid; grid-template-columns: 420px 1fr; grid-template-rows: auto 1fr; grid-template-areas: "brand map" "side map"; height: 100vh; height: 100dvh; }
.brand { grid-area: brand; padding: 20px 20px 0; border-right: 1px solid var(--line); }
.side { grid-area: side; }
.mapwrap { grid-area: map; }
.side { overflow-y: auto; border-right: 1px solid var(--line); background: var(--bg); padding: 0 20px 40px; }
.mapwrap { position: relative; min-height: 0; }
#map { position: absolute; inset: 0; background: var(--surface-2); }

/* brand */
.brand { display: flex; gap: 14px; align-items: center; padding-bottom: 16px; }
.logo {
  flex: none; width: 52px; height: 52px; border-radius: 50%; border: 1px solid var(--line);
  background: var(--surface); font-size: 26px; line-height: 1; user-select: none; -webkit-tap-highlight-color: transparent;
  transition: transform .12s;
}
.logo:active { transform: scale(.92); }
.brand h1 { font-size: 26px; line-height: 1.1; }
.theme {
  margin-left: auto; flex: none; width: 38px; height: 38px; border-radius: 50%; border: 1px solid var(--line);
  background: var(--surface); font-size: 17px; line-height: 1; display: grid; place-items: center;
}
.theme:hover { border-color: var(--accent); }
.brand h1 em { color: var(--accent); font-style: italic; }
.dates { margin: 3px 0 0; color: var(--ink-2); font-size: 13.5px; }

/* tabs */
.sticky { position: sticky; top: 0; z-index: 20; background: var(--bg); padding-bottom: 10px; margin-bottom: 4px; }
.tabs { display: flex; gap: 4px; flex-wrap: wrap; border-bottom: 1px solid var(--line); margin-bottom: 10px; }
.tabs button {
  border: 0; background: none; padding: 9px 10px; color: var(--ink-2); font-weight: 500;
  border-bottom: 2px solid transparent; margin-bottom: -1px;
}
.tabs button[aria-selected="true"] { color: var(--ink); border-color: var(--accent); }

.lede { margin: 0 0 14px; color: var(--ink-2); }
.fine { color: var(--ink-2); font-size: 13px; }
.ghost { border: 1px solid var(--line); background: var(--surface); padding: 8px 14px; border-radius: 999px; }

.pin.home-pin { background: var(--surface); border: 2px solid var(--ink); font-size: 15px; }

/* days */
.days { display: grid; grid-template-columns: repeat(3, 1fr) auto; gap: 6px; }
.days[hidden] { display: none; }
.days button {
  border: 1px solid var(--line); background: var(--surface); border-radius: 12px; padding: 8px 6px; text-align: left;
}
.days button b { display: block; font-size: 13.5px; }
.days button .dsub { display: flex; flex-direction: column; font-size: 12px; color: var(--ink-2); line-height: 1.35; }
.days button .dwx { color: var(--ink); }
.days button .dwx span { white-space: nowrap; }
.days button[aria-pressed="true"] { border-color: var(--dc); box-shadow: inset 0 0 0 1px var(--dc); }
.daynote { margin: 0 0 12px; color: var(--ink-2); font-size: 14px; }
.daytitle { font-size: 21px; margin: 0 0 4px; }

.steps { list-style: none; padding: 0; margin: 0 0 12px; position: relative; }
.steps::before { content: ''; position: absolute; left: 13px; top: 14px; bottom: 14px; width: 2px; background: var(--line); }
.step { position: relative; display: grid; grid-template-columns: 28px 1fr; gap: 8px; padding: 3px 0; }
.step .num {
  width: 28px; height: 28px; border-radius: 50%; display: grid; place-items: center; font-weight: 700; font-size: 12.5px;
  background: var(--dc); color: #fff; position: relative; z-index: 1; border: 3px solid var(--bg); margin-top: 4px;
}
.step .body {
  display: flex; align-items: stretch; background: var(--surface); border: 1px solid var(--line); border-radius: 12px; min-width: 0;
}
.step .body:hover { border-color: var(--dc); }
.step .main {
  flex: 1; min-width: 0; border: 0; background: none; text-align: left; padding: 7px 4px 7px 11px;
  display: grid; grid-template-columns: 1fr auto; column-gap: 8px; align-items: baseline;
}
.step .row1 { grid-column: 1 / -1; display: flex; gap: 8px; align-items: baseline; min-width: 0; }
.step .t { flex: none; font-size: 12px; font-weight: 700; color: var(--dc); font-variant-numeric: tabular-nums; }
.step .n { font-weight: 700; font-size: 14.5px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; min-width: 0; }
.step .d { font-size: 13px; color: var(--ink-2); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; min-width: 0; }
.step .c { font-size: 12px; color: var(--ink); font-weight: 500; white-space: nowrap; }
.gmap {
  flex: none; display: grid; place-items: center; width: 38px; color: var(--ink-2); border-left: 1px solid var(--line);
  border-radius: 0 12px 12px 0;
}
.gmap:hover { color: var(--accent); background: var(--surface-2); }
.go, .note {
  list-style: none; position: relative; display: flex; gap: 8px; align-items: center; margin: 0 0 0 36px;
  padding: 2px 0; font-size: 12.5px; color: var(--ink-2); min-width: 0;
}
.note { color: var(--ink); gap: 8px; padding: 4px 0; }
.note .t { font-weight: 700; font-size: 12px; color: var(--dc); font-variant-numeric: tabular-nums; }
.go .gi { flex: none; width: 18px; text-align: center; font-size: 13px; }
.go .gt { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; min-width: 0; }
.go .gt b { font-weight: 700; color: var(--ink-2); font-variant-numeric: tabular-nums; margin-right: 2px; }
.go-open {
  display: flex; gap: 8px; align-items: center; width: 100%; min-width: 0; text-align: left; font-size: 12.5px; color: var(--ink);
  background: var(--surface-2); border: 1px dashed var(--dc); border-radius: 10px; padding: 4px 8px 4px 6px; margin: 2px 0;
}
.go-open:hover { border-style: solid; }
.go-more { margin-left: auto; flex: none; font-size: 11.5px; font-weight: 700; color: var(--dc); }
.energy { letter-spacing: 1px; font-size: 11px; }

.callout {
  background: var(--surface-2); border-radius: var(--radius); padding: 12px 14px; font-size: 14px; margin: 6px 0 10px;
  border-left: 3px solid var(--gold);
}

/* forecast (top of the Packing tab) */
.wx { background: var(--surface-2); border-radius: var(--radius); padding: 12px 14px; margin: 0 0 16px; }
.wx-days { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; text-align: center; }
.wx-day { display: flex; flex-direction: column; align-items: center; gap: 1px; }
.wx-day b { font-size: 13px; }
.wx-ic { font-size: 24px; line-height: 1.2; }
.wx-t { font-weight: 700; font-size: 14px; }
.wx-r { font-size: 12px; color: var(--ink-2); }

/* packing */
.pack-bar { display: flex; align-items: center; gap: 10px; margin: 0 0 14px; }
.pack-count { font-weight: 700; font-size: 14px; white-space: nowrap; }
.pack-meter { flex: 1; height: 6px; border-radius: 3px; background: var(--surface-2); overflow: hidden; }
.pack-meter i { display: block; height: 100%; background: var(--accent); border-radius: 3px; transition: width .25s; }
.pack-group { margin-bottom: 16px; }
.pack-group h3 { font-family: 'Fraunces', Georgia, serif; font-size: 16px; margin: 0 0 2px; display: flex; justify-content: space-between; align-items: baseline; }
.pack-group h3 .c { font-family: inherit; font-size: 12px; font-weight: 400; color: var(--ink-2); }
.pack-note { margin: 0 0 6px; font-size: 13px; color: var(--ink-2); }
.pack-group ul { list-style: none; margin: 0; padding: 0; }
.pack-group li { margin-bottom: 6px; }
.pack-group.leave li, .pack-item {
  display: flex; align-items: flex-start; gap: 10px; width: 100%; text-align: left; background: var(--surface);
  border: 1px solid var(--line); border-radius: 12px; padding: 9px 12px; font: inherit; color: inherit;
}
.pack-item { cursor: pointer; }
.pack-item:hover { border-color: var(--accent); }
.pack-group.shared .pack-item { border-style: dashed; }
.pack-item .box {
  flex: none; width: 20px; height: 20px; margin-top: 1px; border: 1.5px solid var(--line); border-radius: 6px;
  display: grid; place-items: center; font-size: 13px; font-weight: 700; color: #fff;
}
.pack-item[aria-pressed="true"] .box { background: var(--accent); border-color: var(--accent); }
.pack-item[aria-pressed="true"] .pt b { text-decoration: line-through; color: var(--ink-2); }
.pack-group .pi { flex: none; font-size: 16px; line-height: 1.3; }
.pack-group .pt { display: flex; flex-direction: column; gap: 1px; min-width: 0; }
.pack-group .pt b { font-size: 14px; font-weight: 600; }
.pack-group .pt b .pp { font-size: 12.5px; font-weight: 400; color: var(--ink-2); }
.pack-group .pt small { font-size: 12.5px; color: var(--ink-2); }
.pack-group.leave li { background: transparent; border-style: dashed; }
.pack-group.leave .pt b { font-weight: 500; }

/* bingo */
.bingo { display: grid; grid-template-columns: repeat(4, 1fr); gap: 6px; margin-bottom: 12px; }
.bingo button {
  aspect-ratio: 1; border: 1px solid var(--line); background: var(--surface); border-radius: 10px; padding: 5px;
  font-size: 11.5px; line-height: 1.25; display: grid; place-items: center; text-align: center;
}
.bingo button[aria-pressed="true"] { background: var(--accent); color: #fff; border-color: var(--accent); }
.bingo button.win { box-shadow: 0 0 0 3px var(--gold); }

/* budget */
.btable { width: 100%; border-collapse: collapse; font-size: 14px; margin-bottom: 14px; }
.btable th, .btable td { text-align: left; padding: 7px 4px; border-bottom: 1px solid var(--line); vertical-align: top; }
.btable td:last-child, .btable th:last-child { text-align: right; white-space: nowrap; }
.btable tfoot td { font-weight: 700; border-bottom: 0; font-size: 16px; }
.btable .sub { color: var(--ink-2); font-size: 12.5px; }

/* the search box and the detail card share the top-right corner, at the same width */
.mapwrap { --panel-w: min(420px, calc(100% - 24px)); }

/* filters */
.filters {
  position: absolute; top: 12px; left: 12px; right: calc(var(--panel-w) + 24px); z-index: 500; display: flex; gap: 6px; flex-wrap: nowrap; overflow-x: auto; scrollbar-width: none;
  padding-bottom: 6px;
}
.filters button {
  pointer-events: auto; border: 1px solid var(--line); background: var(--surface); border-radius: 999px;
  padding: 6px 11px; font-size: 13px; display: inline-flex; gap: 6px; align-items: center; box-shadow: 0 2px 8px rgba(0,0,0,.15); flex: none;
}
.filters button[aria-pressed="false"] { opacity: .5; }
.filters i { width: 10px; height: 10px; border-radius: 50%; display: inline-block; }

/* markers */
.pin {
  width: 30px; height: 30px; border-radius: 50%; display: grid; place-items: center; color: #fff; font: 700 13px 'DM Sans', sans-serif;
  border: 3px solid #fff; box-shadow: 0 2px 8px rgba(0,0,0,.35); transition: transform .15s;
}
.dot { width: 16px; height: 16px; border-radius: 50%; border: 2.5px solid #fff; box-shadow: 0 1px 5px rgba(0,0,0,.35); transition: transform .15s; }
.leaflet-marker-icon.sel .pin, .leaflet-marker-icon.sel .dot { transform: scale(1.35); }
.leaflet-marker-icon.dim { opacity: .35; }
.leaflet-tooltip.tip {
  background: var(--surface); color: var(--ink); border: 1px solid var(--line); border-radius: 10px; box-shadow: var(--shadow);
  padding: 8px 10px; width: max-content; max-width: 260px; white-space: normal; font: 13px/1.4 'DM Sans', sans-serif;
}
.leaflet-tooltip.tip b { display: block; font-size: 13.5px; }
.leaflet-tooltip.tip .v { display: block; font-size: 12px; color: var(--ink-2); margin-bottom: 2px; }
.leaflet-tooltip.tip .c { color: var(--accent); font-weight: 700; font-size: 12px; }
.leaflet-tooltip-top.tip::before { border-top-color: var(--surface); }
.leaflet-tooltip-bottom.tip::before { border-bottom-color: var(--surface); }
.leaflet-container { font-family: 'DM Sans', sans-serif; }
.leaflet-control-attribution { font-size: 10px; }

/* detail card */
.detail {
  position: absolute; z-index: 600; right: 12px; top: 60px; width: var(--panel-w); max-height: calc(100% - 110px);
  overflow-y: auto; background: var(--surface); border: 1px solid var(--line); border-radius: 16px; box-shadow: var(--shadow);
  padding: 16px 18px 14px;
}
.detail .x { position: absolute; top: 8px; right: 8px; border: 0; background: var(--surface-2); width: 30px; height: 30px; border-radius: 50%; }
.detail .kick { font-size: 12px; font-weight: 700; text-transform: uppercase; letter-spacing: .05em; margin-bottom: 3px; }
.detail h2 { font-size: 21px; padding-right: 30px; line-height: 1.15; }
.detail .venue { display: flex; gap: 4px; align-items: center; margin: 3px 0 0; font-size: 13px; color: var(--ink-2); }
.detail .venue svg { flex: none; width: 14px; height: 14px; }
.detail .hook { color: var(--ink-2); margin: 4px 0 10px; }
.facts { display: grid; grid-template-columns: repeat(3, auto); justify-content: start; gap: 4px 18px; margin: 0 0 10px; font-size: 13px; }
.facts dt { color: var(--ink-2); font-size: 11.5px; text-transform: uppercase; letter-spacing: .04em; }
.facts dd { margin: 0; font-weight: 700; }
.detail p { margin: 0 0 10px; font-size: 14px; }
.detail ul { margin: 0 0 10px; padding-left: 18px; font-size: 13.5px; }
.detail li { margin-bottom: 3px; }
.dist { background: var(--surface-2); border-radius: 10px; padding: 8px 10px; font-size: 13px; margin-bottom: 10px; }
.actions { display: flex; gap: 8px; flex-wrap: wrap; }
.actions a, .actions button {
  font-size: 13px; text-decoration: none; border: 1px solid var(--line); background: var(--surface); color: var(--ink);
  padding: 7px 12px; border-radius: 999px;
}
.actions .primary { background: var(--ink); color: var(--bg); border-color: var(--ink); }


/* footer */
.foot { margin-top: 26px; padding-top: 14px; border-top: 1px solid var(--line); font-size: 12px; color: var(--ink-2); }
.foot p { margin: 0 0 4px; }


/* search */
.search { position: absolute; z-index: 700; top: 12px; right: 12px; width: var(--panel-w); }
#q {
  width: 100%; height: 40px; padding: 0 38px 0 38px; border-radius: 999px; border: 1px solid var(--line);
  background: var(--surface) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='16' height='16' viewBox='0 0 24 24' fill='none' stroke='%23888' stroke-width='2.4' stroke-linecap='round'%3E%3Ccircle cx='11' cy='11' r='7'/%3E%3Cpath d='m20 20-3.5-3.5'/%3E%3C/svg%3E") no-repeat 14px center;
  color: var(--ink); font: inherit; font-size: 14.5px; box-shadow: 0 2px 8px rgba(0,0,0,.15); outline: none;
}
#q:focus { border-color: var(--accent); }
#q::placeholder { color: var(--ink-2); }
.qclear {
  position: absolute; right: 6px; top: 6px; width: 28px; height: 28px; border: 0; border-radius: 50%;
  background: var(--surface-2); font-size: 12px; color: var(--ink-2);
}
#results {
  list-style: none; margin: 8px 0 0; padding: 6px; max-height: min(420px, calc(100vh - 160px)); overflow-y: auto;
  background: var(--surface); border: 1px solid var(--line); border-radius: 16px; box-shadow: var(--shadow);
}
#results li {
  display: grid; grid-template-columns: 12px 1fr; gap: 10px; align-items: start; padding: 8px 10px; border-radius: 10px; cursor: pointer;
}
#results li i { width: 12px; height: 12px; border-radius: 50%; margin-top: 4px; }
#results li b { display: block; font-size: 14px; font-weight: 700; line-height: 1.3; }
#results li small { display: block; font-size: 12px; color: var(--ink-2); }
#results li[aria-selected="true"], #results li:hover { background: var(--surface-2); }
#results li.none { display: block; color: var(--ink-2); cursor: default; font-size: 14px; }
#results mark { background: none; color: var(--accent); }

/* gate */
dialog#gate {
  border: 1px solid var(--line); border-radius: 18px; background: var(--surface); color: var(--ink); padding: 22px; width: min(380px, 92vw);
  box-shadow: var(--shadow);
}
dialog#gate::backdrop { background: rgba(10, 12, 18, .55); backdrop-filter: blur(3px); }
.gate-kicker { margin: 0 0 4px; font-size: 12px; text-transform: uppercase; letter-spacing: .06em; color: var(--accent); font-weight: 700; }
#gate h2 { font-size: 22px; margin-bottom: 6px; }
#gateA {
  width: 100%; padding: 10px 12px; border-radius: 10px; border: 1px solid var(--line); background: var(--bg); color: var(--ink);
  font: inherit; font-size: 16px;
}
.gate-msg { min-height: 1.5em; font-size: 14px; color: var(--ink-2); }
.gate-msg.bad { color: var(--accent); }
.gate-row { display: flex; justify-content: flex-end; gap: 8px; }
#gateGo { border: 0; background: var(--ink); color: var(--bg); padding: 8px 18px; border-radius: 999px; }
.shake { animation: shake .35s; }
@keyframes shake { 20%, 60% { transform: translateX(-6px); } 40%, 80% { transform: translateX(6px); } }

/* falling numbers from the logo */
.fall {
  position: fixed; z-index: 9999; pointer-events: none; font: 700 20px 'Fraunces', serif; color: var(--accent);
  animation: fall 1.1s cubic-bezier(.3,.1,.7,1) forwards;
}
@keyframes fall { from { opacity: 1; transform: translate(0, 0) rotate(0); } to { opacity: 0; transform: translate(var(--dx), 140px) rotate(var(--r)); } }

#confetti { position: fixed; inset: 0; pointer-events: none; z-index: 9998; width: 100%; height: 100%; }

/* secret list */
.trad { background: var(--surface); border: 1px solid var(--line); border-radius: 12px; padding: 12px 14px; margin-bottom: 9px; }
.trad.picked { border-color: var(--gold); box-shadow: inset 0 0 0 1px var(--gold); }
.trad h3 { font-size: 17px; }
.trad .meta { font-size: 12px; color: var(--ink-2); margin: 2px 0 6px; }
.trad p { margin: 0 0 6px; font-size: 13.5px; }
.trad .how { background: var(--surface-2); border-radius: 8px; padding: 7px 9px; }
.badge { display: inline-block; font-size: 11px; font-weight: 700; background: var(--gold); color: #fff; border-radius: 999px; padding: 1px 8px; margin-left: 6px; vertical-align: 2px; }

/* phones */
@media (max-width: 820px) {
  .app { display: flex; flex-direction: column; height: auto; }
  .mapwrap { height: 58vh; height: 58svh; }
  .brand { padding: 12px 16px; border-right: 0; }
  .leaflet-control-zoom { display: none; }
  .side { border-right: 0; padding: 14px 16px 60px; overflow: visible; order: 2; }
  .brand h1 { font-size: 22px; }
  .detail { left: 8px; right: 8px; top: auto; width: auto; bottom: 8px; max-height: 62%; padding: 14px 14px 12px; }
  .search { top: 8px; left: 8px; right: 8px; width: auto; }
  #results { max-height: calc(58svh - 70px); }
  .times { top: 96px; left: 8px; right: 8px; }
  .filters { top: 56px; left: 8px; right: 8px; flex-wrap: nowrap; overflow-x: auto; pointer-events: auto; padding-bottom: 4px; scrollbar-width: none; }
  .filters button { flex: none; box-shadow: none; }
  .facts { grid-template-columns: repeat(3, auto); gap: 2px 12px; }
}

/* OpenStreetMap's default style is loud; calm it down, and invert it for dark mode */
.osm { filter: saturate(.55) contrast(.95) brightness(1.03); }
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) .osm { filter: invert(1) hue-rotate(185deg) saturate(.4) brightness(.85) contrast(.9); }
}
:root[data-theme="dark"] .osm { filter: invert(1) hue-rotate(185deg) saturate(.4) brightness(.85) contrast(.9); }

/* the activity whose card is open: highlighted in the plan list and the time strip */
.steps li { scroll-margin-top: 150px; scroll-margin-bottom: 12px; }
.step.sel .body { border-color: var(--dc); box-shadow: inset 0 0 0 1px var(--dc), 0 2px 10px rgba(0,0,0,.12); background: color-mix(in srgb, var(--dc) 9%, var(--surface)); }
.step.sel .num { transform: scale(1.12); box-shadow: 0 0 0 2px var(--dc); }
.go.sel .go-open { border-style: solid; background: color-mix(in srgb, var(--dc) 12%, var(--surface)); }




/* admin: dares review */
.dare-count { font-size: 13px; color: var(--ink-2); margin: -4px 0 10px; }
.dare { background: var(--surface); border: 1px solid var(--line); border-radius: 12px; padding: 10px 12px; margin-bottom: 8px; }
.dare.keep { border-color: #3f9c6d; box-shadow: inset 0 0 0 1px #3f9c6d; }
.dare.drop { opacity: .55; }
.dare-top { display: flex; gap: 8px; align-items: baseline; }
.dare-top p { margin: 0; font-weight: 600; font-size: 14px; }
.dare.drop .dare-top p { text-decoration: line-through; }
.dare-n { flex: none; font-size: 12px; font-weight: 700; color: var(--ink-2); width: 18px; }
.dare .meta { font-size: 12px; color: var(--ink-2); margin: 3px 0 8px 26px; }
.dare-row { display: flex; gap: 6px; margin-left: 26px; flex-wrap: wrap; }
.dare-row button { border: 1px solid var(--line); background: var(--surface); border-radius: 999px; padding: 4px 11px; font-size: 12.5px; }
.dare-row button[data-v="keep"][aria-pressed="true"] { background: #3f9c6d; border-color: #3f9c6d; color: #fff; }
.dare-row button[data-v="drop"][aria-pressed="true"] { background: var(--ink-2); border-color: var(--ink-2); color: var(--bg); }
.dare-row input { flex: 1; min-width: 160px; border: 1px solid var(--line); background: var(--bg); color: var(--ink); border-radius: 999px; padding: 4px 11px; font: inherit; font-size: 12.5px; }
.dare-foot { display: flex; align-items: center; gap: 8px; margin: 12px 0 4px; }

/* ── card blocks ── */
.detail h4 { margin: 0 0 6px; font-size: 11.5px; font-weight: 700; text-transform: uppercase; letter-spacing: .05em; color: var(--ink-2); display: flex; gap: 8px; align-items: center; flex-wrap: wrap; }
.detail section { margin: 0 0 12px; }
.detail .what { margin-bottom: 12px; }
.detail .tips { font-size: 13px; color: var(--ink-2); }

.journey { display: flex; align-items: stretch; gap: 4px; flex-wrap: wrap; margin: 0 0 12px; }
.j-node { display: flex; flex-direction: column; align-items: center; text-align: center; background: var(--surface-2); border-radius: 10px; padding: 6px 8px; min-width: 64px; flex: 1; }
.j-ic { font-size: 18px; line-height: 1.2; }
.j-node b { font-size: 12.5px; line-height: 1.2; }
.j-node small { font-size: 11px; color: var(--ink-2); line-height: 1.2; margin-top: 1px; }
.j-arrow { align-self: center; color: var(--ink-2); font-size: 13px; }

.sched { background: var(--surface-2); border-radius: 12px; padding: 9px 10px 6px; }
.sched.other { opacity: .6; }
.sched-note { margin: -2px 0 6px !important; font-size: 12.5px !important; color: var(--ink-2); }
.sched ol { list-style: none; margin: 0; padding: 0; }
.sched li { display: flex; align-items: center; gap: 8px; padding: 5px 6px; border-radius: 8px; font-size: 13px; font-variant-numeric: tabular-nums; }
.sched li + li { border-top: 1px solid var(--line); }
.sched li.ours { background: var(--surface); box-shadow: inset 0 0 0 1.5px var(--dc, var(--accent)); border-top-color: transparent; }
.sched li.ours + li { border-top-color: transparent; }
.s-time { min-width: 104px; }
.s-time b { font-size: 14.5px; }
.s-dash { color: var(--ink-2); margin: 0 5px; }
.s-line { color: #fff; font-weight: 700; font-size: 11.5px; border-radius: 5px; padding: 1px 6px; min-width: 22px; text-align: center; }
.s-min, .s-track { color: var(--ink-2); font-size: 12px; }
.s-tag { margin-left: auto; font-size: 11.5px; font-weight: 700; color: var(--ink-2); white-space: nowrap; }
.sched li.ours .s-tag { color: var(--dc, var(--accent)); }

.hours .legend { font-weight: 500; text-transform: none; letter-spacing: 0; font-size: 11.5px; gap: 4px; display: inline-flex; align-items: center; margin-left: auto; }
.hours .legend i { display: inline-block; width: 12px; height: 8px; border-radius: 2px; margin-left: 6px; }
.lg-open, .h-open { background: color-mix(in srgb, #3f9c6d 38%, var(--surface)); }
.lg-extra, .h-extra { background: repeating-linear-gradient(135deg, #d9822b 0 3px, color-mix(in srgb, #d9822b 45%, var(--surface)) 3px 6px); }
.lg-us, .h-us { background: var(--dc, var(--accent)); }
.h-row { display: grid; grid-template-columns: 30px 1fr 112px; gap: 8px; align-items: center; margin-bottom: 5px; opacity: .6; }
.h-row.today { opacity: 1; }
.h-day { font-size: 12px; font-weight: 700; }
.h-bar { position: relative; height: 14px; background: var(--surface-2); border-radius: 7px; overflow: hidden; }
.h-bar span { position: absolute; top: 0; bottom: 0; }
.h-bar .h-extra { top: 2px; bottom: 2px; border-radius: 3px; }
.h-bar .h-us { top: 3px; bottom: 3px; border-radius: 4px; box-shadow: 0 0 0 1.5px var(--surface); min-width: 4px; }
.h-txt { font-size: 12px; font-variant-numeric: tabular-nums; text-align: right; line-height: 1.25; }
.h-txt small { display: block; color: var(--ink-2); font-size: 11px; white-space: nowrap; }
.h-tickrow { opacity: 1; margin-top: -2px; }
.h-ticks { position: relative; height: 14px; }
.h-ticks span { position: absolute; transform: translateX(-50%); font-size: 10.5px; color: var(--ink-2); font-variant-numeric: tabular-nums; }

.stepsb ol, .pricesb ul { list-style: none; margin: 0; padding: 0; }
.stepsb li { display: flex; gap: 8px; align-items: flex-start; font-size: 13.5px; padding: 3px 0; }
.b-ic { flex: none; width: 22px; text-align: center; }
.pricesb li { display: flex; gap: 8px; align-items: baseline; font-size: 13.5px; padding: 4px 0; border-bottom: 1px dashed var(--line); }
.pricesb li:last-child { border-bottom: 0; }
.p-l { flex: 1; }
.pricesb b { font-variant-numeric: tabular-nums; white-space: nowrap; }
.tagsb { display: flex; flex-wrap: wrap; gap: 5px; margin: 0 0 12px; }
.tagsb span { font-size: 12px; background: var(--surface-2); border-radius: 999px; padding: 3px 9px; }

/* bingo: secret-number cards */
.bingo-form { display: flex; gap: 8px; }
.bingo-form input { flex: 1; min-width: 0; padding: 10px 14px; border-radius: 999px; border: 1px solid var(--line); background: var(--surface); color: var(--ink); font: inherit; font-size: 16px; }
.bingo-form button { border: 0; border-radius: 999px; background: var(--accent); color: #fff; font-weight: 700; padding: 0 18px; }
.bingo-rules { list-style: none; margin: 0 0 10px; padding: 0; font-size: 13px; color: var(--ink-2); }
.bingo-rules li { display: flex; gap: 7px; padding: 2px 0; }
.bingo-rules b { color: var(--ink); min-width: 58px; }
.bingo-won { background: color-mix(in srgb, var(--gold) 18%, var(--surface)); border: 1px solid var(--gold); border-radius: 12px; padding: 8px 12px; font-weight: 700; margin: 0 0 10px; }
.bingo button { position: relative; padding: 16px 5px 5px; }
.bingo .bk { position: absolute; top: 3px; left: 5px; font-size: 11px; }
.bingo button[data-k="dare"] { border-style: solid; }
.bingo button[data-k="moment"] { border-style: dashed; }
.bingo-actions { display: flex; gap: 8px; flex-wrap: wrap; }

/* ── the day bar (top left of the map) ── */
.times {
  position: absolute; z-index: 500; top: 54px; left: 12px; right: calc(var(--panel-w) + 24px);
  background: color-mix(in srgb, var(--surface) 92%, transparent); border: 1px solid var(--line); border-radius: 12px;
  padding: 3px 10px 7px; box-shadow: 0 2px 10px rgba(0,0,0,.15);
  transition: opacity .24s ease, transform .24s ease;
}
.times:empty { display: none; }
.times.away { opacity: 0; transform: translateY(-8px); pointer-events: none; }
.tl-scale { position: relative; height: 15px; }
.tl-tick { position: absolute; top: 0; bottom: -4px; border-left: 1px solid var(--line); }
.tl-tick i { position: absolute; left: 3px; top: 0; font-style: normal; font-size: 10.5px; color: var(--ink-2); font-variant-numeric: tabular-nums; line-height: 1.3; }
.tl-tick.minor { top: 9px; }
.tl-track { position: relative; height: 22px; }
.tl-seg {
  position: absolute; top: 2px; bottom: 2px; padding: 0; border: 0; border-radius: 5px; min-width: 3px; overflow: hidden;
  display: grid; place-items: center; cursor: default; box-shadow: 0 0 0 1px var(--surface);
  transition: opacity .2s ease, transform .2s ease, filter .15s; transition-delay: calc(var(--i, 0) * 18ms);
}
.tl-seg.tl-act { background: var(--dc); color: #fff; cursor: pointer; }
.tl-seg.tl-act b { font-size: 11px; font-weight: 700; line-height: 1; }
.tl-seg.tl-go, .tl-seg.tl-walk {
  top: 5px; bottom: 5px; background: repeating-linear-gradient(135deg, var(--ink-2) 0 2px, color-mix(in srgb, var(--ink-2) 25%, transparent) 2px 5px);
  border-radius: 3px;
}
.tl-seg.tl-go.can-open { cursor: pointer; top: 5px; bottom: 5px; box-shadow: 0 0 0 1px var(--dc); }
.tl-seg.tl-note { top: 7px; bottom: 7px; background: color-mix(in srgb, var(--ink-2) 22%, transparent); }
.tl-seg em { font-style: normal; font-size: 9px; line-height: 1; opacity: 0; }
.tl-seg.hot { filter: brightness(1.12); z-index: 1; box-shadow: 0 0 0 2px var(--surface), 0 0 0 3.5px var(--dc); }
.tl-seg.tl-act.hot { transform: scaleY(1.12); }
.times.away .tl-seg { opacity: 0; transform: translateY(-4px); }
.tl-tip {
  position: absolute; top: calc(100% + 6px); display: flex; gap: 8px; align-items: center; max-width: 280px;
  background: var(--surface); border: 1px solid var(--line); border-radius: 10px; padding: 6px 10px 6px 7px; box-shadow: var(--shadow);
  font-size: 12.5px; pointer-events: none; white-space: nowrap;
}
.tl-tip .tt-n { flex: none; width: 20px; height: 20px; border-radius: 50%; background: var(--dc); color: #fff; font-weight: 700; font-size: 11px; display: grid; place-items: center; }
.tl-tip .tt-ic { flex: none; width: 20px; text-align: center; }
.tl-tip .tt-body { min-width: 0; }
.tl-tip b { display: block; overflow: hidden; text-overflow: ellipsis; }
.tl-tip small { color: var(--ink-2); font-variant-numeric: tabular-nums; }

/* ── the clock: a big face, the time underneath ── */
.clock {
  position: absolute; z-index: 510; top: 54px; left: 12px; display: flex; flex-direction: column; align-items: center; gap: 3px;
  padding: 8px 10px 7px; border-radius: 18px; border: 1px solid var(--dc, var(--line));
  background: color-mix(in srgb, var(--dc, var(--accent)) 14%, var(--surface));
  box-shadow: inset 0 0 0 1px var(--dc, var(--line)), 0 4px 14px rgba(0,0,0,.18);
  opacity: 0; transform: translateY(-6px) scale(.9); transform-origin: top left;
  transition: opacity .26s ease, transform .26s cubic-bezier(.2,.9,.3,1.25);
}
.clock.in { opacity: 1; transform: none; transition-delay: .12s; }
.clock .face { width: 78px; height: 78px; }
.clock .rim { fill: var(--surface); stroke: var(--dc, var(--ink)); stroke-width: 1.6; }
.clock .ticks path { stroke: var(--ink-2); stroke-width: 1.4; stroke-linecap: round; fill: none; }
.clock .ticks path.minor { stroke-width: .8; }
.clock .hand { stroke-linecap: round; transform-origin: 20px 20px; transform-box: view-box; }
.clock .hand.h { stroke: var(--ink); stroke-width: 2.4; }
.clock .hand.m { stroke: var(--ink); stroke-width: 1.5; }
.clock .hand.s { stroke: var(--dc, var(--accent)); stroke-width: .8; }
.clock .pin { fill: var(--dc, var(--accent)); }
.clock .digits { font-size: 14px; font-weight: 700; font-variant-numeric: tabular-nums; color: var(--ink); line-height: 1.1; }
@media (max-width: 820px) {
  .times { top: 96px; left: 8px; right: 8px; }
  .clock { top: 96px; left: 8px; }
  .clock .face { width: 64px; height: 64px; }
}
@media (prefers-reduced-motion: reduce) { .clock, .times, .tl-seg { transition: none; } }
/* an invisible clock must not sit on top of the day bar and eat taps */
.clock[hidden] { display: none; }
.clock:not(.in) { pointer-events: none; }

.tl-tiny { pointer-events: none; }
.s-line { font-size: 11px; }

/* logistics links: roomy tap targets on phones, a quiet text link on desktop that
   opens up on hover */
@media (hover: hover) and (pointer: fine) {
  .go-open {
    background: none; border: 1px solid transparent; padding: 1px 6px 1px 4px; margin: 0 0 0 -4px;
    transition: background .15s, border-color .15s;
  }
  .go-open .gt { text-decoration: underline dotted color-mix(in srgb, var(--dc) 70%, transparent); text-underline-offset: 3px; }
  .go-open .go-more { opacity: 0; transform: translateX(-4px); transition: opacity .15s, transform .15s; }
  .go-open:hover, .go-open:focus-visible { background: var(--surface-2); border-color: var(--dc); border-style: dashed; }
  .go-open:hover .go-more, .go-open:focus-visible .go-more { opacity: 1; transform: none; }
  .go.sel .go-open { background: color-mix(in srgb, var(--dc) 12%, var(--surface)); border-color: var(--dc); border-style: solid; }
}

/* ── day colours: the trip as it happened is pink; the original plan (📜) is blue ── */
:root { --d-fri: var(--fri); --d-sat: var(--sat); --d-sun: var(--sat); }
:root.original { --d-fri: var(--secret); --d-sat: var(--secret); --d-sun: var(--secret); }

/* ── map layout: day bar + search share the top row; category chips at the bottom ── */
.times { top: 12px; height: 40px; box-sizing: border-box; padding: 4px 10px 0; }
.clock { top: 12px; }
.filters { top: auto; bottom: 12px; left: 12px; right: calc(var(--panel-w) + 24px); padding-bottom: 0; }
.tl-scale { height: 13px; }
.tl-tick { bottom: -3px; }
.tl-tick.minor { top: 8px; }
.tl-track { height: 19px; }

/* thin blocks at rest; a block grows to show its number on hover (or while its bubble is up) */
.tl-seg { top: 50%; bottom: auto; height: 6px; transform: translateY(-50%); transition: height .16s ease, opacity .2s ease, filter .15s, box-shadow .15s; }
.tl-seg.tl-act { height: 8px; border-radius: 4px; }
.tl-seg.tl-act b { opacity: 0; transition: opacity .12s; }
.tl-seg.tl-go, .tl-seg.tl-walk { top: 50%; bottom: auto; height: 4px; }
.tl-seg.tl-go.can-open { top: 50%; bottom: auto; height: 5px; }
.tl-seg.tl-note { top: 50%; bottom: auto; height: 3px; }
.tl-seg.tl-act:hover, .tl-seg.tl-act.hot { height: 18px; border-radius: 5px; }
.tl-seg.tl-act:hover b, .tl-seg.tl-act.hot b { opacity: 1; }
.tl-seg.tl-go.can-open:hover, .tl-seg.tl-go.hot { height: 11px; }
.tl-seg.tl-act.hot { transform: translateY(-50%); }
.tl-seg.hot { box-shadow: 0 0 0 1.5px var(--surface), 0 0 0 3px var(--dc); }
.times.away .tl-seg { transform: translateY(-50%) translateY(-4px); }
.tl-tip { top: calc(100% + 8px); }

@media (max-width: 820px) {
  .times { top: 56px; left: 8px; right: 8px; }
  .clock { top: 56px; left: 8px; }
  .filters { top: auto; bottom: 8px; left: 8px; right: 8px; }
}

/* hovering the bar (or a bubble being up) lifts every block at once, so all the numbers show */
.times:hover .tl-seg.tl-act, .times.expanded .tl-seg.tl-act { height: 18px; border-radius: 5px; }
.times:hover .tl-seg.tl-act b, .times.expanded .tl-seg.tl-act b { opacity: 1; }
.times:hover .tl-seg.tl-go, .times.expanded .tl-seg.tl-go,
.times:hover .tl-seg.tl-walk, .times.expanded .tl-seg.tl-walk { height: 7px; }
.times:hover .tl-seg.tl-go.can-open, .times.expanded .tl-seg.tl-go.can-open { height: 11px; }
.times:hover .tl-seg.tl-note, .times.expanded .tl-seg.tl-note { height: 5px; }

/* the bubble is clickable when there is a card behind it */
.tl-tip { pointer-events: auto; }
.tl-tip.can-open { cursor: pointer; }
.tl-tip.can-open:hover { border-color: var(--dc); }
.tl-tip .tt-go { margin-left: 4px; color: var(--dc); font-weight: 700; font-size: 16px; line-height: 1; }

/* ── bingo popup ── */
dialog.modal {
  border: 1px solid var(--line); border-radius: 18px; background: var(--bg); color: var(--ink);
  width: min(640px, calc(100vw - 24px)); max-height: calc(100dvh - 24px); padding: 0 18px 18px; box-shadow: var(--shadow);
  overflow-y: auto;
}
dialog.modal::backdrop { background: rgba(10, 12, 18, .55); backdrop-filter: blur(3px); }
.modal-head { position: sticky; top: 0; z-index: 1; background: var(--bg); display: flex; align-items: center; justify-content: space-between; padding: 14px 0 10px; }
.modal-head h2 { font-size: 22px; }
.modal-head .x { border: 0; background: var(--surface-2); width: 32px; height: 32px; border-radius: 50%; }
.bingo-deadline { font-size: 13px; background: color-mix(in srgb, var(--gold) 14%, var(--surface)); border-radius: 10px; padding: 7px 10px; margin: 0 0 10px; }
.bingo-out { font-size: 14px; background: var(--surface-2); border-radius: 12px; padding: 12px; }
.bingo { grid-template-columns: repeat(5, 1fr); gap: 5px; }
.bingo button { font-size: 11px; line-height: 1.2; padding: 15px 4px 4px; }
.bingo-lock { font-size: 12.5px; color: var(--ink-2); align-self: center; }
@media (max-width: 520px) {
  dialog.modal { padding: 0 10px 12px; }
  .bingo { gap: 3px; }
  .bingo button { aspect-ratio: auto; min-height: 76px; font-size: 9.5px; padding: 14px 2px 3px; border-radius: 8px; }
  .bingo .bk { font-size: 9px; top: 2px; left: 3px; }
}

/* ── the day bar's box grows with its blocks, keeping the padding ── */
.times { transition: height .16s ease, opacity .24s ease, transform .24s ease; }
.tl-track { transition: height .16s ease; }
.times:hover, .times.expanded { height: 48px; }
.times:hover .tl-track, .times.expanded .tl-track { height: 27px; }
.bingo-prize { font-size: 14px; border: 1px solid var(--gold); border-radius: 12px; padding: 9px 12px; margin: 0 0 10px; background: color-mix(in srgb, var(--gold) 10%, var(--surface)); }

/* the clock sits under the day bar (which now stays put) */
.clock { top: 60px; transform-origin: top left; }
.times:hover ~ .clock { top: 68px; }
.clock { transition: opacity .26s ease, transform .26s cubic-bezier(.2,.9,.3,1.25), top .16s ease; }
@media (max-width: 820px) { .clock { top: 104px; } .times:hover ~ .clock { top: 112px; } }

/* an open activity: its block stays lifted with its number, the rest rest thin */
.times.has-sel .tl-seg.tl-act.sel { height: 18px; border-radius: 5px; box-shadow: 0 0 0 1.5px var(--surface), 0 0 0 3px var(--dc); z-index: 1; }
.times.has-sel .tl-seg.tl-act.sel b { opacity: 1; }
.times.has-sel .tl-seg.tl-go.sel { height: 11px; box-shadow: 0 0 0 1.5px var(--surface), 0 0 0 3px var(--dc); z-index: 1; }
/* right after a click the pointer is still on the bar: show the selected look anyway,
   until the pointer leaves and comes back */
.times.quiet:hover { height: 40px; }
.times.quiet:hover .tl-track { height: 19px; }
.times.quiet .tl-seg.tl-act:not(.sel) { height: 8px; border-radius: 4px; }
.times.quiet .tl-seg.tl-act:not(.sel) b { opacity: 0; }
.times.quiet .tl-seg.tl-go:not(.sel), .times.quiet .tl-seg.tl-walk { height: 4px; }
.times.quiet .tl-seg.tl-go.can-open:not(.sel) { height: 5px; }
.times.quiet .tl-seg.tl-note { height: 3px; }
.times.quiet:hover ~ .clock { top: 60px; }
@media (max-width: 820px) { .times.quiet:hover ~ .clock { top: 104px; } }
@media (max-width: 820px) { .clock .face { width: 52px; height: 52px; } .clock { padding: 6px 8px 5px; } }
.modal-tools { display: flex; gap: 8px; align-items: center; }
#bingoTestLock { font-size: 12.5px; padding: 5px 11px; }
#bingoTestLock[aria-pressed="true"] { border-color: var(--secret); color: var(--secret); }
/* the bar (and its bubble) sits above the clock, which hangs just below it */
.times { z-index: 520; }

/* ── a winning line: gold-to-pink, B-I-N-G-O across it, a pop, a glow, and a sheen that
   sweeps along the line cell after cell, over and over ── */
.bingo button .bt { position: relative; z-index: 2; }
.bingo button .bk { z-index: 2; }
.bingo button.win {
  overflow: hidden; color: #fff; border-color: transparent; font-weight: 700;
  background: linear-gradient(135deg, #f6c453 0%, #f08a5d 45%, #e2527c 100%);
  box-shadow: 0 0 0 2px #f6c453, 0 6px 20px rgba(226, 82, 124, .45);
  text-shadow: 0 1px 2px rgba(120, 30, 60, .35);
  animation: winPop .55s cubic-bezier(.2,.9,.3,1.4) both, winGlow 1.8s ease-in-out infinite;
  animation-delay: calc(var(--k, 0) * 90ms), calc(var(--k, 0) * 150ms);
}
.bingo button.win::before {
  content: attr(data-letter); position: absolute; inset: 0; z-index: 1; display: grid; place-items: center;
  font: 800 clamp(34px, 7vw, 58px)/1 'Fraunces', Georgia, serif; color: rgba(255, 255, 255, .34);
  pointer-events: none;
}
.bingo button.win::after {
  content: ''; position: absolute; top: -20%; bottom: -20%; left: 0; width: 60%; z-index: 3; pointer-events: none;
  background: linear-gradient(100deg, transparent 0%, rgba(255,255,255,.0) 20%, rgba(255,255,255,.75) 50%, rgba(255,255,255,0) 80%, transparent 100%);
  transform: translateX(-160%) skewX(-12deg);
  animation: winSheen 2.6s ease-in-out infinite; animation-delay: calc(var(--k, 0) * 140ms + .6s);
}
@keyframes winPop { 0% { transform: scale(1); } 45% { transform: scale(1.12) rotate(-2deg); } 100% { transform: scale(1); } }
@keyframes winGlow {
  0%, 100% { box-shadow: 0 0 0 2px #f6c453, 0 6px 18px rgba(226, 82, 124, .4); }
  50% { box-shadow: 0 0 0 3px #ffe08a, 0 8px 28px rgba(246, 196, 83, .7); }
}
@keyframes winSheen { 0% { transform: translateX(-160%) skewX(-12deg); } 45%, 100% { transform: translateX(260%) skewX(-12deg); } }
@media (prefers-reduced-motion: reduce) {
  .bingo button.win, .bingo button.win::after { animation: none; }
}

/* confetti also lives inside the open bingo popup */
dialog #confetti { position: fixed; inset: 0; width: 100vw; height: 100vh; pointer-events: none; z-index: 10; }

/* ── the bingoed look: a player with a full line gets a gold-to-pink site ── */
:root { --bingo-grad: linear-gradient(135deg, #f6c453 0%, #f08a5d 45%, #e2527c 100%); }
/* logo: gradient, glow, and a sheen every few seconds */
.bingoed .logo { position: relative; overflow: hidden; background: var(--bingo-grad); border-color: transparent; box-shadow: 0 0 0 2px #f6c453, 0 4px 16px rgba(226, 82, 124, .45); animation: bingoGlow 2.4s ease-in-out infinite; }
.bingoed .logo::after {
  content: ''; position: absolute; top: -30%; bottom: -30%; left: 0; width: 55%; pointer-events: none;
  background: linear-gradient(100deg, transparent, rgba(255,255,255,.8), transparent);
  transform: translateX(-180%) skewX(-15deg); animation: bingoSheen 3.2s ease-in-out infinite;
}
/* the title's "Emma edition" shimmers gold-pink */
.bingoed .brand h1 em {
  background: linear-gradient(90deg, #f6c453, #e2527c, #f08a5d, #f6c453); background-size: 300% 100%;
  -webkit-background-clip: text; background-clip: text; color: transparent; animation: bingoShift 6s linear infinite;
}
.bingoed [data-tab="bingo"]::after { content: ' 🏆'; }
/* day bar: gradient blocks, a sheen that travels along the day */
.bingoed .tl-seg.tl-act { background: var(--bingo-grad); }
.bingoed .tl-seg.tl-act::after {
  content: ''; position: absolute; top: -40%; bottom: -40%; left: 0; width: 40px; pointer-events: none;
  background: linear-gradient(100deg, transparent, rgba(255,255,255,.85), transparent);
  transform: translateX(-60px) skewX(-15deg);
  animation: bingoSegSheen 3.6s ease-in-out infinite; animation-delay: calc(var(--p, 0) * 1.4s);
}
.bingoed .times { border-color: #f6c453; box-shadow: 0 0 0 1px #f6c453, 0 2px 12px rgba(246, 196, 83, .35); }
/* clock: gradient rim and time */
.bingoed .clock {
  border: 2px solid transparent;
  background: linear-gradient(var(--surface), var(--surface)) padding-box, var(--bingo-grad) border-box;
  box-shadow: 0 4px 18px rgba(226, 82, 124, .35);
}
.bingoed .clock .rim { stroke: #f08a5d; }
.bingoed .clock .hand.s, .bingoed .clock .pin { stroke: #e2527c; fill: #e2527c; }
.bingoed .clock .digits { background: var(--bingo-grad); -webkit-background-clip: text; background-clip: text; color: transparent; }
@keyframes bingoGlow { 0%, 100% { box-shadow: 0 0 0 2px #f6c453, 0 4px 14px rgba(226, 82, 124, .4); } 50% { box-shadow: 0 0 0 3px #ffe08a, 0 6px 22px rgba(246, 196, 83, .65); } }
@keyframes bingoSheen { 0% { transform: translateX(-180%) skewX(-15deg); } 40%, 100% { transform: translateX(280%) skewX(-15deg); } }
@keyframes bingoSegSheen { 0% { transform: translateX(-60px) skewX(-15deg); } 35%, 100% { transform: translateX(260px) skewX(-15deg); } }
@keyframes bingoShift { to { background-position: 300% 0; } }
@media (prefers-reduced-motion: reduce) {
  .bingoed .logo, .bingoed .logo::after, .bingoed .brand h1 em, .bingoed .tl-seg.tl-act::after { animation: none; }
}

/* ── the title lockup: "Emma's bachelorette" → "Emma in Helsinki" (see app.js) ── */
.lockup { display: flex; align-items: baseline; white-space: nowrap; overflow: hidden; }
.lockup em { color: var(--accent); font-style: italic; }
.lk-old { display: inline-block; transform-origin: left center; overflow: hidden; vertical-align: baseline; }
.lk-new { display: inline-block; opacity: 0; will-change: transform; }
.lockup.done .lk-old { display: none; }
.lockup.done .lk-new { opacity: 1; transform: none; }
.bingoed .lockup em {
  background: linear-gradient(90deg, #f6c453, #e2527c, #f08a5d, #f6c453); background-size: 300% 100%;
  -webkit-background-clip: text; background-clip: text; color: transparent; animation: bingoShift 6s linear infinite;
}

/* ── phones: an app, not a page ── */
.mdays-slot { display: none; }
@media (max-width: 820px) {
  html, body { height: 100%; overflow: hidden; }
  .app { display: flex; flex-direction: column; height: 100vh; height: 100dvh; }
  .brand { flex: none; padding: 10px 14px; }
  .brand .dates { display: none; }
  .brand h1 { font-size: 23px; }
  .logo { width: 44px; height: 44px; font-size: 22px; }
  .mapwrap { flex: 1 1 auto; height: auto; min-height: 0; }
  .side { flex: none; order: 2; padding: 0 12px calc(4px + env(safe-area-inset-bottom)); overflow: visible; border-top: 1px solid var(--line); }
  .side .sticky { position: static; padding: 0; margin: 0; }
  .side .panel, .side > .fine { display: none !important; }
  .tabs { margin: 0; border: 0; justify-content: space-around; }
  .tabs [data-tab="plan"] { display: none; }
  .tabs button[aria-selected="true"] { color: var(--ink-2); border-color: transparent; }
  .foot { margin: 0; padding: 0 0 4px; border: 0; text-align: center; font-size: 11px; }
  .foot-more { display: none; }
  .search { display: none; }

  /* the day picker takes the search bar's place on the map */
  .mdays-slot { display: block; position: absolute; z-index: 700; top: 8px; left: 8px; right: 8px; }
  .mdays-slot .days { display: flex; gap: 6px; }
  .mdays-slot .days button[data-day] {
    flex: 1; height: 40px; padding: 0 8px; border-radius: 12px; text-align: center; box-shadow: 0 2px 8px rgba(0,0,0,.15);
  }
  .mdays-slot .days button[data-day] { height: auto; min-height: 40px; padding: 4px 6px; }
  .mdays-slot .days button[data-day] .dwx { font-size: 11px; white-space: nowrap; }
  .mdays-slot .days button[data-day] b { font-size: 13.5px; }

  /* the day bar is always open on a phone: no thin state */
  .times, .times:hover, .times.quiet:hover { height: 48px; }
  .tl-track, .times:hover .tl-track, .times.quiet:hover .tl-track { height: 27px; }
  .tl-seg.tl-act, .times.quiet .tl-seg.tl-act:not(.sel) { height: 18px; border-radius: 5px; }
  .tl-seg.tl-act b, .times.quiet .tl-seg.tl-act:not(.sel) b { opacity: 1; }
  .tl-seg.tl-go, .tl-seg.tl-walk, .times.quiet .tl-seg.tl-go:not(.sel), .times.quiet .tl-seg.tl-walk { height: 7px; }
  .tl-seg.tl-go.can-open, .times.quiet .tl-seg.tl-go.can-open:not(.sel) { height: 11px; }
  .tl-seg.tl-note, .times.quiet .tl-seg.tl-note { height: 5px; }

  /* the clock lives in the detail panel, top right beside ✕: small, no time; a tap grows it */
  .detail .clock {
    position: absolute; top: 9px; right: 46px; left: auto; z-index: 5; padding: 0; border: 0; border-radius: 50%;
    background: none !important; box-shadow: none !important; gap: 0; transform-origin: top right; cursor: pointer;
    transition: transform .28s cubic-bezier(.2,.9,.3,1.2), opacity .2s ease;
  }
  .detail .clock .face { width: 30px; height: 30px; }
  .detail .clock .digits { display: none; }
  .detail .clock.in { transform: none; }
  .detail .clock.in.big { transform: scale(2.8); }
  .detail .clock.big .face { filter: drop-shadow(0 2px 3px rgba(0,0,0,.25)); }
  .detail h2 { padding-right: 76px; }
}
/* the whole title is the pink italic: "Emma" too */
.lockup .lk-emma { color: var(--accent); font-style: italic; }
.bingoed .lockup .lk-emma {
  background: linear-gradient(90deg, #f6c453, #e2527c, #f08a5d, #f6c453); background-size: 300% 100%;
  -webkit-background-clip: text; background-clip: text; color: transparent; animation: bingoShift 6s linear infinite;
}
/* "in Helsinki" is the plain part: ink, upright; Emma carries the pink italic */
.lockup .lk-new em { color: var(--ink); font-style: normal; }
.bingoed .lockup .lk-new em { background: none; -webkit-background-clip: border-box; background-clip: border-box; color: var(--ink); animation: none; }
.lockup .lk-new { margin-left: .08em; } /* the italic a leans into the space before 'in' */

/* ── phones: the detail card is a bottom sheet over the tab bar ── */
.sh-chrome { display: none; }
@media (max-width: 820px) {
  .foot { display: none; }
  .detail {
    position: fixed; left: 0; right: 0; top: auto; bottom: 0; width: auto; z-index: 900;
    height: var(--sheet-h, 60vh); max-height: none; border-radius: 20px 20px 0 0; border-bottom: 0;
    padding: 0 16px calc(18px + env(safe-area-inset-bottom));
    transform: translate(var(--sheet-x, 0px), var(--sheet-y, 0px));
    transition: transform .3s cubic-bezier(.2, .8, .2, 1);
    overflow-y: hidden; overscroll-behavior: contain; touch-action: none;
    box-shadow: 0 -8px 30px rgba(0,0,0,.22);
  }
  .detail.full { overflow-y: auto; touch-action: pan-y; }
  .detail.dragging { transition: none; }
  .sh-chrome { display: flex; flex-direction: column; align-items: center; gap: 4px; position: sticky; top: 0; z-index: 4; background: var(--surface); margin: 0 -16px 4px; padding: 8px 0 6px; }
  .sh-grab { width: 40px; height: 5px; border-radius: 3px; background: var(--line); }
  .sh-pos { display: flex; align-items: center; gap: 10px; font-size: 12px; color: var(--ink-2); font-variant-numeric: tabular-nums; }
  .sh-pos b { font-weight: 700; }
  .sh-pos i { display: inline-block; width: 6px; }
  .sh-hint { font-size: 12px; font-weight: 700; color: var(--dc); animation: shHint 1.6s ease-in-out 3; }
  @keyframes shHint { 0%, 100% { transform: translateX(0); } 40% { transform: translateX(-10px); } 60% { transform: translateX(-10px); } }
  .detail .x { top: 34px; right: 12px; }
  .detail .clock { top: 36px; right: 52px; }
}
@media (max-width: 820px) {
  .detail { z-index: 1100; } /* above Leaflet's controls (1000), e.g. the attribution */
  .detail .x { z-index: 6; }
}

/* the logo stands out from the page: a pink ring and a soft pink glow */
.logo {
  border: 2px solid var(--accent);
  box-shadow: 0 0 0 4px color-mix(in srgb, var(--accent) 14%, transparent), 0 4px 14px rgba(181, 72, 95, .28);
}

/* the logo, take two: no ring (it framed a pale emoji on a pale disc, i.e. nothing).
   Keep the soft glow, give the disc a blush fill the gold glasses can sit on, and
   lift the glasses themselves: richer colour and a small shadow under them. */
.logo {
  border: 0;
  background: radial-gradient(circle at 38% 32%, #fff 0%, #fbe6ec 48%, #f2c4d1 100%);
  box-shadow: 0 4px 14px rgba(181, 72, 95, .28);
}
.logo-ic {
  display: inline-block; line-height: 1;
  filter: saturate(1.5) contrast(1.15) drop-shadow(0 1.5px 1.5px rgba(110, 35, 55, .35));
}
.bingoed .logo-ic { filter: saturate(1.3) drop-shadow(0 1.5px 2px rgba(110, 35, 55, .45)); }
/* the logo's own drawn flutes: deep-pink outline, gold bubbly, white bubbles */
.logo { display: grid; place-items: center; }
.logo svg.logo-ic { width: 36px; height: 36px; filter: drop-shadow(0 1px 1px rgba(110, 35, 55, .25)); }
.logo-ic .g { fill: rgba(255, 255, 255, .75); stroke: #a8364f; stroke-width: 1.3; stroke-linejoin: round; }
.logo-ic .b { fill: #f2b233; }
.logo-ic .u { fill: #fff6d6; }
.logo-ic .s { fill: none; stroke: #a8364f; stroke-width: 1.3; stroke-linecap: round; }
.logo-ic .k { fill: none; stroke: #e2527c; stroke-width: 1.3; stroke-linecap: round; }
@media (max-width: 820px) { .logo svg.logo-ic { width: 32px; height: 32px; } }
/* the logo, take three: no glow (it melted into the page); a thin, soft rose edge instead */
.logo { border: 1px solid rgba(168, 54, 79, .28); box-shadow: inset 0 1px 0 rgba(255, 255, 255, .7); }
/* flute layers: glass fill underneath, then the bubbly, then the outline on top of everything */
.logo-ic .gf { fill: rgba(255, 255, 255, .75); }
.logo-ic .g { fill: none; }

/* ── phones: swiping between cards ── */
.detail.peek { display: none; }
@media (max-width: 820px) {
  .detail {
    transform: translate(var(--sheet-x, 0px), calc(var(--sheet-y, 0px) + var(--sheet-dy, 0px))) rotate(var(--sheet-r, 0deg));
    transform-origin: 50% 115%;
  }
  .detail.flying { transition: transform .23s cubic-bezier(.4, 0, .9, .6); }
  /* the next card, waiting underneath: slightly smaller and dimmer, growing as you swipe */
  .detail.peek {
    display: block; z-index: 1099; pointer-events: none; overflow: hidden;
    transform: translateY(var(--sheet-y, 0px)) scale(var(--peek-s, .93)); transform-origin: 50% 0;
    opacity: var(--peek-o, .55); transition: transform .23s ease, opacity .23s ease;
  }
  .detail.peek[hidden] { display: none; }
  .detail.peek.dragging { transition: none; }
  .detail.peek .x { pointer-events: none; }
}
@media (max-width: 820px) {
  /* the card underneath is solid (no map showing through), just a touch shaded until it arrives */
  .detail.peek { opacity: 1; filter: brightness(calc(.9 + var(--peek-o, .55) * .1)); transition: transform .23s ease, filter .23s ease; }
  /* admin tabs stay on desktop */
  .tabs #secretTab { display: none !important; }
}
@media (max-width: 820px) {
  /* the next card rises into place as you swipe (the swipe drives it) */
  .detail.peek { transform: translateY(calc(var(--sheet-y, 0px) + var(--peek-lift, 56px))) scale(var(--peek-s, .93)); }
}

/* belt and braces: whatever else is on the card, 'dragging' means no transition */
.detail.dragging, .detail.flying.dragging { transition: none !important; }

/* ── the 📜 button: the trip as it happened ⇄ the original plan ── */
.mode {
  margin-left: auto; flex: none; width: 36px; height: 36px; display: grid; place-items: center; padding: 0;
  border: 1px solid var(--line); background: var(--surface); border-radius: 50%; font-size: 18px; line-height: 1; cursor: pointer;
  transition: background .15s, border-color .15s, box-shadow .15s;
}
.mode:hover { border-color: var(--secret); }
.mode[aria-pressed="true"] {
  background: color-mix(in srgb, var(--secret) 18%, var(--surface)); border-color: var(--secret);
  box-shadow: 0 0 0 2px color-mix(in srgb, var(--secret) 25%, transparent);
}
/* each mode has its own tabs */
:root:not(.original) .tabs [data-mode="original"], :root.original .tabs [data-mode="actual"] { display: none; }
:root.original .tabs button[aria-selected="true"] { border-color: var(--secret); }

/* ── media: the strip on a card ── */
.mc { position: relative; margin: 2px 0 12px; }
.mc-track {
  position: relative; display: flex; gap: 8px; overflow-x: auto; scroll-snap-type: x mandatory;
  scrollbar-width: none; overscroll-behavior-x: contain; touch-action: pan-x; border-radius: 12px;
}
.mc-track::-webkit-scrollbar { display: none; }
.mc-slide {
  position: relative; flex: 0 0 100%; height: 200px; padding: 0; border: 0; border-radius: 12px; overflow: hidden;
  background: var(--surface-2); scroll-snap-align: start; cursor: zoom-in;
}
.mc.many .mc-slide { flex-basis: 86%; } /* the next one peeks in: there is more */
.mc-slide img, .mc-slide video, .gal-item img, .gal-item video { display: block; width: 100%; height: 100%; object-fit: cover; }
.mc-play {
  position: absolute; inset: 0; margin: auto; width: 44px; height: 44px; border-radius: 50%; display: grid; place-items: center;
  background: rgba(0, 0, 0, .45); color: #fff; font-size: 16px; pointer-events: none;
}
.mc-count {
  position: absolute; top: 8px; right: 8px; padding: 2px 8px; border-radius: 999px; font-size: 11.5px; font-weight: 700;
  background: rgba(0, 0, 0, .5); color: #fff; font-variant-numeric: tabular-nums; pointer-events: none;
}
.mc-dots { display: flex; justify-content: center; gap: 5px; margin-top: 7px; }
.mc-dots i { width: 6px; height: 6px; border-radius: 50%; background: var(--line); transition: background .2s, transform .2s; }
.mc-dots i.on { background: var(--dc, var(--accent)); transform: scale(1.25); }
.mc-nav {
  position: absolute; top: 100px; transform: translateY(-50%); width: 34px; height: 34px; padding: 0; border: 0; border-radius: 50%;
  background: rgba(0, 0, 0, .5); color: #fff; font-size: 22px; line-height: 1; opacity: 0; transition: opacity .15s;
}
.mc-prev { left: 8px; } .mc-next { right: 8px; }
.mc:hover .mc-nav, .mc-nav:focus-visible { opacity: 1; }
.mc .mc-nav:disabled { opacity: 0; pointer-events: none; }
@media (pointer: coarse) { .mc-nav { display: none; } } /* fingers swipe */

/* ── the viewer: full screen, swipe between photos, Save at the bottom ── */
.viewer {
  width: 100vw; height: 100vh; height: 100dvh; max-width: none; max-height: none; margin: 0; padding: 0; border: 0;
  background: rgba(0, 0, 0, .78); color: #fff; overflow: hidden;
}
.viewer::backdrop { background: transparent; }
.vw-track { display: flex; width: 100%; height: 100%; overflow-x: auto; overflow-y: hidden; scroll-snap-type: x mandatory; scrollbar-width: none; overscroll-behavior: contain; }
.vw-track::-webkit-scrollbar { display: none; }
.vw-slide {
  flex: 0 0 100%; height: 100%; display: flex; align-items: center; justify-content: center;
  scroll-snap-align: center; scroll-snap-stop: always; padding: 60px 0 88px; cursor: zoom-out;
}
.vw-slide img, .vw-slide video { cursor: auto; display: block; max-width: 100%; max-height: 100%; width: auto; height: auto; object-fit: contain; }
.vw-x, .vw-nav, .vw-save { position: absolute; border: 0; color: #fff; cursor: pointer; }
.vw-x { top: calc(10px + env(safe-area-inset-top)); right: 12px; width: 40px; height: 40px; border-radius: 50%; background: rgba(255, 255, 255, .14); font-size: 18px; }
.vw-count { position: absolute; top: calc(20px + env(safe-area-inset-top)); left: 0; right: 0; text-align: center; font-size: 13px; font-weight: 700; font-variant-numeric: tabular-nums; pointer-events: none; }
.vw-nav { top: 50%; transform: translateY(-50%); width: 46px; height: 46px; border-radius: 50%; background: rgba(255, 255, 255, .14); font-size: 26px; line-height: 1; }
.vw-nav:disabled { opacity: 0; pointer-events: none; }
.vw-prev { left: 14px; } .vw-next { right: 14px; }
.viewer.single .vw-nav, .viewer.single .vw-thumbs { display: none; }
.viewer:not(.single) .vw-slide { padding-bottom: 156px; }
.vw-cap { position: absolute; top: calc(38px + env(safe-area-inset-top)); left: 60px; right: 60px; text-align: center; font-size: 12.5px; color: rgba(255, 255, 255, .75); pointer-events: none; }
.vw-thumbs {
  position: absolute; left: 0; right: 0; bottom: calc(12px + env(safe-area-inset-bottom)); display: flex; gap: 6px;
  padding: 0 12px; overflow-x: auto; scrollbar-width: none; justify-content: safe center;
}
.vw-thumbs::-webkit-scrollbar { display: none; }
.vw-thumbs button {
  flex: none; width: 54px; height: 54px; padding: 0; border: 2px solid transparent; border-radius: 8px; overflow: hidden;
  background: #222; opacity: .55; cursor: pointer; transition: opacity .15s, border-color .15s;
}
.vw-thumbs button.on { opacity: 1; border-color: #fff; }
.vw-thumbs img, .vw-thumbs video { display: block; width: 100%; height: 100%; object-fit: cover; }
.viewer:not(.single) .vw-save { bottom: calc(82px + env(safe-area-inset-bottom)); }
.vw-thumbs:has(button:only-child) { display: none; }
.vw-save {
  left: 50%; bottom: calc(20px + env(safe-area-inset-bottom)); transform: translateX(-50%);
  display: inline-flex; align-items: center; gap: 8px; padding: 11px 22px; border-radius: 999px;
  background: #fff; color: #111; font: 700 14px/1 'DM Sans', system-ui, sans-serif; box-shadow: 0 4px 18px rgba(0, 0, 0, .4);
}
@media (pointer: coarse) { .vw-nav { display: none; } } /* fingers swipe */

/* ── gallery: the trip as a storyline, a row of thumbnails per activity ── */
.st-group { margin-bottom: 16px; }
.st-head {
  display: flex; flex-direction: column; align-items: flex-start; width: 100%; padding: 0 0 6px; margin: 0;
  border: 0; background: none; text-align: left; cursor: pointer; color: var(--ink);
}
.st-when { font-size: 12px; font-weight: 700; color: var(--dc); }
.st-head b { font-family: 'Fraunces', Georgia, serif; font-size: 16px; }
.st-head:hover b { text-decoration: underline; text-underline-offset: 3px; }
.gal { display: grid; grid-template-columns: repeat(5, 1fr); gap: 4px; }
.folded .gal-item:nth-child(n+6) { display: none; }
.gal-more > span { display: none; }
.folded .gal-more { cursor: pointer; }
.folded .gal-more > span {
  position: absolute; inset: 0; display: grid; place-items: center; background: rgba(0, 0, 0, .5);
  color: #fff; font-size: 17px; font-weight: 700; font-variant-numeric: tabular-nums;
}
.gal-item { position: relative; aspect-ratio: 1; padding: 0; border: 0; border-radius: 8px; overflow: hidden; background: var(--surface-2); cursor: zoom-in; }
.empty { color: var(--ink-2); font-size: 14px; text-align: center; padding: 24px 0; margin: 0; }

/* ── swish ── */
.pc { display: inline-flex; align-items: center; gap: 6px; font-weight: 700; font-size: 14px; color: var(--ink); }
.pc::before { content: ""; width: 10px; height: 10px; border-radius: 50%; background: var(--pc); flex: none; }
.sw-pay { background: var(--surface); border: 1px solid var(--line); border-radius: 14px; padding: 0 14px; margin-bottom: 10px; }
.sw-row { display: flex; align-items: center; gap: 8px; padding: 12px 0; border-bottom: 1px solid var(--line); }
.sw-row:last-child { border-bottom: 0; }
.sw-arrow { color: var(--ink-2); }
.sw-row b { margin-left: auto; font-size: 15px; font-variant-numeric: tabular-nums; }
.sw-kr { min-width: 64px; text-align: right; color: var(--ink-2); font-size: 13px; font-variant-numeric: tabular-nums; }
.sw-square { margin: 10px 0; font-weight: 700; text-align: center; }
.sw-people { display: grid; grid-template-columns: repeat(4, 1fr); gap: 6px; margin-bottom: 14px; }
.sw-p { border-radius: 10px; padding: 6px 4px; text-align: center; background: color-mix(in srgb, var(--pc) 12%, var(--surface)); border-top: 3px solid var(--pc); }
.sw-p b { display: block; font-size: 12.5px; }
.sw-p span { font-size: 12.5px; font-variant-numeric: tabular-nums; color: var(--ink-2); }
.sw-bills { list-style: none; margin: 0; padding: 0; }
.sw-bills li {
  display: flex; align-items: center; gap: 10px; padding: 9px 10px; margin-bottom: 6px; border-radius: 10px;
  background: var(--surface); border: 1px solid var(--line); border-left: 4px solid var(--pc);
}
.sw-bills .pc { min-width: 58px; }
.sw-what { flex: 1; min-width: 0; display: flex; flex-direction: column; }
.sw-what b { font-size: 14px; font-weight: 600; }
.sw-what small { font-size: 12px; color: var(--ink-2); }
.sw-amt { font-weight: 700; font-variant-numeric: tabular-nums; }
.sw-photo { flex: none; width: 38px; height: 38px; padding: 0; border: 0; border-radius: 6px; overflow: hidden; cursor: zoom-in; background: var(--surface-2); }
.sw-photo img { width: 100%; height: 100%; object-fit: cover; display: block; }
.brand { gap: 10px; }
.brand > div { flex: 1 1 auto; min-width: 0; }

/* the Swish QR: a small button on each payment, a popup with the code */
.sw-qr {
  flex: none; width: 32px; height: 32px; display: grid; place-items: center; padding: 0; margin-left: 2px;
  border: 1px solid var(--line); border-radius: 8px; background: var(--surface); color: var(--ink); cursor: pointer;
}
.sw-qr:hover { border-color: var(--accent); color: var(--accent); }
.qr-box { width: min(340px, calc(100vw - 32px)); }
.qr-box .modal-head h2 { display: flex; align-items: center; gap: 8px; font-size: 16px; }
.qr-amt { margin: 4px 0 10px; text-align: center; font-size: 24px; font-weight: 700; font-variant-numeric: tabular-nums; }
.qr-code { background: #fff; border-radius: 12px; padding: 8px; }
.qr-code svg { display: block; width: 100%; height: auto; }
.qr-open {
  display: block; margin-top: 12px; padding: 12px; border-radius: 999px; text-align: center; text-decoration: none;
  background: var(--accent); color: #fff; font-weight: 700;
}
.sw-row b, .sw-amt, .sw-p span { white-space: nowrap; }
@media (max-width: 420px) { .sw-row .sw-kr { display: none; } .sw-row { gap: 6px; } }

/* the tally: everyone spends the same on the shared bills; direct bills make up the rest */
.sw-tally { width: 100%; border-collapse: collapse; margin: 4px 0 16px; font-size: 13px; font-variant-numeric: tabular-nums; table-layout: fixed; }
.sw-tally th, .sw-tally td { padding: 6px 2px; text-align: right; white-space: nowrap; }
.sw-tally thead th { font-size: 12.5px; color: var(--ink); border-bottom: 3px solid var(--pc); padding-bottom: 4px; }
.sw-tally tbody th { text-align: left; font-weight: 500; color: var(--ink-2); width: 60px; }
.sw-tally tr.equal td { font-weight: 700; color: var(--ink); }
.sw-tally tr.sub td, .sw-tally tr.sub th { border-bottom: 1px solid var(--line); }
.sw-tally tr.total td, .sw-tally tr.total th { font-weight: 700; color: var(--ink); border-top: 2px solid var(--ink); }
.sw-tally td { color: var(--ink-2); }
.sw-h { display: flex; align-items: baseline; justify-content: space-between; gap: 8px; margin: 14px 0 8px; font-family: 'Fraunces', Georgia, serif; font-size: 16px; }
.sw-h span { font-family: 'DM Sans', system-ui, sans-serif; font-size: 12.5px; font-weight: 500; color: var(--ink-2); }
@media (max-width: 420px) { .sw-tally { font-size: 11.5px; } .sw-tally tbody th { width: 52px; } }
.sw-tally thead th.sw-unit { text-align: left; font-weight: 500; color: var(--ink-2); border-bottom-color: transparent; }

/* the Drive folder with everything, above the storyline */
.gal-drive {
  display: flex; align-items: center; gap: 10px; margin: 0 0 14px; padding: 10px 14px; border-radius: 12px;
  border: 1px solid var(--line); background: var(--surface); color: var(--ink); font-weight: 600; text-decoration: none;
}
.gal-drive:hover { border-color: var(--accent); }
.gal-drive span { margin-left: auto; color: var(--ink-2); }
.vw-thumbs button, .gal-item { position: relative; }
.vw-thumbs .mc-play, .gal-item .mc-play { width: 26px; height: 26px; font-size: 10px; }
/* a mouse drags the photo strips: no snapping while the photos follow the pointer */
.mc-track.dragging, .vw-track.dragging { scroll-snap-type: none; cursor: grabbing; }
.mc-track.dragging .mc-slide, .vw-track.dragging .vw-slide { cursor: grabbing; }
.mc-slide img, .vw-slide img { -webkit-user-drag: none; user-select: none; }
.vw-slide video { touch-action: pan-x pan-y; }
/* a payment that has been made. It starts out like the others; on "go", green sweeps across
   the row from the left, then the QR icon shrinks away and a tick pops in with a ring */
.sw-pay { overflow: hidden; }
.sw-row.paid { position: relative; margin: 0 -14px; padding-left: 14px; padding-right: 14px; }
.sw-row.paid::before {
  content: ""; position: absolute; inset: 0; z-index: 0; background: color-mix(in srgb, #1f9e5a 13%, var(--surface));
  transform: scaleX(0); transform-origin: left center; transition: transform .9s cubic-bezier(.65, 0, .25, 1);
}
.sw-row.paid > * { position: relative; z-index: 1; }
.sw-row.paid b, .sw-row.paid .sw-kr { transition: color .5s ease .55s; }
.sw-row.paid.go::before { transform: scaleX(1); }
.sw-row.paid.go b, .sw-row.paid.go .sw-kr { color: #1f9e5a; }
/* the button: the QR button's look until the tick takes over */
.sw-row .sw-done {
  flex: none; width: 32px; height: 32px; margin-left: 2px; padding: 0; display: grid; place-items: center; overflow: visible;
  border: 1px solid var(--line); border-radius: 8px; background: var(--surface); color: var(--ink); cursor: default;
  transition: background .25s ease .9s, border-color .25s ease .9s, border-radius .25s ease .9s;
}
.sw-row .sw-done.sw-photo { cursor: zoom-in; }
.sw-done .sw-q, .sw-done .sw-t { grid-area: 1 / 1; display: grid; place-items: center; }
.sw-done .sw-q { transition: transform .22s ease .85s, opacity .22s ease .85s; }
.sw-done .sw-t { color: #fff; font-size: 18px; font-weight: 800; line-height: 1; transform: scale(0); }
.sw-row.paid.go .sw-done { background: #1f9e5a; border-color: #1f9e5a; border-radius: 50%; }
.sw-row.paid.go .sw-done .sw-q { transform: scale(0); opacity: 0; }
.sw-row.paid.go .sw-done .sw-t { animation: swTick .6s cubic-bezier(.2, .9, .3, 1.4) 1.05s both; }
.sw-row.paid.go .sw-done::after {
  content: ""; position: absolute; inset: 0; border-radius: 50%; border: 2px solid #1f9e5a; pointer-events: none;
  opacity: 0; /* hidden until the tick has popped: no backwards fill, or its first frame shows during the wait */
  animation: swRing .7s ease-out 1.25s forwards;
}
.sw-row.paid.go .sw-done.sw-photo:hover { box-shadow: 0 0 0 3px color-mix(in srgb, #1f9e5a 30%, transparent); }
@keyframes swTick { 0% { transform: scale(0) rotate(-25deg); } 55% { transform: scale(1.45) rotate(8deg); } 78% { transform: scale(.88) rotate(-3deg); } 100% { transform: scale(1) rotate(0); } }
@keyframes swRing { 0% { transform: scale(1); opacity: .9; } 100% { transform: scale(2.1); opacity: 0; } }
@media (prefers-reduced-motion: reduce) {
  .sw-row.paid::before, .sw-row.paid b, .sw-row.paid .sw-kr, .sw-row .sw-done, .sw-done .sw-q { transition: none; }
  .sw-row.paid.go .sw-done .sw-t { animation: none; transform: none; }
  .sw-row.paid.go .sw-done::after { animation: none; opacity: 0; }
}
