.oauth-btn{
  display:block; width:100%; padding:14px; margin:0; font-size:15px; font-weight:600;
  text-align:center; text-decoration:none; border-radius:10px; box-sizing:border-box;
  background:#0f1114; border:1px solid var(--card-border); color:var(--text);
  -webkit-tap-highlight-color:transparent;
}
.oauth-btn:active{opacity:.85}

.carousel{position:relative; margin-top:8px}
.carousel-track{
  overflow:hidden; border-radius:16px; background:var(--card); border:1px solid var(--card-border);
}
.slide{
  display:none; box-sizing:border-box; padding:20px 20px 24px; flex-direction:column; gap:10px;
}
.slide.active{display:flex; animation:slide-in .3s ease}
@keyframes slide-in{
  from{opacity:0; transform:translateX(28px)}
  to{opacity:1; transform:translateX(0)}
}
.slide-step{font-size:13px; font-weight:700; letter-spacing:.06em; text-transform:uppercase; color:var(--accent2); margin:0}
.slide-title{font-size:18px; margin:0}
.slide-text{font-size:14px; color:var(--muted); line-height:1.5; margin:0}
.slide-body{flex:1; display:flex; flex-direction:column; align-items:center}
.slide-body img{
  max-width:100%; max-height:56vh; width:auto; height:auto;
  border-radius:10px; display:block; margin:0 auto;
}

/* The dashboard's "how to connect" mini-guide (step → screenshot → text, no title)
   reads better with the text flush against its screenshot instead of the default
   row gap — scope it to that specific carousel rather than changing the shared
   .slide gap used by /setup's longer 4-part slides (step/title/text/body). */
#helpCarousel .slide, #installCarousel .slide{gap:0}
#helpCarousel .slide-step, #installCarousel .slide-step{margin:0 0 10px}

.carousel-arrow{
  position:absolute; top:50%; transform:translateY(-50%); z-index:2;
  width:38px; height:38px; border-radius:50%; border:1px solid var(--card-border);
  background:var(--card); color:var(--text); font-size:20px; line-height:1; cursor:pointer;
  display:flex; align-items:center; justify-content:center; -webkit-tap-highlight-color:transparent;
}
.carousel-arrow:active{opacity:.8}
.carousel-arrow.prev{left:-8px}
.carousel-arrow.next{right:-8px}
.carousel-arrow[disabled]{opacity:.25; pointer-events:none}

.carousel-dots{display:flex; justify-content:center; gap:6px; margin-top:12px}
.carousel-dots .dot{width:7px; height:7px; border-radius:50%; background:var(--card-border); cursor:pointer}
.carousel-dots .dot.active{background:var(--accent2)}

@media (min-width: 480px){
  .carousel-arrow.prev{left:-19px}
  .carousel-arrow.next{right:-19px}
}

/* Desktop: plenty of width to just show every step side by side — swiping through
   a single narrow card in a mostly-empty wide page feels broken, not "premium".
   Rows (step/title/text/screenshot) are equalized across slides by JS
   (equalizeCarouselRows() in setup.js/dashboard.js) rather than CSS subgrid —
   subgrid isn't supported in every browser, and hardcoding a row count here
   previously broke pages whose slides have a different number of children. */
@media (min-width: 860px){
  .carousel-arrow, .carousel-dots{display:none}
  .carousel-track{
    display:flex; flex-direction:row; flex-wrap:wrap; align-items:stretch; gap:14px;
    background:none; border:none;
  }
  .slide{
    display:flex !important; animation:none !important; flex:1 1 230px; min-width:200px;
    background:var(--card); border:1px solid var(--card-border); border-radius:16px;
  }
  /* align-items:stretch on the track makes every card match the tallest one — if
     slide-body keeps growing (flex:1) it soaks up that slack unevenly per card
     (shorter text = more slack = image pushed further from the text below it).
     JS (equalizeCarouselRows) already reserves the right min-height per row, so
     rows shouldn't also grow to fill leftover card height — any true leftover
     just becomes blank space at the bottom of a shorter card, which is fine. */
  .slide-body{flex:none}
  #helpCarousel .slide-body img{height:280px; width:auto; object-fit:contain; object-position:top}
}
