/* ============================================================================
   Screenshot Albums - editorial gallery wrapped in dispatch-board chrome.
   Visual language matches /vtc/staff/* redesign (▸ accent, tracked uppercase
   eyebrows, tabular numerics, dashed separators, restrained accent use).
   Image content is treated as the hero with cinema-style gradient overlays.

   Palette
     #0d0d0e page bg / #151516 card / #1b1b1d hover / #ff9900 accent
     #636363 border / #1cbb8c green / #f7b500 amber / #ff3b30 red
   ============================================================================ */

.alb-wrap {
    --bg:          #0d0d0e;
    /* Derived shades track the themed base vars (which inherit the preset via
       `#subContent > *`), so an empty/coverless album and the accent fills follow
       the theme instead of staying default blue. Fallbacks = the original colours. */
    --bg-deep:     color-mix(in srgb, var(--bg) 85%, #000);
    --card:        #151516;
    --card-hi:     var(--hover, #313131);
    --hover:       #1b1b1d;
    --line:        rgba(99, 99, 99, 0.25);
    --line-soft:   rgba(99, 99, 99, 0.12);
    --ink:         #e0e0e0;
    --ink-dim:     rgba(224, 224, 224, 0.8);
    --ink-faint:   rgba(224, 224, 224, 0.55);
    --accent:      #ff9900;
    --accent-soft: color-mix(in srgb, var(--accent) 8%, transparent);
    --accent-edge: color-mix(in srgb, var(--accent) 28%, transparent);
    --green:       #1cbb8c;
    --amber:       #f7b500;
    --red:         #ff3b30;

    color: var(--ink);
    padding: 1.25rem 1.25rem 2.5rem;
    display: flex;
    flex-direction: column;
    gap: 1.1rem;
    /* Subtle atmospheric tint, almost invisible but lifts the page off flat */
    background:
        radial-gradient(ellipse 80% 50% at 50% -10%, rgba(255, 153, 0, 0.05) 0%, transparent 60%),
        radial-gradient(ellipse 60% 40% at 100% 100%, rgba(28, 187, 140, 0.03) 0%, transparent 60%);
}

/* The album modals (create / edit / upload / confirm) render OUTSIDE
   .alb-wrap, so mirror the palette vars onto .alb-modal too - otherwise the
   shared .alb-btn / .alb-btn-primary rules (which use var(--accent), --line,
   --ink, --hover...) render uncoloured inside them (the Create button showed
   no fill). */
.alb-modal {
    --hover:       #1b1b1d;
    --line:        rgba(99, 99, 99, 0.25);
    --line-soft:   rgba(99, 99, 99, 0.12);
    --ink:         #e0e0e0;
    --ink-dim:     rgba(224, 224, 224, 0.8);
    --accent:      #ff9900;
    --accent-soft: rgba(255, 153, 0, 0.08);
    --accent-edge: rgba(255, 153, 0, 0.28);
}

/* ── Page header ────────────────────────────────────────────────────── */

.alb-header {
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto;
    align-items: end;
    gap: 1rem 0.85rem;
    padding: 0.4rem 0.25rem 1rem;
    border-bottom: 1px dashed var(--line);
    position: relative;
}
.alb-header::after {
    /* Accent tick under the header, matches the dispatch-board feel */
    content: "";
    position: absolute;
    left: 0;
    bottom: -1px;
    width: 64px;
    height: 1px;
    background: var(--accent);
    box-shadow: 0 0 6px rgba(255, 153, 0, 0.55);
}
.alb-header-l {
    display: flex;
    flex-direction: column;
    gap: 0.35rem;
    min-width: 0;
}
.alb-header-r {
    display: flex;
    gap: 0.5rem;
    align-items: center;
    flex-wrap: wrap;
}
.alb-back {
    align-self: flex-start;
    display: inline-flex;
    align-items: center;
    gap: 0.45rem;
    font-size: 0.66rem;
    color: var(--ink-faint);
    text-transform: uppercase;
    letter-spacing: 0.18em;
    text-decoration: none;
    transition: color 0.15s, transform 0.15s;
}
.alb-back:hover {
    color: var(--accent);
    transform: translateX(-3px);
}
.alb-back i { font-size: 0.72rem; }

.alb-header-title {
    font-size: 1.55rem;
    font-weight: 600;
    color: #fff;
    line-height: 1.05;
    letter-spacing: -0.005em;
    display: flex;
    align-items: baseline;
    gap: 0.55rem;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}
.alb-header-title::before {
    content: "▸";
    color: var(--accent);
    font-size: 0.95rem;
    line-height: 1;
    transform: translateY(-2px);
    flex-shrink: 0;
}
.alb-header-sub {
    font-size: 0.66rem;
    color: var(--ink-faint);
    text-transform: uppercase;
    letter-spacing: 0.18em;
}
.alb-header-sub .alb-counter {
    color: var(--accent);
    font-weight: 700;
    font-variant-numeric: tabular-nums;
}

/* ── Stats strip (quota indicator) ──────────────────────────────────── */

.alb-stats {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
    gap: 0.7rem;
}
.alb-stat {
    position: relative;
    background: linear-gradient(180deg, var(--card) 0%, var(--card-hi) 100%);
    border: 1px solid var(--line-soft);
    border-radius: 0;
    padding: 0.75rem 0.95rem 0.9rem;
    box-shadow: 0 4px 14px rgba(0, 0, 0, 0.35);
    display: flex;
    flex-direction: column;
    gap: 0.55rem;
    overflow: hidden;
}
.alb-stat::before {
    /* Vertical accent stripe along the leading edge */
    content: "";
    position: absolute;
    left: 0;
    top: 0;
    bottom: 0;
    width: 2px;
    background: linear-gradient(180deg, var(--accent) 0%, transparent 85%);
}
.alb-stat-h {
    display: flex;
    align-items: center;
    gap: 0.4rem;
    font-size: 0.6rem;
    font-weight: 700;
    color: var(--ink-dim);
    text-transform: uppercase;
    letter-spacing: 0.18em;
}
.alb-stat-h::before {
    content: "▸";
    color: var(--accent);
}
.alb-stat-row {
    display: flex;
    align-items: baseline;
    justify-content: space-between;
    gap: 0.5rem;
}
.alb-stat-val {
    font-size: 1.45rem;
    font-weight: 600;
    line-height: 1;
    color: #fff;
    font-variant-numeric: tabular-nums;
    letter-spacing: -0.01em;
}
.alb-stat-val small {
    font-size: 0.72rem;
    font-weight: 500;
    color: var(--ink-faint);
    margin-left: 0.3rem;
    letter-spacing: 0;
}
.alb-stat-pct {
    font-size: 0.66rem;
    font-weight: 700;
    color: var(--ink-faint);
    font-variant-numeric: tabular-nums;
    letter-spacing: 0.04em;
}
.alb-bar {
    position: relative;
    height: 5px;
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.04);
    overflow: hidden;
}
.alb-bar-fill {
    position: absolute;
    left: 0;
    top: 0;
    bottom: 0;
    background: var(--accent);
    border-radius: 999px;
    transition: width 0.5s cubic-bezier(0.22, 1, 0.36, 1),
                background-color 0.2s;
    box-shadow: 0 0 8px rgba(255, 153, 0, 0.4);
}
.alb-stat.is-warn .alb-bar-fill {
    background: var(--amber);
    box-shadow: 0 0 8px rgba(247, 181, 0, 0.45);
}
.alb-stat.is-warn .alb-stat-pct { color: var(--amber); }
.alb-stat.is-full .alb-bar-fill {
    background: var(--red);
    box-shadow: 0 0 8px rgba(255, 59, 48, 0.45);
}
.alb-stat.is-full .alb-stat-pct { color: var(--red); }
.alb-stat.is-info::before { background: linear-gradient(180deg, var(--green) 0%, transparent 85%); }
.alb-stat.is-info .alb-stat-h::before { color: var(--green); }

/* ── Buttons ─────────────────────────────────────────────────────────── */

.alb-btn {
    appearance: none;
    border: 1px solid var(--line);
    background: rgba(255, 255, 255, 0.025);
    color: var(--ink);
    padding: 0.5rem 0.95rem;
    border-radius: 0;
    font-size: 0.68rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.12em;
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    gap: 0.45rem;
    white-space: nowrap;
    transition: background 0.15s, border-color 0.15s, color 0.15s,
                box-shadow 0.2s, transform 0.15s;
}
.alb-btn i { font-size: 0.78rem; opacity: 0.85; }
.alb-btn:hover:not(:disabled) {
    background: var(--hover);
    border-color: var(--accent-edge);
    color: var(--accent);
}
.alb-btn:disabled {
    opacity: 0.4;
    cursor: not-allowed;
}
.alb-btn-primary {
    background: var(--accent);
    border-color: var(--accent);
    color: #222222;
    box-shadow: 0 4px 14px rgba(255, 153, 0, 0.22);
}
.alb-btn-primary:hover:not(:disabled) {
    background: #ffae33;
    border-color: #ffae33;
    color: #222222;
    box-shadow: 0 6px 18px rgba(255, 153, 0, 0.38);
    transform: translateY(-1px);
}
.alb-btn-ghost { background: transparent; }

/* ── Album cards (grid of albums) ───────────────────────────────────── */

.alb-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(240px, 1fr));
    gap: 0.85rem;
}
.alb-card {
    position: relative;
    display: flex;
    flex-direction: column;
    background: var(--card);
    border: 1px solid var(--line-soft);
    border-radius: 0;
    overflow: hidden;
    text-decoration: none;
    color: inherit;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.25);
    transition: transform 0.22s cubic-bezier(0.22, 1, 0.36, 1),
                box-shadow 0.22s,
                border-color 0.15s;
}
.alb-card:hover {
    transform: translateY(-3px);
    border-color: var(--accent-edge);
    box-shadow: 0 14px 30px rgba(0, 0, 0, 0.48),
                0 0 0 1px rgba(255, 153, 0, 0.18);
}
.alb-card-link {
    display: contents;
    color: inherit;
    text-decoration: none;
}
.alb-card-cover {
    position: relative;
    aspect-ratio: 16 / 9;
    background: var(--bg-deep) center / cover no-repeat;
    display: flex;
    align-items: center;
    justify-content: center;
    color: rgba(224, 224, 224, 0.22);
    font-size: 1.8rem;
}
.alb-card-cover::after {
    /* Cinema gradient that lifts the title legibly off any image */
    content: "";
    position: absolute;
    inset: 45% 0 0 0;
    background: linear-gradient(
        180deg,
        transparent 0%,
        rgba(18, 18, 18, 0.55) 55%,
        rgba(18, 18, 18, 0.92) 100%
    );
    pointer-events: none;
}
.alb-card-body {
    position: absolute;
    left: 0;
    right: 0;
    bottom: 0;
    padding: 0.7rem 0.95rem 0.8rem;
    z-index: 1;
}
.alb-card-title {
    font-size: 0.96rem;
    font-weight: 600;
    color: #fff;
    line-height: 1.15;
    letter-spacing: -0.005em;
    text-shadow: 0 2px 8px rgba(0, 0, 0, 0.7);
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}
.alb-card-meta {
    margin-top: 0.3rem;
    font-size: 0.63rem;
    font-weight: 700;
    color: rgba(255, 255, 255, 0.75);
    text-transform: uppercase;
    letter-spacing: 0.14em;
    font-variant-numeric: tabular-nums;
    display: inline-flex;
    align-items: center;
    gap: 0.4rem;
    text-shadow: 0 2px 4px rgba(0, 0, 0, 0.5);
}
.alb-card-meta::before {
    content: "";
    width: 5px;
    height: 5px;
    border-radius: 50%;
    background: var(--accent);
    box-shadow: 0 0 6px rgba(255, 153, 0, 0.55);
}
.alb-card-actions {
    position: absolute;
    top: 0.55rem;
    right: 0.55rem;
    display: flex;
    gap: 0.3rem;
    opacity: 0;
    transition: opacity 0.18s;
    z-index: 2;
}
.alb-card-editor:hover .alb-card-actions { opacity: 1; }

/* ── Action chip buttons (overlay on cards / tiles) ─────────────────── */

.alb-action {
    width: 30px;
    height: 30px;
    background: rgba(18, 18, 18, 0.78);
    backdrop-filter: blur(6px);
    -webkit-backdrop-filter: blur(6px);
    border: 1px solid rgba(255, 255, 255, 0.08);
    color: var(--ink);
    border-radius: 0;
    font-size: 0.76rem;
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    transition: background 0.15s, border-color 0.15s,
                color 0.15s, transform 0.15s;
}
.alb-action:hover {
    background: rgba(18, 18, 18, 0.95);
    border-color: var(--accent-edge);
    color: var(--accent);
    transform: scale(1.08);
}
.alb-action.danger:hover {
    border-color: rgba(255, 59, 48, 0.45);
    color: var(--red);
}

/* ── Image grid (within an album) - magazine layout ──────────────────
   Tiles are 16:9. The cover image is promoted to a 2x2 "hero" cell on
   desktop so the curator's pick anchors the page. Smaller tiles still
   read as a uniform contact sheet around it. */

.alb-img-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    grid-auto-rows: auto;
    grid-auto-flow: dense;
    gap: 0.7rem;
}
.alb-tile {
    position: relative;
    background: var(--bg-deep);
    border: 1px solid var(--line-soft);
    border-radius: 0;
    overflow: hidden;
    aspect-ratio: 16 / 9;
    cursor: zoom-in;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.3);
    transition: transform 0.28s cubic-bezier(0.22, 1, 0.36, 1),
                box-shadow 0.28s,
                border-color 0.18s;
    isolation: isolate;
}
.alb-tile::after {
    /* Subtle vignette + bottom gradient that lifts captions/actions off the image */
    content: "";
    position: absolute;
    inset: 0;
    background:
        linear-gradient(
            180deg,
            rgba(18, 18, 18, 0) 55%,
            rgba(18, 18, 18, 0.78) 100%
        );
    opacity: 0.6;
    transition: opacity 0.28s;
    pointer-events: none;
    z-index: 1;
}
.alb-tile:hover {
    border-color: var(--accent-edge);
    transform: translateY(-3px);
    box-shadow: 0 16px 32px rgba(0, 0, 0, 0.55);
    z-index: 2;
}
.alb-tile:hover::after { opacity: 0.92; }

/* Cover tile: thicker accent border, soft outer glow, hero treatment on desktop. */
.alb-tile.is-cover {
    border-color: var(--accent);
    box-shadow:
        0 10px 28px rgba(0, 0, 0, 0.55),
        0 0 0 1px rgba(255, 153, 0, 0.4),
        0 0 22px rgba(255, 153, 0, 0.12);
}
/* Sized by the album column, not the viewport: the rail, the drawer and the
   profile / VTC chrome all change how wide the grid really is. */
.alb-wrap { container-type: inline-size; }
@container (min-width: 900px) {
    .alb-tile.is-cover {
        grid-column: span 2;
        grid-row: span 2;
    }
}

.alb-tile img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
    transition: transform 0.6s cubic-bezier(0.22, 1, 0.36, 1),
                filter 0.3s;
    filter: saturate(0.96);
}
.alb-tile:hover img {
    transform: scale(1.05);
    filter: saturate(1.05);
}

.alb-tile-cap {
    position: absolute;
    left: 0;
    right: 0;
    bottom: 0;
    padding: 0.9rem 0.85rem 0.55rem;
    font-size: 0.78rem;
    font-weight: 500;
    color: #fff;
    line-height: 1.3;
    text-shadow: 0 1px 4px rgba(0, 0, 0, 0.65);
    pointer-events: none;
    z-index: 2;
    opacity: 0;
    transform: translateY(6px);
    transition: opacity 0.25s, transform 0.25s;
}
.alb-tile:hover .alb-tile-cap,
.alb-tile.is-cover .alb-tile-cap {
    opacity: 1;
    transform: translateY(0);
}
/* Caption stays visible always when present on cover - it earns the real estate. */
.alb-tile.is-cover .alb-tile-cap { font-size: 0.92rem; padding: 1rem 1.1rem 0.75rem; }

.alb-tile-actions {
    position: absolute;
    top: 0.5rem;
    right: 0.5rem;
    display: flex;
    gap: 0.3rem;
    opacity: 0;
    transform: translateY(-4px);
    transition: opacity 0.18s, transform 0.18s;
    z-index: 3;
}
.alb-tile:hover .alb-tile-actions {
    opacity: 1;
    transform: translateY(0);
}

/* Cover ribbon: bold and confident, with a tiny pin glyph. */
.alb-tile-flag {
    position: absolute;
    top: 0.6rem;
    left: 0.6rem;
    padding: 0.22rem 0.6rem 0.22rem 0.5rem;
    font-size: 0.6rem;
    font-weight: 800;
    background: var(--accent);
    color: #222222;
    border-radius: 0;
    text-transform: uppercase;
    letter-spacing: 0.14em;
    box-shadow: 0 4px 10px rgba(255, 153, 0, 0.45);
    z-index: 3;
    display: inline-flex;
    align-items: center;
    gap: 0.35rem;
}
.alb-tile-flag::before {
    content: "★";
    font-size: 0.72rem;
    line-height: 1;
}

/* ── Detail header (used by public viewer + after upload) ───────────── */

.alb-detail-head {
    padding: 0.4rem 0.25rem 1rem;
    border-bottom: 1px dashed var(--line);
    position: relative;
}
.alb-detail-head::after {
    content: "";
    position: absolute;
    left: 0;
    bottom: -1px;
    width: 64px;
    height: 1px;
    background: var(--accent);
    box-shadow: 0 0 6px rgba(255, 153, 0, 0.55);
}
.alb-detail-title {
    font-size: 1.4rem;
    font-weight: 600;
    color: #fff;
    letter-spacing: -0.005em;
    display: flex;
    align-items: baseline;
    gap: 0.55rem;
}
.alb-detail-title::before {
    content: "▸";
    color: var(--accent);
    font-size: 0.9rem;
}
.alb-detail-desc {
    font-size: 0.85rem;
    color: var(--ink-dim);
    margin-top: 0.55rem;
    max-width: 720px;
    line-height: 1.5;
}

/* ── Empty & lock states ────────────────────────────────────────────── */

.alb-empty,
.alb-lock {
    text-align: center;
    padding: 3.25rem 1.5rem 3rem;
    background:
        radial-gradient(ellipse 50% 70% at 50% 0%, rgba(255, 153, 0, 0.05) 0%, transparent 70%),
        var(--card);
    border: 1px solid var(--line-soft);
    border-radius: 0;
    color: var(--ink-dim);
    position: relative;
    overflow: hidden;
}
.alb-empty::before,
.alb-lock::before {
    /* Accent tick centered on top edge */
    content: "";
    position: absolute;
    left: 50%;
    top: -1px;
    width: 80px;
    height: 1px;
    transform: translateX(-50%);
    background: var(--accent);
    box-shadow: 0 0 8px rgba(255, 153, 0, 0.6);
}
.alb-empty-ic,
.alb-lock-ic {
    width: 68px;
    height: 68px;
    border-radius: 50%;
    background:
        radial-gradient(circle at 50% 50%, rgba(255, 153, 0, 0.2) 0%, rgba(255, 153, 0, 0.04) 60%, transparent 75%);
    color: var(--accent);
    font-size: 1.55rem;
    margin: 0 auto 1.1rem;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border: 1px solid rgba(255, 153, 0, 0.28);
    box-shadow: 0 0 0 6px rgba(255, 153, 0, 0.04);
}
.alb-empty-h,
.alb-lock-h {
    color: #fff;
    font-weight: 600;
    font-size: 1.05rem;
    margin-bottom: 0.4rem;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    letter-spacing: -0.005em;
}
.alb-empty-h::before,
.alb-lock-h::before {
    content: "▸";
    color: var(--accent);
    font-size: 0.85rem;
}
.alb-empty-sub,
.alb-lock-sub {
    font-size: 0.82rem;
    color: var(--ink-faint);
    max-width: 380px;
    margin: 0 auto;
    line-height: 1.5;
}

/* ── Modal styling (create / edit / upload) ─────────────────────────── */

.alb-modal .modal-content {
    background: var(--card);
    color: var(--ink);
    border: 1px solid var(--line);
    border-radius: 0;
    box-shadow: 0 24px 60px rgba(0, 0, 0, 0.6);
    overflow: hidden;
}
.alb-modal .modal-header,
.alb-modal .modal-footer {
    border-color: var(--line-soft);
}
.alb-modal .modal-header {
    border-bottom: 1px dashed var(--line-soft);
    padding: 0.95rem 1.1rem;
    background: linear-gradient(180deg, rgba(255, 255, 255, 0.025) 0%, transparent 100%);
}
.alb-modal .modal-header .modal-title {
    font-size: 0.75rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.16em;
    color: var(--ink);
    display: flex;
    align-items: center;
    gap: 0.5rem;
}
.alb-modal .modal-header .modal-title i { display: none; }
.alb-modal .modal-header .modal-title::before {
    content: "▸";
    color: var(--accent);
    font-size: 0.85rem;
}
.alb-modal .modal-body { padding: 1.1rem; }
.alb-modal .modal-footer {
    border-top: 1px dashed var(--line-soft);
    padding: 0.75rem 1.1rem;
    gap: 0.5rem;
}
.alb-modal .btn-close {
    filter: invert(1) opacity(0.5);
    transition: filter 0.15s;
}
.alb-modal .btn-close:hover {
    filter: invert(1) opacity(0.95);
}

.alb-modal .form-control {
    background: var(--bg);
    color: var(--ink);
    border: 1px solid var(--line);
    border-radius: 0;
    padding: 0.55rem 0.75rem;
    font-size: 0.85rem;
    transition: border-color 0.15s, box-shadow 0.15s, background 0.15s;
}
.alb-modal .form-control:focus {
    background: var(--bg);
    border-color: var(--accent-edge);
    box-shadow: 0 0 0 3px rgba(255, 153, 0, 0.12);
    outline: none;
    color: var(--ink);
}
.alb-modal .form-control::placeholder {
    color: var(--ink-faint);
}

.alb-label {
    font-size: 0.6rem;
    font-weight: 700;
    color: var(--ink-dim);
    text-transform: uppercase;
    letter-spacing: 0.18em;
    display: flex;
    align-items: center;
    gap: 0.4rem;
    margin-bottom: 0.45rem;
}
.alb-label::before {
    content: "▸";
    color: var(--accent);
}

.alb-check {
    display: flex;
    align-items: center;
    gap: 0.6rem;
    font-size: 0.8rem;
    color: var(--ink-dim);
    margin-top: 0.85rem;
    cursor: pointer;
    padding: 0.6rem 0.8rem;
    background: rgba(255, 255, 255, 0.02);
    border: 1px solid var(--line-soft);
    border-radius: 0;
    transition: border-color 0.15s, background 0.15s, color 0.15s;
}
.alb-check:hover {
    border-color: var(--line);
    background: rgba(255, 255, 255, 0.035);
    color: var(--ink);
}
.alb-check input[type="checkbox"] {
    accent-color: var(--accent);
    width: 14px;
    height: 14px;
    margin: 0;
}

.alb-policy {
    background: rgba(220, 53, 69, 0.07);
    border: 1px solid rgba(220, 53, 69, 0.28);
    color: #f5d4d7;
    border-radius: 0;
    padding: 0.75rem 0.9rem;
    margin-bottom: 1rem;
    font-size: 0.78rem;
    line-height: 1.45;
    display: flex;
    align-items: flex-start;
    gap: 0.7rem;
    position: relative;
}
.alb-policy i {
    color: var(--red);
    margin-top: 0.15rem;
    font-size: 0.9rem;
    flex-shrink: 0;
}
.alb-policy strong {
    color: #fff;
    font-weight: 700;
}

.alb-storage-note {
    margin-top: 0.85rem;
    padding: 0.55rem 0.75rem;
    font-size: 0.7rem;
    color: var(--ink-faint);
    background: rgba(255, 255, 255, 0.02);
    border: 1px solid var(--line-soft);
    border-radius: 0;
    line-height: 1.45;
    display: flex;
    align-items: flex-start;
    gap: 0.55rem;
}
.alb-storage-note i {
    color: var(--accent);
    margin-top: 0.18rem;
    font-size: 0.78rem;
}

.alb-editor-wrap {
    border-radius: 0;
    overflow: hidden;
    background: var(--bg);
}

/* File picker shown before an image is chosen. */
.alb-pick {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 10px;
    min-height: 240px;
    padding: 24px;
    position: relative;
    background:
        repeating-linear-gradient(45deg,
            rgba(255, 255, 255, 0.015) 0px,
            rgba(255, 255, 255, 0.015) 12px,
            transparent 12px,
            transparent 24px),
        var(--bg);
    border: 1px dashed var(--line);
    border-radius: 0;
    color: var(--ink-dim);
    cursor: pointer;
    text-align: center;
    transition: border-color 0.15s, background 0.15s;
}
.alb-pick:hover { border-color: var(--accent-edge); color: #e6edf5; }
.alb-pick i { font-size: 2rem; color: var(--accent); }

/* Filerobot mounts here once a file is selected; it needs an explicit height. */
.alb-editor {
    height: 70vh;
    min-height: 480px;
    border-radius: 0;
    overflow: hidden;
}
.alb-editor .FIE_root,
.alb-editor .FIE_canvas-container {
    height: 100%;
}

/* Filerobot's theme.palette doesn't reach the Sfx form controls or the filter
   carousel arrows, so they render with a white background that clashes with the
   dark site theme. Override them here, scoped to the editor. */
.alb-editor .SfxInput-root,
.alb-editor .SfxInput-inputContent,
.alb-editor .SfxInput-fieldWrapper {
    background: transparent !important;
}
.alb-editor .SfxInput-Base {
    background: #0d0d0e !important;
    color: #e6edf5 !important;
    border-color: #393939 !important;
}
.alb-editor .SfxInput-Base::placeholder { color: #6c7a8a !important; }
.alb-editor .SfxInput-Base:focus {
    border-color: #ff9900 !important;
}

/* Filter-strip scroll arrows. These are overlay fades on top of the filter
   carousel (the thumbnails scroll underneath), not solid buttons - so use a
   transparent-to-dark gradient that blends into the editor bg, no border. */
.alb-editor .FIE_carousel-prev-button,
.alb-editor .FIE_carousel-next-button {
    background: linear-gradient(90deg,
        #151516 1.56%,
        rgba(21, 21, 22, 0.89) 52.4%,
        rgba(21, 21, 22, 0.532165) 76.04%,
        rgba(21, 21, 22, 0) 100%) !important;
    color: #cfd8e3 !important;
    border: none !important;
}
.alb-editor .FIE_carousel-next-button {
    background: linear-gradient(270deg,
        #151516 1.56%,
        rgba(21, 21, 22, 0.89) 52.4%,
        rgba(21, 21, 22, 0.532165) 76.04%,
        rgba(21, 21, 22, 0) 100%) !important;
}
.alb-editor .FIE_carousel-prev-button:hover,
.alb-editor .FIE_carousel-next-button:hover {
    color: #ff9900 !important;
}
.alb-editor .FIE_carousel-prev-button svg,
.alb-editor .FIE_carousel-next-button svg {
    fill: currentColor !important;
}

/* ── Lightbox / photo viewer ─────────────────────────────────────────
   Full-screen viewer: top rail (position + close), centre stage with the
   image, side nav arrows, and a glassy bottom toolbar carrying the caption,
   a read-only rating, and the share row (copy link / Facebook / X / open). */

body.alb-lb-open { overflow: hidden; }
.alb-lb {
    position: fixed;
    inset: 0;
    z-index: 2000;
    overscroll-behavior: contain;
    background:
        radial-gradient(ellipse 70% 70% at 50% 45%, rgba(18, 18, 18, 0.9) 0%, rgba(9, 9, 9, 0.99) 100%);
    display: grid;
    grid-template-rows: auto minmax(0, 1fr) auto;
    grid-template-columns: auto minmax(0, 1fr) auto;
    grid-template-areas:
        "top   top   top"
        "prev  stage next"
        "bar   bar   bar";
    align-items: center;
    animation: alb-lb-in 0.2s ease-out;
}
@keyframes alb-lb-in {
    from { opacity: 0; }
    to { opacity: 1; }
}

.alb-lb-top {
    grid-area: top;
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 1.1rem 1.3rem 0.4rem;
    z-index: 2;
}
.alb-lb-stage {
    grid-area: stage;
    display: flex;
    align-items: center;
    justify-content: center;
    align-self: stretch;
    min-height: 0;
    height: 100%;
    padding: 0.5rem;
    cursor: zoom-out;
    touch-action: pinch-zoom;
}
.alb-lb-img {
    max-width: 100%;
    max-height: min(78vh, 100%);
    object-fit: contain;
    border-radius: 0;
    box-shadow: 0 24px 70px rgba(0, 0, 0, 0.7);
    animation: alb-lb-img-in 0.26s cubic-bezier(0.22, 1, 0.36, 1);
    cursor: default;
}
@keyframes alb-lb-img-in {
    from { opacity: 0; transform: scale(0.96); }
    to { opacity: 1; transform: scale(1); }
}

/* Close + nav buttons share the glass-pill treatment. */
.alb-lb-close,
.alb-lb-nav {
    appearance: none;
    background: rgba(18, 18, 18, 0.7);
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
    border: 1px solid rgba(255, 255, 255, 0.08);
    color: #fff;
    cursor: pointer;
    width: 46px;
    height: 46px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    transition: background 0.15s, border-color 0.15s, color 0.15s, transform 0.15s;
}
.alb-lb-close:hover,
.alb-lb-nav:hover {
    background: rgba(255, 153, 0, 0.18);
    border-color: var(--accent);
    color: var(--accent);
}
.alb-lb-nav { font-size: 1rem; }
.alb-lb-nav.prev { grid-area: prev; margin-left: 1.1rem; }
.alb-lb-nav.next { grid-area: next; margin-right: 1.1rem; }
.alb-lb-nav:hover { transform: scale(1.08); }

/* Position counter, dispatch-board style. */
.alb-lb-counter {
    color: var(--ink-dim);
    font-size: 0.68rem;
    font-weight: 700;
    letter-spacing: 0.18em;
    text-transform: uppercase;
    font-variant-numeric: tabular-nums;
    background: rgba(18, 18, 18, 0.6);
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
    padding: 0.4rem 0.7rem;
    border-radius: 0;
    border: 1px solid rgba(255, 255, 255, 0.06);
    display: inline-flex;
    align-items: center;
    gap: 0.4rem;
}
.alb-lb-counter::before { content: "▸"; color: var(--accent); }

/* Bottom toolbar: caption + rating on the left, share row on the right. */
.alb-lb-bar {
    grid-area: bar;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1rem 1.5rem;
    flex-wrap: wrap;
    padding: 0.7rem 1.3rem 1.2rem;
    z-index: 2;
}
.alb-lb-bar-l {
    display: flex;
    align-items: center;
    gap: 0.65rem 1.1rem;
    flex-wrap: wrap;
    min-width: 0;
}
.alb-lb-cap {
    color: #fff;
    font-size: 0.86rem;
    line-height: 1.35;
    max-width: 52vw;
    text-shadow: 0 1px 4px rgba(0, 0, 0, 0.7);
}
.alb-lb-rate { display: inline-flex; align-items: center; gap: 0.45rem; }
.alb-lb-rate .alb-stars i { font-size: 0.92rem; }
.alb-lb-rate-meta {
    color: rgba(255, 255, 255, 0.7);
    font-variant-numeric: tabular-nums;
    font-size: 0.76rem;
}

.alb-lb-share {
    display: inline-flex;
    align-items: center;
    gap: 0.45rem;
}
.alb-lb-share-lbl {
    font-size: 0.6rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.18em;
    color: var(--ink-faint);
    margin-right: 0.15rem;
}
.alb-lb-sbtn {
    appearance: none;
    text-decoration: none;
    height: 36px;
    min-width: 36px;
    padding: 0 0.7rem;
    border-radius: 0;
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(255, 255, 255, 0.1);
    color: #fff;
    font-size: 0.72rem;
    font-weight: 700;
    letter-spacing: 0.04em;
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.45rem;
    transition: background 0.15s, border-color 0.15s, color 0.15s, transform 0.15s;
}
.alb-lb-sbtn i { font-size: 0.92rem; }
.alb-lb-sbtn:hover {
    background: rgba(255, 255, 255, 0.1);
    border-color: rgba(255, 255, 255, 0.22);
    transform: translateY(-1px);
    color: #fff;
}
.alb-lb-sbtn.js-copy.is-done {
    background: rgba(28, 187, 140, 0.16);
    border-color: rgba(28, 187, 140, 0.55);
    color: #6fe3c2;
}
.alb-lb-sbtn.is-fb:hover { background: #1877f2; border-color: #1877f2; }
.alb-lb-sbtn.is-x:hover  { background: #000; border-color: rgba(255, 255, 255, 0.4); }
.alb-lb-sbtn.is-ig:hover {
    background: linear-gradient(45deg, #f09433, #e6683c 25%, #dc2743 50%, #cc2366 75%, #bc1888);
    border-color: rgba(255, 255, 255, 0.35);
}
/* X (formerly Twitter) wordmark glyph - the bundled FA has no fa-x-twitter. */
.alb-lb-xglyph {
    font-size: 1rem;
    font-weight: 700;
    line-height: 1;
    font-family: "Helvetica Neue", Arial, sans-serif;
}

/* ── Responsive ─────────────────────────────────────────────────────── */

@media (max-width: 760px) {
    .alb-wrap { padding: 0.85rem 0.85rem 2rem; gap: 0.9rem; }
    .alb-header {
        grid-template-columns: 1fr;
        align-items: stretch;
        gap: 0.75rem;
    }
    .alb-header-r { justify-content: flex-start; }
    .alb-header-title { font-size: 1.25rem; }
    .alb-stats { grid-template-columns: 1fr; }
    .alb-grid,
    .alb-img-grid {
        grid-template-columns: repeat(auto-fill, minmax(160px, 1fr));
        gap: 0.55rem;
    }
    /* Viewer: drop the side arrows to the toolbar, let the image use the width. */
    .alb-lb {
        grid-template-columns: 1fr;
        grid-template-areas:
            "top"
            "stage"
            "bar";
    }
    .alb-lb-nav { position: absolute; top: 50%; transform: translateY(-50%); width: 40px; height: 40px; }
    .alb-lb-nav.prev { left: 0.6rem; margin: 0; }
    .alb-lb-nav.next { right: 0.6rem; margin: 0; }
    .alb-lb-nav:hover { transform: translateY(-50%) scale(1.08); }
    .alb-lb-img { max-height: 100%; }
    .alb-lb-bar { justify-content: center; padding: 0.6rem 0.9rem 1rem; }
    .alb-lb-cap { max-width: 90vw; text-align: center; }
    .alb-lb-share-lbl { display: none; }
}

/* ============================================================================
   Award ribbon + 1-5 star rating widget.
   Shared by the album detail view (.alb-wrap) and the Screenshots gallery
   (.gal-wrap), so these rules use literal colours rather than the .alb-wrap
   scoped custom properties.
   ============================================================================ */

/* Monthly-winner ribbon, pinned to the top-left of a tile. */
.alb-award {
    position: absolute;
    top: 0.55rem;
    left: 0.55rem;
    z-index: 4;
    display: inline-flex;
    align-items: center;
    gap: 0.3rem;
    padding: 0.22rem 0.5rem;
    font-size: 0.66rem;
    font-weight: 700;
    letter-spacing: 0.02em;
    color: #1b1b1b;
    border-radius: 999px;
    background: linear-gradient(180deg, #ffd76a, #f7b500);
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.45);
    pointer-events: none;
}
.alb-award i { font-size: 0.7rem; }
.alb-award.rank-2 { background: linear-gradient(180deg, #e8edf3, #b9c4d0); }
.alb-award.rank-3 { background: linear-gradient(180deg, #e6b483, #cd7f44); color: #2a1a0c; }

/* Star rating. Interactive variant lets the user click a star to vote. */
.alb-rating {
    display: flex;
    align-items: center;
    gap: 0.45rem;
    font-size: 0.82rem;
}
.alb-stars { display: inline-flex; gap: 0.08rem; }
.alb-stars i {
    color: rgba(224, 224, 224, 0.35);
    font-size: 0.85rem;
    transition: color 0.12s, transform 0.12s;
}
.alb-stars i.is-on { color: #f7b500; }
.alb-rating.is-interactive .alb-stars i { cursor: pointer; }
.alb-rating.is-interactive .alb-stars i:hover { transform: scale(1.18); }
.alb-rating-meta { color: rgba(224, 224, 224, 0.6); font-variant-numeric: tabular-nums; font-size: 0.74rem; }
.alb-rating.is-mine .alb-rating-meta { color: #f7b500; }

/* Overlay variant: rating sits directly inside a clipped .alb-tile (album
   detail). Always visible so visitors can rate without hovering. */
.alb-tile > .alb-rating {
    position: absolute;
    left: 0;
    right: 0;
    bottom: 0;
    z-index: 3;
    justify-content: space-between;
    padding: 0.5rem 0.6rem;
    background: linear-gradient(0deg, rgba(0, 0, 0, 0.72), rgba(0, 0, 0, 0));
}
.alb-tile > .alb-rating .alb-rating-meta { color: rgba(255, 255, 255, 0.85); text-shadow: 0 1px 3px rgba(0, 0, 0, 0.6); }
/* When a tile carries a rating overlay, lift its hover caption clear of it. */
.alb-tile:has(> .alb-rating) .alb-tile-cap { bottom: 1.9rem; }

/* ============================================================================
   Upload modal - staged preview step (pick -> preview -> Upload / Edit).
   The default Upload path stores the original file untouched; Edit is opt-in.
   ============================================================================ */
.alb-staged { display: flex; flex-direction: column; gap: 0.8rem; }
.alb-staged-preview-wrap {
    display: flex;
    justify-content: center;
    align-items: center;
    background: #1a1a1a;
    border: 1px solid var(--line-soft);
    border-radius: 0;
    padding: 0.6rem;
    max-height: 56vh;
    overflow: hidden;
}
.alb-staged-preview {
    max-width: 100%;
    max-height: 52vh;
    border-radius: 0;
    object-fit: contain;
    image-rendering: auto;
}
.alb-staged-bar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
    flex-wrap: wrap;
}
.alb-staged-hint {
    display: inline-flex;
    align-items: center;
    gap: 0.4rem;
    font-size: 0.78rem;
    color: #1cbb8c;
}
.alb-staged-actions { display: flex; gap: 0.5rem; flex-wrap: wrap; }
@media (max-width: 640px) {
    .alb-staged-bar { flex-direction: column; align-items: stretch; }
    .alb-staged-actions { justify-content: stretch; }
    .alb-staged-actions .alb-btn { flex: 1; justify-content: center; }
}

/* ============================================================================
   Upload modal - multi-file queue + server-side watermark controls.
   ============================================================================ */
.alb-wm {
    border: 1px solid var(--line-soft);
    border-radius: 0;
    padding: 0.7rem 0.85rem;
    margin-bottom: 0.9rem;
    background: rgba(255, 255, 255, 0.02);
}
.alb-wm-toggle {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    cursor: pointer;
    font-size: 0.86rem;
    font-weight: 600;
    color: var(--ink);
}
.alb-wm-toggle input { accent-color: var(--accent); width: 16px; height: 16px; }
.alb-wm-toggle i { color: var(--accent); }
.alb-wm-opts {
    display: flex;
    flex-wrap: wrap;
    gap: 1.4rem;
    margin-top: 0.75rem;
    padding-top: 0.75rem;
    border-top: 1px dashed var(--line-soft);
}
.alb-wm-group { display: flex; align-items: center; gap: 0.7rem; flex-wrap: wrap; }
.alb-wm-label {
    font-size: 0.62rem;
    text-transform: uppercase;
    letter-spacing: 0.06em;
    color: var(--ink-dim);
    font-weight: 700;
}
.alb-wm-radio {
    display: inline-flex;
    align-items: center;
    gap: 0.35rem;
    font-size: 0.8rem;
    color: var(--ink-dim);
    cursor: pointer;
}
.alb-wm-radio input { accent-color: var(--accent); }

.alb-drop {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 0.35rem;
    min-height: 170px;
    padding: 1.4rem 1rem;
    border: 1px dashed var(--line);
    background: rgba(255, 255, 255, 0.02);
    color: var(--ink-dim);
    text-align: center;
    cursor: pointer;
    transition: border-color .15s, background .15s;
}
.alb-drop:hover,
.alb-drop.is-over {
    border-color: var(--accent-edge);
    background: var(--accent-soft);
}
.alb-drop > i { font-size: 1.7rem; color: var(--accent); margin-bottom: 0.25rem; }
.alb-drop-h { font-size: 0.88rem; font-weight: 600; color: var(--ink); }
.alb-drop-sub { font-size: 0.72rem; color: rgba(224, 224, 224, 0.55); }
.alb-drop.is-busy { pointer-events: none; opacity: 0.5; }

.alb-queue {
    list-style: none;
    margin: 0.75rem 0 0;
    padding: 0;
    display: grid;
    gap: 0.4rem;
    max-height: 340px;
    overflow-y: auto;
}
.alb-q {
    display: grid;
    grid-template-columns: 96px minmax(0, 1fr) auto;
    align-items: center;
    gap: 0.75rem;
    padding: 0.4rem;
    border: 1px solid var(--line-soft);
    background: rgba(255, 255, 255, 0.02);
    position: relative;
    overflow: hidden;
}
.alb-q-img {
    width: 96px;
    height: 54px;
    object-fit: contain;
    background: #0d0d0e;
    display: block;
}
.alb-q-name {
    font-size: 0.8rem;
    font-weight: 600;
    color: var(--ink);
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}
.alb-q-meta {
    font-size: 0.7rem;
    color: rgba(224, 224, 224, 0.55);
    margin-top: 0.1rem;
}
.alb-q-meta .is-warn { color: #ffc107; }
.alb-q-state {
    font-size: 0.72rem;
    font-weight: 600;
    white-space: nowrap;
    display: inline-flex;
    align-items: center;
    gap: 0.35rem;
    color: rgba(224, 224, 224, 0.55);
}
.alb-q.is-done  .alb-q-state { color: #51cf66; }
.alb-q.is-error .alb-q-state { color: #ff6b6b; white-space: normal; max-width: 180px; text-align: right; }
.alb-q.is-up    .alb-q-state { color: var(--accent); }
.alb-q.is-error { border-color: rgba(255, 59, 48, 0.3); }
.alb-q-x {
    border: 0;
    background: transparent;
    color: rgba(224, 224, 224, 0.5);
    padding: 0.2rem 0.35rem;
    cursor: pointer;
}
.alb-q-x:hover { color: #ff6b6b; }
/* Retry a failed upload in place (one-step uploads, 2026-11-19). */
.alb-q-retry {
    display: inline-flex;
    align-items: center;
    gap: 0.3rem;
    border: 1px solid var(--line-soft);
    background: transparent;
    color: var(--ink);
    font-size: 0.72rem;
    font-weight: 600;
    padding: 0.2rem 0.5rem;
    cursor: pointer;
}
.alb-q-retry:hover, .alb-q-retry:focus-visible { border-color: var(--accent); color: var(--accent); }
.alb-q-retry[hidden] { display: none; }
.alb-q-bar {
    position: absolute;
    left: 0;
    bottom: 0;
    height: 2px;
    width: 0;
    background: var(--accent);
    transition: width .15s;
}
.alb-q.is-done .alb-q-bar { background: #51cf66; }

.alb-upload-foot {
    border-top: 1px solid var(--line-soft);
    gap: 0.5rem;
}
.alb-queue-sum {
    margin-right: auto;
    font-size: 0.74rem;
    color: rgba(224, 224, 224, 0.6);
}

@media (max-width: 576px) {
    .alb-q { grid-template-columns: 64px minmax(0, 1fr) auto; }
    .alb-q-img { width: 64px; height: 36px; }
}

/* ============================================================================
   Styled delete-confirm dialog (albConfirm). Lives outside .alb-wrap, so it
   uses literal colours rather than the .alb-wrap-scoped custom properties.
   ============================================================================ */
.alb-btn-danger {
    background: #ff3b30;
    color: #fff;
    border: 1px solid transparent;
}
.alb-btn-danger:hover { background: #e23129; color: #fff; }
.alb-confirm .modal-title i { color: #ffb020; }
.alb-confirm .alb-confirm-msg {
    margin: 0;
    font-size: 0.88rem;
    line-height: 1.55;
    color: rgba(224, 224, 224, 0.8);
}

/* ============================================================================
   Phones, tablets and touch (docs/MOBILE.md, WP-ALBUMS).
   Desktop (1200px and up, fine pointer) never matches anything below except
   the hidden kebab chip and the action sheet, which only open on phones.
   ============================================================================ */

/* Kebab chip: a single "more" button that replaces a row of action chips on
   phones (built into the view only where there is more than one action). */
.alb-kebab { display: none; }

/* Action sheet opened by the kebab (Bootstrap offcanvas, shell .vt-sheet look). */
.alb-sheet-list {
    display: flex;
    flex-direction: column;
    gap: 6px;
    max-width: 480px;
    margin: 0 auto;
}
.alb-sheet-item {
    appearance: none;
    display: flex;
    align-items: center;
    gap: 0.85rem;
    width: 100%;
    min-height: 48px;
    padding: 0 1rem;
    background: #1b1b1d;
    border: 1px solid rgba(255, 255, 255, 0.06);
    border-radius: 0;
    color: #e0e0e0;
    font-size: 0.95rem;
    font-weight: 600;
    text-align: left;
}
.alb-sheet-item i { width: 1.1rem; color: #ff9900; text-align: center; }
.alb-sheet-item.danger,
.alb-sheet-item.danger i { color: #ff6b74; }
.alb-sheet-item:hover,
.alb-sheet-item:focus-visible { background: #212123; color: #fff; }

/* Touch: everything revealed by :hover is simply visible, and nothing lifts
   or zooms on tap (a tap leaves :hover stuck on the last tile). */
@media (hover: none), (any-pointer: coarse) {
    .alb-tile-actions,
    .alb-card-actions {
        opacity: 1;
        transform: none;
    }
    .alb-action {
        width: 40px;
        height: 40px;
        font-size: 0.85rem;
    }
    .alb-action:hover { transform: none; }
    .alb-tile-cap {
        opacity: 1;
        transform: none;
    }
    .alb-tile:hover,
    .alb-card:hover { transform: none; }
    .alb-tile:hover img { transform: none; }
    .alb-modal .btn-close { filter: invert(1) opacity(0.8); }
}

/* Bigger stars wherever a vote is a tap. */
@media (hover: none), (any-pointer: coarse), (max-width: 767.98px) {
    .alb-rating { flex-wrap: wrap; row-gap: 0; }
    .alb-rating.is-interactive .alb-stars { gap: 0; }
    .alb-rating.is-interactive .alb-stars i {
        font-size: 1.05rem;
        padding: 0.35rem 0.2rem;
    }
    .alb-rating.is-interactive .alb-stars i:hover { transform: none; }
}

/* Text floor below the desktop layout (MOBILE.md answer 3). */
@media (max-width: 1199.98px) {
    .alb-back,
    .alb-header-sub,
    .alb-stat-h,
    .alb-stat-pct,
    .alb-card-meta,
    .alb-tile-flag,
    .alb-label,
    .alb-btn,
    .alb-award,
    .alb-wm-label,
    .alb-lb-counter,
    .alb-lb-share-lbl { font-size: var(--vt-fs-floor, 0.6875rem); }
}

/* Phones and touch: hit areas for the page's own controls. */
@media (max-width: 767.98px), (hover: none), (any-pointer: coarse) {
    /* Back link: 44px tall hit area, same visual position. */
    .alb-back {
        min-height: 44px;
        padding: 0 0.75rem 0 0;
        margin: -15px 0;
    }
    .alb-back:hover { transform: none; }
    .alb-btn {
        min-height: 44px;
        justify-content: center;
    }
}

@media (max-width: 767.98px) {
    /* Tracked uppercase labels: less tracking so they stay narrow. */
    .alb-back,
    .alb-header-sub,
    .alb-stat-h,
    .alb-card-meta,
    .alb-tile-flag,
    .alb-label,
    .alb-btn,
    .alb-lb-counter { letter-spacing: 0.12em; }

    /* Header actions: one full-width row of equal buttons. */
    .alb-header-r {
        display: grid;
        grid-auto-flow: column;
        grid-auto-columns: minmax(0, 1fr);
        gap: 0.5rem;
    }

    /* Quota strip: one row, the image meter gets the wider cell. */
    .alb-stats { grid-template-columns: minmax(0, 1.6fr) minmax(0, 1fr); gap: 0.55rem; }
    .alb-stat { padding: 0.65rem 0.75rem 0.75rem; }
    .alb-stat-val { font-size: 1.2rem; }

    /* Several actions collapse into the kebab chip. */
    .has-menu > .alb-action:not(.alb-kebab) { display: none; }
    .has-menu > .alb-kebab { display: inline-flex; }
    .alb-tile-actions,
    .alb-card-actions { top: 0.35rem; right: 0.35rem; }

    /* Rating overlay on a 160px tile: tighter so five stars fit. */
    .alb-tile > .alb-rating { padding: 0.15rem 0.35rem 0.2rem; }
    .alb-tile > .alb-rating.is-interactive .alb-stars i { padding: 0.35rem 0.12rem; }
    .alb-tile:has(> .alb-rating) .alb-tile-cap { bottom: 2.4rem; }

    /* Viewer: arrows become chips beside the toolbar, off the photo. */
    .alb-lb {
        grid-template-columns: auto minmax(0, 1fr) auto;
        grid-template-areas:
            "top  top   top"
            "stage stage stage"
            "prev bar   next";
    }
    .alb-lb-nav,
    .alb-lb-nav:hover {
        position: static;
        transform: none;
        width: 40px;
        height: 40px;
        align-self: end;
    }
    .alb-lb-nav.prev { margin: 0 0 calc(1rem + var(--vt-safe-b, 0px)) 0.6rem; }
    .alb-lb-nav.next { margin: 0 0.6rem calc(1rem + var(--vt-safe-b, 0px)) 0; }
    .alb-lb-bar { padding: 0.6rem 0.5rem calc(1rem + var(--vt-safe-b, 0px)); gap: 0.6rem; }
    .alb-lb-cap { max-width: 100%; }
    .alb-lb-sbtn { height: 40px; min-width: 40px; white-space: nowrap; }
    .alb-lb-top { padding: calc(0.75rem + var(--vt-safe-t, 0px)) 0.75rem 0.3rem; }
    .alb-lb-close { width: 44px; height: 44px; }
}

/* Viewer in short landscape (phones on their side): slim top and toolbar so
   the photo keeps the height, caption on one line. */
@media (max-height: 500px) {
    .alb-lb-top { padding: 0.4rem calc(0.8rem + var(--vt-safe-r, 0px)) 0 calc(0.8rem + var(--vt-safe-l, 0px)); }
    .alb-lb-close { width: 40px; height: 40px; }
    .alb-lb-nav { width: 40px; height: 40px; }
    .alb-lb-stage { padding: 0.25rem; }
    .alb-lb-bar {
        flex-wrap: nowrap;
        gap: 0.75rem;
        padding: 0.3rem calc(0.9rem + var(--vt-safe-r, 0px)) calc(0.4rem + var(--vt-safe-b, 0px)) calc(0.9rem + var(--vt-safe-l, 0px));
    }
    .alb-lb-bar-l { flex-wrap: nowrap; }
    .alb-lb-cap {
        max-width: 40vw;
        overflow: hidden;
        text-overflow: ellipsis;
        white-space: nowrap;
    }
    .alb-lb-sbtn { height: 40px; min-width: 40px; }
    .alb-lb-share-lbl { display: none; }
}

@media (max-width: 575.98px) {
    /* Five share buttons fit between the arrows only as icons. */
    .alb-lb-sbtn .js-copy-txt { display: none; }
    .alb-lb-sbtn { padding: 0; }
}

/* One photo: nothing to page through. */
.alb-lb.is-single .alb-lb-nav { visibility: hidden; }
