/* Shared hardware for the homepage preview and the desktop player. */
.handset {
  --rim: 9px;
  --corner: 47px;
  --cap: 21px;
  --chin: 12px;
  --hardware: #423742;
  position: relative;
  display: block;
  isolation: isolate;
  box-sizing: border-box;
  padding: var(--rim);
  border: 1px solid #392d3b;
  border-radius: var(--corner);
  background: linear-gradient(133deg, #9e8995 0%, #584b5a 9%, #302c35 29%, #53434d 65%, #a18b8d 87%, #42343e 100%);
  box-shadow: inset 0 0 0 1.5px #d9c3c080, inset 0 0 0 3px #241c2b96,
    1px 3px 0 #4a3a46, 0 13px 17px -9px #5c3b4140, 0 28px 52px -20px #65412e61;
}
.handset::before, .handset::after {
  content: ''; position: absolute; width: 3px; pointer-events: none; border-radius: 2px;
}
.handset::before {
  left: -3px; top: 15%; height: 23%;
  background: linear-gradient(to bottom, var(--hardware) 0 13%, transparent 13% 33%, var(--hardware) 33% 61%, transparent 61% 70%, var(--hardware) 70%);
}
.handset::after { right: -3px; top: 26%; height: 11%; background: var(--hardware); }
.handset-glass {
  position: relative;
  display: flex; flex-direction: column;
  width: 100%; height: 100%; min-height: 0;
  overflow: hidden;
  border-radius: calc(var(--corner) - var(--rim));
  background: #fff9ed;
  box-shadow: 0 0 0 2px #19151dd9;
}
.handset-cap, .handset-chin { position: relative; display: grid; flex: none; place-items: center; pointer-events: none; }
.handset-cap { height: var(--cap); background: #fffbed; }
.handset-cap::before {
  content: ''; width: 18%; height: 49%; border-radius: 99px;
  background: linear-gradient(#1b171f,#312a32); box-shadow: inset 0 -1px 1px #594d58;
}
.handset-cap::after {
  content: ''; position: absolute; left: 56%; top: 39%; height: 22%; aspect-ratio: 1; border-radius: 50%;
  background: radial-gradient(circle at 34% 30%,#8c9ab0 0%,#364756 38%,#191b28 70%);
}
.handset-chin { height: var(--chin); background: #f6eddc; }
.handset-chin::before { content: ''; width: 24%; height: max(2px,23%); border-radius: 99px; background: #5d5459; }

/* On the game this sheet is linked only when the window has room for a device. */
body.web-game {
  background-color: #f4e4bd;
  background-image: radial-gradient(ellipse at 51% 32%,#fff7d8 0%,#fff5d100 54%),
    radial-gradient(ellipse at 3% 105%,#c1ddc4 0%,#d0e3c600 49%),
    radial-gradient(ellipse at 98% 100%,#e7c6bf 0%,#eacdc100 45%),
    linear-gradient(125deg,#ffedc1,#f6e4bb 63%,#f3e5cf);
}
body.web-game::before {
  content: ''; pointer-events: none; position: fixed; inset: 0;
  background: radial-gradient(#806c5145 .8px,transparent 1.2px) 0 0 / 12px 12px;
  mask-image: radial-gradient(ellipse at 50% 44%,transparent 8%,#0006 80%);
}
.web-game .handset.play-handset {
  --case-height: min(875px, calc(100vh - 32px));
  --case-width: clamp(340px, calc(var(--case-height) * .492), 430px);
  --corner: clamp(37px, 5.2vh, 48px);
  width: var(--case-width); height: var(--case-height);
  --game-vw: calc((var(--case-width) - 20px) / 100);
  --game-vh: calc((var(--case-height) - 53px) / 100);
}
@supports (height: 100dvh) {
  .web-game .handset.play-handset { --case-height: min(875px, calc(100dvh - 32px)); }
}
