/* FERA V0.81.1 AURUM + CODEX TWIN WORLD FOUNDATION */

.aurum-gate-screen,
.aurum-world-screen,
.codex-gate-screen{
  display:grid;
  gap:14px;
  padding-bottom:96px;
}

.aurum-gate-card,
.codex-gate-card,
.aurum-command-card,
.aurum-ledger-card,
.aurum-plan-card,
.aurum-action-card,
.aurum-vault-card,
.codex-library-card,
.codex-study-card,
.codex-contract-card,
.aurum-contract-card{
  display:grid;
  gap:12px;
  background:
    radial-gradient(circle at 100% 0%,rgba(214,178,100,.09),transparent 52%),
    #0d1219;
  border-color:rgba(214,178,100,.18);
}

.aurum-head,
.codex-head{
  display:flex;
  align-items:center;
  justify-content:space-between;
  gap:12px;
}

.aurum-head > div,
.codex-head > div{
  min-width:0;
}

.aurum-head h1,
.codex-head h1,
.aurum-gate-card h1,
.codex-gate-card h1{
  font-size:34px;
  line-height:.95;
  letter-spacing:0;
  margin:6px 0 4px;
}

.aurum-world-screen h2,
.codex-world-screen h2{
  font-size:30px;
  line-height:.98;
  letter-spacing:0;
}

.aurum-head p,
.codex-head p,
.aurum-contract-card p,
.codex-contract-card p{
  color:#9aa4b2;
  font-size:12px;
  line-height:1.35;
  margin:0;
}

.aurum-contract-card strong,
.codex-contract-card strong{
  color:#f2d37b;
  font-size:17px;
}

.aurum-mode-nav{
  display:grid;
  grid-template-columns:repeat(5,1fr);
  gap:8px;
}

.aurum-mode-nav button,
.codex-mode-nav button{
  min-width:0;
  border:1px solid rgba(255,255,255,.08);
  background:#0d1219;
  color:#9aa4b2;
  border-radius:16px;
  min-height:42px;
  font-weight:900;
  font-size:11px;
  padding:0 6px;
}

.aurum-mode-nav button.active,
.codex-mode-nav button.active{
  border-color:rgba(242,211,123,.55);
  color:#f2d37b;
  background:rgba(31,27,15,.92);
}

.aurum-gate-question,
.codex-gate-question,
.aurum-phase-card,
.aurum-next-action,
.aurum-log-list,
.codex-librarian-note,
.codex-path-detail{
  border:1px solid rgba(214,178,100,.15);
  border-radius:20px;
  background:#0d1219;
  padding:13px;
  display:grid;
  gap:8px;
}

.aurum-gate-question h3,
.codex-gate-question h3,
.aurum-next-action h3,
.codex-path-detail h3{
  color:#f2d37b;
  font-size:20px;
  margin:0;
}

.aurum-phase-card label,
.aurum-form-grid label,
.codex-current-path label,
.codex-law-box label,
.codex-input-block label{
  color:#8d98a8;
  font-size:10px;
  text-transform:uppercase;
  letter-spacing:.09em;
  font-weight:900;
}

.aurum-phase-card strong,
.codex-librarian-note strong{
  color:#f2d37b;
  font-size:17px;
  line-height:1.25;
}

.aurum-phase-card span,
.aurum-next-action p,
.codex-librarian-note p,
.codex-librarian-note small,
.codex-path-detail p,
.codex-path-detail small{
  color:#b6bfcc;
  font-size:13px;
  line-height:1.45;
  margin:0;
}

.aurum-gate-options,
.codex-gate-options{
  display:grid;
  gap:8px;
}

.aurum-gate-option,
.codex-gate-option{
  border:1px solid rgba(255,255,255,.08);
  border-radius:18px;
  background:#090d13;
  color:#e8edf5;
  min-height:46px;
  padding:10px 12px;
  text-align:left;
  font-weight:900;
}

.aurum-gate-option.active,
.codex-gate-option.active{
  border-color:rgba(242,211,123,.6);
  color:#f2d37b;
  background:
    radial-gradient(circle at 100% 0%,rgba(214,178,100,.14),transparent 55%),
    #19150d;
}

.aurum-form-grid{
  display:grid;
  gap:8px;
}

.aurum-form-grid input,
.aurum-form-grid select,
.aurum-form-grid textarea,
.codex-input-block textarea,
.codex-practice-card textarea{
  width:100%;
  border:1px solid rgba(255,255,255,.08);
  background:#090d13;
  color:#e8edf5;
  border-radius:16px;
  padding:12px;
  font-weight:750;
}

.aurum-form-grid textarea,
.codex-input-block textarea,
.codex-practice-card textarea{
  min-height:92px;
  resize:vertical;
}

.aurum-vault-section,
.codex-archive-section{
  border:1px solid rgba(214,178,100,.15);
  border-radius:18px;
  background:#0d1219;
  padding:12px;
}

.aurum-vault-section summary,
.codex-archive-section summary{
  cursor:pointer;
  color:#f2d37b;
  font-weight:950;
}

.aurum-vault-section summary span,
.codex-archive-section summary span{
  color:#9aa4b2;
  font-size:11px;
}

.aurum-vault-list,
.codex-archive-list{
  display:grid;
  gap:8px;
  padding-top:10px;
}

.codex-shelf-grid{
  display:grid;
  gap:10px;
}

.codex-path-shelf{
  border:1px solid rgba(214,178,100,.15);
  border-radius:20px;
  background:#0d1219;
  padding:13px;
  text-align:left;
  color:#e8edf5;
  display:grid;
  gap:7px;
}

.codex-path-shelf.active,
.codex-path-shelf.recommended{
  border-color:rgba(242,211,123,.55);
  background:
    radial-gradient(circle at 100% 0%,rgba(214,178,100,.12),transparent 55%),
    #0d1219;
}

.codex-path-shelf.today{
  border-color:rgba(86,255,160,.35);
  box-shadow:inset 0 0 0 1px rgba(86,255,160,.08);
}

.codex-path-shelf .today-pill{
  color:#7fffb5;
}

.codex-path-shelf strong{
  color:#e8edf5;
  font-size:18px;
}

.codex-path-shelf p{
  color:#b6bfcc;
  font-size:12px;
  line-height:1.4;
  margin:0;
}

.codex-path-shelf small,
.codex-path-shelf em{
  color:#9aa4b2;
  font-size:11px;
  font-weight:850;
  font-style:normal;
}

.codex-path-shelf em{
  color:#f2d37b;
}

.codex-contract-card{
  display:grid;
  gap:7px;
}

@media(max-width:430px){
  .aurum-mode-nav,
  .codex-mode-nav{
    grid-template-columns:repeat(3,1fr);
  }

  .aurum-head h1,
  .codex-head h1,
  .aurum-gate-card h1,
  .codex-gate-card h1{
    font-size:30px;
  }
}

/* END FERA V0.81.1 AURUM + CODEX TWIN WORLD FOUNDATION */

/* FERA V0.81.1 SOURCE REBIRTH FOUNDATION */

*::selection{
  background:rgba(214,178,100,.28);
  color:#fff1bd;
}

button:focus{
  outline:none;
}

button:focus-visible{
  box-shadow:0 0 0 2px rgba(242,211,123,.22);
}

.founder-restart-backdrop{
  position:fixed;
  inset:0;
  background:rgba(0,0,0,.46);
  z-index:1490;
}

.founder-restart-popup{
  position:fixed;
  left:50%;
  bottom:calc(86px + env(safe-area-inset-bottom));
  transform:translateX(-50%);
  width:min(390px,calc(100vw - 28px));
  z-index:1500;
  border:1px solid rgba(214,178,100,.22);
  border-radius:26px;
  background:
    radial-gradient(circle at 50% 0%,rgba(214,178,100,.10),transparent 40%),
    linear-gradient(180deg,rgba(16,21,28,.98),rgba(9,11,15,.98));
  box-shadow:0 24px 60px rgba(0,0,0,.58);
  padding:16px;
  display:grid;
  gap:12px;
}

.founder-restart-popup h2{
  color:#f2d37b;
  font-size:28px;
  line-height:.98;
  letter-spacing:-.05em;
  margin:4px 0;
}

.founder-restart-popup p{
  color:#c3ccd8;
  font-size:13px;
  line-height:1.45;
  margin:0;
}

.founder-restart-steps{
  display:grid;
  grid-template-columns:repeat(3,1fr);
  gap:8px;
}

.founder-restart-steps div{
  border:1px solid rgba(214,178,100,.15);
  border-radius:16px;
  background:#0d1219;
  padding:10px;
  display:grid;
  gap:5px;
}

.founder-restart-steps strong{
  color:#f2d37b;
  font-size:17px;
}

.founder-restart-steps span{
  color:#9aa4b2;
  font-size:11px;
  font-weight:850;
}

.world-formation-screen,
.aurum-gate-screen,
.codex-gate-screen{
  display:grid;
  gap:14px;
  padding-bottom:96px;
}

.world-gate-card,
.aurum-gate-card,
.codex-gate-card{
  border:1px solid rgba(214,178,100,.18);
  border-radius:24px;
  background:
    radial-gradient(circle at 100% 0%,rgba(214,178,100,.11),transparent 54%),
    #0d1219;
  display:grid;
  gap:12px;
}

.world-gate-options,
.aurum-gate-options,
.codex-gate-options{
  display:grid;
  gap:8px;
}

.world-gate-option,
.aurum-gate-option,
.codex-gate-option{
  border:1px solid rgba(255,255,255,.08);
  border-radius:18px;
  background:#090d13;
  color:#e8edf5;
}

.world-gate-option.active,
.aurum-gate-option.active,
.codex-gate-option.active{
  border-color:rgba(242,211,123,.6);
  color:#f2d37b;
  background:
    radial-gradient(circle at 100% 0%,rgba(214,178,100,.14),transparent 55%),
    #19150d;
}

.world-gate-progress,
.conversation-progress,
.forma-progress{
  height:8px;
  border-radius:999px;
  background:rgba(255,255,255,.08);
  overflow:hidden;
}

.world-gate-progress i,
.conversation-progress i,
.forma-progress i{
  display:block;
  height:100%;
  border-radius:inherit;
  background:linear-gradient(90deg,#b9913f,#f2d37b);
}

.render-error-card,
.forma-repair-card{
  border:1px solid rgba(255,92,92,.28)!important;
  background:#180e11!important;
}

@media(max-width:420px){
  .founder-restart-steps{
    grid-template-columns:1fr;
  }

  .founder-restart-popup h2{
    font-size:26px;
  }
}

/* END FERA V0.81.1 SOURCE REBIRTH FOUNDATION */

/* FERA V0.81.1 UNIVERSE + WORLD FORMATION */

.world-formation-screen{
  min-height:calc(100dvh - 40px);
  display:grid;
  align-items:start;
  padding:18px 0 100px;
}

.world-gate-card{
  display:grid;
  gap:14px;
  padding:22px;
  border-radius:28px;
  border:1px solid rgba(214,178,100,.20);
  background:
    radial-gradient(circle at 50% 0%,rgba(214,178,100,.10),transparent 34%),
    linear-gradient(180deg,rgba(255,255,255,.045),rgba(255,255,255,.012)),
    #15191f;
}

.world-gate-pill-row{
  display:flex;
  justify-content:space-between;
  align-items:center;
  gap:10px;
}

.world-gate-progress{
  height:7px;
  border-radius:999px;
  background:rgba(255,255,255,.08);
  overflow:hidden;
}

.world-gate-progress i{
  display:block;
  height:100%;
  border-radius:999px;
  background:linear-gradient(90deg,#b9913f,#f2d37b);
}

.world-gate-card h1,
.nexus-world-screen h1{
  font-size:34px;
  line-height:.95;
  letter-spacing:-.06em;
  margin:4px 0 0;
}

.world-gate-question-card{
  border:1px solid rgba(214,178,100,.18);
  background:#0d1219;
  border-radius:22px;
  padding:14px;
  display:grid;
  gap:9px;
}

.world-gate-question-card h3{
  color:#f2d37b;
  font-size:18px;
  line-height:1.2;
  margin:0;
}

.world-gate-options{
  display:grid;
  gap:10px;
}

.world-gate-option{
  min-height:50px;
  border-radius:18px;
  border:1px solid rgba(255,255,255,.08);
  background:#0d1219;
  color:#e8edf5;
  text-align:left;
  padding:14px;
  font-weight:950;
}

.world-gate-option.active{
  border-color:rgba(242,211,123,.60);
  background:
    radial-gradient(circle at 100% 0%,rgba(214,178,100,.14),transparent 55%),
    rgba(31,27,15,.92);
  color:#f2d37b;
}

.nexus-world-screen,
.aurum-world-screen,
.codex-world-screen{
  display:grid;
  gap:14px;
  padding-bottom:96px;
}

.nexus-mode-nav,
.aurum-mode-nav,
.codex-mode-nav{
  display:grid;
  grid-template-columns:repeat(5,1fr);
  gap:8px;
}

.nexus-mode-nav button,
.aurum-mode-nav button,
.codex-mode-nav button{
  min-width:0;
  min-height:42px;
  border-radius:16px;
  border:1px solid rgba(255,255,255,.08);
  background:#0d1219;
  color:#9aa4b2;
  font-size:11px;
  font-weight:900;
}

.nexus-mode-nav button.active,
.aurum-mode-nav button.active,
.codex-mode-nav button.active{
  border-color:rgba(242,211,123,.55);
  color:#f2d37b;
  background:rgba(31,27,15,.92);
}

.world-contract-card,
.nexus-contract-card,
.aurum-contract-card,
.codex-contract-card,
.nexus-active-mission,
.nexus-next-action{
  display:grid;
  gap:7px;
  padding:13px;
  border-radius:20px;
  border:1px solid rgba(214,178,100,.16);
  background:#0d1219;
}

.world-contract-card strong,
.nexus-contract-card strong,
.aurum-contract-card strong,
.codex-contract-card strong,
.nexus-active-mission strong,
.nexus-next-action h3{
  color:#f2d37b;
}

.nexus-command-card,
.nexus-capture-card,
.nexus-forge-card,
.nexus-ship-card,
.nexus-archive-card{
  display:grid;
  gap:12px;
}

.nexus-command-card h2,
.nexus-capture-card h2,
.nexus-forge-card h2,
.nexus-ship-card h2,
.nexus-archive-card h2{
  font-size:30px;
  line-height:.98;
  letter-spacing:-.05em;
  margin:0;
}

.nexus-form-grid{
  display:grid;
  gap:9px;
}

.nexus-form-grid label,
.world-contract-card label{
  color:#8d98a8;
  font-size:10px;
  text-transform:uppercase;
  letter-spacing:.09em;
  font-weight:900;
}

.nexus-form-grid input,
.nexus-form-grid select,
.nexus-form-grid textarea{
  width:100%;
  border:1px solid rgba(255,255,255,.08);
  background:#090d13;
  color:#e8edf5;
  border-radius:16px;
  padding:12px;
  font-weight:750;
}

.nexus-form-grid textarea{
  min-height:86px;
  resize:vertical;
}

.nexus-archive-section{
  border:1px solid rgba(214,178,100,.14);
  border-radius:18px;
  background:#0d1219;
  overflow:hidden;
}

.nexus-archive-section summary{
  cursor:pointer;
  padding:12px;
  color:#f2d37b;
  font-weight:900;
}

.nexus-archive-list{
  display:grid;
  gap:8px;
  padding:0 12px 12px;
}

@media(max-width:430px){
  .nexus-mode-nav,
  .aurum-mode-nav,
  .codex-mode-nav{
    grid-template-columns:repeat(3,1fr);
  }

  .world-gate-card h1,
  .nexus-world-screen h1{
    font-size:30px;
  }
}

/* END FERA V0.81.1 UNIVERSE + WORLD FORMATION */
