/* HPしらべるくん — orange-based UI */

:root {
  --orange-50:  #FFF6EC;
  --orange-100: #FFE8D2;
  --orange-200: #FFD2A8;
  --orange-300: #FFB573;
  --orange-400: #FF9442;
  --orange-500: #F2761F;   /* primary */
  --orange-600: #D9601A;
  --orange-700: #B24A12;
  --orange-800: #8A370C;

  --cream:      #FFFFFF;
  --cream-2:    #F4F4F5;
  --paper:      #FFFFFF;

  --ink:        #141414;
  --ink-2:      #333333;
  --muted:      #6B6B6B;
  --muted-2:    #9A9A9A;

  --line:       #E3E3E5;
  --line-2:     #E3E3E5;

  --ok:    #2E8B57;
  --warn:  #D89220;
  --bad:   #C9482A;
  --info:  #2F6FB6;

  --rad-sm: 8px;
  --rad:    12px;
  --rad-lg: 18px;
  --rad-xl: 24px;

  --shadow-sm: 0 1px 2px rgba(0, 0, 0, .08), 0 1px 1px rgba(0, 0, 0, .05);
  --shadow:    0 6px 18px rgba(0, 0, 0, .10), 0 1px 2px rgba(0, 0, 0, .06);
  --shadow-lg: 0 24px 50px -20px rgba(0, 0, 0, .28), 0 8px 20px -8px rgba(0, 0, 0, .15);

  --font-jp: "Noto Sans JP", "Hiragino Kaku Gothic ProN", "Yu Gothic", system-ui, sans-serif;
  --font-num: "Inter", ui-sans-serif, system-ui, sans-serif;
}

* { box-sizing: border-box; }
html, body { margin: 0; padding: 0; }
body {
  font-family: var(--font-jp);
  color: var(--ink);
  background: #fafafa;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  font-feature-settings: "palt" 1;
  letter-spacing: .01em;
}

button { font-family: inherit; }

/* ─── App shell ─────────────────────────── */
.app {
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  background: #fafafa;
  /* ヘッダーを廃止し、ページ最上部に細いブランドアクセントバーを置く */
  border-top: 4px solid;
  border-image: linear-gradient(90deg, var(--orange-400), var(--orange-600)) 1;
}

.main {
  flex: 1;
  padding: 64px 40px 88px;
  display: flex; justify-content: center;
}
.container { width: 100%; max-width: 1080px; }

/* ─── Input screen ─────────────────────────── */
.hero {
  text-align: center;
  margin-bottom: 36px;
}
.hero .hero-logo {
  display: block;
  height: 56px; width: auto;
  margin: 0 auto 22px;
  max-width: 90%;
}
@media (max-width: 880px) { .hero .hero-logo { height: 42px; margin-bottom: 16px; } }
.hero h1 {
  font-size: 44px;
  line-height: 1.25;
  font-weight: 800;
  letter-spacing: .02em;
  margin: 0 0 16px;
}
.hero h1 .accent {
  color: var(--orange-600);
  position: relative;
}
.hero h1 .accent::after {
  content: "";
  position: absolute; left: 0; right: 0; bottom: 3px;
  height: 10px;
  background: var(--orange-200);
  z-index: -1;
  border-radius: 4px;
}
.hero .lead {
  font-size: 16px;
  line-height: 1.8;
  color: var(--ink-2);
  max-width: 640px;
  margin: 0 auto;
}

.form-card {
  background: var(--paper);
  border: 1px solid var(--line);
  border-radius: var(--rad-xl);
  padding: 40px 48px;
  box-shadow: var(--shadow);
  max-width: 720px;
  margin: 0 auto;
}
.form-card .form-title {
  font-size: 18px;
  font-weight: 700;
  margin: 0 0 4px;
  display: flex; align-items: center; gap: 10px;
}
.form-card .form-title .num {
  display: inline-grid; place-items: center;
  width: 26px; height: 26px;
  border-radius: 8px;
  background: var(--orange-500);
  color: white;
  font-size: 13px; font-weight: 700;
}
.form-card .form-sub {
  font-size: 13px;
  color: var(--muted);
  margin: 0 0 28px 36px;
}

.field { margin-bottom: 22px; }
.field label {
  display: flex; align-items: center; gap: 10px;
  font-size: 13px;
  font-weight: 600;
  color: var(--ink-2);
  margin-bottom: 8px;
}
.field label .req {
  font-size: 10px;
  color: var(--bad);
  background: #FCEDE8;
  padding: 2px 6px;
  border-radius: 4px;
  font-weight: 700;
  letter-spacing: .05em;
}
.field label .opt {
  font-size: 10px;
  color: var(--muted);
  background: var(--cream-2);
  padding: 2px 6px;
  border-radius: 4px;
  font-weight: 600;
}
.field .hint {
  font-size: 11.5px;
  color: var(--muted);
  margin-top: 6px;
  line-height: 1.5;
}
.field .hint.error { color: var(--bad); font-weight: 600; }
.input.invalid { border-color: var(--bad); background: #FCEDE8; }
.input.invalid:focus { box-shadow: 0 0 0 4px rgba(201, 72, 42, .14); }
.input-wrap {
  position: relative;
  display: flex; align-items: center;
}
.input-wrap .icon {
  position: absolute; left: 14px;
  color: var(--muted-2);
  pointer-events: none;
  display: flex;
}
.input {
  width: 100%;
  height: 50px;
  padding: 0 16px 0 44px;
  border-radius: var(--rad);
  border: 1.5px solid var(--line-2);
  background: var(--cream);
  font-size: 15px;
  color: var(--ink);
  font-family: inherit;
  outline: none;
  transition: border-color .15s, background .15s, box-shadow .15s;
}
.input::placeholder { color: var(--muted-2); }
.input:hover { border-color: var(--orange-300); }
.input:focus {
  border-color: var(--orange-500);
  background: var(--paper);
  box-shadow: 0 0 0 4px rgba(242, 118, 31, .14);
}

/* スクリーンリーダー用に見出し(h1/h2)へプログラム的フォーカスを当てているが、
   tabindex="-1" はキーボードのTabでは到達しないため、青いフォーカス輪郭は抑制する。 */
h1[tabindex="-1"]:focus, h2[tabindex="-1"]:focus { outline: none; }

.submit-row {
  margin-top: 32px;
  display: flex; flex-direction: column; gap: 12px;
}
.btn-primary {
  height: 56px;
  border: none;
  border-radius: var(--rad);
  background: linear-gradient(180deg, var(--orange-500) 0%, var(--orange-600) 100%);
  color: white;
  font-size: 16px;
  font-weight: 700;
  letter-spacing: .04em;
  cursor: pointer;
  display: inline-flex; align-items: center; justify-content: center; gap: 10px;
  box-shadow:
    0 1px 0 rgba(255,255,255,.25) inset,
    0 8px 24px -6px rgba(0, 0, 0, .25),
    0 2px 4px rgba(0, 0, 0, .18);
  transition: transform .12s, box-shadow .15s, filter .15s;
}
.btn-primary:hover { filter: brightness(1.05); transform: translateY(-1px); }
.btn-primary:active { transform: translateY(0); filter: brightness(.96); }
.btn-primary:disabled {
  background: var(--muted-2);
  box-shadow: none;
  cursor: not-allowed;
  filter: none; transform: none;
}
.submit-meta {
  text-align: center;
  font-size: 11.5px;
  color: var(--muted);
}
.submit-meta .dot { color: var(--muted-2); margin: 0 8px; }


/* ─── Loading screen ─────────────────────────── */
.loading-wrap {
  display: flex; flex-direction: column; align-items: center;
  padding-top: 24px;
}
.loading-card {
  background: var(--paper);
  border: 1px solid var(--line);
  border-radius: var(--rad-xl);
  padding: 48px 56px;
  box-shadow: var(--shadow-lg);
  width: 100%; max-width: 640px;
}
.loading-header {
  text-align: center;
  margin-bottom: 36px;
}
.loading-pulse {
  width: 72px; height: 72px;
  margin: 0 auto 20px;
  position: relative;
}
.loading-pulse .ring {
  position: absolute; inset: 0;
  border-radius: 50%;
  border: 3px solid var(--orange-200);
  border-top-color: var(--orange-500);
  animation: spin 1.1s linear infinite;
}
.loading-pulse .core {
  position: absolute; inset: 16px;
  border-radius: 50%;
  background: linear-gradient(135deg, var(--orange-400), var(--orange-600));
  display: grid; place-items: center;
  color: white; font-weight: 800;
  box-shadow: inset 0 2px 0 rgba(255,255,255,.3);
  animation: breathe 2.4s ease-in-out infinite;
}
@keyframes spin { to { transform: rotate(360deg); } }
@keyframes breathe { 0%,100% { transform: scale(.92); } 50% { transform: scale(1); } }

.loading-header h2 {
  font-size: 22px; margin: 0 0 6px;
  font-weight: 700;
}
.loading-header p {
  margin: 0; font-size: 13px; color: var(--muted);
}
.loading-header .target {
  margin-top: 10px;
  font-size: 12px;
  color: var(--ink-2);
  padding: 6px 12px;
  background: var(--cream-2);
  border-radius: 100px;
  display: inline-block;
  font-family: var(--font-num);
}

.progress-bar {
  height: 6px;
  background: var(--cream-2);
  border-radius: 100px;
  overflow: hidden;
  margin-bottom: 28px;
}
.progress-bar .fill {
  height: 100%;
  background: linear-gradient(90deg, var(--orange-400), var(--orange-600));
  border-radius: 100px;
  transition: width .5s cubic-bezier(.4,0,.2,1);
}

.steps { list-style: none; padding: 0; margin: 0; display: flex; flex-direction: column; gap: 6px; }
.step {
  display: flex; align-items: center; gap: 14px;
  padding: 12px 10px;
  border-radius: var(--rad);
  transition: background .25s;
  font-size: 14px;
}
.step.active { background: var(--orange-50); }
.step .step-ic {
  width: 28px; height: 28px;
  border-radius: 50%;
  background: var(--cream-2);
  color: var(--muted);
  display: grid; place-items: center;
  font-size: 12px; font-weight: 700;
  border: 1.5px solid var(--line-2);
  flex-shrink: 0;
}
.step.done .step-ic {
  background: var(--orange-500);
  border-color: var(--orange-500);
  color: white;
}
.step.active .step-ic {
  background: var(--paper);
  border-color: var(--orange-500);
  color: var(--orange-600);
  position: relative;
}
.step.active .step-ic::after {
  content: "";
  position: absolute; inset: -4px;
  border-radius: 50%;
  border: 1.5px solid var(--orange-500);
  opacity: .4;
  animation: pulse-ring 1.4s ease-out infinite;
}
@keyframes pulse-ring { from { transform: scale(.8); opacity: .7; } to { transform: scale(1.4); opacity: 0; } }

.step .step-text { flex: 1; color: var(--ink-2); font-weight: 500; }
.step.done .step-text { color: var(--muted); }
.step.active .step-text { color: var(--ink); font-weight: 600; }
.step .step-mini {
  font-size: 11.5px; color: var(--muted);
  font-family: var(--font-num);
}

.loading-foot {
  margin-top: 28px;
  text-align: center;
  font-size: 11.5px;
  color: var(--muted-2);
}

/* ─── Result screen ─────────────────────────── */
.result-head {
  display: flex; justify-content: space-between; align-items: flex-end;
  gap: 24px; margin-bottom: 28px;
  padding-bottom: 24px;
  border-bottom: 1px solid var(--line);
}
.result-head .meta-tag {
  display: inline-flex; align-items: center; gap: 6px;
  font-size: 11px; font-weight: 600; color: var(--orange-700);
  background: var(--orange-50);
  padding: 4px 10px;
  border-radius: 100px;
  border: 1px solid var(--orange-200);
  margin-bottom: 10px;
}
.result-head h2 {
  font-size: 26px; margin: 0 0 8px;
  font-weight: 800;
  letter-spacing: .01em;
}
.result-head .submeta {
  display: flex; gap: 16px; font-size: 12.5px; color: var(--muted);
}
.result-head .submeta span b {
  color: var(--ink-2); font-weight: 600; margin-right: 4px;
}
.result-actions {
  display: flex; gap: 10px; flex-shrink: 0;
}
.btn-ghost, .btn-solid {
  height: 42px; padding: 0 18px;
  border-radius: 10px;
  font-size: 13px; font-weight: 600;
  cursor: pointer; display: inline-flex; align-items: center; gap: 8px;
  transition: all .15s;
}
.btn-ghost {
  background: var(--paper);
  border: 1px solid var(--line-2);
  color: var(--ink-2);
}
.btn-ghost:hover { border-color: var(--orange-400); color: var(--orange-700); }
.btn-ghost:disabled { opacity: .8; cursor: wait; }
.btn-ghost.ok  { background: #E1F0E8; color: var(--ok);  border-color: #BFD7B0; }
.btn-ghost.bad { background: #FCEDE8; color: var(--bad); border-color: #F5C9BD; }
.btn-solid {
  background: var(--ink);
  border: none;
  color: white;
}
.btn-solid:hover { background: var(--ink-2); }

/* score panel */
.score-grid {
  display: grid;
  grid-template-columns: 360px 1fr;
  gap: 16px;
  margin-bottom: 24px;
}
.score-card {
  background: linear-gradient(165deg, #FFF6EC 0%, #FFE8D2 60%, #FFD2A8 110%);
  border: 1px solid var(--orange-200);
  border-radius: var(--rad-xl);
  padding: 28px;
  position: relative;
  overflow: hidden;
  display: flex; flex-direction: column; gap: 14px;
}
.score-card::before {
  content: ""; position: absolute;
  right: -30px; top: -30px; width: 200px; height: 200px;
  background: radial-gradient(circle, rgba(255,255,255,.7), transparent 70%);
  pointer-events: none;
}
.score-card .label {
  font-size: 11px; font-weight: 700;
  letter-spacing: .12em; text-transform: uppercase;
  color: var(--orange-700);
}
.score-ring-wrap {
  display: flex; align-items: center; gap: 24px;
}
.score-ring {
  width: 152px; height: 152px;
  flex-shrink: 0;
  position: relative;
}
.score-ring svg { transform: rotate(-90deg); width: 100%; height: 100%; }
.score-ring .num {
  position: absolute; inset: 0;
  display: flex; flex-direction: column; align-items: center; justify-content: center;
  font-family: var(--font-num);
}
.score-ring .num .big {
  font-size: 50px; font-weight: 800; line-height: 1; color: var(--ink);
  letter-spacing: -.02em;
}
.score-ring .num .small {
  font-size: 12px; color: var(--muted); margin-top: 2px;
}
.score-ring-side .rank-row {
  display: flex; align-items: center; gap: 10px;
  margin-bottom: 10px;
}
.rank-badge {
  width: 48px; height: 48px;
  border-radius: 12px;
  display: grid; place-items: center;
  font-family: var(--font-num);
  font-size: 26px; font-weight: 800;
  color: white;
  box-shadow: inset 0 -3px 0 rgba(0,0,0,.12), 0 4px 10px rgba(0,0,0,.08);
}
.rank-badge.A { background: linear-gradient(135deg, #36A36F, #1F7A4F); }
.rank-badge.B { background: linear-gradient(135deg, #4F95DD, #2F6FB6); }
.rank-badge.C { background: linear-gradient(135deg, #F2A93C, #C97D14); }
.rank-badge.D { background: linear-gradient(135deg, #E36E54, #B33C24); }
.score-ring-side .rank-label {
  font-size: 12px; color: var(--muted); font-weight: 600;
}
.score-ring-side .rank-name {
  font-size: 17px; font-weight: 700; color: var(--ink);
}
.score-card .verdict {
  font-size: 13px; line-height: 1.75;
  color: var(--ink-2);
  background: rgba(255,255,255,.55);
  border: 1px solid rgba(255,255,255,.9);
  padding: 12px 14px;
  border-radius: var(--rad);
}

/* categories */
.cat-card {
  background: var(--paper);
  border: 1px solid var(--line);
  border-radius: var(--rad-xl);
  padding: 24px 28px;
}
.cat-card h3 {
  font-size: 14px; margin: 0 0 4px;
  font-weight: 700;
  display: flex; align-items: center; gap: 8px;
}
.cat-card .cat-sub {
  font-size: 11.5px; color: var(--muted); margin: 0 0 18px;
}
.cat-list { display: flex; flex-direction: column; gap: 14px; }
.cat-row { display: grid; grid-template-columns: 130px 1fr 70px; gap: 14px; align-items: center; }
.cat-row .name { font-size: 13px; font-weight: 600; color: var(--ink-2); }
.cat-row .bar { height: 8px; background: var(--cream-2); border-radius: 100px; overflow: hidden; }
.cat-row .bar .fill {
  height: 100%; border-radius: 100px;
  transition: width .8s cubic-bezier(.4,0,.2,1);
}
.cat-row .score-num {
  text-align: right;
  font-family: var(--font-num);
  font-size: 13px; font-weight: 700;
  color: var(--ink);
  font-variant-numeric: tabular-nums;
}
.cat-row .score-num .of { color: var(--muted-2); font-weight: 500; font-size: 11px; }

/* improvement list */
.section-title {
  display: flex; align-items: baseline; justify-content: space-between;
  margin: 36px 0 16px;
}
.section-title h3 {
  margin: 0; font-size: 18px; font-weight: 800;
  display: flex; align-items: center; gap: 10px;
}
.section-title h3 .ico {
  width: 28px; height: 28px;
  border-radius: 8px;
  background: var(--orange-500);
  color: white;
  display: grid; place-items: center;
  font-size: 13px;
}
.section-title .right { font-size: 12px; color: var(--muted); }

.improvements {
  display: flex; flex-direction: column; gap: 12px;
}
.imp {
  background: var(--paper);
  border: 1px solid var(--line);
  border-radius: var(--rad-lg);
  padding: 20px 24px;
  display: grid;
  grid-template-columns: 46px 1fr auto;
  gap: 18px;
  align-items: start;
  transition: border-color .15s, box-shadow .15s;
}
.imp:hover { border-color: var(--orange-300); box-shadow: var(--shadow-sm); }
.imp .rank {
  font-family: var(--font-num);
  font-size: 26px; font-weight: 800;
  color: var(--orange-500);
  line-height: 1;
  letter-spacing: -.02em;
}
.imp .rank-no { color: var(--muted-2); font-size: 11px; font-weight: 600; }
.imp .body h4 {
  margin: 0 0 6px; font-size: 15px; font-weight: 700;
  line-height: 1.45;
}
.imp .body .why {
  font-size: 12.5px; color: var(--muted); line-height: 1.75; margin: 0 0 10px;
}
.imp .body .example {
  display: inline-flex; align-items: center; gap: 8px;
  font-size: 12px;
  background: var(--cream-2);
  border: 1px dashed var(--line-2);
  padding: 8px 12px;
  border-radius: 8px;
  color: var(--ink-2);
  margin-top: 4px;
}
.imp .body .example b { color: var(--orange-700); font-weight: 700; font-size: 11px; margin-right: 4px; }
.imp .meta { display: flex; flex-direction: column; gap: 6px; align-items: flex-end; }
.imp .pri {
  font-size: 11px; font-weight: 700;
  padding: 4px 10px; border-radius: 100px;
  letter-spacing: .04em;
}
.imp .pri.high { background: #FCEDE8; color: var(--bad); border: 1px solid #F5C9BD; }
.imp .pri.mid  { background: #FFF1D6; color: var(--warn); border: 1px solid #FFD688; }
.imp .pri.low  { background: #E9F1E5; color: var(--ok); border: 1px solid #BFD7B0; }
.imp .cat-tag {
  font-size: 10.5px; color: var(--muted);
  padding: 3px 8px; border-radius: 6px;
  background: var(--cream); border: 1px solid var(--line);
}

/* detail accordion-ish */
.detail-grid {
  display: grid; grid-template-columns: 1fr 1fr; gap: 14px;
  margin-top: 14px;
}
.detail-card {
  background: var(--paper);
  border: 1px solid var(--line);
  border-radius: var(--rad-lg);
  padding: 22px 24px;
}
.detail-card .dh {
  display: flex; align-items: center; justify-content: space-between;
  margin-bottom: 16px;
  padding-bottom: 14px;
  border-bottom: 1px dashed var(--line);
}
.detail-card .dh h4 {
  margin: 0; font-size: 14px; font-weight: 700;
  display: flex; align-items: center; gap: 10px;
}
.detail-card .dh h4 .ic {
  width: 24px; height: 24px; border-radius: 6px;
  background: var(--orange-50); color: var(--orange-600);
  display: grid; place-items: center;
  border: 1px solid var(--orange-200);
}
.detail-card .dh .sc {
  font-family: var(--font-num);
  font-size: 13px; font-weight: 700;
}
.detail-card .dh .sc .of { color: var(--muted-2); font-weight: 500; font-size: 11px; }

.check-list { list-style: none; padding: 0; margin: 0; display: flex; flex-direction: column; gap: 8px; }
.check-list li {
  display: flex; align-items: flex-start; gap: 10px; flex-wrap: wrap;
  font-size: 12.5px;
  padding: 6px 0;
}
.check-list li .ic {
  width: 18px; height: 18px; flex-shrink: 0;
  border-radius: 50%;
  display: grid; place-items: center;
  font-size: 10px;
  margin-top: 1px;
}
.check-list li.ok .ic { background: #E1F0E8; color: var(--ok); }
.check-list li.warn .ic { background: #FFF0CC; color: var(--warn); }
.check-list li.bad .ic { background: #FCEDE8; color: var(--bad); }
.check-list li .item-name { color: var(--ink-2); flex: 1 1 210px; }
.check-list li .conf {
  font-size: 10.5px;
  color: var(--muted);
  padding: 1px 7px;
  border-radius: 4px;
  background: var(--cream-2);
  font-family: var(--font-num);
  letter-spacing: .03em;
}
.conf-badge {
  font-size: 10px;
  font-weight: 700;
  padding: 2px 7px;
  border-radius: 999px;
  border: 1px solid var(--line);
  white-space: nowrap;
}
.conf-badge.high { background: #E1F0E8; color: var(--ok); border-color: #BFD7B0; }
.conf-badge.medium { background: #FFF1D6; color: var(--warn); border-color: #FFD688; }
.conf-badge.low { background: #FCEDE8; color: var(--bad); border-color: #F5C9BD; }
.evidence-box {
  flex: 0 0 calc(100% - 28px);
  margin-left: 28px;
  color: var(--muted);
}
.evidence-box summary {
  cursor: pointer;
  font-size: 11px;
  font-weight: 700;
  color: var(--orange-700);
}
.evidence-list {
  display: flex;
  flex-direction: column;
  gap: 6px;
  margin-top: 6px;
}
.ev-row {
  display: grid;
  grid-template-columns: 86px 1fr;
  gap: 2px 8px;
  padding: 8px 10px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--cream-2);
  text-decoration: none;
  color: inherit;
}
.ev-row:hover { border-color: var(--orange-300); background: #FFF6EC; }
.ev-label { font-size: 10.5px; font-weight: 700; color: var(--ink-2); }
.ev-url {
  font-size: 10px;
  font-family: var(--font-num);
  color: var(--muted-2);
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.ev-snippet {
  grid-column: 1 / -1;
  font-size: 11px;
  line-height: 1.55;
  color: var(--ink-2);
}
.no-evidence {
  flex: 0 0 calc(100% - 28px);
  margin-left: 28px;
  font-size: 10.5px;
  color: var(--muted-2);
}

.foot-cta {
  margin-top: 40px;
  padding: 28px;
  background: linear-gradient(135deg, var(--ink) 0%, #3F2E1A 100%);
  border-radius: var(--rad-xl);
  color: white;
  display: flex; justify-content: space-between; align-items: center; gap: 24px;
}
.foot-cta h4 { font-size: 18px; margin: 0 0 6px; font-weight: 700; }
.foot-cta p { margin: 0; font-size: 13px; color: rgba(255,255,255,.7); line-height: 1.7; }
.foot-cta .btn-primary { box-shadow: 0 8px 24px -6px rgba(0, 0, 0, .35); }

/* ─── 追加スタイル（葬儀社診断版） ─────────────── */
.alert-box {
  max-width: 720px; margin: 0 auto 20px;
  display: flex; align-items: center; gap: 10px;
  background: #FCEDE8; border: 1px solid #F5C9BD;
  color: var(--bad); font-size: 13px; font-weight: 600;
  padding: 12px 18px; border-radius: var(--rad);
}

.report-greeting {
  background: var(--paper); border: 1px solid var(--line);
  border-left: 4px solid var(--orange-500);
  border-radius: var(--rad); padding: 18px 22px;
  font-size: 14px; line-height: 1.85; color: var(--ink-2);
  margin-bottom: 24px;
}

.score-ring-side .rank-note {
  font-size: 12px; line-height: 1.65; color: var(--ink-2);
  margin-top: 12px; max-width: 200px;
}

.kw-row {
  margin-top: 18px; padding-top: 16px; border-top: 1px dashed var(--line);
  display: flex; flex-wrap: wrap; align-items: center; gap: 6px;
}
.kw-label { font-size: 11.5px; color: var(--muted); font-weight: 600; margin-right: 4px; }
.kw-chip {
  font-size: 11px; font-weight: 600; padding: 3px 9px; border-radius: 100px;
  border: 1px solid var(--line-2);
}
.kw-chip.type   { background: var(--orange-50); color: var(--orange-700); border-color: var(--orange-200); }
.kw-chip.region { background: #EAF1F8; color: var(--info); border-color: #CFE0F0; }

.imp .body .example code { font-family: var(--font-num); font-size: 11.5px; }

.crawl-box {
  margin-top: 24px; background: var(--paper); border: 1px solid var(--line);
  border-radius: var(--rad-lg); padding: 4px 20px;
}
.crawl-box summary {
  cursor: pointer; font-size: 13px; font-weight: 600; color: var(--ink-2);
  padding: 14px 0; list-style-position: inside;
}
.crawl-box summary:hover { color: var(--orange-700); }
.crawl-list {
  list-style: none; padding: 0 0 14px; margin: 0;
  display: grid; grid-template-columns: 1fr 1fr; gap: 6px 18px;
}
.crawl-list li {
  display: flex; align-items: center; gap: 8px;
  font-size: 12px; color: var(--muted); font-family: var(--font-num);
}
.crawl-list li span:nth-child(2) {
  min-width: 0;
  flex: 1;
}
.crawl-list li em {
  font-style: normal;
  font-size: 10px;
  color: var(--muted-2);
  background: var(--cream-2);
  border: 1px solid var(--line);
  border-radius: 999px;
  padding: 1px 6px;
}
.crawl-list li .dot-ok {
  width: 16px; height: 16px; flex-shrink: 0; border-radius: 50%;
  background: #E1F0E8; color: var(--ok); display: grid; place-items: center;
}

.disclaimer {
  margin-top: 24px; font-size: 11.5px; line-height: 1.7;
  color: var(--muted-2); text-align: center;
}

/* ─── 商圏（地域名）の充足状況 ─────────────── */
.region-card {
  background: var(--paper);
  border: 1px solid var(--line);
  border-radius: var(--rad-xl);
  padding: 22px 26px;
  margin-bottom: 24px;
}
.region-head {
  display: flex; align-items: center; justify-content: space-between;
  gap: 14px; flex-wrap: wrap; margin-bottom: 4px;
}
.region-head h3 {
  margin: 0; font-size: 16px; font-weight: 800;
  display: flex; align-items: center; gap: 8px;
}
.region-pct {
  font-size: 12.5px; font-weight: 700; font-family: var(--font-num);
  padding: 4px 12px; border-radius: 100px;
}
.region-pct.ok   { background: #E1F0E8; color: var(--ok); }
.region-pct.warn { background: #FFF0CC; color: var(--warn); }
.region-pct.bad  { background: #FCEDE8; color: var(--bad); }
.region-sub { margin: 0 0 14px; font-size: 12.5px; color: var(--muted); line-height: 1.7; }
.region-chips { display: flex; flex-wrap: wrap; gap: 8px; margin-bottom: 14px; }
.rg-chip {
  display: inline-flex; align-items: center; gap: 6px;
  font-size: 13px; font-weight: 600; padding: 6px 13px; border-radius: 100px;
}
.rg-chip.ok   { background: var(--orange-50); color: var(--orange-700); border: 1px solid var(--orange-200); }
.rg-chip.miss { background: #F4F4F4; color: var(--muted); border: 1px dashed #CFCFCF; }
.region-warn {
  margin: 0; font-size: 12.5px; line-height: 1.75; color: var(--ink-2);
  background: #FFF6EC; border: 1px solid var(--orange-200);
  padding: 12px 14px; border-radius: var(--rad);
  display: flex; align-items: flex-start; gap: 8px;
}
.region-warn b { color: var(--bad); }
.region-good {
  margin: 0; font-size: 12.5px; line-height: 1.7; color: var(--ok);
  display: flex; align-items: center; gap: 8px;
}

/* ─── 表示品質・技術状態 ─────────────── */
.tech-card {
  background: var(--paper);
  border: 1px solid var(--line);
  border-radius: var(--rad-xl);
  padding: 22px 26px;
  margin-bottom: 24px;
}
.tech-head {
  display: grid;
  grid-template-columns: 170px 1fr;
  gap: 18px;
  align-items: stretch;
  padding-bottom: 16px;
  border-bottom: 1px dashed var(--line);
  margin-bottom: 16px;
}
.tech-label {
  font-size: 11px;
  font-weight: 700;
  color: var(--muted);
  margin-bottom: 4px;
}
.tech-score {
  font-family: var(--font-num);
  font-size: 34px;
  font-weight: 800;
  color: var(--orange-600);
  line-height: 1;
}
.tech-score span {
  font-size: 14px;
  color: var(--muted-2);
  margin-left: 3px;
}
.tech-metrics {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 8px;
}
.tech-metric {
  background: var(--cream-2);
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 8px 10px;
  min-width: 0;
}
.tech-metric span {
  display: block;
  font-size: 10.5px;
  color: var(--muted);
  margin-bottom: 2px;
}
.tech-metric b {
  display: block;
  font-size: 12px;
  color: var(--ink-2);
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.tech-list {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px 16px;
}
.tech-list li {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 11px 12px;
}
.tech-list li .ic {
  width: 18px; height: 18px; flex-shrink: 0;
  border-radius: 50%;
  display: grid; place-items: center;
  margin-top: 1px;
}
.tech-list li.ok .ic { background: #E1F0E8; color: var(--ok); }
.tech-list li.warn .ic { background: #FFF0CC; color: var(--warn); }
.tech-list li.bad .ic { background: #FCEDE8; color: var(--bad); }
.tech-main {
  min-width: 0;
  flex: 1;
  display: flex;
  align-items: flex-start;
  gap: 7px;
  flex-wrap: wrap;
}
.tech-main .item-name {
  flex: 1 1 180px;
  color: var(--ink-2);
  font-size: 12.5px;
  font-weight: 700;
  line-height: 1.55;
}
.tech-main .conf {
  font-size: 10.5px;
  color: var(--muted);
  padding: 2px 7px;
  border-radius: 4px;
  background: var(--cream-2);
  font-family: var(--font-num);
}
.tech-main .evidence-box { flex-basis: 100%; margin-left: 0; }

/* ─── ウェブ集客チェックリスト ─────────────── */
.checklist {
  border: 1px solid var(--line); border-radius: var(--rad-lg);
  overflow: hidden; background: var(--paper);
}
.cl-row {
  display: grid; grid-template-columns: 130px 92px 1fr;
  align-items: stretch; border-bottom: 1px solid var(--line);
}
.cl-row:last-child { border-bottom: none; }
.cl-head {
  background: #ECECEC; font-weight: 700; font-size: 12.5px; color: var(--ink-2);
}
.cl-head .cl-cat, .cl-head .cl-check, .cl-head .cl-detail {
  padding: 11px 16px; text-align: center;
}
.cl-head .cl-detail { text-align: left; }
.cl-cat {
  display: flex; align-items: center; justify-content: center;
  font-size: 12.5px; font-weight: 700; color: var(--ink-2);
  padding: 12px 10px; text-align: center; line-height: 1.4;
  border-right: 1px solid rgba(0,0,0,.04);
}
.cl-check {
  display: flex; align-items: center; justify-content: center;
  font-size: 22px; font-weight: 800; font-family: var(--font-num);
  border-right: 1px solid rgba(0,0,0,.04);
}
.cl-check.ok { color: var(--ok); }
.cl-check.bad { color: var(--bad); }
.cl-detail {
  display: flex; flex-direction: column; justify-content: center; gap: 3px;
  padding: 12px 18px; font-size: 13.5px; line-height: 1.55; color: var(--ink);
}
.cl-detail .cl-conf {
  font-size: 11px; color: var(--muted); font-family: var(--font-num);
  letter-spacing: .02em;
}
/* カテゴリ別カラーバンド（画像に準拠） */
.cl-seo   { background: #FCEBDB; }
.cl-cv    { background: #FAD8D8; }
.cl-meo   { background: #DCEEF4; }
.cl-voice { background: #FBF7D6; }
.cl-third { background: #FBF7D6; }
.cl-row:not(.cl-head):hover { filter: brightness(.98); }

.cl-note {
  margin: 12px 2px 0; font-size: 11.5px; line-height: 1.7; color: var(--muted);
}

@media (max-width: 880px) {
  .cl-row { grid-template-columns: 84px 54px 1fr; }
  .cl-check { font-size: 18px; }
  .cl-detail { font-size: 12.5px; padding: 10px 12px; }
  .cl-cat { font-size: 11px; padding: 10px 6px; }
}
@media print {
  .checklist, .cl-row { break-inside: avoid; }
  .cl-seo, .cl-cv, .cl-meo, .cl-voice, .cl-third, .cl-head {
    -webkit-print-color-adjust: exact; print-color-adjust: exact;
  }
}

/* ─── レスポンシブ ─────────────── */
@media (max-width: 880px) {
  .main { padding: 40px 18px 64px; }
  .hero h1 { font-size: 30px; }
  .form-card { padding: 28px 22px; }
  .score-grid { grid-template-columns: 1fr; }
  .result-head { flex-direction: column; align-items: flex-start; }
  .detail-grid { grid-template-columns: 1fr; }
  .tech-head { grid-template-columns: 1fr; }
  .tech-metrics { grid-template-columns: 1fr 1fr; }
  .tech-list { grid-template-columns: 1fr; }
  .ev-row { grid-template-columns: 1fr; }
  .crawl-list { grid-template-columns: 1fr; }
  .imp { grid-template-columns: 36px 1fr; }
  .imp .meta { grid-column: 2; flex-direction: row; }
  .foot-cta { flex-direction: column; align-items: flex-start; }
  .result-actions { flex-wrap: wrap; }
}

/* ─── サイトフッター（提供元クレジット） ─────────────── */
.site-footer {
  margin-top: auto;
  border-top: 1px solid #E3E3E5;
  background: #f3f3f3;
  padding: 28px 40px 22px;
}
.footer-inner {
  max-width: 1080px; margin: 0 auto;
  display: flex; align-items: center; justify-content: space-between;
  gap: 28px; flex-wrap: wrap;
}
.footer-brand { display: flex; align-items: center; gap: 16px; flex: 1; min-width: 280px; }
.footer-brand .foot-wide { height: 30px; width: auto; flex-shrink: 0; }
.footer-brand p {
  margin: 0; font-size: 12px; line-height: 1.7; color: var(--ink-2); max-width: 460px;
}
.footer-brand p strong { color: var(--orange-700); font-weight: 700; }
.footer-provider { display: flex; align-items: center; gap: 12px; flex-shrink: 0; }
.footer-provider .prov-label {
  font-size: 11px; color: var(--muted); font-weight: 600;
  padding: 3px 9px; border: 1px solid var(--line-2); border-radius: 100px; background: var(--paper);
}
.footer-provider .foot-delight { height: 30px; width: auto; }
/* ロゴをクリックで各サイトへ（体裁を崩さないラッパー） */
.logo-link { display: inline-flex; align-items: center; line-height: 0; text-decoration: none; }
.logo-link:hover { opacity: .82; }
.footer-copy {
  max-width: 1080px; margin: 18px auto 0;
  padding-top: 16px; border-top: 1px dashed var(--line);
  font-size: 11px; color: var(--muted-2); text-align: center;
  font-family: var(--font-num);
}

@media (max-width: 880px) {
  .site-footer { padding: 22px 18px 18px; }
  .footer-inner { gap: 18px; }
  .footer-brand { min-width: 0; flex-direction: column; align-items: flex-start; gap: 10px; }
}

/* ─── 印刷（PDF保存） ─────────────── */
@media print {
  body { background: #fff; }
  .result-actions, .foot-cta, .crawl-collapse, .loading-foot { display: none !important; }
  .app { background: #fff; }
  .main { padding: 0 0 16px; }
  .score-card { background: #FFF6EC !important; -webkit-print-color-adjust: exact; print-color-adjust: exact; }
  .imp, .detail-card, .cat-card, .report-greeting { break-inside: avoid; }
  .rank-badge, .kw-chip, .pri, .cat-row .bar .fill, .check-list li .ic,
  .cl-seo, .cl-cv, .cl-meo, .cl-voice, .cl-third {
    -webkit-print-color-adjust: exact; print-color-adjust: exact;
  }
  /* フッターは「作成：葬儀のウェブ担当」のレポートクレジットとして印刷に残す */
  .site-footer { border-top: 1px solid #ccc; background: #fff !important; padding: 20px 0 0; break-inside: avoid; }
  .footer-brand p { display: none; }
}

/* 目安・根拠を同じ体裁（ラベル＋値の対）で表示 */
.item-detail { flex: 0 0 calc(100% - 28px); margin-left: 28px; display: flex; flex-direction: column; gap: 6px; margin-top: 3px; }
.tech-main .item-detail { flex-basis: 100%; margin-left: 0; }
.item-kv { display: grid; grid-template-columns: 42px 1fr; gap: 8px; align-items: start; }
.item-kv .k { font-size: 10px; font-weight: 700; color: var(--ink-2); background: var(--cream-2); border: 1px solid var(--line); border-radius: 6px; padding: 2px 0; text-align: center; line-height: 1.5; }
.item-kv .v { font-size: 11px; color: var(--muted); line-height: 1.6; min-width: 0; }
.item-kv .v .none { color: var(--muted-2); }
.ev-list { display: flex; flex-direction: column; gap: 6px; }


/* ═══ UIブラッシュアップ：白黒ハイコントラスト＋「現状/目安/達成」再設計 ═══ */
html { scroll-behavior: smooth; }
[id^="sec-"] { scroll-margin-top: 16px; }

/* 目次（TOC） */
.toc {
  display: flex; flex-wrap: wrap; align-items: center; gap: 8px 14px;
  background: var(--paper); border: 1px solid var(--line);
  border-radius: 12px; padding: 12px 18px; margin-bottom: 24px;
}
.toc .toc-label { font-size: 12px; font-weight: 800; color: var(--ink); margin-right: 2px; }
.toc a {
  font-size: 12.5px; font-weight: 600; color: var(--ink-2);
  text-decoration: none; padding: 3px 2px; border-bottom: 2px solid transparent;
}
.toc a:hover { color: #000; border-bottom-color: var(--ink); }

/* セクション見出しアイコン・詳細カードアイコンを白黒へ */
.section-title h3 .ico { background: var(--ink); color: #fff; }
.detail-card .dh h4 .ic { background: #F0F0F1; color: var(--ink-2); border-color: var(--line); }

/* 項目（詳細・技術 共通）：枠で囲まず細い境界線で区切り、現状→目安→根拠を縦に */
.check-list, .tech-list { display: block; }
.check-list li, .tech-list li {
  display: block; padding: 14px 2px; margin: 0;
  border: none; border-bottom: 1px solid var(--line); border-radius: 0; background: none;
}
.check-list li:last-child, .tech-list li:last-child { border-bottom: none; }

.item-head { display: flex; align-items: center; gap: 9px; margin-bottom: 9px; }
.item-head .ic {
  width: 19px; height: 19px; flex-shrink: 0; border-radius: 50%;
  display: grid; place-items: center; font-size: 10px; margin: 0;
}
.check-list li.ok .ic,   .tech-list li.ok .ic   { background: #E1F0E8; color: var(--ok); }
.check-list li.warn .ic, .tech-list li.warn .ic { background: #FFF0CC; color: var(--warn); }
.check-list li.bad .ic,  .tech-list li.bad .ic  { background: #FCEDE8; color: var(--bad); }
.item-head .item-name { flex: 1 1 auto; color: var(--ink); font-weight: 700; font-size: 13.5px; line-height: 1.4; }
.item-head .conf-min { font-size: 10.5px; color: var(--muted-2); font-weight: 600; white-space: nowrap; }
.item-head .state-badge {
  font-size: 11px; font-weight: 800; white-space: nowrap;
  padding: 2px 11px; border-radius: 999px; border: 1.5px solid; background: #fff;
}
.state-badge.ok   { color: var(--ok);   border-color: var(--ok); }
.state-badge.warn { color: var(--warn); border-color: var(--warn); }
.state-badge.bad  { color: var(--bad);  border-color: var(--bad); }

/* 現状＝実測値を大きく・太字・黒で（主役） */
.item-now { display: flex; align-items: baseline; gap: 10px; margin: 0 0 5px 28px; }
.item-now .k, .item-goal .k, .item-evidence .k {
  flex-shrink: 0; width: 30px; font-size: 10px; font-weight: 700; color: var(--muted); letter-spacing: .02em;
}
.item-now .now-v {
  font-size: 19px; font-weight: 800; color: #000; line-height: 1.3;
  font-family: var(--font-num); font-variant-numeric: tabular-nums; word-break: break-word;
}
/* 目安＝補足としてグレー小さく */
.item-goal { display: flex; align-items: baseline; gap: 10px; margin: 0 0 8px 28px; }
.item-goal .goal-v { font-size: 11.5px; color: var(--muted); line-height: 1.6; }
/* 根拠＝枠で囲まず素のテキストで */
.item-evidence { display: flex; align-items: baseline; gap: 10px; margin-left: 28px; }
.item-evidence .ev-v { min-width: 0; flex: 1; }
.item-evidence .ev-v .none { font-size: 11px; color: var(--muted-2); }

/* 根拠リンクの脱オレンジ・脱枠 */
.ev-list { display: flex; flex-direction: column; gap: 4px; }
.ev-row {
  display: grid; grid-template-columns: auto 1fr; gap: 1px 8px;
  padding: 2px 0; border: none; border-radius: 0; background: none;
}
.ev-row:hover { background: none; }
.ev-row:hover .ev-url { text-decoration: underline; }
.ev-label { font-size: 10px; font-weight: 700; color: var(--muted); }
.ev-url { font-size: 10px; color: var(--muted-2); }
.ev-snippet { grid-column: 1 / -1; font-size: 11px; color: var(--ink-2); line-height: 1.55; }

/* 技術メトリクスタイル：脱オレンジ・数値を大きく黒太字 */
.tech-metrics { gap: 6px 16px; }
.tech-metric {
  background: none; border: none; border-left: 2px solid var(--line);
  border-radius: 0; padding: 2px 0 2px 12px;
}
.tech-metric span { font-size: 10.5px; color: var(--muted); }
.tech-metric b { font-size: 17px; font-weight: 800; color: #000; font-family: var(--font-num); }
.tech-score { color: var(--ink); }
.tech-score span { color: var(--muted-2); }
.tech-list { display: grid; grid-template-columns: 1fr 1fr; gap: 0 28px; }
.tech-list li { background: none; }

/* 印刷時も項目を分断しない */
@media print {
  .check-list li, .tech-list li, .toc { break-inside: avoid; }
  .toc { display: none !important; }
}

/* モバイル横溢れ対策：長い根拠URL・現状値を確実に折り返す */
.ev-row { grid-template-columns: auto minmax(0, 1fr); }
.ev-url { min-width: 0; white-space: normal; overflow-wrap: anywhere; word-break: break-all; overflow: visible; text-overflow: clip; }
.ev-snippet { overflow-wrap: anywhere; }
.item-now .now-v { overflow-wrap: anywhere; }

/* 技術状態：デスクトップ2カラム／モバイル1カラム */
@media (max-width: 880px) { .tech-list { grid-template-columns: 1fr; } }

/* 根拠は2行に収め、超過分はトグルで折りたたみ */
.item-evidence .ev-v.is-clamped { max-height: 34px; overflow: hidden; }
.ev-toggle { display: inline-block; margin: 4px 0 0 30px; padding: 0; background: none; border: none; cursor: pointer; font-size: 11px; font-weight: 700; color: var(--ink-2); }
.ev-toggle:hover { color: #000; text-decoration: underline; }
@media print { .ev-toggle { display: none; } .item-evidence .ev-v.is-clamped { max-height: none; overflow: visible; } }

/* 項目別チェックリストの折りたたみ（解析ページと同様） */
.detail-collapse { margin-top: 36px; }
.detail-summary { cursor: pointer; list-style: none; display: flex; align-items: center; justify-content: space-between; gap: 12px; }
.detail-summary::-webkit-details-marker { display: none; }
.ds-title { font-size: 18px; font-weight: 800; display: flex; align-items: center; gap: 10px; }
.ds-title .ico { width: 28px; height: 28px; border-radius: 8px; background: var(--ink); color: #fff; display: grid; place-items: center; font-size: 13px; }
.ds-hint { font-size: 12px; color: var(--muted); white-space: nowrap; }
.ds-hint::after { content: " ▾"; font-weight: 700; color: var(--ink-2); }
.detail-collapse[open] .ds-hint::after { content: " ▴"; }
.detail-collapse[open] .detail-grid { margin-top: 16px; }
@media print { .detail-collapse .detail-grid { display: grid !important; } }

/* 解析したページ（detail-collapse流用） */
.detail-collapse[open] .crawl-list { margin-top: 14px; }

/* ═══ PDF（印刷）最適化 ═══ */
@page { margin: 14mm 12mm; }
@media print {
  body, .app, .main { background: #fff !important; }
  .ev-toggle, .toc { display: none !important; }
  /* 折りたたみは展開して全表示 */
  .detail-collapse .detail-grid { display: grid !important; }
  .detail-collapse .detail-grid, .detail-collapse[open] .detail-grid { margin-top: 14px; }
  .ds-hint::after { content: "" !important; }
  /* 詳細は1カラムで読みやすく */
  .detail-grid { grid-template-columns: 1fr !important; }
  /* 改ページで分断しない */
  .section-title, .detail-summary, .ds-title, .cat-card h3, .tech-label { break-after: avoid; }
  .detail-card, .tech-card, .cat-card, .region-card, .imp,
  .check-list li, .tech-list li, .cl-row, .score-card, .manual-row { break-inside: avoid; }
  .detail-grid, .improvements, .tech-list, .checklist { break-inside: auto; }
  /* 色（バッジ・バー・帯）を印刷で保持 */
  .state-badge, .conf-badge, .rank-badge, .pri, .region-pct, .kw-chip,
  .cat-row .bar, .cat-row .bar .fill,
  .check-list li .ic, .tech-list li .ic, .cl-check,
  .cl-seo, .cl-cv, .cl-meo, .cl-voice, .cl-third, .cl-head,
  .section-title h3 .ico, .ds-title .ico, .score-card {
    -webkit-print-color-adjust: exact !important; print-color-adjust: exact !important;
  }
  /* 本文・根拠は黒系で可読に（現状値の黒太字は維持） */
  .ev-url, .ev-label, .ev-snippet, .item-goal .goal-v { color: #333 !important; }
  .item-now .now-v { color: #000 !important; }
}

/* ═══ 高齢者向け：全体的に文字をやや大きく・行間を広く（改行を読みやすく） ═══ */
body { line-height: 1.8; }
/* 入力フォーム */
.lead { font-size: 16px; line-height: 2; }
.input { font-size: 15.5px; }
.field > label { font-size: 14.5px; }
.hint { font-size: 12.5px; line-height: 1.7; }
.form-title { font-size: 15.5px; }
/* 結果ヘッダ・総括 */
.result-head h2 { font-size: 27px; }
.result-head .submeta { font-size: 13.5px; }
.score-card .verdict { font-size: 14.5px; line-height: 1.95; }
.score-ring-side .rank-name { font-size: 18px; }
.score-ring-side .rank-note { font-size: 13px; line-height: 1.75; }
/* セクション見出し */
.section-title h3, .ds-title { font-size: 20px; }
.cat-card h3, .region-head h3 { font-size: 16.5px; }
.detail-card .dh h4 { font-size: 15.5px; }
/* カテゴリ別スコア */
.cat-row .name { font-size: 14px; }
.cat-row .score-num { font-size: 14px; }
/* 各診断項目（現状/目安/根拠） */
.item-head .item-name { font-size: 15px; line-height: 1.55; }
.item-now .now-v { font-size: 20px; }
.item-now .k, .item-goal .k, .item-evidence .k { font-size: 11.5px; }
.item-goal .goal-v { font-size: 13px; line-height: 1.7; }
.item-evidence .ev-v .none { font-size: 12.5px; }
.conf-min { font-size: 11.5px; }
.state-badge { font-size: 12px; }
.ev-snippet { font-size: 12.5px; line-height: 1.75; }
.ev-url, .ev-label { font-size: 11px; }
/* 技術メトリクスタイル */
.tech-metric b { font-size: 18px; }
.tech-metric span { font-size: 12px; }
.tech-label { font-size: 12px; }
/* 改善ポイント */
.imp .body h4 { font-size: 16.5px; line-height: 1.6; }
.imp .body .why { font-size: 14px; line-height: 1.95; }
.imp .body .example, .imp .body .example code { font-size: 13px; }
.imp .pri { font-size: 12px; }
/* チェックリスト */
.cl-detail { font-size: 15px; line-height: 1.7; }
.cl-detail .cl-conf { font-size: 12.5px; }
.cl-cat, .cl-head .cl-cat, .cl-head .cl-check, .cl-head .cl-detail { font-size: 13.5px; }
.cl-note { font-size: 12.5px; line-height: 1.85; }
/* 商圏・手動確認・補足 */
.region-sub, .region-warn, .region-good { font-size: 13.5px; line-height: 1.85; }
.manual-body h4 { font-size: 14.5px; }
.manual-body p { font-size: 13.5px; line-height: 1.85; }
.disclaimer { font-size: 12.5px; line-height: 1.85; }
.foot-cta h4 { font-size: 19px; }
.foot-cta p { font-size: 14px; line-height: 1.8; }

/* ═══ PDFページ数の圧縮（印刷時のみ・画面表示は不変） ═══ */
@page { margin: 10mm; }
@media print {
  body { line-height: 1.4; }
  /* ヘッダ・スコア・見出しを詰める */
  .result-head { margin-bottom: 14px; padding-bottom: 12px; }
  .result-head h2 { font-size: 19px; }
  .score-grid { gap: 10px; margin-bottom: 14px; }
  .score-card, .cat-card { padding: 16px 18px; }
  .section-title { margin: 12px 0 8px; }
  .section-title h3, .ds-title { font-size: 15px; }
  /* 項目別は2カラムに戻して縦を圧縮 */
  .detail-grid { grid-template-columns: 1fr 1fr !important; gap: 8px 14px; margin-top: 10px; }
  .detail-card { padding: 12px 14px; }
  .detail-card .dh { margin-bottom: 8px; padding-bottom: 8px; }
  /* 各診断項目を詰める（文字は読める範囲で少しだけ縮小） */
  .check-list li, .tech-list li { padding: 7px 2px; }
  .item-head { margin-bottom: 4px; gap: 7px; }
  .item-head .item-name { font-size: 12px; line-height: 1.3; }
  .item-now { margin: 0 0 2px 24px; }
  .item-goal { margin: 0 0 3px 24px; }
  .item-evidence { margin-left: 24px; }
  .item-now .now-v { font-size: 14px; }
  .item-goal .goal-v { font-size: 11px; line-height: 1.4; }
  .item-now .k, .item-goal .k, .item-evidence .k { font-size: 9.5px; }
  /* 根拠はコンパクト：スニペット非表示・URLは1行省略 */
  .ev-snippet { display: none !important; }
  .ev-list { gap: 1px; }
  .ev-row { padding: 1px 0; }
  .ev-label { font-size: 9px; }
  .ev-url { font-size: 9px; white-space: nowrap !important; overflow: hidden !important; text-overflow: ellipsis !important; word-break: normal !important; }
  /* 技術カード・改善・チェックリストの余白圧縮 */
  .tech-card { padding: 14px 16px; }
  .tech-head { padding-bottom: 10px; margin-bottom: 10px; }
  .tech-metric b { font-size: 13px; }
  .imp { padding: 12px 16px; gap: 12px; }
  .improvements { gap: 8px; }
  .imp .body h4 { font-size: 13px; }
  .imp .body .why { font-size: 11px; line-height: 1.5; }
  .cl-detail { padding: 8px 14px; font-size: 12px; }
  .cl-cat { padding: 8px 8px; }
  .verdict, .score-card .verdict { font-size: 11px; line-height: 1.55; }
}

/* ═══ 追加機能のスタイル（履歴・改善メタ・na・AIバナー・モーダル・PDF表紙） ═══ */

/* 診断履歴（#10） */
.history-card { margin-top: 28px; border: 1px solid var(--line); border-radius: 14px; background: var(--paper); padding: 16px 18px; }
.history-head { display: flex; align-items: baseline; justify-content: space-between; gap: 10px; flex-wrap: wrap; margin-bottom: 10px; }
.history-head h3 { font-size: 15px; font-weight: 800; display: flex; align-items: center; gap: 8px; margin: 0; }
.history-sub { font-size: 12px; color: var(--muted); }
.history-list { display: flex; flex-direction: column; gap: 4px; }
.hist-row { display: grid; grid-template-columns: 30px 1fr auto auto; align-items: center; gap: 12px; width: 100%; text-align: left; background: none; border: none; border-radius: 8px; padding: 8px 10px; cursor: pointer; font-family: inherit; }
.hist-row:hover { background: var(--cream-2); }
.hist-rank { width: 26px; height: 26px; border-radius: 7px; display: grid; place-items: center; font-weight: 800; font-size: 13px; background: #EEE; color: var(--ink); }
.hist-rank.A { background: #E1F0E8; color: var(--ok); } .hist-rank.B { background: #E8F0FB; color: #2B6CB0; }
.hist-rank.C { background: #FFF0CC; color: var(--warn); } .hist-rank.D { background: #FCEDE8; color: var(--bad); }
.hist-main { min-width: 0; display: flex; flex-direction: column; }
.hist-name { font-weight: 700; font-size: 13.5px; color: var(--ink); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.hist-url { font-size: 11px; color: var(--muted-2); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.hist-score { font-weight: 800; font-size: 13px; color: var(--ink-2); font-family: var(--font-num); }
.hist-date { font-size: 11px; color: var(--muted-2); white-space: nowrap; font-family: var(--font-num); }
@media (max-width: 880px) { .hist-row { grid-template-columns: 26px 1fr auto; } .hist-date { display: none; } }

/* 改善ポイントの見込み加点・手間タグ（#4） */
.gain-tag { font-size: 11px; font-weight: 800; color: var(--orange-700); background: #FFF1E3; border: 1px solid #F3D3B3; border-radius: 999px; padding: 2px 10px; white-space: nowrap; }
.effort-tag { font-size: 11px; font-weight: 700; border-radius: 999px; padding: 2px 10px; border: 1px solid var(--line-2); white-space: nowrap; }
.effort-low { color: var(--ok); border-color: #BFDFCC; background: #EEF7F1; }
.effort-med { color: var(--warn); border-color: #EBD49A; background: #FFF8E8; }
.effort-high { color: var(--bad); border-color: #E8C2B5; background: #FBEEE9; }

/* na（採点対象外）状態 */
.check-list li.na .ic, .tech-list li.na .ic { background: #ECECEE; color: var(--muted); }
.state-badge.na { color: var(--muted); border-color: var(--line-2); }

/* AI到達性バナー（#1） */
.ai-banner { display: flex; gap: 8px; align-items: flex-start; margin: 4px 0 20px; padding: 14px 18px; border-radius: 12px; font-size: 13.5px; line-height: 1.7; background: #FBEEE9; border: 1px solid #E8C2B5; color: #8a2f17; }
.ai-banner.ok { background: #EEF7F1; border-color: #BFDFCC; color: #1f5b3a; }
.ai-banner b { font-weight: 800; }

/* メール送付モーダル（#10） */
.modal-overlay { position: fixed; inset: 0; background: rgba(20,18,16,.5); display: grid; place-items: center; z-index: 1000; padding: 18px; }
.modal-card { background: #fff; border-radius: 16px; padding: 24px; width: 100%; max-width: 420px; box-shadow: 0 20px 60px rgba(0,0,0,.25); }
.modal-card h3 { font-size: 17px; font-weight: 800; display: flex; align-items: center; gap: 8px; margin: 0 0 6px; }
.modal-sub { font-size: 13px; color: var(--muted); margin: 0 0 14px; }
.modal-input { width: 100%; }
.modal-hint { font-size: 12px; color: var(--muted); min-height: 16px; margin: 6px 0 0; }
.modal-hint.error { color: var(--bad); }
.modal-actions { display: flex; justify-content: flex-end; gap: 10px; margin-top: 18px; }
.modal-actions .btn-primary { height: 44px; padding: 0 20px; }
@media print { .modal-overlay { display: none !important; } }

/* PDF表紙：画面では非表示、印刷時のみ1ページ目に表示（#10） */
.print-cover { display: none; }
@media print {
  .print-cover { display: flex; flex-direction: column; align-items: center; justify-content: center; text-align: center; gap: 8px; min-height: 84vh; break-after: page; page-break-after: always; }
  .print-cover .pc-logo { height: 44px; width: auto; margin-bottom: 8px; }
  .print-cover .pc-title { font-size: 19px; font-weight: 800; letter-spacing: .04em; color: #333; }
  .print-cover .pc-name { font-size: 25px; font-weight: 800; color: #000; margin-top: 6px; }
  .print-cover .pc-score { display: flex; align-items: center; gap: 14px; margin: 14px 0; -webkit-print-color-adjust: exact; print-color-adjust: exact; }
  .print-cover .pc-rank { width: 54px; height: 54px; border-radius: 14px; display: grid; place-items: center; font-size: 28px; font-weight: 800; background: #FFF6EC; color: var(--orange-700); border: 2px solid var(--orange-700); }
  .print-cover .pc-total { font-size: 42px; font-weight: 800; font-family: var(--font-num); color: #000; }
  .print-cover .pc-total small { font-size: 15px; color: #666; font-weight: 600; }
  .print-cover .pc-meta { font-size: 12px; color: #555; margin-top: 8px; }
  .print-cover .pc-prov { font-size: 11px; color: #888; margin-top: 18px; }
  /* ページ番号（@page margin box 対応エンジンのみ。Chromeの印刷ダイアログ側のヘッダ/フッターでも付与可） */
  @page { @bottom-center { content: counter(page); } }
}
