@import url("https://fonts.googleapis.com/css2?family=Ma+Shan+Zheng&text=%E5%85%A5&display=block");
@import url("https://fonts.googleapis.com/css2?family=Marcellus&display=swap");
/* Fengshen splash + login (owner 2026-11-05). "Sign and seal": no card - two brush-line fields drawn on the painting and a
   cinnabar seal stamp (入, enter) as the only action. Ruffle's own splash is switched off. */
#splash{--ink:#140c12;--ivory:#f3e9d2;--gold:#e6b85c;--cinnabar:#b3261e;--cinnabar-dk:#7e1712;--seal-ink:#f6d28a;
  position:absolute;inset:0;z-index:30;overflow:hidden;background:#1d1219 url(splash_small.webp) center/cover no-repeat;
  font:16px/1.5 Marcellus,"Palatino Linotype",Georgia,serif;color:var(--ivory);transition:opacity .7s ease;container-type:size}
#splash .sp-art{position:absolute;inset:0;background:url(splash.webp) center/cover no-repeat;opacity:0;transition:opacity .6s,filter .8s ease,transform .8s ease}
#splash .sp-art.on{opacity:1}
#splash.login .sp-art{filter:blur(3px) brightness(.92);transform:scale(1.03)}
/* an ink shadow behind the centre column instead of a card, so the lines read on the bright sky */
#splash .sp-shade{position:absolute;inset:0;background:
  radial-gradient(ellipse 34cqw 42cqh at 50% 58%,rgba(20,12,18,.62),rgba(20,12,18,.28) 55%,rgba(20,12,18,0) 100%),
  radial-gradient(ellipse at 50% 45%,rgba(20,12,18,0) 45%,rgba(20,12,18,.45) 100%)}
#splash.gone{opacity:0;pointer-events:none}
#splash .sp-mid{position:absolute;left:50%;top:50%;transform:translate(-50%,-50%);display:flex;flex-direction:column;align-items:center;
  width:min(300px,78cqw)}
#splash .sp-logo{width:clamp(110px,26cqh,230px);height:auto;margin-bottom:clamp(14px,4cqh,34px);
  animation:sp-glow 4.5s ease-in-out infinite;filter:drop-shadow(0 0 10px rgba(240,190,90,.45)) drop-shadow(0 0 28px rgba(200,40,40,.35))}
@keyframes sp-glow{0%,100%{filter:drop-shadow(0 0 8px rgba(240,190,90,.38)) drop-shadow(0 0 22px rgba(200,40,40,.28))}
  50%{filter:drop-shadow(0 0 16px rgba(250,205,110,.7)) drop-shadow(0 0 44px rgba(220,50,40,.5))}}

/* loading: one thin gold brush line, the same width as the fields */
#splash .sp-load{width:100%;text-align:center}
#splash .sp-bar{position:relative;height:2px;background:linear-gradient(90deg,transparent,rgba(243,233,210,.28) 12%,rgba(243,233,210,.28) 88%,transparent)}
#splash .sp-bar i{position:absolute;left:0;top:-1px;height:4px;width:0;border-radius:2px;background:linear-gradient(90deg,rgba(230,184,92,0),var(--gold) 30%,#f7dc97);
  box-shadow:0 0 10px rgba(230,184,92,.75);transition:width .4s ease}
#splash .sp-msg{margin-top:12px;font-size:13px;letter-spacing:.02em;color:rgba(243,233,210,.88);text-shadow:0 1px 4px var(--ink)}

/* login */
#splash form{display:none;width:100%;flex-direction:column}
#splash.login form{display:flex}#splash.login .sp-load{display:none}
#splash .sp-f{position:relative;display:flex;align-items:center}
#splash .sp-f::after{content:"";position:absolute;left:0;right:0;bottom:0;height:1px;pointer-events:none;
  background:linear-gradient(90deg,transparent,rgba(243,233,210,.55) 10%,rgba(243,233,210,.55) 90%,transparent);transition:height .2s,background .2s,box-shadow .2s}
#splash .sp-f:focus-within::after{height:2px;background:linear-gradient(90deg,transparent,var(--gold) 10%,#f7dc97 50%,var(--gold) 90%,transparent);
  box-shadow:0 0 10px rgba(230,184,92,.55)}
#splash .sp-f+.sp-f{margin-top:14px}
#splash input{flex:1;min-width:0;padding:10px 4px 8px;border:0;background:none;outline:0;color:var(--ivory);
  font:inherit;font-size:17px;letter-spacing:.02em;text-shadow:0 1px 3px var(--ink);caret-color:var(--gold)}
#splash input::placeholder{color:rgba(243,233,210,.6);font-style:normal}
/* saved passwords: no browser autofill box - the field stays transparent on the painting, text stays ivory */
#splash input:-webkit-autofill,#splash input:-webkit-autofill:hover,#splash input:-webkit-autofill:focus,#splash input:-webkit-autofill:active{
  -webkit-text-fill-color:var(--ivory);-webkit-background-clip:text;background-clip:text;box-shadow:none;caret-color:var(--gold);
  transition:background-color 99999s ease-in-out 0s,color 99999s ease-in-out 0s}
#splash input:autofill{background-image:none;-webkit-background-clip:text;background-clip:text;-webkit-text-fill-color:var(--ivory);filter:none;box-shadow:none}
#splash input[type=password]:not(:placeholder-shown){letter-spacing:.18em}
#splash input::selection{background:rgba(230,184,92,.35);color:var(--ivory)}

/* the seal: the only action, stamped at the end of the password line */
#splash .sp-seal{flex:0 0 auto;position:relative;width:42px;height:42px;margin:0 0 6px 10px;padding:0;border:0;border-radius:5px;cursor:pointer;
  background:radial-gradient(circle at 35% 30%,#c9372d,var(--cinnabar) 55%,var(--cinnabar-dk));
  box-shadow:inset 0 0 0 2px var(--cinnabar),inset 0 0 0 3.5px rgba(246,210,138,.85),0 3px 10px rgba(20,12,18,.55);
  transition:transform .18s ease,box-shadow .18s}
#splash .sp-seal span{display:block;font:34px/42px "Ma Shan Zheng","STKaiti","KaiTi","Kaiti SC",serif;color:var(--seal-ink);text-shadow:0 0 1px rgba(80,10,6,.6)}
#splash .sp-seal:hover{transform:translateY(-1px);box-shadow:inset 0 0 0 2px var(--cinnabar),inset 0 0 0 3.5px #f6d28a,0 6px 16px rgba(20,12,18,.6),0 0 18px rgba(230,184,92,.35)}
#splash .sp-seal:active{transform:scale(.92)}
#splash .sp-seal:focus-visible{outline:2px solid var(--gold);outline-offset:3px}
#splash .sp-seal:disabled{cursor:default}
/* logging in (owner 2026-11-18: "the button has a weird circle loading on top of it ... a nicer experience"): no ring any more -
   a gold sheen sweeps across the seal inside its square, the 入 breathes, a short gold light runs along the password line and the
   fields dim a little. Transform / opacity only, so it keeps moving while the game is busy. */
#splash .sp-seal{overflow:hidden}
#splash .sp-seal::before{content:"";position:absolute;top:-20%;bottom:-20%;left:-60%;width:60%;pointer-events:none;opacity:0;
  background:linear-gradient(100deg,rgba(255,236,190,0),rgba(255,236,190,.55) 50%,rgba(255,236,190,0));transform:translateX(0) skewX(-12deg)}
#splash .sp-seal.busy::before{opacity:1;animation:sp-sheen 1.15s cubic-bezier(.45,.05,.35,1) infinite}
@keyframes sp-sheen{from{transform:translateX(0) skewX(-12deg)}to{transform:translateX(320%) skewX(-12deg)}}
#splash .sp-seal.busy span{animation:sp-breathe 1.15s ease-in-out infinite}
@keyframes sp-breathe{0%,100%{opacity:1}50%{opacity:.6}}
#splash .sp-seal.busy,#splash .sp-seal.busy:hover{cursor:progress;transform:none}
#splash .sp-run{position:absolute;left:0;right:52px;bottom:0;height:2px;overflow:hidden;pointer-events:none;opacity:0;transition:opacity .25s}
#splash .sp-run i{position:absolute;top:0;bottom:0;left:0;width:34%;border-radius:2px;transform:translateX(-100%);
  background:linear-gradient(90deg,rgba(247,220,151,0),#f7dc97 50%,rgba(247,220,151,0));box-shadow:0 0 8px rgba(230,184,92,.6)}
#splash form:has(.sp-seal.busy) .sp-run{opacity:1}
#splash form:has(.sp-seal.busy) .sp-run i{animation:sp-run 1.15s cubic-bezier(.45,.05,.35,1) infinite}
@keyframes sp-run{from{transform:translateX(-100%)}to{transform:translateX(300%)}}
#splash form:has(.sp-seal.busy) input{opacity:.62;transition:opacity .25s}
#splash .sp-err{min-height:0;margin-top:12px;font-size:13.5px;line-height:1.4;color:#ffc2ad;text-align:center;text-shadow:0 1px 4px var(--ink);display:none}
#splash .sp-err.on{display:block}
@media (prefers-reduced-motion:reduce){#splash .sp-logo,#splash .sp-seal.busy::before,#splash .sp-seal.busy span,#splash form:has(.sp-seal.busy) .sp-run i{animation:none}#splash .sp-seal{transition:none}}
/* "New here? Create an account" under the form -> /sign-up/ */
#splash .sp-new{display:block;margin-top:14px;font-size:13.5px;color:rgba(243,233,210,.78);text-align:center;text-decoration:none;text-shadow:0 1px 4px var(--ink)}
#splash .sp-new:hover{color:var(--gold);text-decoration:underline;text-underline-offset:3px}
#splash .sp-new:focus-visible{outline:2px solid var(--gold);outline-offset:3px;border-radius:3px}
