/* Single-image viewer pages (split from album.css) */

/* ==========================================================================
   IMAGE DETAIL (/i/) — new design
   Palette tokens only (see assets/css/palette.css).
   ========================================================================== */
.hp-i{
    padding-bottom: 8px;
}/* ---------- breadcrumb ---------- */
.hp-i .breadcrumb{
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 6px;
    margin: 6px 0 14px;
    padding: 0;
    background: none;
}.hp-i .breadcrumb-item{
    display: inline-flex;
    align-items: center;
    gap: 6px;
    color: var(--hp-color-text-muted);
    font-size: 11.5px;
    font-weight: 600;
}.hp-i .breadcrumb-item + .breadcrumb-item::before{
    content: "/";
    padding: 0;
    color: var(--hp-color-text-faint);
}.hp-i .breadcrumb-item a{
    padding: 5px 10px;
    border: 1px solid var(--hp-color-border);
    border-radius: var(--hp-radius-pill);
    background: rgba(var(--hp-color-white-rgb), 0.04);
    color: var(--hp-color-text-soft);
    text-decoration: none;
    transition: background 0.15s ease, border-color 0.15s ease, color 0.15s ease;
}.hp-i .breadcrumb-item a:hover{
    background: rgba(var(--hp-color-accent-rgb), 0.16);
    border-color: rgba(var(--hp-color-accent-rgb), 0.4);
    color: var(--hp-color-white);
}.hp-i .breadcrumb-item:last-child a{
    border-color: rgba(var(--hp-color-accent-soft-rgb), 0.28);
    background: rgba(var(--hp-color-accent-rgb), 0.12);
    color: var(--hp-color-accent-soft);
}/* ---------- media panel ---------- */
.hp-i-media{
    position: relative;
    width: 100%;
    max-width: 100%;
    margin: 0 auto;
    padding: 8px;
    border: 1px solid var(--hp-color-border);
    border-radius: var(--hp-radius-2xl);
    background: linear-gradient(180deg,
            rgba(var(--hp-color-white-rgb), 0.045) 0%,
            rgba(var(--hp-color-white-rgb), 0.015) 100%);
}/* fixed-height media stage on the single-media page: one panel height for every
   image/video aspect ratio, media centred inside it */
.hp-i-layout > .hp-i-media{
    height: 78vh;
}.hp-i-layout > .hp-i-media .show-image,
.hp-i-layout > .hp-i-media #td-image,
.hp-i-layout > .hp-i-media .image-outer{
    height: 100% !important;
    min-height: 0 !important;
}.hp-i-layout > .hp-i-media img#main-image,
.hp-i-layout > .hp-i-media video#main-gif{
    max-height: 100%;
}.hp-i-media .show-image{
    position: relative;
    display: flex;
    align-items: center;
    justify-content: center;
    height: auto !important;
    min-height: 0 !important;
}/* legacy fixed-height wrappers must grow with the media */
.hp-i-media #td-image,
.hp-i-media .image-outer{
    height: auto !important;
}.hp-i-media .image-outer{
    position: relative;
    display: flex;
    align-items: center;
    justify-content: center;
    width: 100%;
}.hp-i-media img#main-image,
.hp-i-media video#main-gif{
    display: block;
    width: auto;
    max-width: 100%;
    max-height: 78vh;
    margin: 0 auto;
    border-radius: var(--hp-radius-xl);
    background: var(--hp-color-canvas);
    object-fit: contain;
}/* prev / next: glass circles instead of the default bootstrap arrows */
/* old bootstrap wrappers must not affect placement.
   .carousel-control had a transform in the legacy sheet, which made it the
   containing block for the absolute arrows — reset it so they resolve against
   .image-outer (the media box) instead. */
.hp-i-media .carousel-control,
.hp-i-media .carousel-control-prev,
.hp-i-media .carousel-control-next{
    position: static !important;
    transform: none !important;
    top: auto !important;
    bottom: auto !important;
    width: auto;
    height: auto;
    margin: 0;
    padding: 0;
    background: none;
    opacity: 1;
}/* place the two circles directly against the media edges, vertically centred */
.hp-i-media .carousel-control-prev-icon,
.hp-i-media .carousel-control-next-icon{
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    z-index: 5;
    margin: 0;
}.hp-i-media .carousel-control-prev-icon{ left: 14px; }.hp-i-media .carousel-control-next-icon{ right: 14px; }.hp-i-media .carousel-control-prev-icon,
.hp-i-media .carousel-control-next-icon{
    display: grid;
    place-items: center;
    width: 40px;
    height: 40px;
    border: 1px solid var(--hp-color-border-strong);
    border-radius: 50%;
    background: rgba(var(--hp-color-canvas-rgb), 0.62);
    background-image: none !important;
    -webkit-backdrop-filter: var(--hp-glass-blur);
    backdrop-filter: var(--hp-glass-blur);
    color: var(--hp-color-white);
    font-size: 22px;
    font-weight: 400;
    line-height: 1;
    opacity: 0.9;
    transition: background 0.15s ease, border-color 0.15s ease, opacity 0.15s ease;
}.hp-i-media .carousel-control-prev-icon::before,
.hp-i-media .carousel-control-next-icon::before{
    content: none;
}.hp-i-media .carousel-control-prev-icon:hover,
.hp-i-media .carousel-control-next-icon:hover{
    background: rgba(var(--hp-color-accent-rgb), 0.32);
    border-color: rgba(var(--hp-color-accent-rgb), 0.5);
    opacity: 1;
}/* ---------- title ---------- */
.hp-i-title{
    max-width: 54rem;
    margin: 18px auto 4px;
    color: var(--hp-color-text);
    font-size: clamp(15px, 2.4vw, 20px);
    font-weight: 700;
    line-height: 1.45;
    letter-spacing: -0.01em;
    text-align: center;
    overflow-wrap: anywhere;
}/* ---------- actions / codes ---------- */
.hp-i-actions{
    margin: 14px 0 22px;
}.hp-i-actions > .d-flex{
    flex-wrap: wrap;
    justify-content: center !important;
    gap: 8px;
}/* ==========================================================================
   SINGLE MEDIA — custom video player
   The .hp-i-media panel is the player stage: the video always fills it with
   object-fit: contain, so the player never resizes when playback starts
   (the native player did that when the browser only knew the poster size).
   A glass control pill replaces the native control bar.
   ========================================================================== */
.hp-i-media.hp-vplayer .show-image,
.hp-i-media.hp-vplayer #td-image,
.hp-i-media.hp-vplayer .image-outer{
    width: 100% !important;
    height: 100% !important;
    min-height: 0 !important;
}.hp-i-media.hp-vplayer video#main-gif{
    display: block;
    width: 100% !important;
    height: 100% !important;
    max-width: 100% !important;
    max-height: 100% !important;
    margin: 0 !important;
    border-radius: var(--hp-radius-xl);
    background: var(--hp-color-canvas);
    object-fit: contain;
    cursor: pointer;
}without JS the native controls remain */
.hp-vplayer__ui,
.hp-vplayer__center{
    display: none;
}.hp-i-media.hp-vplayer.hp-vplayer-on .hp-vplayer__ui{
    position: absolute;
    left: 50%;
    bottom: 20px;
    z-index: 7;
    display: flex;
    align-items: center;
    gap: 10px;
    width: min(560px, calc(100% - 40px));
    margin: 0;
    padding: 8px 12px;
    transform: translateX(-50%);
    border: 1px solid var(--hp-color-border-strong);
    border-radius: 999px;
    background: rgba(var(--hp-color-canvas-rgb), 0.60);
    -webkit-backdrop-filter: var(--hp-glass-blur);
    backdrop-filter: var(--hp-glass-blur);
    box-shadow: 0 12px 32px rgba(var(--hp-color-black-rgb), 0.45);
}.hp-vplayer__btn{
    display: grid;
    flex: 0 0 auto;
    place-items: center;
    width: 30px;
    height: 30px;
    margin: 0;
    padding: 0;
    border: 1px solid transparent;
    border-radius: 50%;
    background: none;
    color: var(--hp-color-white);
    cursor: pointer;
    opacity: 0.92;
    transition: background 0.15s ease, opacity 0.15s ease;
}.hp-vplayer__btn:hover,
.hp-vplayer__btn:focus-visible{
    background: rgba(var(--hp-color-white-rgb), 0.12);
    opacity: 1;
    outline: none;
}.hp-vplayer__time{
    flex: 0 0 auto;
    color: var(--hp-color-text-soft);
    font-size: 11px;
    font-weight: 600;
    font-variant-numeric: tabular-nums;
    line-height: 1;
    white-space: nowrap;
}.hp-vplayer__sep{
    margin: 0 3px;
    opacity: 0.55;
}.hp-vplayer__seek{
    -webkit-appearance: none;
    appearance: none;
    flex: 1 1 auto;
    min-width: 48px;
    height: 4px;
    margin: 0;
    padding: 0;
    border: 0;
    border-radius: 999px;
    background: linear-gradient(90deg,
            var(--hp-color-accent) 0,
            var(--hp-color-accent) var(--hp-vplayer-progress, 0%),
            rgba(var(--hp-color-white-rgb), 0.20) var(--hp-vplayer-progress, 0%),
            rgba(var(--hp-color-white-rgb), 0.20) 100%);
    cursor: pointer;
}.hp-vplayer__seek::-webkit-slider-thumb{
    -webkit-appearance: none;
    width: 12px;
    height: 12px;
    border: 0;
    border-radius: 50%;
    background: var(--hp-color-white);
    box-shadow: 0 2px 6px rgba(var(--hp-color-black-rgb), 0.5);
}.hp-vplayer__seek::-moz-range-thumb{
    width: 12px;
    height: 12px;
    border: 0;
    border-radius: 50%;
    background: var(--hp-color-white);
    box-shadow: 0 2px 6px rgba(var(--hp-color-black-rgb), 0.5);
}.hp-vplayer__seek:focus-visible{
    outline: 2px solid rgba(var(--hp-color-accent-rgb), 0.55);
    outline-offset: 4px;
}/* centre play badge while paused (incl. when autoplay is blocked) */
.hp-i-media.hp-vplayer.hp-vplayer-on.is-paused .hp-vplayer__center{
    position: absolute;
    top: 50%;
    left: 50%;
    z-index: 6;
    display: grid;
    place-items: center;
    width: 64px;
    height: 64px;
    padding: 0;
    transform: translate(-50%, -50%);
    border: 1px solid var(--hp-color-border-strong);
    border-radius: 50%;
    background: rgba(var(--hp-color-canvas-rgb), 0.55);
    -webkit-backdrop-filter: var(--hp-glass-blur);
    backdrop-filter: var(--hp-glass-blur);
    color: var(--hp-color-white);
    cursor: pointer;
}.hp-vplayer__center .hp-vplayer__ico--play{
    margin-left: 2px;
}/* icon swaps driven by state classes on .hp-vplayer */
.hp-vplayer__ico--pause,
.hp-vplayer__ico--sound{
    display: none !important;
}.hp-vplayer.is-playing .hp-vplayer__ico--play{
    display: none !important;
}.hp-vplayer.is-playing .hp-vplayer__ico--pause{
    display: block !important;
}.hp-vplayer.is-muted .hp-vplayer__ico--sound,
.hp-vplayer:not(.is-muted) .hp-vplayer__ico--muted{
    display: none !important;
}.hp-vplayer:not(.is-muted) .hp-vplayer__ico--sound{
    display: block !important;
}/* fullscreen: the whole stage, custom controls stay on top */
.hp-i-media.hp-vplayer:fullscreen,
.hp-i-media.hp-vplayer:-webkit-full-screen{
    width: 100vw !important;
    height: 100vh !important;
    max-width: none !important;
    max-height: none !important;
    margin: 0 !important;
    padding: 0 !important;
    border: 0 !important;
    border-radius: 0 !important;
    background: var(--hp-color-canvas);
}.hp-i-media.hp-vplayer:fullscreen video#main-gif,
.hp-i-media.hp-vplayer:-webkit-full-screen video#main-gif{
    border-radius: 0 !important;
}.hp-i-media.hp-vplayer:fullscreen .hp-vplayer__ui,
.hp-i-media.hp-vplayer:-webkit-full-screen .hp-vplayer__ui{
    bottom: 26px;
    width: min(640px, calc(100% - 48px));
}.hp-i-media.hp-vplayer:fullscreen .carousel-control-prev-icon,
.hp-i-media.hp-vplayer:fullscreen .carousel-control-next-icon,
.hp-i-media.hp-vplayer:-webkit-full-screen .carousel-control-prev-icon,
.hp-i-media.hp-vplayer:-webkit-full-screen .carousel-control-next-icon{
    display: none;
}@media screen and (max-width: 767px) {.hp-i-media.hp-vplayer.hp-vplayer-on .hp-vplayer__ui {
        bottom: 12px;
        width: calc(100% - 20px);
        gap: 8px;
        padding: 6px 10px;
    }.hp-vplayer__btn {
        width: 28px;
        height: 28px;
    }.hp-vplayer__time {
        font-size: 10.5px;
    }.hp-i-media.hp-vplayer.hp-vplayer-on.is-paused .hp-vplayer__center {
        width: 56px;
        height: 56px;
    }}/* ---------- related albums ---------- */
.hp-i-related{
    --bs-gutter-y: 8px;
    margin-bottom: 10px;
}@media screen and (max-width: 767px) {.hp-i-media {
        padding: 6px;
        border-radius: var(--hp-radius-xl);
    }.hp-i-layout > .hp-i-media {
        height: 70vh;
    }.hp-i-media img#main-image,
    .hp-i-media video#main-gif {
        max-height: 70vh;
        border-radius: var(--hp-radius-lg);
    }.hp-i-media .carousel-control-prev { left: 8px; }.hp-i-media .carousel-control-next { right: 8px; }.hp-i-media .carousel-control-prev-icon,
    .hp-i-media .carousel-control-next-icon {
        width: 34px;
        height: 34px;
        font-size: 19px;
    }.hp-i-title {
        font-size: 14px;
        margin-top: 14px;
    }}/* ==========================================================================
   IMAGE PAGE (/i/) — same rail as the album page.
   Desktop: media column + sticky rail.
   Mobile:  the SAME rail cards stack under the image (no flattening).
   ========================================================================== */
.hp-i-layout{
    display: flex;
    flex-direction: column;
}.hp-i-side{
    display: flex;
    flex-direction: column;
    gap: 12px;
    order: 2;
}.hp-i-side__card{
    display: block;
    padding: 16px;
    border: 1px solid rgba(var(--hp-color-white-rgb), 0.12);
    border-radius: 18px;
    background: linear-gradient(180deg,
            rgba(var(--hp-color-overlay-top-rgb), 0.72) 0%,
            rgba(var(--hp-color-overlay-mid-rgb), 0.84) 60%,
            rgba(var(--hp-color-overlay-bottom-rgb), 0.92) 100%);
    box-shadow: 0 18px 48px rgba(var(--hp-color-black-rgb), 0.42);
    -webkit-backdrop-filter: blur(28px) saturate(135%);
    backdrop-filter: blur(28px) saturate(135%);
}/* title + meta (same typography on desktop and mobile) */
.hp-i-layout .hp-i-title{
    margin: 0 0 10px !important;
    font-size: 16px !important;
    font-weight: 800 !important;
    line-height: 1.3 !important;
    letter-spacing: -0.01em;
    text-align: left !important;
}.hp-i-layout .hp-i-title span{
    display: block;
}.hp-i-layout .hp-i-meta{
    display: flex;
    flex-direction: column;
    gap: 6px;
    margin-top: 10px;
    padding-top: 10px;
    border-top: 1px solid rgba(var(--hp-color-white-rgb), 0.09);
}.hp-i-layout .hp-i-meta a{
    display: inline-flex;
    align-items: center;
    gap: 5px;
    color: var(--hp-color-text-muted);
    font-size: 11px;
    font-weight: 600;
    text-decoration: none;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}.hp-i-layout .hp-i-meta a:hover{
    color: var(--hp-color-accent-soft);
}/* action tiles — identical in both layouts */
.hp-i-layout .container-top{
    margin: 0 !important;
}.hp-i-layout .hp-i-actions{
    margin: 0 !important;
}.hp-i-layout .hp-i-actions > div{
    display: grid !important;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 6px;
    width: 100%;
    padding: 0 !important;
    margin: 0 !important;
}.hp-i-layout .hp-i-actions .btn{
    display: inline-flex !important;
    align-items: center;
    justify-content: center;
    gap: 5px;
    width: 100%;
    min-height: 34px;
    margin: 0 !important;
    padding: 6px 8px !important;
    border: 1px solid rgba(var(--hp-color-white-rgb), 0.09) !important;
    border-radius: 10px !important;
    background: rgba(var(--hp-color-white-rgb), 0.04) !important;
    color: var(--hp-color-text-soft) !important;
    font-size: 10.5px !important;
    font-weight: 600 !important;
    line-height: 1.1;
    transition: background 0.18s ease, border-color 0.18s ease, color 0.18s ease;
}.hp-i-layout .hp-i-actions .btn span{
    font-size: 10.5px !important;
    font-weight: 600 !important;
}.hp-i-layout .hp-i-actions .btn:hover{
    border-color: rgba(var(--hp-color-accent-rgb), 0.45) !important;
    background: rgba(var(--hp-color-accent-rgb), 0.14) !important;
    color: var(--hp-color-white) !important;
}/* mobile stacking order: image first, then the rail cards, then extras */
.hp-i-layout > .hp-i-media{
    order: 1;
}.hp-i-layout > .hp-i-related{
    order: 5;
}.hp-i-layout > .row{
    order: 6;
}@media screen and (min-width: 1200px) {.hp-i-layout {
        display: grid;
        grid-template-columns: minmax(0, 1fr) 360px;
        column-gap: 22px;
        align-items: start;
    }.hp-i-side {
        order: 0;
        grid-column: 2;
        grid-row: 1 / span 2;
        position: sticky;
        top: 18px;
        max-height: calc(100vh - 36px);
        overflow: auto;
        scrollbar-width: none;
        -ms-overflow-style: none;
    }.hp-i-side::-webkit-scrollbar {
        width: 0;
        height: 0;
    }.hp-i-layout > .hp-i-media {
        grid-column: 1;
        grid-row: 1;
        margin: 0 !important;
    }.hp-i-layout > .hp-i-related {
        grid-column: 1;
        grid-row: 4;
    }.hp-i-layout > .row {
        grid-column: 1 / -1;
    }}.hp-i-key{
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
    padding: 6px 0;
    border-bottom: 1px solid rgba(var(--hp-color-white-rgb), 0.06);
    color: var(--hp-color-text-soft);
    font-size: 11px;
}.hp-i-key:last-child{
    padding-bottom: 0;
    border-bottom: 0;
}.hp-i-key__keys{
    display: inline-flex;
    gap: 4px;
    flex-shrink: 0;
}.hp-i-key kbd{
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 22px;
    height: 20px;
    padding: 0 6px;
    border: 1px solid rgba(var(--hp-color-white-rgb), 0.14);
    border-radius: 6px;
    background: rgba(var(--hp-color-white-rgb), 0.06);
    color: var(--hp-color-white);
    font-family: inherit;
    font-size: 10px;
    font-weight: 600;
}.hp-i-key__action{
    color: var(--hp-color-text-muted);
    text-align: right;
}/* ==========================================================================
   IMAGE PAGE — action buttons: four tiles on a single line (all breakpoints)
   ========================================================================== */
.hp-i-layout .hp-i-actions > div{
    display: flex !important;
    flex-wrap: nowrap !important;
    justify-content: flex-start !important;
    gap: 6px !important;
    width: 100%;
    padding: 0 !important;
    margin: 0 !important;
}.hp-i-layout .hp-i-actions > div > .btn{
    flex: 1 1 0 !important;
    min-width: 0;
    flex-direction: column;
    gap: 3px !important;
    min-height: 52px !important;
    padding: 7px 4px !important;
}.hp-i-layout .hp-i-actions > div > .btn span{
    max-width: 100%;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    font-size: 10px !important;
    line-height: 1.15;
}