* { box-sizing: border-box; }
[hidden] { display: none !important; }
/* Brand colours ("Teal and tangerine", Manny's pick): deep teal as the main colour, tangerine as the pop,
   on a background tinted toward teal. Change them here and the whole app follows. */
:root {
  --brand-header: #111111;      /* black header (Manny's call) */
  --brand-dark: #0b5563;        /* deep teal: selected chips, main buttons, counters */
  --brand-dark-2: #13707f;      /* lighter teal: badges, pressed and hover states */
  --brand-accent: #ff7a1a;      /* tangerine: logo, Sign in, switched-on buttons, avatars */
  --brand-accent-hover: #ff9140;
  --brand-pop: #ff7a1a;         /* tangerine: active tab line, hover edges, focus rings, checkboxes */
  --brand-accent-text: #0b5563; /* teal for text and links on the light background */
  --brand-accent-light: #ffb27a;/* light tangerine for text on teal overlays */
  --brand-ink: #05262d;         /* very dark teal: body text (instead of black) */
  --brand-on-dark: #ffdec6;     /* pale tangerine: text on teal (instead of white) */
  --brand-canvas: #eef3f4;      /* teal-tinted: page and list background */
  --brand-surface: #f8fafb;     /* lighter teal tint: cards, pop-ups, inputs */
  --brand-board: #101010;       /* near-black: the Moves board (gig-poster wall) */
}
body { margin: 0; font-family: system-ui, -apple-system, Segoe UI, Roboto, sans-serif; color: var(--brand-ink); background: var(--brand-canvas); }
header { display: flex; justify-content: space-between; align-items: center; padding: 10px 16px; background: var(--brand-header); color: var(--brand-on-dark); }
.brand { font-weight: 700; font-size: 20px; }
.brand-name { color: var(--brand-accent); letter-spacing: .5px; }
.badge { font-size: 11px; font-weight: 500; background: var(--brand-dark-2); color: var(--brand-on-dark); padding: 2px 6px; border-radius: 4px; margin-left: 6px; vertical-align: middle; }
#auth-area { display: flex; gap: 8px; align-items: center; font-size: 13px; }
#auth-area .btn { white-space: nowrap; }

main { display: flex; height: calc(100vh - 52px); }
#panel { width: 420px; max-width: 100%; flex: none; overflow-y: auto; padding: 12px; background: var(--brand-canvas); border-right: 1px solid #d5e3e5; transition: width .3s ease; }
#map-wrap { flex: 1; position: relative; overflow: hidden; }
#map { position: absolute; inset: 0; z-index: 0; } /* keeps Leaflet's layers below the place card */
@media (max-width: 760px) {
  main { flex-direction: column-reverse; height: auto; }
  #map-wrap { height: 40vh; flex: none; }
  #panel { width: 100%; border-right: none; }
}

.search { display: flex; gap: 8px; align-items: center; }
.search input[type=search] { flex: 1; padding: 9px 10px; border: 1px solid #cddde0; border-radius: 8px; font-size: 15px; }
.toggle { font-size: 13px; white-space: nowrap; }

.tags-toggle { display: flex; align-items: center; gap: 6px; margin-top: 10px; padding: 4px 0; background: none; border: none; font-size: 13px; font-weight: 600; color: #13414b; cursor: pointer; }
.tags-toggle .caret { display: inline-block; font-size: 11px; transition: transform .15s ease; }
.tags-toggle[aria-expanded="true"] .caret { transform: rotate(90deg); }
.tags-count { background: var(--brand-dark); color: var(--brand-on-dark); border-radius: 999px; font-size: 11px; padding: 1px 7px; }
.chips { display: flex; flex-wrap: wrap; gap: 6px; margin: 10px 0; }
.chip { border: 1px solid #cddde0; background: var(--brand-surface); border-radius: 999px; padding: 4px 10px; font-size: 12px; cursor: pointer; }
.chip.on { background: var(--brand-dark); color: var(--brand-on-dark); border-color: var(--brand-dark); }
.kind-chip { border-color: var(--kind); color: var(--brand-ink); display: inline-flex; align-items: center; gap: 5px; }
.kind-chip::before, .kind-dot { content: ""; width: 9px; height: 9px; border-radius: 50%; background: var(--kind); flex: none; }
.kind-chip.on { background: var(--kind); border-color: var(--kind); color: #fff; }
.kind-chip.on::before { background: #fff; }
.kind-dot { display: inline-block; margin-right: 5px; vertical-align: 0; }

.tabs { display: flex; border-bottom: 1px solid #d5e3e5; margin-bottom: 10px; }
.tabs button { flex: 1; background: none; border: none; padding: 9px 0; font-size: 14px; cursor: pointer; color: #4a6a71; border-bottom: 2px solid transparent; }
.tabs button.active { color: var(--brand-accent-text); font-weight: 600; border-bottom-color: var(--brand-pop); }

.row { display: flex; gap: 8px; margin-bottom: 10px; }
.row select { flex: 1; padding: 6px; border-radius: 6px; border: 1px solid #cddde0; }

.list { display: flex; flex-direction: column; gap: 8px; }
.card { border: 1px solid #dbe7e9; border-radius: 10px; padding: 10px 12px; cursor: pointer; background: var(--brand-surface); }
.card:hover { border-color: var(--brand-pop); }
.card h3 { margin: 0 0 3px; font-size: 15px; }
.meta { font-size: 13px; color: #4a6a71; }
.card-top { display: flex; justify-content: space-between; gap: 8px; align-items: flex-start; }
.day-head { font-size: 12px; font-weight: 700; text-transform: uppercase; color: #506e74; margin: 8px 0 0; }

.pill { display: inline-block; font-size: 11px; padding: 2px 7px; border-radius: 999px; background: #e3edee; margin: 4px 4px 0 0; }
.pill.open { background: #d9f5df; color: #145c26; }
.pill.closed { background: #f3e1e1; color: #7a1f1f; }

.btn { background: var(--brand-dark); color: var(--brand-on-dark); border: none; border-radius: 8px; padding: 9px 14px; cursor: pointer; font-size: 14px; }
.btn.small { padding: 5px 10px; font-size: 13px; }
.btn.ghost { background: var(--brand-surface); color: var(--brand-dark); border: 1px solid #cddde0; }
.btn.on { background: var(--brand-accent); color: var(--brand-ink); }
header .btn { background: var(--brand-accent); color: var(--brand-ink); font-weight: 600; }
header .btn:hover { background: var(--brand-accent-hover); }

.note { font-size: 13px; color: #58767c; margin: 4px 0 8px; }
.empty { font-size: 14px; color: #506e74; padding: 20px 0; text-align: center; }
.banner { padding: 10px 16px; font-size: 14px; }
.banner.error { background: #fbe3e3; color: #7a1f1f; }

.checks { list-style: none; padding: 0; margin: 12px 0; }
.checks li { padding: 7px 0; border-bottom: 1px solid #e3edee; font-size: 14px; display: flex; gap: 10px; }
.checks .res { font-weight: 700; min-width: 42px; }
.checks .ok { color: #1d7a35; } .checks .fail { color: #b3261e; } .checks .wait { color: #93a7ab; }
.checks .detail { color: #4a6a71; font-size: 12px; }
/* Status tab: import sources (fold-out rows) */
.sources-title { margin: 20px 0 4px; font-size: 16px; }
.sources { display: flex; flex-direction: column; gap: 8px; margin: 8px 0 16px; }
.source { border: 1px solid #dbe7e9; border-radius: 10px; background: var(--brand-surface); }
.source summary { cursor: pointer; padding: 10px 12px; display: grid; grid-template-columns: 1fr auto; gap: 2px 10px; list-style: none; }
.source summary::-webkit-details-marker { display: none; }
.source summary .name::before { content: "▸"; display: inline-block; width: 1em; color: #506e74; transition: transform .15s; }
.source[open] summary .name::before { transform: rotate(90deg); }
.source summary .name { font-weight: 600; font-size: 14px; }
.source summary .count { font-weight: 700; font-size: 14px; white-space: nowrap; }
.source summary .detail, .source summary .error { grid-column: 1 / -1; font-size: 12px; color: #4a6a71; padding-left: 1em; }
.source summary .error { color: #b3261e; }
.source-events { border-top: 1px solid #e3edee; max-height: 360px; overflow-y: auto; padding: 4px 12px 10px; }
.source-events .group { font-size: 12px; font-weight: 700; color: #2f5a63; margin: 10px 0 4px; text-transform: uppercase; letter-spacing: .03em; }
.source-events ul { list-style: none; margin: 0; padding: 0; }
.source-events li { display: grid; grid-template-columns: 9.5em 1fr auto; gap: 8px; align-items: baseline; padding: 5px 0; border-bottom: 1px solid #eaf1f2; font-size: 13px; }
.source-events li.off { color: #506e74; }
.source-events .when { color: #4a6a71; font-size: 12px; white-space: nowrap; }
.source-events .detail { color: #506e74; font-size: 12px; }
.source-events .tags { display: flex; gap: 4px; }
.source-events .pill { margin: 0; }
.admin-section { border-bottom: 1px solid #dbe7e9; padding: 4px 0 8px; }
.admin-section > summary { cursor: pointer; list-style: none; font-size: 16px; font-weight: 700; padding: 10px 0 6px; min-height: 24px; }
.admin-section > summary::-webkit-details-marker { display: none; }
.admin-section > summary::before { content: "▸"; display: inline-block; width: 1.1em; color: #506e74; transition: transform .15s; }
.admin-section[open] > summary::before { transform: rotate(90deg); }

/* Orgs tab: student orgs grouped by category (app.js "Orgs tab") */
main[data-tab="orgs"] .search .toggle,
main[data-tab="orgs"] #controls-row,
main[data-tab="orgs"] #tag-chips { display: none !important; } /* Open now and Shpot/Move filters don't apply to orgs */
.orgs-bar { display: flex; align-items: center; justify-content: space-between; gap: 10px; margin-bottom: 4px; }
.orgs-bar .note { margin: 0; }
.orgs-bar .btn { flex: none; }
.orgs-list { display: flex; flex-direction: column; }
.org-group { border-bottom: 1px solid #dbe7e9; }
.org-group > summary { cursor: pointer; list-style: none; display: block; text-indent: -1.1em; font-size: 15px; font-weight: 700; padding: 11px 0 11px 1.1em; min-height: 24px; }
.org-group > summary::-webkit-details-marker { display: none; }
.org-group > summary::before { content: "▸"; display: inline-block; text-indent: 0; width: 1.1em; color: #506e74; transition: transform .15s; flex: none; }
.org-group[open] > summary::before { transform: rotate(90deg); }
.org-group-n { display: inline-block; text-indent: 0; margin-left: 4px; vertical-align: 1px; font-size: 12px; font-weight: 600; color: var(--brand-accent-text); background: #ffe1cc; border-radius: 999px; padding: 1px 8px; }
.org-items { list-style: none; margin: 0 0 10px; padding: 0; display: flex; flex-direction: column; gap: 6px; }
.org-item { display: flex; flex-direction: column; gap: 2px; width: 100%; text-align: left; font: inherit; color: inherit; cursor: pointer;
  border: 1px solid #dbe7e9; border-radius: 10px; background: var(--brand-surface); padding: 9px 12px; }
.org-item:hover { border-color: var(--brand-pop); }
.org-item.active { border-color: var(--brand-dark); box-shadow: inset 4px 0 0 var(--brand-pop); }
.org-name { font-size: 14px; font-weight: 600; }
.org-meet { font-size: 12px; }
/* Org card (in the left-side card, like a Shpot) */
.org-card-kind { font-size: 12px; text-transform: uppercase; letter-spacing: .04em; font-weight: 600; margin-bottom: 2px; padding-right: 36px; }
.org-card h2 { padding-right: 36px; }
.org-card-cats { margin: 2px 0 10px; }
.org-facts { display: grid; gap: 4px; margin: 6px 0 4px; font-size: 14px; }
.org-fact { display: grid; grid-template-columns: 72px 1fr; gap: 8px; }
.org-fact-label { color: #506e74; font-size: 13px; }
.org-card-desc { font-size: 14px; line-height: 1.5; color: #13414b; white-space: pre-line; overflow-wrap: anywhere; margin: 0 0 14px; }
.org-card .btn { text-decoration: none; display: inline-block; }
.link-btn { background: none; border: none; padding: 0; font: inherit; color: var(--brand-accent-text); text-decoration: underline; text-underline-offset: 2px; cursor: pointer; }
.link-btn:hover { text-decoration-thickness: 2px; }
.org-moves .card .pill { margin-top: 4px; }
.home-orgs { display: flex; flex-wrap: wrap; gap: 6px; }
.org-chip { text-align: left; }
.org-chip:hover { border-color: #999; }
.chip.chip-more { border-style: dashed; color: #555; }
/* Move form: Hosted by picker */
.host-picker { display: flex; flex-direction: column; gap: 6px; }
.host-label { font-size: 13px; font-weight: 600; color: #333; }
.host-chips { display: flex; flex-wrap: wrap; gap: 6px; align-items: center; }
.host-chips .note { margin: 0; }
.host-chip { display: inline-flex; align-items: center; gap: 4px; cursor: default; }
.host-chip button { background: none; border: none; color: inherit; font-size: 14px; line-height: 1; padding: 0 2px; cursor: pointer; }
.pending-count { color: #c62828; }
.pending ul { list-style: none; margin: 8px 0 16px; padding: 0; display: flex; flex-direction: column; gap: 8px; }
.pending li { display: flex; flex-direction: column; gap: 8px; border: 1px solid #dbe7e9; border-radius: 10px; background: var(--brand-surface); padding: 10px 12px; }
.pending li.approved { background: #f1f8f1; border-color: #b7dbb8; }
.pending li.denied { background: #f0f5f6; color: #506e74; }
.pending .info { display: flex; flex-direction: column; gap: 2px; min-width: 0; cursor: pointer; border-radius: 6px; }
.pending .info:hover .what { text-decoration: underline; }
.pending .when { font-size: 12px; color: #4a6a71; }
.pending .what { font-weight: 600; font-size: 14px; }
.pending .detail { font-size: 12px; color: #4a6a71; }
.pending .desc { font-size: 12px; color: #506e74; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.pending .pill { margin: 0; }
.pending .decide { display: flex; gap: 6px; flex-wrap: wrap; align-items: center; }
.pending .head-line { font-style: italic; font-size: 13px; }
.pending .head-line.empty { color: #c62828; font-style: normal; }
.pending .head-stale { font-size: 12px; font-weight: 600; color: #7a4b00; }
.pending h4.head-group { margin: 12px 0 0; font-size: 13px; color: #4a6a71; }
.head-count { font-size: 12px; color: #4a6a71; }
.pending .verdict { font-size: 13px; font-weight: 600; white-space: nowrap; }
.pending li.approved .verdict { color: #2e7d32; }
@media (max-width: 760px) {
  .source-events li { grid-template-columns: 1fr auto; }
  .source-events .when { grid-column: 1 / -1; }
}

.modal { position: fixed; inset: 0; background: rgba(5,38,45,.45); display: flex; align-items: center; justify-content: center; z-index: 1000; padding: 16px; }
.modal-box { background: var(--brand-surface); border-radius: 12px; padding: 20px; width: 460px; max-width: 100%; max-height: 85vh; overflow-y: auto; position: relative; }
.modal-box h2, .drawer h2 { margin: 0 0 4px; font-size: 20px; }
.modal-box h4, .drawer h4 { margin: 16px 0 6px; font-size: 13px; text-transform: uppercase; color: #506e74; }
.close { position: absolute; top: 8px; right: 12px; border: none; background: none; font-size: 24px; cursor: pointer; color: #506e74; }
.desc { white-space: pre-line; font-size: 14px; line-height: 1.45; }
.actions { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 12px; }
.actions a { text-decoration: none; }
.hours { font-size: 14px; border-collapse: collapse; }
.hours td { padding: 2px 12px 2px 0; }
form.auth { display: flex; flex-direction: column; gap: 10px; margin-top: 12px; }
form.auth input { padding: 9px 10px; border: 1px solid #cddde0; border-radius: 8px; font-size: 15px; }
.msg { font-size: 13px; }
.msg.error { color: #b3261e; } .msg.ok { color: #1d7a35; }

/* Place card that slides in from the left over the map */
.drawer { position: absolute; top: 12px; left: 12px; max-height: calc(100% - 24px); width: 360px; max-width: calc(100% - 24px);
  background: var(--brand-surface); border-radius: 12px; box-shadow: 0 8px 30px rgba(5,38,45,.25); padding: 20px; overflow-y: auto; z-index: 900;
  transform: translateX(calc(-100% - 24px)); visibility: hidden;
  transition: transform .28s ease, visibility 0s linear .28s; }
.drawer.open { transform: none; visibility: visible; transition: transform .28s ease, visibility 0s; }
.drawer-right { left: auto; right: 12px; transform: translateX(calc(100% + 24px)); }
#drawer-body.swapping { opacity: .45; transition: opacity .15s; pointer-events: none; } /* next Shpot loading */
/* Slide the zoom buttons left so the event card doesn't cover them */
#map .leaflet-top.leaflet-right { transition: transform .28s ease; }
#map-wrap.right-open #map .leaflet-top.leaflet-right { transform: translateX(-372px); }
@media (max-width: 760px) {
  .drawer { position: fixed; top: 0; left: 0; bottom: 0; max-height: none; width: 88vw; max-width: 400px; border-radius: 0 12px 12px 0; z-index: 950; }
  .drawer-right { left: auto; right: 0; border-radius: 12px 0 0 12px; }
  #map-wrap.right-open #map .leaflet-top.leaflet-right { transform: none; }
}
.more-week { width: 100%; margin-top: 10px; }
.pin-svg { background: none; border: none; }

/* Header user button: avatar + name */
.user-chip { display: flex; align-items: center; gap: 8px; background: none; border: none; color: var(--brand-on-dark); cursor: pointer; padding: 2px 4px; border-radius: 999px; font-size: 13px; }
.user-chip:hover { background: rgba(255,222,198,.15); }
.user-name { max-width: 160px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.avatar { width: 30px; height: 30px; border-radius: 50%; object-fit: cover; flex: none; display: inline-flex; align-items: center; justify-content: center;
  background: var(--brand-accent); color: var(--brand-ink); font-weight: 700; font-size: 14px; text-transform: uppercase; }
.avatar.lg { width: 88px; height: 88px; font-size: 36px; }

/* Profile card */
/* Profile card drops down from the top (under your avatar) instead of sliding in sideways */
#profile-drawer, #user-drawer { z-index: 910; transform: translateY(calc(-100% - 24px)); }
#profile-drawer.open, #user-drawer.open { transform: none; }
@media (max-width: 760px) {
  #profile-drawer, #user-drawer { top: 0; left: 0; right: 0; bottom: auto; width: auto; max-width: none; max-height: 85vh; border-radius: 0 0 12px 12px; }
}
/* Admin tab: Users list, and the card it opens */
.users-count { color: #4a6a71; }
.users-list { max-height: 60vh; overflow-y: auto; }
.user-row { display: flex; align-items: center; gap: 10px; width: 100%; min-height: 48px; padding: 8px; border: 0; border-bottom: 1px solid #e3edee; background: none; color: inherit; font: inherit; font-size: 14px; font-weight: 600; text-align: left; cursor: pointer; }
.user-row:hover { background: #e3edee; }
.user-row .who { min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
#user-drawer h2, #user-drawer .user-facts dd { overflow-wrap: anywhere; }
#user-drawer .user-bio { white-space: pre-line; overflow-wrap: anywhere; }
.user-facts { display: grid; grid-template-columns: auto 1fr; gap: 6px 14px; margin: 14px 0 0; font-size: 14px; }
.user-facts dt { color: #4a6a71; }
.user-facts dd { margin: 0; }
.user-notify { border-top: 1px solid #e3edee; margin-top: 16px; padding-top: 14px; }
.user-notify .note { margin: 0; }
.profile-photo { display: flex; align-items: center; gap: 14px; margin: 12px 0 4px; }
.profile-photo .actions { margin-top: 0; }
form.profile { display: flex; flex-direction: column; gap: 6px; margin-top: 12px; }
form.profile label { font-size: 12px; font-weight: 600; color: #4a6a71; margin-top: 6px; }
form.profile input, form.profile textarea { padding: 9px 10px; border: 1px solid #cddde0; border-radius: 8px; font-size: 15px; font-family: inherit; }
form.profile textarea { resize: vertical; min-height: 64px; }
form.profile input[readonly] { background: #ecf2f3; color: #4a6a71; }
.char-count { font-size: 11px; color: #93a7ab; text-align: right; }
.profile-foot { border-top: 1px solid #e3edee; margin-top: 18px; padding-top: 14px; }
.btn.disabled { opacity: .5; pointer-events: none; }

/* Edit forms (places and events), shown in the pop-up */
.modal-box.wide { width: 620px; }
form.edit { display: flex; flex-direction: column; gap: 8px; margin-top: 12px; }
form.edit label { display: flex; flex-direction: column; gap: 4px; font-size: 12px; font-weight: 600; color: #4a6a71; }
form.edit input:not([type=checkbox]), form.edit textarea, form.edit select {
  padding: 8px 10px; border: 1px solid #cddde0; border-radius: 8px; font-size: 15px; font-family: inherit; color: var(--brand-dark); background: var(--brand-surface); min-width: 0; }
form.edit textarea { resize: vertical; }
form.edit .note { margin: -2px 0 2px; }
form.edit h4 { margin: 14px 0 0; }
form.edit .two { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
form.edit label.check { flex-direction: row; align-items: center; gap: 8px; font-size: 14px; font-weight: 400; color: var(--brand-dark); }
form.edit label.check.end { align-self: end; padding-bottom: 9px; }
form.edit label.inline { flex-direction: row; align-items: center; gap: 8px; font-size: 14px; font-weight: 400; color: var(--brand-dark); }
form.edit label.inline input { width: 80px; }
.note.warn { background: #fff6dc; color: #6b5300; border-radius: 8px; padding: 8px 10px; }
.hour-row { display: flex; align-items: center; gap: 6px; margin-bottom: 6px; }
.hour-row select { flex: 1; }
.hour-row input { flex: 1; }
.hour-remove { border: none; background: none; font-size: 20px; color: #506e74; cursor: pointer; padding: 0 4px; }
#btn-add-hours { align-self: flex-start; }
.tag-fields { display: flex; flex-direction: column; gap: 10px; }
.tag-group { display: flex; flex-wrap: wrap; gap: 6px 16px; }
.tag-group-name { width: 100%; font-size: 12px; font-weight: 600; color: #4a6a71; }
@media (max-width: 520px) {
  form.edit .two { grid-template-columns: 1fr; }
  form.edit label.check.end { padding-bottom: 0; }
}

/* Events tab: the left panel pulls out wider (desktop only) */
@media (min-width: 761px) {
  /* (Panel width for this tab is set near the end of the file: room for two cards on the map) */
  main.events-wide .search, main.events-wide #tab-events .row { max-width: 640px; }
  /* The map is only a thin strip now, so cards float over the whole screen instead */
  main.events-wide .drawer { position: fixed; top: 64px; max-height: calc(100vh - 76px); }
  /* Header sits above the cards so the profile card drops out from behind it */
  header { position: relative; z-index: 960; }
}

/* ---------- Events: the cluttered community board ----------------------- */
#events-list.board {
  position: relative; overflow: hidden; display: block; min-height: 420px;
  isolation: isolate; /* flyers and the board buttons use huge z-index numbers; this keeps them inside the board so pop-ups and cards stay on top */
  background-color: var(--brand-board);
  background-image:
    radial-gradient(rgba(2,25,30,.35) 1px, transparent 1.6px),
    radial-gradient(rgba(255,122,26,.18) 1px, transparent 1.6px),
    radial-gradient(rgba(2,25,30,.18) 2px, transparent 2.6px);
  background-size: 7px 7px, 11px 11px, 23px 23px;
  background-position: 0 0, 4px 6px, 9px 3px;
  border: 12px solid var(--brand-ink); border-radius: 6px;
  box-shadow: inset 0 0 26px rgba(5,38,45,.4), inset 0 0 2px rgba(5,38,45,.5), 0 3px 8px rgba(5,38,45,.25);
  user-select: none; -webkit-user-select: none;
}
.board-hud {
  position: absolute; top: 8px; right: 8px; z-index: 99999999; display: flex; gap: 8px; align-items: center;
  background: rgba(5,38,45,.72); color: var(--brand-on-dark); padding: 4px 6px 4px 12px; border-radius: 999px; font-size: 12px; font-weight: 600;
}
.board-hud #dug-to { color: var(--brand-accent-light); font-weight: 500; }
.board-hud #dug-to:empty { display: none; }
.board-hud #loaded-count { color: var(--brand-accent-light); font-weight: 500; }
.board-hud #loaded-count:empty { display: none; }
.board-hud .btn { background: var(--brand-surface); color: var(--brand-dark); }
.board-msg {
  position: absolute; inset: 0; display: flex; flex-direction: column; gap: 12px; align-items: center; justify-content: center;
  text-align: center; padding: 20px; z-index: 0;
  color: var(--brand-on-dark); font-family: "Anton", Impact, sans-serif; font-size: 22px; text-shadow: 0 2px 4px rgba(5,38,45,.5);
}
.board-msg[hidden] { display: none !important; }
.board-msg .btn { font-family: system-ui, sans-serif; text-shadow: none; }

/* A flyer: paper taped to the board, tilted */
.flyer {
  position: absolute; background: var(--paper); color: var(--brand-ink); padding: 18px 12px 10px; border-radius: 2px;
  transform: rotate(var(--rot)); transform-origin: 50% 0;
  box-shadow: 0 8px 14px -6px rgba(5,38,45,.45), 0 1px 2px rgba(5,38,45,.25);
  cursor: grab; touch-action: none; outline: none;
}
.flyer:focus-visible { box-shadow: 0 0 0 3px var(--brand-pop), 0 8px 14px -6px rgba(5,38,45,.45); }
.flyer.grabbed { cursor: grabbing; box-shadow: 0 22px 30px -8px rgba(5,38,45,.5); }
.flyer.settle  { transition: transform .28s cubic-bezier(.3, 1.6, .5, 1); }
/* Leaves at full speed and slows as it flies off (no pause at the moment of release) */
.flyer.ripping { transition: transform .42s cubic-bezier(.15, .7, .35, 1), opacity .38s ease-in .06s; pointer-events: none; }
.flyer.slap    { animation: slap .32s cubic-bezier(.2, 1.4, .5, 1) both; }
@keyframes slap {
  from { transform: rotate(var(--rot)) translateY(-18px) scale(1.25); opacity: 0; }
  to   { transform: rotate(var(--rot)) scale(1); opacity: 1; }
}
.flyer h3 { margin: 0 0 4px; font-family: "Anton", Impact, sans-serif; font-size: 18px; line-height: 1.15; }
.flyer h3.marker { font-family: "Anton", Impact, sans-serif; font-weight: 400; font-size: 20px; text-transform: uppercase; letter-spacing: .3px; }
.flyer .when { font-size: 12px; font-weight: 700; color: var(--brand-ink); margin-bottom: 2px; }
.flyer .meta { font-size: 12px; color: #2f5a63; }
.flyer-foot { display: flex; justify-content: space-between; align-items: center; gap: 6px; margin-top: 6px; }
.flyer .pill { background: rgba(5,38,45,.08); }
.flyer .save-btn { cursor: pointer; }
.flyer .save-btn.ghost { background: rgba(248,250,251,.65); }

/* Every flyer is taped to the board: a strip across the top edge, with varied color, length and angle */
.flyer::before {
  content: ""; position: absolute; top: -9px; left: 50%; width: var(--tape-w, 64px); height: 20px; margin-left: calc(var(--tape-w, 64px) / -2);
  background: var(--tape); box-shadow: 0 1px 2px rgba(5,38,45,.18); transform: rotate(var(--tape-rot, -4deg));
}

/* What's left behind when you rip a flyer off: the tape, with a torn sliver of paper under it */
.scrap { position: absolute; width: 36px; height: 16px; pointer-events: none; transform: rotate(var(--rot)); }
.scrap::before {
  content: ""; position: absolute; left: 2px; right: 2px; top: 6px; height: 12px; background: var(--paper); box-shadow: 0 1px 1px rgba(5,38,45,.2);
  clip-path: polygon(0 0, 100% 0, 96% 55%, 84% 100%, 70% 60%, 52% 100%, 38% 55%, 22% 100%, 8% 60%);
}
.scrap::after {
  content: ""; position: absolute; left: 0; right: 0; top: 0; height: 14px; background: var(--tape); box-shadow: 0 1px 2px rgba(5,38,45,.15);
  clip-path: polygon(0 0, 100% 0, 100% 100%, 88% 70%, 74% 100%, 60% 72%, 46% 100%, 30% 74%, 14% 100%, 0 76%);
}

@media (max-width: 760px) {
  #events-list.board { border-width: 8px; }
  .flyer h3 { font-size: 16px; }
}
}
.board-hint { font-size: 12px; color: #58767c; align-self: center; flex: 2; }

/* OPEN / TRASH stamp while tossing a flyer */
.flyer .stamp {
  position: absolute; top: 38%; left: 50%; transform: translate(-50%, -50%) rotate(-14deg) scale(.8);
  padding: 2px 12px; border: 3px solid currentColor; border-radius: 6px; pointer-events: none;
  font-family: "Anton", Impact, sans-serif; font-size: 34px; line-height: 1.1; text-transform: uppercase; letter-spacing: 2px;
  opacity: 0; transition: opacity .1s, transform .1s; z-index: 3; background: rgba(248,250,251,.85); border-width: 4px; /* above the crumple folds */
}
.flyer.aim-open .stamp  { color: #1d8a3a; opacity: 1; transform: translate(-50%, -50%) rotate(-14deg) scale(1); }
.flyer.aim-trash .stamp { color: #c62828; opacity: 1; transform: translate(-50%, -50%) rotate(12deg) scale(1); }
.flyer.aim-open  { box-shadow: 0 0 0 3px rgba(29,138,58,.6), 0 22px 30px -8px rgba(5,38,45,.5); }
.flyer.aim-trash { box-shadow: 0 0 0 3px rgba(198,40,40,.6), 0 22px 30px -8px rgba(5,38,45,.5); }
/* A tap wiggles the flyer: it has to be tossed */
.flyer.nudge { animation: nudge .4s ease; }
@keyframes nudge {
  0%, 100% { transform: rotate(var(--rot)); }
  25% { transform: rotate(var(--rot)) translateX(-7px); }
  75% { transform: rotate(var(--rot)) translateX(7px); }
}

/* Picked-up flyer (mouse): lifted off the board, following the cursor */
#events-list.holding, #events-list.holding .flyer { cursor: none; }
.flyer.held { box-shadow: 0 28px 40px -10px rgba(5,38,45,.55); transition: none; }
.flyer { cursor: pointer; }

/* Opened-events stack: slides in from the left edge of the map, newest card on top */
.event-stack {
  position: absolute; top: 12px; left: 12px; bottom: 12px; width: 360px; max-width: calc(100% - 24px); z-index: 905;
  display: flex; flex-direction: column; gap: 8px; pointer-events: none;
  transform: translateX(calc(-100% - 24px)); visibility: hidden;
  transition: transform .28s ease, visibility 0s linear .28s;
}
.event-stack.open { transform: none; visibility: visible; transition: transform .28s ease, visibility 0s; }
.stack-head {
  pointer-events: auto; align-self: flex-start; display: flex; align-items: center; gap: 10px;
  background: rgba(5,38,45,.82); color: var(--brand-on-dark); font-size: 12px; font-weight: 600; padding: 4px 4px 4px 12px; border-radius: 999px;
}
.stack-head .btn { background: var(--brand-surface); color: var(--brand-dark); border: none; }
.stack-list { pointer-events: auto; flex: 1; overflow-y: auto; display: flex; flex-direction: column; gap: 10px; padding: 2px 4px 12px 0; }
.stack-card {
  position: relative; flex: none; background: var(--brand-surface); border-radius: 12px; padding: 18px 20px 16px;
  box-shadow: 0 8px 24px rgba(5,38,45,.22); animation: stack-in .38s cubic-bezier(.2, 1.15, .4, 1);
}
.stack-card h2 { margin: 0 0 4px; font-size: 18px; padding-right: 22px; }
.stack-list { position: relative; } /* so a swiped card's sliding copy can sit where the card was */
.stack-card.swipe-ghost { animation: none; }
.stack-card { touch-action: pan-y; } /* sideways finger drags go to the swipe-to-close code */
/* (no inner scroll box: the whole column scrolls instead) */
@keyframes stack-in { from { transform: translateX(-115%) rotate(-5deg); opacity: 0; } }
@media (max-width: 760px) {
  .event-stack { position: fixed; top: 0; left: 0; bottom: 0; width: 88vw; max-width: 400px; z-index: 950; padding: 8px; }
}
/* On the Events tab the place card comes in from the right, so it doesn't land on the stack */
@media (min-width: 761px) {
  main.events-wide #place-drawer { left: auto; right: 12px; transform: translateX(calc(100% + 24px)); }
  main.events-wide #place-drawer.open { transform: none; }
}

/* No visible scroll bars: these areas still scroll with a trackpad, wheel or finger */
.stack-list, #panel, .drawer { scrollbar-width: none; -ms-overflow-style: none; }
.stack-list::-webkit-scrollbar, #panel::-webkit-scrollbar, .drawer::-webkit-scrollbar { display: none; }

/* Desktop: the page is exactly one screen tall (header + main), so the window itself never scrolls */
@media (min-width: 761px) {
  html, body { height: 100%; }
  body { display: flex; flex-direction: column; overflow: hidden; }
  header { flex: none; }
  main { flex: 1; height: auto; min-height: 0; }
}

/* "Trashed N" in the board's counter, and the compact list it opens */
.hud-link { background: none; border: none; padding: 0; color: var(--brand-on-dark); font: inherit; text-decoration: underline dotted; text-underline-offset: 3px; cursor: pointer; }
.hud-link:hover { color: var(--brand-accent-light); }
.trash-list {
  position: absolute; top: 40px; right: 8px; z-index: 99999999; width: 260px; max-height: 55%; overflow-y: auto;
  background: rgba(5,38,45,.92); color: var(--brand-on-dark); border-radius: 10px; padding: 4px; box-shadow: 0 8px 20px rgba(5,38,45,.35);
  scrollbar-width: none;
}
.trash-list::-webkit-scrollbar { display: none; }
.trash-list ol { list-style: none; margin: 0; padding: 0; }
.trash-list button {
  display: block; width: 100%; text-align: left; background: none; border: none; color: #e3edee; cursor: pointer;
  font-size: 12px; line-height: 1.3; padding: 4px 8px; border-radius: 6px;
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}
.trash-list button:hover { background: rgba(248,250,251,.12); color: var(--brand-on-dark); }
.trash-empty { margin: 0; padding: 6px 8px; font-size: 12px; color: #cddde0; }

/* Collapsible opened-events stack: the header toggles the cards */
.stack-toggle { display: flex; align-items: center; gap: 6px; background: none; border: none; padding: 0; color: var(--brand-on-dark); font: inherit; cursor: pointer; }
.stack-toggle .caret { display: inline-block; font-size: 10px; transform: rotate(90deg); transition: transform .15s ease; }
.event-stack.collapsed .stack-toggle .caret { transform: none; }
.stack-list { transition: opacity .2s ease, transform .2s ease; }
.event-stack.collapsed .stack-list { opacity: 0; transform: translateY(-12px); pointer-events: none; visibility: hidden; }
/* The header bubble shrinks to just "Opened · N" when collapsed and grows back when expanded.
   Expanding: the bubble grows first, then Clear fades in. Collapsing: Clear fades out, then it shrinks. */
.stack-head { gap: 0; transition: padding .28s cubic-bezier(.2,.8,.2,1); }
#stack-clear {
  margin-left: 10px; max-width: 80px; overflow: hidden; white-space: nowrap; opacity: 1;
  transition: max-width .28s cubic-bezier(.2,.8,.2,1), padding .28s cubic-bezier(.2,.8,.2,1), margin .28s cubic-bezier(.2,.8,.2,1), opacity .2s ease .18s;
}
.event-stack.collapsed .stack-head { padding-right: 12px; transition: padding .28s cubic-bezier(.2,.8,.2,1) .08s; }
.event-stack.collapsed #stack-clear {
  margin-left: 0; max-width: 0; padding-left: 0; padding-right: 0; opacity: 0; pointer-events: none;
  transition: opacity .12s ease, max-width .28s cubic-bezier(.2,.8,.2,1) .08s, padding .28s cubic-bezier(.2,.8,.2,1) .08s, margin .28s cubic-bezier(.2,.8,.2,1) .08s;
}
/* Clear: a small round pill sized to sit neatly inside the bubble (same height expanded or collapsed) */
.stack-head { height: 30px; box-sizing: border-box; }
#stack-clear {
  height: 22px; padding: 0 11px; border-radius: 999px; font-size: 12px; font-weight: 600; line-height: 22px;
  background: rgba(248,250,251,.92); color: var(--brand-dark);
}
#stack-clear:hover { background: var(--brand-surface); }

/* Each opened card can fold down to just its title + date */
.card-fold {
  position: absolute; top: 8px; right: 34px; width: 24px; height: 24px; border: none; background: none; cursor: pointer;
  color: #506e74; font-size: 14px; line-height: 24px; padding: 0; border-radius: 6px;
}
.card-fold:hover { background: #e8f0f1; color: #13414b; }
.card-fold span { display: inline-block; transition: transform .2s ease; }
.stack-card.folded .card-fold span { transform: rotate(-90deg); }
.stack-card h2 { padding-right: 52px; cursor: pointer; }
.stack-card.folded { padding-bottom: 12px; }
.stack-card.folded .stack-body > :not(h2):not(div:first-of-type) { display: none; }
/* Fold arrow sits on the left, next to the title */
.stack-card { padding-left: 38px; }
.card-fold { right: auto; left: 9px; top: 17px; width: 24px; height: 24px; font-size: 15px; color: #4a6a71; }
.stack-card h2 { padding-right: 26px; }
/* Stop the browser's two-finger "swipe back a page" over the board */
#events-list.board { overscroll-behavior-x: none; }
/* Show which flyer the pointer is on (only the top one under the pointer gets :hover) */
#events-list.board:not(.holding) .flyer:not(.ripping):hover {
  box-shadow: 0 0 0 3px rgba(248,250,251,.95), 0 10px 18px -6px rgba(5,38,45,.5);
}

/* Undo, bottom-right corner of the board */
.board-undo {
  position: absolute; right: 10px; bottom: 10px; z-index: 99999999;
  background: rgba(5,38,45,.82); color: var(--brand-on-dark); border-radius: 999px; padding: 6px 14px; font-weight: 600;
  box-shadow: 0 3px 8px rgba(5,38,45,.3); transition: opacity .15s ease, transform .1s ease;
}
.board-undo:hover:not(:disabled) { background: rgba(5,38,45,.95); }
.board-undo:active:not(:disabled) { transform: scale(.96); }
.board-undo:disabled { opacity: .35; cursor: default; }
.flyer.gone { display: none; }

/* Trackpad swipe: lifted off the board while it's being swiped */
.flyer.swiping { box-shadow: 0 22px 32px -10px rgba(5,38,45,.5); }
/* Flyers under a ripped one rustle */
.flyer.flutter { animation: flutter .42s ease-out; }
@keyframes flutter {
  0%, 100% { transform: rotate(var(--rot)); }
  25% { transform: rotate(calc(var(--rot) + 2.2deg)) translateY(-2px); }
  55% { transform: rotate(calc(var(--rot) - 1.4deg)); }
  80% { transform: rotate(calc(var(--rot) + .5deg)); }
}

/* Place photos */
.card.has-photo { padding-top: 0; overflow: hidden; }
.card-photo { display: block; width: calc(100% + 24px); margin: 0 -12px 8px; height: 120px; object-fit: cover; background: #e3edee; }
.place-photos-wrap { position: relative; margin: 0 0 10px; }
.place-photos { display: flex; overflow-x: auto; scroll-snap-type: x mandatory; border-radius: 8px; scrollbar-width: none; }
.place-photos::-webkit-scrollbar { display: none; }
.place-photo { flex: 0 0 100%; width: 100%; height: 220px; object-fit: cover; scroll-snap-align: start; background: #e3edee; }
.photo-count { position: absolute; right: 8px; bottom: 8px; background: rgba(5,38,45,.6); color: var(--brand-on-dark); font-size: 11px; padding: 2px 7px; border-radius: 999px; }
.photo-nav { position: absolute; top: 50%; transform: translateY(-50%); width: 28px; height: 28px; border-radius: 50%; border: none; background: rgba(248,250,251,.85); font-size: 18px; line-height: 1; cursor: pointer; }
.photo-nav.prev { left: 8px; } .photo-nav.next { right: 8px; }
.photo-grid { display: flex; flex-wrap: wrap; gap: 8px; }
.photo-tile { position: relative; width: 120px; height: 80px; border-radius: 8px; overflow: hidden; background: #ecf2f3; }
.photo-tile img { width: 100%; height: 100%; object-fit: cover; }
.photo-btn { position: absolute; top: 4px; left: 4px; width: 22px; height: 22px; border-radius: 50%; border: none; background: rgba(248,250,251,.9); cursor: pointer; font-size: 13px; line-height: 1; padding: 0; }
.photo-btn.photo-del { left: auto; right: 4px; font-size: 16px; }
.photo-cover { position: absolute; left: 4px; bottom: 4px; background: rgba(5,38,45,.65); color: var(--brand-on-dark); font-size: 10px; padding: 1px 6px; border-radius: 999px; }
/* Live card preview under the add/edit forms */
.edit-preview { border: 1px dashed #bfd3d7; border-radius: 12px; padding: 14px 16px; background: #f4f7f8; margin-bottom: 12px; }
.edit-preview .actions .btn { pointer-events: none; }
/* "Discard your changes?" check, shown over the add/edit pop-up */
.confirm-backdrop { position: fixed; inset: 0; background: rgba(5,38,45,.35); display: flex; align-items: center; justify-content: center; z-index: 1100; padding: 16px; }
.confirm-box { background: var(--brand-surface); border-radius: 12px; padding: 18px 20px; width: 340px; max-width: 100%; box-shadow: 0 10px 30px rgba(5,38,45,.25); }
.confirm-box h3 { margin: 0 0 6px; font-size: 17px; }
.confirm-box .actions { justify-content: flex-end; }
.btn.danger { background: #c62828; color: var(--brand-on-dark); }
/* Drafts list in the profile card */
.draft-list { display: flex; flex-direction: column; gap: 6px; }
.draft-item { display: grid; grid-template-columns: auto 1fr; column-gap: 8px; align-items: baseline; text-align: left; background: var(--brand-surface); border: 1px dashed #bfd3d7; border-radius: 10px; padding: 8px 10px; cursor: pointer; font: inherit; }
.draft-item:hover { border-color: var(--brand-pop); }
.draft-item .meta { grid-column: 2; }
.draft-kind { font-size: 11px; text-transform: uppercase; color: #506e74; }
.draft-title { font-weight: 600; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
/* "Preview as basic user" */
.banner.preview { display: flex; align-items: center; justify-content: space-between; gap: 12px; background: #fff4cc; color: #5c4400; border-bottom: 1px solid #f0d77a; }
.banner.preview[hidden] { display: none; }
.profile-foot { display: flex; flex-wrap: wrap; gap: 8px; }

/* ---------- Phones: must-fix layout ------------------------------------- */
@media (max-width: 760px) {
  /* iPhones zoom the page in when you tap a text box with text under 16px */
  input:not([type=checkbox]):not([type=radio]):not([type=file]), select, textarea { font-size: 16px; }
}

/* Add/edit forms: Publish / Save buttons stay visible at the bottom of the pop-up while you scroll */
.form-actions {
  position: sticky; bottom: -20px; z-index: 5; background: var(--brand-surface);
  margin: 16px -20px -20px; padding: 10px 20px 14px; border-top: 1px solid #e3edee;
  box-shadow: 0 -6px 12px -8px rgba(5,38,45,.18);
}
.form-actions .actions { margin-top: 0; }
.form-actions .head-approve { order: -1; } /* Approve shows first; Save as draft is first in the markup so Enter submits that one */
.form-actions .msg:empty { display: none; }

/* Close (×) buttons sit above place photos (the photo used to cover it, so it couldn't be tapped), with a white circle so they show up on a photo */
.drawer > .close, .modal-box > .close { z-index: 10; width: 32px; height: 32px; display: flex; align-items: center; justify-content: center; border-radius: 50%; background: rgba(248,250,251,.92); box-shadow: 0 1px 4px rgba(5,38,45,.2); }

/* ---------- Phones: should-fix items ------------------------------------ */
/* Board hint: touchscreens get touch wording, mice get mouse wording */
.hint-touch { display: none; }
@media (hover: none) and (pointer: coarse) {
  .hint-mouse { display: none; }
  .hint-touch { display: inline; }
}

@media (max-width: 760px) {
  /* Bigger tap areas (44px is the usual minimum for a finger). Most keep their look and get an
     invisible margin around them that also counts as a tap. */
  #auth-area .btn, .hud-link, .stack-toggle { position: relative; } /* (Undo, the fold arrow and × are already positioned, so they keep theirs) */
  #auth-area .btn::after, .board-undo::after, .hud-link::after, .card-fold::after, .stack-toggle::after,
  .drawer > .close::after, .modal-box > .close::after, .stack-card > .close::after {
    content: ""; position: absolute; inset: -8px -4px;
  }
  .drawer > .close::after, .modal-box > .close::after, .stack-card > .close::after { inset: -6px; }
  .toggle { display: inline-flex; align-items: center; gap: 6px; padding: 12px 0; }
  .toggle input[type=checkbox] { width: 20px; height: 20px; margin: 0; }
  .tags-toggle { padding: 12px 0; margin-top: 0; }
  .actions .btn.small { min-height: 40px; padding: 8px 14px; }
  .stack-head { height: 38px; }
  #stack-clear { height: 30px; line-height: 30px; }
  form.edit label.check input[type=checkbox] { width: 20px; height: 20px; }
}
.scrim { display: none; }
@media (max-width: 760px) {
  .scrim.on { display: block; position: fixed; inset: 0; z-index: 900; background: rgba(5,38,45,.28); }
}

/* Phones: opened events are a sheet that slides up from the bottom instead of covering the screen from the left.
   Tapping "Opened · N" folds it down to just that bar, so you can keep swiping the board. */
@media (max-width: 760px) {
  .event-stack {
    top: auto; left: 0; right: 0; bottom: 0; width: auto; max-width: none; max-height: 70dvh;
    padding: 8px 8px calc(8px + env(safe-area-inset-bottom)); gap: 8px;
    background: rgba(238,243,244,.97); border-radius: 16px 16px 0 0; box-shadow: 0 -8px 24px rgba(5,38,45,.22);
    pointer-events: auto; transform: translateY(calc(100% + 24px));
  }
  .event-stack.open { transform: none; }
  .event-stack .stack-list { min-height: 0; padding-right: 0; }
  .event-stack.collapsed .stack-list { display: none; }
  .stack-card { box-shadow: 0 2px 10px rgba(5,38,45,.12); animation-name: stack-up; }
  @keyframes stack-up { from { transform: translateY(40px); opacity: 0; } }
}

/* Long event descriptions: first lines only until "Show more" (4 on phones, 8 on bigger screens) */
.desc.clamp { display: -webkit-box; -webkit-box-orient: vertical; -webkit-line-clamp: 8; line-clamp: 8; overflow: hidden; margin-bottom: 4px; }
.desc.clamp.expanded { display: block; -webkit-line-clamp: unset; line-clamp: unset; overflow: visible; }
@media (max-width: 760px) { .desc.clamp { -webkit-line-clamp: 4; line-clamp: 4; } }
.desc a { color: var(--brand-accent-text); word-break: break-all; }
.more-btn { background: none; border: none; padding: 6px 0; font: inherit; font-size: 14px; font-weight: 600; color: var(--brand-dark); text-decoration: underline; cursor: pointer; }

/* Header "add" buttons: two labelled buttons on big screens, one "+" with a menu on phones */
.add-menu-wrap { position: relative; display: none; }
#auth-area .add-narrow { font-size: 22px; font-weight: 500; line-height: 1; width: 38px; height: 32px; padding: 0 0 2px; }
.add-menu {
  position: absolute; top: calc(100% + 8px); right: 0; z-index: 1001; min-width: 170px;
  background: var(--brand-surface); border-radius: 10px; box-shadow: 0 8px 24px rgba(5,38,45,.25); padding: 6px; display: flex; flex-direction: column;
}
.add-menu[hidden] { display: none; }
.add-menu button { background: none; border: none; text-align: left; padding: 12px 12px; font: inherit; font-size: 15px; color: var(--brand-dark); border-radius: 8px; cursor: pointer; }
.add-menu button:hover { background: #e8f0f1; }
@media (max-width: 760px) {
  .add-wide { display: none; }
  .add-menu-wrap { display: block; }
  .brand .badge { display: none; }
}


/* ---------- Phones: app layout ------------------------------------------
   The page is exactly one screen tall and never scrolls or bounces, like an app:
   header at the top, tab bar at the bottom, and the open tab fills the space between.
   Places shows the map on top with its list under it; Events, Saved and Status use the whole space.
   Only a long list scrolls, inside its own area. */
@media (max-width: 760px) {
  html, body { height: 100%; overflow: hidden; overscroll-behavior: none; }
  body { display: flex; flex-direction: column; height: 100vh; height: 100dvh; }
  header, .banner { flex: none; }
  header { position: relative; z-index: 800; }

  main { flex: 1; min-height: 0; height: auto; display: flex; flex-direction: column-reverse; }
  #map-wrap { height: 38%; min-height: 0; flex: none; }
  main:not([data-tab="places"]) #map-wrap { height: 0; } /* only Places needs the map (cards are fixed to the screen, so they still show) */

  #panel { flex: 1; min-height: 0; display: flex; flex-direction: column; overflow: hidden; padding: 10px 12px 0; }
  #panel > .search, #panel > .controls-row, #panel > .chips { flex: none; }
  #panel > .chips { max-height: 30%; overflow-y: auto; }
  #panel > .tab { flex: 1; min-height: 0; overflow-y: auto; overscroll-behavior: contain; padding-bottom: 12px; }

  /* Tab bar at the bottom, in thumb reach */
  #panel > .tabs {
    order: 99; flex: none; margin: 0 -12px; padding: 0 0 env(safe-area-inset-bottom);
    border-bottom: none; border-top: 1px solid #d5e3e5; background: var(--brand-surface);
  }
  .tabs button { padding: 14px 0 12px; font-size: 13px; border-bottom: none; border-top: 2px solid transparent; }
  .tabs button.active { border-top-color: var(--brand-pop); }

  /* Events: the board fills whatever space is left, so it always fits the screen */
  #tab-events:not([hidden]) { display: flex; flex-direction: column; overflow: hidden; padding-bottom: 10px; }
  #tab-events .row { flex: none; }
  #events-list.board { flex: 1; min-height: 0; }
  .flyer { touch-action: none; } /* nothing to scroll here, so every finger move goes to the flyer */

  /* Opened events sheet stops at the tab bar instead of covering it */
  .event-stack { bottom: var(--tabbar-h, 0px); max-height: calc(100% - var(--tabbar-h, 0px) - 80px); padding-bottom: 8px; }
}

/* ---------- Phones: less clutter, swipeable opened-events sheet --------- */
.sheet-handle { display: none; }
@media (max-width: 760px) {
  /* Events tab: "Open now" only filters places, so it's hidden here */
  main[data-tab="events"] .search .toggle { display: none; }
  /* The swipe hint goes away after your first swipe; the category picker then sits on its own */
  body.hint-seen #tab-events .board-hint { display: none; }
  #tab-events .row { gap: 10px; }
  #tab-events .row select { flex: none; }
  /* Board top bar: just Trashed and Shuffle */
  #loaded-count, #dug-to { display: none; }

  /* Sheet: grab handle on top; the handle and the "Opened" bar take the swipe instead of the page */
  .sheet-handle { display: block; width: 44px; height: 5px; border-radius: 3px; background: #c6d8db; margin: 2px auto 2px; flex: none; }
  .event-stack .sheet-handle, .event-stack .stack-head { touch-action: none; }
  .event-stack { padding-top: 6px; transition: transform .28s cubic-bezier(.2,.8,.2,1), visibility 0s linear .28s; }
  .event-stack.open { transition: transform .28s cubic-bezier(.2,.8,.2,1), visibility 0s; }
  /* Folded: a slim bar above the tab bar */
  .event-stack.collapsed { padding-bottom: 6px; gap: 4px; }
}


/* ---------- Filters row: Filters · category · Opened ----------------------- */
.controls-row { display: flex; align-items: center; gap: 10px; }
.opened-chip { display: none; }
@media (max-width: 760px) {
  .controls-row { min-height: 44px; }
  .controls-row .tags-toggle { flex: none; }
  .controls-row #category { flex: 0 1 auto; min-width: 0; max-width: 46%; height: 36px; padding: 0 8px; border-radius: 8px; border: 1px solid #cddde0; background: var(--brand-surface); color: var(--brand-dark); }
  main:not([data-tab="events"]) .controls-row #category { display: none; } /* only Events uses categories */
  /* Opened button: only on Events, only while you have opened events */
  main[data-tab="events"] .opened-chip:not([hidden]) {
    display: inline-flex; align-items: center; margin-left: auto; flex: none; height: 36px; padding: 0 14px;
    border-radius: 999px; border: none; background: var(--brand-dark); color: var(--brand-on-dark); font: inherit; font-size: 13px; font-weight: 600; cursor: pointer;
  }
  .opened-chip[aria-expanded="true"] { background: var(--brand-dark-2); }
  /* The hint row is all that's left in the Events tab header; it goes once the hint has been seen */
  body.hint-seen #tab-events > .row { display: none; }
}

/* ---------- Phones: opened-events sheet ----------------------------------
   Folding hides it completely (the Opened button in the Filters row brings it back).
   The whole top strip of the sheet is the grab area for swiping it down, not just the thin handle. */
@media (max-width: 760px) {
  .event-stack.collapsed { transform: translateY(calc(100% + 24px)); visibility: hidden;
    transition: transform .28s cubic-bezier(.2,.8,.2,1), visibility 0s linear .28s; }
  .event-stack.collapsed .stack-list { display: flex; } /* keep its size while it slides away */
  .event-stack { padding-top: 0; gap: 0; }
  .sheet-handle {
    position: relative; width: auto; height: 30px; margin: 0 -8px; background: none; border-radius: 16px 16px 0 0; cursor: grab;
  }
  .sheet-handle::before { content: ""; position: absolute; left: 50%; top: 10px; width: 44px; height: 5px; margin-left: -22px; border-radius: 3px; background: #c6d8db; }
  /* Top bar under the handle: the Opened toggle lives in the Filters row now, so this is just Clear, on the right */
  .event-stack .stack-head { align-self: stretch; justify-content: flex-end; background: none; padding: 0 4px 8px; height: auto; }
  .event-stack .stack-toggle { display: none; }
  #stack-clear { background: #dfeaec; color: var(--brand-dark); }
}

/* Opened button bounces when an event is added while the stack is folded away */
.bump { animation: bump .45s cubic-bezier(.3, 1.6, .5, 1); }
@keyframes bump { 0% { transform: scale(1); } 35% { transform: scale(1.18); } 100% { transform: scale(1); } }

/* ---------- Board controls: icon buttons and the wire trash bin ----------- */
/* Trash bin, top-right of the board. Its balls of paper are the trashed flyers; click it for the list. */
.board-hud { padding: 4px; gap: 10px; }
.board-hud #loaded-count:not(:empty), .board-hud #dug-to:not(:empty) { padding-left: 8px; }
.board-bin {
  display: flex; align-items: center; justify-content: center; width: 50px; height: 50px; padding: 0;
  border: none; border-radius: 50%; background: none; color: var(--brand-on-dark); cursor: pointer;
}
.board-bin:hover { background: rgba(248,250,251,.1); }
.board-bin[aria-expanded="true"] { background: rgba(248,250,251,.16); }
.board-bin.catch svg { animation: bin-catch .4s cubic-bezier(.3, 1.6, .5, 1); transform-origin: 50% 90%; }
@keyframes bin-catch { 0% { transform: none; } 30% { transform: scale(1.08, .92) rotate(-4deg); } 65% { transform: rotate(3deg); } 100% { transform: none; } }
.bin-ball.fresh { animation: ball-drop .35s cubic-bezier(.3, 1.5, .5, 1); transform-box: fill-box; transform-origin: center; }
@keyframes ball-drop { from { transform: translateY(-9px) scale(.6); } }

/* The crumpled flyer flying to the bin */
.paper-ball {
  position: absolute; width: 18px; height: 18px; margin: -9px 0 0 -9px; border-radius: 50%; pointer-events: none; z-index: 99999998;
  background:
    linear-gradient(35deg, transparent 44%, rgba(5,38,45,.18) 46%, transparent 49%),
    linear-gradient(-50deg, transparent 52%, rgba(5,38,45,.14) 54%, transparent 57%),
    radial-gradient(circle at 35% 30%, var(--brand-on-dark) 0, var(--paper) 55%, color-mix(in srgb, var(--paper) 70%, var(--brand-ink)) 100%);
  box-shadow: 0 3px 6px rgba(5,38,45,.35);
}

/* Shuffle and Undo: round icon buttons together in the bottom-right corner */
.board-tools { position: absolute; right: 10px; bottom: 10px; z-index: 99999999; display: flex; gap: 8px; }
.tool-btn {
  display: flex; align-items: center; justify-content: center; width: 44px; height: 44px; padding: 0;
  border: none; border-radius: 50%; background: rgba(5,38,45,.82); color: var(--brand-on-dark); cursor: pointer;
  box-shadow: 0 3px 8px rgba(5,38,45,.3); transition: opacity .15s ease, transform .1s ease, background .15s ease;
}
.tool-btn:hover:not(:disabled) { background: rgba(5,38,45,.95); }
.tool-btn:active:not(:disabled) { transform: scale(.92); }
.tool-btn:disabled { opacity: .35; cursor: default; }

/* ---------- Opened events icon: a little stack of flyers ------------------ */
.stack-count { display: inline-flex; align-items: center; gap: 4px; }
.stack-num { font-size: 12px; font-weight: 700; min-width: 1ch; }
.opened-chip svg, .stack-count svg { display: block; overflow: visible; }
@media (max-width: 760px) {
  main[data-tab="events"] .opened-chip:not([hidden]) { gap: 4px; padding: 0 12px 0 8px; height: 40px; }
}
.opened-chip.catch svg, .stack-toggle.catch svg { animation: bin-catch .4s cubic-bezier(.3, 1.6, .5, 1); transform-origin: 50% 90%; }
.sheet-fresh { animation: sheet-drop .35s cubic-bezier(.3, 1.5, .5, 1); transform-box: fill-box; transform-origin: center; }
@keyframes sheet-drop { from { transform: translateY(-6px) scale(1.25); } }

/* The copy of a flyer flying onto the stack icon: laid over the whole page */
.flying-flyer { position: fixed; z-index: 960; margin: 0; pointer-events: none; transform-origin: 50% 50%; animation: none; transition: none; }

/* Folds that show up as a flyer is dragged left (--crumple goes 0 → 1, set by app.js): a crumpled-paper
   shading of lit and shadowed facets (img/crumple.png), darker toward the balled-up edges. It sits over the
   printing (z-index) so the words fold with the paper. */
.flyer::after {
  content: ""; position: absolute; inset: 0; z-index: 2; pointer-events: none; opacity: min(1, calc(var(--crumple, 0) * 1.25));
  background:
    radial-gradient(ellipse at 45% 40%, transparent 30%, rgba(5,38,45,.38) 100%),
    url("img/crumple.png?v=1") 0 0 / 100% 100%;
}
/* --crumple is a number the browser can animate, so creases fade smoothly */
@property --crumple { syntax: "<number>"; inherits: true; initial-value: 0; }
.flyer[data-crumpled]:not(.settle):not(.ripping) { transition: scale .12s ease-out, clip-path .12s ease-out, --crumple .12s ease-out; }
.flyer[data-crumpled].held { transition: scale .12s ease-out, clip-path .12s ease-out, --crumple .12s ease-out; }
.flyer[data-crumpled].settle { transition: transform .28s cubic-bezier(.3, 1.6, .5, 1), scale .3s ease, clip-path .3s ease, --crumple .3s ease; }
.confetti-bit { position: fixed; z-index: 961; width: 5px; height: 7px; border-radius: 1px; pointer-events: none; box-shadow: 0 0 0 .5px rgba(5,38,45,.2); }

/* Opened list: cards fade out as they scroll under the top or bottom edge, instead of being cut off.
   The fades only appear on a side with more to scroll to (app.js toggles fade-top / fade-bottom). */
@property --fade-top { syntax: "<length>"; inherits: false; initial-value: 0px; }
@property --fade-bottom { syntax: "<length>"; inherits: false; initial-value: 0px; }
.stack-list {
  --fade-top: 0px; --fade-bottom: 0px;
  -webkit-mask-image: linear-gradient(to bottom, transparent 0, #000 var(--fade-top), #000 calc(100% - var(--fade-bottom)), transparent 100%);
  mask-image: linear-gradient(to bottom, transparent 0, #000 var(--fade-top), #000 calc(100% - var(--fade-bottom)), transparent 100%);
  transition: --fade-top .2s ease, --fade-bottom .2s ease, opacity .2s ease, transform .2s ease;
  scroll-behavior: smooth; overscroll-behavior: contain;
}
.stack-list.fade-top { --fade-top: 36px; }
.stack-list.fade-bottom { --fade-bottom: 36px; }

/* Brand: things the browser or the map library would otherwise draw in white/black */
input, select, textarea { background-color: var(--brand-surface); color: var(--brand-ink); }
input::placeholder, textarea::placeholder { color: #506e74; }
input[type=checkbox], input[type=radio], input[type=range] { accent-color: var(--brand-pop); }
::selection { background: var(--brand-accent); color: var(--brand-ink); }
.leaflet-bar a, .leaflet-bar a:hover { background-color: var(--brand-surface); color: var(--brand-dark); border-bottom-color: #d5e3e5; }
.leaflet-container .leaflet-control-attribution { background: rgba(238,243,244,.85); color: var(--brand-ink); }
.leaflet-container .leaflet-control-attribution a { color: var(--brand-accent-text); }

/* ===== Moves board as a wall of gig posters (Manny's references: a rave flyer and a Pinterest board of risograph-style posters) =====
   Each flyer is one paper colour printed in one matching ink (--paper / --ink, picked in papers.js INKS.poster):
   huge edge-to-edge headlines, a reversed ink bar for the date, an inset frame, halftone dots, grain and worn print.
   This block only touches the Moves board; the rest of the app keeps its teal and tangerine. */
#events-list.board {
  --grain: url("img/grain-paper.png?v=1");
  background-color: var(--brand-board);
  background-image:
    url("img/grain-board.png?v=1"),
    radial-gradient(ellipse at 50% 40%, #1c1c1c 0%, #0a0a0a 80%);
  background-size: 220px 220px, 100% 100%;
  border-color: #1a1a1a;
  box-shadow: inset 0 0 40px rgba(0,0,0,.8), 0 3px 8px rgba(5,38,45,.25);
}
#events-list.board .flyer, .flying-flyer {
  --worn: url("img/worn-print.png?v=1");
  background-color: var(--paper); background-image: var(--grain, none); background-size: 180px 180px;
  color: var(--ink, #141414); padding: 18px 12px 12px; border-radius: 0;
  box-shadow: 0 12px 20px -8px rgba(0,0,0,.85), 0 1px 0 rgba(0,0,0,.6);
}
.flying-flyer { --grain: url("img/grain-paper.png?v=1"); }
#events-list.board .flyer:focus-visible { box-shadow: 0 0 0 3px #f2e93b, 0 12px 20px -8px rgba(0,0,0,.85); }

/* Everything printed sits above the halftone and frame */
:is(#events-list.board .flyer, .flying-flyer) > :is(.flyer-top, h3, .when, .meta, .flyer-foot) { position: relative; z-index: 1; }

/* Inset border, like a printed frame around the poster (on most flyers) */
.poster-frame { position: absolute; inset: 6px; border: 2px solid var(--ink); pointer-events: none; }

/* Halftone dots fading in from one corner, standing in for the posters' halftone photos */
.halftone {
  position: absolute; width: 75%; height: 60%; pointer-events: none; opacity: .3;
  background-image: radial-gradient(var(--ink) 38%, transparent 42%); background-size: 6px 6px;
}
.halftone.ht-tr { top: 0; right: 0; -webkit-mask-image: radial-gradient(ellipse at 100% 0, #000 0, transparent 70%); mask-image: radial-gradient(ellipse at 100% 0, #000 0, transparent 70%); }
.halftone.ht-br { bottom: 0; right: 0; -webkit-mask-image: radial-gradient(ellipse at 100% 100%, #000 0, transparent 70%); mask-image: radial-gradient(ellipse at 100% 100%, #000 0, transparent 70%); }
.halftone.ht-bl { bottom: 0; left: 0; -webkit-mask-image: radial-gradient(ellipse at 0 100%, #000 0, transparent 70%); mask-image: radial-gradient(ellipse at 0 100%, #000 0, transparent 70%); }

/* "MOVES  *  PRESENTS" promoter line */
.flyer-top {
  display: flex; justify-content: space-between; align-items: center; gap: 6px;
  font-family: "Archivo Black", system-ui, sans-serif; font-size: 9px; letter-spacing: 1.2px; text-transform: uppercase;
  border-bottom: 2px solid var(--ink); padding-bottom: 3px; margin-bottom: 7px;
}
.flyer-top span:nth-child(2) { font-family: system-ui, sans-serif; font-size: 13px; line-height: 1; }

/* Headline: huge condensed capitals; size steps down with title length (t1..t5) so whole words fit */
:is(#events-list.board .flyer, .flying-flyer) h3 {
  font-family: "Anton", "Archivo Black", Impact, sans-serif; font-weight: 400; text-transform: uppercase; color: var(--ink);
  line-height: .94; letter-spacing: .2px; margin: 0 0 8px;
  text-align: left; overflow-wrap: break-word; hyphens: manual;
}
:is(#events-list.board .flyer, .flying-flyer) h3.t1 { font-size: 40px; }
:is(#events-list.board .flyer, .flying-flyer) h3.t2 { font-size: 32px; }
:is(#events-list.board .flyer, .flying-flyer) h3.t3 { font-size: 26px; }
:is(#events-list.board .flyer, .flying-flyer) h3.t4 { font-size: 22px; }
:is(#events-list.board .flyer, .flying-flyer) h3.t5 { font-size: 18px; }
/* Some short titles print extra-wide instead of tall */
:is(#events-list.board .flyer, .flying-flyer) h3.wide {
  font-family: "Archivo", "Archivo Black", sans-serif; font-stretch: 125%; font-weight: 900; line-height: .98; letter-spacing: -.3px;
  text-align: left; text-align-last: left;
}
:is(#events-list.board .flyer, .flying-flyer) h3.wide.t1 { font-size: 25px; }
:is(#events-list.board .flyer, .flying-flyer) h3.wide.t2 { font-size: 19px; }
/* ...or reversed out of a solid ink block */
:is(#events-list.board .flyer, .flying-flyer) h3.marker {
  background: var(--ink); color: var(--paper); padding: 5px 6px 3px; margin-left: -2px; margin-right: -2px;
}
@media (max-width: 760px) {
  #events-list.board .flyer h3.t1 { font-size: 32px; }
  #events-list.board .flyer h3.t2 { font-size: 26px; }
  #events-list.board .flyer h3.t3 { font-size: 22px; }
  #events-list.board .flyer h3.t4 { font-size: 19px; }
  #events-list.board .flyer h3.t5 { font-size: 16px; }
  #events-list.board .flyer h3.wide.t1 { font-size: 20px; }
  #events-list.board .flyer h3.wide.t2 { font-size: 16px; }
}

/* Date and time: reversed ink bar in wide capitals */
:is(#events-list.board .flyer, .flying-flyer) .when {
  display: inline-block; background: var(--ink); color: var(--paper); padding: 3px 7px 2px; margin-bottom: 6px;
  font-family: "Archivo", "Archivo Black", sans-serif; font-stretch: 125%; font-weight: 900; font-size: 11px; text-transform: uppercase; letter-spacing: .3px;
}
:is(#events-list.board .flyer, .flying-flyer) .meta {
  font-size: 10.5px; font-weight: 800; text-transform: uppercase; letter-spacing: .3px; line-height: 1.3;
  color: color-mix(in srgb, var(--ink) 85%, transparent);
}
:is(#events-list.board .flyer, .flying-flyer) .flyer-foot { border-top: 2px solid var(--ink); padding-top: 6px; margin-top: 8px; }
:is(#events-list.board .flyer, .flying-flyer) .pill {
  background: transparent; border: 1.5px solid var(--ink); color: var(--ink); font-weight: 800; text-transform: uppercase; letter-spacing: .4px; font-size: 10px;
}
:is(#events-list.board .flyer, .flying-flyer) .save-btn {
  background: var(--ink); color: var(--paper); border: 2px solid var(--ink); border-radius: 0;
  font-family: "Archivo Black", system-ui, sans-serif; font-size: 11px; text-transform: uppercase; letter-spacing: .5px;
}
:is(#events-list.board .flyer, .flying-flyer) .save-btn.ghost { background: transparent; color: var(--ink); }

/* Faded, worn print: a speckled mask knocks small holes out of everything printed */
:is(#events-list.board .flyer, .flying-flyer) :is(.flyer-top, h3, .when, .meta, .flyer-foot, .poster-frame) {
  -webkit-mask-image: var(--worn); mask-image: var(--worn);
  -webkit-mask-size: 140px 140px; mask-size: 140px 140px;
}

/* ===== Papers: each kind of Move is printed on its own paper (papers.js picks it, .p-<paper>) =====
   The gig poster above is .p-poster. The others below share these rules, then one block each.
   Headlines size from --h, smaller for long titles (t4, t5) and on phones. */
:is(#events-list.board .flyer, .flying-flyer):not(.p-poster) { --h: 22px; --hs: 1; }
:is(#events-list.board .flyer, .flying-flyer):not(.p-poster) :is(.poster-frame, .halftone) { display: none; }
:is(#events-list.board .flyer, .flying-flyer):not(.p-poster) h3 {
  font-size: calc(var(--h) * var(--hs)); background: none; color: var(--ink); padding: 0; margin: 2px 0 8px; font-stretch: normal; letter-spacing: 0;
  hyphens: auto; -webkit-hyphens: auto; /* long words break with a hyphen, not mid-letter */
}
:is(#events-list.board .flyer, .flying-flyer):not(.p-poster) h3.t4 { font-size: calc(var(--h) * var(--hs) * .86); }
:is(#events-list.board .flyer, .flying-flyer):not(.p-poster) h3.t5 { font-size: calc(var(--h) * var(--hs) * .74); }
/* A date only breaks at the dot between day and time, never inside "6:00 PM" */
.flyer .when .nw, .flying-flyer .when .nw { white-space: nowrap; }
@media (max-width: 760px) { :is(#events-list.board .flyer, .flying-flyer):not(.p-poster) { --hs: .88; } }
/* Dates in plain ink on the handwritten and typed papers */
:is(#events-list.board .flyer, .flying-flyer):is(.p-playbill, .p-notebook, .p-slip, .p-sticky, .p-index, .p-scrap, .p-lecture) .when {
  display: block; background: none; color: var(--ink); padding: 0;
}
.paper-mark { position: absolute; z-index: 1; color: var(--ink); pointer-events: none; }
/* The masked papers (slip, scrap) hide anything outside their own edge, so their focus ring sits inside the
   paper and their tape lies flat on it. The handbill's glow would otherwise replace the focus ring. */
#events-list.board .flyer:is(.p-slip, .p-scrap):focus-visible { outline: 3px solid #f2e93b; outline-offset: -5px; }
#events-list.board .flyer.p-handbill:focus-visible { box-shadow: 0 0 0 3px #f2e93b, 0 12px 20px -8px rgba(0,0,0,.85); }
:is(#events-list.board .flyer, .flying-flyer):is(.p-slip, .p-scrap)::before { top: 0; }
/* Note: these paper rules win over the gig-poster ones (including the phone sizes) partly by coming later in
   the file. Keep this section after the gig-poster block. */

/* Ticket (sports): a dark stub down the left, a perforation, and punched notches top and bottom */
:is(#events-list.board .flyer, .flying-flyer).p-ticket {
  --h: 23px; padding-left: 44px; border: 2px solid var(--ink); border-radius: 8px;
  background-image: radial-gradient(circle at 32px 0, #111 8px, transparent 8.5px), radial-gradient(circle at 32px 100%, #111 8px, transparent 8.5px),
    linear-gradient(90deg, var(--ink) 0 22px, transparent 22px), repeating-linear-gradient(transparent 0 5px, var(--ink) 5px 10px), var(--grain);
  background-size: 100% 100%, 100% 100%, 100% 100%, 2px 100%, 180px 180px; background-position: 0 0, 0 0, 0 0, 31px 0, 0 0;
  background-repeat: no-repeat, no-repeat, no-repeat, no-repeat, repeat;
}
.flyer.p-ticket .flyer-top, .flying-flyer.p-ticket .flyer-top { border: 0; margin: 0; font-size: 11px; }
:is(#events-list.board .flyer, .flying-flyer).p-ticket h3 { font-family: "Anton", Impact, sans-serif; font-style: italic; line-height: 1; }
:is(#events-list.board .flyer, .flying-flyer).p-ticket .when { font-size: 9.5px; }

/* Playbill (arts): centred serif inside a double rule */
:is(#events-list.board .flyer, .flying-flyer).p-playbill { --h: 23px; padding: 24px 20px 16px; text-align: center; outline: 4px double var(--ink); outline-offset: -11px; }
:is(.flyer, .flying-flyer).p-playbill .flyer-top { justify-content: center; border: 0; font: 700 11px "Playfair Display", Georgia, serif; letter-spacing: 4px; }
:is(#events-list.board .flyer, .flying-flyer).p-playbill h3 { font-family: "Playfair Display", Georgia, serif; font-weight: 900; line-height: 1.05; text-align: center; text-align-last: center; text-transform: none; }
:is(#events-list.board .flyer, .flying-flyer).p-playbill .when { font: italic 700 13px "Playfair Display", Georgia, serif; text-transform: none; }

/* Notebook page (clubs): binder holes, a red margin line, ruled lines, marker */
:is(#events-list.board .flyer, .flying-flyer).p-notebook {
  --h: 23px; padding: 24px 12px 12px 40px;
  background-image: radial-gradient(circle at 12px 50%, #111 4.5px, transparent 5px), linear-gradient(90deg, transparent 29px, #e88 29px 31px, transparent 31px),
    repeating-linear-gradient(transparent 0 19px, rgba(70,120,200,.28) 19px 20px);
  background-size: 24px 46px, 100% 100%, 100% 100%; background-repeat: repeat-y, no-repeat, no-repeat;
}
:is(#events-list.board .flyer, .flying-flyer).p-notebook h3 { font-family: "Permanent Marker", "Marker Felt", cursive; font-weight: 400; line-height: 1.05; text-transform: none; }
:is(#events-list.board .flyer, .flying-flyer).p-notebook .when { font: 400 14px "Permanent Marker", "Marker Felt", cursive; text-transform: none; text-decoration: underline wavy; }

/* Order slip (food): a kitchen ticket with a zigzag bottom edge */
:is(#events-list.board .flyer, .flying-flyer).p-slip {
  --h: 21px; padding: 18px 16px 24px;
  -webkit-mask: conic-gradient(from -45deg at 50% 100%, #000 90deg, transparent 0) 0 0 / 14px 100%;
  mask: conic-gradient(from -45deg at 50% 100%, #000 90deg, transparent 0) 0 0 / 14px 100%;
}
:is(.flyer, .flying-flyer).p-slip .flyer-top { justify-content: center; border-bottom-style: dashed; font: 700 12px "Courier New", monospace; }
:is(#events-list.board .flyer, .flying-flyer).p-slip h3 { font-family: "Courier New", monospace; font-weight: 700; line-height: 1.1; }
:is(#events-list.board .flyer, .flying-flyer).p-slip .when { font: 700 12px "Courier New", monospace; }

/* Sticky note (community): no tape, a lifted corner, handwriting */
:is(#events-list.board .flyer, .flying-flyer).p-sticky { --h: 27px; padding-top: 24px; border-bottom-right-radius: 60px 14px; background-image: linear-gradient(rgba(0,0,0,.1), transparent 30px); background-size: 100% 100%; }
:is(.flyer, .flying-flyer).p-sticky::before { display: none; }
:is(#events-list.board .flyer, .flying-flyer).p-sticky h3 { font-family: "Caveat", "Bradley Hand", cursive; font-weight: 700; line-height: .95; text-transform: none; }
:is(#events-list.board .flyer, .flying-flyer).p-sticky .when { font: 700 17px "Caveat", "Bradley Hand", cursive; text-transform: none; }

/* Index card (academic, workshops): small, ruled, typed; they sit under everything */
:is(#events-list.board .flyer, .flying-flyer).p-index {
  --h: 12px; padding: 8px 10px;
  background-image: linear-gradient(transparent 26px, #d66 26px 27.5px, transparent 27.5px), repeating-linear-gradient(transparent 0 15px, rgba(60,90,160,.22) 15px 16px);
  background-size: 100% 100%;
}
:is(#events-list.board .flyer, .flying-flyer).p-index h3 { font-family: "Courier New", monospace; font-weight: 700; line-height: 1.25; text-transform: none; }
:is(#events-list.board .flyer, .flying-flyer).p-index h3:is(.t4, .t5) { font-size: calc(var(--h) * var(--hs)); }
:is(#events-list.board .flyer, .flying-flyer).p-index :is(.when, .meta) { font: 700 10px "Courier New", monospace; }
:is(.flyer, .flying-flyer).p-index .flyer-tags { display: none; }

/* Coaster (bars): thick card, rounded, a drink ring soaked in */
:is(#events-list.board .flyer, .flying-flyer).p-coaster {
  --h: 24px; border-radius: 26px; padding: 22px 20px 18px; text-align: center; outline: 2px solid var(--ink); outline-offset: -9px; border-bottom: 4px solid #b79b6c;
  background-image: radial-gradient(circle at 78% 70%, transparent 56px, rgba(92,48,10,.28) 57px 62px, transparent 64px), var(--grain); background-size: 100% 100%, 180px 180px;
}
:is(.flyer, .flying-flyer).p-coaster .flyer-top { justify-content: center; border: 0; margin: 0; }
:is(#events-list.board .flyer, .flying-flyer).p-coaster h3 { font-family: "Alfa Slab One", Rockwell, serif; font-weight: 400; line-height: 1; text-align: center; text-align-last: center; text-transform: none; }
:is(#events-list.board .flyer, .flying-flyer).p-coaster .when { border-radius: 20px; }

/* Handbill (parties): glossy black, glowing neon ink; long titles in a plainer font */
:is(#events-list.board .flyer, .flying-flyer).p-handbill {
  --h: 23px; border: 2px solid var(--ink); padding: 20px 14px 14px;
  box-shadow: 0 0 22px color-mix(in srgb, var(--ink) 55%, transparent), 0 12px 20px -8px rgba(0,0,0,.85);
  background-image: linear-gradient(115deg, transparent 30%, rgba(255,255,255,.13) 45%, transparent 58%), radial-gradient(circle at 50% 110%, color-mix(in srgb, var(--ink) 45%, transparent), transparent 65%);
  background-size: 100% 100%;
}
:is(.flyer, .flying-flyer).p-handbill .flyer-top { border: 0; justify-content: center; letter-spacing: 4px; }
:is(#events-list.board .flyer, .flying-flyer).p-handbill h3 {
  font-family: "Monoton", "Anton", Impact, sans-serif; font-weight: 400; line-height: 1.25; text-align: center; text-align-last: center;
  text-shadow: 0 0 12px var(--ink); -webkit-mask: none; mask: none;
}
:is(#events-list.board .flyer, .flying-flyer).p-handbill h3:is(.t3, .t4, .t5) { font-family: "Anton", Impact, sans-serif; line-height: 1.05; letter-spacing: .5px; }

/* Scrap (other): torn brown paper, typed in lowercase */
:is(#events-list.board .flyer, .flying-flyer).p-scrap {
  --h: 22px; padding: 22px 16px 26px;
  -webkit-mask: conic-gradient(from -58deg at 50% 100%, #000 116deg, transparent 0) 0 0 / 37px 100%;
  mask: conic-gradient(from -58deg at 50% 100%, #000 116deg, transparent 0) 0 0 / 37px 100%;
}
:is(#events-list.board .flyer, .flying-flyer).p-scrap h3 { font-family: "Courier New", monospace; font-weight: 700; line-height: 1.1; text-transform: lowercase; }
:is(#events-list.board .flyer, .flying-flyer).p-scrap .when { font: 700 12px "Courier New", monospace; }

/* Playing card (games): rounded, a 7 of diamonds in two corners, centred serif */
:is(#events-list.board .flyer, .flying-flyer).p-card { --h: 24px; border-radius: 16px; padding: 46px 22px 42px; text-align: center; background-image: none; }
:is(.flyer, .flying-flyer).p-card .paper-mark { top: 8px; left: 11px; font: 700 22px/.9 Georgia, serif; text-align: center; }
:is(.flyer, .flying-flyer).p-card .paper-mark.flip { top: auto; left: auto; right: 11px; bottom: 8px; transform: rotate(180deg); }
:is(#events-list.board .flyer, .flying-flyer).p-card h3 { font-family: "Playfair Display", Georgia, serif; font-weight: 700; line-height: 1.02; text-align: center; text-align-last: center; text-transform: none; }
:is(#events-list.board .flyer, .flying-flyer).p-card .when { font-size: 9.5px; }

/* Lecture handbill (talks): an ink band with one giant quotation mark */
:is(#events-list.board .flyer, .flying-flyer).p-lecture { --h: 21px; padding: 60px 16px 14px; background-image: linear-gradient(var(--ink) 0 44px, transparent 44px); background-size: 100% 100%; }
:is(.flyer, .flying-flyer).p-lecture .paper-mark { top: 0; left: 12px; height: 44px; overflow: hidden; font: 900 110px/1 "Playfair Display", Georgia, serif; color: var(--paper); }
:is(#events-list.board .flyer, .flying-flyer).p-lecture h3 { font-family: "Playfair Display", Georgia, serif; font-weight: 900; line-height: 1.08; text-transform: none; }
:is(#events-list.board .flyer, .flying-flyer).p-lecture .when { border-bottom: 2px solid; display: inline-block; }

/* Board controls: black with lemon text */
.board-hud { background: rgba(13,13,13,.88); border: 1.5px solid rgba(242,233,59,.45); }
.board-hud #dug-to, .board-hud #loaded-count { color: #f2e93b; }
.board-undo, .tool-btn { background: rgba(13,13,13,.88); color: #f2e93b; border: 1.5px solid rgba(242,233,59,.45); }
.board-undo:hover:not(:disabled), .tool-btn:hover:not(:disabled) { background: #0d0d0d; }
.board-msg { font-family: "Anton", Impact, sans-serif; text-transform: uppercase; letter-spacing: .5px; color: #f2e93b; text-shadow: none; }
.flyer .stamp { font-family: "Anton", Impact, sans-serif; letter-spacing: 1px; border-radius: 0; }

/* Moves tab (desktop): the board always leaves room on the map for two cards side by side,
   an opened Move and its Shpot card, so View Shpot never covers the Move. Both cards are
   280-360px (a quarter of the window); the board gets the rest, never under 240px. */
@media (min-width: 761px) {
  main.events-wide { --side-card-w: clamp(280px, 25vw, 360px); }
  main.events-wide #panel { width: max(240px, calc(100vw - 2 * var(--side-card-w) - 36px)); }
  main.events-wide :is(#event-stack, #place-drawer) { width: var(--side-card-w); }
}

/* ===== Headliners: the few Moves shown big on top of the board (app.js pinFlyers, .head) =====
   Each is its own paper, bigger: a larger title, a line on why to go under it, and a seal (a starburst
   sticker) stuck on the top-right corner, clear of the title. They slam down onto the board.
   Titles size from --h like the other papers (the gig poster sets its own). Keep this after the Papers section. */
:is(#events-list.board .flyer, .flying-flyer).head:not(.p-handbill) { box-shadow: 0 22px 34px -10px rgba(0,0,0,.75); }
#events-list.board .flyer.head:not(.p-handbill):focus-visible { box-shadow: 0 0 0 3px #f2e93b, 0 22px 34px -10px rgba(0,0,0,.75); }
:is(#events-list.board .flyer, .flying-flyer).head > .why { position: relative; z-index: 1; margin: 0 0 10px; font: 700 19px/1.2 "Archivo Black", system-ui, sans-serif; color: var(--ink); }
:is(#events-list.board .flyer, .flying-flyer).head .when { font-size: 13px; }
:is(#events-list.board .flyer, .flying-flyer).head:not(.p-slip) h3 { padding-right: 40px; } /* the seal never sits over the title */
:is(#events-list.board .flyer, .flying-flyer).head .burst {
  position: absolute; z-index: 2; top: -34px; right: -26px; width: 68px; height: 68px; display: grid; place-items: center; rotate: 12deg;
  background: var(--ink); color: var(--paper); text-align: center; font: 400 12px/1 "Anton", Impact, sans-serif; text-transform: uppercase; letter-spacing: .3px;
  clip-path: polygon(50% 0, 60% 12%, 75% 6%, 79% 21%, 94% 25%, 88% 40%, 100% 50%, 88% 60%, 94% 75%, 79% 79%, 75% 94%, 60% 88%, 50% 100%, 40% 88%, 25% 94%, 21% 79%, 6% 75%, 12% 60%, 0 50%, 12% 40%, 6% 25%, 21% 21%, 25% 6%, 40% 12%);
}
.flyer.head .burst b, .flying-flyer.head .burst b { font-weight: 400; max-width: 54px; overflow-wrap: anywhere; }
/* Slams down: from 2.4× to its size with a small overshoot (app.js skips it with reduced motion) */
#events-list.board .flyer.head.slam:not(.ripping) { animation: slam .5s cubic-bezier(.2, 1.5, .4, 1) var(--d, 0ms) both; }
@keyframes slam { 0% { opacity: 0; scale: 2.4; } 55% { opacity: 1; scale: .96; } 100% { opacity: 1; scale: 1; } }

/* Each paper, bigger */
:is(#events-list.board .flyer, .flying-flyer).head.p-poster { padding: 14px 18px 12px; }
:is(#events-list.board .flyer, .flying-flyer).head.p-poster h3 { font-size: 46px; line-height: .95; margin: 8px 0; }
:is(#events-list.board .flyer, .flying-flyer).head.p-poster h3.t4 { font-size: 38px; }
:is(#events-list.board .flyer, .flying-flyer).head.p-poster h3.t5 { font-size: 32px; }
:is(#events-list.board .flyer, .flying-flyer).head.p-ticket { --h: 44px; padding: 34px 18px 12px 46px; }
:is(#events-list.board .flyer, .flying-flyer).head.p-ticket .when { font-size: 11.5px; }
:is(#events-list.board .flyer, .flying-flyer).head.p-playbill { --h: 44px; padding: 28px 24px 18px; }
:is(#events-list.board .flyer, .flying-flyer).head.p-playbill > .why { font: italic 700 17px/1.25 "Playfair Display", Georgia, serif; }
:is(#events-list.board .flyer, .flying-flyer).head.p-notebook { --h: 34px; padding: 26px 16px 12px 42px; }
:is(#events-list.board .flyer, .flying-flyer).head:is(.p-notebook, .p-sticky) > .why { font: 700 25px/1 "Caveat", "Bradley Hand", cursive; }
:is(#events-list.board .flyer, .flying-flyer).head.p-slip { --h: 34px; padding-top: 30px; }
:is(#events-list.board .flyer, .flying-flyer).head.p-slip h3 { margin-top: 34px; } /* room for the seal, which sits inside: the slip's torn edge hides anything outside it */
:is(#events-list.board .flyer, .flying-flyer).head.p-slip .burst { top: 2px; right: 2px; }
:is(#events-list.board .flyer, .flying-flyer).head.p-sticky { --h: 46px; }
:is(#events-list.board .flyer, .flying-flyer).head.p-sticky .when { font-size: 20px; }
:is(#events-list.board .flyer, .flying-flyer).head.p-index { --h: 28px; padding: 34px 14px 12px; }
:is(#events-list.board .flyer, .flying-flyer).head.p-index h3 { line-height: 1.1; }
:is(#events-list.board .flyer, .flying-flyer).head.p-coaster { --h: 42px; }
:is(#events-list.board .flyer, .flying-flyer).head.p-handbill { --h: 36px; padding-top: 36px; }
/* The torn scrap's ragged edge would cut the seal off, so a big one is torn straight, with a dashed fold */
:is(#events-list.board .flyer, .flying-flyer).head.p-scrap { --h: 38px; padding-top: 36px; -webkit-mask: none; mask: none; border-bottom: 3px dashed #8d6a3f; }
:is(#events-list.board .flyer, .flying-flyer).head.p-scrap::before { top: -9px; }
:is(#events-list.board .flyer, .flying-flyer).head.p-card { --h: 40px; }
:is(#events-list.board .flyer, .flying-flyer).head.p-lecture { --h: 36px; }
@media (max-width: 760px) { /* the other papers shrink by --hs */
  :is(#events-list.board .flyer, .flying-flyer).head.p-poster h3 { font-size: 42px; }
  :is(#events-list.board .flyer, .flying-flyer).head.p-poster h3.t4 { font-size: 34px; }
  :is(#events-list.board .flyer, .flying-flyer).head.p-poster h3.t5 { font-size: 28px; }
  :is(#events-list.board .flyer, .flying-flyer).head.p-playbill { --h: 39px; }
  :is(#events-list.board .flyer, .flying-flyer).head > .why { font-size: 16px; }
:is(#events-list.board .flyer, .flying-flyer).head:not(.p-slip) h3 { padding-right: 30px; }
  :is(#events-list.board .flyer, .flying-flyer).head:not(.p-slip) .burst { top: -30px; right: -12px; }
}

/* ===== Usability pass (Nov 2026) ===== */

/* When chips: Any time / Today / Tomorrow / This weekend (Shpots and Moves tabs only) */
.when-chips { display: flex; gap: 6px; margin: 8px 0 4px; overflow-x: auto; scrollbar-width: none; }
.when-chips::-webkit-scrollbar { display: none; }
.when-chips .chip { flex: none; padding: 6px 12px; font-size: 13px; }
.pill.moves-count { background: #ffe1cc; color: #8a3a00; font-weight: 600; }
@media (max-width: 760px) {
  .when-chips { flex: none; margin: 6px 0 2px; }
  .when-chips .chip { min-height: 36px; }
}

/* Flyers kept short: the tags sit at the end of the place line (no row of their own), and the footer is one
   line of small Open (filled) / Save / ✕ buttons. Tap or click, no swiping needed. */
:is(#events-list.board .flyer, .flying-flyer) .flyer-tags .pill { margin: 2px 2px 0 0; vertical-align: middle; }
:is(#events-list.board .flyer, .flying-flyer) .flyer-btns { display: flex; gap: 3px; width: 100%; }
:is(#events-list.board .flyer, .flying-flyer) .flyer-btns .open-btn { flex: 1; }
:is(#events-list.board .flyer, .flying-flyer) .flyer-btns .trash-btn { margin-left: auto; }
:is(#events-list.board .flyer, .flying-flyer) :is(.flyer-btn, .save-btn) {
  appearance: none; border: 2px solid var(--ink); border-radius: 0; cursor: pointer;
  font-family: "Archivo Black", system-ui, sans-serif; font-size: 10px; text-transform: uppercase; letter-spacing: .3px; line-height: 1;
  padding: 3px 5px; min-height: 22px;
}
:is(#events-list.board .flyer, .flying-flyer) .flyer-btn { background: transparent; color: var(--ink); }
:is(#events-list.board .flyer, .flying-flyer) .open-btn { background: var(--ink); color: var(--paper); }
@media (max-width: 760px) {
  :is(#events-list.board .flyer) :is(.flyer-btn, .save-btn) { min-height: 30px; padding: 4px 7px; }
}

/* Shpot card labels: "Opens 5:00 PM" is neutral, not a red "Closed" */
.pill.later { background: #e8f0f1; color: #2f5a63; }
#places-list .day-head { margin-top: 14px; }

/* Opened pile: one line saying what it is */
.stack-note { margin: 0 0 8px; padding: 0 2px; font-size: 12px; line-height: 1.35; color: #4a6a71; }
.event-stack.collapsed .stack-note { display: none; }

/* Accessibility: a clear focus ring for keyboard users, readable muted text, bigger tap targets on phones */
:is(button, a, input, select, summary, [role="button"], [tabindex]):not(.flyer):focus-visible {
  outline: 3px solid var(--brand-accent); outline-offset: 2px;
}
.note, .board-hint, .stack-note { color: #3f5f66; }            /* was a bit too faint on the tinted background */
.meta, .day-head, .empty { color: #3a5a61; }
@media (max-width: 760px) {
  .btn.small { min-height: 36px; }
  .chip { min-height: 32px; }
}

/* ===== Map: grouped pins, Moves badges, Find me, key ===== */
/* Numbered bubble for Shpots close together (teal), tangerine ring when Moves are on inside it */
.pin-cluster {
  display: flex; align-items: center; justify-content: center;
  background: var(--brand-dark); color: var(--brand-on-dark); border-radius: 50%;
  border: 3px solid #f8fafb; box-shadow: 0 2px 6px rgba(5,38,45,.35);
  font-weight: 800; font-size: 14px; box-sizing: border-box;
}
.pin-cluster.has-moves { border-color: var(--brand-accent); }
.pin-cluster .pin-badge { position: absolute; top: -7px; right: -7px; }
/* Little tangerine count: how many Moves are on at that Shpot (or inside that bubble) */
.pin-badge {
  display: inline-flex; align-items: center; justify-content: center; min-width: 18px; height: 18px; padding: 0 4px;
  background: var(--brand-accent); color: #2b1200; border: 2px solid #f8fafb; border-radius: 999px;
  font-size: 11px; font-weight: 800; line-height: 1; box-sizing: border-box;
}
.pin-svg .pin-badge { position: absolute; top: -6px; right: -9px; }

/* Map buttons (Find me, Key): match the + / − zoom buttons */
.map-ctl {
  display: flex; align-items: center; justify-content: center; gap: 4px;
  min-width: 34px; height: 34px; padding: 0 10px; border-radius: 8px;
  background: var(--brand-surface); color: var(--brand-dark); border: 2px solid rgba(5,38,45,.2);
  font: 600 13px system-ui, sans-serif; cursor: pointer; box-shadow: 0 1px 4px rgba(5,38,45,.2);
}
.map-ctl:hover { background: #fff3ea; }
.find-me { width: 34px; padding: 0; }
.find-me.busy svg { animation: find-me-pulse .9s ease-in-out infinite; }
@keyframes find-me-pulse { 50% { opacity: .3; } }

.map-key { display: flex; flex-direction: column-reverse; align-items: flex-start; gap: 6px; }
.map-key-panel {
  background: var(--brand-surface); color: var(--brand-ink); border-radius: 10px; padding: 10px 12px; max-width: 240px;
  box-shadow: 0 4px 14px rgba(5,38,45,.25); font-size: 13px; line-height: 1.35;
}
.map-key-panel[hidden] { display: none; }
.map-key-title { font-weight: 700; margin-bottom: 6px; }
.map-key-panel ul { list-style: none; margin: 0 0 8px; padding: 0; display: grid; grid-template-columns: 1fr 1fr; gap: 3px 10px; }
.map-key-panel li { display: flex; align-items: center; gap: 2px; }
.map-key-row { display: flex; align-items: center; gap: 8px; margin-top: 6px; }
.key-sample.pin-cluster { width: 28px; height: 28px; flex: none; font-size: 12px; border-width: 2px; }
.key-sample.pin-badge { flex: none; }

.map-toast {
  position: absolute; left: 50%; bottom: 28px; transform: translateX(-50%); z-index: 800; max-width: min(90%, 360px);
  background: var(--brand-dark); color: var(--brand-on-dark); padding: 8px 14px; border-radius: 999px; font-size: 13px; text-align: center;
  box-shadow: 0 4px 14px rgba(5,38,45,.3);
}
.map-toast[hidden] { display: none; }

/* ===== Full-map arrow: hide/show the side panel ===== */
/* Computers: a tab on the map's left edge; the panel slides away and the map fills the window */
.panel-toggle {
  position: absolute; left: 0; top: 50%; transform: translateY(-50%); z-index: 850; /* over the map, under the side cards */
  display: flex; align-items: center; justify-content: center; width: 26px; height: 56px; padding: 0;
  background: var(--brand-surface); color: var(--brand-dark); border: 1px solid #d5e3e5; border-left: none;
  border-radius: 0 10px 10px 0; box-shadow: 2px 1px 6px rgba(5,38,45,.18); cursor: pointer;
}
.panel-toggle:hover { background: #fff3ea; color: var(--brand-accent-text); }
.panel-toggle svg { transition: transform .25s ease; }
.panel-toggle-text { display: none; }
main.panel-collapsed .panel-toggle svg { transform: rotate(180deg); }
main.panel-collapsed #panel { width: 0 !important; padding-left: 0; padding-right: 0; border-right: none; overflow: hidden; }

@media (max-width: 760px) {
  /* Phones: a pill at the bottom of the map (Shpots tab only, the one tab with a map) */
  .panel-toggle {
    top: auto; bottom: 10px; left: 50%; transform: translateX(-50%); width: auto; height: 34px; gap: 4px; padding: 0 12px 0 8px;
    border: 1px solid #d5e3e5; border-radius: 999px; font: 600 13px system-ui, sans-serif;
  }
  .panel-toggle svg { transform: rotate(-90deg); } /* points down: the list folds away */
  main.panel-collapsed .panel-toggle svg { transform: rotate(90deg); }
  .panel-toggle-text { display: inline; }
  main:not([data-tab="places"]) .panel-toggle { display: none; }
  /* Full map: the map takes all the space; only the bottom tab bar stays */
  main.panel-collapsed[data-tab="places"] #map-wrap { height: auto; flex: 1; }
  main.panel-collapsed[data-tab="places"] #panel { width: 100% !important; flex: none; padding: 0; overflow: visible; }
  main.panel-collapsed[data-tab="places"] #panel > :not(.tabs) { display: none; }
}

/* ---------- Menus on place cards (restaurants) ---------- */
.menu { margin: 12px 0; border: 1px solid #d5e3e5; border-radius: 10px; background: var(--brand-surface); }
.menu > summary, .menu-sec > summary { cursor: pointer; list-style: none; display: flex; justify-content: space-between; align-items: center; gap: 8px; }
.menu > summary::-webkit-details-marker, .menu-sec > summary::-webkit-details-marker { display: none; }
.menu > summary::before, .menu-sec > summary::before { content: "▸"; color: #506e74; transition: transform .15s; flex: none; width: 1em; }
.menu[open] > summary::before, .menu-sec[open] > summary::before { transform: rotate(90deg); }
.menu > summary { padding: 10px 12px; font-weight: 700; font-size: 15px; min-height: 24px; }
.menu-title { flex: 1; }
.menu-n { font-size: 12px; font-weight: 600; color: #506e74; }
.menu-body { padding: 0 12px 10px; }
.menu-tabs { display: flex; gap: 6px; flex-wrap: wrap; margin-bottom: 8px; }
.menu.searching .menu-tabs { display: none; }
.menu-which { display: none; color: #506e74; font-weight: 600; }
.menu.searching .menu-which { display: inline; }
.menu-find { width: 100%; box-sizing: border-box; margin-bottom: 6px; }
.menu-sec { border-top: 1px solid #dbe7e9; }
.menu-sec > summary { padding: 9px 0; font-weight: 700; font-size: 14px; min-height: 22px; }
.menu-sec > summary > span:first-of-type { flex: 1; }
.menu-note { margin: 0 0 6px; font-size: 12px; color: #506e74; font-style: italic; }
.menu-item { padding: 6px 0 8px; }
.menu-item + .menu-item { border-top: 1px dashed #e1eaec; }
.mi-top { display: flex; justify-content: space-between; gap: 10px; align-items: baseline; }
.mi-name { font-weight: 600; font-size: 14px; }
.mi-price { font-weight: 700; font-size: 13px; color: var(--brand-dark); white-space: nowrap; }
.mi-desc { font-size: 13px; color: #3b565c; margin-top: 2px; line-height: 1.35; }
.mi-extra { font-size: 12px; color: #506e74; margin-top: 2px; }
.menu mark { background: #ffd9b8; color: inherit; border-radius: 2px; padding: 0 1px; }
.menu-hit { font-size: 12px; color: var(--brand-accent-text); margin: 4px 0 2px; }

/* ---------- Shpot type pills (Shpots tab). School opens into building groups beside it. ---------- */
.kind-pills { display: flex; flex-wrap: wrap; gap: 6px; padding: 4px 0 8px; }
.kind-pills .chip { flex: none; padding: 6px 12px; font-size: 13px; }
.kind-family { display: contents; }
.kind-family.opening .group-chip { animation: group-in .22s ease-out backwards; animation-delay: calc(var(--i) * 35ms); }
@keyframes group-in { from { opacity: 0; transform: translateX(-14px) scale(.9); } }
@media (prefers-reduced-motion: reduce) { .kind-family.opening .group-chip { animation: none; } }
@media (max-width: 760px) {
  /* One row that scrolls sideways and stays put while the list scrolls under it */
  .kind-pills { flex-wrap: nowrap; overflow-x: auto; scrollbar-width: none; position: sticky; top: 0; z-index: 5; background: var(--brand-canvas); }
  .kind-pills::-webkit-scrollbar { display: none; }
  .kind-pills .chip { min-height: 36px; }
}

/* Pills combine: counts, grayed-out dead ends, and Filters replaced on the Shpots tab */
.kind-pills .kind-chip.group-chip { border-style: dashed; }
.kind-pills .kind-chip.on { border-style: solid; }
.pill-n { color: #5b7279; font-weight: 600; }
.kind-pills .chip:disabled { opacity: .45; cursor: default; }
main[data-tab="places"] #controls-row, main[data-tab="places"] #tag-chips { display: none; }

/* Admin tab: filter menu, tags, needs tags */
.menu-ed { margin-top: 8px; }
.menu-ed li { flex-direction: row; align-items: center; justify-content: space-between; }
.menu-ed li.inner { margin-left: 22px; }
.menu-ed li.off .info { opacity: .6; }
.menu-ed .info { cursor: default; }
.menu-ed .tag-group-name { margin: 12px 0 4px; }
.menu-ed .decide { flex-wrap: nowrap; }
.menu-ed .decide .btn:disabled { opacity: .35; }
@media (max-width: 760px) { .menu-ed li { flex-direction: column; align-items: flex-start; } }

/* Places inside other places */
.link-btn { background: none; border: none; padding: 0; font: inherit; color: #13616f; text-decoration: underline; cursor: pointer; text-align: left; }
.back-link { display: block; padding: 6px 0; margin: 0 40px 4px 0; font-size: 13px; font-weight: 600; text-decoration: none; }
.inside-list { display: flex; flex-direction: column; gap: 6px; margin-bottom: 10px; }
.inside-item { display: flex; align-items: center; gap: 8px; width: 100%; min-height: 44px; padding: 6px 10px; font: inherit; text-align: left; color: inherit; background: var(--brand-surface); border: 1px solid #dbe7e9; border-radius: 10px; cursor: pointer; }
.inside-item.dim { opacity: .55; }
.inside-name { flex: 1; min-width: 0; font-weight: 600; font-size: 14px; display: flex; flex-direction: column; }
.inside-name .meta { font-weight: 400; }
.inside-item .pill { margin: 0; flex: none; }

/* Never set position on .pin-svg or .pin-cluster: the map library needs them absolute, or they drift from their spot. */
.pin-cluster.key-sample { position: relative; } /* the one in the map key isn't on the map */
/* ===== Business: claim a Shpot, and the business dashboard ===== */
.claim-line { font-size: 13px; color: #3f5f66; margin: 10px 0 0; padding-top: 10px; border-top: 1px dashed #d5e3e5; }
.claim-line .link-btn { font-weight: 700; }
.claim-form textarea { resize: vertical; }
.claim-message { white-space: pre-line; -webkit-line-clamp: 4 !important; }

.modal-box.dash-box { width: 560px; }
.dash-head { display: flex; justify-content: space-between; align-items: flex-start; gap: 12px; padding-right: 30px; }
.dash-head h2 { margin: 2px 0 2px; }
.dash-kicker { font-size: 11px; font-weight: 800; text-transform: uppercase; letter-spacing: .6px; color: var(--brand-accent-text); }
.dash-plan { flex: none; font-size: 11px; font-weight: 700; padding: 4px 9px; border-radius: 999px; background: #111111; color: #ff7a1a; white-space: nowrap; }
.dash-period { margin: 10px 0 6px; }
.dash-stats { display: grid; grid-template-columns: repeat(auto-fit, minmax(96px, 1fr)); gap: 8px; }
.dash-stat { background: var(--brand-canvas); border-radius: 10px; padding: 10px 10px 8px; }
.dash-num { font-size: 24px; font-weight: 800; line-height: 1.1; color: var(--brand-dark); }
.dash-label { font-size: 12px; color: #3a5a61; margin: 2px 0; }
.dash-up, .dash-down { font-size: 11px; font-weight: 800; }
.dash-up { color: #1d7a35; }
.dash-down { color: #b3261e; }
.dash-chart { width: 100%; height: 70px; display: block; background: var(--brand-canvas); border-radius: 8px; }
.dash-chart rect { fill: var(--brand-accent); }
.dash-chart rect:hover { fill: var(--brand-dark); }
.dash-tips { margin: 4px 0 0; padding-left: 18px; font-size: 13px; line-height: 1.5; }
.dash-actions { margin-top: 16px; }
@media (max-width: 760px) {
  .dash-head { flex-direction: column; gap: 6px; }
  .dash-stats { grid-template-columns: repeat(2, 1fr); }
}

/* ===== Admin claim cards ===== */
.claim-list { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 10px; }
.claim-card { background: var(--brand-surface); border: 1px solid #d5e3e5; border-radius: 12px; padding: 12px 14px; font-size: 13px; line-height: 1.45; }
.claim-card.approved { background: #f1f8f1; border-color: #b7dbb8; }
.claim-card.denied { opacity: .7; }
.claim-top { display: flex; justify-content: space-between; align-items: baseline; gap: 8px; }
.claim-place { font-size: 16px; font-weight: 800; text-decoration: none; }
.claim-warn { margin: 6px 0 0; padding: 6px 8px; border-radius: 8px; background: #fff6dc; color: #6b5300; font-weight: 600; }
.claim-cols { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; margin-top: 8px; }
.claim-col { display: flex; flex-direction: column; gap: 3px; min-width: 0; overflow-wrap: anywhere; }
.claim-h { font-size: 11px; font-weight: 800; text-transform: uppercase; letter-spacing: .4px; color: #3a5a61; margin-bottom: 2px; }
.claim-checks { margin-top: 10px; }
.pending .claim-checks ul { margin: 0; gap: 3px; overflow-wrap: anywhere; }
.pending .claim-checks li { display: grid; grid-template-columns: 1.2em 1fr; gap: 2px; border: 0; border-radius: 0; background: none; padding: 0; }
.claim-checks .good { color: #145c26; font-weight: 700; }
.claim-checks .warn { color: #6b5300; font-weight: 600; }
.claim-checks .meta { margin: 4px 0 0; }
.claim-note { font-style: italic; color: #2f4f55; margin-top: 4px; white-space: pre-line; }
.claim-call { align-self: flex-start; text-decoration: none; }
.claim-tip { margin: 10px 0 0; padding: 8px 10px; border-radius: 8px; background: var(--brand-canvas); color: #2f4f55; }
.claim-decide { margin-top: 10px; display: flex; flex-direction: column; gap: 8px; }
.claim-how { border: none; padding: 0; margin: 0; display: flex; flex-wrap: wrap; gap: 4px 14px; }
.claim-how legend { font-weight: 700; margin-bottom: 4px; }
.claim-how label { display: inline-flex; align-items: center; gap: 6px; }
.claim-msg-label { display: flex; flex-direction: column; gap: 4px; font-weight: 600; }
.claim-reply { padding: 7px 9px; border: 1px solid #cbd2d4; border-radius: 8px; font: inherit; }
.claim-card .decide { display: flex; gap: 8px; }
.claim-card .decide .btn[disabled] { opacity: .45; cursor: not-allowed; }
@media (max-width: 760px) { .claim-cols { grid-template-columns: 1fr; } }

/* ===== Business side: claim status and the approval message ===== */
.claim-status { display: inline-block; font-size: 11px; font-weight: 800; padding: 2px 8px; border-radius: 999px; margin-right: 4px; }
.claim-status.pending { background: #fff1d6; color: #7a4b00; }
.claim-status.approved { background: #d9f5df; color: #145c26; }
.claim-status.rejected { background: #f3e1e1; color: #7a1f1f; }
.draft-item .claim-status { justify-self: start; }
.claim-yay { font-size: 40px; line-height: 1; margin-bottom: 4px; }

/* ===== Business dashboard as its own page (moves.live/?dashboard=<id>) ===== */
.dash-page { display: none; }
body.dash-mode .dash-page { display: block; }
body.dash-mode main, body.dash-mode #scrim { display: none !important; }
html:has(body.dash-mode), body.dash-mode { height: auto !important; overflow: auto !important; position: static !important; }
body.dash-mode { display: block !important; }
.dash-wrap { max-width: 760px; margin: 24px auto; padding: 0 16px 48px; }
.dash-wrap > h2 { margin: 4px 0 6px; }
.dash-wrap .dash-head { padding-right: 0; }
.dash-wrap .dash-head h2 { font-size: 28px; }
.dash-wrap .dash-stats { grid-template-columns: repeat(auto-fit, minmax(130px, 1fr)); gap: 10px; }
.dash-wrap .dash-num { font-size: 30px; }
.dash-wrap .dash-chart { height: 120px; }
.dash-wrap h4 { margin: 22px 0 8px; font-size: 13px; text-transform: uppercase; color: #3a5a61; }
a.card.dash-move { display: block; text-decoration: none; color: inherit; }
a.card.dash-move:hover { border-color: var(--brand-pop); }
.dash-foot { margin-top: 18px; }
@media (max-width: 760px) {
  .dash-wrap { margin-top: 14px; }
  .dash-wrap .dash-stats { grid-template-columns: repeat(2, 1fr); }
}
/* Dashboard links look like the buttons they replaced */
a.btn { text-decoration: none; display: inline-flex; align-items: center; }
a.draft-item { text-decoration: none; color: inherit; }

/* ===== Dashboard: three simple sections ===== */
.dash-card { background: var(--brand-surface); border: 1px solid #d5e3e5; border-radius: 14px; padding: 16px 18px; margin-top: 14px; }
.dash-h { font-size: 12px; font-weight: 800; text-transform: uppercase; letter-spacing: .5px; color: #3a5a61; margin-bottom: 6px; }
.dash-headline { font-size: 20px; line-height: 1.35; margin: 0; color: var(--brand-ink); }
.dash-headline b { color: var(--brand-dark); }
.dash-trend { margin: 6px 0 0; font-size: 14px; }
.dash-more { margin-top: 12px; }
.dash-more > summary { cursor: pointer; font-weight: 700; color: var(--brand-accent-text); font-size: 14px; }
.dash-more[open] > summary { margin-bottom: 8px; }
.dash-sub { font-size: 12px; font-weight: 700; color: #3a5a61; margin: 14px 0 6px; }
.dash-next { background: #111111; border-color: #111111; color: #ffe1cc; }
.dash-next .dash-h { color: #ff7a1a; }
.dash-next-text { font-size: 16px; line-height: 1.45; margin: 0 0 12px; }
.dash-next-text b { color: #ffffff; }
.dash-next .btn { background: #ff7a1a; color: #111111; font-weight: 700; min-height: 42px; }
.dash-templates { display: grid; grid-template-columns: repeat(auto-fill, minmax(130px, 1fr)); gap: 8px; margin-top: 10px; }
.dash-tpl {
  display: flex; align-items: center; gap: 8px; padding: 12px 12px; min-height: 48px; text-align: left;
  background: var(--brand-canvas); border: 1px solid #d5e3e5; border-radius: 10px; font: inherit; font-weight: 700; font-size: 14px; color: var(--brand-ink); cursor: pointer;
}
.dash-tpl:hover { border-color: var(--brand-pop); background: #fff3ea; }
.dash-tpl-icon { flex: none; width: 26px; height: 26px; border-radius: 50%; background: var(--brand-dark); color: var(--brand-on-dark); display: inline-flex; align-items: center; justify-content: center; font-size: 13px; }
.dash-links { display: flex; flex-wrap: wrap; gap: 6px 18px; margin-top: 18px; font-size: 14px; }
.dash-links a.link-btn { text-decoration: underline; }
.dash-wrap .dash-chart { height: 90px; }

/* The 30-second composer */
.composer-row { display: grid; grid-template-columns: 1.4fr 1fr .7fr; gap: 8px; }
.composer-preview { min-height: 1.4em; font-weight: 600; color: var(--brand-dark); margin: 2px 0 0; }
.composer .form-actions { display: flex; gap: 8px; }
@media (max-width: 760px) { .composer-row { grid-template-columns: 1fr 1fr; } .composer-row label:last-child { grid-column: span 2; } }

.dash-toast {
  position: fixed; left: 50%; bottom: 24px; transform: translateX(-50%); z-index: 1200; max-width: min(92vw, 420px);
  background: #111111; color: #ffe1cc; padding: 10px 16px; border-radius: 999px; font-size: 14px; text-align: center; box-shadow: 0 6px 18px rgba(0,0,0,.3);
}
.dash-toast[hidden] { display: none; }

/* Weekly roundup switch at the top of Saved (push.js draws it; app.js leaves #roundup empty when notifications aren't available) */
.roundup { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin: 0 0 12px; padding: 10px 12px; background: var(--brand-surface); border: 1px solid #dbe7e9; border-radius: 10px; }
.roundup-text { display: flex; flex-direction: column; gap: 2px; min-width: 0; }
.roundup-label { font-size: 14px; }
.roundup-line, .roundup-note { font-size: 13px; color: #506e74; }
.roundup-note { color: #b3261e; }
.roundup-switch { flex: none; position: relative; width: 52px; min-height: 44px; padding: 0; background: none; border: none; cursor: pointer; }
.roundup-switch::before { content: ""; position: absolute; left: 0; top: 50%; width: 52px; height: 30px; margin-top: -15px; border-radius: 15px; background: #6f8b91; transition: background .15s; } /* 3:1 or better against the card, so the switch is visible when off */
.roundup-knob { position: absolute; left: 3px; top: 50%; width: 24px; height: 24px; margin-top: -12px; border-radius: 50%; background: #fff; box-shadow: 0 1px 3px rgba(5,38,45,.4); transition: left .15s; }
.roundup-switch[aria-pressed="true"]::before { background: var(--brand-accent); }
.roundup-switch[aria-pressed="true"] .roundup-knob { left: 25px; }
.roundup-switch[aria-disabled="true"] { opacity: .6; cursor: progress; }
@media (prefers-reduced-motion: reduce) { .roundup-switch::before, .roundup-knob { transition: none; } }

/* ===== Moves tab: Moves on the map ===== */
/* Tangerine bubble: how many Moves are close together */
.pin-cluster.has-count { background: var(--brand-accent); color: #2b1200; }
.map-key-moves { display: none; }
#map-wrap.moves-map .map-key-moves { display: block; }
/* (the pin colors and open-Shpot dot stay; the Shpot-only lines go) */
#map-wrap.moves-map .map-key-panel > .map-key-row { display: none; }
#map-wrap.moves-map .map-key-title { display: none; }
#map-wrap.moves-map .map-key-panel ul { margin: 8px 0 0; }
/* The list that opens when you point at a pin */
.move-list {
  position: absolute; z-index: 880; display: flex; flex-direction: column; max-height: min(340px, calc(100% - 16px));
  background: var(--brand-surface); color: var(--brand-ink); border-radius: 12px; overflow: hidden; box-sizing: border-box;
  box-shadow: 0 6px 22px rgba(5,38,45,.35);
}
.move-list[hidden] { display: none; }
.move-list-head { flex: none; display: flex; align-items: flex-start; justify-content: space-between; gap: 8px; padding: 10px 12px 8px; border-bottom: 1px solid #d5e3e5; }
.move-list-head .close { position: static; flex: none; }
.move-list-place { padding: 0; border: 0; background: none; color: inherit; font: inherit; font-weight: 700; text-align: left; cursor: pointer; }
.move-list-place:hover { text-decoration: underline; }
.move-list-rows { overflow-y: auto; overscroll-behavior: contain; min-height: 0; scrollbar-width: thin; }
.move-row { display: block; width: 100%; padding: 8px 12px; border: 0; border-bottom: 1px solid #e3ecee; background: none; color: inherit; font: inherit; font-size: 14px; text-align: left; cursor: pointer; }
.move-row:last-child { border-bottom: 0; }
.move-row:hover, .move-row:focus-visible { background: #fff3ea; }
.move-row .meta { display: block; }
@media (max-width: 760px) { .move-list { display: none; } } /* no map on this tab */

/* ===== Moves tab: filter pills ===== */
#move-pills[hidden] { display: none; }
/* The row only holds the phones' Opened button now; it takes no space until there is one */
#controls-row:not(:has(.opened-chip:not([hidden]))), main:not([data-tab="events"]) #controls-row { display: none; }
@media (min-width: 761px) { #controls-row { display: none; } }

/* ===== Friends ===== */
.friend-badge { display: inline-flex; align-items: center; justify-content: center; min-width: 18px; height: 18px; padding: 0 5px; margin-left: 4px; border-radius: 999px; background: #e5322b; color: #fff; font-size: 11px; font-weight: 800; }
.friend-count { display: inline-block; font-size: 12px; font-weight: 700; padding: 1px 8px; border-radius: 999px; background: var(--brand-canvas); color: var(--brand-dark); margin-left: 4px; }
.friend-code-btn { margin: 2px 0 10px; }
.friend-group { margin: 8px 0 12px; }
.friend-h { font-size: 12px; font-weight: 800; text-transform: uppercase; letter-spacing: .4px; color: #3a5a61; margin-bottom: 6px; cursor: default; }
details.friend-group > summary.friend-h { cursor: pointer; }
.friend-row { display: flex; align-items: center; gap: 10px; padding: 6px 0; border-bottom: 1px solid #e0e8e9; }
.friend-row:last-child { border-bottom: none; }
.avatar.sm { width: 34px; height: 34px; font-size: 13px; flex: none; }
.friend-avatar { background: var(--brand-dark); color: var(--brand-on-dark); }
.friend-name { flex: 1; min-width: 0; font-weight: 600; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.friend-actions { display: flex; gap: 6px; align-items: center; }
.friend-actions .link-btn { font-size: 18px; text-decoration: none; padding: 0 6px; }
.friend-actions .link-btn[data-cancel-req], .friend-actions .link-btn[data-unblock] { font-size: 13px; text-decoration: underline; }
.friend-qr { display: flex; justify-content: center; margin: 12px auto; width: min(240px, 70vw); aspect-ratio: 1; padding: 8px; background: #fff; border-radius: 12px; border: 1px solid #d5e3e5; }
.friend-qr svg { width: 100%; height: 100%; }
.friend-link input { width: 100%; padding: 8px 10px; border: 1px solid #cbd2d4; border-radius: 8px; font: inherit; font-size: 13px; color: var(--brand-ink); background: var(--brand-canvas); }
.friend-menu { display: flex; gap: 8px; margin: 10px 0; }
.danger-text { color: #b3261e !important; }
.friend-yay { width: 56px; height: 56px; border-radius: 50%; background: var(--brand-dark); color: var(--brand-on-dark); display: flex; align-items: center; justify-content: center; font-size: 22px; font-weight: 800; margin-bottom: 6px; }

/* ===== Friends, easier to find ===== */
.friends-btn { display: inline-flex; align-items: center; gap: 5px; position: relative; }
.friends-btn .friend-badge { margin-left: 2px; }
@media (max-width: 760px) { .friends-btn .friends-label { display: none; } .friends-btn { min-width: 40px; justify-content: center; } }
/* "Sam wants to be friends" */
.banner.friend-req { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; padding: 8px 16px; background: #111111; color: #ffe1cc; border-bottom: 2px solid #ff7a1a; }
.banner.friend-req[hidden] { display: none; }
.friend-banner-text { flex: 1; min-width: 160px; font-size: 14px; }
.friend-banner-text b { color: #ff7a1a; }
.banner.friend-req .btn { min-height: 34px; }
.banner.friend-req .btn:not(.ghost) { background: #ff7a1a; color: #111111; font-weight: 700; }
.banner.friend-req .btn.ghost { background: transparent; color: #ffe1cc; border: 1px solid rgba(255,225,204,.4); }
/* Add a friend: show / scan / send, and type a code */
.friend-add { background: var(--brand-canvas); border-radius: 12px; padding: 12px; margin: 8px 0 14px; }
.friend-add-btns { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; margin: 6px 0 10px; }
.friend-add-btn { display: flex; flex-direction: column; align-items: center; gap: 4px; padding: 12px 6px; min-height: 64px; background: var(--brand-surface); border: 1px solid #d5e3e5; border-radius: 10px; font: inherit; font-size: 13px; font-weight: 700; color: var(--brand-ink); cursor: pointer; text-align: center; }
.friend-add-btn:hover { border-color: var(--brand-pop); }
.friend-add-btn > span { font-size: 22px; line-height: 1; color: var(--brand-dark); }
.friend-type label { display: block; font-size: 12px; font-weight: 700; margin-bottom: 4px; }
.friend-type > div { display: flex; gap: 6px; }
.friend-type input { flex: 1; min-width: 0; padding: 8px 10px; border: 1px solid #cbd2d4; border-radius: 8px; font: inherit; font-size: 16px; letter-spacing: 1px; text-transform: uppercase; }
.friend-type .meta { display: block; margin-top: 6px; }
.friend-big-code { text-align: center; font-size: 26px; font-weight: 800; letter-spacing: 3px; margin: 4px 0 12px; color: var(--brand-dark); font-variant-numeric: tabular-nums; }
/* Camera scanner */
.scan-box { position: relative; width: min(320px, 100%); aspect-ratio: 1; margin: 10px auto; border-radius: 14px; overflow: hidden; background: #111111; }
.scan-box video { width: 100%; height: 100%; object-fit: cover; }
.scan-frame { position: absolute; inset: 18%; border: 3px solid #ff7a1a; border-radius: 12px; box-shadow: 0 0 0 999px rgba(0,0,0,.35); }
.scan-msg { text-align: center; min-height: 1.3em; }
@media (max-width: 420px) { .friend-add-btns { grid-template-columns: 1fr 1fr 1fr; gap: 6px; } .friend-add-btn { font-size: 12px; } }

/* ===== Usernames ===== */
.friend-me { font-size: 15px; margin: 2px 0 8px; }
.friend-me b { color: var(--brand-dark); }
.friend-handle { display: block; font-size: 12px; font-weight: 500; color: #4a6a71; }
.friend-handle.big { font-size: 15px; font-weight: 700; margin: -4px 0 6px; color: var(--brand-dark); }
.friend-name { display: flex; flex-direction: column; }
.friend-privacy { display: flex; align-items: flex-start; gap: 8px; font-size: 13px; margin-top: 10px; }
.friend-privacy input { margin-top: 2px; width: 18px; height: 18px; flex: none; }
.name-pick { background: #111111; color: #ffe1cc; border-radius: 12px; padding: 12px 14px; margin: 6px 0 12px; }
.name-pick .meta { color: #ffd2b8; }
.name-input { display: flex; align-items: center; background: #fff3ea; border-radius: 8px; padding: 0 10px; margin: 8px 0 4px; }
.name-input span { font-size: 18px; font-weight: 800; color: #b34700; }
.name-input input { flex: 1; min-width: 0; border: none; background: transparent; padding: 10px 6px; font: inherit; font-size: 17px; color: #111111; }
.name-input input:focus { outline: none; }
.name-input:focus-within { box-shadow: 0 0 0 3px #ff7a1a; }
.name-pick .name-hint.msg.ok { color: #9be7a8; }
.name-pick .name-hint.msg.error { color: #ffb4a8; }
.name-pick .btn { background: #ff7a1a; color: #111111; font-weight: 700; margin-top: 6px; }

/* ===== Together: I'm going, friends going, send a Move, plans ===== */
.together { margin: 10px 0 4px; padding: 10px 12px; background: var(--brand-canvas); border-radius: 12px; }
.together:empty { display: none; }
.together-line { display: flex; align-items: center; gap: 8px; font-size: 14px; margin-bottom: 8px; }
.together-line b { color: var(--brand-dark); }
.faces { display: inline-flex; flex: none; }
.faces .avatar { width: 28px; height: 28px; font-size: 11px; border: 2px solid var(--brand-canvas); margin-left: -9px; }
.faces .avatar:first-child { margin-left: 0; }
.together-btns { display: flex; flex-wrap: wrap; gap: 6px; }
.together-note { font-size: 12px; margin: 6px 0 0; }
.together-field { display: block; font-size: 12px; font-weight: 700; margin: 8px 0; }
.together-field input { display: block; width: 100%; box-sizing: border-box; margin-top: 4px; padding: 8px 10px; border: 1px solid #cbd2d4; border-radius: 8px; font: inherit; font-size: 16px; font-weight: 400; }
.pick-friends { max-height: 260px; overflow-y: auto; border: 1px solid #e0e8e9; border-radius: 10px; padding: 2px 10px; margin: 6px 0 10px; }
.pick-friend { display: flex; align-items: center; gap: 10px; padding: 6px 0; border-bottom: 1px solid #e0e8e9; cursor: pointer; }
.pick-friend:last-child { border-bottom: none; }
.pick-friend input { width: 20px; height: 20px; flex: none; accent-color: #ff7a1a; }
.pick-friend.taken { opacity: .55; cursor: default; }
.friend-h .link-btn { float: right; text-transform: none; letter-spacing: 0; font-size: 13px; }
.plan-row { display: flex; align-items: center; gap: 10px; width: 100%; padding: 8px 10px; margin-bottom: 6px; background: var(--brand-surface); border: 1px solid #d5e3e5; border-left: 4px solid #ff7a1a; border-radius: 10px; font: inherit; text-align: left; cursor: pointer; color: var(--brand-ink); }
.plan-row.ask { background: #fff3ea; }
.plan-when { flex: none; width: 40px; text-align: center; font-size: 11px; font-weight: 800; text-transform: uppercase; color: var(--brand-dark); line-height: 1.1; }
.plan-when b { display: block; font-size: 19px; }
.plan-title { flex: 1; min-width: 0; font-weight: 700; }
.plan-title .meta { display: block; font-weight: 400; }
.plan-me { flex: none; font-size: 12px; font-weight: 800; padding: 3px 9px; border-radius: 999px; background: #e0e8e9; color: var(--brand-ink); }
.plan-me.r-in { background: #d4f2dc; color: #14632b; }
.plan-me.r-invited { background: #ff7a1a; color: #111111; }
.plan-me.r-out { background: #f3d6d3; color: #8a1f17; }
.plan-move { display: flex; justify-content: space-between; gap: 8px; width: 100%; margin: 10px 0; padding: 10px 12px; border: 1px solid #d5e3e5; border-radius: 10px; background: var(--brand-canvas); font: inherit; font-weight: 700; cursor: pointer; text-align: left; color: var(--brand-ink); }
.plan-move span:last-child { font-weight: 500; color: var(--brand-dark); white-space: nowrap; }
.plan-note { font-style: italic; margin: 8px 0; }
.rsvp { display: flex; gap: 6px; margin: 4px 0 12px; }
.rsvp .btn { flex: 1; min-height: 40px; }
.share-row .friend-name > span:first-child { white-space: normal; font-weight: 500; }
.share-row .friend-name { white-space: normal; }
.banner.friend-req .avatar { flex: none; }
/* On the board: "👥 Max +2 going" */
.flyer .flyer-friends { display: inline-block; margin-top: 6px; padding: 2px 8px; border-radius: 999px; background: #ff7a1a; color: #111111; font-size: 12px; font-weight: 800; letter-spacing: 0; text-transform: none; transform: rotate(-2deg); box-shadow: 0 1px 0 rgba(0,0,0,.25); }
/* ===== Admin: New sign-ups ===== */
.signups-sum { display: flex; flex-wrap: wrap; gap: 8px; margin: 6px 0 10px; }
.signups-sum:empty { display: none; }
.signup-stat { display: flex; flex-direction: column; align-items: center; min-width: 72px; padding: 6px 10px; border-radius: 10px; background: #e3edee; font-size: 11px; font-weight: 700; color: #3a5a61; text-align: center; }
.signup-stat b { font-size: 20px; line-height: 1.1; color: var(--brand-dark); }
.signup-row .who { flex: 1; display: flex; flex-direction: column; }
.signup-row .who > .signup-sub, .signup-handle { font-weight: 500; color: #4a6a71; }
.signup-sub { font-size: 12px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.signup-handle { font-size: 13px; }
.signup-badge { flex: none; font-size: 11px; font-weight: 800; padding: 3px 8px; border-radius: 999px; white-space: nowrap; }
.signup-badge.s-in { background: #d4f2dc; color: #14632b; }
.signup-badge.s-never { background: #fff3cd; color: #7a5a00; }
.signup-badge.s-waiting { background: #f3d6d3; color: #8a1f17; }
/* ===== Continue with Google (Google's own look: white button, the colored G) ===== */
.google-btn { display: flex; align-items: center; justify-content: center; gap: 10px; width: 100%; min-height: 44px; margin-top: 12px; padding: 0 16px; background: #ffffff; color: #1f1f1f; border: 1px solid #747775; border-radius: 22px; font: inherit; font-size: 15px; font-weight: 600; cursor: pointer; }
.google-btn:hover { background: #f2f2f2; }
.google-btn:disabled { opacity: .7; cursor: default; }
.auth-or { display: flex; align-items: center; gap: 10px; margin: 14px 0 0; font-size: 12px; color: #4a6a71; }
.auth-or::before, .auth-or::after { content: ""; flex: 1; height: 1px; background: #cddde0; }

/* ===== Sign in / Create account ===== */
.auth-hero { margin: -4px 0 12px; padding: 16px 16px 14px; border-radius: 14px; background: #111111; color: #ffe1cc; }
.auth-logo { font-family: "Anton", Impact, sans-serif; font-size: 30px; letter-spacing: 1px; color: #ff7a1a; line-height: 1; text-transform: uppercase; }
.auth-hero p { margin: 8px 0 0; font-size: 14px; line-height: 1.4; }
.auth-tabs { display: grid; grid-template-columns: 1fr 1fr; gap: 4px; padding: 4px; border-radius: 12px; background: #e3edee; }
.auth-tabs button { min-height: 40px; border: 0; border-radius: 9px; background: transparent; font: inherit; font-size: 14px; font-weight: 700; color: #3a5a61; cursor: pointer; }
.auth-tabs button.on { background: #ffffff; color: #111111; box-shadow: 0 1px 3px rgba(0,0,0,.15); }
.auth-field { display: flex; flex-direction: column; gap: 4px; font-size: 12px; font-weight: 700; color: #3a5a61; }
.auth-field[hidden], .auth-check[hidden], .auth-forgot[hidden] { display: none; }
form.auth .auth-field input { font-size: 16px; font-weight: 400; color: var(--brand-ink); }
.pw-wrap { position: relative; display: flex; }
.pw-wrap input { flex: 1; min-width: 0; padding-right: 64px !important; }
.pw-eye { position: absolute; right: 6px; top: 50%; transform: translateY(-50%); min-height: 32px; padding: 0 10px; border: 0; border-radius: 8px; background: #e3edee; font: inherit; font-size: 12px; font-weight: 700; color: #3a5a61; cursor: pointer; }
.auth-check { display: flex; align-items: flex-start; gap: 10px; padding: 10px 12px; border: 1px solid #cddde0; border-radius: 10px; font-size: 14px; font-weight: 700; cursor: pointer; }
.auth-check input { width: 20px; height: 20px; flex: none; margin: 0; accent-color: #ff7a1a; }
.auth-check .meta { display: block; font-weight: 400; font-size: 12px; }
.auth-go { min-height: 46px; background: #ff7a1a !important; color: #111111 !important; font-weight: 800; font-size: 16px; }
.auth-forgot { align-self: center; font-size: 13px; }
.school-pick { margin-top: 4px; }
/* Google's own button (drawn by Google inside this box), centered above "or use your email" */
.google-gis { display: flex; justify-content: center; min-height: 44px; margin-top: 12px; color-scheme: light; }
