:root {
  --pixel-updates-bg: #f9fafb;
  --pixel-updates-surface: #fff;
  --pixel-updates-text: #0f172a;
  --pixel-updates-muted: #475569;
  --pixel-updates-outline: #e2e8f0;
  --pixel-updates-radius: 24px;
}
body:has(.pixel-updates-page) { margin: 0; }
.pixel-updates-dialog, .pixel-updates-page {
  color: var(--fg, var(--pixel-updates-text));
  line-height: 1.55;
}
.pixel-updates-dialog {
  font: inherit;
  padding: 0;
  width: min(620px, calc(100% - 32px));
  max-height: calc(100dvh - 32px);
  margin: auto;
  overflow: hidden;
  background: var(--card, var(--pixel-updates-surface));
  border: 1px solid var(--border, var(--pixel-updates-outline));
  border-radius: var(--radius-card, var(--pixel-updates-radius));
  box-shadow: 0 24px 65px rgb(15 23 42 / 22%);
}
.pixel-updates-dialog::backdrop { background: rgb(15 23 42 / 52%); }
html:has(.pixel-updates-dialog[open]) { overflow: hidden; }
.pixel-updates-panel { display: flex; flex-direction: column; max-height: calc(100dvh - 34px); }
.pixel-updates-header, .pixel-updates-actions {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  flex-shrink: 0;
  gap: 10px;
  padding: 14px 24px;
}
.pixel-updates-header {
  justify-content: space-between;
  border-bottom: 1px solid var(--border, #e2e8f0);
}
.pixel-updates-header h2, .pixel-updates-page h1 { margin: 0; font-weight: 800; font-size: 1.5rem; }
.pixel-updates-header form, .pixel-updates-actions form { margin: 0; }
.pixel-updates-scroll { overflow-y: auto; overscroll-behavior: contain; padding: 20px 24px; }
.pixel-updates-actions { justify-content: flex-end; border-top: 1px solid var(--border, #e2e8f0); }
.pixel-updates-button, .pixel-updates-dismiss {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 44px;
  padding: 0 14px;
  border: 1px solid var(--border, #e2e8f0);
  border-radius: 999px;
  color: var(--fg, #0f172a);
  background: var(--card, #fff);
  font: inherit;
  font-size: .875rem;
  font-weight: 700;
  text-decoration: none;
  cursor: pointer;
}
.pixel-updates-button:hover, .pixel-updates-dismiss:hover { background: #f1f5f9; color: #0f172a; }
.pixel-updates-primary { background: var(--primary, #0f172a); color: white; border-color: transparent; }
.pixel-updates-primary:hover { background: #1e293b; color: white; }
.pixel-updates-dismiss { width: 44px; padding: 0; }
.pixel-updates-dialog :focus-visible, .pixel-updates-page :focus-visible {
  outline: 2px solid var(--accent-focus, #0ea5e9);
  outline-offset: 2px;
}
.pixel-updates-dialog .pixel-release, .pixel-updates-dialog .pixel-release-history,
.pixel-updates-page .pixel-release, .pixel-updates-page .pixel-release-history { padding: 0; }
.pixel-release time, .pixel-release-history time { color: var(--muted, var(--pixel-updates-muted)); font-size: .875rem; font-weight: 600; }
.pixel-release h2 { font-size: 1.375rem; margin: 4px 0 12px; font-weight: 800; }
.pixel-release ul, .pixel-release-history ul { margin: 0; padding-inline-start: 1.3rem; list-style: disc; }
.pixel-release li + li, .pixel-release-history li + li { margin-top: 8px; }
.pixel-release-history { margin-top: 24px; }
.pixel-release-history h2 { font-size: 1rem; font-weight: 800; margin: 0 0 10px; }
.pixel-release-history details {
  margin-top: 8px;
  padding: 8px 12px;
  border: 1px solid var(--border, #e2e8f0);
  border-radius: 12px;
}
.pixel-release-history summary { cursor: pointer; font-weight: 700; padding: 4px 0; }
.pixel-release-history summary span { margin-inline-start: .375rem; }
.pixel-release-history details[open] ul { margin: 8px 0 4px; }
.pixel-release-media { margin: 12px 0 4px; }
.pixel-release-media img {
  display: block;
  width: 100%;
  max-width: 480px;
  height: auto;
  border: 1px solid var(--border, var(--pixel-updates-outline));
  border-radius: 12px;
}
.pixel-release-media figcaption {
  margin-top: 6px;
  color: var(--muted, var(--pixel-updates-muted));
  font-size: .8125rem;
}
.pixel-updates-page {
  min-height: 100vh;
  padding: 0 16px 40px;
  background: var(--pixel-updates-bg);
  font-family: "Plus Jakarta Sans", system-ui, sans-serif;
  box-sizing: border-box;
}
.pixel-updates-page-nav {
  max-width: 720px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 12px;
  margin: 0 auto;
  padding: 14px 0;
}
.pixel-updates-brand { display: inline-flex; align-items: center; gap: 8px; font-weight: 800; color: inherit; text-decoration: none; }
.pixel-updates-page-card {
  max-width: 720px;
  margin: 16px auto 0;
  padding: clamp(16px, 5vw, 32px);
  background: var(--pixel-updates-surface);
  border: 1px solid var(--pixel-updates-outline);
  border-radius: var(--pixel-updates-radius);
  box-sizing: border-box;
}
.pixel-updates-page h1 { font-size: 2rem; margin-bottom: 24px; }
@media (max-width: 480px) {
  .pixel-updates-header, .pixel-updates-scroll, .pixel-updates-actions { padding-inline: 16px; }
  .pixel-updates-actions { justify-content: flex-start; }
}

/* Bottom anchor ad: keep the editor and the end of the page above it (script.js measures it). */
html.has-anchor-ad body { padding-bottom: var(--anchor-ad-space); }
html.has-anchor-ad .playground-card.is-focus { bottom: var(--anchor-ad-space); }
html.has-anchor-ad .workarea.editor-screen { height: calc(100dvh - var(--anchor-ad-space)); }

/* Editor: phone shortcut to Convert under the preview, and the older-version export hint. */
.pixel-quick-convert { display: none; }
@media (max-width: 1087px) {
  .pixel-quick-convert { display: flex; flex-direction: column; gap: 8px; margin: 16px 0; }
  .pixel-quick-convert .button-primary { width: 100%; min-height: 52px; }
  .pixel-quick-convert-note { margin: 0; color: #64748b; font-size: .85rem; line-height: 1.5; text-align: center; }
}
.pixel-legacy-hint { margin-top: 10px; }


/* Keyboard focus for editor controls with custom styling. */
.settings-screen .blocks-column .block-groups .box:focus-within,
.editor-tools input:focus-visible + svg,
.pixel-editor-menu .file-label:focus-within .file-cta,
.pixel-editor-menu .topbar-menu-item:focus-visible {
  outline: 2px solid #0ea5e9;
  outline-offset: 2px;
}
.pixel-editor-menu { position: relative; }
.pixel-editor-menu .topbar-btn { margin-right: 0; }
.pixel-editor-menu .topbar-menu-item { border: 0; }


#convert-notify-link { border: 0; padding: 0; background: none; color: #0369a1; font: inherit; text-decoration: underline; cursor: pointer; }


@media (hover: none) {
  .workarea.editor-screen .footbar-zoom button { min-width: 44px; min-height: 44px; }
}


#pixel-download-status:empty { margin: 0; }


.pixel-editor-nav-menu { display: none; }
@media (max-width: 600px) {
  .site-nav:has(.pixel-editor-nav-menu) { flex-direction: row; align-items: center; gap: 8px; }
  .site-nav:has(.pixel-editor-nav-menu) > .site-links { display: none; }
  .pixel-editor-nav-menu { position: relative; display: block; flex: none; }
  .pixel-editor-nav-menu summary {
    min-width: 44px; min-height: 44px; padding: 0 12px; align-content: center;
    border: 1px solid #0f172a1f; border-radius: 999px; background: #fff;
    color: #0f172a; font-size: .85rem; font-weight: 700; cursor: pointer;
  }
  .pixel-editor-nav-panel {
    position: absolute; inset-inline-end: 0; top: calc(100% + 6px); z-index: 10;
    min-width: 132px; padding: 4px; border: 1px solid #0f172a1f; border-radius: 16px;
    background: #fff; box-shadow: 0 12px 24px -16px #0f172a77;
  }
  .pixel-editor-nav-panel a {
    display: flex; align-items: center; min-height: 44px; padding: 0 10px;
    border-radius: 10px; color: #475569; font-weight: 600; white-space: nowrap;
  }
  .pixel-editor-nav-panel a:hover { background: #f1f5f9; color: #0f172a; }
}
