:root{
  --bg: #99cccc;
  --card: #161a36;
  --ink: #eef3ff;
  --muted: #a9b3d6;
  --brand: #88f3f1;
  --accent: #ffd166;
  --bar: linear-gradient(90deg,#7bf5e3,#86a3ff);
  --shadow: 0 10px 30px rgba(0,0,0,.35);
  --radius: 14px;
  --radius-sm: 10px;
}

*{box-sizing:border-box}
html,body{height:100%}
body{
  margin:0;
  font:16px/1.5 system-ui, -apple-system, Segoe UI, Roboto, "Helvetica Neue", Arial, "Noto Sans";
  color:var(--ink);
  background:
    radial-gradient(1200px 600px at 20% -10%, #99cccc 20%, rgba(30,35,80,0) 70%),
    radial-gradient(1000px 700px at 120% 20%, #2a1d5a 0%, rgba(42,29,90,0) 70%),
    var(--bg);
}

.site-header, .site-footer{
  display:flex; align-items:center; justify-content:space-between;
  gap:1rem; padding:12px 18px; position:sticky; z-index:5;
}
.site-header{top:0; background:linear-gradient(180deg,rgba(15,18,38,.9),rgba(15,18,38,.6))}
.site-footer{bottom:0; background:linear-gradient(0deg,rgba(15,18,38,.9),rgba(15,18,38,.0))}

.brand{display:flex; align-items:center; gap:.8rem}
.brand-title{font-size:18px; margin:0}
.brand-mark{
  display:inline-grid; place-items:center;
  width:28px; height:28px; border-radius:50%;
  border:1px solid rgba(255,255,255,.2);
  color:var(--brand); font-weight:700; font-size:12px;
}

.hdr-actions{display:flex; align-items:center; gap:.6rem}
.nav-btn{
  appearance:none; border:none; outline:none; cursor:pointer;
  width:44px; height:44px; border-radius:999px;
  background:#121534; color:var(--ink);
  box-shadow: var(--shadow);
  font-size:22px; line-height:44px;
}
.nav-btn:active{transform:translateY(1px)}
.nav-btn:disabled{opacity:.4; cursor:not-allowed}
.counter{min-width:70px; text-align:center; color:var(--muted)}

.deck{ max-width:1100px; margin:10px auto; padding:16px; min-height:60vh; }

.loading{
  display:flex; align-items:center; gap:10px; color:var(--muted);
  background:rgba(255,255,255,.03); border:1px solid rgba(255,255,255,.06);
  border-radius:var(--radius); padding:12px;
}
.spinner{
  width:16px; height:16px; border-radius:50%;
  border:2px solid rgba(255,255,255,.25);
  border-top-color: var(--brand);
  animation:spin 1s linear infinite;
}
@keyframes spin{to{transform:rotate(360deg)}}

.slide{
  display:none;
  background:linear-gradient(180deg, rgba(255,255,255,.03), rgba(255,255,255,.00)),
             var(--card);
  border:1px solid rgba(255,255,255,.06);
  border-radius:var(--radius);
  padding:16px;
  box-shadow: var(--shadow);
  min-height:58vh;
}
.slide.active{display:block; animation:fadeIn .25s ease-out}
@keyframes fadeIn{from{opacity:0; transform:translateY(6px)} to{opacity:1; transform:none}}

.slide figure{margin:0}
.slide .frame{
  position:relative;
  background:#0c0f24;
  border-radius:12px;
  overflow:hidden;
  border:1px solid rgba(255,255,255,.06);
  min-height:50vh;
  display:flex; align-items:center; justify-content:center;
}
.slide img{
  width:100%; height:auto; display:block;
  max-height:82vh; object-fit:contain; background:#0c0f24;
}
.slide .caption{
  position:absolute; right:10px; bottom:10px;
  background:rgba(0,0,0,.45); color:#000; font-size:12px;
  padding:4px 8px; border-radius:999px;
  border:1px solid rgba(255,255,255,.15);
}

/* Placeholder styling */
.ph{
  --stripe: rgba(255,255,255,.06);
  --bg: rgba(123,245,227,.06);
  position:relative;
  width:100%;
  min-height:40vh;
  display:flex; flex-direction:column; align-items:center; justify-content:center;
  text-align:center; padding:22px;
  color:#dbe7ff;
  background:
    repeating-linear-gradient(
      -45deg,
      var(--stripe) 0px,
      var(--stripe) 10px,
      transparent 10px,
      transparent 20px
    ),
    var(--bg);
  border:1px dashed rgba(255,255,255,.25);
  border-radius:10px;
}
.ph h3{ margin:8px 0 6px; color:#fff; }
.ph p{ margin:4px 0; color:var(--muted); }
.ph .small{ font-size:12px; opacity:.9; }
.ph .ph-icon{
  font-size:32px; line-height:1; margin-bottom:8px;
  filter:drop-shadow(0 2px 4px rgba(0,0,0,.25));
}

.progress{
  width:100%; height:6px; background:rgba(255,255,255,.07);
  border-radius:999px; overflow:hidden;
  box-shadow: inset 0 0 0 1px rgba(255,255,255,.06);
}
.progress-bar{
  height:100%; width:0%;
  background:linear-gradient(90deg,#7bf5e3,#86a3ff 60%, #ffd166 100%);
  transition:width .2s ease;
}
.tips{color:var(--muted); font-size:12px; padding:6px 10px}

/* No-JS notice */
.noscript-warn{
  display:block; margin-top:10px; color:#fff; background:#b00020;
  padding:8px 12px; border-radius:8px;
}