:root{
  --bg:#fff;
  --card:#f8f8f8;
  --accent:#1e293b;
  --gap:12px;
  --item-w:110px;
}
*{box-sizing:border-box}
html,body{height:100%;margin:0;background:var(--bg);font-family:system-ui,-apple-system,Segoe UI,Roboto,"Helvetica Neue",Arial}
.carousel-wrap{
  width:100%;
  max-width:980px;
  margin:18px auto;
  display:flex;
  align-items:center;
  gap:10px;
  padding:8px;
}
.nav{
  width:44px;height:44px;border-radius:8px;border:none;background:var(--accent);color:#fff;font-weight:700;
  display:flex;align-items:center;justify-content:center;font-size:20px;
  box-shadow:0 2px 6px rgba(0,0,0,.12);
}
.nav:active{transform:translateY(1px)}
.carousel{
  display:flex;
  gap:var(--gap);
  overflow-x:auto;
  scroll-behavior:smooth;
  -webkit-overflow-scrolling:touch;
  padding:8px;
  background:transparent;
  flex:1;

  /* slide / snap behavior */
  scroll-snap-type: x mandatory;
  -webkit-overflow-scrolling: touch;
}
.carousel::-webkit-scrollbar{display:none}

/* Item card */
.card{
  width:var(--item-w);
  min-width:var(--item-w);
  background:var(--card);
  border-radius:10px;
  padding:10px;
  display:flex;
  flex-direction:column;
  gap:8px;
  align-items:center;
  text-align:center;
  text-decoration:none;
  color:var(--accent);
  box-shadow:0 1px 3px rgba(0,0,0,.08);
  transition:transform .12s, box-shadow .12s;

  /* align each card as a slide */
  scroll-snap-align: center;
}
.card:active{transform:translateY(2px)}
.card:hover{box-shadow:0 6px 18px rgba(0,0,0,.12);transform:translateY(-4px)}
.card img{
  width:48px;
  height:48px;
  min-height:48px;
  object-fit:cover;
  background:transparent;
  border:1px dashed rgba(0,0,0,0.08);
  border-radius:6px;
  opacity:0.7;
}
/* visual hint for empty placeholders (no actual src) */
.card img.placeholder{
  background:linear-gradient(90deg, rgba(0,0,0,0.02), rgba(0,0,0,0.00));
  display:block;
}
.card .label{
  font-size:13px;
  line-height:1.1;
  max-height:34px;
  overflow:hidden;
  padding:0 2px;
}

/* Responsive */
@media (max-width:600px){
  :root{--item-w:86px}
  .nav{width:40px;height:40px}
  .carousel-wrap{padding:6px;margin:10px}
}