/* assets/chibi.css */
:root{
  --bg1:#f6fbff;
  --bg2:#eaf6ff;
  --card:#ffffff;
  --text:#0f172a;
  --muted:#64748b;
  --line:#e2e8f0;
  --primary:#3b82f6;
  --primary2:#60a5fa;
  --ok:#22c55e;
  --warn:#f59e0b;
  --shadow: 0 12px 30px rgba(15, 23, 42, .10);
  --r-lg: 26px;
  --r-md: 18px;
  --r-sm: 14px;
}

*{box-sizing:border-box}
html,body{height:100%}
body{
  margin:0;
  font-family: system-ui, -apple-system, Segoe UI, Roboto, Arial, "Noto Sans", sans-serif;
  color:var(--text);
  background:
    radial-gradient(1200px 600px at 10% 0%, rgba(96,165,250,.35), transparent 60%),
    radial-gradient(900px 520px at 100% 10%, rgba(59,130,246,.18), transparent 60%),
    linear-gradient(180deg, var(--bg1), var(--bg2));
}

/* layout */
.container, .wrap, main{
  width:min(920px, 100%);
  margin:0 auto;
  padding:16px;
}
.header{
  display:flex;
  align-items:center;
  gap:12px;
  margin:16px 0 10px;
}
.brand{
  display:flex;
  align-items:center;
  gap:10px;
}
.brand-badge{
  width:46px;height:46px !important;
  border-radius:50% !important;
  background:#ffffff !important;
  border:1px solid rgba(226,232,240,.95) !important;
  box-shadow: 0 10px 18px rgba(15, 23, 42, .08 !important);
  position:relative !important;
}
.brand-badge::after{
  content:"🐼" !important;
  position:absolute;
  inset:0;
  display:grid;
  place-items:center;
  font-size:24px;
}
.brand h1{
  font-size:18px;
  line-height:1.15;
  margin:0;
}
.brand p{margin:0;color:var(--muted);font-size:13px}

/* card */
.card{
  background:var(--card);
  border:1px solid rgba(226,232,240,.9);
  border-radius:var(--r-lg);
  box-shadow:var(--shadow);
  padding:16px;
}
.card + .card{margin-top:14px}

/* form */
.field{display:flex;flex-direction:column;gap:8px;margin:12px 0}
label{font-weight:700;font-size:13px}
.help{color:var(--muted);font-size:12px}

input, select, textarea{
  width:100%;
  padding:14px 14px;
  border-radius:var(--r-md);
  border:1px solid var(--line);
  outline:none;
  background:rgba(255,255,255,.9);
  font-size:15px;
}
textarea{min-height:96px;resize:vertical}
input:focus, select:focus, textarea:focus{
  border-color: rgba(59,130,246,.55);
  box-shadow: 0 0 0 4px rgba(59,130,246,.12);
}

/* buttons */
.btn{
  appearance:none;
  border:0;
  cursor:pointer;
  border-radius:999px;
  padding:12px 16px;
  font-weight:800;
  font-size:15px;
  display:inline-flex;
  align-items:center;
  justify-content:center;
  gap:8px;
  transition:transform .05s ease, filter .2s ease;
  user-select:none;
}
.btn:active{transform:translateY(1px)}
.btn-primary{
  color:white;
  background:linear-gradient(135deg, var(--primary), var(--primary2));
  box-shadow: 0 12px 18px rgba(59,130,246,.25);
}
.btn-ghost{
  color:var(--text);
  background:#fff;
  border:1px solid var(--line);
}
.btn-wide{width:100%}

/* question */
.q-head{
  display:flex;
  justify-content:space-between;
  align-items:center;
  gap:10px;
  margin-bottom:10px;
}
.q-num{
  font-weight:900;
  background:rgba(59,130,246,.12);
  color:rgba(30,64,175,.95);
  border:1px solid rgba(59,130,246,.22);
  padding:6px 10px;
  border-radius:999px;
  font-size:13px;
}
.q-points{color:var(--muted);font-size:12px}
.q-text{font-size:16px;line-height:1.45;margin:8px 0 12px}

/* image/audio */
.q-media{display:grid; gap:10px; margin:10px 0 12px}
.q-media img{
  width:100%;
  max-height:320px;
  object-fit:contain;
  border-radius:var(--r-md);
  border:1px solid var(--line);
  background:#fff;
}
audio{width:100%}

/* choices (radio) – pill style */
.choices{
  display:grid;
  gap:10px;
}
.choice{
  position:relative;
}
.choice input{
  position:absolute;
  opacity:0;
  pointer-events:none;
}
.choice label{
  display:flex;
  gap:10px;
  align-items:flex-start;
  padding:12px 14px;
  border-radius:var(--r-md);
  border:1px solid var(--line);
  background:rgba(255,255,255,.85);
  cursor:pointer;
  transition:box-shadow .2s ease, border-color .2s ease, transform .05s ease;
  font-weight:700;
}
.choice label:hover{
  border-color: rgba(59,130,246,.35);
  box-shadow: 0 10px 18px rgba(15, 23, 42, .06);
}
.choice label::before{
  content:"";
  width:18px;height:18px;
  border-radius:50%;
  border:2px solid rgba(100,116,139,.55);
  margin-top:2px;
  flex:0 0 auto;
  background:#fff;
}
.choice input:checked + label{
  border-color: rgba(59,130,246,.55);
  box-shadow: 0 0 0 5px rgba(59,130,246,.12);
}
.choice input:checked + label::before{
  border-color: rgba(59,130,246,.85);
  background: radial-gradient(circle at 50% 50%, rgba(59,130,246,1) 0 45%, #fff 46% 100%);
}

/* sticky bottom bar for mobile submit/next */
.bottom-bar{
  position:sticky;
  bottom:0;
  margin-top:14px;
  padding:12px;
  border-radius:var(--r-lg);
  border:1px solid rgba(226,232,240,.9);
  background:rgba(255,255,255,.92);
  backdrop-filter: blur(8px);
  box-shadow: 0 -8px 20px rgba(15, 23, 42, .06);
  display:flex;
  gap:10px;
}
.bottom-bar .btn{flex:1}

/* responsive */
@media (max-width:560px){
  .card{padding:14px}
  .q-text{font-size:15px}
  input,select,textarea{font-size:16px} /* iOS zoom fix */
}
