:root {
  font-family: ui-sans-serif, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  color: #252823;
  background: #f3f3ed;
  font-synthesis: none;
  --line: #d9ddd0;
  --ink: #171b15;
  --muted: #6e7667;
  --lime: #d8f36a;
}
* { box-sizing: border-box; }
[hidden] { display: none!important; }
body { margin: 0; }
button, input { font: inherit; }
button, a { touch-action: manipulation; }
button { cursor: pointer; border: 1px solid var(--line); background: transparent; color: inherit; border-radius: 4px; }
button:disabled { cursor: default; opacity: .35; }
button:focus-visible, a:focus-visible { outline: 2px solid #799c24; outline-offset: 3px; }
a { color: inherit; text-decoration: none; }
.admin button { min-height: 48px; }
button:hover:not(:disabled) { background: #e9eddf; }
.app-header { min-height: 64px; display: flex; align-items: center; gap: 12px; padding: 8px 12px; }
.primary-button { padding: 8px 12px; font-size: 12px; font-weight: 650; line-height: 20px; background: var(--lime); border-color: #c4db65; white-space: nowrap; flex-shrink: 0; }
.primary-button:hover:not(:disabled) { background: #cce761; }
#file-title { min-width: 0; flex: 1; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-size: 13px; color: var(--muted); }
.connection { width: 7px; height: 7px; background: #b2b8aa; border-radius: 50%; flex-shrink: 0; }
.connection.connected { background: #6b901d; }
.workspace { --stage-width: min(1200px, max(420px, calc(177.7778dvh - 391.1111px))); padding: 0 12px 12px; }
.stage-wrap, .transport-bar, .timing-readout, .notes-section { width: 100%; max-width: var(--stage-width); margin-left: auto; margin-right: auto; }
#slide-stage { width: 100%; aspect-ratio: 16/9; background: #111; overflow: hidden; border-radius: 4px; }
#slide-stage canvas { display: block; }
.transport-bar { display: flex; align-items: center; justify-content: space-between; gap: 8px; margin-top: 8px; margin-bottom: 8px; }
.navigation { display: flex; align-items: center; gap: 8px; }
.navigation button { width: 48px; height: 48px; padding: 0; font-size: 20px; background: #f8f9f3; }
.navigation button:last-child { background: var(--ink); color: var(--lime); border-color: var(--ink); }
.navigation button:last-child:hover:not(:disabled) { background: #2b3422; }
#slide-position { min-width: 42px; font-size: 12px; color: var(--muted); text-align: center; font-variant-numeric: tabular-nums; white-space: nowrap; }
.timing-readout { display: flex; align-items: center; flex-wrap: wrap; gap: 8px 16px; min-height: 48px; margin-bottom: 8px; font-size: 12px; color: var(--muted); }
.timing-readout>span { display: inline-flex; align-items: baseline; gap: 6px; }
.timing-readout output { color: var(--ink); font-family: ui-monospace, monospace; font-size: 13px; font-variant-numeric: tabular-nums; }
#timing-delta { margin-left: auto; }
#timing-delta.over { color: #a24434; }
.text-button { min-width: 48px; padding: 8px; border: 0; font-size: 12px; white-space: nowrap; }
.notes-section { border-top: 1px solid var(--line); padding-top: 8px; }
#slide-notes { font-size: 13px; line-height: 1.6; white-space: pre-wrap; overflow-wrap: anywhere; color: #515a46; }
.notes-section:has(#slide-notes:empty) { border-top: 0; padding-top: 0; }
.presenter { background: #111; overflow: hidden; }
.presenter-screen { width: 100vw; height: 100dvh; display: flex; align-items: center; justify-content: center; }
.presenter #slide-stage { width: 100vw; height: 100dvh; aspect-ratio: auto; border-radius: 0; }
.presenter-controls { position: fixed; z-index: 2; bottom: 12px; left: 50%; transform: translateX(-50%); display: flex; gap: 4px; padding: 4px; background: #0a0d09b8; border: 1px solid #ffffff18; border-radius: 6px; opacity: 0; transition: opacity .18s; }
.presenter-screen:hover .presenter-controls, .presenter-controls:focus-within { opacity: .65; }
.presenter-controls:hover { opacity: 1!important; }
.presenter-controls button, .presenter-controls a { display: inline-flex; align-items: center; justify-content: center; width: 48px; height: 48px; border: 0; background: transparent; color: #e5ebda; font-size: 19px; border-radius: 4px; }
.presenter-controls button:hover:not(:disabled), .presenter-controls a:hover { background: #ffffff16; }
#toast { position: fixed; bottom: 12px; right: 12px; max-width: calc(100vw - 24px); background: #22291d; color: #eef4e4; padding: 10px 12px; border: 1px solid #4b5a38; border-radius: 5px; font-size: 12px; line-height: 1.5; z-index: 10; opacity: 0; transform: translateY(6px); transition: opacity .15s, transform .15s; pointer-events: none; }
#toast.visible { opacity: 1; transform: translateY(0); }
.session-moved { padding: 12px; color: var(--muted); font-size: 13px; }
.session-moved p { margin: 0; }
@media (max-width: 760px) {
  .workspace { --stage-width: 1200px; }
}
@media (max-width: 560px) {
  .app-header { gap: 8px; padding: 8px; }
  .workspace { padding: 0 8px 8px; }
  .transport-bar { margin-top: 6px; margin-bottom: 6px; }
  .timing-readout { gap: 6px 12px; margin-bottom: 6px; }
  .notes-section { padding-top: 6px; }
}
@media (max-width: 340px) {
  .primary-button { padding-left: 10px; padding-right: 10px; }
  .navigation { gap: 6px; }
}
@media (pointer: coarse) {
  .presenter-controls { opacity: .55; }
}
@media (prefers-reduced-motion: reduce) {
  * { transition: none!important; }
}
