.wheel-tool {
  display: grid;
  grid-template-columns: minmax(280px, 0.94fr) minmax(0, 1.06fr);
  align-items: start;
  gap: 18px;
}

.wheel-tool > * { min-width: 0; }
.wheel-controls > label { font-size: 1.05rem; }
.wheel-controls > .wheel-hint { margin: 5px 0 0; }
.wheel-tool textarea { min-height: 168px; }
.wheel-hint, .wheel-status { color: var(--muted); font-size: 0.86rem; line-height: 1.45; }
.wheel-status:not(:empty) { margin-top: 8px; }
.wheel-tool .actions { margin-top: 10px; }
.wheel-tool .actions button { padding-inline: 12px; }

.wheel-options {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
  margin-top: 18px;
}

.wheel-option {
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  gap: 7px;
  padding: 10px;
  background: #f1f6ef;
  border: 1px solid var(--line);
  border-radius: 10px;
}

.wheel-option input, .wheel-option .actions { margin: 0; }
.wheel-option button { width: 100%; }
.wheel-controls > .wheel-draw-hint { margin: 8px 0 0; }
.wheel-storage { margin-top: 18px; padding-top: 15px; border-top: 1px solid var(--line); }

.wheel-stage { padding: 12px; }
.wheel-preview {
  padding: clamp(14px, 4vw, 22px) 12px 10px;
  background: #edf5eb;
  border: 1px solid #e0ebdc;
  border-radius: 11px;
}

.wheel-dial {
  position: relative;
  isolation: isolate;
  width: min(100%, 330px);
  margin: 0 auto;
  aspect-ratio: 1;
}

.wheel-dial::after {
  position: absolute;
  z-index: 1;
  inset: -4px auto auto 50%;
  transform: translateX(-50%);
  width: 22px;
  height: 22px;
  background: #0d332c;
  clip-path: polygon(0 0, 100% 0, 50% 100%);
  content: '';
  pointer-events: none;
}

.wheel-dial canvas { display: block; width: 100%; height: auto; }
.wheel-count { margin-top: 8px; text-align: center; color: var(--muted); font-size: 0.9rem; }
.wheel-summary { padding: 14px 8px 4px; }
.wheel-result { margin-top: 8px; color: var(--muted); line-height: 1.5; overflow-wrap: anywhere; }
.wheel-result :is(ul, ol) { margin: 6px 0 0; padding-inline-start: 1.3rem; }
.wheel-result :is(strong, h3) { color: var(--ink); }
.wheel-result h3 { margin: 10px 0 0; font-size: 1rem; }
.wheel-result[data-state="error"] { color: #9e342a; }
.wheel-result[data-state="success"] { color: var(--ink); }

@media (max-width: 700px) {
  .wheel-tool { grid-template-columns: minmax(0, 1fr); }
}
