/* CaseMaster-style application status bar. */
[hidden]{display:none!important}
.site-preferences{display:inline-flex;flex-wrap:wrap;align-items:center;justify-content:center;max-width:100%;gap:2px;padding:2px;margin-left:auto;border:1px solid var(--valor-muted);border-radius:999px;background:var(--valor-reading);color:var(--valor-heading);letter-spacing:normal}
.site-preferences button{display:inline-flex;align-items:center;justify-content:center;min-width:44px;min-height:44px;padding:4px;background:transparent;border:0;border-radius:999px;color:inherit;font:600 var(--valor-size-control, .9rem)/var(--valor-line-control, 1.3) var(--valor-font-body);cursor:pointer}
.site-preferences button:hover,.site-preferences button[aria-pressed='true']{background:color-mix(in srgb,var(--valor-primary) 12%,var(--valor-reading))}
.site-preferences button:disabled{opacity:.4;cursor:default}
.site-preferences .site-preferences__reset{min-width:48px;font-variant-numeric:tabular-nums}
.site-preferences svg{width:17px;height:17px;fill:none;stroke:currentColor;stroke-width:1.8;stroke-linecap:round;stroke-linejoin:round}
.site-preferences [data-preference='theme'] svg{width:23px;height:23px}
.site-preferences [data-valor-language]{gap:.65rem;padding-inline:6px}
.site-preferences [data-valor-language] svg{flex:none;width:21px;height:14px;stroke:none;border-radius:2px}
.preferences-status{position:absolute;width:1px;height:1px;margin:-1px;overflow:hidden;clip-path:inset(50%);white-space:nowrap}
html[data-ui-zoom='50'] #app{zoom:.5}html[data-ui-zoom='75'] #app{zoom:.75}html[data-ui-zoom='90'] #app{zoom:.9}html[data-ui-zoom='100'] #app{zoom:1}html[data-ui-zoom='110'] #app{zoom:1.1}html[data-ui-zoom='125'] #app{zoom:1.25}html[data-ui-zoom='150'] #app{zoom:1.5}
@media(forced-colors:active){.site-preferences{background:Canvas;color:CanvasText}.site-preferences button{border:1px solid ButtonText}}

[data-preferences] .valor-display-cluster { display: inline-flex; flex: 0 1 auto; flex-wrap: wrap; min-width: 0; max-width: 100%; align-items: center; gap: inherit; }
[data-preferences] .valor-display-choice { position: relative; display: inline-flex; }
[data-preferences] .valor-display-options { position: absolute; z-index: 20; inset-inline-start: 0; inset-block-start: 100%; display: grid; width: max-content; overflow: auto; overscroll-behavior: contain; gap: 2px; padding: 4px; box-sizing: border-box; border: 1px solid currentColor; border-radius: 8px; background: var(--valor-reading, Canvas); color: var(--valor-heading, CanvasText); box-shadow: 0 4px 12px #0003; }
[data-preferences] .valor-display-options[data-side='above'] { inset-block-start: auto; inset-block-end: 100%; }
[data-preferences] .valor-display-options button { justify-content: flex-start; min-height: 44px; white-space: normal; }
/* Options stay flat; the check identifies the current value without a bubble. */
[data-preferences] .valor-display-options button,
[data-preferences] .valor-display-options button:hover,
[data-preferences] .valor-display-options button[aria-pressed='true'] { background: transparent; border-radius: 0; }
[data-preferences] .valor-display-options button:hover { text-decoration: underline; }
[data-preferences] .valor-display-options button[aria-pressed='true']::after { content: '✓' / ''; margin-inline-start: auto; padding-inline-start: .75rem; }
[data-preferences] .valor-display-options button:focus-visible { outline: 2px solid currentColor; outline-offset: -2px; }
[data-preferences] select[hidden], [data-preferences] .valor-display-options[hidden], .language-switch[hidden] { display: none !important; }
@media (pointer: coarse) { [data-preferences] .valor-display-choice button { min-width: 44px; min-height: 44px; } }
.site-header:has(.valor-display-options:not([hidden])) { position: relative; z-index: 30; }

/* The status bar stays outside content zoom, preserving usable controls. */
body { padding-block-end: var(--outils-status-height, 64px); }
.statusbar {
  position: fixed;
  z-index: 60;
  inset: auto 0 0;
  display: flex;
  flex-wrap: wrap;
  flex-direction: row;
  align-items: center;
  justify-content: flex-start;
  gap: 4px 16px;
  width: 100%;
  padding: 4px 12px calc(4px + env(safe-area-inset-bottom, 0px));
  border-top: 1px solid var(--valor-muted);
  background: var(--valor-reading);
  color: var(--valor-heading);
  box-shadow: 0 -3px 12px #0001;
}
.status-metrics { display: flex; flex-wrap: wrap; align-items: center; gap: 4px 16px; margin-inline-end: auto; }
.status-metrics > span { white-space: nowrap; }
.status-metrics strong { font-variant-numeric: tabular-nums; color: var(--valor-primary); }
.status-identity { color: var(--valor-muted); font-size: var(--valor-size-caption); white-space: nowrap; }
.status-tools.site-preferences { justify-content: flex-end; max-width: 100%; padding: 0; border: 0; border-radius: 0; background: transparent; }
.status-audio-controls { display: inline-flex; flex: none; }
.statusbar .valor-display-options { z-index: 1; }
@media (max-width: 680px) {
  .statusbar { gap: 4px 12px; padding-inline: 8px; }
  .statusbar .status-tools { flex-basis: 100%; }
  .status-identity { margin-inline-start: auto; }
}
@media (max-width: 360px) {
  .status-metrics { gap: 4px 10px; }
  .status-identity { display: none; }
  .status-tools.site-preferences { gap: 2px; }
}

@media print{html[data-ui-zoom] #app{zoom:1}.statusbar{display:none}body{padding-block-end:0}}
