/* 手机端首页与个人记录（<=900px 独立加载）：画上卡叠拼贴、轻量独立微风、横滑字条与纸签列表 */

.site-header {
    min-height: 0;
    padding: calc(20px + env(safe-area-inset-top, 0px)) var(--gutter) 16px;
}
.header-main {
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto;
    align-items: center;
    row-gap: 7px;
    column-gap: 14px;
}
.logo-area {
    display: contents;
}
.site-title {
    grid-column: 1;
    grid-row: 1;
    font-size: clamp(19px, 5.2vw, 24px);
    letter-spacing: clamp(1.5px, 0.45vw, 3px);
    white-space: nowrap;
}
.site-subtitle {
    grid-column: 1 / -1;
    grid-row: 2;
    font-size: clamp(9px, 2.5vw, 10.5px);
    letter-spacing: 2.2px;
    margin-top: 0;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}
.site-nav {
    grid-column: 2;
    grid-row: 1;
    gap: 22px;
    margin-right: 0;
    flex-shrink: 0;
}
.nav-btn {
    font-size: clamp(16.5px, 4.4vw, 18px);
    letter-spacing: 2px;
    padding: 6px 3px;
    white-space: nowrap;
}

/* 手机端保留约 60% 幅度的独立纸片微风，小纸片同样独立掀角 */
@keyframes mobilePaperBreeze {
    0%, 100% { transform: rotate(-1.6deg) translate3d(0, 0, 0); }
    18%      { transform: rotate(-2.3deg) translate3d(1.2px, -2.2px, 0); }
    34%      { transform: rotate(-1.9deg) translate3d(0.6px, -1.1px, 0); }
    50%      { transform: rotate(-1.2deg) translate3d(-0.6px, 0.3px, 0); }
    70%      { transform: rotate(-2.1deg) translate3d(0.9px, -1.7px, 0); }
    86%      { transform: rotate(-1.4deg) translate3d(-0.3px, -0.3px, 0); }
}

@keyframes mobilePaperShadow {
    0%, 100% { transform: translate3d(-1px, 0, 0) scaleX(1); opacity: 0.85; }
    18%      { transform: translate3d(8px, 3px, 0) scaleX(1.04); opacity: 0.68; }
    34%      { transform: translate3d(4px, 1px, 0) scaleX(1.01); opacity: 0.80; }
    50%      { transform: translate3d(-4px, -1px, 0) scaleX(0.98); opacity: 0.90; }
    70%      { transform: translate3d(6px, 2px, 0) scaleX(1.03); opacity: 0.72; }
    86%      { transform: translate3d(-2px, 0, 0) scaleX(0.99); opacity: 0.86; }
}

@keyframes mobileNoteBreeze {
    0%, 100% { transform: rotate(2.0deg) translate3d(0, 0, 0); }
    19%      { transform: rotate(-0.6deg) translate3d(0.8px, -1.8px, 0); }
    33%      { transform: rotate(1.1deg) translate3d(0.3px, -0.6px, 0); }
    47%      { transform: rotate(-0.1deg) translate3d(0.6px, -1.3px, 0); }
    68%      { transform: rotate(2.5deg) translate3d(-0.3px, 0.4px, 0); }
    85%      { transform: rotate(1.4deg) translate3d(0.2px, -0.4px, 0); }
}

@keyframes mobileNoteShadow {
    0%, 100% { transform: translate3d(0, 0, 0) scale(1); opacity: 0.82; }
    19%      { transform: translate3d(4px, 3.5px, 0) scale(1.06); opacity: 0.56; }
    33%      { transform: translate3d(1.8px, 1.4px, 0) scale(1.02); opacity: 0.72; }
    47%      { transform: translate3d(3px, 2.8px, 0) scale(1.04); opacity: 0.62; }
    68%      { transform: translate3d(-0.8px, -0.4px, 0) scale(0.98); opacity: 0.88; }
    85%      { transform: translate3d(1px, 0.8px, 0) scale(1.01); opacity: 0.78; }
}

.featured-left,
.mood-note {
    -webkit-backface-visibility: hidden;
    backface-visibility: hidden;
}

@media (prefers-reduced-motion: reduce) {
    .featured-left,
    .featured-left::after,
    .mood-note,
    .mood-note::after {
        animation: none !important;
    }
}

.rotate-hint {
    display: none !important;
}

.showcase-dots {
    flex: 1;
    min-width: 0;
    flex-wrap: nowrap;
    overflow-x: auto;
    overflow-y: hidden;
    scrollbar-width: none;
    -webkit-overflow-scrolling: touch;
    gap: 4px;
    padding-bottom: 2px;
}
.showcase-dots::-webkit-scrollbar {
    display: none;
}

.s-dot {
    flex: 0 0 auto;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 32px;
    min-height: 34px;
    padding: 3px 5px;
    font-size: 13.5px;
}
.s-dot:active {
    opacity: 0.6;
}
.showcase-switch:active,
.enter-gallery-btn:active {
    opacity: 0.82;
}

/* 竖屏首页：放大画框且上下留足空白，纸卡尺度维持精致协调 */
@media (orientation: portrait) {
    #view-featured {
        padding: 24px var(--gutter) calc(102px + env(safe-area-inset-bottom, 0px));
    }
    .featured-split-layout {
        flex-direction: column;
        justify-content: flex-start;
        height: auto;
        min-height: 0;
        gap: 0;
        align-items: center;
    }
    .featured-right {
        order: 1;
        z-index: 1;
        flex: none;
        width: 100%;
        height: auto;
        padding: 0;
    }
    .showcase-arrow {
        display: none;
    }
    .showcase-stage {
        height: clamp(244px, 36dvh, 318px);
        max-height: none;
        width: 100%;
    }
    .showcase-slide .art-frame-wrapper {
        padding: 9px;
    }
    .showcase-slide .art-frame-wrapper img {
        max-width: min(84vw, 316px);
        max-height: calc(clamp(244px, 36dvh, 318px) - 20px);
    }
    .showcase-slide .text-only-card {
        padding: 18px 16px;
        max-width: 88%;
    }
    .showcase-slide .text-only-card h3 {
        font-size: 17px;
        margin-bottom: 10px;
    }
    .showcase-slide .text-only-card .text-only-body,
    .showcase-slide .text-only-card p {
        font-size: 13px;
        line-height: 1.85;
    }

    .featured-card-wrap {
        order: 2;
        z-index: 3;
        flex: none;
        width: min(86%, 332px);
        margin: 38px auto 0;
        transform: none;
        display: block;
    }
    .featured-left {
        flex: none;
        width: 100%;
        min-height: 0;
        padding: 54px 20px 22px 20px;
        transform: rotate(-1.6deg);
        animation: mobilePaperBreeze 18s ease-in-out infinite;
    }
    .featured-left::after {
        display: block;
        left: 7%;
        right: 6%;
        bottom: -10px;
        height: 20px;
        filter: blur(10px);
        opacity: 0.85;
        animation: mobilePaperShadow 18s ease-in-out infinite;
        animation-delay: -2.4s;
    }

    .paper-tape {
        top: -13px;
        left: -6px;
        width: 42px;
        height: 22px;
        transform: rotate(35deg);
    }
    .mood-note {
        top: -8px;
        left: 2px;
        width: 136px;
        padding: 16px 9px 8px;
        gap: 5px;
        transform: rotate(2.0deg);
        transform-origin: 6% 10%;
        animation: mobileNoteBreeze 9.6s ease-in-out infinite;
        animation-delay: -2.7s;
    }
    .mood-note::after {
        animation: mobileNoteShadow 9.6s ease-in-out infinite;
        animation-delay: -2.7s;
    }
    .mood-date {
        font-size: 8px;
        letter-spacing: 1.4px;
    }
    .mood-content {
        margin-top: 2px;
        font-size: 10.5px;
        line-height: 1.55;
        letter-spacing: 0.4px;
    }

    .hero-exhibition-title .title-main {
        font-size: clamp(20px, 5.3vw, 24px);
        letter-spacing: 1.8px;
        line-height: 1.32;
        word-break: break-word;
    }
    .hero-exhibition-date {
        margin-top: 7px;
        font-size: 10.5px;
        letter-spacing: 2.5px;
    }
    .hero-exhibition-quote {
        margin-top: 12px;
        padding-top: 11px;
        font-size: clamp(12.5px, 3.4vw, 13.5px);
        line-height: 1.82;
        letter-spacing: 0.6px;
    }
    .showcase-switch {
        margin-top: 14px;
        padding-top: 11px;
    }
    .switch-row {
        gap: 10px;
        flex-wrap: nowrap;
    }
    .switch-index {
        font-size: 11px;
        letter-spacing: 1.8px;
    }
    .progress-bar-bg {
        margin-top: 9px;
    }
    .hero-action {
        margin-top: 15px;
    }
    .enter-gallery-btn {
        min-height: 40px;
        padding: 9px 22px;
        font-size: 13px;
        letter-spacing: 2px;
    }

    @media (min-width: 600px) {
        .showcase-stage {
            height: clamp(300px, 40dvh, 400px);
        }
        .showcase-slide .art-frame-wrapper img {
            max-width: min(500px, 74vw);
            max-height: calc(clamp(300px, 40dvh, 400px) - 24px);
        }
        .featured-card-wrap {
            width: min(76%, 460px);
            max-width: 460px;
            margin: 44px auto 0;
        }
        .featured-left {
            padding: 66px 28px 28px 28px;
        }
    }
}

/* 横屏首页：迷你电脑分栏 */
@media (orientation: landscape) {
    .site-header {
        padding: 6px 20px;
    }
    .header-main {
        display: flex;
    }
    .logo-area {
        display: block;
    }
    .site-title {
        font-size: 19px;
        letter-spacing: 2px;
    }
    .site-subtitle {
        font-size: 8px;
        letter-spacing: 1.6px;
        margin-top: 2px;
    }
    .nav-btn {
        font-size: 13.5px;
        letter-spacing: 1.2px;
    }
    #view-featured {
        padding: 6px 20px 14px;
    }
    .featured-split-layout {
        flex-direction: row;
        align-items: stretch;
        justify-content: space-between;
        height: auto;
        min-height: calc(100dvh - 58px);
        gap: 22px;
    }
    .featured-card-wrap {
        flex: 0 0 45%;
        width: 45%;
        display: flex;
        transform: none;
        margin-top: 0;
    }
    .featured-left {
        width: 100%;
        min-height: 0;
        justify-content: center;
        padding: 50px 16px 14px 18px;
        transform: rotate(-1.2deg);
        animation: mobilePaperBreeze 18s ease-in-out infinite;
    }
    .featured-left::after {
        left: 5%;
        right: 4%;
        bottom: -8px;
        height: 16px;
        filter: blur(8px);
        animation: mobilePaperShadow 18s ease-in-out infinite;
        animation-delay: -2.4s;
    }
    .paper-tape {
        width: 40px;
        height: 20px;
        top: -10px;
        left: -6px;
    }
    .mood-note {
        top: -6px;
        left: 0;
        width: 128px;
        padding: 16px 8px 7px;
        gap: 5px;
        transform-origin: 6% 10%;
        animation: mobileNoteBreeze 9.6s ease-in-out infinite;
        animation-delay: -2.7s;
    }
    .mood-note::after {
        animation: mobileNoteShadow 9.6s ease-in-out infinite;
        animation-delay: -2.7s;
    }
    .mood-dot {
        width: 3.5px;
        height: 3.5px;
        margin-top: 4px;
    }
    .mood-date {
        font-size: 8px;
        letter-spacing: 1.1px;
    }
    .mood-content {
        margin-top: 2px;
        font-size: 10px;
        line-height: 1.5;
        letter-spacing: 0.4px;
    }
    .hero-exhibition-title .title-main {
        font-size: clamp(19px, 4.4vh, 26px);
        letter-spacing: 1.5px;
        line-height: 1.25;
    }
    .hero-exhibition-date {
        margin-top: 5px;
        font-size: 10px;
        letter-spacing: 2px;
    }
    .hero-exhibition-quote {
        margin-top: 8px;
        padding-top: 8px;
        font-size: clamp(11.5px, 2.8vh, 13.5px);
        line-height: 1.65;
        letter-spacing: 0.5px;
    }
    .showcase-switch {
        margin-top: 10px;
        padding-top: 8px;
    }
    .switch-row {
        gap: 0;
        min-height: 0;
    }
    .switch-index {
        display: none;
    }
    .s-dot {
        min-width: 26px;
        min-height: 32px;
        padding: 2px 4px;
        font-size: 13px;
    }
    .progress-bar-bg {
        margin-top: 6px;
    }
    .hero-action {
        margin-top: 10px;
    }
    .enter-gallery-btn {
        min-height: 36px;
        padding: 8px 18px;
        font-size: 12px;
        letter-spacing: 1.8px;
    }
    .featured-right {
        flex: 1;
        width: auto;
        height: auto;
        padding-bottom: 0;
        min-height: 0;
        align-self: stretch;
    }
    .showcase-stage {
        height: 100%;
        max-height: none;
        min-height: 0;
    }
    .showcase-slide .art-frame-wrapper {
        padding: 9px;
    }
    .showcase-slide .art-frame-wrapper img {
        max-width: 100%;
        max-height: calc(100dvh - 104px);
    }
    .showcase-arrow {
        display: flex;
        width: 32px;
        height: 32px;
        margin: 0 6px;
        font-size: 16px;
    }
}

/* 个人记录列表 */
#view-archive.active {
    max-height: calc(100dvh - var(--header-h));
    padding: 18px var(--gutter) calc(96px + env(safe-area-inset-bottom, 0px));
}
.archive-intro {
    font-size: 13px;
    line-height: 1.8;
    margin: 2px 2px 10px;
}
.archive-toolbar,
.archive-toolbar.is-stuck {
    position: static;
    flex-direction: column;
    align-items: stretch;
    gap: 12px;
    padding: 10px 2px 16px;
    margin-bottom: 4px;
    background: transparent;
    backdrop-filter: none;
    -webkit-backdrop-filter: none;
    box-shadow: none;
    border-bottom: 1px solid rgba(95, 86, 72, 0.16);
}
.archive-filters {
    flex-wrap: nowrap;
    overflow-x: auto;
    overflow-y: hidden;
    scrollbar-width: none;
    -webkit-overflow-scrolling: touch;
    gap: 26px;
    padding-bottom: 2px;
}
.archive-filters::-webkit-scrollbar {
    display: none;
}
.archive-filter-btn {
    flex: 0 0 auto;
    font-size: 16.5px;
    letter-spacing: 2px;
    min-height: 40px;
}
.archive-tools {
    flex-direction: row;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    width: 100%;
}
.archive-search {
    flex: 1;
    min-width: 0;
    width: auto;
    font-size: 14px;
    padding: 6px 2px;
}
.archive-sort {
    flex-shrink: 0;
    gap: 12px;
}
.archive-sort-btn {
    font-size: 13.5px;
    letter-spacing: 1.2px;
    min-height: 36px;
    padding: 4px 2px;
}

.archive-item {
    grid-template-columns: 58px minmax(0, 1fr);
    grid-template-areas: "date main" "date tail";
    gap: 5px 14px;
    padding: 20px 6px 20px 2px;
    transition: transform 0.18s ease, border-color 0.3s ease;
}
.archive-item:not(.is-locked):active {
    transform: scale(0.992);
}
.archive-item:not(.is-locked):active::before {
    opacity: 1;
}
.ai-date {
    grid-area: date;
    padding-top: 3px;
}
.ai-year {
    font-size: 10px;
    letter-spacing: 2px;
}
.ai-day {
    font-size: 17.5px;
}
.ai-main {
    grid-area: main;
}
.ai-title {
    font-size: clamp(18px, 5vw, 21px);
    letter-spacing: 0.8px;
    line-height: 1.42;
}
.ai-summary {
    margin-top: 5px;
    font-size: 12.5px;
    line-height: 1.82;
}
.ai-tail {
    grid-area: tail;
    justify-content: flex-start;
    min-width: 0;
    padding-top: 0;
    margin-top: 6px;
}
.ai-category {
    font-size: 11.5px;
    letter-spacing: 2px;
}
.ai-arrow {
    display: none;
}
.archive-end {
    margin: 34px 0 60px;
}
