* { box-sizing: border-box; }
:root { color-scheme: dark; font: 16px/1.45 system-ui, sans-serif; color: #ece1c9; background: #101f29; }
body { margin: 0; }
main {
  min-height: 100vh; min-height: 100svh; display: flex; flex-direction: column; align-items: center;
  justify-content: center; gap: 10px; padding: 12px 4px;
  background: radial-gradient(ellipse at 48% 47%, #344954 0%, #1b303c 45%, #0c1923 100%);
}
:root[data-theme="light"], :root[data-theme="light"] main { background: #fff; }
:root[data-theme="light"] { color-scheme: light; }
:root[data-theme="dark"], :root[data-theme="dark"] main { background: #121214; }
.device {
  position: relative; isolation: isolate; overflow: hidden; flex: none; aspect-ratio: 699 / 1162;
  width: min(100%, 530px, max(260px, calc((100vh - 88px) * .60155)));
  width: min(100%, 530px, max(260px, calc((100svh - 88px) * .60155)));
  filter: drop-shadow(0 5px 8px rgba(3, 10, 16, .48));
}
/* Same 699 x 1162 crop and 409-pixel LCD measured for the social clip. */
.shell { pointer-events: none; user-select: none; position: absolute; width: 179.39914%; height: auto; left: -39.91416%; top: -4.30293%; }
canvas, #status { position: absolute; left: 20.45780%; top: 12.04819%; width: 58.51216%; aspect-ratio: 10 / 9; }
canvas { display: block; height: auto; background: #10212c; image-rendering: pixelated; }
#status { display: grid; place-content: center; text-align: center; padding: 8px; font-size: .78rem; background: #10212c; }
#status[hidden] { display: none; }
button {
  appearance: none; position: absolute; transform: translate(-50%, -50%); background: transparent;
  padding: 0; border: none; border-radius: 50%; cursor: pointer; touch-action: none; -webkit-tap-highlight-color: transparent;
}
.pad { width: 14.4%; height: 10.4%; top: 66.7%; border-radius: 30%; }
.left { left: 16.4%; } .right { left: 34.0%; }
.start { left: 58.2%; top: 81.8%; width: 19%; height: 8.3%; }
.action { left: 81.8%; top: 64.1%; width: 17%; aspect-ratio: 1; }
button:active, button.held { background: radial-gradient(ellipse, #ffdaa144, transparent 70%); }
:focus-visible { outline: 2px solid #ffe5ae; outline-offset: 1px; }
#help { margin: 0; text-align: center; color: #c6d4d4; font-size: .81rem; }
#help strong, kbd { color: #fff0d1; font: inherit; font-weight: 620; }
:root[data-theme="light"] #help { color: #4a4a4a; }
:root[data-theme="light"] #help :is(strong, kbd) { color: #222; }
@media (max-height: 490px) and (orientation: landscape) {
  main { flex-direction: row; gap: 16px; padding: 5px; }
  .device { width: min(60vw, max(235px, calc((100svh - 10px) * .60155))); }
  #help { max-width: 170px; text-align: left; }
}
