:root {
  --background: #f5f3ef;
  --surface: rgba(255, 255, 255, 0.88);
  --surface-solid: #ffffff;
  --text: #161616;
  --muted: #74716b;
  --border: rgba(22, 22, 22, 0.12);
  --accent: #b8ded8;
  --accent-strong: #72b8af;
  --shadow-soft: 0 18px 50px rgba(26, 24, 21, 0.08);
  --shadow-large: 0 30px 90px rgba(18, 17, 15, 0.18);
  --radius-small: 14px;
  --radius-medium: 22px;
  --radius-large: 30px;
  --page-width: 1180px;
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  min-width: 320px;
  background:
    radial-gradient(
      circle at 10% 0%,
      rgba(255, 255, 255, 0.95),
      transparent 34%
    ),
    linear-gradient(
      145deg,
      #f8f6f2,
      var(--background)
    );
  color: var(--text);
  font-family:
    Inter,
    -apple-system,
    BlinkMacSystemFont,
    "Segoe UI",
    Helvetica,
    Arial,
    sans-serif;
  line-height: 1.5;
}

body.modal-open {
  overflow: hidden;
}

button,
a {
  font: inherit;
}

button {
  color: inherit;
}

a {
  color: inherit;
}

img {
  display: block;
  max-width: 100%;
}
.unlock-screen {
  min-height: 100vh;
  display: grid;
  place-items: center;
  padding: 48px 24px;
  background: #f5f3ef;
}
.unlock-screen {
  transition:
    opacity 500ms ease,
    transform 500ms ease;
}
.unlock-screen[hidden] {
  display: none;
}
.unlock-screen.is-leaving {
  opacity: 0;
  transform: scale(0.985);
}
.unlock-inner {
  width: min(760px, 100%);
  text-align: center;
}
body.proposal-mode .site-header,
body.proposal-mode .hero,
body.proposal-mode .featured-section,
body.proposal-mode .site-footer {
  display: none;
}

body.proposal-mode .collection-section {
  min-height: 100vh;
  padding-top: 48px;
}
.unlock-eyebrow {
  margin: 0 0 14px;
  color: var(--muted);
  font-size: 0.75rem;
  font-weight: 700;
  letter-spacing: 0.16em;
  text-transform: uppercase;
}

.unlock-inner h1 {
  margin: 0;
  font-size: clamp(2.8rem, 8vw, 5.5rem);
  font-weight: 560;
  letter-spacing: -0.06em;
  line-height: 0.95;
}

.unlock-instruction {
  margin: 22px 0 38px;
  color: var(--muted);
  font-size: 1rem;
}

.unlock-elements {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 14px;
}

.unlock-element {
  position: relative;
  display: grid;
  min-height: 180px;
  padding: 20px;
  border: 1px solid var(--border);
  border-radius: 22px;
  background: #ffffff;
  text-align: left;
}

.unlock-symbol {
  font-size: clamp(2.4rem, 6vw, 4.5rem);
  font-weight: 700;
  letter-spacing: -0.06em;
  line-height: 1;
}

.unlock-element input {
  align-self: end;
  width: 100%;
  border: 1px solid var(--border);
  border-radius: 10px;
  padding: 10px 12px;
  background: #f5f3ef;
  color: var(--text);
  font: inherit;
  font-size: 1.05rem;
  text-align: center;
  outline: none;
  transition:
    background 180ms ease,
    border-color 180ms ease,
    box-shadow 180ms ease;
}

.unlock-element input::placeholder {
  color: var(--muted);
  opacity: 0.65;
}

.unlock-element input:focus {
  background: #ffffff;
  border-color: var(--text);
  box-shadow: 0 0 0 3px rgba(0, 0, 0, 0.06);
}

.unlock-element input:focus {
  border-top-color: var(--text);
}

.unlock-status {
  min-height: 70px;
  margin: 34px auto 0;
  max-width: 620px;
  color: var(--text);
  font-size: clamp(1.35rem, 3vw, 2rem);
  font-weight: 560;
  letter-spacing: -0.025em;
  line-height: 1.25;
  opacity: 0;
  transform: translateY(8px);
  transition:
    opacity 500ms ease,
    transform 500ms ease;
}

.unlock-status.is-visible {
  opacity: 1;
  transform: translateY(0);
}

@media (max-width: 720px) {
  .unlock-elements {
    grid-template-columns: repeat(2, 1fr);
  }
}
.unlock-element {
  transition:
    background 220ms ease,
    border-color 220ms ease,
    transform 220ms ease;
}

.unlock-element.is-correct {
  background: var(--accent);
  border-color: transparent;
  transform: translateY(-3px);
}

.unlock-element.is-correct input {
  border-top-color: rgba(0, 0, 0, 0.18);
}
.unlock-element.is-wrong {
  animation: unlock-shake 280ms ease;
}

@keyframes unlock-shake {
  0%, 100% {
    transform: translateX(0);
  }
  25% {
    transform: translateX(-4px);
  }
  75% {
    transform: translateX(4px);
  }
}
.site-header {
  position: fixed;
  z-index: 50;
  top: 0;
  left: 50%;
  display: flex;
  width: min(
    calc(100% - 32px),
    var(--page-width)
  );
  align-items: center;
  justify-content: space-between;
  padding: 22px 0;
  transform: translateX(-50%);
}

.brand {
  font-size: 0.9rem;
  font-weight: 700;
  letter-spacing: -0.02em;
  text-decoration: none;
}

.site-nav {
  display: flex;
  gap: 26px;
}

.site-nav a {
  color: var(--muted);
  font-size: 0.78rem;
  font-weight: 650;
  letter-spacing: 0.08em;
  text-decoration: none;
  text-transform: uppercase;
  transition: color 180ms ease;
}

.site-nav a:hover,
.site-nav a:focus-visible {
  color: var(--text);
}

main {
  width: min(
    calc(100% - 32px),
    var(--page-width)
  );
  margin: 0 auto;
}

.hero {
  position: relative;
  display: grid;
  min-height: 100vh;
  place-items: center;
  padding: 130px 0 90px;
  text-align: center;
}

.hero-copy {
  max-width: 900px;
}

.eyebrow,
.section-label,
.modal-kicker {
  margin: 0;
  color: var(--muted);
  font-size: 0.72rem;
  font-weight: 750;
  letter-spacing: 0.22em;
  text-transform: uppercase;
}

.hero h1 {
  margin: 20px 0 18px;
  font-size: clamp(4.6rem, 14vw, 10rem);
  font-weight: 620;
  letter-spacing: -0.085em;
  line-height: 0.88;
}

.hero-description {
  margin: 0;
  color: var(--muted);
  font-size: clamp(1.05rem, 2vw, 1.35rem);
}

.hero-summary {
  position: absolute;
  bottom: 92px;
  display: flex;
  gap: 52px;
}

.hero-summary div {
  display: flex;
  flex-direction: column;
  gap: 3px;
}

.hero-summary strong {
  font-size: 1.55rem;
  font-weight: 620;
  letter-spacing: -0.04em;
}

.hero-summary span {
  color: var(--muted);
  font-size: 0.72rem;
  font-weight: 650;
  letter-spacing: 0.11em;
  text-transform: uppercase;
}

.explore-link {
  position: absolute;
  bottom: 30px;
  display: inline-flex;
  flex-direction: column;
  gap: 5px;
  align-items: center;
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.12em;
  text-decoration: none;
  text-transform: uppercase;
}

.explore-link span {
  font-size: 1.2rem;
  animation: float-arrow 1.9s ease-in-out infinite;
}

.content-section {
  padding: 110px 0;
}

.section-header {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 40px;
  align-items: end;
  margin-bottom: 38px;
  border-bottom: 1px solid var(--border);
  padding-bottom: 22px;
}

.section-header h2 {
  margin: 8px 0 0;
  font-size: clamp(2.4rem, 6vw, 4.8rem);
  font-weight: 560;
  letter-spacing: -0.06em;
  line-height: 0.98;
}

.section-description {
  max-width: 320px;
  margin: 0 0 4px;
  color: var(--muted);
  font-size: 0.94rem;
}

.featured-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 18px;
}

.element-card {
  position: relative;
  aspect-ratio: 1;
  border: 1px solid var(--border);
  border-radius: var(--radius-medium);
  background: var(--surface);
  box-shadow: 0 8px 30px rgba(26, 24, 21, 0.05);
  cursor: pointer;
  overflow: hidden;
  padding: 20px;
  text-align: left;
  transition:
    transform 180ms ease,
    border-color 180ms ease,
    box-shadow 180ms ease;
}

.element-card:hover {
  transform: translateY(-7px);
  border-color: rgba(22, 22, 22, 0.26);
  box-shadow: var(--shadow-soft);
}

.element-card:focus-visible {
  outline: 3px solid var(--accent-strong);
  outline-offset: 4px;
}

.element-card.featured {
  background:
    radial-gradient(
      circle at 85% 10%,
      rgba(255, 255, 255, 0.95),
      transparent 35%
    ),
    linear-gradient(
      145deg,
      rgba(255, 255, 255, 0.96),
      rgba(184, 222, 216, 0.74)
    );
}

.element-number {
  position: absolute;
  top: 18px;
  left: 20px;
  color: var(--muted);
  font-size: 0.82rem;
}

.element-symbol {
  position: absolute;
  left: 20px;
  bottom: 52px;
  font-size: clamp(2.8rem, 6vw, 5.2rem);
  font-weight: 700;
  letter-spacing: -0.07em;
  line-height: 0.9;
}

.element-title {
  position: absolute;
  left: 20px;
  bottom: 18px;
  max-width: calc(100% - 40px);
  overflow: hidden;
  color: var(--muted);
  font-size: 0.82rem;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.table-scroll {
  overflow-x: auto;
  border-radius: var(--radius-small);
  padding: 8px 2px 30px;
  scrollbar-width: thin;
}

.periodic-table {
  display: grid;
  grid-template-columns: repeat(18, minmax(55px, 1fr));
  grid-template-rows: repeat(8, minmax(67px, 1fr));
  min-width: 1150px;
  gap: 8px;
}

.table-element {
  position: relative;
  width: 100%;
  min-width: 0;
  aspect-ratio: 1;
  border: 1px solid var(--border);
  border-radius: 11px;
  background: rgba(255, 255, 255, 0.72);
  box-shadow: 0 5px 18px rgba(26, 24, 21, 0.04);
  overflow: hidden;
  padding: 8px;
  text-align: left;
  transition:
    transform 170ms ease,
    border-color 170ms ease,
    box-shadow 170ms ease;
}

.table-element:not(:disabled) {
  cursor: pointer;
}

.table-element:not(:disabled):hover {
  transform: translateY(-4px);
  border-color: rgba(22, 22, 22, 0.25);
  box-shadow: 0 12px 28px rgba(26, 24, 21, 0.1);
}

.table-element:disabled {
  color: var(--text);
  cursor: default;
  opacity: 0.78;
}

.table-element.featured {
  background:
    linear-gradient(
      145deg,
      rgba(255, 255, 255, 0.96),
      rgba(184, 222, 216, 0.82)
    );
}
.table-element.featured.discovered {
  background:
    linear-gradient(
      145deg,
      rgba(255, 255, 255, 0.96),
      rgba(184, 222, 216, 0.45)
    );
  border-color: rgba(22, 22, 22, 0.18);
  box-shadow: inset 0 0 0 2px rgba(22, 22, 22, 0.05);
}
.table-element.featured.discovered::after {
  content: "✓";
  position: absolute;
  top: 7px;
  right: 8px;
  color: rgba(22, 22, 22, 0.62);
  font-size: 0.7rem;
  font-weight: 700;
}
.table-element .element-number {
  top: 7px;
  left: 8px;
  font-size: 0.58rem;
}

.table-element .element-symbol {
  left: 8px;
  top: 21px;
  bottom: auto;
  font-size: clamp(1rem, 2vw, 1.55rem);
}

.table-element .element-title {
  left: 8px;
  bottom: 2px;
  max-width: calc(100% - 14px);
  font-size: 0.46rem;
}

.site-footer {
  display: flex;
  width: min(
    calc(100% - 32px),
    var(--page-width)
  );
  justify-content: space-between;
  margin: 0 auto;
  border-top: 1px solid var(--border);
  padding: 32px 0 46px;
  color: var(--muted);
  font-size: 0.78rem;
}

.site-footer p {
  margin: 0;
}

.loading-screen {
  position: fixed;
  z-index: 300;
  inset: 0;
  display: grid;
  place-content: center;
  background: var(--background);
  text-align: center;
  transition:
    opacity 600ms ease,
    visibility 600ms ease;
}

.loading-screen.is-hidden {
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
}

.loading-elements {
  display: flex;
  justify-content: center;
  gap: 10px;
}

.loading-elements span {
  display: grid;
  width: 52px;
  aspect-ratio: 1;
  place-items: center;
  border: 1px solid var(--border);
  border-radius: 11px;
  background: var(--surface-solid);
  font-weight: 700;
  animation: loading-pulse 1.15s ease-in-out infinite alternate;
}

.loading-elements span:nth-child(2) {
  animation-delay: 90ms;
}

.loading-elements span:nth-child(3) {
  animation-delay: 180ms;
}

.loading-elements span:nth-child(4) {
  animation-delay: 270ms;
}

.loading-elements span:nth-child(5) {
  animation-delay: 360ms;
}

.loading-elements span:nth-child(6) {
  animation-delay: 450ms;
}

.loading-screen p {
  margin: 22px 0 0;
  color: var(--muted);
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.15em;
  text-transform: uppercase;
}

.modal[hidden] {
  display: none;
}

.modal {
  position: fixed;
  z-index: 200;
  inset: 0;
  display: grid;
  place-items: center;
  padding: 24px;
}

.modal-backdrop {
  position: absolute;
  inset: 0;
  border: 0;
  background: rgba(18, 18, 18, 0.62);
  backdrop-filter: blur(14px);
  cursor: pointer;
}

.modal-card {
  position: relative;
  z-index: 1;
  display: grid;
  grid-template-columns: minmax(320px, 1fr) minmax(360px, 1fr);
  width: min(980px, 100%);
  max-height: min(780px, calc(100vh - 48px));
  border-radius: var(--radius-large);
  background: #faf9f6;
  box-shadow: var(--shadow-large);
  overflow: hidden;
}

.modal-close {
  position: absolute;
  z-index: 3;
  top: 18px;
  right: 18px;
  display: grid;
  width: 42px;
  height: 42px;
  place-items: center;
  border: 1px solid rgba(22, 22, 22, 0.12);
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.86);
  cursor: pointer;
  font-size: 1.45rem;
  line-height: 1;
  transition:
    transform 160ms ease,
    background 160ms ease;
}

.modal-close:hover {
  transform: scale(1.05);
  background: #ffffff;
}

.modal-visual {
  position: relative;
  height: min(560px, calc(100vh - 48px));
  min-height: 0;
  background:
    linear-gradient(
      145deg,
      #ffffff,
      var(--accent)
    );
  overflow: hidden;
}

.modal-visual img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: contain;
  background: #111;
} 
.modal-visual video {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: contain;
  background: #111;
}

.modal-visual audio {
  position: absolute;
  left: 72px;
  right: 72px;
  top: 50%;
  width: auto;
  transform: translateY(-50%);
}

.modal-visual img[hidden],
.modal-visual video[hidden],
.modal-visual audio[hidden] {
  display: none;
}
.modal-visual video {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: contain;
  background: #111;
}

.modal-visual audio {
  position: absolute;
  left: 50%;
  top: 50%;
  width: calc(100% - 48px);
  transform: translate(-50%, -50%);
}

.modal-photo-nav {
  position: absolute;
  z-index: 2;
  top: 50%;
  transform: translateY(-50%);
  display: grid;
  place-items: center;
  width: 42px;
  height: 42px;
  border: 0;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.78);
  color: #161616;
  font-size: 2rem;
  line-height: 1;
  cursor: pointer;
}

.modal-photo-prev {
  left: 16px;
}

.modal-photo-next {
  right: 16px;
}

.modal-photo-count {
  position: absolute;
  z-index: 2;
  left: 50%;
  bottom: 16px;
  transform: translateX(-50%);
  border-radius: 999px;
  padding: 6px 10px;
  background: rgba(18, 18, 18, 0.62);
  color: #ffffff;
  font-size: 0.75rem;
  font-weight: 650;
  letter-spacing: 0.04em;
}
.modal-photo-nav[hidden],
.modal-photo-count[hidden] {
  display: none;
}
.modal-element-tile {
  position: absolute;
  inset: 0;
}

.modal-number {
  position: absolute;
  top: 28px;
  left: 28px;
  color: rgba(22, 22, 22, 0.58);
  font-size: 1rem;
  font-weight: 650;
}

.modal-symbol {
  position: absolute;
  left: 28px;
  bottom: 28px;
  font-size: clamp(5.5rem, 11vw, 8.5rem);
  font-weight: 720;
  letter-spacing: -0.09em;
  line-height: 0.85;
}

.modal-content {
  align-self: center;
  max-height: 100%;
  overflow-y: auto;
  padding: 64px 58px;
}

.modal-kicker {
  margin: 0;
  color: var(--muted);
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.15em;
  text-transform: uppercase;
}

.modal-content h2 {
  margin: 12px 0 8px;
  font-size: clamp(2.8rem, 6vw, 5.25rem);
  font-weight: 560;
  letter-spacing: -0.065em;
  line-height: 0.96;
}

.modal-essence {
  margin: 10px 0 24px;
  color: var(--text);
  font-size: 1.15rem;
  font-weight: 600;
  letter-spacing: -0.02em;
}

.modal-caption {
  margin: 0 0 24px;
  color: #242424;
  font-size: 1.15rem;
  font-style: italic;
  line-height: 1.5;
}

.modal-location {
  margin: 22px 0 4px;
  color: var(--muted);
  font-size: 0.88rem;
  font-weight: 600;
}

.modal-date {
  margin: 0;
  color: var(--muted);
  font-size: 0.82rem;
  font-weight: 650;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}


.noscript-message {
  position: fixed;
  z-index: 500;
  inset: auto 20px 20px;
  border-radius: 12px;
  background: #ffffff;
  box-shadow: var(--shadow-soft);
  padding: 16px 20px;
  text-align: center;
}

@keyframes float-arrow {
  50% {
    transform: translateY(7px);
  }
}

@keyframes loading-pulse {
  from {
    transform: translateY(0);
    opacity: 0.45;
  }

  to {
    transform: translateY(-7px);
    opacity: 1;
  }
}

@media (max-width: 820px) {
  .site-header {
    padding-top: 18px;
  }

  .site-nav {
    gap: 16px;
  }

  .hero-summary {
    gap: 28px;
  }

  .section-header {
    grid-template-columns: 1fr;
    gap: 18px;
  }

  .section-description {
    max-width: none;
  }

  .featured-grid {
    grid-template-columns: repeat(2, 1fr);
  }

  .content-section {
    padding: 80px 0;
  }

  .modal-card {
    grid-template-columns: 1fr;
    overflow-y: auto;
  }

  .modal-visual {
    height: 260px;
  }

  .modal-content {
    padding: 38px 30px 44px;
  }
}

@media (max-width: 520px) {
  .site-header {
    width: calc(100% - 24px);
  }

  .site-nav a {
    font-size: 0.67rem;
  }

  main {
    width: calc(100% - 24px);
  }

  .hero {
    padding-top: 110px;
  }

  .hero-summary {
    bottom: 84px;
    gap: 20px;
  }

  .hero-summary strong {
    font-size: 1.25rem;
  }

  .hero-summary span {
    font-size: 0.62rem;
  }

  .featured-grid {
    gap: 12px;
  }

  .element-card {
    border-radius: 17px;
    padding: 15px;
  }

  .element-number,
  .element-symbol,
  .element-title {
    left: 15px;
  }

  .element-number {
    top: 14px;
  }

  .element-symbol {
    bottom: 42px;
  }

  .element-title {
    bottom: 14px;
  }

  .site-footer {
    width: calc(100% - 24px);
    flex-direction: column;
    gap: 6px;
  }

  .loading-elements {
    gap: 5px;
  }

  .loading-elements span {
    width: 42px;
  }

  .modal {
    padding: 12px;
  }

  .modal-card {
    max-height: calc(100vh - 24px);
    border-radius: 22px;
  }
}
#modal-audio {
  position: absolute;
  top: 50%;
  left: 90px;
  right: 90px;
  width: calc(100% - 180px);
  max-width: none;
  transform: translateY(-50%);
}
@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    animation-duration: 1ms !important;
    animation-delay: 0ms !important;
    scroll-behavior: auto !important;
    transition-duration: 1ms !important;
  }
}
.loading-screen {
  animation: emergency-hide 0s 3s forwards;
}

@keyframes emergency-hide {
  to {
    opacity: 0;
    visibility: hidden;
    pointer-events: none;
  }
}
/* Scroll reveal animation */

.reveal-item {
  opacity: 0;
  transform: translateY(45px) scale(0.94);
  transition:
    opacity 850ms ease,
    transform 850ms cubic-bezier(0.22, 1, 0.36, 1);
  transition-delay: var(--reveal-delay, 0ms);
}

.reveal-item.is-visible {
  opacity: 1;
  transform: translateY(0) scale(1);
}
.final-reveal[hidden] {
  display: none;
}

.final-reveal {
  min-height: 100vh;
  display: grid;
  place-items: center;
  padding: 48px 24px;
  background: #f5f3ef;
}

.final-reveal-inner {
  width: min(900px, 100%);
  text-align: center;
}

.final-reveal-kicker {
  margin: 0 0 42px;
  color: var(--muted);
  font-size: 0.78rem;
  font-weight: 700;
  letter-spacing: 0.16em;
  text-transform: uppercase;
}

.final-reveal-elements {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 18px;
}

.final-reveal-item {
  opacity: 0;
  transform: translateY(18px);
}

.final-reveal-tile {
  position: relative;
  aspect-ratio: 1;
  border: 1px solid var(--border);
  border-radius: 22px;
  background:
    linear-gradient(
      145deg,
      rgba(255, 255, 255, 0.96),
      rgba(184, 222, 216, 0.82)
    );
  box-shadow: 0 10px 30px rgba(26, 24, 21, 0.08);
}

.final-reveal-number {
  position: absolute;
  top: 18px;
  left: 18px;
  color: var(--muted);
  font-size: 0.9rem;
  font-weight: 650;
}

.final-reveal-symbol {
  position: absolute;
  left: 18px;
  bottom: 18px;
  font-size: clamp(3rem, 7vw, 5.5rem);
  font-weight: 720;
  letter-spacing: -0.08em;
  line-height: 0.9;
}

.final-reveal-name {
  display: block;
  margin-top: 14px;
  font-size: 1.1rem;
  font-weight: 600;
}

.final-reveal.is-active .final-reveal-item {
  animation: final-element-in 500ms ease forwards;
}

.final-reveal.is-active .final-reveal-item:nth-child(1) {
  animation-delay: 0ms;
}

.final-reveal.is-active .final-reveal-item:nth-child(2) {
  animation-delay: 350ms;
}

.final-reveal.is-active .final-reveal-item:nth-child(3) {
  animation-delay: 700ms;
}

.final-reveal.is-active .final-reveal-item:nth-child(4) {
  animation-delay: 1050ms;
}

@keyframes final-element-in {
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@media (max-width: 720px) {
  .final-reveal-elements {
    grid-template-columns: repeat(2, 1fr);
  }
}
#site-content {
  transition:
    opacity 700ms ease,
    transform 700ms ease;
}

#site-content.is-leaving {
  opacity: 0;
  transform: scale(0.985);
}
.lab-editor[hidden] {
  display: none;
}

.lab-editor {
  width: min(820px, 100%);
  margin: 60px auto 100px;
  border: 1px solid var(--border);
  border-radius: 24px;
  padding: 32px;
  background: rgba(255, 255, 255, 0.78);
  box-shadow: 0 18px 50px rgba(26, 24, 21, 0.08);
}

.lab-editor-header {
  display: flex;
  justify-content: space-between;
  gap: 24px;
  align-items: start;
  margin-bottom: 30px;
}

.lab-editor-header h2 {
  margin: 4px 0 0;
  font-size: 2.4rem;
}

.lab-editor-close {
  border: 0;
  background: transparent;
  font-size: 1.7rem;
  cursor: pointer;
}

.lab-fields {
  display: grid;
  grid-template-columns: 120px 1fr 1fr;
  gap: 16px;
  margin-bottom: 28px;
}

.lab-fields label span {
  display: block;
  margin-bottom: 7px;
  color: var(--muted);
  font-size: 0.72rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.08em;
}

.lab-fields input {
  box-sizing: border-box;
  width: 100%;
  border: 1px solid var(--border);
  border-radius: 10px;
  padding: 11px 12px;
  background: #fff;
  font: inherit;
}

.lab-dropzone {
  border: 1.5px dashed rgba(22, 22, 22, 0.25);
  border-radius: 18px;
  padding: 48px 24px;
  text-align: center;
  transition:
    border-color 180ms ease,
    background 180ms ease;
}

.lab-dropzone.is-dragging {
  border-color: var(--text);
  background: rgba(184, 222, 216, 0.2);
}

.lab-dropzone-title {
  margin: 0 0 6px;
  font-size: 1.2rem;
  font-weight: 650;
}

.lab-dropzone-copy {
  margin: 0 0 20px;
  color: var(--muted);
}

.lab-choose-files {
  border: 1px solid var(--border);
  border-radius: 999px;
  padding: 10px 18px;
  background: #fff;
  font: inherit;
  cursor: pointer;
}

.lab-media-preview {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 14px;
  margin-top: 20px;
}
.lab-media-item {
  min-width: 0;
}

.lab-media-item img,
.lab-media-item video {
  display: block;
  width: 100%;
  aspect-ratio: 1;
  border-radius: 14px;
  object-fit: cover;
  background: #eee;
}

.lab-media-item audio {
  width: 100%;
  margin-top: 20px;
}

.lab-media-item p {
  margin: 8px 2px 0;
  overflow: hidden;
  color: var(--muted);
  font-size: 0.72rem;
  text-overflow: ellipsis;
  white-space: nowrap;
} 
.lab-media-item {
  cursor: grab;
  transition:
    opacity 150ms ease,
    transform 150ms ease;
}

.lab-media-item.is-dragging {
  opacity: 0.45;
  transform: scale(0.98);
}

.lab-media-item:active {
  cursor: grabbing;
} 

@media (max-width: 720px) {
  .lab-fields {
    grid-template-columns: 1fr;
  }

  .lab-media-preview {
    grid-template-columns: repeat(2, 1fr);
  }
} 
.lab-media-metadata {
  display: grid;
  gap: 10px;
  margin-top: 12px;
}

.lab-media-metadata label span {
  display: block;
  margin-bottom: 5px;
  color: var(--muted);
  font-size: 0.65rem;
  font-weight: 700;
  letter-spacing: 0.07em;
  text-transform: uppercase;
}

.lab-media-metadata input {
  box-sizing: border-box;
  width: 100%;
  border: 1px solid var(--border);
  border-radius: 9px;
  padding: 8px 9px;
  background: #fff;
  font: inherit;
  font-size: 0.78rem;
} 
.lab-common-thread {
  margin-top: 30px;
}

.lab-common-thread label {
  display: block;
  margin: 6px 0 10px;
  color: var(--muted);
  font-size: 0.9rem;
}

.lab-common-thread textarea {
  box-sizing: border-box;
  width: 100%;
  min-height: 110px;
  resize: vertical;
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 14px 15px;
  background: #fff;
  color: var(--text);
  font: inherit;
  line-height: 1.5;
} 
.lab-actions {
  display: flex;
  justify-content: flex-end;
  gap:12px;
  margin-top: 28px;
}

.lab-preview-button {
  border: 0;
  border-radius: 999px;
  padding: 12px 20px;
  background: var(--text);
  color: #fff;
  font: inherit;
  font-weight: 650;
  cursor: pointer;
} 
.lab-shell[hidden] {
  display: none;
}
.lab-login {
  min-height: 100vh;
  display: grid;
  place-items: center;
  padding: 32px;
  background: #f5f3ef;
}

.lab-login[hidden] {
  display: none;
}

.lab-login-card {
  width: min(420px, 100%);
  border: 1px solid var(--border);
  border-radius: 24px;
  padding: 36px;
  background: rgba(255, 255, 255, 0.82);
  box-shadow: 0 18px 50px rgba(26, 24, 21, 0.08);
}

.lab-login-card h1 {
  margin: 4px 0 10px;
  font-size: 2.8rem;
  letter-spacing: -0.05em;
}

.lab-login-card > p {
  margin: 0 0 28px;
  color: var(--muted);
}

#lab-login-form {
  display: grid;
  gap: 18px;
}

#lab-login-form label {
  display: grid;
  gap: 7px;
  color: var(--muted);
  font-size: 0.78rem;
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
}

#lab-login-form input {
  width: 100%;
  box-sizing: border-box;
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 12px 14px;
  background: #fff;
  color: var(--text);
  font: inherit;
  font-size: 1rem;
  outline: none;
}

#lab-login-form input:focus {
  border-color: var(--text);
  box-shadow: 0 0 0 3px rgba(0, 0, 0, 0.05);
}

#lab-login-form button {
  margin-top: 4px;
  border: 0;
  border-radius: 999px;
  padding: 12px 18px;
  background: var(--text);
  color: #fff;
  font: inherit;
  font-weight: 650;
  cursor: pointer;
}

#lab-login-error {
  margin: 0;
  color: #8a2d2d;
  font-size: 0.82rem;
  text-transform: none;
  letter-spacing: 0;
}
.lab-header-actions {
  display: flex;
  align-items: center;
  gap: 18px;
}

.lab-signout {
  border: 1px solid var(--border);
  border-radius: 999px;
  padding: 8px 14px;
  background: transparent;
  color: var(--muted);
  font: inherit;
  font-size: 0.8rem;
  cursor: pointer;
}

.lab-signout:hover {
  color: var(--text);
  border-color: var(--text);
}
#lab-preview-image[hidden],
#lab-preview-video[hidden],
#lab-preview-audio[hidden] {
  display: none;
}
.lab-editor-close:disabled {
  opacity: 0.25;
  cursor: not-allowed;
}
.lab-media-item {
  position: relative;
}

.lab-media-remove {
  position: absolute;
  z-index: 3;
  top: 8px;
  right: 8px;
  display: grid;
  place-items: center;
  width: 32px;
  height: 32px;
  border: 0;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.9);
  color: var(--text);
  font-size: 1.25rem;
  line-height: 1;
  cursor: pointer;
}

.lab-media-remove:hover {
  background: #fff;
}
.final-reveal-back {
  margin-top: 42px;
  border: 1px solid var(--border);
  border-radius: 999px;
  padding: 11px 18px;
  background: rgba(255, 255, 255, 0.72);
  color: var(--text);
  font: inherit;
  font-size: 0.85rem;
  font-weight: 600;
  cursor: pointer;
}

.final-reveal-back:hover {
  background: #fff;
}
.table-element.complete {
  background:
    linear-gradient(
      145deg,
      rgba(255, 255, 255, 0.96),
      rgba(210, 224, 190, 0.82)
    );
}
/* Incomplete elements: visually subdued */
.table-element:not(.complete):not(.featured) {
  color: #8a8a8a;
}