:root{
  --bg:#fafafa;
  --card:#ffffff;
  --text:#111;
  --muted:#666;
  --accent:#2d8cff;
  --danger:#d9534f;
}
*{box-sizing:border-box}
html,body,#app{height:100%}
body{
  margin:0;
  font-family:system-ui,-apple-system,Segoe UI,Roboto,"Helvetica Neue",Arial;
  background:var(--bg);
  color:var(--text);
  display:flex;
  align-items:center;
  justify-content:center;
  padding:18px;
}
#app{
  width:100%;
  max-width:720px;
  height:100%;
  display:flex;
  align-items:center;
  justify-content:center;
}
.screen{
  width:100%;
  background:var(--card);
  border-radius:12px;
  box-shadow:0 6px 18px rgba(20,20,20,0.08);
  padding:18px;
  max-height:100%;
  display:flex;
  flex-direction:column;
  gap:12px;
}
.hidden{display:none}
.rules{flex:1; overflow:auto}
h2{margin:0 0 8px 0; font-size:18px}
p{margin:6px 0; color:var(--muted); line-height:1.3}
.btn{
  background:var(--accent);
  color:#fff;
  border:none;
  padding:12px 14px;
  border-radius:8px;
  font-weight:600;
  font-size:16px;
  cursor:pointer;
  align-self:center;
  min-width:160px;
}
.btn:active{transform:translateY(1px)}
.top-row{display:flex;justify-content:space-between;align-items:center}
.target{
  font-weight:700;
  font-size:18px;
  color:var(--accent);
}
#score{color:var(--muted)}
input#guess{
  width:100%;
  padding:14px 12px;
  font-size:16px;
  border-radius:8px;
  border:1px solid #e3e3e3;
  outline:none;
}
input#guess:focus{box-shadow:0 0 0 3px rgba(45,140,255,0.12);border-color:var(--accent)}
.hint{color:var(--muted); font-size:13px}
#feedback{height:22px; font-weight:600}
.end-summary{flex:1;display:flex;flex-direction:column;justify-content:center;align-items:center;gap:6px}
.sr{position:absolute;left:-9999px}
@media (max-width:420px){
  .screen{border-radius:10px;padding:14px}
  h2{font-size:16px}
  .btn{min-width:140px;padding:12px}
}

