:root {
  --paper: #d7e1e8;
  --paper-strong: #eef4f7;
  --panel: rgba(11, 34, 48, 0.92);
  --panel-soft: rgba(20, 55, 74, 0.88);
  --ink: #eaf7ff;
  --muted: #a9c0cf;
  --line: rgba(185, 227, 242, 0.18);
  --accent: #3fd1c2;
  --accent-strong: #8ef3e6;
  --accent-deep: #1d8f9d;
  --good: #8fe29e;
  --warn: #ffd36b;
  --bad: #ff8e90;
  --shadow: rgba(7, 20, 31, 0.2);
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  min-height: 100vh;
  color: #123041;
  font-family: "Avenir Next", "Segoe UI", "Helvetica Neue", sans-serif;
  background:
    linear-gradient(rgba(255, 255, 255, 0.28) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255, 255, 255, 0.28) 1px, transparent 1px),
    radial-gradient(
      circle at top left,
      rgba(63, 209, 194, 0.14),
      transparent 24%
    ),
    radial-gradient(
      circle at top right,
      rgba(0, 146, 255, 0.12),
      transparent 22%
    ),
    linear-gradient(180deg, #edf5f9 0%, #d8e7ef 48%, #c8d9e4 100%);
  background-size:
    32px 32px,
    32px 32px,
    auto,
    auto,
    auto;
}

code,
input,
select,
button,
table {
  font-family:
    "SFMono-Regular", "Menlo", "Monaco", "Consolas", "Liberation Mono",
    monospace;
}

main {
  width: min(1280px, calc(100% - 28px));
  margin: 24px auto 40px;
}

.hero,
.panel {
  border: 1px solid var(--line);
  border-radius: 24px;
  box-shadow: 0 22px 60px var(--shadow);
}

.hero {
  position: relative;
  padding: 18px 22px;
  background:
    radial-gradient(
      circle at 100% 0,
      rgba(142, 243, 230, 0.1),
      transparent 22%
    ),
    linear-gradient(135deg, rgba(255, 255, 255, 0.04), transparent 38%),
    linear-gradient(180deg, rgba(13, 44, 60, 0.98), rgba(9, 30, 42, 0.995));
  overflow: hidden;
}

.hero::after {
  content: "";
  position: absolute;
  inset: auto -56px -56px auto;
  width: 168px;
  height: 168px;
  border-radius: 24px;
  border: 1px solid rgba(142, 243, 230, 0.1);
  background:
    linear-gradient(180deg, rgba(142, 243, 230, 0.08), transparent),
    repeating-linear-gradient(
      0deg,
      rgba(142, 243, 230, 0.05) 0 8px,
      transparent 8px 16px
    );
  transform: rotate(10deg);
  pointer-events: none;
}

.hero-kicker,
.field-group legend,
.field span,
.metadata-label {
  font-size: 0.8rem;
  font-weight: 700;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

.hero-kicker {
  display: inline-block;
  padding: 5px 9px;
  border-radius: 999px;
  border: 1px solid var(--line);
  color: var(--accent-strong);
  background: rgba(142, 243, 230, 0.12);
  box-shadow: none;
}

.hero-grid {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  gap: 14px;
  align-items: center;
}

.hero-copy {
  display: grid;
  gap: 0;
}

.hero-title-row {
  display: grid;
  grid-template-columns: auto minmax(340px, 1fr) auto;
  gap: 18px;
  align-items: end;
}

.hero-help-link {
  display: grid;
  width: 32px;
  height: 32px;
  place-items: center;
  border: 1px solid rgba(142, 243, 230, 0.72);
  border-radius: 50%;
  color: #082432;
  background: var(--accent-strong);
  box-shadow: 0 5px 18px rgba(63, 209, 194, 0.26);
  font-family: "SFMono-Regular", "Menlo", "Monaco", "Consolas", monospace;
  font-size: 1rem;
  font-weight: 900;
  line-height: 1;
  text-decoration: none;
}

.hero-help-link:hover,
.hero-help-link:focus-visible {
  color: #082432;
  background: #fff;
  outline: 3px solid rgba(142, 243, 230, 0.45);
  outline-offset: 3px;
}

.hero h1,
.panel h2,
.summary-card h3,
.section-heading h3 {
  margin: 0;
  font-weight: 800;
  letter-spacing: -0.04em;
}

.hero h1 {
  color: #f7fcff;
  font-size: clamp(1.85rem, 4.5vw, 3rem);
  line-height: 0.94;
  text-transform: uppercase;
  text-shadow: 0 2px 16px rgba(0, 0, 0, 0.22);
}

.hero p,
.panel-heading p,
.section-heading p,
.status,
.empty-state {
  color: var(--muted);
}

.hero p {
  max-width: 40ch;
  margin: 0;
  color: #c7dae6;
  line-height: 1.42;
  font-size: 0.92rem;
}

.layout {
  display: grid;
  grid-template-columns: 360px minmax(0, 1fr);
  gap: 20px;
  margin-top: 20px;
}

.panel {
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.06), transparent 14%),
    linear-gradient(180deg, rgba(22, 61, 82, 0.95), rgba(11, 34, 48, 0.98));
  color: var(--ink);
}

.controls,
.content {
  padding: 22px;
}

.controls {
  padding-top: 18px;
}

.panel-heading,
.section-heading {
  display: flex;
  justify-content: space-between;
  gap: 16px;
  align-items: end;
}

.panel-heading {
  margin-bottom: 20px;
  padding-bottom: 14px;
  border-bottom: 1px solid var(--line);
}

.panel-heading p,
.section-heading p {
  margin: 0;
  line-height: 1.5;
}

.stack {
  display: grid;
  gap: 16px;
}

.field-group {
  margin: 0;
  padding: 16px;
  border: 1px solid var(--line);
  border-radius: 18px;
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.04), transparent 18%),
    rgba(255, 255, 255, 0.03);
}

.field-group legend {
  padding: 0 8px;
  color: var(--accent-strong);
}

.field {
  display: grid;
  gap: 8px;
  margin-top: 14px;
}

.field[hidden] {
  display: none;
}

.field:first-of-type {
  margin-top: 0;
}

input,
select,
button {
  width: 100%;
  min-height: 44px;
  border-radius: 12px;
  border: 1px solid rgba(185, 227, 242, 0.2);
}

input,
select {
  padding: 10px 12px;
  color: var(--ink);
  background: rgba(238, 244, 247, 0.08);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.05);
}

button {
  padding: 10px 14px;
  font-weight: 700;
  color: #04212b;
  cursor: pointer;
  background: linear-gradient(180deg, var(--accent-strong), var(--accent));
  box-shadow:
    0 10px 24px rgba(29, 143, 157, 0.22),
    inset 0 1px 0 rgba(255, 255, 255, 0.35);
}

button:hover:not(:disabled) {
  transform: translateY(-1px);
  background: linear-gradient(180deg, #a5fff3, #55dacd);
}

button:active:not(:disabled) {
  transform: translateY(0);
}

button:disabled {
  opacity: 0.55;
  cursor: not-allowed;
  box-shadow: none;
}

.action-row {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
}

.action-row-secondary button:first-child {
  background: linear-gradient(180deg, #ffd27b, #ef9f42);
  color: #3a2200;
  box-shadow:
    0 10px 24px rgba(239, 159, 66, 0.2),
    inset 0 1px 0 rgba(255, 255, 255, 0.35);
}

.action-row-secondary button:last-child {
  background: linear-gradient(180deg, #a9ffe0, #58d69e);
  color: #062719;
  box-shadow:
    0 10px 24px rgba(88, 214, 158, 0.18),
    inset 0 1px 0 rgba(255, 255, 255, 0.35);
}

#doctor-button {
  background: linear-gradient(180deg, #fffdf8, #f0ece3);
  color: #bb2b2b;
  box-shadow:
    0 10px 24px rgba(255, 255, 255, 0.14),
    inset 0 1px 0 rgba(255, 255, 255, 0.6);
}

#doctor-button:hover:not(:disabled) {
  background: linear-gradient(180deg, #ffffff, #f6f2e9);
}

#fragment-button {
  background: linear-gradient(180deg, #ffe08a, #d6a93c);
  color: #422d00;
  box-shadow:
    0 10px 24px rgba(214, 169, 60, 0.24),
    inset 0 1px 0 rgba(255, 255, 255, 0.34);
}

#fragment-button:hover:not(:disabled) {
  background: linear-gradient(180deg, #ffe8a7, #e2b74e);
}

#corrupt-button {
  background: linear-gradient(180deg, #ff938e, #e24d46);
  color: #3b0907;
  box-shadow:
    0 10px 24px rgba(226, 77, 70, 0.24),
    inset 0 1px 0 rgba(255, 255, 255, 0.28);
}

#corrupt-button:hover:not(:disabled) {
  background: linear-gradient(180deg, #ffaba6, #ef5c55);
}

.compact-metadata {
  gap: 4px;
}

.status {
  position: fixed;
  right: 18px;
  bottom: 18px;
  z-index: 10050;
  max-width: min(420px, calc(100vw - 36px));
  margin: 0;
  padding: 11px 14px;
  border: 1px solid rgba(185, 227, 242, 0.16);
  border-radius: 14px;
  background: rgba(7, 20, 31, 0.94);
  box-shadow: 0 18px 36px rgba(0, 0, 0, 0.28);
  color: var(--ink);
  line-height: 1.45;
  opacity: 0;
  transform: translateY(8px);
  pointer-events: none;
  border: 1px solid rgba(185, 227, 242, 0.16);
  outline: none;
  transition:
    opacity 140ms ease,
    transform 140ms ease,
    border-color 140ms ease;
}

.status.is-visible {
  opacity: 1;
  transform: translateY(0);
}

.status[data-error="true"] {
  border-color: rgba(255, 142, 144, 0.42);
  color: #ffd2d3;
}

.status[data-error="false"] {
  border-color: rgba(142, 243, 230, 0.28);
  color: var(--paper-strong);
}

.doctor-toast {
  position: fixed;
  right: 18px;
  bottom: 18px;
  z-index: 10060;
  max-width: min(420px, calc(100vw - 36px));
  margin: 0;
  padding: 11px 14px;
  border: 1px solid rgba(185, 227, 242, 0.16);
  border-radius: 14px;
  background: rgba(7, 20, 31, 0.94);
  box-shadow: 0 18px 36px rgba(0, 0, 0, 0.28);
  color: var(--ink);
  line-height: 1.45;
  opacity: 0;
  transform: translateY(8px);
  pointer-events: none;
  transition:
    opacity 140ms ease,
    transform 140ms ease,
    border-color 140ms ease;
}

.doctor-toast.is-visible {
  opacity: 1;
  transform: translateY(0);
}

.doctor-toast[data-error="true"] {
  border-color: rgba(255, 142, 144, 0.42);
  color: #ffd2d3;
}

.doctor-toast[data-error="false"] {
  border-color: rgba(142, 243, 230, 0.28);
  color: var(--paper-strong);
}

.summary-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 16px;
}

.summary-card,
.directory-panel {
  border: 1px solid var(--line);
  border-radius: 18px;
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.04), transparent 16%),
    rgba(255, 255, 255, 0.03);
}

.summary-card {
  padding: 16px;
}

.summary-card h3 {
  margin-bottom: 10px;
}

.summary-section {
  padding-top: 14px;
}

.meta-list {
  margin: 0;
  display: grid;
  gap: 8px;
}

.meta-list div {
  display: grid;
  grid-template-columns: 140px minmax(0, 1fr);
  gap: 10px;
  padding-bottom: 8px;
  border-bottom: 1px solid rgba(255, 232, 191, 0.08);
}

.meta-list div:last-child {
  padding-bottom: 0;
  border-bottom: 0;
}

.meta-list dt {
  color: var(--muted);
  font-size: 0.82rem;
}

.meta-list dd {
  margin: 0;
  text-align: right;
  word-break: break-word;
  font-size: 0.92rem;
}

.meta-inline-button {
  display: inline-flex;
  width: auto;
  max-width: 100%;
  flex: 0 0 auto;
  align-items: center;
  justify-content: center;
  min-height: 28px;
  padding: 4px 10px;
  border: 1px solid rgba(185, 227, 242, 0.16);
  border-radius: 999px;
  background: rgba(63, 209, 194, 0.12);
  color: var(--accent-strong);
  font: inherit;
  font-weight: 700;
  line-height: 1;
  vertical-align: middle;
}

.meta-inline-separator,
.meta-inline-value {
  vertical-align: middle;
}

.usage-chart-panel {
  display: grid;
  grid-template-columns: 1fr;
  gap: 14px;
  justify-items: center;
  margin-top: 14px;
  padding-top: 14px;
  border-top: 1px solid rgba(185, 227, 242, 0.12);
}

.usage-chart {
  width: 132px;
  height: 132px;
  border-radius: 50%;
  border: 1px solid rgba(185, 227, 242, 0.2);
  box-shadow:
    inset 0 0 0 1px rgba(255, 255, 255, 0.04),
    0 12px 28px rgba(6, 17, 27, 0.16);
}

.usage-legend {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 8px;
  width: 100%;
}

.legend-row {
  display: grid;
  grid-template-columns: 12px minmax(0, 1fr) auto;
  gap: 10px;
  align-items: center;
  font-size: 0.84rem;
  min-width: 0;
}

.legend-swatch {
  width: 12px;
  height: 12px;
  border-radius: 999px;
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.18);
}

.legend-row span {
  color: var(--muted);
}

.legend-row strong {
  font-size: 0.82rem;
}

.directory-panel {
  margin-top: 18px;
  padding: 16px;
}

.content > .directory-panel:first-child {
  margin-top: 0;
}

.disk-map-panel {
  margin-top: 18px;
}

.disk-map-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.2fr) minmax(240px, 0.8fr);
  gap: 18px;
  margin-top: 14px;
  align-items: start;
}

.disk-map-physical-panel[hidden] {
  display: none !important;
}

.disk-map-physical-panel {
  margin-top: 14px;
}

.disk-map-frame {
  position: relative;
  padding: 12px;
  border: 1px solid rgba(185, 227, 242, 0.1);
  border-radius: 16px;
  background: #b9c8d2;
}

.disk-map-frame.is-file-drop-target {
  border-color: rgba(63, 209, 194, 0.58);
  box-shadow:
    inset 0 0 0 1px rgba(142, 243, 230, 0.32),
    0 0 0 4px rgba(63, 209, 194, 0.12);
}

.disk-map-physical-panel .sector-physical {
  padding: 10px 12px;
  border: 1px solid rgba(185, 227, 242, 0.14);
  border-radius: 8px;
  background: rgba(8, 28, 39, 0.88);
  box-shadow: 0 16px 28px rgba(6, 17, 27, 0.26);
  backdrop-filter: blur(2px);
}

.disk-drop-hint {
  position: absolute;
  inset: 56px 18px 18px;
  display: grid;
  place-items: center;
  padding: 18px;
  border: 2px dashed rgba(63, 209, 194, 0.58);
  border-radius: 20px;
  color: #103545;
  font-weight: 800;
  letter-spacing: 0.03em;
  text-align: center;
  background:
    linear-gradient(
      180deg,
      rgba(142, 243, 230, 0.84),
      rgba(206, 249, 245, 0.8)
    ),
    rgba(255, 255, 255, 0.28);
  backdrop-filter: blur(4px);
  pointer-events: none;
  z-index: 4;
}

.disk-drop-hint[hidden] {
  display: none !important;
}

.disk-map-toolbar {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  align-items: center;
  margin-bottom: 10px;
}

.disk-map-toolbar-label {
  color: #304653;
  font-size: 0.8rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.disk-map-toolbar-actions {
  display: flex;
  gap: 8px;
}

.disk-map-toolbar-actions button {
  width: auto;
  min-width: 48px;
  min-height: 34px;
  padding: 6px 12px;
  font-size: 0.84rem;
}

.disk-map-toggle-button {
  position: relative;
  min-width: 42px !important;
  padding: 6px 10px !important;
  font-size: 1rem !important;
  line-height: 1;
}

.disk-map-toggle-button.is-off {
  background: linear-gradient(180deg, #5d6e78, #3b4b54);
  color: #dce6eb;
  box-shadow:
    0 10px 24px rgba(20, 31, 38, 0.24),
    inset 0 1px 0 rgba(255, 255, 255, 0.18);
}

.disk-map-toggle-button.is-off:hover:not(:disabled) {
  background: linear-gradient(180deg, #71838d, #485962);
}

.disk-map-toggle-button.is-on {
  background: linear-gradient(180deg, #ffe08a, #d6a93c);
  color: #422d00;
  box-shadow:
    0 10px 24px rgba(214, 169, 60, 0.22),
    inset 0 1px 0 rgba(255, 255, 255, 0.3);
}

.disk-map-toggle-button.is-on:hover:not(:disabled) {
  background: linear-gradient(180deg, #ffe8a7, #e2b74e);
}

.disk-map-toggle-button[data-tooltip-text]::after {
  content: attr(data-tooltip-text);
  position: absolute;
  right: 0;
  bottom: calc(100% + 10px);
  width: 220px;
  padding: 8px 10px;
  border: 1px solid rgba(185, 227, 242, 0.18);
  border-radius: 10px;
  background: rgba(7, 20, 31, 0.96);
  box-shadow: 0 16px 30px rgba(0, 0, 0, 0.26);
  color: var(--ink);
  font-size: 0.74rem;
  font-weight: 600;
  line-height: 1.4;
  text-align: left;
  opacity: 0;
  transform: translateY(4px);
  pointer-events: none;
  transition:
    opacity 120ms ease,
    transform 120ms ease;
  z-index: 6;
}

.disk-map-toggle-button[data-tooltip-text]:hover::after,
.disk-map-toggle-button[data-tooltip-text]:focus-visible::after {
  opacity: 1;
  transform: translateY(0);
}

.disk-map {
  aspect-ratio: 1;
  width: 100%;
  min-height: 320px;
  display: grid;
  place-items: center;
  overflow: hidden;
  cursor: default;
  user-select: none;
  background: #b9c8d2;
  border-radius: 14px;
  color: #304653;
}

.disk-map.empty-state {
  color: #304653;
  font-weight: 600;
}

.disk-map-heatmap-summary {
  position: absolute;
  top: 92px;
  left: 18px;
  z-index: 3;
  padding: 7px 11px;
  border: 1px solid rgba(8, 28, 39, 0.22);
  border-radius: 999px;
  color: #08202c;
  box-shadow: 0 10px 22px rgba(6, 17, 27, 0.16);
  font-size: 0.76rem;
  font-weight: 800;
  letter-spacing: 0.04em;
  white-space: nowrap;
  pointer-events: none;
}

.disk-map-heatmap-summary[hidden] {
  display: none !important;
}

.disk-map.is-pannable {
  cursor: grab;
}

.disk-map svg {
  display: block;
  width: 100%;
  height: 100%;
  transform-origin: center center;
  transition: transform 140ms ease;
  will-change: transform;
}

.disk-map-sector {
  transition:
    filter 90ms ease,
    stroke-width 90ms ease;
}

.disk-map-sector.is-hovered {
  filter: brightness(1.22);
  stroke: rgba(232, 248, 255, 0.9) !important;
  stroke-width: 1.2 !important;
}

.disk-map-sector.is-selected {
  filter: brightness(1.08);
  stroke: rgba(255, 219, 140, 0.95) !important;
  stroke-width: 1.3 !important;
}

.disk-map.is-dragging {
  cursor: grabbing;
}

.disk-map.is-dragging svg {
  transition: none;
}

.disk-map-center-label {
  font-size: 11px;
  font-weight: 700;
  fill: #dffaff;
  text-anchor: middle;
}

.disk-map-center-subtitle {
  font-size: 9px;
  fill: #9fc8d8;
  text-anchor: middle;
}

.disk-map-shell-title {
  font-size: 19px;
  font-weight: 800;
  fill: #3f3b36;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.disk-map-shell-subtitle {
  font-size: 10px;
  fill: #6b655f;
  letter-spacing: 0.06em;
  text-transform: uppercase;
}

.disk-map-shell-diskno {
  font-size: 11px;
  font-weight: 700;
  fill: #4d4945;
  text-anchor: end;
  letter-spacing: 0.06em;
  text-transform: uppercase;
}

.disk-map-cover-title {
  font-size: 15px;
  font-weight: 800;
  letter-spacing: 0.05em;
  text-transform: uppercase;
}

.disk-map-cover-program {
  font-size: 12px;
  font-weight: 700;
}

.disk-map-cover-program.is-deleted {
  text-decoration: line-through;
  opacity: 0.68;
}

.disk-map-track-label {
  font-size: 7px;
  fill: rgba(223, 250, 255, 0.82);
  text-anchor: middle;
}

.disk-map-tooltip {
  position: absolute;
  z-index: 2;
  min-width: 150px;
  max-width: 240px;
  padding: 8px 10px;
  border: 1px solid rgba(185, 227, 242, 0.16);
  border-radius: 10px;
  color: var(--ink);
  background: rgba(8, 28, 39, 0.94);
  box-shadow: 0 16px 32px rgba(6, 17, 27, 0.28);
  font-size: 0.78rem;
  line-height: 1.4;
  pointer-events: none;
}

.disk-map-pointer {
  position: absolute;
  top: 54px;
  left: 16px;
  z-index: 2;
  padding: 6px 10px;
  border: 1px solid rgba(185, 227, 242, 0.16);
  border-radius: 999px;
  color: var(--ink);
  background: rgba(8, 28, 39, 0.9);
  box-shadow: 0 10px 24px rgba(6, 17, 27, 0.22);
  font-size: 0.76rem;
  font-weight: 700;
  letter-spacing: 0.04em;
  pointer-events: none;
}

.disk-map-legend-wrap {
  display: grid;
  gap: 12px;
}

.disk-map-legend {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
}

.disk-map-inspector[hidden] {
  display: none !important;
}

.disk-map-inspector {
  padding: 12px;
  border: 1px solid rgba(185, 227, 242, 0.1);
  border-radius: 14px;
  background: rgba(255, 255, 255, 0.03);
}

.sector-inspector {
  display: grid;
  gap: 12px;
}

.sector-inspector-head {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 12px;
  align-items: start;
}

.sector-inspector-head h4 {
  margin: 0;
  font-size: 0.92rem;
  color: var(--accent-strong);
  letter-spacing: 0.04em;
  text-transform: uppercase;
}

.sector-inspector-head p {
  margin: 6px 0 0;
  color: var(--muted);
  font-size: 0.8rem;
}

.sector-inspector-meta {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  gap: 8px;
  margin: 0;
  padding: 12px 0;
  border-top: 1px solid rgba(185, 227, 242, 0.1);
  border-bottom: 1px solid rgba(185, 227, 242, 0.1);
}

.sector-inspector-meta div {
  display: grid;
  grid-template-columns: 104px minmax(0, 1fr);
  gap: 8px;
  align-items: start;
  padding: 3px 0;
}

.sector-inspector-meta dt {
  color: var(--accent-strong);
  font-size: 0.76rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.sector-inspector-meta dd {
  margin: 0;
  color: var(--ink);
  overflow-wrap: anywhere;
  line-height: 1.4;
}

.sector-link-row {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  gap: 8px;
}

.sector-link-raw {
  color: var(--ink);
  font-size: 0.9rem;
}

.sector-link-button {
  display: inline-flex;
  flex: 0 0 auto;
  min-height: 28px;
  width: auto;
  min-width: 0;
  padding: 5px 10px;
  border: 1px solid rgba(185, 227, 242, 0.16);
  border-radius: 999px;
  background: rgba(63, 209, 194, 0.12);
  color: var(--accent-strong);
  box-shadow: none;
  font-size: 0.74rem;
  font-weight: 700;
  line-height: 1;
  white-space: nowrap;
  align-items: center;
  justify-content: center;
  justify-self: start;
}

.sector-physical {
  display: grid;
  gap: 10px;
  padding: 12px;
  border: 1px solid rgba(185, 227, 242, 0.1);
  border-radius: 14px;
  background: rgba(255, 255, 255, 0.03);
}

.sector-physical-head {
  display: grid;
  gap: 4px;
}

.sector-physical-head strong {
  color: var(--accent-strong);
  font-size: 0.78rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.sector-physical-head span,
.sector-physical-legend {
  color: var(--muted);
  font-size: 0.78rem;
  line-height: 1.45;
}

.sector-physical-strip {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.sector-physical-preamble {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.sector-physical-mini {
  display: inline-grid;
  gap: 2px;
  min-width: 58px;
  padding: 7px 8px;
  border-radius: 10px;
  border: 1px solid rgba(255, 255, 255, 0.08);
}

.sector-physical-mini strong {
  color: var(--paper-strong);
  font-size: 0.66rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.sector-physical-mini span {
  color: var(--ink);
  font-size: 0.74rem;
}

.sector-physical-mini.is-stored {
  background: rgba(63, 209, 194, 0.14);
}

.sector-physical-mini.is-inferred {
  background: rgba(255, 211, 107, 0.14);
}

.sector-physical-mini.is-expected {
  background: rgba(169, 192, 207, 0.12);
}

.sector-physical-bar-wrap {
  display: grid;
  gap: 8px;
}

.sector-physical-timing {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.sector-bitplane-wrap {
  padding: 6px;
  border: 1px solid rgba(185, 227, 242, 0.12);
  border-radius: 4px;
  background: rgba(6, 20, 30, 0.44);
}

.sector-bitplane-button {
  display: block;
  width: 100%;
  padding: 0;
  border: 0;
  border-radius: 2px;
  background: transparent;
  box-shadow: none;
  cursor: pointer;
}

.sector-bitplane {
  display: block;
  width: 100%;
  height: auto;
  aspect-ratio: 8 / 1;
  image-rendering: pixelated;
  shape-rendering: crispEdges;
  border-radius: 2px;
  overflow: hidden;
}

.sector-bitplane-zone.is-link {
  fill: rgba(126, 214, 223, 0.18);
}

.sector-bitplane-zone.is-payload {
  fill: rgba(63, 209, 194, 0.12);
}

.sector-bitplane-zone.is-tail {
  fill: rgba(152, 245, 225, 0.1);
}

.sector-bitplane-zero-column {
  fill: rgba(120, 132, 142, 0.42);
}

.sector-bitplane-pixel.is-link {
  fill: #b6f3ff;
}

.sector-bitplane-pixel.is-payload {
  fill: #5ef0ce;
}

.sector-bitplane-pixel.is-tail {
  fill: #d7fff5;
}

.sector-bitplane-button:hover .sector-bitplane,
.sector-bitplane-button:focus-visible .sector-bitplane {
  outline: 1px solid rgba(142, 243, 230, 0.4);
  outline-offset: 2px;
}

.sector-physical-bar-labels {
  display: flex;
  flex-wrap: wrap;
  gap: 10px 16px;
  color: var(--muted);
  font-size: 0.78rem;
}

.sector-physical-bar-labels span {
  display: inline-flex;
  gap: 6px;
  align-items: center;
}

.sector-physical-bar-label {
  width: auto;
  min-height: 0;
  padding: 0;
  border: 0;
  border-radius: 0;
  background: transparent;
  color: var(--muted);
  box-shadow: none;
  font: inherit;
  cursor: pointer;
}

.sector-data-dialog-body {
  position: relative;
  display: grid;
  gap: 10px;
}

.sector-data-dialog-note {
  margin: 0;
  color: var(--muted);
  font-size: 0.78rem;
  line-height: 1.4;
}

.sector-data-dialog-tip {
  margin: -4px 0 0;
  color: var(--accent-strong);
  font-size: 0.76rem;
  line-height: 1.4;
}

.sector-byte-dialog-meta {
  margin: -4px 0 0;
  color: var(--muted);
  font-size: 0.78rem;
}

.sector-physical-chip {
  display: grid;
  gap: 2px;
  min-width: 70px;
  padding: 8px 9px;
  border-radius: 10px;
  border: 1px solid rgba(255, 255, 255, 0.08);
}

.sector-physical-chip.is-stored {
  background: rgba(63, 209, 194, 0.14);
}

.sector-physical-chip.is-inferred {
  background: rgba(255, 211, 107, 0.14);
}

.sector-physical-chip.is-expected {
  background: rgba(169, 192, 207, 0.12);
}

.sector-physical-timing .sector-physical-chip {
  min-width: 96px;
}

.sector-physical-chip-label {
  color: var(--paper-strong);
  font-size: 0.68rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.sector-physical-chip-value {
  color: var(--ink);
  font-size: 0.76rem;
}

.sector-physical-legend {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
}

.sector-physical-legend span {
  display: inline-flex;
  gap: 6px;
  align-items: center;
}

.sector-physical-dot {
  width: 10px;
  height: 10px;
  border-radius: 999px;
  border: 1px solid rgba(255, 255, 255, 0.12);
}

.sector-physical-dot.is-stored {
  background: rgba(63, 209, 194, 0.68);
}

.sector-physical-dot.is-inferred {
  background: rgba(255, 211, 107, 0.68);
}

.sector-physical-dot.is-expected {
  background: rgba(169, 192, 207, 0.48);
}

.sector-inspector-dump {
  padding: 12px;
  border: 1px solid rgba(185, 227, 242, 0.1);
  border-radius: 14px;
  background: rgba(255, 255, 255, 0.03);
}

.sector-inspector-dump-head {
  display: flex;
  justify-content: space-between;
  gap: 10px;
  align-items: baseline;
  margin-bottom: 10px;
  color: var(--muted);
  font-size: 0.78rem;
}

.sector-inspector-dump-head strong {
  color: var(--accent-strong);
  text-transform: uppercase;
  letter-spacing: 0.08em;
}

.sector-hex-viewer {
  display: grid;
  gap: 4px;
  max-height: 420px;
  overflow-x: auto;
  overflow-y: auto;
  padding: 10px;
  border-radius: 12px;
  background: rgba(6, 20, 30, 0.72);
  font-family:
    "SFMono-Regular", "Menlo", "Monaco", "Consolas", "Liberation Mono",
    monospace;
  user-select: none;
  -webkit-user-select: none;
}

.sector-hex-row {
  display: grid;
  grid-template-columns: 30px max-content 16ch;
  gap: 8px;
  align-items: baseline;
  font-size: 0.75rem;
  line-height: 1.45;
  padding: 2px 4px;
  border-radius: 6px;
}

.sector-hex-row-no-offset {
  grid-template-columns: 0 max-content 16ch;
  gap: 8px;
}

.sector-hex-row:nth-child(odd) {
  background: rgba(255, 255, 255, 0.025);
}

.sector-hex-row:nth-child(even) {
  background: rgba(255, 255, 255, 0.055);
}

.sector-hex-header {
  background: transparent !important;
  padding-bottom: 6px;
  border-bottom: 1px solid rgba(185, 227, 242, 0.12);
  border-radius: 0;
}

.sector-hex-header .sector-hex-byte,
.sector-hex-header .sector-hex-ascii {
  color: var(--muted);
  font-size: 0.68rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.sector-hex-header .sector-hex-ascii {
  display: block;
  text-align: center;
}

.sector-hex-offset {
  color: #ffd36b;
}

.sector-hex-bytes {
  color: #eaf7ff;
  white-space: nowrap;
}

.sector-hex-ascii {
  color: var(--muted);
  letter-spacing: 0.08em;
  white-space: nowrap;
  justify-self: stretch;
}

.sector-hex-byte.is-link,
.sector-ascii-char.is-link {
  color: #8ef3e6;
}

.sector-hex-byte.is-zero {
  opacity: 0.42;
}

.sector-hex-byte.is-invalid,
.sector-ascii-char.is-invalid {
  color: #ff8e90;
  background: rgba(255, 142, 144, 0.14);
  border-radius: 4px;
  box-shadow: inset 0 0 0 1px rgba(255, 142, 144, 0.2);
}

.sector-hex-byte.is-significant,
.sector-ascii-char.is-significant {
  background: rgba(94, 219, 255, 0.16);
  border-radius: 4px;
  box-shadow: inset 0 0 0 1px rgba(94, 219, 255, 0.28);
}

.sector-hex-byte.is-role-name,
.sector-ascii-char.is-role-name {
  color: #8ef3e6;
}

.sector-hex-byte.is-role-type-status,
.sector-ascii-char.is-role-type-status {
  color: #f2a65a;
}

.sector-hex-byte.is-role-start,
.sector-ascii-char.is-role-start {
  color: #74b9ff;
}

.sector-hex-byte.is-role-side,
.sector-ascii-char.is-role-side {
  color: #d0a5ff;
}

.sector-hex-byte.is-role-record,
.sector-ascii-char.is-role-record {
  color: #ffd166;
}

.sector-hex-byte.is-role-blocks,
.sector-ascii-char.is-role-blocks {
  color: #ff8e90;
}

.sector-hex-byte.is-role-bam-count,
.sector-ascii-char.is-role-bam-count {
  color: #f5f7fb;
}

.sector-hex-byte.is-role-bam-free,
.sector-ascii-char.is-role-bam-free {
  color: #8ef3e6;
}

.sector-hex-byte.is-masked,
.sector-ascii-char.is-masked {
  color: transparent;
  background: transparent;
  box-shadow: none;
  user-select: none;
  pointer-events: none;
}

.sector-hex-byte[data-byte-index],
.sector-ascii-char[data-byte-index] {
  cursor: pointer;
}

.sector-data-dialog-warning {
  position: absolute;
  right: 10px;
  top: 10px;
  z-index: 3;
  max-width: min(360px, calc(100% - 20px));
  margin: 0;
  padding: 10px 12px;
  border: 1px solid rgba(255, 142, 144, 0.42);
  border-radius: 12px;
  background: rgba(30, 8, 11, 0.94);
  box-shadow: 0 14px 30px rgba(0, 0, 0, 0.24);
  color: #ffd2d3;
  font-size: 0.8rem;
  line-height: 1.4;
  pointer-events: none;
}

.sector-hex-byte[data-byte-index]:hover,
.sector-ascii-char[data-byte-index]:hover {
  color: var(--paper-strong);
}

.sector-hex-byte.is-dim,
.sector-ascii-char.is-dim {
  opacity: 0.34;
}

.sector-hex-byte.is-hover,
.sector-ascii-char.is-hover {
  background: rgba(142, 243, 230, 0.18);
  border-radius: 4px;
  box-shadow: inset 0 0 0 1px rgba(142, 243, 230, 0.28);
}

.sector-hex-byte.is-selected,
.sector-ascii-char.is-selected {
  background: rgba(255, 211, 107, 0.18);
  border-radius: 4px;
  box-shadow: inset 0 0 0 1px rgba(255, 211, 107, 0.34);
}

.disk-map-legend-group {
  padding: 12px;
  border: 1px solid rgba(185, 227, 242, 0.1);
  border-radius: 14px;
  background: rgba(255, 255, 255, 0.03);
}

.disk-map-legend-group h4 {
  margin: 0 0 10px;
  font-size: 0.78rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--accent-strong);
}

.disk-map-legend-row {
  display: grid;
  grid-template-columns: 14px minmax(0, 1fr);
  gap: 10px;
  align-items: start;
  font-size: 0.84rem;
}

.disk-map-legend-row + .disk-map-legend-row {
  margin-top: 8px;
}

.disk-map-legend-row span {
  color: var(--muted);
}

.disk-map-swatch {
  width: 14px;
  height: 14px;
  border-radius: 4px;
  border: 1px solid rgba(255, 255, 255, 0.18);
  box-shadow: inset 0 0 0 1px rgba(0, 0, 0, 0.05);
}

.table-shell {
  overflow: auto;
  margin-top: 14px;
  border-radius: 14px;
  border: 1px solid rgba(185, 227, 242, 0.1);
  background: rgba(5, 24, 35, 0.24);
}

table {
  width: 100%;
  border-collapse: collapse;
}

th,
td {
  padding: 12px 10px;
  border-bottom: 1px solid rgba(185, 227, 242, 0.08);
  text-align: left;
  vertical-align: middle;
}

thead th {
  position: sticky;
  top: 0;
  color: var(--accent-strong);
  background: rgba(8, 28, 39, 0.98);
  text-transform: uppercase;
  letter-spacing: 0.08em;
  font-size: 0.78rem;
}

tbody tr:nth-child(even) {
  background: rgba(255, 255, 255, 0.025);
}

tbody tr:hover {
  background: rgba(142, 243, 230, 0.08);
}

tbody tr[data-file-name] {
  cursor: default;
}

tbody tr.is-dragging {
  opacity: 0.45;
}

tbody tr.is-successive-duplicate {
  opacity: 0.62;
}

tbody tr.is-successive-duplicate td {
  color: rgba(220, 230, 236, 0.72);
}

tbody tr.is-successive-duplicate .file-type-button,
tbody tr.is-successive-duplicate .flag,
tbody tr.is-successive-duplicate .delete-button,
tbody tr.is-successive-duplicate .drag-handle {
  filter: saturate(0.72);
}

tbody tr.is-successive-duplicate .file-type-button,
tbody tr.is-successive-duplicate .drag-handle {
  border-color: rgba(185, 227, 242, 0.1);
}

tbody tr.is-drop-target {
  background: rgba(142, 243, 230, 0.08);
}

.drag-cell {
  width: 1%;
  white-space: nowrap;
}

.drag-handle {
  min-width: 30px;
  min-height: 34px;
  padding: 6px 8px;
  border: 1px solid rgba(185, 227, 242, 0.16);
  border-radius: 10px;
  background: rgba(255, 255, 255, 0.04);
  color: var(--muted);
  font-size: 0.86rem;
  font-weight: 800;
  letter-spacing: 0.08em;
  cursor: grab;
  box-shadow: none;
}

.drag-handle:hover {
  color: var(--accent-strong);
  background: rgba(142, 243, 230, 0.08);
}

.drag-handle:active {
  cursor: grabbing;
}

.drop-ghost td {
  padding: 10px;
  border-bottom: 1px dashed rgba(142, 243, 230, 0.45);
  color: var(--accent-strong);
  background: rgba(142, 243, 230, 0.12);
  font-size: 0.8rem;
  font-style: italic;
}

.empty-state {
  padding: 18px;
  text-align: center;
}

.flag {
  display: inline-block;
  width: auto;
  min-width: 84px;
  min-height: 0;
  padding: 6px 10px;
  border-radius: 999px;
  font-size: 0.82rem;
  font-weight: 700;
  text-align: center;
  border: 0;
  box-shadow: none;
  transition:
    transform 120ms ease,
    filter 120ms ease,
    box-shadow 120ms ease;
}

.flag:hover {
  transform: translateY(-1px);
  filter: brightness(1.03);
}

.flag:focus-visible {
  outline: 2px solid rgba(142, 243, 230, 0.9);
  outline-offset: 2px;
}

.flag.good {
  color: #143011;
  background: var(--good);
}

.flag.warn {
  color: #412700;
  background: var(--warn);
}

.flag.bad {
  color: #48160f;
  background: var(--bad);
}

.delete-button,
.restore-button {
  min-height: 34px;
  width: auto;
  padding: 6px 12px;
  border: 0;
  border-radius: 999px;
  font-size: 0.78rem;
  font-weight: 700;
  box-shadow: none;
}

.delete-button {
  color: #fff4f4;
  background: linear-gradient(180deg, #ff8e90, #d6546c);
}

.restore-button {
  color: #04212b;
  background: linear-gradient(180deg, #8ef3e6, #3fd1c2);
}

.file-type-button {
  min-height: 34px;
  width: auto;
  padding: 6px 12px;
  border: 1px solid rgba(185, 227, 242, 0.16);
  border-radius: 999px;
  color: var(--ink);
  background: rgba(255, 255, 255, 0.05);
  box-shadow: none;
  font-size: 0.78rem;
  font-weight: 700;
}

.file-action-button {
  min-width: 38px;
  padding: 6px 8px;
  justify-content: center;
  position: relative;
  overflow: hidden;
}

.file-action-button.is-danger {
  border-color: rgba(255, 142, 144, 0.2);
  background: rgba(255, 142, 144, 0.08);
  color: #ffd7db;
}

.file-action-icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  line-height: 1;
  font-size: 1rem;
  transition:
    transform 120ms ease,
    opacity 120ms ease;
}

.file-action-icon-hover {
  position: absolute;
  inset: 0;
  opacity: 0;
  transform: scale(0.85);
}

.file-action-button:hover .file-action-icon-default,
.file-action-button:focus-visible .file-action-icon-default {
  opacity: 0;
  transform: scale(0.85);
}

.file-action-button:hover .file-action-icon-hover,
.file-action-button:focus-visible .file-action-icon-hover {
  opacity: 1;
  transform: scale(1);
}

.file-type-dialog {
  width: min(420px, calc(100vw - 28px));
  max-height: calc(100vh - 28px);
  margin: 0;
  padding: 0;
  border: 1px solid var(--line);
  border-radius: 22px;
  color: var(--ink);
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.06), transparent 14%),
    linear-gradient(180deg, rgba(22, 61, 82, 0.98), rgba(11, 34, 48, 0.99));
  box-shadow: 0 30px 70px rgba(7, 20, 31, 0.45);
}

.file-type-dialog[open] {
  position: fixed;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  z-index: 2000;
}

.dialog-scrim {
  position: fixed;
  inset: 0;
  z-index: 1990;
  background: rgba(5, 18, 26, 0.6);
  backdrop-filter: blur(2px);
}

body.has-managed-dialog {
  overflow: hidden;
}

.file-type-form {
  display: grid;
  gap: 16px;
  padding: 20px;
}

.file-type-dialog.sector-data-dialog {
  width: min(575px, calc(100vw - 28px));
  max-width: 575px;
}

.file-type-dialog.doctor-dialog {
  width: min(840px, calc(100vw - 28px));
  max-width: 840px;
}

.file-type-dialog.bam-dialog {
  width: min(980px, calc(100vw - 28px));
  max-width: 980px;
  max-height: min(74vh, 760px);
}

.file-type-dialog.bam-dialog .file-type-form {
  max-height: min(74vh, 760px);
  overflow: hidden;
}

.file-type-dialog.bam-dialog .section-heading p {
  display: flex;
  flex-wrap: wrap;
  justify-content: flex-end;
  gap: 10px 14px;
  max-width: min(68%, 620px);
}

.bam-legend {
  display: flex;
  flex-wrap: wrap;
  gap: 10px 14px;
  align-items: center;
}

.bam-legend-item {
  display: inline-flex;
  gap: 8px;
  align-items: center;
  color: var(--muted);
  font-size: 0.78rem;
  line-height: 1.3;
}

.bam-legend-swatch {
  position: relative;
  width: 14px;
  height: 14px;
  border-radius: 4px;
  background: rgba(255, 255, 255, 0.16);
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.08);
  overflow: hidden;
}

.bam-legend-swatch.is-free {
  background: #8ef3e6;
}

.bam-legend-swatch.is-used {
  background: #244657;
}

.bam-legend-swatch.is-active {
  background: #d62828;
}

.bam-legend-swatch.is-unreachable {
  background: #8c6a17;
}

.bam-legend-swatch.is-untracked {
  background: #050505;
}

.bam-grid-shell {
  position: relative;
  overflow: auto;
  max-height: min(50vh, 430px);
  border: 1px solid rgba(185, 227, 242, 0.12);
  border-radius: 16px;
  background: rgba(7, 20, 31, 0.35);
}

.bam-grid-table {
  width: 100%;
  border-collapse: separate;
  border-spacing: 0;
  min-width: 760px;
}

.bam-grid-table th,
.bam-grid-table td {
  padding: 0;
  border-right: 1px solid rgba(185, 227, 242, 0.08);
  border-bottom: 1px solid rgba(185, 227, 242, 0.08);
}

.bam-grid-table thead th {
  position: sticky;
  top: 0;
  z-index: 2;
  background: rgba(13, 37, 50, 0.96);
}

.bam-grid-corner,
.bam-grid-track,
.bam-grid-freecount {
  min-width: 40px;
  padding: 6px 8px;
  color: var(--muted);
  font-size: 0.72rem;
  font-weight: 700;
  text-align: center;
  white-space: nowrap;
}

.bam-grid-track {
  position: sticky;
  left: 0;
  z-index: 1;
  background: rgba(13, 37, 50, 0.96);
}

.bam-grid-freecount {
  min-width: 48px;
}

.bam-grid-sector {
  min-width: 20px;
  padding: 6px 0;
  color: var(--muted);
  font-size: 0.68rem;
  font-weight: 700;
  text-align: center;
}

.bam-grid-sector.is-hovered,
.bam-grid-track.is-hovered,
.bam-grid-freecount.is-hovered {
  background: rgba(255, 211, 107, 0.14);
  color: #ffe6a3;
}

.bam-grid-row:nth-child(even) .bam-grid-track {
  background: rgba(15, 43, 58, 0.96);
}

.bam-grid-row:nth-child(even) .bam-grid-freecount {
  background: rgba(15, 43, 58, 0.42);
}

.bam-cell {
  display: block;
  width: 100%;
  min-width: 20px;
  min-height: 20px;
  margin: 0;
  padding: 0;
  border: 0;
  border-radius: 0;
  appearance: none;
  -webkit-appearance: none;
  -moz-appearance: none;
  background: #244657;
  color: transparent;
  cursor: pointer;
  -webkit-tap-highlight-color: transparent;
  transition:
    background 120ms ease,
    box-shadow 120ms ease,
    outline-color 120ms ease;
}

.bam-cell.is-free {
  background: #8ef3e6;
}

.bam-cell.is-used {
  background: rgba(36, 70, 87, 0.9);
}

.bam-cell.is-problem-free {
  background: #d62828;
}

.bam-cell.is-problem-used {
  background: #8c6a17;
}

.bam-grid-row:nth-child(even) .bam-cell.is-free {
  background: #72d8cd;
}

.bam-grid-row:nth-child(even) .bam-cell.is-used {
  background: rgba(28, 55, 69, 0.9);
}

.bam-grid-row:nth-child(even) .bam-cell.is-problem-free {
  background: #b91f1f;
}

.bam-grid-row:nth-child(even) .bam-cell.is-problem-used {
  background: #735612;
}

.bam-cell.is-track-warning {
  box-shadow: inset 0 0 0 1px rgba(214, 40, 40, 0.55);
}

.bam-cell.is-current-review {
  box-shadow: inset 0 0 0 2px rgba(255, 211, 107, 0.95);
}

.bam-cell:hover:not(:disabled),
.bam-cell:active:not(:disabled) {
  transform: none;
}

.bam-cell.is-free:hover:not(:disabled),
.bam-cell.is-free:active:not(:disabled) {
  background: #8ef3e6;
}

.bam-cell.is-used:hover:not(:disabled),
.bam-cell.is-used:active:not(:disabled) {
  background: rgba(36, 70, 87, 0.9);
}

.bam-cell.is-problem-free:hover:not(:disabled),
.bam-cell.is-problem-free:active:not(:disabled) {
  background: #d62828;
}

.bam-cell.is-problem-used:hover:not(:disabled),
.bam-cell.is-problem-used:active:not(:disabled) {
  background: #8c6a17;
}

.bam-cell.is-untracked:hover:not(:disabled),
.bam-cell.is-untracked:active:not(:disabled) {
  background: #050505;
}

.bam-cell.is-hovered {
  outline: 2px solid rgba(255, 255, 255, 0.85);
  outline-offset: -2px;
  box-shadow: inset 0 0 0 1px rgba(7, 20, 31, 0.6);
}

.bam-cell.is-hovered.is-free {
  outline-color: rgba(11, 34, 48, 0.92);
}

.bam-cell.is-hovered.is-used,
.bam-cell.is-hovered.is-problem-free,
.bam-cell.is-hovered.is-problem-used,
.bam-cell.is-hovered.is-untracked {
  outline-color: rgba(255, 255, 255, 0.92);
}

.bam-cell:focus-visible {
  outline: 2px solid #ffd36b;
  outline-offset: -2px;
}

.bam-cell:focus:not(:focus-visible) {
  outline: none;
}

.bam-cell.is-untracked,
.bam-cell.is-empty {
  background: #050505;
  cursor: default;
}

.bam-cell.is-untracked {
  background: #050505;
}

.bam-tooltip {
  position: fixed;
  z-index: 50;
  max-width: 260px;
  padding: 10px 12px;
  border: 1px solid rgba(185, 227, 242, 0.18);
  border-radius: 12px;
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.05), transparent 24%),
    rgba(8, 25, 36, 0.97);
  color: var(--ink);
  box-shadow: 0 16px 40px rgba(0, 0, 0, 0.35);
  pointer-events: none;
}

.bam-tooltip strong {
  display: block;
  margin-bottom: 4px;
  color: var(--accent-strong);
  font-size: 0.8rem;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}

.bam-tooltip p {
  margin: 0;
  color: var(--muted);
  font-size: 0.8rem;
  line-height: 1.45;
}

.bam-tooltip p + p {
  margin-top: 6px;
}

.bam-bitmask-button {
  margin-top: auto;
}

.bam-bitmask {
  height: 72px;
}

.bam-bitmask-zone.is-bam {
  fill: rgba(255, 209, 102, 0.08);
}

.bam-bitmask-zone.is-count {
  fill: rgba(255, 209, 102, 0.12);
}

.bam-bitmask-zone.is-track-even {
  fill: rgba(255, 255, 255, 0.025);
}

.bam-bitmask-zero-column {
  fill: rgba(10, 18, 24, 0.22);
}

.bam-bitmask-pixel.is-unused {
  fill: rgba(22, 34, 42, 0.88);
}

.bam-bitmask-pixel.is-count-on {
  fill: #8f9ca6;
}

.bam-bitmask-pixel.is-count-off {
  fill: rgba(143, 156, 166, 0.24);
}

.bam-bitmask-pixel.is-free-on {
  fill: #8ef3e6;
}

.bam-bitmask-pixel.is-free-off {
  fill: rgba(142, 243, 230, 0.24);
}

.bam-bitmask-pixel.is-used-on {
  fill: rgba(36, 70, 87, 0.92);
}

.bam-bitmask-pixel.is-used-off {
  fill: rgba(74, 106, 122, 0.44);
}

.bam-bitmask-pixel.is-active-on {
  fill: #d62828;
}

.bam-bitmask-pixel.is-active-off {
  fill: rgba(214, 40, 40, 0.28);
}

.bam-bitmask-pixel.is-unreachable-on {
  fill: #8c6a17;
}

.bam-bitmask-pixel.is-unreachable-off {
  fill: rgba(140, 106, 23, 0.38);
}

.bam-bitmask-pixel.is-track-even.is-used-on {
  fill: rgba(28, 55, 69, 0.92);
}

.bam-bitmask-pixel.is-track-even.is-used-off {
  fill: rgba(66, 95, 109, 0.42);
}

.bam-bitmask-pixel.is-track-even.is-count-on {
  fill: #73808a;
}

.bam-bitmask-pixel.is-track-even.is-count-off {
  fill: rgba(115, 128, 138, 0.22);
}

.bam-bitmask-pixel.is-track-even.is-free-on {
  fill: #72d8cd;
}

.bam-bitmask-pixel.is-track-even.is-free-off {
  fill: rgba(114, 216, 205, 0.22);
}

.bam-bitmask-pixel.is-track-even.is-active-on {
  fill: #b91f1f;
}

.bam-bitmask-pixel.is-track-even.is-active-off {
  fill: rgba(185, 31, 31, 0.26);
}

.bam-bitmask-pixel.is-track-even.is-unreachable-on {
  fill: #735612;
}

.bam-bitmask-pixel.is-track-even.is-unreachable-off {
  fill: rgba(115, 86, 18, 0.34);
}

.bam-bitmask-hover-outline {
  fill: rgba(255, 255, 255, 0.08);
  opacity: 0;
  vector-effect: non-scaling-stroke;
  pointer-events: none;
}

.bam-bitmask-hover-outline-dark {
  stroke: rgba(0, 0, 0, 0.95);
  stroke-width: 1.7;
  stroke-dasharray: 0.56 0.18;
}

.bam-bitmask-hover-outline-light {
  stroke: rgba(255, 255, 255, 0.98);
  stroke-width: 1.02;
  stroke-dasharray: 0.56 0.18;
  stroke-dashoffset: 0.28;
}

.bam-bitmask-hover-outline.is-hovered {
  opacity: 1;
}

.doctor-entry-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 14px 16px;
}

.doctor-entry-grid .field {
  margin-top: 0;
}

.doctor-entry-span-2 {
  grid-column: 1 / -1;
}

.doctor-entry-subgroup {
  margin: 0;
  padding: 12px;
  border: 1px solid rgba(185, 227, 242, 0.12);
  border-radius: 14px;
  background: rgba(255, 255, 255, 0.03);
}

.doctor-entry-subgroup legend {
  padding: 0 6px;
  color: var(--muted);
  font-size: 0.76rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.doctor-entry-role-name {
  color: #8ef3e6;
}

.doctor-entry-role-type-status {
  color: #f2a65a;
}

.doctor-entry-role-start {
  color: #74b9ff;
}

.doctor-entry-role-side {
  color: #d0a5ff;
}

.doctor-entry-role-record {
  color: #ffd166;
}

.doctor-entry-role-blocks {
  color: #ff8e90;
}

.doctor-entry-subgrid,
.doctor-entry-rel-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
}

.doctor-entry-grid .field.is-significant {
  padding: 10px 12px;
  border-radius: 12px;
  background: rgba(255, 211, 107, 0.1);
  box-shadow: inset 0 0 0 1px rgba(255, 211, 107, 0.34);
}

.doctor-entry-record-capacity {
  display: block;
  margin-top: 6px;
  color: var(--muted);
  font-size: 0.76rem;
  line-height: 1.35;
}

.doctor-entry-flags {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  min-height: 44px;
  align-items: center;
}

.doctor-entry-bitmask-button {
  display: block;
  padding: 8px;
  border-radius: 16px;
  border: 1px solid rgba(185, 227, 242, 0.14);
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.05), transparent 28%),
    rgba(255, 255, 255, 0.03);
  text-align: left;
}

.doctor-entry-bitmask {
  width: 100%;
  height: 96px;
  border-radius: 8px;
  background: rgba(5, 16, 24, 0.72);
  box-shadow: inset 0 0 0 1px rgba(185, 227, 242, 0.08);
}

.doctor-entry-bitmask-zone.is-name {
  fill: rgba(142, 243, 230, 0.18);
}

.doctor-entry-bitmask-zone.is-type-status {
  fill: rgba(255, 166, 77, 0.2);
}

.doctor-entry-bitmask-zone.is-start {
  fill: rgba(95, 168, 255, 0.22);
}

.doctor-entry-bitmask-zone.is-side {
  fill: rgba(194, 126, 255, 0.2);
}

.doctor-entry-bitmask-zone.is-record {
  fill: rgba(255, 209, 102, 0.2);
}

.doctor-entry-bitmask-zone.is-blocks {
  fill: rgba(255, 120, 120, 0.2);
}

.doctor-entry-bitmask-zone.is-unused {
  fill: rgba(255, 255, 255, 0.03);
}

.doctor-entry-bitmask-zero-column {
  fill: rgba(0, 0, 0, 0.22);
}

.doctor-entry-bitmask-pixel.is-name {
  fill: #8ef3e6;
}

.doctor-entry-bitmask-pixel.is-type-status {
  fill: #f2a65a;
}

.doctor-entry-bitmask-pixel.is-closed {
  fill: #ffbf7a;
}

.doctor-entry-bitmask-pixel.is-locked {
  fill: #ff8f5c;
}

.doctor-entry-bitmask-pixel.is-start {
  fill: #74b9ff;
}

.doctor-entry-bitmask-pixel.is-side {
  fill: #d0a5ff;
}

.doctor-entry-bitmask-pixel.is-record {
  fill: #ffd166;
}

.doctor-entry-bitmask-pixel.is-blocks {
  fill: #ff8e90;
}

.doctor-entry-bitmask-pixel.is-unused {
  fill: rgba(0, 0, 0, 0.72);
}

.doctor-entry-bitmask-digit {
  font-size: 0.72px;
  font-weight: 800;
  text-anchor: middle;
  dominant-baseline: central;
  pointer-events: none;
}

.doctor-entry-bitmask-digit.is-name {
  fill: #2f857b;
}

.doctor-entry-bitmask-digit.is-type-status {
  fill: #8c5d23;
}

.doctor-entry-bitmask-digit.is-closed {
  fill: #8c5d23;
}

.doctor-entry-bitmask-digit.is-locked {
  fill: #8c5d23;
}

.doctor-entry-bitmask-digit.is-start {
  fill: #275f9f;
}

.doctor-entry-bitmask-digit.is-side {
  fill: #7d4cb3;
}

.doctor-entry-bitmask-digit.is-record {
  fill: #8f7024;
}

.doctor-entry-bitmask-digit.is-blocks {
  fill: #9c3f41;
}

.doctor-entry-bitmask-digit.is-unused {
  fill: rgba(0, 0, 0, 0.72);
}

.doctor-entry-flag {
  display: inline-flex;
  gap: 8px;
  align-items: center;
  cursor: pointer;
}

.doctor-entry-bit-label {
  display: inline-block;
  margin-left: 0.28rem;
  font-size: 0.62rem;
  font-weight: 800;
  line-height: 1;
  vertical-align: super;
}

.doctor-entry-bit-label.is-type-status {
  color: #f2a65a;
}

.doctor-entry-bit-label.is-closed {
  color: #f2a65a;
}

.doctor-entry-bit-label.is-locked {
  color: #f2a65a;
}

.doctor-entry-flag input {
  width: auto;
  min-height: 0;
}

@media (max-width: 640px) {
  .doctor-entry-grid {
    grid-template-columns: minmax(0, 1fr);
  }

  .doctor-entry-subgrid,
  .doctor-entry-rel-grid {
    grid-template-columns: minmax(0, 1fr);
  }
}

.sector-byte-mode-field {
  margin: 0;
  padding: 10px 12px;
  border: 1px solid rgba(185, 227, 242, 0.12);
  border-radius: 12px;
  background: rgba(255, 255, 255, 0.03);
}

.sector-byte-mode-field legend {
  padding: 0 6px;
  color: var(--muted);
  font-size: 0.76rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.sector-byte-mode-option {
  display: inline-flex;
  gap: 8px;
  align-items: center;
  margin-right: 16px;
  cursor: pointer;
}

.sector-byte-mode-option input {
  width: auto;
  min-height: 0;
}

.dialog-actions {
  display: flex;
  justify-content: flex-end;
  gap: 10px;
}

.doctor-summary-grid {
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr)) auto;
  gap: 10px;
}

.doctor-summary-header {
  display: block;
  margin-bottom: 12px;
}

.doctor-summary-actions {
  display: flex;
  justify-content: flex-end;
  align-items: stretch;
}

.doctor-summary-actions .file-type-button {
  width: auto;
  min-width: 132px;
}

.doctor-summary-card {
  display: grid;
  gap: 4px;
  padding: 12px 14px;
  border: 1px solid rgba(185, 227, 242, 0.12);
  border-radius: 14px;
  background: rgba(255, 255, 255, 0.04);
}

.doctor-summary-card strong {
  font-size: 1.25rem;
  line-height: 1;
}

.doctor-summary-card span {
  color: var(--muted);
  font-size: 0.8rem;
  text-transform: uppercase;
  letter-spacing: 0.08em;
}

.doctor-summary-card-repairable {
  border-color: rgba(255, 211, 107, 0.2);
  background: rgba(255, 211, 107, 0.08);
}

.doctor-summary-card-warning {
  border-color: rgba(255, 142, 144, 0.2);
  background: rgba(255, 142, 144, 0.08);
}

.doctor-summary-card-info {
  border-color: rgba(142, 243, 230, 0.2);
  background: rgba(142, 243, 230, 0.08);
}

.doctor-report-body {
  display: grid;
  gap: 12px;
  max-height: min(62vh, 720px);
  overflow: auto;
  padding-right: 4px;
}

.doctor-empty {
  padding: 14px 16px;
  border: 1px solid rgba(143, 226, 158, 0.18);
  border-radius: 14px;
  color: var(--good);
  background: rgba(143, 226, 158, 0.08);
}

.doctor-issue {
  padding: 14px 16px;
  border: 1px solid rgba(185, 227, 242, 0.12);
  border-radius: 16px;
  background: rgba(255, 255, 255, 0.03);
}

.doctor-issue-repairable {
  border-color: rgba(255, 211, 107, 0.22);
}

.doctor-issue-warning {
  border-color: rgba(255, 142, 144, 0.22);
}

.doctor-issue-informational {
  border-color: rgba(142, 243, 230, 0.18);
}

.doctor-issue-heading {
  display: flex;
  gap: 10px;
  align-items: center;
}

.doctor-issue-heading h4 {
  margin: 0;
  font-size: 0.98rem;
  line-height: 1.35;
}

.doctor-level {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 102px;
  min-height: 28px;
  padding: 4px 10px;
  border-radius: 999px;
  font-size: 0.74rem;
  font-weight: 800;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.doctor-level-repairable {
  color: #ffe7a6;
  background: rgba(255, 211, 107, 0.14);
}

.doctor-level-warning {
  color: #ffd2d3;
  background: rgba(255, 142, 144, 0.14);
}

.doctor-level-informational {
  color: var(--accent-strong);
  background: rgba(142, 243, 230, 0.12);
}

.doctor-issue-details {
  margin: 10px 0 0;
  color: var(--muted);
  line-height: 1.45;
}

.doctor-issue-items {
  margin: 10px 0 0;
  padding-left: 18px;
  color: var(--ink);
}

.doctor-issue-items li {
  display: list-item;
  line-height: 1.45;
}

.doctor-issue-items li > * {
  vertical-align: middle;
}

.doctor-issue-items li .doctor-sector-link,
.doctor-issue-items li .doctor-slot-link {
  margin-inline: 0.2rem;
  white-space: nowrap;
}

.doctor-issue-items li + li {
  margin-top: 4px;
}

.doctor-invalid-file-type-items {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 6px 10px;
  padding-left: 0;
  list-style: none;
}

.doctor-invalid-file-type-items li + li {
  margin-top: 0;
}

.doctor-invalid-file-type-item {
  display: inline-flex;
  align-items: center;
  flex: 0 0 auto;
  gap: 6px;
  min-width: 0;
  white-space: nowrap;
}

.doctor-issue-items-grid {
  display: grid;
  grid-template-columns: repeat(6, minmax(0, 1fr));
  gap: 6px 8px;
  padding-left: 0;
  list-style: none;
}

.doctor-issue-items-grid li + li {
  margin-top: 0;
}

.doctor-issue-items-grid li {
  display: flex;
  align-items: stretch;
  min-width: 0;
}

.doctor-issue-items-grid .doctor-sector-link,
.doctor-issue-items-grid .doctor-slot-link {
  width: 100%;
  justify-content: center;
  flex: 1 1 auto;
  margin: 0;
}

.doctor-issue-items-toggle {
  margin-top: 10px;
}

.doctor-issue-items-toggle summary {
  cursor: pointer;
  color: var(--accent-strong);
  font-size: 0.82rem;
  font-weight: 700;
  list-style: none;
}

.doctor-issue-items-toggle summary::-webkit-details-marker {
  display: none;
}

.doctor-issue-items-toggle summary::before {
  content: "";
  display: inline-block;
  width: 0;
  height: 0;
  margin-right: 8px;
  border-top: 5px solid transparent;
  border-bottom: 5px solid transparent;
  border-left: 7px solid currentColor;
  transform: translateY(1px);
  transform-origin: 35% 50%;
  transition: transform 120ms ease;
}

.doctor-issue-items-toggle[open] summary::before {
  transform: rotate(90deg) translateX(1px);
}

.doctor-issue-items-toggle .doctor-issue-items-grid {
  margin-top: 10px;
}

.doctor-inline-groups {
  margin-top: 10px;
  display: grid;
  gap: 8px;
  color: var(--ink);
}

.doctor-inline-group {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 6px;
  line-height: 1.45;
}

.doctor-inline-name {
  font-weight: 700;
}

.doctor-inline-entry-list {
  display: inline-flex;
  flex-wrap: wrap;
  gap: 6px;
  align-items: center;
}

.doctor-inline-entry {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  white-space: nowrap;
}

.doctor-slot-link {
  display: inline-flex;
  width: auto;
  flex: 0 0 auto;
  align-items: center;
  margin: 0;
  padding: 0.06rem 0.34rem;
  border: 1px solid rgba(255, 211, 107, 0.28);
  border-radius: 999px;
  background: rgba(255, 211, 107, 0.12);
  color: #ffd36b;
  font: inherit;
  cursor: pointer;
}

.doctor-slot-link:hover {
  background: rgba(255, 211, 107, 0.18);
  border-color: rgba(255, 211, 107, 0.42);
}

.doctor-sector-link {
  display: inline-flex;
  width: auto;
  flex: 0 0 auto;
  align-items: center;
  margin: 0;
  padding: 0.06rem 0.34rem;
  border: 1px solid rgba(142, 243, 230, 0.28);
  border-radius: 999px;
  background: rgba(142, 243, 230, 0.12);
  color: var(--accent-strong);
  font: inherit;
  cursor: pointer;
}

.doctor-sector-link:hover {
  background: rgba(142, 243, 230, 0.18);
  border-color: rgba(142, 243, 230, 0.42);
}

.doctor-issue-actions {
  display: flex;
  justify-content: flex-start;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
  margin-top: 12px;
}

.doctor-disabled-action {
  display: inline-flex;
}

.doctor-disabled-reason {
  color: var(--muted);
  font-size: 0.84rem;
  line-height: 1.45;
  max-width: min(100%, 34rem);
}

.deleted-panel {
  margin-top: 16px;
}

.deleted-files-list {
  display: grid;
  gap: 10px;
  margin-top: 14px;
}

.deleted-file-card {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  align-items: center;
  padding: 12px 14px;
  border: 1px solid rgba(185, 227, 242, 0.1);
  border-radius: 14px;
  background: rgba(255, 255, 255, 0.03);
}

.deleted-file-name {
  font-weight: 700;
}

.deleted-file-meta {
  margin-top: 4px;
  color: var(--muted);
  font-size: 0.84rem;
}

.deleted-file-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  align-items: center;
  justify-content: flex-end;
}

.deleted-file-actions .file-type-button,
.deleted-file-actions .flag,
.deleted-file-actions .delete-button {
  flex: 0 0 auto;
}

.restore-controls {
  display: flex;
  gap: 10px;
  align-items: end;
}

.restore-type-field {
  display: grid;
  gap: 6px;
}

.restore-type-field span {
  color: var(--muted);
  font-size: 0.74rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.restore-type-field select {
  min-height: 34px;
  width: auto;
  padding: 6px 10px;
  font-size: 0.8rem;
}

@media (max-width: 980px) {
  .layout,
  .hero-grid,
  .summary-grid {
    grid-template-columns: 1fr;
  }

  .hero-title-row {
    grid-template-columns: 1fr;
    align-items: start;
  }

  .usage-chart-panel {
    grid-template-columns: 1fr;
  }

  .disk-map-grid {
    grid-template-columns: 1fr;
  }

  .disk-map-legend {
    grid-template-columns: 1fr;
  }

  .sector-inspector-meta {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 640px) {
  main {
    width: min(100%, calc(100% - 18px));
    margin: 10px auto 20px;
  }

  .hero,
  .controls,
  .content {
    padding: 16px;
  }

  .action-row,
  .meta-list div {
    grid-template-columns: 1fr;
  }

  .meta-list dd {
    text-align: left;
  }

  .deleted-file-card {
    flex-direction: column;
    align-items: flex-start;
  }

  .restore-controls {
    width: 100%;
    flex-direction: column;
    align-items: stretch;
  }

  .disk-map-toolbar {
    flex-direction: column;
    align-items: flex-start;
  }
}

.disk-map-read-head {
  pointer-events: none;
  filter: drop-shadow(0 1px 1.5px rgba(0, 0, 0, 0.55));
}

.disk-map-head-led {
  stroke: rgba(0, 0, 0, 0.55);
  stroke-width: 0.8;
}

.disk-map-head-led.is-read {
  fill: #17452a;
}

.disk-map-head-led.is-write {
  fill: #4a1a1c;
}

.disk-map-head-led.is-read.is-on {
  fill: #5dff8a;
  filter: drop-shadow(0 0 3px #5dff8a);
}

.disk-map-head-led.is-write.is-on {
  fill: #ff5a5f;
  filter: drop-shadow(0 0 3px #ff5a5f);
}

.disk-map-sector.is-drive-read {
  stroke: rgba(93, 255, 138, 0.55) !important;
  stroke-width: 1 !important;
}

.disk-map-sector.is-drive-reading {
  filter: brightness(1.35);
  stroke: #5dff8a !important;
  stroke-width: 2 !important;
}

.drive-panel {
  padding: 12px;
  border: 1px solid rgba(185, 227, 242, 0.1);
  border-radius: 14px;
  background: rgba(255, 255, 255, 0.03);
  color: var(--ink);
}

.drive-panel h4 {
  margin: 0 0 10px;
  font-size: 0.78rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--accent-strong);
}

.drive-panel-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.drive-panel-actions button {
  width: auto;
  flex: 1 1 auto;
  padding: 0 12px;
}

.drive-panel-speed {
  display: grid;
  gap: 6px;
  margin-top: 12px;
  font-size: 0.78rem;
  color: var(--muted);
}

.drive-panel-readout {
  display: grid;
  gap: 6px;
  margin: 12px 0 0;
  font-size: 0.82rem;
}

.drive-panel-readout div {
  display: grid;
  grid-template-columns: 5.5em minmax(0, 1fr);
  gap: 8px;
}

.drive-panel-readout dt {
  color: var(--muted);
}

.drive-panel-readout dd {
  margin: 0;
  overflow-wrap: anywhere;
}

.drive-panel-leds {
  display: flex;
  align-items: center;
  gap: 6px;
}

.drive-led {
  display: inline-block;
  width: 10px;
  height: 10px;
  border-radius: 50%;
  border: 1px solid rgba(0, 0, 0, 0.5);
}

.drive-led-write {
  margin-left: 8px;
}

.drive-led-read {
  background: #17452a;
}

.drive-led-write {
  background: #4a1a1c;
}

.drive-led-read.is-on {
  background: #5dff8a;
  box-shadow: 0 0 6px #5dff8a;
}

.drive-led-write.is-on {
  background: #ff5a5f;
  box-shadow: 0 0 6px #ff5a5f;
}

.drive-panel-field {
  display: grid;
  gap: 6px;
  margin-bottom: 10px;
  font-size: 0.78rem;
  color: var(--muted);
}

.drive-panel-field[hidden] {
  display: none;
}

.drive-panel-field small {
  font-size: 0.72rem;
}

.drive-command-preview {
  display: block;
  margin-bottom: 10px;
  padding: 8px 10px;
  border-radius: 10px;
  background: rgba(0, 0, 0, 0.28);
  color: var(--accent-strong);
  font-size: 0.78rem;
  white-space: pre-wrap;
  overflow-wrap: anywhere;
}
