/* Design: see new-design-php/docs/design-system.md + page-patterns.md */
/* ==========================================================================
   HOTPIC — index (upload / home) page redesign — PREVIEW BUILD
   Loaded by preview/index-demo.html together with ../assets/css/chrome.css
   (header + bottom nav) and bootstrap. All classes are hp-* so the block can
   be moved into chrome.css / a home stylesheet unchanged.
   ========================================================================== */

.hp-home {
    --hp-accent: var(--hp-color-accent);
    --hp-accent-strong: var(--hp-color-accent-mid);
    --hp-accent-deep: var(--hp-color-accent-deep);
    --hp-card-bg: linear-gradient(180deg, rgba(var(--hp-color-white-rgb), 0.058) 0%, rgba(var(--hp-color-white-rgb), 0.018) 100%);
    --hp-card-border: var(--hp-color-border);
    --hp-muted: var(--hp-color-text-muted);
    --hp-soft: rgba(var(--hp-color-white-rgb), 0.72);
    color: var(--hp-color-white);
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
}

.hp-home *,
.hp-home *::before,
.hp-home *::after {
    box-sizing: border-box;
}

.hp-shell {
    width: 100%;
    max-width: 1320px;
    margin: 0 auto;
    padding: 0 16px 56px;
}

/* ---------- hero ---------- */
.hp-hero {
    padding: 26px 0 22px;
    text-align: center;
}

.hp-eyebrow {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 6px 12px;
    border: 1px solid var(--hp-card-border);
    border-radius: 999px;
    background: rgba(var(--hp-color-white-rgb), 0.04);
    color: var(--hp-color-accent-soft);
    font-size: 11px;
    font-weight: 700;
    letter-spacing: 0.1em;
    text-transform: uppercase;
}

.hp-eyebrow::before {
    content: "";
    width: 6px;
    height: 6px;
    border-radius: 50%;
    background: var(--hp-accent);
    box-shadow: 0 0 0 4px rgba(var(--hp-color-accent-rgb), 0.22);
}

.hp-title {
    margin: 16px 0 8px;
    font-size: clamp(28px, 6.4vw, 46px);
    line-height: 1.06;
    letter-spacing: -0.03em;
    font-weight: 800;
}

.hp-title em {
    font-style: normal;
    background: linear-gradient(92deg, var(--hp-color-accent-soft) 0%, var(--hp-color-accent) 55%, var(--hp-color-accent-deep) 100%);
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
    color: transparent;
}

.hp-sub {
    margin: 0 auto;
    max-width: 560px;
    color: var(--hp-muted);
    font-size: 14px;
    line-height: 1.55;
}

.hp-sub b {
    color: var(--hp-soft);
    font-weight: 600;
}

/* ---------- glass card ---------- */
.hp-card {
    position: relative;
    border: 1px solid var(--hp-card-border);
    border-radius: 24px;
    background: var(--hp-card-bg);
    box-shadow: 0 18px 48px rgba(var(--hp-color-black-rgb), 0.42), inset 0 1px 0 rgba(var(--hp-color-white-rgb), 0.07);
    overflow: hidden;
}

.hp-card + .hp-card {
    margin-top: 16px;
}

.hp-card__head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    padding: 16px 18px 0;
}

.hp-card__title {
    margin: 0;
    font-size: 13px;
    font-weight: 700;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    color: var(--hp-color-accent-soft);
}

.hp-card__body {
    padding: 16px 18px 18px;
}

/* ---------- media segmented control (topview tab style) ---------- */
.hp-seg {
    position: relative;
    display: inline-flex;
    align-items: center;
    gap: 2px;
    padding: 4px;
    border-radius: 999px;
    background: rgba(var(--hp-color-white-rgb), 0.05);
    border: 1px solid rgba(var(--hp-color-white-rgb), 0.06);
    box-shadow: inset 0 1px 0 rgba(var(--hp-color-white-rgb), 0.06);
}

.hp-seg__thumb {
    position: absolute;
    top: 4px;
    left: 0;
    height: 32px;
    width: 0;
    border-radius: 999px;
    background: linear-gradient(180deg,
            rgba(var(--hp-color-white-rgb), 0.08) 0%,
            rgba(var(--hp-color-white-rgb), 0.05) 52%,
            rgba(var(--hp-color-white-rgb), 0.18) 100%);
    box-shadow: inset 0 1px 0 rgba(var(--hp-color-white-rgb), 0.24);
    transition: transform 0.3s cubic-bezier(0.22, 1, 0.36, 1),
        width 0.3s cubic-bezier(0.22, 1, 0.36, 1);
    pointer-events: none;
}

.hp-seg__btn {
    position: relative;
    z-index: 1;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    height: 32px;
    padding: 0 14px;
    border: 0;
    border-radius: 999px;
    background: none;
    color: rgba(var(--hp-color-white-rgb), 0.5);
    font-size: 13px;
    font-weight: 500;
    line-height: 1;
    cursor: pointer;
    transition: color 0.3s ease;
}

.hp-seg__btn svg {
    width: 16px;
    height: 16px;
}

.hp-seg__btn[aria-selected="true"] {
    color: var(--hp-color-white);
}

.hp-seg__wrap {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    flex-wrap: wrap;
    margin-bottom: 14px;
}

.hp-seg__hint {
    color: var(--hp-muted);
    font-size: 12px;
}

/* ---------- upload dropzone ---------- */
.hp-drop {
    position: relative;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 10px;
    min-height: 236px;
    padding: 26px 18px;
    border: 1.5px dashed rgba(var(--hp-color-accent-rgb), 0.42);
    border-radius: 20px;
    background-color: #111113;
    background-image: url("/assets/img/logo/hotpic-dropzone-textured.svg");
    background-size: cover;
    background-position: center;
    background-repeat: no-repeat;
    text-align: center;
    cursor: pointer;
    transition: border-color 0.2s ease, background-color 0.2s ease, transform 0.2s ease;
}

.hp-drop:hover,
.hp-drop.is-drag {
    border-color: rgba(var(--hp-color-accent-rgb), 0.85);
    background-image: radial-gradient(90% 120% at 50% 0%, rgba(var(--hp-color-accent-rgb), 0.18) 0%, transparent 65%), url("/assets/img/logo/hotpic-dropzone-textured.svg");
}

.hp-drop.is-drag {
    transform: scale(0.995);
}

.hp-drop__icon {
    display: grid;
    place-items: center;
    width: 60px;
    height: 60px;
    padding: 0;
    border: 0;
    border-radius: 50%;
    background: linear-gradient(180deg, var(--hp-color-accent) 0%, var(--hp-color-accent-mid) 48%, var(--hp-color-accent-deep) 100%);
    box-shadow: 0 4px 8px rgba(var(--hp-color-black-rgb), 0.28), 0 10px 22px rgba(var(--hp-color-accent-deep-rgb), 0.22), 0 18px 36px rgba(var(--hp-color-accent-rgb), 0.12);
    color: inherit;
    font: inherit;
    cursor: pointer;
    -webkit-appearance: none;
    appearance: none;
    transition: transform 0.15s ease, box-shadow 0.2s ease;
}

.hp-drop__icon:hover,
.hp-drop__icon:focus-visible {
    box-shadow: 0 6px 12px rgba(var(--hp-color-black-rgb), 0.3), 0 14px 30px rgba(var(--hp-color-accent-deep-rgb), 0.34), 0 22px 42px rgba(var(--hp-color-accent-rgb), 0.18);
}

.hp-drop__icon:active {
    transform: scale(0.96);
}

.hp-drop__icon:focus-visible {
    outline: 2px solid var(--hp-color-accent-soft);
    outline-offset: 3px;
}

.hp-drop__icon svg {
    width: 26px;
    height: 26px;
    stroke: var(--hp-color-white);
}

.hp-drop__title {
    margin: 4px 0 0;
    font-size: 17px;
    font-weight: 700;
    letter-spacing: -0.01em;
}

.hp-drop__limits {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 6px;
    margin-top: 8px;
}

.hp-chip {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 5px 10px;
    border: 1px solid var(--hp-color-border-soft);
    border-radius: 999px;
    background: rgba(var(--hp-color-white-rgb), 0.035);
    color: var(--hp-muted);
    font-size: 11px;
    font-weight: 500;
    white-space: nowrap;
}

.hp-chip b {
    color: var(--hp-soft);
    font-weight: 600;
}

/* selected files */
.hp-files {
    margin-top: 14px;
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.hp-file {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 8px;
    border: 1px solid rgba(var(--hp-color-white-rgb), 0.08);
    border-radius: 12px;
    background: rgba(var(--hp-color-white-rgb), 0.035);
}

.hp-file img {
    width: 42px;
    height: 42px;
    border-radius: 8px;
    object-fit: cover;
    background: var(--hp-color-elevated);
}

.hp-file__meta {
    flex: 1;
    min-width: 0;
}

.hp-file__name {
    display: block;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    font-size: 12.5px;
    font-weight: 600;
}

.hp-file__size {
    display: block;
    margin-top: 2px;
    color: var(--hp-muted);
    font-size: 11px;
}

.hp-file__bar {
    width: 64px;
    height: 4px;
    border-radius: 4px;
    background: var(--hp-color-border-on-glass);
    overflow: hidden;
}

.hp-file__bar i {
    display: block;
    height: 100%;
    width: 100%;
    border-radius: inherit;
    background: linear-gradient(90deg, var(--hp-color-accent), var(--hp-color-accent-soft));
}

.hp-file__x {
    display: grid;
    place-items: center;
    width: 28px;
    height: 28px;
    border: 0;
    border-radius: 8px;
    background: none;
    color: rgba(var(--hp-color-white-rgb), 0.45);
    font-size: 16px;
    line-height: 1;
    cursor: pointer;
}

.hp-file__x:hover {
    background: rgba(var(--hp-color-white-rgb), 0.07);
    color: var(--hp-color-white);
}

.hp-files__summary {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
    margin-top: 10px;
    color: var(--hp-muted);
    font-size: 12px;
}

.hp-files__summary b {
    color: var(--hp-soft);
}

/* ---------- form ---------- */
.hp-field + .hp-field {
    margin-top: 14px;
}

.hp-label {
    display: flex;
    align-items: baseline;
    justify-content: space-between;
    gap: 8px;
    margin-bottom: 7px;
    font-size: 12px;
    font-weight: 600;
    letter-spacing: 0.02em;
    color: var(--hp-soft);
}

.hp-label small {
    color: rgba(var(--hp-color-white-rgb), 0.35);
    font-size: 11px;
    font-weight: 500;
}

.hp-input,
.hp-textarea {
    display: block;
    width: 100%;
    border: 1px solid var(--hp-color-border);
    border-radius: 12px;
    background: rgba(var(--hp-color-white-rgb), 0.035);
    color: var(--hp-color-white);
    font-size: 14px;
    line-height: 1.45;
    transition: border-color 0.18s ease, box-shadow 0.18s ease, background 0.18s ease;
}

.hp-input {
    height: 46px;
    padding: 0 14px;
}

.hp-textarea {
    min-height: 92px;
    padding: 12px 14px;
    resize: vertical;
}

.hp-input::placeholder,
.hp-textarea::placeholder {
    color: var(--hp-color-text-faint);
}

.hp-input:focus,
.hp-textarea:focus {
    outline: none;
    border-color: rgba(var(--hp-color-accent-rgb), 0.75);
    background: rgba(var(--hp-color-accent-rgb), 0.07);
    box-shadow: 0 0 0 3px rgba(var(--hp-color-accent-rgb), 0.18);
}

/* category pills */
.hp-pills {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}

.hp-pill {
    position: relative;
    display: inline-flex;
    align-items: center;
    gap: 6px;
    height: 34px;
    padding: 0 13px;
    border: 1px solid var(--hp-color-border);
    border-radius: 999px;
    background: rgba(var(--hp-color-white-rgb), 0.03);
    color: rgba(var(--hp-color-white-rgb), 0.62);
    font-size: 12.5px;
    font-weight: 500;
    cursor: pointer;
    user-select: none;
    transition: border-color 0.15s ease, background 0.15s ease, color 0.15s ease;
}

.hp-pill input {
    position: absolute;
    opacity: 0;
    pointer-events: none;
}

.hp-pill:hover {
    border-color: rgba(var(--hp-color-white-rgb), 0.22);
    color: var(--hp-color-white);
}

.hp-pill:has(input:checked) {
    border-color: rgba(var(--hp-color-accent-rgb), 0.7);
    background: rgba(var(--hp-color-accent-rgb), 0.14);
    color: var(--hp-color-white);
    box-shadow: 0 0 0 3px rgba(var(--hp-color-accent-rgb), 0.12);
}

.hp-pill i {
    width: 6px;
    height: 6px;
    border-radius: 50%;
    background: currentColor;
    opacity: 0.5;
}

.hp-help {
    margin: 6px 0 0;
    color: rgba(var(--hp-color-white-rgb), 0.38);
    font-size: 11.5px;
}

/* toggles */
.hp-toggle {
    display: flex;
    align-items: flex-start;
    gap: 12px;
    padding: 12px 0;
}

.hp-toggle + .hp-toggle {
    border-top: 1px solid rgba(var(--hp-color-white-rgb), 0.06);
}

.hp-switch {
    position: relative;
    flex-shrink: 0;
    width: 44px;
    height: 26px;
    margin-top: 1px;
}

.hp-switch input {
    position: absolute;
    inset: 0;
    opacity: 0;
    margin: 0;
    cursor: pointer;
    z-index: 1;
}

.hp-switch span {
    position: absolute;
    inset: 0;
    border-radius: 999px;
    background: var(--hp-color-border-on-glass);
    border: 1px solid var(--hp-color-border);
    transition: background 0.18s ease;
}

.hp-switch span::after {
    content: "";
    position: absolute;
    top: 3px;
    left: 3px;
    width: 18px;
    height: 18px;
    border-radius: 50%;
    background: var(--hp-color-white);
    transition: transform 0.18s cubic-bezier(0.22, 1, 0.36, 1);
}

.hp-switch input:checked + span {
    background: linear-gradient(180deg, var(--hp-color-accent), var(--hp-color-accent-deep));
    border-color: rgba(var(--hp-color-accent-rgb), 0.8);
}

.hp-switch input:checked + span::after {
    transform: translateX(18px);
}

.hp-switch input:focus-visible + span {
    box-shadow: 0 0 0 3px rgba(var(--hp-color-accent-rgb), 0.3);
}

.hp-toggle__text b {
    display: block;
    font-size: 13px;
    font-weight: 600;
}

.hp-toggle__text small {
    display: block;
    margin-top: 2px;
    color: var(--hp-muted);
    font-size: 11.5px;
    line-height: 1.45;
}

.hp-reveal {
    display: none;
    margin: 4px 0 6px;
}

.hp-reveal.is-open {
    display: block;
}

/* guidelines */
.hp-note {
    display: flex;
    gap: 10px;
    align-items: flex-start;
    padding: 12px 14px;
    border: 1px solid rgba(var(--hp-color-warning-rgb), 0.22);
    border-radius: 14px;
    background: rgba(var(--hp-color-warning-rgb), 0.06);
    color: rgba(var(--hp-color-warning-text-rgb), 0.86);
    font-size: 12px;
    line-height: 1.5;
}

.hp-note svg {
    flex-shrink: 0;
    width: 16px;
    height: 16px;
    margin-top: 1px;
    stroke: var(--hp-color-warning-soft);
}

.hp-note a {
    color: var(--hp-color-warning-text-soft);
    font-weight: 600;
    text-decoration: underline;
    text-underline-offset: 2px;
}

/* primary CTA */
.hp-cta {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    width: 100%;
    height: 54px;
    margin-top: 16px;
    border: 0;
    border-radius: 16px;
    background: linear-gradient(180deg, var(--hp-color-accent) 0%, var(--hp-color-accent-mid) 48%, var(--hp-color-accent-deep) 100%);
    color: var(--hp-color-white);
    font-size: 15px;
    font-weight: 700;
    letter-spacing: 0.01em;
    cursor: pointer;
    box-shadow: 0 10px 26px rgba(var(--hp-color-accent-deep-rgb), 0.35), inset 0 1px 0 rgba(var(--hp-color-white-rgb), 0.24);
    transition: transform 0.15s ease, box-shadow 0.2s ease, opacity 0.2s ease;
}

.hp-cta:hover {
    box-shadow: 0 14px 34px rgba(var(--hp-color-accent-deep-rgb), 0.5), inset 0 1px 0 rgba(var(--hp-color-white-rgb), 0.24);
}

.hp-cta:active {
    transform: scale(0.99);
}

.hp-cta[disabled] {
    opacity: 0.45;
    cursor: not-allowed;
    box-shadow: none;
}

.hp-cta svg {
    width: 18px;
    height: 18px;
    stroke: var(--hp-color-white);
}

.hp-cta-note {
    margin: 8px 0 0;
    color: rgba(var(--hp-color-white-rgb), 0.34);
    font-size: 11px;
    text-align: center;
}

/* ---------- upload CTA placement ----------
   Desktop: the CTA closes the upload card, above the album details column.
   Phones: the card stack is a single column, so the CTA moves to the bottom
   of the Album details card instead — the title/category are read and filled
   before the user presses upload. Only one of the two blocks is ever visible. */
.hp-cta-block--mobile {
    display: none;
}

@media screen and (max-width: 767.98px) {
    .hp-cta-block:not(.hp-cta-block--mobile) {
        display: none;
    }

    .hp-cta-block--mobile {
        display: block;
        margin: 24px 0 2px;
    }

    .hp-cta-block--mobile .hp-cta {
        width: 100%;
    }
}

/* ---------- layout ---------- */
.hp-grid {
    display: grid;
    grid-template-columns: minmax(0, 1fr);
    gap: 16px;
}

.hp-aside {
    display: flex;
    flex-direction: column;
    gap: 16px;
}

.hp-aside .hp-card + .hp-card {
    margin-top: 0;
}

.hp-feature {
    display: flex;
    gap: 10px;
    align-items: flex-start;
    padding: 8px 0;
    color: var(--hp-soft);
    font-size: 12.5px;
    line-height: 1.45;
}

.hp-feature + .hp-feature {
    border-top: 1px solid rgba(var(--hp-color-white-rgb), 0.06);
}

.hp-feature__icon {
    display: grid;
    place-items: center;
    flex-shrink: 0;
    width: 30px;
    height: 30px;
    border-radius: 9px;
    background: rgba(var(--hp-color-accent-rgb), 0.14);
    border: 1px solid rgba(var(--hp-color-accent-rgb), 0.24);
    color: var(--hp-color-accent-soft);
}

.hp-feature__icon svg {
    width: 15px;
    height: 15px;
    stroke: currentColor;
}

.hp-feature b {
    display: block;
    font-size: 12.5px;
    color: var(--hp-color-white);
}

.hp-feature small {
    display: block;
    margin-top: 1px;
    color: var(--hp-muted);
    font-size: 11.5px;
}

/* explore links */
.hp-explore {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.hp-explore a {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 11px 12px;
    border: 1px solid rgba(var(--hp-color-white-rgb), 0.08);
    border-radius: 14px;
    background: rgba(var(--hp-color-white-rgb), 0.025);
    color: var(--hp-color-white);
    text-decoration: none;
    transition: border-color 0.18s ease, background 0.18s ease;
}

.hp-explore a:hover {
    border-color: rgba(var(--hp-color-accent-rgb), 0.45);
    background: rgba(var(--hp-color-accent-rgb), 0.08);
}

.hp-explore__icon {
    display: grid;
    place-items: center;
    width: 34px;
    height: 34px;
    border-radius: 10px;
    background: rgba(var(--hp-color-white-rgb), 0.06);
    border: 1px solid rgba(var(--hp-color-white-rgb), 0.08);
}

.hp-explore__icon svg {
    width: 17px;
    height: 17px;
    stroke: var(--hp-color-accent-soft);
}

.hp-explore__text {
    flex: 1;
    min-width: 0;
}

.hp-explore__text b {
    display: block;
    font-size: 13px;
    font-weight: 600;
}

.hp-explore__text small {
    display: block;
    color: var(--hp-muted);
    font-size: 11px;
}

.hp-explore__arrow {
    color: rgba(var(--hp-color-white-rgb), 0.35);
    font-size: 16px;
}

/* account row */
.hp-account {
    display: flex;
    align-items: center;
    gap: 12px;
}

.hp-account__avatar {
    display: grid;
    place-items: center;
    width: 40px;
    height: 40px;
    border-radius: 50%;
    background: linear-gradient(180deg, var(--hp-color-accent), var(--hp-color-accent-deep));
    color: var(--hp-color-white);
    font-size: 15px;
    font-weight: 700;
    flex-shrink: 0;
}

.hp-account__text {
    flex: 1;
    min-width: 0;
}

.hp-account__text b {
    display: block;
    font-size: 13px;
}

.hp-account__text small {
    display: block;
    color: var(--hp-muted);
    font-size: 11.5px;
}

.hp-login-pill {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    height: 36px;
    padding: 0 18px;
    border-radius: 999px;
    background: var(--hp-color-white);
    color: var(--hp-color-canvas-soft);
    font-size: 13px;
    font-weight: 700;
    text-decoration: none;
    white-space: nowrap;
}

/* footer (preview only — production keeps bootstrap footer) */
.hp-footer {
    margin-top: 34px;
    padding-top: 18px;
    border-top: 1px solid rgba(var(--hp-color-white-rgb), 0.07);
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 8px 18px;
    color: rgba(var(--hp-color-white-rgb), 0.38);
    font-size: 12px;
}

.hp-footer a {
    color: rgba(var(--hp-color-white-rgb), 0.55);
    text-decoration: none;
}

.hp-footer a:hover {
    color: var(--hp-color-white);
}

/* ---------- desktop ---------- */
@media screen and (min-width: 768px) {
    .hp-shell {
        padding: 0 24px 64px;
    }

    .hp-hero {
        padding: 32px 0 28px;
    }

    .hp-grid {
        grid-template-columns: minmax(0, 1fr) 344px;
        align-items: start;
        gap: 20px;
    }

    .hp-aside {
        position: sticky;
        top: 96px;
    }

    .hp-drop {
        min-height: 280px;
    }

    .hp-card__body {
        padding: 18px 22px 22px;
    }

    .hp-card__head {
        padding: 18px 22px 0;
    }
}

/* tiny phones */
@media screen and (max-width: 359px) {
    .hp-seg__btn {
        padding: 0 10px;
        font-size: 12px;
    }
}

/* ==========================================================================
   PRODUCTION ADDITIONS — real index.php states (Dropzone, alerts, blocked,
   SEO copy, footer spacing). The rest above is the shared design system.
   ========================================================================== */

/* bootstrap alerts inside the upload page → glass notes */
.hp-home .alert {
    display: flex;
    align-items: flex-start;
    gap: 10px;
    margin: 0 0 12px;
    padding: 12px 14px;
    border: 1px solid var(--hp-color-border);
    border-left: 3px solid var(--hp-color-accent);
    border-radius: 14px;
    background: rgba(var(--hp-color-white-rgb), .045);
    color: var(--hp-soft);
    font-size: 12.5px;
    line-height: 1.5;
}

.hp-home .alert-info {
    border-left-color: var(--hp-color-accent);
    background: rgba(var(--hp-color-accent-rgb), .08);
}

.hp-home .alert-warning {
    border-left-color: var(--hp-color-warning);
    background: rgba(var(--hp-color-warning-rgb), .07);
    color: var(--hp-color-warning-text);
}

.hp-home .alert-danger {
    border-left-color: var(--hp-color-danger);
    background: rgba(var(--hp-color-danger-rgb), .08);
    color: var(--hp-color-danger-text-soft);
}

.hp-home .alert-success {
    border-left-color: var(--hp-color-success);
    background: rgba(var(--hp-color-success-rgb), .08);
    color: var(--hp-color-success-text-soft);
}

.hp-home .alert a {
    color: var(--hp-color-accent-soft);
    text-decoration: underline;
    text-underline-offset: 2px;
}

.hp-home .alert-dismissible {
    padding-right: 38px;
}

.hp-home .alert .btn-close {
    filter: invert(1) grayscale(1);
    opacity: .55;
}

/* blocked / warning account state */
.hp-blocked {
    display: flex;
    align-items: center;
    gap: 14px;
    padding: 18px;
    border: 1px solid var(--hp-card-border);
    border-left: 3px solid var(--warn, var(--hp-color-warning));
    border-radius: 16px;
    background: rgba(var(--hp-color-white-rgb), .04);
}

.hp-blocked__icon {
    flex-shrink: 0;
    width: 42px;
    height: 42px;
    display: grid;
    place-items: center;
    border-radius: 12px;
    background: rgba(var(--hp-color-white-rgb), .05);
    color: var(--warn, var(--hp-color-warning));
}

.hp-blocked__icon svg {
    width: 22px;
    height: 22px;
}

.hp-blocked__icon .hp-icon {
    fill: none;
    stroke: currentColor;
}

.hp-blocked__body h5 {
    margin: 0 0 3px;
    font-size: 14px;
    font-weight: 700;
    color: var(--warn, var(--hp-color-warning));
}

.hp-blocked__body p {
    margin: 0;
    color: var(--hp-muted);
    font-size: 12.5px;
    line-height: 1.5;
}

/* real Dropzone element becomes the glass drop area */
.hp-drop.dropzone {
    display: flex;
    flex-direction: column;
    align-items: center;
    min-height: 236px;
    padding: 26px 18px;
    border: 1.5px dashed rgba(var(--hp-color-accent-rgb), .42);
    border-radius: 20px;
    background-color: #111113;
    background-image: url("/assets/img/logo/hotpic-dropzone-textured.svg");
    background-size: cover;
    background-position: center;
    background-repeat: no-repeat;
    cursor: pointer;
}

.hp-drop.dropzone:hover,
.hp-drop.dropzone.dz-drag-hover {
    border-color: rgba(var(--hp-color-accent-rgb), .85);
    background-image: radial-gradient(90% 120% at 50% 0%, rgba(var(--hp-color-accent-rgb), .18) 0%, transparent 65%), url("/assets/img/logo/hotpic-dropzone-textured.svg");
}

/* once files are queued the empty-state artwork would only fight with the
   preview tiles, so it drops away (same moment the prompt text is hidden) */
.hp-drop.dropzone.dz-started {
    background-image: none;
}
.hp-drop.dropzone .dz-message {
    /* the legacy dropzone.css ships a 50vh default message — we provide our
       own prompt, so hide it (it is also hidden by Dropzone once files start) */
    display: none !important;
}

.hp-drop.dropzone .dz-preview {
    position: static;
    display: flex;
    align-items: center;
    gap: 10px;
    float: none;
    width: 100%;
    min-height: 0;
    margin: 8px 0 0;
    padding: 8px;
    border: 1px solid rgba(var(--hp-color-white-rgb), .08);
    border-radius: 12px;
    background: rgba(var(--hp-color-white-rgb), .035);
    text-align: left;
}

.hp-drop.dropzone .dz-preview .dz-image {
    flex-shrink: 0;
    width: 42px;
    height: 42px;
    border-radius: 8px;
    overflow: hidden;
    background: var(--hp-color-elevated);
}

.hp-drop.dropzone .dz-preview .dz-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}

.hp-drop.dropzone .dz-preview .dz-details {
    flex: 1;
    min-width: 0;
    padding: 0;
    opacity: 1;
    font-size: 12px;
    color: var(--hp-color-white);
    background: none;
    position: static;
}

.hp-drop.dropzone .dz-preview .dz-filename span,
.hp-drop.dropzone .dz-preview .dz-size span {
    display: block;
    padding: 0;
    background: none;
    color: var(--hp-soft);
    font-size: 12.5px;
    font-weight: 600;
}

.hp-drop.dropzone .dz-preview .dz-size span {
    margin-top: 2px;
    color: var(--hp-muted);
    font-size: 11px;
    font-weight: 400;
}

.hp-drop.dropzone .dz-preview .dz-progress {
    position: static;
    width: 64px;
    height: 4px;
    margin: 0;
    border: 0;
    border-radius: 4px;
    background: var(--hp-color-border-on-glass);
    overflow: hidden;
    opacity: 1;
}

.hp-drop.dropzone .dz-preview .dz-progress .dz-upload {
    display: block;
    height: 100%;
    width: 0;
    border-radius: inherit;
    background: linear-gradient(90deg, var(--hp-color-accent), var(--hp-color-accent-soft));
    transition: width .2s ease;
}

.hp-drop.dropzone .dz-preview.dz-success .dz-progress {
    opacity: 0;
}

.hp-drop.dropzone .dz-preview .dz-remove {
    flex-shrink: 0;
    display: grid;
    place-items: center;
    position: static;
    width: 28px;
    height: 28px;
    border: 0;
    border-radius: 8px;
    background: none;
    color: rgba(var(--hp-color-white-rgb), .45);
    cursor: pointer;
}

.hp-drop.dropzone .dz-preview .dz-remove:hover {
    background: rgba(var(--hp-color-white-rgb), .07);
    color: var(--hp-color-white);
}

.hp-drop.dropzone .dz-preview .dz-remove::after {
    content: "×";
    font-size: 17px;
    line-height: 1;
}

.hp-drop.dropzone .dz-preview .dz-error-message {
    position: static;
    margin: 0;
    padding: 0;
    border-radius: 0;
    background: none;
    color: var(--hp-color-danger-text-alt);
    font-size: 11px;
    opacity: 1;
}

/* hidden bootstrap form-check inputs we keep for JS */
.hp-home .form-check-input.d-none {
    display: none !important;
}

/* SEO paragraph on the real page */
.hp-seo {
    margin-top: 16px;
    padding: 18px 20px;
    border: 1px solid var(--hp-card-border);
    border-radius: 16px;
    background: rgba(var(--hp-color-white-rgb), .025);
}

.hp-seo p {
    margin: 0;
    color: rgba(var(--hp-color-white-rgb), .42);
    font-size: 12px;
    line-height: 1.65;
}

/* footer spacing when the production footer is used */
.hp-home + .footer,
.hp-home .footer {
    margin-top: 28px;
}

@media screen and (min-width: 768px) {
    .hp-drop.dropzone {
        min-height: 280px;
    }
}
/* spacing below the upload notice (.hp-note had no bottom margin) */
.hp-note {
    margin: 0 0 14px;
}
/* ==========================================================================
   Dropzone previews — grid of tiles (instead of one-per-row list)
   ========================================================================== */
.hp-drop.dropzone {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(132px, 1fr));
    justify-items: center;
    align-content: start;
    gap: 10px;
}

/* the empty-state prompt blocks stay full width + centred */
.hp-drop.dropzone > .hp-drop__icon,
.hp-drop.dropzone > .hp-drop__title,
.hp-drop.dropzone > .hp-drop__limits,
.hp-drop.dropzone > .dz-message {
    grid-column: 1 / -1;
    justify-self: center;
    text-align: center;
}

.hp-drop.dropzone .dz-preview {
    position: relative;
    float: none;
    display: flex;
    flex-direction: column;
    align-items: stretch;
    justify-self: stretch;
    gap: 6px;
    width: 100%;
    min-height: 0;
    margin: 0;
    padding: 8px;
    border: 1px solid rgba(var(--hp-color-white-rgb), .08);
    border-radius: 12px;
    background: rgba(var(--hp-color-white-rgb), .035);
    text-align: left;
}

.hp-drop.dropzone .dz-preview .dz-image {
    flex: none;
    width: 100%;
    height: auto;
    aspect-ratio: 1 / 1;
    border-radius: 9px;
    overflow: hidden;
    background: var(--hp-color-elevated);
}

.hp-drop.dropzone .dz-preview .dz-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}

.hp-drop.dropzone .dz-preview .dz-details {
    position: static;
    flex: none;
    width: 100%;
    padding: 0;
    opacity: 1;
    background: none;
    font-size: 11px;
    color: var(--hp-color-white);
}

.hp-drop.dropzone .dz-preview .dz-filename span,
.hp-drop.dropzone .dz-preview .dz-size span {
    display: block;
    padding: 0;
    background: none;
    font-size: 11.5px;
    font-weight: 600;
    color: var(--hp-soft);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.hp-drop.dropzone .dz-preview .dz-size span {
    margin-top: 2px;
    font-size: 10.5px;
    font-weight: 400;
    color: var(--hp-muted);
}

.hp-drop.dropzone .dz-preview .dz-progress {
    position: static;
    width: 100%;
    height: 4px;
    margin: 0;
    border: 0;
    border-radius: 4px;
    background: var(--hp-color-border-on-glass);
    overflow: hidden;
    opacity: 1;
}

.hp-drop.dropzone .dz-preview .dz-progress .dz-upload {
    display: block;
    height: 100%;
    width: 0;
    border-radius: inherit;
    background: linear-gradient(90deg, var(--hp-color-accent), var(--hp-color-accent-soft));
    transition: width .2s ease;
}

.hp-drop.dropzone .dz-preview .dz-remove {
    position: absolute;
    top: 4px;
    right: 4px;
    width: 24px;
    height: 24px;
    display: grid;
    place-items: center;
    border: 0;
    border-radius: 50%;
    background: rgba(var(--hp-color-black-rgb), .55);
    -webkit-backdrop-filter: blur(8px);
    backdrop-filter: blur(8px);
    color: rgba(var(--hp-color-white-rgb), .85);
    cursor: pointer;
    z-index: 2;
    opacity: 1;
}

.hp-drop.dropzone .dz-preview .dz-remove:hover {
    background: rgba(var(--hp-color-danger-rgb), .55);
    color: var(--hp-color-white);
}

.hp-drop.dropzone .dz-preview .dz-remove::after {
    content: "×";
    font-size: 15px;
    line-height: 1;
}

/* template also ships a FA icon span — hide it (no FA font loaded) */
.hp-drop.dropzone .dz-preview .dz-remove .fa {
    display: none;
}

/* error message spans the whole row */
.hp-drop.dropzone > .dz-error-message,
.hp-drop.dropzone .dz-preview .dz-error-message {
    grid-column: 1 / -1;
    position: static;
    margin: 0;
    padding: 0;
    background: none;
    border-radius: 0;
    color: var(--hp-color-danger-text-alt);
    font-size: 11px;
    opacity: 1;
    text-align: center;
}
/* ==========================================================================
   Dropzone tiles — hard overrides for the legacy dropzone.css (which draws an
   absolute hover overlay with white size/filename pills and a red text "remove")
   ========================================================================== */
.hp-drop.dropzone .dz-preview .dz-details,
.hp-drop.dropzone .dz-preview.dz-image-preview .dz-details {
    position: static !important;
    top: auto !important;
    left: auto !important;
    right: auto !important;
    bottom: auto !important;
    width: 100% !important;
    min-width: 0 !important;
    max-width: 100% !important;
    height: auto !important;
    margin: 0 !important;
    padding: 0 !important;
    opacity: 1 !important;
    z-index: auto !important;
    background: none !important;
    text-align: left !important;
    color: var(--hp-color-white) !important;
}

.hp-drop.dropzone .dz-preview .dz-details .dz-size,
.hp-drop.dropzone .dz-preview .dz-details .dz-filename {
    margin: 0 !important;
    font-size: 10.5px !important;
    line-height: 1.35 !important;
    white-space: nowrap !important;
    overflow: hidden !important;
    text-overflow: ellipsis !important;
}

.hp-drop.dropzone .dz-preview .dz-details .dz-filename span,
.hp-drop.dropzone .dz-preview .dz-details .dz-size span {
    display: block !important;
    background: none !important;
    border: 0 !important;
    padding: 0 !important;
    border-radius: 0 !important;
    color: var(--hp-soft) !important;
    font-size: 11.5px !important;
    font-weight: 600 !important;
    white-space: nowrap !important;
    overflow: hidden !important;
    text-overflow: ellipsis !important;
}

.hp-drop.dropzone .dz-preview .dz-details .dz-size span {
    margin-top: 2px !important;
    font-weight: 400 !important;
    color: var(--hp-muted) !important;
}

/* the remove control: small glass circle, CSS ×, never the red legacy block */
.hp-drop.dropzone .dz-preview .dz-remove {
    position: absolute !important;
    top: 4px !important;
    right: 4px !important;
    left: auto !important;
    bottom: auto !important;
    width: 24px !important;
    height: 24px !important;
    display: grid !important;
    place-items: center !important;
    padding: 0 !important;
    margin: 0 !important;
    border: 0 !important;
    border-radius: 50% !important;
    background: rgba(var(--hp-color-black-rgb), .55) !important;
    color: var(--hp-color-white) !important;
    font-size: 0 !important;
    line-height: 1 !important;
    text-decoration: none !important;
    z-index: 30 !important;
}

.hp-drop.dropzone .dz-preview .dz-remove .fa {
    display: none !important;
}

.hp-drop.dropzone .dz-preview .dz-remove::after {
    content: "×" !important;
    font-size: 15px !important;
    line-height: 1 !important;
    color: var(--hp-color-white) !important;
}

/* no hover overlay / zoom-blur from the legacy sheet */
.hp-drop.dropzone .dz-preview:hover .dz-details {
    opacity: 1 !important;
}

.hp-drop.dropzone .dz-preview:hover .dz-image img {
    transform: none !important;
    filter: none !important;
}
/* empty-state prompt is only for an empty dropzone — hide it as soon as
   Dropzone adds the first file (it sets .dz-started on the form) */
.hp-drop.dropzone.dz-started > .hp-drop__icon,
.hp-drop.dropzone.dz-started > .hp-drop__title,
.hp-drop.dropzone.dz-started > .hp-drop__limits {
    display: none !important;
}
/* ==========================================================================
   Tile fallback when the browser cannot generate a thumbnail
   (Dropzone keeps .dz-file-preview and removes it only after a successful
   thumbnail, so this state = "no preview image")
   ========================================================================== */
.hp-drop.dropzone .dz-preview.dz-file-preview .dz-image,
.hp-drop.dropzone .dz-preview.dz-error .dz-image {
    display: grid;
    place-items: center;
    background:
        radial-gradient(circle at 50% 38%, rgba(var(--hp-color-accent-rgb), .20) 0%, transparent 62%),
        linear-gradient(180deg, rgba(var(--hp-color-white-rgb), .05) 0%, rgba(var(--hp-color-white-rgb), .015) 100%),
        var(--hp-color-elevated);
}

.hp-drop.dropzone .dz-preview.dz-file-preview .dz-image img,
.hp-drop.dropzone .dz-preview.dz-error .dz-image img {
    display: none !important;
}

/* themed file glyph */
.hp-drop.dropzone .dz-preview.dz-file-preview .dz-image::after,
.hp-drop.dropzone .dz-preview.dz-error .dz-image::after {
    content: "";
    width: 36px;
    height: 36px;
    opacity: .7;
    background-repeat: no-repeat;
    background-position: center;
    background-size: contain;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23ff8fa3' stroke-width='1.6' stroke-linecap='round' stroke-linejoin='round'%3E%3Crect width='18' height='18' x='3' y='3' rx='2' ry='2'/%3E%3Ccircle cx='9' cy='9' r='2'/%3E%3Cpath d='m21 15-3.086-3.086a2 2 0 0 0-2.828 0L6 21'/%3E%3C/svg%3E");
}
/* themed error state for a failed tile (legacy sheet draws a red bubble + arrow) */
.hp-drop.dropzone .dz-preview.dz-error .dz-error-message,
.hp-drop.dropzone .dz-preview .dz-error-message {
    display: block !important;
    position: static !important;
    top: auto !important;
    left: auto !important;
    width: 100% !important;
    margin: 2px 0 0 !important;
    padding: 6px 8px !important;
    border: 1px solid rgba(var(--hp-color-danger-rgb), .28) !important;
    border-radius: 8px !important;
    background: rgba(var(--hp-color-danger-rgb), .12) !important;
    color: var(--hp-color-danger-text) !important;
    font-size: 11px !important;
    line-height: 1.4 !important;
    text-align: left !important;
    opacity: 1 !important;
    pointer-events: auto !important;
    z-index: auto !important;
}

.hp-drop.dropzone .dz-preview .dz-error-message:after {
    display: none !important;
}
/* tile surface must win over dropzone.css's `.dz-image-preview { background: transparent }`
   (that sheet loads after home.css, so equal-specificity rules lost) */
.hp-drop.dropzone .dz-preview,
.hp-drop.dropzone .dz-preview.dz-image-preview,
.hp-drop.dropzone .dz-preview.dz-file-preview {
    background: linear-gradient(180deg, rgba(var(--hp-color-white-rgb), .05) 0%, rgba(var(--hp-color-white-rgb), .02) 100%) !important;
    border: 1px solid rgba(var(--hp-color-white-rgb), .08) !important;
    border-radius: 12px !important;
}
/* ==========================================================================
   FINAL tile layout: media fills the tile, details/progress overlay the thumb
   ========================================================================== */
.hp-drop.dropzone .dz-preview {
    padding: 0 !important;
    overflow: hidden !important;
    position: relative !important;
}

.hp-drop.dropzone .dz-preview .dz-image {
    position: relative !important;
    width: 100% !important;
    height: auto !important;
    aspect-ratio: 1 / 1;
    border-radius: 12px !important;
    overflow: hidden !important;
}

.hp-drop.dropzone .dz-preview .dz-image img {
    width: 100% !important;
    height: 100% !important;
    object-fit: cover !important;
    display: block !important;
}

/* filename + size overlay at the bottom of the thumbnail */
.hp-drop.dropzone .dz-preview .dz-details,
.hp-drop.dropzone .dz-preview.dz-image-preview .dz-details,
.hp-drop.dropzone .dz-preview.dz-file-preview .dz-details {
    position: absolute !important;
    top: auto !important;
    left: 0 !important;
    right: 0 !important;
    bottom: 0 !important;
    width: auto !important;
    min-width: 0 !important;
    max-width: none !important;
    height: auto !important;
    margin: 0 !important;
    padding: 24px 10px 8px !important;
    background: linear-gradient(180deg, rgba(0, 0, 0, 0) 0%, rgba(0, 0, 0, 0.72) 60%, rgba(0, 0, 0, 0.86) 100%) !important;
    opacity: 1 !important;
    z-index: 2 !important;
    text-align: left !important;
    pointer-events: none;
}

.hp-drop.dropzone .dz-preview .dz-details .dz-filename span,
.hp-drop.dropzone .dz-preview .dz-details .dz-size span {
    color: var(--hp-color-white) !important;
    text-shadow: 0 1px 3px rgba(0, 0, 0, 0.6);
}

.hp-drop.dropzone .dz-preview .dz-details .dz-size span {
    color: rgba(var(--hp-color-white-rgb), 0.7) !important;
}

/* progress: thin bar pinned to the bottom of the thumb, only while uploading */
.hp-drop.dropzone .dz-preview .dz-progress {
    position: absolute !important;
    top: auto !important;
    left: 0 !important;
    right: 0 !important;
    bottom: 0 !important;
    width: auto !important;
    height: 3px !important;
    margin: 0 !important;
    border: 0 !important;
    border-radius: 0 !important;
    background: rgba(var(--hp-color-white-rgb), 0.18) !important;
    overflow: hidden !important;
    opacity: 0 !important;
    z-index: 3 !important;
    pointer-events: none;
}

.hp-drop.dropzone .dz-preview.dz-processing .dz-progress {
    opacity: 1 !important;
}

.hp-drop.dropzone .dz-preview.dz-complete .dz-progress {
    opacity: 0 !important;
}

.hp-drop.dropzone .dz-preview .dz-progress .dz-upload {
    display: block !important;
    height: 100% !important;
    width: 0;
    border-radius: 0 !important;
    background: linear-gradient(90deg, var(--hp-color-accent) 0%, var(--hp-color-accent-soft) 100%) !important;
    transition: width 0.2s ease;
}

/* controls above the thumb overlays */
.hp-drop.dropzone .dz-preview .dz-remove {
    top: 6px !important;
    right: 6px !important;
    z-index: 30 !important;
}

/* error message: hidden by default, only shown for a failed file */
.hp-drop.dropzone .dz-preview .dz-error-message {
    display: none !important;
}

.hp-drop.dropzone .dz-preview.dz-error .dz-error-message {
    display: block !important;
    position: absolute !important;
    top: auto !important;
    left: 0 !important;
    right: 0 !important;
    bottom: 0 !important;
    width: auto !important;
    margin: 0 !important;
    padding: 8px 10px !important;
    border: 0 !important;
    border-radius: 0 0 12px 12px !important;
    background: rgba(var(--hp-color-danger-rgb), 0.88) !important;
    color: var(--hp-color-white) !important;
    font-size: 11px !important;
    line-height: 1.35 !important;
    text-align: left !important;
    opacity: 1 !important;
    z-index: 20 !important;
}
/* remove control: centred inline SVG (Lucide x), no text glyph */
.hp-drop.dropzone .dz-preview .dz-remove {
    display: grid !important;
    place-items: center !important;
    line-height: 0 !important;
}

.hp-drop.dropzone .dz-preview .dz-remove::after {
    content: none !important;
}

.hp-drop.dropzone .dz-preview .dz-remove .hp-icon,
.hp-drop.dropzone .dz-preview .dz-remove svg {
    width: 12px !important;
    height: 12px !important;
    display: block !important;
    pointer-events: none !important;
    color: var(--hp-color-white) !important;
}

.hp-drop.dropzone .dz-preview .dz-remove .fa {
    display: none !important;
}
/* ==========================================================================
   Stretch the dropzone so the upload card matches the sidebar height
   ========================================================================== */
@media screen and (min-width: 768px) {
    .hp-grid {
        align-items: stretch;
    }

    .hp-main {
        display: flex;
        flex-direction: column;
        min-height: 0;
    }

    .hp-main > .hp-card {
        display: flex;
        flex-direction: column;
        height: 100%;
    }

    .hp-main > .hp-card > .hp-card__body {
        display: flex;
        flex-direction: column;
        flex: 1 1 auto;
    }

    .hp-main .hp-drop.dropzone {
        flex: 1 1 auto;
        min-height: 0;
    }

    /* empty state: keep the prompt vertically centred in the taller box */
    .hp-main .hp-drop.dropzone:not(.dz-started) {
        align-content: center;
    }
}
/* ==========================================================================
   Toggle helper text behind an (i) icon — hidden by default, on hover/focus
   ========================================================================== */
.hp-toggle__text {
    display: flex;
    flex-direction: column;
    gap: 4px;
    min-width: 0;
}

.hp-toggle__head {
    display: flex;
    align-items: center;
    gap: 6px;
}

.hp-info {
    position: relative;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 16px;
    height: 16px;
    flex-shrink: 0;
    color: rgba(var(--hp-color-white-rgb), 0.45);
    cursor: help;
}

.hp-info:hover,
.hp-info:focus,
.hp-info:focus-visible {
    color: var(--hp-color-accent-soft);
    outline: none;
}

.hp-info .hp-icon,
.hp-info svg {
    width: 14px;
    height: 14px;
    display: block;
}

.hp-info__tip {
    position: absolute;
    top: calc(100% + 8px);
    left: 0;
    z-index: 20;
    width: max-content;
    max-width: 220px;
    padding: 8px 10px;
    border: 1px solid var(--hp-color-border-on-glass);
    border-radius: 10px;
    background: linear-gradient(180deg, rgba(var(--hp-color-overlay-top-rgb), 0.98) 0%, rgba(var(--hp-color-overlay-bottom-rgb), 0.98) 100%);
    box-shadow: 0 12px 28px rgba(var(--hp-color-black-rgb), 0.5);
    color: rgba(var(--hp-color-white-rgb), 0.78);
    font-size: 11.5px;
    line-height: 1.45;
    font-weight: 400;
    text-align: left;
    opacity: 0;
    visibility: hidden;
    transform: translateY(-2px);
    transition: opacity 0.15s ease, transform 0.15s ease, visibility 0.15s;
    pointer-events: none;
}

.hp-info:hover .hp-info__tip,
.hp-info:focus .hp-info__tip,
.hp-info:focus-within .hp-info__tip {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
}
/* ==========================================================================
   Privacy toggles: centre switch + title vertically; keep tooltip inside card
   ========================================================================== */
.hp-aside .hp-toggle {
    align-items: center !important;
}

.hp-toggle__head {
    position: relative;
}

/* anchor the tooltip to the title block, not the tiny icon */
.hp-aside .hp-info {
    position: static;
}

.hp-aside .hp-info__tip {
    left: 0;
    right: auto;
    top: calc(100% + 8px);
    width: max-content;
    max-width: 220px;
}
/* ==========================================================================
   Album details: even vertical rhythm between label -> input -> helper ->
   next field (the earlier rhythm block was lost when the layout was reverted)
   ========================================================================== */
.hp-aside #demo-upload1 > * + * {
    margin-top: 16px !important;
}

.hp-aside #demo-upload1 > *:first-child {
    margin-top: 0 !important;
}

.hp-aside #demo-upload1 .hp-label {
    margin-bottom: 4px !important;
}

.hp-aside #demo-upload1 .hp-help {
    margin-top: 4px !important;
}

.hp-aside #demo-upload1 .hp-toggle {
    padding: 14px 0 !important;
}

.hp-aside #demo-upload1 .hp-toggle + .hp-toggle {
    margin-top: 0 !important;
}

.hp-aside #demo-upload1 .hp-note {
    margin-top: 16px !important;
}
/* ==========================================================================
   Save vertical space: hide the character counters under title / description
   (elements stay in the DOM so the existing JS keeps working)
   ========================================================================== */
.hp-aside #titleCharacterCount,
.hp-aside #characterCount {
    display: none !important;
}
/* ==========================================================================
   Privacy block rhythm: even gaps around the (i) toggles
   ========================================================================== */
.hp-aside #demo-upload1 > .hp-field + .hp-toggle {
    margin-top: 0 !important;
}

.hp-aside #demo-upload1 > .hp-toggle + .hp-help {
    margin-top: 0 !important;
}

.hp-aside #demo-upload1 > .hp-help + .hp-toggle {
    margin-top: 4px !important;
}

.hp-aside #demo-upload1 > .hp-toggle + .hp-field {
    margin-top: 20px !important;
}

.hp-aside #demo-upload1 .hp-toggle {
    padding: 12px 0 !important;
}
/* section headings inside the form (Privacy / Category) keep the same space
   above — the old toggle-specific 8px made Category tighter than Privacy */
.hp-aside #demo-upload1 > .hp-field:has(> span.hp-label) {
    margin-top: 20px !important;
}
/* toggle sub-fields (Album password / Delete at) hug their toggle —
   the generic 16px block rhythm was making the gap too large */
.hp-aside #demo-upload1 > .hp-reveal {
    margin-top: 2px !important;
}

.hp-aside #demo-upload1 > .hp-toggle + .hp-reveal {
    margin-top: 0 !important;
}
