:root {
  color-scheme: dark;
  --bg: #050914;
  --bg-deep: #02050c;
  --surface: #0b1324;
  --surface-soft: #0d1729;
  --text: #f7fbff;
  --muted: #9fb0c6;
  --line: rgba(143, 196, 229, 0.2);
  --line-strong: rgba(101, 217, 255, 0.44);
  --cyan: #65d9ff;
  --mint: #55e6b7;
  --violet: #9c7cff;
  --gold: #f6c85f;
  --danger: #fb7185;
  --container: min(1180px, calc(100vw - 40px));
  --shadow: 0 28px 80px rgba(0, 0, 0, 0.35);
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  min-width: 320px;
  margin: 0;
  overflow-x: hidden;
  background:
    radial-gradient(circle at 16% 8%, rgba(101, 217, 255, 0.08), transparent 24rem),
    radial-gradient(circle at 84% 18%, rgba(156, 124, 255, 0.07), transparent 24rem),
    linear-gradient(rgba(101, 217, 255, 0.02) 1px, transparent 1px),
    linear-gradient(90deg, rgba(101, 217, 255, 0.02) 1px, transparent 1px),
    var(--bg);
  background-size: auto, auto, 48px 48px, 48px 48px;
  color: var(--text);
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  font-size: 16px;
  line-height: 1.65;
  text-rendering: optimizeLegibility;
}

body::before {
  position: fixed;
  inset: 0;
  z-index: -1;
  background-image:
    radial-gradient(circle at 12% 20%, rgba(255, 255, 255, 0.55) 0 1px, transparent 1.5px),
    radial-gradient(circle at 68% 26%, rgba(85, 230, 183, 0.5) 0 1px, transparent 1.5px),
    radial-gradient(circle at 88% 72%, rgba(246, 200, 95, 0.45) 0 1px, transparent 1.5px);
  background-size: 19rem 19rem, 27rem 27rem, 23rem 23rem;
  content: "";
  opacity: 0.42;
  pointer-events: none;
}

a {
  color: var(--cyan);
  text-decoration-thickness: 1px;
  text-underline-offset: 0.2em;
}

a:hover {
  color: var(--mint);
}

button,
input,
select,
textarea {
  font: inherit;
}

img {
  max-width: 100%;
}

.skip-link {
  position: fixed;
  top: 0.75rem;
  left: 0.75rem;
  z-index: 1000;
  padding: 0.6rem 0.9rem;
  transform: translateY(-180%);
  border-radius: 0.35rem;
  background: var(--mint);
  color: var(--bg);
}

.skip-link:focus {
  transform: translateY(0);
}

.site-header {
  position: sticky;
  top: 0;
  z-index: 50;
  display: grid;
  grid-template-columns: auto 1fr auto;
  align-items: center;
  width: 100%;
  min-height: 72px;
  padding: 0 max(20px, calc((100vw - 1180px) / 2));
  border-bottom: 1px solid var(--line);
  background: rgba(3, 8, 18, 0.9);
  backdrop-filter: blur(18px);
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 0.65rem;
  color: var(--text);
  text-decoration: none;
  text-transform: uppercase;
  letter-spacing: 0.04em;
}

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

.brand-logo {
  width: 2rem;
  height: 2rem;
  flex: 0 0 auto;
  border-radius: 50%;
  object-fit: contain;
  filter: drop-shadow(0 0 18px rgba(73, 230, 197, 0.32));
}

.desktop-nav {
  display: flex;
  justify-content: center;
  gap: clamp(0.85rem, 2vw, 1.75rem);
}

.desktop-nav a,
.site-footer nav a {
  color: #d7e3f0;
  font-size: 0.86rem;
  text-decoration: none;
}

.desktop-nav a:hover,
.site-footer nav a:hover {
  color: var(--mint);
}

.header-actions {
  display: flex;
  align-items: center;
  gap: 0.85rem;
}

.language-link {
  color: var(--muted);
  font-size: 0.8rem;
  text-decoration: none;
}

.button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 48px;
  padding: 0.75rem 1.2rem;
  border: 1px solid var(--line-strong);
  border-radius: 0.4rem;
  color: var(--text);
  font-size: 0.93rem;
  font-weight: 760;
  letter-spacing: -0.01em;
  text-decoration: none;
  transition: border-color 150ms ease, background 150ms ease, color 150ms ease, transform 150ms ease;
}

.button:hover {
  transform: translateY(-1px);
}

.button.primary {
  border-color: transparent;
  background: linear-gradient(135deg, var(--mint), #6dd8dc);
  box-shadow: 0 12px 36px rgba(85, 230, 183, 0.16);
  color: #03111a;
}

.button.primary:hover {
  background: #7bf1cf;
  color: #03111a;
}

.button.secondary {
  border-color: rgba(156, 124, 255, 0.62);
  background: rgba(156, 124, 255, 0.07);
}

.button.subtle {
  min-height: 34px;
  padding: 0.42rem 0.7rem;
  background: rgba(255, 255, 255, 0.035);
  font-size: 0.78rem;
  cursor: pointer;
}

.button.danger {
  border-color: rgba(251, 113, 133, 0.5);
  color: #fda4af;
}

.button.small {
  min-height: 38px;
  padding: 0.48rem 0.9rem;
  font-size: 0.8rem;
}

.site-main {
  width: var(--container);
  margin: 0 auto;
}

.hero {
  display: grid;
  grid-template-columns: minmax(300px, 0.78fr) minmax(520px, 1.42fr);
  align-items: center;
  gap: clamp(2rem, 5vw, 5rem);
  min-height: calc(100vh - 72px);
  padding: clamp(4rem, 8vh, 7rem) 0;
}

.hero-copy h1 {
  max-width: 12ch;
  margin: 0;
  font-size: clamp(3rem, 5.5vw, 5.7rem);
  line-height: 0.98;
  letter-spacing: -0.062em;
}

.hero-copy h1::first-line {
  color: var(--text);
}

.heading-accent {
  color: var(--cyan);
}

.hero-copy > p {
  max-width: 37rem;
  margin: 1.55rem 0 0;
  color: #bdcad9;
  font-size: clamp(1rem, 1.55vw, 1.2rem);
}

.hero-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.8rem;
  margin-top: 2rem;
}

.hero-actions .button {
  min-width: 154px;
}

.hero-copy .trust-line {
  margin-top: 0.8rem;
  color: #7e91a7;
  font-size: 0.82rem;
}

.hero-media {
  position: relative;
  margin: 0;
  overflow: hidden;
  border: 1px solid var(--line-strong);
  border-radius: 0.65rem;
  background: var(--surface);
  box-shadow: var(--shadow), 0 0 80px rgba(101, 217, 255, 0.08);
}

.hero-media::after {
  position: absolute;
  inset: 0;
  border: 1px solid rgba(255, 255, 255, 0.05);
  content: "";
  pointer-events: none;
}

.hero-media img {
  display: block;
  width: 100%;
  height: auto;
  aspect-ratio: 16 / 9;
  object-fit: cover;
}

.hero-media figcaption {
  position: absolute;
  right: 0.8rem;
  bottom: 0.7rem;
  padding: 0.3rem 0.55rem;
  border: 1px solid rgba(255, 255, 255, 0.13);
  border-radius: 0.25rem;
  background: rgba(2, 5, 12, 0.76);
  color: #dce8f4;
  font-size: 0.72rem;
}

.feature-strip {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  margin: 0 0 5rem;
  border-top: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
}

.feature-strip article {
  display: grid;
  grid-template-columns: auto 1fr;
  gap: 1rem;
  padding: 1.7rem clamp(1rem, 2.5vw, 2.4rem);
}

.feature-strip article + article {
  border-left: 1px solid var(--line);
}

.feature-strip article > span {
  color: var(--mint);
  font-size: 2rem;
}

.feature-strip article:nth-child(2) > span {
  color: var(--violet);
}

.feature-strip article:nth-child(3) > span {
  color: var(--gold);
}

.feature-strip h2,
.feature-strip p {
  margin: 0;
}

.feature-strip h2 {
  font-size: 1.08rem;
}

.feature-strip p {
  margin-top: 0.3rem;
  color: var(--muted);
  font-size: 0.86rem;
  line-height: 1.5;
}

.breadcrumbs {
  display: flex;
  flex-wrap: wrap;
  gap: 0.55rem;
  padding-top: 2.5rem;
  color: #73869c;
  font-size: 0.8rem;
}

.breadcrumbs a {
  color: #9cb0c6;
  text-decoration: none;
}

.page-heading {
  max-width: 880px;
  padding: clamp(3rem, 8vw, 6rem) 0 2rem;
}

.page-heading > p {
  margin: 0 0 0.65rem;
  color: var(--mint);
  font-size: 0.8rem;
  font-weight: 780;
  letter-spacing: 0.11em;
  text-transform: uppercase;
}

.page-heading h1 {
  margin: 0;
  font-size: clamp(2.45rem, 5vw, 4.7rem);
  line-height: 1.02;
  letter-spacing: -0.052em;
}

.page-heading span {
  display: block;
  max-width: 760px;
  margin-top: 1.2rem;
  color: var(--muted);
  font-size: clamp(1rem, 1.5vw, 1.18rem);
}

.prose {
  max-width: 850px;
  padding-bottom: 3rem;
  color: #c7d3e1;
}

.home-prose {
  max-width: none;
}

.prose h2,
.prose h3,
.prose h4 {
  color: var(--text);
  line-height: 1.18;
  letter-spacing: -0.025em;
  scroll-margin-top: 90px;
}

.prose h2 {
  margin: 4rem 0 1rem;
  font-size: clamp(1.75rem, 3vw, 2.65rem);
}

.prose h3 {
  margin: 2.3rem 0 0.65rem;
  font-size: 1.3rem;
}

.prose p,
.prose li {
  font-size: 1.02rem;
}

.prose ul,
.prose ol {
  padding-left: 1.25rem;
}

.prose li {
  margin: 0.45rem 0;
}

.prose strong {
  color: #f5fbff;
}

.prose blockquote {
  margin: 2rem 0;
  padding: 1rem 1.25rem;
  border-left: 3px solid var(--mint);
  background: rgba(85, 230, 183, 0.06);
  color: #d7e7ea;
}

.home-prose > h2 {
  max-width: 760px;
}

.home-prose > p {
  max-width: 850px;
}

.home-prose > ul {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 0.8rem 2.4rem;
  max-width: 1000px;
  padding: 0;
  list-style: none;
}

.home-prose > ul li {
  padding: 0.9rem 0;
  border-bottom: 1px solid var(--line);
}

.play-cta {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 2rem;
  margin: 3rem 0 6rem;
  padding: 2rem 0;
  border-top: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
}

.play-cta h2,
.play-cta p {
  margin: 0;
}

.play-cta p {
  margin-top: 0.25rem;
  color: var(--muted);
}

.skin-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 1rem;
  padding-bottom: 4rem;
}

.skin-card {
  position: relative;
  min-height: 225px;
  padding: 1.2rem;
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: 0.55rem;
  background: linear-gradient(150deg, color-mix(in srgb, var(--skin) 12%, var(--surface)), var(--surface));
}

.skin-level {
  position: absolute;
  top: 0.8rem;
  right: 0.8rem;
  color: #a9bbce;
  font-size: 0.72rem;
}

.skin-orb {
  width: 86px;
  height: 48px;
  margin: 1.8rem auto 1.5rem;
  border: 3px solid color-mix(in srgb, var(--skin-accent) 55%, white);
  border-radius: 50%;
  background:
    radial-gradient(circle at 50% 30%, rgba(255, 255, 255, 0.75), transparent 15%),
    linear-gradient(135deg, var(--skin), var(--skin-accent));
  box-shadow: 0 0 30px color-mix(in srgb, var(--skin) 38%, transparent);
}

.skin-card h2,
.skin-card p {
  margin: 0;
}

.skin-card h2 {
  font-size: 1rem;
}

.skin-card p {
  margin-top: 0.3rem;
  color: var(--muted);
  font-size: 0.82rem;
}

.period-tabs {
  display: flex;
  gap: 0.5rem;
  margin: 0 0 1rem;
}

.period-tabs a {
  padding: 0.5rem 0.75rem;
  border: 1px solid var(--line);
  border-radius: 0.3rem;
  color: #d9e6f3;
  font-size: 0.8rem;
  text-decoration: none;
}

.data-table-wrap {
  margin-bottom: 4rem;
  overflow-x: auto;
  border: 1px solid var(--line);
  border-radius: 0.5rem;
  background: rgba(7, 14, 28, 0.75);
}

.data-table {
  width: 100%;
  border-collapse: collapse;
  min-width: 700px;
}

.data-table th,
.data-table td {
  padding: 0.9rem 1rem;
  border-bottom: 1px solid var(--line);
  text-align: left;
}

.data-table th {
  color: #8fa4bb;
  font-size: 0.72rem;
  letter-spacing: 0.09em;
  text-transform: uppercase;
}

.data-table td {
  color: #dce8f3;
  font-size: 0.9rem;
}

.data-table tr:last-child td {
  border-bottom: 0;
}

.forum-categories,
.forum-topics,
.forum-replies {
  display: grid;
  gap: 0.75rem;
  margin-bottom: 2rem;
}

.forum-row,
.forum-topic,
.forum-reply {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 1.5rem;
  padding: 1rem 1.1rem;
  border: 1px solid var(--line);
  border-radius: 0.45rem;
  background: rgba(8, 16, 31, 0.76);
}

.forum-row h2,
.forum-topic h2,
.forum-reply h2,
.forum-row p,
.forum-topic p,
.forum-reply p {
  margin: 0;
}

.forum-row p,
.forum-topic p,
.forum-meta {
  color: var(--muted);
  font-size: 0.82rem;
}

.forum-compose {
  margin: 2rem 0 3rem;
  padding: 1.2rem;
  border: 1px solid var(--line);
  border-radius: 0.55rem;
  background: var(--surface);
}

.forum-compose label {
  display: grid;
  gap: 0.35rem;
  margin-bottom: 0.9rem;
  color: #dce8f4;
  font-size: 0.82rem;
}

.forum-compose input,
.forum-compose select,
.forum-compose textarea {
  width: 100%;
  padding: 0.7rem 0.75rem;
  border: 1px solid var(--line);
  border-radius: 0.35rem;
  outline: none;
  background: #050b17;
  color: var(--text);
}

.forum-compose textarea {
  min-height: 150px;
  resize: vertical;
}

.forum-compose input:focus,
.forum-compose select:focus,
.forum-compose textarea:focus {
  border-color: var(--cyan);
}

.forum-body {
  grid-column: 1 / -1;
  color: #c7d4e2;
}

.forum-body a {
  overflow-wrap: anywhere;
}

.forum-managed-item > div:last-child {
  min-width: 0;
}

.forum-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  margin-top: 0.9rem;
}

.forum-edit-form {
  grid-column: 1 / -1;
  margin: 1rem 0 0;
}

.forum-edit-form[hidden],
[data-owner-only][hidden],
[data-auth-only][hidden],
[data-moderator-only][hidden],
[data-moderation-content][hidden],
[data-moderation-gate][hidden] {
  display: none !important;
}

.forum-compose [data-form-status] {
  min-height: 1.3em;
  margin: 0.75rem 0 0;
  color: var(--mint);
}

.forum-compose [data-form-status][data-error="true"] {
  color: #fda4af;
}

.forum-dialog {
  width: min(620px, calc(100vw - 32px));
  padding: 0;
  border: 1px solid var(--line-strong);
  border-radius: 0.65rem;
  background: #07101f;
  color: var(--text);
}

.forum-dialog::backdrop {
  background: rgba(1, 5, 14, 0.78);
  backdrop-filter: blur(5px);
}

.forum-dialog-card {
  margin: 0;
}

.forum-dialog-header,
.moderation-toolbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
}

.moderation-shell > section,
.moderation-shell [data-moderation-content] > section {
  margin: 2rem 0;
}

.moderation-list {
  display: grid;
  gap: 0.75rem;
}

.moderation-card {
  padding: 1rem;
  border: 1px solid var(--line);
  border-radius: 0.5rem;
  background: rgba(8, 16, 31, 0.82);
}

.moderation-card h3,
.moderation-card p,
.moderation-card blockquote {
  margin: 0 0 0.65rem;
}

.moderation-card blockquote {
  padding-left: 0.8rem;
  border-left: 2px solid var(--line-strong);
  color: var(--muted);
  white-space: pre-wrap;
}

.moderation-card.compact {
  padding: 0.75rem 1rem;
}

.moderation-category {
  display: grid;
  grid-template-columns: minmax(120px, 0.7fr) minmax(200px, 1.4fr) 100px auto;
  align-items: end;
  gap: 0.75rem;
  margin: 0;
}

.moderation-category strong,
.moderation-category [data-form-status] {
  grid-column: 1 / -1;
}

.moderation-category label {
  margin: 0;
}

.forum-check {
  display: flex !important;
  align-items: center;
}

.forum-check input {
  width: auto;
}

.empty-state {
  margin-bottom: 4rem;
  padding: 2.5rem;
  border: 1px dashed var(--line-strong);
  text-align: center;
}

.empty-state h2,
.empty-state p {
  margin: 0;
}

.empty-state p {
  margin-top: 0.4rem;
  color: var(--muted);
}

.site-footer {
  padding: 2rem max(20px, calc((100vw - 1180px) / 2));
  border-top: 1px solid var(--line);
  background: var(--bg-deep);
}

.footer-grid {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 2rem;
}

.site-footer nav {
  display: flex;
  flex-wrap: wrap;
  gap: 1.4rem;
}

.site-footer > p {
  margin: 1.2rem 0 0;
  color: #657991;
  font-size: 0.75rem;
}

.consent {
  position: fixed;
  right: 1rem;
  bottom: 1rem;
  z-index: 100;
  width: min(410px, calc(100vw - 2rem));
  padding: 1rem;
  border: 1px solid var(--line-strong);
  border-radius: 0.5rem;
  background: rgba(7, 15, 29, 0.98);
  box-shadow: var(--shadow);
}

.consent[hidden] {
  display: none;
}

.consent p {
  margin: 0;
  color: #c4d2e0;
  font-size: 0.82rem;
}

.consent div {
  display: flex;
  justify-content: flex-end;
  gap: 0.55rem;
  margin-top: 0.8rem;
}

.consent button {
  padding: 0.48rem 0.75rem;
  border: 1px solid var(--line);
  border-radius: 0.3rem;
  background: transparent;
  color: var(--text);
  cursor: pointer;
  font-size: 0.78rem;
}

.consent button.primary {
  border-color: transparent;
  background: var(--mint);
  color: var(--bg);
}

.locale-suggestion {
  position: fixed;
  right: 1rem;
  bottom: 1rem;
  z-index: 99;
  width: min(440px, calc(100vw - 2rem));
  padding: 1rem;
  border: 1px solid var(--line-strong);
  border-radius: 0.5rem;
  background: rgba(7, 15, 29, 0.98);
  box-shadow: var(--shadow);
}

.consent:not([hidden]) ~ .locale-suggestion {
  bottom: 9rem;
}

.locale-suggestion p {
  margin: 0;
  color: #dbe7f3;
}

.locale-suggestion div {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 0.7rem;
  margin-top: 0.8rem;
}

.locale-suggestion button {
  border: 0;
  background: transparent;
  color: var(--muted);
  cursor: pointer;
}

@media (max-width: 980px) {
  .desktop-nav {
    display: none;
  }

  .site-header {
    grid-template-columns: 1fr auto;
  }

  .hero {
    grid-template-columns: 1fr;
    min-height: auto;
    padding-top: 4rem;
  }

  .hero-copy h1 {
    max-width: 14ch;
  }

  .feature-strip {
    grid-template-columns: 1fr;
  }

  .feature-strip article + article {
    border-top: 1px solid var(--line);
    border-left: 0;
  }

  .skin-grid {
    grid-template-columns: repeat(3, 1fr);
  }
}

@media (max-width: 680px) {
  :root {
    --container: min(100% - 28px, 1180px);
  }

  .site-header {
    min-height: 62px;
    padding: 0 14px;
  }

  .brand strong {
    font-size: 0.76rem;
  }

  .brand-logo {
    width: 1.65rem;
    height: 1.65rem;
  }

  .language-link {
    padding: 0.35rem;
    font-size: 0.72rem;
  }

  .button.small {
    min-height: 36px;
    padding-inline: 0.65rem;
  }

  .hero {
    gap: 2.4rem;
    padding: 3.5rem 0 2.5rem;
  }

  .hero-copy h1 {
    font-size: clamp(2.75rem, 14vw, 4.25rem);
  }

  .hero-copy > p {
    font-size: 1rem;
  }

  .hero-actions {
    display: grid;
    grid-template-columns: 1fr;
  }

  .hero-actions .button {
    width: 100%;
  }

  .hero-media figcaption {
    display: none;
  }

  .feature-strip {
    margin-bottom: 3rem;
  }

  .feature-strip article {
    padding-inline: 0.4rem;
  }

  .home-prose > ul {
    grid-template-columns: 1fr;
  }

  .page-heading {
    padding-top: 2.5rem;
  }

  .page-heading h1 {
    font-size: clamp(2.2rem, 12vw, 3.6rem);
  }

  .prose h2 {
    margin-top: 3rem;
  }

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

  .play-cta {
    align-items: stretch;
    flex-direction: column;
  }

  .forum-row,
  .forum-topic,
  .forum-reply {
    grid-template-columns: 1fr;
  }

  .moderation-category {
    grid-template-columns: 1fr;
  }

  .moderation-category strong,
  .moderation-category [data-form-status] {
    grid-column: auto;
  }

  .footer-grid {
    align-items: flex-start;
    flex-direction: column;
  }

  .site-footer nav {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
  }
}

@media (max-width: 430px) {
  .skin-grid {
    grid-template-columns: 1fr;
  }
}

@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }

  *,
  *::before,
  *::after {
    scroll-behavior: auto !important;
    transition-duration: 0.01ms !important;
  }
}
