.hamburger {
    display: none;
    margin-right: -0.5em;
}

@media (max-width: 828px) and (orientation: portrait) {
    :root {
        font-size: clamp(14px, 2vw + 10px, 17px);
    }

    #last-update.text {
        font-size: 1em !important;
        color: rgba(255, 255, 255, 0.9) !important;
        text-align: right !important;
        margin-top: -1em !important;
        padding-left: 1em !important;
        padding-right: 1em !important;

    }

    header {
        display: flex;
        flex-wrap: wrap;
        line-height: 1.8em;
        padding: 30px 30px;
        background-color: #47A8F2;
    }

    #index {
        position: relative;
        background-size: cover;
        background-position: center;
        background-repeat: no-repeat;
        display: flex;
        flex-direction: column;
        justify-content: center;
        align-items: center;
        text-align: center;
        color: white;
    }

    #index .title {
        max-width: 90%;
        text-align: center;
        font-size: clamp(2.2rem, 4vw + 1.4rem, 3rem);
        font-weight: normal;
        margin-top: -1em;
        margin-bottom: 0.3em;
        text-shadow: 4px 4px 10px rgba(0, 0, 0, 1);
        z-index: 2;
    }

    #index .text {
        text-align: center;
        justify-content: center;
        margin-bottom: 1.7em;
        font-size: clamp(1rem, 0.8vw + 0.9rem, 1.25rem);
        line-height: 1.8;
        color: white;
        text-shadow: 3px 3px 10px rgba(0, 0, 0, 1);
        z-index: 2;
    }

    .hamburger {
        display: flex;
        align-items: center;
        justify-content: center;
        cursor: pointer;
        position: absolute;
        right: 1.6em;
        top: 14px;
        z-index: 9999;
        width: 48px;
        height: 48px;
        border-radius: 14px;
        background: rgba(255, 255, 255, 0.18);
        border: 1px solid rgba(255, 255, 255, 0.35);
        box-shadow: 0 12px 24px rgba(0, 0, 0, 0.18);
        backdrop-filter: blur(10px);
        -webkit-backdrop-filter: blur(10px);
        transition: transform 0.25s ease, box-shadow 0.25s ease, background 0.25s ease;
    }

    .hamburger-line {
        position: absolute;
        left: 14px;
        right: 14px;
        height: 2px;
        background: rgba(255, 255, 255, 0.95);
        border-radius: 2px;
        transition: transform 0.3s ease, top 0.3s ease, opacity 0.2s ease, background 0.3s ease;
    }

    .hamburger-line:nth-child(1) {
        top: 17px;
    }

    .hamburger-line:nth-child(2) {
        top: 23px;
    }

    .hamburger-line:nth-child(3) {
        top: 29px;
    }

    /* 菜单展开时切换为深色以适配浅色背景 */
    .hamburger.open {
        background: rgba(255, 255, 255, 0.85);
        box-shadow: 0 18px 28px rgba(0, 0, 0, 0.22);
        transform: scale(1.02);
    }

    .hamburger.open .hamburger-line {
        background: #111;
    }

    .hamburger.open .hamburger-line:nth-child(1) {
        top: 23px;
        transform: rotate(45deg);
    }

    .hamburger.open .hamburger-line:nth-child(2) {
        opacity: 0;
    }

    .hamburger.open .hamburger-line:nth-child(3) {
        top: 23px;
        transform: rotate(-45deg);
    }

    .nav-liquid {
        display: none;
        font-size: 1.6em;
        flex-direction: column;
        background-color: rgba(255, 255, 255, 0.75);
        position: fixed;
        inset: 0;
        width: 100vw;
        height: 100dvh;
        min-height: 100dvh;
        box-sizing: border-box;

        opacity: 0;
        transform: translateY(-100%);
        transition:
            transform 1s cubic-bezier(0.4, 0, 0.2, 1),
            opacity 1s ease,
            background-color 1s ease;
        z-index: 1000;
        align-items: center;
        justify-content: flex-start;
        backdrop-filter: blur(18px);
        -webkit-backdrop-filter: blur(18px);
        padding: calc(18px + env(safe-area-inset-top)) 16px calc(22px + env(safe-area-inset-bottom)) 16px;
        gap: 1em;

    }

    .nav-liquid.show {
        display: flex;
        transform: translateY(0);
        opacity: 1;
        background: linear-gradient(180deg, rgba(255, 255, 255, 0.88), rgba(232, 242, 255, 0.95));
        overflow: auto;
        scroll-behavior: smooth;
    }

    .nav-liquid .nav-link {
        line-height: 1.1em;
        margin: 0;
        font-size: 1.1em;
        text-align: center;
        opacity: 0;
        transform: translateY(20px);
        animation: fadeInUp 0.8s ease forwards;
        animation-delay: calc(var(--i) * 0.1s);
        text-decoration: none;
        color: #13253b;
        cursor: pointer;
        padding: 10px 22px;
        border-radius: 999px;
        background: rgba(255, 255, 255, 0.65);
        border: 1px solid rgba(255, 255, 255, 0.65);
        box-shadow:
            0 10px 24px rgba(0, 0, 0, 0.12),
            inset 0 1px 0 rgba(255, 255, 255, 0.7);
    }

    .nav-liquid .nav-link.active {
        color: #0b2b4a;
        background: rgba(255, 255, 255, 0.85);
    }

    .lang-dropdown {
        font-size: 1em;
        margin-top: 0;
        padding: 10px 32px 10px 16px;
        border: 1px solid rgba(255, 255, 255, 0.6);
        border-radius: 999px;
        background-color: rgba(255, 255, 255, 0.65);
        color: #13253b;
        cursor: pointer;
        box-shadow:
            0 12px 24px rgba(0, 0, 0, 0.12),
            inset 0 1px 0 rgba(255, 255, 255, 0.7);
        backdrop-filter: blur(14px);
        -webkit-backdrop-filter: blur(14px);
        appearance: none;
        background-image: linear-gradient(45deg, transparent 50%, rgba(17, 17, 17, 0.6) 50%),
            linear-gradient(135deg, rgba(17, 17, 17, 0.6) 50%, transparent 50%);
        background-position: calc(100% - 14px) 50%, calc(100% - 8px) 50%;
        background-size: 6px 6px;
        background-repeat: no-repeat;
    }

    .lang-dropdown:focus-visible {
        outline: none;
        border-color: rgba(255, 255, 255, 0.85);
        box-shadow:
            inset 0 1px 0 rgba(255, 255, 255, 0.7),
            0 0 0 3px rgba(255, 255, 255, 0.25);
    }

    .nav-liquid.show .lang-dropdown {
        opacity: 0;
        transform: translateY(20px);
        animation: fadeInUp 0.8s ease forwards;
        animation-delay: calc(var(--i) * 0.1s);
    }

    .nav-liquid .liquid-indicator {
        display: none;
    }

    .lang-dropdown {
        --i: 4;
    }

    .log {
        --i: 7;
    }

    .logo {
        font-size: 1.2em;
        text-align: flex-start;
        font-weight: bold;
        color: rgba(255, 255, 255, 0.9);
        position: absolute;
        left: 2.7em;
        top: 17px;
    }

    :not(#index)>.title {
        max-width: 90%;
        text-align: center;
        font-size: 3em;
        font-weight: normal;
        margin: auto;
        margin-top: 2.5em;
        margin-bottom: 2.5em;
    }

    .subtitle {
        width: 90%;
        text-align: center;
        font-size: 2.7em;
        font-weight: normal;
        margin: auto;
        margin-top: 0.5em;
        margin-bottom: 0.5em;
        color: rgba(255, 255, 255, 0.9);
        overflow-wrap: anywhere;
        word-break: break-word;
        hyphens: auto;
    }

    :not(#index)>.text {
        text-align: center;
        margin: auto;
        margin-bottom: 1em;
        font-size: clamp(1.05rem, 1vw + 0.95rem, 1.3rem);
        line-height: 2;
        color: rgba(255, 255, 255, 0.9);
        max-width: 90%;
        padding-left: 1em;
        padding-right: 1em;
    }

    .gallery-cover {
        display: grid;
        grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
        gap: 20px;
        padding: 20px;
    }

    .gallery-cover img {
        width: 100%;
        height: auto;
        border-radius: 5px;
        box-shadow: 0 4px 8px rgba(0, 0, 0, 0.1);
        transition: transform 0.3s ease;
    }

    .gallery-cover img:hover {
        transform: scale(1.02);
    }

    .cat {
        font-size: 1.6em;
        display: grid;
        grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
        gap: 20px;
        margin-top: 0.5em;
        text-align: center;
    }

    .gallery-photo {
        display: flex;
        flex-direction: column;
        gap: 10px;
        padding: 10px;
    }

    .gallery-shell {
        display: none;
    }

    .gallery-photo div {
        position: relative;
        width: 80%;
        max-width: 1fr;
        margin: 0 auto;
        overflow: hidden;
    }

    .gallery-photo img {
        width: 100%;
        height: auto;
        display: block;
        object-fit: contain;
    }

    .gallery-photo div span {
        position: absolute;
        bottom: 10px;
        left: 10px;
        right: 0.5em;
        background-color: rgba(0, 0, 0, 0.6);
        color: white;
        font-size: 0.8em;
        padding: 5px 10px;
        border-radius: 3px;
        pointer-events: none;
        text-align: center;
    }

    @keyframes fadeInUp {
        from {
            opacity: 0;
            transform: translateY(0px);
        }

        to {
            opacity: 1;
            transform: translateY(20px);
        }
    }
}
