/* ADS tab (decision 4077): the NLL Marketing app inside the board. Phone first, one column, main action on top, no scrolling on the swipe screen at phone height.
   The frame is the board's black, white and orange; neon (pink, cyan, green) only on the HUD, the swipe cards and the scoreboard numbers. Uses the board tokens from map.css. */
#tab-ads [hidden] { display: none !important }
#tab-ads .ads { max-width: 460px; margin: 0 auto; position: relative; overflow-wrap: anywhere }
#tab-ads .ads .tabh { margin-top: 14px; margin-bottom: 8px }
#tab-ads .ads-status { margin: 0 0 8px; padding: 8px 12px; font-size: 14px; background: var(--panel2); border: 2px solid var(--brand) }
#tab-ads .ads-nav { display: grid; grid-template-columns: 1fr 1fr; gap: 0; margin: 0 0 10px; border: 3px solid var(--brand) }
#tab-ads .ads-navbtn { all: unset; box-sizing: border-box; cursor: pointer; text-align: center; padding: 11px 6px; font: 800 12px/1 var(--display); letter-spacing: .08em; color: #fff; background: var(--ink); opacity: .6; min-height: 44px; display: flex; align-items: center; justify-content: center; gap: 6px }
#tab-ads .ads-navbtn[aria-pressed="true"] { opacity: 1; color: var(--ink); background: var(--brand) }
#tab-ads .ads-navbtn:focus-visible { outline: 3px solid #fff; outline-offset: -6px }
#tab-ads .ads-qb { font: 800 10px/1 var(--display); font-style: normal; min-width: 18px; padding: 3px 5px; border-radius: 9px; background: var(--pink); color: #fff }
/* HUD (neon) */
#tab-ads .ads-hud { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px }
#tab-ads .ads-hud > div { background: var(--panel2); border: 2px solid var(--ink); box-shadow: 3px 3px 0 var(--ink); padding: 6px 8px; min-width: 0 }
#tab-ads .ads-k { display: block; font: 8px/1.4 var(--pixel); color: var(--muted) }
#tab-ads .ads-v { display: block; font: 34px/.95 var(--num); text-shadow: 0 0 8px currentColor }
#tab-ads .c-pink { color: var(--pink) } #tab-ads .c-green { color: var(--green) } #tab-ads .c-cyan { color: var(--cyan) }
/* the deck: one card in front, one peeking behind, the rest hidden under them */
#tab-ads [data-ads-s="swipe"] { display: flex; flex-direction: column }
#tab-ads .ads-deck { position: relative; height: clamp(300px, calc(100dvh - 420px), 560px); margin: 12px 0 10px; touch-action: pan-y }
#tab-ads .ads-card { position: absolute; inset: 0; display: flex; flex-direction: column; overflow: hidden; background: var(--panel); border: 3px solid var(--pink); box-shadow: 0 0 14px #ff3ea566, 5px 5px 0 var(--ink); transition: transform .35s, opacity .35s; touch-action: none; user-select: none }
#tab-ads .ads-behind { transform: scale(.95) translateY(10px); opacity: .55; z-index: 1 }
#tab-ads .ads-later { transform: scale(.9) translateY(20px); opacity: 0; z-index: 0; pointer-events: none }
#tab-ads .ads-front { z-index: 3; cursor: grab }
#tab-ads .ads-out { z-index: 4 }
#tab-ads .ads-outR { transform: translateX(130%) rotate(18deg); opacity: 0 }
#tab-ads .ads-outL { transform: translateX(-130%) rotate(-18deg); opacity: 0 }
#tab-ads .ads-th-none.ads-bg0 { background: linear-gradient(160deg, #3a1206, #000 70%) }
#tab-ads .ads-th-none.ads-bg1 { background: linear-gradient(200deg, #0b2a3a, #000 75%) }
#tab-ads .ads-th-none.ads-bg2 { background: linear-gradient(140deg, #2b2b2b, #000) }
#tab-ads .ads-th-none.ads-bg3 { background: linear-gradient(170deg, #f26522, #5a1c03 80%) }
#tab-ads .ads-th-none.ads-bg4 { background: linear-gradient(190deg, #1d3b1a, #000 80%) }
#tab-ads .ads-media { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover }
#tab-ads .ads-meta { flex: none; padding: 10px 12px 8px; display: flex; flex-direction: column; gap: 6px }
/* the finished ad: a Facebook feed post, plain white and grey (a preview, not branded UI). The card scrolls it when it is taller than the card. */
#tab-ads .ads-scroll { flex: 1; min-height: 0; position: relative; display: flex; justify-content: center; align-items: flex-start; overflow: hidden; overscroll-behavior: contain; -webkit-overflow-scrolling: touch; touch-action: pan-y; padding: 0 10px 10px }
/* the whole post is scaled to fit the card (ads-wire.js sets .ads-fit's size and the post's scale); after See more the card scrolls instead */
#tab-ads .ads-card[data-ads-open] .ads-scroll { overflow-y: auto }
#tab-ads .ads-fit { flex: none; position: relative; width: 380px }
#tab-ads .ads-fit .fb-post { position: absolute; left: 0; top: 0; width: 380px; transform-origin: top left }
#tab-ads .fb-post { background: #fff; color: #050505; border-radius: 8px; overflow: hidden; font: 15px/1.33 Helvetica, Arial, sans-serif; text-align: left }
#tab-ads .fb-hd { display: flex; align-items: center; gap: 8px; padding: 10px 12px }
#tab-ads .fb-av { flex: none; width: 40px; height: 40px; border-radius: 50%; background: #f26522; color: #fff; font: 700 15px Helvetica, Arial, sans-serif; display: flex; align-items: center; justify-content: center }
#tab-ads .fb-who { display: flex; flex-direction: column; min-width: 0 }
#tab-ads .fb-name { font: 700 15px/1.2 Helvetica, Arial, sans-serif; color: #050505 }
#tab-ads .fb-sp { font: 13px/1.3 Helvetica, Arial, sans-serif; color: #65676b }
#tab-ads .fb-dots { margin-left: auto; color: #65676b; font-weight: 700; letter-spacing: 1px }
#tab-ads .fb-pt { padding: 0 12px 10px; white-space: pre-wrap; font: 15px/1.33 Helvetica, Arial, sans-serif; color: #050505 }
#tab-ads .fb-more { all: unset; cursor: pointer; color: #65676b; font-weight: 600; font: 600 15px/1.33 Helvetica, Arial, sans-serif }
#tab-ads .fb-more:focus-visible { outline: 2px solid #1877f2 }
#tab-ads .fb-zoom { all: unset; position: absolute; inset: 0; display: block; cursor: zoom-in }
#tab-ads .fb-zoom:focus-visible { outline: 3px solid #1877f2; outline-offset: -3px }
#tab-ads .fb-zoom .ads-media { pointer-events: auto }
#tab-ads .fb-img { position: relative; aspect-ratio: 1 / 1; background: #e4e6eb; overflow: hidden }
#tab-ads .fb-img .ads-soon { top: 50%; left: 50%; transform: translate(-50%, -50%); font-size: 12px; padding: 7px 10px }
#tab-ads .fb-lk { display: flex; align-items: center; justify-content: space-between; gap: 10px; background: #f0f2f5; padding: 10px 12px }
#tab-ads .fb-lt { display: flex; flex-direction: column; min-width: 0 }
#tab-ads .fb-dom { font: 11px/1.3 Helvetica, Arial, sans-serif; color: #65676b; white-space: nowrap; overflow: hidden; text-overflow: ellipsis }
#tab-ads .fb-hl { font: 700 16px/1.25 Helvetica, Arial, sans-serif; color: #050505 }
#tab-ads .fb-desc { font: 13px/1.3 Helvetica, Arial, sans-serif; color: #65676b }
#tab-ads .fb-miss { margin: 0; padding: 8px 12px; font: 700 13px/1.3 Helvetica, Arial, sans-serif; color: #000; background: #ffd400 }
#tab-ads .fb-cta { flex: none; background: #e4e6eb; color: #050505; border-radius: 6px; padding: 8px 10px; font: 600 14px Helvetica, Arial, sans-serif; white-space: nowrap }
#tab-ads .fb-rx { display: flex; justify-content: space-around; color: #65676b; padding: 8px; border-top: 1px solid #ddd; font: 600 14px Helvetica, Arial, sans-serif }
#tab-ads .ads-chips { display: flex; gap: 6px; flex-wrap: wrap }
#tab-ads .ads-chip { font: 8px/1 var(--pixel); padding: 5px 6px; border: 2px solid currentColor }
#tab-ads .ads-angle { color: var(--cyan) }
#tab-ads .ads-by-andrew { color: var(--brand) } #tab-ads .ads-by-sergs { color: var(--cyan) } #tab-ads .ads-by-claude { color: var(--pink) }
#tab-ads .ads-flag { align-self: flex-start; font: 800 11px/1 var(--display); color: #000; background: var(--rgold); padding: 4px 7px; border-radius: 3px }
#tab-ads .ads-code { color: #fff }
#tab-ads .ads-stamp { position: absolute; top: 24px; z-index: 5; font: 26px var(--pixel); padding: 8px; border: 4px solid; opacity: 0; pointer-events: none; transform: rotate(-14deg) }
#tab-ads .ads-yes { left: 16px; color: var(--green) } #tab-ads .ads-no { right: 16px; color: #ff4d6d; transform: rotate(14deg) }
#tab-ads .ads-done { position: absolute; inset: 0; display: flex; flex-direction: column; align-items: center; justify-content: center; text-align: center; gap: 12px; font: 12px/1.6 var(--pixel); color: var(--green) }
#tab-ads .ads-done span { font: 600 13px/1.5 var(--body); color: #fff }
#tab-ads .ads-acts { display: grid; grid-template-columns: 1fr 1.4fr; gap: 10px }
#tab-ads .ads-btn { all: unset; box-sizing: border-box; cursor: pointer; text-align: center; padding: 12px 6px; min-height: 56px; font: 800 14px/1.1 var(--display); border: 3px solid var(--ink); box-shadow: 4px 4px 0 var(--ink); display: flex; flex-direction: column; align-items: center; justify-content: center }
#tab-ads .ads-btn small { display: block; font: 600 10.5px/1.2 var(--body); margin-top: 3px; opacity: .85 }
#tab-ads .ads-btn-no { background: #2a0f1c; color: #ff4d6d; border-color: #ff4d6d }
#tab-ads .ads-btn-yes { background: var(--green); color: #000 }
#tab-ads .ads-btn:focus-visible { outline: 3px solid #fff; outline-offset: 2px }
#tab-ads .ads-btn[disabled] { cursor: not-allowed; opacity: .55; box-shadow: none }
#tab-ads .ads-btn-yes[disabled] { background: #3a3936; color: #fff }
#tab-ads .ads-keys { margin: 8px 0 0; font-size: 11px; color: var(--muted); text-align: center }
/* the reason sheet: one tap */
#tab-ads .ads-sheet { position: fixed; left: 0; right: 0; bottom: 0; z-index: 60; background: #000; border-top: 3px solid #ff4d6d; padding: 14px 14px calc(22px + env(safe-area-inset-bottom)) }
#tab-ads .ads-sheet h4 { margin: 0 0 10px; font: 800 14px var(--display); color: #fff }
#tab-ads .ads-reasons { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; max-width: 460px; margin: 0 auto }
#tab-ads .ads-reasons button { all: unset; box-sizing: border-box; cursor: pointer; text-align: center; padding: 14px 4px; min-height: 48px; border: 2px solid #ff4d6d; color: #fff; font: 800 13px var(--display) }
#tab-ads .ads-reasons button:focus-visible { outline: 3px solid #fff }
#tab-ads .ads-cancel { all: unset; display: block; margin: 12px auto 0; cursor: pointer; color: var(--muted); font-size: 13px; padding: 6px 12px }
#tab-ads .ads-toast { position: fixed; left: 50%; bottom: 110px; transform: translateX(-50%) translateY(-20px); opacity: 0; background: #000; border: 2px solid var(--green); color: var(--green); font: 8px/1.5 var(--pixel); padding: 8px 10px; transition: .25s; z-index: 70; white-space: nowrap; pointer-events: none }
#tab-ads .ads-toast.on { opacity: 1; transform: translateX(-50%) }
/* scoreboard */
#tab-ads .ads-h { font: 900 19px/1.15 var(--display); color: #fff; margin: 2px 0 2px }
#tab-ads .ads-sub { font-size: 12px; color: var(--muted); margin: 0 0 8px }
#tab-ads .ads-win { display: flex; gap: 6px; margin: 0 0 10px }
#tab-ads .ads-wbtn { font: 400 8px/1 var(--pixel); color: var(--muted); background: var(--panel2); border: 2px solid var(--ink); padding: 10px 12px; min-height: 40px; cursor: pointer }
#tab-ads .ads-wbtn[aria-pressed="true"] { color: var(--cyan); border-color: var(--cyan) }
#tab-ads .ads-list { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 7px }
#tab-ads .ads-row { display: grid; grid-template-columns: 20px 44px minmax(0, 1fr) 32px 32px 32px 58px; gap: 5px; align-items: center; background: var(--panel2); border: 2px solid var(--ink); box-shadow: 3px 3px 0 var(--ink); padding: 6px }
#tab-ads .ads-head { background: none; border: 0; box-shadow: none; padding: 0 6px; font: 7px var(--pixel); color: var(--muted) }
#tab-ads .ads-head span { text-align: center } #tab-ads .ads-head .ads-hn { text-align: left }
#tab-ads .ads-rk { font: 26px/1 var(--num); text-align: center; color: #fff }
#tab-ads .ads-top1 { border-color: var(--green); box-shadow: 0 0 10px #4dff9a55, 3px 3px 0 var(--ink) } #tab-ads .ads-top1 .ads-rk { color: var(--green) }
#tab-ads .ads-th { width: 44px; height: 44px; object-fit: cover; display: flex; align-items: flex-end; padding: 3px; font: 900 9px/1 var(--display); color: #fff; background: #000 }
#tab-ads .ads-nm { min-width: 0; font: 800 12px/1.2 var(--display); color: #fff; overflow: hidden }
#tab-ads .ads-nm b { display: block; font-weight: 800; overflow: hidden; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical }
#tab-ads .ads-nm small { display: block; font: 600 10px var(--body); color: var(--muted) }
#tab-ads .ads-n { font: 22px/1 var(--num); text-align: center; color: #fff; white-space: nowrap }
#tab-ads .ads-won { color: var(--green) }
#tab-ads .ads-cph { white-space: nowrap; font: 22px/1 var(--num); text-align: center; color: var(--green); text-shadow: 0 0 6px #4dff9a88; border-left: 1px dashed var(--brand); padding-left: 4px }
#tab-ads .ads-new { font: 600 10px/1.2 var(--body); color: var(--muted); text-shadow: none }
#tab-ads .ads-lock { font: 800 9px/1.2 var(--display); color: var(--brand); text-shadow: none }
#tab-ads .ads-none { color: var(--muted); font-size: 14px; padding: 12px 4px }
#tab-ads .ads-note { font-size: 11px; color: var(--muted); margin-top: 10px } #tab-ads .ads-note b { color: var(--brand) }
@media (max-width: 420px) {
  #tab-ads .ads-row { grid-template-columns: 18px 40px minmax(0, 1fr) 30px 30px 30px 56px; gap: 4px }
  #tab-ads .ads-th { width: 40px; height: 40px }
}
/* phone height: the swipe screen fits without scrolling, so the tab heading gives way */
@media (max-width: 640px) { #tab-ads .ads .tabh { display: none } #tab-ads .ads-keys { display: none } #tab-ads .ads-deck { margin: 10px 0 8px } }
@media (prefers-reduced-motion: reduce) { #tab-ads .ads-card, #tab-ads .ads-toast { transition: none } }
/* the CONTENT tab's button, inside the topic card */
#tab-content .ads-mk { align-self: flex-start; display: inline-block; cursor: pointer; background: var(--brand); color: #000; font: 800 12px/1.1 var(--display); padding: 10px 12px; min-height: 40px; border: 2px solid var(--ink); box-shadow: 3px 3px 0 var(--ink); margin-top: 4px }
#tab-content .ads-mk:focus-visible { outline: 3px solid #fff }
#tab-content .ads-mk-sent { background: var(--green); cursor: default }
/* publish status and "image coming" (decision 4121): kept in one block at the end so the desktop layout work merges cleanly */
#tab-ads .ads-soon { position: absolute; top: 8px; left: 8px; z-index: 2; font: 800 10px/1 var(--display); letter-spacing: .06em; color: #000; background: var(--rgold); padding: 5px 7px; border-radius: 3px }
#tab-ads .ads-pubs { list-style: none; margin: 8px 0 0; padding: 0; display: flex; gap: 6px; font: 600 11px/1.2 var(--body) }
#tab-ads .ads-pub { min-width: 0; display: flex; gap: 4px; align-items: center; padding: 4px 7px; border: 2px solid var(--ink); background: var(--panel2); color: #fff; white-space: nowrap }
#tab-ads .ads-pub b { font-weight: 800 }
#tab-ads .ads-pub-t { overflow: hidden; text-overflow: ellipsis }
#tab-ads .ads-pub-pub { border-color: var(--cyan) } #tab-ads .ads-pub-paused { border-color: var(--brand) } #tab-ads .ads-pub-live { border-color: var(--green); color: var(--green) } #tab-ads .ads-pub-bad { border-color: #ff4d6d; color: #ff9aa9; flex: 1 1 0 }
#tab-ads .ads-pubs-swipe { height: 28px; overflow: hidden }
#tab-ads .ads-pubs-swipe .ads-pub { flex: 0 1 auto }
#tab-ads .ads-pubs-score { flex-direction: column; margin: 0 0 10px }
#tab-ads .ads-pubs-score .ads-pub { white-space: normal; flex-wrap: wrap }
#tab-ads .ads-retry { all: unset; cursor: pointer; margin-left: auto; padding: 4px 8px; min-height: 20px; font: 800 11px/1 var(--display); color: #000; background: var(--brand); border: 2px solid var(--ink) }
#tab-ads .ads-retry:focus-visible { outline: 3px solid #fff }
#tab-ads .ads-retry[disabled] { opacity: .5; cursor: not-allowed }
#tab-ads .ads-pubs-swipe + .ads-deck { height: clamp(300px, calc(100dvh - 450px), 560px) }
#tab-ads .ads-pubs { box-sizing: border-box; width: 100%; max-width: 100%; min-width: 0 }
#tab-ads .ads-pub { max-width: 100% }
#tab-ads .ads-pubs-swipe .ads-pub-bad { min-width: 0; overflow: hidden }
/* the one-line strip must not widen the screen: it adds nothing to its parent's intrinsic width and then fills it */
#tab-ads .ads-pubs-swipe { width: 0; min-width: 100% }
#tab-ads .ads-pub-t { min-width: 0 }
#tab-ads .ads-media { -webkit-user-drag: none; user-select: none; pointer-events: none }
/* the SWIPE status strip on one line: a pill that does not fit wraps to a hidden second line instead of being cut ("AC-6 P.."); a refused card keeps its Retry in view and shortens its text */
#tab-ads .ads-pubs-swipe { flex-wrap: wrap; align-content: flex-start; align-items: flex-start; height: auto; max-height: 34px }
#tab-ads .ads-pubs-swipe .ads-pub { flex: none }
#tab-ads .ads-pubs-swipe .ads-pub-bad { flex: 1 1 0; min-width: min(230px, 100%) }
#tab-ads .ads-pubs-swipe .ads-retry { padding: 3px 8px; min-height: 0 }
/* where an approved ad goes: outside the Facebook post, right above PASS and APPROVE */
#tab-ads .ads-goes { margin: 0 0 8px; padding: 6px 9px; background: #000; border: 2px solid var(--cyan); color: #fff; font: 600 12px/1.3 var(--body) }
#tab-ads .ads-goes b { font-weight: 800; color: var(--cyan) }
#tab-ads .ads-goes .ads-g-obj { color: var(--green) }
#tab-ads .ads-g-l2 { display: block; margin-top: 2px; font: 500 11px/1.3 var(--body); color: #d7d7d7 }
#tab-ads .ads-goes-miss { border-color: #ffd400; color: #ffd400 }
/* the picture full screen (tap it, then tap again or press Esc) */
.ads-lb { position: fixed; inset: 0; z-index: 200; background: rgba(0, 0, 0, .94); display: flex; align-items: center; justify-content: center; cursor: zoom-out; padding: 8px; box-sizing: border-box }
.ads-lb img { max-width: 100%; max-height: 100%; object-fit: contain; display: block }
.ads-lb button:focus-visible { outline: 3px solid #1877f2 }
.ads-lb button { all: unset; position: absolute; top: calc(8px + env(safe-area-inset-top)); right: 12px; cursor: pointer; color: #fff; font: 800 13px var(--display, Helvetica); padding: 10px 12px; background: #000; border: 2px solid #fff }
/* the Like, Comment, Share row is decoration: it shows only after See more, so the default view gives its height to the picture */
#tab-ads .fb-rx { display: none }
#tab-ads .ads-card[data-ads-open] .fb-rx { display: flex }
/* the pass sheet: eight reasons, and a one-line note for Other */
#tab-ads .ads-reasons button { padding: 10px 6px; line-height: 1.15 }
#tab-ads .ads-pnote { max-width: 460px; margin: 10px auto 0; display: flex; gap: 8px; align-items: flex-end }
#tab-ads .ads-pnote label { flex: 1; min-width: 0; font: 600 12px/1.3 var(--body); color: #fff }
#tab-ads .ads-pnote input { display: block; width: 100%; box-sizing: border-box; margin-top: 4px; font: 16px var(--body); padding: 10px; background: #000; color: #fff; border: 2px solid #ff4d6d }
#tab-ads .ads-pnote-go { all: unset; box-sizing: border-box; cursor: pointer; flex: none; min-height: 44px; padding: 0 16px; display: flex; align-items: center; font: 800 13px var(--display); color: #000; background: #ff4d6d; border: 2px solid #000 }
#tab-ads .ads-pnote-go:focus-visible { outline: 3px solid #fff }
#tab-ads .ads-toast { white-space: normal; width: max-content; max-width: 88vw; text-align: center; line-height: 1.7 }
