/* ---------- Grupay: AIO colors, bottom bar and the Home, Parches, Chat and Perfil screens ---------- */
/* Classes carry the gp- prefix so they never land on a game's markup (lessons/layout.md).
   The app around the games (body[data-zone="app"], set by showScreen) uses AIO's palette; lobbies, landings and tables keep the felt and gold. */

:root {
  --aio-bg: #0F172A;
  --aio-card: #1E293B;
  --aio-blue: #0052FF;
  --aio-text: #FFFFFF;
  --aio-muted: #94A3B8;
  --aio-ok: #10B981;
  --aio-line: rgba(148, 163, 184, .22);
  --aio-soft: rgba(148, 163, 184, .14);
  --ficha: inset 0 -3px 0 rgba(0, 0, 0, .28);
}

body[data-zone="app"] {
  --ink: var(--aio-text); --muted: var(--aio-muted); --line: var(--aio-line);
  --surface: var(--aio-card); --surface-2: #273449; --hub-bg: var(--aio-bg); --glass: var(--aio-card);
  background: var(--aio-bg);
}
body[data-zone="app"]::before { opacity: 0; }
body[data-zone="app"] .screen.hub { background: var(--aio-bg); }

/* Buttons: blue for account, parches and money; gold only to play. «Ficha»: a lower edge that sinks when tapped, like a chip on the table. */
.btn svg { width: 18px; height: 18px; flex: none; }
.btn.primary { color: #fff; background: var(--aio-blue); }
.btn.danger { background: transparent; color: var(--ink); border: 0; box-shadow: inset 0 0 0 1.5px currentColor; }
body[data-zone="app"] .btn { box-shadow: var(--ficha); }
body[data-zone="app"] .btn.gold { color: #2a1f05; background: var(--gold); }
body[data-zone="app"] .btn.ghost { background: var(--aio-soft); border: 0; box-shadow: var(--ficha), inset 0 0 0 1px var(--aio-line); }
body[data-zone="app"] .btn.danger { box-shadow: inset 0 0 0 1.5px currentColor; }
body[data-zone="app"] .btn.google { box-shadow: var(--ficha); }
body[data-zone="app"] .btn.sm { border-radius: 12px; min-height: 38px; }
body[data-zone="app"] .btn:active { transform: translateY(2px); box-shadow: inset 0 -1px 0 rgba(0, 0, 0, .28); }
body[data-zone="app"] .link, body[data-zone="app"] a.inline, body[data-zone="app"] .pw-toggle { color: var(--ink); }
button.inline { padding: 0; color: var(--ink); text-decoration: underline; text-underline-offset: 3px; }

/* Surfaces: flat AIO cards instead of glass and gradients */
body[data-zone="app"] .glass { background: var(--aio-card); -webkit-backdrop-filter: none; backdrop-filter: none; border: 1px solid var(--line); box-shadow: none; }
body[data-zone="app"] .glass::before { display: none; }
body[data-zone="app"] .sheet { background: var(--aio-card); border-color: var(--line); }
body[data-zone="app"] .sheet h2 { font-family: inherit; font-size: 1.3rem; font-weight: 800; color: var(--ink); }
body[data-zone="app"] .field input:focus, body[data-zone="app"] .code-input:focus { border-color: var(--aio-blue); box-shadow: 0 0 0 3px rgba(0, 82, 255, .3); }
body[data-zone="app"] .otp { border-color: var(--line); color: var(--ink); }
body[data-zone="app"] .toast.info { background: var(--aio-card); border-color: var(--line); color: var(--ink); }
body[data-zone="app"] .emoji-grid button.sel { border-color: var(--aio-blue); box-shadow: 0 0 0 2px rgba(0, 82, 255, .3); }
body[data-zone="app"] .switch:checked { background: var(--aio-ok); }
body[data-zone="app"] .chip { background: var(--aio-soft); color: var(--muted); border: 0; box-shadow: none; }
body[data-zone="app"] .chip.on { background: var(--ink); color: var(--aio-bg); }
body[data-zone="app"] .seg { background: var(--aio-soft); border: 0; }
body[data-zone="app"] .seg button.on { background: var(--aio-card); color: var(--ink); box-shadow: none; }
body[data-zone="app"] .code-pill { color: var(--ink); background: var(--aio-soft); border: 0; }
body[data-zone="app"] .me-pin { box-shadow: 0 12px 32px rgba(0, 0, 0, .45); }

.mark { color: var(--ink); }
.mark img { width: 28px; height: 28px; border-radius: 8px; }
.mark span { font-family: inherit; font-weight: 800; font-size: 1.2rem; letter-spacing: -.01em; }

/* Juegos: one plain color per game, gold to play */
body[data-zone="app"] .feature { background: #14543f; border: 0; box-shadow: none; }
body[data-zone="app"] .feature.blue { background: #1c3f7a; }
body[data-zone="app"] .feature.wood { background: #5a3a22; }
body[data-zone="app"] .feature .pill.glass { background: rgba(0, 0, 0, .25); border: 0; }
body[data-zone="app"] .feature .play { color: #2a1f05; background: var(--gold); border-radius: 14px; box-shadow: var(--ficha); }
body[data-zone="app"] .gicon { background: #14543f; border: 0; }
body[data-zone="app"] .gicon.blue { background: #1c3f7a; }
body[data-zone="app"] .gicon.wood { background: #5a3a22; }
body[data-zone="app"] .btn-pill.gold { background: var(--gold); box-shadow: var(--ficha); }
.tables-actions .btn { white-space: nowrap; font-size: .92rem; padding: 0 .8rem; }

.gp-tabs { display: flex; gap: 8px; flex: none; padding: 2px 16px 6px; max-width: 520px; width: 100%; margin: 0 auto; }
.gp-tabs .tab {
  height: 36px; padding: 0 16px; border-radius: 18px; display: inline-flex; align-items: center; gap: 6px;
  font-size: .88rem; font-weight: 600; color: var(--muted); background: var(--aio-soft); text-decoration: none;
}
.gp-tabs .tab.on { background: var(--ink); color: var(--aio-bg); }
.tab-dot { min-width: 18px; height: 18px; padding: 0 5px; border-radius: 9px; display: inline-grid; place-items: center; font-size: .66rem; font-weight: 800; background: var(--aio-ok); color: #04130d; }

/* Bottom bar: shown only on the main sections (body[data-nav]), never over a table */
.gp-nav {
  position: fixed; left: 50%; bottom: calc(14px + var(--safe-b)); transform: translateX(-50%); z-index: 40;
  width: calc(100% - 28px); max-width: 492px; height: 64px; border-radius: 24px; padding: 4px;
  display: none; grid-template-columns: repeat(5, 1fr); align-items: center;
  background: rgba(30, 41, 59, .94); -webkit-backdrop-filter: blur(14px); backdrop-filter: blur(14px);
  border: 1px solid var(--aio-line); box-shadow: 0 12px 32px rgba(0, 0, 0, .45);
}
body[data-nav] .gp-nav { display: grid; }
body[data-nav] .screen.active .hub-wrap { padding-bottom: calc(104px + var(--safe-b)); }
body[data-nav] .toast, body[data-nav] .conn { bottom: calc(92px + var(--safe-b)); }
body[data-nav] .screen.active::after { /* content fades out under the floating bar */
  content: ''; position: absolute; left: 0; right: 0; bottom: 0; height: calc(110px + var(--safe-b)); z-index: 20; pointer-events: none;
  background: linear-gradient(180deg, transparent, rgba(15, 23, 42, .9) 70%);
}
.gp-nav a {
  height: 100%; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 3px;
  border-radius: 20px; font-size: .66rem; font-weight: 600; color: var(--aio-muted); text-decoration: none;
  transition: background .2s, color .2s, transform .15s;
}
.gp-nav a svg { width: 23px; height: 23px; }
.gp-nav a:active, .gp-nav-create:active span { transform: scale(.94); }
.gp-nav a.on { color: var(--aio-text); background: var(--aio-soft); }
.gp-nav-create { height: 100%; display: grid; place-items: center; }
.gp-nav-create span {
  width: 46px; height: 46px; border-radius: 50%; display: grid; place-items: center; color: #fff;
  background: var(--aio-blue); box-shadow: var(--ficha), 0 6px 18px rgba(0, 82, 255, .35); transition: transform .15s;
}
.gp-nav-create svg { width: 24px; height: 24px; }

/* Shared pieces */
.gp-section-head { display: flex; align-items: baseline; justify-content: space-between; gap: 10px; margin-top: 4px; }
.gp-section-head h3 { margin: 0; font-size: 1.05rem; }
.gp-list { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 8px; }
.gp-list a {
  display: flex; align-items: center; gap: 12px; padding: 12px 14px; border-radius: 16px; color: var(--ink); text-decoration: none;
  background: var(--surface); border: 1px solid var(--line); transition: transform .15s;
}
.gp-list a:active { transform: scale(.98); }
.gp-list .grow { flex: 1; min-width: 0; font-size: .9rem; line-height: 1.35; }
.gp-list small { display: block; color: var(--muted); font-size: .76rem; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.gp-list .avatar { width: 38px; height: 38px; font-size: 1.05rem; }
.gp-up { color: var(--aio-ok); }
.gp-down { color: var(--ink); }
.gp-amt { font-weight: 700; font-size: .9rem; white-space: nowrap; }
.gp-group-emoji { width: 46px; height: 46px; flex: none; display: grid; place-items: center; font-size: 1.4rem; border-radius: 14px; background: var(--aio-soft); }
.gp-empty { padding: 18px 16px; border-radius: 16px; text-align: center; font-size: .9rem; line-height: 1.5; color: var(--muted); background: var(--surface); border: 1px dashed var(--line); }

/* Visitors: what needs an account says so before it is tapped */
body:not(.visitor) [data-visitor-only], body.visitor [data-member-only] { display: none; }
.gp-visit {
  display: flex; flex-direction: column; align-items: flex-start; gap: 8px; padding: 14px; border-radius: 16px;
  background: rgba(0, 82, 255, .14); border: 1px solid rgba(0, 82, 255, .45);
}
.gp-visit p { margin: 0; font-size: .88rem; line-height: 1.45; color: var(--muted); }
.gp-visit .link { padding: 4px 0; font-size: .88rem; }
.gp-lock { display: none; align-items: center; gap: 4px; flex: none; font-size: .68rem; font-weight: 600; color: var(--muted); }
.gp-lock svg { width: 12px; height: 12px; }
body.visitor [data-need] .gp-lock { display: inline-flex; }

/* Lists of choices: the + sheet and the three ways to play */
.gp-paths { display: flex; flex-direction: column; gap: 8px; }
.gp-paths button {
  display: flex; align-items: center; gap: 12px; padding: 12px; border-radius: 16px; text-align: left;
  background: rgba(0, 0, 0, .22); border: 1.5px solid transparent; color: var(--ink);
}
.gp-paths button.on { border-color: var(--gold); background: rgba(217, 180, 90, .1); }
.gp-paths .grow { flex: 1; min-width: 0; }
.gp-paths b { display: block; font-size: .95rem; }
.gp-paths small { display: block; font-size: .78rem; color: var(--muted); line-height: 1.35; }
.gp-ic { width: 40px; height: 40px; flex: none; border-radius: 12px; display: grid; place-items: center; background: rgba(0, 82, 255, .22); }
.gp-ic.game, #newTablePaths .gp-ic { background: rgba(217, 180, 90, .18); color: var(--gold-2); }
.gp-ic svg { width: 20px; height: 20px; }
.gp-more { border-top: 1px solid var(--line); }
.gp-more summary { position: relative; display: flex; flex-direction: column; padding: 12px 24px 8px 0; font-weight: 600; cursor: pointer; list-style: none; }
.gp-more summary::-webkit-details-marker { display: none; }
.gp-more summary small { font-weight: 400; font-size: .78rem; color: var(--muted); }
.gp-more summary::after { content: '›'; position: absolute; right: 6px; top: 12px; font-size: 1.2rem; transition: transform .2s; }
.gp-more[open] summary::after { transform: rotate(90deg); }
.gp-more > .section-label { display: block; margin-top: 8px; }

/* Table menu */
.gp-menu-row { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.gp-confirm { display: flex; flex-direction: column; gap: 10px; padding: 12px; border-radius: 16px; background: rgba(0, 0, 0, .25); }
.gp-confirm p { margin: 0; text-align: center; font-size: .9rem; }
#menuWatchers:empty { display: none; }

/* Welcome */
.gp-welcome { justify-content: center; text-align: center; gap: 12px; }
.gp-welcome-logo { align-self: center; width: 80px; height: 80px; border-radius: 22px; }
.gp-welcome h1 { margin: 6px 0 0; font-size: 2.2rem; font-weight: 800; letter-spacing: -.02em; }
.gp-welcome-lead { margin: 0 0 8px; color: var(--muted); font-size: 1.05rem; }
.gp-welcome-list { list-style: none; margin: 0 0 10px; padding: 0; display: flex; flex-direction: column; gap: 8px; text-align: left; }
.gp-welcome-list li { display: flex; align-items: center; gap: 12px; padding: 12px 14px; border-radius: 16px; background: var(--surface); }
.gp-welcome-list li > span { width: 40px; height: 40px; flex: none; display: grid; place-items: center; border-radius: 12px; background: rgba(0, 82, 255, .22); }
.gp-welcome-list svg { width: 22px; height: 22px; }
.gp-welcome-list b { display: block; font-size: .95rem; }
.gp-welcome-list small { color: var(--muted); font-size: .8rem; line-height: 1.35; }
.gp-visit-name { margin: -2px 0 0; font-size: .84rem; color: var(--muted); }
.gp-visit-name b { color: var(--ink); }

/* Home */
.gp-balance { padding: 16px; border-radius: 20px; display: flex; flex-direction: column; gap: 12px; background: var(--surface); border: 1px solid var(--line); }
.gp-net small, .gp-split small { display: block; font-size: .72rem; letter-spacing: .06em; text-transform: uppercase; color: var(--muted); }
.gp-net b { font-size: 2rem; font-weight: 800; letter-spacing: -.02em; font-variant-numeric: tabular-nums; }
.gp-net.gp-up b { color: var(--aio-ok); }
.gp-split { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.gp-split a { padding: 12px; border-radius: 14px; background: rgba(15, 23, 42, .6); color: var(--ink); text-decoration: none; }
.gp-split b { font-size: 1.2rem; font-variant-numeric: tabular-nums; }
.gp-owed b { color: var(--aio-ok); }
.gp-quick { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.gp-quick button {
  position: relative; display: flex; flex-direction: column; align-items: flex-start; gap: 2px; padding: 14px; border-radius: 16px; text-align: left;
  background: var(--surface); border: 1px solid var(--line); color: var(--ink); font-size: .92rem; font-weight: 600;
}
.gp-quick button:active { transform: scale(.98); }
.gp-quick svg { width: 24px; height: 24px; margin-bottom: 6px; }
.gp-quick [data-act="play"] svg, .gp-quick [data-act="code"] svg { color: var(--gold); }
.gp-quick small { font-size: .76rem; font-weight: 400; color: var(--muted); }
body.visitor .gp-quick [data-need]::after { content: 'Pide cuenta'; position: absolute; top: 12px; right: 12px; font-size: .64rem; font-weight: 600; color: var(--muted); }

/* Nuevo parche */
.gp-create, .gp-invite { display: flex; flex-direction: column; gap: 14px; }
.gp-create .emoji-grid { grid-template-columns: repeat(8, 1fr); }
.gp-create .emoji-grid button { height: 44px; }
.gp-invite-head { display: flex; flex-direction: column; align-items: center; gap: 6px; text-align: center; }
.gp-invite-head h2 { margin: 4px 0 0; }
.gp-invite-head p { margin: 0; }
.gp-invite-head .gp-group-emoji { width: 64px; height: 64px; font-size: 2rem; border-radius: 20px; }
.gp-qr { align-self: center; width: 200px; height: 200px; padding: 12px; border-radius: 20px; background: var(--card-bg); }
.gp-qr svg { width: 100%; height: 100%; display: block; shape-rendering: crispEdges; }
.gp-invite > p { margin: -6px 0 0; }
.gp-link { display: flex; align-items: center; gap: 8px; padding: 6px 6px 6px 14px; border-radius: 16px; background: rgba(0, 0, 0, .28); border: 1px solid var(--line); }
.gp-link span { flex: 1; min-width: 0; font-size: .82rem; color: var(--muted); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }

/* Parches and a parche's chat */
.gp-chats .grow b { display: block; }
.gp-meta { display: flex; flex-direction: column; align-items: flex-end; gap: 4px; flex: none; }
.gp-unread { min-width: 20px; height: 20px; padding: 0 6px; border-radius: 10px; display: grid; place-items: center; font-size: .7rem; font-weight: 800; background: var(--aio-ok); color: #04130d; }
.gp-chat-title { display: flex; flex-direction: column; min-width: 0; }
.gp-chat-title small { font-size: .72rem; font-weight: 500; color: var(--muted); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.gp-messages {
  flex: 1; overflow-y: auto; display: flex; flex-direction: column; gap: 10px;
  padding: 10px 16px; max-width: 520px; width: 100%; margin: 0 auto;
}
.gp-messages > * { flex-shrink: 0; }
.gp-msg { display: flex; align-items: flex-end; gap: 8px; max-width: 86%; }
.gp-msg.mine { align-self: flex-end; justify-content: flex-end; }
.gp-msg .avatar { width: 30px; height: 30px; font-size: .85rem; }
.gp-msg-body { display: flex; flex-direction: column; gap: 3px; min-width: 0; }
.gp-msg.mine .gp-msg-body { align-items: flex-end; }
.gp-msg-body > small { font-size: .72rem; color: var(--muted); font-weight: 600; padding-left: 4px; }
.gp-msg-body time { font-size: .66rem; color: var(--muted); padding: 0 4px; }
.gp-bubble { padding: 9px 13px; border-radius: 18px 18px 18px 6px; background: var(--surface-2); font-size: .92rem; line-height: 1.4; overflow-wrap: anywhere; }
.gp-msg.mine .gp-bubble { border-radius: 18px 18px 6px 18px; background: var(--aio-blue); }
.gp-system { align-self: center; margin: 4px 0; padding: 6px 12px; border-radius: 12px; font-size: .78rem; color: var(--muted); background: var(--surface); text-align: center; }
.gp-expense { width: 230px; display: flex; flex-direction: column; gap: 2px; padding: 14px; border-radius: 18px; background: var(--surface); border: 1px solid var(--line); }
.gp-expense small { font-size: .7rem; letter-spacing: .06em; text-transform: uppercase; color: var(--muted); }
.gp-expense b { font-size: 1rem; }
.gp-expense-total { font-size: 1.5rem; font-weight: 800; letter-spacing: -.01em; font-variant-numeric: tabular-nums; }
.gp-expense p { margin: 0 0 8px; }
.gp-expense .btn { width: 100%; }
.gp-paid { align-self: flex-start; padding: 6px 12px; border-radius: 999px; font-size: .8rem; font-weight: 700; color: var(--aio-ok); background: rgba(0, 0, 0, .25); }
.gp-composer { display: flex; flex-direction: column; gap: 8px; padding: 8px 12px calc(8px + var(--safe-b)); max-width: 520px; width: 100%; margin: 0 auto; }
.gp-composer-acts { display: flex; gap: 8px; }
body[data-zone="app"] .gp-composer-acts .btn { min-height: 34px; padding: 0 12px; font-size: .82rem; }
.gp-composer-row { display: flex; align-items: center; gap: 8px; }
.gp-composer input {
  flex: 1; min-width: 0; height: 44px; padding: 0 16px; border-radius: 22px; border: 1px solid var(--line); outline: none;
  background: rgba(0, 0, 0, .28); color: var(--ink); font-size: 1rem;
}
.gp-composer input:focus { border-color: var(--aio-blue); }
.gp-composer-row .btn { width: 44px; min-height: 44px; height: 44px; padding: 0; border-radius: 50%; flex: none; }

/* Saldar cuentas: simplified payments */
.gp-simplified { margin: 4px 0 12px; padding: 12px 14px; border-radius: 14px; font-size: .88rem; line-height: 1.45; background: rgba(0, 82, 255, .12); border: 1px solid rgba(0, 82, 255, .4); }
.gp-transfers { list-style: none; margin: 0 0 14px; padding: 0; display: flex; flex-direction: column; gap: 8px; }
.gp-transfers li { display: flex; align-items: center; gap: 10px; padding: 10px 12px; border-radius: 14px; background: rgba(0, 0, 0, .2); border: 1px solid var(--line); }
.gp-transfers .avatar { width: 32px; height: 32px; font-size: .9rem; }
.gp-transfers .grow { flex: 1; min-width: 0; font-size: .86rem; line-height: 1.3; }
.gp-transfers .btn { flex: none; }
#gpSettleBody h2 { margin: 0; }
#gpSettleBody > p.muted { margin: 2px 0 0; }

/* Perfil & Stats */
.gp-me-head { display: flex; align-items: center; gap: 14px; }
.gp-me-head h2 { margin: 0; font-size: 1.3rem; }
.gp-me-head p { margin: 2px 0 0; }
.gp-me-head .grow { flex: 1; min-width: 0; }
.gp-stats { display: grid; grid-template-columns: repeat(3, 1fr); gap: 10px; }
.gp-stats div { padding: 12px 8px; border-radius: 16px; background: var(--surface); border: 1px solid var(--line); text-align: center; }
.gp-stats b { display: block; font-size: 1.05rem; font-variant-numeric: tabular-nums; }
.gp-stats small { font-size: .7rem; color: var(--muted); }
.gp-points { padding: 4px 10px; border-radius: 999px; font-size: .78rem; font-weight: 700; background: var(--aio-soft); }
.gp-coupons { display: flex; flex-direction: column; gap: 10px; }
.gp-coupon {
  display: flex; align-items: center; gap: 12px; padding: 12px; border-radius: 18px;
  background: color-mix(in srgb, var(--c) 28%, var(--aio-card)); border: 1px dashed var(--line);
}
.gp-coupon-emoji { width: 44px; height: 44px; flex: none; display: grid; place-items: center; font-size: 1.4rem; border-radius: 12px; background: rgba(255, 255, 255, .1); }
.gp-coupon .grow { flex: 1; min-width: 0; }
.gp-coupon p { margin: 2px 0 0; font-size: .82rem; color: var(--muted); }
.gp-coupon .btn { flex: none; }

/* Social: the bell, people rows, friends and notifications */
.gp-top-actions { display: flex; align-items: center; gap: 8px; min-width: 0; }
.gp-top-actions .profile-chip { max-width: 170px; }
.gp-bell { position: relative; width: 40px; height: 40px; flex: none; border-radius: 50%; display: grid; place-items: center; color: var(--ink); background: var(--aio-soft); }
.gp-bell svg { width: 21px; height: 21px; }
.gp-bell-dot {
  position: absolute; top: -2px; right: -2px; min-width: 18px; height: 18px; padding: 0 5px; border-radius: 9px;
  display: grid; place-items: center; font-size: .66rem; font-weight: 800; color: #fff; background: var(--aio-blue); box-shadow: 0 0 0 2px var(--aio-bg);
}
.gp-person { display: flex; align-items: center; gap: 12px; padding: 10px 12px; border-radius: 16px; background: var(--surface); border: 1px solid var(--line); }
.gp-person .avatar { width: 40px; height: 40px; font-size: 1rem; }
.gp-person .grow { flex: 1; min-width: 0; display: flex; flex-direction: column; }
.gp-person b { font-size: .95rem; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.gp-person-acts { display: flex; gap: 6px; flex: none; }
.gp-tag { padding: 4px 10px; border-radius: 999px; font-size: .74rem; font-weight: 600; color: var(--muted); background: var(--aio-soft); white-space: nowrap; }
.gp-friend { border-radius: 16px; background: var(--surface); border: 1px solid var(--line); }
.gp-friend summary { list-style: none; cursor: pointer; background: none; border: 0; }
.gp-friend summary::-webkit-details-marker { display: none; }
.gp-friend .chev { color: var(--muted); font-size: 1.3rem; transition: transform .2s; }
.gp-friend[open] .chev { transform: rotate(90deg); }
.gp-friend-acts { display: flex; flex-direction: column; align-items: flex-start; gap: 8px; padding: 0 12px 12px 64px; }
.gp-friend-acts .chips { margin: 0; padding: 0; flex-wrap: wrap; overflow: visible; }
#gpFriendsBody, #gpPeopleResults { display: flex; flex-direction: column; gap: 10px; }
#gpPeopleResults:empty { display: none; }
.gp-notif { display: flex; align-items: flex-start; gap: 12px; padding: 12px; border-radius: 16px; background: var(--surface); border: 1px solid var(--line); }
.gp-notif.todo { border-color: rgba(0, 82, 255, .5); }
.gp-notif .avatar { width: 40px; height: 40px; font-size: 1rem; }
.gp-notif .grow { flex: 1; min-width: 0; }
.gp-notif p { margin: 0; font-size: .92rem; line-height: 1.4; color: var(--muted); }
.gp-notif p b { color: var(--ink); }
.gp-notif small { font-size: .74rem; color: var(--muted); }
.gp-notif-acts { display: flex; gap: 8px; margin-top: 10px; }

/* Parche photo, info screen, message actions and profiles */
.gp-group-photo { object-fit: cover; padding: 0; }
.gp-group-emoji.xs { width: 26px; height: 26px; font-size: .95rem; border-radius: 8px; vertical-align: middle; display: inline-grid; }
.gp-group-emoji.xl { width: 104px; height: 104px; font-size: 3rem; border-radius: 30px; }
button.gp-chat-title { flex: 1; min-width: 0; display: flex; flex-direction: column; align-items: center; color: var(--ink); font: inherit; font-weight: 700; border-radius: 12px; padding: 2px 6px; }
button.gp-chat-title:active { background: var(--aio-soft); }
#gpChatTitle { display: flex; align-items: center; gap: 6px; max-width: 100%; overflow: hidden; white-space: nowrap; text-overflow: ellipsis; }
.gp-info-head { display: flex; flex-direction: column; align-items: center; gap: 6px; text-align: center; padding-top: 4px; }
.gp-info-pic { display: flex; flex-direction: column; align-items: center; gap: 6px; color: var(--ink); font-size: .8rem; font-weight: 600; }
.gp-info-pic span:last-child { color: var(--muted); text-decoration: underline; text-underline-offset: 3px; }
.gp-info-name { display: flex; align-items: center; gap: 8px; }
.gp-info-name h2 { margin: 0; font-size: 1.4rem; overflow-wrap: anywhere; }
.gp-info-head p { margin: 0; }
.gp-edit { padding: 4px 10px; border-radius: 999px; font-size: .78rem; font-weight: 600; color: var(--ink); background: var(--aio-soft); flex: none; }
.gp-info-actions { display: grid; grid-template-columns: repeat(4, 1fr); gap: 8px; }
.gp-info-actions button {
  display: flex; flex-direction: column; align-items: center; gap: 4px; padding: 12px 4px; border-radius: 16px;
  background: var(--surface); border: 1px solid var(--line); color: var(--ink); font-size: .78rem; font-weight: 600;
}
.gp-info-actions svg { width: 22px; height: 22px; color: var(--aio-blue); }
.gp-info-card { display: flex; flex-direction: column; gap: 6px; padding: 14px; border-radius: 16px; background: var(--surface); border: 1px solid var(--line); }
.gp-info-card p { margin: 0; font-size: .92rem; line-height: 1.45; overflow-wrap: anywhere; white-space: pre-line; }
.gp-info-card small { font-size: .76rem; }
.gp-info-row { display: flex; align-items: center; justify-content: space-between; gap: 8px; }
.gp-info-row .lbl { font-size: .72rem; letter-spacing: .06em; text-transform: uppercase; color: var(--muted); font-weight: 600; }
.gp-icons { grid-template-columns: repeat(8, minmax(0, 1fr)); gap: 4px; }
.gp-icons button { min-width: 0; font-size: 1.1rem; }
.gp-person-btn { width: 100%; text-align: left; color: var(--ink); }
.gp-person-btn:active { transform: scale(.99); }
.gp-add-av { background: var(--aio-blue); color: #fff; box-shadow: none; }
.gp-add-av svg { width: 20px; height: 20px; }
#gpLeave { margin-top: 6px; }

.gp-face { padding: 0; border-radius: 50%; flex: none; }
.gp-msg-meta { display: flex; align-items: center; gap: 4px; }
.gp-msg.mine .gp-msg-meta { justify-content: flex-end; }
.gp-dots { padding: 0 6px; height: 20px; border-radius: 10px; font-size: .9rem; line-height: 1; color: var(--muted); }
.gp-dots:active { background: var(--aio-soft); }
.gp-deleted { font-style: italic; color: var(--muted); background: transparent !important; border: 1px dashed var(--line); }
.gp-msg[data-mid] .gp-msg-body, .gp-system[data-mid] { -webkit-touch-callout: none; cursor: context-menu; }
.gp-msg-preview { padding: 12px; border-radius: 14px; background: rgba(0, 0, 0, .22); }
.gp-msg-preview small { font-size: .74rem; color: var(--muted); }
.gp-msg-preview p { margin: 4px 0 0; font-size: .95rem; overflow-wrap: anywhere; max-height: 7.5em; overflow: hidden; }
#gpFieldArea {
  min-height: 92px; padding: 12px 16px; border-radius: 14px; border: 1px solid var(--line); outline: none; resize: vertical;
  background: rgba(0, 0, 0, .28); color: var(--ink); font: inherit; font-size: 1rem;
}
#gpFieldArea:focus { border-color: var(--aio-blue); box-shadow: 0 0 0 3px rgba(0, 82, 255, .3); }

.gp-person-head { display: flex; align-items: center; gap: 14px; }
.gp-person-head h2 { font-size: 1.3rem !important; }
.gp-person-head p { margin: 2px 0 6px; }
.gp-person-head .avatar.xl { width: 72px; height: 72px; font-size: 1.8rem; }
.gp-person-balance { margin: 0; font-size: .9rem; color: var(--muted); text-align: center; }
.gp-person-balance:empty, .gp-person-admin:empty { display: none; }
.gp-person-admin { display: flex; flex-direction: column; gap: 10px; }
.gp-friend-state { display: flex; align-items: center; gap: 8px; padding: 10px 12px; border-radius: 14px; background: var(--aio-soft); font-size: .9rem; }
.gp-friend-state span { flex: 1; }
.gp-friend-state.on { color: var(--aio-ok); font-weight: 600; }

/* Parches, Splitwise-style: the total, who owes whom per parche, and a parche's Cuentas */
.gp-total { font-size: 1.15rem; font-weight: 700; padding: 2px 2px 4px; }
.gp-total:empty { display: none; }
.gp-parche-row { align-items: flex-start !important; }
.gp-parche-row .gp-group-emoji { margin-top: 2px; }
.gp-parche-row .grow b { display: flex; align-items: center; gap: 6px; }
.gp-owe-line { white-space: normal !important; }
.gp-owe-line b, .gp-acc-lines b { color: var(--ink); }
.gp-owe-line b.gp-up, .gp-acc-lines b.gp-up { color: var(--aio-ok); }
.gp-status { flex: none; text-align: right; font-weight: 700; font-size: .92rem; font-variant-numeric: tabular-nums; }
.gp-status small { display: block; font-size: .68rem; font-weight: 600; color: inherit; opacity: .85; }
.gp-status .muted small { opacity: 1; }
body[data-nav] #chat.active::after { display: none; }
body[data-nav] #chat .gp-composer { padding-bottom: calc(86px + var(--safe-b)); }
#chat .gp-tabs { padding-top: 0; }
.gp-acc-head { display: flex; flex-direction: column; gap: 6px; padding: 16px; border-radius: 18px; background: var(--surface); border: 1px solid var(--line); }
.gp-acc-total { margin: 0; font-size: 1.2rem; font-weight: 700; }
.gp-acc-total b { font-variant-numeric: tabular-nums; }
.gp-acc-lines { display: flex; flex-direction: column; gap: 2px; padding-left: 10px; border-left: 2px solid var(--line); font-size: .9rem; color: var(--muted); }
.gp-acc-head p.muted { margin: 2px 0 0; }
.gp-acc-actions { display: flex; gap: 8px; flex-wrap: wrap; }
.gp-acc-list { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 6px; }
.gp-acc-row {
  width: 100%; display: flex; align-items: center; gap: 10px; padding: 10px 12px; border-radius: 14px; text-align: left; color: var(--ink);
  background: var(--surface); border: 1px solid var(--line); font-size: .9rem;
}
.gp-acc-row:active { transform: scale(.99); }
.gp-acc-row .grow { flex: 1; min-width: 0; display: flex; flex-direction: column; }
.gp-acc-row .grow small { color: var(--muted); font-size: .76rem; }
.gp-acc-date { width: 30px; flex: none; display: flex; flex-direction: column; align-items: center; line-height: 1.05; color: var(--muted); }
.gp-acc-date small { font-size: .64rem; text-transform: uppercase; }
.gp-acc-date b { font-size: 1.05rem; color: var(--ink); }
.gp-acc-ic { width: 36px; height: 36px; flex: none; display: grid; place-items: center; border-radius: 10px; background: var(--aio-soft); font-size: 1.1rem; }
