* { box-sizing: border-box; }
html, body { margin: 0; min-height: 100%; background: #111; }
body { overflow: hidden; font-family: Arial, Helvetica, sans-serif; }
.showcase { position: fixed; inset: 0; overflow: hidden; background: #111; }
.environment-image {
  position: absolute; inset: 0; width: 100%; height: 100%;
  object-fit: cover; object-position: center center;
  user-select: none; pointer-events: none;
}
.screen-window {
  position: absolute; z-index: 3; overflow: hidden; background: #000;
  box-shadow: inset 0 0 0 1px rgba(255,255,255,.05), 0 10px 32px rgba(0,0,0,.12);
}
.live-display { display: block; width: 100%; height: 100%; border: 0; background: #000; }
.screen-glass {
  position: absolute; inset: 0; z-index: 2; pointer-events: none;
  background:
    linear-gradient(116deg,rgba(255,255,255,.05) 0%,rgba(255,255,255,.012) 20%,transparent 38%),
    linear-gradient(180deg,rgba(255,255,255,.015),transparent 22%,transparent 78%,rgba(255,255,255,.012));
  mix-blend-mode: screen;
}
.desktop-qr {
  position: absolute; z-index: 5; display: grid; place-items: center;
  overflow: hidden; background: transparent; border-radius: 8px;
}
.desktop-qr img { width: 100%; height: 100%; display: block; object-fit: contain; }
.mobile-join-panel, .mobile-brandbar { display: none; }
.prototype-note {
  position: fixed; right: 14px; bottom: 11px; z-index: 8;
  padding: 7px 9px; border: 1px solid rgba(255,255,255,.16); border-radius: 7px;
  color: rgba(255,255,255,.64); background: rgba(0,0,0,.28);
  font-size: 9px; font-weight: 700; letter-spacing: .12em; backdrop-filter: blur(8px);
}

/* Calibration panel */
#cgiCalibrationPanel {
  position: fixed; right: 16px; top: 16px; z-index: 99999;
  width: 330px; padding: 16px; border-radius: 14px;
  background: rgba(17,24,28,.96); color: #fff;
  border: 1px solid rgba(255,255,255,.14);
  box-shadow: 0 18px 46px rgba(0,0,0,.38); backdrop-filter: blur(12px);
}
.cal-head { display:flex; align-items:flex-start; justify-content:space-between; gap:12px; margin-bottom:14px; }
.cal-title { font-size:14px; font-weight:900; letter-spacing:.08em; }
.cal-sub { margin-top:4px; font-size:11px; color:rgba(255,255,255,.65); }
.cal-icon { width:30px; height:30px; padding:0; border:0; border-radius:8px; background:rgba(255,255,255,.08); color:#fff; font-size:22px; cursor:pointer; }
.cal-row { display:grid; grid-template-columns:46px 1fr 64px; gap:9px; align-items:center; margin:10px 0; }
.cal-row label { font-size:12px; font-weight:800; }
.cal-row input[type="range"] { width:100%; accent-color:#19add7; }
.cal-number { width:64px; height:32px; padding:0 6px; border-radius:7px; border:1px solid rgba(255,255,255,.18); background:#202b30; color:#fff; font:12px Consolas,monospace; }
.cal-readout { margin-top:13px; padding:10px; border-radius:9px; background:rgba(255,255,255,.07); font:12px/1.45 Consolas,monospace; }
.cal-actions { display:flex; gap:8px; margin-top:10px; }
.cal-actions button { flex:1; min-height:38px; border:1px solid rgba(255,255,255,.18); border-radius:9px; background:rgba(255,255,255,.07); color:#fff; font-weight:800; cursor:pointer; }
.cal-actions .cal-primary { background:#139fc7; border-color:#139fc7; }
.cal-note { margin-top:9px; font-size:10px; line-height:1.4; color:rgba(255,255,255,.55); }

@media (max-width: 900px), (max-aspect-ratio: 1 / 1) {
  .desktop-qr, .prototype-note { display: none; }

  /* The mall remains atmospheric; the live CGI is positioned separately above
     the CTA panel so that 100% of it remains visible. */
  .environment-image {
    object-position: center center;
    filter: brightness(.96);
  }

  .mobile-join-panel {
    position: absolute;
    z-index: 7;
    left: 10px;
    right: 10px;
    bottom: max(10px, env(safe-area-inset-bottom));
    display: block;
    padding: 10px 12px 11px;
    border-radius: 18px;
    background: rgba(255,255,255,.97);
    color: #111;
    box-shadow: 0 12px 32px rgba(0,0,0,.25);
    border: 1px solid rgba(0,0,0,.08);
    backdrop-filter: blur(10px);
  }

  .mobile-brandbar {
    display: flex;
    align-items: center;
    gap: 10px;
    min-height: 62px;
    margin-bottom: 8px;
    padding: 8px 10px;
    border-radius: 14px;
    background: linear-gradient(135deg,#25b8ee 0%,#0aa0df 45%,#0688d0 100%);
    color: #fff;
    overflow: hidden;
    box-shadow: inset 0 0 0 1px rgba(255,255,255,.12);
  }

  .mobile-refresh-lockup { flex: 1 1 56%; min-width: 0; }

  .mobile-refresh-word {
    font-family: Georgia,'Times New Roman',serif;
    font-style: italic;
    font-weight: 700;
    font-size: 24px;
    line-height: .95;
    letter-spacing: -.03em;
    margin-bottom: 5px;
  }

  .mobile-refresh-sub {
    font-size: 7px;
    line-height: 1.35;
    font-weight: 800;
    letter-spacing: .12em;
    opacity: .95;
  }

  .mobile-brand-divider {
    width: 1px;
    align-self: stretch;
    background: rgba(255,255,255,.5);
  }

  .mobile-brand-bbp {
    flex: 0 0 38%;
    display: flex;
    justify-content: center;
    align-items: center;
  }

  .mobile-brand-bbp img {
    display: block;
    width: 100%;
    max-width: 112px;
    height: auto;
    filter: drop-shadow(0 3px 7px rgba(0,0,0,.14));
  }

  .mobile-kicker {
    margin-bottom: 4px;
    color: #e61d2f;
    font-size: 9px;
    font-weight: 900;
    letter-spacing: .15em;
  }

  .mobile-title {
    margin-bottom: 0;
    font-size: 22px;
    line-height: 1.02;
    font-weight: 850;
  }

  /* On a phone these explanatory lines are redundant and were consuming
     valuable CGI space. */
  .mobile-copy,
  .mobile-note {
    display: none;
  }

  .mobile-cta {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 9px;
    width: 100%;
    min-height: 44px;
    margin: 9px 0 0;
    border-radius: 13px;
    background: linear-gradient(90deg,#159fdc 0%,#1cb5ea 100%);
    color: #fff;
    text-decoration: none;
    font-size: 16px;
    font-weight: 850;
    box-shadow: 0 8px 16px rgba(9,145,205,.22);
  }

  #cgiCalibrationPanel {
    width: min(330px, calc(100vw - 24px));
    right: 12px;
    top: 12px;
  }
}
@media (max-width: 430px) and (orientation: portrait) {
  .mobile-join-panel {
    left: 8px;
    right: 8px;
    bottom: max(8px, env(safe-area-inset-bottom));
    padding: 9px 10px 10px;
  }
  .mobile-brandbar {
    min-height: 56px;
    padding: 7px 9px;
    gap: 8px;
    margin-bottom: 7px;
  }
  .mobile-refresh-word { font-size: 22px; }
  .mobile-refresh-sub { font-size: 6.5px; letter-spacing: .10em; }
  .mobile-brand-bbp img { max-width: 98px; }
  .mobile-title { font-size: 20px; }
  .mobile-cta { min-height: 42px; margin-top: 8px; font-size: 15px; }
}
