* { box-sizing: border-box; }
html, body { height: 100%; margin: 0; background: #000; font-family: -apple-system, system-ui, "Segoe UI", sans-serif; }

.app { position: relative; width: 100vw; height: 100vh; overflow: hidden; }

#video{
  position: absolute; inset: 0;
  width: 100%; height: 100%;
  object-fit: cover;
  z-index: 1;
}

/* 画面表示は「潰さない」ため contain（見た目が綺麗） */
#frame{
  position: absolute; inset: 0;
  width: 100%; height: 100%;
  object-fit: contain;
  pointer-events: none;
  z-index: 2;
}

.topbar{
  position: absolute;
  left: 12px; right: 12px; top: 12px;
  display: flex; justify-content: space-between; align-items: center;
  gap: 10px;
  z-index: 5;
}

.badge{
  padding: 8px 12px;
  border-radius: 999px;
  background: rgba(0,0,0,.55);
  color: #fff;
  font-weight: 800;
  font-size: 14px;
  backdrop-filter: blur(6px);
}

.controls{
  position: absolute;
  left: 12px; right: 12px; bottom: 16px;
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
  z-index: 5;
}

.btn{
  border: 0;
  padding: 14px 12px;
  border-radius: 16px;
  font-size: 16px;
  background: rgba(255,255,255,0.92);
}

.btn.primary{
  background: #fff;
  font-weight: 900;
}

.btn.ghost{
  background: rgba(0,0,0,.45);
  color: #fff;
  border: 1px solid rgba(255,255,255,.25);
  backdrop-filter: blur(6px);
}

.btn:disabled{ opacity: .45; }

.hint{
  position: absolute;
  left: 12px; right: 12px; bottom: 132px;
  margin: 0;
  color: #fff;
  font-size: 13px;
  line-height: 1.35;
  text-shadow: 0 1px 2px rgba(0,0,0,.9);
  z-index: 5;
}

.toast{
  position: absolute;
  left: 12px; right: 12px; top: 60px;
  padding: 12px 14px;
  border-radius: 14px;
  background: rgba(0,0,0,.65);
  color: #fff;
  font-size: 14px;
  line-height: 1.35;
  z-index: 10;
  backdrop-filter: blur(6px);
  text-align: center;
}

.hidden{ display: none; }