.decision-layout{
  display:grid;
  grid-template-columns:repeat(auto-fit,minmax(340px,1fr));
  gap:24px;
  margin-bottom:28px;
}

.controls-card h3,
.result-card h3{
  font-family:'Fredoka',sans-serif;
  color:var(--gold);
  margin-bottom:16px;
}

.help-text{
  font-size:.9em;
  opacity:.75;
  margin-top:6px;
}

.result-display{
  min-height:220px;
  border:1px solid var(--light-gray);
  border-radius:18px;
  background:#111;
  display:flex;
  flex-direction:column;
  align-items:center;
  justify-content:center;
  padding:26px;
  text-align:center;
}

.thinking{
  font-size:1.2em;
  color:var(--cream);
  margin-bottom:12px;
  opacity:.8;
}

.thinking.active::after{
  content:'...';
  animation:ellipsis 1.4s infinite;
  margin-left:6px;
}

.final-result{
  font-size:3rem;
  font-family:'Fredoka',sans-serif;
  color:var(--mint);
}

.round-list{
  list-style:none;
  padding:0;
  margin:18px 0 0;
  width:100%;
  text-align:left;
  max-height:160px;
  overflow:auto;
  font-size:1rem;
  line-height:1.4;
}

.round-list li{
  display:flex;
  align-items:center;
  gap:12px;
  justify-content:space-between;
  padding:8px 12px;
  margin-bottom:8px;
  border-radius:12px;
  background:#161616;
  border:1px solid rgba(255,255,255,.08);
}

.round-list li.yes{border-color:rgba(5,150,105,.6)}
.round-list li.no{border-color:rgba(227,100,20,.6)}

.round-tag{
  font-size:.8em;
  text-transform:uppercase;
  letter-spacing:.08em;
  opacity:.7;
}

.round-result-pill{
  font-family:'Fredoka',sans-serif;
  padding:4px 12px;
  border-radius:999px;
  background:rgba(255,255,255,.08);
}

.round-list li.yes .round-result-pill{
  background:rgba(5,150,105,.15);
  color:var(--mint);
}

.round-list li.no .round-result-pill{
  background:rgba(227,100,20,.15);
  color:var(--orange);
}

.round-score{
  font-family:'JetBrains Mono',monospace;
  font-size:.9em;
  opacity:.8;
  margin-left:auto;
}

.result-display.yes .final-result{color:var(--mint)}
.result-display.no .final-result{color:var(--orange)}

.detail-panel{
  border:1px dashed var(--light-gray);
  border-radius:14px;
  padding:18px;
  margin-top:18px;
  line-height:1.5;
}

.history{
  margin-top:28px;
  background:var(--dark-gray);
  border:1px solid var(--light-gray);
  border-radius:16px;
  padding:24px;
}

.history-list{
  margin-top:18px;
  border:1px dashed var(--light-gray);
  border-radius:14px;
  padding:16px;
  max-height:320px;
  overflow:auto;
}

.history-entry{
  border:1px solid rgba(251,139,36,.35);
  border-radius:12px;
  padding:12px;
  margin-bottom:12px;
  background:#151515;
}

.history-entry h4{
  font-family:'Fredoka',sans-serif;
  color:var(--gold);
  margin-bottom:6px;
}

.history-entry ul{
  list-style:none;
  padding:0;
  margin:0;
  display:flex;
  flex-wrap:wrap;
  gap:14px;
  font-size:.95em;
}

@keyframes ellipsis{
  0%{content:''}
  33%{content:'.'}
  66%{content:'..'}
  100%{content:'...'}
}

.best-overlay{
  position:fixed;
  inset:0;
  background:rgba(0,0,0,.75);
  display:none;
  align-items:center;
  justify-content:center;
  padding:20px;
  z-index:2000;
  opacity:0;
  transition:opacity .2s ease;
}

.best-overlay.active{
  display:flex;
}

.best-overlay.visible{
  opacity:1;
}

.best-overlay-inner{
  background:#111;
  border:2px solid var(--gold);
  border-radius:20px;
  padding:28px;
  max-width:420px;
  width:100%;
  text-align:center;
  box-shadow:0 20px 50px rgba(0,0,0,.6);
  animation:pop-in .35s ease;
}

.best-overlay-inner h3{
  font-family:'Fredoka',sans-serif;
  color:var(--gold);
  margin-bottom:10px;
}

.best-overlay-inner p{
  font-family:'JetBrains Mono',monospace;
  font-size:1.1rem;
  margin-bottom:14px;
}

.best-overlay-inner ul{
  list-style:none;
  padding:0;
  margin:0 0 18px;
  text-align:left;
  line-height:1.5;
}

.best-overlay-inner ul li{
  margin-bottom:6px;
  padding:6px 10px;
  border-radius:10px;
  border:1px solid rgba(255,255,255,.08);
}

.best-overlay-inner ul li.yes{border-color:rgba(5,150,105,.6)}
.best-overlay-inner ul li.no{border-color:rgba(227,100,20,.6)}

@media(max-width:640px){
  .decision-layout{grid-template-columns:1fr}
}
