/* AME Creator Portal — matches the Studio Gallery look: dark ground, AME pink, Cormorant + Inter. */
:root, [data-ame-theme="dark"] {
	--bg: #131114;
	--surface: #1b181d;
	--surface-2: #221e24;
	--hover: #2a2530;
	--text: #efece4;
	--muted: #9c968a;
	--faint: #7d776d;
	--accent: #f05671;
	--accent-ink: #131114;
	--accent-hover: #ff8098;
	--line: rgba(239, 236, 228, 0.12);
	--line-2: rgba(239, 236, 228, 0.2);
	--ok-bg: rgba(110, 190, 130, 0.16); --ok: #a6dcb3;
	--warn-bg: rgba(240, 170, 80, 0.16); --warn: #f2c47e;
	--ig-bg: rgba(240, 86, 113, 0.16); --ig: #f7a3b2;
	--tt-bg: rgba(110, 160, 220, 0.16); --tt: #a9c8ec;
	--xhs-bg: rgba(255, 46, 77, 0.16); --xhs: #ff8a9c;
	--pitch-bg: rgba(220, 200, 120, 0.14); --pitch: #e3d08f;
	--off-bg: rgba(156, 150, 138, 0.16); --off: #b9b3a7;
	--star: #f2c47e;
	color-scheme: dark;
}
[data-ame-theme="light"] {
	--bg: #f7f5f1;
	--surface: #ffffff;
	--surface-2: #f0ece6;
	--hover: #f3f0e8;
	--text: #24212a;
	--muted: #6c665e;
	--faint: #8a847a;
	--accent: #c7304f;
	--accent-ink: #ffffff;
	--accent-hover: #9e2440;
	--line: rgba(36, 33, 42, 0.13);
	--line-2: rgba(36, 33, 42, 0.22);
	--ok-bg: #e5f2e8; --ok: #1f5a30;
	--warn-bg: #fdebd3; --warn: #7a4206;
	--ig-bg: #fbe4ea; --ig: #8e1f39;
	--tt-bg: #e3ecf6; --tt: #1f4670;
	--xhs-bg: #ffe5e9; --xhs: #b3132b;
	--pitch-bg: #f3eedc; --pitch: #6b5310;
	--off-bg: #ecebe7; --off: #57524b;
	--star: #a15c07;
	color-scheme: light;
}

* { box-sizing: border-box; }
html, body { margin: 0; }
body.ame {
	background: var(--bg);
	color: var(--text);
	font: 400 14px/1.55 "Inter", ui-sans-serif, system-ui, -apple-system, sans-serif;
	-webkit-font-smoothing: antialiased;
}
.ame a { color: var(--accent); text-decoration: none; }
.ame a:hover { color: var(--accent-hover); text-decoration: underline; }
.ame :focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }
.ame img { max-width: 100%; }
.ame-skip { position: absolute; left: -9999px; }
.ame-skip:focus { left: 16px; top: 16px; background: var(--surface); padding: 8px 12px; z-index: 10; }
.ame-serif { font-family: "Cormorant Garamond", Georgia, serif; font-weight: 300; }
.ame-eyebrow { font-size: 11px; font-weight: 500; letter-spacing: 0.3em; text-transform: uppercase; color: var(--muted); }
.ame-muted { color: var(--muted); }
.ame-small { font-size: 12px; }
.ame-sr { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.ame h1.ame-title { font-family: "Cormorant Garamond", Georgia, serif; font-weight: 300; font-size: clamp(32px, 4vw, 44px); line-height: 1.1; margin: 0; }
.ame h2.ame-h2 { font-family: "Cormorant Garamond", Georgia, serif; font-weight: 400; font-size: 26px; margin: 0 0 12px; }

/* ---------- shell ---------- */
.ame-shell { display: flex; flex-wrap: wrap; min-height: 100vh; }
.ame-nav { flex: 1 1 220px; max-width: 250px; background: var(--surface); border-right: 1px solid var(--line); padding: 28px 16px; display: flex; flex-direction: column; gap: 4px; }
.ame-nav-logo { padding: 0 8px 26px; display: block; }
.ame-nav-logo img { height: 40px; width: auto; display: block; }
.ame-nav-label { padding: 0 12px 10px; font-size: 10px; }
.ame .ame-nav-link { color: var(--muted); font-size: 14px; padding: 10px 12px; border-radius: 4px; border-left: 2px solid transparent; }
.ame .ame-nav-link:hover { color: var(--text); background: var(--surface-2); text-decoration: none; }
.ame .ame-nav-link.is-active { color: var(--text); background: var(--surface-2); border-left-color: var(--accent); font-weight: 500; }
.ame-nav-foot { margin-top: auto; padding: 16px 12px 0; display: flex; flex-direction: column; gap: 8px; }
.ame-crm-pill { font-size: 12px; color: var(--muted); border: 1px solid var(--line); border-radius: 4px; padding: 8px 10px; }
.ame-crm-pill.is-on { color: var(--ok); border-color: rgba(110, 190, 130, 0.35); }
.ame-main { flex: 999 1 640px; min-width: 0; padding: 32px 32px 64px; display: flex; flex-direction: column; gap: 22px; }
@media (max-width: 760px) {
	.ame-nav { max-width: none; flex-basis: 100%; flex-direction: row; flex-wrap: wrap; align-items: center; padding: 14px 16px; border-right: 0; border-bottom: 1px solid var(--line); }
	.ame-nav-logo { padding: 0 8px 0 0; }
	.ame-nav-label { display: none; }
	.ame-nav-foot { margin: 0; padding: 0; flex-direction: row; flex-wrap: wrap; align-items: center; width: 100%; }
	.ame-main { padding: 22px 16px 48px; }
}

.ame-head { display: flex; flex-wrap: wrap; gap: 16px; align-items: flex-end; justify-content: space-between; }
.ame-head > div:not(.ame-actions) { display: flex; flex-direction: column; gap: 6px; }
.ame-actions { display: flex; gap: 10px; flex-wrap: wrap; align-items: center; }

/* ---------- controls ---------- */
.ame-btn { font: inherit; font-size: 14px; font-weight: 600; min-height: 44px; padding: 0 16px; border-radius: 4px; border: 1px solid var(--accent); background: var(--accent); color: var(--accent-ink); cursor: pointer; display: inline-flex; align-items: center; justify-content: center; gap: 8px; text-decoration: none; }
.ame a.ame-btn { color: var(--accent-ink); }
.ame-btn:hover, .ame a.ame-btn:hover { background: var(--accent-hover); border-color: var(--accent-hover); text-decoration: none; color: var(--accent-ink); }
.ame-btn.is-ghost, .ame a.ame-btn.is-ghost { background: transparent; color: var(--text); border-color: var(--line-2); font-weight: 500; }
.ame-btn.is-ghost:hover, .ame a.ame-btn.is-ghost:hover { background: var(--surface-2); color: var(--text); }
.ame-btn.is-danger { background: transparent; color: var(--accent); border-color: rgba(240, 86, 113, 0.5); font-weight: 500; }
.ame-btn.is-small { min-height: 36px; padding: 0 12px; font-size: 13px; }
.ame-btn[disabled] { opacity: 0.55; cursor: progress; }
.ame-chip { font: inherit; font-size: 13px; font-weight: 500; min-height: 40px; padding: 0 14px; border-radius: 999px; border: 1px solid var(--line-2); background: transparent; color: var(--text); cursor: pointer; }
.ame-chip.is-on { border-color: var(--accent); background: var(--ig-bg); font-weight: 600; }
.ame-chip.is-warn { border-color: rgba(242, 196, 126, 0.5); color: var(--warn); }
.ame-chip.is-warn.is-on { background: var(--warn-bg); }

.ame-field { display: flex; flex-direction: column; gap: 6px; }
.ame-field > span, .ame-label { font-size: 12px; font-weight: 600; }
.ame-input, .ame select.ame-input, .ame textarea.ame-input { font: inherit; font-size: 14px; color: var(--text); background: var(--bg); border: 1px solid var(--line-2); border-radius: 4px; padding: 10px 12px; min-height: 44px; width: 100%; }
.ame textarea.ame-input { min-height: 90px; resize: vertical; line-height: 1.5; }
.ame-input::placeholder { color: var(--faint); }
.ame-input:focus { outline: 2px solid var(--accent); outline-offset: 0; }
.ame-grid-2 { display: grid; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); gap: 14px; }
.ame-help { font-size: 12px; color: var(--muted); }

.ame-card { background: var(--surface); border: 1px solid var(--line); border-radius: 6px; padding: 22px; }
.ame-card + .ame-card { margin-top: 0; }
.ame-note { background: var(--surface); border-left: 2px solid var(--accent); padding: 12px 16px; border-radius: 0 6px 6px 0; color: var(--muted); font-size: 13px; }
.ame-note strong { color: var(--text); font-weight: 600; }
.ame-empty { border: 1px dashed var(--line-2); border-radius: 6px; padding: 40px 24px; text-align: center; color: var(--muted); }
.ame-empty strong { display: block; color: var(--text); font-size: 16px; margin-bottom: 6px; }

/* ---------- tables ---------- */
.ame-table-wrap { background: var(--surface); border: 1px solid var(--line); border-radius: 6px; overflow-x: auto; }
.ame-table { border-collapse: collapse; width: 100%; }
.ame-table th { font-size: 11px; font-weight: 500; letter-spacing: 0.08em; text-transform: uppercase; color: var(--muted); text-align: left; padding: 12px 10px; border-bottom: 1px solid var(--line); white-space: nowrap; background: var(--surface-2); position: sticky; top: 0; }
.ame-table td { border-bottom: 1px solid rgba(239, 236, 228, 0.07); padding: 6px 8px; vertical-align: middle; font-size: 13px; }
[data-ame-theme="light"] .ame-table td { border-bottom-color: #eeece7; }
.ame-table tr.is-clickable { cursor: pointer; }
.ame-table tr.is-clickable:hover, .ame-table tr.is-selected { background: var(--hover); }
.ame-table tr.is-dim td { opacity: 0.6; }
.ame-cell { font: inherit; font-size: 13px; color: var(--text); border: 1px solid transparent; background: transparent; border-radius: 4px; padding: 7px 6px; width: 100%; min-height: 36px; }
.ame-cell::placeholder { color: var(--faint); }
.ame-cell:hover { border-color: var(--line-2); background: var(--surface-2); }
.ame-cell:focus { outline: 2px solid var(--accent); outline-offset: 0; background: var(--surface-2); }
.ame-cell.is-num { font-weight: 600; }
.ame-cell.is-saving { border-color: var(--line-2); }
.ame-cell.is-saved { border-color: rgba(110, 190, 130, 0.6); }
.ame-cell.is-error { border-color: var(--accent); }
.ame select.ame-cell option { background: var(--surface); color: var(--text); }

.ame-who { display: flex; align-items: center; gap: 10px; min-width: 0; }
.ame-who > div { display: flex; flex-direction: column; min-width: 0; }
.ame-who strong { font-weight: 600; }
.ame-who span { font-size: 12px; color: var(--muted); }
.ame-avatar { width: 36px; height: 36px; border-radius: 50%; flex-shrink: 0; display: inline-flex; align-items: center; justify-content: center; font-weight: 700; font-size: 12px; color: #131114; overflow: hidden; background: var(--surface-2); }
.ame-avatar img { width: 100%; height: 100%; object-fit: cover; display: block; }
.ame-avatar.is-lg { width: 64px; height: 64px; font-size: 20px; }
.ame-avatar.is-xl { width: 56px; height: 56px; font-size: 18px; }

.ame-badge { display: inline-flex; align-items: center; font-size: 12px; font-weight: 600; padding: 4px 10px; border-radius: 999px; white-space: nowrap; }
.ame-badge.ig { background: var(--ig-bg); color: var(--ig); }
.ame-badge.tt { background: var(--tt-bg); color: var(--tt); }
.ame-badge.ok { background: var(--ok-bg); color: var(--ok); }
.ame-badge.warn { background: var(--warn-bg); color: var(--warn); }
.ame-badge.pitch { background: var(--pitch-bg); color: var(--pitch); }
.ame-badge.off { background: var(--off-bg); color: var(--off); }
.ame-badge.black { background: var(--accent); color: var(--accent-ink); font-size: 10px; letter-spacing: 0.08em; }
.ame-stars { color: var(--star); letter-spacing: 1px; white-space: nowrap; font-size: 15px; }
.ame-star-input { display: inline-flex; gap: 2px; }
.ame-star-input button { font-size: 22px; line-height: 1; background: none; border: 0; color: var(--star); cursor: pointer; padding: 6px 3px; min-width: 32px; min-height: 40px; }

/* ---------- toolbar ---------- */
.ame-toolbar { display: flex; flex-wrap: wrap; gap: 10px; align-items: center; }
.ame-search { position: relative; flex: 1 1 340px; }
.ame-search .ame-input { padding-left: 38px; background: var(--surface); }
.ame-search svg { position: absolute; left: 12px; top: 50%; transform: translateY(-50%); color: var(--muted); }
.ame-suggest { position: absolute; left: 0; right: 0; top: calc(100% + 4px); background: var(--surface); border: 1px solid var(--line-2); border-radius: 6px; z-index: 20; max-height: 360px; overflow: auto; box-shadow: 0 12px 30px rgba(0, 0, 0, 0.35); }
.ame-suggest[hidden] { display: none; }
.ame-suggest button { font: inherit; color: var(--text); display: flex; width: 100%; text-align: left; gap: 10px; align-items: center; background: none; border: 0; border-bottom: 1px solid var(--line); padding: 10px 12px; cursor: pointer; min-height: 52px; }
.ame-suggest button:hover, .ame-suggest button:focus { background: var(--surface-2); }

/* ---------- side panel ---------- */
.ame-split { display: flex; flex-wrap: wrap; gap: 24px; align-items: flex-start; }
.ame-split > .ame-split-main { flex: 999 1 560px; min-width: 0; display: flex; flex-direction: column; gap: 16px; }
.ame-panel { flex: 1 1 340px; max-width: 420px; background: var(--surface); border: 1px solid var(--line); border-radius: 6px; padding: 22px; display: flex; flex-direction: column; gap: 16px; position: sticky; top: 16px; }
@media (max-width: 1100px) { .ame-panel { max-width: none; position: static; } }
.ame-mini { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 8px; }
.ame-mini div { background: var(--surface-2); border-radius: 4px; padding: 10px; display: flex; flex-direction: column; }
.ame-mini span { font-size: 11px; color: var(--muted); }
.ame-mini strong { font-size: 18px; font-weight: 600; }
.ame-hist { display: flex; flex-direction: column; gap: 2px; padding: 10px 12px; border: 1px solid var(--line); border-radius: 4px; }
.ame-hist strong { font-size: 13px; }
.ame-hist span { font-size: 12px; color: var(--muted); }
.ame-blackbox { border: 1px solid var(--accent); background: rgba(240, 86, 113, 0.1); border-radius: 4px; padding: 12px 14px; font-size: 13px; }

/* ---------- campaign list ---------- */
.ame-campaigns { display: grid; grid-template-columns: repeat(auto-fill, minmax(280px, 1fr)); gap: 16px; }
.ame .ame-camp { background: var(--surface); border: 1px solid var(--line); border-radius: 6px; padding: 20px; display: flex; flex-direction: column; gap: 10px; color: var(--text); }
.ame .ame-camp:hover { border-color: var(--accent); text-decoration: none; color: var(--text); }
.ame-camp h3 { font-family: "Cormorant Garamond", Georgia, serif; font-weight: 400; font-size: 26px; margin: 0; line-height: 1.15; }
.ame-camp-stats { display: flex; gap: 18px; font-size: 13px; color: var(--muted); flex-wrap: wrap; }
.ame-camp-stats strong { color: var(--text); font-weight: 600; }

/* ---------- dialog ---------- */
.ame dialog { background: var(--surface); color: var(--text); border: 1px solid var(--line-2); border-radius: 8px; padding: 0; width: min(640px, calc(100vw - 32px)); max-height: calc(100vh - 48px); }
.ame dialog.is-wide { width: min(980px, calc(100vw - 32px)); }
.ame dialog::backdrop { background: rgba(10, 8, 12, 0.7); }
.ame-dialog-body { padding: 24px; display: flex; flex-direction: column; gap: 16px; }
.ame-dialog-foot { display: flex; justify-content: flex-end; gap: 10px; padding: 16px 24px; border-top: 1px solid var(--line); flex-wrap: wrap; }
.ame-preview-frame { width: 100%; height: 460px; border: 1px solid var(--line); border-radius: 6px; background: #eceae4; }
.ame-recipients { max-height: 220px; overflow: auto; border: 1px solid var(--line); border-radius: 4px; }
.ame-recipients label { display: flex; align-items: center; gap: 10px; padding: 8px 12px; border-bottom: 1px solid var(--line); font-size: 13px; min-height: 44px; cursor: pointer; }
.ame-recipients input { width: 18px; height: 18px; accent-color: var(--accent); }

.ame-toast { position: fixed; right: 20px; bottom: 20px; background: var(--surface-2); color: var(--text); border: 1px solid var(--line-2); border-radius: 6px; padding: 12px 16px; font-size: 14px; max-width: 420px; opacity: 0; transform: translateY(8px); transition: opacity .2s, transform .2s; pointer-events: none; z-index: 50; }
.ame-toast.is-on { opacity: 1; transform: none; }
.ame-toast.is-error { border-color: var(--accent); }

/* ---------- login ---------- */
.ame-login { min-height: 100vh; display: flex; align-items: center; justify-content: center; padding: 64px 16px; }
.ame-login-inner { width: 100%; max-width: 420px; display: flex; flex-direction: column; align-items: center; gap: 34px; text-align: center; }
.ame-login-inner img.logo { height: 64px; width: auto; }
.ame-login-form { width: 100%; text-align: left; background: var(--surface); border: 1px solid var(--line); border-radius: 8px; padding: 28px; display: flex; flex-direction: column; gap: 18px; }
.ame-check { display: flex; align-items: center; gap: 10px; font-size: 13px; color: var(--muted); min-height: 32px; cursor: pointer; }
.ame-check input { width: 18px; height: 18px; accent-color: var(--accent); }
.ame-error { border: 1px solid var(--accent); background: rgba(240, 86, 113, 0.1); color: var(--text); padding: 10px 12px; border-radius: 4px; font-size: 13px; }

/* ---------- client report ---------- */
.ame-report { background: var(--bg); }
.ame-rtop { background: var(--surface); border-bottom: 1px solid var(--line); }
.ame-rwrap { max-width: 1240px; margin: 0 auto; padding: 0 24px; }
.ame-rtop .ame-rwrap { display: flex; flex-wrap: wrap; gap: 16px; align-items: center; justify-content: space-between; padding-top: 16px; padding-bottom: 16px; }
.ame-rbrand { display: flex; align-items: center; gap: 16px; }
.ame-rbrand img { height: 40px; width: auto; }
.ame-rbrand .ame-eyebrow { border-left: 1px solid var(--line); padding-left: 16px; }
.ame-rmain { padding-top: 40px; padding-bottom: 64px; display: flex; flex-direction: column; gap: 32px; }
.ame-rhero { display: flex; flex-wrap: wrap; gap: 24px; align-items: flex-end; justify-content: space-between; }
.ame-rhero h1 { font-family: "Cormorant Garamond", Georgia, serif; font-weight: 400; font-size: clamp(38px, 5vw, 54px); line-height: 1.05; margin: 6px 0 8px; }
.ame-rhero .ame-eyebrow { color: var(--accent); }
.ame-client-logo { max-height: 72px; max-width: 180px; object-fit: contain; }
.ame-kpis { display: grid; grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)); gap: 16px; }
.ame-kpi { background: var(--surface); border: 1px solid var(--line); border-radius: 12px; padding: 22px; display: flex; flex-direction: column; gap: 4px; }
.ame-kpi span { font-size: 14px; color: var(--muted); }
.ame-kpi strong { font-size: 36px; font-weight: 700; letter-spacing: -0.02em; line-height: 1.15; }
.ame-kpi small { font-size: 13px; color: var(--muted); }
.ame-kpi.is-hero { background: #24212a; border-color: #24212a; color: #fff; }
.ame-kpi.is-hero span, .ame-kpi.is-hero small { color: #d6d5d0; }
.ame-split-bar { background: var(--surface); border: 1px solid var(--line); border-radius: 12px; padding: 22px; display: flex; flex-direction: column; gap: 14px; }
.ame-bar { display: flex; height: 14px; border-radius: 7px; overflow: hidden; gap: 3px; background: var(--surface-2); }
.ame-bar i { display: block; }
.ame-legend { display: flex; gap: 26px; flex-wrap: wrap; font-size: 14px; }
.ame-legend span { display: inline-flex; align-items: center; gap: 8px; }
.ame-legend b { width: 10px; height: 10px; border-radius: 3px; display: inline-block; }
.ame-tabs { display: flex; flex-wrap: wrap; gap: 8px; border-bottom: 1px solid var(--line); padding-bottom: 12px; }
.ame-tab { font: inherit; font-size: 14px; font-weight: 600; min-height: 44px; padding: 0 16px; border-radius: 999px; border: 1px solid var(--line-2); background: var(--surface); color: var(--text); cursor: pointer; }
.ame-tab[aria-selected="true"] { background: var(--text); border-color: var(--text); color: var(--bg); }
.ame-cards { display: grid; grid-template-columns: repeat(auto-fill, minmax(270px, 1fr)); gap: 20px; }
.ame-pcard { background: var(--surface); border: 1px solid var(--line); border-radius: 16px; padding: 12px 12px 18px; display: flex; flex-direction: column; gap: 14px; }
.ame-pcard > *:not(.ame-video) { margin: 0 6px; }
.ame-video { position: relative; width: 100%; aspect-ratio: 9 / 16; border-radius: 12px; overflow: hidden; background: #2a2024; }
.ame-video.tt { background: #1c2633; }
.ame-video button { font: inherit; position: absolute; inset: 0; width: 100%; height: 100%; border: 0; background: transparent; color: #fff; cursor: pointer; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 10px; }
.ame-video button span.play { width: 64px; height: 64px; border-radius: 50%; background: rgba(255, 255, 255, 0.18); display: flex; align-items: center; justify-content: center; }
.ame-video .views { position: absolute; left: 12px; bottom: 12px; font-size: 12px; font-weight: 700; padding: 5px 9px; border-radius: 8px; background: rgba(0, 0, 0, 0.55); color: #fff; }
.ame-video iframe { position: absolute; inset: 0; width: 100%; height: 100%; border: 0; background: #000; }
.ame-video.is-pending { display: flex; align-items: center; justify-content: center; color: #f2c47e; font-weight: 600; flex-direction: column; gap: 6px; text-align: center; padding: 20px; }
.ame-pstats { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 8px; border-top: 1px solid var(--line); padding-top: 14px; }
.ame-pstats div { display: flex; flex-direction: column; gap: 2px; }
.ame-pstats span { font-size: 12px; color: var(--muted); }
.ame-pstats strong { font-size: 18px; font-weight: 700; }
.ame-pstats strong.is-pending { font-size: 15px; color: var(--warn); }
.ame-plist { background: var(--surface); border: 1px solid var(--line); border-radius: 16px; overflow: hidden; }
.ame-plist > div { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 14px 20px; border-bottom: 1px solid var(--line); }
.ame-rfoot { font-size: 13px; color: var(--muted); display: flex; justify-content: space-between; flex-wrap: wrap; gap: 8px; border-top: 1px solid var(--line); padding-top: 20px; }
[hidden] { display: none !important; }
#ame-creator-form { display: flex; flex-direction: column; gap: 16px; }
/* client logos */
.ame-x { color: var(--muted); font-size: 18px; font-weight: 300; }
.ame-rbrand img.ame-cobrand { height: 40px; max-width: 160px; width: auto; object-fit: contain; }
.ame-camp-logo { width: 48px; height: 48px; object-fit: contain; background: #fff; border-radius: 8px; padding: 4px; flex-shrink: 0; border: 1px solid var(--line); }
.ame-camp-logo.is-lg { width: 56px; height: 56px; }
.ame-client-logo { background: #fff; border-radius: 12px; padding: 8px; max-height: 96px; max-width: 200px; object-fit: contain; border: 1px solid var(--line); }
.ame-logo-preview { width: 96px; height: 96px; object-fit: contain; background: #fff; border-radius: 10px; padding: 6px; border: 1px solid var(--line); }
@media (max-width: 560px) { .ame-rbrand img.ame-cobrand { height: 32px; max-width: 110px; } .ame-rbrand img { height: 32px; } }

/* Creator panel: visit profile links + merge */
.ame-visits { display: flex; gap: 8px; flex-wrap: wrap; margin-top: 8px; }
.ame-visit { display: inline-flex; align-items: center; gap: 5px; font-size: 12px; font-weight: 600; padding: 5px 11px; border-radius: 999px; text-decoration: none; border: 1px solid var(--line-2); color: var(--text); }
.ame-visit:hover { background: var(--surface-2); border-color: var(--accent); }
.ame-visit.ig::before, .ame-visit.tt::before { content: ""; width: 7px; height: 7px; border-radius: 50%; background: #f7a3b2; }
.ame-visit.tt::before { background: #a9c8ec; }
.ame-merge { border-top: 1px solid var(--line); margin-top: 20px; padding-top: 14px; display: flex; flex-direction: column; gap: 12px; }
.ame-merge > summary { cursor: pointer; font-weight: 600; }
.ame-merge[open] > summary { margin-bottom: 8px; }
.ame-merge .ame-search { flex: none; margin-top: 10px; }
.ame-merge-sugg { display: flex; flex-direction: column; border: 1px solid var(--line); border-radius: 6px; overflow: hidden; margin-top: 6px; }
.ame-merge-sugg button { font: inherit; color: var(--text); display: flex; gap: 10px; align-items: center; text-align: left; background: var(--surface); border: 0; border-bottom: 1px solid var(--line); padding: 10px 12px; cursor: pointer; }
.ame-merge-sugg button:last-child { border-bottom: 0; }
.ame-merge-sugg button:hover, .ame-merge-sugg button:focus-visible { background: var(--surface-2); }
.ame-merge-box { margin-top: 12px; border: 1px solid var(--line-2); border-radius: 8px; padding: 14px; background: var(--surface); }
.ame-merge-table { width: 100%; border-collapse: collapse; font-size: 13px; }
.ame-merge-table th, .ame-merge-table td { text-align: left; padding: 7px 6px; border-bottom: 1px solid var(--line); vertical-align: middle; }
.ame-merge-table thead th { font-size: 11px; color: var(--muted); font-weight: 500; text-transform: uppercase; letter-spacing: .08em; }
.ame-merge-table tbody th { font-weight: 600; width: 28%; }
.ame-merge-table tr.is-conflict { background: rgba(240, 170, 80, .07); }
.ame-merge-table .ame-check { gap: 6px; }
.ame-merge-photo { width: 34px; height: 34px; border-radius: 50%; object-fit: cover; vertical-align: middle; }
.ame-merge-facts { margin: 10px 0 12px; padding-left: 18px; color: var(--muted); font-size: 12px; display: flex; flex-direction: column; gap: 4px; }

/* Share link */
.ame-dot-on { width: 8px; height: 8px; border-radius: 50%; background: #6ebe82; display: inline-block; margin-left: 2px; }
.ame-share { display: flex; flex-direction: column; gap: 14px; }
.ame-share[hidden] { display: none; }
.ame-share-row { display: flex; gap: 16px; align-items: center; justify-content: space-between; flex-wrap: wrap; }
.ame-share-row p { margin: 4px 0 0; max-width: 620px; }
.ame-share-url { display: flex; gap: 8px; flex-wrap: wrap; }
.ame-share-url .ame-input { flex: 1 1 320px; font-family: ui-monospace, SFMono-Regular, Menlo, monospace; font-size: 13px; }
.ame-share-more { display: flex; gap: 8px; align-items: center; flex-wrap: wrap; }
.ame-grow { flex: 1; }
.ame-link { background: none; border: 0; padding: 0; font: inherit; font-size: 13px; font-weight: 600; color: var(--accent); cursor: pointer; }
.ame-link:hover { text-decoration: underline; }
.ame-link.is-danger { color: var(--muted); }
.ame-link.is-danger:hover { color: var(--accent); }

.ame-banner-ok { border-color: rgba(110, 190, 130, .45); background: rgba(110, 190, 130, .1); }

.ame-version-pill { font-family: "Inter", system-ui, sans-serif; font-size: 13px; font-weight: 600; letter-spacing: .02em; padding: 4px 10px; border-radius: 999px; background: rgba(240, 86, 113, .16); color: #f7a3b2; }

/* Import */
.ame-import-src { border: 1px solid var(--line); border-radius: 8px; padding: 12px 14px; background: var(--bg); }
.ame-import-src > summary { cursor: pointer; display: flex; gap: 6px; align-items: baseline; flex-wrap: wrap; }
.ame-import-ok { margin-left: auto; font-size: 12px; font-weight: 600; }
.ame-import-ok.is-ok { color: var(--ok); }
.ame-import-ok.is-bad { color: var(--warn); }
.ame-choice { display: flex; flex-direction: column; gap: 8px; }
.ame-choice label { display: grid; grid-template-columns: 20px 1fr; gap: 10px; align-items: start; padding: 12px 14px; border: 1px solid var(--line); border-radius: 8px; cursor: pointer; background: var(--bg); }
.ame-choice label:has(input:checked) { border-color: var(--accent); background: rgba(240, 86, 113, .08); }
.ame-choice input { margin-top: 3px; accent-color: var(--accent); width: 16px; height: 16px; }
.ame-choice small { display: block; color: var(--muted); font-size: 12.5px; margin-top: 3px; }

/* Report: by month */
.ame-viewswitch { display: inline-flex; gap: 4px; padding: 4px; border-radius: 999px; background: var(--surface-2); align-self: flex-start; }
.ame-viewswitch button { font: inherit; font-size: 14px; font-weight: 600; border: 0; background: none; color: var(--muted); padding: 8px 18px; border-radius: 999px; cursor: pointer; min-height: 38px; }
.ame-viewswitch button[aria-selected="true"] { background: var(--surface); color: var(--text); box-shadow: 0 1px 3px rgba(0,0,0,.12); }
.ame-view { display: flex; flex-direction: column; gap: 28px; }
.ame-view[hidden] { display: none !important; }
.ame-monthchart { background: var(--surface); border: 1px solid var(--line); border-radius: 12px; padding: 18px 20px; display: flex; flex-direction: column; gap: 14px; }
.ame-monthchart-head { display: flex; justify-content: space-between; align-items: center; gap: 10px; }
.ame-monthbars { display: flex; gap: 10px; align-items: flex-end; overflow-x: auto; padding-bottom: 2px; }
.ame-monthbar { flex: 1 0 56px; max-width: 110px; display: flex; flex-direction: column; align-items: center; gap: 6px; text-decoration: none; color: var(--text); }
.ame-monthbar .v { font-size: 12px; font-weight: 600; }
.ame-monthbar .b { height: 120px; width: 100%; display: flex; align-items: flex-end; background: var(--surface-2); border-radius: 6px; overflow: hidden; }
.ame-monthbar .b i { display: block; width: 100%; background: var(--accent); border-radius: 6px 6px 0 0; }
.ame-monthbar:hover .b i { filter: brightness(1.1); }
.ame-monthbar .l { font-size: 12px; color: var(--muted); display: flex; flex-direction: column; align-items: center; line-height: 1.2; }
.ame-monthbar .l small { font-size: 10px; }
.ame-months { display: flex; flex-direction: column; gap: 34px; }
.ame-month { display: flex; flex-direction: column; gap: 18px; scroll-margin-top: 20px; }
.ame-month-head { display: flex; justify-content: space-between; align-items: flex-end; gap: 16px; flex-wrap: wrap; border-bottom: 1px solid var(--line); padding-bottom: 14px; }
.ame-month-head h2 { font-family: "Cormorant Garamond", Georgia, serif; font-weight: 400; font-size: 34px; margin: 0; line-height: 1.1; display: flex; align-items: center; gap: 12px; flex-wrap: wrap; }
.ame-month-head p { margin: 4px 0 0; font-size: 14px; }
.ame-month-stats { display: flex; gap: 8px; flex-wrap: wrap; }
.ame-month-stats > div { background: var(--surface); border: 1px solid var(--line); border-radius: 10px; padding: 8px 14px; display: flex; flex-direction: column; min-width: 84px; }
.ame-month-stats > div.is-hero { background: var(--text); color: var(--bg); border-color: var(--text); }
.ame-month-stats span { font-size: 11px; letter-spacing: .06em; text-transform: uppercase; opacity: .75; }
.ame-month-stats strong { font-size: 20px; }
.ame-month-sub h3 { font-size: 14px; margin: 0 0 10px; }
.ame-pitchrow { display: flex; flex-wrap: wrap; gap: 8px; }
.ame-pitch { display: inline-flex; align-items: center; gap: 8px; padding: 4px 12px 4px 4px; border-radius: 999px; background: var(--surface); border: 1px solid var(--line); font-size: 13px; font-weight: 500; }
.ame-pitch .ame-avatar { width: 26px; height: 26px; font-size: 10px; }
.ame-month-head h2 .ame-badge { font-family: "Inter", system-ui, sans-serif; font-size: 12px; }

/* Creator panel: sign-up answers */
.ame-signup { border: 1px solid var(--line); border-radius: 8px; padding: 12px 14px; background: var(--bg); }
.ame-signup > summary { cursor: pointer; }
.ame-signup-accts { list-style: none; margin: 10px 0 0; padding: 0; display: flex; flex-direction: column; gap: 3px; font-size: 13px; }
.ame-signup-dl { margin: 10px 0 0; display: grid; grid-template-columns: 1fr; gap: 6px; font-size: 13px; }
.ame-signup-dl > div { display: grid; grid-template-columns: 130px 1fr; gap: 10px; }
.ame-signup-dl dt { color: var(--muted); }
.ame-signup-dl dd { margin: 0; }
.ame-consents { list-style: none; margin: 6px 0 0; padding: 0; display: flex; flex-direction: column; gap: 6px; font-size: 13px; }
.ame-consents .ame-badge { font-size: 11px; padding: 2px 8px; }
.ame-badge.off { background: var(--off-bg); color: var(--off); }

.ame-filter-selects { display: flex; gap: 8px; margin-left: auto; }
.ame-filter-selects .ame-input { min-height: 38px; padding: 6px 10px; font-size: 13px; width: auto; }

.ame-choice-row { flex-direction: row; flex-wrap: wrap; }
.ame-choice-row label { flex: 1 1 280px; }
.ame-export-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); gap: 12px; }
.ame-export { border: 1px solid var(--line); border-radius: 8px; padding: 14px; display: flex; flex-direction: column; gap: 8px; background: var(--bg); align-items: flex-start; }
[data-kind-only][hidden], [data-target][hidden] { display: none !important; }

.ame-video.is-photo { background: #fff; }
.ame-video.is-photo button { color: #6c665e; }

/* Campaign table: toolbar, sorting */
.ame-ttools { flex-wrap: wrap; row-gap: 10px; }
.ame-ttools .ame-search { flex: 1 1 280px; }
.ame-fsel { width: auto; min-height: 40px; padding: 6px 10px; font-size: 13px; }
.ame-sort { font: inherit; color: inherit; text-transform: inherit; letter-spacing: inherit; background: none; border: 0; padding: 0; cursor: pointer; display: inline-flex; align-items: center; gap: 6px; }
.ame-sort:hover { color: var(--text); }
.ame-sort i { width: 0; height: 0; border-left: 4px solid transparent; border-right: 4px solid transparent; border-top: 5px solid currentColor; opacity: .3; }
th[aria-sort="ascending"] .ame-sort, th[aria-sort="descending"] .ame-sort { color: var(--text); }
th[aria-sort="ascending"] .ame-sort i { border-top: 0; border-bottom: 5px solid var(--accent); opacity: 1; }
th[aria-sort="descending"] .ame-sort i { border-top-color: var(--accent); opacity: 1; }
tr.is-new td { background: rgba(240, 86, 113, .14); transition: background 1s; }
.ame-add-dialog { width: min(560px, calc(100vw - 32px)); overflow: visible; }
.ame-add-dialog .ame-dialog-body { overflow: visible; }
.ame-add-dialog .ame-search { flex: none; }
.ame-ttools > .ame-fsel { width: auto !important; flex: 0 0 auto; max-width: 170px; }
.ame-ttools #ame-f-count { margin-left: auto; }

/* Client locations */
.ame-locs { display: flex; flex-direction: column; gap: 8px; border-top: 1px solid var(--line); padding-top: 12px; }
.ame-loc-list { display: flex; flex-direction: column; gap: 8px; }
.ame-loc { display: flex; gap: 8px; align-items: center; color: var(--muted); }
.ame-loc-main { flex: 1; display: grid; grid-template-columns: minmax(120px, 220px) 1fr; gap: 8px; }
.ame-loc-main .ame-input { min-height: 38px; padding: 7px 10px; }
.ame-loc-find { flex: none; }
.ame-loc-find .ame-avatar { color: var(--muted); }
@media (max-width: 640px) { .ame-loc-main { grid-template-columns: 1fr; } }
.ame-badge.loc { background: rgba(110, 160, 120, .14); color: #3f7a52; }
.ame-badge.loc::before { content: "⌖ "; }

/* Team activity */
.ame-month-tabs { display: flex; gap: 8px; flex-wrap: wrap; }
.ame-month-tabs .ame-chip { text-decoration: none; color: var(--text); display: inline-flex; align-items: center; }
.ame-act { display: flex; flex-direction: column; gap: 12px; }
.ame-act-head { display: flex; gap: 12px; align-items: center; }
.ame-act-camp { border: 1px solid var(--line); border-radius: 8px; padding: 10px 14px; background: var(--bg); }
.ame-act-camp > summary { cursor: pointer; display: flex; gap: 10px; align-items: center; flex-wrap: wrap; }
.ame-act-camp > summary a { margin-left: auto; }
.ame-act-imports { display: flex; flex-direction: column; gap: 4px; }
a.ame-pitch { text-decoration: none; color: var(--text); }
.ame-who .ame-added { display: block; font-size: 11px; color: var(--faint); }
.ame-sortlink { color: inherit; text-decoration: none; display: inline-flex; gap: 6px; align-items: center; }
.ame-sortlink i { width: 0; height: 0; border-left: 4px solid transparent; border-right: 4px solid transparent; border-top: 5px solid currentColor; opacity: .3; }
.ame-sortlink.is-on { color: var(--text); }
.ame-sortlink.is-on i { border-top-color: var(--accent); opacity: 1; }

/* 1.10 · RedNote + where numbers came from */
.ame-badge.xhs { background: var(--xhs-bg); color: var(--xhs); }
.ame-badge.ame-tiny { font-size: 10.5px; padding: 1px 7px; margin-top: 4px; letter-spacing: 0.02em; }
.ame-visit.xhs::before { content: ""; width: 7px; height: 7px; border-radius: 50%; background: #ff2e4d; }
.ame-video.xhs { background: #2a1519; }
.ame-cover { position: relative; width: 100%; aspect-ratio: 3 / 4; border-radius: 12px; overflow: hidden; background: #2a1519; display: block; }
.ame-cover img { width: 100%; height: 100%; object-fit: cover; display: block; }
.ame-cover .kind { position: absolute; top: 10px; left: 10px; background: rgba(0,0,0,0.6); color: #fff; font-size: 11px; font-weight: 600; padding: 3px 9px; border-radius: 999px; display: inline-flex; gap: 5px; align-items: center; }
.ame-cover .views { position: absolute; left: 10px; bottom: 10px; background: rgba(0,0,0,0.65); color: #fff; font-size: 13px; font-weight: 600; padding: 4px 10px; border-radius: 999px; }
.ame-cover.is-empty { display: flex; align-items: center; justify-content: center; color: #f3b2bd; font-weight: 600; font-size: 14px; flex-direction: column; gap: 6px; text-align: center; padding: 20px; }
.ame-cover:hover { text-decoration: none; }
.ame-src { display: inline-block; font-size: 11px; font-weight: 600; padding: 1px 7px; border-radius: 999px; margin-left: 6px; vertical-align: 1px; }
.ame-src.self { background: var(--warn-bg); color: var(--warn); }
.ame-src.clipper { background: var(--ok-bg); color: var(--ok); }
.ame-src.staff, .ame-src.import { background: var(--surface-2); color: var(--muted); }
.ame-said { display: block; font-size: 12px; color: var(--warn); margin-top: 2px; }
.ame-stats-note { display: block; font-size: 11px; color: var(--warn); margin-top: 2px; white-space: normal; max-width: 200px; }
.ame-follow-src { list-style: none; margin: 8px 0 0; padding: 0; display: grid; gap: 4px; font-size: 13px; }
.ame-pstats.is-xhs { grid-template-columns: repeat(2, minmax(0, 1fr)); row-gap: 12px; }
@media (min-width: 1100px) { .ame-kpis:has(> .ame-kpi:nth-child(6)) { grid-template-columns: 1.3fr repeat(5, minmax(0, 1fr)); } }

/* 1.11 · layout */
.ame-corner { display: flex; justify-content: flex-end; gap: 10px; flex-wrap: wrap; margin: -6px 0 -10px; }
.ame-corner .ame-btn { min-height: 40px; }
.ame-rclient { display: flex; align-items: center; gap: 12px; margin-bottom: 14px; }
.ame-rclient img { height: 52px; width: 52px; object-fit: contain; background: #fff; border: 1px solid var(--line); border-radius: 50%; padding: 4px; }
.ame-rclient span { color: var(--muted); font-size: 15px; }
.ame-group { display: flex; flex-direction: column; gap: 16px; border-top: 1px solid var(--line-2, var(--line)); padding-top: 22px; margin-top: 6px; }
.ame-group-head h2 { font-family: "Cormorant Garamond", Georgia, serif; font-weight: 400; font-size: clamp(30px, 3.6vw, 42px); line-height: 1.1; margin: 0; }
.ame-group-head h2 span { font-family: "Inter", system-ui, sans-serif; font-size: 15px; color: var(--muted); font-weight: 500; vertical-align: middle; margin-left: 6px; }
.ame-group-head p { margin: 4px 0 0; color: var(--muted); font-size: 14px; }
.ame-pills { display: flex; flex-wrap: wrap; gap: 6px; align-items: center; }
.ame-pill-n { font-size: 15px; margin-right: 2px; }
.ame-pill { display: inline-flex; align-items: center; font-size: 12px; font-weight: 600; line-height: 1.2; padding: 3px 10px; border: 1px solid var(--line-2, var(--line)); border-radius: 999px; color: var(--text); white-space: nowrap; }
.ame-hist strong .ame-pill { margin-left: 6px; vertical-align: 2px; font-size: 11.5px; }
.ame-plist > .ame-prow { display: grid; grid-template-columns: minmax(0, 1fr) auto minmax(110px, auto); align-items: center; gap: 24px; }
.ame-prow-stats { display: flex; gap: 32px; }
.ame-prow-stats div { display: flex; flex-direction: column; gap: 2px; min-width: 84px; }
.ame-prow-stats span { font-size: 12px; color: var(--muted); }
.ame-prow-stats strong { font-size: 18px; font-weight: 700; font-variant-numeric: tabular-nums; }
.ame-prow-badges { display: flex; gap: 6px; flex-wrap: wrap; justify-content: flex-end; }
@media (max-width: 640px) {
	.ame-plist > .ame-prow { grid-template-columns: minmax(0, 1fr) auto; gap: 10px 16px; }
	.ame-prow-stats { grid-column: 1 / -1; grid-row: 2; gap: 24px; padding-left: 48px; }
}
.ame-visit-post { display: inline-flex; align-items: center; gap: 5px; font-size: 12px; font-weight: 600; padding: 4px 12px; border-radius: 999px; background: var(--accent); color: var(--accent-ink) !important; text-decoration: none !important; margin-left: auto; white-space: nowrap; }
.ame-visit-post:hover { background: var(--accent-hover); }

/* 1.12 · texts + campaign invite */
.ame-h3 { font-size: 16px; font-weight: 700; margin: 10px 0 0; }
.ame-seg { display: inline-flex; border: 1px solid var(--line-2); border-radius: 999px; padding: 3px; gap: 2px; width: max-content; }
.ame-seg label { cursor: pointer; }
.ame-seg input { position: absolute; opacity: 0; pointer-events: none; }
.ame-seg span { display: inline-block; padding: 6px 16px; border-radius: 999px; font-size: 13px; font-weight: 600; color: var(--muted); }
.ame-seg input:checked + span { background: var(--accent); color: var(--accent-ink); }
.ame-seg input:focus-visible + span { outline: 2px solid var(--accent); outline-offset: 2px; }
.ame-reach { font-size: 11.5px; margin-left: 4px; }
.ame-reach span { margin-right: 6px; white-space: nowrap; }
.ame-reach .is-ok { color: var(--ok); }
.ame-reach .is-no { color: var(--muted); text-decoration: none; opacity: .85; }
.ame-recipients label:has(input:disabled) { opacity: .6; }
.ame-sms-bubble { background: #e9e9eb; color: #111; border-radius: 18px 18px 18px 6px; padding: 10px 14px; font-size: 14px; line-height: 1.4; white-space: pre-wrap; max-width: 320px; font-family: -apple-system, "Inter", system-ui, sans-serif; }
.ame-sms-bubble:empty::before { content: "Pick a creator to see their text"; color: #777; }
.ame-promo { display: flex; gap: 16px; align-items: flex-start; flex-wrap: wrap; }
.ame-promo img { width: 160px; height: 120px; object-fit: cover; border-radius: 8px; border: 1px solid var(--line); }
.ame-invite-edit { border: 1px solid var(--line); border-radius: 8px; padding: 12px 14px; }
.ame-invite-edit summary { cursor: pointer; }
.ame-field code { font-size: 11px; color: var(--muted); font-weight: 400; margin-left: 4px; }
.ame-dialog-top { display: flex; align-items: flex-start; justify-content: space-between; gap: 12px; }
.ame-x { flex: none; width: 40px; height: 40px; border-radius: 50%; border: 1px solid var(--line-2); background: var(--surface-2); color: var(--text); cursor: pointer; display: inline-flex; align-items: center; justify-content: center; }
.ame-x:hover { border-color: var(--accent); color: var(--accent); }
#ame-email .ame-dialog-top { position: sticky; top: 0; z-index: 2; background: var(--surface); margin: -24px -24px 0; padding: 24px 24px 12px; }

/* 1.14 · formatting editor */
.ame-rich { display: flex; flex-direction: column; border: 1px solid var(--line-2); border-radius: 6px; overflow: hidden; }
.ame-rich-bar { display: flex; flex-wrap: wrap; gap: 4px; align-items: center; padding: 6px; background: var(--surface-2); border-bottom: 1px solid var(--line); }
.ame-rich-bar button, .ame-rich-bar select { font: inherit; font-size: 13px; min-height: 32px; padding: 0 10px; border-radius: 4px; border: 1px solid transparent; background: transparent; color: var(--text); cursor: pointer; }
.ame-rich-bar button:hover, .ame-rich-bar select:hover { border-color: var(--line-2); background: var(--surface); }
.ame-rich-bar select { border-color: var(--line-2); background: var(--surface); }
.ame-rich-colors { display: inline-flex; gap: 4px; align-items: center; padding: 0 6px; border-left: 1px solid var(--line); border-right: 1px solid var(--line); margin: 0 2px; }
.ame-rich-colors button { width: 22px; min-height: 22px !important; height: 22px; padding: 0 !important; border-radius: 50% !important; border: 2px solid var(--surface) !important; box-shadow: 0 0 0 1px var(--line-2); }
.ame-rich-custom { position: relative; width: 22px; height: 22px; border-radius: 50%; overflow: hidden; background: conic-gradient(red, yellow, lime, aqua, blue, magenta, red); box-shadow: 0 0 0 1px var(--line-2); cursor: pointer; }
.ame-rich-custom input { position: absolute; inset: 0; opacity: 0; cursor: pointer; }
.ame-rich-area { border: 0 !important; border-radius: 0 !important; background: #fff !important; color: #24212a !important; font-size: 15px; line-height: 1.6; padding: 14px 16px; overflow-y: auto; max-height: 520px; }
.ame-rich-area:focus { outline: 2px solid var(--accent); outline-offset: -2px; }
.ame-rich-area p { margin: 0 0 14px; }
.ame-rich-area a { color: #c7304f; }
.ame-rich-area ul, .ame-rich-area ol { margin: 0 0 14px; padding-left: 22px; }

/* 1.16 — date / time pickers in the campaign table, Negotiating, client visit notes */
.ame-cell.is-picker { font-variant-numeric: tabular-nums; cursor: pointer; min-width: 0; }
.ame-cell.is-picker:not(:focus):invalid, .ame-cell.is-picker[value=""]:not(:focus) { color: var(--muted); }
.ame-cell.is-picker::-webkit-calendar-picker-indicator { opacity: .55; cursor: pointer; }
.ame-cell.is-picker:hover::-webkit-calendar-picker-indicator { opacity: 1; }
.ame-th-note { display: inline-block; margin-left: 6px; padding: 1px 7px; border-radius: 999px; border: 1px solid var(--line); font-size: 10px; letter-spacing: .04em; color: var(--muted); vertical-align: 1px; }
.ame-badge.nego { background: var(--warn-bg); color: var(--warn); }
.ame-plist > .ame-prow .ame-prow-note { grid-column: 1 / -1; margin: -8px 0 0 48px; font-size: 13px; color: var(--muted); line-height: 1.45; }
.ame-prow-note b, .ame-pcard-note b { font-weight: 600; color: var(--text); }
.ame-pcard-note { margin: 0; font-size: 13px; color: var(--muted); line-height: 1.45; }
@media (max-width: 640px) { .ame-plist > .ame-prow .ame-prow-note { grid-row: 3; margin-top: 0; } }

/* 1.20 — short links */
.ame-slug { display: flex; align-items: center; min-height: 44px; border: 1px solid var(--line-2); border-radius: 4px; background: var(--bg); overflow: hidden; }
.ame-slug:focus-within { outline: 2px solid var(--accent); outline-offset: 0; border-color: transparent; }
.ame-slug b { padding: 0 1px 0 12px; color: var(--muted); font-weight: 500; white-space: nowrap; }
.ame-slug input { flex: 1; min-width: 0; border: 0; background: transparent; color: var(--text); font: inherit; font-weight: 600; padding: 10px 12px 10px 0; outline: none; }
.ame-slug input:disabled { color: var(--muted); }
.ame-slug-lg { flex: 1; font-size: 16px; }
.ame-share-url { display: flex; gap: 8px; align-items: stretch; }
.ame-share-stats { display: flex; gap: 28px; align-items: flex-end; flex-wrap: wrap; }
.ame-share-stats div { display: flex; flex-direction: column; }
.ame-share-stats strong { font-size: 20px; font-variant-numeric: tabular-nums; }
.ame-share-stats span { font-size: 12px; color: var(--muted); }
.ame-lnew-row { display: grid; grid-template-columns: minmax(0, 1.4fr) minmax(0, 1fr) auto; gap: 10px; align-items: end; }
.ame-lfilters { display: flex; gap: 10px; align-items: center; flex-wrap: wrap; justify-content: space-between; }
.ame-lfilters .ame-chips { display: flex; gap: 8px; flex-wrap: wrap; }
.ame-lsearch { max-width: 260px; min-height: 40px; }
.ame-ltable td { vertical-align: middle; }
.ame-lslug { font-weight: 600; white-space: nowrap; }
.ame-lslug > span:first-child { color: var(--muted); font-weight: 500; }
.ame-lgoes { color: var(--muted); font-size: 13px; max-width: 340px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.ame-lclicks strong { font-size: 16px; font-variant-numeric: tabular-nums; }
.ame-lact { white-space: nowrap; text-align: right; }
.ame-lact .ame-link { margin-left: 14px; }
.ame-ltable tr.is-dim td { opacity: .55; }
.ame-ldialog { width: min(760px, calc(100vw - 32px)); max-height: calc(100vh - 48px); padding: 0; border: 1px solid var(--line-2); border-radius: 8px; background: var(--surface); color: var(--text); }
.ame-ldialog::backdrop { background: rgba(0, 0, 0, .6); }
.ame-ldialog .ame-dialog-top { padding: 20px 24px 0; }
.ame-ldialog .ame-dialog-foot { position: sticky; bottom: 0; background: var(--surface); border-top: 1px solid var(--line); padding: 14px 24px; display: flex; gap: 10px; }
.ame-ldsec { display: flex; flex-direction: column; gap: 12px; padding-bottom: 20px; border-bottom: 1px solid var(--line); }
.ame-ldsec:last-child { border-bottom: 0; padding-bottom: 0; }
.ame-ldsec h3 { margin: 0; font-size: 14px; }
.ame-lnums { display: flex; gap: 32px; }
.ame-lnums div { display: flex; flex-direction: column; }
.ame-lnums strong { font-size: 26px; font-variant-numeric: tabular-nums; line-height: 1.1; }
.ame-lnums span { font-size: 12px; color: var(--muted); }
.ame-lnums div:last-child strong { color: var(--muted); }
.ame-lbars { display: flex; align-items: flex-end; gap: 3px; height: 70px; }
.ame-lbars span { flex: 1; height: 100%; display: flex; align-items: flex-end; }
.ame-lbars i { display: block; width: 100%; background: var(--accent); border-radius: 2px 2px 0 0; min-height: 2px; opacity: .9; }
.ame-lbars-x { display: flex; justify-content: space-between; font-size: 11px; color: var(--muted); margin-top: -6px; }
.ame-lbds { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 16px 28px; }
.ame-lbd h4 { margin: 0 0 6px; font-size: 12px; color: var(--muted); font-weight: 600; }
.ame-lbd-row { display: grid; grid-template-columns: minmax(0, 1fr) 70px 32px; gap: 8px; align-items: center; font-size: 13px; padding: 2px 0; }
.ame-lbd-row b { text-align: right; font-variant-numeric: tabular-nums; }
.ame-lbd-bar { height: 6px; background: var(--surface-2); border-radius: 3px; overflow: hidden; }
.ame-lbd-bar i { display: block; height: 100%; background: var(--accent); }
.ame-lwho { display: flex; flex-direction: column; border: 1px solid var(--line); border-radius: 6px; max-height: 240px; overflow-y: auto; }
.ame-lwho > div { display: flex; justify-content: space-between; gap: 12px; padding: 8px 12px; border-bottom: 1px solid var(--line); font-size: 14px; }
.ame-lwho > div:last-child { border-bottom: 0; }
.ame-lwho > div.is-dim { opacity: .55; }
.ame-ldprev { display: grid; grid-template-columns: 280px minmax(0, 1fr); gap: 18px; align-items: start; }
.ame-ldprev-f { display: flex; flex-direction: column; gap: 10px; }
.ame-ldphoto { display: flex; gap: 14px; align-items: center; flex-wrap: wrap; }
.ame-ogcard { border-radius: 14px; overflow: hidden; background: #e9e9eb; color: #1c1c1e; font-family: -apple-system, system-ui, sans-serif; }
.ame-ogimg { aspect-ratio: 16 / 9; background: #d1d1d6; }
.ame-ogimg img { width: 100%; height: 100%; object-fit: cover; display: block; }
.ame-ogtxt { padding: 9px 12px 10px; display: flex; flex-direction: column; gap: 1px; }
.ame-ogtxt strong { font-size: 13px; line-height: 1.3; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.ame-ogtxt span { font-size: 12px; color: #3c3c43; line-height: 1.3; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.ame-ogtxt small { font-size: 11px; color: #8e8e93; margin-top: 2px; }
.ame-ldqr { display: flex; gap: 18px; align-items: center; }
.ame-ldqr canvas { width: 140px; height: 140px; border-radius: 6px; image-rendering: pixelated; }
@media (max-width: 720px) {
	.ame-lnew-row, .ame-ldprev, .ame-lbds { grid-template-columns: 1fr; }
	.ame-share-url { flex-wrap: wrap; }
}
.ame-share-make { display: flex; flex-direction: column; gap: 6px; }
.ame-field-lbl { font-size: 13px; font-weight: 600; }
.ame-share-url > .ame-input[readonly] { flex: 1 1 320px; font-family: ui-monospace, SFMono-Regular, Menlo, monospace; font-size: 13px; }

/* 1.21 — menu icons and groups */
.ame .ame-nav-link { display: flex; align-items: center; gap: 11px; font-size: 14px; color: #c9c4ba; white-space: nowrap; }
.ame .ame-nav-link > span { overflow: hidden; text-overflow: ellipsis; }
.ame-nav-ic { flex: none; color: var(--muted); }
.ame .ame-nav-link:hover .ame-nav-ic { color: var(--text); }
.ame .ame-nav-link.is-active .ame-nav-ic { color: var(--accent); }
.ame-nav-label { margin-top: 14px; padding: 0 12px 6px; color: var(--faint); }
.ame-nav-logo + .ame-nav-label { margin-top: 0; }
[data-ame-theme="light"] .ame .ame-nav-link { color: var(--muted); }
@media (max-width: 860px) {
	.ame .ame-nav-link { gap: 8px; padding: 8px 10px; }
}
.ame-slug.is-editing { outline: 2px solid var(--accent); outline-offset: 0; border-color: transparent; }
.ame-saved { align-self: center; color: var(--ok); font-size: 13px; white-space: nowrap; }

/* 1.22 — campaign covers (promotional photo) */
.ame .ame-camp { overflow: hidden; }
.ame-camp-cover { display: block; margin: -20px -20px 6px; aspect-ratio: 16 / 9; background: var(--surface-2); border-bottom: 1px solid var(--line); overflow: hidden; }
.ame-camp-cover img { width: 100%; height: 100%; object-fit: cover; display: block; transition: transform .3s ease; }
.ame .ame-camp:hover .ame-camp-cover img { transform: scale(1.03); }
.ame-camp-cover.is-empty { display: flex; align-items: center; justify-content: center; background: radial-gradient(420px 140px at 85% 0%, rgba(240, 86, 113, .16), transparent 70%), var(--surface-2); }
.ame-camp-cover.is-empty .ame-camp-cover-logo { width: 46px; height: 46px; object-fit: contain; background: #fff; border-radius: 10px; padding: 4px; opacity: .9; transform: none; }

/* 1.22.2 — phone menu folds into a hamburger (same layout when opened) */
.ame-nav-toggle { display: none; }
@media (max-width: 760px) {
	.ame-nav { position: relative; }
	.ame-nav-toggle { display: inline-flex; align-items: center; justify-content: center; position: absolute; top: 14px; right: 16px; width: 44px; height: 44px; border-radius: 8px; border: 1px solid var(--line-2); background: var(--surface-2); color: var(--text); cursor: pointer; }
	.ame-nav-toggle .i-close, .ame-nav.is-open .ame-nav-toggle .i-open { display: none; }
	.ame-nav.is-open .ame-nav-toggle .i-close { display: block; }
	.ame-nav:not(.is-open) > :not(.ame-nav-logo):not(.ame-nav-toggle) { display: none; }
	.ame-nav.is-open { padding-right: 72px; }
	.ame-nav-logo img { height: 40px; }
}

/* 1.23 — permissions dialog */
.ame-pm-sw { display: flex; gap: 12px; align-items: flex-start; border: 1px solid var(--line); border-radius: 8px; padding: 12px; cursor: pointer; }
.ame-pm-sw input { width: 18px; height: 18px; margin-top: 2px; accent-color: var(--accent); flex: none; }
.ame-pm-sw small { display: block; color: var(--muted); font-size: 12px; }
.ame-pm-sw.is-beta { border-color: rgba(242, 196, 126, .35); }
[data-pm-staff], [data-pm-pick] { display: flex; flex-direction: column; gap: 12px; }
[data-pm-staff][hidden], [data-pm-pick][hidden] { display: none; }
.ame-pm-lbl { font-size: 11px; font-weight: 600; color: var(--muted); text-transform: uppercase; letter-spacing: .12em; }
.ame-pm-pages { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 6px 20px; }
.ame-pm-row { display: flex; align-items: center; justify-content: space-between; gap: 10px; padding: 4px 0; }
.ame-pm-row label { display: flex; gap: 8px; align-items: center; cursor: pointer; }
.ame-pm-row input, .ame-pm-chip input { accent-color: var(--accent); width: 16px; height: 16px; }
.ame-pm-seg { display: inline-flex; border: 1px solid var(--line-2); border-radius: 6px; overflow: hidden; flex: none; }
.ame-pm-seg button { font: inherit; font-size: 12px; background: none; border: 0; color: var(--muted); padding: 4px 10px; cursor: pointer; }
.ame-pm-seg button.on { background: var(--accent); color: var(--accent-ink); font-weight: 600; }
.ame-pm-cl { display: flex; gap: 6px; flex-wrap: wrap; }
.ame-pm-chip { display: inline-flex; gap: 6px; align-items: center; border: 1px solid var(--line-2); border-radius: 999px; padding: 4px 12px 4px 8px; font-size: 13px; cursor: pointer; }
.ame-pm-chip:has(input:checked) { border-color: var(--accent); background: rgba(240, 86, 113, .12); }
@media (max-width: 640px) { .ame-pm-pages { grid-template-columns: 1fr; } }
.ame-ro-note { border: 1px solid rgba(242, 196, 126, .45); background: var(--warn-bg); color: var(--warn); border-radius: 6px; padding: 9px 14px; font-size: 13px; }
.ame-ro .ame-main input:not([type=search]):not(#ame-share-slug):not([readonly]), .ame-ro .ame-main select:not(.ame-fsel), .ame-ro .ame-main textarea { pointer-events: none; opacity: .75; }
.ame-ro .ame-main [data-remove-entry], .ame-ro .ame-main [data-new-campaign], .ame-ro .ame-main [data-add-creator], .ame-ro .ame-main button[type=submit] { display: none !important; }
/* 1.23.1 — CRM sync */
.ame-sync { border: 1px solid var(--line); border-radius: 8px; padding: 14px; display: flex; flex-direction: column; gap: 12px; background: var(--bg); }
.ame-sync[hidden] { display: none; }
.ame-sync-head { display: flex; justify-content: space-between; gap: 16px; align-items: flex-start; flex-wrap: wrap; }
.ame-sync-head p { max-width: 640px; }
.ame-sync-nums { display: flex; gap: 32px; flex-wrap: wrap; }
.ame-sync-nums div { display: flex; flex-direction: column; }
.ame-sync-nums b { font-size: 22px; font-variant-numeric: tabular-nums; }
.ame-sync-nums span { font-size: 12px; color: var(--muted); }
.ame-sync .pgw { display: flex; flex-direction: column; gap: 6px; }
.ame-sync .pgw[hidden] { display: none; }
.ame-sync .pg { height: 6px; background: var(--surface-2); border-radius: 3px; overflow: hidden; }
.ame-sync .pg i { display: block; height: 100%; background: var(--accent); transition: width .3s; }

/* 1.24 — Beta tag and the "Needs attention" panel */
.ame-beta { display: inline-block; font: 700 10px/1.6 Inter, system-ui, sans-serif; letter-spacing: .14em; text-transform: uppercase; color: var(--warn); background: var(--warn-bg); border-radius: 4px; padding: 1px 6px; vertical-align: middle; margin-left: 6px; }
.ame-title .ame-beta { font-size: 11px; vertical-align: 8px; }
.ame-alerts { border-color: rgba(240, 86, 113, .45); margin-bottom: 18px; }
.ame-alerts-head { display: flex; justify-content: space-between; align-items: baseline; gap: 12px; flex-wrap: wrap; }
.ame-alerts-head .ame-h3 { margin: 0; }
.ame-alerts-list { list-style: none; margin: 10px 0 0; padding: 0; display: flex; flex-direction: column; }
.ame-alerts-list li { display: flex; gap: 12px; align-items: center; padding: 10px 0; border-top: 1px solid var(--line); font-size: 14px; flex-wrap: wrap; }
.ame-alerts-list li:first-child { border-top: 0; }
.ame-alert-dot { width: 8px; height: 8px; border-radius: 50%; background: var(--accent); flex: none; }
.ame-alerts-list li.is-warn .ame-alert-dot { background: var(--warn); }
