/*
 * SSA Fun Tools Suite - dark neon alignment
 * Loaded after module/account CSS to normalize result surfaces.
 */

.ssafun-account-tool {
  color-scheme: dark;
  max-width: 980px;
  margin: 0 auto 32px;
  padding: 0 clamp(12px, 2vw, 24px);
  font-family: inherit;
  line-height: 1.6;
}

.ssafun-account-tool > * + * {
  margin-top: clamp(20px, 3vw, 34px) !important;
}

.ssafun-guidance-panel,
.ssafun-account-save {
  width: min(100%, 920px);
  margin: 0 auto clamp(22px, 3vw, 36px) !important;
  padding: clamp(18px, 3vw, 28px) !important;
  border: 1px solid rgba(45, 212, 191, 0.42) !important;
  border-radius: 10px !important;
  background:
    radial-gradient(circle at 8% 0%, rgba(45, 212, 191, 0.14), transparent 34%),
    radial-gradient(circle at 92% 8%, rgba(167, 139, 250, 0.12), transparent 36%),
    linear-gradient(145deg, rgba(8, 18, 34, 0.98), rgba(3, 8, 18, 0.98)) !important;
  color: #dbeafe !important;
  box-shadow: 0 18px 42px rgba(0, 0, 0, 0.34) !important;
}

.ssafun-guidance-panel__eyebrow,
.ssafun-account-save__eyebrow {
  margin: 0 0 8px !important;
  color: #5eead4 !important;
  font-size: 0.78rem !important;
  font-weight: 800 !important;
  letter-spacing: 0.08em !important;
  text-transform: uppercase !important;
}

.ssafun-guidance-panel h3,
.ssafun-account-save h3 {
  margin: 0 0 10px !important;
  color: #ffffff !important;
  font-size: clamp(1.35rem, 2.2vw, 1.8rem) !important;
  line-height: 1.2 !important;
}

.ssafun-guidance-panel p,
.ssafun-account-save p {
  max-width: 76ch;
  margin: 0 0 14px !important;
}

.ssafun-guidance-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: clamp(14px, 2.5vw, 22px);
  margin-top: 18px;
}

.ssafun-guidance-grid > div {
  padding: 16px;
  border: 1px solid rgba(56, 189, 248, 0.28);
  border-radius: 8px;
  background: rgba(2, 6, 23, 0.46);
}

.ssafun-guidance-grid h4 {
  margin: 0 0 10px !important;
  color: #f8fafc !important;
  font-size: 1rem !important;
}

.ssafun-guidance-grid ul {
  margin: 0 !important;
  padding-left: 1.15rem !important;
}

.ssafun-guidance-grid li + li {
  margin-top: 8px !important;
}

.ssafun-related-inline {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px;
  margin-top: 18px;
}

.ssafun-related-inline span,
.ssafun-related-inline a {
  display: inline-flex;
  align-items: center;
  min-height: 34px;
  padding: 7px 10px;
  border: 1px solid rgba(125, 211, 252, 0.26);
  border-radius: 999px;
  background: rgba(15, 23, 42, 0.72);
  color: #dbeafe !important;
  font-size: 0.9rem;
  text-decoration: none !important;
}

.ssafun-related-inline > span:first-child {
  border-color: transparent;
  padding-left: 0;
  background: transparent;
  color: #93c5fd !important;
  font-weight: 800;
}

.ssafun-related-inline a:hover {
  border-color: rgba(45, 212, 191, 0.64);
  color: #ffffff !important;
}

.ssafun-account-tool :where(
  .ssafun-baby,
  .ssafun-couple,
  .ssafun-friendship,
  .ssafun-petname,
  .ssafun-halloween,
  .ssafun-hq,
  .ssafun-nickname,
  .ssafun-poly,
  .ssafun-adventure,
  .ssafun-random-name,
  .ssafun-namegen,
  .ssafun-random-number,
  .ssafun-rng,
  .ssafun-slot,
  .ssafun-endearment,
  .ssafun-endear,
  .ssafun-fq
) {
  color-scheme: dark;
  width: min(100%, 920px);
  margin-left: auto !important;
  margin-right: auto !important;
  padding: clamp(18px, 3vw, 28px) !important;
  border-color: rgba(45, 212, 191, 0.42) !important;
  background:
    radial-gradient(circle at 8% 0%, rgba(45, 212, 191, 0.16), transparent 34%),
    radial-gradient(circle at 92% 8%, rgba(167, 139, 250, 0.14), transparent 36%),
    linear-gradient(145deg, rgba(8, 18, 34, 0.98), rgba(3, 8, 18, 0.98)) !important;
  color: #f4fdff !important;
  box-shadow: 0 18px 42px rgba(0, 0, 0, 0.36) !important;
}

.ssafun-account-tool :where(
  .baby-card,
  .couple-card,
  .petname-card,
  .nick-card,
  .namegen-card,
  .adventure-card,
  .rng-card,
  .slot-card,
  .endear-card,
  .hq-card,
  .poly-card,
  .fq-card
) {
  margin-block: clamp(14px, 2.2vw, 24px) !important;
  padding: clamp(16px, 2.5vw, 24px) !important;
  border-radius: 10px !important;
}

.ssafun-account-tool :where(
  form,
  fieldset,
  .card,
  .panel,
  .section,
  .result,
  .results,
  [class*="result"],
  [class*="results"],
  [class*="card"],
  [class*="panel"],
  .ssafun-account-save,
  .baby-results,
  .couple-results,
  .fq-results
) {
  margin-block: clamp(12px, 2vw, 20px) !important;
  padding: clamp(14px, 2.2vw, 22px) !important;
  border-radius: 8px !important;
  border-color: rgba(45, 212, 191, 0.34) !important;
  background:
    radial-gradient(circle at 8% 0%, rgba(45, 212, 191, 0.10), transparent 32%),
    linear-gradient(180deg, rgba(8, 18, 34, 0.96), rgba(3, 8, 18, 0.96)) !important;
  color: #dbeafe !important;
  box-shadow: 0 12px 28px rgba(0, 0, 0, 0.28) !important;
}

.ssafun-account-tool :where(
  .baby-grid,
  .couple-grid,
  .petname-grid,
  .nick-grid,
  .namegen-grid,
  .adventure-grid,
  .rng-grid,
  .poly-grid,
  .hq-grid
) {
  display: grid !important;
  gap: 14px !important;
}

.ssafun-account-tool :where(
  .baby-actions,
  .couple-actions,
  .petname-actions,
  .nick-actions,
  .namegen-actions,
  .adventure-actions,
  .rng-actions,
  .slot-actions,
  .endear-actions,
  .hq-actions,
  .poly-actions,
  .fq-actions
) {
  display: flex !important;
  flex-wrap: wrap !important;
  align-items: center !important;
  gap: 10px !important;
  margin-top: 16px !important;
}

.ssafun-account-tool :where(
  .baby-stats,
  .couple-stats,
  .petname-stats,
  .nick-stats,
  .namegen-stats,
  .adventure-stats,
  .rng-stats,
  .slot-stats,
  .endear-stats,
  .hq-score-grid,
  .poly-breakdown
) {
  display: grid !important;
  grid-template-columns: repeat(auto-fit, minmax(120px, 1fr)) !important;
  gap: 10px !important;
  margin-top: 16px !important;
}

.ssafun-account-tool :where(
  .baby-stat,
  .couple-stat,
  .petname-stat,
  .nick-stat,
  .namegen-stat,
  .adventure-stat,
  .rng-stat,
  .slot-stat,
  .endear-stat
) {
  min-height: 64px !important;
  padding: 12px !important;
  border: 1px solid rgba(56, 189, 248, 0.26) !important;
  border-radius: 8px !important;
  background: rgba(2, 6, 23, 0.52) !important;
}

.ssafun-account-tool :where(h1, h2, h3, h4, h5, h6, legend, summary, strong, b) {
  color: #ffffff !important;
  text-shadow: 0 0 18px rgba(56, 189, 248, 0.24) !important;
}

.ssafun-account-tool :where(p, li, label, span, div, small, em, td, th) {
  color: #dbeafe !important;
}

.ssafun-account-tool :where(input, select, textarea) {
  border-color: rgba(56, 189, 248, 0.42) !important;
  background: rgba(2, 6, 23, 0.84) !important;
  color: #f4fdff !important;
}

.ssafun-account-tool :where(input::placeholder, textarea::placeholder) {
  color: rgba(219, 234, 254, 0.68) !important;
}

.ssafun-account-tool :where(button, .button, .btn, input[type="button"], input[type="submit"], a.button, a.btn, .ssafun-save-result, .ssafun-dashboard-link, .share-btn, .copy-btn, .download-btn) {
  min-height: 44px !important;
  margin: 0 !important;
  padding: 10px 14px !important;
  border-radius: 8px !important;
  border-color: rgba(45, 212, 191, 0.72) !important;
  background: linear-gradient(135deg, #2dd4bf, #38bdf8) !important;
  color: #031018 !important;
  box-shadow: 0 10px 24px rgba(34, 211, 238, 0.20) !important;
  text-decoration: none !important;
}

.ssafun-account-tool :where(button:hover, .button:hover, .btn:hover, input[type="button"]:hover, input[type="submit"]:hover, a.button:hover, a.btn:hover) {
  border-color: rgba(142, 234, 255, 0.86) !important;
  background: linear-gradient(135deg, #5eead4, #7dd3fc) !important;
  color: #031018 !important;
}

.ssafun-account-tool :where(button:disabled, .button:disabled, .btn:disabled, input[type="button"]:disabled, input[type="submit"]:disabled) {
  border-color: rgba(148, 163, 184, 0.34) !important;
  background: rgba(51, 65, 85, 0.72) !important;
  color: rgba(226, 232, 240, 0.78) !important;
}

.ssafun-account-tool :where(.error, .warning, .alert, .danger, [class*="error"], [class*="warning"]) {
  border-color: rgba(251, 113, 133, 0.46) !important;
  background: linear-gradient(135deg, rgba(251, 113, 133, 0.14), rgba(3, 8, 18, 0.96)) !important;
  color: #ffe4e8 !important;
}

/* Final hard stop for older fun modules that still output pale cards. */
.ssafun-account-tool :is(
  #results,
  [id*="result"],
  [id*="Result"],
  [aria-live="polite"],
  output,
  table,
  thead,
  tbody,
  tr,
  td,
  th,
  .slot-reels,
  .slot-window,
  .baby-name-card,
  .nickname-card,
  .name-card,
  .adventure-card,
  .number-card,
  .generated-name,
  .generated-output
) {
  border-color: rgba(45, 212, 191, 0.34) !important;
  background:
    radial-gradient(circle at 8% 0%, rgba(45, 212, 191, 0.10), transparent 32%),
    linear-gradient(180deg, rgba(8, 18, 34, 0.98), rgba(3, 8, 18, 0.98)) !important;
  color: #dbeafe !important;
  box-shadow: 0 12px 28px rgba(0, 0, 0, 0.28) !important;
}

.ssafun-account-tool :is(a:not(.ssafun-save-result):not(.ssafun-dashboard-link)) {
  color: #7dd3fc !important;
}

.ssafun-account-save {
  margin-top: clamp(22px, 3vw, 36px) !important;
}

.ssafun-account-save .ssafun-save-result,
.ssafun-account-save .ssafun-account-button,
.ssafun-account-save .ssafun-dashboard-link {
  margin-top: 6px !important;
  margin-right: 8px !important;
}

.ssafun-save-status {
  margin-top: 12px !important;
  color: #bfdbfe !important;
}

@media (max-width: 720px) {
  .ssafun-account-tool {
    padding-inline: 10px;
  }

  .ssafun-guidance-grid {
    grid-template-columns: 1fr;
  }

  .ssafun-account-tool :where(
    .baby-actions,
    .couple-actions,
    .petname-actions,
    .nick-actions,
    .namegen-actions,
    .adventure-actions,
    .rng-actions,
    .slot-actions,
    .endear-actions,
    .hq-actions,
    .poly-actions,
    .fq-actions
  ) {
    align-items: stretch !important;
  }

  .ssafun-account-tool :where(button, .button, .btn, input[type="button"], input[type="submit"], a.button, a.btn, .ssafun-save-result, .ssafun-dashboard-link),
  .ssafun-account-save .ssafun-account-button,
  .ssafun-account-save .ssafun-dashboard-link {
    width: 100% !important;
  }
}

@media (max-width: 640px) {
  .ssafun-account-tool,
  .ssafun-baby,
  .ssafun-couple,
  .ssafun-fq,
  .ssafun-petname,
  .ssafun-hq,
  .ssafun-nickname,
  .ssafun-poly,
  .ssafun-adventure,
  .ssafun-namegen,
  .ssafun-rng,
  .ssafun-slot,
  .ssafun-endear {
    width: 100% !important;
    max-width: 100% !important;
    margin-left: auto !important;
    margin-right: auto !important;
    padding-left: 12px !important;
    padding-right: 12px !important;
    overflow-x: hidden !important;
  }

  .ssafun-account-tool :where(*),
  [class^="ssafun-"] :where(*),
  [class*=" ssafun-"] :where(*) {
    max-width: 100% !important;
    min-width: 0 !important;
    overflow-wrap: break-word !important;
    white-space: normal !important;
  }

  .ssafun-account-tool :where(.grid, [class*="-grid"], [class*="-columns"], [class*="-stats"], [class*="-actions"]),
  [class^="ssafun-"] :where(.grid, [class*="-grid"], [class*="-columns"], [class*="-stats"], [class*="-actions"]),
  [class*=" ssafun-"] :where(.grid, [class*="-grid"], [class*="-columns"], [class*="-stats"], [class*="-actions"]) {
    grid-template-columns: minmax(0, 1fr) !important;
  }
}
/* SSA dark-neon hard stop for legacy pale fun widgets. */
body :is(
  .ssafun-account-tool.ssafun-account-tool,
  [class^="ssafun-"][class^="ssafun-"],
  [class*=" ssafun-"][class*=" ssafun-"]
) {
  --ssa-neon-bg: #050b12;
  --ssa-neon-surface: rgba(5, 14, 24, 0.98);
  --ssa-neon-surface-2: rgba(8, 26, 40, 0.96);
  --ssa-neon-border: rgba(45, 211, 218, 0.56);
  --ssa-neon-text: #f4fbff;
  --ssa-neon-muted: #cfefff;
  --ssa-neon-accent: #2ed3da;
  background: linear-gradient(135deg, var(--ssa-neon-bg), #061927) !important;
  border-color: var(--ssa-neon-border) !important;
  color: var(--ssa-neon-text) !important;
}

body :is(
  .ssafun-account-tool.ssafun-account-tool,
  [class^="ssafun-"][class^="ssafun-"],
  [class*=" ssafun-"][class*=" ssafun-"]
) :is(section, article, aside, fieldset, details, summary, table, thead, tbody, tfoot, tr, td, th, label, legend, [aria-live], [role="tabpanel"], [role="group"], [class*="card"], [class*="Card"], [class*="panel"], [class*="Panel"], [class*="box"], [class*="Box"], [class*="tile"], [class*="Tile"], [class*="widget"], [class*="Widget"], [class*="result"], [class*="Result"], [class*="summary"], [class*="Summary"], [class*="output"], [class*="Output"], [class*="metric"], [class*="Metric"], [class*="stat"], [class*="Stat"], [class*="notice"], [class*="Notice"], [class*="warning"], [class*="Warning"], [class*="callout"], [class*="Callout"], [class*="option"], [class*="Option"], [class*="question"], [class*="Question"], [class*="field"], [class*="Field"], [class*="group"], [class*="Group"], [class*="item"], [class*="Item"], [class*="row"], [class*="Row"], [class*="form"], [class*="Form"], [class*="input"], [class*="Input"], [class*="history"], [class*="History"], [class*="dashboard"], [class*="Dashboard"], [class*="profile"], [class*="Profile"], [class*="prompt"], [class*="Prompt"], [class*="intro"], [class*="Intro"], [class*="body"], [class*="Body"]) {
  background: linear-gradient(135deg, var(--ssa-neon-surface), var(--ssa-neon-surface-2)) !important;
  border-color: var(--ssa-neon-border) !important;
  box-shadow: 0 0 0 1px rgba(45, 211, 218, 0.16), 0 18px 44px rgba(0, 0, 0, 0.34) !important;
  color: var(--ssa-neon-text) !important;
}

body :is(
  .ssafun-account-tool.ssafun-account-tool,
  [class^="ssafun-"][class^="ssafun-"],
  [class*=" ssafun-"][class*=" ssafun-"]
) :is(input:not([type="checkbox"]):not([type="radio"]):not([type="range"]):not([type="color"]), select, textarea) {
  background: rgba(3, 10, 18, 0.98) !important;
  border-color: var(--ssa-neon-border) !important;
  color: var(--ssa-neon-text) !important;
  -webkit-text-fill-color: var(--ssa-neon-text) !important;
  box-shadow: inset 0 0 0 1px rgba(45, 211, 218, 0.14) !important;
}

body :is(
  .ssafun-account-tool.ssafun-account-tool,
  [class^="ssafun-"][class^="ssafun-"],
  [class*=" ssafun-"][class*=" ssafun-"]
) :is(input[type="checkbox"], input[type="radio"]) {
  accent-color: var(--ssa-neon-accent) !important;
  background-color: rgba(3, 10, 18, 0.98) !important;
  border-color: var(--ssa-neon-border) !important;
}

body :is(
  .ssafun-account-tool.ssafun-account-tool,
  [class^="ssafun-"][class^="ssafun-"],
  [class*=" ssafun-"][class*=" ssafun-"]
) input::placeholder,
body :is(
  .ssafun-account-tool.ssafun-account-tool,
  [class^="ssafun-"][class^="ssafun-"],
  [class*=" ssafun-"][class*=" ssafun-"]
) {
  --ssa-neon-bg: #050b12;
  --ssa-neon-surface: rgba(5, 14, 24, 0.98);
  --ssa-neon-surface-2: rgba(8, 26, 40, 0.96);
  --ssa-neon-border: rgba(45, 211, 218, 0.56);
  --ssa-neon-text: #f4fbff;
  --ssa-neon-muted: #cfefff;
  --ssa-neon-accent: #2ed3da;
  background: linear-gradient(135deg, var(--ssa-neon-bg), #061927) !important;
  border-color: var(--ssa-neon-border) !important;
  color: var(--ssa-neon-text) !important;
}

body :is(
  .ssafun-account-tool.ssafun-account-tool,
  [class^="ssafun-"][class^="ssafun-"],
  [class*=" ssafun-"][class*=" ssafun-"]
) :is(section, article, aside, fieldset, details, summary, table, thead, tbody, tfoot, tr, td, th, label, legend, [aria-live], [role="tabpanel"], [role="group"], [class*="card"], [class*="Card"], [class*="panel"], [class*="Panel"], [class*="box"], [class*="Box"], [class*="tile"], [class*="Tile"], [class*="widget"], [class*="Widget"], [class*="result"], [class*="Result"], [class*="summary"], [class*="Summary"], [class*="output"], [class*="Output"], [class*="metric"], [class*="Metric"], [class*="stat"], [class*="Stat"], [class*="notice"], [class*="Notice"], [class*="warning"], [class*="Warning"], [class*="callout"], [class*="Callout"], [class*="option"], [class*="Option"], [class*="question"], [class*="Question"], [class*="field"], [class*="Field"], [class*="group"], [class*="Group"], [class*="item"], [class*="Item"], [class*="row"], [class*="Row"], [class*="form"], [class*="Form"], [class*="input"], [class*="Input"], [class*="history"], [class*="History"], [class*="dashboard"], [class*="Dashboard"], [class*="profile"], [class*="Profile"], [class*="prompt"], [class*="Prompt"], [class*="intro"], [class*="Intro"], [class*="body"], [class*="Body"]) {
  background: linear-gradient(135deg, var(--ssa-neon-surface), var(--ssa-neon-surface-2)) !important;
  border-color: var(--ssa-neon-border) !important;
  box-shadow: 0 0 0 1px rgba(45, 211, 218, 0.16), 0 18px 44px rgba(0, 0, 0, 0.34) !important;
  color: var(--ssa-neon-text) !important;
}

body :is(
  .ssafun-account-tool.ssafun-account-tool,
  [class^="ssafun-"][class^="ssafun-"],
  [class*=" ssafun-"][class*=" ssafun-"]
) :is(input:not([type="checkbox"]):not([type="radio"]):not([type="range"]):not([type="color"]), select, textarea) {
  background: rgba(3, 10, 18, 0.98) !important;
  border-color: var(--ssa-neon-border) !important;
  color: var(--ssa-neon-text) !important;
  -webkit-text-fill-color: var(--ssa-neon-text) !important;
  box-shadow: inset 0 0 0 1px rgba(45, 211, 218, 0.14) !important;
}

body :is(
  .ssafun-account-tool.ssafun-account-tool,
  [class^="ssafun-"][class^="ssafun-"],
  [class*=" ssafun-"][class*=" ssafun-"]
) :is(input[type="checkbox"], input[type="radio"]) {
  accent-color: var(--ssa-neon-accent) !important;
  background-color: rgba(3, 10, 18, 0.98) !important;
  border-color: var(--ssa-neon-border) !important;
}

body :is(
  .ssafun-account-tool.ssafun-account-tool,
  [class^="ssafun-"][class^="ssafun-"],
  [class*=" ssafun-"][class*=" ssafun-"]
) textarea::placeholder {
  color: rgba(207, 239, 255, 0.72) !important;
  -webkit-text-fill-color: rgba(207, 239, 255, 0.72) !important;
}

body :is(
  .ssafun-account-tool.ssafun-account-tool,
  [class^="ssafun-"][class^="ssafun-"],
  [class*=" ssafun-"][class*=" ssafun-"]
) :is(button:not(.mf-danger-button), .button:not(.mf-danger-button), .btn:not(.mf-danger-button), [role="button"]:not(.mf-danger-button), input[type="button"], input[type="submit"], input[type="reset"], a.button, a.btn, [class*="-btn"]:not(.mf-danger-button), [class*="-button"]:not(.mf-danger-button), [class*="Button"]:not(.mf-danger-button)) {
  background: linear-gradient(135deg, #33f7ff, #21c6d3 55%, #1498ff) !important;
  border-color: rgba(84, 245, 255, 0.82) !important;
  color: #021018 !important;
  -webkit-text-fill-color: #021018 !important;
  box-shadow: 0 0 18px rgba(45, 211, 218, 0.28), 0 12px 28px rgba(0, 0, 0, 0.32) !important;
  text-shadow: none !important;
}

body :is(
  .ssafun-account-tool.ssafun-account-tool,
  [class^="ssafun-"][class^="ssafun-"],
  [class*=" ssafun-"][class*=" ssafun-"]
) :is(h1, h2, h3, h4, h5, h6, p, li, label, span, small, strong, b, em, legend, summary, td, th, output, div) {
  color: var(--ssa-neon-text) !important;
}

body :is(
  .ssafun-account-tool.ssafun-account-tool,
  [class^="ssafun-"][class^="ssafun-"],
  [class*=" ssafun-"][class*=" ssafun-"]
) a:not(.button):not(.btn) {
  color: #7ff7ff !important;
}

/* Final compact-answer guard for fun-suite quiz controls. */
body .ssafun-poly.ssafun-poly :is(label, legend, span, input, button, a) {
  writing-mode: horizontal-tb !important;
  text-orientation: mixed !important;
  letter-spacing: 0 !important;
  word-break: normal !important;
}

body .ssafun-poly.ssafun-poly .poly-options {
  display: grid !important;
  grid-template-columns: repeat(auto-fit, minmax(180px, 1fr)) !important;
  align-items: stretch !important;
  gap: 10px !important;
  width: 100% !important;
  max-width: 100% !important;
  min-width: 0 !important;
}

body .ssafun-poly.ssafun-poly .poly-options > label {
  display: flex !important;
  flex-direction: row !important;
  align-items: flex-start !important;
  justify-content: flex-start !important;
  gap: 10px !important;
  width: 100% !important;
  max-width: 100% !important;
  min-width: 0 !important;
  min-height: 0 !important;
  height: auto !important;
  padding: 10px 12px !important;
  text-align: left !important;
  white-space: normal !important;
  overflow-wrap: break-word !important;
}

body .ssafun-poly.ssafun-poly .poly-options input[type="radio"] {
  flex: 0 0 18px !important;
  display: inline-block !important;
  width: 18px !important;
  min-width: 18px !important;
  max-width: 18px !important;
  height: 18px !important;
  min-height: 18px !important;
  max-height: 18px !important;
  margin: 2px 0 0 !important;
  padding: 0 !important;
  position: static !important;
}

body .ssafun-poly.ssafun-poly .poly-options > label > span {
  display: block !important;
  flex: 1 1 auto !important;
  width: auto !important;
  max-width: 100% !important;
  min-width: 0 !important;
  color: #f8feff !important;
  -webkit-text-fill-color: #f8feff !important;
  line-height: 1.38 !important;
  text-align: left !important;
  white-space: normal !important;
  overflow-wrap: break-word !important;
}

@media (max-width: 760px) {
  body .ssafun-poly.ssafun-poly .poly-options {
    grid-template-columns: minmax(0, 1fr) !important;
  }
}

/* Last-word repair for the polyamory quiz answers. The shared fun-suite neon
   layer intentionally styles option cards, but these labels must stay compact. */
body .ssafun-poly.ssafun-poly .poly-question-wrap .poly-options {
  display: grid !important;
  grid-template-columns: repeat(auto-fit, minmax(172px, 1fr)) !important;
  gap: 10px !important;
  width: 100% !important;
  max-width: 100% !important;
  min-width: 0 !important;
  align-items: stretch !important;
}

body .ssafun-poly.ssafun-poly .poly-question-wrap .poly-options > label {
  display: grid !important;
  grid-template-columns: 20px minmax(0, 1fr) !important;
  align-items: start !important;
  justify-items: start !important;
  gap: 10px !important;
  width: 100% !important;
  max-width: 100% !important;
  min-width: 0 !important;
  min-height: 44px !important;
  height: auto !important;
  padding: 10px 12px !important;
  text-align: left !important;
  white-space: normal !important;
  overflow: visible !important;
  overflow-wrap: break-word !important;
  word-break: normal !important;
  writing-mode: horizontal-tb !important;
  text-orientation: mixed !important;
}

body .ssafun-poly.ssafun-poly .poly-question-wrap .poly-options > label input[type="radio"] {
  grid-column: 1 !important;
  grid-row: 1 !important;
  display: block !important;
  width: 18px !important;
  min-width: 18px !important;
  max-width: 18px !important;
  height: 18px !important;
  min-height: 18px !important;
  max-height: 18px !important;
  margin: 2px 0 0 !important;
  padding: 0 !important;
  position: static !important;
}

body .ssafun-poly.ssafun-poly .poly-question-wrap .poly-options > label > span {
  grid-column: 2 !important;
  grid-row: 1 !important;
  display: block !important;
  width: auto !important;
  max-width: 100% !important;
  min-width: 0 !important;
  color: #f8feff !important;
  -webkit-text-fill-color: #f8feff !important;
  line-height: 1.35 !important;
  text-align: left !important;
  white-space: normal !important;
  overflow-wrap: break-word !important;
  word-break: normal !important;
  writing-mode: horizontal-tb !important;
  text-orientation: mixed !important;
}

@media (max-width: 760px) {
  body .ssafun-poly.ssafun-poly .poly-question-wrap .poly-options {
    grid-template-columns: minmax(0, 1fr) !important;
  }
}

/* Final compact-answer guard for generated fun-suite quiz/check controls. */
body :is(.ssafun-hq.ssafun-hq, .ssafun-adventure.ssafun-adventure, .ssafun-rng.ssafun-rng, .ssafun-slot.ssafun-slot)
  :is(label, legend, span, input, button, a) {
  writing-mode: horizontal-tb !important;
  text-orientation: mixed !important;
  letter-spacing: 0 !important;
  word-break: normal !important;
}

body .ssafun-hq.ssafun-hq .hq-options,
body .ssafun-adventure.ssafun-adventure .adventure-toggle,
body .ssafun-rng.ssafun-rng .rng-check,
body .ssafun-slot.ssafun-slot label:has(input[type="checkbox"]) {
  width: 100% !important;
  max-width: 100% !important;
  min-width: 0 !important;
}

body .ssafun-hq.ssafun-hq .hq-options > label,
body .ssafun-adventure.ssafun-adventure .adventure-toggle,
body .ssafun-rng.ssafun-rng .rng-check,
body .ssafun-slot.ssafun-slot label:has(input[type="checkbox"]) {
  display: grid !important;
  grid-template-columns: 22px minmax(0, 1fr) !important;
  align-items: start !important;
  gap: 10px !important;
  min-height: 44px !important;
  height: auto !important;
  text-align: left !important;
  white-space: normal !important;
  overflow: visible !important;
  overflow-wrap: break-word !important;
}

body .ssafun-hq.ssafun-hq .hq-options > label > input[type="radio"],
body .ssafun-adventure.ssafun-adventure .adventure-toggle > input[type="checkbox"],
body .ssafun-rng.ssafun-rng .rng-check > input[type="checkbox"],
body .ssafun-slot.ssafun-slot label:has(input[type="checkbox"]) > input[type="checkbox"] {
  grid-column: 1 !important;
  width: 18px !important;
  min-width: 18px !important;
  max-width: 18px !important;
  height: 18px !important;
  min-height: 18px !important;
  max-height: 18px !important;
  margin: 2px 0 0 !important;
  padding: 0 !important;
  position: static !important;
}

body .ssafun-hq.ssafun-hq .hq-options > label > span,
body .ssafun-slot.ssafun-slot label:has(input[type="checkbox"]) > span {
  grid-column: 2 !important;
  min-width: 0 !important;
  max-width: 100% !important;
  white-space: normal !important;
  overflow-wrap: break-word !important;
}
