/* Kiosk chrome refresh (loaded after kiosk.css): identity card, clock, glass dock with labelled icons, CTA halo.
   Units are 1080×1920 design pixels – the .tv frame is scaled to the screen. */
.tv { font-family: 'Montserrat', 'Inter', sans-serif; }
.ic { flex: none; }

/* Character placeholder (shown only when media is missing) */
#char-placeholder { opacity: 1; font-size: 0; }
.ph-ring { width: 300px; height: 300px; border-radius: 50%; display: grid; place-items: center; position: relative;
  background: radial-gradient(circle at 30% 25%, rgba(232,200,114,.18), rgba(163,29,29,.12) 55%, transparent 72%);
  box-shadow: 0 0 0 1px rgba(232,200,114,.25) inset, 0 0 120px rgba(163,29,29,.25); animation: ph-breathe 5s ease-in-out infinite; }
.ph-ring::after { content: ''; position: absolute; inset: -28px; border-radius: 50%; border: 1px dashed rgba(232,200,114,.22); animation: ph-spin 40s linear infinite; }
.ph-mono { font: 700 120px/1 'Playfair Display', serif; background: linear-gradient(160deg, #F5E0A3, #B89332); -webkit-background-clip: text; background-clip: text; color: transparent; }
@keyframes ph-breathe { 50% { transform: scale(1.04); } }
@keyframes ph-spin { to { transform: rotate(360deg); } }

/* Top bar */
.top-scrim { position: absolute; inset: 0 0 auto 0; height: 300px; z-index: 9; pointer-events: none; background: linear-gradient(180deg, rgba(0,0,0,.62), rgba(0,0,0,.25) 55%, transparent); }
.top-bar { padding: 42px 44px; align-items: flex-start; }
.top-bar__left { gap: 12px; }
.top-bar__right { display: flex; flex-direction: column; align-items: flex-end; gap: 14px; pointer-events: auto; }
.id-card { display: flex; align-items: center; gap: 18px; }
.id-mono { width: 66px; height: 66px; border-radius: 19px; display: grid; place-items: center; font: 700 26px 'Playfair Display', serif; color: #fff;
  background: linear-gradient(145deg, var(--brand, #A31D1D), var(--brand-deep, #680E0E)); box-shadow: 0 0 0 2px rgba(232,200,114,.45) inset, 0 12px 30px rgba(0,0,0,.45); }
.id-text { display: flex; flex-direction: column; gap: 4px; }
#char-name { font: 700 40px/1.1 'Playfair Display', serif; color: #FDFBF7; letter-spacing: .01em; text-shadow: 0 2px 16px rgba(0,0,0,.6); }
#char-role { font-size: 20px; font-weight: 500; color: rgba(245,224,163,.9); letter-spacing: .02em; text-shadow: 0 1px 8px rgba(0,0,0,.6); }
#char-role:empty { display: none; }
.status-row { align-self: flex-start; gap: 10px; padding: 7px 16px 7px 13px; border-radius: 999px; background: rgba(12,12,16,.55); border: 1px solid rgba(255,255,255,.1); backdrop-filter: blur(12px); -webkit-backdrop-filter: blur(12px); }
#status-dot { width: 12px; height: 12px; background: #8a8f98; }
#status-text { font-size: 17px; font-weight: 600; letter-spacing: .12em; color: rgba(253,251,247,.85); }
.clock { text-align: right; text-shadow: 0 2px 12px rgba(0,0,0,.6); }
.clock b { display: block; font: 600 52px/1 'Montserrat', sans-serif; color: #FDFBF7; font-variant-numeric: tabular-nums; letter-spacing: .02em; }
.clock span { display: block; margin-top: 6px; font-size: 19px; color: rgba(253,251,247,.72); }
#config-select { background: rgba(12,12,16,.7); border: 1px solid rgba(232,200,114,.3); color: #FDFBF7; border-radius: 12px; font-size: 16px; padding: 8px 12px; }

/* Call to action */
.cta { display: inline-flex; align-items: center; gap: 22px; bottom: 360px; padding: 24px 46px 24px 30px; border-radius: 999px; color: #2a1f08;
  background: linear-gradient(135deg, #F7E3A6, #E8C872 45%, #B89332); box-shadow: 0 18px 50px rgba(0,0,0,.45), 0 0 0 1px rgba(255,255,255,.35) inset; text-align: left; }
.cta .ic { width: 64px; height: 64px; padding: 14px; border-radius: 50%; background: rgba(42,31,8,.12); }
.cta-text b { display: block; font: 700 36px/1.15 'Playfair Display', serif; }
.cta-text small { display: block; margin-top: 4px; font: 500 18px 'Montserrat', sans-serif; color: rgba(42,31,8,.72); }
.cta-halo { position: absolute; inset: -14px; border-radius: 999px; border: 2px solid rgba(232,200,114,.55); animation: cta-halo 2.4s ease-out infinite; pointer-events: none; }
@keyframes cta-halo { from { opacity: .9; transform: scale(.96); } to { opacity: 0; transform: scale(1.12); } }

/* Bottom dock */
.bottom-panel { padding: 0 44px 56px; }
.bottom-panel::before { content: ''; position: absolute; inset: auto 0 0 0; height: 420px; z-index: -1; pointer-events: none; background: linear-gradient(0deg, rgba(0,0,0,.7), transparent); }
.ctrl-row { gap: 14px; margin: 0 auto; padding: 16px 18px; width: fit-content; border-radius: 34px; background: rgba(12,12,16,.55); border: 1px solid rgba(255,255,255,.1);
  backdrop-filter: blur(18px); -webkit-backdrop-filter: blur(18px); box-shadow: 0 20px 50px rgba(0,0,0,.45); }
.ctrl-btn { width: 108px; height: 104px; border-radius: 24px; flex-direction: column; gap: 8px; background: transparent; border: 1px solid transparent; color: rgba(253,251,247,.88); }
.ctrl-btn:hover { transform: none; background: rgba(255,255,255,.06); }
.ctrl-btn.active { background: rgba(232,200,114,.14); border-color: rgba(232,200,114,.55); color: #F5E0A3; box-shadow: none; }
.ctrl-btn.off { text-decoration: none; opacity: .4; }
.ctrl-label { font: 600 15px 'Montserrat', sans-serif; letter-spacing: .02em; }
.ctrl-btn--connect, .ctrl-btn--end { height: 104px; padding: 0 40px; border-radius: 24px; gap: 14px; align-items: center; white-space: nowrap; font: 700 26px 'Montserrat', sans-serif; margin-left: 6px; }
.ctrl-btn--connect { display: flex; background: linear-gradient(135deg, var(--brand, #B42323), color-mix(in srgb, var(--brand, #B42323) 55%, #000)); box-shadow: 0 10px 30px rgba(163,29,29,.45), 0 0 0 1px rgba(232,200,114,.35) inset; }
.ctrl-btn--end { background: rgba(242,89,79,.14); color: #ffb3ad; box-shadow: 0 0 0 1px rgba(242,89,79,.55) inset; }
.text-row { width: 860px; margin: 0 auto 18px; padding: 10px; border-radius: 999px; background: rgba(12,12,16,.6); border: 1px solid rgba(232,200,114,.28); backdrop-filter: blur(16px); -webkit-backdrop-filter: blur(16px); }
#text-input { height: 72px; border: 0; background: transparent; font: 500 24px 'Montserrat', sans-serif; padding: 0 22px; backdrop-filter: none; }
#btn-send { width: 72px; height: 72px; background: linear-gradient(135deg, #F7E3A6, #B89332); color: #2a1f08; }

/* Subtitles & transcript */
body.chat-open .bottom-panel, .tv:has(.transcript-panel.open) .bottom-panel { z-index: 25; }
.subtitle { bottom: 330px; left: 70px; right: 70px; }
.subtitle__text { background: rgba(12,12,16,.62); border-color: rgba(232,200,114,.22); font: 500 30px/1.45 'Montserrat', sans-serif; padding: 22px 40px; border-radius: 26px; }
.transcript-panel { height: 760px; background: rgba(12,12,16,.9); border-top: 1px solid rgba(232,200,114,.28); padding: 22px 48px 300px; }
.transcript-panel__title { font: 700 30px 'Playfair Display', serif; color: #E8C872; }
.t-entry { max-width: 86%; }
.t-entry--user { align-self: flex-end; }
.t-entry__body { border-radius: 22px 22px 22px 6px; padding: 18px 24px; background: rgba(255,255,255,.06); }
.t-entry--user .t-entry__body { border-radius: 22px 22px 6px 22px; background: rgba(232,200,114,.12); }
.t-entry__name { font-size: 15px; font-weight: 600; letter-spacing: .04em; color: rgba(245,224,163,.75); }
.t-entry__text { font-size: 24px; }

/* Banner, ticker, preview-only tools */
.banner { top: 250px; font-size: 22px; font-weight: 500; border-radius: 20px; box-shadow: 0 16px 40px rgba(0,0,0,.4); }
.debug-toggle { top: auto; bottom: 16px; left: 16px; right: auto; width: 40px; height: 40px; padding: 0; display: grid; place-items: center; border-radius: 12px; background: rgba(12,12,16,.7); border-color: rgba(255,255,255,.12); color: #A3A8B0; opacity: .7; }
.debug-toggle:hover { opacity: 1; }

/* Studio live preview (iframe, ?embed=1): only the character, top bar and widgets */
body.embed .bottom-panel, body.embed .cta, body.embed .debug-toggle, body.embed .control-toggle, body.embed .control-drawer, body.embed #config-select, body.embed .transcript-panel, body.embed .debug-panel { display: none !important; }
body.embed .tv { box-shadow: none; }

/* Landscape 16:9 (TV / livestream characters): same chrome, wider frame, transcript as a side sheet */
body.landscape .tv { width: 1920px; height: 1080px; }
body.landscape .top-scrim { height: 240px; }
body.landscape .cta { bottom: 250px; }
body.landscape .subtitle { bottom: 240px; left: 360px; right: 360px; }
body.landscape .lc-ticker { bottom: 200px; }
body.landscape .transcript-panel { left: auto; right: 0; width: 760px; height: 100%; border-radius: 30px 0 0 30px; border-top: 0; border-left: 1px solid rgba(232,200,114,.28); transform: translateX(100%); padding: 40px 40px 260px; }
body.landscape .transcript-panel.open { transform: translateX(0); }
body.landscape .transcript-panel__handle { display: none; }
.brand-logo { height: 44px; max-width: 180px; object-fit: contain; margin-right: 14px; }
.brand-logo[hidden] { display: none; }
/* /play on a portrait phone, 16:9 character (kiosk-ui.js scaleTv): only the centre half of the stage is visible */
html.portrait-fit, body.portrait-fit { background: #000; overflow: hidden; max-width: 100vw; }
body.landscape.portrait-fit .subtitle { left: 500px; right: 500px; }
body.landscape.portrait-fit .top-scrim { height: 160px; }
body.landscape.portrait-fit .top-bar { padding-left: 500px; padding-right: 500px; }
/* /play on a portrait phone (13/10): the bands around the 16:9 stage carry a way back and an invite */
.play-band { display: none; }
body.portrait-fit .play-band { display: block; position: fixed; left: 0; right: 0; z-index: 50; margin: 0; text-align: center; font: 500 13.5px Inter, system-ui, sans-serif; color: rgba(244, 244, 246, 0.78); letter-spacing: .01em; }
body.portrait-fit .play-band.top { top: max(14px, env(safe-area-inset-top)); left: 16px; right: auto; padding: 10px 18px; min-height: 40px; border-radius: 999px; border: 1px solid rgba(212, 185, 130, 0.35); color: #F4F4F6; text-decoration: none; background: rgba(17, 17, 20, 0.78); backdrop-filter: blur(12px); -webkit-backdrop-filter: blur(12px); box-shadow: 0 10px 28px rgba(0, 0, 0, 0.45); }
body.portrait-fit .play-band.bottom { bottom: max(22px, env(safe-area-inset-bottom)); padding: 0 24px; color: #D4B982; }
html.portrait-fit, body.portrait-fit { background: radial-gradient(120% 45% at 50% 0%, rgba(212, 185, 130, 0.16), transparent 70%), radial-gradient(120% 45% at 50% 100%, rgba(200, 169, 126, 0.12), transparent 70%), #0A0A0C; }

/* Live Character Holographic Stage FX, Pose Camera Micro-Motion & Quick Chips */
.char-bg { overflow: hidden; }
.char-bg video, .char-bg #char-img { transition: opacity 0.22s ease-out, transform 1.8s cubic-bezier(.22, 1, .36, 1), filter 1.2s ease; transform-origin: 50% 32%; }
.char-bg[data-pose="idle"] video { animation: charCamIdle 7s ease-in-out infinite; filter: contrast(1.03) saturate(1.05); }
.char-bg[data-pose="listening"] video { transform: scale(1.034) translateY(-0.8%); filter: contrast(1.05) saturate(1.08) brightness(1.03); }
.char-bg[data-pose="thinking"] video { transform: scale(1.024) translateY(-0.4%); filter: contrast(1.06) saturate(1.04); }
.char-bg[data-pose="talking"] video, .char-bg[data-pose="excited"] video, .char-bg[data-pose="present"] video { transform: scale(1.022); filter: contrast(1.05) saturate(1.1) brightness(1.02); }
@keyframes charCamIdle { 0%, 100% { transform: scale(1.006) translateY(0); } 50% { transform: scale(1.018) translateY(-0.4%); } }

.char-stage-fx { position: absolute; inset: 0; z-index: 4; pointer-events: none; overflow: hidden; }
.char-fx-aura { position: absolute; inset: 0; opacity: .65; transition: background .7s ease, opacity .5s ease;
  background: radial-gradient(60% 42% at 50% 28%, rgba(212, 175, 55, .14), transparent 72%), radial-gradient(80% 32% at 50% 94%, rgba(27, 42, 74, .45), transparent 75%); }
.char-bg[data-pose="listening"] .char-fx-aura { opacity: .88;
  background: radial-gradient(58% 42% at 50% 28%, rgba(56, 189, 248, .22), transparent 72%), radial-gradient(75% 32% at 50% 92%, rgba(16, 185, 129, .26), transparent 75%); }
.char-bg[data-pose="thinking"] .char-fx-aura { opacity: .9;
  background: radial-gradient(60% 45% at 50% 30%, rgba(129, 140, 248, .24), rgba(212, 175, 55, .14) 45%, transparent 74%); }
.char-bg[data-pose="talking"] .char-fx-aura, .char-bg[data-pose="excited"] .char-fx-aura, .char-bg[data-pose="present"] .char-fx-aura { opacity: .92;
  background: radial-gradient(64% 46% at 50% 28%, rgba(232, 200, 114, .25), transparent 72%), radial-gradient(85% 34% at 50% 92%, rgba(212, 175, 55, .28), transparent 76%); }

.char-fx-particles i { position: absolute; width: 6px; height: 6px; border-radius: 50%; background: radial-gradient(circle, #F7E3A6 0%, rgba(212,175,55,0) 75%); opacity: .45; animation: charMote 9s ease-in-out infinite; }
.char-fx-particles i:nth-child(1) { left: 14%; top: 68%; animation-delay: 0s; }
.char-fx-particles i:nth-child(2) { left: 84%; top: 62%; width: 8px; height: 8px; animation-delay: 1.4s; }
.char-fx-particles i:nth-child(3) { left: 22%; top: 36%; animation-delay: 2.8s; }
.char-fx-particles i:nth-child(4) { left: 78%; top: 32%; width: 7px; height: 7px; animation-delay: 4.1s; }
.char-fx-particles i:nth-child(5) { left: 10%; top: 48%; animation-delay: 5.3s; }
.char-fx-particles i:nth-child(6) { left: 88%; top: 46%; animation-delay: 6.7s; }
@keyframes charMote { 0%, 100% { transform: translate3d(0, 0, 0) scale(.9); opacity: .25; } 50% { transform: translate3d(8px, -28px, 0) scale(1.35); opacity: .75; } }

.char-fx-hud { position: absolute; top: 186px; left: 44px; display: inline-flex; align-items: center; gap: 14px; padding: 10px 20px; border-radius: 999px;
  background: rgba(11, 18, 32, .68); border: 1px solid rgba(232, 200, 114, .35); backdrop-filter: blur(14px); -webkit-backdrop-filter: blur(14px); box-shadow: 0 12px 32px rgba(0,0,0,.38); }
.char-fx-eq { display: inline-flex; align-items: center; gap: 4px; height: 22px; }
.char-fx-eq b { display: block; width: 4px; height: 8px; border-radius: 99px; background: #E8C872; opacity: .65; transition: height .2s ease; }
.char-bg[data-pose="talking"] .char-fx-eq b, .char-bg[data-pose="excited"] .char-fx-eq b, .char-bg[data-pose="listening"] .char-fx-eq b { animation: charEq .55s ease-in-out infinite alternate; opacity: 1; }
.char-bg[data-pose="listening"] .char-fx-eq b { background: #38BDF8; }
.char-fx-eq b:nth-child(2) { animation-delay: .08s; } .char-fx-eq b:nth-child(3) { animation-delay: .16s; } .char-fx-eq b:nth-child(4) { animation-delay: .24s; }
.char-fx-eq b:nth-child(5) { animation-delay: .12s; } .char-fx-eq b:nth-child(6) { animation-delay: .2s; } .char-fx-eq b:nth-child(7) { animation-delay: .04s; }
@keyframes charEq { 0% { height: 6px; } 100% { height: 22px; } }
.char-fx-state { font: 700 15px/1 'Montserrat', sans-serif; letter-spacing: .08em; color: #F7E3A6; }
.char-fx-cache { font: 600 13px/1 'JetBrains Mono', monospace; padding: 5px 10px; border-radius: 999px; background: rgba(255,255,255,.08); color: rgba(253,251,247,.82); }
.char-fx-cache.is-ready { background: rgba(16, 185, 129, .2); color: #6EE7B7; border: 1px solid rgba(16, 185, 129, .4); }

.char-quick-chips { position: absolute; left: 44px; right: 44px; bottom: 230px; z-index: 12; display: flex; flex-wrap: wrap; justify-content: center; gap: 12px; pointer-events: auto; }
.char-chip { appearance: none; cursor: pointer; padding: 13px 22px; border-radius: 999px; font: 600 18px/1.2 'Montserrat', sans-serif; color: #FDFBF7;
  background: rgba(11, 18, 32, .74); border: 1px solid rgba(232, 200, 114, .42); backdrop-filter: blur(14px); -webkit-backdrop-filter: blur(14px);
  box-shadow: 0 10px 26px rgba(0,0,0,.42); transition: transform .18s ease, background .18s ease, border-color .18s ease; }
.char-chip:hover, .char-chip:active { transform: translateY(-2px) scale(1.02); background: rgba(212, 175, 55, .24); border-color: #F7E3A6; color: #FFF; }
.char-chip.is-gesture { border-color: rgba(56, 189, 248, .45); color: #BAE6FD; }
body.stage .char-quick-chips, body.embed .char-quick-chips, body.embed .char-fx-hud { display: none !important; }
body.landscape .char-fx-hud { top: 150px; left: 44px; }
body.landscape .char-quick-chips { bottom: 175px; left: 180px; right: 180px; }

