/* Flamingo, the redesign, groups part: the Groups tab, the
   group page, invite, chat, availability, photos, the new-group steps, group
   settings and the owner hand-over. Builds on r.css (tokens, buttons, cards,
   chips, faces); only what those pages add is here. Phone first, desktop from
   900px. */

/* ---------- shared bits ---------- */
.rg-roundbtn { width: 44px; height: 44px; border-radius: 22px; background: var(--bg); color: var(--text) !important; display: inline-flex; align-items: center; justify-content: center; flex: none; text-decoration: none; position: relative; z-index: 1; }
.rg-roundbtn.is-plain { background: transparent; margin-left: -10px; }
.rg-sec { display: flex; flex-direction: column; gap: 10px; }
.rg-sec-head { display: flex; align-items: baseline; justify-content: space-between; gap: 12px; }
.r .rg-small { min-height: 36px; padding: 0 14px; font-size: 14px; }
.r-face-lg { width: 48px; height: 48px; font-size: 16px; }
.r-face-md { width: 40px; height: 40px; font-size: 14px; }
.r .face { width: 22px; height: 22px; border-radius: 50%; display: inline-flex; align-items: center; justify-content: center; font-size: 10px; font-weight: 700; font-style: normal; background: var(--f1-bg); color: var(--f1-fg); object-fit: cover; vertical-align: middle; flex: none; }
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.rg-fold { border: 1px solid var(--line); border-radius: 20px; padding: 0 16px; }
.rg-fold > summary { min-height: 52px; display: flex; align-items: center; cursor: pointer; font-weight: 700; font-size: 15px; list-style: none; }
.rg-fold > summary::-webkit-details-marker { display: none; }
.rg-fold[open] { padding-bottom: 16px; }
.rg-fold[open] > summary { border-bottom: 1px solid var(--line); margin-bottom: 14px; }
.rg-all > summary { cursor: pointer; font-size: 14px; font-weight: 700; color: var(--link); min-height: 40px; display: flex; align-items: center; }
.rg-plist { display: flex; flex-direction: column; gap: 10px; padding-top: 6px; }
.rg-plist li { display: flex; align-items: center; gap: 12px; }
.rg-plist-name { flex: 1; min-width: 0; font-size: 15px; font-weight: 600; overflow-wrap: anywhere; display: flex; flex-direction: column; }
.rg-plist-name small { font-size: 12px; font-weight: 500; color: var(--muted); }
.rg-prole { font-size: 12px; color: var(--muted); font-weight: 600; }
.rg-row { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 8px 0; border-bottom: 1px solid var(--line); font-size: 15px; }

/* ---------- Groups tab ---------- */
.rg-titlebar { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding-top: 20px; }
.rg-titlebar .r-title { font-size: 30px; }
.r .button.rg-new { min-height: 44px; padding: 0 16px 0 12px; font-size: 14px; gap: 6px; }
.rg-glist { display: flex; flex-direction: column; gap: 10px; }
.rg-grow { display: flex; align-items: center; gap: 14px; padding: 14px; border-radius: 20px; border: 1px solid var(--line); background: var(--surface); color: var(--text) !important; text-decoration: none; }
.rg-grow:hover { border-color: var(--border); }
.rg-gitem { border: 1px solid var(--line); border-radius: 20px; background: var(--surface); overflow: hidden; }
.rg-gitem .rg-grow { border: 0; border-radius: 0; background: none; }
.rg-gchat { display: flex; align-items: center; gap: 10px; min-height: 44px; padding: 8px 14px; border-top: 1px solid var(--line); background: var(--card); color: var(--muted) !important; font-size: 14px; text-decoration: none; }
.rg-gchat-text { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.rg-gchat.is-unread { color: var(--text) !important; }
.rg-gchat.is-unread .rg-gchat-text { font-weight: 700; }
.rg-gchat:hover .rg-gchat-text { text-decoration: underline; }
.rg-grow-text { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 3px; }
.rg-grow-name { font-size: 17px; font-weight: 800; overflow-wrap: anywhere; }
.rg-grow-sub { font-size: 13px; color: var(--muted); }
.rg-grow .r-chip { align-self: flex-start; margin-top: 3px; margin-right: 0; }
.r-empty { align-items: center; text-align: center; gap: 6px; padding: 24px 16px; }
.r-empty .r-ico { width: 32px; height: 32px; color: var(--link); margin-bottom: 4px; }
.r-empty strong { font-size: 17px; }

/* ---------- group page ---------- */
.rg { display: flex; flex-direction: column; }
.rg-cover { position: relative; height: 132px; background: var(--part-cover, var(--f3-bg)); border-bottom: var(--part-cover-edge, 0 solid transparent); display: flex; align-items: flex-start; justify-content: space-between; padding: 10px 12px; margin-bottom: 36px; }
.rg-cover-img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.rg-cover .rg-roundbtn { box-shadow: 0 1px 6px rgba(11, 31, 58, 0.18); }
.rg-cover .rg-mark { position: absolute; left: 20px; bottom: -32px; width: 68px; height: 68px; font-size: 20px; border: 4px solid var(--bg); box-sizing: border-box; background-clip: padding-box; }
.rg-page { padding-top: 12px; }
.rg-head { display: flex; flex-direction: column; gap: 6px; }
.rg-head .r-title { font-size: 30px; }
.rg-line { font-size: 15px; color: var(--muted); }
.rg-chips { display: flex; flex-wrap: wrap; gap: 6px; padding-top: 4px; align-items: center; }
.rg-chips li { font-size: 13px; font-weight: 600; padding: 5px 10px; border-radius: 999px; background: var(--tile); }
.rg-chips li:has(a) { background: none; padding: 5px 4px; }
.rg-chips a { font-weight: 700; }
.rg-about { font-size: 14px; color: var(--muted); display: -webkit-box; -webkit-line-clamp: 3; -webkit-box-orient: vertical; overflow: hidden; }
.rg-actions { display: flex; align-items: center; gap: 10px; }
.r .rg-actions .button { flex: 1; min-height: 60px; border-radius: 30px; font-size: 16px; padding: 0 12px; }
.r .rg-actions .button.primary { font-size: 18px; }
.rg-cols { display: flex; flex-direction: column; gap: 24px; }
.rg-main, .rg-side { display: flex; flex-direction: column; gap: 24px; min-width: 0; }

.rg-plan { display: flex; flex-direction: column; gap: 8px; }
.rg-plan-card { display: flex; gap: 14px; padding: 14px; border-radius: 18px; background: var(--card); border: 1px solid var(--card-line); color: var(--text) !important; text-decoration: none; }
.rg-date { width: 52px; flex: none; display: flex; flex-direction: column; align-items: center; justify-content: center; border-radius: 12px; background: var(--bg); padding: 6px 0; }
.rg-date-mon { font-size: 11px; font-weight: 700; text-transform: uppercase; }
.rg-date-day { font-size: 22px; font-weight: 800; line-height: 1; }
.rg-plan-body { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 3px; }
.rg-plan-title { font-size: 16px; font-weight: 700; overflow-wrap: anywhere; }
.rg-plan-sub { font-size: 14px; color: var(--muted); }
.rg-plan-body .r-chip { align-self: flex-start; margin: 4px 0 0; }
.rg-plan-card.is-draft .r-chip-gray { background: var(--bg); }
.r .rg-send { min-height: 44px; width: 100%; }
.rg-auto { display: flex; align-items: center; gap: 10px; padding: 12px 14px; border-radius: 16px; border: 1px dashed var(--review-line); color: var(--review-ink); }
.rg-auto span { flex: 1; font-size: 14px; font-weight: 600; }
.rg-auto a { font-size: 14px; font-weight: 700; }
.rg-auto svg { flex: none; }

.rg-earlier { display: flex; flex-direction: column; }
.rg-past { display: flex; align-items: center; gap: 12px; min-height: 52px; border-bottom: 1px solid var(--line); color: var(--text) !important; text-decoration: none; padding: 4px 0; }
.rg-past-text { flex: 1; min-width: 0; display: flex; flex-direction: column; }
.rg-past-title { font-size: 15px; font-weight: 700; }
.rg-past-sub { font-size: 13px; color: var(--muted); }
.rg-past-note { font-size: 13px; font-weight: 700; color: var(--muted); }
.rg-past-note.is-ok { color: var(--ok-fg); }
.rg-earlier > li { display: flex; flex-direction: column; gap: 8px; border-bottom: 1px solid var(--line); padding-bottom: 10px; }
.rg-earlier > li .rg-past { border-bottom: 0; }
.rg-earlier .rg-thumbs { grid-template-columns: repeat(4, minmax(0, 64px)); }
.rg-thumb-more { position: relative; display: block; border-radius: 12px; overflow: hidden; text-decoration: none; }
.rg-thumb-more img { filter: brightness(0.55); }
.rg-thumb-more span { position: absolute; inset: 0; display: flex; align-items: center; justify-content: center; color: #fff; font-size: 18px; font-weight: 800; }
.rg-past-add { display: inline-flex; align-items: center; gap: 6px; min-height: 32px; margin-top: 4px; font-size: 14px; font-weight: 600; color: var(--link); text-decoration: none; }
.rg-past-add .r-ico { width: 16px; height: 16px; }

.rg-thumbs { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 6px; }
.rg-thumbs img { display: block; width: 100%; aspect-ratio: 1; object-fit: cover; border-radius: 12px; background: var(--info-bg); }

.rg-people { display: flex; gap: 12px; flex-wrap: wrap; }
.rg-people li { width: 60px; display: flex; flex-direction: column; align-items: center; gap: 4px; text-align: center; }
.rg-people .r-face { width: 48px; height: 48px; font-size: 15px; }
.rg-people li:nth-child(3n+2) .r-face:not(img) { background: var(--f2-bg); color: var(--f2-fg); }
.rg-people li:nth-child(3n) .r-face:not(img) { background: var(--f3-bg); color: var(--f3-fg); }
.rg-pname { font-size: 12px; font-weight: 600; max-width: 60px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.rg-people .rg-prole { font-size: 11px; }
.rg-more { background: var(--f3-bg) !important; color: var(--f3-fg) !important; }
.rg-streak { font-size: 14px; color: var(--muted); margin: 4px 0 0; }
.rg-streak strong { color: var(--text); font-size: 15px; }
.rg-free + * { margin-top: 16px; }
.rg-requests .rg-plist-name small { display: block; }
.rg-requests li { flex-wrap: wrap; }
.rg-series { display: flex; flex-direction: column; gap: 10px; }
.rg-series li { border: 1px solid var(--line); border-radius: 16px; padding: 12px 14px; display: flex; flex-direction: column; gap: 4px; }
.rg-series-text small { display: block; color: var(--muted); font-size: 13px; }
.rg-series-actions { display: flex; flex-wrap: wrap; gap: 4px 16px; }
.rg-series-actions .link { min-height: 36px; font-size: 14px; }
.rg-leave { margin-top: 4px; }

/* ---------- invite ---------- */
.rg-invitepage { padding-top: 20px; }
.rg-invite-hero { display: flex; flex-direction: column; gap: 16px; }
.rg-invite-cover { position: relative; height: 132px; border-radius: 24px; overflow: hidden; background: linear-gradient(135deg, var(--f3-bg), var(--f2-bg)); }
.rg-invite-id { display: flex; flex-direction: column; gap: 6px; }
.rg-invite-who { display: flex; align-items: center; gap: 10px; font-size: 15px; }
.rg-nextup { color: var(--text) !important; text-decoration: none; gap: 6px; }
.rg-nextup-meter { display: flex; flex-direction: column; gap: 6px; padding-top: 6px; }
.rg-or { display: grid; grid-template-columns: 1fr auto 1fr; align-items: center; gap: 12px; font-size: 13px; color: var(--muted); }
.rg-or span:nth-child(odd) { height: 1px; background: var(--line); }
.rg-join .r-form { padding: 0; }

.rg-bad { padding-top: 32px; align-items: center; text-align: center; }
.rg-bad-icon { width: 72px; height: 72px; border-radius: 50%; background: var(--f2-bg); color: var(--f2-fg); display: flex; align-items: center; justify-content: center; }
.rg-bad-head { display: flex; flex-direction: column; gap: 8px; }
.rg-bad .r-card { align-self: stretch; text-align: left; }
.rg-bad-signin { display: flex; flex-direction: column; gap: 10px; align-self: stretch; }

/* ---------- chat ---------- */
.rg-chatpage { width: 100%; max-width: 720px; margin: 0 auto; display: flex; flex-direction: column; height: calc(100dvh - 4px - var(--r-top-h) - var(--r-bar-h) - env(safe-area-inset-bottom)); min-height: 420px; }
.rg-chat-head { display: flex; align-items: center; gap: 12px; padding: 10px 20px; border-bottom: 1px solid var(--line); flex: none; }
.rg-chat-head .r-gmark { width: 40px; height: 40px; font-size: 14px; }
.rg-chat-id { display: flex; flex-direction: column; min-width: 0; }
.rg-chat-name { font-weight: 800; font-size: 16px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.rg-chat-sub { font-size: 12px; color: var(--muted); }
.r .rg-chat { flex: 1; min-height: 0; display: flex; flex-direction: column; gap: 0; }
.r .chat-log { flex: 1; min-height: 0; overflow-y: auto; overscroll-behavior: contain; padding: 16px 20px; display: flex; flex-direction: column; gap: 12px; }
.r .chat-msg { max-width: 82%; align-self: flex-start; position: relative; }
.r .chat-meta { display: flex; align-items: center; gap: 6px; font-size: 12px; color: var(--muted); padding: 0 4px 3px; }
.r .chat-meta strong { color: var(--text); font-weight: 700; }
.r .chat-body { padding: 10px 14px; border-radius: 18px 18px 18px 6px; background: var(--card); border: 1px solid var(--card-line); white-space: pre-wrap; overflow-wrap: anywhere; font-size: 15px; }
.r .chat-mine { align-self: flex-end; }
.r .chat-mine .chat-meta { justify-content: flex-end; }
.r .chat-mine .chat-body { border-radius: 18px 18px 6px 18px; background: var(--pink); border-color: var(--pink); color: var(--on-pink); }
.r .chat-mine .chat-body a { color: inherit; }
.r .chat-system { align-self: center; max-width: 100%; text-align: center; }
.r .chat-system .chat-body { background: none; border: 0; color: var(--muted); font-size: 13px; font-weight: 600; padding: 2px 8px; }
.r .chat-gone { font-style: italic; color: var(--muted); }
.r .chat-empty { align-self: center; color: var(--muted); font-size: 14px; padding: 24px 0; }
.r .chat-older { text-align: center; font-size: 13px; padding: 8px 0 0; }
.r .chat-actions { position: absolute; top: 0; left: 100%; }
.r .chat-mine .chat-actions { left: auto; right: 100%; }
.r .chat-system .chat-actions { left: auto; right: 0; }
.r .chat-actions summary { cursor: pointer; list-style: none; padding: 0 6px; color: var(--muted); font-weight: 800; }
.r .chat-actions summary::-webkit-details-marker { display: none; }
.r .chat-actions-menu { position: absolute; right: 0; top: 100%; z-index: 5; min-width: 160px; background: var(--surface); border: 1px solid var(--border); border-radius: 14px; padding: 6px 12px; display: flex; flex-direction: column; box-shadow: var(--shadow); }
.r .chat-actions-menu .link, .r .chat-actions-menu a { min-height: 40px; display: flex; align-items: center; font-size: 14px; font-weight: 700; }
.r .chat-status { min-height: 0; font-size: 13px; color: var(--danger); padding: 0 20px; }
.r .chat-status:empty { display: none; }
.r .chat-form { display: flex; gap: 8px; align-items: flex-end; padding: 10px 20px 12px; border-top: 1px solid var(--line); background: var(--bg); flex: none; }
.r .chat-form textarea { min-height: 48px; max-height: 120px; border-radius: 24px; padding: 13px 18px; resize: none; }
.r .chat-form button { width: 48px; min-height: 48px; padding: 0; flex: none; border-radius: 50%; }

/* ---------- group settings: hub, sub-pages, QR ---------- */
.rg-rows { padding-top: 4px; padding-bottom: 4px; }
.rg-rows .ra-row:first-child { border-top: 0; }
.rg-more { display: flex; align-items: center; min-height: 44px; font-size: 14px; font-weight: 700; }
.rg-auto-card { display: flex; flex-direction: column; gap: 10px; padding: 16px; border-radius: 20px; background: var(--review-bg); border: 1px solid var(--review-line); color: var(--review-ink); }
.rg-auto-head { display: flex; align-items: center; justify-content: space-between; gap: 10px; }
.rg-auto-head strong { font-size: 16px; font-weight: 800; }
.rg-qrbox[open] { text-align: center; }
.rg-qr { display: block; width: 192px; height: 192px; margin: 4px auto; image-rendering: pixelated; border-radius: 12px; background: #fff; padding: 8px; box-sizing: content-box; }

/* ---------- venue page ---------- */
.r-where-more { font-size: 14px; font-weight: 700; color: var(--link) !important; display: inline-block; margin-left: 8px; }
.rg-venue { padding-top: 0; }
.rg-venue .r-tiles { order: 0; }
.rg-venue .r-rows { display: flex; flex-direction: column; gap: 8px; }
.rg-venue .r-rows a { display: block; text-decoration: none; padding: 12px 14px; border-radius: 16px; border: 1px solid var(--line); color: var(--text); }
.rg-venue .r-rows .r-muted { display: block; font-size: 13px; }
.rg-venue-links { display: flex; flex-wrap: wrap; gap: 8px; }
.rg-venue-events { display: flex; flex-direction: column; gap: 8px; }
.rg-venue-events li { display: flex; flex-direction: column; gap: 2px; padding: 12px 14px; }
.rg-venue-events .r-muted { font-size: 13px; }

/* ---------- availability ---------- */
.rg-avail, .rg-photos, .rg-confirm { padding-top: 0; }
/* The usual-free grid: weekday rows, morning / afternoon / evening columns. */
.rg-grid3 { display: grid; grid-template-columns: 52px repeat(3, minmax(0, 1fr)); gap: 6px; align-items: center; }
.rg-grid3-h { text-align: center; font-size: 12px; font-weight: 700; color: var(--muted); }
.rg-grid3-d { font-size: 14px; font-weight: 700; }
.rg-slot { position: relative; display: block; }
.rg-slot input { position: absolute; inset: 0; width: 100% !important; height: 100% !important; margin: 0; opacity: 0; cursor: pointer; }
.rg-slot span { display: block; height: 40px; border-radius: 12px; border: 1px solid var(--line); background: var(--surface); }
.rg-slot input:checked + span { background: var(--pink); border-color: var(--pink); }
.rg-slot input:focus-visible + span { outline: 3px solid var(--focus); outline-offset: 2px; }
.rg-away { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 10px 14px; border-radius: 16px; background: var(--tile); }
.rg-away-text { font-size: 15px; font-weight: 700; }
.rg-away .r-iconbtn { margin-right: 0; width: 40px; height: 40px; }
.rg-add > summary { cursor: pointer; color: var(--link); font-weight: 700; font-size: 15px; min-height: 44px; display: flex; align-items: center; }
.rg-add-form { display: flex; flex-direction: column; gap: 12px; padding-top: 4px; }
.rg-best { background: var(--info-bg); color: var(--info-fg); }
.rg-best .r-eyebrow, .rg-best .r-note { color: var(--info-fg); }

/* ---------- the "use these days" sheet ---------- */
.rg-sheetpage { padding-top: 24px; }
.rg-sheet { display: flex; flex-direction: column; gap: 20px; padding: 12px 20px 24px; border-radius: 28px; background: var(--card); border: 1px solid var(--card-line); }
.rg-grabber { align-self: center; width: 40px; height: 5px; border-radius: 3px; background: var(--border); }
.rg-sheet-head { display: flex; flex-direction: column; gap: 8px; align-items: flex-start; }
.rg-checks { border: 0; padding: 0; margin: 0; display: flex; flex-direction: column; gap: 8px; min-width: 0; }
.rg-checks legend { padding: 0 0 8px; }
.rg-check { display: flex; align-items: center; gap: 14px; padding: 12px 14px; border-radius: 16px; background: var(--surface); border: 1px solid var(--line); cursor: pointer; }
.rg-check input { width: 22px; height: 22px; }
.rg-check-text { display: flex; flex-direction: column; min-width: 0; }
.rg-check-name { font-size: 16px; font-weight: 700; }
.rg-check-sub { font-size: 13px; color: var(--muted); }

/* ---------- photos ---------- */
.rg-upload { display: flex; flex-direction: column; gap: 10px; }
.rg-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; }
.rg-grid li { display: flex; flex-direction: column; gap: 4px; min-width: 0; }
.rg-grid img { display: block; width: 100%; aspect-ratio: 1; object-fit: cover; border-radius: 16px; background: var(--info-bg); }
.rg-photo-more > summary { cursor: pointer; list-style: none; font-size: 12px; color: var(--muted); min-height: 32px; display: flex; align-items: center; }
.rg-photo-more > summary::-webkit-details-marker { display: none; }
.rg-photo-actions { display: flex; flex-wrap: wrap; gap: 4px 16px; align-items: center; font-size: 14px; font-weight: 700; padding-bottom: 6px; }
.rg-photo-actions a, .rg-photo-actions .link { min-height: 36px; display: inline-flex; align-items: center; }

/* ---------- new group steps ---------- */
.rg-welcome { padding-top: 0; }
.rg-whead { display: flex; flex-direction: column; gap: 10px; padding-top: 12px; }
.rg-whead-row { display: flex; align-items: center; gap: 8px; }
.rg-whead-step { font-size: 14px; font-weight: 700; color: var(--muted); }
.rg-wsteps { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 6px; }
.rg-wsteps li { height: 6px; border-radius: 3px; background: var(--track); }
.rg-wsteps li.is-done { background: var(--pink); }
.rg-choices { border: 0; padding: 0; margin: 0; display: flex; flex-direction: column; gap: 8px; min-width: 0; }
.rg-choices legend { padding: 0 0 8px; }
.rg-choice { position: relative; display: block; }
.rg-choice input { position: absolute; opacity: 0; inset: 0; width: 100%; height: 100%; margin: 0; cursor: pointer; }
.rg-choice-body { display: flex; align-items: center; gap: 14px; padding: 14px 16px; border-radius: 18px; border: 1px solid var(--border); background: var(--surface); min-height: 60px; }
.rg-choice-body b { font-weight: 800; }
.rg-kinds .rg-choice-body { flex-direction: column; align-items: flex-start; gap: 2px; }
.rg-kinds .rg-choice-body span { font-size: 13px; color: var(--muted); }
.rg-euro { width: 48px; font-size: 18px; color: var(--brand); }
.rg-choice input:checked + .rg-choice-body { border: 2px solid var(--pink); background: var(--card); padding: 13px 15px; }
.rg-choice input:focus-visible + .rg-choice-body { outline: 3px solid var(--focus); outline-offset: 2px; }
.rg-min-pick { grid-template-columns: repeat(6, minmax(0, 1fr)); }
.rg-min-pick label:first-child { grid-column: span 2; }
.r-chips-btn button[aria-pressed="true"] { background: var(--ok-bg); border-color: transparent; color: var(--ok-fg); }
.rg-min { border: 0; padding: 0; margin: 0; min-width: 0; }
.rg-min legend { padding: 0 0 6px; }
.rg-first { gap: 12px; }
.rg-checklist { display: flex; flex-direction: column; gap: 10px; }
.rg-checklist li { display: flex; gap: 12px; align-items: flex-start; font-size: 15px; }
.rg-checklist svg { flex: none; color: var(--ok-fg); margin-top: 1px; }
.rg-invitebox { word-break: break-all; }
.rg-city summary { display: inline-flex; align-items: center; gap: 8px; cursor: pointer; list-style: none; min-height: 40px; }
.rg-city summary::-webkit-details-marker { display: none; }
.rg-city-change { font-size: 14px; font-weight: 600; color: var(--link); text-decoration: underline; }
.rg-city[open] .rg-city-change { display: none; }
.rg-city-list { border: 0; padding: 8px 0 0; margin: 0; min-width: 0; }
.rg-city-set { padding: 0; }
.rg-city-set legend { padding: 0 0 8px; }
.rg-city-opt { position: relative; }
.rg-city-opt input { position: absolute; opacity: 0; inset: 0; margin: 0; cursor: pointer; }
.rg-city-opt span { display: inline-flex; align-items: center; min-height: 40px; padding: 0 14px; border-radius: 999px; border: 1px solid var(--border); background: var(--surface); font-size: 14px; font-weight: 600; }
.rg-city-opt input:checked + span { background: var(--pink); border-color: transparent; color: var(--on-pink); }
.rg-city-opt input:focus-visible + span { outline: 3px solid var(--focus); outline-offset: 2px; }

/* ---------- group settings ---------- */
.rg-settings { padding-top: 0; }
.rg-set-cols { display: flex; flex-direction: column; gap: 24px; }
.rg-set-main, .rg-set-side { display: flex; flex-direction: column; gap: 24px; min-width: 0; }
.rg-setform { display: flex; flex-direction: column; gap: 24px; }
.rg-look { gap: 20px; }
.rg-look-cover img { display: block; width: 100%; height: auto; border-radius: 16px; margin-bottom: 12px; }
.rg-look-nocover { height: 80px; border-radius: 16px; background: var(--f3-bg); color: var(--f3-fg); display: flex; align-items: center; justify-content: center; font-size: 12px; font-weight: 700; letter-spacing: .06em; margin-bottom: 12px; }
.rg-look-mark { display: flex; align-items: flex-start; gap: 14px; }
.rg-look-mark form { flex: 1; min-width: 0; }
.r .budget { border: 0; padding: 0; margin: 0; display: flex; flex-direction: column; gap: 8px; min-width: 0; }
.r .budget legend { font-size: 14px; font-weight: 700; padding: 0 0 6px; }
.r .budget-head { display: flex; align-items: baseline; gap: 10px; }
.r .budget-value { font-size: 20px; font-weight: 800; }
.r .budget-level { font-size: 14px; color: var(--muted); }
.r .budget-range { width: 100%; accent-color: var(--pink); min-height: 32px; padding: 0; border: 0; background: none; }
.r .budget-ticks { display: flex; justify-content: space-between; font-size: 12px; color: var(--muted); }
.r .budget small { font-size: 13px; color: var(--muted); }
.rg-cad-state { display: flex; flex-wrap: wrap; align-items: center; gap: 8px 12px; }
.rg-cad-form { padding-top: 6px; }
.rg-members .r-chip { margin-right: 0; }
.rg-menu { position: relative; }
.rg-menu > summary { list-style: none; width: 40px; height: 40px; border-radius: 20px; display: flex; align-items: center; justify-content: center; cursor: pointer; color: var(--muted); }
.rg-menu > summary::-webkit-details-marker { display: none; }
.rg-menu-body { position: absolute; right: 0; top: 100%; z-index: 6; min-width: 200px; background: var(--surface); border: 1px solid var(--border); border-radius: 14px; padding: 6px 14px; box-shadow: var(--shadow); display: flex; flex-direction: column; }
.rg-menu-body a, .rg-menu-body .link { min-height: 44px; display: flex; align-items: center; font-size: 14px; font-weight: 700; }
.rg-danger { display: flex; justify-content: center; padding: 8px 0 16px; }

/* ---------- owner hand-over ---------- */
.rg-handover { display: flex; align-items: center; justify-content: center; gap: 18px; padding-top: 12px; color: var(--muted); }
.rg-handover .r-face { width: 64px; height: 64px; font-size: 20px; }
.rg-confirm .r-pagehead { text-align: center; }

/* ---------- desktop ---------- */
@media (min-width: 900px) {
  .rg-cover { max-width: 1056px; width: calc(100% - 64px); margin: 24px auto 36px; border-radius: 24px; height: 200px; }
  .rg-cover .rg-mark { left: 32px; width: 88px; height: 88px; bottom: -40px; font-size: 26px; }
  .rg-page { padding-top: 24px; }
  .rg-head .r-title { font-size: 40px; }
  .rg-actions { max-width: 560px; }
  .rg-cols { display: grid; grid-template-columns: minmax(0, 1fr) 340px; gap: 48px; align-items: start; }
  .rg-groups { max-width: 880px; }
  .rg-glist { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 16px; }
  .rg-titlebar .r-title { font-size: 40px; }
  .rg-invitepage, .rg-avail, .rg-photos, .rg-welcome, .rg-confirm, .rg-sheetpage, .rg-bad { max-width: 560px; }
  .rg-photos { max-width: 880px; }
  .rg-grid { grid-template-columns: repeat(4, minmax(0, 1fr)); }
  .rg-chatpage { height: calc(100dvh - 4px - var(--r-top-h) - 8px); margin-top: 8px; border: 1px solid var(--line); border-radius: 24px; overflow: hidden; }
  .rg-set-cols { display: grid; grid-template-columns: minmax(0, 1fr) 380px; gap: 48px; align-items: start; }
  .rg-settings { max-width: 1120px; }
  .rg-grid3 { gap: 8px; max-width: 520px; }
}

/* First-run name step: no wizard header above the title, so give it air. */
.rg-you .r-pagehead { padding-top: 24px; }

/* ---------- the theme picker in group settings ---------- */
.rg-themes { display: grid; grid-template-columns: repeat(auto-fill, minmax(132px, 1fr)); gap: 10px; }
.rg-theme { position: relative; display: block; cursor: pointer; }
.rg-theme input { position: absolute; opacity: 0; inset: 0; width: 100%; height: 100%; margin: 0; cursor: pointer; }
.rg-theme-card { display: flex; flex-direction: column; border-radius: 14px; overflow: hidden; border: 2px solid var(--line); background: var(--bg); color: var(--text); }
.rg-theme-cover { display: block; height: 52px; background: var(--part-cover, var(--f3-bg)); border-bottom: var(--part-cover-edge, 0 solid transparent); }
.rg-theme-body { display: flex; flex-direction: column; gap: 8px; padding: 10px; }
.rg-theme-btn { display: block; height: 18px; width: 64%; background: var(--pink); border-radius: var(--part-btn-radius, 999px); outline: var(--part-btn-outline, none); outline-offset: -3px; color: var(--on-pink); }
.rg-theme-name { font-size: 13px; font-weight: 700; }
.rg-theme input:checked + .rg-theme-card { border-color: var(--text); box-shadow: 0 0 0 2px var(--text); }
.rg-theme input:focus-visible + .rg-theme-card { outline: 3px solid var(--focus); outline-offset: 2px; }

/* ---------- GRP-20 simple start (flag simple_start) ---------- */
.rg-wsteps.is-two { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.rs-namerow { display: flex; align-items: center; gap: 12px; }
.rs-namerow input[name="name"] { flex: 1; min-width: 0; }
.rs-photo { position: relative; flex: none; width: 56px; height: 56px; border-radius: 28px; border: 1px dashed var(--border); background: var(--card); color: var(--link); display: flex; align-items: center; justify-content: center; cursor: pointer; overflow: hidden; }
.rs-photo input { position: absolute; inset: 0; opacity: 0; cursor: pointer; width: 100%; height: 100%; font-size: 0; }
.rs-photo:focus-within { outline: 3px solid var(--focus); outline-offset: 2px; }
.rs-none { display: flex; flex-direction: column; gap: 8px; max-width: 560px; }
.rs-invite > summary { min-height: 48px; display: flex; align-items: center; justify-content: center; font-size: 15px; font-weight: 700; color: var(--link); cursor: pointer; list-style: none; }
.rs-invite > summary::-webkit-details-marker { display: none; }
.rs-invite[open] > summary { margin-bottom: 8px; }
.rs-target { display: none; }
.rs-target:target { display: block; }
.rs-menu { position: absolute; top: 12px; right: 12px; z-index: 3; }
.rs-menu > summary { list-style: none; cursor: pointer; box-shadow: 0 1px 6px rgba(11, 31, 58, 0.18); }
.rs-menu > summary::-webkit-details-marker { display: none; }
.rs-menu-list { position: absolute; right: 0; top: 52px; margin: 0; padding: 6px; list-style: none; min-width: 230px; border-radius: 18px; background: var(--bg); border: 1px solid var(--border); box-shadow: 0 8px 24px rgba(11, 31, 58, 0.18); display: flex; flex-direction: column; }
.rs-menu-list a, .rs-menu-list button { display: flex; align-items: center; justify-content: flex-start; width: 100%; min-height: 48px; padding: 0 14px; border: 0; border-radius: 12px; background: transparent; font: inherit; font-size: 16px; font-weight: 700; color: var(--text) !important; text-decoration: none; text-align: left; cursor: pointer; box-sizing: border-box; }
.rs-menu-list a:hover, .rs-menu-list button:hover { background: var(--card); }
.rs-menu-list form { margin: 0; }

/* Invite, once the group has people: one slim row, the rest folded. */
.rg-invite-slim { gap: 6px; position: relative; }
.rg-invite-row { display: flex; align-items: center; gap: 12px; padding: 10px 10px 10px 14px; border: 1px solid var(--line); border-radius: 18px; }
.rg-invite-ico { display: flex; color: var(--link); }
.rg-invite-text { flex: 1; min-width: 0; font-size: 15px; margin-right: 54px; }
.r .rg-invite-row .button { min-height: 44px; width: 96px; padding: 0; }
/* The QR button: in the row, left of the 96px Share button. */
.rg-invite-tools > summary { position: absolute; top: 11px; right: 116px; width: 44px; height: 44px; box-sizing: border-box; border-radius: 22px; border: 1px solid var(--line); background: var(--bg); color: var(--text); display: flex; align-items: center; justify-content: center; cursor: pointer; list-style: none; }
.rg-invite-tools > summary::-webkit-details-marker { display: none; }
.rg-invite-tools[open] > summary { background: var(--line); }

/* The group page's round icon actions (Chat, Invite) next to the main button. */
.rg-iconact { position: relative; flex: none; width: 60px; height: 60px; box-sizing: border-box; border-radius: 30px; border: 1px solid var(--line); color: var(--text); display: flex; align-items: center; justify-content: center; text-decoration: none; }
.rg-iconact .r-ico { width: 24px; height: 24px; }
.rg-iconact > .r-count { position: absolute; top: -2px; right: -2px; margin: 0; }
