/* ==============================================================================
   Dauroh Pengurusan Jenazah - Native Mobile-First Stylesheet
   Desain Terinspirasi dari Slide Presentasi Asli (Ust. Heru Supardi, M.A)
   Kolaborasi Masjid Nurul Falah & UPZ Nurul Falah
   ============================================================================== */

@import url('https://fonts.googleapis.com/css2?family=Amiri:ital,wght@0,400;0,700;1,400&family=Plus+Jakarta+Sans:wght@400;500;600;700;800&display=swap');

:root {
  /* Warna Khas Slide Dauroh */
  --emerald-dark: #0f2721;
  --emerald-main: #173d35;
  --emerald-light: #24584c;
  --emerald-soft: #eaf1ee;
  --gold: #c7a65b;
  --gold-light: #dfc282;
  --gold-pale: #fbf7ee;
  --bg-page: #f1f4f2;
  --bg-card: #ffffff;
  --text-main: #1c2b25;
  --text-muted: #5e7067;
  --border-light: #dbe4df;
  --border-gold: rgba(199, 166, 91, 0.45);
  
  --shadow-sm: 0 2px 8px rgba(18, 41, 33, 0.06);
  --shadow-md: 0 8px 24px rgba(18, 41, 33, 0.10);
  --shadow-lg: 0 16px 36px rgba(18, 41, 33, 0.16);

  --radius-sm: 8px;
  --radius-md: 14px;
  --radius-lg: 20px;
  --bottom-bar-height: 64px;

  /* Font Scaling */
  --font-base: 15px;
  --font-arabic: 25px;
}

body[data-font-size="sm"] {
  --font-base: 13.5px;
  --font-arabic: 22px;
}
body[data-font-size="lg"] {
  --font-base: 17px;
  --font-arabic: 29px;
}

[data-theme="dark"] {
  --emerald-dark: #071512;
  --emerald-main: #1b453c;
  --emerald-light: #2a6557;
  --emerald-soft: #192723;
  --gold: #d8b76c;
  --gold-light: #f3d793;
  --gold-pale: #1e2824;
  --bg-page: #0d1613;
  --bg-card: #15221e;
  --text-main: #e8f0ec;
  --text-muted: #9ab0a6;
  --border-light: #24352f;
  --border-gold: rgba(216, 183, 108, 0.35);
  --shadow-sm: 0 2px 8px rgba(0, 0, 0, 0.3);
  --shadow-md: 0 8px 24px rgba(0, 0, 0, 0.4);
}

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

body {
  font-family: 'Plus Jakarta Sans', -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
  font-size: var(--font-base);
  background-color: var(--bg-page);
  color: var(--text-main);
  line-height: 1.6;
  min-height: 100vh;
  padding-bottom: calc(var(--bottom-bar-height) + env(safe-area-inset-bottom, 16px) + 24px);
  overflow-x: hidden;
  transition: background-color 0.2s ease, color 0.2s ease;
}

/* ==============================================================================
   HEADER & NAVBAR
   ============================================================================== */
.app-header {
  background: linear-gradient(135deg, var(--emerald-dark) 0%, var(--emerald-main) 100%);
  color: #ffffff;
  position: sticky;
  top: 0;
  z-index: 50;
  box-shadow: 0 4px 18px rgba(10, 27, 23, 0.25);
  border-bottom: 2px solid var(--gold);
}

.header-container {
  max-width: 900px;
  margin: 0 auto;
  padding: 10px 16px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.header-brand {
  display: flex;
  align-items: center;
  gap: 10px;
  text-decoration: none;
  color: #ffffff;
  min-width: 0;
}

.header-logos-pair {
  display: flex;
  align-items: center;
  gap: 6px;
  flex-shrink: 0;
}

.header-logo {
  height: 36px;
  width: auto;
  max-width: 38px;
  object-fit: contain;
  background: #ffffff;
  border-radius: 8px;
  padding: 2px 3px;
  box-shadow: 0 2px 5px rgba(0,0,0,0.25);
  transition: transform 0.15s ease;
}

.header-logo:hover {
  transform: scale(1.05);
}

.header-logo.logo-upz {
  background: #ffffff;
}

.header-logo.logo-masjid {
  background: #ffffff;
}

.header-title-wrap {
  display: flex;
  flex-direction: column;
  min-width: 0;
}

.header-title {
  font-size: 15px;
  font-weight: 800;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  letter-spacing: -0.2px;
}

.header-subtitle {
  font-size: 11px;
  color: var(--gold-light);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  display: flex;
  align-items: center;
  gap: 4px;
}

.header-actions {
  display: flex;
  align-items: center;
  gap: 6px;
}

.icon-btn {
  background: rgba(255, 255, 255, 0.12);
  border: 1px solid rgba(255, 255, 255, 0.2);
  color: #ffffff;
  width: 38px;
  height: 38px;
  border-radius: 10px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: all 0.2s ease;
  flex-shrink: 0;
  text-decoration: none;
}

.icon-btn:hover, .icon-btn:active {
  background: rgba(255, 255, 255, 0.22);
  transform: translateY(-1px);
}

/* ==============================================================================
   STAGE HORIZONTAL NAVIGATION BAR (Sticky Pill Scroller)
   ============================================================================== */
.stages-nav-wrapper {
  background: var(--bg-card);
  border-bottom: 1px solid var(--border-light);
  position: sticky;
  top: 58px;
  z-index: 40;
  box-shadow: 0 2px 8px rgba(0,0,0,0.03);
}

.stages-nav-scroll {
  max-width: 900px;
  margin: 0 auto;
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 8px 12px;
  overflow-x: auto;
  scrollbar-width: none;
  -webkit-overflow-scrolling: touch;
}

.stages-nav-scroll::-webkit-scrollbar {
  display: none;
}

.stage-nav-pill {
  border: 1px solid var(--border-light);
  background: var(--bg-page);
  color: var(--text-muted);
  padding: 6px 13px;
  border-radius: 20px;
  font-size: 12px;
  font-weight: 700;
  white-space: nowrap;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  transition: all 0.2s ease;
  text-decoration: none;
  flex-shrink: 0;
}

.stage-nav-pill:hover {
  border-color: var(--gold);
  color: var(--emerald-main);
}

.stage-nav-pill.active {
  background: linear-gradient(135deg, var(--emerald-main) 0%, var(--emerald-light) 100%);
  color: #ffffff;
  border-color: var(--emerald-main);
  box-shadow: 0 2px 8px rgba(23, 61, 53, 0.25);
}

.stage-nav-pill.active .pill-num {
  background: var(--gold);
  color: var(--emerald-dark);
}

.pill-num {
  font-size: 10px;
  font-weight: 800;
  padding: 1px 6px;
  border-radius: 10px;
  background: rgba(0,0,0,0.07);
}

/* ==============================================================================
   READING TOOLBAR
   ============================================================================== */
.reading-toolbar {
  max-width: 900px;
  margin: 12px auto 6px;
  padding: 0 12px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  flex-wrap: wrap;
}

.font-size-adjuster {
  display: inline-flex;
  align-items: center;
  background: var(--bg-card);
  border: 1px solid var(--border-light);
  border-radius: 10px;
  padding: 2px;
  box-shadow: var(--shadow-sm);
}

.font-btn {
  background: transparent;
  border: none;
  color: var(--text-muted);
  font-weight: 800;
  padding: 4px 10px;
  border-radius: 6px;
  cursor: pointer;
  font-size: 12px;
  transition: all 0.15s ease;
}

.font-btn.active {
  background: var(--emerald-main);
  color: #ffffff;
}

.mode-toggle-link {
  font-size: 12px;
  font-weight: 700;
  color: var(--emerald-main);
  background: var(--gold-pale);
  border: 1px solid var(--gold);
  padding: 5px 12px;
  border-radius: 8px;
  text-decoration: none;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  transition: all 0.15s ease;
}

.mode-toggle-link:hover {
  background: var(--gold);
  color: var(--emerald-dark);
}

/* ==============================================================================
   MAIN CONTAINER
   ============================================================================== */
.main-reader {
  max-width: 900px;
  margin: 0 auto;
  padding: 8px 12px 24px;
}

/* ==============================================================================
   SLIDE-LIKE HERO BANNER (Emerald + Gold Diamond)
   ============================================================================== */
.slide-banner-hero {
  background: linear-gradient(135deg, var(--emerald-dark) 0%, var(--emerald-main) 100%);
  color: #ffffff;
  border-radius: var(--radius-md);
  padding: 20px 18px;
  margin-bottom: 16px;
  box-shadow: var(--shadow-md);
  position: relative;
  overflow: hidden;
  border: 1px solid rgba(199, 166, 91, 0.4);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
}

.slide-banner-content {
  flex: 1;
  min-width: 0;
  z-index: 2;
}

/* Pill persis slide asli */
.slide-category-pill {
  display: inline-block;
  background: #ffffff;
  color: var(--emerald-main);
  border: 1px solid var(--border-light);
  font-size: 11px;
  font-weight: 800;
  text-transform: uppercase;
  padding: 3px 12px;
  border-radius: 20px;
  letter-spacing: 0.5px;
  margin-bottom: 8px;
  box-shadow: 0 2px 4px rgba(0,0,0,0.1);
}

.slide-banner-title {
  font-size: clamp(20px, 4.5vw, 26px);
  font-weight: 800;
  line-height: 1.25;
  letter-spacing: -0.3px;
  margin-bottom: 6px;
}

.slide-banner-sub {
  font-size: 13.5px;
  color: rgba(255, 255, 255, 0.88);
  line-height: 1.45;
}

/* Diamond Badge persis slide divider */
.slide-diamond-badge {
  width: 58px;
  height: 58px;
  background: linear-gradient(135deg, var(--emerald-dark) 0%, #1a4239 100%);
  border: 2px solid var(--gold);
  transform: rotate(45deg);
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  box-shadow: 0 4px 14px rgba(0,0,0,0.3);
  margin-right: 6px;
}

.slide-diamond-num {
  transform: rotate(-45deg);
  font-size: 20px;
  font-weight: 800;
  color: var(--gold-light);
  letter-spacing: -0.5px;
}

/* ==============================================================================
   DALIL & HADITS BANNER (Dark Emerald Card)
   ============================================================================== */
.slide-dalil-box {
  background: linear-gradient(135deg, var(--emerald-main) 0%, #102d26 100%);
  color: #ffffff;
  border-radius: var(--radius-md);
  padding: 16px 18px;
  margin-bottom: 16px;
  box-shadow: var(--shadow-sm);
  border-left: 4px solid var(--gold);
}

.slide-dalil-arabic {
  font-family: 'Amiri', serif;
  font-size: var(--font-arabic);
  direction: rtl;
  text-align: right;
  line-height: 1.8;
  color: #ffffff;
  margin-bottom: 8px;
}

.slide-dalil-trans {
  font-size: 13px;
  color: #e5ece8;
  font-style: italic;
  margin-bottom: 6px;
}

.slide-dalil-source {
  font-size: 11.5px;
  font-weight: 700;
  color: var(--gold-light);
  display: flex;
  align-items: center;
  gap: 6px;
}

/* ==============================================================================
   STEP ITEM CARD (Clean White with Green Numbered Circle)
   ============================================================================== */
.step-item-card {
  background: var(--bg-card);
  border: 1px solid var(--border-light);
  border-radius: var(--radius-md);
  padding: 16px;
  margin-bottom: 14px;
  box-shadow: var(--shadow-sm);
  transition: transform 0.15s ease, box-shadow 0.15s ease;
}

.step-item-card:hover {
  box-shadow: var(--shadow-md);
}

.step-item-header {
  display: flex;
  align-items: flex-start;
  gap: 12px;
  margin-bottom: 8px;
}

.step-num-badge {
  width: 32px;
  height: 32px;
  border-radius: 50%;
  background: var(--emerald-main);
  color: #ffffff;
  font-weight: 800;
  font-size: 14px;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  box-shadow: 0 2px 6px rgba(23, 61, 53, 0.25);
}

.step-title-group {
  flex: 1;
}

.step-tag-pill {
  font-size: 10.5px;
  font-weight: 800;
  color: var(--gold);
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.step-main-title {
  font-size: 16px;
  font-weight: 800;
  color: var(--text-main);
  line-height: 1.35;
}

.step-desc-text {
  font-size: 13px;
  color: var(--text-muted);
  margin-bottom: 8px;
  line-height: 1.5;
}

.step-bullet-list {
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 6px;
  padding-left: 2px;
}

.step-bullet-list li {
  position: relative;
  padding-left: 18px;
  font-size: 13px;
  color: var(--text-main);
  line-height: 1.45;
}

.step-bullet-list li::before {
  content: "✔";
  position: absolute;
  left: 0;
  color: var(--emerald-main);
  font-size: 11px;
  top: 2px;
}

/* ==============================================================================
   PRAYER & ARABIC BOX (Golden Border like Slide 6 & 10)
   ============================================================================== */
.prayer-box-gold {
  background: var(--gold-pale);
  border: 1px solid var(--gold);
  border-radius: var(--radius-sm);
  padding: 14px 16px;
  margin: 12px 0 10px;
  position: relative;
  box-shadow: 0 2px 8px rgba(199, 166, 91, 0.12);
}

.prayer-box-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 8px;
  border-bottom: 1px dashed rgba(199, 166, 91, 0.4);
  padding-bottom: 6px;
}

.prayer-box-title {
  font-size: 12px;
  font-weight: 800;
  color: var(--emerald-main);
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.btn-copy-doa {
  background: #ffffff;
  border: 1px solid var(--gold);
  color: var(--emerald-dark);
  font-size: 11px;
  font-weight: 700;
  padding: 3px 9px;
  border-radius: 6px;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  gap: 4px;
  transition: all 0.15s ease;
}

.btn-copy-doa:active {
  background: var(--gold);
  color: #ffffff;
}

.prayer-arabic-text {
  font-family: 'Amiri', serif;
  font-size: var(--font-arabic);
  direction: rtl;
  text-align: right;
  line-height: 1.85;
  color: #0c201b;
  margin-bottom: 8px;
  word-spacing: 3px;
}

[data-theme="dark"] .prayer-arabic-text {
  color: #f7eee1;
}

.prayer-latin-text {
  font-size: 12.5px;
  font-style: italic;
  color: var(--emerald-light);
  line-height: 1.45;
  margin-bottom: 4px;
}

.prayer-trans-text {
  font-size: 12.5px;
  color: var(--text-muted);
  line-height: 1.45;
}

/* ==============================================================================
   DIAGRAM CARDS (Interactive Visual Graphic Components)
   ============================================================================== */
.diagram-card {
  background: #ffffff;
  border: 1px solid var(--border-light);
  border-radius: var(--radius-md);
  padding: 16px;
  margin: 14px 0;
  box-shadow: var(--shadow-sm);
}

.diagram-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 12px;
}

.diagram-title {
  font-size: 14.5px;
  font-weight: 800;
  color: var(--emerald-main);
  display: flex;
  align-items: center;
  gap: 8px;
}

/* Diagram Shroud (Slide 13: 5 Tali Kafan) */
.shroud-visual-board {
  background: var(--gold-pale);
  border: 2px dashed var(--gold);
  border-radius: var(--radius-sm);
  padding: 16px 12px;
  position: relative;
  max-width: 440px;
  margin: 0 auto;
}

.shroud-body-outline {
  background: #ffffff;
  border: 2px solid var(--emerald-main);
  border-radius: 24px;
  padding: 20px 14px;
  position: relative;
  text-align: center;
  box-shadow: 0 4px 12px rgba(0,0,0,0.06);
}

.shroud-rope-line {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin: 14px 0;
  position: relative;
}

.shroud-rope-line::before {
  content: "";
  position: absolute;
  left: 0;
  right: 0;
  height: 2px;
  background: #caa55a;
  z-index: 1;
}

.rope-tag-left {
  background: var(--emerald-main);
  color: #ffffff;
  font-size: 10px;
  font-weight: 800;
  padding: 2px 8px;
  border-radius: 4px;
  position: relative;
  z-index: 2;
}

.rope-tag-right {
  background: var(--gold);
  color: var(--emerald-dark);
  font-size: 10px;
  font-weight: 800;
  padding: 2px 8px;
  border-radius: 4px;
  position: relative;
  z-index: 2;
}

.shroud-knot-hint {
  font-size: 11.5px;
  font-weight: 700;
  color: var(--emerald-main);
  text-align: center;
  margin-top: 10px;
  background: #ffffff;
  padding: 6px 10px;
  border-radius: 6px;
  border: 1px solid var(--border-light);
}

/* Diagram Shalat Jenazah Alignment (Slide 18) */
.prayer-align-board {
  background: var(--bg-page);
  border: 1px solid var(--border-light);
  border-radius: var(--radius-sm);
  padding: 14px;
  margin-bottom: 10px;
}

.align-row {
  display: flex;
  align-items: center;
  justify-content: space-around;
  gap: 10px;
  margin: 12px 0;
}

.align-avatar {
  background: var(--emerald-main);
  color: #ffffff;
  font-size: 12px;
  font-weight: 800;
  padding: 8px 12px;
  border-radius: 8px;
  box-shadow: 0 2px 6px rgba(0,0,0,0.1);
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 2px;
}

.align-pointer {
  font-size: 18px;
  color: var(--gold);
  font-weight: bold;
}

.align-target {
  background: #ffffff;
  border: 2px solid var(--gold);
  color: var(--emerald-dark);
  font-size: 12px;
  font-weight: 700;
  padding: 8px 12px;
  border-radius: 8px;
  text-align: center;
}

/* ==============================================================================
   SUB-TABS SWITCHER (Laki-laki vs Perempuan)
   ============================================================================== */
.sub-tabs-bar {
  display: flex;
  background: var(--bg-card);
  border: 1px solid var(--border-light);
  border-radius: 12px;
  padding: 4px;
  gap: 4px;
  margin-bottom: 14px;
  box-shadow: var(--shadow-sm);
}

.sub-tab-btn {
  flex: 1;
  border: none;
  background: transparent;
  padding: 8px 12px;
  border-radius: 8px;
  font-size: 13px;
  font-weight: 700;
  color: var(--text-muted);
  cursor: pointer;
  transition: all 0.2s ease;
  text-align: center;
}

.sub-tab-btn.active {
  background: var(--emerald-main);
  color: #ffffff;
  box-shadow: 0 2px 8px rgba(23, 61, 53, 0.2);
}

.sub-tab-pane {
  display: none;
}

.sub-tab-pane.active {
  display: block;
}

/* ==============================================================================
   COMPARISON TABLE
   ============================================================================== */
.comparison-table-wrap {
  overflow-x: auto;
  border-radius: var(--radius-sm);
  border: 1px solid var(--border-light);
  margin: 14px 0;
  background: var(--bg-card);
}

.comparison-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 12.5px;
  text-align: left;
}

.comparison-table th {
  background: var(--emerald-main);
  color: #ffffff;
  padding: 10px 12px;
  font-weight: 700;
  border-bottom: 2px solid var(--gold);
}

.comparison-table td {
  padding: 9px 12px;
  border-bottom: 1px solid var(--border-light);
  color: var(--text-main);
  vertical-align: top;
}

.comparison-table tr:nth-child(even) td {
  background: var(--bg-page);
}

/* ==============================================================================
   CHECKLIST INTERAKTIF (Tahap 7 / Slide 23)
   ============================================================================== */
.checklist-item {
  display: flex;
  align-items: flex-start;
  gap: 12px;
  background: var(--bg-card);
  border: 1px solid var(--border-light);
  border-radius: 10px;
  padding: 10px 12px;
  margin-bottom: 6px;
  cursor: pointer;
  user-select: none;
  transition: all 0.15s ease;
}

.checklist-item:hover {
  border-color: var(--gold);
}

.checklist-item.checked {
  background: var(--gold-pale);
  border-color: var(--gold);
}

.checklist-checkbox {
  width: 20px;
  height: 20px;
  border: 2px solid var(--border-light);
  border-radius: 6px;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  margin-top: 1px;
  font-size: 12px;
  font-weight: bold;
  color: transparent;
  transition: all 0.15s ease;
}

.checklist-item.checked .checklist-checkbox {
  background: var(--emerald-main);
  border-color: var(--emerald-main);
  color: #ffffff;
}

.checklist-text {
  font-size: 13px;
  color: var(--text-main);
  line-height: 1.4;
  flex: 1;
}

.checklist-item.checked .checklist-text {
  text-decoration: line-through;
  color: var(--text-muted);
}

/* ==============================================================================
   SLIDE PEEK ACCORDION (Lihat Slide Gambar Asli)
   ============================================================================== */
.slide-peek-box {
  background: var(--bg-card);
  border: 1px solid var(--border-light);
  border-radius: var(--radius-md);
  padding: 12px;
  margin: 18px 0 10px;
  box-shadow: var(--shadow-sm);
}

.slide-peek-toggle {
  display: flex;
  align-items: center;
  justify-content: space-between;
  cursor: pointer;
  font-size: 13px;
  font-weight: 700;
  color: var(--emerald-main);
}

.slide-peek-content {
  display: none;
  margin-top: 10px;
}

.slide-peek-content.open {
  display: block;
}

.slide-peek-img-wrap {
  width: 100%;
  aspect-ratio: 16 / 9;
  background: #0d2520;
  border-radius: var(--radius-sm);
  overflow: hidden;
  cursor: pointer;
}

.slide-peek-img-wrap img {
  width: 100%;
  height: 100%;
  object-fit: contain;
  display: block;
}

/* ==============================================================================
   FOOTER NAVIGATION BETWEEN STAGES
   ============================================================================== */
.stage-footer-nav {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-top: 24px;
  padding-top: 16px;
  border-top: 1px solid var(--border-light);
}

.nav-stage-btn {
  background: var(--bg-card);
  border: 1px solid var(--border-light);
  border-radius: 12px;
  padding: 10px 16px;
  text-decoration: none;
  color: var(--text-main);
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-weight: 700;
  font-size: 13px;
  box-shadow: var(--shadow-sm);
  transition: all 0.2s ease;
  flex: 1;
  max-width: 220px;
}

.nav-stage-btn:hover {
  border-color: var(--gold);
  background: var(--gold-pale);
  color: var(--emerald-main);
  transform: translateY(-1px);
}

.nav-stage-btn.next {
  justify-content: flex-end;
  text-align: right;
  margin-left: auto;
}

/* ==============================================================================
   BOTTOM FIXED DOCK BAR (Mobile Thumb Reach)
   ============================================================================== */
.bottom-bar {
  position: fixed;
  bottom: 0;
  left: 0;
  right: 0;
  height: calc(var(--bottom-bar-height) + env(safe-area-inset-bottom, 0px));
  padding-bottom: env(safe-area-inset-bottom, 0px);
  background: rgba(15, 39, 33, 0.95);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border-top: 1px solid rgba(199, 166, 91, 0.35);
  box-shadow: 0 -4px 20px rgba(0, 0, 0, 0.25);
  z-index: 100;
}

.bottom-bar-inner {
  max-width: 640px;
  margin: 0 auto;
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: space-around;
  padding: 0 8px;
}

.dock-btn {
  background: transparent;
  border: none;
  color: #c9d8d2;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 3px;
  font-size: 10.5px;
  font-weight: 600;
  cursor: pointer;
  padding: 6px 10px;
  border-radius: 10px;
  transition: all 0.15s ease;
  min-width: 52px;
  text-decoration: none;
}

.dock-btn svg {
  width: 19px;
  height: 19px;
  stroke-width: 2.2;
}

.dock-btn:hover, .dock-btn:active {
  color: #ffffff;
  background: rgba(255, 255, 255, 0.1);
  transform: translateY(-1px);
}

.dock-btn.highlight,
.dock-btn.active {
  color: var(--gold-light);
}

.dock-btn.highlight svg,
.dock-btn.active svg {
  stroke: var(--gold-light);
}

.dock-btn-main {
  background: linear-gradient(135deg, var(--gold) 0%, #dbba72 100%);
  color: var(--emerald-dark) !important;
  border-radius: 12px;
  padding: 7px 12px;
  font-weight: 700;
  box-shadow: 0 4px 12px rgba(199, 166, 91, 0.35);
}

.dock-btn-main svg {
  stroke: var(--emerald-dark) !important;
}

/* ==============================================================================
   TOAST & MODALS
   ============================================================================== */
.toast-notice {
  position: fixed;
  top: 70px;
  left: 50%;
  transform: translateX(-50%) translateY(-20px);
  background: rgba(15, 37, 32, 0.95);
  color: #ffffff;
  padding: 10px 18px;
  border-radius: 30px;
  font-size: 13px;
  font-weight: 600;
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.3);
  border: 1px solid var(--gold);
  z-index: 500;
  opacity: 0;
  pointer-events: none;
  transition: all 0.25s cubic-bezier(0.2, 0.8, 0.2, 1);
  display: flex;
  align-items: center;
  gap: 8px;
}

.toast-notice.show {
  opacity: 1;
  transform: translateX(-50%) translateY(0);
}

/* Modals */
.modal-backdrop {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: rgba(10, 20, 17, 0.75);
  backdrop-filter: blur(5px);
  -webkit-backdrop-filter: blur(5px);
  z-index: 200;
  display: none;
  align-items: flex-end;
  justify-content: center;
  opacity: 0;
  transition: opacity 0.25s ease;
}

.modal-backdrop.open {
  display: flex;
  opacity: 1;
}

.drawer-sheet {
  background: var(--bg-card);
  width: 100%;
  max-width: 720px;
  max-height: 86vh;
  border-radius: var(--radius-lg) var(--radius-lg) 0 0;
  box-shadow: 0 -8px 32px rgba(0, 0, 0, 0.35);
  border: 1px solid var(--border-light);
  border-bottom: none;
  display: flex;
  flex-direction: column;
  transform: translateY(100%);
  transition: transform 0.3s cubic-bezier(0.15, 0.9, 0.2, 1);
  overflow: hidden;
}

.modal-backdrop.open .drawer-sheet {
  transform: translateY(0);
}

.drawer-header {
  padding: 14px 18px 10px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  border-bottom: 1px solid var(--border-light);
  position: relative;
}

.drawer-drag-handle {
  position: absolute;
  top: 6px;
  left: 50%;
  transform: translateX(-50%);
  width: 40px;
  height: 4px;
  background: var(--border-light);
  border-radius: 4px;
}

.drawer-title {
  font-size: 15px;
  font-weight: 700;
  color: var(--text-main);
  display: flex;
  align-items: center;
  gap: 8px;
}

.drawer-close {
  background: var(--bg-page);
  border: none;
  color: var(--text-muted);
  width: 32px;
  height: 32px;
  border-radius: 8px;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
}

.drawer-body {
  padding: 16px;
  overflow-y: auto;
  -webkit-overflow-scrolling: touch;
}

@media (min-width: 768px) {
  body {
    padding-bottom: 30px;
  }
  .bottom-bar {
    display: none;
  }
}
