/* 泡泡 on libenest.com (platform-bubbles.mjs, bubbles.js): 我的泡泡, one bubble and an invite. One white column with its
   own top bar on a phone (the site's header and footer step aside, the tab bar stays), a centred card on a computer.
   A bubble wears its emoji on a filled circle of its colour; muted text is #5f6672 (4.5:1 on white). */
.bb, .bb-sheet { --bb-ink:var(--lb-text,#101113); --bb-muted:var(--lb-text-2,#5f6672); --bb-line:var(--lb-line,#eef0f3); --bb-blue:#006bff; --bb-danger:var(--lb-red-text,#c0262d); }
.bb { position:relative; width:100%; max-width:560px; margin:0 auto; color:var(--bb-ink); font-size:15px; }
.bb .sr-only, .bb-sheet .sr-only { position:absolute; width:1px; height:1px; padding:0; margin:-1px; overflow:hidden; clip:rect(0,0,0,0); white-space:nowrap; border:0; }
.bb [hidden], .bb-sheet [hidden] { display:none !important; }
.bb :is(a, button, input):focus-visible, .bb-sheet :is(a, button, input):focus-visible { outline:2px solid var(--lb-link,var(--bb-blue)); outline-offset:2px; }

.bb-head { position:sticky; top:0; z-index:3; display:grid; grid-template-columns:52px minmax(0,1fr) 52px; align-items:center; height:52px; padding:0 4px; border-bottom:1px solid var(--bb-line); background:var(--lb-bg,#fff); }
.bb-head h1 { overflow:hidden; margin:0; font-size:17px; font-weight:700; text-align:center; text-overflow:ellipsis; white-space:nowrap; }
.bb-icon, .bb-icon-space { display:grid; place-items:center; width:44px; height:44px; padding:0; border:0; border-radius:50%; background:none; color:var(--bb-ink); cursor:pointer; }
.bb-head > :last-child { justify-self:end; }
.bb-status { margin:0; padding:40px 16px; color:var(--bb-muted); text-align:center; }

.bb-primary, .bb-secondary { display:inline-flex; align-items:center; justify-content:center; gap:6px; min-height:46px; padding:0 18px; box-sizing:border-box; border:0; border-radius:12px; font:inherit; font-size:15px; font-weight:700; text-decoration:none; cursor:pointer; }
.bb-primary { background:var(--bb-blue); color:#fff; }
.bb-secondary { background:var(--lb-surface,#eff2f5); color:var(--bb-ink); }
.bb-primary:disabled { opacity:.55; cursor:default; }
.bb-wide { width:100%; }
.bb-cover-picker { flex-direction:column; gap:2px; padding:8px 14px; }
.bb-cover-drop-hint { color:var(--bb-muted); font-size:12px; font-weight:400; }
.bb-cover-drop.is-photo-drop { outline:3px solid var(--bb-blue); outline-offset:-3px; border-radius:12px; }

/* A bubble's mark: its emoji on its colour. */
.bb-mark { flex:none; display:grid; place-items:center; width:48px; height:48px; border-radius:50%; background:var(--bb, #1f9d55); font-size:24px; line-height:1; }
.bb-mark-big { width:84px; height:84px; font-size:42px; }

.bb-gate, .bb-empty, .bb-gone, .bb-hero { display:grid; justify-items:center; gap:10px; padding:40px 24px 24px; text-align:center; }
.bb-gate h2, .bb-empty h2, .bb-gone h1, .bb-gone h2, .bb-hero h1, .bb-hero h2 { margin:6px 0 0; font-size:21px; font-weight:700; line-height:1.35; overflow-wrap:anywhere; }
.bb-empty p, .bb-gone p, .bb-count, .bb-from { margin:0; color:var(--bb-muted); line-height:1.55; }
.bb-gate .bb-primary, .bb-empty .bb-primary { margin-top:10px; min-width:200px; }
.bb-hero .bb-primary { margin-top:8px; min-width:160px; }
/* 聊天 (the bubble's group chat) and, for its owner, 邀請, side by side. */
.bb-hero-actions { display:flex; flex-wrap:wrap; justify-content:center; gap:8px; margin-top:8px; }
.bb-hero-actions .bb-primary, .bb-hero-actions .bb-secondary { margin-top:0; min-width:96px; padding:0 14px; }
/* 聊天 · 相簿 · 地圖: the bubble's three places, side by side; on its albums the current one is filled. */
.bb-tabs { display:grid; grid-template-columns:repeat(3, minmax(0, 1fr)); gap:8px; width:100%; max-width:360px; margin-top:8px; }
.bb-tab { display:flex; flex-direction:column; align-items:center; justify-content:center; gap:2px; min-height:58px; border-radius:12px; background:var(--lb-surface,#eff2f5); color:var(--bb-ink); font-size:13px; font-weight:700; text-decoration:none; }
.bb-tab.is-current { background:var(--bb-blue); color:#fff; }
/* 追蹤全部成員 (旅伴模式): a quiet line under the buttons, until everyone with a page is followed. */
.bb-follow-all { display:inline-flex; align-items:center; gap:6px; min-height:44px; padding:0 12px; border:0; border-radius:10px; background:none; color:var(--lb-link,var(--bb-blue)); font:inherit; font-size:14px; font-weight:700; cursor:pointer; }
.bb-follow-all:disabled { color:var(--bb-muted); cursor:default; }

/* 我的泡泡: one row per bubble, its mark, name and count, a few faces. */
.bb-list { display:grid; margin:0; padding:6px 0; list-style:none; }
.bb-item { display:flex; align-items:center; gap:12px; min-height:68px; padding:8px 16px; color:inherit; text-decoration:none; }
.bb-item:hover { background:var(--lb-surface,#f7f8fa); }
.bb-item-text { display:grid; flex:1; gap:2px; min-width:0; }
.bb-item-text strong { overflow:hidden; font-size:16px; text-overflow:ellipsis; white-space:nowrap; }
.bb-item-text small { color:var(--bb-muted); font-size:13px; }
.bb-faces { display:flex; flex:none; }
.bb-faces .bb-face + .bb-face { margin-left:-8px; }
.bb-face { flex:none; display:grid; place-items:center; width:44px; height:44px; overflow:hidden; border-radius:50%; background:var(--lb-surface,#e9edf2); color:var(--bb-muted); font-size:17px; font-weight:700; }
.bb-face img { display:block; width:100%; height:100%; object-fit:cover; }
.bb-face.bb-face-small { width:28px; height:28px; box-sizing:border-box; border:2px solid var(--lb-bg,#fff); font-size:12px; }

/* One bubble: who is in it. */
.bb-members { display:grid; margin:0; padding:4px 0 24px; border-top:1px solid var(--bb-line); list-style:none; }
.bb-member { display:flex; align-items:center; gap:12px; min-height:60px; padding:6px 16px; }
.bb-member-name { display:flex; flex:1; flex-wrap:wrap; align-items:center; gap:6px; min-width:0; font-weight:600; }
.bb-member-name a, .bb-member-name > span { overflow:hidden; max-width:100%; color:inherit; text-decoration:none; text-overflow:ellipsis; white-space:nowrap; }
.bb-tag { padding:1px 8px; border-radius:999px; background:var(--lb-surface,#eff2f5); color:var(--bb-muted); font-size:12px; font-weight:600; }
.bb-tag-me { background:var(--lb-surface,#e5f4ec); color:var(--lb-green-text,#176b3d); }
.bb-remove { flex:none; min-height:36px; min-width:44px; padding:0 12px; border:1px solid var(--lb-line,#dfe3e8); border-radius:10px; background:var(--lb-bg,#fff); color:var(--bb-ink); font:inherit; font-size:13px; font-weight:600; cursor:pointer; }

/* Sheets: from the bottom on a phone, in the middle on a computer. */
.bb-sheet { width:100%; max-width:480px; max-height:92dvh; margin:auto auto 0; padding:0; overflow:auto; border:0; border-radius:20px 20px 0 0; background:var(--lb-elevated,#fff); color:var(--lb-text,#101113); }
.bb-sheet::backdrop { background:rgb(16 17 19 / 45%); }
.bb-sheet-body { display:grid; gap:14px; padding:20px 16px calc(16px + env(safe-area-inset-bottom)); }
.bb-sheet h2 { margin:0; font-size:18px; font-weight:700; text-align:center; overflow-wrap:anywhere; }
.bb-preview { display:grid; justify-items:center; }
.bb-field { display:grid; gap:6px; font-size:14px; font-weight:600; }
.bb-field input { width:100%; min-height:48px; box-sizing:border-box; padding:10px 12px; border:1px solid var(--lb-line,#e1e5ea); border-radius:12px; background:var(--lb-bg,#fff); color:var(--lb-text,#101113); font:inherit; font-size:16px; font-weight:400; }
.bb-choices { margin:0; padding:0; border:0; }
.bb-choices legend { margin-bottom:8px; padding:0; font-size:14px; font-weight:600; }
.bb-emoji { display:grid; grid-template-columns:repeat(6, minmax(0, 1fr)); gap:6px; max-height:216px; padding:2px; overflow-y:auto; overscroll-behavior:contain; }
.bb-pick { position:relative; display:grid; place-items:center; min-height:46px; border-radius:12px; background:var(--lb-surface,#f3f5f8); font-size:24px; cursor:pointer; }
.bb-pick input, .bb-swatch input { position:absolute; inset:0; width:100%; height:100%; margin:0; opacity:0; cursor:pointer; }
.bb-pick:has(input:checked) { background:var(--lb-bg,#fff); box-shadow:inset 0 0 0 2px var(--lb-text,#101113); }
.bb-pick-other span { font-size:13px; font-weight:700; color:var(--lb-text-2,#5f6672); }
.bb-pick-other:has(input:checked) span { font-size:24px; color:inherit; }
.bb-other { display:grid; gap:6px; margin-top:10px; }
.bb-other[hidden] { display:none; }
.bb-other-input { width:100%; min-height:48px; padding:0 14px; border:1px solid var(--lb-line,#d8dee8); border-radius:12px; background:var(--lb-bg,#fff); color:var(--lb-text,#101113); font:inherit; font-size:24px; }
.bb-other-hint { color:var(--lb-text-2,#5f6672); font-size:13px; }
.bb-other-hint.is-bad { color:var(--lb-red-text,#b72c2c); }
.bb-pick:has(input:focus-visible), .bb-swatch:has(input:focus-visible) { outline:2px solid var(--lb-link,var(--bb-blue)); outline-offset:2px; }
.bb-colors { display:flex; flex-wrap:wrap; gap:10px; }
.bb-swatch { position:relative; display:grid; place-items:center; width:44px; height:44px; border-radius:50%; cursor:pointer; }
.bb-swatch span { width:32px; height:32px; border-radius:50%; background:var(--bb); }
.bb-swatch:has(input:checked) { box-shadow:inset 0 0 0 2px var(--lb-text,#101113); }
.bb-error { margin:0; color:var(--bb-danger); font-size:13px; }
/* 你的名字 on an invite: the one field above 加入泡泡, as wide as the button. */
.bb-invited .bb-myname { width:100%; text-align:left; }
.bb-invited .bb-error { text-align:center; }
.bb-actions { display:grid; grid-template-columns:1fr 1fr; gap:10px; }
.bb-actions-one { grid-template-columns:1fr; }

/* 邀請: the QR code, the link and the ways to send it. */
.bb-invite-link, .bb-invite-none { display:grid; justify-items:center; gap:12px; text-align:center; }
.bb-qr { width:200px; height:200px; border-radius:10px; image-rendering:pixelated; }
.bb-link-field { width:100%; }
.bb-link-field input { color:var(--bb-muted); font-size:14px; text-overflow:ellipsis; }
.bb-share-row { display:flex; flex-wrap:wrap; justify-content:center; gap:8px; width:100%; }
.bb-share-row > * { flex:1 1 120px; }
.bb-line { background:#06c755; color:#fff; }
.bb-small { margin:0; color:var(--bb-muted); font-size:13px; line-height:1.55; }

.bb-menu { gap:4px; }
.bb-menu-item { min-height:52px; border:0; border-radius:12px; background:none; color:var(--lb-text,#101113); font:inherit; font-size:16px; cursor:pointer; }
.bb-menu-item:hover { background:var(--lb-surface,#f3f5f8); }
.bb-danger { color:var(--bb-danger); font-weight:600; }

/* On a phone these pages are the screen: the site's header and footer step aside; the tab bar stays. */
@media (max-width:767px) {
  .bubbles-body .ag-header, .bubbles-body .ag-footer, .bubbles-body .ag-header-space { display:none !important; }
}
@media (min-width:768px) {
  .bubbles-body main { padding:32px 16px 56px; background:var(--lb-surface,#f5f7fa); }
  .bb { overflow:hidden; border:1px solid var(--lb-line,#e4e8ed); border-radius:22px; background:var(--lb-bg,#fff); }
  .bb-head { position:static; }
  .bb-sheet { margin:auto; border-radius:20px; }
}

.bb-plans { margin-block:16px; min-width:0; overflow-wrap:anywhere; }
.bb-plans h2 { font-size:1rem; }
.bb-plan { display:flex; flex-wrap:wrap; justify-content:space-between; gap:8px; min-height:44px; padding-block:10px; color:inherit; }
.bb-plan strong { min-width:0; overflow-wrap:anywhere; }
.bb-plans ol { padding-inline-start:24px; margin-block:4px 16px; }
.bb-plans li { margin-block:6px; }
.bb-plans li span { display:block; overflow-wrap:anywhere; }
.bb-downloads { max-height:40dvh; margin:0; padding:0; overflow:auto; list-style:none; }
.bb-downloads a { display:block; max-width:100%; overflow-wrap:anywhere; }
/* What a 泡泡 is, under 我的泡泡's title. */
.bb-intro { margin:0; padding:12px 16px 4px; color:var(--bb-muted); font-size:14px; line-height:1.55; }

.bb-mark { overflow:hidden; }
.bb-mark img { width:100%; height:100%; object-fit:cover; }
.bb-list-row { display:flex; align-items:center; }
.bb-list-row > .bb-item { flex:1; min-width:0; }
.bb-list-albums { flex:none; margin-right:16px; padding:10px 12px; border-radius:10px; background:var(--lb-surface,#eff2f5); color:var(--lb-link,#006bff); text-decoration:none; font-weight:700; }
.bb-recent { padding:16px; border-top:1px solid var(--bb-line); }
.bb-recent h2 { font-size:17px; margin:0 0 12px; }
.bb-recent > div { display:grid; grid-template-columns:repeat(3,minmax(0,1fr)); gap:10px; margin-bottom:12px; }
.bb-recent > div > a { display:grid; align-content:start; gap:5px; color:inherit; text-decoration:none; overflow-wrap:anywhere; }
.bb-recent img { width:100%; aspect-ratio:1; object-fit:cover; border-radius:10px; }
.bb-recent small { color:var(--bb-muted); }
