/* ==========================================================================
   不動産適正チェッカー モダン・フィンテックUI（大きめ文字＆ゆとり余白版）
   ========================================================================== */

@import url("https://fonts.googleapis.com/css2?family=Inter:wght@500;600;700;800;900&family=Noto+Sans+JP:wght@400;500;700;800;900&display=swap");

:root {
  --color-primary: #2563eb;
  --color-primary-dark: #1d4ed8;
  --color-primary-soft: #eff6ff;
  --color-indigo: #4f46e5;
  --color-accent: #10b981;
  --color-accent-dark: #059669;
  --color-accent-soft: #ecfdf5;
  --color-warning: #f59e0b;
  --color-warning-dark: #b45309;
  --color-warning-soft: #fffbeb;
  --color-danger: #ef4444;
  --color-danger-dark: #dc2626;
  --color-danger-soft: #fef2f2;
  --color-text: #0f172a;
  --color-text-muted: #475569;
  --color-text-subtle: #64748b;
  --color-border: rgba(15, 23, 42, 0.09);
  --color-bg: #f1f5f9;
  --color-surface: #ffffff;
  --radius-sm: 12px;
  --radius-md: 18px;
  --radius-lg: 24px;
  --shadow-xs: 0 1px 2px rgba(15, 23, 42, 0.04);
  --shadow-sm: 0 3px 10px rgba(15, 23, 42, 0.05), 0 1px 2px rgba(15, 23, 42, 0.04);
  --shadow-md: 0 14px 34px -6px rgba(15, 23, 42, 0.11), 0 4px 12px -2px rgba(15, 23, 42, 0.05);
  --shadow-glow: 0 10px 28px -6px rgba(37, 99, 235, 0.36);
  --max-width: 960px;
}

*,
*::before,
*::after {
  box-sizing: border-box;
}

html {
  font-size: 16px;
  scroll-behavior: smooth;
  overflow-x: clip;
}

body {
  margin: 0;
  overflow-x: clip;
  font-family: "Inter", "Noto Sans JP", -apple-system, BlinkMacSystemFont, "Hiragino Sans", "Yu Gothic UI", Meiryo, sans-serif;
  color: var(--color-text);
  background:
    radial-gradient(circle at 12% 0%, rgba(59, 130, 246, 0.08) 0%, transparent 42%),
    radial-gradient(circle at 88% 8%, rgba(99, 102, 241, 0.07) 0%, transparent 38%),
    var(--color-bg);
  background-attachment: fixed;
  line-height: 1.72;
  -webkit-font-smoothing: antialiased;
  font-variant-numeric: tabular-nums;
}

a {
  color: var(--color-primary);
  text-decoration: none;
}

a:hover {
  text-decoration: underline;
}

button,
input,
select,
textarea {
  font: inherit;
}

/* ==================== Header ==================== */
.site-header {
  position: sticky;
  top: 0;
  z-index: 100;
  background: rgba(255, 255, 255, 0.86);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
  border-bottom: 1px solid var(--color-border);
}

.site-header__inner {
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 0.8rem 1.15rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.75rem;
}

.site-logo {
  font-weight: 900;
  font-size: 1.08rem;
  letter-spacing: -0.02em;
  color: var(--color-text);
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  white-space: nowrap;
}

.site-logo__avatar {
  width: 36px;
  height: 36px;
  border-radius: 50%;
  overflow: hidden;
  border: 2px solid rgba(37, 99, 235, 0.28);
  box-shadow: 0 2px 8px rgba(37, 99, 235, 0.18);
  flex-shrink: 0;
  background: #eff6ff;
}

.site-logo__avatar img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transform: scale(1.22);
  display: block;
}

/* ==================== Mascot Speech Bubble (喋るハスキー探偵) ==================== */
.mascot-talk {
  display: flex;
  align-items: center;
  gap: 1rem;
  margin-bottom: 1.45rem;
}

.mascot-talk__avatar {
  width: 72px;
  height: 72px;
  border-radius: 50%;
  overflow: hidden;
  flex-shrink: 0;
  border: 3px solid #bfdbfe;
  box-shadow: 0 6px 18px rgba(15, 23, 42, 0.12);
  background: #eff6ff;
}

.mascot-talk__avatar img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transform: scale(1.22);
  display: block;
}

.mascot-talk__bubble {
  position: relative;
  flex: 1;
  background: #ffffff;
  border: 1.5px solid rgba(37, 99, 235, 0.22);
  border-radius: 18px;
  padding: 0.95rem 1.2rem;
  box-shadow: var(--shadow-sm);
}

.mascot-talk__bubble::before {
  content: "";
  position: absolute;
  left: -9px;
  top: 50%;
  transform: translateY(-50%) rotate(45deg);
  width: 15px;
  height: 15px;
  background: #ffffff;
  border-left: 1.5px solid rgba(37, 99, 235, 0.22);
  border-bottom: 1.5px solid rgba(37, 99, 235, 0.22);
}

.mascot-talk__name {
  font-size: 0.82rem;
  font-weight: 800;
  color: var(--color-primary);
  margin-bottom: 0.2rem;
}

.mascot-talk__text {
  margin: 0;
  font-size: 0.98rem;
  font-weight: 700;
  color: var(--color-text);
  line-height: 1.55;
}

/* ヒーロー内バリアント（ダーク背景用） */
.mascot-talk--hero {
  margin-top: 1.4rem;
  margin-bottom: 0;
}

.mascot-talk--hero .mascot-talk__avatar {
  width: 82px;
  height: 82px;
  border-color: rgba(255, 255, 255, 0.72);
  box-shadow: 0 10px 26px rgba(0, 0, 0, 0.28);
}

.mascot-talk--hero .mascot-talk__bubble {
  background: rgba(255, 255, 255, 0.96);
  border-color: rgba(255, 255, 255, 0.9);
  box-shadow: 0 10px 26px rgba(0, 0, 0, 0.18);
}

.mascot-talk--hero .mascot-talk__bubble::before {
  background: rgba(255, 255, 255, 0.96);
  border-color: rgba(255, 255, 255, 0.9);
}

/* 診断結果バリアント（mood連動） */
.mascot-talk--result .mascot-talk__avatar {
  width: 88px;
  height: 88px;
}

.mascot-talk--good .mascot-talk__avatar { border-color: #10b981; background: #ecfdf5; }
.mascot-talk--good .mascot-talk__bubble { border-color: #6ee7b7; background: #f0fdf4; }
.mascot-talk--good .mascot-talk__bubble::before { border-color: #6ee7b7; background: #f0fdf4; }
.mascot-talk--good .mascot-talk__name { color: #047857; }

.mascot-talk--warn .mascot-talk__avatar { border-color: #f59e0b; background: #fffbeb; }
.mascot-talk--warn .mascot-talk__bubble { border-color: #fcd34d; background: #fffbeb; }
.mascot-talk--warn .mascot-talk__bubble::before { border-color: #fcd34d; background: #fffbeb; }
.mascot-talk--warn .mascot-talk__name { color: #b45309; }

.mascot-talk--danger .mascot-talk__avatar { border-color: #ef4444; background: #fef2f2; }
.mascot-talk--danger .mascot-talk__bubble { border-color: #fca5a5; background: #fef2f2; }
.mascot-talk--danger .mascot-talk__bubble::before { border-color: #fca5a5; background: #fef2f2; }
.mascot-talk--danger .mascot-talk__name { color: #b91c1c; }

@media (max-width: 480px) {
  .mascot-talk { gap: 0.75rem; }
  .mascot-talk__avatar { width: 62px; height: 62px; }
  .mascot-talk--hero .mascot-talk__avatar,
  .mascot-talk--result .mascot-talk__avatar { width: 70px; height: 70px; }
  .mascot-talk__bubble { padding: 0.8rem 0.95rem; }
}

.site-logo:hover {
  text-decoration: none;
}

.site-nav {
  display: flex;
  align-items: center;
  gap: 0.25rem;
  background: rgba(15, 23, 42, 0.05);
  padding: 0.28rem;
  border-radius: 999px;
}

.site-nav__link {
  font-size: 0.88rem;
  font-weight: 800;
  color: var(--color-text-muted);
  padding: 0.42rem 0.85rem;
  border-radius: 999px;
  transition: all 0.16s ease;
  white-space: nowrap;
}

.site-nav__link:hover {
  color: var(--color-text);
  text-decoration: none;
}

.site-nav__link--active {
  background: #ffffff;
  color: var(--color-primary);
  box-shadow: 0 2px 8px rgba(15, 23, 42, 0.09);
}

/* ==================== Layout Container ==================== */
.container {
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 1.65rem 1.15rem 4.5rem;
}

.breadcrumb {
  font-size: 0.84rem;
  color: var(--color-text-subtle);
  margin-bottom: 1rem;
  display: flex;
  align-items: center;
  gap: 0.45rem;
}

.breadcrumb a {
  color: var(--color-text-subtle);
}

/* ==================== Hero Banner ==================== */
.hero {
  position: relative;
  overflow: hidden;
  background:
    radial-gradient(circle at 86% 14%, rgba(96, 165, 250, 0.34) 0%, transparent 45%),
    radial-gradient(circle at 12% 90%, rgba(16, 185, 129, 0.22) 0%, transparent 45%),
    linear-gradient(135deg, #0b1120 0%, #172554 52%, #1e3a8a 100%);
  color: #ffffff;
  border-radius: var(--radius-lg);
  padding: 2.3rem 1.6rem;
  margin-bottom: 2rem;
  box-shadow: var(--shadow-md);
}

.hero__badge {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  font-size: 0.84rem;
  font-weight: 700;
  background: rgba(255, 255, 255, 0.14);
  border: 1px solid rgba(255, 255, 255, 0.22);
  backdrop-filter: blur(8px);
  padding: 0.35rem 0.9rem;
  border-radius: 999px;
  margin-bottom: 1rem;
}

.hero__title {
  margin: 0 0 0.75rem;
  font-size: 1.78rem;
  font-weight: 900;
  line-height: 1.3;
  letter-spacing: -0.02em;
}

.hero__subtitle {
  margin: 0;
  font-size: 1.02rem;
  color: rgba(255, 255, 255, 0.88);
  max-width: 640px;
}

.page-intro {
  margin-bottom: 1.5rem;
}

.page-intro__title {
  margin: 0 0 0.4rem;
  font-size: 1.62rem;
  font-weight: 900;
  letter-spacing: -0.02em;
  line-height: 1.3;
}

.page-intro__desc {
  margin: 0;
  font-size: 0.98rem;
  color: var(--color-text-muted);
}

/* ==================== Sections & Cards ==================== */
.section {
  margin-bottom: 1.75rem;
}

.section__title {
  font-size: 1.15rem;
  font-weight: 800;
  margin: 0 0 1rem;
  color: var(--color-text);
  display: flex;
  align-items: center;
  gap: 0.55rem;
  letter-spacing: -0.01em;
}

.step-badge {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 0.82rem;
  font-weight: 800;
  color: #ffffff;
  background: linear-gradient(135deg, #2563eb 0%, #4f46e5 100%);
  padding: 0.22rem 0.7rem;
  border-radius: 999px;
  letter-spacing: 0.03em;
}

.panel {
  background: var(--color-surface);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-md);
  padding: 1.55rem;
  box-shadow: var(--shadow-sm);
}

.card-list {
  display: grid;
  gap: 1.2rem;
}

@media (min-width: 720px) {
  .card-list--2col {
    grid-template-columns: repeat(2, 1fr);
  }
}

.card {
  position: relative;
  display: flex;
  flex-direction: column;
  background: var(--color-surface);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-md);
  padding: 1.6rem;
  box-shadow: var(--shadow-sm);
  color: var(--color-text);
  transition: transform 0.18s ease, box-shadow 0.18s ease, border-color 0.18s ease;
}

.card:hover {
  transform: translateY(-3px);
  box-shadow: var(--shadow-md);
  border-color: rgba(37, 99, 235, 0.45);
  text-decoration: none;
}

.card--featured {
  background: linear-gradient(135deg, #ffffff 0%, #f8faff 55%, #eff6ff 100%);
  border: 1.5px solid rgba(37, 99, 235, 0.35);
  box-shadow: 0 14px 32px -8px rgba(37, 99, 235, 0.16);
}

.featured-layout {
  display: grid;
  gap: 1.25rem;
  align-items: center;
}

@media (min-width: 700px) {
  .featured-layout {
    grid-template-columns: 1.45fr 1fr;
  }
}

.featured-visual {
  background: #ffffff;
  border: 1px solid rgba(37, 99, 235, 0.16);
  border-radius: 14px;
  padding: 1rem 1.1rem;
  display: grid;
  grid-template-columns: auto 1fr;
  align-items: center;
  gap: 0.9rem;
  box-shadow: var(--shadow-xs);
}

.featured-visual__badge {
  width: 62px;
  height: 62px;
  border-radius: 14px;
  background: linear-gradient(135deg, #1d4ed8, #4f46e5);
  color: #ffffff;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  font-weight: 900;
  line-height: 1.1;
}

.featured-visual__badge small {
  font-size: 0.72rem;
  opacity: 0.9;
}

.featured-visual__badge span {
  font-size: 1.35rem;
}

.featured-visual__bars {
  display: grid;
  gap: 0.45rem;
}

.mini-bar {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  font-size: 0.82rem;
  font-weight: 700;
  color: var(--color-text-muted);
}

.mini-bar__track {
  flex: 1;
  height: 8px;
  background: #e2e8f0;
  border-radius: 999px;
  overflow: hidden;
}

.mini-bar__fill {
  height: 100%;
  border-radius: 999px;
}

.card__top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.6rem;
  margin-bottom: 0.7rem;
}

.card__tag {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  font-size: 0.84rem;
  font-weight: 800;
  color: var(--color-primary);
  background: var(--color-primary-soft);
  padding: 0.28rem 0.78rem;
  border-radius: 999px;
}

.card__tag--green { color: #047857; background: #d1fae5; }
.card__tag--indigo { color: #4338ca; background: #e0e7ff; }

.card__badge-hot {
  font-size: 0.82rem;
  font-weight: 800;
  color: #ffffff;
  background: linear-gradient(135deg, #2563eb, #4f46e5);
  padding: 0.24rem 0.75rem;
  border-radius: 999px;
}

.card__title {
  margin: 0 0 0.5rem;
  font-size: 1.32rem;
  font-weight: 900;
  letter-spacing: -0.02em;
  line-height: 1.35;
}

.card__desc {
  margin: 0 0 1.1rem;
  font-size: 0.98rem;
  color: var(--color-text-muted);
  flex: 1;
}

.card__cta {
  display: inline-flex;
  align-items: center;
  justify-content: space-between;
  font-size: 0.98rem;
  font-weight: 800;
  color: var(--color-primary);
  padding-top: 0.85rem;
  border-top: 1px solid var(--color-border);
}

/* ==================== Segmented Controls (簡易 / 詳細) ==================== */
.mode-bar {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 0.8rem;
  margin-bottom: 1.35rem;
}

.mode-bar__caption {
  font-size: 0.9rem;
  font-weight: 700;
  color: var(--color-text-muted);
}

.segmented {
  display: inline-grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 0.3rem;
  background: #e2e8f0;
  padding: 0.3rem;
  border-radius: 14px;
  min-width: 260px;
}

.segmented--full {
  display: grid;
  width: 100%;
  margin-bottom: 1.35rem;
}

.segmented__btn {
  border: none;
  background: transparent;
  padding: 0.65rem 1rem;
  border-radius: 11px;
  font-size: 0.92rem;
  font-weight: 800;
  color: var(--color-text-muted);
  cursor: pointer;
  transition: all 0.16s ease;
  white-space: nowrap;
}

.segmented__btn--active {
  background: #ffffff;
  color: var(--color-primary);
  box-shadow: 0 2px 8px rgba(15, 23, 42, 0.1);
}

/* ==================== Form Controls & Sliders ==================== */
.form-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 1.15rem;
}

@media (min-width: 580px) {
  .form-grid--2 { grid-template-columns: repeat(2, 1fr); }
  .form-grid--3 { grid-template-columns: repeat(3, 1fr); }
}

.field {
  display: flex;
  flex-direction: column;
  gap: 0.42rem;
}

.field__label {
  font-size: 0.92rem;
  font-weight: 800;
  color: var(--color-text);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.5rem;
}

.field__hint {
  font-size: 0.82rem;
  font-weight: 700;
  color: var(--color-primary);
}

.input-wrap {
  display: flex;
  align-items: center;
  border: 1.5px solid #cbd5e1;
  border-radius: var(--radius-sm);
  background: #ffffff;
  overflow: hidden;
  transition: border-color 0.15s ease, box-shadow 0.15s ease;
}

.input-wrap:focus-within {
  border-color: var(--color-primary);
  box-shadow: 0 0 0 3.5px rgba(37, 99, 235, 0.14);
}

.input-wrap input {
  width: 100%;
  border: none;
  outline: none;
  padding: 0.72rem 0.9rem;
  font-size: 1.1rem;
  font-weight: 700;
  background: transparent;
  color: var(--color-text);
  min-width: 0;
}

.input-wrap__unit {
  padding: 0 0.9rem 0 0.3rem;
  font-size: 0.9rem;
  font-weight: 700;
  color: var(--color-text-subtle);
  white-space: nowrap;
}

.select-box {
  width: 100%;
  border: 1.5px solid #cbd5e1;
  border-radius: var(--radius-sm);
  padding: 0.75rem 0.9rem;
  font-size: 1rem;
  font-weight: 700;
  background: #ffffff;
  color: var(--color-text);
}

.select-box:focus {
  outline: none;
  border-color: var(--color-primary);
  box-shadow: 0 0 0 3.5px rgba(37, 99, 235, 0.14);
}

.range-slider {
  -webkit-appearance: none;
  appearance: none;
  width: 100%;
  height: 7px;
  border-radius: 999px;
  background: #dbeafe;
  outline: none;
  margin-top: 0.3rem;
  cursor: pointer;
}

.range-slider::-webkit-slider-thumb {
  -webkit-appearance: none;
  appearance: none;
  width: 20px;
  height: 20px;
  border-radius: 50%;
  background: var(--color-primary);
  border: 3px solid #ffffff;
  box-shadow: 0 2px 6px rgba(37, 99, 235, 0.45);
  cursor: pointer;
}

/* Check Item Rows */
.check-list {
  display: grid;
  gap: 0.75rem;
}

.check-item {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 0.75rem;
  border: 1.5px solid var(--color-border);
  border-radius: var(--radius-sm);
  padding: 0.9rem 1rem;
  background: #ffffff;
  transition: border-color 0.15s ease, background-color 0.15s ease;
}

.check-item:has(input[type="checkbox"]:checked) {
  border-color: rgba(37, 99, 235, 0.55);
  background: #f8fbff;
}

.check-item__main {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  flex: 1 1 220px;
  cursor: pointer;
}

.check-item__main input[type="checkbox"] {
  width: 1.25rem;
  height: 1.25rem;
  accent-color: var(--color-primary);
  flex-shrink: 0;
  cursor: pointer;
}

.check-item__title {
  font-size: 0.98rem;
  font-weight: 800;
  display: block;
  line-height: 1.35;
}

.check-item__sub {
  font-size: 0.84rem;
  color: var(--color-text-subtle);
  display: block;
  margin-top: 0.12rem;
}

.check-item__amount {
  width: 148px;
  flex-shrink: 0;
}

/* Preset Bar */
.preset-bar {
  display: flex;
  flex-wrap: wrap;
  gap: 0.55rem;
}

.preset-btn {
  border: 1px solid #cbd5e1;
  background: #ffffff;
  color: var(--color-text);
  font-size: 0.86rem;
  font-weight: 700;
  padding: 0.52rem 0.95rem;
  border-radius: 999px;
  cursor: pointer;
  transition: all 0.15s ease;
}

.preset-btn:hover {
  transform: translateY(-1px);
  border-color: var(--color-primary);
  color: var(--color-primary);
  background: var(--color-primary-soft);
}

.preset-btn--danger { border-color: #fca5a5; color: #b91c1c; background: #fef2f2; }
.preset-btn--good   { border-color: #6ee7b7; color: #047857; background: #ecfdf5; }

/* Primary & Secondary Buttons */
.btn-primary {
  width: 100%;
  border: none;
  border-radius: 16px;
  background: linear-gradient(135deg, #2563eb 0%, #4f46e5 100%);
  color: #ffffff;
  font-size: 1.12rem;
  font-weight: 900;
  padding: 1.1rem 1.4rem;
  cursor: pointer;
  box-shadow: var(--shadow-glow);
  transition: transform 0.14s ease, box-shadow 0.14s ease, filter 0.14s ease;
}

.btn-primary:hover {
  transform: translateY(-1.5px);
  filter: brightness(1.04);
}

.btn-secondary {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.45rem;
  border: 1.5px solid var(--color-primary);
  background: #ffffff;
  color: var(--color-primary);
  font-size: 0.94rem;
  font-weight: 800;
  padding: 0.72rem 1.2rem;
  border-radius: var(--radius-sm);
  cursor: pointer;
}

.btn-secondary:hover {
  background: var(--color-primary-soft);
  text-decoration: none;
}

/* Accordion */
details.accordion {
  border: 1px solid var(--color-border);
  border-radius: var(--radius-sm);
  background: #f8fafc;
  padding: 0.95rem 1.15rem;
}

details.accordion summary {
  font-size: 0.95rem;
  font-weight: 800;
  cursor: pointer;
  color: var(--color-text);
  list-style: none;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

details.accordion summary::after {
  content: "＋";
  font-weight: 800;
  color: var(--color-primary);
}

details.accordion[open] summary::after {
  content: "−";
}

details.accordion .accordion__body {
  margin-top: 1rem;
  padding-top: 0.95rem;
  border-top: 1px solid var(--color-border);
}

/* ==================== Result Dashboard Zone ==================== */
.result-zone {
  margin-top: 2rem;
  animation: fadeUp 0.3s cubic-bezier(0.2, 0.8, 0.2, 1);
}

.is-hidden {
  display: none !important;
}

@keyframes fadeUp {
  from { opacity: 0; transform: translateY(10px); }
  to { opacity: 1; transform: translateY(0); }
}

.result-hero {
  position: relative;
  overflow: hidden;
  border-radius: var(--radius-lg);
  padding: 1.75rem 1.5rem;
  color: #ffffff;
  margin-bottom: 1.4rem;
  box-shadow: var(--shadow-md);
}

.result-hero--rank-s {
  background: radial-gradient(circle at 88% 12%, rgba(253, 224, 71, 0.30), transparent 45%),
              linear-gradient(135deg, #064e3b 0%, #047857 55%, #059669 100%);
}

.result-hero--rank-a {
  background: radial-gradient(circle at 90% 10%, rgba(110, 231, 183, 0.28), transparent 45%),
              linear-gradient(135deg, #047857 0%, #059669 60%, #10b981 100%);
}

.result-hero--rank-b {
  background: radial-gradient(circle at 90% 10%, rgba(147, 197, 253, 0.30), transparent 45%),
              linear-gradient(135deg, #1e3a8a 0%, #1d4ed8 60%, #2563eb 100%);
}

.result-hero--rank-c {
  background: radial-gradient(circle at 90% 10%, rgba(253, 230, 138, 0.28), transparent 45%),
              linear-gradient(135deg, #78350f 0%, #b45309 60%, #d97706 100%);
}

.result-hero--rank-d {
  background: radial-gradient(circle at 90% 10%, rgba(252, 165, 165, 0.26), transparent 45%),
              linear-gradient(135deg, #7f1d1d 0%, #b91c1c 60%, #dc2626 100%);
}

.result-hero--rank-e {
  background: radial-gradient(circle at 85% 15%, rgba(239, 68, 68, 0.38), transparent 48%),
              linear-gradient(135deg, #18080c 0%, #580b18 52%, #991b1b 100%);
}

.result-hero__eyebrow {
  font-size: 0.88rem;
  font-weight: 700;
  opacity: 0.92;
  margin-bottom: 0.35rem;
}

.result-hero__value {
  font-size: 2.2rem;
  font-weight: 900;
  line-height: 1.18;
  letter-spacing: -0.02em;
  margin: 0.15rem 0 0.55rem;
}

.result-hero__note {
  margin: 0;
  font-size: 0.98rem;
  opacity: 0.95;
  line-height: 1.6;
}

.rank-header {
  display: flex;
  align-items: center;
  gap: 1.25rem;
  flex-wrap: wrap;
}

.rank-badge {
  display: inline-flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  min-width: 100px;
  height: 100px;
  border-radius: 22px;
  background: rgba(255, 255, 255, 0.15);
  backdrop-filter: blur(8px);
  border: 2px solid rgba(255, 255, 255, 0.45);
}

.rank-badge__label {
  font-size: 0.82rem;
  font-weight: 800;
  opacity: 0.92;
}

.rank-badge__grade {
  font-size: 2.4rem;
  font-weight: 900;
  line-height: 1.05;
}

/* KPI Grid */
.kpi-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 0.9rem;
  margin-bottom: 1.4rem;
}

@media (min-width: 640px) {
  .kpi-grid--3 { grid-template-columns: repeat(3, 1fr); }
  .kpi-grid--4 { grid-template-columns: repeat(4, 1fr); }
}

.kpi-card {
  background: var(--color-surface);
  border: 1px solid var(--color-border);
  border-radius: 16px;
  padding: 1.15rem 1.1rem;
  box-shadow: var(--shadow-xs);
}

.kpi-card__label {
  font-size: 0.84rem;
  font-weight: 700;
  color: var(--color-text-subtle);
  margin-bottom: 0.35rem;
}

.kpi-card__value {
  font-size: 1.45rem;
  font-weight: 900;
  color: var(--color-text);
  line-height: 1.2;
  letter-spacing: -0.02em;
}

.kpi-card__value--good { color: var(--color-accent-dark); }
.kpi-card__value--warn { color: var(--color-warning-dark); }
.kpi-card__value--bad  { color: var(--color-danger-dark); }

.kpi-card__sub {
  font-size: 0.82rem;
  color: var(--color-text-subtle);
  margin-top: 0.3rem;
}

/* Visual Grid & Charts */
.viz-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 1.15rem;
  margin-bottom: 1.4rem;
}

@media (min-width: 680px) {
  .viz-grid--2 { grid-template-columns: repeat(2, 1fr); }
}

.chart-box {
  background: var(--color-surface);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-md);
  padding: 1.35rem;
  margin-bottom: 1.4rem;
  box-shadow: var(--shadow-sm);
  overflow-x: auto;
}

.viz-grid .chart-box { margin-bottom: 0; }

.chart-legend {
  display: flex;
  flex-wrap: wrap;
  gap: 1rem;
  font-size: 0.86rem;
  font-weight: 700;
  color: var(--color-text-muted);
  margin-bottom: 0.75rem;
}

.chart-legend__dot {
  display: inline-block;
  width: 11px;
  height: 11px;
  border-radius: 3px;
  margin-right: 0.35rem;
  vertical-align: middle;
}

/* Alert Cards */
.alert-list {
  display: grid;
  gap: 0.8rem;
}

.alert-item {
  border-radius: 14px;
  padding: 1.05rem 1.15rem;
  border-left: 5px solid;
}

.alert-item--red {
  background: var(--color-danger-soft);
  border-color: var(--color-danger-dark);
  border-top: 1px solid #fecaca;
  border-right: 1px solid #fecaca;
  border-bottom: 1px solid #fecaca;
}

.alert-item--yellow {
  background: var(--color-warning-soft);
  border-color: var(--color-warning);
  border-top: 1px solid #fde68a;
  border-right: 1px solid #fde68a;
  border-bottom: 1px solid #fde68a;
}

.alert-item--green {
  background: var(--color-accent-soft);
  border-color: var(--color-accent-dark);
  border-top: 1px solid #a7f3d0;
  border-right: 1px solid #a7f3d0;
  border-bottom: 1px solid #a7f3d0;
}

.alert-item__head {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 0.5rem;
  margin-bottom: 0.35rem;
  font-size: 1rem;
}

.pill {
  display: inline-block;
  font-size: 0.82rem;
  font-weight: 800;
  padding: 0.16rem 0.6rem;
  border-radius: 999px;
}

.pill--red { background: #dc2626; color: #ffffff; }
.pill--yellow { background: #d97706; color: #ffffff; }
.pill--green { background: #059669; color: #ffffff; }

.alert-item__msg {
  margin: 0;
  color: var(--color-text);
  font-size: 0.94rem;
  line-height: 1.6;
}

/* Data Table */
.data-table-wrap {
  overflow-x: auto;
  border: 1px solid var(--color-border);
  border-radius: var(--radius-sm);
}

.data-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.88rem;
  white-space: nowrap;
}

.data-table th,
.data-table td {
  padding: 0.62rem 0.75rem;
  border-bottom: 1px solid var(--color-border);
  text-align: right;
}

.data-table th:first-child,
.data-table td:first-child { text-align: left; }

.data-table thead th {
  background: #f1f5f9;
  font-weight: 800;
  color: var(--color-text-muted);
}

.data-table tr.is-deadcross { background: #fef2f2; }

/* Mail Box */
.mail-box {
  background: #f8fafc;
  border: 1px solid var(--color-border);
  border-radius: var(--radius-sm);
  padding: 1.05rem;
  font-size: 0.94rem;
  white-space: pre-wrap;
  color: var(--color-text);
  margin: 0.7rem 0 0.95rem;
  line-height: 1.7;
}

/* Monetization Zone */
.pr-section {
  background: linear-gradient(180deg, #eff6ff 0%, #ffffff 100%);
  border: 1.5px solid #bfdbfe;
  border-radius: var(--radius-md);
  padding: 1.4rem;
  margin: 1.5rem 0;
}

.pr-section__title {
  margin: 0 0 1rem;
  font-size: 1.06rem;
  font-weight: 800;
  color: #1e3a8a;
}

.pr-cards { display: grid; gap: 0.85rem; }

.pr-card {
  display: block;
  background: #ffffff;
  border: 1px solid #cbd5e1;
  border-radius: 14px;
  padding: 1.1rem 1.2rem;
  color: var(--color-text);
  transition: border-color 0.16s ease, transform 0.16s ease;
}

.pr-card:hover {
  transform: translateY(-2px);
  border-color: var(--color-primary);
  text-decoration: none;
}

.pr-badge {
  display: inline-block;
  font-size: 0.82rem;
  font-weight: 800;
  color: #475569;
  background: #e2e8f0;
  padding: 0.12rem 0.55rem;
  border-radius: 6px;
}

.pr-card__title {
  font-size: 1.04rem;
  font-weight: 800;
  color: var(--color-primary-dark);
  margin: 0.35rem 0 0.25rem;
}

.pr-card__desc {
  font-size: 0.9rem;
  color: var(--color-text-muted);
  margin: 0;
}

.ad-slot {
  border: 1px dashed #cbd5e1;
  border-radius: var(--radius-md);
  padding: 1.25rem 1rem;
  text-align: center;
  font-size: 0.84rem;
  color: #64748b;
  background: rgba(241, 245, 249, 0.85);
  margin: 1.4rem 0;
}

/* Share Row */
.share-row {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 0.75rem;
  margin: 1.15rem 0 1.4rem;
}

.share-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.45rem;
  padding: 0.85rem 1rem;
  border-radius: 14px;
  font-size: 0.94rem;
  font-weight: 800;
  color: #ffffff;
  text-align: center;
}

.share-btn:hover { opacity: 0.92; text-decoration: none; }
.share-btn--x { background: #0f172a; }
.share-btn--line { background: #06c755; }

/* Article Box (SEO用・圧迫感を抑えた折りたたみ対応) */
.article-box {
  background: var(--color-surface);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-md);
  padding: 1.5rem;
  margin-top: 1.85rem;
  box-shadow: var(--shadow-xs);
}

.article-box h2 {
  font-size: 1.18rem;
  font-weight: 800;
  margin: 0 0 0.85rem;
  padding-bottom: 0.55rem;
  border-bottom: 2px solid var(--color-primary-soft);
}

.article-box h3 {
  font-size: 1.02rem;
  font-weight: 800;
  margin: 1.2rem 0 0.4rem;
  color: var(--color-primary-dark);
}

.article-box p,
.article-box li {
  font-size: 0.95rem;
  color: var(--color-text-muted);
}

/* Disclaimer */
.disclaimer {
  margin-top: 1.75rem;
  padding: 1.1rem 1.25rem;
  background: rgba(241, 245, 249, 0.95);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-md);
  font-size: 0.84rem;
  color: var(--color-text-muted);
}

/* ==================== Feedback Box (ユーザー改善コメント欄) ==================== */
.feedback-box {
  background: var(--color-surface);
  border: 1.5px solid rgba(37, 99, 235, 0.18);
  border-radius: var(--radius-md);
  padding: 1.5rem;
  margin-top: 2rem;
  box-shadow: var(--shadow-sm);
}

.feedback-box__head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 0.5rem;
  margin-bottom: 0.45rem;
}

.feedback-box__title {
  margin: 0;
  font-size: 1.1rem;
  font-weight: 800;
  color: var(--color-text);
}

.feedback-box__desc {
  margin: 0 0 1rem;
  font-size: 0.9rem;
  color: var(--color-text-muted);
}

.fb-pills {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  margin-bottom: 0.95rem;
}

.fb-pill {
  border: 1.5px solid #cbd5e1;
  background: #ffffff;
  color: var(--color-text-muted);
  font-size: 0.88rem;
  font-weight: 700;
  padding: 0.46rem 0.9rem;
  border-radius: 999px;
  cursor: pointer;
  transition: all 0.15s ease;
}

.fb-pill:hover {
  border-color: var(--color-primary);
  color: var(--color-primary);
}

.fb-pill--active {
  background: var(--color-primary-soft);
  border-color: var(--color-primary);
  color: var(--color-primary-dark);
}

.fb-textarea {
  width: 100%;
  min-height: 96px;
  border: 1.5px solid #cbd5e1;
  border-radius: var(--radius-sm);
  padding: 0.85rem 1rem;
  font-size: 0.98rem;
  color: var(--color-text);
  background: #ffffff;
  resize: vertical;
  margin-bottom: 0.95rem;
  line-height: 1.6;
}

.fb-textarea:focus {
  outline: none;
  border-color: var(--color-primary);
  box-shadow: 0 0 0 3.5px rgba(37, 99, 235, 0.14);
}

.fb-actions {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 0.75rem;
}

.fb-submit {
  border: none;
  border-radius: 12px;
  background: linear-gradient(135deg, #2563eb 0%, #4f46e5 100%);
  color: #ffffff;
  font-size: 0.96rem;
  font-weight: 800;
  padding: 0.72rem 1.45rem;
  cursor: pointer;
  box-shadow: 0 6px 16px -4px rgba(37, 99, 235, 0.35);
}

.fb-submit:hover { filter: brightness(1.05); }

.fb-meta {
  font-size: 0.84rem;
  color: var(--color-text-subtle);
}

.fb-thanks {
  margin-top: 1rem;
}

/* Footer */
.site-footer {
  border-top: 1px solid var(--color-border);
  background: var(--color-surface);
  padding: 1.85rem 1rem;
  text-align: center;
  font-size: 0.88rem;
  color: var(--color-text-muted);
}

.site-footer__links {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 1.15rem;
  margin-bottom: 0.85rem;
}

.site-footer__links a {
  color: var(--color-text-muted);
  font-weight: 700;
}

@media (min-width: 680px) {
  .hero { padding: 2.8rem 2.5rem; }
  .hero__title { font-size: 2.35rem; }
  .page-intro__title { font-size: 1.9rem; }
}

/* ==================== スマホ幅（375px〜560px）最適化 ==================== */
@media (max-width: 560px) {
  .site-header__inner {
    flex-direction: column;
    align-items: stretch;
    padding: 0.6rem 0.85rem 0.65rem;
    gap: 0.5rem;
  }

  .site-logo {
    font-size: 0.98rem;
    gap: 0.45rem;
    justify-content: center;
  }

  .site-logo__avatar {
    width: 30px;
    height: 30px;
  }

  .site-nav {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    width: 100%;
    padding: 0.2rem;
    gap: 0.16rem;
  }

  .site-nav__link {
    font-size: 0.78rem;
    padding: 0.42rem 0.2rem;
    text-align: center;
  }

  .container {
    padding: 1.15rem 0.9rem 3.5rem;
  }

  .hero {
    padding: 1.65rem 1.15rem;
  }

  .hero__title {
    font-size: 1.44rem;
  }

  .hero__subtitle {
    font-size: 0.94rem;
  }

  .page-intro__title {
    font-size: 1.32rem;
  }

  .panel,
  .card,
  .chart-box,
  .feedback-box {
    padding: 1.15rem 1rem;
  }

  .segmented {
    width: 100%;
    min-width: 0;
  }

  .segmented__btn {
    padding: 0.6rem 0.5rem;
    font-size: 0.84rem;
  }

  .preset-bar {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 0.45rem;
  }

  .preset-btn {
    font-size: 0.78rem;
    padding: 0.5rem 0.45rem;
    text-align: center;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
  }

  .check-item__amount {
    width: 100%;
  }

  .rank-badge {
    min-width: 78px;
    height: 78px;
    border-radius: 18px;
  }

  .rank-badge__grade {
    font-size: 2rem;
  }

  .result-hero {
    padding: 1.35rem 1.1rem;
  }

  .result-hero__value {
    font-size: 1.62rem;
  }

  .kpi-grid {
    gap: 0.65rem;
  }

  .kpi-card {
    padding: 0.9rem 0.8rem;
  }

  .kpi-card__value {
    font-size: 1.18rem;
  }

  .featured-visual {
    padding: 0.85rem;
    gap: 0.7rem;
  }

  .share-row {
    grid-template-columns: 1fr;
  }
}
