#events-section {
  display: grid;
  grid-template-columns: minmax(0, 1.45fr) minmax(285px, 1fr);
  gap: 20px;
  align-items: start;
  max-width: 1140px;
}

.roulette-stage {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  justify-items: center;
  gap: 14px;
  padding: clamp(20px, 3.5vw, 38px) 16px 20px;
  text-align: center;
  color: #f3f7ff;
  background:
    radial-gradient(circle at center, #a8c8ff21 1px, transparent 1.5px) 0 0 / 22px 22px,
    radial-gradient(ellipse at 50% 50%, #254969, #101e34 76%);
  border: 1px solid #344c6a;
  border-radius: 20px;
}

.roulette-play { min-width: 0; }

.roulette-preset { display:flex; flex-wrap:wrap; justify-content:center; align-items:center; gap:6px 10px; margin:12px 0 6px; color:#c4d2e8; font-size:.85rem; }
.roulette-preset select { max-width:100%; min-height:42px; padding:6px 10px; border:1px solid #52677d; border-radius:8px; color:#f3f7ff; background:#182c43; font:inherit; font-size:1rem; }

.roulette-stage h2 { margin: 0; color: inherit; font-size: clamp(1.5rem, 3.8vw, 2.25rem); letter-spacing: -.04em; }
.roulette-stage p { margin: 4px 0 0; color: #c4d2e8; font-size: .91rem; }

.roulette-wheel {
  position: relative;
  width: min(100%, 420px);
  aspect-ratio: 1;
  margin: 8px 0;
  border: 1px solid #6d87ac;
  border-radius: 50%;
  background: #13253c;
  box-shadow: 0 0 0 5px #a6caff1c, 0 15px 28px #0714227a;
}

#roulette-disc-frame {
  position: absolute;
  inset: 7px;
  overflow: hidden;
  border-radius: 50%;
  contain: paint;
}

#roulette-disc { display: block; width: 100%; height: 100%; will-change: transform; }

#roulette-inspect {
  position: absolute;
  inset: 0;
  border-radius: 50%;
  border: 0;
  padding: 0;
  background: transparent;
  cursor: pointer;
  touch-action: manipulation;
}

#roulette-inspect:focus-visible { outline: 3px solid #f9d88b; outline-offset: 6px; }

.roulette-pointer {
  position: absolute;
  top: -10px;
  left: 50%;
  width: 24px;
  height: 35px;
  transform: translateX(-50%);
  background: #fbd989;
  clip-path: polygon(0 0, 100% 0, 50% 100%);
  z-index: 1;
  pointer-events: none;
}

.roulette-hub {
  position: absolute;
  inset: 32%;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 3px;
  overflow: hidden;
  padding: 8px;
  border-radius: 50%;
  color: #f3f7ff;
  background: #14283e;
  border: 2px solid #e8f1ff;
  box-shadow: 0 0 0 5px #12253c55, 0 8px 14px #10203370;
  pointer-events: none;
  font-size: clamp(1rem, 4vw, 2rem);
  font-weight: 800;
}

.roulette-hub .roulette-portrait {
  width: clamp(30px, 9vw, 60px);
  height: auto;
  aspect-ratio: 1;
  flex: none;
  border-radius: 50%;
  background: #253d56;
  color: #e8f1ff;
}

.roulette-hub-name {
  max-width: 100%;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  font-size: clamp(.75rem, 2.5vw, 1rem);
}

.roulette-inspector {
  display: grid;
  grid-template-columns: 44px minmax(0, 1fr) 44px;
  align-items: center;
  width: min(100%, 420px);
  min-height: 54px;
  border: 1px solid #496480;
  border-radius: 12px;
  background: #13253c;
}

.roulette-inspector button {
  min-height: 48px;
  border: 0;
  background: transparent;
  color: #f3f7ff;
  font: 500 28px/1 system-ui, sans-serif;
  cursor: pointer;
  touch-action: manipulation;
}

.roulette-inspector button:disabled { opacity: .34; cursor: default; }
#roulette-preview {
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 7px;
  min-width: 0;
  min-height: 52px;
  color: #f3f7ff;
  font-size: .9rem;
  overflow-wrap: anywhere;
}

#roulette-preview .roulette-portrait { border-radius: 50%; }
.roulette-preview-name { max-height: 48px; overflow: auto; font-weight: 700; }
.roulette-motion { display: flex; align-items: center; gap: 6px; font-size: .82rem; min-height: 26px; }
.roulette-motion input { accent-color: #f9d88b; }

#roulette-spin {
  min-width: min(100%, 176px);
  min-height: 48px;
  color: #16273a;
  background: #f9d88b;
  border-color: #f9d88b;
  font-size: 1rem;
  font-weight: 800;
  touch-action: manipulation;
}

#roulette-spin:hover:not(:disabled) { background: #ffe8af; }
#roulette-spin:focus-visible { outline: 3px solid #e8f1ff; outline-offset: 4px; }
#roulette-spin:disabled { opacity: .58; cursor: not-allowed; }
#roulette-progress { min-height: 1.35em; margin: 0; overflow-wrap: anywhere; }

.roulette-settings, .roulette-results { padding: 18px; min-width: 0; }
.roulette-results { margin: 16px 0 0; }
.roulette-panel-head { display: flex; align-items: center; justify-content: space-between; flex-wrap: wrap; gap: 6px 12px; }
.roulette-panel-head h3 { margin: 0; font-size: 1.12rem; }
#roulette-roster-status:empty { display: none; }
#roulette-options { min-inline-size: 0; padding: 0; margin: 14px 0 0; border: 0; }
#roulette-options:disabled { opacity: .65; }

.roulette-count {
  display: flex;
  gap: 8px;
  justify-content: space-between;
  align-items: center;
  min-width: 0;
  font-weight: 700;
  padding: 10px 12px;
  background: var(--bg);
  border-radius: 10px;
}

.roulette-count input, #roulette-search {
  border: 1px solid var(--border);
  border-radius: 8px;
  min-height: 42px;
  background: var(--surface);
  color: var(--text);
  font: inherit;
  font-size: 1rem;
  padding: 6px 10px;
}

.roulette-count input { width: 74px; text-align: center; }
.roulette-count input:invalid { border-color: var(--red-700); }
#roulette-count-error { margin-top: 6px; color: var(--red-700); font-size: .85rem; }
.roulette-participant-head { margin: 16px 0 6px; font-weight: 700; }
.roulette-selection { display: flex; flex-wrap: wrap; gap: 4px; }
.roulette-selection button { min-height: 34px; }
#roulette-search { width: 100%; }

.roulette-members {
  margin-top: 8px;
  max-height: clamp(200px, 45vh, 425px);
  overflow-y: auto;
  border: 1px solid var(--border);
  border-radius: 10px;
}

.roulette-members label {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 6px 12px;
  min-height: 42px;
  cursor: pointer;
  overflow-wrap: anywhere;
}

.roulette-members label + label { border-top: 1px solid var(--border); }
.roulette-members label:hover, .roulette-members label:focus-within { background: var(--bg); }
.roulette-members input { width: 17px; height: 17px; flex: none; margin: 0; accent-color: var(--primary); }
.roulette-empty { padding-inline: 12px; }
#roulette-winners { padding-left: 1.85em; margin: 12px 0 0; }
#roulette-winners li { padding: 9px 4px; font-weight: 700; overflow-wrap: anywhere; border-top: 1px solid var(--border); }
#roulette-winners li::marker { color: var(--primary); }
.roulette-winner { display: flex; align-items: center; gap: 9px; }
.roulette-members .roulette-portrait, .roulette-winner .roulette-portrait { border-radius: 50%; }

@media (max-width: 950px) {
  #events-section { grid-template-columns: minmax(0, 1fr) minmax(255px, .9fr); gap: 14px; }
}

@media (max-width: 760px) {
  #events-section { grid-template-columns: minmax(0, 1fr); }
  .roulette-stage { gap: 9px; }
  .roulette-wheel { width: min(100%, 320px, max(180px, calc(100svh - 145px))); }
  .roulette-settings, .roulette-results { padding: 14px; }
}
