:root {
  color-scheme: dark;
  font-family: system-ui, Roboto, Arial, sans-serif;
}
* {
  box-sizing: border-box;
  -webkit-tap-highlight-color: transparent;
}
html,
body {
  margin: 0;
  background: #090909;
  color: #fff;
  min-height: 100%;
  overscroll-behavior: none;
}
body {
  touch-action: pan-y;
}
main {
  max-width: 760px;
  margin: auto;
  padding: max(10px, env(safe-area-inset-top)) 14px
    max(18px, env(safe-area-inset-bottom));
}
header {
  height: 45px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-size: 12px;
  letter-spacing: 0.08em;
}
#status {
  color: #888;
  font-size: 10px;
}
.screen {
  padding-top: 12px;
}
.hidden {
  display: none !important;
}
.panel {
  background: #171717;
  border-radius: 22px;
  padding: 20px;
}
h1 {
  font-size: 36px;
  margin: 0 0 8px;
}
h2 {
  margin: 0 0 10px;
}
p {
  color: #aaa;
  line-height: 1.45;
}
input,
button {
  font: inherit;
}
input {
  width: 100%;
  height: 52px;
  background: #111;
  border: 1px solid #444;
  color: #fff;
  border-radius: 14px;
  padding: 0 14px;
  font-size: 16px;
}
button {
  border: 0;
  background: #292929;
  color: #fff;
  border-radius: 14px;
  min-height: 52px;
  padding: 0 18px;
  font-weight: 700;
}
button:disabled {
  background: #666;
  color: #bbb;
  cursor: not-allowed;
}
.primary {
  width: 100%;
  background: #fff;
  color: #000;
  margin-top: 12px;
}
.or {
  text-align: center;
  color: #666;
  margin: 13px;
}
.join {
  display: grid;
  grid-template-columns: 1fr 95px;
  gap: 8px;
}
.code {
  text-align: center;
  font-size: 42px;
  font-weight: 900;
  letter-spacing: 0.15em;
  background: #090909;
  border-radius: 15px;
  padding: 14px;
  margin: 10px 0 15px;
}
#players {
  display: grid;
  gap: 7px;
}
.player {
  background: #090909;
  border-radius: 12px;
  padding: 12px;
}
.file {
  display: block;
  text-align: center;
  background: #292929;
  border-radius: 14px;
  padding: 15px;
  font-weight: 700;
  margin: 15px 0;
}
.file input {
  display: none;
}
.editor {
  overflow: hidden;
  border-radius: 16px;
  background: #000;
  touch-action: none;
}
.editor canvas {
  display: block;
  width: 100%;
}
.camera {
  position: fixed;
  inset: 0;
  background: #000;
  display: flex;
  flex-direction: column;
  padding-top: env(safe-area-inset-top);
  padding-bottom: env(safe-area-inset-bottom);
}
.bar {
  height: 58px;
  padding: 0 14px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  background: #111;
  z-index: 5;
}
.bar small {
  color: #aaa;
}
.stage {
  position: relative;
  flex: 1;
  min-height: 0;
  overflow: hidden;
}
.stage video {
  position: absolute;
  width: 100%;
  height: 100%;
  object-fit: cover;
  visibility: hidden;
}
.stage canvas {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: contain;
  z-index: 2;
}
.hint {
  position: absolute;
  bottom: 18px;
  left: 50%;
  transform: translateX(-50%);
  z-index: 3;
  background: #000b;
  border-radius: 30px;
  padding: 9px 13px;
  font-size: 10px;
  white-space: nowrap;
}
.capture {
  margin: 10px 14px 14px;
  height: 62px;
  border-radius: 32px;
  background: #fff;
  color: #000;
  font-size: 18px;
}
.answer {
  background: #090909;
  border-radius: 15px;
  padding: 10px;
  margin: 10px 0;
}
.answer img {
  width: 100%;
  display: block;
  border-radius: 10px;
}
#sent {
  text-align: center;
  color: #75e3a0;
}
