/* 泡泡相簿 on libenest.com (platform-bubble-albums.mjs, bubble-albums.js): a bubble's albums and one album, on bubbles.css's
   column, top bar and sheets. Album covers in two columns, photos in three with 2px gaps (as on a phone's gallery), and one
   photo full screen on black (the photo's own stage stays black in both themes). Colours read the dark tokens with the
   light look as the fallback (theme.css). */
.ba { padding-bottom:calc(150px + env(safe-area-inset-bottom)); }
.ba > .bb-tabs { margin:12px auto 4px; padding:0 16px; box-sizing:border-box; }

/* A bubble's albums. */
.ba-albums { display:grid; grid-template-columns:repeat(2, minmax(0, 1fr)); gap:16px 12px; margin:0; padding:12px 16px 4px; list-style:none; }
.ba-album { display:grid; gap:4px; min-width:0; color:inherit; text-decoration:none; }
.ba-album strong { font-size:15px; line-height:1.45; overflow-wrap:anywhere; white-space:normal; }
.ba-album small { color:var(--lb-text-2,#5f6672); font-size:13px; }
.ba-cover { display:grid; place-items:center; aspect-ratio:1; overflow:hidden; border-radius:12px; background:var(--lb-surface,#eff2f5); }
.ba-cover img { display:block; width:100%; height:100%; object-fit:cover; }
.ba-cover-none { font-size:34px; }
.ba-album:focus-visible .ba-cover { outline:2px solid var(--lb-link,#006bff); outline-offset:2px; }
.ba-new-card { display:flex; align-items:center; justify-content:center; gap:6px; width:calc(100% - 32px); min-height:48px; margin:8px 16px 0; border:1px dashed var(--lb-line-strong,#c5ccd5); border-radius:12px; background:none; color:var(--lb-text,#101113); font:inherit; font-size:15px; font-weight:700; cursor:pointer; }
/* The bubble's photo count: quiet, at the end. */
.ba-total { margin:20px 16px 0; color:var(--lb-text-2,#5f6672); font-size:12px; text-align:center; }

/* One album: its count, 選取 and ＋ 加照片, then the grid. */
.ba-bar { display:flex; align-items:center; gap:8px; padding:10px 16px; }
.ba-count { flex:1; margin:0; color:var(--lb-text-2,#5f6672); font-size:14px; }
.ba-bar .bb-secondary, .ba-bar .bb-primary { min-height:40px; padding:0 14px; font-size:14px; }
.ba-add { position:relative; }
.ba-add:focus-within { outline:2px solid var(--lb-link,#006bff); outline-offset:2px; }
.ba-hint { margin:0 16px 8px; color:var(--lb-text-2,#5f6672); font-size:13px; }
.ba-grid { display:grid; grid-template-columns:repeat(3, minmax(0, 1fr)); gap:2px; margin:0; padding:0; list-style:none; }
.ba-tile { position:relative; display:block; width:100%; aspect-ratio:1; padding:0; overflow:hidden; border:0; background:var(--lb-surface,#eff2f5); cursor:pointer; -webkit-touch-callout:none; user-select:none; }
.ba-tile img { display:block; width:100%; height:100%; object-fit:cover; pointer-events:none; }
.ba-tile:focus-visible { outline:3px solid var(--lb-link,#006bff); outline-offset:-3px; }
.ba-tile.is-picked img { opacity:.72; }
.ba-tick { position:absolute; top:6px; right:6px; display:grid; place-items:center; width:24px; height:24px; box-sizing:border-box; border:2px solid #fff; border-radius:50%; background:rgb(0 0 0 / 25%); color:#fff; font-size:14px; font-weight:700; }
.ba-tile.is-picked .ba-tick { background:#006bff; }
.ba-tick-locked { border:0; background:rgb(0 0 0 / 55%); font-size:12px; }
.ba-tile[aria-disabled="true"] img { opacity:.5; }
.ba-more { display:flex; margin:16px auto 0; }
.ba-empty { display:grid; justify-items:center; gap:8px; padding:48px 24px; text-align:center; }
.ba-empty h2 { margin:0; font-size:19px; }
.ba-empty p { margin:0; color:var(--lb-text-2,#5f6672); line-height:1.55; }
.ba-empty-mark { color:var(--lb-text-2,#5f6672); }
/* 選取: a bar over the tab bar with how many and 用這些發文. */
.ba-pick { position:fixed; right:0; bottom:calc(84px + env(safe-area-inset-bottom)); left:0; z-index:20; display:flex; align-items:center; gap:8px; max-width:560px; margin:0 auto; padding:10px 16px; box-sizing:border-box; border-top:1px solid var(--lb-line,#eef0f3); background:var(--lb-elevated,#fff); }
.ba-pick > span { flex:1; font-weight:700; }
.ba-pick button { min-height:44px; padding:0 14px; }

/* One photo, full screen. */
.ba-viewer { --bb-blue:#006bff; --bb-ink:#fff; width:100%; max-width:none; height:100dvh; max-height:none; margin:0; padding:0; border:0; background:#000; color:#fff; }
.ba-viewer[open] { display:grid; grid-template-rows:auto minmax(0, 1fr) auto; }
.ba-viewer::backdrop { background:#000; }
.ba-viewer-top { display:flex; align-items:center; gap:8px; padding:calc(6px + env(safe-area-inset-top)) 8px 6px; }
.ba-viewer-count { flex:1; margin:0; font-size:15px; font-weight:600; text-align:center; }
.ba-round { display:grid; place-items:center; width:44px; height:44px; padding:0; border:0; border-radius:50%; background:rgb(255 255 255 / 12%); color:#fff; cursor:pointer; }
.ba-round:disabled { opacity:.3; cursor:default; }
.ba-round:focus-visible, .ba-viewer .bb-primary:focus-visible { outline:2px solid #fff; outline-offset:2px; }
.ba-stage { position:relative; display:grid; place-items:center; min-height:0; overflow:hidden; touch-action:pan-y pinch-zoom; }
.ba-photo { display:block; max-width:100%; max-height:100%; object-fit:contain; user-select:none; -webkit-user-drag:none; }
.ba-prev, .ba-next { position:absolute; top:50%; translate:0 -50%; background:rgb(0 0 0 / 45%); }
.ba-prev { left:8px; }
.ba-next { right:8px; }
.ba-viewer-foot { display:flex; flex-wrap:wrap; align-items:center; gap:8px 12px; padding:10px 16px calc(12px + env(safe-area-inset-bottom)); }
.ba-by { flex:1 1 160px; min-width:0; margin:0; overflow:hidden; color:#e6e6e6; font-size:14px; text-overflow:ellipsis; white-space:nowrap; }
.ba-post { min-width:96px; }
.ba-locked { display:inline-flex; align-items:center; gap:4px; margin:0; color:#e6e6e6; font-size:13px; }
.ba-viewer [hidden] { display:none !important; }

/* Sheets: 加照片's list, 檢舉's reasons. */
.ba-center { text-align:center; }
.ba-menu-link { display:grid; place-items:center; color:var(--lb-text,#101113); text-decoration:none; }
.ba-uploads { display:grid; gap:6px; max-height:44dvh; margin:0; padding:0; overflow:auto; list-style:none; }
.ba-upload { display:grid; grid-template-columns:44px minmax(0, 1fr) auto; align-items:center; gap:10px; }
.ba-upload img { width:44px; height:44px; border-radius:8px; object-fit:cover; }
.ba-upload-name { overflow:hidden; font-size:13px; text-overflow:ellipsis; white-space:nowrap; }
.ba-upload-state { max-width:150px; color:var(--lb-text-2,#5f6672); font-size:12px; text-align:right; }
.ba-upload.is-done .ba-upload-state { color:var(--lb-green-text,#176b3d); font-weight:700; }
.ba-upload.is-failed .ba-upload-state { color:var(--lb-red-text,#c0262d); }
.ba-upload.is-sending .ba-upload-state { color:var(--lb-link,#006bff); font-weight:700; }
.ba-check { display:flex; align-items:center; gap:10px; min-height:44px; font-size:14px; }
.ba-check input { width:20px; height:20px; margin:0; }
.ba-reasons { display:grid; gap:2px; margin:0; padding:0; border:0; }
.ba-reason { display:flex; align-items:center; gap:10px; min-height:40px; font-size:15px; }
.ba-reason input { width:18px; height:18px; margin:0; }

@media (min-width:768px) {
  .ba-albums { grid-template-columns:repeat(3, minmax(0, 1fr)); }
  .ba-pick { bottom:0; }
}

.ba-progress { position:absolute; z-index:1; top:env(safe-area-inset-top); right:8px; left:8px; height:2px; overflow:hidden; background:rgb(255 255 255 / 25%); pointer-events:none; }
.ba-progress span { display:block; width:0; height:100%; background:#fff; }
.ba-bar { flex-wrap:wrap; }
.ba-count { min-width:0; overflow-wrap:anywhere; }

.ac-open { display:flex; justify-content:center; width:calc(100% - 32px); min-height:44px; margin:16px; }
.ac-sheet { max-width:560px; }
.ac-sheet .bb-sheet-body { text-align:left; }
.ac-sheet h2 { text-align:center; }
.ac-map { height:200px; min-height:200px; overflow:hidden; border-radius:12px; background:var(--lb-surface,#eff2f5); }
.ac-home-actions { display:flex; flex-wrap:wrap; gap:8px; }
.ac-home-actions button { min-height:44px; }
.ac-home-actions [aria-pressed=true] { outline:2px solid var(--lb-link,#006bff); }
.ac-groups { display:grid; gap:12px; margin:12px 0; padding:0; list-style:none; }
.ac-group { padding:12px 0; border-top:1px solid var(--lb-line,#eef0f3); }
.ac-group-label { display:flex; align-items:flex-start; gap:10px; min-height:44px; cursor:pointer; }
.ac-group-label input { width:20px; height:20px; flex:none; margin:2px 0; accent-color:var(--lb-link,#006bff); }
.ac-group-label span { min-width:0; }
.ac-group-label strong,.ac-group-label small { display:block; overflow-wrap:anywhere; }
.ac-group-label small { margin-top:4px; font-size:13px; line-height:1.55; color:var(--lb-text-2,#5f6672); }
.ac-photos { display:flex; flex-wrap:wrap; gap:4px; margin:8px 0 0 30px; }
.ac-photos img { object-fit:cover; border-radius:6px; }
.ac-home-point { min-height:44px; margin-left:30px; border:0; background:none; color:var(--lb-link,#006bff); font:inherit; font-size:13px; text-decoration:underline; cursor:pointer; }
.ac-dot { display:block; width:16px; height:16px; border:2px solid #fff; border-radius:50%; background:#006bff; box-shadow:0 1px 4px #0006; }
.ac-dot.is-excluded { background:#747b86; }
.ac-result { display:flex; justify-content:center; margin:16px; }

.ba .bb-head { height:auto; min-height:52px; padding-block:8px; }
.ba .bb-head h1 { overflow:visible; white-space:normal; overflow-wrap:anywhere; line-height:1.4; }
.ba-album-cover { display:flex; align-items:center; justify-content:center; gap:12px; padding:12px 16px; }
.ba-album-cover img { width:104px; height:78px; border-radius:10px; object-fit:cover; }
.ba-checkins-link { display:inline-block; margin-top:8px; color:var(--lb-link,#006bff); font-size:13px; font-weight:700; text-decoration:none; }

.ba-photo-hub{padding:20px 16px 0}.ba-photo-hub h2{font-size:1.15rem;margin:12px 0}.ba-photo-hub p{color:var(--bb-muted);line-height:1.6;overflow-wrap:anywhere}.ba-photo-hub .ba-albums{padding:16px 0}.ba-photo-hub .bb-actions{flex-wrap:wrap;margin-bottom:28px}.ba-photo-hub .bb-actions a{text-decoration:none}

.ba-share-circles{display:flex;flex-wrap:wrap;gap:8px}.ba-share-circles .ba-check{padding:8px 12px;border:1px solid currentColor;border-radius:16px}.ba.is-photo-drop{outline:3px dashed #0869df;outline-offset:-5px}

.ba-metadata-summary { margin:8px 0 16px; color:var(--lb-text-2,#5f6672); font-size:13px; line-height:1.6; overflow-wrap:anywhere; }
.ba-photo-facts { flex:1 0 100%; order:3; margin:0; color:#d5d9df; font-size:12px; line-height:1.6; overflow-wrap:anywhere; }
.ba-upload-facts { grid-column:2 / -1; margin-top:-6px; padding-bottom:8px; color:var(--lb-text-2,#5f6672); font-size:12px; line-height:1.5; overflow-wrap:anywhere; }

/* 標記人物 (share-tags.js): the photo at its own shape, names where they were tapped, the photos to switch, the search. */
.fs-tags-open.is-chosen .fs-place-text small { color:var(--fs-blue); font-weight:700; }
.fs-tag-sheet { max-width:560px; }
.fs-tag-head { display:flex; align-items:center; justify-content:space-between; gap:12px; }
.fs-tag-head h2 { text-align:left; }
.fs-tag-hint { margin:0; color:var(--fs-muted); font-size:13px; text-align:center; }
.fs-tag-stage { display:grid; justify-items:center; }
.fs-tag-frame { position:relative; display:inline-block; max-width:100%; line-height:0; }
.fs-tag-photo { display:block; max-width:100%; max-height:48dvh; border-radius:10px; cursor:crosshair; }
.fs-tag-on { position:absolute; transform:translate(-50%, 6px); display:inline-flex; align-items:center; gap:4px; max-width:60%; padding:4px 4px 4px 10px; border-radius:8px; background:rgba(17,19,23,.82); color:#fff; font-size:13px; font-weight:600; line-height:18px; white-space:nowrap; }
.fs-tag-on > span { overflow:hidden; text-overflow:ellipsis; }
.fs-tag-spot { position:absolute; width:22px; height:22px; border:3px solid #fff; border-radius:50%; background:var(--fs-blue); box-shadow:0 1px 6px rgba(0,0,0,.35); transform:translate(-50%, -50%); pointer-events:none; }
.fs-tag-x { display:grid; place-items:center; width:26px; height:26px; padding:0; border:0; border-radius:50%; background:none; color:inherit; font:inherit; font-size:12px; cursor:pointer; }
.fs-tag-list { display:flex; flex-wrap:wrap; justify-content:center; gap:8px; min-height:8px; }
.fs-tag-chip { display:inline-flex; align-items:center; gap:2px; padding:4px 4px 4px 12px; border-radius:999px; background:var(--fs-field); color:var(--fs-ink); font-size:14px; font-weight:600; }
.fs-tag-strip { display:flex; gap:8px; overflow-x:auto; scrollbar-width:none; }
.fs-tag-strip:empty { display:none; }
.fs-tag-thumb { position:relative; flex:none; width:52px; height:52px; padding:0; border:2px solid transparent; border-radius:8px; background:none; cursor:pointer; overflow:hidden; }
.fs-tag-thumb[aria-current="true"] { border-color:var(--fs-blue); }
.fs-tag-thumb img { width:100%; height:100%; object-fit:cover; }
.fs-tag-thumb[data-tagged]::after { content:attr(data-tagged); position:absolute; right:2px; bottom:2px; min-width:16px; height:16px; padding:0 4px; border-radius:8px; background:var(--fs-blue); color:#fff; font-size:11px; line-height:16px; }
.fs-tag-find { display:grid; gap:6px; }
.fs-tag-find[hidden] { display:none; }
.fs-tag-find input { width:100%; min-height:44px; padding:0 14px; border:1px solid var(--fs-field); border-radius:12px; background:#fff; color:var(--fs-ink); font:inherit; font-size:16px; }
.fs-tag-results { display:grid; margin:0; padding:0; list-style:none; }
.fs-tag-person { display:flex; align-items:center; gap:10px; width:100%; min-height:52px; padding:6px 4px; border:0; background:none; color:var(--fs-ink); font:inherit; text-align:left; cursor:pointer; }
.fs-tag-face { display:grid; place-items:center; flex:none; width:40px; height:40px; border-radius:50%; overflow:hidden; background:var(--fs-field); color:var(--fs-muted); font-weight:700; }
.fs-tag-face img { width:100%; height:100%; object-fit:cover; }
.fs-tag-who { display:grid; min-width:0; line-height:1.35; }
.fs-tag-who strong, .fs-tag-who small { overflow:hidden; text-overflow:ellipsis; white-space:nowrap; }
.fs-tag-who small { color:var(--fs-muted); font-size:13px; }
.fs-tag-empty { padding:10px 4px; color:var(--fs-muted); font-size:14px; }
.ba-viewer-foot .photo-information{flex:1 0 100%;order:4;margin:0}
.ba-viewer-foot:has(.photo-information[open]){max-height:60dvh;overflow-y:auto}
