/* ============================================================
   1. VARIABLES GLOBALES & THEME CELESTE/GLASS
   ============================================================ */
:root {
  --glass: rgba(24, 15, 39, 0.62);
  --glass-strong: rgba(18, 11, 31, 0.82);
  --glass-line: rgba(226, 180, 86, 0.18);
  --violet-line: rgba(178, 92, 255, 0.24);
  --shadow: 0 24px 70px rgba(0, 0, 0, 0.38);
  --glow: 0 0 34px rgba(171, 77, 255, 0.16);
  --gold: #e7b94f;
  --gold2: #ffd88b;
  --purple: #943aef;
  --line: rgba(226, 180, 86, 0.18);
  --muted: #a093b5;
  --danger: #ef4444;
  --success: #10b981;
  --panel-bg: rgba(22, 14, 38, 0.7);
  --text: #f7ecff;
  --radius-xl: 30px;
  --radius-md: 16px;
}

html { scroll-behavior: smooth; }

body {
  margin: 0;
  font-family: 'Inter', system-ui, -apple-system, sans-serif;
  color: var(--text);
  background:
    radial-gradient(circle at 84% -5%, rgba(126, 45, 195, 0.28), transparent 31%),
    radial-gradient(circle at 4% 80%, rgba(123, 36, 172, 0.18), transparent 34%),
    linear-gradient(145deg, #06040d 0%, #0b0615 48%, #07040f 100%);
  background-attachment: fixed;
  letter-spacing: 0.005em;
  overflow-x: hidden;
}

body::before {
  content: "";
  position: fixed;
  inset: 0;
  pointer-events: none;
  z-index: -3;
  background: linear-gradient(115deg, transparent 15%, rgba(255, 216, 139, 0.025) 42%, transparent 62%);
}

/* Écran de connexion : volontairement compact, quel que soit l'écran. */
.login-shell {
  min-height: 100vh;
  display: grid;
  place-items: center;
  padding: 32px 20px;
  box-sizing: border-box;
}

.login-card {
  position: relative;
  width: min(100%, 440px);
  box-sizing: border-box;
  display: grid;
  gap: 14px;
  padding: 38px;
  border: 1px solid rgba(235, 190, 93, .29);
  border-radius: 28px;
  background: linear-gradient(145deg, rgba(31, 18, 49, .92), rgba(8, 5, 17, .94));
  box-shadow: 0 35px 110px rgba(0, 0, 0, .58), 0 0 70px rgba(121, 38, 181, .13);
  backdrop-filter: blur(30px);
}

.login-card h1 { margin: 0; font-family: 'Cinzel', serif; font-size: 2rem; letter-spacing: .08em; text-align: center; }
.login-card > p { margin: -6px 0 10px; color: var(--muted); text-align: center; }
.login-card label { display: grid; gap: 7px; color: #e7dff1; font-size: .88rem; font-weight: 600; }
.login-card input { width: 100%; margin: 0; box-sizing: border-box; }
.login-card .primary { width: 100%; min-height: 46px; }
.brand-star { display: grid; place-items: center; width: 54px; height: 54px; margin: 0 auto 4px; border: 1px solid rgba(231,185,79,.48); border-radius: 50%; color: var(--gold); font-size: 25px; box-shadow: 0 0 28px rgba(231,185,79,.17); }
.login-card .error { min-height: 18px; color: #fda4af; font-size: .82rem; text-align: center; }

@media (max-width: 520px) {
  .login-shell { padding: 18px; }
  .login-card { padding: 30px 24px; border-radius: 22px; }
}

.hidden { display: none !important; }

/* ============================================================
   2. EFFETS D'ARRIÈRE-PLAN & ANIMATIONS CÉLESTES
   ============================================================ */
.cosmic-aurora {
  position: fixed;
  inset: -20%;
  pointer-events: none;
  z-index: -2;
  filter: blur(80px);
  opacity: 0.7;
  background: conic-gradient(from 180deg at 50% 50%, transparent, rgba(133, 47, 201, 0.12), transparent, rgba(222, 169, 72, 0.08), transparent);
  animation: aurora-drift 26s ease-in-out infinite alternate;
}

.stars {
  position: fixed;
  inset: 0;
  pointer-events: none;
  z-index: -2;
  opacity: 0.58;
  mask-image: linear-gradient(to bottom, #000 0%, rgba(0, 0, 0, 0.8) 70%, transparent 100%);
  animation: star-drift 45s linear infinite;
}

.stars::after {
  content: "";
  position: absolute;
  inset: 0;
  background-image: radial-gradient(circle, rgba(255, 221, 151, 0.92) 0 1px, transparent 1.8px);
  background-size: 149px 149px;
  background-position: 35px 61px;
  animation: twinkle 5s ease-in-out infinite alternate;
}

/* ============================================================
   3. STRUCTURE PORTAIL, NAVIGATION & SIDEBAR
   ============================================================ */
.portal {
  display: grid;
  grid-template-columns: 280px minmax(0, 1fr);
  gap: 14px;
  padding: 12px;
  max-width: 1700px;
  margin: 0 auto;
}

.sidebar {
  position: sticky;
  top: 14px;
  height: calc(100vh - 28px);
  padding: 24px 15px;
  box-sizing: border-box;
  border: 1px solid var(--glass-line);
  border-radius: 28px;
  background: linear-gradient(155deg, rgba(27, 17, 43, 0.88), rgba(8, 5, 16, 0.78));
  box-shadow: var(--shadow), inset 0 1px 0 rgba(255, 255, 255, 0.055), 0 0 50px rgba(118, 37, 182, 0.08);
  backdrop-filter: blur(28px) saturate(135%);
  -webkit-backdrop-filter: blur(28px) saturate(135%);
  display: flex;
  flex-direction: column;
}

.logo {
  position: relative;
  margin: 0 10px 25px;
  padding: 20px 12px 21px;
  border-bottom: 1px solid rgba(234, 191, 102, 0.13);
  text-align: center;
}

.logo::before {
  content: "";
  position: absolute;
  left: 50%;
  top: 4px;
  width: 48px;
  height: 48px;
  transform: translateX(-50%);
  border: 1px solid rgba(235, 188, 88, 0.36);
  border-radius: 50%;
  box-shadow: 0 0 25px rgba(225, 172, 65, 0.16);
}

.logo .brand-logo {
  position: relative;
  z-index: 1;
  display: block;
  width: 48px;
  height: 48px;
  margin: 0 auto 4px;
  border-radius: 50%;
  object-fit: cover;
  box-shadow: 0 0 18px rgba(235, 185, 79, 0.4);
}

.logo strong {
  display: block;
  font-family: 'Cinzel', serif;
  font-size: 18px;
  text-shadow: 0 0 20px rgba(232, 185, 79, 0.24);
  color: #fff;
  letter-spacing: 0.08em;
}

.logo small { color: #8f849d; font-size: 0.75rem; }

.sidebar-search { display:flex; align-items:center; gap:8px; margin:0 8px 14px; padding:9px 11px; border:1px solid rgba(255,255,255,.09); border-radius:13px; background:rgba(7,4,14,.42); color:var(--muted); }
.sidebar-search input { margin:0; padding:2px 0; border:0; outline:0; background:transparent; box-shadow:none; font-size:.78rem; }
.sidebar-search input:focus { box-shadow:none; background:transparent; }
.nav-group { margin:3px 4px 8px; padding:0 3px 5px; border-bottom:1px solid rgba(255,255,255,.06); }
.nav-group summary { display:flex; align-items:center; gap:9px; padding:10px 9px; color:#f4e8ff; cursor:pointer; list-style:none; font-size:.78rem; font-weight:700; }
.nav-group summary::-webkit-details-marker { display:none; }
.nav-group summary::after { content:'⌄'; margin-left:auto; color:var(--gold); transition:transform .2s ease; }
.nav-group:not([open]) summary::after { transform:rotate(-90deg); }
.nav-group summary span { color:var(--gold); font-size:1rem; }
.nav-group summary small { margin-left:auto; color:var(--muted); font-size:.64rem; font-weight:500; }
.nav-group summary small + * { margin-left:0; }
.nav-group button { min-height:35px; margin:2px 0; padding:8px 12px 8px 30px; font-size:.8rem; }
.nav-group button::after { left:18px; }
.nav-filter-hidden { display:none !important; }

nav {
  display: flex;
  flex-direction: column;
  gap: 4px;
  padding: 0 4px 20px;
  overflow-y: auto;
  scrollbar-width: thin;
  scrollbar-color: rgba(185, 100, 235, 0.35) transparent;
}

.nav-label {
  margin-top: 8px;
  padding: 14px 12px 6px;
  font-size: 9px;
  letter-spacing: 0.24em;
  color: rgba(241, 195, 101, 0.78);
  text-transform: uppercase;
  font-weight: 700;
}

nav button, .logout {
  position: relative;
  min-height: 40px;
  padding: 10px 14px;
  border: 1px solid transparent;
  border-radius: 14px;
  color: #bcb2ca;
  background: transparent;
  cursor: pointer;
  text-align: left;
  font-size: 0.88rem;
  font-weight: 500;
  transition: transform 0.22s ease, color 0.22s ease, border-color 0.22s ease, background 0.22s ease, box-shadow 0.22s ease;
}

nav button::after {
  content: "";
  position: absolute;
  left: 7px;
  top: 50%;
  width: 3px;
  height: 0;
  border-radius: 5px;
  background: linear-gradient(var(--gold2), var(--purple));
  transform: translateY(-50%);
  transition: height 0.22s ease;
  box-shadow: 0 0 12px var(--purple);
}

nav button:hover {
  transform: translateX(3px);
  color: #fff;
  border-color: rgba(183, 102, 235, 0.18);
  background: rgba(115, 58, 148, 0.13);
}

nav button.active {
  transform: translateX(3px);
  border: 1px solid rgba(225, 179, 84, 0.22);
  background: linear-gradient(100deg, rgba(115, 55, 154, 0.32), rgba(51, 28, 73, 0.18));
  color: #fff;
  font-weight: 600;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.05), 0 8px 24px rgba(0,0,0,0.16), 0 0 25px rgba(144, 54, 207, 0.1);
}

nav button.active::after { height: 24px; }

.logout {
  margin: auto 4px 0;
  border: 1px solid rgba(255, 103, 124, 0.12);
  background: rgba(87, 23, 40, 0.09);
  color: #ffb2bd;
}

.logout:hover {
  background: rgba(118, 30, 51, 0.2);
  color: #ffb2bd;
}

/* ============================================================
   4. EN-TÊTE DE PAGE (HEADER) & HERO
   ============================================================ */
main {
  border-radius: var(--radius-xl);
  overflow: clip;
  background: rgba(5, 3, 11, 0.16);
}

header {
  height: 72px;
  position: sticky;
  top: 14px;
  margin: 0 2px 20px 2px;
  z-index: 10;
  padding: 0 28px;
  border: 1px solid var(--glass-line);
  border-radius: 20px;
  background: linear-gradient(100deg, rgba(17, 10, 29, 0.78), rgba(25, 14, 41, 0.55));
  box-shadow: 0 14px 45px rgba(0, 0, 0, 0.22), inset 0 1px 0 rgba(255, 255, 255, 0.04);
  backdrop-filter: blur(26px) saturate(145%);
  -webkit-backdrop-filter: blur(26px) saturate(145%);
  display: flex;
  align-items: center;
  justify-content: space-between;
}

header h2 { font-family: 'Cinzel', serif; font-size: 24px; font-weight: 500; margin: 0; color: #fff; }
.portal #menu {
  display: none;
}
.portal #menu.is-mobile-toggle {
  width: 42px;
  height: 42px;
  display: grid;
  place-items: center;
  padding: 0;
  border: 1px solid rgba(231, 185, 79, .35);
  border-radius: 12px;
  background: rgba(231, 185, 79, .09);
  color: var(--gold2);
  font-size: 20px;
  line-height: 1;
  cursor: pointer;
  transition: background .2s ease, transform .2s ease, border-color .2s ease;
}
.portal #menu:hover { transform: translateY(-2px); border-color: var(--gold2); background: rgba(231, 185, 79, .17); }
.eyebrow { color: var(--gold); text-shadow: 0 0 14px rgba(231, 185, 85, 0.3); font-size: 0.75rem; font-weight: 600; letter-spacing: 0.1em; }
.admin-chip {
  padding: 8px 16px;
  border-radius: 20px;
  border: 1px solid rgba(235, 190, 98, 0.25);
  background: rgba(229, 177, 75, 0.07);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.05);
  backdrop-filter: blur(15px);
  font-size: 0.85rem;
}

.content { padding: 20px 28px 50px; }

.hero {
  position: relative;
  overflow: hidden;
  padding: 30px 32px;
  border: 1px solid var(--glass-line);
  border-radius: var(--radius-xl);
  background: linear-gradient(125deg, rgba(47, 25, 68, 0.68), rgba(14, 8, 26, 0.58));
  box-shadow: var(--shadow), inset 0 1px 0 rgba(255, 255, 255, 0.06), var(--glow);
  backdrop-filter: blur(20px);
  margin-bottom: 24px;
}

.hero h3 { position: relative; font-family: 'Cinzel', serif; font-size: 32px; font-weight: 500; margin: 0 0 6px 0; color: #fff; }

/* ============================================================
   5. MÉTRIQUES ET PANNEAUX (CORRECTION D'ALIGNEMENT)
   ============================================================ */
.metrics {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 18px;
  margin-bottom: 24px;
}

.metric, .panel, .oracle-card, .table-wrap, .public-creator-card {
  border: 1px solid var(--glass-line);
  background: linear-gradient(145deg, rgba(31, 19, 49, 0.66), rgba(12, 8, 22, 0.62));
  box-shadow: 0 16px 45px rgba(0, 0, 0, 0.22), inset 0 1px 0 rgba(255, 255, 255, 0.05);
  backdrop-filter: blur(18px) saturate(125%);
}

.metric {
  position: relative;
  overflow: hidden;
  padding: 22px;
  border-radius: 20px;
  transition: transform 0.22s ease, border-color 0.22s ease, box-shadow 0.22s ease;
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  justify-content: space-between;
  gap: 8px;
}

.metric span, .metric label, .metric h4 {
  font-size: 0.88rem;
  color: var(--muted);
  margin: 0;
  line-height: 1.2;
}

.metric strong {
  font-size: 32px;
  font-family: 'Cinzel', serif;
  color: var(--gold);
  text-shadow: 0 0 17px rgba(229, 178, 73, 0.2);
  line-height: 1;
}

.panel {
  border-radius: 20px;
  padding: 24px;
  margin-bottom: 20px;
}

.panel h3 { font-family: 'Cinzel', serif; font-size: 20px; font-weight: 500; color: #f7ecff; margin-top: 0; margin-bottom: 16px; }

/* Regroupe visuellement les familles de menus sans retirer les droits. */
.nav-label { display: flex; align-items: center; gap: 8px; }
.nav-label::after { content: ''; height: 1px; flex: 1; background: linear-gradient(90deg, rgba(231,185,79,.24), transparent); }
.sidebar nav button[data-page^="experience"] { color: #ddd4ea; }
.sidebar nav button[data-page^="experience"].active { background: linear-gradient(105deg, rgba(231,185,79,.18), rgba(148,58,239,.12)); border-color: rgba(231,185,79,.3); }
.admin-chip { white-space: nowrap; max-width: 260px; overflow: hidden; text-overflow: ellipsis; }
.public-nav, .public-hero, .public-feature-section, .public-oracle-callout, .public-creator-callout { max-width: 1180px; margin-inline: auto; }
.public-feature-grid article { transition: transform .24s ease, border-color .24s ease, background .24s ease; }
.public-feature-grid article:hover { transform: translateY(-5px); border-color: rgba(231,185,79,.48); background: rgba(27,18,50,.82); }
.public-oracle-callout, .public-creator-callout { border-radius: 24px; box-shadow: 0 25px 80px rgba(0,0,0,.24), inset 0 1px rgba(255,255,255,.04); }
@media (min-width: 1100px) { .content { max-width: 1320px; margin-inline: auto; } }

/* Centre de contrôle éditorial */
.control-ribbon {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 14px;
  margin-bottom: 22px;
}
.control-ribbon article {
  min-height: 92px;
  padding: 20px;
  border: 1px solid rgba(231,185,79,.2);
  border-radius: 20px;
  background: linear-gradient(140deg, rgba(31,19,49,.76), rgba(10,7,20,.66));
  box-shadow: inset 0 1px rgba(255,255,255,.05), 0 15px 35px rgba(0,0,0,.2);
  display: grid;
  align-content: center;
  gap: 5px;
}
.control-ribbon span, .studio-card .eyebrow { color: var(--gold); font-size: .68rem; font-weight: 800; letter-spacing: .16em; }
.control-ribbon strong { color: #fff; font-family: 'Cinzel', serif; font-size: 1.05rem; }
.control-ribbon small { color: var(--muted); }
.studio-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 20px; }
.studio-grid .panel { margin: 0; }
.studio-card-wide { grid-column: 1 / -1; }
.studio-card-head, .oracle-cards-heading {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
  margin-bottom: 20px;
}
.studio-card-head h2, .studio-card-head h3, .oracle-cards-heading h3 { margin: 4px 0 0; font-family: 'Cinzel', serif; }
.status-dot { padding: 7px 12px; border-radius: 999px; font-size: .73rem; font-weight: 700; border: 1px solid rgba(255,255,255,.13); }
.status-dot.live { color: #9ff7ca; background: rgba(16,185,129,.12); border-color: rgba(16,185,129,.3); }
.status-dot.auto { color: #d8b4fe; background: rgba(168,85,247,.12); border-color: rgba(168,85,247,.3); }
.status-dot.locked { color: var(--gold2); background: rgba(231,185,79,.12); border-color: rgba(231,185,79,.3); }
.field-help { display: block; margin-top: 7px; color: var(--muted); font-weight: 400; }
.toggle-board { display: grid; grid-template-columns: repeat(auto-fit, minmax(170px, 1fr)); gap: 10px; }
.toggle-board label, .lock-choice {
  min-height: 44px;
  padding: 10px 12px;
  border: 1px solid rgba(171,101,207,.18);
  border-radius: 13px;
  background: rgba(8,5,15,.38);
  display: flex !important;
  align-items: center;
  gap: 9px !important;
}
.toggle-board input, .lock-choice input, .content-choice input { width: auto; margin: 0; accent-color: var(--gold); }
.horoscope-toolbar { display: flex; align-items: end; justify-content: space-between; gap: 18px; margin-bottom: 18px; }
.horoscope-toolbar label { min-width: 260px; }
.content-choice-list { display: grid; gap: 9px; max-height: 410px; overflow: auto; margin-bottom: 16px; padding-right: 4px; }
.content-choice {
  display: grid;
  grid-template-columns: auto 1fr;
  gap: 12px;
  align-items: center;
  padding: 13px;
  border: 1px solid rgba(255,255,255,.08);
  border-radius: 14px;
  background: rgba(7,4,14,.4);
  cursor: pointer;
}
.content-choice:hover { border-color: rgba(231,185,79,.35); }
.content-choice span { display: grid; gap: 3px; }
.content-choice small { color: var(--muted); }

.oracle-control-editor { width: min(1000px, 78vw); max-height: 78vh; overflow: auto; padding-right: 8px; }
.oracle-editor-card-list { display: grid; grid-template-columns: repeat(2, minmax(0,1fr)); gap: 10px; }
.oracle-editor-card {
  width: 100%;
  display: grid;
  grid-template-columns: 54px minmax(0,1fr) auto;
  align-items: center;
  gap: 12px;
  padding: 10px;
  color: #fff;
  text-align: left;
  border: 1px solid rgba(255,255,255,.09);
  border-radius: 15px;
  background: rgba(9,5,17,.62);
  cursor: pointer;
}
.oracle-editor-card:hover { border-color: rgba(231,185,79,.38); transform: translateY(-1px); }
.oracle-editor-thumb { width: 54px; height: 68px; display: grid; place-items: center; overflow: hidden; border-radius: 9px; color: var(--gold); background: rgba(231,185,79,.08); }
.oracle-editor-thumb img { width: 100%; height: 100%; object-fit: cover; }
.oracle-editor-card > span:nth-child(2) { display: grid; gap: 5px; min-width: 0; }
.oracle-editor-card small { color: var(--muted); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.edit-mark { color: var(--gold2); font-size: .73rem; }
.card-control-editor { width: min(760px, 78vw); }

/* ============================================================
   6. BOUTONS & FORMULAIRES
   ============================================================ */
.creator-actions {
  display: flex;
  gap: 12px;
  flex-wrap: wrap;
}

.soft, .primary, .danger, .actions button {
  padding: 10px 18px;
  border-radius: 12px;
  font-size: 0.88rem;
  font-weight: 600;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  transition: transform 0.18s ease, filter 0.18s ease, box-shadow 0.18s ease, border-color 0.18s ease;
  border: 1px solid transparent;
}

.primary {
  background: linear-gradient(115deg, #b77820 0%, #ecc45f 48%, #ffe7a0 100%);
  color: #0d0614;
  box-shadow: 0 9px 24px rgba(191, 132, 36, 0.2), inset 0 1px 0 rgba(255, 255, 255, 0.42);
}

.primary:hover, .soft:hover, .actions button:hover {
  transform: translateY(-2px);
  filter: brightness(1.08);
}

.soft {
  border: 1px solid rgba(190, 108, 239, 0.18);
  background: linear-gradient(120deg, rgba(82, 38, 118, 0.7), rgba(42, 22, 62, 0.72));
  color: #e0d8ef;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.04);
}

.danger {
  border: 1px solid rgba(239, 68, 68, 0.3);
  background: rgba(239, 68, 68, 0.15);
  color: #fca5a5;
}

input, textarea, select {
  width: 100%;
  box-sizing: border-box;
  padding: 12px 14px;
  border-radius: 12px;
  color: #fff;
  border: 1px solid rgba(171, 101, 207, 0.26);
  background: rgba(8, 5, 15, 0.62);
  box-shadow: inset 0 1px 8px rgba(0, 0, 0, 0.18);
  transition: border-color 0.2s, box-shadow 0.2s, background 0.2s;
  margin-top: 4px;
}

input:focus, textarea:focus, select:focus {
  outline: none;
  border-color: rgba(232, 187, 90, 0.62);
  background: rgba(12, 7, 21, 0.82);
  box-shadow: 0 0 0 3px rgba(225, 177, 76, 0.08), 0 0 25px rgba(155, 67, 214, 0.1);
}

/* ============================================================
   7. CREATOR STUDIO & EXPRÈS 1-CLIC
   ============================================================ */
.express-zone {
  border: 2px dashed rgba(231, 185, 79, 0.4);
  border-radius: 20px;
  padding: 28px;
  text-align: center;
  background: rgba(231, 185, 79, 0.03);
  margin-bottom: 24px;
  transition: all 0.3s ease;
}

.express-zone:hover {
  border-color: var(--gold);
  background: rgba(231, 185, 79, 0.06);
}

.import-dropzone {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr) auto;
  align-items: center;
  gap: 18px;
  text-align: left;
  cursor: pointer;
  border-width: 1px;
  background: linear-gradient(120deg, rgba(231, 185, 79, 0.10), rgba(118, 52, 169, 0.10) 52%, rgba(16, 10, 29, 0.55));
}
.import-dropzone:focus-visible { outline: 2px solid var(--gold2); outline-offset: 4px; }
.import-dropzone.is-dragging { transform: scale(1.01); border-color: var(--gold2); background: rgba(231, 185, 79, 0.14); box-shadow: 0 0 0 5px rgba(231, 185, 79, 0.08), var(--shadow); }
.import-icon { width: 50px; height: 50px; display: grid; place-items: center; border-radius: 16px; color: #180d25; background: linear-gradient(135deg, var(--gold2), var(--gold)); font-size: 28px; font-weight: 700; box-shadow: 0 8px 28px rgba(231, 185, 79, 0.22); }
.import-kicker { color: var(--gold2); font-size: 0.68rem; font-weight: 700; letter-spacing: 0.15em; }
.import-copy h3 { margin: 4px 0 6px; font-family: 'Cinzel', serif; font-size: 1.2rem; }
.import-copy p { margin: 0; max-width: 720px; line-height: 1.55; }
.import-dropzone .primary { white-space: nowrap; padding: 11px 17px; }
.import-help { grid-column: 2 / -1; color: var(--muted); font-size: 0.78rem; }
.import-review { max-width: 760px; }
.import-review h2 { margin: 6px 0; font-family: 'Cinzel', serif; }
.import-review label { display: block; margin: 18px 0; font-weight: 600; }
.import-review-head, .import-review-row { display: grid; grid-template-columns: 72px minmax(180px, 1fr) minmax(120px, 1fr); gap: 10px; align-items: center; }
.import-review-head { padding: 8px 10px; color: var(--muted); font-size: .75rem; text-transform: uppercase; letter-spacing: .08em; }
.import-review-list { max-height: 350px; overflow: auto; border: 1px solid var(--glass-line); border-radius: 12px; }
.import-review-row { padding: 8px 10px; border-bottom: 1px solid rgba(255,255,255,.07); }
.import-review-row:last-child { border-bottom: 0; }
.import-review-row input { margin: 0; padding: 8px 10px; }
.import-review-row span { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; color: var(--muted); font-size: .8rem; }
@media (max-width: 680px) {
  .import-dropzone { grid-template-columns: auto minmax(0, 1fr); }
  .import-dropzone .primary { grid-column: 1 / -1; width: 100%; }
  .import-help { grid-column: 1 / -1; }
  .import-review-head, .import-review-row { grid-template-columns: 54px minmax(0, 1fr); }
  .import-review-head strong:last-child, .import-review-row span { display: none; }
}

.progress-bar-container {
  width: 100%;
  height: 12px;
  background: rgba(255, 255, 255, 0.1);
  border-radius: 10px;
  overflow: hidden;
  margin: 15px 0 10px 0;
}

.progress-bar-fill {
  height: 100%;
  width: 0%;
  background: linear-gradient(90deg, var(--purple), var(--gold));
  border-radius: 10px;
  transition: width 0.2s ease;
}

.oracle-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(310px, 1fr));
  gap: 22px;
  margin-top: 20px;
}

.oracle-card {
  border-radius: 20px;
  padding: 18px;
  display: flex;
  flex-direction: column;
  transition: transform 0.22s ease, border-color 0.22s ease, box-shadow 0.22s ease;
}

.oracle-card:hover {
  transform: translateY(-5px);
  border-color: rgba(233, 188, 92, 0.4);
  box-shadow: 0 25px 65px rgba(0, 0, 0, 0.35), 0 0 35px rgba(145, 55, 205, 0.12);
}

.oracle-card-cover {
  width: 100%;
  height: 190px;
  border-radius: 14px;
  object-fit: cover;
  margin-bottom: 14px;
  background: #090611;
  border: 1px solid rgba(255, 255, 255, 0.08);
}

.oracle-card h3 {
  font-family: 'Cinzel', serif;
  font-size: 1.2rem;
  margin: 0 0 6px 0;
  color: #fff;
}

.oracle-actions-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 8px;
  margin-top: auto;
  padding-top: 15px;
  border-top: 1px solid rgba(255, 255, 255, 0.08);
}

.btn-studio {
  padding: 8px 10px;
  border-radius: 10px;
  font-size: 0.8rem;
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid rgba(255, 255, 255, 0.1);
  color: #e0d8ef;
  cursor: pointer;
  text-align: center;
  transition: all 0.2s ease;
}

.btn-studio:hover {
  background: rgba(255, 255, 255, 0.15);
  color: #fff;
}

.btn-studio.gold {
  border-color: rgba(231, 185, 79, 0.4);
  color: var(--gold);
  background: rgba(231, 185, 79, 0.08);
}

/* ============================================================
   8. DIALOGS, TOAST & MODALES
   ============================================================ */
dialog {
  border: 1px solid rgba(232, 185, 87, 0.27);
  border-radius: 24px;
  padding: 28px;
  background: linear-gradient(145deg, rgba(27, 16, 43, 0.94), rgba(8, 5, 16, 0.95));
  box-shadow: 0 32px 100px rgba(0, 0, 0, 0.65), 0 0 60px rgba(139, 46, 202, 0.12);
  backdrop-filter: blur(28px);
  color: #fff;
}

dialog::backdrop {
  background: rgba(2, 1, 6, 0.76);
  backdrop-filter: blur(10px);
}

#toast {
  position: fixed;
  bottom: 25px;
  right: 25px;
  padding: 14px 24px;
  border-radius: 16px;
  background: rgba(28, 17, 43, 0.88);
  box-shadow: 0 20px 55px rgba(0, 0, 0, 0.4), 0 0 25px rgba(229, 181, 78, 0.12);
  backdrop-filter: blur(20px);
  transform: translateY(100px);
  opacity: 0;
  transition: all 0.3s ease;
  z-index: 9999;
}

#toast.show { transform: translateY(0); opacity: 1; }

/* ============================================================
   9. ANIMATIONS & RESPONSIVE DESIGN
   ============================================================ */
@keyframes aurora-drift { to { transform: translate3d(5%, -3%, 0) rotate(18deg) scale(1.08); } }
@keyframes star-drift { to { background-position: 65px 73px, 132px 148px; } }
@keyframes twinkle { from { opacity: 0.35; transform: scale(0.88); } to { opacity: 1; transform: scale(1.08); } }

@media(max-width: 1000px) {
  .portal { grid-template-columns: 250px minmax(0, 1fr); gap: 12px; }
  .content { padding: 20px; }
}

@media(max-width: 760px) {
  .portal { display: block; padding: 0; }
  .sidebar { top: 0; height: 100vh; border-radius: 0 25px 25px 0; }
  main { border-radius: 0; }
  header { top: 0; margin: 0; border-radius: 0 0 22px 22px; }
  .oracle-grid { grid-template-columns: 1fr; }
  .metrics { grid-template-columns: 1fr; }
  .control-ribbon, .studio-grid { grid-template-columns: 1fr; }
  .studio-card-wide { grid-column: auto; }
  .horoscope-toolbar { align-items: stretch; flex-direction: column; }
  .horoscope-toolbar label { min-width: 0; }
  .oracle-control-editor, .card-control-editor { width: auto; max-height: none; }
  .oracle-editor-card-list { grid-template-columns: 1fr; }
}
/* Compact web navigation and command palette */
.nav-group > summary { cursor:pointer; list-style:none; user-select:none; }
.nav-group > summary::-webkit-details-marker { display:none; }
.nav-group > summary::after { content:'⌄'; float:right; opacity:.55; transition:transform .2s ease; }
.nav-group[open] > summary::after { transform:rotate(180deg); }
.nav-group > summary small { display:block; margin:3px 0 0 28px; opacity:.55; font-size:.72rem; font-weight:500; }
.nav-group > button { margin-left:10px; width:calc(100% - 10px); }
.command-palette { min-width:min(520px, calc(100vw - 32px)); padding:18px; border:1px solid rgba(198,168,255,.28); border-radius:18px; background:#121326; color:#f7f4ff; box-shadow:0 24px 80px rgba(0,0,0,.55); }
.command-palette::backdrop { background:rgba(3,4,14,.62); backdrop-filter:blur(5px); }
.command-palette input { width:100%; box-sizing:border-box; padding:13px 14px; border-radius:12px; border:1px solid rgba(255,255,255,.16); background:rgba(255,255,255,.06); color:inherit; outline:none; }
#command-results { display:grid; gap:6px; margin-top:12px; max-height:340px; overflow:auto; }
#command-results button { text-align:left; padding:11px 12px; border:0; border-radius:10px; background:transparent; color:inherit; cursor:pointer; }
#command-results button:hover, #command-results button:focus-visible { background:rgba(166,119,255,.18); outline:none; }
.experience-error { color:#ffd0d0; border:1px solid rgba(255,120,120,.3); background:rgba(120,30,40,.18); padding:16px; border-radius:14px; }
