/* home-orbit-v2.css: the one-page Home ring (Oct 18 2026, Emmanuel). Eight controls, ONE true circle centred on Misty,
   one shared diameter (--o8-d), 45 degrees apart; positions come from home-orbit-v2.js (--o8-x/--o8-y per control).
   Only active under html.o8 (set by the shell when the circle fits); without it the old Home is untouched. */
html.o8 { --o8-i-scan: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='1.8' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M4 8V5.5A1.5 1.5 0 0 1 5.5 4H8M16 4h2.5A1.5 1.5 0 0 1 20 5.5V8M20 16v2.5a1.5 1.5 0 0 1-1.5 1.5H16M8 20H5.5A1.5 1.5 0 0 1 4 18.5V16M8 9v6M11 9v6M14 9v6M17 9v6'/%3E%3C/svg%3E"); }
html.o8 { --o8-i-fuel: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='1.8' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M3 4h2l2.2 10.2a2 2 0 0 0 2 1.6h7.6a2 2 0 0 0 2-1.5L21 8H6.2'/%3E%3Ccircle cx='10' cy='20' r='1.4'/%3E%3Ccircle cx='17' cy='20' r='1.4'/%3E%3C/svg%3E"); }
html.o8 { --o8-i-water: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='1.8' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M12 3.5c3.6 4.4 6 7.4 6 10.3a6 6 0 0 1-12 0c0-2.9 2.4-5.9 6-10.3z'/%3E%3C/svg%3E"); }
/* Nov 6 2026 (design review point 8): the Move bubble is a runner, no longer a pulse line */
html.o8 { --o8-i-move: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='1.8' stroke-linecap='round' stroke-linejoin='round'%3E%3Ccircle cx='14.6' cy='4.3' r='2' fill='black' stroke='none'/%3E%3Cpath d='M13 7.6 11 12.8M11 12.8l2.6 3-1 4.7M11 12.8l-2.4 3.6-3.2 1M13 7.6l3.2 2 2.4-1.4M13 7.6l-3 1-1.6 2.6'/%3E%3C/svg%3E"); }
html.o8 { --o8-i-gap: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='1.8' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M12 9v4.5l3 2M9.5 2.5h5M12 21.5a7.5 7.5 0 1 0 0-15 7.5 7.5 0 0 0 0 15z'/%3E%3C/svg%3E"); }
html.o8 { --o8-i-sleep: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='1.8' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M19.5 14.6A7.8 7.8 0 1 1 9.4 4.5a6.2 6.2 0 0 0 10.1 10.1z'/%3E%3C/svg%3E"); }
html.o8 { --o8-i-settings: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='1.8' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M4 7h9M17 7h3M4 17h3M11 17h9M15 5v4M9 15v4'/%3E%3C/svg%3E"); }
/* ---- the ring: every control on its spot, all the same size ---- */
html.o8.wh-home #whHud [data-orbit],
html.o8.wh-home #spHome #spFast[data-orbit] {
    position: absolute !important; left: var(--o8-x) !important; top: var(--o8-y) !important; right: auto !important; bottom: auto !important;
    width: var(--o8-d) !important; height: var(--o8-d) !important; min-width: 0 !important; min-height: 0 !important; margin: 0 !important;
}
/* the gentle float bob would pull controls off the circle at different phases: on the ring they hold their exact spot */
html.o8.wh-home #whHud [data-orbit], html.o8.wh-home #spHome #spFast[data-orbit] { translate: none !important; }
/* Oct 21 (instant back): Chromium lets a float that restarts (Home shown again after a page) win over the translate rule above, so the
   ring bubbles bobbed after coming back. Ring bubbles carry no float at all; water keeps its hold fill. */
html.o8.wh-home #whHud .lb-bub[data-orbit], html.o8.wh-home #spHome #spFast.lb-bub[data-orbit] { animation-name: none !important; }
html.o8.wh-home #whHud .wh-water.lb-bub.wh-holding[data-orbit] { animation: wh-hold .6s linear forwards !important; }
html.o8.wh-home #whHud .wh-pad[data-orbit] { transform: translate(-50%, -50%) !important; z-index: 3; }
html.o8.wh-home #whHud .wh-pad[data-orbit] .mp-knob { width: calc(var(--o8-d) * .42); height: calc(var(--o8-d) * .42); margin: calc(var(--o8-d) * -.21) 0 0 calc(var(--o8-d) * -.21); }
html.o8.wh-home #whHud .wh-pad[data-orbit] .mp-well { inset: calc(var(--o8-d) * .14); }
/* the first-run controller hint sits just under the joystick, never across the ring */
html.o8.wh-home #whHud #whPadChip { left: var(--o8-cx) !important; top: calc(var(--o8-joy-y) + var(--o8-d) / 2 + 8px) !important; bottom: auto !important; transform: translateX(-50%) !important; }

/* ---- the three new glass bubbles (Scan, Sleep, Settings): same glass as Water, membrane from living-bubbles.js ---- */
#whHud .o8-cell { display: none; }
html.o8.wh-home #whHud .o8-cell { display: flex; align-items: center; justify-content: center; position: absolute; border-radius: 50%; overflow: hidden; padding: 0;
    color: #fff; font: inherit; cursor: pointer; z-index: 2; pointer-events: auto; transform: translate(-50%, -50%);
    -webkit-touch-callout: none; -webkit-user-select: none; user-select: none; touch-action: manipulation; -webkit-tap-highlight-color: transparent;
    background: radial-gradient(circle at 34% 28%, rgba(255,255,255,.34), rgba(255,255,255,.06) 42%, rgba(120,190,255,.08) 70%, rgba(255,255,255,.16));
    border: 1px solid rgba(255,255,255,.42); box-shadow: inset 0 0 18px rgba(255,255,255,.18); }
html.o8.wh-home.lb3d #whHud .o8-cell { background: transparent; border-color: transparent; box-shadow: none; }
html.o8.wh-home #whHud .o8-sleep .wh-cell-fill { background: linear-gradient(180deg, rgba(190,170,255,.45), rgba(120,100,230,.7)); height: 0; }
html.o8.wh-home #whHud .o8-sleep.done .wh-cell-fill { height: 100%; }
html.o8.wh-home #whHud .o8-cell .wh-cell-tx { pointer-events: none; z-index: 2; }
html.o8.wh-home #whHud .o8-cell .o8-ico { width: calc(var(--o8-d) * .26); height: calc(var(--o8-d) * .26); display: block; margin-bottom: 2px; filter: drop-shadow(0 1px 4px rgba(0,30,80,.6)); }
html.o8.wh-home #whHud .o8-cell .wh-cell-tx small { font-size: calc(var(--o8-d) * .125); }
html.o8.wh-home #whHud .o8-cell .wh-cell-tx b { font-size: calc(var(--o8-d) * .14); font-weight: 650; }
/* inside a world the ring steps back, but never the joystick: misty-pad.css decides when it shows there (Misty in the world = you steer).
   Oct 18 hotfix (Emmanuel: "when I enter a world, the steering wheel disappears ... literally stuck"). tests/stuck-in-worlds*.cjs */
html.o8.wh-home.wh-away #whHud .o8-cell, html.o8.wh-home.wh-away #whHud [data-orbit]:not(#whPad) { opacity: 0 !important; pointer-events: none !important; }
@media (hover: hover) { html.o8.wh-home #whHud .o8-cell:hover { box-shadow: inset 0 0 22px rgba(255,255,255,.28); } }
html.o8.wh-home #whHud .o8-cell:focus-visible { outline: 2px solid #fff; outline-offset: 3px; }

/* ---- white line icons and permanent labels on the reused bubbles (CSS only, so their own painters keep their text) ---- */
html.o8.wh-home #whHud [data-orbit="fuel"] .wh-cell-tx::before,
html.o8.wh-home #whHud [data-orbit="water"] .wh-cell-tx::before,
html.o8.wh-home #whHud [data-orbit="move"] .wh-cell-tx::before,
html.o8.wh-home #spHome #spFast[data-orbit] .sp-fast-copy::before {
    content: ''; display: block; order: -2; flex: none; width: calc(var(--o8-d) * .22); height: calc(var(--o8-d) * .22); margin-bottom: 1px;
    background: #fff; -webkit-mask: var(--o8-i) center / contain no-repeat; mask: var(--o8-i) center / contain no-repeat;
    filter: drop-shadow(0 1px 3px rgba(0,30,80,.6));
}
html.o8 #whHud [data-orbit="fuel"] { --o8-i: var(--o8-i-fuel); }
html.o8 #whHud [data-orbit="water"] { --o8-i: var(--o8-i-water); }
html.o8 #whHud [data-orbit="move"] { --o8-i: var(--o8-i-move); }
html.o8 #spHome #spFast[data-orbit] { --o8-i: var(--o8-i-gap); }
/* 6 Nov 2026 (Emmanuel, design review: bubbles show only numbers or symbols): the old word labels for Fuel / Gap
   ("Einkaufen", "Pause", ...) are gone; they were hidden since 24 Oct by the symbols-only rule below anyway */
html.o8.wh-home #whHud [data-orbit="fuel"] .wh-cell-tx > small:first-of-type,
html.o8.wh-home #spHome #spFast[data-orbit] .sp-fast-copy > small:first-child { display: none; }

/* ---- one page: the old Home chrome steps back (every one of these stays reachable from the Settings bubble) ---- */
html.o8.wh-home:not(.o8-quest) #f3Board,html.o8.wh-home:not(.o8-quest) #tab-home #f3Board,html.o8.wh-home:not(.o8-quest) #hcLine,html.o8.wh-home #tab-home .sp-top,html.o8.wh-home #tab-home #spHome .sp-top,html.o8.wh-home #whHud .wh-todaybtn,html.o8.wh-home #whHud .wh-vr,html.o8.wh-home:not(.wh-away) #whHud .wh-zoom,html.o8.wh-home #whHud .wa-btn,html.o8.wh-home #tbTheme,html.o8.wh-home .hs-gift,html.o8.wh-home #pfBtn,html.o8.wh-home #fxHint { display: none !important; }

/* ---- clean glass: no shadow under any ring bubble or under Misty (Oct 18 2026, Emmanuel on iPad: "All bubbles have a shadow bottom.
   Remove that weird bottom."). Top highlight, rim and labels stay; only the offset drop shadows and the ellipse under Misty go.
   Scoped to the ring Home: worlds, blooms and the old Home keep their own depth. tests/bubble-bottom-shadow*.cjs ---- */
/* the joystick: its glass shadow variable (misty-pad.css: ... 0 8px 26px -12px, light theme 0 8px 24px -12px) keeps only the inner glow */
html.o8.wh-home #whHud #whPad { --wh-glass-sh: inset 0 0 18px rgba(140,210,255,.32); }
html.o8.wh-home[data-theme="light"] #whHud #whPad { --wh-glass-sh: inset 0 0 16px rgba(255,255,255,.4); }
html.o8.wh-home #whHud .wh-pad:not(.mp-fwd):not(.mp-back) .mp-knob { box-shadow: none; }
/* Misty: her sprite's drop-shadow(0 6px 12px black) (world-home.css) becomes the centred glow every other sprite has; the
   .lh-reflection ellipse under her cell (the grey oval on her name line) is not drawn */
html.o8.wh-home #spBubble .tmg-plant { filter: drop-shadow(0 0 6px color-mix(in srgb, var(--tmg-a, #8fe7ff) 28%, transparent)); }
html.o8.wh-home #spBubble .lh-reflection { display: none; }

/* ---- the joystick is one of the eight bubbles (Oct 18 2026, Emmanuel: "The steering wheel doesn't have the same water style, I mean
   bubble style, as the other bubbles"). It was a dark blurred disc with a blue energy arc, a dashed well and a grey knob. Now:
   - the same glass shell as Scan / Sleep / Settings (.o8-cell above), and with the 3D world Misty's membrane drawn around it
     (home-orbit-v2.js joyBubble -> living-bubbles.js, kind 'joy', a control: its own drag), the shell clear like theirs
   - the same glint as every ring bubble; no radar arc, no dashed well; the knob is a small glass bubble (tinted by Misty's energy
     tier, mint on autopilot, pressed colours from misty-pad.css)
   - the same look while steering, on autopilot and inside a world (o8 and wh-home stay on in worlds). Look only: size, place, when it shows (misty-pad.css) unchanged.
   tests/joystick-bubble-style*.cjs ---- */
html.o8.wh-home #whHud #whPad {
    background: radial-gradient(circle at 34% 28%, rgba(255,255,255,.34), rgba(255,255,255,.06) 42%, rgba(120,190,255,.08) 70%, rgba(255,255,255,.16)) !important;
    border: 1px solid rgba(255,255,255,.42) !important; box-shadow: inset 0 0 18px rgba(255,255,255,.18) !important;
    -webkit-backdrop-filter: none !important; backdrop-filter: none !important; border-radius: 50% !important; animation: none !important; }
html.o8.wh-home.lb3d #whHud #whPad.lb-live { background: transparent !important; border-color: transparent !important; box-shadow: none !important; }
html.o8.wh-home #whHud #whPad .mp-ring, html.o8.wh-home #whHud #whPad .mp-well { display: none !important; }
/* Oct 19 2026 (Emmanuel: "I can still see that the joystick is the old design"; his Home spec: "the same simple white-icon bubble,
   with no silver inner ring"): the knob is no longer a small glass bubble with a white rim inside the big one. Only the white icon
   is drawn, the size and soft shade of the Scan / Sleep / Settings icons; it still follows the thumb. Autopilot, forward and back
   tint the icon (with a centred glow) instead of painting a ring. tests/ui-joystick-vanish.test.cjs */
html.o8.wh-home #whHud #whPad .mp-knob { z-index: 2; color: #fff; border: 0; background: none; box-shadow: none; }
html.o8.wh-home #whHud #whPad[data-mode="auto"] .mp-knob { color: #b6ffe6; }
html.o8.wh-home #whHud #whPad.mp-fwd .mp-knob { color: #a8ffd8; box-shadow: none; }
html.o8.wh-home #whHud #whPad.mp-back .mp-knob { color: #d6c8ff; box-shadow: none; }
html.o8.wh-home #whHud #whPad .mp-knob svg { width: calc(var(--o8-d) * .3); height: calc(var(--o8-d) * .3); filter: drop-shadow(0 1px 4px rgba(0,30,80,.6)); }
html.o8.wh-home #whHud #whPad.mp-fwd .mp-knob svg { filter: drop-shadow(0 0 6px rgba(120,255,210,.75)); }
html.o8.wh-home #whHud #whPad.mp-back .mp-knob svg { filter: drop-shadow(0 0 6px rgba(170,140,255,.75)); }

/* ---- fallback sheets (Settings list, Sleep) until home-settings-sleep-v2.js owns them ---- */
    padding: 16px 14px 12px; border-radius: 26px; color: #fff; background: rgba(28,40,78,.72); border: 1px solid rgba(255,255,255,.22);
    -webkit-backdrop-filter: blur(18px) saturate(1.3); backdrop-filter: blur(18px) saturate(1.3); box-shadow: 0 18px 50px rgba(0,10,40,.45); }
    border: 1px solid rgba(255,255,255,.14); background: rgba(255,255,255,.08); cursor: pointer; }

/* Oct 19 old-design purge, round 4: on a short screen (a phone on its side) Misty's Home bubble shrinks with the height and sits in the
   middle, so the 8-bubble ring always fits around her. Before, world-home.css kept her at 190px minimum on a 320px-tall screen, the
   ring could not fit and Home fell back to the old layout (greeting, weather, VR, Meals, Daily Quest card, tab bar). */
@media (max-height: 420px) and (orientation: landscape) {
    :root { --wh-bs: clamp(116px, 42vh, 190px); --wh-cy: 50%; }
}

/* ---- symbols only (6 Nov 2026 design review, now the written rule in AGENTS.md: bubbles show only numbers or symbols, never
   words or units). 24 Oct 2026, Emmanuel: in German "Eintragen", "Bewegung", "Mahlzeiten" were squeezed into the bubbles and looked
   like another font; "remove the text labels entirely, symbol first, only the numbers that matter"). One rule for every language: the
   icon and real numbers stay (0/6, 0/3, the time since a meal, steps, sleep hours); word labels, units and the "Log" word go. Each
   button keeps its full aria-label, so screen readers still say what it is. Bloom orbs (after a tap) keep their labels. */
html.o8.wh-home #whHud [data-orbit] .wh-cell-tx small,
html.o8.wh-home #whHud [data-orbit] .wh-unit,
html.o8.wh-home #spHome #spFast[data-orbit] .sp-fast-copy small,
html.o8.wh-home #whHud [data-orbit] b.o8-word { display: none !important; }
html.o8.wh-home #whHud [data-orbit] .wh-cell-tx::after,
html.o8.wh-home #spHome #spFast[data-orbit] .sp-fast-copy::after { content: none !important; display: none !important; }
html.o8.wh-home #whHud [data-orbit] .wh-cell-tx::before,
html.o8.wh-home #spHome #spFast[data-orbit] .sp-fast-copy::before { width: calc(var(--o8-d) * .30); height: calc(var(--o8-d) * .30); }
html.o8.wh-home #whHud .o8-cell .o8-ico { width: calc(var(--o8-d) * .34); height: calc(var(--o8-d) * .34); }

/* Oct 28 2026 (Emmanuel, Home screenshot: a fork and knife, a "3" and an orange fill on what is really the Einkaufen bubble; he read
   them as meals eaten). The fuel bubble is the way into Einkaufen: a shopping-cart symbol (above), no number, no fill. */
html.o8.wh-home #whHud [data-orbit="fuel"].wh-shop .wh-cell-tx > b { display: none !important; }
