﻿/* index.css */

/* Hide focus ring for mouse clicks, keep it for keyboard Tab navigation */
*:focus:not(:focus-visible) {
    outline: none;
}
* {
    user-select: none;
}

/* Define reusable variables */
:root {
    --background-color: #222222;
    --navbar-height: 50px;
    /* ????????? */
    --vh: 1vh;
    --overlay-text-shadow: 0 1px 3px rgba(0, 0, 0, 0.48);
    --overlay-text-shadow-strong: 0 2px 8px rgba(0, 0, 0, 0.34);
    --home-thumb-w: 40px;
    --home-thumb-h: 60px;
    --home-thumb-gap: 2px;
    --home-thumb-radius: 2px;
    --home-thumb-strip-height: calc(var(--home-thumb-h) + 2px);
    --home-footer-height: 18px;
    --home-bottom-stack-gap: 0px;
    --home-bottom-stack-total: calc(var(--home-thumb-strip-height) + var(--home-footer-height) + var(--home-bottom-stack-gap) + env(safe-area-inset-bottom));
    --home-edge-gap: 12px;
    --home-overlay-gap: 12px;
    --home-action-size: 40px;
    --home-action-icon-padding: 9px;
    --home-interaction-gap: 10px;
    --home-interaction-item-gap: 4px;
    --home-interaction-label-font-size: 0.72em;
    --home-follow-height: 20px;
    --home-follow-font-size: 11px;
    --home-author-right: calc(var(--home-edge-gap) + var(--home-action-size) + 16px);
    --home-author-font-size: 0.9em;
    --home-author-line-height: 1.38;
    --home-nav-padding-x: 12px;
    --home-nav-gap: 10px;
    --home-nav-action-gap: 6px;
    --home-nav-action-size: 30px;
    --home-nav-avatar-size: 22px;
    --home-nav-upload-icon-size: 17px;
    --home-compliance-font-size: 8px;
    --home-compliance-gap: 4px;
    --home-compliance-row-gap: 0px;
    --mobile-thumb-strip-height: var(--home-thumb-strip-height);
    --mobile-footer-height: var(--home-footer-height);
    --mobile-bottom-stack-gap: var(--home-bottom-stack-gap);
    --mobile-bottom-stack-total: var(--home-bottom-stack-total);

    /* adaptive colors — defaults (dark theme fallback) */
    --adaptive-bg-r: 28;
    --adaptive-bg-g: 36;
    --adaptive-bg-b: 46;
    --adaptive-bg-rgb: 28, 36, 46;
    --adaptive-text-color: rgba(255, 255, 255, 0.40);
    --adaptive-border-alpha: 0.18;
    --adaptive-glow-alpha: 0.14;
}

@media only screen and (max-width: 360px) {
    :root {
        --home-thumb-w: 36px;
        --home-thumb-h: 54px;
        --home-action-size: 38px;
        --home-action-icon-padding: 8px;
        --home-edge-gap: 10px;
        --home-overlay-gap: 10px;
        --home-interaction-gap: 9px;
        --home-follow-font-size: 10.5px;
        --home-author-right: calc(var(--home-edge-gap) + var(--home-action-size) + 14px);
        --home-author-font-size: 0.86em;
        --home-nav-padding-x: 10px;
        --home-nav-gap: 8px;
        --home-nav-action-size: 28px;
        --home-nav-avatar-size: 20px;
        --home-nav-upload-icon-size: 16px;
    }
}

@media only screen and (min-width: 431px) and (max-width: 650px) {
    :root {
        --home-thumb-w: 44px;
        --home-thumb-h: 66px;
        --home-action-size: 42px;
        --home-action-icon-padding: 9px;
        --home-edge-gap: 14px;
        --home-overlay-gap: 14px;
        --home-interaction-gap: 11px;
        --home-follow-height: 21px;
        --home-follow-font-size: 11.5px;
        --home-author-right: calc(var(--home-edge-gap) + var(--home-action-size) + 18px);
        --home-author-font-size: 0.94em;
        --home-nav-padding-x: 14px;
        --home-nav-action-size: 32px;
        --home-nav-avatar-size: 24px;
        --home-nav-upload-icon-size: 18px;
    }
}

@media only screen and (min-width: 651px) {
    :root {
        --home-thumb-w: 50px;
        --home-thumb-h: 75px;
        --home-footer-height: 20px;
        --home-edge-gap: 18px;
        --home-overlay-gap: 16px;
        --home-action-size: 46px;
        --home-action-icon-padding: 10px;
        --home-interaction-gap: 12px;
        --home-follow-height: 22px;
        --home-follow-font-size: 12px;
        --home-author-right: calc(var(--home-edge-gap) + var(--home-action-size) + 22px);
        --home-author-font-size: 1em;
        --home-author-line-height: 1.42;
        --home-nav-padding-x: 18px;
        --home-nav-gap: 14px;
        --home-nav-action-gap: 8px;
        --home-nav-action-size: 34px;
        --home-nav-avatar-size: 26px;
        --home-nav-upload-icon-size: 19px;
        --home-compliance-font-size: 9px;
        --home-compliance-gap: 6px;
    }
}

@media only screen and (max-height: 720px) and (min-width: 431px) {
    :root {
        --home-thumb-w: 44px;
        --home-thumb-h: 66px;
        --home-footer-height: 18px;
        --home-action-size: 42px;
        --home-action-icon-padding: 9px;
        --home-overlay-gap: 12px;
        --home-interaction-gap: 10px;
        --home-follow-height: 20px;
        --home-follow-font-size: 11px;
        --home-author-right: calc(var(--home-edge-gap) + var(--home-action-size) + 18px);
        --home-author-font-size: 0.94em;
        --home-compliance-font-size: 8px;
    }
}

@media only screen and (max-height: 620px) and (min-width: 361px) {
    :root {
        --home-thumb-w: 40px;
        --home-thumb-h: 60px;
        --home-footer-height: 18px;
        --home-action-size: 40px;
        --home-action-icon-padding: 9px;
        --home-edge-gap: 12px;
        --home-overlay-gap: 10px;
        --home-interaction-gap: 9px;
        --home-follow-font-size: 10.5px;
        --home-author-right: calc(var(--home-edge-gap) + var(--home-action-size) + 16px);
        --home-author-font-size: 0.9em;
        --home-compliance-font-size: 8px;
    }
}

/* Custom CSS for the body */
body {
    overflow: hidden;
    margin: 0;
    padding: 0;
    background-color: var(--background-color);
    touch-action: none;
    -webkit-touch-callout: none;
    /* ????????? */
    padding-bottom: env(safe-area-inset-bottom);
}

/* Common styles for centering elements */
.center {
    display: flex;
    justify-content: center;
    align-items: center;
}

/* Custom CSS for the wrapper container */
.wrapper {
    position: relative;
    display: block;
    width: 100%;
    max-width: 650px;
    margin: 0 auto;
    /* ????????? */
    height: calc(var(--vh, 1vh) * 100);
}

.wrapper::before,
.wrapper::after {
    content: '';
    position: absolute;
    left: 0;
    width: 100%;
    pointer-events: none;
    z-index: 6;
}

.wrapper::before {
    top: 0;
    height: 108px;
    background: linear-gradient(to bottom, rgba(0, 0, 0, 0.22), rgba(0, 0, 0, 0.08) 52%, rgba(0, 0, 0, 0));
}

.wrapper::after {
    bottom: var(--home-bottom-stack-total);
    height: 36px;
    background: linear-gradient(to top, rgba(var(--adaptive-bg-rgb), 0.22), rgba(var(--adaptive-bg-rgb), 0.09) 46%, rgba(var(--adaptive-bg-rgb), 0));
    transition: background 0.6s ease;
}

/* Custom CSS for the navigation bar */
.navbar {
    position: fixed;
    width: 100%;
    max-width: 650px;
    top: 0;
    left: 50%;
    transform: translateX(-50%);
    height: var(--navbar-height);
    background: transparent;
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 10px var(--home-nav-padding-x) 0;
    box-sizing: border-box;
    gap: var(--home-nav-gap);
    z-index: 10;
}

.navbar-main {
    display: flex;
    align-items: center;
    gap: var(--home-nav-gap);
    min-width: 0;
    flex: 1 1 auto;
}

.navbar-actions {
    display: inline-flex;
    align-items: center;
    justify-content: flex-end;
    gap: var(--home-nav-action-gap);
    flex: 0 0 auto;
}

/* Custom CSS for the navbar title */
.navbar h1 {
    margin: 0;
    font-size: 1.08em;
    font-weight: 600;
    letter-spacing: 0.04em;
    color: rgba(255, 255, 255, 0.92);
    text-shadow: 0 1px 3px rgba(0, 0, 0, 0.2);
    white-space: nowrap;
}

.nav-tabs {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    padding: 3px;
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.012);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.035);
}

.nav-tab {
    border: none;
    background: transparent;
    color: rgba(255, 255, 255, 0.64);
    padding: 7px 12px;
    border-radius: 999px;
    font-size: 0.88em;
    font-weight: 500;
    letter-spacing: 0.02em;
    cursor: pointer;
    border-bottom: none;
    text-shadow: none;
    transition: color 0.2s ease, background-color 0.2s ease, opacity 0.2s ease, box-shadow 0.2s ease;
}

.nav-tab:hover {
    color: rgba(255, 255, 255, 0.84);
    background: rgba(255, 255, 255, 0.03);
}

.nav-tab.active {
    color: rgba(255, 255, 255, 0.96);
    background: rgba(255, 255, 255, 0.08);
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.06), 0 4px 10px rgba(0, 0, 0, 0.06);
}

.nav-tab:focus-visible {
    outline: none;
    background: rgba(255, 255, 255, 0.075);
    color: rgba(255, 255, 255, 0.96);
}

.nav-tab:active {
    opacity: 0.9;
}
/* Custom CSS for the photo container */
.photo-container {
    position: relative;
    height: calc((var(--vh, 1vh) * 100) - var(--home-bottom-stack-total));
    min-height: calc((var(--vh, 1vh) * 100) - var(--home-bottom-stack-total));
    width: 100%;
    /* Ensure photo width fills container */
    overflow: hidden;
}

.bottom-tools {
    position: absolute;
    left: 0;
    right: 0;
    bottom: 0;
    width: 100%;
    height: var(--home-bottom-stack-total);
    display: flex;
    flex-direction: column;
    justify-content: flex-end;
    padding: 0 0 env(safe-area-inset-bottom);
    box-sizing: border-box;
    pointer-events: none;
    z-index: 11;
}

.bottom-tools::before,
.bottom-tools::after {
    content: '';
    position: absolute;
    left: 0;
    right: 0;
    pointer-events: none;
}

.bottom-tools::before {
    top: -12px;
    height: 14px;
    background: linear-gradient(to bottom, rgba(var(--adaptive-bg-rgb), 0), rgba(var(--adaptive-bg-rgb), 0.08));
    opacity: 1;
    transition: opacity 0.2s ease, background 0.6s ease;
}

.bottom-tools::after {
    inset: 0;
    opacity: 1;
    background:
        linear-gradient(to bottom, rgba(var(--adaptive-bg-rgb), 0), rgba(var(--adaptive-bg-rgb), 0.055) 14%, rgba(var(--adaptive-bg-rgb), 0.13) 48%, rgba(var(--adaptive-bg-rgb), 0.24)),
        linear-gradient(180deg, rgba(255, 255, 255, 0.044), rgba(255, 255, 255, 0.012) 22%, rgba(255, 255, 255, 0));
    backdrop-filter: blur(9px) saturate(1.04);
    -webkit-backdrop-filter: blur(9px) saturate(1.04);
    transition: opacity 0.2s ease;
}

/* 模糊背景层 — must be before .photo for z-index layering */
.photo-bg {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-size: cover;
    background-position: center center;
    background-repeat: no-repeat;
    z-index: 0;
    opacity: 0;
    filter: blur(24px) brightness(0.4) saturate(0.6);
    transform: scale(1.15);
    transition: opacity 0.35s ease;
    pointer-events: none;
    will-change: opacity;
}

.photo-bg.active {
    opacity: 1;
}

/* ????????? */
.photo {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    object-position: center center;
    opacity: 0;
    will-change: opacity, transform;
    z-index: 1; /* ????????? */
}

.photo.active {
    opacity: 1;
    z-index: 2;
}

.photo.next {
    opacity: 0;
    z-index: 1;  /* ????????? */
}

.photo.fit-cover {
    object-fit: cover;
}

.photo.fit-contain {
    object-fit: contain;
}

/* Thumbnail rail */
.thumbnail-rail {
    position: absolute;
    left: 0;
    right: 0;
    top: auto;
    bottom: calc(var(--home-footer-height) + var(--home-bottom-stack-gap) + env(safe-area-inset-bottom));
    display: flex;
    flex-direction: row;
    justify-content: flex-start;
    align-items: center;
    gap: var(--home-thumb-gap);
    width: 100%;
    height: var(--home-thumb-strip-height);
    box-sizing: border-box;
    padding: 1px 0 0;
    border-radius: 0;
    background: transparent;
    border-top: none;
    overflow-x: auto;
    overflow-y: hidden;
    transform: none;
    scrollbar-width: none;
    z-index: 11;
    pointer-events: auto;
    will-change: transform;
}

.thumbnail-rail.is-shifting-next {
    animation: thumbnailRailShiftNext 220ms cubic-bezier(0.22, 0.8, 0.2, 1);
}

.thumbnail-rail.is-shifting-prev {
    animation: thumbnailRailShiftPrev 220ms cubic-bezier(0.22, 0.8, 0.2, 1);
}

.thumbnail-rail::-webkit-scrollbar {
    display: none;
}

.thumbnail-item {
    width: var(--home-thumb-w);
    height: var(--home-thumb-h);
    flex: 0 0 auto;
    border-radius: var(--home-thumb-radius);
    border: 1px solid rgba(var(--adaptive-bg-rgb), var(--adaptive-border-alpha));
    border-color: rgba(var(--adaptive-bg-rgb), calc(var(--adaptive-border-alpha) * 0.82));
    background: rgba(var(--adaptive-bg-rgb), 0.052);
    padding: 0;
    overflow: hidden;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.035), 0 3px 8px rgba(8, 12, 18, 0.09);
    opacity: 0.7;
    transition: opacity 0.2s ease, border-color 0.2s ease, box-shadow 0.2s ease, filter 0.2s ease;
}

.thumbnail-item img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
    filter: saturate(0.82) contrast(0.95) brightness(0.98);
    opacity: 1;
    transition: opacity 0.2s ease, filter 0.2s ease;
}

.thumbnail-item.is-thumb-refreshing img {
    opacity: 0.58;
    filter: saturate(0.74) contrast(0.94) brightness(0.94);
}

.thumbnail-item.is-empty img {
    opacity: 0;
}

.thumbnail-item.is-empty {
    background: rgba(var(--adaptive-bg-rgb), 0.04);
    border-color: rgba(var(--adaptive-bg-rgb), calc(var(--adaptive-border-alpha) * 0.45));
    box-shadow: none;
}

.thumbnail-item.is-active {
    border-color: rgba(var(--adaptive-bg-rgb), 0.68);
    box-shadow: 0 0 0 1px rgba(var(--adaptive-bg-rgb), calc(var(--adaptive-glow-alpha) * 1.08)), 0 0 12px rgba(var(--adaptive-bg-rgb), calc(var(--adaptive-glow-alpha) * 1.35)), 0 4px 12px rgba(8, 12, 18, 0.12);
    opacity: 1;
}

.thumbnail-item:hover {
    opacity: 0.8;
}

.thumbnail-item:hover img {
    filter: saturate(0.92) contrast(1.0) brightness(1.0);
}

.thumbnail-item:disabled {
    cursor: default;
}

.thumbnail-item.is-loading {
    border-color: rgba(var(--adaptive-bg-rgb), 0.55);
    box-shadow: 0 0 0 1px rgba(var(--adaptive-bg-rgb), 0.22);
}

@keyframes thumbnailRailShiftNext {
    0% {
        transform: translate3d(4px, 0, 0);
    }
    100% {
        transform: translate3d(0, 0, 0);
    }
}

@keyframes thumbnailRailShiftPrev {
    0% {
        transform: translate3d(-4px, 0, 0);
    }
    100% {
        transform: translate3d(0, 0, 0);
    }
}

@media (prefers-reduced-motion: reduce) {
    .thumbnail-rail.is-shifting-next,
    .thumbnail-rail.is-shifting-prev {
        animation: none;
    }

    .thumbnail-item,
    .thumbnail-item img {
        transition-duration: 0.01ms;
    }
}

/* Custom CSS for the interaction buttons */
.interaction-buttons {
    position: absolute;
    right: var(--home-edge-gap);
    bottom: calc(var(--home-bottom-stack-total) + var(--home-overlay-gap));
    display: flex;
    flex-direction: column;  /* 閸ㄥ倻娲块幒鎺戝灙 */
    align-items: flex-end;   /* ????????? */
    gap: var(--home-interaction-gap);
    z-index: 10;  /* 閹绘劙鐝?z-index */
}

/* ????????? */
.interaction-item {
    display: flex;
    flex-direction: column;
    align-items: flex-end;
    gap: var(--home-interaction-item-gap);
    width: var(--home-action-size);
}

/* ????????? */
.interaction-item img {
    width: var(--home-action-size);          /* ????????? */
    height: var(--home-action-size);         /* ????????? */
    object-fit: cover;
    border-radius: 50%;
    margin-bottom: 0;   /* ????????? */
}

/* 閺佹澘鐡?閺傚洤鐡ф穱婵囧瘮鐏炲懍鑵?*/
.interaction-item p {
    margin: 0;
    width: var(--home-action-size);
    text-align: center;
    font-size: var(--home-interaction-label-font-size);
    line-height: 1;
    color: rgba(255, 255, 255, 0.7);
    text-shadow: var(--overlay-text-shadow);
    transition: opacity 0.35s ease;
}

.interaction-item p.preload-hidden {
    opacity: 0;
}

/* Custom CSS for the author comment section */
.author-comment {
    position: absolute;
    left: var(--home-edge-gap);
    right: var(--home-author-right);
    bottom: calc(var(--home-bottom-stack-total) + var(--home-overlay-gap));
    width: auto;
    padding-left: 0;
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    gap: 0;
    box-sizing: border-box;
    z-index: 10;  /* 閹绘劙鐝?z-index */
}

.author-avatar {
    width: var(--home-action-size);
    height: var(--home-action-size);
    border-radius: 50%;
    object-fit: cover;
    border: 1px solid rgba(255, 255, 255, 0.12);
    background: rgba(255, 255, 255, 0.012);
    box-shadow: 0 6px 16px rgba(8, 12, 18, 0.12);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
}

.author-name {
    margin: 0;
    display: block;
    max-width: 72px;
    overflow: hidden;
    white-space: nowrap;
    text-overflow: ellipsis;
    align-self: center;
    text-align: center;
    font-size: 0.7em;
    line-height: 1.1;
    font-weight: 500;
    color: rgba(255, 255, 255, 0.76);
    text-shadow: var(--overlay-text-shadow);
}

.author-follow-btn {
    margin-left: 0;
    padding: 0 8px;
    min-width: var(--home-action-size);
    height: var(--home-follow-height);
    display: inline-flex;
    align-items: center;
    justify-content: center;
    align-self: center;
    border-radius: 999px;
    border: 1px solid rgba(255, 255, 255, 0.22);
    background: rgba(255, 255, 255, 0.035);
    color: rgba(255, 255, 255, 0.92);
    font-size: var(--home-follow-font-size);
    line-height: 1;
    font-weight: 600;
    letter-spacing: 0;
    transform: translateY(0);
    cursor: pointer;
    text-shadow: none;
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
    box-shadow: 0 4px 12px rgba(8, 12, 18, 0.12), inset 0 1px 0 rgba(255, 255, 255, 0.06);
    transition: background 0.2s ease, color 0.2s ease, border-color 0.2s ease, opacity 0.2s ease, transform 0.2s ease, box-shadow 0.2s ease;
}

.author-follow-btn[hidden] {
    display: none !important;
}

.author-follow-btn:hover {
    border-color: rgba(255, 255, 255, 0.34);
    background: rgba(255, 255, 255, 0.115);
    box-shadow: 0 6px 14px rgba(8, 12, 18, 0.14), inset 0 1px 0 rgba(255, 255, 255, 0.08);
    transform: translateY(-1px);
}

.author-follow-btn:active {
    transform: translateY(0) scale(0.98);
}

.author-follow-btn.following {
    background: linear-gradient(180deg, rgba(88, 158, 119, 0.36), rgba(55, 111, 82, 0.3));
    border-color: rgba(190, 238, 207, 0.36);
    color: rgba(242, 255, 247, 0.9);
    box-shadow: 0 4px 12px rgba(18, 74, 50, 0.14), inset 0 1px 0 rgba(245, 255, 249, 0.13);
}

.author-text {
    margin: 0;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
    max-width: min(30ch, 100%);
    font-size: var(--home-author-font-size);
    line-height: var(--home-author-line-height);
    font-weight: 500;
    letter-spacing: 0.01em;
    color: rgba(255, 255, 255, 0.84);
    text-shadow: 0 1px 6px rgba(8, 12, 18, 0.18);
    transition: opacity 0.35s ease;
}

.author-comment.preload-hidden {
    opacity: 0;
}

.author-inline-name {
    display: inline;
    font-weight: 700;
    color: rgba(255, 255, 255, 0.92);
}

.author-avatar-item .author-name {
    display: none;
}

.interaction-buttons .author-avatar-item {
    width: var(--home-action-size);
    align-items: flex-end;
    gap: var(--home-interaction-item-gap);
}

.interaction-buttons .author-avatar-item .author-avatar {
    width: var(--home-action-size);
    height: var(--home-action-size);
    box-sizing: border-box;
}

.interaction-buttons .author-avatar-item .author-follow-btn {
    box-sizing: border-box;
    width: var(--home-action-size);
    min-width: var(--home-action-size);
    height: var(--home-follow-height);
    padding: 0 3px;
    font-size: var(--home-follow-font-size);
    align-self: flex-end;
}

/* Media Query for Small Devices (Smartphones) */
@media only screen and (max-width: 650px) {
    body {
        padding-bottom: env(safe-area-inset-bottom);
    }

    .wrapper {
        overflow: hidden;
    }

    .wrapper::after {
        bottom: var(--home-bottom-stack-total);
        height: 36px;
        background: linear-gradient(to top, rgba(var(--adaptive-bg-rgb), 0.22), rgba(var(--adaptive-bg-rgb), 0.09) 46%, rgba(var(--adaptive-bg-rgb), 0));
    }

    .photo-container {
        height: calc((var(--vh, 1vh) * 100) - var(--home-bottom-stack-total));
        min-height: calc((var(--vh, 1vh) * 100) - var(--home-bottom-stack-total));
    }

    .bottom-tools {
        height: var(--home-bottom-stack-total);
        display: flex;
        flex-direction: column;
        justify-content: flex-end;
        padding: 0 0 env(safe-area-inset-bottom);
        box-sizing: border-box;
    }

    .bottom-tools::before {
        opacity: 1;
    }

    .bottom-tools::after {
        opacity: 1;
        background:
            linear-gradient(to bottom, rgba(var(--adaptive-bg-rgb), 0), rgba(var(--adaptive-bg-rgb), 0.055) 14%, rgba(var(--adaptive-bg-rgb), 0.13) 48%, rgba(var(--adaptive-bg-rgb), 0.24)),
            linear-gradient(180deg, rgba(255, 255, 255, 0.044), rgba(255, 255, 255, 0.012) 22%, rgba(255, 255, 255, 0));
        transition: background 0.6s ease;
        backdrop-filter: blur(9px) saturate(1.04);
        -webkit-backdrop-filter: blur(9px) saturate(1.04);
    }

    .navbar {
        padding: 10px var(--home-nav-padding-x) 0;
        gap: var(--home-nav-gap);
    }

    .navbar-main {
        gap: var(--home-nav-gap);
        min-width: 0;
    }

    .navbar h1 {
        font-size: 1em;
        letter-spacing: 0.035em;
    }

    .nav-tabs {
        gap: 2px;
        padding: 2px;
    }

    .nav-tab {
        padding: 6px 10px;
        font-size: 0.84em;
    }

    .navbar-actions {
        gap: var(--home-nav-action-gap);
    }

    .navbar-user a,
    .navbar-upload {
        width: var(--home-nav-action-size);
        height: var(--home-nav-action-size);
    }

    .navbar-user img {
        width: var(--home-nav-avatar-size);
        height: var(--home-nav-avatar-size);
    }

    .navbar-upload svg {
        width: var(--home-nav-upload-icon-size);
        height: var(--home-nav-upload-icon-size);
    }

    .navbar-login {
        font-size: 0.76em;
    }
    .thumbnail-rail {
        left: 0;
        right: 0;
        top: auto;
        bottom: calc(var(--home-footer-height) + var(--home-bottom-stack-gap) + env(safe-area-inset-bottom));
        display: flex;
        flex-direction: row;
        justify-content: flex-start;
        align-items: center;
        gap: var(--home-thumb-gap);
        width: 100%;
        height: var(--home-thumb-strip-height);
        box-sizing: border-box;
        padding: 1px 0 0;
        border-radius: 0;
        background: transparent;
        border-top: none;
        overflow-x: auto;
        overflow-y: hidden;
        transform: none;
        scrollbar-width: none;
        z-index: 11;
        pointer-events: auto;
        will-change: transform;
    }

    .thumbnail-rail::-webkit-scrollbar {
        display: none;
    }

    .thumbnail-item {
        width: var(--home-thumb-w);
        height: var(--home-thumb-h);
        flex: 0 0 auto;
        border-radius: var(--home-thumb-radius);
        border-color: rgba(var(--adaptive-bg-rgb), calc(var(--adaptive-border-alpha) * 0.82));
        background: rgba(var(--adaptive-bg-rgb), 0.052);
        box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.035), 0 3px 8px rgba(8, 12, 18, 0.09);
        opacity: 0.7;
        transition: opacity 0.2s ease, border-color 0.2s ease, box-shadow 0.2s ease, filter 0.2s ease;
    }

    .thumbnail-item.is-active {
        opacity: 1;
        border-color: rgba(var(--adaptive-bg-rgb), 0.68);
        box-shadow: 0 0 0 1px rgba(var(--adaptive-bg-rgb), calc(var(--adaptive-glow-alpha) * 1.08)), 0 0 12px rgba(var(--adaptive-bg-rgb), calc(var(--adaptive-glow-alpha) * 1.35)), 0 4px 12px rgba(8, 12, 18, 0.12);
    }

    .thumbnail-item.is-active img {
        filter: saturate(1) contrast(1) brightness(1);
    }

    .interaction-buttons {
        right: var(--home-edge-gap);
        bottom: calc(var(--home-bottom-stack-total) + var(--home-overlay-gap));
        width: auto;
        align-items: flex-end;
        gap: var(--home-interaction-gap);
    }

    .interaction-item {
        width: var(--home-action-size);
        gap: var(--home-interaction-item-gap);
    }

    .interaction-item p {
        font-size: var(--home-interaction-label-font-size);
    }

    .interaction-item .like-icon,
    .interaction-item .ui-icon,
    .interaction-item .author-avatar {
        width: var(--home-action-size);
        height: var(--home-action-size);
    }

    .interaction-item .like-icon,
    .interaction-item .ui-icon {
        padding: var(--home-action-icon-padding);
    }

    .interaction-buttons .author-avatar-item {
        width: var(--home-action-size);
        align-items: flex-end;
        gap: var(--home-interaction-item-gap);
    }

    .interaction-buttons .author-avatar-item .author-avatar {
        width: var(--home-action-size);
        height: var(--home-action-size);
        box-sizing: border-box;
    }

    .author-avatar-item .author-name {
        display: none;
    }

    .interaction-buttons .author-avatar-item .author-follow-btn {
        box-sizing: border-box;
        width: var(--home-action-size);
        min-width: var(--home-action-size);
        height: var(--home-follow-height);
        padding: 0 3px;
        font-size: var(--home-follow-font-size);
        align-self: flex-end;
    }

    .author-comment {
        left: var(--home-edge-gap);
        right: var(--home-author-right);
        width: auto;
        bottom: calc(var(--home-bottom-stack-total) + var(--home-overlay-gap));
        padding-left: 0;
        gap: 0;
    }

    .author-text {
        display: -webkit-box;
        -webkit-line-clamp: 2;
        -webkit-box-orient: vertical;
        overflow: hidden;
        max-width: 100%;
        font-size: var(--home-author-font-size);
        line-height: var(--home-author-line-height);
        color: rgba(255, 255, 255, 0.82);
        text-shadow: 0 1px 5px rgba(8, 12, 18, 0.16);
    }

    .author-inline-name {
        display: inline;
        font-weight: 700;
        color: rgba(255, 255, 255, 0.92);
    }
}

/* Media Query for Large Devices (Desktops) */
@media only screen and (min-width: 651px) {
    .navbar {
        padding-top: 12px;
    }
}

.swipe-up {
    transform: translateY(-100%);
    opacity: 0;
}

.swipe-down {
    transform: translateY(100%);
    opacity: 0;
}

.login-circle {
    display: flex;
    justify-content: center;
    align-items: center;
    /* ????????? */
    width: clamp(40px, 6%, 50px); /* ????????? */
    aspect-ratio: 1 / 1;
    background-color: white;
    color: rgb(255, 0, 0);
    border-radius: 50%;
    font-weight: normal;
    text-decoration: none;
    /* font-size: 1em; */
    font-size: 0.95em; /* 棣冩啛 鐎涙ぞ缍嬮弴鏉戠毈 */
    /* box-shadow: 0 0 6px rgba(0, 0, 0, 0.4); */
    box-shadow: 0 0 4px rgba(0, 0, 0, 0.3);
    margin-bottom: 2px;
}

.navbar-user {
    display: flex;
    align-items: center;
}

.navbar-user a,
.navbar-upload {
    width: var(--home-nav-action-size);
    height: var(--home-nav-action-size);
    border-radius: 999px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    background: rgba(255, 255, 255, 0.012);
    border: 1px solid rgba(255, 255, 255, 0.06);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.035);
    transition: background-color 0.2s ease, border-color 0.2s ease, transform 0.2s ease, box-shadow 0.2s ease;
}

.navbar-user a:hover,
.navbar-upload:hover {
    background: rgba(255, 255, 255, 0.05);
    border-color: rgba(255, 255, 255, 0.1);
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.04), 0 6px 14px rgba(0, 0, 0, 0.06);
    transform: translateY(-1px);
}

.navbar-user img {
    width: var(--home-nav-avatar-size);
    height: var(--home-nav-avatar-size);
    border-radius: 50%;
    object-fit: cover;
    display: block;
}

.navbar-upload {
    margin: 0;
}

.navbar-upload svg {
    width: var(--home-nav-upload-icon-size);
    height: var(--home-nav-upload-icon-size);
    stroke: rgba(255, 255, 255, 0.74);
    transition: stroke 0.2s ease, transform 0.2s ease;
}

.navbar-upload:hover svg {
    stroke: rgba(255, 255, 255, 0.9);
}

.navbar-login {
    color: rgba(255, 255, 255, 0.76);
    text-decoration: none;
    font-size: 0.8em;
    font-weight: 500;
    text-shadow: none;
}

/* ????????? */
.login-box p {
    margin: 12px 0;
}

.login-box input[type="text"],
.login-box input[type="email"],
.login-box input[type="password"],
.login-box input[type="file"] {
    width: 100%;
    padding: 10px;
    border-radius: 8px;
    border: none;
    outline: none;
    background-color: #e8f0fe;
    font-size: 1em;
    box-sizing: border-box;
}

.interaction-item img.liked {
    filter: drop-shadow(0 0 8px #ff4d6d);
    transform: none;
}

.interaction-item img {
    cursor: pointer;
    pointer-events: auto;
}

.interaction-item .like-icon,
.interaction-item .ui-icon {
    width: var(--home-action-size);
    height: var(--home-action-size);
    padding: var(--home-action-icon-padding);
    box-sizing: border-box;
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.012);
    border: 1px solid rgba(255, 255, 255, 0.1);
    box-shadow: 0 6px 16px rgba(8, 12, 18, 0.12);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
}

/* ????????? */
.like-icon {
    width: var(--home-action-size);
    height: var(--home-action-size);

    fill: none; /* ????????? */
    stroke: rgba(255, 255, 255, 0.9);
    stroke-width: 1.5;
    stroke-linecap: round;
    stroke-linejoin: round;

    transition: fill 0.25s ease, stroke 0.25s ease, transform 0.15s ease, background-color 0.2s ease, border-color 0.2s ease, box-shadow 0.2s ease;
    cursor: pointer;
}

/* ????????? */
.like-button.liked .like-icon {
    fill: rgba(255, 122, 148, 0.92);      /* ????????? */
    stroke: rgba(255, 122, 148, 0.92);       /* ????????? */
    border-color: rgba(255, 172, 193, 0.36);
    background: rgba(255, 255, 255, 0.05);
    box-shadow: 0 0 0 1px rgba(255, 172, 193, 0.12), 0 8px 18px rgba(8, 12, 18, 0.14);
    transform: none;
}

.like-button.liked .like-icon {
    animation: none;
}

@keyframes pop {
    0%   { transform: scale(1); }
    50%  { transform: scale(1.25); }
    100% { transform: scale(1.15); }
}

.like-button.pop-once .like-icon {
    animation: pop 0.3s ease;
}


/* =========================
   Unified UI SVG Icons
   ========================= */

/* ????????? */
.ui-icon {
    width: var(--home-action-size);
    height: var(--home-action-size);

    /* ????????? */
    stroke: rgba(255, 255, 255, 0.88);
    fill: none;

    stroke-width: 1.5;
    stroke-linecap: round;
    stroke-linejoin: round;

    transition: stroke 0.2s ease, opacity 0.2s ease, background-color 0.2s ease, border-color 0.2s ease, box-shadow 0.2s ease, transform 0.2s ease;
    cursor: pointer;
}

/* ????????? */
.ui-icon:hover {
    stroke: rgba(255, 255, 255, 0.96);
    background: rgba(255, 255, 255, 0.05);
    border-color: rgba(255, 255, 255, 0.14);
    box-shadow: 0 8px 18px rgba(8, 12, 18, 0.14);
    transform: translateY(-1px);
}

.icon-comment,
.icon-share,
.icon-download,
.icon-add {
    transform-box: fill-box;
    transform-origin: center;
}

.icon-comment {
    transform: translate(0.0px, 0.55px);
}

.icon-share {
    transform: translate(0.1px, 0.42px);
}

.icon-download {
    transform: translate(0.0px, 0.58px);
}

/* ????????? */
.interaction-item:active .ui-icon {
    stroke: rgb(152, 224, 172);
}

.author-avatar-item {
    width: var(--home-action-size);
    gap: var(--home-interaction-item-gap);
    margin-bottom: 4px;
}

.author-avatar-item .author-avatar {
    width: var(--home-action-size);
    height: var(--home-action-size);
}

.author-avatar-item .author-follow-btn {
    align-self: center;
}

.icon-add {
    transform: translate(0.0px, 0.50px);
}

/* =========================
   Comment Panel
   ========================= */
.comment-modal {
    position: absolute;
    inset: 0;
    background: rgba(0, 0, 0, 0.28);
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.2s ease;
    z-index: 28;
}

.comment-modal.open {
    opacity: 1;
    pointer-events: auto;
}

.comment-sheet {
    position: absolute;
    left: 0;
    bottom: 0;
    transform: translateY(100%);
    width: 100%;
    height: 70vh;
    max-height: 560px;
    min-height: 50vh;
    background: #ffffff;
    border-radius: 16px 16px 0 0;
    box-shadow: 0 -12px 28px rgba(0, 0, 0, 0.22);
    display: flex;
    flex-direction: column;
    transition: transform 0.2s ease;
    padding: 16px 18px calc(16px + env(safe-area-inset-bottom));
    box-sizing: border-box;
}


.comment-modal.open .comment-sheet {
    transform: translateY(0);
}

.comment-sheet-head {
    height: 40px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
}

.comment-sheet-title {
    margin: 0;
    font-size: 16px;
    color: #151515;
    margin-right: auto;
}

.comment-sort {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    align-items: center;
    width: clamp(92px, 24vw, 112px);
    height: 28px;
    background: #f4f5f7;
    border-radius: 999px;
    padding: 2px;
    box-sizing: border-box;
    position: relative;
}

.comment-sort-indicator {
    position: absolute;
    top: 2px;
    left: 2px;
    width: calc((100% - 4px) / 2);
    height: calc(100% - 4px);
    border-radius: 999px;
    background: rgb(152, 224, 172);
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.08);
    transition: transform 0.2s ease;
}

.comment-sort[data-order="hot"] .comment-sort-indicator {
    transform: translateX(100%);
}

.comment-sort-btn {
    border: none;
    background: transparent;
    color: #173a22;
    font-size: 12px;
    line-height: 1;
    width: 100%;
    min-width: 0;
    height: 24px;
    padding: 0;
    box-sizing: border-box;
    border-radius: 999px;
    cursor: pointer;
    position: relative;
    z-index: 1;
    display: inline-flex;
    align-items: center;
    justify-content: center;
}

.comment-sort-btn.active {
    color: #173a22;
}

.comment-sort-btn:focus-visible {
    outline: 2px solid rgba(152, 224, 172, 0.5);
    outline-offset: 2px;
}

.comment-sheet-close {
    border: none;
    background: transparent;
    font-size: 24px;
    line-height: 1.1;
    color: #666;
    cursor: pointer;
}

.comment-list {
    overflow-y: auto;
    flex: 1 1 auto;
    min-height: 0;
    margin: 6px 0;
    padding: 0 6px;
    touch-action: pan-y;
    -webkit-overflow-scrolling: touch;
}

.comment-skeleton {
    display: flex;
    gap: 10px;
    padding: 10px 0;
    border-bottom: 1px solid #f1f1f1;
}

.comment-skeleton-avatar {
    width: 32px;
    height: 32px;
    border-radius: 50%;
    background: #f0f0f0;
    flex: 0 0 32px;
}

.comment-skeleton-lines {
    flex: 1 1 auto;
}

.comment-skeleton-line {
    height: 10px;
    background: #f2f2f2;
    border-radius: 6px;
    margin-bottom: 6px;
}

.comment-skeleton-line.short {
    width: 40%;
}

.comment-skeleton-line.long {
    width: 70%;
}

.comment-item {
    border-bottom: 1px solid #f1f1f1;
    padding: 10px 0;
    display: flex;
    gap: 10px;
}

.comment-item.is-reply-target {
    background: rgba(152, 224, 172, 0.08);
    border-radius: 8px;
    margin: 0 -8px;
    padding-left: 8px;
    padding-right: 8px;
}

.comment-avatar {
    width: 32px;
    height: 32px;
    border-radius: 50%;
    object-fit: cover;
    flex: 0 0 32px;
}

.comment-main {
    flex: 1 1 auto;
    min-width: 0;
}

.comment-meta {
    display: flex;
    align-items: center;
    gap: 8px;
    color: #757575;
    font-size: 12px;
    margin-bottom: 2px;
}

.comment-author {
    color: #2d2d2d;
    font-weight: 500;
    max-width: 170px;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.comment-content {
    margin-top: 3px;
    color: #171717;
    font-size: 14px;
    line-height: 1.45;
    white-space: pre-wrap;
    word-break: break-word;
}

.comment-content.is-deleted {
    color: #8f8f8f;
}

.comment-actions {
    display: flex;
    align-items: center;
    gap: 14px;
    margin-top: 4px;
    font-size: 12px;
    color: #8f8f8f;
}

.comment-reply {
    border: none;
    background: transparent;
    color: #6c6c6c;
    font-size: 12px;
    cursor: pointer;
    padding: 0;
}

.comment-delete {
    border: none;
    background: transparent;
    color: #999;
    font-size: 12px;
    cursor: pointer;
    padding: 2px 4px;
    border-radius: 4px;
    transition: color 0.15s ease, background 0.15s ease;
}

.comment-delete:hover {
    color: #ff5252;
    background: rgba(255, 82, 82, 0.06);
}

.comment-delete-confirm {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    background: rgba(255, 82, 82, 0.05);
    border-radius: 999px;
    padding: 2px 8px;
    animation: confirmFadeIn 0.15s ease;
}

@keyframes confirmFadeIn {
    from { opacity: 0; transform: scale(0.94); }
    to   { opacity: 1; transform: scale(1); }
}

.comment-delete-confirm-btn,
.comment-delete-cancel-btn {
    border: none;
    background: transparent;
    color: #999;
    font-size: 12px;
    cursor: pointer;
    padding: 0 2px;
    transition: color 0.15s ease;
}

.comment-delete-cancel-btn:hover {
    color: #555;
}

.comment-delete-confirm-btn {
    color: #ff5252;
}

.comment-delete-confirm-btn:hover {
    color: #e03030;
}

.comment-vote {
    border: none;
    background: transparent;
    color: #6c6c6c;
    font-size: 12px;
    cursor: pointer;
    padding: 0;
    display: inline-flex;
    align-items: center;
    gap: 4px;
}

.comment-vote-icon {
    color: #6c6c6c;
}

.comment-vote-icon svg {
    width: 16px;
    height: 16px;
    display: block;
    fill: none;
    stroke: currentColor;
}

.comment-vote.active {
}

.comment-vote.active .comment-vote-icon {
    color: rgb(152, 224, 172);
}

.comment-vote.active .comment-vote-icon svg {
    fill: currentColor;
    stroke: currentColor;
}

.comment-vote-count {
    color: #6c6c6c;
}

.comment-vote-count {
    min-width: 10px;
    text-align: left;
}

.comment-replies {
    margin-top: 8px;
    padding-left: 10px;
    border-left: 2px solid #f0f0f0;
}

.comment-reply-item {
    display: flex;
    gap: 8px;
    padding: 7px 0;
}

.comment-reply-item .comment-avatar {
    width: 24px;
    height: 24px;
    flex: 0 0 24px;
}

.comment-reply-to {
    color: #7c7c7c;
    font-size: 12px;
}

.comment-replies-more {
    border: none;
    background: transparent;
    color: #5f77c2;
    font-size: 12px;
    cursor: pointer;
    padding: 0;
    margin-top: 2px;
}

.comment-empty {
    color: #888;
    text-align: center;
    font-size: 13px;
    padding: 14px 0 10px;
}

.comment-load-more {
    border: none;
    background: #f4f5f7;
    color: #444;
    border-radius: 999px;
    font-size: 13px;
    padding: 8px 12px;
    align-self: center;
    margin: 6px 0 4px;
    cursor: pointer;
}

.comment-editor {
    border-top: 1px solid #f2f2f2;
    margin-top: 4px;
    padding-top: 8px;
}

.comment-input-wrap {
    position: relative;
}


.comment-reply-hint {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 8px;
    background: #f6f7fa;
    border-radius: 8px;
    padding: 4px 8px;
    font-size: 12px;
    color: #666;
    margin-bottom: 6px;
}

.comment-reply-hint[hidden] {
    display: none !important;
}

#commentReplyCancel {
    border: none;
    background: transparent;
    color: #6c6c6c;
    cursor: pointer;
    font-size: 12px;
    padding: 0 2px;
    line-height: 1.1;
}

.comment-editor textarea {
    width: 100%;
    resize: none;
    border: 1px solid #ececec;
    border-radius: 10px;
    padding: 8px 10px 18px 10px;
    font-size: 14px;
    line-height: 1.4;
    box-sizing: border-box;
    outline: none;
    background: #fafafa;
    color: #151515;
    overflow-y: hidden;
    user-select: text;
    -webkit-user-select: text;
    touch-action: auto;
}

.comment-editor textarea::placeholder {
    font-size: 13px;
}

.comment-editor textarea:focus {
    border-color: #d7d7d7;
    background: #fff;
}

.comment-editor-foot {
    margin-top: 6px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    color: #8a8a8a;
    font-size: 12px;
    gap: 10px;
}

.comment-editor-meta {
    display: flex;
    align-items: center;
    gap: 8px;
    min-width: 0;
}

.comment-hotkey-hint {
    color: #9a9a9a;
    font-size: 11px;
    white-space: nowrap;
}

.comment-editor-actions {
    display: flex;
    align-items: center;
    gap: 8px;
    position: relative;
}

.comment-emoji-btn {
    border: none;
    background: #fdf6f0;
    color: #3f3f3f;
    border-radius: 999px;
    width: 32px;
    height: 32px;
    padding: 0;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-size: 16px;
    cursor: pointer;
    transition: background-color 0.2s ease, color 0.2s ease, transform 0.2s ease;
}

.comment-emoji-btn:hover {
    background: #fef0e0;
    color: #1f1f1f;
    transform: translateY(-1px);
}

.comment-emoji-panel {
    position: absolute;
    right: 44px;
    bottom: 36px;
    background: #ffffff;
    border: 1px solid #efefef;
    box-shadow: 0 8px 18px rgba(0, 0, 0, 0.12);
    border-radius: 10px;
    padding: 8px;
    display: grid;
    grid-template-columns: repeat(6, 1fr);
    gap: 12px;
    z-index: 5;
}

.comment-emoji-panel[hidden] {
    display: none !important;
}

.comment-emoji-item {
    border: none;
    background: #f7f7f7;
    border-radius: 8px;
    font-size: 16px;
    width: 30px;
    height: 30px;
    cursor: pointer;
}

#commentSubmit {
    border: none;
    background: rgb(152, 224, 172);
    color: #173a22;
    border-radius: 999px;
    padding: 6px 12px;
    font-size: 13px;
    cursor: pointer;
}

#commentSubmit:disabled {
    background: #bdbdbd;
    cursor: not-allowed;
}

/* =========================
   Share Panel (Sketch)
   ========================= */
.share-modal {
    position: absolute;
    inset: 0;
    background: rgba(0, 0, 0, 0.32);
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.2s ease;
    z-index: 30;
}
@supports (backdrop-filter: blur(4px)) {
    .share-modal {
        backdrop-filter: blur(4px);
    }
}

.share-modal.open {
    opacity: 1;
    pointer-events: auto;
}

.share-sheet {
    position: absolute;
    left: 50%;
    top: 50%;
    width: min(64vw, 400px);
    max-height: none;
    height: auto;
    background: #ffffff;
    border-radius: 16px;
    padding: 10px 14px 14px;
    display: flex;
    flex-direction: column;
    gap: 8px;
    box-shadow: 0 12px 32px rgba(0, 0, 0, 0.22);
    opacity: 0;
    transform: translate(-50%, -46%);
    transition: opacity 0.15s ease, transform 0.15s ease;
    overflow: hidden;
}

.share-modal.open .share-sheet {
    opacity: 1;
    transform: translate(-50%, -50%);
    transition: opacity 0.25s cubic-bezier(0.34, 1.56, 0.64, 1), transform 0.25s cubic-bezier(0.34, 1.56, 0.64, 1);
}

.share-sheet-close {
    position: absolute;
    top: 2px;
    right: 8px;
    border: none;
    background: transparent;
    font-size: 24px;
    line-height: 1.1;
    color: #666;
    cursor: pointer;
    z-index: 1;
}

.share-poster {
    width: 84%;
    margin: 6px auto 0;
    background: #f9f7f4;
    border-radius: 12px;
    padding: 8px;
    display: flex;
    flex-direction: column;
    gap: 4px;
    position: relative;
    flex: 0 0 auto;
    min-height: 0;
}

.share-poster-title {
    text-align: center;
    font-weight: 500;
    font-size: 0.95em;
    letter-spacing: 0.04em;
    color: #000;
    font-family: inherit;
    font-kerning: none;
    text-rendering: geometricPrecision;
}

.share-poster-title::after {
    content: "";
    display: block;
    width: 18%;
    height: 1px;
    margin: 4px auto 2px;
    background: rgba(0, 0, 0, 0.06);
}

.share-poster-meta {
    color: #666;
    font-size: 0.85em;
    line-height: 1.25;
    font-weight: 500;
    text-align: left;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.share-poster-image-wrap {
    position: relative;
    width: 100%;
    border-radius: 10px;
    overflow: hidden;
    background: #ffffff;
}

.share-poster-img {
    width: 100%;
    height: 100%;
    display: block;
    object-fit: cover;
    object-position: center center;
}


.share-sheet-actions {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 0;
    width: 100%;
    flex: 0 0 auto;
}

.share-sheet-share {
    display: grid;
    grid-template-columns: repeat(5, minmax(50px, 1fr));
    gap: 8px 6px;
    justify-items: center;
}

.share-icon-btn {
    width: 56px;
    border: none;
    background: transparent;
    display: inline-flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 3px;
    cursor: pointer;
    padding: 2px 2px;
    box-shadow: none;
    transition: transform 0.15s ease, box-shadow 0.15s ease, border-color 0.15s ease;
    text-decoration: none;
}

.share-icon-btn:hover {
    transform: translateY(-2px);
}
.share-icon-btn:active {
    transform: scale(0.95) translateY(0);
    transition: transform 0.1s ease;
}

.share-icon-circle {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    border: 1px solid #ececec;
    background: #ffffff;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 2px 6px rgba(0, 0, 0, 0.06);
    transition: transform 0.15s ease, box-shadow 0.15s ease, border-color 0.15s ease;
}

.share-icon-btn:hover .share-icon-circle {
    transform: translateY(-2px);
    box-shadow: 0 4px 14px rgba(0, 0, 0, 0.10);
    border-color: #e0e0e0;
}

.share-icon-img {
    width: 24px;
    height: 24px;
    object-fit: contain;
}

.share-qr-img {
    position: absolute;
    right: 6px;
    bottom: 6px;
    width: 22%;
    height: auto;
    display: block;
    object-fit: contain;
    background: #ffffff;
    border-radius: 6px;
    padding: 3px;
    border: 1px solid #f0f0f0;
    box-shadow: 0 2px 6px rgba(0, 0, 0, 0.10);
}

.share-icon-label {
    font-size: 10px;
    font-weight: 500;
    color: #666;
    line-height: 1.1;
}

@media only screen and (min-width: 768px) {
    .share-sheet {
        width: min(44vw, 400px);
        max-height: none;
    }

    .share-poster {
        width: 78%;
    }
}

@media only screen and (max-width: 640px) {
    .share-sheet {
        width: min(86vw, 310px);
        max-height: none;
        padding: 8px 12px 12px;
        gap: 8px;
        border-radius: 14px;
    }

    .share-poster {
        width: 88%;
        margin: 8px auto 0;
        padding: 6px;
        gap: 3px;
        border-radius: 10px;
    }

    .share-poster-title {
        font-size: 0.85em;
    }

    .share-poster-title::after {
        width: 16%;
        margin: 3px auto 1px;
    }

    .share-poster-meta {
        font-size: 0.78em;
    }

    .share-poster-image-wrap {
        border-radius: 8px;
    }

    .share-sheet-share {
        grid-template-columns: repeat(5, minmax(36px, 1fr));
        gap: 6px 4px;
    }

    .share-icon-btn {
        width: 48px;
        gap: 2px;
    }

    .share-icon-circle {
        width: 32px;
        height: 32px;
    }

    .share-icon-img {
        width: 20px;
        height: 20px;
    }

    .share-icon-label {
        font-size: 9px;
    }

    .share-qr-img {
        right: 4px;
        bottom: 4px;
        width: 20%;
        padding: 2px;
        border-radius: 5px;
    }
}

/* =========================
   Compliance Footer
   ========================= */
.site-compliance-footer {
    position: absolute;
    left: 6px;
    right: 6px;
    bottom: env(safe-area-inset-bottom);
    display: flex;
    align-items: center;
    justify-content: space-between;
    flex-wrap: wrap;
    gap: var(--home-compliance-gap);
    row-gap: var(--home-compliance-row-gap);
    z-index: 12;
    color: rgba(255, 255, 255, 0.38);
    font-size: var(--home-compliance-font-size);
    line-height: 1.1;
    min-height: var(--home-footer-height);
    opacity: 0.36;
    transition: opacity 0.2s ease;
    pointer-events: auto;
}

.site-compliance-footer:hover,
.site-compliance-footer:focus-within {
    opacity: 0.66;
}

.site-compliance-left,
.site-compliance-right {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    padding: 0 2px;
    border-radius: 0;
    background: transparent;
    border: none;
    box-shadow: none;
    min-width: 0;
}

.site-compliance-left {
    flex: 0 1 auto;
    justify-content: center;
    white-space: nowrap;
}

.site-compliance-right {
    flex: 0 1 auto;
    justify-content: center;
    white-space: nowrap;
}

.compliance-link {
    color: inherit;
    text-decoration: none;
    text-shadow: none;
}

.compliance-link:hover,
.compliance-link:focus-visible {
    opacity: 1;
    text-decoration: none;
}

.compliance-link:focus-visible {
    outline: none;
}

.compliance-separator {
    color: rgba(255, 255, 255, 0.16);
}

.compliance-psap-badge {
    display: inline-flex;
    align-items: center;
    min-width: 0;
}

.compliance-psap-badge a {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    color: inherit;
    text-decoration: none;
}

.compliance-psap-badge img {
    width: 10px;
    height: 10px;
    border-radius: 0;
    margin: 0;
    object-fit: contain;
    opacity: 0.72;
}

.wrapper:has(.comment-modal.open) .author-comment,
.wrapper:has(.share-modal.open) .author-comment,
.wrapper:has(.comment-modal.open) .interaction-buttons,
.wrapper:has(.share-modal.open) .interaction-buttons {
    opacity: 0;
    pointer-events: none;
}

@media only screen and (max-width: 650px) {
    .site-compliance-footer {
        left: 8px;
        right: 8px;
        bottom: env(safe-area-inset-bottom);
        min-height: var(--home-footer-height);
        color: rgba(255, 255, 255, 0.38);
        font-size: var(--home-compliance-font-size);
        gap: var(--home-compliance-gap);
        justify-content: space-between;
        row-gap: var(--home-compliance-row-gap);
        opacity: 0.36;
    }

    .site-compliance-footer:hover,
    .site-compliance-footer:focus-within {
        opacity: 0.66;
    }

    .site-compliance-left {
        flex: 0 1 auto;
        max-width: 100%;
        white-space: normal;
    }

    .site-compliance-left,
    .site-compliance-right {
        gap: 5px;
        padding: 0 1px;
        background: transparent;
    }

    .compliance-separator {
        color: rgba(255, 255, 255, 0.16);
    }

    .compliance-psap-badge img {
        width: 10px;
        height: 10px;
        opacity: 0.72;
    }
}

/* =========================
   Toast (Share only)
   ========================= */
.toast-container {
    position: absolute;
    right: 3%;
    bottom: calc(3% + env(safe-area-inset-bottom));
    display: flex;
    flex-direction: column;
    gap: 8px;
    z-index: 40;
    pointer-events: none;
}

.toast {
    background: rgba(30, 30, 30, 0.92);
    color: #ffffff;
    padding: 10px 16px;
    border-radius: 12px;
    font-size: 0.95em;
    box-shadow: 0 8px 20px rgba(0, 0, 0, 0.20);
    opacity: 0;
    transform: translateY(4px);
    transition: opacity 0.2s ease, transform 0.2s ease;
    pointer-events: none;
}
@supports (backdrop-filter: blur(8px)) {
    .toast {
        background: rgba(30, 30, 30, 0.78);
        backdrop-filter: blur(8px);
    }
}

.toast.show {
    opacity: 1;
    transform: translateY(0);
}














.author-follow-text {
    display: inline-flex;
    align-items: center;
    font-size: 0.75em;
    line-height: 1;
}






