.language-picker { display: inline-flex; align-items: center; margin: 4px 8px; flex-shrink: 0; }
.language-picker select { padding: 7px 24px 7px 9px; border: 1px solid #cbd5e1; border-radius: 7px; background: white; color: #243247; font: inherit; font-size: 13px; max-width: 150px; }
html:not([lang="zh-CN"]) .header-content { flex-wrap: wrap; gap: 12px; }
html:not([lang="zh-CN"]) .control-group label { white-space: normal; }
.international-dialog { border: 0; border-radius: 14px; padding: 24px; width: min(420px, calc(100vw - 32px)); max-height: 90vh; overflow: auto; color: #243247; box-shadow: 0 18px 70px #0003; }
.international-dialog::backdrop { background: #0006; }
/* Explicit centering survives the global CSS reset of the browser's dialog margins. */
dialog.international-dialog { position: fixed; inset: 0; margin: auto; box-sizing: border-box; max-height: calc(100dvh - 32px); }
.font-download-dialog { text-align: center; }
.font-download-dialog .loading-spinner { margin: 0 auto 16px; }
.font-download-error { position: fixed; z-index: 30000; left: 50%; bottom: 24px; transform: translateX(-50%); width: max-content; max-width: calc(100vw - 32px); padding: 16px 20px; border: 1px solid #fecaca; border-radius: 10px; background: #fff1f2; color: #9f1239; box-shadow: 0 8px 24px #0002; }
.analytics-consent { position: fixed; z-index: 10000; bottom: 12px; left: 50%; transform: translateX(-50%); width: min(1160px, calc(100vw - 24px)); box-sizing: border-box; padding: 14px 18px; border: 1px solid #dbe3ee; border-radius: 10px; background: white; color: #243247; box-shadow: 0 4px 20px #0002; max-height: calc(100dvh - 24px); overflow: auto; display: grid; grid-template-columns: minmax(0, 1fr) auto; align-items: center; gap: 18px; }
.analytics-consent h2 { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip-path: inset(50%); white-space: nowrap; }
.analytics-consent p { font-size: 13px; line-height: 1.5; margin: 0; }
.analytics-consent-actions { display: flex; align-items: center; gap: 10px; }
.analytics-consent-actions button { padding: 8px 12px; min-height: 40px; border: 1px solid #087e91; border-radius: 7px; background: white; color: #087e91; cursor: pointer; font: inherit; font-size: 13px; }
.analytics-consent-actions .analytics-policy { border-color: transparent; text-decoration: underline; padding: 4px; }
@media (max-width: 760px) { .analytics-consent { grid-template-columns: 1fr; gap: 10px; padding: 12px 14px; } .analytics-consent-actions { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px; } .analytics-consent-actions .analytics-policy { grid-column: 1 / -1; justify-self: start; min-height: 24px; } }
.analytics-preferences-entry { padding: 12px 20px; text-align: center; }
.analytics-preferences-entry button { border: 0; background: transparent; color: #087e91; font: inherit; font-size: 13px; text-decoration: underline; cursor: pointer; }
@media (prefers-reduced-motion: reduce) { .font-download-dialog .loading-spinner { animation: none; } }
.public-pricing { max-width: 1000px; margin: 32px auto; padding: 24px; border: 1px solid #dbe3ee; border-radius: 14px; background: white; color: #243247; scroll-margin-top: 90px; }
.public-pricing h2 { margin-bottom: 12px; }
.public-pricing h1 { font-size: 28px; line-height: 1.3; margin-bottom: 12px; }
.public-pricing p { margin: 12px 0; line-height: 1.6; }
.public-pricing a { color: #1d4ed8; text-decoration: underline; }
.public-pricing-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 16px; margin: 20px 0; }
.public-pricing-grid article { padding: 20px; background: #f3f6fc; border-radius: 10px; }
.public-pricing-price { font-size: 28px; font-weight: 700; }
.public-pricing-price small { font-size: 14px; }
.public-pricing-trigger { display: inline-flex; align-items: center; justify-content: center; padding: 8px 14px; border: 1px solid #24bdd2; border-radius: 7px; color: #087e91; background: #effcfe; text-decoration: none; font-size: 14px; white-space: nowrap; }
dialog.public-pricing-dialog { width: min(860px, calc(100vw - 32px)); padding: 24px; }
.public-pricing-dialog .public-pricing { border: 0; padding: 0; margin: 0; max-width: none; clear: both; }
.public-pricing-dialog .pricing-close-form { display: block; min-height: 28px; }
.public-pricing-dialog .dialog-close { margin: 0; }
.pricing-page-link { display: inline-block; margin-top: 8px; color: #087e91; text-decoration: underline; }
.pricing-footer-link { padding: 12px 24px; text-align: center; }
.pricing-footer-link a { color: #087e91; }
.pricing-page { background: #f5f7fa; color: #243247; font-family: system-ui, sans-serif; }
.pricing-page-header { max-width: 1200px; padding: 24px; margin: auto; display: flex; align-items: center; justify-content: space-between; gap: 16px; flex-wrap: wrap; }
.pricing-page-header > a { font-size: 24px; font-weight: 700; color: #087e91; text-decoration: none; }
.pricing-page-header .header-actions { display: flex; align-items: center; flex-wrap: wrap; gap: 8px; }
.pricing-page main { width: min(100%, 1200px); padding: 0 24px; margin: auto; }
.pricing-page .public-pricing { width: 100%; max-width: none; margin: 16px 0; padding: 32px; }
.pricing-page-footer { padding: 24px; text-align: center; }
@media (max-width: 600px) { dialog.public-pricing-dialog { padding: 18px; } .pricing-page main { padding: 0 16px; } .pricing-page .public-pricing { margin: 12px 0; padding: 20px; } }
@media (max-width: 600px) { .public-pricing { margin: 20px 12px; padding: 18px; } .public-pricing-grid { grid-template-columns: 1fr; } }
.international-dialog h2 { margin: 0 0 18px; font-size: 22px; }
.international-dialog form, .international-dialog .international-plans { display: grid; gap: 12px; }
.international-dialog input, .international-dialog button { box-sizing: border-box; width: 100%; padding: 11px; border: 1px solid #cbd5e1; border-radius: 7px; font: inherit; }
.international-dialog button { cursor: pointer; background: #f3f6fc; color: #243247; }
.international-dialog button[type="submit"] { background: #2563eb; color: white; }
.international-dialog .dialog-close { width: auto; float: right; padding: 2px 9px; }
.international-dialog [role="status"] { white-space: pre-line; margin: 12px 0; }
.international-dialog .account-notice { font-size: 12px; line-height: 1.5; color: #526174; margin-bottom: 4px; }
.international-dialog .legal-links { display: flex; gap: 12px; margin-bottom: 12px; }
.international-dialog .legal-links button { width: auto; border: 0; background: transparent; color: #2563eb; padding: 0; font-size: 12px; }
@media (max-width: 600px) { .language-picker { margin: 4px; } .language-picker select { max-width: 125px; } }
.header-container.international-profile-header { display: grid; grid-template-columns: 36px minmax(0, 1fr) auto; align-items: center; gap: 16px; }
.international-profile-header .page-title { position: static; left: auto; transform: none; min-width: 0; margin: 0; font-size: 20px; text-align: left; }
.international-profile-header .header-actions { display: flex; align-items: center; justify-content: flex-end; flex-wrap: wrap; gap: 8px; }
.international-profile-header .feedback-btn { margin: 0; }
.international-profile-header .language-picker { margin: 0; }
.international-editor-header .header-actions { display: flex; align-items: center; justify-content: flex-end; flex-wrap: wrap; gap: 12px; }
.international-editor-header .header-actions .language-picker { margin: 0; }
.international-editor-header .header-actions :is(.public-pricing-trigger, .btn, select),
.international-profile-header .header-actions :is(.public-pricing-trigger, .feedback-btn, select) {
    box-sizing: border-box; height: 40px; min-height: 40px; padding: 0 14px; line-height: 1.2;
    display: inline-flex; align-items: center; justify-content: center;
}
.international-editor-header .header-actions select,
.international-profile-header .header-actions select { padding-right: 26px; }
.international-editor-header .user-section { flex-shrink: 0; }
.international-editor-header .user-info { flex-shrink: 0; }
@media (max-width: 720px) {
    .header-container.international-profile-header { grid-template-columns: 32px minmax(0, 1fr); gap: 10px; padding: 12px 16px; }
    .international-profile-header .page-title { font-size: 18px; }
    .international-profile-header .header-actions { grid-column: 1 / -1; }
    .international-profile-header .language-picker select { max-width: 120px; }
}

/* Stable thumbnail slots are visible before the editor's JavaScript initializes. */
.preview-row .preview-placeholder { position: relative; display: inline-flex; width: 48px; height: 48px; flex: 0 0 48px; border: 1px solid #e2e8f0; border-radius: 7px; background: #f4f7fb; overflow: hidden; }
.preview-placeholder::before { content: ''; position: absolute; inset: 10px; border: 2px solid #c8d3e1; border-radius: 50%; }
.preview-placeholder-icon::before { inset: 11px; border-radius: 4px; transform: rotate(45deg); }
.preview-placeholder .preview-thumb { position: relative; width: 100%; height: 100%; margin: 0; object-fit: contain; opacity: 0; border: 0; background: #fff; }
.preview-placeholder.preview-ready .preview-thumb { opacity: 1; }
.preview-placeholder.preview-ready::before { display: none; }
.preview-row .preview-placeholder { align-items: center; justify-content: center; box-sizing: border-box; }
.preview-row .preview-placeholder.preview-ready { background: #fff; }
.preview-row .preview-placeholder .preview-thumb { display: block; width: 100%; height: 100%; flex: 0 0 auto; box-sizing: border-box; object-position: center; background: transparent; }
.preview-row .preview-placeholder .preview-thumb:hover { transform: none; box-shadow: none; }
/* Local font import uses the same restrained accent as the editor controls. */
.local-font-import { padding: 18px; margin: 0 0 20px; border: 1px solid #dce8ef; border-radius: 12px; background: #f7fbfd; }
.local-font-button { display: inline-flex; align-items: center; justify-content: center; min-height: 42px; padding: 10px 18px; border: 1px solid #00a4b8; border-radius: 9px; background: #fff; color: #008b9e; font: inherit; font-size: 14px; font-weight: 600; cursor: pointer; }
.local-font-button:hover { background: #ecfafd; }
.local-font-button:disabled { opacity: .6; cursor: wait; }
.local-font-import p { margin: 10px 0 0; color: #607487; font-size: 12px; line-height: 1.65; overflow-wrap: anywhere; }
.local-font-import .local-font-status { color: #a13838; }
.local-font-status:empty { display: none; }
.font-item .local-font-preview { display: flex; align-items: center; justify-content: center; min-height: 72px; font-size: 25px; color: #34465a; }
.local-font-name { display: block; max-width: 100%; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-size: 12px; color: #607487; padding: 0 5px 8px; }
@media (max-width: 600px) { .local-font-import { padding: 14px; } .local-font-button { width: 100%; } }
.font-selector .font-item:has(.local-font-remove) { position: relative; padding-top: 12px; }
.local-font-remove { position: absolute; top: 7px; right: 7px; display: inline-flex; align-items: center; justify-content: center; width: 28px; height: 28px; padding: 0; border: 1px solid #e0e8f0; border-radius: 8px; background: #fff; color: #6b7c90; cursor: pointer; z-index: 1; }
.local-font-remove:hover { background: #fff1f1; border-color: #f2cccc; color: #ba3939; }
.local-font-remove:disabled { opacity: .5; cursor: wait; }
.local-font-remove:focus-visible { outline: 2px solid #00a4b8; outline-offset: 2px; }
.local-font-session { display: block; padding: 0 5px 8px; color: #927249; font-size: 11px; }
/* Keep the regional language name readable in the selector. */
html[lang="pt-BR"] .language-picker select { min-width: 175px; max-width: 200px; }
