:root{
      --font-sans:"Plus Jakarta Sans",sans-serif;
      --bg:#eef2e9;
      --paper:rgba(252,253,248,.82);
      --paper-solid:#fbfcf7;
      --ink:#1f2c25;
      --muted:#6b766f;
      --line:rgba(70,88,77,.16);
      --accent:#587a67;
      --accent-strong:#436652;
      --danger:#a45b5b;
      --ok:#47735a;
      --shadow:0 24px 60px rgba(45,70,55,.12);
    }

    body[data-mode="indoor"]{
      --bg:#eef2e9;
      --paper:rgba(252,253,248,.82);
      --paper-solid:#fbfcf7;
      --ink:#1f2c25;
      --muted:#6b766f;
      --line:rgba(70,88,77,.16);
      --accent:#587a67;
      --accent-strong:#436652;
      --ok:#47735a;
      --shadow:0 24px 60px rgba(45,70,55,.12);
    }

    body[data-mode="outdoor"]{
      --bg:#eaf0e8;
      --paper:rgba(250,252,248,.94);
      --paper-solid:rgba(255,255,252,.98);
      --ink:#17211b;
      --muted:#46584c;
      --line:rgba(36,54,43,.12);
      --accent:#355f49;
      --accent-strong:#2e523f;
      --ok:#335f45;
      --shadow:0 26px 70px rgba(36,58,44,.14);
    }

    *{box-sizing:border-box}

    html,body{
      margin:0;
      width:100%;
      height:100%;
      min-height:100%;
      background:var(--bg);
      color:var(--ink);
      overflow:hidden;
    }

    body{
      position:relative;
      isolation:isolate;
      font-family:var(--font-sans);
      padding:
        max(10px,env(safe-area-inset-top))
        max(12px,env(safe-area-inset-right))
        max(12px,env(safe-area-inset-bottom))
        max(12px,env(safe-area-inset-left));
    }

    @supports (height:100dvh){
      html,body{height:100dvh;min-height:100dvh}
    }

    /* iPad Home Screen / PWA:
       status bar can overlap the top of the page.
       Add extra top spacing only when launched as an app. */
    @media (display-mode: standalone), (display-mode: fullscreen){
      body{
        padding-top:max(42px, calc(env(safe-area-inset-top) + 16px));
      }
    }

    /* Dynamic fluid background: intentionally very slow so it feels alive
       without distracting from the camera booth UI. */
    body::before{
      content:"";
      position:fixed;
      inset:-16%;
      z-index:-2;
      pointer-events:none;
      background:
        radial-gradient(ellipse at 10% 18%, rgba(190,214,196,.82) 0 18%, transparent 48%),
        radial-gradient(ellipse at 86% 14%, rgba(220,234,220,.84) 0 17%, transparent 44%),
        radial-gradient(ellipse at 78% 80%, rgba(203,223,207,.72) 0 18%, transparent 48%),
        radial-gradient(ellipse at 18% 84%, rgba(229,233,204,.62) 0 16%, transparent 45%),
        radial-gradient(ellipse at 48% 50%, rgba(247,244,232,.95) 0 23%, transparent 61%),
        linear-gradient(135deg,#edf2e9 0%,#f7f5ee 52%,#e9f0e8 100%);
      filter:blur(38px) saturate(.92);
      transform:scale(1.06);
      transform-origin:center;
      animation:ambientDrift 38s ease-in-out infinite alternate;
    }

    /* Secondary slow-moving wash to create a subtle fluid feeling. */
    .app::before{
      content:"";
      position:fixed;
      inset:-12%;
      z-index:-1;
      pointer-events:none;
      background:
        radial-gradient(circle at 22% 26%, rgba(218,235,221,.52) 0 10%, transparent 25%),
        radial-gradient(circle at 73% 24%, rgba(206,227,212,.40) 0 12%, transparent 28%),
        radial-gradient(circle at 58% 78%, rgba(238,241,219,.34) 0 10%, transparent 27%),
        radial-gradient(circle at 84% 66%, rgba(214,233,225,.26) 0 10%, transparent 24%);
      filter:blur(52px);
      opacity:.95;
      animation:ambientFloat 28s ease-in-out infinite alternate;
    }

    /* Fine paper grain; intentionally very low contrast. */
    body::after{
      content:"";
      position:fixed;
      inset:0;
      z-index:-1;
      pointer-events:none;
      opacity:.12;
      mix-blend-mode:multiply;
      background-image:
        radial-gradient(rgba(47,70,57,.17) .45px, transparent .55px),
        radial-gradient(rgba(255,255,255,.75) .5px, transparent .6px);
      background-position:0 0, 2px 2px;
      background-size:4px 4px;
      animation:grainDrift 12s steps(6) infinite;
    }

    body[data-mode="outdoor"]::before{
      background:
        radial-gradient(ellipse at 12% 18%, rgba(203,221,205,.62) 0 18%, transparent 48%),
        radial-gradient(ellipse at 86% 14%, rgba(224,233,223,.60) 0 17%, transparent 44%),
        radial-gradient(ellipse at 78% 80%, rgba(210,223,212,.50) 0 18%, transparent 48%),
        radial-gradient(ellipse at 18% 84%, rgba(234,236,214,.42) 0 16%, transparent 45%),
        radial-gradient(ellipse at 48% 50%, rgba(246,244,236,.97) 0 23%, transparent 61%),
        linear-gradient(135deg,#eef3ec 0%,#f6f4ed 52%,#eaf0e8 100%);
      filter:blur(34px) saturate(.86);
    }

    body[data-mode="outdoor"] .app::before{
      background:
        radial-gradient(circle at 22% 26%, rgba(218,235,221,.40) 0 9%, transparent 24%),
        radial-gradient(circle at 73% 24%, rgba(206,227,212,.30) 0 11%, transparent 26%),
        radial-gradient(circle at 58% 78%, rgba(238,241,219,.24) 0 10%, transparent 25%),
        radial-gradient(circle at 84% 66%, rgba(214,233,225,.18) 0 9%, transparent 22%);
      opacity:.72;
      filter:blur(48px);
    }

    body[data-mode="outdoor"]::after{
      opacity:.08;
    }

    .app{
      position:relative;
      z-index:1;
      width:min(1280px,100%);
      height:100%;
      margin:0 auto;
      display:flex;
      flex-direction:column;
      min-height:0;
    }

    header.hero-header{
      flex:0 0 auto;
      margin:0 0 12px;
      display:block;
      text-align:center;
    }

    .hero-main{
      min-width:0;
      width:100%;
      text-align:center;
      padding:8px 0 4px;
      display:flex;
      flex-direction:column;
      align-items:center;
      justify-content:flex-start;
      transform:none;
    }

    .hero-spacer{
      display:none;
    }

    .eyebrow{
      margin:0;
      font-size:13px;
      font-weight:700;
      letter-spacing:.16em;
      text-transform:uppercase;
      color:#4a5b51;
      line-height:1.45;
      opacity:1;
      text-shadow:0 1px 0 rgba(255,255,255,.72);
      max-width:280px;
    }

    h1{
      margin:0 auto;
      font-family:"Great Vibes", Georgia, serif;
      font-size:clamp(68px,7vw,104px);
      font-weight:400;
      line-height:.94;
      letter-spacing:0;
      text-align:center;
    }

    .hero-main p{
      margin:8px auto 0;
      color:var(--muted);
      font-size:15px;
      max-width:720px;
      line-height:1.38;
      text-align:center;
    }

    .card{
      flex:1 1 auto;
      min-height:0;
      display:grid;
      grid-template-columns:minmax(0,2.25fr) minmax(270px,.85fr);
      background:transparent;
      border:0;
      border-radius:26px;
      box-shadow:none;
      overflow:visible;
    }

    .stage{
      position:relative;
      z-index:2;
      min-width:0;
      min-height:0;
      height:100%;
      background:#101612;
      overflow:hidden;
      border-radius:26px 0 0 26px;
      box-shadow:
        10px 0 30px rgba(18,31,23,.18),
        0 18px 46px rgba(28,48,35,.16);
    }

    video{
      width:100%;
      height:100%;
      object-fit:cover;
      display:block;
      background:#101612;
      transition:filter .24s ease, transform .24s ease;
    }

    #live.front{transform:scaleX(-1)}

    .stage.privacy #live{
      filter:blur(11px) saturate(.9) brightness(.96);
      transform:scale(1.04);
    }

    .stage.privacy #live.front{
      transform:scaleX(-1) scale(1.04);
    }

    .camera-placeholder{
      position:absolute;
      inset:0;
      z-index:2;
      display:flex;
      flex-direction:column;
      align-items:center;
      justify-content:center;
      gap:10px;
      color:rgba(229,238,232,.48);
      font-size:13px;
      font-weight:600;
      letter-spacing:.02em;
      pointer-events:none;
      transition:opacity .24s ease, visibility .24s ease, transform .24s ease;
    }

    .camera-placeholder svg{
      width:40px;
      height:40px;
      opacity:.72;
    }

    .camera-placeholder.hidden{
      opacity:0;
      visibility:hidden;
      transform:scale(.98);
    }

    .timer{transition:opacity .2s ease}
    .stage:not(.recording) .timer{opacity:.68}
    .stage.recording .timer{opacity:1}

    .overlay-top{
      position:absolute;
      inset:14px 14px auto 14px;
      display:flex;
      justify-content:space-between;
      align-items:center;
      gap:10px;
      pointer-events:none;
    }

    .badge,.timer,.queue{
      background:rgba(0,0,0,.62);
      color:#fff;
      border-radius:999px;
      padding:8px 11px;
      font-size:13px;
      backdrop-filter:blur(8px);
      font-variant-numeric:tabular-nums;
    }

    .badge{display:none;align-items:center;gap:8px}
    .badge.show{display:flex}
    .dot{
      width:9px;
      height:9px;
      border-radius:50%;
      background:#ff5252;
      animation:blink 1s infinite;
    }

    @keyframes blink{50%{opacity:.35}}
    @keyframes ambientDrift{
      0%{transform:translate3d(-1.5%, -1%, 0) scale(1.04) rotate(-1deg)}
      50%{transform:translate3d(1.5%, 1%, 0) scale(1.09) rotate(.6deg)}
      100%{transform:translate3d(3%, -1.8%, 0) scale(1.06) rotate(1.2deg)}
    }

    @keyframes ambientFloat{
      0%{transform:translate3d(-2%, 0, 0) scale(1)}
      50%{transform:translate3d(1.5%, -1%, 0) scale(1.05)}
      100%{transform:translate3d(2.5%, 1.4%, 0) scale(1.02)}
    }

    @keyframes grainDrift{
      0%{transform:translate(0,0)}
      25%{transform:translate(2px,-2px)}
      50%{transform:translate(-2px,1px)}
      75%{transform:translate(1px,2px)}
      100%{transform:translate(0,0)}
    }

    .countdown{
      position:absolute;
      inset:0;
      display:none;
      place-items:center;
      background:rgba(0,0,0,.36);
      color:#fff;
      font-family:Georgia,"Times New Roman",serif;
      font-size:clamp(80px,18vw,180px);
      text-shadow:0 4px 24px rgba(0,0,0,.35);
    }

    .countdown.show{display:grid}

    .privacy-toggle{
      position:absolute;
      left:14px;
      bottom:14px;
      z-index:5;
      width:auto;
      min-width:0;
      min-height:40px;
      padding:0 13px;
      border-radius:999px;
      border:1px solid rgba(255,255,255,.30);
      background:rgba(10,18,14,.60);
      color:#fff;
      font-size:12px;
      font-weight:700;
      letter-spacing:.01em;
      backdrop-filter:blur(10px);
      -webkit-backdrop-filter:blur(10px);
      box-shadow:0 8px 24px rgba(0,0,0,.16);
    }

    .privacy-toggle.active{
      background:rgba(70,111,88,.88);
      border-color:rgba(255,255,255,.38);
    }

    .privacy-toggle:disabled{opacity:.62}

    .privacy-note{
      position:absolute;
      left:14px;
      bottom:60px;
      z-index:4;
      padding:6px 9px;
      border-radius:9px;
      background:rgba(10,18,14,.52);
      color:rgba(255,255,255,.86);
      font-size:10px;
      line-height:1.2;
      backdrop-filter:blur(8px);
      -webkit-backdrop-filter:blur(8px);
      opacity:0;
      transform:translateY(4px);
      transition:opacity .2s ease, transform .2s ease;
      pointer-events:none;
    }

    .stage.privacy .privacy-note{
      opacity:1;
      transform:translateY(0);
    }

    .panel{
      position:relative;
      z-index:3;
      min-width:0;
      min-height:0;
      height:100%;
      padding:18px;
      border-left:1px solid var(--line);
      display:flex;
      flex-direction:column;
      overflow:hidden;
      border-radius:0 26px 26px 0;
      background:var(--paper);
      backdrop-filter:blur(16px);
      -webkit-backdrop-filter:blur(16px);
      box-shadow:
        -8px 0 26px rgba(22,39,28,.12),
        0 18px 46px rgba(28,48,35,.15);
    }

    .panel-brand{
      flex:0 0 auto;
      width:100%;
      display:flex;
      flex-direction:column;
      align-items:center;
      justify-content:center;
      text-align:center;
      gap:10px;
      padding:12px 6px 0;
    }


    .panel-brand .eyebrow{
      max-width:none;
      font-size:11.5px;
      line-height:1.55;
      letter-spacing:.13em;
      text-align:center;
    }

    .panel-brand .eyebrow span{
      display:block;
      white-space:nowrap;
    }

    .panel-middle{
      flex:1 1 auto;
      min-height:0;
      width:min(100%,306px);
      margin:0 auto;
      padding:18px 0 22px;
      display:flex;
      flex-direction:column;
      justify-content:center;
      align-items:stretch;
      gap:11px;
    }

    .status{
      min-height:38px;
      display:flex;
      align-items:center;
      justify-content:center;
      text-align:center;
      color:var(--muted);
      font-size:13px;
      line-height:1.35;
      width:100%;
      margin:0 auto;
    }

    .status.error{color:#8b2323}
    .status.ok{color:var(--ok)}

    .progress-wrap{display:none}
    .progress-wrap.show{display:block}
    .progress-label{
      font-size:11px;
      color:var(--muted);
      margin-bottom:6px;
      text-align:center;
    }

    .bar{
      height:8px;
      background:#e3e1da;
      border-radius:999px;
      overflow:hidden;
    }

    .bar > div{
      height:100%;
      width:0;
      background:var(--accent);
      transition:width .2s ease;
    }

    .controls{
      display:grid;
      grid-template-columns:1fr;
      gap:12px;
      margin-top:0;
      width:100%;
    }

    button{
      appearance:none;
      -webkit-appearance:none;
      min-height:50px;
      width:100%;
      border-radius:15px;
      border:1px solid var(--ink);
      padding:0 14px;
      font:inherit;
      font-size:14px;
      font-weight:700;
      cursor:pointer;
      background:transparent;
      color:var(--ink);
      -webkit-tap-highlight-color:transparent;
    }

    #mainBtn{min-height:62px;font-size:16px}

    button.primary{
      background:var(--accent);
      border-color:var(--accent);
      color:#fff;
    }

    button.recording{
      background:var(--danger);
      border-color:var(--danger);
      color:#fff;
    }

    button:disabled{
      opacity:.58;
      cursor:default;
    }

    .secondary-row{
      display:grid;
      grid-template-columns:1fr 1fr;
      gap:10px;
      width:100%;
      align-items:stretch;
    }

    .secondary-row.empty{display:none}
    .secondary-row button[hidden]{display:none}
    .secondary-row.one-visible{grid-template-columns:1fr}

    .secondary-row button{
      min-height:44px;
      padding:0 9px;
      font-size:12px;
    }

    .consent{
      flex:0 0 auto;
      width:100%;
      margin-top:0;
      padding:12px 13px;
      border-radius:13px;
      background:rgba(238,242,232,.76);
      color:var(--muted);
      font-size:11.8px;
      line-height:1.42;
    }

    .admin{
      flex:0 0 auto;
      width:100%;
      padding:9px 2px 0;
      border-top:1px solid var(--line);
      color:var(--muted);
      font-size:10.5px;
      display:flex;
      justify-content:space-between;
      gap:8px;
      flex-wrap:wrap;
    }

    body[data-mode="outdoor"] .panel{
      background:var(--paper);
      border-color:rgba(255,255,255,.68);
      backdrop-filter:blur(10px) saturate(.9);
      -webkit-backdrop-filter:blur(10px) saturate(.9);
      box-shadow:
        -10px 0 30px rgba(19,36,25,.14),
        0 20px 50px rgba(27,48,34,.17);
    }

    body[data-mode="outdoor"] .consent{
      background:rgba(255,255,255,.72);
      color:var(--muted);
    }

    body[data-mode="outdoor"] .badge,
    body[data-mode="outdoor"] .timer,
    body[data-mode="outdoor"] .queue,
    body[data-mode="outdoor"] .privacy-toggle,
    body[data-mode="outdoor"] .privacy-note{
      box-shadow:0 8px 24px rgba(0,0,0,.12);
    }

    body[data-mode="outdoor"] .badge,
    body[data-mode="outdoor"] .timer,
    body[data-mode="outdoor"] .queue{
      background:rgba(0,0,0,.72);
    }

    body[data-mode="outdoor"] button:disabled{
      opacity:.64;
    }

    body[data-mode="outdoor"] .stage{
      box-shadow:
        14px 0 34px rgba(16,30,21,.22),
        0 18px 46px rgba(27,48,34,.16);
    }

    /* iPad landscape / kiosk: everything stays inside one screen */
    @media (orientation:landscape) and (min-width:761px){
      .hero-main p{white-space:nowrap}
    }

    /* Portrait / narrow screens fall back to the stacked layout. */
    @media (orientation:portrait), (max-width:760px){
      html,body{
        height:auto;
        min-height:100%;
        overflow:auto;
      }

      body{
        padding:
          max(18px,env(safe-area-inset-top))
          18px
          max(24px,env(safe-area-inset-bottom));
      }

      .app{
        width:min(820px,100%);
        height:auto;
        display:block;
      }

      header.hero-header{
        margin:8px 0 20px;
        display:block;
      }

      .hero-main,
      .hero-spacer{
        padding:0;
      }

      .hero-spacer{
        display:none;
      }

      .eyebrow{
        max-width:100%;
        font-size:12px;
        line-height:1.5;
      }

      h1{
        font-size:clamp(56px,14vw,88px);
      }

      .hero-main p{
        font-size:15px;
        max-width:600px;
        line-height:1.5;
        white-space:normal;
      }

      .card{
        display:block;
      }

      .stage{
        height:auto;
        aspect-ratio:4/3;
        border-radius:26px 26px 0 0;
      }

      .panel{
        height:auto;
        padding:20px;
        border-left:0;
        border-top:1px solid var(--line);
        border-radius:0 0 26px 26px;
        overflow:visible;
      }


      .panel-middle{
        width:100%;
        max-width:none;
        padding:10px 0 14px;
        margin:0;
      }

      .status{
        min-height:42px;
        font-size:14px;
      }

      .controls{
        grid-template-columns:1.5fr .7fr;
      }

      #mainBtn{
        min-height:54px;
        font-size:14px;
      }

      .consent{
        margin-top:14px;
        font-size:12px;
        line-height:1.5;
      }

      .admin{
        font-size:12px;
      }
    }

    /* ================================================================
       FINAL — Editorial exhibition kiosk
       One unified surface, fewer generic cards, stronger typographic rhythm.
       ================================================================ */

    :root,
    body[data-mode="outdoor"]{
      --bg:#edf2eb;
      --paper:#f8faf5;
      --paper-solid:#fbfcf8;
      --ink:#17211b;
      --muted:#4b5c51;
      --line:rgba(27,43,33,.14);
      --accent:#315b45;
      --accent-strong:#254a37;
      --danger:#99514e;
      --ok:#315f45;
    }

    body::before{
      opacity:.92;
      filter:blur(38px) saturate(.82);
    }

    body::after{
      opacity:.055;
    }

    .app::before{
      opacity:.54 !important;
    }

    header.hero-header{
      flex:0 0 auto;
      display:grid;
      grid-template-columns:minmax(0,2.25fr) minmax(270px,.85fr);
      gap:0;
      align-items:end;
      margin:0 0 14px;
    }

    .hero-main{
      width:100%;
      padding:4px 30px 6px 24px;
      align-items:flex-start;
      text-align:left;
    }

    h1{
      margin:0;
      font-family:"Iowan Old Style","Palatino Linotype","Book Antiqua",Palatino,Georgia,serif;
      font-size:clamp(56px,6vw,88px);
      font-weight:500;
      font-style:italic;
      line-height:.94;
      letter-spacing:-.045em;
      text-align:left;
      color:var(--ink);
    }

    .hero-main p{
      margin:10px 0 0;
      max-width:640px;
      text-align:left;
      color:var(--muted);
      font-size:14.5px;
      line-height:1.42;
      letter-spacing:.005em;
    }

    .hero-note{
      min-width:0;
      padding:0 24px 10px 26px;
      display:flex;
      justify-content:flex-end;
      align-items:flex-end;
    }

    .hero-note p{
      margin:0;
      max-width:240px;
      padding-left:0;
      border-left:0;
      color:var(--muted);
      font-family:var(--font-sans);
      font-size:12px;
      line-height:1.2;
      font-style:normal;
      font-weight:750;
      letter-spacing:.14em;
      text-transform:uppercase;
      text-align:right;
    }

    /* The camera and controls are one installation, not two floating cards. */
    .card{
      background:var(--paper);
      border:1px solid rgba(255,255,255,.72);
      border-radius:20px;
      box-shadow:0 22px 58px rgba(26,45,32,.16);
      overflow:hidden;
    }

    .stage,
    body[data-mode="outdoor"] .stage{
      z-index:1;
      border-radius:0;
      box-shadow:none;
    }

    .panel,
    body[data-mode="outdoor"] .panel{
      z-index:1;
      padding:0;
      border:0;
      border-left:1px solid var(--line);
      border-radius:0;
      background:rgba(248,250,245,.975);
      box-shadow:none;
      backdrop-filter:none;
      -webkit-backdrop-filter:none;
    }

    .panel-brand{
      flex:0 0 auto;
      width:100%;
      padding:26px 24px 0;
      display:block;
      text-align:left;
    }

    .panel-brand .eyebrow{
      width:100%;
      max-width:none;
      padding-left:13px;
      border-left:2px solid var(--accent);
      text-align:left;
      line-height:1.2;
    }

    .panel-brand .eyebrow span{
      white-space:normal;
    }

    .panel-brand .event-name{
      display:block;
      color:var(--accent);
      font-size:9.5px;
      font-weight:800;
      line-height:1.25;
      letter-spacing:.16em;
      text-transform:uppercase;
    }

    .panel-brand .event-date{
      display:block;
      margin-top:5px;
      color:var(--ink);
      font-family:"Iowan Old Style","Palatino Linotype","Book Antiqua",Palatino,Georgia,serif;
      font-size:16px;
      font-weight:500;
      line-height:1.18;
      letter-spacing:-.015em;
      text-transform:none;
    }

    .panel-middle{
      width:100%;
      margin:0;
      padding:22px 24px 24px;
      justify-content:center;
      gap:12px;
    }

    .status{
      min-height:34px;
      justify-content:flex-start;
      text-align:left;
      margin:0;
      color:var(--muted);
      font-size:13px;
      line-height:1.35;
    }

    .progress-label{
      text-align:left;
      font-size:10.5px;
    }

    .bar{
      height:6px;
      background:#e2e8e1;
      border-radius:2px;
    }

    .controls{
      gap:9px;
    }

    button{
      min-height:48px;
      border-radius:8px;
      border-color:rgba(23,33,27,.38);
      font-size:13px;
      font-weight:720;
      letter-spacing:.005em;
      background:rgba(255,255,255,.30);
    }

    #mainBtn{
      min-height:58px;
      font-size:15px;
    }

    button.primary{
      background:var(--accent);
      border-color:var(--accent);
      color:#fff;
    }

    button:not(.primary):not(.recording):not(.privacy-toggle){
      background:transparent;
    }

    button:disabled{
      opacity:.54;
    }

    .secondary-row{
      gap:8px;
    }

    .secondary-row button{
      min-height:40px;
      border-radius:7px;
      font-size:11.5px;
    }

    .consent{
      flex:0 0 auto;
      width:auto;
      margin:0 24px;
      padding:15px 0 12px;
      border-top:1px solid var(--line);
      border-radius:0;
      background:transparent !important;
      color:var(--muted);
      font-size:10.8px;
      line-height:1.42;
    }

    .admin{
      flex:0 0 auto;
      width:auto;
      margin:0 24px;
      padding:0 0 18px;
      border:0;
      color:var(--muted);
      font-size:9px;
      line-height:1.2;
      opacity:.58;
      letter-spacing:.015em;
    }

    .privacy-toggle{
      left:16px;
      bottom:16px;
      min-height:36px;
      padding:0 11px;
      border-radius:8px;
      border-color:rgba(255,255,255,.28);
      background:rgba(8,15,11,.70);
      box-shadow:none !important;
      font-size:11px;
      letter-spacing:.01em;
    }

    .privacy-toggle.active{
      background:rgba(49,91,69,.92);
    }

    .privacy-note{
      left:16px;
      bottom:59px;
      border-radius:6px;
      box-shadow:none !important;
      font-size:9.5px;
    }

    .badge,.timer,.queue{
      border-radius:7px;
      background:rgba(5,10,7,.72) !important;
      box-shadow:none !important;
      font-size:12px;
      padding:7px 9px;
    }

    .camera-placeholder{
      gap:12px;
      color:rgba(232,240,234,.50);
      font-size:11px;
      font-weight:650;
      letter-spacing:.08em;
      text-transform:uppercase;
    }

    .camera-placeholder svg{
      width:36px;
      height:36px;
      opacity:.62;
    }

    @media (orientation:landscape) and (min-width:761px){
      .hero-main p{white-space:nowrap}
    }

    @media (orientation:portrait), (max-width:760px){
      header.hero-header{
        display:block;
        margin:8px 0 18px;
      }

      .hero-main{
        padding:0 4px;
        align-items:flex-start;
        text-align:left;
      }

      h1{
        font-size:clamp(52px,13vw,78px);
        text-align:left;
      }

      .hero-main p{
        white-space:normal;
        text-align:left;
      }

      .hero-note{
        display:none;
      }

      .card{
        border-radius:18px;
      }

      .stage{
        border-radius:0;
      }

      .panel{
        border-left:0;
        border-top:1px solid var(--line);
        border-radius:0;
      }

      .panel-brand{
        padding:22px 20px 0;
      }

      .panel-middle{
        padding:18px 20px 20px;
      }

      .consent,
      .admin{
        margin-left:20px;
        margin-right:20px;
      }

      .controls{
        grid-template-columns:1fr;
      }
    }

  
    /* ===== Full-preview layout: remove right panel, integrate controls with camera ===== */
    .card.full-preview{
      display:block;
      background:transparent;
      border:0;
      border-radius:26px;
      box-shadow:none;
      overflow:visible;
      min-height:0;
    }

    .card.full-preview .stage{
      height:min(74svh, 760px);
      min-height:520px;
      border-radius:26px;
      box-shadow:0 26px 68px rgba(21,38,28,.22);
      overflow:hidden;
      position:relative;
      background:#101612;
    }

    .card.full-preview .stage::after{
      content:"";
      position:absolute;
      inset:auto 0 0 0;
      height:38%;
      background:linear-gradient(180deg, rgba(7,12,9,0) 0%, rgba(7,12,9,.10) 16%, rgba(7,12,9,.52) 58%, rgba(7,12,9,.82) 100%);
      pointer-events:none;
      z-index:2;
    }

    .overlay-bottom{
      position:absolute;
      left:0;
      right:0;
      bottom:0;
      z-index:4;
      padding:18px 18px 16px;
      display:flex;
      flex-direction:column;
      gap:0;
      color:#f4f7f3;
    }

    .overlay-head{
      display:flex;
      align-items:flex-end;
      justify-content:flex-end;
      gap:0;
    }

    .overlay-utility-stack{
      flex:0 0 auto;
      display:flex;
      flex-direction:column;
      align-items:stretch;
      gap:7px;
      width:132px;
    }

    .card.full-preview .reset-compact{
      width:100%;
      min-height:36px;
      padding:0 10px;
      border-radius:9px;
      font-size:10.5px;
      font-weight:700;
      background:rgba(8,15,11,.52) !important;
      border-color:rgba(255,255,255,.20);
      color:rgba(255,255,255,.94);
      backdrop-filter:blur(10px);
      -webkit-backdrop-filter:blur(10px);
    }

    .card.full-preview .reset-compact[hidden]{
      display:none;
    }

    .overlay-brand{
      min-width:0;
      display:flex;
      flex-direction:column;
      gap:4px;
    }

    .overlay-kicker{
      color:rgba(225,236,229,.86);
      font-size:10px;
      font-weight:800;
      letter-spacing:.18em;
      text-transform:uppercase;
    }

    .overlay-event{
      color:#ffffff;
      font-family:"Iowan Old Style","Palatino Linotype","Book Antiqua",Palatino,Georgia,serif;
      font-size:20px;
      line-height:1.08;
      letter-spacing:-.02em;
      text-wrap:balance;
    }

    .overlay-body{
      display:grid;
      grid-template-columns:minmax(0,1fr) minmax(300px, 360px);
      gap:18px;
      align-items:end;
    }

    .overlay-copy{
      min-width:0;
      display:flex;
      flex-direction:column;
      gap:12px;
      justify-content:flex-end;
    }

    .overlay-actions{
      min-width:0;
      display:flex;
      flex-direction:column;
      gap:10px;
      justify-content:flex-end;
      align-items:stretch;
    }

    .card.full-preview .status{
      min-height:0;
      color:rgba(244,247,243,.94);
      text-align:left;
      justify-content:flex-start;
      font-size:13px;
      line-height:1.35;
      text-shadow:0 1px 10px rgba(0,0,0,.25);
    }

    .card.full-preview .status.error{color:#ffd8d8}
    .card.full-preview .status.ok{color:#d8f5e1}

    .card.full-preview .progress-wrap{
      background:transparent;
      padding:0;
      margin:0;
    }

    .card.full-preview .progress-label{
      color:rgba(231,238,233,.86);
      text-align:left;
      font-size:10.5px;
      margin-bottom:7px;
    }

    .card.full-preview .bar{
      background:rgba(255,255,255,.18);
      border-radius:999px;
      overflow:hidden;
      height:7px;
    }

    .card.full-preview .controls{
      display:grid;
      grid-template-columns:minmax(0,1fr) 58px;
      gap:10px;
      align-items:stretch;
    }

    .card.full-preview .flip-camera-btn{
      width:58px;
      min-width:58px;
      min-height:58px;
      padding:0;
      display:grid;
      place-items:center;
      border-radius:10px;
    }

    .card.full-preview .flip-camera-btn svg{
      width:24px;
      height:24px;
      display:block;
    }

    .card.full-preview button{
      border-radius:10px;
      min-height:52px;
      border:1px solid rgba(255,255,255,.2);
      background:rgba(255,255,255,.10);
      color:#fff;
      box-shadow:none;
      backdrop-filter:blur(10px);
      -webkit-backdrop-filter:blur(10px);
    }

    .card.full-preview #mainBtn{
      min-height:58px;
      font-size:15px;
    }

    .card.full-preview button.primary{
      background:rgba(53,95,73,.96);
      border-color:rgba(53,95,73,.96);
      color:#fff;
    }

    .card.full-preview button:not(.primary):not(.recording):not(.privacy-toggle){
      background:rgba(255,255,255,.08);
    }

    .card.full-preview button:disabled{
      opacity:.6;
    }

    .card.full-preview .secondary-row{
      display:grid;
      grid-template-columns:1fr 1fr;
      gap:10px;
    }

    .card.full-preview .secondary-row button{
      min-height:42px;
      font-size:11.5px;
    }

    .card.full-preview .consent{
      margin:0;
      padding:0;
      border:0;
      background:transparent !important;
      color:rgba(225,234,228,.72);
      font-size:11.6px;
      line-height:1.45;
      max-width:58ch;
    }

    .preview-meta{
      width:100%;
      min-height:30px;
      padding:8px 4px 0;
      display:flex;
      align-items:center;
      justify-content:flex-end;
      gap:8px;
      color:rgba(44,61,50,.66);
      font-size:10px;
      line-height:1.2;
      letter-spacing:.015em;
    }

    .preview-meta-dot{
      opacity:.42;
    }

    .card.full-preview .privacy-toggle{
      position:relative;
      left:auto;
      bottom:auto;
      width:100%;
      min-height:38px;
      padding:0 10px;
      border-radius:9px;
      font-size:11px;
      background:rgba(255,255,255,.12);
      border-color:rgba(255,255,255,.2);
      color:#fff;
      white-space:nowrap;
    }

    .card.full-preview .privacy-toggle.active{
      background:rgba(49,91,69,.94);
    }

    .card.full-preview .privacy-note{
      left:18px;
      bottom:188px;
      background:rgba(0,0,0,.62);
      border-radius:8px;
      box-shadow:none !important;
      color:#fff;
    }

    .card.full-preview .overlay-top{
      z-index:5;
      inset:16px 16px auto 16px;
      align-items:flex-start;
    }

    .overlay-top-left{
      display:flex;
      align-items:center;
      gap:8px;
      flex:0 0 auto;
    }

    .preview-brand{
      margin-left:auto;
      max-width:320px;
      text-align:right;
      color:#fff;
      text-shadow:0 2px 14px rgba(0,0,0,.48);
      pointer-events:none;
    }

    .preview-brand-kicker{
      color:rgba(238,244,240,.88);
      font-size:9.5px;
      font-weight:800;
      line-height:1.2;
      letter-spacing:.18em;
      text-transform:uppercase;
    }

    .preview-brand-event{
      margin-top:4px;
      color:#fff;
      font-family:"Iowan Old Style","Palatino Linotype","Book Antiqua",Palatino,Georgia,serif;
      font-size:17px;
      font-weight:500;
      line-height:1.12;
      letter-spacing:-.015em;
    }

    .card.full-preview .badge,
    .card.full-preview .timer,
    .card.full-preview .queue{
      background:rgba(0,0,0,.66) !important;
      border-radius:9px;
      backdrop-filter:blur(8px);
      -webkit-backdrop-filter:blur(8px);
    }

    @media (orientation:portrait), (max-width:900px){
      .card.full-preview .stage{
        height:min(80svh, 860px);
        min-height:640px;
      }

      .overlay-bottom{
        padding:16px 16px 14px;
        gap:12px;
      }

      .overlay-head{
        align-items:flex-start;
        flex-direction:column;
      }

      .overlay-utility-stack{
        width:132px;
        align-self:flex-start;
      }

      .overlay-event{
        font-size:18px;
      }

      .preview-brand{
        max-width:230px;
      }

      .preview-brand-kicker{
        font-size:8.5px;
      }

      .preview-brand-event{
        font-size:14px;
      }

      .overlay-body{
        grid-template-columns:1fr;
        gap:0;
      }

      .card.full-preview .controls{
        grid-template-columns:minmax(0,1fr) 54px;
      }

      .card.full-preview .flip-camera-btn{
        width:54px;
        min-width:54px;
      }

      .card.full-preview .secondary-row{
        grid-template-columns:1fr;
      }

      .preview-meta{
        justify-content:center;
        padding-top:9px;
        font-size:10px;
      }

      .card.full-preview .privacy-note{
        bottom:270px;
      }
    }

/* ===== Interaction polish ===== */
button,
.privacy-toggle,
#resetBtn,
#flipBtn,
#mainBtn {
  transition:
    background-color .22s ease,
    border-color .22s ease,
    color .22s ease,
    opacity .22s ease,
    transform .16s ease,
    box-shadow .22s ease;
}

button:active:not(:disabled),
.privacy-toggle:active:not(:disabled),
#resetBtn:active:not(:disabled),
#flipBtn:active:not(:disabled),
#mainBtn:active:not(:disabled) {
  transform: scale(.975);
}

/* Privacy toggle: smoother state change */
.privacy-toggle {
  position: relative;
  overflow: hidden;
  isolation: isolate;
}

.privacy-toggle::before {
  content: "";
  position: absolute;
  inset: 0;
  z-index: -1;
  opacity: 0;
  background: rgba(53,95,73,.95);
  transition: opacity .24s ease;
}

.privacy-toggle.active::before {
  opacity: 1;
}

.privacy-toggle.active {
  background: transparent !important;
  border-color: rgba(255,255,255,.30);
}

/* Camera preview reacts softly when privacy mode changes */
#live {
  will-change: filter, transform;
}

.stage.privacy #live {
  transition:
    filter .34s cubic-bezier(.22,.61,.36,1),
    transform .34s cubic-bezier(.22,.61,.36,1);
}

/* Utility controls appearing/disappearing feel less abrupt */
.utility-stack,
.secondary-row {
  transition: opacity .22s ease, transform .22s ease;
}

.secondary-row:not(.empty),
.utility-stack {
  animation: controlFadeIn .24s ease both;
}

@keyframes controlFadeIn {
  from {
    opacity: 0;
    transform: translateY(4px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

/* Progress display appears smoothly */
.progress-wrap.show {
  animation: controlFadeIn .24s ease both;
}

/* Respect accessibility preference */
@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    animation-duration: .001ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: .001ms !important;
    scroll-behavior: auto !important;
  }
}


/* ===== Kiosk zoom lock ===== */
html,
body,
button,
.stage,
.app {
  touch-action: manipulation;
}

html,
body {
  -webkit-text-size-adjust: 100%;
}

/* ===== Event reliability improvements: mic, queue warning, operator health check ===== */
#adminHotspot{
  user-select:none;
  -webkit-user-select:none;
  -webkit-touch-callout:none;
}

.mic-meter{
  position:absolute;
  z-index:7;
  left:18px;
  top:58px;
  width:132px;
  height:24px;
  display:flex;
  align-items:center;
  gap:8px;
  padding:0 9px;
  border:1px solid rgba(255,255,255,.20);
  border-radius:8px;
  background:rgba(12,18,14,.48);
  backdrop-filter:blur(8px);
  -webkit-backdrop-filter:blur(8px);
  color:rgba(255,255,255,.82);
  pointer-events:none;
}

.mic-meter[hidden]{display:none!important}

.mic-meter-label{
  flex:0 0 auto;
  font-size:8.5px;
  font-weight:700;
  letter-spacing:.11em;
}

.mic-meter-track{
  position:relative;
  flex:1;
  height:4px;
  overflow:hidden;
  border-radius:999px;
  background:rgba(255,255,255,.20);
}

.mic-meter-level{
  position:absolute;
  inset:0 auto 0 0;
  width:0;
  border-radius:inherit;
  background:rgba(255,255,255,.58);
  transition:width .08s linear, background-color .18s ease;
}

.mic-meter.good .mic-meter-level{background:rgba(191,236,205,.92)}

#queueText.warning{font-weight:700;color:#8a5a14}
#queueText.critical{font-weight:800;color:#8b2323}
#connectionText.offline{font-weight:700;color:#8b2323}

.queue-warning{
  margin:6px 0 0 auto;
  width:max-content;
  max-width:min(100%,620px);
  padding:8px 11px;
  border-radius:9px;
  font-size:10.5px;
  line-height:1.35;
  text-align:right;
}
.queue-warning[hidden]{display:none!important}
.queue-warning.warning{
  color:#745016;
  background:rgba(255,237,194,.88);
  border:1px solid rgba(139,98,29,.18);
}
.queue-warning.critical{
  color:#7b2020;
  background:rgba(255,221,221,.92);
  border:1px solid rgba(139,35,35,.18);
  font-weight:700;
}

.admin-open{overflow:hidden}
.admin-modal{
  position:fixed;
  z-index:1000;
  inset:0;
  display:grid;
  place-items:center;
  padding:24px;
  background:rgba(15,20,17,.54);
  backdrop-filter:blur(12px);
  -webkit-backdrop-filter:blur(12px);
}
.admin-modal[hidden]{display:none!important}
.admin-panel{
  width:min(92vw,520px);
  max-height:min(82vh,680px);
  overflow:auto;
  padding:22px;
  border-radius:18px;
  border:1px solid rgba(46,67,53,.14);
  background:#f6f5ef;
  box-shadow:0 24px 80px rgba(10,20,13,.24);
  color:#27372d;
}
.admin-panel-head{
  display:flex;
  justify-content:space-between;
  align-items:flex-start;
  gap:20px;
}
.admin-panel h2{
  margin:2px 0 0;
  font-size:25px;
  line-height:1.05;
}
.admin-kicker{
  font-size:9px;
  font-weight:800;
  letter-spacing:.16em;
  opacity:.58;
}
.admin-help{
  margin:10px 0 18px;
  font-size:11.5px;
  line-height:1.5;
  color:rgba(39,55,45,.68);
}
.admin-close{
  width:38px;
  height:38px;
  min-height:0!important;
  padding:0!important;
  border-radius:10px!important;
  font-size:23px!important;
  line-height:1!important;
  background:rgba(39,55,45,.06)!important;
  color:#27372d!important;
  border:1px solid rgba(39,55,45,.1)!important;
}
.health-list{
  display:grid;
  gap:8px;
  margin-bottom:16px;
}
.health-row{
  display:grid;
  grid-template-columns:10px minmax(120px,.9fr) minmax(0,1.4fr);
  align-items:center;
  gap:9px;
  min-height:38px;
  padding:8px 10px;
  border-radius:10px;
  background:rgba(39,55,45,.045);
  font-size:11.5px;
}
.health-dot{
  width:8px;
  height:8px;
  border-radius:50%;
  background:#a7aaa7;
}
.health-row.ok .health-dot{background:#3d8a5b}
.health-row.warn .health-dot{background:#b37a20}
.health-row.bad .health-dot{background:#a94343}
.health-row.checking .health-dot{animation:healthPulse .8s ease-in-out infinite alternate}
.health-label{font-weight:700}
.health-detail{
  overflow:hidden;
  text-overflow:ellipsis;
  white-space:nowrap;
  text-align:right;
  color:rgba(39,55,45,.67);
}
.admin-run{
  width:100%;
  min-height:46px;
  border-radius:11px;
  background:#365f49!important;
  border-color:#365f49!important;
  color:white!important;
  font-weight:700;
}
@keyframes healthPulse{to{opacity:.25}}

@media (max-width:760px){
  .mic-meter{left:12px;top:52px;width:118px}
  .queue-warning{width:100%;max-width:none;text-align:left}
  .admin-modal{padding:14px}
  .admin-panel{padding:18px}
  .health-row{grid-template-columns:10px 1fr;gap:7px}
  .health-detail{grid-column:2;text-align:left;white-space:normal;font-size:10.5px}
}


/* ===== Optional topic roulette ===== */
.card.full-preview .topic-toggle{
  position:relative;
  width:100%;
  min-height:38px;
  padding:0 10px;
  border-radius:9px;
  font-size:11px;
  background:rgba(255,255,255,.12);
  border-color:rgba(255,255,255,.2);
  color:#fff;
  white-space:nowrap;
}

.card.full-preview .topic-toggle.active{
  background:rgba(118,102,62,.9);
  border-color:rgba(255,246,205,.28);
}

.card.full-preview .topic-card{
  width:min(460px,100%);
  padding:10px 11px 10px 12px;
  display:flex;
  align-items:center;
  justify-content:space-between;
  gap:12px;
  border:1px solid rgba(255,255,255,.18);
  border-radius:10px;
  background:rgba(10,15,12,.46);
  color:#fff;
  backdrop-filter:blur(10px);
  -webkit-backdrop-filter:blur(10px);
  box-shadow:0 7px 22px rgba(0,0,0,.10);
}

.card.full-preview .topic-card[hidden]{display:none}

.topic-copy{
  min-width:0;
  display:flex;
  flex-direction:column;
  gap:2px;
}

.topic-kicker{
  font-size:9px;
  line-height:1.2;
  font-weight:800;
  letter-spacing:.15em;
  text-transform:uppercase;
  color:rgba(232,238,233,.72);
}

.topic-text{
  font-family:"Iowan Old Style","Palatino Linotype","Book Antiqua",Palatino,Georgia,serif;
  font-size:18px;
  line-height:1.12;
  font-weight:600;
  letter-spacing:-.015em;
  color:#fff;
}

.card.full-preview .topic-reroll{
  flex:0 0 auto;
  width:auto;
  min-height:34px;
  padding:0 10px;
  border-radius:8px;
  font-size:10px;
  font-weight:700;
  background:rgba(255,255,255,.10) !important;
  border-color:rgba(255,255,255,.17);
  color:rgba(255,255,255,.94);
}

@media (max-width:760px){
  .card.full-preview .topic-card{
    padding:9px 10px;
    gap:9px;
  }
  .topic-text{font-size:16px}
}

/* ===== Control hierarchy cleanup ===== */
.card.full-preview .overlay-head{
  min-height:0;
  align-items:flex-end;
  justify-content:flex-end;
}

.card.full-preview .overlay-head:has(.reset-compact[hidden]){
  display:none;
}

.card.full-preview .reset-compact{
  width:auto;
  min-width:132px;
  align-self:flex-end;
}

.card.full-preview .utility-row{
  display:grid;
  grid-template-columns:minmax(0,1fr) minmax(0,1fr);
  gap:8px;
  width:100%;
}

.card.full-preview .utility-row .topic-toggle,
.card.full-preview .utility-row .privacy-toggle{
  width:100%;
  min-width:0;
  min-height:38px;
  padding:0 9px;
  border-radius:9px;
  font-size:10.5px;
  font-weight:700;
  line-height:1;
  white-space:nowrap;
  overflow:hidden;
  text-overflow:ellipsis;
}

.card.full-preview .topic-toggle{
  background:rgba(255,255,255,.10);
  border-color:rgba(255,255,255,.18);
}

.card.full-preview .topic-toggle.active{
  background:rgba(105,91,56,.92);
  border-color:rgba(255,246,205,.26);
}

.card.full-preview .privacy-toggle{
  position:relative;
  left:auto;
  bottom:auto;
}

.card.full-preview .overlay-copy{
  gap:10px;
}

.card.full-preview .topic-card{
  width:min(520px,100%);
  margin:0 0 2px;
}

.card.full-preview .overlay-actions{
  gap:9px;
}

@media (orientation:portrait), (max-width:900px){
  .card.full-preview .overlay-head{
    align-items:flex-end;
  }

  .card.full-preview .reset-compact{
    align-self:flex-end;
  }

  .card.full-preview .utility-row{
    grid-template-columns:1fr 1fr;
  }
}


/* ===== Topic roulette shuffle motion ===== */
.card.full-preview .topic-card.shuffling{
  border-color:rgba(255,246,205,.32);
}

.card.full-preview .topic-card.shuffling .topic-text{
  animation:topicShuffleTick .16s ease-in-out infinite;
}

.card.full-preview .topic-card.shuffling .topic-reroll{
  opacity:.68;
  cursor:wait;
}

@keyframes topicShuffleTick{
  0%{
    opacity:.55;
    transform:translateY(4px);
    filter:blur(1.5px);
  }
  50%{
    opacity:1;
    transform:translateY(0);
    filter:blur(0);
  }
  100%{
    opacity:.62;
    transform:translateY(-3px);
    filter:blur(1px);
  }
}

@media (prefers-reduced-motion:reduce){
  .card.full-preview .topic-card.shuffling .topic-text{
    animation:none;
    filter:none;
    transform:none;
  }
}
/* ======================================================================
   Adaptive device layer
   Primary targets:
   - iPad 9th gen (especially 1024×768 landscape CSS viewport)
   - Xiaomi Pad 6S Pro / large Android tablets
   Also supports phones, portrait/landscape, desktop and odd aspect ratios.
   This block intentionally sits last so it can safely override legacy rules.
   ====================================================================== */

:root{
      --font-sans:"Plus Jakarta Sans",sans-serif;
  --adaptive-edge: clamp(10px, 1.35vw, 18px);
  --adaptive-radius: clamp(16px, 2.1vw, 26px);
}

/* Avoid accidental horizontal clipping on narrow or unusual viewports. */
html{
  max-width:100%;
  overflow-x:hidden;
}

body{
  max-width:100%;
}

.app{
  width:min(1280px, 100%);
  max-width:100%;
}

.card.full-preview{
  width:100%;
  max-width:100%;
}

.card.full-preview .stage{
  width:100%;
  max-width:100%;
}

/* ---------------------------
   Tablet / desktop landscape
   iPad 9th + Xiaomi prioritized
   --------------------------- */
@media (orientation:landscape) and (min-width:768px) and (min-height:560px){
  html,
  body{
    overflow:hidden;
  }

  body{
    padding:
      max(10px, env(safe-area-inset-top))
      max(12px, env(safe-area-inset-right))
      max(10px, env(safe-area-inset-bottom))
      max(12px, env(safe-area-inset-left));
  }

  .app{
    height:100%;
    min-height:0;
  }

  header.hero-header{
    flex:0 0 auto;
    margin:0 0 clamp(8px, 1.3vh, 14px);
    grid-template-columns:minmax(0, 1fr) auto;
  }

  .hero-main{
    padding:
      clamp(2px, .5vh, 6px)
      clamp(18px, 2.2vw, 30px)
      clamp(3px, .65vh, 7px)
      clamp(14px, 1.9vw, 24px);
  }

  h1{
    font-size:clamp(48px, 5.8vw, 82px);
  }

  .hero-main p{
    margin-top:clamp(5px, .9vh, 10px);
    font-size:clamp(12.5px, 1.35vw, 14.5px);
  }

  .hero-note{
    padding:
      0
      clamp(14px, 1.9vw, 24px)
      clamp(5px, 1vh, 10px)
      clamp(16px, 2vw, 26px);
  }

  .hero-note p{
    font-size:clamp(9.5px, 1.1vw, 12px);
  }

  .card.full-preview{
    flex:1 1 auto;
    min-height:0;
    display:flex;
    flex-direction:column;
  }

  .card.full-preview .stage{
    flex:1 1 auto;
    height:auto;
    min-height:0;
    max-height:none;
    border-radius:var(--adaptive-radius);
  }

  .preview-meta{
    flex:0 0 auto;
  }

  .overlay-bottom{
    padding:
      clamp(13px, 1.9vh, 18px)
      clamp(14px, 1.8vw, 20px)
      clamp(12px, 1.6vh, 16px);
    gap:clamp(8px, 1.2vh, 14px);
  }

  .overlay-body{
    grid-template-columns:minmax(0, 1fr) minmax(280px, 32%);
    gap:clamp(12px, 1.6vw, 20px);
  }

  .card.full-preview .controls{
    grid-template-columns:minmax(0,1fr) clamp(52px, 5.2vw, 60px);
  }

  .card.full-preview .flip-camera-btn{
    width:clamp(52px, 5.2vw, 60px);
    min-width:clamp(52px, 5.2vw, 60px);
  }

  .card.full-preview #mainBtn{
    min-height:clamp(54px, 7vh, 62px);
  }

  .card.full-preview .topic-card{
    width:min(540px, 100%);
  }
}

/* Large tablets / roomy displays: let the camera breathe without
   allowing the overlay to become comically wide. */
@media (orientation:landscape) and (min-width:1180px) and (min-height:700px){
  .app{
    width:min(1360px, 100%);
  }

  .overlay-body{
    grid-template-columns:minmax(0,1fr) minmax(320px, 370px);
  }

  .card.full-preview .consent{
    max-width:64ch;
  }

  .preview-brand{
    max-width:360px;
  }
}

/* ---------------------------
   Tablet portrait
   Keep the two-column action hierarchy on iPad / Xiaomi portrait
   instead of stacking everything into a very tall overlay.
   --------------------------- */
@media (orientation:portrait) and (min-width:700px){
  html,
  body{
    overflow-x:hidden;
    overflow-y:auto;
    height:auto;
    min-height:100%;
  }

  body{
    min-height:100dvh;
  }

  .app{
    height:auto;
    min-height:calc(100dvh - 24px);
  }

  header.hero-header{
    margin:clamp(4px, 1vh, 10px) 0 clamp(10px, 1.5vh, 16px);
  }

  .hero-main{
    padding-left:clamp(6px, 1.5vw, 16px);
    padding-right:clamp(6px, 1.5vw, 16px);
  }

  h1{
    font-size:clamp(58px, 9.5vw, 82px);
  }

  .hero-main p{
    max-width:720px;
    font-size:clamp(13px, 1.8vw, 15px);
  }

  .card.full-preview .stage{
    height:clamp(660px, 74dvh, 980px);
    min-height:660px;
    border-radius:var(--adaptive-radius);
  }

  .overlay-bottom{
    padding:clamp(14px, 2vw, 20px);
  }

  .overlay-body{
    grid-template-columns:minmax(0,1fr) minmax(270px, 38%);
    gap:0;
    align-items:end;
  }

  .card.full-preview .controls{
    grid-template-columns:minmax(0,1fr) 54px;
  }

  .card.full-preview .privacy-note{
    bottom:190px;
  }

  .preview-meta{
    justify-content:flex-end;
  }
}

/* ---------------------------
   Phone portrait
   Scroll is allowed intentionally so nothing gets clipped on short phones.
   Camera stays dominant while controls remain reachable.
   --------------------------- */
@media (orientation:portrait) and (max-width:699px){
  html,
  body{
    width:100%;
    max-width:100%;
    height:auto;
    min-height:100%;
    overflow-x:hidden;
    overflow-y:auto;
  }

  body{
    min-height:100dvh;
    padding:
      max(8px, env(safe-area-inset-top))
      max(8px, env(safe-area-inset-right))
      max(10px, env(safe-area-inset-bottom))
      max(8px, env(safe-area-inset-left));
  }

  @media (display-mode: standalone), (display-mode: fullscreen){
    body{
      padding-top:max(18px, calc(env(safe-area-inset-top) + 8px));
    }
  }

  .app{
    width:100%;
    height:auto;
    min-height:calc(100dvh - 18px);
  }

  header.hero-header{
    margin:2px 0 10px;
  }

  .hero-main{
    padding:0 4px;
  }

  h1{
    font-size:clamp(42px, 13.5vw, 62px);
    line-height:.96;
  }

  .hero-main p{
    margin-top:5px;
    max-width:94%;
    font-size:clamp(11.5px, 3.35vw, 13.5px);
    line-height:1.34;
  }

  .hero-note{
    display:none;
  }

  .card.full-preview{
    flex:0 0 auto;
  }

  .card.full-preview .stage{
    height:clamp(520px, 72dvh, 700px);
    min-height:520px;
    border-radius:clamp(16px, 5vw, 22px);
  }

  .card.full-preview .stage::after{
    height:50%;
    background:linear-gradient(
      180deg,
      rgba(7,12,9,0) 0%,
      rgba(7,12,9,.13) 18%,
      rgba(7,12,9,.62) 55%,
      rgba(7,12,9,.88) 100%
    );
  }

  .card.full-preview .overlay-top{
    inset:10px 10px auto 10px;
  }

  .card.full-preview .badge,
  .card.full-preview .timer{
    padding:6px 8px;
    font-size:10.5px;
  }

  .preview-brand{
    max-width:45%;
  }

  .preview-brand-kicker{
    display:none;
  }

  .preview-brand-event{
    margin-top:0;
    font-size:clamp(10px, 3vw, 13px);
    line-height:1.08;
  }

  .mic-meter{
    left:10px;
    top:46px;
    width:min(116px, 38vw);
    height:22px;
    padding:0 7px;
  }

  .countdown{
    font-size:clamp(74px, 28vw, 120px);
  }

  .overlay-bottom{
    padding:11px 11px 10px;
    gap:8px;
  }

  .card.full-preview .overlay-head{
    min-height:0;
  }

  .card.full-preview .reset-compact{
    min-width:112px;
    min-height:32px;
    font-size:9.5px;
  }

  .overlay-body{
    grid-template-columns:1fr;
    gap:8px;
  }

  .card.full-preview .overlay-copy{
    gap:7px;
  }

  .card.full-preview .status{
    font-size:11.5px;
    line-height:1.28;
  }

  .card.full-preview .consent{
    max-width:none;
    font-size:9.6px;
    line-height:1.32;
  }

  .card.full-preview .topic-card{
    width:100%;
    padding:8px 9px;
    gap:8px;
  }

  .topic-kicker{
    font-size:8px;
  }

  .topic-text{
    font-size:clamp(14px, 4.1vw, 16.5px);
    line-height:1.12;
  }

  .card.full-preview .topic-reroll{
    min-height:31px;
    padding:0 8px;
    font-size:9px;
  }

  .card.full-preview .overlay-actions{
    gap:7px;
  }

  .card.full-preview .utility-row{
    gap:6px;
  }

  .card.full-preview .utility-row .topic-toggle,
  .card.full-preview .utility-row .privacy-toggle{
    min-height:34px;
    padding:0 7px;
    font-size:9.5px;
  }

  .card.full-preview .controls{
    grid-template-columns:minmax(0,1fr) 48px;
    gap:7px;
  }

  .card.full-preview #mainBtn{
    min-height:50px;
    font-size:13px;
  }

  .card.full-preview .flip-camera-btn{
    width:48px;
    min-width:48px;
    min-height:50px;
  }

  .card.full-preview .flip-camera-btn svg{
    width:21px;
    height:21px;
  }

  .card.full-preview .secondary-row{
    gap:6px;
  }

  .card.full-preview .secondary-row button{
    min-height:36px;
    font-size:10px;
  }

  .card.full-preview .privacy-note{
    left:11px;
    bottom:208px;
    max-width:70%;
    font-size:8.7px;
  }

  .preview-meta{
    min-height:26px;
    padding:7px 2px 0;
    justify-content:center;
    gap:6px;
    font-size:9px;
    flex-wrap:wrap;
  }

  .queue-warning{
    margin-top:5px;
    font-size:9.5px;
  }
}

/* Very narrow phones: preserve tap targets but prevent utility labels
   from colliding. */
@media (orientation:portrait) and (max-width:360px){
  .card.full-preview .utility-row .topic-toggle,
  .card.full-preview .utility-row .privacy-toggle{
    font-size:8.8px;
    letter-spacing:-.01em;
  }

  .topic-text{
    font-size:14px;
  }

  .card.full-preview .topic-reroll{
    padding:0 6px;
  }
}

/* ---------------------------
   Phone landscape / very short screens
   Use a compact exhibition layout instead of the tall portrait stack.
   --------------------------- */
@media (orientation:landscape) and (max-height:559px){
  html,
  body{
    width:100%;
    max-width:100%;
    height:auto;
    min-height:100%;
    overflow-x:hidden;
    overflow-y:auto;
  }

  body{
    min-height:100dvh;
    padding:
      max(6px, env(safe-area-inset-top))
      max(8px, env(safe-area-inset-right))
      max(6px, env(safe-area-inset-bottom))
      max(8px, env(safe-area-inset-left));
  }

  @media (display-mode: standalone), (display-mode: fullscreen){
    body{
      padding-top:max(8px, env(safe-area-inset-top));
    }
  }

  .app{
    height:auto;
    min-height:100dvh;
  }

  header.hero-header{
    display:flex;
    align-items:flex-end;
    justify-content:space-between;
    gap:0;
    margin:0 3px 6px;
  }

  .hero-main{
    padding:0;
  }

  h1{
    font-size:clamp(32px, 6.5vw, 44px);
    line-height:.94;
  }

  .hero-main p{
    display:none;
  }

  .hero-note{
    display:block;
    padding:0 2px 3px 0;
  }

  .hero-note p{
    font-size:8px;
    letter-spacing:.11em;
  }

  .card.full-preview .stage{
    height:clamp(300px, calc(100dvh - 58px), 430px);
    min-height:300px;
    border-radius:16px;
  }

  .card.full-preview .stage::after{
    height:58%;
  }

  .card.full-preview .overlay-top{
    inset:8px 9px auto 9px;
  }

  .card.full-preview .badge,
  .card.full-preview .timer{
    padding:5px 7px;
    font-size:9.5px;
  }

  .preview-brand{
    max-width:34%;
  }

  .preview-brand-kicker{
    display:none;
  }

  .preview-brand-event{
    margin:0;
    font-size:10px;
  }

  .mic-meter{
    top:39px;
    left:9px;
    width:104px;
    height:20px;
  }

  .overlay-bottom{
    padding:8px 9px 8px;
    gap:5px;
  }

  .card.full-preview .overlay-head{
    min-height:0;
  }

  .card.full-preview .reset-compact{
    min-width:104px;
    min-height:28px;
    font-size:8.5px;
  }

  .overlay-body{
    grid-template-columns:minmax(0,1fr) minmax(225px, 35%);
    gap:10px;
    align-items:end;
  }

  .card.full-preview .overlay-copy{
    gap:5px;
  }

  .card.full-preview .status{
    font-size:10px;
    line-height:1.2;
  }

  .card.full-preview .consent{
    font-size:8.2px;
    line-height:1.22;
    max-width:72ch;
  }

  .card.full-preview .topic-card{
    width:min(450px,100%);
    padding:6px 8px;
  }

  .topic-kicker{
    display:none;
  }

  .topic-text{
    font-size:13px;
    line-height:1.08;
  }

  .card.full-preview .topic-reroll{
    min-height:28px;
    font-size:8.5px;
    padding:0 7px;
  }

  .card.full-preview .overlay-actions{
    gap:5px;
  }

  .card.full-preview .utility-row{
    gap:5px;
  }

  .card.full-preview .utility-row .topic-toggle,
  .card.full-preview .utility-row .privacy-toggle{
    min-height:29px;
    font-size:8.5px;
    padding:0 5px;
  }

  .card.full-preview .controls{
    grid-template-columns:minmax(0,1fr) 42px;
    gap:5px;
  }

  .card.full-preview #mainBtn{
    min-height:42px;
    font-size:11px;
  }

  .card.full-preview .flip-camera-btn{
    width:42px;
    min-width:42px;
    min-height:42px;
  }

  .card.full-preview .flip-camera-btn svg{
    width:19px;
    height:19px;
  }

  .card.full-preview .secondary-row button{
    min-height:30px;
    font-size:9px;
  }

  .card.full-preview .privacy-note{
    top:64px;
    bottom:auto;
    left:9px;
    max-width:54%;
    font-size:8px;
  }

  .preview-meta{
    min-height:20px;
    padding:5px 2px 0;
    font-size:8.5px;
  }

  .queue-warning{
    font-size:9px;
    padding:6px 8px;
  }

  .countdown{
    font-size:clamp(64px, 18vw, 110px);
  }
}

/* Tiny landscape screens (older / compact phones). */
@media (orientation:landscape) and (max-height:390px){
  .card.full-preview .stage{
    height:315px;
    min-height:315px;
  }

  .overlay-bottom{
    padding-bottom:6px;
  }

  .card.full-preview .consent{
    font-size:7.8px;
  }

  .preview-meta{
    display:none;
  }
}

/* Desktop / ultrawide: keep kiosk proportions readable instead of stretching. */
@media (min-width:1400px){
  .app{
    width:min(1320px, calc(100vw - 48px));
  }
}

/* Make modal usable on any device and orientation. */
@media (max-width:520px){
  .admin-modal{
    align-items:end;
    padding:
      max(10px, env(safe-area-inset-top))
      10px
      max(10px, env(safe-area-inset-bottom));
  }

  .admin-panel{
    width:100%;
    max-height:86dvh;
    border-radius:16px;
    padding:16px;
  }

  .admin-panel h2{
    font-size:21px;
  }
}

/* ===== Optional telephone voice effect =====
   Three equal utility controls on tablets; narrow phones keep the original
   Topic + Privacy pair together and move Telephone to its own full row. */
.card.full-preview .utility-row{
  grid-template-columns:repeat(3,minmax(0,1fr));
}

.card.full-preview .utility-row .phone-toggle{
  width:100%;
  min-width:0;
  min-height:38px;
  padding:0 9px;
  border-radius:9px;
  font-size:10.5px;
  font-weight:700;
  line-height:1;
  white-space:nowrap;
  overflow:hidden;
  text-overflow:ellipsis;
  position:relative;
  background:rgba(255,255,255,.10);
  border-color:rgba(255,255,255,.18);
  color:#fff;
}

.card.full-preview .phone-toggle.active{
  background:rgba(67,150,96,.94);
  border-color:rgba(201,255,218,.52);
  color:#fff;
  box-shadow:0 0 0 1px rgba(116,224,151,.10) inset;
}

.card.full-preview .phone-toggle:disabled{
  opacity:.62;
}

@media (orientation:portrait) and (max-width:520px){
  .card.full-preview .utility-row{
    grid-template-columns:minmax(0,1fr) minmax(0,1fr);
  }

  .card.full-preview .utility-row .phone-toggle{
    grid-column:1 / -1;
    min-height:34px;
    font-size:9.5px;
  }
}

@media (orientation:landscape) and (max-height:559px){
  .card.full-preview .utility-row .phone-toggle{
    min-height:29px;
    font-size:8.5px;
    padding:0 5px;
  }
}

/* ===== Telephone effect level picker ===== */
.card.full-preview .phone-sound-menu{
  width:100%;
  display:grid;
  grid-template-columns:repeat(4,minmax(0,1fr));
  gap:6px;
  margin-top:7px;
  padding:6px;
  border:1px solid rgba(255,255,255,.16);
  border-radius:12px;
  background:rgba(24,21,18,.54);
  -webkit-backdrop-filter:blur(14px);
  backdrop-filter:blur(14px);
  box-shadow:0 10px 28px rgba(0,0,0,.12);
}

.card.full-preview .phone-sound-menu[hidden]{
  display:none !important;
}

.card.full-preview .phone-level-option{
  appearance:none;
  -webkit-appearance:none;
  min-width:0;
  min-height:34px;
  padding:0 8px;
  border:1px solid rgba(255,255,255,.15);
  border-radius:8px;
  background:rgba(255,255,255,.08);
  color:#fff;
  font:inherit;
  font-size:10px;
  font-weight:700;
  line-height:1;
  letter-spacing:.015em;
  cursor:pointer;
  touch-action:manipulation;
}

.card.full-preview .phone-level-option.active{
  background:rgba(67,150,96,.96);
  border-color:rgba(201,255,218,.58);
  color:#fff;
  box-shadow:0 0 0 1px rgba(116,224,151,.10) inset;
}

/* Nonaktif tetap netral agar hijau selalu berarti efek telepon sedang aktif. */
.card.full-preview .phone-level-option.active[data-phone-level="off"]{
  background:rgba(255,255,255,.16);
  border-color:rgba(255,255,255,.30);
  color:#fff;
  box-shadow:none;
}

.card.full-preview .phone-level-option:disabled{
  opacity:.58;
}

@media (orientation:portrait) and (max-width:520px){
  .card.full-preview .phone-sound-menu{
    gap:5px;
    margin-top:6px;
    padding:5px;
  }

  .card.full-preview .phone-level-option{
    min-height:32px;
    padding:0 4px;
    font-size:9px;
  }
}

@media (orientation:landscape) and (max-height:559px){
  .card.full-preview .phone-sound-menu{
    gap:4px;
    margin-top:4px;
    padding:4px;
    border-radius:9px;
  }

  .card.full-preview .phone-level-option{
    min-height:27px;
    padding:0 4px;
    border-radius:7px;
    font-size:8px;
  }
}

/* Dice-only topic reroll control */
.card.full-preview .topic-reroll{
  width:36px;
  min-width:36px;
  min-height:34px;
  padding:0;
  display:inline-flex;
  align-items:center;
  justify-content:center;
}

.card.full-preview .topic-reroll-icon{
  width:20px;
  height:20px;
  overflow:visible;
  filter:drop-shadow(0 2.5px 2.5px rgba(0,0,0,.34));
  transform-origin:50% 52%;
  transition:transform .18s ease, filter .18s ease;
}

.card.full-preview .topic-reroll-icon .dice-face{
  stroke:rgba(255,255,255,.58);
  stroke-width:.9;
  stroke-linejoin:round;
}
.card.full-preview .topic-reroll-icon .dice-top{fill:#edf2eb}
.card.full-preview .topic-reroll-icon .dice-left{fill:#9caf9f}
.card.full-preview .topic-reroll-icon .dice-right{fill:#5f7767}
.card.full-preview .topic-reroll-icon .dice-pip{
  fill:#101712;
  stroke:none;
}

.card.full-preview .topic-reroll:not(:disabled):hover .topic-reroll-icon{
  transform:translateY(-1px) rotate(-2deg) scale(1.06);
  filter:drop-shadow(0 4px 3px rgba(0,0,0,.38));
}
.card.full-preview .topic-reroll:not(:disabled):active .topic-reroll-icon{
  transform:translateY(0) rotate(1deg) scale(.98);
}

.card.full-preview .topic-card.shuffling .topic-reroll-icon{
  animation:topicDiceRoll .55s cubic-bezier(.2,.75,.25,1) infinite;
}

@keyframes topicDiceRoll{
  0%{transform:translateY(0) rotate(0deg) scale(1)}
  35%{transform:translateY(-2px) rotate(115deg) scale(.92)}
  70%{transform:translateY(1px) rotate(235deg) scale(1.04)}
  100%{transform:translateY(0) rotate(360deg) scale(1)}
}

@media (orientation:portrait) and (max-width:520px){
  .card.full-preview .topic-reroll{
    width:32px;
    min-width:32px;
    min-height:31px;
    padding:0;
  }
  .card.full-preview .topic-reroll-icon{
    width:15px;
    height:15px;
  }
}

@media (orientation:landscape) and (max-height:559px){
  .card.full-preview .topic-reroll{
    width:29px;
    min-width:29px;
    min-height:28px;
    padding:0;
  }
  .card.full-preview .topic-reroll-icon{
    width:14px;
    height:14px;
  }
}

/* Live connection quality */
#connectionText.quality-good{font-weight:700;color:#25643b}
#connectionText.quality-fair{font-weight:700;color:#8a6514}
#connectionText.quality-poor{font-weight:700;color:#9a3d28}


/* ===== First-timer UX pass ===== */
.card.full-preview .flow-hint{
  width:100%;
  min-height:18px;
  display:flex;
  align-items:center;
  justify-content:flex-start;
  margin:0 0 7px;
  color:rgba(255,255,255,.78);
  font-size:10.5px;
  font-weight:600;
  line-height:1.35;
  letter-spacing:.005em;
  text-wrap:balance;
  transition:color .2s ease, opacity .2s ease;
}
.card.full-preview .flow-hint.ready{color:#e6f6ea}
.card.full-preview .flow-hint.recording{color:#fff0e6}
.card.full-preview .flow-hint.busy{color:#e8edf7}
.card.full-preview .flow-hint.success{color:#dbf6e3}

.card.full-preview .topic-text{margin-top:3px}

/* Longer, clearer first-timer labels need a little more breathing room. */
.card.full-preview .utility-row .topic-toggle,
.card.full-preview .utility-row .privacy-toggle,
.card.full-preview .utility-row .phone-toggle{
  min-height:40px;
  padding-inline:7px;
  white-space:normal;
  overflow:visible;
  text-overflow:clip;
  line-height:1.15;
  text-align:center;
}
.card.full-preview .utility-row .phone-toggle{font-size:9.5px}

.card.full-preview .timer.idle{
  font-size:clamp(11px,1.25vw,14px);
  letter-spacing:.01em;
  white-space:nowrap;
}

/* Strong but calm confirmation: visible enough that a first-timer knows the flow is finished. */
.success-state{
  position:fixed;
  inset:0;
  z-index:1200;
  display:flex;
  align-items:center;
  justify-content:center;
  padding:24px;
  background:rgba(21,24,20,.24);
  -webkit-backdrop-filter:blur(3px);
  backdrop-filter:blur(3px);
}
.success-state[hidden]{display:none!important}
.success-state-card{
  width:min(360px,calc(100vw - 40px));
  display:flex;
  flex-direction:column;
  align-items:center;
  gap:7px;
  padding:25px 24px 23px;
  border:1px solid rgba(255,255,255,.38);
  border-radius:18px;
  background:rgba(239,247,238,.94);
  color:#213129;
  box-shadow:0 18px 52px rgba(0,0,0,.18);
  text-align:center;
  font-family:"Plus Jakarta Sans",sans-serif;
  animation:successEnter .24s ease-out both;
}
.success-check{
  width:42px;
  height:42px;
  display:grid;
  place-items:center;
  margin-bottom:2px;
  border-radius:50%;
  background:#3f8c59;
  color:#fff;
  font-size:24px;
  font-weight:800;
  line-height:1;
}
.success-state-card strong{font-size:18px;line-height:1.2}
.success-state-card span{font-size:12px;line-height:1.45;color:rgba(33,49,41,.72)}
@keyframes successEnter{from{opacity:0;transform:translateY(8px) scale(.98)}to{opacity:1;transform:none}}

/* Keep participant metadata plain-language; technical names stay in operator Health Check. */
.preview-meta #queueText{white-space:nowrap}

@media (orientation:portrait) and (max-width:520px){
  .card.full-preview .flow-hint{
    margin-bottom:6px;
    font-size:9.5px;
  }
  .card.full-preview .utility-row .topic-toggle,
  .card.full-preview .utility-row .privacy-toggle,
  .card.full-preview .utility-row .phone-toggle{
    min-height:36px;
    padding-inline:6px;
    font-size:9px;
  }

  .success-state-card{padding:22px 20px 21px}
}

@media (orientation:landscape) and (max-height:559px){
  .card.full-preview .flow-hint{
    min-height:14px;
    margin-bottom:4px;
    font-size:8px;
    line-height:1.2;
  }

  .card.full-preview .utility-row .topic-toggle,
  .card.full-preview .utility-row .privacy-toggle,
  .card.full-preview .utility-row .phone-toggle{
    min-height:29px;
    padding-inline:4px;
    font-size:8px;
  }
  .success-state-card{
    width:min(320px,calc(100vw - 36px));
    padding:16px 18px;
    gap:5px;
  }
  .success-check{width:34px;height:34px;font-size:20px}
  .success-state-card strong{font-size:15px}
  .success-state-card span{font-size:10px}
}

@media (prefers-reduced-motion:reduce){
  .success-state-card{animation:none}
}
/* ===== Operator-only telephone effect =====
   Participant controls stay limited to Topic + face blur. Telephone character
   lives in the hidden operator panel opened from the title hold gesture. */
.card.full-preview .utility-row{
  grid-template-columns:repeat(2,minmax(0,1fr));
}
.card.full-preview .utility-row .topic-toggle,
.card.full-preview .utility-row .privacy-toggle{
  min-height:40px;
  padding:6px 10px;
  font-size:10.5px;
}

.admin-section{
  padding:14px;
  border:1px solid rgba(39,55,45,.10);
  border-radius:14px;
  background:rgba(39,55,45,.035);
}
.admin-section + .admin-section{margin-top:12px}
.admin-section h3{
  margin:0;
  color:#27372d;
  font-size:13px;
  font-weight:800;
  line-height:1.25;
}
.admin-section p{
  margin:4px 0 0;
  color:rgba(39,55,45,.62);
  font-size:10.5px;
  line-height:1.45;
}
.admin-section-head{
  display:grid;
  grid-template-columns:minmax(0,1fr) auto;
  align-items:center;
  gap:14px;
}
.admin-phone-toggle{
  min-width:148px;
  min-height:38px;
  padding:0 11px;
  border:1px solid rgba(39,55,45,.14)!important;
  border-radius:10px!important;
  background:rgba(255,255,255,.66)!important;
  color:#27372d!important;
  font-family:"Plus Jakarta Sans",sans-serif!important;
  font-size:10px!important;
  font-weight:800!important;
  line-height:1.15!important;
  white-space:nowrap;
}
.admin-phone-toggle.active{
  background:#3f8c59!important;
  border-color:#3f8c59!important;
  color:#fff!important;
}
.admin-phone-toggle:disabled{opacity:.52}
.admin-phone-menu{
  display:grid;
  grid-template-columns:repeat(4,minmax(0,1fr));
  gap:6px;
  margin-top:11px;
  padding-top:11px;
  border-top:1px solid rgba(39,55,45,.10);
}
.admin-phone-menu[hidden]{display:none!important}
.admin-phone-menu .phone-level-option{
  min-width:0;
  min-height:36px;
  padding:0 7px;
  border:1px solid rgba(39,55,45,.12);
  border-radius:9px;
  background:rgba(255,255,255,.70);
  color:#27372d;
  font-family:"Plus Jakarta Sans",sans-serif;
  font-size:10px;
  font-weight:800;
  line-height:1;
  touch-action:manipulation;
}
.admin-phone-menu .phone-level-option.active{
  background:#3f8c59;
  border-color:#3f8c59;
  color:#fff;
}
/* Nonaktif is selected but intentionally stays neutral: green means an effect is on. */
.admin-phone-menu .phone-level-option.active[data-phone-level="off"]{
  background:rgba(39,55,45,.10);
  border-color:rgba(39,55,45,.20);
  color:#27372d;
}
.admin-section-title-row{margin-bottom:11px}
.admin-health-section .health-list{margin-bottom:12px}

@media (orientation:portrait) and (max-width:520px){
  .card.full-preview .utility-row{
    grid-template-columns:repeat(2,minmax(0,1fr));
  }
  .card.full-preview .utility-row .topic-toggle,
  .card.full-preview .utility-row .privacy-toggle{
    min-height:37px;
    padding-inline:7px;
    font-size:9.5px;
  }
  .admin-section-head{
    grid-template-columns:1fr;
    gap:10px;
  }
  .admin-phone-toggle{width:100%;min-width:0}
}

@media (orientation:landscape) and (max-height:559px){
  .card.full-preview .utility-row{
    grid-template-columns:repeat(2,minmax(0,1fr));
  }
  .card.full-preview .utility-row .topic-toggle,
  .card.full-preview .utility-row .privacy-toggle{
    min-height:29px;
    padding:3px 6px;
    font-size:8.5px;
  }
  .admin-section{padding:11px}
  .admin-section + .admin-section{margin-top:9px}
  .admin-phone-menu .phone-level-option{min-height:30px;font-size:9px}
}


/* ======================================================================
   Layout polish v13 — iPad-first participant flow
   Keeps the camera dominant while grouping every action into one calm dock.
   ====================================================================== */
.action-head{
  width:100%;
  display:grid;
  grid-template-columns:minmax(0,1fr) auto;
  align-items:center;
  gap:10px;
  min-height:34px;
}
.card.full-preview .flow-hint{
  min-width:0;
  min-height:0;
  margin:0;
  padding:0;
  border:0;
  display:flex;
  align-items:center;
  color:rgba(255,255,255,.82);
  font-size:10.5px;
  font-weight:650;
  line-height:1.35;
  letter-spacing:0;
  text-wrap:pretty;
}
.card.full-preview .flow-hint[hidden]{display:none!important}
.card.full-preview .flow-hint.ready{color:#e6f5ea}
.card.full-preview .flow-hint.busy{color:#e7edf4}
.card.full-preview .action-head:has(.flow-hint[hidden]){
  display:flex;
  justify-content:flex-end;
  align-items:center;
}
.card.full-preview .reset-compact{
  width:auto;
  min-width:118px;
  min-height:34px;
  padding:0 12px;
  align-self:center;
  border-radius:9px;
  font-size:9.5px;
  white-space:nowrap;
}
.card.full-preview .overlay-actions{
  gap:8px;
}
.card.full-preview .utility-row{
  gap:8px;
}
.card.full-preview .utility-row .topic-toggle,
.card.full-preview .utility-row .privacy-toggle{
  min-height:42px;
  padding:6px 10px;
  font-size:10.25px;
  line-height:1.15;
  white-space:nowrap;
  overflow:hidden;
  text-overflow:ellipsis;
}
.card.full-preview .controls{
  gap:8px;
}
.card.full-preview #mainBtn{
  min-height:56px;
  font-size:14px;
}
.card.full-preview .flip-camera-btn{
  width:56px;
  min-width:56px;
  min-height:56px;
}
.card.full-preview .secondary-row{
  display:flex;
  justify-content:flex-start;
  gap:8px;
}
.card.full-preview .secondary-row.empty{display:none}
.card.full-preview .secondary-row button{
  width:auto;
  min-width:150px;
  min-height:34px;
  padding:0 12px;
  font-size:9.5px;
}
.card.full-preview .overlay-copy{
  gap:8px;
}
.card.full-preview .status{
  max-width:68ch;
}
.card.full-preview .progress-wrap.show{
  margin-top:1px;
}
.card.full-preview .consent{
  max-width:72ch;
}

@media (orientation:landscape) and (min-width:768px) and (min-height:560px){
  .overlay-bottom{
    padding:
      clamp(13px, 1.8vh, 17px)
      clamp(18px, 2vw, 24px)
      clamp(13px, 1.7vh, 17px);
    gap:0;
  }
  .overlay-body{
    grid-template-columns:minmax(0,1fr) minmax(340px, 37%);
    gap:clamp(22px, 2.5vw, 34px);
    align-items:end;
  }
  .card.full-preview .overlay-actions{
    width:100%;
    max-width:420px;
    justify-self:end;
  }
  .card.full-preview .utility-row .topic-toggle,
  .card.full-preview .utility-row .privacy-toggle{
    font-size:10.5px;
  }
  .card.full-preview .status{
    font-size:12.5px;
  }
  .card.full-preview .consent{
    font-size:10.8px;
    line-height:1.4;
  }
  .card.full-preview .progress-label{
    font-size:10.5px;
  }
}

@media (orientation:landscape) and (min-width:1180px) and (min-height:700px){
  .overlay-body{
    grid-template-columns:minmax(0,1fr) minmax(370px, 410px);
  }
  .card.full-preview .overlay-actions{
    max-width:410px;
  }
}

@media (orientation:portrait) and (min-width:700px){
  .overlay-body{
    grid-template-columns:minmax(0,1fr) minmax(310px, 40%);
    gap:18px;
  }
  .card.full-preview .overlay-actions{max-width:390px;justify-self:end}
}

@media (orientation:portrait) and (max-width:699px){
  .action-head{
    min-height:30px;
    gap:7px;
  }
  .card.full-preview .flow-hint{
    font-size:9.5px;
  }
  .card.full-preview .reset-compact{
    min-width:104px;
    min-height:31px;
    padding:0 9px;
    font-size:8.8px;
  }
  .card.full-preview .utility-row .topic-toggle,
  .card.full-preview .utility-row .privacy-toggle{
    min-height:38px;
    font-size:9.2px;
    white-space:normal;
  }
}

@media (orientation:landscape) and (max-height:559px){
  .overlay-bottom{gap:0}
  .overlay-body{
    grid-template-columns:minmax(0,1fr) minmax(285px, 39%);
    gap:0;
  }
  .action-head{
    min-height:27px;
    gap:7px;
  }
  .card.full-preview .flow-hint{
    font-size:8.2px;
    line-height:1.2;
  }
  .card.full-preview .reset-compact{
    min-width:98px;
    min-height:28px;
    padding:0 8px;
    font-size:8px;
  }
  .card.full-preview .overlay-actions{gap:5px}
  .card.full-preview .utility-row{gap:6px}
  .card.full-preview .utility-row .topic-toggle,
  .card.full-preview .utility-row .privacy-toggle{
    min-height:31px;
    padding:3px 7px;
    font-size:8.5px;
    white-space:nowrap;
  }
  .card.full-preview #mainBtn{min-height:44px;font-size:11.5px}
  .card.full-preview .flip-camera-btn{
    width:44px;
    min-width:44px;
    min-height:44px;
  }
  .card.full-preview .secondary-row button{
    min-height:30px;
    min-width:132px;
    font-size:8.5px;
  }
}

/* ======================================================================
   Outdoor visibility v14 — tuned for booth use at ~50–80 cm viewing
   Priorities: legibility in glare, clear hierarchy, large tap targets,
   camera stays dominant.
   ====================================================================== */
body[data-mode="outdoor"] .hero-main p{
  color:#35483d;
  font-weight:520;
}
body[data-mode="outdoor"] .hero-note p{
  color:#31463a;
  font-weight:800;
}
body[data-mode="outdoor"] .card.full-preview .stage::after{
  height:46%;
  background:linear-gradient(
    180deg,
    rgba(5,9,7,0) 0%,
    rgba(5,9,7,.14) 18%,
    rgba(5,9,7,.56) 58%,
    rgba(5,9,7,.91) 100%
  );
}
body[data-mode="outdoor"] .card.full-preview .badge,
body[data-mode="outdoor"] .card.full-preview .timer{
  background:rgba(0,0,0,.84)!important;
  border:1px solid rgba(255,255,255,.13);
  box-shadow:0 6px 18px rgba(0,0,0,.24);
  color:#fff;
}
body[data-mode="outdoor"] .card.full-preview .timer{
  padding:8px 11px;
  font-size:16px;
  font-weight:720;
  opacity:1;
}
body[data-mode="outdoor"] .card.full-preview .timer.idle{
  font-size:16px;
  font-weight:650;
  color:rgba(255,255,255,.90);
}
body[data-mode="outdoor"] .stage.recording .timer{
  font-size:20px;
  font-weight:800;
  letter-spacing:.015em;
}
body[data-mode="outdoor"] .card.full-preview .badge{
  min-height:34px;
  padding:7px 10px;
  font-size:12px;
  font-weight:800;
  letter-spacing:.08em;
}
body[data-mode="outdoor"] .mic-meter{
  height:31px;
  width:168px;
  padding:0 10px;
  gap:9px;
  background:rgba(0,0,0,.80);
  border-color:rgba(255,255,255,.22);
  box-shadow:0 6px 18px rgba(0,0,0,.22);
}
body[data-mode="outdoor"] .mic-meter-label{
  font-size:10.5px;
  font-weight:800;
  letter-spacing:.12em;
  color:#fff;
}
body[data-mode="outdoor"] .mic-meter-track{
  height:6px;
  background:rgba(255,255,255,.24);
}
body[data-mode="outdoor"] .preview-brand{
  text-shadow:0 2px 14px rgba(0,0,0,.68);
}
body[data-mode="outdoor"] .preview-brand-kicker{
  color:rgba(255,255,255,.86);
}
body[data-mode="outdoor"] .preview-brand-event{
  color:rgba(255,255,255,.95);
}
body[data-mode="outdoor"] .card.full-preview .flow-hint{
  color:#fff;
  font-weight:700;
  text-shadow:0 2px 10px rgba(0,0,0,.56);
}
body[data-mode="outdoor"] .card.full-preview .utility-row .topic-toggle,
body[data-mode="outdoor"] .card.full-preview .utility-row .privacy-toggle{
  background:rgba(12,18,14,.82)!important;
  border-color:rgba(255,255,255,.34);
  color:#fff;
  font-weight:720;
  box-shadow:0 5px 16px rgba(0,0,0,.15);
  backdrop-filter:blur(8px);
  -webkit-backdrop-filter:blur(8px);
}
body[data-mode="outdoor"] .card.full-preview .topic-toggle.active,
body[data-mode="outdoor"] .card.full-preview .privacy-toggle.active{
  background:#315f47!important;
  border-color:rgba(255,255,255,.40);
  box-shadow:0 5px 18px rgba(0,0,0,.18), inset 0 0 0 1px rgba(255,255,255,.06);
}
body[data-mode="outdoor"] .card.full-preview #mainBtn{
  background:#35684d;
  border-color:#35684d;
  font-weight:760;
  box-shadow:0 7px 22px rgba(0,0,0,.19);
}
body[data-mode="outdoor"] .card.full-preview #mainBtn:active:not(:disabled){
  background:#2c5a41;
}
body[data-mode="outdoor"] .card.full-preview .flip-camera-btn{
  background:rgba(12,18,14,.86)!important;
  border-color:rgba(255,255,255,.30);
}
body[data-mode="outdoor"] .card.full-preview .reset-compact,
body[data-mode="outdoor"] .card.full-preview .secondary-row button{
  background:rgba(12,18,14,.82)!important;
  border-color:rgba(255,255,255,.30);
  color:#fff;
  font-weight:700;
}
body[data-mode="outdoor"] .card.full-preview .status{
  color:#fff;
  font-weight:620;
  text-shadow:0 2px 10px rgba(0,0,0,.52);
}
body[data-mode="outdoor"] .card.full-preview .consent{
  color:rgba(255,255,255,.82);
  font-weight:500;
  text-shadow:0 1px 8px rgba(0,0,0,.46);
}
body[data-mode="outdoor"] .card.full-preview .progress-label{
  color:rgba(255,255,255,.92);
  font-weight:650;
}
body[data-mode="outdoor"] .card.full-preview .bar{
  height:9px;
  background:rgba(255,255,255,.25);
}
body[data-mode="outdoor"] .preview-meta{
  color:#3a4b41;
  font-weight:560;
}
body[data-mode="outdoor"] #connectionText.quality-good{color:#215f36;font-weight:800}
body[data-mode="outdoor"] #connectionText.quality-fair{color:#735500;font-weight:800}
body[data-mode="outdoor"] #connectionText.quality-poor,
body[data-mode="outdoor"] #connectionText.offline{color:#8d2f24;font-weight:800}

/* Main booth target: iPad/tablet landscape at arm's length. */
@media (orientation:landscape) and (min-width:900px) and (min-height:650px){
  body[data-mode="outdoor"] .hero-main p{
    font-size:16.5px;
    line-height:1.4;
  }
  body[data-mode="outdoor"] .hero-note p{
    font-size:13px;
    letter-spacing:.15em;
  }
  body[data-mode="outdoor"] .card.full-preview .overlay-top{
    inset:18px 20px auto 20px;
  }
  body[data-mode="outdoor"] .mic-meter{
    left:20px;
    top:62px;
    width:176px;
  }
  body[data-mode="outdoor"] .preview-brand-kicker{
    font-size:10.5px;
  }
  body[data-mode="outdoor"] .preview-brand-event{
    font-size:18px;
  }
  body[data-mode="outdoor"] .overlay-bottom{
    padding:18px 22px 18px;
  }
  body[data-mode="outdoor"] .overlay-body{
    grid-template-columns:minmax(0,1fr) minmax(390px, 430px);
    gap:30px;
  }
  body[data-mode="outdoor"] .card.full-preview .overlay-actions{
    max-width:430px;
    gap:10px;
  }
  body[data-mode="outdoor"] .action-head{
    min-height:40px;
  }
  body[data-mode="outdoor"] .card.full-preview .flow-hint{
    font-size:14.5px;
    line-height:1.35;
  }
  body[data-mode="outdoor"] .card.full-preview .reset-compact{
    min-height:42px;
    min-width:136px;
    padding:0 14px;
    font-size:11.5px;
  }
  body[data-mode="outdoor"] .card.full-preview .utility-row{
    gap:10px;
  }
  body[data-mode="outdoor"] .card.full-preview .utility-row .topic-toggle,
  body[data-mode="outdoor"] .card.full-preview .utility-row .privacy-toggle{
    min-height:50px;
    padding:8px 12px;
    font-size:14px;
    line-height:1.18;
  }
  body[data-mode="outdoor"] .card.full-preview .controls{
    grid-template-columns:minmax(0,1fr) 66px;
    gap:10px;
  }
  body[data-mode="outdoor"] .card.full-preview #mainBtn{
    min-height:66px;
    font-size:19px;
  }
  body[data-mode="outdoor"] .card.full-preview .flip-camera-btn{
    width:66px;
    min-width:66px;
    min-height:66px;
  }
  body[data-mode="outdoor"] .card.full-preview .flip-camera-btn svg{
    width:28px;
    height:28px;
  }
  body[data-mode="outdoor"] .card.full-preview .secondary-row button{
    min-height:42px;
    min-width:168px;
    font-size:11.5px;
  }
  body[data-mode="outdoor"] .card.full-preview .status{
    font-size:15.5px;
    line-height:1.4;
  }
  body[data-mode="outdoor"] .card.full-preview .consent{
    font-size:12.5px;
    line-height:1.45;
  }
  body[data-mode="outdoor"] .card.full-preview .progress-label{
    font-size:12.5px;
  }
  body[data-mode="outdoor"] .preview-meta{
    min-height:34px;
    padding-top:9px;
    gap:9px;
    font-size:12.5px;
  }
  body[data-mode="outdoor"] .card.full-preview .topic-card{
    padding:12px 13px;
    gap:12px;
  }
  body[data-mode="outdoor"] .topic-kicker{
    font-size:10px;
    letter-spacing:.11em;
  }

  body[data-mode="outdoor"] .topic-text{
    font-size:20px;
    line-height:1.18;
  }
  body[data-mode="outdoor"] .card.full-preview .topic-reroll{
    width:46px;
    min-width:46px;
    min-height:46px;
    padding:0;
  }
  body[data-mode="outdoor"] .card.full-preview .topic-reroll-icon{
    width:25px;
    height:25px;
  }
}

/* Tablet portrait keeps the same readability without crowding the preview. */
@media (orientation:portrait) and (min-width:700px){
  body[data-mode="outdoor"] .card.full-preview .flow-hint{font-size:13px}
  body[data-mode="outdoor"] .card.full-preview .utility-row .topic-toggle,
  body[data-mode="outdoor"] .card.full-preview .utility-row .privacy-toggle{
    min-height:48px;
    font-size:13px;
  }
  body[data-mode="outdoor"] .card.full-preview #mainBtn{
    min-height:62px;
    font-size:17px;
  }
  body[data-mode="outdoor"] .card.full-preview .flip-camera-btn{
    width:62px;
    min-width:62px;
    min-height:62px;
  }
  body[data-mode="outdoor"] .preview-meta{font-size:11.5px}
}

/* ======================================================================
   Operator UI sizing v15
   Large = current outdoor v14 scale. Medium and Small only resize the
   participant-facing interface; operator controls stay comfortably legible.
   ====================================================================== */
.admin-ui-size-menu{
  display:grid;
  grid-template-columns:repeat(3,minmax(0,1fr));
  gap:7px;
}
.admin-ui-size-menu .ui-size-option{
  min-width:0;
  min-height:38px;
  padding:0 9px;
  border:1px solid rgba(39,55,45,.12);
  border-radius:9px;
  background:rgba(255,255,255,.70);
  color:#27372d;
  font-family:"Plus Jakarta Sans",sans-serif;
  font-size:10px;
  font-weight:800;
  line-height:1;
  touch-action:manipulation;
}
.admin-ui-size-menu .ui-size-option.active{
  background:#3f8c59;
  border-color:#3f8c59;
  color:#fff;
}

@media (min-width:700px) and (min-height:560px){
/* Medium — around 88–92% of the large outdoor presentation. */
body[data-mode="outdoor"][data-ui-size="medium"] h1{
  font-size:clamp(44px,5.15vw,72px);
}
body[data-mode="outdoor"][data-ui-size="medium"] .hero-main p{
  font-size:14.5px;
}
body[data-mode="outdoor"][data-ui-size="medium"] .hero-note p{
  font-size:11.5px;
}
body[data-mode="outdoor"][data-ui-size="medium"] .card.full-preview .timer,
body[data-mode="outdoor"][data-ui-size="medium"] .card.full-preview .timer.idle{
  padding:7px 10px;
  font-size:14px;
}
body[data-mode="outdoor"][data-ui-size="medium"] .stage.recording .timer{
  font-size:18px;
}
body[data-mode="outdoor"][data-ui-size="medium"] .card.full-preview .badge{
  min-height:31px;
  padding:6px 9px;
  font-size:11px;
}
body[data-mode="outdoor"][data-ui-size="medium"] .mic-meter{
  width:154px;
  height:29px;
  padding-inline:9px;
  gap:8px;
}
body[data-mode="outdoor"][data-ui-size="medium"] .mic-meter-label{font-size:9.5px}
body[data-mode="outdoor"][data-ui-size="medium"] .mic-meter-track{height:5px}
body[data-mode="outdoor"][data-ui-size="medium"] .preview-brand-kicker{font-size:9.5px}
body[data-mode="outdoor"][data-ui-size="medium"] .preview-brand-event{font-size:16px}
body[data-mode="outdoor"][data-ui-size="medium"] .card.full-preview .overlay-actions{
  max-width:395px;
  gap:8px;
}
body[data-mode="outdoor"][data-ui-size="medium"] .card.full-preview .flow-hint{
  font-size:13px;
}
body[data-mode="outdoor"][data-ui-size="medium"] .card.full-preview .reset-compact{
  min-width:124px;
  min-height:38px;
  padding-inline:12px;
  font-size:10.5px;
}
body[data-mode="outdoor"][data-ui-size="medium"] .card.full-preview .utility-row{
  gap:8px;
}
body[data-mode="outdoor"][data-ui-size="medium"] .card.full-preview .utility-row .topic-toggle,
body[data-mode="outdoor"][data-ui-size="medium"] .card.full-preview .utility-row .privacy-toggle{
  min-height:46px;
  padding:7px 10px;
  font-size:12.5px;
}
body[data-mode="outdoor"][data-ui-size="medium"] .card.full-preview .controls{
  grid-template-columns:minmax(0,1fr) 58px;
  gap:8px;
}
body[data-mode="outdoor"][data-ui-size="medium"] .card.full-preview #mainBtn{
  min-height:58px;
  font-size:17px;
}
body[data-mode="outdoor"][data-ui-size="medium"] .card.full-preview .flip-camera-btn{
  width:58px;
  min-width:58px;
  min-height:58px;
}
body[data-mode="outdoor"][data-ui-size="medium"] .card.full-preview .flip-camera-btn svg{
  width:25px;
  height:25px;
}
body[data-mode="outdoor"][data-ui-size="medium"] .card.full-preview .status{font-size:14px}
body[data-mode="outdoor"][data-ui-size="medium"] .card.full-preview .consent{font-size:11.5px}
body[data-mode="outdoor"][data-ui-size="medium"] .card.full-preview .progress-label{font-size:11.5px}
body[data-mode="outdoor"][data-ui-size="medium"] .preview-meta{font-size:11.5px}
body[data-mode="outdoor"][data-ui-size="medium"] .topic-kicker{font-size:9px}

body[data-mode="outdoor"][data-ui-size="medium"] .topic-text{font-size:18px}
body[data-mode="outdoor"][data-ui-size="medium"] .card.full-preview .topic-reroll{
  width:42px;
  min-width:42px;
  min-height:42px;
}

/* Small — compact operator-selected layout while keeping touch targets usable. */
body[data-mode="outdoor"][data-ui-size="small"] h1{
  font-size:clamp(40px,4.65vw,64px);
}
body[data-mode="outdoor"][data-ui-size="small"] .hero-main p{
  font-size:13px;
}
body[data-mode="outdoor"][data-ui-size="small"] .hero-note p{
  font-size:10px;
}
body[data-mode="outdoor"][data-ui-size="small"] .card.full-preview .timer,
body[data-mode="outdoor"][data-ui-size="small"] .card.full-preview .timer.idle{
  padding:6px 9px;
  font-size:12.5px;
}
body[data-mode="outdoor"][data-ui-size="small"] .stage.recording .timer{
  font-size:16px;
}
body[data-mode="outdoor"][data-ui-size="small"] .card.full-preview .badge{
  min-height:29px;
  padding:5px 8px;
  font-size:10px;
}
body[data-mode="outdoor"][data-ui-size="small"] .mic-meter{
  width:142px;
  height:27px;
  padding-inline:8px;
  gap:7px;
}
body[data-mode="outdoor"][data-ui-size="small"] .mic-meter-label{font-size:8.8px}
body[data-mode="outdoor"][data-ui-size="small"] .mic-meter-track{height:5px}
body[data-mode="outdoor"][data-ui-size="small"] .preview-brand-kicker{font-size:8.7px}
body[data-mode="outdoor"][data-ui-size="small"] .preview-brand-event{font-size:14px}
body[data-mode="outdoor"][data-ui-size="small"] .card.full-preview .overlay-actions{
  max-width:365px;
  gap:7px;
}
body[data-mode="outdoor"][data-ui-size="small"] .card.full-preview .flow-hint{
  font-size:11.5px;
}
body[data-mode="outdoor"][data-ui-size="small"] .card.full-preview .reset-compact{
  min-width:112px;
  min-height:35px;
  padding-inline:10px;
  font-size:9.5px;
}
body[data-mode="outdoor"][data-ui-size="small"] .card.full-preview .utility-row{
  gap:7px;
}
body[data-mode="outdoor"][data-ui-size="small"] .card.full-preview .utility-row .topic-toggle,
body[data-mode="outdoor"][data-ui-size="small"] .card.full-preview .utility-row .privacy-toggle{
  min-height:42px;
  padding:6px 9px;
  font-size:11px;
}
body[data-mode="outdoor"][data-ui-size="small"] .card.full-preview .controls{
  grid-template-columns:minmax(0,1fr) 52px;
  gap:7px;
}
body[data-mode="outdoor"][data-ui-size="small"] .card.full-preview #mainBtn{
  min-height:52px;
  font-size:15px;
}
body[data-mode="outdoor"][data-ui-size="small"] .card.full-preview .flip-camera-btn{
  width:52px;
  min-width:52px;
  min-height:52px;
}
body[data-mode="outdoor"][data-ui-size="small"] .card.full-preview .flip-camera-btn svg{
  width:23px;
  height:23px;
}
body[data-mode="outdoor"][data-ui-size="small"] .card.full-preview .status{font-size:12.5px}
body[data-mode="outdoor"][data-ui-size="small"] .card.full-preview .consent{font-size:10.5px}
body[data-mode="outdoor"][data-ui-size="small"] .card.full-preview .progress-label{font-size:10.5px}
body[data-mode="outdoor"][data-ui-size="small"] .preview-meta{font-size:10.5px}
body[data-mode="outdoor"][data-ui-size="small"] .topic-kicker{font-size:8.5px}

body[data-mode="outdoor"][data-ui-size="small"] .topic-text{font-size:16.5px}
body[data-mode="outdoor"][data-ui-size="small"] .card.full-preview .topic-reroll{
  width:39px;
  min-width:39px;
  min-height:39px;
}

}

/* On the main tablet landscape target, also tighten the control column itself. */
@media (orientation:landscape) and (min-width:900px) and (min-height:650px){
  body[data-mode="outdoor"][data-ui-size="medium"] .overlay-body{
    grid-template-columns:minmax(0,1fr) minmax(360px,395px);
    gap:26px;
  }
  body[data-mode="outdoor"][data-ui-size="medium"] .mic-meter{top:59px}
  body[data-mode="outdoor"][data-ui-size="small"] .overlay-body{
    grid-template-columns:minmax(0,1fr) minmax(330px,365px);
    gap:24px;
  }
  body[data-mode="outdoor"][data-ui-size="small"] .mic-meter{top:57px}
}

@media (orientation:portrait) and (min-width:700px){
  body[data-mode="outdoor"][data-ui-size="medium"] .card.full-preview .overlay-actions{max-width:355px}
  body[data-mode="outdoor"][data-ui-size="small"] .card.full-preview .overlay-actions{max-width:330px}
}


/* Final participant UX polish v17 */
.status.warn{color:#9a5b00}
.card.full-preview .status.warn{color:#ffe3a3}
body[data-mode="outdoor"] .card.full-preview .status.warn{
  color:#ffe7a8;
  text-shadow:0 1px 10px rgba(0,0,0,.55);
}

.privacy-toast{
  position:fixed;
  left:50%;
  bottom:max(22px, env(safe-area-inset-bottom));
  z-index:120;
  transform:translate(-50%,10px);
  max-width:min(430px,calc(100vw - 32px));
  padding:12px 16px;
  border-radius:14px;
  background:rgba(16,24,20,.92);
  color:#fff;
  font-family:"Plus Jakarta Sans",sans-serif;
  font-size:14px;
  font-weight:650;
  line-height:1.35;
  text-align:center;
  box-shadow:0 14px 34px rgba(0,0,0,.22);
  backdrop-filter:blur(10px);
  -webkit-backdrop-filter:blur(10px);
  opacity:0;
  pointer-events:none;
  transition:opacity .18s ease,transform .18s ease;
}
.privacy-toast.show{
  opacity:1;
  transform:translate(-50%,0);
}
@media (orientation:landscape) and (min-width:768px){
  .privacy-toast{
    bottom:max(30px, env(safe-area-inset-bottom));
    font-size:15px;
    padding:13px 18px;
  }
}
@media (max-width:699px){
  .privacy-toast{
    font-size:13px;
    border-radius:12px;
    padding:11px 14px;
  }
}


/* ======================================================================
   Operator reliability + participant layout polish v19
   ====================================================================== */
.participant-effect-note{
  min-height:22px;
  display:flex;
  align-items:center;
  padding:2px 0 2px 10px;
  border-left:2px solid rgba(255,255,255,.52);
  color:rgba(255,255,255,.82);
  font-family:"Plus Jakarta Sans",sans-serif;
  font-size:10.5px;
  font-weight:650;
  line-height:1.35;
}
.participant-effect-note[hidden]{display:none!important}
.stage.recording .participant-effect-note{display:none!important}

.booth-pause-state{
  position:absolute;
  z-index:18;
  inset:0;
  display:grid;
  place-items:center;
  padding:24px;
  background:rgba(8,13,10,.50);
  backdrop-filter:blur(4px);
  -webkit-backdrop-filter:blur(4px);
  pointer-events:auto;
}
.booth-pause-state[hidden]{display:none!important}
.booth-pause-card{
  display:grid;
  gap:5px;
  width:min(410px,88%);
  padding:22px 24px;
  border:1px solid rgba(255,255,255,.18);
  border-radius:16px;
  background:rgba(15,22,18,.88);
  color:#fff;
  text-align:center;
  box-shadow:0 18px 48px rgba(0,0,0,.24);
}
.booth-pause-card strong{font-size:19px;line-height:1.2}
.booth-pause-card span{font-size:12.5px;line-height:1.4;color:rgba(255,255,255,.78)}
.stage.booth-paused .camera-placeholder,
.stage.booth-paused video{filter:saturate(.75) brightness(.72)}

.card.full-preview .controls.front-camera-locked{
  grid-template-columns:minmax(0,1fr) auto!important;
}
.card.full-preview .controls.front-camera-locked #mainBtn{width:auto}
.card.full-preview .flip-camera-btn.camera-locked{
  opacity:.38!important;
  filter:saturate(.45);
  box-shadow:none!important;
  cursor:not-allowed;
}

.admin-setting-toggle{
  min-width:176px;
  min-height:38px;
  padding:0 11px;
  border:1px solid rgba(39,55,45,.14)!important;
  border-radius:10px!important;
  background:rgba(255,255,255,.66)!important;
  color:#27372d!important;
  font-family:"Plus Jakarta Sans",sans-serif!important;
  font-size:10px!important;
  font-weight:800!important;
  line-height:1.15!important;
  white-space:nowrap;
}
.admin-setting-toggle.active{
  background:#3f8c59!important;
  border-color:#3f8c59!important;
  color:#fff!important;
}
.admin-queue-summary{
  display:grid;
  grid-template-columns:repeat(2,minmax(0,1fr));
  gap:8px;
  margin-bottom:10px;
}
.admin-queue-summary>div{
  display:grid;
  gap:3px;
  min-width:0;
  padding:10px 11px;
  border-radius:10px;
  background:rgba(39,55,45,.05);
}
.admin-queue-summary span{
  color:rgba(39,55,45,.58);
  font-size:9px;
  font-weight:700;
  letter-spacing:.04em;
  text-transform:uppercase;
}
.admin-queue-summary strong{
  overflow:hidden;
  text-overflow:ellipsis;
  color:#27372d;
  font-size:11px;
  font-weight:800;
  white-space:nowrap;
}
.admin-queue-summary strong.critical{color:#a94343}
.admin-retry{margin-top:2px}

/* Keep the participant action stack balanced when the phone-effect notice appears. */
.card.full-preview .overlay-actions{align-content:end}
body[data-mode="outdoor"] .participant-effect-note{
  color:rgba(255,255,255,.90);
  font-size:12px;
  text-shadow:0 1px 8px rgba(0,0,0,.55);
}
body[data-mode="outdoor"][data-ui-size="medium"] .participant-effect-note{font-size:11px}
body[data-mode="outdoor"][data-ui-size="small"] .participant-effect-note{font-size:10px}

@media (max-width:520px){
  .admin-setting-toggle{width:100%;min-width:0}
  .admin-queue-summary{grid-template-columns:1fr}
  .participant-effect-note{font-size:9.5px}
  .booth-pause-card{padding:18px 16px}
  .booth-pause-card strong{font-size:16px}
}
@media (orientation:landscape) and (max-height:559px){
  .participant-effect-note{min-height:16px;padding-left:7px;font-size:8px}
  .booth-pause-card{padding:14px 16px}
  .booth-pause-card strong{font-size:15px}
  .booth-pause-card span{font-size:10px}
}


.admin-cleanup-section{
  display:grid;
  gap:10px;
}
.admin-cleanup-targets{
  display:grid;
  grid-template-columns:repeat(2,minmax(0,1fr));
  gap:8px;
}
.admin-cleanup-targets .cleanup-target{
  width:100%;
  min-width:0;
}
.admin-cleanup-note{
  margin:0;
  color:rgba(39,55,45,.60);
  font-size:9.5px;
  font-weight:600;
  line-height:1.45;
}
.admin-cleanup-action-row{
  display:grid;
  grid-template-columns:minmax(0,1fr) auto;
  gap:8px;
  align-items:end;
}
.admin-pin-field{
  display:grid;
  gap:5px;
}
.admin-pin-field>span{
  color:rgba(39,55,45,.58);
  font-size:9px;
  font-weight:750;
  letter-spacing:.04em;
  text-transform:uppercase;
}
.admin-pin-field input{
  width:100%;
  min-height:38px;
  padding:0 11px;
  border:1px solid rgba(39,55,45,.14);
  border-radius:10px;
  outline:none;
  background:rgba(255,255,255,.78);
  color:#27372d;
  font-family:"Plus Jakarta Sans",sans-serif;
  font-size:12px;
  font-weight:800;
  letter-spacing:.12em;
}
.admin-pin-field input:focus{
  border-color:rgba(63,140,89,.62);
  box-shadow:0 0 0 3px rgba(63,140,89,.10);
}
.admin-cleanup-run{
  min-height:38px;
  white-space:nowrap;
}
.admin-cleanup-confirm{
  display:grid;
  gap:6px;
  padding:11px 12px;
  border:1px solid rgba(169,67,67,.16);
  border-radius:11px;
  background:rgba(169,67,67,.055);
}
.admin-cleanup-confirm[hidden]{display:none!important}
.admin-cleanup-confirm strong{
  color:#27372d;
  font-size:11px;
  line-height:1.35;
}
.admin-cleanup-confirm>span{
  color:rgba(39,55,45,.68);
  font-size:9.5px;
  font-weight:600;
  line-height:1.45;
}
.admin-cleanup-confirm-actions{
  display:grid;
  grid-template-columns:minmax(0,1fr) auto;
  gap:8px;
  margin-top:3px;
}
.admin-danger,
.admin-secondary{
  min-height:36px;
  padding:0 12px;
  border-radius:9px;
  font-family:"Plus Jakarta Sans",sans-serif;
  font-size:10px;
  font-weight:800;
}
.admin-danger{
  border:1px solid #a94343;
  background:#a94343;
  color:#fff;
}
.admin-secondary{
  border:1px solid rgba(39,55,45,.14);
  background:rgba(255,255,255,.72);
  color:#27372d;
}
.admin-cleanup-status{
  padding:8px 10px;
  border-radius:9px;
  background:rgba(39,55,45,.05);
  color:rgba(39,55,45,.72);
  font-size:9.5px;
  font-weight:700;
  line-height:1.4;
}
.admin-cleanup-status[hidden]{display:none!important}
.admin-cleanup-status.ok{
  background:rgba(61,138,91,.08);
  color:#2f744b;
}
.admin-cleanup-status.warn{
  background:rgba(179,122,32,.09);
  color:#8a5a14;
}
.admin-cleanup-status.bad{
  background:rgba(169,67,67,.08);
  color:#8b2323;
}
@media (max-width:520px){
  .admin-cleanup-targets,
  .admin-cleanup-action-row,
  .admin-cleanup-confirm-actions{
    grid-template-columns:1fr;
  }
  .admin-cleanup-run,
  .admin-danger,
  .admin-secondary{
    width:100%;
  }
}

/* ======================================================================
   Ruang Dengar logo header — v21
   Replaces the former text heading while keeping #adminHotspot intact.
   ====================================================================== */
.hero-logo-heading{
  margin:0;
  width:clamp(178px,20vw,238px);
  max-width:100%;
  font-size:0;
  line-height:0;
  font-style:normal;
  letter-spacing:0;
  color:transparent;
  flex:0 0 auto;
}

.hero-logo{
  display:block;
  width:100%;
  height:auto;
  max-width:100%;
  object-fit:contain;
  object-position:left center;
  user-select:none;
  -webkit-user-select:none;
  -webkit-user-drag:none;
  pointer-events:none;
}

/* Keep the participant-size selector meaningful for the new mark. */
body[data-mode="outdoor"][data-ui-size="medium"] .hero-logo-heading{
  width:clamp(166px,18.2vw,216px);
}

body[data-mode="outdoor"][data-ui-size="small"] .hero-logo-heading{
  width:clamp(150px,16.8vw,198px);
}

/* Portrait has room for a slightly more legible lockup. */
@media (orientation:portrait) and (min-width:700px){
  .hero-logo-heading{
    width:clamp(220px,31vw,280px);
  }
  body[data-mode="outdoor"][data-ui-size="medium"] .hero-logo-heading{
    width:clamp(205px,28vw,258px);
  }
  body[data-mode="outdoor"][data-ui-size="small"] .hero-logo-heading{
    width:clamp(190px,25vw,236px);
  }
}

/* Phone portrait: preserve the existing left-aligned editorial header. */
@media (orientation:portrait) and (max-width:699px){
  .hero-logo-heading{
    width:clamp(180px,54vw,222px);
  }
}

/* Short landscape screens need the old heading's compact footprint. */
@media (orientation:landscape) and (max-height:559px){
  .hero-logo-heading{
    width:clamp(108px,18vw,138px);
  }
}



/* ======================================================================
   Welcome screen — v23 deep green fluid
   Full-screen entry layer with dark, animated organic gradients.
   ====================================================================== */
.welcome-screen{
  position:fixed;
  inset:0;
  z-index:900;
  display:grid;
  place-items:center;
  min-width:100%;
  min-height:100%;
  padding:
    max(28px,env(safe-area-inset-top))
    max(24px,env(safe-area-inset-right))
    max(32px,env(safe-area-inset-bottom))
    max(24px,env(safe-area-inset-left));
  overflow:hidden;
  background:#04251a;
  color:#f5fff8;
  transform:translate3d(0,0,0);
  transition:transform .88s cubic-bezier(.76,0,.24,1);
  will-change:transform;
  isolation:isolate;
}

/* Primary fluid field. Large blurred shapes drift slowly so the screen feels
   alive without looking like a looping video or distracting from the logo. */
.welcome-screen::before{
  content:"";
  position:absolute;
  inset:-24%;
  z-index:-2;
  pointer-events:none;
  background:
    radial-gradient(ellipse at 12% 18%,rgba(24,105,67,.92) 0 16%,transparent 42%),
    radial-gradient(ellipse at 84% 16%,rgba(12,77,51,.95) 0 18%,transparent 46%),
    radial-gradient(ellipse at 76% 82%,rgba(22,116,73,.72) 0 17%,transparent 45%),
    radial-gradient(ellipse at 22% 78%,rgba(4,68,45,.88) 0 18%,transparent 47%),
    radial-gradient(ellipse at 52% 48%,rgba(8,54,38,.96) 0 26%,transparent 62%),
    linear-gradient(135deg,#021810 0%,#063522 44%,#052a1d 68%,#031c14 100%);
  filter:blur(54px) saturate(1.16);
  transform:scale(1.10);
  animation:welcomeAmbient 15s ease-in-out infinite alternate;
}

/* Secondary moving wash adds depth and gives the dark green background a more
   liquid character. */
.welcome-screen::after{
  content:"";
  position:absolute;
  inset:-18%;
  z-index:-1;
  pointer-events:none;
  opacity:.82;
  background:
    radial-gradient(circle at 28% 34%,rgba(92,177,117,.18) 0 10%,transparent 29%),
    radial-gradient(circle at 72% 28%,rgba(121,193,139,.10) 0 12%,transparent 31%),
    radial-gradient(circle at 60% 76%,rgba(62,153,99,.16) 0 12%,transparent 30%),
    radial-gradient(circle at 84% 66%,rgba(188,215,154,.07) 0 10%,transparent 27%),
    linear-gradient(120deg,transparent 18%,rgba(255,255,255,.035) 48%,transparent 72%);
  filter:blur(48px);
  mix-blend-mode:screen;
  transform:scale(1.06);
  animation:welcomeFluidSecondary 21s ease-in-out infinite alternate;
}

body:not(.welcome-ready) .welcome-screen{
  transition:none;
}

body.main-entered .welcome-screen{
  transform:translate3d(0,-102%,0);
  pointer-events:none;
}

.welcome-inner{
  width:min(760px,100%);
  display:flex;
  flex-direction:column;
  align-items:center;
  justify-content:center;
  text-align:center;
  transform:translateY(-1.5vh);
}

.welcome-kicker{
  margin:0 0 clamp(20px,3.4vh,34px);
  color:rgba(248,255,250,.96);
  font-family:var(--font-sans);
  font-size:clamp(17px,2vw,24px);
  font-weight:650;
  line-height:1.3;
  letter-spacing:.015em;
  text-shadow:0 2px 20px rgba(0,0,0,.16);
}

.welcome-logo-hotspot{
  width:min(560px,74vw);
  max-width:100%;
  user-select:none;
  -webkit-user-select:none;
  -webkit-touch-callout:none;
}

.welcome-logo{
  display:block;
  width:100%;
  height:auto;
  object-fit:contain;
  user-select:none;
  -webkit-user-select:none;
  -webkit-user-drag:none;
  pointer-events:none;
  filter:drop-shadow(0 14px 30px rgba(0,0,0,.14));
}

.welcome-event{
  margin:clamp(20px,3.6vh,34px) 0 0;
  color:rgba(236,248,239,.76);
  font-family:var(--font-sans);
  font-size:clamp(12px,1.25vw,15px);
  font-weight:750;
  line-height:1.3;
  letter-spacing:.18em;
  text-transform:uppercase;
  text-shadow:0 2px 18px rgba(0,0,0,.12);
}

.welcome-start{
  position:relative;
  width:76px;
  height:76px;
  min-height:76px;
  margin-top:clamp(30px,5vh,48px);
  padding:0;
  display:grid;
  place-items:center;
  border:1.5px solid rgba(244,255,247,.74);
  border-radius:50%;
  background:rgba(255,255,255,.075);
  color:#f7fff9;
  box-shadow:0 14px 38px rgba(0,0,0,.16), inset 0 0 0 1px rgba(255,255,255,.035);
  backdrop-filter:blur(10px);
  -webkit-backdrop-filter:blur(10px);
  overflow:visible;
  -webkit-tap-highlight-color:transparent;
  animation:welcomeButtonFloat 2.8s ease-in-out infinite;
}

.welcome-start-ring{
  position:absolute;
  inset:-8px;
  border:1px solid rgba(239,255,244,.24);
  border-radius:50%;
  pointer-events:none;
  animation:welcomeRing 2.8s ease-out infinite;
}

.welcome-start svg{
  width:31px;
  height:31px;
  fill:none;
  stroke:currentColor;
  stroke-width:1.7;
  stroke-linecap:round;
  stroke-linejoin:round;
  animation:welcomeArrow 1.65s ease-in-out infinite;
}

.welcome-start:hover,
.welcome-start:focus-visible{
  border-color:rgba(255,255,255,.96);
  background:rgba(255,255,255,.14);
  box-shadow:0 16px 42px rgba(0,0,0,.20),0 0 0 5px rgba(255,255,255,.035);
  outline:none;
}

.welcome-start:active{
  transform:scale(.94);
}

@keyframes welcomeAmbient{
  0%{transform:translate3d(-2.8%,-1.8%,0) scale(1.08) rotate(-1.8deg)}
  48%{transform:translate3d(1.2%,1.8%,0) scale(1.14) rotate(.8deg)}
  100%{transform:translate3d(3.4%,-1.2%,0) scale(1.10) rotate(1.7deg)}
}

@keyframes welcomeFluidSecondary{
  0%{transform:translate3d(2.5%,-2%,0) scale(1.04) rotate(1deg)}
  50%{transform:translate3d(-1.8%,1.6%,0) scale(1.11) rotate(-1.2deg)}
  100%{transform:translate3d(-3%,2.6%,0) scale(1.07) rotate(.8deg)}
}

@keyframes welcomeButtonFloat{
  0%,100%{transform:translateY(0)}
  50%{transform:translateY(-5px)}
}

@keyframes welcomeRing{
  0%{transform:scale(.88);opacity:0}
  22%{opacity:.7}
  72%,100%{transform:scale(1.16);opacity:0}
}

@keyframes welcomeArrow{
  0%,100%{transform:translateX(-2px)}
  50%{transform:translateX(3px)}
}

@media (orientation:portrait){
  .welcome-logo-hotspot{width:min(520px,84vw)}
  .welcome-inner{transform:translateY(-2vh)}
}

@media (orientation:portrait) and (max-width:520px){
  .welcome-kicker{font-size:16px;margin-bottom:20px}
  .welcome-logo-hotspot{width:min(390px,88vw)}
  .welcome-event{font-size:10px;letter-spacing:.14em;margin-top:20px}
  .welcome-start{width:68px;height:68px;min-height:68px;margin-top:30px}
  .welcome-start svg{width:28px;height:28px}
}

@media (orientation:landscape) and (max-height:559px){
  .welcome-inner{transform:none}
  .welcome-kicker{font-size:13px;margin-bottom:12px}
  .welcome-logo-hotspot{width:min(330px,45vw)}
  .welcome-event{font-size:9px;margin-top:12px;letter-spacing:.14em}
  .welcome-start{width:54px;height:54px;min-height:54px;margin-top:16px}
  .welcome-start-ring{inset:-6px}
  .welcome-start svg{width:23px;height:23px}
}

@media (prefers-reduced-motion: reduce){
  .welcome-screen,
  .welcome-start,
  .welcome-start-ring,
  .welcome-start svg,
  .welcome-screen::before,
  .welcome-screen::after{
    animation:none!important;
  }
}


/* ======================================================================
   Welcome audio interlude — v40
   Sentence-level subtitles aligned to the uploaded welcome audio. Three restrained
   dots follow a precomputed amplitude envelope while native media playback stays untouched.
   ====================================================================== */
.welcome-audio-layer{
  position:fixed;
  inset:0;
  z-index:860;
  display:grid;
  place-items:center;
  padding:
    max(24px,env(safe-area-inset-top))
    max(22px,env(safe-area-inset-right))
    max(24px,env(safe-area-inset-bottom))
    max(22px,env(safe-area-inset-left));
  overflow:hidden;
  opacity:0;
  visibility:hidden;
  pointer-events:none;
  background:rgba(2,10,7,.84);
  -webkit-backdrop-filter:blur(3px) saturate(.70) brightness(.44);
  backdrop-filter:blur(3px) saturate(.70) brightness(.44);
  transition:opacity .42s ease,visibility 0s linear .42s;
}

.welcome-audio-layer[hidden]{display:none!important}

body.intro-playing .welcome-audio-layer{
  opacity:1;
  visibility:visible;
  pointer-events:auto;
  touch-action:manipulation;
  user-select:none;
  -webkit-user-select:none;
  -webkit-tap-highlight-color:transparent;
  transition:opacity .48s ease .12s,visibility 0s linear 0s;
}

body.intro-finishing .welcome-audio-layer{
  opacity:0;
  visibility:visible;
  transition:opacity .40s ease;
}

.welcome-audio-visual{
  position:relative;
  width:min(860px,86vw);
  min-height:72px;
  display:flex;
  flex-direction:column;
  align-items:center;
  justify-content:center;
  gap:22px;
  transform:translateY(-3vh);
}

body.intro-playing #mainScreen{
  pointer-events:none;
  user-select:none;
  -webkit-user-select:none;
  filter:brightness(.50) saturate(.80);
}

body.intro-playing #live{opacity:.70}


.welcome-pulse-dots{
  height:24px;
  display:flex;
  align-items:center;
  justify-content:center;
  gap:12px;
  opacity:.88;
}

.welcome-pulse-dots span{
  width:7px;
  height:7px;
  border-radius:50%;
  background:rgba(239,255,245,.88);
  box-shadow:0 0 14px rgba(194,243,209,.15);
  opacity:.42;
  transform:translate3d(0,0,0) scale(1);
  will-change:transform,opacity;
}

.welcome-subtitle{
  margin:0;
  width:min(860px,88vw);
  min-height:2.8em;
  padding:0 12px;
  color:rgba(248,255,250,.97);
  font:600 clamp(18px,2.2vw,30px)/1.38 "Plus Jakarta Sans",system-ui,-apple-system,BlinkMacSystemFont,"Segoe UI",sans-serif;
  letter-spacing:-.018em;
  text-align:center;
  text-wrap:balance;
  text-shadow:0 2px 18px rgba(0,0,0,.55);
  opacity:0;
  visibility:hidden;
  transform:translateY(2px);
}

.welcome-subtitle.is-visible{
  opacity:1;
  visibility:visible;
  transform:translateY(0);
}

@media (orientation:portrait){
  .welcome-audio-visual{
    width:min(720px,90vw);
    min-height:72px;
    gap:20px;
    transform:translateY(-2vh);
  }
}

@media (orientation:landscape) and (max-height:559px){
  .welcome-audio-visual{
    width:min(760px,78vw);
    min-height:56px;
    gap:14px;
    transform:translateY(-10px);
  }
  .welcome-pulse-dots{height:18px;gap:10px}
  .welcome-pulse-dots span{width:6px;height:6px}
  .welcome-subtitle{font-size:clamp(15px,2.5vh,20px);width:min(760px,82vw);min-height:2.6em}
}

@media (prefers-reduced-motion:reduce){
  .welcome-audio-layer{transition-duration:.001ms!important}
  .welcome-pulse-dots span{transform:none!important}
}

