/* ================= 比奇堡主题 ================= */
:root {
    --sea-top:    #6fd6f2;
    --sea-mid:    #1b7fa8;
    --sea-deep:   #06334d;
    --sea-floor:  #02203a;
    --sand:       #f0dca0;
    --sand-dark:  #c9a85f;
    --patrick:    #ff8fb8;
    --squid:      #7fd1b9;
    --pineapple:  #f5a623;
    --ink:        #eaf7ff;
    --ink-dim:    rgba(234, 247, 255, .68);
    --glass:      rgba(255, 255, 255, .10);
    --glass-line: rgba(255, 255, 255, .22);
    --shadow:     rgba(2, 32, 58, .45);
}

* { margin: 0; padding: 0; box-sizing: border-box; }

html, body { height: 100%; }

body {
    font-family: "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei",
                 "Noto Sans CJK SC", "Source Han Sans SC", system-ui, sans-serif;
    color: var(--ink);
    background: var(--sea-floor);
    overflow: hidden;
    /* 章鱼哥光标 */
    cursor: url("../images/squidward-cursor.png") 24 24, auto;
}

/* 可点击元素用另一只手型（仍保留章鱼哥风格描边） */
a, button, .card {
    cursor: url("../images/squidward-cursor.png") 24 24, pointer;
}

/* ============ 海洋背景 ============ */
.sea {
    position: fixed;
    inset: 0;
    z-index: 0;
    background: linear-gradient(180deg,
        var(--sea-top) 0%,
        #3fa8cf 18%,
        var(--sea-mid) 45%,
        var(--sea-deep) 78%,
        var(--sea-floor) 100%);
    overflow: hidden;
}

.sunrays {
    position: absolute;
    top: -20%;
    left: -10%;
    width: 120%;
    height: 70%;
    background: repeating-linear-gradient(100deg,
        rgba(255,255,255,.13) 0 26px,
        rgba(255,255,255,0) 26px 92px);
    filter: blur(7px);
    transform-origin: top center;
    animation: ray 14s ease-in-out infinite alternate;
    pointer-events: none;
}
@keyframes ray {
    from { transform: translateX(-24px) skewX(-3deg); opacity: .55; }
    to   { transform: translateX(24px)  skewX(3deg);  opacity: .85; }
}

/* 气泡 */
.bubbles { position: absolute; inset: 0; pointer-events: none; }
.bubble {
    position: absolute;
    bottom: -80px;
    border-radius: 50%;
    background: radial-gradient(circle at 32% 30%,
        rgba(255,255,255,.92) 0%,
        rgba(255,255,255,.30) 38%,
        rgba(255,255,255,.06) 70%);
    border: 1px solid rgba(255,255,255,.42);
    box-shadow: inset 0 0 6px rgba(255,255,255,.5);
    animation: rise linear infinite;
}
@keyframes rise {
    0%   { transform: translateY(0) translateX(0) scale(.7); opacity: 0; }
    12%  { opacity: .85; }
    50%  { transform: translateY(-52vh) translateX(26px) scale(1); }
    88%  { opacity: .6; }
    100% { transform: translateY(-112vh) translateX(-18px) scale(1.15); opacity: 0; }
}

/* 海草 */
.kelp {
    position: absolute;
    bottom: 0;
    width: 120px;
    height: 42vh;
    background: linear-gradient(180deg, rgba(38,166,120,0) 0%, rgba(38,166,120,.42) 55%, rgba(24,120,90,.62) 100%);
    clip-path: polygon(46% 0%, 58% 12%, 44% 26%, 60% 40%, 42% 56%, 58% 72%, 34% 100%, 66% 100%, 82% 72%, 66% 56%, 84% 40%, 68% 26%, 82% 12%, 70% 0%);
    transform-origin: bottom center;
    animation: sway 7s ease-in-out infinite alternate;
    opacity: .55;
    pointer-events: none;
}
.kelp-l { left: 2vw; }
.kelp-r { right: 2vw; animation-duration: 9s; animation-delay: -3s; }
@keyframes sway {
    from { transform: rotate(-5deg) scaleY(.97); }
    to   { transform: rotate(5deg)  scaleY(1.03); }
}

/* ============ 滚动容器：全屏分段吸附 ============ */
.ocean {
    position: relative;
    z-index: 2;
    height: 100vh;
    overflow-y: scroll;
    scroll-snap-type: y mandatory;
    scroll-behavior: smooth;
    scrollbar-width: none;
}
.ocean::-webkit-scrollbar { display: none; }

.depth {
    min-height: 100vh;
    scroll-snap-align: start;
    scroll-snap-stop: always;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 8vh 6vw;
    position: relative;
}

/* 每段内容进场：滚动到位才浮现 */
.depth > * {
    opacity: 0;
    transform: translateY(38px);
    transition: opacity .8s ease, transform .8s cubic-bezier(.22,.9,.3,1);
}
.depth.in > * { opacity: 1; transform: none; }
.depth.in > :nth-child(2) { transition-delay: .10s; }
.depth.in > :nth-child(3) { transition-delay: .18s; }
.depth.in > :nth-child(4) { transition-delay: .26s; }
.depth.in > :nth-child(5) { transition-delay: .34s; }

/* ============ 第一段 Hero ============ */
.hero-inner { text-align: center; max-width: 720px; }

.avatar-wrap {
    position: relative;
    width: 168px;
    height: 168px;
    margin: 0 auto 26px;
    display: flex;
    align-items: center;
    justify-content: center;
}
.avatar {
    width: 148px;
    height: 148px;
    border-radius: 50%;
    object-fit: cover;
    border: 4px solid rgba(255,255,255,.75);
    box-shadow: 0 14px 38px var(--shadow), 0 0 0 8px rgba(255,143,184,.18);
    animation: patrick 3.4s ease-in-out infinite;
}
/* 派大星会动：上下浮 + 左右摆 */
@keyframes patrick {
    0%, 100% { transform: translateY(0)     rotate(-4deg) scale(1); }
    25%      { transform: translateY(-11px) rotate(0deg)  scale(1.02); }
    50%      { transform: translateY(-4px)  rotate(4deg)  scale(1); }
    75%      { transform: translateY(-13px) rotate(1deg)  scale(1.01); }
}
.avatar-ring {
    position: absolute;
    inset: -10px;
    border-radius: 50%;
    border: 2px dashed rgba(255,255,255,.45);
    animation: spin 18s linear infinite;
}
@keyframes spin { to { transform: rotate(360deg); } }

.avatar-bubbles { position: absolute; inset: -18px; pointer-events: none; }
.avatar-bubbles i {
    position: absolute;
    bottom: 10%;
    width: 12px; height: 12px;
    border-radius: 50%;
    background: radial-gradient(circle at 30% 30%, #fff, rgba(255,255,255,.25));
    border: 1px solid rgba(255,255,255,.6);
    animation: pop 3s ease-in infinite;
}
.avatar-bubbles i:nth-child(1) { left: 4%;  animation-delay: 0s;   }
.avatar-bubbles i:nth-child(2) { left: 22%; animation-delay: .6s;  width: 8px; height: 8px; }
.avatar-bubbles i:nth-child(3) { left: 50%; animation-delay: 1.2s; width: 14px; height: 14px; }
.avatar-bubbles i:nth-child(4) { left: 74%; animation-delay: 1.8s; width: 9px; height: 9px; }
.avatar-bubbles i:nth-child(5) { left: 92%; animation-delay: 2.4s; width: 11px; height: 11px; }
@keyframes pop {
    0%   { transform: translateY(0) scale(.5); opacity: 0; }
    25%  { opacity: .9; }
    100% { transform: translateY(-150px) scale(1.15); opacity: 0; }
}

.hello {
    font-size: .95rem;
    letter-spacing: .28em;
    color: var(--ink-dim);
    margin-bottom: 10px;
}
.name {
    font-size: clamp(2rem, 6.4vw, 3.6rem);
    font-weight: 800;
    letter-spacing: .04em;
    line-height: 1.25;
    background: linear-gradient(100deg, #fff 10%, #ffe3ef 45%, #b9f3ff 90%);
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
    text-shadow: 0 10px 30px rgba(0,0,0,.25);
}
.name .comma { opacity: .8; }

.tagline {
    margin-top: 14px;
    font-size: 1.02rem;
    color: var(--ink-dim);
}

.meta-row {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    justify-content: center;
    margin: 26px 0 30px;
}
.chip {
    padding: 7px 15px;
    border-radius: 999px;
    background: var(--glass);
    border: 1px solid var(--glass-line);
    backdrop-filter: blur(6px);
    font-size: .86rem;
    color: var(--ink-dim);
}

.cta-row { display: flex; gap: 14px; justify-content: center; flex-wrap: wrap; }
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    border: none;
    border-radius: 999px;
    padding: 13px 30px;
    font-size: 1rem;
    font-weight: 600;
    font-family: inherit;
    text-decoration: none;
    transition: transform .25s ease, box-shadow .25s ease, background .25s ease;
}
.btn-main {
    background: linear-gradient(120deg, var(--patrick), #ffb3cf);
    color: #5b1734;
    box-shadow: 0 10px 26px rgba(255,143,184,.42);
}
.btn-main:hover { transform: translateY(-4px) scale(1.03); box-shadow: 0 16px 34px rgba(255,143,184,.55); }
.btn-ghost {
    background: var(--glass);
    color: var(--ink);
    border: 1px solid var(--glass-line);
}
.btn-ghost:hover { background: rgba(255,255,255,.2); transform: translateY(-4px); }

/* 比奇堡天际线 */
.skyline {
    position: absolute;
    left: 0; right: 0; bottom: 0;
    height: 22vh;
    min-height: 130px;
    pointer-events: none;
}
.skyline svg { width: 100%; height: 100%; display: block; }
.skyline .sand { fill: var(--sand); }
.skyline .house { opacity: .82; }
.skyline .house-pineapple path { fill: var(--pineapple); }
.skyline .house-pineapple .leaf { fill: #4caf7d; }
.skyline .house-head path { fill: #8fa9c4; }
.skyline .house-rock path { fill: #7e8fa3; }
.skyline .house-block rect { fill: #6fa8c9; }
.skyline .house-jelly path { fill: #f79ac0; }
.skyline .win  { fill: #fff3b0; opacity: .9; }
.skyline .door { fill: #3b2a1e; opacity: .8; }
.skyline .house { animation: bob 6s ease-in-out infinite; transform-origin: bottom center; }
.skyline .house-head  { animation-delay: -1s; }
.skyline .house-rock  { animation-delay: -2.2s; }
.skyline .house-block { animation-delay: -3.4s; }
.skyline .house-jelly { animation-delay: -4.6s; }
@keyframes bob {
    0%, 100% { transform: translateY(0) scale(1); }
    50%      { transform: translateY(-4px) scale(1.006); }
}

.scroll-tip {
    position: absolute;
    bottom: 24vh;
    left: 50%;
    transform: translateX(-50%);
    font-size: .8rem;
    letter-spacing: .2em;
    color: var(--ink-dim);
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 8px;
    animation: tipfade 2.6s ease-in-out infinite;
}
.scroll-tip span {
    width: 22px; height: 34px;
    border: 2px solid var(--ink-dim);
    border-radius: 12px;
    position: relative;
}
.scroll-tip span::after {
    content: "";
    position: absolute;
    top: 6px; left: 50%;
    width: 4px; height: 8px;
    margin-left: -2px;
    border-radius: 2px;
    background: var(--ink);
    animation: wheel 1.8s ease-in-out infinite;
}
@keyframes wheel { 0%,100% { transform: translateY(0); opacity:1; } 60% { transform: translateY(10px); opacity:0; } }
@keyframes tipfade { 0%,100% { opacity: .45; } 50% { opacity: .95; } }

/* ============ 段标题 ============ */
.sec-head { text-align: center; margin-bottom: 42px; }
.sec-kicker {
    font-size: .78rem;
    letter-spacing: .42em;
    color: var(--squid);
    margin-bottom: 8px;
}
.sec-title {
    font-size: clamp(1.6rem, 4.4vw, 2.4rem);
    font-weight: 700;
}

/* ============ 第二段 文章卡片 ============ */
.cards {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(258px, 1fr));
    gap: 22px;
    width: min(1080px, 92vw);
}
.card {
    background: var(--glass);
    border: 1px solid var(--glass-line);
    border-radius: 20px;
    overflow: hidden;
    backdrop-filter: blur(10px);
    display: flex;
    flex-direction: column;
    transition: transform .35s cubic-bezier(.22,.9,.3,1), box-shadow .35s ease, border-color .35s ease;
}
.card:hover {
    transform: translateY(-12px) scale(1.015);
    box-shadow: 0 26px 50px rgba(2,32,58,.5);
    border-color: rgba(255,143,184,.6);
}
.card-poster {
    height: 108px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: linear-gradient(135deg, #ffb347 0%, #ff8fb8 100%);
}
.card-poster.alt  { background: linear-gradient(135deg, #7fd1b9 0%, #4fc3f7 100%); }
.card-poster.alt2 { background: linear-gradient(135deg, #b39ddb 0%, #80deea 100%); }
.poster-emoji { font-size: 2.6rem; filter: drop-shadow(0 6px 12px rgba(0,0,0,.25)); }
.card:hover .poster-emoji { animation: wiggle .7s ease-in-out; }
@keyframes wiggle {
    0%,100% { transform: rotate(0); }
    30% { transform: rotate(-14deg) scale(1.1); }
    60% { transform: rotate(12deg) scale(1.14); }
}
.card-body { padding: 18px 20px 20px; display: flex; flex-direction: column; gap: 9px; flex: 1; }
.badge {
    align-self: flex-start;
    font-size: .74rem;
    padding: 3px 11px;
    border-radius: 999px;
    background: rgba(255,143,184,.24);
    border: 1px solid rgba(255,143,184,.5);
    color: #ffd7e6;
}
.badge.tech { background: rgba(127,209,185,.22); border-color: rgba(127,209,185,.5); color: #d3fff2; }
.card-title { font-size: 1.16rem; font-weight: 700; }
.card-desc { font-size: .9rem; line-height: 1.7; color: var(--ink-dim); flex: 1; }
.card-foot {
    display: flex;
    justify-content: space-between;
    font-size: .8rem;
    color: rgba(234,247,255,.5);
    padding-top: 8px;
    border-top: 1px dashed var(--glass-line);
}

.more {
    margin-top: 34px;
    color: var(--squid);
    text-decoration: none;
    font-size: .95rem;
    padding: 8px 18px;
    border-radius: 999px;
    border: 1px solid rgba(127,209,185,.45);
    transition: all .3s ease;
}
.more:hover { background: rgba(127,209,185,.18); transform: translateY(-3px); }

/* ============ 第三段 简历 ============ */
.profile {
    display: grid;
    grid-template-columns: 240px 1fr;
    gap: 40px;
    align-items: center;
    width: min(900px, 92vw);
    background: var(--glass);
    border: 1px solid var(--glass-line);
    border-radius: 26px;
    padding: 38px 40px;
    backdrop-filter: blur(12px);
    box-shadow: 0 24px 54px rgba(2,32,58,.4);
}
.profile-left { text-align: center; }
.profile-avatar {
    width: 150px; height: 150px;
    border-radius: 50%;
    object-fit: cover;
    border: 4px solid rgba(255,255,255,.7);
    box-shadow: 0 12px 30px var(--shadow);
    animation: patrick 3.4s ease-in-out infinite;
}
.profile-sign {
    margin-top: 16px;
    font-size: 1.02rem;
    letter-spacing: .06em;
    color: #ffe3ef;
    font-weight: 600;
}
.profile-right { display: flex; flex-direction: column; gap: 14px; }
.line { display: flex; gap: 14px; align-items: baseline; }
.line-key {
    flex: 0 0 62px;
    font-size: .8rem;
    color: var(--squid);
    letter-spacing: .12em;
    text-align: right;
}
.line-key::after { content: "："; }
.line-val { font-size: .98rem; line-height: 1.65; color: var(--ink); }
.tags { display: flex; flex-wrap: wrap; gap: 9px; margin-left: 76px; margin-top: 4px; }
.tag {
    font-size: .78rem;
    padding: 4px 13px;
    border-radius: 999px;
    background: rgba(255,255,255,.12);
    border: 1px solid var(--glass-line);
    color: var(--ink-dim);
}

/* ============ 第四段 靠岸 ============ */
.dock-inner { text-align: center; }
.dock-title { font-size: clamp(1.8rem, 5vw, 2.8rem); font-weight: 800; }
.dock-desc { margin: 12px 0 30px; color: var(--ink-dim); }
.dock-links { display: flex; gap: 16px; justify-content: center; flex-wrap: wrap; }
.dock-link {
    padding: 11px 26px;
    border-radius: 999px;
    background: var(--glass);
    border: 1px solid var(--glass-line);
    color: var(--ink);
    text-decoration: none;
    font-size: .95rem;
    transition: all .3s ease;
}
.dock-link:hover { background: rgba(255,255,255,.22); transform: translateY(-4px); }
.copyright { margin-top: 46px; font-size: .82rem; color: rgba(234,247,255,.42); }

.depth-end { background: linear-gradient(180deg, transparent, rgba(2,32,58,.55)); }

/* ============ 右侧导航圆点 ============ */
.dots {
    position: fixed;
    right: 26px;
    top: 50%;
    transform: translateY(-50%);
    z-index: 20;
    display: flex;
    flex-direction: column;
    gap: 18px;
}
.dot {
    width: 12px; height: 12px;
    border-radius: 50%;
    border: 2px solid rgba(255,255,255,.6);
    background: transparent;
    position: relative;
    transition: all .35s ease;
}
.dot span {
    position: absolute;
    right: 24px;
    top: 50%;
    transform: translateY(-50%) translateX(8px);
    white-space: nowrap;
    font-size: .78rem;
    color: var(--ink);
    opacity: 0;
    pointer-events: none;
    transition: all .3s ease;
    background: rgba(2,32,58,.6);
    padding: 3px 10px;
    border-radius: 8px;
}
.dot:hover span { opacity: 1; transform: translateY(-50%) translateX(0); }
.dot.is-on { background: var(--patrick); border-color: #fff; transform: scale(1.35); box-shadow: 0 0 14px rgba(255,143,184,.8); }

/* 光标提示气泡 */
.cursor-hint {
    position: fixed;
    top: 22px;
    left: 50%;
    transform: translateX(-50%) translateY(-24px);
    z-index: 30;
    padding: 9px 18px;
    border-radius: 999px;
    background: rgba(2,32,58,.72);
    border: 1px solid var(--glass-line);
    color: var(--ink);
    font-size: .85rem;
    opacity: 0;
    transition: all .5s ease;
    pointer-events: none;
    backdrop-filter: blur(8px);
}
.cursor-hint.show { opacity: 1; transform: translateX(-50%) translateY(0); }

/* ============ 旧页面兼容（文章/关于/归档） ============ */
.article, .about, .archive {
    max-width: 760px;
    margin: 0 auto;
    padding: 90px 24px 80px;
    position: relative;
    z-index: 2;
}
.article-header { text-align: center; margin-bottom: 38px; }
.article-title { font-size: clamp(1.6rem, 4.6vw, 2.2rem); font-weight: 800; margin-bottom: 14px; }
.article-meta { display: flex; justify-content: center; gap: 18px; color: var(--ink-dim); font-size: .88rem; flex-wrap: wrap; }
.article-content { line-height: 1.95; font-size: 1.04rem; }
.article-content h2 {
    font-size: 1.35rem;
    color: var(--patrick);
    margin: 34px 0 16px;
    padding-left: 13px;
    border-left: 4px solid var(--patrick);
}
.article-content p { margin-bottom: 20px; }
.article-content ul { margin: 0 0 20px 24px; }
.article-content li { margin-bottom: 8px; }
.article-content code {
    background: rgba(127,209,185,.2);
    color: #d3fff2;
    padding: 2px 8px;
    border-radius: 5px;
    font-size: .9em;
}
.article-content pre {
    background: rgba(2,32,58,.75);
    border: 1px solid var(--glass-line);
    padding: 20px;
    border-radius: 14px;
    overflow-x: auto;
    margin: 22px 0;
}
.article-content pre code { background: none; padding: 0; }
.article-content blockquote {
    border-left: 4px solid var(--squid);
    background: rgba(127,209,185,.12);
    padding: 15px 20px;
    margin: 22px 0;
    border-radius: 0 14px 14px 0;
    color: var(--ink-dim);
}
.about-card {
    background: var(--glass);
    border: 1px solid var(--glass-line);
    border-radius: 26px;
    padding: 44px;
    text-align: center;
    backdrop-filter: blur(12px);
    box-shadow: 0 24px 54px rgba(2,32,58,.4);
}
.about-avatar {
    width: 104px; height: 104px;
    border-radius: 50%;
    margin: 0 auto 18px;
    background-size: cover;
    background-position: center;
    background-image: url("../images/patrick.png");
    border: 4px solid rgba(255,255,255,.7);
    animation: patrick 3.4s ease-in-out infinite;
}
.about-name { font-size: 1.5rem; font-weight: 700; margin-bottom: 12px; }
.about-bio { color: var(--ink-dim); line-height: 1.85; margin-bottom: 24px; }
.about-links { display: flex; gap: 14px; justify-content: center; flex-wrap: wrap; }
.about-link {
    display: inline-flex;
    align-items: center;
    gap: 7px;
    padding: 10px 22px;
    border-radius: 999px;
    background: linear-gradient(120deg, var(--patrick), #ffb3cf);
    color: #5b1734;
    text-decoration: none;
    font-size: .92rem;
    font-weight: 600;
    transition: transform .3s ease;
}
.about-link:hover { transform: translateY(-3px); }
.archive-title { font-size: 1.8rem; font-weight: 800; margin-bottom: 30px; text-align: center; }
.archive-year {
    font-size: 1.15rem; font-weight: 700; color: var(--patrick);
    margin: 22px 0 10px; padding-left: 12px; border-left: 3px solid var(--patrick);
}
.archive-list { list-style: none; }
.archive-item {
    display: flex; align-items: center; gap: 18px;
    padding: 13px 0;
    border-bottom: 1px dashed var(--glass-line);
}
.archive-item a { color: var(--ink); text-decoration: none; font-weight: 500; transition: color .3s ease; }
.archive-item a:hover { color: var(--patrick); }
.archive-date { color: var(--ink-dim); font-size: .85rem; min-width: 62px; }

.header {
    position: fixed;
    top: 0; left: 0; right: 0;
    z-index: 50;
    background: rgba(2,32,58,.6);
    backdrop-filter: blur(10px);
    border-bottom: 1px solid var(--glass-line);
}
.header-content {
    max-width: 900px; margin: 0 auto;
    padding: 14px 22px;
    display: flex; align-items: center; justify-content: space-between;
}
.logo { display: flex; align-items: center; gap: 9px; text-decoration: none; color: var(--ink); font-weight: 700; }
.logo-icon { font-size: 1.4rem; animation: patrick 3.4s ease-in-out infinite; display: inline-block; }
.nav { display: flex; gap: 6px; }
.nav-link {
    text-decoration: none; color: var(--ink-dim);
    padding: 7px 15px; border-radius: 999px; font-size: .92rem;
    transition: all .3s ease;
}
.nav-link:hover, .nav-link.active { background: var(--patrick); color: #5b1734; }

.footer {
    position: relative; z-index: 2;
    background: rgba(2,32,58,.6);
    border-top: 1px solid var(--glass-line);
    padding: 26px 22px; text-align: center;
}
.footer p { color: var(--ink-dim); font-size: .86rem; margin-bottom: 6px; }
.footer-links a { color: var(--squid); text-decoration: none; }
.divider { margin: 0 12px; color: var(--ink-dim); }

/* 旧页面（非分段滚动）需要能正常滚动 */
body.legacy .sea { position: fixed; }
body.legacy { overflow-y: auto; height: auto; }

/* ============ 写作入口 & 管理员浮层 ============ */
.sec-head-row {
    display: flex;
    align-items: flex-end;
    justify-content: space-between;
    gap: 20px;
    text-align: left;
    max-width: 1080px;
    width: 100%;
    margin: 0 auto 30px;
}
.sec-head-row .sec-kicker, .sec-head-row .sec-title { text-align: left; }
.btn-write {
    flex: none;
    padding: 12px 24px;
    font-size: .92rem;
    background: rgba(255,255,255,.12);
    border: 1px solid var(--glass-line);
    color: var(--ink);
    border-radius: 999px;
    backdrop-filter: blur(10px);
    transition: transform .3s ease, background .3s ease, box-shadow .3s ease;
}
.btn-write:hover { transform: translateY(-4px); background: rgba(255,255,255,.22); }
.btn-write.is-admin {
    background: linear-gradient(120deg, var(--patrick), #ffb3cf);
    border-color: transparent;
    color: #5b1734;
    box-shadow: 0 12px 28px rgba(255,143,184,.4);
}
.journal-status {
    max-width: 1080px;
    width: 100%;
    margin: 0 auto 18px;
    font-size: .86rem;
    color: var(--ink-dim);
}

.sheet {
    position: fixed;
    inset: 0;
    z-index: 200;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 22px;
    background: rgba(2,20,38,.72);
    backdrop-filter: blur(8px);
    animation: sheetIn .3s ease;
    cursor: url("../images/squidward-cursor.png") 24 24, auto;
}
@keyframes sheetIn { from { opacity: 0; } to { opacity: 1; } }
.sheet-card {
    position: relative;
    width: min(430px, 100%);
    background: linear-gradient(170deg, rgba(27,127,168,.5), rgba(6,51,77,.85));
    border: 1px solid var(--glass-line);
    border-radius: 26px;
    padding: 36px 32px 30px;
    box-shadow: 0 30px 70px rgba(0,0,0,.45);
    animation: pop .4s cubic-bezier(.2,1.2,.4,1);
}
.sheet-close {
    position: absolute;
    top: 12px; right: 16px;
    background: none;
    border: none;
    color: var(--ink-dim);
    font-size: 1.5rem;
    line-height: 1;
}
.sheet-close:hover { color: var(--patrick); }
.sheet-kicker { font-size: .72rem; letter-spacing: .28em; color: var(--squid); margin-bottom: 10px; }
.sheet-title { font-size: 1.3rem; font-weight: 800; margin-bottom: 12px; }
.sheet-desc { font-size: .86rem; line-height: 1.75; color: var(--ink-dim); margin-bottom: 22px; }
.sheet-input {
    width: 100%;
    padding: 13px 16px;
    border-radius: 14px;
    border: 1px solid var(--glass-line);
    background: rgba(2,32,58,.5);
    color: var(--ink);
    font-size: .96rem;
    font-family: inherit;
    margin-bottom: 14px;
}
.sheet-input:focus { outline: none; border-color: var(--patrick); }
.sheet-submit { width: 100%; justify-content: center; }
.sheet-msg { min-height: 22px; margin-top: 12px; font-size: .84rem; color: var(--squid); }
.sheet-msg.is-error { color: #ffb0b0; }

/* ============ 编辑器 & 阅读页 ============ */
.studio {
    max-width: 1240px;
    margin: 0 auto;
    padding: 26px 22px 60px;
}
.studio-bar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
    flex-wrap: wrap;
    margin-bottom: 22px;
}
.studio-id { display: flex; align-items: center; gap: 12px; }
.studio-avatar {
    width: 44px; height: 44px;
    border-radius: 50%;
    background: url("../images/patrick.png") center/cover;
    border: 2px solid rgba(255,255,255,.6);
    animation: patrick 3.4s ease-in-out infinite;
}
.studio-name { font-weight: 700; }
.studio-state { font-size: .8rem; color: var(--ink-dim); }
.studio-actions { display: flex; gap: 10px; flex-wrap: wrap; }
.btn-sm { padding: 9px 18px; font-size: .86rem; border-radius: 999px; }
.btn-danger { background: rgba(255,120,140,.16); border: 1px solid rgba(255,140,160,.4); color: #ffd6de; }
.btn-danger:hover { background: rgba(255,120,140,.3); }

.pane-grid {
    display: grid;
    grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
    gap: 20px;
    align-items: start;
}
.pane {
    background: var(--glass);
    border: 1px solid var(--glass-line);
    border-radius: 22px;
    padding: 20px;
    backdrop-filter: blur(12px);
}
.field-row { display: flex; gap: 12px; margin-bottom: 12px; flex-wrap: wrap; }
.field { display: flex; flex-direction: column; gap: 6px; flex: 1; min-width: 140px; }
.field-label { font-size: .76rem; letter-spacing: .1em; color: var(--ink-dim); }
.field input, .field textarea, .field select {
    padding: 11px 13px;
    border-radius: 12px;
    border: 1px solid var(--glass-line);
    background: rgba(2,32,58,.55);
    color: var(--ink);
    font-family: inherit;
    font-size: .92rem;
    resize: vertical;
}
.field input:focus, .field textarea:focus, .field select:focus { outline: none; border-color: var(--patrick); }
.editor-area {
    width: 100%;
    min-height: 58vh;
    margin-top: 4px;
    padding: 16px;
    border-radius: 16px;
    border: 1px solid var(--glass-line);
    background: rgba(2,32,58,.6);
    color: var(--ink);
    font-family: "SFMono-Regular", Consolas, "Liberation Mono", monospace;
    font-size: .9rem;
    line-height: 1.8;
    resize: vertical;
}
.editor-area:focus { outline: none; border-color: var(--patrick); }
.toolbar { display: flex; gap: 8px; flex-wrap: wrap; margin-bottom: 8px; }
.tool {
    padding: 6px 12px;
    border-radius: 10px;
    border: 1px solid var(--glass-line);
    background: rgba(255,255,255,.08);
    color: var(--ink);
    font-size: .8rem;
}
.tool:hover { background: rgba(255,255,255,.2); }
.preview-pane { min-height: 58vh; }
.preview-title { font-size: 1.5rem; font-weight: 800; margin-bottom: 8px; }
.preview-meta { font-size: .8rem; color: var(--ink-dim); margin-bottom: 20px; display: flex; gap: 14px; flex-wrap: wrap; }

.post-list { display: flex; flex-direction: column; gap: 10px; }
.post-row {
    display: flex;
    align-items: center;
    gap: 14px;
    padding: 12px 14px;
    border-radius: 14px;
    background: rgba(2,32,58,.4);
    border: 1px solid var(--glass-line);
}
.post-row:hover { background: rgba(27,127,168,.4); }
.post-row .row-emoji { font-size: 1.3rem; }
.post-row .row-main { flex: 1; min-width: 0; }
.post-row .row-title { font-weight: 600; font-size: .95rem; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.post-row .row-sub { font-size: .76rem; color: var(--ink-dim); }
.pill {
    font-size: .7rem;
    padding: 3px 10px;
    border-radius: 999px;
    border: 1px solid var(--glass-line);
    color: var(--ink-dim);
}
.pill.on { color: #d3fff2; border-color: rgba(127,209,185,.55); background: rgba(127,209,185,.18); }
.pill.off { color: #ffe3b0; border-color: rgba(245,166,35,.5); background: rgba(245,166,35,.15); }
.row-btn {
    padding: 7px 13px;
    border-radius: 10px;
    border: 1px solid var(--glass-line);
    background: rgba(255,255,255,.08);
    color: var(--ink);
    font-size: .78rem;
}
.row-btn:hover { background: rgba(255,255,255,.2); }
.row-btn.del:hover { background: rgba(255,120,140,.28); border-color: rgba(255,140,160,.5); }

.toast {
    position: fixed;
    left: 50%;
    bottom: 38px;
    transform: translateX(-50%) translateY(20px);
    z-index: 300;
    padding: 12px 24px;
    border-radius: 999px;
    background: rgba(6,51,77,.95);
    border: 1px solid var(--patrick);
    color: var(--ink);
    font-size: .88rem;
    opacity: 0;
    pointer-events: none;
    transition: opacity .3s ease, transform .3s ease;
}
.toast.show { opacity: 1; transform: translateX(-50%) translateY(0); }
.toast.is-error { border-color: #ff8fa3; }

.read-wrap { max-width: 820px; margin: 0 auto; padding: 30px 22px 80px; }
.read-back {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    margin-bottom: 26px;
    padding: 9px 18px;
    border-radius: 999px;
    background: rgba(255,255,255,.1);
    border: 1px solid var(--glass-line);
    color: var(--ink);
    text-decoration: none;
    font-size: .86rem;
}
.read-back:hover { background: rgba(255,255,255,.2); }
.read-card {
    background: var(--glass);
    border: 1px solid var(--glass-line);
    border-radius: 26px;
    padding: 42px clamp(20px, 5vw, 52px);
    backdrop-filter: blur(12px);
    box-shadow: 0 24px 54px rgba(2,32,58,.4);
}
.md-body h1 { font-size: 1.7rem; font-weight: 800; margin: 26px 0 14px; }
.md-body h2 { font-size: 1.32rem; font-weight: 700; margin: 30px 0 14px; padding-left: 12px; border-left: 4px solid var(--patrick); }
.md-body h3 { font-size: 1.1rem; font-weight: 700; margin: 24px 0 10px; color: var(--squid); }
.md-body h4 { font-size: 1rem; font-weight: 700; margin: 20px 0 8px; color: var(--ink-dim); }
.md-body p { margin-bottom: 18px; line-height: 1.95; }
.md-body ul, .md-body ol { margin: 0 0 20px 26px; }
.md-body li { margin-bottom: 8px; line-height: 1.85; }
.md-body a { color: var(--patrick); }
.md-body img { max-width: 100%; border-radius: 16px; margin: 10px 0; }
.md-body hr { border: none; border-top: 1px dashed var(--glass-line); margin: 28px 0; }

/* ============ 响应式 ============ */
@media (max-width: 720px) {
    .dots { display: none; }
    .profile { grid-template-columns: 1fr; gap: 26px; padding: 30px 22px; }
    .tags { margin-left: 0; justify-content: center; }
    .line { flex-direction: column; gap: 2px; }
    .line-key { flex: none; text-align: left; }
    .depth { padding: 7vh 6vw 26vh; }
    .skyline { height: 16vh; }
    .avatar-wrap { width: 132px; height: 132px; }
    .avatar { width: 116px; height: 116px; }
    .sec-head-row { flex-direction: column; align-items: center; text-align: center; }
    .sec-head-row .sec-kicker, .sec-head-row .sec-title { text-align: center; }
    .pane-grid { grid-template-columns: 1fr; }
    .editor-area, .preview-pane { min-height: 42vh; }
}

@media (prefers-reduced-motion: reduce) {
    *, *::before, *::after { animation: none !important; transition: none !important; }
}
