:root {
  --ink: #172321;
  --muted: #687471;
  --paper: #f6f4ed;
  --panel: #fffdf7;
  --line: #dfded5;
  --teal: #087f79;
  --teal-dark: #075e5a;
  --coral: #ed725e;
  --yellow: #f2bf4b;
  --shadow: 0 18px 50px rgba(26, 52, 47, .1);
}

* { box-sizing: border-box; }
body {
  margin: 0;
  min-width: 320px;
  color: var(--ink);
  background: var(--paper);
  font-family: 'Trebuchet MS', 'Segoe UI', sans-serif;
}
body::before {
  content: '';
  position: fixed;
  inset: 0;
  pointer-events: none;
  opacity: .35;
  background-image: radial-gradient(#d5d3c9 .7px, transparent .7px);
  background-size: 13px 13px;
}
.app-shell { position: relative; max-width: 1180px; margin: 0 auto; padding: 64px 28px 30px; }
.intro { max-width: 720px; margin-bottom: 38px; }
.eyebrow, .section-label { margin: 0 0 10px; color: var(--teal); font-size: 11px; font-weight: 700; letter-spacing: 1.8px; text-transform: uppercase; }
h1, h2 { margin: 0; font-family: 'Trebuchet MS', 'Segoe UI', sans-serif; letter-spacing: 0; }
h1 { font-size: clamp(2.4rem, 5vw, 4.7rem); line-height: .98; max-width: 680px; }
h2 { font-size: 1.35rem; }
.subtitle { max-width: 570px; margin: 20px 0 0; color: var(--muted); font-size: 1rem; line-height: 1.6; }
.workspace { display: grid; grid-template-columns: minmax(0, 1.25fr) minmax(310px, .75fr); gap: 22px; align-items: start; }
.panel { border: 1px solid rgba(212, 213, 203, .9); border-radius: 8px; background: rgba(255, 253, 247, .9); box-shadow: var(--shadow); }
.wheel-panel { min-height: 690px; padding: 30px; text-align: center; }
.panel-heading { display: flex; align-items: flex-start; justify-content: space-between; gap: 16px; text-align: left; }
.panel-heading.compact { align-items: center; }
.count-badge, .question-count { color: var(--muted); font-size: .8rem; font-weight: 600; white-space: nowrap; }
.count-badge { padding: 8px 11px; border-radius: 99px; background: #e9f1ec; color: var(--teal-dark); }
.wheel-wrap { position: relative; width: min(100%, 490px); aspect-ratio: 1; margin: 38px auto 28px; }
.wheel { width: 100%; height: 100%; border: 12px solid #fffdf7; border-radius: 50%; background: var(--teal); box-shadow: 0 12px 0 #d8d8cd, 0 22px 35px rgba(23,35,33,.16); transition: transform 4.8s cubic-bezier(.12, .8, .18, 1); overflow: hidden; }
.wheel::after { content: ''; position: absolute; inset: 13px; border: 1px solid rgba(255,255,255,.5); border-radius: 50%; pointer-events: none; }
.wheel-center { position: absolute; top: 50%; left: 50%; display: grid; width: 78px; height: 78px; transform: translate(-50%, -50%); place-items: center; border: 7px solid #fffdf7; border-radius: 50%; background: var(--ink); color: white; box-shadow: 0 4px 0 rgba(0,0,0,.15); font-family: 'Trebuchet MS', 'Segoe UI', sans-serif; font-size: .8rem; font-weight: 700; }
.pointer { position: absolute; z-index: 2; top: 50%; right: -17px; width: 0; height: 0; transform: translateY(-50%); border-top: 16px solid transparent; border-bottom: 16px solid transparent; border-right: 34px solid var(--coral); filter: drop-shadow(0 3px 0 rgba(92, 44, 35, .2)); }
.wheel-label { position: absolute; z-index: 1; top: 50%; left: 50%; width: 38%; transform-origin: 0 0; color: #fffdf7; font-size: clamp(.65rem, 1.5vw, .88rem); font-weight: 700; text-align: right; text-shadow: 0 1px 2px rgba(0,0,0,.2); white-space: nowrap; }
.button { border: 0; border-radius: 5px; padding: 11px 16px; cursor: pointer; font: inherit; font-size: .85rem; font-weight: 700; transition: transform .18s, background .18s, opacity .18s; }
.button:hover:not(:disabled) { transform: translateY(-2px); }
.button:active:not(:disabled) { transform: translateY(0); }
.button:disabled { cursor: not-allowed; opacity: .42; }
.button-primary { background: var(--teal); color: white; }
.button-primary:hover:not(:disabled) { background: var(--teal-dark); }
.button-large { width: min(100%, 300px); padding: 15px; font-size: 1rem; }
.button-secondary { background: var(--ink); color: white; }
.button-accent { width: 100%; background: var(--coral); color: white; }
.button-quiet { padding: 7px 10px; background: transparent; color: var(--teal-dark); }
.status-message { min-height: 20px; margin: 16px 0 0; color: var(--muted); font-size: .85rem; }
.side-panel { display: grid; gap: 22px; }
.participant-panel, .question-panel { padding: 24px; }
.add-form { display: flex; gap: 8px; margin-top: 22px; }
input, textarea { min-width: 0; flex: 1; border: 1px solid var(--line); border-radius: 5px; padding: 12px; outline: none; background: white; color: var(--ink); font: inherit; font-size: .85rem; }
textarea { min-height: 76px; resize: vertical; line-height: 1.45; }
input:focus, textarea:focus { border-color: var(--teal); box-shadow: 0 0 0 3px rgba(8, 127, 121, .12); }
.form-message { min-height: 17px; margin: 8px 0 2px; color: var(--coral); font-size: .75rem; }
.participant-list { display: grid; gap: 8px; max-height: 220px; margin: 8px 0 0; padding: 0; overflow-y: auto; list-style: none; }
.participant-item { display: flex; align-items: center; justify-content: space-between; gap: 10px; border-bottom: 1px solid #ecebe4; padding: 9px 0; font-size: .9rem; }
.remove-button { border: 0; background: transparent; color: #a6aaa5; cursor: pointer; font-size: 1.1rem; line-height: 1; }
.remove-button:hover { color: var(--coral); }
.empty-list { padding: 18px 0; color: var(--muted); font-size: .82rem; text-align: center; }
.question-panel { background: var(--ink); color: white; }
.question-panel .section-label { color: var(--yellow); }
.question-panel .question-count { color: #b5c2bc; }
.question-box { display: flex; min-height: 152px; flex-direction: column; align-items: center; justify-content: center; gap: 14px; margin: 23px 0 18px; border: 1px solid #3c4b47; border-radius: 5px; padding: 22px; background: #21312d; text-align: center; }
.question-box p { margin: 0; font-family: 'Trebuchet MS', 'Segoe UI', sans-serif; font-size: 1.04rem; line-height: 1.45; }
.question-icon { display: grid; width: 29px; height: 29px; place-items: center; border-radius: 50%; background: var(--yellow); color: var(--ink); font-family: 'Space Grotesk'; font-weight: 700; }
.text-button { display: block; margin: 15px auto 0; border: 0; background: transparent; color: #b5c2bc; cursor: pointer; font: inherit; font-size: .75rem; text-decoration: underline; }
.text-button:hover { color: white; }
footer { margin-top: 25px; color: var(--muted); font-size: .75rem; text-align: right; }
.sr-only { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0,0,0,0); white-space: nowrap; border: 0; }
.modal-backdrop { position: fixed; z-index: 10; inset: 0; display: grid; place-items: center; padding: 20px; background: rgba(23, 35, 33, .58); }
.modal-backdrop[hidden] { display: none; }
.winner-modal { position: relative; width: min(100%, 430px); border: 1px solid var(--line); border-radius: 8px; padding: 32px; background: var(--panel); box-shadow: 0 24px 70px rgba(23, 35, 33, .3); text-align: center; animation: modal-in .2s ease-out; }
.winner-modal .section-label { margin-bottom: 8px; }
.winner-name { margin: 14px 0 10px; color: var(--teal-dark); font-family: 'Trebuchet MS', 'Segoe UI', sans-serif; font-size: 2.3rem; font-weight: 700; overflow-wrap: anywhere; }
.modal-copy { margin: 0 auto 25px; max-width: 320px; color: var(--muted); font-size: .87rem; line-height: 1.5; }
.modal-actions { display: flex; justify-content: center; gap: 10px; }
.button-danger { background: var(--coral); color: white; }
.button-danger:hover:not(:disabled) { background: #d85f50; }
.modal-close { position: absolute; top: 13px; right: 15px; border: 0; background: transparent; color: var(--muted); cursor: pointer; font-size: 1.7rem; line-height: 1; }
.modal-close:hover { color: var(--ink); }
@keyframes modal-in { from { opacity: 0; transform: translateY(8px) scale(.98); } to { opacity: 1; transform: translateY(0) scale(1); } }
@media (max-width: 800px) { .app-shell { padding: 40px 16px 24px; } .workspace { grid-template-columns: 1fr; } .wheel-panel { min-height: 0; } footer { text-align: center; } }
@media (max-width: 430px) { h1 { font-size: 2.45rem; } .wheel-panel, .participant-panel, .question-panel { padding: 20px; } .wheel-wrap { margin-top: 30px; } .panel-heading { gap: 8px; } .count-badge { font-size: .7rem; } .winner-modal { padding: 28px 20px; } .modal-actions { flex-direction: column-reverse; } .modal-actions .button { width: 100%; } }