/* Portrait UI V2 (candidate). Everything here applies only with ?ui=v2 (class "ui-v2" on <body>, set by config.js)
   and only in portrait. Without the switch the page is exactly the current layout.
   Numbers are stage pixels (1080×1920). Window positions were measured from panel_portrait_v2_candidate.png;
   see review/portrait-v2/SPEC_V2.md, section 7. */

/* ---- switches that work in every layout ---- */
body.hide-dev #top { display: none; }
body.no-fast #turbo { display: none; }
body.no-auto #auto { display: none; }

/* ---- L0: the background, its own layer, as wide as the stage and taller (1080×2400, the middle 1920 is the stage) ---- */
#bgfull { display: none; }
body.fullbg.portrait #bgfull { display: block; position: fixed; left: 50%; top: 50%; width: min(100vw, 56.25vh); width: min(100vw, 56.25dvh); aspect-ratio: 1080 / 2400; transform: translate(-50%, -50%); background: url(/art/web/bg_portrait_v2_candidate.webp) center / 100% 100% no-repeat; pointer-events: none; }
/* soft ends, for screens taller than the picture */
body.fullbg.portrait #bgfull::before { content: ""; position: absolute; inset: 0; background: linear-gradient(180deg, #03060f 0, rgba(3, 6, 15, 0) 4%, rgba(3, 6, 15, 0) 94%, #03060f 100%); }
body.fullbg.portrait #bgfull::after { content: ""; position: absolute; inset: 0; background: radial-gradient(ellipse at center, rgba(120, 40, 200, 0.18), rgba(40, 0, 90, 0.55)); opacity: 0; transition: opacity 0.6s; }
body.fullbg.portrait.free #bgfull::after { opacity: 1; }
/* big-win shade: the stage has its own (#shade); this darkens the background showing above and below the stage with it.
   Each bar is 10% of the picture's height = 22.22% of its width. */
body.fullbg.portrait #bgfull { --bar: min(22.3vw, 12.55vh); --bar: min(22.3vw, 12.55dvh); box-shadow: inset 0 var(--bar) 0 0 rgba(2, 4, 14, 0), inset 0 calc(-1 * var(--bar)) 0 0 rgba(2, 4, 14, 0); transition: box-shadow 0.25s; }
body.fullbg.portrait:has(#shade.on) #bgfull { box-shadow: inset 0 var(--bar) 0 0 rgba(2, 4, 14, 0.72), inset 0 calc(-1 * var(--bar)) 0 0 rgba(2, 4, 14, 0.72); }
body.fullbg.portrait #bg, body.fullbg.portrait #tint { display: none; }   /* the tint is on the full background instead, so it has no edge */

/* ---- L4: the painted panel. One picture, takes no clicks ---- */
body.ui-v2.portrait #dock { top: 0; bottom: auto; height: 801px; background: url(/art/web/panel_portrait_v2_candidate.webp) top center / 100% 100% no-repeat; filter: drop-shadow(0 -6px 14px rgba(0, 0, 0, 0.55)); }
body.ui-v2.portrait #dock::after { display: none; }

/* ---- L5: what sits in the panel's windows. The windows are painted, so the boxes lose their own frames ---- */
body.ui-v2.portrait .box { background: none; border: 0; box-shadow: none; border-radius: 26px; }
body.ui-v2.portrait #winbox { left: 268px; top: 137px; width: 544px; height: 123px; }
body.ui-v2.portrait #winbox::after { display: none; }
body.ui-v2.portrait #winbox::before { border-radius: 60px; }
body.ui-v2.portrait #winbox .lab { font-size: 22px; line-height: 1; }
body.ui-v2.portrait #winbox .num { font-size: 77px; }      /* 84 → 77: 8% smaller */
body.ui-v2.portrait #winq { font-size: 50px; }
body.ui-v2.portrait #winbox.pending { box-shadow: inset 0 0 22px rgba(90, 180, 255, 0.55); border-radius: 60px; }
body.ui-v2.portrait #netbox { left: 267px; top: 293px; width: 548px; height: 64px; background: none; }
body.ui-v2.portrait #msg { font-size: 28px; }
body.ui-v2.portrait #balbox { left: 47px; top: 440px; width: 319px; height: 120px; }
body.ui-v2.portrait #betbox { left: 715px; top: 440px; width: 320px; height: 120px; padding: 0 6px; }
body.ui-v2.portrait #betbox .num { font-size: 46px; }                    /* so 100.00 fits between the two buttons */

/* multiplier dial in the left alcove (160×290): 89% of its old size */
body.ui-v2.portrait #mult { left: 64px; top: 1248px; width: 150px; }
/* free spins left, in the right alcove (152×198) */
body.ui-v2.portrait #fs { left: 864px; top: 1279px; width: 152px; height: 198px; padding: 0 4px; display: flex; flex-direction: column; align-items: center; justify-content: center; background: none; border: 0; box-shadow: none; border-radius: 60px 60px 24px 24px; }
body.ui-v2.portrait #fs .lab { font-size: 19px; }
body.ui-v2.portrait #fsleft { font-size: 80px; }
body.ui-v2.portrait #fs[data-last="1"], body.ui-v2.portrait #fs[data-last="0"] { background: none; box-shadow: inset 0 0 30px rgba(255, 90, 60, 0.6); }
/* scatter lights in the slot at the top of the panel (260×47): 80% */
body.ui-v2.portrait #scmeter { left: 419px; top: 1182px; width: 245px; height: 43px; padding: 0 16px 0 6px; gap: 8px; background: none; border: 0; box-shadow: none; border-radius: 22px; }
body.ui-v2.portrait #scmeter img { width: 42px; height: 42px; }
body.ui-v2.portrait #sclights i { width: 18px; height: 18px; }
body.ui-v2.portrait #scmeter.full, body.ui-v2.portrait.suspense #scmeter { box-shadow: 0 0 22px 5px rgba(200, 120, 255, 0.8), inset 0 0 14px rgba(200, 120, 255, 0.5); }

/* ---- L6: buttons, at their approved sizes ---- */
body.ui-v2.portrait #spin { top: 517px; }                                   /* 350 wide, covers its seat */
body.ui-v2.portrait #info { left: 72px; top: 653px; }                       /* 122, seat centre (133, 1773) */
body.ui-v2.portrait #turbo { left: 217px; top: 653px; }                     /* 122, seat centre (278, 1773) */
body.ui-v2.portrait #auto { left: 780px; top: 652px; }                      /* 196×147, covers its seat, 10 above its centre */

/* ---- L7: tap areas, larger than the pictures (invisible) ---- */
body.ui-v2.portrait .mini, body.ui-v2.portrait .pill { position: relative; }
body.ui-v2.portrait .mini::after, body.ui-v2.portrait .pill::after, body.ui-v2.portrait #info::after, body.ui-v2.portrait #turbo::after { content: ""; position: absolute; }
body.ui-v2.portrait #betdown::after { left: -6px; top: -26px; width: 158px; height: 132px; }   /* left half of the bet window */
body.ui-v2.portrait #betup::after { right: -6px; top: -26px; width: 162px; height: 132px; }    /* right half */
body.ui-v2.portrait #info::after, body.ui-v2.portrait #turbo::after { inset: -6px; }            /* 134×134 */
body.fullbg.portrait .pill { position: relative; min-width: 128px; }
body.fullbg.portrait .pill::after { content: ""; position: absolute; inset: -14px -4px -80px; }                                   /* from the top of the stage down: about 149 high */
body.fullbg.portrait #rate::after { inset: -14px -12px -80px; }

/* ---- L8: status line, in the strip at the bottom of the panel ---- */
body.ui-v2.portrait #status { bottom: 33px; background: none; padding: 0; font-size: 21px; max-width: 980px; overflow: hidden; text-overflow: ellipsis; }

/* ================= V3 (?ui=v3): the current clean layout, kept as it is, plus three things =================
   1. the portrait background as its own full-screen layer, darkened so the board and the numbers lead
   2. larger tap areas   3. the display switches above.   No painted panel. */
/* one continuous dark console from the top of the controls to the bottom of the screen (no edge at the stage) */
body.ui-v3.portrait #bgfull::before { background: linear-gradient(180deg, #03060f 0, rgba(3, 6, 18, 0.42) 5%, rgba(3, 6, 18, 0.34) 22%, rgba(3, 6, 18, 0.5) 40%, rgba(3, 6, 18, 0.55) 53.7%, rgba(3, 6, 18, 0.94) 58.3%, rgba(3, 6, 18, 0.97) 90%, #03060f 100%); }
body.ui-v3.portrait #dock { background: none; }
/* tap areas (invisible) */
body.ui-v3.portrait .mini { position: relative; }
body.ui-v3.portrait .mini::after, body.ui-v3.portrait #info::after, body.ui-v3.portrait #turbo::after { content: ""; position: absolute; }
body.ui-v3.portrait #betdown::after { left: -12px; top: -24px; width: 155px; height: 132px; }   /* left half of the bet box */
body.ui-v3.portrait #betup::after { right: -12px; top: -24px; width: 155px; height: 132px; }    /* right half */
body.ui-v3.portrait #info::after, body.ui-v3.portrait #turbo::after { inset: -6px; }            /* 134×134 */

/* ================= V3.1 (?ui=v31): V3 plus the Founder review changes of 2026-11-15 (candidate) =================
   The body also has class ui-v3, so everything above for V3 applies. See review/portrait-v31/REVIEW_V31.md. */
/* B2 scatter progress: same place and size, one thin rim instead of three rings */
body.ui-v31.portrait #scmeter { border: 2px solid rgba(211, 154, 44, 0.75); background: rgba(10, 8, 30, 0.96); box-shadow: 0 4px 10px rgba(0, 0, 0, 0.45); }
body.ui-v31.portrait #scmeter.full, body.ui-v31.portrait.suspense #scmeter { box-shadow: 0 0 0 2px #ffe9a6, 0 0 34px 8px rgba(200, 120, 255, 0.9); }
/* B3 WIN window 652 -> 580 wide, the number stays 84px; the line under it follows */
body.ui-v31.portrait #winbox, body.ui-v31.portrait #netbox { left: 250px; width: 580px; }
/* B4 multiplier dial 18px higher */
body.ui-v31.portrait #mult { top: 1150px; }
/* B6 one type scale: label 26 / number 50 / WIN number 84; balance and bet get the same top margin as WIN */
body.ui-v31.portrait #balbox .num, body.ui-v31.portrait #betbox .num { line-height: 1.16; }
/* B7 the "this spin" line: neutral, low saturation, no glow */
body.ui-v31.portrait #msg, body.ui-v31.portrait #msg[data-tone="down"] { color: #c3cbe4; text-shadow: none; }
body.ui-v31.portrait #msg[data-tone="up"] { color: #c4e0cd; text-shadow: none; }
/* B8 menu + fast centred under BALANCE (centre 188), auto centred under BET (centre 892): mirror images about the spin button */
body.ui-v31.portrait #info { left: 57px; }
body.ui-v31.portrait #turbo { left: 197px; }
body.ui-v31.portrait #auto { left: 794px; }
body.ui-v31.portrait.no-fast #info { left: 127px; }
/* B9 a very faint blue light behind the spin button; no new artwork */
body.ui-v31.portrait #dock { background: radial-gradient(ellipse 460px 300px at 50% 590px, rgba(80, 160, 255, 0.13), rgba(80, 160, 255, 0) 70%); }

/* ================= V3.2 (?ui=v32): V3.1 plus two things (candidate) =================
   The body also has classes ui-v3 and ui-v31. */
/* 1. The free-spins box is always there, opposite the multiplier dial (dial centre x 114, box centre x 967), as tall as WIN + the line under it.
      Outside free spins it is dim and shows a dash, never a number. It lights up only when free spins really run (body.free, set by the game). */
body.ui-v32.portrait #fs { top: 1198px; height: 224px; padding: 0 6px; display: flex; flex-direction: column; align-items: center; justify-content: center; }
body.ui-v32.portrait:not(.free) #fs { opacity: 0.55; transform: none; filter: saturate(0.3) brightness(0.8); animation: none; }
body.ui-v32.portrait:not(.free) #fsleft { position: relative; visibility: hidden; }
body.ui-v32.portrait:not(.free) #fsleft::after { content: "\2013"; visibility: visible; position: absolute; inset: 0; color: #8f9ac0; text-shadow: none; }
/* 2. The top: the developer buttons are gone, so the logo moves up and is a little smaller (650 -> 580), and the top of the
      background is darkened much less, so the hall and the great clock show between the logo and the board. */
body.ui-v32.portrait #logo { width: 580px; left: 250px; top: 12px; }
body.ui-v32.portrait #bgfull::before { background: linear-gradient(180deg, #03060f 0, rgba(3, 6, 18, 0.2) 4%, rgba(3, 6, 18, 0.08) 12%, rgba(3, 6, 18, 0.12) 24%, rgba(3, 6, 18, 0.5) 40%, rgba(3, 6, 18, 0.55) 53.7%, rgba(3, 6, 18, 0.94) 58.3%, rgba(3, 6, 18, 0.97) 90%, #03060f 100%); }
body.ui-v32.portrait #fs .lab { font-size: 22px; letter-spacing: 0.5px; white-space: normal; line-height: 1.1; }   /* "FREE SPINS" was touching both sides of the box */

/* ================= V3.3 (?ui=v33): V3.2, with the control area darkened about 65% instead of 95% (candidate) ================= */
body.ui-v33.portrait #bgfull::before { background: linear-gradient(180deg, #03060f 0, rgba(3, 6, 18, 0.2) 4%, rgba(3, 6, 18, 0.08) 12%, rgba(3, 6, 18, 0.12) 24%, rgba(3, 6, 18, 0.5) 40%, rgba(3, 6, 18, 0.55) 53.7%, rgba(3, 6, 18, 0.66) 58.3%, rgba(3, 6, 18, 0.62) 76%, rgba(3, 6, 18, 0.8) 91%, #03060f 100%); }

/* ---- ?link=1: the amount a tumble won, flying into the WIN box. "plain" is for spins that do not end above the bet. ---- */
.fly.gain { font-size: 44px; color: #fff3c4; text-shadow: 0 3px 0 #6b3d00, 0 0 16px rgba(255, 190, 60, 0.9); }
.fly.gain.plain { font-size: 34px; color: #eef2ff; text-shadow: 0 2px 0 #000, 0 0 10px rgba(150, 190, 255, 0.85), 0 0 22px rgba(120, 170, 255, 0.5); }   /* visible on the dark console; pale blue, never gold */

/* Online playtest: a tester has one game only, so the game buttons are not shown — but RATE stays so they can score it. */
body.one-game.hide-dev #top { display: flex; justify-content: flex-end; }
body.one-game #versions { display: none; }
