/* The member portal in Cordwyn's look: Inter, slate, white cards, the shul's navy. */
:root {
  --navy: #0d1f45;
  --ink: #0f172a;        /* slate-900 */
  --text: #334155;       /* slate-700 */
  --muted: #64748b;      /* slate-500 */
  --line: #e2e8f0;       /* slate-200 */
  --soft: #f8fafc;       /* slate-50 */
  --accent: #2563eb;     /* blue-600 */
  --good: #047857; --good-bg: #ecfdf5;
  --warn: #b45309; --warn-bg: #fffbeb;
  --bad: #be123c;  --bad-bg: #fff1f2;
  /* The site's brand names, for the seat map (seating.css), on Cordwyn's palette. */
  --parchment: #ffffff;
  --parchment-deep: #f1f5f9;
  --slate: #334155;
  --slate-soft: #64748b;
  --keyline: #e2e8f0;
  --keyline-strong: #cbd5e1;
  --flag-high: #be123c;
  --gold-ink: #8a6a12;
  --radius: 8px;
  --sans: 'Inter', system-ui, -apple-system, 'Segoe UI', Roboto, sans-serif;
  --hebrew: 'Frank Ruhl Libre', 'Times New Roman', serif;
}
* { box-sizing: border-box; }
html, body { margin: 0; }
body { background: var(--soft); color: var(--text); font: 15px/1.5 'Inter', system-ui, -apple-system, 'Segoe UI', Roboto, sans-serif; -webkit-font-smoothing: antialiased; }
a { color: var(--accent); }
[hidden] { display: none !important; }

.bar { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 12px 20px; padding-top: max(12px, env(safe-area-inset-top)); padding-left: max(20px, env(safe-area-inset-left)); padding-right: max(20px, env(safe-area-inset-right)); background: var(--navy); color: #fff; }
.brand { display: inline-flex; align-items: center; gap: 10px; color: #fff; text-decoration: none; font-weight: 800; letter-spacing: -0.01em; }
.brand .mark { width: 32px; height: auto; filter: brightness(0) invert(1); }
.who { display: flex; align-items: center; gap: 12px; font-size: 13px; color: #cbd5e1; }

.banner { background: var(--warn-bg); color: var(--warn); border-bottom: 1px solid #fde68a; padding: 10px 20px; font-size: 13px; }

.wrap { max-width: 960px; margin: 0 auto; padding: 24px 16px 64px; }
.center { text-align: center; }

.card { background: #fff; border: 1px solid var(--line); border-radius: 16px; padding: 20px; }
.card--narrow { max-width: 420px; margin: 32px auto 0; }
.card--wide { grid-column: 1 / -1; }
.grid { display: grid; gap: 16px; grid-template-columns: repeat(auto-fit, minmax(280px, 1fr)); }

h1 { margin: 0 0 4px; font-size: 22px; font-weight: 900; color: var(--ink); letter-spacing: -0.02em; }
h2 { margin: 0 0 12px; font-size: 14px; font-weight: 900; color: var(--ink); }
.eyebrow { margin: 0; font-size: 10px; font-weight: 900; letter-spacing: 0.12em; text-transform: uppercase; color: #94a3b8; }
.head { display: flex; align-items: flex-end; justify-content: space-between; gap: 12px; margin-bottom: 16px; flex-wrap: wrap; }
.muted { color: var(--muted); margin: 0 0 12px; }
.small { font-size: 12px; }
.hint { font-weight: 500; color: #94a3b8; text-transform: none; letter-spacing: 0; }

.form-stack { display: grid; gap: 12px; }
.row { display: flex; gap: 8px; margin-top: 8px; }
.row input { flex: 1; }
label { display: grid; gap: 4px; font-size: 10px; font-weight: 900; letter-spacing: 0.12em; text-transform: uppercase; color: #94a3b8; }
input { width: 100%; font: inherit; font-size: 14px; font-weight: 500; color: var(--ink); background: #fff; border: 1px solid var(--line); border-radius: 10px; padding: 9px 12px; text-transform: none; letter-spacing: 0; }
input:focus { outline: none; border-color: #60a5fa; box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.2); }

.btn { display: inline-flex; align-items: center; justify-content: center; font: inherit; font-size: 13px; font-weight: 700; border-radius: 10px; padding: 9px 14px; border: 1px solid var(--line); background: #fff; color: var(--text); cursor: pointer; text-decoration: none; }
.btn:hover { background: var(--soft); }
.btn:disabled { opacity: 0.5; cursor: default; }
.btn--primary { background: var(--navy); border-color: var(--navy); color: #fff; }
.btn--primary:hover { background: #162d5e; }
.btn--link { border: 0; background: none; color: var(--accent); padding: 4px 0; font-weight: 600; justify-self: start; }
/* A link-button inside a sentence ("New here? Create an account"). */
.btn--inline { display: inline; padding: 0; font-size: inherit; min-height: 0; cursor: pointer; }
.signup-ask { margin: 18px 0 0; padding-top: 16px; border-top: 1px solid var(--line); display: grid; gap: 8px; text-align: center; }
.signup-ask p { margin: 0; }
.btn--wide { width: 100%; }
.btn--ghost { background: transparent; }
.btn--onbar { color: #e2e8f0; border-color: rgba(255,255,255,0.25); padding: 6px 10px; font-size: 12px; }
.btn--onbar:hover { background: rgba(255,255,255,0.08); }
.btn--small { padding: 4px 8px; font-size: 12px; }

.said { min-height: 1.2em; margin: 0; font-size: 13px; color: var(--bad); }
.said.ok { color: var(--good); }

.pill { display: inline-block; border-radius: 999px; padding: 4px 10px; font-size: 12px; font-weight: 700; background: var(--soft); color: var(--muted); border: 1px solid var(--line); }
.pill--current { background: var(--good-bg); color: var(--good); border-color: #a7f3d0; }
.pill--expired { background: var(--bad-bg); color: var(--bad); border-color: #fecdd3; }

.facts { display: grid; grid-template-columns: 90px 1fr; gap: 6px 12px; margin: 0 0 12px; font-size: 14px; }
.facts dt { color: var(--muted); }
.facts dd { margin: 0; color: var(--ink); word-break: break-word; }
/* The email on one line: too long for the card, it ends in … (the whole address is its title). */
#acct-email { min-width: 0; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; word-break: normal; }

.table { width: 100%; border-collapse: collapse; font-size: 14px; }
.table th, .table td { padding-right: 12px; }
.table th { text-align: left; font-size: 10px; font-weight: 900; letter-spacing: 0.12em; text-transform: uppercase; color: #94a3b8; padding-top: 6px; padding-bottom: 6px; border-bottom: 1px solid var(--line); }
.table td { padding-top: 8px; padding-bottom: 8px; border-bottom: 1px solid #f1f5f9; color: var(--ink); }

.list { list-style: none; margin: 0; padding: 0; }
.list li { display: flex; align-items: center; justify-content: space-between; gap: 8px; padding: 8px 0; border-bottom: 1px solid #f1f5f9; font-size: 14px; color: var(--ink); }

/* The member area's tabs. */
.tabs { display: flex; gap: 4px; margin: 0 0 20px; border-bottom: 1px solid var(--line); overflow-x: auto; scrollbar-width: none; }
.tabs::-webkit-scrollbar { display: none; }
.tab { padding: 10px 14px; font-size: 13px; font-weight: 700; color: var(--muted); text-decoration: none; border-bottom: 2px solid transparent; margin-bottom: -1px; white-space: nowrap; }
.tab:hover { color: var(--ink); }
.tab[aria-current="page"] { color: var(--navy); border-bottom-color: var(--navy); }
.tab__icon { display: none; }

/* Payments. */
.scroll { overflow-x: auto; }
.table--money td { vertical-align: top; }
.num { text-align: right; white-space: nowrap; font-variant-numeric: tabular-nums; }
.table .num { padding-right: 0; }
.table--money td:last-child { padding-left: 16px; padding-right: 0; white-space: nowrap; }
.neg { color: var(--bad); }
.detail { display: block; font-size: 12px; color: var(--muted); }
.note { margin: 0 0 12px; padding: 10px 12px; border-radius: 10px; background: var(--soft); border: 1px solid var(--line); font-size: 13px; }

/* Give. */
.card--form { max-width: 520px; }
.card--thanks { margin-bottom: 16px; background: var(--good-bg); border-color: #a7f3d0; color: var(--good); }
.card--thanks h2 { color: var(--good); }
fieldset { border: 0; margin: 0; padding: 0; display: flex; flex-wrap: wrap; gap: 8px; }
legend { padding: 0; margin-bottom: 6px; font-size: 10px; font-weight: 900; letter-spacing: 0.12em; text-transform: uppercase; color: #94a3b8; }
.choice { display: inline-flex; align-items: center; gap: 6px; padding: 8px 12px; border: 1px solid var(--line); border-radius: 10px; background: #fff; font-size: 13px; font-weight: 600; letter-spacing: 0; text-transform: none; color: var(--text); cursor: pointer; }
.choice input { width: auto; margin: 0; accent-color: var(--navy); }
.choice:has(input:checked) { border-color: var(--navy); background: #eef2ff; color: var(--navy); }
.check { display: flex; align-items: center; gap: 8px; font-size: 13px; font-weight: 600; letter-spacing: 0; text-transform: none; color: var(--text); }
.check input { width: auto; accent-color: var(--navy); }
.money-in { display: flex; align-items: center; gap: 6px; font-size: 14px; color: var(--muted); letter-spacing: 0; }
select { width: 100%; font: inherit; font-size: 14px; font-weight: 500; color: var(--ink); background: #fff; border: 1px solid var(--line); border-radius: 10px; padding: 9px 12px; text-transform: none; letter-spacing: 0; }
.total { margin: 0; font-size: 14px; font-weight: 700; color: var(--ink); min-height: 1.2em; }

/* Buttons the shared scripts draw: a quiet text button, and the names' Add. */
.link { font: inherit; font-size: 13px; font-weight: 600; color: var(--accent); background: none; border: 0; padding: 2px 0; cursor: pointer; }
.primary { font: inherit; font-size: 13px; font-weight: 700; border-radius: 10px; padding: 9px 14px; border: 1px solid var(--navy); background: var(--navy); color: #fff; cursor: pointer; }
.primary:disabled { opacity: 0.5; }
.loading { color: var(--muted); }

/* Seats. */
.card--seats { overflow-x: auto; }
.seat-stage { position: relative; }
.seat-hint, .seat-zoom { display: none; }
.seat-bar { font-family: var(--sans); }
.seat-bar__said { max-width: 960px; margin: 0 auto; padding: 0 16px 10px; }
.seat-bar__inner { padding-left: 16px; padding-right: 16px; }
.seat-bar { padding-bottom: env(safe-area-inset-bottom, 0px); }

/* Aliyahs and Cholim (names-page.js draws the lists). */
.names .card { margin-bottom: 16px; }
.names .note { background: none; border: 0; padding: 0; color: var(--muted); }
.names table { width: 100%; border-collapse: collapse; font-size: 14px; }
.names th { text-align: left; font-size: 10px; font-weight: 900; letter-spacing: 0.12em; text-transform: uppercase; color: #94a3b8; padding: 6px 12px 6px 0; border-bottom: 1px solid var(--line); }
.names td { padding: 8px 12px 8px 0; border-bottom: 1px solid #f1f5f9; color: var(--ink); vertical-align: top; }
.hebrew { font-family: var(--hebrew); font-size: 16px; unicode-bidi: isolate; display: inline-block; }
.empty { color: var(--muted); font-size: 14px; }
.portal-add { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; margin: 16px 0 4px; }
.portal-add input { flex: 1 1 11rem; width: auto; }
.portal-add select { flex: 0 0 auto; width: auto; }
.portal-add .note { flex-basis: 100%; margin: 0; font-size: 13px; }
/* Account: phone and address, tap to change. */
.inline-edit { font: inherit; color: var(--ink); background: none; border: 0; border-bottom: 1px dashed #cbd5e1; padding: 0; text-align: left; cursor: pointer; }
.inline-edit:hover { border-bottom-color: var(--accent); color: var(--accent); }
.inline-edit.is-empty { color: var(--accent); border-bottom: 0; }
.inline-input { width: 100%; padding: 6px 8px; font-size: 15px; }
.has-suggest { position: relative; }
.suggest { position: absolute; z-index: 30; left: 0; top: calc(100% + 4px); min-width: min(360px, 80vw); margin: 0; padding: 4px 0; list-style: none;
  background: #fff; border: 1px solid var(--line); border-radius: 10px; box-shadow: 0 8px 24px rgba(15, 23, 42, 0.12); }
.suggest li { padding: 9px 12px; font-size: 14px; color: var(--ink); cursor: pointer; }
.suggest li:hover, .suggest li[aria-selected="true"] { background: #f1f5f9; }
.receipt-btn { padding: 0; font-size: 13px; font-weight: 600; color: var(--accent); background: none; border: 0; cursor: pointer; }
.receipt-btn:disabled { color: var(--muted); }

/* Names, portal: grouped lists of rows, the form in a bottom sheet. */
.ncard { margin: 0 0 28px; }
.ncard h2 { margin: 0 0 2px 4px; font-size: 20px; font-weight: 800; letter-spacing: -0.01em; }
.ncard > .note { margin: 0 0 10px 4px; font-size: 14px; }
.nlist { list-style: none; margin: 0; padding: 0; background: #fff; border-radius: 14px; overflow: hidden; }
.nlist li + li .nlist__row { border-top: 1px solid #eef2f6; }
.nlist__row { display: flex; align-items: center; gap: 12px; width: 100%; min-height: 60px; padding: 10px 16px;
  font: inherit; text-align: left; color: var(--ink); background: none; border: 0; cursor: pointer; }
.nlist__row:active { background: #f1f5f9; }
.nlist__main { flex: 1 1 auto; min-width: 0; display: flex; flex-direction: column; gap: 1px; }
.nlist__title { font-size: 16px; font-weight: 600; color: var(--ink); }
.nlist__sub { color: var(--muted); }
.nlist__sub .hebrew, .nlist__title .hebrew { font-size: 17px; }
.nlist__meta { flex: 0 0 auto; font-size: 14px; color: var(--muted); }
.nlist__chev { flex: 0 0 auto; font-size: 22px; line-height: 1; color: #cbd5e1; }
.names .empty { margin: 0; padding: 18px 16px; background: #fff; border-radius: 14px; color: var(--muted); }
.nadd { display: block; width: 100%; margin-top: 8px; padding: 14px 16px; font: inherit; font-size: 16px; font-weight: 600; text-align: left;
  color: var(--accent); background: #fff; border: 0; border-radius: 14px; cursor: pointer; }
.nadd::before { content: '+'; display: inline-block; width: 22px; font-size: 20px; font-weight: 500; }
.nadd:active { background: #f1f5f9; }

.sheet { position: fixed; inset: 0; z-index: 58; display: flex; align-items: flex-end; justify-content: center; }
.sheet__scrim { position: absolute; inset: 0; background: rgba(15, 23, 42, 0.35); animation: sheet-fade 0.2s ease; }
.sheet__panel { position: relative; width: 100%; max-width: 520px; max-height: 92vh; overflow-y: auto; background: var(--soft);
  border-radius: 16px 16px 0 0; padding-bottom: calc(20px + env(safe-area-inset-bottom, 0px)); animation: sheet-up 0.25s cubic-bezier(0.2, 0.8, 0.2, 1); }
@media (min-width: 641px) { .sheet { align-items: center; } .sheet__panel { border-radius: 16px; } }
@keyframes sheet-up { from { transform: translateY(40px); opacity: 0; } to { transform: none; opacity: 1; } }
@keyframes sheet-fade { from { opacity: 0; } }
body.sheet-open { overflow: hidden; }
.sheet__bar { position: sticky; top: 0; z-index: 1; display: grid; grid-template-columns: 1fr auto 1fr; align-items: center; padding: 12px 8px;
  background: var(--soft); border-bottom: 1px solid var(--line); }
.sheet__bar h3 { margin: 0; font-size: 16px; font-weight: 700; color: var(--ink); }
.sheet__btn { justify-self: start; padding: 8px 10px; font: inherit; font-size: 16px; color: var(--accent); background: none; border: 0; cursor: pointer; }
.sheet__btn--save { justify-self: end; font-weight: 700; }
.sheet__body { display: grid; gap: 14px; padding: 16px; }
.fields { background: #fff; border-radius: 12px; overflow: hidden; }
.fields input { display: block; border: 0; border-radius: 0; padding: 13px 16px; font-size: 16px; min-height: 48px; box-shadow: none; }
.fields input + input { border-top: 1px solid #eef2f6; }
.fields input:focus { box-shadow: none; background: #f8fbff; }
.fields input::placeholder { color: #94a3b8; font-weight: 400; }
.seg { display: flex; padding: 3px; background: #e9eef4; border-radius: 10px; }
.seg button { flex: 1 1 0; min-height: 38px; font: inherit; font-size: 15px; font-weight: 600; color: var(--text); background: none; border: 0; border-radius: 8px; cursor: pointer; }
.seg[data-seg$="-gender"] button { font-family: var(--hebrew); font-size: 18px; }
.seg button[aria-checked="true"] { background: #fff; color: var(--ink); box-shadow: 0 1px 3px rgba(15, 23, 42, 0.12); }
.who-pick { width: 100%; font: inherit; font-size: 16px; color: var(--ink); background: #fff; border: 0; border-radius: 12px; padding: 13px 16px; min-height: 48px; }
.sheet__body .note { margin: 0; font-size: 14px; color: var(--bad); }
.sheet__body .note:empty { display: none; }
.sheet__remove { margin-top: 4px; padding: 14px; font: inherit; font-size: 16px; color: var(--bad); background: #fff; border: 0; border-radius: 12px; cursor: pointer; }
.ntoast { position: fixed; left: 50%; bottom: calc(var(--nav, 0px) + 24px + env(safe-area-inset-bottom, 0px)); z-index: 70; transform: translate(-50%, 10px);
  padding: 9px 18px; font-size: 14px; font-weight: 600; color: #fff; background: rgba(15, 23, 42, 0.88); border-radius: 999px; opacity: 0; pointer-events: none; transition: opacity 0.2s, transform 0.2s; }
.ntoast.is-on { opacity: 1; transform: translate(-50%, 0); }
body.hkbd-open .sheet__panel { padding-bottom: calc(var(--hkbd-h, 240px) + 16px); max-height: 100vh; }

/* The on-screen aleph-bes, for a member with no Hebrew keyboard. */
.hkbd { position: fixed; left: 0; right: 0; bottom: 0; z-index: 60; display: flex; flex-direction: column; gap: 6px;
  padding: 8px 8px calc(8px + env(safe-area-inset-bottom, 0px)); background: #fff; border-top: 1px solid var(--line); box-shadow: 0 -6px 20px rgba(15, 23, 42, 0.12); }
.hkbd__row { display: flex; gap: 5px; justify-content: center; }
.hkbd__key { flex: 0 0 auto; min-width: 2.4rem; padding: 9px 8px; font-family: var(--hebrew); font-size: 20px; line-height: 1; background: var(--soft); color: var(--ink); border: 1px solid var(--line); border-radius: 8px; cursor: pointer; }
.hkbd__key:hover { border-color: var(--accent); color: var(--accent); }
.hkbd__wide { flex: 1 1 auto; font-family: var(--sans); font-size: 14px; }
.hkbd__act { font-family: var(--sans); font-size: 14px; min-width: 4rem; }

/* Phones: the portal as an app. The navy bar stays at the top, the tabs are
   the bar along the bottom (icon over label, in thumb's reach), fields are
   16px so iOS doesn't zoom the page on every tap into one, and targets are
   44px. --nav is the bottom bar's height above the home indicator. */
@media (max-width: 640px) {
  :root { --nav: 58px; }
  body { font-size: 15px; -webkit-tap-highlight-color: transparent; }
  .bar { position: sticky; top: 0; z-index: 50; }
  .wrap { padding: 12px max(16px, env(safe-area-inset-right)) calc(var(--nav) + 32px + env(safe-area-inset-bottom, 0px)) max(16px, env(safe-area-inset-left)); }
  input, select, textarea { font-size: 16px; min-height: 44px; }
  .choice input, .check input { min-height: 0; width: 20px; height: 20px; flex: 0 0 20px; }

  .tabs { position: fixed; left: 0; right: 0; bottom: 0; z-index: 55; display: flex; gap: 0; margin: 0;
    padding: 0 env(safe-area-inset-right, 0px) env(safe-area-inset-bottom, 0px) env(safe-area-inset-left, 0px);
    background: rgba(255, 255, 255, 0.94); -webkit-backdrop-filter: saturate(180%) blur(16px); backdrop-filter: saturate(180%) blur(16px);
    border-top: 1px solid var(--line); border-bottom: 0; overflow: visible; user-select: none; -webkit-user-select: none; }
  .tab { flex: 1 1 0; min-width: 0; height: var(--nav); display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 3px;
    padding: 6px 2px 4px; margin: 0; border: 0; color: #94a3b8; font-size: 10.5px; font-weight: 700; letter-spacing: 0.01em; }
  .tab:hover { color: #94a3b8; }
  .tab__icon { display: block; width: 24px; height: 24px; fill: none; stroke: currentColor; stroke-width: 1.9; stroke-linecap: round; stroke-linejoin: round; transition: transform 0.12s ease; }
  .tab:active .tab__icon { transform: scale(0.88); }
  .tab__label { max-width: 100%; overflow: hidden; text-overflow: ellipsis; }
  .tab[aria-current="page"], .tab[aria-current="page"]:hover { color: var(--navy); }
  .tab[aria-current="page"] .tab__icon { stroke-width: 2.3; }
  /* Seats: the map is a box to pan and pinch (portal-new.js sets --seat-zoom);
     a finger on it scrolls the box, never stuck. */
  .card--seats { overflow: visible; padding: 14px; }
  .seat-who { font-size: 14px; margin-bottom: 10px; }
  .seat-mine { font-size: 14px; margin: 0 0 10px; }
  .seat-legend { gap: 4px 14px; font-size: 13px; margin-bottom: 8px; }
  .seat-swatch { width: 14px; height: 14px; }
  .seat-hint { display: block; margin: 0 0 8px; font-size: 12px; color: var(--muted); }
  /* Tall enough to fill the screen between the header and the Reserve bar. */
  .seat-map.is-zoomable { display: block; height: max(300px, calc(100vh - 230px - var(--nav) - env(safe-area-inset-bottom, 0px)));
    height: max(300px, calc(100svh - 230px - var(--nav) - env(safe-area-inset-bottom, 0px))); overflow: auto; overscroll-behavior: contain;
    -webkit-overflow-scrolling: touch; background: #fff; border: 1px solid var(--line); border-radius: 12px; }
  .seat-map.is-zoomable .seat-plan { display: block; width: calc(var(--seat-zoom, 1) * 100%); max-width: none;
    border: 0; border-radius: 0; touch-action: pan-x pan-y; }
  .seat-zoom:not([hidden]) { display: flex; flex-direction: column; position: absolute; right: 8px; top: 8px; z-index: 2;
    background: rgba(255, 255, 255, 0.95); border: 1px solid var(--line); border-radius: 12px; box-shadow: 0 2px 10px rgba(15, 23, 42, 0.12); overflow: hidden; }
  .seat-zoom button { width: 44px; height: 44px; border: 0; background: none; font: inherit; font-size: 22px; font-weight: 600; color: var(--navy); cursor: pointer; }
  .seat-zoom button + button { border-top: 1px solid var(--line); }
  .seat-zoom button[data-zoom="fit"] { font-size: 12px; font-weight: 800; }
  .seat-zoom button:disabled { color: #cbd5e1; }

  /* The tally and Reserve: one slim bar just above the tab bar. */
  .seat-bar { position: fixed; left: 0; right: 0; bottom: calc(var(--nav) + env(safe-area-inset-bottom, 0px)); z-index: 54; padding-bottom: 0; }
  .seat-bar .wrap.seat-bar__inner { flex-wrap: nowrap; justify-content: space-between; gap: 12px; padding: 10px 16px; }
  .seat-bar__count { font-size: 14px; line-height: 1.35; min-width: 0; }
  .seat-bar__go { flex: 0 0 auto; }
  .seat-bar__go .btn { width: auto; white-space: nowrap; }
  .seat-bar__said { padding: 0 16px 10px; font-size: 13px; min-height: 0; }
  .seat-bar__said:empty { display: none; }
  body:has(.seat-bar:not([hidden])) main.wrap { padding-bottom: calc(var(--nav) + 120px + env(safe-area-inset-bottom, 0px)); }

  /* Confirm your seats: a sheet up from the bottom, over the tab bar. */
  .seat-confirm { align-items: flex-end; padding: 0; z-index: 70; }
  .seat-confirm__box { max-width: none; max-height: 88vh; overflow-y: auto; border: 0; border-radius: 20px 20px 0 0;
    padding: 22px 16px calc(16px + env(safe-area-inset-bottom, 0px)); animation: sheet-up 0.22s ease-out; }
  .seat-confirm__box::before { content: ""; display: block; width: 40px; height: 5px; margin: -10px auto 14px; border-radius: 3px; background: #cbd5e1; }
  .seat-confirm__title { font-size: 20px; font-weight: 900; }
  .seat-confirm__names { max-height: none; }
  .seat-confirm__name input { font-size: 16px; min-height: 44px; border-radius: 10px; }
  .seat-confirm__buttons { flex-direction: column-reverse; align-items: stretch; gap: 6px; }
  .seat-confirm__buttons .btn { width: 100%; }
  .seat-confirm__buttons .link { min-height: 44px; text-align: center; }

  .head { display: block; margin: 8px 0 16px; }
  h1 { font-size: 26px; }
  .head .pill { margin-top: 8px; }
  .head .muted { margin: 4px 0 0; }
  h1 { line-height: 1.2; }
  .grid { gap: 12px; }
  .facts { grid-template-columns: 72px 1fr; }

  .btn { min-height: 44px; font-size: 14px; }
  .btn--onbar { min-height: 36px; }
  .btn--link { min-height: 0; }
  .btn--inline { font-size: inherit; }
  .btn--small { min-height: 36px; padding: 6px 12px; font-size: 13px; }
  .form-stack > .btn--primary, #upgrade .btn, #give-submit { width: 100%; }
  #upgrade { margin: 12px 0 0; }

  /* Give: the four choices as an even two-by-two. */
  fieldset.choices { display: grid; grid-template-columns: 1fr 1fr; }
  #give-choices { grid-template-columns: 1fr; }
  .choice { min-height: 44px; font-size: 14px; }
  .check { min-height: 44px; font-size: 14px; }
  .card--form { max-width: none; }
  .total:empty { display: none; }

  .portal-add .primary { flex: 1 1 100%; min-height: 44px; font-size: 14px; }
  .names .link { padding: 6px 2px; }
}

/* The narrowest phones (iPhone SE): every tab label whole. */
@media (max-width: 360px) {
  .tab { font-size: 9.5px; letter-spacing: 0; padding-left: 0; padding-right: 0; }
}

@keyframes sheet-up { from { transform: translateY(100%); } to { transform: none; } }
@media (prefers-reduced-motion: reduce) { .seat-confirm__box { animation: none !important; } }

@media (max-width: 520px) {
  .bar { padding: 10px 16px; padding-top: max(10px, env(safe-area-inset-top)); }
  .who #whoami { display: none; }
  .card { padding: 16px; }
  /* Payments as stacked rows: date and amount, then what, then how. */
  .table--money thead { display: none; }
  .table--money tbody { display: block; }
  .table--money tr { display: grid; grid-template-columns: 1fr auto; gap: 2px 12px; padding: 10px 0; border-bottom: 1px solid #f1f5f9; }
  .table--money td { border: 0; padding: 0; }
  .table--money td:nth-child(1) { grid-column: 1; grid-row: 1; font-size: 12px; color: var(--muted); }
  .table--money td:nth-child(4) { grid-column: 2; grid-row: 1; font-weight: 700; }
  .table--money td:nth-child(2) { grid-column: 1 / -1; grid-row: 2; }
  .table--money td:nth-child(3) { grid-column: 1; grid-row: 3; font-size: 12px; color: var(--muted); }
  .table--money td:nth-child(5) { grid-column: 2; grid-row: 3; text-align: right; font-size: 12px; padding: 0; }
  .table--money td[colspan] { grid-column: 1 / -1; grid-row: 1; }
  /* Names: each line a small block, each value with its column's name beside it. */
  .names thead { display: none; }
  .names table, .names tbody, .names tr, .names td { display: block; width: 100%; }
  .names tr { padding: 10px 0; border-bottom: 1px solid #f1f5f9; }
  .names td { position: relative; padding: 3px 0 3px 7rem; border: 0; text-align: right; overflow-wrap: anywhere; }
  .names td::before { content: attr(data-label); position: absolute; left: 0; top: 4px; max-width: 6.5rem; text-align: left; color: #94a3b8; font-size: 12px; font-weight: 700; }
  .names td[data-label=""] { padding-left: 0; }
  .names td[data-label=""]::before { content: none; }
  .names td:empty { display: none; }
  .portal-add input, .portal-add select { flex: 1 1 100%; width: 100%; }
}

/* ------------------------------------------------------------- lockers */
/* The Lockers tab (portal-lockers.js): the grid as the lockers hang. */
.locker-mine { margin-bottom: 16px; }
.locker-mine h2 { margin: 0 0 8px; font-size: 16px; color: var(--ink); }
.locker-mine__row { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 10px 0; border-top: 1px solid var(--line); flex-wrap: wrap; }
.locker-mine__row:first-of-type { border-top: 0; }
.locker-mine__row .muted { margin: 0; font-size: 13px; }
.locker-bank-pick { display: flex; flex-wrap: wrap; gap: 8px; margin-bottom: 12px; }
.locker-bank-pick .choice { font: inherit; font-size: 13px; padding: 6px 12px; border: 1px solid var(--line); border-radius: 10px; background: #fff; cursor: pointer; }
.locker-bank-pick .choice.is-on { border-color: var(--navy); background: #eef2ff; color: var(--navy); font-weight: 700; }
.locker-legend { display: flex; flex-wrap: wrap; gap: 14px; margin: 0 0 10px; font-size: 12px; color: var(--muted); }
.locker-legend > span { display: inline-flex; align-items: center; gap: 6px; }
.locker-swatch { display: inline-block; width: 14px; height: 14px; border-radius: 4px; border: 2px solid var(--keyline-strong); background: #fff; }
.locker-swatch--picked { background: var(--navy); border-color: var(--navy); }
.locker-swatch--taken { background: var(--parchment-deep); border-color: var(--line); }
.locker-grid-wrap { overflow-x: auto; -webkit-overflow-scrolling: touch; padding-bottom: 4px; }
.locker-grid { display: inline-flex; flex-direction: column; gap: 6px; }
.locker-row { display: flex; gap: 6px; }
.locker { flex: 0 0 auto; width: 52px; height: 52px; border-radius: 8px; border: 2px solid var(--keyline-strong); background: #fff; color: var(--ink); font: inherit; font-size: 14px; font-weight: 800; cursor: pointer; }
.locker:focus-visible { outline: 3px solid var(--accent); outline-offset: 2px; }
.locker--free:hover:not(:disabled) { border-color: var(--navy); }
.locker--picked { background: var(--navy); border-color: var(--navy); color: #fff; }
.locker--taken { background: var(--parchment-deep); border-color: var(--line); color: #94a3b8; cursor: not-allowed; }
.locker:disabled { cursor: not-allowed; }
.locker-note { font-size: 12px; margin: 8px 0 0; }
.locker-pay { margin-top: 16px; padding-top: 16px; border-top: 1px solid var(--line); display: flex; align-items: center; justify-content: space-between; gap: 12px; flex-wrap: wrap; }
.locker-pay p { margin: 0; color: var(--ink); font-weight: 600; }
@media (max-width: 640px) {
  .locker { width: 46px; height: 46px; font-size: 13px; }
  .locker-pay .btn { width: 100%; }
}
/* /lockers/renew */
.renew-facts { display: grid; grid-template-columns: auto 1fr; gap: 6px 16px; margin: 12px 0 18px; font-size: 14px; }
.renew-facts dt { color: var(--muted); }
.renew-facts dd { margin: 0; color: var(--ink); font-weight: 600; }
.renew-help { margin-top: 16px; font-size: 13px; }
#renew .btn--primary { width: 100%; }
