*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

body {
  display: flex;
  height: 100vh;
  font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
  font-size: 14px;
  background: #f0f0f0;
  color: #1a1a1a;
}

.auth-page {
  min-height: 100vh;
  height: auto;
  display: grid;
  place-items: center;
  padding: 24px;
  background:
    radial-gradient(circle at top left, rgba(36, 119, 255, 0.14), transparent 36%),
    #f2f4f8;
  color: #252635;
}

.auth-card {
  width: min(100%, 430px);
  padding: 36px;
  border: 1px solid #dfe4ed;
  border-radius: 20px;
  background: #fff;
  box-shadow: 0 18px 55px rgba(27, 34, 58, 0.12);
  text-align: center;
}

.auth-brand-lockup {
  min-height: 82px;
  display: grid;
  grid-template-columns: minmax(0, 1fr) 1px minmax(0, 1fr);
  align-items: center;
  gap: 18px;
  margin-bottom: 14px;
}

.auth-logo-frame {
  min-width: 0;
  display: grid;
  place-items: center;
}

.auth-logo-frame img {
  max-width: 100%;
  max-height: 72px;
}

.auth-brand-divider {
  width: 1px;
  height: 54px;
  background: #dfe4ed;
}

.auth-partner-logo {
  width: 64px;
  height: 64px;
  justify-self: center;
  object-fit: contain;
}

.auth-app-name {
  color: #7250a4;
  font-size: 13px;
  font-weight: 800;
  letter-spacing: 0.04em;
}

.auth-card h1 {
  margin: 14px 0 8px;
  font-size: 28px;
}

.auth-card p {
  color: #646978;
  line-height: 1.5;
}

.auth-actions {
  display: grid;
  gap: 12px;
  margin: 28px 0 22px;
}

.auth-button {
  min-height: 48px;
  display: flex;
  align-items: center;
  justify-content: center;
  border: 1px solid #d7dce5;
  border-radius: 10px;
  color: #252635;
  background: #fff;
  font-weight: 750;
  text-decoration: none;
}

.auth-button:hover,
.auth-button:focus-visible {
  border-color: #2477ff;
  box-shadow: 0 0 0 3px rgba(36, 119, 255, 0.12);
}

.auth-button--microsoft {
  background: #202124;
  border-color: #202124;
  color: #fff;
}

.auth-configuration-warning {
  padding: 12px;
  border-radius: 8px;
  background: #fff3cd;
  color: #725b00 !important;
}

.auth-dive-logo {
  max-width: 74px;
  margin-bottom: 10px;
}

.auth-secondary-link {
  display: inline-block;
  margin-top: 24px;
  color: #1766d6;
  font-weight: 700;
}

.authenticated-user {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  color: #bcc3d5;
  font-size: 11px;
}

.authenticated-user span {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.authenticated-user a {
  flex: none;
  color: #d8a8f4;
}

#mobile-menu-toggle,
#mobile-sidebar-backdrop {
  display: none;
}

.inventory-scorecards {
  position: absolute;
  top: 18px;
  right: 24px;
  z-index: 5;
  display: flex;
  gap: 10px;
}

.inventory-scorecard {
  display: grid;
  grid-template-columns: 1fr;
  align-items: center;
  gap: 5px;
  min-width: 138px;
  padding: 8px 12px 9px;
  border: 1px solid #dfe3e8;
  border-radius: 10px;
  background: rgba(255, 255, 255, 0.96);
  box-shadow: 0 2px 8px rgba(31, 41, 55, 0.06);
}

.inventory-scorecard > span {
  color: #6b7280;
  font-size: 10px;
  font-weight: 700;
  letter-spacing: .06em;
  line-height: 1.25;
  text-align: center;
  text-transform: uppercase;
}

.inventory-scorecard > strong {
  color: #173c32;
  font-size: 22px;
  line-height: 1;
  text-align: center;
}

/* ── Sidebar ── */

#sidebar {
  width: 300px;
  min-width: 300px;
  background: #1e1e2e;
  color: #cdd6f4;
  display: flex;
  flex-direction: column;
  overflow: hidden;
}

#sidebar-resizer {
  position: relative;
  z-index: 20;
  flex: 0 0 6px;
  width: 6px;
  outline: none;
  background: #d4d4d8;
  cursor: col-resize;
  transition: background 120ms ease;
}

#sidebar-resizer:hover,
#sidebar-resizer:focus,
.is-resizing-sidebar #sidebar-resizer {
  background: #93c5fd;
}

.is-resizing-sidebar,
.is-resizing-sidebar * {
  cursor: col-resize !important;
  user-select: none !important;
}

.sidebar-header {
  padding: 14px 16px 13px;
  border-bottom: 1px solid #313244;
  flex-shrink: 0;
}

.client-logo-frame {
  display: flex;
  align-items: center;
  justify-content: center;
  height: 48px;
  padding: 9px 14px;
  border-radius: 9px;
  background: rgba(255, 255, 255, 0.96);
  text-decoration: none;
}

.client-logo-frame img {
  display: block;
  width: 100%;
  max-width: 190px;
  max-height: 30px;
}

.app-name {
  margin-top: 10px;
  color: #cba6f7;
  font-size: 13px;
  font-weight: 700;
  letter-spacing: 0.5px;
}

.platform-switcher {
  display: flex;
  gap: 6px;
  margin-top: 8px;
}

.platform-tab {
  display: flex;
  flex: 1 1 0;
  align-items: center;
  justify-content: space-between;
  gap: 5.5px;
  min-width: 0;
  padding: 8px 9px;
  border: 1px solid #45475a;
  border-radius: 8px;
  background: #27273a;
  color: #a6adc8;
  font: inherit;
  font-size: 11px;
  font-weight: 700;
  cursor: pointer;
}

.platform-tab:hover {
  background: #313244;
  color: #cdd6f4;
}

.platform-tab.is-active {
  border-color: #89b4fa;
  background: #394563;
  color: white;
  box-shadow: 0 0 0 2px rgba(137, 180, 250, 0.12);
}

.platform-tab-label {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.platform-tab-count {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 21px;
  padding: 2px 5px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.11);
  color: inherit;
  font-size: 9px;
}

.tree-search-wrap {
  position: relative;
  display: block;
  margin-top: 12px;
}

.inmobiliaria-filter-wrap {
  display: grid;
  gap: 5px;
  margin-top: 14px;
  color: #68736f;
  font-size: 11px;
  font-weight: 700;
  letter-spacing: .06em;
  text-transform: uppercase;
}

.inmobiliaria-filter-wrap[hidden] {
  display: none;
}

#inmobiliaria-filter {
  width: 100%;
  border: 1px solid #d7dfdc;
  border-radius: 8px;
  background: #fff;
  padding: 8px 10px;
  color: #173c32;
  font: inherit;
  font-size: 13px;
  letter-spacing: normal;
  text-transform: none;
}

.tree-search-icon {
  position: absolute;
  top: 50%;
  left: 10px;
  color: #7f849c;
  font-size: 17px;
  transform: translateY(-54%);
  pointer-events: none;
}

#tree-search {
  width: 100%;
  padding: 8px 10px 8px 30px;
  border: 1px solid #45475a;
  border-radius: 8px;
  outline: none;
  background: #181825;
  color: #cdd6f4;
  font: inherit;
  font-size: 11px;
}

#tree-search::placeholder {
  color: #6c7086;
}

#tree-search:focus {
  border-color: #89b4fa;
  box-shadow: 0 0 0 2px rgba(137, 180, 250, 0.12);
}

.campaign-header,
.adset-header {
  display: flex;
  align-items: center;
  gap: 7px;
}

.campaign-header .campaign-display,
.adset-header-name {
  min-width: 0;
  flex: 1 1 auto;
}

.campaign-ad-count,
.adset-ad-count {
  flex: 0 0 auto;
}

.inventory-review {
  flex-shrink: 0;
  padding: 10px 14px;
  border-top: 1px solid #313244;
  color: #a6adc8;
  font-size: 9px;
}

.inventory-review[hidden],
.inventory-review-row[hidden] {
  display: none;
}

.inventory-review-title {
  display: block;
  margin-bottom: 5px;
  color: #7f849c;
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
}

.inventory-review-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  line-height: 1.5;
}

.inventory-review-row strong {
  color: #cdd6f4;
  font-weight: 600;
}

.inventory-review-row time {
  white-space: nowrap;
}

.page-partners {
  position: fixed;
  right: 16px;
  bottom: 14px;
  z-index: 30;
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 8px;
}

.partner-badge {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 5px;
  background: #fff;
  line-height: 0;
  transition: transform 120ms ease, box-shadow 120ms ease;
}

.partner-badge[href]:hover,
.partner-badge[href]:focus-visible {
  transform: translateY(-1px);
  box-shadow: 0 3px 10px rgba(0, 0, 0, 0.28);
}

.partner-badge[href]:focus-visible {
  outline: 2px solid #89b4fa;
  outline-offset: 2px;
}

.partner-badge-google img {
  display: block;
  width: auto;
  height: 46px;
}

.partner-badge-meta img {
  display: block;
  width: auto;
  height: 46px;
}

.sidebar-signature {
  display: flex;
  flex-shrink: 0;
  align-items: center;
  justify-content: flex-end;
  gap: 5px;
  min-height: 42px;
  padding: 7px 14px;
  border-top: 1px solid #313244;
  color: #7f849c;
  font-size: 9px;
  letter-spacing: 0.25px;
  text-transform: uppercase;
}

.sidebar-signature img {
  display: block;
  width: 30px;
  height: 30px;
  opacity: 0.72;
}

.app-version {
  margin-right: auto;
  color: #585b70;
  font-size: 8px;
  letter-spacing: 0;
  text-transform: none;
}

#tree {
  flex: 1;
  overflow-y: auto;
  padding: 6px 0 16px;
  scrollbar-width: thin;
  scrollbar-color: #45475a transparent;
}

/* ── Tree nodes ── */

.tree-empty {
  padding: 18px 16px;
  color: #7f849c;
  font-size: 12px;
  line-height: 1.45;
}

.search-platform-heading {
  position: sticky;
  z-index: 2;
  top: 0;
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin: 8px 8px 3px;
  padding: 7px 9px;
  border: 1px solid #45475a;
  border-radius: 7px;
  background: #313244;
  color: #cdd6f4;
  font-size: 10px;
  font-weight: 800;
  letter-spacing: 0.7px;
  text-transform: uppercase;
}

.search-platform-count {
  min-width: 21px;
  padding: 2px 5px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.1);
  text-align: center;
  font-size: 9px;
}

.result-platform-badge {
  display: inline-flex;
  align-items: center;
  margin-right: 6px;
  padding: 2px 5px;
  border-radius: 4px;
  color: white;
  font-size: 8px;
  font-weight: 800;
  letter-spacing: 0.3px;
  text-transform: uppercase;
  vertical-align: 1px;
}

.result-platform-badge--meta {
  background: #7c3aed;
}

.result-platform-badge--google_ads {
  background: #1a73e8;
}

.owner-header,
.project-header,
.campaign-header,
.adset-header,
.ad-item {
  padding: 5px 12px;
  cursor: pointer;
  user-select: none;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  transition: background 0.1s;
}

.owner-header,
.project-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
}

.owner-header {
  margin: 10px 8px 3px;
  padding: 8px 9px;
  border: 1px solid #45475a;
  border-radius: 7px;
  background: #29293d;
  color: #f5c2e7;
  font-size: 10px;
  font-weight: 800;
  letter-spacing: 0.65px;
  text-transform: uppercase;
}

.owner-header:hover {
  background: #313244;
}

.project-header {
  padding: 7px 12px 7px 18px;
  color: #89b4fa;
  font-size: 12px;
  font-weight: 700;
}

.project-header:hover {
  background: #313244;
}

.owner-name,
.project-name {
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.tree-node-count {
  min-width: 21px;
  padding: 2px 5px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.1);
  color: inherit;
  font-size: 9px;
  text-align: center;
  white-space: nowrap;
}

.campaign-header {
  display: flex;
  align-items: center;
  gap: 7px;
  margin-top: 3px;
  padding-left: 30px;
  color: #cba6f7;
  font-size: 10px;
  font-weight: 650;
  text-transform: uppercase;
  letter-spacing: 0.65px;
}
.campaign-header:hover { background: #313244; }

.campaign-platform-badge {
  display: inline-flex;
  flex: 0 0 auto;
  align-items: center;
  justify-content: center;
  padding: 3px 7.5px;
  border-radius: 999px;
  color: white;
  font-size: 8px;
  font-weight: 800;
  letter-spacing: 0.45px;
  line-height: 1.2;
  text-transform: uppercase;
}

.campaign-platform-badge--meta {
  background: linear-gradient(135deg, #8b5cf6, #d946ef);
}

.campaign-platform-badge--google_ads {
  background: linear-gradient(135deg, #1a73e8, #16a765);
}

.campaign-display-name {
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.ad-hierarchy-item > strong.campaign-display {
  display: inline-flex;
  align-items: center;
  gap: 7px;
}

.adset-header {
  color: #89b4fa;
  font-weight: 500;
  padding-left: 42px;
}
.adset-header:hover { background: #313244; }

.ad-item {
  color: #a6adc8;
  padding-left: 56px;
  font-size: 12px;
}
.ad-item:hover  { background: #313244; color: #cdd6f4; }
.ad-item.active { background: #45475a; color: #cdd6f4; }

/* Collapse */
.campaign-children,
.adset-children,
.owner-children,
.project-children { overflow: hidden; }

.collapsed > .campaign-children,
.collapsed > .adset-children,
.collapsed > .owner-children,
.collapsed > .project-children { display: none; }

/* ── Content ── */

#content {
  position: relative;
  flex: 1;
  overflow-y: auto;
  padding: 18px 40px 36px;
}

#placeholder {
  max-width: 680px;
  margin: 140px auto 0;
  color: #5f6368;
  text-align: center;
}

#placeholder h1 {
  margin: 0 0 14px;
  color: #202124;
  font-size: 28px;
  line-height: 1.2;
}

#placeholder p {
  margin: 0 auto 18px;
  font-size: 16px;
  line-height: 1.6;
}

#placeholder small {
  color: #7a7f87;
  font-size: 13px;
  font-weight: 600;
}

#panel-header {
  margin-right: 310px;
  margin-bottom: 28px;
}

#breadcrumb {
  color: #555;
}

.ad-hierarchy {
  display: flex;
  align-items: flex-start;
  flex-wrap: wrap;
  gap: 8px 12px;
}

.ad-hierarchy-item {
  display: grid;
  gap: 3px;
  min-width: 0;
}

.ad-hierarchy-item > span {
  color: #888;
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.ad-hierarchy-item > strong {
  max-width: 360px;
  overflow: hidden;
  font-size: 13px;
  font-weight: 600;
  line-height: 1.35;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.campaign-goal {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  width: fit-content;
  margin-top: 2px;
  padding: 3px 7px;
  border: 1px solid #d8dde7;
  border-radius: 999px;
  background: #fff;
  color: #5f6368;
  font-size: 10px;
  font-style: normal;
  line-height: 1.2;
}

.campaign-goal[hidden] {
  display: none;
}

.campaign-goal > span {
  display: inline-flex;
  align-items: center;
  font-weight: 700;
  line-height: 1;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}

.campaign-goal > strong {
  display: inline-flex;
  align-items: center;
  color: #202124;
  font-size: 10px;
  font-weight: 700;
  line-height: 1;
}

.ad-hierarchy-item--ad {
  flex: 1 1 280px;
}

.ad-hierarchy-item[hidden],
.ad-hierarchy-separator[hidden] {
  display: none;
}

.ad-hierarchy-item--ad > strong {
  max-width: none;
  color: #222;
  font-size: 13px;
  font-weight: 700;
  line-height: 1.35;
}

.ad-reference {
  display: flex;
  align-items: center;
  gap: 6px;
  min-width: 0;
  color: #7a7f87;
  font-size: 10px;
  line-height: 1.3;
}

.ad-reference > span {
  font-weight: 700;
}

.ad-reference code {
  overflow: hidden;
  color: #555;
  font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  font-size: 10px;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.ad-reference button {
  flex: 0 0 auto;
  padding: 2px 6px;
  border: 1px solid #d4d8de;
  border-radius: 5px;
  background: #fff;
  color: #5f6368;
  font: inherit;
  font-size: 9px;
  font-weight: 700;
  cursor: pointer;
}

.ad-reference button:hover {
  border-color: #aeb4bd;
  color: #202124;
}

.ad-hierarchy-separator {
  margin-top: 17px;
  color: #aaa;
  font-size: 14px;
}

/* ── Preview cards ── */

#previews {
  display: block;
}

.placement-viewer {
  width: min(920px, 100%);
}

.placement-toolbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  padding-bottom: 14px;
  border-bottom: 1px solid #d8d8d8;
}

.placement-select {
  min-width: 210px;
  padding: 10px 38px 10px 46px;
  border: 2px solid #2563eb;
  border-radius: 8px;
  background: white;
  color: #222;
  font: inherit;
  font-weight: 600;
  cursor: pointer;
  box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.12);
}

.placement-selector-wrap {
  position: relative;
  display: inline-flex;
}

.platform-icon.placement-selector-icon {
  position: absolute;
  z-index: 1;
  top: 50%;
  left: 12px;
  transform: translateY(-50%);
  pointer-events: none;
}

.placement-navigation {
  display: flex;
  align-items: center;
  gap: 8px;
}

.placement-counter {
  margin-right: 4px;
  color: #666;
  font-size: 12px;
}

.placement-arrow {
  width: 38px;
  height: 38px;
  border: 0;
  border-radius: 8px;
  background: #e5e7eb;
  color: #333;
  font-size: 25px;
  line-height: 1;
  cursor: pointer;
}

.placement-arrow:hover:not(:disabled) {
  background: #d1d5db;
}

.placement-arrow:disabled {
  color: #aaa;
  cursor: default;
  opacity: 0.55;
}

.placement-stage {
  display: flex;
  justify-content: flex-start;
  align-items: flex-start;
  min-height: 240px;
  padding-top: 24px;
}

.placement-presentation {
  display: flex;
  align-items: flex-start;
  justify-content: center;
  gap: 24px;
  width: 100%;
}

.phone-shell {
  position: relative;
  flex: 0 0 auto;
  width: 360px;
  height: 683px;
  padding: 25px 10px 12px;
  border-radius: 37px;
  background: #171717;
  box-shadow: 0 12px 30px rgba(0, 0, 0, 0.18);
}

.phone-shell::before {
  content: '';
  position: absolute;
  top: 10px;
  left: 50%;
  width: 67px;
  height: 6px;
  border-radius: 999px;
  background: #555;
  transform: translateX(-50%);
}

.phone-shell .official-preview-card,
.phone-shell .preview-card {
  width: 340px;
  height: 646px;
  border: 0;
  border-radius: 20px;
  box-shadow: none;
}

.phone-shell .preview-image-frame {
  height: 646px;
  aspect-ratio: auto !important;
}

.creative-loading,
.creative-error {
  padding: 16px 18px;
  border-radius: 10px;
  background: white;
  color: #777;
}

.google-creative-loading {
  display: inline-flex;
  align-items: center;
  gap: 10px;
}

.meta-creative-loading {
  display: inline-flex;
  align-items: center;
  gap: 10px;
}

.creative-error {
  color: #9f3a38;
}

.official-preview-card {
  --placement-accent: #7c3aed;
  --placement-bg: #f5f3ff;
  --placement-text: #4c1d95;
  width: min(274px, 100%);
  overflow: hidden;
  border-radius: 12px;
  border: 0;
  background: var(--placement-bg);
  box-shadow: 0 2px 10px rgba(0, 0, 0, 0.08);
}

.official-preview-frame {
  position: relative;
  max-width: 100%;
  margin: 0 auto;
  overflow: hidden;
  background: white;
}

.official-preview-frame iframe {
  position: absolute;
  z-index: 2;
  inset: 0 auto auto 0;
  display: block;
  width: 100%;
  height: 100%;
  border: 0;
  opacity: 0;
  transition: opacity 180ms ease;
}

.official-preview-frame iframe.is-loaded {
  opacity: 1;
}

.official-preview-frame--phone iframe {
  max-width: none;
}

.official-preview-placeholder {
  position: absolute;
  z-index: 1;
  inset: 0;
  width: 100%;
  height: 100%;
  background: white;
  opacity: 1;
  transition: opacity 180ms ease;
}

.official-preview-placeholder.is-hidden {
  opacity: 0;
  pointer-events: none;
}

.official-preview-waiting {
  display: flex;
  align-items: center;
  justify-content: center;
  flex-direction: column;
  gap: 10px;
  color: #777;
  font-size: 12px;
}

.official-preview-spinner {
  width: 24px;
  height: 24px;
  border: 3px solid #e5e7eb;
  border-top-color: var(--placement-accent, #64748b);
  border-radius: 50%;
  animation: preview-spin 700ms linear infinite;
}

@keyframes preview-spin {
  to { transform: rotate(360deg); }
}

.card-creative-details {
  display: grid;
  gap: 12px;
  padding: 16px;
  border-top: 1px solid #ececec;
  background: var(--placement-bg, #fafafa);
}

.placement-copy-panel {
  flex: 0 1 380px;
  width: min(380px, 100%);
  border-left: 5px solid var(--placement-accent);
  border-top: 0;
  border-radius: 12px;
  background: var(--placement-bg, white);
  box-shadow: 0 2px 10px rgba(0, 0, 0, 0.08);
}

.placement-copy-panel--reserved {
  visibility: hidden;
}

.copy-placement-label {
  display: flex;
  align-items: center;
  gap: 8px;
  padding-bottom: 11px;
  border-bottom: 1px solid rgba(0, 0, 0, 0.08);
  color: var(--placement-text);
  font-size: 12px;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.7px;
}

.platform-icon {
  position: relative;
  display: inline-flex;
  flex: 0 0 22px;
  align-items: center;
  justify-content: center;
  width: 22px;
  height: 22px;
  color: white;
}

.platform-icon--facebook {
  border-radius: 50%;
  background: #1877f2;
}

.platform-icon--facebook svg {
  display: block;
  width: 20px;
  height: 20px;
  fill: white;
}

.platform-icon--instagram {
  border-radius: 6px;
  background: radial-gradient(circle at 30% 105%, #feda75 0 18%, #fa7e1e 38%, #d62976 62%, #962fbf 82%, #4f5bd5 100%);
}

.platform-icon--google {
  border: 1px solid #dbe5f5;
  border-radius: 50%;
  background: white;
}

.platform-icon--google img {
  display: block;
  width: 18px;
  height: 18px;
}

.instagram-camera {
  position: absolute;
  inset: 4px;
  border: 1.7px solid white;
  border-radius: 5px;
}

.instagram-lens {
  width: 6px;
  height: 6px;
  border: 1.5px solid white;
  border-radius: 50%;
}

.instagram-dot {
  position: absolute;
  top: 6px;
  right: 6px;
  width: 2.5px;
  height: 2.5px;
  border-radius: 50%;
  background: white;
}

.creative-detail {
  min-width: 0;
}

.creative-detail strong {
  display: block;
  margin-bottom: 5px;
  color: #777;
  font-size: 10px;
  text-transform: uppercase;
  letter-spacing: 0.6px;
}

.creative-detail p,
.creative-detail a {
  color: #333;
  line-height: 1.45;
  overflow-wrap: anywhere;
}

.creative-format-badge {
  display: inline-flex;
  padding: 4px 9px;
  border-radius: 999px;
  background: var(--placement-accent, #64748b);
  color: white;
  font-size: 11px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.preview-empty {
  padding: 24px;
  color: #777;
  background: white;
  border-radius: 12px;
}

.preview-card {
  --placement-accent: #64748b;
  --placement-bg: #f8fafc;
  --placement-text: #334155;
  background: var(--placement-bg);
  border: 2px solid var(--placement-accent);
  border-radius: 12px;
  overflow: hidden;
  box-shadow: 0 2px 10px rgba(0, 0, 0, 0.08);
  align-self: flex-start;
  display: flex;
  flex-direction: column;
}

.preview-card--desktop {
  flex: 0 1 440px;
  width: 440px;
  max-width: 100%;
}

.preview-card--mobile {
  flex: 0 0 340px;
  width: 340px;
  max-width: 100%;
}

.preview-image-frame {
  position: relative;
  width: 100%;
  overflow: hidden;
  background: white;
}

.preview-image-frame img {
  position: absolute;
  inset: 0 auto auto 0;
  width: 100%;
  height: auto;
  display: block;
}

.placement--desktop {
  --placement-accent: #2563eb;
  --placement-bg: #eff6ff;
  --placement-text: #1e3a8a;
}

.placement--mobile {
  --placement-accent: #16a34a;
  --placement-bg: #f0fdf4;
  --placement-text: #14532d;
}

.placement--instagram {
  --placement-accent: #db2777;
  --placement-bg: #fdf2f8;
  --placement-text: #831843;
}

.placement--stories {
  --placement-accent: #c026d3;
  --placement-bg: #fdf4ff;
  --placement-text: #86198f;
}

.placement--reels {
  --placement-accent: #7c3aed;
  --placement-bg: #f5f3ff;
  --placement-text: #4c1d95;
}

.placement--default {
  --placement-accent: #64748b;
  --placement-bg: #f8fafc;
  --placement-text: #334155;
}

.placement--google {
  --placement-accent: #1a73e8;
  --placement-bg: #f4f8ff;
  --placement-text: #174ea6;
}

/* ── Google Search previews ── */

.google-search-viewer {
  width: min(1120px, 100%);
}

.google-placement-select {
  border-color: #1a73e8;
  box-shadow: 0 0 0 3px rgba(26, 115, 232, 0.12);
}

.google-search-stage {
  min-height: 600px;
}

.google-search-presentation {
  flex-wrap: wrap;
  justify-content: flex-start;
}

.google-search-browser {
  flex: 0 0 auto;
  overflow: hidden;
  background: white;
  color: #202124;
  font-family: Arial, sans-serif;
}

.google-search-browser--desktop {
  width: 640px;
  height: 520px;
  border: 5px solid #c9cacc;
  border-radius: 15px;
}

.google-search-browser--mobile {
  width: 340px;
  height: 646px;
  border-radius: 20px;
}

.google-phone-shell {
  height: 683px;
}

.google-search-header {
  display: grid;
  grid-template-columns: auto 1fr auto;
  align-items: center;
  gap: 22px;
  padding: 18px 20px 14px;
}

.google-wordmark {
  display: block;
  width: 78px;
  height: auto;
}

.google-search-box {
  height: 34px;
  border: 1px solid #dfe1e5;
  border-radius: 20px;
  background: white;
  box-shadow: 0 1px 3px rgba(60, 64, 67, 0.2);
}

.google-avatar {
  width: 24px;
  height: 24px;
  border-radius: 50%;
  background: #e8eaed;
}

.google-menu-icon {
  display: none;
  width: 20px;
  height: 16px;
  background: repeating-linear-gradient(
    to bottom,
    #202124 0 2px,
    transparent 2px 7px
  );
}

.google-search-tabs {
  display: flex;
  gap: 4px;
  padding: 0 22px;
  border-bottom: 1px solid #dadce0;
}

.google-search-tabs span {
  width: 42px;
  height: 12px;
  border-bottom: 2px solid transparent;
  background: linear-gradient(#e8eaed, #e8eaed) center 2px / 34px 5px no-repeat;
}

.google-search-tabs span.is-active {
  border-bottom-color: #1a73e8;
}

.google-search-result {
  width: min(500px, calc(100% - 40px));
  padding: 18px 0 12px;
  margin: 0 22px;
}

.google-result-identity {
  display: flex;
  align-items: center;
  gap: 7px;
  min-width: 0;
  margin-bottom: 7px;
}

.google-advertiser-icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 22px;
  height: 22px;
  border-radius: 50%;
  background: #08a64a;
  color: white;
  font-size: 11px;
  font-weight: 700;
}

.google-result-identity .google-search-advertiser-logo {
  flex: 0 0 22px;
  width: 22px;
  height: 22px;
  border-radius: 50%;
  background: white;
  object-fit: contain;
}

.google-result-identity-copy {
  display: grid;
  min-width: 0;
  line-height: 1.25;
}

.google-result-domain {
  overflow: hidden;
  color: #202124;
  font-size: 12px;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.google-result-url {
  overflow: hidden;
  color: #3c4043;
  font-size: 9px;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.google-sponsored {
  display: block;
  margin: 5px 0 2px 29px;
  color: #5f6368;
  font-size: 10px;
  font-weight: 600;
}

.google-result-headline {
  color: #1a0dab;
  font-size: 20px;
  line-height: 1.25;
}

.google-result-description {
  margin-top: 5px;
  color: #4d5156;
  font-size: 13px;
  line-height: 1.45;
}

.google-search-callouts,
.google-search-snippet {
  margin-top: 5px;
  color: #4d5156;
  font-size: 12px;
  line-height: 1.4;
}

.google-search-snippet strong {
  color: #3c4043;
}

.google-search-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 7px;
  margin-top: 10px;
}

.google-search-asset-button {
  display: inline-flex;
  align-items: center;
  min-height: 29px;
  padding: 5px 12px;
  border: 1px solid #dadce0;
  border-radius: 16px;
  background: #fff;
  color: #0655cf;
  font-size: 11px;
  font-weight: 600;
  line-height: 1;
  white-space: nowrap;
}

.google-search-call-button {
  color: #0b57d0;
}

.google-search-browser--desktop .google-search-actions {
  gap: 0;
}

.google-search-browser--desktop .google-search-asset-button {
  min-height: auto;
  padding: 0;
  border: 0;
  border-radius: 0;
  font-size: 12px;
}

.google-search-browser--desktop .google-search-asset-button:not(:last-child)::after {
  content: " · ";
  padding: 0 5px;
  color: #4d5156;
  font-weight: 400;
}

.google-assets-disclaimer {
  margin: 4px 0 0;
  padding: 9px 10px;
  border-radius: 7px;
  background: rgba(26, 115, 232, 0.08);
  color: #4d5156;
  font-size: 11px;
  line-height: 1.4;
}

.google-assets-disclaimer-row {
  flex: 0 0 100%;
  width: 100%;
}

.google-assets-disclaimer--standalone {
  width: fit-content;
  max-width: min(720px, 100%);
  margin: 0;
  border: 1px solid rgba(26, 115, 232, 0.14);
  background: #eef5ff;
}

.google-results-skeleton {
  display: grid;
  gap: 20px;
  padding: 4px 22px 24px;
}

.google-skeleton-result {
  display: grid;
  grid-template-columns: 18px 1fr;
  gap: 5px 8px;
  width: min(480px, 78%);
}

.google-skeleton-result i {
  grid-row: 1 / 4;
  width: 18px;
  height: 18px;
  border-radius: 50%;
  background: #e4e6e8;
}

.google-skeleton-result span {
  height: 7px;
  background: #e4e6e8;
}

.google-skeleton-result span:nth-of-type(1) { width: 38%; }
.google-skeleton-result span:nth-of-type(2) { width: 72%; }
.google-skeleton-result span:nth-of-type(3) { width: 56%; }

.google-search-presentation .placement-copy-panel {
  max-height: 620px;
  overflow-y: auto;
}

/* ── Google Performance Max previews ── */

.google-pmax-viewer {
  width: min(1120px, 100%);
}

.pmax-toolbar-controls {
  display: flex;
  align-items: center;
  gap: 10px;
}

.pmax-device-selector-wrap {
  position: relative;
  display: inline-flex;
  align-items: center;
}

.pmax-device-icon {
  position: absolute;
  z-index: 1;
  left: 13px;
  color: #5f6368;
  font-size: 22px;
  line-height: 1;
  pointer-events: none;
}

.pmax-device-select {
  min-width: 145px;
  padding: 11px 34px 11px 42px;
  border: 1px solid #dadce0;
  border-radius: 8px;
  background: #f8f9fa;
  color: #3c4043;
  font: inherit;
  font-weight: 600;
  cursor: pointer;
}

.google-official-preview-link {
  margin-left: auto;
  color: #1a73e8;
  font-size: 12px;
  font-weight: 700;
  text-decoration: none;
}

.google-official-preview-link:hover {
  text-decoration: underline;
}

.google-official-preview-link[aria-disabled="true"] {
  color: #9aa0a6;
  pointer-events: none;
}

.pmax-context-badge,
.pmax-mini-badge {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 999px;
  background: linear-gradient(135deg, #7c3aed, #2563eb);
  color: white;
  font-weight: 800;
  letter-spacing: 0.5px;
  text-transform: uppercase;
}

.pmax-context-badge {
  padding: 6px 10px;
  font-size: 10px;
}

.pmax-mini-badge {
  margin-left: auto;
  padding: 3px 7px;
  font-size: 8px;
}

.google-pmax-stage {
  min-height: 610px;
}

.google-pmax-presentation {
  align-items: flex-start;
  justify-content: flex-start;
}

.pmax-frame {
  position: relative;
  flex: 0 0 auto;
  overflow: hidden;
  border: 1px solid #d2d5da;
  background: white;
  color: #202124;
  font-family: Arial, sans-serif;
  box-shadow: 0 4px 16px rgba(60, 64, 67, 0.1);
}

.pmax-frame h3,
.pmax-frame p {
  margin: 0;
}

.pmax-media {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.pmax-media-placeholder {
  display: grid;
  min-height: 140px;
  place-items: center;
  background: #eef1f4;
  color: #80868b;
  font-size: 12px;
}

.pmax-sponsored {
  color: #5f6368;
  font-size: 11px;
}

.pmax-frame--search {
  width: 620px;
  min-height: 490px;
  border: 5px solid #c9cacc;
  border-radius: 16px;
}

.pmax-search-header {
  display: grid;
  grid-template-columns: auto 1fr;
  align-items: center;
  gap: 24px;
  padding: 22px 24px 18px;
  border-bottom: 1px solid #dadce0;
}

.pmax-search-header .google-avatar {
  display: none;
}

.pmax-search-field {
  height: 36px;
  border: 1px solid #dfe1e5;
  border-radius: 22px;
  box-shadow: 0 1px 3px rgba(60, 64, 67, 0.2);
}

.pmax-search-result {
  display: grid;
  gap: 6px;
  width: min(500px, calc(100% - 60px));
  padding: 28px 0 12px;
  margin: 0 30px;
}

.pmax-search-result .google-result-identity {
  margin-bottom: 1px;
}

.pmax-search-result h3 {
  color: #1a0dab;
  font-size: 20px;
  font-weight: 400;
}

.pmax-search-result p {
  color: #4d5156;
  font-size: 13px;
  line-height: 1.45;
}

.pmax-search-sitelinks {
  display: flex;
  flex-wrap: wrap;
  gap: 7px;
  margin-top: 4px;
}

.pmax-search-sitelinks span {
  padding: 5px 9px;
  border: 1px solid #dadce0;
  border-radius: 999px;
  color: #1a73e8;
  font-size: 11px;
  font-weight: 600;
}

.pmax-frame--search-mobile {
  width: 340px;
  height: 658px;
  min-height: 0;
  border: 0;
  border-radius: 18px;
  box-shadow: none;
}

.pmax-frame--search-mobile .pmax-search-header {
  grid-template-columns: 32px 1fr 32px;
  justify-items: stretch;
  gap: 15px;
  padding: 20px 14px 15px;
}

.pmax-frame--search-mobile .google-menu-icon {
  display: block;
  grid-column: 1;
  justify-self: start;
}

.pmax-frame--search-mobile .google-wordmark {
  grid-column: 2;
  justify-self: center;
}

.pmax-frame--search-mobile .google-avatar {
  display: block;
  grid-column: 3;
  justify-self: end;
}

.pmax-frame--search-mobile .pmax-search-field {
  grid-column: 1 / -1;
  grid-row: 2;
  width: 100%;
  height: 38px;
}

.pmax-frame--search-mobile .pmax-search-result {
  width: auto;
  padding: 18px 0 9px;
  margin: 0 13px;
}

.pmax-frame--search-mobile .pmax-search-result h3 {
  font-size: 18px;
  line-height: 1.25;
}

.pmax-frame--search-mobile .pmax-search-result p {
  display: -webkit-box;
  overflow: hidden;
  font-size: 12px;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 6;
}

.pmax-frame--search-mobile .pmax-search-sitelinks span:nth-child(n + 3) {
  display: none;
}

.pmax-frame--search-mobile .pmax-page-skeleton {
  min-height: 135px;
  margin: 8px 13px;
}

.pmax-page-skeleton {
  min-height: 210px;
  margin: 16px 30px;
  background: repeating-linear-gradient(
    to bottom,
    transparent 0 15px,
    #e7e9ec 15px 22px,
    transparent 22px 31px
  );
  opacity: 0.9;
}

.pmax-frame--display {
  width: 620px;
  height: 470px;
  border: 5px solid #c9cacc;
  border-radius: 16px;
}

.pmax-frame--display-mobile {
  width: 340px;
  height: 658px;
  border: 0;
  border-radius: 18px;
  box-shadow: none;
}

.pmax-frame--display-mobile .pmax-browser-bar {
  padding: 14px;
  font-size: 21px;
}

.pmax-frame--display-mobile .pmax-display-page {
  height: calc(100% - 50px);
  padding: 8px 10px;
}

.pmax-frame--display-mobile .pmax-display-page > .pmax-page-skeleton {
  width: 100%;
  height: 100%;
}

.pmax-frame--display-mobile .pmax-display-card {
  top: 72px;
  right: 12px;
  width: calc(100% - 24px);
}

.pmax-browser-bar {
  padding: 14px 24px;
  border-bottom: 1px solid #e4e7eb;
  color: #5f6368;
  font-family: Georgia, serif;
  font-size: 28px;
  font-style: italic;
  font-weight: 700;
  text-align: center;
}

.pmax-display-page {
  position: relative;
  height: calc(100% - 59px);
  padding: 8px 18px;
}

.pmax-display-page > .pmax-page-skeleton {
  width: 55%;
  height: 88%;
  margin: 8px 0;
  background-color: #f1f3f4;
}

.pmax-display-card {
  position: absolute;
  top: 62px;
  right: 24px;
  width: 238px;
  overflow: hidden;
  border: 1px solid #dadce0;
  background: white;
}

.pmax-display-card > .pmax-media {
  height: 124px;
}

.pmax-display-brand {
  display: flex;
  align-items: center;
  gap: 7px;
  padding: 8px 10px 0;
  color: #5f6368;
  font-size: 9px;
}

.pmax-display-brand .pmax-brand-logo {
  width: 58px;
  height: 22px;
  object-fit: contain;
  object-position: left center;
}

.pmax-display-card h3,
.pmax-display-card > p {
  padding: 7px 10px 0;
}

.pmax-display-card h3 {
  font-size: 15px;
}

.pmax-display-card > p {
  color: #5f6368;
  font-size: 10px;
  line-height: 1.35;
}

.pmax-display-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  padding: 9px 10px 10px;
  color: #5f6368;
  font-size: 9px;
}

.pmax-cta-round {
  display: grid;
  flex: 0 0 28px;
  width: 28px;
  height: 28px;
  border-radius: 50%;
  background: #0f9d58;
  color: white;
  font-size: 23px;
  place-items: center;
}

.pmax-frame--youtube {
  width: 620px;
  min-height: 490px;
  border: 5px solid #c9cacc;
  border-radius: 16px;
}

.pmax-frame--youtube-mobile {
  width: 340px;
  height: 658px;
  min-height: 0;
  border: 0;
  border-radius: 18px;
  box-shadow: none;
}

.pmax-frame--youtube-mobile .pmax-youtube-header {
  padding: 14px 12px;
}

.pmax-frame--youtube-mobile .youtube-wordmark {
  width: 82px;
}

.pmax-frame--youtube-mobile .pmax-youtube-card {
  width: auto;
  margin: 15px 12px 12px;
}

.pmax-frame--youtube-mobile .pmax-youtube-card > .pmax-media {
  height: auto;
  aspect-ratio: 16 / 9;
}

.pmax-frame--youtube-mobile .pmax-video-grid-skeleton {
  height: 180px;
  margin: 12px;
  background-size: 100% 112px;
}

.pmax-youtube-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  min-height: 61px;
  padding: 18px 24px;
  border-bottom: 1px solid #e4e7eb;
}

.youtube-wordmark {
  display: block;
  width: 96px;
  height: auto;
}

.pmax-youtube-controls {
  display: flex;
  align-items: center;
  gap: 14px;
  color: #3c4043;
}

.youtube-control-icon {
  display: block;
  width: 19px;
  height: 19px;
  fill: currentColor;
}

.pmax-youtube-card {
  width: 310px;
  margin: 20px 24px 14px;
}

.pmax-youtube-card > .pmax-media {
  height: 174px;
  border-radius: 6px;
}

.pmax-youtube-cta {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 7px 2px 5px;
  color: #065fd4;
  font-size: 11px;
  font-weight: 700;
}

.pmax-youtube-cta span {
  font-size: 13px;
}

.pmax-youtube-identity {
  display: grid;
  grid-template-columns: 27px minmax(0, 1fr) auto;
  align-items: center;
  gap: 8px;
  padding-top: 7px;
  border-top: 1px solid #e5e5e5;
}

.pmax-youtube-advertiser-logo {
  width: 27px;
  height: 27px;
  border-radius: 50%;
  object-fit: contain;
}

.pmax-youtube-identity-copy {
  min-width: 0;
}

.pmax-youtube-card .pmax-youtube-identity-copy h3 {
  overflow: hidden;
  margin: 0;
  font-size: 12px;
  line-height: 1.2;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.pmax-youtube-identity-copy span {
  display: block;
  overflow: hidden;
  margin-top: 2px;
  color: #60646b;
  font-size: 9px;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.pmax-youtube-more {
  color: #60646b;
  font-size: 18px;
  line-height: 1;
}

.pmax-youtube-card h3 {
  margin-top: 10px;
  font-size: 15px;
}

.pmax-youtube-card p {
  margin-top: 5px;
  color: #60646b;
  font-size: 11px;
  line-height: 1.35;
}

.pmax-video-grid-skeleton {
  height: 145px;
  margin: 14px 24px;
  background:
    linear-gradient(#e7e9ec 0 0) 0 0 / 31% 88px,
    linear-gradient(#e7e9ec 0 0) 50% 0 / 31% 88px,
    linear-gradient(#e7e9ec 0 0) 100% 0 / 31% 88px;
  background-repeat: no-repeat;
}

/* ── Google Video responsive previews ── */

.video-toolbar-controls {
  display: flex;
  align-items: center;
  gap: 10px;
}

.video-toolbar-controls .placement-select {
  min-width: 150px;
  padding-left: 14px;
}

.video-resource-select {
  min-width: 132px;
  padding-left: 12px;
}

.google-video-resource-note {
  margin: 4px 0 0;
  padding: 9px 10px;
  border-radius: 7px;
  background: #f1f5f9;
  color: #5f6368;
  font-size: 10px;
  line-height: 1.4;
}

.video-resource-count {
  min-width: 42px;
  color: #666;
  font-size: 12px;
  text-align: right;
}

.google-video-stage {
  min-height: 610px;
}

.google-video-presentation {
  justify-content: flex-start;
}

.google-video-preview {
  position: relative;
  flex: 0 0 auto;
  padding: 25px 10px 12px;
  border-radius: 37px;
  background: #171717;
  box-shadow: 0 12px 30px rgba(0, 0, 0, 0.18);
}

.google-video-preview::before {
  content: '';
  position: absolute;
  top: 10px;
  left: 50%;
  width: 67px;
  height: 6px;
  border-radius: 999px;
  background: #555;
  transform: translateX(-50%);
}

.google-video-preview--mobile {
  width: 360px;
  height: 683px;
}

.google-video-preview--desktop,
.google-video-preview--tv {
  width: 620px;
  padding: 12px;
  border: 6px solid #d5d8dc;
  border-radius: 12px;
  background: white;
}

.google-video-preview--desktop::before,
.google-video-preview--tv::before {
  display: none;
}

.google-video-preview--tv {
  width: 590px;
  border-bottom-width: 24px;
}

.google-video-surface {
  height: 100%;
  overflow: hidden;
  border-radius: 20px;
  background: white;
}

.google-video-preview--desktop .google-video-surface,
.google-video-preview--tv .google-video-surface {
  border: 1px solid #dfe1e5;
  border-radius: 4px;
}

.google-video-preview--mobile .pmax-youtube-header {
  padding: 14px 12px;
}

.google-video-preview--mobile .youtube-wordmark {
  width: 82px;
}

.google-video-media-wrap {
  position: relative;
  background: #111;
}

.google-video-media {
  display: block;
  width: 100%;
  height: 168px;
  object-fit: cover;
}

.google-video-preview--in-stream .google-video-media {
  object-fit: contain;
}

.google-video-preview--desktop .google-video-media {
  height: 270px;
}

.google-video-preview--tv .google-video-media {
  height: 304px;
}

.google-video-play {
  position: absolute;
  top: 50%;
  left: 50%;
  display: grid;
  width: 46px;
  height: 34px;
  border-radius: 9px;
  background: rgba(0, 0, 0, 0.75);
  color: white;
  font-size: 16px;
  place-items: center;
  transform: translate(-50%, -50%);
}

.google-video-skip {
  position: absolute;
  right: 0;
  bottom: 10px;
  padding: 7px 9px;
  background: rgba(0, 0, 0, 0.82);
  color: white;
  font-size: 10px;
  font-weight: 600;
}

.google-video-advertiser {
  display: grid;
  grid-template-columns: 31px minmax(0, 1fr) auto;
  align-items: center;
  gap: 8px;
  padding: 9px 10px;
  border-bottom: 1px solid #e5e7eb;
}

.google-video-advertiser-logo {
  width: 31px;
  height: 31px;
  border-radius: 50%;
  object-fit: contain;
}

.google-video-advertiser-copy {
  min-width: 0;
}

.google-video-advertiser-copy strong,
.google-video-advertiser-copy span {
  display: block;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.google-video-advertiser-copy strong {
  font-size: 11px;
}

.google-video-advertiser-copy span {
  margin-top: 2px;
  color: #60646b;
  font-size: 8px;
}

.google-video-cta {
  padding: 7px 10px;
  border-radius: 999px;
  background: #202124;
  color: white;
  font-size: 10px;
  font-weight: 700;
  white-space: nowrap;
}

.google-video-feed-skeleton {
  display: grid;
  gap: 12px;
  padding: 14px 12px;
}

.google-video-skeleton-item {
  display: grid;
  grid-template-columns: 28px 1fr;
  grid-template-rows: 8px 8px;
  gap: 6px 8px;
}

.google-video-skeleton-item i {
  grid-row: 1 / 3;
  width: 28px;
  height: 28px;
  border-radius: 50%;
  background: #e5e7eb;
}

.google-video-skeleton-item span {
  width: 78%;
  border-radius: 3px;
  background: #e5e7eb;
}

.google-video-skeleton-item span:last-child {
  width: 55%;
}

/* In-stream: reproductor con controles de omisión y franja del anunciante. */

.google-video-instream-body {
  display: block;
}

.google-video-preview--desktop .google-video-instream-body {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 164px;
  gap: 12px;
  padding: 12px;
}

.google-video-preview--desktop .google-video-instream-primary {
  min-width: 0;
}

.google-video-preview--desktop .google-video-feed-skeleton.is-sidebar {
  padding: 0;
}

.google-video-preview--desktop .google-video-feed-skeleton.is-sidebar .google-video-skeleton-item {
  min-height: 72px;
  padding-top: 50px;
  background: linear-gradient(#e5e7eb 0 0) 0 0 / 100% 44px no-repeat;
}

.google-video-preview--desktop .google-video-instream-primary .google-video-media {
  height: 225px;
}

.google-video-instream--tv .pmax-youtube-header {
  display: none;
}

.google-video-preview--tv .google-video-surface {
  background: #111;
}

.google-video-preview--tv .google-video-advertiser {
  position: absolute;
  right: 18px;
  bottom: 20px;
  left: 18px;
  border: 0;
  border-radius: 6px;
  background: rgba(0, 0, 0, 0.78);
  color: white;
}

.google-video-preview--tv .google-video-advertiser-copy span {
  color: #ddd;
}

.google-video-preview--tv .google-video-skip {
  right: 12px;
  bottom: 64px;
  z-index: 3;
}

/* In-feed: tarjeta dentro de YouTube Home; no incluye “Omitir anuncio”. */

.google-video-preview--in-feed-video,
.google-video-preview--shorts {
  padding: 20px 8px 8px;
  border: 3px solid #d6d6d6;
  background: white;
}

.google-video-preview--in-feed-video::before,
.google-video-preview--shorts::before {
  background: #d6d6d6;
}

.google-video-infeed-body {
  padding: 7px 8px 10px;
  background: #f5f5f5;
}

.google-video-infeed-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  min-height: 58px;
  padding: 13px 12px;
  border-bottom: 1px solid #e5e7eb;
  background: white;
}

.google-video-infeed-header .youtube-wordmark {
  width: 82px;
}

.google-video-infeed-avatar {
  width: 20px;
  height: 20px;
  border-radius: 50%;
  background: #e5e7eb;
}

.google-video-infeed-card {
  overflow: hidden;
  border-radius: 8px;
  background: white;
}

.google-video-preview--mobile .google-video-infeed-card .google-video-media {
  height: 128px;
  border-radius: 7px;
  object-fit: contain;
}

.google-video-duration {
  position: absolute;
  right: 0;
  bottom: 0;
  padding: 2px 4px;
  background: rgba(0, 0, 0, 0.82);
  color: white;
  font-size: 10px;
  font-weight: 700;
}

.google-video-infeed-cta {
  margin: 0 7px 8px;
  padding: 7px 12px;
  border-radius: 999px;
  background: #202124;
  color: white;
  font-size: 10px;
  font-weight: 600;
  text-align: center;
}

.google-video-infeed-identity {
  display: grid;
  grid-template-columns: 31px minmax(0, 1fr) auto;
  align-items: start;
  gap: 8px;
  padding: 9px 7px 7px;
  border: 0;
}

.google-video-infeed-copy {
  min-width: 0;
}

.google-video-infeed-copy strong,
.google-video-infeed-copy p,
.google-video-infeed-copy span {
  display: block;
}

.google-video-infeed-copy strong {
  display: -webkit-box;
  overflow: hidden;
  font-size: 11px;
  line-height: 1.25;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 2;
}

.google-video-infeed-copy p {
  display: -webkit-box;
  overflow: hidden;
  margin-top: 5px;
  color: #3f3f3f;
  font-size: 8px;
  line-height: 1.35;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 3;
}

.google-video-infeed-copy span {
  overflow: hidden;
  margin-top: 3px;
  color: #60646b;
  font-size: 8px;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.google-video-more {
  color: #60646b;
  font-size: 19px;
  line-height: 1;
}

.google-video-infeed-body > .google-video-feed-skeleton {
  padding-right: 0;
  padding-left: 0;
}

.google-video-infeed-body > .google-video-feed-skeleton.is-before-card {
  padding-top: 3px;
  padding-bottom: 10px;
}

.google-video-infeed-body > .google-video-feed-skeleton.is-before-card .google-video-skeleton-item:nth-child(n + 2) {
  display: none;
}

.google-video-infeed-body > .google-video-feed-skeleton.is-after-card {
  padding-top: 12px;
}

.google-video-preview--desktop .google-video-infeed-body {
  display: grid;
  grid-template-columns: 330px minmax(0, 1fr);
  gap: 18px;
  padding: 18px;
}

.google-video-preview--desktop .google-video-feed-skeleton.is-before-card {
  display: none;
}

.google-video-preview--desktop .google-video-infeed-card .google-video-media {
  height: 185px;
  object-fit: contain;
}

.google-video-feed-skeleton.is-grid {
  grid-template-columns: 1fr 1fr;
  align-content: start;
  padding: 0;
}

.google-video-feed-skeleton.is-grid .google-video-skeleton-item {
  min-height: 90px;
  padding-top: 56px;
  background: linear-gradient(#e5e7eb 0 0) 0 0 / 100% 50px no-repeat;
}

/* Shorts: lienzo vertical y controles superpuestos, sólo en móvil. */

.google-video-preview--shorts .google-video-surface {
  background: #111;
}

.google-video-shorts {
  height: 100%;
}

.google-video-preview--shorts .google-video-media-wrap {
  height: calc(100% - 44px);
}

.google-video-preview--shorts .google-video-media {
  height: 100%;
  object-fit: cover;
}

.google-video-shorts-actions {
  position: absolute;
  right: 9px;
  bottom: 103px;
  display: grid;
  gap: 14px;
  color: white;
  filter: drop-shadow(0 1px 2px rgba(0, 0, 0, 0.6));
}

.google-video-shorts-action {
  width: 21px;
  height: 21px;
  fill: white;
}

.google-video-shorts-advertiser {
  position: absolute;
  right: 0;
  bottom: 0;
  left: 0;
  padding: 60px 11px 10px;
  background: linear-gradient(transparent, rgba(0, 0, 0, 0.82));
  color: white;
}

.google-video-shorts-identity {
  display: flex;
  align-items: center;
  gap: 7px;
  padding-right: 30px;
}

.google-video-shorts-identity .google-video-advertiser-logo {
  width: 27px;
  height: 27px;
}

.google-video-shorts-identity-copy {
  min-width: 0;
}

.google-video-shorts-identity-copy strong,
.google-video-shorts-identity-copy span {
  display: block;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.google-video-shorts-identity-copy strong {
  font-size: 9px;
}

.google-video-shorts-identity-copy span {
  margin-top: 1px;
  font-size: 8px;
}

.google-video-shorts-advertiser > p {
  display: -webkit-box;
  overflow: hidden;
  margin: 5px 30px 7px 0;
  font-size: 8px;
  line-height: 1.35;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 2;
}

.google-video-shorts-cta {
  padding: 7px 12px;
  border-radius: 999px;
  background: white;
  color: #202124;
  font-size: 9px;
  font-weight: 600;
  text-align: center;
}

.google-video-shorts-navigation {
  display: flex;
  align-items: center;
  justify-content: space-around;
  height: 44px;
  background: #0e0e0e;
}

.google-video-shorts-navigation span,
.google-video-shorts-navigation i {
  display: block;
  width: 18px;
  height: 13px;
  border-radius: 2px;
  background: #242424;
}

.google-video-shorts-navigation i {
  width: 24px;
  height: 24px;
  border-radius: 50%;
}

.google-pmax-phone {
  height: 695px;
}

.pmax-frame--discover,
.pmax-frame--gmail {
  width: 340px;
  height: 658px;
  border: 0;
  border-radius: 18px;
  box-shadow: none;
}

.pmax-frame--discover-desktop,
.pmax-frame--gmail-desktop {
  width: 620px;
  height: 470px;
  border: 5px solid #c9cacc;
  border-radius: 16px;
}

.pmax-discover-header,
.pmax-gmail-header {
  padding: 22px 18px;
  border-bottom: 1px solid #e4e7eb;
  color: #4285f4;
  font-size: 21px;
  font-weight: 700;
  text-align: center;
}

.pmax-gmail-toolbar {
  display: grid;
  grid-template-columns: 1fr auto auto auto;
  align-items: center;
  gap: 25px;
  padding: 17px 15px 9px;
  color: #5f6368;
  font-size: 25px;
  line-height: 1;
}

.pmax-gmail-toolbar span:last-child {
  font-size: 16px;
}

.pmax-gmail-trash {
  position: relative;
  width: 15px;
  height: 17px;
  border: 2px solid currentColor;
  border-top: 0;
  border-radius: 0 0 2px 2px;
}

.pmax-gmail-trash::before {
  position: absolute;
  top: -5px;
  left: -3px;
  width: 17px;
  border-top: 2px solid currentColor;
  content: '';
}

.pmax-gmail-trash::after {
  position: absolute;
  top: -8px;
  left: 3px;
  width: 7px;
  height: 3px;
  border: 2px solid currentColor;
  border-bottom: 0;
  content: '';
}

.pmax-discover-card,
.pmax-gmail-message {
  display: grid;
  gap: 9px;
  padding: 14px;
}

.pmax-gmail-sender {
  display: flex;
  align-items: center;
  gap: 11px;
  margin-bottom: 7px;
}

.pmax-gmail-message .pmax-gmail-sender .pmax-gmail-sender-logo {
  flex: 0 0 42px;
  width: 42px;
  height: 42px;
  border-radius: 50%;
  background: white;
  object-fit: contain;
}

.pmax-gmail-sender-copy {
  display: grid;
  gap: 3px;
}

.pmax-gmail-sender-copy strong {
  font-size: 15px;
}

.pmax-gmail-sender-copy span {
  color: #5f6368;
  font-size: 12px;
}

.pmax-discover-card .pmax-media {
  height: auto;
  aspect-ratio: 1 / 1;
  border-radius: 8px;
  object-fit: contain;
}

.pmax-discover-card h3,
.pmax-gmail-message h3 {
  font-size: 18px;
  line-height: 1.25;
}

.pmax-discover-card p,
.pmax-gmail-message p {
  color: #5f6368;
  font-size: 12px;
  line-height: 1.4;
}

.pmax-gmail-message .pmax-media {
  height: 140px;
  border-radius: 7px;
}

.pmax-frame--gmail-desktop .pmax-gmail-toolbar {
  border-bottom: 1px solid #e4e7eb;
  padding: 14px 18px;
}

.pmax-frame--gmail-desktop .pmax-gmail-message {
  grid-template-columns: minmax(0, 47%) 1fr;
  grid-template-rows: auto auto auto 1fr;
  gap: 10px 22px;
  padding: 18px 24px;
}

.pmax-frame--gmail-desktop .pmax-gmail-sender {
  grid-column: 1 / -1;
}

.pmax-frame--gmail-desktop .pmax-gmail-message > .pmax-media {
  grid-column: 1;
  grid-row: 2 / 5;
  height: 190px;
}

.pmax-frame--gmail-desktop .pmax-gmail-message h3,
.pmax-frame--gmail-desktop .pmax-gmail-message p,
.pmax-frame--gmail-desktop .pmax-gmail-message .pmax-cta {
  grid-column: 2;
}

.pmax-frame--gmail-desktop .pmax-gmail-message h3 {
  align-self: end;
  font-size: 22px;
}

.pmax-frame--gmail-desktop .pmax-gmail-message p {
  font-size: 14px;
}

.pmax-frame--gmail-desktop .pmax-gmail-message .pmax-cta {
  align-self: start;
}

.pmax-cta {
  display: inline-flex;
  justify-self: start;
  padding: 9px 15px;
  border-radius: 4px;
  background: #1a73e8;
  color: white;
  font-size: 12px;
  font-weight: 700;
}

.google-pmax-presentation .placement-copy-panel {
  max-height: 590px;
  overflow-y: auto;
}

/* ── Google Demand Gen previews ── */

.google-demand-gen-viewer {
  width: min(1120px, 100%);
}

.google-demand-gen-stage {
  min-height: 610px;
}

.demand-gen-context-badge,
.demand-gen-mini-badge {
  background: linear-gradient(135deg, #0f9d58, #1a73e8);
}

.demand-gen-resource-navigation {
  margin-left: auto;
}

.demand-gen-resource-counter {
  min-width: 104px;
  margin-right: 0;
  text-align: right;
}

.google-preview-combination-note {
  width: fit-content;
  max-width: 720px;
  margin: 14px 0 0;
  padding: 9px 12px;
  border: 1px solid #dfe3eb;
  border-radius: 8px;
  background: #f8f9fa;
  color: #5f6368;
  font-size: 12px;
  line-height: 1.45;
}

.google-demand-gen-presentation {
  align-items: flex-start;
  justify-content: flex-start;
}

.google-demand-gen-presentation .placement-copy-panel {
  max-height: 590px;
  overflow-y: auto;
}

.google-demand-gen-presentation .demand-gen-selected-media,
.google-demand-gen-presentation .pmax-gmail-message > .pmax-media,
.google-demand-gen-presentation .demand-gen-map-card .pmax-media {
  background: #f1f3f4;
  object-fit: contain;
  object-position: center;
}

.demand-gen-carousel-count {
  position: absolute;
  top: 57px;
  right: 13px;
  padding: 3px 7px;
  border-radius: 999px;
  background: rgba(0, 0, 0, 0.78);
  color: white;
  font-size: 10px;
  font-weight: 700;
}

.demand-gen-carousel-dots {
  display: flex;
  position: static;
  justify-content: center;
  gap: 4px;
  margin: 5px 0 2px;
  transform: none;
}

.demand-gen-carousel-dots i {
  width: 5px;
  height: 5px;
  border-radius: 50%;
  background: #bdc1c6;
}

.demand-gen-carousel-dots i.active {
  background: #5f6368;
}

.demand-gen-video-shorts {
  flex: 0 0 auto;
}

.demand-gen-maps {
  position: relative;
  flex: 0 0 auto;
  overflow: hidden;
  width: 620px;
  height: 470px;
  border: 1px solid #d2d5da;
  border-radius: 16px;
  background: #e8f0e8;
  color: #202124;
  font-family: Arial, sans-serif;
  box-shadow: 0 4px 16px rgba(60, 64, 67, 0.1);
}

.demand-gen-maps--mobile {
  width: 340px;
  height: 658px;
  border: 0;
  border-radius: 18px;
  box-shadow: none;
}

.demand-gen-map-surface {
  position: absolute;
  inset: 0;
  background:
    linear-gradient(28deg, transparent 47%, #fff 48% 53%, transparent 54%),
    linear-gradient(108deg, transparent 43%, #fff 44% 49%, transparent 50%),
    repeating-linear-gradient(0deg, #dcebd9 0 42px, #d3e4d1 43px 84px);
}

.demand-gen-map-pin {
  position: absolute;
  top: 28%;
  left: 58%;
  width: 36px;
  height: 36px;
  border-radius: 50% 50% 50% 0;
  background: #ea4335;
  color: white;
  font-size: 0;
  transform: rotate(-45deg);
}

.demand-gen-map-pin::after {
  position: absolute;
  inset: 10px;
  border-radius: 50%;
  background: white;
  content: '';
}

.demand-gen-map-card {
  position: absolute;
  right: 18px;
  bottom: 18px;
  left: 18px;
  display: grid;
  grid-template-columns: 94px 1fr;
  gap: 5px 12px;
  padding: 12px;
  border-radius: 12px;
  background: white;
  box-shadow: 0 3px 12px rgba(60, 64, 67, 0.25);
}

.demand-gen-map-card .pmax-sponsored {
  grid-column: 1 / -1;
}

.demand-gen-map-card .pmax-media {
  grid-row: 2 / 6;
  width: 94px;
  height: 94px;
  border-radius: 8px;
  object-fit: cover;
}

.demand-gen-map-card h3,
.demand-gen-map-card p {
  margin: 0;
}

.demand-gen-map-card h3 {
  font-size: 15px;
  line-height: 1.2;
}

.demand-gen-map-card p {
  overflow: hidden;
  color: #5f6368;
  font-size: 11px;
  line-height: 1.35;
  text-overflow: ellipsis;
}

.demand-gen-map-cta {
  justify-self: start;
  color: #1a73e8;
  font-size: 11px;
  font-weight: 700;
}

.demand-gen-maps--mobile .demand-gen-map-card {
  grid-template-columns: 68px 1fr;
}

.demand-gen-maps--mobile .demand-gen-map-card .pmax-media {
  width: 68px;
  height: 68px;
}

.google-search-browser--mobile .google-search-header {
  grid-template-columns: 32px 1fr 32px;
  gap: 12px;
  padding: 18px 12px 12px;
}

.google-search-browser--mobile .google-menu-icon {
  display: block;
  grid-column: 1;
  justify-self: start;
}

.google-search-browser--mobile .google-wordmark {
  grid-column: 2;
  justify-self: center;
  width: 76px;
}

.google-search-browser--mobile .google-avatar {
  grid-column: 3;
  justify-self: end;
}

.google-search-browser--mobile .google-search-box {
  grid-column: 1 / -1;
  grid-row: 2;
  height: 38px;
}

.google-search-browser--mobile .google-search-tabs {
  padding: 0 12px;
}

.google-search-browser--mobile .google-search-tabs span {
  width: 38px;
}

.google-search-browser--mobile .google-search-result {
  width: calc(100% - 24px);
  margin: 0 12px;
  padding-top: 15px;
}

.google-search-browser--mobile .google-result-headline {
  font-size: 18px;
}

.google-search-browser--mobile .google-result-description {
  display: -webkit-box;
  overflow: hidden;
  font-size: 12px;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 5;
}

.google-search-browser--mobile .google-search-callouts,
.google-search-browser--mobile .google-search-snippet {
  font-size: 11px;
}

.google-search-browser--mobile .google-search-actions {
  flex-wrap: nowrap;
  gap: 5px;
  overflow: hidden;
}

.google-search-browser--mobile .google-search-asset-button {
  min-height: 27px;
  padding: 5px 10px;
  font-size: 10px;
}

.google-search-browser--mobile .google-results-skeleton {
  padding: 10px 12px 20px;
}

.google-search-browser--mobile .google-skeleton-result {
  width: 100%;
}

@media (max-width: 1500px) and (min-width: 901px) {
  .ad-hierarchy {
    flex-wrap: nowrap;
    gap: 6px 8px;
  }

  .ad-hierarchy-item > strong {
    max-width: 180px;
  }

  .ad-hierarchy-item:first-child > strong {
    max-width: 90px;
  }
}

@media (max-width: 900px) {
  body {
    display: block;
    overflow: hidden;
  }

  #mobile-menu-toggle {
    position: fixed;
    z-index: 45;
    top: 14px;
    left: 12px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 40px;
    height: 40px;
    border: 1px solid #d7dce2;
    border-radius: 10px;
    background: #fff;
    color: #1e1e2e;
    font-size: 20px;
    box-shadow: 0 2px 8px rgba(31, 41, 55, 0.1);
    cursor: pointer;
  }

  #mobile-sidebar-backdrop {
    position: fixed;
    z-index: 35;
    inset: 0;
    display: block;
    border: 0;
    background: rgba(15, 23, 42, 0.48);
    opacity: 0;
    pointer-events: none;
    transition: opacity 180ms ease;
  }

  #sidebar {
    position: fixed;
    z-index: 40;
    inset: 0 auto 0 0;
    width: min(340px, 88vw) !important;
    min-width: 0 !important;
    box-shadow: 12px 0 30px rgba(15, 23, 42, 0.24);
    transform: translateX(-105%);
    transition: transform 200ms ease;
  }

  .mobile-sidebar-open #sidebar {
    transform: translateX(0);
  }

  .mobile-sidebar-open #mobile-sidebar-backdrop {
    opacity: 1;
    pointer-events: auto;
  }

  .mobile-sidebar-open #mobile-menu-toggle {
    left: min(calc(88vw - 52px), 288px);
    border-color: #45475a;
    background: #27273a;
    color: #cdd6f4;
  }

  #sidebar-resizer {
    display: none;
  }

  #content {
    width: 100%;
    height: 100vh;
    padding: 86px 12px 28px;
  }

  #panel-header {
    margin-bottom: 20px;
    margin-right: 0;
  }

  .inventory-scorecards {
    position: absolute;
    top: 12px;
    right: 12px;
    left: 60px;
    gap: 6px;
  }

  .inventory-scorecard {
    flex: 1 1 0;
    min-width: 0;
    grid-template-columns: 1fr;
    gap: 3px;
    padding: 7px 6px;
  }

  .inventory-scorecard > span {
    font-size: 8px;
  }

  .inventory-scorecard > strong {
    font-size: 18px;
  }

  #placeholder {
    margin-top: 70px;
  }

  #placeholder h1 {
    font-size: 24px;
  }

  #placeholder p {
    font-size: 14px;
  }

  .placement-toolbar {
    align-items: stretch;
    flex-direction: column;
    gap: 12px;
  }

  .placement-select {
    width: 100%;
    min-width: 0;
  }

  .placement-selector-wrap {
    width: 100%;
  }

  .pmax-toolbar-controls {
    align-items: stretch;
    flex-direction: column;
  }

  .pmax-device-selector-wrap,
  .pmax-device-select {
    width: 100%;
  }

  .placement-navigation {
    justify-content: flex-end;
  }

  .ad-hierarchy {
    display: grid;
    gap: 10px;
  }

  .ad-hierarchy-separator {
    display: none;
  }

  .ad-hierarchy-item--ad {
    flex-basis: auto;
  }

  .ad-hierarchy-item > strong {
    max-width: none;
    white-space: normal;
  }

  .demand-gen-resource-navigation {
    width: 100%;
    margin-left: 0;
  }

  .placement-presentation {
    align-items: center;
    flex-direction: column;
    gap: 18px;
  }

  .placement-stage {
    padding-top: 18px;
  }

  .phone-shell {
    width: min(360px, 100%);
  }

  .phone-shell .official-preview-card,
  .phone-shell .preview-card {
    width: 100%;
  }

  .placement-copy-panel {
    flex-basis: auto;
    width: 100%;
  }

  .google-pmax-frame,
  .google-search-browser,
  .google-video-preview,
  .google-demand-gen-frame {
    max-width: 100%;
  }

  .google-search-browser--desktop {
    width: 100%;
  }

  .preview-card--desktop,
  .preview-card--mobile {
    width: 100%;
    flex-basis: 100%;
  }
}
