main.content:has(#ds-app) {
  min-width: 0;
}

.ds-container {
  box-sizing: border-box;
  min-width: 0;
  max-width: 100%;
  margin-top: 1.5rem;
  display: flex;
  flex-direction: column;
  gap: 1.25rem;
  color: #1a1a1a;
}

.ds-container:fullscreen {
  background: #f4f6f8;
  padding: 1.5rem;
  overflow-y: auto;
}

.ds-container [hidden] {
  display: none !important;
}

.ds-card {
  box-sizing: border-box;
  background: #f8f9fa;
  border: 1px solid #e1e4e8;
  border-radius: 10px;
  padding: 1.2rem 1.35rem;
}

.ds-card-header {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 0.65rem;
  margin-bottom: 1rem;
  padding-bottom: 0.6rem;
  border-bottom: 1px solid #e1e4e8;
}

.ds-card-header h2 {
  margin: 0;
  font-size: 1.15rem;
  color: #2d3436;
}

.ds-muted {
  margin: 0;
  font-size: 0.84rem;
  color: #636e72;
}

.ds-row {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.45rem;
}

.ds-grid-2 {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(190px, 1fr));
  gap: 0.85rem;
}

.ds-field {
  display: flex;
  flex-direction: column;
  gap: 0.3rem;
}

.ds-field label {
  font-weight: 600;
  font-size: 0.84rem;
  color: #2d3436;
}

.ds-input,
.ds-select {
  box-sizing: border-box;
  padding: 0.48rem 0.65rem;
  border: 1px solid #cfd4da;
  border-radius: 6px;
  background: #fff;
  color: #2d3436;
  font-family: inherit;
  font-size: 0.9rem;
}

.ds-btn {
  appearance: none;
  background: #fff;
  border: 1px solid #cfd4da;
  color: #2d3436;
  border-radius: 6px;
  padding: 0.45rem 0.78rem;
  font-family: inherit;
  font-size: 0.85rem;
  font-weight: 600;
  cursor: pointer;
  touch-action: manipulation;
}

.ds-btn:hover:not(:disabled) {
  border-color: #00cec9;
  background: #e6fffe;
}

.ds-btn.is-selected,
.ds-btn-primary {
  background: #2d3436;
  border-color: #2d3436;
  color: #fff;
}

.ds-btn-primary:hover:not(:disabled) {
  background: #00cec9;
  border-color: #00cec9;
  color: #1a1a1a;
}

.ds-btn-danger {
  background: #fff;
  border-color: #fab1a0;
  color: #c0392b;
}

.ds-players-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(190px, 1fr));
  gap: 0.85rem;
  margin-bottom: 1rem;
}

.ds-player-card {
  background: #fff;
  border: 2px solid #e1e4e8;
  border-radius: 10px;
  padding: 0.85rem 1rem;
  transition: border-color 0.15s, box-shadow 0.15s;
}

.ds-player-card.is-active {
  border-color: #00cec9;
  box-shadow: 0 0 0 3px rgba(0, 206, 201, 0.18);
}

.ds-player-card.is-winner {
  border-color: #00b894;
  background: #f0fff8;
}

.ds-player-top {
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-weight: 700;
  font-size: 0.96rem;
}

.ds-legs-badge {
  background: #2d3436;
  color: #fff;
  border-radius: 999px;
  padding: 0.15rem 0.55rem;
  font-size: 0.78rem;
}

.ds-score-big {
  font-size: 2.6rem;
  font-weight: 900;
  line-height: 1.1;
  margin: 0.35rem 0;
  color: #2d3436;
  font-variant-numeric: tabular-nums;
}

.ds-checkout-pill {
  display: inline-block;
  margin-top: 0.25rem;
  padding: 0.2rem 0.55rem;
  background: #ffeaa7;
  border: 1px solid #fdcb6e;
  border-radius: 6px;
  font-size: 0.8rem;
  font-weight: 700;
  color: #2d3436;
}

.ds-keypad {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 0.45rem;
  max-width: 360px;
  margin-top: 0.65rem;
}

.ds-key-btn {
  padding: 0.75rem 0.5rem;
  font-size: 1.15rem;
  font-weight: 700;
}

.ds-key-enter {
  grid-column: span 3;
  padding: 0.85rem;
  font-size: 1.1rem;
}

.ds-dart-slots {
  display: flex;
  gap: 0.5rem;
  margin-bottom: 0.75rem;
}

.ds-dart-slot {
  flex: 1;
  text-align: center;
  padding: 0.5rem;
  background: #fff;
  border: 1px solid #d5d9df;
  border-radius: 6px;
  font-weight: 700;
}

.ds-num-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(46px, 1fr));
  gap: 0.35rem;
  margin-top: 0.5rem;
}

.ds-table-wrap {
  overflow-x: auto;
}

.ds-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.86rem;
}

.ds-table th,
.ds-table td {
  text-align: left;
  padding: 0.45rem 0.55rem;
  border-bottom: 1px solid #e1e4e8;
  white-space: nowrap;
}

.ds-table th {
  font-size: 0.75rem;
  text-transform: uppercase;
  color: #636e72;
}

@media (max-width: 640px) {
  .ds-card {
    padding: 1rem;
  }
}
