:root {
  --bg:#080b16; --panel:#111a31; --panel-2:#0d152a; --muted:#9ca7c2; --text:#f4f7ff;
  --ok:#44d492; --warn:#f4b740; --danger:#ff667f; --line:#253458; --active:#3b63d1;
}
* { box-sizing: border-box; font-family: Inter, Arial, sans-serif; }
body { margin:0; background:var(--bg); color:var(--text); }
.site-body {
  background:
    radial-gradient(1200px 600px at 90% -10%, rgba(80,130,220,0.18), transparent 60%),
    radial-gradient(800px 500px at -10% 30%, rgba(25,70,140,0.22), transparent 60%),
    linear-gradient(180deg, #061021 0%, #0a1730 55%, #0b1b36 100%);
  min-height: 100vh;
}
.site-topbar {
  display:flex; justify-content:space-between; align-items:center; gap:12px;
  padding:18px 24px; border-bottom:1px solid rgba(94,132,201,0.35);
  background: rgba(7, 17, 38, 0.65);
  backdrop-filter: blur(6px);
  position: sticky;
  top: 0;
  z-index: 20;
}
.site-login-btn {
  min-width: 110px;
  border-radius: 12px;
  border-color: #4e73c7;
  background: linear-gradient(135deg, #19315f, #0f2348);
}
.site-main { max-width: 1100px; margin: 0 auto; padding: 42px 20px 60px; }
.site-hero {
  border: 1px solid rgba(103, 143, 220, 0.35);
  background: linear-gradient(160deg, rgba(16,34,72,0.88), rgba(10,24,50,0.82));
  border-radius: 18px;
  padding: 34px;
  box-shadow: 0 18px 60px rgba(0,0,0,0.32);
  min-height: 72vh;
}
.site-hero h2 { margin-top: 0; font-size: 44px; line-height: 1.08; max-width: 920px; }
.site-hero p { color: #ccd9f5; max-width: 760px; line-height: 1.5; }
.site-brand {
  max-width: 420px;
  display: flex;
  align-items: center;
  gap: 14px;
}
.site-brand-text {
  display: flex;
  flex-direction: column;
  gap: 4px;
}
.site-brand-logo {
  width: 88px;
  height: 88px;
  object-fit: contain;
  flex-shrink: 0;
}
.site-bg-video {
  position: fixed;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  z-index: -5;
  pointer-events: none;
  filter: saturate(1.05) contrast(1.03);
  opacity: 0;
  transition: opacity .35s ease;
}
.site-body.lore-video-active .site-bg-video { opacity: 1; }
.site-bg-layer {
  position: fixed;
  inset: 0;
  background:
    radial-gradient(1000px 420px at 10% 8%, rgba(117, 172, 255, 0.12), transparent 62%),
    radial-gradient(860px 520px at 90% 2%, rgba(95, 146, 255, 0.12), transparent 60%);
  pointer-events: none;
  z-index: -4;
}
.site-body.lore-video-active .site-bg-layer {
  background:
    radial-gradient(1000px 420px at 10% 8%, rgba(40, 84, 162, 0.22), transparent 62%),
    radial-gradient(860px 520px at 90% 2%, rgba(26, 69, 149, 0.2), transparent 60%);
}
.site-bg-wave {
  position: fixed;
  left: -20%;
  width: 140%;
  height: 320px;
  border-radius: 45%;
  pointer-events: none;
  z-index: -2;
  opacity: 0.45;
  filter: blur(4px);
}
.site-bg-wave-a {
  bottom: -210px;
  background: radial-gradient(ellipse at center, rgba(40, 87, 188, 0.48), rgba(8, 20, 42, 0));
  animation: siteWave 12s ease-in-out infinite;
}
.site-bg-wave-b {
  bottom: -190px;
  background: radial-gradient(ellipse at center, rgba(25, 61, 150, 0.35), rgba(8, 20, 42, 0));
  animation: siteWave 17s ease-in-out infinite reverse;
}
.site-nav {
  display: flex;
  gap: 6px;
  align-items: center;
  padding: 5px;
  border: 1px solid rgba(103, 143, 220, 0.28);
  background: rgba(13, 24, 50, 0.65);
  border-radius: 999px;
}
.site-nav-link {
  color: #dbe8ff;
  width: auto;
  font-size: 13px;
  font-weight: 600;
  border-radius: 999px;
  padding: 8px 12px;
  transition: all .18s ease;
  border: 1px solid transparent;
  background: transparent;
  text-decoration: none;
  display: inline-block;
  box-sizing: border-box;
  text-align: center;
}
.site-nav-link:hover,
.site-nav-link.active {
  background: linear-gradient(135deg, #3b63d1, #24439f);
  color: #fff;
  border-color: rgba(160, 189, 255, 0.7);
}
.site-chip {
  display: inline-block;
  margin: 0 0 10px;
  padding: 6px 12px;
  border: 1px solid rgba(118, 165, 255, 0.58);
  border-radius: 999px;
  background: rgba(31, 63, 130, 0.36);
  color: #dce9ff;
  font-size: 12px;
  letter-spacing: .02em;
}
.site-hero-cta {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 20px;
}
.site-ghost-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 190px;
  border-radius: 10px;
  border: 1px solid #4868be;
  color: #deebff;
  font-weight: 600;
  background: rgba(21, 39, 82, 0.75);
  padding: 10px 16px;
  width: auto;
}
.site-hero-showcase {
  margin-top: 16px;
  display: grid;
  grid-template-columns: 1.25fr 1fr;
  gap: 10px;
}
.site-showcase-card {
  border: 1px solid rgba(123, 161, 234, 0.42);
  border-radius: 14px;
  background:
    linear-gradient(180deg, rgba(163, 197, 255, 0.09), rgba(12, 25, 52, 0.8)),
    radial-gradient(380px 220px at 85% 20%, rgba(114, 160, 255, 0.3), transparent 70%);
  padding: 14px;
  box-shadow: 0 10px 40px rgba(0,0,0,0.22);
  animation: floatCard 5.5s ease-in-out infinite;
}
.site-showcase-card.is-big { animation-delay: .3s; }
.site-showcase-card h4 { margin: 8px 0 8px; font-size: 18px; }
.site-showcase-card p { margin: 0; color: #d6e4ff; }
.site-showcase-tag {
  display: inline-block;
  border-radius: 999px;
  border: 1px solid rgba(166, 196, 255, 0.72);
  background: rgba(46, 85, 164, 0.46);
  padding: 4px 8px;
  font-size: 11px;
  font-weight: 700;
  letter-spacing: .02em;
}
.site-hero-kpis {
  margin-top: 22px;
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 12px;
}
.site-kpi-card {
  border: 1px solid rgba(103, 143, 220, 0.32);
  border-radius: 12px;
  background: rgba(12, 25, 52, 0.74);
  padding: 14px;
}
.site-kpi-card h3 { margin: 0; color: #9fb7ec; font-size: 12px; }
.site-kpi-card p { margin: 6px 0 0; font-size: 16px; color: #e9f0ff; font-weight: 700; }
.site-kpi-card p.kpi-detail { font-size: 11px; font-weight: 500; color: rgba(233, 240, 255, 0.62); line-height: 1.35; }
.site-home-panel {
  margin-top: 16px;
  display: grid;
  grid-template-columns: 1.2fr 1fr;
  gap: 12px;
}
.site-home-server,
.site-home-chart {
  border: 1px solid var(--site-border);
  border-radius: 14px;
  padding: 14px;
  background: rgba(12, 24, 50, 0.76);
}
.site-home-server {
  display: grid;
  grid-template-columns: 82px 1fr;
  gap: 12px;
  align-items: center;
}
.site-guild-icon {
  width: 82px;
  height: 82px;
  border-radius: 16px;
  border: 1px solid rgba(156, 190, 255, 0.4);
  object-fit: cover;
  background: rgba(255,255,255,0.06);
}
#home-guild-invite {
  margin-top: 8px;
  display: inline-flex;
  color: #dfeaff;
  text-decoration: none;
  border: 1px solid rgba(133, 168, 240, 0.48);
  border-radius: 999px;
  padding: 6px 12px;
  font-weight: 700;
  font-size: 12px;
  letter-spacing: .03em;
}
.activity-chart {
  margin-top: 10px;
  height: 170px;
  display: flex;
  align-items: end;
  gap: 6px;
  padding-bottom: 18px;
  overflow: hidden;
}
.site-activity-meta {
  margin-top: 8px;
  font-size: 12px;
}
.activity-bar {
  border-radius: 8px 8px 4px 4px;
  background: linear-gradient(180deg, #79d4ff, #4a72ff 45%, #6a48f0);
  min-height: 8px;
  position: relative;
  transition: transform .15s ease, filter .15s ease;
  animation: barRise .55s ease both;
  flex: 1 1 0;
}
.activity-bar:hover {
  transform: translateY(-3px);
  filter: brightness(1.1);
}
.activity-bar::after {
  content: attr(data-value);
  position: absolute;
  top: -18px;
  left: 50%;
  transform: translateX(-50%);
  font-size: 10px;
  color: #b9d0ff;
}
.activity-bar::before {
  content: attr(data-day);
  position: absolute;
  bottom: -18px;
  left: 50%;
  transform: translateX(-50%);
  font-size: 9px;
  color: #7f9bd0;
}
.site-home-events {
  margin-top: 14px;
  border: 1px solid var(--site-border);
  border-radius: 14px;
  padding: 14px;
  background: rgba(12, 24, 50, 0.76);
}
.site-home-events-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
}
.site-events-list {
  margin-top: 10px;
  display: grid;
  gap: 10px;
}
.site-event-card {
  border: 1px solid var(--site-border);
  border-radius: 12px;
  padding: 12px;
  background: rgba(17, 35, 74, 0.74);
}
.site-event-card-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
}
.site-event-tag {
  display: inline-flex;
  border: 1px solid rgba(149, 187, 255, 0.5);
  border-radius: 999px;
  padding: 3px 8px;
  font-size: 11px;
  color: #cbe0ff;
}
.site-event-form {
  margin-top: 12px;
  border-top: 1px solid rgba(147, 184, 253, 0.25);
  padding-top: 12px;
  display: grid;
  gap: 8px;
}
.site-event-delete {
  width: auto;
  padding: 6px 10px;
  background: #3f2131;
  border-color: #6d324f;
}
.site-section {
  margin-top: 26px;
  border: 1px solid rgba(103, 143, 220, 0.27);
  border-radius: 16px;
  padding: 26px;
  background: linear-gradient(160deg, rgba(13,30,62,0.78), rgba(9,21,43,0.82));
  box-shadow: 0 20px 65px rgba(0,0,0,0.28);
  min-height: 58vh;
}
.site-section-head h3 { margin: 0; font-size: 27px; }
.site-section-head p { color: #bfd0f4; margin-bottom: 0; }
.site-feature-grid {
  margin-top: 14px;
  display: grid;
  gap: 12px;
  grid-template-columns: repeat(3, minmax(0, 1fr));
}
.site-info-cube-link {
  text-decoration: none;
  color: inherit;
  display: block;
  border-radius: 12px;
  outline-offset: 3px;
  transition: transform 0.15s ease, box-shadow 0.15s ease;
}
.site-info-cube-link:hover .site-info-cube,
.site-info-cube-link:focus-visible .site-info-cube {
  border-color: rgba(118, 160, 236, 0.55);
  box-shadow: 0 10px 28px rgba(0, 0, 0, 0.22);
}
.site-info-cube-link:active {
  transform: scale(0.99);
}
.site-info-grid .site-info-cube {
  min-height: 132px;
  display: flex;
  flex-direction: column;
  justify-content: flex-start;
  height: 100%;
}
.site-info-grid .site-info-cube h4 {
  margin-bottom: 8px;
}
.site-info-grid .site-info-cube p {
  flex: 1;
  margin-top: 0;
}
.site-info-sub {
  margin-top: 14px;
}
.site-info-back {
  display: inline-block;
  margin-bottom: 14px;
  font-size: 14px;
  font-weight: 600;
  color: #9cb7ef;
  text-decoration: none;
}
.site-info-back:hover,
.site-info-back:focus-visible {
  color: #c6d6f5;
  text-decoration: underline;
}
.site-info-page-title {
  margin: 0 0 12px;
  font-size: 20px;
}
.site-info-page.site-panel > p {
  margin-top: 0;
}
.site-info-page.site-panel > p + p {
  margin-top: 12px;
}
.site-info-page-body {
  display: flex;
  flex-direction: column;
  gap: 24px;
}
.site-info-paver.site-info-block {
  margin: 0;
  padding: 20px 22px 22px;
  border: 1px solid rgba(118, 160, 236, 0.42);
  border-radius: 16px;
  background: linear-gradient(168deg, rgba(16, 32, 66, 0.92), rgba(8, 20, 48, 0.88));
  box-shadow:
    0 0 0 1px rgba(255, 255, 255, 0.04) inset,
    0 14px 40px rgba(0, 0, 0, 0.22);
}
.site-info-block-title {
  margin: 0 0 12px;
  font-size: 18px;
  font-weight: 700;
  color: #e8f0ff;
  letter-spacing: 0.01em;
}
.site-info-block-title--untitled {
  font-size: 14px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: #7a93c9;
}
.site-info-block-content > p {
  margin: 0;
}
.site-info-block-content > p + p {
  margin-top: 10px;
}
.site-info-block-content strong {
  font-weight: 700;
  color: #f0f4ff;
}
.site-info-block-content em {
  font-style: italic;
  color: #d8e4ff;
}
.site-info-block-content del {
  text-decoration: line-through;
  opacity: 0.85;
}
.site-info-block-empty {
  margin: 0;
}
.site-info-block-img {
  display: block;
  width: 100%;
  max-width: min(100%, 640px);
  max-height: 360px;
  object-fit: contain;
  border-radius: 12px;
  border: 1px solid rgba(118, 160, 236, 0.4);
  margin: 16px 0 0;
  background: rgba(5, 12, 28, 0.55);
}
.site-info-page-img {
  display: block;
  width: 100%;
  max-width: min(100%, 720px);
  max-height: 420px;
  object-fit: contain;
  border-radius: 10px;
  border: 1px solid rgba(118, 160, 236, 0.35);
  margin: 16px 0 0;
  background: rgba(5, 12, 28, 0.55);
}
.fdd-static-header {
  margin-bottom: 14px;
  border-radius: 14px;
  border: 1px solid rgba(169, 199, 255, 0.2);
  background: linear-gradient(180deg, rgba(19, 33, 61, 0.76), rgba(11, 19, 36, 0.82));
}
.site-info-cube-btn {
  border: 0;
  background: transparent;
  padding: 0;
  text-align: left;
}
.fdd-static-header h5 {
  margin: 0;
  font-size: 16px;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}
.fdd-toolbar {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 10px;
  margin-top: 12px;
  padding: 12px;
  border-radius: 14px;
  border: 1px solid rgba(169, 199, 255, 0.18);
  background: linear-gradient(180deg, rgba(19, 33, 61, 0.76), rgba(11, 19, 36, 0.82));
}
#fdd-search {
  height: 42px;
  border-radius: 10px;
  border: 1px solid rgba(195, 215, 255, 0.28);
  background: rgba(6, 13, 25, 0.75);
  color: #e8f0ff;
  padding: 0 12px;
  outline: none;
  transition: border-color 0.2s ease, box-shadow 0.2s ease;
}
#fdd-search:focus {
  border-color: rgba(125, 173, 255, 0.85);
  box-shadow: 0 0 0 3px rgba(84, 146, 255, 0.2);
}
#fdd-total {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 150px;
  padding: 0 12px;
  border-radius: 10px;
  background: rgba(8, 15, 29, 0.72);
  border: 1px solid rgba(195, 215, 255, 0.2);
  font-weight: 600;
}
.fdd-grid {
  margin-top: 14px;
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 14px;
}
.fdd-grid .site-panel {
  border-radius: 14px;
  border: 1px solid rgba(170, 202, 255, 0.2);
  background: linear-gradient(180deg, rgba(14, 23, 43, 0.88), rgba(9, 16, 31, 0.95));
}
#fdd-modal .profile-modal-content {
  min-width: min(1100px, 92vw);
  max-width: 92vw;
  max-height: 85vh;
  overflow: auto;
  border-radius: 16px;
  border: none;
  background: linear-gradient(180deg, rgba(9, 16, 30, 0.96), rgba(8, 14, 27, 0.98));
  box-shadow: 0 22px 70px rgba(0, 0, 0, 0.55);
  padding: 16px;
}
#fdd-modal {
  padding: 0;
  border: 0;
  background: transparent;
  box-shadow: none;
}
#fdd-modal::backdrop {
  background: rgba(2, 6, 14, 0.72);
  backdrop-filter: blur(3px);
}
.fdd-modal-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 4px;
}
.fdd-modal-head p {
  margin-top: 6px;
  font-size: 13px;
}
.fdd-close-btn {
  width: 38px;
  min-width: 38px;
  height: 38px;
  padding: 0;
  border-radius: 10px;
  border: 1px solid rgba(170, 202, 255, 0.35);
  background: rgba(17, 30, 56, 0.88);
  color: #e8f0ff;
  font-size: 24px;
  line-height: 1;
  display: inline-flex;
  align-items: center;
  justify-content: center;
}
.fdd-close-btn:hover {
  border-color: rgba(205, 225, 255, 0.75);
  background: rgba(36, 59, 101, 0.95);
}
.fdd-list {
  max-height: 62vh;
  overflow: auto;
  padding-left: 18px;
  margin: 0;
}
.fdd-list li {
  margin: 6px 0;
  color: #dce7ff;
}
.fdd-list a {
  color: #c3d7ff;
  text-decoration: none;
}
.fdd-list a:hover {
  color: #ffffff;
  text-decoration: underline;
}
mark.fdd-mark {
  background: #f4b740;
  color: #121212;
  border-radius: 4px;
  padding: 0 2px;
}
.site-info-admin-bar {
  margin-bottom: 14px;
  padding: 16px 18px;
}
.site-info-admin-title {
  font-size: 16px;
  margin: 0;
  color: #e8f0ff;
}
.site-info-admin-field {
  margin-top: 12px;
}
.site-info-admin-field label {
  display: block;
  font-size: 13px;
  margin-bottom: 6px;
  color: #bfd0f4;
}
.site-info-admin-textarea {
  width: 100%;
  box-sizing: border-box;
  min-height: 160px;
  padding: 10px 12px;
  border-radius: 10px;
  border: 1px solid rgba(94, 132, 201, 0.45);
  background: rgba(5, 14, 32, 0.85);
  color: #e8f0ff;
  font-family: inherit;
  font-size: 14px;
  line-height: 1.45;
  resize: vertical;
}
.site-info-admin-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 14px;
  align-items: center;
}
.site-info-admin-field input[type="file"] {
  font-size: 13px;
  color: #c6d6f5;
}
.site-info-admin-label-line {
  display: block;
  font-size: 13px;
  margin-bottom: 8px;
  color: #bfd0f4;
}
.site-info-admin-blocks {
  display: flex;
  flex-direction: column;
  gap: 12px;
}
.site-info-admin-add-block-btn {
  margin-top: 10px;
}
.site-info-admin-block {
  border: 1px solid rgba(118, 160, 236, 0.4);
  border-radius: 14px;
  padding: 14px 16px 16px;
  background: linear-gradient(165deg, rgba(14, 28, 58, 0.88), rgba(8, 18, 42, 0.9));
  box-shadow: 0 8px 28px rgba(0, 0, 0, 0.2);
}
.site-info-admin-paver-cap {
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: #7a9ee8;
  margin: 0 0 12px;
  padding-bottom: 10px;
  border-bottom: 1px solid rgba(118, 160, 236, 0.25);
}
.site-info-admin-block-head {
  margin-bottom: 10px;
}
.site-info-admin-block-label {
  display: block;
  font-size: 12px;
  margin-bottom: 6px;
  color: #9cb7ef;
}
.site-info-admin-block-title {
  width: 100%;
  box-sizing: border-box;
  padding: 8px 10px;
  border-radius: 8px;
  border: 1px solid rgba(94, 132, 201, 0.45);
  background: rgba(5, 14, 32, 0.85);
  color: #e8f0ff;
  font-size: 14px;
}
.site-info-admin-block-remove-image {
  margin-top: 8px;
  display: inline-block;
}
.site-info-admin-block-remove {
  margin-top: 10px;
}
.section-lore {
  display: flex;
  flex-direction: column;
}
.site-lore-window {
  margin-top: 14px;
  flex: 1;
  min-height: 0;
  border: 1px solid rgba(94, 132, 201, 0.35);
  border-radius: 14px;
  background: rgba(8, 18, 40, 0.72);
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.04);
  max-height: min(85vh, 1200px);
  overflow-y: auto;
  overflow-x: hidden;
  padding: 0;
}
.site-lore-single {
  padding: 20px 22px 24px;
}
.site-lore-lead {
  margin: 0 0 18px;
  font-size: 14px;
  line-height: 1.45;
}
.site-lore-heading {
  margin: 22px 0 10px;
  font-size: 18px;
  font-weight: 700;
  color: #e8f0ff;
  line-height: 1.35;
}
.site-lore-single > .site-lore-heading:first-child,
.site-lore-rule + .site-lore-heading {
  margin-top: 0;
}
.site-lore-kicker {
  display: block;
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  color: #9cb7ef;
  margin-bottom: 6px;
}
.site-lore-list {
  margin: 12px 0 0;
  padding-left: 1.15em;
  color: #c6d6f5;
  line-height: 1.6;
  font-size: 14px;
}
.site-lore-list li {
  margin-bottom: 8px;
}
.site-lore-list li:last-child {
  margin-bottom: 0;
}
.site-lore-single > p {
  margin: 0;
  color: #c6d6f5;
  line-height: 1.6;
  font-size: 14px;
}
.site-lore-single > p + p {
  margin-top: 12px;
}
.site-lore-rule {
  border: none;
  height: 1px;
  margin: 20px 0;
  background: linear-gradient(90deg, transparent, rgba(118, 160, 236, 0.35), transparent);
}
.site-lore-figure {
  margin: 0 0 12px;
  border-radius: 10px;
  overflow: hidden;
  border: 1px solid rgba(118, 160, 236, 0.35);
  background: rgba(5, 12, 28, 0.6);
}
.site-lore-figure img {
  display: block;
  width: 100%;
  height: auto;
  max-height: 220px;
  object-fit: cover;
  vertical-align: middle;
}
.site-lore-figure--placeholder {
  min-height: 120px;
  background:
    linear-gradient(135deg, rgba(74, 123, 231, 0.2) 0%, transparent 50%),
    linear-gradient(225deg, rgba(13, 27, 55, 0.9) 0%, rgba(20, 40, 80, 0.5) 100%);
}
.site-panel {
  border: 1px solid rgba(94, 132, 201, 0.3);
  border-radius: 12px;
  padding: 14px;
  background: rgba(11, 24, 50, 0.74);
}
.site-panel h4 { margin: 0; font-size: 17px; }
.site-panel p { margin-bottom: 0; color: #c6d6f5; line-height: 1.5; }
.site-tabs {
  margin-top: 14px;
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}
.site-tab-btn {
  width: auto;
  min-width: 130px;
  border-radius: 999px;
  border: 1px solid #3f5da7;
  background: rgba(16, 32, 66, 0.9);
  padding: 8px 14px;
}
.site-tab-btn.active {
  border-color: #5f84e0;
  background: linear-gradient(135deg, #3b63d1, #24439f);
}
.site-tab-content {
  display: none;
  margin-top: 12px;
  border: 1px solid rgba(94, 132, 201, 0.3);
  border-radius: 12px;
  background: rgba(11, 24, 50, 0.74);
  padding: 16px;
}
.site-tab-content.active { display: block; }
.site-faq {
  margin-top: 12px;
  display: grid;
  gap: 10px;
}
.site-faq summary {
  cursor: pointer;
  font-weight: 700;
}
.site-marquee-wrap {
  margin-top: 16px;
  border: 1px solid rgba(112, 154, 236, 0.32);
  border-radius: 12px;
  overflow: hidden;
  background: rgba(10, 25, 50, 0.7);
}
.site-marquee {
  display: flex;
  gap: 22px;
  padding: 11px 14px;
  width: max-content;
  animation: slideWords 16s linear infinite;
}
.site-marquee span {
  color: #d9e7ff;
  white-space: nowrap;
  font-size: 13px;
  font-weight: 700;
  padding: 4px 9px;
  border-radius: 999px;
  border: 1px solid rgba(123, 161, 234, 0.42);
  background: rgba(27, 49, 101, 0.7);
}
.site-feature-focus {
  margin-top: 14px;
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
}
.site-focus-panel {
  border: 1px solid rgba(118, 160, 236, 0.38);
  border-radius: 14px;
  padding: 16px;
  background:
    radial-gradient(420px 200px at 90% 0, rgba(129, 171, 255, 0.22), transparent 72%),
    linear-gradient(155deg, rgba(34, 68, 142, 0.31), rgba(12, 27, 56, 0.72));
}
.site-focus-panel h4 { margin: 0; font-size: 19px; }
.site-focus-panel p { margin: 8px 0 0; color: #d4e2ff; }
.site-final-cta {
  margin-top: 16px;
  border: 1px solid rgba(129, 169, 241, 0.45);
  border-radius: 14px;
  padding: 18px;
  background: linear-gradient(165deg, rgba(72, 112, 198, 0.34), rgba(13, 27, 56, 0.86));
  text-align: center;
}
.site-final-cta h4 { margin: 0; font-size: 26px; }
.site-final-cta p { color: #d6e4ff; }
#site-final-login-btn { width: auto; min-width: 230px; }
.section-reveal {
  opacity: 0;
  transform: translateY(18px);
  transition: opacity .45s ease, transform .45s ease;
}
.section-reveal.visible {
  opacity: 1;
  transform: translateY(0);
}
.site-pre {
  max-height: 420px; overflow: auto; margin: 10px 0 0;
  border: 1px solid var(--line); border-radius: 10px; background: #0d152a; padding: 12px;
  color: #dbe8ff; white-space: pre-wrap;
}
.profile-modal-content { min-width: 640px; max-width: 90vw; }
.site-profile-content { margin-top: 10px; max-height: 58vh; overflow: auto; padding-right: 4px; }
.profile-kpis { display:grid; grid-template-columns: repeat(4, 1fr); gap:10px; }
.profile-kpis .kpi p { font-size: 18px; margin: 6px 0 0; }
.layout { display:grid; grid-template-columns: 260px 1fr; min-height:100vh; }
.side { border-right:1px solid var(--line); background:var(--panel-2); padding:16px; }
.brand { margin-bottom:16px; }
.brand h1 { margin:0 0 4px; font-size:20px; }
.brand p { margin:0; color:var(--muted); font-size:12px; }
.tabs { display:flex; flex-direction:column; gap:8px; }
.tab-btn {
  border:1px solid var(--line); border-radius:10px; background:transparent; color:var(--text);
  padding:10px; text-align:left; cursor:pointer;
}
.tab-btn.active { background:linear-gradient(135deg, #3b63d1, #24439f); border-color:#446bda; }
.main { padding:20px; }
.topline { display:flex; justify-content:space-between; align-items:center; gap:12px; margin-bottom:14px; }
.auth-box { display:flex; align-items:center; gap:8px; }
.m0 { margin:0; }
.mt0 { margin-top:0; }
.mt10 { margin-top:10px; }
.mt12 { margin-top:12px; }
.mt16 { margin-top:16px; }
.align-end { display:flex; align-items:end; }
.muted { color: var(--muted); }
.grid { display:grid; grid-template-columns: 1fr 1fr; gap:16px; }
.grid-3 { display:grid; grid-template-columns: repeat(3,1fr); gap:16px; }
.grid-4 { display:grid; grid-template-columns: repeat(4,1fr); gap:16px; }
.card { background:linear-gradient(180deg, rgba(255,255,255,0.02), rgba(255,255,255,0)) ,var(--panel); border:1px solid var(--line); border-radius:12px; padding:16px; box-shadow: 0 8px 30px rgba(0,0,0,0.18); }
.kpi h3 { margin:0; font-size:13px; color:var(--muted); font-weight:500; }
.kpi p { margin:8px 0 0; font-size:28px; font-weight:700; }
.tab { display:none; }
.tab.active { display:block; }
label { display:block; font-size: 12px; color: var(--muted); margin: 0 0 6px; }
input, select, textarea, button {
  width:100%; border-radius:8px; border:1px solid var(--line); background:#0f1528; color:var(--text); padding:10px;
}
textarea { min-height: 90px; resize: vertical; }
button { cursor:pointer; background:#1b2645; font-weight:600; transition: all .15s ease; }
button:hover { border-color:#3b4f89; }
.btn-danger { background:#432033; border-color:#6d324f; }
.btn-soft { background:#17213c; }
.row { display:grid; grid-template-columns: repeat(2,1fr); gap:10px; }
.row-3 { display:grid; grid-template-columns: repeat(3,1fr); gap:10px; }
.table { width:100%; border-collapse: collapse; font-size: 14px; }
.table th,.table td { border-bottom:1px solid var(--line); padding:8px; text-align:left; }
.table th { color:var(--muted); font-size:12px; }
.mono { font-family: ui-monospace, SFMono-Regular, Menlo, monospace; }
.status { margin-top:8px; font-size:13px; }
.ok { color: var(--ok); } .warn { color: var(--warn); } .danger { color: var(--danger); }
.emoji {
  width: 18px;
  height: 18px;
  vertical-align: -3px;
}
.profile-pill {
  display:flex; align-items:center; gap:8px; padding:6px 10px;
  border:1px solid var(--line); border-radius:999px; background:#0f1528; cursor:pointer;
}
.avatar { width:24px; height:24px; border-radius:999px; object-fit:cover; }
.hidden { display:none !important; }
.login-form { min-width:320px; display:flex; flex-direction:column; gap:8px; }
@media (max-width: 1080px){
  .layout { grid-template-columns: 1fr; }
  .side { border-right:none; border-bottom:1px solid var(--line); }
  .tabs { flex-direction:row; flex-wrap:wrap; }
  .tab-btn { flex: 1 1 45%; }
  .grid, .grid-3, .grid-4, .row, .row-3 { grid-template-columns: 1fr; }
  .profile-kpis { grid-template-columns: 1fr 1fr; }
  .site-topbar { flex-wrap: wrap; }
  .site-nav { order: 3; width: 100%; justify-content: flex-start; overflow-x: auto; }
  .site-main { padding-top: 22px; }
  .site-feature-grid, .site-hero-kpis, .site-hero-showcase, .site-feature-focus { grid-template-columns: 1fr; }
  .site-lore-window { max-height: min(78vh, 960px); }
  .site-hero h2 { font-size: 34px; }
  .site-hero, .site-section { min-height: auto; }
}
@keyframes siteWave {
  0%, 100% { transform: translateX(0) translateY(0); }
  50% { transform: translateX(-3%) translateY(-8px); }
}
@keyframes floatCard {
  0%, 100% { transform: translateY(0); }
  50% { transform: translateY(-6px); }
}
@keyframes slideWords {
  0% { transform: translateX(0); }
  100% { transform: translateX(-40%); }
}
@keyframes barRise {
  from { transform: scaleY(0.2); transform-origin: bottom; opacity: .4; }
  to { transform: scaleY(1); transform-origin: bottom; opacity: 1; }
}

/* -------- Pro refresh (site only) -------- */
.site-body {
  --site-bg-1: #060b17;
  --site-bg-2: #0a1630;
  --site-panel: rgba(13, 24, 49, 0.82);
  --site-border: rgba(134, 170, 242, 0.25);
  --site-text-soft: #c7d8fb;
  --site-glow: 0 20px 70px rgba(5, 11, 28, 0.6);
  background:
    linear-gradient(180deg, rgba(5, 11, 26, 0.58), rgba(7, 16, 36, 0.7) 45%, rgba(9, 20, 42, 0.82) 100%),
    url("/img/fond.jpg");
  background-size: cover;
  background-position: center center;
  background-attachment: fixed;
}
.site-topbar {
  border-bottom-color: var(--site-border);
  background: rgba(7, 13, 29, 0.72);
  box-shadow: 0 8px 30px rgba(0, 0, 0, 0.2);
}
.site-brand h1 {
  font-size: 24px;
  letter-spacing: .01em;
}
.site-brand p {
  color: var(--site-text-soft);
}
.site-main {
  max-width: 1240px;
  padding: 38px 28px 80px;
}
.site-main section[id] {
  scroll-margin-top: 110px;
}
.site-nav {
  background: rgba(17, 27, 54, 0.82);
  border-color: rgba(160, 192, 255, 0.25);
}
.site-nav-link {
  min-width: 100px;
  font-size: 12px;
  text-transform: uppercase;
  letter-spacing: .06em;
}
.site-hero {
  background:
    linear-gradient(145deg, rgba(21, 45, 95, 0.4), rgba(7, 16, 36, 0.78)),
    radial-gradient(500px 300px at 84% 20%, rgba(119, 163, 250, 0.28), transparent 66%);
  border-color: var(--site-border);
  border-radius: 22px;
  box-shadow: var(--site-glow);
}
.site-chip {
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: .09em;
}
.site-hero h2 {
  font-size: clamp(34px, 4.4vw, 56px);
  margin-bottom: 12px;
}
.site-hero > p {
  font-size: 18px;
  line-height: 1.7;
  max-width: 860px;
  color: var(--site-text-soft);
}
.site-showcase-card,
.site-kpi-card,
.site-panel,
.site-focus-panel,
.site-final-cta,
.site-news-card {
  border-color: var(--site-border);
  box-shadow: 0 10px 35px rgba(0, 0, 0, 0.24);
}
.site-showcase-card:hover,
.site-news-card:hover,
.site-panel:hover,
.site-focus-panel:hover {
  transform: translateY(-4px);
  transition: transform .2s ease, border-color .2s ease;
  border-color: rgba(159, 194, 255, 0.45);
}
.site-section {
  border-color: var(--site-border);
  border-radius: 20px;
  box-shadow: var(--site-glow);
}
.site-section-head h3 {
  font-size: clamp(28px, 3.2vw, 40px);
}
.site-section-head p {
  font-size: 16px;
  color: var(--site-text-soft);
}
.site-tab-content {
  background:
    radial-gradient(420px 220px at 90% 0, rgba(129, 171, 255, 0.2), transparent 72%),
    rgba(11, 24, 50, 0.74);
}
.site-faq details {
  transition: border-color .2s ease, transform .2s ease;
}
.site-faq details:hover {
  border-color: rgba(159, 194, 255, 0.45);
  transform: translateX(2px);
}
.site-news-grid {
  margin-top: 14px;
  display: grid;
  gap: 14px;
  grid-template-columns: repeat(3, minmax(0, 1fr));
}
.site-news-card {
  overflow: hidden;
  border: 1px solid var(--site-border);
  border-radius: 16px;
  background: var(--site-panel);
}
.site-news-cover {
  height: 156px;
  border-bottom: 1px solid var(--site-border);
  background-size: cover;
}
.site-news-cover.cover-a {
  background:
    radial-gradient(250px 140px at 70% 24%, rgba(173, 208, 255, 0.42), transparent 70%),
    linear-gradient(160deg, #18408e, #0f285a 54%, #0a1a38);
}
.site-news-cover.cover-b {
  background:
    radial-gradient(240px 140px at 40% 14%, rgba(251, 205, 138, 0.25), transparent 66%),
    linear-gradient(165deg, #3f2a63, #1b2556 55%, #111f43);
}
.site-news-cover.cover-c {
  background:
    radial-gradient(260px 130px at 50% 20%, rgba(132, 241, 230, 0.25), transparent 66%),
    linear-gradient(160deg, #0b4b67, #0f325d 58%, #0b1f39);
}
.site-news-content {
  padding: 14px;
}
.site-news-badge {
  margin: 0 0 8px;
  color: #a6c2ff;
  text-transform: uppercase;
  letter-spacing: .08em;
  font-size: 11px;
  font-weight: 700;
}
.site-news-content h4 {
  margin: 0;
  font-size: 20px;
}
.site-news-content p {
  margin: 8px 0 0;
  color: var(--site-text-soft);
  line-height: 1.55;
}

.item-thumb {
  width: 40px;
  height: 40px;
  object-fit: contain;
  border-radius: 10px;
  border: 1px solid rgba(118, 160, 236, 0.35);
  background: rgba(5, 12, 28, 0.55);
  vertical-align: middle;
}

.item-thumb-preview {
  width: 220px;
  max-width: 100%;
  max-height: 160px;
  object-fit: contain;
  border-radius: 12px;
  border: 1px solid rgba(118, 160, 236, 0.35);
  background: rgba(5, 12, 28, 0.55);
}

@media (max-width: 1080px){
  .site-news-grid { grid-template-columns: 1fr; }
  .site-main { padding: 22px 16px 70px; }
  .site-home-panel { grid-template-columns: 1fr; }
  .fdd-toolbar { grid-template-columns: 1fr; }
  .fdd-grid { grid-template-columns: 1fr; }
  #fdd-modal .profile-modal-content {
    min-width: 96vw;
    max-width: 96vw;
    max-height: 88vh;
    padding: 12px;
  }
}

/* one-tab mode */
.site-main.single-view .section-reveal {
  display: none;
}
.site-main.single-view .section-reveal.section-visible {
  display: block;
  opacity: 1;
  transform: translateY(0);
}
