
:root{
  --bg:#f1f5f9;
  --panel:#ffffff;
  --text:#0f172a;
  --muted:#64748b;
  --border:#dbe3ee;
  --accent:#4f46e5;
  --accent-dark:#4338ca;
  --soft:#eef2ff;
}
*{box-sizing:border-box}
html{scroll-behavior:smooth}
body{
  margin:0;
  background:linear-gradient(180deg,#eef2ff 0,#f8fafc 38%,#f1f5f9 100%);
  color:var(--text);
  font-family:Inter,system-ui,-apple-system,BlinkMacSystemFont,"Segoe UI",sans-serif;
}
button{font:inherit}
.app{
  width:min(100%,780px);
  margin:0 auto;
  padding:20px 14px calc(34px + env(safe-area-inset-bottom));
}
.hero{text-align:center;padding:8px 8px 18px}
.eyebrow{
  margin:0 0 4px;
  color:var(--accent);
  font-size:.78rem;
  font-weight:800;
  letter-spacing:.12em;
  text-transform:uppercase
}
h1{font-size:clamp(2rem,7vw,3rem);margin:0 0 8px}
h2,h3,p{margin-top:0}
.hero p:last-child{color:var(--muted);line-height:1.5}
.panel{
  background:var(--panel);
  border:1px solid var(--border);
  border-radius:24px;
  padding:18px;
  margin-bottom:14px;
}
.section-title{
  display:flex;
  justify-content:space-between;
  align-items:center;
  gap:12px;
}
.section-title>div{display:flex;align-items:center;gap:9px}
.section-title h2{margin:0;font-size:1.25rem}
.step{
  width:30px;height:30px;border-radius:50%;
  display:grid;place-items:center;
  background:var(--soft);color:var(--accent);font-weight:900
}
.hint{color:var(--muted);margin:10px 0 14px}
.color-grid{
  display:grid;
  grid-template-columns:repeat(4,1fr);
  gap:10px
}
.color-btn{
  border:2px solid transparent;
  background:#fff;
  border-radius:18px;
  min-height:116px;
  padding:8px;
  cursor:pointer;
  display:flex;
  flex-direction:column;
  align-items:center;
  justify-content:center;
  gap:9px;
  color:var(--text);
  box-shadow:0 2px 10px rgba(15,23,42,.06);
  transition:.15s ease;
}
.color-btn:active{transform:scale(.97)}
.color-btn.selected{border-color:var(--accent);background:var(--soft)}
.color-circle{
  width:58px;height:58px;border-radius:50%;
  border:1px solid rgba(15,23,42,.16);
  box-shadow:inset 0 0 0 1px rgba(255,255,255,.45)
}
.color-btn strong{font-size:.88rem}
.discovered-wrap{margin-top:22px}
.discovered-wrap h3{font-size:1rem;margin-bottom:10px}
.hidden{display:none!important}
.link-btn{
  border:0;background:transparent;color:var(--accent);
  font-weight:800;padding:8px;cursor:pointer
}
.selected-row{
  display:grid;grid-template-columns:1fr auto 1fr;
  gap:12px;align-items:center;margin:17px 0
}
.selected-slot{
  min-height:100px;border:2px dashed var(--border);
  border-radius:18px;display:flex;flex-direction:column;
  justify-content:center;align-items:center;gap:7px
}
.slot-color{
  width:46px;height:46px;border-radius:50%;background:#e2e8f0;
  border:1px solid var(--border)
}
.plus{font-size:1.7rem;font-weight:900;color:var(--muted)}
.prediction-box{
  margin:15px 0;
  border-top:1px solid var(--border);
  padding-top:16px
}
.prediction-box h3{margin-bottom:4px}
.prediction-box p{color:var(--muted);font-size:.9rem;margin-bottom:12px}
.prediction-options{
  display:grid;grid-template-columns:repeat(3,1fr);gap:9px
}
.prediction-btn{
  min-height:82px;border-radius:16px;border:2px solid var(--border);
  background:#fff;cursor:pointer;padding:8px;font-weight:800;
  display:flex;flex-direction:column;gap:6px;align-items:center;justify-content:center
}
.prediction-btn.selected{border-color:var(--accent);background:var(--soft)}
.prediction-mini{
  width:35px;height:35px;border-radius:50%;border:1px solid rgba(15,23,42,.15)
}
.mix-btn,.secondary-btn{
  width:100%;min-height:54px;border-radius:16px;border:0;
  font-weight:900;cursor:pointer
}
.mix-btn{background:var(--accent);color:white}
.mix-btn:hover{background:var(--accent-dark)}
.mix-btn:disabled{opacity:.4;cursor:not-allowed}
.secondary-btn{margin-top:16px;background:#e2e8f0;color:var(--text)}
.result-layout{display:grid;gap:12px}
.result-main{
  display:flex;align-items:center;gap:16px;
  padding:14px;border-radius:20px;background:#f8fafc;border:1px solid var(--border)
}
.result-swatch{
  width:96px;height:96px;flex:0 0 96px;border-radius:24px;
  border:1px solid rgba(15,23,42,.18)
}
.result-label{color:var(--muted);font-size:.82rem}
.result-main h3{font-size:1.55rem;margin:3px 0}
.result-main p{color:var(--muted);margin:0}
.prediction-result{
  border-radius:17px;padding:13px 15px;font-weight:800
}
.prediction-result.correct{background:#dcfce7;color:#166534}
.prediction-result.wrong{background:#fee2e2;color:#991b1b}
.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
}
@media(max-width:560px){
  .color-grid{grid-template-columns:repeat(2,1fr)}
  .base-grid{grid-template-columns:repeat(2,1fr)}
  .color-btn{min-height:105px}
  .prediction-options{grid-template-columns:1fr}
  .prediction-btn{min-height:62px;flex-direction:row}
  .result-main{align-items:center}
  .result-swatch{width:78px;height:78px;flex-basis:78px}
}
