:root {
  color-scheme: light;
  font-family: "Yu Gothic", "Hiragino Kaku Gothic ProN", Meiryo, sans-serif;
  color: #172344;
  background: #fff;
  --ink: #172344;
  --blue: #3448c5;
  --muted: #485574;
  --line: #d9dfee;
  --pale: #f1f4fe;
}

*, *::before, *::after { box-sizing: border-box; }
body { margin: 0; }
h1, h2, h3, p, dl, dd { margin: 0; }
a { color: inherit; }
button { font: inherit; cursor: pointer; }
button:focus-visible, a:focus-visible { outline: 3px solid #a36cf0; outline-offset: 4px; }
section[id] { scroll-margin-top: 1rem; }
.wrap { width: min(1200px, calc(100% - clamp(2rem, 10vw, 9rem))); margin-inline: auto; }
.skip-link { position: fixed; z-index: 2; top: .5rem; left: .5rem; padding: .7rem; background: #fff; transform: translateY(-150%); }
.skip-link:focus { transform: translateY(0); }

.site-header { position: relative; background: #fff; border-bottom: 1px solid #e1e6f2; }
.header-inner, .brand, .nav, .hero-actions, .footer-inner { display: flex; align-items: center; }
.header-inner { min-height: 82px; justify-content: space-between; gap: .9rem 2rem; }
.brand { gap: .85rem; white-space: nowrap; font-weight: 800; text-decoration: none; }
.brand img { width: 102px; height: auto; }
.nav { gap: clamp(.7rem, 2.4vw, 2rem); flex-wrap: wrap; }
.nav > a:not(.button) { text-decoration: none; font-size: .92rem; font-weight: 700; }
.nav > a:not(.button):hover, .footer-inner a:hover { text-decoration: underline; text-underline-offset: .3em; }
.button { display: inline-flex; justify-content: center; align-items: center; min-height: 49px; padding: .68rem 1.25rem; border: 1px solid transparent; border-radius: 9px; background: var(--blue); color: #fff; font-size: .93rem; font-weight: 800; text-align: center; text-decoration: none; }
.button:hover { background: #203ba1; }
.button-small { min-height: 40px; padding-inline: 1.05rem; }
.button-outline { color: var(--blue); background: #fff; border-color: #c3ccee; }
.button-outline:hover { background: #e9edff; }

.hero {
  background:
    radial-gradient(ellipse at 90% 14%, #dfe1ff 0, transparent 55%),
    radial-gradient(ellipse at 76% 95%, #dcecfb 0, transparent 53%),
    linear-gradient(115deg, #fff 22%, #f4f6ff 100%);
  border-bottom: 1px solid var(--line);
}
.hero-grid { display: grid; grid-template-columns: minmax(0, 1.1fr) minmax(0, .9fr); align-items: center; gap: clamp(1.6rem, 4vw, 4.5rem); padding-block: clamp(3.5rem, 7.5vw, 7.4rem); }
.hero-context { color: #2947ad; font-weight: 800; font-size: .9rem; margin-bottom: 1.25rem; }
h1 { font-size: clamp(2.4rem, 4.5vw, 5rem); font-weight: 900; letter-spacing: -.075em; line-height: 1.14; }
h1 span { display: block; }
h1 span:last-child { color: var(--blue); }
.hero-description { margin-top: 1.4rem; max-width: 30rem; font-size: 1.06rem; line-height: 1.9; color: var(--muted); }
.hero-actions { flex-wrap: wrap; gap: .65rem; margin-top: 1.5rem; }
.hero-note { margin-top: .85rem; color: var(--muted); font-size: .9rem; line-height: 1.7; }

.work-preview {
  padding: clamp(1.1rem, 2.5vw, 2.05rem);
  background: radial-gradient(ellipse at top right, #354480, transparent 72%), #172650;
  border: 1px solid #43538f;
  color: #fff;
  border-radius: 22px;
  box-shadow: inset 0 1px 0 #ffffff24, 0 24px 60px #27376b30, 0 6px 18px #27376b1a;
  min-width: 0;
}
.preview-top { display: flex; align-items: center; justify-content: space-between; gap: .7rem; }
.preview-label { color: #bfcdff; font-size: .875rem; margin-bottom: .35rem; }
.preview-top h2 { font-size: clamp(1.2rem, 2.2vw, 1.8rem); line-height: 1.3; }
.view-icon { display: flex; flex-direction: column; justify-content: center; gap: .22rem; width: 41px; height: 41px; border: 1px solid #aebdf5; border-radius: 7px; padding: .55rem; }
.view-icon span { display: block; height: 2px; background: #d0daff; }
.view-icon span:last-child { width: 68%; }
.example-options { display: flex; flex-wrap: wrap; gap: .4rem; margin-top: 1rem; }
.example-options button { min-height: 40px; padding: .31rem .78rem; color: #f4f6ff; background: #25386c; border: 1px solid #657bb2; border-radius: 8px; font-weight: 700; font-size: .875rem; }
.example-options button:hover { border-color: #becbff; }
.example-options button[aria-pressed="true"] { background: #fff; border-color: #fff; color: #192e66; }
.preview-result { display: grid; gap: .7rem; margin-top: .8rem; }
.preview-input { padding: .8rem .95rem; border: 1px solid #5b70a7; border-radius: 10px; background: #22376f; color: #fff; }
.preview-step { display: block; margin-bottom: .2rem; font-size: .875rem; color: #c4d0ff; }
.preview-input strong { font-size: .95rem; }
.preview-output { padding: .95rem; background: #fff; color: var(--ink); border-radius: 11px; }
.output-heading { display: flex; align-items: start; justify-content: space-between; flex-wrap: wrap; gap: .35rem; }
.output-heading .preview-step { color: #495e8b; }
.output-heading h3 { font-size: 1.15rem; }
.status { padding: .27rem .46rem; border-radius: 4px; background: #e5ebff; color: #25429b; font-size: .875rem; font-weight: 800; }
.output-data { display: grid; gap: .32rem; margin-top: .65rem; }
.output-data div { display: grid; grid-template-columns: minmax(4.25rem, .44fr) 1fr; gap: .4rem; padding-top: .35rem; border-top: 1px solid var(--line); font-size: .92rem; line-height: 1.55; }
.output-data dt { color: #4c5a79; }
.output-data dd { font-weight: 700; overflow-wrap: anywhere; }
.preview-caption { margin-top: .8rem; color: #d2dcff; font-size: .875rem; line-height: 1.55; }

.section, .process, .contact, .sample-section { padding-block: clamp(2.8rem, 6.45vw, 6rem); }
.section-heading h2, .contact h2 { font-size: clamp(1.65rem, 3.5vw, 3.15rem); line-height: 1.27; font-weight: 900; letter-spacing: -.045em; }
.section-heading p, .contact p { max-width: 35rem; margin-top: .75rem; color: var(--muted); font-size: 1rem; line-height: 1.8; }
.sample-section { border-bottom: 1px solid var(--line); background: linear-gradient(180deg, #f6f8ff, #fbfcff); }
.section-heading .sample-kicker { color: #2947ad; font-size: .9rem; font-weight: 800; margin: 0 0 .45rem; }
.sample-workspace { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: clamp(.8rem, 2.2vw, 1.7rem); margin-top: 1.65rem; }
.sample-edit, .sample-output { min-width: 0; padding: clamp(1rem, 2.3vw, 1.7rem); background: #fff; border: 1px solid var(--line); border-radius: 16px; box-shadow: 0 8px 24px #27376b0a; }
.sample-output { background: linear-gradient(155deg, #fff 50%, #eff3ff); }
.sample-edit label, .sample-output h3 { display: block; font-size: 1.2rem; font-weight: 800; }
.sample-edit p, #sample-feedback { margin-top: .5rem; font-size: .9rem; color: var(--muted); line-height: 1.7; }
.sample-edit textarea { display: block; width: 100%; min-height: 10rem; resize: vertical; margin-top: .7rem; padding: .75rem; border: 1px solid #aebbdc; border-radius: 5px; background: #f7f8ff; color: var(--ink); font: inherit; line-height: 1.65; }
.sample-edit textarea:focus-visible { outline: 3px solid #a36cf0; outline-offset: 2px; }
.sample-actions { display: flex; flex-wrap: wrap; gap: .55rem; margin-top: .75rem; }
.sample-edit .sample-local-note { font-size: .875rem; margin-top: .8rem; }
.sample-data { margin-top: .75rem; border-top: 1px solid var(--line); }
.sample-data div { display: grid; grid-template-columns: minmax(4.5rem, .3fr) 1fr; gap: .45rem; padding: .45rem 0; border-bottom: 1px solid var(--line); line-height: 1.6; }
.sample-data dt { color: var(--muted); }
.sample-data dd, .sample-reply { overflow-wrap: anywhere; }
.sample-output h4 { margin: .85rem 0 .45rem; }
.sample-reply { white-space: pre-line; background: #f3f5ff; padding: .65rem .75rem; border-radius: 5px; font-size: .94rem; line-height: 1.7; }
.sample-check { margin-top: .7rem; font-size: .875rem; color: #2947ad; line-height: 1.65; }
.sample-next { display: flex; align-items: center; flex-wrap: wrap; gap: .65rem 1.3rem; margin-top: 1.25rem; }
.sample-next p { color: var(--muted); line-height: 1.65; }
.service-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: clamp(.85rem, 2vw, 1.7rem); margin-top: 1.65rem; }
.service-grid article { display: flex; flex-direction: column; gap: .75rem; padding: clamp(1.15rem, 2.5vw, 1.85rem); background: linear-gradient(155deg, #fff 45%, #f5f7ff); border: 1px solid var(--line); border-radius: 16px; box-shadow: 0 8px 24px #27376b0a; }
.service-category { color: #2947ad; font-weight: 800; font-size: .9rem; }
.service-grid h3, .process-list h3 { font-size: clamp(1.1rem, 1.7vw, 1.36rem); line-height: 1.4; font-weight: 800; }
.service-grid h3 + p, .process-list p { color: var(--muted); font-size: 1rem; line-height: 1.75; }
.human-check { margin-top: auto; padding-top: .65rem; border-top: 1px solid var(--line); color: var(--muted); font-size: .875rem; line-height: 1.6; }
.human-check strong { color: #2947ad; margin-inline-end: .3rem; }

.process { background: var(--pale); }
.process-grid, .company, .contact-inner { display: grid; grid-template-columns: minmax(0, .85fr) minmax(0, 1.15fr); gap: clamp(1.45rem, 4vw, 4rem); }
.process-list { counter-reset: process; list-style: none; padding: 0; margin: 0; }
.process-list li { display: grid; grid-template-columns: 2.3rem 1fr; align-items: start; gap: .65rem; padding: .95rem 0; border-top: 1px solid #bec9e7; }
.process-list li:last-child { border-bottom: 1px solid #bec9e7; }
.process-list li::before { counter-increment: process; content: counter(process); display: grid; width: 2.2rem; height: 2.2rem; place-items: center; border-radius: 50%; background: #dfe7fd; color: #2646ab; font-weight: 800; }
.process-list p { margin-top: .25rem; }
.company dl { border-top: 1px solid var(--line); }
.company dl div { display: grid; grid-template-columns: minmax(4.5rem, .28fr) 1fr; gap: .55rem; padding: .75rem 0; border-bottom: 1px solid var(--line); line-height: 1.65; }
.company dt { font-weight: 800; }
.company dd { color: var(--muted); }
.contact { background: radial-gradient(ellipse at 95% 0, #3b4d91, transparent 65%), #172650; color: #fff; }
.contact-inner { grid-template-columns: 1fr auto; align-items: center; }
.contact p { color: #dce5ff; }
.button-white { background: #fff; color: #213a87; }
.button-white:hover { background: #e2e9ff; }
.contact-actions { display: flex; flex-wrap: wrap; gap: .65rem; }
.contact-chat { background: transparent; border-color: #aabaf1; color: #fff; }
.contact-chat:hover { background: #253b76; }
.site-footer { padding-block: 1.15rem 5.15rem; color: var(--muted); font-size: .875rem; }
.footer-inner { justify-content: space-between; gap: .55rem 1rem; flex-wrap: wrap; }
.footer-inner a { font-weight: 800; text-underline-offset: 4px; }

[hidden] { display: none !important; }
.chat-launcher { position: fixed; z-index: 2; right: clamp(.65rem, 2vw, 1.4rem); bottom: clamp(.65rem, 2vw, 1.4rem); gap: .55rem; box-shadow: 0 8px 24px #172b6142; border: 1px solid #768cf1; border-radius: 999px; }
.chat-icon { display: block; position: relative; width: 18px; height: 14px; border: 1.5px solid currentColor; border-radius: 4px; }
.chat-icon::after { content: ""; position: absolute; width: 5px; height: 5px; bottom: -3px; left: 3px; background: var(--blue); border-bottom: 1.5px solid currentColor; border-left: 1.5px solid currentColor; transform: skewY(-30deg); }
.consult-chat { inset: auto clamp(.6rem, 2vw, 1.4rem) clamp(.6rem, 2vw, 1.4rem) auto; width: min(560px, calc(100% - 1.2rem)); max-width: none; max-height: calc(100% - 1.2rem); margin: 0; padding: 0; border: 1px solid #bec8e6; border-radius: 20px; color: var(--ink); background: #fff; box-shadow: 0 18px 60px #09173840; }
.consult-chat::backdrop { background: #12213b50; }
.chat-header { display: flex; align-items: start; justify-content: space-between; gap: .5rem; padding: 1.1rem clamp(1rem, 4vw, 1.5rem); background: #172b61; color: #fff; }
.chat-header h2 { font-size: 1.2rem; }
.chat-header p { color: #e1e7ff; font-size: .875rem; margin-top: .3rem; }
.chat-close { flex: none; width: 42px; height: 42px; background: #ffffff12; color: #fff; border: 1px solid #ffffff66; border-radius: 11px; font-size: 1.4rem; }
.chat-body { padding: clamp(.85rem, 3vw, 1.35rem); }
.chat-log { display: grid; align-content: start; gap: .9rem; min-height: 7rem; max-height: min(44dvh, 415px); overflow-y: auto; padding: .2rem .35rem .4rem .15rem; }
.chat-entry { width: fit-content; max-width: 93%; }
.chat-entry span { display: block; margin-bottom: .2rem; color: var(--muted); font-weight: 700; font-size: .875rem; }
.chat-entry p { padding: .75rem .95rem; border-radius: 4px 14px 14px; background: #edf1ff; font-size: .95rem; line-height: 1.7; overflow-wrap: anywhere; white-space: pre-wrap; }
.chat-visitor { justify-self: end; }
.chat-visitor span { text-align: right; }
.chat-visitor p { color: #fff; background: #294ac8; border-radius: 14px 4px 14px 14px; }
.chat-topics, .chat-form { display: flex; gap: .4rem; margin-top: .7rem; }
.chat-topics { flex-wrap: wrap; }
.chat-topics button { min-height: 38px; padding: .35rem .7rem; border: 1px solid #acb8df; border-radius: 999px; color: #243e9f; background: #fff; font-size: .875rem; font-weight: 700; }
.chat-topics button:hover { background: var(--pale); }
.chat-form input { flex: 1; min-width: 0; padding: .55rem .7rem; border: 1px solid #aab6d9; border-radius: 10px; font: inherit; color: var(--ink); }
.chat-form input:focus-visible { outline: 3px solid #a36cf0; outline-offset: 2px; }
.chat-form .button { min-height: 43px; }
.chat-status { min-height: 1em; margin-top: .6rem; color: var(--muted); font-size: .875rem; line-height: 1.45; }
.chat-local-link { margin-top: .65rem; }
.chat-contact-link { display: table; margin: .65rem 0 0; font-size: .875rem; font-weight: 700; color: #243e9f; text-underline-offset: 3px; }
.visually-hidden { position: absolute; width: 1px; height: 1px; overflow: hidden; white-space: nowrap; clip-path: inset(50%); }

@media (max-width: 900px) {
  .header-inner { align-items: flex-start; flex-direction: column; padding-block: .7rem; gap: .35rem; }
  .nav { gap: .55rem 1rem; }
  .hero-grid { grid-template-columns: minmax(0, 1fr); padding-block: clamp(2.4rem, 7vw, 4rem); gap: 1.8rem; }
  h1 { font-size: clamp(2.2rem, 8.4vw, 4.6rem); }
  .work-preview { max-width: 39rem; }
  .service-grid { grid-template-columns: 1fr; }
}
@media (max-width: 620px) {
  .process-grid, .company, .contact-inner, .sample-workspace { grid-template-columns: minmax(0, 1fr); }
  .contact-inner .button { justify-self: start; }
}
@media (max-width: 365px) {
  .nav { gap: .4rem .65rem; }
  .brand { font-size: .95rem; }
  .brand img { width: 86px; }
  h1 { font-size: clamp(1.85rem, 8.6vw, 2.45rem); }
}
