:root{
  --card: rgba(255,255,255,.92);
  --stroke: rgba(0,0,0,.06);
  --shadow: 0 14px 26px rgba(0,0,0,.08);
  --radius: 26px;
}
*{ box-sizing:border-box; }
body{
  margin:0;
  font-family: system-ui, -apple-system, Segoe UI, Roboto, Arial, sans-serif;
  background: radial-gradient(circle at 50% 10%, #dff6ff, #ffffff 62%);
  color:#0b1220;
}
.wrap{
  max-width:1120px;
  margin:0 auto;
  padding:18px;
}
.shell{
  border-radius:30px;
  background: linear-gradient(180deg, #dff6ff, #ffffff);
  box-shadow: 0 25px 60px rgba(0,0,0,.15);
  border: 4px solid rgba(255,255,255,.78);
  position:relative;
  overflow:hidden;
  padding:18px;
}
.title{
  text-align:center;
  font-size:42px;
  font-weight:1000;
  padding:16px 14px;
  border-radius:26px;
  background: linear-gradient(90deg,#ff6ec7,#ffb86c,#ffe66d);
  color:#fff;
  letter-spacing:.6px;
  text-shadow: 0 2px 0 rgba(0,0,0,.12);
  border: 3px solid rgba(255,255,255,.55);
}
.top{
  display:grid;
  grid-template-columns: 1.25fr 1fr;
  gap:16px;
  margin-top:16px;
  align-items:stretch;
}
.card{
  background: var(--card);
  border-radius:24px;
  padding:16px;
  border: 3px solid var(--stroke);
  box-shadow: var(--shadow);
}
.signBox{
  height:280px;
  display:flex;
  align-items:center;
  justify-content:center;
  border-radius:22px;
  background: linear-gradient(180deg, rgba(255,255,255,.9), rgba(240,250,255,.9));
  border: 3px solid var(--stroke);
  overflow:hidden;
  position:relative;
}
.signBox img{
  max-width:86%;
  max-height:86%;
  filter: drop-shadow(0 10px 18px rgba(0,0,0,.12));
}
.targetWord{
  font-size:52px;
  font-weight:1000;
  text-align:center;
  margin-top:12px;
}
.smallHint{
  margin-top:8px;
  text-align:center;
  font-weight:900;
  opacity:.85;
}
.stats{
  font-weight:1000;
  font-size:16px;
  line-height:1.7;
}
.controls{
  display:flex;
  gap:10px;
  flex-wrap:wrap;
  margin-top:12px;
  align-items:center;
}
.btn{
  border:0;
  border-radius:18px;
  padding:12px 14px;
  font-weight:1000;
  cursor:pointer;
  background: rgba(0,0,0,.07);
  transition: transform .12s ease, box-shadow .12s ease;
}
.btn:hover{ transform: translateY(-2px); box-shadow: 0 10px 18px rgba(0,0,0,.12); }
.btn.primary{
  width:100%;
  font-size:20px;
  background: linear-gradient(90deg, rgba(110,231,183,.85), rgba(96,165,250,.85));
}
.pill{
  padding:8px 10px;
  border-radius:999px;
  background: rgba(0,0,0,.06);
  font-weight:1000;
}
.row{
  display:flex;
  gap:10px;
  flex-wrap:wrap;
  align-items:center;
}
label{
  font-weight:1000;
}
select,input[type="range"]{ accent-color:#60a5fa; }
.area{
  margin-top:14px;
  height:620px;
  position:relative;
  overflow:hidden;
  border-radius:26px;
  border: 3px solid var(--stroke);
  background: radial-gradient(circle at 50% 20%, rgba(255,255,255,.96), rgba(240,250,255,.96));
}
.bubble{
  position:absolute;
  width: 170px;
  height: 170px;
  border-radius: 999px;
  display:flex;
  align-items:center;
  justify-content:center;
  text-align:center;
  cursor:pointer;
  user-select:none;
  box-shadow: 0 16px 28px rgba(0,0,0,.18);
  transform: translateZ(0);
  transition: transform .12s ease;
  border: 3px solid rgba(255,255,255,.6);
  overflow:hidden;
}
.bubble:active{ transform: scale(.96); }
.bubble .img{
  width:100%;
  height:100%;
  background-repeat:no-repeat;
  background-size: auto;
  filter: drop-shadow(0 10px 14px rgba(0,0,0,.18));
}
.bubble .cap{
  position:absolute;
  left:10px; right:10px;
  bottom:10px;
  padding:6px 8px;
  border-radius:14px;
  background: rgba(0,0,0,.45);
  color:#fff;
  font-weight:1000;
  font-size:16px;
  text-shadow: 0 2px 0 rgba(0,0,0,.25);
}
.status{
  margin-top:14px;
  text-align:center;
  font-weight:1000;
  font-size:18px;
  padding:10px 12px;
  border-radius:18px;
  background: rgba(255,255,255,.92);
  border: 2px solid var(--stroke);
}
.overlay{
  position:absolute;
  inset:0;
  display:flex;
  align-items:center;
  justify-content:center;
  background: rgba(11,18,32,.45);
  backdrop-filter: blur(6px);
  opacity:0;
  pointer-events:none;
  transition: opacity .18s ease;
}
.overlay.show{
  opacity:1;
  pointer-events:auto;
}
.overlayCard{
  width:min(520px, 92%);
  border-radius:26px;
  padding:18px;
  background: rgba(255,255,255,.95);
  border: 3px solid rgba(0,0,0,.08);
  box-shadow: 0 24px 60px rgba(0,0,0,.25);
  text-align:center;
}
.overlayTitle{
  font-size:34px;
  font-weight:1000;
}
.overlayMsg{
  margin-top:10px;
  font-size:18px;
  font-weight:900;
  opacity:.85;
}
.pop{ animation: pop .35s ease forwards; }
@keyframes pop{ 0%{ transform: scale(1);} 50%{ transform: scale(1.25);} 100%{ transform: scale(0); opacity:0;} }
@media (max-width: 980px){
  .top{ grid-template-columns: 1fr; }
  .targetWord{ font-size:44px; }
  .area{ height:700px; }
}
