/* Malavia Beta Zero — frozen North Star fidelity pass 1
   Targeted product overrides only. Admin stays on its own styling layer. */

:root {
  --fz-bg: #101215;
  --fz-bg-2: #12151a;
  --fz-surface: #171b20;
  --fz-surface-2: #1d2228;
  --fz-surface-3: #242a31;
  --fz-ink: #f2ede4;
  --fz-ink-2: #d8d1c7;
  --fz-muted: #9aa2ab;
  --fz-muted-2: #747d87;
  --fz-line: #2a3038;
  --fz-gold: #f4ae2b;
  --fz-gold-2: #ffd36d;
  --fz-gold-soft: rgb(244 174 43 / 10%);
  --fz-gold-line: rgb(244 174 43 / 34%);
  --fz-header: 58px;
  --fz-bottom: 70px;
  --fz-shadow: 0 16px 44px rgb(0 0 0 / 24%);
}

body {
  background:
    radial-gradient(700px 300px at 92% -80px, rgb(244 174 43 / 6%), transparent 68%),
    linear-gradient(180deg, var(--fz-bg), var(--fz-bg-2));
}

.fz-main {
  padding-top: 18px;
  padding-bottom: calc(var(--fz-bottom) + 26px);
}

/* ---------- Frozen chrome ---------- */
.fz-header {
  height: var(--fz-header);
  background: #0f1216;
  border-bottom-color: rgb(244 174 43 / 16%);
  backdrop-filter: none;
}

.fz-header-inner { gap: 7px; }

.fz-brand {
  padding: 0;
  gap: 8px;
}

.fz-brand-icon {
  display: block;
  width: 34px;
  height: 34px;
  flex: 0 0 34px;
  border-radius: 9px;
  object-fit: cover;
  box-shadow: 0 0 0 1px rgb(244 174 43 / 16%);
}

.fz-brand-word {
  color: var(--fz-ink);
  font-size: 1rem;
  font-weight: 950;
  letter-spacing: -.02em;
}

.fz-desktop-nav { gap: 1px; }
.fz-desktop-nav .nav-link {
  min-height: 40px;
  padding-inline: 10px;
  color: #9aa2ab;
  font-size: 12.5px;
}
.fz-desktop-nav .nav-link:hover,
.fz-desktop-nav .nav-link.active {
  color: var(--fz-gold-2);
  background: var(--fz-surface-2);
}

.fz-head-search {
  display: none;
  min-width: 0;
  height: 40px;
  margin-inline-start: auto;
  align-items: center;
  gap: 7px;
  padding-inline: 10px;
  border: 1px solid #2f363f;
  border-radius: 10px;
  background: #15191e;
}
.fz-head-search svg { width: 17px; color: #8f97a0; }
.fz-head-search input {
  width: 100%;
  border: 0;
  outline: 0;
  background: transparent;
  color: var(--fz-ink);
  font-size: 12px;
}
.fz-head-search input::placeholder { color: #747d87; }

.fz-header-tools { margin-inline-start: auto; gap: 2px; }
.fz-header .head-action {
  width: 40px;
  height: 40px;
  border-radius: 10px;
  color: #9aa2ab;
}
.fz-header .head-action:hover,
.fz-header .head-action[aria-current="page"] {
  color: var(--fz-gold-2);
  background: var(--fz-surface-2);
}
.fz-header .head-action svg { width: 21px; height: 21px; }
.fz-avatar {
  width: 34px;
  height: 34px;
  border-color: var(--fz-gold-line);
  background: #2a251e;
  color: var(--fz-gold-2);
}

.fz-mobile-bottom {
  height: calc(var(--fz-bottom) + env(safe-area-inset-bottom));
  padding-bottom: env(safe-area-inset-bottom);
  grid-template-columns: repeat(4, 1fr);
  background: #111419;
  border-top-color: rgb(244 174 43 / 18%);
}
.fz-mobile-bottom a {
  min-height: 56px;
  color: #8f97a0;
  gap: 2px;
}
.fz-mobile-bottom a svg { width: 22px; height: 22px; }
.fz-mobile-bottom a span { font-size: 11.5px; font-weight: 850; }
.fz-mobile-bottom a.active { color: var(--fz-gold-2); }
.fz-mobile-bottom a.active::before {
  width: 32px;
  height: 2px;
  background: var(--fz-gold);
}

/* ---------- Shared Frozen controls ---------- */
.fz-gold-button {
  border-color: var(--fz-gold-line);
  background: var(--fz-gold-soft);
  color: var(--fz-gold-2);
}
.fz-gold-button:hover { background: rgb(244 174 43 / 16%); }

.fz-search-box {
  min-height: 48px;
  border-color: #323944;
  border-radius: 12px;
  background: var(--fz-surface);
}
.fz-search-box svg { width: 18px; color: #9ca4ad; flex: none; }
.fz-search-box input { min-width: 0; }

/* ---------- Frozen home ---------- */
.fz-home-intro {
  padding-top: 6px;
}
.fz-home-intro h1 {
  max-width: 650px;
  margin: 4px 0 7px;
  font-size: clamp(31px, 8vw, 46px);
  line-height: 1.15;
  letter-spacing: -.7px;
}
.fz-home-intro > p {
  max-width: 650px;
  margin: 0;
  color: var(--fz-muted);
  font-size: 12.5px;
}

.fz-home-search {
  width: min(100%, 670px);
  height: 52px;
  margin-top: 14px;
  display: flex;
  align-items: center;
  gap: 7px;
  padding: 5px 6px 5px 12px;
  border: 1px solid #343b45;
  border-radius: 13px;
  background: var(--fz-surface);
}
.fz-home-search input {
  width: 100%;
  min-width: 0;
  border: 0;
  outline: 0;
  background: none;
  color: var(--fz-ink);
}
.fz-home-search input::placeholder { color: #838c96; }
.fz-home-search button {
  height: 40px;
  flex: none;
  padding-inline: 15px;
  border: 0;
  border-radius: 9px;
  background: var(--fz-gold);
  color: #211500;
  font-weight: 950;
}

.fz-request-chip {
  width: min(100%, 670px);
  margin-top: 12px;
  padding: 10px 12px;
  display: flex;
  align-items: center;
  gap: 9px;
  border: 1px solid var(--fz-gold-line);
  border-radius: 12px;
  background: var(--fz-gold-soft);
  text-align: right;
  text-decoration: none;
}
.fz-request-chip svg { width: 20px; flex: none; color: var(--fz-gold-2); }
.fz-request-chip span { display: grid; min-width: 0; }
.fz-request-chip b { font-size: 12.5px; }
.fz-request-chip small { color: #aaaeb3; font-size: 11px; }

.fz-onboard {
  display: grid;
  gap: 8px;
  width: min(100%, 420px);
  margin-top: 14px;
}
.fz-onboard .button { justify-content: flex-start; }

.fz-home-watch-section { margin-top: 30px; }
.fz-watch-feature { display: grid; gap: 8px; }
.fz-watch-main {
  min-width: 0;
  padding: 10px;
  display: grid;
  grid-template-columns: 76px minmax(0, 1fr);
  gap: 12px;
  align-items: center;
  border-radius: 14px;
  background: linear-gradient(120deg, #1c2127, #171b20);
  box-shadow: inset 0 0 0 1px rgb(244 174 43 / 11%);
  text-align: right;
  text-decoration: none;
}
.fz-watch-poster {
  width: 76px;
  aspect-ratio: 2 / 3;
  overflow: hidden;
  border-radius: 8px;
  background: var(--fz-surface-2);
}
.fz-watch-poster > img { width: 100%; height: 100%; object-fit: cover; display: block; }
.fz-watch-main h3 { margin: 2px 0; font-size: 16px; line-height: 1.35; }
.fz-watch-main p { margin: 2px 0 6px; color: var(--fz-muted); font-size: 12px; }
.fz-open-work { color: var(--fz-gold-2); font-size: 11.5px; font-weight: 900; }
.fz-watch-queue { display: grid; gap: 2px; }
.fz-watch-queue-item {
  min-height: 58px;
  padding: 5px 2px;
  display: grid;
  grid-template-columns: 38px minmax(0, 1fr);
  gap: 9px;
  align-items: center;
  border-bottom: 1px solid rgb(255 255 255 / 5.5%);
  text-align: right;
  text-decoration: none;
}
.fz-watch-queue-item > img,
.fz-mini-brand {
  width: 38px;
  height: 52px;
  display: grid;
  place-items: center;
  overflow: hidden;
  border-radius: 5px;
  background: var(--fz-surface-3);
}
.fz-watch-queue-item > img { object-fit: cover; }
.fz-mini-brand img { width: 24px; height: 24px; object-fit: contain; opacity: .78; }
.fz-watch-queue-item b { display: block; font-size: 12.5px; }
.fz-watch-queue-item small { display: block; color: var(--fz-muted); font-size: 11px; }

.fz-poster-rail {
  display: flex;
  gap: 10px;
  overflow-x: auto;
  overflow-y: hidden;
  padding: 2px 0 8px;
  scroll-snap-type: x proximity;
  scrollbar-width: none;
}
.fz-poster-rail::-webkit-scrollbar { display: none; }
.fz-poster-card {
  flex: 0 0 126px;
  width: 126px;
  min-width: 0;
  scroll-snap-align: start;
}
.fz-poster-card > a { text-decoration: none; }
.fz-poster-wrap {
  position: relative;
  width: 100%;
  aspect-ratio: 2 / 3;
  overflow: hidden;
  border-radius: 9px;
  background: var(--fz-surface-2);
  box-shadow: 0 7px 20px rgb(0 0 0 / 16%);
}
.fz-poster-wrap > img { width: 100%; height: 100%; object-fit: cover; display: block; }
.fz-poster-card strong {
  display: -webkit-box;
  margin-top: 7px;
  overflow: hidden;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 2;
  font-size: 13px;
  line-height: 1.45;
}
.fz-poster-card small {
  display: block;
  overflow: hidden;
  color: #818994;
  font-size: 11px;
  white-space: nowrap;
  text-overflow: ellipsis;
}
.fz-poster-card > a > span { color: #89919b; font-size: 11px; }
.fz-poster-rating {
  position: absolute;
  inset-inline-start: 6px;
  bottom: 6px;
  min-width: 25px;
  padding: 2px 6px;
  border-radius: 999px;
  background: rgb(16 18 21 / 88%);
  color: var(--fz-gold-2);
  font-size: 11px;
  font-weight: 950;
  text-align: center;
}

.fz-brand-fallback {
  width: 100%;
  height: 100%;
  display: grid;
  align-content: center;
  justify-items: center;
  gap: 7px;
  padding: 10px;
  background: linear-gradient(145deg, #242a31, #181c21);
  color: #8f98a2;
  text-align: center;
}
.fz-brand-fallback img { width: 38px; height: 38px; object-fit: contain; opacity: .78; }
.fz-brand-fallback span { font-size: 10.5px; }

.fz-branded-empty {
  min-height: 120px;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 14px;
  padding: 18px 0;
  text-align: right;
}
.fz-branded-empty > img {
  width: 52px;
  height: 52px;
  flex: none;
  border-radius: 12px;
  opacity: .85;
}
.fz-branded-empty b { display: block; }
.fz-branded-empty p { margin: 3px 0 9px; color: var(--fz-muted); font-size: 12px; }
.fz-branded-empty.is-compact { min-height: 86px; justify-content: flex-start; }

.fz-recent-strip { display: grid; gap: 2px; }
.fz-recent-item {
  min-height: 58px;
  padding: 6px 0;
  display: grid;
  grid-template-columns: 36px minmax(0, 1fr);
  gap: 9px;
  align-items: center;
  border-bottom: 1px solid rgb(255 255 255 / 5.5%);
  text-decoration: none;
  text-align: right;
}
.fz-recent-item > img,
.fz-recent-item > .fz-mini-brand { width: 36px; height: 50px; border-radius: 5px; object-fit: cover; }
.fz-recent-item b { display: block; font-size: 12.5px; }
.fz-recent-item small { display: block; color: var(--fz-muted); font-size: 10.5px; }

.fz-guest-home { padding-top: clamp(2rem, 10vw, 5rem); }
.fz-guest-logo {
  width: 62px;
  height: 62px;
  margin: 0 auto 15px;
  display: block;
  border-radius: 15px;
  box-shadow: 0 12px 36px rgb(0 0 0 / 22%);
}

/* ---------- Frozen bank ---------- */
.fz-bank-head h1 {
  margin: 3px 0 5px;
  font-size: 31px;
  line-height: 1.15;
}
.fz-bank-head p { margin: 0; color: var(--fz-muted); font-size: 12px; }
.fz-bank-head .fz-search-box { margin-top: 13px; }
.fz-results-line { margin: 12px 0 15px; }
.fz-bank-request { flex: none; min-height: 38px; padding-block: 5px; font-size: 12px; }
.fz-bank-empty > img {
  width: 56px;
  height: 56px;
  margin-bottom: 10px;
  border-radius: 14px;
  opacity: .8;
}
.fz-poster-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 18px 10px; }
.fz-bank-card .mlv-poster-wrap { border-radius: 9px; }

/* Brand-aware fallback for all existing poster surfaces. */
.mlv-poster-fallback {
  position: relative;
  align-content: center;
  justify-items: center;
  gap: 6px;
  background: linear-gradient(145deg, #242a31, #181c21);
}
.mlv-poster-fallback::before {
  content: "";
  width: 38px;
  height: 38px;
  background: url('/brand/malavia-icon.webp') center / contain no-repeat;
  opacity: .72;
}
.mlv-poster-fallback > span { display: none; }

/* ---------- Frozen personal collections ---------- */
.fz-collection-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
  padding: 4px 0 16px;
  border-bottom: 1px solid var(--fz-gold-line);
}
.fz-collection-head h1 { margin: 3px 0 4px; font-size: 30px; line-height: 1.18; }
.fz-collection-head p { max-width: 620px; margin: 0; color: var(--fz-muted); font-size: 12px; }
.fz-list-create {
  margin-top: 12px;
  border: 1px solid var(--fz-line);
  border-radius: 11px;
  background: var(--fz-surface);
}
.fz-list-create > summary { min-height: 46px; padding: 10px 12px; }
.fz-lists-empty { padding-block: 35px; }

.fz-my-list-grid { display: grid; gap: 7px; margin-top: 14px; }
.fz-my-list-card {
  min-width: 0;
  min-height: 86px;
  display: grid;
  grid-template-columns: 66px minmax(0, 1fr) auto;
  gap: 10px;
  align-items: center;
  padding: 9px;
  border: 1px solid #303741;
  border-radius: 11px;
  background: var(--fz-surface);
  text-decoration: none;
}
.fz-list-cover-placeholder {
  position: relative;
  width: 66px;
  height: 66px;
  display: grid;
  place-items: center;
  overflow: hidden;
  border-radius: 8px;
  background: var(--fz-surface-2);
}
.fz-list-cover-placeholder img { width: 34px; height: 34px; opacity: .65; }
.fz-list-cover-placeholder span {
  position: absolute;
  inset-inline-start: 5px;
  bottom: 4px;
  min-width: 22px;
  padding: 1px 5px;
  border-radius: 999px;
  background: rgb(16 18 21 / 88%);
  color: var(--fz-gold-2);
  font-size: 10px;
  font-weight: 950;
  text-align: center;
}
.fz-my-list-card h2 { margin: 2px 0 0; font-size: 14px; line-height: 1.4; }
.fz-my-list-card p {
  display: -webkit-box;
  margin: 2px 0 0;
  overflow: hidden;
  color: var(--fz-muted);
  font-size: 11px;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 2;
}
.fz-my-list-card small { color: #89919b; font-size: 10.5px; }
.fz-list-arrow { color: var(--fz-gold-2); font-size: 18px; }

/* ---------- Frozen profile ---------- */
.fz-profile-head {
  display: grid;
  grid-template-columns: 58px minmax(0, 1fr);
  gap: 11px;
  align-items: start;
  padding: 3px 0 16px;
  border-bottom: 1px solid var(--fz-gold-line);
}
.fz-profile-avatar {
  width: 58px;
  height: 58px;
  display: grid;
  place-items: center;
  border: 1px solid var(--fz-gold-line);
  border-radius: 50%;
  background: #2d271f;
  color: var(--fz-gold-2);
  font-size: 20px;
  font-weight: 1000;
}
.fz-profile-identity { min-width: 0; }
.fz-profile-identity h1 { margin: 0; font-size: 24px; line-height: 1.2; }
.fz-profile-user { color: #89919a; font-size: 11.5px; text-align: right; }
.fz-profile-identity p { margin: 5px 0 0; color: #c9c3ba; font-size: 12px; }
.fz-profile-actions {
  grid-column: 1 / -1;
  display: flex;
  gap: 6px;
  flex-wrap: wrap;
}
.fz-profile-action {
  min-height: 40px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  padding: 7px 11px;
  border: 1px solid var(--fz-line);
  border-radius: 10px;
  background: var(--fz-surface);
  color: var(--fz-ink-2);
  text-decoration: none;
  font-size: 12px;
  font-weight: 900;
}
.fz-profile-action svg { width: 17px; }
.fz-profile-action.is-accent { border-color: var(--fz-gold-line); background: var(--fz-gold-soft); color: var(--fz-gold-2); }

.fz-system-collections {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 7px;
  margin-top: 14px;
}
.fz-system-card {
  min-width: 0;
  padding: 9px;
  display: grid;
  gap: 7px;
  border: 1px solid #303741;
  border-radius: 11px;
  background: var(--fz-surface);
  text-decoration: none;
  text-align: right;
}
.fz-system-card span:first-child { color: var(--fz-muted); font-size: 10.5px; }
.fz-system-card b { display: block; font-size: 13.5px; }
.fz-system-card small { color: #89919b; font-size: 10.5px; }
.fz-thumb-stack { display: flex; min-height: 41px; direction: ltr; }
.fz-thumb-stack img {
  width: 28px;
  height: 41px;
  object-fit: cover;
  border: 2px solid var(--fz-surface);
  border-radius: 4px;
  margin-left: -7px;
}

.fz-public-profile-stats {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  margin-top: 14px;
  border-block: 1px solid var(--fz-line);
}
.fz-public-profile-stats div { padding: 10px 5px; text-align: center; }
.fz-public-profile-stats strong { display: block; font-size: 17px; }
.fz-public-profile-stats span { color: var(--fz-muted); font-size: 10.5px; }

.fz-profile-section { min-width: 0; }
.fz-profile-lower { display: grid; gap: 4px; }
.fz-profile-lists,
.fz-profile-reviews { display: grid; gap: 4px; }
.fz-profile-lists > a,
.fz-profile-reviews > article {
  min-width: 0;
  padding: 10px 0;
  border-bottom: 1px solid rgb(255 255 255 / 5.5%);
}
.fz-profile-lists > a {
  display: grid;
  grid-template-columns: 38px minmax(0, 1fr);
  gap: 9px;
  align-items: center;
  text-decoration: none;
}
.fz-profile-list-icon {
  width: 38px;
  height: 38px;
  display: grid;
  place-items: center;
  border: 1px solid var(--fz-line);
  border-radius: 8px;
  color: var(--fz-gold-2);
  background: var(--fz-surface);
}
.fz-profile-lists strong,
.fz-profile-lists small { display: block; }
.fz-profile-lists small { color: var(--fz-muted); font-size: 10.5px; }
.fz-profile-reviews strong { font-size: 13px; }
.fz-profile-reviews p { margin: 4px 0 0; color: #c7c0b7; font-size: 12px; }
.fz-profile-quiet-actions {
  margin-top: 28px;
  padding-top: 12px;
  display: flex;
  gap: 15px;
  border-top: 1px solid var(--fz-line);
  color: var(--fz-muted);
  font-size: 11px;
}
.fz-profile-quiet-actions a,
.fz-profile-quiet-actions button {
  padding: 4px 0;
  border: 0;
  background: none;
  color: inherit;
  text-decoration: none;
}

/* ---------- Responsive fidelity ---------- */
@media (max-width: 29.99rem) {
  .fz-collection-head { flex-direction: column; }
  .fz-collection-head > .button { width: 100%; }
  .fz-system-collections { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}

@media (min-width: 48rem) {
  .fz-main { padding-top: 24px; padding-bottom: 42px; }
  .fz-brand-word { display: inline; }
  .fz-mobile-search { display: none !important; }
  .fz-head-search {
    display: flex;
    width: clamp(220px, 27vw, 360px);
    margin-inline-start: auto;
  }
  .fz-header-tools { margin-inline-start: 0; }
  .fz-watch-feature {
    grid-template-columns: minmax(0, 1.35fr) minmax(260px, .65fr);
    align-items: stretch;
  }
  .fz-watch-main { grid-template-columns: 112px minmax(0, 1fr); padding: 13px; }
  .fz-watch-poster { width: 112px; }
  .fz-watch-main h3 { font-size: 22px; }
  .fz-poster-card { flex-basis: 152px; width: 152px; }
  .fz-my-list-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .fz-profile-head { grid-template-columns: 76px minmax(0, 1fr) auto; }
  .fz-profile-avatar { width: 76px; height: 76px; font-size: 26px; }
  .fz-profile-actions { grid-column: 3; grid-row: 1; justify-content: flex-end; }
  .fz-system-collections { max-width: 720px; }
  .fz-profile-lower { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 26px; }
  .fz-poster-grid { grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 24px 14px; }
}

@media (min-width: 68rem) {
  .fz-poster-grid { grid-template-columns: repeat(6, minmax(0, 1fr)); }
  .fz-home-intro h1 { font-size: 46px; }
}
