.markdown-article [data-element-type] { cursor: pointer; }
.markdown-article [data-element-type]:hover { outline: 1px dashed color-mix(in srgb, var(--front-red, #8c0000) 55%, transparent); outline-offset: 3px; }
.reader-content [data-element-type], .reader-content [data-element-type]:hover { cursor: auto; outline: none; }
.element-ornament { display: inline-flex; align-items: center; justify-content: center; vertical-align: middle; flex: none; line-height: 1; }
.element-ornament img { display: block; width: 100%; height: 100%; max-width: 100%; max-height: 100%; margin: 0; padding: 0; border: 0; box-shadow: none; }
.element-inner-border { position: absolute; z-index: 1; pointer-events: none; box-sizing: border-box; }
.element-style-dialog { --surface: var(--front-paper-strong, #fff); --text: var(--front-ink, #222); --muted: var(--front-muted, #666); width: min(1280px, calc(100vw - 32px)); max-width: 1280px; max-height: min(92vh, 980px); padding: 0; border: 0; border-radius: 8px; color: var(--text); background: var(--surface); box-shadow: 0 26px 85px #0004; }
html[data-theme="dark"] .element-style-dialog { --surface: #242825; --text: #eef1ec; --muted: #adb7ac; }
.element-style-dialog::backdrop { background: #20202099; }
.es-shell { display: grid; grid-template-rows: auto minmax(0, 1fr) auto; max-height: min(92vh, 980px); }
.es-head, .es-actions { display: flex; align-items: center; justify-content: space-between; gap: 16px; padding: 18px 24px; border-bottom: 1px solid color-mix(in srgb, currentColor 11%, transparent); }
.es-head h2 { margin: 0; color: var(--front-red, #8c0000); font-size: 26px; }
.es-head h2 small { margin-left: 10px; padding: 5px 10px; border-radius: 16px; background: color-mix(in srgb, var(--front-red, #8c0000) 10%, transparent); font: 600 12px/1 sans-serif; vertical-align: middle; }
.es-head p { margin: 4px 0 0; color: var(--muted, #777); font-size: 13px; }
.es-close { border: 0; background: transparent; font-size: 28px; cursor: pointer; color: inherit; }
.es-columns { display: grid; grid-template-columns: minmax(0, 58%) minmax(0, 42%); min-height: 0; }
.es-form { padding: 18px 24px 26px; overflow: auto; scrollbar-width: thin; }
.es-form fieldset { margin: 0 0 15px; padding: 0 0 15px; border: 0; border-bottom: 1px solid color-mix(in srgb, currentColor 10%, transparent); }
.es-form legend { margin-bottom: 10px; font-weight: 700; }
.es-control-row, .es-check-row, .es-edge-grid { display: flex; flex-wrap: wrap; align-items: end; gap: 9px 14px; }
.es-form label { display: grid; gap: 5px; min-width: 86px; color: var(--muted, #666); font-size: 12px; }
.es-form input:not([type=checkbox]):not([type=radio]):not([type=file]), .es-form select { box-sizing: border-box; min-height: 34px; width: 100%; max-width: 145px; padding: 5px 8px; border: 1px solid color-mix(in srgb, currentColor 16%, transparent); border-radius: 4px; background: var(--surface, #fff); color: var(--text, #222); font: inherit; }
.es-form input[type=number] { max-width: 72px !important; }
.es-form input[type=color] { max-width: 70px !important; padding: 2px !important; }
.es-form input[type=file] { max-width: 210px; font-size: 11px; }
.es-check-row label, .es-ornament label:has([type=checkbox]), .es-control-row label:has([type=checkbox]) { display: inline-flex; align-items: center; gap: 6px; min-width: 0; white-space: nowrap; cursor: pointer; }
.es-edge-grid { justify-content: space-between; max-width: 420px; }
.es-edge-grid label { min-width: 70px; }
.es-ornament small { display: block; margin-top: 8px; color: var(--muted, #777); }
.es-preview-pane { display: flex; flex-direction: column; gap: 12px; padding: 18px 24px; background: color-mix(in srgb, var(--surface, #fff) 90%, var(--text, #333)); min-width: 0; overflow: auto; }
.es-preview-head { display: flex; align-items: center; justify-content: space-between; }
.es-preview-head button, #element-style-reset { padding: 7px 10px; border: 1px solid color-mix(in srgb, currentColor 17%, transparent); border-radius: 4px; background: var(--surface, #fff); color: inherit; cursor: pointer; }
.es-preview-head button[aria-pressed=true] { color: var(--front-red, #8c0000); border-color: currentColor; }
.es-preview-paper { display: flex; align-items: center; justify-content: center; min-height: 300px; padding: 20px; background: var(--surface, #fff); box-shadow: 0 8px 28px #0001; overflow: auto; }
.es-preview-paper.is-mobile #element-style-sample { max-width: 260px; }
#element-style-sample { width: 100%; min-width: 0; }
.es-preview-pane > p { margin: 0; color: var(--muted, #777); font-size: 12px; text-align: right; }
#element-style-reset { align-self: flex-start; }
.es-actions { justify-content: flex-end; border-top: 1px solid color-mix(in srgb, currentColor 11%, transparent); border-bottom: 0; }
.es-actions span { margin-right: auto; color: var(--muted, #777); font-size: 12px; }
.es-actions button, #es-theme-save button { min-height: 38px; padding: 7px 17px; border: 1px solid color-mix(in srgb, currentColor 18%, transparent); border-radius: 4px; background: var(--surface, #fff); color: inherit; cursor: pointer; }
#element-style-confirm, #es-theme-save button { border-color: var(--front-red, #8c0000); background: var(--front-red, #8c0000); color: #fff; }
.es-theme-library { padding-top: 16px; border-top: 1px solid color-mix(in srgb, currentColor 12%, transparent); }
.theme-gallery-tabs { display: flex; gap: 18px; border-bottom: 1px solid color-mix(in srgb, currentColor 12%, transparent); }
.theme-gallery-tabs button { padding: 9px 3px; border: 0; border-bottom: 2px solid transparent; background: none; color: var(--muted, #666); font-size: 14px; font-weight: 650; cursor: pointer; }
.theme-gallery-tabs button[aria-selected=true] { border-bottom-color: var(--front-red, #8c0000); color: var(--front-red, #8c0000); }
.es-theme-heading h3 { margin: 0 0 4px; font-size: 17px; }
.es-theme-heading h3 span { color: var(--front-red, #8c0000); }
.es-theme-heading p { margin: 0 0 12px; color: var(--muted, #777); font-size: 12px; }
.es-theme-list { display: grid; grid-template-columns: repeat(auto-fill, minmax(200px, 1fr)); gap: 8px; color: var(--muted, #777); font-size: 13px; }
.es-theme-list article { display: flex; align-items: center; gap: 6px; padding: 10px; border: 1px solid color-mix(in srgb, currentColor 14%, transparent); border-radius: 5px; background: var(--surface, #fff); }
.es-theme-list strong { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; color: var(--text, #222); }
.es-theme-list button { border: 0; background: transparent; color: var(--front-red, #8c0000); cursor: pointer; }
#es-theme-save { display: flex; align-items: end; flex-wrap: wrap; gap: 10px; margin-top: 14px; }
#es-theme-save label { display: grid; gap: 5px; color: var(--muted, #777); font-size: 12px; }
#es-theme-save input, #es-theme-save select { min-height: 36px; padding: 5px 8px; border: 1px solid color-mix(in srgb, currentColor 16%, transparent); border-radius: 4px; background: var(--surface, #fff); color: var(--text, #222); }
#es-theme-error { color: var(--front-red, #8c0000); font-size: 12px; }
@media (max-width: 760px) { .es-columns { display: block; overflow: auto; } .es-form { max-height: 48vh; } .es-preview-pane { min-height: 200px; } .es-preview-paper { min-height: 160px; align-items: flex-start; } .es-head, .es-actions { padding: 12px 16px; } }
