/*! companion-archive3-chrome-hydrate-v1.css
 * Shared Archive3 chrome · depth · Islamic UI · educational only — not a fatwa
 */
@import url("https://fonts.googleapis.com/css2?family=Amiri:wght@400;700&family=Noto+Naskh+Arabic:wght@400;600;700&family=Quicksand:wght@500;600;700&display=swap");

:root {
  --a3-ink: #f3efe6;
  --a3-ink-dim: rgba(243, 239, 230, 0.78);
  --a3-night: #0b1220;
  --a3-panel: rgba(12, 18, 30, 0.94);
  --a3-gold: #d4b45a;
  --a3-gold-soft: rgba(212, 180, 90, 0.28);
  --a3-gold-glow: rgba(212, 180, 90, 0.45);
  --a3-emerald: #1e7d5e;
  --a3-emerald-deep: #0f5c45;
  --a3-radius: 14px;
  --a3-font-ui: "Quicksand", system-ui, sans-serif;
  --a3-font-ar: "Noto Naskh Arabic", "Amiri", serif;
  --a3-font-display: "Amiri", "Noto Naskh Arabic", serif;
}

html[data-a3-chrome="1"] body,
body[data-a3-chrome="1"] {
  font-family: var(--a3-font-ui);
  color: var(--a3-ink);
  background:
    radial-gradient(1200px 600px at 10% -10%, rgba(30, 125, 94, 0.18), transparent 55%),
    radial-gradient(900px 500px at 100% 0%, rgba(212, 180, 90, 0.12), transparent 50%),
    var(--a3-night);
}

/* Bismillah & Arabic depth */
.bismillah,
[lang="ar"],
.cs-ar,
.meme-room .bismillah {
  font-family: var(--a3-font-ar);
  font-weight: 600;
  letter-spacing: 0.02em;
}

h1, h2, .cs-plaque-head h2, .p4-glory-rail h2 {
  font-family: var(--a3-font-ui);
  letter-spacing: 0.01em;
}

/* Plaque / card hydration */
#cs-mount .cs-plaque,
#cs-mount .card,
#cs-mount .cs-plaque-deep,
.tab-panel .cs-plaque,
.tab-panel .card,
.p4-glory-rail,
.meme-room .panel,
.meme-room .desk-card {
  border-radius: var(--a3-radius);
  border: 1px solid var(--a3-gold-soft);
  background:
    linear-gradient(180deg, rgba(212, 180, 90, 0.07), transparent 40%),
    var(--a3-panel);
  box-shadow:
    0 0 0 1px rgba(255, 255, 255, 0.03) inset,
    0 10px 32px rgba(0, 0, 0, 0.28);
  transition: border-color 0.2s ease, box-shadow 0.2s ease, transform 0.15s ease;
}

#cs-mount .cs-plaque:hover,
.tab-panel .card:hover,
.meme-room .panel:hover,
.meme-room .desk-card:hover {
  border-color: var(--a3-gold-glow);
  box-shadow:
    0 0 0 1px rgba(212, 180, 90, 0.15) inset,
    0 14px 40px rgba(0, 0, 0, 0.35);
}

.cs-plaque-deep,
[data-cs-primary="1"] {
  border-top: 3px solid var(--a3-gold);
}

/* Glory rail / chrome chips */
.p4-glory-rail {
  position: relative;
  overflow: hidden;
}
.p4-glory-rail::before {
  content: "";
  position: absolute;
  inset: 0 auto 0 0;
  width: 4px;
  background: linear-gradient(180deg, var(--a3-gold), var(--a3-emerald));
  border-radius: 4px 0 0 4px;
}
.p4-glory-chips a,
.meme-room .chip,
.cs-chip,
.cs-btn {
  font-family: var(--a3-font-ui);
  border-radius: 999px;
  border: 1px solid var(--a3-gold-soft);
  background: rgba(0, 0, 0, 0.28);
  color: var(--a3-ink);
  transition: background 0.15s ease, border-color 0.15s ease;
}
.p4-glory-chips a:hover,
.meme-room .chip:hover,
.cs-chip:hover {
  border-color: var(--a3-gold-glow);
  background: rgba(212, 180, 90, 0.16);
}
.meme-room .chip.primary,
.cs-btn.primary {
  background: linear-gradient(135deg, var(--a3-emerald), var(--a3-emerald-deep));
  border-color: rgba(240, 215, 140, 0.35);
  color: #fff;
  font-weight: 700;
}

/* Icon stamps (CSS-only enrichment markers) */
.a3-ico {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 1.55rem;
  height: 1.55rem;
  margin-inline-end: 0.35rem;
  border-radius: 0.45rem;
  background: rgba(212, 180, 90, 0.12);
  border: 1px solid var(--a3-gold-soft);
  font-size: 0.95rem;
  vertical-align: -0.2rem;
}

/* Nav / doors soft */
.meme-room .nav-row a,
.companion-nav a {
  border-radius: 999px;
  padding: 0.35rem 0.75rem;
  border: 1px solid transparent;
}
.meme-room .nav-row a:hover {
  border-color: var(--a3-gold-soft);
  background: rgba(212, 180, 90, 0.08);
}

/* Canvas stage depth */
#meme-stage,
.meme-room #meme-stage {
  border-radius: 16px;
  border: 1px solid var(--a3-gold-soft);
  box-shadow: 0 12px 40px rgba(0, 0, 0, 0.35);
  overflow: hidden;
  background: #070b14;
}

/* Desk grid polish */
.desk-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0.85rem;
}
@media (max-width: 720px) {
  .desk-grid { grid-template-columns: 1fr; }
}
.desk-preview,
.desk-preview-canvas {
  width: 100%;
  max-height: 220px;
  object-fit: contain;
  border-radius: 10px;
  background: #0a101c;
  border: 1px solid rgba(255, 255, 255, 0.08);
}
.desk-status {
  min-height: 1.1em;
  font-size: 0.72rem;
  opacity: 0.85;
}

/* Educational footer stamp */
.edu, .disc, .footer\.edu {
  color: var(--a3-ink-dim);
  font-size: 0.8rem;
}

/* Hydrated state marker */
html[data-a3-hydrated="1"] #cs-mount,
html[data-a3-hydrated="1"] .meme-room {
  animation: a3-fade 0.45s ease;
}
@keyframes a3-fade {
  from { opacity: 0.72; }
  to { opacity: 1; }
}
