/* WEVS console glass (PRJ-0033 task 7845, owner 2026-11-18: "the pages look extremely flat … this is Wolfatek after all").
   Loaded AFTER wevs-navy.css on the console only; it puts back what wevs-navy.css switched off (Crystal's glass) and goes
   further. Agreed by rendering side by side:
   - DARK "C": navy frosted glass over the waves, top-edge highlight, chrome conic rims, a flare behind the logo and the title,
     glowing step numbers, a chrome primary button with an occasional glint, faint stars. Default blur 16.
   - LIGHT liquid glass: the SAME waves inverted to a light variant, very clear panels with bright edges, the premium.css
     light veil thinned, a halo on labels that sit on the waves. Default blur 4.
   - INPUTS are glass too, as on the Crystal platform (blur at 40% of the panels').
   The person's own controls (Appearance panel behind the ◐ button, saved on their account): --glass-k = blur in px for the
   current mode, --bg-show = 0..100, how much of the background shows through the veil. Motion stops under reduced motion. */

html.bg-waves body:not(.light-mode) .glass, html.bg-waves body:not(.light-mode) .glass-hi,
html.bg-waves body:not(.light-mode) .card, html.bg-waves body:not(.light-mode) .kind{
  background:linear-gradient(115deg,rgba(255,255,255,.16) 0%,rgba(255,255,255,.04) 26%,transparent 42%),linear-gradient(160deg,rgba(96,165,250,.26) 0%,rgba(20,40,84,.48) 45%,rgba(6,14,36,.72) 100%) !important;
  -webkit-backdrop-filter:blur(calc(var(--glass-k,4) * 1px)) saturate(170%) !important; backdrop-filter:blur(calc(var(--glass-k,4) * 1px)) saturate(170%) !important;
  border:1px solid rgba(147,197,253,.22) !important;
  box-shadow:inset 0 1px 0 rgba(255,255,255,.55), inset 1px 0 0 rgba(255,255,255,.10), inset 0 -1px 0 rgba(0,0,0,.35), 0 18px 40px rgba(0,0,0,.42) !important; }
.btn:not(.btn-ghost){ background:linear-gradient(180deg,#ffffff 0%,#e2e8f0 46%,#b6c2d2 54%,#eef2f7 100%) !important; color:#0b1220 !important;
  border:1px solid rgba(255,255,255,.85) !important; box-shadow:inset 0 1px 0 #fff, inset 0 -2px 0 rgba(15,23,42,.18), 0 8px 22px rgba(56,189,248,.28) !important; }
body.light-mode .btn:not(.btn-ghost){ background:linear-gradient(180deg,#3b4453 0%,#232a34 50%,#171c24 100%) !important; color:#fff !important;
  border-color:#0f172a !important; box-shadow:inset 0 1px 0 rgba(255,255,255,.28), 0 8px 20px rgba(15,23,42,.25) !important; }
.btn.btn-ghost{ background:linear-gradient(180deg,rgba(255,255,255,.12),rgba(255,255,255,.02)) !important; box-shadow:inset 0 1px 0 rgba(255,255,255,.22) !important; }
html.bg-waves body:not(.light-mode).bg-photo::before{ background:
  radial-gradient(1px 1px at 12% 18%,rgba(255,255,255,.9),transparent 60%), radial-gradient(1px 1px at 72% 9%,rgba(255,255,255,.8),transparent 60%),
  radial-gradient(1.5px 1.5px at 38% 62%,rgba(186,230,253,.9),transparent 60%), radial-gradient(1px 1px at 88% 44%,rgba(255,255,255,.7),transparent 60%),
  radial-gradient(1px 1px at 22% 84%,rgba(255,255,255,.7),transparent 60%), radial-gradient(1.5px 1.5px at 60% 30%,rgba(255,255,255,.85),transparent 60%),
  radial-gradient(1px 1px at 93% 76%,rgba(186,230,253,.8),transparent 60%), radial-gradient(1px 1px at 5% 50%,rgba(255,255,255,.6),transparent 60%),
  radial-gradient(60% 40% at 80% 0%,rgba(56,189,248,.18),transparent 70%), radial-gradient(50% 35% at 0% 100%,rgba(129,140,248,.14),transparent 70%),
  linear-gradient(180deg,rgba(3,10,30,.45) 0%,rgba(5,16,44,.60) 55%,rgba(4,10,26,.94) 100%), url('/wevs-ui/wallpapers/hps-waves.webp') center top/cover no-repeat !important; }
.main .glass:not(.card), .kind{ position:relative; }
.glass:not(.card)::after, .kind::after{ content:""; position:absolute; inset:0; border-radius:inherit; padding:1px; pointer-events:none;
  background:conic-gradient(from 215deg,rgba(255,255,255,.85),rgba(125,211,252,.20) 18%,rgba(255,255,255,.04) 38%,rgba(186,230,253,.65) 55%,rgba(255,255,255,.06) 72%,rgba(255,255,255,.85));
  -webkit-mask:linear-gradient(#000 0 0) content-box,linear-gradient(#000 0 0); -webkit-mask-composite:xor; mask-composite:exclude; }
.top{ overflow:hidden; }
.top::before{ content:""; position:absolute; left:-10%; top:50%; width:70%; height:2px; transform:translateY(-50%); pointer-events:none;
  background:linear-gradient(90deg,transparent,rgba(125,211,252,.0) 10%,rgba(186,230,253,.9) 22%,rgba(255,255,255,.95) 24%,rgba(186,230,253,.5) 30%,transparent 70%); filter:blur(.6px); opacity:.55; }
.brand{ position:relative; }
.brand::before{ content:""; position:absolute; left:50%; top:50%; width:90px; height:90px; transform:translate(-50%,-50%); pointer-events:none;
  background:radial-gradient(circle,rgba(255,255,255,.55) 0%,rgba(125,211,252,.35) 18%,rgba(56,189,248,.10) 42%,transparent 66%); mix-blend-mode:screen; }
.main h1{ position:relative; text-shadow:0 0 18px rgba(125,211,252,.35); }
.main h1::before{ content:""; position:absolute; left:-30px; top:-36px; width:220px; height:110px; pointer-events:none; z-index:-1;
  background:radial-gradient(closest-side,rgba(56,189,248,.28),transparent); }
.btn:not(.btn-ghost){ position:relative; overflow:hidden; }
.btn:not(.btn-ghost)::after{ content:""; position:absolute; top:-40%; bottom:-40%; width:38%; left:-60%; transform:skewX(-22deg); pointer-events:none;
  background:linear-gradient(90deg,transparent,rgba(255,255,255,.85),transparent); animation:wevs-glint 6s ease-in-out infinite; animation-delay:var(--glint-delay,0s); }
@keyframes wevs-glint{ 0%,70%{ left:-60%; } 85%,100%{ left:130%; } }
.chip.on i{ box-shadow:0 0 0 3px rgba(56,189,248,.18), 0 0 14px rgba(56,189,248,.7); }
@media (prefers-reduced-motion:reduce){ .btn:not(.btn-ghost)::after{ animation:none; display:none; } }
/* Light: the same waves, turned light (invert + hue-rotate keeps the blues blue), under liquid glass */
html.bg-waves body.light-mode.bg-photo::before{ background:linear-gradient(180deg,rgba(5,20,55,.18) 0%,rgba(5,20,55,.30) 55%,rgba(8,16,36,.55) 100%), url('/wevs-ui/wallpapers/hps-waves.webp') center top/cover no-repeat !important;
  filter:invert(1) hue-rotate(180deg) saturate(1.1) brightness(1.06) contrast(.72); }
html.bg-waves body.light-mode .glass, html.bg-waves body.light-mode .glass-hi, html.bg-waves body.light-mode .card, html.bg-waves body.light-mode .kind{
  background:linear-gradient(135deg,rgba(255,255,255,.38) 0%,rgba(255,255,255,.10) 100%) !important;
  -webkit-backdrop-filter:blur(calc(var(--glass-k,4) * 1px)) saturate(190%) brightness(1.04) !important; backdrop-filter:blur(calc(var(--glass-k,4) * 1px)) saturate(190%) brightness(1.04) !important;
  border:1px solid rgba(255,255,255,.7) !important;
  box-shadow:inset 1.5px 1.5px 0 rgba(255,255,255,.95), inset -1px -1px 0 rgba(255,255,255,.4), inset 0 0 22px rgba(255,255,255,.28), 0 12px 30px rgba(20,60,120,.16) !important; }
body.light-mode .glass:not(.card)::after, body.light-mode .kind::after{ background:conic-gradient(from 215deg,#fff,rgba(125,211,252,.55) 18%,rgba(255,255,255,.25) 38%,rgba(255,255,255,.95) 55%,rgba(125,211,252,.35) 72%,#fff) !important; }
body.light-mode .kind:has(input:checked){ box-shadow:inset 1.5px 1.5px 0 #fff, 0 0 0 2px rgba(56,189,248,.45), 0 12px 30px rgba(56,189,248,.22) !important; }
body.light-mode .main h1::before{ background:radial-gradient(closest-side,rgba(56,189,248,.35),transparent) !important; }
/* premium.css veils the background ~80% white in light mode; liquid glass needs it to show, so the veil is thinned
   and weighted to the top only, where the headings sit */
html.bg-waves body.light-mode::after{ background:linear-gradient(180deg,rgba(244,248,252,.55) 0%,rgba(244,248,252,.18) 30%,rgba(244,248,252,.10) 70%,rgba(244,248,252,.25) 100%) !important; }
/* labels and headings that sit straight on the waves get a soft light halo so a line never runs through them */
body.light-mode .fld > label, body.light-mode .kinds legend, body.light-mode .main > h1, body.light-mode .main > .sub, body.light-mode .wizard-steps .chip{
  text-shadow:0 0 2px #fff, 0 0 6px rgba(255,255,255,.95), 0 0 12px rgba(255,255,255,.8); }
/* Inputs are glass too, as on the Crystal platform: a lighter blur (40% of the panel blur), a sheen, a bevelled edge */
.fld input:not([type=checkbox]):not([type=radio]), .fld select, .fld textarea{
  -webkit-backdrop-filter:blur(calc(var(--glass-k,4) * .4px)) saturate(160%) !important; backdrop-filter:blur(calc(var(--glass-k,4) * .4px)) saturate(160%) !important; }
body:not(.light-mode) .fld input:not([type=checkbox]):not([type=radio]), body:not(.light-mode) .fld select, body:not(.light-mode) .fld textarea{
  background:linear-gradient(180deg,rgba(255,255,255,.12),rgba(255,255,255,.03) 55%,rgba(255,255,255,.06)), rgba(14,34,74,.32) !important;
  border:1px solid rgba(147,197,253,.32) !important; box-shadow:inset 0 1px 0 rgba(255,255,255,.22), inset 0 -1px 0 rgba(0,0,0,.30), 0 4px 14px rgba(0,0,0,.18) !important; }
body.light-mode .fld input:not([type=checkbox]):not([type=radio]), body.light-mode .fld select, body.light-mode .fld textarea{
  background:linear-gradient(180deg,rgba(255,255,255,.70),rgba(255,255,255,.30) 55%,rgba(255,255,255,.45)) !important;
  border:1px solid rgba(255,255,255,.85) !important; box-shadow:inset 1px 1px 0 #fff, inset 0 -1px 0 rgba(30,64,120,.10), 0 4px 14px rgba(30,64,120,.10) !important; }

/* Background strength: the person's own dial (0 = the platform's veil, 100 = no veil at all) */
body::after{ opacity:calc(1 - var(--bg-show, 90) / 100); }

/* Appearance panel */
.ap-pop{ position:fixed; top:calc(env(safe-area-inset-top, 0px) + 72px); right:12px; width:min(320px, calc(100vw - 24px)); z-index:60;
  padding:16px 16px 12px; border-radius:16px; color:var(--text); display:none; }
.ap-pop.open{ display:block; }
.ap-pop h3{ margin:0 0 12px; font-size:15px; }
.ap-pop .ap-row{ margin:0 0 14px; }
.ap-pop .ap-lbl{ display:flex; justify-content:space-between; font-size:13px; color:var(--muted); margin-bottom:6px; }
.ap-pop .ap-seg{ display:grid; grid-template-columns:1fr 1fr; gap:6px; }
.ap-pop .ap-seg button{ min-height:40px; border-radius:10px; border:1px solid var(--glass-border-hi); background:transparent; color:var(--text); font:inherit; cursor:pointer; }
.ap-pop .ap-seg button.on{ background:rgba(var(--accent-rgb),.22); border-color:rgba(var(--accent-rgb),.7); }
.ap-pop input[type=range]{ width:100%; min-height:0; height:28px; accent-color:var(--accent); background:none !important; border:0 !important; box-shadow:none !important; padding:0; }
.ap-pop .ap-reset{ background:none; border:0; color:var(--accent); font:inherit; font-size:13px; cursor:pointer; padding:4px 0; }
/* The panel itself always keeps a strong frost, whatever the person's blur setting, so the page never shows through it */
html.bg-waves body #ap.ap-pop.glass-hi{ -webkit-backdrop-filter:blur(26px) saturate(170%) !important; backdrop-filter:blur(26px) saturate(170%) !important; }
html.bg-waves body:not(.light-mode) #ap.ap-pop.glass-hi{ background:linear-gradient(160deg,rgba(40,70,130,.70),rgba(8,18,42,.90)) !important; }
html.bg-waves body.light-mode #ap.ap-pop.glass-hi{ background:linear-gradient(160deg,rgba(255,255,255,.92),rgba(236,244,255,.86)) !important; }

/* NAV ICONS (2026-11-18): one line-icon set in the theme's colours, replacing emoji that kept their own colours
   (the palette and the red question mark). Shared by the phone tab bar and the desktop side menu. */
.bottomnav .ni{ width:24px; height:24px; display:block; margin:0 auto; color:var(--muted); filter:drop-shadow(0 1px 0 rgba(255,255,255,.08)); }
.bottomnav a.on .ni{ color:var(--accent); filter:drop-shadow(0 0 6px rgba(var(--accent-rgb),.65)); }
body.light-mode .bottomnav .ni{ color:#475569; }
body.light-mode .bottomnav a.on .ni{ color:#0284c7; filter:drop-shadow(0 0 5px rgba(2,132,199,.35)); }.side .ni{ width:20px; height:20px; display:inline-block; vertical-align:-4px; color:var(--muted); }
.side a.on .ni{ color:var(--accent); filter:drop-shadow(0 0 5px rgba(var(--accent-rgb),.55)); }
.bottomnav a span, .side a span{ font-size:0; line-height:0; }

/* Floating liquid-glass tab bar, after WhatsApp's: a capsule set in from the edges, the list visible beneath it,
   the active tab in its own inner capsule. A fixed strong frost, whatever the person's blur setting. */
@media (max-width:900px){
html.bg-waves body .bottomnav.glass{ left:10px !important; right:10px !important; bottom:calc(env(safe-area-inset-bottom, 0px) + 8px) !important;
  border-radius:999px !important; padding:6px !important; gap:2px; border-top:0 !important;
  -webkit-backdrop-filter:blur(22px) saturate(180%) !important; backdrop-filter:blur(22px) saturate(180%) !important; }
html.bg-waves body:not(.light-mode) .bottomnav.glass{ background:linear-gradient(180deg,rgba(40,60,100,.55),rgba(10,18,40,.72)) !important;
  border:1px solid rgba(186,230,253,.22) !important; box-shadow:inset 0 1px 0 rgba(255,255,255,.22), 0 10px 30px rgba(0,0,0,.55) !important; }
html.bg-waves body.light-mode .bottomnav.glass{ background:linear-gradient(180deg,rgba(255,255,255,.80),rgba(236,244,255,.70)) !important;
  border:1px solid rgba(255,255,255,.95) !important; box-shadow:inset 1px 1px 0 #fff, 0 10px 28px rgba(20,50,100,.20) !important; }
.bottomnav a{ border-radius:999px; min-height:52px !important; padding:4px 0 !important; color:var(--muted); font-weight:600; }
.bottomnav a.on{ color:var(--text); }
body:not(.light-mode) .bottomnav a.on{ background:rgba(255,255,255,.10); box-shadow:inset 0 1px 0 rgba(255,255,255,.12); }
body.light-mode .bottomnav a.on{ background:rgba(15,23,42,.07); }
.bottomnav .glass::after, .bottomnav.glass::after{ display:none !important; }
.main{ padding-bottom:110px !important; }
}

/* DESKTOP LAYOUT (owner 2026-11-18: "scroll is the enemy"): on wide screens the console sits in a centred column beside
   the menu (it hugged the left edge), each page's own inline form widths give way to that column, and form cards lay their
   fields out in two columns. A field standing alone (nothing to pair with) takes the full width; everything that is not a
   field (headings, notes, option cards, button rows, textareas) spans both. Phones are untouched. */
@media (min-width:901px){
  .main{ width:100%; max-width:1180px; margin-left:auto !important; margin-right:auto !important; box-sizing:border-box; }
  .main [style*="max-width"]:not(input):not(select):not(img):not(textarea){ max-width:none !important; }
  .main .card:has(> .fld){ display:grid; grid-template-columns:repeat(2,minmax(0,1fr)); column-gap:18px; align-items:start; }
  .main .card:has(> .fld) > *:not(.fld){ grid-column:1 / -1; }
  .main .card:has(> .fld) > .fld:has(textarea),
  .main .card:has(> .fld) > .fld:not(.fld + .fld):not(:has(+ .fld)){ grid-column:1 / -1; }
}

/* Pull to refresh: a chrome spinner that drops in under the header (console.html) */
#ptr{ position:fixed; z-index:20; left:50%; top:calc(env(safe-area-inset-top, 0px) + 66px); width:40px; height:40px; margin-top:-40px;
  display:grid; place-items:center; border-radius:50%; opacity:0; pointer-events:none; transform:translate(-50%, 0);
  color:#0b1220; background:linear-gradient(180deg,#ffffff,#cbd5e1 55%,#eef2f7); border:1px solid rgba(255,255,255,.9);
  box-shadow:0 8px 22px rgba(0,0,0,.35), 0 0 0 4px rgba(56,189,248,.12); transition:opacity .15s; }
#ptr.ready{ box-shadow:0 8px 22px rgba(0,0,0,.35), 0 0 0 4px rgba(56,189,248,.45), 0 0 18px rgba(56,189,248,.6); }
#ptr.spin svg{ animation:ptr-spin .8s linear infinite; }
@keyframes ptr-spin{ to{ transform:rotate(360deg); } }
@media (prefers-reduced-motion:reduce){ #ptr.spin svg{ animation-duration:2.4s; } }
