/* Ad balance card + "money your ad didn't use" choice (Creator Studio → Ads, Advertise page) */
.adb-card { margin: 0 0 14px; padding: 14px; border-radius: 16px; background: rgba(57,255,106,.06); border: 1px solid rgba(57,255,106,.22); }
.adb-top { display: flex; align-items: center; gap: 12px; }
.adb-ic { flex: none; display: grid; place-items: center; width: 42px; height: 42px; border-radius: 12px; background: rgba(57,255,106,.14); color: #39ff6a; color: var(--tc-primary, #39ff6a); }
.adb-ic .icon { width: 22px; height: 22px; }
.adb-top small { display: block; font-size: 12px; color: rgba(245, 247, 246, 0.62); color: var(--tc-text-muted, #9a9a9a); }
.adb-top b { font-size: 22px; line-height: 1.15; }
.adb-note { margin: 10px 0 0; font-size: 13px; line-height: 1.45; color: rgba(245, 247, 246, 0.62); color: var(--tc-text-muted, #9a9a9a); }
.adb-hist { margin-top: 6px; font-size: 13px; }
.adb-hist { list-style: none; margin: 6px 0 0; padding: 0; display: grid; grid-gap: 6px; gap: 6px; }
.adb-hist[hidden] { display: none; }
.adb-hist li { display: flex; align-items: center; justify-content: space-between; gap: 12px; }
.adb-hist li span { min-width: 0; overflow-wrap: anywhere; }
.adb-hist li small { display: block; color: rgba(245, 247, 246, 0.62); color: var(--tc-text-muted, #9a9a9a); font-size: 11.5px; }
.adb-hist b.is-in { color: #7dffa0; white-space: nowrap; } .adb-hist b.is-out { color: #ffb4b4; white-space: nowrap; }
.adl { margin: 10px 0; padding: 12px; border-radius: 14px; background: rgba(255,201,60,.07); border: 1px solid rgba(255,201,60,.35); }
.adl-t { margin: 0 0 10px; font-size: 14px; line-height: 1.45; }
.adl-opts { display: grid; grid-gap: 8px; gap: 8px; }
@media (min-width: 760px) { .adl-opts { grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)); } }
.adl-opt { display: flex; flex-direction: column; gap: 4px; padding: 10px; border-radius: 12px; background: rgba(255,255,255,.04); border: 1px solid rgba(255,255,255,.1); }
.adl-opt b { font-size: 14px; }
.adl-opt small { font-size: 12.5px; line-height: 1.4; color: rgba(245, 247, 246, 0.62); color: var(--tc-text-muted, #9a9a9a); flex: 1; }
.adl-opt.is-off { opacity: .7; }
.adl-row { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; margin-top: 6px; }
.adl-row label { display: flex; align-items: center; gap: 6px; font-size: 13px; }
.adl-row input { width: 68px; min-height: 40px; text-align: center; border-radius: 10px; border: 1px solid rgba(255,255,255,.16); background: rgba(255,255,255,.05); color: #fff; font-size: 16px; }
.adl-row .pf-btn { min-height: 40px; }
/* choosing the part of a post an ad plays */
.adc { margin: 0 0 14px; padding: 12px; border-radius: 14px; background: rgba(255,255,255,.04); border: 1px solid rgba(255,255,255,.1); }
.adc[hidden] { display: none; }
.adc-h { display: flex; align-items: baseline; justify-content: space-between; gap: 10px; margin-bottom: 8px; }
.adc-h b { font-size: 14px; } .adc-h span { font-size: 13px; color: #39ff6a; color: var(--tc-primary, #39ff6a); font-variant-numeric: tabular-nums; white-space: nowrap; }
.adc video { display: block; width: 100%; max-height: 240px; border-radius: 10px; background: #000; }
.adc audio { display: block; width: 100%; }
.adc-track { position: relative; height: 28px; margin: 10px 0 4px; }
.adc-track::before { content: ""; position: absolute; left: 0; right: 0; top: 11px; height: 6px; border-radius: 3px; background: rgba(255,255,255,.14); }
.adc-win { position: absolute; top: 9px; height: 10px; border-radius: 5px; background: #39ff6a; background: var(--tc-primary, #39ff6a); pointer-events: none; }
.adc-track input { position: absolute; top: 0; right: 0; bottom: 0; left: 0; inset: 0; width: 100%; height: 28px; margin: 0; opacity: 0; cursor: pointer; }
.adc-track input:focus-visible + .adc-win { outline: 2px solid #fff; outline-offset: 2px; }
.adc-foot { display: flex; align-items: center; justify-content: space-between; gap: 10px; font-size: 12.5px; color: rgba(245, 247, 246, 0.62); color: var(--tc-text-muted, #9a9a9a); }
.adc-foot .pf-btn { min-height: 38px; padding: 0 14px; }

/* Audience picker: everyone (default) or chosen continents (17 Nov) */
.ada { margin: 0 0 14px; padding: 0; border: 0; min-width: 0; }
.ada legend { padding: 0; margin-bottom: 8px; font-size: 14px; font-weight: 700; color: #fff; }
.ada-seg { display: grid; grid-gap: 8px; gap: 8px; }
@media (min-width: 560px) { .ada-seg { grid-template-columns: 1fr 1fr; } }
.ada-opt { position: relative; display: block; cursor: pointer; }
.ada-opt input { position: absolute; opacity: 0; width: 1px; height: 1px; }
.ada-opt span { display: grid; grid-template-columns: auto 1fr; grid-gap: 2px 10px; gap: 2px 10px; align-items: center; padding: 12px; border-radius: 14px; border: 1.5px solid rgba(255,255,255,.14); background: rgba(255,255,255,.03);  }
.ada-opt .icon { grid-row: span 2; width: 22px; height: 22px; color: rgba(245, 247, 246, 0.62); color: var(--tc-text-muted, #9a9a9a); }
.ada-opt b { font-size: 14px; color: #fff; } .ada-opt small { font-size: 12px; line-height: 1.35; color: rgba(245, 247, 246, 0.62); color: var(--tc-text-muted, #9a9a9a); }
.ada-opt input:checked + span { border-color: #39ff6a; border-color: var(--tc-primary, #39ff6a); background: rgba(57,255,106,.07); }
.ada-opt input:checked + span .icon { color: #39ff6a; color: var(--tc-primary, #39ff6a); }
.ada-opt input:focus-visible + span { outline: 2px solid #fff; outline-offset: 2px; }
.ada-chips { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 10px; }
.ada-chips[hidden], .ada-note[hidden] { display: none; }
.ada-chip { position: relative; cursor: pointer; }
.ada-chip input { position: absolute; opacity: 0; width: 1px; height: 1px; }
.ada-chip span { display: inline-flex; align-items: center; min-height: 38px; padding: 0 14px; border-radius: 999px; font-size: 13.5px; font-weight: 600; color: #ddd; border: 1px solid rgba(255,255,255,.18); background: rgba(255,255,255,.04); }
.ada-chip input:checked + span { color: #06210f; background: #39ff6a; background: var(--tc-primary, #39ff6a); border-color: transparent; }
.ada-chip input:checked + span::before { content: ""; width: 14px; height: 14px; margin-right: 6px; background: currentColor; -webkit-mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath d='M9 16.2 4.8 12l-1.4 1.4L9 19 21 7l-1.4-1.4z'/%3E%3C/svg%3E") center / contain no-repeat; mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath d='M9 16.2 4.8 12l-1.4 1.4L9 19 21 7l-1.4-1.4z'/%3E%3C/svg%3E") center / contain no-repeat; }
.ada-chip input:focus-visible + span { outline: 2px solid #fff; outline-offset: 2px; }
.ada-note { display: block; margin-top: 8px; font-size: 12.5px; line-height: 1.45; color: #ffe2a8; }
.adp-agree { display: flex; gap: 10px; align-items: flex-start; margin: 0 0 12px; font-size: 14px; line-height: 1.5; color: #e2e2e2; cursor: pointer; }
.adp-agree input { flex: none; width: 22px; height: 22px; margin: 0; accent-color: #39ff6a; accent-color: var(--tc-primary, #39ff6a); }
.adp-agree a { color: #39ff6a; color: var(--tc-primary, #39ff6a); }
.adp-closed { display: flex; gap: 10px; align-items: flex-start; margin: 0 0 14px; padding: 12px 14px; border-radius: 14px; background: rgba(255,190,60,.08); border: 1px solid rgba(255,190,60,.35); color: #ffe6b0; font-size: 14px; line-height: 1.45; }

/* Top up the ad balance (19 Nov) */
.adb-top { flex-wrap: wrap; }
.adb-top > div { flex: 1; min-width: 0; }
.adb-topup { flex: none; display: inline-flex; align-items: center; gap: 6px; }
.adb-topup .icon { width: 16px; height: 16px; }
.adb-sheet { position: fixed; top: 0; right: 0; bottom: 0; left: 0; inset: 0; z-index: 1500; display: flex; align-items: flex-end; justify-content: center; }
.adb-veil { position: absolute; top: 0; right: 0; bottom: 0; left: 0; inset: 0; background: rgba(0,0,0,.6); opacity: 0; transition: opacity .2s; }
.adb-panel { position: relative; width: 100%; max-width: 480px; max-height: 92vh; max-height: 92dvh; overflow-y: auto; box-sizing: border-box; padding: 16px 16px calc(16px + 0px); padding: 16px 16px calc(16px + env(safe-area-inset-bottom));
  border-radius: 20px 20px 0 0; background: #141a16; border: 1px solid rgba(255,255,255,.08); color: #f3f5f4; transform: translateY(100%); transition: transform .26s cubic-bezier(.2,.8,.2,1); display: grid; grid-gap: 12px; gap: 12px; text-align: left; }
.adb-sheet.is-in .adb-veil { opacity: 1; }
.adb-sheet.is-in .adb-panel { transform: none; }
@media (min-width: 700px) { .adb-sheet { align-items: center; } .adb-panel { border-radius: 20px; } }
.adb-head { display: flex; align-items: center; gap: 12px; }
.adb-head > div { flex: 1; min-width: 0; }
.adb-head b { display: block; font-size: 17px; }
.adb-head small { color: #aeb8b1; font-size: 13px; }
.adb-x { flex: none; display: grid; place-items: center; width: 36px; height: 36px; border: 0; border-radius: 50%; background: rgba(255,255,255,.08); color: #fff; cursor: pointer; }
.adb-x svg { width: 18px; height: 18px; }
.adb-amount { display: grid; grid-gap: 6px; gap: 6px; font-size: 13px; }
.adb-amount > span:first-child { font-weight: 700; }
.adb-amount small { color: #aeb8b1; font-size: 12.5px; }
.adb-amount-in { display: flex; align-items: center; gap: 6px; height: 50px; padding: 0 14px; border-radius: 12px; border: 1px solid rgba(255,255,255,.14); background: rgba(0,0,0,.3); }
.adb-amount-in:focus-within { border-color: #39ff6a; border-color: var(--tc-primary, #39ff6a); box-shadow: 0 0 0 3px rgba(57,255,106,.15); }
.adb-amount-in i { font-style: normal; font-weight: 800; font-size: 20px; color: #39ff6a; color: var(--tc-primary, #39ff6a); }
.adb-amount-in input { flex: 1; min-width: 0; height: 100%; border: 0; background: none; color: #fff; font: 700 20px/1 inherit; outline: none; }
.adb-chips { display: flex; flex-wrap: wrap; gap: 8px; }
.adb-chips button { min-height: 36px; padding: 0 14px; border-radius: 999px; border: 1px solid rgba(57,255,106,.35); background: rgba(57,255,106,.08); color: #39ff6a; color: var(--tc-primary, #39ff6a); font: 700 13px/1 inherit; cursor: pointer; }
.adb-warn { display: flex; gap: 10px; align-items: flex-start; padding: 12px; border-radius: 12px; background: rgba(255,184,0,.08); border: 1px solid rgba(255,184,0,.38); color: #ffe6ad; font-size: 13px; line-height: 1.5; }
.adb-warn svg { flex: none; width: 20px; height: 20px; color: #ffc53d; margin-top: 1px; }
.adb-warn p { margin: 0; }
.adb-warn b { color: #fff; }
.adb-agree { display: flex; gap: 10px; align-items: flex-start; font-size: 13.5px; line-height: 1.45; cursor: pointer; }
.adb-agree input { flex: none; width: 18px; height: 18px; margin-top: 2px; accent-color: #39ff6a; accent-color: var(--tc-primary, #39ff6a); }
.adb-err { margin: 0; color: #ff8a8a; font-size: 13px; }
.adb-acts { display: flex; justify-content: flex-end; gap: 8px; flex-wrap: wrap; }
@media (prefers-reduced-motion: reduce) { .adb-panel, .adb-veil { transition: none; } }
/* 22 Nov: the amount has the top row to itself and wraps; "Top up" sits at the end of the History line */
.adb-amt { display: block; max-width: 100%; overflow-wrap: anywhere; word-break: break-word; font-size: 22px; }
.adb-amt .tc-money-l, .adb-amt .tc-money-u { white-space: nowrap; }
.adb-amt .tc-money-u { display: inline-block; font-size: 15px; font-weight: 600; color: #cfd6d1; }
.adb-bar { display: flex; align-items: center; justify-content: space-between; margin-top: 10px; padding-top: 10px; border-top: 1px solid rgba(255,255,255,.08); }
.adb-bar > * + * { margin-left: 12px; }
.adb-hist-btn { display: inline-flex; align-items: center; min-height: 36px; padding: 0; border: 0; background: none; color: #cfd6d1; font: inherit; font-size: 13.5px; cursor: pointer; }
.adb-hist-btn .icon { width: 18px; height: 18px; margin-left: 2px; transition: transform .2s; }
.adb-hist-btn[aria-expanded="true"] .icon { transform: rotate(180deg); }
.adb-hist-none { font-size: 12.5px; color: #8f9a93; }

/* compat:no-flexgap:start — rebuilt by tools/css_compat.py: spacing for engines without flex gap
   (html.no-flexgap, set in the head). Edit the gap in the rule above, then run the tool. */
.no-flexgap .adb-top > * { margin-right: 12px; margin-bottom: 12px; }
.no-flexgap .adb-hist li > :not(:last-child) { margin-right: 12px; }
.no-flexgap .adl-opt > :not(:last-child) { margin-bottom: 4px; }
.no-flexgap .adl-row > * { margin-right: 8px; margin-bottom: 8px; }
.no-flexgap .adl-row label > :not(:last-child) { margin-right: 6px; }
.no-flexgap .adc-h > :not(:last-child) { margin-right: 10px; }
.no-flexgap .adc-foot > :not(:last-child) { margin-right: 10px; }
.no-flexgap .ada-chips > * { margin-right: 8px; margin-bottom: 8px; }
.no-flexgap .adp-agree > :not(:last-child) { margin-right: 10px; }
.no-flexgap .adp-closed > :not(:last-child) { margin-right: 10px; }
.no-flexgap .adb-topup > :not(:last-child) { margin-right: 6px; }
.no-flexgap .adb-head > :not(:last-child) { margin-right: 12px; }
.no-flexgap .adb-amount-in > :not(:last-child) { margin-right: 6px; }
.no-flexgap .adb-chips > * { margin-right: 8px; margin-bottom: 8px; }
.no-flexgap .adb-warn > :not(:last-child) { margin-right: 10px; }
.no-flexgap .adb-agree > :not(:last-child) { margin-right: 10px; }
.no-flexgap .adb-acts > * { margin-right: 8px; margin-bottom: 8px; }
/* compat:no-flexgap:end */
