:root{--popo-pg-safe-bottom:env(safe-area-inset-bottom,0px)}
/* 登录页：沿用站点米白 + 品牌蓝，只做一张卡，不动其它页样式 */
.login-app{grid-template-columns:178px minmax(0,1fr)}
.login-main{position:relative;display:grid;place-items:center;min-width:0;height:100%;overflow-y:auto;
  padding:32px 28px;
  background:radial-gradient(circle at 14% 16%,rgba(86,122,206,.16),transparent 42%),
             radial-gradient(circle at 86% 84%,rgba(231,201,120,.2),transparent 38%),
             var(--paper,#fbfaf6)}
.login-card{width:min(430px,100%);padding:32px 32px 26px;border:1px solid rgba(86,122,206,.16);
  border-radius:24px;background:var(--paper,#fbfaf6);box-shadow:0 26px 70px rgba(29,39,61,.13)}
.login-eyebrow{color:var(--support,#567ace);font-size:10px;font-weight:700;letter-spacing:.22em}
.login-card h1{margin:9px 0 0;font:500 30px/1.2 Georgia,"Noto Serif SC","Noto Serif CJK SC","Source Han Serif SC","Songti SC",serif;letter-spacing:-.02em}
.login-sub{margin:7px 0 16px;color:var(--muted,#6d7688);font-size:12px;line-height:1.7}
.login-scope{display:grid;gap:7px;margin:0 0 18px;padding:12px 14px;border:1px solid rgba(86,122,206,.14);
  border-radius:14px;background:rgba(86,122,206,.045)}
.login-scope p{margin:0;color:#6d7889;font-size:11.5px;line-height:1.7}
.login-scope b{color:#4568b7;font-weight:600}
.login-badge{display:flex;align-items:center;gap:10px;margin:0 0 16px;padding:10px 12px;
  border:1px solid rgba(86,122,206,.18);border-radius:13px;background:rgba(86,122,206,.07)}
.login-badge[hidden]{display:none}
.login-badge-mail{flex:1;min-width:0;overflow:hidden;text-overflow:ellipsis;white-space:nowrap;
  color:#344f8c;font-size:12px}
.login-badge-out{flex:none;border:0;border-radius:9px;padding:6px 10px;background:#fff;
  min-height:44px;color:#4a69b8;font-size:11px;cursor:pointer;box-shadow:0 4px 12px rgba(46,63,96,.08)}
.login-badge-out:hover{box-shadow:0 7px 18px rgba(46,63,96,.13)}
.login-field{display:grid;gap:6px;margin:0 0 14px}
.login-field span{color:#788294;font-size:10.5px;letter-spacing:.1em}
.login-field input{width:100%;padding:12px 14px;border:1px solid rgba(86,122,206,.22);border-radius:13px;
  min-height:44px;background:#fff;color:var(--ink,#18233a);font-size:14px;outline:0;transition:.18s}
.login-field input::placeholder{color:#a7aebb}
.login-field input:focus{border-color:#567ace;box-shadow:0 0 0 3px rgba(86,122,206,.14)}
.login-btn{width:100%;padding:12px;border:0;border-radius:13px;background:#567ace;color:#fff;
  min-height:44px;font-size:13.5px;font-weight:600;letter-spacing:.02em;cursor:pointer;
  box-shadow:0 10px 26px rgba(86,122,206,.26);transition:.2s}
.login-btn:hover{background:#4a69b8}
.login-btn:disabled{opacity:.6;cursor:wait;box-shadow:none}
.login-link{margin-top:10px;width:100%;min-height:44px;border:0;background:transparent;color:#4a69b8;font-size:12px;cursor:pointer}
.login-link:hover{color:#344f8c}
.login-link:disabled{color:#9aa1ac;cursor:default}
.login-status{margin:14px 0 0;min-height:17px;color:#788294;font-size:12px;line-height:1.65}
.login-status.error{color:#b8503f}
.login-status.ok{color:#3d7a56}
.login-note{margin:8px 0 0;color:#9aa1ac;font-size:11px;line-height:1.65}
.login-note:empty{display:none}

/* 开馆等待墙：沿用正式站点 .app 的外框尺寸；内部用网格自适应，不再依赖绝对定位硬挤。 */
.gate-wall{display:none;width:100%;height:100%;min-width:0;min-height:0;text-align:center}
.login-app.gate-on{z-index:80;grid-template-columns:minmax(0,1fr);grid-template-rows:minmax(0,1fr);background:#e8edfb}
.login-app.gate-on .rail{display:none}
.login-app.gate-on .login-main{height:100%;min-height:0;overflow:hidden;padding:clamp(14px,2vw,24px);place-items:stretch;
  background-color:#e8edfb;
  background-image:radial-gradient(circle at 18% 18%,rgba(86,122,206,.17),transparent 34%),
    radial-gradient(circle at 82% 80%,rgba(86,122,206,.11),transparent 38%)}
.login-app.gate-on .gate-wall{display:grid;grid-template-rows:minmax(0,1fr) auto;gap:8px;justify-items:stretch}
.login-app.gate-on .login-card{display:none}
.login-app.gate-on.show-login .gate-wall{display:none}
.login-app.gate-on.show-login .login-card{display:block}
.login-app.gate-on.show-login .login-main{overflow-y:auto;background:radial-gradient(circle at 14% 16%,rgba(86,122,206,.16),transparent 42%),
  radial-gradient(circle at 86% 84%,rgba(231,201,120,.2),transparent 38%),var(--paper,#fbfaf6)}
.gate-window{width:100%;height:100%;min-width:0;min-height:0;overflow:hidden;border:1px solid rgba(72,91,139,.18);border-radius:26px;
  background:#f9f8f3;box-shadow:0 30px 80px rgba(47,65,108,.26),0 2px 0 rgba(255,255,255,.8) inset}
.gate-window-bar{height:46px;display:grid;grid-template-columns:1fr minmax(210px,460px) 1fr;align-items:center;padding:0 18px;
  border-bottom:1px solid rgba(72,91,139,.12);background:rgba(255,255,255,.84);color:#7890c8}
.gate-dots{display:flex;gap:7px;justify-self:start}.gate-dots i{width:8px;height:8px;border-radius:50%;background:rgba(86,122,206,.25)}
.gate-dots i:nth-child(2){background:rgba(86,122,206,.45)}.gate-dots i:nth-child(3){background:#567ace}
.gate-address{overflow:hidden;padding:7px 18px;border:1px solid rgba(86,122,206,.14);border-radius:999px;background:#f6f7fb;
  color:#8492b4;font:500 10px/1.1 ui-monospace,SFMono-Regular,Consolas,monospace;letter-spacing:.08em;text-overflow:ellipsis;white-space:nowrap}
.gate-star{justify-self:end;font-size:20px;line-height:1}
.gate-paper{position:relative;display:grid;grid-template-rows:minmax(0,1fr) auto;height:calc(100% - 46px);min-height:0;overflow:hidden;
  background:radial-gradient(ellipse at 50% 42%,#fffaf3 0,#faf7ef 56%,#f8f6f1 100%)}
.gate-illustration{position:relative;z-index:2;display:grid;place-items:center;min-width:0;min-height:0;margin:0;padding:clamp(8px,1.7vh,18px) 2px 0;overflow:hidden;pointer-events:none}
.gate-illustration img{position:absolute;left:50%;top:50%;display:block;width:min(66%,760px);height:auto;max-height:none;margin:0;object-fit:contain;mix-blend-mode:multiply;opacity:.96;filter:saturate(.92) contrast(.985);transform:translate(-50%,-50%);
  -webkit-mask-image:radial-gradient(ellipse 72% 64% at 50% 50%,#000 56%,rgba(0,0,0,.72) 78%,transparent 100%);
  mask-image:radial-gradient(ellipse 72% 64% at 50% 50%,#000 56%,rgba(0,0,0,.72) 78%,transparent 100%);user-select:none}
.gate-copy{position:relative;z-index:3;width:min(780px,92%);margin:0 auto;padding:8px 0 clamp(18px,3.2vh,34px)}
.gate-kicker{margin:0 0 12px;color:#567ace;font:700 10px/1.2 ui-monospace,SFMono-Regular,Consolas,monospace;letter-spacing:.26em}
.gate-wall-line{margin:0 0 12px;color:#5e6b86;font:400 clamp(14px,1.25vw,17px)/1.55 Georgia,"Noto Serif SC","Source Han Serif SC","Songti SC",serif;letter-spacing:.08em}
.gate-wall-clock{display:flex;justify-content:center;align-items:baseline;gap:clamp(6px,1.15vw,14px);margin:0;color:#385aa9;
  font-family:Georgia,"Noto Serif SC","Source Han Serif SC","Songti SC",serif;font-variant-numeric:tabular-nums lining-nums}
.gate-seg{display:inline-flex;align-items:baseline;gap:4px;white-space:nowrap}.gate-seg b{font-weight:500;font-size:clamp(31px,5.3vw,66px);line-height:1;letter-spacing:-.035em}
.gate-seg i{font-style:normal;font-size:clamp(10px,1vw,13px);color:#7f8baa;letter-spacing:.08em}.gate-sep{color:rgba(86,122,206,.35);font-size:18px}
.gate-date{margin:14px 0 0;color:#96a0b6;font:500 9px/1.2 ui-monospace,SFMono-Regular,Consolas,monospace;letter-spacing:.22em}
.gate-done{font:500 clamp(20px,2.4vw,30px)/1.25 Georgia,"Noto Serif SC","Source Han Serif SC","Songti SC",serif;color:#385aa9;letter-spacing:.1em}
.gate-login-link{display:inline-flex;align-items:center;justify-content:center;justify-self:center;min-width:160px;min-height:44px;padding:8px 14px;color:rgba(72,85,116,.68);font-size:11px;letter-spacing:.12em;text-decoration:none;
  border-radius:999px;white-space:nowrap;transition:.2s}
.gate-login-link:hover{color:#385aa9;border-color:rgba(56,90,169,.45)}

[hidden]{display:none!important}
@media(max-width:1080px) and (min-width:821px){
  .login-app.gate-on .login-main{padding:18px}
  .gate-window{border-radius:24px}
  .gate-illustration img{width:66%}
}
@media(max-width:1023px) and (min-width:821px){
  .gate-copy{padding-bottom:24px}.gate-seg b{font-size:clamp(34px,5.4vw,54px)}
}
@media(max-width:820px){
  .login-app{display:block}
  .login-main{height:calc(100vh - 56px);padding:20px 16px 34px;align-items:start}
  .login-card{width:100%;margin-top:8px;padding:26px 20px 22px;border-radius:20px}
  .login-card h1{font-size:26px}
  .login-app.gate-on{display:grid;width:100%;height:100%;min-height:0;margin:0;border:0;border-radius:0;box-shadow:none}
  .login-app.gate-on .login-main{height:100%;padding:0;align-items:stretch;background:#f8f6f1}
  .login-app.gate-on .gate-wall{grid-template-rows:minmax(0,1fr) calc(44px + var(--popo-pg-safe-bottom));gap:0}
  .gate-window{border:0;border-radius:0;box-shadow:none}
  .gate-window-bar{height:44px;grid-template-columns:52px minmax(0,1fr) 52px;padding:0 12px;background:rgba(255,255,255,.72)}
  .gate-paper{height:calc(100% - 44px)}
  .gate-illustration{padding-top:4px}.gate-illustration img{width:135%;height:auto;max-height:none;
    -webkit-mask-image:linear-gradient(to bottom,transparent 0,#000 19%,#000 78%,transparent 100%);
    mask-image:linear-gradient(to bottom,transparent 0,#000 19%,#000 78%,transparent 100%)}
  .gate-copy{width:94%;padding:8px 0 clamp(16px,2.8vh,28px)}
  .gate-login-link{align-self:stretch;justify-self:stretch;min-height:44px;padding:7px 12px calc(7px + var(--popo-pg-safe-bottom));border-radius:0;border-top:1px solid rgba(86,122,206,.1);background:#eef2fb;font-size:10.5px}
}
@media(max-width:720px){
  .gate-illustration img{width:142%}.gate-copy{padding-bottom:22px}
}
@media(max-width:599px){
  .gate-illustration img{width:150%}.gate-kicker{margin-bottom:10px;font-size:9px}.gate-wall-line{margin-bottom:10px;font-size:14px;letter-spacing:.045em}
  .gate-copy{width:96%;padding-bottom:20px}.gate-wall-clock{gap:5px}.gate-seg{gap:3px}.gate-seg b{font-size:clamp(30px,8.8vw,44px)}.gate-seg i{font-size:9px}.gate-sep{font-size:13px}
  .gate-date{margin-top:11px;font-size:8px;letter-spacing:.17em}
}
@media(max-width:470px){
  .gate-address{padding:6px 10px;font-size:8px}.gate-dots{gap:5px}.gate-dots i{width:7px;height:7px}.gate-star{font-size:17px}
  .gate-illustration img{width:160%}.gate-wall-line{font-size:13px;letter-spacing:.025em}
  .gate-wall-clock{gap:3px}.gate-seg{gap:2px}.gate-seg b{font-size:clamp(28px,9.2vw,40px)}.gate-sep{font-size:10px}
}
@media(max-width:430px){
  .gate-window-bar{grid-template-columns:44px minmax(0,1fr) 44px;padding:0 10px}.gate-illustration img{width:166%}
  .gate-copy{width:98%;padding-bottom:17px}.gate-kicker{margin-bottom:8px;font-size:8px}.gate-wall-line{margin-bottom:8px;font-size:12.5px}
  .gate-date{margin-top:9px;letter-spacing:.14em}
}
@media(max-width:380px){
  .gate-address{font-size:7.5px;letter-spacing:.045em}.gate-illustration img{width:172%}
  .gate-seg b{font-size:clamp(27px,9vw,35px)}.gate-seg i{font-size:8px}.gate-copy{padding-bottom:14px}
}
@media(max-height:650px){
  .gate-illustration img{width:min(112%,920px)}.gate-copy{padding-bottom:10px}.gate-kicker{margin-bottom:6px}.gate-wall-line{margin-bottom:6px}.gate-date{margin-top:7px}
}
@media(max-width:820px) and (max-height:650px){.gate-illustration img{width:132%}}
@media(prefers-reduced-motion:reduce){.gate-login-link,.login-btn,.login-link{transition:none}}

/* The waiting page uses the same outer .app dimensions as the opened archive. */
.login-app.gate-on{background:#faf7ef}
.login-app.gate-on .login-main{padding:0;background:#faf7ef}
.login-app.gate-on .gate-wall{grid-template-rows:minmax(0,1fr) auto;gap:0;background:#faf7ef}
.gate-window{border:0;border-radius:0;background:#faf7ef;box-shadow:none}
.gate-paper{height:100%;background:radial-gradient(ellipse at 50% 42%,#fffaf3 0,#faf7ef 60%,#f8f6f1 100%)}
.gate-login-link{align-self:stretch;justify-self:stretch;min-height:44px;min-width:0;padding:10px 14px 14px;border:0;border-radius:0;background:#f8f6f1;color:#9c762f;font-size:12px;font-weight:600;letter-spacing:.12em}
.gate-login-link:hover,.gate-login-link:focus-visible{color:#71521d;background:#f4efe3;outline-color:#567ace}
@media(max-width:820px){
  .login-app.gate-on .login-main{background:#faf7ef}
  .login-app.gate-on .gate-wall{grid-template-rows:minmax(0,1fr) auto}
  .gate-paper{height:100%}
  .gate-login-link{min-height:44px;padding:10px 12px calc(10px + var(--popo-pg-safe-bottom));border:0;background:#f8f6f1;color:#9c762f;font-size:12px}
}

/* Login is a centered, content-sized panel at every archive breakpoint. */
.login-app.gate-on.show-login .login-main{display:flex;flex-direction:column;justify-content:flex-start;align-items:stretch;overflow-y:auto;padding:clamp(18px,4vw,48px);background:radial-gradient(circle at 22% 18%,rgba(86,122,206,.09),transparent 35%),#faf7ef}
.login-app.gate-on.show-login .login-card{display:block;flex:none;width:min(460px,100%);height:auto;min-height:0;max-height:none;margin:auto;padding:clamp(22px,3vw,34px);border-radius:24px}
.login-app.gate-on.show-login .login-field input{min-width:0}
@media(max-width:820px){.login-app.gate-on.show-login .login-main{padding:18px}.login-app.gate-on.show-login .login-card{width:min(460px,100%);margin:auto}}
@media(max-width:470px){.login-app.gate-on.show-login .login-main{padding:12px}.login-app.gate-on.show-login .login-card{padding:22px 18px;border-radius:20px}}
@media(max-height:650px){.login-app.gate-on.show-login .login-main{padding-top:10px;padding-bottom:10px}}

/* Let the illustration float quietly inside a single warm paper surface. */
.gate-paper{background:#fbf6ee}
.gate-illustration img{animation:gate-art-float 6s ease-in-out infinite;-webkit-mask-image:radial-gradient(ellipse 59% 59% at 50% 50%,#000 48%,rgba(0,0,0,.7) 70%,transparent 100%);mask-image:radial-gradient(ellipse 59% 59% at 50% 50%,#000 48%,rgba(0,0,0,.7) 70%,transparent 100%)}
.gate-paper::before,.gate-paper::after{position:absolute;z-index:1;color:rgba(86,122,206,.25);font:20px/1 Georgia,serif;pointer-events:none}
.gate-paper::before{content:"✧";top:8%;left:11%}
.gate-paper::after{content:"✦";right:12%;top:18%;font-size:11px;color:rgba(177,137,66,.42)}
.gate-kicker::before,.gate-kicker::after{content:"";display:inline-block;width:24px;height:1px;margin:0 10px 3px;background:rgba(86,122,206,.28)}
@keyframes gate-art-float{0%,100%{transform:translate(-50%,-50%)}50%{transform:translate(-50%,calc(-50% - 3px))}}
@media(max-width:820px){.gate-illustration img{-webkit-mask-image:linear-gradient(to bottom,transparent 0,#000 23%,#000 74%,transparent 100%);mask-image:linear-gradient(to bottom,transparent 0,#000 23%,#000 74%,transparent 100%)}.gate-paper::before{left:7%;top:12%}.gate-paper::after{right:8%;top:17%}}
@media(prefers-reduced-motion:reduce){.gate-illustration img{animation:none}}
