.secchi-disk-app {
  margin: 2rem 0;
  padding: 1.2rem 1.1rem;
  border: 1px solid var(--theme-border);
  background: var(--theme-surface);
}

.secchi-disk-app,
.secchi-disk-app * {
  box-sizing: border-box;
}

.secchi-disk-form fieldset {
  border: none;
  padding: 0;
  margin: 0 0 1.4rem;
}

.secchi-disk-form legend {
  font-weight: 700;
  margin-bottom: 0.75rem;
}

.secchi-disk-form label {
  display: block;
  margin-bottom: 1rem;
  font-weight: 500;
}

.secchi-disk-form input {
  display: block;
  width: 100%;
  max-width: 100%;
  margin-top: 0.35rem;
  padding: 0.55rem 0.75rem;
  border: 1px solid var(--theme-border);
  background: var(--theme-surface);
  color: var(--theme-fg);
  font-size: 1rem;
}

.secchi-disk-form button {
  margin-right: 0.75rem;
  padding: 0.52rem 1.1rem;
  border: 1px solid var(--theme-border);
  border-radius: 0;
  cursor: pointer;
  font-size: 0.95rem;
  background: var(--theme-fg);
  color: var(--theme-bg);
}

.secchi-disk-form button[type="submit"] {
  background: #000000;
  color: #ffffff;
  border-color: #000000;
  font-weight: 700;
}

.secchi-disk-form button[type="submit"]:hover,
.secchi-disk-form button[type="submit"]:focus {
  background: #111111;
  border-color: #000000;
}

.secchi-disk-form button:last-of-type {
  margin-right: 0;
}

.secchi-disk-form button:hover,
.secchi-disk-form button:focus {
  text-decoration: underline;
}

.secchi-disk-form button[data-role="reset"] {
  background: var(--theme-surface);
  color: var(--theme-fg);
}

@media (prefers-color-scheme: dark) {
  .secchi-disk-form button[type="submit"] {
    border-color: #ffffff;
  }
}

.secchi-disk-help {
  margin: -0.65rem 0 0.85rem;
  font-size: 0.86rem;
  color: var(--theme-muted);
}

.secchi-disk-output table {
  width: 100%;
  border-collapse: collapse;
  margin-top: 0.75rem;
  font-size: 0.95rem;
}

.secchi-disk-output th,
.secchi-disk-output td {
  padding: 0.6rem 0.75rem;
  border-bottom: 1px solid var(--theme-border-soft);
  text-align: left;
}

.secchi-disk-angle-controls {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem;
  align-items: flex-end;
  margin: 1rem 0 0.35rem;
}

.secchi-disk-angle-controls label {
  display: flex;
  flex-direction: column;
  font-weight: 500;
}

.secchi-disk-angle-controls input {
  margin-top: 0.35rem;
  padding: 0.5rem 0.6rem;
  border: 1px solid var(--theme-border);
  background: var(--theme-surface);
  color: var(--theme-fg);
  font-size: 1rem;
  max-width: 8rem;
}

.secchi-disk-angle-buttons {
  display: flex;
  gap: 0.5rem;
}

.secchi-disk-angle-controls button {
  padding: 0.5rem 1rem;
  border: 1px solid var(--theme-border);
  border-radius: 0;
  background: var(--theme-fg);
  color: var(--theme-bg);
  font-size: 0.9rem;
  cursor: pointer;
}

.secchi-disk-angle-controls button:hover,
.secchi-disk-angle-controls button:focus {
  text-decoration: underline;
}

.secchi-disk-angle-controls button[aria-pressed="true"] {
  background: var(--theme-surface);
  color: var(--theme-fg);
}

.secchi-disk-angle-status {
  min-height: 1.2rem;
  margin: 0 0 0.5rem;
  font-size: 0.85rem;
  color: var(--theme-muted);
}

.secchi-disk-table-wrapper {
  overflow-x: auto;
}

.secchi-disk-chart {
  position: relative;
  margin-top: 1.5rem;
}

.secchi-disk-chart svg {
  width: 100%;
  height: auto;
  max-height: none;
}

.secchi-disk-chart [data-role="marker"],
.secchi-disk-chart [data-role="marker-hit"] {
  cursor: pointer;
}

.secchi-disk-chart [data-role="marker"][data-active="true"] {
  stroke: var(--theme-bg);
  stroke-width: 2.5;
}

.secchi-disk-tooltip {
  position: absolute;
  padding: 0.4rem 0.6rem;
  background: var(--theme-fg);
  color: var(--theme-bg);
  font-size: 0.9rem;
  line-height: 1.2;
  border: 1px solid var(--theme-border);
  pointer-events: none;
  white-space: nowrap;
  z-index: 2;
}

.secchi-disk-tooltip[hidden] {
  display: none;
}

@media (max-width: 720px) {
  .secchi-disk-app {
    padding: 1rem 0.9rem;
  }

  .secchi-disk-form button {
    display: block;
    width: 100%;
    margin: 0 0 0.6rem;
  }

  .secchi-disk-form button[data-role="reset"] {
    margin-right: 0;
  }

  .secchi-disk-angle-controls {
    flex-direction: column;
    align-items: stretch;
  }

  .secchi-disk-angle-buttons {
    flex-direction: column;
  }

  .secchi-disk-angle-controls button {
    width: 100%;
  }
}
