/* GangPlan live trip photos: the Photos tab, the share sheet and the photo viewer. Author: Lee Alderman. */
/* Builds on app.css (tokens, .btn, .chip, .label, .avatar, .round-btn, .form, .link-btn); only what is new lives here. */

.photos { position: relative; display: flex; flex-direction: column; gap: 16px; min-width: 0; }
.photos [hidden], .ph-sheet [hidden], .ph-lb [hidden] { display: none !important; }
.ph-where:empty, .ph-compose:empty, .ph-status:empty, .ph-blank:empty, .ph-feed:empty, .ph-more:empty { display: none; }
.ph-file { position: absolute; left: 0; top: 0; width: 1px; height: 1px; opacity: 0; pointer-events: none; }

/* One colour per stage: the same ones the plan uses for its kinds of stop. */
.ph-s-heading { --s: #0e8f8f; }
.ph-s-lounge { --s: #6b5bd2; }
.ph-s-boarding { --s: #2f8fd0; }
.ph-s-landed { --s: #e8613c; }
.ph-s-together { --s: #d99411; }

@keyframes ph-spin { to { transform: rotate(360deg); } }
@keyframes ph-shimmer { to { background-position: -220% 0; } }
@keyframes ph-ping { 0% { opacity: .7; transform: scale(1); } 70%, 100% { opacity: 0; transform: scale(1.45); } }
@keyframes ph-pop { from { opacity: 0; transform: scale(.9); } }
@keyframes ph-done { 0% { opacity: 0; transform: scale(.5); } 16% { opacity: 1; transform: scale(1.12); } 28% { transform: scale(1); } 72% { opacity: 1; } 100% { opacity: 0; } }
.ph-spin { display: inline-block; width: 14px; height: 14px; flex: none; border-radius: 50%; border: 2.2px solid currentColor; border-right-color: transparent; animation: ph-spin .7s linear infinite; }

/* ---------- who's where ---------- */
.ph-where { display: flex; flex-direction: column; gap: 8px; min-width: 0; }
.ph-where-title { margin: 0; }
.ph-who-list { list-style: none; display: flex; gap: 10px; margin: 0 -16px; padding: 2px 16px 10px; overflow-x: auto; scrollbar-width: none; scroll-snap-type: x proximity; scroll-padding: 0 16px; -webkit-overflow-scrolling: touch; }
.ph-who-list::-webkit-scrollbar { display: none; }
.ph-who-list li { flex: none; display: flex; scroll-snap-align: start; }
.ph-who {
  position: relative; isolation: isolate; overflow: hidden; display: flex; flex-direction: column; gap: 11px; min-width: 152px; max-width: 220px; padding: 12px 14px 12px 12px;
  border-radius: var(--radius); border: 1px solid var(--line); background: var(--surface); box-shadow: var(--shadow-1); color: var(--ink); text-align: left;
  transition: transform .28s var(--ease), box-shadow .28s var(--ease), border-color .2s;
}
.ph-who::before { content: ""; position: absolute; z-index: -1; right: -36px; top: -44px; width: 120px; height: 120px; border-radius: 50%; pointer-events: none; background: radial-gradient(circle, color-mix(in srgb, var(--s) 26%, transparent), transparent 68%); }
button.ph-who:hover { transform: translateY(-2px); box-shadow: var(--shadow-2); border-color: color-mix(in srgb, var(--s) 45%, var(--line)); }
button.ph-who:active { transform: scale(.98); }
.ph-who-top { display: flex; align-items: center; gap: 12px; }
.ph-who-face { position: relative; display: grid; flex: none; border-radius: 50%; box-shadow: 0 0 0 2px var(--surface), 0 0 0 4px color-mix(in srgb, var(--s) 70%, transparent); }
.ph-who-text { display: flex; flex-direction: column; gap: 1px; min-width: 0; line-height: 1.22; }
.ph-who-text strong { font-weight: 650; font-size: .98rem; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.ph-who-stage { display: inline-flex; align-items: center; gap: 5px; font-size: .84rem; font-weight: 700; white-space: nowrap; color: color-mix(in srgb, var(--s) 74%, var(--ink)); }
.ph-who-foot { display: flex; align-items: center; gap: 10px; }
.ph-track { flex: 1 1 auto; display: flex; gap: 3px; min-width: 46px; }
.ph-track i { flex: 1; height: 4px; border-radius: 2px; background: var(--surface-2); }
.ph-track i.on { background: var(--s); }
.ph-who-ago { flex: none; font-size: .76rem; color: var(--muted); font-variant-numeric: tabular-nums; white-space: nowrap; }
.ph-who.ph-fresh { border-color: color-mix(in srgb, var(--s) 50%, var(--line)); background: linear-gradient(135deg, color-mix(in srgb, var(--s) 12%, var(--surface)), var(--surface) 64%); }
.ph-fresh .ph-who-face::after { content: ""; position: absolute; inset: -4px; border-radius: 50%; border: 2px solid var(--s); pointer-events: none; animation: ph-ping 2.4s ease-out infinite; }

/* ---------- add photos, what is waiting, trouble ---------- */
.ph-compose { display: flex; flex-direction: column; gap: 10px; min-width: 0; }
.btn.ph-add { font-size: 1rem; }
.btn.ph-add .icon { font-size: 1.1rem; }
.ph-note { display: flex; align-items: center; gap: 10px; padding: 10px 13px; border-radius: 12px; font-size: .88rem; font-weight: 500; line-height: 1.35; background: color-mix(in srgb, var(--accent-soft) 70%, var(--surface)); color: var(--accent); }
.ph-note .grow { color: var(--ink); }
/* Photos on a stop: the strip in the plan and on the map, the chips in the tab, and the stop's own sheet. */
.stop-photos { display: inline-flex; align-items: center; gap: 9px; margin-top: 7px; padding: 0; border: 0; background: none; color: var(--accent); font: 600 .8rem var(--body); cursor: pointer; }
.stop-thumbs { display: inline-flex; }
.stop-thumbs img { width: 38px; height: 38px; border-radius: 9px; object-fit: cover; border: 2px solid var(--surface); background: var(--surface-2); box-shadow: var(--shadow-1); }
.stop-thumbs img + img { margin-left: -10px; }
.stop-count { display: inline-flex; align-items: center; gap: 5px; }
.stop-photos:hover .stop-count { text-decoration: underline; }
.pop .stop-photos { margin: 0 0 8px; }
.ph-stops:empty { display: none; }
.ph-stop-chips { display: flex; flex-wrap: wrap; gap: 7px; }
.ph-stop-chips .chip b { font-weight: 700; color: var(--accent); }
.ph-stop-grid { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(auto-fill, minmax(104px, 1fr)); gap: 6px; }
.ph-stop-grid button { display: block; width: 100%; padding: 0; border: 0; border-radius: 12px; overflow: hidden; background: var(--surface-2); cursor: pointer; aspect-ratio: 1; }
.ph-stop-grid img { width: 100%; height: 100%; object-fit: cover; display: block; }
.ph-stop-big { margin: 0; border-radius: 14px; overflow: hidden; background: #0d1517; display: grid; place-items: center; }
.ph-stop-big img { max-width: 100%; max-height: 62vh; display: block; }
.ph-stop-by { display: flex; gap: 10px; align-items: flex-start; }
.ph-stop-by p { margin: 4px 0 0; }
.ph-lb-stop { display: flex; align-items: center; gap: 6px; margin: 6px 0 0; font-size: .86rem; opacity: .9; }
.ph-wifi { display: flex; align-items: center; flex-wrap: wrap; gap: 4px 10px; font-size: .88rem; color: var(--muted); }
.ph-wifi span { display: inline-flex; align-items: center; gap: 6px; }
.ph-wifi small { flex: 1 1 100%; padding-left: 30px; font-size: .8rem; line-height: 1.35; }
.ph-note .link-btn { flex: none; white-space: nowrap; font-size: .86rem; text-decoration: underline; color: inherit; }
.ph-note.ph-wait, .ph-banner { background: color-mix(in srgb, var(--sun) 20%, var(--surface)); border: 1px solid color-mix(in srgb, var(--sun) 46%, var(--line)); color: color-mix(in srgb, var(--sun) 38%, var(--ink)); }
.ph-note.ph-bad { background: color-mix(in srgb, var(--bad) 10%, var(--surface)); border: 1px solid color-mix(in srgb, var(--bad) 30%, var(--line)); color: var(--bad); }
.ph-banner { display: flex; align-items: center; gap: 9px; padding: 9px 12px; border-radius: 12px; font-size: .86rem; font-weight: 500; }
.ph-banner .link-btn { color: inherit; text-decoration: underline; white-space: nowrap; font-size: .86rem; }
.photos .link-btn:disabled { opacity: .55; cursor: default; }
.ph-draft { display: flex; flex-wrap: wrap; align-items: center; gap: 8px 12px; padding: 10px 10px 10px 14px; border-radius: 16px; border: 1.5px dashed color-mix(in srgb, var(--accent) 36%, var(--line)); background: color-mix(in srgb, var(--accent-soft) 34%, transparent); }
.ph-draft .grow { display: flex; flex-direction: column; flex: 1 1 150px; line-height: 1.25; }
.ph-draft-actions { display: flex; align-items: center; gap: 4px; margin-left: auto; }
.ph-draft small { color: var(--muted); font-size: .83rem; }
.ph-draft-stack { display: flex; flex: none; padding-left: 6px; }
.ph-draft-stack img { width: 40px; height: 40px; margin-left: -12px; border-radius: 10px; object-fit: cover; box-shadow: 0 0 0 2px var(--surface), var(--shadow-1); transform: rotate(-5deg); }
.ph-draft-stack img:nth-child(2) { transform: rotate(4deg); }
.ph-draft-stack img:nth-child(3) { transform: rotate(-2deg); }

.btn.ph-loading .icon { display: none; }
.btn.ph-loading::before { content: ""; width: 15px; height: 15px; flex: none; border-radius: 50%; border: 2.2px solid currentColor; border-right-color: transparent; animation: ph-spin .7s linear infinite; }
.photos .btn:disabled, .ph-sheet .btn:disabled, .ph-lb .btn:disabled { cursor: default; filter: saturate(.75); opacity: .78; }

/* ---------- the feed ---------- */
.ph-feed { display: flex; flex-direction: column; gap: 20px; min-width: 0; }
.ph-day { display: flex; flex-direction: column; gap: 10px; }
.ph-day-head { display: flex; align-items: baseline; gap: 10px; }
.ph-day-head h3 { font: 600 1.14rem/1.2 var(--display); letter-spacing: -.01em; }
.ph-day-count { font-size: .8rem; font-weight: 600; color: var(--faint); font-variant-numeric: tabular-nums; }
.ph-grid { list-style: none; display: grid; grid-template-columns: repeat(auto-fill, minmax(132px, 1fr)); gap: 8px; margin: 0; padding: 0; }

.ph-tile { position: relative; isolation: isolate; overflow: hidden; aspect-ratio: 1; min-width: 0; border-radius: 16px; background: var(--surface-2); box-shadow: var(--shadow-1); }
.ph-tile.ph-hero { grid-column: span 2; grid-row: span 2; border-radius: 22px; box-shadow: var(--shadow-2); }
.ph-tile.ph-new { animation: ph-pop .45s var(--ease); }
.ph-shot { position: absolute; inset: 0; display: block; width: 100%; height: 100%; padding: 0; border: 0; border-radius: inherit; background: none; cursor: zoom-in; }
.ph-shot:disabled { cursor: default; }
.ph-shot:focus-visible { outline-offset: -3px; outline-color: #fff; box-shadow: inset 0 0 0 5px var(--accent); }
.ph-img { display: block; width: 100%; height: 100%; object-fit: cover; opacity: 0; transition: opacity .35s, transform .7s var(--ease), filter .3s; }
.ph-loaded .ph-img { opacity: 1; }
.ph-tile:hover .ph-shot:not(:disabled) .ph-img { transform: scale(1.05); }
.ph-broken .ph-img { visibility: hidden; }
.ph-scrim { position: absolute; inset: 0; pointer-events: none; background: linear-gradient(180deg, rgba(8, 18, 24, .3) 0%, rgba(8, 18, 24, 0) 30%, rgba(8, 18, 24, 0) 54%, rgba(8, 18, 24, .74) 100%); }
.ph-tag {
  display: inline-flex; align-items: center; gap: 5px; max-width: calc(100% - 16px); padding: 4px 9px 4px 8px; border-radius: 999px; font-size: .7rem; font-weight: 700; white-space: nowrap;
  color: #fff; background: rgba(10, 22, 28, .46); border: 1px solid rgba(255, 255, 255, .28); -webkit-backdrop-filter: blur(8px) saturate(1.4); backdrop-filter: blur(8px) saturate(1.4);
}
.ph-tag span { overflow: hidden; text-overflow: ellipsis; }
.ph-tag.ph-s-landed { background: var(--coral); border-color: transparent; }
.ph-tile > .ph-tag { position: absolute; top: 8px; left: 8px; pointer-events: none; }
.ph-by { position: absolute; left: 8px; right: 8px; bottom: 8px; display: flex; align-items: center; gap: 7px; pointer-events: none; color: #fff; font-size: .8rem; font-weight: 600; text-shadow: 0 1px 6px rgba(0, 0, 0, .45); }
.ph-by:empty { display: none; }
.ph-by span:last-child { min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.ph-by .avatar { box-shadow: 0 0 0 1.5px rgba(255, 255, 255, .9); }
.ph-hero > .ph-tag { top: 12px; left: 12px; font-size: .78rem; padding: 5px 11px 5px 10px; }
.ph-hero .ph-by { left: 12px; right: 12px; bottom: 12px; gap: 9px; font-size: .98rem; }
.ph-hero .ph-by .avatar { width: 28px; height: 28px; font-size: .66rem; }

/* a photo still on its way: its own picture, and where it stands */
.ph-q { position: absolute; inset: 0; display: flex; flex-direction: column; align-items: flex-start; justify-content: flex-end; gap: 6px; padding: 8px; color: #fff; pointer-events: none; background: rgba(8, 18, 24, .3); }
.ph-q:empty { display: none; }
.ph-q > * { pointer-events: auto; }
.ph-sending .ph-q::before { content: ""; position: absolute; inset: 0; pointer-events: none; background: linear-gradient(100deg, transparent 32%, rgba(255, 255, 255, .24) 50%, transparent 68%) 0 0 / 220% 100%; animation: ph-shimmer 1.4s linear infinite; }
.ph-q-state { position: relative; display: inline-flex; align-items: center; gap: 7px; max-width: 100%; padding: 5px 11px 5px 9px; border-radius: 999px; font-size: .78rem; font-weight: 700; white-space: nowrap; background: rgba(10, 22, 28, .62); border: 1px solid rgba(255, 255, 255, .24); }
.ph-q-state .ph-spin { width: 12px; height: 12px; }
.ph-q-bad { background: var(--coral); border-color: transparent; }
.ph-q-why { font-size: .74rem; font-weight: 500; line-height: 1.3; text-shadow: 0 1px 6px rgba(0, 0, 0, .5); overflow: hidden; display: -webkit-box; -webkit-line-clamp: 3; -webkit-box-orient: vertical; }
.ph-q-actions { display: flex; flex-wrap: wrap; gap: 6px; }
.ph-q-btn { min-height: 32px; padding: 6px 13px; border: 1px solid transparent; border-radius: 999px; font-size: .8rem; font-weight: 700; background: #fff; color: #14242a; transition: transform .15s var(--ease), filter .2s; }
.ph-q-btn:hover { filter: brightness(.93); }
.ph-q-btn:active { transform: scale(.95); }
.ph-q-quiet { background: rgba(10, 22, 28, .5); border-color: rgba(255, 255, 255, .4); color: #fff; }
.ph-q-x { position: absolute; top: 6px; right: 6px; display: grid; place-items: center; width: 30px; height: 30px; padding: 0; border-radius: 50%; font-size: .84rem; color: #fff; background: rgba(10, 22, 28, .55); border: 1px solid rgba(255, 255, 255, .3); transition: transform .15s var(--ease), background .2s; }
.ph-q-x:hover { background: rgba(10, 22, 28, .8); }
.ph-q-x:active { transform: scale(.9); }
.ph-q :focus-visible { outline-color: #fff; }
.ph-failed .ph-img { filter: grayscale(.7) brightness(.62); }
.ph-failed .ph-q { background: rgba(8, 18, 24, .46); }
.ph-hero .ph-q { padding: 12px; gap: 8px; }
.ph-hero .ph-q-state { font-size: .86rem; }
.ph-hero .ph-q-why { font-size: .84rem; }
.ph-done { position: absolute; inset: 0; display: grid; place-items: center; pointer-events: none; animation: ph-done 1.5s var(--ease) forwards; }
.ph-done span { display: grid; place-items: center; width: 44px; height: 44px; border-radius: 50%; font-size: 1.2rem; background: var(--good); color: var(--surface); box-shadow: var(--shadow-2); }
.ph-done .icon { stroke-width: 3; }

.ph-more { display: flex; justify-content: center; }
.ph-more-btn { min-width: 170px; }
.ph-more-btn .icon { order: 2; }

/* ---------- loading, nothing yet, trouble ---------- */
.ph-skel { display: flex; flex-direction: column; gap: 12px; }
.ph-skel span { display: block; border-radius: 16px; background: linear-gradient(100deg, var(--surface-2) 30%, color-mix(in srgb, var(--surface-2) 45%, var(--surface)) 50%, var(--surface-2) 70%) 0 0 / 220% 100%; animation: ph-shimmer 1.3s linear infinite; }
.ph-skel span.ph-skel-line { width: 96px; height: 18px; border-radius: 9px; }
.ph-skel-tile { aspect-ratio: 1; }
.ph-skel-tile.ph-hero { grid-column: span 2; grid-row: span 2; border-radius: 22px; }
.ph-empty {
  display: flex; flex-direction: column; align-items: center; text-align: center; gap: 7px; padding: 30px 18px 24px; border-radius: 22px;
  border: 1.5px dashed color-mix(in srgb, var(--accent) 34%, var(--line)); background: color-mix(in srgb, var(--accent-soft) 32%, transparent);
}
.ph-empty strong { font: 600 1.3rem/1.2 var(--display); letter-spacing: -.015em; }
.ph-empty p { max-width: 36ch; font-size: .95rem; color: var(--muted); }
.ph-empty .btn { margin-top: 12px; }
.ph-empty-art { display: flex; align-items: flex-end; justify-content: center; margin-bottom: 12px; }
.ph-empty-art i { display: grid; place-items: center; width: 58px; height: 68px; border-radius: 12px; font-size: 1.35rem; color: var(--s); background: linear-gradient(160deg, color-mix(in srgb, var(--s) 20%, var(--surface)), color-mix(in srgb, var(--s) 7%, var(--surface))); border: 4px solid var(--surface); box-shadow: var(--shadow-2); }
.ph-empty-art i:nth-child(1) { transform: rotate(-9deg) translate(8px, 5px); }
.ph-empty-art i:nth-child(2) { position: relative; z-index: 1; width: 66px; height: 78px; font-size: 1.6rem; }
.ph-empty-art i:nth-child(3) { transform: rotate(9deg) translate(-8px, 5px); }
.ph-private { display: flex; align-items: flex-start; gap: 7px; margin: 0; font-size: .84rem; line-height: 1.4; color: var(--muted); text-align: left; }
.ph-private .icon { margin-top: .16em; color: var(--faint); }
.ph-empty .ph-private { margin-top: 8px; }
.ph-trouble { border-color: var(--line); background: color-mix(in srgb, var(--surface-2) 45%, transparent); padding-top: 22px; }
.ph-trouble strong { font-size: 1.08rem; }
.ph-bubble { display: grid; place-items: center; width: 44px; height: 44px; margin-bottom: 4px; border-radius: 50%; font-size: 1.15rem; color: var(--muted); background: var(--surface); box-shadow: var(--shadow-1); }

/* ---------- the share sheet ---------- */
.ph-picks { list-style: none; display: flex; gap: 8px; margin: 0 -20px; padding: 2px 20px 4px; overflow-x: auto; scrollbar-width: none; flex: none; }
.ph-picks::-webkit-scrollbar { display: none; }
.ph-pick { position: relative; flex: none; width: 88px; height: 88px; overflow: hidden; border-radius: 14px; background: var(--surface-2); box-shadow: var(--shadow-1); animation: ph-pop .35s var(--ease); }
.ph-pick img { display: block; width: 100%; height: 100%; object-fit: cover; }
.ph-pick-x { position: absolute; top: 4px; right: 4px; display: grid; place-items: center; width: 26px; height: 26px; padding: 0; border-radius: 50%; font-size: .74rem; color: #fff; background: rgba(10, 22, 28, .6); border: 1px solid rgba(255, 255, 255, .3); }
.ph-pick-x:hover { background: rgba(10, 22, 28, .85); }
.ph-pick-x:disabled { display: none; }
.ph-pick-working { display: grid; place-items: center; color: var(--muted); background: linear-gradient(100deg, var(--surface-2) 30%, color-mix(in srgb, var(--surface-2) 45%, var(--surface)) 50%, var(--surface-2) 70%) 0 0 / 220% 100%; animation: ph-shimmer 1.3s linear infinite; }
.ph-pick-bad { display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 4px; padding: 6px; text-align: center; font-size: .68rem; font-weight: 600; line-height: 1.2; color: var(--bad); background: color-mix(in srgb, var(--bad) 9%, var(--surface)); box-shadow: none; border: 1.5px dashed color-mix(in srgb, var(--bad) 40%, var(--line)); }
.ph-pick-more { background: none; box-shadow: none; }
.ph-pick-more button { display: grid; place-items: center; width: 100%; height: 100%; padding: 0; border-radius: inherit; font-size: 1.3rem; color: var(--muted); background: none; border: 1.5px dashed var(--line); transition: color .2s, border-color .2s, background .2s; }
.ph-pick-more button:hover { color: var(--accent); border-color: var(--accent); background: color-mix(in srgb, var(--accent-soft) 40%, transparent); }
.ph-picks-note { font-size: .86rem; font-weight: 500; color: var(--bad); }
.ph-sheet .field { flex: none; }
.ph-stages { display: flex; flex-wrap: wrap; gap: 7px; }
.ph-chip .icon { color: var(--s); transition: color .2s; }
.ph-chip:hover { border-color: color-mix(in srgb, var(--s, var(--ink)) 50%, var(--line)); }
.ph-chip[aria-checked="true"] { background: var(--s); border-color: transparent; color: #fff; font-weight: 600; box-shadow: 0 5px 12px color-mix(in srgb, var(--s) 32%, transparent); }
.ph-chip[aria-checked="true"] .icon { color: #fff; }
.ph-chip-none[aria-checked="true"] { background: var(--ink); color: var(--bg); box-shadow: none; }
.ph-chip:disabled { opacity: .6; cursor: default; }
.ph-sheet .actions { flex-wrap: wrap; justify-content: flex-end; }

.ph-confirm p { color: var(--muted); }
.ph-confirm .actions { flex-wrap: wrap; justify-content: flex-end; }
.btn.ph-danger { background: var(--bad); border-color: transparent; color: var(--surface); box-shadow: 0 6px 16px color-mix(in srgb, var(--bad) 28%, transparent); }
.btn.ph-danger:hover { background: var(--bad); filter: brightness(1.08); }

/* ---------- the photo viewer ---------- */
.ph-lb { position: fixed; inset: 0; z-index: 1900; display: grid; grid-template-rows: auto minmax(0, 1fr) auto; color: #fff; background: #081215; outline: 0; animation: fade .2s; }
.ph-lb :focus-visible { outline-color: #fff; }
.ph-lb-top { display: flex; align-items: center; gap: 12px; padding: max(12px, env(safe-area-inset-top)) 14px 10px 16px; }
.ph-lb-who { display: flex; align-items: center; gap: 11px; min-width: 0; }
.ph-lb-who div { display: flex; flex-direction: column; min-width: 0; line-height: 1.25; }
.ph-lb-who strong { font: 600 1.1rem/1.2 var(--display); letter-spacing: -.01em; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.ph-lb-who small { font-size: .8rem; color: rgba(255, 255, 255, .7); }
.ph-lb-count { flex: none; font-size: .82rem; font-weight: 600; color: rgba(255, 255, 255, .7); font-variant-numeric: tabular-nums; white-space: nowrap; }
.ph-lb-stage { position: relative; min-height: 0; touch-action: pan-y pinch-zoom; }
.ph-lb-fig { position: absolute; inset: 0 10px; margin: 0; }
.ph-lb-fig img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: contain; -webkit-user-select: none; user-select: none; }
.ph-lb-low { filter: blur(6px); transition: opacity .3s .1s; }
.ph-lb-full { opacity: 0; transition: opacity .3s; }
.ph-ready .ph-lb-full { opacity: 1; }
.ph-ready .ph-lb-low { opacity: 0; }
.ph-failed .ph-lb-low { filter: none; }
.ph-failed .ph-lb-full { visibility: hidden; }
.ph-lb-gone { position: absolute; left: 50%; bottom: 10px; transform: translateX(-50%); width: max-content; max-width: calc(100% - 32px); margin: 0; padding: 8px 14px; border-radius: 14px; font-size: .86rem; font-weight: 500; text-align: center; background: rgba(10, 22, 28, .7); border: 1px solid rgba(255, 255, 255, .24); }
.ph-lb-nav { position: absolute; top: 50%; width: 46px; height: 46px; margin-top: -23px; }
.ph-lb-prev { left: 14px; }
.ph-lb-next { right: 14px; }
.ph-lb-nav:disabled { opacity: 0; pointer-events: none; }
.ph-lb-foot { display: flex; flex-direction: column; gap: 12px; width: min(720px, 100%); margin: 0 auto; padding: 12px 16px max(18px, env(safe-area-inset-bottom)); }
.ph-lb-meta { display: flex; flex-direction: column; align-items: flex-start; gap: 9px; }
.ph-lb-meta:empty, .ph-lb-tools:empty { display: none; }
.ph-tag-big { font-size: .8rem; padding: 5px 12px 5px 10px; background: var(--s); border-color: transparent; }
.ph-lb-caption { font: 400 1.2rem/1.35 var(--display); letter-spacing: -.005em; overflow-wrap: anywhere; }
.ph-lb-actions { display: flex; flex-wrap: wrap; gap: 8px; }
.ph-lb-delete:hover { background: color-mix(in srgb, var(--coral) 70%, transparent); }
.ph-lb-edit { display: flex; flex-direction: column; gap: 12px; }
.ph-lb-edit .ph-lb-actions { justify-content: flex-end; }
.ph-lb .ph-chip { background: rgba(255, 255, 255, .1); border-color: rgba(255, 255, 255, .26); color: #fff; }
.ph-lb .ph-chip .icon { color: inherit; }
.ph-lb .ph-chip[aria-checked="true"] { background: var(--s); border-color: transparent; }
.ph-lb .ph-chip-none[aria-checked="true"] { background: #fff; color: #14242a; }
.ph-lb input.ph-lb-input { background: rgba(255, 255, 255, .1); border-color: rgba(255, 255, 255, .26); color: #fff; }
.ph-lb input.ph-lb-input::placeholder { color: rgba(255, 255, 255, .6); }
.ph-lb input.ph-lb-input:focus { border-color: #fff; box-shadow: 0 0 0 3.5px rgba(255, 255, 255, .2); }

@media (prefers-color-scheme: dark) {
  .ph-chip-none[aria-checked="true"] { color: var(--bg); }
  .btn.ph-danger { color: var(--accent-ink); }
}
@media (max-width: 860px) {
  .ph-lb-fig { inset: 0; }
  .ph-lb-nav { width: 40px; height: 40px; margin-top: -20px; }
  .ph-lb-prev { left: 8px; }
  .ph-lb-next { right: 8px; }
  .ph-lb-caption { font-size: 1.08rem; }
}
@media (prefers-reduced-motion: reduce) {
  .ph-done { display: none; }
  .ph-tile:hover .ph-shot .ph-img { transform: none; }
}
