:root {
  color-scheme: light;
  --ink: #211f3c;
  --body: #41445c;
  --muted: #656b80;
  --blue: #1762dc;
  --blue-dark: #0e4fbc;
  --purple: #514290;
  --line: #dfe3ed;
  --soft: #f7f8fc;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body { margin: 0; background: #fff; color: var(--ink); font-family: system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Arial, sans-serif; -webkit-font-smoothing: antialiased; }
button, input { font: inherit; }
button { cursor: pointer; }
a { color: var(--blue-dark); text-underline-offset: 3px; }
:focus-visible { outline: 3px solid #7c9ff0; outline-offset: 3px; }
[hidden] { display: none !important; }
.skip-link { position: absolute; top: -60px; left: 16px; z-index: 10; padding: 10px 14px; background: #fff; border: 1px solid var(--line); }
.skip-link:focus { top: 12px; }
.shell { width: min(100% - 48px, 760px); margin-inline: auto; }
.masthead { padding: 24px 0 0; line-height: 0; }
.masthead a { display: inline-flex; align-items: center; min-height: 50px; }
.site-logo { display: block; width: 186px; max-width: 100%; height: auto; }

.home-layout { max-width: 760px; margin: 30px auto 0; }
.tool { padding: clamp(28px, 5vw, 48px); border: 1px solid #e5e4f0; border-radius: 22px; background: var(--soft); }
.tool h1 { max-width: 14ch; margin: 0; font-size: clamp(36px, 5.2vw, 50px); font-weight: 760; letter-spacing: -.045em; line-height: 1.08; }
.lead { max-width: 47ch; margin: 18px 0 27px; color: var(--body); font-size: 17px; line-height: 1.55; }
.copy-button { display: block; width: min(100%, 400px); min-height: 58px; padding: 13px 20px; border: 1px solid var(--blue); border-radius: 10px; background: var(--blue); color: #fff; font-size: 16px; font-weight: 700; transition: background .15s ease, transform .15s ease; }
.copy-button:hover { background: var(--blue-dark); }
.copy-button:active { transform: translateY(1px); }
.copy-button:disabled { cursor: wait; opacity: .75; }
.copy-feedback { margin: 0; color: #246342; font-size: 14px; font-weight: 650; line-height: 1.5; }
.copy-feedback:not(:empty) { padding-top: 11px; }
.copy-feedback[data-state=error] { color: #a23d37; }
.alternative { display: block; min-height: 44px; max-width: 100%; margin: 8px 0 0; padding: 9px 0; border: 0; background: transparent; color: var(--blue-dark); font-size: 14px; text-align: left; text-decoration: underline; text-underline-offset: 3px; }
.last-alternative { margin-top: 0; }
.manual { max-width: 400px; margin-top: 14px; color: var(--body); font-size: 14px; line-height: 1.5; }
.manual input, .nojs input { width: 100%; min-height: 46px; margin-top: 9px; padding: 10px 12px; border: 1px solid #b7bfd2; border-radius: 8px; background: #fff; color: var(--ink); }
.nojs { max-width: 760px; margin: 24px auto; padding: 24px; border: 1px solid var(--line); border-radius: 12px; color: var(--body); }
.nojs p { margin: 0; line-height: 1.6; }

.how { margin: 24px 0 0; padding: 0 4px 33px; border-bottom: 1px solid var(--line); }
.how-title { margin: 0 0 14px; font-size: 14px; font-weight: 720; letter-spacing: .01em; }
.how ol { display: flex; align-items: center; gap: clamp(8px, 2vw, 16px); width: max-content; max-width: 100%; margin: 0; padding: 0; list-style: none; }
.how li { display: inline-flex; align-items: center; gap: 7px; color: var(--body); font-size: 14px; font-weight: 600; white-space: nowrap; }
.how li span { display: grid; flex: none; place-items: center; width: 30px; height: 30px; border-radius: 50%; background: #eceafa; color: var(--purple); font-weight: 750; }
.step-arrow { margin-left: 5px; color: #9aa0b1; font-size: 17px; font-style: normal; font-weight: 400; }

.quick-guide { padding-top: 43px; }
.quick-guide h2, .character-tester h2, .guide-links h2, .faqs h2 { margin: 0 0 14px; font-size: clamp(22px, 3vw, 27px); font-weight: 740; letter-spacing: -.025em; line-height: 1.2; }
.quick-guide p, .character-tester p { max-width: 68ch; margin: 0 0 15px; color: var(--body); font-size: 16px; line-height: 1.7; }
.character-list { margin-top: 27px; border-top: 1px solid var(--line); counter-reset: character; }
.character-item { position: relative; display: grid; grid-template-columns: 39px minmax(0, 1fr); column-gap: 13px; padding: 19px 0 19px 2px; border-bottom: 1px solid var(--line); counter-increment: character; }
.character-item::before { content: counter(character, decimal-leading-zero); grid-row: 1 / 3; color: var(--purple); font-size: 13px; font-weight: 750; letter-spacing: .03em; padding-top: 3px; }
.character-item h3 { margin: 0; font-size: 17px; font-weight: 720; line-height: 1.4; }
.character-item code { margin-left: 7px; color: #60607a; font-size: 13px; font-weight: 600; white-space: nowrap; }
.character-item p { grid-column: 2; margin: 5px 0 0; font-size: 15px; line-height: 1.6; }
.quick-guide .guide-note { margin: 20px 0 0; font-size: 15px; }

.character-tester { margin-top: 45px; padding: 29px 32px; border: 1px solid #dce4f4; border-radius: 16px; background: #f6f9fe; }
.character-tester h2 { margin-bottom: 10px; }
.character-tester p { margin-bottom: 0; font-size: 15px; }
.character-tester label { display: block; margin: 22px 0 8px; font-size: 14px; font-weight: 700; }
.character-tester input { display: block; width: 100%; min-height: 50px; padding: 11px 14px; border: 1px solid #acbad2; border-radius: 9px; background: #fff; color: var(--ink); }
.character-tester #character-result { min-height: 25px; margin-top: 12px; color: #315687; font-size: 14px; font-weight: 650; }

.guide-links { margin-top: 50px; padding-top: 40px; border-top: 1px solid var(--line); }
.guide-links h2 { margin-bottom: 18px; }
.guide-links a { position: relative; display: grid; gap: 7px; min-height: 120px; margin-top: 11px; padding: 20px 50px 20px 22px; border: 1px solid var(--line); border-radius: 12px; color: var(--ink); text-decoration: none; transition: border-color .15s ease, background .15s ease; }
.guide-links a:hover { border-color: #b9b5db; background: #faf9fd; }
.guide-links a::after { content: '↗'; position: absolute; top: 18px; right: 21px; color: var(--purple); font-size: 23px; }
.guide-links strong { font-size: 17px; line-height: 1.35; }
.guide-links span { color: var(--muted); font-size: 14px; line-height: 1.55; }

.faqs { margin-top: 50px; padding-top: 40px; border-top: 1px solid var(--line); }
.faqs h2 { margin-bottom: 14px; }
.faqs details { border-bottom: 1px solid var(--line); }
.faqs summary { display: flex; align-items: center; justify-content: space-between; gap: 16px; min-height: 62px; padding: 12px 0; font-size: 15px; font-weight: 650; line-height: 1.45; list-style: none; cursor: pointer; }
.faqs summary::-webkit-details-marker { display: none; }
.faqs summary::after { content: '+'; flex: none; color: var(--purple); font-size: 23px; font-weight: 400; }
.faqs details[open] summary::after { content: '−'; }
.faqs p { max-width: 65ch; margin: 0 0 19px; color: var(--body); font-size: 14px; line-height: 1.65; }

.advertisement { width: 100%; margin: 50px auto 0; padding-top: 25px; border-top: 1px solid var(--line); text-align: center; }
.ad-caption { margin-bottom: 11px; color: var(--muted); font-size: 10px; letter-spacing: .16em; }
.ad-placeholder { width: min(320px, 100%); margin-inline: auto; }
.catherine-ad, .catherine-ad picture, .catherine-ad img { display: block; width: 100%; height: auto; }
.catherine-ad { overflow: hidden; border: 1px solid var(--line); border-radius: 10px; text-decoration: none; }
.advertisement[data-ad-mode=commercial] .ad-placeholder { width: min(300px, 100%); min-height: 250px; }
.advertisement[data-ad-mode=commercial] .adsbygoogle { display: block; min-height: 250px; }

.footer { display: flex; flex-wrap: wrap; justify-content: center; gap: 8px 27px; max-width: 760px; margin: 70px auto 0; padding: 25px 0 32px; border-top: 1px solid var(--line); color: var(--muted); font-size: 13px; }
.footer a { display: inline-flex; align-items: center; min-height: 35px; color: var(--muted); text-decoration: none; }
.footer a:hover { color: var(--blue-dark); text-decoration: underline; }
.footer a[aria-current=page] { color: var(--ink); font-weight: 700; }

.page { max-width: 760px; margin: 51px auto 0; }
.page-kicker { margin: 0 0 12px; color: var(--purple); font-size: 13px; font-weight: 750; letter-spacing: .02em; }
.page h1 { margin: 0 0 22px; font-size: clamp(34px, 5vw, 48px); font-weight: 760; letter-spacing: -.04em; line-height: 1.12; }
.prose { max-width: 690px; }
.prose p, .prose li { color: var(--body); font-size: 16px; line-height: 1.75; }
.prose p { margin: 0 0 17px; }
.prose h2 { margin: 36px 0 9px; font-size: 23px; letter-spacing: -.02em; line-height: 1.3; }
.prose h3 { margin: 20px 0 7px; font-size: 18px; line-height: 1.4; }
.prose ul, .prose ol { padding-left: 25px; }
.prose li { padding-left: 3px; margin: 7px 0; }
.back-link { display: inline-flex; align-items: center; min-height: 44px; margin-top: 25px; font-size: 14px; font-weight: 650; text-decoration: none; }
.back-link:hover { text-decoration: underline; }
.contact-address { margin: 12px 0 22px !important; font-size: 22px !important; font-weight: 700; overflow-wrap: anywhere; }
.about-ending { display: flex; align-items: center; justify-content: space-between; gap: 18px; margin-top: 13px; }
.about-signature { color: var(--muted) !important; font-size: 14px !important; }
.family-figure { flex: 0 0 135px; width: 135px; margin: 0; }
.family-figure img { display: block; width: 100%; height: auto; }
.family-figure figcaption { color: var(--muted); font-size: 11px; line-height: 1.4; text-align: center; }
.article-comparison { display: grid; gap: 10px; margin: 19px 0 26px; }
.article-comparison section { padding: 18px 21px; border: 1px solid var(--line); border-radius: 10px; background: var(--soft); }
.article-comparison p { margin: 6px 0 0; font-size: 15px; }
.diagnosis-box { margin: 24px 0; padding: 20px 23px; border: 1px solid #dce4f4; border-radius: 12px; background: #f6f9fe; }
.diagnosis-box h2 { margin: 0; font-size: 20px; }
.diagnosis-box ul { margin-bottom: 0; }
.article-related { display: grid; gap: 10px; margin-top: 34px; padding-top: 23px; border-top: 1px solid var(--line); }
.article-related h2 { margin: 0 0 3px; font-size: 19px; }
.article-related a { font-size: 15px; }

@media (max-width: 600px) {
  .shell { width: min(100% - 36px, 760px); }
  .masthead { padding-top: 17px; }
  .site-logo { width: 166px; }
  .home-layout { margin-top: 24px; }
  .tool { padding: 26px 22px; border-radius: 17px; }
  .tool h1 { font-size: clamp(34px, 9vw, 43px); }
  .lead { margin: 15px 0 21px; font-size: 15px; }
  .copy-button { width: 100%; min-height: 56px; font-size: 15px; }
  .alternative { font-size: 13px; }
  .how { margin-top: 24px; padding-bottom: 27px; }
  .how ol { gap: 8px; }
  .how li { gap: 5px; font-size: 12px; }
  .how li span { width: 27px; height: 27px; }
  .step-arrow { margin-left: 1px; font-size: 15px; }
  .quick-guide { padding-top: 34px; }
  .quick-guide h2, .character-tester h2, .guide-links h2, .faqs h2 { font-size: 22px; }
  .quick-guide p { font-size: 15px; }
  .character-item { grid-template-columns: 33px minmax(0, 1fr); column-gap: 8px; }
  .character-item h3 { font-size: 16px; }
  .character-item p { font-size: 14px; }
  .character-tester { margin-top: 38px; padding: 23px 20px; }
  .guide-links, .faqs { margin-top: 40px; padding-top: 34px; }
  .advertisement { margin-top: 42px; }
  .footer { margin-top: 54px; gap: 4px 20px; }
  .page { margin-top: 37px; }
  .page h1 { font-size: 36px; }
  .prose p, .prose li { font-size: 15px; }
  .prose h2 { font-size: 21px; }
  .family-figure { flex-basis: 110px; width: 110px; }
}

@media (max-width: 350px) {
  .shell { width: min(100% - 28px, 760px); }
  .how ol { gap: 5px; }
  .how li { gap: 3px; font-size: 11px; }
  .how li span { width: 25px; height: 25px; }
  .step-arrow { margin-left: 0; font-size: 13px; }
  .tool { padding-inline: 18px; }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  * { transition: none !important; animation: none !important; }
}
