/* RustPress admin — styles (OWNER: B5).
   classic admin look & feel: dark left menu #1d2327 (active #2271b1), top admin bar #1d2327,
   content #f0f0f1, white cards, classic buttons, list tables; plus the block editor.

   Sections: 1 tokens/base · 2 admin bar · 3 left menu · 4 layout · 5 buttons · 6 forms ·
   7 notices/toasts · 8 list tables · 9 cards/postboxes · 10 dashboard · 11 modal · 12 media picker ·
   13 block editor · 14 responsive. */

/* ============================================================== 1. tokens & base */
:root {
  --rp-bar-h: 32px;
  --rp-menu-w: 160px;
  --rp-menu-folded-w: 36px;
  --rp-dark: #1d2327;
  --rp-dark-2: #2c3338;
  --rp-dark-3: #3c434a;
  --rp-blue: #2271b1;
  --rp-blue-dark: #135e96;
  --rp-blue-light: #72aee6;
  --rp-bg: #f0f0f1;
  --rp-border: #c3c4c7;
  --rp-border-light: #dcdcde;
  --rp-text: #3c434a;
  --rp-text-strong: #1d2327;
  --rp-muted: #646970;
  --rp-red: #d63638;
  --rp-red-dark: #b32d2e;
  --rp-green: #00a32a;
  --rp-yellow: #dba617;
  --rp-editor-ink: #1e1e1e;
  --rp-accent: #3858e9;
  --rp-font: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Oxygen-Sans, Ubuntu, Cantarell, "Helvetica Neue", sans-serif;
  --rp-mono: Menlo, Consolas, Monaco, "Liberation Mono", "Lucida Console", monospace;
  --rp-serif: "Noto Serif", Georgia, "Times New Roman", serif;
}

* { box-sizing: border-box; }
html, body { margin: 0; padding: 0; }
body.rp-admin { background: var(--rp-bg); color: var(--rp-text); font: 13px/1.4em var(--rp-font); min-height: 100vh; -webkit-font-smoothing: subpixel-antialiased; }
body.rp-modal-open { overflow: hidden; }
a { color: var(--rp-blue); transition: color .1s ease-in-out; }
a:hover, a:active { color: var(--rp-blue-dark); }
a:focus, button:focus-visible { outline: 2px solid transparent; box-shadow: 0 0 0 2px var(--rp-blue); border-radius: 2px; }
h1 { font-size: 23px; font-weight: 400; margin: 0; padding: 9px 0 4px; line-height: 1.3; color: var(--rp-text-strong); }
h2 { font-size: 1.3em; margin: 1em 0; color: var(--rp-text-strong); }
h3 { font-size: 1.1em; margin: 1em 0; color: var(--rp-text-strong); }
code, kbd { font-family: var(--rp-mono); }
kbd { padding: 2px 6px; background: #f0f0f1; border-radius: 3px; font-size: 12px; border: 1px solid var(--rp-border-light); }
.rp-boot, .rp-fatal { padding: 40px; text-align: center; color: var(--rp-muted); }
.rp-fatal h1 { font-weight: 600; }
.rp-noscript { padding: 20px; }
.rp-muted { color: var(--rp-muted); }
.screen-reader-text { border: 0; clip: rect(1px,1px,1px,1px); clip-path: inset(50%); height: 1px; margin: -1px; overflow: hidden; padding: 0; position: absolute; width: 1px; word-wrap: normal !important; }
.screen-reader-shortcut { position: absolute; top: -1000em; left: 6px; z-index: 100000; background: #f0f0f1; color: var(--rp-blue); padding: 15px 23px 14px; font-weight: 600; text-decoration: none; box-shadow: 0 0 2px 2px rgba(0,0,0,.6); }
.screen-reader-shortcut:focus { top: 7px; }
.hidden, [hidden] { display: none !important; }

/* ============================================================== 2. admin bar */
#rpadminbar { position: fixed; top: 0; left: 0; right: 0; height: var(--rp-bar-h); background: var(--rp-dark); color: #f0f0f1; z-index: 99990; display: flex; justify-content: space-between; font: 400 13px/var(--rp-bar-h) var(--rp-font); }
#rpadminbar ul { list-style: none; margin: 0; padding: 0; }
#rpadminbar > ul { display: flex; min-width: 0; }
#rpadminbar li { position: relative; }
#rpadminbar a, #rpadminbar button { display: flex; align-items: center; gap: 6px; height: var(--rp-bar-h); color: #f0f0f1; text-decoration: none; padding: 0 8px; background: none; border: 0; font: inherit; cursor: pointer; white-space: nowrap; }
#rpadminbar .ab-label { overflow: hidden; text-overflow: ellipsis; max-width: 22em; }
#rpadminbar .ab-icon { font-size: 15px; line-height: 1; opacity: .85; }
#rpadminbar a:hover, #rpadminbar li:hover > a, #rpadminbar li:focus-within > a { background: var(--rp-dark-2); color: var(--rp-blue-light); }
#rpadminbar .ab-logo a { padding: 0 10px; }
.rp-logo-mark { display: inline-flex; align-items: center; justify-content: center; width: 20px; height: 20px; border-radius: 50%; border: 2px solid currentColor; font: 700 11px/1 var(--rp-serif); }
#rpadminbar .ab-sub { display: none; position: absolute; top: var(--rp-bar-h); left: 0; min-width: 100%; width: max-content; max-width: 320px; background: var(--rp-dark-2); box-shadow: 0 3px 5px rgba(0,0,0,.2); padding: 6px 0; }
#rpadminbar .ab-sub a { height: auto; line-height: 26px; padding: 0 12px; }
#rpadminbar .ab-sub a:hover { background: none; }
#rpadminbar li:hover > .ab-sub, #rpadminbar li:focus-within > .ab-sub { display: block; }
#rpadminbar .ab-sub .ab-sub { top: -6px; left: 100%; background: #3c434a; }
#rpadminbar .ab-sub-flyout > a::after { content: "›"; margin-left: auto; padding-left: 12px; opacity: .6; }
#rpadminbar .ab-sub li.is-current > a { font-weight: 600; }
#rpadminbar .ab-sub-separator { border-top: 1px solid var(--rp-dark-3); margin: 5px 0; }
#rpadminbar #rp-admin-bar-my-sites > .ab-sub { max-height: calc(100vh - 60px); overflow: visible; }
#rpadminbar .ab-site-icon { font-size: 9px; opacity: .5; }
#rpadminbar .ab-top-secondary .ab-sub { left: auto; right: 0; }
#rpadminbar .ab-menu-toggle { display: none; }
#rpadminbar .rp-avatar { margin-left: 2px; }
#rpadminbar .rp-account-sub { min-width: 264px; padding: 12px 0 8px; }
#rpadminbar .rp-account-card { display: flex; gap: 12px; padding: 0 12px 10px; line-height: 1.4; }
#rpadminbar .rp-account-names { display: flex; flex-direction: column; justify-content: center; }
#rpadminbar .rp-account-names .display-name { color: #f0f0f1; font-weight: 600; }
#rpadminbar .rp-account-names .username, #rpadminbar .rp-account-role { color: #a7aaad; font-size: 12px; }
#rpadminbar #rp-admin-bar-comments .ab-label { font-variant-numeric: tabular-nums; }
.rp-avatar { display: inline-flex; align-items: center; justify-content: center; flex: 0 0 auto; border-radius: 50%; background: linear-gradient(135deg, #3858e9, #2271b1); color: #fff; font-weight: 600; line-height: 1; letter-spacing: .02em; }

/* ============================================================== 3. left menu */
#adminmenuback, #adminmenuwrap { position: fixed; top: var(--rp-bar-h); left: 0; bottom: 0; width: var(--rp-menu-w); background: var(--rp-dark); z-index: 9980; }
#adminmenuback { z-index: 9979; }
/* Menu taller than the viewport (set by app.js): it scrolls with the page instead of being cut. */
body.rp-menu-tall #adminmenuwrap { position: absolute; bottom: auto; min-height: calc(100% - var(--rp-bar-h)); }
#adminmenu { list-style: none; margin: 12px 0; padding: 0; }
#adminmenu li { position: relative; margin: 0; }
#adminmenu a { color: #f0f0f1; text-decoration: none; }
#adminmenu .menu-top-link { display: flex; align-items: center; gap: 8px; padding: 0 8px 0 10px; min-height: 34px; font-size: 14px; line-height: 1.3; }
#adminmenu li.menu-top:hover > .menu-top-link, #adminmenu li.menu-top:focus-within > .menu-top-link { background: var(--rp-dark-2); color: var(--rp-blue-light); }
#adminmenu .rp-menu-image { width: 20px; flex: 0 0 20px; text-align: center; font-size: 15px; filter: grayscale(.6); opacity: .85; }
#adminmenu li.current .rp-menu-image { filter: none; opacity: 1; }
#adminmenu .rp-menu-name { padding: 8px 0; }
#adminmenu li.current > .menu-top-link, #adminmenu li.current:hover > .menu-top-link { background: var(--rp-blue); color: #fff; }
#adminmenu li.current > .menu-top-link::after { content: ""; position: absolute; right: 0; top: 50%; margin-top: -8px; border: 8px solid transparent; border-right-color: var(--rp-bg); }
#adminmenu .rp-submenu { display: none; list-style: none; margin: 0; padding: 7px 0 8px; background: var(--rp-dark-2); }
#adminmenu .rp-submenu-head { display: none; }
#adminmenu li.current .rp-submenu { display: block; }
#adminmenu .rp-submenu a { display: block; padding: 5px 12px 5px 38px; color: rgba(240,246,252,.7); font-size: 13px; line-height: 1.4; }
#adminmenu .rp-submenu a:hover, #adminmenu .rp-submenu a:focus { color: var(--rp-blue-light); box-shadow: none; }
#adminmenu .rp-submenu li.current a { color: #fff; font-weight: 600; }
/* Flyout submenus for the non-current items */
#adminmenu li.menu-top:not(.current):hover > .rp-submenu, #adminmenu li.menu-top:not(.current):focus-within > .rp-submenu { display: block; position: absolute; left: 100%; top: -1px; min-width: 160px; padding: 7px 0 8px; box-shadow: 0 3px 5px rgba(0,0,0,.2); z-index: 9999; }
#adminmenu li.menu-top:not(.current) > .rp-submenu a { padding-left: 14px; }
#adminmenu li.menu-top.rp-has-submenu:not(.current):hover > .menu-top-link::after { content: ""; position: absolute; right: 0; top: 50%; margin-top: -8px; border: 8px solid transparent; border-right-color: var(--rp-dark-2); z-index: 10000; }
#adminmenu .rp-menu-separator { margin: 12px 0 4px; padding: 6px 10px 2px; color: #a7aaad; text-transform: uppercase; font-size: 11px; letter-spacing: .05em; border-top: 1px solid var(--rp-dark-3); }
#adminmenu .awaiting-mod { display: inline-block; vertical-align: top; min-width: 18px; height: 18px; padding: 0 5px; margin-left: 2px; border-radius: 9px; background: var(--rp-red); color: #fff; font-size: 9px; line-height: 1.9; font-weight: 600; text-align: center; }
#collapse-menu { margin-top: 10px; }
#collapse-button { display: flex; align-items: center; gap: 8px; width: 100%; padding: 8px 10px; background: none; border: 0; color: #a7aaad; font: 13px var(--rp-font); cursor: pointer; text-align: left; }
#collapse-button:hover { color: var(--rp-blue-light); }
.collapse-button-icon { width: 20px; text-align: center; font-size: 11px; }
/* Folded (icons only) */
body.folded { --rp-menu-w: var(--rp-menu-folded-w); }
body.folded #adminmenu .rp-menu-name, body.folded .collapse-button-label, body.folded #adminmenu .rp-menu-separator span { display: none; }
body.folded #adminmenu .menu-top-link { padding: 0 8px; justify-content: center; }
body.folded #adminmenu .rp-menu-separator { padding: 0; margin: 8px 0; }
body.folded #adminmenu li.current .rp-submenu { display: none; }
body.folded #adminmenu li.menu-top:hover > .rp-submenu, body.folded #adminmenu li.menu-top:focus-within > .rp-submenu { display: block; position: absolute; left: 100%; top: 0; min-width: 160px; box-shadow: 0 3px 5px rgba(0,0,0,.2); z-index: 9999; }
body.folded #adminmenu .rp-submenu-head { display: block; padding: 4px 14px 6px; color: #fff; font-weight: 600; font-size: 14px; }
body.folded #adminmenu .rp-submenu a { padding-left: 14px; }
body.folded #collapse-button { justify-content: center; }
.rp-menu-overlay { display: none; }

/* ============================================================== 4. layout */
#rpcontent { margin-left: var(--rp-menu-w); padding: var(--rp-bar-h) 20px 0; min-height: 100vh; display: flex; flex-direction: column; }
#rpbody { flex: 1; }
#rpbody-content { padding-top: 10px; padding-bottom: 50px; outline: none; }
#rpfooter { display: flex; justify-content: space-between; color: #50575e; padding: 10px 0 20px; font-size: 13px; }
#rpfooter p { margin: 0; }
.wrap { margin: 10px 20px 0 2px; }
.wrap .rp-heading-inline { display: inline-block; margin-right: 5px; }
.rp-page-header { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; }
.rp-page-header .subtitle { color: var(--rp-muted); font-size: 14px; padding-left: 8px; }
.rp-header-end { visibility: hidden; margin: -2px 0 0; border: 0; }
.page-title-action { display: inline-block; padding: 4px 8px; border: 1px solid var(--rp-blue); border-radius: 3px; background: #f6f7f7; font-size: 13px; line-height: 1.6; text-decoration: none; font-weight: 500; }
.page-title-action:hover { background: #f0f0f1; border-color: var(--rp-blue-dark); }
.rp-loading { padding: 30px; color: var(--rp-muted); display: flex; align-items: center; }

/* Full-screen screens (block editor) */
body.rp-fullscreen #rpadminbar, body.rp-fullscreen #adminmenuwrap, body.rp-fullscreen #adminmenuback, body.rp-fullscreen #rpfooter { display: none; }
body.rp-fullscreen #rpcontent { margin-left: 0; padding: 0; }
body.rp-fullscreen #rpbody-content { padding: 0; }
body.rp-fullscreen .wrap { margin: 0; }
body.rp-fullscreen #rp-toasts { top: 70px; }

/* ============================================================== 5. buttons */
.button, .button-primary, .button-secondary { display: inline-flex; align-items: center; justify-content: center; gap: 4px; text-decoration: none; font-size: 13px; line-height: 2.15384615; min-height: 30px; margin: 0; padding: 0 10px; cursor: pointer; border-width: 1px; border-style: solid; border-radius: 3px; white-space: nowrap; box-sizing: border-box; color: var(--rp-blue); border-color: var(--rp-blue); background: #f6f7f7; vertical-align: top; font-family: inherit; }
.button:hover { background: #f0f0f1; border-color: var(--rp-blue-dark); color: var(--rp-blue-dark); }
.button:focus-visible { box-shadow: 0 0 0 1px #fff, 0 0 0 3px var(--rp-blue); outline: 0; }
.button-primary, .button.button-primary { background: var(--rp-blue); border-color: var(--rp-blue); color: #fff; }
.button-primary:hover, .button.button-primary:hover { background: var(--rp-blue-dark); border-color: var(--rp-blue-dark); color: #fff; }
.button[disabled], .button:disabled, .button.button-primary:disabled { color: #a7aaad !important; border-color: #dcdcde !important; background: #f6f7f7 !important; cursor: default; box-shadow: none; }
.button-hero { font-size: 14px; min-height: 46px; line-height: 3.14; padding: 0 36px; }
.button-small, .button.button-small { min-height: 26px; line-height: 2.18; padding: 0 8px; font-size: 11px; }
.button.button-danger { background: var(--rp-red-dark); border-color: var(--rp-red-dark); color: #fff; }
.button.button-danger:hover { background: #8a2424; border-color: #8a2424; color: #fff; }
.button-link { background: none; border: 0; padding: 0; margin: 0; color: var(--rp-blue); text-decoration: underline; cursor: pointer; font: inherit; text-align: left; }
.button-link:hover { color: var(--rp-blue-dark); }
.button-link-delete, .submitdelete { color: var(--rp-red-dark) !important; }
.button-link-delete:hover, .submitdelete:hover { color: var(--rp-red) !important; }
.button.button-link-delete { border-color: transparent; background: none; text-decoration: underline; }
.button.button-link { border: 0; background: none; }

/* ============================================================== 6. forms */
input[type=text], input[type=email], input[type=tel], input[type=url], input[type=password], input[type=number], input[type=search], input[type=date], input[type=datetime-local], select, textarea { font: inherit; font-size: 14px; color: #2c3338; border: 1px solid #8c8f94; border-radius: 4px; background: #fff; padding: 0 8px; min-height: 30px; line-height: 2; box-shadow: 0 0 0 transparent; }
select { padding-right: 24px; max-width: 100%; }
textarea { line-height: 1.5; padding: 6px 8px; }
input:focus, select:focus, textarea:focus { border-color: var(--rp-blue); box-shadow: 0 0 0 1px var(--rp-blue); outline: 2px solid transparent; }
input[type=checkbox], input[type=radio] { accent-color: var(--rp-blue); width: 16px; height: 16px; margin: 0 4px 0 0; vertical-align: middle; }
.regular-text { width: 25em; max-width: 100%; }
.large-text, .widefat { width: 100%; }
.small-text { width: 5em; }
.rp-field { margin: 0 0 16px; }
.rp-field > label { display: block; font-weight: 600; margin-bottom: 4px; }
.rp-field-checkbox > label { font-weight: 400; }
.rp-field .required { color: var(--rp-red); }
.description, p.description { color: var(--rp-muted); font-size: 13px; font-style: normal; margin: 4px 0 0; }

/* ============================================================== 7. notices & toasts */
.notice { background: #fff; border: 1px solid var(--rp-border); border-left-width: 4px; box-shadow: 0 1px 1px rgba(0,0,0,.04); margin: 5px 0 15px; padding: 1px 12px; position: relative; }
.notice p { margin: .5em 0; padding: 2px; }
.notice.is-dismissible { padding-right: 38px; }
.notice-success { border-left-color: var(--rp-green); }
.notice-error { border-left-color: var(--rp-red); }
.notice-warning { border-left-color: var(--rp-yellow); }
.notice-info { border-left-color: var(--rp-blue-light); }
.notice-alt.notice-error { background: #fcf0f1; }
.notice.inline { margin: 10px 0; }
.notice-dismiss { position: absolute; top: 0; right: 1px; border: none; margin: 0; padding: 9px; background: none; color: #787c82; cursor: pointer; font-size: 16px; line-height: 1; }
.notice-dismiss::before { content: "×"; font-size: 20px; }
.notice-dismiss:hover { color: var(--rp-red); }
#rp-toasts { position: fixed; top: calc(var(--rp-bar-h) + 12px); right: 20px; z-index: 100100; width: min(420px, calc(100vw - 40px)); display: flex; flex-direction: column; gap: 8px; }
.rp-toast { margin: 0; box-shadow: 0 4px 12px rgba(0,0,0,.12); animation: rp-toast-in .18s ease-out; }
.rp-toast.is-leaving { opacity: 0; transform: translateX(16px); transition: opacity .18s, transform .18s; }
@keyframes rp-toast-in { from { opacity: 0; transform: translateY(-6px); } to { opacity: 1; transform: none; } }

/* ============================================================== 8. list tables */
.rp-list-top { display: flex; flex-wrap: wrap; justify-content: space-between; align-items: center; gap: 8px; margin: 8px 0 0; }
.subsubsub { list-style: none; margin: 0; padding: 0; font-size: 13px; color: var(--rp-muted); }
.subsubsub li { display: inline-block; margin: 0; padding: 0; white-space: nowrap; }
.subsubsub a { line-height: 2; padding: .2em; text-decoration: none; }
.subsubsub a.current { font-weight: 600; color: #000; }
.subsubsub .count { color: #50575e; font-weight: 400; }
.search-box { display: flex; gap: 4px; margin: 0; }
.search-box input[type=search] { width: 220px; }
.tablenav { clear: both; min-height: 30px; margin: 6px 0 4px; display: flex; flex-wrap: wrap; justify-content: flex-start; align-items: center; gap: 8px; }
.tablenav .actions { display: flex; align-items: center; gap: 6px; }
.tablenav.bottom { justify-content: flex-end; }
.tablenav-pages { display: flex; align-items: center; gap: 6px; margin-left: auto; }
.tablenav-pages .displaying-num { color: var(--rp-muted); margin-right: 4px; }
.tablenav-pages .pagination-links { display: inline-flex; align-items: center; gap: 4px; }
.tablenav-pages .button { min-width: 30px; padding: 0 6px; font-size: 16px; line-height: 1.6; }
.tablenav-pages .paging-input { display: inline-flex; align-items: center; gap: 4px; margin: 0 4px; color: var(--rp-muted); }
.tablenav-pages .current-page { width: 3.4em; text-align: center; padding: 0 4px; }
.rp-table-scroll { overflow-x: auto; }
.rp-list-table { border-spacing: 0; width: 100%; clear: both; margin: 0; background: #fff; border: 1px solid var(--rp-border); box-shadow: 0 1px 1px rgba(0,0,0,.04); table-layout: fixed; }
.rp-list-table th, .rp-list-table td { padding: 8px 10px; text-align: left; vertical-align: top; font-size: 13px; line-height: 1.5em; word-wrap: break-word; color: #50575e; }
.rp-list-table thead th, .rp-list-table thead td { border-bottom: 1px solid var(--rp-border); font-weight: 400; color: var(--rp-text-strong); }
.rp-list-table tfoot th, .rp-list-table tfoot td { border-top: 1px solid var(--rp-border); font-weight: 400; color: var(--rp-text-strong); }
.rp-list-table .rp-sort-link { display: inline-flex; align-items: center; gap: 4px; text-decoration: none; color: inherit; }
.rp-list-table .sorting-indicator { color: #a7aaad; font-size: 10px; visibility: hidden; }
.rp-list-table th.sorted .sorting-indicator, .rp-list-table th.sortable:hover .sorting-indicator { visibility: visible; color: var(--rp-text); }
.rp-list-table.striped > tbody > :nth-child(odd) { background-color: #f6f7f7; }
.rp-list-table tbody tr.is-checked { background-color: #f0f6fc !important; }
.rp-list-table .check-column { width: 2.2em; padding: 11px 0 0 3px; vertical-align: top; }
.rp-list-table thead .check-column, .rp-list-table tfoot .check-column { padding-top: 6px; }
.rp-list-table .column-primary strong { display: block; margin-bottom: .2em; font-size: 14px; }
.rp-list-table a { text-decoration: none; }
.rp-list-table .row-title { font-size: 14px; font-weight: 600; }
.rp-list-table .post-state { color: #50575e; font-weight: 600; }
.rp-list-table .column-comments { text-align: center; }
.rp-comment-count a { display: inline-block; min-width: 24px; padding: 0 6px; border-radius: 3px; background: #646970; color: #fff; text-decoration: none; font-size: 12px; line-height: 20px; position: relative; }
.rp-comment-count a::after { content: ""; position: absolute; left: 7px; bottom: -5px; border: 5px solid transparent; border-top-color: #646970; border-bottom: 0; border-left-width: 0; }
.rp-comment-count a.is-zero { background: #dcdcde; color: #50575e; }
.rp-comment-count a.is-zero::after { border-top-color: #dcdcde; }
.rp-comment-count a:hover { background: var(--rp-blue); }
.rp-comment-count a:hover::after { border-top-color: var(--rp-blue); }
.row-actions { color: #a7aaad; font-size: 13px; padding: 2px 0 0; position: relative; left: -9999em; }
.row-actions a { text-decoration: none; }
.row-actions a:hover { text-decoration: underline; }
tr:hover .row-actions, tr:focus-within .row-actions, .comment:hover .row-actions { position: static; }
.no-items td { color: var(--rp-muted); }
/* Quick edit */
.inline-edit-row td { padding: 0 !important; background: #fff; border-bottom: 1px solid var(--rp-border-light); }
.inline-edit-wrapper { padding: 12px 14px 14px; }
.inline-edit-cols { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 24px; }
.inline-edit-row fieldset { border: 0; margin: 0; padding: 0; min-width: 0; }
.inline-edit-legend { font-weight: 600; font-size: 14px; margin-bottom: 8px; color: var(--rp-text-strong); }
.inline-edit-row label { display: flex; align-items: center; gap: 8px; margin: 6px 0; }
.inline-edit-row label .title { flex: 0 0 6em; color: var(--rp-text); }
.inline-edit-row label.alignleft { display: inline-flex; }
.inline-edit-row label input[type=text], .inline-edit-row label textarea, .inline-edit-row label select { flex: 1; min-width: 0; }
.inline-edit-col-right .title { display: block; margin-bottom: 4px; }
.cat-checklist { list-style: none; margin: 0 0 8px; padding: 6px 8px; height: 10em; overflow-y: auto; border: 1px solid var(--rp-border-light); background: #fff; }
.cat-checklist li { margin: 0; }
.cat-checklist label { margin: 3px 0 !important; }
.inline-edit-save { display: flex; align-items: center; gap: 4px; margin-top: 12px; }

/* ============================================================== 9. cards / postboxes */
.card, .postbox { background: #fff; border: 1px solid var(--rp-border); box-shadow: 0 1px 1px rgba(0,0,0,.04); margin: 0 0 20px; }
.card { padding: 12px 20px; margin-top: 20px; }
.postbox-header { border-bottom: 1px solid var(--rp-border-light); display: flex; align-items: center; justify-content: space-between; }
.postbox .hndle { font-size: 14px; padding: 8px 12px; margin: 0; line-height: 1.4; font-weight: 600; }
.postbox .inside { padding: 0 12px 12px; margin: 11px 0 0; line-height: 1.4; font-size: 13px; }
.form-table { border-collapse: collapse; width: 100%; margin-top: .5em; }
.form-table th { width: 200px; padding: 20px 10px 20px 0; text-align: left; vertical-align: top; font-weight: 600; color: var(--rp-text-strong); }
.form-table td { padding: 15px 10px; vertical-align: middle; }

/* ============================================================== 10. dashboard */
.welcome-panel { position: relative; overflow: hidden; margin: 16px 0 20px; background: #151b47 linear-gradient(120deg, #1d2a6b 0%, #3858e9 55%, #4ab866 130%); color: #fff; border-radius: 8px; padding: 32px 32px 28px; }
.welcome-panel::after { content: ""; position: absolute; right: -60px; top: -80px; width: 300px; height: 300px; border-radius: 50%; border: 40px solid rgba(255,255,255,.07); pointer-events: none; }
.welcome-panel h2 { color: #fff; font-size: 30px; line-height: 1.2; font-weight: 400; margin: 0 0 6px; font-family: var(--rp-serif); }
.welcome-panel-header p { font-size: 16px; margin: 0 0 22px; opacity: .9; }
.welcome-panel-close { position: absolute; top: 12px; right: 14px; background: none; border: 0; color: #fff; font: 13px var(--rp-font); cursor: pointer; text-decoration: underline; z-index: 1; opacity: .85; }
.welcome-panel-close::before { content: "× "; text-decoration: none; }
.welcome-panel-columns { display: grid; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); gap: 24px; position: relative; z-index: 1; }
.welcome-panel-column { display: flex; gap: 14px; background: rgba(255,255,255,.1); border-radius: 6px; padding: 16px; }
.welcome-icon { flex: 0 0 40px; height: 40px; border-radius: 50%; background: rgba(255,255,255,.18); display: flex; align-items: center; justify-content: center; font-size: 20px; }
.welcome-panel-column h3 { color: #fff; font-size: 15px; margin: 0 0 6px; }
.welcome-panel-column p { margin: 0 0 8px; opacity: .88; line-height: 1.5; }
.welcome-panel-column a { color: #fff; font-weight: 600; }
#dashboard-widgets { display: grid; grid-template-columns: repeat(auto-fit, minmax(340px, 1fr)); gap: 0 20px; align-items: start; margin-top: 10px; }
.rp-glance { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: 1fr 1fr; gap: 8px 12px; }
.rp-glance li { display: flex; align-items: center; gap: 6px; }
.rp-glance li::before { color: #646970; font-size: 14px; }
.rp-glance .post-count::before { content: "📝"; }
.rp-glance .page-count::before { content: "📄"; }
.rp-glance .comment-count::before { content: "💬"; }
.rp-glance .comment-mod-count::before { content: "⏳"; }
.rp-glance a { text-decoration: none; }
.rp-glance-foot { margin: 12px -12px -12px; padding: 10px 12px; border-top: 1px solid #f0f0f1; background: #f6f7f7; color: var(--rp-muted); }
.activity-block { border-bottom: 1px solid #f0f0f1; padding-bottom: 10px; margin-bottom: 10px; }
.activity-block:last-child { border-bottom: 0; margin-bottom: 0; }
.activity-block h3 { font-size: 14px; font-weight: 400; color: var(--rp-muted); margin: 8px 0; }
.activity-block > ul { list-style: none; margin: 0; padding: 0; }
.activity-block > ul > li { display: grid; grid-template-columns: 11.5em 1fr; gap: 8px; margin-bottom: 6px; }
.rp-activity-date { color: var(--rp-muted); }
#the-comment-list .comment { display: grid !important; grid-template-columns: 44px 1fr !important; gap: 10px; padding: 10px 0; border-top: 1px solid #f0f0f1; }
#the-comment-list .comment.unapproved { background: #fcf9e8; margin: 0 -12px; padding: 10px 12px; border-left: 4px solid var(--rp-yellow); }
.rp-comment-avatar { width: 40px; height: 40px; border-radius: 50%; background: #dcdcde; color: #50575e; display: flex; align-items: center; justify-content: center; font-weight: 600; font-size: 16px; }
.dashboard-comment-wrap .comment-meta { margin: 0 0 4px; }
.dashboard-comment-wrap .approve { color: #996800; font-weight: 600; }
.dashboard-comment-wrap blockquote { margin: 0; }
.dashboard-comment-wrap blockquote p { margin: 0; color: var(--rp-text); }
.dashboard-comment-wrap .row-actions { margin: 4px 0 0; left: auto; position: static; opacity: 0; transition: opacity .1s; }
.dashboard-comment-wrap:hover .row-actions, .dashboard-comment-wrap:focus-within .row-actions { opacity: 1; }
.rp-activity-more { margin: 8px 0 0; }
.no-activity { text-align: center; color: var(--rp-muted); }
.no-activity .smiley { font-size: 32px; margin: 10px 0 0; }
#quick-press .input-text-wrap, #quick-press .textarea-wrap { margin: 0 0 12px; }
#quick-press label { display: block; margin-bottom: 4px; color: var(--rp-text-strong); }
#quick-press textarea { resize: vertical; min-height: 90px; }
#quick-press .submit { margin: 0; }
#dashboard_quick_press .drafts { border-top: 1px solid #f0f0f1; margin: 12px -12px 0; padding: 4px 12px 0; }
#dashboard_quick_press .drafts h3 { font-size: 14px; font-weight: 400; color: var(--rp-muted); display: flex; justify-content: space-between; }
#dashboard_quick_press .drafts ul { list-style: none; margin: 0; padding: 0; }
#dashboard_quick_press .drafts li { margin-bottom: 10px; }
#dashboard_quick_press .drafts .draft-title { display: flex; gap: 6px; flex-wrap: wrap; }
#dashboard_quick_press .drafts time { color: var(--rp-muted); }
#dashboard_quick_press .drafts p { margin: 2px 0 0; color: var(--rp-muted); }
.rp-my-sites { list-style: none; margin: 0; padding: 0; }
.rp-my-sites li { padding: 6px 0; border-top: 1px solid #f0f0f1; }

/* ============================================================== 11. modal */
.rp-modal-backdrop { position: fixed; inset: 0; background: rgba(0,0,0,.7); z-index: 100050; display: flex; align-items: center; justify-content: center; padding: 20px; animation: rp-fade .12s ease-out; }
@keyframes rp-fade { from { opacity: 0; } to { opacity: 1; } }
.rp-modal { background: #fff; box-shadow: 0 5px 15px rgba(0,0,0,.7); display: flex; flex-direction: column; max-height: calc(100vh - 40px); width: 600px; max-width: 100%; border-radius: 2px; outline: none; }
.rp-modal-small { width: 440px; }
.rp-modal-large { width: 960px; }
.rp-modal-full { width: calc(100vw - 60px); height: calc(100vh - 60px); }
.rp-modal-header { display: flex; justify-content: space-between; align-items: center; border-bottom: 1px solid var(--rp-border-light); padding: 0 8px 0 16px; flex: 0 0 auto; }
.rp-modal-header h2 { font-size: 20px; font-weight: 600; margin: 14px 0; }
.rp-modal-close { border: 0; background: none; font-size: 28px; line-height: 1; width: 40px; height: 40px; cursor: pointer; color: var(--rp-muted); border-radius: 2px; }
.rp-modal-close:hover { color: var(--rp-blue); }
.rp-modal-content { padding: 16px; overflow: auto; flex: 1; min-height: 0; }
.rp-modal-full .rp-modal-content { padding: 0; display: flex; }
.rp-modal-footer { display: flex; justify-content: flex-end; gap: 8px; border-top: 1px solid var(--rp-border-light); padding: 12px 16px; flex: 0 0 auto; }
.rp-confirm-text { font-size: 14px; margin: 4px 0; }
.rp-shortcuts { width: 100%; border-collapse: collapse; }
.rp-shortcuts td { padding: 8px 4px; border-bottom: 1px solid #f0f0f1; }
.rp-shortcuts td:last-child { text-align: right; }

/* ============================================================== 12. media picker */
.rp-mp { display: flex; flex-direction: column; width: 100%; min-height: 0; }
.rp-mp-tabs { display: flex; gap: 4px; padding: 0 16px; border-bottom: 1px solid var(--rp-border-light); flex: 0 0 auto; }
.rp-mp-tab { background: none; border: 0; border-bottom: 4px solid transparent; padding: 12px 10px 8px; font: 14px var(--rp-font); color: var(--rp-text); cursor: pointer; }
.rp-mp-tab:hover { color: var(--rp-blue); }
.rp-mp-tab.is-active { border-bottom-color: var(--rp-blue); color: var(--rp-text-strong); font-weight: 600; }
.rp-mp-upload, .rp-mp-library { flex: 1; min-height: 0; display: flex; flex-direction: column; }
.rp-mp-drop { flex: 1; margin: 16px; border: 4px dashed var(--rp-border-light); display: flex; flex-direction: column; align-items: center; justify-content: center; text-align: center; padding: 20px; gap: 4px; }
.rp-mp-drop.is-dragging { border-color: var(--rp-blue); background: #f0f6fc; }
.rp-mp-drop h2 { font-size: 20px; font-weight: 400; margin: 0; }
.rp-mp-drop p { margin: 4px 0; }
.rp-mp-uploads { list-style: none; margin: 16px 0 0; padding: 0; width: min(420px, 100%); text-align: left; }
.rp-mp-uploads li { display: flex; align-items: center; justify-content: space-between; gap: 10px; padding: 6px 0; }
.rp-mp-uploads li.is-error { color: var(--rp-red-dark); }
.rp-mp-uploads progress { width: 160px; }
.rp-mp-toolbar { display: flex; gap: 8px; justify-content: flex-end; padding: 10px 16px; border-bottom: 1px solid #f0f0f1; flex: 0 0 auto; }
.rp-mp-search { width: 240px; }
.rp-mp-browser { flex: 1; min-height: 0; display: flex; }
.rp-mp-scroll { flex: 1; min-width: 0; overflow-y: auto; padding: 12px 16px; }
.rp-mp-grid { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(auto-fill, minmax(130px, 1fr)); gap: 12px; }
.rp-mp-item { position: relative; aspect-ratio: 1; background: #f0f0f1; cursor: pointer; overflow: hidden; box-shadow: inset 0 0 15px rgba(0,0,0,.1), inset 0 0 0 1px rgba(0,0,0,.05); outline: none; }
.rp-mp-item img { width: 100%; height: 100%; object-fit: cover; display: block; }
.rp-mp-item:hover { box-shadow: inset 0 0 0 3px #fff, inset 0 0 0 5px var(--rp-blue-light); }
.rp-mp-item:focus-visible { box-shadow: inset 0 0 2px 3px #fff, inset 0 0 0 7px var(--rp-blue); }
.rp-mp-item.is-selected { box-shadow: inset 0 0 0 3px #fff, inset 0 0 0 7px var(--rp-blue); }
.rp-mp-check { display: none; position: absolute; top: 0; right: 0; width: 24px; height: 24px; background: var(--rp-blue); color: #fff; font-size: 14px; line-height: 24px; text-align: center; box-shadow: 0 0 0 1px #fff, 0 0 0 2px var(--rp-blue); }
.rp-mp-item.is-selected .rp-mp-check { display: block; }
.rp-mp-file { height: 100%; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 6px; padding: 8px; text-align: center; }
.rp-mp-file-icon { font-size: 36px; }
.rp-mp-file-name { font-size: 12px; word-break: break-all; color: var(--rp-text); }
.rp-mp-status { color: var(--rp-muted); text-align: center; margin: 16px 0 8px; display: flex; justify-content: center; align-items: center; }
.rp-mp-more { display: block; margin: 0 auto 16px; }
.rp-mp-details { width: 280px; flex: 0 0 280px; overflow-y: auto; background: #f6f7f7; border-left: 1px solid var(--rp-border-light); padding: 0 16px 16px; }
.rp-mp-details h3 { font-size: 12px; text-transform: uppercase; color: var(--rp-muted); margin: 16px 0 10px; font-weight: 600; letter-spacing: .02em; }
.rp-mp-preview { background: #fff; border: 1px solid var(--rp-border-light); max-height: 180px; display: flex; align-items: center; justify-content: center; overflow: hidden; margin-bottom: 10px; }
.rp-mp-preview img { max-width: 100%; max-height: 180px; display: block; }
.rp-mp-meta { font-size: 12px; color: var(--rp-muted); line-height: 1.6; border-bottom: 1px solid var(--rp-border-light); padding-bottom: 10px; margin-bottom: 10px; }
.rp-mp-meta strong { color: var(--rp-text-strong); word-break: break-all; }
.rp-mp-field, .rp-mp-url { display: block; margin: 8px 0; }
.rp-mp-field span, .rp-mp-url span { display: block; font-size: 12px; color: var(--rp-muted); margin-bottom: 2px; }
.rp-mp-field input, .rp-mp-field textarea, .rp-mp-url input { width: 100%; font-size: 13px; }
.rp-mp-saved { font-size: 12px; color: var(--rp-green); }

/* ============================================================== 13. block editor */
.rp-editor-root { min-height: 100vh; }
.rp-editor-loading, .rp-editor-fatal { padding: 40px; }
.rp-editor-loading { display: flex; align-items: center; justify-content: center; min-height: 60vh; color: var(--rp-muted); font-size: 14px; }
.rp-editor-fatal { max-width: 760px; margin: 0 auto; }
.rp-editor { position: fixed; inset: 0; z-index: 9995; display: flex; flex-direction: column; background: #fff; color: var(--rp-editor-ink); font: 13px/1.4 var(--rp-font); }
.rp-icon { display: block; flex: 0 0 auto; }

/* header */
.rp-editor-header { flex: 0 0 60px; height: 60px; display: flex; align-items: center; justify-content: space-between; gap: 8px; border-bottom: 1px solid #e0e0e0; background: #fff; padding-right: 8px; position: relative; z-index: 30; }
.rp-editor-header-left, .rp-editor-header-right { display: flex; align-items: center; gap: 4px; min-width: 0; }
.rp-editor-header-right { gap: 8px; }
.rp-editor-back { display: flex; align-items: center; justify-content: center; width: 60px; height: 60px; background: var(--rp-editor-ink); color: #fff; flex: 0 0 60px; margin-right: 8px; transition: background .1s; }
.rp-editor-logo { display: inline-flex; align-items: center; justify-content: center; width: 32px; height: 32px; border-radius: 50%; border: 2px solid currentColor; font: 700 17px/1 var(--rp-serif); }
.rp-editor-back:hover, .rp-editor-back:focus { background: #000; color: #fff; box-shadow: inset 0 0 0 2px var(--rp-accent); }
.rp-editor-doctitle { flex: 1; min-width: 0; display: flex; justify-content: center; align-items: center; }
.rp-editor-doctitle { background: #f0f0f0; border-radius: 4px; max-width: 420px; height: 36px; padding: 0 16px; font-size: 13px; color: var(--rp-editor-ink); white-space: nowrap; overflow: hidden; }
.rp-doctitle-text { overflow: hidden; text-overflow: ellipsis; font-weight: 500; }
.rp-doctitle-type { color: #757575; flex: 0 0 auto; margin-left: 4px; }
.rp-save-state { color: #757575; font-size: 13px; white-space: nowrap; }
.rp-tb-btn { display: inline-flex; align-items: center; justify-content: center; gap: 4px; min-width: 36px; height: 36px; padding: 6px; border: 0; border-radius: 2px; background: none; color: var(--rp-editor-ink); cursor: pointer; font: 13px var(--rp-font); }
.rp-tb-btn.has-text { padding: 6px 10px; }
.rp-tb-btn:hover:not(:disabled) { color: var(--rp-accent); }
.rp-tb-btn:focus-visible { box-shadow: inset 0 0 0 2px var(--rp-accent); outline: none; }
.rp-tb-btn:disabled { opacity: .3; cursor: default; }
.rp-tb-btn.is-pressed, .rp-tb-btn.is-open { background: var(--rp-editor-ink); color: #fff; }
.rp-tb-btn.is-pressed:hover { color: #fff; }
.rp-tb-text { white-space: nowrap; }
.rp-inserter-toggle { background: var(--rp-accent); color: #fff; width: 32px; min-width: 32px; height: 32px; margin: 0 6px 0 0; padding: 4px; }
.rp-inserter-toggle:hover:not(:disabled) { background: #2145e6; color: #fff; }
.rp-inserter-toggle.is-pressed { background: var(--rp-editor-ink); }
.rp-inserter-toggle .rp-icon { transition: transform .2s; }
.rp-inserter-toggle.is-pressed .rp-icon { transform: rotate(45deg); }
.rp-editor .button { height: 36px; min-height: 36px; border-radius: 2px; padding: 0 12px; font-size: 13px; line-height: 1; }
.rp-editor .button-primary { background: var(--rp-accent); border-color: var(--rp-accent); }
.rp-editor .button-primary:hover { background: #2145e6; border-color: #2145e6; }
.rp-editor .button-primary:disabled { background: #e0e0e0 !important; border-color: #e0e0e0 !important; color: #a7aaad !important; }
.rp-btn-tertiary { background: none !important; border-color: transparent !important; color: var(--rp-accent) !important; }
.rp-btn-tertiary:hover:not(:disabled) { color: #2145e6 !important; background: #f0f0f0 !important; }
.rp-btn-tertiary:disabled { color: #757575 !important; background: none !important; }
.rp-btn-tertiary { display: inline-flex; align-items: center; gap: 4px; }
.rp-btn-tertiary .rp-draft-icon { display: none; }
.rp-btn-tertiary[hidden] { display: none; }
.rp-btn-secondary { background: #fff !important; border-color: var(--rp-accent) !important; color: var(--rp-accent) !important; }
.rp-btn-secondary:hover:not(:disabled) { background: #f0f3ff !important; }
.rp-publish { min-width: 96px; }

/* notices & snackbars */
.rp-editor-notices:empty { display: none; }
.rp-editor-notice { display: flex; align-items: center; justify-content: space-between; gap: 8px; padding: 4px 4px 4px 16px; border-left: 4px solid var(--rp-red); background: #f4a2a2; }
.rp-editor-notice.is-error { background: #fcf0f1; }
.rp-editor-notice.is-warning { border-left-color: #f0b849; background: #fef8ee; }
.rp-editor-notice.is-info { border-left-color: var(--rp-accent); background: #f0f6fc; }
.rp-editor-notice p { margin: 8px 0; }
.rp-snackbars { position: absolute; left: 24px; bottom: 24px; z-index: 40; display: flex; flex-direction: column; gap: 8px; pointer-events: none; }
.rp-snackbar { pointer-events: auto; background: var(--rp-editor-ink); color: #fff; border-radius: 2px; padding: 14px 24px; box-shadow: 0 1px 2px rgba(0,0,0,.05), 0 2px 3px rgba(0,0,0,.04), 0 6px 6px rgba(0,0,0,.03), 0 8px 8px rgba(0,0,0,.02); font-size: 13px; display: flex; gap: 16px; align-items: center; max-width: 600px; animation: rp-snack-in .2s ease-out; }
.rp-snackbar a { color: #fff; text-decoration: underline; }
.rp-snackbar.is-leaving { opacity: 0; transition: opacity .4s; }
@keyframes rp-snack-in { from { opacity: 0; transform: translateY(12px); } to { opacity: 1; transform: none; } }

/* body columns */
.rp-editor-body { flex: 1; display: flex; min-height: 0; position: relative; }
.rp-editor-canvas { flex: 1; min-width: 0; overflow-y: auto; position: relative; background: #fff; scroll-padding: 80px; }
.rp-editor-visual { position: relative; padding: 48px 32px 40vh; max-width: 100%; }
.rp-editor-title-wrap, .rp-editor-blocks, .rp-block-appender { max-width: 760px; margin-left: auto; margin-right: auto; }
.rp-editor-title { display: block; width: 100%; border: 0 !important; box-shadow: none !important; resize: none; overflow: hidden; padding: 0; margin: 0 0 32px; background: none; font: 600 40px/1.2 var(--rp-serif) !important; color: var(--rp-editor-ink); min-height: 0 !important; }
.rp-editor-title::placeholder { color: #8c8f94; }

/* blocks */
.rp-editor-blocks { font: 18px/1.7 var(--rp-serif); color: var(--rp-editor-ink); }
.rp-block { position: relative; margin: 0 0 28px; outline: none; border-radius: 2px; }
.rp-block:focus-visible { box-shadow: 0 0 0 1.5px var(--rp-accent); }
.rp-block.is-selected:not(.rp-block--paragraph):not(.rp-block--heading) { box-shadow: 0 0 0 1.5px var(--rp-accent); }
.rp-block.is-selected.rp-block--paragraph, .rp-block.is-selected.rp-block--heading { box-shadow: none; }
.rp-block [contenteditable="true"] { outline: none; white-space: pre-wrap; word-wrap: break-word; caret-color: var(--rp-editor-ink); min-height: 1.7em; }
.rp-block [contenteditable="true"] a { color: var(--rp-blue); }
.rp-block [contenteditable="true"] code { font-family: var(--rp-mono); font-size: .85em; background: #f0f0f0; padding: 1px 4px; border-radius: 2px; }
.rp-block [data-placeholder].is-empty::before { content: attr(data-placeholder); position: absolute; color: #8c8f94; pointer-events: none; font-style: normal; }
.rp-block .rp-paragraph.is-empty::before { display: none; }
.rp-block.is-selected .rp-paragraph.is-empty::before, .rp-editor-blocks > .rp-block:only-child .rp-paragraph.is-empty::before { display: block; }
.rp-paragraph { margin: 0; }
.rp-block .rp-block-heading { font-family: var(--rp-serif); font-weight: 600; line-height: 1.3; margin: 0; color: var(--rp-editor-ink); }
.rp-block h1.rp-block-heading { font-size: 2.4em; }
.rp-block h2.rp-block-heading { font-size: 1.8em; }
.rp-block h3.rp-block-heading { font-size: 1.45em; }
.rp-block h4.rp-block-heading { font-size: 1.2em; }
.rp-block h5.rp-block-heading { font-size: 1em; }
.rp-block h6.rp-block-heading { font-size: .85em; text-transform: uppercase; letter-spacing: .04em; }
.rp-block .rp-block-list { margin: 0; padding-left: 1.4em; position: relative; }
.rp-block .rp-block-list li { margin: .2em 0; padding-left: .2em; }
.rp-block .rp-block-list.is-empty::before { left: 1.6em; top: 0; }
.rp-block .rp-block-quote { margin: 0; border-left: 4px solid var(--rp-editor-ink); padding-left: 1em; }
.rp-block .rp-quote-body { position: relative; }
.rp-block .rp-quote-body p { margin: 0 0 .6em; }
.rp-block .rp-quote-body.is-empty::before { top: 0; }
.rp-block .rp-quote-cite { display: block; font-size: .8em; font-style: normal; color: #50575e; position: relative; }
.rp-block .rp-quote-cite::after { content: none; }
.rp-block:not(.is-selected) .rp-quote-cite.is-empty, .rp-block:not(.is-selected) .rp-image-caption.is-empty { display: none; }
.rp-block .rp-block-image { margin: 0; text-align: center; }
.rp-block .rp-block-image img { max-width: 100%; height: auto; display: inline-block; vertical-align: top; }
.rp-block .rp-block-image.size-thumbnail img { max-width: 150px; }
.rp-block .rp-block-image.size-medium img { max-width: 300px; }
.rp-image-caption { display: block; position: relative; margin-top: .5em; font: 13px/1.5 var(--rp-font); color: #50575e; text-align: center; }
.rp-image-caption.is-empty::before { left: 0; right: 0; text-align: center; }
.rp-code { margin: 0; padding: 0; background: #f6f7f7; border: 1px solid #e0e0e0; border-radius: 2px; }
.rp-code-input, .rp-html-input { display: block; width: 100%; border: 0 !important; box-shadow: none !important; background: none; resize: none; overflow: hidden; font: 14px/1.6 var(--rp-mono) !important; color: var(--rp-editor-ink); padding: 14px 16px; min-height: 52px; tab-size: 4; }
.rp-html-block { border: 1px solid #e0e0e0; border-radius: 2px; background: #fff; }
.rp-html-label { display: flex; align-items: center; gap: 4px; font: 600 11px var(--rp-font); text-transform: uppercase; letter-spacing: .04em; color: #757575; padding: 6px 12px 0; }
.rp-html-input { background: #fafafa; }
.rp-html-preview { display: block; width: 100%; border: 0; min-height: 40px; padding: 0 12px; background: #fff; }
.rp-separator { padding: 12px 0; }
.rp-separator hr { border: 0; border-top: 2px solid #8c8f94; width: 100px; margin: 0 auto; }
.rp-block .rp-block-buttons { display: flex; flex-wrap: wrap; gap: 10px; align-items: center; }
.rp-block .rp-block-button__link { display: inline-block; min-width: 4em; padding: .6em 1.4em; border-radius: 999px; background: var(--rp-editor-ink); color: #fff !important; font: 600 16px/1.4 var(--rp-font); cursor: text; position: relative; text-align: center; }
.rp-block .rp-block-button__link.is-empty::before { position: static !important; color: rgba(255,255,255,.6) !important; }
.rp-buttons-add { display: none; width: 32px; height: 32px; border-radius: 2px; border: 0; background: var(--rp-editor-ink); color: #fff; cursor: pointer; align-items: center; justify-content: center; }
.rp-block.is-selected .rp-buttons-add { display: inline-flex; }

/* placeholders */
.rp-placeholder { font: 13px/1.5 var(--rp-font); padding: 24px; border-radius: 2px; box-shadow: inset 0 0 0 1px var(--rp-editor-ink); background: #fff; color: var(--rp-editor-ink); min-height: 200px; display: flex; flex-direction: column; gap: 8px; }
.rp-placeholder.is-dragging { box-shadow: inset 0 0 0 2px var(--rp-accent); background: #f0f3ff; }
.rp-placeholder-label { display: flex; align-items: center; gap: 8px; font-weight: 600; font-size: 13px; }
.rp-placeholder-instructions { margin: 0 0 8px; }
.rp-placeholder-actions { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; }
.rp-placeholder .button { height: 36px; }
.rp-placeholder .button-link { text-decoration: none; color: var(--rp-accent); padding: 0 8px; }
.rp-placeholder-url { display: flex; gap: 6px; margin-top: 8px; }
.rp-placeholder-url input { flex: 1; }
.rp-placeholder-status { display: flex; align-items: center; gap: 8px; margin: 0; min-height: 20px; color: #50575e; }
.rp-placeholder-status:empty { display: none; }

/* inline inserter & appender */
.rp-inline-inserter { display: none; position: absolute; right: -44px; top: 50%; transform: translateY(-50%); width: 32px; height: 32px; border-radius: 2px; border: 0; background: var(--rp-editor-ink); color: #fff; cursor: pointer; align-items: center; justify-content: center; }
.rp-block.is-selected.rp-block--paragraph:has(.rp-paragraph.is-empty) .rp-inline-inserter { display: inline-flex; }
.rp-block-appender { display: flex; align-items: center; justify-content: space-between; width: 100%; padding: 6px 0; border: 0; background: none; color: #8c8f94; font: 18px/1.7 var(--rp-serif); cursor: text; text-align: left; opacity: .6; }
.rp-block-appender:hover { opacity: 1; }
.rp-appender-plus { display: inline-flex; align-items: center; justify-content: center; width: 32px; height: 32px; border-radius: 2px; background: var(--rp-editor-ink); color: #fff; cursor: pointer; }
.rp-editor-blocks:has(> .rp-block:last-child .rp-paragraph.is-empty) + .rp-block-appender { visibility: hidden; }

/* block toolbar */
.rp-block-toolbar { position: absolute; z-index: 20; display: flex; align-items: stretch; background: #fff; border: 1px solid var(--rp-editor-ink); border-radius: 2px; height: 48px; box-shadow: 0 2px 6px rgba(0,0,0,.05); transition: opacity .1s; white-space: nowrap; }
.rp-editor-visual.is-typing .rp-block-toolbar { opacity: 0; pointer-events: none; }
.rp-toolbar-group { display: flex; align-items: center; padding: 0 5px; border-right: 1px solid var(--rp-editor-ink); }
.rp-toolbar-group:last-child { border-right: 0; }
.rp-block-toolbar .rp-tb-btn { height: 36px; min-width: 36px; }
.rp-block-toolbar .rp-switcher { min-width: 44px; }

/* popovers & menus */
.rp-popover { position: fixed; z-index: 100060; background: #fff; border: 1px solid #ccc; box-shadow: 0 2px 6px rgba(0,0,0,.05), 0 8px 24px rgba(0,0,0,.12); border-radius: 2px; padding: 8px; font: 13px/1.4 var(--rp-font); color: var(--rp-editor-ink); min-width: 200px; }
.rp-menu { display: flex; flex-direction: column; min-width: 200px; }
.rp-menu-item { display: flex; align-items: center; gap: 8px; width: 100%; padding: 6px 8px; min-height: 36px; border: 0; background: none; border-radius: 2px; font: 13px var(--rp-font); color: var(--rp-editor-ink); cursor: pointer; text-align: left; }
.rp-menu-item:hover, .rp-menu-item:focus { color: var(--rp-accent); outline: none; }
.rp-menu-item:focus-visible { box-shadow: inset 0 0 0 2px var(--rp-accent); }
.rp-menu-item.is-active { font-weight: 600; }
.rp-menu-item.is-danger { color: #cc1818; }
.rp-menu-label { flex: 1; }
.rp-menu-shortcut { background: none; border: 0; color: #757575; font-size: 12px; padding: 0; }
.rp-menu-sep { border-top: 1px solid #e0e0e0; margin: 6px -8px; }
.rp-link-form { display: flex; flex-direction: column; gap: 8px; width: 340px; max-width: calc(100vw - 32px); }
.rp-link-row { display: flex; gap: 6px; }
.rp-link-input { flex: 1; min-width: 0; height: 36px; }
.rp-link-newtab { display: flex; align-items: center; gap: 4px; }
.rp-slash-menu { padding: 6px; min-width: 240px; }
.rp-slash-item { display: flex; align-items: center; gap: 10px; width: 100%; padding: 6px 8px; border: 0; background: none; border-radius: 2px; font: 13px var(--rp-font); color: var(--rp-editor-ink); cursor: pointer; text-align: left; }
.rp-slash-item.is-active, .rp-slash-item:hover { background: var(--rp-accent); color: #fff; }
.rp-slash-empty { padding: 8px; color: #757575; }

/* inserter panel */
.rp-inserter-slot { display: contents; }
.rp-editor-inserter { width: 350px; flex: 0 0 350px; border-right: 1px solid #e0e0e0; background: #fff; display: flex; flex-direction: column; overflow-y: auto; }
.rp-panel-header { display: flex; align-items: center; justify-content: space-between; padding: 8px 8px 8px 16px; border-bottom: 1px solid #e0e0e0; }
.rp-panel-header h2 { font-size: 13px; margin: 0; font-weight: 600; }
.rp-inserter-search-wrap { margin: 16px; display: flex; align-items: center; gap: 4px; background: #f0f0f0; border-radius: 2px; padding: 0 8px; color: #757575; }
.rp-inserter-search { flex: 1; border: 0 !important; background: none !important; box-shadow: none !important; height: 40px; font-size: 13px; }
.rp-inserter-cat { padding: 0 16px; font-size: 11px; text-transform: uppercase; font-weight: 500; color: #757575; letter-spacing: .02em; }
.rp-inserter-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; padding: 8px 16px 16px; }
.rp-inserter-item { display: flex; flex-direction: column; align-items: center; gap: 8px; padding: 14px 4px 10px; border: 0; background: none; border-radius: 2px; cursor: pointer; color: var(--rp-editor-ink); font: 13px/1.3 var(--rp-font); }
.rp-inserter-item:hover, .rp-inserter-item:focus { color: var(--rp-accent); box-shadow: inset 0 0 0 1px var(--rp-accent); outline: none; }
.rp-inserter-preview { margin-top: auto; padding: 16px; border-top: 1px solid #e0e0e0; min-height: 90px; color: #50575e; }
.rp-inserter-preview strong { color: var(--rp-editor-ink); }
.rp-inserter-preview p { margin: 4px 0 0; }
.rp-inserter-empty { grid-column: 1 / -1; color: #757575; text-align: center; }

/* sidebar */
.rp-editor-sidebar { display: none; width: 280px; flex: 0 0 280px; border-left: 1px solid #e0e0e0; background: #fff; flex-direction: column; overflow: hidden; }
.rp-editor.is-sidebar-open .rp-editor-sidebar { display: flex; }
.rp-sidebar-tabs { display: flex; align-items: center; border-bottom: 1px solid #e0e0e0; padding: 0 4px 0 0; flex: 0 0 48px; }
.rp-sidebar-tablist { display: flex; align-items: stretch; }
.rp-sidebar-tab { height: 48px; padding: 3px 16px 0; border: 0; border-bottom: 3px solid transparent; background: none; font: 500 13px var(--rp-font); color: var(--rp-editor-ink); cursor: pointer; }
.rp-sidebar-tab.is-active { border-bottom-color: var(--rp-accent); font-weight: 600; }
.rp-sidebar-tab:hover { color: var(--rp-accent); }
.rp-sidebar-close { margin-left: auto; }
.rp-sidebar-body { flex: 1; overflow-y: auto; }
.rp-sidebar-empty { padding: 16px; color: #757575; }
.rp-panel { border-bottom: 1px solid #e0e0e0; }
.rp-panel-title { margin: 0; font-size: 13px; }
.rp-panel-toggle { display: flex; align-items: center; justify-content: space-between; width: 100%; padding: 16px; border: 0; background: none; font: 500 13px var(--rp-font); color: var(--rp-editor-ink); cursor: pointer; text-align: left; }
.rp-panel-toggle:hover { background: #f0f0f0; }
.rp-panel-body { display: none; padding: 0 16px 16px; }
.rp-panel.is-open .rp-panel-body { display: block; }
.rp-post-row { display: flex; align-items: flex-start; justify-content: space-between; gap: 8px; min-height: 32px; margin: 4px 0; }
.rp-post-row-label { flex: 0 0 38%; padding-top: 6px; color: var(--rp-editor-ink); }
.rp-post-row-control { flex: 1; min-width: 0; padding-top: 6px; text-align: left; }
.rp-post-row-control select { width: 100%; }
.rp-schedule-toggle { text-decoration: none; color: var(--rp-accent); font-weight: 500; }
.rp-schedule-editor { margin-top: 6px; display: flex; flex-direction: column; gap: 6px; align-items: flex-start; }
.rp-schedule-editor input { width: 100%; }
.rp-schedule-note { margin-top: 4px; }
.rp-post-check { display: flex; align-items: center; gap: 4px; margin: 10px 0; }
.rp-post-actions { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 12px; padding-top: 12px; border-top: 1px solid #f0f0f0; }
.rp-post-actions .button-link-delete { text-decoration: none; padding: 0; }
.rp-inspector-label { display: flex; flex-direction: column; gap: 6px; margin: 0 0 12px; font-weight: 500; font-size: 11px; text-transform: uppercase; letter-spacing: .02em; color: var(--rp-editor-ink); }
.rp-inspector-label input, .rp-inspector-label select, .rp-inspector-label textarea { text-transform: none; letter-spacing: 0; font-weight: 400; }
.rp-permalink-preview { word-break: break-all; margin: 8px 0 0; color: #50575e; }
.rp-permalink-preview a { display: inline-flex; align-items: center; gap: 4px; word-break: break-all; }
.rp-cat-list { max-height: 220px; overflow-y: auto; margin: 8px 0; }
.rp-checklist { list-style: none; margin: 0; padding: 0; }
.rp-checklist li { margin: 0; }
.rp-checklist label { display: flex; align-items: center; gap: 4px; padding: 3px 0; }
.rp-cat-add-toggle { color: var(--rp-accent); }
.rp-cat-add { display: flex; flex-direction: column; gap: 8px; margin-top: 10px; }
.rp-cat-add label { display: flex; flex-direction: column; gap: 4px; }
.rp-cat-add .button { align-self: flex-start; }
.rp-token-field { position: relative; border: 1px solid #949494; border-radius: 2px; padding: 4px; background: #fff; cursor: text; }
.rp-token-field:focus-within { border-color: var(--rp-accent); box-shadow: 0 0 0 1px var(--rp-accent); }
.rp-tokens { display: flex; flex-wrap: wrap; gap: 4px; align-items: center; }
.rp-token { display: inline-flex; align-items: center; gap: 2px; background: #ddd; border-radius: 2px; padding: 0 0 0 8px; font-size: 13px; line-height: 24px; max-width: 100%; }
.rp-token span { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.rp-token button { border: 0; background: none; width: 24px; height: 24px; padding: 4px; cursor: pointer; color: #50575e; display: flex; align-items: center; justify-content: center; }
.rp-token button:hover { color: #cc1818; }
.rp-token-input { flex: 1; min-width: 80px; border: 0 !important; box-shadow: none !important; min-height: 24px !important; line-height: 24px !important; padding: 0 4px !important; font-size: 13px !important; }
.rp-token-suggestions { position: absolute; left: -1px; right: -1px; top: 100%; z-index: 5; list-style: none; margin: 0; padding: 0; background: #fff; border: 1px solid var(--rp-accent); max-height: 180px; overflow-y: auto; }
.rp-token-suggestions li { padding: 6px 8px; cursor: pointer; }
.rp-token-suggestions li.is-active, .rp-token-suggestions li:hover { background: var(--rp-accent); color: #fff; }
.rp-featured-empty { width: 100%; min-height: 90px; border: 0; background: #f0f0f0; border-radius: 2px; color: var(--rp-editor-ink); font: 13px var(--rp-font); cursor: pointer; }
.rp-featured-empty:hover { background: #e0e0e0; color: var(--rp-accent); }
.rp-featured-preview { display: block; width: 100%; padding: 0; border: 0; background: #f0f0f0; cursor: pointer; border-radius: 2px; overflow: hidden; }
.rp-featured-preview img { display: block; width: 100%; height: auto; max-height: 220px; object-fit: cover; }
.rp-inspector-actions { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; margin-top: 10px; }
.rp-revisions { list-style: none; margin: 8px 0 0; padding: 0; }
.rp-revisions li { padding: 8px 0; border-top: 1px solid #f0f0f0; }
.rp-revision-meta { display: flex; align-items: center; flex-wrap: wrap; gap: 4px; }
.rp-revision-actions { display: flex; gap: 6px; margin-top: 6px; }
.rp-badge { display: inline-block; margin-left: 4px; padding: 0 6px; border-radius: 2px; background: #f0f0f0; font-size: 11px; color: #50575e; }
.rp-diff-legend { display: flex; gap: 16px; margin: 0 0 10px; }
.rp-diff-del { color: #b32d2e; }
.rp-diff-add { color: #007017; }
.rp-diff-title { margin: 0 0 10px; }
.rp-diff-title del { background: #fcf0f1; color: #b32d2e; }
.rp-diff-title ins { background: #edfaef; color: #007017; text-decoration: none; }
.rp-diff { margin: 0; max-height: 60vh; overflow: auto; border: 1px solid var(--rp-border-light); font: 12px/1.6 var(--rp-mono); white-space: pre-wrap; word-break: break-word; }
.rp-diff-line { padding: 0 8px; }
.rp-diff-del.rp-diff-line, .rp-diff-line.rp-diff-del { background: #fcf0f1; color: #8a2424; }
.rp-diff-line.rp-diff-add { background: #edfaef; color: #005c12; }
.rp-diff-line.rp-diff-same { color: #50575e; }
/* block inspector */
.rp-block-card { display: flex; gap: 12px; padding: 16px; border-bottom: 1px solid #e0e0e0; }
.rp-block-card-icon { flex: 0 0 24px; color: var(--rp-editor-ink); }
.rp-block-card-title { font-size: 13px; font-weight: 600; margin: 2px 0 6px; }
.rp-block-card-desc { margin: 0; color: #50575e; line-height: 1.5; }
.rp-inspector-body { padding: 16px; }
.rp-inspector-field { margin: 0 0 16px; }
.rp-inspector-field label { display: flex; flex-direction: column; gap: 6px; font-weight: 500; font-size: 11px; text-transform: uppercase; letter-spacing: .02em; }
.rp-inspector-field label textarea, .rp-inspector-field label input, .rp-inspector-field label select { text-transform: none; letter-spacing: 0; font-weight: 400; font-size: 13px; width: 100%; }
.rp-inspector-label { font-size: 11px; }
span.rp-inspector-label { display: block; margin-bottom: 6px; }
.rp-segmented { display: flex; flex-wrap: wrap; border: 1px solid var(--rp-editor-ink); border-radius: 2px; overflow: hidden; }
.rp-segmented button { flex: 1; min-height: 32px; padding: 4px 8px; border: 0; border-right: 1px solid #e0e0e0; background: #fff; font: 12px var(--rp-font); color: var(--rp-editor-ink); cursor: pointer; display: flex; align-items: center; justify-content: center; }
.rp-segmented button:last-child { border-right: 0; }
.rp-segmented button:hover { color: var(--rp-accent); }
.rp-segmented button.is-active { background: var(--rp-editor-ink); color: #fff; }
.rp-inspector-group { border: 1px solid #e0e0e0; border-radius: 2px; padding: 8px 12px 12px; margin: 0 0 12px; }
.rp-inspector-group legend { font-weight: 600; padding: 0 4px; max-width: 100%; overflow: hidden; text-overflow: ellipsis; }

/* code editor mode */
.rp-editor-code { max-width: 760px; margin: 0 auto; padding: 24px 32px 80px; }
.rp-code-header { display: flex; align-items: center; justify-content: space-between; margin-bottom: 16px; }
.rp-code-header h2 { font-size: 13px; margin: 0; font-weight: 400; color: #757575; }
.rp-code-title { display: block; width: 100%; font: 600 28px/1.3 var(--rp-serif) !important; border: 1px solid #e0e0e0 !important; padding: 12px 14px !important; margin-bottom: 16px; min-height: 0 !important; }
.rp-code-editor { display: block; width: 100%; min-height: 60vh; font: 14px/1.6 var(--rp-mono) !important; padding: 14px !important; border: 1px solid #e0e0e0 !important; border-radius: 2px; resize: vertical; tab-size: 4; }

/* ============================================================== 14. responsive */
@media (max-width: 960px) {
  .rp-editor-doctitle { display: none; }
  .rp-editor-inserter { position: absolute; left: 0; top: 0; bottom: 0; z-index: 25; box-shadow: 4px 0 12px rgba(0,0,0,.08); }
  .rp-editor-sidebar { position: absolute; right: 0; top: 0; bottom: 0; z-index: 25; box-shadow: -4px 0 12px rgba(0,0,0,.08); }
  .rp-inline-inserter { right: 0; }
}
@media (max-width: 782px) {
  :root { --rp-bar-h: 46px; }
  body.folded { --rp-menu-w: 160px; }
  #rpadminbar a, #rpadminbar button { padding: 0 10px; font-size: 14px; }
  #rpadminbar .ab-menu-toggle { display: block; }
  #rpadminbar .ab-label, #rpadminbar #rp-admin-bar-my-account .ab-label { display: none; }
  #rpadminbar #rp-admin-bar-comments .ab-label { display: inline; }
  #rpadminbar .ab-icon { font-size: 20px; }
  #rpadminbar .ab-logo { display: none; }
  #rpadminbar li { position: static; }
  #rpadminbar .ab-sub { left: 0; right: 0; width: auto; max-width: none; }
  #rpadminbar .ab-sub .ab-sub { position: static; display: block; background: none; box-shadow: none; padding: 0 0 0 16px; }
  #rpadminbar .ab-sub-flyout > a::after { content: none; }
  #adminmenuback { display: none; }
  #adminmenuwrap { transform: translateX(-100%); transition: transform .2s ease; width: 190px; overflow-y: auto; z-index: 99980; }
  body.rp-menu-open #adminmenuwrap { transform: none; }
  body.rp-menu-open .rp-menu-overlay { display: block; position: fixed; inset: var(--rp-bar-h) 0 0 0; background: rgba(0,0,0,.35); z-index: 99970; }
  body.folded #adminmenu .rp-menu-name, body.folded .collapse-button-label { display: inline; }
  #collapse-menu { display: none; }
  #adminmenu .menu-top-link { min-height: 44px; font-size: 16px; }
  #adminmenu li.menu-top:not(.current):hover > .rp-submenu { display: none !important; }
  #rpcontent { margin-left: 0; padding-left: 10px; padding-right: 10px; }
  .wrap { margin: 10px 0 0; }
  .search-box { width: 100%; }
  .search-box input[type=search] { flex: 1; width: auto; }
  .rp-list-table thead th:not(.column-primary):not(.check-column), .rp-list-table tfoot th:not(.column-primary):not(.check-column) { display: none; }
  .rp-list-table tbody td:not(.column-primary):not(.check-column) { display: none; }
  .row-actions { position: static; padding-top: 6px; }
  .inline-edit-cols { grid-template-columns: 1fr; }
  .form-table th, .form-table td { display: block; width: auto; padding: 8px 0; }
  #rpfooter { display: none; }
  .welcome-panel { padding: 24px 18px; }
  .welcome-panel h2 { font-size: 24px; }
  #dashboard-widgets { grid-template-columns: 1fr; }
  .activity-block > ul > li { grid-template-columns: 1fr; gap: 0; }
  .rp-modal-full { width: 100vw; height: 100vh; max-height: 100vh; }
  .rp-modal-backdrop { padding: 0; }
  .rp-mp-details { display: none; }
  .rp-mp-search { width: 100%; }
  /* editor */
  .rp-editor-header { flex-basis: 56px; height: 56px; }
  .rp-editor-back { width: 56px; height: 56px; flex-basis: 56px; margin-right: 4px; }
  .rp-editor-header-right { gap: 2px; }
  .rp-save-state { display: none; }
  /* "Guardar borrador" stays available as an icon button (Gutenberg does the same). */
  .rp-editor-header-right .rp-btn-tertiary { padding: 0 6px; min-width: 36px; justify-content: center; }
  .rp-editor-header-right .rp-btn-tertiary .rp-draft-label { display: none; }
  .rp-editor-header-right .rp-btn-tertiary .rp-draft-icon { display: inline-block; }
  .rp-editor .rp-btn-secondary { padding: 0 8px; }
  .rp-editor-visual { padding: 24px 16px 40vh; }
  .rp-editor-title { font-size: 28px !important; }
  .rp-editor-blocks { font-size: 16px; }
  .rp-editor-inserter, .rp-editor-sidebar { width: 100%; flex-basis: 100%; }
  .rp-block-toolbar { max-width: calc(100vw - 32px); overflow-x: auto; }
  .rp-snackbars { left: 12px; right: 12px; bottom: 12px; }
}
@media (max-width: 600px) {
  .rp-editor-header-left .rp-tb-btn[aria-label="Deshacer"], .rp-editor-header-left .rp-tb-btn[aria-label="Rehacer"] { display: none; }
  .rp-editor .rp-publish { min-width: 0; }
}
@media (max-height: 560px) and (min-width: 783px) {
  #adminmenuwrap { position: absolute; bottom: auto; min-height: calc(100% - var(--rp-bar-h)); }
}
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation: none !important; transition: none !important; }
}
