/* internal-portal.css — warm academic dual-entry portal
   Page-local; does not alter global lab site styles. */

html.switcher-page,
html.switcher-page body.switcher-page {
    height: 100%;
    max-width: 100%;
    overflow: hidden !important;
}

body.switcher-page {
    --ink: #1a3036;
    --ink-soft: #2a454c;
    --paper: #f6f0e6;
    --paper-deep: #ebe3d4;
    --cream: #fbf7f0;
    --gold: #b08a4a;
    --gold-soft: #c9a86a;
    --sage: #5a7a74;
    --mist: rgba(26, 48, 54, 0.06);
    --shadow: 0 18px 48px rgba(26, 48, 54, 0.14);
    background:
        radial-gradient(ellipse 80% 55% at 12% 18%, rgba(176, 138, 74, 0.14), transparent 55%),
        radial-gradient(ellipse 70% 50% at 88% 82%, rgba(90, 122, 116, 0.12), transparent 58%),
        linear-gradient(165deg, #f8f3ea 0%, #efe7d8 48%, #e8dfcf 100%);
    display: flex;
    flex-direction: column;
    height: 100vh;
    height: 100dvh;
    max-height: 100vh;
    max-height: 100dvh;
    overflow: hidden !important;
    color: var(--ink);
}

body.switcher-page .navbar {
    flex-shrink: 0;
    position: relative;
    z-index: 100;
    background: rgba(251, 247, 240, 0.88) !important;
    border-bottom: 1px solid rgba(26, 48, 54, 0.08) !important;
    box-shadow: 0 8px 28px rgba(26, 48, 54, 0.05) !important;
}

/* —— Stage —— */
.stage-main {
    position: relative;
    flex: 1 1 auto;
    min-height: 0;
    isolation: isolate;
    overflow: hidden;
}

/* Soft paper grain overlay */
.stage-main::before {
    content: "";
    position: absolute;
    inset: 0;
    z-index: 0;
    pointer-events: none;
    opacity: 0.45;
    background-image:
        url("data:image/svg+xml,%3Csvg viewBox='0 0 200 200' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.85' numOctaves='4' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)' opacity='0.55'/%3E%3C/svg%3E");
    background-size: 180px 180px;
    mix-blend-mode: multiply;
}

/* Ambient hydrate cage watermark */
.stage-motif {
    position: absolute;
    z-index: 0;
    right: 8%;
    bottom: 6%;
    width: min(420px, 48vw);
    height: min(420px, 48vw);
    opacity: 0.11;
    pointer-events: none;
    color: var(--ink);
    transition: opacity 0.5s ease, transform 0.8s cubic-bezier(0.22, 1, 0.36, 1);
}
.stage-main.is-board-open .stage-motif {
    opacity: 0.04;
    transform: scale(1.06);
}

/* —— Main entry: 内部管理系统 —— */
.stage-mgmt {
    position: absolute;
    inset: 0;
    z-index: 1;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: flex-start;
    padding: clamp(40px, 7vh, 88px) clamp(24px, 7vw, 108px);
    text-decoration: none;
    color: var(--ink);
    cursor: pointer;
    transition: filter 0.45s ease;
}
.stage-mgmt:focus-visible {
    outline: 2px solid var(--gold);
    outline-offset: -6px;
}

.stage-mgmt__panel {
    position: relative;
    z-index: 2;
    max-width: 560px;
    padding: clamp(28px, 4vh, 44px) clamp(28px, 4vw, 48px);
    border-radius: 22px;
    background:
        linear-gradient(145deg, rgba(251, 247, 240, 0.82) 0%, rgba(246, 240, 230, 0.72) 100%);
    border: 1px solid rgba(255, 255, 255, 0.65);
    box-shadow:
        var(--shadow),
        inset 0 1px 0 rgba(255, 255, 255, 0.75),
        0 1px 0 rgba(176, 138, 74, 0.12);
    backdrop-filter: blur(18px) saturate(1.15);
    -webkit-backdrop-filter: blur(18px) saturate(1.15);
    transition:
        transform 0.5s cubic-bezier(0.22, 1, 0.36, 1),
        box-shadow 0.45s ease,
        border-color 0.35s ease;
}

.stage-mgmt__glow {
    position: absolute;
    width: min(380px, 50vw);
    height: min(380px, 50vw);
    border-radius: 50%;
    top: 12%;
    left: 6%;
    background: radial-gradient(circle, rgba(176, 138, 74, 0.28), transparent 68%);
    filter: blur(52px);
    opacity: 0.55;
    pointer-events: none;
    z-index: 1;
    transition: transform 0.8s cubic-bezier(0.22, 1, 0.36, 1), opacity 0.4s ease;
}

.stage-mgmt__eyebrow {
    display: flex;
    align-items: center;
    gap: 10px;
    margin: 0 0 18px;
    color: var(--sage);
    font-size: 0.78rem;
    font-weight: 700;
    letter-spacing: 0.08em;
}
.stage-mgmt__eyebrow::before {
    content: "";
    width: 28px;
    height: 1.5px;
    background: linear-gradient(90deg, var(--gold), transparent);
    border-radius: 2px;
}

.stage-mgmt__seal {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    margin-bottom: 20px;
    padding: 6px 12px 6px 8px;
    border-radius: 999px;
    background: rgba(26, 48, 54, 0.05);
    border: 1px solid rgba(26, 48, 54, 0.08);
    font-size: 0.72rem;
    font-weight: 650;
    letter-spacing: 0.04em;
    color: var(--ink-soft);
}
.stage-mgmt__seal-dot {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: radial-gradient(circle at 35% 35%, #e8c98a, var(--gold));
    box-shadow: 0 0 0 3px rgba(176, 138, 74, 0.18);
}

.stage-mgmt h1 {
    margin: 0;
    color: var(--ink);
    font-family: "Songti SC", "Noto Serif SC", "Source Han Serif SC", "Georgia", "Times New Roman", serif;
    font-size: clamp(2rem, 4vw, 3rem);
    font-weight: 700;
    letter-spacing: 0.02em;
    line-height: 1.2;
}

.stage-mgmt__en {
    margin: 0 0 18px;
    font-size: 0.82rem;
    font-weight: 600;
    letter-spacing: 0.06em;
    color: rgba(26, 48, 54, 0.45);
}

.stage-mgmt__hint {
    margin: 0 0 28px;
    font-size: 1rem;
    line-height: 1.75;
    color: rgba(26, 48, 54, 0.68);
    max-width: 380px;
}

.stage-mgmt__meta {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin: 0 0 28px;
    padding: 0;
    list-style: none;
}
.stage-mgmt__meta li {
    font-size: 0.78rem;
    font-weight: 650;
    padding: 6px 12px;
    border-radius: 999px;
    background: rgba(90, 122, 116, 0.1);
    color: var(--sage);
    border: 1px solid rgba(90, 122, 116, 0.16);
}

.stage-mgmt__cta {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    font-size: 0.95rem;
    font-weight: 700;
    padding: 13px 24px;
    border-radius: 999px;
    background: var(--ink);
    color: var(--cream);
    border: 1px solid var(--ink);
    box-shadow: 0 12px 28px rgba(26, 48, 54, 0.22);
    transition: background 0.3s ease, transform 0.35s ease, box-shadow 0.35s ease;
}
.stage-mgmt__cta svg {
    width: 16px;
    height: 16px;
    transition: transform 0.35s ease;
}

@media (hover: hover) {
    .stage-mgmt:hover .stage-mgmt__glow {
        transform: scale(1.15) translate(12px, -8px);
        opacity: 0.75;
    }
    .stage-mgmt:hover .stage-mgmt__panel {
        transform: translateY(-4px);
        box-shadow:
            0 26px 56px rgba(26, 48, 54, 0.18),
            inset 0 1px 0 rgba(255, 255, 255, 0.85),
            0 1px 0 rgba(176, 138, 74, 0.18);
        border-color: rgba(176, 138, 74, 0.35);
    }
    .stage-mgmt:hover .stage-mgmt__cta {
        background: #243f45;
        transform: translateY(-1px);
        box-shadow: 0 16px 36px rgba(26, 48, 54, 0.3);
    }
    .stage-mgmt:hover .stage-mgmt__cta svg {
        transform: translateX(4px);
    }
}

.stage-main.is-board-open .stage-mgmt {
    filter: brightness(0.92) saturate(0.9);
    pointer-events: none;
}

/* —— Peek: 项目管理系统 —— */
.peek-board {
    position: absolute;
    z-index: 40;
    top: 0;
    right: 0;
    width: min(360px, 44vw);
    height: min(300px, 42vh);
    clip-path: polygon(18% 0, 100% 0, 100% 100%, 0 82%);
    pointer-events: auto;
    transition:
        width 0.65s cubic-bezier(0.22, 1, 0.36, 1),
        height 0.65s cubic-bezier(0.22, 1, 0.36, 1),
        clip-path 0.65s cubic-bezier(0.22, 1, 0.36, 1),
        box-shadow 0.45s ease;
}

.peek-board__hit {
    position: absolute;
    inset: 0;
    z-index: 5;
    border: none;
    padding: 0;
    margin: 0;
    cursor: pointer;
    background: transparent;
    pointer-events: auto;
    -webkit-tap-highlight-color: transparent;
}
.peek-board__hit:focus-visible {
    outline: 2px solid var(--gold);
    outline-offset: -4px;
}
.peek-board.is-expanded .peek-board__hit {
    pointer-events: none;
    opacity: 0;
}

.peek-board__glass {
    position: absolute;
    inset: 0;
    z-index: 0;
    background:
        linear-gradient(150deg,
            rgba(255, 252, 246, 0.88) 0%,
            rgba(236, 228, 212, 0.78) 48%,
            rgba(220, 232, 228, 0.7) 100%);
    backdrop-filter: blur(24px) saturate(1.25);
    -webkit-backdrop-filter: blur(24px) saturate(1.25);
    box-shadow:
        -14px 18px 48px rgba(26, 48, 54, 0.16),
        inset 0 1px 0 rgba(255, 255, 255, 0.7);
    border-left: 1px solid rgba(176, 138, 74, 0.28);
    border-bottom: 1px solid rgba(90, 122, 116, 0.14);
    transition: background 0.45s ease, box-shadow 0.45s ease;
    pointer-events: none;
}
.peek-board__glass::after {
    content: "";
    position: absolute;
    inset: 0;
    background:
        linear-gradient(135deg, rgba(255, 255, 255, 0.45) 0%, transparent 40%),
        radial-gradient(ellipse 55% 45% at 72% 28%, rgba(176, 138, 74, 0.2), transparent 70%);
    pointer-events: none;
}

.peek-board__label {
    position: absolute;
    z-index: 2;
    top: 20%;
    right: 12%;
    left: 26%;
    text-align: right;
    color: var(--ink);
    pointer-events: none;
    transition: opacity 0.35s ease, transform 0.5s cubic-bezier(0.22, 1, 0.36, 1);
}
.peek-board__tag {
    display: block;
    font-size: 0.68rem;
    font-weight: 700;
    letter-spacing: 0.1em;
    color: var(--sage);
    margin-bottom: 8px;
}
.peek-board__title {
    margin: 0;
    font-family: "Songti SC", "Noto Serif SC", "Source Han Serif SC", "Georgia", serif;
    font-size: clamp(1rem, 1.7vw, 1.2rem);
    font-weight: 700;
    letter-spacing: 0.04em;
    line-height: 1.35;
    color: var(--ink);
}
.peek-board__hint {
    margin: 0;
    font-size: 0.72rem;
    font-weight: 600;
    color: rgba(26, 48, 54, 0.5);
    letter-spacing: 0.04em;
}
.peek-board__hint svg {
    width: 12px;
    height: 12px;
    vertical-align: -1px;
    margin-left: 2px;
}

@media (hover: hover) {
    .peek-board:not(.is-expanded):hover {
        width: min(380px, 46vw);
        height: min(318px, 44vh);
    }
    .peek-board:not(.is-expanded):hover .peek-board__glass {
        background:
            linear-gradient(150deg,
                rgba(255, 252, 246, 0.95) 0%,
                rgba(236, 228, 212, 0.88) 48%,
                rgba(220, 232, 228, 0.8) 100%);
        box-shadow:
            -18px 22px 56px rgba(26, 48, 54, 0.2),
            inset 0 1px 0 rgba(255, 255, 255, 0.8);
    }
    .peek-board:not(.is-expanded):hover .peek-board__label {
        transform: translate(-4px, 2px);
    }
}

/* Soft gold seam (collapsed) */
.peek-board:not(.is-expanded)::before {
    content: "";
    position: absolute;
    z-index: 4;
    top: 0;
    left: 14%;
    width: 1.5px;
    height: 100%;
    background: linear-gradient(
        180deg,
        rgba(176, 138, 74, 0.7) 0%,
        rgba(176, 138, 74, 0.28) 55%,
        transparent 100%
    );
    transform: rotate(12deg);
    transform-origin: top left;
    pointer-events: none;
    opacity: 0.9;
    box-shadow: 0 0 14px rgba(176, 138, 74, 0.25);
    transition: opacity 0.3s ease;
}
.peek-board.is-expanded::before {
    opacity: 0;
}

/* Expanded board */
.peek-board.is-expanded {
    width: 100%;
    height: 100%;
    clip-path: polygon(0 0, 100% 0, 100% 100%, 0 100%);
    z-index: 20;
    cursor: default;
}
.peek-board.is-expanded .peek-board__glass {
    background:
        linear-gradient(155deg,
            rgba(251, 247, 240, 0.96) 0%,
            rgba(239, 232, 218, 0.94) 50%,
            rgba(228, 236, 232, 0.92) 100%);
    backdrop-filter: blur(28px) saturate(1.3);
    -webkit-backdrop-filter: blur(28px) saturate(1.3);
    box-shadow: none;
    border: none;
}
.peek-board.is-expanded .peek-board__label {
    opacity: 0;
    transform: scale(0.94);
}

.peek-board__expanded {
    position: absolute;
    inset: 0;
    z-index: 1;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    padding: 48px 32px;
    text-align: center;
    color: var(--ink);
    opacity: 0;
    visibility: hidden;
    transform: translateY(16px) scale(0.97);
    transition:
        opacity 0.4s ease 0.18s,
        transform 0.55s cubic-bezier(0.22, 1, 0.36, 1) 0.18s,
        visibility 0s linear 0.55s;
    pointer-events: none;
}
.peek-board.is-expanded .peek-board__expanded {
    z-index: 6;
    opacity: 1;
    visibility: visible;
    transform: none;
    transition:
        opacity 0.45s ease 0.2s,
        transform 0.55s cubic-bezier(0.22, 1, 0.36, 1) 0.2s,
        visibility 0s linear 0s;
    pointer-events: auto;
}

.peek-board__close {
    position: absolute;
    top: 24px;
    right: 24px;
    width: 44px;
    height: 44px;
    border-radius: 50%;
    border: 1px solid rgba(26, 48, 54, 0.12);
    background: rgba(255, 255, 255, 0.65);
    color: var(--ink);
    font-size: 1.35rem;
    line-height: 1;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: background 0.25s ease, transform 0.25s ease, box-shadow 0.25s ease;
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
}
.peek-board__close:hover {
    background: #fff;
    transform: scale(1.06);
    box-shadow: 0 8px 22px rgba(26, 48, 54, 0.12);
}
.peek-board__close:focus-visible {
    outline: 2px solid var(--gold);
    outline-offset: 2px;
}

.peek-board__exp-seal {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    margin-bottom: 18px;
    padding: 6px 14px 6px 10px;
    border-radius: 999px;
    background: rgba(26, 48, 54, 0.05);
    border: 1px solid rgba(26, 48, 54, 0.08);
    font-size: 0.74rem;
    font-weight: 650;
    color: var(--ink-soft);
}
.peek-board__exp-tag {
    display: block;
    font-size: 0.78rem;
    font-weight: 700;
    letter-spacing: 0.1em;
    color: var(--sage);
    margin-bottom: 12px;
}
.peek-board__expanded h2 {
    margin: 0;
    font-family: "Songti SC", "Noto Serif SC", "Source Han Serif SC", "Georgia", serif;
    font-size: clamp(1.85rem, 3.4vw, 2.55rem);
    font-weight: 700;
    letter-spacing: 0.03em;
    color: var(--ink);
}
.peek-board__exp-en {
    margin: 0 0 14px;
    font-size: 0.82rem;
    font-weight: 600;
    letter-spacing: 0.06em;
    color: rgba(26, 48, 54, 0.42);
}
.peek-board__exp-hint {
    margin: 0 0 32px;
    font-size: 1rem;
    line-height: 1.7;
    color: rgba(26, 48, 54, 0.62);
    max-width: 380px;
}
.peek-board__enter {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    font-size: 0.98rem;
    font-weight: 700;
    padding: 14px 28px;
    border-radius: 999px;
    background: var(--ink);
    color: var(--cream);
    border: 1px solid var(--ink);
    text-decoration: none;
    transition: background 0.3s ease, transform 0.35s ease, box-shadow 0.35s ease;
    box-shadow: 0 12px 30px rgba(26, 48, 54, 0.22);
}
.peek-board__enter:hover {
    background: #243f45;
    transform: translateY(-2px);
    box-shadow: 0 16px 36px rgba(26, 48, 54, 0.3);
}
.peek-board__enter:focus-visible {
    outline: 2px solid var(--gold);
    outline-offset: 3px;
}
.peek-board__enter svg {
    width: 16px;
    height: 16px;
    transition: transform 0.35s ease;
}
.peek-board__enter:hover svg {
    transform: translateX(4px);
}


.peek-board__title-link {
    display: inline-block;
    color: inherit;
    text-decoration: none;
}
.peek-board__title-link:hover h2 {
    color: var(--gold);
}
.peek-board__title-link:focus-visible {
    outline: 2px solid var(--gold);
    outline-offset: 6px;
}

/* Footer */
body.switcher-page .footer-minimal {
    flex-shrink: 0;
    margin-top: 0;
    background: #1a3036 !important;
    border-top: 1px solid rgba(176, 138, 74, 0.2);
    position: relative;
    z-index: 5;
}
body.switcher-page .footer-minimal .copyright { color: rgba(246, 240, 230, 0.55); }
body.switcher-page .footer-links a { color: rgba(246, 240, 230, 0.72); }
body.switcher-page .footer-links a:hover { color: var(--gold-soft); }
body.switcher-page .footer-links span { color: rgba(176, 138, 74, 0.35); }

/* Mobile */
@media (max-width: 860px) {
    .stage-mgmt {
        padding: 48px 20px 110px;
        align-items: stretch;
    }
    .stage-mgmt__panel {
        max-width: none;
        padding: 24px 22px;
        border-radius: 18px;
    }
    .stage-mgmt h1 {
        font-size: clamp(1.7rem, 7vw, 2.15rem);
    }
    .stage-mgmt__hint {
        font-size: 0.92rem;
        margin-bottom: 22px;
    }
    .stage-motif {
        width: min(280px, 70vw);
        height: min(280px, 70vw);
        right: -8%;
        bottom: 18%;
        opacity: 0.08;
    }
    .peek-board {
        width: min(210px, 54vw);
        height: min(178px, 28vh);
        clip-path: polygon(16% 0, 100% 0, 100% 100%, 0 76%);
    }
    .peek-board__label {
        top: 16%;
        right: 10%;
        left: 22%;
    }
    .peek-board__title { font-size: 0.9rem; }
    .peek-board__hint { font-size: 0.65rem; }
    .peek-board:not(.is-expanded):hover {
        width: min(220px, 56vw);
        height: min(186px, 29vh);
    }
    .peek-board.is-expanded {
        width: 100%;
        height: 100%;
        clip-path: polygon(0 0, 100% 0, 100% 100%, 0 100%);
    }
    .peek-board__close { top: 16px; right: 16px; }
    .peek-board__expanded { padding: 64px 22px 40px; }
    .peek-board__expanded h2 { font-size: clamp(1.5rem, 6vw, 2rem); }
}

@media (max-width: 420px) {
    .peek-board:not(.is-expanded) {
        width: 172px;
        height: 146px;
    }
    .peek-board__tag { font-size: 0.58rem; }
    .peek-board__title { font-size: 0.82rem; margin-bottom: 6px; }
    .peek-board__hint span { display: none; }
    .stage-mgmt__meta { gap: 6px; }
    .stage-mgmt__meta li { font-size: 0.7rem; padding: 5px 10px; }
}

@media (prefers-reduced-motion: reduce) {
    .stage-mgmt,
    .stage-mgmt__panel,
    .stage-mgmt__glow,
    .stage-mgmt__cta,
    .stage-mgmt__cta svg,
    .stage-motif,
    .peek-board,
    .peek-board__glass,
    .peek-board__label,
    .peek-board__expanded,
    .peek-board__enter,
    .peek-board__enter svg,
    .peek-board__close {
        transition: none !important;
    }
}
