.muted {
  color: #777;
  font-size: 0.9em;
  margin: 0;
}
.table-wrapper {
  overflow-x: auto;
}
table.alt {
  width: 100%;
  border-collapse: collapse;
}
table.alt th,
table.alt td {
  border: 1px solid #ddd;
  padding: 8px;
}
table.alt th {
  background: #f7f7f7;
  text-align: left;
}
.button.disabled,
.button[disabled] {
  opacity: 0.45;
  pointer-events: none;
  cursor: not-allowed;
}
.event-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  margin-top: 0.5rem;
}
.event-actions .button {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
}
.event-actions .button.small {
  padding: 0.4rem 0.6rem;
}
.event-actions .ico {
  font-size: 1.1em;
  line-height: 1;
}

/* Tile sections */
#event-details,
#reports-results {
  margin-bottom: 1.5rem;
}

#reports-results {
  margin-top: 0.5rem;
}

#event-details > h3,
#reports-results > h3 {
  margin-bottom: 0.9rem;
}

#reports-results.special.box.compact {
  border-top: 1px solid #e5e7eb;
  padding-top: 1.1rem;
}

/* Shared responsive tile styles */
.du-grid {
  display: grid;
  gap: 0.75rem;
  grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
  margin-top: 0.5rem;
}

.du-tile {
  display: grid;
  grid-template-columns: 44px 1fr;
  align-items: center;
  gap: 0.5rem;
  min-height: 84px;
  padding: 0.75rem 0.9rem;
  border: 1px solid #ddd;
  border-radius: 10px;
  background: #fff;
  text-decoration: none;
  color: #222;
  transition:
    box-shadow 0.15s ease,
    border-color 0.15s ease,
    transform 0.02s ease-in-out;
}

.du-tile:hover {
  border-color: #bbb;
  box-shadow: 0 4px 14px rgba(0, 0, 0, 0.06);
}

.du-tile:active {
  transform: translateY(1px);
}

.du-icon {
  font-family:
    'Apple Color Emoji', 'Segoe UI Emoji', 'Segoe UI Symbol', 'Noto Color Emoji', sans-serif;
  font-size: 26px;
  width: 44px;
  height: 44px;
  line-height: 44px;
  text-align: center;
  background: #f6f7f9;
  border: 1px solid #ececec;
  border-radius: 8px;
  display: inline-block;
}

.du-main {
  display: flex;
  flex-direction: column;
  gap: 0.15rem;
  min-width: 0;
}

.du-main strong,
.du-main small {
  overflow-wrap: anywhere;
  hyphens: auto;
}

.du-main strong {
  font-weight: 700;
  line-height: 1.2;
}

.du-main small {
  color: #6b7280;
  font-size: 0.85em;
}

.du-tile.is-disabled {
  opacity: 0.55;
  pointer-events: none;
}
#event-details .du-grid,
#reports-results .du-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 0.75rem;
}

/* Mobile */
@media (max-width: 768px) {
  .du-grid {
    grid-template-columns: 1fr;
  }

  .du-tile {
    padding: 0.65rem 0.75rem;
  }
}

@media (max-width: 480px) {
  .du-icon {
    width: 40px;
    height: 40px;
    line-height: 40px;
    font-size: 22px;
  }

  .du-tile {
    gap: 0.4rem;
  }
}
@media (max-width: 900px) {
  #event-details .du-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (max-width: 600px) {
  #event-details .du-grid {
    grid-template-columns: 1fr;
  }
}

/* Rounds grid */
.rounds-grid {
  display: grid;
  gap: 0.75rem;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
}
.round-card {
  border: 1px solid #e5e7eb;
  border-radius: 10px;
  background: #fff;
  padding: 0.9rem 0.95rem;
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
  transition:
    box-shadow 0.15s ease,
    border-color 0.15s ease,
    transform 0.02s ease-in-out;
}
.round-card:hover {
  border-color: #d1d5db;
  box-shadow: 0 4px 14px rgba(0, 0, 0, 0.06);
}
.round-card .rc-head {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 0.5rem;
  flex-wrap: wrap;
}
.round-card .rc-round {
  font-weight: 700;
}
.round-card .rc-sub {
  color: #6b7280;
  font-size: 0.9em;
}

.round-card .round-photo {
  width: 100%;
  height: 150px;
  object-fit: cover;
  border-radius: 8px;
  border: 1px solid #e5e7eb;
  margin-top: 0.25rem;
}

.round-card .rc-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  margin-top: 0.35rem;
}
.round-card .button.small {
  flex: 1 1 120px;
  text-align: center;
  padding: 0.4rem 0.6rem;
  font-size: 0.85em;
}

/* Layout wrappers from your theme */
#main.wrapper.style1 {
  padding: 1.5rem 0 2rem;
}
#main .container {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 1rem;
}
header.major h2 {
  margin-bottom: 0.2rem;
}

/* -------- Mobile tweaks -------- */
@media (max-width: 768px) {
  body {
    font-size: 14px;
  }
  #main .container {
    padding: 0 0.75rem;
  }
  #data-uploads .du-grid {
    grid-template-columns: 1fr; /* one tile per row */
  }
  #data-uploads .du-tile {
    padding: 0.65rem 0.75rem;
  }
  .rounds-grid {
    grid-template-columns: 1fr; /* one round card per row */
  }
  .round-card {
    padding: 0.75rem 0.8rem;
  }
  .round-card .rc-head {
    flex-direction: row;
    align-items: flex-start;
  }
  .round-card .rc-actions {
    flex-direction: row;
  }
}

@media (max-width: 480px) {
  header.major h2 {
    font-size: 1.35rem;
  }
  #data-uploads .du-icon {
    width: 40px;
    height: 40px;
    line-height: 40px;
    font-size: 22px;
  }
  #data-uploads .du-tile {
    gap: 0.4rem;
  }
  .round-card .round-photo {
    height: 130px;
  }
}

#archive-jump .archive-form {
  margin: 0;
}

#archive-jump .archive-row {
  display: flex;
  gap: 0.75rem;
  align-items: flex-end;
  justify-content: center;
  flex-wrap: wrap;
}

#archive-jump .archive-select {
  flex: 1 1 520px;
  text-align: left;
}
#archive-jump .archive-go {
  flex: 0 0 auto;
}

/* override base.css float rules inside this card */
#archive-jump form input,
#archive-jump form select,
#archive-jump form label,
#archive-jump form span {
  float: none !important;
}

@media (max-width: 640px) {
  #archive-jump .archive-select {
    flex: 1 1 100%;
  }
  #archive-jump .archive-go {
    width: 100%;
  }
  #archive-jump .archive-go .button {
    width: 100%;
  }
}
