/* Jimbo TV Beam: Roku / Apple TV mirroring guide and Big Screen Mode */

/* ---------- button ---------- */
.tv-btn--beam { position: relative; background: #17181c !important; color: #fff !important; border: 1px solid rgb(245 166 35 / .55) !important; font-weight: 800; overflow: hidden; }
.tv-btn--beam::after { content: ""; position: absolute; inset: -1px; border-radius: inherit; background: linear-gradient(110deg, transparent 30%, rgb(255 207 122 / .28) 50%, transparent 70%); transform: translateX(-120%); animation: tvbSheen 4.5s ease-in-out infinite; pointer-events: none; }
.tvb-ic { position: relative; display: inline-grid; place-items: center; color: var(--amber); }
.tvb-ic i { position: absolute; left: 50%; top: 50%; width: 26px; height: 26px; margin: -13px 0 0 -13px; border-radius: 50%; border: 1.5px solid rgb(245 166 35 / .6); opacity: 0; animation: tvbPing 2.6s ease-out infinite; }
.tvb-ic i + i { animation-delay: 1.3s; }
@keyframes tvbSheen { 0%, 60% { transform: translateX(-120%); } 85%, 100% { transform: translateX(120%); } }
@keyframes tvbPing { 0% { transform: scale(.4); opacity: .9; } 100% { transform: scale(1.5); opacity: 0; } }

/* ---------- sheet ---------- */
html.tvb-open, html.tvb-open body { overflow: hidden; }
.tvb { position: fixed; inset: 0; z-index: 2147481000; display: grid; align-items: end; padding: 12px; background: rgb(0 0 0 / .66); -webkit-backdrop-filter: blur(6px); backdrop-filter: blur(6px); overflow-y: auto; }
.tvb[hidden] { display: none; }
.tvb__box { position: relative; width: min(620px, 100%); margin: 0 auto; padding: 22px 18px 18px; border-radius: 26px; color: #f3f1ec; border: 1px solid rgb(255 255 255 / .1);
  background: radial-gradient(130% 70% at 85% 0%, rgb(245 166 35 / .16), transparent 55%), radial-gradient(90% 60% at 0% 100%, rgb(124 77 255 / .12), transparent 60%), #111215;
  display: grid; grid-template-columns: minmax(0, 1fr); gap: 14px; box-shadow: 0 30px 80px rgb(0 0 0 / .55); animation: tvbUp .35s cubic-bezier(.2, .8, .2, 1); }
@keyframes tvbUp { from { transform: translateY(24px); opacity: 0; } to { transform: none; opacity: 1; } }
.tvb__box > * { min-width: 0; }
.tvb__x { position: absolute; top: 10px; right: 10px; width: 44px; height: 44px; display: grid; place-items: center; border: 0; border-radius: 50%; background: rgb(255 255 255 / .08); color: #fff; cursor: pointer; z-index: 2; }
.tvb__k { margin: 0; display: inline-flex; align-items: center; gap: 8px; font: 800 .74rem/1 var(--font-display); letter-spacing: .16em; text-transform: uppercase; color: var(--amber); }
.tvb__h { margin: 0; padding-right: 44px; font: 900 clamp(1.3rem, 5vw, 1.7rem)/1.12 var(--font-display); letter-spacing: -.01em; text-wrap: balance; }
.tvb__on { margin: -4px 0 0; color: #b9b3a7; font-size: .9rem; line-height: 1.5; }
.tvb__on b { color: #fff; }
.tvb__link { border: 0; background: none; padding: 0; color: #ffcf7a; font: inherit; font-weight: 700; text-decoration: underline; text-underline-offset: 3px; cursor: pointer; min-height: 32px; }
.tvb__found { margin: 0; display: inline-flex; align-items: center; gap: 8px; justify-self: start; padding: 7px 12px; border-radius: 999px; background: rgb(52 211 153 / .12); color: #8ff0c6; font-weight: 700; font-size: .84rem; }
.tvb__found[hidden] { display: none; }
.tvb__found i { width: 8px; height: 8px; border-radius: 50%; background: #34d399; box-shadow: 0 0 0 0 rgb(52 211 153 / .6); animation: tvbDot 1.6s infinite; }
@keyframes tvbDot { 70% { box-shadow: 0 0 0 8px rgb(52 211 153 / 0); } }
.tvb__fine { margin: 0; color: #8f897e; font-size: .8rem; line-height: 1.5; }

/* ---------- the live scene: phone, beam, TV ---------- */
.tvb-scene { position: relative; display: grid; grid-template-columns: 74px 1fr 1.9fr; align-items: center; gap: 6px; padding: 16px 14px 20px; border-radius: 20px; background: linear-gradient(180deg, #08090b, #0d0e11); border: 1px solid rgb(255 255 255 / .06); overflow: hidden; }
.tvb-scene::before { content: ""; position: absolute; inset: auto 0 0; height: 40%; background: radial-gradient(60% 100% at 70% 100%, rgb(245 166 35 / .1), transparent 70%); pointer-events: none; }
.tvb-dev { position: relative; width: 66px; height: 128px; border-radius: 16px; border: 3px solid #2b2d33; background: #050506; box-shadow: inset 0 0 0 1px #000, 0 10px 24px rgb(0 0 0 / .6); justify-self: center; }
.tvb-dev::before { content: ""; position: absolute; top: 5px; left: 50%; width: 20px; height: 5px; margin-left: -10px; border-radius: 4px; background: #1b1c20; z-index: 3; }
.tvb-dev__scr { position: absolute; inset: 3px; border-radius: 11px; overflow: hidden; background: linear-gradient(160deg, #1c1408, #0b0b0d); }
.tvb-dev__logo { position: absolute; inset: 0; display: grid; place-items: center; font: 900 1.5rem/1 var(--font-display); color: var(--amber); opacity: .35; transition: opacity .4s, transform .4s; }
.tvb-cc { position: absolute; inset: 0; padding: 18px 7px 7px; display: grid; grid-template-columns: 1fr 1fr; gap: 5px; align-content: start; background: rgb(30 31 36 / .92); transform: translateY(-105%); transition: transform .5s cubic-bezier(.2, .8, .2, 1); }
.tvb-cc__t { height: 20px; border-radius: 7px; background: rgb(255 255 255 / .12); }
.tvb-cc__m { grid-column: span 2; height: 24px; border-radius: 8px; display: grid; place-items: center; background: rgb(255 255 255 / .16); color: #fff; }
.tvb-cc__m svg { width: 16px; height: 16px; }
.tvb-list { position: absolute; inset: auto 6px 10px; margin: 0; padding: 0; list-style: none; display: grid; gap: 5px; opacity: 0; transform: translateY(10px); transition: .4s; }
.tvb-list li { height: 14px; border-radius: 5px; background: rgb(255 255 255 / .12); }
.tvb-list li.is-pick { background: var(--amber); box-shadow: 0 0 14px rgb(245 166 35 / .6); }
.tvb-finger { position: absolute; width: 22px; height: 22px; border-radius: 50%; background: rgb(255 255 255 / .55); border: 2px solid #fff; right: -10px; top: -10px; opacity: 0; pointer-events: none; z-index: 4; }

.tvb-beam { position: relative; height: 40px; }
.tvb-beam i { position: absolute; top: 50%; left: 0; width: 9px; height: 9px; margin-top: -4.5px; border-radius: 50%; background: var(--amber); opacity: 0; box-shadow: 0 0 10px var(--amber); }

.tvb-tv { position: relative; justify-self: stretch; display: grid; justify-items: center; }
.tvb-tv__scr { position: relative; width: 100%; aspect-ratio: 16 / 9; border-radius: 10px; border: 4px solid #22242a; background: #030304; overflow: hidden; box-shadow: 0 14px 30px rgb(0 0 0 / .6); transition: box-shadow .5s; }
.tvb-tv__stand { width: 34%; height: 6px; margin-top: 4px; border-radius: 0 0 6px 6px; background: #22242a; }
.tvb-box { position: absolute; right: 6%; bottom: -3px; width: 34px; height: 12px; border-radius: 6px; background: #2b2d33; transition: background .3s, width .3s, border-radius .3s; }
.tvb-scene.is-roku .tvb-box { background: #6c3cd6; box-shadow: 0 0 12px rgb(108 60 214 / .55); border-radius: 4px; width: 30px; }
.tvb-scene.is-atv .tvb-box { background: #0c0c0d; border: 1px solid #3a3c42; border-radius: 9px; width: 26px; height: 12px; }
.tvb-menu { position: absolute; inset: 10% 8%; display: grid; align-content: start; gap: 5px; opacity: 0; transition: opacity .3s; }
.tvb-menu span { padding: 4px 8px; border-radius: 5px; background: rgb(255 255 255 / .06); color: #8f897e; font: 700 clamp(.56rem, 2.3vw, .74rem)/1.2 var(--font-body); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; transition: .25s; }
.tvb-scene.is-roku .tvb-menu { background: none; }
.tvb-menu span.is-on { color: #fff; background: rgb(255 255 255 / .12); }
.tvb-menu span.is-cur { background: var(--amber); color: #141414; transform: translateX(4px); }
.tvb-code { position: absolute; inset: 0; display: flex; align-items: center; justify-content: center; gap: 6px; opacity: 0; transition: opacity .3s; }
.tvb-code span { width: 16px; height: 22px; border-radius: 4px; background: rgb(255 255 255 / .14); }
.tvb-tv__live { position: absolute; inset: 0; display: grid; place-content: center; text-align: center; font: 900 clamp(1rem, 5vw, 1.6rem)/1 var(--font-display); color: #fff; opacity: 0; transform: scale(.94); transition: .5s; background: radial-gradient(70% 90% at 50% 40%, rgb(245 166 35 / .35), transparent 70%), linear-gradient(160deg, #2a1806, #070605); }
.tvb-tv__live b { color: var(--amber); }
.tvb-tv__live small { display: block; margin-top: 4px; font: 700 .62rem/1 var(--font-body); letter-spacing: .14em; text-transform: uppercase; color: #ffcf7a; }
.tvb-wifi { position: absolute; inset: 0; display: grid; place-items: center; color: #ffcf7a; opacity: 0; transition: opacity .3s; }
.tvb-wifi svg { width: 34px; height: 34px; }

/* scene states */
.tvb-scene[data-s="wifi"] .tvb-wifi { opacity: 1; animation: tvbBlink 1.4s ease-in-out infinite; }
.tvb-scene[data-s="wifi"] .tvb-dev__logo { opacity: .9; }
.tvb-scene[data-s="tv"] .tvb-menu { opacity: 1; }
.tvb-scene[data-s="phone"] .tvb-cc { transform: none; }
.tvb-scene[data-s="phone"] .tvb-cc__m { animation: tvbTap 1.3s ease-in-out .5s infinite; }
.tvb-scene[data-s="phone"] .tvb-finger { opacity: 1; animation: tvbFinger 2.6s ease-in-out infinite; }
.tvb-scene[data-s="pick"] .tvb-list, .tvb-scene[data-s="code"] .tvb-list { opacity: 1; transform: none; }
.tvb-scene[data-s="pick"] .tvb-list li.is-pick { animation: tvbTap 1.2s ease-in-out infinite; }
.tvb-scene[data-s="pick"] .tvb-code, .tvb-scene[data-s="code"] .tvb-code { opacity: 1; }
.tvb-scene[data-s="code"] .tvb-code span { animation: tvbFill 2.4s steps(1) infinite; }
.tvb-scene[data-s="code"] .tvb-code span:nth-child(2) { animation-delay: .3s; } .tvb-scene[data-s="code"] .tvb-code span:nth-child(3) { animation-delay: .6s; } .tvb-scene[data-s="code"] .tvb-code span:nth-child(4) { animation-delay: .9s; }
.tvb-scene[data-s="pick"] .tvb-beam i, .tvb-scene[data-s="code"] .tvb-beam i { animation: tvbFly 1.8s linear infinite; }
.tvb-scene[data-s="live"] .tvb-beam i { animation: tvbFly 1s linear infinite; }
.tvb-beam i:nth-child(2) { animation-delay: .2s !important; } .tvb-beam i:nth-child(3) { animation-delay: .4s !important; } .tvb-beam i:nth-child(4) { animation-delay: .6s !important; } .tvb-beam i:nth-child(5) { animation-delay: .8s !important; }
.tvb-scene[data-s="live"] .tvb-tv__live { opacity: 1; transform: none; }
.tvb-scene[data-s="live"] .tvb-tv__scr { box-shadow: 0 0 0 1px rgb(245 166 35 / .4), 0 0 40px rgb(245 166 35 / .35); }
.tvb-scene[data-s="live"] .tvb-dev__logo { opacity: 1; transform: scale(1.1); }
@keyframes tvbBlink { 50% { opacity: .35; } }
@keyframes tvbTap { 0%, 100% { transform: scale(1); } 45% { transform: scale(.9); filter: brightness(1.6); } }
@keyframes tvbFinger { 0% { transform: translate(14px, -14px); opacity: 0; } 25% { transform: translate(0, 0); opacity: 1; } 45% { transform: translate(-30px, 66px); } 60% { transform: translate(-30px, 66px) scale(.75); } 80% { transform: translate(-30px, 66px); opacity: 1; } 100% { opacity: 0; transform: translate(-30px, 66px); } }
@keyframes tvbFill { 0% { background: rgb(255 255 255 / .14); } 25%, 90% { background: #ffcf7a; } }
@keyframes tvbFly { 0% { left: 0; opacity: 0; transform: scale(.6); } 15% { opacity: 1; } 50% { transform: translateY(-12px) scale(1); } 85% { opacity: 1; } 100% { left: calc(100% - 9px); opacity: 0; transform: scale(.6); } }

/* ---------- pick your TV ---------- */
.tvb-pick { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.tvb-tile { position: relative; display: grid; justify-items: start; gap: 2px; min-height: 92px; padding: 14px 14px 12px; border-radius: 18px; border: 2px solid rgb(255 255 255 / .1); background: rgb(255 255 255 / .04); color: #fff; text-align: left; cursor: pointer; transition: border-color .2s, transform .15s, background .2s; }
.tvb-tile:hover { border-color: rgb(255 255 255 / .25); }
.tvb-tile:active { transform: scale(.98); }
.tvb-tile:focus-visible { outline: 3px solid var(--amber); outline-offset: 2px; }
.tvb-tile[aria-checked="true"] { border-color: var(--amber); background: rgb(245 166 35 / .1); }
.tvb-tile[aria-checked="true"]::after { content: ""; position: absolute; top: 12px; right: 12px; width: 18px; height: 18px; border-radius: 50%; background: var(--amber) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath d='m5 12 5 5 9-10' fill='none' stroke='%23141414' stroke-width='3.4' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E") center/12px no-repeat; }
.tvb-tile b { font: 900 1.1rem/1.1 var(--font-display); }
.tvb-tile small { color: #a9a397; font-size: .78rem; }
.tvb-tile__art { display: block; height: 22px; width: 44px; margin-bottom: 6px; border-radius: 6px; }
.tvb-tile--roku .tvb-tile__art { background: linear-gradient(135deg, #7c4dff, #5a2fc2); box-shadow: 0 6px 16px rgb(108 60 214 / .45); width: 40px; height: 16px; margin-top: 4px; border-radius: 4px; }
.tvb-tile--appletv .tvb-tile__art { background: linear-gradient(180deg, #2a2b30, #0b0b0c); border: 1px solid #44464d; width: 36px; height: 20px; border-radius: 9px; }

/* ---------- steps ---------- */
.tvb-run[hidden], .tvb-no[hidden] { display: none; }
.tvb-run { display: grid; gap: 12px; }
.tvb-rail { display: flex; align-items: center; gap: 0; }
.tvb-rail span { width: 26px; height: 26px; flex: none; display: grid; place-items: center; border-radius: 50%; background: rgb(255 255 255 / .08); color: #a9a397; font: 800 .78rem/1 var(--font-display); transition: .3s; }
.tvb-rail span.is-done { background: var(--amber); color: #141414; box-shadow: 0 0 14px rgb(245 166 35 / .5); }
.tvb-rail i { flex: 1; height: 2px; background: repeating-linear-gradient(90deg, rgb(255 255 255 / .18) 0 6px, transparent 6px 11px); }
.tvb-steps { margin: 0; padding: 0; list-style: none; display: grid; gap: 8px; }
.tvb-step button { width: 100%; display: grid; grid-template-columns: 34px 1fr; gap: 12px; align-items: start; padding: 12px; border-radius: 16px; border: 1px solid rgb(255 255 255 / .08); background: rgb(255 255 255 / .03); color: inherit; text-align: left; cursor: pointer; transition: background .2s, border-color .2s; }
.tvb-step button:focus-visible { outline: 3px solid var(--amber); outline-offset: 2px; }
.tvb-step__n { width: 34px; height: 34px; display: grid; place-items: center; border-radius: 50%; border: 2px solid rgb(245 166 35 / .6); color: #ffcf7a; font: 900 .95rem/1 var(--font-display); transition: .25s; }
.tvb-step__t { display: grid; gap: 3px; min-width: 0; }
.tvb-step__t b { font: 800 1rem/1.25 var(--font-display); }
.tvb-step__t small { color: #b9b3a7; font-size: .86rem; line-height: 1.45; }
.tvb-step.is-cur button { border-color: rgb(245 166 35 / .6); background: rgb(245 166 35 / .08); }
.tvb-step.is-done .tvb-step__n { background: var(--amber); border-color: var(--amber); color: #141414; }
.tvb-step.is-done .tvb-step__t b { color: #ffcf7a; }
.tvb-act { display: grid; grid-template-columns: auto 1fr; gap: 10px; }
.tvb-show { display: inline-flex; align-items: center; justify-content: center; gap: 8px; min-height: 52px; padding: 0 16px; border-radius: 14px; border: 1px solid rgb(255 255 255 / .16); background: rgb(255 255 255 / .05); color: #fff; font: 800 .92rem/1 var(--font-display); cursor: pointer; }
.tvb-go { min-height: 52px; white-space: normal; line-height: 1.2; }
.tvb-go.is-ready { animation: tvbReady 1.8s ease-in-out infinite; }
@keyframes tvbReady { 50% { box-shadow: 0 0 0 6px rgb(245 166 35 / .22); } }
.tvb-no { display: grid; gap: 4px; padding: 14px; border-radius: 16px; background: rgb(255 155 138 / .08); border: 1px solid rgb(255 155 138 / .3); }
.tvb-no b { color: #ffb4a6; } .tvb-no span { color: #d8d2c6; font-size: .9rem; line-height: 1.45; }
.tvb-nudge { animation: tvbReady .8s ease-in-out 2; }

/* ---------- Big Screen Mode ---------- */
html.tv-beam, html.tv-beam body { overflow: hidden !important; background: #000; }
html.tv-beam .tv__set { position: fixed !important; inset: 0; z-index: 2147480000; margin: 0; padding: 0; border-radius: 0; background: #000; max-width: none; width: 100vw; height: 100vh; height: 100dvh; display: grid; }
html.tv-beam .tv__set > :not(.tv__screen):not(.tvb-hud):not(.tg) { display: none !important; }
html.tv-beam .tv__screen { width: 100%; height: 100%; max-width: none; aspect-ratio: auto; border-radius: 0; margin: 0; border: 0; box-shadow: none; }
html.tv-beam .tv__osd { top: max(4vh, env(safe-area-inset-top)); left: max(4vw, env(safe-area-inset-left)); }
html.tv-beam .jrt, html.tv-beam .jrt__launch, html.tv-beam .jrt__mic, html.tv-beam .cast-pill, html.tv-beam .crx-dock { display: none !important; }
.tvb-hud { position: absolute; inset: 0; z-index: 5; pointer-events: none; display: grid; grid-template-rows: auto 1fr auto; padding: max(12px, env(safe-area-inset-top)) max(14px, env(safe-area-inset-right)) max(14px, env(safe-area-inset-bottom)) max(14px, env(safe-area-inset-left)); }
.tvb-hud[hidden] { display: none; }
.tvb-hud__top, .tvb-hud__bot { display: flex; align-items: center; gap: 10px; opacity: 0; transform: translateY(-6px); transition: opacity .35s, transform .35s; }
.tvb-hud__top { justify-content: space-between; }
.tvb-hud__bot { justify-content: center; transform: translateY(6px); }
.tvb-hud.is-on .tvb-hud__top, .tvb-hud.is-on .tvb-hud__bot { opacity: 1; transform: none; pointer-events: auto; }
.tvb-hud:focus-within .tvb-hud__top, .tvb-hud:focus-within .tvb-hud__bot { opacity: 1; transform: none; pointer-events: auto; }
.tvb-hud__live { display: inline-flex; align-items: center; gap: 8px; padding: 8px 12px; border-radius: 999px; background: rgb(0 0 0 / .55); color: #ffcf7a; font: 800 .74rem/1 var(--font-display); letter-spacing: .14em; text-transform: uppercase; }
.tvb-hud__live i { width: 8px; height: 8px; border-radius: 50%; background: var(--amber); animation: tvbBlink 1.6s infinite; }
.tvb-hud__b { pointer-events: auto; display: inline-flex; align-items: center; justify-content: center; gap: 8px; min-width: 52px; min-height: 52px; padding: 0 14px; border-radius: 999px; border: 1px solid rgb(255 255 255 / .18); background: rgb(10 10 12 / .7); -webkit-backdrop-filter: blur(8px); backdrop-filter: blur(8px); color: #fff; font: 800 .9rem/1 var(--font-display); cursor: pointer; }
.tvb-hud__b:focus-visible { outline: 3px solid var(--amber); outline-offset: 2px; }
.tvb-hud__b[aria-pressed="true"] { color: var(--amber); }
.tvb-hud__b--name { min-width: 0; max-width: min(46vw, 360px); }
.tvb-hud__b--name b { color: var(--amber); font-variant-numeric: tabular-nums; }
.tvb-hud__b--name span { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.tvb-hud__rot { align-self: center; justify-self: center; margin: 0; padding: 10px 16px; border-radius: 14px; background: rgb(0 0 0 / .7); color: #fff; font-weight: 700; font-size: .92rem; text-align: center; max-width: 80vw; }
.tvb-hud__rot[hidden] { display: none; }

@media (max-width: 380px) {
  .tvb__box { padding: 20px 14px 14px; }
  .tvb-scene { grid-template-columns: 60px .7fr 1.9fr; padding: 12px 10px 16px; }
  .tvb-dev { width: 56px; height: 110px; }
  .tvb-act { grid-template-columns: 1fr; }
}
@media (min-width: 700px) { .tvb { align-items: center; } }
@media (prefers-reduced-motion: reduce) {
  .tv-btn--beam::after, .tvb-ic i, .tvb-scene *, .tvb-go.is-ready, .tvb__found i { animation: none !important; }
  .tvb-scene[data-s="pick"] .tvb-beam i, .tvb-scene[data-s="live"] .tvb-beam i { opacity: 1; }
  .tvb-beam i:nth-child(1) { left: 0; } .tvb-beam i:nth-child(2) { left: 22%; } .tvb-beam i:nth-child(3) { left: 44%; } .tvb-beam i:nth-child(4) { left: 66%; } .tvb-beam i:nth-child(5) { left: calc(100% - 9px); }
  .tvb__box { animation: none; }
}

/* keep the live scene in view while working down the steps; finished steps fold up */
.tvb-scene { position: sticky; top: -10px; z-index: 1; }
.tvb-step.is-done:not(.is-cur) .tvb-step__t small { display: none; }
.tvb-step.is-done:not(.is-cur) button { padding-block: 9px; }
.tvb-hud__top { grid-row: 1; } .tvb-hud__rot { grid-row: 2; } .tvb-hud__bot { grid-row: 3; }
