﻿:root {
  --surface-base: #141414;
  --surface-news: #0a0a0a;
  --fg: #ededed;
  --muted: rgba(255, 255, 255, 0.72);
  --line: rgba(255, 255, 255, 0.1);
  --line-soft: rgba(255, 255, 255, 0.08);
  --pink: #ff004e;
  --cyan: #00d2ff;
}

* { box-sizing: border-box; }
html, body { margin: 0; padding: 0; background: var(--surface-base); color: var(--fg); font-family: Arial, Helvetica, sans-serif; }
a { color: inherit; text-decoration: none; }
.mx { width: min(1440px, 92%); margin: 0 auto; }

/* Custom scrollbar: glass-like track + muted gray thumb */
html {
  scrollbar-width: thin;
  scrollbar-color: rgba(255,255,255,.52) rgba(0,0,0,.5);
}

::-webkit-scrollbar {
  width: 12px;
  height: 12px;
}

::-webkit-scrollbar-track {
  background: rgba(0,0,0,.5);
  border-radius: 999px;
}

::-webkit-scrollbar-thumb {
  background: rgba(255,255,255,.52);
  border-radius: 999px;
  border: 2px solid transparent;
  background-clip: padding-box;
}

::-webkit-scrollbar-thumb:hover {
  background: rgba(255,255,255,.68);
  background-clip: padding-box;
}

.site-header { position: fixed; top: 0; right: 0; left: 0; z-index: 40; }
.site-header .mx { width: 90%; }
.header-shell {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 56px;
  border: 0;
  border-radius: 0 0 20px 20px;
  background: rgba(0, 0, 0, 0.5);
  backdrop-filter: blur(10px);
  padding: 0 12px;
}

.brand img { width: 28px; height: 28px; display: block; border-radius: 999px; }
.brand img.brand-white-icon {
  filter: brightness(0) invert(1);
}

.main-nav {
  position: absolute;
  left: 50%;
  transform: translateX(-50%);
  display: flex;
  align-items: center;
  gap: 6px;
}

.main-nav a {
  position: relative;
  padding: 8px 12px;
  font-size: 15px;
  font-weight: 500;
  color: rgba(255, 255, 255, 0.52);
  text-shadow: 0 1px 8px rgba(0, 0, 0, 0.45);
  transition: color .15s ease;
}
.main-nav a:hover { color: rgba(255, 255, 255, 0.84); }
.main-nav a.active { color: #fff; }
.main-nav a.active::after {
  content: "";
  position: absolute;
  left: 50%;
  top: calc(100% + 2px);
  transform: translateX(-50%);
  width: 40px;
  height: 3px;
  border-radius: 999px;
  background: var(--pink);
}

.header-controls { display: flex; align-items: center; gap: 10px; }
.search-wrap {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  border: 1px solid var(--line);
  background: rgba(255, 255, 255, 0.05);
  border-radius: 999px;
  padding: 5px 10px;
}
.search-icon { font-size: 14px; opacity: .7; }
.search-wrap input {
  border: 0;
  outline: 0;
  width: 128px;
  background: transparent;
  color: #fff;
  font-size: 13px;
}
.search-wrap input::placeholder { color: rgba(255,255,255,.5); }
.login-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  height: 34px;
  border-radius: 999px;
  border: 1px solid var(--line);
  background: rgba(255,255,255,.05);
  color: #fff;
  padding: 0 12px;
  font-size: 13px;
}

.lang-wrap {
  position: relative;
}

.lang-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 28px;
  height: 28px;
  border: 0;
  background: transparent;
  color: #fff;
  padding: 0;
  cursor: pointer;
}

.lang-flag {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 20px;
  height: 20px;
  line-height: 1;
}

.lang-flag img {
  width: 20px;
  height: 20px;
  object-fit: cover;
  border-radius: 999px;
  display: block;
}

.lang-menu {
  position: absolute;
  right: -8px;
  top: calc(100% + 8px);
  min-width: 52px;
  border-radius: 14px;
  border: 1px solid rgba(255,255,255,.1);
  background: rgba(0,0,0,.72);
  backdrop-filter: blur(10px);
  box-shadow: 0 12px 32px rgba(0,0,0,.4);
  padding: 6px;
  max-height: 232px;
  overflow-y: auto;
  z-index: 60;
}

.lang-item {
  width: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0;
  border: 0;
  border-radius: 10px;
  background: transparent;
  color: rgba(255,255,255,.88);
  text-align: center;
  font-size: 14px;
  padding: 8px 6px;
  cursor: pointer;
}

.lang-item .flag {
  width: 18px;
  height: 18px;
  flex: 0 0 18px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
}

.lang-item .flag img {
  width: 18px;
  height: 18px;
  object-fit: cover;
  border-radius: 999px;
  display: block;
}

.lang-item:hover {
  background: rgba(255,255,255,.1);
}

.lang-item.active {
  background: rgba(255,255,255,.12);
  color: #fff;
}

.lang-divider {
  height: 1px;
  margin: 4px 2px;
  background: var(--ui-divider, rgba(255, 255, 255, .22));
  border-radius: 999px;
}

.account-wrap {
  position: relative;
}

.account-pill {
  position: relative;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  border-radius: 999px;
  border: 1px solid var(--line);
  background: rgba(255,255,255,.05);
  color: #fff;
  padding: 6px 34px 6px 12px;
  min-height: 34px;
  cursor: pointer;
}

.account-meta {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  font-size: 13px;
}

.account-meta .acc-no { color: rgba(255,255,255,.92); }
.account-meta .sep { color: rgba(255,255,255,.32); }
.account-meta .name {
  max-width: 130px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  color: rgba(255,255,255,.92);
}

.account-avatar {
  position: absolute;
  right: -8px;
  top: 50%;
  transform: translateY(-50%);
  width: 34px;
  height: 34px;
  border-radius: 999px;
  overflow: hidden;
  border: 1px solid rgba(255,255,255,.12);
  box-shadow: 0 8px 20px rgba(0,0,0,.35);
}

.account-avatar img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  background: #111;
}

.account-menu {
  position: absolute;
  right: 0;
  top: calc(100% + 8px);
  min-width: 190px;
  border-radius: 16px;
  border: 1px solid rgba(255,255,255,.1);
  background: rgba(0,0,0,.72);
  backdrop-filter: blur(10px);
  box-shadow: 0 12px 32px rgba(0,0,0,.4);
  padding: 6px;
  z-index: 60;
}

.account-menu .menu-label {
  padding: 8px 10px 6px;
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: .1em;
  color: rgba(255,255,255,.5);
}

.account-menu a {
  display: block;
  border-radius: 10px;
  padding: 9px 10px;
  font-size: 14px;
  color: rgba(255,255,255,.9);
}

.account-menu a:hover {
  background: rgba(255,255,255,.1);
}

.page-main { padding-top: 0; min-height: calc(100vh - 220px); }
/* Keep subpages clear of the fixed header, but let homepage banner sit behind it */
.page-main > .section:first-child { padding-top: 96px; }

.hero {
  position: relative;
  background: var(--surface-base);
  aspect-ratio: 6 / 1;
  min-height: 240px;
}
.hero-bg { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; opacity: .8; }
.hero-overlay { position: absolute; inset: 0; background: linear-gradient(to right, rgba(255,0,128,.25), transparent, rgba(0,210,255,.3)); }
.hero-fade { position: absolute; left: 0; right: 0; bottom: 0; height: 128px; background: linear-gradient(to top, var(--surface-base), rgba(26,26,26,.65) 55%, rgba(26,26,26,0)); }
.hero-content { position: relative; padding: 74px 0; }
.hero-content h1 { margin: 0; font-size: clamp(2.1rem, 5.4vw, 4rem); font-weight: 800; line-height: 1.02; }
.hero-content p { margin: 10px 0 0; color: var(--muted); max-width: 760px; font-size: clamp(1rem, 2.2vw, 1.13rem); }
.hero-btn {
  margin-top: 24px;
  display: inline-flex;
  border-radius: 12px;
  border: 1px solid rgba(255,255,255,.15);
  background: rgba(255,255,255,.1);
  padding: 10px 16px;
}

.section { padding: 36px 0 58px; }
.home-community { margin-top: 32px; padding-bottom: 48px; }
.grid { display: grid; gap: 18px; }
.cols-4 { grid-template-columns: repeat(4, minmax(0, 1fr)); }

.card {
  border-radius: 12px;
  border: 0;
  background: #17191f;
  box-shadow: 0 8px 22px rgba(0,0,0,.24);
  backdrop-filter: blur(8px);
  padding: 15px;
}

.home-community .card[data-discord-card] {
  position: relative;
  overflow: hidden;
  isolation: isolate;
  background: #17191f;
}

.home-community .card[data-discord-card]::before {
  content: "";
  position: absolute;
  inset: 0;
  background-image: var(--community-bg-image);
  background-size: cover;
  background-position: center;
  opacity: 0;
  transform: scale(1.02);
  transition: opacity .24s ease;
  z-index: 0;
}

.home-community .card[data-discord-card]::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(145deg, rgba(9,11,16,.92), rgba(9,11,16,.84) 45%, rgba(9,11,16,.92));
  z-index: 0;
}

.home-community .card[data-discord-card].has-wallpaper::before {
  opacity: .28;
}

.home-community .card[data-discord-card] > * {
  position: relative;
  z-index: 1;
}

.community-head { display: flex; gap: 12px; align-items: center; }
.community-head img {
  width: 46px;
  height: 46px;
  flex-shrink: 0;
  border-radius: 10px;
  border: 0;
  background: transparent;
  padding: 0;
  object-fit: cover;
}
.community-head h3 { margin: 0; font-size: 1.08rem; }
.community-meta { margin-top: 6px; color: var(--muted); font-size: .92rem; }
.dot { width: 7px; height: 7px; border-radius: 999px; display: inline-block; background: rgba(255,255,255,.35); margin: 0 6px 1px 8px; }
.dot.online { margin-left: 0; background: #3adf89; }
.community-action {
  margin-top: 14px;
  width: 100%;
  display: inline-flex;
  justify-content: center;
  border-radius: 10px;
  border: 1px solid rgba(255,255,255,.12);
  background: rgba(255,255,255,.16);
  color: rgba(255,255,255,.9);
  padding: 10px 12px;
  transition: background .18s ease, border-color .18s ease;
}

.community-action:hover {
  background: rgba(255,255,255,.22);
  border-color: rgba(255,255,255,.2);
}
.community-note { margin: 10px 0 0; text-align: center; font-size: 12px; color: rgba(255,255,255,.52); }

.page-head {
  margin-top: 22px;
  border-radius: 14px;
  border: 1px solid var(--line-soft);
  background: rgba(255,255,255,.04);
  padding: 20px;
}
.page-head h1 { margin: 10px 0 8px; font-size: clamp(1.5rem, 4vw, 2.2rem); }
.page-head p { margin: 0; color: var(--muted); }
.badge { display: inline-block; border: 1px solid var(--line); border-radius: 999px; font-size: 12px; color: var(--muted); padding: 4px 8px; }
.quicklinks { margin-top: 14px; display: flex; flex-wrap: wrap; gap: 10px; }
.quicklinks a { border: 1px solid var(--line); border-radius: 9px; background: rgba(255,255,255,.06); font-size: 14px; padding: 8px 10px; }

.events-page {
  padding-top: 92px;
  padding-bottom: 48px;
}

.events-head {
  display: flex;
  flex-direction: row;
  gap: 12px;
  justify-content: space-between;
  align-items: center;
}

.events-kicker {
  margin: 0;
  color: rgba(255,255,255,.6);
  font-size: 12px;
  letter-spacing: .2em;
  text-transform: uppercase;
}

.events-actions {
  display: flex;
  gap: 8px;
  align-items: center;
  flex-wrap: wrap;
}

.events-filter {
  position: relative;
  min-height: 42px;
  min-width: 42px;
}

.events-filter-panel {
  position: absolute;
  right: 0;
  top: 0;
  height: 42px;
  width: 42px;
  border-radius: 999px;
  border: 1px solid rgba(255,255,255,.12);
  background: rgba(255,255,255,.07);
  overflow: hidden;
  padding: 6px 46px 6px 10px;
  opacity: 0;
  pointer-events: none;
  transition: width .24s ease, opacity .2s ease, background .2s ease, border-color .2s ease;
}

.events-filter.is-open .events-filter-panel {
  width: min(620px, 70vw);
  opacity: 1;
  pointer-events: auto;
  background: rgba(255,255,255,.08);
  border-color: rgba(255,255,255,.16);
}

.events-filter-toggle {
  position: absolute;
  right: 0;
  top: 0;
  width: 42px;
  height: 42px;
  border-radius: 999px;
  border: 1px solid rgba(255,255,255,.14);
  background: rgba(255,255,255,.1);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0;
  cursor: pointer;
}

.events-filter-toggle img {
  width: 20px;
  height: 20px;
  filter: brightness(0) invert(1);
  opacity: .92;
}

.events-filter-options {
  height: 100%;
  display: flex;
  align-items: center;
  gap: 8px;
  white-space: nowrap;
  overflow-x: auto;
  scrollbar-width: thin;
}

.events-filter-options::-webkit-scrollbar {
  height: 6px;
}

.events-filter-option {
  border: 1px solid rgba(255,255,255,.18);
  border-radius: 999px;
  background: rgba(255,255,255,.06);
  color: rgba(255,255,255,.74);
  font-size: 12px;
  line-height: 1;
  padding: 7px 11px;
  cursor: pointer;
  transition: border-color .18s ease, color .18s ease, background .18s ease;
}

.events-filter-option:hover {
  border-color: rgba(255,255,255,.28);
  color: #fff;
}

.events-filter-option.is-active {
  border-color: color-mix(in srgb, var(--event-accent, #00d26a) 62%, #fff 38%);
  background: color-mix(in srgb, var(--event-accent, #00d26a) 20%, transparent);
  color: #fff;
}

.event-card[hidden] {
  display: none !important;
}

.events-grid {
  margin-top: 18px;
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 24px;
}

.event-card {
  display: block;
  border-radius: 12px;
  overflow: hidden;
  border: 1px solid transparent;
  background: #0a0a0a;
  box-shadow: 0 18px 48px rgba(0,0,0,.45);
  transition: transform .18s ease, border-color .18s ease;
}

.event-card:hover {
  transform: translateY(-4px);
  border-color: var(--event-accent, #00d26a);
}

.event-cover {
  position: relative;
  width: 100%;
  aspect-ratio: 4 / 1;
  overflow: hidden;
}

.event-cover img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.event-cover::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(135deg, rgba(0,0,0,.25), transparent 45%, rgba(0,0,0,.12));
}

.event-body {
  padding: 16px 16px 16px;
  display: grid;
  gap: 12px;
  min-height: 168px;
  grid-template-rows: auto minmax(0,1fr) auto;
}

.event-headline {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.event-source-icon {
  width: 22px;
  height: 22px;
  background-size: contain;
  background-position: center;
  background-repeat: no-repeat;
  filter: brightness(0) invert(1);
  opacity: .9;
  flex: 0 0 22px;
}

.event-source-icon-bottom {
  width: 28px;
  height: 28px;
  flex: 0 0 28px;
  opacity: .96;
}

.event-pill-dot {
  width: 10px;
  height: 10px;
  border-radius: 999px;
  display: inline-block;
}

.event-bell-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 22px;
  height: 22px;
  border: 0;
  background: transparent;
  padding: 0;
  color: rgba(255,255,255,.72);
  transition: transform .16s ease, color .16s ease;
}

.event-bell-btn img {
  width: 22px;
  height: 22px;
  display: block;
  filter: brightness(0) invert(1);
  opacity: .82;
}

.event-card:hover .event-bell-btn {
  transform: scale(1.06);
}

.event-card:hover .event-bell-btn img {
  opacity: 1;
}

.event-title {
  margin: 0;
  color: #fff;
  font-size: 18px;
  line-height: 1.25;
}

.event-summary {
  margin: 0;
  color: rgba(255,255,255,.72);
  font-size: 14px;
  line-height: 1.45;
  max-height: calc(1.45em * 2);
  overflow: hidden;
}

.event-summary .event-more {
  color: rgba(255,255,255,.9);
  text-decoration: underline;
  text-decoration-color: rgba(255,255,255,.5);
  text-decoration-thickness: 1px;
  text-underline-offset: 2px;
}

.event-bottom {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 12px;
  flex-wrap: nowrap;
  color: rgba(255,255,255,.72);
  font-size: 12px;
}

.event-status {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  color: rgba(255,255,255,.82);
  font-size: 12px;
  letter-spacing: .02em;
}

.event-detail-page {
  background: var(--surface-base);
  margin-top: 0;
}

.event-hero {
  position: relative;
  overflow: visible;
  aspect-ratio: 4 / 1;
  min-height: 260px;
  background: #07090d;
}

.event-hero-placeholder {
  position: absolute;
  inset: 0;
  z-index: 0;
  display: grid;
  place-items: center;
  gap: 10px;
  background:
    radial-gradient(circle at 82% 18%, color-mix(in srgb, var(--event-accent, #00d2ff) 28%, transparent), transparent 50%),
    radial-gradient(circle at 14% 78%, rgba(255,255,255,.07), transparent 48%),
    #0d0d0f;
}

.event-hero-placeholder img {
  width: 66px;
  height: 66px;
  opacity: .92;
}

.event-hero-placeholder span {
  color: rgba(255,255,255,.74);
  font-size: 12px;
  letter-spacing: .12em;
  text-transform: uppercase;
}

.event-hero-video {
  position: absolute;
  inset: 0;
  z-index: 1;
  overflow: hidden;
}

.event-hero-audio {
  position: absolute;
  left: 18px;
  bottom: 22px;
  z-index: 3;
  display: inline-flex;
  align-items: center;
  gap: 8px;
}

.event-audio-btn {
  width: 36px;
  height: 36px;
  border-radius: 999px;
  border: 1px solid rgba(255,255,255,.18);
  background: rgba(0,0,0,.45);
  color: #fff;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
}

.event-audio-btn img {
  width: 19px;
  height: 19px;
  display: block;
  filter: brightness(0) invert(1);
}

.event-audio-btn .i-unmuted { display: none; }
.event-audio-btn.is-unmuted .i-muted { display: none; }
.event-audio-btn.is-unmuted .i-unmuted { display: block; }

.event-audio-slider {
  width: 0;
  opacity: 0;
  pointer-events: none;
  transition: width .18s ease, opacity .18s ease;
}

.event-hero-audio.is-open .event-audio-slider {
  width: 92px;
  opacity: 1;
  pointer-events: auto;
}

.event-hero-video iframe {
  position: absolute;
  top: 50%;
  left: 50%;
  width: 100%;
  height: 225%;
  border: 0;
  transform: translate(-50%, -50%);
  pointer-events: none;
  opacity: 0;
  transition: opacity .38s ease;
}

.event-hero.is-video-ready .event-hero-video iframe {
  opacity: 1;
}

.event-hero::after { content: none; }

.event-hero-inner {
  position: relative;
  z-index: 2;
  height: 100%;
  display: flex;
  align-items: flex-end;
  padding-bottom: 12px;
  padding-top: 24px;
}

.event-hero-copy {
  max-width: 980px;
  display: grid;
  gap: 8px;
  transform: translateY(126px);
}

.event-hero-head {
  display: grid;
  gap: 6px;
}

.event-hero-tail {
  display: grid;
  gap: 8px;
  transform: translateY(34px);
}

.event-back {
  color: rgba(255,255,255,.72);
  font-size: 14px;
  text-shadow: 0 2px 10px rgba(0,0,0,.55);
}

.event-back:hover { color: #fff; }

.event-hero-copy h1 {
  margin: 0;
  color: #fff;
  font-size: clamp(2rem, 3.1vw, 2.7rem);
  line-height: 1.14;
  white-space: nowrap;
  text-shadow: 0 4px 16px rgba(0,0,0,.6);
}

.event-hero-copy p {
  margin: 0;
  color: rgba(255,255,255,.82);
  font-size: 18px;
  line-height: 1.42;
  max-width: 720px;
  text-shadow: 0 2px 12px rgba(0,0,0,.55);
}

.event-hero-actions {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
}

.event-cta {
  border: 0;
  border-radius: 999px;
  background: #00d2ff;
  color: #020508;
  font-weight: 700;
  padding: 9px 14px;
  font-size: 14px;
}

.event-price {
  border-radius: 999px;
  border: 0;
  background: rgba(0,0,0,.5);
  color: rgba(255,255,255,.82);
  padding: 8px 11px;
  font-size: 13px;
}

.hero-rail {
  position: absolute;
  right: 24px;
  bottom: 38px;
  z-index: 4;
  display: grid;
  gap: 8px;
  width: min(360px, 90vw);
}

.rail-card {
  border: 1px solid rgba(255,255,255,.15);
  background: rgba(255,255,255,.1);
  backdrop-filter: blur(9px);
  border-radius: 14px;
  padding: 11px 12px;
  color: #fff;
}

.rail-card h4 { margin: 0; font-size: 16px; }
.rail-card p { margin: 4px 0 0; font-size: 12px; color: rgba(255,255,255,.72); }

.event-detail-main {
  padding-top: 196px;
  padding-bottom: 40px;
  position: relative;
  display: block;
}

.event-detail-content {
  display: grid;
  gap: 64px;
}

.detail-subtitle {
  margin: 0 0 22px;
  color: rgba(255,255,255,.76);
  font-size: 18px;
  font-weight: 600;
}

.event-chapters {
  position: absolute;
  right: -360px;
  top: 196px;
  width: 220px;
  z-index: 2;
  will-change: transform;
}

.event-chapters .chapters-nav {
  position: relative;
  top: 0;
}

.chapters-nav {
  position: relative;
  display: grid;
  gap: 18px;
  padding-left: 18px;
  padding-bottom: 24px;
}

.chapters-nav::before {
  content: "";
  position: absolute;
  left: 0;
  top: 2px;
  bottom: -22px;
  width: 1px;
  background: rgba(255,255,255,.24);
}

.chapters-nav a {
  position: relative;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  color: rgba(255,255,255,.58);
  font-size: 14px;
  transition: color .16s ease;
}

.chapters-nav a::before {
  content: "";
  position: absolute;
  left: -19px;
  top: 50%;
  transform: translateY(-50%);
  width: 3px;
  height: 20px;
  border-radius: 3px;
  background: transparent;
  transition: background .16s ease;
}

.chapters-nav a.active {
  color: #fff;
}

.chapters-nav a.active::before {
  background: #fff;
}

.chapter-icon {
  width: 15px;
  height: 15px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex: 0 0 15px;
}

.chapter-icon img {
  width: 15px;
  height: 15px;
  display: block;
  filter: brightness(0) invert(1);
  opacity: .58;
  transition: opacity .16s ease;
}

.chapters-nav a.active .chapter-icon img {
  opacity: 1;
}

.detail-title {
  margin: 0 0 22px;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-size: 22px;
  color: rgba(255,255,255,.92);
}

.detail-title-icon {
  width: 18px;
  height: 18px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex: 0 0 18px;
}

.detail-title-icon img {
  width: 18px;
  height: 18px;
  display: block;
  filter: brightness(0) invert(1);
  opacity: .9;
}

.detail-section h2 {
  margin: 0 0 14px;
  font-size: 22px;
  color: rgba(255,255,255,.92);
}

.news3 {
  display: grid;
  grid-template-columns: repeat(3, minmax(0,1fr));
  gap: 14px;
}

.news-card {
  display: block;
  overflow: hidden;
  border-radius: 10px;
  border: 0;
  background: rgba(0,0,0,.6);
}

.news-card .thumb {
  aspect-ratio: 5 / 2;
  width: 100%;
  overflow: hidden;
}

.news-card .thumb img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.news-card .content {
  padding: 14px;
  display: grid;
  gap: 9px;
}

.news-meta {
  display: flex;
  justify-content: space-between;
  gap: 8px;
  color: rgba(255,255,255,.72);
  font-size: 11px;
}

.news-card h3 {
  margin: 0;
  font-size: 16px;
  color: #fff;
  line-height: 1.3;
}

.news-card p {
  margin: 0;
  color: rgba(255,255,255,.72);
  font-size: 14px;
  line-height: 1.42;
}

.media-layout {
  display: grid;
  grid-template-columns: 1fr 1.45fr;
  gap: 14px;
  align-items: stretch;
}

.media-main {
  overflow: hidden;
  border-radius: 10px;
  border: 0;
  background: rgba(0,0,0,.3);
  aspect-ratio: 16 / 9;
}

.media-main img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.media-main iframe {
  width: 100%;
  height: 100%;
  border: 0;
  display: block;
}

.media-thumbs {
  display: grid;
  grid-template-columns: repeat(3, minmax(0,1fr));
  grid-template-rows: repeat(2, auto);
  gap: 10px;
}

.media-thumb {
  position: relative;
  display: block;
  overflow: hidden;
  border-radius: 10px;
  border: 0;
  background: rgba(255,255,255,.04);
  aspect-ratio: 16 / 9;
}

.media-thumb img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
  transform: scale(1);
  transition: transform .2s ease;
}

.media-thumb:hover img {
  transform: scale(1.03);
}

.media-thumb.more::after {
  content: "";
  position: absolute;
  inset: 0;
  background: rgba(20,20,20,.56);
}

.more-count {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  z-index: 1;
  color: #fff;
  font-size: 18px;
  font-weight: 700;
  letter-spacing: .02em;
}

body.has-gallery-viewer {
  overflow: hidden;
}

.event-gallery-viewer {
  position: fixed;
  inset: 0;
  z-index: 120;
  display: grid;
  place-items: center;
  padding: 20px;
}

.event-gallery-viewer[hidden] {
  display: none;
}

.event-gallery-backdrop {
  position: absolute;
  inset: 0;
  background: rgba(0,0,0,.78);
  backdrop-filter: blur(3px);
}

.event-gallery-inner {
  position: relative;
  width: min(1520px, 100%);
  padding: 0 44px;
  z-index: 1;
}

.event-gallery-media-wrap {
  border-radius: 14px;
  border: 0;
  background: transparent;
  overflow: hidden;
  box-shadow: 0 28px 60px rgba(0,0,0,.58), 0 8px 18px rgba(0,0,0,.42);
}

.event-gallery-media {
  width: 100%;
  max-height: 92vh;
  object-fit: contain;
  display: block;
}

.event-gallery-close-hint {
  position: absolute;
  top: -44px;
  left: 50%;
  transform: translateX(-50%);
  border: 1px solid rgba(255,255,255,.2);
  border-radius: 999px;
  background: rgba(0,0,0,.7);
  color: #fff;
  height: 32px;
  padding: 0 14px;
  font-size: 13px;
  white-space: nowrap;
  cursor: pointer;
}

.event-gallery-nav {
  position: absolute;
  top: 0;
  bottom: 0;
  width: 22%;
  border: 0;
  background: transparent;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  opacity: 0;
  transition: opacity .18s ease;
}

.event-gallery-nav::before {
  content: "";
  position: absolute;
  top: 0;
  bottom: 0;
  width: 100%;
  pointer-events: none;
  opacity: 0;
  transition: opacity .18s ease;
}

.event-gallery-nav.prev {
  left: 0;
  justify-content: flex-start;
  padding-left: 14px;
}

.event-gallery-nav.prev::before {
  left: 0;
  background: linear-gradient(to right, rgba(0,0,0,.48), rgba(0,0,0,0));
}

.event-gallery-nav.next {
  right: 0;
  justify-content: flex-end;
  padding-right: 14px;
}

.event-gallery-nav.next::before {
  right: 0;
  background: linear-gradient(to left, rgba(0,0,0,.48), rgba(0,0,0,0));
}

.event-gallery-nav img {
  width: 34px;
  height: 34px;
  display: block;
  filter: brightness(0) invert(1);
  opacity: .92;
  transform: translateX(-14px);
  transition: transform .18s ease, opacity .18s ease;
}

.event-gallery-nav.next img {
  transform: translateX(14px);
}

.event-gallery-media-wrap:hover .event-gallery-nav {
  opacity: 1;
}

.event-gallery-nav:hover::before {
  opacity: 1;
}

.event-gallery-nav:hover img {
  transform: translateX(0);
  opacity: 1;
}

@media (max-width: 980px) {
  .event-gallery-inner {
    padding: 0 12px;
  }

  .event-gallery-nav {
    width: 26%;
  }

  .event-gallery-nav.prev { padding-left: 10px; }
  .event-gallery-nav.next { padding-right: 10px; }

  .event-gallery-nav img {
    width: 30px;
    height: 30px;
  }

  .event-gallery-close-hint {
    top: -38px;
    font-size: 12px;
    height: 28px;
    padding: 0 10px;
  }
}

.desc-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 14px;
  align-items: center;
  border-radius: 16px;
  border: 0;
  background: rgba(0,0,0,.6);
  padding: 18px;
}

.desc-grid h3 {
  margin: 0 0 12px;
  color: #fff;
  font-size: 30px;
}

.desc-grid p {
  margin: 0;
  color: rgba(255,255,255,.72);
  line-height: 1.6;
  white-space: pre-line;
}

.desc-image {
  width: 100%;
  min-height: 260px;
  border-radius: 10px;
  overflow: hidden;
  border: 0;
}

.desc-image img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.modpack-wrap {
  border-radius: 24px;
  border: 0;
  background: rgba(0,0,0,.6);
  padding: 18px;
  display: grid;
  gap: 14px;
}

.modpack-top {
  display: grid;
  grid-template-columns: 1.1fr 1fr;
  gap: 16px;
  align-items: stretch;
}

.modpack-intro {
  display: grid;
  gap: 4px;
}

.modpack-kicker {
  display: block;
  width: fit-content;
  border: 0;
  background: transparent;
  color: rgba(255,255,255,.74);
  font-size: 11px;
  letter-spacing: .12em;
  text-transform: uppercase;
  padding: 0;
}

.modpack-intro h3 {
  margin: 0;
  color: #fff;
  font-size: 24px;
  line-height: 1.2;
}

.modpack-intro h3 span {
  color: var(--event-accent, #00d26a);
}

.modpack-intro p {
  margin: 0;
  color: rgba(255,255,255,.7);
  font-size: 14px;
  line-height: 1.5;
  max-width: 44ch;
  text-align: justify;
  text-align-last: left;
  -webkit-hyphens: auto;
  -ms-hyphens: auto;
  hyphens: auto;
  overflow-wrap: normal;
  word-break: normal;
}

.modpack-actions {
  display: grid;
  grid-template-columns: 1fr;
  gap: 12px;
}

.modpack-action-card {
  display: grid;
  gap: 0;
  border-radius: 12px;
  border: 0;
  background: linear-gradient(165deg, rgba(255,255,255,.07), rgba(255,255,255,.03));
  padding: 0;
  overflow: hidden;
  min-height: 72px;
  transition: background .18s ease;
}

.modpack-action-card:hover {
  background: linear-gradient(
    165deg,
    color-mix(in srgb, var(--event-accent, #00d26a) 18%, rgba(255,255,255,.07)),
    rgba(255,255,255,.03)
  );
}

.modpack-action-main {
  display: flex;
  align-items: stretch;
  justify-content: space-between;
  gap: 10px;
}

.modpack-action-left {
  display: flex;
  align-items: stretch;
  gap: 12px;
  min-width: 0;
  flex: 1 1 auto;
}

.modpack-action-media {
  width: 72px;
  aspect-ratio: 1 / 1;
  overflow: hidden;
  border-radius: 10px;
  flex: 0 0 72px;
}

.modpack-action-media img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.modpack-action-copy {
  display: grid;
  gap: 2px;
  padding: 7px 0;
  min-width: 0;
}

.modpack-action-tag {
  display: none;
  align-items: center;
  width: fit-content;
  border-radius: 999px;
  border: 0;
  background: rgba(0,210,255,.12);
  color: #95ebff;
  font-size: 11px;
  letter-spacing: .08em;
  text-transform: uppercase;
  padding: 4px 10px;
}

.modpack-action-card h4 {
  margin: 0;
  color: #fff;
  font-size: 14px;
  line-height: 1.2;
}

.modpack-action-meta {
  color: rgba(255,255,255,.58);
  font-size: 11px;
  white-space: nowrap;
}

.modpack-action-tools {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  margin: auto 12px auto 0;
}

.modpack-action-info {
  width: 24px;
  height: 24px;
  border-radius: 999px;
  border: 0;
  background: rgba(0,210,255,.22);
  color: #9cecff;
  font-size: 13px;
  font-weight: 700;
  line-height: 1;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
}

.modpack-action-info:hover {
  background: rgba(0,210,255,.34);
}

.modpack-action-download {
  width: 24px;
  height: 24px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex: 0 0 24px;
  position: relative;
  color: rgba(255,255,255,.84);
  transition: color .16s ease;
}

.modpack-action-download img {
  width: 24px;
  height: 24px;
  display: block;
  opacity: 0;
}

.modpack-action-download::before {
  content: "";
  position: absolute;
  inset: 0;
  background: currentColor;
  -webkit-mask-image: url('/assets/icons/google/download.svg');
  mask-image: url('/assets/icons/google/download.svg');
  -webkit-mask-repeat: no-repeat;
  mask-repeat: no-repeat;
  -webkit-mask-position: center;
  mask-position: center;
  -webkit-mask-size: contain;
  mask-size: contain;
}

.modpack-action-download:hover {
  color: var(--event-accent, #00d26a);
}

.modpack-action-info-panel {
  max-height: 0;
  opacity: 0;
  overflow: hidden;
  color: rgba(255,255,255,.74);
  font-size: 12px;
  line-height: 1.45;
  padding: 0 12px;
  border-top: 1px solid rgba(255,255,255,.08);
  transition: max-height .25s ease, opacity .2s ease, padding .2s ease;
}

.modpack-action-card.is-open .modpack-action-info-panel {
  max-height: 170px;
  opacity: 1;
  padding: 10px 12px 12px;
}

.modpack-list {
  counter-reset: modpack-item;
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
  margin-top: 10px;
}

.modpack-card {
  counter-increment: modpack-item;
  display: flex;
  align-items: stretch;
  justify-content: space-between;
  gap: 10px;
  border-radius: 12px;
  border: 0;
  background: rgba(255,255,255,.05);
  padding: 0;
  overflow: hidden;
  position: relative;
  transition: background .16s ease;
}

.modpack-card::after {
  content: "Nr. " counter(modpack-item);
  position: absolute;
  right: 48px;
  top: 50%;
  transform: translateY(-50%);
  width: 54px;
  text-align: left;
  color: rgba(255,255,255,.44);
  font-size: 11px;
  font-weight: 500;
  letter-spacing: .02em;
  font-variant-numeric: tabular-nums;
  white-space: nowrap;
}

.modpack-card:hover {
  background: color-mix(in srgb, var(--event-accent, #00d26a) 13%, rgba(255,255,255,.05));
}

.modpack-left {
  display: flex;
  align-items: stretch;
  gap: 12px;
  min-width: 0;
  flex: 1 1 auto;
}

.modpack-icon {
  width: 72px;
  height: auto;
  aspect-ratio: 1 / 1;
  border-radius: 0 10px 10px 0;
  overflow: hidden;
  border: 0;
  flex: 0 0 72px;
}

.modpack-icon img { width: 100%; height: 100%; object-fit: cover; }
.modpack-meta {
  min-width: 0;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0 0;
  padding: 4px 0;
}
.modpack-name {
  color: #fff;
  font-size: 14px;
  font-weight: 600;
  line-height: 1.05;
  display: flex;
  align-items: baseline;
}
.modpack-name { flex: 0 0 100%; }
.modpack-version {
  flex: 0 0 220px;
  color: rgba(255,255,255,.62);
  font-size: 12px;
  line-height: 1.05;
  margin-top: 0;
  white-space: nowrap;
  padding-right: 10px;
}
.modpack-updated {
  flex: 0 0 175px;
  color: rgba(255,255,255,.52);
  font-size: 12px;
  line-height: 1.05;
  margin-top: 0;
  white-space: nowrap;
  padding: 0 10px;
}
.modpack-updated::before {
  content: "";
  display: inline-block;
  width: 1px;
  height: 11px;
  margin-right: 10px;
  vertical-align: -1px;
  background: rgba(255,255,255,.28);
}
.modpack-fresh {
  flex: 0 0 110px;
  color: #36d278;
  font-size: 12px;
  line-height: 1.15;
  white-space: nowrap;
  padding-left: 10px;
}
.modpack-fresh::before {
  content: "";
  display: inline-block;
  width: 1px;
  height: 11px;
  margin-right: 10px;
  vertical-align: -1px;
  background: rgba(255,255,255,.28);
}

.modpack-download {
  border: 0;
  background: transparent;
  color: rgba(255,255,255,.85);
  width: 24px;
  height: 24px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  margin: auto 12px auto 0;
  padding: 0;
  position: relative;
  transition: color .16s ease;
}

.modpack-download img {
  width: 24px;
  height: 24px;
  display: block;
  opacity: 0;
}

.modpack-download::before {
  content: "";
  position: absolute;
  inset: 0;
  background: currentColor;
  -webkit-mask-image: url('/assets/icons/google/download.svg');
  mask-image: url('/assets/icons/google/download.svg');
  -webkit-mask-repeat: no-repeat;
  mask-repeat: no-repeat;
  -webkit-mask-position: center;
  mask-position: center;
  -webkit-mask-size: contain;
  mask-size: contain;
}

.modpack-download:hover {
  color: var(--event-accent, #00d26a);
}

.sain-shell-wrap {
  padding-top: 82px;
  padding-bottom: 16px;
}

/* Sain.ID palette: dark container shells + lighter inner cards */
body[data-active="sain-id"] {
  --sain-shell-bg: #0a0a0a;
  --sain-surface-soft: rgba(255,255,255,.05);
  --sain-surface-soft-strong: rgba(255,255,255,.08);
  --sain-line-soft: rgba(255,255,255,.12);
}

/* Sain.ID area should use the full viewport width (sidebar flush-left). */
body[data-active="sain-id"] .mx.sain-shell-wrap {
  --sain-top-gap: 16px;
  --sain-bottom-gap: 16px;
  width: 90%;
  max-width: none;
  margin: 0 auto;
  padding-left: 0;
  padding-right: 0;
  padding-top: calc(64px + var(--sain-top-gap));
  padding-bottom: var(--sain-bottom-gap);
}

/* Admin area should use full available width (from sidebars to right edge). */
body[data-sain-active^="admin-"] .mx.sain-shell-wrap {
  width: 100%;
  margin: 0;
  max-width: none;
  padding-left: 12px;
  padding-right: 12px;
  padding-top: 6px;
  padding-bottom: 10px;
}

/* Neutralize generic section top padding for Sain.ID shell pages. */
body[data-active="sain-id"] .page-main > .sain-shell-wrap:first-child {
  padding-top: calc(64px + var(--sain-top-gap, 16px));
  padding-bottom: var(--sain-bottom-gap, 16px);
}

/* Admin pages should sit directly under the fixed header line without extra top gap. */
body[data-sain-active^="admin-"] .page-main > .sain-shell-wrap:first-child {
  padding-top: 6px;
  padding-bottom: 10px;
}

.sain-shell {
  display: grid;
  grid-template-columns: 250px minmax(0, 1fr);
  gap: 12px;
  height: calc(100vh - 64px - var(--sain-top-gap, 16px) - var(--sain-bottom-gap, 16px));
}

.sain-sidebar {
  position: sticky;
  top: calc(64px + var(--sain-top-gap, 16px));
  align-self: start;
  height: 100%;
  max-height: 100%;
  display: flex;
  flex-direction: column;
  overflow-y: auto;
  background: var(--sain-shell-bg, #0a0a0a);
  border: 0;
  border-radius: 22px;
  padding: 12px 10px;
}

.sain-profile-pill {
  display: flex;
  align-items: center;
  gap: 10px;
  height: 32px;
  border-radius: 16px;
  background: var(--sain-surface-soft, rgba(255,255,255,.05));
  padding: 0 8px 0 2px;
  overflow: hidden;
}

.sain-profile-pill .avatar {
  width: 28px;
  height: 28px;
  border-radius: 999px;
  object-fit: cover;
}

.sain-profile-pill .name {
  font-size: 14px;
  color: #fff;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.sain-profile-pill .acc {
  margin-left: auto;
  padding-left: 8px;
  border-left: 1px solid rgba(255,255,255,.28);
  color: rgba(255,255,255,.8);
  font-size: 14px;
}

.sain-nav {
  margin-top: 12px;
  display: grid;
  gap: 4px;
  flex: 1 1 auto;
  align-content: start;
}

.sain-nav-group {
  display: grid;
  gap: 4px;
}

.sain-nav-group[hidden] {
  display: none;
}

.sain-nav-label {
  padding: 2px 10px 4px;
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: .14em;
  color: rgba(255,255,255,.4);
}

.sain-nav a {
  display: flex;
  align-items: center;
  gap: 10px;
  border-radius: 12px;
  padding: 10px 10px;
  color: rgba(255,255,255,.56);
  font-size: 14px;
  transition: background .15s ease, color .15s ease;
}
.sain-nav a .nav-ico {
  width: 18px;
  height: 18px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  line-height: 1;
  flex: 0 0 18px;
  text-align: center;
}
.sain-nav a .nav-ico img {
  width: 18px;
  height: 18px;
  display: block;
  opacity: .88;
  filter: brightness(0) invert(1);
  transition: opacity .15s ease, filter .15s ease;
}

.sain-nav .nav-ico.icon-mask-ready::before,
.sain-nav-bottom-item .nav-ico.icon-mask-ready::before {
  content: none;
}

.sain-nav a:hover {
  background: rgba(0,210,255,.12);
  color: #00d2ff;
}
.sain-nav a:hover .nav-ico img {
  opacity: 1;
  filter: brightness(0) saturate(100%) invert(73%) sepia(88%) saturate(3147%) hue-rotate(151deg) brightness(101%) contrast(101%);
}
.sain-nav a.active {
  color: #00d2ff;
  background: rgba(0,210,255,.12);
}
.sain-nav a.active .nav-ico img {
  opacity: 1;
  filter: brightness(0) saturate(100%) invert(73%) sepia(88%) saturate(3147%) hue-rotate(151deg) brightness(101%) contrast(101%);
}

.sain-nav a.sain-nav-test-link {
  color: #facc15;
  background: rgba(250, 204, 21, .10);
}

.sain-nav a.sain-nav-test-link .nav-ico img {
  opacity: 1;
  filter: brightness(0) saturate(100%) invert(90%) sepia(40%) saturate(2334%) hue-rotate(336deg) brightness(103%) contrast(98%);
}

.sain-nav a.sain-nav-test-link:hover,
.sain-nav a.sain-nav-test-link.active {
  color: #fde68a;
  background: rgba(250, 204, 21, .18);
}

.sain-nav a.sain-nav-test-link:hover .nav-ico img,
.sain-nav a.sain-nav-test-link.active .nav-ico img {
  opacity: 1;
  filter: brightness(0) saturate(100%) invert(90%) sepia(40%) saturate(2334%) hue-rotate(336deg) brightness(103%) contrast(98%);
}

.sain-nav-bottom-item {
  display: flex;
  align-items: center;
  gap: 10px;
  border-radius: 12px;
  padding: 10px 10px;
  color: rgba(255,255,255,.56);
  font-size: 14px;
  border: 0;
  background: transparent;
  cursor: pointer;
  text-align: left;
  transition: background .15s ease, color .15s ease;
}

.sain-nav-bottom-item .nav-ico {
  width: 18px;
  height: 18px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  line-height: 1;
  flex: 0 0 18px;
}

.sain-nav-bottom-item .nav-ico img {
  width: 18px;
  height: 18px;
  display: block;
  opacity: .88;
  filter: brightness(0) invert(1);
  transition: opacity .15s ease, filter .15s ease;
}

.sain-nav-bottom-item:hover {
  background: rgba(0,210,255,.12);
  color: #00d2ff;
}
.sain-nav-bottom-item:hover .nav-ico img {
  opacity: 1;
  filter: brightness(0) saturate(100%) invert(73%) sepia(88%) saturate(3147%) hue-rotate(151deg) brightness(101%) contrast(101%);
}

.sain-nav-bottom-item.active {
  color: #00d2ff;
  background: rgba(0,210,255,.12);
}
.sain-nav-bottom-item.active .nav-ico img {
  opacity: 1;
  filter: brightness(0) saturate(100%) invert(73%) sepia(88%) saturate(3147%) hue-rotate(151deg) brightness(101%) contrast(101%);
}

.sain-side-bottom {
  margin-top: auto;
  padding-top: 12px;
  display: grid;
  gap: 8px;
  border-top: 1px solid rgba(255,255,255,.12);
}

.sain-main {
  border-radius: 22px;
  border: 0;
  background: var(--sain-shell-bg, #0a0a0a);
  backdrop-filter: blur(8px);
  padding: 20px;
  height: 100%;
  overflow-y: auto;
  overscroll-behavior-y: contain;
  scrollbar-gutter: stable;
  scrollbar-color: rgba(255,255,255,.44) transparent;
}

.sain-main::-webkit-scrollbar {
  width: 10px;
}

.sain-main::-webkit-scrollbar-track {
  background: transparent;
  margin: 12px 0;
  border-radius: 999px;
}

.sain-main::-webkit-scrollbar-thumb {
  background: rgba(255,255,255,.44);
  border-radius: 999px;
  border: 2px solid transparent;
  background-clip: padding-box;
}

.sain-main::-webkit-scrollbar-thumb:hover {
  background: rgba(255,255,255,.62);
  background-clip: padding-box;
}

.sain-main > * {
  width: 100%;
  max-width: none;
}

.sain-legacy-stack {
  display: grid;
  gap: 16px;
}

.sain-simple-page {
  display: grid;
  gap: 8px;
}

.sain-simple-page h1 {
  margin: 0;
  font-size: 22px;
  color: #fff;
}

.sain-simple-page p {
  margin: 0;
  color: rgba(255,255,255,.6);
  font-size: 14px;
}

.sain-card-grid {
  display: grid;
  gap: 16px;
}

.sain-card-grid.two-col {
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

.sain-rich-card {
  position: relative;
  overflow: hidden;
  border-radius: 16px;
  border: 1px solid rgba(255,255,255,.1);
  background: var(--sain-surface-soft, rgba(255,255,255,.05));
  box-shadow: 0 18px 40px rgba(0,0,0,.5);
}

.sain-rich-card .cover {
  height: 148px;
  background-size: cover;
  background-position: center;
}

.sain-rich-card .overlay {
  position: absolute;
  inset: 0;
  background: radial-gradient(circle at 0 0, rgba(0,210,255,.12), transparent 45%), radial-gradient(circle at 100% 0, rgba(255,0,128,.12), transparent 45%);
  pointer-events: none;
}

.sain-rich-card .body {
  position: relative;
  padding: 16px 18px;
  display: grid;
  gap: 11px;
}

.sain-rich-card h3 {
  margin: 0;
  color: #fff;
  font-size: 20px;
  line-height: 1.25;
}

.sain-rich-card p {
  margin: 0;
  color: rgba(255,255,255,.72);
  font-size: 14px;
  line-height: 1.45;
}

.sain-pill-row {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.sain-pill {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  border-radius: 10px;
  font-size: 13px;
  font-weight: 600;
  padding: 7px 11px;
}

.sain-pill.coins { background: #00d2ff; color: #000; }
.sain-pill.euro {
  border: 1px solid #ff2f92;
  color: #ff5fa8;
  background: transparent;
}

.sain-status-dot {
  width: 11px;
  height: 11px;
  border-radius: 999px;
  display: inline-block;
}

.sain-status-dot.online { background: #00d976; }
.sain-status-dot.pending { background: #f5a524; }
.sain-status-dot.failed { background: #ff4d6d; }
.sain-status-dot.completed { background: #00d976; }

.sain-row-line {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  color: rgba(255,255,255,.72);
  font-size: 13px;
}

.sain-row-line strong {
  color: rgba(255,255,255,.95);
  font-weight: 600;
}

.embed-library {
  gap: 18px;
}

.embed-library-head {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 14px;
}

.embed-library-filters {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.embed-filter-chip {
  border-radius: 10px;
  border: 1px solid rgba(255,255,255,.14);
  background: rgba(255,255,255,.04);
  color: rgba(255,255,255,.8);
  font-size: 12px;
  font-weight: 600;
  padding: 7px 12px;
}

.embed-filter-chip.is-active {
  border-color: rgba(0,210,255,.38);
  color: #fff;
  background: rgba(0,210,255,.13);
}

.embed-folders {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 12px;
}

.embed-folder-card {
  appearance: none;
  width: 100%;
  text-align: left;
  border-radius: 14px;
  border: 1px solid rgba(255,255,255,.12);
  background: rgba(255,255,255,.04);
  padding: 14px;
  display: grid;
  gap: 8px;
  cursor: pointer;
  transition: border-color .16s ease, background .16s ease, transform .16s ease;
}

.embed-folder-card:hover {
  border-color: rgba(255,255,255,.22);
  background: rgba(255,255,255,.06);
}

.embed-folder-card.is-active {
  border-color: rgba(0,210,255,.38);
  background: rgba(0,210,255,.12);
  transform: translateY(-1px);
}

.embed-folder-card h3 {
  margin: 0;
  color: #fff;
  font-size: 17px;
}

.embed-folder-card p {
  margin: 0;
  color: rgba(255,255,255,.62);
  font-size: 12px;
}

.embed-folder-meta {
  color: rgba(255,255,255,.45);
  font-size: 11px;
  letter-spacing: .08em;
  text-transform: uppercase;
}

.embed-folder-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}

.embed-folder-tags span {
  border-radius: 8px;
  background: rgba(255,255,255,.07);
  color: rgba(255,255,255,.74);
  font-size: 11px;
  padding: 5px 8px;
}

.embed-list-head {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 10px;
  color: rgba(255,255,255,.8);
  font-size: 13px;
}

.embed-list-head a {
  color: #00d2ff;
  font-size: 12px;
  font-weight: 600;
}

.embed-item-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 12px;
}

.embed-item-card {
  border-radius: 14px;
  border: 1px solid rgba(255,255,255,.12);
  background: rgba(255,255,255,.04);
  padding: 14px;
  display: grid;
  gap: 10px;
  transition: border-color .16s ease, background .16s ease, transform .16s ease;
}

.embed-item-card:hover {
  border-color: rgba(0,210,255,.38);
  background: rgba(255,255,255,.06);
  transform: translateY(-1px);
}

.embed-item-top {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 10px;
}

.embed-item-top h3 {
  margin: 0;
  color: #fff;
  font-size: 15px;
}

.embed-item-type {
  border-radius: 999px;
  background: rgba(0,210,255,.15);
  color: #9defff;
  font-size: 11px;
  padding: 4px 8px;
  white-space: nowrap;
}

.embed-item-card p {
  margin: 0;
  color: rgba(255,255,255,.62);
  font-size: 12px;
  line-height: 1.45;
}

.embed-item-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}

.embed-item-tags span {
  border-radius: 8px;
  background: rgba(255,255,255,.07);
  color: rgba(255,255,255,.74);
  font-size: 11px;
  padding: 4px 7px;
}

.embed-editor-shell {
  display: grid;
  grid-template-rows: auto auto 1fr;
  gap: 10px;
  height: 100%;
  flex: 1 1 auto;
  min-height: 0;
}

.embed-editor-meta {
  display: grid;
  grid-template-columns: 140px 140px minmax(240px, 1fr) auto auto auto;
  gap: 10px;
  align-items: center;
}

.embed-meta-pill,
.embed-target-pill {
  border-radius: 10px;
  border: 1px solid rgba(255,255,255,.14);
  background: rgba(255,255,255,.06);
  color: #fff;
  height: 40px;
  padding: 0 12px;
  text-align: left;
  font-size: 13px;
  cursor: pointer;
}

.embed-meta-name {
  border-radius: 10px;
  border: 1px solid rgba(255,255,255,.14);
  background: rgba(255,255,255,.06);
  color: #fff;
  height: 40px;
  padding: 0 12px;
  font-size: 13px;
}

.embed-target-controls {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
}

.embed-target-switch {
  width: 36px;
  height: 21px;
  position: relative;
  display: inline-block;
}

.embed-target-switch input {
  opacity: 0;
  width: 0;
  height: 0;
}

.embed-target-switch span {
  position: absolute;
  inset: 0;
  background: rgba(255,255,255,.2);
  border-radius: 999px;
}

.embed-target-switch span::after {
  content: "";
  position: absolute;
  width: 15px;
  height: 15px;
  left: 3px;
  top: 3px;
  border-radius: 999px;
  background: #fff;
  transition: transform .14s ease;
}

.embed-target-switch input:checked + span {
  background: rgba(0,210,255,.45);
}

.embed-target-switch input:checked + span::after {
  transform: translateX(15px);
}

.embed-save-btn {
  border: 0;
  border-radius: 10px;
  background: #00ff4f;
  color: #02160a;
  height: 40px;
  padding: 0 16px;
  font-weight: 700;
  cursor: pointer;
}

.embed-target-select {
  border-radius: 9px;
  border: 1px solid rgba(255,255,255,.14);
  background: rgba(255,255,255,.06);
  color: #fff;
  height: 34px;
  padding: 0 10px;
  font-size: 12px;
  min-width: 148px;
  color-scheme: dark;
}

.embed-target-select option {
  background: #0f1116;
  color: rgba(255,255,255,.9);
}

.embed-meta-menu {
  position: fixed;
  z-index: 1800;
  width: min(320px, 88vw);
  border-radius: 12px;
  border: 1px solid rgba(255,255,255,.14);
  background: #12161d;
  box-shadow: 0 14px 34px rgba(0,0,0,.42);
  padding: 10px;
  display: grid;
  gap: 10px;
}

.embed-meta-menu-title {
  color: rgba(255,255,255,.78);
  font-size: 12px;
  letter-spacing: .08em;
  text-transform: uppercase;
}

.embed-meta-menu-list {
  max-height: 220px;
  overflow-y: auto;
  display: grid;
  gap: 7px;
}

.embed-meta-menu-item {
  width: 100%;
  border: 1px solid rgba(255,255,255,.14);
  border-radius: 8px;
  background: rgba(255,255,255,.05);
  color: rgba(255,255,255,.84);
  min-height: 34px;
  text-align: left;
  padding: 0 10px;
  font-size: 13px;
}

.embed-meta-menu-item.is-active {
  border-color: rgba(0,210,255,.48);
  background: rgba(0,210,255,.16);
  color: #fff;
}

.embed-meta-menu-check {
  display: flex;
  align-items: center;
  gap: 8px;
  border: 1px solid rgba(255,255,255,.12);
  border-radius: 8px;
  background: rgba(255,255,255,.04);
  min-height: 34px;
  padding: 0 10px;
  color: rgba(255,255,255,.84);
  font-size: 13px;
}

.embed-meta-menu-check input {
  accent-color: #00d2ff;
}

.embed-meta-menu-create {
  border: 1px dashed rgba(255,255,255,.22);
  border-radius: 8px;
  background: rgba(255,255,255,.03);
  color: rgba(255,255,255,.82);
  min-height: 34px;
  text-align: left;
  padding: 0 10px;
  font-size: 13px;
}

.embed-target-search {
  border-radius: 9px;
  border: 1px solid rgba(255,255,255,.14);
  background: rgba(255,255,255,.06);
  color: #fff;
  height: 34px;
  padding: 0 10px;
  font-size: 12px;
}

.embed-editor-locales {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.embed-canvas-toolbar {
  margin-bottom: 8px;
  display: flex;
  align-items: center;
  justify-content: flex-start;
  gap: 10px;
}

.embed-canvas-toolbar-main {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px;
}

.embed-editor-locales-inline {
  margin-left: 0;
  justify-content: flex-start;
}

.embed-editor-locales button,
.embed-canvas-toolbar-main button {
  border: 1px solid rgba(255,255,255,.14);
  border-radius: 8px;
  background: rgba(255,255,255,.06);
  color: rgba(255,255,255,.82);
  font-size: 12px;
  height: 30px;
  padding: 0 10px;
}

.embed-editor-locales button.is-active {
  border-color: rgba(0,210,255,.42);
  background: rgba(0,210,255,.17);
  color: #fff;
}

.embed-canvas-toolbar-main button[data-format='bold'],
.embed-canvas-toolbar-main button[data-format='italic'],
.embed-canvas-toolbar-main button[data-format='underline'],
.embed-canvas-toolbar-main button[data-format='strike'] {
  width: 30px;
  padding: 0;
  font-weight: 700;
}

.embed-canvas-toolbar-main button[data-format='italic'] { font-style: italic; }
.embed-canvas-toolbar-main button[data-format='underline'] { text-decoration: underline; }
.embed-canvas-toolbar-main button[data-format='strike'] { text-decoration: line-through; }

.embed-canvas-toolbar-main button.is-active {
  border-color: rgba(0,210,255,.45);
  background: rgba(0,210,255,.18);
  color: #fff;
}

.embed-floating-format {
  position: fixed;
  z-index: 1200;
  display: inline-flex;
  align-items: center;
  gap: 2px;
  border: 1px solid rgba(255,255,255,.16);
  background: rgba(14,16,22,.95);
  backdrop-filter: blur(8px);
  border-radius: 10px;
  padding: 4px;
  box-shadow: 0 10px 24px rgba(0,0,0,.34);
}

.embed-floating-format[hidden] {
  display: none !important;
}

.embed-floating-format button {
  border: 0;
  background: transparent;
  color: rgba(255,255,255,.78);
  font-size: 12px;
  height: 26px;
  min-width: 26px;
  border-radius: 6px;
  padding: 0 8px;
}

.embed-floating-format button[data-format='bold'],
.embed-floating-format button[data-format='italic'],
.embed-floating-format button[data-format='underline'],
.embed-floating-format button[data-format='strike'] {
  width: 26px;
  min-width: 26px;
  padding: 0;
  font-weight: 700;
}

.embed-floating-format button[data-format='italic'] { font-style: italic; }
.embed-floating-format button[data-format='underline'] { text-decoration: underline; }
.embed-floating-format button[data-format='strike'] { text-decoration: line-through; }

.embed-floating-sep {
  display: inline-block;
  width: 1px;
  height: 20px;
  margin: 0 4px;
  background: rgba(255,255,255,.18);
}

.embed-floating-format button:hover {
  background: rgba(255,255,255,.1);
  color: #fff;
}

.embed-floating-format button.is-active {
  background: rgba(0,210,255,.18);
  color: #fff;
}

.embed-editor-layout {
  display: grid;
  grid-template-columns: minmax(0, 1.08fr) minmax(0, .92fr);
  gap: 12px;
  min-height: 0;
  height: 100%;
}

.embed-canvas-panel,
.embed-preview-panel {
  border-radius: 14px;
  border: 1px solid rgba(255,255,255,.12);
  background: rgba(255,255,255,.03);
  padding: 12px;
  min-height: 0;
  height: 100%;
}

.embed-palette {
  display: grid;
  align-content: start;
  gap: 10px;
  overflow-y: auto;
}

.embed-palette-group {
  display: grid;
  gap: 8px;
}

.embed-palette-group button {
  border: 1px solid rgba(255,255,255,.12);
  border-radius: 8px;
  background: rgba(0,0,0,.35);
  color: rgba(255,255,255,.9);
  font-size: 12px;
  height: 36px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 10px;
  cursor: grab;
}

.embed-palette-group button span {
  width: 17px;
  height: 17px;
  border-radius: 999px;
  background: rgba(255,255,255,.16);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 10px;
}

.embed-palette-sep {
  height: 1px;
  background: rgba(255,255,255,.14);
  margin: 4px 0;
}

.embed-canvas {
  border-radius: 12px;
  border: 1px dashed rgba(255,255,255,.2);
  min-height: 100%;
  height: 100%;
  background: rgba(0,0,0,.35);
  padding: 12px;
  display: grid;
  align-content: start;
  gap: 10px;
  overflow-y: auto;
}

.embed-canvas.is-drop {
  border-color: rgba(0,210,255,.45);
  background: rgba(0,210,255,.08);
}

.embed-canvas-empty {
  color: rgba(255,255,255,.5);
  font-size: 12px;
}

.embed-canvas-block {
  border-radius: 10px;
  border: 1px solid rgba(255,255,255,.1);
  background: rgba(0,0,0,.34);
  padding: 8px 10px;
  display: grid;
  gap: 0;
  cursor: grab;
}

.embed-canvas-block.is-snap-target {
  border-color: rgba(0,210,255,.5);
  box-shadow: inset 0 0 0 1px rgba(0,210,255,.22);
}

.embed-block-ui {
  display: grid;
  grid-template-columns: 28px minmax(0, 1fr) 28px;
  align-items: center;
  gap: 8px;
}

.embed-block-main {
  display: grid;
  gap: 8px;
}

.embed-block-label-inline {
  color: rgba(255,255,255,.6);
  font-size: 10px;
  letter-spacing: .08em;
  text-transform: uppercase;
  line-height: 1;
}

.icon-btn {
  width: 24px;
  height: 24px;
  border: 0;
  border-radius: 7px;
  background: transparent;
  color: rgba(255,255,255,.6);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0;
}

.icon-btn svg {
  width: 18px;
  height: 18px;
  display: block;
}

.icon-btn img {
  width: 18px;
  height: 18px;
  display: block;
  filter: brightness(0) invert(1);
  opacity: .85;
}

.embed-block-grip { cursor: grab; }

.icon-btn:hover {
  background: rgba(255,255,255,.08);
  color: rgba(255,255,255,.9);
}

.icon-btn:hover img {
  opacity: 1;
}

.embed-media-drop {
  border: 1px dashed rgba(255,255,255,.24);
  border-radius: 8px;
  background: rgba(255,255,255,.03);
  min-height: 82px;
  display: grid;
  place-items: center;
  gap: 4px;
  padding: 10px;
  cursor: pointer;
}

.embed-media-drop.is-drop {
  border-color: rgba(0,210,255,.45);
  background: rgba(0,210,255,.08);
}

.embed-media-drop-icon {
  font-size: 18px;
  line-height: 1;
}

.embed-media-drop-copy {
  color: rgba(255,255,255,.72);
  font-size: 11px;
}

.embed-media-drop input[type='text'] {
  width: 100%;
  margin-top: 3px;
}

.embed-color-editor {
  display: grid;
  gap: 8px;
}

.embed-color-row {
  display: grid;
  grid-template-columns: 44px 1fr;
  gap: 8px;
}

.embed-color-row input[type='color'] {
  width: 44px;
  height: 32px;
  padding: 0;
  border: 1px solid rgba(255,255,255,.16);
  border-radius: 8px;
  background: rgba(0,0,0,.35);
}

.embed-color-swatches {
  display: flex;
  flex-wrap: wrap;
  gap: 7px;
}

.embed-color-swatches button {
  width: 18px;
  height: 18px;
  border-radius: 999px;
  border: 1px solid rgba(255,255,255,.3);
  padding: 0;
}

.embed-compact-grid {
  display: grid;
  gap: 8px;
}

.embed-compact-grid.two {
  grid-template-columns: 1fr 1fr;
}

.embed-message-card {
  border-radius: 0;
  border: 0;
  background: transparent;
  padding: 4px 0 8px;
  display: grid;
  gap: 8px;
  cursor: grab;
}

.embed-message-card.is-drop {
  background: transparent;
}

.embed-message-sep {
  display: flex;
  align-items: center;
  gap: 10px;
  min-height: 28px;
}

.embed-message-title {
  color: rgba(255,255,255,.74);
  font-size: 11px;
  letter-spacing: .08em;
  text-transform: uppercase;
  white-space: nowrap;
}

.embed-message-line {
  flex: 1;
  height: 1px;
  background: rgba(255,255,255,.16);
}

.embed-message-card.is-drop .embed-message-line {
  height: 2px;
  background: rgba(0,210,255,.7);
}

.embed-message-blocks {
  border: 0;
  background: transparent;
  padding: 0;
  margin: 0;
  display: grid;
  gap: 8px;
}

.embed-message-add {
  justify-self: start;
  border: 1px solid rgba(255,255,255,.14);
  border-radius: 8px;
  background: rgba(255,255,255,.06);
  color: rgba(255,255,255,.82);
  height: 28px;
  padding: 0 10px;
  font-size: 11px;
}

.embed-canvas-block-head {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 10px;
}

.embed-canvas-block-head strong {
  color: #fff;
  font-size: 12px;
  text-transform: capitalize;
}

.embed-canvas-block-head button {
  border: 0;
  background: transparent;
  color: rgba(255,255,255,.56);
  font-size: 12px;
}

.embed-canvas-block input,
.embed-canvas-block textarea {
  width: 100%;
  border-radius: 8px;
  border: 1px solid rgba(255,255,255,.1);
  background: rgba(0,0,0,.35);
  color: #fff;
  font-size: 12px;
  padding: 8px 10px;
}

.embed-canvas-block textarea {
  min-height: 90px;
  resize: vertical;
}

.embed-fields-editor {
  display: grid;
  gap: 8px;
}

.embed-field-row {
  display: grid;
  grid-template-columns: 1fr 1fr auto auto;
  gap: 8px;
  align-items: center;
}

.embed-field-row label {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  color: rgba(255,255,255,.72);
  font-size: 11px;
}

.embed-field-row button {
  border: 1px solid rgba(255,255,255,.14);
  border-radius: 8px;
  background: rgba(255,255,255,.08);
  color: rgba(255,255,255,.8);
  height: 30px;
  padding: 0 9px;
  font-size: 11px;
}

.embed-field-add {
  justify-self: start;
  border: 1px solid rgba(255,255,255,.14);
  border-radius: 8px;
  background: rgba(255,255,255,.08);
  color: rgba(255,255,255,.82);
  height: 30px;
  padding: 0 10px;
  font-size: 11px;
}

.embed-preview-panel {
  display: grid;
  grid-template-rows: auto 1fr auto;
  gap: 12px;
  overflow: hidden;
}

body[data-sain-active='admin-embeds'] .sain-main,
body[data-sain-active='admin-embeds-test'] .sain-main {
  display: flex;
  flex-direction: column;
  overflow: hidden;
}

/* Test Embed page: use plain page area without extra dark shell panel. */
body[data-sain-active='admin-embeds-test'] .sain-main {
  background: transparent;
  border: 0;
  box-shadow: none;
  backdrop-filter: none;
  padding: 0;
}

body[data-sain-active='admin-embeds'] .sain-main > .embed-editor-shell,
body[data-sain-active='admin-embeds-test'] .sain-main > .embed-editor-shell {
  height: 100%;
  min-height: 0;
}

body[data-sain-active='admin-embeds'] .embed-editor-layout,
body[data-sain-active='admin-embeds-test'] .embed-editor-layout {
  height: 100%;
  min-height: 0;
}

body[data-sain-active='admin-embeds'] .embed-canvas-panel,
body[data-sain-active='admin-embeds'] .embed-preview-panel,
body[data-sain-active='admin-embeds-test'] .embed-canvas-panel,
body[data-sain-active='admin-embeds-test'] .embed-preview-panel {
  height: 100%;
  min-height: 0;
}

.embed-template-card {
  border-radius: 12px;
  border: 1px solid rgba(255,255,255,.1);
  background: rgba(255,255,255,.03);
  padding: 12px;
  display: grid;
  gap: 10px;
}

.embed-template-card.is-disabled {
  opacity: .54;
}

.embed-template-card.is-disabled .embed-template-mode,
.embed-template-card.is-disabled .embed-template-section,
.embed-template-card.is-disabled .embed-template-embed {
  pointer-events: none;
}

.embed-template-card.is-disabled [data-message-enabled] {
  pointer-events: auto;
}

.embed-template-card > * {
  max-width: 760px;
}

.embed-template-mode {
  display: inline-flex;
  gap: 6px;
}

.embed-template-mode button {
  border: 1px solid rgba(255,255,255,.14);
  border-radius: 8px;
  background: rgba(255,255,255,.06);
  color: rgba(255,255,255,.8);
  height: 32px;
  padding: 0 12px;
  font-size: 12px;
}

.embed-template-mode button.is-active {
  border-color: rgba(88,101,242,.85);
  background: rgba(88,101,242,.24);
  color: #fff;
}

.embed-template-section {
  display: grid;
  gap: 6px;
}

.embed-template-section label {
  color: rgba(255,255,255,.62);
  font-size: 11px;
  letter-spacing: .06em;
  text-transform: uppercase;
}

.embed-template-row {
  display: grid;
  gap: 8px;
}

.embed-template-row.with-toggle {
  grid-template-columns: 30px minmax(0, 1fr);
  align-items: start;
}

.embed-template-row.with-toggle.is-disabled {
  opacity: .52;
}

.embed-template-row.with-toggle > :last-child {
  min-width: 0;
}

.embed-template-toggle.left {
  width: 30px;
  height: 30px;
  border: 0;
  background: transparent;
  color: rgba(255,255,255,.72);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0;
  cursor: pointer;
}

.embed-template-toggle.left:hover {
  color: #fff;
}

.embed-template-stack {
  display: grid;
  gap: 8px;
}

.embed-template-row.two {
  grid-template-columns: 1fr 1fr;
}

.embed-template-embed {
  display: grid;
  gap: 10px;
}

.embed-template-embed.is-hidden {
  display: none;
}

.embed-template-fields,
.embed-template-actions {
  display: grid;
  gap: 8px;
}

.embed-template-field,
.embed-template-action {
  display: grid;
  grid-template-columns: 28px minmax(0, 1fr);
  gap: 8px;
  align-items: start;
}

.embed-template-field {
  align-items: start;
}

.embed-template-field-stack {
  display: grid;
  gap: 8px;
}

.embed-template-field .embed-input-wrap textarea {
  min-height: 104px;
}

.embed-field-remove {
  align-self: start;
}

.embed-template-action {
  border: 1px solid rgba(255,255,255,.08);
  border-radius: 10px;
  padding: 8px;
  background: rgba(255,255,255,.03);
  grid-template-columns: minmax(0, 1fr) 28px;
  align-items: start;
}

.embed-template-action > :not([data-action-remove]) {
  grid-column: 1;
}

.embed-template-action > [data-action-remove] {
  grid-column: 2;
  grid-row: 1 / span 20;
  align-self: start;
}

.embed-template-action select {
  width: 100%;
  border-radius: 8px;
  border: 1px solid rgba(255,255,255,.12);
  background: rgba(0,0,0,.35);
  color: #fff;
  height: 32px;
  padding: 0 10px;
  font-size: 12px;
}

.embed-template-action textarea {
  min-height: 86px;
}

.embed-action-inline {
  display: grid;
  grid-template-columns: 96px 96px max-content;
  gap: 8px;
  align-items: center;
}

.embed-action-note {
  color: rgba(255,255,255,.55);
  font-size: 11px;
  padding: 7px 9px;
  border: 1px dashed rgba(255,255,255,.12);
  border-radius: 8px;
}

.embed-action-check {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 12px;
  color: rgba(255,255,255,.72);
  white-space: nowrap;
}

.embed-template-color-row {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
}

.embed-template-color-row input[type='color'] {
  width: 40px;
  height: 40px;
  padding: 0;
  border-radius: 999px;
  border: 1px solid rgba(255,255,255,.16);
  background: rgba(0,0,0,.35);
  overflow: hidden;
  cursor: pointer;
}

.embed-template-presets {
  display: inline-flex;
  align-items: center;
  gap: 6px;
}

.embed-color-dot {
  width: 22px;
  height: 22px;
  border-radius: 999px;
  border: 1px solid rgba(255,255,255,.28);
  background: var(--dot, #5865F2);
  cursor: pointer;
  padding: 0;
}

.embed-color-dot.is-active {
  box-shadow: 0 0 0 2px rgba(255,255,255,.25);
}

.embed-template-preset-actions {
  display: inline-flex;
  align-items: center;
  gap: 4px;
}

.embed-template-preset-actions .icon-btn {
  width: 24px;
  height: 24px;
  border: 1px solid rgba(255,255,255,.12);
  border-radius: 6px;
  background: rgba(255,255,255,.06);
  display: inline-flex;
  align-items: center;
  justify-content: center;
}

.embed-template-preset-actions .material-symbols-outlined {
  font-size: 14px;
}

.embed-template-card input[type='text'],
.embed-template-card textarea {
  width: 100%;
  border-radius: 10px;
  border: 1px solid rgba(255,255,255,.12);
  background: rgba(12,12,14,.94);
  color: rgba(255,255,255,.9);
  font-size: 13px;
  padding: 0 12px;
}

.embed-template-card input[type='text'] {
  height: 38px;
}

.embed-template-card textarea {
  min-height: 130px;
  padding: 10px 12px;
  resize: vertical;
}

.embed-input-wrap {
  display: grid;
  gap: 3px;
}

.embed-char-counter {
  justify-self: end;
  color: rgba(255,255,255,.42);
  font-size: 10px;
  line-height: 1;
  letter-spacing: .02em;
}

.embed-template-card input::placeholder,
.embed-template-card textarea::placeholder {
  color: rgba(255,255,255,.45);
}

.embed-template-card input[type='text']:focus,
.embed-template-card textarea:focus,
.embed-template-card select:focus {
  outline: none;
  border-color: rgba(255,255,255,.22);
  box-shadow: 0 0 0 1px rgba(255,255,255,.08);
  background: rgba(10,10,12,.96);
}

.embed-template-drop {
  position: relative;
  width: 190px;
  height: 92px;
  border-radius: 10px;
  border: 1px dashed rgba(255,255,255,.2);
  background: rgba(12,14,20,.78);
  display: grid;
  place-items: center;
  color: rgba(255,255,255,.62);
  font-size: 12px;
  padding: 10px;
  cursor: pointer;
  text-align: center;
}

.embed-template-drop-preview {
  position: static;
  width: auto;
  height: auto;
  max-width: 100%;
  max-height: 100%;
  object-fit: contain;
  object-position: center;
  display: block;
  border-radius: inherit;
}

.embed-template-drop > span {
  position: relative;
  z-index: 1;
  background: rgba(0,0,0,.48);
  padding: 4px 8px;
  border-radius: 8px;
}

.embed-template-drop.has-preview {
  width: auto;
  height: auto;
  min-height: 0;
  padding: 0;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-style: solid;
  border-color: rgba(255,255,255,.12);
  background: transparent;
  overflow: hidden;
  justify-self: start;
}

.embed-template-drop.has-preview > span {
  display: none;
}

.embed-template-drop.wide.has-preview .embed-template-drop-preview {
  max-width: 220px;
  max-height: 124px;
  border-radius: 10px;
}

.embed-template-drop.wide.has-preview {
  max-width: 220px;
}

.embed-template-drop.square.has-preview .embed-template-drop-preview {
  max-width: 72px;
  max-height: 72px;
  border-radius: 10px;
}

.embed-template-drop.small {
  height: 56px;
}

.embed-template-drop.square {
  width: 72px;
  height: 72px;
  min-height: 72px;
}

.embed-template-drop.wide {
  width: 190px;
  height: 92px;
  min-height: 92px;
}

.embed-template-drop-clear {
  position: absolute;
  top: 8px;
  right: 8px;
  width: 24px;
  height: 24px;
  border-radius: 6px;
  border: 1px solid rgba(255,255,255,.14);
  background: rgba(0,0,0,.45);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
}

.embed-template-drop-clear .material-symbols-outlined {
  font-size: 16px;
  color: #fff;
  opacity: .86;
}

.embed-template-drop.is-drop {
  border-color: rgba(0,210,255,.5);
  background: rgba(0,210,255,.08);
}

.embed-template-add {
  justify-self: start;
  border: 1px solid rgba(255,255,255,.14);
  border-radius: 8px;
  background: rgba(255,255,255,.07);
  color: rgba(255,255,255,.85);
  height: 30px;
  padding: 0 10px;
  font-size: 12px;
}

.embed-template-footer {
  display: grid;
  grid-template-columns: 56px minmax(0, 1fr);
  gap: 8px;
  align-items: center;
}

.embed-template-footer .embed-template-drop.square {
  width: 56px;
  height: 56px;
  min-height: 56px;
}

.icon-btn .material-symbols-outlined {
  font-size: 17px;
  color: rgba(255,255,255,.9);
}

body[data-sain-active='admin-embeds'] .embed-canvas-panel,
body[data-sain-active='admin-embeds-test'] .embed-canvas-panel {
  display: flex;
  flex-direction: column;
}

body[data-sain-active='admin-embeds'] .embed-canvas,
body[data-sain-active='admin-embeds-test'] .embed-canvas {
  flex: 1 1 auto;
  min-height: 0;
}

.embed-test-layout-art {
  border: 1px solid rgba(250, 204, 21, .24);
  background: rgba(250, 204, 21, .06);
  border-radius: 12px;
  padding: 10px;
  margin: 0 0 10px;
}

body[data-sain-active='admin-embeds-test'] .embed-test-layout-art {
  border: 0;
  background: transparent;
  border-radius: 0;
  padding: 0;
  margin: 0;
  height: 100%;
  min-height: 0;
  display: flex;
  flex-direction: column;
}

body[data-sain-active='admin-embeds-test'] .embed-test-layout-art > strong {
  display: none;
}

body[data-sain-active='admin-embeds-test'] .embed-editor-shell {
  height: 100%;
  min-height: 0;
}

body[data-sain-active='admin-embeds-test'] .sain-shell {
  height: calc(100vh - var(--topbar-h) - 22px);
  min-height: 0;
}

.embed-test-layout-art strong {
  display: block;
  color: #fde68a;
  font-size: 12px;
  letter-spacing: .06em;
  text-transform: uppercase;
  margin-bottom: 8px;
}

.embed-test-layout-art img {
  display: block;
  width: min(100%, 505px);
  height: auto;
  border-radius: 8px;
}

.embed-test-canvas {
  width: min(100%, 505px);
  border-radius: 10px;
  background: #1a1a1a;
  border: 1px solid rgba(255,255,255,.08);
  padding: 12px;
  display: grid;
  gap: 10px;
}

.embed-test-topbar {
  display: grid;
  grid-template-columns: 20px minmax(0,1fr) repeat(4,20px);
  gap: 8px;
  align-items: center;
}

.embed-test-check {
  width: 20px;
  height: 20px;
  border: 0;
  padding: 0;
  background: transparent;
  color: #fff;
  display: inline-flex;
  align-items: center;
  justify-content: center;
}

.embed-test-check .material-symbols-outlined {
  font-size: 18px;
}

.embed-test-mini {
  width: 15px;
  height: 15px;
  border-radius: 5px;
  border: 0;
  background: #fff;
}

.embed-test-tabs {
  display: grid;
  grid-template-columns: 93px 93px minmax(0,1fr);
  gap: 8px;
  align-items: center;
}

.embed-test-tabs > button {
  height: 28px;
  border-radius: 8px;
  border: 1px solid rgba(255,255,255,.12);
  background: #111;
  color: rgba(255,255,255,.88);
}

.embed-test-tabs > button.is-active {
  background: #5765f2;
  color: #fff;
}

.embed-test-colors {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  justify-content: flex-start;
}

.embed-test-colors span {
  width: 15px;
  height: 15px;
  border-radius: 999px;
  background: var(--dot, #fff);
}

.embed-test-block,
.embed-test-row {
  display: grid;
  grid-template-columns: 20px minmax(0,1fr);
  gap: 8px;
  align-items: start;
}

.embed-test-row.with-drop {
  grid-template-columns: 20px minmax(0,1fr) 90px;
  align-items: center;
}

.embed-test-row.with-actions {
  grid-template-columns: 20px minmax(0,1fr) minmax(0,1fr) 15px 15px 15px 20px;
  align-items: center;
}

.embed-test-canvas input[type="text"],
.embed-test-canvas textarea {
  width: 100%;
  border-radius: 8px;
  border: 1px solid rgba(255,255,255,.12);
  background: #111;
  color: rgba(255,255,255,.92);
  padding: 9px 10px;
  font-size: 13px;
}

.embed-test-canvas textarea {
  resize: vertical;
  min-height: 70px;
}

.embed-test-drop {
  height: 52px;
  border-radius: 8px;
  border: 1px dashed #4d4d4d;
  background: #111;
  color: rgba(255,255,255,.7);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 11px;
  text-align: center;
  padding: 6px;
  cursor: pointer;
}

.embed-test-drop.square {
  width: 52px;
}

.embed-test-drop.wide {
  width: 100%;
  height: 78px;
}

.embed-test-action-dot {
  width: 15px;
  height: 15px;
  border-radius: 999px;
  border: 0;
  background: #5765f2;
}

/* Embed Test Page (new layout v2) */
.embed-test-canvas {
  width: min(100%, 505px);
  border-radius: 10px;
  background: #1a1a1a;
  border: 1px solid rgba(255,255,255,.08);
  padding: 12px;
  display: grid;
  gap: 10px;
}

.embed-test-topbar {
  display: grid;
  grid-template-columns: 20px 20px 20px minmax(0,1fr) 20px;
  gap: 8px;
  align-items: center;
}

.embed-test-top-spacer {
  height: 15px;
  border-radius: 5px;
  background: #4d4d4d;
}

.embed-test-check,
.embed-test-trash,
.embed-test-move,
.embed-test-color-edit {
  width: 20px;
  height: 20px;
  border: 0;
  padding: 0;
  background: transparent;
  display: inline-flex;
  align-items: center;
  justify-content: center;
}

.embed-test-check { color: #fff; }
.embed-test-trash { color: #ff4d4f; }
.embed-test-move { color: #ffdc00; }

.embed-test-check .material-symbols-outlined,
.embed-test-trash .material-symbols-outlined,
.embed-test-move .material-symbols-outlined,
.embed-test-color-edit .material-symbols-outlined {
  font-size: 18px;
}

.embed-test-tabs {
  display: inline-grid;
  grid-template-columns: repeat(2, 93px);
  gap: 10px;
}

.embed-test-tabs button {
  height: 26px;
  border-radius: 8px;
  border: 1px solid rgba(255,255,255,.12);
  background: #4d4d4d;
  color: rgba(255,255,255,.85);
  font-size: 12px;
}

.embed-test-tabs button.is-active {
  background: #5765f2;
  color: #fff;
}

.embed-test-colors-row {
  display: grid;
  grid-template-columns: 30px minmax(0,1fr) 20px 20px 20px;
  gap: 8px;
  align-items: center;
}

.embed-test-colors-row input[type='color'] {
  width: 30px;
  height: 20px;
  border: 0;
  border-radius: 6px;
  padding: 0;
  background: transparent;
}

.embed-test-colors {
  display: inline-flex;
  align-items: center;
  gap: 8px;
}

.embed-test-colors span {
  width: 15px;
  height: 15px;
  border-radius: 999px;
  background: var(--dot, #fff);
}

.embed-test-row,
.embed-test-block {
  display: grid;
  grid-template-columns: 20px minmax(0,1fr) 20px;
  gap: 8px;
  align-items: start;
}

.embed-test-row.with-drop {
  grid-template-columns: 20px minmax(0,1fr) 90px 20px;
  align-items: center;
}

.embed-test-row.field-name input[type="text"] {
  height: 30px;
}

.embed-test-row.field-value textarea {
  min-height: 78px;
}

.embed-test-row.thumbnail-row .embed-test-drop.square {
  width: 90px;
  height: 90px;
}

.embed-test-row.image-row .embed-test-drop.wide {
  height: 90px;
}

.embed-test-row.with-actions {
  grid-template-columns: 20px 130px minmax(0,1fr) minmax(0,1fr) 100px 20px;
  align-items: center;
}

.embed-test-canvas input[type="text"],
.embed-test-canvas textarea,
.embed-test-canvas select {
  width: 100%;
  border-radius: 8px;
  border: 1px solid rgba(255,255,255,.12);
  background: #111;
  color: rgba(255,255,255,.92);
  padding: 8px 10px;
  font-size: 12px;
}

.embed-test-canvas textarea {
  resize: vertical;
  min-height: 65px;
}

.embed-test-drop {
  height: 52px;
  border-radius: 8px;
  border: 1px dashed #4d4d4d;
  background: #111;
  color: rgba(255,255,255,.7);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  text-align: center;
  font-size: 11px;
  padding: 6px;
}

.embed-test-drop.square {
  width: 90px;
  height: 52px;
}

.embed-test-drop.wide {
  width: 100%;
  height: 90px;
}

.embed-test-discord-colors {
  display: inline-flex;
  align-items: center;
  gap: 6px;
}

.discord-color {
  width: 15px;
  height: 15px;
  border-radius: 999px;
  border: 0;
  padding: 0;
}

.discord-primary { background: #5865f2; }
.discord-secondary { background: #4f545c; }
.discord-success { background: #3ba55d; }
.discord-danger { background: #ed4245; }

/* Fine tune to match SVG mockup closer */
.embed-test-layout-art .embed-test-canvas {
  width: 100%;
  max-width: 680px;
  min-height: 714px;
  border-radius: 10px;
  background: #1a1a1a;
  border: 0;
  padding: 14px 13px;
  gap: 9px;
  position: relative;
  --embed-accent: #5865f2;
  padding-left: 18px;
}

.embed-test-workspace {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
  gap: 14px;
  align-items: stretch;
  min-height: 0;
  height: auto;
  flex: 1 1 auto;
}

body[data-sain-active='admin-embeds-test'] .embed-test-workspace {
  grid-template-columns: minmax(0, 1.12fr) minmax(320px, .88fr);
  gap: 16px;
  min-height: 0;
  height: auto;
  flex: 1 1 auto;
}

.embed-test-preview-panel {
  min-height: 0;
  height: 100%;
}

.embed-test-preview-panel .embed-preview-card {
  overflow: auto;
  min-height: 0;
  height: auto;
}

body[data-sain-active='admin-embeds-test'] .embed-test-preview-panel {
  display: grid;
  grid-template-rows: auto minmax(0, 1fr) auto;
  min-height: 0;
  height: 100%;
}

.embed-test-left {
  display: flex;
  flex-direction: column;
  min-height: 0;
  height: 100%;
  min-width: 0;
  overflow: hidden;
}

.embed-test-top-menu {
  display: grid;
  gap: 10px;
  width: 100%;
  padding: 0 0 10px 0;
  margin: 0 0 6px;
}

.embed-test-top-meta {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1fr) minmax(0, 1.15fr) minmax(0, .9fr) max-content;
  gap: 8px;
  align-items: end;
}

.embed-test-meta-field {
  display: grid;
  gap: 4px;
}

.embed-test-meta-field > span {
  color: rgba(255,255,255,.58);
  font-size: 10px;
  letter-spacing: .04em;
  text-transform: uppercase;
}

.embed-test-meta-field > input {
  height: 32px;
  border-radius: 5px;
  border: 1px solid rgba(77,77,77,.9);
  background: #111;
  color: #fff;
  padding: 0 10px;
  font-size: 13px;
}

.embed-test-save-btn {
  height: 32px;
  align-self: end;
  border-radius: 5px;
  border: 1px solid rgba(0, 210, 255, .55);
  background: rgba(0, 210, 255, .14);
  color: #fff;
  padding: 0 14px;
  font-size: 12px;
  letter-spacing: .02em;
  cursor: pointer;
  transition: border-color .15s ease, background .15s ease, color .15s ease;
}

.embed-test-save-btn:hover {
  border-color: rgba(0, 210, 255, .85);
  background: rgba(0, 210, 255, .24);
}

.embed-test-save-btn.is-saved {
  border-color: rgba(45, 194, 117, .85);
  background: rgba(45, 194, 117, .24);
}

.embed-test-save-btn.is-saving {
  border-color: rgba(252, 175, 23, .8);
  background: rgba(252, 175, 23, .2);
}

.embed-test-save-btn.is-error {
  border-color: rgba(237, 66, 69, .85);
  background: rgba(237, 66, 69, .22);
}

.embed-test-save-btn:disabled {
  cursor: default;
  opacity: .86;
}

@media (max-width: 1320px) {
  .embed-test-top-meta {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .embed-test-save-btn {
    justify-self: start;
  }
}

.embed-test-top-format {
  display: grid;
  grid-template-columns: max-content minmax(0,1fr);
  gap: 10px;
  align-items: center;
}

.embed-test-lang-switch {
  display: inline-flex;
  align-items: center;
  gap: 6px;
}

.embed-test-lang-switch > button,
.embed-test-format-tools > button {
  height: 32px;
  border-radius: 5px;
  border: 1px solid rgba(77,77,77,.9);
  background: #111;
  color: rgba(255,255,255,.9);
  padding: 0 10px;
  font-size: 12px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
}

.embed-test-lang-switch > button.is-active {
  border-color: rgba(255,255,255,.6);
  color: #fff;
  box-shadow: 0 0 0 1px rgba(255,255,255,.4) inset;
}

.embed-test-format-tools {
  display: flex;
  align-items: center;
  gap: 6px;
  flex-wrap: wrap;
}

.embed-test-format-tools > button:hover,
.embed-test-lang-switch > button:hover {
  border-color: rgba(255,255,255,.24);
  background: #161616;
}

.embed-test-format-tools > button.is-active {
  border-color: rgba(255,255,255,.6);
  color: #fff;
  box-shadow: 0 0 0 1px rgba(255,255,255,.4) inset;
}

.embed-test-messages-pane {
  flex: 1 1 auto;
  min-height: 0;
  height: 100%;
  overflow-y: scroll;
  overflow-x: hidden;
  padding-right: 2px;
}

.embed-test-list {
  display: grid;
  gap: 14px;
  align-content: start;
}

.embed-test-message-item {
  display: grid;
  gap: 10px;
}

.embed-test-layout-art .embed-test-canvas::before {
  content: "";
  position: absolute;
  left: 0;
  top: 0;
  bottom: 0;
  width: 4px;
  border-radius: 10px 0 0 10px;
  background: var(--embed-accent);
}

.embed-test-layout-art .embed-test-topbar {
  grid-template-columns: 20px max-content 20px 20px minmax(0,1fr) 20px;
  gap: 10px;
  align-items: center;
}

.embed-test-layout-art .embed-test-check,
.embed-test-layout-art .embed-test-trash,
.embed-test-layout-art .embed-test-move,
.embed-test-layout-art .embed-test-color-edit {
  width: 20px;
  height: 20px;
}

.embed-test-layout-art .embed-test-move {
  color: #fff;
}

.embed-test-layout-art .embed-test-trash {
  color: #9ca3af;
  transition: color .16s ease, background .16s ease, transform .16s ease;
}

.embed-test-layout-art .embed-test-trash.is-armed {
  color: #ff4d4f;
  background: rgba(255, 77, 79, .14);
  border-radius: 6px;
}

.embed-test-layout-art .embed-test-check {
  color: #b0b6c0;
}

.embed-test-layout-art .embed-test-canvas.is-disabled-message > *:not(.embed-test-topbar) {
  opacity: .45;
  pointer-events: none;
}

.embed-test-layout-art .embed-test-row.is-disabled-block > :not(.embed-test-check),
.embed-test-layout-art .embed-test-block.is-disabled-block > :not(.embed-test-check) {
  opacity: .45;
  pointer-events: none;
}

.embed-test-layout-art .embed-test-check .material-symbols-outlined,
.embed-test-layout-art .embed-test-trash .material-symbols-outlined,
.embed-test-layout-art .embed-test-move .material-symbols-outlined,
.embed-test-layout-art .embed-test-color-edit .material-symbols-outlined {
  font-size: 18px;
  line-height: 1;
}

.embed-test-layout-art .embed-test-check {
  width: 24px;
  height: 24px;
}

.embed-test-layout-art .embed-test-check .material-symbols-outlined {
  font-size: 21px;
}

.embed-test-layout-art .embed-test-tabs {
  grid-template-columns: repeat(2, 93px);
  gap: 8px;
}

.embed-test-layout-art .embed-test-tabs-inline {
  grid-column: 5;
  justify-self: start;
}

.embed-test-layout-art .embed-test-topbar .embed-test-trash {
  grid-column: 6;
  justify-self: end;
}

.embed-test-layout-art .embed-test-message-id {
  font-size: 12px;
  color: rgba(255,255,255,.86);
  white-space: nowrap;
  font-weight: 700;
}

.embed-test-layout-art .embed-test-tabs button {
  height: 36px;
  border-radius: 5px;
  font-size: 14px;
  line-height: 1;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0 10px;
}

.embed-test-layout-art .embed-test-colors-row {
  grid-template-columns: 15px 20px max-content minmax(0,1fr) 26px 26px 26px;
  gap: 10px;
  align-items: center;
}

.embed-test-layout-art .embed-test-left-spacer {
  width: 15px;
  height: 15px;
  display: block;
}

.embed-test-layout-art .embed-test-colors-row input[type='color'] {
  width: 20px;
  height: 20px;
  border-radius: 999px;
  padding: 0;
  border: 0;
  appearance: none;
  -webkit-appearance: none;
  background: transparent;
  overflow: hidden;
  cursor: pointer;
}

.embed-test-layout-art .embed-test-colors-row input[type='color']::-webkit-color-swatch-wrapper {
  padding: 0;
}

.embed-test-layout-art .embed-test-colors-row input[type='color']::-webkit-color-swatch {
  border: 0;
  border-radius: 999px;
}

.embed-test-layout-art .embed-test-colors-row input[type='color']::-moz-color-swatch {
  border: 0;
  border-radius: 999px;
}

.embed-test-layout-art .embed-test-colors span,
.embed-test-layout-art .discord-color {
  width: 20px;
  height: 20px;
}

.embed-test-layout-art .embed-test-colors {
  margin-left: 12px;
}

.embed-test-layout-art .embed-test-colors span {
  cursor: pointer;
  border-radius: 999px;
  transition: box-shadow .14s ease, transform .14s ease;
}

.embed-test-layout-art .embed-test-colors span:hover {
  transform: translateY(-1px);
}

.embed-test-layout-art .embed-test-colors span.is-active {
  box-shadow: 0 0 0 2px rgba(255,255,255,.9);
}

.embed-test-layout-art .embed-test-colors-row input[type='color'].is-active {
  box-shadow: 0 0 0 2px rgba(255,255,255,.92);
}

.embed-test-layout-art .embed-test-hex {
  height: 24px;
  min-width: 86px;
  border-radius: 5px;
  border: 1px solid rgba(77,77,77,.9);
  background: #111;
  color: rgba(255,255,255,.96);
  font-size: 11px;
  line-height: 1;
  padding: 0 8px;
  text-transform: uppercase;
  letter-spacing: .03em;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
}

.embed-test-layout-art .discord-color {
  border-radius: 999px;
  border: 1px solid rgba(255,255,255,.18);
  transition: box-shadow .14s ease, transform .14s ease, border-color .14s ease;
}

.embed-test-layout-art .discord-color:hover {
  transform: translateY(-1px);
}

.embed-test-layout-art .discord-color.is-active {
  box-shadow: 0 0 0 2px rgba(255,255,255,.92);
  border-color: rgba(255,255,255,.6);
}

.embed-test-layout-art .embed-test-color-edit {
  width: 26px;
  height: 26px;
  border-radius: 6px;
  border: 1px solid rgba(77,77,77,.9);
  background: #111;
  color: rgba(255,255,255,.94);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: border-color .14s ease, background .14s ease, color .14s ease;
}

.embed-test-layout-art .embed-test-color-edit:hover {
  border-color: rgba(255,255,255,.26);
  background: #171717;
}

.embed-test-layout-art .embed-test-color-edit.is-active {
  border-color: rgba(255,255,255,.7);
  box-shadow: 0 0 0 1px rgba(255,255,255,.5) inset;
}

.embed-test-layout-art .embed-test-color-edit .material-symbols-outlined {
  font-size: 17px;
  line-height: 1;
}

.embed-test-layout-art .embed-test-colors [data-color-preset].is-delete-selected {
  box-shadow: 0 0 0 2px rgba(255, 77, 79, .95);
}

.embed-test-layout-art .embed-test-row,
.embed-test-layout-art .embed-test-block {
  grid-template-columns: 24px minmax(0,1fr) 15px;
  gap: 10px;
  justify-content: start;
}

.embed-test-layout-art .embed-test-row:not(.with-actions):not(.with-drop):not(.with-author-icon):not(.with-footer-icon):not(.thumbnail-inline) {
  grid-template-columns: 24px minmax(0,560px);
}

.embed-test-layout-art .embed-test-row.with-drop {
  grid-template-columns: 24px minmax(0,560px) 15px;
}

.embed-test-layout-art .embed-test-row.with-author-icon {
  grid-template-columns: 24px 72px 15px minmax(0,453px);
  grid-template-rows: auto auto;
  align-items: start;
}

.embed-test-layout-art .embed-test-row.with-author-icon > .embed-test-drop.rect {
  grid-column: 2;
  grid-row: 1;
}

.embed-test-layout-art .embed-test-row.with-author-icon > .embed-test-trash {
  grid-column: 3;
  grid-row: 1;
  align-self: start;
}

.embed-test-layout-art .embed-test-row.with-author-icon > .embed-test-author-stack {
  grid-column: 4;
  grid-row: 1;
  display: grid;
  gap: 8px;
  width: 100%;
  max-width: none;
}

.embed-test-layout-art .embed-test-row.with-author-icon > .embed-test-author-stack input[type="text"] {
  width: 100%;
}

.embed-test-layout-art .embed-test-row.with-footer-icon {
  grid-template-columns: 24px 72px 15px minmax(0,453px);
  grid-template-rows: auto auto;
  align-items: start;
}

.embed-test-layout-art .embed-test-row.with-author-icon > .embed-test-drop.rect {
  width: 72px;
  height: 72px;
}

.embed-test-layout-art .embed-test-row.with-footer-icon > .embed-test-drop.rect {
  grid-column: 2;
  grid-row: 1;
  width: 72px;
  height: 72px;
}

.embed-test-layout-art .embed-test-row.with-footer-icon > .embed-test-trash {
  grid-column: 3;
  grid-row: 1;
  align-self: start;
}

.embed-test-layout-art .embed-test-row.with-footer-icon > input[type="text"] {
  grid-column: 4;
  grid-row: 1;
  width: 100%;
  max-width: none;
}

.embed-test-layout-art .embed-test-row[data-section="title"],
.embed-test-layout-art .embed-test-row[data-section="description"] {
  grid-template-columns: 24px minmax(0,560px);
}

.embed-test-layout-art .embed-test-block[data-section="message-content"] {
  grid-template-columns: 24px minmax(0,560px);
}

.embed-test-layout-art .embed-test-row.with-icon-only {
  grid-template-columns: 24px 72px minmax(0,1fr) 15px;
  grid-template-rows: auto auto;
  justify-content: start;
  align-items: center;
}

.embed-test-layout-art .embed-test-row.with-icon-only > .embed-test-drop.rect {
  grid-column: 2;
  width: 72px;
  height: 72px;
}

.embed-test-layout-art .embed-test-row.with-icon-only > .embed-test-trash {
  grid-column: 4;
  justify-self: end;
  align-self: center;
}

.embed-test-layout-art .embed-test-row.with-actions {
  grid-template-columns: 24px minmax(0,1fr) 140px 15px;
  align-items: start;
}

.embed-test-layout-art .embed-test-meta-note {
  margin: 2px 0 0;
  text-align: center;
  color: rgba(255,255,255,.52);
  font-size: 10px;
  line-height: 1.35;
  letter-spacing: .01em;
}

.embed-test-layout-art .embed-test-add-field,
.embed-test-layout-art .embed-test-add-action {
  height: 32px;
  border-radius: 5px;
  border: 1px solid rgba(77,77,77,.9);
  background: #111;
  color: #fff;
  font-size: 13px;
  padding: 0 12px;
  min-width: 168px;
  max-width: 168px;
  white-space: nowrap;
  justify-self: start;
  grid-column: 2;
  text-align: left;
  transition: border-color .15s ease, background .15s ease, color .15s ease;
}

.embed-test-layout-art .embed-test-add-field:hover,
.embed-test-layout-art .embed-test-add-action:hover {
  border-color: rgba(255,255,255,.24);
  background: #151515;
}

.embed-test-layout-art .embed-test-fields-group {
  display: grid;
  grid-template-columns: minmax(0,1fr);
  gap: 10px;
  align-items: start;
}

.embed-test-layout-art .embed-test-fields-list,
.embed-test-layout-art .embed-test-actions-list {
  display: grid;
  gap: 10px;
}

.embed-test-layout-art .embed-test-fields-foot {
  display: grid;
  grid-template-columns: 24px max-content;
  gap: 10px;
  align-items: center;
}

.embed-test-layout-art .embed-test-row > .embed-test-trash {
  grid-column: -1;
  justify-self: end;
}

.embed-test-layout-art .embed-test-field-item {
  grid-template-columns: 24px minmax(0,552px) 23px;
  align-items: start;
}

.embed-test-layout-art .embed-test-field-stack {
  display: grid;
  gap: 10px;
  padding-right: 12px;
  min-width: 0;
  max-width: 440px;
}

.embed-test-layout-art .embed-test-field-item > .embed-test-trash {
  grid-column: 3;
  justify-self: end;
  align-self: start;
}

.embed-test-layout-art .embed-test-actions-stack {
  display: grid;
  gap: 10px;
  min-width: 0;
  max-width: 560px;
}

.embed-test-layout-art .embed-test-action-head {
  display: grid;
}

.embed-test-layout-art .embed-test-action-fields {
  display: grid;
  gap: 10px;
}

.embed-test-layout-art .embed-test-action-fields[hidden] {
  display: none !important;
}

.embed-test-layout-art .embed-test-action-inline {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
}

.embed-test-layout-art .embed-test-actions-stack textarea {
  min-height: 76px;
  height: 76px;
  resize: vertical;
  overflow: auto;
}

.embed-test-layout-art .embed-test-canvas input[type="text"],
.embed-test-layout-art .embed-test-canvas textarea,
.embed-test-layout-art .embed-test-canvas select {
  border-radius: 5px;
  background: #111;
  border-color: rgba(77,77,77,.9);
  padding: 0 10px;
  font-size: 14px;
  height: 32px;
}

.embed-test-layout-art .embed-test-input-wrap {
  width: min(100%, 560px);
  max-width: 560px;
  display: grid;
  gap: 4px;
  min-width: 0;
}

.embed-test-layout-art .embed-test-input-wrap > input[type="text"],
.embed-test-layout-art .embed-test-input-wrap > textarea {
  width: 100%;
  max-width: none;
}

.embed-test-layout-art .embed-test-char {
  justify-self: end;
  color: rgba(255, 255, 255, .46);
  font-size: 10px;
  line-height: 1;
  letter-spacing: .02em;
  user-select: none;
}

.embed-test-layout-art .embed-test-canvas select,
.embed-test-layout-art .embed-test-row input[type="text"],
.embed-test-layout-art .embed-test-row.thumbnail-row input[type="text"],
.embed-test-layout-art .embed-test-row.with-actions input[type="text"] {
  height: 32px;
}

.embed-test-layout-art .embed-test-block textarea {
  min-height: 32px;
  height: 32px;
  padding: 5px 10px;
}

.embed-test-layout-art .embed-test-row textarea {
  min-height: 32px;
  height: 32px;
  padding: 5px 10px;
  overflow: hidden;
  resize: none;
}

.embed-test-layout-art .embed-test-drop {
  border-radius: 5px;
  font-size: 10px;
  border-color: rgba(77,77,77,.95);
}

.embed-test-layout-art .embed-test-drop.rect {
  width: 56px;
  height: 56px;
}

.embed-test-layout-art .embed-test-row.image-row .embed-test-drop.wide {
  width: 100%;
  max-width: 560px;
  height: 90px;
}

.embed-test-layout-art .embed-test-row.with-drop.image-row > .embed-test-drop.wide {
  grid-column: 2;
}

.embed-test-layout-art .embed-test-row.with-drop.image-row > .embed-test-trash {
  grid-column: 3;
  justify-self: end;
}

.embed-test-layout-art .embed-test-discord-colors {
  gap: 8px;
  justify-self: end;
  align-self: start;
}

.embed-test-layout-art .embed-test-discord-colors[hidden] {
  visibility: hidden;
  pointer-events: none;
}

.embed-test-layout-art .embed-test-row.add-action-row {
  grid-template-columns: 15px minmax(0,1fr);
  align-items: center;
}

.embed-test-layout-art .embed-test-actions-group {
  display: grid;
  gap: 10px;
}

.embed-test-layout-art .embed-test-add-message {
  height: 32px;
  border-radius: 10px;
  border: 1px solid rgba(255,255,255,.16);
  background: rgba(255,255,255,.08);
  color: rgba(255,255,255,.9);
  font-size: 13px;
  justify-self: start;
  padding: 0 14px;
}

.embed-test-layout-art .embed-test-live {
  border-radius: 12px;
  border: 1px solid rgba(255,255,255,.1);
  background: #1f2228;
  min-height: 714px;
  display: grid;
  grid-template-rows: auto 1fr;
  overflow: hidden;
}

.embed-test-layout-art .embed-test-live-head {
  padding: 10px 12px;
  font-size: 12px;
  letter-spacing: .06em;
  text-transform: uppercase;
  color: rgba(255,255,255,.7);
  border-bottom: 1px solid rgba(255,255,255,.08);
}

.embed-test-layout-art .embed-test-live-body {
  padding: 12px;
  display: grid;
  gap: 12px;
  align-content: start;
  overflow: auto;
}

.embed-test-layout-art .embed-test-live-empty {
  color: rgba(255,255,255,.6);
  font-size: 12px;
  padding: 8px 0;
}

.embed-test-layout-art .embed-test-live-message {
  display: grid;
  gap: 6px;
}

.embed-test-layout-art .embed-test-live-meta {
  display: inline-flex;
  align-items: baseline;
  gap: 8px;
}

.embed-test-layout-art .embed-test-live-meta .name {
  color: #fff;
  font-size: 13px;
  font-weight: 700;
}

.embed-test-layout-art .embed-test-live-meta .time {
  color: rgba(255,255,255,.55);
  font-size: 11px;
}

.embed-test-layout-art .embed-test-live-content {
  margin: 0;
  color: rgba(255,255,255,.9);
  font-size: 12px;
  line-height: 1.35;
}

.embed-test-layout-art .embed-test-live-embed {
  border-left: 4px solid var(--accent, #5865f2);
  border-radius: 0 8px 8px 0;
  background: #2b2d31;
  padding: 8px 10px;
  display: grid;
  gap: 6px;
}

.embed-test-layout-art .embed-test-live-embed h4 {
  margin: 0;
  color: #fff;
  font-size: 13px;
}

.embed-test-layout-art .embed-test-live-embed p {
  margin: 0;
  color: rgba(255,255,255,.9);
  font-size: 12px;
}

.embed-test-layout-art .embed-test-live-author {
  font-size: 12px;
  color: rgba(255,255,255,.9);
  font-weight: 600;
}

.embed-test-layout-art .embed-test-live-field {
  display: grid;
  gap: 2px;
}

.embed-test-layout-art .embed-test-live-field strong {
  font-size: 11px;
  color: #fff;
}

.embed-test-layout-art .embed-test-live-field span,
.embed-test-layout-art .embed-test-live-footer {
  font-size: 11px;
  color: rgba(255,255,255,.78);
}

.embed-test-layout-art .embed-test-live-actions {
  display: inline-flex;
  gap: 8px;
  flex-wrap: wrap;
}

.embed-test-layout-art .embed-test-live-actions button {
  height: 26px;
  border-radius: 6px;
  border: 1px solid rgba(255,255,255,.14);
  background: #5865f2;
  color: #fff;
  padding: 0 10px;
  font-size: 11px;
}

.embed-preview-mode {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  border-radius: 999px;
  background: rgba(255,255,255,.09);
  padding: 3px;
}

.embed-preview-mode button {
  border: 0;
  border-radius: 999px;
  background: transparent;
  color: rgba(255,255,255,.72);
  font-size: 12px;
  height: 28px;
  padding: 0 18px;
}

.embed-preview-mode button.is-active {
  background: rgba(255,255,255,.18);
  color: #fff;
}

.embed-preview-card {
  border-radius: 10px;
  border: 1px solid rgba(255,255,255,.1);
  background: rgba(255,255,255,.08);
  padding: 14px;
  display: grid;
  gap: 10px;
  align-content: start;
  overflow-y: auto;
}

.embed-preview-card.is-discord {
  border-color: #2b2d31;
  background: #313338;
  padding: 16px;
}

.embed-preview-content-block {
  border-radius: 8px;
  background: rgba(0,0,0,.3);
  padding: 10px;
  display: grid;
  gap: 6px;
}

.embed-preview-content-block strong {
  color: #fff;
  font-size: 12px;
}

.embed-preview-content-block p {
  margin: 0;
  color: rgba(255,255,255,.82);
  font-size: 12px;
  line-height: 1.4;
}

.embed-discord-msg {
  display: grid;
  grid-template-columns: 40px minmax(0, 1fr);
  gap: 12px;
  background: transparent;
  align-items: start;
}

.embed-discord-avatar {
  width: 40px;
  height: 40px;
  border-radius: 999px;
  background: #2b2d31;
  overflow: hidden;
}

.embed-discord-avatar img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.embed-discord-body {
  display: grid;
  gap: 4px;
  padding-top: 1px;
  width: min(100%, 620px);
}

.embed-discord-meta {
  display: inline-flex;
  align-items: baseline;
  gap: 7px;
}

.embed-discord-meta strong {
  color: #f2f3f5;
  font-size: 15px;
  line-height: 1.2;
  font-weight: 600;
}

.embed-discord-meta span {
  color: #949ba4;
  font-size: 12px;
  line-height: 1.2;
}

.embed-discord-embed {
  border-left: 4px solid #00d2ff;
  border-radius: 6px;
  background: #2b2d31;
  padding: 10px 10px 10px 12px;
  display: grid;
  gap: 7px;
  width: 100%;
  max-width: 620px;
}

.embed-discord-embed.is-language {
  border-left-color: #5865f2;
}

.embed-discord-author {
  color: #dbdee1;
  font-size: 12px;
  font-weight: 600;
  display: inline-flex;
  align-items: center;
  gap: 6px;
}

.embed-discord-author img {
  width: 16px;
  height: 16px;
  border-radius: 999px;
  object-fit: cover;
  display: block;
}

.embed-discord-title {
  color: #f2f3f5;
  font-size: 14px;
  font-weight: 700;
}

.embed-discord-description {
  color: #dbdee1;
  font-size: 14px;
  line-height: 1.45;
  white-space: pre-wrap;
}

.embed-discord-fields {
  display: grid;
  gap: 8px;
}

.embed-discord-field {
  display: block;
}

.embed-discord-field strong {
  display: block;
  margin: 0 0 2px;
  color: #f2f3f5;
  font-size: 12px;
  line-height: 1.25;
}

.embed-discord-field p {
  margin: 0;
  color: #dbdee1;
  font-size: 12px;
  line-height: 1.4;
}

.embed-discord-media {
  border-radius: 8px;
  background: transparent;
  overflow: visible;
  width: auto;
  max-height: none;
}

.embed-discord-media.thumb {
  height: auto;
  width: auto;
  justify-self: end;
}

.embed-discord-media img {
  width: auto;
  max-width: min(100%, 420px);
  height: auto;
  object-fit: contain;
  display: block;
  border-radius: 8px;
}

.embed-discord-media.thumb img {
  max-width: 80px;
  max-height: 80px;
}

.embed-discord-footer {
  color: #949ba4;
  font-size: 11px;
  display: inline-flex;
  align-items: center;
  gap: 6px;
}

.embed-discord-footer img {
  width: 16px;
  height: 16px;
  border-radius: 999px;
  object-fit: cover;
}

.embed-discord-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 4px;
}

.embed-discord-btn {
  border: 1px solid rgba(255,255,255,.08);
  border-radius: 5px;
  background: #4f545c;
  color: #fff;
  font-size: 13px;
  line-height: 1;
  padding: 8px 12px;
  font-weight: 500;
}

.embed-discord-btn.is-primary {
  border-color: rgba(88,101,242,.92);
  background: #5865f2;
}

.embed-discord-btn.is-secondary {
  border-color: rgba(79,84,92,.96);
  background: #4f545c;
}

.embed-discord-btn.is-success {
  border-color: rgba(45,194,117,.9);
  background: #2dc275;
}

.embed-discord-btn.is-danger {
  border-color: rgba(237,66,69,.9);
  background: #ed4245;
}

.embed-discord-btn.is-link {
  border-color: rgba(74,141,255,.9);
  background: #4a8dff;
}

.embed-discord-select {
  min-width: 170px;
  display: inline-flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  border: 1px solid #1b1e22;
  border-radius: 7px;
  background: #1b1e22;
  color: #dbdee1;
  font-size: 11px;
  font-weight: 600;
  padding: 6px 10px;
}

.embed-discord-select small {
  font-size: 10px;
  color: #949ba4;
  text-transform: capitalize;
}

.embed-web-card {
  border-radius: 10px;
  border: 1px solid rgba(255,255,255,.12);
  background: #0a0a0a;
  overflow: hidden;
  display: grid;
}

.embed-web-media {
  height: auto;
  background: transparent;
  overflow: visible;
}

.embed-web-media img {
  width: auto;
  max-width: 100%;
  height: auto;
  object-fit: contain;
  display: block;
  border-radius: 8px;
}

.embed-web-body {
  padding: 12px;
  display: grid;
  gap: 8px;
}

.embed-web-title {
  margin: 0;
  color: #fff;
  font-size: 15px;
  line-height: 1.3;
}

.embed-web-desc {
  margin: 0;
  color: rgba(255,255,255,.76);
  font-size: 12px;
  line-height: 1.45;
  white-space: pre-wrap;
}

.embed-preview-line {
  height: 18px;
  border-radius: 10px;
  background: rgba(0,0,0,.34);
}

.embed-preview-line.short {
  width: 35%;
}

.embed-preview-line.long {
  width: 90%;
}

.embed-preview-box {
  height: 120px;
  border-radius: 10px;
  background: rgba(0,0,0,.32);
}

.embed-send-row {
  display: grid;
  grid-template-columns: 1fr auto auto;
  gap: 8px;
}

.embed-send-targets {
  display: grid;
  grid-template-columns: 1fr 1fr 1fr;
  gap: 8px;
}

.embed-publish-status {
  border-radius: 8px;
  border: 1px solid rgba(255,255,255,.12);
  background: rgba(255,255,255,.05);
  color: rgba(255,255,255,.78);
  font-size: 11px;
  padding: 8px 10px;
}

.embed-send-row input,
.embed-schedule-btn,
.embed-send-btn {
  height: 36px;
  border-radius: 10px;
}

.embed-send-row input {
  border: 1px solid rgba(255,255,255,.12);
  background: rgba(255,255,255,.06);
  color: rgba(255,255,255,.82);
  font-size: 12px;
  padding: 0 10px;
}

.embed-schedule-btn {
  border: 1px solid rgba(255,255,255,.12);
  background: rgba(255,255,255,.1);
  color: #fff;
  font-size: 12px;
  padding: 0 12px;
  cursor: pointer;
}

.embed-send-btn {
  border: 0;
  background: #00d2ff;
  color: #00131a;
  font-size: 12px;
  font-weight: 700;
  padding: 0 16px;
  cursor: pointer;
}

.embed-meta-pill:disabled,
.embed-target-pill:disabled,
.embed-save-btn:disabled,
.embed-schedule-btn:disabled,
.embed-send-btn:disabled {
  cursor: not-allowed;
  opacity: .58;
}

.embed-top-toast {
  position: fixed;
  top: 86px;
  left: 50%;
  transform: translateX(-50%) translateY(-6px);
  z-index: 2100;
  border: 1px solid rgba(0,210,255,.45);
  border-radius: 10px;
  background: rgba(12,18,24,.96);
  color: #d8f7ff;
  font-size: 13px;
  font-weight: 600;
  padding: 10px 14px;
  box-shadow: 0 10px 24px rgba(0,0,0,.35);
  opacity: 0;
  pointer-events: none;
  transition: opacity .2s ease, transform .2s ease;
}

.embed-top-toast.is-visible {
  opacity: 1;
  transform: translateX(-50%) translateY(0);
}

@media (max-width: 1360px) {
  .embed-editor-meta {
    grid-template-columns: 120px 120px minmax(220px, 1fr) auto auto;
  }

  .embed-save-btn {
    grid-column: 1 / -1;
    justify-self: start;
  }

  .embed-editor-layout {
    grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
  }
}

@media (max-width: 1100px) {
  .embed-folders,
  .embed-item-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .embed-editor-layout {
    grid-template-columns: 1fr;
  }

  .embed-canvas-panel {
    order: 1;
  }

  .embed-preview-panel {
    order: 2;
  }

  .embed-canvas {
    min-height: 420px;
  }
}

@media (max-width: 760px) {
  .embed-library-head {
    flex-direction: column;
    align-items: stretch;
  }

  .embed-folders,
  .embed-item-grid {
    grid-template-columns: 1fr;
  }

  .embed-editor-meta {
    grid-template-columns: 1fr;
  }

  .embed-target-controls {
    justify-content: space-between;
  }
}

.sain-email-banner {
  margin-bottom: 0;
  border-radius: 12px;
  border: 1px solid rgba(245,158,11,.35);
  background: rgba(245,158,11,.12);
  padding: 12px 14px;
  color: #fde68a;
  font-size: 14px;
  display: flex;
  justify-content: space-between;
  gap: 12px;
  align-items: center;
}

.sain-email-banner button {
  border: 1px solid rgba(245,158,11,.3);
  background: rgba(245,158,11,.2);
  color: #fef3c7;
  border-radius: 8px;
  padding: 7px 10px;
}

.sain-header-card { margin-bottom: 0; }

.sain-banner {
  position: relative;
  height: 220px;
  border-radius: 16px;
  overflow: hidden;
}

.sain-banner > img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  opacity: .9;
}

.sain-avatar-wrap {
  position: relative;
  pointer-events: none;
}

.sain-avatar {
  pointer-events: auto;
  position: absolute;
  left: 26px;
  top: -56px;
  width: 112px;
  height: 112px;
  border-radius: 999px;
  overflow: hidden;
  background: var(--sain-shell-bg, #0a0a0a);
  border: 4px solid var(--sain-shell-bg, #0a0a0a);
  box-shadow: none;
}

.sain-avatar img { width: 100%; height: 100%; object-fit: cover; }

.sain-header-actions {
  display: flex;
  justify-content: flex-end;
  gap: 10px;
  padding: 40px 8px 4px;
}

body[data-sain-active="profile"] .sain-avatar {
  width: 136px;
  height: 136px;
  left: 26px;
  top: -34px;
}

body[data-sain-active="profile"] .sain-profile-meta-row {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 14px;
  padding: 24px 8px 6px 176px;
}

body[data-sain-active="profile"] .sain-profile-identity {
  min-width: 0;
}

body[data-sain-active="profile"] .sain-profile-identity h2 {
  margin: 0;
  color: #fff;
  font-size: clamp(24px, 2.8vw, 32px);
  line-height: 1.06;
}

body[data-sain-active="profile"] .sain-profile-identity p {
  margin: 5px 0 0;
  color: rgba(255,255,255,.56);
  font-size: 14px;
  line-height: 1.2;
}

body[data-sain-active="profile"] .sain-profile-actions {
  display: inline-flex;
  align-items: center;
  gap: 10px;
}

body[data-sain-active="profile"] .sain-profile-actions.is-self {
  display: none;
}

body[data-sain-active="profile"] .sain-profile-follow {
  height: 44px;
  border-radius: 12px;
  border: 0;
  background: #fff;
  color: #0a0a0a;
  font-size: 15px;
  font-weight: 700;
  padding: 0 18px;
}

body[data-sain-active="profile"] .sain-profile-secondary {
  height: 44px;
  border-radius: 12px;
  border: 1px solid rgba(255,255,255,.2);
  background: rgba(255,255,255,.08);
  color: #fff;
  font-size: 15px;
  font-weight: 600;
  padding: 0 16px;
}

.sain-badge-board {
  display: grid;
  gap: 14px;
}

.sain-badge-group {
  border-radius: 14px;
  border: 1px solid rgba(255,255,255,.1);
  background: var(--sain-surface-soft, rgba(255,255,255,.05));
  padding: 14px;
}

.sain-badge-group-head {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 10px;
  margin-bottom: 12px;
}

.sain-badge-group-head h2 {
  margin: 0;
  color: #fff;
  font-size: 17px;
}

.sain-badge-group-head span {
  color: rgba(255,255,255,.58);
  font-size: 12px;
}

.sain-badge-row {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(160px, 1fr));
  gap: 10px;
}

.sain-badge-item {
  border-radius: 12px;
  border: 1px solid rgba(255,255,255,.1);
  background: rgba(255,255,255,.03);
  padding: 10px;
  display: grid;
  gap: 6px;
  align-content: start;
}

.sain-badge-item strong {
  color: rgba(255,255,255,.92);
  font-size: 13px;
  line-height: 1.2;
}

.sain-badge-item small {
  color: rgba(255,255,255,.56);
  font-size: 11px;
  line-height: 1.2;
}

.sain-badge-icon {
  width: 42px;
  height: 42px;
  border-radius: 10px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 11px;
  font-weight: 700;
  letter-spacing: .04em;
}

.sain-badge-item.earned {
  border-color: rgba(0,210,255,.35);
  background: linear-gradient(150deg, rgba(0,210,255,.16), rgba(255,255,255,.04));
}

.sain-badge-item.earned .sain-badge-icon {
  color: #fff;
  background: linear-gradient(145deg, #00d2ff, #1f76ff);
}

.sain-badge-item.locked {
  opacity: .66;
}

.sain-badge-item.locked .sain-badge-icon {
  color: rgba(255,255,255,.58);
  background: rgba(255,255,255,.12);
}

.sain-chip {
  border-radius: 999px;
  border: 1px solid rgba(255,255,255,.1);
  background: var(--sain-surface-soft, rgba(255,255,255,.05));
  color: rgba(255,255,255,.84);
  font-size: 12px;
  padding: 6px 10px;
}

.sain-profile-grid {
  border-radius: 16px;
  background: var(--sain-surface-soft, rgba(255,255,255,.05));
  padding: 18px;
  display: grid;
  grid-template-columns: 7fr 5fr;
  gap: 20px;
}

/* Profile page: cleaner vertical flow and less stretched form controls */
body[data-sain-active="profile"] .sain-profile-grid {
  grid-template-columns: 1fr;
  gap: 16px;
}

body[data-sain-active="profile"] .sain-form-grid {
  grid-template-columns: repeat(2, minmax(220px, 320px));
  justify-content: start;
  gap: 12px 14px;
}

body[data-sain-active="profile"] .sain-field input {
  max-width: 32ch;
}

body[data-sain-active="profile"] .sain-save {
  margin-top: 16px;
}

body[data-sain-active="profile"] .sain-linked {
  max-width: 874px;
}

.sain-form-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
}

.sain-field label {
  display: block;
  color: rgba(255,255,255,.75);
  font-size: 13px;
  margin-bottom: 5px;
}

.sain-field input {
  width: 100%;
  border: 1px solid var(--sain-line-soft, rgba(255,255,255,.12));
  border-radius: 8px;
  background: var(--sain-surface-soft-strong, rgba(255,255,255,.08));
  color: rgba(255,255,255,.9);
  font-size: 14px;
  padding: 10px 11px;
}

.sain-save {
  margin-top: 14px;
  margin-left: auto;
  display: inline-block;
  background: #ff004e;
  color: #fff;
  border: 0;
  border-radius: 8px;
  padding: 10px 14px;
  font-size: 14px;
}

.sain-linked {
  border: 1px solid rgba(255,255,255,.1);
  border-radius: 12px;
  background: var(--sain-surface-soft, rgba(255,255,255,.05));
  padding: 14px;
}

.sain-linked-head {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 12px;
}

.sain-linked-title { font-size: 14px; color: rgba(255,255,255,.85); }

.sain-mini-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border: 1px solid rgba(255,255,255,.12);
  border-radius: 7px;
  background: var(--sain-surface-soft, rgba(255,255,255,.05));
  color: rgba(255,255,255,.8);
  font-size: 12px;
  padding: 6px 8px;
}

.sain-mode-toggle {
  width: 100%;
  font-weight: 600;
  color: #ff004e;
}

.sain-mode-toggle .nav-ico img {
  opacity: 1;
  filter: brightness(0) saturate(100%) invert(22%) sepia(100%) saturate(6015%) hue-rotate(331deg) brightness(101%) contrast(105%);
}

.sain-mode-toggle:hover {
  background: rgba(255,0,78,.14);
  color: #ff004e;
}

.sain-mode-toggle.active {
  background: rgba(255,0,78,.14);
  color: #ff004e;
}

@media (max-width: 1080px) {
  .sain-shell {
    grid-template-columns: 1fr;
    height: auto;
  }
  body[data-active="sain-id"] .mx.sain-shell-wrap { width: 92%; padding-top: 72px; }
  body[data-active="sain-id"] .page-main > .sain-shell-wrap:first-child { padding-top: 72px; }
  .sain-sidebar {
    position: static;
    height: auto;
    max-height: none;
    border-radius: 16px;
    border: 1px solid rgba(255,255,255,.08);
  }
  .sain-main {
    height: auto;
    overflow: visible;
    border-left: 1px solid rgba(255,255,255,.1);
  }
  .sain-nav { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .sain-card-grid.two-col { grid-template-columns: 1fr; }
}

@media (max-width: 780px) {
  .sain-profile-grid { grid-template-columns: 1fr; }
  .sain-form-grid { grid-template-columns: 1fr; }
  .sain-banner { height: 170px; }
  .sain-avatar {
    width: 92px;
    height: 92px;
    left: 18px;
    top: -46px;
  }

  body[data-sain-active="profile"] .sain-form-grid {
    grid-template-columns: 1fr;
  }

  body[data-sain-active="profile"] .sain-linked {
    max-width: none;
  }

  body[data-sain-active="profile"] .sain-avatar {
    width: 114px;
    height: 114px;
    left: 18px;
    top: -28px;
  }

  body[data-sain-active="profile"] .sain-profile-meta-row {
    padding: 18px 6px 4px 144px;
  }

  body[data-sain-active="profile"] .sain-profile-identity h2 {
    font-size: 24px;
  }

  .sain-badge-row {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

.site-footer { margin-top: 24px; border-top: 1px solid var(--line-soft); background: #0a0a0a; }
.event-detail-page + .site-footer { margin-top: 0; }
.footer-wrap { padding: 30px 0; }
.footer-top, .footer-bottom { display: flex; justify-content: space-between; align-items: center; gap: 14px; }
.footer-logo { height: 28px; width: auto; opacity: .92; }
.socials { display: flex; gap: 8px; flex-wrap: wrap; }
.socials a {
  width: 24px;
  height: 24px;
  display: grid;
  place-items: center;
  border: 0;
  background: transparent;
  transition: transform .16s ease;
}
.socials a:hover {
  transform: translateY(-1px);
}
.socials img {
  width: 20px;
  height: 20px;
  opacity: .94;
  filter: brightness(0) invert(1);
  transition: opacity .16s ease, transform .16s ease;
}
.socials a:hover img {
  opacity: 1;
  transform: scale(1.05);
  filter: brightness(0) saturate(100%) invert(24%) sepia(96%) saturate(3465%) hue-rotate(330deg) brightness(104%) contrast(106%);
}
.footer-links-grid {
  margin-top: 18px;
  padding-top: 18px;
  border-top: 1px solid var(--line-soft);
  display: grid;
  gap: 18px;
  grid-template-columns: repeat(7, minmax(0, 1fr));
}
.footer-links-grid h4 { margin: 0 0 10px; font-size: 14px; color: rgba(255,255,255,.92); }
.footer-links-grid a { display: block; color: var(--muted); font-size: 14px; margin-top: 7px; }
.footer-links-grid a:hover { color: var(--pink); }
.footer-bottom {
  margin-top: 18px;
  padding-top: 18px;
  border-top: 1px solid var(--line-soft);
  color: rgba(255,255,255,.7);
  font-size: 14px;
}
.footer-legal { display: flex; gap: 16px; flex-wrap: wrap; }
.footer-legal a:hover { color: var(--pink); }

@media (max-width: 1140px) {
  .main-nav { display: none; }
  .cols-4 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .events-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .news3 { grid-template-columns: 1fr 1fr; }
  .media-layout { grid-template-columns: 1fr; }
  .desc-grid { grid-template-columns: 1fr; }
  .modpack-top { grid-template-columns: 1fr; }
  .modpack-actions { grid-template-columns: 1fr; }
  .modpack-list { grid-template-columns: 1fr; }
  .hero-rail { display: none; }
  .footer-links-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .event-hero-copy h1 { white-space: normal; }
}

@media (max-width: 740px) {
  .search-wrap, .lang-btn { display: none; }
  .header-shell { height: 56px; }
  .hero { min-height: 260px; }
  .hero-content { padding-top: 68px; }
  .cols-4 { grid-template-columns: 1fr; }
  .events-grid { grid-template-columns: 1fr; }
  .news3 { grid-template-columns: 1fr; }
  .footer-top, .footer-bottom { flex-direction: column; align-items: flex-start; }
  .footer-links-grid { grid-template-columns: 1fr; }
}

@media (min-width: 768px) {
  .header-shell {
    height: 64px;
    border-radius: 0 0 24px 24px;
    padding: 0 16px;
  }
  .hero { min-height: 280px; }
  .hero-content { padding: 112px 0; }
  .home-community { margin-top: 48px; }
  .events-head { flex-direction: row; align-items: center; }
}

.login-page {
  padding-top: 96px;
  padding-bottom: 48px;
}

.auth-shell {
  margin: 0 auto;
  width: min(520px, 100%);
  border-radius: 16px;
  border: 1px solid rgba(255,255,255,.1);
  background: rgba(0,0,0,.42);
  backdrop-filter: blur(8px);
  padding: 24px;
  box-shadow: 0 18px 42px rgba(0,0,0,.42);
}

.auth-head { display:flex; align-items:center; justify-content:center; gap:9px; margin-bottom:14px; }
.auth-head img { width: 28px; height: 28px; border-radius: 999px; }
.auth-head h1 { margin:0; font-size:22px; color:#fff; }

.auth-tabs { display:flex; justify-content:space-between; align-items:center; margin-bottom:14px; }
.auth-tab { border-radius:999px; border:1px solid rgba(255,255,255,.12); background:transparent; color:rgba(255,255,255,.75); font-size:13px; font-weight:600; padding:8px 14px; }
.auth-tab.active.login { background: rgba(0,210,255,.2); color:#00d2ff; border-color: rgba(0,210,255,.35); }
.auth-tab.active.signup { background: rgba(255,0,78,.2); color:#ff004e; border-color: rgba(255,0,78,.35); }

.auth-pane { display:none; }
.auth-pane.active { display:block; }
.auth-form { display:grid; gap:12px; }
.auth-form label { font-size:13px; color:rgba(255,255,255,.78); margin-bottom:4px; display:block; }
.auth-form input { width:100%; border-radius:10px; border:1px solid rgba(255,255,255,.12); background:rgba(0,0,0,.4); color:#fff; padding:10px 11px; font-size:14px; }
.auth-remember { font-size:12px; color:rgba(255,255,255,.72); display:flex; gap:8px; align-items:center; }
.auth-primary { border:0; border-radius:10px; padding:10px 14px; font-weight:700; font-size:14px; }
.auth-primary.login { background:#00d2ff; color:#020508; }
.auth-primary.signup { background:#ff004e; color:#fff; }
.auth-divider { display:flex; align-items:center; gap:10px; color:rgba(255,255,255,.5); font-size:12px; }
.auth-divider::before,.auth-divider::after { content:''; height:1px; background:rgba(255,255,255,.12); flex:1; }
.auth-discord { display:flex; align-items:center; justify-content:center; gap:8px; border-radius:10px; background:#5865F2; color:#fff; font-weight:700; padding:10px 14px; font-size:14px; }
.auth-note { margin-top: 10px; text-align:center; color:rgba(255,255,255,.55); font-size:12px; }

.sain-page-content { border-radius:16px; border:1px solid rgba(255,255,255,.1); background:rgba(10,10,10,.75); padding:18px; }
.sain-page-content h1 { margin:0; color:#fff; font-size:30px; }
.sain-page-content p { margin:8px 0 0; color:rgba(255,255,255,.65); }

.sain-cards { margin-top:14px; display:grid; grid-template-columns:repeat(2,minmax(0,1fr)); gap:12px; }
.sain-card { border-radius:14px; border:1px solid rgba(255,255,255,.1); background:rgba(255,255,255,.04); padding:12px; }
.sain-card h3 { margin:0 0 6px; color:#fff; font-size:16px; }
.sain-card p { margin:0; font-size:13px; color:rgba(255,255,255,.68); line-height:1.45; }

.shop-grid { margin-top:14px; display:grid; grid-template-columns:repeat(3,minmax(0,1fr)); gap:12px; }
.shop-card { display:block; border-radius:16px; border:1px solid rgba(255,255,255,.1); overflow:hidden; background:#15181e; }
.shop-card .cover { aspect-ratio:4/1; width:100%; background-size:cover; background-position:center; }
.shop-card .body { padding:12px; display:grid; gap:8px; }
.shop-card h3 { margin:0; color:#fff; font-size:17px; }
.shop-card p { margin:0; color:rgba(255,255,255,.68); font-size:13px; }
.shop-prices { display:flex; gap:8px; flex-wrap:wrap; }
.shop-price-pill { border-radius:999px; padding:5px 9px; font-size:12px; font-weight:700; }
.shop-price-pill.coins { background:#00d2ff; color:#051118; }
.shop-price-pill.euro { border:1px solid #ff2f92; color:#ff5fa8; }

@media (max-width:980px){ .shop-grid { grid-template-columns:repeat(2,minmax(0,1fr)); } }
@media (max-width:740px){ .sain-cards { grid-template-columns:1fr; } .shop-grid { grid-template-columns:1fr; } }

/* News (legacy-like layout) */
.news-section {
  padding-top: 112px;
  padding-bottom: 48px;
}

.news-layout {
  display: grid;
  grid-template-columns: minmax(0, 2fr) minmax(320px, 1fr);
  gap: 24px;
  align-items: start;
}

.news-return-link {
  display: inline-flex;
  align-items: center;
  margin-bottom: 10px;
  color: rgba(255,255,255,.66);
  font-size: 12px;
  letter-spacing: .08em;
  text-transform: uppercase;
}

.news-return-link:hover {
  color: #fff;
}

.news-left {
  position: sticky;
  top: 96px;
}

.news-right {
  display: grid;
  gap: 20px;
  max-height: calc(100vh - 180px);
  overflow-y: auto;
  padding: 2px 8px 2px 2px;
}

.news-fullcard,
.news-embed {
  border-radius: 10px;
  overflow: hidden;
  background: var(--surface-news);
  border: 0;
  box-shadow: 0 14px 36px rgba(0, 0, 0, 0.3);
}

.news-embed {
  cursor: pointer;
  transition: border-color .16s ease, transform .16s ease;
}

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

.news-embed.is-active {
  box-shadow: 0 0 0 1px color-mix(in srgb, var(--news-accent), transparent 60%), 0 14px 36px rgba(0, 0, 0, 0.3);
}

.news-embed-media,
.news-full-media {
  width: 100%;
  aspect-ratio: 5 / 2;
  background: var(--surface-news);
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
}

.news-embed-media img,
.news-full-media img,
.news-full-media video {
  width: 100%;
  height: 100%;
  object-fit: contain;
}

.news-full-media-wrap {
  position: relative;
}

.news-media-edge {
  position: absolute;
  top: 0;
  bottom: 0;
  width: 22%;
  border: 0;
  background: transparent;
  color: #fff;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  opacity: 0;
  transition: opacity .18s ease;
}

.news-media-edge::before {
  content: "";
  position: absolute;
  top: 0;
  bottom: 0;
  width: 100%;
  pointer-events: none;
  opacity: 0;
  transition: opacity .18s ease;
}

.news-media-edge.prev {
  left: 0;
  justify-content: flex-start;
  padding-left: 14px;
}

.news-media-edge.prev::before {
  left: 0;
  background: linear-gradient(to right, rgba(0,0,0,.48), rgba(0,0,0,0));
}

.news-media-edge.next {
  right: 0;
  justify-content: flex-end;
  padding-right: 14px;
}

.news-media-edge.next::before {
  right: 0;
  background: linear-gradient(to left, rgba(0,0,0,.48), rgba(0,0,0,0));
}

.news-media-edge img {
  width: 34px;
  height: 34px;
  filter: brightness(0) invert(1);
  opacity: .92;
  transform: translateX(-14px);
  transition: transform .18s ease, opacity .18s ease;
}

.news-media-edge.next img {
  transform: translateX(14px);
}

.news-full-media-wrap:hover .news-media-edge {
  opacity: 1;
}

.news-media-edge:hover::before {
  opacity: 1;
}

.news-media-edge:hover img {
  transform: translateX(0);
  opacity: 1;
}

.news-media-dots {
  margin-top: 10px;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 7px;
}

.news-media-dot {
  width: 8px;
  height: 8px;
  border-radius: 999px;
  border: 0;
  background: rgba(255,255,255,.34);
  padding: 0;
  cursor: pointer;
  transition: transform .16s ease, background .16s ease, opacity .16s ease;
}

.news-media-dot:hover {
  transform: scale(1.08);
}

.news-media-dot.is-active {
  background: #fff;
}

.news-media-dot.is-edge {
  width: 6px;
  height: 6px;
  opacity: .72;
}

.news-full-body,
.news-embed-body {
  padding: 20px;
  display: grid;
  gap: 16px;
}

.news-full-grid {
  display: grid;
  grid-template-columns: minmax(0, 2fr) minmax(170px, 1fr);
  gap: 22px;
}

.news-title-row {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 14px;
}

.news-title-row h1,
.news-title-row h3 {
  margin: 0;
  color: #fff;
  line-height: 1.28;
}

.news-title-row h1 { font-size: 30px; }
.news-title-row h3 { font-size: 22px; }

.news-logo {
  width: 44px;
  height: 44px;
  border-radius: 0;
  overflow: hidden;
  background: transparent;
  flex: 0 0 auto;
}

.news-logo img,
.news-avatar img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.news-copy p {
  margin: 0;
  color: rgba(255,255,255,0.82);
  line-height: 1.55;
  font-size: 15px;
}

.news-more {
  margin-top: 8px;
  border: 0;
  background: transparent;
  color: #6dd9ff;
  font-size: 13px;
  font-weight: 700;
  cursor: pointer;
  padding: 0;
}

.news-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.news-tag {
  border-radius: 5px;
  font-size: 11px;
  padding: 4px 8px;
  letter-spacing: 0.01em;
}

.news-gallery {
  display: grid;
  gap: 10px;
  align-content: start;
}

.news-gallery-thumb {
  border: 1px solid rgba(255,255,255,0.08);
  background: var(--surface-news);
  border-radius: 8px;
  overflow: hidden;
  aspect-ratio: 5 / 2;
  cursor: pointer;
  padding: 0;
}

.news-gallery-thumb.is-active {
  border-color: rgba(255,255,255,0.4);
}

.news-gallery-thumb img {
  width: 100%;
  height: 100%;
  object-fit: contain;
}

.news-footer-line {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 16px;
}

.news-authorline {
  display: flex;
  align-items: center;
  gap: 10px;
}

.news-avatar {
  width: 32px;
  height: 32px;
  border-radius: 0;
  overflow: hidden;
  background: transparent;
}

.news-author {
  color: rgba(255,255,255,0.74);
  font-size: 12px;
}

.news-date {
  color: rgba(255,255,255,0.56);
  font-size: 12px;
}

.news-actions {
  display: flex;
  align-items: center;
  gap: 8px;
}

.news-action {
  width: 18px;
  height: 18px;
  border-radius: 0;
  border: 0;
  background: transparent;
  color: rgba(255,255,255,0.9);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  cursor: default;
  font-size: 14px;
  padding: 0;
}

.news-action img {
  width: 18px;
  height: 18px;
  display: block;
  filter: brightness(0) invert(1);
  opacity: .92;
}

.news-detail-head p {
  margin: 0;
  color: rgba(255,255,255,.62);
  font-size: 14px;
}

.news-detail-head h1 {
  margin: 6px 0 14px;
  color: #fff;
  font-size: 34px;
}

.news-empty {
  border: 1px solid rgba(255,255,255,.12);
  border-radius: 10px;
  padding: 24px;
  color: rgba(255,255,255,.7);
  background: rgba(0,0,0,.25);
}

.news-viewer {
  position: fixed;
  inset: 0;
  z-index: 140;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 24px;
  background: rgba(0,0,0,0.86);
  backdrop-filter: blur(6px);
}

.news-viewer-inner {
  position: relative;
  width: min(1180px, 100%);
}

.news-viewer-media {
  border: 1px solid rgba(255,255,255,0.16);
  border-radius: 14px;
  overflow: hidden;
  background: rgba(0,0,0,0.55);
}

.news-viewer-media img,
.news-viewer-media video {
  width: 100%;
  max-height: 80vh;
  object-fit: contain;
}

.news-viewer-close {
  position: absolute;
  top: -44px;
  left: 50%;
  transform: translateX(-50%);
  border: 1px solid rgba(255,255,255,0.2);
  border-radius: 999px;
  background: rgba(0,0,0,0.7);
  color: #fff;
  height: 32px;
  padding: 0 14px;
  font-size: 13px;
  white-space: nowrap;
  cursor: pointer;
}

.news-viewer-nav {
  position: absolute;
  top: 0;
  bottom: 0;
  width: 22%;
  border: 0;
  background: transparent;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  opacity: 0;
  transition: opacity .18s ease;
}

.news-viewer-nav::before {
  content: "";
  position: absolute;
  top: 0;
  bottom: 0;
  width: 100%;
  pointer-events: none;
  opacity: 0;
  transition: opacity .18s ease;
}

.news-viewer-nav.prev {
  left: 0;
  justify-content: flex-start;
  padding-left: 14px;
}

.news-viewer-nav.prev::before {
  left: 0;
  background: linear-gradient(to right, rgba(0,0,0,.48), rgba(0,0,0,0));
}

.news-viewer-nav.next {
  right: 0;
  justify-content: flex-end;
  padding-right: 14px;
}

.news-viewer-nav.next::before {
  right: 0;
  background: linear-gradient(to left, rgba(0,0,0,.48), rgba(0,0,0,0));
}

.news-viewer-nav img {
  width: 34px;
  height: 34px;
  display: block;
  filter: brightness(0) invert(1);
  opacity: .92;
  transform: translateX(-14px);
  transition: transform .18s ease, opacity .18s ease;
}

.news-viewer-nav.next img {
  transform: translateX(14px);
}

.news-viewer-inner:hover .news-viewer-nav {
  opacity: 1;
}

.news-viewer-nav:hover::before {
  opacity: 1;
}

.news-viewer-nav:hover img {
  transform: translateX(0);
  opacity: 1;
}

@media (max-width: 1100px) {
  .news-layout {
    grid-template-columns: 1fr;
    gap: 18px;
  }

  .news-left {
    position: static;
  }

  .news-right {
    max-height: none;
    overflow: visible;
    padding: 0;
  }

  .news-full-grid {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 720px) {
  .news-section {
    padding-top: 98px;
    padding-bottom: 30px;
  }

  .news-title-row h1 {
    font-size: 24px;
  }

  .news-title-row h3 {
    font-size: 18px;
  }

  .news-full-body,
  .news-embed-body {
    padding: 14px;
    gap: 12px;
  }

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

/* Transactions page (legacy-like) */
.tx-card {
  overflow: hidden;
  border-radius: 16px;
  border: 1px solid rgba(255,255,255,.1);
  background: #15181e;
  box-shadow: 0 18px 40px rgba(0,0,0,.5);
}

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

.tx-media {
  position: relative;
  height: 170px;
  background-size: cover;
  background-position: center;
}

.tx-media::before {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(to top, #0d0f12, rgba(13,15,18,.4), transparent);
}

.tx-status-pill {
  position: absolute;
  top: 12px;
  right: 12px;
  z-index: 2;
  display: inline-flex;
  align-items: center;
  border-radius: 999px;
  background: rgba(0,0,0,.7);
  border: 1px solid rgba(255,255,255,.1);
  padding: 8px 10px;
}

.tx-dot {
  width: 11px;
  height: 11px;
  border-radius: 999px;
  display: inline-block;
}

.tx-dot.online,
.tx-dot.completed { background: #00d976; }
.tx-dot.pending { background: #f5a524; }
.tx-dot.failed { background: #ff4d6d; }

.tx-body {
  padding: 16px 20px 18px;
  display: grid;
  gap: 14px;
}

.tx-head {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 10px;
}

.tx-head h3 {
  margin: 0;
  color: #fff;
  font-size: 19px;
  font-weight: 600;
}

.tx-chip {
  display: inline-flex;
  border-radius: 999px;
  background: rgba(255,255,255,.05);
  border: 1px solid rgba(255,255,255,.1);
  color: rgba(255,255,255,.72);
  font-size: 12px;
  padding: 4px 10px;
}

.tx-sub {
  margin: -4px 0 0;
  font-size: 14px;
  font-style: italic;
  color: rgba(255,255,255,.62);
}

.tx-info-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
}

.tx-col {
  display: grid;
  gap: 8px;
}

.tx-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  border-radius: 10px;
  background: rgba(255,255,255,.05);
  padding: 10px 12px;
  color: rgba(255,255,255,.62);
  font-size: 13px;
}

.tx-row strong {
  color: rgba(255,255,255,.84);
  font-weight: 600;
  text-align: right;
}

.tx-row strong.accent {
  color: #00d2ff;
}

.tx-desc {
  max-height: 138px;
  overflow-y: auto;
  border-radius: 12px;
  border: 1px solid rgba(255,255,255,.08);
  background: rgba(0,0,0,.3);
  padding: 12px;
  color: rgba(255,255,255,.8);
  font-size: 14px;
  line-height: 1.45;
}

.tx-foot {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  color: rgba(255,255,255,.72);
  font-size: 14px;
}

.tx-foot span { color: rgba(255,255,255,.58); }
.tx-foot strong { color: rgba(255,255,255,.84); }

.tx-delta {
  font-weight: 700;
}

.tx-delta.minus { color: #ff4d6d; }
.tx-delta.plus { color: #00d976; }
.tx-delta.neutral { color: rgba(255,255,255,.7); }

.tx-foot a {
  color: rgba(255,255,255,.62);
  font-size: 13px;
}

.tx-foot a:hover { color: #fff; }

.tx-meta {
  margin: 0;
  color: rgba(255,255,255,.42);
  font-size: 12px;
}

@media (max-width: 920px) {
  .tx-info-grid {
    grid-template-columns: 1fr;
  }
}

/* Purchases page (legacy-like) */
.purchase-layout {
  display: grid;
  gap: 24px;
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

.purchase-col {
  display: grid;
  gap: 12px;
  align-content: start;
}

.purchase-col h2 {
  margin: 0;
  font-size: 18px;
  color: #fff;
  font-weight: 600;
}

.purchase-card {
  display: block;
  overflow: hidden;
  border-radius: 16px;
  border: 1px solid rgba(255,255,255,.1);
  background: #15181e;
  box-shadow: 0 18px 40px rgba(0,0,0,.5);
  transition: border-color .16s ease, box-shadow .16s ease;
}

.purchase-card:hover {
  border-color: rgba(255,255,255,.2);
  box-shadow: 0 22px 50px rgba(0,0,0,.6);
}

.purchase-media {
  position: relative;
  height: 140px;
  background-size: cover;
  background-position: center;
}

.purchase-media-fade {
  position: absolute;
  inset: 0;
  background: linear-gradient(to top, #0d0f12, rgba(13,15,18,.4), transparent);
}

.purchase-media-row {
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  z-index: 2;
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 12px;
  padding: 0 16px 12px;
}

.purchase-media-row strong {
  color: #fff;
  font-size: 14px;
  font-weight: 600;
  text-shadow: 0 2px 10px rgba(0,0,0,.6);
}

.purchase-chip {
  border-radius: 999px;
  border: 1px solid rgba(255,255,255,.1);
  background: rgba(0,0,0,.7);
  color: rgba(255,255,255,.8);
  font-size: 12px;
  padding: 4px 10px;
  white-space: nowrap;
}

.purchase-body {
  padding: 16px 18px;
  display: grid;
  gap: 10px;
}

.purchase-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
}

.purchase-status {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  color: rgba(255,255,255,.72);
  font-size: 14px;
}

.purchase-note {
  color: rgba(255,255,255,.6);
  font-size: 12px;
  text-align: right;
}

.purchase-body p {
  margin: 0;
  color: rgba(255,255,255,.72);
  font-size: 14px;
}

@media (max-width: 980px) {
  .purchase-layout {
    grid-template-columns: 1fr;
    gap: 16px;
  }
}

/* Transactions page (closer to legacy TransactionCard) */
.tx2-card {
  position: relative;
  overflow: hidden;
  border-radius: 16px;
  border: 1px solid rgba(255,255,255,.1);
  background: #15181e;
  box-shadow: 0 18px 40px rgba(0,0,0,.5);
}

.tx2-media {
  position: relative;
  height: 170px;
  background-size: cover;
  background-position: center;
}

.tx2-fade {
  position: absolute;
  inset: 0;
  background: linear-gradient(to top, #0d0f12, rgba(13,15,18,.4), transparent);
}

.tx2-top-badge {
  position: absolute;
  top: 12px;
  right: 12px;
  z-index: 2;
  border-radius: 999px;
  border: 1px solid rgba(255,255,255,.1);
  background: rgba(0,0,0,.7);
  padding: 8px 10px;
  display: inline-flex;
}

.tx2-dot {
  width: 11px;
  height: 11px;
  border-radius: 999px;
}

.tx2-dot.online,
.tx2-dot.completed { background: #00d976; }
.tx2-dot.pending { background: #f5a524; }
.tx2-dot.failed { background: #ff4d6d; }

.tx2-body {
  padding: 16px 20px 18px;
  display: grid;
  gap: 14px;
}

.tx2-head {
  display: grid;
  gap: 4px;
}

.tx2-title-wrap {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px;
}

.tx2-title-wrap h3 {
  margin: 0;
  color: #fff;
  font-size: 18px;
  font-weight: 600;
}

.tx2-chip {
  border-radius: 999px;
  border: 1px solid rgba(255,255,255,.1);
  background: rgba(255,255,255,.05);
  color: rgba(255,255,255,.7);
  font-size: 12px;
  padding: 4px 10px;
}

.tx2-sub {
  margin: 0;
  font-size: 14px;
  font-style: italic;
  color: rgba(255,255,255,.6);
}

.tx2-grid {
  display: grid;
  gap: 12px;
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

.tx2-col {
  display: grid;
  gap: 8px;
}

.tx2-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  border-radius: 10px;
  background: rgba(255,255,255,.05);
  padding: 10px 12px;
}

.tx2-row > span {
  color: rgba(255,255,255,.6);
  font-size: 13px;
}

.tx2-row > strong {
  color: rgba(255,255,255,.82);
  font-size: 13px;
  font-weight: 600;
  text-align: right;
}

.tx2-row > strong.accent { color: #00d2ff; }

.tx2-pills {
  display: inline-flex;
  align-items: center;
  gap: 6px;
}

.tx2-pill {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  font-size: 12px;
  font-weight: 600;
  border-radius: 8px;
  padding: 5px 8px;
}

.tx2-pill.coins {
  color: #00d2ff;
  border: 1px solid #00d2ff;
}

.tx2-pill.coins .s {
  width: 16px;
  height: 16px;
  border-radius: 999px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 10px;
  font-weight: 700;
  background: rgba(0,210,255,.2);
}

.tx2-pill.euro {
  color: #ff5fa8;
  border: 1px solid #ff2f92;
}

.tx2-desc {
  max-height: 144px;
  overflow-y: auto;
  border-radius: 12px;
  border: 1px solid rgba(255,255,255,.08);
  background: rgba(0,0,0,.3);
  padding: 12px;
  color: rgba(255,255,255,.8);
  font-size: 14px;
  line-height: 1.45;
}

.tx2-foot {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  color: rgba(255,255,255,.72);
  font-size: 14px;
}

.tx2-balance span { color: rgba(255,255,255,.6); }
.tx2-balance strong { color: rgba(255,255,255,.84); margin-left: 4px; }

.tx2-actions {
  display: inline-flex;
  align-items: center;
  gap: 12px;
}

.tx2-delta { font-weight: 700; }
.tx2-delta.minus { color: #ff4d6d; }
.tx2-delta.plus { color: #00d976; }
.tx2-delta.neutral { color: rgba(255,255,255,.7); }

.tx2-actions a {
  color: rgba(255,255,255,.6);
  font-size: 13px;
}

.tx2-actions a:hover { color: #fff; }

.tx2-meta {
  margin: 0;
  color: rgba(255,255,255,.42);
  font-size: 12px;
}

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

/* Shop page (legacy-like cards) */
.shop2-head {
  position: sticky;
  top: -20px;
  z-index: 12;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin: -20px -20px 0;
  padding: 22px 20px 24px;
  background: var(--sain-shell-bg, #0a0a0a);
  isolation: isolate;
}

.shop2-head::after {
  content: "";
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  height: 1px;
  pointer-events: none;
  background: rgba(255,255,255,.17);
}

.shop2-head h1 {
  margin: 0;
  color: #fff;
  font-size: 32px;
}

.shop2-balance {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  color: rgba(255,255,255,.82);
}

.shop2-balance .coin {
  width: 32px;
  height: 32px;
  border-radius: 999px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background: rgba(0,210,255,.15);
  color: #00d2ff;
  font-weight: 700;
}

.shop2-balance .label {
  display: block;
  color: rgba(255,255,255,.58);
  font-size: 11px;
  letter-spacing: .16em;
  text-transform: uppercase;
}

.shop2-balance strong {
  color: #fff;
  font-size: 16px;
}

.shop2-grid {
  display: grid;
  gap: 18px;
  grid-template-columns: repeat(3, minmax(0, 1fr));
}

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

.shop2-segment {
  margin-top: 20px;
  display: grid;
  gap: 14px;
}

.shop2-segment-head {
  position: relative;
  min-height: 18px;
  display: flex;
  align-items: center;
}

.shop2-segment-head .line {
  position: absolute;
  left: 0;
  right: 0;
  top: 50%;
  transform: translateY(-50%);
  height: 1px;
  background: rgba(255,255,255,.16);
}

.shop2-segment-head p {
  margin: 0;
  color: rgba(255,255,255,.66);
  font-size: 11px;
  letter-spacing: .14em;
  text-transform: uppercase;
  position: relative;
  z-index: 1;
  background: #101216;
  padding-right: 12px;
}

.shop2-card-placeholder {
  visibility: hidden;
  pointer-events: none;
}

.shop-showcase {
  margin-top: 18px;
  margin-bottom: 24px;
  display: grid;
  width: 100%;
  grid-template-columns: minmax(0, 1fr) minmax(300px, 320px);
  gap: 28px;
}

.shop-showcase-main {
  position: relative;
  border-radius: 14px;
  overflow: hidden;
  background: #111;
  min-height: 0;
}

.shop-showcase-main > img[data-shop-main] {
  display: block;
  width: 100%;
  aspect-ratio: 5 / 2;
  object-fit: cover;
  opacity: 1;
  transform: scale(1);
  transition: opacity .26s ease, transform .3s ease;
}

.shop-showcase-main > img[data-shop-main].is-swapping {
  opacity: .36;
  transform: scale(1.012);
}

.shop-showcase-main::after {
  content: "";
  position: absolute;
  inset: 0;
  background: transparent;
  pointer-events: none;
}

.shop-showcase-main.has-overlay::after {
  inset: 0 auto 0 0;
  width: min(470px, 66%);
  background: linear-gradient(to right, rgba(0,0,0,.72) 0%, rgba(0,0,0,.44) 52%, rgba(0,0,0,0) 100%);
}

.shop-showcase-logo {
  position: absolute;
  top: 18px;
  left: 20px;
  z-index: 1;
  width: clamp(220px, 28vw, 360px);
  height: auto;
  display: block;
  object-fit: contain;
  filter: drop-shadow(0 4px 12px rgba(0,0,0,.45));
  opacity: 0;
  pointer-events: none;
  transition: opacity .2s ease;
}

.shop-showcase-overlay {
  position: absolute;
  left: 20px;
  bottom: 18px;
  z-index: 1;
  max-width: 560px;
  display: grid;
  gap: 12px;
  opacity: 0;
  pointer-events: none;
  transition: opacity .2s ease;
}

.shop-showcase-main.has-overlay .shop-showcase-logo,
.shop-showcase-main.has-overlay .shop-showcase-overlay {
  opacity: 1;
  pointer-events: auto;
}

.shop-showcase-overlay h3 {
  margin: 0;
  color: #fff;
  font-size: 30px;
  line-height: 1.1;
  text-shadow: 0 2px 12px rgba(0,0,0,.7);
}

.shop-showcase-overlay p {
  margin: 0;
  color: rgba(255,255,255,.86);
  font-size: 18px;
  line-height: 1.55;
  max-width: 58ch;
  text-shadow: 0 2px 10px rgba(0,0,0,.65);
}

.shop-showcase-actions {
  display: inline-flex;
  align-items: center;
  gap: 18px;
}

.shop-showcase-order {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  height: 54px;
  padding: 0 28px;
  border-radius: 12px;
  border: 0;
  background: #fff;
  color: #0a0a0a;
  font-size: 18px;
  font-weight: 700;
}

.shop-showcase-trailer {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  height: 54px;
  padding: 0;
  border: 0;
  background: transparent;
  color: #fff;
  font-size: 18px;
  font-weight: 600;
  text-shadow: 0 2px 10px rgba(0,0,0,.65);
}

.shop-showcase-trailer img {
  width: 26px;
  height: 26px;
  display: block;
  filter: brightness(0) invert(1);
  filter: brightness(0) invert(1) drop-shadow(0 2px 8px rgba(0,0,0,.55));
}

.shop-showcase-rail {
  display: grid;
  gap: 12px;
  align-content: start;
}

.shop-showcase-thumb {
  position: relative;
  isolation: isolate;
  width: 100%;
  display: grid;
  grid-template-columns: 128px minmax(0, 1fr);
  gap: 12px;
  align-items: center;
  border: 1px solid rgba(255,255,255,.08);
  border-radius: 12px;
  background: rgba(255,255,255,.04);
  color: rgba(255,255,255,.82);
  padding: 8px;
  text-align: left;
  cursor: pointer;
  overflow: hidden;
  transform: translateY(0);
  transition: background .24s ease, border-color .24s ease, transform .24s ease, color .2s ease;
}

.shop-showcase-thumb::before {
  content: "";
  position: absolute;
  inset: 0;
  z-index: 0;
  transform: scaleX(0);
  transform-origin: left center;
  background: rgba(255,255,255,.1);
  pointer-events: none;
}

.shop-showcase-thumb.is-active.is-progress::before {
  animation: shopThumbProgress var(--shop-cycle-ms, 5500ms) linear forwards;
}

.shop-showcase-thumb img {
  position: relative;
  z-index: 1;
  width: 100%;
  aspect-ratio: 16 / 9;
  object-fit: cover;
  border-radius: 8px;
  display: block;
  transform: scale(1);
  opacity: 1;
  transition: transform .28s ease;
}

.shop-showcase-copy {
  position: relative;
  z-index: 1;
  display: grid;
  gap: 4px;
  min-width: 0;
}

.shop-showcase-copy strong {
  color: rgba(255,255,255,.56);
  font-size: 14px;
  font-weight: 600;
  line-height: 1.25;
  transition: color .2s ease;
}

.shop-showcase-copy small {
  color: rgba(255,255,255,.56);
  font-size: 11px;
  line-height: 1.3;
  transition: color .2s ease;
}

.shop-showcase-thumb:hover {
  transform: translateY(-1px);
  border-color: rgba(255,255,255,.16);
  background: rgba(255,255,255,.06);
}

.shop-showcase-thumb:hover img {
  opacity: 1;
}

.shop-showcase-thumb.is-active {
  border-color: rgba(255,255,255,.26);
  background: rgba(255,255,255,.08);
  color: #fff;
  transform: translateY(-1px);
}

.shop-showcase-thumb.is-active .shop-showcase-copy strong {
  color: #fff;
}

.shop-showcase-thumb.is-active .shop-showcase-copy small {
  color: rgba(255,255,255,.78);
}

.shop-showcase-thumb.is-active img {
  opacity: 1;
  transform: scale(1.02);
}

@keyframes shopThumbProgress {
  from { transform: scaleX(0); }
  to { transform: scaleX(1); }
}

.shop2-card {
  position: relative;
  overflow: hidden;
  border-radius: 16px;
  border: 1px solid rgba(255,255,255,.1);
  background: #15181e;
  box-shadow: 0 18px 40px rgba(0,0,0,.5);
  transition: border-color .16s ease, box-shadow .16s ease;
}

.shop2-card:hover {
  border-color: rgba(255,255,255,.2);
  box-shadow: 0 22px 50px rgba(0,0,0,.6);
}

.shop2-overlay {
  pointer-events: none;
  position: absolute;
  inset: 0;
  background: radial-gradient(circle at 0% 0%, rgba(0,210,255,.12), transparent 45%), radial-gradient(circle at 100% 0%, rgba(255,0,128,.12), transparent 45%);
}

.shop2-body {
  position: relative;
  padding: 16px 18px;
  display: grid;
  gap: 12px;
}

.shop2-sub .shop2-body {
  min-height: 100%;
  gap: 14px;
}

.shop2-sub-head {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 10px;
}

.shop2-sub .overline {
  margin: 0;
  color: rgba(255,255,255,.6);
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: .16em;
}

.shop2-sub h3 {
  margin: 6px 0 0;
  color: #fff;
  font-size: 31px;
  line-height: 1.08;
}

.shop2-sub h3 .white { color: #fff; }
.shop2-sub h3 .cyan { color: #00d2ff; }
.shop2-sub h3 .pink { color: #ff2f92; }

.shop2-sub .desc,
.shop2-standard .desc {
  margin: 4px 0 0;
  color: rgba(255,255,255,.72);
  font-size: 14px;
  line-height: 1.45;
}

.shop2-list {
  margin: 0;
  padding: 0;
  list-style: none;
  display: grid;
  gap: 6px;
}

.shop2-list li {
  position: relative;
  padding-left: 12px;
  color: rgba(255,255,255,.75);
  font-size: 14px;
}

.shop2-list li::before {
  content: "";
  position: absolute;
  left: 0;
  top: 8px;
  width: 5px;
  height: 5px;
  border-radius: 999px;
  background: #00d2ff;
}

.icon-round {
  width: 48px;
  height: 48px;
  border-radius: 999px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background: rgba(0,0,0,.6);
  color: #fff;
  font-size: 18px;
  font-weight: 700;
  border: 1px solid rgba(255,255,255,.1);
}

.shop2-sub-foot,
.shop2-row {
  margin-top: auto;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
}

.shop2-sub-foot .tag,
.shop2-row .small {
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: .16em;
  color: rgba(255,255,255,.6);
}

.shop2-row .state {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  color: rgba(255,255,255,.72);
  font-size: 13px;
}

.shop2-row .dot {
  width: 10px;
  height: 10px;
  border-radius: 999px;
  display: inline-block;
}

.shop2-row .dot.online { background: #00d976; }
.shop2-row .dot.pending { background: #f5a524; }

.shop2-standard .hero {
  position: relative;
  height: 150px;
  background-size: cover;
  background-position: center;
}

.shop2-standard .hero-fade {
  position: absolute;
  inset: 0;
  background: linear-gradient(to top, #0d0f12, rgba(13,15,18,.4), transparent);
}

.shop2-standard .hero-row {
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  z-index: 2;
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 10px;
  padding: 0 16px 12px;
  color: #fff;
  font-size: 14px;
  font-weight: 600;
}

.shop2-standard .hero-chip {
  border-radius: 999px;
  border: 1px solid rgba(255,255,255,.1);
  background: rgba(0,0,0,.6);
  color: rgba(255,255,255,.82);
  font-size: 12px;
  padding: 4px 10px;
  white-space: nowrap;
}

.shop2-standard .small {
  color: rgba(255,255,255,.5);
  font-size: 12px;
}

.pills {
  display: inline-flex;
  align-items: center;
  gap: 6px;
}

.pill {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  border-radius: 8px;
  font-size: 12px;
  font-weight: 600;
  padding: 6px 9px;
}

.pill.coins {
  background: #00d2ff;
  color: #000;
}

.pill.euro {
  border: 1px solid #ff2f92;
  color: #ff5fa8;
}

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

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

  .shop2-card-placeholder {
    display: none;
  }
}

@media (max-width: 1100px) {
  .shop-showcase {
    grid-template-columns: 1fr;
  }

  .shop-showcase-rail {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .shop-showcase-overlay h3 {
    font-size: 22px;
  }

  .shop-showcase-logo {
    width: clamp(170px, 21vw, 260px);
  }
}

@media (max-width: 860px) {
  .shop2-head {
    align-items: flex-start;
    gap: 10px;
    flex-wrap: wrap;
    top: -14px;
    margin: -14px -14px 0;
    padding: 16px 14px 20px;
  }

  .shop2-grid {
    grid-template-columns: 1fr;
    gap: 16px;
  }

  .shop2-grid--two {
    grid-template-columns: 1fr;
  }

  .shop-showcase-rail {
    grid-template-columns: 1fr;
  }

  .shop-showcase-overlay {
    left: 14px;
    right: 14px;
    bottom: 14px;
    max-width: none;
    gap: 8px;
  }

  .shop-showcase-overlay h3 {
    font-size: 19px;
  }

  .shop-showcase-overlay p {
    font-size: 13px;
  }

  .shop-showcase-actions {
    gap: 10px;
  }

  .shop-showcase-logo {
    top: 12px;
    left: 14px;
    width: clamp(140px, 30vw, 190px);
  }

  .shop-showcase-main.has-overlay::after {
    width: min(400px, 92%);
  }

  .shop2-sub h3 {
    font-size: 28px;
  }
}

/* Global redesign: full-width top bar + left icon rail */
:root {
  --topbar-h: 56px;
  --global-rail-w: 56px;
  --admin-tools-w: 260px;
  --ui-divider: rgba(255, 255, 255, .26);
  --ui-divider-edge: rgba(255, 255, 255, .66);
}

body {
  background: var(--surface-base);
}

.site-header {
  position: fixed;
  top: 0;
  right: 0;
  left: 0;
  z-index: 80;
}

.site-header::after {
  content: "";
  position: absolute;
  left: var(--global-rail-w);
  right: 0;
  bottom: 0;
  height: 1px;
  background: linear-gradient(90deg, var(--ui-divider-edge) 0%, rgba(255, 255, 255, .52) 82%, rgba(255, 255, 255, 0) 100%);
  border-radius: 999px;
  pointer-events: none;
  z-index: 82;
  opacity: 1;
  transition: opacity .35s ease;
}

.site-header .mx {
  width: 100%;
  max-width: none;
  margin: 0;
}

.header-shell {
  height: var(--topbar-h);
  padding: 0 18px 0 calc(var(--global-rail-w) + 18px);
  border-bottom: 0;
  border-radius: 0;
  background: #0a0a0a;
  backdrop-filter: blur(14px);
  position: relative;
  overflow: hidden;
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 10px;
}

.brand .brand-icon {
  width: 18px;
  height: 18px;
}

.brand .brand-wordmark {
  width: auto;
  height: 24px;
  max-width: 146px;
  object-fit: contain;
}

.main-nav a {
  padding: 10px 13px;
  border-radius: 6px;
  color: rgba(255, 255, 255, .62);
}

.main-nav a:hover {
  color: #fff;
  background: rgba(255, 255, 255, .06);
}

.main-nav a.active {
  color: #fff;
  background: rgba(255, 255, 255, .15);
}

.main-nav a.active::after {
  display: none;
}

.header-controls {
  gap: 12px;
}

.account-wrap {
  order: 1;
}

.lang-wrap {
  order: 2;
  margin-left: 2px;
  padding-left: 12px;
  position: relative;
}

.lang-wrap::before {
  content: "";
  position: absolute;
  left: 0;
  top: 50%;
  transform: translateY(-50%);
  width: 1px;
  height: 24px;
  background: var(--ui-divider);
  border-radius: 999px;
  opacity: 1;
}

.search-wrap {
  border: 0;
  background: rgba(255, 255, 255, .04);
  min-height: 32px;
}

.search-icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 14px;
  height: 14px;
  opacity: .7;
}

.search-icon img {
  width: 14px;
  height: 14px;
  display: block;
  filter: brightness(0) invert(1);
}

.search-wrap input {
  width: 180px;
}

.account-pill {
  min-height: 34px;
  height: 34px;
  padding: 0 0 0 10px;
  gap: 10px;
  justify-content: flex-start;
  border: 0;
  background: rgba(255, 255, 255, .06);
  overflow: hidden;
}

.account-avatar {
  position: static;
  top: auto;
  right: auto;
  transform: none;
  width: 34px;
  height: 34px;
  flex: 0 0 34px;
  order: 2;
  margin-left: auto;
  border: 0;
  box-shadow: none;
  overflow: hidden;
}

.account-meta {
  gap: 8px;
  order: 1;
  text-align: left;
}

.account-meta .name {
  max-width: 136px;
}

.account-meta .acc-no {
  color: rgba(255, 255, 255, .92);
}

.account-meta .sep {
  display: inline;
  color: rgba(255, 255, 255, .36);
}

.global-side-rail {
  position: fixed;
  left: 0;
  top: 0;
  bottom: 0;
  width: var(--global-rail-w);
  background: #0a0a0a;
  display: flex;
  flex-direction: column;
  align-items: center;
  z-index: 81;
  overflow: hidden;
}

.global-side-rail::after {
  content: "";
  position: absolute;
  right: 0;
  top: var(--topbar-h);
  bottom: 0;
  width: 1px;
  background: linear-gradient(180deg, var(--ui-divider-edge) 0%, rgba(255, 255, 255, .36) 46%, rgba(255, 255, 255, 0) 100%);
  border-radius: 999px;
  pointer-events: none;
  opacity: 1;
  transition: opacity .35s ease;
}

.global-rail-logo {
  width: 100%;
  height: var(--topbar-h);
  display: grid;
  place-items: center;
  border-bottom: 0;
}

.global-rail-logo img {
  width: 24px;
  height: 24px;
  filter: brightness(0) invert(1);
}

.rail-discord-list {
  width: 100%;
  display: grid;
  justify-items: center;
  gap: 7px;
  padding: 0;
  max-height: 0;
  opacity: 1;
  overflow: hidden;
  transition:
    max-height .52s cubic-bezier(.42, 0, .58, 1),
    padding .52s cubic-bezier(.42, 0, .58, 1);
  pointer-events: none;
  position: relative;
  z-index: 3;
  will-change: max-height, opacity, transform, padding;
}

.rail-discord-list.is-open {
  max-height: 190px;
  pointer-events: auto;
  padding: 8px 0 10px;
}

.rail-discord-toggle {
  width: 100%;
  border: 0;
  background: transparent;
  color: #fff;
  display: grid;
  justify-items: center;
  gap: 4px;
  padding: 14px 0 0;
  cursor: pointer;
  position: relative;
  z-index: 3;
}

.discord-toggle-icon {
  width: 18px;
  height: 18px;
  display: grid;
  place-items: center;
  border: 0;
  background: transparent;
}

.discord-toggle-icon img {
  width: 18px;
  height: 18px;
  filter: brightness(0) invert(1);
}

.discord-toggle-caret {
  width: 12px;
  height: 12px;
  display: grid;
  place-items: center;
  transition: transform .15s ease;
  transform: rotate(90deg);
}

.discord-toggle-caret img {
  width: 12px;
  height: 12px;
  display: block;
  filter: brightness(0) invert(1);
  opacity: .9;
}

.rail-discord-toggle[aria-expanded="true"] .discord-toggle-caret {
  transform: rotate(-90deg);
}

.rail-discord-toggle.has-hint .discord-toggle-caret {
  animation: discordCaretHint .55s ease 2;
}

@keyframes discordCaretHint {
  0%, 100% { transform: rotate(90deg) translateY(0); }
  50% { transform: rotate(90deg) translateY(2px); }
}

.rail-discord-link {
  width: 30px;
  height: 30px;
  border-radius: 5px;
  overflow: hidden;
  border: 0;
  background: transparent;
  display: block;
  opacity: 0;
  transition: opacity .3s ease-in-out;
}

.rail-discord-list.is-open .rail-discord-link {
  opacity: 1;
}

.rail-discord-list.is-open .rail-discord-link:nth-child(1) { transition-delay: .03s; }
.rail-discord-list.is-open .rail-discord-link:nth-child(2) { transition-delay: .09s; }
.rail-discord-list.is-open .rail-discord-link:nth-child(3) { transition-delay: .15s; }
.rail-discord-list.is-open .rail-discord-link:nth-child(4) { transition-delay: .21s; }

.rail-discord-list:not(.is-open) .rail-discord-link:nth-child(1) { transition-delay: .18s; }
.rail-discord-list:not(.is-open) .rail-discord-link:nth-child(2) { transition-delay: .12s; }
.rail-discord-list:not(.is-open) .rail-discord-link:nth-child(3) { transition-delay: .06s; }
.rail-discord-list:not(.is-open) .rail-discord-link:nth-child(4) { transition-delay: .00s; }

.rail-discord-list.is-open .rail-discord-link:hover {
  opacity: 1;
}

.rail-discord-link img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.app-intro-active .rail-discord-list.is-open .rail-discord-link {
  opacity: 0;
}

.app-intro-active .rail-discord-list.is-open.intro-sequence .rail-discord-link {
  opacity: 1;
  transition: opacity .22s ease-in-out;
}

.app-intro-active .rail-discord-list.is-open.intro-sequence .rail-discord-link:nth-child(1) { transition-delay: .00s; }
.app-intro-active .rail-discord-list.is-open.intro-sequence .rail-discord-link:nth-child(2) { transition-delay: .16s; }
.app-intro-active .rail-discord-list.is-open.intro-sequence .rail-discord-link:nth-child(3) { transition-delay: .32s; }
.app-intro-active .rail-discord-list.is-open.intro-sequence .rail-discord-link:nth-child(4) { transition-delay: .48s; }

.global-rail-nav {
  position: absolute;
  left: 0;
  right: 0;
  top: 50%;
  transform: translateY(-50%);
  width: 100%;
  display: grid;
  justify-items: center;
  gap: 7px;
  padding: 0;
  align-content: start;
  z-index: 2;
}

.rail-divider {
  display: block;
  width: calc(100% - 18px);
  max-width: 50px;
  height: 1px;
  border-radius: 999px;
  background: var(--ui-divider);
  margin: 2px 0;
  opacity: 1;
  transition: opacity .6s ease;
}

.global-rail-bottom {
  margin-top: auto;
  width: 100%;
  padding: 10px 0 16px;
  display: grid;
  justify-items: center;
  gap: 7px;
  position: relative;
}

.global-rail-bottom::before {
  content: "";
  position: absolute;
  top: 0;
  left: 50%;
  transform: translateX(-50%);
  width: calc(100% - 18px);
  max-width: 50px;
  height: 1px;
  background: var(--ui-divider);
  border-radius: 999px;
  opacity: 1;
  transition: opacity .6s ease;
}

.rail-link {
  position: relative;
  width: 36px;
  height: 36px;
  border-radius: 6px;
  display: grid;
  place-items: center;
  color: rgba(255, 255, 255, .64);
  transition: background .15s ease, transform .15s ease;
}

.rail-link:hover {
  background: rgba(255, 255, 255, .08);
  transform: translateY(-1px);
}

.rail-link.active {
  background: rgba(255, 255, 255, .15);
}

.rail-icon,
.rail-icon img {
  width: 18px;
  height: 18px;
  display: block;
}

.rail-icon img {
  filter: brightness(0) invert(1);
  opacity: .56;
}

.rail-link:hover .rail-icon img,
.rail-link.active .rail-icon img {
  opacity: 1;
}

.global-rail-nav .rail-link[data-nav="league"] .rail-icon img {
  filter: brightness(0) saturate(100%) invert(73%) sepia(35%) saturate(1480%) hue-rotate(130deg) brightness(97%) contrast(102%);
  opacity: 1;
}

.global-rail-nav .rail-link[data-sain="shop"] .rail-icon img {
  filter: brightness(0) saturate(100%) invert(29%) sepia(99%) saturate(4042%) hue-rotate(320deg) brightness(104%) contrast(106%);
  opacity: 1;
}

.global-rail-nav .rail-link[data-nav="league"]:hover,
.global-rail-nav .rail-link[data-nav="league"].active {
  background: rgba(27, 201, 176, .20);
}

.global-rail-nav .rail-link[data-sain="shop"]:hover,
.global-rail-nav .rail-link[data-sain="shop"].active {
  background: rgba(255, 0, 78, .20);
}

.rail-link.is-locked {
  opacity: .42;
  cursor: not-allowed;
}

.rail-link-settings .rail-icon img,
.rail-link-settings.is-locked .rail-icon img {
  opacity: 1;
  filter: brightness(0) invert(1);
}

.rail-link-admin .rail-icon img,
.rail-link-admin.is-locked .rail-icon img {
  opacity: 1;
  filter: brightness(0) saturate(100%) invert(66%) sepia(94%) saturate(1685%) hue-rotate(1deg) brightness(103%) contrast(104%);
}

.rail-link-admin:hover,
.rail-link-admin.active {
  background: rgba(255, 184, 0, .24);
}

.rail-link-admin[hidden] {
  display: none !important;
}

.rail-link.is-locked:hover {
  background: rgba(255, 255, 255, .05);
  transform: none;
}

.rail-link.is-locked::after {
  content: attr(data-lock-msg);
  position: absolute;
  left: calc(100% + 10px);
  top: 50%;
  transform: translateY(-50%);
  background: rgba(8, 10, 14, .98);
  border: 1px solid rgba(255, 255, 255, .16);
  border-radius: 8px;
  color: #fff;
  white-space: nowrap;
  padding: 6px 9px;
  font-size: 12px;
  opacity: 0;
  pointer-events: none;
  transition: opacity .12s ease;
}

.rail-link.is-locked:hover::after {
  opacity: 1;
}

body:not([data-active="sain-id"]) .page-main,
body:not([data-active="sain-id"]) .site-footer {
  margin-left: var(--global-rail-w);
}

body:not([data-active="sain-id"]) .page-main {
  padding-top: calc(var(--topbar-h) + 1px);
  min-height: calc(100vh - var(--topbar-h) + 180px);
}

body[data-active="sain-id"] .global-side-rail {
  display: flex;
}

body[data-active="sain-id"] .page-main,
body[data-active="sain-id"] .site-footer {
  margin-left: var(--global-rail-w);
}

body[data-active="sain-id"] .page-main {
  padding-top: calc(var(--topbar-h) + 1px);
  min-height: calc(100vh - var(--topbar-h) + 180px);
}

body[data-active="sain-id"] .header-shell {
  padding-left: calc(var(--global-rail-w) + 18px);
}

body[data-active="sain-id"] .sain-shell {
  grid-template-columns: minmax(0, 1fr);
}

body[data-active="sain-id"] .sain-shell > [data-include="/components/sain-sidebar.html"],
body[data-active="sain-id"] .sain-shell > .sain-sidebar {
  display: none !important;
}

body[data-sain-active^="admin-"] .page-main,
body[data-sain-active^="admin-"] .site-footer {
  margin-left: calc(var(--global-rail-w) + var(--admin-tools-w));
}

body[data-sain-active^="admin-"] .site-header::after {
  left: var(--global-rail-w);
}

.admin-tools-panel {
  position: fixed;
  left: var(--global-rail-w);
  top: calc(var(--topbar-h) + 1px);
  bottom: 0;
  width: var(--admin-tools-w);
  background: #0a0a0a;
  border-right: 1px solid rgba(255, 255, 255, .16);
  display: flex;
  flex-direction: column;
  z-index: 79;
  overflow: hidden;
}

.admin-tools-head {
  padding: 14px 14px 12px;
  border-bottom: 1px solid rgba(255, 255, 255, .14);
  display: grid;
  gap: 6px;
}

.admin-tools-head .kicker {
  font-size: 11px;
  letter-spacing: .14em;
  text-transform: uppercase;
  color: rgba(255, 255, 255, .52);
}

.admin-tools-head strong {
  font-size: 15px;
  color: rgba(255, 255, 255, .94);
  font-weight: 600;
}

.admin-tools-nav {
  padding: 10px 10px 14px;
  overflow-y: auto;
  display: grid;
  gap: 10px;
}

.admin-folder {
  display: grid;
  gap: 5px;
  padding-bottom: 8px;
  border-bottom: 1px solid rgba(255, 255, 255, .1);
}

.admin-folder:last-child {
  border-bottom: 0;
  padding-bottom: 0;
}

.admin-folder-title {
  padding: 3px 6px;
  color: rgba(255, 255, 255, .62);
  font-size: 11px;
  letter-spacing: .12em;
  text-transform: uppercase;
}

.admin-folder a {
  display: grid;
  grid-template-columns: 18px minmax(0, 1fr);
  gap: 10px;
  align-items: start;
  padding: 9px 8px;
  border-radius: 10px;
  color: rgba(255, 255, 255, .62);
  transition: background .16s ease, color .16s ease;
}

.admin-folder a .ico {
  width: 18px;
  height: 18px;
  margin-top: 1px;
}

.admin-folder a .ico img {
  width: 18px;
  height: 18px;
  display: block;
  filter: brightness(0) invert(1);
  opacity: .6;
  transition: opacity .16s ease, filter .16s ease;
}

.admin-folder a .txt {
  display: grid;
  gap: 2px;
}

.admin-folder a .txt strong {
  font-size: 13px;
  line-height: 1.2;
  font-weight: 600;
  color: inherit;
}

.admin-folder a .txt small {
  font-size: 11px;
  line-height: 1.25;
  color: rgba(255, 255, 255, .42);
}

.admin-folder a:hover {
  background: rgba(255, 255, 255, .08);
  color: #fff;
}

.admin-folder a:hover .ico img {
  opacity: 1;
}

.admin-folder a.active {
  background: rgba(0, 210, 255, .16);
  color: #fff;
}

.admin-folder a.active .ico img {
  opacity: 1;
  filter: brightness(0) saturate(100%) invert(73%) sepia(88%) saturate(3147%) hue-rotate(151deg) brightness(101%) contrast(101%);
}

.admin-folder a.active .txt small {
  color: rgba(255, 255, 255, .72);
}

@media (max-width: 1140px) {
  .header-shell {
    padding-left: calc(var(--global-rail-w) + 14px);
  }

  .search-wrap input {
    width: 130px;
  }
}

@media (max-width: 820px) {
  :root {
    --admin-tools-w: 0px;
  }

  .global-side-rail {
    display: none;
  }

  .admin-tools-panel {
    display: none;
  }

  .site-header::after {
    display: none;
  }

  .header-shell {
    padding-left: 12px;
    height: var(--topbar-h);
  }

  .brand .brand-wordmark {
    display: none;
  }

  .main-nav {
    display: none;
  }

  body:not([data-active="sain-id"]) .page-main,
  body:not([data-active="sain-id"]) .site-footer {
    margin-left: 0;
  }

  body:not([data-active="sain-id"]) .page-main {
    padding-top: calc(var(--topbar-h) + 1px);
    min-height: calc(100vh - var(--topbar-h) + 110px);
  }

  body[data-active="sain-id"] .page-main,
  body[data-active="sain-id"] .site-footer {
    margin-left: 0;
  }

  body[data-sain-active^="admin-"] .page-main,
  body[data-sain-active^="admin-"] .site-footer {
    margin-left: 0;
  }

  body[data-active="sain-id"] .page-main {
    padding-top: calc(var(--topbar-h) + 1px);
    min-height: calc(100vh - var(--topbar-h) + 110px);
  }
}

/* Intro sequence */
.app-intro-overlay {
  position: fixed;
  inset: 0;
  z-index: 9999;
  display: grid;
  place-items: center;
  background: transparent;
  opacity: 0;
  transition: opacity .56s ease;
  pointer-events: none;
}

.app-intro-overlay.is-visible {
  opacity: 1;
}

.app-intro-overlay.is-fading {
  opacity: 0;
}

.app-intro-center {
  display: grid;
  justify-items: center;
  gap: 14px;
  text-align: center;
}

.app-intro-welcome {
  font-size: clamp(26px, 4vw, 44px);
  font-weight: 600;
  letter-spacing: .06em;
  color: rgba(255, 255, 255, .9);
  transition: opacity .72s ease, transform .72s ease;
}

.app-intro-overlay.welcome-out .app-intro-welcome {
  opacity: 0;
  transform: translateY(-8px);
}

.app-intro-logo {
  width: min(520px, 70vw);
  height: auto;
  display: block;
  transition: opacity .44s ease;
}

.app-intro-logo-fly {
  position: fixed;
  z-index: 10000;
  margin: 0;
  transition:
    left var(--intro-fly-ms, 1.9s) cubic-bezier(.42, 0, .58, 1),
    top var(--intro-fly-ms, 1.9s) cubic-bezier(.42, 0, .58, 1),
    width var(--intro-fly-ms, 1.9s) cubic-bezier(.42, 0, .58, 1),
    height var(--intro-fly-ms, 1.9s) cubic-bezier(.42, 0, .58, 1),
    opacity .36s ease;
}

.brand .brand-wordmark.intro-target-hidden {
  opacity: 0;
}

.brand .brand-wordmark {
  transition: opacity .22s ease;
}

body:not(.app-intro-done) .brand .brand-wordmark {
  opacity: 0;
}

body.app-brand-reveal .brand .brand-wordmark,
body.app-intro-done .brand .brand-wordmark {
  opacity: 1;
}

.app-intro-active .brand .brand-wordmark {
  opacity: 0;
}

.app-intro-active.app-brand-reveal .brand .brand-wordmark,
.app-intro-done .brand .brand-wordmark {
  opacity: 1;
}

.app-intro-measure .brand,
.app-intro-measure .brand .brand-wordmark {
  transform: none !important;
}

.app-intro-active .site-header,
.app-intro-active .global-side-rail,
.app-intro-active .page-main,
.app-intro-active .site-footer {
  opacity: 1;
  pointer-events: none;
}

.app-intro-active.app-shell-visible .site-header,
.app-intro-active.app-shell-visible .global-side-rail {
  pointer-events: auto;
}

.app-intro-active .header-shell,
.app-intro-active .global-side-rail {
  background: transparent;
}

.app-intro-active .brand,
.app-intro-active .main-nav,
.app-intro-active .header-controls,
.app-intro-active .rail-discord-toggle,
.app-intro-active .rail-discord-list,
.app-intro-active .global-rail-nav,
.app-intro-active .global-rail-bottom {
  opacity: 1;
}

.app-intro-active .header-shell::before {
  content: "";
  position: absolute;
  inset: 0;
  background: #0a0a0a;
  opacity: 0;
  pointer-events: none;
  z-index: 0;
}

.app-intro-active .header-shell::after {
  content: "";
  position: absolute;
  left: 0;
  top: 0;
  bottom: 0;
  width: 0%;
  background: linear-gradient(90deg, #0a0a0a 0%, #0a0a0a 78%, rgba(10, 10, 10, 0) 100%);
  opacity: 1;
  pointer-events: none;
  z-index: 1;
}

.app-intro-active .header-shell {
  isolation: isolate;
}

.app-intro-active .header-shell > .brand,
.app-intro-active .header-shell > .header-controls {
  position: relative;
  z-index: 2;
}

.app-intro-active .header-shell > .main-nav {
  z-index: 2;
}
.app-intro-active.app-shell-visible .header-shell::before {
  opacity: 1;
  transition: opacity .4s linear 4.1s;
}

.app-intro-active.app-shell-visible .header-shell::after {
  width: 118%;
  transition: width 4.4s cubic-bezier(.2,.7,.2,1);
}

.app-intro-active .global-side-rail::before {
  content: "";
  position: absolute;
  inset: 0;
  background: #0a0a0a;
  transform-origin: top center;
  transform: scaleY(0);
  opacity: 1;
  pointer-events: none;
}

.app-intro-active.app-shell-visible .global-side-rail::before {
  transform: scaleY(1);
  transition: transform 2.5s cubic-bezier(.2,.7,.2,1);
}

.app-intro-active .site-header::after,
.app-intro-active .global-side-rail::after {
  opacity: 0;
}

.app-intro-active .rail-divider,
.app-intro-active .global-rail-bottom::before {
  opacity: 0;
}

.app-intro-done .site-header::after,
.app-intro-done .global-side-rail::after {
  opacity: 1;
}

.app-intro-active .global-rail-logo img {
  opacity: 0;
  transform: scale(.86);
}

.app-intro-active.app-logo-visible .global-rail-logo img {
  opacity: 1;
  transform: scale(1);
  transition: opacity .44s ease, transform .44s ease;
}

.app-intro-active .rail-discord-toggle,
.app-intro-active .global-rail-nav .rail-link,
.app-intro-active .global-rail-bottom .rail-link,
.app-intro-active .main-nav a,
.app-intro-active .header-controls > * {
  opacity: 0;
  transform: translateY(-12px) scale(.98);
}

.app-intro-active .brand {
  opacity: 1;
  transform: none;
}

.app-intro-active.app-ui-visible .rail-discord-toggle,
.app-intro-active.app-ui-visible .global-rail-nav .rail-link,
.app-intro-active.app-ui-visible .global-rail-bottom .rail-link,
.app-intro-active.app-ui-visible .main-nav a,
.app-intro-active.app-ui-visible .header-controls > * {
  opacity: 1;
  transform: translateY(0) scale(1);
  transition: opacity .56s ease, transform .76s cubic-bezier(.2,.7,.2,1);
}

.app-intro-active.app-ui-visible .rail-discord-list,
.app-intro-active.app-ui-visible .global-rail-bottom::before {
  opacity: 1;
  transition: opacity .6s ease;
}

.app-intro-active.app-ui-visible .rail-divider {
  opacity: 1;
  transition: opacity .6s ease;
  transition-delay: .98s;
}

.app-intro-active.app-ui-visible .rail-discord-toggle { transition-delay: .12s; }

/* Sidebar sequence: first Discord toggle, then each icon one-by-one. */
.app-intro-active.app-ui-visible .global-rail-nav .rail-link:nth-of-type(1) { transition-delay: .32s; }
.app-intro-active.app-ui-visible .global-rail-nav .rail-link:nth-of-type(2) { transition-delay: .44s; }
.app-intro-active.app-ui-visible .global-rail-nav .rail-link:nth-of-type(3) { transition-delay: .56s; }
.app-intro-active.app-ui-visible .global-rail-nav .rail-link:nth-of-type(4) { transition-delay: .68s; }
.app-intro-active.app-ui-visible .global-rail-nav .rail-link:nth-of-type(5) { transition-delay: .80s; }
.app-intro-active.app-ui-visible .global-rail-nav .rail-link:nth-of-type(6) { transition-delay: .92s; }
.app-intro-active.app-ui-visible .global-rail-nav .rail-link:nth-of-type(7) { transition-delay: 1.04s; }
.app-intro-active.app-ui-visible .global-rail-nav .rail-link:nth-of-type(8) { transition-delay: 1.16s; }
.app-intro-active.app-ui-visible .global-rail-nav .rail-link:nth-of-type(9) { transition-delay: 1.28s; }
.app-intro-active.app-ui-visible .global-rail-bottom .rail-link { transition-delay: 1.44s; }

/* Header sequence: nav items -> search -> account -> language (brand stays stationary). */
.app-intro-active.app-ui-visible .main-nav a:nth-child(1) { transition-delay: .34s; }
.app-intro-active.app-ui-visible .main-nav a:nth-child(2) { transition-delay: .42s; }
.app-intro-active.app-ui-visible .main-nav a:nth-child(3) { transition-delay: .50s; }
.app-intro-active.app-ui-visible .main-nav a:nth-child(4) { transition-delay: .58s; }
.app-intro-active.app-ui-visible .main-nav a:nth-child(5) { transition-delay: .66s; }
.app-intro-active.app-ui-visible .header-controls > *:nth-child(1) { transition-delay: .78s; } /* search */
.app-intro-active.app-ui-visible .header-controls > *:nth-child(3) { transition-delay: .86s; } /* account */
.app-intro-active.app-ui-visible .header-controls > *:nth-child(2) { transition-delay: .94s; } /* language */

.app-intro-active:not(.app-content-visible) .page-main,
.app-intro-active:not(.app-content-visible) .site-footer {
  opacity: 1;
}

.app-intro-active .page-main > *,
.app-intro-active .site-footer > * {
  opacity: 0;
  transform: translateY(-14px);
}

.app-intro-active.app-content-visible .page-main > *,
.app-intro-active.app-content-visible .site-footer > * {
  opacity: 1;
  transform: translateY(0);
  transition: opacity .9s ease, transform 1.04s cubic-bezier(.2,.7,.2,1);
}

.app-intro-active.app-content-visible .page-main > *:nth-child(1) { transition-delay: .04s; }
.app-intro-active.app-content-visible .page-main > *:nth-child(2) { transition-delay: .20s; }
.app-intro-active.app-content-visible .page-main > *:nth-child(3) { transition-delay: .36s; }
.app-intro-active.app-content-visible .page-main > *:nth-child(4) { transition-delay: .52s; }
.app-intro-active.app-content-visible .site-footer > * { transition-delay: .68s; }

.app-intro-active.app-content-visible .page-main,
.app-intro-active.app-content-visible .site-footer {
  pointer-events: auto;
}

