:root {
  color-scheme: light;
  --ink: #19201f;
  --muted: #5d6663;
  --line: #d8dfdc;
  --panel: #ffffff;
  --soft: #f4f7f5;
  --mint: #dceee6;
  --green: #0f766e;
  --blue: #295bdb;
  --amber: #9a5b00;
  --red: #b42318;
  --shadow: 0 18px 50px rgba(25, 32, 31, 0.12);
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  color: var(--ink);
  background: #fbfcfb;
  line-height: 1.5;
}

a {
  color: inherit;
}

.site-header {
  position: sticky;
  top: 0;
  z-index: 10;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  padding: 16px clamp(18px, 4vw, 56px);
  border-bottom: 1px solid var(--line);
  background: rgba(251, 252, 251, 0.94);
  backdrop-filter: blur(10px);
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  font-weight: 760;
  text-decoration: none;
}

.brand-mark {
  display: inline-grid;
  width: 36px;
  aspect-ratio: 1;
  place-items: center;
  border-radius: 8px;
  background: linear-gradient(135deg, #0f766e, #295bdb);
  color: #fff;
  font-size: 12px;
  font-weight: 900;
  letter-spacing: 0;
  box-shadow: 0 8px 18px rgba(15, 118, 110, 0.22);
}

nav {
  display: flex;
  gap: 18px;
  font-size: 14px;
  color: var(--muted);
}

label.language-select {
  display: inline-flex;
  align-items: center;
  min-width: 152px;
  width: auto;
  gap: 8px;
  border: 1px solid var(--line);
  border-radius: 999px;
  padding: 4px 12px 4px 6px;
  background: #fff;
  box-shadow: 0 8px 18px rgba(25, 32, 31, 0.08);
  color: var(--ink);
  font-size: 14px;
  font-weight: 760;
}

.language-icon {
  display: inline-grid;
  width: 28px;
  aspect-ratio: 1;
  flex: 0 0 auto;
  place-items: center;
  border-radius: 50%;
  background: var(--mint);
  color: var(--green);
  font-weight: 900;
}

.language-icon svg {
  width: 18px;
  height: 18px;
  fill: none;
  stroke: currentColor;
  stroke-linecap: round;
  stroke-linejoin: round;
  stroke-width: 2;
}

.language-select select {
  min-height: 32px;
  border: 0;
  padding: 0 26px 0 0;
  background: transparent;
  color: var(--ink);
  font-weight: 760;
  outline: none;
  cursor: pointer;
}

nav a,
.site-footer a {
  text-decoration: none;
}

.hero {
  display: grid;
  grid-template-columns: minmax(0, 1.5fr) minmax(280px, 0.7fr);
  gap: clamp(24px, 5vw, 64px);
  align-items: center;
  padding: clamp(48px, 8vw, 96px) clamp(18px, 6vw, 88px) 48px;
  background:
    linear-gradient(120deg, rgba(235, 244, 239, 0.94), rgba(255, 255, 255, 0.52)),
    url("https://images.unsplash.com/photo-1540959733332-eab4deabeeaf?auto=format&fit=crop&w=1800&q=80");
  background-size: cover;
  background-position: center;
}

.hero-copy {
  max-width: 760px;
}

.eyebrow {
  margin: 0 0 12px;
  color: var(--green);
  font-size: 13px;
  font-weight: 780;
  letter-spacing: 0;
  text-transform: uppercase;
}

h1,
h2,
h3,
p {
  overflow-wrap: anywhere;
}

h1 {
  margin: 0;
  font-size: clamp(42px, 7vw, 84px);
  line-height: 0.98;
  letter-spacing: 0;
  max-width: 860px;
}

h2 {
  margin: 0 0 12px;
  font-size: clamp(28px, 4vw, 44px);
  line-height: 1.05;
}

h3 {
  margin: 0 0 10px;
  font-size: 18px;
}

.lead {
  max-width: 670px;
  margin: 24px 0 0;
  color: #303936;
  font-size: clamp(18px, 2vw, 22px);
}

.hero-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  margin-top: 28px;
}

.primary-link,
.secondary-link,
button {
  display: inline-flex;
  min-height: 44px;
  align-items: center;
  justify-content: center;
  border-radius: 8px;
  padding: 0 18px;
  border: 1px solid transparent;
  font-weight: 720;
  text-decoration: none;
  cursor: pointer;
}

.primary-link,
button {
  background: var(--ink);
  color: #fff;
}

.secondary-link {
  background: rgba(255, 255, 255, 0.75);
  border-color: var(--line);
}

.hero-panel {
  display: grid;
  gap: 14px;
}

.hero-panel > div {
  border: 1px solid rgba(255, 255, 255, 0.7);
  border-radius: 8px;
  padding: 22px;
  background: rgba(255, 255, 255, 0.84);
  box-shadow: var(--shadow);
}

.mini-link {
  display: inline-flex;
  margin-top: 8px;
  color: var(--blue);
  font-size: 14px;
  font-weight: 800;
  text-decoration: none;
}

.metric {
  display: block;
  margin-bottom: 8px;
  font-size: 34px;
  font-weight: 820;
}

.trust-band,
.checker-section,
.tool-switcher,
.template-tool-section,
.content-grid,
.article-page {
  padding-inline: clamp(18px, 6vw, 88px);
}

.trust-band {
  padding-block: 14px;
  background: #fff;
  border-block: 1px solid var(--line);
  color: var(--muted);
}

.trust-band p {
  max-width: 980px;
  margin: 0 auto;
}

.tool-switcher {
  display: grid;
  grid-template-columns: minmax(240px, 0.55fr) minmax(0, 1fr);
  gap: clamp(22px, 4vw, 52px);
  padding-top: 52px;
  padding-bottom: 18px;
}

.tool-cards {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 14px;
}

.tool-card {
  display: grid;
  min-height: 132px;
  align-content: start;
  gap: 8px;
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 18px;
  background: #fff;
  color: var(--ink);
  text-align: left;
  text-decoration: none;
  box-shadow: 0 10px 28px rgba(25, 32, 31, 0.06);
}

.tool-card:hover {
  border-color: var(--green);
}

.tool-card strong {
  font-size: 18px;
}

.tool-card span {
  color: var(--muted);
  font-size: 14px;
  font-weight: 650;
}

.checker-section {
  display: grid;
  grid-template-columns: minmax(260px, 0.72fr) minmax(0, 1.2fr);
  gap: clamp(28px, 5vw, 72px);
  padding-top: 68px;
  padding-bottom: 68px;
}

.template-tool-section {
  display: grid;
  grid-template-columns: minmax(260px, 0.72fr) minmax(0, 1.2fr);
  gap: clamp(28px, 5vw, 72px);
  padding-top: 18px;
  padding-bottom: 68px;
}

.template-tool-form,
.template-output {
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: clamp(18px, 3vw, 30px);
  background: #fff;
  box-shadow: 0 8px 30px rgba(25, 32, 31, 0.08);
}

.template-output {
  grid-column: 2;
  margin-top: -48px;
}

.template-output-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 12px;
}

.template-output-head h3 {
  margin: 0;
}

.template-output textarea {
  width: 100%;
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 12px;
  background: #fbfcfb;
  font: inherit;
  line-height: 1.6;
}

.section-heading {
  position: sticky;
  top: 88px;
  align-self: start;
}

.section-heading p {
  color: var(--muted);
}

.checker-form,
.result-panel,
.article-shell {
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--panel);
  box-shadow: 0 8px 30px rgba(25, 32, 31, 0.08);
}

.checker-form {
  padding: clamp(18px, 3vw, 30px);
}

.form-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 16px;
}

label,
legend {
  display: grid;
  gap: 7px;
  color: #2c3632;
  font-size: 14px;
  font-weight: 700;
}

input,
select,
textarea {
  width: 100%;
  min-height: 42px;
  border: 1px solid #cbd5d1;
  border-radius: 8px;
  padding: 9px 11px;
  color: var(--ink);
  background: #fff;
  font: inherit;
}

.checks,
.city-picker {
  display: grid;
  gap: 10px;
  margin: 20px 0;
  padding: 16px;
  border: 1px solid var(--line);
  border-radius: 8px;
}

.city-picker {
  grid-column: 1 / -1;
  margin: 0;
}

.area-open-button {
  display: grid;
  width: 100%;
  min-height: 58px;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 10px;
  justify-content: stretch;
  border: 2px solid #21477f;
  border-radius: 8px;
  padding: 9px 14px;
  background: #fff;
  color: #173a70;
  text-align: left;
}

.area-open-button span {
  font-size: 13px;
  color: var(--muted);
}

.area-open-button strong {
  font-size: 17px;
  overflow-wrap: anywhere;
}

.selected-areas {
  display: flex;
  flex-wrap: wrap;
  gap: 7px;
}

.selected-areas span {
  border-radius: 999px;
  padding: 6px 10px;
  background: var(--mint);
  color: #173a70;
  font-size: 13px;
  font-weight: 780;
}

.selected-areas .prefecture-pill {
  background: #21477f;
  color: #fff;
}

.other-city {
  margin-top: 4px;
}

.modal-open {
  overflow: hidden;
}

.area-modal {
  position: fixed;
  inset: 0;
  z-index: 50;
}

.area-modal-backdrop {
  position: absolute;
  inset: 0;
  background: rgba(9, 16, 23, 0.45);
}

.area-modal-panel {
  position: relative;
  display: grid;
  width: min(1180px, calc(100vw - 28px));
  max-height: min(840px, calc(100vh - 36px));
  margin: 18px auto;
  overflow: hidden;
  border: 3px solid #21477f;
  border-radius: 8px;
  background: #fff;
  box-shadow: 0 26px 80px rgba(12, 27, 47, 0.32);
}

.area-modal-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
  padding: 16px 22px;
  background: #21477f;
  color: #fff;
}

.area-modal-header h2 {
  margin: 0;
  font-size: clamp(24px, 3vw, 36px);
}

.area-modal-header p {
  margin: 4px 0 0;
  color: rgba(255, 255, 255, 0.86);
  font-weight: 700;
}

.area-close {
  min-width: 42px;
  min-height: 42px;
  border: 1px solid rgba(255, 255, 255, 0.4);
  background: transparent;
  color: #fff;
  font-size: 28px;
}

.area-modal-body {
  position: relative;
  overflow: auto;
  padding: clamp(18px, 3vw, 34px);
  background: #fbfcfb;
}

.area-groups {
  position: relative;
  z-index: 1;
}

.area-groups.detail-mode {
  display: grid;
  grid-template-columns: minmax(260px, 0.95fr) minmax(220px, 0.78fr) minmax(220px, 0.78fr);
  gap: 16px;
  min-height: 560px;
  align-items: stretch;
}

.prefecture-group {
  display: grid;
  gap: 14px;
}

.prefecture-group.full {
  grid-template-columns: repeat(3, minmax(220px, 1fr));
  align-items: start;
}

.prefecture-group.compact {
  grid-template-columns: 1fr;
}

.prefecture-group > h3 {
  display: none;
}

.area-group {
  overflow: auto;
  max-height: 560px;
  border: 1px solid rgba(216, 223, 220, 0.88);
  border-radius: 8px;
  padding: 16px;
  background: rgba(255, 255, 255, 0.88);
  box-shadow: 0 12px 34px rgba(25, 32, 31, 0.1);
  backdrop-filter: blur(3px);
  pointer-events: auto;
}

.area-group h3 {
  position: sticky;
  top: -16px;
  z-index: 2;
  margin: -16px -16px 14px;
  padding: 12px 16px;
  background: #21477f;
  color: #173a70;
  color: #fff;
  text-align: center;
  font-size: 22px;
}

.prefecture-group.full .prefecture-region {
  border: 1px solid rgba(216, 223, 220, 0.9);
  border-radius: 8px;
  padding: 12px;
  background: rgba(255, 255, 255, 0.9);
  box-shadow: 0 10px 28px rgba(25, 32, 31, 0.08);
}

.prefecture-group.full .area-choice {
  min-width: 96px;
}

.prefecture-group.full .prefecture-region:hover {
  border-color: #21477f;
  background: rgba(243, 247, 255, 0.96);
}

.prefecture-region + .prefecture-region {
  margin-top: 0;
}

.prefecture-region h4,
.area-current {
  margin: 0 0 8px;
  color: var(--muted);
  font-size: 14px;
  font-weight: 820;
  text-align: center;
}

.area-buttons {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  justify-content: center;
}

.area-choice {
  min-width: 96px;
  min-height: 44px;
  border: 3px solid #21477f;
  border-radius: 0;
  background: #f3f5fb;
  color: #173a70;
  font-size: 16px;
}

.area-choice.selected {
  background: #21477f;
  color: #fff;
}

.area-choice.active {
  box-shadow: 0 0 0 3px rgba(15, 118, 110, 0.24);
}

.empty-area {
  display: block;
  width: 100%;
  border: 1px dashed var(--line);
  border-radius: 8px;
  padding: 14px;
  color: var(--muted);
  text-align: center;
}

.area-modal-footer {
  display: flex;
  justify-content: flex-end;
  gap: 12px;
  padding: 16px 22px;
  border-top: 1px solid var(--line);
  background: #f8fafb;
}

.primary-action,
.secondary-action {
  min-height: 44px;
}

.secondary-action {
  border-color: var(--line);
  background: #fff;
  color: var(--ink);
}

.checks label,
.consent {
  display: flex;
  grid-template-columns: none;
  align-items: center;
  gap: 8px;
  font-weight: 600;
}

.checks input,
.consent input {
  width: 16px;
  min-height: 16px;
}

.submit-button {
  width: 100%;
}

.small-note {
  color: var(--muted);
  font-size: 13px;
}

.result-panel {
  grid-column: 2;
  padding: clamp(18px, 3vw, 30px);
  overflow: hidden;
}

.hidden {
  display: none;
}

.bot-field {
  position: absolute;
  left: -10000px;
  width: 1px;
  height: 1px;
  overflow: hidden;
  opacity: 0;
}

.result-top,
.result-grid {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  gap: 20px;
  align-items: start;
}

.result-top {
  grid-template-columns: minmax(0, 1fr) 112px;
  align-items: center;
  border-bottom: 1px solid var(--line);
  padding-bottom: 18px;
}

.result-grid {
  grid-template-columns: minmax(0, 1.2fr) minmax(240px, 0.8fr);
  margin-top: 18px;
}

.score-ring {
  display: grid;
  width: 112px;
  aspect-ratio: 1;
  place-items: center;
  align-content: center;
  border: 10px solid var(--green);
  border-radius: 50%;
  font-size: 32px;
  font-weight: 820;
  line-height: 1;
}

.score-ring span {
  display: block;
  margin-top: 4px;
  color: var(--muted);
  font-size: 12px;
}

.score-ring strong {
  display: block;
}

.result-high .score-ring {
  border-color: var(--red);
}

.result-medium .score-ring {
  border-color: var(--amber);
}

.factor-list {
  display: grid;
  gap: 10px;
  padding: 0;
  list-style: none;
}

.factor-card-heading,
.factor-list li > div {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.factor-card-heading a {
  color: var(--blue);
  font-size: 13px;
  font-weight: 800;
  text-decoration: none;
}

.factor-card-heading h3 {
  margin-bottom: 0;
}

.factor-list em {
  flex: 0 0 auto;
  border-radius: 999px;
  padding: 3px 8px;
  background: #fff1ef;
  color: var(--red);
  font-size: 11px;
  font-style: normal;
  font-weight: 850;
}

.factor-card,
.factor-list li,
.cost-box,
.paid-box,
.next-steps,
.diagnosis-card,
.affordability-card,
.route-fit-panel,
.seven-day-panel,
.template-grid,
.template-card,
.action-grid section {
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 16px;
  background: var(--soft);
}

.diagnosis-card {
  margin-top: 18px;
  border-color: rgba(15, 118, 110, 0.28);
  background: linear-gradient(135deg, #f2fbf7, #ffffff);
}

.readiness-panel {
  display: grid;
  grid-template-columns: minmax(0, 0.84fr) minmax(320px, 1fr);
  gap: 18px;
  margin-top: 18px;
  border: 1px solid rgba(15, 118, 110, 0.28);
  border-radius: 8px;
  padding: 18px;
  background: #fff;
}

.readiness-panel h3 {
  margin: 0;
  font-size: clamp(20px, 3vw, 28px);
  line-height: 1.15;
}

.readiness-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
}

.readiness-card {
  display: grid;
  gap: 6px;
  min-height: 86px;
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 12px;
  background: var(--soft);
}

.readiness-card span {
  color: var(--muted);
  font-size: 12px;
  font-weight: 800;
}

.readiness-card strong {
  font-size: 17px;
  line-height: 1.15;
}

.readiness-good {
  border-color: rgba(15, 118, 110, 0.26);
  background: #effaf5;
}

.readiness-watch {
  border-color: rgba(154, 91, 0, 0.28);
  background: #fff8e6;
}

.readiness-risk {
  border-color: rgba(180, 35, 24, 0.26);
  background: #fff1ef;
}

.affordability-card {
  margin-top: 16px;
  border-color: rgba(33, 71, 127, 0.24);
  background: #f6f8fc;
}

.affordability-card p {
  margin-top: 4px;
}

.diagnosis-card h3 {
  font-size: clamp(22px, 3vw, 30px);
  line-height: 1.15;
}

.profile-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 14px;
}

.profile-tags span {
  border-radius: 999px;
  padding: 6px 10px;
  background: var(--ink);
  color: #fff;
  font-size: 13px;
  font-weight: 760;
}

.assessor-view {
  margin-top: 16px;
  border-left: 4px solid var(--green);
  padding-left: 14px;
}

.assessor-view p {
  margin: 6px 0 0;
  color: var(--muted);
}

.action-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 14px;
  margin-top: 16px;
}

.action-grid ol,
.action-grid ul,
.next-steps ul,
.affordability-card ul {
  margin: 0;
  padding-left: 20px;
}

.action-grid li + li,
.next-steps li + li,
.affordability-card li + li {
  margin-top: 7px;
}

.route-fit-panel,
.seven-day-panel {
  margin-top: 16px;
}

.route-fit-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
}

.route-fit-card {
  display: grid;
  gap: 8px;
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 14px;
  background: #fff;
}

.route-fit-card div {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
}

.route-fit-card span {
  flex: 0 0 auto;
  border-radius: 999px;
  padding: 3px 8px;
  background: var(--soft);
  color: var(--muted);
  font-size: 12px;
  font-weight: 900;
}

.route-fit-card p {
  margin: 0;
  color: var(--muted);
  font-size: 14px;
}

.route-fit-high {
  border-color: rgba(15, 118, 110, 0.32);
  background: #f0fbf6;
}

.route-fit-high span {
  background: var(--mint);
  color: var(--green);
}

.route-fit-medium {
  border-color: rgba(154, 91, 0, 0.25);
  background: #fffaf0;
}

.seven-day-panel ol {
  display: grid;
  gap: 10px;
  padding: 0;
  list-style: none;
}

.seven-day-panel li {
  display: grid;
  grid-template-columns: 74px minmax(0, 1fr);
  gap: 12px;
  border-bottom: 1px solid var(--line);
  padding-bottom: 10px;
}

.seven-day-panel li strong {
  color: var(--green);
}

.seven-day-panel li span {
  color: #303936;
}

.factor-list span {
  display: block;
  margin-top: 4px;
  color: var(--muted);
}

.cost {
  margin: 8px 0;
  font-size: 24px;
  font-weight: 820;
}

.next-steps,
.paid-box,
.template-grid,
.lead-form {
  margin-top: 16px;
}

.template-grid {
  display: grid;
  gap: 12px;
}

.template-card {
  background: #fff;
}

.template-card h4 {
  margin: 0 0 8px;
}

.template-card textarea {
  width: 100%;
  resize: vertical;
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 10px;
  background: #fbfcfb;
  color: var(--ink);
  font: inherit;
  line-height: 1.5;
}

.paid-box {
  border-color: rgba(25, 32, 31, 0.2);
  background: linear-gradient(135deg, #f8fbfa, #ffffff);
}

.presale-head {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 16px;
  align-items: start;
}

.presale-head h3 {
  margin-bottom: 6px;
  font-size: clamp(22px, 3vw, 30px);
}

.presale-head p {
  margin: 0;
  color: var(--muted);
}

.presale-head > strong {
  display: inline-grid;
  min-width: 92px;
  min-height: 58px;
  place-items: center;
  border-radius: 8px;
  background: var(--ink);
  color: #fff;
  font-size: 24px;
}

.presale-list {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 8px 14px;
  margin: 16px 0;
  padding: 0;
  list-style: none;
}

.presale-list li {
  position: relative;
  padding-left: 20px;
  color: #303936;
  font-weight: 700;
}

.presale-list li::before {
  position: absolute;
  left: 0;
  color: var(--green);
  content: "✓";
}

.presale-offer {
  border-top: 1px solid var(--line);
  margin-top: 14px;
  padding-top: 14px;
}

.presale-offer h4 {
  margin: 0 0 8px;
  font-size: 18px;
}

.lead-form {
  display: grid;
  gap: 12px;
}

.content-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 18px;
  padding-bottom: 70px;
}

.content-grid article {
  border-top: 3px solid var(--green);
  padding-top: 18px;
}

.article-page {
  padding-block: 54px;
}

.article-shell {
  max-width: 860px;
  margin: 0 auto;
  padding: clamp(22px, 4vw, 46px);
}

.article-shell h1 {
  font-size: clamp(34px, 5vw, 62px);
}

.article-shell p {
  color: #35403c;
  font-size: 18px;
}

.guide-list {
  display: grid;
  gap: 16px;
  padding: 0;
  list-style: none;
}

.guide-list li {
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 16px;
}

.guide-list-top {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 14px;
}

.guide-list-top span {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 34px;
  border-radius: 999px;
  padding: 3px 8px;
  background: var(--soft);
  color: var(--muted);
  font-size: 11px;
  font-weight: 900;
}

.guide-list a {
  color: var(--blue);
  font-weight: 800;
  text-decoration: none;
}

.guide-block {
  margin: 28px 0;
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 18px;
  background: #fff;
}

.guide-block h2 {
  margin-top: 0;
  font-size: 22px;
}

.guide-block ul {
  margin-bottom: 0;
}

.guide-block details {
  border-top: 1px solid var(--line);
  padding: 12px 0;
}

.guide-block details:first-of-type {
  border-top: 0;
}

.guide-block summary {
  cursor: pointer;
  color: var(--ink);
  font-weight: 850;
}

.guide-block details p {
  margin-bottom: 0;
  font-size: 16px;
}

.methodology-table {
  width: 100%;
  border-collapse: collapse;
  margin-top: 14px;
  font-size: 15px;
}

.table-scroll {
  overflow-x: auto;
}

.methodology-table th,
.methodology-table td {
  border-bottom: 1px solid var(--line);
  padding: 10px 8px;
  text-align: left;
  vertical-align: top;
}

.methodology-table th {
  color: var(--muted);
  font-size: 12px;
  text-transform: uppercase;
}

.source-list a {
  color: var(--blue);
  font-weight: 750;
}

.product-shell {
  max-width: 980px;
}

.product-price {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr);
  gap: 16px;
  align-items: center;
  margin: 26px 0;
  border: 1px solid rgba(15, 118, 110, 0.24);
  border-radius: 8px;
  padding: 18px;
  background: #effaf5;
}

.product-price strong {
  font-size: 42px;
  line-height: 1;
}

.product-price span {
  color: var(--muted);
  font-weight: 700;
}

.sample-score {
  display: inline-grid;
  gap: 4px;
  min-width: 150px;
  margin: 18px 0;
  border: 1px solid rgba(15, 118, 110, 0.28);
  border-radius: 8px;
  padding: 16px;
  background: #effaf5;
}

.sample-score strong {
  font-size: 34px;
  line-height: 1;
}

.sample-score span,
.locked-note span,
.case-list span {
  color: var(--muted);
}

.case-list {
  display: grid;
  gap: 10px;
  padding-left: 0;
  list-style: none;
}

.case-list li {
  display: grid;
  gap: 4px;
  border-bottom: 1px solid var(--line);
  padding-bottom: 10px;
}

.locked-note {
  display: grid;
  gap: 6px;
  margin: 20px 0;
  border: 1px solid rgba(41, 91, 219, 0.22);
  border-radius: 8px;
  padding: 16px;
  background: #f3f6ff;
}

.comparison-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 16px;
  margin: 24px 0;
}

.comparison-grid article {
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 18px;
  background: #fff;
}

.comparison-grid .highlight-product {
  border-color: rgba(15, 118, 110, 0.35);
  background: #f5fbf8;
}

.site-footer {
  display: flex;
  flex-wrap: wrap;
  gap: 18px;
  padding: 22px clamp(18px, 6vw, 88px);
  border-top: 1px solid var(--line);
  color: var(--muted);
}

.success {
  color: var(--green);
  font-weight: 700;
}

.error {
  color: var(--red);
  font-weight: 700;
}

.admin-output {
  overflow: auto;
  max-height: 520px;
  margin-top: 18px;
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 16px;
  background: #101615;
  color: #d9eee6;
  font-size: 13px;
}

.admin-body {
  background: #f6f8f7;
}

.admin-page {
  padding: clamp(22px, 4vw, 48px) clamp(18px, 5vw, 72px) 72px;
}

.admin-hero {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(280px, 420px);
  gap: 24px;
  align-items: end;
  margin-bottom: 22px;
}

.admin-hero h1 {
  margin: 0 0 8px;
  font-size: clamp(34px, 5vw, 64px);
  line-height: 1;
}

.admin-hero p {
  max-width: 760px;
  margin: 0;
  color: var(--muted);
}

.admin-token-form {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 10px;
  align-items: end;
}

.admin-token-form label {
  display: grid;
  gap: 6px;
  font-weight: 760;
}

.admin-token-form input {
  min-height: 46px;
}

.admin-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

.admin-status {
  margin: 0 0 22px;
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 12px 14px;
  background: #fff;
  color: var(--muted);
  font-weight: 700;
}

.admin-metrics {
  display: grid;
  grid-template-columns: repeat(6, minmax(0, 1fr));
  gap: 12px;
  margin-bottom: 18px;
}

.metric-card,
.admin-panel {
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff;
  box-shadow: 0 10px 28px rgba(25, 32, 31, 0.06);
}

.metric-card {
  display: grid;
  gap: 8px;
  min-height: 120px;
  padding: 16px;
}

.metric-card span,
.metric-card small {
  color: var(--muted);
  font-size: 13px;
  font-weight: 700;
}

.metric-card strong {
  font-size: 30px;
  line-height: 1;
}

.admin-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 16px;
}

.admin-panel {
  padding: 18px;
}

.admin-panel h2 {
  margin: 0 0 14px;
  font-size: 18px;
}

.admin-panel-heading {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 14px;
}

.admin-panel-heading h2 {
  margin: 0;
}

.trend-bars,
.stack-list,
.rank-list {
  display: grid;
  gap: 10px;
}

.trend-row {
  display: grid;
  grid-template-columns: 50px minmax(80px, 1fr) 32px 58px;
  gap: 10px;
  align-items: center;
  color: var(--muted);
  font-size: 13px;
}

.trend-track {
  overflow: hidden;
  height: 10px;
  border-radius: 999px;
  background: var(--soft);
}

.trend-track i {
  display: block;
  height: 100%;
  border-radius: inherit;
  background: linear-gradient(90deg, var(--green), var(--blue));
}

.trend-row strong,
.rank-row strong,
.stack-row strong {
  color: var(--ink);
}

.trend-row em,
.rank-row em,
.stack-row span {
  color: var(--muted);
  font-style: normal;
  font-size: 12px;
  font-weight: 700;
}

.stack-row {
  display: grid;
  gap: 6px;
}

.stack-row div,
.rank-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.stack-row meter {
  width: 100%;
  height: 8px;
}

.rank-row {
  border-bottom: 1px solid var(--line);
  padding-bottom: 8px;
}

.rank-row span {
  display: inline-grid;
  width: 24px;
  aspect-ratio: 1;
  flex: 0 0 auto;
  place-items: center;
  border-radius: 50%;
  background: var(--soft);
  color: var(--muted);
  font-size: 12px;
  font-weight: 900;
}

.rank-row strong {
  flex: 1;
  min-width: 0;
  overflow-wrap: anywhere;
}

.empty-state {
  margin: 0;
  color: var(--muted);
}

.admin-recent {
  margin-top: 16px;
}

.recent-table-wrap {
  overflow-x: auto;
}

.recent-table {
  width: 100%;
  min-width: 880px;
  border-collapse: collapse;
  font-size: 13px;
}

.recent-table th,
.recent-table td {
  border-bottom: 1px solid var(--line);
  padding: 10px 8px;
  text-align: left;
  vertical-align: top;
}

.recent-table th {
  color: var(--muted);
  font-size: 12px;
  text-transform: uppercase;
}

.risk-pill {
  display: inline-flex;
  align-items: center;
  border-radius: 999px;
  padding: 3px 9px;
  background: var(--soft);
  color: var(--muted);
  font-size: 12px;
  font-weight: 900;
}

.risk-pill.low {
  background: var(--mint);
  color: var(--green);
}

.risk-pill.medium {
  background: #fff2cc;
  color: var(--amber);
}

.risk-pill.high {
  background: #ffe5e2;
  color: var(--red);
}

@media (max-width: 840px) {
  .site-header,
  nav {
    align-items: flex-start;
  }

  .site-header,
  .hero,
  .checker-section,
  .tool-switcher,
  .tool-cards,
  .template-tool-section,
  .content-grid,
  .action-grid,
  .readiness-panel,
  .result-top,
  .result-grid,
  .comparison-grid {
    grid-template-columns: 1fr;
  }

  .hero {
    padding-top: 42px;
  }

  .admin-hero,
  .admin-token-form,
  .admin-grid {
    grid-template-columns: 1fr;
  }

  .admin-metrics {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .section-heading {
    position: static;
  }

  .result-panel {
    grid-column: auto;
  }

  .template-output {
    grid-column: auto;
    margin-top: 16px;
  }

  .form-grid {
    grid-template-columns: 1fr;
  }

  .area-modal-body,
  .area-groups,
  .area-groups.detail-mode {
    grid-template-columns: 1fr;
  }

  .prefecture-group.full {
    display: grid;
    min-height: auto;
    grid-template-columns: 1fr;
  }

  .prefecture-group.full .prefecture-region {
    width: 100%;
  }
}

@media (max-width: 560px) {
  .site-header {
    display: grid;
  }

  nav {
    flex-wrap: wrap;
  }

  .score-ring {
    width: 96px;
  }

  .result-top {
    grid-template-columns: 1fr;
  }

  .language-select {
    width: 100%;
  }

  .language-select select {
    flex: 1;
  }

  .readiness-grid,
  .route-fit-grid,
  .presale-head,
  .presale-list {
    grid-template-columns: 1fr;
  }

  .seven-day-panel li {
    grid-template-columns: 1fr;
    gap: 4px;
  }

  .area-modal-panel {
    width: calc(100vw - 16px);
    max-height: calc(100vh - 16px);
    margin: 8px auto;
  }

  .area-choice {
    min-width: 116px;
    font-size: 16px;
  }

  .area-modal-footer {
    display: grid;
  }
}
