/* 💳 Plans (billing.js): the Plan dialog and the lockout. The same file in every Boy app. Its own
   colours (light and dark), so it looks the same wherever it opens. */
.mb-wrap {
  --mb-bg: #ffffff; --mb-ink: #1d2433; --mb-sub: #5b6475; --mb-line: #e3e7ee; --mb-soft: #f4f6fa;
  --mb-brand: #2f7d4f; --mb-gold: #f2b630; --mb-warn: #b4441c;
  position: fixed; inset: 0; z-index: 2147483000; display: flex; align-items: center; justify-content: center;
  padding: 16px; background: rgba(15, 20, 30, .55); overflow-y: auto;
  font: 15px/1.45 system-ui, -apple-system, "Segoe UI", Roboto, sans-serif; color: var(--mb-ink);
}
.mb-wrap[hidden] { display: none; }
@media (prefers-color-scheme: dark) {
  .mb-wrap { --mb-bg: #1b2130; --mb-ink: #eef1f7; --mb-sub: #a7b0c2; --mb-line: #2e3648; --mb-soft: #242b3b; --mb-brand: #5cc08a; --mb-warn: #ff9a73; }
}
html.mb-open { overflow: hidden; }
.mb-card {
  width: 100%; max-width: 440px; margin: auto; background: var(--mb-bg); border-radius: 16px; padding: 20px;
  box-shadow: 0 18px 50px rgba(0, 0, 0, .3);
}
.mb-head { display: flex; align-items: center; justify-content: space-between; gap: 8px; margin-bottom: 6px; }
.mb-head h2 { margin: 0; font-size: 1.25rem; }
.mb-x { border: 0; background: none; color: var(--mb-sub); font-size: 1.1rem; cursor: pointer; padding: 4px 8px; border-radius: 8px; }
.mb-x:hover { background: var(--mb-soft); }
.mb-status { margin: .4rem 0 .8rem; }
.mb-note { margin: .2rem 0 .6rem; padding: .55rem .7rem; border-radius: 10px; background: var(--mb-soft); }
.mb-sub { color: var(--mb-sub); font-size: .9em; }
.mb-small { font-size: .8em; margin: .9rem 0 0; }
.mb-warn { color: var(--mb-warn); font-size: .85em; display: block; }
.mb-subs { list-style: none; margin: 0 0 .8rem; padding: 0; border: 1px solid var(--mb-line); border-radius: 12px; }
.mb-subs li { display: flex; align-items: center; justify-content: space-between; gap: 10px; padding: .6rem .75rem; }
.mb-subs li + li { border-top: 1px solid var(--mb-line); }
.mb-plans { display: grid; gap: 10px; margin: .4rem 0 .6rem; }
.mb-plan {
  display: grid; grid-template-columns: 1fr auto; gap: 2px 10px; text-align: left; cursor: pointer; width: 100%;
  border: 2px solid var(--mb-line); border-radius: 14px; background: var(--mb-bg); color: inherit; padding: .75rem .9rem; font: inherit;
}
.mb-plan:hover:not(:disabled) { border-color: var(--mb-brand); }
.mb-plan b { font-size: 1.05rem; }
.mb-plan span { font-weight: 700; color: var(--mb-brand); white-space: nowrap; }
.mb-plan small { grid-column: 1 / -1; color: var(--mb-sub); }
.mb-super { border-color: var(--mb-gold); }
.mb-foot { display: flex; flex-wrap: wrap; gap: 8px; margin-top: .4rem; }
.mb-btn {
  border: 1px solid var(--mb-line); background: var(--mb-soft); color: inherit; border-radius: 10px; padding: .45rem .8rem;
  font: inherit; font-size: .92em; cursor: pointer; white-space: nowrap;
}
.mb-btn:hover:not(:disabled) { border-color: var(--mb-brand); }
.mb-quiet { background: none; }
.mb-wrap button:disabled { opacity: .55; cursor: progress; }
@media (max-width: 420px) {
  .mb-wrap { padding: 10px; align-items: flex-end; }
  .mb-card { border-radius: 16px 16px 12px 12px; padding: 16px; }
}
/* 🎁 Invite a friend (invite.js) uses the same dialog, with more room inside: the card's padding, then
   even space between the description, the link, the buttons, what you've earned and the footnote.
   .mi-wrap in front so an app's own p, ul and input styles don't win over these. */
.mi-wrap .mb-card { box-sizing: border-box; padding: 24px; }
.mi-wrap .mb-head { margin-bottom: 12px; }
.mi-wrap .mb-note { margin: 0 0 14px; }
.mi-wrap .mi-what { margin: 0 0 16px; }
.mi-wrap .mi-link { margin: 0 0 12px; padding: 0; border: 0; }
.mi-wrap .mi-url {
  display: block; width: 100%; box-sizing: border-box; margin: 0; border: 1px solid var(--mb-line); border-radius: 10px;
  background: var(--mb-soft); color: inherit; font: inherit; font-size: .9em; padding: .6rem .75rem; box-shadow: none;
}
.mi-wrap .mi-acts { margin: 0 0 16px; }
.mi-wrap .mi-earned { margin: 0 0 16px; }
.mi-wrap .mi-none { margin: 0 0 16px; }
.mi-wrap .mi-foot { margin: 0; padding-top: 14px; border-top: 1px solid var(--mb-line); }
.mi-earned li { justify-content: flex-start; }
@media (max-width: 420px) { .mi-wrap .mb-card { padding: 20px 18px; } }
a.mb-btn { text-decoration: none; display: inline-flex; align-items: center; }
/* 🏅 ⭐ SuperBoy, free forever (billing.js showFounder): the first 100's thank-you, in the same dialog with the
   invite's room inside; "You're #7 of our first 100!" big, and 🎁 Invite a friend in SuperBoy's gold. */
.mf-wrap .mb-card { box-sizing: border-box; padding: 24px; }
.mf-wrap .mb-head { margin-bottom: 12px; }
.mf-wrap .mf-big { margin: 0 0 12px; font-size: 1.5em; font-weight: 800; line-height: 1.25; }
.mf-wrap .mf-what { margin: 0 0 14px; }
.mf-wrap .mf-ask { margin: 0 0 16px; }
.mf-wrap .mf-acts { margin: 0; justify-content: flex-end; }
.mf-wrap .mf-invite { border-color: var(--mb-gold); background: var(--mb-gold); color: #3b2a00; font-weight: 700; }
@media (max-width: 420px) { .mf-wrap .mb-card { padding: 20px 18px; } }

/* ⭐ Premium (billing.js paintPremium): the gold ⭐ after the top bar's Beta pill, on every screen; the bar itself stays as
   it is ("actually go back to previous, no gold bar but pill", Jared, 2026-11-20). Hovered, tapped (.open) or reached
   with Tab, it opens out to the right to say the plan and until when ("SuperBoy Premium · Renews on Dec 20, 2026").
   The ⭐ keeps its own small room in the bar (.premium-pill) and the gold face opening out floats over what's beside it,
   so nothing in a full phone bar moves or wraps; near the screen's right edge it slides left to stay on it
   (--premium-shift, from billing.js fitPill). Hover opens it only where there's a real mouse (a phone's tap would
   leave it stuck open: there .open does it, billing.js); opened by hover the words don't catch clicks meant for what's
   under them, only the ⭐'s own room does. */
.premium-pill { position: relative; flex: 0 0 auto; align-self: center; display: inline-block; width: 1.45rem; height: 1.15rem; margin-left: .35rem; font-size: .65rem; font-weight: 800; letter-spacing: .02em; line-height: 1.4; cursor: default; outline: none; }
.premium-face { pointer-events: none; position: absolute; left: 0; top: 0; bottom: 0; min-width: 100%; box-sizing: border-box; display: inline-flex; align-items: center; justify-content: center; padding: 0 .25rem; border: 1px solid #d4a017; border-radius: 999px; background: linear-gradient(135deg, #fde68a, #f5c542); color: #5c3d00; white-space: nowrap; transition: padding .2s ease, box-shadow .2s ease, transform .25s ease; }
.premium-more { display: inline-block; max-width: 0; overflow: hidden; opacity: 0; transition: max-width .25s ease, opacity .2s ease, margin .25s ease; }
.premium-pill.open .premium-face, .premium-pill:focus-visible .premium-face { padding: 0 .55rem 0 .3rem; box-shadow: 0 2px 8px rgba(92, 61, 0, .25); transform: translateX(var(--premium-shift, 0px)); }
.premium-pill.open .premium-more, .premium-pill:focus-visible .premium-more { max-width: 22rem; opacity: 1; margin-left: .25rem; }
.premium-pill.open .premium-face { pointer-events: auto; } /* (tapped open: a tap on the words closes it) */
.premium-pill:focus-visible .premium-face { outline: 2px solid #d4a017; outline-offset: 2px; }
.premium-pill.open, .premium-pill:focus-visible { z-index: 60; }
@media (hover: hover) and (pointer: fine) {
  .premium-pill:hover .premium-face { padding: 0 .55rem 0 .3rem; box-shadow: 0 2px 8px rgba(92, 61, 0, .25); transform: translateX(var(--premium-shift, 0px)); }
  .premium-pill:hover .premium-more { max-width: 22rem; opacity: 1; margin-left: .25rem; }
  .premium-pill:hover { z-index: 60; }
}
@media (max-width: 600px) { .premium-pill { margin-left: .2rem; } }
@media (prefers-reduced-motion: reduce) { .premium-face, .premium-more { transition: none; } }

/* ⚙️ Settings → 👤 Account → 💳 Plan & billing (billing.js settingsHtml), the same in all four apps: in the app's own
   colours (it sits in the app's page, not the dialog); its heading is the app's .acct-h. */
.mb-set-line { margin: .35rem 0 .25rem; font-weight: 600; }
.mb-set-what { margin: 0; font-size: .9em; opacity: .8; }
.mb-set-btns { display: flex; flex-wrap: wrap; gap: .5rem; margin-top: .6rem; }
