/* ===== TOKENS ===== */
:root {
  --navy:    #16224d;
  --gold:    #b08a3a;
  --paper:   #fcfbf6;
  --bg:      #f6f4ee;
  --ink:     #23262e;
  --line:    #e6e1d4;
  --sec:     #9a9384;
  --r-card:  14px;
  --r-btn:   10px;
  --r-input: 12px;
}

/* ===== RESET ===== */
*, *::before, *::after { margin: 0; padding: 0; box-sizing: border-box; }

body {
  font-family: 'Libre Franklin', -apple-system, BlinkMacSystemFont, sans-serif;
  background: var(--bg);
  color: var(--ink);
  height: 100dvh;
  overflow: hidden;
}

button { font-family: inherit; }

/* ===== APP ROOT ===== */
#app {
  height: 100dvh;
  display: flex;
  flex-direction: column;
  overflow: hidden;
}

/* ===== LOADING ===== */
.loading-screen {
  flex: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 14px;
  color: var(--navy);
}

.loading-screen__logo {
  width: 96px;
  height: 96px;
  object-fit: contain;
  margin-bottom: 4px;
}

.loading-screen__title {
  font-family: 'Cormorant Garamond', serif;
  font-size: 30px;
  letter-spacing: .32em;
  font-weight: 600;
}

.loading-screen__sub {
  font-size: 13px;
  color: var(--sec);
  letter-spacing: .04em;
}

/* ===== APP LAYOUT ===== */
.app-main {
  flex: 1;
  display: flex;
  flex-direction: column;
  overflow: hidden;
  min-height: 0;
}

/* ===== HEADER ===== */
.app-header {
  flex: none;
  background: var(--paper);
  border-bottom: 1px solid var(--line);
  padding: 14px clamp(16px, 4vw, 40px);
}

.header-inner {
  max-width: 1080px;
  margin: 0 auto;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
}

.header-brand {
  display: flex;
  align-items: center;
  gap: 14px;
  min-width: 0;
}

.header-logo {
  width: 42px;
  height: 42px;
  flex: none;
  border: 1.5px solid var(--gold);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--navy);
  font-family: 'Cormorant Garamond', serif;
  font-weight: 700;
  font-size: 20px;
  user-select: none;
}

.header-titles { min-width: 0; }

.header-title {
  font-family: 'Cormorant Garamond', serif;
  font-size: clamp(20px, 3.4vw, 27px);
  font-weight: 700;
  color: var(--navy);
  line-height: 1;
  letter-spacing: .01em;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.header-meta {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-top: 5px;
}

.header-orfeones {
  font-size: 10px;
  letter-spacing: .32em;
  color: var(--gold);
  font-weight: 600;
}

.header-sep {
  width: 1px;
  height: 11px;
  background: var(--line);
}

.header-edition {
  font-size: 11px;
  color: var(--sec);
}

.header-count {
  flex: none;
  text-align: right;
  line-height: 1.1;
}

.header-count__num {
  font-family: 'Cormorant Garamond', serif;
  font-size: 26px;
  font-weight: 700;
  color: var(--navy);
}

.header-count__label {
  font-size: 10px;
  letter-spacing: .14em;
  text-transform: uppercase;
  color: var(--sec);
}

/* ===== TOOLBAR ===== */
.app-toolbar {
  flex: none;
  background: var(--paper);
  border-bottom: 1px solid var(--line);
  padding: 0 clamp(16px, 4vw, 40px) 12px;
}

.toolbar-inner { max-width: 1080px; margin: 0 auto; }

.toolbar-row {
  display: flex;
  gap: 10px;
  align-items: center;
  padding-top: 4px;
}

.search-box {
  flex: 1;
  display: flex;
  align-items: center;
  gap: 10px;
  background: #fff;
  border: 1px solid var(--line);
  border-radius: var(--r-input);
  padding: 0 14px;
  height: 50px;
  box-shadow: 0 1px 2px rgba(22,34,77,.04);
}

.search-box input {
  border: 0;
  outline: 0;
  background: transparent;
  font-size: 16px;
  width: 100%;
  color: var(--ink);
  font-family: inherit;
}

.search-box input::placeholder { color: var(--sec); }

.search-clear {
  border: 0;
  background: #f0ede4;
  width: 24px;
  height: 24px;
  border-radius: 50%;
  cursor: pointer;
  color: #8a8472;
  display: flex;
  align-items: center;
  justify-content: center;
  flex: none;
  padding: 0;
  line-height: 0;
}

.search-clear:not(.visible) { display: none; }

.btn-favs {
  height: 50px;
  padding: 0 16px;
  border-radius: var(--r-input);
  border: 1px solid var(--line);
  background: #fff;
  color: #5a5648;
  cursor: pointer;
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 14px;
  font-weight: 600;
  flex: none;
  transition: background .15s, color .15s, border-color .15s;
  white-space: nowrap;
}

.btn-favs.active {
  background: var(--gold);
  color: #fff;
  border-color: var(--gold);
}

/* ===== CATEGORY CHIPS ===== */
.cats-row {
  display: flex;
  gap: 8px;
  overflow-x: auto;
  padding: 14px 0 2px;
  scrollbar-width: none;
}

.cats-row::-webkit-scrollbar { display: none; }

.cat-chip {
  flex: none;
  display: flex;
  align-items: center;
  gap: 7px;
  height: 34px;
  padding: 0 14px;
  border-radius: 999px;
  border: 1px solid var(--line);
  background: #fff;
  color: #5a5648;
  cursor: pointer;
  font-size: 13px;
  font-weight: 600;
  transition: background .15s, color .15s, border-color .15s;
  white-space: nowrap;
}

.cat-chip.active {
  background: var(--navy);
  color: #fff;
  border-color: var(--navy);
}

.cat-chip__dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  flex: none;
}

.cat-chip__count {
  font-size: 11px;
  opacity: .6;
  font-weight: 500;
}

/* ===== HYMN INDEX ===== */
.app-index {
  flex: 1;
  overflow-y: auto;
  position: relative;
  padding: 0 clamp(16px, 4vw, 40px) 60px;
  min-height: 0;
}

.app-index::-webkit-scrollbar { width: 6px; }
.app-index::-webkit-scrollbar-track { background: transparent; }
.app-index::-webkit-scrollbar-thumb { background: var(--line); border-radius: 3px; }

.index-inner {
  max-width: 1080px;
  margin: 0 auto;
  position: relative;
}

/* Empty state */
.empty-state {
  text-align: center;
  padding: 80px 20px;
  color: var(--sec);
}

.empty-state__title {
  font-family: 'Cormorant Garamond', serif;
  font-size: 24px;
  color: var(--navy);
  margin-bottom: 6px;
}

/* ===== LETTER GROUP ===== */
.letter-group { padding-top: 8px; }

.letter-header {
  position: sticky;
  top: 0;
  z-index: 2;
  background: var(--bg);
  padding: 14px 0 10px;
  display: flex;
  align-items: center;
  gap: 14px;
}

.letter-char {
  font-family: 'Cormorant Garamond', serif;
  font-size: 22px;
  font-weight: 700;
  color: var(--gold);
  width: 24px;
  flex: none;
}

.letter-rule {
  flex: 1;
  height: 1px;
  background: var(--line);
}

/* ===== HYMN GRID ===== */
.hymn-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(244px, 1fr));
  gap: 12px;
  margin-bottom: 6px;
}

/* ===== HYMN CARD ===== */
.hymn-card {
  position: relative;
  display: flex;
  flex-direction: column;
  background: #fff;
  border: 1px solid var(--line);
  border-radius: var(--r-card);
  padding: 16px 16px 14px;
  cursor: pointer;
  transition: border-color .15s, box-shadow .15s, transform .15s;
  user-select: none;
}

.hymn-card:hover {
  border-color: var(--gold);
  box-shadow: 0 8px 22px rgba(22,34,77,.09);
  transform: translateY(-2px);
}

.card-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 11px;
}

.card-tag {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 10.5px;
  font-weight: 600;
  letter-spacing: .04em;
  text-transform: uppercase;
  padding: 4px 9px;
  border-radius: 7px;
}

.card-tag__dot {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  flex: none;
}

.fav-btn {
  border: 0;
  background: transparent;
  cursor: pointer;
  padding: 2px;
  flex: none;
  color: var(--gold);
  display: flex;
  align-items: center;
  margin: -2px -2px 0 0;
  line-height: 0;
}

.card-title {
  font-family: 'Cormorant Garamond', serif;
  font-size: 23px;
  font-weight: 600;
  color: var(--navy);
  line-height: 1.12;
  letter-spacing: .005em;
  min-height: 51px;
  text-wrap: pretty;
}

.card-footer {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 10px;
  margin-top: 13px;
  padding-top: 12px;
  border-top: 1px solid var(--line);
}

.card-arreglos {
  font-size: 11.5px;
  color: var(--sec);
  line-height: 1.3;
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.card-page {
  flex: none;
  display: flex;
  align-items: baseline;
  gap: 4px;
}

.card-page__label {
  font-size: 9px;
  letter-spacing: .1em;
  text-transform: uppercase;
  color: #bcb6a6;
}

.card-page__num {
  font-family: 'Cormorant Garamond', serif;
  font-size: 21px;
  font-weight: 700;
  color: var(--ink);
  line-height: 1;
}

/* ===== A-Z RAIL ===== */
.az-rail {
  position: fixed;
  right: 6px;
  top: 50%;
  transform: translateY(-50%);
  display: flex;
  flex-direction: column;
  gap: 1px;
  z-index: 5;
}

.az-btn {
  border: 0;
  background: transparent;
  cursor: pointer;
  font-size: 11px;
  font-weight: 700;
  color: #a59e8c;
  width: 20px;
  height: 18px;
  line-height: 1;
  transition: color .1s;
  display: flex;
  align-items: center;
  justify-content: center;
}

.az-btn:hover { color: var(--gold); }

/* ===== VIEWER ===== */
.viewer {
  position: fixed;
  inset: 0;
  z-index: 50;
  display: none;
  flex-direction: column;
}

.viewer.open { display: flex; }

.viewer.dark {
  --v-bg: #14161c;
  --v-fg: #e9e6df;
  --v-border: rgba(255,255,255,.14);
  background: #14161c;
  color: #e9e6df;
}

.viewer:not(.dark) {
  --v-bg: #ece8de;
  --v-fg: #23262e;
  --v-border: rgba(22,34,77,.14);
  background: #ece8de;
  color: #23262e;
}

/* Viewer top bar */
.viewer-topbar {
  flex: none;
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 7px clamp(10px, 2.5vw, 20px);
  border-bottom: 1px solid var(--v-border);
}

.viewer-btn {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 7px;
  border: 1px solid var(--v-border);
  background: transparent;
  color: inherit;
  cursor: pointer;
  height: 36px;
  border-radius: var(--r-btn);
  font-size: 13px;
  font-weight: 600;
  transition: background .15s, color .15s, border-color .15s, opacity .15s;
}

.viewer-btn.active {
  background: var(--gold);
  color: #fff;
  border-color: var(--gold);
}

.viewer-btn--back { padding: 0 12px; }
.viewer-btn--icon { width: 36px; flex: none; }

.viewer-center {
  flex: 1;
  min-width: 0;
  text-align: center;
}

.viewer-title {
  font-family: 'Cormorant Garamond', serif;
  font-size: clamp(16px, 2.4vw, 20px);
  font-weight: 700;
  line-height: 1;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.viewer-meta {
  font-size: 10.5px;
  opacity: .58;
  margin-top: 2px;
}

/* Viewer sheet area */
.viewer-sheet {
  flex: 1;
  overflow: auto;
  padding: 16px clamp(10px, 2.5vw, 28px) 20px;
  display: flex;
  justify-content: center;
  align-items: flex-start;
}

/* ===== PDF.js CANVAS ===== */
#pdf-canvas {
  display: block;
  border-radius: 4px;
  box-shadow: 0 12px 40px rgba(0,0,0,.28);
  max-width: 100%;
}

@keyframes slide-from-right {
  from { opacity: 0; transform: translateX(28px); }
  to   { opacity: 1; transform: translateX(0); }
}

@keyframes slide-from-left {
  from { opacity: 0; transform: translateX(-28px); }
  to   { opacity: 1; transform: translateX(0); }
}

.slide-from-right { animation: slide-from-right 0.22s ease-out; }
.slide-from-left  { animation: slide-from-left  0.22s ease-out; }

/* ── Overlay page-turn buttons ─────────────────────────────────── */
.sheet-page-btn {
  position: absolute;
  top: 0;
  bottom: 0;
  width: 60px;
  display: flex;
  align-items: center;
  justify-content: center;
  border: none;
  background: transparent;
  cursor: pointer;
  z-index: 6;
  opacity: 0;
  pointer-events: none;
  transition: opacity .2s;
}
.sheet-page-btn--prev { left: 0; }
.sheet-page-btn--next { right: 0; }

.viewer-sheet:hover .sheet-page-btn:not([disabled]) {
  opacity: 1;
  pointer-events: auto;
}
.sheet-page-btn[disabled] { opacity: 0 !important; pointer-events: none; }

.sheet-page-btn-icon {
  width: 40px;
  height: 40px;
  border-radius: 50%;
  background: rgba(22, 34, 77, 0.55);
  backdrop-filter: blur(6px);
  -webkit-backdrop-filter: blur(6px);
  display: flex;
  align-items: center;
  justify-content: center;
  line-height: 0;
  color: #fff;
  transition: background .15s, transform .12s;
}
.sheet-page-btn:hover .sheet-page-btn-icon {
  background: rgba(22, 34, 77, 0.85);
  transform: scale(1.1);
}
.viewer.dark .sheet-page-btn-icon {
  background: rgba(255, 255, 255, 0.15);
}
.viewer.dark .sheet-page-btn:hover .sheet-page-btn-icon {
  background: rgba(255, 255, 255, 0.28);
}

/* Placeholder score sheet */
.sheet-placeholder {
  background: var(--paper);
  border-radius: 4px;
  box-shadow: 0 12px 40px rgba(0,0,0,.28);
  padding: 6.5% 8% 5%;
  position: relative;
  color: #1a1a1a;
  margin: 0 auto;
  aspect-ratio: 1 / 1.32;
  height: fit-content;
}

.placeholder-title {
  font-family: 'Cormorant Garamond', serif;
  font-size: clamp(22px, 2.4vw, 30px);
  font-weight: 600;
  color: #15151a;
  text-align: center;
}

.placeholder-cat {
  font-family: 'Cormorant Garamond', serif;
  font-style: italic;
  font-size: 14px;
  color: #555;
  text-align: center;
}

.placeholder-credits {
  display: flex;
  justify-content: space-between;
  font-size: 11px;
  color: #444;
  margin-top: 14px;
}

.placeholder-credits-right { text-align: right; }

.placeholder-tempo {
  font-size: 11px;
  color: #444;
  margin-top: 12px;
}

.staff {
  position: relative;
  height: 64px;
  margin-bottom: 22px;
}

.staff-lines {
  position: absolute;
  left: 0;
  right: 0;
  top: 8px;
  height: 49px;
  background: repeating-linear-gradient(to bottom, #9a958a 0 1px, transparent 1px 12px);
}

.staff-bar-l,
.staff-bar-r {
  position: absolute;
  top: 8px;
  width: 1.5px;
  height: 48px;
  background: #9a958a;
}

.staff-bar-l { left: 0; }
.staff-bar-r { right: 0; }

.placeholder-staves { margin-top: 18px; }

.placeholder-watermark {
  position: absolute;
  top: 42%;
  left: 0;
  right: 0;
  text-align: center;
  font-family: 'Cormorant Garamond', serif;
  font-size: 64px;
  font-weight: 700;
  color: rgba(22,34,77,.05);
  letter-spacing: .2em;
  pointer-events: none;
  user-select: none;
}

.placeholder-page-num {
  position: absolute;
  bottom: 3.5%;
  right: 8%;
  font-size: 11px;
  color: #666;
}

.placeholder-footer-label {
  position: absolute;
  bottom: 3.5%;
  left: 8%;
  font-family: 'SF Mono', ui-monospace, monospace;
  font-size: 9px;
  color: #b9b3a4;
  letter-spacing: .08em;
}

/* ===== VIEWER BOTTOM BAR ===== */
.viewer-bottom {
  flex: none;
  border-top: 1px solid var(--v-border);
  padding: 8px clamp(12px, 3vw, 24px) max(8px, env(safe-area-inset-bottom));
  display: flex;
  flex-direction: column;
  gap: 6px;
}

/* Audio panel (collapsible) */
.audio-panel {
  display: none;
  flex-direction: column;
  gap: 7px;
  padding-bottom: 8px;
  border-bottom: 1px solid var(--v-border);
}

.audio-panel--open {
  display: flex;
}

/* Audio player */
.audio-player {
  display: flex;
  align-items: center;
  gap: 12px;
}

.audio-play-btn {
  width: 48px;
  height: 48px;
  flex: none;
  border-radius: 50%;
  border: 0;
  background: var(--gold);
  color: #fff;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  line-height: 0;
}

.audio-track-wrap {
  flex: 1;
  min-width: 0;
}

.audio-labels {
  display: flex;
  justify-content: space-between;
  font-size: 11px;
  opacity: .72;
  margin-bottom: 5px;
}

.audio-yt a {
  color: var(--gold);
  text-decoration: none;
  font-weight: 600;
}

.audio-track {
  height: 5px;
  border-radius: 3px;
  background: rgba(150,150,150,.28);
  overflow: hidden;
}

.audio-progress {
  height: 100%;
  background: var(--gold);
  border-radius: 3px;
  transition: width .2s linear;
}

/* Controls row: page nav + zoom + audio toggle */
.controls-row {
  display: flex;
  align-items: center;
  gap: 10px;
  justify-content: center;
}

.voice-selector {
  display: flex;
  gap: 6px;
  overflow-x: auto;
  scrollbar-width: none;
}

.voice-selector::-webkit-scrollbar { display: none; }

.voice-btn {
  flex: none;
  height: 34px;
  padding: 0 14px;
  border-radius: 8px;
  border: 1px solid rgba(150,150,150,.3);
  background: transparent;
  color: inherit;
  cursor: pointer;
  font-size: 13px;
  font-weight: 600;
  transition: background .15s, color .15s, border-color .15s;
  opacity: .75;
}

.voice-btn.active {
  background: var(--gold);
  color: #fff;
  border-color: var(--gold);
  opacity: 1;
}

/* Page nav */
.page-nav {
  flex: none;
  display: flex;
  align-items: center;
  gap: 8px;
}

.page-nav-btn {
  width: 38px;
  height: 38px;
  border-radius: 9px;
  border: 1px solid var(--v-border);
  background: transparent;
  color: inherit;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  line-height: 0;
  transition: opacity .15s;
}

.page-nav-btn:disabled { opacity: .4; cursor: default; }

.page-nav-label {
  font-size: 12px;
  min-width: 62px;
  text-align: center;
  opacity: .8;
}

/* Zoom */
.zoom-controls {
  flex: none;
  display: flex;
  align-items: center;
  gap: 6px;
}

.zoom-btn {
  width: 38px;
  height: 38px;
  border-radius: 9px;
  border: 1px solid var(--v-border);
  background: transparent;
  color: inherit;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  line-height: 0;
}

.zoom-label {
  font-size: 11px;
  min-width: 42px;
  text-align: center;
  opacity: .7;
}


/* Hymn navigation */
.hymn-nav {
  display: flex;
  justify-content: space-between;
  gap: 10px;
}

.hymn-nav-btn {
  flex: 1;
  height: 40px;
  border-radius: 9px;
  border: 1px solid var(--v-border);
  background: transparent;
  color: inherit;
  cursor: pointer;
  font-size: 13px;
  font-weight: 600;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  min-width: 0;
  transition: opacity .15s;
}

.hymn-nav-btn:disabled { opacity: .35; cursor: default; }

.hymn-nav-btn span {
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  min-width: 0;
}

/* ===== VIEWER FULLSCREEN MODE ===== */
.viewer--fullscreen .viewer-topbar { display: none; }

.viewer--fullscreen .viewer-sheet {
  padding: 6px;
  overflow: hidden;
  align-items: center;
}

.viewer--fullscreen .viewer-bottom {
  background: rgba(0,0,0,.52);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border-top: 1px solid rgba(255,255,255,.12);
  color: rgba(233,230,223,.95);
}

.viewer--fullscreen .viewer-bottom .page-nav-btn,
.viewer--fullscreen .viewer-bottom .zoom-btn,
.viewer--fullscreen .viewer-bottom .viewer-btn--icon {
  border-color: rgba(255,255,255,.22);
  color: rgba(233,230,223,.95);
}

.viewer--fullscreen .viewer-bottom .zoom-label,
.viewer--fullscreen .viewer-bottom .page-nav-label {
  color: rgba(233,230,223,.75);
}

.viewer-sheet { position: relative; }

.viewer-fs-overlay {
  display: none;
  position: absolute;
  inset: 0;
  pointer-events: none;
  z-index: 5;
}

.viewer--fullscreen .viewer-fs-overlay { display: block; }
.viewer-fs-overlay > * { pointer-events: auto; }

.viewer-fs-exit {
  position: absolute;
  top: calc(12px + env(safe-area-inset-top, 0px));
  right: calc(12px + env(safe-area-inset-right, 0px));
  width: 40px;
  height: 40px;
  border-radius: 50%;
  background: rgba(0,0,0,.48);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  border: 1px solid rgba(255,255,255,.22);
  color: #fff;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  line-height: 0;
}

.viewer-fs-bottom {
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  padding: 24px 16px calc(12px + env(safe-area-inset-bottom, 0px));
  background: linear-gradient(to top, rgba(0,0,0,.42) 0%, transparent 100%);
}

.viewer-fs-page-nav {
  display: flex;
  align-items: center;
  gap: 10px;
}

.viewer-fs-page-nav .page-nav-btn {
  background: rgba(255,255,255,.14);
  border-color: rgba(255,255,255,.28);
  color: #fff;
}

.viewer-fs-page-nav .page-nav-btn:disabled { opacity: .28; cursor: default; }

.viewer-fs-page-nav .page-nav-label {
  color: #fff;
  font-size: 13px;
  font-weight: 600;
  min-width: 52px;
  text-align: center;
  opacity: 1;
}

.viewer-fs-hymn-nav {
  display: flex;
  gap: 8px;
  width: 100%;
  max-width: 520px;
}

.viewer-fs-hymn-nav .hymn-nav-btn {
  background: rgba(255,255,255,.12);
  border-color: rgba(255,255,255,.22);
  color: #fff;
}

.viewer-fs-hymn-nav .hymn-nav-btn:disabled { opacity: .28; cursor: default; }

/* ===== RESPONSIVE ===== */
@media (max-width: 520px) {
  .az-rail { display: none; }
  .hymn-nav-btn span { display: none; }
  .header-edition { display: none; }
  .header-sep { display: none; }
}

/* ===== iOS PWA INSTALL BANNER ===== */
.install-banner {
  position: fixed;
  bottom: calc(16px + env(safe-area-inset-bottom));
  left: 16px;
  right: 16px;
  z-index: 9999;
  background: var(--navy);
  color: #fff;
  border-radius: var(--r-card);
  padding: 14px 16px;
  display: flex;
  align-items: center;
  gap: 12px;
  box-shadow: 0 4px 24px rgba(22,34,77,.35);
  animation: banner-slide-up .3s ease;
}

@keyframes banner-slide-up {
  from { opacity: 0; transform: translateY(20px); }
  to   { opacity: 1; transform: translateY(0); }
}

.install-banner--hiding {
  animation: banner-slide-down .25s ease forwards;
}

@keyframes banner-slide-down {
  to { opacity: 0; transform: translateY(20px); }
}

.install-banner__icon {
  flex: none;
  color: var(--gold);
  display: flex;
  align-items: center;
}

.install-banner__text {
  flex: 1;
  font-size: 13px;
  line-height: 1.5;
  color: rgba(255,255,255,.9);
}

.install-banner__text strong {
  color: #fff;
  font-weight: 600;
}

.install-banner__share-icon {
  display: inline-block;
  vertical-align: middle;
  margin: 0 2px;
  position: relative;
  top: -1px;
}

.install-banner__close {
  flex: none;
  background: rgba(255,255,255,.12);
  border: none;
  border-radius: 50%;
  width: 28px;
  height: 28px;
  display: flex;
  align-items: center;
  justify-content: center;
  color: rgba(255,255,255,.8);
  cursor: pointer;
  transition: background .15s;
}

.install-banner__close:hover {
  background: rgba(255,255,255,.22);
}
