/* The control bar: identical in every view */
footer {
  --ink: #ececf1; --quiet: #868995; --rule: #2a2c35; --head: #ff6a5c; --bar: #0d0e13;
  display: flex; flex-wrap: wrap; align-items: center; gap: 6px 12px; padding: 7px 12px;
  background: var(--bar); color: var(--ink); border-top: 1px solid var(--rule);
  font: 13px/1.2 -apple-system, BlinkMacSystemFont, "SF Pro Text", "Helvetica Neue", sans-serif;
}
footer button { all: unset; display: grid; place-items: center; cursor: pointer; }
footer :focus-visible { outline: 2px solid var(--head); outline-offset: 2px; }
footer #play { width: 34px; height: 34px; border-radius: 50%; flex: none; }
footer #play:hover { background: var(--rule); }
footer #play:active { transform: scale(.94); }
footer #play svg { width: 16px; height: 16px; fill: currentColor; grid-area: 1 / 1; }
footer .i-pause, footer .playing .i-play { display: none; }
footer .playing .i-pause { display: block; }
footer nav { display: flex; flex: none; }
footer #moves button { min-width: 30px; height: 30px; padding: 0 4px; border-radius: 6px; text-align: center; color: var(--quiet); font-weight: 500; }
footer #moves button:hover { color: var(--ink); }
footer #moves button[aria-current="true"] { color: var(--ink); background: var(--rule); }
footer output { font-variant-numeric: tabular-nums; text-align: right; flex: none; }
footer #bar { font-size: 20px; font-weight: 600; min-width: 3ch; }
footer #time { color: var(--quiet); min-width: 4.5ch; font-size: 13px; }
footer #line { flex: 1 1 180px; min-width: 120px; width: 0; height: 34px; display: block; cursor: pointer; }
footer .tools { display: flex; align-items: center; gap: 6px; flex: none; }
footer .tools:empty { display: none; }
footer .tools button { height: 28px; padding: 0 10px; border-radius: 6px; color: var(--quiet); font-weight: 500; font-size: 12px; }
footer .tools button:hover { color: var(--ink); }
footer .tools button[aria-pressed="true"] { color: var(--ink); background: var(--rule); }
footer .tools select { font: inherit; font-size: 12px; color: var(--ink); background: none; border: 1px solid var(--rule); border-radius: 6px; height: 28px; padding: 0 4px; max-width: 132px; }
footer .tools select option { color: #111; }
footer .tools input[type=range] { width: 84px; accent-color: var(--head); }
footer #views { gap: 0; padding: 2px; border-radius: 8px; background: var(--rule); }
footer #views a { padding: 5px 11px; border-radius: 6px; color: var(--ink); opacity: .7; font-size: 12px; font-weight: 500; text-decoration: none; white-space: nowrap; text-align: center; }
footer #views a:hover { opacity: 1; }
footer #views a[aria-current="page"] { opacity: 1; background: var(--bar); box-shadow: 0 1px 2px rgba(0, 0, 0, .3); }
@media (max-width: 820px), (max-aspect-ratio: 1/1) {
  footer { padding: 6px 8px; gap: 6px 8px; }
  footer #time { display: none; }
  footer #moves { order: 3; }
  footer .tools { order: 4; flex-wrap: wrap; }
  footer #views { order: 5; flex: 1 1 100%; display: grid; grid-template-columns: repeat(4, 1fr); }
  footer #views a { padding: 6px 2px; }
  footer #line { flex-basis: 60%; }
}
