:root {
  --bg0: #0B1221;
  --bg1: #161F35;
  --card: #1A2235;
  --card2: #222C42;
  --line: #2A3550;
  --tx: #FFFFFF;
  --t2: #8A96AA;
  --t3: #5F6B80;
  --blue: #3B82F6;
  --green: #10B981;
  --red: #EF4444;
  --amber: #F59E0B;
  --r: 20px;
  font-family: Inter, -apple-system, "SF Pro Text", "SF Pro Display", system-ui, sans-serif;
}

* { box-sizing: border-box; -webkit-tap-highlight-color: transparent; }

html, body {
  margin: 0;
  min-height: 100%;
  color: var(--tx);
  background: linear-gradient(180deg, var(--bg0), var(--bg1)) fixed;
}

body:before {
  content: "";
  position: fixed;
  inset: 0;
  pointer-events: none;
  opacity: .55;
  z-index: 0;
  background-image:
    radial-gradient(1px 1px at 12% 18%, #fff8 50%, transparent 51%),
    radial-gradient(1px 1px at 72% 9%, #fff6 50%, transparent 51%),
    radial-gradient(1.5px 1.5px at 33% 61%, #fff5 50%, transparent 51%),
    radial-gradient(1px 1px at 88% 44%, #fff7 50%, transparent 51%),
    radial-gradient(1px 1px at 52% 82%, #fff5 50%, transparent 51%),
    radial-gradient(1px 1px at 6% 90%, #fff6 50%, transparent 51%),
    radial-gradient(1.5px 1.5px at 94% 76%, #fff4 50%, transparent 51%);
  background-size: 220px 260px;
}

button { font: inherit; color: inherit; background: none; border: 0; padding: 0; cursor: pointer; }
a { color: var(--blue); text-decoration: none; }
[hidden] { display: none !important; }

/* Age-ok flash prevention (set on <html> before first paint) */
html.age-ok #age-gate { display: none !important; }
html.age-ok #app { display: block; }

/* ---------- Age gate ---------- */
.age-gate {
  position: fixed;
  inset: 0;
  z-index: 80;
  overflow: auto;
  -webkit-overflow-scrolling: touch;
}
.age-gate__inner {
  position: relative;
  z-index: 1;
  max-width: 520px;
  margin: 0 auto;
  padding: calc(env(safe-area-inset-top, 0px) + 24px) 16px calc(env(safe-area-inset-bottom, 0px) + 32px);
  min-height: 100%;
  display: flex;
  align-items: flex-start;
}
@media (min-height: 760px) {
  .age-gate__inner { align-items: center; }
}
.age-card h1 {
  font-size: 22px;
  font-weight: 800;
  letter-spacing: -0.02em;
  margin: 12px 0 8px;
  line-height: 1.25;
}
.lead { color: var(--t2); font-size: 14px; line-height: 1.45; margin: 0 0 18px; }
.age-badge {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 13px;
  font-weight: 800;
  letter-spacing: 0.06em;
  padding: 5px 10px;
  border-radius: 99px;
  background: #EF444426;
  color: var(--red);
}
.dob-form fieldset,
.filters-form fieldset {
  border: 0;
  margin: 0 0 16px;
  padding: 0;
}
.dob-form legend,
.filters-form legend {
  font-size: 13px;
  font-weight: 700;
  color: var(--t2);
  margin-bottom: 8px;
}
.dob-row {
  display: grid;
  grid-template-columns: 1.3fr 0.9fr 1.1fr;
  gap: 8px;
  margin-bottom: 12px;
}
.dob-row label,
.dur-row label {
  display: flex;
  flex-direction: column;
  gap: 6px;
  font-size: 12px;
  font-weight: 600;
  color: var(--t2);
}
select.dp, input.dp, .dp {
  width: 100%;
  background: var(--card2);
  border: 1px solid var(--line);
  color: #fff;
  border-radius: 14px;
  padding: 13px 10px;
  font: inherit;
  font-size: 16px;
  outline: 0;
  -webkit-appearance: none;
  appearance: none;
}
select.dp {
  background-image: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' width='12' height='8' viewBox='0 0 12 8'><path fill='%238A96AA' d='M1 1l5 5 5-5'/></svg>");
  background-repeat: no-repeat;
  background-position: right 12px center;
  padding-right: 28px;
}
select.dp:focus, input.dp:focus { border-color: var(--blue); }
.or-line {
  display: flex;
  align-items: center;
  gap: 10px;
  margin: 18px 0 12px;
  color: var(--t3);
  font-size: 12px;
  font-weight: 600;
}
.or-line:before, .or-line:after {
  content: "";
  flex: 1;
  height: 1px;
  background: #ffffff14;
}
.provider-stub__label {
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: var(--t3);
  margin: 0 0 8px;
}
.provider-actions { display: grid; gap: 8px; }
.provider-status {
  margin-top: 10px;
  font-size: 13px;
  color: var(--amber);
  background: #F59E0B1a;
  border-radius: 14px;
  padding: 10px 12px;
  line-height: 1.4;
}
.legal {
  margin: 16px 0 0;
  font-size: 12px;
  color: var(--t3);
  line-height: 1.4;
}

/* ---------- App shell (iPhone-first, 520px column) ---------- */
#app { position: relative; }
main {
  position: relative;
  z-index: 1;
  padding: calc(env(safe-area-inset-top, 0px) + 8px) 16px calc(96px + env(safe-area-inset-bottom, 0px));
  max-width: 520px;
  margin: 0 auto;
}

.t2 { color: var(--t2); }
.t3 { color: var(--t3); }
.green { color: var(--green); }
.red { color: var(--red); }
.amber { color: var(--amber); }

.hdr {
  display: flex;
  align-items: center;
  gap: 10px;
  height: 52px;
}
.hdr .nm {
  font-size: 20px;
  font-weight: 700;
  flex: 1;
  display: flex;
  align-items: center;
  gap: 8px;
}
.live {
  font-size: 11px;
  font-weight: 700;
  padding: 3px 8px;
  border-radius: 99px;
  background: #EF444422;
  color: var(--red);
  letter-spacing: .04em;
}
.ibtn {
  width: 40px;
  height: 40px;
  border-radius: 50%;
  background: var(--card);
  display: grid;
  place-items: center;
  position: relative;
  border: 1px solid #ffffff08;
}
.ibtn svg {
  width: 20px;
  height: 20px;
  fill: none;
  stroke: #fff;
  stroke-width: 1.8;
  stroke-linecap: round;
  stroke-linejoin: round;
}
.ibtn-dot {
  position: absolute;
  top: 6px;
  right: 6px;
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--blue);
  box-shadow: 0 0 0 2px var(--bg0);
}

.card {
  background: var(--card);
  border-radius: var(--r);
  padding: 16px;
  margin: 12px 0;
  border: 1px solid #ffffff08;
}

.sec {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin: 16px 2px 8px;
}
.sec b { font-size: 17px; }

.pill {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  font-size: 12px;
  font-weight: 700;
  padding: 4px 9px;
  border-radius: 99px;
  background: var(--card2);
}
.pill.g { background: #10B98122; color: var(--green); }
.pill.r { background: #EF444422; color: var(--red); }
.pill.b { background: #3B82F622; color: var(--blue); }
.pill.a { background: #F59E0B22; color: var(--amber); }

/* Horizontal featured tiles */
.hs {
  display: flex;
  gap: 10px;
  overflow-x: auto;
  scroll-snap-type: x mandatory;
  padding: 2px 2px 8px;
  margin: 0 -16px;
  padding-left: 16px;
  padding-right: 16px;
  scrollbar-width: none;
}
.hs::-webkit-scrollbar { display: none; }
.sq {
  flex: none;
  width: 148px;
  border-radius: 28px;
  background: var(--card);
  padding: 10px;
  display: flex;
  flex-direction: column;
  gap: 8px;
  scroll-snap-align: start;
  text-align: left;
  border: 1px solid #ffffff0a;
}
.sq .thumb {
  height: 78px;
  border-radius: 18px;
}
.sq b { font-size: 14px; line-height: 1.25; }
.sq span { font-size: 12px; color: var(--t2); }

/* Content grid */
.grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
}
.tile {
  background: var(--card);
  border-radius: var(--r);
  border: 1px solid #ffffff08;
  overflow: hidden;
  text-align: left;
  display: flex;
  flex-direction: column;
}
.tile .thumb {
  aspect-ratio: 16 / 10;
  border-radius: 0;
}
.tile .meta {
  padding: 10px 12px 12px;
  display: flex;
  flex-direction: column;
  gap: 4px;
  min-height: 74px;
}
.tile .meta b {
  font-size: 13px;
  font-weight: 700;
  line-height: 1.3;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}
.tile .meta .sub {
  display: flex;
  align-items: center;
  gap: 6px;
  flex-wrap: wrap;
  color: var(--t2);
  font-size: 11px;
  font-weight: 600;
}

/* Grey placeholder thumbnails — no media, no labels beyond type */
.thumb {
  position: relative;
  background:
    linear-gradient(180deg, #2A334A 0%, #1A2235 100%);
  overflow: hidden;
}
.thumb:before {
  content: "";
  position: absolute;
  inset: 0;
  background-image:
    linear-gradient(#ffffff06 1px, transparent 1px),
    linear-gradient(90deg, #ffffff06 1px, transparent 1px);
  background-size: 14px 14px;
  opacity: .7;
}
.thumb:after {
  content: "";
  position: absolute;
  inset: 0;
  margin: auto;
  width: 28px;
  height: 28px;
  border-radius: 50%;
  background: #ffffff14;
  box-shadow: inset 0 0 0 1.5px #ffffff30;
}
.thumb.is-video:after {
  width: 0;
  height: 0;
  border-radius: 0;
  background: none;
  box-shadow: none;
  border-style: solid;
  border-width: 7px 0 7px 12px;
  border-color: transparent transparent transparent #ffffffcc;
  margin: auto;
  left: 3px;
}
.thumb .ph-label {
  position: absolute;
  left: 8px;
  bottom: 6px;
  z-index: 1;
  font-size: 10px;
  font-weight: 700;
  letter-spacing: .04em;
  text-transform: uppercase;
  color: #ffffff80;
}

.empty {
  color: var(--t2);
  text-align: center;
  font-size: 14px;
  padding: 22px 12px;
}

/* Category list */
.az {
  display: flex;
  flex-wrap: wrap;
  gap: 4px;
  padding: 10px;
  background: var(--card);
  border-radius: var(--r);
  border: 1px solid #ffffff08;
  margin: 0 0 12px;
  position: sticky;
  top: calc(env(safe-area-inset-top, 0px) + 4px);
  z-index: 2;
}
.az button {
  width: 28px;
  height: 28px;
  border-radius: 8px;
  font-size: 12px;
  font-weight: 700;
  color: var(--t2);
  display: grid;
  place-items: center;
}
.az button.on { background: #3B82F633; color: var(--blue); }
.az button:disabled { color: var(--t3); opacity: .4; }

.letter-group { margin: 0 0 14px; }
.letter-group .letter-h {
  font-size: 13px;
  font-weight: 800;
  color: var(--t2);
  padding: 4px 6px 8px;
  letter-spacing: .04em;
}
.list {
  background: var(--card);
  border-radius: var(--r);
  overflow: hidden;
  border: 1px solid #ffffff08;
}
.li {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 12px 14px;
  min-height: 60px;
  width: 100%;
  text-align: left;
  border-bottom: 1px solid #ffffff0a;
}
.li:last-child { border-bottom: 0; }
.li .mid { flex: 1; min-width: 0; }
.li .mid div:first-child { font-weight: 600; }
.li .mid div + div {
  color: var(--t2);
  font-size: 13px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.li .val {
  text-align: right;
  font-weight: 700;
  font-size: 15px;
  color: var(--t2);
}
.ic {
  width: 38px;
  height: 38px;
  border-radius: 12px;
  display: grid;
  place-items: center;
  font-weight: 800;
  font-size: 13px;
  flex: none;
  background: var(--card2);
  color: var(--blue);
}

.back {
  color: var(--blue);
  font-size: 14px;
  font-weight: 600;
  min-height: 36px;
  margin: 4px 0 0;
}

/* Bottom tabs */
.tabs {
  position: fixed;
  left: 0;
  right: 0;
  bottom: 0;
  z-index: 20;
  display: flex;
  justify-content: space-around;
  padding: 8px 8px calc(8px + env(safe-area-inset-bottom, 0px));
  background: #0B1221b8;
  backdrop-filter: blur(18px) saturate(1.4);
  -webkit-backdrop-filter: blur(18px) saturate(1.4);
  border-top: 1px solid #ffffff10;
}
.tabs button {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 3px;
  font-size: 11px;
  color: var(--t2);
  min-width: 64px;
  min-height: 44px;
}
.tabs svg {
  width: 24px;
  height: 24px;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.8;
  stroke-linecap: round;
  stroke-linejoin: round;
}
.tabs button.on { color: var(--blue); }

/* Filters bottom sheet */
.backdrop {
  position: fixed;
  inset: 0;
  background: #000a;
  z-index: 30;
  opacity: 0;
  transition: opacity .25s;
}
.backdrop.in { opacity: 1; }
.sheet {
  position: fixed;
  left: 0;
  right: 0;
  bottom: 0;
  z-index: 31;
  max-height: 88vh;
  overflow: auto;
  background: var(--bg1);
  border-radius: 24px 24px 0 0;
  padding: 10px 16px calc(24px + env(safe-area-inset-bottom, 0px));
  transform: translateY(100%);
  transition: transform .3s cubic-bezier(.2, .8, .2, 1);
  max-width: 560px;
  margin: 0 auto;
  border-top: 1px solid #ffffff14;
}
.sheet.in { transform: none; }
.grab {
  width: 40px;
  height: 5px;
  border-radius: 9px;
  background: #ffffff30;
  margin: 0 auto 10px;
}
.shead {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 8px;
}
.shead b { font-size: 20px; }
.x {
  width: 36px;
  height: 36px;
  border-radius: 50%;
  background: var(--card);
  font-size: 18px;
  display: grid;
  place-items: center;
  color: var(--t2);
}

.bigbtn {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  width: 100%;
  min-height: 52px;
  border-radius: 16px;
  background: var(--blue);
  color: #fff;
  font-weight: 700;
  font-size: 16px;
}
.bigbtn.ghost { background: var(--card2); }
.warn {
  background: #F59E0B1a;
  color: var(--amber);
  border-radius: 14px;
  padding: 10px 12px;
  font-size: 14px;
  margin: 0 0 12px;
}

/* Filter controls */
.seg {
  display: flex;
  gap: 8px;
  overflow-x: auto;
  scrollbar-width: none;
  margin-bottom: 6px;
}
.seg::-webkit-scrollbar { display: none; }
.seg button {
  flex: 1;
  background: var(--card2);
  border-radius: 14px;
  padding: 10px 12px;
  font-weight: 700;
  font-size: 14px;
  min-height: 44px;
}
.seg button.on {
  background: #3B82F633;
  outline: 1.5px solid var(--blue);
}
.dur-row {
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  gap: 8px;
  align-items: end;
}
.dur-row .t2 { padding-bottom: 14px; }
.choice-row, .choice-wrap {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}
.choice {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  background: var(--card2);
  border-radius: 99px;
  padding: 8px 12px;
  font-size: 13px;
  font-weight: 700;
  min-height: 36px;
  border: 1.5px solid transparent;
}
.choice:has(input:checked) {
  background: #3B82F633;
  border-color: var(--blue);
}
.choice input { accent-color: var(--blue); }
.hint {
  margin: 0 0 8px;
  font-size: 12px;
  color: var(--t3);
  line-height: 1.4;
}
.hide-list {
  background: var(--card);
  border-radius: var(--r);
  border: 1px solid #ffffff08;
  overflow: hidden;
  margin-bottom: 8px;
}
.hide-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 12px 14px;
  width: 100%;
  border-bottom: 1px solid #ffffff0a;
  font-size: 15px;
  font-weight: 600;
  text-align: left;
}
.hide-row:last-child { border-bottom: 0; }
.sw {
  width: 46px;
  height: 28px;
  border-radius: 99px;
  background: var(--card2);
  position: relative;
  flex: none;
  transition: background .2s;
}
.sw i {
  position: absolute;
  top: 2px;
  left: 2px;
  width: 24px;
  height: 24px;
  border-radius: 50%;
  background: #fff;
  transition: transform .2s;
}
.sw.on { background: var(--green); }
.sw.on i { transform: translateX(18px); }

.filters-form { padding-bottom: 8px; }
