/*
 * Members Portal — structure. Theme files (portal-theme-*.css) only set the tokens below
 * and a few theme-specific touches; never add colors or fonts here directly.
 */
:root {
    --p-bg: #ffffff;
    --p-card: #ffffff;
    --p-ink: #1c2430;
    --p-muted: #687385;
    --p-line: #e6e8ee;
    --p-accent: #1f6f6b;
    --p-accent-ink: #ffffff;
    --p-accent-soft: #e3f0ee;
    --p-warn: #9a6a12;
    --p-warn-soft: #fbf1dc;
    --p-danger: #b42318;
    --p-radius: 14px;
    --p-radius-lg: 18px;
    --p-font: system-ui, -apple-system, "Segoe UI", sans-serif;
    --p-font-display: var(--p-font);
    --p-max: 520px;
}

*, *::before, *::after { box-sizing: border-box; }

html { -webkit-text-size-adjust: 100%; }

/* The page fills the window: the header (and the footer, when there is one) stay put and only
   the content between them scrolls (main.p-body). */
body.portal {
    margin: 0;
    height: 100vh;
    height: 100dvh;
    overflow: hidden;
    background: var(--p-bg);
    color: var(--p-ink);
    font: 17px/1.55 var(--p-font);
    display: flex;
    flex-direction: column;
}

[ng-cloak] { display: none !important; }

/* The office's read-only "View as member": a bar under the header (stays put; the content scrolls). */
.p-office-view { display: flex; align-items: center; justify-content: center; gap: 12px; flex-wrap: wrap;
    padding: 6px 16px; background: #fff4e0; color: #7a4a00; font-size: 14px; border-bottom: 1px solid #f1d9a6; }
.p-office-view-close { min-height: 36px; padding: 0 14px; border: 1px solid #d9b56a; border-radius: 999px;
    background: #fff; color: #7a4a00; font: 600 13px var(--p-font); cursor: pointer; }

/* ── header ─────────────────────────────────────────────────── */
/* In a website's pop-up: the close button sits in the header, after Sign out. */
.p-close { display: none; margin-left: auto; width: 44px; height: 44px; flex: 0 0 44px; border: 0; border-radius: 50%;
    background: transparent; color: var(--p-ink); font: 400 30px/44px system-ui, sans-serif; cursor: pointer; padding: 0; }
.p-close:hover { background: var(--p-line); }
.p-embedded .p-close { display: block; }
.p-account + .p-close { margin-left: 4px; }
/* In a pop-up the portal scrolls inside it: a slim scroll bar. */
.p-embedded .p-body { scrollbar-width: thin; scrollbar-color: #c9ccd3 transparent; }
.p-embedded .p-body::-webkit-scrollbar { width: 8px; }
.p-embedded .p-body::-webkit-scrollbar-thumb { background: #c9ccd3; border-radius: 4px; }
.p-top {
    display: flex;
    align-items: center;
    gap: 12px;
    width: 100%;
    max-width: var(--p-max);
    margin: 0 auto;
    padding: 18px 16px 8px;
}
.p-logo {
    width: 40px; height: 40px; flex: 0 0 40px;
    border-radius: 12px;
    background: var(--p-accent);
    color: var(--p-accent-ink);
    display: grid; place-items: center;
    font: 600 17px var(--p-font-display);
}
.p-logo-img { height: 40px; max-width: 120px; object-fit: contain; }
.p-org { font-size: 13px; color: var(--p-muted); line-height: 1.3; min-width: 0; }
.p-org b { display: block; color: var(--p-ink); font-size: 15px; font-weight: 600; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
/* The signed-in person, top right: name + email (initials only on phones); the menu holds Sign out. */
.p-account { position: relative; margin-left: auto; min-width: 0; }
.p-account-btn { display: flex; align-items: center; gap: 8px; min-height: 44px; max-width: 240px; padding: 4px 6px; border: 0; border-radius: 12px;
    background: transparent; color: inherit; font: inherit; cursor: pointer; text-align: left; }
.p-account-btn:hover { background: rgba(0, 0, 0, .05); }
.p-account-av { width: 34px; height: 34px; flex: 0 0 34px; border-radius: 50%; display: grid; place-items: center;
    background: var(--p-accent-soft); color: var(--p-accent); font: 600 14px var(--p-font); }
.p-account-text { min-width: 0; line-height: 1.25; }
.p-account-text b, .p-account-text span { display: block; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.p-account-text b { font-size: 14px; font-weight: 600; }
.p-account-text span { font-size: 13px; opacity: .72; }
.p-caret { font-size: 12px; opacity: .7; }
.p-menu { position: absolute; right: 0; top: calc(100% + 6px); z-index: 20; min-width: 220px; max-width: calc(100vw - 32px);
    background: #fff; color: var(--p-ink); border: 1px solid var(--p-line); border-radius: 12px; box-shadow: 0 10px 30px rgba(0, 0, 0, .12); padding: 6px; }
.p-menu-who { padding: 10px 12px; border-bottom: 1px solid var(--p-line); margin-bottom: 6px; line-height: 1.3; }
.p-menu-who b, .p-menu-who span { display: block; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.p-menu-who span { font-size: 14px; color: var(--p-muted); }
.p-menu-item { display: block; width: 100%; min-height: 44px; padding: 0 12px; border: 0; border-radius: 8px; background: none;
    color: var(--p-ink); font: 500 16px var(--p-font); text-align: left; cursor: pointer; }
.p-menu-item:hover { background: var(--p-accent-soft); }
/* Phones: the organization's name comes first (up to two lines), then the person's initials;
   the logo gives up its room before either. */
@media (max-width: 480px) {
    .p-top { gap: 8px; }
    .p-account-text { display: none; }
    .p-org { flex: 1 1 auto; }
    .p-org b { white-space: normal; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; }
    .p-logo-img { flex: 0 1 auto; min-width: 0; height: 32px; max-width: 64px; }
    .p-logo { width: 32px; height: 32px; flex-basis: 32px; font-size: 14px; }
    .p-account-btn { padding: 4px 2px; gap: 4px; }
}
@media (max-width: 360px) {
    .p-top .p-logo-img, .p-top .p-logo { display: none; }
}

/* ── body + type ────────────────────────────────────────────── */
.p-top { flex: 0 0 auto; }
/* Full width so its scroll bar sits at the window's edge; the content keeps to the page column
   (var(--p-max)) through the side padding. */
.p-body {
    width: 100%;
    margin: 0;
    padding: 8px max(16px, calc((100% - var(--p-max)) / 2 + 16px)) 40px;
    flex: 1 1 auto;
    min-height: 0;
    overflow-y: auto;
    -webkit-overflow-scrolling: touch;
}
.p-h1 { font: 600 30px/1.2 var(--p-font-display); margin: 20px 0 10px; }
.p-h2 { font: 600 22px/1.25 var(--p-font-display); margin: 0 0 8px; }
.p-lead { color: var(--p-muted); margin: 0 0 20px; }
.p-greet { color: var(--p-muted); font-size: 16px; margin: 16px 0 0; }
.p-small { font-size: 16px; color: var(--p-muted); text-align: center; margin: 14px 0 0; }

/* ── form controls ──────────────────────────────────────────── */
.p-label { display: block; font-size: 16px; font-weight: 500; margin: 0 0 8px; }
.p-input {
    width: 100%;
    height: 54px;
    padding: 0 14px;
    border: 1px solid var(--p-line);
    border-radius: 12px;
    background: #fff;
    color: var(--p-ink);
    font: 18px var(--p-font);  /* 16px+ stops iOS zooming on focus */
}
.p-input:focus { outline: 2px solid var(--p-accent); outline-offset: 1px; border-color: var(--p-accent); }
/* Placeholders read clearly as examples, never as typed text. */
.p-input::placeholder { color: #b4bbc5; opacity: 1; }
.p-code { font-size: 28px; letter-spacing: 12px; text-align: center; font-weight: 600; }

.p-hint { font-size: 15px; color: var(--p-muted); margin: 8px 0 0; }

/* one-time code: a single transparent input over six drawn boxes */
.p-otp { position: relative; height: 62px; }
.p-otp-boxes { position: absolute; inset: 0; display: flex; gap: 6px; pointer-events: none; }
.p-otp-boxes i {
    flex: 1;
    display: grid; place-items: center;
    border: 1px solid var(--p-line); border-radius: 12px; background: #fff;
    font: 600 26px var(--p-font); font-style: normal; color: var(--p-ink);
}
.p-otp-boxes i.is-cur { border: 2px solid var(--p-accent); }
.p-otp-input {
    position: absolute; inset: 0; width: 100%; height: 100%;
    border: 0; background: transparent; outline: none;
    color: transparent; caret-color: transparent;
    font-size: 18px;              /* >= 16px: no iOS zoom on focus */
}
.p-otp-input::selection { background: transparent; }

.p-btn {
    display: block;
    width: 100%;
    min-height: 54px;
    margin-top: 14px;
    border: 0;
    border-radius: var(--p-radius);
    background: var(--p-accent);
    color: var(--p-accent-ink);
    font: 600 17px var(--p-font);
    cursor: pointer;
}
.p-btn:disabled { opacity: .6; cursor: default; }
.p-btn-ghost { background: transparent; color: var(--p-accent); border: 1px solid var(--p-line); }

.p-link {
    background: none; border: 0; padding: 10px 6px; min-height: 48px;
    color: var(--p-accent); font: 500 16px var(--p-font); cursor: pointer;
}
.p-link:disabled { color: var(--p-muted); cursor: default; }

.p-error { color: var(--p-danger); font-size: 16px; margin: 8px 0 0; }
.p-notice { background: var(--p-warn-soft); color: var(--p-warn); border-radius: 12px; padding: 12px 16px; font-size: 16px; }

/* ── cards (used by the signed-in screens) ──────────────────── */
.p-card { background: var(--p-card); border: 1px solid var(--p-line); border-radius: var(--p-radius-lg); padding: 16px 18px; margin-bottom: 12px; }
.p-chip { display: inline-block; font-size: 12px; font-weight: 500; padding: 3px 9px; border-radius: 999px; background: var(--p-warn-soft); color: var(--p-warn); }

/* ── signed-in screens ──────────────────────────────────────── */
.p-back {
    display: inline-flex; align-items: center; gap: 6px;
    min-height: 48px; margin: 4px 0 0; padding: 0 2px;
    color: var(--p-accent); font: 500 17px var(--p-font); text-decoration: none;
}
.p-h1-tight { margin-top: 2px; }
.p-section { font: 600 20px var(--p-font-display); margin: 28px 0 10px; }
.p-banner {
    display: flex; gap: 12px; align-items: flex-start;
    background: var(--p-warn-soft); color: var(--p-warn);
    border-radius: 14px; padding: 14px 16px; font-size: 16px; margin: 8px 0 16px;
}
.p-banner.is-ok { background: var(--p-ok-soft, #e4f3ea); color: var(--p-ok, #23704a); }

.p-list { background: var(--p-card); border: 1px solid var(--p-line); border-radius: var(--p-radius-lg); margin-bottom: 12px; overflow: hidden; }
.p-row {
    display: flex; align-items: center; gap: 14px;
    width: 100%; min-height: 72px; padding: 14px 18px;
    background: none; border: 0; text-align: left; color: inherit; font: inherit; text-decoration: none;
}
button.p-row, a.p-row { cursor: pointer; }
button.p-row:disabled { cursor: default; color: inherit; opacity: 1; }
.p-row + .p-row { border-top: 1px solid var(--p-line); }
.p-row-main { flex: 1; min-width: 0; }
.p-row-main b { display: block; font-weight: 600; }
.p-row-main span { display: block; font-size: 15px; color: var(--p-muted); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.p-row-main span.wrap { white-space: normal; }
.p-chev { color: #b3aca1; font-size: 26px; line-height: 1; }
.p-av {
    width: 46px; height: 46px; flex: 0 0 46px; border-radius: 50%;
    display: grid; place-items: center;
    background: var(--p-accent-soft); color: var(--p-accent); font-weight: 600; font-size: 16px;
}
.p-av.is-memorial { background: #efe9df; color: #7a6f5f; }
.p-add { color: var(--p-accent); font-weight: 600; }
.p-add .p-av { background: transparent; border: 1.5px dashed var(--p-accent); font-size: 24px; }
.p-edit {
    flex: 0 0 auto; min-width: 72px; min-height: 48px; padding: 0 14px;
    border: 1px solid var(--p-line); border-radius: 12px; background: #fff;
    color: var(--p-accent); font: 600 16px var(--p-font); cursor: pointer;
    display: inline-flex; align-items: center; justify-content: center; text-decoration: none;
}
.p-map { display: block; width: 100%; height: 150px; border: 0; background: #e9e3d6; }

.p-tile {
    display: flex; align-items: center; gap: 16px;
    background: var(--p-card); border: 1px solid var(--p-line); border-radius: var(--p-radius-lg);
    padding: 20px 18px; margin-bottom: 12px; color: inherit; text-decoration: none;
}
.p-tile-ico {
    width: 54px; height: 54px; flex: 0 0 54px; border-radius: 16px;
    display: grid; place-items: center; background: var(--p-accent-soft); color: var(--p-accent);
}
.p-tile-ico svg { width: 26px; height: 26px; }
.p-tile b { display: block; font: 600 20px var(--p-font-display); }
.p-tile .p-row-main > span { color: var(--p-muted); font-size: 16px; }
.p-tile .p-row-main > b { color: var(--p-ink); }

.p-years { display: flex; gap: 8px; overflow-x: auto; margin: 4px 0 16px; padding-bottom: 4px; }
.p-year {
    flex: 0 0 auto; min-height: 44px; padding: 0 18px;
    border: 1px solid var(--p-line); border-radius: 999px; background: #fff;
    font: 500 16px var(--p-font); color: var(--p-ink); cursor: pointer;
}
.p-year.is-on { background: var(--p-ink); border-color: var(--p-ink); color: #fff; }
.p-total { background: var(--p-card); border: 1px solid var(--p-line); border-radius: var(--p-radius-lg); padding: 18px; margin-bottom: 12px; }
.p-total span { color: var(--p-muted); font-size: 16px; }
.p-total b { display: block; font: 600 32px var(--p-font-display); margin-top: 2px; }
.p-amount { font-weight: 600; font-size: 18px; white-space: nowrap; }
.p-empty { color: var(--p-muted); text-align: center; padding: 28px 12px; }
.p-loading { color: var(--p-muted); text-align: center; padding: 40px 0; }

/* ── edit forms ─────────────────────────────────────────────── */
.p-form { padding-bottom: 110px; }  /* room for the sticky button bar */
.p-group { background: var(--p-card); border: 1px solid var(--p-line); border-radius: var(--p-radius-lg); padding: 6px 18px 12px; margin-bottom: 14px; }
.p-group-title { font: 600 14px var(--p-font); letter-spacing: .03em; text-transform: uppercase; color: var(--p-muted); margin: 14px 0 4px; }
.p-group-title small { text-transform: none; letter-spacing: 0; font-weight: 400; }
.p-field { padding: 10px 0; }
.p-field .p-label { margin-bottom: 6px; }
.p-input.is-changed { border-color: #e2bf72; background: #fffaf0; }
.p-was { font-size: 15px; color: var(--p-warn); margin: 6px 0 0; }
.p-was button { background: none; border: 0; padding: 0 0 0 4px; min-height: 32px; color: var(--p-warn); font: 600 15px var(--p-font); text-decoration: underline; cursor: pointer; }
.p-two { display: flex; gap: 12px; }
.p-two > * { flex: 1; min-width: 0; }
select.p-input { appearance: none; -webkit-appearance: none; background: #fff url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='14' height='14' viewBox='0 0 24 24' fill='none' stroke='%236b7478' stroke-width='2'%3E%3Cpath d='M6 9l6 6 6-6'/%3E%3C/svg%3E") no-repeat right 14px center; padding-right: 40px; }
textarea.p-input { height: 104px; padding: 12px 14px; line-height: 1.45; resize: vertical; }
/* Longer notes (a yahrtzeit's who-to-notify list: one person per line). */
textarea.p-input.p-note { height: 156px; }

/* on/off switch built on a real checkbox */
.p-switch { display: flex; align-items: center; justify-content: space-between; gap: 12px; min-height: 52px; font-size: 17px; cursor: pointer; }
.p-switch input { position: absolute; opacity: 0; width: 1px; height: 1px; }
.p-switch-track { flex: 0 0 52px; width: 52px; height: 32px; border-radius: 999px; background: #d8d2c8; position: relative; transition: background .15s; }
.p-switch-track::after { content: ""; position: absolute; top: 3px; left: 3px; width: 26px; height: 26px; border-radius: 50%; background: #fff; transition: left .15s; }
.p-switch input:checked + .p-switch-track { background: var(--p-accent); }
.p-switch input:checked + .p-switch-track::after { left: 23px; }
.p-switch input:focus-visible + .p-switch-track { outline: 2px solid var(--p-accent); outline-offset: 2px; }

/* two big choice buttons (Son / Daughter) and a segmented toggle */
.p-choice { display: flex; gap: 10px; }
.p-choice button { flex: 1; min-height: 54px; border: 1px solid var(--p-line); border-radius: 12px; background: #fff; font: 500 17px var(--p-font); color: var(--p-ink); cursor: pointer; }
.p-choice button.is-on { border: 2px solid var(--p-accent); background: var(--p-accent-soft); color: var(--p-accent); font-weight: 600; }
.p-seg { display: flex; gap: 4px; padding: 4px; background: #ece6dc; border-radius: 12px; margin-bottom: 8px; }
.p-seg button { flex: 1; min-height: 44px; border: 0; border-radius: 9px; background: transparent; font: 500 16px var(--p-font); color: var(--p-muted); cursor: pointer; }
.p-seg button.is-on { background: #fff; color: var(--p-ink); box-shadow: 0 1px 2px rgba(0, 0, 0, .08); }

/* checkbox rows (who should be reminded) */
.p-check { display: flex; align-items: center; gap: 14px; min-height: 54px; border-bottom: 1px solid var(--p-line); font-size: 17px; cursor: pointer; }
.p-check input { width: 26px; height: 26px; accent-color: var(--p-accent); margin: 0; }
/* Yahrtzeit reminders: what a newly ticked person needs (relation, email), and others reminded (read-only). */
.p-remind-extra { padding: 0 0 6px 40px; border-bottom: 1px solid var(--p-line); }
.p-also { margin: 0; padding: 6px 0; font-size: 16px; color: var(--p-ink); }
.p-label-gap { margin-top: 14px; }
.p-muted { color: var(--p-muted); font-weight: 400; }

/* sticky action bar */
.p-bar {
    position: fixed; left: 0; right: 0; bottom: 0; z-index: 5;
    padding: 12px 16px calc(14px + env(safe-area-inset-bottom));
    background: linear-gradient(to top, var(--p-bg) 72%, transparent);
}
.p-bar-inner { max-width: var(--p-max); margin: 0 auto; }
.p-bar .p-btn { margin-top: 0; }

.p-done { text-align: center; padding-top: 48px; }
.p-done-ok { width: 76px; height: 76px; border-radius: 50%; margin: 0 auto 18px; display: grid; place-items: center; background: #e4f3ea; color: #23704a; font-size: 36px; }
.p-verify { background: var(--p-accent-soft); border-radius: 14px; padding: 16px; margin: 6px 0 14px; }

/* ── idle warning sheet ─────────────────────────────────────── */
.p-sheet-backdrop {
    position: fixed; inset: 0;
    background: rgba(0, 0, 0, .35);
    display: flex; align-items: flex-end; justify-content: center;
    padding: 16px;
    z-index: 10;
}
.p-sheet { width: 100%; max-width: var(--p-max); background: var(--p-card); border-radius: var(--p-radius-lg); padding: 20px; }

@media (min-width: 768px) {
    .p-sheet-backdrop { align-items: center; }
    .p-top { padding-top: 32px; }
}
.p-optional { font-weight: 400; color: var(--p-muted); }

/* ── Phase 2: bills ─────────────────────────────────────────────── */
.p-count { display: inline-block; min-width: 26px; padding: 1px 9px; margin-left: 6px; border-radius: 999px; background: var(--p-warn-soft); color: var(--p-warn); font: 600 14px var(--p-font); vertical-align: middle; text-align: center; }
.p-bill, .p-radio { cursor: pointer; }
.p-bill input, .p-radio input { width: 26px; height: 26px; margin: 0; flex: 0 0 26px; accent-color: var(--p-accent); }
/* Security code for the chosen saved card, on the card's row. */
.p-radio input.p-cvc-inline { width: 96px; height: 48px; flex: 0 0 96px; padding: 0 12px; text-align: center; }
.p-row-main b.wrap { white-space: normal; }
.p-sum { padding-top: 8px; padding-bottom: 8px; }
.p-sum-line { display: flex; justify-content: space-between; gap: 12px; padding: 10px 0; font-size: 16px; }
.p-sum-line + .p-sum-line { border-top: 1px solid var(--p-line); }
.p-sum-line > span:last-child { white-space: nowrap; }
.p-sum-line.is-total { font-weight: 600; font-size: 18px; }
.p-banner.is-bad { background: #fbe5e2; color: var(--p-danger); }
.p-res { align-items: flex-start; }
.p-res-ico { width: 34px; height: 34px; flex: 0 0 34px; border-radius: 50%; display: grid; place-items: center; font-size: 17px; font-weight: 700; }
.p-res-ico.is-ok { background: #e4f3ea; color: #23704a; }
.p-res-ico.is-bad { background: #fbe5e2; color: var(--p-danger); }
.p-res-ico.is-wait { background: var(--p-warn-soft); color: var(--p-warn); }
.p-bar .p-btn + .p-btn { margin-top: 10px; }
.p-sum + .p-h2 { margin-top: 22px; }
.p-row-main .p-count { display: inline-block; width: auto; overflow: visible; }

/* Family page: "Children only / All family members", and a relation box for someone with none. */
.p-seg-gap { margin: 18px 0 4px; }
.p-list > div + div, .p-list > div + .p-row, .p-list > div + a.p-row { border-top: 1px solid var(--p-line); }
.p-relation { padding: 0 16px 14px; }
.p-relation-row { display: flex; gap: 8px; align-items: center; }
.p-relation-row .p-input { flex: 1; min-width: 0; }
.p-btn-small { width: auto; min-height: 48px; margin-top: 0; padding: 0 22px; flex: none; }

/* ── Phase 3: scheduled payments ─────────────────────────────────── */
.p-chip-bad { background: #fbe5e2; color: var(--p-danger); }
.p-row-main .p-chip { margin-top: 4px; }
.p-also-list { padding: 0 0 8px 40px; }
.p-also-note { display: block; font-size: 14px; color: var(--p-muted); }
.p-also-note b { color: var(--p-ink); font-weight: 600; }

/* Forms: the organization's form page in a frame, sized to its content. */
.p-sending { font-size: 15px; margin: 0 0 12px; overflow-wrap: anywhere; }
.p-frame { display: block; width: 100%; min-height: 200px; border: 1px solid var(--p-line); border-radius: var(--p-radius-lg); background: #fff; margin-bottom: 12px; }
.p-btn-link { display: grid; place-items: center; text-decoration: none; }
/* Phones: the form uses the full screen width — no portal side padding or frame border around it. */
@media (max-width: 600px) {
    /* the page has 16px side padding (.p-main): reach past it exactly, scrollbar or not */
    .p-frame { width: calc(100% + 32px); max-width: none; margin-left: -16px; margin-right: -16px; border-left: 0; border-right: 0; border-radius: 0; }
    /* A pop-up on a computer is narrow too, but keeps the regular page's boxed form. */
    .p-popup .p-frame { width: 100%; max-width: 100%; margin-left: 0; margin-right: 0; border-left: 1px solid var(--p-line); border-right: 1px solid var(--p-line); border-radius: var(--p-radius-lg); }
}

/* reCAPTCHA: Google's floating badge hidden; its notice shows under the sign-in screens instead (Google allows this). */
.grecaptcha-badge { visibility: hidden !important; }
.p-recaptcha { font-size: 12px; color: var(--p-muted); text-align: center; margin: 20px 0 0; }
.p-recaptcha a { color: inherit; text-decoration: underline; }

/* New card: the billing address summary with its Edit link. */
.p-card-addr { display: flex; align-items: center; gap: 8px; }
.p-card-addr > span { flex: 1; min-width: 0; color: var(--p-muted); }

/* Address typeahead (Google Places) under the address box. */
.p-places-wrap { position: relative; }
.p-places { position: absolute; left: 0; right: 0; z-index: 30; margin-top: 4px; background: #fff; border: 1px solid var(--p-line);
    border-radius: 12px; box-shadow: 0 10px 30px rgba(0, 0, 0, .12); overflow: hidden; }
.p-places-item { display: block; width: 100%; min-height: 44px; padding: 10px 14px; border: 0; background: none; color: var(--p-ink);
    font: 15px/1.35 var(--p-font); text-align: left; cursor: pointer; }
.p-places-item + .p-places-item { border-top: 1px solid var(--p-line); }
.p-places-item:hover, .p-places-item.is-active { background: var(--p-accent-soft); }

/* ── Wider screens: two columns ──────────────────────────────────
   body.p-signed = signed in; body.p-wide = a two-column screen; body.p-mid = one column a little
   wider than a phone (see ROUTES).
   Below 900 px (phones, tablets in portrait, the website pop-up) nothing here applies. */
.p-cols { display: flex; flex-direction: column; }
.p-cols-aside > .p-aside { order: -1; }      /* phones: the summary comes first */
.p-wide-only { display: none; }
@media (min-width: 900px) {
    body.p-signed .p-top { max-width: 1012px; }
    body.p-wide { --p-max: 1012px; }
    body.p-mid { --p-max: 652px; }

    .p-wide .p-tiles { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 0 16px; }
    .p-wide .p-cols { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 0 28px; align-items: start; }
    .p-wide .p-col { min-width: 0; }
    .p-wide .p-cols-aside { grid-template-columns: minmax(0, 1fr) 340px; }
    .p-wide .p-cols-aside > .p-aside { order: 2; }
    .p-wide .p-aside { position: sticky; top: 16px; }
    .p-wide .p-wide-only { display: block; }

    /* the action button sits in the right column instead of a bar along the bottom */
    .p-wide .p-aside .p-bar { position: static; padding: 0; background: none; }
    .p-wide .p-form:has(.p-aside .p-bar) { padding-bottom: 40px; }


    /* scheduled payments: two per row, each its own card */
    .p-wide .p-cards { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 12px; background: none; border: 0; border-radius: 0; overflow: visible; }
    .p-wide .p-cards > .p-row { background: var(--p-card); border: 1px solid var(--p-line); border-radius: var(--p-radius-lg); }
    .p-wide .p-cards > .p-row + .p-row { border-top: 1px solid var(--p-line); }
}

/* Footer: daily study links on the organization's Chabad.org site (setting 238/239). */
/* One thin line along the bottom, below the content (and below a Save/Pay bar). */
.p-foot { flex: 0 0 auto; height: 30px; padding: 0 max(16px, calc((100% - var(--p-max)) / 2 + 16px));
    display: flex; align-items: center; justify-content: center; justify-content: safe center; gap: 12px; border-top: 1px solid var(--p-line); background: var(--p-bg);
    font-size: 12px; color: var(--p-muted); white-space: nowrap; overflow-x: auto; overflow-y: hidden; }
.p-foot-label { font-weight: 600; }
.p-foot a { color: var(--p-accent); text-decoration: none; }
.p-foot a:hover { text-decoration: underline; }
body:has(.p-foot) .p-bar { bottom: 30px; }
.p-foot { scrollbar-width: none; }
.p-foot::-webkit-scrollbar { display: none; }
@media (max-width: 420px) { .p-foot { gap: 8px; padding-left: 10px; padding-right: 10px; } }
