/* =========================
   PLEIRAUM — app.css (Premium polish)
   ========================= */

@font-face{
  font-family: "Manrope";
  font-style: normal;
  font-weight: 400;
  font-display: swap;
  src: url("../fonts/manrope/manrope-400.ttf") format("truetype");
}
@font-face{
  font-family: "Manrope";
  font-style: normal;
  font-weight: 500;
  font-display: swap;
  src: url("../fonts/manrope/manrope-500.ttf") format("truetype");
}
@font-face{
  font-family: "Manrope";
  font-style: normal;
  font-weight: 600;
  font-display: swap;
  src: url("../fonts/manrope/manrope-600.ttf") format("truetype");
}
@font-face{
  font-family: "Manrope";
  font-style: normal;
  font-weight: 700;
  font-display: swap;
  src: url("../fonts/manrope/manrope-700.ttf") format("truetype");
}
@font-face{
  font-family: "Manrope";
  font-style: normal;
  font-weight: 800;
  font-display: swap;
  src: url("../fonts/manrope/manrope-800.ttf") format("truetype");
}

/* ---------- Tokens ---------- */
:root{
  --bg:#0b0b10;
  --card:#141422;
  --text:#f2f3ff;
  --muted:rgba(242,243,255,.65);
  --line:rgba(255,255,255,.08);
  --shadow:0 20px 80px rgba(0,0,0,.45);
  --r:18px;

  /* Player sizing */
  --player-gap: 12px;
  --player-h: 88px;
  --player-extra: 28px;

  /* Spacing scale */
  --s-2: 4px;
  --s-1: 8px;
  --s0: 12px;
  --s1: 16px;
  --s2: 20px;
  --s3: 28px;
  --s4: 36px;
  --s5: 48px;

  /* Content width */
  --maxw: 1200px;
  --maxwxxl: 1800px;

  /* Radii */
  --r-sm: 12px;
  --r-md: 16px;
  --r-lg: 18px;
}

/* ---------- Base / Layout ---------- */
html, body{
  height: 100%;
  overscroll-behavior: none;
}

*{
  -webkit-tap-highlight-color: transparent;
  box-sizing: border-box;
}

body{
  min-height: 100svh;
  margin: 0;
  color: var(--text);
  background:
    radial-gradient(1200px 600px at 35% 20%, rgba(90,100,255,.22), transparent 60%),
    radial-gradient(900px 500px at 70% 30%, rgba(255,120,0,.18), transparent 60%),
    var(--bg);
  font-family: Manrope, ui-sans-serif, system-ui, -apple-system, Segoe UI, Roboto, Helvetica, Arial;

  display: flex;
  flex-direction: column;

  /* Premium text rendering */
  text-rendering: geometricPrecision;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}
body.app {
      overflow: hidden; /* scroll is NOT on body */
}

a{ color: inherit; }

#app{
  height: 100svh;
  overflow-y: auto;
  -webkit-overflow-scrolling: touch;
  padding-bottom: calc(var(--player-h) + 32px); /* space for player */
}

/* ---------- Topbar (Sticky) ---------- */
.topbar{
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: var(--s1) var(--s2);

  background: linear-gradient(to bottom, rgba(10,10,16,.92), rgba(10,10,16,.55));
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);

  border-bottom: 1px solid rgba(255,255,255,.07);

  position: sticky;
  top: 0;
  z-index: 10000;
  height: 69px;
}

.topbar-left,
.topbar-right{
  display: flex;
  gap: var(--s1);
  align-items: center;
}

.topbar-center {
    position: absolute;
    left: 50%;
    transform: translateX(-50%);
}

.topbar-center .brand{
  font-weight: 850;
  letter-spacing: .09em;
  opacity: .92;
}

.topbar-center .brand a{
  font-size: 14px;
  font-weight: 850;
  letter-spacing: .09em;
  text-transform: uppercase;
}

.iconbtn{
  width: 36px;
  height: 36px;
  border-radius: 12px;

  border: 1px solid rgba(255,255,255,.10);
  background: rgba(255,255,255,.06);
  color: var(--text);

  cursor: pointer;
  display: grid;
  place-items: center;

  transition: transform .12s ease, background .12s ease, border-color .12s ease, filter .12s ease;
}
.iconbtn.is-disabled,
.iconbtn:disabled{
  opacity:.35;
  cursor:not-allowed;
  pointer-events:none;
}

@media (hover:hover) and (pointer:fine){
  .iconbtn:hover{
    transform: translateY(-1px);
    background: rgba(255,255,255,.10);
    border-color: rgba(255,255,255,.16);
    filter: brightness(1.02);
  }
}

.topbar-action{
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 38px;
  padding: 0 16px;
  border-radius: 999px;
  border: 1px solid rgba(255,255,255,.14);
  background:
    linear-gradient(135deg, rgba(255,255,255,.18), rgba(255,255,255,.08)),
    rgba(255,255,255,.08);
  color: var(--text);
  text-decoration: none;
  font-weight: 600;
  letter-spacing: .01em;
  box-shadow: 0 14px 28px rgba(0,0,0,.2);
  cursor: pointer;
  transition: transform .16s ease, background .16s ease, border-color .16s ease;
}

.topbar-action:hover{
  transform: translateY(-1px);
  background:
    linear-gradient(135deg, rgba(255,255,255,.24), rgba(255,255,255,.12)),
    rgba(255,255,255,.12);
  border-color: rgba(255,255,255,.2);
}

.topbar-action--trial{
  background: linear-gradient(135deg, rgba(167, 76, 255, .98), rgba(255, 34, 140, .98));
  border-color: rgba(255, 34, 140, .34);
  color: rgba(255,255,255,.98);
  box-shadow:
    0 14px 30px rgba(255, 34, 140, .18),
    0 0 28px rgba(167, 76, 255, .10);
}

.topbar-action--trial:hover{
  background: linear-gradient(135deg, rgba(176, 90, 255, 1), rgba(255, 54, 153, 1));
  border-color: rgba(255, 34, 140, .44);
}

/* ---------- Page ---------- */
.page{
  padding: var(--s4) var(--s3) var(--s5);
  max-width: var(--maxw);
  margin: 0 auto;
}

@media (min-width: 1600px) {
    .page{
      padding: var(--s4) var(--s3) var(--s5);
      max-width: var(--maxwxxl);
      margin: 0 auto;
    }
}

.page-title{
  margin: var(--s4) 0 10px;
  font-family: Manrope, ui-sans-serif, system-ui, -apple-system, Segoe UI, Roboto, Helvetica, Arial;
  font-size: clamp(36px, 2.92vw, 52px);
  line-height: 1.06;
  letter-spacing: -.028em;
  font-weight: 600;
  color: rgba(255,255,255,.94);
  text-shadow: 0 14px 34px rgba(0,0,0,.28);
}

.app-discovery-page .page-title{
  margin: 22px 0 22px;
  font-size: clamp(30px, 2.4vw, 42px);
}

.app-discovery-page .cards-grid{
  margin-top: 0;
}

.page-subtitle{
  margin: 0;
  font-family: Manrope, ui-sans-serif, system-ui, -apple-system, Segoe UI, Roboto, Helvetica, Arial;
  font-size: clamp(17px, 1.28vw, 22px);
  line-height: 1.38;
  letter-spacing: -.018em;
  font-weight: 500;
  color: rgba(255,255,255,.68);
}

/* ---------- Muted helper ---------- */
.muted{
  color: var(--muted);
}

/* =========================
   Category cards
========================= */
.cards-grid{
  display: grid;
  grid-template-columns: repeat(5, minmax(0,1fr));
  gap: 20px;
  margin-top: 34px;
}

@media (max-width: 1599px){
  .cards-grid{
    grid-template-columns: repeat(4, minmax(0,1fr));
    gap: 20px;
  }
}
@media (max-width: 1050px){
  .cards-grid{
    grid-template-columns: repeat(3, minmax(0,1fr));
  }
}
@media (max-width: 700px){
  .cards-grid{
    grid-template-columns: repeat(2, minmax(0,1fr));
    gap: 14px;
  }
}

.cat-card{
  --cat-accent: #aeb4bf;
  --cat-wash: #20242b;
  --cat-depth: #090a0d;
  --cat-photo: none;
  --cat-photo-position: right center;
  --cat-photo-size: auto 100%;
  --cat-photo-scale: 1.015;
  --cat-photo-brightness: 0.9;
  --cat-photo-contrast: 0.99;
  --cat-photo-saturation: 1.01;
  --cat-grade-strength: 10%;

  position: relative;
  min-height: 198px;
  border-radius: 16px;
  border: 1px solid rgba(255,255,255,.08);
  background:
    radial-gradient(130% 115% at 72% 0%, rgba(255,255,255,.1), transparent 45%),
    linear-gradient(145deg, var(--cat-wash), var(--cat-depth) 82%);
  background:
    radial-gradient(110% 100% at 75% -8%, color-mix(in srgb, var(--cat-accent) 22%, transparent), transparent 48%),
    radial-gradient(90% 80% at 8% 18%, color-mix(in srgb, var(--cat-accent) 7%, transparent), transparent 58%),
    linear-gradient(145deg, color-mix(in srgb, var(--cat-wash) 84%, #11131a), var(--cat-depth) 82%);

  text-decoration: none;
  color: #fff;
  overflow: hidden;

  display: grid;
  place-items: center;
  padding: 28px 22px 24px;
  isolation: isolate;
  cursor: pointer;

  box-shadow:
    0 22px 54px rgba(0,0,0,.3),
    inset 0 1px 0 rgba(255,255,255,.06),
    inset 0 -70px 100px rgba(0,0,0,.3);
  transition:
    transform .22s ease,
    border-color .22s ease,
    box-shadow .22s ease,
    filter .22s ease;
}

.cat-card--cafe,
.cat-card--cafe-and-bakery{
  --cat-photo-position: center 52%;
  --cat-photo-size: cover;
  --cat-photo-scale: 1.01;
  --cat-photo-brightness: 0.9;
  --cat-photo-contrast: 0.99;
}

.cat-card--restaurant{
  --cat-photo-brightness: 0.9;
}

.cat-card--street-food{
  --cat-photo-brightness: 0.9;
  --cat-photo-saturation: 1.01;
}

.cat-card--bar-and-lounge{
  --cat-photo-brightness: 0.9;
  --cat-photo-contrast: 0.99;
  --cat-photo-saturation: 1.01;
}

.cat-card--coworking-space{
  --cat-photo-brightness: 0.9;
  --cat-photo-saturation: 1.01;
}

.cat-card--hotel{
  --cat-photo-brightness: 0.9;
  --cat-photo-contrast: 0.99;
  --cat-photo-saturation: 1.01;
}

.cat-card--spa-wellness{
  --cat-photo-brightness: 0.9;
  --cat-photo-saturation: 1.01;
}

.cat-card--fitness{
  --cat-photo-position: center 48%;
  --cat-photo-size: cover;
  --cat-photo-scale: 1.01;
  --cat-photo-brightness: 0.9;
}

.cat-card--fashion-lifestyle{
  --cat-photo-brightness: 0.9;
  --cat-photo-saturation: 1.01;
}

.cat-card--barbershop{
  --cat-photo-brightness: 0.9;
  --cat-photo-saturation: 1.01;
}

.cat-card--beauty-salon{
  --cat-photo-brightness: 0.9;
}

.cat-card--electronics-tech{
  --cat-photo-brightness: 0.9;
  --cat-photo-contrast: 0.99;
}

.cat-card--perfumes-cosmetics{
  --cat-photo-brightness: 0.9;
}

.cat-card--home-living{
  --cat-photo-brightness: 0.9;
}

.cat-card--books-gifts{
  --cat-photo-brightness: 0.9;
}

.cat-card::before,
.cat-card::after{
  content: "";
  position: absolute;
  inset: 0;
  pointer-events: none;
}

.cat-card::before{
  z-index: 0;
  transform: scale(var(--cat-photo-scale));
  opacity: 1;
  filter:
    saturate(var(--cat-photo-saturation))
    contrast(var(--cat-photo-contrast))
    brightness(var(--cat-photo-brightness));
  background-image: var(--cat-photo);
  background-position: var(--cat-photo-position);
  background-size: var(--cat-photo-size);
  background-repeat: no-repeat;
  background-color: var(--cat-depth);
}

.cat-card::after{
  z-index: 1;
  background:
    radial-gradient(105% 62% at 50% 54%, rgba(0,0,0,.28) 0%, rgba(0,0,0,.12) 44%, transparent 76%),
    radial-gradient(105% 82% at 80% 6%, color-mix(in srgb, var(--cat-accent) var(--cat-grade-strength), transparent), transparent 58%),
    linear-gradient(180deg, rgba(2,3,6,.14) 0%, transparent 28%, transparent 58%, rgba(2,3,6,.46) 100%),
    radial-gradient(135% 118% at 50% 43%, transparent 46%, rgba(0,0,0,.5) 100%);
}


@media (min-width: 1600px) {
    .cat-card{
        min-height: 238px;
    }
}

.cat-overlay{
  position:absolute;
  inset:0;
  z-index: 2;
  opacity: .025;
  background-image:
    radial-gradient(circle at 14% 22%, rgba(255,255,255,.7) 0 1px, transparent 1.4px),
    radial-gradient(circle at 74% 66%, rgba(255,255,255,.5) 0 1px, transparent 1.3px);
  background-size: 23px 27px, 31px 35px;
  mix-blend-mode: screen;
}

.cat-overlay::before,
.cat-overlay::after{
  content: none;
}

.cat-content{
  position: absolute;
  inset: 0;
  z-index: 3;
  text-align: center;
}

.cat-icon{
  position: absolute;
  left: 50%;
  top: 40%;
  width: 88px;
  height: 78px;
  display: grid;
  place-items: center;
  color: var(--cat-accent);
  color: color-mix(in srgb, var(--cat-accent) 44%, rgba(255,255,255,.86));
  opacity: .84;
  transform: translate(-50%, -50%);
  transition: color .22s ease, filter .22s ease, transform .22s ease;
}

.cat-icon-glyph{
  width: 68px;
  height: 68px;
  display: block;
  background: currentColor;
  -webkit-mask: var(--cat-icon) center / contain no-repeat;
  mask: var(--cat-icon) center / contain no-repeat;
  filter:
    drop-shadow(0 0 6px color-mix(in srgb, var(--cat-accent) 16%, transparent))
    drop-shadow(0 8px 14px rgba(0,0,0,.22));
}

.cat-title{
  position: absolute;
  left: 50%;
  bottom: 54px;
  z-index: 1;
  width: calc(100% - 44px);
  max-width: calc(100% - 44px);
  font-family: Manrope, ui-sans-serif, system-ui, -apple-system, Segoe UI, Roboto, Helvetica, Arial;
  font-size: clamp(21px, 1.42vw, 24px);
  font-weight: 700;
  line-height: 1.08;
  letter-spacing: .028em;
  text-transform: uppercase;
  overflow-wrap: anywhere;
  transform: translateX(-50%);
  text-shadow: 0 10px 30px rgba(0,0,0,.56);
}

.cat-subtitle{
  position: absolute;
  left: 50%;
  bottom: 28px;
  width: calc(100% - 44px);
  max-width: calc(100% - 44px);
  color: rgba(255,255,255,.62);
  font-family: Manrope, ui-sans-serif, system-ui, -apple-system, Segoe UI, Roboto, Helvetica, Arial;
  font-size: 13px;
  font-weight: 500;
  line-height: 1.45;
  letter-spacing: .012em;
  transform: translateX(-50%);
  text-shadow: 0 8px 22px rgba(0,0,0,.36);
}

@media (hover:hover) and (pointer:fine){
  .cat-card:hover{
    transform: translateY(-4px);
    filter: brightness(1.04) saturate(.98);
    border-color: rgba(255,255,255,.13);
    box-shadow:
      0 30px 70px rgba(0,0,0,.34),
      0 0 34px color-mix(in srgb, var(--cat-accent) 8%, transparent),
      inset 0 1px 0 rgba(255,255,255,.09),
      inset 0 -70px 100px rgba(0,0,0,.24);
  }

  .cat-card:hover .cat-icon{
    transform: translate(-50%, calc(-50% - 1px)) scale(1.02);
    color: color-mix(in srgb, var(--cat-accent) 34%, rgba(255,255,255,.88));
    filter: brightness(1.02);
  }
}

/* Category cards: adaptive layouts for the /app home selector only */
@media (min-width: 1180px) and (max-width: 1439px){
  .cards-grid{
    gap: 22px;
  }

  .cat-card{
    min-height: 186px;
  }

  .cat-icon{
    top: 39%;
  }

  .cat-icon-glyph{
    width: 62px;
    height: 62px;
  }

  .cat-title{
    bottom: 50px;
    font-size: clamp(19px, 1.35vw, 22px);
  }

  .cat-subtitle{
    bottom: 26px;
    font-size: 12.5px;
  }
}

@media (min-width: 721px) and (max-width: 1179px){
  .cards-grid{
    grid-template-columns: repeat(2, minmax(0,1fr));
    gap: 22px;
    margin-top: 30px;
  }

  .cat-card{
    min-height: 210px;
    border-radius: 16px;
  }

  .cat-card::before{
    filter: blur(8px) saturate(.92);
    opacity: .64;
  }

  .cat-icon{
    top: 38%;
  }

  .cat-icon-glyph{
    width: 64px;
    height: 64px;
  }

  .cat-title{
    bottom: 56px;
    font-size: clamp(20px, 2.5vw, 24px);
  }

  .cat-subtitle{
    bottom: 30px;
    font-size: 13px;
  }
}

@media (min-width: 561px) and (max-width: 820px) and (orientation: portrait){
  .cards-grid{
    gap: 20px;
  }

  .cat-card{
    min-height: 196px;
  }

  .cat-icon-glyph{
    width: 58px;
    height: 58px;
  }

  .cat-title{
    bottom: 52px;
    font-size: 20px;
  }

  .cat-subtitle{
    bottom: 28px;
  }
}

@media (max-width: 720px){
  .cards-grid{
    margin-top: 28px;
  }

  .cat-card{
    min-height: 214px;
    border-radius: 16px;
  }

  .cat-card::before{
    transform: scale(1.035);
    opacity: .66;
    filter: blur(7px) saturate(.9);
  }

  .cat-card::after{
    background:
      radial-gradient(115% 80% at 78% 2%, color-mix(in srgb, var(--cat-accent) 14%, transparent), transparent 48%),
      linear-gradient(180deg, rgba(0,0,0,.08) 0%, rgba(0,0,0,.12) 40%, rgba(0,0,0,.62) 100%),
      radial-gradient(125% 110% at 50% 50%, transparent 44%, rgba(0,0,0,.64) 100%);
  }

  .cat-icon{
    top: 38%;
    width: 80px;
    height: 70px;
  }

  .cat-icon-glyph{
    width: 60px;
    height: 60px;
  }

  .cat-title{
    bottom: 55px;
    width: calc(100% - 34px);
    max-width: calc(100% - 34px);
    font-size: clamp(20px, 5.8vw, 24px);
    line-height: 1.08;
  }

  .cat-subtitle{
    display: none;
  }
}

@media (max-width: 560px){
  .cards-grid{
    grid-template-columns: repeat(2, minmax(0,1fr));
    gap: 14px;
  }

  .cat-card{
    min-height: 158px;
    border-radius: 14px;
    padding: 18px 12px;
  }

  .cat-icon{
    top: 39%;
    width: 64px;
    height: 58px;
  }

  .cat-icon-glyph{
    width: 46px;
    height: 46px;
  }

  .cat-title{
    bottom: 28px;
    width: calc(100% - 18px);
    max-width: calc(100% - 18px);
    font-size: clamp(13px, 3.8vw, 16px);
    line-height: 1.12;
    letter-spacing: .024em;
  }
}

@media (max-width: 390px){
  .cards-grid{
    gap: 12px;
  }

  .cat-card{
    min-height: 148px;
  }

  .cat-icon{
    top: 38%;
  }

  .cat-icon-glyph{
    width: 42px;
    height: 42px;
  }

  .cat-title{
    bottom: 28px;
    font-size: clamp(12px, 3.55vw, 14px);
    letter-spacing: .02em;
  }
}

@media (max-height: 520px) and (orientation: landscape){
  .cards-grid{
    grid-template-columns: repeat(2, minmax(0,1fr));
    gap: 16px;
    margin-top: 24px;
  }

  .cat-card{
    min-height: 168px;
  }

  .cat-icon{
    top: 36%;
  }

  .cat-icon-glyph{
    width: 48px;
    height: 48px;
  }

  .cat-title{
    bottom: 45px;
    font-size: 18px;
  }

  .cat-subtitle{
    bottom: 22px;
    font-size: 12px;
  }
}

/* /app business selector: square editorial tiles using CMS category presentation data. */
.app-discovery-page .cards-grid{
  grid-template-columns: repeat(4, minmax(0,1fr));
  gap: 22px;
}

.app-discovery-page .cat-card{
  --cat-photo-position: center;
  --cat-photo-size: cover;
  --cat-photo-scale: 1.01;
  --cat-photo-brightness: 0.9;
  --cat-photo-contrast: 0.99;
  --cat-photo-saturation: 1.01;
  --cat-grade-strength: 6%;
  --cat-haze-color: var(--cat-accent, #514b5f);
  min-height: 0;
  aspect-ratio: 1 / 1;
}

/* Per-category crop and tonal tuning only. Cover and accent values come from the CMS record. */
.app-discovery-page .cat-card--cafe{
  --cat-photo-position: center 52%;
}
.app-discovery-page .cat-card--restaurant{
  --cat-photo-position: center 48%;
}
.app-discovery-page .cat-card--bar-and-lounge{
  --cat-photo-position: center 52%;
  --cat-photo-saturation: 1.01;
}
.app-discovery-page .cat-card--street-food{
  --cat-photo-position: 56% center;
}
.app-discovery-page .cat-card--hotel{
  --cat-photo-position: center 48%;
}
.app-discovery-page .cat-card--coworking-space{
  --cat-photo-position: center 48%;
}
.app-discovery-page .cat-card--spa-wellness{
  --cat-photo-position: center 52%;
}
.app-discovery-page .cat-card--fitness{
  --cat-photo-position: center 48%;
}
.app-discovery-page .cat-card--fashion-lifestyle{
  --cat-photo-position: center 48%;
  --cat-photo-saturation: 1.01;
}
.app-discovery-page .cat-card--barbershop{
  --cat-photo-position: center 48%;
}
.app-discovery-page .cat-card--beauty-salon{
  --cat-photo-position: center 48%;
}
.app-discovery-page .cat-card--supermarket{
  --cat-photo-position: center 48%;
}
.app-discovery-page .cat-card--electronics-tech{
  --cat-photo-position: center 48%;
  --cat-photo-saturation: 1.01;
}
.app-discovery-page .cat-card--perfumes-cosmetics{
  --cat-photo-position: center 48%;
}
.app-discovery-page .cat-card--home-living{
  --cat-photo-position: center 48%;
}
.app-discovery-page .cat-card--books-gifts{
  --cat-photo-position: center 48%;
}

.cat-card--identity::before{
  opacity: 1;
  transform: scale(var(--cat-photo-scale));
  filter:
    saturate(var(--cat-photo-saturation))
    contrast(var(--cat-photo-contrast))
    brightness(var(--cat-photo-brightness));
}

.cat-card--identity::after{
  background:
    radial-gradient(ellipse 66% 58% at 15% 20%, rgba(0,0,0,.18) 0%, rgba(0,0,0,.08) 48%, transparent 76%),
    radial-gradient(ellipse 90% 78% at 0% 0%,
      color-mix(in srgb, var(--cat-haze-color) 96%, transparent) 0%,
      color-mix(in srgb, var(--cat-haze-color) 82%, transparent) 31%,
      color-mix(in srgb, var(--cat-haze-color) 42%, transparent) 54%,
      color-mix(in srgb, var(--cat-haze-color) 14%, transparent) 66%,
      transparent 77%);
}

.cat-card--identity .cat-content{
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  justify-content: flex-start;
  gap: 0;
  padding: 15% 10.5%;
  transform: none;
}

.cat-card--identity .cat-icon{
  position: relative;
  left: auto;
  top: auto;
  flex: 0 0 auto;
  width: clamp(46px, 3.4vw, 64px);
  height: clamp(46px, 3.4vw, 64px);
  transform: none;
}

.cat-card--identity .cat-icon-glyph{
  width: 100%;
  height: 100%;
}

.cat-card--identity .cat-title,
.cat-card--identity .cat-subtitle{
  position: static;
  width: 100%;
  max-width: 100%;
  transform: none;
  text-align: left;
}

.cat-card--identity .cat-title{
  margin-top: 10px;
  font-size: clamp(15px, 1.15vw, 20px);
}

.cat-card--identity .cat-subtitle{
  display: block;
  margin-top: 7px;
  color: rgba(255,255,255,.68);
  font-size: clamp(11px, .72vw, 13px);
}

@media (hover:hover) and (pointer:fine){
  .cat-card--identity:hover::before{
    filter:
      saturate(calc(var(--cat-photo-saturation) + .04))
      contrast(calc(var(--cat-photo-contrast) + .03))
      brightness(calc(var(--cat-photo-brightness) + .05));
    transform: scale(calc(var(--cat-photo-scale) + .025));
  }

  .cat-card--identity:hover .cat-icon{
    transform: translateY(-1px) scale(1.02);
  }
}

@media (max-width: 1599px){
  .app-discovery-page .cards-grid{
    grid-template-columns: repeat(4, minmax(0,1fr));
    gap: 20px;
  }
}

@media (max-width: 1050px){
  .app-discovery-page .cards-grid{
    grid-template-columns: repeat(3, minmax(0,1fr));
    gap: 18px;
  }
}

@media (max-width: 700px){
  .app-discovery-page .cards-grid{
    grid-template-columns: repeat(2, minmax(0,1fr));
    gap: 14px;
  }

  .app-discovery-page .cat-content{
    gap: 0;
    padding: 15% 10.5%;
  }

  .app-discovery-page .cat-icon{
    width: 46px;
    height: 46px;
  }

  .app-discovery-page .cat-icon-glyph{
    width: 46px;
    height: 46px;
  }

  .app-discovery-page .cat-title{
    margin-top: 8px;
    font-size: clamp(12.5px, 3.8vw, 16px);
  }

  .app-discovery-page .cat-subtitle{
    margin-top: 5px;
    font-size: clamp(9.5px, 2.7vw, 11px);
    line-height: 1.3;
  }
}

@media (max-height: 520px) and (orientation: landscape) and (min-width: 701px){
  .app-discovery-page .cards-grid{
    grid-template-columns: repeat(4, minmax(0,1fr));
  }
}

/* =========================
   Sections (Category page)
========================= */
.section-title{
  margin: 0;
  font-size: 20px;
  font-weight: 800;
  letter-spacing: -0.02em;
}

.section-head{
  display: flex;
  align-items: center;
  justify-content: flex-start;
  gap: 12px;
  margin: var(--s4) 0 var(--s2);
}

.section-play-btn{
  border: 1px solid rgba(255,255,255,.12);
  background:
    radial-gradient(circle at top left, rgba(255,255,255,.14), rgba(255,255,255,.02) 55%),
    rgba(255,255,255,.05);
  color: rgba(255,255,255,.96);
  border-radius: 999px;
  width: 46px;
  height: 46px;
  padding: 0;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  font-weight: 700;
  letter-spacing: -0.01em;
  box-shadow:
    0 10px 24px rgba(0,0,0,.18),
    inset 0 1px 0 rgba(255,255,255,.07);
  transition: background .16s ease, border-color .16s ease, transform .16s ease, box-shadow .16s ease;
}

.section-play-btn__icon{
  width: 34px;
  height: 34px;
  border-radius: 999px;
  display: inline-grid;
  place-items: center;
  background: rgba(255,255,255,.9);
  color: #101114;
  box-shadow: 0 8px 20px rgba(0,0,0,.2);
  flex: 0 0 auto;
}

.section-play-btn__icon i{
  font-size: 12px;
}

.section-play-btn.is-playing{
  background:
    radial-gradient(circle at top left, rgba(255,255,255,.22), rgba(255,255,255,.06) 55%),
    rgba(255,255,255,.12);
  border-color: rgba(255,255,255,.22);
  box-shadow:
    0 14px 34px rgba(0,0,0,.24),
    0 0 0 1px rgba(255,255,255,.06) inset;
}

.section-row{
  margin-bottom: var(--s5);
}

.section-row + .section-row{
  border-top: 1px solid rgba(255,255,255,.04);
  padding-top: var(--s4);
}

/* =========================
   Player (Bottom, Always Visible)
========================= */
.pr-player{
  position: fixed;
  left: 12px;
  right: 12px;
  bottom: 12px;
  z-index: 9999;
  display: none;
}
.pr-player.is-open{display:block;}

.pr-bar{
  height: var(--player-h);
  border-radius: 14px;

  background: rgba(15,15,18,.84);
  border: 1px solid rgba(255,255,255,.09);

  backdrop-filter: blur(18px);
  -webkit-backdrop-filter: blur(18px);

  box-shadow:
    0 18px 60px rgba(0,0,0,.60),
    inset 0 1px 0 rgba(255,255,255,.06);

  display: grid;
  grid-template-columns: 1fr 1.4fr 1fr;
  align-items: center;
  padding: var(--s1) var(--s2);
  gap: 12px;
}

/* Left */
.pr-left{
  display: flex;
  align-items: center;
  gap: var(--s1);
  min-width: 0;
}

.pr-cover{
  width: 56px;
  height: 56px;
  border-radius: 10px;
  background: rgba(255,255,255,.08);
  border: 1px solid rgba(255,255,255,.10);
  flex: 0 0 auto;
  background-size: cover;
  background-position: center;
}

.pr-meta{ min-width: 0; }

.pr-title{
  font-weight: 750;
  font-size: 14px;
  line-height: 1.1;
  color: rgba(255,255,255,.92);
  letter-spacing: -0.015em;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.pr-sub{
  margin-top: 4px;
  font-size: 12px;
  color: rgba(255,255,255,.55);
  letter-spacing: -0.005em;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

/* Center */
.pr-center{
  display: flex;
  flex-direction: column;
  gap: 10px;
  align-items: center;
}

.pr-controls{
  display: flex;
  align-items: center;
  gap: var(--s1);
}

.pr-btn{
  width: 40px;
  height: 40px;
  border-radius: 999px;
  border: 0;
  background: transparent;
  color: rgba(255,255,255,.75);
  cursor: pointer;

  display: flex;
  align-items: center;
  justify-content: center;

  font-size: 16px;
  transition: background .12s ease, color .12s ease, transform .12s ease;
}

@media (hover:hover) and (pointer:fine){
  .pr-btn:hover{
    background: rgba(255,255,255,.08);
    color: rgba(255,255,255,.95);
    transform: translateY(-1px);
  }
}

.pr-btn-play{
  background: rgba(255,255,255,.92);
  color: rgba(0,0,0,.9);
  box-shadow:
    0 10px 26px rgba(0,0,0,.35),
    inset 0 1px 0 rgba(255,255,255,.35);
}

.pr-btn-play.is-playing i::before{
  content: "\f04c"; /* fa-pause */
}

/* Progress */
.pr-progress{
  width: min(520px, 100%);
  display: grid;
  grid-template-columns: 44px 1fr 44px;
  align-items: center;
  gap: 10px;
}

.pr-time{
  font-size: 11px;
  color: rgba(255,255,255,.55);
  text-align: center;
}

/* Range */
.pr-seek,
.pr-vol{
  --fill: 0%;
  -webkit-appearance: none;
  appearance: none;
  height: 4px;
  border-radius: 999px;
  background: linear-gradient(
    to right,
    #ffffff var(--fill),
    rgba(255,255,255,0.25) var(--fill)
  );
  outline: none;
  cursor: pointer;
}

.pr-seek::-webkit-slider-thumb,
.pr-vol::-webkit-slider-thumb{
  -webkit-appearance: none;
  width: 12px;
  height: 12px;
  border-radius: 50%;
  background: #fff;
  border: 0;
}

.pr-seek::-moz-range-thumb,
.pr-vol::-moz-range-thumb{
  width: 12px;
  height: 12px;
  border-radius: 50%;
  background: #fff;
  border: 0;
}

/* Right */
.pr-right{
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 10px;
}

.pr-ic{ font-size: 14px; }

.pr-volume{
  display: flex;
  align-items: center;
  gap: 8px;
}

.pr-vol{ width: 110px; }

/* Remove focus ring on player buttons */
.pr-player .pr-btn:focus,
.pr-player .pr-btn:focus-visible{
  outline: none !important;
  box-shadow: none !important;
}

/* Tablet-ish */
@media (max-width: 820px){
  .pr-bar{
    grid-template-columns: 1fr;
    height: auto;
    padding: 12px;
  }
  .pr-right{ justify-content: space-between; }
  .pr-progress{ width: 100%; }
  .pr-vol{ width: 90px; }
}

/* Mobile mini bar */
@media (max-width: 820px){
  :root{
    --player-h: 64px;
    --player-gap: 0px;
    --player-extra: 16px;
  }

  .pr-player{
    left: 0;
    right: 0;
    bottom: 0;
  }

  .pr-bar{
    height: var(--player-h);
    border-radius: 16px 16px 0 0;
    padding: 10px 12px;
    gap: 10px;
    grid-template-columns: 1fr auto;
    align-items: center;
  }

  .pr-cover{
    width: 44px;
    height: 44px;
    border-radius: 10px;
  }

  .pr-title{ font-size: 13px; }
  .pr-sub{ font-size: 11px; margin-top: 3px; }

  .pr-center{
    flex-direction: row;
    gap: 8px;
    align-items: center;
  }

  .pr-progress{ display: none; }
  .pr-right{ display: none; }

  .pr-btn{
    width: 36px;
    height: 36px;
  }
  .pr-btn-play{
    width: 40px;
    height: 40px;
  }
}

/* =========================
   Playlists (Cards) — premium + square artwork
========================= */

/* If you ever use a normal grid instead of rail */
.playlist-grid{
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
  gap: var(--s2);
  margin-top: var(--s1);
}

.playlist-card{
  position: relative;
  display: block;
  width: 100%;
  text-align: left;

  border: 1px solid rgba(255,255,255,.07);
  background: rgba(20,20,34,.48);
  border-radius: var(--r-md);

  padding: var(--s1);
  cursor: pointer;

  outline: none;

  box-shadow: 0 10px 30px rgba(0,0,0,.25);
}

.playlist-card:focus,
.playlist-card:focus-visible,
.playlist-card:active{
  outline: none !important;
  box-shadow: none !important;
}

/* ✅ Square artwork cover */
.playlist-cover{
  position: relative;
  overflow: hidden;

  aspect-ratio: 1 / 1; /* ✅ square artwork */
  height: auto;

  border-radius: 12px;

  /* default surface if no image */
  background: linear-gradient(180deg, rgba(255,255,255,.06), rgba(255,255,255,.03));
  background-size: cover;
  background-position: center;
  background-repeat: no-repeat;

  margin-bottom: var(--s1);

  box-shadow:
    0 16px 40px rgba(0,0,0,.35),
    inset 0 1px 0 rgba(255,255,255,.08);
}

@supports not (aspect-ratio: 1 / 1){
  .playlist-cover{ height: 220px; } /* fallback */
}

.playlist-title{
  font-weight: 750;
  color: #ffffff;
  margin-top: var(--s-1);
  letter-spacing: -0.015em;
  font-size: 14px;
  line-height: 1.2;
}

/* Overlay play button */
.playlist-play{
  position: absolute;
  left: 50%;
  top: 50%;
  transform: translate(-50%, -50%) scale(.96);

  width: 56px;
  height: 56px;
  border-radius: 999px;

  display: grid;
  place-items: center;

  background: rgba(255,255,255,.80);
  color: #111;

  box-shadow:
    0 14px 34px rgba(0,0,0,.38),
    inset 0 1px 0 rgba(255,255,255,.35);

  opacity: 0;
  pointer-events: none;
  transition: opacity .16s ease, transform .16s ease;
}

/* Playing: ALWAYS show overlay button, but NO outline/glow */
.playlist-card.is-playing .playlist-play{
  opacity: 1;
  transform: translate(-50%, -50%) scale(1);
}

.playlist-card.is-playing{
  outline: none !important;
  outline-offset: 0 !important;
  box-shadow: 0 10px 30px rgba(0,0,0,.25);
  border-color: rgba(255,255,255,.10);
}

/* Hover only on hover devices */
@media (hover: hover) and (pointer: fine){
  .section-play-btn:hover{
    transform: translateY(-1px);
    background:
      radial-gradient(circle at top left, rgba(255,255,255,.18), rgba(255,255,255,.04) 55%),
      rgba(255,255,255,.08);
    border-color: rgba(255,255,255,.18);
    box-shadow:
      0 16px 30px rgba(0,0,0,.22),
      inset 0 1px 0 rgba(255,255,255,.08);
  }

  .playlist-card{
    transition: transform .15s ease, filter .15s ease, border-color .15s ease;
  }

  .playlist-card:hover{
    transform: translateY(-2px);
    border-color: rgba(255,255,255,.14);
    filter: brightness(1.05);
  }

  .playlist-card:hover .playlist-play{
    opacity: 1;
    transform: translate(-50%, -50%) scale(1);
  }
}

@media (max-width: 720px){
  .section-head{
    gap: 10px;
  }

  .section-play-btn{
    width: 42px;
    height: 42px;
  }

  .section-play-btn__icon{
    width: 30px;
    height: 30px;
  }
}

/* =========================
   Spotify-like horizontal rails
========================= */
.rail{
  position: relative;
  padding: 0;
  margin-top: var(--s1);
}

.rail-viewport{
  display: grid;
  grid-auto-flow: column;

  /* Make cards feel like Spotify: slightly wider + more breathing room */
  grid-auto-columns: 220px;

  gap: var(--s2);

  overflow-x: auto;
  overflow-y: hidden;
  scroll-behavior: smooth;
  -webkit-overflow-scrolling: touch;

  padding: var(--s1) 0;
  margin: calc(var(--s1) * -1) 0;

  scrollbar-width: none;
  cursor: grab;
}

.rail-viewport::-webkit-scrollbar{ display: none; }

.rail-viewport.is-dragging{
  cursor: grabbing;
  user-select: none;
}

@media (min-width: 1200px) {
    .rail-viewport{
      /* Make cards feel like Spotify: slightly wider + more breathing room */
      grid-auto-columns: 250px;
    }
}

@media (min-width: 1400px) {
    .rail-viewport{
      /* Make cards feel like Spotify: slightly wider + more breathing room */
      grid-auto-columns: 270px;
    }
}

@media (min-width: 1600px) {
    .rail-viewport{
      /* Make cards feel like Spotify: slightly wider + more breathing room */
      grid-auto-columns: 420px;
    }
}

/* Arrows (overlay) */
.rail-arrow{
  position: absolute;
  top: 50%;
  transform: translateY(-50%);

  width: 34px;
  height: 34px;
  border-radius: 999px;

  border: 1px solid rgba(255,255,255,.12);
  background: rgba(15,15,18,.70);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);

  color: rgba(255,255,255,.9);
  display: grid;
  place-items: center;
  cursor: pointer;
  z-index: 5;

  box-shadow: 0 10px 26px rgba(0,0,0,.35);
}

.rail-prev{ left: 0; margin-left: -18px; }
.rail-next{ right: 0; margin-right: -18px; }

@media (hover:hover) and (pointer:fine){
  .rail-arrow{
    opacity: 0;
    pointer-events: none;
    transition: opacity .15s ease, transform .15s ease, background .15s ease, border-color .15s ease;
  }

  .rail:hover .rail-arrow:not(.is-hidden){
    opacity: 1;
    pointer-events: auto;
  }

  .rail-arrow:hover{
    background: rgba(15,15,18,.88);
    border-color: rgba(255,255,255,.20);
  }

  .rail.is-overflowing:hover .rail-prev{
    transform: translateY(-50%) translateX(-2px);
  }
  .rail.is-overflowing:hover .rail-next{
    transform: translateY(-50%) translateX(2px);
  }
}

.rail-arrow.is-hidden{
  opacity: 0;
  pointer-events: none;
}

/* Touch: always show arrows if overflowing */
@media (hover:none){
  .rail.is-overflowing .rail-arrow{ opacity: 1; }
}

/* =========================
   Optional: Category hero (blurred background)
   (Use only if you add markup for it)
========================= */
.cat-hero{
  position: relative;
  margin: calc(var(--s4) * -1) calc(var(--s3) * -1) var(--s5);
  padding: 72px var(--s3) 56px;
  overflow: hidden;
  box-shadow: inset 0 -1px 0 rgba(255,255,255,.04);
}

.cat-hero-bg{
  position: absolute;
  inset: 0;
  background-image: var(--bg-image);
  background-size: cover;
  background-position: center;
  filter: blur(42px) saturate(120%);
  transform: scale(1.15);
  opacity: .55;
}

.cat-hero-bg::after{
  content:"";
  position:absolute;
  inset:0;
  background:
    radial-gradient(120% 80% at 50% 0%, rgba(0,0,0,.25), transparent 60%),
    linear-gradient(to bottom, rgba(0,0,0,.55), rgba(0,0,0,.85));
}

.cat-hero-content{
  position: relative;
  max-width: var(--maxw);
  margin: 0 auto;
}

/* If you use cat-hero, you probably want title smaller there */
.cat-hero .page-title{
  font-size: 30px;
  margin: 0;
}

/* Global section spacing helper */
section + section{
  margin-top: 56px;
}
.turbo-progress-bar {
  background: rgba(255,255,255,.12); 
  height: 2px;
}
