:root {
  color-scheme: dark;
  --page: #0c1215;
  --panel: #172126;
  --line: #46535a;
  --ink: #f8f8f8;
  --muted: #bdc5c9;
  --accent: #ff581d;
}
* { box-sizing: border-box }
body { margin: 0; background: var(--page); color: var(--ink); font: 16px/1.45 Roboto, "Segoe UI", Arial, sans-serif }
body > header { background: #10191e; border-bottom: 2px solid #ff480b; padding: 12px max(20px,calc((100% - 1040px)/2)); display: flex; align-items: center; justify-content: space-between; gap: 16px }
.brand { display: flex; align-items: center; gap: 12px }
.brand svg { width: 30px; height: 40px }
.brand strong { display: block; font-size: 19px; letter-spacing: .025em; line-height: 1.2 }
.brand strong em { color: var(--accent); font-style: normal }
.brand small { color: var(--muted) }
main { max-width: 1080px; margin: auto; padding: 20px 20px 48px }
h1,h2,h3 { line-height: 1.16 }
h1 { font-size: clamp(28px,4vw,40px); margin: 0 }
h2 { font-size: 22px; margin: .3em 0 } h3 { font-size: 17px; margin: 0 }
.page-title { display: flex; justify-content: space-between; align-items: center; flex-wrap: wrap; gap: 12px; margin: 8px 0 18px }
button,input,select,textarea { font: inherit }
button { background: #243036; border: 1px solid var(--line); color: var(--ink); border-radius: 7px; padding: 8px 14px; min-height: 44px; cursor: pointer }
button:hover { background: #354047 } button:disabled { opacity: .6; cursor: default }
button:focus-visible,input:focus-visible,select:focus-visible,textarea:focus-visible,summary:focus-visible { outline: 3px solid #ff995f; outline-offset: 2px }
.primary { background: var(--accent); color: #101619; border-color: var(--accent); font-weight: 700 }
.primary:hover { background: #ff743e }
.page-title button { padding: 12px 20px }
.page-title button::before { content: "+"; font-size: 1.2em; margin-right: 8px }
.toolbar button.primary { background: #2b363c; color: white; border-color: var(--accent) }
label { display: grid; gap: 5px; font-weight: 600; margin: 12px 0 }
input,select,textarea { width: 100%; padding: 9px; background: #10191e; border: 1px solid #677780; border-radius: 6px; color: var(--ink) }
input[type=checkbox] { width: 20px; accent-color: var(--accent) }
.toolbar,footer,.actions { display: flex; gap: 8px; flex-wrap: wrap; align-items: center; margin: 12px 0 }
article,.login { background: var(--panel); border: 1px solid var(--line); border-radius: 10px; padding: 18px; margin: 13px 0 }
.login { max-width: 400px; margin: 8vh auto; border-top: 3px solid var(--accent) }
.summary { border-bottom: 1px solid var(--line); padding-bottom: 12px }
.muted,small { color: var(--muted) }
.badge { display: inline-block; background: #39251d; color: #ffb18c; padding: 3px 9px; border-radius: 5px; font-size: 14px; font-weight: 600 }
.stop { border-left: 3px solid var(--accent); padding: 4px 0 4px 13px; margin: 17px 0 }
.docs { display: flex; gap: 5px; flex-wrap: wrap }
.docs span { white-space: nowrap; background: #2b363c; padding: 2px 6px; border-radius: 4px }
.history,.line { white-space: pre-line; overflow-wrap: anywhere }
dialog { background: var(--panel); border: 1px solid var(--line); border-radius: 10px; width: min(510px,95vw); max-height: 88vh; color: var(--ink) }
dialog::backdrop { background: #060b0dcc } footer { justify-content: flex-end }
#error:not(:empty),#notice:not(:empty) { color: #ffdbbb; background: #3d291d; padding: 10px; border-radius: 6px }
details { margin: 12px 0 } summary { cursor: pointer } p { margin: 8px 0 } [hidden],#stops label[hidden] { display: none }
@media(max-width:550px) { main { padding: 14px 12px } article { padding: 13px } body > header { padding: 10px 12px } .actions button { flex-grow: 1 } .page-title { align-items: stretch; flex-direction: column } }
@media(min-width:880px) { dialog:has(#stops),dialog:has(#archiveEdit) { width: min(1180px,95vw) } #stops fieldset,#archiveEdit fieldset { display: grid; grid-template-columns: repeat(3,minmax(0,1fr)); gap: 5px 12px; margin: 10px 0; border: 1px solid var(--line); border-radius: 8px } #stops fieldset label,#archiveEdit fieldset label { margin: 4px 0 } #stops fieldset button { font-size: 14px; min-height: 34px } }
