/* 45P studio chrome: the header of the 45P main page and the BedTimeStory-style footer,
   shared by the three game pages. A page picks its tone with data-tone and its own
   colours through the --sh-* / --sf-* properties; layout, type and sizes stay the same. */
@font-face{font-family:Bricolage;src:url('/home/bricolage-latin.woff2') format('woff2');font-weight:500 800;font-display:swap}

.sh{--sh-h:68px;--sh-ink:#142351;--sh-bg:rgba(243,242,238,.82);--sh-line:rgba(20,35,81,.14);--sh-pill:rgba(138,170,206,.24);
  position:fixed;top:0;left:0;right:0;z-index:100;height:calc(var(--sh-h) + env(safe-area-inset-top,0px));padding:env(safe-area-inset-top,0px) max(20px,4vw) 0;
  display:flex;align-items:center;gap:28px;color:var(--sh-ink);background:var(--sh-bg);backdrop-filter:blur(14px);-webkit-backdrop-filter:blur(14px);border-bottom:1px solid var(--sh-line);
  font-family:Bricolage,'Apple SD Gothic Neo','Malgun Gothic',sans-serif;line-height:1;transition:background .4s,color .4s,border-color .4s}
.sh[data-tone="dark"]{--sh-ink:#e9e7e2;--sh-bg:var(--sh-dark-bg,rgba(11,11,13,.72));--sh-line:rgba(233,231,226,.12);--sh-pill:rgba(233,231,226,.14)}
/* zero specificity, so a page's own button colours win */
:where(.sh) a{color:inherit;text-decoration:none}
.sh-brand{display:flex;align-items:center;gap:10px;font:800 26px/1 Bricolage,'Arial Black',Arial,sans-serif;letter-spacing:-.04em;white-space:nowrap}
.sh-brand img{width:30px;height:auto;transition:transform .6s cubic-bezier(.22,1,.36,1)}
.sh-brand:hover img{transform:rotate(-14deg) scale(1.08)}
.sh-nav{display:flex;gap:4px}
.sh-nav a{padding:8px 14px;border-radius:999px;font-weight:600;font-size:15px;opacity:.7;white-space:nowrap;transition:opacity .25s,background .25s,scale .15s}
.sh-nav a:hover,.sh-nav a.is-active{opacity:1;background:var(--sh-pill)}
.sh-tools{display:flex;align-items:center;gap:8px;margin-left:auto}
.sh-tools>*{flex:none;white-space:nowrap}
.sh-games{display:flex;gap:8px;margin-left:auto}
.sh-tools~.sh-games{margin-left:0}
.sh-game{display:inline-flex;align-items:center;min-height:40px;padding:0 16px;border-radius:999px;font:700 14px/1 Bricolage,'Arial Black',Arial,sans-serif;white-space:nowrap;transition:transform .3s cubic-bezier(.22,1,.36,1),scale .15s}
.sh-game:hover,.sh-game:focus-visible{transform:translateY(-2px)}
.sh-game.lzd{background:#f6c64b;color:#142351}
.sh-game.nwb{background:#0b0b0d;color:#e9e7e2}
.sh-game.bts{background:#b9a8f0;color:#142351}
.sh[data-tone="dark"] .sh-game.nwb{background:#e10600;color:#fff}
.sh[data-tone="dark"] .sh-game.bts{background:#fff4dd;color:#2a1f5c}
/* The page you are on: a ring in the header's ink */
.sh-game[aria-current="page"]{box-shadow:0 0 0 2px var(--sh-ink)}
.sh-game .short{display:none}
.sh-nav a:active,.sh-game:active,.sh-tools>*:active,.sh-brand:active{scale:.96}
.sh-progress{position:absolute;left:0;right:0;bottom:-1px;height:3px;pointer-events:none}
.sh-progress i{display:block;height:100%;background:var(--sh-progress,linear-gradient(90deg,#f6c64b,#8aaace,#e10600,#ff6fae));transform-origin:0 50%;transform:scaleX(0)}

.sf{display:flex;flex-wrap:wrap;justify-content:space-between;align-items:center;gap:8px 24px;padding:28px max(20px,4vw) calc(28px + env(safe-area-inset-bottom,0px));
  background:var(--sf-bg,#151036);border-top:1px solid var(--sf-line,rgba(185,168,240,.16));color:var(--sf-muted,rgba(244,240,255,.72));
  font:400 14px/1.6 'Apple SD Gothic Neo','Malgun Gothic','Noto Sans KR',system-ui,sans-serif}
.sf p{margin:0}
.sf-links{display:flex;flex-wrap:wrap;gap:0 22px}
.sf-links a{display:inline-flex;align-items:center;min-height:44px;color:var(--sf-text,#f4f0ff);text-decoration:none;transition:color .25s,scale .15s}
.sf-links a:hover{color:var(--sf-accent,#ff6fae)}
.sf-links a:active{scale:.96}

@media (max-width:1080px){
  .sh-nav{display:none}
}
/* a page with its own tools switches the chips to their short names a little earlier */
@media (max-width:900px){
  .sh-tools~.sh-games .long{display:none}.sh-tools~.sh-games .short{display:inline}
}
@media (max-width:760px){
  .sh{--sh-h:60px;gap:10px}
  .sh-brand{font-size:22px}.sh-brand img{width:26px}
  .sh-tools,.sh-games{gap:6px}
  .sh-game{min-height:36px;padding:0 12px;font-size:13px}
  .sh-game .long{display:none}.sh-game .short{display:inline}
  /* on a phone the chips are the way out, so the page you are on drops out of the row */
  .sh-game[aria-current="page"]{display:none}
  .sf{flex-direction:column;align-items:flex-start}
}
