/* Member portal — one stylesheet for every member-facing page.
   (app/portal-home, -membership, -profile, -barcode, -memberships,
   -purchases, -checkins). The gym's theme (app/portal-theme.js) sets the
   colour tokens and fonts; nothing here hard-codes a brand.

   The look, in one paragraph: a reading column, not a dashboard. Type does
   the hierarchy — a large heading, section titles, dim captions — and
   sections are separated by space and a hairline, not by boxes. The one
   thing drawn as a card is the thing that IS a card: the membership pass.
   Icons appear only where they carry meaning (the code at the door, the
   phone tab bar). One filled button per screen; everything else is a link.
*/

:root {
  --bg: #0b0d12;
  --bg-elev: #12151c;
  --bg-elev-2: #1a1e27;
  --border: #242934;
  --border-strong: #343b49;
  --text: #ecefF4;
  --text-dim: #9aa3b5;
  --text-faint: #646d80;
  --primary: #e8862a;
  --primary-hi: #f09a48;
  --good: #3ccf91;
  --warn: #f2c14e;
  --bad: #ff6b6b;
  --radius: 14px;
  --col: 680px;
}

* { box-sizing: border-box; }
html, body {
  margin: 0; padding: 0;
  background: var(--bg); color: var(--text);
  font: 15px/1.55 ui-sans-serif, system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", sans-serif;
  -webkit-font-smoothing: antialiased;
}
[hidden] { display: none !important; }
[translate="no"] { unicode-bidi: isolate; }
a { color: var(--primary); }
a:hover { color: var(--primary-hi); }
button { font: inherit; }
::selection { background: var(--primary); color: #fff; }

.wrap, .portal { max-width: var(--col); margin: 0 auto; padding: 28px 24px 96px; }

/* ---------- type ---------- */
h1 { font-size: 30px; line-height: 1.15; font-weight: 700; letter-spacing: -0.02em; margin: 0 0 6px; }
h2 { font-size: 17px; font-weight: 650; letter-spacing: -0.01em; margin: 0 0 14px; }
h3 { font-size: 16px; font-weight: 650; margin: 0 0 4px; }
.greeting, .sub, .dim, .dim-line, .hint { color: var(--text-dim); }
.sub { font-size: 14px; margin: -6px 0 18px; }
.dim-line { font-size: 13.5px; margin-bottom: 14px; }
.greeting { font-size: 15px; margin-bottom: 28px; }
.num, .amount, .price, .stat .n, .human { font-variant-numeric: tabular-nums; }

/* Page head: title left, the single purchase action right. */
.page-head { display: flex; align-items: flex-end; justify-content: space-between; gap: 16px; margin: 0 0 26px; }
.page-head h1 { margin: 0; }
.head, header.portal-head { margin-bottom: 20px; }
.head h1, header.portal-head h1 { margin: 0; }
header.portal-head h1 .fa-solid { display: none; }

/* ---------- sections (not boxes) ---------- */
.card { background: transparent; border: 0; border-radius: 0; padding: 0 0 8px; margin: 0 0 22px; }
.card + .card, .two + .card { border-top: 1px solid var(--border); padding-top: 26px; }
.card h2 .fa-solid { display: none; }         /* headings carry no icon */
.two { display: grid; grid-template-columns: 1fr 1fr; gap: 0 40px; }
.two > .card { border-top: 1px solid var(--border); padding-top: 26px; }
@media (max-width: 720px) { .two { grid-template-columns: 1fr; } }

/* ---------- the pass: the one real card ---------- */
.pass {
  position: relative; overflow: hidden;
  background: linear-gradient(135deg, var(--bg-elev-2), var(--bg-elev) 70%);
  border: 1px solid var(--border); border-radius: var(--radius);
  padding: 22px 24px 20px; margin-bottom: 14px;
  box-shadow: 0 1px 0 rgba(255,255,255,.03) inset, 0 12px 30px rgba(0,0,0,.18);
}
.pass::before { content: ""; position: absolute; left: 0; top: 0; bottom: 0; width: 5px; background: var(--primary); }
.pass .plan-name { font-size: 22px; font-weight: 700; letter-spacing: -0.015em; line-height: 1.2; }
.pass .status-sub { margin-top: 8px; }
.subitem {
  position: relative; overflow: hidden;
  background: linear-gradient(135deg, var(--bg-elev-2), var(--bg-elev) 70%);
  border: 1px solid var(--border); border-radius: var(--radius);
  padding: 22px 24px 20px; margin-bottom: 14px;
  box-shadow: 0 12px 30px rgba(0,0,0,.18);
}
.subitem::before { content: ""; position: absolute; left: 0; top: 0; bottom: 0; width: 5px; background: var(--primary); }
.subitem h3 { font-size: 22px; font-weight: 700; letter-spacing: -0.015em; margin: 0; }
.subitem > .sub { margin: 6px 0 16px; }
.subitem .meta { margin-bottom: 16px; }
.subitem .actions { justify-content: flex-start; }

/* status: a dot and a word, not a pill */
.badge { display: inline-flex; align-items: center; gap: 7px; font-size: 13px; font-weight: 600; color: var(--text-dim); padding: 0; background: none; border-radius: 0; }
.badge::before { content: ""; width: 8px; height: 8px; border-radius: 50%; background: currentColor; }
.badge.active, .badge.trialing, .badge.ok, .badge.allowed { color: var(--good); }
.badge.paused, .badge.warn { color: var(--warn); }
.badge.canceled, .badge.past_due, .badge.bad, .badge.blocked { color: var(--bad); }
.status-line { display: flex; align-items: center; gap: 14px; flex-wrap: wrap; }
.status-sub { color: var(--text-dim); font-size: 14px; margin-top: 6px; }
.status-sub strong { color: var(--text); }
.status-sub .fa-solid, .visits .fa-solid, .btn-outline .fa-solid, button.ghost .fa-solid { display: none; }
.btn-outline { white-space: nowrap; }
.none-yet { font-size: 20px; font-weight: 700; letter-spacing: -0.015em; }

/* key/value pairs */
.meta { display: grid; grid-template-columns: 1fr 1fr; gap: 14px 24px; margin-bottom: 18px; }
.meta .label { color: var(--text-dim); font-size: 13px; letter-spacing: 0; text-transform: none; }
.meta .value { color: var(--text); font-weight: 500; margin-top: 1px; overflow-wrap: anywhere; }
.meta .value.none { color: var(--text-faint); font-weight: 400; }
@media (max-width: 560px) { .meta { grid-template-columns: 1fr; gap: 12px; } }

/* ---------- buttons ---------- */
.actions { display: flex; align-items: center; gap: 18px; flex-wrap: wrap; margin-top: 16px; }
.modal .actions, form .actions, .pm-actions { justify-content: flex-end; }
button.primary, a.btn.primary, a.btn-primary, .plan button, #add-card-btn, .btn-outline.primary {
  background: var(--primary); color: #fff; border: 0; border-radius: 999px;
  padding: 11px 20px; font-weight: 600; font-size: 14.5px; cursor: pointer;
  display: inline-flex; align-items: center; gap: 8px; text-decoration: none; line-height: 1.2;
}
button.primary:hover, a.btn.primary:hover, a.btn-primary:hover, .plan button:hover, #add-card-btn:hover { background: var(--primary-hi); color: #fff; }
button.primary:disabled { background: var(--border-strong); color: var(--text-faint); cursor: not-allowed; }
a.btn.big { width: 100%; justify-content: center; padding: 16px 20px; font-size: 16px; }
a.btn.big .fa-solid { font-size: 20px; }
button.ghost, a.btn.ghost, a.btn-ghost, .btn-outline {
  background: transparent; color: var(--text); border: 1px solid var(--border-strong); border-radius: 999px;
  padding: 10px 18px; font-weight: 500; font-size: 14px; cursor: pointer;
  display: inline-flex; align-items: center; gap: 8px; text-decoration: none; line-height: 1.2;
}
button.ghost:hover, a.btn.ghost:hover, a.btn-ghost:hover, .btn-outline:hover { border-color: var(--text-dim); color: var(--text); }
button.danger, .btn-outline.bad {
  background: transparent; color: var(--bad); border: 0; padding: 10px 4px; font-weight: 500; font-size: 14px; cursor: pointer; text-decoration: underline; text-underline-offset: 3px; text-decoration-color: transparent; border-radius: 0;
}
button.danger:hover, .btn-outline.bad:hover { text-decoration-color: currentColor; background: transparent; color: var(--bad); }
.pm-tile button, .rows a .chev { font-size: 14px; }

/* ---------- lists of places to go ---------- */
.rows { padding: 0; }
.rows a { display: flex; align-items: center; gap: 14px; padding: 14px 0; color: var(--text); text-decoration: none; border-bottom: 1px solid var(--border); }
.rows a:last-child { border-bottom: 0; }
.rows .ic { display: none; }                   /* no icon tiles */
.rows .lbl { font-weight: 600; }
.rows a:hover .lbl { color: var(--primary); }
.rows .hint { font-size: 13.5px; margin-top: 1px; }
.rows .chev { margin-left: auto; color: var(--text-faint); }
.rows .chev::before { content: "→"; font-family: inherit; font-weight: 400; }
.rows .chev.fa-solid::before { content: "→"; }
.card .more { display: inline-block; margin-top: 10px; font-size: 14px; text-decoration: none; }
.card .more .fa-solid::before { content: "→"; font-family: inherit; }

/* ---------- home ---------- */
.stat { display: flex; align-items: baseline; gap: 8px; }
.stat .n { font-size: 34px; font-weight: 700; line-height: 1; letter-spacing: -0.02em; }
.stat .l { color: var(--text-dim); }
.last-visit { color: var(--text-dim); font-size: 14px; margin-top: 8px; }
.visits { display: flex; align-items: center; gap: 10px; color: var(--text-dim); margin-top: 14px; }
.visits .fa-solid { display: none; }
.visits strong { color: var(--text); }

/* ---------- membership page ---------- */
.freeze-banner { background: transparent; border: 0; border-left: 3px solid var(--warn); border-radius: 0; padding: 4px 0 4px 14px; margin: 14px 0; }
.freeze-banner .title { font-weight: 600; color: var(--warn); margin-bottom: 2px; }
.freeze-banner .hint { font-size: 14px; margin-bottom: 10px; }
.empty { padding: 32px 0; color: var(--text-dim); text-align: left; }
.empty a { font-weight: 600; }
.empty .fa-solid { display: none; }

/* cards on file: a line each */
.pm-tile { display: flex; align-items: center; gap: 14px; padding: 14px 0; border: 0; border-bottom: 1px solid var(--border); border-radius: 0; background: transparent; margin: 0; }
.pm-tile:last-of-type { border-bottom: 0; }
.pm-tile.default { border-color: var(--border); }
.pm-tile .pm-icon { width: 44px; height: 28px; border: 1px solid var(--border-strong); border-radius: 5px; background: transparent; display: flex; align-items: center; justify-content: center; font-size: 10px; font-weight: 700; letter-spacing: .04em; color: var(--text-dim); }
.pm-tile .pm-info { flex: 1; }
.pm-tile .pm-brand { font-weight: 600; text-transform: none; }
.pm-tile .pm-brand .badge { margin-left: 8px; font-size: 12px; }
.pm-tile .pm-brand .badge::before { display: none; }
.pm-tile .gym-name { font-weight: 600; }
.pm-tile .pm-sub { font-size: 13.5px; color: var(--text-dim); font-variant-numeric: tabular-nums; }
.pm-tile button { background: transparent; border: 0; color: var(--text-dim); padding: 6px 2px; font-size: 14px; cursor: pointer; text-decoration: underline; text-underline-offset: 3px; text-decoration-color: transparent; }
.pm-tile button:hover { color: var(--text); text-decoration-color: currentColor; border: 0; }
.pm-tile button.danger:hover { color: var(--bad); }
.pm-tile button.ghost { border: 0; padding: 6px 2px; }
#add-card-btn { margin-top: 14px; }
#cards-unavailable { margin-top: 14px; }
.form-status { font-size: 13.5px; color: var(--text-dim); }
.form-status.ok { color: var(--good); }
.form-status.bad { color: var(--bad); }

/* ---------- account page ---------- */
form .grid2 { display: grid; grid-template-columns: 1fr 1fr; gap: 14px 18px; }
form .field { margin-bottom: 14px; }
form .field.full { grid-column: 1 / -1; }
form label, .modal label { display: block; color: var(--text-dim); font-size: 13px; margin-bottom: 6px; letter-spacing: 0; text-transform: none; }
form input, form select, .modal input[type=date], .modal textarea, .modal select {
  width: 100%; background: var(--bg-elev); border: 1px solid var(--border-strong); color: var(--text);
  padding: 11px 12px; border-radius: 10px; font: inherit;
}
form input:focus, form select:focus, .modal textarea:focus, .modal select:focus { outline: none; border-color: var(--primary); box-shadow: 0 0 0 3px color-mix(in srgb, var(--primary) 25%, transparent); }
.modal textarea { min-height: 70px; resize: vertical; }
.form-error { background: transparent; border: 0; border-left: 3px solid var(--bad); color: var(--bad); padding: 4px 0 4px 12px; border-radius: 0; margin-bottom: 14px; font-size: 14px; display: none; }
@media (max-width: 560px) { form .grid2 { grid-template-columns: 1fr; } }
.ladder { list-style: none; margin: 0 0 16px; padding: 0; }
.ladder li { display: flex; align-items: flex-start; gap: 12px; padding: 12px 0; border-bottom: 1px solid var(--border); }
.ladder li:last-child { border-bottom: 0; }
.ladder .fa-solid { margin-top: 4px; font-size: 13px; }
.ladder li.granted .fa-solid { color: var(--good); }
.ladder li.granted .name { font-weight: 600; }
.ladder li.locked .fa-solid { color: var(--text-faint); }
.ladder li.locked .name { color: var(--text-dim); }
.ladder .desc { color: var(--text-faint); font-size: 13.5px; margin-top: 2px; }
.note { display: flex; gap: 10px; align-items: flex-start; background: transparent; border: 0; border-left: 3px solid var(--border-strong); border-radius: 0; padding: 2px 0 2px 14px; color: var(--text-dim); font-size: 14px; }
.note .fa-solid { display: none; }
.toggle-row { display: flex; align-items: center; justify-content: space-between; gap: 16px; padding: 14px 0; border-bottom: 1px solid var(--border); }
.toggle-row:last-child { border-bottom: 0; }
.toggle-row .label-block .label { font-weight: 500; }
.toggle-row .label-block .hint { font-size: 13.5px; margin-top: 2px; }
.switch { position: relative; flex: none; width: 44px; height: 26px; background: var(--border-strong); border-radius: 999px; cursor: pointer; transition: background .15s; border: 0; }
.switch.on { background: var(--primary); }
.switch::after { content: ""; position: absolute; top: 3px; left: 3px; width: 20px; height: 20px; background: #fff; border-radius: 50%; transition: transform .15s; }
.switch.on::after { transform: translateX(18px); }
.danger-zone { border-top-color: var(--border); }
.danger-zone h2 { color: var(--text); }
.danger-row { display: flex; align-items: center; justify-content: space-between; gap: 16px; padding: 6px 0; }
.danger-row .d-label { font-weight: 500; }
.danger-row .d-hint { font-size: 13.5px; color: var(--text-dim); margin-top: 2px; }
#pwStatus { margin-right: auto; }

/* ---------- plans page ---------- */
.grid { display: grid; grid-template-columns: 1fr; gap: 14px; }
.plan { display: flex; flex-direction: column; background: var(--bg-elev); border: 1px solid var(--border); border-radius: var(--radius); padding: 22px 24px; position: relative; }
.plan.featured { border-color: var(--primary); }
.plan.featured::before { content: attr(data-badge); position: absolute; top: 18px; right: 20px; color: var(--primary); font-size: 12px; font-weight: 700; letter-spacing: .02em; background: none; padding: 0; }
.plan h3 { font-size: 20px; font-weight: 700; letter-spacing: -0.015em; margin: 0 0 4px; padding-right: 110px; }
.plan .desc { color: var(--text-dim); font-size: 14px; min-height: 0; }
.plan .price { margin: 12px 0 10px; font-size: 32px; font-weight: 700; letter-spacing: -0.02em; line-height: 1; }
.plan .price .per { font-size: 14px; font-weight: 400; color: var(--text-dim); letter-spacing: 0; }
.plan ul { padding-left: 18px; margin: 0 0 18px; color: var(--text-dim); font-size: 14px; }
.plan ul li { margin-bottom: 3px; }
.plan button { align-self: flex-start; margin-top: auto; }
.desk-banner { background: transparent; border: 0; border-left: 3px solid var(--warn); border-radius: 0; padding: 4px 0 4px 14px; margin-bottom: 20px; color: var(--text-dim); }
.plan .desk-note { margin-top: auto; padding: 0; border: 0; text-align: left; color: var(--text-dim); font-size: 14px; }

/* ---------- purchases + check-ins ---------- */
.history-row { display: flex; justify-content: space-between; align-items: center; gap: 12px; padding: 13px 0; border-bottom: 1px solid var(--border); }
.history-row:last-child { border-bottom: 0; }
.history-row .when { color: var(--text-dim); font-size: 14px; font-variant-numeric: tabular-nums; min-width: 110px; }
.history-row .what { flex: 1; }
.history-row .amount { font-weight: 600; font-variant-numeric: tabular-nums; }
.history-row .amount.refunded { color: var(--text-faint); text-decoration: line-through; }
.summary { display: flex; align-items: center; gap: 10px; color: var(--text-dim); margin-bottom: 8px; font-size: 15px; }
.summary .fa-solid { display: none; }
.summary strong { color: var(--text); }
h2.month { font-size: 13.5px; font-weight: 600; color: var(--text-dim); margin: 28px 0 4px; text-transform: none; letter-spacing: 0; }
h2.month::first-letter { text-transform: uppercase; }
.row { display: flex; align-items: center; gap: 14px; padding: 12px 0; border-bottom: 1px solid var(--border); }
.row:last-child { border-bottom: 0; }
.row .when { flex: 1; min-width: 0; }
.row .when .date { font-weight: 500; }
.row .when .date::first-letter { text-transform: uppercase; }
.row .when .time { color: var(--text-dim); font-size: 13.5px; }
.row .source { color: var(--text-faint); font-size: 13px; white-space: nowrap; }
.rows:not(:has(a)) { background: transparent; border: 0; border-radius: 0; overflow: visible; }
.badge .fa-solid { display: none; }

/* ---------- the code page ---------- */
.code-card { background: #fff; border-radius: 16px; padding: 24px 16px 18px; text-align: center; color: #0a0d14; max-width: 440px; margin: 0 auto; box-shadow: 0 12px 30px rgba(0,0,0,.18); }
.code-card .who { font-size: 16px; font-weight: 600; }
.code-card .gym { font-size: 12px; color: #6b7280; margin-top: 2px; }
.code-card .sym { margin: 18px 0 6px; }
.code-card svg { display: block; margin: 0 auto; max-width: 100%; height: auto; }
.code-card .human { font-size: 18px; letter-spacing: .22em; font-weight: 600; margin-top: 2px; }
.code-card .stamp { font-size: 11px; color: #8892a6; margin-top: 10px; }
.code-card .mark { font-size: 10px; letter-spacing: .04em; color: #aeb6c6; margin-top: 14px; }
.code-card .mark a { color: inherit; text-decoration: none; }
.code-card + .actions, .actions.code-actions { max-width: 440px; margin: 16px auto 0; }
.actions > button.btn { flex: 1; }
.btn { border-radius: 999px; padding: 12px; font-size: 14.5px; font-weight: 600; cursor: pointer; border: 1px solid var(--border-strong); background: transparent; color: var(--text); }
.btn.primary { background: var(--primary); border-color: var(--primary); color: #fff; }
.tips { margin: 28px auto 0; max-width: 440px; background: transparent; border: 0; padding: 0; }
.tips h2 { font-size: 13.5px; color: var(--text-dim); text-transform: none; letter-spacing: 0; margin-bottom: 6px; }
.tips ul { margin: 0; padding-left: 18px; }
.tips li { color: var(--text-dim); font-size: 14px; margin: 5px 0; }
.notice { max-width: 440px; margin: 0 auto; background: transparent; border: 1px dashed var(--border-strong); border-radius: var(--radius); padding: 32px 24px; text-align: center; }
.notice .fa-solid { font-size: 24px; color: var(--text-faint); margin-bottom: 10px; }
.notice h2 { font-size: 17px; }
.notice p { color: var(--text-dim); margin: 0; }
.history-link { display: flex; align-items: center; gap: 12px; max-width: 440px; margin: 22px auto 0; padding: 14px 0; border: 0; border-top: 1px solid var(--border); border-radius: 0; background: transparent; color: var(--text); text-decoration: none; font-weight: 600; }
.history-link .fa-clock-rotate-left { display: none; }
.history-link .fa-chevron-right::before { content: "→"; font-family: inherit; font-weight: 400; color: var(--text-faint); }
.present { position: fixed; inset: 0; background: #fff; display: none; flex-direction: column; align-items: center; justify-content: center; gap: 16px; z-index: 50; color: #0a0d14; padding: 24px; }
.present.on { display: flex; }
.present .human { font-size: 22px; letter-spacing: .24em; font-weight: 600; }
.present .close { position: absolute; top: 14px; right: 18px; font-size: 22px; color: #5f6a82; background: none; border: 0; cursor: pointer; line-height: 1; }
.present .mark { position: absolute; bottom: 22px; font-size: 10px; letter-spacing: .04em; color: #aeb6c6; }

/* ---------- modals, toast ---------- */
.modal-bg { display: none; position: fixed; inset: 0; background: rgba(0,0,0,.6); backdrop-filter: blur(6px); z-index: 100; align-items: center; justify-content: center; padding: 16px; }
.modal-bg.open { display: flex; }
.modal { background: var(--bg-elev); border: 1px solid var(--border-strong); border-radius: 18px; padding: 28px; max-width: 480px; width: 100%; box-shadow: 0 24px 60px rgba(0,0,0,.45); }
.modal h3 { font-size: 20px; letter-spacing: -0.015em; margin: 0 0 6px; }
.modal .sub { margin: 0 0 18px; }
.modal .field { margin-bottom: 14px; }
.modal .summary { display: block; background: var(--bg-elev-2); border: 1px solid var(--border); border-radius: 12px; padding: 4px 16px; margin: 14px 0; color: var(--text); font-size: 15px; }
.modal .summary .row { display: flex; justify-content: space-between; gap: 12px; padding: 9px 0; border-bottom: 1px solid var(--border); font-variant-numeric: tabular-nums; }
.modal .summary .row:last-child { border-bottom: 0; }
.modal .summary .row .l { color: var(--text-dim); }
.modal .summary .row .v { font-weight: 600; }
.modal .summary .row.total { font-weight: 700; font-size: 16px; }
.modal #cardMount { margin: 14px 0; }
.modal .error, .error { background: transparent; border: 0; border-left: 3px solid var(--bad); color: var(--bad); padding: 4px 0 4px 12px; border-radius: 0; margin-bottom: 14px; font-size: 14px; }
.modal .attn { display: flex; gap: 10px; align-items: flex-start; background: transparent; border: 0; border-left: 3px solid var(--warn); border-radius: 0; padding: 2px 0 2px 12px; color: var(--text); font-size: 14px; margin-bottom: 10px; }
.modal .attn .fa-solid { display: none; }
.modal .note { margin-bottom: 10px; }
.modal .ack { background: transparent; border: 1px solid var(--border-strong); border-radius: 12px; padding: 12px 14px; margin-bottom: 14px; }
.modal .ack label { color: var(--text); font-size: 14px; display: flex; gap: 10px; align-items: flex-start; cursor: pointer; margin: 0; }
.modal .ack button.ghost { color: var(--primary); text-decoration: underline; text-underline-offset: 3px; padding: 4px 0; }
.modal .ack input { margin-top: 3px; accent-color: var(--primary); }
.modal button.ghost { border: 0; color: var(--text-dim); padding: 10px 8px; }
.modal button.ghost:hover { color: var(--text); }
.toast { position: fixed; bottom: 24px; left: 50%; transform: translate(-50%, 20px); background: var(--text); color: var(--bg); padding: 12px 18px; border-radius: 999px; font-weight: 500; box-shadow: 0 8px 24px rgba(0,0,0,.3); opacity: 0; transition: all .2s; z-index: 200; border: 0; }
.toast.show { transform: translate(-50%, 0); opacity: 1; }
.toast.bad { background: var(--bad); color: #fff; }

/* ---------- preview ribbon (CRM theme editor) ---------- */
.preview-ribbon { display: none; position: fixed; top: 10px; right: 10px; z-index: 60; background: var(--warn); color: #1a1200; font-size: 10px; font-weight: 700; letter-spacing: 2px; padding: 4px 12px; border-radius: 20px; pointer-events: none; }
body.is-preview .preview-ribbon { display: block; }
body.is-preview a { cursor: default; }

/* ---------- phone ---------- */
@media (max-width: 640px) {
  .wrap, .portal { padding: 18px 16px 96px; }
  h1 { font-size: 26px; }
  .page-head { flex-direction: column; align-items: flex-start; gap: 12px; }
  .pass, .subitem { padding: 18px 18px 16px; }
  .plan h3 { padding-right: 0; }
  .plan.featured::before { position: static; display: block; margin-bottom: 6px; }
  .history-row .when { min-width: 86px; font-size: 13px; }
}
