* {
  box-sizing: border-box;
}

body {
  margin: 0;
  font-family: verdana, arial, tahoma, sans-serif;
  font-size: 8pt;
  background: #ffffff;
  color: #000000;
}

body.is-loading,
body.is-loading * {
  cursor: progress;
}

.loading-state {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 18px 14px;
  color: #444444;
  font-size: 9pt;
}

.loading-spinner {
  width: 14px;
  height: 14px;
  border-radius: 50%;
  border: 2px solid #cccccc;
  border-top-color: #555555;
  animation: sh6-spin 0.8s linear infinite;
}

.raw-log {
  font-family: "Courier New", courier, monospace;
  font-size: 9pt;
  background: #f7f7f7;
  border: 1px solid #cccccc;
  padding: 8px;
  white-space: pre;
  overflow: auto;
  max-height: 70vh;
}

.compare-window-controls {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 16px;
  padding: 10px 12px;
  margin: 10px 0;
  background: #eef5ff;
  border: 1px solid #aac3e8;
  font-size: 10pt;
  max-width: 100%;
  box-sizing: border-box;
}

.compare-window-text {
  font-weight: bold;
  text-align: center;
}

.compare-window-actions button {
  font-size: 10pt;
  padding: 4px 10px;
  margin-left: 6px;
}

@keyframes sh6-spin {
  to {
    transform: rotate(360deg);
  }
}

a {
  color: #0000ff;
  text-decoration: underline;
}

a:visited {
  color: #0000ff;
}

a:hover {
  color: #cc0000;
}

.topbar {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 12px 16px;
  background: #ffffff;
  border-bottom: 1px dotted #cccccc;
}

.brand {
  display: flex;
  align-items: center;
  gap: 10px;
}

.brand-logo {
  height: 28px;
  width: auto;
  display: block;
}

.logo {
  font-weight: 700;
  font-size: 20px;
}

.subtitle {
  font-size: 14px;
  color: #555;
}

.version-badge {
  display: inline-block;
  padding: 2px 6px;
  font-size: 12px;
  font-weight: 700;
  color: #0d3a73;
  background: #e3edfb;
  border: 1px solid #c5daf8;
  border-radius: 4px;
}

.controls {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
}

.compare-toggle {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  padding: 6px 8px;
  border: 1px dotted #999999;
  background: #f8f8f8;
  margin-bottom: 6px;
}

.compare-label {
  font-weight: 600;
  margin-right: 4px;
}

.log-panel {
  margin-top: 8px;
  padding: 8px 10px;
  border: 1px dotted #999999;
  background: #fdfdfd;
}

.log-panel-title {
  font-weight: 700;
  margin-bottom: 6px;
}

.compare-only {
  display: none;
}

.compare-mode .compare-only {
  display: block;
}

.remote-picker {
  margin-top: 8px;
  padding: 8px 10px;
  border: 1px dotted #999999;
  background: #f7f7f7;
}

.remote-label {
  font-weight: 600;
  margin-bottom: 4px;
}

#repoSearch,
#repoSearchB {
  width: min(520px, 100%);
  padding: 6px 8px;
  border: 1px solid #b9b9b9;
  border-radius: 4px;
}

.repo-results {
  margin-top: 8px;
  display: grid;
  gap: 6px;
}

.repo-option {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 12px;
  color: #444444;
  margin-top: 6px;
}

.repo-tree {
  border: 1px solid #c3c3c3;
  background: #ffffff;
  padding: 6px 8px;
}

.repo-tree details {
  margin: 4px 0;
}

.repo-tree .repo-year {
  margin-left: 14px;
}

.repo-tree .repo-subcat {
  margin-left: 28px;
}

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

.compare-grid.compare-narrow {
  grid-template-columns: max-content max-content;
  justify-content: start;
  gap: 10px;
}

.compare-grid.compare-stack {
  grid-template-columns: 1fr;
}

.compare-panel {
  border: 1px dotted #999999;
  background: #ffffff;
  padding: 6px 8px;
}

.compare-scroll {
  overflow-x: auto;
  max-width: 100%;
}

.compare-scroll table {
  width: max-content;
}

.compare-scroll.compare-scroll-wrap table {
  width: 100%;
}

.compare-panel .compare-head {
  font-weight: 700;
  margin-bottom: 6px;
  display: flex;
  justify-content: space-between;
  gap: 10px;
  flex-wrap: wrap;
}

.compare-panel.compare-a .compare-head {
  color: #1e5bd6;
}

.compare-panel.compare-b .compare-head {
  color: #c62828;
}

.compare-log-wrap {
  overflow-x: auto;
}

.compare-log-table th,
.compare-log-table td {
  white-space: nowrap;
}

.compare-bucket {
  background: #f0f0f0;
  font-weight: 600;
  text-align: left;
}

.map-legend {
  display: flex;
  gap: 12px;
  align-items: center;
  margin: 6px 0 10px;
  font-size: 12px;
}

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

.map-swatch {
  width: 12px;
  height: 12px;
  display: inline-block;
  border: 1px solid #333333;
}

.repo-tree button.repo-leaf {
  margin-left: 42px;
}

.repo-tree summary {
  cursor: pointer;
  font-weight: 700;
}

.repo-tree .repo-year summary {
  font-weight: 600;
  color: #1f3e74;
}

.repo-tree .repo-subcat summary {
  font-weight: 600;
  color: #3b3b3b;
}

.repo-tree button.repo-leaf {
  width: 100%;
  text-align: left;
  border: 1px solid #c3c3c3;
  background: #ffffff;
  padding: 4px 6px;
  margin: 4px 0;
  cursor: pointer;
}

.repo-tree button.repo-leaf:hover {
  background: #f0f6ff;
}

.repo-name {
  font-weight: 700;
  display: block;
}

.repo-path {
  font-size: 12px;
  color: #666666;
  display: block;
}

.file-label .button {
  background: #dddddd;
  color: #000;
  padding: 8px 12px;
  border-radius: 4px;
  cursor: pointer;
  font-weight: 600;
}

.file-label input:focus + .button,
.file-label .button:hover {
  background: #cccccc;
}

.status {
  font-size: 13px;
  color: #444;
}

#logClearFilters {
  font-size: 8pt;
  border-bottom: 1px dotted #0000ff;
  text-decoration: none;
}

.log-filter-note {
  font-size: 8pt;
  margin: 4px 0;
}

.log-filter-hint {
  color: #666666;
  font-style: italic;
}

.layout {
  display: grid;
  grid-template-columns: 260px 1fr;
  min-height: calc(100vh - 56px);
}

.sidebar {
  border-right: 1px dotted #cccccc;
  background: #dddddd;
  padding: 12px;
  overflow-y: auto;
  vertical-align: top;
}

.sidebar ol {
  padding-left: 18px;
  margin: 0 0 12px;
}

.sidebar li {
  margin: 4px 0;
  cursor: pointer;
}

.nav-group-item {
  margin: 4px 0;
}

.nav-group {
  margin: 0;
}

.nav-group summary {
  cursor: pointer;
  list-style: none;
}

.nav-group summary::marker {
  color: #666666;
}

.nav-sublist {
  padding-left: 16px;
  margin: 4px 0 6px;
}

.sidebar li.active {
  font-weight: 700;
  color: #1c6dd0;
}

.data-status {
  font-size: 12px;
  color: #555;
  border-top: 1px solid #eee;
  padding-top: 8px;
}

.content {
  padding: 16px;
}

.nav-buttons {
  display: flex;
  justify-content: flex-end;
  gap: 8px;
  margin-bottom: 8px;
}

.nav-buttons button {
  padding: 6px 10px;
  border: 1px solid #ccc;
  background: #fff;
  cursor: pointer;
}

.button {
  padding: 6px 10px;
  border: 1px solid #ccc;
  background: #fff;
  cursor: pointer;
}

.nav-buttons button:disabled {
  opacity: 0.5;
  cursor: not-allowed;
}

.view-title {
  font-size: 10pt;
  font-weight: 700;
  margin-bottom: 6px;
  display: inline-block;
  width: 100%;
}

.gradient {
  background: linear-gradient(90deg, #5a6be6, #d3dbff);
  color: #ffffff;
  padding: 4px 8px;
}

.view-container {
  background: #ffffff;
  border: 1px dotted #cccccc;
  border-radius: 0;
  padding: 12px;
  min-height: 300px;
}

.export-doc {
  font-size: 8pt;
}

.export-section {
  margin: 12px 0 18px;
}

.export-title {
  font-size: 10pt;
  font-weight: 700;
  margin-bottom: 6px;
}

.export-header {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  margin-bottom: 6px;
}

.export-page::after {
  content: "Page " counter(page) " / " counter(pages);
  font-size: 8pt;
  color: #333333;
}

@media print {
  .no-print,
  .export-hide {
    display: none !important;
  }
  .export-doc th,
  .export-doc td {
    white-space: normal;
  }
  .export-section,
  table,
  tr,
  td,
  th {
    page-break-inside: avoid;
  }
  .export-section {
    page-break-before: always;
  }
  .export-section:first-child {
    page-break-before: avoid;
  }
}

.export-dialog-overlay {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.4);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 9999;
}

.export-dialog {
  background: #ffffff;
  border: 1px solid #cccccc;
  padding: 14px 16px;
  max-width: 520px;
  width: 90%;
  max-height: 80vh;
  overflow: auto;
  box-shadow: 0 6px 18px rgba(0, 0, 0, 0.2);
}

.export-dialog-head {
  margin-bottom: 6px;
}

.export-dialog-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin: 8px 0;
}

.export-dialog-actions button,
.export-dialog-footer button {
  padding: 5px 10px;
}

.export-dialog-list {
  border: 1px solid #eeeeee;
  padding: 8px;
  max-height: 40vh;
  overflow: auto;
}

.export-option {
  display: flex;
  gap: 8px;
  align-items: center;
  margin: 4px 0;
  font-size: 12px;
}

.export-dialog-footer {
  display: flex;
  justify-content: flex-end;
  gap: 8px;
  margin-top: 10px;
}

.export-panel {
  padding: 0 0 8px;
}

.export-panel > p {
  margin: 10px 8px;
}

.export-actions {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 10px;
  margin: 8px;
}

.export-actions .button {
  padding: 6px 12px;
}

.export-note {
  font-size: 12px;
  color: #555555;
}

.band-ribbon {
  margin: 6px 0 8px;
  padding: 4px 0;
}

.band-label {
  margin-right: 6px;
  font-weight: 700;
}

.band-pill {
  display: inline-block;
  padding: 2px 6px;
  border: 1px solid #cccccc;
  margin-right: 4px;
  text-decoration: none;
  color: #000000;
  background: #f7f7f7;
}

.band-pill.active {
  background: #5266df;
  color: #ffffff;
  border-color: #5266df;
}

.log-controls {
  margin-top: 6px;
  margin-bottom: 8px;
}

.log-search {
  margin: 0 0 6px;
}

.log-search input[type="text"] {
  text-transform: uppercase;
  font-family: "Courier New", Courier, monospace;
  font-weight: bold;
  font-size: 24px;
  padding: 2px 4px;
  border: 1px solid #999999;
}

.log-pages {
  display: block;
}

.log-page {
  text-decoration: none;
  border: 1px solid transparent;
}

.log-page.active {
  background: #5266df;
  color: #ffffff;
  border-color: #5266df;
}

.log-table td,
.log-table th {
  font-family: "Courier New", Courier, monospace;
}

.log-qso {
  font-weight: bold;
}

.b160 { background: #d6d6d6; }
.b80 { background: #bcdcff; }
.b40 { background: #bff2bf; }
.b20 { background: #ffe199; }
.b15 { background: #ffc0c0; }
.b10 { background: #dcc6ff; }

.m-cw { background: #ffe680; }
.m-dig { background: #9fe6b3; }
.m-ph { background: #ffcc99; }

.c1 { background: #00ffff; text-align: center; }

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

th, td {
  padding: 3px 5px;
  border: 1px solid #ddd;
  vertical-align: middle;
  white-space: nowrap;
}

.ta1 td {
  vertical-align: top;
}

th {
  background: #f2f2f2;
  text-align: left;
}

.mtc {
  border: 1px dotted #cccccc;
  width: auto;
  max-width: 100%;
  table-layout: auto;
}

.thc th,
.thc td {
  background: #5266df;
  color: #ffffff;
  text-align: center;
}

.thc th.sortable .sort-link {
  appearance: none;
  border: 0;
  background: transparent;
  color: inherit;
  font: inherit;
  padding: 0;
  margin: 0;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  gap: 6px;
}

.thc th.sortable .sort-link:focus {
  outline: 1px dotted #ffffff;
  outline-offset: 2px;
}

.thc th.sortable .sort-indicator {
  display: inline-block;
  width: 0;
  height: 0;
  border-left: 4px solid transparent;
  border-right: 4px solid transparent;
  border-top: 6px solid rgba(255, 255, 255, 0.85);
  opacity: 0.6;
}

.thc th.sorted-asc .sort-indicator {
  border-top: 0;
  border-bottom: 6px solid rgba(255, 255, 255, 0.9);
  opacity: 1;
}

.thc th.sorted-desc .sort-indicator {
  border-top: 6px solid rgba(255, 255, 255, 0.9);
  opacity: 1;
}

.bar-row {
  display: flex;
  align-items: center;
  gap: 8px;
  margin: 4px 0;
}

.bar-label {
  min-width: 80px;
  font-weight: 600;
}

.bar {
  height: 16px;
  background: #1c6dd0;
  border-radius: 3px;
  min-width: 4px;
}

.sum {
  background: #0000ff;
  height: 10px;
}

.break-controls {
  margin: 6px 0 8px;
}

.break-controls input[type="range"] {
  vertical-align: middle;
  margin: 0 6px;
}

.minute-list {
  white-space: normal;
  word-break: break-word;
}

.mtc {
  font-size: 8pt;
}

.thc {
  background: #5266df;
  color: #ffffff;
  text-align: center;
}

.td0 {
  background: #eeeeee;
}

.td1 {
  background: #fcfcfc;
}

.mdv {
  background: #dddddd;
}

.mli,
.cli,
.sli {
  color: #000000;
  font-size: 8pt;
  border-bottom: 1px dotted #cccccc;
  margin-top: 2px;
  text-transform: uppercase;
}

.cli {
  text-transform: none;
  margin-left: 14px;
}

.nav-sublist .cli {
  margin-left: 0;
}

.dal {
  border-left: 1px dotted #bbbbbb;
}

.s0 {
  background: #0000ff;
  color: #ffffff;
}

.s1 {
  background: #0060ff;
  color: #ffffff;
}

.s2 {
  background: #00c0ff;
}

.s3 {
  background: #00ffe0;
}

.s4 {
  background: #00ff80;
}

.s5 {
  background: #00ff20;
}

.s6 {
  background: #40ff00;
}

.s7 {
  background: #a0ff00;
}

.s8 {
  background: #ffff00;
}

.s9 {
  background: #ffcc00;
}

.log-page.active {
  font-weight: 700;
  text-decoration: underline;
}

.fields-map td {
  width: 30px;
  height: 20px;
  text-align: center;
  font-size: 8pt;
}

.lm {
  text-align: center;
}

.sum {
  height: 8px;
  background: #0000ff;
}

.tac {
  text-align: center;
}

.tar {
  text-align: right;
}

.tl {
  text-align: left;
}

.c2 { background: #ff0000; color: #ffffff; text-align: center; }
.c3 { background: #ffff00; text-align: center; }
.c4 { background: #0000ff; color: #ffffff; text-align: center; }
.c5 { background: #00ff00; text-align: center; }
.c6 { background: #333333; color: #ffffff; text-align: center; }
.c7 { background: #888888; color: #ffffff; text-align: center; }

.q1, .q2, .q3, .q4, .q5, .q6 {
  font-weight: 700;
  text-align: center;
}

.operator-grid {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.operator-card {
  width: 180px;
  border: 1px solid #dddddd;
  background: #fcfcfc;
  text-align: center;
  padding: 6px;
}

.map-all-row td {
  background: #f2f2f2;
}

.map-all-row a {
  font-weight: 700;
}

body.landing-only #bandRibbon,
body.landing-only .nav-buttons,
body.landing-only #viewTitle {
  display: none;
}

body.landing-only .view-container {
  border: none;
  padding: 0;
  min-height: 0;
  background: transparent;
}

body.landing-only .content {
  padding: 20px 24px;
}

.landing-page {
  max-width: 980px;
  margin: 0;
  font-size: 14px;
  line-height: 1.6;
}

.landing-hero {
  margin-bottom: 18px;
}

.landing-hero h1 {
  margin: 0 0 6px;
  font-size: 24px;
}

.landing-kicker {
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: #5266df;
  margin-bottom: 6px;
  font-weight: 700;
}

.landing-logo {
  height: 44px;
  width: auto;
  display: block;
}

.landing-actions {
  display: flex;
  flex-direction: column;
  gap: 10px;
  margin: 12px 0 10px;
}

.landing-actions .button {
  background: #5266df;
  color: #ffffff;
  border-color: #3f52c8;
  font-weight: 700;
  padding: 8px 14px;
  border-radius: 4px;
  box-shadow: 0 2px 0 rgba(0, 0, 0, 0.12);
  min-width: 160px;
}

.landing-actions .button:hover {
  background: #4458d6;
  border-color: #3649c2;
}

.landing-actions .button:active {
  transform: translateY(1px);
  box-shadow: 0 1px 0 rgba(0, 0, 0, 0.14);
}

.landing-action-row {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
}

.landing-action-note {
  font-size: 12px;
  color: #555555;
}

.landing-formats {
  font-size: 12px;
  color: #555555;
}

.landing-card,
.landing-panel {
  border: 1px solid #dddddd;
  background: #f8f8f8;
  padding: 14px 16px;
}

.landing-card h3,
.landing-panel h3 {
  margin-top: 0;
}

.landing-section {
  margin-top: 18px;
}

.landing-steps {
  margin: 6px 0 10px 20px;
}

.landing-links {
  display: flex;
  flex-wrap: wrap;
  gap: 8px 12px;
  margin-bottom: 6px;
}

.landing-bullets {
  margin: 6px 0 0 20px;
}

.landing-bullets li {
  margin: 4px 0;
}

.landing-status-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  gap: 12px;
  margin-top: 8px;
}

.landing-status-label {
  font-weight: 700;
  margin-bottom: 4px;
}

.landing-status-text {
  border: 1px solid #dddddd;
  background: #f8f8f8;
  padding: 8px 10px;
  font-size: 12px;
  color: #444444;
}

.not-master-controls {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  align-items: center;
  margin: 6px 0 8px;
}

.not-master-controls button {
  padding: 4px 10px;
}

.np {
  width: 160px;
  height: 120px;
  margin: 0 auto 6px;
  border: 1px dashed #cccccc;
}

.op-photo {
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 11px;
  color: #777777;
  overflow: hidden;
}

.op-photo img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.op-photo-loading {
  background: #f6f6f6;
}

.op-photo-missing {
  color: #999999;
}

.map-preview {
  margin: 8px 0;
  border: 1px solid #cccccc;
  background: #ffffff;
  padding: 4px;
}

#map {
  width: 100%;
  height: 420px;
  border: 1px solid #cccccc;
}

.map-controls {
  margin: 6px 0;
}
