:root {
  --bone: #e8d6b8;
  --bone-dim: #b89f77;
  --teal: #58d6dc;
  --teal-glow: rgba(88, 214, 220, 0.25);
  --ember: #f08b45;
  --rare: #f0be5c;
  --mythic: #b274ff;
  --dark: #050708;
  --dark-surface: #0a0e10;
  --panel: rgba(8, 13, 15, 0.82);
  --panel-border: rgba(232, 214, 184, 0.22);
  --glass-bg: rgba(16, 23, 26, 0.65);
}

* { box-sizing: border-box; }

html {
  scroll-behavior: smooth;
  font-size: 16px;
}

html, body {
  min-height: 100%;
  margin: 0;
  padding: 0;
}

body {
  font-family: Georgia, 'Times New Roman', serif;
  color: var(--bone);
  background:
    radial-gradient(circle at 50% 20%, rgba(88, 214, 220, 0.14), transparent 32%),
    radial-gradient(circle at 80% 75%, rgba(240, 139, 69, 0.10), transparent 30%),
    linear-gradient(160deg, #050708, #0e1518 48%, #020303);
  background-attachment: fixed;
  overflow-x: hidden;
  overflow-y: auto;
  line-height: 1.6;
}

/* Studio Background Grid & Mist */
body::before {
  content: "";
  position: fixed;
  inset: 0;
  background-image:
    linear-gradient(rgba(255, 255, 255, 0.025) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255, 255, 255, 0.025) 1px, transparent 1px);
  background-size: 42px 42px;
  mask-image: radial-gradient(circle at 50% 50%, black, transparent 82%);
  pointer-events: none;
  z-index: 0;
}

.mist {
  position: fixed;
  inset: -20%;
  background: radial-gradient(circle, rgba(88, 214, 220, 0.11), transparent 38%);
  filter: blur(34px);
  animation: drift 11s ease-in-out infinite alternate;
  pointer-events: none;
  z-index: 0;
}

@keyframes drift {
  from { transform: translate(-3%, -2%) scale(1); }
  to { transform: translate(3%, 2%) scale(1.08); }
}

/* Focus & Accessibility */
:focus-visible {
  outline: 2px solid var(--teal);
  outline-offset: 4px;
}

/* Header & Site Navigation */
.site-header, .origins-header {
  position: sticky;
  top: 0;
  z-index: 100;
  background: rgba(5, 7, 8, 0.92);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border-bottom: 1px solid rgba(232, 214, 184, 0.14);
  padding: 12px 20px;
}

.header-inner {
  max-width: 1100px;
  margin: 0 auto;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
}

.brand-link {
  display: flex;
  align-items: center;
  gap: 10px;
  text-decoration: none;
  color: var(--bone);
  font-weight: 700;
  letter-spacing: 0.12em;
  min-height: 44px;
}

.brand-icon {
  display: grid;
  place-items: center;
  width: 32px;
  height: 32px;
  border-radius: 50%;
  border: 1px solid rgba(232, 214, 184, 0.4);
  color: var(--teal);
  font-size: 0.95rem;
  font-weight: 800;
  background: rgba(88, 214, 220, 0.08);
}

.brand-text {
  font-size: 0.95rem;
}

.site-nav {
  display: flex;
  align-items: center;
  gap: 20px;
}

.site-nav a {
  color: var(--bone-dim);
  text-decoration: none;
  font-size: 0.85rem;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  transition: color 0.2s ease;
  padding: 8px 4px;
  min-height: 44px;
  display: inline-flex;
  align-items: center;
}

.site-nav a:hover {
  color: var(--teal);
}

.site-nav a.nav-highlight {
  color: var(--bone);
  border: 1px solid rgba(88, 214, 220, 0.4);
  padding: 6px 14px;
  border-radius: 999px;
  background: rgba(88, 214, 220, 0.08);
}

.site-nav a.nav-highlight:hover {
  border-color: var(--teal);
  box-shadow: 0 0 16px rgba(88, 214, 220, 0.2);
}

.menu-toggle {
  display: none;
  background: transparent;
  border: 1px solid rgba(232, 214, 184, 0.28);
  border-radius: 8px;
  padding: 8px 10px;
  cursor: pointer;
  min-height: 44px;
  min-width: 44px;
  flex-direction: column;
  justify-content: center;
  gap: 5px;
}

.menu-toggle:hover,
.menu-toggle:focus-visible {
  border-color: var(--teal);
  box-shadow: 0 0 12px rgba(88, 214, 220, 0.2);
}

.hamburger-bar {
  display: block;
  width: 22px;
  height: 2px;
  background-color: var(--bone);
  transition: transform 0.2s ease, opacity 0.2s ease;
}

.origins-header {
  padding: 14px 24px;
}

.back-to-studio {
  color: var(--bone-dim);
  text-decoration: none;
  font-size: 0.88rem;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  display: inline-flex;
  align-items: center;
  min-height: 44px;
}

.back-to-studio:hover {
  color: var(--teal);
}

/* Sections & Container */
main {
  position: relative;
  z-index: 1;
}

.section {
  padding: 80px 20px;
  border-bottom: 1px solid rgba(232, 214, 184, 0.08);
}

.section-container {
  max-width: 1040px;
  margin: 0 auto;
}

.eyebrow {
  color: var(--teal);
  font-size: 0.82rem;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  margin-bottom: 8px;
}

h1, h2, h3, h4 {
  font-weight: 700;
  line-height: 1.1;
  color: var(--bone);
  margin-top: 0;
}

h2 {
  font-size: clamp(1.8rem, 4.5vw, 3rem);
  margin-bottom: 16px;
  letter-spacing: 0.02em;
}

.section-lead {
  font-size: 1.12rem;
  color: var(--bone-dim);
  max-width: 720px;
  margin-bottom: 36px;
}

/* Buttons */
.primary, .secondary, .button-group a {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 14px 28px;
  min-height: 48px;
  border-radius: 999px;
  font-family: inherit;
  font-weight: 700;
  font-size: 0.92rem;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  text-decoration: none;
  cursor: pointer;
  transition: all 0.2s ease;
  box-sizing: border-box;
}

.primary {
  border: 1px solid rgba(232, 214, 184, 0.42);
  background: linear-gradient(135deg, rgba(88, 214, 220, 0.22), rgba(232, 214, 184, 0.12));
  color: var(--bone);
  box-shadow: 0 0 20px rgba(88, 214, 220, 0.1);
}

.primary:hover {
  border-color: var(--teal);
  box-shadow: 0 0 26px rgba(88, 214, 220, 0.28);
  color: #fff;
}

.secondary {
  border: 1px solid rgba(232, 214, 184, 0.24);
  background: rgba(255, 255, 255, 0.04);
  color: var(--bone-dim);
}

.secondary:hover {
  border-color: var(--bone);
  color: var(--bone);
  background: rgba(255, 255, 255, 0.08);
}

.button-group {
  display: flex;
  flex-wrap: wrap;
  gap: 16px;
  margin: 28px 0;
}

/* HERO SECTION */
.hero-section {
  padding: 90px 20px 70px;
  text-align: center;
  display: grid;
  place-items: center;
  min-height: 70vh;
}

.hero-container {
  max-width: 860px;
}

.specimen-badge {
  display: inline-block;
  border: 1px solid rgba(88, 214, 220, 0.3);
  padding: 6px 14px;
  border-radius: 999px;
  font-size: 0.75rem;
  letter-spacing: 0.18em;
  color: var(--teal);
  background: rgba(88, 214, 220, 0.06);
  margin-bottom: 24px;
}

.hero-section h1 {
  font-size: clamp(2.5rem, 7vw, 5.2rem);
  letter-spacing: 0.04em;
  margin-bottom: 12px;
  text-shadow: 0 0 40px rgba(88, 214, 220, 0.2);
}

.hero-subtitle {
  font-size: clamp(1.2rem, 3vw, 1.8rem);
  color: var(--teal);
  margin-bottom: 20px;
  font-style: italic;
  line-height: 1.3;
}

.hero-description {
  font-size: 1.15rem;
  color: var(--bone-dim);
  max-width: 720px;
  margin: 0 auto 32px;
  line-height: 1.65;
}

.hero-section .button-group {
  justify-content: center;
}

.status-bar {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
  justify-content: center;
  padding: 10px 20px;
  border: 1px solid rgba(232, 214, 184, 0.16);
  border-radius: 999px;
  background: rgba(10, 14, 16, 0.6);
  margin-top: 16px;
}

.status-tag {
  font-size: 0.8rem;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--bone-dim);
}

.status-dot {
  color: var(--teal);
}

/* STUDIO STATEMENT */
.statement-section {
  background: rgba(0, 0, 0, 0.25);
}

.statement-card {
  border: 1px solid var(--panel-border);
  border-radius: 20px;
  padding: 36px;
  background: var(--glass-bg);
  box-shadow: 0 0 50px rgba(0, 0, 0, 0.4);
  font-size: 1.1rem;
  line-height: 1.7;
}

.statement-card p {
  margin-top: 0;
  margin-bottom: 20px;
}

.statement-card p:last-child {
  margin-bottom: 0;
}

/* SPECIMEN RECORDS / CURRENT WORK */
.specimen-records-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
  gap: 24px;
}

.specimen-card {
  border: 1px solid var(--panel-border);
  border-radius: 18px;
  padding: 28px;
  background: var(--glass-bg);
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  transition: transform 0.25s ease, border-color 0.25s ease, box-shadow 0.25s ease;
  position: relative;
  overflow: hidden;
}

.specimen-card:hover {
  transform: translateY(-4px);
  border-color: rgba(88, 214, 220, 0.45);
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.5), 0 0 20px rgba(88, 214, 220, 0.12);
}

.specimen-card.highlight-card {
  border-color: rgba(88, 214, 220, 0.5);
  background: linear-gradient(145deg, rgba(88, 214, 220, 0.08), rgba(16, 23, 26, 0.8));
}

.specimen-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 16px;
}

.specimen-id {
  font-size: 0.72rem;
  letter-spacing: 0.16em;
  color: var(--bone-dim);
  text-transform: uppercase;
}

.status-pill {
  font-size: 0.7rem;
  letter-spacing: 0.12em;
  padding: 4px 10px;
  border-radius: 999px;
  text-transform: uppercase;
  font-weight: 700;
}

.status-pill.dev {
  border: 1px solid rgba(240, 139, 69, 0.4);
  color: var(--ember);
  background: rgba(240, 139, 69, 0.08);
}

.status-pill.playable {
  border: 1px solid rgba(88, 214, 220, 0.5);
  color: var(--teal);
  background: rgba(88, 214, 220, 0.12);
}

.specimen-card h3 {
  font-size: 1.4rem;
  margin-bottom: 12px;
  letter-spacing: 0.04em;
}

.specimen-summary {
  font-size: 0.98rem;
  color: var(--bone-dim);
  margin-bottom: 20px;
  line-height: 1.55;
  flex-grow: 1;
}

.specimen-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-bottom: 24px;
}

.specimen-tags span {
  font-size: 0.68rem;
  letter-spacing: 0.12em;
  padding: 4px 8px;
  border: 1px solid rgba(232, 214, 184, 0.14);
  border-radius: 4px;
  color: var(--bone-dim);
  background: rgba(0, 0, 0, 0.2);
}

.specimen-footer {
  padding-top: 16px;
  border-top: 1px dashed rgba(232, 214, 184, 0.14);
}

.record-link {
  color: var(--teal);
  text-decoration: none;
  font-size: 0.88rem;
  letter-spacing: 0.08em;
  font-weight: 700;
  display: inline-flex;
  align-items: center;
  min-height: 44px;
}

.record-link:hover {
  text-decoration: underline;
}

.action-link {
  color: var(--bone);
  background: rgba(88, 214, 220, 0.15);
  border: 1px solid rgba(88, 214, 220, 0.4);
  padding: 10px 18px;
  border-radius: 999px;
  text-decoration: none;
  width: 100%;
  justify-content: center;
}

.action-link:hover {
  background: rgba(88, 214, 220, 0.28);
  border-color: var(--teal);
  text-decoration: none;
}

/* SYSTEMS */
.systems-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 20px;
}

.system-box {
  border: 1px solid var(--panel-border);
  border-radius: 16px;
  padding: 24px;
  background: var(--glass-bg);
}

.system-icon {
  font-size: 1.8rem;
  margin-bottom: 12px;
}

.system-box h3 {
  font-size: 1.15rem;
  letter-spacing: 0.1em;
  color: var(--teal);
  margin-bottom: 10px;
}

.system-box p {
  font-size: 0.92rem;
  color: var(--bone-dim);
  margin: 0;
  line-height: 1.5;
}

/* AI-NATIVE DEVELOPMENT */
.ai-roles-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 18px;
  margin-bottom: 32px;
}

.ai-role-card {
  border: 1px solid rgba(232, 214, 184, 0.16);
  border-radius: 14px;
  padding: 20px;
  background: rgba(10, 14, 16, 0.6);
}

.ai-role-card.full-width {
  grid-column: 1 / -1;
}

.ai-role-card h4 {
  color: var(--teal);
  font-size: 0.95rem;
  letter-spacing: 0.14em;
  margin-bottom: 8px;
}

.ai-role-card p {
  font-size: 0.92rem;
  color: var(--bone-dim);
  margin: 0;
  line-height: 1.5;
}

.ai-human-statement {
  border: 1px solid var(--panel-border);
  border-radius: 18px;
  padding: 28px;
  background: var(--glass-bg);
}

.ai-human-statement p {
  font-size: 1.05rem;
  margin-top: 0;
  margin-bottom: 20px;
}

.experiment-quote {
  border-left: 3px solid var(--teal);
  padding-left: 20px;
  margin-top: 20px;
}

.quote-label {
  font-size: 0.78rem;
  letter-spacing: 0.16em;
  color: var(--teal);
  margin-bottom: 4px !important;
}

.quote-text {
  font-size: 1.2rem !important;
  font-style: italic;
  color: var(--bone) !important;
  margin: 0 !important;
}

/* VISION */
.vision-section {
  text-align: center;
}

.vision-content {
  max-width: 780px;
  margin: 0 auto;
}

.vision-lead {
  font-size: 1.15rem;
  color: var(--bone-dim);
}

.vision-question {
  font-size: clamp(1.3rem, 3.5vw, 2.1rem);
  font-style: italic;
  color: var(--teal);
  margin: 28px 0;
  padding: 0 10px;
  border: none;
  line-height: 1.35;
}

.vision-summary {
  font-size: 1.25rem;
  color: var(--bone);
  font-weight: 700;
  margin-top: 24px;
}

/* ARCHIVE PORTAL */
.archive-portal-card {
  border: 1px solid rgba(88, 214, 220, 0.4);
  border-radius: 24px;
  padding: 42px 28px;
  background: linear-gradient(160deg, rgba(88, 214, 220, 0.1), rgba(10, 14, 16, 0.85));
  text-align: center;
  box-shadow: 0 0 60px rgba(88, 214, 220, 0.12);
}

.archive-portal-card h2 {
  font-size: clamp(2rem, 5vw, 3.4rem);
  margin-bottom: 16px;
}

.archive-portal-card p {
  max-width: 620px;
  margin: 0 auto 18px;
  font-size: 1.08rem;
  color: var(--bone-dim);
}

.enter-archive-btn {
  margin-top: 16px;
}

/* STATUS SECTION */
.status-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 16px;
  margin-bottom: 24px;
}

.status-item {
  border: 1px solid var(--panel-border);
  border-radius: 12px;
  padding: 16px 20px;
  background: rgba(10, 14, 16, 0.5);
}

.status-item.full-width {
  grid-column: 1 / -1;
}

.status-label {
  display: block;
  font-size: 0.72rem;
  letter-spacing: 0.16em;
  color: var(--bone-dim);
  margin-bottom: 4px;
}

.status-value {
  display: block;
  font-size: 1.1rem;
  color: var(--teal);
  font-weight: 700;
}

.status-note {
  font-size: 0.98rem;
  color: var(--bone-dim);
  font-style: italic;
  line-height: 1.6;
}

/* OPEN DEVELOPMENT */
.open-dev-links {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  gap: 18px;
}

.dev-link-card {
  border: 1px solid var(--panel-border);
  border-radius: 14px;
  padding: 20px;
  background: var(--glass-bg);
  text-decoration: none;
  transition: all 0.2s ease;
  min-height: 80px;
  display: flex;
  flex-direction: column;
  justify-content: center;
}

.dev-link-card:hover {
  border-color: var(--teal);
  transform: translateY(-2px);
  box-shadow: 0 6px 20px rgba(0, 0, 0, 0.4);
}

.dev-link-title {
  color: var(--bone);
  font-weight: 700;
  font-size: 1rem;
  margin-bottom: 4px;
}

.dev-link-desc {
  color: var(--bone-dim);
  font-size: 0.85rem;
}

/* FOOTER */
.site-footer {
  border-top: 1px solid rgba(232, 214, 184, 0.14);
  background: #030405;
  padding: 60px 20px 40px;
}

.footer-container {
  max-width: 1040px;
  margin: 0 auto;
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  gap: 32px;
}

.footer-brand h3 {
  font-size: 1.2rem;
  letter-spacing: 0.08em;
  margin-bottom: 6px;
}

.footer-tagline {
  color: var(--teal);
  font-size: 0.9rem;
  margin: 0 0 4px;
}

.footer-subtext {
  color: var(--bone-dim);
  font-size: 0.82rem;
  margin: 0;
}

.footer-links {
  display: flex;
  gap: 16px;
  margin-bottom: 12px;
  flex-wrap: wrap;
}

.footer-links a {
  color: var(--bone-dim);
  text-decoration: none;
  font-size: 0.88rem;
  letter-spacing: 0.08em;
  min-height: 44px;
  display: inline-flex;
  align-items: center;
}

.footer-links a:hover {
  color: var(--teal);
}

.footer-contact {
  color: var(--bone-dim);
  font-size: 0.88rem;
  margin: 0 0 8px;
}

.footer-contact a {
  color: var(--bone);
  text-decoration: none;
}

.footer-contact a:hover {
  color: var(--teal);
}

.footer-copy {
  color: rgba(184, 159, 119, 0.6);
  font-size: 0.8rem;
  margin: 0;
}

/* MOBILE RESPONSIVE LAYOUTS (360px, 390px, 412px Android) */
@media (max-width: 768px) {
  .site-header {
    padding: 10px 16px;
  }

  .header-inner {
    position: relative;
    flex-direction: row;
    align-items: center;
    justify-content: space-between;
  }

  .menu-toggle {
    display: flex;
  }

  .site-nav {
    display: none;
    position: absolute;
    top: calc(100% + 10px);
    left: -16px;
    right: -16px;
    background: #070a0c;
    border-bottom: 1px solid rgba(232, 214, 184, 0.22);
    box-shadow: 0 20px 35px rgba(0, 0, 0, 0.95);
    flex-direction: column;
    align-items: stretch;
    padding: 12px 20px 20px;
    gap: 4px;
    z-index: 200;
  }

  .site-nav.is-active {
    display: flex;
  }

  .site-nav a {
    font-size: 0.95rem;
    padding: 12px 16px;
    border-radius: 8px;
    width: 100%;
    justify-content: flex-start;
  }

  .site-nav a:hover,
  .site-nav a:focus-visible {
    background: rgba(88, 214, 220, 0.1);
    color: var(--teal);
  }

  .site-nav a.nav-highlight {
    border-radius: 8px;
    margin-top: 6px;
  }

  .section {
    padding: 48px 14px;
  }

  .hero-section {
    padding: 36px 12px 36px;
    min-height: auto;
  }

  .hero-section h1 {
    font-size: clamp(2.1rem, 10vw, 3.4rem);
  }

  .hero-subtitle {
    font-size: 1.15rem;
  }

  .hero-description {
    font-size: 0.98rem;
  }

  .button-group {
    flex-direction: column;
    width: 100%;
  }

  .primary, .secondary, .button-group a {
    width: 100%;
  }

  .status-bar {
    border-radius: 14px;
    padding: 10px 14px;
    gap: 6px;
  }

  .status-tag {
    font-size: 0.74rem;
  }

  .statement-card, .ai-human-statement, .archive-portal-card {
    padding: 20px 14px;
  }

  .specimen-card {
    padding: 20px 14px;
  }

  .specimen-records-grid, .systems-grid, .ai-roles-grid, .open-dev-links {
    grid-template-columns: 1fr;
  }

  .status-grid {
    grid-template-columns: 1fr;
  }

  .footer-container {
    flex-direction: column;
    gap: 24px;
    text-align: center;
  }

  .footer-links {
    justify-content: center;
  }
}

/* Reduced Motion */
@media (prefers-reduced-motion: reduce) {
  .mist {
    animation: none;
  }
  .specimen-card, .dev-link-card, .primary, .secondary {
    transition: none;
  }
}

/* PRESERVED ORIGINS COMPATIBILITY STYLES */

.screen {
  min-height: 100vh;
  display: grid;
  place-items: center;
  padding: 74px 28px 46px;
  position: relative;
}

.panel {
  width: min(900px, 94vw);
  min-height: 520px;
  display: grid;
  justify-items: center;
  align-content: center;
  gap: 18px;
  padding: 42px;
  border: 1px solid rgba(232, 214, 184, .24);
  border-radius: 28px;
  background: var(--panel);
  box-shadow: 0 0 80px rgba(88,214,220,.12), inset 0 0 60px rgba(232,214,184,.035);
  text-align: center;
  position: relative;
  z-index: 2;
}

.archive-screen .panel,
.detail-screen .panel,
.reveal .panel {
  align-content: start;
}

.brand-mark, .egg {
  width: 150px;
  height: 150px;
  border-radius: 50%;
  display: grid;
  place-items: center;
  border: 2px solid rgba(232, 214, 184, .44);
  color: var(--bone);
  font-size: 88px;
  font-weight: 800;
  text-shadow: 0 0 22px rgba(88,214,220,.35);
  box-shadow: inset 0 0 36px rgba(232,214,184,.08), 0 0 46px rgba(88,214,220,.13);
}

.egg {
  position: relative;
  border-radius: 48% 52% 52% 48% / 60% 60% 40% 40%;
  background:
    radial-gradient(circle at 35% 25%, rgba(232,214,184,.55), transparent 16%),
    radial-gradient(circle at 60% 70%, rgba(88,214,220,.15), transparent 32%),
    linear-gradient(135deg, #d8c39c, #73644c 70%, #312b22);
  color: transparent;
  animation: pulse 2.4s ease-in-out infinite;
}

.egg::after {
  content: "";
  width: 58px;
  height: 84px;
  border-left: 4px solid rgba(30,25,20,.42);
  transform: rotate(16deg);
  opacity: .65;
}

.egg.crack { animation: crack 1.1s ease both; }

.shard {
  position: absolute;
  width: 28px;
  height: 22px;
  background: rgba(232,214,184,.72);
  clip-path: polygon(50% 0, 100% 100%, 0 82%);
  opacity: 0;
}

.shard-a { top: 20px; left: 36px; animation: shardA 1.05s ease forwards; }
.shard-b { top: 54px; right: 28px; animation: shardB 1.05s ease forwards; }
.shard-c { bottom: 28px; left: 62px; animation: shardC 1.05s ease forwards; }

.flash {
  position: absolute;
  inset: -18px;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(232,214,184,.6), transparent 58%);
  opacity: 0;
  animation: hatchFlash 1.1s ease forwards;
}

@keyframes pulse { 50% { transform: scale(1.035); } }
@keyframes crack {
  15%, 55% { transform: translateX(-8px) rotate(-3deg); }
  35%, 75% { transform: translateX(8px) rotate(3deg); }
  100% { transform: scale(.9); opacity: .35; filter: blur(1px); }
}
@keyframes shardA { 40% { opacity: 1; } 100% { opacity: 0; transform: translate(-60px, -48px) rotate(-45deg); } }
@keyframes shardB { 40% { opacity: 1; } 100% { opacity: 0; transform: translate(70px, -26px) rotate(62deg); } }
@keyframes shardC { 40% { opacity: 1; } 100% { opacity: 0; transform: translate(-12px, 72px) rotate(30deg); } }
@keyframes hatchFlash {
  62% { opacity: 0; transform: scale(.82); }
  78% { opacity: .75; transform: scale(1.15); }
  100% { opacity: 0; transform: scale(1.55); }
}

.tagline, .traits {
  letter-spacing: .16em;
  text-transform: uppercase;
}

.tagline {
  color: #d6c7aa;
  font-size: .95rem;
}

.link-button {
  border: 1px solid rgba(232,214,184,.42);
  background: linear-gradient(135deg, rgba(88,214,220,.2), rgba(232,214,184,.1));
  color: var(--bone);
  padding: 14px 22px;
  border-radius: 999px;
  font-weight: 700;
  letter-spacing: .08em;
  text-transform: uppercase;
  cursor: pointer;
  text-decoration: none;
  font-family: inherit;
  font-size: 1rem;
  display: inline-flex;
  align-items: center;
  justify-content: center;
}

.link-button:hover, .link-button:focus-visible {
  border-color: var(--teal);
  box-shadow: 0 0 20px rgba(88,214,220,.2);
  outline: none;
}

.danger { opacity: .72; }

.creature {
  width: min(430px, 78vw);
  height: 260px;
  margin: 0 auto .4rem;
  display: grid;
  place-items: center;
  position: relative;
  filter: drop-shadow(0 0 26px rgba(78, 241, 255, 0.22));
  animation: revealPop .6s ease both;
  overflow: visible;
  background: transparent;
}

.creature::before,
.creature::after {
  content: none !important;
  display: none !important;
}

@keyframes revealPop {
  from { opacity: 0; transform: translateY(12px) scale(.92); }
  to { opacity: 1; transform: translateY(0) scale(1); }
}

.creature img {
  display: block;
  width: 100%;
  height: 100%;
  max-width: 100%;
  object-fit: contain;
  background: transparent;
  filter: drop-shadow(0 0 18px rgba(88,214,220,.2));
}

.detail-creature {
  width: min(460px, 82vw);
  height: 280px;
}

.missing-silhouette {
  border: 1px dashed rgba(232,214,184,.3);
  border-radius: 18px;
  padding: 20px;
  color: var(--bone-dim);
  text-transform: uppercase;
  letter-spacing: .12em;
  font-size: .8rem;
}

.rarity-ancient { filter: drop-shadow(0 0 28px rgba(240,139,69,.28)); }
.rarity-mythic { filter: drop-shadow(0 0 32px rgba(178,116,255,.35)); }
.rarity-genesis { filter: drop-shadow(0 0 42px rgba(88,214,220,.55)); }

.card {
  border: 1px solid rgba(232,214,184,.22);
  border-radius: 18px;
  padding: 24px;
  background: rgba(255,255,255,.035);
  width: min(660px, 100%);
}

.card h2 {
  margin: 0 0 10px;
  font-size: clamp(2.1rem, 6vw, 3.2rem);
  line-height: 1;
}

.traits {
  color: var(--teal);
  font-size: .86rem;
  line-height: 1.8;
}

.small {
  opacity: .78;
  font-size: .98rem;
  line-height: 1.45;
}

.meta-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0,1fr));
  gap: 14px;
  margin: 18px 0;
  width: 100%;
}

.detail-meta {
  grid-template-columns: repeat(2, minmax(0,1fr));
}

.meta-grid div {
  border: 1px solid rgba(232,214,184,.18);
  border-radius: 16px;
  padding: 14px;
  background: rgba(0,0,0,.12);
}

.meta-grid span {
  display: block;
  color: var(--bone-dim);
  text-transform: uppercase;
  letter-spacing: .16em;
  font-size: .74rem;
  margin-bottom: 6px;
}

.meta-grid strong {
  display: block;
  color: var(--teal);
  font-size: 1.3rem;
  line-height: 1.18;
  word-break: break-word;
}

.fragment {
  margin-top: 18px;
  border-left: 3px solid var(--ember);
  text-align: left;
  padding: 10px 14px;
  background: rgba(240,139,69,.08);
  border-radius: 10px;
}

.fragment span {
  color: var(--ember);
  font-size: .75rem;
  letter-spacing: .14em;
}

.fragment p {
  margin: 5px 0 0;
  line-height: 1.5;
}

.rarity-card {
  position: relative;
  overflow: hidden;
}

.rarity-card::before {
  content: "";
  position: absolute;
  inset: 0;
  border-radius: inherit;
  pointer-events: none;
  opacity: .36;
}

.rarity-common { border-color: rgba(232,214,184,.22); }
.rarity-uncommon { border-color: rgba(88,214,220,.45); box-shadow: 0 0 22px rgba(88,214,220,.08); }
.rarity-rare { border-color: rgba(240,190,92,.65); box-shadow: 0 0 24px rgba(240,190,92,.12); }
.rarity-ancient { border-color: rgba(240,139,69,.7); box-shadow: 0 0 34px rgba(240,139,69,.18); }
.rarity-mythic { border-color: rgba(178,116,255,.74); box-shadow: 0 0 38px rgba(178,116,255,.22); }
.rarity-genesis { border-color: rgba(88,214,220,.95); box-shadow: 0 0 48px rgba(88,214,220,.35); }

.rarity-rare::before {
  background: linear-gradient(135deg, rgba(240,190,92,.16), transparent 38%);
}

.rarity-ancient::before {
  background: radial-gradient(circle at 20% 10%, rgba(240,139,69,.22), transparent 38%);
  animation: fossilPulse 2.8s ease-in-out infinite;
}

.rarity-mythic::before {
  background: linear-gradient(110deg, transparent 0%, rgba(178,116,255,.18) 35%, transparent 70%);
  animation: shimmer 3.2s linear infinite;
}

.rarity-genesis::before {
  background:
    radial-gradient(circle at 50% 0%, rgba(88,214,220,.25), transparent 38%),
    linear-gradient(135deg, rgba(232,214,184,.12), transparent 45%);
  animation: genesisPulse 2.4s ease-in-out infinite;
}

@keyframes fossilPulse { 50% { opacity: .66; } }
@keyframes shimmer { from { transform: translateX(-60%); } to { transform: translateX(60%); } }
@keyframes genesisPulse { 50% { opacity: .8; filter: brightness(1.18); } }

.links {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 10px;
  margin-top: 8px;
  width: min(740px, 100%);
}

.archive-stats {
  position: fixed;
  z-index: 5;
  top: 60px;
  left: 50%;
  transform: translateX(-50%);
  display: flex;
  gap: 8px;
  max-width: min(980px, calc(100vw - 18px));
  overflow-x: auto;
  padding: 6px 8px;
  border: 1px solid rgba(232,214,184,.12);
  border-radius: 999px;
  background: rgba(8,13,15,.76);
  backdrop-filter: blur(8px);
  scrollbar-width: thin;
}

.archive-stats span {
  flex: 0 0 auto;
  border: 1px solid rgba(232,214,184,.22);
  border-radius: 999px;
  padding: 8px 12px;
  background: rgba(8,13,15,.72);
  color: var(--bone-dim);
  text-transform: uppercase;
  letter-spacing: .11em;
  font-size: .72rem;
}

.archive-stats strong {
  color: var(--teal);
}

.archive-list {
  width: min(760px, 100%);
  display: grid;
  gap: 10px;
  max-height: none;
  overflow: visible;
  padding: 4px;
}

.archive-entry {
  display: grid;
  grid-template-columns: 1fr 1.2fr 1fr;
  gap: 12px;
  align-items: center;
  text-align: left;
  border: 1px solid rgba(232,214,184,.18);
  border-radius: 14px;
  padding: 14px;
  background: rgba(255,255,255,.035);
  color: var(--bone);
  font-family: inherit;
  font-size: 1rem;
  width: 100%;
}

.archive-entry strong {
  color: var(--teal);
}

.archive-entry small {
  color: var(--bone-dim);
}

.archive-entry.locked {
  opacity: .55;
}

.rarity-row {
  cursor: pointer;
}

.rarity-row:hover {
  transform: translateY(-1px);
  border-color: var(--teal);
  box-shadow: 0 0 20px rgba(88,214,220,.12);
}

.completion-grid {
  width: min(760px, 100%);
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 8px;
  margin: 2px 0 14px;
}

.completion-pill {
  border: 1px solid rgba(232,214,184,.2);
  border-radius: 999px;
  padding: 9px 14px;
  background: rgba(255,255,255,.03);
  color: var(--bone-dim);
  text-transform: uppercase;
  letter-spacing: .1em;
  font-size: .78rem;
  font-family: inherit;
  cursor: pointer;
}

.completion-pill.found {
  border-color: rgba(88,214,220,.48);
  color: var(--teal);
  background: rgba(88,214,220,.08);
}

.completion-pill.active {
  border-color: rgba(232,214,184,.68);
  color: var(--bone);
  background: rgba(232,214,184,.08);
}

.achievement-pop {
  margin-top: 18px;
  border: 1px solid rgba(88,214,220,.28);
  border-radius: 14px;
  padding: 12px 14px;
  background: rgba(88,214,220,.08);
  text-align: left;
}

.achievement-pop span {
  color: var(--teal);
  font-size: .75rem;
  letter-spacing: .14em;
  text-transform: uppercase;
}

.achievement-pop p {
  margin: 5px 0 0;
  font-size: 1.05rem;
}

.achievement-list .archive-entry:not(.locked) {
  border-color: rgba(88,214,220,.32);
  background: rgba(88,214,220,.055);
}

.text-card {
  text-align: left;
  line-height: 1.65;
  font-size: 1rem;
}

.footer-link {
  margin: 0;
  opacity: .62;
  font-size: .85rem;
}

.footer-link a {
  color: var(--bone);
  text-decoration: none;
}

.footer-link a:hover {
  color: var(--teal);
}

/* Hatch Reconstruction Pipeline */
.egg-choice-grid {
  width: min(720px, 100%);
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
  margin: 8px 0 2px;
}

.egg-choice {
  border: 1px solid rgba(232,214,184,.22);
  border-radius: 18px;
  padding: 14px;
  background: rgba(255,255,255,.035);
  color: var(--bone);
  font-family: inherit;
  cursor: pointer;
  text-align: left;
  min-height: 96px;
}

.egg-choice:hover,
.egg-choice:focus-visible {
  border-color: var(--teal);
  box-shadow: 0 0 20px rgba(88,214,220,.12);
  outline: none;
}

.egg-choice strong {
  display: block;
  color: var(--teal);
  text-transform: uppercase;
  letter-spacing: .1em;
  font-size: .86rem;
  margin-bottom: 8px;
}

.egg-choice span {
  display: block;
  color: var(--bone-dim);
  line-height: 1.35;
  font-size: .88rem;
}

.egg-choice-deep { background: radial-gradient(circle at 90% 10%, rgba(88,214,220,.1), rgba(255,255,255,.03)); }
.egg-choice-sky { background: radial-gradient(circle at 80% 10%, rgba(232,214,184,.1), rgba(255,255,255,.03)); }
.egg-choice-ancient { background: radial-gradient(circle at 80% 10%, rgba(240,139,69,.12), rgba(255,255,255,.03)); }

.scan-status {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 8px;
  width: min(620px, 100%);
}

.scan-status span {
  border: 1px solid rgba(88,214,220,.22);
  border-radius: 999px;
  padding: 8px 12px;
  color: var(--bone-dim);
  text-transform: uppercase;
  letter-spacing: .1em;
  font-size: .72rem;
  background: rgba(88,214,220,.055);
  animation: scanStatus 1.25s ease-in-out infinite alternate;
}

.scan-status span:nth-child(2) { animation-delay: .18s; }
.scan-status span:nth-child(3) { animation-delay: .36s; }

@keyframes scanStatus {
  from { opacity: .55; transform: translateY(0); }
  to { opacity: 1; transform: translateY(-2px); color: var(--teal); }
}

.svg-stage {
  width: 100%;
  height: 100%;
  display: grid;
  place-items: center;
  color: var(--bone);
  transform: scale(var(--bf-scale, 1)) rotate(var(--bf-rotate, 0deg));
  filter:
    sepia(var(--bf-sepia, .35))
    hue-rotate(var(--bf-hue, 0deg))
    brightness(var(--bf-brightness, 1))
    contrast(var(--bf-contrast, 1))
    drop-shadow(0 0 18px rgba(88,214,220,.22));
}

.bf-svg {
  width: 100%;
  height: 100%;
  max-width: 100%;
  max-height: 100%;
  display: block;
  overflow: visible;
  color: currentColor;
}

.bf-svg [id="core"],
.bf-svg [id="limbs"],
.bf-svg [id="head"],
.bf-svg [id="signature"],
.bf-svg [id="detail"] {
  opacity: 0;
  transform-box: fill-box;
  transform-origin: center;
  animation: reconstructLayer .78s cubic-bezier(.16, .84, .26, 1) forwards;
}

.bf-svg [id="core"] { animation-delay: .10s; }
.bf-svg [id="limbs"] { animation-delay: .22s; }
.bf-svg [id="head"] { animation-delay: .34s; }
.bf-svg [id="signature"] { animation-delay: .48s; }
.bf-svg [id="detail"] { animation-delay: .62s; }

@keyframes reconstructLayer {
  0% { opacity: 0; transform: translateY(10px) scale(.86); filter: blur(6px); }
  55% { opacity: .62; filter: blur(1.5px); }
  100% { opacity: 1; transform: translateY(0) scale(1); filter: blur(0); }
}

.scan-lines {
  position: absolute;
  inset: 0;
  pointer-events: none;
  border-radius: 18px;
  opacity: .36;
  background:
    repeating-linear-gradient(
      180deg,
      rgba(88,214,220,.0) 0px,
      rgba(88,214,220,.0) 6px,
      rgba(88,214,220,.18) 7px,
      rgba(88,214,220,.0) 9px
    );
  mix-blend-mode: screen;
  animation: scanLines var(--bf-scan-speed, 1s) linear infinite;
}

@keyframes scanLines {
  from { background-position: 0 -40px; }
  to { background-position: 0 40px; }
}

.class-effect {
  position: absolute;
  inset: -8px;
  pointer-events: none;
  border-radius: 24px;
  opacity: .75;
}

.effect-predator .class-effect {
  background:
    linear-gradient(115deg, transparent 35%, rgba(240,139,69,.28) 36%, transparent 39%),
    linear-gradient(125deg, transparent 48%, rgba(232,214,184,.18) 49%, transparent 52%);
  animation: predatorSlash .9s ease-out both;
}

@keyframes predatorSlash {
  from { transform: translateX(-24px); opacity: 0; }
  45% { opacity: .9; }
  to { transform: translateX(24px); opacity: 0; }
}

.effect-grazer .class-effect {
  background: radial-gradient(circle at 50% 85%, rgba(232,214,184,.20), transparent 38%);
  animation: grazerDust 1.4s ease-out both;
}

@keyframes grazerDust {
  from { opacity: 0; transform: translateY(18px) scale(.88); }
  50% { opacity: .72; }
  to { opacity: 0; transform: translateY(-8px) scale(1.08); }
}

.effect-avian .class-effect {
  background:
    radial-gradient(ellipse at 20% 50%, rgba(232,214,184,.18), transparent 28%),
    radial-gradient(ellipse at 80% 50%, rgba(232,214,184,.18), transparent 28%);
  animation: avianSweep 1.1s ease-out both;
}

@keyframes avianSweep {
  from { opacity: 0; transform: scaleX(.72); }
  45% { opacity: .8; }
  to { opacity: 0; transform: scaleX(1.18); }
}

.effect-aquatic .class-effect,
.effect-amphibian .class-effect {
  background:
    radial-gradient(ellipse at center, transparent 38%, rgba(88,214,220,.22) 40%, transparent 44%),
    radial-gradient(ellipse at center, transparent 55%, rgba(88,214,220,.14) 57%, transparent 61%);
  animation: rippleBloom 1.35s ease-out both;
}

@keyframes rippleBloom {
  from { opacity: 0; transform: scale(.75); }
  30% { opacity: .78; }
  to { opacity: 0; transform: scale(1.25); }
}

.effect-reptile .class-effect {
  background: linear-gradient(90deg, transparent, rgba(240,139,69,.12), transparent);
  animation: heatShimmer 1.2s ease-in-out both;
}

@keyframes heatShimmer {
  0% { opacity: 0; transform: skewX(0deg); }
  35% { opacity: .72; transform: skewX(-5deg); }
  70% { opacity: .45; transform: skewX(5deg); }
  100% { opacity: 0; transform: skewX(0deg); }
}

.effect-insectoid .class-effect {
  background:
    linear-gradient(90deg, transparent 0 12%, rgba(88,214,220,.16) 13% 14%, transparent 15% 100%),
    linear-gradient(0deg, transparent 0 18%, rgba(88,214,220,.12) 19% 20%, transparent 21% 100%);
  background-size: 22px 22px;
  animation: insectScan 1.15s steps(6) both;
}

@keyframes insectScan {
  from { opacity: 0; transform: scale(.9); }
  35% { opacity: .75; }
  to { opacity: 0; transform: scale(1.04); }
}

.effect-titan .class-effect {
  background: radial-gradient(circle at 50% 90%, rgba(240,139,69,.18), transparent 44%);
  animation: titanWake 1.2s ease-out both;
}

.effect-titan {
  animation: revealPop .6s ease both, titanShake .45s .18s ease-in-out both;
}

@keyframes titanShake {
  0%, 100% { transform: translate(0,0) scale(1); }
  20% { transform: translate(-5px, 2px) scale(1.01); }
  40% { transform: translate(5px, -1px) scale(1.01); }
  60% { transform: translate(-3px, 1px) scale(1.005); }
  80% { transform: translate(3px, 0) scale(1.005); }
}

@keyframes titanWake {
  from { opacity: 0; transform: translateY(18px) scale(.88); }
  50% { opacity: .8; }
  to { opacity: 0; transform: translateY(-6px) scale(1.18); }
}

.reveal-event {
  width: min(620px, 100%);
  border: 1px solid rgba(232,214,184,.18);
  border-radius: 999px;
  padding: 10px 14px;
  background: rgba(0,0,0,.18);
  text-transform: uppercase;
  letter-spacing: .14em;
  font-size: .78rem;
  animation: eventPulse 1.4s ease both;
}

.reveal-event span { color: var(--bone); }

.reveal-rare { border-color: rgba(240,190,92,.55); box-shadow: 0 0 20px rgba(240,190,92,.12); }
.reveal-ancient { border-color: rgba(240,139,69,.6); box-shadow: 0 0 24px rgba(240,139,69,.16); }
.reveal-mythic { border-color: rgba(178,116,255,.7); box-shadow: 0 0 28px rgba(178,116,255,.22); }
.reveal-genesis {
  border-color: rgba(88,214,220,.95);
  box-shadow: 0 0 42px rgba(88,214,220,.32);
  animation: eventPulse 1.4s ease both, genesisRecognition 2.2s ease-in-out infinite;
}

@keyframes eventPulse {
  from { opacity: 0; transform: translateY(-8px) scale(.96); }
  to { opacity: 1; transform: translateY(0) scale(1); }
}

@keyframes genesisRecognition {
  50% { filter: brightness(1.25); }
}

@media (max-width: 680px) {
  .screen {
    display: block;
    min-height: 100vh;
    padding: 92px 12px 38px;
  }

  .panel {
    width: 100%;
    min-height: auto;
    padding: 28px 18px;
    border-radius: 24px;
  }

  .card {
    padding: 20px 16px;
  }

  .card h2 {
    font-size: clamp(2.35rem, 10vw, 3.4rem);
  }

  .creature {
    width: min(94vw, 440px);
    height: 260px;
  }

  .detail-creature {
    height: 240px;
  }

  .meta-grid,
  .detail-meta {
    grid-template-columns: 1fr;
  }

  .archive-entry {
    grid-template-columns: 1fr;
    text-align: center;
    font-size: 1.05rem;
  }

  .archive-stats {
    top: 98px;
    left: 8px;
    right: 8px;
    transform: none;
    max-width: none;
    justify-content: flex-start;
  }

  .archive-stats span {
    font-size: .68rem;
    padding: 7px 10px;
  }

  .completion-pill {
    font-size: .74rem;
    padding: 8px 12px;
  }

  .egg-choice-grid {
    grid-template-columns: 1fr;
  }

  .egg-choice {
    min-height: auto;
  }

  .scan-status {
    flex-direction: column;
  }

  .reveal-event {
    border-radius: 18px;
    line-height: 1.4;
  }
}
