/* CGCOS x BanG Dream survey premium theme v16 — 9-grid radial blur; logo subtitle + 50% card */
:root {
  --fb-brand-color: #e8c35a !important;
  --fb-brand-text-color: #1a1206 !important;
  --fb-border-radius: 16px !important;
  --fb-heading-color: #faf4e8 !important;
  --fb-subheading-color: #d4c4a8 !important;
  --fb-border-color: rgba(232, 195, 90, .22) !important;
  --fb-border-color-highlight: #e8c35a !important;
  --fb-focus-color: #e8c35a !important;
  --fb-survey-background-color: rgba(12, 9, 14, .50) !important;
  --fb-survey-border-color: rgba(232, 195, 90, .16) !important;
  --fb-survey-shadow-color: rgba(0, 0, 0, .55) !important;
  --fb-accent-background-color: rgba(232, 195, 90, .14) !important;
  --fb-accent-background-color-selected: rgba(232, 195, 90, .26) !important;
  --fb-input-background-color: rgba(255, 236, 200, .08) !important;
  --fb-input-background-color-selected: rgba(232, 195, 90, .18) !important;
  --fb-placeholder-color: #9a8b74 !important;
  --fb-info-text-color: #cbbba0 !important;
  --fb-signature-text-color: #cbbba0 !important;
  --fb-branding-text-color: #8a7b66 !important;
  --fb-shadow-color: rgba(0, 0, 0, .5) !important;
  --fb-rating-fill: rgba(232, 195, 90, .22) !important;
  --fb-rating-hover: #e8c35a !important;
  --fb-rating-selected: #e8c35a !important;
  --fb-back-btn-border: rgba(232, 195, 90, .3) !important;
  --fb-submit-btn-border: transparent !important;
  --fb-close-btn-color: #cbbba0 !important;
  --fb-close-btn-color-hover: #faf4e8 !important;
  --fb-calendar-tile-color: rgba(232, 195, 90, .12) !important;
}
html, body { overflow-x: hidden; }
html { background: #07060c; }
body:has(#fbjs),
body:has(#formbricks-survey-container) { background: transparent !important; }
/* Formbricks paints an opaque color layer over the page; put the photo on that empty layer so the form stays sharp */
div.absolute.inset-0.h-full.w-full.transition-opacity[style*="background-color"],
div[style*="background-color:#07060c"],
div[style*="background-color: #07060c"],
div[style*="background-color:rgb(7, 6, 12)"],
div[style*="background-color: rgb(7, 6, 12)"] {
  background-color: transparent !important;
  background-image: url("/fb-custom/bg-v16.jpg") !important;
  background-size: cover !important;
  background-position: center !important;
  background-repeat: no-repeat !important;
  filter: brightness(.97) saturate(1.04) !important;
  opacity: 1 !important;
  pointer-events: none;
}
body:has(#fbjs)::before,
body:has(#formbricks-survey-container)::before {
  content: ""; position: fixed; inset: 0; z-index: 0;
  background: url("/fb-custom/bg-v16.jpg") center / cover no-repeat;
  filter: brightness(.97) saturate(1.04);
  pointer-events: none;
}
body:has(#fbjs)::after,
body:has(#formbricks-survey-container)::after {
  content: ""; position: fixed; inset: 0; z-index: 0; pointer-events: none;
  background:
    radial-gradient(120% 90% at 50% 50%, rgba(8, 6, 12, .06) 0%, rgba(8, 6, 12, .28) 100%),
    linear-gradient(180deg, rgba(8, 6, 12, .10) 0%, rgba(8, 6, 12, .26) 100%);
}
/* logo + subtitle */
#fbjs::before {
  content: ""; position: fixed; top: 10px; left: 50%; transform: translateX(-50%);
  width: 268px; height: 78px; z-index: 40; pointer-events: none;
  background: url("/fb-custom/logo-v13.png") center / contain no-repeat;
  filter: drop-shadow(0 2px 10px rgba(0, 0, 0, .65)) drop-shadow(0 0 18px rgba(0, 0, 0, .35));
  opacity: .98;
}
#fbjs::after {
  content: "问卷调查";
  position: fixed; top: 88px; left: 50%; transform: translateX(-50%);
  z-index: 40; pointer-events: none;
  color: #f3e2b8;
  font-size: 15px;
  font-weight: 500;
  letter-spacing: .42em;
  text-indent: .42em; /* optical center with letter-spacing */
  line-height: 1;
  white-space: nowrap;
  font-family: "PingFang SC", "HarmonyOS Sans SC", "Microsoft YaHei", sans-serif;
  text-shadow: 0 1px 8px rgba(0, 0, 0, .75), 0 0 14px rgba(0, 0, 0, .4);
}
/* hide leftover native styling from a previous editor: old bg + broken logo box */
img[src*="cgcos-bg"],
div:has(> img[src*="cgcos-bg"]) { display: none !important; }
div:has(> img[alt="Company Logo"]) { display: none !important; }
#fbjs { background: transparent !important; font-family: "Inter", "PingFang SC", "HarmonyOS Sans SC", "Microsoft YaHei", sans-serif; }
#fbjs .fb-bg-white {
  background-color: rgba(12, 9, 14, .50) !important;
  backdrop-filter: blur(6px) saturate(1.08);
  -webkit-backdrop-filter: blur(6px) saturate(1.08);
}
#formbricks-survey-container { padding-top: 128px; position: relative; z-index: 1; }
body:has(#formbricks-survey-container) .relative.w-full { z-index: 1; }
#fbjs [id^="questionCard-"] {
  border-color: rgba(232, 195, 90, .18) !important;
  box-shadow: 0 24px 70px -30px rgba(0, 0, 0, .72), 0 0 0 1px rgba(232, 195, 90, .10), 0 0 40px -16px rgba(232, 195, 90, .22), inset 0 1px 0 rgba(255, 236, 200, .10);
}
#fbjs .fb-bg-brand {
  background-image: linear-gradient(135deg, #f0d78c 0%, #c8962e 55%, #b8872a 100%);
  color: #1a1206 !important;
  box-shadow: 0 6px 24px -8px rgba(232, 195, 90, .55);
}
#fbjs .fb-text-heading { letter-spacing: .01em; }
#fbjs .fb-text-xl { font-size: 1.32em; line-height: 1.4em; font-weight: 700; }
#fbjs input[type="radio"], #fbjs input[type="checkbox"] { accent-color: #e8c35a; }
#fbjs label.fb-cursor-pointer { transition: border-color .18s ease, background-color .18s ease, transform .18s ease; }
#fbjs label.fb-cursor-pointer:hover { border-color: rgba(232, 195, 90, .5); }
#fbjs ::-webkit-scrollbar { width: 6px; height: 6px; }
#fbjs ::-webkit-scrollbar-thumb { background: rgba(232, 195, 90, .3); border-radius: 3px; }
#fbjs .fb-overflow-auto { scrollbar-width: thin; scrollbar-color: rgba(232, 195, 90, .3) transparent; }

/* matrix: desktop polish */
#fbjs table thead th { color: var(--fb-subheading-color); font-weight: 500; }
#fbjs table tbody th[scope="row"] { color: var(--fb-heading-color); }
#fbjs table tbody tr { border-bottom: 1px solid rgba(232, 195, 90, .12); }
#fbjs table tbody tr:hover { background: rgba(232, 195, 90, .08); }

/* matrix: mobile reflow — no horizontal scroll */
@media (max-width: 640px) {
  #fbjs .fb-overflow-auto { max-height: calc(100dvh - 230px) !important; overflow-y: auto !important; overflow-x: hidden !important; }
  #fbjs .fb-overflow-x-auto { overflow-x: hidden; padding-top: .5em; }
  #fbjs table, #fbjs table tbody { display: block; width: 100%; min-width: 0; }
  #fbjs table thead { display: none; }
  #fbjs table::before {
    content: "1 = 很不满意 · 5 = 很满意 · 没用过选 N/A";
    display: block; font-size: .72em; color: var(--fb-subheading-color);
    margin: 0 0 .8em; letter-spacing: .03em;
  }
  #fbjs table tbody tr {
    display: grid; grid-template-columns: repeat(6, minmax(0, 1fr)); gap: 2px;
    background: var(--fb-input-background-color);
    border: 1px solid rgba(232, 195, 90, .16);
    border-radius: 12px; padding: 8px 6px 6px; margin-bottom: 6px;
  }
  #fbjs table tbody tr:hover { background: var(--fb-input-background-color); }
  #fbjs table tbody th[scope="row"] {
    grid-column: 1 / -1; display: block; max-width: none; min-width: 0;
    padding: 0 2px 4px; font-size: .8em; border-radius: 0;
  }
  #fbjs table tbody td { display: flex; flex-direction: column; align-items: center; gap: 2px; padding: 0; min-width: 0; }
  #fbjs table tbody td > div { padding: 1px 0 0; min-width: 0; }
  #fbjs table tbody td::after { font-size: .66em; color: var(--fb-subheading-color); line-height: 1; }
  #fbjs table tbody td:nth-child(2)::after { content: "1"; }
  #fbjs table tbody td:nth-child(3)::after { content: "2"; }
  #fbjs table tbody td:nth-child(4)::after { content: "3"; }
  #fbjs table tbody td:nth-child(5)::after { content: "4"; }
  #fbjs table tbody td:nth-child(6)::after { content: "5"; }
  #fbjs table tbody td:nth-child(7)::after { content: "N/A"; }
  #fbjs table tbody td input { width: 1.15em; height: 1.15em; }
}
