/* Copied from hud-kit/web/controls/controls.css by hud-kit bin/sync-into. Edit it there, then run it again. */
/* Mattinee's final bar geometry. The host supplies ink colors and optional sizing overrides. */
.bars {
  display:inline-flex;
  align-items:flex-end;
  gap:var(--hk-bar-gap,8px);
  height:var(--hk-bar-height,36px);
}
.bars i {
  display:block;
  width:var(--hk-bar-width,12px);
  background:var(--hk-bar-empty,var(--bean));
  border-radius:6px 7px 5px 6px;
}
.bars i:nth-child(1) { height:calc(var(--hk-bar-height,36px) * 1 / 3) }
.bars i:nth-child(2) { height:calc(var(--hk-bar-height,36px) * 5 / 9) }
.bars i:nth-child(3) { height:calc(var(--hk-bar-height,36px) * 7 / 9) }
.bars i:nth-child(4) { height:calc(var(--hk-bar-height,36px) * 1) }
.bars i.on { background:var(--hk-bar-community,var(--score)) }
.bars i.mine:not(.on) { background:var(--hk-bar-personal,var(--score)) }
.bars.hk-dual i {
  --community:var(--hk-bar-empty,var(--bean));
  --personal:var(--hk-bar-empty,var(--bean));
  background:linear-gradient(to right,var(--community) 50%,var(--personal) 50%);
}
.bars.hk-dual i.on { --community:var(--hk-bar-community,var(--score)) }
.bars.hk-dual i.mine { --personal:var(--hk-bar-personal,var(--score)) }
.hk-ink-button { position:relative; isolation:isolate }
.hk-ink {
  position:absolute; inset:0; width:100%; height:100%;
  overflow:visible; z-index:-1; pointer-events:none;
}
.hk-ink path {
  fill:var(--hk-button-ink);
  stroke:var(--hk-button-ink);
  stroke-opacity:.42;
  stroke-width:1.3px;
  vector-effect:non-scaling-stroke;
}


/* Mattinee's bean. The outer hit area stays still while the inner layer moves. */
.bean { position:relative; isolation:isolate; --bf:var(--bean) }
@media (hover:hover){:where(:root:not(.pads)) .bean:hover{--bf:var(--bean-hover)}}
.bean > .sq { pointer-events:none; transition:transform .28s var(--soft,cubic-bezier(.3,1.6,.5,1)) }
.bean:active > .sq { transform:scale(1.06,.9); transition-duration:.08s }
:where(.bean > .sq) > .blob {
  position:absolute; inset:0; width:100%; height:100%; overflow:visible; z-index:-1; pointer-events:none;
}
:where(.bean) .blob:not(.back) path {
  fill:var(--bf); stroke:var(--bf); stroke-opacity:.42; stroke-width:1.3px;
  vector-effect:non-scaling-stroke; transition:fill .15s,stroke .15s;
}
:where(.bean > .sq) > .blob.back { z-index:-2; transform:translate(5px,7px) }
.bean .blob.back { opacity:0; transition:opacity .15s,transform .4s var(--soft,cubic-bezier(.3,1.6,.5,1)) }
.bean:not(.is-focus) .blob.back path { fill:var(--hover-back); transition:none }
@media (hover:hover){:where(:root:not(.pads)) .bean:hover .blob.back{opacity:1; transform:translate(2px,3px) scale(1.08,1.36)}}

/* The outer slider reserves its resting width. Its animated hit area can grow to the right. */
.tube-slider {
  position:relative; width:calc(var(--tube-width,48px) + 6px); height:38px;
  cursor:pointer; touch-action:none; user-select:none;
}
.tube-slider[data-pointer-focus]:focus-visible { outline:none }
.tube-hit {
  position:absolute; display:block; left:0; top:calc(50% - 13px); width:var(--tube-width,48px);
  transform-origin:left center; transition:transform var(--tube-grow-time,230ms) cubic-bezier(.2,.76,.26,1);
}
:is([data-grow-rating],:has(> .tube-slider:focus-visible:not([data-pointer-focus]))) .tube-hit { transform:scale(var(--tube-grow,2),var(--tube-rise,2)) }
.tube-slider svg { display:block; width:100%; height:26px; overflow:visible; pointer-events:none }
.tube-glass { fill:color-mix(in srgb,var(--tube-outline) 11%,transparent) }
.tube-rim { fill:none; stroke:var(--tube-outline); stroke-width:.72 }
.tube-reflection { fill:none; stroke:var(--page,white); stroke-width:.72; stroke-linecap:round; opacity:.66 }
.tube-meniscus { fill:none; stroke:var(--page,white); stroke-width:.42; opacity:.65 }
.tube-ink { --liquid:var(--tube-community) }
.tube-own,[data-personal-liquid] .tube-ink { --liquid:var(--tube-personal) }
.tube-ink stop,.tube-own stop { transition:stop-color 130ms ease-out }
.tube-shade { stop-color:color-mix(in srgb,var(--liquid) 70%,var(--tube-outline)) }
.tube-shine { stop-color:color-mix(in srgb,var(--liquid) 74%,var(--page,white)) }
.tube-body { stop-color:var(--liquid) }
@media(prefers-reduced-motion:reduce) {
  .tube-hit,.tube-ink stop,.tube-own stop { transition:none }
}

.tube-tick,.tube-marker { fill:none; stroke:var(--tube-outline); stroke-width:.65; stroke-linecap:round; opacity:0 }
[data-setting-rating] .tube-tick { opacity:.55 }
.tube-marker[data-selected] { stroke:var(--tube-personal); stroke-width:1.6; opacity:1 }
[data-grow-rating] .tube-hit::after {
  content:""; position:absolute; inset:0 -7px 0 -5px; z-index:0;
}
.tube-marker { transition:transform 120ms cubic-bezier(.2,.76,.26,1),opacity 150ms ease }
@media(hover:hover) and (pointer:fine) {
  [data-meter-steering] .tube-slider { cursor:none }
}

.hk-image-viewer {
  position:fixed; inset:0; width:100%; height:100%; max-width:none; max-height:none;
  padding:0; border:0; margin:0; overflow:hidden; color:var(--hk-image-fg,#f8f8f7);
  background:var(--hk-image-bg,#1a1916); opacity:1; transition:opacity 150ms ease;
}
.hk-image-viewer[data-dismissing] { opacity:0; pointer-events:none }
.hk-image-stage { position:absolute; inset:0; display:grid; place-items:center; overflow:hidden; touch-action:none }
.hk-image-stage:focus { outline:none }
.hk-image-stage img { display:block; max-width:none; max-height:none; user-select:none; -webkit-user-drag:none; cursor:zoom-out }
.hk-image-stage[data-zoomed] img { cursor:grab }
.hk-image-stage[data-zoomed]:active img { cursor:grabbing }
.hk-image-close {
  position:absolute; display:grid; place-items:center; width:32px; height:32px;
  border:0; padding:0; background:none; color:white; mix-blend-mode:difference;
  font-size:17px; opacity:.8; cursor:pointer; transition:opacity 160ms ease;
}
.hk-image-close:focus-visible{ opacity:1 }
@media (hover:hover){.hk-image-close:hover{opacity:1}}
.hk-image-hint {
  position:absolute; bottom:12px; left:12px; right:12px; text-align:center;
  font-size:12px; pointer-events:none; opacity:0; transition:opacity 350ms ease;
}
.hk-image-hint[data-visible] { opacity:.82 }
.hk-art-frame {
  position:absolute; inset:0; width:100%; height:100%; overflow:visible; pointer-events:none;
  fill:var(--art-frame-ink,currentColor); fill-rule:evenodd;
}
.hk-playing-mark { display:block; width:3px; overflow:visible; fill:currentColor }

.hk-icon { display:block; width:1em; height:1em; flex:none }

/* The switch (switchMarkup). 76 by 42 with a 32 knob, 5 px in, by default; the app sets the colour roles. */
.hk-switch {
  all:unset; box-sizing:border-box; position:relative; display:inline-block; flex:none; cursor:pointer;
  width:var(--hk-switch-w,76px); height:var(--hk-switch-h,42px);
  border-radius:22px 24px 21px 23px / 21px 22px 20px 22px;
  background:var(--switch-off,ButtonFace);
  box-shadow:inset 0 0 0 var(--hk-switch-edge-w,1.5px) var(--switch-edge,transparent);
  transition:background-color 120ms ease, box-shadow 120ms ease;
}
.hk-switch .hk-knob {
  position:absolute; top:var(--hk-switch-inset,5px); left:var(--hk-switch-inset,5px);
  width:var(--hk-switch-knob,32px); height:var(--hk-switch-knob,32px);
  border-radius:52% 48% 46% 54% / 48% 54% 46% 52%;
  background:var(--switch-off-knob,ButtonText);
  transition:transform 120ms var(--hk-switch-ease,cubic-bezier(.3,1.4,.5,1)), background-color 120ms ease;
}
.hk-switch[aria-checked=true] { background:var(--switch-on,Highlight); box-shadow:none }
.hk-switch[aria-checked=true] .hk-knob {
  background:var(--switch-on-knob,HighlightText);
  transform:translateX(calc(var(--hk-switch-w,76px) - var(--hk-switch-knob,32px) - 2 * var(--hk-switch-inset,5px)));
}
.hk-switch.busy .hk-knob { animation:hk-switch-busy .7s ease-in-out infinite alternate }
@keyframes hk-switch-busy { to { opacity:.45; scale:.82 } }
@media(prefers-reduced-motion:reduce) {
  .hk-switch, .hk-switch .hk-knob { transition:none }
  .hk-switch.busy .hk-knob { animation:none; opacity:.6 }
}

@media(prefers-reduced-motion:reduce) {
  .tube-marker,.hk-image-viewer,.hk-image-hint,.hk-image-close { transition:none }
}
