.team-header nav { align-items: center; flex-wrap: wrap; }
.account-name { color: #c9dedf; overflow-wrap: anywhere; }
.header-button { background: transparent; border-color: #739297; color: #fff; padding: 5px 12px; }
.header-button:hover:not(:disabled) { background: #264554; }
.team-main { max-width: 1420px; padding: 26px 24px 42px; }
.team-editor-main { padding-top: 22px; }
.team-labels { display: flex; flex-direction: column; }
.team-advance button { flex: 1 1 100px; font-size: .9rem; }
.team-point-actions { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); }
.team-point-actions button { font-size: .86rem; padding: 5px 3px; }
.team-point-fields h2 { margin-bottom: 0; }
.team-point-fields .selected-point { margin-top: 8px; }
.team-point-fields #placement { margin-top: 2px; }
.team-point-fields .state-grid { margin-block: 4px; }
.team-point-fields .state-grid button { padding-block: 4px; }
.next-preview { --preview-height: clamp(86px, 15vh, 142px); border-top: 1px solid var(--line); padding-top: 8px; }
.next-preview-heading { display: flex; align-items: baseline; justify-content: space-between; flex-wrap: wrap; gap: 2px 8px; margin-bottom: 6px; }
.next-preview .next-preview-heading h3 { margin: 0; font-size: .95rem; }
.next-preview a { display: block; border-radius: 6px; overflow: hidden; background: #142430; }
.next-preview img { display: block; width: 100%; height: var(--preview-height); object-fit: contain; }
#next-preview-placeholder { display: grid; place-items: center; min-height: var(--preview-height); margin: 0; background: #eef3f5; border-radius: 6px; }
@media (min-width: 801px) and (min-height: 700px) {
  body[data-annotator] { height: 100dvh; display: flex; flex-direction: column; }
  body[data-annotator] > .site-header { flex: none; }
  .team-editor-main { flex: 1; min-height: 0; width: 100%; margin-block: 0; padding-bottom: 14px; display: flex; flex-direction: column; }
  .team-editor-main > .intro, .team-editor-main > .message { flex: none; }
  .team-editor-main .editor { flex: 1; min-height: 0; grid-template-rows: minmax(0, 1fr); }
  .team-labels { align-self: stretch; min-height: 0; }
  .team-point-fields { display: flex; flex: 1; flex-direction: column; min-height: 0; overflow-y: auto; }
  .team-point-fields > :not(#slots) { flex: none; }
  .team-point-fields #slots { flex: 1; min-height: 42px; }
  .team-labels .save-actions, .team-labels .next-preview { flex: none; }
}
.auth-main { display: grid; place-items: start center; padding-top: min(9vh, 100px); }
.auth-card { width: min(100%, 410px); padding: 26px; }
.auth-card form, .auth-card .message, .auth-card a { margin-top: 17px; }
.stack { display: grid; gap: 11px; }
.stack button[type="submit"], .stack > button { justify-self: start; }
label > input:not([type="checkbox"]) { display: block; width: 100%; padding: 7px; border: 1px solid #bacbd6; border-radius: 6px; background: #fff; color: var(--ink); font: inherit; }
label > input:focus-visible { outline: 3px solid #338976; outline-offset: 2px; }
.team-intro { margin-bottom: 18px; }
.metrics { display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); gap: 12px; margin-top: 18px; }
.metric { display: grid; gap: 3px; padding: 13px 16px; }
.metric span { color: var(--muted); }
.metric strong { font-size: 1.7rem; font-variant-numeric: tabular-nums; }
.section-block { margin-top: 25px; scroll-margin-top: 14px; }
.section-block > h2 { font-size: 1.25rem; }
.admin-grid { display: grid; grid-template-columns: minmax(250px, 1fr) minmax(0, 2fr); gap: 14px; align-items: start; }
.model-grid { grid-template-columns: minmax(320px, 1fr) minmax(0, 1.08fr); }
.panel h3 { font-size: 1rem; margin: 0 0 10px; }
.form-row { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.filter-form { display: flex; flex-wrap: wrap; align-items: end; gap: 10px; margin-bottom: 8px; }
.filter-form input[type="number"] { width: 100px; }
.table-scroll { overflow-x: auto; }
.team-table { width: 100%; border-collapse: collapse; text-align: left; font-size: .9rem; }
.team-table td, .team-table th { padding: 8px; border-bottom: 1px solid var(--line); vertical-align: top; }
.team-table th { font-weight: 620; color: var(--muted); white-space: nowrap; background: #eff5f7; }
.team-table td { overflow-wrap: anywhere; }
.split-table td { vertical-align: middle; }
.split-table select { min-width: 88px; }
.status-tag { padding: 2px 6px; border-radius: 4px; white-space: nowrap; }
.status-tag.live { background: #e0f0e8; color: #075f52; }
.status-tag.quiet { background: #e8eef2; color: #465c6b; }
.empty { color: var(--muted); padding-block: 10px; }
.inline { display: inline; }
.reset-account { margin-top: 8px; }
.reset-account summary { cursor: pointer; color: #075f6a; }
.reset-account form { margin-top: 6px; min-width: 140px; }
.task-detail { margin-top: 16px; }
.task-detail table { margin-top: 12px; }
.team-progress { margin: 0; font-variant-numeric: tabular-nums; }
.quality-progress .filter-form { margin: 12px 0 0; }
.quality-grid { display: grid; grid-template-columns: minmax(0, 1fr) minmax(250px, 300px); gap: 14px; margin-top: 14px; align-items: start; }
.quality-frame-title { font-size: 1rem; margin: 0; overflow-wrap: anywhere; }
.quality-canvas-wrap { background: #142430; min-height: 160px; overflow: auto; border-radius: 6px; }
.quality-canvas-wrap canvas { display: block; margin-inline: auto; cursor: default; }
#quality-image-error { color: #fff; padding: 10px; }
.quality-navigation { justify-content: space-between; }
.quality-meta { display: grid; grid-template-columns: auto minmax(0, 1fr); gap: 4px 12px; }
.quality-meta dt { color: var(--muted); }
.quality-meta dd { margin: 0; overflow-wrap: anywhere; }
.quality-buttons { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px; margin-top: 12px; }
.quality-buttons button:only-of-type { grid-column: 1 / -1; }
.quality-buttons button { padding-inline: 4px; font-size: .86rem; }
.quality-discard { color: #8d3120; border-color: #c58d7c; }
.quality-discard:hover:not(:disabled) { background: #fff1eb; }
.quality-events p { white-space: pre-wrap; overflow-wrap: anywhere; margin: 3px 0 0; }
.quality-details { margin-top: 12px; }
.quality-details summary { cursor: pointer; }
.quality-events { margin: 6px 0 0; padding-left: 18px; }
.quality-events li + li { margin-top: 6px; }
@media (max-width: 800px) { .quality-grid { grid-template-columns: minmax(0, 1fr); } }
.run-heading { display: flex; justify-content: space-between; align-items: center; gap: 10px; }
.run-log { max-height: 52vh; white-space: pre-wrap; overflow: auto; padding: 12px; background: #eef3f5; }
#run-status h3 { margin-top: 14px; }
.annotation-dialog {
  width: min(1080px, calc(100% - 24px));
  max-height: calc(100vh - 24px);
  max-height: calc(100dvh - 24px);
  padding: 0;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: var(--panel);
  color: var(--ink);
}
.annotation-dialog[open] { display: grid; grid-template-rows: minmax(0, 1fr) auto; }
.annotation-dialog:not(:modal) { position: relative; margin: 0 auto; }
.annotation-dialog::backdrop { background: #122b39b8; }
.annotation-dialog-body { overflow: auto; overscroll-behavior: contain; padding: clamp(15px, 3vw, 28px); }
.annotation-dialog-body h1[tabindex="-1"]:focus { outline: none; }
.annotation-dialog-body > .team-intro + .section-block { margin-top: 18px; }
.annotation-dialog > form { display: flex; justify-content: flex-end; gap: 8px; padding: 12px clamp(15px, 3vw, 28px); border-top: 1px solid var(--line); }
label[for="feedback-text"] { margin-top: 14px; font-weight: 600; }
#feedback-text { display: block; width: 100%; margin-top: 4px; padding: 8px; border: 1px solid #bacbd6; border-radius: 6px; font: inherit; color: var(--ink); resize: vertical; }
.feedback-error { color: #8d3120; }
.team-table .feedback-message { white-space: pre-wrap; min-width: 240px; }
.annotation-update-dialog { max-width: 640px; }
.annotation-history-list { list-style: none; padding: 0; margin: 14px 0 0; }
.annotation-history-list li { padding: 10px 0; border-top: 1px solid var(--line); }
.annotation-history-list li:last-child { padding-bottom: 0; }
.annotation-history-list h2 { display: flex; align-items: baseline; gap: 10px; margin: 0; }
.annotation-history-list p { margin: 4px 0 0; }
.annotation-history-version { color: var(--accent); font-variant-numeric: tabular-nums; }
.annotation-update-keys { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 6px; margin: 0; }
.annotation-update-keys > div { display: flex; align-items: center; gap: 8px; padding: 6px 8px; background: #eef3f5; border-radius: 6px; }
.annotation-update-keys dd { margin: 0; }
.annotation-update-keys kbd { display: inline-block; min-width: 24px; padding: 2px 4px; text-align: center; border: 1px solid var(--line); border-radius: 4px; background: var(--panel); }
.guide-grid { display: grid; grid-template-columns: repeat(2, minmax(0,1fr)); gap: 14px; align-items: start; }
.guide-figure { margin: 0; }
.guide-canvas { background: #172e3c; border-radius: 6px; overflow: hidden; }
.guide-canvas canvas { width: 100%; height: auto; cursor: default; }
#guide-layout { max-width: 520px; margin-inline: auto; }
.guide-switch { display: flex; flex-wrap: wrap; gap: 6px; margin-bottom: 10px; }
.guide-figure figcaption { margin-top: 10px; color: var(--muted); }
.key-legend { display: flex; flex-wrap: wrap; gap: 10px 20px; }
.key-legend span { display: inline-flex; align-items: center; gap: 6px; }
.key-legend i { display: inline-block; width: 12px; height: 12px; border: 1px solid #285064; border-radius: 50%; }
.legend-center { background: #ffc243; }
.legend-root { background: #34d399; }
.legend-hub { background: #60a5fa; }
.guide-steps li + li { margin-top: 12px; }
.guide-steps ol { margin-bottom: 5px; padding-left: 25px; }
.guide-heading { display: flex; flex-wrap: wrap; align-items: baseline; justify-content: space-between; gap: 6px 16px; }
.guide-keys { margin: 0; }
.guide-keys > div { display: grid; grid-template-columns: 162px 1fr; gap: 9px; padding: 8px; }
.guide-keys > div + div { border-top: 1px solid var(--line); }
.guide-keys dt { font-weight: 620; }
.guide-keys dd { margin: 0; }
.guide-keys kbd, .shortcut-table kbd { padding: 1px 5px; background: #e8eef2; border: 1px solid #bcced7; border-radius: 4px; opacity: 1; }
.shortcut-table td:first-child { white-space: nowrap; }
.shortcut-table td:nth-child(2) { min-width: 100px; }
@media (max-width: 800px) {
  .team-main { padding: 15px; }
  .metrics { grid-template-columns: repeat(auto-fit, minmax(100px, 1fr)); }
  .admin-grid, .model-grid { grid-template-columns: 1fr; }
  .guide-grid { grid-template-columns: 1fr; }
  .guide-keys > div { grid-template-columns: 1fr; }
}
