/* Concept C layouts (2026-11): Events tab, event detail, Post tab, search suggestions, Conditions, Settings and the
   map layers sheet, in the approved boards' shapes. Loads after style.css, post-flow.css, concept-a.css and
   concept-b.css, and only overrides them; tokens come from the "Theme 2026-11" block in style.css. Rows reuse the
   row card from concept-a.css. The only art is the logo and the pixel map (pictures here are map crops, SNThumb).
   Sizes: headings 27px, section titles 20px, row titles 16 to 18px, body 16px, meta 14px or more. Taps 44px.
   On phones the tab bar is fixed to the bottom edge (--dock, concept-a.css): nothing here may reach under it. */

/* ---------- 1. Events tab ---------- */
/* The whole tab scrolls as one page, so the heading and the two chip rows don't eat a half-open sheet. */
#sn-ev { overflow-y: auto; overscroll-behavior: contain; padding: 0 8px 12px 4px; }
#sn-ev > * { flex: none; }
#sn-ev .ev-h { margin: 2px 0 8px; font-size: 27px; line-height: 1.15; overflow-wrap: anywhere; }
/* Day pills, then kind chips: one row each, scrolled sideways, never wrapped. */
#sn-ev .chips { flex-wrap: nowrap; gap: 8px; margin: 0 -8px 2px -4px; padding: 5px 8px 5px 4px; overflow-x: auto; overscroll-behavior-x: contain;
  scrollbar-width: none; -webkit-overflow-scrolling: touch; }
#sn-ev .chips::-webkit-scrollbar { display: none; }
#sn-ev .chips button { flex: none; min-height: 44px; padding: 6px 16px; font-size: 15px; font-weight: 700; white-space: nowrap; }
#sn-ev > .list { overflow: visible; margin-top: 6px; padding: 0; }
#sn-events { display: grid; grid-template-columns: minmax(0, 1fr); gap: 8px; }
#sn-events > li.rc-li, #sn-events > li.ev-cta { padding: 0; border: 0; cursor: default; }
#sn-events > li.rc-li:hover, #sn-events > li.rc-li:focus, #sn-events > li.ev-cta:hover { background: none; }
#sn-events > li.rc-li.lit .row-card { box-shadow: 0 0 0 2px var(--red); }
#sn-events > li.head { padding: 10px 0 0; font: 700 20px/1.2 var(--head); letter-spacing: 0; text-transform: none; color: var(--ink); }
#sn-events > li.hint { padding: 6px 0; border: 0; font-size: 14px; line-height: 1.4; }
.row-card .rc-text .tag { float: none; justify-self: start; font-size: 13px; line-height: 1.3; }
.row-card .rc-text .tag.paid, #card .ev-top .tag.paid { background: var(--surface-2); color: var(--ink); box-shadow: inset 0 0 0 1px var(--line-strong); }
/* Host an event (primary), then the yard sale button; user-posts.js's own pair under the neighbors' list is not shown twice. */
#sn-events > li.ev-cta { display: grid; gap: 8px; margin-top: 6px; }
#sn-events .ev-cta button { box-sizing: border-box; width: 100%; min-height: 48px; padding: 8px 14px; border: 0; border-radius: var(--r-ctl); font: 700 16px/1.2 var(--type); white-space: normal; }
#sn-events .ev-cta button.primary-act { min-height: 52px; background-color: var(--red); color: #fff; box-shadow: none; }
#sn-events .ev-cta button.primary-act:hover { background-color: var(--red-deep); }
#sn-events > li.post-cta { display: none; }
/* Neighbors' posts are built by SN.row (icon, name, one line): drawn as the same card, with a chevron. */
#sn-events > li:not(.head, .hint, .rc-li, .ev-cta, .post-cta) { display: grid; align-content: center; gap: 3px; min-height: 72px; padding: 8px 40px 8px 52px; border: 0;
  border-radius: var(--r-ctl); background-color: var(--field); box-shadow: 0 0 0 1px var(--line); }
#sn-events > li:not(.head, .hint, .rc-li, .ev-cta, .post-cta):hover { background-color: #fff; box-shadow: 0 0 0 1px var(--line-strong); }
#sn-events > li:not(.head, .hint, .rc-li, .ev-cta, .post-cta)::after { content: ""; position: absolute; right: 16px; top: 50%; width: 9px; height: 9px;
  border-top: 2px solid var(--ink-soft); border-right: 2px solid var(--ink-soft); transform: translateY(-50%) rotate(45deg); }
#sn-events > li:not(.head, .hint, .rc-li, .ev-cta, .post-cta) > strong { font: 700 18px/1.25 var(--head); }
#sn-events > li:not(.head, .hint, .rc-li, .ev-cta, .post-cta) > span { font-size: 14px; line-height: 1.35; }
#sn-events > li:not(.head, .hint, .rc-li, .ev-cta, .post-cta) > .ico { left: 14px; top: 50%; transform: translateY(-50%); }
#sn-ev > .note { margin: 14px 0 0; font-size: 14px; line-height: 1.45; }

/* ---------- 2. Event detail (in the card) ---------- */
#card .ev-hero { height: 150px; margin: 0 6px 12px 1px; overflow: hidden; background: var(--surface-2); border-radius: var(--r-card) var(--r-card) var(--r-ctl) var(--r-ctl); }
#card .ev-hero.no-thumb { display: none; }
#card .ev-hero > canvas { display: block; width: 100% !important; height: 100% !important; object-fit: cover; }
/* Round back button over the picture's corner (or above the title when there is no picture). */
#card .ev-back { position: absolute; top: 8px; left: 9px; z-index: 2; box-sizing: border-box; width: 44px; height: 44px; padding: 0; border: 0; border-radius: 50%;
  display: grid; place-items: center; font-size: 22px; line-height: 1; background-color: var(--field); color: var(--ink); box-shadow: var(--shadow-sm), 0 0 0 1px var(--line); }
#card .ev-hero.no-thumb + .ev-back { position: static; margin: 0 0 8px 1px; }
#card:has(.ev-back) > .close { display: none; }
html.explore-ui #shorenav:not(.collapsed):not(.sheet-peek) > #card:has(.ev-back) > .card-back { display: none; }
#card .ev-top .tag { float: none; display: inline-block; margin: 0 0 6px 1px; font-size: 13px; }
#card .ev-top h2 { margin: 0 6px 8px 1px; }
#card .ev-facts { list-style: none; display: grid; gap: 2px; margin: 0 6px 10px 1px; padding: 0; }
#card .ev-facts li { display: flex; align-items: center; gap: 12px; min-height: 36px; font-size: 16px; line-height: 1.3; color: var(--ink); }
#card .ev-facts li > svg { flex: none; color: var(--ink-soft); }
#card .ev-facts li > span { min-width: 0; overflow-wrap: anywhere; }
#card .ev-facts .ev-venue { min-height: 44px; padding: 0; border: 0; font: 700 16px/1.3 var(--type); text-align: left; text-decoration: underline; white-space: normal; overflow-wrap: anywhere; }
#card .ev-desc { margin: 0 6px 12px 1px; font-size: 16px; line-height: 1.45; color: var(--ink); overflow-wrap: anywhere; }
#card .ev-desc.fine { font-size: 14px; color: var(--ink-soft); }
/* Actions: the plan button across the top, Going and Share side by side, then the quieter ones. The pieces come from
   several files (friends.js adds Going, together.js and more.js their own buttons), so the wrappers are flattened and
   the order is set here. */
#card .ev-do { display: flex; flex-wrap: wrap; align-items: stretch; gap: 8px; margin: 4px 6px 10px 1px; }
#card .ev-do .event, #card .ev-do .going, #card .ev-do .card-actions, html.explore-ui #shorenav > #card .ev-do .card-actions { display: contents; }
#card .ev-do .event > *, #card .ev-do .going > *, html.explore-ui #shorenav > #card .ev-do .card-actions > * { order: 4; flex: 1 1 100%; min-width: 0; margin: 0; }
#card .ev-do button, #card .ev-do select, html.explore-ui #shorenav > #card .ev-do .card-actions > button { box-sizing: border-box; min-height: 48px; padding: 8px 12px; border: 0; border-radius: var(--r-ctl);
  font: 700 16px/1.2 var(--type); white-space: normal; }
#card .ev-do select { font-weight: 400; border: 1px solid var(--line-strong); }
#card .ev-do .going > select[hidden] { display: none; }
html.explore-ui #shorenav > #card .ev-do .ev-plan > .primary-act { order: 0; flex: 1 1 100%; display: flex; align-items: center; justify-content: center; min-height: 52px; margin: 0; }
#card .ev-do .going > button:first-child, html.explore-ui #shorenav > #card .ev-do .ev-acts > button:first-child { order: 1; flex: 1 1 0; display: inline-flex; align-items: center; justify-content: center; gap: 8px; }
#card .ev-do .going > select, #card .ev-do .going > span, #card .ev-do .going > .going-n { order: 2; }
#card .ev-do .going > .fine:empty, #card .ev-do .going > .going-n:empty, #card .ev-do > .list-box:empty { display: none; }
#card .ev-do .going > .fine, #card .ev-do .going > .going-n, #card .ev-do .public-going { font-size: 14px; line-height: 1.4; }
#card .ev-do .going > .with-btn, html.explore-ui #shorenav > #card .ev-do .card-actions > .ev-cal, html.explore-ui #shorenav > #card .ev-do .card-actions > .to-list {
  order: 3; flex: 1 1 auto; min-height: 44px; font-size: 14px; background-color: transparent; box-shadow: 0 0 0 1px var(--line); }
#card .ev-do > .list-box { order: 5; flex: 1 1 100%; margin: 0; }
#card .ev-do .gig-who { order: -1; }
/* Going is a secondary here: outlined until chosen. Chosen (and In my plan): tinted with a red ring, not a second filled button. */
#card .ev-do .going > button.primary-act { background-color: var(--field) !important; color: var(--ink) !important; box-shadow: 0 0 0 1px var(--line-strong) !important; }
#card .ev-do button[aria-pressed="true"], #card .ev-do button[aria-pressed="true"]:hover { background-color: rgba(139, 58, 58, .1) !important; color: var(--red-deep) !important; box-shadow: inset 0 0 0 2px var(--red) !important; }
#card .ev-do button[aria-pressed="true"] svg { color: var(--red-deep) !important; }
#card .ev-do button:focus-visible { outline: 3px solid var(--blue) !important; outline-offset: 2px; }
#card .ev-src { display: flex; flex-wrap: wrap; align-items: center; gap: 0 14px; margin: 4px 6px 8px 1px; padding-top: 8px; border-top: 1px solid var(--line); font-size: 14px; line-height: 1.4; color: var(--ink-soft); }
#card .ev-src span { min-width: 0; overflow-wrap: anywhere; }
#card .ev-src a { display: inline-flex; align-items: center; min-height: 44px; font-weight: 700; }

/* ---------- 3. Post tab ---------- */
#sn-post .pt-body { gap: 12px; }
#sn-post .pt-h { margin: 2px 0 0; font-size: 27px; line-height: 1.15; overflow-wrap: anywhere; }
#sn-post .pt-sub { margin: -6px 0 2px; font-size: 16px; line-height: 1.4; color: var(--ink-soft); }
#sn-post .pt-grid { gap: 10px; }
#sn-post .pt-tile { display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 10px; min-height: 104px; aspect-ratio: 4 / 3; padding: 12px 8px;
  border: 0; border-radius: var(--r-ctl); text-align: center; }
#sn-post .pt-tile .pt-ic { display: grid; place-items: center; height: 32px; font-size: 0; color: var(--ink); }
#sn-post .pt-tile strong { font: 700 17px/1.2 var(--head); overflow-wrap: anywhere; }
#sn-post .pt-help { margin: 0; font-size: 14px; line-height: 1.4; color: var(--ink-soft); }
#sn-post .pt-else { box-sizing: border-box; display: flex; align-items: center; gap: 12px; width: 100%; min-height: 56px; padding: 8px 12px; border: 0; border-radius: var(--r-ctl);
  background-color: transparent; box-shadow: 0 0 0 1px var(--line); color: var(--ink); text-align: left; }
#sn-post .pt-else:hover { background-color: var(--field); }
#sn-post .pt-else .pt-ic { flex: none; display: grid; place-items: center; width: 28px; color: var(--ink-soft); }
#sn-post .pt-else > .sn-ic { color: var(--ink-soft); }
#sn-post .pt-else-t { flex: 1 1 0; min-width: 0; display: grid; gap: 2px; }
#sn-post .pt-else-t strong { font: 700 16px/1.25 var(--type); }
#sn-post .pt-else-t small { font-size: 14px; font-weight: 400; line-height: 1.3; color: var(--ink-soft); }
#sn-post .fine, #sn-post .pt-list small { font-size: 14px; }
#sn-post .pt-mine h4 { margin: 8px 0 4px; font: 700 20px/1.2 var(--head); }
#sn-post .pt-list .linkish, #sn-post .pt-more .linkish, #sn-post .pt-again .linkish { min-height: 44px; padding: 0 6px; }
#sn-post .pt-more a { display: inline-flex; align-items: center; min-height: 44px; }

/* ---------- 4. Search: the field's clear button and the suggestions card ---------- */
#gsearch::-webkit-search-cancel-button { -webkit-appearance: none; appearance: none; display: none; }
.gsearch-wrap .gs-clear { position: absolute; top: 2px; right: 2px; z-index: 1; box-sizing: border-box; width: 44px; height: 44px; padding: 0; border: 0; border-radius: 50%;
  display: grid; place-items: center; font-size: 20px; line-height: 1; background-color: transparent; box-shadow: none; color: var(--ink-soft); }
.gsearch-wrap .gs-clear[hidden] { display: none; }
.gsearch-wrap .gs-clear:hover { background-color: rgba(43, 38, 32, .08); box-shadow: none; }
.gsearch-wrap.has-mic .gs-clear { right: 44px; }
html .gsearch-wrap.has-text #gsearch { padding-right: 48px; }
html .gsearch-wrap.has-mic.has-text #gsearch { padding-right: 92px; }
html #gresults { margin-top: 6px; padding: 6px; border: 0; outline: 0; border-radius: 16px; background: var(--surface); box-shadow: var(--shadow), 0 0 0 1px var(--line); }
#gresults .ghead { padding: 10px 10px 4px; font: 700 20px/1.2 var(--head); letter-spacing: 0; text-transform: none; color: var(--ink); }
#gresults .gitem { display: flex; align-items: center; gap: 12px; min-height: 48px; padding: 6px 10px; border-radius: 10px; cursor: pointer; }
#gresults .gitem + .gitem { box-shadow: 0 -1px 0 var(--line); }
#gresults .gitem:hover, #gresults .gitem.on { background: rgba(139, 58, 58, .08); }
#gresults .gitem .g-ic, #gresults .gitem .g-chev { flex: none; display: grid; place-items: center; font-size: 0; color: var(--ink-soft); }
#gresults .gitem .g-text { flex: 1 1 0; min-width: 0; display: grid; gap: 1px; font-size: 16px; color: var(--ink); }
#gresults .gitem .g-text b { font-size: 16px; font-weight: 600; line-height: 1.3; overflow-wrap: anywhere; }
#gresults .gitem .g-text span { font-size: 14px; line-height: 1.3; color: var(--ink-soft); overflow-wrap: anywhere; }
#gresults .gitem.wci-start .g-text b, #gresults .gitem.gall .g-text b { color: var(--red); }
#gresults .gitem.gall, #gresults .gitem.g-quiet { margin-top: 4px; }
#gresults .gitem.g-quiet .g-text b { font-size: 14px; font-weight: 400; color: var(--ink-soft); }
@media (max-width: 600px) {
  /* above the keyboard while typing, and above the tab bar when the keyboard is away (the top bar is zoomed by --tb-z) */
  html #gresults { max-height: min(calc((var(--vvh, 100dvh) - 16px) / var(--tb-z) - var(--bar-b, 60px) - 4px), calc((100dvh - var(--dock) - 12px) / var(--tb-z) - var(--bar-b, 60px) - 4px)) !important; }
}

/* ---------- 5. Conditions ---------- */
html .conditions { padding: 10px 12px 16px; border-width: 8px; font-size: 16px; }  /* the old 18px frame is only spacing now: less of it, so rows have room at 320px */
.conditions .close { position: sticky; top: 0; float: right; z-index: 2; box-sizing: border-box; width: 44px; height: 44px; margin: 0 0 0 8px; padding: 0; border: 0; border-radius: 50%;
  display: grid; place-items: center; font-size: 22px; line-height: 1; background-color: var(--field); color: var(--ink); box-shadow: var(--shadow-sm), 0 0 0 1px var(--line); }
.conditions .cond-h { margin: 6px 0 12px; font-size: 27px; line-height: 1.15; }
/* Today: weather mark, the temperature large, the sky in words, high and low. */
.conditions .cond-today { clear: both; display: flex; flex-wrap: wrap; align-items: center; gap: 6px 14px; margin: 0 0 10px; padding: 14px; border-radius: var(--r-ctl);
  background: var(--field); box-shadow: 0 0 0 1px var(--line), var(--shadow-sm); }
.conditions .cond-today > svg { flex: none; color: var(--red); }
.conditions .ct-main { display: grid; }
.conditions .ct-day { font: 700 16px/1.2 var(--head); color: var(--ink); }
.conditions .ct-temp { font: 700 40px/1.05 var(--head); font-variant-numeric: tabular-nums; color: var(--ink); }
.conditions .ct-side { flex: 1 1 7em; min-width: 0; display: grid; gap: 4px; font-size: 16px; line-height: 1.3; color: var(--ink); }
.conditions .ct-sky { overflow-wrap: anywhere; }
.conditions .ct-hilo { display: flex; flex-wrap: wrap; gap: 2px 14px; font-size: 15px; color: var(--ink-soft); font-variant-numeric: tabular-nums; }
.conditions .cond-none { clear: both; margin: 0 0 10px; }
/* Rows: icon, label, value at the right. */
.conditions .cond-rows { clear: both; display: grid; grid-template-columns: minmax(0, 1fr); gap: 8px; margin: 0 0 10px; }
.conditions .crow { box-sizing: border-box; display: flex; align-items: center; justify-content: flex-start; gap: 12px; width: 100%; min-height: 52px; margin: 0; padding: 8px 14px;
  border: 0; border-radius: var(--r-ctl); background-color: var(--field); box-shadow: 0 0 0 1px var(--line); font: 400 16px/1.3 var(--type); color: var(--ink); text-align: left; }
.conditions .crow > svg { flex: none; color: var(--ink-soft); }
.conditions .crow .c-lbl { flex: 1 1 auto; min-width: 0; font-size: 16px; font-weight: 700; color: var(--ink); overflow-wrap: anywhere; }
.conditions .crow .c-lbl small { font-size: 14px; font-weight: 400; color: var(--ink-soft); white-space: nowrap; }
.conditions .crow b { flex: 0 1 auto; min-width: 0; font-size: 16px; font-weight: 400; text-align: right; font-variant-numeric: tabular-nums; overflow-wrap: anywhere; }
.conditions button.crow { cursor: pointer; }
.conditions button.crow:hover { background-color: #fff; box-shadow: 0 0 0 1px var(--line-strong); }
/* NWS advisories: a filled red card. */
.conditions a.cond-adv { display: flex; align-items: center; gap: 12px; margin: 0 0 10px; padding: 14px; border-radius: var(--r-ctl); background: var(--red); color: #fff; text-decoration: none; box-shadow: var(--shadow-sm); }
.conditions a.cond-adv:hover { background: var(--red-deep); }
.conditions .cond-adv > svg { flex: none; color: #fff; }
.conditions .cond-adv > span { min-width: 0; display: grid; gap: 2px; font-size: 14px; line-height: 1.35; color: #fff; overflow-wrap: anywhere; }
.conditions .cond-adv b { font: 700 17px/1.25 var(--head); }
/* The rest (tide curve, boating, sun and moon, fishing): titled sections of plain rows. */
.conditions section { clear: both; margin: 18px 0 0; }
.conditions section h3 { margin: 0 0 6px; font-size: 20px; line-height: 1.2; color: var(--ink); }
.conditions section:first-of-type h3 { margin-top: 0; }
.conditions section .crow { min-height: 44px; padding: 8px 2px; border-radius: 0; background-color: transparent; box-shadow: 0 1px 0 var(--line); }
.conditions section .crow .c-lbl { font-weight: 400; }
.conditions section .crow b { font-weight: 700; }
.conditions .cblock { margin: 8px 0; font-size: 16px; line-height: 1.45; }
.conditions .cblock span { font-size: 14px; font-weight: 700; }
.conditions .note { margin: 8px 0 0; font-size: 14px; line-height: 1.45; }
.conditions .note a { display: inline-block; padding: 6px 0; }
.conditions .tide-svg { outline: 0; border-radius: 8px; box-shadow: 0 0 0 1px var(--line); }

/* ---------- 6. Settings: one list of rows ---------- */
html .settings { width: min(360px, calc((100vw - 24px) / var(--ui-scale, 1))); gap: 0; padding: 8px 10px 12px; border-width: 6px; font-size: 16px; }
html .settings .set-h { margin: 0 0 6px; font-size: 27px; line-height: 1.15; }
html .settings .s-you { display: grid; grid-template-columns: minmax(0, 1fr); gap: 6px; margin: 0 0 6px; }
html .settings .s-you button { box-sizing: border-box; min-height: 48px; padding: 6px 12px; font-size: 16px; font-weight: 700; }
html .settings .sgroup, html .settings .sgroup:last-child { display: grid; grid-template-columns: minmax(0, 1fr); gap: 0; padding-top: 0; border-top: 0; }
html .settings h4 { margin: 14px 0 2px; font: 700 20px/1.2 var(--head) !important; letter-spacing: 0; color: var(--ink); }
/* A row: line icon, label, then the control. The control's button covers the whole row, icon included, so any part of it takes the tap. */
.settings .set-row { position: relative; display: flex; align-items: center; gap: 12px; min-width: 0; min-height: 52px; border-bottom: 1px solid var(--line); }
.settings .set-row:last-child { border-bottom: 0; }
.settings .set-row .set-ic { position: relative; z-index: 1; flex: none; width: 24px; margin-left: 4px; display: grid; place-items: center; color: var(--ink); pointer-events: none; }
.settings .set-row .set-lbl { flex: 1 1 auto; min-width: 0; font: 700 16px/1.25 var(--type); color: var(--ink); }
.settings .set-row .set-chev { position: relative; z-index: 1; flex: none; display: grid; place-items: center; margin-left: -34px; padding-right: 4px; color: var(--ink-soft); pointer-events: none; }
html .settings .set-row > button { box-sizing: border-box; flex: 1 1 auto; align-self: stretch; display: flex; align-items: center; justify-content: space-between; gap: 12px; width: auto; min-width: 0; min-height: 52px;
  margin: 0 0 0 -40px; padding: 6px 4px 6px 40px; border: 0; border-radius: 10px; background-color: transparent; box-shadow: none; color: var(--ink); font: 700 16px/1.25 var(--type); text-align: left; white-space: normal; overflow-wrap: anywhere; }
html .settings .set-row > button[hidden], html .settings #night { display: none !important; }
html .settings .set-row.has-chev > button { padding-right: 30px; }
html .settings .set-row > button:hover { background-color: rgba(43, 38, 32, .06); box-shadow: none; }
html .settings .set-row > #s-helpnow { color: var(--red-deep); }
/* Switches: every on/off button in Settings and Map layers is its label at the left and a switch at the right. */
html .settings .set-row > button[aria-pressed]::after, #layers .layers-list button[aria-pressed]::after { content: ""; flex: none; width: 46px; height: 28px; border-radius: var(--r-pill);
  background: radial-gradient(circle closest-side, #fff 76%, transparent 82%) no-repeat left center / 28px 28px; background-color: rgba(43, 38, 32, .5); transition: background-position .15s, background-color .15s; }
html .settings .set-row > button[aria-pressed="true"]::after, #layers .layers-list button[aria-pressed="true"]::after { background-position: right center; background-color: var(--green); }
html .settings .set-row > button[aria-pressed="true"], html .settings .set-row > button[aria-pressed="true"]:hover { background-color: transparent !important; color: var(--ink) !important; }
html .settings .set-row > button[aria-pressed="true"]:hover { background-color: rgba(43, 38, 32, .06) !important; }
html .settings button:focus-visible, #layers button:focus-visible { outline: 3px solid var(--blue) !important; outline-offset: -3px; }
/* Text size: the two buttons and the percentage sit at the right, or drop under the label when the row is narrow. */
.settings .set-row.set-inline, .settings .set-row.set-stack { flex-wrap: wrap; row-gap: 0; }
.settings .set-row.set-inline .set-lbl, .settings .set-row.set-stack .set-lbl { display: flex; align-items: center; min-height: 52px; }
html .settings .set-row .size-row { flex: none; display: flex; align-items: center; gap: 4px; margin: 0 0 0 auto; padding: 4px 0; }
html .settings .set-row .size-row button { box-sizing: border-box; width: 44px; min-width: 44px; min-height: 44px; padding: 0; border: 0; border-radius: 10px; font: 700 16px/1 var(--type); text-align: center; }
html .settings .set-row .size-row span { min-width: 3.2em; font-size: 14px; text-align: center; font-variant-numeric: tabular-nums; }
/* Language and Light mode: three pills under the label. The chosen one is filled green, like a switch that is on. */
html .settings .set-row .lang-pick, html .settings .set-row .light-seg { flex: 1 1 100%; min-width: 0; display: grid; grid-template-columns: repeat(auto-fit, minmax(5.2em, 1fr)); gap: 6px; margin: 0 0 10px; }
html .settings .set-row .lang-pick button, html .settings .set-row .light-seg button { box-sizing: border-box; min-width: 0; min-height: 44px; padding: 4px 8px; border: 0; border-radius: var(--r-pill);
  font: 700 15px/1.2 var(--type); text-align: center; }
html .settings .set-row .lang-pick button[aria-pressed="true"], html .settings .set-row .light-seg button[aria-pressed="true"] { background-color: var(--green) !important; color: #fff !important; }
html .settings .lang-note { margin: 6px 0 8px; font-size: 14px; line-height: 1.4; }
/* Footer links, then the account row. */
html .settings .s-links:not(.lang-note) { display: flex; flex-wrap: wrap; gap: 0 18px; margin: 4px 4px 0; font-size: 14px; }
html .settings .s-links:not(.lang-note) a { display: inline-flex; align-items: center; min-height: 44px; }
.settings .s-links + .set-row { margin-top: 4px; border-top: 1px solid var(--line); }

/* Map layers sheet: the same rows and switches. */
#layers.layers-sheet { width: min(340px, calc(100vw - 24px)); gap: 6px; padding: 14px; }
#layers .layers-head { font: 700 22px/1.2 var(--head); }
#layers #layers-x { box-sizing: border-box; width: 44px; height: 44px; border: 0; border-radius: 50%; font-size: 22px; line-height: 1; }
#layers .layers-list { grid-template-columns: minmax(0, 1fr); gap: 0; }
#layers .layers-list button { box-sizing: border-box; display: flex; align-items: center; justify-content: space-between; gap: 12px; width: 100%; min-width: 0; min-height: 52px; padding: 6px 4px;
  border: 0; border-radius: 0; background-color: transparent; box-shadow: 0 1px 0 var(--line) !important; color: var(--ink); font: 700 16px/1.25 var(--type); text-align: left; white-space: normal; }
#layers .layers-list button[hidden] { display: none; }
#layers .layers-list button:hover { background-color: rgba(43, 38, 32, .06); }
#layers .layers-list button[aria-pressed="true"], #layers .layers-list button[aria-pressed="true"]:hover { background-color: transparent !important; color: var(--ink) !important; }
@media (max-width: 760px) and (orientation: portrait), (max-width: 760px) and (min-height: 521px) {
  /* phones: the sheet ends above the tab bar (the top bar it hangs from is zoomed by --tb-z) */
  #layers.layers-sheet { max-height: calc((100dvh - var(--dock) - var(--bar-b, 120px) - 12px) / var(--tb-z) - 6px); }
}
@media (prefers-reduced-motion: reduce) {
  html .settings .set-row > button[aria-pressed]::after, #layers .layers-list button[aria-pressed]::after { transition: none; }
}
/* lead: event actions sit two across so labels never squeeze */
#card .ev-do .going > button, #card .ev-do .going > .with-btn, html.explore-ui #shorenav > #card .ev-do .card-actions > button { flex: 1 1 calc(50% - 4px) !important; min-width: calc(50% - 4px); }
html.explore-ui #shorenav > #card .ev-do .ev-plan > .primary-act { flex: 1 1 100% !important; min-width: 100%; }

/* ---------- 7. Card open on phones, toasts, small additions (2026-11 behaviour pass) ---------- */
/* A place or event opens at about half the screen whatever size the sheet had (Events keeps it full), so a band of
   map with the lit pin stays in view; pulling the handle up (card-tall, explore.js) gives the full height. */
@media (max-width: 760px) and (orientation: portrait), (max-width: 760px) and (min-height: 521px) {
  html.explore-ui.detail-open #shorenav:not(.card-tall):not(.sheet-peek):not(.collapsed) { height: auto !important; max-height: calc(min(52dvh, var(--room, 52dvh)) / var(--ui-scale, 1)) !important; }
  html.explore-ui.detail-open #shorenav.card-tall:not(.sheet-peek):not(.collapsed) { max-height: calc(var(--full, 80dvh) / var(--ui-scale, 1)) !important; }
  /* the alert banners step aside while a card is open: the map band is for the pin */
  body.card-open .alerts { display: none !important; }
  html.explore-ui.detail-open:has(#shorenav.sheet-full:not(.card-tall)) .today { visibility: visible; }
}
/* Toast lines: a second message stacks under one that still offers Undo. */
.toast .toast-line + .toast-line { margin-top: 6px; padding-top: 6px; border-top: 1px solid rgba(255, 255, 255, .22); }
.toast .toast-undo { min-height: 32px; }
/* Event detail: Directions sits beside Share; its route line takes the full width under the buttons. */
html.explore-ui #shorenav > #card .ev-do .ev-acts > button.ev-dir { order: 1; display: inline-flex; align-items: center; justify-content: center; gap: 8px; }
#card .ev-do > .route-info { order: 6; flex: 1 1 100%; min-width: 0; margin: 0; }
#card .ev-do > .route-info:empty { display: none; }
/* Explore home: the area chip leads the list. */
#sn-results > li.home-sec.area-row { display: block; padding: 2px 2px 0 !important; }
#sn-results .area-row .area-pick { display: inline-flex; align-items: center; gap: 6px; max-width: 100%; min-height: 44px; padding: 6px 12px; font: 700 15px/1.2 var(--type); color: var(--ink); }
#sn-results .area-row .area-pick > span { min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
#sn-results .area-row .area-pick > svg { flex: none; color: var(--ink-soft); }
#sn-results .area-row .area-pick > svg:last-child { transform: rotate(90deg); }
/* lead: toasts sit just above the tab bar, never over a dialog button */
.toast, #toast { top: auto !important; bottom: calc(var(--dock, 0px) + 14px) !important; }
