:root {
  color-scheme: light;
  --ink:#302738; --muted:#6c6077; --line:#e0d5eb; --purple:#642b87; --violet:#7b439d;
  /* The image area fills whatever height the embedding frame has. */
  --stage-h:max(240px, calc(100vh - 290px));
}
* { box-sizing:border-box; }
html, body { margin:0; background:transparent; color:var(--ink); font-family:"DM Sans",system-ui,sans-serif; }
.shell { width:min(100% - 16px, 1080px); margin:0 auto; padding:8px 0 12px; }

.heading { text-align:center; margin:2px 0 12px; }
.eyebrow { display:inline-flex; align-items:center; gap:8px; color:var(--purple); letter-spacing:.2em; font-size:.68rem; font-weight:700; }
.eyebrow::before { content:""; width:22px; height:1px; background:currentColor; }
h1 { margin:6px 0 0; color:var(--purple); font-size:clamp(1.35rem,3.6vw,2rem); line-height:1.1; letter-spacing:-.03em; font-weight:700; }
h1 em { font-style:normal; font-weight:400; }

.carousel { border:1px solid var(--line); border-radius:22px; background:linear-gradient(180deg,#f8f4fc,#ece1f5); box-shadow:0 12px 32px rgba(64,36,83,.10); overflow:hidden; outline:none; }
.carousel:focus-visible { box-shadow:0 0 0 3px #ba92d3, 0 12px 32px rgba(64,36,83,.10); }

.top-controls { display:flex; align-items:center; justify-content:space-between; gap:14px; padding:11px 16px; border-bottom:1px solid var(--line); background:rgba(255,255,255,.6); }
.tabs { display:flex; gap:8px; min-width:0; overflow-x:auto; scrollbar-width:none; }
.tabs::-webkit-scrollbar { display:none; }
.tab { flex:0 0 auto; border:1px solid var(--line); background:#fff; color:var(--muted); border-radius:999px; padding:7px 13px; font:600 .78rem "DM Sans",sans-serif; cursor:pointer; white-space:nowrap; transition:.18s ease; }
.tab .n { margin-left:6px; opacity:.6; font-weight:500; }
.tab:hover { border-color:#a479c0; color:var(--purple); }
.tab.active { background:linear-gradient(135deg,#7b439d,#642b87); border-color:transparent; color:#fff; box-shadow:0 3px 10px rgba(100,43,135,.28); }
.nav { display:flex; align-items:center; gap:9px; flex:0 0 auto; }
.counter { display:flex; align-items:baseline; gap:6px; margin-right:4px; color:#71617d; font-variant-numeric:tabular-nums; }
.counter strong { color:var(--purple); font-size:1.02rem; }
.counter span:last-child { font-size:.8rem; }
.nav-button { width:38px; height:38px; border-radius:50%; border:1px solid var(--line); background:#fff; color:var(--purple); font-size:1.1rem; cursor:pointer; transition:.18s ease; }
.nav-button:hover { background:#eee2f6; border-color:#a479c0; transform:translateY(-1px); }

.viewport { overflow:hidden; touch-action:pan-y; }
.track { display:flex; align-items:flex-start; transition:transform .45s cubic-bezier(.22,.72,.18,1); }
.slide { min-width:100%; padding:14px 16px 16px; }
.slide-head { display:flex; align-items:center; gap:10px; margin-bottom:10px; }
.cat-chip { border-radius:999px; padding:4px 10px; background:#eee2f6; color:var(--purple); font-size:.66rem; font-weight:700; letter-spacing:.08em; text-transform:uppercase; white-space:nowrap; }
.slide-title { min-width:0; font-size:1rem; font-weight:700; overflow:hidden; text-overflow:ellipsis; white-space:nowrap; }
.link-btn { margin-left:auto; flex:0 0 auto; border:0; padding:0; background:none; color:var(--violet); font:600 .74rem "DM Sans",sans-serif; cursor:pointer; }
.link-btn:hover { color:var(--purple); text-decoration:underline; }

.stage { position:relative; display:flex; align-items:center; justify-content:center; height:var(--stage-h); margin:0; padding:8px; border:1px solid var(--line); border-radius:16px; background:#fff; box-shadow:0 3px 10px rgba(65,38,81,.07); overflow:hidden; cursor:zoom-in; }
.stage img { display:block; max-width:100%; max-height:100%; object-fit:contain; border-radius:8px; opacity:0; transition:opacity .3s ease; }
.stage.loaded img { opacity:1; }
.stage:not(.loaded):not(.img-error)::before { content:""; position:absolute; inset:8px; border-radius:10px; background:linear-gradient(100deg,#f1eaf8 30%,#fbf8fe 50%,#f1eaf8 70%); background-size:200% 100%; animation:shimmer 1.4s linear infinite; }
.stage.img-error { cursor:default; }
.stage.img-error::after { content:"Image could not be loaded"; color:var(--muted); font-size:.85rem; }
@keyframes shimmer { to { background-position:-200% 0; } }

.footer-controls { display:flex; align-items:center; justify-content:space-between; padding:12px 18px 14px; border-top:1px solid var(--line); background:rgba(255,255,255,.6); }
.dots { display:flex; flex-wrap:wrap; gap:8px; }
.dot { width:7px; height:7px; padding:0; border:0; border-radius:50%; background:#c2abcd; cursor:pointer; transition:.25s ease; }
.dot.active { width:24px; border-radius:5px; background:#7b439d; }
.swipe-hint { color:#71617d; font-size:.7rem; text-transform:uppercase; letter-spacing:.12em; }
.note { margin:10px 4px 0; text-align:center; color:var(--muted); font-size:.72rem; }

.lightbox { position:fixed; inset:0; z-index:50; display:flex; align-items:flex-start; justify-content:center; padding:22px; overflow:auto; background:rgba(34,18,48,.86); cursor:zoom-out; }
.lightbox[hidden] { display:none; }
.lightbox img { display:block; max-width:min(100%,1800px); height:auto; border-radius:8px; background:#fff; }
.lightbox-close { position:fixed; top:12px; right:14px; width:38px; height:38px; border:0; border-radius:50%; background:#fff; color:var(--purple); font-size:1.4rem; line-height:1; cursor:pointer; box-shadow:0 4px 14px rgba(0,0,0,.3); }

@media (max-width:760px) {
  :root { --stage-h:max(200px, calc(100vh - 300px)); }
  .slide { padding:12px 10px 12px; }
  .top-controls { flex-wrap:wrap; padding:10px 12px; }
  .tabs { order:2; flex:1 0 100%; }
  .nav { margin-left:auto; }
  .swipe-hint { display:none; }
}
@media (prefers-reduced-motion:reduce) {
  .track, .stage img, .tab, .dot { transition:none; }
  .stage:not(.loaded)::before { animation:none; }
}
