/* My Party TV. Phone: TV keys in the upper half, app items in the lower half, auto-fit to the screen. TV: one centred party screen. */
*{box-sizing:border-box}html,body{height:100%;margin:0}
body{font-family:system-ui,-apple-system,"Segoe UI",Roboto,sans-serif;background:#f1f3f6;color:#15161a;-webkit-tap-highlight-color:transparent}
:focus,:focus-visible{outline:none}
button,input{font:inherit;margin:0}
#app{height:100%;height:100dvh;display:flex;flex-direction:column;max-width:560px;margin:0 auto}
.top{flex:1 1 0;min-height:0;background:#15161a;color:#f5f6f7;border-radius:0 0 28px 28px;padding:calc(12px + env(safe-area-inset-top)) 16px 16px;display:flex;flex-direction:column;gap:12px}
.low{flex:1 1 0;min-height:0;padding:16px 16px calc(20px + env(safe-area-inset-bottom));display:flex;flex-direction:column;gap:12px}
body.phone .top:has(.field)+.low{flex:0 0 auto}
.switch{align-self:center;display:flex;gap:2px;padding:2px;border-radius:14px;background:#24262c;border:1px solid #3a3d45}
.seg{min-width:104px;height:40px;border-radius:12px;border:1px solid transparent;background:transparent;color:#a5abb3;font-size:15px;font-weight:600;cursor:pointer}
.seg.on{background:#f5f6f7;border-color:#f5f6f7;color:#15161a;font-weight:700}
.key{cursor:pointer;border-radius:18px;border:1px solid #3a3d45;background:#2a2d34;color:#f5f6f7;display:flex;flex-direction:column;align-items:center;justify-content:center;gap:2px;font-size:14px;font-weight:600;min-width:0}
.key.scan{flex:88 1 0;min-height:56px;border-radius:20px;background:#ffb224;border-color:#ffb224;color:#15161a;align-items:flex-start;padding:0 20px}
.key.scan .kl{font-size:24px;font-weight:700;line-height:1.1}.ks{font-size:13px;font-weight:500}
.row{display:flex;gap:8px}.row .key{flex:1 1 0}.row .key.big{flex:1.4 1 0;background:#ffb224;border-color:#ffb224;color:#15161a;font-size:15px;font-weight:700}
.r48{flex:48 1 0;min-height:44px}.r84{flex:84 1 0;min-height:64px}.r80{flex:80 1 0;min-height:48px}
.key.tab{border-radius:14px;font-size:15px}
.key.cam{flex:84 1 0;min-height:60px;border-radius:20px;background:#ffb224;border-color:#ffb224;color:#15161a;align-items:flex-start;padding:0 20px}.key.cam .kl{font-size:22px;font-weight:700}
.key.ans .kl{font-size:26px;font-weight:700}
.field{display:flex;flex-direction:column;gap:6px}.field label,.hint{font-size:13px;font-weight:600;color:#a5abb3;margin:0}
.field input{height:48px;border-radius:14px;background:#24262c;border:1px solid #a5abb3;color:#f5f6f7;font-size:16px;padding:0 14px;width:100%}
.lowhd{display:flex;justify-content:space-between;align-items:center;height:24px}.eyebrow{font-size:13px;font-weight:700;letter-spacing:.14em;color:#565c66}.name{font-size:15px;font-weight:700}
.card{background:#fff;border:1px solid #d9dde3;border-radius:16px}
.plan{padding:16px;display:flex;flex-direction:column;gap:12px}.planline{display:flex;justify-content:space-between;align-items:baseline}.mu{font-size:13px;color:#565c66}.planname{font-size:22px;font-weight:700}
.key.dark{height:48px;border-radius:12px;background:#15161a;border-color:#15161a;color:#fff;font-size:15px}
.list{flex:1 1 0;min-height:90px;max-height:170px;display:flex;flex-direction:column;overflow:hidden}
.rowbtn{flex:1 1 0;min-height:44px;border:0;border-top:1px solid #e3e6eb;background:transparent;padding:0 16px;display:flex;align-items:center;gap:12px;font-size:15px;font-weight:500;color:#15161a;text-align:left;cursor:pointer}
.rowbtn:first-child{border-top:0}.rl{flex:1 1 0}.rv{font-size:14px;color:#565c66}
body.tv{background:#15161a;color:#f5f6f7}body.tv #app{max-width:none;align-items:center;justify-content:center}
.tvbox{text-align:center;padding:4vw}.tvbrand{font-size:4vw;font-weight:700;margin:0 0 2vw;color:#ffb224}.tvmsg{font-size:2.4vw;margin:0 0 3vw;color:#f5f6f7}.tvcode{font-size:14vw;font-weight:800;letter-spacing:.06em;margin:0;line-height:1}
/* Phone design, taken as given: deep navy with a blue glow, glossy coloured keys, one glowing fine line all around. Sizes follow the screen. */
body.phone{background:#030614;--t:clamp(20px,min(7.2vw,3.3vh),40px);--l:clamp(15px,min(5vw,2.25vh),28px);--s:clamp(13px,min(4.2vw,1.9vh),23px);--x:clamp(12px,min(3.6vw,1.65vh),20px)}
body.phone #app{margin:5px auto;width:calc(100% - 10px);height:calc(100% - 10px);height:calc(100dvh - 10px);max-width:560px;display:flex;flex-direction:column;gap:1.4vh;padding:calc(1.2vh + env(safe-area-inset-top)) max(3vw,env(safe-area-inset-right)) calc(1.6vh + env(safe-area-inset-bottom)) max(3vw,env(safe-area-inset-left));border:1.5px solid #2f7dff;border-radius:34px;overflow:hidden;color:#fff;
 background:radial-gradient(120% 55% at 50% 0%,rgba(30,110,255,.55),rgba(8,20,60,0) 62%),radial-gradient(90% 40% at 50% 100%,rgba(20,90,230,.35),rgba(5,10,30,0) 70%),linear-gradient(180deg,#07123a,#050b22 55%,#040817);box-shadow:0 0 18px rgba(47,125,255,.55),inset 0 0 26px rgba(47,125,255,.22)}
body.phone .ic{display:inline-flex;flex:0 0 auto}body.phone .ic svg{width:1.6em;height:1.6em;display:block}
body.phone .switch{align-self:center;flex:0 0 auto;display:flex;gap:0;padding:0;border-radius:16px;background:rgba(10,20,55,.75);border:1px solid #2a5fd0;overflow:hidden}
body.phone .seg{display:flex;align-items:center;gap:.5em;min-height:44px;padding:0 1.2em;border:0;border-radius:14px;background:transparent;color:#aebbd6;font-size:var(--l);font-weight:700;cursor:pointer;white-space:nowrap}
body.phone .seg.on{color:#fff;background:linear-gradient(180deg,#2f8dff,#0a55e6);box-shadow:0 0 14px rgba(47,141,255,.9),inset 0 1px 0 rgba(255,255,255,.45)}
body.phone .top{flex:1 1 0;min-height:0;display:flex;flex-direction:column;gap:1.4vh;background:none;padding:0;border-radius:0}
body.phone .row{display:flex;gap:2.4vw;min-height:0}body.phone .f16{flex:16 1 0;min-height:48px}body.phone .f22{flex:22 1 0;min-height:64px}
body.phone .g{flex:1 1 0;min-width:0;display:flex;align-items:center;justify-content:center;gap:.6em;padding:4px 10px;border-radius:22px;border:1.5px solid var(--e);color:#fff;font-size:var(--l);font-weight:800;cursor:pointer;overflow:hidden;
 background:linear-gradient(160deg,var(--a),var(--b) 58%,var(--a));box-shadow:0 0 14px var(--gl),inset 0 1px 0 rgba(255,255,255,.38),inset 0 -10px 18px rgba(0,0,0,.28)}
body.phone .g .gt{display:flex;flex-direction:column;align-items:center;min-width:0}
body.phone .g .kl{max-width:100%;overflow-wrap:anywhere;text-wrap:balance;line-height:1.12;text-shadow:0 1px 3px rgba(0,0,0,.55)}
body.phone .g.col{flex-direction:column;gap:.3em}body.phone .g.col .ic svg{width:2.1em;height:2.1em}
body.phone .g.big{flex:1.45 1 0;font-size:var(--t)}
body.phone .g.scan{flex:30 1 0;min-height:84px;gap:.9em;padding:4px 16px;border-radius:26px}
body.phone .g.scan .ic svg{width:clamp(56px,20vw,120px);height:clamp(56px,20vw,120px);filter:drop-shadow(0 0 8px rgba(120,210,255,.9))}
body.phone .g.scan .kl{font-size:clamp(30px,min(11.5vw,5.2vh),64px);font-weight:900;font-style:italic;letter-spacing:-.01em}
body.phone .g.scan .ks{font-size:var(--l);font-weight:700;color:#6fe6ff;text-shadow:0 1px 2px rgba(0,0,0,.5)}
body.phone .g .ks{font-size:var(--s);font-weight:700;color:#eaffd9}
body.phone .g.ans .kl{font-size:var(--t);font-weight:900}
body.phone .blue{--a:#0a45cf;--b:#1c9dff;--e:#7fd4ff;--gl:rgba(40,150,255,.75)}
body.phone .purple{--a:#4a14b8;--b:#8a3cf0;--e:#c79bff;--gl:rgba(150,80,255,.6)}
body.phone .orange{--a:#9c4300;--b:#f08a12;--e:#ffcf7a;--gl:rgba(255,150,30,.6)}
body.phone .teal{--a:#07506a;--b:#0f9db4;--e:#5fe6f2;--gl:rgba(40,200,220,.55)}
body.phone .violet{--a:#3a1aa0;--b:#7243e0;--e:#b9a2ff;--gl:rgba(130,90,255,.6)}
body.phone .green{--a:#1c7d10;--b:#4fc21a;--e:#b4f77a;--gl:rgba(90,220,40,.55)}
body.phone .pink{--a:#8e0c58;--b:#ea3596;--e:#ff9bd0;--gl:rgba(255,70,170,.6)}
body.phone .field{flex:0 0 auto;display:flex;flex-direction:column;gap:6px}body.phone .field label,body.phone .hint{font-size:var(--s);font-weight:700;color:#bcd0f2;text-align:center;margin:0}
body.phone .field input{height:48px;border-radius:16px;background:rgba(10,22,60,.85);border:1.5px solid #3f7fe8;color:#fff;font-size:var(--l);font-weight:700;text-align:center;padding:0 14px;width:100%}
body.phone .low{flex:0 0 auto;display:flex;flex-direction:column;gap:1.3vh;padding:0;color:#fff}
body.phone .lowhd{display:flex;align-items:center;justify-content:center;gap:.7em;height:auto}
body.phone .rule{flex:1 1 0;height:1px;background:linear-gradient(90deg,rgba(80,130,230,0),rgba(80,130,230,.8))}body.phone .rule:last-child{transform:scaleX(-1)}
body.phone .pill{padding:.12em .7em;border-radius:999px;background:linear-gradient(180deg,#2f8dff,#0a55e6);font-size:var(--s);font-weight:900;letter-spacing:.14em;color:#dff0ff}
body.phone .name{font-size:var(--t);font-weight:800;white-space:nowrap}
body.phone .card{background:linear-gradient(180deg,rgba(26,48,110,.72),rgba(12,24,66,.72));border:1.5px solid #2f66d6;border-radius:24px;box-shadow:inset 0 1px 0 rgba(255,255,255,.14),0 0 12px rgba(40,110,255,.3)}
body.phone .plan{padding:1.2vh 5vw 1.5vh;display:flex;flex-direction:column;gap:1vh}
body.phone .planline{display:flex;align-items:center;justify-content:center;gap:.6em}body.phone .crown{color:#ffc93a;filter:drop-shadow(0 0 6px rgba(255,200,60,.8))}
body.phone .mu{font-size:var(--l);font-weight:600;color:#fff}body.phone .planname{font-size:clamp(26px,min(9.5vw,4.3vh),54px);font-weight:900;font-style:italic;color:#3fd9ff;line-height:1;text-shadow:0 0 10px rgba(60,200,255,.6)}
body.phone .see{min-height:44px;border-radius:999px;border:1px solid #7fd4ff;background:linear-gradient(180deg,#2f9bff,#0a55e6);color:#fff;font-size:var(--l);font-weight:800;cursor:pointer;box-shadow:0 0 12px rgba(47,141,255,.8),inset 0 1px 0 rgba(255,255,255,.45)}
body.phone .list{display:flex;flex-direction:column;padding:.6vh 4vw 1.2vh;overflow:hidden;flex:0 0 auto;min-height:0;max-height:none}
body.phone .rowbtn{flex:0 0 auto;display:flex;align-items:center;gap:.8em;min-height:40px;padding:0;border:0;border-top:1px solid rgba(90,140,235,.45);background:transparent;color:#fff;text-align:left;cursor:pointer;font-size:var(--s);font-weight:600;min-width:0}
body.phone .rowbtn:first-child{border-top:0}
body.phone .rowbtn.acct{font-size:var(--t);font-weight:800;min-height:52px}body.phone .avatar{color:#fff;background:linear-gradient(180deg,#2f9bff,#0a55e6);border:1.5px solid #7fd4ff;border-radius:50%;padding:.28em;box-shadow:0 0 10px rgba(47,141,255,.8)}
body.phone .rowbtn.sub{padding-left:calc(var(--t)*1.6 + .9em)}body.phone .ri{color:#d6e4ff}body.phone .ri svg{width:1.5em;height:1.5em}
body.phone .rl{flex:0 1 auto;min-width:0;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}body.phone .rv{color:#3fd9ff;font-weight:800;font-size:var(--s);white-space:nowrap}
body.phone .grow{flex:1 1 0}body.phone .chev{color:#3fd9ff}body.phone .chev svg{width:1.3em;height:1.3em}
body.phone .adr{margin-top:.5vh;display:flex;align-items:center;justify-content:center;gap:.6em;min-height:42px;border-radius:16px;border:1px solid #2f66d6;background:rgba(5,12,36,.85);color:#fff;font-size:var(--l);font-weight:700;cursor:pointer;min-width:0;padding:0 10px}
body.phone .adt{min-width:0;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}body.phone .az{font-weight:900}body.phone .cv,body.phone .ci{color:#3fa8ff}body.phone .ci svg{width:1.3em;height:1.3em}
/* Connecting from the phone: the code box and the connected card, inside the same Scan TV card. */
body.phone .g.scan .kl.small{font-size:var(--t);font-style:normal}
body.phone .chg{margin-top:.4em;min-height:40px;padding:0 1.1em;border-radius:999px;border:1px solid #bfe6ff;background:rgba(5,20,70,.55);color:#fff;font-size:var(--s);font-weight:800;cursor:pointer}
body.phone .codebox{flex-direction:column;gap:.5em;align-items:center}body.phone .codebox .ks{color:#fff}
body.phone .coderow{display:flex;gap:.6em;align-items:center;justify-content:center}body.phone .coderow .chg{margin-top:0}
body.phone .coderow input{width:5.2em;height:48px;border-radius:14px;border:1.5px solid #bfe6ff;background:rgba(5,14,48,.8);color:#fff;font-size:var(--t);font-weight:900;text-align:center;letter-spacing:.18em}
body.phone .err{min-height:1.2em;font-size:var(--s);font-weight:700;color:#ffe08a;text-align:center}
body.phone .g.sel{box-shadow:0 0 0 2px #fff,0 0 22px var(--gl),inset 0 1px 0 rgba(255,255,255,.5)}
/* The TV channel of the same app, same style: navy glow, the two tabs on top, the party in the centre. */
body.tv{background:radial-gradient(110% 60% at 50% 0%,rgba(30,110,255,.5),rgba(8,20,60,0) 62%),linear-gradient(180deg,#07123a,#050b22 55%,#040817);color:#fff}
body.tv #app{max-width:none;height:100vh}
body.tv .tvbrand,body.tv .tvname{color:#fff;font-weight:900;font-style:italic;text-shadow:0 0 18px rgba(60,160,255,.9)}
body.tv .tvcode{color:#3fd9ff;text-shadow:0 0 24px rgba(60,200,255,.7)}
.tvparty{width:100%;height:100%;display:flex;flex-direction:column;gap:2.2vh;padding:3vh 4vw 4vh}
.tvname{margin:0;text-align:center;font-size:3.2vw}
.tvtabs{display:flex;gap:2vw;justify-content:center}
.tvtab{flex:0 1 34vw;display:flex;align-items:center;justify-content:center;gap:1vw;padding:1.6vh 2vw;border-radius:2.2vw;font-size:2.6vw;font-weight:800;border:.18vw solid var(--e);background:linear-gradient(160deg,var(--a),var(--b) 58%,var(--a));opacity:.38}
.tvtab.on{opacity:1;box-shadow:0 0 2.4vw var(--gl),inset 0 .1vw 0 rgba(255,255,255,.4)}
.tvtab .ic svg{width:3vw;height:3vw;display:block}
.tvmain{flex:1 1 0;min-height:0;display:flex;flex-direction:column;align-items:center;justify-content:center;gap:2vh;border-radius:2.6vw;border:.18vw solid var(--e);background:linear-gradient(180deg,rgba(26,48,110,.6),rgba(12,24,66,.6));box-shadow:0 0 2.6vw var(--gl)}
.tvbig{margin:0;font-size:7vw;font-weight:900;font-style:italic;text-shadow:0 0 2vw var(--gl)}.tvhint{margin:0;font-size:2.8vw;font-weight:700;color:#cfe6ff}
body.tv .purple{--a:#4a14b8;--b:#8a3cf0;--e:#c79bff;--gl:rgba(150,80,255,.6)}body.tv .orange{--a:#9c4300;--b:#f08a12;--e:#ffcf7a;--gl:rgba(255,150,30,.6)}
/* Photo row: Choose (smaller), Take a photo (bigger, centre), Photos (smaller). The centre label keeps the label size so it fits. */
body.phone .g.green.big{font-size:var(--l)}
/* My Party TV as the hero in the middle of the screen: large, italic, glowing. */
body.phone .lowhd{padding:.4vh 0}
body.phone .name{font-size:clamp(32px,min(12vw,5.4vh),68px);font-weight:900;font-style:italic;letter-spacing:-.01em;line-height:1.05;color:#fff;background:linear-gradient(180deg,#ffffff,#8fd8ff);-webkit-background-clip:text;background-clip:text;-webkit-text-fill-color:transparent;filter:drop-shadow(0 0 10px rgba(60,170,255,.85))}
/* The hero opens a centred card: name, address, how it works. A close X on top and at the bottom. Everything centred. */
body.phone button.name{border:0;padding:0;cursor:pointer;font-family:inherit}
.ov{position:fixed;inset:0;z-index:50;display:flex;align-items:center;justify-content:center;padding:5vw;background:rgba(2,5,18,.72);backdrop-filter:blur(4px)}
.about{width:100%;max-width:480px;max-height:92vh;overflow:auto;display:flex;flex-direction:column;align-items:center;gap:1.6vh;padding:2vh 5vw;text-align:center;color:#fff;border-radius:28px;border:1.5px solid #5cc6ff;background:radial-gradient(120% 60% at 50% 0%,rgba(30,110,255,.55),rgba(8,20,60,0) 65%),linear-gradient(180deg,#0a1a52,#060d2a);box-shadow:0 0 26px rgba(47,141,255,.7),inset 0 1px 0 rgba(255,255,255,.25)}
.xb{flex:0 0 auto;width:44px;height:44px;border-radius:50%;border:1px solid #7fd4ff;background:linear-gradient(180deg,#2f9bff,#0a55e6);color:#fff;font-size:28px;font-weight:700;line-height:1;cursor:pointer;box-shadow:0 0 12px rgba(47,141,255,.8)}
.ahero{margin:0;font-size:clamp(32px,min(12vw,5.4vh),68px);font-weight:900;font-style:italic;line-height:1.05;background:linear-gradient(180deg,#fff,#8fd8ff);-webkit-background-clip:text;background-clip:text;-webkit-text-fill-color:transparent;filter:drop-shadow(0 0 10px rgba(60,170,255,.85))}
.aurl{margin:0;padding:.5em 1.1em;border-radius:999px;border:1px solid #2f66d6;background:rgba(5,12,36,.85);font-size:clamp(15px,min(5vw,2.25vh),28px);font-weight:700;color:#3fd9ff;overflow-wrap:anywhere}
.ahow{list-style:none;margin:0;padding:0;display:flex;flex-direction:column;gap:1.4vh;width:100%}
.ahow li{display:flex;flex-direction:column;align-items:center;gap:.4em;font-size:clamp(15px,min(5vw,2.25vh),28px);font-weight:700;line-height:1.25}
.anum{display:inline-flex;align-items:center;justify-content:center;width:1.9em;height:1.9em;border-radius:50%;background:linear-gradient(180deg,#8a3cf0,#4a14b8);border:1px solid #c79bff;font-weight:900;box-shadow:0 0 10px rgba(150,80,255,.6)}
/* The address inside "how it works": in the same line as its sentence, no frame, lit in cyan. */
.hurl{white-space:nowrap;color:#3fe0ff;font-weight:900;font-size:1.12em;text-shadow:0 0 10px rgba(60,210,255,.9)}
.hurl .az{font-weight:900;color:#fff}
/* The card always fits the screen with zero scroll: every size inside it shrinks together (--k) until it fits. */
.ov{padding:3vw}
.about{overflow:hidden;max-height:calc(100dvh - 6vw);gap:calc(var(--k,1)*1.5vh);padding:calc(var(--k,1)*1.8vh) 5vw}
.about .xb{width:calc(var(--k,1)*44px);height:calc(var(--k,1)*44px);font-size:calc(var(--k,1)*28px);min-width:34px;min-height:34px}
.about .ahero{font-size:calc(var(--k,1)*clamp(32px,min(12vw,5.4vh),68px))}
.about .aurl{font-size:calc(var(--k,1)*clamp(15px,min(5vw,2.25vh),28px))}
.about .ahow{gap:calc(var(--k,1)*1.3vh)}
.about .ahow li{font-size:calc(var(--k,1)*clamp(15px,min(5vw,2.25vh),28px));gap:calc(var(--k,1)*.4em)}
/* Floating How: a yellow bulb in the top left corner, above the layout, gently pulsing. It opens the how-it-works card. */
body.phone #app{position:relative}
body.phone .howfab{position:absolute;z-index:5;top:calc(1.2vh + env(safe-area-inset-top));left:max(2.2vw,env(safe-area-inset-left));display:flex;flex-direction:column;align-items:center;gap:0;padding:2px 6px;border:0;background:transparent;color:#ffd83a;font-size:clamp(11px,min(3.3vw,1.5vh),18px);font-weight:900;cursor:pointer;animation:howfloat 5.2s ease-in-out infinite;filter:drop-shadow(0 0 8px rgba(255,214,58,.9))}
body.phone .howfab .ic svg{width:2.4em;height:2.4em;animation:howglow 3.6s ease-in-out infinite}
@keyframes howfloat{0%,100%{transform:translateY(0)}50%{transform:translateY(-4px)}}
@keyframes howglow{0%,100%{opacity:.8;filter:drop-shadow(0 0 2px rgba(255,214,58,.6))}50%{opacity:1;filter:drop-shadow(0 0 10px rgba(255,230,120,1))}}
@media (prefers-reduced-motion:reduce){body.phone .howfab,body.phone .howfab .ic svg{animation:none}}
/* Address on its own line, its sentence on the next line. */
.hline{display:flex;flex-direction:column;align-items:center;gap:.25em}
.hurl{font-size:1.25em}
/* Info card, neutral tones: the numbers in teal-blue. */
.anum{background:linear-gradient(180deg,#19b8c9,#0a6a8c);border-color:#7fe9f2;box-shadow:0 0 10px rgba(40,200,220,.6)}
/* The free-days counter beside the plan name. */
body.phone .planline{flex-wrap:wrap;row-gap:.2em}
body.phone .count{display:inline-flex;align-items:baseline;gap:.35em;padding:.15em .7em;border-radius:999px;border:1px solid #ffd83a;background:rgba(60,45,0,.45);color:#ffe27a;font-size:var(--s);font-weight:800;white-space:nowrap;box-shadow:0 0 10px rgba(255,214,58,.45)}
body.phone .cnum{font-size:var(--t);font-weight:900;color:#ffd83a;line-height:1}
/* App-wide dynamic sizing: one factor (--k, set by the app) scales every text, key and gap of the phone screen together. */
body.phone #app{--t:calc(var(--k,1)*clamp(20px,min(7.2vw,3.3vh),40px));--l:calc(var(--k,1)*clamp(15px,min(5vw,2.25vh),28px));--s:calc(var(--k,1)*clamp(13px,min(4.2vw,1.9vh),23px));--x:calc(var(--k,1)*clamp(12px,min(3.6vw,1.65vh),20px));gap:calc(var(--k,1)*1.4vh)}
body.phone .low{gap:calc(var(--k,1)*1.3vh)}
body.phone .name{font-size:calc(var(--k,1)*clamp(32px,min(12vw,5.4vh),68px))}
body.phone .planname{font-size:calc(var(--k,1)*clamp(26px,min(9.5vw,4.3vh),54px))}
body.phone .plan{padding:calc(var(--k,1)*1.2vh) 5vw calc(var(--k,1)*1.5vh);gap:calc(var(--k,1)*1vh)}
body.phone .see{min-height:calc(var(--k,1)*44px)}
body.phone .seg{min-height:calc(var(--k,1)*44px)}
body.phone .rowbtn{min-height:calc(var(--k,1)*40px)}body.phone .rowbtn.acct{min-height:calc(var(--k,1)*52px)}body.phone .rowbtn.small{min-height:calc(var(--k,1)*34px);font-size:var(--x)}
body.phone .adr{min-height:calc(var(--k,1)*42px)}
body.phone .list{padding:calc(var(--k,1)*.6vh) 4vw calc(var(--k,1)*1.2vh)}
body.phone .field input{height:calc(var(--k,1)*48px)}
/* Keys: icon and label at the app's own sizes (scaled by --k); the app lowers --k whenever any key's content would not fit. */
body.phone .g.col{gap:.25em;padding:6px}
body.phone .g.col .ic svg{width:2em;height:2em}
body.phone .g.col .kl{font-size:var(--l)}body.phone .g.col.big .kl{font-size:var(--t)}body.phone .g.col.green.big .kl{font-size:var(--l)}
body.phone .g.scan .kl{font-size:calc(var(--k,1)*clamp(30px,min(11.5vw,5.2vh),64px))}
body.phone .g.scan .ic svg{width:calc(var(--k,1)*clamp(56px,20vw,120px));height:calc(var(--k,1)*clamp(56px,20vw,120px))}
/* Less empty space around the texts: labels a step larger, tighter padding and gaps. Rows keep their height (content never stretches a row). */
body.phone .top .row{min-height:0;overflow:visible}
body.phone .top .row .g{min-height:0}
body.phone .g{padding:2px 6px;gap:.45em}
body.phone .g.col{padding:3px 4px;gap:.15em}
body.phone .row .g:not(.col) .kl{font-size:calc(var(--l)*1.2)}
body.phone .g.col .kl{font-size:calc(var(--l)*1.2)}
body.phone .g.col.big .kl{font-size:calc(var(--t)*1.15)}
body.phone .g.col.green.big .kl{font-size:calc(var(--l)*1.2)}
body.phone .g .kl{line-height:1.05}
/* How bulb stays inside the top row: no taller than the Host | Guest switch, so it never sits on the Scan TV card. */
body.phone .howfab{height:calc(var(--k,1)*44px);justify-content:center;padding:0 4px;line-height:1;font-size:calc(var(--k,1)*clamp(10px,min(3vw,1.35vh),15px))}
body.phone .howfab .ic svg{width:calc(var(--k,1)*24px);height:calc(var(--k,1)*24px)}
@keyframes howfloat{0%,100%{transform:translateY(0)}50%{transform:translateY(-2px)}}
/* How: bulb and word side by side, on one line, inside the top row. */
body.phone .howfab{flex-direction:row;align-items:center;gap:.2em;padding:0 2px;left:max(1.6vw,env(safe-area-inset-left))}
body.phone .howfab .ic svg{width:calc(var(--k,1)*22px);height:calc(var(--k,1)*22px)}
/* How keeps its original size (bulb 2.4em, label as first set); only the arrangement is side by side. */
body.phone .howfab{font-size:clamp(11px,min(3.3vw,1.5vh),18px);height:calc(var(--k,1)*44px)}
body.phone .howfab .ic svg{width:2.4em;height:2.4em}
/* How, bigger. */
body.phone .howfab{font-size:clamp(14px,min(4.3vw,1.95vh),23px)}
/* How, between the two sizes. */
body.phone .howfab{font-size:clamp(12px,min(3.8vw,1.72vh),20px)}
/* Plan line: crown, "Your plan", the plan name and the free-days counter all on ONE line. */
body.phone .planline{flex-wrap:nowrap;gap:.4em;min-width:0}
body.phone .planline .mu{font-size:var(--s);flex:0 0 auto}
body.phone .planline .planname{font-size:calc(var(--t)*1.05);flex:0 0 auto}
body.phone .planline .crown svg{width:1.3em;height:1.3em}
body.phone .count{flex:0 1 auto;min-width:0;font-size:var(--x);padding:.1em .55em;gap:.3em;overflow:hidden}
body.phone .cnum{font-size:var(--l)}
/* Top right, opposite the How bulb: the three plan names as text, floating. A tap opens the Plans card. */
body.phone .plfab{position:absolute;z-index:5;top:calc(1.2vh + env(safe-area-inset-top));right:max(1.6vw,env(safe-area-inset-right));height:calc(var(--k,1)*44px);display:flex;flex-direction:column;align-items:flex-end;justify-content:center;gap:0;padding:0 2px;border:0;background:transparent;cursor:pointer;font-size:clamp(10px,min(3vw,1.35vh),15px);font-weight:900;line-height:1.08;text-shadow:0 0 6px rgba(0,0,0,.6)}
body.phone .pf0{color:#ffffff}body.phone .pf1{color:#3fd9ff}body.phone .pf2{color:#ffd83a}
/* Plans card: same card as How, neutral tones. */
.pgift{margin:0;padding:.4em 1em;border-radius:999px;border:1px solid #ffd83a;background:rgba(60,45,0,.45);color:#ffe27a;font-weight:800;font-size:calc(var(--k,1)*clamp(13px,min(4.2vw,1.9vh),23px))}
.plist{list-style:none;margin:0;padding:0;width:100%;display:flex;flex-direction:column;gap:calc(var(--k,1)*1.3vh)}
.pl{display:flex;flex-direction:column;align-items:center;gap:.15em;padding:calc(var(--k,1)*1.2vh) 3vw;border-radius:20px;border:1.5px solid #2f66d6;background:linear-gradient(180deg,rgba(26,48,110,.72),rgba(12,24,66,.72))}
.pl.cur{border-color:#7fd4ff;box-shadow:0 0 16px rgba(47,141,255,.8)}
.pn{font-size:calc(var(--k,1)*clamp(22px,min(8vw,3.6vh),44px));font-weight:900;font-style:italic;line-height:1}
.pl.free .pn{color:#fff}.pl.pro .pn{color:#3fd9ff}.pl.ultra .pn{color:#ffd83a}
.pp{font-size:calc(var(--k,1)*clamp(15px,min(5vw,2.25vh),28px));font-weight:800}
.pd{font-size:calc(var(--k,1)*clamp(13px,min(4.2vw,1.9vh),23px));font-weight:600;color:#d6e4ff}
/* Top right: the one real plan of this account, as a single word. */
body.phone .plfab{font-size:clamp(14px,min(4.6vw,2.1vh),24px);font-style:italic;align-items:center}
/* Plan word: a bit smaller, a bit further left. */
body.phone .plfab{font-size:clamp(12px,min(4vw,1.82vh),21px);right:max(3.4vw,env(safe-area-inset-right))}
/* Plan word: its right text edge lines up with the right edge of the keys and cards below. */
body.phone .plfab{right:max(3vw,env(safe-area-inset-right));padding:0;align-items:flex-end;text-align:right}
/* Plan word: moved left, away from the edge. */
body.phone .plfab{right:max(6vw,env(safe-area-inset-right))}
/* Plan word: half-way back. */
body.phone .plfab{right:max(4.4vw,env(safe-area-inset-right))}
/* TV: guests' QR, lower right corner. */
.tvparty{position:relative}
.tvqr{position:absolute;right:4vw;bottom:4vh;display:flex;flex-direction:column;align-items:center;gap:1vh;padding:1.6vh;border-radius:2.2vh;background:rgba(6,14,44,.82);border:1px solid rgba(90,170,255,.6);box-shadow:0 0 26px rgba(40,130,255,.45)}
.tvqr svg{width:19vh;height:19vh;background:#fff;border-radius:1.2vh;padding:1vh;box-sizing:border-box;display:block}
.tvqrt{display:flex;flex-direction:column;align-items:center;text-align:center;max-width:22vh}
.tvqrt b{font-size:2.6vh;font-style:italic;font-weight:900;color:#3fd9ff}
.tvqrt span{font-size:1.5vh;color:#cfe0ff;line-height:1.25}
/* TV QR sits inside the frame, clear of its line. */
.tvmain{position:relative}
.tvqr{right:2.4vh;bottom:2.4vh}
/* TV QR: no box behind it. */
.tvqr{background:none;border:0;box-shadow:none;padding:0}
/* TV full screen: the party fills the whole screen, nothing around it. */
.tvparty{padding:0;gap:0}
.tvparty .tvname,.tvparty .tvtabs{display:none}
.tvparty .tvmain{border:0;border-radius:0;box-shadow:none;background:none}
.tvqr{right:4vh;bottom:4vh}
/* TV: site address above the QR. */
.tvqru{font-size:2vh;color:#fff;font-weight:600;white-space:nowrap}.tvqru b{font-weight:900}
/* TV: site address at the top of the screen, straight above the QR. */
.tvqru{position:absolute;top:4vh;right:4vh;font-size:2.6vh}
/* Quiz on the TV: content left, QR column right. */
.tvqz{width:100%;height:100%;box-sizing:border-box;padding:7vh 36vh 5vh 5vw;display:flex;flex-direction:column;justify-content:center;gap:2.6vh}
.tvqn{margin:0;font-size:2.4vh;color:#cfe0ff;font-weight:700;letter-spacing:.1em}
.tvq{margin:0;font-size:5.4vh;font-weight:900;line-height:1.15;color:#fff;text-shadow:0 0 18px rgba(120,150,255,.5)}
.tva{display:grid;grid-template-columns:1fr 1fr;gap:2vh}
.tvans{display:flex;align-items:center;gap:1.6vh;padding:2.2vh 2vh;border-radius:2.4vh;color:#fff;font-size:3.4vh;font-weight:800;background:linear-gradient(180deg,var(--b),var(--a));border:.25vh solid var(--e);box-shadow:0 0 2.4vh var(--gl);min-width:0}
.tvans b{flex:0 0 auto;width:5.4vh;height:5.4vh;border-radius:50%;background:rgba(255,255,255,.22);display:flex;align-items:center;justify-content:center;font-size:3.4vh;font-style:italic}
.tvans span{min-width:0;overflow-wrap:anywhere;line-height:1.1}
.tvans.dim{opacity:.28}.tvans.win{box-shadow:0 0 0 .5vh #fff,0 0 5vh var(--gl);transform:scale(1.03)}
body.tv .tvans.teal{--a:#0a6a64;--b:#18c9b8;--e:#8ff3e6;--gl:rgba(30,220,200,.55)}body.tv .tvans.pink{--a:#a01450;--b:#ee3d8c;--e:#ffa0c8;--gl:rgba(255,70,150,.55)}
.tvbar{height:1.6vh;border-radius:1vh;background:rgba(255,255,255,.14);overflow:hidden}.tvbar i{display:block;height:100%;width:100%;border-radius:1vh;background:linear-gradient(90deg,#3fd9ff,#7a5cff)}
.tvtop{display:flex;flex-wrap:wrap;gap:1.6vh 3vh;align-items:center}
.tvt{display:flex;align-items:baseline;gap:1vh;font-size:3vh;color:#fff;font-weight:800}.tvt b{color:#3fd9ff;font-style:italic}.tvt em{font-style:normal;color:#ffd36a;font-size:2.4vh}
.tvwin{margin:0;font-size:8vh;font-weight:900;font-style:italic;color:#ffd36a;text-shadow:0 0 3vh rgba(255,200,80,.6)}
/* Quiz choice keys on the host phone. */
.pk{width:100%;cursor:pointer;color:#fff;font:inherit}.pl.pk .pn{font-size:calc(var(--k,1)*2.4vh)}
/* Group Photo on the TV: full screen loop, soft cross-fade with a slow zoom. */
.tvph{position:absolute;inset:0;background:#050b22;overflow:hidden;border-radius:0}
.tvph img{position:absolute;inset:0;width:100%;height:100%;object-fit:contain;opacity:0;transform:scale(1)}
.tvph img.in{opacity:1;transform:scale(1.06);transition:opacity 1.4s ease,transform 8s linear}
.tvph img.out{opacity:0;transform:scale(1.06);transition:opacity 1.4s ease}
.tvphn{position:absolute;left:4vh;bottom:3.4vh;margin:0;font-size:3.2vh;font-weight:800;font-style:italic;color:#fff;text-shadow:0 0 1.6vh #000,0 0 .6vh #000}
.tvqr,.tvqru{z-index:2}
.toast{position:fixed;left:50%;bottom:calc(6vh + env(safe-area-inset-bottom));transform:translateX(-50%);padding:1.2vh 4vw;border-radius:999px;background:rgba(10,24,70,.92);border:1px solid #3fd9ff;color:#fff;font-weight:800;font-size:2.2vh;z-index:50;white-space:nowrap}
/* Album, QR scan, quiet states. */
.pgrid{width:100%;max-height:46vh;overflow:auto;display:grid;grid-template-columns:1fr 1fr;gap:1.2vh;align-content:start}
.ptile{display:flex;flex-direction:column;gap:.6vh;border-radius:16px;overflow:hidden;border:1px solid #2f66d6;background:rgba(12,24,66,.8)}
.ptile img{width:100%;aspect-ratio:1;object-fit:cover;display:block;background:#0b1640}
.pbar{display:flex;gap:1vw;padding:0 1vw 1vh}
.pbtn{flex:1;text-align:center;padding:.9vh 1vw;border-radius:999px;border:0;background:linear-gradient(180deg,#2f8bff,#1450c8);color:#fff;font:inherit;font-size:1.7vh;font-weight:800;text-decoration:none;cursor:pointer}
.pbtn:last-child{background:linear-gradient(180deg,#ee3d8c,#a01450)}
.pnone{margin:0;color:#cfe0ff;font-size:2vh;text-align:center}
.sv{width:100%;max-height:34vh;border-radius:18px;background:#000;object-fit:cover}
/* Choose card: the address field takes the width. */
.about .field{width:100%}.about .coderow{width:100%}
body.phone .about .coderow input{flex:1;min-width:0;width:auto;text-align:left;letter-spacing:0;font-size:2vh;font-weight:600;padding:0 14px}
.about .pbtn{flex:0 0 auto;padding:1.4vh 5vw;font-size:2vh}
.pl.pk{display:flex;flex-direction:row;align-items:center;justify-content:center;gap:2vw;width:100%}
/* TV: video and YouTube fill the screen. */
.tvmedia{position:absolute;inset:0;width:100%;height:100%;border:0;background:#000;object-fit:contain}
.pvid{width:100%;aspect-ratio:1;display:flex;align-items:center;justify-content:center;background:#0b1640;color:#fff;font-size:2.4vh;font-weight:800}
/* Photos album: tiles fit the card, both buttons visible, dark slim scrollbar */
.pgrid{grid-template-columns:repeat(2,minmax(0,1fr));scrollbar-width:thin;scrollbar-color:#2f66d6 transparent}
.pgrid::-webkit-scrollbar{width:6px}.pgrid::-webkit-scrollbar-thumb{background:#2f66d6;border-radius:6px}.pgrid::-webkit-scrollbar-track{background:transparent}
.ptile{min-width:0}
.about .pbar .pbtn,.pbar .pbtn{flex:1 1 0;min-width:0;padding:1.1vh 0;font-size:1.7vh}
/* Scores: every guest, three columns, ranked down the columns; the text shrinks when the family is big */
.tvtop{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));grid-auto-flow:row;gap:1.2vh 2vh;align-items:center;width:min(100%,150vh);max-height:34vh;overflow:hidden}
.tvt{min-width:0;font-size:2.8vh}.tvt span{min-width:0;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.tvt em{white-space:nowrap}
.tvtop{grid-auto-rows:4.4vh;max-height:38vh}
.tvtop{grid-template-columns:repeat(4,minmax(0,1fr));width:min(100%,190vh)}.tvt{font-size:2.6vh}.tvt em{font-size:2.1vh}
.tvtop{max-height:15.6vh}
.tvqn,.tvq{text-align:center}
/* Plan locks: a feature the plan does not include stays visible, greyed, and gives its reason on a tap or click */
.lock{opacity:.42;filter:grayscale(1);cursor:not-allowed}
body.phone .seg.lock{box-shadow:none}
.tvqr.lock svg{opacity:.5}
/* install pill: small and compact, never a bar */
.instpill{position:fixed;left:50%;top:50%;transform:translate(-50%,-50%);z-index:40;border:2px solid #b4f77a;border-radius:999px;padding:.45em .9em;font:inherit;font-size:clamp(24px,3.6vh,36px);line-height:1.1;font-weight:900;color:#fff;background:linear-gradient(160deg,#1c7d10,#4fc21a 58%,#1c7d10);text-shadow:0 1px 3px rgba(0,0,0,.55);box-shadow:0 10px 28px rgba(0,0,0,.75),0 3px 8px rgba(0,0,0,.6),0 0 26px rgba(90,220,40,.8),inset 0 1px 0 rgba(255,255,255,.45);cursor:pointer;white-space:nowrap;touch-action:manipulation}.instpill:active{transform:translate(-50%,-50%) scale(.96)}
.avis{margin:1vh 0 0;text-align:center;font-size:1.7vh;color:#aebbd6}
/* press feedback: keys react to touch, sizes and layout unchanged */
body.phone .g,body.phone .seg,body.phone .rowbtn,body.phone .see,body.phone .chg,body.phone .howfab,body.phone .plfab{transition:transform .12s ease,filter .12s ease;touch-action:manipulation;-webkit-user-select:none;user-select:none}
body.phone .g:active:not(.lock),body.phone .see:active,body.phone .chg:active{transform:scale(.96);filter:brightness(1.15)}
body.phone .seg:active,body.phone .rowbtn:active,body.phone .howfab:active,body.phone .plfab:active{transform:scale(.97);filter:brightness(1.2)}
@media (prefers-reduced-motion:reduce){body.phone .g,body.phone .seg,body.phone .rowbtn,body.phone .see,body.phone .chg,body.phone .howfab,body.phone .plfab{transition:none}}
/* top row: How, Host/Guest and the plan never overlap; side items hug the frame edges at every screen size */
body.phone .howfab{left:max(min(1.6vw,10px),env(safe-area-inset-left))}
body.phone .plfab{right:max(min(3vw,14px),env(safe-area-inset-right))}
body.phone .seg{padding:0 .75em;gap:.4em}
/* plan line: the free-days badge is never cut; the whole line shrinks a little instead (still one line) */
body.phone .count{flex:0 0 auto;overflow:visible}
body.phone .planline{transform-origin:center}
/* plan line bigger: Your plan / Ultra / 01/30 left */
body.phone .planline{gap:.5em}
body.phone .planline .mu{font-size:var(--l)}
body.phone .planline .planname{font-size:calc(var(--t)*1.35)}
body.phone .planline .crown svg{width:1.5em;height:1.5em}
body.phone .count{font-size:var(--l);padding:.12em .6em}
body.phone .cnum{font-size:var(--t)}
/* top-right plan word: further in from the frame edge */
body.phone .plfab{right:max(min(6vw,28px),env(safe-area-inset-right))}
/* TV door screen: the two phone steps, numbered like the How card, above the code */
.tvsteps{list-style:none;margin:0 auto 3vw;padding:0;display:inline-flex;flex-direction:column;gap:1.4vw;text-align:start}
.tvsteps li{display:flex;align-items:center;gap:1.2vw;font-size:2.6vw;font-weight:700;line-height:1.25;color:#f5f6f7}
.tvn{flex:0 0 auto;display:inline-flex;align-items:center;justify-content:center;width:1.8em;height:1.8em;border-radius:50%;background:linear-gradient(180deg,#8a3cf0,#4a14b8);border:1px solid #c79bff;font-weight:900;color:#fff}
.tvurl{white-space:nowrap;color:#3fe0ff;font-weight:900;text-shadow:0 0 10px rgba(60,210,255,.9)}
.tvurl .az{color:#fff}
