/* Demo-only adaptations: fill a real device viewport and hide artboard chrome.
   Visual language (type, colour, components) stays in hifi.css. */

html, body {
  height: 100%;
  min-height: 100%;
}

[hidden] {
  display: none !important;
}

body.operator .desktop {
  width: 100%;
  min-height: 100%;
  height: 100dvh;
  overflow: auto;
}

body.listener .phone {
  width: 100%;
  max-width: 100%;
  height: 100dvh;
  min-height: 100dvh;
  overflow: hidden;
}

/* Fake iPhone chrome is for design artboards, not a real phone. */
body.listener .status-bar,
body.listener .home-indicator {
  display: none;
}

body.listener .phone-main {
  padding-top: max(12px, env(safe-area-inset-top));
  padding-bottom: max(16px, env(safe-area-inset-bottom));
}

.demo-footer {
  font-size: 12px;
  line-height: 1.4;
  font-weight: 500;
  color: var(--muted);
  text-align: center;
  margin-top: 12px;
}

.qr-frame {
  width: 280px;
  height: 280px;
  max-width: 100%;
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 12px;
  box-shadow: var(--shadow);
  padding: 12px;
}

.qr-frame svg,
.qr-frame img,
.qr-frame table {
  width: 100%;
  height: 100%;
  display: block;
}

.qr-stage {
  flex: 1;
  min-height: 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
  padding: 12px 0 8px;
}

.qr-url {
  margin-top: 16px;
  font-size: 16px;
  font-weight: 550;
  letter-spacing: -0.02em;
  color: var(--ink);
  word-break: break-all;
}

.qr-instr {
  margin-top: 20px;
  font-size: 14px;
  line-height: 1.45;
  color: var(--muted);
  font-weight: 500;
}

.qr-instr p + p {
  margin-top: 6px;
}

.live-toolbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  flex-wrap: wrap;
  margin-bottom: 8px;
}

.meter.is-live .meter-fill {
  animation: demo-meter 2.8s var(--ease) infinite alternate;
}

@keyframes demo-meter {
  from { width: 42%; }
  to { width: 74%; }
}

body.listener .sheet-backdrop,
body.listener .sheet {
  position: absolute;
}

@media (max-width: 720px) {
  .qr-frame {
    width: 220px;
    height: 220px;
  }
}

#view-live:not([hidden]) {
  flex: 1;
  min-height: 0;
  display: flex;
  flex-direction: column;
}
