

.btn{
  display:inline-flex;
  align-items:center;
  justify-content:center;
  gap:8px;
  min-height:38px;
  padding:0 18px;
  border-radius:var(--r-pill);
  font-weight:700;
  font-size:14px;
  color:var(--text);
  background:var(--surface-2);
  border:1px solid var(--border);
  transition:background var(--t-fast) var(--ease),color var(--t-fast) var(--ease),
             border-color var(--t-fast) var(--ease),transform var(--t-fast) var(--ease),
             box-shadow var(--t-fast) var(--ease);
}
.btn:hover{background:color-mix(in srgb,var(--surface-2) 70%,var(--text) 6%);border-color:var(--dim)}
.btn:active{transform:scale(.97)}
.btn:disabled{opacity:.5;cursor:not-allowed;transform:none}
.btn svg{width:16px;height:16px;flex:0 0 16px}

.btn-cta{
  background:var(--cta);
  border-color:transparent;
  color:var(--cta-contrast);
  box-shadow:0 4px 14px color-mix(in srgb,var(--cta) 40%,transparent);
}
.btn-cta:hover{
  background:color-mix(in srgb,var(--cta) 88%,var(--text));
  border-color:transparent;
  box-shadow:0 6px 20px color-mix(in srgb,var(--cta) 52%,transparent);
  transform:translateY(-1px);
}
.btn-cta:active{transform:scale(.97)}

.btn-ghost{
  background:transparent;
  border-color:transparent;
  color:var(--dim);
}
.btn-ghost:hover{background:var(--surface-2);color:var(--text);border-color:transparent}

.btn-accent{
  background:var(--accent);
  border-color:transparent;
  color:var(--accent-contrast);
}
.btn-accent:hover{background:var(--accent-hover);border-color:transparent}

.icon-btn{
  position:relative;
  display:inline-flex;
  align-items:center;
  justify-content:center;
  width:38px;
  height:38px;
  flex:0 0 38px;
  border-radius:50%;
  color:var(--dim);
  transition:background var(--t-fast) var(--ease),color var(--t-fast) var(--ease),transform var(--t-fast) var(--ease);
}
.icon-btn:hover{background:var(--surface-2);color:var(--text)}
.icon-btn:active{transform:scale(.94)}
.icon-btn.active{color:var(--accent);background:var(--accent-soft)}
.icon-btn svg{width:20px;height:20px}

.count-badge{
  position:absolute;
  top:-2px;
  right:-4px;
  min-width:17px;
  height:17px;
  padding:0 5px;
  display:inline-flex;
  align-items:center;
  justify-content:center;
  border-radius:var(--r-pill);
  background:var(--danger);
  color:var(--accent-contrast);
  font-size:10.5px;
  font-weight:800;
  line-height:1;
  border:2px solid var(--bg);
  pointer-events:none;
}

.pill{
  display:inline-flex;
  align-items:center;
  gap:7px;
  height:34px;
  padding:0 16px;
  border-radius:var(--r-pill);
  background:var(--surface);
  border:1px solid var(--border);
  color:var(--dim);
  font-size:13.5px;
  font-weight:700;
  white-space:nowrap;
  transition:background var(--t-fast) var(--ease),color var(--t-fast) var(--ease),
             border-color var(--t-fast) var(--ease),transform var(--t-fast) var(--ease);
}
.pill:hover{color:var(--text);border-color:var(--dim);transform:translateY(-1px)}
.pill.active{
  background:var(--accent);
  border-color:transparent;
  color:var(--accent-contrast);
  box-shadow:0 3px 12px var(--accent-soft);
}
.pill svg{width:15px;height:15px}

.switch{
  appearance:none;
  -webkit-appearance:none;
  position:relative;
  width:40px;
  height:22px;
  flex:0 0 40px;
  border-radius:var(--r-pill);
  background:var(--surface-2);
  border:1px solid var(--border);
  cursor:pointer;
  transition:background var(--t-fast) var(--ease),border-color var(--t-fast) var(--ease);
}
.switch::after{
  content:"";
  position:absolute;
  top:2px;
  left:2px;
  width:16px;
  height:16px;
  border-radius:50%;
  background:var(--dim);
  transition:transform var(--t-fast) var(--ease),background var(--t-fast) var(--ease);
}
.switch:checked{background:var(--accent);border-color:transparent}
.switch:checked::after{transform:translateX(18px);background:var(--accent-contrast)}
.switch:focus-visible{outline:2px solid var(--accent);outline-offset:2px}

.switch-row{
  display:flex;
  align-items:center;
  justify-content:space-between;
  gap:14px;
  padding:8px 10px;
  border-radius:var(--r-md);
  font-size:13.5px;
  font-weight:600;
  cursor:pointer;
  transition:background var(--t-fast) var(--ease);
}
.switch-row:hover{background:var(--surface-2)}
.switch-row select{max-width:130px}

.ad-slot{
  position:relative;
  display:flex;
  flex-direction:column;
  align-items:center;
  justify-content:center;
  gap:4px;
  width:100%;
  min-height:110px;
  border:2px dashed var(--border);
  border-radius:var(--r-md);
  background:color-mix(in srgb,var(--surface) 55%,transparent);
  color:var(--dim);
  overflow:hidden;
}
.ad-slot[data-size="300x250"]{min-height:250px;max-width:300px;margin:0 auto}
.ad-slot[data-size="728x90"]{min-height:110px;max-width:728px;margin:0 auto}
.ad-slot[hidden]{display:none}

.ad-slot .ad-inner{
  display:flex;
  flex-direction:column;
  align-items:center;
  gap:4px;
  padding:10px;
}

.ad-slot .ad-tag{
  position:absolute;
  top:6px;
  left:6px;
  padding:2px 7px;
  font-size:9.5px;
  font-weight:800;
  letter-spacing:.1em;
  border-radius:var(--r-sm);
  background:var(--surface-2);
  border:1px solid var(--border);
  color:var(--dim);
}
.ad-slot .ad-info{
  display:flex;
  flex-direction:column;
  align-items:center;
  gap:2px;
  text-align:center;
}
.ad-slot .ad-provider{
  font-size:12px;
  font-weight:700;
  letter-spacing:.04em;
  text-transform:uppercase;
  color:var(--accent);
}
.ad-slot .ad-slot-label{font-size:11px;opacity:.75}

.breadcrumb{
  display:flex;
  align-items:center;
  gap:6px;
  font-size:13px;
  font-weight:600;
  color:var(--dim);
  white-space:nowrap;
  overflow:hidden;
}
.breadcrumb a{color:var(--dim);transition:color var(--t-fast) var(--ease)}
.breadcrumb a:hover{color:var(--accent)}
.breadcrumb .sep{opacity:.5}

.breadcrumb [aria-current],
.breadcrumb .current{color:var(--text)}

.progress{
  height:5px;
  border-radius:var(--r-pill);
  background:var(--surface-2);
  overflow:hidden;
}
.progress > div{
  height:100%;
  width:0;
  border-radius:inherit;
  background:var(--accent);
  transition:width var(--t-fast) linear;
}
#upnext-bar{background:var(--cta)}

.star-burst{
  position:absolute;
  inset:0;
  z-index:5;
  pointer-events:none;
}
.burst-particle{
  position:absolute;
  top:50%;
  left:50%;
  width:6px;
  height:6px;
  margin:-3px 0 0 -3px;
  border-radius:50%;
  background:var(--accent);
  animation:burst .7s var(--ease) forwards;
}
.burst-particle:nth-child(3n){background:var(--info)}
.burst-particle:nth-child(4n){background:var(--success)}
.burst-particle:nth-child(5n){background:var(--cta)}

#empty-state{
  display:flex;
  flex-direction:column;
  align-items:center;
  justify-content:center;
  gap:12px;
  padding:56px 20px;
  text-align:center;
  color:var(--dim);
}

#empty-state .empty-mascot{width:120px;height:120px;opacity:.85;border-radius:var(--r-xl)}
#empty-state .empty-msg{font-size:13.5px;max-width:340px}

.skeleton-card{
  border-radius:var(--r-lg);
  aspect-ratio:16/11;
  background:linear-gradient(100deg,var(--surface) 40%,var(--surface-2) 50%,var(--surface) 60%);
  background-size:200% 100%;
  animation:shimmer 1.4s linear infinite;
  border:1px solid var(--border);
}

.sticky{position:sticky}

.divider{height:1px;background:var(--border);border:none;margin:10px 0}
.chip{
  display:inline-flex;
  align-items:center;
  gap:6px;
  padding:4px 10px;
  border-radius:var(--r-pill);
  background:var(--surface-2);
  border:1px solid var(--border);
  font-size:12px;
  font-weight:600;
  color:var(--dim);
}
noscript{
  display:block;
  padding:14px 20px;
  margin:20px auto;
  max-width:520px;
  text-align:center;
  background:var(--surface);
  border:1px solid var(--danger);
  border-radius:var(--r-md);
  color:var(--danger);
  font-weight:700;
}

