/* S3 Layered creatives and S4 No surprises */
.cv-controls { display: flex; flex-wrap: wrap; gap: 12px 18px; align-items: center; background: #fff; border: 1px dashed var(--border-strong); border-radius: 10px; padding: 10px 12px; margin-bottom: 14px; }
.cv-controls > div { display: flex; align-items: center; gap: 8px; }
.cv-controls label { display: inline-flex; gap: 6px; align-items: center; color: var(--muted); }
.lbl { font-size: 11px; text-transform: uppercase; letter-spacing: .08em; color: var(--faint); font-weight: 650; display: block; margin: 12px 0 4px; }
.cv-controls .lbl { margin: 0; }
.cv-wrap { display: grid; grid-template-columns: minmax(0, 440px) 1fr; gap: 20px; align-items: start; }
.cv-left { background: #fff; border: 1px solid var(--border); border-radius: 14px; padding: 16px; box-shadow: var(--shadow); }
.cv-head { display: flex; justify-content: space-between; align-items: baseline; margin-bottom: 10px; }
.cv { position: relative; width: 100%; aspect-ratio: 1 / 1; border-radius: 10px; overflow: hidden; background: #e9ebf0; }
.cv-bg, .cv-bg svg { position: absolute; inset: 0; width: 100%; height: 100%; display: block; transition: filter .4s; }
.cv-bg.edited { filter: brightness(1.25) saturate(1.1); }
.cv-empty { position: absolute; inset: 0; display: grid; place-items: center; color: var(--faint); font-weight: 600; background: repeating-linear-gradient(45deg, #eef0f4 0 12px, #e6e9ee 12px 24px); }
.cv-banner { position: absolute; left: 4%; right: 4%; bottom: 17%; height: 24%; background: #ee5e4f; border-radius: 6px; padding: 7px 12px; display: flex; align-items: center; overflow: hidden; box-shadow: 0 4px 12px rgba(0,0,0,.25); }
.hl { width: 100%; color: #fff; font-weight: 750; line-height: 1.15; text-align: center; word-wrap: break-word; outline-offset: 3px; cursor: text; }
.cv-banner.model { align-items: flex-start; }
.hl.model { font-size: 30px; cursor: default; }
.cv-logo { position: absolute; right: 4%; bottom: 4%; width: 22%; height: 10%; display: flex; align-items: center; justify-content: flex-end; }
.cv-logo svg { height: 100%; width: 100%; filter: drop-shadow(0 2px 4px rgba(0,0,0,.3)); }
.cv-logo.before { width: 11%; height: 11%; }
.cv-tag { position: absolute; top: 8px; left: 8px; font-size: 11px; background: rgba(255,255,255,.92); color: var(--s3); font-weight: 650; border-radius: 6px; padding: 3px 8px; }
.cv-tag.dark { background: rgba(20,24,34,.8); color: #fff; }
.cv-edit { display: flex; gap: 8px; margin-top: 12px; }
#cv-editmsg { margin-top: 8px; font-size: 13px; color: var(--muted); display: flex; gap: 8px; align-items: center; }
.edit-err { background: var(--red-soft); color: var(--red); border: 1px solid #f2c2c2; padding: 8px 10px; border-radius: 8px; display: flex; gap: 8px; align-items: center; }
.edit-err b { font-weight: 600; }
.edit-ok { background: var(--green-soft); color: var(--green); padding: 8px 10px; border-radius: 8px; }
.cv-gate { position: sticky; top: 130px; }
.gate-head { display: flex; justify-content: space-between; align-items: baseline; padding: 10px 12px; border-radius: 9px; margin-bottom: 8px; }
.gate-head.ok { background: var(--green-soft); color: var(--green); }
.gate-head.bad { background: var(--red-soft); color: var(--red); }
.gate-head span { font-size: 12px; }
.gate-row { display: flex; gap: 10px; padding: 9px 2px; border-bottom: 1px solid #f0f1f4; }
.gate-row .btn { margin-top: 6px; }
.gi { flex: none; width: 24px; height: 24px; border-radius: 50%; display: grid; place-items: center; font-size: 9.5px; font-weight: 800; }
.gate-row.ok .gi { background: var(--green-soft); color: var(--green); }
.gate-row.bad .gi { background: var(--red-soft); color: var(--red); }

/* S4 */
.mode-card { display: flex; gap: 20px; align-items: center; flex-wrap: wrap; }
.mode-opts { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; flex: 1; min-width: 300px; }
.mode-opt { border: 1.5px solid var(--border); border-radius: 12px; padding: 12px 14px; cursor: pointer; background: #fff; text-align: left; font: inherit; color: inherit; }
.mode-opt.on { border-color: var(--s4); background: var(--s4-soft); }
.mode-opt b { display: block; margin-bottom: 2px; }
.default-tag { font-size: 10.5px; font-weight: 700; color: var(--s4); text-transform: uppercase; letter-spacing: .06em; }
.q-list { max-height: 220px; overflow: auto; border: 1px solid var(--border); border-radius: 10px; margin: 10px 0; }
.q-row { display: flex; gap: 10px; padding: 7px 12px; border-bottom: 1px solid #f0f1f4; font-size: 12.5px; align-items: center; }
.q-row .t { flex: 1; }
.q-row .d { color: var(--s4); font-weight: 600; width: 110px; flex: none; }
.ev { display: flex; gap: 10px; padding: 11px 0; border-bottom: 1px solid var(--border); }
.ev .when { flex: none; background: none; color: var(--faint); padding: 0; width: 50px; font-weight: 600; font-size: 12px; }
.actor { font-size: 10.5px; font-weight: 700; padding: 1px 7px; border-radius: 5px; text-transform: uppercase; letter-spacing: .04em; }
.actor.you { background: #eef0f4; color: var(--muted); }
.actor.support { background: var(--s4-soft); color: var(--s4); }
.actor.system { background: var(--s1-soft); color: var(--s1); }
.actor.release { background: var(--amber-soft); color: var(--amber); }
.ev .undo { margin-top: 4px; }
.soc-top { display: flex; gap: 10px; align-items: center; margin-bottom: 12px; flex-wrap: wrap; }
.soc-list .post-mini { justify-content: space-between; }
.soc-list .post-mini .acts { display: flex; gap: 6px; }
.week-grid { display: grid; grid-template-columns: repeat(7, 1fr); gap: 6px; }
.week-grid div { background: #fff; border: 1px solid var(--border); border-radius: 8px; min-height: 90px; padding: 6px; font-size: 11px; color: var(--muted); }
.week-grid i { display: block; font-style: normal; background: var(--s4-soft); color: var(--s4); border-radius: 4px; padding: 2px 4px; margin-top: 4px; font-size: 10.5px; }
.coach { position: absolute; inset: 0; background: rgba(22, 26, 38, .45); z-index: 30; }
.hint { position: absolute; z-index: 31; background: #fff; border-radius: 12px; box-shadow: var(--shadow-lg); padding: 12px 14px; width: 250px; font-size: 13px; }
.hint .n { width: 22px; height: 22px; border-radius: 50%; background: var(--s4); color: #fff; display: inline-grid; place-items: center; font-weight: 700; font-size: 12px; margin-right: 6px; }
.hint.dim { opacity: .5; }
.hl-target { position: relative; z-index: 32; box-shadow: 0 0 0 3px #fff, 0 0 0 6px var(--s4); border-radius: 8px; }
.trial-banner { display: flex; gap: 14px; align-items: center; background: linear-gradient(90deg, var(--s4-soft), #fff); border: 1px solid #ddcdf7; border-radius: 12px; padding: 12px 16px; margin-bottom: 14px; flex-wrap: wrap; }
.trial-banner .days { font-size: 22px; font-weight: 800; color: var(--s4); }
.drafts { display: grid; grid-template-columns: repeat(3, 1fr); gap: 12px; }
.draft { background: #fff; border: 1px solid var(--border); border-radius: 12px; overflow: hidden; }
.draft .img { height: 80px; background: linear-gradient(135deg, #3b4655, #1f2731); }
.draft .bd { padding: 10px 12px; }
.draft b { display: block; font-size: 13px; margin-bottom: 4px; }

@media (max-width: 1100px) {
  .cv-wrap { grid-template-columns: 1fr; }
  .cv-left { max-width: 480px; }
  .cv-gate { position: static; }
}
@media (max-width: 820px) {
  .mode-opts, .drafts { grid-template-columns: 1fr; }
  .week-grid { grid-template-columns: repeat(2, 1fr); }
}
