@font-face { font-family: Galmuri; src: url("./type/galmuri.woff") format("woff"); font-display: swap; }
:root { color-scheme: dark; --cream:#f2e4c6; --gold:#e5bd7f; --pixel:Galmuri,ui-monospace,monospace; }
*,*::before,*::after { box-sizing:border-box; }
body { margin:0; color:var(--cream); background:#151c22; font:16px/1.55 system-ui,sans-serif; }
h1,h2,p { margin:0; }
a { color:inherit; text-underline-offset:4px; }
a:focus-visible,button:focus-visible { outline:3px solid #ffdda0; outline-offset:4px; }
.sr { position:absolute; height:1px; width:1px; overflow:hidden; clip-path:inset(50%); }
.title-screen {
  --height:max(600px,100vh); --height:max(600px,100svh); --world:max(100vw,calc(var(--height) * 1.7771));
  position:relative; isolation:isolate; width:100%; height:var(--height); overflow:hidden;
}
.painting {
  position:absolute; width:var(--world); aspect-ratio:1100/619;
  left:calc((100% - var(--world)) * .42); top:calc((var(--height) - var(--world) * .562727) * .30);
}
.landscape,.scene-layer { display:block; position:absolute; inset:0; width:100%; height:100%; }
.scene-layer,.bell-sprite { pointer-events:none; }
.night-layer { opacity:0; transition:opacity 1000ms ease-in-out; }
.painting.is-night .night-layer { opacity:1; }
.bell-hinge { position:absolute; left:23.4545%; top:19.2246%; width:11.6364%; height:30.5331%; transform-origin:48.4375% 3.1746%; pointer-events:none; }
.bell-sprite { width:100%; height:100%; position:absolute; inset:0; }
.bell-target { position:absolute; left:24.55%; top:21%; width:9.1%; height:30.2%; padding:0; border:0; background:transparent; cursor:pointer; -webkit-tap-highlight-color:transparent; }
.bell-target:focus-visible { outline:2px dashed #ffe0a1; outline-offset:4px; }
.bell-prompt {
  position:absolute; bottom:-5%; left:50%; transform:translateX(-50%); padding:4px 9px;
  font:12px/1.35 var(--pixel); white-space:nowrap; background:#252326; color:#fae4b7;
  border:1px solid #a78b65; box-shadow:0 2px #241f22;
}
.bell-target:hover .bell-prompt,.bell-target:focus-visible .bell-prompt { color:#282321; background:#ecd09c; }
.pennant {
  position:absolute; width:clamp(340px,29vw,472px); top:52.5%; right:clamp(32px,6vw,156px);
  transform:translateY(-50%); aspect-ratio:164/191; background:url("./art/banner.png") center/100% 100% no-repeat;
  image-rendering:pixelated;
}
.fastenings { position:absolute; z-index:-1; bottom:98%; left:12%; width:76%; height:100vh; border-inline:3px solid #635449; box-shadow:inset 2px 0 #272625,inset -2px 0 #272625; pointer-events:none; }
.pennant-face {
  position:absolute; inset:7% 14% 17%; display:flex; flex-direction:column; justify-content:center; align-items:stretch; text-align:center;
}
h1 img { display:block; width:100%; height:auto; image-rendering:pixelated; }
.party { margin-top:12px; color:#d9c8a6; font:13px/1.6 var(--pixel); }
.downloads { display:grid; grid-template-columns:repeat(2,minmax(0,1fr)); gap:8px; margin:clamp(20px,2.1vw,32px) 0 0; }
.game-action:not(:first-child) .download-prefix,.game-action:not(:first-child) .down-glyph { display:none; }
.game-action {
  min-height:48px; display:flex; justify-content:center; align-items:center; gap:10px;
  background:#3c3930; border:2px solid #75654d; box-shadow:inset 0 1px #807158,inset 0 -2px #292b25,0 2px #1a1e1c;
  color:var(--cream); text-decoration:none; font:16px/1.3 var(--pixel);
}
.game-action:first-child { grid-column:1/-1; background:#d6ae74; border-color:#8b6b46; box-shadow:inset 0 2px #f4d29a,inset 0 -2px #b78b57,0 2px #1a1e1c; color:#2b2824; }
.game-action:hover { background:#514b3d; }
.game-action:first-child:hover { background:#efd091; }
.game-action:active { translate:0 1px; }
.down-glyph { display:inline-block; width:12px; height:14px; background:currentColor; clip-path:polygon(42% 0,58% 0,58% 48%,92% 48%,50% 84%,8% 48%,42% 48%,42% 0,0 0,0 90%,100% 90%,100% 100%,0 100%,0 0); }
.guide-link { align-self:center; margin-top:16px; padding:4px 0; color:#d8cbb1; font:12px/1.55 var(--pixel); }
.guide-link:hover { color:#fff1ce; }
.arena { position:absolute; left:max(20px,env(safe-area-inset-left)); bottom:max(16px,env(safe-area-inset-bottom)); padding:4px 9px; background:#202122dd; color:#ebe0c8; font:12px/1.55 var(--pixel); text-decoration:none; }
.arena:hover { text-decoration:underline; }
dialog {
  width:min(92vw,510px); max-height:86vh; max-height:86svh; padding:24px 28px; color:#ece2ce; background:#252b28; border:3px double #b4986c;
  box-shadow:0 12px 60px #0a0f1280; overscroll-behavior:contain;
}
dialog:target { display:block; position:fixed; inset:0; margin:auto; z-index:5; }
dialog::backdrop { background:#101619ba; }
.guide-heading { display:flex; justify-content:space-between; align-items:center; gap:12px; border-bottom:1px solid #656050; padding-bottom:12px; }
.guide-heading h2 { font:20px/1.6 var(--pixel); color:var(--gold); }
.guide-heading a { font-size:26px; min-width:32px; text-align:center; text-decoration:none; }
dl { margin:12px 0 0; }
dt { margin-top:16px; font:15px/1.6 var(--pixel); color:#f2d9ad; }
dd { margin:2px 0 0; font-size:14px; }
kbd { font:12px/1.4 var(--pixel); border-bottom:1px solid #998b70; }
@media (max-width:1000px) and (min-aspect-ratio:1/1) {
  .pennant { right:2%; width:clamp(320px,36vw,392px); }
}
@media (max-aspect-ratio:1/1) {
  .title-screen { --height:max(560px,100vh); --height:max(560px,100svh); }
  .painting { left:calc((100% - var(--world)) * .155); }
  .bell-prompt { top:57%; bottom:auto; left:48%; transform:translateX(-100%); }
  .pennant { width:min(91vw,394px); top:auto; right:50%; bottom:max(36px,4vh); transform:translateX(50%); }
  .fastenings { height:14px; border-inline-width:2px; bottom:98%; }
  .party { margin-top:8px; }
  .downloads { margin-top:18px; }
  .guide-link { margin-top:10px; }
  .arena { left:12px; bottom:max(8px,env(safe-area-inset-bottom)); }
}
@media (max-width:370px) and (max-aspect-ratio:1/1) {
  .game-action { min-height:42px; font-size:14px; }
  .pennant { width:96vw; }
  .downloads { margin-top:12px; }
}
@media (max-height:640px) and (max-aspect-ratio:1/1) {
  .pennant { width:min(88vw,304px); bottom:26px; }
  .bell-prompt { top:26%; left:12%; }
  .game-action { min-height:40px; font-size:14px; }
  .downloads { margin-top:12px; gap:6px; }
  .guide-link { margin-top:6px; }
}
@media (max-height:550px) and (min-aspect-ratio:1/1) {
  .title-screen { --height:max(350px,100vh); --height:max(350px,100svh); }
  .pennant { top:50%; width:clamp(272px,67vh,326px); }
  .game-action { min-height:36px; font-size:13px; }
  .party,.guide-link { font-size:11px; margin-top:6px; }
  .downloads { margin-top:12px; gap:6px; }
}
@media (prefers-reduced-motion:reduce) {
  *,*::before,*::after { transition:none!important; animation:none!important; }
}
