.standings-quick-editor {
  position: fixed;
  z-index: 120;
  width: min(22rem, calc(100vw - 1.5rem));
  max-height: calc(100vh - 1.5rem);
  overflow: auto;
  padding: 1rem;
  border: 1px solid var(--line-bright);
  border-top: 2px solid var(--ink-orange);
  background: var(--void-raised);
  color: var(--bone);
  box-shadow: 0 1.2rem 3rem rgba(0, 0, 0, .7);
}

.standings-quick-editor__header {
  display: flex;
  align-items: start;
  justify-content: space-between;
  gap: .75rem;
  padding-bottom: .7rem;
  border-bottom: 1px solid var(--line);
}

.standings-quick-editor__header h4 {
  margin: .2rem 0 0;
  font: 700 1rem var(--mono);
  overflow-wrap: anywhere;
}

.standings-quick-editor__header small {
  display: block;
  margin-top: .2rem;
  color: var(--ash);
  font: .58rem var(--mono);
}

.standings-quick-editor__dismiss {
  padding: .35rem .45rem;
  border: 1px solid var(--line);
  background: transparent;
  color: var(--ash);
  font: .56rem var(--mono);
  cursor: pointer;
}

.standings-quick-editor__dismiss:hover,
.standings-quick-editor__dismiss:focus-visible {
  border-color: var(--ink-orange);
  color: var(--ink-orange);
}

.standings-quick-editor__facts {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: .55rem;
  margin: .75rem 0;
}

.standings-quick-editor__facts dt {
  color: var(--ash);
  font: .52rem var(--mono);
}

.standings-quick-editor__facts dd {
  margin: .15rem 0 0;
  color: var(--bone-dim);
  font: 700 .68rem var(--mono);
  overflow-wrap: anywhere;
}

.standings-quick-editor__select,
.standings-quick-editor__reason,
.standings-quick-editor__confirmation {
  display: block;
  margin-top: .65rem;
  color: var(--ash);
  font: .58rem var(--mono);
  letter-spacing: .06em;
}

.standings-quick-editor__select select,
.standings-quick-editor__reason textarea {
  display: block;
  width: 100%;
  margin-top: .3rem;
  border: 1px solid var(--line-bright);
  background: var(--void);
  color: var(--bone);
  font: 700 .72rem var(--mono);
}

.standings-quick-editor__select select {
  min-height: 2.6rem;
  padding: .6rem 2rem .6rem .65rem;
  cursor: pointer;
}

.standings-quick-editor__select select.standing-select--allied { color: var(--standing-allied); }
.standings-quick-editor__select select.standing-select--excellent { color: var(--standing-excellent); }
.standings-quick-editor__select select.standing-select--good { color: var(--standing-good); }
.standings-quick-editor__select select.standing-select--neutral { color: var(--standing-neutral); }
.standings-quick-editor__select select.standing-select--bad { color: var(--standing-bad); }
.standings-quick-editor__select select.standing-select--terrible { color: var(--standing-terrible); }
.standings-quick-editor__select select.standing-select--default { color: var(--standing-unset); }

.standings-quick-editor__reason textarea {
  min-height: 4.4rem;
  padding: .65rem;
  resize: vertical;
}

.standings-quick-editor__transition {
  margin: .65rem 0 0;
  padding: .55rem;
  border-left: 2px solid var(--ink-orange);
  background: var(--ink-orange-soft);
  color: var(--bone);
  font: 700 .66rem var(--mono);
}

.standings-quick-editor__confirmation {
  color: var(--bone-dim);
  line-height: 1.45;
  cursor: pointer;
}

.standings-quick-editor__confirmation input {
  margin: 0 .35rem 0 0;
  accent-color: var(--ink-orange);
}

.standings-quick-editor__actions {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: .55rem;
  margin-top: .75rem;
}

.standings-quick-editor__actions .action {
  width: 100%;
  min-height: 2.5rem;
  margin: 0;
  padding: .55rem;
}

.standings-quick-editor__actions .action:disabled {
  opacity: .45;
  cursor: not-allowed;
}

.standings-quick-editor__status {
  min-height: 1em;
  margin: .55rem 0 0;
  color: var(--ash);
  font: .56rem/1.45 var(--mono);
}

.standings-quick-editor :focus-visible {
  outline: 2px solid var(--ink-orange);
  outline-offset: 2px;
}

.shell--editing .standing-cell,
.shell--editing .standings-mobile__record,
.shell--editing .pilot-standing__quick {
  cursor: pointer;
}

.shell--editing .standing-cell:hover,
.shell--editing .standings-mobile__record:hover,
.shell--editing .pilot-standing__quick:hover {
  border-color: var(--ink-orange);
  box-shadow: inset 0 0 0 1px var(--ink-orange);
}

.pilot-standing__quick {
  padding: 0;
  border: 1px solid transparent;
  background: transparent;
  color: inherit;
}

.pilot-standing__quick .standing-badge { pointer-events: none; }

.shell:not(.shell--editing) .pilot-standing__quick {
  cursor: default;
}

.standings-quick-notice {
  position: fixed;
  right: 1rem;
  bottom: 4.5rem;
  z-index: 130;
  max-width: min(28rem, calc(100vw - 2rem));
  margin: 0;
  padding: .75rem 1rem;
  border: 1px solid var(--standing-excellent);
  background: var(--void-raised);
  color: var(--standing-excellent);
  font: .65rem var(--mono);
  box-shadow: 0 .8rem 2rem rgba(0, 0, 0, .55);
  pointer-events: none;
}

.standings-quick-notice--warning {
  border-color: var(--standing-bad);
  color: var(--standing-bad);
}

@media (max-width: 720px) {
  .standings-quick-editor--sheet {
    inset: auto 0 0;
    width: 100%;
    max-height: min(82vh, 42rem);
    border-right: 0;
    border-bottom: 0;
    border-left: 0;
    padding: 1rem max(1rem, env(safe-area-inset-right)) max(1rem, env(safe-area-inset-bottom)) max(1rem, env(safe-area-inset-left));
    box-shadow: 0 -1rem 2.5rem rgba(0, 0, 0, .75);
  }

  .standings-quick-editor__facts { grid-template-columns: 1fr 1fr; }
  .standings-quick-notice { right: .75rem; bottom: 4rem; left: .75rem; max-width: none; }
}

@media (max-width: 420px) {
  .standings-quick-editor__facts { grid-template-columns: 1fr; }
}
