/* CF media — tema v0.4 (paletas em brand.js). Unidades em px do palco 1280x720. */
* { box-sizing: border-box; margin: 0; padding: 0; }

:root {
  --bg: #131b29; --bg2: #0e1420; --surface: #1e293b; --surface2: #273449; --line: #334259;
  --fg: #fffbeb; --dim: #b4b9c4; --accent: #c2410c; --accent2: #fb923c; --accentFg: #fffbeb; --danger: #f87171;
  --ease: cubic-bezier(.2,.8,.2,1);
  --r: 18px;
}

html, body {
  width: 100%; height: 100%; overflow: hidden;
  background: var(--bg2); color: var(--fg);
  font-family: Nunito, "Segoe UI", Roboto, Arial, sans-serif;
  -webkit-font-smoothing: antialiased;
  -webkit-user-select: none; user-select: none;
}
button { font: inherit; color: inherit; background: none; border: 0; cursor: pointer; outline: none; }
[hidden] { display: none !important; }

.stage {
  position: absolute; left: 0; top: 0; width: 1280px; height: 720px; overflow: hidden;
  transform-origin: 0 0;
  background: linear-gradient(160deg, var(--bg) 0%, var(--bg2) 100%);
}
.glow { position: absolute; border-radius: 50%; pointer-events: none; filter: blur(10px); }
.glow-a { width: 760px; height: 760px; right: -260px; top: -320px; background: radial-gradient(circle, var(--accent) 0%, transparent 62%); opacity: .22; }
.glow-b { width: 620px; height: 620px; left: -260px; bottom: -330px; background: radial-gradient(circle, var(--accent2) 0%, transparent 62%); opacity: .12; }
.scr { position: absolute; inset: 0; }
.full { position: fixed; inset: 0; z-index: 100; background: #000; }
.full iframe, .full video { width: 100%; height: 100%; border: 0; display: block; background: #000; }

.mi {
  font-family: 'Material Icons Round'; font-weight: normal; font-style: normal;
  font-size: 26px; line-height: 1; letter-spacing: normal; text-transform: none;
  display: inline-block; white-space: nowrap; direction: ltr;
  -webkit-font-feature-settings: 'liga'; font-feature-settings: 'liga';
}

/* ---------- logo ---------- */
.logo { display: flex; align-items: center; gap: 14px; }
.mark {
  width: 52px; height: 52px; display: grid; place-items: center; flex: none;
  border-radius: 16px; font-weight: 800; font-size: 21px; letter-spacing: -.03em;
  color: var(--accentFg); background: linear-gradient(140deg, var(--accent2), var(--accent));
  box-shadow: 0 10px 30px -8px var(--accent);
}
.mark img { width: 100%; height: 100%; object-fit: contain; border-radius: inherit; }
.logo-name { font-size: 26px; font-weight: 800; letter-spacing: .01em; }
.corner-logo { position: absolute; right: 56px; top: 34px; height: 64px; width: auto; opacity: .95; }
.logo-full { height: 168px; width: auto; display: block; margin: 0 0 18px -6px; filter: drop-shadow(0 18px 40px rgba(194,65,12,.28)); }
.mark:has(img) { background: none; box-shadow: none; }
.splash-icon img.splash-brand { width: 76%; height: 76%; object-fit: contain; margin-left: 6%; }

/* ---------- botões + foco ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 12px;
  height: 62px; padding: 0 34px; border-radius: 999px;
  font-size: 21px; font-weight: 700;
  background: var(--surface); color: var(--fg); border: 2px solid transparent;
  transition: transform .16s var(--ease), background .16s, color .16s, box-shadow .16s, border-color .16s;
}
.btn-primary { background: var(--surface2); }
.btn-ghost { background: transparent; border-color: var(--line); }
.btn-link { background: transparent; color: var(--dim); height: 50px; padding: 0 22px; font-size: 18px; }
.btn-sm { height: 52px; font-size: 18px; padding: 0 26px; }
.btn-hero { height: 84px; padding: 0 30px 0 40px; font-size: 26px; gap: 16px; background: var(--surface2); }
.btn-hero .mi { font-size: 32px; }
.btn-hero .btn-arrow { margin-left: 8px; width: 46px; height: 46px; border-radius: 50%; display: grid; place-items: center; background: rgba(255,255,255,.08); font-size: 28px; }

.f.is-focus, .btn:hover {
  background: var(--accent); color: var(--accentFg); border-color: var(--accent);
  box-shadow: 0 0 0 4px rgba(0,0,0,0), 0 0 0 3px var(--accent2), 0 14px 40px -10px var(--accent);
  transform: scale(1.05);
}
.btn-hero.is-focus .btn-arrow { background: var(--accent2); color: var(--bg2); }

/* ---------- boas-vindas ---------- */
.welcome { position: absolute; inset: 0; display: flex; align-items: center; justify-content: space-between; padding: 0 96px 0 104px; }
.welcome-main { display: flex; flex-direction: column; align-items: flex-start; gap: 22px; width: 600px; }
.welcome-title { font-size: 46px; line-height: 1.08; font-weight: 800; margin-top: 4px; letter-spacing: -.01em; }
.welcome-sub { font-size: 22px; color: var(--dim); line-height: 1.45; max-width: 540px; margin-bottom: 10px; }
.welcome-sub b { color: var(--accent2); font-weight: 700; }
.steps {
  list-style: none; width: 420px; padding: 30px 30px; border-radius: 26px;
  background: linear-gradient(180deg, rgba(255,255,255,.05), rgba(255,255,255,.02));
  border: 1px solid var(--line); display: flex; flex-direction: column; gap: 26px;
}
.steps li { display: flex; gap: 18px; align-items: center; }
.step-n {
  width: 50px; height: 50px; flex: none; border-radius: 50%; display: grid; place-items: center;
  font-weight: 800; font-size: 22px; color: var(--accent2); background: var(--surface); border: 2px solid var(--accent2);
}
.steps li:last-child .step-n { background: var(--accent2); color: var(--bg2); }
.steps b { display: block; font-size: 20px; font-weight: 800; }
.steps span { font-size: 16px; color: var(--dim); }
.steps i { font-style: normal; color: var(--fg); }

/* ---------- títulos ---------- */
.scr-title { font-size: 32px; font-weight: 800; display: flex; align-items: center; gap: 14px; }
.head-icon {
  width: 52px; height: 52px; border-radius: 16px; display: grid; place-items: center; font-size: 28px;
  background: var(--surface); color: var(--accent2);
}
.hint { font-size: 17px; color: var(--dim); min-height: 24px; margin-top: 4px; }
.hint.is-error { color: var(--danger); font-weight: 700; }
.row-btns { display: flex; gap: 18px; margin-top: 34px; }

/* ---------- teclado do código ---------- */
.setup { position: absolute; left: 96px; right: 96px; top: 40px; }
.setup-head { display: flex; align-items: center; gap: 18px; margin-bottom: 20px; }
.setup-head .scr-title { display: block; }
.code-field {
  height: 80px; border-radius: 22px; padding: 0 28px; margin-bottom: 20px;
  background: var(--bg2); border: 2px solid var(--accent2);
  box-shadow: 0 0 0 6px rgba(255,255,255,.03), inset 0 2px 10px rgba(0,0,0,.35);
  display: flex; align-items: center; font-size: 32px; font-weight: 700;
}
.code-prefix {
  display: inline-flex; align-items: center; gap: 6px; margin-right: 14px;
  padding: 6px 14px 6px 10px; border-radius: 999px; font-size: 18px; font-weight: 700;
  background: var(--surface); color: var(--dim);
}
.code-prefix .mi { font-size: 20px; }
.code-prefix.is-secure { background: var(--accent); color: var(--accentFg); }
.code-text { white-space: pre; letter-spacing: .01em; }
.caret { width: 3px; height: 38px; border-radius: 2px; background: var(--accent2); margin-left: 4px; animation: blink 1s steps(1) infinite; }
@keyframes blink { 50% { opacity: 0; } }

.kbd-wrap { display: flex; gap: 18px; }
.kbd-card { flex: 1; padding: 16px; border-radius: 26px; background: rgba(255,255,255,.035); border: 1px solid var(--line); }
.kbd { display: grid; grid-template-columns: repeat(10, 1fr); gap: 8px; }
.key {
  height: 58px; border-radius: 14px; font-size: 24px; font-weight: 700;
  background: var(--surface); color: var(--fg);
  display: grid; place-items: center;
  transition: transform .12s var(--ease), background .12s, color .12s, box-shadow .12s;
}
.key.num { color: var(--accent2); }
.key.f.is-focus { transform: scale(1.1); z-index: 1; }
.chips { display: flex; gap: 8px; margin-top: 12px; }
.chip { flex: 1; height: 46px; border-radius: 999px; font-size: 18px; font-weight: 700; background: transparent; border: 2px solid var(--line); color: var(--dim); transition: transform .12s var(--ease); }
.kbd-side { width: 250px; display: flex; flex-direction: column; gap: 10px; }
.side-key {
  height: 62px; border-radius: 18px; padding: 0 20px; display: flex; align-items: center; gap: 12px;
  font-size: 19px; font-weight: 700; background: var(--surface); text-align: left;
  transition: transform .12s var(--ease), background .12s, color .12s;
}
.side-key .mi { font-size: 26px; color: var(--accent2); }
.side-key.is-focus .mi { color: var(--accentFg); }
.side-key .sub { margin-left: auto; font-size: 14px; padding: 3px 10px; border-radius: 999px; background: var(--bg2); color: var(--dim); }
.side-key.is-on .sub { background: var(--accent2); color: var(--bg2); }
.side-key.go { flex: 1; flex-direction: column; justify-content: center; gap: 6px; font-size: 22px; background: linear-gradient(160deg, var(--accent2), var(--accent)); color: var(--accentFg); text-align: center; }
.side-key.go .mi { color: var(--accentFg); font-size: 40px; }
.side-key.go.is-focus { box-shadow: 0 0 0 3px var(--fg), 0 16px 40px -10px var(--accent); }
.side-key.f.is-focus { transform: scale(1.04); }

/* ---------- confirmar ---------- */
.confirm-card {
  position: absolute; left: 50%; top: 50%; width: 900px; transform: translate(-50%, -50%);
  padding: 44px 48px; border-radius: 30px;
  background: linear-gradient(180deg, var(--surface), rgba(30,41,59,.6)); border: 1px solid var(--line);
  box-shadow: 0 40px 80px -30px rgba(0,0,0,.7);
}
.confirm { display: flex; gap: 36px; align-items: center; }
.confirm-icon {
  width: 190px; height: 190px; flex: none; border-radius: 28px; overflow: hidden;
  background: var(--bg2); display: grid; place-items: center; box-shadow: 0 0 0 3px var(--accent2);
}
.confirm-icon img { width: 100%; height: 100%; object-fit: contain; }
.confirm-icon .mi { font-size: 90px; color: var(--accent2); }
.confirm-ok { display: inline-flex; align-items: center; gap: 8px; font-size: 16px; font-weight: 800; color: var(--accent2); text-transform: uppercase; letter-spacing: .08em; margin-bottom: 6px; }
.confirm-name { font-size: 40px; font-weight: 800; margin-bottom: 18px; }
.kv { display: grid; grid-template-columns: 210px 1fr; row-gap: 10px; font-size: 19px; }
.kv dt { color: var(--dim); }
.kv dd { word-break: break-all; font-weight: 600; }

/* ---------- abertura ---------- */
.splash { position: absolute; inset: 0; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 22px; }
.splash-ring { padding: 10px; border-radius: 50%; background: conic-gradient(var(--accent2), var(--accent), var(--accent2)); box-shadow: 0 20px 60px -20px var(--accent); }
.splash-icon { width: 190px; height: 190px; border-radius: 50%; overflow: hidden; display: grid; place-items: center; background: var(--bg2); }
.splash-icon img { width: 100%; height: 100%; object-fit: contain; }
.splash-name { font-size: 36px; font-weight: 800; }
.bar { width: 340px; height: 8px; border-radius: 99px; background: var(--surface); overflow: hidden; }
.bar i { display: block; height: 100%; width: 0; border-radius: 99px; background: linear-gradient(90deg, var(--accent), var(--accent2)); transition: width linear; }
.splash .hint { margin-top: -6px; }

/* ---------- visualizador ---------- */
.view-bg { position: absolute; inset: 0; background-size: cover; background-position: center; }
.view-bg::after { content: ''; position: absolute; inset: 0; background: linear-gradient(180deg, rgba(14,20,32,.5), rgba(14,20,32,.85)); }
.view-head { position: absolute; left: 64px; right: 64px; top: 22px; height: 60px; display: flex; align-items: center; justify-content: space-between; }
.view-headline { font-size: 30px; font-weight: 800; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.view-logo { max-height: 52px; max-width: 220px; object-fit: contain; }
.view-menu {
  position: absolute; left: 32px; top: 100px; width: 268px; bottom: 40px; overflow: hidden;
  padding: 14px 12px; border-radius: 24px; background: rgba(255,255,255,.035); border: 1px solid var(--line);
}
.menu-item {
  display: flex; align-items: center; gap: 14px; width: 100%;
  height: 54px; padding: 0 16px; border-radius: 16px; margin-bottom: 6px;
  font-size: 19px; font-weight: 700; color: var(--dim); text-align: left;
  transition: background .12s, color .12s, transform .12s var(--ease);
}
.menu-item .mi { font-size: 24px; }
.menu-item.is-active { color: var(--fg); background: var(--surface); }
.menu-item.is-active .mi { color: var(--accent2); }
.menu-item.is-focus .mi { color: var(--accentFg); }
.menu-item.f.is-focus { transform: none; }
.menu-sep { height: 1px; background: var(--line); margin: 10px 8px; }
.menu-sep-label { font-size: 13px; font-weight: 800; text-transform: uppercase; letter-spacing: .12em; color: var(--accent2); padding: 6px 16px 10px; }
.view-body { position: absolute; left: 64px; right: 64px; top: 100px; bottom: 40px; overflow: hidden; }
.view-body.has-menu { left: 316px; }
.view-grid { position: relative; margin: 10px; transition: transform .24s var(--ease); }

.it {
  position: absolute; border-radius: var(--r); overflow: hidden; background: var(--surface);
  transition: transform .16s var(--ease), box-shadow .16s;
}
.it.f.is-focus { background: var(--surface); color: var(--fg); border-color: transparent; transform: scale(1.04); z-index: 2; box-shadow: 0 0 0 3px var(--accent2), 0 18px 40px -12px var(--accent); }
.it.c-glass { background: rgba(255,255,255,.07); }
.it.c-transparent, .it.c-space { background: transparent; }
.it.c-dark { background: rgba(0,0,0,.35); }
.it.c-white { background: var(--fg); color: var(--bg2); }
.it.is-disabled { opacity: .45; }
.it img.it-img { position: absolute; inset: 0; width: 100%; height: 100%; }
.it .it-icon { position: absolute; inset: 0; display: grid; place-items: center; }
.it .it-icon .mi { font-size: 46px; color: var(--accent2); }
.it.is-focus .it-icon .mi { color: var(--fg); }
.it .it-text { position: absolute; left: 14px; right: 14px; top: 50%; transform: translateY(-50%); text-align: center; }
.it .it-title { font-size: 20px; font-weight: 800; }
.it .it-label { font-size: 15px; color: var(--dim); margin-top: 4px; }
.it .it-head, .it .it-foot { position: absolute; left: 0; right: 0; padding: 10px 14px; font-size: 17px; font-weight: 700; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.it .it-head { top: 0; }
.it .it-foot { bottom: 0; background: linear-gradient(0deg, rgba(0,0,0,.75), rgba(0,0,0,0)); }
.it .it-badge { position: absolute; top: 10px; right: 10px; font-size: 12px; font-weight: 800; padding: 4px 10px; border-radius: 999px; background: var(--accent2); color: var(--bg2); }
.it .it-tag { position: absolute; top: 10px; left: 10px; font-size: 12px; font-weight: 700; padding: 4px 10px; border-radius: 999px; background: rgba(0,0,0,.55); }
.it .it-progress { position: absolute; left: 12px; right: 12px; bottom: 10px; height: 5px; border-radius: 99px; background: rgba(255,255,255,.15); overflow: hidden; }
.it .it-progress i { display: block; height: 100%; background: var(--accent2); }

/* ---------- configurações ---------- */
.settings-wrap { position: absolute; left: 50%; top: 50px; width: 920px; transform: translateX(-50%); }
.settings-wrap .scr-title { margin-bottom: 24px; }
.settings { display: flex; flex-direction: column; gap: 12px; }
.set-row {
  display: flex; align-items: center; gap: 18px; width: 100%;
  height: 76px; padding: 0 22px 0 14px; border-radius: 22px; background: var(--surface); text-align: left;
  transition: transform .14s var(--ease), background .14s, color .14s, box-shadow .14s;
}
.set-row .mi { width: 50px; height: 50px; border-radius: 15px; display: grid; place-items: center; font-size: 26px; color: var(--accent2); background: var(--bg2); }
.set-row.is-focus .mi { color: var(--accentFg); background: rgba(255,255,255,.14); }
.set-row .set-label { flex: 1; font-size: 21px; font-weight: 700; }
.set-row .set-value { font-size: 17px; font-weight: 700; color: var(--dim); max-width: 460px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; padding: 6px 14px; border-radius: 999px; background: var(--bg2); }
.set-row.is-focus .set-value { color: var(--accentFg); background: rgba(0,0,0,.18); }
.set-row.f.is-focus { transform: scale(1.02); }
.set-about { margin-top: 16px; font-size: 15px; color: var(--dim); text-align: center; }

/* ---------- carregando / avisos ---------- */
.loading { position: absolute; inset: 0; z-index: 50; background: rgba(14,20,32,.78); display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 22px; font-size: 22px; font-weight: 700; color: var(--dim); }
.spinner { width: 58px; height: 58px; border-radius: 50%; border: 6px solid var(--surface2); border-top-color: var(--accent2); animation: spin .9s linear infinite; }
@keyframes spin { to { transform: rotate(360deg); } }
.toast {
  position: absolute; left: 50%; bottom: 40px; transform: translateX(-50%); z-index: 60;
  max-width: 900px; padding: 16px 26px; border-radius: 999px; font-size: 18px; font-weight: 700;
  background: var(--surface2); box-shadow: 0 0 0 2px var(--accent2), 0 14px 40px rgba(0,0,0,.6);
}
.toast.is-error { box-shadow: 0 0 0 2px var(--danger), 0 14px 40px rgba(0,0,0,.6); }

/* =====================================================================
   v0.5 — escolha de aparelho, ⚙ do visualizador, campo de código real
   ===================================================================== */
.device { position: absolute; inset: 0; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 18px; text-align: center; padding: 0 60px; }
.device-logo { height: 96px; width: auto; margin-bottom: 6px; }
.device-title { font-size: 40px; font-weight: 800; }
.device-sub { font-size: 20px; color: var(--dim); margin-bottom: 18px; }
.device-opts { display: flex; gap: 26px; }
.dev-card {
  width: 330px; height: 230px; border-radius: 28px; background: var(--surface); border: 2px solid var(--line);
  display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 10px;
  transition: transform .16s var(--ease), background .16s, box-shadow .16s;
}
.dev-card .mi { font-size: 76px; color: var(--accent2); }
.dev-card b { font-size: 23px; font-weight: 800; }
.dev-card span:last-child { font-size: 16px; color: var(--dim); }
.dev-card.is-focus .mi, .dev-card.is-focus span:last-child { color: var(--accentFg); }

.view-gear {
  width: 52px; height: 52px; border-radius: 16px; display: grid; place-items: center; margin-left: 16px; flex: none;
  background: rgba(255,255,255,.06); color: var(--fg); transition: transform .14s var(--ease), background .14s;
}
.view-gear .mi { font-size: 26px; }
.view-head { gap: 12px; }
.view-headline { flex: 1; }
.head-back { border: 0; cursor: pointer; }
.code-input { display: none; }

/* =====================================================================
   CELULAR EM PÉ (html.fluid): layout fluido de verdade, sem palco escalado
   ===================================================================== */
html.fluid, html.fluid body { overflow: hidden; }
html.fluid .stage { background: linear-gradient(170deg, var(--bg) 0%, var(--bg2) 100%); }
html.fluid .glow-a { width: 520px; height: 520px; right: -260px; top: -260px; }
html.fluid .glow-b { width: 420px; height: 420px; left: -220px; bottom: -220px; }
html.fluid .scr {
  overflow-y: auto; -webkit-overflow-scrolling: touch;
  padding: calc(env(safe-area-inset-top, 0px) + 18px) 20px calc(env(safe-area-inset-bottom, 0px) + 24px);
}
html.fluid .corner-logo { position: static; display: block; height: 40px; margin: 2px 0 18px; }
html.fluid .f.is-focus, html.fluid .btn:hover { transform: none; }
html.fluid .btn { height: 56px; font-size: 18px; padding: 0 22px; }

/* escolha de aparelho */
html.fluid .device { position: static; min-height: 100%; padding: 10px 4px; gap: 12px; }
html.fluid .device-logo { height: 72px; }
html.fluid .device-title { font-size: 26px; line-height: 1.2; }
html.fluid .device-sub { font-size: 15px; margin-bottom: 8px; }
html.fluid .device-opts { flex-direction: column; gap: 14px; width: 100%; }
html.fluid .dev-card { width: 100%; height: 132px; border-radius: 22px; }
html.fluid .dev-card .mi { font-size: 48px; }
html.fluid .dev-card b { font-size: 19px; }

/* boas-vindas */
html.fluid .welcome { position: static; min-height: 100%; flex-direction: column; justify-content: center; padding: 8px 4px; gap: 26px; }
html.fluid .welcome-main { width: 100%; align-items: center; text-align: center; gap: 14px; }
html.fluid .logo-full { height: 132px; margin: 0 0 6px; }
html.fluid .welcome-title { font-size: 28px; margin: 0; }
html.fluid .welcome-sub { font-size: 16px; margin: 0; }
html.fluid .btn-hero { width: 100%; height: 64px; font-size: 18px; padding: 0 12px 0 20px; gap: 10px; }
html.fluid .btn-hero .mi { font-size: 24px; }
html.fluid .btn-hero .btn-arrow { width: 38px; height: 38px; font-size: 22px; margin-left: auto; }
html.fluid .btn-link { height: 44px; font-size: 16px; }
html.fluid .steps { width: 100%; padding: 20px 18px; gap: 18px; border-radius: 22px; }
html.fluid .step-n { width: 40px; height: 40px; font-size: 18px; }
html.fluid .steps b { font-size: 16px; }
html.fluid .steps span { font-size: 14px; }

/* código de conexão: teclado do próprio celular */
html.fluid .setup { position: static; }
html.fluid .setup-head { gap: 12px; margin-bottom: 16px; }
html.fluid .head-icon { width: 44px; height: 44px; border-radius: 14px; font-size: 24px; flex: none; }
html.fluid .scr-title { font-size: 22px; line-height: 1.2; }
html.fluid .hint { font-size: 14px; }
html.fluid .code-field { height: auto; min-height: 64px; padding: 8px 10px 8px 12px; border-radius: 18px; font-size: 20px; flex-wrap: nowrap; margin-bottom: 14px; }
html.fluid .code-prefix { font-size: 13px; padding: 5px 10px 5px 8px; margin-right: 8px; flex: none; }
html.fluid .code-prefix .mi { font-size: 16px; }
html.fluid .code-prefix { cursor: pointer; border: 1px solid rgba(255,255,255,.14); -webkit-tap-highlight-color: transparent; }
html.fluid .code-prefix:active { transform: scale(.94); }
html.fluid #keyLock { display: none; }
html.fluid .code-text, html.fluid .caret { display: none; }
html.fluid .code-input {
  display: block; flex: 1; min-width: 0; height: 46px; border: 0; outline: none; background: transparent;
  color: var(--fg); font: 700 20px Nunito, sans-serif; caret-color: var(--accent2);
}
html.fluid .code-input::placeholder { color: rgba(255,255,255,.28); font-weight: 600; }
html.fluid .kbd-wrap { flex-direction: column; gap: 14px; }
html.fluid .kbd-card { padding: 0; background: none; border: 0; }
html.fluid .kbd { display: none; }
html.fluid .chips { flex-wrap: wrap; margin: 0; gap: 8px; }
html.fluid .chip { flex: 1 1 28%; height: 44px; font-size: 16px; }
html.fluid .kbd-side { width: 100%; flex-direction: row; flex-wrap: wrap; gap: 10px; }
html.fluid .side-key { height: 54px; font-size: 16px; padding: 0 14px; flex: 1 1 45%; }
html.fluid #kbdSide .side-key:nth-child(1), html.fluid #kbdSide .side-key:nth-child(2) { display: none; }
html.fluid .side-key.go { flex: 1 1 100%; flex-direction: row; height: 62px; font-size: 20px; }
html.fluid .side-key.go .mi { font-size: 28px; }

/* confirmar */
html.fluid .confirm-card { position: static; transform: none; width: 100%; padding: 26px 20px; border-radius: 24px; }
html.fluid .confirm { flex-direction: column; text-align: center; gap: 18px; }
html.fluid .confirm-icon { width: 140px; height: 140px; border-radius: 24px; }
html.fluid .confirm-ok { justify-content: center; font-size: 13px; }
html.fluid .confirm-name { font-size: 28px; margin-bottom: 12px; }
html.fluid .kv { grid-template-columns: auto 1fr; column-gap: 14px; text-align: left; font-size: 15px; }
html.fluid .row-btns { flex-direction: column; gap: 10px; margin-top: 22px; }
html.fluid .row-btns .btn { width: 100%; }

/* abertura */
html.fluid .splash { position: static; min-height: 100%; gap: 18px; text-align: center; }
html.fluid .splash-icon { width: 150px; height: 150px; }
html.fluid .splash-name { font-size: 26px; }
html.fluid .bar { width: 70%; }

/* configurações */
html.fluid .settings-wrap { position: static; transform: none; width: 100%; }
html.fluid .settings-wrap .scr-title { margin-bottom: 16px; }
html.fluid .settings { gap: 10px; }
html.fluid .set-row { height: auto; min-height: 64px; padding: 10px 14px 10px 10px; border-radius: 18px; flex-wrap: wrap; row-gap: 4px; }
html.fluid .set-row .mi { width: 42px; height: 42px; border-radius: 13px; font-size: 22px; }
html.fluid .set-row .set-label { font-size: 17px; }
html.fluid .set-row .set-value { font-size: 13px; max-width: 100%; margin-left: 56px; flex-basis: calc(100% - 56px); background: none; padding: 0; }
html.fluid .set-about { font-size: 12px; }

/* visualizador: cabeçalho, menu em abas roláveis, grade com rolagem */
html.fluid #scr-view { padding: 0; overflow: hidden; }
html.fluid .view-head { position: absolute; left: 16px; right: 12px; top: calc(env(safe-area-inset-top, 0px) + 10px); height: 52px; }
html.fluid .view-headline { font-size: 22px; }
html.fluid .view-logo { max-height: 36px; max-width: 120px; }
html.fluid .view-gear { width: 44px; height: 44px; border-radius: 14px; margin-left: 6px; }
html.fluid .view-menu {
  left: 0; right: 0; width: auto; top: calc(env(safe-area-inset-top, 0px) + 68px); bottom: auto; height: 50px;
  padding: 0 12px; border: 0; border-radius: 0; background: none;
  display: flex; gap: 8px; overflow-x: auto; overflow-y: hidden; -webkit-overflow-scrolling: touch; scrollbar-width: none;
}
html.fluid .view-menu::-webkit-scrollbar { display: none; }
html.fluid .menu-item { width: auto; flex: none; height: 42px; margin: 4px 0; padding: 0 16px; border-radius: 999px; font-size: 15px; background: var(--surface); }
html.fluid .menu-item .mi { font-size: 20px; }
html.fluid .menu-sep, html.fluid .menu-sep-label { display: none; }
html.fluid .view-body, html.fluid .view-body.has-menu {
  left: 6px; right: 6px; top: calc(env(safe-area-inset-top, 0px) + 72px); bottom: 0;
  overflow-y: auto; -webkit-overflow-scrolling: touch; padding-bottom: env(safe-area-inset-bottom, 0px);
}
html.fluid .view-body.has-menu { top: calc(env(safe-area-inset-top, 0px) + 124px); }
html.fluid .view-grid { transition: none; }
html.fluid .it.f.is-focus { transform: none; }
html.fluid .it .it-title { font-size: 15px; }
html.fluid .it .it-label { font-size: 12px; }
html.fluid .it .it-icon .mi { font-size: 34px; }
html.fluid .it .it-foot, html.fluid .it .it-head { font-size: 13px; padding: 6px 10px; }
html.fluid .toast { left: 16px; right: 16px; transform: none; bottom: calc(env(safe-area-inset-bottom, 0px) + 20px); border-radius: 18px; font-size: 15px; text-align: center; }
/* ícone + texto no mesmo item: ícone em cima, texto embaixo (sem sobrepor) */
.it.has-text .it-icon { bottom: 40%; }
.it.has-text .it-text { top: auto !important; bottom: 12px !important; transform: none !important; }
html.fluid .it.has-text .it-icon { bottom: 44%; }
html.fluid .it.has-text .it-text { bottom: 8px !important; }
/* TV: 7 itens de Configurações cabem em 720p */
html:not(.fluid) .settings-wrap { top: 34px; }
html:not(.fluid) .settings-wrap .scr-title { margin-bottom: 16px; }
html:not(.fluid) .settings { gap: 9px; }
html:not(.fluid) .set-row { height: 66px; }
html:not(.fluid) .set-row .mi { width: 46px; height: 46px; }
html:not(.fluid) .set-about { margin-top: 10px; }

/* ---------- janelas (modal): escolha e confirmação ---------- */
.overlay { position: fixed; inset: 0; z-index: 200; background: rgba(6,10,18,.74); }
.modal-stage { position: absolute; left: 0; top: 0; width: 1280px; height: 720px; transform-origin: 0 0; display: flex; align-items: center; justify-content: center; }
.modal {
  width: 620px; max-height: 660px; overflow: auto; padding: 30px 30px 26px; border-radius: 28px;
  background: var(--surface); border: 1px solid var(--line); box-shadow: 0 30px 80px rgba(0,0,0,.6);
  display: flex; flex-direction: column; gap: 10px; color: var(--fg); font-family: Nunito, sans-serif;
}
.modal-title { margin: 0; font-size: 28px; font-weight: 800; }
.modal-desc { margin: 0 0 10px; font-size: 16px; line-height: 1.45; color: var(--dim); }
.modal-opt {
  display: flex; align-items: center; gap: 12px; width: 100%; min-height: 60px; padding: 0 20px; border-radius: 16px;
  background: var(--bg2); text-align: left; font-size: 20px; font-weight: 700;
  transition: transform .14s var(--ease), background .14s, color .14s, box-shadow .14s;
}
.modal-opt-sub { font-size: 15px; font-weight: 600; color: var(--dim); }
.modal-opt .mi { margin-left: auto; font-size: 26px; color: var(--accent2); }
.modal-opt.is-sel { box-shadow: inset 0 0 0 2px var(--accent2); }
.modal-opt.is-focus { background: var(--accent); color: var(--accentFg); transform: scale(1.02); box-shadow: 0 0 0 3px var(--accent2); }
.modal-opt.is-focus .modal-opt-sub, .modal-opt.is-focus .mi { color: var(--accentFg); }
.modal-btns { display: flex; gap: 14px; margin-top: 8px; }
.modal-btns .btn { flex: 1; justify-content: center; }
html.fluid .modal { width: calc(100% - 32px); max-height: calc(100% - 48px); padding: 22px 18px 18px; border-radius: 22px; }
html.fluid .modal-title { font-size: 22px; }
html.fluid .modal-desc { font-size: 14px; }
html.fluid .modal-opt { min-height: 56px; padding: 10px 16px; font-size: 17px; flex-wrap: wrap; }
html.fluid .modal-opt-sub { font-size: 13px; }
.modal-bar { height: 8px; border-radius: 999px; background: var(--bg2); overflow: hidden; margin: 0 0 12px; }
.modal-bar i { display: block; width: 100%; height: 100%; border-radius: 999px; background: linear-gradient(90deg, var(--accent), var(--accent2)); }
/* telas que não são 16:9 (monitor antigo 4:3 / 5:4, janela do navegador): o fundo cobre a tela inteira,
   sem faixas de outra cor em volta do palco centralizado */
html:not(.fluid) body { background: linear-gradient(160deg, var(--bg) 0%, var(--bg2) 100%); }
html:not(.fluid) .stage { background: transparent; overflow: visible; }

/* =====================================================================
   PLAYER do CF media (player.js) — palco 1280×720 escalado; celular em pé = fluido (.pl-fluid)
   ===================================================================== */
.player { overflow: hidden; color: #fff; font-family: Nunito, "Segoe UI", Roboto, Arial, sans-serif; }
.player video { position: absolute; left: 0; top: 0; width: 100%; height: 100%; background: #000; object-fit: contain; }
.player.is-audio video { visibility: hidden; }
/* Samsung (AVPlay) desenha ATRÁS da página: tudo por cima precisa ficar transparente */
html.native-video, html.native-video body, html.native-video .player { background: transparent !important; }
html.native-video #stage { visibility: hidden; }
.pl-stage { position: absolute; left: 0; top: 0; width: 1280px; height: 720px; transform-origin: 0 0; }

.pl-top, .pl-bottom { opacity: 0; transition: opacity .25s; }
.player.controls .pl-top, .player.controls .pl-bottom { opacity: 1; }
.player:not(.controls) .pl-top, .player:not(.controls) .pl-bottom { pointer-events: none; }
.pl-top {
  position: absolute; left: 0; right: 0; top: 0; padding: 34px 56px 90px;
  display: flex; align-items: flex-start; gap: 18px;
  background: linear-gradient(180deg, rgba(0,0,0,.78), transparent);
}
.pl-back { display: none; flex: none; width: 54px; height: 54px; border-radius: 50%; place-items: center; font-size: 30px; color: #fff; background: rgba(255,255,255,.14); }
html.dev-phone .pl-back { display: grid; }
@media (pointer: fine) { .pl-back { display: grid; } }
.pl-head { min-width: 0; }
.pl-title { font-size: 34px; font-weight: 800; line-height: 1.15; text-shadow: 0 3px 14px rgba(0,0,0,.6); }
.pl-sub { margin-top: 4px; font-size: 19px; font-weight: 700; color: rgba(255,255,255,.78); }
.pl-live { display: none; align-items: center; gap: 8px; margin-bottom: 10px; padding: 5px 12px; border-radius: 8px; font-size: 15px; font-weight: 800; letter-spacing: 2px; background: var(--accent); }
.pl-live i { width: 9px; height: 9px; border-radius: 50%; background: #fff; animation: blink 1.2s steps(1) infinite; }
.is-live .pl-live { display: inline-flex; }

.pl-bottom {
  position: absolute; left: 0; right: 0; bottom: 0; padding: 120px 56px 26px;
  background: linear-gradient(0deg, rgba(0,0,0,.88), rgba(0,0,0,.45) 55%, transparent);
}
.pl-bar { display: flex; align-items: center; gap: 20px; }
.pl-toggle {
  flex: none; width: 66px; height: 66px; border-radius: 50%; display: grid; place-items: center;
  font-size: 40px; color: var(--accentFg); background: var(--accent); box-shadow: 0 0 0 3px var(--accent2), 0 12px 30px -8px var(--accent);
}
.pl-time { flex: none; min-width: 86px; font-size: 20px; font-weight: 800; font-variant-numeric: tabular-nums; }
.pl-dur { text-align: right; color: rgba(255,255,255,.75); }
.pl-progress { position: relative; flex: 1; height: 8px; border-radius: 4px; background: rgba(255,255,255,.28); cursor: pointer; transition: height .15s; }
.pl-progress::before { content: ''; position: absolute; left: 0; right: 0; top: -16px; bottom: -16px; }   /* área de toque maior */
.pl-fill { position: absolute; left: 0; top: 0; bottom: 0; width: 100%; border-radius: 4px; background: linear-gradient(90deg, var(--accent), var(--accent2)); transform-origin: 0 50%; transform: scaleX(0); }
.pl-knob { position: absolute; top: 50%; left: 0; width: 22px; height: 22px; margin: -11px 0 0 -11px; border-radius: 50%; background: var(--accent2); box-shadow: 0 0 0 4px rgba(255,255,255,.92); pointer-events: none; }
.pl-progress.is-focus { height: 12px; }
.is-live .pl-time, .is-live .pl-progress { visibility: hidden; }
.pl-hint { margin-top: 14px; font-size: 15px; color: rgba(255,255,255,.5); text-align: center; }
html.dev-phone .pl-hint { display: none; }

.pl-spin { position: absolute; inset: 0; display: flex; align-items: center; justify-content: center; pointer-events: none; }
.pl-seekhint { position: absolute; top: 50%; margin-top: -36px; padding: 14px 28px; border-radius: 999px; background: rgba(0,0,0,.62); font-size: 30px; font-weight: 800; pointer-events: none; }
.pl-seekhint.back { left: 12%; }
.pl-seekhint.fwd { right: 12%; }

.pl-err {
  position: absolute; left: 50%; top: 50%; width: 660px; transform: translate(-50%, -50%);
  padding: 34px 36px 30px; border-radius: 28px; text-align: center;
  background: var(--surface); border: 1px solid var(--line); box-shadow: 0 30px 80px rgba(0,0,0,.6);
}
.pl-err-icon { font-size: 56px; color: var(--accent2); }
.pl-err h2 { margin-top: 6px; font-size: 28px; font-weight: 800; }
.pl-err p { margin-top: 10px; font-size: 18px; line-height: 1.45; color: var(--dim); }
.pl-err small { display: block; margin-top: 8px; font-size: 13px; color: var(--dim); opacity: .7; word-break: break-all; }
.pl-err-btns { display: flex; gap: 14px; justify-content: center; margin-top: 24px; }

.pl-art { display: none; }
.is-audio .pl-art {
  position: absolute; left: 50%; top: 44%; width: 260px; height: 260px; transform: translate(-50%, -50%);
  display: grid; place-items: center; overflow: hidden; border-radius: 34px;
  background: var(--surface); box-shadow: 0 0 0 3px var(--accent2), 0 30px 80px -20px var(--accent);
}
.pl-art img { width: 100%; height: 100%; object-fit: cover; }
.pl-art .mi { font-size: 130px; color: var(--accent2); }

/* celular em pé */
.pl-fluid .pl-top { padding: calc(env(safe-area-inset-top, 0px) + 14px) 14px 60px; gap: 12px; }
.pl-fluid .pl-back { width: 44px; height: 44px; font-size: 26px; }
.pl-fluid .pl-title { font-size: 20px; }
.pl-fluid .pl-sub { font-size: 14px; }
.pl-fluid .pl-bottom { padding: 80px 14px calc(env(safe-area-inset-bottom, 0px) + 22px); }
.pl-fluid .pl-bar { gap: 10px; }
.pl-fluid .pl-toggle { width: 50px; height: 50px; font-size: 32px; }
.pl-fluid .pl-time { min-width: 46px; font-size: 13px; }
.pl-fluid .pl-err { width: calc(100% - 28px); padding: 24px 18px 20px; }
.pl-fluid .pl-err h2 { font-size: 21px; }
.pl-fluid .pl-err p { font-size: 15px; }
.pl-fluid .pl-err-btns { flex-direction: column; }
.pl-fluid .pl-seekhint { font-size: 22px; padding: 10px 20px; }
.pl-fluid.is-audio .pl-art, .is-audio .pl-fluid .pl-art { width: 200px; height: 200px; }
.player.has-err .pl-bottom { display: none; }
.is-live .pl-h-seek { display: none; }

/* ---------- itens: título + rodapé sem sobrepor ---------- */
.it.has-foot.has-text .it-text { bottom: 46px !important; }
.it.has-foot:not(.has-text) .it-text { top: 42%; }
html.fluid .it.has-foot.has-text .it-text { bottom: 32px !important; }

/* ---------- visualizador de imagem (ação image:) ---------- */
.image-scene { background: #000; z-index: 120; }
.image-scene img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: contain; }
.img-btn { position: absolute; width: 56px; height: 56px; border-radius: 50%; display: grid; place-items: center; font-size: 32px; color: #fff; background: rgba(0,0,0,.5); }
.img-close { top: 16px; left: 16px; }
.img-prev, .img-next { top: 50%; margin-top: -28px; display: none; }
.img-prev { left: 16px; }
.img-next { right: 16px; }
.image-scene.has-nav .img-prev, .image-scene.has-nav .img-next { display: grid; }
.img-bar { position: absolute; left: 0; right: 0; bottom: 0; display: flex; justify-content: space-between; gap: 16px; padding: 40px 24px 18px; font-size: 18px; font-weight: 700; color: #fff; background: linear-gradient(0deg, rgba(0,0,0,.75), transparent); }
.img-bar:empty, .img-bar span:empty { display: none; }

/* ---------- modo gratuito (versão web: app web dentro do quadro) ---------- */
#frameScene iframe { position: absolute; inset: 0; width: 100%; height: 100%; border: 0; background: #000; }
.frame-mark {
  position: absolute; top: 14px; right: 16px; z-index: 5; pointer-events: none;
  padding: 7px 14px; border-radius: 999px; font: 700 14px Nunito, sans-serif; color: #fff;
  background: rgba(10,10,12,.62); box-shadow: 0 0 0 1px rgba(251,146,60,.6);
}
.modal-desc { white-space: pre-line; }   /* notas da atualização em linhas */

/* ---------- Tela de Início (iPhone/Android): voltar do app web e aviso para instalar ---------- */
.frame-exit { position: absolute; top: calc(10px + env(safe-area-inset-top, 0px)); left: 10px; z-index: 6; width: 40px; height: 40px; border-radius: 50%;
  display: grid; place-items: center; border: 0; color: #fff; background: rgba(10,10,12,.55); box-shadow: 0 0 0 1px rgba(255,255,255,.18); opacity: .8; cursor: pointer; }
.frame-exit .mi { font-size: 22px; }
.frame-exit[hidden] { display: none; }
.ios-hint { position: fixed; left: 12px; right: 12px; bottom: calc(12px + env(safe-area-inset-bottom, 0px)); z-index: 9000; display: grid; grid-template-columns: 40px 1fr 36px; gap: 12px; align-items: center;
  padding: 14px 12px 14px 16px; border-radius: 16px; color: #fff; font: 500 14.5px/1.4 Nunito, sans-serif; background: rgba(19,27,41,.97); box-shadow: 0 0 0 1px rgba(251,146,60,.45), 0 14px 32px rgba(0,0,0,.5); }
.ios-hint[hidden] { display: none; }
.ios-hint b { display: block; font-size: 16px; margin-bottom: 2px; }
.ios-hint span:not(.mi) { color: rgba(255,255,255,.78); }
.ios-hint-ic { font-size: 30px; color: #fb923c; }
.ios-hint-x { width: 36px; height: 36px; border-radius: 50%; border: 0; display: grid; place-items: center; color: #fff; background: rgba(255,255,255,.08); cursor: pointer; }

/* ---------- instalação guiada (iPhone/iPad) ---------- */
.ios-hint-go { margin-top: 10px; display: inline-flex; align-items: center; gap: 6px; height: 36px; padding: 0 14px; border: 0; border-radius: 10px;
  font: 800 14px Nunito, sans-serif; color: #2a1406; background: #fb923c; cursor: pointer; }
.ios-hint-go .mi { font-size: 18px; }
.ios-guide { position: fixed; inset: 0; z-index: 9500; display: flex; align-items: center; justify-content: center; padding: 16px;
  padding-top: calc(16px + env(safe-area-inset-top, 0px)); padding-bottom: calc(96px + env(safe-area-inset-bottom, 0px));
  background: rgba(5,8,14,.86); -webkit-backdrop-filter: blur(6px); backdrop-filter: blur(6px); font-family: Nunito, sans-serif; color: #fff; }
.ios-guide[hidden] { display: none; }
.ig-card { position: relative; width: 100%; max-width: 420px; padding: 26px 22px 22px; border-radius: 22px; text-align: center;
  background: #131b29; box-shadow: 0 0 0 1px rgba(251,146,60,.35), 0 24px 60px rgba(0,0,0,.55); }
.ig-x { position: absolute; top: 10px; right: 10px; width: 38px; height: 38px; border: 0; border-radius: 50%; display: grid; place-items: center;
  color: #fff; background: rgba(255,255,255,.08); cursor: pointer; }
.ig-logo { width: 64px; height: 64px; border-radius: 15px; margin: 0 auto 12px; display: block; }
.ig-card h2 { margin: 0 0 6px; font-size: 22px; font-weight: 800; }
.ig-sub { margin: 0 0 18px; font-size: 15px; color: rgba(255,255,255,.72); }
.ig-steps { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 8px; text-align: left; }
.ig-steps li { display: grid; grid-template-columns: 26px 26px 1fr; gap: 10px; align-items: center; padding: 12px; border-radius: 14px;
  font-size: 15.5px; line-height: 1.35; color: rgba(255,255,255,.7); background: rgba(255,255,255,.04); transition: background .3s, color .3s; }
.ig-steps li.on { color: #fff; background: rgba(251,146,60,.16); box-shadow: inset 0 0 0 1px rgba(251,146,60,.55); }
.ig-steps li .mi { font-size: 22px; color: #fb923c; }
.ig-n { width: 26px; height: 26px; border-radius: 50%; display: grid; place-items: center; font-weight: 800; font-size: 13px; background: rgba(255,255,255,.1); }
.ig-steps li.on .ig-n { background: #fb923c; color: #2a1406; }
.ig-steps b { color: #fff; }
.ig-copy { margin-top: 16px; width: 100%; height: 50px; border: 0; border-radius: 14px; display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  font: 800 16px Nunito, sans-serif; color: #2a1406; background: #fb923c; cursor: pointer; }
.ig-copy[hidden] { display: none; }
.ig-arrow { position: fixed; z-index: 9501; width: 64px; height: 64px; border-radius: 50%; display: grid; place-items: center; pointer-events: none;
  color: #2a1406; background: #fb923c; box-shadow: 0 10px 30px rgba(251,146,60,.45); animation: igBounce 1.1s ease-in-out infinite; }
.ig-arrow .mi { font-size: 40px; }
.ig-arrow.none { display: none; }
.ig-arrow.at-bottom-center { left: 50%; margin-left: -32px; bottom: calc(14px + env(safe-area-inset-bottom, 0px)); }
.ig-arrow.at-bottom-right { right: 18px; bottom: calc(14px + env(safe-area-inset-bottom, 0px)); }
.ig-arrow.at-top-right { right: 18px; top: calc(14px + env(safe-area-inset-top, 0px)); animation-name: igBounceUp; }
@keyframes igBounce { 0%, 100% { transform: translateY(0); } 50% { transform: translateY(10px); } }
@keyframes igBounceUp { 0%, 100% { transform: translateY(0); } 50% { transform: translateY(-10px); } }
@media (prefers-reduced-motion: reduce) { .ig-arrow { animation: none; } }
.ig-note { margin: 14px 0 0; font-size: 13.5px; line-height: 1.4; color: rgba(255,255,255,.62); }
.ig-note[hidden] { display: none; }
