/* Revisit.Events - one stylesheet, one set of tokens.
   Principles: flat surfaces with hairline borders, one accent colour, a real type scale, 4px spacing steps,
   shadows only on things that float (menus, dialogs). Light and dark follow the device. */

:root {
  --bg: #101216;          /* page */
  --panel: #171a20;       /* cards, bars */
  --panel2: #1e222a;      /* inputs on cards, hover, chips */
  --line: #292e38;        /* hairlines */
  --line2: #3a414e;       /* stronger borders (hover, focus-less controls) */
  --text: #e8eaee;
  --muted: #9aa2b1;
  --faint: #6f7786;
  --brand: #ff7a45;       /* the one accent */
  --brand2: #ffb36b;
  --brand-ink: #1c0e05;
  --ok: #4cc38a; --warn: #e6b34e; --bad: #ee5f6b; --link: #86b3ff;
  --unread: #2fbf71;
  --r-sm: 6px; --r: 10px;
  --topbar: 52px;
  --shadow-pop: 0 10px 32px rgba(0, 0, 0, .45);
  color-scheme: dark;
}
@media (prefers-color-scheme: light) {
  :root:not([data-theme=dark]) {
    --bg: #f5f4f1; --panel: #ffffff; --panel2: #f1efeb; --line: #e3e0d9; --line2: #cfcbc2;
    --text: #1d1f24; --muted: #5f6572; --faint: #8a909c;
    --brand: #e8571d; --brand2: #ff8a4d; --brand-ink: #ffffff; --link: #1c5fd1; --unread: #1f9d57;
    --shadow-pop: 0 10px 32px rgba(30, 30, 40, .16);
    color-scheme: light;
  }
}

*, *::before, *::after { box-sizing: border-box }
html, body { margin: 0; height: 100% }
body { background: var(--bg); color: var(--text); font: 15px/1.5 system-ui, -apple-system, "Segoe UI", Roboto, sans-serif; -webkit-text-size-adjust: 100%; text-rendering: optimizeLegibility }
a { color: var(--link) }
h1, h2, h3 { margin: 0 0 .5em; line-height: 1.25; font-weight: 650; letter-spacing: -.011em }
h1 { font-size: 1.75rem } h2 { font-size: 1.125rem } h3 { font-size: 1rem }
p { margin: 0 0 .75em }
button, input, select, textarea { font: inherit; color: inherit }
:focus-visible { outline: 2px solid var(--brand); outline-offset: 2px }
.hidden { display: none !important }
.muted { color: var(--muted) } .small { font-size: .85rem }
.num { font-variant-numeric: tabular-nums }
.wrap { max-width: 1080px; margin: 0 auto; padding: 0 20px }

/* ---------- buttons ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 6px; min-height: 36px; padding: 0 14px;
  border: 1px solid var(--line2); background: var(--panel2); color: var(--text); border-radius: var(--r-sm);
  font-weight: 550; font-size: .9rem; line-height: 1.2; cursor: pointer; text-decoration: none; white-space: nowrap;
  transition: background-color .12s, border-color .12s;
}
.btn:hover { border-color: var(--faint) }
.btn:active { transform: translateY(.5px) }
.btn.primary { background: var(--brand); border-color: var(--brand); color: var(--brand-ink) }
.btn.primary:hover { filter: brightness(1.07); border-color: var(--brand) }
.btn.danger { background: var(--bad); border-color: var(--bad); color: #fff }
.btn.small { min-height: 30px; padding: 0 10px; font-size: .82rem; font-weight: 500 }
.btn.ghost { background: transparent; border-color: transparent; color: var(--muted) }
.btn.ghost:hover { background: var(--panel2); color: var(--text) }
.btn[disabled] { opacity: .5; cursor: not-allowed }
.iconbtn { width: 32px; height: 32px; padding: 0; border-radius: var(--r-sm); border: 1px solid var(--line); background: var(--panel2); display: grid; place-items: center; cursor: pointer; color: inherit }
.iconbtn:hover { border-color: var(--faint) }

/* ---------- forms ---------- */
label { display: block; font-size: .82rem; font-weight: 500; color: var(--muted); margin: 12px 0 4px }
input[type=text], input[type=email], input[type=password], input[type=url], input[type=tel], input[type=date], input[type=number], input[type=search], select, textarea {
  width: 100%; min-height: 38px; background: var(--bg); border: 1px solid var(--line2); border-radius: var(--r-sm); padding: 8px 11px; font-size: .95rem;
}
input::placeholder, textarea::placeholder { color: var(--faint) }
input:focus, select:focus, textarea:focus { outline: 2px solid var(--brand); outline-offset: -1px; border-color: var(--brand) }
input:disabled { opacity: .65; cursor: not-allowed }
textarea { min-height: 88px; resize: vertical; line-height: 1.45 }
/* Dropdowns: our own arrow, with room for it - the native one sat hard against the right edge. */
select {
  -webkit-appearance: none; appearance: none; padding-right: 36px; cursor: pointer;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='8' viewBox='0 0 12 8'%3E%3Cpath d='M1 1.5l5 5 5-5' fill='none' stroke='%238a92a1' stroke-width='1.8' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E");
  background-repeat: no-repeat; background-position: right 13px center; background-size: 12px 8px;
}
input[type=range] { padding: 0; min-height: 0 }
.check { display: flex; align-items: center; gap: 8px; margin: 10px 0; font-size: .9rem; color: var(--text); font-weight: 400 }
.check input { width: auto; min-height: 0; accent-color: var(--brand) }
input[type=checkbox] { accent-color: var(--brand); width: 16px; height: 16px }
.sep { display: flex; align-items: center; gap: 10px; color: var(--faint); margin: 16px 0; font-size: .82rem }
.sep::before, .sep::after { content: ""; flex: 1; border-top: 1px solid var(--line) }

/* ---------- layout bits ---------- */
.card { background: var(--panel); border: 1px solid var(--line); border-radius: var(--r); padding: 20px }
.card > h2:first-child { margin-bottom: 14px }
.grid { display: grid; gap: 16px }
.grid.cols { grid-template-columns: repeat(auto-fill, minmax(240px, 1fr)) }
.row { display: flex; gap: 10px; align-items: center; flex-wrap: wrap }
.row > * { flex: 0 0 auto } .row > .grow { flex: 1 1 200px }
.spacer { flex: 1 }
.pill { display: inline-flex; align-items: center; gap: 5px; border: 1px solid var(--line2); border-radius: 99px; padding: 1px 9px; font-size: .75rem; line-height: 1.6; color: var(--muted); white-space: nowrap }
.pill.ok { color: var(--ok); border-color: color-mix(in srgb, var(--ok) 45%, transparent) }
.pill.warn { color: var(--warn); border-color: color-mix(in srgb, var(--warn) 45%, transparent) }
.pill.dot::before { content: ""; width: 6px; height: 6px; border-radius: 50%; background: currentColor }
.badge { display: inline-block; min-width: 18px; padding: 0 6px; border-radius: 99px; background: var(--brand); color: var(--brand-ink); font-size: .7rem; font-weight: 700; line-height: 18px; text-align: center; margin-left: 6px; font-variant-numeric: tabular-nums }
.badge.new { background: var(--unread); color: #fff }
.msg { padding: 9px 12px; border-radius: var(--r-sm); margin: 10px 0; background: var(--panel2); border: 1px solid var(--line); font-size: .9rem }
.msg.err { border-color: color-mix(in srgb, var(--bad) 60%, transparent); color: var(--bad) }
.msg.ok { border-color: color-mix(in srgb, var(--ok) 60%, transparent); color: var(--ok) }
.empty { color: var(--muted); text-align: center; padding: 28px 16px }
table { width: 100%; border-collapse: collapse }
th, td { text-align: left; padding: 8px 10px; border-bottom: 1px solid var(--line); vertical-align: top }
th { color: var(--faint); font-weight: 550; font-size: .76rem; text-transform: uppercase; letter-spacing: .04em }
.avatar { width: 36px; height: 36px; border-radius: 50%; flex: none }
.tabs { display: flex; gap: 2px; border-bottom: 1px solid var(--line); margin-bottom: 12px; overflow-x: auto; scrollbar-width: none }
.tabs::-webkit-scrollbar { display: none }
.tabs button { background: none; border: 0; border-bottom: 2px solid transparent; margin-bottom: -1px; padding: 10px 14px; cursor: pointer; color: var(--muted); font-weight: 550; font-size: .9rem; white-space: nowrap }
.tabs button:hover { color: var(--text) }
.tabs button.on { color: var(--text); border-bottom-color: var(--brand) }

/* ---------- top bar ---------- */
.topbar { display: flex; align-items: center; gap: 8px; min-height: var(--topbar); padding: 8px 16px; background: var(--panel); border-bottom: 1px solid var(--line); position: sticky; top: 0; z-index: 30 }
.topbar .tb-extra { display: flex; align-items: center; gap: 8px; min-width: 0 }
.topbar .tb-right { display: flex; align-items: center; gap: 6px; margin-left: auto }
.topbar input.search { width: 220px; min-height: 34px; padding: 5px 10px }
.topbar select { width: auto; min-height: 34px; padding: 5px 32px 5px 10px }
.logo { display: flex; align-items: center; gap: 9px; font-weight: 750; letter-spacing: -.01em; text-decoration: none; color: var(--text); flex: none }
.logo b { color: var(--brand) } .logo svg { width: 26px; height: 26px }
.tb-link { color: var(--muted); text-decoration: none; font-size: .9rem; font-weight: 500; padding: 6px 8px; border-radius: var(--r-sm) }
.tb-link:hover { color: var(--text); background: var(--panel2) }
.popwrap { position: relative }
.popover { position: absolute; right: 0; top: calc(100% + 8px); width: min(340px, calc(100vw - 24px)); max-height: min(70vh, 520px); overflow: auto; background: var(--panel); border: 1px solid var(--line2); border-radius: var(--r); box-shadow: var(--shadow-pop); z-index: 60; padding: 6px }
.popover .ph { padding: 8px 10px 6px; font-weight: 650; display: flex; justify-content: space-between; align-items: baseline; gap: 10px }
.popover .pi { display: block; padding: 9px 10px; border-radius: var(--r-sm); color: inherit; text-decoration: none; background: none; border: 0; width: 100%; text-align: left; font: inherit; cursor: pointer }
.popover .pi:hover { background: var(--panel2) }
.popover .pi.bad { color: var(--bad) }
.popover .pnote { padding: 8px 10px; color: var(--muted); font-size: .85rem }
.popover hr { border: 0; border-top: 1px solid var(--line); margin: 6px 0 }
.acct { display: inline-flex; align-items: center; gap: 8px; min-height: 34px; padding: 0 8px 0 4px; border: 1px solid var(--line2); border-radius: 99px; background: var(--panel2); cursor: pointer; font-size: .88rem; font-weight: 550 }
.acct:hover { border-color: var(--faint) }
.acct .ini { width: 26px; height: 26px; border-radius: 50%; display: grid; place-items: center; background: var(--brand); color: var(--brand-ink); font-size: .78rem; font-weight: 700 }
.acct .nm { max-width: 140px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap }
.acct svg { width: 10px; height: 10px; color: var(--faint) }

/* ---------- toast + dialogs ---------- */
.toast { position: fixed; left: 50%; bottom: calc(20px + env(safe-area-inset-bottom)); transform: translateX(-50%); background: var(--panel); border: 1px solid var(--line2); border-left: 3px solid var(--brand); padding: 10px 16px; border-radius: var(--r-sm); z-index: 120; box-shadow: var(--shadow-pop); max-width: min(92vw, 460px); font-size: .9rem }
.toast.err { border-left-color: var(--bad) }
.modal-back { position: fixed; inset: 0; background: rgba(6, 8, 12, .62); display: flex; align-items: center; justify-content: center; z-index: 110; padding: 16px }
.modal { background: var(--panel); border: 1px solid var(--line2); border-radius: 12px; padding: 22px; width: min(420px, 100%); box-shadow: var(--shadow-pop); max-height: 92vh; overflow: auto }
.modal h3 { font-size: 1.05rem }
dialog { background: var(--panel); color: var(--text); border: 1px solid var(--line2); border-radius: 12px; padding: 20px; max-width: min(520px, 94vw); box-shadow: var(--shadow-pop) }
dialog::backdrop { background: rgba(6, 8, 12, .62) }
.menu { position: absolute; right: 0; top: calc(100% + 6px); background: var(--panel); border: 1px solid var(--line2); border-radius: var(--r); padding: 5px; min-width: 200px; z-index: 20; box-shadow: var(--shadow-pop) }
.menu button { display: flex; gap: 8px; align-items: center; width: 100%; text-align: left; background: none; border: 0; color: inherit; padding: 9px 10px; border-radius: var(--r-sm); cursor: pointer }
.menu button:hover { background: var(--panel2) } .menu button.bad { color: var(--bad) }
.kebab { width: 32px; height: 32px; border-radius: var(--r-sm); border: 1px solid var(--line); background: var(--panel2); font-size: 1.1rem; line-height: 1; cursor: pointer; display: grid; place-items: center }
.kebab:hover { border-color: var(--faint) }

/* page rhythm: cards and section headings on the account pages */
main.wrap > .card, main.wrap > section.card { margin-bottom: 16px }
main.wrap > h2 { margin: 28px 0 12px }

/* ---------- landing ---------- */
.hero { padding: 64px 0 32px; max-width: 720px }
.hero h1 { font-size: clamp(1.9rem, 4.6vw, 2.9rem); letter-spacing: -.025em; line-height: 1.12; margin-bottom: .45em }
.hero p { color: var(--muted); font-size: 1.08rem; max-width: 56ch }
.ev-card { display: flex; flex-direction: column; gap: 6px; text-decoration: none; color: inherit; transition: border-color .12s }
.ev-card:hover { border-color: var(--line2) }
.ev-card h3 { margin: 0; font-size: 1.05rem }

/* ---------- sign in ---------- */
.auth { max-width: 440px; margin: 32px auto; padding: 24px }
.roles { display: grid; grid-template-columns: repeat(auto-fit, minmax(120px, 1fr)); gap: 8px }
.role { border: 1px solid var(--line2); background: var(--panel2); border-radius: var(--r-sm); padding: 10px; cursor: pointer; font-size: .82rem; color: var(--muted) }
.role b { display: block; font-size: .92rem; color: var(--text); margin-bottom: 2px }
.role.on { border-color: var(--brand); box-shadow: inset 0 0 0 1px var(--brand) }

/* ---------- event page ---------- */
body.ev #app { display: flex; flex-direction: column; height: 100vh; height: 100dvh; min-height: 0 }
.ev-main { flex: 1; display: flex; min-height: 0; position: relative }
#map { flex: 1; min-width: 0; position: relative; background: #e9edf5 }
#map svg.floor { width: 100%; height: 100%; display: block }
#side { width: 380px; background: var(--panel); border-left: 1px solid var(--line); display: flex; flex-direction: column; min-height: 0 }
#side .tabs { margin: 0; padding: 0 8px; flex: none }
#side .pane { flex: 1; overflow: auto; padding: 16px; min-height: 0 }
.sheet-handle { display: none }
.where { position: absolute; left: 12px; top: 12px; background: var(--panel); color: var(--text); border: 1px solid var(--line2); padding: 6px 12px; border-radius: var(--r-sm); font-weight: 600; font-size: .88rem; z-index: 5; max-width: calc(100% - 80px); box-shadow: 0 2px 10px rgba(0, 0, 0, .25) }
.mapbtns { position: absolute; right: 12px; bottom: 12px; display: flex; flex-direction: column; gap: 6px; z-index: 5 }
.mapbtns .btn { min-height: 36px; min-width: 36px; padding: 0 }
.booth-on { stroke: #ff7a45 !important; stroke-width: 2.2 !important }
.booth-known { cursor: pointer }
.rv-pulse { fill: none; stroke: #ff7a45; transform-box: fill-box; transform-origin: center; animation: rvpulse 1.6s ease-out infinite; pointer-events: none }
@keyframes rvpulse { 0% { transform: scale(1); opacity: .95 } 100% { transform: scale(3.4); opacity: 0 } }
.rv-blink { animation: rvblink 1s ease-in-out infinite }
@keyframes rvblink { 0%, 100% { stroke-opacity: 1 } 50% { stroke-opacity: .25 } }
#rv-avatar.drag .rv-pulse { animation-duration: .9s }
@media (prefers-reduced-motion: reduce) { .rv-pulse, .rv-blink { animation: none } .rv-pulse { opacity: .5 } }
#rv-avatar { cursor: grab; touch-action: none } #rv-avatar.drag { cursor: grabbing }

/* ---------- chat (shared by the map and the console) ---------- */
.chat-head { display: flex; align-items: center; gap: 10px; flex-wrap: nowrap; margin-bottom: 10px; position: relative }
.chat-head .ttl { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-weight: 650 }
.chatbox { display: flex; flex-direction: column; height: 100%; min-height: 0 }
.msgs { flex: 1; overflow: auto; display: flex; flex-direction: column; gap: 6px; padding: 4px 2px 10px }
.bub { max-width: 82%; padding: 8px 12px; border-radius: 14px 14px 14px 4px; background: var(--panel2); border: 1px solid var(--line); white-space: pre-wrap; overflow-wrap: anywhere; font-size: .92rem }
.bub.me { align-self: flex-end; background: var(--brand); border-color: var(--brand); color: var(--brand-ink); border-radius: 14px 14px 4px 14px }
.bub .who { font-size: .72rem; font-weight: 650; opacity: .72; margin-bottom: 1px }
.bub .t { display: block; font-size: .68rem; opacity: .65; margin-top: 2px; font-variant-numeric: tabular-nums }
.bub.sys { align-self: center; background: none; border: 0; color: var(--muted); font-size: .82rem; text-align: center }
.composer { display: flex; gap: 8px; padding-top: 10px; border-top: 1px solid var(--line); align-items: flex-end }
.composer textarea { min-height: 40px; height: 40px; max-height: 120px; padding-top: 9px }
.typing { font-size: .8rem; color: var(--muted); padding: 2px 12px 6px; min-height: 1.2em }
.typing .dots { display: inline-flex; gap: 3px; margin-left: 5px; vertical-align: middle }
.typing .dots i { width: 4px; height: 4px; border-radius: 50%; background: var(--muted); animation: rvdot 1.2s infinite ease-in-out }
.typing .dots i:nth-child(2) { animation-delay: .2s } .typing .dots i:nth-child(3) { animation-delay: .4s }
@keyframes rvdot { 0%, 60%, 100% { opacity: .25; transform: translateY(0) } 30% { opacity: 1; transform: translateY(-3px) } }
.blocked-card { border: 1px solid color-mix(in srgb, var(--bad) 40%, transparent); background: color-mix(in srgb, var(--bad) 8%, transparent); border-radius: var(--r); padding: 14px; display: flex; flex-direction: column; gap: 10px }
.blocked-card b { color: var(--bad) }
.li { display: flex; gap: 10px; align-items: center; padding: 9px 10px; border-radius: var(--r-sm); cursor: pointer; border: 1px solid transparent }
.li:hover { background: var(--panel2) } .li.on { background: var(--panel2); border-color: var(--line2) }
.li .grow { min-width: 0 } .li .nm { font-weight: 600; white-space: nowrap; overflow: hidden; text-overflow: ellipsis }
.li .sub { font-size: .8rem; color: var(--muted); white-space: nowrap; overflow: hidden; text-overflow: ellipsis }
.li.unread .nm, .li.unread .sub { color: var(--text) } .li.unread .sub { font-weight: 600 }
.modal-frame { position: fixed; inset: 0; background: rgba(6, 8, 12, .7); z-index: 50; display: flex; align-items: center; justify-content: center; padding: 3vh 3vw }
.modal-frame > div { background: var(--panel); width: min(1000px, 100%); height: min(92vh, 100%); border-radius: 12px; overflow: hidden; display: flex; flex-direction: column; border: 1px solid var(--line2) }
.modal-frame header { display: flex; gap: 10px; align-items: center; padding: 8px 12px; border-bottom: 1px solid var(--line) }
.modal-frame iframe { flex: 1; border: 0; background: #fff }

/* ---------- booth console ---------- */
body.cons #app { display: flex; flex-direction: column; height: 100vh; height: 100dvh; min-height: 0 }
body.cons .console { flex: 1; min-height: 0; height: auto }
.console { display: grid; grid-template-columns: 290px minmax(0, 1fr) 330px; height: calc(100vh - var(--topbar)); height: calc(100dvh - var(--topbar)) }
.console > section { border-right: 1px solid var(--line); min-height: 0; display: flex; flex-direction: column; background: var(--panel) }
.console > section:last-child { border-right: 0 }
.console .scroll { overflow: auto; flex: 1; padding: 10px }
.console .tabs { margin: 0; padding: 0 8px }
.console-tabs { display: none }
.heat { width: 100%; -webkit-appearance: none; appearance: none; height: 8px; border-radius: 99px; border: 0; margin: 10px 0 4px; cursor: pointer; background: linear-gradient(90deg, #4aa8ff, #ffd24a, #ff5d3a) }
.heat::-webkit-slider-thumb { -webkit-appearance: none; appearance: none; width: 20px; height: 20px; border-radius: 50%; background: #fff; border: 3px solid #20242d; box-shadow: 0 1px 4px rgba(0, 0, 0, .5) }
.heat::-moz-range-thumb { width: 16px; height: 16px; border-radius: 50%; background: #fff; border: 3px solid #20242d }
.heat::-moz-range-track { background: transparent }

/* ---------- pricing (one clean rate card per plan) ---------- */
.pricing { max-width: 920px; margin: 0 auto; padding: 8px 20px 64px }
.pricing-hero { padding: 36px 0 24px }
.pricing-hero h1 { margin: 0 0 6px }
.pricing-hero p { margin: 0; color: var(--muted) }
.plan-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(340px, 100%), 1fr)); gap: 16px; align-items: start }
.plan-card { background: var(--panel); border: 1px solid var(--line); border-radius: var(--r); padding: 22px }
.plan-card.mine { border-color: var(--brand); box-shadow: inset 0 0 0 1px var(--brand) }
.plan-card header { display: flex; align-items: baseline; justify-content: space-between; gap: 10px; flex-wrap: wrap }
.plan-card h2 { margin: 0; font-size: 1.3rem }
.plan-badge { font-size: .72rem; font-weight: 650; color: var(--brand) }
.plan-desc { color: var(--muted); margin: 6px 0 0 }
.plan-valid { margin: 8px 0 0; font-size: .85rem; color: var(--muted) } .plan-valid b { color: var(--text) }
.plan-stats { margin-top: 16px }
.plan-stat { border: 1px solid var(--line); border-radius: var(--r-sm); padding: 10px 12px; display: grid; gap: 2px }
.plan-stat span { font-size: .72rem; text-transform: uppercase; letter-spacing: .05em; color: var(--faint) }
.plan-stat b { font-size: 1.6rem; line-height: 1.1; font-variant-numeric: tabular-nums } .plan-stat small { color: var(--muted); font-size: .78rem }
.plan-sub { margin: 22px 0 8px; font-size: .72rem; font-weight: 650; text-transform: uppercase; letter-spacing: .06em; color: var(--faint) }
.plan-costs { list-style: none; margin: 0; padding: 0; border-top: 1px solid var(--line) }
.plan-costs li { display: flex; align-items: baseline; gap: 12px; padding: 12px 0; border-bottom: 1px solid var(--line) }
.plan-what { flex: 1; min-width: 0; display: grid } .plan-what small { color: var(--muted); font-size: .78rem }
.plan-price { flex: none; text-align: right; display: grid; line-height: 1.2 }
.plan-price b { font-size: 1.25rem; font-variant-numeric: tabular-nums } .plan-price small { font-size: .72rem; color: var(--muted) }
.plan-free { display: flex; flex-wrap: wrap; gap: 6px }
.plan-free span { font-size: .8rem; color: var(--muted); border: 1px solid var(--line); border-radius: 99px; padding: 3px 11px }
.plan-allfree { margin: 16px 0 0; color: var(--ok) }

/* ====================================================== responsive ====================================================== */
@media (max-width: 980px) {
  /* console: one panel at a time, switched by a tab bar (People / Chat / Lead) */
  .console { grid-template-columns: 1fr; grid-template-rows: auto minmax(0, 1fr) }
  .console-tabs { display: flex; border-bottom: 1px solid var(--line); background: var(--panel) }
  .console-tabs button { flex: 1; background: none; border: 0; border-bottom: 2px solid transparent; padding: 12px 8px; font-weight: 600; font-size: .9rem; color: var(--muted); cursor: pointer }
  .console-tabs button.on { color: var(--text); border-bottom-color: var(--brand) }
  .console > section { display: none; border-right: 0 }
  .console[data-pane=left] > section.s-left, .console[data-pane=mid] > section.s-mid, .console[data-pane=right] > section.s-right { display: flex }
}
@media (max-width: 820px) {
  /* event page: the map fills the screen and the side panel becomes a bottom sheet */
  .ev-main { flex-direction: column }
  #map { flex: 1 1 auto }
  #side { width: 100%; height: 52%; max-height: 80%; border-left: 0; border-top: 1px solid var(--line); border-radius: 14px 14px 0 0; box-shadow: 0 -8px 24px rgba(0, 0, 0, .25); position: relative; z-index: 10 }
  #side.sheet-min { height: 96px }
  .sheet-handle { display: block; flex: none; width: 100%; height: 20px; background: none; border: 0; cursor: pointer; padding: 0; position: relative }
  .sheet-handle::after { content: ""; position: absolute; left: 50%; top: 8px; width: 38px; height: 4px; margin-left: -19px; border-radius: 4px; background: var(--line2) }
  #side .pane { padding: 12px 16px calc(16px + env(safe-area-inset-bottom)) }
  .where { max-width: calc(100% - 24px) }
  .mapbtns { bottom: 12px }
  .wrap { padding: 0 16px }
}
@media (max-width: 640px) {
  body { font-size: 15px }
  h1 { font-size: 1.5rem }
  .topbar { flex-wrap: wrap; padding: 8px 12px; gap: 8px 6px }
  .topbar .tb-extra { order: 5; flex: 1 0 100%; }
  .topbar .tb-extra .search { flex: 1; width: auto }
  .logo span { display: none }
  .tb-link { display: none }
  .acct .nm, .acct svg { display: none } .acct { padding: 0 4px }
  .hide-sm { display: none }
  .btn { min-height: 40px } .btn.small { min-height: 34px }
  input[type=text], input[type=email], input[type=password], input[type=url], input[type=tel], input[type=date], input[type=number], input[type=search], select, textarea { min-height: 42px; font-size: 16px } /* 16px stops iOS zooming into fields */
  .card { padding: 16px }
  .hero { padding: 40px 0 20px }
  .auth { margin: 16px auto; padding: 18px }
  .plan-card { padding: 18px }
  .modal { padding: 18px }
  .modal-back { align-items: flex-end; padding: 0 }
  .modal { border-radius: 14px 14px 0 0; width: 100%; padding-bottom: calc(18px + env(safe-area-inset-bottom)) }
  .bub { max-width: 90% }
}
