[hidden] { display: none !important; }
.practice { width: min(1060px, 93%); margin: 35px auto 60px; }
.practice h1 { margin: 0 0 22px; }
.practice h2 { margin: 0; }
.practice .block { padding: 19px 22px; }
.practice .panel { margin-bottom: 15px; }
.practice p, .practice small, #deadline, #filename { color: var(--muted); line-height: 1.5; }
.practice small, #deadline { font-size: .8rem; }
.practice input:not([type=range]):not([type=file]), .practice select {
  padding: 8px 10px; border: 1px solid #a8b8b5; border-radius: 5px; background: #fff; color: var(--ink);
}
#account, .controls, .section-heading, .replay-controls {
  display: flex; align-items: center; flex-wrap: wrap; gap: 10px;
}
#account { font: 600 13px var(--mono); }
.section-heading { justify-content: space-between; margin-bottom: 9px; }
.practice #notice:not(:empty) { padding: 10px 14px; margin: 0 0 14px; background: #e6f1ed; border-radius: 6px; color: var(--ink); }
.practice .account-form { max-width: 440px; display: grid; gap: 9px; }
.account-form h2 { margin-bottom: 5px; }
.account-form :is(button, small) { margin-top: 4px; }
.account-form button { justify-self: start; }
.practice label { font-weight: 650; font-size: .87rem; }
.upload-controls { position: relative; margin-top: 12px; }
.file-input { position: absolute; width: 1px; height: 1px; clip-path: inset(50%); overflow: hidden; }
.file-label { cursor: pointer; display: inline-block; border-radius: 6px; padding: 8px 14px; }
.file-label:hover { background: #e5eeea; }
.file-input:focus-visible + .file-label { outline: 3px solid #12a499; outline-offset: 2px; }
.file-input:disabled + .file-label { opacity: .5; cursor: default; }
#filename { overflow-wrap: anywhere; font-size: .88rem; }
#play { margin-left: auto; }
#state { font-size: .83rem; font-weight: 650; color: var(--accent); }
.course-panel { overflow: hidden; }
.course-header { padding: 16px 20px; margin: 0; border-bottom: 1px solid var(--line); }
.course-state { font-weight: 650; color: var(--muted); font-size: .88rem; }
.course-state[data-state="running"], .course-state[data-state="completed"] { color: var(--accent); }
.course-state[data-state="failed"], .course-state[data-state="timeout"] { color: #874425; }
.practice .course-problem:not(:empty), #version-error:not(:empty) { color: #874425; overflow-wrap: anywhere; }
.course-problem:not(:empty) { margin: 12px 20px; }
.course-problem:empty, .replay-message:empty, #version-error:empty, #final-version:empty { display: none; }
#final-version:not(:empty) { margin-bottom: 0; }
#finalize { margin-left: auto; }
.result-grid { display: grid; grid-template-columns: minmax(0, 1.5fr) minmax(310px, 1fr); }
.flight-panel { min-width: 0; display: flex; flex-direction: column; background: #0e1e2c; color: white; }
.replay-message:not(:empty) { color: #d4e0e2; margin: 12px 18px; }
.flight-panel canvas { width: 100%; height: clamp(230px, 29vw, 350px); display: block; }
.replay-controls { margin-top: auto; padding: 10px 16px; background: #162d36; }
.replay-controls input { min-width: 50px; flex: 1; accent-color: var(--mint); }
.replay-controls button { color: white; border: 1px solid #527479; }
.replay-controls button:hover { background: #27454c; }
.replay-controls output { font: 11px var(--mono); color: #d9e5e4; }
.scores { padding: 5px 20px 14px; }
.scores dl { display: grid; grid-template-columns: repeat(2, minmax(0,1fr)); gap: 12px; }
.scores .score { grid-column: 1 / -1; border-bottom: 1px solid var(--line); padding-bottom: 8px; }
.scores dt, .scores .definition { color: var(--muted); font-size: .8rem; }
.scores dd { margin: 3px 0; font: 650 1.12rem var(--mono); }
.scores .score dd { font-size: 2.4rem; color: var(--accent); }
.scores .timing { padding-top: 8px; border-top: 1px solid var(--line); }
.scores .definition { font-family: inherit; font-size: .77rem; font-weight: 400; line-height: 1.5; }
.practice-tabs { display: flex; gap: 8px; border-bottom: 1px solid var(--line); margin-bottom: 20px; }
.practice-tabs button { border-radius: 0; border-bottom: 3px solid transparent; padding: 10px 14px; color: var(--muted); }
.practice-tabs button[aria-selected="true"] { color: var(--accent); border-color: var(--accent); }
.worker-heading, .worker-card header { display: flex; align-items: center; justify-content: space-between; gap: 8px; }
.worker-heading { flex-wrap: wrap; margin-bottom: 12px; }
.worker-summary { display: flex; align-items: center; flex-wrap: wrap; gap: 16px 28px; margin: 0 0 14px; padding: 12px 18px; background: #e9f0ed; border-radius: 8px; }
.worker-summary div { display: grid; gap: 2px; }
.worker-summary span, .worker-card small { font-size: .77rem; color: var(--muted); }
.worker-summary strong { font: 650 1.35rem var(--mono); }
.worker-summary small { margin-left: auto; }
.worker-grid { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 10px; }
.worker-card { display: flex; flex-direction: column; min-width: 0; min-height: 116px; padding: 12px; background: #fff; border: 1px solid var(--line); border-radius: 9px; }
.worker-card h3 { margin: 0; font-size: .93rem; }
.worker-card[data-state="running"] { border-color: #8bb8a7; }
.worker-card[data-mine="true"] { box-shadow: inset 3px 0 var(--accent); }
.worker-state { font-size: .75rem; font-weight: 650; color: var(--muted); }
.worker-state:empty { display: none; }
.worker-state::before { content: ''; display: inline-block; width: 7px; height: 7px; margin-right: 5px; border-radius: 50%; background: currentColor; vertical-align: 1px; }
.worker-card[data-state="running"] .worker-state, #worker-health[data-state="online"] { color: var(--accent); }
.worker-card:is([data-state="stale"], [data-state="recovering"], [data-state="paused"]) .worker-state,
#worker-health:is([data-state="stale"], [data-state="offline"]), .practice .worker-issue, .practice .worker-message { color: #864c25; }
.worker-card[data-state="disabled"] { background: #f2f4f2; border-style: dashed; }
.worker-card strong { margin-top: 10px; font-size: .87rem; }
.worker-course, .worker-issue { font-size: .78rem; margin-top: 4px; }
.worker-card footer { display: block; padding: 10px 0 0; margin-top: auto; }
.worker-card footer:empty, .worker-message:empty { display: none; }
.worker-message:not(:empty) { margin-bottom: 12px; }
.worker-queue { margin-top: 16px; }
.worker-queue p { margin-top: 6px; font-size: .86rem; }
.worker-queue ol { padding: 0; margin: 14px 0 0; display: flex; flex-wrap: wrap; gap: 8px; list-style: none; }
.worker-queue ol:empty { display: none; }
.worker-queue li { padding: 5px 9px; border: 1px solid var(--line); border-radius: 5px; font-size: .83rem; }
.worker-queue li[data-mine="true"] { color: var(--accent); border-color: #8bb8a7; font-weight: 650; background: #edf6f1; }
@media (max-width: 900px) { .worker-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (max-width: 480px) {
  .worker-grid { grid-template-columns: 1fr; }
  .worker-summary small { width: 100%; margin-left: 0; }
}
@media (max-width: 760px) {
  .result-grid { grid-template-columns: 1fr; gap: 0; }
  .topin { height: auto; padding-block: 9px; gap: 7px; flex-wrap: wrap; }
  .brand { font-size: 16px; }
}
