/* =========================================================
   CASTRO • JOIN.CSS (based on order.css, stable + premium)
   - НЕ міняє HTML/структуру
   - фон як в order.css: html::before/after (без плитки/бліків)
   - topbar як в order.css
   - cards/sections/inputs/btn в одному стилі
   - Discord профіль: справа fixed (як було)
   ========================================================= */

/* ============ TOKENS (order.css base) ============ */
:root{
  --bg0:#07070b;
  --bg1:#0b0b10;

  --text:#f3f3f6;
  --muted:rgba(243,243,246,.80);

  --red:#e0182d;

  --glass: rgba(8,8,12,.62);
  --glass2: rgba(4,4,7,.48);
  --stroke: rgba(255,255,255,.12);

  --shadow1: 0 18px 70px rgba(0,0,0,.55);
  --shadow2: 0 10px 30px rgba(0,0,0,.35);

  --r: 22px;
  --max: 1220px;

  /* join-specific */
  --aside: 420px;
  --gap: 14px;
}

*{ box-sizing:border-box; }
html,body{ height:100%; }

/* ===== STABLE BACKGROUND (like order.css) ===== */
html{ background:#050507; }
html::before{
  content:"";
  position: fixed;
  inset:0;
  pointer-events:none;
  z-index:-20;

  background:
    radial-gradient(1400px 900px at 12% 10%, rgba(224,24,45,.20), transparent 62%),
    radial-gradient(1200px 800px at 86% 26%, rgba(224,24,45,.12), transparent 65%),
    linear-gradient(180deg, #0b0b10, #050507);

  transform: translateZ(0);
}
html::after{
  content:"";
  position: fixed;
  inset:0;
  pointer-events:none;
  z-index:-19;

  background: radial-gradient(circle at 30% 20%, rgba(255,255,255,.035), transparent 55%);
  opacity:.35;
  transform: translateZ(0);
}

body{
  margin:0;
  font-family: system-ui,-apple-system,Segoe UI,Roboto,Ubuntu,"Helvetica Neue",Arial;
  color: var(--text);
  background: transparent;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;

  min-height:100vh;
  overflow-x:hidden;
  position: relative;
  isolation: isolate;
}

a{ color:inherit; text-decoration:none; }
img{ max-width:100%; display:block; }

.muted{ color: var(--muted); }
.small{ font-size:.88rem; }

select option{ background:#0b0b10; color: var(--text); }

/* ============ CONTAINER / WRAP ============ */
.container,
.wrap{
  width: min(var(--max), 94vw);
  margin: 0 auto;
}

/* ============ TOPBAR (order.css style) ============ */
header.topbar,
.topbar{
  width: min(var(--max), 94vw);
  margin: 18px auto 14px;
  padding: 10px 14px;

  display:grid;
  grid-template-columns: auto 1fr auto;
  align-items:center;
  gap:12px;

  border-radius: 999px;
  border: 1px solid rgba(255,255,255,.10);
  background: rgba(0,0,0,.35);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  box-shadow: 0 18px 70px rgba(0,0,0,.35);

  transform: translateZ(0);
  position: relative;
  z-index: 5;
}

.topbar__title{
  text-align:center;
  font-weight: 1000;
  letter-spacing: .2px;
  color: rgba(255,255,255,.92);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.topbar__meta{
  display:flex;
  gap: 8px;
  align-items:center;
  flex-wrap: wrap;
  justify-content:flex-end;
  max-width: 520px;
}

.back{
  display:inline-flex;
  align-items:center;
  gap:8px;
  padding:8px 12px;
  border-radius:999px;
  font-weight:900;
  font-size:.88rem;
  color:rgba(255,255,255,.92);

  background: rgba(0,0,0,.28);
  border:1px solid rgba(255,255,255,.14);
  backdrop-filter: blur(6px);
  -webkit-backdrop-filter: blur(6px);
  transition: .18s;
}
.back:hover{ transform: translateY(-1px); background: rgba(255,255,255,.08); }

.chip{
  display:inline-flex;
  align-items:center;
  gap:8px;
  padding:7px 10px;
  border-radius:999px;
  border: 1px solid rgba(255,255,255,.10);
  background: rgba(255,255,255,.06);
  color: rgba(255,255,255,.85);
  font-weight: 900;
  font-size: .82rem;
  transition:.18s;
}
a.chip:hover{ transform: translateY(-1px); background: rgba(255,255,255,.10); }

@media (max-width: 900px){
  header.topbar,
  .topbar{
    grid-template-columns: 1fr;
    gap:10px;
    border-radius: 18px;
  }
  .topbar__title{ text-align:left; }
  .topbar__meta{ justify-content:flex-start; max-width:none; }
}

/* ============ JOIN GRID (same idea as orderGrid) ============ */
.grid{
  display:grid;
  grid-template-columns: minmax(0, 1fr) var(--aside);
  gap: var(--gap);
  margin-top: 16px;
  padding-bottom: 16px;
  align-items:start;
}
@media (max-width: 980px){
  .grid{ grid-template-columns: 1fr; }
}

/* ============ CARDS (order.css card) ============ */
.card{
  background: linear-gradient(180deg, var(--glass), var(--glass2));
  border: 1px solid var(--stroke);
  border-radius: var(--r);
  box-shadow: var(--shadow2);
  overflow:hidden;

  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);

  transition: transform .18s ease, border-color .18s ease, box-shadow .18s ease;
  transform: translateZ(0);
}
.card:hover{
  transform: translateY(-2px) translateZ(0);
  border-color: rgba(255,255,255,.18);
  box-shadow: 0 22px 70px rgba(0,0,0,.55);
}

/* main/side */
.mainCard{}
.sideCard{
  position: sticky;
  top: 22px;
}
@media (max-width: 980px){
  .sideCard{ position: static; top:auto; }
}

/* ============ MAIN HEADER (head/body pattern) ============ */
.mainCard .head{
  padding: 18px 18px 16px;
  border-bottom: 1px solid rgba(255,255,255,.08);
  text-align:center;

  background:
    radial-gradient(900px 360px at 18% -140px, rgba(224,24,45,.20), transparent 70%);
}
.brandText{ max-width: 860px; margin: 0 auto; }

.title{
  margin: 6px 0 6px;
  font-weight: 1000;
  letter-spacing: .2px;
  line-height: 1.12;
  font-size: clamp(28px, 2.4vw, 40px);
}
.sub{
  margin: 0 auto;
  max-width: 760px;
  color: rgba(243,243,246,.78);
  line-height:1.5;
  font-weight: 700;
  font-size: .95rem;
}

.pillbar,
.cats{
  display:flex;
  flex-wrap:wrap;
  gap:10px;
  justify-content:center;
  margin-top: 12px;
}
.pillbar .pill,
.cats .chip{
  user-select:none;
  cursor:default;
  padding:10px 12px;
  font-size:.86rem;
}
.cats .chip{ cursor:pointer; }
.cats .chip:hover{ transform: translateY(-1px); }
.cats .chip.active{
  border-color: rgba(224,24,45,.55);
  background: rgba(224,24,45,.12);
  box-shadow: 0 10px 28px rgba(224,24,45,.10);
}

.mainCard .body{ padding: 16px 16px 18px; }

/* ============ SECTIONS (like obox + card inset) ============ */
.section{
  padding: 14px;
  border-radius: 18px;
  border: 1px solid rgba(255,255,255,.10);
  background: rgba(0,0,0,.28);
  margin-top: 14px;
}
.section h3{
  margin: 0 0 10px;
  font-weight: 1000;
  letter-spacing: .2px;
  display:flex;
  align-items:center;
  gap:10px;
}
.dot{
  width:10px;height:10px;border-radius:50%;
  background: var(--red);
  box-shadow: 0 0 0 5px rgba(224,24,45,.12);
}

/* ============ FORM GRID ============ */
.row{
  display:grid;
  grid-template-columns: 1fr 1fr;
  gap:10px;
}
/* row only-child span */
.row > .field:only-child{ grid-column: 1 / -1; }
@media (max-width: 620px){
  .row{ grid-template-columns: 1fr; }
  .row > .field:only-child{ grid-column: auto; }
}

.field{ min-width:0; }
label{ display:block; font-weight:900; margin:0 0 6px; }

.inp, select, textarea,
input, textarea{
  width:100%;
  padding:12px 12px;
  border-radius:14px;
  border:1px solid rgba(255,255,255,.12);
  background: rgba(0,0,0,.18);
  color:var(--text);
  outline:none;
  font-weight:700;
}

.inp:focus-visible, select:focus-visible, textarea:focus-visible,
input:focus-visible, textarea:focus-visible{
  border-color: rgba(224,24,45,.50);
  box-shadow: 0 0 0 3px rgba(224,24,45,.12);
}

textarea{ min-height:90px; resize:vertical; }

.hint{
  margin:6px 0 0;
  font-size:.85rem;
  color:rgba(243,243,246,.62);
  font-weight:700;
}

/* ============ PHOTO BLOCK (mapped to your existing classes) ============ */
.photoRow{
  display:grid;
  grid-template-columns: 380px minmax(0,1fr);
  gap: 14px;
  align-items: start;
  margin-top: 12px;
}
@media (max-width: 980px){
  .photoRow{ grid-template-columns: 1fr; }
}

.photo.photo--head{ background:transparent; border:0; box-shadow:none; padding:0; }

.photo__frame{
  min-height: 220px;
  border-radius: 18px;
  border:1px dashed rgba(255,255,255,.14);
  background: rgba(0,0,0,.12);
  display:grid;
  place-items:center;
  overflow:hidden;
  transition:.18s;
}
.photo__frame:hover{
  transform: translateY(-2px);
  border-color: rgba(224,24,45,.35);
  background: rgba(255,255,255,.04);
}

.photo__img{ width:100%; height:100%; object-fit:cover; display:none; }

.photo__placeholder{
  text-align:center;
  color: rgba(243,243,246,.80);
  font-weight: 900;
  display:grid;
  gap:6px;
}
.photo__icon{ font-size: 22px; opacity:.9; }
.photo__title{ font-weight: 1000; }
.photo__sub{ font-weight: 800; opacity:.7; font-size:.85rem; }

.photo__btn, .photo__remove,
.photoRemove, .photo__removeBtn{
  display:inline-flex;
  align-items:center;
  justify-content:center;
  gap:8px;
  padding: 10px 12px;
  border-radius: 16px;
  border:1px solid rgba(255,255,255,.12);
  background: rgba(255,255,255,.08);
  color: var(--text);
  font-weight: 1000;
  cursor:pointer;
  transition:.18s;
}
.photo__btn:hover, .photo__remove:hover,
.photoRemove:hover{
  transform: translateY(-2px);
  background: rgba(255,255,255,.12);
}

.photoInfo{
  padding: 14px;
  border-radius: 18px;
  border: 1px solid rgba(255,255,255,.10);
  background: rgba(0,0,0,.12);
}
.photoInfo h3{ margin:0 0 10px; font-weight:1000; }
.photoInfo__list{ margin: 0; padding-left: 18px; color: rgba(243,243,246,.78); }
.photoInfo__list li{ margin: 6px 0; }
.photoInfo__note,
.note{
  margin-top: 10px;
  padding: 10px 12px;
  border-radius: 16px;
  border:1px solid rgba(224,24,45,.35);
  background: rgba(224,24,45,.10);
  font-weight: 1000;
}

/* ============ AGREE / ACTIONS / OK ============ */
.agree, .actions{
  padding: 14px;
  border-radius: 18px;
  border: 1px solid rgba(255,255,255,.10);
  background: rgba(0,0,0,.12);
  margin-top: 14px;
}

.actions{
  display:flex;
  gap:10px;
  align-items:center;
  justify-content:space-between;
}
@media (max-width: 560px){
  .actions{ flex-direction:column; align-items:stretch; }
}

.btn{
  cursor:pointer;
  width:auto;
  padding:12px 14px;
  border-radius:16px;
  border:1px solid rgba(255,255,255,.12);
  background: rgba(255,255,255,.08);
  color:var(--text);
  font-weight:1000;
  transition:.18s;
}
.btn:hover{ transform:translateY(-2px); }
.btn.primary, .btn--primary{
  background:
    radial-gradient(120% 140% at 20% 10%, rgba(255,80,95,.35), transparent 55%),
    linear-gradient(180deg, rgba(224,24,45,.95), rgba(160,12,28,.95));
  box-shadow: 0 10px 28px rgba(224,24,45,.25);
}
.btn.primary:hover, .btn--primary:hover{ box-shadow: 0 14px 36px rgba(224,24,45,.32); }
.btn:disabled{ opacity:.55; cursor:not-allowed; transform:none; }

.status{
  font-weight:900;
  color:rgba(243,243,246,.85);
  white-space:pre-wrap;
}

/* success block */
.ok{
  display:none;
  margin-top: 12px;
  padding: 14px;
  border-radius: 18px;
  border: 1px solid rgba(55,255,167,.20);
  background: rgba(55,255,167,.08);
}
.ok h4{ margin:0 0 6px; font-weight:1000; }
.ok p{ margin:0; color: rgba(243,243,246,.78); }

/* ============ SIDEBAR CONTENT ============ */
.mini h3{ margin:0 0 10px; font-weight:1000; }
.list{ margin: 10px 0 0; padding-left: 18px; color: rgba(243,243,246,.78); line-height:1.55; font-weight:700; }
.rule{
  margin-top: 10px;
  padding: 12px;
  border-radius: 18px;
  border:1px solid rgba(224,24,45,.35);
  background: rgba(224,24,45,.10);
  font-weight: 1000;
}
.tag{
  display:inline-flex;
  margin-top: 12px;
  padding: 8px 12px;
  border-radius: 999px;
  border: 1px solid rgba(255,255,255,.10);
  background: rgba(255,255,255,.06);
  font-weight: 1000;
  font-size: .86rem;
}

/* ============ FOOTER ============ */
.footer{
  margin-top: 12px;
  padding-top: 14px;
  border-top: 1px solid rgba(255,255,255,.08);
  color: rgba(245,245,250,.68);
  text-align:center;
}

/* ============ CASTRO INLINE LOGO ============ */
.castro--logo{
  display:inline-flex;
  align-items:center;
  gap:6px;
}
.castroLogo{
  width:20px; height:20px;
  object-fit:contain;
  border-radius:6px;
  transform: translateY(1px);
}
.castro--logo:hover .castroLogo{
  transform: translateY(1px) scale(1.08);
}
.castro{
  color: var(--red);
  font-weight: 1000;
  letter-spacing: .4px;
}

/* ============ AUTH TIP (keep) ============ */
.authtip{ z-index: 99999 !important; }
.authtip__arrow span{
  border-right-color: #ff2a3d !important;
  border-bottom-color: #ff2a3d !important;
  filter:
    drop-shadow(0 0 6px rgba(255,42,61,.8))
    drop-shadow(0 0 14px rgba(255,42,61,.6));
}
.authtip__bubble{
  background:
    radial-gradient(220px 140px at 30% 20%, rgba(255,42,61,.35), transparent 60%),
    rgba(8,8,12,.92) !important;
  border-color: rgba(255,42,61,.55) !important;
}
.authtip.is-open #auth-login{
  box-shadow:
    0 0 0 2px rgba(255,42,61,.55),
    0 0 32px rgba(255,42,61,.65) !important;
}

/* ============ REDUCED MOTION ============ */
@media (prefers-reduced-motion: reduce){
  *{ transition:none !important; }
  .vload{ transition: opacity .55s ease, visibility .55s ease !important; }
}

/* =========================
   1) Hide honeypot fields
   ========================= */
.hp,
.honeypot,
.hiddenField,
input[name="website"],
input[name="url"],
input[name="homepage"]{
  display:none !important;
}

/* =========================
   2) Category chips (RP / Contracts / Comms)
   ========================= */
.cats,
.pillbar{
  display:flex;
  flex-wrap:wrap;
  gap:10px;
  justify-content:center;
  margin: 14px 0 6px;
}

.cats .chip,
.pillbar .pill{
  display:inline-flex;
  align-items:center;
  gap:8px;

  padding: 10px 14px;
  border-radius: 999px;

  border: 1px solid rgba(255,255,255,.12);
  background: rgba(0,0,0,.22);
  color: rgba(243,243,246,.88);

  font-weight: 1000;
  font-size: .86rem;
  line-height: 1;

  box-shadow: 0 10px 30px rgba(0,0,0,.22);
  transition: transform .18s ease, background .18s ease, border-color .18s ease, box-shadow .18s ease;
}

.cats .chip:hover,
.pillbar .pill:hover{
  transform: translateY(-1px);
  background: rgba(255,255,255,.08);
  border-color: rgba(255,255,255,.18);
  box-shadow: 0 14px 40px rgba(0,0,0,.30);
}

/* active (if JS toggles .active) */
.cats .chip.active,
.pillbar .pill.active{
  border-color: rgba(224,24,45,.55);
  background: rgba(224,24,45,.12);
  box-shadow: 0 16px 44px rgba(224,24,45,.18);
}

/* small red underline accent (premium) */
.cats .chip.active::after,
.pillbar .pill.active::after{
  content:"";
  width: 10px;
  height: 10px;
  border-radius: 50%;
  background: rgba(224,24,45,.95);
  box-shadow: 0 0 0 5px rgba(224,24,45,.12);
  margin-left: 2px;
}

/* =========================
   3) Agree block (checkbox premium)
   ========================= */
.agree{
  display:flex;
  flex-direction:column;
  gap:10px;
}

.agree label,
.agree__box{
  display:flex;
  align-items:flex-start;
  gap:12px;

  font-weight: 900;
  color: rgba(243,243,246,.88);
  line-height: 1.35;

  cursor:pointer;
  user-select:none;
}

/* якщо в тебе структура .agree__box input + .agree__tick */
.agree__box input{
  position:absolute;
  opacity:0;
  pointer-events:none;
}

.agree__tick{
  width:22px;
  height:22px;
  border-radius:8px;
  flex: 0 0 22px;
  margin-top: 2px;

  border: 1px solid rgba(255,255,255,.16);
  background: rgba(0,0,0,.25);
  box-shadow: inset 0 0 0 1px rgba(255,255,255,.05);

  display:grid;
  place-items:center;

  transition: .18s;
}

.agree__box input:checked + .agree__tick{
  border-color: rgba(224,24,45,.55);
  background: rgba(224,24,45,.18);
  box-shadow: 0 0 0 4px rgba(224,24,45,.12);
}
.agree__box input:checked + .agree__tick::after{
  content:"✓";
  font-weight: 1000;
  color:#fff;
  transform: translateY(-1px);
}

/* якщо у тебе простий <input type="checkbox"> в label (без .agree__tick) */
.agree input[type="checkbox"]{
  width:18px;
  height:18px;
  margin-top: 2px;
  accent-color: var(--red);
}

/* details/summary rules (якщо є) */
.agree__details summary{
  list-style:none;
  cursor:pointer;
  font-weight:1000;
  color: rgba(243,243,246,.78);
  display:flex;
  align-items:center;
  gap:10px;
}
.agree__details summary::-webkit-details-marker{ display:none; }
.agree__details summary::after{
  content:"▾";
  margin-left:auto;
  opacity:.75;
  transition: transform .18s ease, opacity .18s ease;
}
.agree__details[open] summary::after{
  transform: rotate(180deg);
  opacity:.95;
}

.agree__rules{
  padding: 12px;
  border-radius: 16px;
  border: 1px solid rgba(224,24,45,.20);
  background: rgba(224,24,45,.08);
  color: rgba(243,243,246,.78);
  line-height: 1.55;
}

/* =========================
   4) Sidebar "Перед відправкою" polish
   ========================= */
.sideCard{
  padding: 16px;
}

.sideCard h3{
  margin: 0 0 10px;
  font-weight: 1000;
  letter-spacing: .2px;
  display:flex;
  align-items:center;
  gap:10px;
}

.sideCard p{
  margin: 0 0 10px;
  color: rgba(243,243,246,.75);
  line-height: 1.5;
  font-weight: 700;
  font-size: .92rem;
}

.sideCard ul,
.sideCard .list{
  margin: 10px 0 0;
  padding-left: 18px;
  color: rgba(243,243,246,.76);
  line-height: 1.55;
  font-weight: 750;
  font-size: .92rem;
}
.sideCard li{ margin: 6px 0; }

/* warning badge (якщо є .rule) */
.sideCard .rule{
  margin-top: 12px;
  padding: 12px;
  border-radius: 18px;

  border: 1px solid rgba(224,24,45,.28);
  background: rgba(224,24,45,.10);

  font-weight: 1000;
  color: rgba(255,255,255,.90);
}

/* tag */
.sideCard .tag{
  display:inline-flex;
  align-items:center;
  gap:8px;

  margin-top: 12px;
  padding: 8px 12px;
  border-radius: 999px;

  border: 1px solid rgba(255,255,255,.10);
  background: rgba(255,255,255,.06);

  font-weight: 1000;
  font-size: .86rem;
  color: rgba(255,255,255,.90);
}

/* =========================================================
   FILE INPUT — hide native control (use custom frame only)
   ========================================================= */

/* повністю ховаємо нативний file input */
input[type="file"],
input[type="file"]::-webkit-file-upload-button,
input[type="file"]::file-selector-button{
  display: none !important;
  opacity: 0 !important;
  pointer-events: none !important;
}

/* страховка, якщо input все ще займає місце */
input[type="file"]{
  position: absolute !important;
  width: 1px !important;
  height: 1px !important;
  margin: -1px !important;
  padding: 0 !important;
  border: 0 !important;
  clip: rect(0 0 0 0) !important;
  overflow: hidden !important;
  white-space: nowrap !important;
}

.porders__json {
  display: none; /* Сховати JSON */
}

/* =========================================================
   AUTH — keep ORDER logic (hidden class controls visibility)
   ========================================================= */

/* hidden MUST win */
#auth-box .hidden,
#auth-login.hidden,
#auth-user.hidden{
  display: none !important;
}

/* dock container */
#auth-box.auth{
  position: fixed !important;
  top: 14px !important;
  right: 14px !important;
  left: auto !important;
  bottom: auto !important;

  z-index: 99999 !important;
  display: flex !important;
  align-items: center !important;
  gap: 10px !important;

  padding: 0 !important;
  margin: 0 !important;

  background: transparent !important;
  border: 0 !important;
  box-shadow: none !important;
}

/* login chip (do NOT force visibility) */
#auth-login.auth__btn{
  /* display НЕ чіпаємо — хай буде як в HTML/JS */
  align-items:center;
  gap:10px;

  padding: 10px 12px;
  border-radius: 999px;

  border: 1px solid rgba(255,255,255,.12);
  background: rgba(0,0,0,.35);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);

  color: rgba(243,243,246,.92);
  font-weight: 1000;
  line-height: 1;

  box-shadow: 0 18px 70px rgba(0,0,0,.35);
  cursor: pointer;
  transition: transform .18s ease, background .18s ease, border-color .18s ease;
}
#auth-login.auth__btn{ display:inline-flex; } /* ок, але без !important */
#auth-login:hover{
  transform: translateY(-1px);
  background: rgba(255,255,255,.10);
  border-color: rgba(255,255,255,.18);
}
#auth-login .auth__discord{ width:18px; height:18px; opacity:.95; }

/* user chip (do NOT override hidden) */
#auth-user.auth__user{
  display:inline-flex; /* без !important */
  align-items:center;
  gap:10px;

  padding: 10px 12px;
  border-radius: 999px;

  border: 1px solid rgba(255,255,255,.12);
  background: rgba(0,0,0,.35);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);

  color: rgba(243,243,246,.92);
  font-weight: 1000;
  line-height: 1;

  box-shadow: 0 18px 70px rgba(0,0,0,.35);
  transition: transform .18s ease, background .18s ease, border-color .18s ease;
}
#auth-user:hover{
  transform: translateY(-1px);
  background: rgba(255,255,255,.10);
  border-color: rgba(255,255,255,.18);
}
#auth-avatar.auth__avatar{
  width:26px; height:26px; border-radius:50%; object-fit:cover;
}
#auth-logout.auth__logout{
  padding: 6px 8px;
  border-radius: 10px;
  border: 1px solid rgba(255,255,255,.12);
  background: rgba(255,255,255,.06);
  color: rgba(255,255,255,.85);
  cursor:pointer;
}
#auth-logout:hover{ background: rgba(255,255,255,.10); }

/* Discord Join Button */
.discord {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 10px;

  margin-top: 16px;
  padding: 14px 28px;

  font-size: 16px;
  font-weight: 700;
  letter-spacing: 0.3px;
  text-decoration: none;

  color: #fff;
  background: linear-gradient(135deg, #5865F2, #4752C4);
  border-radius: 14px;

  box-shadow:
    0 10px 30px rgba(88, 101, 242, 0.45),
    inset 0 0 0 1px rgba(255,255,255,0.08);

  transition:
    transform 0.18s ease,
    box-shadow 0.18s ease,
    filter 0.18s ease;
}

/* Discord icon (optional, якщо додаси svg) */
.discord::before {
  content: "";
  width: 22px;
  height: 22px;
  background: url("/assets/discord.svg") center / contain no-repeat;
  filter: brightness(0) invert(1);
}

/* Hover */
.discord:hover {
  transform: translateY(-2px);
  filter: brightness(1.08);
  box-shadow:
    0 16px 40px rgba(88, 101, 242, 0.65),
    inset 0 0 0 1px rgba(255,255,255,0.12);
}

/* Active */
.discord:active {
  transform: translateY(0);
  box-shadow:
    0 8px 20px rgba(88, 101, 242, 0.45),
    inset 0 0 0 1px rgba(255,255,255,0.2);
}

/* Mobile */
@media (max-width: 480px) {
  .discord {
    width: 100%;
    font-size: 15px;
    padding: 14px 20px;
  }
}

/* ===== Join: Dynamic progress ===== */
.jprog{
  margin-top:14px;
  padding:12px 14px;
  border-radius:16px;
  background: rgba(255,255,255,.04);
  border: 1px solid rgba(255,255,255,.08);
  backdrop-filter: blur(10px);
}
.jprog__top{
  display:flex;
  justify-content:space-between;
  align-items:center;
  gap:12px;
  font-size:14px;
  opacity:.9;
  margin-bottom:10px;
}
.jprog__bar{
  height:10px;
  border-radius:999px;
  background: rgba(255,255,255,.10);
  overflow:hidden;
}
.jprog__fill{
  height:100%;
  width:0%;
  background: linear-gradient(90deg, rgba(224,24,45,.9), rgba(255,90,102,.9));
  border-radius:999px;
  transition: width .35s ease;
}
.jprog__steps{
  display:flex;
  gap:8px;
  flex-wrap:wrap;
  margin-top:10px;
}
.jstep{
  padding:6px 10px;
  border-radius:999px;
  font-size:12px;
  border: 1px solid rgba(255,255,255,.10);
  background: rgba(255,255,255,.03);
  opacity:.75;
  transition: transform .2s ease, opacity .2s ease, border-color .2s ease, background .2s ease;
  cursor:pointer;
  user-select:none;
}
.jstep:hover{ transform: translateY(-1px); opacity:.95; }
.jstep.is-done{
  opacity:1;
  border-color: rgba(224,24,45,.45);
  background: rgba(224,24,45,.12);
}
.jstep.is-active{
  opacity:1;
  border-color: rgba(255,255,255,.24);
  background: rgba(255,255,255,.06);
}

/* section feedback (less jerk) */
.section{
  border-radius: 18px;
  /* НЕ рухаємо секцію по Y — це викликає “стрибанину” при фокусі */
  transform: none;
  transition: box-shadow .25s ease, border-color .25s ease, opacity .25s ease;
}
.section.is-active{
  /* замість translateY — легкий акцент */
  box-shadow: 0 0 0 1px rgba(255,255,255,.10);
}
.section.is-done{
  border-color: rgba(224,24,45,.22);
  box-shadow: 0 0 0 1px rgba(224,24,45,.12);
}

/* subtle focus glow on inputs (ok) */
.field input:focus, .field select:focus, textarea:focus{
  outline: none;
  box-shadow: 0 0 0 3px rgba(224,24,45,.18);
  border-color: rgba(224,24,45,.45);
  transition: box-shadow .2s ease, border-color .2s ease;
}

/* =========================================================
   JOIN FLOW — ULTRA SMOOTH (NO HEIGHT ANIMATION)
   ========================================================= */

/* сама секція не рухається */
.section{
  transform:none !important;
  transition: box-shadow .25s ease, border-color .25s ease, opacity .25s ease;
}

/* активна */
.section.is-active{
  box-shadow: 0 0 0 1px rgba(255,255,255,.08);
}

/* завершена */
.section.is-done{
  border-color: rgba(224,24,45,.22);
  box-shadow: 0 0 0 1px rgba(224,24,45,.12);
}

/* ---------- BODY ---------- */

.section__body{
  display: none;            /* ключове: не займає місце коли закрито */
}

.section.is-open .section__body{
  display: block;
  animation: secIn .22s ease both;
}

@keyframes secIn{
  from{ opacity:0; transform: translateY(10px); }
  to  { opacity:1; transform: translateY(0); }
}

/* закрита */
.section.is-collapsed .section__body{
  opacity:0;
  transform: translateY(12px);
  pointer-events:none;
}

/* locked */
.section.is-locked{
  pointer-events:none;
}
.section.is-locked h3{
  opacity:.9;
}

/* hidden auto fields */
.auto-hidden{
  display:none !important;
}


/* ===== Join: split IRL name/age ===== */
.grid2{
  display:grid;
  grid-template-columns: 1fr 140px;
  gap:12px;
}
.subfield .sub{
  display:block;
  font-size:12px;
  opacity:.7;
  margin-bottom:6px;
  font-weight:900;
}
@media (max-width: 720px){
  .grid2{ grid-template-columns: 1fr; }
}

/* =========================================================
   WOW PACK — score + dossier + cinematic overlay
   ========================================================= */

.wowScore{
  margin-top: 12px;
  padding: 14px;
  border-radius: 18px;
  border: 1px solid rgba(255,255,255,.10);
  background: rgba(0,0,0,.14);
}

.wowScore__top{
  display:flex;
  align-items:center;
  justify-content:space-between;
  gap:10px;
  margin-bottom:10px;
}

.wowScore__title{
  font-weight: 1000;
  letter-spacing: .2px;
  color: rgba(255,255,255,.92);
}

.wowBadge{
  padding: 6px 10px;
  border-radius: 999px;
  border: 1px solid rgba(255,255,255,.10);
  background: rgba(255,255,255,.06);
  font-weight: 1000;
  font-size: .82rem;
  color: rgba(255,255,255,.90);
}

.wowBadge.is-elite{
  border-color: rgba(224,24,45,.55);
  background: rgba(224,24,45,.14);
  box-shadow: 0 14px 40px rgba(224,24,45,.16);
}

.wowBadge.is-good{
  border-color: rgba(255,255,255,.18);
  background: rgba(255,255,255,.08);
}

.wowBadge.is-weak{
  opacity: .85;
}

.wowScore__bar{
  height: 10px;
  border-radius: 999px;
  background: rgba(255,255,255,.10);
  overflow: hidden;
}

.wowScore__fill{
  height: 100%;
  width: 0%;
  background: linear-gradient(90deg, rgba(224,24,45,.90), rgba(255,90,102,.90));
  border-radius: 999px;
  transition: width .35s ease;
}

.wowScore__meta{
  margin-top: 10px;
  display:flex;
  justify-content:space-between;
  align-items:center;
  gap:10px;
  font-weight: 900;
  color: rgba(255,255,255,.88);
  font-size: .9rem;
}

.wowHint{
  margin-top: 10px;
  padding: 10px 12px;
  border-radius: 16px;
  border: 1px solid rgba(224,24,45,.22);
  background: rgba(224,24,45,.08);
  font-weight: 900;
  color: rgba(255,255,255,.88);
}

.wowDossier{
  margin-top: 12px;
  padding: 14px;
  border-radius: 18px;
  border: 1px solid rgba(255,255,255,.10);
  background:
    radial-gradient(700px 240px at 10% -30px, rgba(224,24,45,.16), transparent 70%),
    rgba(0,0,0,.14);
}

.wowDossier__head{
  display:flex;
  align-items:baseline;
  justify-content:space-between;
  gap:10px;
  margin-bottom: 10px;
}

.wowDossier__kicker{
  font-weight: 1000;
  letter-spacing: .35px;
  opacity: .9;
}

.wowDossier__id{
  font-weight: 1000;
  color: rgba(255,255,255,.92);
  padding: 6px 10px;
  border-radius: 999px;
  border: 1px solid rgba(255,255,255,.10);
  background: rgba(255,255,255,.06);
}

.wowDossier__row{
  display:grid;
  grid-template-columns: 90px 1fr;
  gap:10px;
  padding: 8px 0;
  border-top: 1px solid rgba(255,255,255,.06);
}

.wowDossier__row:first-of-type{ border-top: 0; }

.wowDossier__label{
  font-weight: 900;
  color: rgba(255,255,255,.70);
  font-size: .88rem;
}

.wowDossier__val{
  font-weight: 1000;
  color: rgba(255,255,255,.92);
  word-break: break-word;
}

/* =========================
   Cinematic overlay
   ========================= */
.wowHidden{ display:none !important; }

html.wowLock,
html.wowLock body{
  overflow: hidden !important;
}

.wowOverlay{
  position: fixed;
  inset: 0;
  z-index: 999999;
  display:grid;
  place-items:center;
  /* OPAQUE takeover screen (no content bleed-through) */
  background:
    radial-gradient(1200px 800px at 20% 20%, rgba(224,24,45,.18), transparent 62%),
    radial-gradient(900px 700px at 80% 75%, rgba(224,24,45,.10), transparent 60%),
    #050507;
}

.wowOverlay__card{
  width: min(520px, 92vw);
  padding: 18px;
  border-radius: 22px;
  border: 1px solid rgba(255,255,255,.12);
  background: linear-gradient(180deg, rgba(255,255,255,.06), rgba(255,255,255,.03));
  box-shadow: 0 30px 90px rgba(0,0,0,.62);
}

.wowOverlay__title{
  font-weight: 1000;
  letter-spacing: .25px;
  margin-bottom: 10px;
  color: rgba(255,255,255,.92);
}

.wowOverlay__line{
  display:flex;
  gap:10px;
  align-items:center;
  margin-bottom: 12px;
  color: rgba(255,255,255,.85);
  font-weight: 900;
}

.wowOverlay__dot{
  width: 10px;
  height: 10px;
  border-radius: 50%;
  background: rgba(224,24,45,.95);
  box-shadow: 0 0 0 6px rgba(224,24,45,.12);
}

.wowOverlay__steps{
  display:grid;
  gap:8px;
  margin-bottom: 14px;
}

.wowStep{
  display:flex;
  align-items:center;
  gap:10px;
  padding: 10px 12px;
  border-radius: 16px;
  border: 1px solid rgba(255,255,255,.10);
  background: rgba(0,0,0,.18);
  font-weight: 1000;
  color: rgba(255,255,255,.80);
  opacity: .85;
}

.wowStep__i{
  display:inline-flex;
  align-items:center;
  justify-content:center;
  width: 34px;
  height: 28px;
  border-radius: 12px;
  border: 1px solid rgba(255,255,255,.10);
  background: rgba(255,255,255,.06);
  font-size: .82rem;
}

.wowStep.is-active{
  opacity: 1;
  color: rgba(255,255,255,.92);
  border-color: rgba(255,255,255,.16);
  box-shadow: 0 0 0 1px rgba(255,255,255,.06);
}

.wowStep.is-done{
  opacity: 1;
  border-color: rgba(224,24,45,.22);
  background: rgba(224,24,45,.08);
}

.wowOverlay__bar{
  height: 10px;
  border-radius: 999px;
  background: rgba(255,255,255,.10);
  overflow:hidden;
}

.wowOverlay__fill{
  height: 100%;
  width: 0%;
  border-radius: 999px;
  background: linear-gradient(90deg, rgba(224,24,45,.9), rgba(255,90,102,.9));
  transition: width .9s ease;
}

.wowOverlay__sub{
  margin-top: 12px;
  color: rgba(255,255,255,.72);
  font-weight: 900;
  font-size: .92rem;
}

/* =========================================================
   BACKGROUND WOW — CINEMATIC (CASTRO)
   Uses: .bgfx + .grain
   ========================================================= */

/* тримаємо контент над ефектами */
.wrap, .topbar, .card, #auth-box { position: relative; z-index: 2; }

/* 1) MOVING LIGHTS layer */
.bgfx{
  position: fixed;
  inset: -20%;
  pointer-events: none;
  z-index: 0; /* над html::before/after (-2/-1), під контентом */
  opacity: .60;
  filter: blur(28px) saturate(1.12);
  transform: translateZ(0);

  background:
    radial-gradient(900px 520px at 18% 18%, rgba(224,24,45,.26), transparent 60%),
    radial-gradient(820px 540px at 86% 30%, rgba(224,24,45,.18), transparent 62%),
    radial-gradient(760px 520px at 62% 92%, rgba(224,24,45,.14), transparent 65%),
    radial-gradient(900px 700px at 50% 40%, rgba(255,255,255,.04), transparent 60%);
  mix-blend-mode: screen;

  animation: bgfxDrift 26s ease-in-out infinite alternate;
}

@keyframes bgfxDrift{
  0%   { transform: translate3d(-1.4%, -1.0%, 0) scale(1.03); }
  50%  { transform: translate3d( 1.2%,  0.8%, 0) scale(1.06); }
  100% { transform: translate3d(-0.6%,  1.3%, 0) scale(1.04); }
}

/* 2) Light sweep (дуже повільно) */
.bgfx::after{
  content:"";
  position:absolute;
  inset:0;
  background:
    linear-gradient(115deg,
      transparent 0%,
      rgba(255,255,255,.04) 44%,
      rgba(224,24,45,.08) 50%,
      rgba(255,255,255,.03) 56%,
      transparent 72%
    );
  opacity: .35;
  transform: translateX(-22%);
  animation: bgfxSweep 18s ease-in-out infinite;
}

@keyframes bgfxSweep{
  0%   { transform: translateX(-24%); opacity:.16; }
  40%  { opacity:.40; }
  60%  { opacity:.32; }
  100% { transform: translateX(24%); opacity:.14; }
}

/* 3) Vignette (depth) */
body::before{
  content:"";
  position: fixed;
  inset: 0;
  pointer-events: none;
  z-index: 1; /* над .bgfx(0), під контентом(2) */
  background:
    radial-gradient(1200px 700px at 50% 12%, rgba(0,0,0,.10), transparent 55%),
    radial-gradient(1400px 900px at 50% 92%, rgba(0,0,0,.34), transparent 55%),
    radial-gradient(900px 600px at 0% 50%, rgba(0,0,0,.28), transparent 55%),
    radial-gradient(900px 600px at 100% 50%, rgba(0,0,0,.28), transparent 55%),
    linear-gradient(180deg, rgba(0,0,0,.04), rgba(0,0,0,.18));
  opacity: .92;
}

/* 4) Film grain (тонко, преміум) */
.grain{
  position: fixed;
  inset: -35%;
  pointer-events: none;
  z-index: 1;
  opacity: .085;
  transform: translateZ(0);

  background-image:
    repeating-linear-gradient(0deg,
      rgba(255,255,255,.06) 0 1px,
      transparent 1px 3px
    ),
    repeating-linear-gradient(90deg,
      rgba(255,255,255,.05) 0 1px,
      transparent 1px 4px
    );
  mix-blend-mode: overlay;

  animation: grainMove 2.4s steps(10) infinite;
}

@keyframes grainMove{
  0%   { transform: translate3d(-2%, -1%, 0) scale(1.02); }
  25%  { transform: translate3d( 1%, -2%, 0) scale(1.02); }
  50%  { transform: translate3d( 2%,  1%, 0) scale(1.02); }
  75%  { transform: translate3d(-1%,  2%, 0) scale(1.02); }
  100% { transform: translate3d(-2%, -1%, 0) scale(1.02); }
}

/* motion safe */
@media (prefers-reduced-motion: reduce){
  .bgfx, .bgfx::after, .grain{ animation: none !important; }
}


/* =========================================================
   MAXIMUM WOW PATCH (overlay scanline + glitch + terminal)
   ========================================================= */
.wowOverlay.is-active{ animation: wowFadeIn .22s ease-out both; }
@keyframes wowFadeIn{ from{opacity:0} to{opacity:1} }

.wowOverlay__meta{
  display:flex;
  align-items:center;
  justify-content:space-between;
  gap:10px;
  margin-top: 8px;
  padding: 8px 10px;
  border-radius: 16px;
  border: 1px solid rgba(255,255,255,.10);
  background: rgba(0,0,0,.20);
  font-weight: 1000;
}
.wowOverlay__id{
  font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, "Liberation Mono","Courier New", monospace;
  letter-spacing: .6px;
  color: rgba(255,255,255,.92);
}
.wowOverlay__pct{
  font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, "Liberation Mono","Courier New", monospace;
  color: rgba(255,255,255,.78);
}

.wowOverlay__scan{
  position: relative;
  height: 10px;
  margin: 10px 0 2px;
  border-radius: 999px;
  overflow:hidden;
  border: 1px solid rgba(255,255,255,.08);
  background: rgba(255,255,255,.04);
}
.wowOverlay__scan::before{
  content:"";
  position:absolute;
  inset:-6px -60%;
  background: linear-gradient(90deg, transparent, rgba(224,24,45,.55), rgba(255,255,255,.20), rgba(224,24,45,.55), transparent);
  filter: blur(0.2px);
  opacity:.85;
  animation: wowScan 1.6s linear infinite;
}
@keyframes wowScan{
  0%{ transform: translateX(-35%) }
  100%{ transform: translateX(35%) }
}

/* glitch text */
.wowGlitch{
  position: relative;
  text-shadow: 0 0 18px rgba(224,24,45,.16);
}
.wowGlitch::before,
.wowGlitch::after{
  content: attr(data-text);
  position:absolute;
  left:0; top:0;
  width:100%;
  opacity:.0;
  pointer-events:none;
}
.wowOverlay.is-active .wowGlitch::before{
  opacity:.22;
  transform: translate(1px, 0);
  filter: blur(.1px);
  animation: wowGlitchA 2.4s infinite;
}
.wowOverlay.is-active .wowGlitch::after{
  opacity:.18;
  transform: translate(-1px, 0);
  filter: blur(.1px);
  animation: wowGlitchB 2.8s infinite;
}
@keyframes wowGlitchA{
  0%, 92%, 100%{ clip-path: inset(0 0 0 0) }
  93%{ clip-path: inset(10% 0 68% 0) }
  94%{ clip-path: inset(58% 0 18% 0) }
  95%{ clip-path: inset(22% 0 52% 0) }
}
@keyframes wowGlitchB{
  0%, 92%, 100%{ clip-path: inset(0 0 0 0) }
  93%{ clip-path: inset(64% 0 10% 0) }
  94%{ clip-path: inset(18% 0 62% 0) }
  95%{ clip-path: inset(44% 0 28% 0) }
}

.wowGlitch--ok{ text-shadow: 0 0 16px rgba(55,255,167,.14); }
.wowGlitch--err{ text-shadow: 0 0 16px rgba(255,120,60,.14); }

/* terminal log */
.wowOverlay__term{
  margin-top: 12px;
  padding: 10px 10px;
  border-radius: 16px;
  border: 1px solid rgba(255,255,255,.10);
  background: rgba(0,0,0,.26);
  max-height: 140px;
  overflow:auto;
  font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, "Liberation Mono","Courier New", monospace;
  font-size: .86rem;
  line-height: 1.35;
  color: rgba(243,243,246,.82);
}
.wowTermLine{ opacity:.92; }
.wowTermLine:nth-child(odd){ opacity:.78; }

/* motion-safe */
@media (prefers-reduced-motion: reduce){
  .wowOverlay__scan::before,
  .wowOverlay.is-active .wowGlitch::before,
  .wowOverlay.is-active .wowGlitch::after{
    animation: none !important;
  }
}


/* =========================
   FULL PAGE PROTOCOL MODE
   ========================= */
body.protocolMode .topbar,
body.protocolMode .wrap,
body.protocolMode #auth-box{
  display: none !important;
}

/* keep overlay centered nicely */
.wowOverlay__page{
  width: 100%;
  height: 100%;
  display:grid;
  place-items:center;
  padding: 22px;
}

/* actions */
.wowOverlay__actions{
  margin-top: 14px;
  display:grid;
  gap: 10px;
}

.wowOverlay__btn{
  display:flex;
  align-items:center;
  justify-content:center;
  gap:10px;
  width: 100%;
  padding: 12px 14px;
  border-radius: 16px;
  border: 1px solid rgba(255,255,255,.12);
  background: rgba(255,255,255,.06);
  color: rgba(255,255,255,.92);
  font-weight: 1000;
  text-decoration: none;
  transition: transform .14s ease, background .14s ease, border-color .14s ease;
}

.wowOverlay__btn:hover{
  transform: translateY(-1px);
  background: rgba(255,255,255,.08);
  border-color: rgba(255,255,255,.18);
}

.wowOverlay__btn--discord{
  border-color: rgba(88,101,242,.45);
  background: rgba(88,101,242,.18);
  box-shadow: 0 14px 40px rgba(88,101,242,.25);
}

.wowOverlay__close{
  position:absolute;
  top: 14px;
  right: 14px;
  width: 42px;
  height: 42px;
  border-radius: 14px;
  border: 1px solid rgba(255,255,255,.12);
  background: rgba(255,255,255,.06);
  color: rgba(255,255,255,.92);
  font-weight: 1000;
  cursor:pointer;
}

.wowOverlay__btn--home{
  border-color: rgba(224,24,45,.45);
  background: rgba(224,24,45,.18);
  box-shadow: 0 14px 40px rgba(224,24,45,.18);
}


/* Discord button */
.btn-discord{
  background: #5865F2;
  color: white;
  border: none;
  border-radius: 16px;
  padding: 14px 22px;
  font-weight: 800;
  font-size: 1rem;
  transition: .25s ease;
}

.btn-discord:hover{
  background: #4752C4;
  transform: translateY(-2px);
  box-shadow: 0 10px 25px rgba(88,101,242,.35);
}

/* Home button */
.btn-home{
  background: #e0182d;
  color: white;
  border: none;
  border-radius: 16px;
  padding: 14px 22px;
  font-weight: 800;
  transition: .25s ease;
}

.btn-home:hover{
  background: #b91426;
  transform: translateY(-2px);
  box-shadow: 0 10px 25px rgba(224,24,45,.35);
}

/* Submit button base */
#submitBtn{
  background: #333;
  color: white;
  border: none;
  border-radius: 16px;
  padding: 14px 22px;
  font-weight: 800;
  transition: .3s ease;
  opacity: .7;
  cursor: not-allowed;
}

/* Active (готова до відправки) */
#submitBtn.ready{
  background: #1db954;
  opacity: 1;
  cursor: pointer;
}

#submitBtn.ready:hover{
  background: #18a84b;
  box-shadow: 0 10px 25px rgba(29,185,84,.35);
  transform: translateY(-2px);
}

/* Submit button base */
#submitBtn{
  background: #333;
  color: white;
  border: none;
  border-radius: 16px;
  padding: 14px 22px;
  font-weight: 800;
  transition: .3s ease;
  opacity: .7;
  cursor: not-allowed;
}

/* Active (готова до відправки) */
#submitBtn.ready{
  background: #1db954;
  opacity: 1;
  cursor: pointer;
}

#submitBtn.ready:hover{
  background: #18a84b;
  box-shadow: 0 10px 25px rgba(29,185,84,.35);
  transform: translateY(-2px);
}

/* =========================================
   WOW OVERLAY LOGO
========================================= */

.wowOverlay__logo{
  width: 150px;
  display: block;
  margin: 0 auto 18px auto;

  filter: drop-shadow(0 0 25px rgba(224,24,45,.45));

  animation: wowLogoFloat 4s ease-in-out infinite;
}

@keyframes wowLogoFloat{
  0%{ transform: translateY(0); }
  50%{ transform: translateY(-6px); }
  100%{ transform: translateY(0); }
}

/* сам сайдбар — “рухається” за скролом */
.sideCard, .side{
  position: sticky;
  top: 18px;       /* відступ від верху */
  align-self: start;
}

/* на мобілці sticky зазвичай не треба */
@media (max-width: 980px){
  .sideCard, .side{
    position: static;
    top: auto;
  }
}

/* =========================
   🎬 FULLSCREEN VIDEO BG
========================= */

.video-bg {
  position: fixed;
  inset: 0;
  width: 100%;
  height: 100%;
  overflow: hidden;
  z-index: -18;

  pointer-events: none;
}

.video-bg__video {
  position: absolute;
  top: 50%;
  left: 50%;
  min-width: 100%;
  min-height: 100%;
  width: auto;
  height: auto;
  transform: translate(-50%, -50%);
  object-fit: cover;
  filter: brightness(0.9);

  display: block;
}

.video-bg__overlay {
  position: absolute;
  inset: 0;
  background: rgba(0, 0, 0, 0.55); /* затемнення */
  backdrop-filter: blur(2px);
}

/* =========================
   AUTH HINT (Order / Reviews style)
   ========================= */

.authHint{
  margin: 10px 0 16px;
  padding: 12px 14px;
  border-radius: 14px;

  background: rgba(0,0,0,.45);
  border: 1px solid rgba(255,255,255,.12);
  backdrop-filter: blur(10px);

  box-shadow: 0 18px 55px rgba(0,0,0,.45);
}

.authHint__title{
  font-weight: 900;
  letter-spacing: .2px;
  margin-bottom: 6px;
  display:flex;
  align-items:center;
  gap:8px;
}

.authHint__text{
  color: rgba(255,255,255,.86);
  font-size: 13px;
  line-height: 1.45;
}

.authHint__actions{
  margin-top: 10px;
  display:flex;
  gap:10px;
  flex-wrap: wrap;
  align-items:center;
}

.authHint__btn{
  appearance: none;
  border: 1px solid rgba(255,70,70,.35);
  background: rgba(255,70,70,.14);
  color: #fff;
  font-weight: 900;

  padding: 10px 12px;
  border-radius: 12px;
  cursor: pointer;

  transition: transform .12s ease, background .12s ease, border-color .12s ease, opacity .12s ease;
  user-select: none;
}

.authHint__btn:hover{
  transform: translateY(-1px);
  background: rgba(255,70,70,.20);
  border-color: rgba(255,70,70,.48);
}

.authHint__btn:active{
  transform: translateY(0px);
}

.authHint__btn--ghost{
  border-color: rgba(255,255,255,.16);
  background: rgba(255,255,255,.06);
}

.authHint__btn--ghost:hover{
  background: rgba(255,255,255,.10);
  border-color: rgba(255,255,255,.22);
}

/* optional: якщо колись буде disabled */
.authHint__btn:disabled{
  opacity: .55;
  cursor: not-allowed;
  transform: none;
}

/* компактний вигляд на мобілках */
@media (max-width: 560px){
  .authHint{
    padding: 12px;
  }
  .authHint__actions{
    gap:8px;
  }
  .authHint__btn{
    width: 100%;
    justify-content: center;
    text-align: center;
  }
}
/* Five-second cinematic intro: keep only the live background visible. */
html.join-intro-pending body.page-join > .auth,
html.join-intro-pending body.page-join > .topbar,
html.join-intro-pending body.page-join > .wrap{
  opacity: 0 !important;
  visibility: hidden !important;
  pointer-events: none !important;
}

body.page-join.join-intro-reveal > .topbar{
  animation: joinIntroTop .72s cubic-bezier(.18,.78,.22,1) both;
}

body.page-join.join-intro-reveal > .wrap{
  animation: joinIntroContent .86s cubic-bezier(.18,.78,.22,1) .08s both;
}

body.page-join.join-intro-reveal > .auth{
  animation: joinIntroAuth .58s ease-out .16s both;
}

@keyframes joinIntroTop{
  from{ opacity:0; transform:translateY(-16px) scale(.985); filter:blur(6px); }
  to{ opacity:1; transform:none; filter:none; }
}

@keyframes joinIntroContent{
  from{ opacity:0; transform:translateY(24px) scale(.992); filter:blur(9px); }
  to{ opacity:1; transform:none; filter:none; }
}

@keyframes joinIntroAuth{
  from{ opacity:0; transform:translateY(-10px); filter:blur(5px); }
  to{ opacity:1; transform:none; filter:none; }
}

/* =========================================================
   CASTRO VIDEO LOADER — SAFETY OVERRIDES (JOIN)
   Причина: на JOIN лоадер інколи не "розсіюється" через конфлікт специфічності/порядку стилів.
   Цей блок робить hide-state залізобетонним.
   ========================================================= */

.vload{
  position: fixed;
  inset: 0;
  z-index: 9999;
  display: grid;
  place-items: center;
  pointer-events: none;
  opacity: 1;
  visibility: visible;
  transition: opacity .55s ease, visibility .55s ease;
}

.vload.is-hide{
  opacity: 0 !important;
  visibility: hidden !important;
}

/* якщо хочеш, щоб після fade лоадер точно зник як елемент */
.vload.is-hide{
  /* display не ставимо одразу, щоб була анімація */
}
.vload.is-hide[data-gone="1"]{
  display: none !important;
}

.vload__bg{
  position: absolute;
  inset: 0;
  background:
    radial-gradient(circle at 50% 45%, rgba(120,0,0,.10) 0%, rgba(0,0,0,.92) 65%, rgba(0,0,0,.98) 100%),
    linear-gradient(180deg, rgba(0,0,0,.92), rgba(0,0,0,.98));
}

.vload__center{
  position: relative;
  display: grid;
  place-items: center;
  gap: 14px;
  transform: translateZ(0);
  animation: vloadPop .6s ease both;
}

@keyframes vloadPop{
  from{ transform: scale(.96); opacity: 0; }
  to{ transform: scale(1); opacity: 1; }
}

.vload__logo{
  width: 120px;
  height: 120px;
  object-fit: contain;
  filter: drop-shadow(0 18px 45px rgba(0,0,0,.65));
}

.vload__text{
  font: 600 12px/1.2 system-ui, -apple-system, Segoe UI, Roboto, Arial;
  letter-spacing: .12em;
  text-transform: uppercase;
  color: rgba(255,255,255,.7);
}

.vload__scan{
  position: absolute;
  inset: 0;
  background: linear-gradient(180deg, transparent, rgba(255,80,80,.08), transparent);
  opacity: .35;
  animation: vloadScan 1.6s ease-in-out infinite;
}
@keyframes vloadScan{
  0%{ transform: translateY(-20%); }
  100%{ transform: translateY(120%); }
}

.vload__grain{
  position: absolute;
  inset: 0;
  opacity: .06;
  mix-blend-mode: overlay;
  background-size: 300px 300px;
  animation: vloadGrain 7s steps(10) infinite;
}
@keyframes vloadGrain{
  0%{ transform: translate(0,0); }
  100%{ transform: translate(-8%, 6%); }
}

html.is-video-loading,
body.is-video-loading{
  overflow: hidden;
}

/* =========================
   FOOTER LINK (CASTRO)
   ========================= */

.site-footer {
  padding: 18px 0;
  text-align: center;
  border-top: 1px solid rgba(255,255,255,.10);
  background: rgba(0,0,0,.45);
  font-size: 14px;
}

.footer-link {
  display: inline-flex;
  align-items: center;
  gap: 8px;

  color: #fff;
  text-decoration: none;
  font-weight: 600;

  transition: all .2s ease;
}

.footer-link:hover {
  color: var(--red);
  text-shadow: 0 0 12px rgba(224,24,45,.4);
}

.footer-logo {
  width: 16px;
  height: 16px;
  object-fit: contain;
  opacity: .85;
  transition: transform .2s ease, opacity .2s ease;
}

.footer-link:hover .footer-logo {
  transform: scale(1.15);
  opacity: 1;
}

/* stats chips in topbar */
.chip--stat b{
  font-weight: 1000;
  margin-left: 6px;
  color: rgba(255,255,255,.95);
}

.chip--dim{
  opacity: .9;
}
