/* SMUI.apart (ui/apart.js): the taken-apart screen's count, FOCUS ring and focus view. The HUD's own tokens (ui/hud.css)
   and line work: hairlines, open dots, small spaced capitals, thin numerals; no panel, no glass, no blur. Every size is
   multiplied by --u (1 on a phone, up to 1.4 on a laptop). */

/* which piece shows on which screen */
body:not([data-screen="apart"]) :is(#ctl-focus,#apart-nav,#focus-hit,#focus-ro,#focus-info,#focus-more){display:none!important}
body:not([data-focus="on"]) :is(#focus-hit,#focus-ro,#focus-info,#focus-more){display:none!important}
/* in focus the row's own layers step aside: its numbers, note, swipe band and frame (the floor rings stay: the hero stands on its own) */
body[data-focus="on"] :is(#readouts,#open-note,#info,#row-hit){display:none!important}

/* the name, its ticks and the count travel with the piece: up over the hero in focus, back down on the row. The
   time and curve are the engine's own for the hero (src/lineup.js FOCUS_MS 460, the row's slide curve), so the name and
   the piece land together; under reduced motion both are instant. */
#open-title,#open-count,#piece-info,#apart-nav{transition:transform 460ms cubic-bezier(.2,.8,.2,1)}
body[data-focus="on"] :is(#open-title,#open-count,#piece-info,#apart-nav){transform:translateY(var(--fdy,0px))}

/* ---- the count beside the ticks, and in focus a chevron each side (44 px targets) ---- */
#apart-nav{display:flex;align-items:center;height:calc(44px*var(--u,1));pointer-events:none;font-family:var(--smui-font,"Barlow Condensed",system-ui,sans-serif)}
#apart-nav .an-c{order:2;margin:0 0 0 calc(var(--bw,80px) + 10px*var(--u,1));display:flex;align-items:baseline;gap:calc(3px*var(--u,1));font-weight:500;font-size:calc(12px*var(--u,1));letter-spacing:.12em;line-height:1;color:#a9cfe2;font-variant-numeric:tabular-nums;white-space:nowrap;text-shadow:0 0 calc(6px*var(--u,1)) #02050b}
#apart-nav .an-c b{font-weight:500;color:var(--ice,#d9f3ff)}
#apart-nav .an-c i{font-style:normal;opacity:.55}
#apart-nav .an-b{order:1;flex:none;display:inline-flex;align-items:center;justify-content:center;width:calc(44px*var(--u,1));height:calc(44px*var(--u,1));margin:0;padding:0;border:0;background:none;color:#a9cfe2;cursor:pointer;-webkit-appearance:none;appearance:none;-webkit-tap-highlight-color:transparent;pointer-events:auto;visibility:hidden;opacity:0;transition:opacity var(--m-fade,200ms) var(--e-std,ease-out),color var(--m-fade,200ms) var(--e-std,ease-out),transform var(--m-release,360ms) var(--e-spring,ease-out)}
#apart-nav .an-next{order:3;margin-left:calc(4px*var(--u,1))}
#apart-nav .an-b.is-pressed,#apart-nav .an-b:active{transform:scale(.88);transition-duration:var(--m-press,70ms);transition-timing-function:var(--e-out,ease-out)}
#apart-nav .an-b svg{width:calc(15px*var(--u,1));height:calc(15px*var(--u,1));fill:none;stroke:currentColor;stroke-width:1.5;stroke-linecap:round;stroke-linejoin:round}
#apart-nav .an-b:disabled{opacity:.22!important;cursor:default}
#apart-nav .an-b:focus{outline:none}
#apart-nav .an-b:focus-visible{outline:1.5px solid var(--ice,#d9f3ff);outline-offset:calc(-6px*var(--u,1))}
body[data-focus="on"] #apart-nav .an-b{visibility:visible;opacity:1}
@media (hover:hover) and (pointer:fine){#apart-nav .an-b:not(:disabled):hover{color:var(--ice,#d9f3ff)}}

/* ---- the hero's gesture surface ---- */
#focus-hit{touch-action:none;cursor:grab;-webkit-tap-highlight-color:transparent}
#focus-hit:active{cursor:grabbing}
#focus-ro,#focus-info{left:0;top:0;width:100%;height:100%;pointer-events:none}
#focus-ro:empty,#focus-info:empty{display:none}

/* ---- what it joins, and how its sizes were got ---- */
#focus-more{pointer-events:none;font-family:var(--smui-font,"Barlow Condensed",system-ui,sans-serif);-webkit-font-smoothing:antialiased}
#focus-more .fm-h{display:flex;align-items:center;min-height:44px;margin:0 calc(4px*var(--u,1)) 0 0;font-weight:500;font-size:calc(11px*var(--u,1));letter-spacing:.2em;color:#86b2cb;text-shadow:0 0 calc(6px*var(--u,1)) #02050b}
#focus-more .fm-list{display:flex;flex-wrap:wrap;align-items:center;column-gap:calc(16px*var(--u,1));row-gap:0}
#focus-more .fm-j{display:inline-flex;align-items:center;gap:calc(8px*var(--u,1));min-height:44px;margin:0;padding:0 calc(4px*var(--u,1)) 0 calc(2px*var(--u,1));border:0;background:none;font:inherit;font-weight:500;font-size:calc(13px*var(--u,1));letter-spacing:.14em;text-transform:uppercase;color:#c4dcea;cursor:pointer;pointer-events:auto;-webkit-appearance:none;appearance:none;-webkit-tap-highlight-color:transparent;text-shadow:0 0 calc(6px*var(--u,1)) #02050b;transition:color var(--m-fade,200ms) var(--e-std,ease-out),transform var(--m-release,360ms) var(--e-spring,ease-out)}
#focus-more .fm-j svg{flex:none;width:calc(18px*var(--u,1));height:calc(10px*var(--u,1));overflow:visible}
#focus-more .fm-j circle{fill:rgba(2,5,11,.35);stroke:var(--ice,#d9f3ff);stroke-width:1}
#focus-more .fm-j path{stroke:var(--cy,#45d4ff);stroke-width:1;opacity:.7;transition:opacity var(--m-fade,200ms) var(--e-std,ease-out)}
#focus-more .fm-j.is-pressed,#focus-more .fm-j:active{transform:translateX(var(--d-nudge,2px));transition-duration:var(--m-press,70ms);transition-timing-function:var(--e-out,ease-out)}
#focus-more .fm-j:focus{outline:none}
#focus-more .fm-j:focus-visible{outline:1.5px solid var(--ice,#d9f3ff);outline-offset:0}
#focus-more .fm-j:active{color:var(--ice,#d9f3ff)}
@media (hover:hover) and (pointer:fine){#focus-more .fm-j:hover{color:var(--ice,#d9f3ff)}#focus-more .fm-j:hover path{opacity:1}}
#focus-more .fm-st{display:flex;align-items:center;gap:calc(8px*var(--u,1));margin:calc(10px*var(--u,1)) 0 0;font-weight:500;font-size:calc(11px*var(--u,1));line-height:1;letter-spacing:.2em;white-space:nowrap;text-shadow:0 0 calc(6px*var(--u,1)) #02050b}
#focus-more .fm-st[hidden]{display:none}
#focus-more .fm-bars{display:inline-flex;align-items:flex-end;gap:calc(2px*var(--u,1));height:calc(9px*var(--u,1))}
#focus-more .fm-bars i{display:block;width:calc(2px*var(--u,1));height:calc(5px*var(--u,1));background:rgba(134,178,203,.3)}
#focus-more .fm-bars i:nth-child(2){height:calc(7px*var(--u,1))}
#focus-more .fm-bars i:nth-child(3){height:calc(9px*var(--u,1))}
#focus-more .fm-bars i.on{background:var(--ice,#d9f3ff);opacity:.85}
#focus-more .fm-k{color:#86b2cb}
#focus-more .fm-w{color:#c4dcea}
/* a phone with the frame put away: the size mark alone, centred on the ring labels' line */
#focus-more[data-mode="alone"] .fm-st{justify-content:center;margin:0;height:calc(14px*var(--u,1))}
#focus-more .fm-joins[hidden]{display:none}
@keyframes fm-in{from{opacity:0;transform:translateY(var(--d-rise,4px))}}
#focus-more.fm-in .fm-list,#focus-more.fm-in .fm-st{animation:fm-in var(--m-entry,260ms) var(--e-out,ease-out) 120ms both}

@media (prefers-reduced-motion:reduce){
  #open-title,#open-count,#piece-info,#apart-nav,#apart-nav .an-b{transition:none!important}
  #focus-more *{animation:none!important;transition:none!important}
}
/* a phone: the layer spans the screen and its two parts sit on their own */
#focus-more[data-mode="alone"]{pointer-events:none}
#focus-more[data-mode="alone"] :is(.fm-st,.fm-joins){position:absolute}
#focus-more .fm-j[hidden]{display:none}
/* beside the piece (a laptop): the word on its own line over the taps */
#focus-more[data-mode="with"] .fm-h{flex-basis:100%;min-height:0;margin:0 0 calc(2px*var(--u,1))}
#focus-ro.fr-beside .stem{display:none}
