/*
 * Photos (photohub.js): the hub over the game, and the page of its own
 * (/worlds/photos). Dark and calm, in your hue where it's yours: the admin's
 * chrome, Fahkwang for its name, Questrial for numbers.
 */

/* Buttons: the wallpapers page's navy chrome; is-main in your hue, is-discord Discord's, is-quiet for taking things away. */
.ph-btn { display: inline-flex; align-items: center; justify-content: center; gap: 8px; height: 38px; padding: 0 16px; border: 1px solid var(--chrome-edge); border-radius: 8px; background: var(--chrome); color: #fff; font: inherit; font-size: 13.5px; font-weight: 600; text-decoration: none; white-space: nowrap; cursor: pointer; -webkit-user-select: none; user-select: none; transition: background 0.2s ease, border-color 0.2s ease; }
.ph-btn:hover { background: var(--chrome-hover); }
.ph-btn:disabled { opacity: 0.55; cursor: default; }
.ph-btn svg { width: 17px; height: 17px; flex: none; }
.ph-btn.is-main { border-color: color-mix(in srgb, var(--accent) 70%, #fff); background: color-mix(in srgb, var(--accent) 35%, rgba(8, 11, 16, 0.6)); }
.ph-btn.is-main:hover:not(:disabled) { background: color-mix(in srgb, var(--accent) 50%, rgba(8, 11, 16, 0.6)); }
.ph-btn.is-discord { border-color: #7983f5; background: #5865F2; }
.ph-btn.is-discord:hover { background: #4752c4; }
.ph-btn.is-quiet { border-color: transparent; background: none; color: var(--muted); }
.ph-btn.is-quiet:hover { background: rgba(255, 90, 90, 0.1); color: #ff8a80; }
.ph-btn.is-confirm, .ph-btn.is-confirm:hover { border-color: #ff6b6b; background: rgba(255, 70, 70, 0.24); color: #fff; }
.ph-btn[aria-pressed="true"] { border-color: color-mix(in srgb, var(--accent) 60%, #fff); }

#hub { --hb-pad: 24px; --hb-line: rgba(255, 255, 255, 0.07); position: fixed; inset: 0; z-index: 14; display: flex; flex-direction: column; overflow: hidden; color: #fff; font: 14px/1.4 'Work Sans', -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif; background: radial-gradient(1200px 420px at 50% -160px, color-mix(in srgb, var(--accent) 16%, transparent), transparent 70%), var(--grid-x), var(--grid-y), #0a0c11; background-size: auto, 40px 40px, 40px 40px, auto; outline: none; animation: hb-in 0.2s ease-out; }
#hub[hidden] { display: none; }
#hub.is-page { animation: none; }
@keyframes hb-in { from { opacity: 0; } }
/* comments.js styles its own buttons. */
#hub button:not(.hv-comments *) { font: inherit; color: inherit; }
#hub :is(button, a):focus-visible { outline: 2px solid color-mix(in srgb, var(--accent) 70%, #fff); outline-offset: 2px; }
#hub img { -webkit-user-drag: none; -webkit-touch-callout: none; }
.hb-gap { flex: 1; }
.hb-icon { display: inline-flex; align-items: center; justify-content: center; flex: none; width: 36px; height: 36px; padding: 0; border: 1px solid transparent; border-radius: 50%; background: none; color: var(--muted); cursor: pointer; transition: background 0.15s, color 0.15s, border-color 0.15s; }
.hb-icon:hover { color: #fff; background: var(--chrome-hover); border-color: var(--chrome-edge); }
.hb-icon svg { width: 20px; height: 20px; }

/* The bar along the top: the name, the three views, and closing (or, on its own page, back to the game). */
.hb-top { flex: none; display: flex; align-items: center; gap: 18px; height: 60px; padding: 0 calc(env(safe-area-inset-right) + 14px) 0 calc(env(safe-area-inset-left) + var(--hb-pad)); border-bottom: 1px solid var(--hb-line); background: rgba(10, 12, 17, 0.72); backdrop-filter: blur(14px) saturate(140%); -webkit-backdrop-filter: blur(14px) saturate(140%); }
#hub.is-page .hb-top { padding-right: calc(env(safe-area-inset-right) + 72px); }
.hb-home img { display: block; width: 26px; height: 26px; }
/* The three views: the admin's header buttons, the one you're on in your hue (as its Catalog button is in blue), each icon quieter than its label. */
.hb-tabs { display: flex; align-items: center; gap: 6px; margin-left: 10px; }
.hb-tab { flex: none; display: inline-flex; align-items: center; justify-content: center; gap: 8px; height: 36px; padding: 0 14px 0 12px; border: 1px solid rgb(27, 35, 47); border-radius: 8px; background: var(--chrome); color: rgba(255, 255, 255, 0.78) !important; font-size: 13.5px !important; font-weight: 600 !important; white-space: nowrap; cursor: pointer; transition: background 0.2s ease, border-color 0.2s ease, color 0.2s ease; -webkit-user-select: none; user-select: none; -webkit-tap-highlight-color: transparent; }
.hb-tab i { display: inline-flex; opacity: 0.45; transition: opacity 0.2s ease; }
.hb-tab svg { width: 17px; height: 17px; }
.hb-tab:hover { border-color: var(--chrome-edge); background: var(--chrome-hover); color: #fff !important; }
.hb-tab:hover i { opacity: 0.6; }
.hb-tab[aria-pressed="true"] { border-color: color-mix(in srgb, var(--accent) 75%, #6f7f95); background: linear-gradient(180deg, color-mix(in srgb, var(--accent) 38%, transparent) 0%, color-mix(in srgb, var(--accent) 14%, transparent) 55%), color-mix(in srgb, var(--accent) 25%, #05080f); color: #fff !important; }
.hb-tab[aria-pressed="true"]:hover { border-color: color-mix(in srgb, var(--accent) 80%, #fff); background: linear-gradient(180deg, color-mix(in srgb, var(--accent) 50%, transparent) 0%, color-mix(in srgb, var(--accent) 22%, transparent) 55%), color-mix(in srgb, var(--accent) 32%, #05080f); }
.hb-tab[aria-pressed="true"] i { opacity: 0.7; }
.hb-tab[hidden] { display: none; }
.hb-n { font: 400 12px/1 'Questrial', sans-serif; font-variant-numeric: tabular-nums; color: var(--muted); }
.hb-tab[aria-pressed="true"] .hb-n { color: rgba(255, 255, 255, 0.75); }
.hb-n:empty { display: none; }
.hb-play { display: inline-flex; align-items: center; gap: 10px; height: 38px; padding: 0 10px 0 16px; border: 1px solid color-mix(in srgb, var(--accent) 65%, #fff); border-radius: 999px; background: linear-gradient(180deg, rgba(255, 255, 255, 0.14), rgba(255, 255, 255, 0) 55%), color-mix(in srgb, var(--accent) 30%, #0b1018); color: #fff; font-size: 13.5px; font-weight: 600; text-decoration: none; box-shadow: 0 0 22px -6px color-mix(in srgb, var(--accent) 80%, transparent); transition: box-shadow 0.2s; }
.hb-play:hover { box-shadow: 0 0 28px -4px var(--accent); }
.hb-play i, .hb-link i { display: inline-flex; }
.hb-play svg { width: 18px; height: 18px; }

.hb-scroll { flex: 1; min-height: 0; overflow-y: auto; overscroll-behavior: contain; scrollbar-width: thin; scrollbar-color: rgba(255, 255, 255, 0.18) transparent; }
.hb-page { max-width: 1480px; margin: 0 auto; padding: 22px calc(env(safe-area-inset-right) + var(--hb-pad)) 28px calc(env(safe-area-inset-left) + var(--hb-pad)); }
.hb-more { height: 1px; }
.hb-section { margin-top: 34px; }
.hb-head { display: flex; align-items: baseline; gap: 10px; margin: 0 0 12px; }
.hb-head h3 { margin: 0; font-size: 11px; font-weight: 600; letter-spacing: 0.14em; text-transform: uppercase; color: rgba(255, 255, 255, 0.72); }
.hb-head.is-page { align-items: center; margin-bottom: 18px; }
.hb-head.is-page h3 { font: bold 26px/1.1 'Fahkwang', serif; letter-spacing: 0.02em; text-transform: none; color: #fff; }
.hb-count { font: 400 13px/1 'Questrial', sans-serif; font-variant-numeric: tabular-nums; color: var(--muted); }
/* My Photos: how full the album is, as a storage bar (--q: in your hue, amber near full, red when full). */
.hb-quota { --q: var(--accent); flex: 1 1 200px; max-width: 300px; min-width: 150px; display: flex; flex-direction: column; gap: 8px; }
.hb-quota.is-near { --q: #FFB547; }
.hb-quota.is-full { --q: #ff6b6b; }
.hb-quota-text { display: flex; align-items: baseline; justify-content: space-between; gap: 12px; font: 400 13px/1 'Questrial', sans-serif; font-variant-numeric: tabular-nums; color: var(--muted); }
.hb-quota-n { font-size: 20px; color: #fff; }
.hb-quota-n small { font-size: 13px; color: var(--muted); }
.hb-quota:is(.is-near, .is-full) .hb-quota-left { color: var(--q); }
.hb-quota-bar { height: 6px; border-radius: 3px; overflow: hidden; background: rgba(255, 255, 255, 0.08); }
.hb-quota-bar i { display: block; height: 100%; border-radius: inherit; background: var(--q); box-shadow: 0 0 10px color-mix(in srgb, var(--q) 60%, transparent); }
.hb-tools { display: flex; gap: 8px; margin-left: auto; }
.hb-dot { flex: none; display: inline-block; width: 8px; height: 8px; border-radius: 50%; background: var(--hue, var(--accent)); box-shadow: 0 0 8px color-mix(in srgb, var(--hue, var(--accent)) 60%, transparent); }

/* A face: their avatar, or their initial on their hue, ringed in it. */
.hb-face { position: relative; flex: none; display: inline-flex; align-items: center; justify-content: center; width: 32px; height: 32px; border-radius: 50%; overflow: hidden; background: color-mix(in srgb, var(--hue, var(--accent)) 55%, #0b0f14); box-shadow: 0 0 0 2px var(--hue, var(--accent)); font: bold 14px/1 'Fahkwang', serif; color: #fff; }
.hb-face img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.hb-face.is-big { width: 72px; height: 72px; font-size: 26px; box-shadow: 0 0 0 2px var(--hue, var(--accent)), 0 0 24px -6px var(--hue, var(--accent)); }
.hb-face.is-huge { width: 76px; height: 76px; font-size: 30px; box-shadow: 0 0 0 3px var(--hue, var(--accent)), 0 0 32px -6px var(--hue, var(--accent)); }
.hb-faces { display: inline-flex; }
.hb-faces .hb-face { width: 22px; height: 22px; font-size: 10px; box-shadow: 0 0 0 1.5px var(--hue, var(--accent)), 0 0 0 3px #0d1016; }
.hb-faces .hb-face + .hb-face { margin-left: -6px; }

/* Everyone: the newest up big, the community's numbers beside it. */
.hb-hero { display: grid; grid-template-columns: minmax(0, 1fr) 340px; gap: 22px; }
.hb-hero-pic { position: relative; display: block; width: 100%; aspect-ratio: 16 / 9; padding: 0; border: 0; border-radius: 16px; overflow: hidden; background: #020304; cursor: pointer; box-shadow: 0 30px 80px -40px rgba(0, 0, 0, 0.9), 0 0 0 1px var(--hb-line); }
.hb-hero-pic > img { display: block; width: 100%; height: 100%; object-fit: cover; transition: transform 0.6s cubic-bezier(0.2, 0.8, 0.3, 1); }
.hb-hero-pic:hover > img { transform: scale(1.015); }
.hb-hero-pic:hover .hv-pin { opacity: 0.92; }
.hb-hero-side { display: flex; flex-direction: column; gap: 18px; min-width: 0; }
.hb-hero-info { display: flex; flex-direction: column; gap: 12px; padding: 4px 2px; }
.hb-byline { display: flex; align-items: center; gap: 12px; min-width: 0; }
.hb-byline .hb-face { width: 40px; height: 40px; font-size: 17px; }
.hb-name { min-width: 0; padding: 0; border: 0; background: none; font-size: 16px !important; font-weight: 600 !important; color: color-mix(in srgb, var(--hue, #fff) 35%, #fff) !important; text-align: left; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
button.hb-name { cursor: pointer; }
button.hb-name:hover { text-decoration: underline; text-underline-offset: 3px; }
.hb-hero-caption { margin: 0; font-size: 18px; line-height: 1.35; overflow-wrap: anywhere; }
.hb-hero-where { font: 400 13px/1.3 'Questrial', sans-serif; color: var(--muted); }
.hb-hero-counts { display: flex; gap: 14px; font: 400 13px/1 'Questrial', sans-serif; font-variant-numeric: tabular-nums; color: rgba(225, 233, 238, 0.85); }
.hb-hero-counts span { display: inline-flex; align-items: center; gap: 5px; }
.hb-hero-counts i { display: inline-flex; color: var(--muted); }
.hb-hero-counts svg { width: 15px; height: 15px; }
.hb-stats { display: grid; grid-template-columns: 1fr 1fr; gap: 1px; margin: auto 0 0; border-radius: 14px; overflow: hidden; background: var(--hb-line); }
.hb-stats div { min-width: 0; padding: 14px 16px 12px; background: #0d1016; }
.hb-stats dt { font-size: 10.5px; font-weight: 600; letter-spacing: 0.14em; text-transform: uppercase; color: var(--muted); }
.hb-stats dd { margin: 4px 0 0; font: 400 32px/1 'Questrial', sans-serif; font-variant-numeric: tabular-nums; }

/* Names: who's in a photo. */
.hb-chips { display: flex; flex-wrap: wrap; gap: 6px; margin: 0; padding: 0; list-style: none; }
.hb-chip { display: inline-flex; align-items: center; gap: 7px; height: 30px; padding: 0 12px 0 10px; border: 1px solid rgba(255, 255, 255, 0.12); border-radius: 999px; background: rgba(255, 255, 255, 0.04); font-size: 13px !important; font-weight: 600 !important; color: #fff; white-space: nowrap; transition: border-color 0.15s, background 0.15s; }
button.hb-chip { cursor: pointer; }
button.hb-chip:hover, button.hb-chip:focus-visible { border-color: var(--hue); background: color-mix(in srgb, var(--hue) 14%, transparent); }
.hb-chip.is-me { border-color: color-mix(in srgb, var(--hue) 55%, transparent); }

/* Rows that scroll across: people, walks, worlds. */
.hb-rail { display: flex; gap: 12px; margin: 0 calc(-1 * var(--hb-pad)); padding: 4px var(--hb-pad) 10px; overflow-x: auto; scroll-snap-type: x proximity; scroll-padding-inline: var(--hb-pad); scrollbar-width: none; }
.hb-rail::-webkit-scrollbar { display: none; }
.hb-rail > * { flex: none; scroll-snap-align: start; }
.hb-person { display: flex; flex-direction: column; align-items: center; gap: 8px; width: 108px; padding: 14px 6px 12px; border: 1px solid transparent; border-radius: 14px; background: none; cursor: pointer; transition: background 0.15s, border-color 0.15s; }
.hb-person:hover { background: rgba(255, 255, 255, 0.04); border-color: var(--hb-line); }
.hb-person-name { max-width: 100%; font-size: 13px; font-weight: 600; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.hb-person-n { display: inline-flex; align-items: center; gap: 3px; font: 400 11.5px/1 'Questrial', sans-serif; font-variant-numeric: tabular-nums; color: var(--muted); }
.hb-person-n i, .hb-walk-n i, .hb-tile-tags i { display: inline-flex; }
.hb-person-n svg { width: 12px; height: 12px; }
.hb-person-n i:nth-of-type(2) { margin-left: 8px; }
.hb-walk { display: flex; flex-direction: column; gap: 6px; width: 300px; padding: 0; border: 0; background: none; text-align: left; cursor: pointer; }
.hb-mosaic { display: grid; gap: 3px; aspect-ratio: 16 / 10; border-radius: 12px; overflow: hidden; background: #020304; box-shadow: 0 0 0 1px var(--hb-line); }
.hb-mosaic img { width: 100%; height: 100%; min-height: 0; object-fit: cover; transition: transform 0.4s ease; }
.hb-walk:hover .hb-mosaic img { transform: scale(1.04); }
.hb-mosaic.is-2 { grid-template-columns: 1fr 1fr; }
.hb-mosaic.is-3 { grid-template-columns: 2fr 1fr; grid-template-rows: 1fr 1fr; }
.hb-mosaic.is-3 img:first-child { grid-row: span 2; }
.hb-mosaic.is-4 { grid-template-columns: 1fr 1fr; grid-template-rows: 1fr 1fr; }
.hb-walk-place { margin-top: 4px; font-size: 14.5px; font-weight: 600; }
.hb-walk-when { font: 400 12.5px/1.2 'Questrial', sans-serif; font-variant-numeric: tabular-nums; color: var(--muted); }
.hb-walk-people { display: flex; align-items: center; gap: 8px; min-width: 0; margin-top: 2px; font-size: 12.5px; color: rgba(225, 233, 238, 0.85); }
.hb-walk-people > span:nth-child(2) { min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.hb-walk-n { display: inline-flex; align-items: center; gap: 4px; margin-left: auto; font: 400 12px/1 'Questrial', sans-serif; font-variant-numeric: tabular-nums; color: var(--muted); }
.hb-walk-n svg { width: 14px; height: 14px; }
.hb-world { position: relative; display: block; width: 240px; aspect-ratio: 16 / 10; padding: 0; border: 0; border-radius: 12px; overflow: hidden; background: #020304; cursor: pointer; box-shadow: 0 0 0 1px var(--hb-line); }
.hb-world img { display: block; width: 100%; height: 100%; object-fit: cover; transition: transform 0.4s ease; }
.hb-world:hover img { transform: scale(1.04); }
.hb-world::after { content: ''; position: absolute; inset: 0; background: linear-gradient(transparent 45%, rgba(0, 0, 0, 0.7)); }
.hb-world-name { position: absolute; left: 14px; bottom: 11px; z-index: 1; font: bold 16px/1.1 'Fahkwang', serif; letter-spacing: 0.02em; text-align: left; }
.hb-world-n { position: absolute; right: 12px; bottom: 12px; z-index: 1; font: 400 13px/1 'Questrial', sans-serif; font-variant-numeric: tabular-nums; color: rgba(255, 255, 255, 0.8); }

/* The grid: portrait photos two rows tall, now and then a landscape one two by two. */
.hb-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(230px, 1fr)); grid-auto-rows: 154px; grid-auto-flow: dense; gap: 6px; margin: 0; padding: 0; list-style: none; }
.hb-grid li.is-tall { grid-row: span 2; }
.hb-grid li.is-big { grid-row: span 2; grid-column: span 2; }
.hb-tile { position: relative; display: block; width: 100%; height: 100%; padding: 0; border: 0; border-radius: 8px; overflow: hidden; background: #020304; cursor: pointer; -webkit-user-select: none; user-select: none; }
.hb-tile img { display: block; width: 100%; height: 100%; object-fit: cover; transition: transform 0.35s ease, opacity 0.2s; }
.hb-tile:hover img { transform: scale(1.03); }
.hb-tile-info { position: absolute; inset: auto 0 0 0; display: flex; align-items: center; gap: 8px; padding: 22px 10px 8px; background: linear-gradient(transparent, rgba(0, 0, 0, 0.66)); font-size: 12px; font-weight: 600; opacity: 0; transition: opacity 0.2s; }
.hb-tile:hover .hb-tile-info, .hb-tile:focus-visible .hb-tile-info { opacity: 1; }
.hb-tile-by { display: inline-flex; align-items: center; gap: 6px; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.hb-tile-by .hb-dot { width: 6px; height: 6px; }
.hb-tile-tags { display: inline-flex; align-items: center; gap: 3px; margin-left: auto; font: 400 12px/1 'Questrial', sans-serif; font-variant-numeric: tabular-nums; }
.hb-tile-tags svg { width: 13px; height: 13px; }
.hb-tile-counts { display: inline-flex; gap: 10px; margin-left: auto; }
.hb-tile-counts:empty { display: none; }
.hb-tile-counts .hb-tile-tags { margin-left: 0; }
.hb-tile.is-yours .hb-tile-info { justify-content: flex-end; }
/* Yours: a dot while it's being kept (white), not kept (amber), or posted (your hue). */
.hb-state { position: absolute; right: 7px; top: 7px; display: none; width: 8px; height: 8px; border-radius: 50%; box-shadow: 0 0 0 1.5px rgba(0, 0, 0, 0.55); }
.hb-tile[data-state="saving"] .hb-state { display: block; background: #fff; animation: hb-blink 1.1s ease-in-out infinite; }
.hb-tile[data-state="failed"] .hb-state { display: block; background: #FFB547; }
.hb-tile[data-state="posted"] .hb-state { display: block; background: var(--accent); }
@keyframes hb-blink { 50% { opacity: 0.25; } }
#hub.is-selecting .hb-tile.is-yours img { opacity: 0.5; }
#hub.is-selecting .hb-tile[aria-pressed="true"] { box-shadow: inset 0 0 0 2px var(--accent); }
#hub.is-selecting .hb-tile[aria-pressed="true"] img { opacity: 1; }
.hb-tile[aria-pressed="true"]::before { content: ''; position: absolute; left: 7px; top: 7px; z-index: 1; width: 18px; height: 18px; border-radius: 50%; background: var(--accent); box-shadow: 0 0 0 1.5px rgba(0, 0, 0, 0.55); }
.hb-tile[aria-pressed="true"]::after { content: ''; position: absolute; left: 13.5px; top: 10.5px; z-index: 1; width: 4px; height: 8px; border: solid #fff; border-width: 0 2px 2px 0; transform: rotate(45deg); }
.hb-day { margin: 26px 0 10px; font-size: 11px; font-weight: 600; letter-spacing: 0.14em; text-transform: uppercase; color: var(--muted); }
.hb-head.is-page + .hb-day, .hb-signin + .hb-day { margin-top: 0; }
.hb-signin { display: flex; align-items: center; gap: 14px; margin: 0 0 22px; padding: 10px 10px 10px 16px; border: 1px solid rgba(121, 131, 245, 0.35); border-radius: 12px; background: rgba(88, 101, 242, 0.12); font-size: 13.5px; }
.hb-signin .ph-btn { margin-left: auto; }

/* A person's, world's or walk's own page. */
.hb-crumb { display: flex; align-items: center; gap: 16px; margin-bottom: 22px; }
.hb-title { display: flex; flex-direction: column; gap: 8px; min-width: 0; }
.hb-title h2 { margin: 0; font: bold 30px/1.1 'Fahkwang', serif; letter-spacing: 0.02em; color: color-mix(in srgb, var(--hue, #fff) 30%, #fff); overflow-wrap: anywhere; }
.hb-sub { display: flex; align-items: center; gap: 14px; font: 400 13px/1 'Questrial', sans-serif; color: var(--muted); }
.hb-link { display: inline-flex; align-items: center; gap: 2px; color: #fff; font: 600 13px/1 'Work Sans', sans-serif; text-decoration: none; }
.hb-link svg { width: 16px; height: 16px; }
.hb-seg { display: flex; gap: 4px; }
.hb-seg button { display: inline-flex; align-items: center; gap: 7px; height: 32px; padding: 0 12px; border: 1px solid transparent; border-radius: 8px; background: none; color: var(--muted) !important; font-size: 13px !important; font-weight: 600 !important; cursor: pointer; }
.hb-seg button:hover { color: #fff !important; }
.hb-seg button[aria-pressed="true"] { border-color: var(--chrome-edge); background: var(--chrome); color: #fff !important; }
.hb-seg b { font: 400 12px/1 'Questrial', sans-serif; font-variant-numeric: tabular-nums; color: var(--muted); }
.hb-met { gap: 6px; padding-left: 12px; font-variant-numeric: tabular-nums; }
.hb-met i { display: inline-flex; }
.hb-met svg { width: 15px; height: 15px; }
.hb-met b { font-weight: 400; color: #fff; }

.hb-empty { display: flex; align-items: center; justify-content: center; min-height: 40vh; color: var(--muted); }
.hb-empty b { font: bold 22px/1.2 'Fahkwang', serif; letter-spacing: 0.03em; color: #fff; }
.hb-empty.is-loading::before { content: ''; width: 34px; height: 34px; border-radius: 50%; border: 2px solid rgba(255, 255, 255, 0.12); border-top-color: var(--accent); animation: hb-spin 0.8s linear infinite; }
@keyframes hb-spin { to { transform: rotate(1turn); } }

/* One photo up big: a lightbox over the window (or the page), the grid dimmed behind it, the photo as big as it'll go with the camera's readout above it, and along the bottom who's in it and the buttons. */
.hv { position: absolute; inset: 0; z-index: 5; display: flex; flex-direction: column; border-radius: inherit; background: rgb(3 4 7 / calc(0.9 - var(--pull, 0) * 0.6)); backdrop-filter: blur(8px); -webkit-backdrop-filter: blur(8px); outline: none; }
.hv[hidden] { display: none; }
/* The site's account chip (on the page of its own) makes way for the photo. */
html.hb-viewing :is(.ph-account, .ph-signin) { display: none !important; }
.hv-head { flex: none; display: flex; align-items: center; gap: 10px; padding: calc(env(safe-area-inset-top) + 10px) calc(env(safe-area-inset-right) + 10px) 0 calc(env(safe-area-inset-left) + 18px); font: 700 11px/1.3 'Space Mono', ui-monospace, monospace; letter-spacing: 0.05em; text-transform: uppercase; color: rgba(255, 255, 255, 0.85); }
.hv-index { flex: none; }
.hv-index::before { content: ''; display: inline-block; margin-right: 7px; border: 5px solid transparent; border-left: 8px solid currentColor; border-right: 0; vertical-align: -1px; }
.hv-time { color: var(--muted); }
.hv-badge { flex: none; padding: 1px 8px; border-radius: 4px; background: rgba(255, 255, 255, 0.18); font-size: 10px; }
.hv-badge[hidden] { display: none; }
.hv-badge[data-state="saving"] { animation: hb-blink 1.1s ease-in-out infinite; }
.hv-badge[data-state="failed"] { background: rgba(255, 181, 71, 0.85); color: #1a1205; }
.hv-badge[data-state="posted"] { background: color-mix(in srgb, var(--accent) 80%, transparent); }
.hv-close { color: #fff; background: rgba(255, 255, 255, 0.06); }
.hv-stage { position: relative; flex: 1; min-height: 0; display: flex; align-items: center; justify-content: center; margin: 10px 64px 0; touch-action: pan-y; -webkit-user-select: none; user-select: none; }
.hv-frame { position: relative; flex: none; will-change: transform; }
.hv-img { display: block; width: 100%; height: 100%; border-radius: 4px; box-shadow: 0 24px 60px -24px rgba(0, 0, 0, 0.9); }
body:not(.touch) .hv-stage .hv-img { cursor: zoom-in; }
body:not(.touch) .hv.is-zoomed .hv-img { cursor: grab; }
body:not(.touch) .hv-stage.is-dragging .hv-img { cursor: grabbing; }
.hv-developing { position: absolute; width: 34px; height: 34px; border-radius: 50%; border: 2px solid rgba(255, 255, 255, 0.12); border-top-color: var(--accent); animation: hb-spin 0.8s linear infinite; }
.hv-developing[hidden] { display: none; }
.hv-nav { position: absolute; top: 50%; z-index: 3; display: flex; align-items: center; justify-content: center; width: 42px; height: 42px; margin-top: -21px; padding: 0; border: 1px solid var(--chrome-edge); border-radius: 50%; background: var(--chrome); color: rgba(255, 255, 255, 0.85); cursor: pointer; transition: background 0.15s, color 0.15s; }
.hv-nav.is-prev { left: -56px; }
.hv-nav.is-next { right: -56px; }
.hv-nav:hover { background: var(--chrome-hover); color: #fff; }
.hv-nav:disabled { visibility: hidden; }
.hv-nav svg { width: 22px; height: 22px; }
.hv.is-zoomed .hv-nav { opacity: 0; pointer-events: none; }

/* Tags: a name over each head, faint while a mouse is on the photo, there with Tags, and lit while pointing at the name. */
.hv-pins { position: absolute; inset: 0; pointer-events: none; }
.hv-pin { position: absolute; display: inline-flex; align-items: center; gap: 6px; height: 26px; padding: 0 10px 0 8px; border: 1px solid color-mix(in srgb, var(--hue) 55%, rgba(255, 255, 255, 0.2)); border-radius: 7px; background: rgba(8, 11, 16, 0.82); color: #fff; font: 600 12.5px/1 'Work Sans', sans-serif !important; white-space: nowrap; transform: translate(-50%, calc(-100% - 7px + var(--dy, 0px))); opacity: 0; transition: opacity 0.18s; box-shadow: 0 6px 18px -6px rgba(0, 0, 0, 0.7); }
.hv-pin::after { content: ''; position: absolute; left: 50%; bottom: -5px; width: 8px; height: 8px; margin-left: -4px; border: solid color-mix(in srgb, var(--hue) 55%, rgba(255, 255, 255, 0.2)); border-width: 0 1px 1px 0; background: rgba(8, 11, 16, 0.92); transform: rotate(45deg); }
.hv-pin.is-under { transform: translate(-50%, calc(7px + var(--dy, 0px))); }
.hv-pin.is-under::after { top: -5px; bottom: auto; border-width: 1px 0 0 1px; }
/* Moved off its head to clear another: no pointer, it'd point at nothing. */
.hv-pin[style*="--dy"]::after { display: none; }
.hv-pin .hb-dot { width: 7px; height: 7px; }
button.hv-pin { cursor: pointer; }
.hv.is-peek .hv-pin { opacity: 0.85; }
.hv.tags-on .hv-pin { opacity: 1; pointer-events: auto; }
.hv.is-pointing .hv-pin { opacity: 0.2; }
.hv .hv-pin.is-lit { opacity: 1; border-color: var(--hue); box-shadow: 0 0 0 1px var(--hue), 0 0 22px -2px var(--hue); }
.hv.is-zoomed .hv-pin { opacity: 0 !important; pointer-events: none !important; }

/* Along the bottom: who took it, where, the lens, who's in it, then the buttons, big. */
.hv-bottom { flex: none; display: flex; flex-direction: column; align-items: center; padding: 14px calc(env(safe-area-inset-right) + 18px) calc(env(safe-area-inset-bottom) + 18px) calc(env(safe-area-inset-left) + 18px); }
.hv-info { display: flex; flex-wrap: wrap; align-items: center; justify-content: center; gap: 8px 16px; }
.hv-info:empty { display: none; }
.hv-info .hb-byline .hb-face { width: 28px; height: 28px; font-size: 12px; }
.hv-info .hb-name { font-size: 14px !important; }
.hv-metabtn { display: inline-flex; align-items: center; gap: 5px; padding: 0; border: 0; background: none; color: rgba(225, 233, 238, 0.88); font-size: 13px !important; font-weight: 600 !important; }
.hv-metabtn i { display: inline-flex; color: var(--muted); }
.hv-metabtn svg { width: 17px; height: 17px; }
button.hv-metabtn { cursor: pointer; }
button.hv-metabtn:hover { color: #fff; text-decoration: underline; text-underline-offset: 3px; }
.hv-exposure { font: 700 11px/1 'Space Mono', ui-monospace, monospace; letter-spacing: 0.05em; text-transform: uppercase; color: var(--muted); white-space: pre; }
.hv-caption { margin: 10px 0 0; font-size: 15px; line-height: 1.35; text-align: center; overflow-wrap: anywhere; }
.hv-caption[hidden] { display: none; }
.hv-actions { display: flex; flex-wrap: wrap; justify-content: center; gap: 10px; padding-top: 14px; }
.hv-actions .ph-btn { height: 44px; padding: 0 20px; font-size: 14.5px; }
.hv-actions .ph-btn svg { width: 18px; height: 18px; }
.hv-actions :is(.hv-tagbtn, .hv-combtn, .hv-heart) b { font: 400 13px/1 'Questrial', sans-serif; font-variant-numeric: tabular-nums; color: var(--muted); }
:is(.hv-tagbtn, .hv-combtn)[aria-pressed="true"] { border-color: color-mix(in srgb, var(--accent) 60%, #fff); background: color-mix(in srgb, var(--accent) 22%, rgba(8, 11, 16, 0.6)); }
:is(.hv-tagbtn, .hv-combtn)[aria-pressed="true"] b { color: #fff; }
/* A heart: the site's comment-like pink once it's yours. */
#hub .hv-heart:disabled { opacity: 1; color: var(--muted); }
#hub .hv-heart.is-on { border-color: color-mix(in srgb, #ff6b8b 55%, var(--chrome-edge)); color: #ff6b8b; }
.hv-actions .hv-heart.is-on b { color: #ffc2cf; }
.hv-heart.is-pop svg { animation: hv-pop 0.32s cubic-bezier(0.2, 0.9, 0.3, 1.4); }
@keyframes hv-pop { 0% { transform: scale(0.6); } 60% { transform: scale(1.3); } }

/* Comments (comments.js) beside the photo: a column down the right under the readout, the photo and its buttons making room. */
.hv-side { position: absolute; z-index: 4; top: calc(env(safe-area-inset-top) + 56px); right: 0; bottom: 0; width: min(360px, 40%); display: flex; flex-direction: column; border-left: 1px solid var(--hb-line); background: rgba(4, 6, 9, 0.5); }
.hv-side[hidden] { display: none; }
.hv.has-side .hv-stage { margin-right: calc(min(360px, 40%) + 64px); }
.hv.has-side .hv-bottom { padding-right: calc(min(360px, 40%) + 18px); }
.hv-side-close { position: absolute; top: 6px; right: 8px; z-index: 1; }
.hv-side .hv-comments { flex: 1; min-height: 0; display: flex; flex-direction: column; margin: 0; max-width: none; padding: 12px 16px calc(env(safe-area-inset-bottom) + 14px); }
.hv-side .hv-comments[hidden] { display: none; }
.hv-side .ph-comments-head { min-height: 26px; margin: 0 40px 6px 0; }
.hv-side .ph-comments-heading { font-size: 11px; font-weight: 600; letter-spacing: 0.14em; text-transform: uppercase; color: rgba(255, 255, 255, 0.72); }
.hv-side .ph-comment-list { flex: 0 1 auto; min-height: 0; overflow-y: auto; overscroll-behavior: contain; margin: 0 -6px; padding: 0 6px; scrollbar-width: thin; scrollbar-color: rgba(255, 255, 255, 0.18) transparent; }
.hv-side .ph-comment-thread:first-child { border-top: 0; }
.hv-side .ph-comment-form { margin-top: auto; padding-top: 10px; }
.hv-side .ph-comment-form textarea { min-height: 56px; }
.hv-discord svg { width: 18px; height: 18px; }
.hv-posted { border-color: color-mix(in srgb, var(--accent) 50%, transparent); color: color-mix(in srgb, var(--accent) 35%, #fff); }
.hv-posted.is-off { opacity: 0.7; cursor: default; }
.hv-compose { display: flex; gap: 8px; width: min(520px, 100%); padding-top: 12px; }
.hv-compose[hidden] { display: none; }
.hv-input { flex: 1; min-width: 0; height: 44px; padding: 0 14px; border: 1px solid rgba(255, 255, 255, 0.14); border-radius: 8px; background: rgba(0, 0, 0, 0.45); color: #fff; font: inherit; font-size: 14px; outline: none; }
.hv-input:focus { border-color: color-mix(in srgb, var(--accent) 60%, #fff); }
.hv-compose .ph-btn { height: 44px; }
.hv-status { min-height: 18px; padding-top: 10px; font-size: 13px; color: rgba(225, 233, 238, 0.85); text-align: center; }
.hv-status:empty { min-height: 0; padding: 0; }
.hv-status a, .hv-link { color: #fff; }
.hv-link { padding: 0; border: 0; background: none; font-weight: 600; text-decoration: underline; cursor: pointer; }

/* Narrower: the side under the hero, the photo's side under the photo. */
@media (max-width: 1100px) {
	.hb-hero { grid-template-columns: minmax(0, 1fr); }
	.hb-stats { grid-template-columns: repeat(4, minmax(0, 1fr)); }
}
@media (max-width: 760px) {
	#hub { --hb-pad: 14px; }
	.hb-top { gap: 10px; height: 54px; padding-top: env(safe-area-inset-top); height: calc(54px + env(safe-area-inset-top)); }
	#hub.is-page .hb-top { padding-right: calc(env(safe-area-inset-right) + 54px); }
	.hb-home { display: none; }
	/* Tiles sharing the bar, each icon over its label, as the admin's are on a phone. */
	.hb-tabs { flex: 1 1 auto; display: grid; grid-auto-flow: column; grid-auto-columns: minmax(0, 1fr); gap: 5px; min-width: 0; max-width: 360px; margin-left: 0; }
	.hb-tab { flex-direction: column; gap: 3px; height: 44px; padding: 0 4px; font-size: 11.5px !important; }
	.hb-tab span { max-width: 100%; overflow: hidden; text-overflow: ellipsis; }
	.hb-tab svg { width: 18px; height: 18px; }
	.hb-top { padding-left: calc(env(safe-area-inset-left) + 6px) !important; }
	.hb-n { display: none; }
	.hb-play span { display: none; }
	.hb-play { width: 38px; padding: 0; justify-content: center; }
	.hb-page { padding-top: 14px; }
	.hb-hero { gap: 14px; }
	.hb-hero-pic { border-radius: 12px; }
	.hb-hero-caption { font-size: 16px; }
	.hb-stats dd { font-size: 22px; }
	.hb-stats div { padding: 10px 10px 9px; }
	.hb-stats dt { font-size: 9px; letter-spacing: 0.1em; }
	.hb-section { margin-top: 26px; }
	.hb-walk { width: 248px; }
	.hb-world { width: 200px; }
	.hb-person { width: 92px; }
	.hb-face.is-big { width: 62px; height: 62px; }
	.hb-grid { grid-template-columns: repeat(3, 1fr); grid-auto-rows: calc((100vw - 28px - 6px) / 3); gap: 3px; }
	.hb-tile { border-radius: 4px; }
	.hb-tile-info { display: none; }
	.hb-crumb { gap: 12px; }
	.hb-face.is-huge { width: 56px; height: 56px; font-size: 22px; }
	.hb-title h2 { font-size: 23px; }
	.hb-head.is-page { flex-wrap: wrap; }
	.hb-head.is-page h3 { font-size: 22px; }
}
/* A phone: the photo edge to edge, a tap for the tags, a swipe across for the next and down to put it away (--pull: how far down). */
@media (max-width: 760px), (orientation: portrait) and (pointer: coarse) {
	.hv { backdrop-filter: none; -webkit-backdrop-filter: none; background: rgb(0 0 0 / calc(1 - var(--pull, 0) * 0.7)); }
	.hv-stage { margin: 8px 0 0; touch-action: none; }
	.hv-img { border-radius: 0; }
	.hv-nav { display: none; }
	:is(.hv-head, .hv-bottom) { opacity: calc(1 - var(--pull, 0) * 1.5); }
	.hv-bottom { padding-top: 12px; }
	.hv-actions { gap: 8px; }
	.hv-actions .ph-btn { padding: 0 14px; }
	/* Room for the heart and comments on one row. */
	.hv-actions .hv-dl span { display: none; }
	.hv-input { font-size: 16px; }
	/* Comments come up over the bottom of the photo. */
	.hv-side { top: auto; left: 0; width: auto; height: min(70%, 560px); border-left: 0; border-top: 1px solid var(--hb-line); border-radius: 16px 16px 0 0; background: rgb(10, 12, 17); box-shadow: 0 -16px 40px rgba(0, 0, 0, 0.55); }
	.hv.has-side .hv-stage { margin-right: 0; }
	.hv.has-side .hv-bottom { padding-right: calc(env(safe-area-inset-right) + 18px); }
	.hv-side .ph-comment-form textarea { font-size: 16px; }
}
body.touch .hb-icon { width: 42px; height: 42px; }

.hb-body { position: relative; flex: 1; min-height: 0; display: flex; flex-direction: column; }
.hb-icon[hidden] { display: none; }

/* In the game: a window over the world, as if in the robot's head, its top bar the album's header (your hue fading in over a fine grid). Phones have it full screen. */
#hub.is-window { --hb-pad: 18px; inset: auto; left: 50%; top: 50%; width: min(1080px, calc(100vw - 48px)); height: min(800px, calc(100dvh - 48px)); transform: translate(-50%, -50%); border: 1px solid var(--edge); border-radius: 16px; background: var(--gloss), rgba(10, 13, 19, 0.78); backdrop-filter: blur(18px) saturate(140%); -webkit-backdrop-filter: blur(18px) saturate(140%); box-shadow: 0 30px 90px -24px rgba(0, 0, 0, 0.8); animation: hb-pop 0.2s ease-out; }
@keyframes hb-pop { from { opacity: 0; scale: 0.98; } }
#hub.is-window .hb-top { height: 46px; gap: 12px; padding: 0 8px 0 14px; border-bottom: 1px solid rgba(255, 255, 255, 0.08); background: linear-gradient(to left, color-mix(in srgb, var(--accent) 30%, transparent), transparent), var(--grid-x), var(--grid-y); background-size: auto, 20px 12px, 20px 12px; backdrop-filter: none; -webkit-backdrop-filter: none; }
#hub.is-window .hb-tabs { gap: 5px; margin-left: -6px; }
#hub.is-window .hb-tab { gap: 7px; height: 30px; padding: 0 11px 0 9px; border-radius: 7px; font-size: 11px !important; letter-spacing: 0.1em; text-transform: uppercase; }
#hub.is-window .hb-tab svg { width: 15px; height: 15px; }
#hub.is-window :is(.hb-close, .hb-back) { width: 30px; height: 30px; border-radius: 8px; }
#hub.is-window :is(.hb-close, .hb-back) svg { width: 17px; height: 17px; }
#hub.is-window .hb-back { margin-left: -6px; }
#hub.is-window .hb-page { padding: 18px var(--hb-pad) 22px; }
#hub.is-window .hb-stats div { background: rgba(6, 9, 13, 0.6); }
#hub.is-window .hb-hero { grid-template-columns: minmax(0, 1fr) 280px; }
body.touch #hub.is-window { inset: 0; width: auto; height: auto; transform: none; border: 0; border-radius: 0; background: var(--grid-x), var(--grid-y), #0a0c11; background-size: 40px 40px, 40px 40px, auto; backdrop-filter: none; -webkit-backdrop-filter: none; box-shadow: none; animation: hb-in 0.2s ease-out; }
body.touch #hub.is-window .hb-top { height: calc(52px + env(safe-area-inset-top)); padding: env(safe-area-inset-top) calc(env(safe-area-inset-right) + 8px) 0 calc(env(safe-area-inset-left) + 14px); }
@media (max-width: 760px) {
	#hub.is-window .hb-hero { grid-template-columns: minmax(0, 1fr); }
	#hub.is-window .hb-tabs { margin-left: 0; }
	#hub.is-window .hb-tab { gap: 3px; height: 42px; padding: 0 4px; font-size: 10.5px !important; letter-spacing: 0.06em; }
	#hub.is-window .hb-tab svg { width: 17px; height: 17px; }
}
@media (prefers-reduced-motion: reduce) {
	#hub, .hv { animation: none; }
	.hb-tile img, .hb-hero-pic > img, .hb-mosaic img, .hb-world img { transition: none; }
}
