:root {
  font-family: Inter, "Hiragino Kaku Gothic ProN", "Yu Gothic", Meiryo, sans-serif;
  color: #172033;
  background: #f5f8ff;
  font-synthesis: none;
  text-rendering: optimizeLegibility;
}
* { box-sizing: border-box; }
body { margin: 0; min-width: 320px; min-height: 100vh; }
button, input, textarea, select { font: inherit; }
button { -webkit-tap-highlight-color: transparent; }
.app-shell { min-height: 100vh; display: flex; flex-direction: column; }
.site-header {
  height: 64px; display: flex; align-items: center;
  background: rgba(255,255,255,.94); border-bottom: 1px solid #e4eaf5;
  position: sticky; top: 0; z-index: 10; backdrop-filter: blur(12px);
}
.site-header, .container {
  padding-left: max(20px, calc((100vw - 880px) / 2));
  padding-right: max(20px, calc((100vw - 880px) / 2));
}
.brand {
  border: 0; background: transparent; color: #172033; font-weight: 800;
  font-size: 18px; display: inline-flex; align-items: center; gap: 10px;
  cursor: pointer; padding: 0;
}
.brand-mark {
  width: 36px; height: 36px; display: grid; place-items: center;
  border-radius: 11px; background: #2563eb; color: white; font-size: 14px;
}
.container { width: 100%; flex: 1; padding-top: 46px; padding-bottom: 64px; }
.hero { text-align: center; padding: 20px 0 44px; }
.eyebrow {
  display: inline-block; background: #e8f0ff; color: #1d4ed8; font-weight: 700;
  font-size: 13px; padding: 7px 12px; border-radius: 999px; margin-bottom: 18px;
}
.hero h1 {
  font-size: clamp(30px, 6vw, 48px); line-height: 1.25;
  letter-spacing: -.04em; margin: 0 0 18px;
}
.hero p { color: #59657a; font-size: 17px; line-height: 1.9; margin: 0 auto; max-width: 620px; }
.section-title { font-size: 22px; margin: 0 0 18px; }
.category-grid { display: grid; grid-template-columns: repeat(2,minmax(0,1fr)); gap: 16px; }
.category-card {
  border: 1px solid #dfe6f2; background: white; border-radius: 20px; padding: 22px;
  min-height: 156px; display: flex; align-items: flex-start; gap: 15px;
  text-align: left; color: inherit; cursor: pointer;
  box-shadow: 0 8px 24px rgba(31,54,92,.05);
}
.category-icon {
  width: 44px; height: 44px; flex: 0 0 auto; display: grid; place-items: center;
  border-radius: 14px; background: #f0f5ff; font-size: 24px;
}
.category-body { display: flex; flex-direction: column; gap: 7px; min-width: 0; }
.category-body strong { font-size: 17px; line-height: 1.45; }
.category-body span { color: #617086; font-size: 14px; line-height: 1.55; }
.category-body small { color: #2563eb; font-size: 12px; line-height: 1.5; }
.arrow { margin-left: auto; color: #9aa6b8; font-size: 26px; line-height: 1; }
.notice {
  margin-top: 28px; padding: 20px 22px; border-radius: 16px;
  background: #eef4ff; color: #42516a; font-size: 13px; line-height: 1.75;
}
.notice strong { color: #22314a; }
.notice p { margin: 5px 0 0; }
.form-page { max-width: 760px; margin: 0 auto; }
.back-button {
  border: 0; background: transparent; color: #2563eb; font-weight: 700;
  padding: 0; margin-bottom: 26px; cursor: pointer;
}
.form-heading { display: flex; align-items: center; gap: 16px; margin-bottom: 24px; }
.form-icon {
  width: 58px; height: 58px; flex: 0 0 auto; border-radius: 18px;
  background: #e9f1ff; display: grid; place-items: center; font-size: 30px;
}
.form-heading h1 { margin: 0 0 6px; font-size: clamp(24px,5vw,34px); line-height: 1.3; }
.form-heading p { color: #66748a; margin: 0; }
.form-card, .result-card {
  background: white; border: 1px solid #dfe6f2; border-radius: 22px; padding: 26px;
  box-shadow: 0 12px 32px rgba(31,54,92,.06);
}
.field + .field { margin-top: 25px; }
.field > label { display: block; font-weight: 750; margin-bottom: 10px; }
.required {
  margin-left: 8px; color: #dc2626; background: #fff0f0; border-radius: 6px;
  font-size: 11px; padding: 3px 6px; vertical-align: 2px;
}
textarea, input[type="text"], select {
  width: 100%; border: 1px solid #cfd8e6; border-radius: 12px; background: #fbfcff;
  color: #172033; padding: 13px 14px; outline: none;
}
textarea { resize: vertical; min-height: 104px; line-height: 1.7; }
textarea:focus, input[type="text"]:focus, select:focus {
  border-color: #5684e5; box-shadow: 0 0 0 4px rgba(37,99,235,.11);
}
.radio-group { display: grid; grid-template-columns: repeat(2,minmax(0,1fr)); gap: 10px; }
.radio-option {
  border: 1px solid #d8e0ec; border-radius: 12px; background: #fbfcff;
  padding: 12px 13px; display: flex; align-items: center; gap: 9px; cursor: pointer;
}
.radio-option:has(input:checked) {
  border-color: #2563eb; background: #eff5ff; color: #1749ad; font-weight: 700;
}
.radio-option input { accent-color: #2563eb; }
.error {
  margin-top: 22px; border-radius: 12px; padding: 12px 14px;
  background: #fff1f1; color: #b42318; font-weight: 700; font-size: 14px;
}
.primary-button {
  width: 100%; border: 0; border-radius: 13px; background: #2563eb; color: white;
  font-weight: 800; padding: 15px 18px; margin-top: 28px; cursor: pointer;
}
.result-card { margin-top: 22px; scroll-margin-top: 88px; }
.result-header {
  display: flex; align-items: center; justify-content: space-between;
  gap: 16px; margin-bottom: 16px;
}
.result-header h2 { margin: 4px 0 0; font-size: 21px; }
.result-label {
  color: #17803d; font-size: 12px; font-weight: 800;
  background: #ebf8ef; border-radius: 999px; padding: 5px 9px;
}
.copy-button {
  border: 1px solid #b9c8e1; background: white; color: #1d4ed8;
  font-weight: 800; border-radius: 10px; padding: 10px 14px; cursor: pointer;
}
.result-card pre {
  white-space: pre-wrap; overflow-wrap: anywhere; font-family: inherit; line-height: 1.85;
  background: #f7f9fd; border: 1px solid #e1e7f0; border-radius: 14px; padding: 18px; margin: 0;
}
.result-note { color: #6c788c; font-size: 13px; margin: 12px 2px 0; }
footer {
  text-align: center; color: #7b8798; font-size: 12px; padding: 22px;
  border-top: 1px solid #e1e7f0; background: white;
}
@media (max-width: 680px) {
  .site-header, .container { padding-left: 16px; padding-right: 16px; }
  .container { padding-top: 28px; padding-bottom: 44px; }
  .hero { padding: 12px 0 34px; }
  .hero p { font-size: 15px; }
  .category-grid { grid-template-columns: 1fr; gap: 12px; }
  .category-card { min-height: 0; padding: 18px; border-radius: 17px; }
  .form-card, .result-card { padding: 20px 17px; border-radius: 18px; }
  .form-heading { align-items: flex-start; }
  .form-icon { width: 50px; height: 50px; font-size: 25px; border-radius: 15px; }
  .radio-group { grid-template-columns: 1fr; }
  .result-header { align-items: flex-start; }
}
