:root { color-scheme: dark; background: #100d0a; color: #f6e6c2; font: 16px system-ui, sans-serif; }
* { box-sizing: border-box; }
body { margin: 0; }
main { height: 100dvh; min-height: 300px; overflow: hidden; isolation: isolate; position: relative; }
#stage, .frame { position: absolute; inset: 0; width: 100%; height: 100%; }
#stage { display: block; touch-action: none; cursor: grab; }
#stage:active { cursor: grabbing; }
.frame { pointer-events: none; background: linear-gradient(180deg, #100b08bd, transparent 26%, transparent 70%, #0e0908bd); box-shadow: inset 0 0 14vw #10090866; }
.title { position: absolute; top: clamp(1rem, 4.8vw, 4rem); left: clamp(1rem, 5vw, 5rem); pointer-events: none; filter: drop-shadow(0 2px 6px #100907); }
.title p { margin: 0 0 .45rem; font-size: .72rem; font-weight: 750; letter-spacing: .21em; }
h1 { margin: 0; font: 400 clamp(2.8rem, 6vw, 6.2rem)/.9 Georgia, serif; letter-spacing: -.07em; }
footer { position: absolute; inset: auto clamp(1rem, 5vw, 5rem) clamp(1rem, 4vw, 3.2rem); display: flex; align-items: center; justify-content: space-between; gap: 1rem; flex-wrap: wrap; pointer-events: none; }
#hint { margin: 0; color: #f6e6c2; text-shadow: 0 1px 6px #000, 0 2px 9px #000; font-size: .83rem; }
#hint span { margin: 0 .24em; }
.controls { display: flex; flex-wrap: wrap; gap: .45rem; pointer-events: auto; }
button { border: 1px solid #fae3ad75; background: #201612de; color: #f6e6c2; border-radius: 3px; padding: .64em .85em; font: 650 .83rem system-ui; min-height: 44px; cursor: pointer; }
button:disabled { opacity: .55; cursor: default; }
button:hover:not(:disabled) { background: #4c3326; }
:focus-visible { outline: 2px solid #ffe3a2; outline-offset: 3px; }
#entrance { position: fixed; inset: 0; z-index: 2; display: grid; place-items: center; padding: 1rem; background: radial-gradient(ellipse at 50% 36%, #263a2e, #101b16 70%, #0b100d); }
.shop-sign { text-align: center; color: #e7d4aa; border: 3px double #947e54; padding: clamp(2rem, 7vw, 5rem); }
.shop-sign h2 { font: 400 clamp(3rem, 8vw, 6rem)/.96 Georgia, serif; letter-spacing: -.05em; margin: 0 0 1.5rem; }
.shop-sign h2 em { font-size: .76em; }
.shop-sign button { background: #dcc89f; color: #21251d; padding-inline: 1.5em; }
.shop-sign button:hover:enabled { background: #f2dfb7; }
#enter { min-width: 10em; }
.shop-spinner {
  display: inline-block;
  width: .85em;
  height: .85em;
  margin-inline-end: .6em;
  vertical-align: -.12em;
  border: 2px solid currentColor;
  border-inline-end-color: transparent;
  border-radius: 50%;
  animation: shop-spin .85s linear infinite;
}
@keyframes shop-spin { to { transform: rotate(1turn); } }
@media (prefers-reduced-motion: reduce) {
  .shop-spinner { animation: none; }
}

.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip-path: inset(50%); white-space: nowrap; }
@media (max-width: 580px) { .title { top: 1.4rem; } footer { gap: .5rem; } #hint { font-size: .75rem; } }
h1 { max-width: 12ch; font-size: clamp(2.6rem, 5.2vw, 5.5rem); text-wrap: balance; }
h1 span { color: #d4a476; }
@media (max-width: 580px) {
  footer { inset-inline: .5rem; }
  .controls { width: 100%; flex-wrap: nowrap; gap: clamp(2px, 1vw, 6px); overflow-x: auto; }
  .controls button { white-space: nowrap; flex: 1 0 auto; padding-inline: clamp(3px, 1.2vw, 8px); font-size: clamp(.72rem, 3.25vw, .83rem); }
}

#tests {position:absolute;right:.6rem;top:.7rem;z-index:4;max-height:calc(100% - 6.5rem);overflow:auto;color:#f3e9dc;background:#211d17ed;border-radius:.4rem;padding:.35rem;font-size:.83rem}
#tests summary {cursor:pointer;padding:.35rem}
#test-cues {display:grid;gap:.18rem}
#test-cues button {text-align:left;font:inherit;padding:.25rem .55rem}

/* Keep the shop green visible through the floral photograph. */
#entrance { isolation:isolate; overflow:auto; }
#entrance::before { content:""; position:absolute; inset:0; pointer-events:none; z-index:-1; background:url("./assets/entrance-flowers.webp?v=peonies") center / cover; opacity:.27; }
.shop-sign { display:flex; flex-direction:column; align-items:center; width:min(36rem,100%); min-height:min(27rem,calc(100dvh - 2rem)); padding:clamp(1.4rem,5vh,3rem) 1rem .85rem; background:#14261be0; }
.shop-sign h2 { margin-top:auto; }
.credits { margin-top:auto; padding-top:1.8rem; }
.credits p { margin:.18rem 0; }
.title { inset:clamp(.8rem,3vw,2rem) clamp(.8rem,3vw,2.8rem) auto; }
.title h1 { max-width:none; display:flex; flex-direction:row; justify-content:space-between; font-size:clamp(1.55rem,4.3vw,4rem); }
.title h1 span { color:#f6e6c2; }
#tests { top:clamp(3.3rem,8vw,7rem); max-height:calc(100% - 12rem); }

@font-face {
  font-family: Nosifer;
  src: url("./assets/Nosifer-Regular.ttf") format("truetype");
  font-display: swap;
}
.title #title-ending {
  font: 400 clamp(1.05rem, 2.95vw, 3.1rem)/1.25 Nosifer, Georgia, serif;
  letter-spacing: -.045em;
  color: #bc3035;
}
@supports (background-clip: text) {
  .title #title-ending {
    background-image: linear-gradient(to bottom, #183c27 15%, #305337 38%, #b15b3d 56%, #d33c36 72%, #a3242a 88%);
    background-clip: text;
    -webkit-background-clip: text;
    color: transparent;
    text-shadow: none;
    filter: drop-shadow(0 2px 2px #160608);
  }
}

#safari-notice {
  box-sizing: border-box; width: min(25rem, 90vw); padding: 1.6rem;
  color: #f2e8ce; background: #15251c; border: 1px solid #887752;
  border-radius: .5rem; box-shadow: 0 .7rem 3rem #0009;
}
#safari-notice::backdrop { background: #080c09b8; }
#safari-notice h2 { font: 1.55rem Georgia, serif; margin: 0 0 .7rem; }
#safari-notice p { line-height: 1.5; margin: 0 0 1.2rem; }
