:root {
  color-scheme: dark;
  font-family: "IBM Plex Sans", system-ui, sans-serif;
  background: #10261e;
  color: #fffae8;
}
* { box-sizing: border-box; }
body { margin: 0; }
main { width: min(100%, 800px); margin: auto; padding: 20px clamp(12px, 3vw, 28px) 36px; }
nav, header, footer, .controls { display: flex; align-items: center; flex-wrap: wrap; gap: 12px 20px; }
nav { justify-content: space-between; border-bottom: 1px solid #486354; padding-bottom: 12px; }
a { color: #f2cd8e; text-underline-offset: .2em; }
nav a { font-weight: 600; }
header { justify-content: space-between; padding: 22px 0 14px; }
h1, header p { margin: 0; }
h1 { font-size: clamp(1.8rem, 6vw, 2.65rem); line-height: 1.1; letter-spacing: -.045em; }
h1 span { font: .85rem ui-monospace, monospace; color: #e4bc7a; vertical-align: middle; }
header p, footer, .instructions, .launch p { color: #c1d0c3; }
header p { font-size: .93rem; }
.screen { width: 100%; position: relative; display: grid; place-items: center; aspect-ratio: 4 / 3; background: #101913; border: 1px solid #6d7860; overflow: hidden; }
canvas { display: block; width: 100%; height: 100%; object-fit: contain; touch-action: none; }
.launch { position: absolute; inset: 0; display: grid; align-content: center; justify-items: center; padding: 1rem; background: #172c24; text-align: center; }
.launch p { margin: 11px 0 0; max-width: 32ch; line-height: 1.4; font-size: .95rem; }
button { border: 1px solid #799482; border-radius: 4px; background-color: #233e32; color: #fff9e8; font: inherit; font-weight: 650; min-height: 44px; padding: .55rem .95rem; cursor: pointer; }
button:hover { border-color: #f2cd8e; }
#go, #bowl { background: #ecd1a2; color: #202b22; border-color: #ecd1a2; }
#go { padding: .8rem 1.4rem; font-size: 1.08rem; }
button:disabled { opacity: .7; cursor: wait; }
:focus-visible { outline: 3px solid #f4a54a; outline-offset: 3px; }
canvas:focus-visible { outline-offset: -3px; }
.controls { margin-top: 10px; gap: 8px; }
#mute { margin-inline-start: auto; }
.instructions { line-height: 1.5; margin: 15px 0; }
kbd { font-size: .86em; font-family: ui-monospace, monospace; }
#bowl kbd { margin-left: 4px; opacity: .74; }
footer { justify-content: space-between; border-top: 1px solid #486354; padding-top: 14px; font-size: .9rem; }
[hidden] { display: none !important; }
@media (max-height: 540px) and (orientation: landscape) {
  main { padding-top: 8px; max-width: 95vw; }
  header { padding: 8px 0; }
  h1 { font-size: 1.4rem; }
  .screen { max-width: calc((100svh - 110px) * 4 / 3); margin-inline: auto; }
}

.experiment--elf-bowling .experiment-back {font-size:.95rem; min-height:36px; padding:0}
.launch {isolation:isolate; background-color:#233c37; background-image:repeating-linear-gradient(0deg,transparent 0 3px,rgba(5,20,16,.055) 3px 4px),radial-gradient(ellipse at 50% 38%,#3e594c,#20392f 70%);}
.floppy {position:relative; width:clamp(90px,27vw,178px); aspect-ratio:1; margin:0 0 clamp(13px,3vw,27px); background:#bc443c; border:3px solid #662f2e; border-radius:5px 10px 5px 4px; transform:rotate(-7deg); box-shadow:inset 4px 3px #dc7562,inset -5px -4px #902f30,6px 7px 0 #10261e80}
.floppy::before,.floppy::after {content:""; position:absolute; bottom:5%; width:7%; height:7%; background:#20372e; border:1px solid #7f312e}
.floppy::before {left:4%}.floppy::after {right:4%}
.shutter {position:absolute; top:-1%; left:20%; width:61%; height:32%; background:#b7b4a5; border:2px solid #575851; border-radius:0 0 3px 3px; box-shadow:inset 4px 0 #dedbca,inset -4px 0 #92978a}
.shutter i {position:absolute; right:15%; top:10%; width:20%; height:77%; background:#374139; border:2px solid #666c60}
.disk-paper {display:flex; flex-direction:column; align-items:flex-start; justify-content:center; gap:3%; position:absolute; bottom:6%; left:15%; width:70%; height:53%; color:#343f34; background:repeating-linear-gradient(to top,#efe4bd 0 12px,#d7cba8 12px 13px); border:1px solid #9d7757; border-top:7px solid #376353; border-radius:2px; padding:4% 5%; text-align:left}
.disk-paper b {font:italic 700 clamp(11px,2.5vw,23px)/1.05 Georgia,serif; white-space:nowrap}
.disk-paper small,.disk-paper span {font:600 clamp(6px,1.3vw,10px)/1.2 monospace; letter-spacing:.07em}
.disk-paper span {font-size:clamp(5px,1vw,8px)}
.remix {display:flex; align-items:center; justify-content:space-between; gap:20px; border-top:1px solid #486354; margin:20px 0 12px; padding:16px 0 4px}
.remix h2 {font-size:20px; margin:0}
.remix p {font-size:14px; line-height:1.45; color:#c1d0c3; margin:3px 0; max-width:54ch}
.remix a {flex-shrink:0; font-size:14px; font-weight:600}
@media(max-width:460px) { .remix {display:block} .remix a {display:inline-block; margin-top:4px} }
@media(max-height:500px) and (orientation:landscape) { .floppy {width:75px; margin-bottom:8px} }
