/* ============================================================================
   js/modules/enochian/enochian.module.css
   DUAL-LAYER ENOCHIAN ARCHITECTURE: DEE ORIGINAL (1582) vs GOLDEN DAWN (1888+)
   ============================================================================ */

.enoch-shell {
  --enoch-bg-dee: #0b0d12;
  --enoch-surface-dee: #121620;
  --enoch-gold: #c9a24d;
  --enoch-gold-bright: #f3d586;
  --enoch-parchment: #e8dfc8;
  --enoch-border-dee: rgba(201, 162, 77, 0.26);

  --enoch-bg-gd: #0e131f;
  --enoch-surface-gd: #151c2e;
  --enoch-border-gd: rgba(168, 85, 247, 0.34);

  --enoch-text: #f1f5f9;
  --enoch-muted: #94a3b8;
  --enoch-radius: 12px;
  color: var(--enoch-text);
  font-variant-numeric: tabular-nums;
  width: 100%;
  max-width: 100%;
  box-sizing: border-box;
  overflow-x: clip;
}

.enoch-shell *,
.enoch-shell *::before,
.enoch-shell *::after {
  box-sizing: border-box;
}

.enoch-shell[data-tradition="dee_original"] {
  --enoch-active-border: var(--enoch-border-dee);
  --enoch-active-accent: var(--enoch-gold);
}

.enoch-shell[data-tradition="golden_dawn"] {
  --enoch-active-border: var(--enoch-border-gd);
  --enoch-active-accent: #c084fc;
}

.enoch-shell[data-tradition="comparative"] {
  --enoch-active-border: rgba(56, 189, 248, 0.32);
  --enoch-active-accent: #38bdf8;
}

/* === BARRA SUPERIOR DUAL-LAYER + HORA PLANETÁRIA === */
.enoch-topbar {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  align-items: center;
  gap: 14px;
  padding: 16px 20px;
  margin-bottom: 18px;
  background: var(--enoch-surface-dee);
  border: 1px solid var(--enoch-active-border);
  border-radius: var(--enoch-radius);
  max-width: 100%;
}

.enoch-mode-segmented {
  display: inline-flex;
  flex-wrap: wrap;
  gap: 6px;
  padding: 4px;
  background: rgba(3, 7, 18, 0.72);
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 10px;
  max-width: 100%;
}

.enoch-mode-btn {
  min-height: 40px;
  padding: 8px 14px;
  border: 1px solid transparent;
  border-radius: 7px;
  background: transparent;
  color: #cbd5e1;
  font-size: 0.84rem;
  font-weight: 700;
  cursor: pointer;
  transition: background 0.18s ease, color 0.18s ease, border-color 0.18s ease;
}

.enoch-mode-btn:hover {
  color: #fff;
  background: rgba(255, 255, 255, 0.06);
}

.enoch-mode-btn.active[data-mode="dee_original"] {
  background: rgba(201, 162, 77, 0.2);
  border-color: var(--enoch-gold);
  color: var(--enoch-gold-bright);
}

.enoch-mode-btn.active[data-mode="golden_dawn"] {
  background: rgba(168, 85, 247, 0.22);
  border-color: #c084fc;
  color: #f3e8ff;
}

.enoch-mode-btn.active[data-mode="comparative"] {
  background: rgba(56, 189, 248, 0.18);
  border-color: #38bdf8;
  color: #e0f2fe;
}

.enoch-hour-sync-strip {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 10px;
  max-width: 100%;
}

.enoch-sync-btn {
  min-height: 40px;
  padding: 8px 14px;
  border-radius: 8px;
  border: 1px solid rgba(201, 162, 77, 0.45);
  background: rgba(201, 162, 77, 0.12);
  color: var(--enoch-gold-bright);
  font-size: 0.82rem;
  font-weight: 700;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  transition: background 0.18s ease, border-color 0.18s ease;
  max-width: 100%;
  text-align: left;
}

.enoch-sync-btn.active {
  background: rgba(34, 197, 94, 0.18);
  border-color: #4ade80;
  color: #dcfce7;
}

.enoch-sync-btn:hover {
  background: rgba(201, 162, 77, 0.24);
}

.enoch-hour-summary-banner {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(min(260px, 100%), 1fr));
  gap: 12px;
  padding: 14px 18px;
  margin-bottom: 20px;
  background: linear-gradient(135deg, rgba(15, 23, 42, 0.92), rgba(11, 13, 18, 0.96));
  border: 1px solid var(--enoch-active-border);
  border-radius: var(--enoch-radius);
  max-width: 100%;
}

.enoch-hour-summary-banner > * {
  min-width: 0;
  overflow-wrap: break-word;
}

.enoch-hour-block-label {
  font-size: 0.72rem;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--enoch-muted);
  font-weight: 700;
  margin-bottom: 4px;
}

/* === LAYOUT TWO-ZONE: STAGE + INSPECTOR === */
.enoch-stage-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.65fr) minmax(300px, 1fr);
  gap: 20px;
  align-items: start;
  width: 100%;
  max-width: 100%;
}

.enoch-stage-grid > * {
  min-width: 0;
  max-width: 100%;
}

@media (max-width: 1024px) {
  .enoch-stage-grid {
    grid-template-columns: minmax(0, 1fr);
  }
}

.enoch-panel {
  background: var(--enoch-surface-dee);
  border: 1px solid var(--enoch-active-border);
  border-radius: var(--enoch-radius);
  padding: 18px;
  min-width: 0;
  max-width: 100%;
  overflow-wrap: break-word;
}

.enoch-panel-gd {
  background: var(--enoch-surface-gd);
  border: 1px solid var(--enoch-border-gd);
}

.enoch-inspector {
  position: sticky;
  top: 16px;
  background: rgba(11, 13, 18, 0.96);
  border: 1px solid var(--enoch-active-border);
  border-radius: var(--enoch-radius);
  padding: 18px;
  min-width: 0;
  max-width: 100%;
  overflow-wrap: break-word;
}

@media (max-width: 1024px) {
  .enoch-inspector {
    position: static;
  }
}

/* === INSPETOR DA CÉLULA ENOCHIANA & PIRÂMIDE TRUNCADA === */
.enoch-inspector-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 12px;
  padding-bottom: 12px;
  margin-bottom: 14px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
  flex-wrap: wrap;
}

.enoch-inspector-meta {
  display: flex;
  flex-direction: column;
  gap: 4px;
  min-width: 0;
  flex: 1 1 150px;
}

.enoch-inspector-coord {
  font-family: var(--font-header, 'Cinzel', serif);
  font-size: 0.96rem;
  font-weight: 700;
  color: #f8fafc;
  line-height: 1.25;
}

.enoch-inspector-code {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  width: fit-content;
  max-width: 100%;
  padding: 2px 8px;
  border-radius: 6px;
  background: rgba(148, 163, 184, 0.12);
  border: 1px solid rgba(148, 163, 184, 0.22);
  font-family: ui-monospace, SFMono-Regular, Menlo, monospace;
  font-size: 0.72rem;
  letter-spacing: 0.04em;
  color: #cbd5e1;
}

.enoch-inspector-glyph-badge {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  padding: 6px 10px;
  border-radius: 10px;
  background: rgba(201, 162, 77, 0.1);
  border: 1px solid rgba(201, 162, 77, 0.34);
  flex-shrink: 0;
}

.enoch-inspector-glyph-svg {
  width: 36px;
  height: 36px;
  display: block;
  flex-shrink: 0;
  background: rgba(11, 13, 18, 0.72);
  border: 1px solid rgba(201, 162, 77, 0.35);
  border-radius: 6px;
  padding: 2px;
}

.enoch-inspector-letter-stack {
  display: flex;
  flex-direction: column;
  align-items: center;
  line-height: 1.05;
}

.enoch-inspector-latin {
  font-family: ui-monospace, SFMono-Regular, Menlo, monospace;
  font-size: 1.45rem;
  font-weight: 900;
  color: #f3d586;
}

.enoch-inspector-letter-name {
  font-size: 0.68rem;
  color: #cbd5e1;
  font-weight: 600;
  margin-top: 2px;
}

.enoch-pyramid-showcase {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 8px;
  margin: 0 auto 14px auto;
  padding: 12px;
  border-radius: 10px;
  background: radial-gradient(circle at center, rgba(30, 41, 59, 0.42) 0%, rgba(5, 7, 12, 0.85) 100%);
  border: 1px solid rgba(255, 255, 255, 0.08);
}

.enoch-pyramid-stage {
  width: 152px;
  height: 152px;
  max-width: 100%;
  position: relative;
  border-radius: 8px;
  overflow: hidden;
  box-shadow: 0 8px 22px rgba(0, 0, 0, 0.6), 0 0 0 1px rgba(255, 255, 255, 0.14);
}

.enoch-pyramid-caption {
  font-size: 0.72rem;
  color: #cbd5e1;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  font-weight: 700;
  text-align: center;
}

.enoch-layer-card {
  border-radius: 9px;
  padding: 12px;
  min-width: 0;
  max-width: 100%;
  overflow-wrap: break-word;
  word-break: break-word;
}

.enoch-layer-dee {
  background: rgba(201, 162, 77, 0.08);
  border: 1px solid rgba(201, 162, 77, 0.3);
  margin-bottom: 12px;
}

.enoch-layer-gd {
  background: rgba(168, 85, 247, 0.1);
  border: 1px solid rgba(168, 85, 247, 0.35);
}

.enoch-scale-swatches {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin-top: 8px;
}

.enoch-scale-swatch {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  padding: 3px 7px;
  border-radius: 6px;
  background: rgba(2, 6, 23, 0.62);
  border: 1px solid rgba(255, 255, 255, 0.1);
  font-size: 0.7rem;
  color: #e2e8f0;
  font-family: ui-monospace, SFMono-Regular, Menlo, monospace;
}

.enoch-scale-dot {
  width: 10px;
  height: 10px;
  border-radius: 3px;
  border: 1px solid rgba(255, 255, 255, 0.35);
  flex-shrink: 0;
}

/* === TABELA 12x13 DAS TORRES DE VIGIA & PIRÂMIDES TRUNCADAS === */
.enoch-tablet-controls {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  align-items: center;
  gap: 10px;
  margin-bottom: 14px;
}

.enoch-tablet-tabs {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}

.enoch-chip-btn {
  min-height: 38px;
  padding: 6px 12px;
  border-radius: 8px;
  border: 1px solid rgba(255, 255, 255, 0.14);
  background: rgba(2, 6, 23, 0.65);
  color: #cbd5e1;
  font-size: 0.8rem;
  font-weight: 700;
  cursor: pointer;
  transition: all 0.16s ease;
}

.enoch-chip-btn:hover {
  border-color: var(--enoch-gold);
  color: #fff;
}

.enoch-chip-btn.active {
  background: var(--enoch-gold);
  border-color: var(--enoch-gold-bright);
  color: #0b0d12;
}

.enoch-matrix-scroll {
  width: 100%;
  max-width: 100%;
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
  padding-bottom: 6px;
}

.enoch-watchtower-matrix {
  display: grid;
  grid-template-columns: repeat(12, minmax(34px, 1fr));
  gap: 3px;
  min-width: 440px;
  background: #06080c;
  padding: 8px;
  border-radius: 10px;
  border: 1px solid rgba(255, 255, 255, 0.12);
}

.enoch-union-matrix {
  display: grid;
  grid-template-columns: repeat(5, minmax(46px, 1fr));
  gap: 4px;
  max-width: 280px;
  width: 100%;
  margin: 0 auto;
  background: #06080c;
  padding: 10px;
  border-radius: 10px;
  border: 1px solid rgba(201, 162, 77, 0.45);
}

.enoch-cell-btn {
  position: relative;
  aspect-ratio: 1 / 1;
  min-height: 34px;
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: 4px;
  background: #10141d;
  color: #f8fafc;
  font-family: ui-monospace, SFMono-Regular, Menlo, monospace;
  font-size: 0.9rem;
  font-weight: 800;
  cursor: pointer;
  padding: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
  transition: transform 0.12s ease, border-color 0.12s ease, box-shadow 0.12s ease;
}

.enoch-cell-btn:hover {
  transform: scale(1.08);
  z-index: 3;
  border-color: #fde047;
}

.enoch-cell-btn.selected {
  outline: 2px solid #fff;
  outline-offset: 1px;
  z-index: 4;
  box-shadow: 0 0 12px rgba(253, 224, 71, 0.8);
}

.enoch-cell-btn.great-cross {
  border-color: rgba(201, 162, 77, 0.72);
  background: #1c1810;
  color: #fde68a;
}

.enoch-cell-pyramid-svg {
  display: block;
  width: 100%;
  height: 100%;
  pointer-events: none;
}

.enoch-cell-btn .enoch-cell-pyramid-svg {
  position: absolute;
  inset: 0;
}

.enoch-cell-letter-overlay {
  position: relative;
  z-index: 2;
  text-shadow: 0 1px 3px rgba(0, 0, 0, 0.95), 0 0 2px rgba(0, 0, 0, 0.95);
  color: #fff;
}

/* === COMPARATIVO PARALELO === */
.enoch-compare-grid {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
  gap: 16px;
  width: 100%;
  max-width: 100%;
}

.enoch-compare-grid > * {
  min-width: 0;
  max-width: 100%;
}

@media (max-width: 780px) {
  .enoch-compare-grid {
    grid-template-columns: minmax(0, 1fr);
  }
}

/* === CARTAS DE ANJOS / REIS / ESFINGES (COM IMAGENS GERADAS SEM MARCA D'ÁGUA) === */
.enoch-illus-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(min(240px, 100%), 1fr));
  gap: 16px;
}

.enoch-illus-card {
  background: #0d1018;
  border: 1px solid var(--enoch-active-border);
  border-radius: var(--enoch-radius);
  overflow: hidden;
  display: flex;
  flex-direction: column;
  min-width: 0;
  transition: transform 0.2s ease, border-color 0.2s ease;
}

.enoch-illus-card:hover {
  transform: translateY(-3px);
  border-color: var(--enoch-gold);
}

.enoch-illus-card.active-planet-highlight {
  border-color: #4ade80;
  box-shadow: 0 0 0 1px rgba(74, 222, 128, 0.4), 0 8px 24px rgba(16, 185, 129, 0.18);
}

.enoch-illus-frame {
  width: 100%;
  aspect-ratio: 3 / 4;
  background: #07090e;
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
}

.enoch-illus-frame-wide {
  aspect-ratio: 16 / 10;
}

.enoch-illus-frame img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.enoch-illus-body {
  padding: 14px;
  display: flex;
  flex-direction: column;
  gap: 6px;
  flex: 1;
}

/* === XADREZ ENOCHIANO INTERATIVO === */
.enoch-chess-board {
  display: grid;
  grid-template-columns: repeat(8, minmax(0, 1fr));
  border: 2px solid var(--enoch-gold);
  border-radius: 8px;
  overflow: hidden;
  max-width: 520px;
  width: 100%;
  margin: 0 auto;
  box-shadow: 0 12px 28px rgba(0, 0, 0, 0.55);
}

.enoch-chess-sq {
  aspect-ratio: 1 / 1;
  min-width: 0;
  min-height: 36px;
  border: none;
  padding: 2px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  position: relative;
  font-weight: 800;
  transition: filter 0.15s ease, outline 0.15s ease;
}

.enoch-chess-sq:hover {
  filter: brightness(1.15);
}

.enoch-chess-sq.selected-sq {
  outline: 3px solid #fde047;
  outline-offset: -3px;
  z-index: 2;
}

.enoch-chess-coord {
  position: absolute;
  top: 2px;
  left: 3px;
  font-size: 0.58rem;
  opacity: 0.72;
  font-family: monospace;
  font-weight: 700;
}

.enoch-chess-piece-badge {
  display: flex;
  flex-direction: column;
  align-items: center;
  line-height: 1.05;
}

/* === INSTRUMENTOS & HEXAGRAMAS SVG === */
.enoch-svg-stage {
  background: #07090d;
  border: 1px solid rgba(201, 162, 77, 0.35);
  border-radius: 12px;
  padding: 16px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  cursor: zoom-in;
}

.enoch-svg-stage img {
  max-width: 100%;
  max-height: 460px;
  object-fit: contain;
}

.enoch-hexagram-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(110px, 1fr));
  gap: 10px;
}

.enoch-hex-card {
  background: #0d1119;
  border: 1px solid rgba(201, 162, 77, 0.22);
  border-radius: 8px;
  padding: 10px 8px;
  text-align: center;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 6px;
}

.enoch-hex-card img {
  width: 56px;
  height: 56px;
  object-fit: contain;
}

/* === CARD NO PAINEL DE HORAS PLANETÁRIAS (INDEX.HTML) === */
.hp-enochian-hour-card {
  margin-top: 16px;
  padding: 14px 16px;
  border-radius: 12px;
  background: linear-gradient(135deg, rgba(11, 13, 18, 0.92), rgba(20, 24, 38, 0.9));
  border: 1px solid rgba(201, 162, 77, 0.35);
}

.hp-enochian-hour-header {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  align-items: center;
  gap: 10px;
  margin-bottom: 10px;
}

.hp-enochian-hour-cols {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
  gap: 12px;
}

@media (max-width: 720px) {
  .hp-enochian-hour-cols {
    grid-template-columns: minmax(0, 1fr);
  }
}

.hp-enochian-col-box {
  background: rgba(2, 6, 23, 0.65);
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 9px;
  padding: 10px 12px;
  font-size: 0.82rem;
  line-height: 1.48;
  min-width: 0;
  overflow-wrap: break-word;
}

/* === LIGHTBOX ZOOM === */
.enoch-modal-overlay {
  position: fixed;
  inset: 0;
  background: rgba(3, 7, 18, 0.92);
  backdrop-filter: blur(8px);
  z-index: 99999;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 16px;
}

.enoch-modal-content {
  background: #0d111a;
  border: 1px solid var(--enoch-gold);
  border-radius: 14px;
  max-width: 920px;
  width: 100%;
  max-height: 90vh;
  overflow-y: auto;
  padding: 22px;
  position: relative;
  color: #f1f5f9;
}

.enoch-modal-close-btn {
  position: absolute;
  top: 12px;
  right: 12px;
  width: 36px;
  height: 36px;
  border-radius: 50%;
  border: 1px solid rgba(255, 255, 255, 0.22);
  background: rgba(0, 0, 0, 0.65);
  color: #fff;
  cursor: pointer;
  font-size: 1rem;
  font-weight: 700;
}

.enoch-modal-close-btn:hover {
  background: #ef4444;
  border-color: #ef4444;
}

@media (max-width: 640px) {
  .enoch-topbar,
  .enoch-hour-summary-banner,
  .enoch-panel,
  .enoch-inspector {
    padding: 14px;
  }
  .enoch-inspector-header {
    align-items: center;
    gap: 10px;
  }
  .enoch-pyramid-stage {
    width: 144px;
    height: 144px;
  }
  .enoch-chess-board {
    max-width: 100%;
  }
  .enoch-chess-sq {
    min-height: 34px;
  }
  .enoch-chess-coord {
    font-size: 0.5rem;
  }
}

@media (max-width: 400px) {
  .enoch-panel,
  .enoch-inspector {
    padding: 12px;
  }
  .enoch-inspector-coord {
    font-size: 0.88rem;
  }
  .enoch-inspector-glyph-badge {
    padding: 5px 8px;
    gap: 8px;
  }
  .enoch-inspector-latin {
    font-size: 1.28rem;
  }
  .enoch-pyramid-stage {
    width: 132px;
    height: 132px;
  }
}
