:root {
  --lgd-ink: #080706;
  --lgd-panel: #12100e;
  --lgd-panel-2: #191510;
  --lgd-gold: #d7ad68;
  --lgd-gold-soft: #a9824d;
  --lgd-line: rgba(215, 173, 104, 0.28);
  --lgd-crimson: #b32927;
  --lgd-white: #fffaf0;
  --lgd-muted: #b9ad9a;
}

#pgGame.lgd-active {
  color: var(--lgd-white);
  letter-spacing: 0;
  overflow-x: clip;
  padding-bottom: 0 !important;
}

#pgGame.lgd-active #gamePageContent {
  position: relative;
  isolation: isolate;
  margin-bottom: 0;
  padding-bottom: 0;
}

#pgGame.lgd-active #gamePageContent::before {
  content: '';
  position: absolute;
  z-index: -1;
  inset: -22px -18px 0;
  min-height: 100%;
  background-color: var(--lgd-ink);
  background-image:
    linear-gradient(rgba(255, 255, 255, 0.018) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255, 255, 255, 0.012) 1px, transparent 1px);
  background-size: 36px 36px;
  border-left: 1px solid rgba(215, 173, 104, 0.08);
  border-right: 1px solid rgba(215, 173, 104, 0.08);
}

#pgGame.lgd-active .lgd-original-hidden {
  display: none !important;
}

.lgd-player-stage {
  width: 100%;
  max-width: 100%;
  min-width: 0;
  display: grid;
  gap: 18px;
  margin-bottom: 0;
}

.lgd-role-scene {
  position: relative;
  width: 100%;
  max-width: 100%;
  min-width: 0;
  overflow: hidden;
  border: 1px solid rgba(215, 173, 104, 0.42);
  border-radius: 8px;
  background: transparent;
  box-shadow: 0 24px 70px rgba(0, 0, 0, 0.42), inset 0 0 0 1px rgba(255, 255, 255, 0.025);
}

.lgd-role-visual {
  position: relative;
  min-height: 540px;
  overflow: hidden;
  background: #100d0b;
}

.lgd-role-art {
  position: absolute;
  inset: 0;
  overflow: hidden;
  background: #17120f;
}

.lgd-role-art-image {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center 24%;
  filter: saturate(0.94) contrast(1.04) brightness(1.02);
  transform: scale(1.025);
  animation: lgdArtSettle 1300ms cubic-bezier(0.22, 1, 0.36, 1) both;
}

.lgd-role-art-fallback {
  position: absolute;
  inset: 0;
  display: none;
  place-items: center;
  color: rgba(215, 173, 104, 0.26);
  font-family: Georgia, 'Times New Roman', serif;
  font-size: 9rem;
  background: #17120f;
}

.lgd-art-failed .lgd-role-art-fallback {
  display: grid;
}

.lgd-role-art-shade {
  position: absolute;
  inset: 0;
  background:
    linear-gradient(0deg, rgba(5, 4, 3, 0.98) 0%, rgba(5, 4, 3, 0.72) 24%, rgba(5, 4, 3, 0.12) 56%, rgba(5, 4, 3, 0.08) 72%, rgba(5, 4, 3, 0.48) 100%),
    linear-gradient(90deg, rgba(5, 4, 3, 0.18), transparent 42%, rgba(5, 4, 3, 0.12));
}

.lgd-role-content {
  position: absolute;
  z-index: 2;
  inset: 0;
  padding: 24px;
  display: flex;
  flex-direction: column;
}

.lgd-role-topline {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
}

.lgd-role-topline > * { min-width: 0; }

.lgd-role-brand {
  display: grid;
  gap: 1px;
  color: var(--lgd-gold);
  font-family: Georgia, 'Times New Roman', serif;
}

.lgd-role-brand strong {
  font-size: 1.25rem;
  font-weight: 700;
}

.lgd-role-brand span {
  color: var(--lgd-muted);
  font-family: var(--app-font, Inter, sans-serif);
  font-size: 0.59rem;
  font-weight: 800;
  text-transform: uppercase;
}

.lgd-phase-chip {
  max-width: 48%;
  min-height: 32px;
  padding: 7px 10px;
  display: inline-flex;
  align-items: center;
  gap: 7px;
  flex-shrink: 0;
  border: 1px solid var(--lgd-line);
  border-radius: 6px;
  background: rgba(5, 4, 3, 0.68);
  color: var(--lgd-white);
  font-size: 0.7rem;
  font-weight: 800;
  text-transform: uppercase;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
}

.lgd-phase-chip.is-day .lgd-phase-icon { color: #ffd778; }
.lgd-phase-chip.is-night .lgd-phase-icon { color: #a8c7ed; }
.lgd-phase-chip.is-voting .lgd-phase-icon { color: #e96661; }

.lgd-role-main {
  width: min(100%, 540px);
  margin-top: auto;
}

.lgd-role-eyebrow {
  margin-bottom: 5px;
  color: #e0716a;
  font-size: 0.65rem;
  font-weight: 900;
  text-transform: uppercase;
}

.lgd-role-title {
  margin: 0;
  color: var(--lgd-white);
  font-family: Georgia, 'Times New Roman', serif;
  font-size: 2.75rem;
  font-weight: 700;
  line-height: 0.98;
  letter-spacing: 0;
  overflow-wrap: anywhere;
  text-wrap: balance;
  text-shadow: 0 3px 20px rgba(0, 0, 0, 0.8);
}

.lgd-role-chips {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin-top: 13px;
}

.lgd-role-chip,
.lgd-mini-badge {
  display: inline-flex;
  align-items: center;
  width: fit-content;
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 4px;
  background: rgba(255, 255, 255, 0.065);
  color: #d8cec0;
  font-size: 0.56rem;
  font-weight: 850;
  line-height: 1.2;
  text-transform: uppercase;
}

.lgd-role-chip { padding: 5px 7px; }
.lgd-mini-badge { padding: 3px 5px; }
.lgd-role-chip.is-seat { border-color: rgba(215, 173, 104, 0.3); color: #eed4a5; }
.lgd-role-chip.is-category, .lgd-mini-badge.is-who { color: #c6c7dd; background: rgba(91, 95, 132, 0.22); }
.lgd-role-chip.is-team, .lgd-mini-badge.is-team { color: #f4dcae; background: rgba(154, 111, 52, 0.22); border-color: rgba(215, 173, 104, 0.3); }
.lgd-role-chip.is-good, .lgd-mini-badge.is-good { color: #aee4c3; background: rgba(52, 125, 85, 0.2); }
.lgd-role-chip.is-evil, .lgd-mini-badge.is-evil { color: #f0a09b; background: rgba(139, 42, 40, 0.22); }
.lgd-role-chip.is-unknown, .lgd-mini-badge.is-unknown { color: #d4c8b9; background: rgba(112, 104, 93, 0.22); }
.lgd-role-chip.is-neutral, .lgd-mini-badge.is-neutral { color: #d7c8e7; background: rgba(105, 78, 126, 0.2); }

.lgd-role-info {
  padding: 15px 20px 20px;
  border-top: 0;
  background: transparent;
}

.lgd-role-info-title {
  margin-bottom: 9px;
  color: var(--lgd-gold);
  font-family: Georgia, 'Times New Roman', serif;
  font-size: 0.76rem;
  font-weight: 700;
  text-transform: uppercase;
}

.lgd-role-description {
  margin: 0;
  color: #d8d0c5;
  font-family: Georgia, 'Times New Roman', serif;
  font-size: 0.82rem;
  line-height: 1.62;
  white-space: pre-line;
}

.lgd-role-detail { margin-top: 10px; color: var(--lgd-muted); font-size: 0.68rem; }
.lgd-role-detail.is-dead { color: #f49a94; }

.lgd-role-controls {
  width: 100%;
  margin-top: 16px;
  display: grid;
  gap: 8px;
}

.lgd-host-message {
  width: 100%;
  min-height: 48px;
  border-radius: 6px;
  font-family: inherit;
  font-weight: 850;
  text-transform: uppercase;
  cursor: pointer;
  transition: transform 220ms cubic-bezier(0.22, 1, 0.36, 1), border-color 220ms ease, background-color 220ms ease, box-shadow 220ms ease;
}

.lgd-host-message {
  padding: 9px 14px;
  border: 1px solid rgba(215, 173, 104, 0.34);
  background: rgba(5, 4, 3, 0.66);
  color: #d8c6a7;
}

.lgd-host-message-icon { margin-right: 8px; color: var(--lgd-gold); }
.lgd-host-message:active { transform: scale(0.985); }
.lgd-host-message:hover { border-color: rgba(215, 173, 104, 0.62); background: rgba(35, 28, 21, 0.78); }

.lgd-promoted-actions {
  display: grid;
  gap: 8px;
}

.lgd-promoted-actions > button {
  width: 100% !important;
  min-height: 48px !important;
  margin: 0 !important;
  padding: 10px 14px !important;
  border: 1px solid rgba(215, 173, 104, 0.38) !important;
  border-radius: 6px !important;
  background: rgba(35, 28, 21, 0.9) !important;
  color: #fff8ed !important;
  font-family: inherit !important;
  font-size: 0.78rem !important;
  font-weight: 850 !important;
  text-transform: uppercase;
  cursor: pointer;
  transition: transform 220ms cubic-bezier(0.22, 1, 0.36, 1), border-color 220ms ease, background-color 220ms ease !important;
}

.lgd-promoted-actions > button:first-of-type {
  border-color: rgba(232, 79, 69, 0.78) !important;
  background: rgba(128, 20, 18, 0.9) !important;
  box-shadow: 0 10px 30px rgba(122, 19, 17, 0.2), inset 0 0 22px rgba(239, 68, 68, 0.08);
}

.lgd-promoted-actions > button:active { transform: scale(0.985); }
.lgd-promoted-actions > button:disabled { cursor: not-allowed; opacity: 0.48 !important; }
.lgd-promoted-actions > div:not(.gp-action-btn) { color: var(--lgd-muted) !important; line-height: 1.45 !important; }

.lgd-role-status-line {
  min-height: 42px;
  display: grid;
  place-items: center;
  border: 1px solid rgba(215, 173, 104, 0.22);
  border-radius: 6px;
  background: rgba(5, 4, 3, 0.6);
  color: var(--lgd-muted);
  font-size: 0.7rem;
  font-weight: 750;
  text-transform: uppercase;
}

.lgd-section {
  width: 100%;
  max-width: 100%;
  min-width: 0;
  padding-top: 2px;
  overflow: hidden;
}

.lgd-section-head {
  min-height: 32px;
  margin-bottom: 9px;
  padding: 0 4px 8px;
  display: flex;
  align-items: end;
  justify-content: space-between;
  gap: 12px;
  border-bottom: 1px solid rgba(215, 173, 104, 0.18);
}

.lgd-section-head h3 {
  margin: 0;
  color: #d6b27a;
  font-family: Georgia, 'Times New Roman', serif;
  font-size: 0.92rem;
  font-weight: 700;
  text-transform: uppercase;
}

.lgd-section-head > span {
  color: #918576;
  font-size: 0.64rem;
  font-weight: 700;
}

.lgd-role-grid,
.lgd-player-grid {
  width: 100%;
  max-width: 100%;
  min-width: 0;
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 7px;
}

.lgd-role-card,
.lgd-player-card {
  max-width: 100%;
  min-width: 0;
  border: 1px solid rgba(215, 173, 104, 0.2);
  border-radius: 7px;
  background: rgba(20, 17, 14, 0.9);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.025);
}

.lgd-role-card {
  position: relative;
  min-height: 94px;
  padding: 10px 36px 10px 9px;
  display: grid;
  grid-template-columns: 46px minmax(0, 1fr);
  align-items: center;
  gap: 8px;
  color: inherit;
  font-family: inherit;
  text-align: left;
  cursor: pointer;
  transition: transform 220ms cubic-bezier(0.22, 1, 0.36, 1), border-color 220ms ease, background-color 220ms ease;
}

.lgd-role-card:hover,
.lgd-role-card:focus-visible {
  transform: translateY(-2px);
  border-color: rgba(215, 173, 104, 0.5);
  background: rgba(30, 25, 20, 0.96);
  outline: none;
}

.lgd-role-card:active { transform: scale(0.985); }

.lgd-role-card-art {
  width: 46px;
  height: 60px;
  overflow: hidden;
  display: grid;
  place-items: center;
  border: 1px solid rgba(215, 173, 104, 0.18);
  border-radius: 6px;
  background: #0b0908;
}

.lgd-role-card-art img,
.lgd-role-card-art-fallback {
  width: 100%;
  height: 100%;
}

.lgd-role-card-art img { object-fit: cover; }
.lgd-role-card-art-fallback {
  display: grid;
  place-items: center;
  font-size: 1.2rem;
}

.lgd-role-card-info { min-width: 0; }
.lgd-role-card-info strong {
  display: block;
  color: #eee6dc;
  font-family: Georgia, 'Times New Roman', serif;
  font-size: 0.76rem;
  font-weight: 700;
  line-height: 1.25;
  overflow-wrap: anywhere;
  white-space: normal;
}

.lgd-role-card-badges {
  min-width: 0;
  margin-top: 5px;
  display: flex;
  flex-wrap: wrap;
  gap: 4px;
}

.lgd-role-card.is-locked {
  cursor: default;
}

.lgd-role-card.is-locked::after {
  content: '🔒';
  position: absolute;
  right: 8px;
  bottom: 7px;
  color: rgba(215, 173, 104, 0.72);
  font-size: 0.68rem;
  line-height: 1;
}

.lgd-role-card-badges .lgd-mini-badge {
  min-width: 0;
  max-width: 100%;
  line-height: 1.25;
  overflow-wrap: anywhere;
  white-space: normal;
}

.lgd-role-count {
  position: absolute;
  top: 9px;
  right: 8px;
  width: 25px;
  height: 25px;
  display: grid;
  place-items: center;
  border: 1px solid rgba(215, 173, 104, 0.38);
  border-radius: 50%;
  color: var(--lgd-gold);
  font-family: Georgia, 'Times New Roman', serif;
  font-size: 0.75rem;
}

.lgd-player-card {
  position: relative;
  min-height: 84px;
  padding: 10px 30px 10px 9px;
  display: grid;
  grid-template-columns: 42px minmax(0, 1fr);
  grid-template-rows: auto;
  align-items: center;
  gap: 9px;
  cursor: pointer;
  transition: transform 220ms cubic-bezier(0.22, 1, 0.36, 1), border-color 220ms ease, background-color 220ms ease;
}

.lgd-player-card:hover,
.lgd-player-card:focus-visible {
  transform: translateY(-2px);
  border-color: rgba(215, 173, 104, 0.48);
  background: rgba(30, 25, 20, 0.96);
  outline: none;
}

.lgd-player-card:active { transform: scale(0.985); }
.lgd-player-card.is-me { border-color: rgba(215, 173, 104, 0.55); }
.lgd-player-card.is-dead { opacity: 0.58; filter: grayscale(0.62); }

.lgd-player-seat {
  position: absolute;
  top: 6px;
  left: 7px;
  z-index: 2;
  color: var(--lgd-gold);
  font-family: Georgia, 'Times New Roman', serif;
  font-size: 0.67rem;
  font-weight: 700;
  text-shadow: 0 1px 5px #000;
}

.lgd-player-avatar {
  width: 42px;
  height: 42px;
  overflow: hidden;
  display: grid;
  place-items: center;
  border: 1px solid rgba(215, 173, 104, 0.28);
  border-radius: 50%;
  background: #0a0908;
  color: #c8b897;
  font-family: Georgia, 'Times New Roman', serif;
  font-size: 1rem;
}

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

.lgd-player-info { min-width: 0; }
.lgd-player-name-row {
  min-width: 0;
  display: flex;
  align-items: center;
  gap: 5px;
}

.lgd-player-name {
  min-width: 0;
  max-width: 100%;
  padding: 0;
  overflow: hidden;
  border: 0;
  background: transparent;
  color: #f1e8dc;
  font-family: Georgia, 'Times New Roman', serif;
  font-size: 0.75rem;
  font-weight: 700;
  text-align: left;
  text-decoration: none;
  text-overflow: ellipsis;
  white-space: nowrap;
}

button.lgd-player-name { cursor: pointer; }
button.lgd-player-name:hover { color: var(--lgd-gold); }
.lgd-mini-badge.is-you { color: #17100a; background: #d7ad68; border-color: #d7ad68; }
.lgd-mini-badge.is-bot { color: #b9ad9a; }

.lgd-player-note {
  margin-top: 7px;
  overflow: hidden;
  color: #81776b;
  font-size: 0.57rem;
  line-height: 1.25;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.lgd-player-life {
  position: absolute;
  top: 10px;
  right: 9px;
  color: #d34d48;
  font-size: 1rem;
}

.lgd-player-card.is-dead .lgd-player-life { color: #8f8579; }

#pgGame.lgd-active .lgd-role-state-panel {
  margin: 0 0 12px;
  padding: 10px;
  border: 1px solid rgba(215, 173, 104, 0.25);
  border-radius: 7px;
  background: rgba(20, 17, 14, 0.92);
}

#pgGame.lgd-active .gp-actions {
  border-radius: 7px;
}

.lgd-go-game {
  width: 100%;
  min-height: 44px;
  margin-top: 12px;
  padding: 9px 12px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  border: 1px solid rgba(215, 173, 104, 0.42);
  border-radius: 7px;
  background: rgba(128, 20, 18, 0.84);
  color: #fffaf0;
  font-family: inherit;
  font-size: 0.76rem;
  font-weight: 850;
  cursor: pointer;
  transition: transform 220ms cubic-bezier(0.22, 1, 0.36, 1), background-color 220ms ease, border-color 220ms ease;
}

.lgd-go-game:hover { border-color: rgba(236, 126, 104, 0.78); background: rgba(151, 27, 23, 0.92); }
.lgd-go-game:active { transform: scale(0.985); }
.lgd-go-game-arrow { color: var(--lgd-gold); font-size: 1.05rem; }

.lgd-role-modal {
  position: fixed;
  z-index: 420;
  inset: 0;
  padding: 18px;
  display: none;
  align-items: center;
  justify-content: center;
  background: rgba(3, 3, 3, 0.82);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
}

.lgd-role-modal.open {
  display: flex;
  animation: lgdModalFade 220ms ease both;
}

.lgd-role-modal-panel {
  position: relative;
  width: 100%;
  max-width: 520px;
  min-width: 0;
  max-height: min(86vh, 760px);
  overflow-y: auto;
  border: 1px solid rgba(215, 173, 104, 0.48);
  border-radius: 8px;
  background: #100d0b;
  box-shadow: 0 28px 90px rgba(0, 0, 0, 0.68);
}

.lgd-role-modal-close {
  position: absolute;
  z-index: 2;
  top: 10px;
  right: 10px;
  width: 36px;
  height: 36px;
  display: grid;
  place-items: center;
  border: 1px solid rgba(215, 173, 104, 0.42);
  border-radius: 50%;
  background: rgba(5, 4, 3, 0.76);
  color: #fffaf0;
  font-size: 1.35rem;
  line-height: 1;
  cursor: pointer;
}

.lgd-role-modal-art {
  position: relative;
  width: 100%;
  height: min(55vh, 460px);
  overflow: hidden;
  background: #0a0908;
}

.lgd-role-modal-art::after {
  display: none;
}

.lgd-role-modal-art img,
.lgd-role-modal-art > span {
  width: 100%;
  height: 100%;
}

.lgd-role-modal-art img { display: block; object-fit: contain; object-position: center; }
.lgd-role-modal-art > span { display: grid; place-items: center; color: rgba(215, 173, 104, 0.38); font-size: 5rem; }
.lgd-role-modal-body { padding: 4px 18px 20px; }
.lgd-role-modal-kicker { color: #dd6c65; font-size: 0.62rem; font-weight: 900; text-transform: uppercase; }
.lgd-role-modal-body h3 { margin: 4px 0 10px; color: #fffaf0; font-family: Georgia, 'Times New Roman', serif; font-size: 1.7rem; line-height: 1.05; }
.lgd-role-modal-badges { display: flex; flex-wrap: wrap; gap: 5px; margin-bottom: 13px; }
.lgd-role-modal-description { margin: 0; color: #d8d0c5; font-family: Georgia, 'Times New Roman', serif; font-size: 0.8rem; line-height: 1.62; white-space: pre-line; }

#roleModal.lgd-catalog-role-modal {
  z-index: 421;
  padding: 18px;
  align-items: center;
  justify-content: center;
  background: rgba(3, 3, 3, 0.82);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
}

#roleModal .lgd-catalog-role-panel {
  position: relative;
  width: 100%;
  max-width: 520px;
  min-width: 0;
  max-height: min(86vh, 760px);
  margin: 0;
  padding: 0;
  overflow-y: auto;
  overscroll-behavior: contain;
  border: 1px solid rgba(215, 173, 104, 0.48);
  border-radius: 8px;
  background: #100d0b;
  box-shadow: 0 28px 90px rgba(0, 0, 0, 0.68);
  animation: lgdCatalogPanelIn 340ms cubic-bezier(0.22, 1, 0.36, 1) both;
}

#roleModal .lgd-catalog-role-panel > .modal-handle { display: none; }

#roleModal .lgd-catalog-role-art {
  position: relative !important;
  width: 100%;
  height: min(55vh, 460px);
  overflow: hidden;
  background: #0a0908;
}

#roleModal .lgd-catalog-role-art .modal-img,
#roleModal .lgd-catalog-role-fallback {
  width: 100%;
  height: 100%;
  max-height: none;
}

#roleModal .lgd-catalog-role-art .modal-img {
  display: block;
  object-fit: contain;
  object-position: center;
  background: #0a0908;
}

#roleModal .lgd-catalog-role-fallback {
  display: grid;
  place-items: center;
  color: rgba(215, 173, 104, 0.38);
  font-size: 5rem;
}

#roleModal .modal-close {
  z-index: 3;
  top: 10px;
  right: 10px;
  width: 36px;
  height: 36px;
  border: 1px solid rgba(215, 173, 104, 0.42);
  border-radius: 50%;
  background: rgba(5, 4, 3, 0.76);
  color: #fffaf0;
  font-size: 1.15rem;
}

#roleModal .lgd-catalog-role-body { padding: 10px 18px 20px; }
#roleModal .lgd-catalog-role-kicker { color: #dd6c65; font-size: 0.62rem; font-weight: 900; text-transform: uppercase; }
#roleModal .lgd-catalog-role-body h2 { margin: 4px 0 10px; color: #fffaf0; font-family: Georgia, 'Times New Roman', serif; font-size: 1.7rem; line-height: 1.05; }
#roleModal .lgd-catalog-role-body #mTeamLine { display: flex; flex-wrap: wrap; gap: 5px; margin: 0 0 13px; }
#roleModal .lgd-catalog-role-body #mDesc { margin: 0; color: #d8d0c5; font-family: Georgia, 'Times New Roman', serif; font-size: 0.8rem; line-height: 1.62; white-space: pre-line; }

@keyframes lgdCatalogPanelIn {
  from { opacity: 0; transform: translateY(18px) scale(0.985); }
  to { opacity: 1; transform: none; }
}

html.mafia-ui-v3 body.lgd-home-page {
  background: #050403 !important;
  background-image:
    linear-gradient(rgba(255, 255, 255, 0.012) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255, 255, 255, 0.009) 1px, transparent 1px) !important;
  background-size: 38px 38px !important;
}

html.mafia-ui-v3 body.lgd-home-page > .mafia-brand-header {
  display: none !important;
}

html.mafia-ui-v3 body.lgd-home-page > .app-shell-top {
  position: sticky !important;
  z-index: 105 !important;
  top: 0;
  border-bottom: 1px solid rgba(215, 173, 104, 0.18) !important;
  background: rgba(5, 4, 3, 0.9) !important;
  box-shadow: 0 12px 32px rgba(0, 0, 0, 0.28) !important;
  backdrop-filter: blur(20px) saturate(1.1) !important;
  -webkit-backdrop-filter: blur(20px) saturate(1.1) !important;
}

html.mafia-ui-v3 body.lgd-home-page > .app-shell-top .nav-item.active {
  border: 1px solid rgba(215, 173, 104, 0.34) !important;
  background: rgba(215, 173, 104, 0.1) !important;
  color: #fff4e2 !important;
  box-shadow: none !important;
}

html.mafia-ui-v3 body.lgd-home-page #pgHome {
  max-width: 520px;
  padding: 0 14px calc(26px + env(safe-area-inset-bottom)) !important;
  overflow: hidden;
  color: var(--lgd-white);
}

#pgHome .lgd-home-stage {
  position: relative;
  isolation: isolate;
  width: calc(100% + 28px);
  height: clamp(500px, calc(100dvh - 150px), 650px);
  margin: 0 -14px;
  overflow: hidden;
  border-bottom: 1px solid rgba(215, 173, 104, 0.34);
  background: #090706;
  box-shadow: 0 28px 80px rgba(0, 0, 0, 0.46);
}

#pgHome .lgd-home-stage::after {
  content: '';
  position: absolute;
  z-index: 1;
  inset: 0;
  pointer-events: none;
  border-bottom: 1px solid rgba(255, 255, 255, 0.035);
  box-shadow: inset 0 0 0 1px rgba(215, 173, 104, 0.08);
}

#pgHome .lgd-home-stage-art {
  position: absolute;
  z-index: -2;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center 52%;
  filter: saturate(0.82) contrast(1.08) brightness(0.78);
  transform: scale(1.025);
  animation: lgdHomeArtIn 1400ms cubic-bezier(0.22, 1, 0.36, 1) both;
}

#pgHome .lgd-home-stage-shade {
  position: absolute;
  z-index: -1;
  inset: 0;
  background:
    linear-gradient(180deg, rgba(4, 3, 2, 0.4) 0%, rgba(4, 3, 2, 0.05) 28%, rgba(4, 3, 2, 0.24) 52%, rgba(4, 3, 2, 0.94) 100%),
    linear-gradient(90deg, rgba(4, 3, 2, 0.38), transparent 54%, rgba(4, 3, 2, 0.18));
}

#pgHome .lgd-home-stage-inner {
  position: relative;
  z-index: 2;
  width: 100%;
  height: 100%;
  padding: calc(18px + env(safe-area-inset-top)) 18px 17px;
  display: flex;
  flex-direction: column;
}

#pgHome .lgd-home-stage-brand {
  display: grid;
  grid-template-columns: 38px minmax(0, 1fr) 18px;
  align-items: center;
  gap: 10px;
  animation: lgdHomeRise 720ms 80ms cubic-bezier(0.22, 1, 0.36, 1) both;
}

#pgHome .lgd-home-stage-brand > img {
  width: 38px;
  height: 38px;
  border: 1px solid rgba(215, 173, 104, 0.5);
  border-radius: 50%;
  object-fit: cover;
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.44);
}

#pgHome .lgd-home-stage-brand > span { min-width: 0; display: grid; gap: 1px; }
#pgHome .lgd-home-stage-brand strong {
  overflow: hidden;
  color: #f2d6a8;
  font-family: Georgia, 'Times New Roman', serif;
  font-size: 1.05rem;
  font-weight: 700;
  letter-spacing: 0;
  line-height: 1.08;
  text-overflow: ellipsis;
  white-space: nowrap;
}
#pgHome .lgd-home-stage-brand small {
  color: rgba(255, 250, 240, 0.68);
  font-size: 0.55rem;
  font-style: normal;
  font-weight: 800;
  letter-spacing: 0;
  text-transform: uppercase;
}
#pgHome .lgd-home-stage-brand > i {
  color: rgba(215, 173, 104, 0.72);
  font-family: Georgia, 'Times New Roman', serif;
  font-size: 0.7rem;
  font-style: normal;
  text-align: right;
}

#pgHome .lgd-home-stage-copy {
  width: min(100%, 390px);
  margin-top: auto;
  padding-bottom: 15px;
  animation: lgdHomeRise 800ms 150ms cubic-bezier(0.22, 1, 0.36, 1) both;
}

#pgHome .lgd-home-kicker {
  display: block;
  margin-bottom: 7px;
  color: #d9786f;
  font-size: 0.63rem;
  font-weight: 900;
  letter-spacing: 0;
  text-transform: uppercase;
}

#pgHome .lgd-home-stage-copy h2 {
  margin: 0;
  color: #fffaf0;
  font-family: Georgia, 'Times New Roman', serif;
  font-size: 3rem;
  font-weight: 700;
  letter-spacing: 0;
  line-height: 0.96;
  text-wrap: balance;
  text-shadow: 0 8px 28px rgba(0, 0, 0, 0.7);
}

#pgHome .lgd-home-stage-copy h2 span { color: #d9b06b; }
#pgHome .lgd-home-stage-copy p {
  max-width: 330px;
  margin: 11px 0 0;
  color: rgba(255, 250, 240, 0.78);
  font-family: Georgia, 'Times New Roman', serif;
  font-size: 0.84rem;
  line-height: 1.48;
  text-shadow: 0 4px 18px rgba(0, 0, 0, 0.8);
}

#pgHome .lgd-home-live:not(.hidden) {
  display: block;
  margin: 0 0 12px !important;
  animation: lgdHomeRise 640ms cubic-bezier(0.22, 1, 0.36, 1) both;
}

html.mafia-ui-v3 #pgHome .lgd-home-live .card {
  margin: 0 !important;
  padding: 11px 12px !important;
  border: 1px solid rgba(215, 173, 104, 0.34) !important;
  border-radius: 8px !important;
  background: rgba(7, 5, 4, 0.76) !important;
  box-shadow: 0 12px 32px rgba(0, 0, 0, 0.3) !important;
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
}

#pgHome .lgd-home-live .lgd-go-game {
  min-height: 36px;
  margin-top: 8px;
  border-radius: 6px;
}

html.mafia-ui-v3 #pgHome .stat-grid {
  min-height: 62px;
  margin: 0 !important;
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 0;
  border-top: 1px solid rgba(215, 173, 104, 0.3);
  border-bottom: 1px solid rgba(215, 173, 104, 0.18);
  background: rgba(5, 4, 3, 0.38);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  animation: lgdHomeRise 760ms 220ms cubic-bezier(0.22, 1, 0.36, 1) both;
}

html.mafia-ui-v3 #pgHome .stat-box {
  min-width: 0;
  padding: 9px 5px !important;
  border: 0 !important;
  border-right: 1px solid rgba(215, 173, 104, 0.18) !important;
  border-radius: 0 !important;
  background: transparent !important;
  box-shadow: none !important;
}

html.mafia-ui-v3 #pgHome .stat-box:last-child { border-right: 0 !important; }
#pgHome .stat-box .n {
  color: #fffaf0;
  font-family: Georgia, 'Times New Roman', serif;
  font-size: 1.35rem;
  font-weight: 700;
  font-variant-numeric: tabular-nums;
  line-height: 1;
}
#pgHome .stat-box .l {
  margin-top: 4px;
  color: rgba(255, 250, 240, 0.58);
  font-size: 0.55rem;
  font-weight: 800;
  letter-spacing: 0;
  text-transform: uppercase;
}

#pgHome .lgd-home-content {
  position: relative;
  padding: 18px 0 0;
}

#pgHome .lgd-home-content::before {
  content: 'Клуб сегодня';
  display: block;
  margin: 0 0 9px;
  color: rgba(215, 173, 104, 0.7);
  font-family: Georgia, 'Times New Roman', serif;
  font-size: 0.68rem;
  font-weight: 700;
  letter-spacing: 0;
  text-transform: uppercase;
}

#pgHome .lgd-home-fold {
  width: 100%;
  margin: 0;
  overflow: clip;
  border: 0;
  border-top: 1px solid rgba(215, 173, 104, 0.2);
  border-radius: 0;
  background: transparent;
  transition: background-color 320ms cubic-bezier(0.22, 1, 0.36, 1);
}

#pgHome .lgd-home-fold:last-of-type { border-bottom: 1px solid rgba(215, 173, 104, 0.2); }
#pgHome .lgd-home-fold[open] { background: rgba(255, 250, 240, 0.025); }

#pgHome .lgd-home-fold-summary {
  min-height: 66px;
  padding: 10px 3px;
  display: grid;
  grid-template-columns: 32px minmax(0, 1fr) 28px;
  align-items: center;
  gap: 9px;
  color: #eee6dc;
  cursor: pointer;
  list-style: none;
  -webkit-tap-highlight-color: transparent;
  user-select: none;
  transition: color 260ms ease, padding 320ms cubic-bezier(0.22, 1, 0.36, 1);
}

#pgHome .lgd-home-fold-summary:active { padding-left: 7px; color: #fffaf0; }
#pgHome .lgd-home-fold-summary::-webkit-details-marker { display: none; }
#pgHome .lgd-home-fold-summary:focus-visible { outline: 2px solid rgba(215, 173, 104, 0.68); outline-offset: -2px; }
.lgd-home-fold-index {
  color: #d7ad68;
  font-family: Georgia, 'Times New Roman', serif;
  font-size: 0.75rem;
  font-variant-numeric: tabular-nums;
  line-height: 1;
}
.lgd-home-fold-copy { min-width: 0; display: grid; gap: 3px; }
.lgd-home-fold-title {
  min-width: 0;
  overflow: hidden;
  color: #fff8ea;
  font-family: Georgia, 'Times New Roman', serif;
  font-size: 0.92rem;
  font-weight: 700;
  letter-spacing: 0;
  line-height: 1.15;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.lgd-home-fold-meta {
  color: rgba(255, 250, 240, 0.48);
  font-size: 0.55rem;
  font-weight: 800;
  letter-spacing: 0;
  line-height: 1.2;
  text-transform: uppercase;
}
.lgd-home-fold-chevron {
  display: grid;
  place-items: center;
  color: var(--lgd-gold);
  font-family: Arial, sans-serif;
  font-size: 1.35rem;
  line-height: 1;
  transform: rotate(90deg);
  transition: transform 340ms cubic-bezier(0.22, 1, 0.36, 1);
}
#pgHome .lgd-home-fold[open] .lgd-home-fold-chevron { transform: rotate(-90deg); }

#pgHome .lgd-home-fold-body {
  padding: 3px 0 16px;
  animation: lgdHomeFoldOpen 360ms cubic-bezier(0.22, 1, 0.36, 1) both;
}

#pgHome .lgd-home-fold-body > :first-child { margin-top: 0; }
#pgHome .lgd-home-fold-body > :last-child { margin-bottom: 0; }

html.mafia-ui-v3 #pgHome .lgd-home-fold-body .card,
html.mafia-ui-v3 #pgHome .lgd-home-fold-body .player-row,
html.mafia-ui-v3 #pgHome .lgd-home-fold-body .game-row,
html.mafia-ui-v3 #pgHome .lgd-home-fold-body .my-game-card,
html.mafia-ui-v3 #pgHome .lgd-home-fold-body .ann-card {
  border: 1px solid rgba(215, 173, 104, 0.16) !important;
  border-radius: 8px !important;
  background: rgba(18, 15, 12, 0.82) !important;
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.18) !important;
}

#pgHome .lgd-home-signup {
  margin: 16px 0 4px;
  padding-top: 16px;
  border-top: 1px solid rgba(215, 173, 104, 0.2);
}

#pgHome .lgd-home-signup > .stitle {
  margin: 0 0 10px;
  color: #f0d29f;
  font-family: Georgia, 'Times New Roman', serif;
  font-size: 1rem;
  font-weight: 700;
  letter-spacing: 0;
  text-transform: none;
}

#pgHome .lgd-home-signup > .stitle::after { background: rgba(215, 173, 104, 0.2); }
html.mafia-ui-v3 #pgHome .lgd-home-signup .gsu-card {
  border: 1px solid rgba(215, 173, 104, 0.28) !important;
  border-radius: 8px !important;
  background: linear-gradient(145deg, rgba(87, 24, 21, 0.52), rgba(17, 14, 11, 0.92)) !important;
  box-shadow: 0 18px 44px rgba(0, 0, 0, 0.26) !important;
}

@keyframes lgdHomeFoldOpen {
  from { opacity: 0; transform: translateY(-8px); }
  to { opacity: 1; transform: none; }
}

@keyframes lgdHomeArtIn {
  from { opacity: 0.45; transform: scale(1.08); }
  to { opacity: 1; transform: scale(1.025); }
}

@keyframes lgdHomeRise {
  from { opacity: 0; transform: translateY(14px); }
  to { opacity: 1; transform: none; }
}

.lgd-attention {
  animation: lgdAttention 760ms cubic-bezier(0.22, 1, 0.36, 1);
}

.lgd-reveal {
  animation: lgdReveal 620ms cubic-bezier(0.22, 1, 0.36, 1) both;
}

.lgd-delay-1 { animation-delay: 70ms; }
.lgd-delay-2 { animation-delay: 130ms; }

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

@keyframes lgdArtSettle {
  from { opacity: 0.45; transform: scale(1.075); }
  to { opacity: 1; transform: scale(1.025); }
}

@keyframes lgdAttention {
  0%, 100% { box-shadow: none; }
  45% { box-shadow: 0 0 0 3px rgba(215, 173, 104, 0.38); }
}

@keyframes lgdModalFade {
  from { opacity: 0; }
  to { opacity: 1; }
}

@media (max-width: 620px) {
  .lgd-player-stage { gap: 15px; }
  .lgd-role-visual { min-height: 510px; }
  .lgd-role-content { padding: 17px; }
  .lgd-role-main { width: 100%; }
  .lgd-role-title { font-size: 2.15rem; }
  .lgd-role-info { padding: 16px; }
  .lgd-role-description { font-size: 0.75rem; line-height: 1.56; }
  .lgd-role-art-image { object-position: center 22%; }
  .lgd-role-card { grid-template-columns: 44px minmax(0, 1fr); gap: 7px; padding: 8px 32px 8px 7px; }
  .lgd-role-card-art { width: 44px; height: 58px; }
  .lgd-role-count { width: 23px; height: 23px; }
}

@media (max-width: 410px) {
  #pgHome .lgd-home-stage { height: clamp(480px, calc(100dvh - 108px), 620px); }
  #pgHome .lgd-home-stage-inner { padding-right: 15px; padding-left: 15px; }
  #pgHome .lgd-home-stage-copy h2 { font-size: 2.55rem; }
  #pgHome .lgd-home-stage-copy p { font-size: 0.78rem; }
  #pgHome .lgd-home-fold-summary { min-height: 62px; }
  .lgd-role-modal { padding: 12px; }
  .lgd-role-modal-panel { max-height: calc(100dvh - 24px); }
  .lgd-role-modal-art { height: min(52dvh, 430px); }
  #roleModal.lgd-catalog-role-modal { padding: 12px; }
  #roleModal .lgd-catalog-role-panel { max-height: calc(100dvh - 24px); }
  #roleModal .lgd-catalog-role-art { height: min(52dvh, 430px); }
  .lgd-role-visual { min-height: 465px; }
  .lgd-role-content { padding: 14px; }
  .lgd-role-brand { max-width: 50%; }
  .lgd-role-brand strong { overflow: hidden; font-size: 1.05rem; text-overflow: ellipsis; white-space: nowrap; }
  .lgd-phase-chip { min-height: 29px; padding: 6px 8px; font-size: 0.61rem; }
  .lgd-role-main { width: 100%; }
  .lgd-role-title { font-size: 1.85rem; }
  .lgd-role-info { padding: 14px; }
  .lgd-role-description { font-size: 0.7rem; }
  .lgd-role-chip { font-size: 0.5rem; }
  .lgd-role-grid, .lgd-player-grid { gap: 5px; }
  .lgd-role-card { min-height: 88px; grid-template-columns: 40px minmax(0, 1fr); }
  .lgd-role-card-art { width: 40px; height: 54px; }
  .lgd-role-card-info strong { font-size: 0.66rem; }
  .lgd-player-card { min-height: 78px; padding-right: 25px; grid-template-columns: 38px minmax(0, 1fr); gap: 7px; }
  .lgd-player-avatar { width: 38px; height: 38px; }
  .lgd-player-name { font-size: 0.69rem; }
}

@media (min-width: 760px) {
  #pgHome .lgd-home-stage { height: min(650px, calc(100dvh - 150px)); }
  .lgd-role-visual { min-height: 620px; }
  .lgd-role-content { padding: 30px; }
  .lgd-role-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .lgd-player-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); }
}

@media (prefers-reduced-motion: reduce) {
  .lgd-reveal,
  .lgd-role-art-image,
  #pgHome .lgd-home-stage-art,
  #pgHome .lgd-home-stage-brand,
  #pgHome .lgd-home-stage-copy,
  #pgHome .stat-grid,
  .lgd-attention {
    animation: none !important;
  }
  .lgd-host-message,
  .lgd-go-game,
  .lgd-promoted-actions > button,
  .lgd-role-card,
  .lgd-player-card {
    transition: none !important;
  }
  #roleModal .lgd-catalog-role-panel { animation: none !important; }
  #pgHome .lgd-home-fold-body { animation: none !important; }
  #pgHome .lgd-home-fold-summary { transition: none !important; }
  #pgHome .lgd-home-fold-chevron { transition: none !important; }
}
