:root{
  --bg:#f7fbff;
  --card:#ffffff;
  --ink:#1d2433;
  --muted:#667085;
  --primary:#4a6bdf;
  --primary2:#48a9a6;
  --shadow:0 10px 26px rgba(0,0,0,.08);
  --r:18px;
}

*{box-sizing:border-box}
body.xl{
  margin:0;
  background:linear-gradient(180deg,var(--bg),#fff);
  font-family: system-ui,-apple-system,"Segoe UI","PingFang SC","Microsoft YaHei",Arial,sans-serif;
  color:var(--ink);
}

.xl-topbar{
  position:sticky; top:0; z-index:5;
  display:flex; align-items:center; justify-content:space-between;
  padding:12px 14px;
  background:rgba(255,255,255,.92);
  backdrop-filter:saturate(160%) blur(10px);
  border-bottom:1px solid rgba(0,0,0,.06);
}

.xl-brand{display:flex; gap:10px; align-items:center}
.xl-title{font-weight:900; font-size:18px}
.xl-sub{font-size:12px; color:var(--muted); margin-top:2px}
.xl-right{display:flex; gap:10px; align-items:center}
.xl-user{display:flex; gap:8px; align-items:center}
.xl-user-name{font-weight:900; font-size:13px; max-width:140px; overflow:hidden; text-overflow:ellipsis; white-space:nowrap}

.xl-wrap{max-width:980px; margin:18px auto; padding:0 14px}
.xl-card{
  background:var(--card);
  border-radius:var(--r);
  box-shadow:var(--shadow);
  padding:16px;
  margin:14px 0;
}

.xl-hero{display:flex; gap:16px; align-items:stretch}
.xl-hero-left{flex:1}
.xl-hero-right{width:260px; display:flex; align-items:center; justify-content:center}
.xl-hero h1{margin:0 0 6px; font-size:26px}
.xl-hero p{margin:0 0 12px; color:var(--muted); line-height:1.5}

.xl-actions{display:flex; gap:10px; flex-wrap:wrap; margin-top:10px}
.xl-actions-center{justify-content:center}

.xl-btn{
  border:0;
  padding:10px 14px;
  border-radius:14px;
  background:#f2f5ff;
  color:var(--ink);
  font-weight:800;
  cursor:pointer;
}
.xl-btn:hover{filter:brightness(.98)}
.xl-btn-primary{background:linear-gradient(135deg,var(--primary),var(--primary2)); color:#fff}
.xl-btn-ghost{background:transparent; border:1px solid rgba(0,0,0,.12)}
.xl-btn-mini{padding:6px 10px; border-radius:12px; font-weight:900}
.xl-btn-block{width:100%}

.xl-stats{display:flex; gap:10px; margin-top:14px; flex-wrap:wrap}
.xl-stat{flex:1; min-width:160px; padding:12px; border-radius:16px; background:#f7f9ff}
.xl-stat-k{font-size:12px; color:var(--muted); font-weight:800}
.xl-stat-v{font-size:18px; font-weight:1000; margin-top:4px}
.xl-mini-tip{margin-top:10px; font-size:12px; color:#2a4a5c; font-weight:800}

.xl-h2{margin:0 0 10px; font-size:16px}
.xl-ol{margin:0; padding-left:18px; color:var(--muted); line-height:1.7}
.xl-note{margin-top:10px; font-size:12px; color:var(--muted)}

.xl-dragon-bubble{position:relative; width:100%; height:180px; border-radius:18px; background:linear-gradient(135deg,#fff6d8,#e8fbff); box-shadow: inset 0 0 0 1px rgba(0,0,0,.05)}
.xl-badge{position:absolute; top:10px; left:10px; padding:6px 10px; border-radius:999px; background:#fff; font-weight:900; font-size:12px}
.xl-bubble-text{position:absolute; bottom:14px; left:14px; right:14px; font-weight:1000; color:#2a4a5c}

.xl-back{color:var(--ink); text-decoration:none; font-weight:900}
.xl-head-center{flex:1; padding:0 12px; max-width:420px}
.xl-mini-title{font-weight:1000; font-size:14px; margin-bottom:6px}
.xl-progress{height:10px; background:#eef3ff; border-radius:999px; overflow:hidden}
.xl-progress-bar{height:100%; width:0%; background:linear-gradient(90deg,var(--primary2),var(--primary))}
.xl-head-right{display:flex; gap:8px; align-items:center}

.xl-pill{
  padding:7px 10px;
  border-radius:999px;
  background:#f7f9ff;
  border:1px solid rgba(0,0,0,.06);
  font-weight:1000;
  font-size:12px;
}
.xl-timer{background:#fff6d8}

.xl-game .xl-row{margin:10px 0}
.xl-dragon{display:flex; gap:10px; align-items:center; padding:12px; border-radius:18px; background:linear-gradient(135deg,#e8fbff,#fff)}
.xl-dragon-face{
  width:44px; height:44px; border-radius:14px; display:flex; align-items:center; justify-content:center;
  background:#fff; box-shadow: inset 0 0 0 1px rgba(0,0,0,.06);
  font-size:22px;
}
.xl-dragon-text{font-weight:900; color:#2a4a5c}

.xl-zone{
  min-height:74px;
  padding:10px;
  border-radius:18px;
  background:#f7fbff;
  border:2px dashed rgba(74,107,223,.25);
  display:flex;
  gap:10px;
  flex-wrap:wrap;
  align-items:center;
}
.xl-target{background:#fff}
.xl-chip{
  padding:10px 12px;
  border-radius:16px;
  background:#ffffff;
  border:1px solid rgba(0,0,0,.08);
  box-shadow:0 6px 16px rgba(0,0,0,.06);
  font-weight:1000;
  font-size:20px;
  user-select:none;
}
.xl-chip:active{transform:scale(.98)}
.xl-divider{height:1px; background:rgba(0,0,0,.06); margin:14px 0}

.xl-result{background:linear-gradient(135deg,#fff6d8,#e8fbff); border-radius:18px; padding:14px}
.xl-result-title{font-weight:1100; font-size:20px}
.xl-result-stars{font-size:26px; margin:6px 0}
.xl-result-sub{color:var(--muted); font-weight:900}

/* Modal */
.xl-modal{position:fixed; inset:0; z-index:50}
.xl-modal-mask{position:absolute; inset:0; background:rgba(0,0,0,.35)}
.xl-modal-card{
  position:relative;
  width:min(520px, calc(100vw - 28px));
  margin:12vh auto 0;
  background:#fff;
  border-radius:18px;
  box-shadow:0 20px 60px rgba(0,0,0,.22);
  padding:14px;
}
.xl-modal-head{display:flex; justify-content:space-between; align-items:center}
.xl-modal-title{font-weight:1100; font-size:16px}

.xl-tabs{display:flex; gap:8px; margin:10px 0}
.xl-tab{
  flex:1;
  padding:10px 12px;
  border-radius:14px;
  border:1px solid rgba(0,0,0,.10);
  background:#f7f9ff;
  font-weight:1000;
  cursor:pointer;
}
.xl-tab-active{background:linear-gradient(135deg,var(--primary),var(--primary2)); color:#fff; border-color:transparent}

.xl-form{display:flex; flex-direction:column; gap:8px}
.xl-label{font-size:12px; font-weight:1000; color:var(--muted)}
.xl-input{
  padding:12px 12px;
  border-radius:14px;
  border:1px solid rgba(0,0,0,.12);
  font-size:14px;
  font-weight:900;
  outline:none;
}
.xl-input:focus{border-color:rgba(74,107,223,.55); box-shadow:0 0 0 4px rgba(74,107,223,.12)}
.xl-form-hint{font-size:12px; color:var(--muted); font-weight:800; line-height:1.5}

/* Toast */
.xl-toast{
  position:fixed;
  left:50%;
  bottom:18px;
  transform:translateX(-50%);
  background:rgba(29,36,51,.92);
  color:#fff;
  padding:10px 14px;
  border-radius:999px;
  font-weight:1000;
  opacity:0;
  pointer-events:none;
  transition:opacity .2s ease;
}

@media (max-width:760px){
  .xl-hero{flex-direction:column}
  .xl-hero-right{width:auto}
  .xl-chip{font-size:22px}
}
