/* Malavia Beta Zero — frozen North Star fidelity pass 3 */

.fz-page-title {
  margin: 0;
  font-size: clamp(25px, 7vw, 36px);
  line-height: 1.18;
  letter-spacing: -.035em;
}
.fz-page-lead {
  margin: 7px 0 0;
  max-width: 46rem;
  color: #aab1b8;
  font-size: 13px;
  line-height: 1.9;
}
.fz-page-head-compact {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 18px;
}
.fz-page-head-compact .fz-btn { flex: none; }
.fz-kicker { color: #e8b347; font-size: 11px; font-weight: 950; margin-bottom: 5px; }

.fz-subnav {
  display: flex;
  gap: 4px;
  overflow-x: auto;
  scrollbar-width: none;
  margin: 4px 0 16px;
  padding-bottom: 3px;
  border-bottom: 1px solid #2a3038;
}
.fz-subnav::-webkit-scrollbar { display: none; }
.fz-subnav a {
  min-height: 42px;
  flex: none;
  display: inline-flex;
  align-items: center;
  padding: 0 11px;
  border-bottom: 2px solid transparent;
  color: #9ea6ae;
  text-decoration: none;
  font-size: 12px;
  font-weight: 850;
}
.fz-subnav a.active { color: #ffd36d; border-color: #f4ae2b; }

.fz-stat-grid {
  display: grid;
  grid-template-columns: repeat(4,minmax(0,1fr));
  border-block: 1px solid #2a3038;
  margin: 12px 0 24px;
}
.fz-stat-grid > div {
  min-width: 0;
  padding: 12px 7px;
  text-align: center;
  border-inline-start: 1px solid #2a3038;
}
.fz-stat-grid > div:first-child { border-inline-start: 0; }
.fz-stat-grid strong { display: block; font-size: 20px; line-height: 1; color: #f2ede4; }
.fz-stat-grid span { display: block; margin-top: 5px; color: #8f979f; font-size: 10px; line-height: 1.5; }

.fz-collection-section { margin-top: 24px; }
.fz-collection-head {
  display: flex;
  align-items: end;
  justify-content: space-between;
  gap: 10px;
  margin-bottom: 10px;
}
.fz-collection-head h2 { margin: 0; font-size: 17px; }
.fz-collection-head p { margin: 3px 0 0; color: #858e97; font-size: 11px; }
.fz-poster-rail {
  display: grid;
  grid-auto-flow: column;
  grid-auto-columns: minmax(105px, 28vw);
  gap: 9px;
  overflow-x: auto;
  overscroll-behavior-inline: contain;
  scroll-snap-type: inline proximity;
  padding: 1px 1px 8px;
  scrollbar-width: thin;
}
.fz-rail-item { min-width: 0; scroll-snap-align: start; }
.fz-rail-poster {
  position: relative;
  display: block;
  width: 100%;
  aspect-ratio: 2/3;
  overflow: hidden;
  border-radius: 9px;
  background: #1d2228;
  text-decoration: none;
}
.fz-rail-poster img { width: 100%; height: 100%; object-fit: cover; display: block; }
.fz-rail-fallback {
  width: 100%; height: 100%; display: grid; place-items: center; gap: 8px; padding: 10px;
  background: linear-gradient(155deg,#232931,#15191e); text-align: center; color: #aeb5bc;
}
.fz-rail-fallback img { width: 36px; height: 36px; object-fit: contain; opacity: .78; }
.fz-rail-fallback strong { font-size: 10px; line-height: 1.6; }
.fz-rail-badge {
  position: absolute; inset-inline-end: 6px; bottom: 6px;
  min-width: 28px; min-height: 24px; display: grid; place-items: center;
  padding: 2px 6px; border-radius: 7px; background: rgba(8,10,12,.86);
  border: 1px solid rgba(244,174,43,.25); color: #ffd36d; font-size: 10px; font-weight: 900;
}
.fz-rail-copy { padding-top: 5px; }
.fz-rail-copy strong { display: block; color: #e9e4dc; font-size: 11.5px; line-height: 1.55; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.fz-rail-copy span { color: #7f8891; font-size: 10px; }
.fz-empty-shelf {
  min-height: 112px; display: grid; place-items: center; text-align: center;
  border: 1px dashed #303741; border-radius: 11px; padding: 16px; color: #929aa2;
}
.fz-empty-shelf strong { display: block; color: #d9d3ca; margin-bottom: 4px; }
.fz-empty-shelf a { color: #ffd36d; }

/* Diary history */
.fz-history { display: grid; gap: 0; }
.fz-history-row {
  display: grid;
  grid-template-columns: 78px minmax(0,1fr);
  gap: 12px;
  padding: 14px 0;
  border-bottom: 1px solid #2a3038;
}
.fz-history-row.is-removed { opacity: .55; }
.fz-history-date { direction: ltr; text-align: left; color: #9ba3ac; font-size: 11px; padding-top: 2px; }
.fz-history-main { min-width: 0; }
.fz-history-type { color: #e8b347; font-size: 10px; font-weight: 900; }
.fz-history-main h2 { margin: 2px 0 3px; font-size: 16px; line-height: 1.45; }
.fz-history-main h2 a { color: #f0ebe3; text-decoration: none; }
.fz-history-note { color: #838c95; font-size: 10.5px; }
.fz-history-tools > summary { min-height: 36px; display: inline-flex; align-items: center; color: #8f98a1; cursor: pointer; font-size: 10.5px; }
.fz-history-tools-body { display: grid; gap: 8px; padding: 8px 0 2px; }
.fz-history-tools input[type=date] { min-height: 44px; border: 1px solid #2a3038; border-radius: 9px; background: #171b20; color: #f2ede4; padding: 7px 9px; }
.fz-danger-text { border: 0; background: transparent; color: #d58d86; padding: 7px 0; text-align: right; cursor: pointer; }

/* Reviews */
.fz-own-reviews { display: grid; gap: 0; }
.fz-own-review { padding: 15px 0; border-bottom: 1px solid #2a3038; }
.fz-own-review-head { display: flex; align-items: flex-start; justify-content: space-between; gap: 10px; }
.fz-own-review h2 { margin: 2px 0 5px; font-size: 16px; }
.fz-own-review h2 a { text-decoration: none; color: #f0ebe3; }
.fz-own-review p { color: #c6c0b8; font-size: 12.5px; line-height: 1.9; margin: 5px 0 7px; }
.fz-review-state { color: #8f98a1; font-size: 10px; }

/* Settings / export */
.fz-settings { max-width: 720px; margin-inline: auto; }
.fz-settings-card {
  border: 1px solid #2a3038;
  border-radius: 13px;
  background: #15191e;
  overflow: hidden;
}
.fz-settings-identity {
  display: flex; align-items: center; gap: 11px; padding: 14px;
  border-bottom: 1px solid #2a3038;
}
.fz-settings-identity .fz-avatar { width: 46px; height: 46px; }
.fz-settings-identity strong { display: block; }
.fz-settings-identity span { color: #838c95; font-size: 10.5px; }
.fz-settings-form { display: grid; gap: 0; }
.fz-setting-row { padding: 14px; border-bottom: 1px solid #2a3038; }
.fz-setting-row:last-child { border-bottom: 0; }
.fz-setting-row label,
.fz-setting-row legend { display: block; margin-bottom: 6px; color: #d9d3ca; font-size: 11px; font-weight: 900; }
.fz-setting-row input[type=text],
.fz-setting-row textarea {
  width: 100%; min-height: 44px; border: 1px solid #2a3038; border-radius: 9px;
  background: #101317; color: #f2ede4; padding: 9px 10px; font: inherit;
}
.fz-setting-row textarea { min-height: 105px; resize: vertical; }
.fz-setting-help { display: block; color: #747d87; font-size: 10px; margin-top: 5px; }
.fz-privacy-options { display: grid; gap: 6px; }
.fz-privacy-choice {
  display: grid; grid-template-columns: auto minmax(0,1fr); gap: 9px; align-items: start;
  padding: 10px; border: 1px solid #2a3038; border-radius: 9px; background: #111419;
}
.fz-privacy-choice:has(input:checked) { border-color: rgba(244,174,43,.38); background: rgba(244,174,43,.06); }
.fz-privacy-choice strong { display: block; font-size: 11.5px; }
.fz-privacy-choice small { display: block; margin-top: 2px; color: #7f8891; font-size: 9.5px; line-height: 1.6; }
.fz-settings-save { padding: 14px; }
.fz-export-card { max-width: 620px; margin: 26px auto 0; padding: 18px; border: 1px solid #2a3038; border-radius: 13px; background: #15191e; }
.fz-export-card img { width: 52px; height: 52px; object-fit: contain; display: block; margin-bottom: 12px; }
.fz-export-card h1 { margin: 0 0 7px; font-size: 25px; }
.fz-export-card p { margin: 0 0 12px; color: #9da5ad; font-size: 12px; line-height: 1.85; }
.fz-export-card ul { margin: 0 0 14px; padding-inline-start: 18px; color: #c9c3ba; font-size: 11px; line-height: 1.8; }

/* Catalog requests */
.fz-request-page { max-width: 800px; margin-inline: auto; }
.fz-request-compose { margin: 12px 0 26px; border: 1px solid #2a3038; border-radius: 12px; background: #15191e; overflow: hidden; }
.fz-request-compose > summary { min-height: 54px; display: flex; align-items: center; justify-content: space-between; padding: 0 14px; cursor: pointer; list-style: none; color: #f0ebe3; font-weight: 900; }
.fz-request-compose > summary::-webkit-details-marker { display: none; }
.fz-request-compose > summary::after { content: "+"; color: #f4ae2b; font-size: 20px; }
.fz-request-compose[open] > summary::after { content: "−"; }
.fz-request-form { display: grid; gap: 11px; padding: 0 14px 14px; }
.fz-request-field { display: grid; gap: 5px; }
.fz-request-field label { color: #d7d1c8; font-size: 10.5px; font-weight: 850; }
.fz-request-field input,
.fz-request-field select,
.fz-request-field textarea { width: 100%; min-height: 44px; border: 1px solid #2a3038; border-radius: 9px; background: #101317; color: #f2ede4; padding: 9px 10px; font: inherit; }
.fz-request-field textarea { min-height: 110px; resize: vertical; }
.fz-linked-work { padding: 9px 10px; border-right: 2px solid #f4ae2b; background: rgba(244,174,43,.05); color: #c9c3ba; font-size: 10.5px; }
.fz-request-guide { margin: 10px 0 0; padding: 11px 0; border-block: 1px solid #2a3038; color: #888f97; font-size: 10.5px; line-height: 1.7; }
.fz-request-list { display: grid; gap: 0; }
.fz-request-item { padding: 14px 0; border-bottom: 1px solid #2a3038; }
.fz-request-item-head { display: flex; align-items: start; justify-content: space-between; gap: 10px; }
.fz-request-item-head strong { display: block; font-size: 13px; }
.fz-request-item-head small { color: #8d959d; }
.fz-request-status { flex: none; border: 1px solid #39414b; border-radius: 999px; padding: 4px 8px; color: #c9d0d6; font-size: 9.5px; }
.fz-request-item > p { margin: 7px 0; color: #bdb7af; font-size: 11.5px; line-height: 1.8; }
.fz-request-meta { color: #737c85; font-size: 9.5px; }
.fz-request-response { margin-top: 9px; padding: 10px; border-right: 2px solid #f4ae2b; background: rgba(244,174,43,.05); }
.fz-request-response strong { font-size: 10px; color: #ffd36d; }
.fz-request-response p { margin: 3px 0 0; color: #c7c1b8; font-size: 11px; }

/* Auth/state cleanup */
.fz-auth-emblem img { width: 100%; height: 100%; object-fit: contain; border-radius: inherit; }
.fz-state-page { max-width: 560px; margin: 10vh auto 0; text-align: center; }
.fz-state-logo { width: 64px; height: 64px; object-fit: contain; margin: 0 auto 14px; display: block; }
.fz-state-page h1 { margin: 4px 0 8px; font-size: clamp(25px,7vw,34px); }
.fz-state-page p { margin: 0 auto 14px; max-width: 32rem; color: #9da5ad; font-size: 12px; line-height: 1.85; }
.fz-state-actions { display: flex; gap: 8px; justify-content: center; flex-wrap: wrap; }

@media (min-width: 760px) {
  .fz-poster-rail { grid-auto-columns: 140px; gap: 11px; }
  .fz-history-row { grid-template-columns: 110px minmax(0,1fr); }
  .fz-request-form { grid-template-columns: repeat(2,minmax(0,1fr)); }
  .fz-request-field.is-wide, .fz-linked-work, .fz-request-form > .fz-btn { grid-column: 1/-1; }
}

@media (max-width: 520px) {
  .fz-page-head-compact { align-items: flex-start; }
  .fz-page-head-compact .fz-btn { min-height: 40px; padding: 6px 9px; font-size: 11px; }
  .fz-stat-grid { grid-template-columns: repeat(2,minmax(0,1fr)); }
  .fz-stat-grid > div:nth-child(3) { border-inline-start: 0; border-top: 1px solid #2a3038; }
  .fz-stat-grid > div:nth-child(4) { border-top: 1px solid #2a3038; }
  .fz-history-row { grid-template-columns: 1fr; gap: 4px; }
  .fz-history-date { text-align: right; }
}
