.on-site-wrapper {
  max-width: 920px;
  margin: 0 auto;
  padding: 10px;
}

.on-site-header {
  display: flex;
  flex-direction: column;
  gap: 4px;
  margin-bottom: 8px;
}

.on-site-header h2 {
  margin: 0;
}

.on-site-greeting {
  font-size: 0.95rem;
}

.on-site-competition {
  font-size: 0.95rem;
}

.on-site-status {
  display: flex;
  justify-content: space-between;
  align-items: center;
  border-radius: 10px;
  padding: 10px;
  margin: 8px 0;
  border: 1px solid #d2d2d2;
  background: #fafafa;
}

.on-site-mode {
  font-weight: 700;
}

.on-site-place.ok {
  color: #0f6b0f;
}

.on-site-place.error {
  color: #9f1b1b;
  font-weight: 700;
}

.on-site-place.neutral {
  color: #4b4b4b;
}

.on-site-admin-panel {
  border: 1px solid #d7d7d7;
  border-radius: 10px;
  padding: 10px;
  margin: 8px 0 10px 0;
  background: #f5f8fb;
}

.on-site-admin-panel h3 {
  margin: 0 0 8px 0;
}

.on-site-admin-block {
  margin-bottom: 10px;
}

.on-site-admin-block-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 8px;
}

.on-site-admin-block h4 {
  margin: 0 0 6px 0;
}

.on-site-collapse-toggle {
  border: 0;
  background: transparent;
  color: #35523d;
  font-size: 1rem;
  font-weight: 700;
  letter-spacing: -0.08em;
  line-height: 1;
  cursor: pointer;
  padding: 4px 2px;
  min-width: 2.2rem;
  text-align: center;
}

.on-site-admin-block-content {
  margin-top: 8px;
}

.on-site-admin-block-collapsible.collapsed .on-site-admin-block-content {
  display: none;
}

.on-site-mode-buttons {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin-bottom: 10px;
}

.on-site-admin-tools {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 8px;
}

.on-site-admin-tools .hint {
  font-size: 0.82rem;
  color: #4b4b4b;
}

.on-site-admin-help {
  margin-top: 8px;
  font-size: 0.82rem;
  color: #4b4b4b;
}

.on-site-geo-stats {
  display: grid;
  gap: 4px;
  font-size: 0.9rem;
}

.on-site-hole-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 8px;
}

.on-site-hole-card {
  border: 1px solid #cfcfcf;
  border-radius: 12px;
  padding: 8px 9px;
  min-height: 0;
  text-align: left;
  background: #fff;
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 4px;
}

.on-site-hole-card.disabled {
  opacity: 0.65;
}

.on-site-hole-card .hole-title {
  font-size: 0.96rem;
  font-weight: 700;
  line-height: 1.15;
}

.on-site-hole-card .hole-title-row {
  width: 100%;
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  gap: 8px;
}

.on-site-hole-card .hole-capacity {
  font-size: 0.78rem;
  margin-top: 0;
  color: #465746;
  text-align: right;
}

.on-site-hole-card .hole-count {
  font-weight: 700;
  color: #213621;
}

.on-site-hole-card .hole-users {
  display: flex;
  align-items: center;
  gap: 5px;
  flex-wrap: wrap;
}

.on-site-hole-card .hole-booked-names {
  display: none;
  flex-wrap: wrap;
  gap: 4px;
}

.on-site-hole-card .hole-booked-name {
  display: inline-flex;
  align-items: center;
  padding: 1px 7px;
  border-radius: 999px;
  background: rgba(0, 0, 0, 0.06);
  font-size: 0.74rem;
  line-height: 1.2;
}

.on-site-hole-card .booking-player-name {
  cursor: pointer;
  text-decoration: underline;
  text-decoration-style: dotted;
  text-underline-offset: 0.14em;
}

.on-site-book-button {
  margin-top: auto;
  min-width: 0;
  background: #2f6b36;
  border-color: #24552a;
  color: #fff;
  font-weight: 700;
  box-shadow: 0 6px 16px rgba(47, 107, 54, 0.18);
}

.on-site-book-button:hover {
  background: #24552a;
}

.on-site-move-button {
  margin-top: auto;
  min-width: 0;
  background: #2563eb;
  border-color: #1d4ed8;
  color: #fff;
}

.on-site-unbook-button {
  margin-top: auto;
  min-width: 0;
  background: #d97706;
  border-color: #b45309;
  color: #fff;
}

.on-site-hole-card .avatar {
  width: 24px;
  height: 24px;
  border-radius: 50%;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 0.7rem;
  font-weight: 700;
  background: #eaeaea;
}

.on-site-hole-card .avatar-overflow {
  font-size: 0.78rem;
}

.on-site-hole-card.free {
  border-color: #74b974;
  background: #f3fff3;
}

.on-site-hole-card.almost-full {
  border-color: #cc9b36;
  background: #fff8e8;
}

.on-site-hole-card.full {
  border-color: #cb5a5a;
  background: #fff0f0;
}

.on-site-hole-card.booked {
  border-color: #d97706;
  background: #fff4e5;
}

.on-site-hole-card.sponsor {
  border-color: #8d8d8d;
  background: #f0f0f0;
}

.on-site-legend {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 10px;
  font-size: 0.8rem;
}

.on-site-legend .legend-item {
  border-radius: 8px;
  padding: 3px 8px;
  border: 1px solid #cecece;
}

.on-site-legend .free {
  background: #f3fff3;
}

.on-site-legend .almost-full {
  background: #fff8e8;
}

.on-site-legend .full {
  background: #fff0f0;
}

.on-site-legend .sponsor {
  background: #f0f0f0;
}

.on-site-legend .booked {
  background: #fff4e5;
}

.on-site-empty-state {
  border: 1px solid #d7d7d7;
  border-radius: 12px;
  background: #fafafa;
  padding: 14px;
  margin-top: 10px;
}

.on-site-empty-state h3 {
  margin: 0 0 6px 0;
}

.on-site-empty-state p {
  margin: 0;
}

.on-site-empty-state p + p {
  margin-top: 8px;
}

@media (max-width: 420px) {
  .on-site-wrapper {
    padding: 8px;
  }
  .on-site-hole-card {
    padding: 8px;
  }
  .on-site-hole-card .hole-title {
    font-size: 0.92rem;
  }

  .on-site-hole-card .hole-title-row {
    flex-direction: row;
    align-items: baseline;
    justify-content: space-between;
    gap: 8px;
  }
}

@media (min-width: 560px) {
  .on-site-hole-card .hole-booked-names {
    display: flex;
  }

  .on-site-hole-card .hole-users {
    display: none;
  }
}

@media (min-width: 820px) {
  .on-site-hole-grid {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }
}

@media (orientation: landscape) and (max-width: 950px) {
  .on-site-hole-grid {
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 6px;
  }

  .on-site-hole-card {
    padding: 7px 8px;
    gap: 3px;
  }

  .on-site-hole-card .hole-title {
    font-size: 0.9rem;
  }

  .on-site-hole-card .hole-capacity {
    font-size: 0.76rem;
  }

  .on-site-hole-card .hole-booked-name {
    font-size: 0.7rem;
  }
}
