:root{
  --bg:#f6f8fb;
  --panel:#ffffff;
  --accent:#2b7cff;
  --muted:#6b7280;
  --success:#16a34a;
  --danger:#ef4444;
  --radius:12px;
  --gap:12px;
  font-family:Inter, system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial;
  color-scheme: light;
}

*{box-sizing:border-box}
html,body,#app{height:100%}
body{
  margin:0;
  background:var(--bg);
  display:flex;
  align-items:center;
  justify-content:center;
  padding:18px;
  -webkit-font-smoothing:antialiased;
  -moz-osx-font-smoothing:grayscale;
}

main#app{
  width:100%;
  max-width:980px;
  height:100vh; /* single-screen experience */
  background:linear-gradient(180deg, rgba(255,255,255,0.8), rgba(250,251,253,0.9));
  border-radius:16px;
  padding:16px;
  display:flex;
  flex-direction:column;
  gap:12px;
  box-shadow:0 8px 30px rgba(11,15,30,0.07);
  overflow:hidden;
}

/* Header */
.brand{
  display:flex;
  justify-content:space-between;
  align-items:center;
  gap:12px;
}
.logo{
  font-weight:700;
  font-size:18px;
  color:var(--accent);
}
.subtitle{
  font-size:13px;
  color:var(--muted);
}

/* Panels grid */
.panels{
  display:flex;
  gap:12px;
  flex:1;
  align-items:stretch;
}
.panel{
  background:var(--panel);
  border-radius:12px;
  padding:12px;
  flex:1;
  min-width:0;
  display:flex;
  flex-direction:column;
  gap:8px;
  box-shadow:inset 0 -1px 0 rgba(15,23,42,0.03);
}
.panel h2{margin:0;font-size:16px;color:#0f172a}
.panel .desc{margin:0;font-size:12px;color:var(--muted)}
.controls{display:flex;gap:8px;align-items:center;margin-top:6px}
.controls label{font-size:12px;color:var(--muted);display:flex;align-items:center;gap:8px}
.controls select{padding:6px;border-radius:8px;border:1px solid #e6e9ef;background:#fff;font-size:13px}
.controls button{background:var(--accent);color:white;border:0;padding:8px 10px;border-radius:8px;font-weight:600;min-width:64px}

/* game area */
.game{
  margin-top:8px;
  background:linear-gradient(180deg,#fbfdff,#fff);
  border-radius:10px;
  padding:10px;
  flex:1;
  display:flex;
  flex-direction:column;
  gap:8px;
  align-items:stretch;
  justify-content:center;
  font-size:16px;
  color:#0f172a;
}

/* compact UI elements for tasks */
.row{display:flex;gap:8px;align-items:center}
.big{font-size:20px;font-weight:700}
.small{font-size:13px;color:var(--muted)}

button.choice{
  padding:10px;
  border-radius:10px;
  border:1px solid #e6e9ef;
  background:white;
  text-align:center;
  flex:1;
  font-weight:600;
  min-height:44px;
}

/* footer */
.footer{
  display:flex;
  justify-content:space-between;
  align-items:center;
  font-size:12px;
  color:var(--muted);
  gap:8px;
}
.footer .tiny{
  font-size:9px;
  color:rgba(0,0,0,0.2);
  transform:translateY(2px);
}

/* small-screen adjustments */
@media (max-width:820px){
  .panels{flex-direction:column}
  main#app{padding:12px}
}