/* Ski Crew — light, compact, glassy UI over a full-screen map. */
:root {
  --ink: #0f172a;
  --ink-2: #334155;
  --muted: #64748b;
  --line: rgba(15, 23, 42, .08);
  --bg: #f8fafc;
  --card: #ffffff;
  --soft: #f1f5f9;
  --accent: #2563eb;
  --accent-soft: #e8efff;
  --red: #e5484d;
  --green: #16a34a;
  --amber: #f59e0b;
  --easy: #1d64d8;
  --inter: #d62828;
  --adv: #111;
  --skin: #8e3fbf;
  --glass: rgba(255, 255, 255, .82);
  --blur: saturate(1.8) blur(18px);
  --shadow: 0 1px 2px rgba(15, 23, 42, .06), 0 6px 20px rgba(15, 23, 42, .10);
  --tab-h: 54px;
  /* Problem #45: iPhone reports ~34pt of bottom inset in home-screen apps; the tabs keep only
     ~8pt of it (enough to swipe home), and the rest goes to the map and panels. */
  --safe-b: max(0px, calc(env(safe-area-inset-bottom, 0px) - 26px));
  --safe-t: env(safe-area-inset-top, 0px);
  --bar: calc(var(--tab-h) + var(--safe-b));
  font-family: -apple-system, BlinkMacSystemFont, "SF Pro Text", "Inter", "Segoe UI", Roboto, system-ui, sans-serif;
  color: var(--ink);
  -webkit-tap-highlight-color: transparent;
  -webkit-font-smoothing: antialiased;
}
* { box-sizing: border-box; }
html, body { margin: 0; height: 100%; background: var(--bg); overscroll-behavior: none; }
/* iOS 26 home-screen apps (WebKit 301108): the layout viewport comes up short by the
   status-bar height (~59-62pt) whenever the document is no taller than that short
   viewport, so position:fixed;bottom:0 stops above the screen edge. A document at
   least as tall as the screen makes WebKit hand out the full viewport. min() caps it
   at the screen height so nothing scrolls (and devices without a top inset are unaffected).
   Do not pin html/body with position:fixed — that recreates the short viewport. */
@media (display-mode: standalone) {
  @supports (-webkit-touch-callout: none) {
    html { height: auto; min-height: min(100lvh, calc(100% + env(safe-area-inset-top))); }
    body { height: auto; min-height: 100%; }
  }
}
button { font: inherit; color: inherit; cursor: pointer; }
input, select, textarea { font: inherit; font-size: 16px; }
a { color: var(--accent); text-decoration: none; }
[hidden] { display: none !important; }

#map { position: fixed; inset: 0; background: #eef2f6; }
.tiles-winter { filter: saturate(.55) brightness(1.07) contrast(.92); }
.tiles-under { filter: grayscale(1) brightness(1.2) contrast(.7); opacity: .55; } /* beyond a one-country map's border (Swiss Terrain) */
.tiles-world { filter: saturate(.7) brightness(1.03); }
.leaflet-container { font: inherit; }
.leaflet-bottom { bottom: var(--bar); }
.leaflet-control-attribution {
  font-size: 9px; line-height: 1.5; max-width: 62vw; white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
  background: rgba(255, 255, 255, .6) !important; border-radius: 6px 0 0 0; color: var(--muted);
}
.leaflet-control-attribution a { color: var(--muted); }
.leaflet-control-attribution svg { display: none !important; }

.glass { background: var(--glass); -webkit-backdrop-filter: var(--blur); backdrop-filter: var(--blur); }

/* ---------- top bar ---------- */
#topbar {
  position: fixed; z-index: 1000; left: 0; right: 0; top: 0;
  padding: calc(var(--safe-t) + 8px) 10px 8px;
  display: flex; justify-content: space-between; align-items: center; gap: 8px; pointer-events: none;
}
#topbar > * { pointer-events: auto; }
.topbar-right { display: flex; gap: 6px; align-items: center; }
.chip {
  border: 0; border-radius: 999px; padding: 0 12px; height: 34px;
  background: var(--glass); -webkit-backdrop-filter: var(--blur); backdrop-filter: var(--blur);
  box-shadow: var(--shadow); font-weight: 650; font-size: 14px; letter-spacing: -.1px;
  display: inline-flex; align-items: center; gap: 5px; white-space: nowrap; color: var(--ink);
}
.chip-ic { width: 16px; height: 16px; fill: var(--accent); }
.chip .caret { width: 16px; height: 16px; fill: var(--muted); margin-right: -4px; }
.chip-warn { background: #fff4d6; color: #7a4b00; }
#resortName { max-width: 46vw; overflow: hidden; text-overflow: ellipsis; }

/* ---------- map controls ---------- */
#mapButtons {
  position: fixed; z-index: 1000; right: 10px; bottom: calc(var(--bar) + 24px);
  display: flex; flex-direction: column; align-items: center; gap: 10px;
}
.ctl-group {
  display: flex; flex-direction: column; border-radius: 14px; overflow: hidden; box-shadow: var(--shadow);
  background: var(--glass); -webkit-backdrop-filter: var(--blur); backdrop-filter: var(--blur);
}
.fab { width: 42px; height: 42px; border: 0; background: transparent; display: grid; place-items: center; }
.fab + .fab { border-top: 1px solid var(--line); }
.fab svg { width: 20px; height: 20px; fill: var(--ink-2); }
.fab.on svg { fill: var(--accent); }
.fab-sos {
  width: 42px; height: 42px; border-radius: 50%; border: 0; background: var(--red); color: #fff;
  font-weight: 800; font-size: 11px; letter-spacing: .4px; box-shadow: 0 4px 14px rgba(229, 72, 77, .4);
}
body.sheet-open #mapButtons, body.sheet-open #statusStrip { display: none; }

#statusStrip {
  position: fixed; z-index: 1000; left: 10px; bottom: calc(var(--bar) + 24px); max-width: calc(100vw - 76px);
  background: var(--glass); -webkit-backdrop-filter: var(--blur); backdrop-filter: var(--blur);
  border-radius: 999px; padding: 8px 13px; font-weight: 650; font-size: 13px; box-shadow: var(--shadow);
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}

/* ---------- tab bar ---------- */
#tabbar {
  position: fixed; z-index: 1100; left: 0; right: 0; bottom: 0; height: var(--bar); padding-bottom: var(--safe-b);
  background: rgba(255, 255, 255, .9); -webkit-backdrop-filter: var(--blur); backdrop-filter: var(--blur);
  border-top: 1px solid var(--line); display: flex;
}
#tabbar button {
  flex: 1; border: 0; background: none; color: #94a3b8; position: relative;
  display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 2px;
  font-size: 10px; font-weight: 600; letter-spacing: .1px;
}
#tabbar svg { width: 23px; height: 23px; fill: currentColor; }
#tabbar button.active { color: var(--accent); }
.badge {
  position: absolute; top: 5px; left: calc(50% + 6px); min-width: 16px; height: 16px; border-radius: 8px;
  background: var(--red); color: #fff; font-style: normal; font-size: 10px; font-weight: 700; line-height: 16px; padding: 0 4px;
}
.dot-rec { position: absolute; top: 7px; left: calc(50% + 9px); width: 8px; height: 8px; border-radius: 50%; background: var(--red); animation: pulse 1.4s infinite; }
@keyframes pulse { 50% { opacity: .3; } }

/* ---------- bottom sheet ---------- */
.sheet {
  position: fixed; z-index: 1050; left: 0; right: 0; bottom: var(--bar);
  height: 56%; max-height: calc(100% - var(--bar) - var(--safe-t) - 56px);
  background: var(--bg); border-radius: 18px 18px 0 0; box-shadow: 0 -8px 30px rgba(15, 23, 42, .14);
  display: flex; flex-direction: column; transition: height .22s cubic-bezier(.2, .8, .2, 1);
}
.sheet.tall { height: calc(100% - var(--bar) - var(--safe-t) - 56px); }
.sheet-handle { padding: 7px 0 3px; display: grid; place-items: center; cursor: grab; touch-action: none; }
.sheet-handle span { width: 36px; height: 4px; border-radius: 2px; background: #cbd5e1; }
.sheet-body { overflow-y: auto; -webkit-overflow-scrolling: touch; padding: 2px 14px 20px; flex: 1; overscroll-behavior: contain; }

h2 { font-size: 20px; font-weight: 700; margin: 4px 0 8px; letter-spacing: -.4px; }
h3 { font-size: 11px; text-transform: uppercase; letter-spacing: .7px; color: var(--muted); margin: 16px 2px 6px; font-weight: 650; }
p { line-height: 1.45; }
.muted { color: var(--muted); }
.small { font-size: 12.5px; }

.seg { display: flex; background: #e9eef4; border-radius: 10px; padding: 2px; gap: 2px; margin: 2px 0 10px; overflow-x: auto; }
.seg button { flex: 1; border: 0; background: none; padding: 7px 8px; border-radius: 8px; font-weight: 600; font-size: 13px; color: var(--muted); white-space: nowrap; }
.seg button.on { background: #fff; color: var(--ink); box-shadow: 0 1px 3px rgba(15, 23, 42, .12); }

.list { list-style: none; margin: 0; padding: 0; background: var(--card); border-radius: 14px; overflow: hidden; box-shadow: 0 1px 2px rgba(15, 23, 42, .05); }
.row { display: flex; align-items: center; gap: 11px; padding: 9px 12px; border-bottom: 1px solid var(--line); cursor: pointer; }
.row:last-child { border-bottom: 0; }
.row:active { background: var(--soft); }
.row .ico { width: 32px; height: 32px; border-radius: 9px; display: grid; place-items: center; font-size: 16px; background: var(--soft); flex: none; font-weight: 700; }
.row .main { flex: 1; min-width: 0; }
.row .title { font-weight: 600; font-size: 15px; letter-spacing: -.1px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.row .sub { font-size: 12.5px; color: var(--muted); margin-top: 1px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.row .side { text-align: right; font-size: 12px; color: var(--muted); flex: none; }
.list > h3 { margin: 0; padding: 12px 12px 4px; background: var(--card); }

.pill { display: inline-block; border-radius: 999px; padding: 2px 8px; font-size: 11px; font-weight: 650; }
.st-open { background: #dcfce7; color: #166534; }
.st-closed { background: #fee2e2; color: #991b1b; }
.st-queue { background: #fef3c7; color: #92400e; }
.st-unknown { background: var(--soft); color: #94a3b8; }

.diff { width: 12px; height: 12px; border-radius: 3px; display: inline-block; vertical-align: -1px; }
.diff-easy { background: var(--easy); }
.diff-intermediate { background: var(--inter); }
.diff-advanced, .diff-expert { background: var(--adv); }
.diff-freeride { background: repeating-linear-gradient(45deg, #f77f00 0 3px, #fff 3px 6px); border: 1px solid #f77f00; }
.diff-skitour { background: var(--skin); }

.btn {
  border: 0; border-radius: 12px; padding: 0 16px; height: 44px; font-weight: 650; font-size: 15px;
  background: var(--accent); color: #fff; display: inline-flex; align-items: center; justify-content: center; gap: 6px; white-space: nowrap;
}
.btn:active { transform: scale(.98); }
.btn.block { width: 100%; }
.btn.light { background: var(--card); color: var(--ink); box-shadow: inset 0 0 0 1px var(--line); }
.btn.red { background: var(--red); }
.btn.green { background: var(--green); }
.btn.small { height: 34px; padding: 0 11px; font-size: 13px; border-radius: 9px; }
.btn:disabled { opacity: .5; }
.btns { display: flex; gap: 8px; flex-wrap: wrap; margin: 10px 0; }
.btns > .btn { flex: 1; }

.field { display: block; margin: 10px 0; }
.field > span { display: block; font-size: 12px; font-weight: 600; color: var(--muted); margin-bottom: 5px; }
.field input, .field select, .field textarea { width: 100%; border: 1px solid #dbe3ec; border-radius: 11px; padding: 10px 12px; background: #fff; color: var(--ink); outline: none; }
.field input:focus, .inline input:focus { border-color: var(--accent); box-shadow: 0 0 0 3px var(--accent-soft); }
.inline { display: flex; gap: 8px; }
.inline input { flex: 1; min-width: 0; border: 1px solid #dbe3ec; border-radius: 11px; padding: 0 12px; height: 44px; outline: none; background: #fff; }

.card { background: var(--card); border-radius: 14px; padding: 12px; box-shadow: 0 1px 2px rgba(15, 23, 42, .05); margin: 8px 0; }
.toggle { display: flex; align-items: center; justify-content: space-between; gap: 12px; }
.toggle b { display: block; font-weight: 600; font-size: 15px; }
.toggle .small { display: block; margin-top: 2px; }
.switch { position: relative; width: 50px; height: 30px; flex: none; }
.switch input { opacity: 0; width: 0; height: 0; }
.switch i { position: absolute; inset: 0; background: #d5dde7; border-radius: 15px; transition: .2s; }
.switch i::after { content: ""; position: absolute; left: 2px; top: 2px; width: 26px; height: 26px; border-radius: 50%; background: #fff; transition: .2s; box-shadow: 0 1px 3px rgba(0, 0, 0, .25); }
.switch input:checked + i { background: var(--green); }
.switch input:checked + i::after { transform: translateX(20px); }

.stats { display: grid; grid-template-columns: repeat(3, 1fr); gap: 1px; margin: 10px 0; background: var(--line); border-radius: 14px; overflow: hidden; box-shadow: 0 1px 2px rgba(15, 23, 42, .05); }
.stat { background: var(--card); padding: 11px 6px; text-align: center; }
.stat b { display: block; font-size: 22px; font-weight: 700; letter-spacing: -.6px; font-variant-numeric: tabular-nums; }
.stat span { font-size: 10px; text-transform: uppercase; letter-spacing: .5px; color: var(--muted); font-weight: 600; }

.chips { display: flex; gap: 6px; overflow-x: auto; padding: 2px 0 8px; scrollbar-width: none; }
.chips::-webkit-scrollbar { display: none; }
.chips button { flex: none; border: 0; background: var(--card); box-shadow: inset 0 0 0 1px var(--line); border-radius: 999px; padding: 6px 11px; font-weight: 600; font-size: 13px; }
.chips button.on { background: var(--ink); color: #fff; box-shadow: none; }

.msgs { display: flex; flex-direction: column; gap: 4px; margin: 6px 0 8px; }
.msg { max-width: 82%; padding: 7px 11px; border-radius: 16px; background: var(--card); box-shadow: 0 1px 2px rgba(15, 23, 42, .06); align-self: flex-start; font-size: 14.5px; line-height: 1.35; }
.msg.mine { align-self: flex-end; background: var(--accent); color: #fff; }
.msg.urgent { background: var(--red); color: #fff; }
.msg small { display: block; font-size: 10.5px; opacity: .65; margin-top: 1px; }
.msg b { font-size: 11.5px; display: block; }
.msg a { color: inherit; text-decoration: underline; }

.avatar { position: relative; overflow: hidden; width: 32px; height: 32px; border-radius: 50%; color: #fff; display: inline-grid; place-items: center; font-weight: 700; font-size: 12px; flex: none; }
.avatar img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.avatar.lg { width: 44px; height: 44px; font-size: 15px; }
.me-chip { border: 0; padding: 0; background: none; border-radius: 50%; box-shadow: var(--shadow); }
.me-chip .avatar { width: 34px; height: 34px; border: 2px solid #fff; }
.row .nudge { flex: none; width: 36px; padding: 0; font-size: 16px; }
.leaflet-popup-content h4 .avatar { width: 28px; height: 28px; font-size: 11px; }
.arrow { display: inline-block; transition: transform .3s; }

.wx-now { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }
.wx-pt { background: var(--card); border-radius: 14px; padding: 11px; box-shadow: 0 1px 2px rgba(15, 23, 42, .05); }
.wx-pt .t { font-size: 30px; font-weight: 700; letter-spacing: -1px; line-height: 1.15; }
.wx-pt .ic { font-size: 24px; float: right; }
.wx-days { display: grid; grid-template-columns: repeat(6, 1fr); gap: 1px; text-align: center; font-size: 12px; background: var(--line); border-radius: 14px; overflow: hidden; }
.wx-days div { background: var(--card); padding: 8px 2px; }
.wx-days b { display: block; font-size: 10px; text-transform: uppercase; color: var(--muted); font-weight: 600; }
.wx-days .ic { font-size: 19px; display: block; margin: 3px 0; }

.sos-num { display: flex; align-items: center; justify-content: space-between; background: var(--card); border-radius: 12px; padding: 10px 14px; margin: 6px 0; color: var(--ink); box-shadow: inset 0 0 0 1px var(--line); }
.sos-num b { font-size: 22px; color: var(--red); }
.coords { font-family: ui-monospace, "SF Mono", Menlo, monospace; font-size: 16px; font-weight: 600; background: var(--soft); padding: 9px 10px; border-radius: 10px; user-select: all; }

.progress { height: 6px; background: var(--soft); border-radius: 3px; overflow: hidden; margin-top: 8px; }
.progress i { display: block; height: 100%; background: var(--green); width: 0; transition: width .2s; }

/* ---------- map labels & markers ---------- */
.lbl { background: none; border: 0; }
.lbl span {
  display: inline-block; transform: translate(-50%, -50%); white-space: nowrap; font-weight: 650; font-size: 11px; color: var(--ink);
  text-shadow: 0 0 2px #fff, 0 0 2px #fff, 0 0 3px #fff; pointer-events: none;
}
.lbl-place span { font-size: 11px; text-transform: uppercase; letter-spacing: 1.4px; color: #475569; font-weight: 700; }
.lbl-peak span { font-size: 10px; color: #6b5b4b; font-weight: 600; }
.lbl-lift span {
  background: rgba(255, 255, 255, .94); color: var(--ink); text-shadow: none; padding: 2px 7px 2px 6px; border-radius: 6px; font-size: 10.5px; font-weight: 650;
  box-shadow: 0 1px 3px rgba(15, 23, 42, .25); display: inline-flex; align-items: center; gap: 4px; pointer-events: auto;
}
.lbl-lift i { width: 6px; height: 6px; border-radius: 50%; background: #94a3b8; display: inline-block; }
.lbl-lift i.open { background: #22c55e; } .lbl-lift i.closed { background: #ef4444; } .lbl-lift i.queue { background: #f59e0b; }
.lbl-piste span { font-size: 9.5px; font-weight: 700; padding: 1px 4px; border-radius: 4px; color: #fff; text-shadow: none; }
.poi-ic span {
  display: grid; place-items: center; width: 20px; height: 20px; border-radius: 50%; background: #fff;
  font-size: 10px; transform: translate(-50%, -50%); box-shadow: 0 1px 3px rgba(15, 23, 42, .35); font-weight: 800; color: var(--ink-2);
}
.poi-ic.parking span { background: #1d64d8; color: #fff; }
.poi-ic.first_aid span, .poi-ic.aed span { background: var(--red); color: #fff; }
.crew-mk { background: none; border: 0; }
.crew-mk div {
  position: relative; overflow: hidden; transform: translate(-50%, -50%); width: 34px; height: 34px; border-radius: 50%; border: 2.5px solid #fff; color: #fff;
  display: grid; place-items: center; font-weight: 700; font-size: 12px; box-shadow: 0 0 0 2px var(--ring, transparent), 0 2px 6px rgba(0, 0, 0, .3);
}
.leaflet-container .crew-mk div img, .crew-mk div img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.crew-mk.stale div { opacity: .55; filter: grayscale(.6); }
.crew-mk em { position: absolute; left: 50%; top: 19px; transform: translateX(-50%); font-style: normal; font-size: 10.5px; font-weight: 650; white-space: nowrap; background: rgba(255, 255, 255, .94); padding: 1px 6px; border-radius: 6px; box-shadow: 0 1px 2px rgba(0, 0, 0, .15); }
.me-mk div { transform: translate(-50%, -50%); width: 18px; height: 18px; border-radius: 50%; background: #1a73e8; border: 3px solid #fff; box-shadow: 0 0 0 6px rgba(26, 115, 232, .22), 0 1px 4px rgba(0, 0, 0, .3); }
.me-mk b { position: absolute; left: 0; top: 0; width: 0; height: 0; transform-origin: 0 0; }
.me-mk b::before { content: ""; position: absolute; left: -6px; top: -24px; border: 6px solid transparent; border-bottom: 11px solid #1a73e8; border-top: 0; }
.pin-mk div { transform: translate(-50%, -100%); font-size: 26px; filter: drop-shadow(0 2px 2px rgba(0, 0, 0, .3)); }

.leaflet-popup-content-wrapper { border-radius: 14px; box-shadow: var(--shadow); }
.leaflet-popup-content { margin: 11px 13px; font-size: 13.5px; line-height: 1.4; min-width: 200px; }
.leaflet-popup-content h4 { margin: 0 0 3px; font-size: 16px; font-weight: 700; letter-spacing: -.2px; }
.leaflet-popup-content .btns { margin: 8px 0 0; }
.leaflet-popup-content .btn.small { height: 32px; }
.leaflet-container a.leaflet-popup-close-button { top: 6px; right: 6px; }

/* ---------- toast / modal ---------- */
#toast {
  position: fixed; z-index: 3000; left: 50%; top: calc(var(--safe-t) + 52px); transform: translate(-50%, -12px);
  background: rgba(15, 23, 42, .92); -webkit-backdrop-filter: var(--blur); backdrop-filter: var(--blur);
  color: #fff; padding: 10px 15px; border-radius: 12px; font-weight: 600; font-size: 14px;
  opacity: 0; pointer-events: none; transition: .22s; max-width: 92vw; text-align: center; box-shadow: var(--shadow);
}
#toast.show { opacity: 1; transform: translate(-50%, 0); pointer-events: auto; }
#toast.sticky { cursor: pointer; } /* a toast that waits for a tap (public #84) */
#modal { border: 0; border-radius: 18px; padding: 0; width: min(92vw, 420px); max-height: 86vh; box-shadow: 0 20px 50px rgba(15, 23, 42, .3); background: var(--bg); color: var(--ink); }
/* No blur behind dialogs (public #64): blurring the whole moving map behind a dialog cost every frame on iPhones. */
#modal::backdrop { background: rgba(15, 23, 42, .45); }
#modal:focus { outline: none; } /* it takes the focus when it opens (public #73) */
#modalBody { padding: 16px; overflow-y: auto; max-height: 86vh; }
.layer-opt { display: flex; align-items: center; gap: 10px; padding: 10px 2px; border-bottom: 1px solid var(--line); font-size: 15px; }
.layer-opt input { width: 20px; height: 20px; accent-color: var(--accent); }

.diag { font: 11px/1.45 ui-monospace, "SF Mono", Menlo, monospace; background: var(--soft); border-radius: 10px; padding: 8px 10px; white-space: pre-wrap; margin: 6px 0 0; }
details summary { cursor: pointer; font-size: 13px; color: var(--muted); font-weight: 600; }

/* ---------- zoom guard ---------- */
html { touch-action: manipulation; -webkit-text-size-adjust: 100%; }

/* ---------- walkie-talkie ---------- */
#pttBtn, .ptt-hold { touch-action: none; -webkit-user-select: none; user-select: none; -webkit-touch-callout: none; }
#pttBtn svg { fill: var(--red); }
#pttOverlay {
  position: fixed; z-index: 2500; left: 50%; top: 40%; transform: translate(-50%, -50%);
  display: flex; flex-direction: column; align-items: center; gap: 8px; padding: 22px 26px; border-radius: 22px;
  background: rgba(15, 23, 42, .88); -webkit-backdrop-filter: var(--blur); backdrop-filter: var(--blur); color: #fff; pointer-events: none;
  box-shadow: 0 20px 50px rgba(15, 23, 42, .35); min-width: 220px; text-align: center;
}
#pttOverlay small { opacity: .7; font-size: 12px; }
.ptt-ring { width: 84px; height: 84px; border-radius: 50%; background: var(--red); display: grid; place-items: center; font: 700 20px ui-monospace, "SF Mono", monospace; animation: ptt 1.2s ease-in-out infinite; }
#pttOverlay.cancel .ptt-ring { background: #64748b; animation: none; }
#pttOverlay.cancel b::after { content: " — release to cancel"; font-weight: 500; }
@keyframes ptt { 50% { box-shadow: 0 0 0 14px rgba(229, 72, 77, .25); } }
.icon-btn { width: 44px; padding: 0; flex: none; font-size: 18px; }
.voice {
  display: inline-flex; align-items: center; gap: 8px; border: 0; background: rgba(15, 23, 42, .06); color: inherit;
  border-radius: 999px; padding: 6px 12px 6px 10px; font-weight: 700; font-size: 13px; min-width: 120px;
}
.msg.mine .voice { background: rgba(255, 255, 255, .2); }
.voice i { flex: 1; height: 3px; border-radius: 2px; background: currentColor; opacity: .35; min-width: 40px; }
.voice.on i { opacity: 1; animation: pulse 1s infinite; }
.voice span { font-variant-numeric: tabular-nums; font-weight: 600; }

/* ---------- photos ---------- */
.msg.has-media { padding: 6px; }
.msg.has-media b, .msg.has-media small, .msg.has-media div { padding: 0 5px; }
.msg-photo { display: block; width: 200px; max-width: 100%; border-radius: 12px; cursor: pointer; }
.photo-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 3px; border-radius: 14px; overflow: hidden; }
.photo-grid img { width: 100%; aspect-ratio: 1; object-fit: cover; display: block; cursor: pointer; background: var(--soft); }
.preview, .lightbox { display: block; width: 100%; max-height: 56vh; object-fit: contain; border-radius: 12px; background: #000; }
.photo-mk div {
  transform: translate(-50%, -100%); width: 42px; height: 42px; border-radius: 10px; overflow: hidden; border: 2.5px solid #fff;
  box-shadow: 0 3px 8px rgba(0, 0, 0, .35); background: var(--soft);
}
/* Leaflet's own `.leaflet-container .leaflet-marker-pane img { width: auto }` is more specific: without the extra class a
   vertical photo kept its own width and left bars at the sides (public #67). */
.leaflet-container .photo-mk div img, .photo-mk div img { width: 100%; height: 100%; object-fit: cover; display: block; }

/* ---------- my position with my photo ---------- */
.me-mk.has-face div { position: relative; overflow: hidden; width: 30px; height: 30px; border-width: 2.5px; box-shadow: 0 0 0 3px #1a73e8, 0 0 0 9px rgba(26, 115, 232, .2), 0 1px 4px rgba(0, 0, 0, .3); }
.leaflet-container .me-mk.has-face div img, .me-mk.has-face div img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.me-mk.has-face div span { position: absolute; inset: 0; display: flex; align-items: center; justify-content: center; color: #fff; font: 700 13px/1 var(--display, inherit); }
.me-mk.has-face b::before { top: -30px; }

/* ---------- invites ---------- */
.qr-box { display: flex; gap: 12px; align-items: center; background: var(--card); border-radius: 14px; padding: 10px; margin: 8px 0 10px; box-shadow: inset 0 0 0 1px var(--line); }
#inviteQr { width: 120px; height: 120px; flex: none; }
#inviteQr svg { width: 100%; height: 100%; display: block; }

/* ---------- live status ---------- */
.live-card { display: block; padding: 10px 12px; margin: 0 0 10px; font-size: 14px; }
.live-dot { display: inline-block; width: 8px; height: 8px; border-radius: 50%; background: #22c55e; margin-right: 6px; box-shadow: 0 0 0 3px rgba(34, 197, 94, .2); animation: pulse 2s infinite; }

/* ---------- heading-up rotation ---------- */
#map { transform-origin: 50% 50%; }
x-r { position: absolute; left: 0; top: 0; width: 0; height: 0; display: block; transform: rotate(var(--map-rot, 0deg)); }
#compassNeedle { transition: transform .15s linear; }
#compassBtn.on { background: var(--accent-soft); }
#attrib {
  position: fixed; z-index: 900; left: 0; bottom: var(--bar); max-width: 70vw; padding: 1px 6px; font-size: 9px; line-height: 1.5;
  background: rgba(255, 255, 255, .6); border-radius: 0 6px 0 0; color: var(--muted); white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}
#attrib a { color: var(--muted); }
body.sheet-open #attrib { display: none; }

/* ---------- crew tab ---------- */
.banner { display: block; width: 100%; text-align: left; border: 0; background: var(--accent-soft); color: var(--ink); border-radius: 12px; padding: 9px 12px; font-size: 13px; margin: 2px 0 10px; }
.banner b { color: var(--accent); float: right; margin-left: 8px; }
.crew-head { display: flex; align-items: center; gap: 8px; margin: 2px 0 10px; }
.crew-pick { flex: 1; min-width: 0; text-align: left; border: 0; background: none; padding: 2px 0; }
.crew-pick .crew-name { font-size: 20px; font-weight: 700; letter-spacing: -.3px; }
.crew-pick .caret { color: var(--muted); font-size: 13px; }
.crew-pick .small { display: block; }
/* A direct chat (public #83): the person's picture beside their name, like the head of a WhatsApp chat. */
.crew-pick.dm-pick { display: grid; grid-template-columns: auto auto 1fr; column-gap: 10px; align-items: center; }
.crew-pick.dm-pick > .avatar { grid-row: 1 / 3; }
.crew-pick.dm-pick > .crew-name { min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.crew-pick.dm-pick > .caret { justify-self: start; }
.crew-pick.dm-pick > .small { grid-column: 2 / 4; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.chat-list .chat-line { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.chat-list .chat-line svg.i { width: 14px; height: 14px; vertical-align: -2px; }
.me-row { background: var(--accent-soft); }
.feature-list { list-style: none; padding: 0; margin: 0 0 10px; line-height: 1.8; }
.composer { position: sticky; bottom: -24px; background: var(--bg); padding: 8px 0 4px; margin-top: 6px; border-top: 1px solid var(--line); }
.composer .chips { padding-top: 0; }
.talk { background: var(--red); font-size: 18px; }
.chip-install { background: var(--accent); color: #fff; }
/* ---------- install guide ---------- */
.install-hero { display: flex; gap: 12px; align-items: center; margin-bottom: 8px; }
.install-hero img { width: 56px; height: 56px; border-radius: 13px; box-shadow: 0 2px 8px rgba(15, 23, 42, .2); flex: none; }
.install-steps { margin: 10px 0; padding-left: 22px; line-height: 1.6; font-size: 15px; }
.install-alt { margin: 10px 0 0; }
.install-alt summary { cursor: pointer; padding: 6px 0; }
.code-box { margin: 10px 0; padding: 10px 12px; border-radius: 12px; background: var(--soft); text-align: center; }
.code-box b { display: block; font-size: 28px; letter-spacing: 6px; margin: 2px 0 4px; }
.install-steps li { margin: 6px 0; }
.ios-share { width: 18px; height: 18px; vertical-align: -3px; fill: var(--accent); }
.kbd { display: inline-block; border: 1px solid var(--line); border-radius: 5px; padding: 0 5px; font-size: 12px; }

.talk svg { pointer-events: none; }

/* popups stay upright on a rotated map: turn around the anchor (tip) point */
.leaflet-popup-content-wrapper { transform: rotate(var(--map-rot, 0deg)); transform-origin: 50% calc(100% + 20px); }
.leaflet-popup-tip-container { transform: rotate(var(--map-rot, 0deg)); transform-origin: 50% 100%; }

#pttOverlay .ptt-actions { display: none; gap: 10px; margin-top: 6px; }
#pttOverlay.tapmode { pointer-events: auto; }
#pttOverlay.tapmode .ptt-actions { display: flex; }
#pttOverlay .ptt-actions .btn { min-width: 90px; }

/* ---------- keyboard open (iOS overlays it) ---------- */
body.kb-open #modal { top: calc(var(--vvt, 0px) + 10px); bottom: auto; margin: 0 auto; max-height: calc(var(--vvh, 100vh) - 20px); }
body.kb-open #modalBody { max-height: calc(var(--vvh, 100vh) - 20px); }
body.kb-open #tabbar, body.kb-open #attrib { display: none; }
body.kb-open .sheet { bottom: var(--kb, 0px); height: auto; max-height: calc(var(--vvh, 100vh) - 40px); }
body.kb-open .sheet.tall { height: auto; }

/* ---------- calmer crew tab ---------- */
.seg-n { display: inline-block; min-width: 18px; padding: 0 5px; border-radius: 9px; background: var(--accent); color: #fff; font-size: 11px; line-height: 18px; }
.crew-head { margin-bottom: 8px; }
.crew-head .crew-name { font-size: 19px; }
#crewDyn .row { padding: 8px 12px; }
#crewDyn .avatar { width: 34px; height: 34px; }
.composer-row { display: flex; align-items: center; gap: 8px; }
.composer-row input { flex: 1; min-width: 0; height: 42px; border: 1px solid #dbe3ec; border-radius: 21px; padding: 0 14px; background: #fff; outline: none; }
.composer-row input:focus { border-color: var(--accent); }
.cbtn { width: 42px; height: 42px; flex: none; border: 0; border-radius: 50%; background: var(--soft); display: grid; place-items: center; }
.cbtn svg { width: 21px; height: 21px; fill: var(--ink-2); pointer-events: none; }
.cbtn.talk { background: var(--red); }
.cbtn.talk svg, .cbtn.send svg { fill: #fff; }
.cbtn.send { background: var(--accent); }
.cbtn[hidden] { display: none; }
.composer { padding-top: 6px; }
.composer .chips { padding-bottom: 6px; }

/* ---------- crew header: one line ---------- */
.loc-pill { flex: none; border: 0; border-radius: 999px; padding: 0 12px; height: 34px; font-weight: 650; font-size: 13px; background: var(--soft); color: var(--muted); }
.loc-pill.on { background: #dcfce7; color: #166534; }
.live-pill { display: inline-flex; align-items: center; gap: 6px; }
.live-dot { width: 8px; height: 8px; border-radius: 50%; background: #16a34a; animation: pulse 1.4s infinite; }
.invite-btn { background: var(--accent); }
.invite-btn svg { fill: #fff; }
.invite-line { display: block; width: 100%; text-align: left; border: 0; background: var(--card); border-radius: 12px; padding: 11px 12px; color: var(--muted); font-size: 14px; box-shadow: 0 1px 2px rgba(15, 23, 42, .05); }
.invite-line b { color: var(--accent); }

/* ---------- every dialog, once and for all: inside the safe area and above the keyboard ---------- */
#modal { max-height: calc(100% - env(safe-area-inset-top, 0px) - env(safe-area-inset-bottom, 0px) - 24px); }
#modalBody { max-height: inherit; }
body.kb-open #modal {
  top: calc(var(--vvt, 0px) + env(safe-area-inset-top, 0px) + 6px); bottom: auto; margin: 0 auto;
  max-height: calc(var(--vvh, 100vh) - env(safe-area-inset-top, 0px) - 12px);
}
body.kb-open #modalBody { max-height: calc(var(--vvh, 100vh) - env(safe-area-inset-top, 0px) - 12px); }

.sheet-foot:empty { display: none; }
.sheet-foot { flex: none; padding: 6px 14px 8px; background: var(--bg); border-top: 1px solid var(--line); }
.sheet-foot .composer { position: static; border-top: 0; margin: 0; padding: 0; }
#resortName { max-width: 40vw; }
.chip-install { padding: 0 10px; }

/* POIs: bigger icons with a generous invisible tap area (gloves) */
.poi-ic span { position: relative; width: 26px; height: 26px; font-size: 14px; }
.poi-ic span::after { content: ""; position: absolute; inset: -10px; }

/* ---------- ideas board ---------- */
.row.idea { align-items: flex-start; cursor: default; }
.idea-text { font-size: 14.5px; line-height: 1.35; white-space: pre-wrap; }
.vote { flex: none; width: 44px; border: 1px solid var(--line); background: var(--card); border-radius: 10px; padding: 4px 0; color: var(--muted); font-size: 12px; display: flex; flex-direction: column; align-items: center; }
.vote b { font-size: 15px; color: var(--ink); }
.vote.on { background: var(--accent-soft); border-color: var(--accent); color: var(--accent); }
.vote.on b { color: var(--accent); }

/* ---------- bell ---------- */
.chip.bell { position: relative; padding: 0; width: 34px; justify-content: center; }
.chip.bell svg { width: 18px; height: 18px; fill: var(--ink-2); }
.chip.bell .badge { top: -3px; left: auto; right: -3px; }
.row.unread { background: var(--accent-soft); }

/* ---------- crew: meeting points + photos as one slim line above the chat ---------- */
.crew-extras { display: flex; gap: 6px; overflow-x: auto; margin: 12px 0 2px; padding-bottom: 2px; scrollbar-width: none; }
.crew-extras::-webkit-scrollbar { display: none; }
.pinchip { flex: none; display: inline-flex; align-items: center; background: var(--card); border-radius: 999px; box-shadow: inset 0 0 0 1px var(--line); max-width: 85%; }
.pinchip button { border: 0; background: none; padding: 6px 11px; font-size: 13px; color: var(--ink-2); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.pinchip button b { color: var(--ink); font-weight: 650; }
.pinchip .x { padding: 6px 10px 6px 2px; color: var(--muted); }
/* composer + menu */
.cbtn.attach svg { width: 24px; height: 24px; }
.attach-menu { display: grid; grid-template-columns: 1fr 1fr; gap: 6px; margin-bottom: 8px; }
.attach-menu[hidden] { display: none; }
.attach-menu button { border: 0; background: var(--card); box-shadow: inset 0 0 0 1px var(--line); border-radius: 12px; padding: 11px 10px; font-weight: 600; font-size: 14px; text-align: left; color: var(--ink); }

/* ---------- every dialog: a close button that stays in the top-right corner while the content scrolls ---------- */
.modal-x { position: absolute; top: 10px; right: 10px; z-index: 3; width: 32px; height: 32px; border: 0; border-radius: 50%; background: var(--soft); display: grid; place-items: center; padding: 0; box-shadow: 0 1px 3px rgba(15, 23, 42, .12); }
.modal-x svg { width: 18px; height: 18px; fill: var(--ink-2); pointer-events: none; }
#modalBody > h2:first-child, #modalBody > .install-hero:first-child { padding-right: 36px; }
/* Only the content scrolls; the dialog frame (and its ✕) stays put. */
#modal[open] { display: flex; flex-direction: column; overflow: hidden; }
#modalBody, body.kb-open #modalBody { flex: 1 1 auto; min-height: 0; max-height: none; overflow-y: auto; -webkit-overflow-scrolling: touch; }

/* ---------- idea attachments ---------- */
.idea-files { display: flex; flex-wrap: wrap; gap: 6px; margin: 6px 0; align-items: center; }
.idea-thumb { position: relative; width: 64px; height: 64px; border-radius: 10px; overflow: hidden; background: var(--soft); }
.idea-thumb img { width: 100%; height: 100%; object-fit: cover; display: block; cursor: pointer; }
.idea-thumb button { position: absolute; top: 2px; right: 2px; width: 22px; height: 22px; border: 0; border-radius: 50%; background: rgba(15, 23, 42, .65); color: #fff; font-size: 12px; padding: 0; }
.idea-add { border: 1px dashed #cbd5e1; background: none; border-radius: 10px; height: 40px; padding: 0 12px; font-weight: 600; font-size: 13px; color: var(--ink-2); }

/* ---------- top bar always fits the screen: the resort name gives way, bell + profile never leave it ---------- */
#topbar { flex-wrap: nowrap; }
#resortBtn { flex: 0 1 auto; min-width: 0; }
#resortName, #resortName { max-width: none; min-width: 0; flex: 0 1 auto; }
.topbar-right { flex: none; min-width: 0; }
.topbar-right > * { flex: none; }
.chip.net-ic { padding: 0; width: 34px; justify-content: center; }
.chip.net-ic svg { width: 18px; height: 18px; fill: #a16207; }

/* ---------- dialog frame: sticky title row + pinned main buttons, only the middle scrolls ---------- */
.modal-head { flex: none; display: flex; align-items: center; gap: 8px; padding: 12px 12px 6px 16px; }
.modal-head h2 { flex: 1; min-width: 0; margin: 0; font-size: 19px; line-height: 1.25; }
.modal-head h2:empty { visibility: hidden; }
#modal .modal-head .modal-x { position: static; flex: none; }
.modal-help { flex: none; width: 26px; height: 26px; border-radius: 50%; border: 0; background: var(--soft); color: var(--ink-2); font-weight: 750; font-size: 14px; padding: 0; }
.modal-tip { flex: none; margin: 0 16px 6px; padding: 9px 11px; border-radius: 10px; background: var(--soft); color: var(--ink-2); font-size: 13px; line-height: 1.4; }
.modal-tip[hidden] { display: none; }
#modalBody { padding-top: 4px; }
.modal-foot { flex: none; padding: 10px 16px 14px; border-top: 1px solid var(--line); background: var(--bg); }
.modal-foot[hidden] { display: none; }
.modal-foot > .btns { margin: 0; }
.modal-foot > .btn.block { margin: 0; }
.idea-text { white-space: pre-line; }
.idea-verdict { display: flex; flex-wrap: wrap; align-items: center; gap: 6px; margin-top: 6px; }
/* chat: long-press my message to edit/delete (no iOS text-selection callout in the way) */
.msg[data-mid] { -webkit-user-select: none; user-select: none; -webkit-touch-callout: none; }
.btn.danger { color: var(--red); }
.btn.danger:not(.light) { background: var(--red); color: #fff; }

/* =====================================================================
   Design refresh (idea #20): line icons instead of emoji, softer surfaces,
   one button language, calmer dialogs. Later rules win over the ones above.
   ===================================================================== */
:root {
  --accent: #2b63f6; --accent-soft: #eaf0ff; --line: rgba(15, 23, 42, .07);
  --bg: #f6f8fb; --soft: #eef2f7;
  --shadow-sm: 0 1px 2px rgba(15, 23, 42, .05), 0 3px 10px rgba(15, 23, 42, .05);
}
.i { width: 1.15em; height: 1.15em; flex: none; vertical-align: -.2em; margin-right: .4em; }
.btn > .i, .cbtn > .i, .modal-x .i { margin-right: 0; }
h2 .i, #modalTitle .i { color: var(--accent); width: 1em; height: 1em; vertical-align: -.12em; }

/* buttons */
.btn { height: 46px; border-radius: 14px; font-weight: 600; letter-spacing: -.1px; gap: 7px;
  box-shadow: 0 1px 2px rgba(43, 99, 246, .25), inset 0 1px 0 rgba(255, 255, 255, .14); transition: transform .12s, filter .12s; }
.btn:active { transform: scale(.97); filter: brightness(.96); }
.btn.light { background: #fff; color: var(--ink); box-shadow: inset 0 0 0 1px rgba(15, 23, 42, .1); }
.btn.light .i { color: var(--accent); }
.btn.small { height: 36px; padding: 0 12px; font-size: 13.5px; border-radius: 11px; }
.btn.danger.light .i, .btn.danger .i { color: currentColor; }

/* dialogs */
#modal { border-radius: 22px; background: var(--bg); box-shadow: 0 24px 64px rgba(15, 23, 42, .28), 0 2px 8px rgba(15, 23, 42, .08); }
.modal-head { padding: 14px 12px 8px 18px; }
.modal-head h2 { font-size: 18px; font-weight: 700; letter-spacing: -.3px; }
#modalBody { padding: 4px 16px 16px; }
.modal-foot { background: rgba(246, 248, 251, .94); -webkit-backdrop-filter: blur(10px); backdrop-filter: blur(10px); }
.modal-x { background: rgba(15, 23, 42, .06); box-shadow: none; }
.modal-help { background: rgba(15, 23, 42, .06); }
h3 { letter-spacing: .6px; margin: 18px 4px 7px; }

/* lists, cards, fields */
.list, .card, .invite-line { border-radius: 16px; box-shadow: var(--shadow-sm); }
.row { padding: 11px 14px; gap: 12px; }
.row .ico { width: 34px; height: 34px; border-radius: 10px; background: var(--accent-soft); color: var(--accent); }
.row .ico .i { width: 18px; height: 18px; margin: 0; }
.field input, .field select, .field textarea { border-radius: 12px; border-color: rgba(15, 23, 42, .12); }

/* segmented tabs and chips */
.seg { background: rgba(15, 23, 42, .06); border-radius: 12px; padding: 3px; }
.seg button { border-radius: 9px; padding: 8px; font-size: 13.5px; }
.seg button.on { box-shadow: 0 1px 2px rgba(15, 23, 42, .1), 0 2px 6px rgba(15, 23, 42, .06); }
.chips button, .pinchip { box-shadow: inset 0 0 0 1px rgba(15, 23, 42, .1); }
.pinchip .i, .chips .i { color: var(--accent); }
.attach-menu button { display: flex; align-items: center; border-radius: 14px; box-shadow: inset 0 0 0 1px rgba(15, 23, 42, .1); }
.attach-menu .i { color: var(--accent); width: 20px; height: 20px; margin-right: 10px; }
.pill { padding: 2px 9px; font-weight: 600; }
.pill .i { width: 12px; height: 12px; margin-right: 3px; }

/* map markers: one icon style, colour by kind */
.poi-ic span { width: 26px; height: 26px; background: #fff; color: var(--ink-2); box-shadow: 0 1px 2px rgba(15, 23, 42, .25), 0 0 0 2px #fff; }
.poi-ic span .i { width: 15px; height: 15px; margin: 0; }
.poi-ic.food span { color: #b45309; }
.poi-ic.bus span { color: #0f766e; }
.poi-ic.viewpoint span { color: #7c3aed; }

/* ---------- standard hint: "?" next to a heading, explanation in a bubble ---------- */
#modalBody .hint { display: none; }
.modal-tip p { margin: 0; }
.modal-tip p + p { margin-top: 6px; }
.hint-q { display: inline-grid; place-items: center; width: 20px; height: 20px; margin-left: 6px; padding: 0; border: 0; border-radius: 50%;
  background: rgba(15, 23, 42, .07); color: var(--ink-2); font: 700 12px/1 inherit; vertical-align: middle; letter-spacing: 0; text-transform: none; }
.hint-q.on { background: var(--accent); color: #fff; }
.hint-bubble { margin: 4px 0 10px; padding: 9px 11px; border-radius: 12px; background: var(--soft); color: var(--ink-2); font-size: 13px; line-height: 1.4; }

/* =====================================================================
   Ski Crew visual system v2 (idea #20, reopened after research on what
   makes interfaces read as AI-generated). Deliberate choices, not defaults:
   - ink-black primary actions instead of the stock SaaS blue (blue and red
     stay free for run grades on the map)
   - one accent, glacier teal, only for links, active state and focus
   - warm snow-grey surfaces, hairline borders instead of floating shadows,
     no frosted glass inside panels
   - corner radius by role: 6 badges · 10 controls · 12 groups · 18 sheets
   - Barlow Condensed (ski-signage grotesk) for titles, labels and numbers
   ===================================================================== */
@font-face { font-family: 'Barlow Condensed'; font-weight: 600; font-display: swap; src: url('vendor/fonts/barlow-condensed-600.woff2') format('woff2'); }
@font-face { font-family: 'Barlow Condensed'; font-weight: 700; font-display: swap; src: url('vendor/fonts/barlow-condensed-700.woff2') format('woff2'); }
:root {
  --ink: #15181c; --ink-2: #3b4148; --muted: #6b7178;
  --bg: #f4f4f1; --card: #fff; --soft: #ebebe6; --line: #e1e1db;
  --accent: #15181c; --teal: #0e7490; --accent-soft: #e2f0f3;
  --r-badge: 6px; --r-ctl: 10px; --r-group: 12px; --r-sheet: 18px;
  --display: 'Barlow Condensed', -apple-system, BlinkMacSystemFont, system-ui, sans-serif;
  --shadow: 0 1px 2px rgba(21, 24, 28, .08), 0 2px 6px rgba(21, 24, 28, .06);
}
a, .invite-line b { color: var(--teal); }

/* type: condensed display face for titles, section labels and figures */
h2, .modal-head h2, .crew-name, .wx-pt .t, .seg-n { font-family: var(--display); }
h2, .modal-head h2 { font-weight: 700; font-size: 23px; letter-spacing: .1px; line-height: 1.1; }
.crew-head .crew-name { font-size: 23px; font-weight: 700; letter-spacing: .1px; }
h3 { font-family: var(--display); font-weight: 600; font-size: 14px; letter-spacing: 1px; color: var(--muted); }
.wx-pt .t { font-weight: 700; font-size: 34px; letter-spacing: 0; }
h2 .i, #modalTitle .i { color: var(--ink-2); }

/* controls */
.btn { border-radius: var(--r-ctl); height: 44px; background: var(--ink); box-shadow: none; font-weight: 600; }
.btn:active { filter: none; background: #2a2f35; }
.btn.light { background: var(--card); color: var(--ink); box-shadow: inset 0 0 0 1px #d4d4cd; }
.btn.light:active { background: var(--soft); }
.btn.light .i { color: var(--ink-2); }
.btn.small { border-radius: 8px; height: 36px; }
.btn.red, .btn.danger:not(.light) { background: var(--red); }
.cbtn.send, .invite-btn { background: var(--ink); }
.field input, .field select, .field textarea, .composer-row input { border-radius: var(--r-ctl); border-color: #d4d4cd; }
.field input:focus, .inline input:focus, .composer-row input:focus { border-color: var(--teal); box-shadow: 0 0 0 3px var(--accent-soft); }
.switch input:checked + i { background: var(--teal); }
.seg { background: var(--soft); border-radius: var(--r-ctl); }
.seg button { border-radius: 8px; }
.seg button.on { box-shadow: 0 0 0 1px #d4d4cd; }
.pill { border-radius: var(--r-badge); }
.seg-n { border-radius: var(--r-badge); background: var(--teal); }
#tabbar button.active { color: var(--ink); }

/* groups: hairlines, no floating cards */
.list, .card, .invite-line, .wx-pt { border-radius: var(--r-group); box-shadow: none; border: 1px solid var(--line); }
.wx-days { border-radius: var(--r-group); }
.row .ico { background: var(--soft); color: var(--ink-2); border-radius: 8px; }
.chips button, .pinchip { box-shadow: inset 0 0 0 1px #d4d4cd; }
.pinchip .i, .chips .i, .attach-menu .i { color: var(--ink-2); }
.attach-menu button { border-radius: var(--r-ctl); box-shadow: inset 0 0 0 1px #d4d4cd; }
.msg { box-shadow: none; border: 1px solid var(--line); border-radius: 14px; }
.msg.mine { background: var(--ink); border-color: var(--ink); }

/* surfaces: solid, no frosted glass in panels; map chips stay legible with a hairline */
#modal { border-radius: var(--r-sheet); background: var(--bg); box-shadow: 0 18px 48px rgba(21, 24, 28, .25); }
.modal-foot { background: var(--bg); -webkit-backdrop-filter: none; backdrop-filter: none; border-top-color: var(--line); }
.modal-x, .modal-help, .hint-q { background: var(--soft); }
.hint-q.on { background: var(--ink); }
.hint-bubble, .modal-tip { background: var(--soft); border-radius: var(--r-ctl); }
.chip { background: rgba(255, 255, 255, .96); -webkit-backdrop-filter: none; backdrop-filter: none; box-shadow: 0 0 0 1px rgba(21, 24, 28, .08), 0 1px 3px rgba(21, 24, 28, .12); }
.chip-warn { background: #fff4d6; }

/* weather: line icons */
.wx-i { width: 1.2em; height: 1.2em; margin: 0; }
#weatherChip .wx-i { width: 17px; height: 17px; margin-right: 5px; color: var(--ink-2); }
.wx-pt .ic .wx-i { width: 26px; height: 26px; color: var(--ink-2); }
.wx-days .ic .wx-i { width: 20px; height: 20px; color: var(--ink-2); }
.wx-pt .small .i, .wx + p .i { width: 14px; height: 14px; color: var(--muted); }

/* dialog header blocks (profile photo + name) live in the title row */
.modal-head .install-hero { margin: 0; gap: 10px; }
.modal-head .install-hero h2 { margin: 0; font-size: 22px; }
.modal-head .install-hero .avatar.lg { width: 40px; height: 40px; }
.modal-head .install-hero img { width: 40px; height: 40px; border-radius: 10px; box-shadow: none; }
.modal-head .install-hero .small { font-family: -apple-system, BlinkMacSystemFont, system-ui, sans-serif; font-weight: 400; font-size: 12.5px; letter-spacing: 0; }
.chip.chip-install { background: var(--ink); color: #fff; box-shadow: none; }

/* iPhone home-screen app (problem #24): iOS 26 lays a frosted fade under the status bar that
   reaches a little below it. Keep the top-bar buttons clear of it, and keep the page itself from
   scrolling (only the sheet and dialogs scroll), which is what invites that edge effect. */
#statusScrim { display: none; }
@media (display-mode: standalone) {
  #topbar { padding-top: calc(var(--safe-t) + 18px); }
  html, body { overflow: hidden; }
  #toast, .toast { top: calc(var(--safe-t) + 64px); }
}

/* ---------- 3D terrain view ---------- */
#map3d { position: fixed; inset: 0; z-index: 2; background: #eef3f8; }
.map3d-me { width: 18px; height: 18px; border-radius: 50%; background: #2b63f6; border: 3px solid #fff; box-shadow: 0 0 0 6px rgba(43, 99, 246, .22); }
.fab-3d { font: 700 15px/1 var(--display); color: var(--ink-2); letter-spacing: .3px; }
#map3d .maplibregl-ctrl-bottom-right { bottom: calc(var(--bar) + 4px); }

/* ideas board: folded sections + AI tag */
details.archive { margin-top: 10px; }
details.archive > summary, .list-head { cursor: pointer; list-style: none; display: flex; align-items: center; gap: 6px; padding: 8px 4px;
  font: 600 14px/1 var(--display); letter-spacing: .8px; text-transform: uppercase; color: var(--muted); }
.list-head { cursor: default; padding-top: 4px; }
details.archive > summary::-webkit-details-marker { display: none; }
details.archive > summary::before { content: "›"; display: inline-block; transition: transform .15s; font-size: 16px; }
details.archive[open] > summary::before { transform: rotate(90deg); }
.pill.st-ai { background: var(--accent-soft); color: var(--teal); }
/* 3D view: the flat map's markers, upright (no rotation wrapper), and the same cards */
.m3d { width: 0; height: 0; }
#map3d x-r { transform: none !important; }
#map3d .maplibregl-marker { cursor: pointer; }
.card3d .maplibregl-popup-content { border-radius: 14px; box-shadow: var(--shadow); padding: 11px 13px; font-size: 13.5px; line-height: 1.4; min-width: 200px; font-family: inherit; color: var(--ink); }
.card3d h4 { margin: 0 0 3px; font-size: 16px; font-weight: 700; letter-spacing: -.2px; }
.card3d h4 .avatar { width: 28px; height: 28px; font-size: 11px; }
.card3d .btns { margin: 8px 0 0; }
.card3d .btn.small { height: 32px; }
.card3d .maplibregl-popup-close-button { font-size: 18px; width: 26px; height: 26px; right: 4px; top: 4px; }

/* webcams strip (Info tab) */
.cams { display: flex; gap: 8px; overflow-x: auto; padding-bottom: 4px; scrollbar-width: none; }
.cams::-webkit-scrollbar { display: none; }
.cam { flex: none; width: 150px; border: 1px solid var(--line); border-radius: var(--r-group); background: var(--card); padding: 0; overflow: hidden; text-align: left; }
.cam img { display: block; width: 100%; aspect-ratio: 4 / 3; object-fit: cover; background: var(--soft); }
.cam span { display: block; padding: 6px 9px; font-size: 13px; font-weight: 600; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.cam-big { display: block; width: 100%; border-radius: var(--r-ctl); background: var(--soft); }

/* avalanche danger (EAWS colours) */
.aval-sq { flex: none; display: inline-grid; place-items: center; width: 30px; height: 30px; border-radius: 7px; font: 700 17px/1 var(--display); color: #15181c; box-shadow: inset 0 0 0 1px rgba(21, 24, 28, .15); }
.aval-sq.aval-4, .aval-sq.aval-5 { color: #fff; }
.aval-sq.aval-5 { background: repeating-linear-gradient(45deg, #ff0000 0 6px, #15181c 6px 12px) !important; }
.aval-sq.aval-none { background: var(--soft); color: var(--muted); }
.aval-row { display: flex; gap: 11px; align-items: center; background: var(--card); border: 1px solid var(--line); border-radius: var(--r-group); padding: 10px 12px; margin-bottom: 8px; }
.aval-chip { padding: 0 10px 0 4px; gap: 6px; }
.aval-chip .aval-sq { width: 24px; height: 24px; font-size: 15px; border-radius: 6px; }
.spin { width: 14px; height: 14px; border-radius: 50%; border: 2px solid rgba(21, 24, 28, .2); border-top-color: var(--ink); animation: spin .8s linear infinite; flex: none; }
@keyframes spin { to { transform: rotate(360deg); } }
.btn:disabled .spin { opacity: 1; }
/* webcam markers */
.cam-mk div { width: 28px; height: 28px; border-radius: 8px; background: var(--ink); color: #fff; display: grid; place-items: center; transform: translate(-50%, -50%); box-shadow: 0 0 0 2px #fff, 0 1px 4px rgba(21, 24, 28, .35); }
.cam-mk .i { width: 15px; height: 15px; margin: 0; }
/* meeting point: who's coming */
.eta-list { margin-top: 8px; border-top: 1px solid var(--line); padding-top: 6px; }
.eta-row { display: flex; align-items: center; gap: 7px; padding: 3px 0; font-size: 13px; }
.eta-row .avatar { width: 22px; height: 22px; font-size: 9px; flex: none; }
.eta-row b { min-width: 52px; }
.eta-row span { margin-left: auto; text-align: right; }
.eta-ok { color: var(--green); }
/* Ask for more: one row, the optional direction hides behind + */
.ask-row { display: flex; gap: 8px; margin-top: 10px; }
.ask-row .btn:first-child { flex: 1; }
.ask-plus { width: 44px; padding: 0; font-size: 20px; flex: none; }
.ask-plus[aria-expanded="true"] { background: var(--soft); }
.ask-hint { margin: 8px 0 0; }
/* a button whose label may need two lines (stays inside the button) */
.btn.btn-wrap { white-space: normal; height: auto; min-height: 44px; padding: 8px 14px; text-align: center; line-height: 1.25; }
.btn.btn-wrap > span:last-child { min-width: 0; }

/* my counters (idea #44) */
.use-pill { display: inline-block; margin-left: 6px; padding: 1px 7px; border-radius: var(--r-badge); background: var(--ink); color: #fff; font: 700 13px/18px var(--display); letter-spacing: .3px; }
.lbl-lift .use-n { margin-left: 4px; padding: 0 4px; border-radius: 4px; background: var(--ink); color: #fff; font-weight: 700; }
.lbl-use span { font: 700 11px/1 var(--display); color: #fff; padding: 2px 5px; border-radius: 5px; box-shadow: 0 0 0 1.5px #fff; }
.use-line { margin-top: 4px; }
.lbl-lift.off { opacity: .45; }
/* the item a notification pointed at */
li.flash { animation: flash 2.4s ease-out 1; }
@keyframes flash { 0%, 40% { background: var(--accent-soft); } 100% { background: transparent; } }

/* ---------- walkthrough (idea #48) ---------- */
#tour { position: fixed; inset: 0; z-index: 6000; }
#tour.tour-center { background: rgba(21, 24, 28, .55); }
.tour-spot { position: fixed; border-radius: 14px; box-shadow: 0 0 0 9999px rgba(21, 24, 28, .55), 0 0 0 3px #fff; transition: all .25s ease; pointer-events: none; }
.tour-card { position: fixed; width: min(320px, calc(100vw - 24px)); background: var(--card); border-radius: var(--r-group); padding: 14px 16px 12px; box-shadow: 0 18px 48px rgba(21, 24, 28, .3); }
#tour.tour-center .tour-card { top: 50% !important; transform: translateY(-50%); }
.tour-card h4 { margin: 2px 0 6px; font: 700 20px/1.15 var(--display); letter-spacing: .1px; }
.tour-card p { margin: 0; font-size: 14px; line-height: 1.45; color: var(--ink-2); }
.tour-count { font: 600 12px/1 var(--display); letter-spacing: 1px; color: var(--muted); }
.tour-btns { display: flex; align-items: center; justify-content: space-between; margin-top: 12px; }
.tour-btns span { display: flex; gap: 6px; }
.tour-skip { border: 0; background: none; color: var(--muted); font-weight: 600; padding: 6px 0; }
.tour-card { transition: opacity .15s; }
/* toast as a top-layer popover (problem #52): undo the browser's popover defaults */
#toast[popover] { inset: auto; left: 50%; margin: 0; border: 0; width: auto; height: auto; overflow: visible; color: #fff; background: rgba(21, 24, 28, .92); }
#toast[popover] { top: calc(var(--safe-t) + 52px); }
@media (display-mode: standalone) { #toast[popover] { top: calc(var(--safe-t) + 64px); } }

/* =====================================================================
   Phone held sideways (idea #55): the tab bar becomes a slim rail on the left (covering the
   notch side), panels open as a side panel next to it, and the map keeps the rest. Everything
   stays clear of the camera notch and the home-indicator edge.
   Only a really wide screen (3:2 and wider) counts: in WhatsApp's in-app browser the keyboard shrinks the page, which
   made a phone held upright look sideways and threw the chat into this layout (Dai, 20 Nov 2026).
   ===================================================================== */
@media (orientation: landscape) and (max-height: 600px) and (min-aspect-ratio: 3/2) {
  :root {
    --sl: env(safe-area-inset-left, 0px);
    --sr: env(safe-area-inset-right, 0px);
    --sbx: env(safe-area-inset-bottom, 0px);
    --rail: calc(54px + var(--sl));
    --panel: min(400px, 46vw);
    --bar: 0px;
  }
  #tabbar {
    top: 0; bottom: 0; left: 0; right: auto; width: var(--rail); height: auto;
    flex-direction: column; justify-content: center; gap: 2px;
    padding: 8px 0 calc(8px + var(--sbx)) var(--sl); border-top: 0; border-right: 1px solid var(--line);
  }
  #tabbar button { flex: 0 0 52px; font-size: 9.5px; }
  #tabbar svg { width: 21px; height: 21px; }
  #topbar { left: var(--rail); right: var(--sr); padding-top: 8px; }
  body.sheet-open #topbar { left: calc(var(--rail) + var(--panel)); }
  .sheet, .sheet.tall {
    left: var(--rail); right: auto; top: 0; bottom: 0; width: var(--panel); height: auto; max-height: none;
    border-radius: 0 18px 18px 0; box-shadow: 8px 0 30px rgba(15, 23, 42, .14);
  }
  .sheet-handle { display: none; }
  .sheet-body { padding-top: 12px; padding-bottom: calc(14px + var(--sbx)); }
  .sheet-foot { padding-bottom: calc(8px + var(--sbx)); }
  #mapButtons { right: calc(10px + var(--sr)); bottom: calc(10px + var(--sbx)); }
  body.sheet-open #mapButtons { display: flex; }
  #statusStrip { left: calc(var(--rail) + 10px); bottom: calc(10px + var(--sbx)); }
  body.sheet-open #statusStrip { display: none; }
  #attrib { left: var(--rail); bottom: 0; }
  .leaflet-bottom { bottom: 0; }
}

/* =====================================================================
   Floating menu (idea #55): the tab bar is a compact pill floating over the map, like the
   compass group, instead of a full-width solid bar. Bottom-centre in portrait, left side
   in landscape. The map stays visible around it.
   ===================================================================== */
:root {
  --pill-gap: max(8px, calc(env(safe-area-inset-bottom, 0px) - 22px));
  --bar: calc(var(--tab-h) + var(--pill-gap) + 8px); /* what sits above the pill clears it */
}
#tabbar {
  left: 50%; right: auto; bottom: var(--pill-gap); transform: translateX(-50%);
  width: min(360px, calc(100vw - 24px)); height: var(--tab-h); padding: 0 4px;
  border: 0; border-radius: 18px; box-shadow: 0 0 0 1px rgba(21, 24, 28, .08), 0 6px 20px rgba(21, 24, 28, .16);
  background: rgba(255, 255, 255, .96);
}
#tabbar button { border-radius: 14px; }
.sheet { bottom: var(--bar); border-radius: 18px; left: 8px; right: 8px; box-shadow: 0 -4px 24px rgba(15, 23, 42, .14); }
@media (orientation: landscape) and (max-height: 600px) and (min-aspect-ratio: 3/2) {
  :root { --rail: calc(64px + var(--sl)); --bar: 0px; }
  #tabbar {
    left: calc(var(--sl) + 8px); right: auto; top: 50%; bottom: auto; transform: translateY(-50%);
    width: 56px; height: auto; padding: 4px 0; flex-direction: column; border-radius: 18px;
  }
  #tabbar button { flex: 0 0 54px; }
  .sheet, .sheet.tall { left: var(--rail); top: 8px; bottom: calc(8px + var(--sbx)); border-radius: 18px; }
}

/* Turned map (compass / two-finger rotate) showed white lines on the tile grid (idea #55):
   Leaflet 1.9 blends tiles with mix-blend-mode: plus-lighter (to hide gaps on a straight map),
   which ADDS the brightness of overlapping antialiased edges once the map is rotated. Normal
   blending plus a 1 px overlap hides gaps both ways. */
.leaflet-container img.leaflet-tile { mix-blend-mode: normal; }
.leaflet-tile-container img.leaflet-tile { width: 257px !important; height: 257px !important; }
#map { background: #c9ccc4; }

/* live location card in the chat (idea #56) */
.loc-card { display: block; cursor: pointer; margin: -2px -4px 0; }
.mini-map { position: relative; overflow: hidden; border-radius: 10px; background: var(--soft); max-width: 100%; }
.mini-map > img { position: absolute; width: 256px; height: 256px; max-width: none; }
.mini-pin { position: absolute; left: 50%; top: 50%; transform: translate(-50%, -50%); }
.mini-pin .avatar, #crewDyn .mini-pin .avatar { width: 44px; height: 44px; font-size: 15px; border: 3px solid #fff; box-shadow: 0 2px 8px rgba(21, 24, 28, .35); }
.mini-flag { display: block; font-size: 30px; line-height: 1; transform: translateY(-40%); filter: drop-shadow(0 2px 3px rgba(21, 24, 28, .4)); }
.mini-flag svg { width: 34px; height: 34px; }
.loc-status { display: flex; align-items: center; gap: 6px; padding: 6px 2px 0; }
.msg.mine .loc-status, .msg.mine .loc-status a { color: #fff; }
.loc-dot { width: 8px; height: 8px; border-radius: 50%; background: #16a34a; box-shadow: 0 0 0 3px rgba(22, 163, 74, .25); animation: livepulse 1.6s ease-in-out infinite; }
@keyframes livepulse { 50% { box-shadow: 0 0 0 6px rgba(22, 163, 74, .08); } }
.msg:has(.loc-card) { padding: 6px; }
/* the way to a crewmate */
.way-chip { position: fixed; z-index: 1001; left: 50%; transform: translateX(-50%); top: calc(var(--safe-t) + 60px); gap: 8px; }
.way-chip .arrow { display: inline-block; font-weight: 800; color: var(--teal); }
.way-chip button { border: 0; background: none; font-weight: 700; color: var(--muted); padding: 0 0 0 4px; }

/* The chat (problem #59): the crew header stays, only the messages scroll. */
.sheet-body.chat-mode { overflow: hidden; display: flex; flex-direction: column; padding-bottom: 0; }
.chat-mode #crewDyn { flex: 1; min-height: 0; display: flex; flex-direction: column; position: relative; }
.chat-mode .chat-top, .chat-mode .chat-note { flex: none; }
.chat-mode .msgs { flex: 1; min-height: 0; overflow-y: auto; -webkit-overflow-scrolling: touch; overscroll-behavior: contain;
  margin: 6px -14px 0; padding: 4px 14px 10px; }
.to-latest { position: absolute; right: 2px; bottom: 14px; z-index: 3; width: 42px; height: 42px; border-radius: 50%; border: 0;
  background: var(--card); color: var(--ink); box-shadow: 0 2px 10px rgba(21, 24, 28, .22); display: grid; place-items: center; }
.to-latest[hidden] { display: none; }
.to-latest b { position: absolute; top: -5px; right: -5px; min-width: 20px; height: 20px; padding: 0 5px; border-radius: 10px;
  background: var(--teal); color: #fff; font: 700 12px/20px var(--display); text-align: center; }

/* Ski day card preview (idea #29) */
.daycard-img { display: block; width: 100%; max-width: 360px; margin: 6px auto 4px; border-radius: 14px; box-shadow: 0 4px 18px rgba(21, 24, 28, .25); }
/* Crew day leaderboard (idea #39) and the trophy in the chat */
.board-row .avatar { margin-right: 2px; }
.board-row.me { background: var(--accent-soft); border-radius: 12px; }
.board-rank { font-size: 20px; width: 30px; text-align: center; }
.board-vert { text-align: right; line-height: 1; }
.board-vert b { display: block; font: 700 22px/1 var(--display); }
.board-vert span { font-size: 11px; color: var(--muted); }
.msg.system { align-self: center; max-width: 92%; background: var(--accent-soft); border-color: transparent; white-space: pre-line; text-align: left; }
.live-chip button { display: inline-flex; align-items: center; gap: 4px; }
.live-chip .loc-dot { width: 7px; height: 7px; margin-right: 2px; }
/* One card for two things under the finger (problem #62) */
hr.card-split { border: 0; border-top: 1px solid var(--line); margin: 10px -2px; }
.daycard-wrap { margin: 4px 0 8px; }
.daycard-wait { aspect-ratio: 4 / 5; display: grid; place-items: center; background: var(--soft); color: var(--muted); font: 600 18px var(--display); }
/* Ideas board from the last copy while the fresh one loads (idea #66) */
.ideas-board.busy :is([data-act="ideavote"], [data-act="ideahappy"], [data-act="ideachange"], [data-act="ideacorrect"], [data-act="suggestmore"], [data-act="suggesthint"]) { opacity: .45; pointer-events: none; }
.ideas-state { display: flex; align-items: center; gap: 6px; margin: 6px 2px; }
/* My gear (idea #67) */
.gear-thumb { width: 44px; height: 44px; object-fit: cover; border-radius: 10px; flex: none; background: var(--soft); }
.gear-photo { display: block; width: 100%; max-height: 240px; object-fit: contain; background: var(--soft); border-radius: 12px; margin: 2px 0 6px; }
.gear-status { display: flex; align-items: center; gap: 6px; margin: 4px 2px; }
.gear-me { display: grid; grid-template-columns: 1fr 1fr 1.3fr; gap: 8px; }
.link-btn { border: 0; background: none; padding: 4px 0 0; color: var(--teal); font-weight: 600; cursor: pointer; display: inline-flex; align-items: center; gap: 4px; }
/* Keep screen awake, gently (idea #70) */
.awake-opts { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; margin: -2px 0 10px; }
#dimmer { position: fixed; inset: 0; z-index: 100000; background: #000; opacity: 0; pointer-events: none; transition: opacity .8s ease; display: grid; place-items: end center; }
#dimmer.on { opacity: .93; pointer-events: auto; }
#dimmer { touch-action: none; }
#dimmer .dim-wake { margin-bottom: calc(var(--safe-b, 0px) + 28px); display: grid; gap: 2px; padding: 12px 26px; border-radius: 999px;
  border: 1px solid rgba(255,255,255,.2); background: rgba(255,255,255,.07); color: rgba(255,255,255,.5); font: 600 15px var(--display); letter-spacing: .3px; }
#dimmer .dim-wake b { color: rgba(255,255,255,.75); font-weight: 700; }
.gear-sub { display: flex; align-items: center; gap: 6px; }
/* Day card: adjusting the 3D view (idea #29) */
.daycard-live { position: relative; aspect-ratio: 1080 / 1350; border-radius: 14px; overflow: hidden; background: var(--soft); touch-action: none; }
.daycard-live .live-head, .daycard-live .live-foot { position: absolute; left: 3.3%; right: 3.3%; z-index: 2; pointer-events: none;
  background: rgba(12, 15, 19, .38); border-radius: 12px; -webkit-backdrop-filter: blur(6px); backdrop-filter: blur(6px); }
.daycard-live .live-head { top: 2.7%; height: 14.5%; }
.daycard-live .live-foot { bottom: 2.7%; height: 33.2%; }
.card-adjust .btns { margin-top: 4px; }
.gear-strip { display: flex; gap: 6px; margin: 0 0 6px; flex-wrap: wrap; }
.fresh-snow { color: #1d64d8; }
.fresh-snow b { font-weight: 800; }
/* Gallery tiles and picking several (idea #73) */
.photo-grid .ph-wait { position: absolute; right: 4px; bottom: 4px; font-size: 13px; line-height: 1; padding: 3px 4px; border-radius: 8px; background: rgba(255,255,255,.85); }
.photo-grid .ph-tile { position: relative; padding: 0; border: 0; background: none; display: block; aspect-ratio: 1; border-radius: 10px; overflow: hidden; }
.photo-grid .ph-tile img { width: 100%; height: 100%; object-fit: cover; display: block; }
.photo-grid.selecting .ph-tile::after { content: ''; position: absolute; top: 6px; right: 6px; width: 22px; height: 22px; border-radius: 50%; border: 2px solid #fff; background: rgba(0,0,0,.25); box-shadow: 0 1px 3px rgba(0,0,0,.4); }
.photo-grid.selecting .ph-tile.picked::after { background: var(--teal); content: '✓'; color: #fff; font: 700 13px/18px var(--display); text-align: center; }
.photo-grid.selecting .ph-tile.picked img { opacity: .8; }
/* Photo viewer: step through, small actions (idea #73) */
.ph-view { position: relative; height: min(56vh, 460px); background: #0b0e11; border-radius: 12px; display: grid; place-items: center; overflow: hidden; }
.ph-view .lightbox { max-width: 100%; max-height: 100%; width: auto; height: auto; object-fit: contain; border-radius: 0; margin: 0; }
.ph-meta, .ph-caption { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.ph-caption { min-height: 1.4em; }
.ph-nav { position: absolute; top: 50%; transform: translateY(-50%); z-index: 2; width: 38px; height: 38px; border-radius: 50%; border: 0;
  background: rgba(15, 18, 22, .55); color: #fff; font: 700 26px/34px var(--display); display: grid; place-items: center; padding: 0 0 3px; }
.ph-prev { left: 6px; }
.ph-next { right: 6px; }
.ph-actions { display: flex; flex-wrap: nowrap; overflow-x: auto; gap: 6px; margin-top: 10px; scrollbar-width: none; }
.ph-actions .btn { flex: none; }
/* Badges (idea #74) */
.badge-chip { margin-top: 6px; border: 0; background: var(--accent-soft); color: var(--teal); border-radius: 999px; padding: 4px 10px; font: 700 13px var(--display); letter-spacing: .2px; display: inline-flex; align-items: center; gap: 5px; }
.badge-chip svg { width: 15px; height: 15px; }
.bdg-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 14px 6px; align-items: start; }
.bdg { border: 0; background: none; padding: 0; display: grid; justify-items: center; align-content: start; gap: 5px; text-align: center; color: var(--muted); }
.bdg .bname { font: 700 12px/1.2 var(--display); color: var(--ink-2); height: 2.4em; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.bdg .bhow { font-size: 10px; line-height: 1.25; max-height: 3.75em; overflow: hidden; margin-top: -4px; }
.bdg.on .bname { color: var(--ink); }
/* Medal: metallic rim, enamel face, engraved icon; --s is its size. Fixed box, centred content. */
.medal { --s: 56px; --rim: linear-gradient(145deg, #eef2f6, #aeb8c4 30%, #6c7886 52%, #dfe5eb 78%, #8c98a6); --f1: #2b8aa6; --f2: #0c4a60; --ink: #e8f4f8;
  width: var(--s); height: var(--s); border-radius: 50%; display: grid; place-items: center; flex: none; background: var(--rim); position: relative; line-height: 0;
  box-shadow: 0 3px 8px rgba(15, 23, 42, .28), inset 0 1px 1px rgba(255, 255, 255, .7), inset 0 -1px 2px rgba(0, 0, 0, .3); }
/* The face is placed absolutely (not by grid centring): iPhone captures drew it shifted (idea #29). */
.medal .m-face { position: absolute; inset: 4.5px; border-radius: 50%; display: flex; align-items: center; justify-content: center; overflow: hidden; color: var(--ink);
  background: radial-gradient(circle at 35% 28%, var(--f1), var(--f2) 78%);
  box-shadow: inset 0 0 0 1.5px rgba(0, 0, 0, .35), inset 0 3px 5px rgba(255, 255, 255, .22), inset 0 -4px 6px rgba(0, 0, 0, .35); }
.medal .m-face::after { content: ''; position: absolute; inset: 0; border-radius: 50%; background: linear-gradient(158deg, rgba(255, 255, 255, .42), rgba(255, 255, 255, 0) 46%); pointer-events: none; }
.medal .i { display: block; width: calc(var(--s) * .45); height: calc(var(--s) * .45); margin: 0; vertical-align: baseline; filter: drop-shadow(0 1px 0 rgba(0, 0, 0, .45)); }
.medal b { display: block; font: 800 calc(var(--s) * .33)/1 var(--display); letter-spacing: -.3px; text-shadow: 0 1px 0 rgba(0, 0, 0, .45); }
.medal.g-app { --rim: linear-gradient(145deg, #f4f8fb, #b4c2d0 28%, #66788a 52%, #e3eaf0 78%, #8498ab); --f1: #2f9fc0; --f2: #0b4660; --ink: #eaf6fb; }
.medal.g-contrib { --rim: linear-gradient(145deg, #fff0c2, #d9b45a 28%, #8a5a1c 52%, #f0d083 78%, #a8782c); --f1: #8b5cf6; --f2: #35106f; --ink: #f8e7a8; }
.medal.g-ski { --rim: linear-gradient(145deg, #fff3bf, #efc24c 28%, #9b6a0e 52%, #f7d974 78%, #b78415); --f1: #2c5282; --f2: #0e2340; --ink: #f8dd86; }
.medal.off { --rim: linear-gradient(145deg, #e8ecf0, #cdd4db); --ink: #a3acb6; box-shadow: inset 0 1px 2px rgba(15, 23, 42, .12), 0 1px 0 #fff; }
.medal.off .m-face { background: var(--soft); box-shadow: inset 0 2px 5px rgba(15, 23, 42, .2), inset 0 -1px 0 rgba(255, 255, 255, .9); }
.medal.off .m-face::after { display: none; }
.medal.off .i, .medal.off b { filter: none; text-shadow: 0 1px 0 #fff; }
.medal.big { --s: 104px; }
/* Badge detail card */
.bcard { display: grid; justify-items: center; text-align: center; gap: 6px; padding: 6px 0 2px; }
.bcard .bgroup { margin-top: 8px; font: 700 11px var(--display); letter-spacing: .8px; text-transform: uppercase; color: var(--muted); }
.bcard .bbig { font: 800 22px/1.15 var(--display); color: var(--ink); letter-spacing: -.3px; }
.bcard .bdesc { margin: 2px 0 6px; font-size: 14.5px; line-height: 1.4; color: var(--ink-2); }
.bcard .bblock { width: 100%; box-sizing: border-box; text-align: left; background: var(--soft); border-radius: 14px; padding: 10px 14px; }
.bcard .bblock.won { background: #fff8e1; box-shadow: inset 0 0 0 1px rgba(217, 164, 40, .35); }
.bcard .bblock h4 { margin: 0 0 3px; font: 700 11px var(--display); letter-spacing: .6px; text-transform: uppercase; color: var(--muted); }
.bcard .bblock p { margin: 0; font-size: 14px; line-height: 1.4; color: var(--ink); }
.bprog { height: 8px; border-radius: 99px; background: rgba(15, 23, 42, .1); margin-top: 8px; overflow: hidden; }
.bprog i { display: block; height: 100%; border-radius: 99px; background: linear-gradient(90deg, #f0c44c, #c98f14); }
/* In-app screenshots for ideas (idea #79) */
#shotBar { position: fixed; z-index: 100001; left: 50%; transform: translateX(-50%); bottom: calc(var(--bar) + 18px); display: flex; align-items: center; gap: 8px;
  padding: 8px 8px 8px 14px; border-radius: 999px; background: var(--glass); -webkit-backdrop-filter: var(--blur); backdrop-filter: var(--blur); box-shadow: var(--shadow); white-space: nowrap; }
#shotBar[hidden] { display: none; }
#shotEdit { position: fixed; inset: 0; z-index: 100002; background: #000; }
#shotBusy { border: 0; padding: 0; margin: auto; background: transparent; max-width: none; overflow: visible; color: var(--ink); }
#shotBusy::backdrop { background: rgba(15,18,22,.35); }
#shotBusy > div { display: flex; align-items: center; gap: 10px; padding: 12px 16px; border-radius: 16px; background: #fff; box-shadow: 0 6px 24px rgba(0,0,0,.25); font-weight: 600; }
#shotEdit canvas { display: block; }
#shotEdit .shot-tools { position: absolute; left: 50%; transform: translateX(-50%); bottom: calc(var(--safe-b, 0px) + 22px); display: flex; gap: 6px; padding: 6px; border-radius: 999px; background: rgba(255,255,255,.92); box-shadow: 0 4px 18px rgba(0,0,0,.35); }
#shotEdit .shot-tools .on { background: var(--ink); color: #fff; }
#shotEdit .shot-hint { position: absolute; top: calc(var(--safe-t) + 10px); left: 50%; transform: translateX(-50%); width: max-content; max-width: calc(100% - 32px); margin: 0; padding: 6px 12px; border-radius: 14px; background: rgba(15,18,22,.7); color: #fff; text-align: center; }

/* Owner page (ideas #81, #82) */
.owner-root .stats { grid-template-columns: repeat(3, 1fr); }
.owner-root h3 { margin: 16px 0 6px; }
.owner-root .row .sub { white-space: normal; }
.owner-root .row .title.ow { white-space: normal; font-weight: 500; font-size: 14px; }
.owner-root .row .side b { color: var(--ink); font-size: 14px; }
.owner-root .row .side .i { width: 13px; height: 13px; margin: 0 0 0 2px; vertical-align: -.15em; }
.obars { display: flex; align-items: flex-end; gap: 3px; height: 98px; padding: 4px 2px 0; background: var(--card); border-radius: 12px; box-shadow: 0 1px 2px rgba(15, 23, 42, .05); }
.obar { flex: 1; min-width: 0; display: flex; flex-direction: column; justify-content: flex-end; align-items: center; height: 100%; }
.obar b { font-size: 9px; font-weight: 700; color: var(--muted); line-height: 12px; }
.obar i { display: block; width: 100%; max-width: 18px; background: var(--accent); border-radius: 4px 4px 1px 1px; }
.obar span { font-size: 9px; color: var(--muted); line-height: 14px; }
/* Owner page, Growth tab (23 Nov 2026): yesterday, 7 days and the 7 before, side by side. */
.otable { width: 100%; border-collapse: collapse; font-size: 14px; margin: 10px 0; background: var(--card); border-radius: 12px; overflow: hidden; }
.otable th, .otable td { padding: 7px 8px; text-align: right; border-bottom: 1px solid var(--line); white-space: nowrap; }
.otable th { font-size: 12px; font-weight: 600; color: var(--muted); }
.otable th:first-child, .otable td:first-child { text-align: left; white-space: normal; }
.otable tr:last-child td { border-bottom: 0; }
.obars.thin { height: 76px; gap: 2px; }
.obars.thin .obar i { max-width: 10px; }
.ofunnel { width: 100%; border-collapse: collapse; font-size: 12px; margin: 6px 0; }
.ofunnel th, .ofunnel td { padding: 6px 4px; text-align: right; border-bottom: 1px solid var(--soft); font-variant-numeric: tabular-nums; }
.ofunnel th:first-child, .ofunnel td:first-child { text-align: left; }
.ofunnel th { color: var(--muted); font-weight: 600; font-size: 11px; }
.ofunnel tfoot td { font-weight: 700; border-bottom: 0; }
.ohbar { height: 6px; border-radius: 3px; background: var(--soft); margin-top: 5px; overflow: hidden; }
.ohbar i { display: block; height: 100%; background: var(--accent); border-radius: 3px; }
.owner-root .btn.red { color: #fff; }
/* Resort coverage (public idea #1): what each ski area has, ticked or missing. */
.cov-list { list-style: none; margin: 8px 0 0; padding: 0; display: grid; grid-template-columns: 1fr 1fr; gap: 4px 10px; }
.cov-list li { display: flex; gap: 5px; align-items: flex-start; font-size: 12px; line-height: 1.35; color: var(--muted); min-width: 0; }
.cov-list li b { display: block; color: var(--ink); font-weight: 600; }
.cov-list li .i { width: 14px; height: 14px; flex: none; margin-top: 1px; }
.cov-list li.on .i { color: #16a34a; }
.cov-list li.off { opacity: .75; }
.cov-list li.off .i { color: #dc2626; }
.cov-bars { margin-top: 4px; height: 84px; }
/* A past day on the map (idea #29): which day, and the way back to today. */
#dayChip { position: fixed; z-index: 1200; top: calc(var(--safe-t, 0px) + 62px); left: 50%; transform: translateX(-50%); display: flex; align-items: center; gap: 6px;
  border: 0; border-radius: 999px; padding: 7px 10px 7px 14px; font: 700 13px var(--display); color: var(--ink); background: var(--glass, rgba(255,255,255,.92));
  -webkit-backdrop-filter: var(--blur); backdrop-filter: var(--blur); box-shadow: var(--shadow); white-space: nowrap; }
#dayChip .i { width: 16px; height: 16px; }
/* Owner page drill-down (ideas #81, #82): numbers, bars and tiles are buttons that open their items. */
button.stat, button.obar, .oleg, .onum { border: 0; font: inherit; color: inherit; cursor: pointer; -webkit-tap-highlight-color: transparent; }
button.obar { background: none; padding: 0; }
button.stat.on { background: var(--soft); box-shadow: inset 0 -3px 0 var(--accent); }
.owner-root .stats.two { grid-template-columns: repeat(2, 1fr); }
.onum { background: none; padding: 0 1px; font-weight: 700; color: var(--accent); text-decoration: underline; text-decoration-color: rgba(0, 0, 0, .25); text-underline-offset: 3px; }
.owner-root .row[data-act] { cursor: pointer; }
.obar.stk i { max-width: 18px; border-radius: 0; }
.obar.stk i:first-of-type { border-radius: 4px 4px 0 0; }
/* (.owner-root: stronger than .obar i, so the stacked segments keep their colours) */
.owner-root .s-text { background: #3b82f6; } .owner-root .s-photo { background: #f59e0b; } .owner-root .s-voice { background: #8b5cf6; }
.owner-root .s-place { background: #10b981; } .owner-root .s-live { background: #ec4899; } .owner-root .s-deleted { background: #94a3b8; }
.olegs { display: flex; flex-wrap: wrap; gap: 6px 10px; margin: 6px 0 0; }
.oleg { background: none; padding: 2px 0; font-size: 11px; color: var(--muted); display: inline-flex; align-items: center; gap: 4px; }
.oleg i { width: 9px; height: 9px; border-radius: 3px; display: inline-block; }
/* Owner stats as PDF (idea #83): the row of buttons. */
.opdf { display: flex; align-items: center; gap: 6px; flex-wrap: wrap; margin: 8px 0 2px; }

/* =====================================================================
   Big screens (problem #86): a laptop or desktop gives room, so pages open as a panel on the left
   with the map next to it (it stays usable), the menu pill centres over the map, and dialogs are
   wider with more columns. Phones (portrait or landscape) keep their layouts.
   ===================================================================== */
@media (min-width: 900px) and (min-height: 601px) {
  :root { --panel: min(500px, 40vw); }
  .sheet, .sheet.tall {
    left: 12px; right: auto; top: 12px; bottom: 12px; width: var(--panel); height: auto; max-height: none;
    border-radius: 18px; box-shadow: 0 10px 40px rgba(15, 23, 42, .18);
  }
  .sheet-handle { display: none; }
  .sheet-body { padding-top: 14px; }
  body.sheet-open #topbar { left: calc(var(--panel) + 18px); }
  body.sheet-open #tabbar { left: calc(var(--panel) + 12px + (100vw - var(--panel) - 12px) / 2); }
  body.sheet-open #mapButtons { display: flex; }
  body.sheet-open #statusStrip { display: block; left: calc(var(--panel) + 24px); }
  body.sheet-open #attrib { left: calc(var(--panel) + 12px); }
  #resortName { max-width: 360px; }
  /* dialogs: wider, and their grids use the room */
  #modal { width: min(92vw, 760px); max-height: 90vh; }
  /* tiles as separate cards that share a row's width (no grey filler after a short last row) */
  #modal .stats { grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); gap: 8px; background: none; box-shadow: none; overflow: visible; }
  #modal .stats .stat { border-radius: 12px; box-shadow: 0 0 0 1px var(--line); }
  #modal .bdg-grid { grid-template-columns: repeat(auto-fill, minmax(100px, 1fr)); gap: 18px 10px; }
  #modal .photo-grid { grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); }
  #modal .preview, #modal .lightbox { max-height: 64vh; }
  #modal .daycard-wrap { max-width: 520px; margin-left: auto; margin-right: auto; }
}
@media (min-width: 1400px) and (min-height: 601px) {
  :root { --panel: 540px; }
  #modal { width: min(90vw, 840px); }
}
/* Privacy policy and support inside the app (idea #84) */
.legal h1 { font: 800 24px/1.15 var(--display); margin: 0 0 2px; }
.legal h2 { font: 700 16px var(--display); margin: 18px 0 4px; }
.legal p, .legal li { font-size: 14px; line-height: 1.5; }
.legal .muted { color: var(--muted); font-size: 12px; }
.legal table { border-collapse: collapse; width: 100%; font-size: 12.5px; }
.legal td, .legal th { text-align: left; vertical-align: top; padding: 5px 6px; border-bottom: 1px solid var(--line); }
.legal th { color: var(--muted); font-weight: 600; }
.legal a[data-act] { color: var(--accent); text-decoration: underline; cursor: pointer; }
/* Premium (idea #84): a locked choice opens what Premium includes */
.chip-btn.locked { opacity: .6; display: inline-flex; align-items: center; gap: 4px; }
.chip-btn.locked .i, .btn .i.lock-i { width: 13px; height: 13px; }
.premium-perks .sub { white-space: normal; overflow: visible; text-overflow: clip; }

/* public server: guest prompt in the profile (6 Nov 2026) */
.guest-card { display: flex; flex-direction: column; gap: 6px; margin: 10px 0 4px; }
.guest-card .btn { align-self: flex-start; }

/* Premium in the iPhone app (6 Nov 2026) */
.iap-options { display: flex; flex-direction: column; gap: 8px; margin: 10px 0; }
.iap-btn { flex-direction: column; height: auto; padding: 10px 14px; line-height: 1.25; }
.iap-btn .small { font-weight: 500; opacity: .85; }
/* Both servers on the owner page (public idea #26): which server a row comes from. */
.pill.src { font-size: 10px; padding: 1px 6px; vertical-align: 1px; }
.pill.src-cc { background: #e0e7ff; color: #3730a3; }
.pill.src-public { background: #dcfce7; color: #166534; }
.seg.oscope { margin-bottom: 6px; }
/* Comments under photos shared with everyone (public ideas #8, #9). */
.ph-comments { margin-top: 10px; border-top: 1px solid var(--line, #e2e5e9); padding-top: 8px; }
.ph-clist { list-style: none; margin: 0 0 8px; padding: 0; display: grid; gap: 6px; font-size: 14px; }
.ph-comments .linkish { border: 0; background: none; padding: 0 0 0 4px; color: var(--muted); font-size: 12px; text-decoration: underline; cursor: pointer; }
.ph-comments .row-inline { display: flex; align-items: center; gap: 6px; margin-bottom: 6px; }
.ph-comments .inline { display: flex; gap: 6px; }
.ph-comments .inline input { flex: 1; min-width: 0; }

.ph-comments .ph-who { align-items: center; gap: 4px; margin-bottom: 8px; }
.ph-comments .ph-who .small { margin-right: 4px; }

/* "Are you OK?" after a hard fall (public #14): over everything, big answer button */
.fall-ask { position: fixed; inset: 0; z-index: 200000; background: rgba(15, 23, 42, .92); display: grid; place-items: center; padding: 20px; }
.fall-box { background: var(--card); border-radius: 18px; padding: 22px 18px; width: min(100%, 420px); text-align: center; }
.fall-box h2 { margin: 6px 0 8px; font-size: 26px; }
.fall-box p { margin: 0 0 16px; }
.fall-box .btn { margin-top: 10px; }
.fall-box .btn.green { min-height: 76px; font-size: 24px; }
.fall-ico { color: var(--red); }
.fall-ico svg { width: 48px; height: 48px; }
.jumps-line { margin: 6px 0; display: flex; align-items: center; gap: 6px; }
/* Profiles and people (public #12, #28) */
.avatar.xl { width: 84px; height: 84px; font-size: 26px; }
.pp-photo { display: flex; gap: 14px; align-items: center; margin-bottom: 6px; }
.pp-photo .btns { margin: 0; flex-wrap: wrap; }
.pp-bio { margin-top: 2px; }
.avatar-edit { position: relative; background: none; border: 0; padding: 0; display: inline-flex; flex: none; cursor: pointer; }
.avatar-pen { position: absolute; right: -3px; bottom: -3px; width: 18px; height: 18px; border-radius: 50%; background: var(--accent, #0e7490); color: #fff; display: grid; place-items: center; border: 2px solid #fff; }
.avatar-pen .i, #modalTitle .avatar-pen .i { width: 10px; height: 10px; margin: 0; } /* the title's icon size must not reach the badge */
/* Edit profile (public #12): styled choices and the home resort search */
.pp-seg { display: grid; gap: 2px; }
.pp-home-set { display: flex; align-items: center; gap: 8px; padding: 8px 0; }
.pp-home-set b { flex: 1; }
.pp-home-set .i { width: 18px; height: 18px; color: var(--accent); }
.pp-home-list { margin-top: 6px; }
.pp-home-list:empty { display: none; }
.pp-home-list .row { cursor: pointer; }
li.feat-off .main { opacity: .55; } /* a feature the owner switched off for everyone (public #10) */
/* Owner page, Features (public #10): category buttons and the switch for everyone under each feature */
.feat-row .main { width: 100%; }
.feat-ctl { display: flex; align-items: center; gap: 10px; margin-top: 8px; }
.feat-paid { margin-top: 6px; align-items: center; padding-bottom: 0; } /* public #77: in or out of Premium */
.feat-paid .chip-btn svg.i { width: 14px; height: 14px; }
.feat-seg { flex: 1; }
.feat-seg button { padding: 6px 4px; font-size: 13px; }
.feat-seg button:disabled { opacity: .5; }
.feat-core { margin-top: 4px; }
/* Business accounts and visit plans (public #36, #30) */
.pp-verified { display: inline-flex; vertical-align: -3px; color: var(--accent, #0e7490); }
.pp-verified .i { width: 16px; height: 16px; }
.pp-verified-line { display: flex; align-items: center; gap: 6px; color: var(--accent, #0e7490); font-weight: 600; }
.pp-verified-line .i { width: 16px; height: 16px; }
.pp-chips { display: flex; flex-wrap: wrap; gap: 6px; margin-bottom: 6px; }
.pp-chip { display: inline-flex; align-items: center; gap: 4px; padding: 3px 4px 3px 10px; border-radius: 999px; background: var(--accent-soft, #e0f2f7); font-size: 13px; font-weight: 600; }
.pp-chip button { border: 0; background: none; padding: 2px; display: inline-grid; place-items: center; color: inherit; cursor: pointer; }
/* A business page like Airbnb's and Google's (public #36): photos, offers with prices, languages, facts. */
.pp-gallery { display: flex; flex-wrap: wrap; gap: 8px; }
.pp-gal { position: relative; width: 76px; height: 76px; border-radius: 12px; overflow: hidden; border: 0; padding: 0; background: var(--line, #e5e7eb); flex: none; }
.pp-gal img { width: 100%; height: 100%; object-fit: cover; display: block; }
.pp-gal > button { position: absolute; top: 4px; right: 4px; width: 24px; height: 24px; border-radius: 50%; border: 0; background: rgba(15, 23, 42, .72); color: #fff; display: grid; place-items: center; padding: 0; }
.pp-gal > button svg.i { width: 14px; height: 14px; }
.pp-galadd { width: 76px; height: 76px; border-radius: 12px; border: 1.5px dashed var(--muted, #94a3b8); background: none; color: var(--muted, #64748b); display: grid; place-items: center; }
.pp-gallery.view { flex-wrap: nowrap; overflow-x: auto; margin: 10px 0 6px; scrollbar-width: none; }
.pp-gallery.view .pp-gal { width: 120px; height: 90px; }
.pp-gbig { width: 100%; border-radius: 14px; display: block; }
.pp-offer { display: grid; grid-template-columns: minmax(0, 1fr) 104px auto; gap: 6px; align-items: center; margin-bottom: 6px; }
.pp-langs { flex-wrap: wrap; overflow: visible; }
.pp-fact { display: flex; gap: 6px; align-items: flex-start; margin-top: 6px; }
.pp-fact svg.i { width: 15px; height: 15px; flex: none; margin-top: 2px; }
.pp-offers { margin-top: 10px; }
.pp-chip .i { width: 14px; height: 14px; margin: 0; }
.pp-link { display: flex; align-items: center; gap: 8px; width: 100%; color: var(--accent, #0e7490); font-weight: 600; text-decoration: none; word-break: break-all; }
.pp-contact .row { padding: 10px 12px; }
.pl-side { display: flex; flex-direction: column; gap: 4px; align-items: flex-end; }
.pl-chips { display: flex; flex-wrap: wrap; gap: 6px; margin: 6px 0; }
.pl-chip { border: 0; border-radius: 999px; padding: 5px 11px; background: #e9eef4; font-size: 13px; font-weight: 600; cursor: pointer; }
.pl-chip b { color: var(--muted); font-weight: 600; margin-left: 2px; }
.pl-cal { background: rgba(15, 23, 42, .04); border-radius: 12px; padding: 8px; margin-top: 6px; }
.pl-calhead { display: flex; align-items: center; justify-content: space-between; margin-bottom: 6px; }
.pl-calhead .btn.small { height: 30px; padding: 0 9px; }
.pl-calhead .i.flip { transform: scaleX(-1); }
.pl-dow, .pl-days { display: grid; grid-template-columns: repeat(7, 1fr); gap: 2px; text-align: center; }
.pl-dow span { font-size: 11px; color: var(--muted); font-weight: 600; padding: 2px 0; }
.pl-days button { border: 0; background: none; height: 36px; border-radius: 9px; font-size: 14px; font-weight: 600; color: var(--ink); cursor: pointer; }
.pl-days button:disabled { opacity: .3; cursor: default; }
.pl-days button.in { background: var(--accent-soft, #e0f2f7); border-radius: 0; }
.pl-days button.on { background: var(--accent, #0e7490); color: #fff; }
.pl-months button { padding: 9px 4px; }

/* Routes (public #15 to #18): the bar at the bottom of the map, the numbered stops, the card in the chat */
#routeBar {
  position: fixed; z-index: 1000; left: 10px; bottom: calc(var(--bar) + 24px); width: min(420px, calc(100vw - 76px)); max-height: 56vh; overflow-y: auto;
  background: var(--glass); -webkit-backdrop-filter: var(--blur); backdrop-filter: var(--blur);
  border-radius: 16px; padding: 10px 12px; box-shadow: var(--shadow); font-size: 13px;
}
#routeBar[hidden] { display: none; }
body.route-open #statusStrip { display: none; }
body.sheet-open #routeBar { display: none; }
#routeBar { padding: 10px 12px 8px; }
.rt-bad { color: var(--red); font-weight: 600; font-size: 13px; }
.rt-head { display: flex; align-items: center; gap: 10px; min-height: 36px; }
.rt-time { display: flex; align-items: baseline; gap: 4px; flex: none; }
.rt-time b { font: 700 34px/1 var(--display, inherit); letter-spacing: .2px; }
.rt-time small { font-size: 13px; font-weight: 650; color: var(--muted); }
.rt-meta { flex: 1; min-width: 0; font-size: 13px; font-weight: 600; color: var(--muted); }
.rt-hint { font-weight: 550; color: var(--ink); }
.rt-round { flex: none; width: 30px; height: 30px; border: 0; border-radius: 50%; padding: 0; background: rgba(15, 23, 42, .08); color: var(--ink); display: inline-flex; align-items: center; justify-content: center; font-weight: 700; font-size: 18px; line-height: 1; }
.rt-round svg { width: 16px; height: 16px; }
:root[data-theme="dark"] .rt-round { background: rgba(255, 255, 255, .12); }
.rt-chips { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 6px; }
.rt-chip { display: inline-flex; align-items: center; height: 22px; padding: 0 9px; border-radius: 999px; font-size: 12px; font-weight: 650; }
.rt-chip.warn { background: #fef3c7; color: #92400e; }
.rt-chip.ok { background: #dcfce7; color: #166534; }
:root[data-theme="dark"] .rt-chip.warn { background: rgba(245, 158, 11, .2); color: #fcd34d; }
:root[data-theme="dark"] .rt-chip.ok { background: rgba(34, 197, 94, .2); color: #86efac; }
.rt-seg { margin: 8px 0 8px; padding: 2px; }
.rt-seg button { padding: 5px 2px; font-size: 12px; }
.rt-start { height: 42px; font-size: 16px; }
.rt-start svg { width: 18px; height: 18px; }
.rt-tools { display: flex; gap: 4px; margin-top: 6px; }
.rt-tool { flex: 1; border: 0; background: none; color: var(--ink); display: flex; flex-direction: column; align-items: center; gap: 2px; padding: 4px 0 2px; font-size: 11.5px; font-weight: 600; border-radius: 10px; }
.rt-tool:active { background: rgba(15, 23, 42, .08); }
.rt-tool svg { width: 20px; height: 20px; color: var(--accent); }
.rt-navbar { display: flex; align-items: center; gap: 8px; }
.rt-navinfo { flex: 1; min-width: 0; display: flex; align-items: baseline; gap: 8px; }
.rt-eta { font: 700 26px/1 var(--display, inherit); }
.rt-rem { font-size: 13px; font-weight: 600; color: var(--muted); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
body.route-nav #topbar { display: none; }
#routeNav {
  position: fixed; z-index: 1001; left: 10px; right: 10px; top: calc(var(--safe-t) + 8px);
  background: #0f5f78; color: #fff; border-radius: 16px; padding: 10px 14px; box-shadow: var(--shadow);
}
#routeNav[hidden] { display: none; }
.rtn { display: flex; align-items: center; gap: 12px; }
.rtn-ic { flex: none; width: 46px; height: 46px; border-radius: 12px; background: rgba(255, 255, 255, .18); display: flex; align-items: center; justify-content: center; }
.rtn-ic svg { width: 28px; height: 28px; }
.rtn-main { min-width: 0; flex: 1; }
.rtn-dist { font: 700 30px/1 var(--display, inherit); }
.rtn-txt { font-size: 15px; font-weight: 700; line-height: 1.25; margin-top: 2px; }
.rtn-now { font-size: 12px; opacity: .8; margin-top: 2px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.rt-chev { pointer-events: none; }
/* Arrowheads along the route, like a navigation app (public #17): filled, white-edged, big enough to see in the sun. */
.rt-chev svg { position: absolute; left: -11px; top: -11px; width: 22px; height: 22px; fill: #0e7490; stroke: #fff; stroke-width: 2.2; stroke-linejoin: round; filter: drop-shadow(0 1px 2px rgba(0, 0, 0, .45)); }
.rt-chev.now svg { fill: #0b5a70; }
.rt-journey { margin: 10px 0 6px; padding-top: 10px; border-top: 1px solid var(--line); }
.rt-journey h3 { margin: 0 0 2px; font-size: 15px; }
.rt-picks { display: flex; flex-wrap: wrap; gap: 6px; margin: 8px 0; }
.rt-pick { border: 0; border-radius: 999px; height: 32px; padding: 0 12px; background: var(--soft, #eef2f6); color: var(--ink); font-size: 13px; font-weight: 650; display: inline-flex; align-items: center; gap: 5px; max-width: 100%; }
.rt-pick svg { width: 14px; height: 14px; flex: none; }
.rt-pick.on { background: var(--accent); color: #fff; }
.rt-step { display: flex; align-items: center; justify-content: center; gap: 14px; margin: 4px 0 10px; font-size: 15px; }
.rt-step .rt-round { width: 36px; height: 36px; font-size: 22px; }
.rt-jmsg { margin: 10px 0 6px; padding: 8px 10px; border-radius: 10px; background: #fef3c7; color: #92400e; font-size: 13px; font-weight: 550; }
:root[data-theme="dark"] .rt-jmsg { background: rgba(245, 158, 11, .2); color: #fcd34d; }
.rt-stops { list-style: none; margin: 4px 0 2px; padding: 0; }
.rt-stops li { display: flex; align-items: center; gap: 6px; padding: 3px 0; }
.rt-stops i { flex: none; width: 20px; height: 20px; border-radius: 50%; background: #0e7490; color: #fff; font: 700 11px/20px var(--display, inherit); text-align: center; font-style: normal; }
.rt-stops span { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.rt-stops button { flex: none; width: 28px; height: 26px; border: 0; border-radius: 7px; background: rgba(15, 23, 42, .06); font-weight: 700; color: var(--ink); }
.rt-stops button:disabled { opacity: .3; }
.rt-stops button svg { width: 13px; height: 13px; }
.rt-mk div { transform: translate(-50%, -50%); width: 24px; height: 24px; border-radius: 50%; background: #0e7490; color: #fff; border: 2.5px solid #fff; box-shadow: 0 1px 4px rgba(0, 0, 0, .35); font: 700 12px/19px system-ui, sans-serif; text-align: center; }
.rt-leg .title { font-weight: 700; }
.route-card { display: flex; align-items: center; gap: 10px; cursor: pointer; padding: 2px 0; min-width: 220px; }
.route-card .rt-ic { flex: none; width: 34px; height: 34px; border-radius: 10px; background: rgba(14, 116, 144, .14); color: #0e7490; display: flex; align-items: center; justify-content: center; }
.route-card .rt-ic svg { width: 20px; height: 20px; }
.route-card b { display: block; font-size: 14px; }
.route-card .btn { flex: none; }
.msg.mine .route-card .rt-ic { background: rgba(255, 255, 255, .22); color: #fff; }
@media (orientation: landscape) and (max-height: 600px) and (min-aspect-ratio: 3/2) {
  #routeBar { left: calc(var(--rail) + 10px); bottom: calc(10px + var(--sbx)); max-height: 70vh; }
}
@media (min-width: 900px) and (min-height: 601px) {
  body.sheet-open #routeBar { display: block; left: calc(var(--panel) + 24px); }
}

/* ---- Dark mode (public #61): the same app at night. One set of variables plus the few light spots that were
   written as fixed colours; the map itself stays as it is, only a little dimmer so it doesn't glare.
   The theme is resolved on <html data-theme> before the first paint (index.html) from Preferences, Appearance:
   Auto follows the phone. */
:root[data-theme="dark"] {
  --ink: #e6edf5;
  --ink-2: #b9c5d4;
  --muted: #8c9bb0;
  --line: rgba(255, 255, 255, .1);
  --bg: #0c1422;
  --card: #152033;
  --soft: #1c2840;
  --accent: #6b9bff;
  --accent-soft: rgba(107, 155, 255, .18);
  --adv: #e2e8f0;
  --glass: rgba(21, 32, 51, .84);
  --shadow: 0 1px 2px rgba(0, 0, 0, .4), 0 8px 24px rgba(0, 0, 0, .45);
  color-scheme: dark;
}
:root[data-theme="dark"] .seg, :root[data-theme="dark"] .pl-chip { background: #1c2840; }
:root[data-theme="dark"] .seg button.on { background: #2a3955; color: var(--ink); box-shadow: 0 1px 3px rgba(0, 0, 0, .4); }
:root[data-theme="dark"] .btn.light, :root[data-theme="dark"] #shotBusy > div { background: #1f2c45; color: var(--ink); box-shadow: inset 0 0 0 1px rgba(255, 255, 255, .1); }
:root[data-theme="dark"] .field input, :root[data-theme="dark"] .field select, :root[data-theme="dark"] .field textarea,
:root[data-theme="dark"] .inline input, :root[data-theme="dark"] .composer-row input { background: #101a2c; border-color: #2a3955; color: var(--ink); }
:root[data-theme="dark"] .st-open, :root[data-theme="dark"] .loc-pill.on, :root[data-theme="dark"] .pill.src-public { background: rgba(34, 197, 94, .18); color: #86efac; }
:root[data-theme="dark"] .st-closed { background: rgba(239, 68, 68, .18); color: #fca5a5; }
:root[data-theme="dark"] .st-queue { background: rgba(245, 158, 11, .18); color: #fcd34d; }
:root[data-theme="dark"] .chip-warn { background: rgba(245, 158, 11, .18); color: #fcd34d; }
:root[data-theme="dark"] .leaflet-tile-pane { filter: brightness(.82) contrast(1.05); }
:root[data-theme="dark"] .leaflet-container { background: #0c1422; }
.theme-seg { margin: 8px 0 2px; max-width: 260px; }
.theme-seg { margin: 8px 0 2px; max-width: 260px; }
:root[data-theme="dark"] .btn { color: #0c1422; } /* the main button is the light ink on dark */
:root[data-theme="dark"] .btn.red, :root[data-theme="dark"] .btn.green { color: #fff; }
:root[data-theme="dark"] .chip { background: rgba(21, 32, 51, .94); box-shadow: 0 0 0 1px rgba(255, 255, 255, .08), 0 1px 3px rgba(0, 0, 0, .4); }
:root[data-theme="dark"] #tabbar { background: rgba(21, 32, 51, .95); box-shadow: 0 0 0 1px rgba(255, 255, 255, .08), 0 6px 20px rgba(0, 0, 0, .5); }
/* The map stays a light map: its labels and markers keep the light colours */
:root[data-theme="dark"] .leaflet-container, :root[data-theme="dark"] .maplibregl-map { --ink: #0f172a; --ink-2: #334155; --muted: #64748b; --card: #ffffff; --soft: #f1f5f9; --line: rgba(15, 23, 42, .08); color: #0f172a; }
.comment-seg { margin-top: 8px; max-width: 280px; }

/* Live from my camera (public #31): a red ring and a LIVE tag on the marker, a card in the chat */
.crew-mk.live div { box-shadow: 0 0 0 3px #e11d48, 0 0 0 7px rgba(225, 29, 72, .25), 0 2px 6px rgba(0, 0, 0, .3); animation: livering 1.8s ease-in-out infinite; }
.me-mk.live div, .me-mk.live.has-face div { box-shadow: 0 0 0 3px #e11d48, 0 0 0 7px rgba(225, 29, 72, .25), 0 1px 4px rgba(0, 0, 0, .3); animation: livering 1.8s ease-in-out infinite; }
@keyframes livering { 50% { box-shadow: 0 0 0 3px #e11d48, 0 0 0 11px rgba(225, 29, 72, .08), 0 2px 6px rgba(0, 0, 0, .3); } }
.live-tag { position: absolute; left: 0; top: -34px; transform: translateX(-50%); font-style: normal; font: 800 9.5px/1 var(--display, inherit); letter-spacing: .06em;
  color: #fff; background: #e11d48; padding: 3px 6px; border-radius: 6px; box-shadow: 0 1px 3px rgba(0, 0, 0, .35); pointer-events: none; }
.me-mk.has-face .live-tag { top: -40px; }
.stream-card { display: grid; gap: 4px; min-width: 200px; }
.stream-card .stream-head { display: flex; align-items: center; gap: 6px; font-weight: 700; }
.stream-card .stream-head svg { width: 18px; height: 18px; flex: none; }
.stream-card .stream-title { overflow-wrap: anywhere; }
.stream-card .stream-row { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; padding-top: 2px; }
.stream-card.ended { opacity: .7; }
.stream-card .stream-live { display: inline-flex; align-items: center; gap: 6px; }
.stream-card .stream-live .loc-dot { background: #e11d48; box-shadow: 0 0 0 3px rgba(225, 29, 72, .25); }
.msg.mine .stream-card a, .msg.mine .stream-card .small { color: #fff; }
.stream-help { margin: 6px 0 2px; padding-left: 16px; }
.stream-help li { margin-bottom: 3px; }
#lsKind { min-height: 1.3em; margin: -4px 0 6px; }
/* Languages (public #34): German words are long and Russian ones wide. The text hyphenates (html has lang="de"/"ru"),
   and small buttons, segmented controls and tabs wrap to a second line instead of overflowing or scrolling. */
:root:lang(de), :root:lang(ru) { -webkit-hyphens: auto; hyphens: auto; }
:root:lang(de) input, :root:lang(ru) input, :root:lang(de) textarea, :root:lang(ru) textarea { hyphens: manual; }
:root:lang(de) .btn, :root:lang(ru) .btn { white-space: normal; line-height: 1.05; text-align: center; overflow-wrap: break-word; }
/* A row of buttons wraps by whole labels: "anywhere" let flex: 1 squeeze them to one letter per line. */
:root:lang(de) .btns > .btn, :root:lang(ru) .btns > .btn { flex: 1 1 auto; }
:root:lang(de) .btn.small, :root:lang(ru) .btn.small { padding: 0 8px; font-size: 12.5px; }
:root:lang(de) .seg button, :root:lang(ru) .seg button { white-space: normal; line-height: 1.1; padding: 5px 4px; min-width: 0; overflow-wrap: anywhere; }
/* The Preferences tabs: six in a row. Each takes its word's width and long words break only at their soft hyphens
   (the dictionary marks them: Mit-tei-lun-gen), never mid-syllable. */
:root:lang(de) .prof-tabs button, :root:lang(ru) .prof-tabs button { flex: 1 1 auto; min-width: auto; font-size: 12px; padding: 5px 3px; overflow-wrap: normal; -webkit-hyphens: manual; hyphens: manual; }
:root:lang(de) .chip-btn, :root:lang(ru) .chip-btn, :root:lang(de) .badge-chip, :root:lang(ru) .badge-chip { white-space: normal; text-align: center; }
:root:lang(de) #tabbar button, :root:lang(ru) #tabbar button { min-width: 0; font-size: 10px; line-height: 1.05; text-align: center; overflow-wrap: anywhere; }
:root:lang(de) .pill, :root:lang(ru) .pill { white-space: nowrap; }

/* ---- crew call (public #23) ---- */
.callbar { display: flex; align-items: center; justify-content: space-between; gap: 8px; margin: 10px 0 2px; padding: 6px 8px 6px 12px; border-radius: 14px; background: var(--card); box-shadow: inset 0 0 0 1px var(--line); }
.callbar.on { background: #dcfce7; box-shadow: none; }
.callppl { display: flex; flex-wrap: wrap; gap: 6px; min-width: 0; }
.callp { display: inline-flex; align-items: center; gap: 5px; font-size: 13px; font-weight: 650; color: #14532d; padding: 3px 9px; border-radius: 999px; background: rgba(255, 255, 255, .7); }
.callp.wait { opacity: .55; }
.callmic { width: 8px; height: 8px; border-radius: 50%; background: #9ca3af; flex: none; transition: background .12s, box-shadow .12s; }
.callp.speaking .callmic { background: #16a34a; box-shadow: 0 0 0 4px rgba(22, 163, 74, .3); }
.callbtns { display: flex; gap: 6px; flex: none; }
:root[data-theme="dark"] .callbar.on { background: rgba(34, 197, 94, .16); }
:root[data-theme="dark"] .callp { color: #bbf7d0; background: rgba(255, 255, 255, .08); }
.pp-side { display: inline-flex; gap: 6px; align-items: center; flex-wrap: wrap; justify-content: flex-end; }

/* The one close button everywhere (public #15): the route card uses the dialogs' .modal-x in its header row, and
   Leaflet's own popup close looks the same (round, soft, the same cross centred). */
.rt-head .modal-x { position: static; flex: none; margin-left: auto; }
.leaflet-container a.leaflet-popup-close-button { top: 8px; right: 8px; width: 32px; height: 32px; border-radius: 50%; background: var(--soft); box-shadow: 0 1px 3px rgba(15, 23, 42, .12); display: grid; place-items: center; padding: 0; font-size: 0; color: transparent; }
.leaflet-container a.leaflet-popup-close-button span { display: none; }
.leaflet-container a.leaflet-popup-close-button::before { content: ''; width: 18px; height: 18px; background: var(--ink-2); -webkit-mask: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'><path d='M6.4 5 5 6.4 10.6 12 5 17.6 6.4 19l5.6-5.6 5.6 5.6 1.4-1.4-5.6-5.6L19 6.4 17.6 5 12 10.6 6.4 5Z'/></svg>") center / contain no-repeat; mask: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'><path d='M6.4 5 5 6.4 10.6 12 5 17.6 6.4 19l5.6-5.6 5.6 5.6 1.4-1.4-5.6-5.6L19 6.4 17.6 5 12 10.6 6.4 5Z'/></svg>") center / contain no-repeat; }
/* A connect request's message gets the full width under the name and buttons (public #28). */
.pp-reqrow { flex-wrap: wrap; }
.pp-reqrow .pp-msg { flex-basis: 100%; margin: 6px 0 2px 44px; padding: 8px 10px; border-radius: 10px; background: var(--soft); color: var(--ink-2); white-space: pre-wrap; }
/* Discover (public #16 change request): two tabs, one level switch, the journey as two form fields and one button. */
.rt-lvl { margin-top: 6px; }
.rt-field { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 10px 0; border-bottom: 1px solid var(--line); }
.rt-label { font-weight: 650; color: var(--ink-2); flex: none; }
.rt-select { display: inline-flex; align-items: center; gap: 8px; min-width: 0; max-width: 70%; padding: 7px 10px 7px 12px; border: 1px solid var(--line); border-radius: 12px; background: var(--card, #fff); color: var(--ink); font-weight: 600; }
.rt-select span { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.rt-select svg { width: 16px; height: 16px; flex: none; }
.rt-select[aria-expanded="true"] svg:last-child { transform: rotate(180deg); }
.rt-opts { margin: 4px 0 6px; }
.rt-opt { cursor: pointer; }
.rt-opt.on .title { font-weight: 700; }
.rt-journey .rt-step { padding: 0; }
.rt-journey > .btn.block { margin-top: 12px; }
:root[data-theme="dark"] .rt-select { background: var(--card, #152033); }

/* A round icon button (public #17: the bell sat off centre): the same look as the close button, any line icon centred. */
.icon-btn { flex: none; width: 32px; height: 32px; border: 0; border-radius: 50%; padding: 0; display: grid; place-items: center; background: var(--soft); color: var(--ink-2); box-shadow: 0 1px 3px rgba(15, 23, 42, .12); }
.icon-btn svg { width: 18px; height: 18px; display: block; margin: 0; }
.rt-rem { display: flex; flex-direction: column; line-height: 1.25; white-space: nowrap; }

/* An icon alone in its box sits exactly in the middle (public #18; icons.js soloIcons marks them). */
.i.i-solo { margin: 0; vertical-align: middle; display: block; }
:is(.rt-ic, .rtn-ic, .ico, .icon-btn, .rt-round) { display: grid; place-items: center; }


/* Plans: the resort choice opens the app's resort picker (public #30) */
.pl-pick { width: 100%; border: 0; font: inherit; color: inherit; text-align: left; cursor: pointer; }
.pl-pick .btn { margin-left: auto; pointer-events: none; }
/* Bookings (public #36): the Info tab's way in, the booking sheet and the bookings list. */
.bk-cta { display: flex; align-items: center; gap: 12px; width: 100%; text-align: left; border: 0; border-radius: 14px; padding: 12px 14px; margin: 4px 0 12px; background: var(--card, #fff); box-shadow: inset 0 0 0 1px var(--line, #e5e7eb); color: inherit; }
.bk-cta > span { flex: 1; display: grid; gap: 2px; }
.bk-cta > svg.i { width: 22px; height: 22px; flex: none; color: var(--accent, #2563eb); }
.bk-cta > svg.i:last-child { width: 18px; height: 18px; color: var(--muted, #64748b); }
.bk-where { display: flex; align-items: center; gap: 8px; }
.bk-where b { flex: 1; }
.bk-where svg.i { width: 18px; height: 18px; }
.bk-step { display: flex; align-items: center; gap: 14px; }
.bk-step b { min-width: 22px; text-align: center; font-size: 18px; }
.bk-step .btn svg.i { width: 16px; height: 16px; margin: 0; }
.bk-total { display: flex; justify-content: space-between; align-items: baseline; margin: 8px 0; font-size: 16px; }
.bk-all { display: flex; flex-direction: column; align-items: center; gap: 2px; }
.bk-all .small { opacity: .8; font-weight: 500; }
.bk-card .bk-acts { justify-content: flex-start; margin: 8px 0 0; flex-wrap: wrap; }
.bk-card.bk-focus { box-shadow: inset 3px 0 0 var(--accent, #2563eb); }
.bk-price { display: inline-flex; gap: 6px; align-items: center; }
.bk-price input { width: 96px; }
/* Ratings (public #36): five stars, lit ones filled. */
.stars { display: inline-flex; gap: 1px; vertical-align: -2px; color: #f59e0b; }
.stars svg.i { width: 13px; height: 13px; }
.stars span.on svg.i { fill: currentColor; }
.stars span:not(.on) { color: var(--muted, #94a3b8); }
.bk-rate { display: flex; gap: 10px; justify-content: center; margin: 10px 0 14px; }
.bk-rate button { border: 0; background: none; padding: 4px; color: var(--muted, #94a3b8); }
.bk-rate button.on { color: #f59e0b; }
.bk-rate button svg.i { width: 36px; height: 36px; }
.bk-rate button.on svg.i { fill: currentColor; }
.bk-review { margin-top: 6px; }
.pp-rating { border: 0; background: none; padding: 0; margin-top: 4px; color: inherit; text-align: left; }
.bk-paid { color: #15803d; display: flex; gap: 4px; align-items: center; }
.bk-paid svg.i { width: 14px; height: 14px; }
.bk-card-pay { display: block; text-align: right; }
/* The booking sheet, simpler (public #36): one line for when and who, the free times under each business. */
.bk-kinds { margin-bottom: 10px; overflow: hidden; }
.bk-kinds button { padding-left: 2px; padding-right: 2px; white-space: nowrap; font-size: 13px; }
.bk-summary { display: flex; align-items: center; gap: 10px; width: 100%; text-align: left; border: 0; border-radius: 12px; padding: 10px 12px; background: var(--card, #fff); box-shadow: inset 0 0 0 1px var(--line, #e5e7eb); color: inherit; margin-bottom: 10px; }
.bk-summary > span { flex: 1; display: grid; gap: 1px; }
.bk-summary svg.i { width: 18px; height: 18px; flex: none; color: var(--muted, #64748b); }
.bk-bizrow { display: flex; align-items: center; gap: 10px; width: 100%; }
.bk-biz .row { flex-direction: column; align-items: stretch; gap: 6px; }
.bk-slots { padding: 0 0 2px; }
.bk-slots .chip-btn { font-variant-numeric: tabular-nums; }
.bk-any { margin-bottom: 10px; }
.bk-anyhead { display: flex; flex-direction: column; margin-bottom: 4px; }
.bk-full { padding-left: 50px; }
.bk-wrap { flex-wrap: wrap; overflow: visible; }
.pp-hours { display: grid; grid-template-columns: 1fr 1fr 1fr; gap: 8px; }

/* Feature tips (public #85): one Advanced feature that fits, above the tab's content, until Turn on or Not now. */
.tip-card { display: flex; gap: 10px; align-items: flex-start; margin: 2px 12px 8px; padding: 10px 12px; border-radius: 14px; background: var(--accent-soft, #e8efff); }
.tip-card[hidden] { display: none; }
.tip-ico svg.i { width: 20px; height: 20px; color: var(--accent, #2563eb); margin-top: 2px; }
.tip-main { flex: 1; min-width: 0; }
.tip-title { font-weight: 600; }
.tip-main p { margin: 2px 0 8px; }
.tip-btns { display: flex; gap: 8px; }
.tip-card .pill { font-size: 11px; vertical-align: 1px; }
.tip-card .pill svg.i { width: 11px; height: 11px; }
:root[data-theme="dark"] .tip-card { background: rgba(37, 99, 235, .18); }

/* The user guide (public #88) */
.guide-q { width: 100%; margin: 4px 0 10px; }
.guide-area h3 { margin-bottom: 2px; }
.guide-list { list-style: none; padding: 0; margin: 6px 0 14px; }
.guide-item { padding: 8px 0; border-bottom: 1px solid var(--line, #e5e7eb); }
.guide-item .title { font-weight: 600; }
.guide-item p { margin: 3px 0 0; }
.guide-item .pill { font-size: 11px; margin-left: 4px; }
.guide-item .pill svg.i { width: 11px; height: 11px; }
.guide-item.hl { background: var(--accent-soft, #e8efff); border-radius: 10px; padding-inline: 8px; }
.guide-steps { padding-left: 20px; margin: 6px 0 14px; }
.guide-steps li { margin: 4px 0; }
.guide-link { white-space: nowrap; }
/* Preferences (public #88): the whole description, not one line and three dots; "How it works" always visible. */
.prof-pane .row .sub { white-space: normal; overflow: visible; text-overflow: clip; }
.guide-link { display: inline-block; margin-top: 2px; font-weight: 600; }
/* The user guide, pages (public #88) */
.guide-chs { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; margin: 8px 0 16px; }
.guide-ch { display: flex; flex-direction: column; text-align: left; padding: 0; border: 0; border-radius: 14px; overflow: hidden; background: var(--card, #fff); box-shadow: inset 0 0 0 1px var(--line, #e5e7eb); color: inherit; }
.guide-ch img { width: 100%; height: 96px; object-fit: cover; object-position: top; display: block; }
.guide-ch span { display: grid; gap: 2px; padding: 8px 10px 10px; }
.guide-ch small { color: var(--muted, #64748b); font-size: 12.5px; line-height: 1.3; }
.guide-row { cursor: pointer; }
.guide-row .chev svg.i { width: 16px; height: 16px; color: var(--muted, #64748b); }
.guide-row .pill { font-size: 11px; margin-left: 4px; }
.guide-back { border: 0; background: none; color: var(--accent, #2563eb); font-weight: 600; padding: 0; margin: -4px 0 8px; display: inline-flex; align-items: center; gap: 4px; }
.guide-back svg.i { width: 14px; height: 14px; transform: rotate(90deg); }
.guide-lead { font-size: 15px; margin: 4px 0 10px; }
.guide-where { background: var(--accent-soft, #e8efff); border-radius: 12px; padding: 10px 12px; margin: 8px 0 12px; font-size: 14px; }
.guide-shot { display: block; width: min(260px, 70%); margin: 6px auto 12px; border-radius: 18px; box-shadow: 0 6px 24px rgba(15, 23, 42, .18); }
.guide-steps li, .guide-tips li { margin: 6px 0; line-height: 1.4; }
.guide-tips { padding-left: 20px; }
.guide-chips { display: flex; flex-wrap: wrap; gap: 6px; margin: 6px 0 12px; }
.guide-chips .chip { border: 0; border-radius: 999px; padding: 6px 12px; background: var(--accent-soft, #e8efff); color: inherit; font-weight: 600; font-size: 13px; }
.guide-allh { margin-top: 6px; }
/* The join card's sharing choice (invites, 9 Nov 2026) */
.join-share { margin: 10px 0 12px; }
.join-share .row .sub { white-space: normal; }
/* The sign-in sheet (public server, 20 Nov 2026): the app's own dialog over the map, not a page */
.signin-ways { display: grid; gap: 8px; margin: 6px 0 10px; }
.signin-ways .field { margin: 0 0 2px; }
.signin-ways .btn { text-decoration: none; }
.btn.signin-apple { background: #000; color: #fff; box-shadow: none; }
:root[data-theme="dark"] .btn.signin-apple { background: #fff; color: #000; }
.signin-mail { display: grid; gap: 8px; margin-top: 4px; }
.signin-mail input { width: 100%; height: 44px; border: 1px solid rgba(15, 23, 42, .12); border-radius: 12px; padding: 0 12px; background: #fff; color: var(--ink); outline: none; }
:root[data-theme="dark"] .signin-mail input { background: #101a2c; border-color: #2a3955; }
.signin-err { color: var(--red); margin: 0; }
.signin-card .btn { margin-top: 6px; }
.btns.signin-later { justify-content: center; }
#modal .btns.signin-later > .btn { flex: 0 0 auto; padding: 0 22px; } /* also over the :lang(de|ru) rule */
