.dpi-page {
  --bg: #f9fafb; --surface: #ffffff; --surface-2: #f3f4f6; --input: #ffffff;
  --text: #111827; --muted: #4b5563; --subtle: #6b7280; --line: #e5e7eb; --line-strong: #d1d5db;
  --header: rgba(255,255,255,.94); --footer: #ffffff; --hero-a: #eff6ff; --hero-b: #ffffff;
  min-height: 100vh; background: var(--bg); color: var(--text);
  font-family: ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  font-size: 16px; line-height: 1.5; -webkit-font-smoothing: antialiased;
}
.dpi-page[data-theme="dark"] {
  --bg: #111827; --surface: #1f2937; --surface-2: #0f172a; --input: #111827;
  --text: #f9fafb; --muted: #d1d5db; --subtle: #9ca3af; --line: #374151; --line-strong: #4b5563;
  --header: rgba(3,7,18,.94); --footer: #030712; --hero-a: #111827; --hero-b: #1f2937;
}
.dpi-page *, .dpi-page *::before, .dpi-page *::after { box-sizing: border-box; }
.dpi-page a { color: inherit; text-decoration: none; }
.dpi-page button, .dpi-page input, .dpi-page select { font: inherit; }
.dpi-page button:focus-visible, .dpi-page input:focus-visible, .dpi-page select:focus-visible, .dpi-page a:focus-visible, .dpi-upload:focus-visible { outline: 2px solid #2379c6; outline-offset: 3px; }
.dpi-container { width: min(1024px, calc(100% - 32px)); margin: 0 auto; }
.dpi-mid { width: min(768px, calc(100% - 32px)); margin: 0 auto; }
.dpi-narrow { width: min(720px, calc(100% - 32px)); margin: 0 auto; }
.dpi-text-column { width: min(704px, calc(100% - 32px)); margin: 0 auto; }

.dpi-header { position: sticky; top: 0; z-index: 80; height: 64px; border-bottom: 1px solid var(--line); background: var(--header); backdrop-filter: blur(14px); }
.dpi-header-inner { width: min(1152px, calc(100% - 32px)); height: 64px; margin: 0 auto; display: flex; align-items: center; gap: 26px; }
.dpi-brand { display: inline-flex; align-items: center; gap: 8px; color: var(--text); font-size: 17px; font-weight: 750; white-space: nowrap; }
.dpi-brand img { width: 32px; height: 32px; border-radius: 999px; display: block; }
.dpi-brand-dot { color: #2379c6; }
.dpi-desktop-nav { display: flex; align-items: center; gap: 24px; margin-right: auto; }
.dpi-desktop-nav > a, .dpi-desktop-nav summary { color: var(--muted); font-size: 14px; font-weight: 500; cursor: pointer; list-style: none; transition: color .15s ease; }
.dpi-desktop-nav > a:hover, .dpi-desktop-nav summary:hover { color: var(--text); }
.dpi-desktop-nav details { position: relative; }
.dpi-desktop-nav summary::-webkit-details-marker { display: none; }
.dpi-desktop-nav summary::after { content: "⌄"; margin-left: 5px; font-size: 12px; }
.dpi-nav-menu { position: absolute; top: 30px; left: -12px; min-width: 190px; padding: 8px; border: 1px solid var(--line); border-radius: 10px; background: var(--surface); box-shadow: 0 18px 45px rgba(0,0,0,.16); }
.dpi-nav-menu a { display: block; padding: 9px 10px; border-radius: 7px; color: var(--muted); font-size: 13px; }
.dpi-nav-menu a:hover { color: var(--text); background: var(--surface-2); }
.dpi-header-actions { margin-left: auto; display: flex; align-items: center; gap: 12px; }
.dpi-theme, .dpi-mobile-toggle { width: 40px; height: 40px; border: 0; border-radius: 8px; background: transparent; color: var(--text); cursor: pointer; }
.dpi-theme:hover, .dpi-mobile-toggle:hover { background: var(--surface-2); }
.dpi-language { height: 40px; min-width: 112px; padding: 0 32px 0 12px; border: 1px solid var(--line); border-radius: 8px; background: var(--surface); color: var(--muted); font-size: 14px; }
.dpi-mobile-toggle, .dpi-mobile-menu { display: none; }

.dpi-hero { padding: 64px 16px 62px; text-align: center; background: linear-gradient(180deg, var(--hero-a), var(--hero-b)); }
.dpi-hero h1 { margin: 0 0 12px; color: var(--text); font-size: 36px; line-height: 1.12; font-weight: 800; letter-spacing: -.025em; }
.dpi-hero p { margin: 0 auto; max-width: 650px; color: var(--muted); font-size: 16px; line-height: 1.75; }
.dpi-paper-section { padding: 16px 0; border-bottom: 1px solid var(--line); background: var(--surface); }
.dpi-kicker, .dpi-result-label { margin-bottom: 8px; color: var(--subtle); font-size: 11px; line-height: 1.2; font-weight: 600; letter-spacing: .06em; text-transform: uppercase; }
.dpi-paper-grid { display: flex; flex-wrap: wrap; gap: 8px; }
.dpi-paper-grid button, .dpi-unit-row button { min-height: 44px; padding: 0 16px; border: 1px solid var(--line-strong); border-radius: 8px; background: var(--surface-2); color: var(--muted); font-size: 14px; font-weight: 500; cursor: pointer; transition: border-color .15s ease, background .15s ease, color .15s ease; }
.dpi-paper-grid button:hover, .dpi-unit-row button:hover { border-color: #6db0f2; }
.dpi-paper-grid button.is-active, .dpi-unit-row button.is-active { border-color: #2379c6; background: #2379c6; color: #fff; }
.dpi-tabs-section { padding: 32px 0 0; background: var(--bg); }
.dpi-tabs { display: flex; flex-wrap: wrap; border-bottom: 1px solid var(--line); }
.dpi-tabs button { min-height: 48px; padding: 0 16px; margin-bottom: -1px; border: 0; border-bottom: 2px solid transparent; background: transparent; color: var(--muted); font-size: 14px; font-weight: 500; cursor: pointer; }
.dpi-tabs button:hover { color: var(--text); }
.dpi-tabs button.is-active { border-bottom-color: #2379c6; color: #2379c6; }
.dpi-page[data-theme="dark"] .dpi-tabs button.is-active { color: #6db0f2; border-bottom-color: #2379c6; }
.dpi-calculator-section { padding: 32px 0; background: var(--bg); }
.dpi-calculator-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 24px; align-items: stretch; }
.dpi-card { min-width: 0; padding: 20px; border: 1px solid var(--line); border-radius: 12px; background: var(--surface); }
.dpi-input-card > * + * { margin-top: 16px; }
.dpi-card h2 { margin: 0; color: var(--text); font-family: inherit; font-size: 18px; line-height: 1.4; font-weight: 650; letter-spacing: 0; }
.dpi-card-intro { margin: 0; color: var(--muted); font-size: 14px; line-height: 1.5; }

.dpi-upload-block { display: grid; gap: 10px; }
.dpi-upload { display: block; padding: 14px 16px; border: 2px dashed var(--line-strong); border-radius: 8px; text-align: center; cursor: pointer; transition: border-color .15s ease, background .15s ease; }
.dpi-upload:hover, .dpi-upload:focus-visible { border-color: #6db0f2; background: var(--surface-2); }
.dpi-upload input { position: absolute; width: 1px; height: 1px; overflow: hidden; opacity: 0; pointer-events: none; }
.dpi-upload strong, .dpi-upload span { display: block; }
.dpi-upload strong { color: var(--muted); font-size: 14px; font-weight: 550; }
.dpi-upload span { margin-top: 4px; color: var(--subtle); font-size: 12px; }
.dpi-upload-error { padding: 10px 12px; border: 1px solid #fca5a5; border-radius: 8px; background: #fef2f2; color: #991b1b; font-size: 12px; line-height: 1.5; }
.dpi-page[data-theme="dark"] .dpi-upload-error { border-color: rgba(248, 113, 113, .45); background: rgba(127, 29, 29, .18); color: #fecaca; }
.dpi-local-note, .dpi-formula-note { margin: 0; color: var(--subtle); font-size: 12px; line-height: 1.45; }
.dpi-two-fields { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; }
.dpi-field { display: block; min-width: 0; }
.dpi-field > span, .dpi-unit-block > span { display: block; margin-bottom: 5px; color: var(--muted); font-size: 12px; font-weight: 550; }
.dpi-field input { width: 100%; height: 38px; padding: 7px 12px; border: 1px solid var(--line-strong); border-radius: 8px; outline: 0; background: var(--input); color: var(--text); font-size: 14px; }
.dpi-field input:focus { border-color: #6db0f2; box-shadow: 0 0 0 2px rgba(35,121,198,.12); }
.dpi-unit-row { display: flex; gap: 8px; }
.dpi-unit-row button { background: var(--input); }
.dpi-result-card { display: flex; flex-direction: column; gap: 16px; }
.dpi-readiness { padding: 16px; border: 1px solid; border-radius: 8px; }
.dpi-readiness h2 { margin: 0; font-size: 20px; line-height: 1.35; font-weight: 700; }
.dpi-readiness p { margin: 8px 0 0; color: var(--muted); font-size: 14px; line-height: 1.55; }
.dpi-actual strong { display: block; color: var(--text); font-size: 36px; line-height: 1; font-weight: 800; }
.dpi-result-box { padding: 12px; border: 1px solid var(--line); border-radius: 8px; }
.dpi-result-box b { display: block; color: var(--muted); font-size: 12px; font-weight: 650; }
.dpi-result-box p { margin: 4px 0 0; color: var(--muted); font-size: 14px; line-height: 1.5; }

.dpi-badge { margin-top: 8px; padding: 8px 10px; border: 1px solid; border-radius: 8px; font-size: 14px; font-weight: 550; }
.dpi-next { border-color: #bfdbfe; background: #eff6ff; }
.dpi-page[data-theme="dark"] .dpi-next { border-color: #1e40af; background: rgba(30,64,175,.22); }
.dpi-warning { padding: 12px; border: 1px solid #fcd34d; border-radius: 8px; background: #fffbeb; color: #b45309; font-size: 14px; line-height: 1.45; }
.dpi-page[data-theme="dark"] .dpi-warning { border-color: #92400e; background: rgba(120,53,15,.2); color: #fbbf24; }
.dpi-tone-green { border-color: #86efac; background: #f0fdf4; color: #166534; }
.dpi-tone-blue { border-color: #bfdbfe; background: #eff6ff; color: #1d4ed8; }
.dpi-tone-orange { border-color: #fdba74; background: #fff7ed; color: #9a3412; }
.dpi-tone-red { border-color: #fca5a5; background: #fef2f2; color: #991b1b; }
.dpi-page[data-theme="dark"] .dpi-tone-green { border-color: #166534; background: rgba(22,101,52,.18); color: #bbf7d0; }
.dpi-page[data-theme="dark"] .dpi-tone-blue { border-color: #1e40af; background: rgba(30,64,175,.2); color: #bfdbfe; }
.dpi-page[data-theme="dark"] .dpi-tone-orange { border-color: #9a3412; background: rgba(154,52,18,.2); color: #fed7aa; }
.dpi-page[data-theme="dark"] .dpi-tone-red { border-color: #991b1b; background: rgba(153,27,27,.2); color: #fecaca; }
.dpi-readiness .dpi-result-label { color: var(--subtle); }
.dpi-readiness h2, .dpi-readiness p { color: var(--text); }
.dpi-big-result { color: var(--text); font-size: 30px; line-height: 1.2; font-weight: 800; letter-spacing: -.02em; }
.dpi-primary, .dpi-secondary { display: inline-flex; min-height: 48px; align-items: center; justify-content: center; padding: 10px 20px; border-radius: 12px; font-size: 14px; font-weight: 650; transition: background .15s ease, border-color .15s ease; }
.dpi-primary { background: #2379c6; color: #fff !important; }
.dpi-primary:hover { background: #1d4ed8; }
.dpi-primary.full { width: 100%; }
.dpi-secondary { border: 1px solid var(--line-strong); background: var(--surface); color: var(--text); }
.dpi-secondary:hover { border-color: #6db0f2; }

.dpi-distance-section { padding: 80px 0; background: var(--surface); }
.dpi-distance-section h2, .dpi-faq-section h2, .dpi-cta-section h2 { margin: 0; color: var(--text); font-family: inherit; font-size: 28px; line-height: 1.2; font-weight: 800; letter-spacing: -.02em; text-align: center; }
.dpi-section-lead { margin: 10px auto 34px; color: var(--muted); font-size: 14px; text-align: center; }
.dpi-slider-head { display: flex; align-items: center; justify-content: space-between; margin-bottom: 8px; color: var(--muted); font-size: 13px; }
.dpi-slider-head b { color: #2379c6; font-weight: 550; }
.dpi-distance-slider { width: 100%; height: 18px; accent-color: #2379c6; cursor: pointer; }
.dpi-distance-note { margin: 10px 0 24px; color: var(--muted); font-size: 12px; }
.dpi-distance-grid { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 12px; }
.dpi-distance-grid button { min-height: 44px; padding: 8px 10px; border: 1px solid var(--line); border-radius: 8px; background: var(--bg); color: var(--muted); font-size: 12px; cursor: pointer; transition: border-color .15s ease, background .15s ease; }
.dpi-distance-grid button:hover, .dpi-distance-grid button.is-active { border-color: #6db0f2; }
.dpi-distance-grid button.is-active { background: #eff6ff; color: #1d4ed8; }
.dpi-page[data-theme="dark"] .dpi-distance-grid button.is-active { background: rgba(30,64,175,.22); color: #bfdbfe; }
.dpi-info-note { margin-top: 28px; padding: 16px; border: 1px solid #93c5fd; border-radius: 8px; background: #eff6ff; color: #1e40af; font-size: 13px; line-height: 1.55; }
.dpi-page[data-theme="dark"] .dpi-info-note { border-color: #1e40af; background: rgba(30,64,175,.22); color: #bfdbfe; }
.dpi-explain-section { padding: 80px 0; background: var(--bg); }
.dpi-explain-section h2 { margin: 0 0 18px; color: var(--text); font-family: inherit; font-size: 28px; line-height: 1.2; font-weight: 800; letter-spacing: -.02em; }
.dpi-explain-section p { margin: 0; color: var(--muted); font-size: 15px; line-height: 1.75; }
.dpi-faq-section { padding: 80px 0; background: var(--surface); }
.dpi-faq-list { margin-top: 36px; display: grid; gap: 12px; }
.dpi-faq { overflow: hidden; border: 1px solid var(--line); border-radius: 10px; background: var(--bg); }
.dpi-faq summary { position: relative; min-height: 60px; padding: 18px 48px 18px 18px; color: var(--text); font-size: 14px; font-weight: 650; cursor: pointer; list-style: none; }
.dpi-faq summary::-webkit-details-marker { display: none; }
.dpi-faq summary::after { content: "⌄"; position: absolute; right: 18px; top: 18px; color: var(--subtle); font-size: 18px; }

.dpi-faq[open] summary::after { content: "⌃"; }
.dpi-faq > div { padding: 0 18px 18px; color: var(--muted); font-size: 14px; line-height: 1.65; }
.dpi-cta-section { padding: 80px 0; background: var(--bg); text-align: center; }
.dpi-cta-section p { max-width: 650px; margin: 12px auto 26px; color: var(--muted); font-size: 14px; line-height: 1.65; }
.dpi-cta-actions { display: flex; justify-content: center; gap: 12px; flex-wrap: wrap; }
.dpi-footer { padding: 42px 0 24px; border-top: 1px solid var(--line); background: var(--footer); }
.dpi-footer-inner { width: min(1152px, calc(100% - 32px)); margin: 0 auto; }
.dpi-footer-mark { position: relative; height: 26px; margin-bottom: 28px; display: flex; align-items: center; justify-content: center; gap: 4px; }
.dpi-footer-mark::before, .dpi-footer-mark::after { content: ""; position: absolute; top: 12px; width: calc(50% - 26px); height: 1px; background: var(--line); }
.dpi-footer-mark::before { left: 0; } .dpi-footer-mark::after { right: 0; }
.dpi-footer-mark span { width: 7px; height: 7px; border-radius: 50%; display: block; }
.dpi-footer-mark span:nth-child(1) { background: #06b6d4; } .dpi-footer-mark span:nth-child(2) { background: #ec4899; }
.dpi-footer-mark span:nth-child(3) { background: #facc15; } .dpi-footer-mark span:nth-child(4) { background: #111827; }
.dpi-page[data-theme="dark"] .dpi-footer-mark span:nth-child(4) { background: #e5e7eb; }
.dpi-footer-grid { display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); gap: 34px; padding-bottom: 34px; }
.dpi-footer-grid h3 { margin: 0 0 12px; color: var(--text); font-family: inherit; font-size: 12px; font-weight: 700; }
.dpi-footer-grid a { display: block; margin-top: 8px; color: var(--subtle); font-size: 12px; line-height: 1.35; }
.dpi-footer-grid a:hover { color: #2379c6; }
.dpi-footer-bottom { padding-top: 24px; border-top: 1px solid var(--line); color: var(--subtle); font-size: 12px; line-height: 1.6; text-align: center; }

@media (max-width: 767px) {
  .dpi-container, .dpi-mid, .dpi-narrow, .dpi-text-column, .dpi-footer-inner { width: calc(100% - 26px); }
  .dpi-header, .dpi-header-inner { height: 54px; }
  .dpi-header-inner { width: calc(100% - 28px); gap: 10px; }
  .dpi-brand { font-size: 18px; margin-right: auto; }
  .dpi-brand img { width: 30px; height: 30px; }
  .dpi-desktop-nav, .dpi-theme { display: none; }
  .dpi-header-actions { margin-left: 0; gap: 6px; }
  .dpi-language { min-width: 90px; height: 38px; padding-left: 10px; font-size: 13px; }
  .dpi-mobile-toggle { display: inline-flex; width: 44px; height: 44px; align-items: center; justify-content: center; font-size: 19px; }
  .dpi-mobile-menu { position: absolute; top: 54px; left: 0; right: 0; display: grid; gap: 2px; padding: 10px 14px 14px; border-bottom: 1px solid var(--line); background: var(--surface); box-shadow: 0 12px 30px rgba(0,0,0,.12); }
  .dpi-mobile-menu a { padding: 10px 8px; border-radius: 7px; color: var(--muted); font-size: 14px; }
  .dpi-mobile-menu a:hover { background: var(--surface-2); color: var(--text); }
  .dpi-hero { padding: 38px 0 46px; }
  .dpi-hero h1 { font-size: 32px; line-height: 1.18; }
  .dpi-hero p { font-size: 16px; line-height: 1.65; }
  .dpi-paper-section { padding: 16px 0 12px; }
  .dpi-paper-grid { gap: 8px; }
  .dpi-paper-grid button { min-height: 44px; padding: 0 15px; }
  .dpi-tabs-section { padding-top: 22px; }
  .dpi-tabs button { min-height: 46px; padding: 0 13px; }
}

@media (max-width: 767px) {
  .dpi-calculator-section { padding: 28px 0; }
  .dpi-calculator-grid { grid-template-columns: 1fr; gap: 18px; }
  .dpi-card { padding: 20px; border-radius: 12px; }
  .dpi-input-card > * + * { margin-top: 14px; }
  .dpi-card h2 { font-size: 18px; }
  .dpi-card-intro { font-size: 13px; }
  .dpi-two-fields { gap: 12px; }
  .dpi-field input { height: 40px; }
  .dpi-unit-row { flex-wrap: wrap; }
  .dpi-result-card { gap: 14px; }
  .dpi-readiness { padding: 16px; }
  .dpi-readiness h2 { font-size: 20px; }
  .dpi-actual strong { font-size: 36px; }
  .dpi-warning, .dpi-result-box, .dpi-info-note { font-size: 13px; }
  .dpi-primary.full { min-height: 48px; }
  .dpi-distance-section, .dpi-explain-section, .dpi-faq-section, .dpi-cta-section { padding: 64px 0; }
  .dpi-distance-section h2, .dpi-faq-section h2, .dpi-cta-section h2, .dpi-explain-section h2 { font-size: 26px; }
}
@media (max-width: 767px) {
  .dpi-section-lead { margin-bottom: 28px; line-height: 1.6; }
  .dpi-distance-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; }
  .dpi-info-note { margin-top: 24px; padding: 14px; }
  .dpi-explain-section p { font-size: 14px; line-height: 1.75; }
  .dpi-faq-list { margin-top: 30px; gap: 10px; }
  .dpi-faq summary { min-height: 58px; padding: 17px 44px 17px 16px; font-size: 13px; }
  .dpi-faq summary::after { right: 16px; top: 16px; }
  .dpi-cta-section p { font-size: 13px; }
  .dpi-cta-actions { flex-direction: column; align-items: center; }
  .dpi-primary, .dpi-secondary { min-width: 210px; }
  .dpi-footer { padding-top: 36px; }
  .dpi-footer-grid { grid-template-columns: 1fr; gap: 28px; }
  .dpi-footer-grid h3 { font-size: 12px; }
  .dpi-footer-grid a { font-size: 12px; }
  .dpi-footer-bottom { margin-top: 4px; }
}

@media (max-width: 430px) {
  .dpi-brand-dot { display: none; }
  .dpi-language { min-width: 88px; max-width: 94px; }
  .dpi-hero h1 { font-size: 30px; }
  .dpi-hero p { font-size: 15px; }
  .dpi-paper-grid button { padding: 0 14px; font-size: 13px; }
  .dpi-tabs button { font-size: 13px; }
}
/* Visual-QA refinements against the reference page. */
.dpi-header, .dpi-header-inner { height: 65px; }
.dpi-hero { padding-top: 76px; padding-bottom: 73px; }
.dpi-distance-section { padding-top: 88px; padding-bottom: 88px; }
.dpi-explain-section p + p { margin-top: 18px; }
.dpi-faq summary { min-height: 68px; }
.dpi-footer { padding-top: 77px; padding-bottom: 59px; }

@media (max-width: 767px) {
  .dpi-header, .dpi-header-inner { height: 65px; }
  .dpi-mobile-menu { top: 65px; }
  .dpi-hero { padding-top: 62px; padding-bottom: 65px; }
  .dpi-tabs-section { padding-top: 32px; }
  .dpi-tabs { display: grid; grid-template-columns: max-content max-content; }
  .dpi-tabs button { min-height: 48px; padding-left: 16px; padding-right: 16px; }
  .dpi-distance-section { padding-top: 78px; padding-bottom: 78px; }
  .dpi-explain-section { padding-top: 64px; padding-bottom: 64px; }
  .dpi-faq-section { padding-top: 64px; padding-bottom: 64px; }
  .dpi-faq summary { min-height: 80px; display: flex; align-items: center; }
  .dpi-cta-section { padding-top: 80px; padding-bottom: 80px; }
  .dpi-footer { padding-top: 71px; padding-bottom: 59px; }
  .dpi-footer-grid { gap: 52px; }
}

@media (max-width: 767px) {
  .dpi-hero { padding-top: 72px; padding-bottom: 75px; }
  .dpi-paper-section { padding-top: 20px; padding-bottom: 15px; }
  .dpi-tabs-section { padding-top: 35px; }
  .dpi-calculator-section { padding-top: 32px; padding-bottom: 32px; }
  .dpi-calculator-grid { gap: 24px; }
  .dpi-input-card > * + * { margin-top: 16px; }
  .dpi-result-card { gap: 16px; }
  .dpi-faq summary { min-height: 87px; }
}

/* Uploaded image preview — mirrors the reference tool's local preview flow. */
.dpi-upload-preview {
  display: grid;
  justify-items: center;
  gap: 12px;
}
.dpi-upload-preview-frame {
  width: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
}
.dpi-upload-preview-frame img {
  display: block;
  width: auto;
  height: auto;
  max-width: 100%;
  max-height: 160px;
  object-fit: contain;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--surface-2);
}
.dpi-detected {
  width: 100%;
  margin: 0;
  color: var(--muted);
  font-size: 13px;
  line-height: 1.45;
}
.dpi-detected strong { color: var(--text); font-weight: 650; }
.dpi-image-details { display: block; margin-top: 4px; color: var(--subtle); font-size: 12px; }
.dpi-large-image-note { width: 100%; padding: 10px 12px; border: 1px solid rgba(35, 121, 198, 0.34); border-radius: 8px; background: rgba(35, 121, 198, 0.08); color: var(--muted); font-size: 12px; line-height: 1.5; }
@media (max-width: 767px) {
  .dpi-upload-preview-frame img { max-width: 100%; max-height: 160px; }
}

/* Rasterbator.app visual system: same palette and type stack as home.css. */
.dpi-page,
.dpi-page[data-theme="dark"] {
  --bg: #0b0e14;
  --surface: rgba(255, 255, 255, 0.035);
  --surface-2: rgba(255, 255, 255, 0.055);
  --input: rgba(8, 10, 14, 0.86);
  --text: rgba(244, 248, 252, 0.94);
  --muted: rgba(214, 222, 232, 0.76);
  --subtle: rgba(168, 180, 194, 0.58);
  --line: rgba(255, 255, 255, 0.12);
  --line-strong: rgba(255, 255, 255, 0.18);
  --header: rgba(11, 14, 20, 0.93);
  --footer: #090b10;
  --hero-a: rgba(35, 121, 198, 0.12);
  --hero-b: rgba(11, 14, 20, 0);
  font-family: "Avenir Next", "Segoe UI Variable Text", "SF Pro Text", "Noto Sans", "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei", sans-serif;
  background:
    radial-gradient(1200px 760px at 50% -10%, rgba(35, 121, 198, 0.22), transparent 60%),
    radial-gradient(980px 740px at 18% 24%, rgba(95, 55, 135, 0.16), transparent 58%),
    radial-gradient(820px 620px at 88% 34%, rgba(41, 74, 130, 0.12), transparent 60%),
    linear-gradient(180deg, #10141b 0%, #0b0e14 54%, #090b10 100%);
  line-height: 1.7;
  letter-spacing: 0.01em;
  position: relative;
  overflow: clip;
}
.dpi-page::before {
  content: "";
  position: absolute;
  inset: 0;
  background:
    linear-gradient(rgba(255, 255, 255, 0.015) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255, 255, 255, 0.012) 1px, transparent 1px);
  background-size: 28px 28px;
  mask-image: linear-gradient(180deg, rgba(0, 0, 0, 0.28), transparent 75%);
  pointer-events: none;
}
.dpi-page > * { position: relative; z-index: 1; }
.dpi-page h1 { font-family: "Avenir Next", "Segoe UI Variable Text", "SF Pro Display", "Noto Sans", sans-serif; }
.dpi-page h2, .dpi-page h3 { font-family: "Iowan Old Style", "Palatino Linotype", "Book Antiqua", "Songti SC", "STSong", serif; }
.dpi-hero h1 { color: #6db0f2; font-size: clamp(2.15rem, 4.2vw, 3.45rem); line-height: 1.1; letter-spacing: -0.05em; font-weight: 780; }
.dpi-theme { display: none !important; }
.dpi-brand-dot, .dpi-kicker, .dpi-result-label { color: #2379c6; }
.dpi-paper-grid button:hover, .dpi-unit-row button:hover, .dpi-upload:hover, .dpi-secondary:hover, .dpi-distance-grid button:hover { border-color: rgba(35, 121, 198, 0.72); }
.dpi-paper-grid button.is-active, .dpi-unit-row button.is-active { border-color: #2379c6; background: #2379c6; color: #ffffff; }
.dpi-tabs button.is-active, .dpi-page[data-theme="dark"] .dpi-tabs button.is-active { color: #2379c6; border-bottom-color: #2379c6; }
.dpi-field input:focus { border-color: #2379c6; box-shadow: 0 0 0 2px rgba(35, 121, 198, 0.12); }
.dpi-primary { background: linear-gradient(135deg, #2379c6, #6db0f2); color: #ffffff !important; box-shadow: 0 10px 28px rgba(35, 121, 198, 0.16); }
.dpi-primary:hover { background: linear-gradient(135deg, #6db0f2, #2379c6); }
.dpi-slider-head b { color: #2379c6; }
.dpi-distance-slider { accent-color: #2379c6; }
.dpi-distance-grid button.is-active, .dpi-page[data-theme="dark"] .dpi-distance-grid button.is-active { border-color: rgba(35, 121, 198, 0.72); background: rgba(35, 121, 198, 0.12); color: #6db0f2; }
.dpi-info-note, .dpi-page[data-theme="dark"] .dpi-info-note, .dpi-next, .dpi-page[data-theme="dark"] .dpi-next { border-color: rgba(35, 121, 198, 0.34); background: rgba(35, 121, 198, 0.08); color: var(--muted); }
.dpi-footer-grid a:hover { color: #2379c6; }
.dpi-hero { background: linear-gradient(180deg, rgba(35, 121, 198, 0.08), rgba(11, 14, 20, 0)); }
.dpi-paper-section, .dpi-distance-section, .dpi-faq-section { background: rgba(255, 255, 255, 0.018); }
.dpi-card, .dpi-faq, .dpi-nav-menu, .dpi-mobile-menu { box-shadow: 0 18px 46px rgba(0, 0, 0, 0.24); }

.dpi-guide-section, .dpi-size-section { padding: 80px 0; border-top: 1px solid rgba(255, 255, 255, 0.06); }
.dpi-guide-section { background: rgba(255, 255, 255, 0.018); }
.dpi-size-section { background: transparent; }
.dpi-section-heading { max-width: 760px; margin: 0 auto 34px; text-align: center; }
.dpi-section-heading .dpi-kicker { display: block; margin-bottom: 12px; }
.dpi-section-heading h2 { margin: 0; color: var(--text); font-size: 30px; line-height: 1.2; letter-spacing: -0.012em; }
.dpi-section-heading p { margin: 14px auto 0; color: var(--muted); font-size: 14px; line-height: 1.7; }
.dpi-guide-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 16px; }
.dpi-guide-grid article { padding: 22px; border: 1px solid var(--line); border-radius: 16px; background: var(--surface); }
.dpi-guide-grid article > strong { display: inline-block; margin-bottom: 12px; color: #2379c6; font-size: 13px; letter-spacing: .04em; }
.dpi-guide-grid h3 { margin: 0 0 10px; color: var(--text); font-size: 20px; line-height: 1.25; }
.dpi-guide-grid p { margin: 0; color: var(--muted); font-size: 13px; line-height: 1.65; }
.dpi-table-wrap { overflow-x: auto; border: 1px solid var(--line); border-radius: 16px; background: var(--surface); }
.dpi-size-table { width: 100%; border-collapse: collapse; min-width: 620px; }
.dpi-size-table th, .dpi-size-table td { padding: 15px 18px; border-bottom: 1px solid var(--line); text-align: left; }
.dpi-size-table th { color: #2379c6; font-size: 12px; font-weight: 700; letter-spacing: .04em; text-transform: uppercase; background: rgba(35, 121, 198, 0.05); }
.dpi-size-table td { color: var(--muted); font-size: 14px; }
.dpi-size-table td:first-child { color: var(--text); font-weight: 650; }
.dpi-size-table tbody tr:last-child td { border-bottom: 0; }
.dpi-table-note { max-width: 780px; margin: 18px auto 0; color: var(--subtle); font-size: 12px; line-height: 1.65; text-align: center; }

@media (max-width: 767px) {
  .dpi-guide-section, .dpi-size-section { padding: 64px 0; }
  .dpi-section-heading { margin-bottom: 26px; }
  .dpi-section-heading h2 { font-size: 26px; }
  .dpi-section-heading p { font-size: 13px; }
  .dpi-guide-grid { grid-template-columns: 1fr; gap: 12px; }
  .dpi-guide-grid article { padding: 18px; }
  .dpi-size-table th, .dpi-size-table td { padding: 13px 14px; }
}
