/* 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; }
