/* Uni Marriage Bureau — member page. UMR-004 §4 v1.6: wide (~1280px), nothing overlaps, progressive on small screens,
   never a horizontal scroll. Colours as tokens; dark mode follows the device. */
:root {
  --green: #3b0a2a; --green-2: #b3122e; --gold: #f59e0b;
  --bg: #fff9f2; --card: #ffffff; --text: #1c2420; --muted: #5d6a63; --line: #ecdccd; --bad: #b3261e; --ok: #1d6b50;
  --focus: #2f7dd1;
  color-scheme: light dark;
}
@media (prefers-color-scheme: dark) {
  :root { --bg: #161012; --card: #241a1d; --text: #e7ece9; --muted: #a3b0a9; --line: #3a2c30; --green-2: #f2788e; --ok: #5fc29b; --bad: #ff8a80; }
}
* { box-sizing: border-box; }
[hidden] { display: none !important; }
html, body { margin: 0; max-width: 100%; overflow-x: hidden; }
body { background: var(--bg); color: var(--text); font: 16px/1.5 system-ui, -apple-system, "Segoe UI", Roboto, "Noto Sans Gujarati", "Noto Sans Devanagari", sans-serif; min-height: 100vh; display: flex; flex-direction: column; }
a { color: var(--green-2); }
.sr { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.muted { color: var(--muted); }
small, .small { font-size: .88em; }
:focus-visible { outline: 3px solid var(--focus); outline-offset: 2px; }

/* top bar: one row; it narrows step by step */
.top { background: var(--green); color: #fff; position: sticky; top: 0; z-index: 5; }
.top-in { max-width: 1280px; margin: 0 auto; padding: 8px 16px; display: flex; align-items: center; gap: 10px; min-width: 0; }
.brand { display: flex; align-items: center; gap: 8px; color: #fff; text-decoration: none; min-width: 0; }
.brand img { border-radius: 8px; background: #fff; object-fit: contain; flex: none; }
.brand-name { font-weight: 700; font-size: 1.1rem; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.spacer { flex: 1; }
.top button, .top select { font: inherit; border-radius: 8px; border: 1px solid rgba(255,255,255,.45); background: transparent; color: #fff; padding: 6px 10px; cursor: pointer; }
.top select option { color: #000; }
.club-btn { background: rgba(255,255,255,.12) !important; white-space: nowrap; }
.who { font-size: .9rem; opacity: .9; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; max-width: 260px; }
@media (max-width: 950px) { .who { max-width: 150px; } }
@media (max-width: 768px) { .who { display: none; } }
@media (max-width: 520px) { .hide-s { display: none; } .brand-name { font-size: 1rem; } }

.wrap { width: 100%; max-width: 1280px; margin: 0 auto; padding: 20px 16px 32px; flex: 1; }
h1 { font-size: 1.5rem; margin: 0 0 4px; }
h2 { font-size: 1.15rem; margin: 0 0 12px; }
.card { background: var(--card); border: 1px solid var(--line); border-radius: 14px; padding: 18px; margin-bottom: 16px; }

/* sign-in */
.auth { max-width: 460px; margin: 24px auto; }
.auth label { display: block; margin: 10px 0 4px; font-weight: 600; }
.auth input { width: 100%; }
.screen-code { display: block; margin: 10px 0; max-width: 100%; height: auto; border-radius: 8px; background: #fff; }
.row { display: flex; gap: 8px; flex-wrap: wrap; align-items: center; margin-top: 12px; }

input, select, textarea { font: inherit; color: var(--text); background: var(--card); border: 1px solid var(--line); border-radius: 8px; padding: 7px 10px; min-width: 0; max-width: 100%; }
button.primary, button.ghost { font: inherit; border-radius: 10px; padding: 8px 16px; cursor: pointer; }
button.primary { background: var(--green); color: #fff; border: 1px solid var(--green); font-weight: 600; }
button.ghost { background: transparent; color: var(--text); border: 1px solid var(--line); }
button:disabled { opacity: .55; cursor: default; }
.msg { min-height: 1.4em; margin-top: 10px; }
.msg.bad { color: var(--bad); }
.msg.ok { color: var(--ok); }

.ids { display: flex; flex-wrap: wrap; gap: 6px 14px; margin: 4px 0 16px; }
.ids code { background: var(--card); border: 1px solid var(--line); border-radius: 8px; padding: 2px 8px; font-size: .9rem; word-break: break-all; }

/* form fields as wide as their text (UMR-004 §4), 3–5 in a row, fewer on a phone */
.fields { display: flex; flex-wrap: wrap; gap: 12px 16px; }
.f { display: flex; flex-direction: column; gap: 4px; }
.f > span { font-weight: 600; font-size: .92rem; }
.f input, .f select { width: 220px; }
.f.wide input { width: 330px; }
@media (max-width: 520px) { .f, .f input, .f select, .f.wide input { width: 100%; } }

/* the member page: status card, join card, plans (src/umb.mjs) */
.umb { max-width: 1280px; }
.status { border-left: 6px solid var(--gold); }
.status.ok { border-left-color: var(--ok); }
.status h2 { margin: 0 0 4px; }
.tick { display: flex; gap: 8px; align-items: flex-start; margin: 10px 0; font-weight: 600; }
.tick input { width: auto; margin-top: 4px; }
.plans { display: grid; grid-template-columns: repeat(auto-fill, minmax(min(100%, 220px), 1fr)); gap: 12px; }
.plan .price { font-size: 1.3rem; font-weight: 700; margin: 4px 0; }
.soon-list li { margin: 4px 0; }
.ok-t { color: var(--ok); font-weight: 600; }
.bad-t, .warn { color: var(--bad); font-weight: 600; }
button.danger { color: var(--bad); border-color: var(--bad); }

.foot { text-align: center; padding: 14px 16px 22px; font-size: .88rem; color: var(--muted); }
.foot a { color: var(--muted); }

/* MyAppClub section */
.club-dlg { border: 1px solid var(--line); border-radius: 16px; padding: 0; width: min(720px, calc(100vw - 32px)); background: var(--card); color: var(--text); }
.club-dlg::backdrop { background: rgba(0,0,0,.45); }
.dlg-in { padding: 18px; }
.dlg-act { display: flex; justify-content: flex-end; margin-top: 14px; }
.club-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(180px, 1fr)); gap: 10px; }
.club-box { display: flex; flex-direction: column; gap: 4px; text-align: left; font: inherit; color: var(--text); background: var(--bg); border: 1px solid var(--line); border-radius: 12px; padding: 12px; text-decoration: none; cursor: pointer; }
.club-apps { margin-top: 12px; display: grid; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); gap: 6px; }
.club-app { display: flex; justify-content: space-between; gap: 8px; align-items: center; padding: 8px 10px; border: 1px solid var(--line); border-radius: 10px; text-decoration: none; color: var(--text); }
.club-app.soon { opacity: .55; }
.pill { font-size: .75rem; padding: 1px 8px; border-radius: 99px; border: 1px solid var(--line); white-space: nowrap; }
.pill.live { background: var(--green); color: #fff; border-color: var(--green); }
.code-in { width: 9.5em; }
.btn-uni { display: inline-block; background: var(--green); color: #fff; border: 1px solid var(--green); border-radius: 10px; padding: 9px 18px; font-weight: 600; text-decoration: none; }
.btn-uni:hover { filter: brightness(1.1); }
.or-code { font-size: 1rem; margin: 18px 0 0; padding-top: 14px; border-top: 1px solid var(--line); color: var(--muted); }

/* Continue with My UniLogin (inside the Sign In form) */
.land .with-uni { margin: 16px 0 0; }
.land .with-uni .btn-uni { background: #fff; color: #0f3b2c; border-color: #fff; border-radius: 999px; }

/* UMR-004 v3.2 §3 item 11: ONE header button "Free Login" (the separate page /login/) */
.top .free-login { flex: none; display: inline-block; background: #f6d27a; color: #0f3b2c; border-radius: 999px; padding: 7px 18px; font-weight: 800; text-decoration: none; white-space: nowrap; }
.top .free-login:hover, .top .free-login:focus-visible { filter: brightness(1.06); }
/* the main page before sign-in: what Uni Marriage Bureau does */
.home h1 { margin: 0 0 8px; font-size: clamp(1.3rem, 2.6vw, 1.8rem); color: var(--green-2); }
.home .feats { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 12px; margin: 16px 0; }
.home .feat { border: 1px solid var(--line); border-radius: 12px; padding: 12px; }
.home .feat p { margin: 6px 0 0; }
@media (max-width: 900px) { .home .feats { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (max-width: 480px) { .home .feats { grid-template-columns: minmax(0, 1fr); } }
.land .card.auth .with-uni .btn-uni { background: var(--green); color: #fff; border-color: var(--green); }
.top button.ghost { color: #fff; border-color: rgba(255,255,255,.45); } /* the header Sign out stays readable on the green bar */
/* v3.2 §3 item 11(c): Sign Up on this page */
.land .signup { margin-top: 20px; }
.land .signup .tick { display: flex; gap: 8px; align-items: flex-start; font-weight: 400; margin: 10px 0; }
.land .signup .su-code { font: 800 2rem/1.2 ui-monospace, Consolas, monospace; letter-spacing: .3em; color: var(--green-2); margin: 6px 0 12px; }
.land .signup .ga-qr-box { margin: 10px 0; }
.land .signup .ga-qr { background: #fff; padding: 8px; border-radius: 10px; width: 220px; height: 220px; image-rendering: pixelated; }
.land .signup .ga-key, .land .signup .su-id { word-break: break-all; font-weight: 700; }
.land .signup .su-rc { background: var(--bg); border: 1px solid var(--line); border-radius: 10px; padding: 10px 14px; font-size: 1rem; white-space: pre-wrap; }
.land .signup .tick input { width: auto; flex: none; margin: 4px 0 0; }
/* v3.3: Uni Marriage Bureau's forms inside the MyAppClub Login Kit's panel (the kit draws the box); light like the kit */
.mlk-panel .umb-panel { text-align: left; color: #1c2420; }
.mlk-panel .umb-panel .card { border: 0; padding: 0; margin: 0; background: transparent; box-shadow: none; color: inherit; }
.mlk-panel .umb-panel .muted { color: #5d6a63; }
.mlk-panel .umb-panel input { background: #fff; color: #1c2420; }
.mlk-panel .umb-panel button.ghost { color: #1c2420; }
body.kit-login { display: block; background: #fff; }
/* UMR-004 v3.6: in ur / ks / sd the page runs right-to-left; a text still in English (no translation yet) keeps its own direction */
html[dir="rtl"] :is(p, h1, h1 span, h1 em, h2, h3, li, summary, label, small, strong, figcaption, a, button) { unicode-bidi: plaintext; }
