/* Windows 95: bevels signify controls, navy identifies the active window. */
.wb-open { --wb-desk: #008080; --wb-face: #c0c0c0; --wb-light: #fff; --wb-edge: #808080; --wb-ink: #000; --wb-active: #000080; }
.wb-open .sl-navbar, .wb-open > .sl-foot { display: none !important; }
.wb-open #app { position: fixed; inset: 0; margin: 0; padding: 0; max-width: none; height: 100dvh; overflow: hidden; display: block; }
.wb-desktop { height: 100%; display: grid; grid-template-rows: auto minmax(0, 1fr) auto; gap: 8px; padding: 8px; background: var(--wb-desk); color: var(--wb-ink); font: 14px Tahoma, Arial, sans-serif; }
.wb-desktop * { box-sizing: border-box; }
.wb-desktop button, .wb-desktop select { font: inherit; letter-spacing: normal; border-radius: 0; min-height: 44px; color: var(--wb-ink); background: var(--wb-face); border: 2px solid; border-color: var(--wb-light) var(--wb-ink) var(--wb-ink) var(--wb-light); padding: 4px 8px; cursor: pointer; }
.wb-desktop button:hover { background: #ddd; }
.wb-desktop button:active, .wb-desktop button[aria-pressed="true"] { border-color: var(--wb-ink) var(--wb-light) var(--wb-light) var(--wb-ink); }
.wb-desktop button:disabled { color: #595959; cursor: wait; }
.wb-desktop :focus-visible { outline: 2px dotted var(--wb-ink); outline-offset: -4px; }
.wb-toolbar, .wb-taskbar { background: var(--wb-face); border: 2px solid; border-color: var(--wb-light) var(--wb-edge) var(--wb-edge) var(--wb-light); padding: 4px; display: flex; align-items: center; gap: 8px; min-width: 0; }
.wb-toolbar strong { font-size: 18px; max-width: 190px; }
.wb-toolbar form { display: flex; gap: 8px; align-items: end; min-width: 0; flex: 1; }
.wb-toolbar label { display: grid; gap: 2px; min-width: 0; flex: 1; }
.wb-toolbar select { width: 100%; background: var(--wb-light); }
.wb-table { position: relative; min-height: 0; min-width: 0; overflow: hidden; }
.wb-window { position: absolute; display: flex; flex-direction: column; background: var(--wb-face); border: 2px solid; border-color: var(--wb-light) var(--wb-ink) var(--wb-ink) var(--wb-light); padding: 2px; min-width: 320px; min-height: 180px; max-width: 100%; max-height: 100%; resize: both; overflow: hidden; }
.wb-window[hidden] { display: none; }
.wb-title { display: flex; flex: 0 0 auto; gap: 2px; align-items: center; background: #595959; color: var(--wb-light); font-weight: bold; }
.wb-window[data-active="true"] .wb-title { background: var(--wb-active); }
.wb-title [data-handle] { padding: 8px; flex: 1; min-width: 0; cursor: move; touch-action: none; }
.wb-title [data-handle]:focus-visible { outline-color: white; }
.wb-title button { flex: 0 0 44px; padding: 0; font-size: 18px; }
.wb-content { flex: 1; min-height: 0; overflow: auto; background: var(--wb-light); }
.wb-notice { margin: 0; padding: 8px; font: 12px/1.5 Tahoma, Arial, sans-serif; background: #ffffdf; color: #222; }
.wb-notice summary { cursor: pointer; }
.wb-open .wb-desktop button { text-transform: none; }
.wb-side { display: flex; padding: 8px; align-items: center; gap: 8px; }
.wb-stats { display: grid; grid-template-columns: 1fr auto; margin: 8px; font-size: 12px; gap: 4px; }
.wb-stats dd { margin: 0; font-variant-numeric: tabular-nums; }
.wb-content h2 { margin: 8px; font-size: 18px; }
.wb-content table { width: 100%; border-collapse: collapse; font-size: 12px; }
.wb-content caption { text-align: left; padding: 8px; }
.wb-content th, .wb-content td { padding: 4px; border-bottom: 1px solid #ddd; text-align: right; font-variant-numeric: tabular-nums; }
.wb-content th:first-child { text-align: left; width: 48%; }
.wb-desktop .wb-content tbody button { border: 0; background: transparent; text-align: left; width: 100%; padding: 4px; font-size: 12px; font-weight: normal; box-shadow: none; }
.wb-content tr[aria-selected="true"] { background: var(--wb-active); color: white; }
.wb-content tr[aria-selected="true"] button { background: transparent; color: white; }
.wb-elevation-view { background: #10151c; color: white; padding: 8px; }
.wb-elevation-view .sl-elev-canvas { height: 100px; }
.wb-elevation-view span { display: block; font-size: 12px; padding-top: 4px; }
.wb-taskbar { flex-wrap: nowrap; }
#wb-status { font-size: 12px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; margin-left: auto; }
#wb-match .sl-frame { height: 100%; min-height: 490px; }
#wb-match { contain: layout paint; }
#wb-match [role="dialog"] { align-items: start; }
#wb-match .sl-frame > .sl-elevation { display: none; }
#wb-match .sl-flank { display: none; }
#wb-match .sl-bar { flex-wrap: wrap; padding: 4px; }
#wb-match .sl-bar-title { display: none; }
#wb-match .sl-bar-actions { flex-wrap: wrap; }
#wb-match .sl-bar-actions button { font-size: 12px; }
#wb-match .sl-bar-actions button, #wb-match .sl-turn button { min-height: 44px !important; height: auto; }
#wb-match .sl-turn { max-height: none !important; height: auto !important; min-height: 44px; overflow: visible; }
#wb-match .ps-board { min-height: 240px; }
#wb-match .sl-card { max-height: 60px; overflow: auto; }
#wb-match .sl-rail-decide { max-height: 60px; overflow: auto; }
#wb-match .sl-strip { overflow: auto; }
@media (max-width: 1023px) {
  .wb-desktop { padding: 4px; gap: 4px; }
  .wb-toolbar { flex-wrap: wrap; gap: 4px; }
  .wb-toolbar strong { max-width: none; font-size: 14px; }
  .wb-toolbar form { width: 100%; flex-basis: 100%; flex-wrap: wrap; gap: 4px; }
  .wb-toolbar label { flex-basis: 35%; }
  .wb-toolbar label:last-of-type { flex-basis: 55%; }
  .wb-window { inset: 0 !important; width: 100% !important; height: 100% !important; min-width: 0; resize: none; }
  .wb-window:not([data-active="true"]) { display: none; }
  .wb-title [data-handle] { cursor: default; }
  .wb-title button { display: none; }
  .wb-title { min-height: 32px; }
  .wb-taskbar { gap: 4px; flex-wrap: wrap; }
  .wb-taskbar button { flex: 1; padding: 4px; font-size: 12px; }
  #wb-tile { display: none; }
  #wb-status { flex-basis: 100%; margin: 0; }
  #wb-match .sl-frame { min-height: 540px; }
}
