/* ==========================================================================
   PURE BULLETPROOF SOVEREIGN DESIGN SYSTEM (Sovereign Architectural Edition 2026)
   ========================================================================== */
*, *::before, *::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
  -webkit-tap-highlight-color: transparent;
}

html {
  background-color: #09090b;
  color: #fafafa;
  font-family: 'Jost', 'Plus Jakarta Sans', system-ui, sans-serif;
  color-scheme: dark;
  -webkit-font-smoothing: antialiased;
  height: 100%;
}

html[dir="rtl"] {
  font-family: 'Alexandria', sans-serif;
}

body {
  min-height: 100vh;
  min-height: 100dvh;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  align-items: center;
  padding: 2.5rem 1rem max(1.5rem, env(safe-area-inset-bottom)) 1rem;
  overflow-x: hidden;
  position: relative;
}

/* Ambient Center Lighting */
.ambient-glow {
  position: fixed;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  width: min(500px, 80vw);
  height: min(500px, 80vw);
  background: radial-gradient(circle, rgba(255, 255, 255, 0.08) 0%, transparent 65%);
  filter: blur(120px);
  pointer-events: none;
  z-index: 0;
}

/* Core Sanctuary Container */
.sanctuary-core {
  position: relative;
  z-index: 1;
  width: 100%;
  max-width: 480px;
  margin: auto 0;
  display: flex;
  flex-direction: column;
  gap: 2.25rem;
  text-align: center;
}

/* HERO HEADER */
.hero-block {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.35rem;
  width: 100%;
}

.archival-tag {
  display: inline-block;
  font-family: 'JetBrains Mono', monospace;
  font-size: 0.52rem;
  font-weight: 600;
  letter-spacing: 0.22em;
  color: #71717a;
  text-transform: uppercase;
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid rgba(255, 255, 255, 0.08);
  padding: 2px 8px;
  border-radius: 4px;
  direction: ltr !important;
}

.apex-arabic {
  font-family: 'Alexandria', sans-serif !important;
  font-size: clamp(1.9rem, 6vw, 2.4rem);
  font-weight: 800;
  color: #ffffff;
  line-height: 1.25;
  margin-top: 0.2rem;
  text-shadow: 0 0 25px rgba(255, 255, 255, 0.15);
  user-select: none;
}

.apex-latin {
  font-family: 'Jost', 'Alexandria', sans-serif;
  font-size: 0.62rem;
  font-weight: 600;
  letter-spacing: 0.44em;
  margin-right: -0.44em;
  text-transform: uppercase;
  background: linear-gradient(180deg, #ffffff 0%, rgba(255, 255, 255, 0.8) 40%, rgba(161, 161, 170, 0.5) 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  direction: ltr !important;
  margin-top: 0.1rem;
  user-select: none;
}

/* ZERO LAYOUT SHIFT TELEPROMPTER */
.saying-teleprompter {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  height: 56px;
  min-height: 56px;
  max-height: 56px;
  max-width: 440px;
  width: 100%;
  margin-top: 0.35rem;
  cursor: pointer;
  padding: 0 8px;
  border-radius: 8px;
  user-select: none;
  position: relative;
  overflow: hidden;
}

.saying-content-wrapper {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 0.2rem;
  width: 100%;
  transition: opacity 0.35s ease, transform 0.35s ease;
}

.saying-teleprompter.fading .saying-content-wrapper {
  opacity: 0;
  transform: translateY(3px);
}

.saying-text {
  font-family: 'Jost', sans-serif;
  font-size: 0.84rem;
  color: #a1a1aa;
  line-height: 1.45;
  font-style: italic;
  font-weight: 400;
  letter-spacing: 0.01em;
  transition: color 0.2s ease;
  text-align: center;
}
html[dir="rtl"] .saying-text {
  font-family: 'Alexandria', sans-serif;
  font-size: 0.84rem;
  line-height: 1.65;
  font-style: normal !important;
}

.saying-author {
  font-family: 'JetBrains Mono', monospace;
  font-size: 0.60rem;
  font-weight: 600;
  letter-spacing: 0.1em;
  color: #71717a;
  opacity: 0.85;
  text-align: center;
  text-transform: uppercase;
}
html[dir="rtl"] .saying-author {
  font-family: 'Alexandria', sans-serif;
  font-size: 0.65rem;
  letter-spacing: normal;
}

.saying-teleprompter:hover .saying-text { color: #ffffff; }
.saying-teleprompter:hover .saying-author { color: #a1a1aa; }

/* 3 PUBLIC KNOWLEDGE PILLARS */
.pillar-stack {
  width: 100%;
  display: flex;
  flex-direction: column;
  gap: 0.35rem;
}

.pillar-row {
  display: grid;
  grid-template-columns: auto 1fr auto;
  align-items: center;
  gap: 0.95rem;
  padding: 0.95rem 0.85rem;
  border-radius: 12px;
  background: transparent;
  cursor: pointer;
  text-decoration: none;
  color: inherit;
  transition: background 0.25s cubic-bezier(0.16, 1, 0.3, 1), transform 0.25s cubic-bezier(0.16, 1, 0.3, 1);
  width: 100%;
  position: relative;
}
.pillar-row:hover {
  background: rgba(255, 255, 255, 0.035);
  transform: translateY(-1px);
}

.pillar-num {
  font-family: 'JetBrains Mono', monospace;
  font-size: 0.75rem;
  font-weight: 600;
  color: #71717a;
  transition: color 0.2s ease;
}
html[dir="rtl"] .pillar-num {
  font-family: 'Alexandria', sans-serif;
  font-size: 0.80rem;
  font-weight: 700;
}
.pillar-row:hover .pillar-num { color: #ffffff; }

.pillar-info {
  display: flex;
  flex-direction: column;
  gap: 0.15rem;
  text-align: left;
  min-width: 0;
}
html[dir="rtl"] .pillar-info { text-align: right; }

.pillar-title {
  font-family: 'Jost', sans-serif;
  font-size: 0.92rem;
  font-weight: 600;
  letter-spacing: -0.01em;
  color: #fafafa;
  line-height: 1.35;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: normal;
  transition: color 0.2s ease;
}
html[dir="rtl"] .pillar-title { font-size: 0.90rem; font-weight: 700; }
.pillar-row:hover .pillar-title { color: #ffffff; }

.pillar-sub {
  font-family: 'Jost', sans-serif;
  font-size: 0.76rem;
  color: #71717a;
  line-height: 1.4;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: normal;
  transition: color 0.2s ease;
}
html[dir="rtl"] .pillar-sub { font-family: 'Alexandria', sans-serif; font-size: 0.75rem; }
.pillar-row:hover .pillar-sub { color: #a1a1aa; }

/* ELEGANT ARCHITECTURAL HAIRLINE INDICATOR (REPLACED ARROW) */
.pillar-indicator {
  width: 24px;
  height: 24px;
  border-radius: 6px;
  display: grid;
  place-items: center;
  color: #52525b;
  opacity: 0.55;
  background: rgba(255, 255, 255, 0.02);
  border: 1px solid rgba(255, 255, 255, 0.04);
  transition: all 0.25s cubic-bezier(0.16, 1, 0.3, 1);
  flex-shrink: 0;
}
.pillar-indicator svg {
  transition: transform 0.25s cubic-bezier(0.16, 1, 0.3, 1);
}
.pillar-row:hover .pillar-indicator {
  color: #ffffff;
  opacity: 1;
  background: rgba(255, 255, 255, 0.08);
  border-color: rgba(255, 255, 255, 0.18);
  transform: scale(1.08);
}
.pillar-row:hover .pillar-indicator svg {
  transform: scale(1.2) rotate(45deg);
}

/* BOTTOM CONTROLS DOCK */
.bottom-dock-container {
  position: relative;
  z-index: 10;
  width: 100%;
  max-width: 480px;
  margin-top: auto;
  padding-top: 1rem;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  direction: ltr !important;
}

.omni-pill {
  position: relative;
  height: 36px;
  width: 36px;
  border-radius: 9999px;
  background: rgba(18, 18, 22, 0.8);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  border: 1px solid rgba(255, 255, 255, 0.1);
  display: flex;
  align-items: center;
  justify-content: center;
  transition: width 0.25s cubic-bezier(0.16, 1, 0.3, 1);
  flex-shrink: 0;
}
.omni-pill.expanded {
  width: 220px;
  background: #111115;
  border-color: rgba(255, 255, 255, 0.25);
  justify-content: flex-start;
}

.omni-btn {
  width: 34px;
  height: 34px;
  border-radius: 50%;
  background: transparent;
  border: none;
  display: grid;
  place-items: center;
  color: #a1a1aa;
  cursor: pointer;
  outline: none;
  flex-shrink: 0;
}
.omni-btn:hover { color: #ffffff; }

.omni-input {
  display: none;
  width: calc(100% - 60px);
  background: transparent;
  border: none;
  color: #ffffff;
  font-size: 0.78rem;
  font-family: 'Jost', sans-serif;
  outline: none;
}
.omni-pill.expanded .omni-input { display: block; }

.omni-close {
  display: none;
  background: transparent;
  border: none;
  color: #71717a;
  font-size: 0.70rem;
  cursor: pointer;
  padding: 0 6px;
}
.omni-pill.expanded .omni-close { display: block; }

.omni-menu {
  position: absolute;
  bottom: calc(100% + 8px);
  left: 0;
  width: 260px;
  background: #111115;
  border: 1px solid rgba(255, 255, 255, 0.18);
  border-radius: 12px;
  padding: 4px;
  display: flex;
  flex-direction: column;
  gap: 2px;
  opacity: 0;
  visibility: hidden;
  transition: all 0.2s ease;
  z-index: 100;
  box-shadow: 0 15px 35px rgba(0, 0, 0, 0.9);
}
.omni-pill.expanded .omni-menu { opacity: 1; visibility: visible; }

.omni-opt {
  padding: 7px 10px;
  border-radius: 6px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  color: #fafafa;
  font-size: 0.76rem;
  font-family: 'Jost', sans-serif;
  cursor: pointer;
  transition: background 0.12s ease;
}
.omni-opt:hover, .omni-opt.selected { background: rgba(255, 255, 255, 0.08); }

.omni-opt-badge {
  font-family: 'JetBrains Mono', monospace;
  font-size: 0.62rem;
  color: #71717a;
  background: rgba(255, 255, 255, 0.05);
  padding: 1px 4px;
  border-radius: 3px;
}

.dock-capsule {
  height: 36px;
  background: rgba(18, 18, 22, 0.8);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 9999px;
  display: inline-flex;
  align-items: center;
  padding: 0 0.5rem;
  flex-shrink: 0;
}

.lang-pill {
  background: transparent;
  border: none;
  color: #71717a;
  font-size: 0.68rem;
  font-weight: 700;
  font-family: 'JetBrains Mono', monospace;
  padding: 3px 6px;
  border-radius: 4px;
  cursor: pointer;
  transition: all 0.12s ease;
}
.lang-pill:hover { color: #ffffff; }
.lang-pill.active {
  color: #ffffff;
  background: rgba(255, 255, 255, 0.1);
}

.dock-sep {
  width: 1px;
  height: 12px;
  background: rgba(255, 255, 255, 0.12);
  margin: 0 4px;
}

.hub-pill {
  background: transparent;
  border: none;
  color: #71717a;
  font-size: 0.68rem;
  font-weight: 700;
  font-family: 'JetBrains Mono', monospace;
  padding: 3px 6px;
  cursor: pointer;
}
.hub-pill:hover { color: #ffffff; }

/* MODALS BASE OVERLAY */
.modal-backdrop {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.85);
  backdrop-filter: blur(15px);
  -webkit-backdrop-filter: blur(15px);
  z-index: 9999;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 1rem;
  opacity: 0;
  visibility: hidden;
  transition: opacity 0.2s ease, visibility 0.2s ease;
}
.modal-backdrop.active { opacity: 1; visibility: visible; }

.modal-box {
  background: #111115;
  border: 1px solid rgba(255, 255, 255, 0.15);
  border-radius: 16px;
  padding: 1.5rem;
  width: 100%;
  max-width: 440px;
  display: flex;
  flex-direction: column;
  gap: 1rem;
  text-align: left;
  box-sizing: border-box;
}
html[dir="rtl"] .modal-box { text-align: right; direction: rtl; }

.modal-num {
  font-family: 'JetBrains Mono', monospace;
  font-size: 0.75rem;
  color: #ffffff;
}
.modal-title {
  font-family: 'Jost', sans-serif;
  font-size: 1.25rem;
  font-weight: 700;
  color: #ffffff;
}
.modal-desc {
  font-family: 'Jost', sans-serif;
  font-size: 0.88rem;
  color: #a1a1aa;
  line-height: 1.6;
}
.modal-bar {
  display: flex;
  justify-content: space-between;
  align-items: center;
  border-top: 1px solid rgba(255, 255, 255, 0.08);
  padding-top: 0.75rem;
  margin-top: 0.25rem;
  width: 100%;
}
.modal-tag {
  font-family: 'JetBrains Mono', monospace;
  font-size: 0.62rem;
  letter-spacing: 0.08em;
  color: #71717a;
}

.btn-action {
  height: 28px;
  padding: 0 0.85rem;
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 9999px;
  color: #ffffff;
  font-size: 0.70rem;
  font-weight: 600;
  cursor: pointer;
}
.btn-action:hover { background: rgba(255, 255, 255, 0.12); }
.btn-icon-close {
  background: transparent;
  border: none;
  color: #71717a;
  font-size: 0.75rem;
  cursor: pointer;
  padding: 2px 6px;
  border-radius: 4px;
}
.btn-icon-close:hover { color: #ffffff; }

/* In-Place Monograph Specification Details */
.drawer-topbar {
  display: flex;
  justify-content: space-between;
  align-items: center;
  width: 100%;
}

.drawer-spec-card {
  background: rgba(255, 255, 255, 0.025);
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 12px;
  padding: 0.85rem;
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
  margin-top: 0.35rem;
  box-sizing: border-box;
}

.drawer-spec-tag {
  font-family: 'JetBrains Mono', monospace;
  font-size: 0.60rem;
  font-weight: 700;
  letter-spacing: 0.12em;
  color: #10b981;
  text-transform: uppercase;
}

.drawer-spec-list {
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 0.4rem;
  padding: 0;
  margin: 0;
}

.drawer-spec-list li {
  display: flex;
  align-items: flex-start;
  gap: 0.5rem;
  font-size: 0.74rem;
  color: #d4d4d8;
  line-height: 1.4;
  font-family: 'Jost', sans-serif;
}

.spec-bullet {
  color: #71717a;
  font-size: 0.55rem;
  margin-top: 2px;
  flex-shrink: 0;
}

/* ==========================================================================
   PURE ICON-ONLY LAUNCHPAD (HUB)
   ========================================================================== */
.hub-pure-icon-card {
  max-width: 280px !important;
  background: rgba(14, 14, 18, 0.92) !important;
  backdrop-filter: blur(28px);
  -webkit-backdrop-filter: blur(28px);
  border: 1px solid rgba(255, 255, 255, 0.14);
  border-radius: 20px;
  padding: 1.15rem !important;
  box-shadow: 0 30px 70px rgba(0, 0, 0, 0.95);
  gap: 0.85rem;
}

.hub-icon-topbar {
  display: flex;
  justify-content: space-between;
  align-items: center;
  border-bottom: 1px solid rgba(255, 255, 255, 0.07);
  padding-bottom: 0.4rem;
}

.hub-icon-header-tag {
  font-family: 'JetBrains Mono', monospace;
  font-size: 0.58rem;
  font-weight: 700;
  letter-spacing: 0.18em;
  color: #71717a;
}

.hub-pure-icons-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 0.65rem;
  justify-items: center;
  width: 100%;
}

.hub-icon-capsule {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.35rem;
  cursor: pointer;
  user-select: none;
  width: 100%;
  padding: 0.45rem 0.2rem;
  border-radius: 12px;
  transition: all 0.2s cubic-bezier(0.16, 1, 0.3, 1);
}
.hub-icon-capsule:hover {
  background: rgba(255, 255, 255, 0.05);
  transform: translateY(-2px);
}

.hub-icon-bubble {
  width: 44px;
  height: 44px;
  border-radius: 12px;
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid rgba(255, 255, 255, 0.1);
  display: grid;
  place-items: center;
  font-size: 1.25rem;
  transition: all 0.2s ease;
}
.hub-icon-bubble svg { color: #a1a1aa; transition: all 0.15s ease; }
.hub-icon-capsule:hover .hub-icon-bubble {
  background: rgba(255, 255, 255, 0.1);
  border-color: rgba(255, 255, 255, 0.25);
  transform: scale(1.05);
}
.hub-icon-capsule:hover .hub-icon-bubble svg { color: #ffffff; }

.hub-icon-label {
  font-family: 'Jost', sans-serif;
  font-size: 0.68rem;
  font-weight: 500;
  color: #a1a1aa;
  transition: color 0.15s ease;
  white-space: nowrap;
}
.hub-icon-capsule:hover .hub-icon-label { color: #ffffff; }

/* ==========================================================================
   SAMSUNG 3x3 PATTERN LOCK MODAL
   ========================================================================== */
.gate-container-card {
  max-width: 320px !important;
  background: rgba(14, 14, 18, 0.92) !important;
  backdrop-filter: blur(30px);
  -webkit-backdrop-filter: blur(30px);
  border: 1px solid rgba(255, 255, 255, 0.16) !important;
  border-radius: 22px !important;
  padding: 1.25rem !important;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.85rem;
  box-shadow: 0 30px 80px rgba(0, 0, 0, 0.98);
}

.gate-top-nav {
  display: flex;
  justify-content: space-between;
  align-items: center;
  width: 100%;
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
  padding-bottom: 0.5rem;
}

.gate-nav-tag {
  font-family: 'JetBrains Mono', monospace;
  font-size: 0.58rem;
  font-weight: 700;
  letter-spacing: 0.18em;
  color: #71717a;
}

.gate-mode-toggle {
  display: flex;
  gap: 4px;
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 8px;
  padding: 2px;
}

.btn-gate-tab {
  background: transparent;
  border: none;
  color: #71717a;
  padding: 3px 6px;
  border-radius: 6px;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  gap: 4px;
  font-size: 0.62rem;
  font-family: 'JetBrains Mono', monospace;
  transition: all 0.15s ease;
}
.btn-gate-tab:hover { color: #ffffff; }
.btn-gate-tab.active {
  background: rgba(255, 255, 255, 0.12);
  color: #ffffff;
}

.pattern-lock-wrapper {
  position: relative;
  width: 220px;
  height: 220px;
  display: flex;
  align-items: center;
  justify-content: center;
  touch-action: none;
}

#patternCanvas {
  position: absolute;
  top: 0;
  left: 0;
  width: 220px;
  height: 220px;
  cursor: crosshair;
  z-index: 2;
  touch-action: none;
}

.pattern-hint-text {
  font-size: 0.70rem;
  color: #71717a;
  font-family: 'Jost', sans-serif;
  text-align: center;
  min-height: 18px;
}

.qr-passkey-wrapper {
  display: none;
  flex-direction: column;
  align-items: center;
  gap: 0.75rem;
  width: 100%;
  padding: 0.5rem 0;
}
.qr-passkey-wrapper.active { display: flex; }

.qr-box-frame {
  width: 160px;
  height: 160px;
  background: #ffffff;
  border-radius: 14px;
  padding: 10px;
  display: grid;
  place-items: center;
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.8), 0 0 20px rgba(255, 255, 255, 0.2);
}
.qr-box-frame svg { width: 100%; height: 100%; }

.qr-instructions {
  font-size: 0.70rem;
  color: #a1a1aa;
  text-align: center;
  line-height: 1.35;
  font-family: 'Jost', sans-serif;
}

/* ==========================================================================
   RIGID COMPACT SOVEREIGN VAULT ENCLAVE (ZERO OVERFLOW EVER)
   ========================================================================== */
.vault-card {
  max-width: 500px !important;
  width: 100% !important;
  background: #0d0d12 !important;
  border: 1px solid rgba(255, 255, 255, 0.16) !important;
  border-radius: 20px !important;
  box-shadow: 0 25px 70px rgba(0, 0, 0, 0.96) !important;
  padding: 1.35rem !important;
  gap: 1rem !important;
  box-sizing: border-box !important;
  overflow: hidden !important;
}

.vault-topbar {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
  padding-bottom: 0.75rem;
  width: 100%;
}

.vault-auth-badge {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-family: 'JetBrains Mono', monospace;
  font-size: 0.58rem;
  font-weight: 700;
  letter-spacing: 0.12em;
  color: #10b981;
}

.pulse-dot {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: #10b981;
  box-shadow: 0 0 8px #10b981;
  animation: pulse-glow 2s infinite ease-in-out;
}

@keyframes pulse-glow {
  0%, 100% { opacity: 1; transform: scale(1); }
  50% { opacity: 0.4; transform: scale(0.85); }
}

.vault-title {
  font-family: 'Jost', sans-serif;
  font-size: 1.20rem;
  font-weight: 700;
  color: #ffffff;
  margin-top: 0.15rem;
}

.btn-lock-vault {
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 6px;
  color: #a1a1aa;
  font-size: 0.65rem;
  font-family: 'JetBrains Mono', monospace;
  padding: 3px 7px;
  cursor: pointer;
  transition: all 0.15s ease;
  flex-shrink: 0;
}
.btn-lock-vault:hover {
  background: rgba(239, 68, 68, 0.15);
  color: #ef4444;
  border-color: rgba(239, 68, 68, 0.3);
}

/* Bulletproof 2-Column Grid with Rigid Widths */
.vault-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 0.60rem;
  width: 100%;
  box-sizing: border-box;
}

.vault-item {
  display: grid;
  grid-template-columns: auto 1fr;
  align-items: center;
  gap: 0.60rem;
  padding: 0.70rem 0.65rem;
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid rgba(255, 255, 255, 0.07);
  border-radius: 12px;
  text-decoration: none;
  color: inherit;
  cursor: pointer;
  transition: all 0.2s cubic-bezier(0.16, 1, 0.3, 1);
  min-width: 0; /* Prevents CSS Grid Blowout */
  box-sizing: border-box;
  overflow: hidden;
}
.vault-item:hover {
  background: rgba(255, 255, 255, 0.08);
  border-color: rgba(255, 255, 255, 0.2);
  transform: translateY(-1px);
}

.vault-item-icon {
  width: 32px;
  height: 32px;
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid rgba(255, 255, 255, 0.08);
  display: grid;
  place-items: center;
  color: #a1a1aa;
  flex-shrink: 0;
}
.vault-item:hover .vault-item-icon {
  color: #ffffff;
  background: rgba(255, 255, 255, 0.12);
}

.vault-item-text {
  display: flex;
  flex-direction: column;
  gap: 0.1rem;
  text-align: left;
  min-width: 0;
  overflow: hidden;
}
html[dir="rtl"] .vault-item-text { text-align: right; }

.vault-item-text strong {
  font-family: 'Jost', sans-serif;
  font-size: 0.78rem;
  font-weight: 600;
  color: #ffffff;
  white-space: normal;
  line-height: 1.25;
  overflow: hidden;
  text-overflow: ellipsis;
}

.vault-item-text small {
  font-size: 0.65rem;
  color: #71717a;
  white-space: normal;
  line-height: 1.2;
  overflow: hidden;
  text-overflow: ellipsis;
}

/* SOVEREIGN EDGE TELEMETRY MODAL */
.telemetry-card {
  max-width: 440px !important;
  width: 100% !important;
  background: #0d0d12;
  border: 1px solid rgba(255, 255, 255, 0.16);
  border-radius: 20px;
  box-shadow: 0 25px 65px rgba(0, 0, 0, 0.95);
  gap: 1rem;
  box-sizing: border-box;
}

.telemetry-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
  padding-bottom: 0.65rem;
}

.telemetry-live-badge {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-family: 'JetBrains Mono', monospace;
  font-size: 0.60rem;
  font-weight: 700;
  letter-spacing: 0.12em;
  color: #10b981;
}

.telemetry-stats-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 0.60rem;
  width: 100%;
}

.telemetry-item {
  display: flex;
  flex-direction: column;
  gap: 0.15rem;
  padding: 0.70rem;
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid rgba(255, 255, 255, 0.06);
  border-radius: 10px;
  text-align: left;
  min-width: 0;
  box-sizing: border-box;
}
html[dir="rtl"] .telemetry-item { text-align: right; }

.telemetry-item small {
  font-family: 'JetBrains Mono', monospace;
  font-size: 0.60rem;
  color: #71717a;
  text-transform: uppercase;
}
.telemetry-item strong {
  font-family: 'Jost', sans-serif;
  font-size: 0.85rem;
  font-weight: 600;
  color: #ffffff;
}
.telemetry-metric { font-size: 0.65rem; color: #a1a1aa; }

/* Mobile Responsive Enforcement */
@media (max-width: 480px) {
  body {
    padding: 2rem 0.85rem max(1.25rem, env(safe-area-inset-bottom)) 0.85rem;
  }
  .sanctuary-core { gap: 1.5rem; }
  .apex-arabic { font-size: 1.95rem; }
  .pillar-row { gap: 0.75rem; padding: 0.85rem 0.5rem; }
  .pillar-title { font-size: 0.86rem; }
  .pillar-sub { font-size: 0.70rem; }
  .vault-grid { grid-template-columns: 1fr; }
  .telemetry-stats-grid { grid-template-columns: 1fr; }
  .omni-pill.expanded { width: calc(100vw - 2rem); max-width: 320px; }
  .omni-pill.expanded + .dock-capsule { display: none; }
  .omni-menu { width: calc(100vw - 2rem); max-width: 320px; }
}

/* ==========================================================================
   SOVEREIGN UNLOCKED HIDDEN MASTER BUTTON STYLING
   ========================================================================== */
.master-unlocked-card {
  max-width: 420px !important;
  background: #0e0e13 !important;
  border: 1px solid rgba(255, 255, 255, 0.18) !important;
  border-radius: 20px !important;
  padding: 1.4rem !important;
  box-shadow: 0 30px 80px rgba(0, 0, 0, 0.98), 0 0 30px rgba(16, 185, 129, 0.1) !important;
  gap: 1.15rem !important;
}

.master-unlocked-desc {
  font-family: 'Jost', sans-serif;
  font-size: 0.82rem;
  color: #a1a1aa;
  line-height: 1.45;
}
html[dir="rtl"] .master-unlocked-desc { font-family: 'Alexandria', sans-serif; }

.master-action-container {
  width: 100%;
  margin: 0.25rem 0;
}

.btn-master-portal {
  width: 100%;
  display: flex;
  align-items: center;
  gap: 0.85rem;
  padding: 0.90rem 1rem;
  background: #ffffff;
  border: none;
  border-radius: 12px;
  color: #09090b;
  cursor: pointer;
  box-shadow: 0 10px 30px rgba(255, 255, 255, 0.15);
  transition: all 0.2s cubic-bezier(0.16, 1, 0.3, 1);
  text-align: left;
}
html[dir="rtl"] .btn-master-portal { text-align: right; }

.btn-master-portal:hover {
  background: #f4f4f5;
  transform: translateY(-2px);
  box-shadow: 0 15px 35px rgba(255, 255, 255, 0.25);
}

.master-portal-icon {
  width: 38px;
  height: 38px;
  border-radius: 8px;
  background: #09090b;
  color: #ffffff;
  display: grid;
  place-items: center;
  flex-shrink: 0;
}

.master-portal-text {
  display: flex;
  flex-direction: column;
  gap: 0.1rem;
  min-width: 0;
}

.master-portal-text strong {
  font-family: 'Jost', sans-serif;
  font-size: 0.88rem;
  font-weight: 700;
  color: #09090b;
}
html[dir="rtl"] .master-portal-text strong { font-family: 'Alexandria', sans-serif; }

.master-portal-text small {
  font-family: 'JetBrains Mono', monospace;
  font-size: 0.62rem;
  color: #71717a;
  font-weight: 500;
}

/* ==========================================================================
   PERFECTED SAMSUNG PATTERN LOCK KINETICS & SHAKE ANIMATION
   ========================================================================== */
.pattern-lock-wrapper {
  touch-action: none !important;
  user-select: none !important;
  -webkit-user-select: none !important;
}

#patternCanvas {
  touch-action: none !important;
  display: block;
}

.pattern-lock-wrapper.shake {
  animation: patternShake 0.45s cubic-bezier(0.36, 0.07, 0.19, 0.97) both;
}

@keyframes patternShake {
  10%, 90% { transform: translate3d(-2px, 0, 0); }
  20%, 80% { transform: translate3d(3px, 0, 0); }
  30%, 50%, 70% { transform: translate3d(-5px, 0, 0); }
  40%, 60% { transform: translate3d(5px, 0, 0); }
}

.btn-reset-pattern {
  background: transparent;
  border: 1px dashed rgba(255, 255, 255, 0.15);
  color: #71717a;
  font-family: 'JetBrains Mono', monospace;
  font-size: 0.68rem;
  padding: 0.45rem 0.8rem;
  border-radius: 6px;
  cursor: pointer;
  margin-bottom: 0.75rem;
  width: 100%;
  transition: all 0.2s ease;
}
.btn-reset-pattern:hover {
  border-color: #ef4444;
  color: #ef4444;
  background: rgba(239, 68, 68, 0.05);
}
