.pro-account-link { color: var(--primary-strong); font-size: .875rem; font-weight: 600; white-space: nowrap; }
.pro-access-note { color: var(--muted); font-size: .8rem; line-height: 1.5; margin: 12px 0; }
html { scrollbar-color: var(--muted) var(--surface-soft); scrollbar-width: auto; }
::-webkit-scrollbar { width: 12px; height: 12px; }
::-webkit-scrollbar-track { background: var(--surface-soft); }
::-webkit-scrollbar-thumb { background: var(--muted); border: 3px solid var(--surface-soft); border-radius: 10px; }
::-webkit-scrollbar-thumb:hover { background: var(--primary); }
@media (forced-colors: active) { html { scrollbar-color: auto; } }
/* Keep analytics preferences reachable without covering photo export controls. */
#analyticsSettings { position: static; display: block; margin: 16px auto; max-width: calc(100% - 32px); }

/* Compact homepage shell; legal and guide links remain in the footer. */
.homepage-refresh .topbar-inner { flex-wrap: wrap; gap: 8px 18px; padding-block: 12px; }
.homepage-refresh .brand-section { min-width: 0; }
.homepage-refresh .site-nav { min-width: 0; flex-wrap: wrap; }
.homepage-refresh .top-actions { min-width: 0; flex-wrap: wrap; gap: 10px; }
.homepage-refresh .pro-account-link { display: inline-flex; align-items: center; min-height: 34px; text-decoration: none; }
.homepage-refresh .hero { margin-block: 24px 32px; padding-block: 32px; gap: 32px; }
.homepage-refresh .hero-content { flex: 0.9; }
.homepage-refresh .hero h1 { font-size: clamp(36px, 4.1vw, 56px); }
.homepage-refresh .hero-demo { flex: 1.1; min-width: 0; margin: 0; }
.homepage-refresh .hero-demo img { display: block; width: 100%; height: auto; border-radius: 12px; }
.homepage-refresh .hero-demo figcaption { margin-top: 10px; color: inherit; opacity: .85; font-size: 12px; line-height: 1.5; }
@media (max-width: 1100px) {
  .homepage-refresh .top-actions .plan-badge { display: none; }
}
@media (min-width: 761px) and (max-width: 1050px) {
  .homepage-refresh .hero { flex-direction: row; gap: 24px; }
}
@media (max-width: 760px) {
  .homepage-refresh .topbar-inner { gap: 6px 12px; }
  .homepage-refresh .brand-tagline { display: none; }
  .homepage-refresh .site-nav { order: 3; width: 100%; overflow: visible; justify-content: center; gap: 4px; }
  .homepage-refresh .site-nav a { min-height: 40px; padding-inline: 10px; }
  .homepage-refresh .top-actions { margin-left: auto; }
  .homepage-refresh .hero { flex-direction: column; align-items: stretch; padding: 24px 20px; gap: 20px; }
  .homepage-refresh .hero h1 { font-size: clamp(32px, 8vw, 42px); }
  .homepage-refresh .hero-summary { font-size: 15px; line-height: 1.6; }
  .homepage-refresh .hero-demo { width: 100%; }
  .homepage-refresh .hero::after { display: none; }
}
@media (max-width: 380px) {
  .homepage-refresh .brand { font-size: 16px; }
  .homepage-refresh .topbar-inner .language-switcher { padding-inline: 8px; }
  .homepage-refresh .top-actions { gap: 8px; }
}

/* Account identity and native keyboard-accessible disclosure. */
.account-widget { display: flex; align-items: center; gap: 12px; min-width: 0; font-size: 14px; }
.account-widget a { text-decoration: none; color: var(--primary-strong); }
.account-signup { border: 1px solid var(--line); border-radius: 8px; padding: 8px 12px; background: var(--surface); white-space: nowrap; }
.account-menu { position: relative; min-width: 0; }
.account-menu summary { display: flex; align-items: center; gap: 8px; cursor: pointer; list-style: none; min-height: 40px; }
.account-menu summary::-webkit-details-marker { display: none; }
.account-avatar { display: inline-flex; align-items: center; justify-content: center; flex: 0 0 32px; width: 32px; height: 32px; border-radius: 50%; background: var(--accent); color: var(--primary-strong); font-weight: 700; }
.account-name { max-width: 120px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.account-tier, .editing-pro-badge { display: inline-flex; align-items: center; flex-shrink: 0; padding: 2px 7px; border: 1px solid var(--line); border-radius: 5px; font-size: 11px; line-height: 1.5; font-weight: 600; background: var(--surface-soft); color: var(--muted); }
.account-tier.is-pro, .editing-pro-badge { color: #885414; background: #fff4df; border-color: #e6c99e; }
.account-dropdown { position: absolute; right: 0; top: calc(100% + 8px); z-index: 100; width: 200px; padding: 6px; background: var(--surface); border: 1px solid var(--line); border-radius: 10px; box-shadow: 0 8px 24px #18283820; }
.account-dropdown a, .account-dropdown button { display: block; width: 100%; box-sizing: border-box; padding: 10px 12px; text-align: left; font: inherit; color: var(--text); border: 0; border-radius: 6px; background: transparent; }
.account-dropdown a:hover, .account-dropdown button:hover { background: var(--surface-soft); }
.account-widget :focus-visible { outline: 2px solid var(--primary); outline-offset: 3px; }
/* Long headings and translated copy stay in normal flow, above the CTA. */
.advanced-card { min-width: 0; }
.advanced-card .advanced-head { display: block; }
.advanced-card .advanced-head h3 { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; margin: 0; line-height: 1.4; }
.advanced-card .pro-access-note { margin: 10px 0 14px; overflow-wrap: anywhere; }
.advanced-card #openSubscribeBtn { position: static; display: block; width: 100%; min-width: 0; min-height: 44px; height: auto; margin: 0 0 16px; padding: 10px 14px; white-space: normal; line-height: 1.4; }
.pro-item-header { gap: 8px; min-width: 0; }
.pro-item-header span:first-child { min-width: 0; overflow-wrap: anywhere; }
.pro-item-header .pro-logo, .pro-item-header .expand-icon { flex-shrink: 0; }
#planBadge[hidden] { display: none; }
@media (max-width: 480px) {
  .account-name { max-width: 70px; }
  .topbar-inner { flex-wrap: wrap; }
  .top-actions { max-width: 100%; flex-wrap: wrap; }
}

/* Navigation and editor tracks must shrink before their content overflows. */
.topbar-inner { flex-wrap: wrap; }
.topbar-inner .site-nav { min-width: 0; flex-wrap: wrap; }
.topbar-inner .top-actions { min-width: 0; max-width: 100%; flex-wrap: wrap; }
.layout > .left-col, .layout > .right-col { min-width: 0; }
@media (max-width: 760px) {
  .topbar-inner .site-nav { order: 3; width: 100%; overflow: visible; justify-content: center; }
  .layout { grid-template-columns: minmax(0, 1fr); }
  .layout input, .layout select { min-width: 0; max-width: 100%; }
  .layout .thumb-toolbar, .layout .toolbar-row { flex-wrap: wrap; }
}
.layout > .left-col, .layout > .right-col { grid-template-columns: minmax(0, 1fr); }
.layout .card { min-width: 0; }
/* Export actions and status messages reserve space instead of covering settings. */
.bottom-bar { position: static; transform: none; width: min(1272px, calc(100% - 48px)); margin: 16px auto 24px; border-radius: 16px; }
.preview-card .hint-bubble { position: static; max-width: 100%; margin-top: 12px; border-radius: 8px; box-shadow: none; backdrop-filter: none; }
.export-policy-note { margin: 8px 0 0; color: var(--muted); text-align: center; font-size: 13px; line-height: 1.6; }
@media (max-width: 600px) { .export-row { flex-direction: column; } .export-row button { width: 100%; max-width: none; } }

.upgrade-dialog { width: min(620px, calc(100% - 32px)); max-height: calc(100svh - 40px); margin: auto; padding: 0; overflow-y: auto; border: 1px solid #cbd8da; border-radius: 18px; background: #fff; color: #182838; box-shadow: 0 24px 80px #10263840; font-family: inherit; }
.upgrade-dialog::backdrop { background: #10263885; backdrop-filter: blur(3px); }
.upgrade-dialog-inner { position: relative; padding: 32px; }
.upgrade-close { position: absolute; right: 12px; top: 10px; width: 40px; height: 40px; padding: 0; border: 0; border-radius: 8px; background: transparent; color: #526574; font-size: 28px; cursor: pointer; }
.upgrade-close:hover { background: #edf2f3; }
.upgrade-eyebrow { margin: 0 40px 12px 0; color: #245b78; font-size: 12px; font-weight: 700; letter-spacing: .08em; }
.upgrade-dialog h2 { margin: 0 24px 12px 0; font-size: clamp(23px, 4vw, 30px); line-height: 1.25; }
.upgrade-description { margin: 0 0 16px; color: #526574; font-size: 14px; line-height: 1.7; }
.upgrade-reasons { display: flex; flex-wrap: wrap; gap: 8px; margin: 0 0 20px; padding: 0; list-style: none; }
.upgrade-reasons li { border: 1px solid #cbd8da; padding: 5px 10px; border-radius: 6px; background: #f1f7f8; font-size: 12px; }
.upgrade-currency { display: flex; justify-content: space-between; align-items: center; gap: 12px; margin: 0 0 16px; font-size: 13px; }
.upgrade-currency select { width: auto; min-width: 100px; border: 1px solid #cbd8da; border-radius: 6px; padding: 7px 12px; background: #fff; }
.upgrade-plan-picker { border: 0; padding: 0; margin: 0 0 16px; min-width: 0; }
.upgrade-plan-picker legend { margin-bottom: 10px; font-size: 13px; font-weight: 600; }
.upgrade-plan-options { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 10px; }
.upgrade-plan { position: relative; min-width: 0; cursor: pointer; }
.upgrade-plan input { position: absolute; opacity: 0; width: 1px; height: 1px; }
.upgrade-plan-content { display: flex; flex-direction: column; justify-content: center; gap: 8px; text-align: center; min-height: 120px; padding: 12px 6px; border: 1px solid #cbd8da; border-radius: 9px; font-size: 13px; }
.upgrade-plan-content strong { font-size: 20px; font-variant-numeric: tabular-nums; }
.upgrade-plan-content small { font-size: 11px; color: #526574; }
.upgrade-plan-content .upgrade-saving { color: #24523f; }
.upgrade-plan input:checked + .upgrade-plan-content { border-color: #245b78; box-shadow: inset 0 0 0 1px #245b78; background: #edf5f7; }
.upgrade-plan input:focus-visible + .upgrade-plan-content, .upgrade-dialog button:focus-visible, .upgrade-dialog a:focus-visible, .upgrade-dialog select:focus-visible { outline: 3px solid #d87916; outline-offset: 3px; }
.upgrade-note { color: #526574; font-size: 12px; line-height: 1.7; margin: 10px 0; }
.upgrade-cny { background: #f2f7f6; padding: 8px 12px; font-size: 13px; border-radius: 6px; }
.upgrade-buy { width: 100%; min-height: 46px; padding: 12px 16px; margin-top: 12px; border: 0; border-radius: 8px; background: #245b78; color: #fff; font-weight: 650; cursor: pointer; }
.upgrade-buy:disabled { opacity: .6; cursor: not-allowed; }
.upgrade-keep-editing, .upgrade-free-download { display: block; width: 100%; min-height: 40px; margin-top: 8px; border: 0; background: transparent; color: #245b78; font-size: 13px; cursor: pointer; }
.upgrade-keep-editing:hover, .upgrade-free-download:hover { background: #f3f7f7; border-radius: 6px; }
.upgrade-error { padding: 10px 12px; background: #fff0ee; color: #983c2e; border-radius: 6px; font-size: 13px; }
.upgrade-checkout-link { display: block; margin-top: 14px; text-align: center; font-size: 14px; }
.pro-preview-note { padding: 8px 12px; border: 1px solid var(--line); border-radius: 8px; background: var(--surface-soft); color: var(--muted); font-size: 12px; line-height: 1.6; }
@media (max-width: 480px) {
  .upgrade-dialog-inner { padding: 24px 18px; }
  .upgrade-plan-options { grid-template-columns: minmax(0, 1fr); gap: 8px; }
  .upgrade-plan-content { display: grid; grid-template-columns: minmax(0, 1fr) auto; min-height: 0; padding: 12px; text-align: left; }
  .upgrade-plan-content strong { grid-column: 2; grid-row: 1; font-size: 18px; }
  .upgrade-plan-content small { grid-column: 2; grid-row: 2; text-align: right; }
}

/* Compact reading sections retain their complete answers in the HTML. */
.homepage-refresh .reading-item { margin: 0 0 12px; border: 1px solid var(--line); border-radius: 12px; background: var(--surface); }
.homepage-refresh .reading-accordion .reading-item { margin-bottom: 0; }
.homepage-refresh .reading-item summary { display: flex; align-items: center; justify-content: space-between; gap: 20px; padding: 18px 20px; cursor: pointer; list-style: none; }
.homepage-refresh .reading-item summary::-webkit-details-marker { display: none; }
.homepage-refresh .reading-item summary::after { content: '+'; flex: 0 0 20px; color: var(--primary); font-size: 22px; text-align: center; }
.homepage-refresh .reading-item[open] summary::after { content: '−'; }
.homepage-refresh .reading-item summary h3 { margin: 0; color: var(--primary-strong); font-size: 17px; line-height: 1.5; font-weight: 650; }
.homepage-refresh .reading-answer { padding: 0 20px 8px; }
.homepage-refresh .reading-answer p { font-size: 15px; line-height: 1.75; }
.homepage-refresh .reading-item summary:hover { background: var(--surface-soft); border-radius: 12px; }
.homepage-refresh .reading-item summary:focus-visible { outline: 3px solid var(--focus); outline-offset: 3px; border-radius: 12px; }
.pro-item-header { scroll-margin-top: 112px; }
@media (min-width: 1051px) and (min-height: 760px) {
  .layout .preview-card { position: sticky; top: 104px; align-self: start; }
}

.home-pricing { width: min(1080px, calc(100% - 48px)); margin: 48px auto; }
.home-pricing-heading { text-align: center; margin-bottom: 24px; }
.home-pricing-heading h2 { margin: 0 0 12px; font-size: clamp(24px, 3vw, 32px); line-height: 1.35; }
.home-pricing-heading p, .home-pricing-shared { color: var(--muted); font-size: 14px; line-height: 1.7; }
.home-pricing-currency { display: flex; align-items: center; flex-wrap: wrap; gap: 10px; margin-bottom: 16px; font-size: 13px; }
.home-pricing-currency select { width: auto; min-width: 96px; margin: 0; padding: 7px 12px; }
.home-pricing-currency span { color: var(--muted); }
.home-pricing-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 24px; }
.home-price-card { min-width: 0; padding: 28px; border: 1px solid var(--line); border-radius: 16px; background: var(--surface); display: flex; flex-direction: column; }
.home-price-pro { border: 2px solid var(--primary); padding: 27px; background: linear-gradient(180deg, #f3f9fa, #fff 200px); }
.home-price-card h3 { margin: 0 0 8px; font-size: 25px; }
.home-price-lead { min-height: 48px; margin: 0 0 20px; color: var(--muted); font-size: 14px; line-height: 1.7; }
.home-free-price { margin: 0; font-size: 38px; font-weight: 750; color: var(--text); line-height: 1.4; font-variant-numeric: tabular-nums; }
.home-price-caption { margin: 8px 0 0; color: var(--muted); font-size: 12px; line-height: 1.65; }
.home-price-card ul { margin: 24px 0; padding: 0; list-style: none; }
.home-price-card li { position: relative; padding: 0 0 12px 22px; font-size: 14px; line-height: 1.65; }
.home-price-card li::before { content: '✓'; position: absolute; left: 0; color: var(--primary); font-weight: 700; }
.home-pricing-free { margin-top: auto; display: block; padding: 10px 16px; border-radius: 8px; background: var(--primary-soft); color: var(--primary-strong); text-align: center; font-weight: 650; text-decoration: none; }
.home-price-options { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 8px; container-type: inline-size; }
.home-price-option { min-width: 0; display: flex; flex-direction: column; align-items: center; gap: 6px; padding: 14px 6px; border: 1px solid var(--line); border-radius: 8px; background: #fff; color: var(--text); font: inherit; cursor: pointer; }
.home-price-option span { font-size: 13px; }
.home-price-option strong { font-size: 17px; font-variant-numeric: tabular-nums; }
.home-price-option small { color: var(--muted); font-size: 11px; }
.home-price-option [data-home-saving] { color: #24523f; background: #d7eee4; padding: 1px 6px; border-radius: 4px; }
.home-price-option:hover { border-color: var(--primary); background: #edf5f7; }
.home-price-option:focus-visible, .home-pricing-free:focus-visible { outline: 3px solid var(--focus); outline-offset: 3px; }
.home-pricing-shared { text-align: center; margin: 24px 0 0; }
.home-pricing > .home-price-caption { text-align: center; }
@container (max-width: 360px) {
  .home-price-option { display: grid; grid-template-columns: minmax(0, 1fr); }
  .home-price-option strong { font-size: 14px; }
}
@media (max-width: 900px) {
  .home-pricing-grid { grid-template-columns: minmax(0, 1fr); }
  .home-price-lead { min-height: 0; }
}
@media (max-width: 480px) {
  .home-pricing { width: calc(100% - 32px); }
  .home-price-card { padding: 20px; }
  .home-price-pro { padding: 19px; }
  .home-price-options { grid-template-columns: minmax(0, 1fr); }
  .home-price-option { grid-template-columns: minmax(0, 1fr) auto; text-align: left; padding: 12px; }
  .home-price-option strong { grid-column: 2; grid-row: 1; font-size: 18px; }
  .home-price-option small { grid-column: 2; grid-row: 2; justify-self: end; }
}
