:root {
  --lavender-veil: #eeddf3;
  --thistle: #eed1e8;
  --pastel-petal: #eec4dd;
  --soft-blossom: #eeb8d2;
  --blush-pop: #eeabc7;
  --pink-mist: #ee92b1;

  --background: var(--lavender-veil);
  --foreground: #4a3d48;
  --muted: #7a6b75;
  --card: #f5ebf2;
  --card-border: var(--pastel-petal);
  --accent: var(--pink-mist);
  --accent-soft: rgba(238, 171, 199, 0.33);
  --accent-secondary: var(--blush-pop);
  --success: #6aab8a;
  --warning: #c9a86c;
  --danger: #c9788f;

  --font-sans: system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  --font-mono: ui-monospace, "Cascadia Code", "Segoe UI Mono", monospace;
}

*,
*::before,
*::after {
  box-sizing: border-box;
}

html {
  height: 100%;
}

body {
  margin: 0;
  min-height: 100%;
  display: flex;
  flex-direction: column;
  background:
    radial-gradient(ellipse 80% 60% at 50% -10%, var(--thistle) 0%, transparent 70%),
    radial-gradient(ellipse 60% 50% at 100% 100%, var(--soft-blossom) 0%, transparent 60%),
    radial-gradient(ellipse 50% 40% at 0% 80%, var(--pastel-petal) 0%, transparent 55%),
    var(--background);
  background-attachment: fixed;
  color: var(--foreground);
  font-family: var(--font-sans);
  -webkit-font-smoothing: antialiased;
}

::selection {
  background: var(--soft-blossom);
  color: var(--foreground);
}

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

main {
  flex: 1;
}

.wip-badge {
  position: fixed;
  top: 0.5rem;
  left: 0.75rem;
  z-index: 60;
  font-size: clamp(2.25rem, 6vw, 3.5rem);
  font-weight: 900;
  letter-spacing: 0.1em;
  line-height: 1;
  color: var(--accent);
  pointer-events: none;
  user-select: none;
  transform: rotate(-10deg);
  text-shadow:
    0 0 12px rgba(238, 146, 177, 0.85),
    0 0 28px rgba(238, 146, 177, 0.6),
    0 0 48px rgba(238, 171, 199, 0.45),
    0 0 72px rgba(238, 146, 177, 0.3);
  animation: wip-glow 2.5s ease-in-out infinite;
}

@keyframes wip-glow {
  0%,
  100% {
    opacity: 0.88;
    text-shadow:
      0 0 12px rgba(238, 146, 177, 0.85),
      0 0 28px rgba(238, 146, 177, 0.6),
      0 0 48px rgba(238, 171, 199, 0.45),
      0 0 72px rgba(238, 146, 177, 0.3);
  }

  50% {
    opacity: 1;
    text-shadow:
      0 0 16px rgba(238, 146, 177, 1),
      0 0 36px rgba(238, 146, 177, 0.75),
      0 0 60px rgba(238, 171, 199, 0.55),
      0 0 90px rgba(238, 146, 177, 0.35);
  }
}

.site-header {
  position: sticky;
  top: 0;
  z-index: 50;
  border-bottom: 1px solid var(--pastel-petal);
  background: rgba(245, 235, 242, 0.7);
  backdrop-filter: blur(8px);
}

.site-nav {
  max-width: 56rem;
  margin: 0 auto;
  padding: 1rem 1.5rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.logo {
  font-size: 1.125rem;
  font-weight: 700;
  letter-spacing: -0.025em;
  border-radius: 0.5rem;
  transition: color 0.2s;
}

.logo:hover {
  color: var(--accent);
}

.logo-dot {
  color: var(--accent);
  transition: color 0.2s;
}

.logo:hover .logo-dot {
  color: var(--accent-secondary);
}

.nav-links {
  display: flex;
  align-items: center;
  gap: 0.25rem;
}

.nav-link {
  border-radius: 0.5rem;
  padding: 0.375rem 0.75rem;
  font-size: 0.875rem;
  color: var(--muted);
  transition: background 0.2s, color 0.2s;
}

.nav-link:hover {
  background: var(--accent-soft);
  color: var(--foreground);
}

.site-footer {
  border-top: 1px solid var(--card-border);
  padding: 1.5rem;
  text-align: center;
  font-size: 0.875rem;
  color: var(--muted);
}

.container {
  max-width: 56rem;
  margin: 0 auto;
  padding: 3rem 1.5rem;
}

.container-narrow {
  max-width: 48rem;
  margin: 0 auto;
  padding: 3rem 1.5rem;
}

.container-bio {
  max-width: 42rem;
  margin: 0 auto;
  padding: 3rem 1.5rem;
}

.wiki-layout {
  display: grid;
  gap: 2rem;
  max-width: 72rem;
  margin: 0 auto;
  padding: 2.5rem 1.5rem 3.5rem;
  align-items: start;
}

@media (min-width: 900px) {
  .wiki-layout {
    grid-template-columns: 15rem minmax(0, 1fr);
    gap: 2.5rem;
  }
}

.wiki-sidebar {
  position: sticky;
  top: 5.5rem;
  border-radius: 0.75rem;
  border: 1px solid var(--card-border);
  background: rgba(245, 235, 242, 0.72);
  padding: 1rem;
  backdrop-filter: blur(8px);
}

.wiki-sidebar-label {
  margin: 0 0 0.75rem;
  padding: 0 0.5rem;
  font-size: 0.75rem;
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--accent-secondary);
}

.wiki-sidebar-nav {
  display: flex;
  flex-direction: column;
  gap: 0.125rem;
}

.wiki-nav-link {
  display: block;
  padding: 0.45rem 0.625rem;
  border-radius: 0.5rem;
  font-size: 0.875rem;
  line-height: 1.35;
  color: var(--foreground);
  transition: background 0.15s, color 0.15s;
}

.wiki-nav-link:hover {
  background: rgba(238, 196, 221, 0.35);
  color: var(--accent);
}

.wiki-nav-link.is-active {
  background: rgba(238, 146, 177, 0.18);
  color: var(--accent);
  font-weight: 600;
}

.wiki-nav-section-link {
  margin-top: 0.375rem;
  font-weight: 600;
}

.wiki-nav-subsections {
  list-style: none;
  margin: 0.125rem 0 0.375rem;
  padding: 0 0 0 0.625rem;
  border-left: 1px solid rgba(238, 196, 221, 0.55);
}

.wiki-nav-subsection-link {
  font-size: 0.8125rem;
  font-weight: 400;
  color: var(--muted);
}

.wiki-nav-subsection-link.is-active {
  color: var(--accent);
}

.wiki-main {
  min-width: 0;
}

.wiki-header {
  margin-bottom: 2rem;
}

.wiki-section-cards {
  display: grid;
  gap: 1rem;
}

@media (min-width: 640px) {
  .wiki-section-cards {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

.wiki-section-card .card-title {
  font-size: 1rem;
}

.wiki-section-list {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  gap: 0.75rem;
}

.wiki-section-list-link {
  display: block;
  border-radius: 0.75rem;
  border: 1px solid var(--card-border);
  background: rgba(245, 235, 242, 0.55);
  padding: 1rem 1.125rem;
  transition: border-color 0.2s, box-shadow 0.2s;
}

.wiki-section-list-link:hover {
  border-color: var(--soft-blossom);
  box-shadow: 0 8px 14px -6px rgba(238, 184, 210, 0.25);
}

.wiki-section-list-title {
  display: block;
  font-weight: 600;
  color: var(--foreground);
}

.wiki-section-list-desc {
  display: block;
  margin-top: 0.25rem;
  font-size: 0.875rem;
  color: var(--muted);
}

.section {
  margin-bottom: 4rem;
}

.section-sm {
  margin-bottom: 3rem;
}

.page-title {
  margin: 0 0 0.75rem;
  font-size: 2.25rem;
  font-weight: 700;
  letter-spacing: -0.025em;
  line-height: 1.2;
}

.page-lead {
  max-width: 42rem;
  margin: 0;
  font-size: 1.125rem;
  line-height: 1.625;
  color: var(--muted);
}

.page-lead-accent {
  color: var(--accent);
  font-weight: 600;
}

.section-label {
  margin: 0 0 1rem;
  font-size: 0.875rem;
  font-weight: 500;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: var(--accent-secondary);
}

.text-accent {
  color: var(--accent);
}

.text-accent-glow {
  text-shadow:
    0 0 8px rgba(238, 146, 177, 0.55),
    0 0 20px rgba(238, 146, 177, 0.35),
    0 0 36px rgba(238, 171, 199, 0.22);
}

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

.text-sm {
  font-size: 0.875rem;
}

.grid-2 {
  display: grid;
  gap: 1rem;
}

@media (min-width: 640px) {
  .grid-2 {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

.card {
  display: block;
  border-radius: 0.75rem;
  border: 1px solid var(--card-border);
  background: rgba(245, 235, 242, 0.8);
  padding: 1.25rem;
  transition: border-color 0.2s, box-shadow 0.2s;
}

.card:hover {
  border-color: rgba(238, 146, 177, 0.4);
}

.card-link:hover {
  border-color: var(--soft-blossom);
  box-shadow: 0 10px 15px -3px rgba(238, 184, 210, 0.2);
}

.card-link:hover .card-title {
  color: var(--accent);
}

.card-dashed {
  border-style: dashed;
}

.card-title {
  margin: 0 0 0.5rem;
  font-weight: 600;
  transition: color 0.2s;
}

.card-text {
  margin: 0;
  font-size: 0.875rem;
  line-height: 1.625;
  color: var(--muted);
}

code {
  font-family: var(--font-mono);
  font-size: 0.875em;
  color: var(--accent);
}

.tag-list {
  display: flex;
  flex-wrap: wrap;
  gap: 0.375rem;
  margin-top: 0.75rem;
}

.tag {
  border-radius: 9999px;
  background: var(--accent-soft);
  padding: 0.125rem 0.625rem;
  font-size: 0.75rem;
  color: var(--accent);
}

.back-link {
  display: inline-flex;
  align-items: center;
  gap: 0.25rem;
  margin-bottom: 2rem;
  font-size: 0.875rem;
  color: var(--muted);
  transition: color 0.2s;
}

.back-link:hover {
  color: var(--accent);
}

.article-header {
  margin-bottom: 2rem;
}

.article-title {
  margin: 0 0 0.5rem;
  font-size: 1.875rem;
  font-weight: 700;
}

.bio-hero {
  margin-bottom: 2.5rem;
  text-align: center;
}

.avatar {
  width: 6rem;
  height: 6rem;
  margin: 0 auto 1rem;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 9999px;
  background: linear-gradient(to bottom right, var(--blush-pop), var(--pink-mist));
  font-size: 1.875rem;
  font-weight: 700;
  color: var(--foreground);
  box-shadow: 0 4px 6px -1px rgba(238, 184, 210, 0.4);
}

.bio-name {
  margin: 0;
  font-size: 1.875rem;
  font-weight: 700;
}

.bio-card {
  border-radius: 0.75rem;
  border: 1px solid var(--card-border);
  background: rgba(245, 235, 242, 0.5);
  padding: 1.5rem;
}

.prose-wiki h1 {
  font-size: 1.875rem;
  font-weight: 700;
  margin-bottom: 1rem;
  color: var(--foreground);
}

.prose-wiki h2 {
  font-size: 1.25rem;
  font-weight: 600;
  margin-top: 2rem;
  margin-bottom: 0.75rem;
  color: var(--pink-mist);
}

.prose-wiki h3 {
  font-size: 1.1rem;
  font-weight: 600;
  margin-top: 1.5rem;
  margin-bottom: 0.5rem;
  color: var(--blush-pop);
}

.prose-wiki p {
  margin-bottom: 1rem;
  line-height: 1.7;
  color: var(--muted);
}

.prose-wiki ul,
.prose-wiki ol {
  margin-bottom: 1rem;
  padding-left: 1.5rem;
  color: var(--muted);
}

.prose-wiki li {
  margin-bottom: 0.35rem;
  line-height: 1.6;
}

.prose-wiki code {
  font-family: var(--font-mono);
  font-size: 0.875em;
  background: var(--pastel-petal);
  padding: 0.15em 0.4em;
  border-radius: 0.25rem;
  color: #6b4f62;
}

.prose-wiki pre {
  background: var(--card);
  border: 1px solid var(--card-border);
  border-radius: 0.5rem;
  padding: 1rem;
  overflow-x: auto;
  margin-bottom: 1rem;
}

.prose-wiki pre code {
  background: none;
  padding: 0;
  color: var(--foreground);
}

.prose-wiki a {
  color: var(--pink-mist);
  text-decoration: underline;
  text-underline-offset: 2px;
}

.prose-wiki a:hover {
  color: var(--blush-pop);
}

.prose-wiki img {
  display: block;
  max-width: 100%;
  height: auto;
  margin: 1rem 0;
  border-radius: 0.5rem;
  border: 1px solid var(--card-border);
}

.wiki-embed {
  position: relative;
  width: 100%;
  max-width: 43rem;
  margin: 1.25rem 0;
  aspect-ratio: 16 / 9;
}

.wiki-embed iframe {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  border: 0;
  border-radius: 0.5rem;
}

.wiki-config-copy {
  margin: 1rem 0 1.25rem;
  border-radius: 0.75rem;
  border: 1px solid var(--card-border);
  background: rgba(245, 235, 242, 0.65);
  overflow: hidden;
}

.wiki-config-copy-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.75rem;
  padding: 0.625rem 0.875rem;
  border-bottom: 1px solid var(--card-border);
  background: rgba(238, 196, 221, 0.25);
}

.wiki-config-copy-label {
  font-size: 0.8125rem;
  font-weight: 600;
  color: var(--accent-secondary);
  text-transform: uppercase;
  letter-spacing: 0.06em;
}

.wiki-config-copy-btn {
  border: 1px solid var(--pastel-petal);
  border-radius: 0.5rem;
  background: var(--card);
  padding: 0.35rem 0.75rem;
  font-size: 0.8125rem;
  font-weight: 600;
  color: var(--foreground);
  cursor: pointer;
  transition: border-color 0.15s, color 0.15s, background 0.15s;
}

.wiki-config-copy-btn:hover {
  border-color: var(--soft-blossom);
  color: var(--accent);
  background: rgba(245, 235, 242, 0.95);
}

.wiki-config-copy-code {
  margin: 0;
  padding: 1rem 1.125rem;
  overflow-x: auto;
  font-family: var(--font-mono);
  font-size: 0.8125rem;
  line-height: 1.55;
  color: var(--foreground);
  background: transparent;
}

.wiki-config-copy-code code {
  color: inherit;
}

.prose-wiki blockquote {
  border-left: 3px solid var(--soft-blossom);
  padding-left: 1rem;
  margin: 1rem 0;
  color: var(--muted);
  font-style: italic;
}

.prose-wiki table {
  width: 100%;
  border-collapse: collapse;
  margin-bottom: 1rem;
}

.prose-wiki th,
.prose-wiki td {
  border: 1px solid var(--card-border);
  padding: 0.5rem 0.75rem;
  text-align: left;
}

.prose-wiki th {
  background: var(--thistle);
  color: var(--foreground);
}

.not-found {
  text-align: center;
  padding: 4rem 1.5rem;
}

.not-found h1 {
  font-size: 2rem;
  margin-bottom: 0.5rem;
}

.lanyard-card {
  border-radius: 0.75rem;
  border: 1px solid var(--card-border);
  background: rgba(245, 235, 242, 0.5);
  padding: 1.5rem;
  margin-bottom: 1.5rem;
}

.lanyard-loading,
.lanyard-error {
  text-align: center;
  color: var(--muted);
}

.lanyard-error a {
  color: var(--accent);
  text-decoration: underline;
  text-underline-offset: 2px;
}

.lanyard-profile {
  display: flex;
  align-items: center;
  gap: 1rem;
  margin-bottom: 1rem;
}

.lanyard-avatar-wrap {
  position: relative;
  flex-shrink: 0;
}

.lanyard-avatar {
  width: 5.5rem;
  height: 5.5rem;
  border-radius: 9999px;
  object-fit: cover;
  box-shadow: 0 4px 6px -1px rgba(238, 184, 210, 0.4);
}

.lanyard-status {
  position: absolute;
  right: 0.15rem;
  bottom: 0.15rem;
  width: 1.1rem;
  height: 1.1rem;
  border-radius: 9999px;
  border: 3px solid var(--card);
}

.lanyard-status-online {
  background: var(--success);
}

.lanyard-status-idle {
  background: var(--warning);
}

.lanyard-status-dnd {
  background: var(--danger);
}

.lanyard-status-offline {
  background: var(--muted);
}

.lanyard-meta {
  min-width: 0;
  text-align: left;
}

.lanyard-name {
  margin: 0;
  font-size: 1.5rem;
  font-weight: 700;
}

.lanyard-handle,
.lanyard-presence,
.lanyard-custom {
  margin: 0.2rem 0 0;
  font-size: 0.875rem;
  color: var(--muted);
}

.lanyard-custom {
  color: var(--foreground);
}

.lanyard-activity {
  display: flex;
  align-items: center;
  gap: 0.875rem;
  margin-top: 1rem;
  padding-top: 1rem;
  border-top: 1px solid var(--card-border);
}

.lanyard-activity-art {
  width: 4rem;
  height: 4rem;
  border-radius: 0.5rem;
  object-fit: cover;
  flex-shrink: 0;
}

.lanyard-activity-copy {
  min-width: 0;
}

.lanyard-activity-label {
  margin: 0;
  font-size: 0.75rem;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: var(--accent-secondary);
}

.lanyard-activity-title {
  margin: 0.15rem 0 0;
  font-weight: 600;
}

.lanyard-activity-subtitle {
  margin: 0.15rem 0 0;
  font-size: 0.875rem;
  color: var(--muted);
}

.lanyard-spotify .lanyard-activity-label {
  color: var(--success);
}

@media (max-width: 640px) {
  .lanyard-profile {
    flex-direction: column;
    text-align: center;
  }

  .lanyard-meta {
    text-align: center;
  }
}
