/*
|--------------------------------------------------------------------------
| FortuneSpace Theme V2 Preview
|--------------------------------------------------------------------------
| Temporary reversible visual prototype.
| Remove stylesheet link to restore previous appearance.
*/

:root {
  --fs-v2-canvas: #0a0f1d;
  --fs-v2-surface: #121826;
  --fs-v2-elevated: #1e293b;
  --fs-v2-text: #f8fafc;
  --fs-v2-text-secondary: #cbd5e1;
  --fs-v2-text-muted: #94a3b8;
  --fs-v2-text-subtle: #64748b;
  --fs-v2-green: #22c55e;
  --fs-v2-green-hover: #16a34a;
  --fs-v2-green-pale: #86efac;
  --fs-v2-border: rgba(148, 163, 184, 0.16);
  --fs-v2-border-hover: rgba(148, 163, 184, 0.22);
}

/* Public application chrome. Auth and admin retain their existing themes. */
body:not(.auth-page):not(.admin-page) .fs-appbar {
  background: rgba(10, 15, 29, 0.96) !important;
  border-bottom: 1px solid var(--fs-v2-border) !important;
  box-shadow: 0 10px 30px rgba(2, 6, 23, 0.18);
  -webkit-backdrop-filter: saturate(120%) blur(10px);
  backdrop-filter: saturate(120%) blur(10px);
}

body:not(.auth-page):not(.admin-page) .fs-brand__name {
  color: var(--fs-v2-text) !important;
}

body:not(.auth-page):not(.admin-page) .fs-appbar .app-actions {
  background: rgba(18, 24, 38, 0.72);
  border-color: var(--fs-v2-border);
}

body:not(.auth-page):not(.admin-page) .fs-appbar .btn-ghost {
  color: var(--fs-v2-text-secondary);
  background: var(--fs-v2-surface);
  border-color: var(--fs-v2-border-hover);
  box-shadow: none;
}

body:not(.auth-page):not(.admin-page) .fs-appbar .btn-ghost:hover {
  color: var(--fs-v2-text);
  background: var(--fs-v2-elevated);
  border-color: rgba(148, 163, 184, 0.3);
}

body:not(.auth-page):not(.admin-page) .fs-appbar .btn-primary {
  color: #052e16;
  background: var(--fs-v2-green);
  border-color: var(--fs-v2-green);
  box-shadow: 0 8px 20px rgba(34, 197, 94, 0.2);
}

body:not(.auth-page):not(.admin-page) .fs-appbar .btn-primary:hover {
  color: #052e16;
  background: var(--fs-v2-green-hover);
  border-color: var(--fs-v2-green-hover);
}

body:not(.auth-page):not(.admin-page) .fs-appbar .link-nav {
  color: var(--fs-v2-text-secondary);
}

body:not(.auth-page):not(.admin-page) .fs-appbar .link-nav:hover {
  color: var(--fs-v2-text);
  background: var(--fs-v2-elevated);
}

body:not(.auth-page):not(.admin-page) .fs-appbar .link-nav.active {
  color: var(--fs-v2-green-pale);
  background: rgba(34, 197, 94, 0.14);
}

/* Feed canvas and the three-level surface hierarchy. */
body.feed-surface-dark,
body.feed-surface-dark .main-content {
  background: var(--fs-v2-canvas);
}

body.feed-surface-dark .news-card,
body.feed-surface-dark .feed-container .card.post-card.fs-procardWrap {
  background: var(--fs-v2-surface) !important;
  border-color: var(--fs-v2-border) !important;
  box-shadow: 0 16px 38px rgba(2, 6, 23, 0.28) !important;
}

body.feed-surface-dark .news-card:hover,
body.feed-surface-dark .feed-container .card.post-card.fs-procardWrap:hover {
  border-color: var(--fs-v2-border-hover) !important;
  box-shadow: 0 20px 46px rgba(2, 6, 23, 0.36) !important;
}

body.feed-surface-dark .fs-procard__agencybar {
  background: var(--fs-v2-elevated) !important;
  border-bottom-color: var(--fs-v2-border) !important;
}

body.feed-surface-dark .fs-stats-ribbon {
  color: var(--fs-v2-text-secondary);
  background: rgba(18, 24, 38, 0.58);
  border-color: var(--fs-v2-border);
}

body.feed-surface-dark .fs-dot {
  background: var(--fs-v2-green);
}

/* Semantic public typography hierarchy. */
body.feed-surface-dark .hero h1,
body.feed-surface-dark .hero h2,
body.feed-surface-dark .hero h3,
body.feed-surface-dark .fs-news-title,
body.feed-surface-dark .news-card__title,
body.feed-surface-dark .fs-procard__name,
body.feed-surface-dark .fs-stats-mid strong {
  color: var(--fs-v2-text) !important;
}

body.feed-surface-dark .hero p,
body.feed-surface-dark .fs-news-sub,
body.feed-surface-dark .news-card__summary,
body.feed-surface-dark .fs-procard__text {
  color: var(--fs-v2-text-secondary) !important;
}

body.feed-surface-dark .news-card__time,
body.feed-surface-dark .news-card__views,
body.feed-surface-dark .fs-procard__stats,
body.feed-surface-dark .fs-procard__time,
body.feed-surface-dark .fs-stats-left {
  color: var(--fs-v2-text-muted) !important;
}

body.feed-surface-dark .news-card__updated,
body.feed-surface-dark .news-card__updated-outside,
body.feed-surface-dark .fs-stats-right,
body.feed-surface-dark .fs-stats-mid .label {
  color: var(--fs-v2-text-subtle) !important;
}

body.feed-surface-dark .news-card__readmore,
body.feed-surface-dark .fs-procard__text .more-link {
  color: var(--fs-v2-green-pale) !important;
}

body.feed-surface-dark .news-control {
  color: var(--fs-v2-green-pale);
  background: var(--fs-v2-surface);
  border-color: var(--fs-v2-border-hover);
}

body.feed-surface-dark .news-control:hover,
body.feed-surface-dark .news-control:focus-visible {
  color: #fff;
  background: var(--fs-v2-green);
  border-color: var(--fs-v2-green);
}

/* Shared Moments hero presentation for guest and member feeds. */
body.feed-surface-dark .news-section.fs-news--featured-rail {
  margin-top: 12px;
  padding-top: 18px;
}

body.feed-surface-dark .news-section.fs-news--featured-rail .fs-news-kicker {
  gap: 9px;
}

body.feed-surface-dark .news-section.fs-news--featured-rail .fs-news-kicker-text {
  color: var(--fs-v2-green-pale);
  font-family: var(--fs-body-font);
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.16em;
  line-height: 1.2;
  text-transform: uppercase;
}

body.feed-surface-dark .news-section.fs-news--featured-rail .fs-news-title {
  margin: 9px 0 8px;
  color: var(--fs-v2-text);
  font-family: var(--fs-headline-font);
  font-size: clamp(40px, 4vw, 44px);
  font-weight: 900;
  letter-spacing: -0.015em;
  line-height: 1.04;
}

body.feed-surface-dark .news-section.fs-news--featured-rail .fs-news-sub {
  max-width: 760px;
  margin: 0;
  color: var(--fs-v2-text-secondary);
  font-family: var(--fs-body-font);
  font-size: 16px;
  font-weight: 400;
  letter-spacing: 0;
  line-height: 1.5;
}

body.feed-surface-dark .news-section.fs-news--featured-rail .fs-news-side-title {
  color: var(--fs-v2-text-secondary);
  font-family: var(--fs-body-font);
  font-size: 17px;
  font-weight: 600;
  line-height: 1.3;
}

body.feed-surface-dark .news-section.fs-news--featured-rail .fs-news-side-tip {
  color: var(--fs-v2-text-muted);
  font-family: var(--fs-body-font);
  font-size: 14px;
  font-weight: 400;
  line-height: 1.4;
}

@media (max-width: 991.98px) {
  body.feed-surface-dark .news-section.fs-news--featured-rail {
    margin-top: 4px;
    padding-top: 8px;
  }

  /* Defeats the production mobile header padding and hidden-kicker !important rules. */
  body.feed-surface-dark.fs-has-news-hero .news-section.fs-news--featured-rail [data-news-mobile-header] {
    padding: 4px 14px 8px !important;
  }

  body.feed-surface-dark.fs-has-news-hero .news-section.fs-news--featured-rail [data-news-mobile-header] .fs-news-kicker {
    display: flex !important;
  }

  body.feed-surface-dark .news-section.fs-news--featured-rail .fs-news-title {
    margin: 7px 0 7px;
    font-size: 32px;
  }

  body.feed-surface-dark .news-section.fs-news--featured-rail .fs-news-sub {
    font-size: 15px;
  }

  body.feed-surface-dark .news-section.fs-news--featured-rail .fs-news-rail {
    margin-top: 6px;
  }
}

@media (max-width: 640px) {
  body.feed-surface-dark .news-section.fs-news--featured-rail .fs-news-title {
    font-size: 30px;
  }

  body.feed-surface-dark .news-section.fs-news--featured-rail .fs-news-kicker-text {
    font-size: 11px;
    letter-spacing: 0.14em;
  }
}

/*
 * The refresh script injects its legacy presentation after page styles load.
 * Important declarations keep the preview visual-only and one-link reversible.
 */
body.feed-surface-dark .floating-refresh-btn {
  background: var(--fs-v2-surface) !important;
  border: 1px solid var(--fs-v2-border-hover) !important;
  box-shadow: 0 10px 28px rgba(2, 6, 23, 0.34) !important;
  transition: background-color 0.2s, border-color 0.2s, box-shadow 0.2s, transform 0.2s !important;
}

body.feed-surface-dark .floating-refresh-btn .refresh-icon {
  fill: var(--fs-v2-green) !important;
}

body.feed-surface-dark .floating-refresh-btn:hover,
body.feed-surface-dark .floating-refresh-btn:focus-visible,
body.feed-surface-dark .floating-refresh-btn.refreshing {
  background: var(--fs-v2-green) !important;
  border-color: var(--fs-v2-green) !important;
  box-shadow: 0 10px 28px rgba(34, 197, 94, 0.28) !important;
  transform: scale(1.06) !important;
  outline: none;
}

body.feed-surface-dark .floating-refresh-btn:focus-visible {
  outline: 3px solid rgba(134, 239, 172, 0.5);
  outline-offset: 3px;
}

body.feed-surface-dark .floating-refresh-btn:hover .refresh-icon,
body.feed-surface-dark .floating-refresh-btn:focus-visible .refresh-icon,
body.feed-surface-dark .floating-refresh-btn.refreshing .refresh-icon {
  fill: #fff !important;
}

body.feed-surface-dark .floating-refresh-btn:active {
  transform: scale(0.95) !important;
}

/* Preserve the mobile photo-first treatment while normalizing its frame. */
@media (max-width: 767px) {
  body.feed-surface-dark.fs-has-news-hero .news-section.fs-news--featured-rail .news-card--rail {
    background: var(--fs-v2-surface) !important;
    border-color: var(--fs-v2-border) !important;
  }
}

/*
|--------------------------------------------------------------------------
| Refinement 1: mobile usability
|--------------------------------------------------------------------------
| Keep desktop unchanged while making the guest header and floating tools
| fit small screens without covering an excessive amount of feed content.
*/
@media (max-width: 430px) {
  body.is-guest:not(.auth-page) .fs-appbar__inner {
    width: 100%;
    min-width: 0;
    height: 64px;
    margin: 0 auto;
    padding: 0 10px;
    gap: 6px !important;
    overflow: hidden !important;
  }

  body.is-guest:not(.auth-page) .fs-brand {
    min-width: 0;
    flex: 1 1 auto;
    gap: 5px !important;
  }

  body.is-guest:not(.auth-page) .fs-brand img,
  body.is-guest:not(.auth-page) .fs-brand__img {
    width: 34px !important;
    height: 34px !important;
    flex: 0 0 34px;
  }

  body.is-guest:not(.auth-page) .fs-brand__name {
    min-width: 0;
    font-size: 15px !important;
    letter-spacing: 0 !important;
  }

  body.is-guest:not(.auth-page) .fs-appbar .app-actions {
    max-width: none !important;
    padding: 3px;
    gap: 4px !important;
    flex: 0 0 auto;
    overflow: visible !important;
  }

  body.is-guest:not(.auth-page) .fs-appbar .app-actions .btn {
    min-height: 34px;
    padding: 7px 8px !important;
    font-size: 12px !important;
    line-height: 1;
  }
}

@media (max-width: 640px) {
  body.feed-surface-dark {
    --fs-v2-mobile-control-size: 52px;
    --fs-v2-mobile-control-gap: 12px;
    --fs-v2-mobile-control-edge: max(12px, env(safe-area-inset-right));
    --fs-v2-mobile-control-bottom: max(16px, env(safe-area-inset-bottom));
  }

  body.feed-surface-dark .floating-refresh-container,
  body.feed-surface-dark #fs-search-fab,
  body.feed-surface-dark .fs-map-fab {
    right: var(--fs-v2-mobile-control-edge) !important;
    width: var(--fs-v2-mobile-control-size) !important;
    height: var(--fs-v2-mobile-control-size) !important;
    color: var(--fs-v2-green) !important;
    background: var(--fs-v2-surface) !important;
    border: 1px solid var(--fs-v2-border-hover) !important;
    box-shadow: 0 10px 28px rgba(2, 6, 23, 0.34) !important;
  }

  body.feed-surface-dark .floating-refresh-container {
    bottom: var(--fs-v2-mobile-control-bottom) !important;
    border: 0 !important;
    background: transparent !important;
    box-shadow: none !important;
  }

  body.feed-surface-dark .floating-refresh-btn {
    width: var(--fs-v2-mobile-control-size) !important;
    height: var(--fs-v2-mobile-control-size) !important;
  }

  body.feed-surface-dark #fs-search-fab {
    bottom: calc(var(--fs-v2-mobile-control-bottom) + var(--fs-v2-mobile-control-size) + var(--fs-v2-mobile-control-gap)) !important;
    padding: 0;
    font-size: 0 !important;
    line-height: var(--fs-v2-mobile-control-size) !important;
  }

  body.feed-surface-dark #fs-search-fab::before {
    content: "\f002";
    font-family: "Font Awesome 6 Free";
    font-size: 20px;
    font-weight: 900;
  }

  body.feed-surface-dark .fs-map-fab {
    bottom: calc(var(--fs-v2-mobile-control-bottom) + var(--fs-v2-mobile-control-size) + var(--fs-v2-mobile-control-gap) + var(--fs-v2-mobile-control-size) + var(--fs-v2-mobile-control-gap)) !important;
  }

  body.feed-surface-dark #fs-search-fab:hover,
  body.feed-surface-dark #fs-search-fab:focus-visible,
  body.feed-surface-dark #fs-search-fab:active,
  body.feed-surface-dark .fs-map-fab:hover,
  body.feed-surface-dark .fs-map-fab:focus-visible,
  body.feed-surface-dark .fs-map-fab:active,
  body.feed-surface-dark .fs-map-fab[aria-expanded="true"] {
    color: #fff !important;
    background: var(--fs-v2-green) !important;
    border-color: var(--fs-v2-green) !important;
  }

  body.feed-surface-dark #fs-search-fab:focus-visible,
  body.feed-surface-dark .fs-map-fab:focus-visible {
    outline: 3px solid rgba(134, 239, 172, 0.5);
    outline-offset: 3px;
  }

  body.feed-surface-dark .fs-nudge {
    display: none !important;
  }

  body.feed-surface-dark.fs-has-news-hero .news-section.fs-news--featured-rail [data-news-mobile-header] {
    padding-bottom: 8px !important;
  }

  body.feed-surface-dark.fs-has-news-hero .news-section.fs-news--featured-rail .fs-news-rail {
    margin-top: 6px !important;
  }
}

/* Member mobile header: identity first, complete action set second. */
@media (max-width: 640px) {
  body.is-member:not(.admin-page) .fs-appbar {
    height: auto;
    min-height: 106px;
  }

  body.is-member:not(.admin-page) .fs-appbar__inner {
    display: grid;
    grid-template-columns: minmax(0, 1fr);
    grid-template-rows: 36px 52px;
    width: 100%;
    height: auto;
    min-height: 106px;
    margin: 0 auto;
    padding: 6px 10px 8px;
    gap: 4px !important;
    overflow: visible !important;
  }

  body.is-member:not(.admin-page) .fs-brand {
    grid-row: 1;
    min-width: 0;
    justify-self: start;
    gap: 6px !important;
  }

  body.is-member:not(.admin-page) .fs-brand img,
  body.is-member:not(.admin-page) .fs-brand__img {
    width: 36px !important;
    height: 36px !important;
    flex: 0 0 36px;
  }

  body.is-member:not(.admin-page) .fs-brand__name {
    font-size: 16px !important;
    letter-spacing: 0 !important;
  }

  body.is-member:not(.admin-page) .fs-appbar .app-actions {
    grid-row: 2;
    display: grid;
    grid-auto-flow: column;
    grid-auto-columns: minmax(36px, 1fr);
    align-items: center;
    width: 100%;
    max-width: none;
    min-width: 0;
    padding: 6px 8px;
    gap: 4px !important;
    overflow: visible !important;
  }

  body.is-member:not(.admin-page) .fs-appbar .link-nav,
  body.is-member:not(.admin-page) .fs-appbar .btn-icon,
  body.is-member:not(.admin-page) .fs-appbar .avatar-link,
  body.is-member:not(.admin-page) .fs-appbar .logout-form {
    display: flex;
    width: 100%;
    min-width: 0;
    height: 40px;
    margin: 0;
    padding: 0 !important;
    align-items: center;
    justify-content: center;
  }

  body.is-member:not(.admin-page) .fs-appbar .link-nav,
  body.is-member:not(.admin-page) .fs-appbar .btn-icon,
  body.is-member:not(.admin-page) .fs-appbar .btn-danger {
    min-height: 40px;
    border-radius: 10px;
  }

  body.is-member:not(.admin-page) .fs-appbar .btn-icon,
  body.is-member:not(.admin-page) .fs-appbar .btn-danger {
    width: min(100%, 40px) !important;
    height: 40px !important;
    margin: 0 auto;
    padding: 0 !important;
    justify-content: center;
  }

  body.is-member:not(.admin-page) .fs-appbar .avatar-link {
    display: flex;
  }

  body.is-member:not(.admin-page) .fs-appbar .avatar {
    width: 36px;
    height: 36px;
  }

  body.is-member:not(.admin-page) .mobile-menu-toggle,
  body.is-member:not(.admin-page) .mobile-menu {
    display: none !important;
  }
}

/*
|--------------------------------------------------------------------------
| Authentication Preview — Option B
|--------------------------------------------------------------------------
| Standalone Login and Register pages opt into this reversible layer with
| their own stylesheet links. Every rule is scoped to their auth body.
*/
body.auth-body {
  min-width: 0;
  color: var(--fs-v2-text);
  background: var(--fs-v2-canvas);
  color-scheme: dark;
}

.auth-body .auth-wrap {
  min-width: 0;
  background: var(--fs-v2-canvas);
}

.auth-body .auth-card {
  color: var(--fs-v2-text-secondary);
  background: var(--fs-v2-surface);
  border-color: var(--fs-v2-border);
  box-shadow: 0 24px 64px rgba(2, 6, 23, 0.46);
}

.auth-body .auth-title {
  color: var(--fs-v2-text);
}

.auth-body .auth-sub {
  color: var(--fs-v2-text-muted);
}

.auth-body .auth-form,
.auth-body .field,
.auth-body .password {
  min-width: 0;
}

.auth-body label {
  color: var(--fs-v2-text-secondary);
}

.auth-body .input {
  color: var(--fs-v2-text);
  background-color: var(--fs-v2-elevated);
  border-color: var(--fs-v2-border-hover);
  caret-color: var(--fs-v2-green);
}

.auth-body .input::placeholder {
  color: var(--fs-v2-text-subtle);
  opacity: 1;
}

.auth-body .input:hover {
  border-color: rgba(148, 163, 184, 0.32);
}

.auth-body .input:focus {
  color: var(--fs-v2-text);
  background-color: var(--fs-v2-elevated);
  border-color: var(--fs-v2-green);
  box-shadow: 0 0 0 3px rgba(34, 197, 94, 0.18);
  outline: 0;
}

.auth-body select.input {
  color: var(--fs-v2-text);
  background-color: var(--fs-v2-elevated);
}

.auth-body select.input option {
  color: var(--fs-v2-text);
  background: var(--fs-v2-elevated);
}

.auth-body .toggle {
  color: var(--fs-v2-green-pale);
  background: var(--fs-v2-elevated);
  border: 1px solid var(--fs-v2-border-hover);
}

.auth-body .toggle:hover {
  color: var(--fs-v2-text);
  background: rgba(34, 197, 94, 0.14);
  border-color: rgba(34, 197, 94, 0.38);
}

.auth-body .toggle:focus-visible {
  outline: 3px solid rgba(134, 239, 172, 0.5);
  outline-offset: 2px;
}

.auth-body .btn-primary {
  color: #052e16;
  background: var(--fs-v2-green);
  box-shadow: 0 10px 24px rgba(34, 197, 94, 0.18);
}

.auth-body .btn-primary:hover {
  color: #052e16;
  background: var(--fs-v2-green-hover);
  box-shadow: 0 12px 28px rgba(22, 163, 74, 0.25);
}

.auth-body .btn-primary:focus-visible,
.auth-body .btn-ghost:focus-visible {
  outline: 3px solid rgba(134, 239, 172, 0.5);
  outline-offset: 3px;
}

.auth-body .btn-ghost {
  color: var(--fs-v2-text-secondary);
  background: var(--fs-v2-elevated);
  border-color: var(--fs-v2-border-hover);
}

.auth-body .btn-ghost:hover {
  color: var(--fs-v2-text);
  background: rgba(30, 41, 59, 0.78);
  border-color: rgba(148, 163, 184, 0.32);
}

.auth-body .muted {
  color: var(--fs-v2-text-muted);
}

.auth-body a.link {
  color: var(--fs-v2-green-pale);
}

.auth-body a.link:focus-visible {
  border-radius: 3px;
  outline: 2px solid rgba(134, 239, 172, 0.55);
  outline-offset: 3px;
}

.auth-body .divider {
  color: var(--fs-v2-text-subtle);
}

.auth-body .divider::before,
.auth-body .divider::after {
  background: var(--fs-v2-border);
}

.auth-body .msg.error {
  color: #fecaca;
  background: rgba(239, 68, 68, 0.12);
  border: 1px solid rgba(239, 68, 68, 0.3);
}

.auth-body .msg.success {
  color: var(--fs-v2-green-pale);
  background: rgba(34, 197, 94, 0.12);
  border: 1px solid rgba(34, 197, 94, 0.3);
}

.auth-body input[type="checkbox"] {
  width: 18px !important;
  height: 18px;
  accent-color: var(--fs-v2-green);
}

@media (max-width: 600px) {
  .auth-body .auth-wrap {
    min-height: 100svh;
    padding: 16px;
  }

  .auth-body .auth-card {
    padding: 24px 20px;
  }
}



/* FCCI+ Moments Rewards information dialog. */
.fs-news-sub-row {
  display: flex;
  max-width: 810px;
  align-items: center;
  gap: 4px;
}

.fs-moments-info-trigger {
  display: inline-flex;
  width: 40px;
  height: 40px;
  margin: -8px 0 -8px 2px;
  padding: 0;
  flex: 0 0 40px;
  align-items: center;
  justify-content: center;
  color: var(--fs-v2-green-pale);
  background: transparent;
  border: 0;
  border-radius: 999px;
  cursor: pointer;
  transition: color 0.18s ease, background-color 0.18s ease;
}

.fs-moments-info-trigger i {
  font-size: 19px;
  line-height: 1;
}

.fs-moments-info-trigger:hover,
.fs-moments-info-trigger:focus-visible {
  color: #fff;
  background: rgba(34, 197, 94, 0.16);
}

.fs-moments-info-trigger:focus-visible,
.fs-moments-dialog__close:focus-visible,
.fs-moments-dialog__cta:focus-visible {
  outline: 3px solid rgba(134, 239, 172, 0.55);
  outline-offset: 2px;
}

html.fs-moments-dialog-locked,
body.fs-moments-dialog-locked {
  overflow: hidden;
}

.fs-moments-dialog {
  width: min(calc(100vw - 32px), 600px);
  max-width: 600px;
  max-height: min(88dvh, 780px);
  margin: auto;
  padding: 0;
  overflow: hidden;
  color: var(--fs-v2-text-secondary);
  background: var(--fs-v2-surface);
  border: 1px solid var(--fs-v2-border-hover);
  border-radius: 22px;
  box-shadow: 0 28px 90px rgba(2, 6, 23, 0.72);
  font-family: var(--fs-body-font);
}

.fs-moments-dialog:not([open]) {
  display: none;
}

.fs-moments-dialog[open] {
  animation: fs-moments-dialog-in 0.2s ease-out;
}

.fs-moments-dialog::backdrop {
  background: rgba(2, 6, 23, 0.76);
  -webkit-backdrop-filter: blur(4px);
  backdrop-filter: blur(4px);
}

.fs-moments-dialog__panel {
  display: flex;
  max-height: min(88dvh, 780px);
  flex-direction: column;
  background: var(--fs-v2-surface);
}

.fs-moments-dialog__header {
  display: flex;
  padding: 22px 22px 14px;
  flex: 0 0 auto;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  border-bottom: 1px solid var(--fs-v2-border);
}

.fs-moments-dialog__header h2 {
  margin: 0;
  color: var(--fs-v2-text);
  font-family: var(--fs-headline-font);
  font-size: 25px;
  font-weight: 900;
  letter-spacing: -0.015em;
  line-height: 1.15;
}

.fs-moments-dialog__close {
  display: inline-flex;
  width: 40px;
  height: 40px;
  padding: 0;
  flex: 0 0 40px;
  align-items: center;
  justify-content: center;
  color: var(--fs-v2-text-secondary);
  background: var(--fs-v2-elevated);
  border: 1px solid var(--fs-v2-border-hover);
  border-radius: 12px;
  cursor: pointer;
  transition: color 0.18s ease, background-color 0.18s ease, border-color 0.18s ease;
}

.fs-moments-dialog__close:hover {
  color: #fff;
  background: rgba(34, 197, 94, 0.16);
  border-color: rgba(134, 239, 172, 0.36);
}

.fs-moments-dialog__content {
  padding: 20px 22px;
  overflow-y: auto;
  overscroll-behavior: contain;
  scrollbar-gutter: stable;
}

.fs-moments-dialog__intro {
  margin: 0 0 20px;
  color: var(--fs-v2-text-secondary);
  font-size: 16px;
  font-weight: 600;
  line-height: 1.5;
}

.fs-moments-dialog__section + .fs-moments-dialog__section {
  margin-top: 18px;
}

.fs-moments-dialog__section h3 {
  margin: 0 0 7px;
  color: var(--fs-v2-text);
  font-family: var(--fs-headline-font);
  font-size: 16px;
  font-weight: 800;
  line-height: 1.3;
}

.fs-moments-dialog__section p,
.fs-moments-dialog__section ol {
  margin: 0;
  color: var(--fs-v2-text-secondary);
  font-size: 15px;
  line-height: 1.55;
}

.fs-moments-dialog__section ol {
  padding-left: 22px;
}

.fs-moments-dialog__section li + li {
  margin-top: 5px;
}

.fs-moments-dialog__actions {
  display: flex;
  padding: 16px 22px calc(16px + env(safe-area-inset-bottom));
  flex: 0 0 auto;
  align-items: center;
  justify-content: flex-end;
  gap: 10px;
  background: var(--fs-v2-elevated);
  border-top: 1px solid var(--fs-v2-border);
}

.fs-moments-dialog__cta {
  display: inline-flex;
  min-height: 42px;
  padding: 10px 17px;
  align-items: center;
  justify-content: center;
  border: 1px solid transparent;
  border-radius: 11px;
  font-family: var(--fs-body-font);
  font-size: 14px;
  font-weight: 700;
  line-height: 1.2;
  text-decoration: none;
}

.fs-moments-dialog__cta--primary {
  color: #052e16;
  background: var(--fs-v2-green);
  border-color: var(--fs-v2-green);
}

.fs-moments-dialog__cta--primary:hover {
  color: #052e16;
  background: var(--fs-v2-green-hover);
  border-color: var(--fs-v2-green-hover);
}

.fs-moments-dialog__cta--secondary {
  color: var(--fs-v2-text-secondary);
  background: var(--fs-v2-surface);
  border-color: var(--fs-v2-border-hover);
}

.fs-moments-dialog__cta--secondary:hover {
  color: var(--fs-v2-text);
  background: rgba(18, 24, 38, 0.8);
}

.fs-moments-dialog-backdrop {
  position: fixed;
  z-index: 1090;
  inset: 0;
  background: rgba(2, 6, 23, 0.76);
  -webkit-backdrop-filter: blur(4px);
  backdrop-filter: blur(4px);
}

.fs-moments-dialog.fs-moments-dialog--fallback-open {
  position: fixed;
  z-index: 1091;
  inset: 0;
}

@keyframes fs-moments-dialog-in {
  from {
    opacity: 0;
    transform: translateY(10px) scale(0.985);
  }

  to {
    opacity: 1;
    transform: translateY(0) scale(1);
  }
}

@media (max-width: 767px) {
  .fs-news-sub-row {
    align-items: flex-end;
  }

  .fs-moments-dialog {
    width: 100%;
    max-width: none;
    max-height: 88dvh;
    margin: auto 0 0;
    border-right: 0;
    border-bottom: 0;
    border-left: 0;
    border-radius: 22px 22px 0 0;
  }

  .fs-moments-dialog__panel {
    max-height: 88dvh;
  }

  .fs-moments-dialog__header {
    padding: 18px 16px 12px;
  }

  .fs-moments-dialog__header h2 {
    font-size: 22px;
  }

  .fs-moments-dialog__content {
    padding: 18px 16px;
  }

  .fs-moments-dialog__actions {
    padding: 14px 16px calc(14px + env(safe-area-inset-bottom));
  }

  .fs-moments-dialog__cta {
    flex: 1 1 0;
  }

  .fs-moments-dialog[open] {
    animation-name: fs-moments-sheet-in;
  }

  .fs-moments-dialog.fs-moments-dialog--fallback-open {
    inset: auto 0 0;
  }
}

@keyframes fs-moments-sheet-in {
  from {
    opacity: 0;
    transform: translateY(28px);
  }

  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@media (prefers-reduced-motion: reduce) {
  .fs-moments-info-trigger,
  .fs-moments-dialog,
  .fs-moments-dialog__close {
    animation: none;
    transition: none;
  }
}
/* FortuneSpace Language Selector — Phase 1B */

body:not(.auth-page):not(.admin-page) .fs-appbar__inner {
  position: relative;
}

.fs-language-switcher {
  display: flex;
  align-items: center;
  gap: 2px;
  flex: 0 0 auto;
  padding: 3px;
  margin-left: 7px;
  border: 1px solid var(--fs-v2-border);
  border-radius: 10px;
  background: rgba(18,24,38,.82);
}

.fs-language-switcher form {
  display: flex;
  margin: 0;
}

.fs-language-button {
  display: flex;
  align-items: center;
  justify-content: center;
  min-width: 30px;
  height: 30px;
  padding: 0 6px;
  border: 0;
  border-radius: 7px;
  background: transparent;
  color: var(--fs-v2-text-muted);
  font: inherit;
  font-size: 11px;
  font-weight: 800;
  cursor: pointer;
}

.fs-language-button:hover {
  color: var(--fs-v2-text);
  background: var(--fs-v2-elevated);
}

.fs-language-button.is-active {
  color: #052e16;
  background: var(--fs-v2-green-pale);
}

/* Keep member mobile navigation row completely untouched. */
@media (max-width:640px) {
  body.is-member:not(.admin-page) .fs-language-switcher {
    position: absolute;
    top: 7px;
    right: 10px;
    z-index: 30;
    margin: 0;
    padding: 2px;
  }

  body.is-member:not(.admin-page) .fs-language-button {
    min-width: 27px;
    height: 30px;
    padding: 0 4px;
    font-size: 10px;
  }
}

/* Guest phones need the smallest possible selector. */
@media (max-width:430px) {
  body.is-guest:not(.auth-page) .fs-language-switcher {
    gap: 1px;
    margin-left: 2px;
    padding: 2px;
  }

  body.is-guest:not(.auth-page) .fs-language-button {
    min-width: 22px;
    height: 28px;
    padding: 0 3px;
    font-size: 9px;
  }
}


/*
|--------------------------------------------------------------------------
| Guest Mobile Multilingual Header Fix
|--------------------------------------------------------------------------
| Long Portuguese/French auth labels need their own row.
| Row 1 = FortuneSpace + language selector
| Row 2 = authentication actions
*/

@media (max-width: 640px) {

  body.is-guest:not(.auth-page) .fs-appbar {
    height: auto !important;
    min-height: 106px;
  }

  body.is-guest:not(.auth-page) .fs-appbar__inner {
    display: grid !important;
    grid-template-columns: minmax(0, 1fr) auto !important;
    grid-template-rows: 40px 50px !important;

    width: 100% !important;
    height: auto !important;
    min-height: 106px;

    padding: 7px 10px 9px !important;
    gap: 3px 8px !important;

    overflow: visible !important;
  }

  body.is-guest:not(.auth-page) .fs-brand {
    grid-column: 1;
    grid-row: 1;

    width: auto;
    min-width: 0;

    justify-self: start;
    align-self: center;

    gap: 6px !important;
  }

  body.is-guest:not(.auth-page) .fs-brand img,
  body.is-guest:not(.auth-page) .fs-brand__img {
    width: 34px !important;
    height: 34px !important;
    flex: 0 0 34px;
  }

  body.is-guest:not(.auth-page) .fs-brand__name {
    display: block !important;

    min-width: 0;
    overflow: visible !important;

    font-size: 16px !important;
    letter-spacing: 0 !important;

    white-space: nowrap !important;
    text-overflow: clip !important;
  }

  body.is-guest:not(.auth-page) .fs-language-switcher {
    grid-column: 2;
    grid-row: 1;

    position: static !important;

    justify-self: end;
    align-self: center;

    margin: 0 !important;
    padding: 2px !important;
    gap: 1px !important;
  }

  body.is-guest:not(.auth-page) .fs-language-button {
    min-width: 28px !important;
    height: 30px !important;

    padding: 0 4px !important;

    font-size: 10px !important;
  }

  body.is-guest:not(.auth-page) .fs-appbar .app-actions {
    grid-column: 1 / -1;
    grid-row: 2;

    display: flex !important;

    width: 100% !important;
    max-width: none !important;

    justify-content: center !important;
    align-items: center;

    margin: 0 !important;
    padding: 4px !important;
    gap: 6px !important;

    overflow: visible !important;
  }

  body.is-guest:not(.auth-page) .fs-appbar .app-actions .btn {
    min-height: 38px;

    padding: 8px 14px !important;

    font-size: 13px !important;
    line-height: 1.1;

    white-space: nowrap;
  }

  body.is-guest:not(.auth-page) .mobile-menu-toggle {
    display: none !important;
  }
}
