/* LIVE — immersive VOID environment inside the Living Horizon system. */
body[data-view="live"] #app{position:relative;min-width:0}
body[data-view="live"] #app>.hero{
  padding:34px 34px 28px;border-radius:30px;
  border:1px solid rgba(255,255,255,.10)!important;
  background:
    radial-gradient(circle at 84% 12%,rgba(217,80,104,.26),transparent 28%),
    radial-gradient(circle at 18% 100%,rgba(138,187,178,.14),transparent 35%),
    linear-gradient(145deg,#151a1c,#273033 70%,#393a35)!important;
  color:#f8faf9!important;
  box-shadow:0 36px 106px rgba(18,25,27,.24),inset 0 1px 0 rgba(255,255,255,.11)!important;
}
body[data-view="live"] #app>.hero :is(h1,h2,h3){color:#fff}
body[data-view="live"] #app>.hero>h1{margin:9px 0 7px;font-size:clamp(48px,6vw,78px);font-weight:600;line-height:.9;letter-spacing:-.065em}
body[data-view="live"] #app>.hero>p{max-width:760px;color:rgba(245,248,247,.62);font-size:13px;line-height:1.6}
body[data-view="live"] #app>.hero>.eyebrow{color:#e3b3bd!important}
body[data-view="live"] .live-dot{background:#d95068;box-shadow:none}
body[data-view="live"] .live-tabs{display:flex;gap:6px;overflow-x:auto;scrollbar-width:none;padding:4px;margin:16px 0 6px;border-radius:var(--sy-r-pill);background:rgba(255,255,255,.06);border:1px solid rgba(255,255,255,.10)}
body[data-view="live"] .live-tabs::-webkit-scrollbar{display:none}
body[data-view="live"] .live-tabs button{flex:0 0 auto;min-height:40px;padding:0 15px;border:0;border-radius:var(--sy-r-pill);background:transparent;color:rgba(245,248,247,.58);font-size:11px;font-weight:700}
body[data-view="live"] .live-tabs button.active{background:linear-gradient(135deg,#f2dbe0,#d95068);color:#23191b;box-shadow:0 12px 28px rgba(217,80,104,.25),inset 0 1px 0 rgba(255,255,255,.7)}

body[data-view="live"] #app>.hero .scene-readout{display:flex;gap:8px;flex-wrap:wrap;margin:18px 0 4px}
body[data-view="live"] #app>.hero .scene-readout>span{min-width:96px;padding:10px 13px;border-radius:15px;background:rgba(255,255,255,.07);border:1px solid rgba(255,255,255,.10);box-shadow:inset 0 1px 0 rgba(255,255,255,.08)}
body[data-view="live"] #app>.hero .scene-readout :is(small,b){display:block}
body[data-view="live"] #app>.hero .scene-readout small{font-size:8px;letter-spacing:.12em;color:rgba(245,248,247,.48)}
body[data-view="live"] #app>.hero .scene-readout b{margin-top:4px;font-size:18px;color:#fff}
body[data-view="live"] .live-capability-details{margin:12px 0;color:rgba(245,248,247,.56);font-size:10px}
body[data-view="live"] .live-capability-details summary{width:max-content;cursor:pointer;color:#d8bb89;font-weight:720}
body[data-view="live"] .live-capability-details p{margin:7px 0 0;line-height:1.5}
body[data-view="live"] .live-empty-state{grid-column:1/-1;padding:30px 28px;border-radius:24px;background:linear-gradient(135deg,rgba(255,255,255,.82),rgba(232,241,239,.65));border:1px solid rgba(255,255,255,.94);box-shadow:var(--sy-shadow-1)}
body[data-view="live"] .live-empty-state h2{margin:8px 0 6px;font-size:clamp(22px,2.6vw,32px);letter-spacing:-.035em}
body[data-view="live"] .live-empty-state p{max-width:620px;margin:0;color:var(--sy-muted);font-size:13px;line-height:1.6}
body[data-view="live"] .live-empty-state :is(.primary,.ghost){margin-top:16px;min-height:42px;padding:0 18px}

/* Creator controls use an opaque crystal plate on mobile instead of asking
   Chromium to resample a blurred backdrop below every rounded control. The
   two-pixel pearl rim keeps the high-contrast gradient inside a stable paint
   boundary while retaining the premium illuminated button treatment. */
body[data-view="live"] .live-creator-launchpad{
  display:grid!important;grid-template-columns:minmax(0,1.5fr) auto auto;gap:9px;align-items:center;
  margin-top:16px;padding:14px;border-radius:20px!important;
  background:linear-gradient(145deg,rgba(255,255,255,.97),rgba(239,245,243,.92))!important;
  backdrop-filter:none!important;
}
body[data-view="live"] .live-creator-launchpad>hr{grid-column:1/-1;width:100%;height:1px;margin:2px 0;border:0;background:var(--sy-line)}
body[data-view="live"] .live-creator-launchpad :is(input,button){min-height:43px}
body[data-view="live"] .live-creator-launchpad :is(#goLive,#openStudioFromLive,#createEventBtn){
  border:2px solid rgba(255,255,255,.94)!important;
  background-clip:padding-box!important;
}

body[data-view="live"] .live-room-grid{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:12px;margin:14px 0}
body[data-view="live"] .live-room-card{position:relative;min-height:176px;padding:20px;border-radius:24px!important;background:linear-gradient(145deg,rgba(255,255,255,.96),rgba(238,244,242,.84))!important;border:1px solid rgba(255,255,255,.94)!important;box-shadow:var(--sy-shadow-2)!important;overflow:hidden}
body[data-view="live"] .live-room-card:after{content:"";position:absolute;right:-46px;bottom:-52px;width:140px;height:140px;border-radius:50%;background:radial-gradient(circle,rgba(217,80,104,.14),transparent 68%);pointer-events:none}
body[data-view="live"] .live-room-card h3{font-size:17px;margin:9px 0 3px;color:var(--sy-ink)}
body[data-view="live"] .live-room-card .badge{display:inline-flex;align-items:center;gap:4px;color:#816c4a;background:rgba(225,211,185,.40);border:1px solid rgba(168,139,94,.12);border-radius:var(--sy-r-pill);padding:5px 8px;font-size:9px;font-weight:760}
body[data-view="live"] .live-tools{display:flex;gap:7px;align-items:center;flex-wrap:wrap;margin-top:13px}
body[data-view="live"] .live-tools button{min-height:38px;padding:0 12px}

/* Viewer room / host media is the dominant surface. */
body[data-view="live"] #livePlayer>.card,
body[data-view="live"] #liveChat>.card{
  border-radius:var(--sy-r-xl)!important;
  overflow:hidden;
  border:1px solid rgba(255,255,255,.10)!important;
  background:radial-gradient(circle at 76% 18%,rgba(138,187,178,.15),transparent 27%),linear-gradient(145deg,var(--sy-void),var(--sy-void-2) 66%,#494840)!important;
  color:#f7f8f7!important;
  box-shadow:0 34px 100px rgba(20,28,30,.22),inset 0 1px 0 rgba(255,255,255,.12)!important;
  backdrop-filter:none!important;
}
body[data-view="live"] #livePlayer>.card{padding:18px}
body[data-view="live"] #livePlayer>.card :is(h1,h2,h3,strong){color:#fff!important}
body[data-view="live"] #livePlayer>.card .muted{color:rgba(241,245,244,.62)!important}
body[data-view="live"] #livePlayer #liveVideo{
  display:block;width:100%!important;min-height:340px!important;max-height:72vh;aspect-ratio:16/9;object-fit:contain;
  margin-top:14px!important;border-radius:22px!important;background:#090d0f!important;
  border:1px solid rgba(255,255,255,.08);box-shadow:0 24px 78px rgba(0,0,0,.34)
}
body[data-view="live"] #livePlayer .live-tools{padding-top:2px}
body[data-view="live"] #livePlayer .ghost{background:rgba(255,255,255,.08)!important;border-color:rgba(255,255,255,.12)!important;color:#f4f7f6!important}
body[data-view="live"] #livePlayer .ghost:hover{background:rgba(255,255,255,.13)!important}

/* Truthful realtime status: classes are assigned from the actual WebRTC status text. */
body[data-view="live"] #webrtcStatus{display:inline-flex;align-items:center;min-height:30px;padding:0 10px;border-radius:var(--sy-r-pill);font-size:9px;font-weight:800;letter-spacing:.08em;border:1px solid rgba(255,255,255,.12);background:rgba(255,255,255,.08);color:rgba(255,255,255,.75)}
body[data-view="live"] #webrtcStatus[data-connection-state="connecting"]{color:#e7d5b2;background:rgba(168,126,70,.16);border-color:rgba(213,173,112,.20)}
body[data-view="live"] #webrtcStatus[data-connection-state="connected"]{color:#c9eee5;background:rgba(91,153,137,.18);border-color:rgba(138,187,178,.24)}
body[data-view="live"] #webrtcStatus[data-connection-state="degraded"]{color:#f2d2a8;background:rgba(170,126,70,.20);border-color:rgba(213,173,112,.28)}
body[data-view="live"] #webrtcStatus[data-connection-state="error"],body[data-view="live"] #webrtcStatus[data-connection-state="disconnected"]{color:#f1bfc0;background:rgba(167,95,97,.18);border-color:rgba(167,95,97,.28)}

/* Gifts remain cinematic but separate from core control hierarchy. */
body[data-view="live"] .live-gift-tray{margin-top:12px;padding:12px;border-radius:18px;background:rgba(255,255,255,.07);border:1px solid rgba(255,255,255,.10)}
body[data-view="live"] .live-gift-head{display:flex;align-items:center;justify-content:space-between;gap:10px}
body[data-view="live"] .live-gift-scroll{display:grid;grid-auto-flow:column;grid-auto-columns:minmax(116px,1fr);gap:8px;overflow-x:auto;scrollbar-width:none;margin-top:10px;padding-bottom:2px}
body[data-view="live"] .live-gift-scroll::-webkit-scrollbar{display:none}
body[data-view="live"] .live-gift{min-height:92px;padding:10px;border-radius:17px;border:1px solid rgba(255,255,255,.10);background:rgba(255,255,255,.06);color:#fff;text-align:left}
body[data-view="live"] .live-gift-symbol{display:block;font-size:22px;color:var(--gift-color);filter:drop-shadow(0 0 10px color-mix(in srgb,var(--gift-color) 42%,transparent))}
body[data-view="live"] .live-gift b,body[data-view="live"] .live-gift small{display:block;margin-top:4px}
body[data-view="live"] .live-gift small{color:rgba(255,255,255,.58)}

body[data-view="live"] .resonance-panel{margin-top:12px;padding:13px;border-radius:18px;background:rgba(255,255,255,.06);border:1px solid rgba(255,255,255,.10)}
body[data-view="live"] .resonance-title{display:flex;align-items:center;justify-content:space-between;gap:10px}
body[data-view="live"] .resonance-meter{height:8px;margin:10px 0 7px;border-radius:999px;overflow:hidden;background:rgba(255,255,255,.10)}
body[data-view="live"] .resonance-meter i{display:block;height:100%;border-radius:inherit;background:linear-gradient(90deg,var(--sy-mint),var(--sy-champagne))}

/* Chat is readable and subordinate to media. */
body[data-view="live"] #liveChat>.card{margin-top:12px;padding:16px;background:rgba(29,37,39,.96)!important}
body[data-view="live"] #liveMessages{max-height:300px;overflow:auto;padding:4px 2px;scrollbar-width:thin}
body[data-view="live"] #liveMessages p{margin:0;padding:8px 2px;border-bottom:1px solid rgba(255,255,255,.06);line-height:1.45;color:rgba(255,255,255,.82)}
body[data-view="live"] #liveChatForm{grid-template-columns:minmax(0,1fr) auto;display:grid;gap:8px;margin-top:10px}
body[data-view="live"] #liveChatForm input{background:rgba(255,255,255,.08)!important;color:#fff!important;border-color:rgba(255,255,255,.12)!important}
body[data-view="live"] #liveChatForm .primary{min-width:104px}

@media(max-width:900px){
  body[data-view="live"] #app>.hero{padding:24px 20px;border-radius:26px}
  body[data-view="live"] #app>.hero>h1{font-size:54px}
  body[data-view="live"] .live-room-grid{grid-template-columns:1fr}
  body[data-view="live"] #livePlayer>.card{margin-left:-2px;margin-right:-2px;padding:10px;border-radius:24px!important}
  body[data-view="live"] #livePlayer #liveVideo{min-height:0!important;max-height:none;aspect-ratio:9/16;border-radius:18px!important;margin-top:10px!important}
  body[data-view="live"] #livePlayer .row{padding:4px 4px 0}
  body[data-view="live"] #livePlayer .live-tools{padding:0 4px}
  body[data-view="live"] #liveChat>.card{border-radius:22px!important}
}

/* Landscape mobile uses the screen for media, controls remain reachable. */
@media(max-width:900px) and (orientation:landscape){
  body[data-view="live"] #livePlayer>.card{display:grid;grid-template-columns:minmax(0,1.55fr) minmax(220px,.65fr);grid-template-areas:"head side" "video side";gap:8px;align-items:start}
  body[data-view="live"] #livePlayer>.card>.row:first-child{grid-area:head}
  body[data-view="live"] #livePlayer #liveVideo{grid-area:video;aspect-ratio:16/9;max-height:calc(100svh - 118px)}
  body[data-view="live"] #livePlayer .live-tools,body[data-view="live"] #livePlayer .resonance-panel,body[data-view="live"] #livePlayer .live-gift-tray,body[data-view="live"] #livePlayer>.card>p{grid-column:2;align-self:start}
}

@media(max-width:480px){
  body[data-view="live"] #app{padding-bottom:96px}
  body[data-view="live"] .live-tabs{margin-left:-2px;margin-right:-2px}
  body[data-view="live"] .live-empty-state{padding:22px 18px;border-radius:21px}
  body[data-view="live"] .live-room-card{padding:15px;border-radius:20px!important}
  body[data-view="live"] #livePlayer #liveVideo{width:calc(100% + 0px)!important}
  body[data-view="live"] #livePlayer .live-tools{gap:6px}
  body[data-view="live"] #livePlayer .live-tools .badge{width:100%;order:10}
  body[data-view="live"] #liveChatForm{grid-template-columns:1fr}
  body[data-view="live"] #liveChatForm .primary{width:100%}
}

@media(max-width:760px){
  body[data-view="live"] .live-creator-launchpad{grid-template-columns:1fr;padding:12px!important}
  body[data-view="live"] .live-creator-launchpad>hr{grid-column:1}
  body[data-view="live"] .live-creator-launchpad :is(#goLive,#openStudioFromLive,#createEventBtn){width:100%}
}

@media(prefers-reduced-motion:reduce){body[data-view="live"] *{scroll-behavior:auto!important}}
/* TikTok owner pilot — contextual to LIVE and honest about the local bridge. */
body[data-view="live"] .tiktok-owner-pilot{margin:16px 0;padding:20px;border:1px solid rgba(255,255,255,.92);border-radius:28px;background:radial-gradient(circle at 88% 4%,rgba(217,80,104,.13),transparent 28%),linear-gradient(145deg,rgba(255,255,255,.88),rgba(240,245,243,.74));box-shadow:var(--sy-shadow-2),inset 0 1px 0 #fff;overflow:hidden}
body[data-view="live"] .tiktok-pilot-head{display:flex;align-items:flex-start;justify-content:space-between;gap:18px}
body[data-view="live"] .tiktok-pilot-head h2{margin:7px 0 5px;font-size:clamp(24px,3vw,38px);letter-spacing:-.04em}
body[data-view="live"] .tiktok-pilot-head p{max-width:720px;margin:0;color:var(--sy-muted);font-size:12px;line-height:1.55}
body[data-view="live"] .tiktok-pilot-actions{display:flex;align-items:center;gap:8px;flex:0 0 auto}
body[data-view="live"] .tiktok-state{padding:8px 10px;border-radius:999px;background:rgba(83,99,101,.08);color:var(--sy-muted);font-size:8px;font-weight:800;letter-spacing:.10em;white-space:nowrap}
body[data-view="live"] .tiktok-state[data-state="online"]{background:rgba(57,127,118,.13);color:#2f7169;box-shadow:0 0 0 4px rgba(57,127,118,.05)}
body[data-view="live"] .tiktok-state[data-state="error"]{background:rgba(217,80,104,.12);color:#a63c51}
body[data-view="live"] .tiktok-truth{margin:16px 0;padding:12px 14px;border-radius:17px;background:rgba(31,39,41,.88);color:rgba(255,255,255,.76);font-size:11px;line-height:1.55}
body[data-view="live"] .tiktok-truth b{color:#fff}
body[data-view="live"] .tiktok-pilot-grid{display:grid;grid-template-columns:minmax(0,1.15fr) minmax(260px,.85fr);gap:12px}
body[data-view="live"] :is(.tiktok-connect-card,.tiktok-control-card,.tiktok-journal){padding:15px;border:1px solid rgba(255,255,255,.9);border-radius:21px;background:rgba(255,255,255,.60);box-shadow:inset 0 1px 0 #fff}
body[data-view="live"] :is(.tiktok-connect-card,.tiktok-control-card){display:grid;gap:10px}
body[data-view="live"] :is(.tiktok-connect-card,.tiktok-control-card) label{display:grid;gap:5px;color:var(--sy-muted);font-size:9px;font-weight:750;letter-spacing:.07em;text-transform:uppercase}
body[data-view="live"] :is(.tiktok-connect-card,.tiktok-control-card) :is(input,select){min-height:42px;padding:0 12px;text-transform:none;letter-spacing:0;font-size:11px}
body[data-view="live"] .tiktok-journal{margin-top:12px}
body[data-view="live"] .tiktok-journal>.row{align-items:flex-start;justify-content:space-between}
body[data-view="live"] .tiktok-journal h3{margin:5px 0 0}
body[data-view="live"] #tiktokEventJournal{display:grid;gap:7px;max-height:330px;margin-top:12px;overflow:auto}
body[data-view="live"] .tiktok-event{display:grid;grid-template-columns:auto minmax(0,1fr) auto;align-items:center;gap:9px;padding:9px 10px;border-radius:15px;background:rgba(255,255,255,.68);border:1px solid rgba(255,255,255,.92)}
body[data-view="live"] .tiktok-event p{margin:0;min-width:0;overflow-wrap:anywhere;color:var(--sy-ink);font-size:11px;line-height:1.45}
body[data-view="live"] .tiktok-event-sylora{background:linear-gradient(145deg,rgba(234,243,241,.9),rgba(255,255,255,.68))}
body[data-view="live"] .tiktok-event-error{background:rgba(217,80,104,.08)}
body[data-view="live"] .tiktok-owner-pilot.is-collapsed .tiktok-pilot-body{display:none}
body[data-view="live"] .tiktok-simulator{padding-top:9px;border-top:1px solid var(--sy-line)}
@media(max-width:760px){body[data-view="live"] .tiktok-owner-pilot{padding:15px;border-radius:23px}body[data-view="live"] .tiktok-pilot-head{display:grid}body[data-view="live"] .tiktok-pilot-actions{justify-content:space-between}body[data-view="live"] .tiktok-pilot-grid{grid-template-columns:1fr}body[data-view="live"] .tiktok-event{grid-template-columns:auto minmax(0,1fr)}body[data-view="live"] .tiktok-event button{grid-column:2;justify-self:start}}
