:root {
  --bg: #070b16;
  --bg-elevated: rgba(14, 20, 34, 0.84);
  --bg-soft: rgba(12, 17, 30, 0.72);
  --line: rgba(173, 193, 255, 0.16);
  --line-strong: rgba(208, 220, 255, 0.3);
  --text: #edf2ff;
  --text-soft: rgba(237, 242, 255, 0.74);
  --text-muted: rgba(237, 242, 255, 0.56);
  --accent: #9fb9ff;
  --accent-strong: #dfe9ff;
  --success: #c8ffe0;
  --warning: #ffe9bf;
  --shadow: 0 28px 80px rgba(0, 0, 0, 0.45);
  --radius-xl: 28px;
  --radius-lg: 20px;
  --radius-md: 14px;
  --shell: min(1120px, calc(100vw - 2rem));
  font-family: "Yuji Syuku";
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  min-height: 100vh;
  background:
    radial-gradient(circle at top left, rgba(100, 132, 255, 0.16), transparent 32%),
    radial-gradient(circle at top right, rgba(160, 205, 255, 0.1), transparent 24%),
    linear-gradient(180deg, #090e1b 0%, #070b16 42%, #04070d 100%);
  color: var(--text);
  line-height: 1.65;
  text-rendering: optimizeLegibility;
  -webkit-font-smoothing: antialiased;
}

body::before,
body::after {
  content: "";
  position: fixed;
  inset: 0;
  pointer-events: none;
}

body::before {
  background:
    linear-gradient(
      90deg,
      transparent 0%,
      rgba(255, 255, 255, 0.03) 50%,
      transparent 100%
    );
  opacity: 0.28;
  mask-image: linear-gradient(180deg, transparent, black 18%, black 82%, transparent);
}

body::after {
  background-image:
    linear-gradient(rgba(255, 255, 255, 0.045) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255, 255, 255, 0.045) 1px, transparent 1px);
  background-size: 64px 64px;
  opacity: 0.08;
}

a {
  color: inherit;
  text-decoration: none;
}

img {
  display: block;
  max-width: 100%;
}

main {
  position: relative;
  z-index: 1;
}

::selection {
  background: rgba(159, 185, 255, 0.35);
  color: var(--text);
}

:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 4px;
}

.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

.shell {
  width: var(--shell);
  margin: 0 auto;
}

.site-header {
  position: sticky;
  top: 0;
  z-index: 10;
  backdrop-filter: blur(18px);
  background: rgba(7, 11, 22, 0.72);
  border-bottom: 1px solid rgba(255, 255, 255, 0.06);
}

.site-header__inner,
.site-header__controls,
.site-nav__list,
.hero__actions,
.site-footer__links,
.meta-row,
.section-heading,
.site-footer__inner,
.form-grid {
  display: flex;
}

.site-header__inner {
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  padding: 1rem 0;
}

.site-header__controls {
  align-items: center;
  gap: 0.75rem;
}

.brand-mark {
  display: inline-flex;
  flex-direction: column;
  gap: 0.2rem;
}

.brand-mark__tag {
  color: var(--text-muted);
  font-size: 0.72rem;
  letter-spacing: 0.22em;
  text-transform: uppercase;
}

.brand-mark__name,
.hero h1,
.page-hero h1,
.project-card h3,
.section-heading h2,
.prose h2,
.access-template h1 {
  font-family: "Yuji Syuku";
  letter-spacing: -0.02em;
}

.brand-mark__name {
  font-size: 1.1rem;
  letter-spacing: 0.03em;
}

.site-nav--desktop {
  display: block;
}

.site-nav__list {
  flex-wrap: wrap;
  justify-content: flex-end;
  gap: 0.4rem;
  list-style: none;
  margin: 0;
  padding: 0;
}

.site-nav__link,
.site-menu__link,
.locale-switcher summary,
.button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
}

.site-nav__link,
.site-menu__link {
  padding: 0.65rem 0.95rem;
  border: 1px solid transparent;
  border-radius: 999px;
  color: var(--text-soft);
  font-size: 0.95rem;
  transition:
    border-color 180ms ease,
    color 180ms ease,
    background-color 180ms ease,
    transform 180ms ease;
}

.site-nav__link:hover,
.site-nav__link:focus-visible,
.site-nav__link--active,
.site-menu__link:hover,
.site-menu__link:focus-visible,
.site-menu__link--active {
  color: var(--accent-strong);
  border-color: rgba(159, 185, 255, 0.2);
  background: rgba(159, 185, 255, 0.08);
}

.site-menu,
.locale-switcher {
  position: relative;
}

.site-menu[open] summary,
.locale-switcher[open] summary {
  border-color: rgba(159, 185, 255, 0.24);
  background: rgba(159, 185, 255, 0.08);
}

.site-menu summary,
.locale-switcher summary {
  min-height: 2.9rem;
  padding: 0.7rem 0.95rem;
  border: 1px solid rgba(191, 205, 255, 0.14);
  border-radius: 999px;
  list-style: none;
  cursor: pointer;
  color: var(--text-soft);
  background: rgba(255, 255, 255, 0.04);
}

.site-menu summary::-webkit-details-marker,
.locale-switcher summary::-webkit-details-marker {
  display: none;
}

.site-menu {
  display: none;
}

.site-menu__panel,
.locale-switcher__panel {
  position: absolute;
  right: 0;
  margin-top: 0.75rem;
  min-width: 16rem;
  padding: 0.85rem;
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.06), transparent 100%),
    var(--bg-elevated);
  box-shadow: var(--shadow);
}

.site-menu__list {
  display: grid;
  gap: 0.35rem;
  list-style: none;
  margin: 0 0 0.8rem;
  padding: 0;
}

.locale-switcher__panel {
  display: grid;
  gap: 0.35rem;
  min-width: 13rem;
}

.locale-switcher__link {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  padding: 0.7rem 0.8rem;
  border: 1px solid transparent;
  border-radius: 12px;
  color: var(--text-soft);
}

.locale-switcher__link small {
  color: var(--text-muted);
}

.locale-switcher__link:hover,
.locale-switcher__link:focus-visible,
.locale-switcher__link--active {
  color: var(--accent-strong);
  border-color: rgba(159, 185, 255, 0.2);
  background: rgba(159, 185, 255, 0.08);
}

.locale-switcher--compact .locale-switcher__panel {
  min-width: 11rem;
}

.section {
  padding: 5rem 0;
}

.section--tight {
  padding-top: 2rem;
}

.hero,
.split-grid,
.card-grid,
.info-grid {
  display: grid;
}

.hero {
  grid-template-columns: minmax(0, 1.2fr) minmax(280px, 0.8fr);
  gap: 1.5rem;
  align-items: stretch;
  padding: 3.75rem 0 2rem;
}

.hero h1,
.page-hero h1 {
  font-size: clamp(3rem, 7vw, 5.4rem);
  line-height: 1.02;
  margin: 0 0 1.3rem;
}

.hero p,
.page-hero p,
.project-card p,
.info-card p,
.prose p,
.prose li,
.site-footer__meta,
.site-footer__links,
.button,
.meta-row,
.form-field input,
.form-field textarea,
.form-field select {
  font-size: 1.02rem;
}

.hero__lede {
  margin-bottom: 1rem;
  color: var(--text-soft);
}

.hero__secondary {
  color: var(--text-muted);
  margin-bottom: 1.8rem;
}

.hero__actions {
  flex-wrap: wrap;
  gap: 0.9rem;
}

.glass-panel {
  position: relative;
  padding: 1.4rem;
  border: 1px solid var(--line);
  border-radius: var(--radius-xl);
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.06), transparent 100%),
    var(--bg-elevated);
  box-shadow: var(--shadow);
}

.glass-panel::before {
  content: "";
  position: absolute;
  inset: 0;
  border-radius: inherit;
  background: linear-gradient(140deg, rgba(255, 255, 255, 0.05), transparent 48%);
  pointer-events: none;
}

.eyebrow {
  display: inline-flex;
  margin: 0 0 0.9rem;
  color: var(--text-muted);
  font-size: 0.78rem;
  letter-spacing: 0.22em;
  text-transform: uppercase;
}

.button {
  gap: 0.5rem;
  min-height: 3rem;
  padding: 0.8rem 1.15rem;
  border-radius: 999px;
  border: 1px solid rgba(191, 205, 255, 0.16);
  font-weight: 700;
  cursor: pointer;
  transition:
    transform 180ms ease,
    background-color 180ms ease,
    border-color 180ms ease,
    color 180ms ease;
}

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

.button--primary {
  background: linear-gradient(135deg, rgba(165, 186, 255, 0.94), rgba(225, 234, 255, 0.88));
  color: #06101d;
  border-color: transparent;
}

.button--ghost {
  background: rgba(159, 185, 255, 0.08);
  color: var(--accent-strong);
}

.button--ghost:hover,
.button--ghost:focus-visible {
  background: rgba(159, 185, 255, 0.14);
  border-color: rgba(191, 205, 255, 0.28);
}

.button--disabled {
  cursor: not-allowed;
  opacity: 0.75;
  color: var(--text-muted);
  background: rgba(255, 255, 255, 0.04);
}

.link-mark {
  display: inline-flex;
  padding: 0.18rem 0.5rem;
  border-radius: 999px;
  border: 1px solid rgba(223, 233, 255, 0.18);
  font-size: 0.74rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.hero__aside {
  display: grid;
  gap: 1rem;
}

.meta-row,
.section-heading,
.site-footer__inner,
.form-grid {
  gap: 1rem;
}

.meta-row {
  justify-content: space-between;
  padding: 0.75rem 0;
  border-top: 1px solid rgba(255, 255, 255, 0.08);
}

.meta-row:first-of-type {
  border-top: 0;
  padding-top: 0;
}

.meta-row strong {
  color: var(--accent-strong);
  font-weight: 700;
  text-align: right;
}

.section-heading {
  align-items: end;
  justify-content: space-between;
  margin-bottom: 1.5rem;
}

.section-heading h2,
.prose h2,
.access-template h1 {
  margin: 0;
  font-size: clamp(1.8rem, 3vw, 2.5rem);
}

.section-heading p {
  margin: 0;
  max-width: 38rem;
  color: var(--text-muted);
}

.card-grid,
.info-grid {
  gap: 1rem;
  grid-template-columns: repeat(12, minmax(0, 1fr));
}

.card-grid > *,
.info-grid > * {
  min-width: 0;
}

.card-grid > * {
  grid-column: span 6;
}

.info-grid > * {
  grid-column: span 6;
}

.project-card,
.info-card {
  display: grid;
  gap: 1rem;
  min-height: 100%;
}

.project-card {
  transition:
    transform 180ms ease,
    border-color 180ms ease,
    background-color 180ms ease;
}

.project-card:hover {
  transform: translateY(-2px);
  border-color: rgba(223, 233, 255, 0.24);
}

.project-card__head {
  display: flex;
  flex-wrap: wrap;
  align-items: start;
  justify-content: space-between;
  gap: 0.8rem;
}

.project-card__head h3 {
  flex: 1 1 14rem;
  margin: 0;
  font-size: 1.55rem;
}

.info-card__value {
  margin: 0;
}

.info-card__value a {
  color: var(--accent-strong);
}

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

.status-pill {
  display: inline-flex;
  align-items: center;
  padding: 0.36rem 0.72rem;
  border-radius: 999px;
  font-size: 0.8rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.status-pill--active {
  background: rgba(174, 234, 200, 0.14);
  color: var(--success);
}

.status-pill--experimental {
  background: rgba(168, 201, 255, 0.14);
  color: #dce8ff;
}

.status-pill--planned {
  background: rgba(245, 222, 179, 0.14);
  color: var(--warning);
}

.page-hero {
  padding: 3.5rem 0 1.2rem;
}

.page-hero__note {
  max-width: 48rem;
  color: var(--text-muted);
}

.prose {
  display: grid;
  gap: 1.4rem;
  max-width: 46rem;
}

.devlog-stack {
  display: grid;
  gap: 1rem;
}

.devlog-entry {
  display: grid;
  gap: 1rem;
}

.devlog-entry__header,
.devlog-entry__heading,
.devlog-entry__tags {
  display: grid;
  gap: 0.75rem;
}

.devlog-entry__header {
  align-items: start;
}

.devlog-entry__date {
  color: var(--text-muted);
  font-size: 0.92rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.devlog-entry__title {
  margin: 0;
  font-size: clamp(1.65rem, 3vw, 2.2rem);
}

.devlog-entry__summary {
  margin: 0;
  color: var(--text-soft);
}

.devlog-entry__tags,
.devlog-entry__highlights {
  list-style: none;
  margin: 0;
  padding: 0;
}

.devlog-entry__tags {
  display: flex;
  flex-wrap: wrap;
}

.devlog-entry__tag {
  display: inline-flex;
  align-items: center;
  min-height: 2rem;
  padding: 0.3rem 0.7rem;
  border: 1px solid rgba(191, 205, 255, 0.16);
  border-radius: 999px;
  background: rgba(159, 185, 255, 0.08);
  color: var(--accent-strong);
  font-size: 0.82rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.devlog-entry__highlights {
  display: grid;
  gap: 0.7rem;
}

.devlog-entry__highlights li {
  position: relative;
  padding-left: 1.2rem;
  color: var(--text-soft);
}

.devlog-entry__highlights li::before {
  content: "";
  position: absolute;
  left: 0;
  top: 0.72rem;
  width: 0.42rem;
  height: 0.42rem;
  border-radius: 999px;
  background: var(--accent);
}

.prose p,
.prose ul {
  margin: 0;
}

.prose ul {
  padding-left: 1.1rem;
  color: var(--text-soft);
}

.prose li + li {
  margin-top: 0.5rem;
}

.split-grid {
  grid-template-columns: minmax(0, 1fr) minmax(280px, 0.82fr);
  gap: 1rem;
}

.identity-line {
  color: var(--text-soft);
  padding: 1.25rem 1.4rem;
}

.identity-line strong {
  color: var(--accent-strong);
}

.site-footer {
  position: relative;
  z-index: 1;
  padding: 2rem 0 3.5rem;
}

.site-footer__inner {
  flex-wrap: wrap;
  justify-content: space-between;
  padding-top: 1.25rem;
  border-top: 1px solid rgba(255, 255, 255, 0.08);
}

.site-footer__title {
  margin: 0;
  font-weight: 700;
}

.site-footer__meta {
  margin: 0.3rem 0 0;
  color: var(--text-muted);
}

.site-footer__links {
  flex-wrap: wrap;
  gap: 0.7rem 1rem;
  color: var(--text-soft);
}

.site-footer__links a:hover,
.site-footer__links a:focus-visible {
  color: var(--accent-strong);
}

.private-template {
  position: relative;
  z-index: 1;
}

.private-sidebar,
.private-links,
.private-table {
  display: grid;
  gap: 1rem;
}

.private-scopes,
.private-empty {
  color: var(--text-soft);
}

.private-link span {
  color: var(--text-muted);
}

.private-message pre {
  overflow: auto;
  padding: 1rem;
  border-radius: var(--radius-md);
  background: rgba(255, 255, 255, 0.04);
  color: var(--text-soft);
  white-space: pre-wrap;
  word-break: break-word;
}

.private-message details summary {
  cursor: pointer;
  color: var(--accent-strong);
}

.support-form,
.access-form {
  display: grid;
  gap: 1rem;
}

.form-grid {
  gap: 1rem;
}

.form-grid > * {
  flex: 1 1 0;
}

.form-field {
  display: grid;
  gap: 0.45rem;
}

.form-field span,
.form-field legend,
.form-checkbox span {
  font-weight: 700;
}

.form-field legend {
  padding: 0;
}

.form-field input,
.form-field textarea,
.form-field select {
  width: 100%;
  padding: 0.85rem 1rem;
  border: 1px solid rgba(191, 205, 255, 0.16);
  border-radius: var(--radius-md);
  background: rgba(255, 255, 255, 0.04);
  color: var(--text);
  font: inherit;
}

.form-field textarea {
  resize: vertical;
}

.form-field small,
.support-form__status {
  color: var(--text-muted);
}

.form-field--choice {
  margin: 0;
  padding: 0;
  border: 0;
}

.choice-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
  gap: 0.75rem;
}

.choice-option {
  position: relative;
  display: block;
  min-width: 0;
}

.choice-option input {
  position: absolute;
  inset: 0;
  opacity: 0;
  cursor: pointer;
  margin: 0;
}

.choice-option__card {
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 3.6rem;
  padding: 0.9rem 1rem;
  border: 1px solid rgba(191, 205, 255, 0.16);
  border-radius: var(--radius-md);
  background: rgba(255, 255, 255, 0.04);
  color: var(--text-soft);
  text-align: center;
  font-size: 0.96rem;
  line-height: 1.35;
  transition:
    border-color 180ms ease,
    background-color 180ms ease,
    color 180ms ease,
    transform 180ms ease,
    box-shadow 180ms ease;
}

.choice-option:hover .choice-option__card {
  border-color: rgba(223, 233, 255, 0.24);
  background: rgba(159, 185, 255, 0.08);
  color: var(--accent-strong);
  transform: translateY(-1px);
}

.choice-option input:checked + .choice-option__card {
  border-color: rgba(159, 185, 255, 0.38);
  background:
    linear-gradient(180deg, rgba(159, 185, 255, 0.18), rgba(159, 185, 255, 0.08)),
    rgba(255, 255, 255, 0.05);
  color: var(--accent-strong);
  box-shadow: inset 0 0 0 1px rgba(223, 233, 255, 0.08);
}

.choice-option input:focus-visible + .choice-option__card {
  outline: 2px solid var(--accent);
  outline-offset: 4px;
}

.form-checkbox {
  display: flex;
  align-items: start;
  gap: 0.75rem;
}

.form-checkbox input {
  width: 1rem;
  height: 1rem;
  margin-top: 0.25rem;
}

.support-form__status {
  min-height: 1.4rem;
}

.support-form__status[data-state="error"] {
  color: #ffc6c6;
}

.support-form__status[data-state="success"] {
  color: var(--success);
}

.notice-panel {
  display: grid;
  gap: 0.5rem;
  padding: 1rem 1.1rem;
  border: 1px solid rgba(255, 233, 191, 0.18);
  border-radius: var(--radius-md);
  background: rgba(255, 233, 191, 0.06);
}

.notice-panel p {
  margin: 0;
  color: var(--text-soft);
}

.fade-up {
  animation: fade-up 700ms cubic-bezier(0.2, 0.9, 0.2, 1) both;
  animation-delay: var(--delay, 0ms);
}

@keyframes fade-up {
  from {
    opacity: 0;
    transform: translate3d(0, 18px, 0);
  }

  to {
    opacity: 1;
    transform: translate3d(0, 0, 0);
  }
}

@media (max-width: 900px) {
  .hero,
  .split-grid {
    grid-template-columns: 1fr;
  }

  .card-grid > *,
  .info-grid > * {
    grid-column: span 12;
  }
}

@media (max-width: 860px) {
  .site-nav--desktop,
  .site-header__controls > .locale-switcher {
    display: none;
  }

  .site-menu {
    display: block;
  }
}

@media (max-width: 720px) {
  .site-header__inner,
  .section-heading,
  .site-footer__inner,
  .form-grid {
    align-items: start;
    flex-direction: column;
  }

  .hero {
    padding-top: 2.6rem;
  }

  .hero h1,
  .page-hero h1,
  .access-template h1 {
    font-size: clamp(2.5rem, 11vw, 4rem);
  }

  .button {
    width: 100%;
  }

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

  .site-menu__panel,
  .locale-switcher__panel {
    min-width: min(20rem, calc(100vw - 2rem));
  }
}

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

  *,
  *::before,
  *::after {
    animation: none !important;
    transition: none !important;
  }
}
