/* 見積もりシミュレーター専用（estimate- プレフィックス） */

.visually-hidden {
  position: absolute !important;
  width: 1px !important;
  height: 1px !important;
  padding: 0 !important;
  margin: -1px !important;
  overflow: hidden !important;
  clip: rect(0, 0, 0, 0) !important;
  white-space: nowrap !important;
  border: 0 !important;
}

.estimate-page {
  background: #fafaf8;
}

.estimate-hero {
  padding: clamp(48px, 8vw, 96px) clamp(20px, 4vw, 40px) clamp(40px, 6vw, 72px);
  max-width: 920px;
  margin: 0 auto;
}

.estimate-hero__kicker {
  font-size: 10px;
  font-weight: 800;
  letter-spacing: 0.2em;
  color: var(--muted);
  margin: 0 0 16px;
}

.estimate-hero__title {
  margin: 0;
  font-size: clamp(26px, 4vw, 40px);
  font-weight: 800;
  letter-spacing: 0.02em;
  line-height: 1.35;
  color: var(--text);
}

.estimate-hero__lead {
  margin: clamp(18px, 3vw, 28px) 0 0;
  font-size: clamp(15px, 2.2vw, 18px);
  font-weight: 600;
  line-height: 1.65;
  color: var(--text);
}

.estimate-hero__sub {
  margin: clamp(14px, 2vw, 22px) 0 0;
  font-size: 13px;
  line-height: 1.85;
  font-weight: 500;
  color: var(--muted);
  letter-spacing: 0.03em;
}

.estimate-hero__note {
  margin: clamp(18px, 2.5vw, 26px) 0 0;
  padding: 14px 18px;
  font-size: 12px;
  line-height: 1.75;
  color: var(--muted);
  background: rgba(255, 255, 255, 0.85);
  border: 1px solid var(--line);
  border-radius: 12px;
}

.estimate-hero__actions {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  margin-top: clamp(28px, 4vw, 40px);
}

.estimate-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  min-height: 48px;
  padding: 0 24px;
  font-size: 12px;
  font-weight: 800;
  letter-spacing: 0.14em;
  border-radius: 999px;
  border: 1px solid transparent;
  cursor: pointer;
  text-decoration: none;
  transition: transform 0.2s ease, box-shadow 0.2s ease, background 0.2s ease,
    color 0.2s ease;
  -webkit-tap-highlight-color: transparent;
}

.estimate-btn--primary {
  background: var(--text);
  color: #fff;
  box-shadow: 0 4px 18px rgba(17, 17, 17, 0.15);
}

.estimate-btn--primary:hover {
  transform: translateY(-1px);
  box-shadow: 0 6px 22px rgba(17, 17, 17, 0.18);
}

.estimate-btn--ghost {
  background: #fff;
  color: var(--text);
  border-color: rgba(17, 17, 17, 0.18);
}

.estimate-btn--ghost:hover {
  border-color: rgba(17, 17, 17, 0.35);
}

/* 2カラムレイアウト */
.estimate-layout {
  max-width: 1120px;
  margin: 0 auto;
  padding: 0 clamp(18px, 4vw, 32px) clamp(72px, 10vw, 120px);
  display: grid;
  gap: clamp(28px, 4vw, 48px);
}

@media (min-width: 900px) {
  .estimate-layout {
    grid-template-columns: minmax(0, 1fr) minmax(300px, 380px);
    align-items: start;
    gap: clamp(36px, 5vw, 56px);
  }
}

.estimate-form-col {
  min-width: 0;
}

/* フォーム上の導入（page-hero と干渉しない専用タイポ） */
.estimate-sim-intro {
  margin-bottom: clamp(28px, 4vw, 40px);
}

.estimate-sim-intro__eyebrow {
  margin: 0 0 10px;
  font-size: 10px;
  font-weight: 800;
  letter-spacing: 0.2em;
  color: var(--muted);
  display: flex;
  align-items: center;
  gap: 8px;
}

.estimate-sim-intro__eyebrow::before {
  content: "";
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: currentColor;
  flex-shrink: 0;
}

.estimate-sim-intro__title {
  margin: 0 0 10px;
  font-size: clamp(20px, 2.8vw, 26px);
  font-weight: 800;
  letter-spacing: 0.02em;
  line-height: 1.35;
  color: var(--text);
}

.estimate-sim-intro__lead {
  margin: 0;
  max-width: 48em;
  font-size: 13px;
  line-height: 1.85;
  font-weight: 500;
  color: var(--muted);
  letter-spacing: 0.03em;
}

.estimate-result-col {
  min-width: 0;
}

#estimate-result-anchor {
  scroll-margin-top: clamp(88px, 12vh, 120px);
}

@media (min-width: 900px) {
  .estimate-result-inner {
    position: sticky;
    top: clamp(72px, 10vh, 120px);
  }
}

/* 入力セクション共通 */
.estimate-section {
  margin-bottom: clamp(36px, 5vw, 52px);
  padding: clamp(22px, 3vw, 32px);
  background: #fff;
  border: 1px solid rgba(196, 196, 192, 0.65);
  border-radius: 16px;
  box-shadow: 0 8px 32px rgba(17, 17, 17, 0.04);
}

.estimate-section__head {
  display: flex;
  align-items: baseline;
  gap: 12px;
  flex-wrap: wrap;
  margin-bottom: clamp(12px, 2vw, 18px);
}

.estimate-section__num {
  flex: 0 0 auto;
  font-size: 11px;
  font-weight: 800;
  letter-spacing: 0.12em;
  color: var(--muted);
}

.estimate-section__title {
  margin: 0;
  font-size: clamp(15px, 2vw, 17px);
  font-weight: 800;
  letter-spacing: 0.02em;
}

.estimate-section__desc {
  margin: 0 0 clamp(18px, 2.5vw, 24px);
  font-size: 12px;
  line-height: 1.75;
  color: var(--muted);
}

/* 制作タイプカード */
.estimate-type-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 12px;
}

@media (min-width: 560px) {
  .estimate-type-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

.estimate-type-card {
  position: relative;
  display: block;
  margin: 0;
  cursor: pointer;
}

.estimate-type-card input,
.estimate-radio input,
.estimate-check input {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

.estimate-type-card__body {
  display: block;
  height: 100%;
  padding: 16px 16px 14px;
  border: 2px solid rgba(17, 17, 17, 0.1);
  border-radius: 14px;
  background: #fafaf8;
  transition: border-color 0.2s ease, background 0.2s ease,
    box-shadow 0.2s ease;
}

.estimate-type-card:hover .estimate-type-card__body {
  border-color: rgba(17, 17, 17, 0.22);
}

.estimate-type-card input:focus-visible + .estimate-type-card__body {
  outline: 2px solid var(--text);
  outline-offset: 2px;
}

.estimate-type-card input:checked + .estimate-type-card__body {
  border-color: var(--text);
  background: #fff;
  box-shadow: 0 6px 24px rgba(17, 17, 17, 0.07);
}

.estimate-type-card__name {
  display: block;
  font-size: 13px;
  font-weight: 800;
  letter-spacing: 0.02em;
  line-height: 1.45;
  margin-bottom: 10px;
}

.estimate-type-card__meta {
  display: flex;
  flex-direction: column;
  gap: 4px;
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.04em;
  color: var(--muted);
}

/* ページ数ステッパー（数値と ± を横並び・高さ固定でスケールを抑える） */
.estimate-pages-row {
  display: flex;
  flex-wrap: wrap;
  align-items: stretch;
  gap: 12px;
}

.estimate-pages-field {
  flex: 1 1 auto;
  max-width: 280px;
  min-height: 48px;
  max-height: 52px;
  display: flex;
  align-items: stretch;
  gap: 0;
  border: 1px solid rgba(17, 17, 17, 0.14);
  border-radius: 12px;
  overflow: hidden;
  background: #fff;
}

.estimate-pages-field label.visually-hidden {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

.estimate-pages-field input[type="number"] {
  flex: 1;
  min-width: 0;
  align-self: stretch;
  border: 0;
  padding: 10px 14px;
  font-size: 15px;
  font-weight: 600;
  font-variant-numeric: tabular-nums;
  background: transparent;
}

.estimate-pages-field input:focus {
  outline: none;
}

.estimate-stepper {
  display: flex;
  flex-direction: row;
  flex: 0 0 auto;
  align-self: stretch;
  border-left: 1px solid rgba(17, 17, 17, 0.1);
}

.estimate-stepper button {
  flex: 0 0 44px;
  width: 44px;
  min-height: 48px;
  padding: 0;
  border: 0;
  background: var(--soft);
  font-size: 17px;
  font-weight: 600;
  line-height: 1;
  cursor: pointer;
  color: var(--text);
  transition: background 0.15s ease;
}

.estimate-stepper button:hover {
  background: #dcdcd8;
}

.estimate-stepper button + button {
  border-top: 0;
  border-left: 1px solid rgba(17, 17, 17, 0.08);
}

.estimate-pages-hint {
  flex: 1 1 100%;
  margin: 0;
  font-size: 11px;
  color: var(--muted);
  line-height: 1.6;
}

/* ラジオ行（スタック） */
.estimate-stack {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.estimate-radio {
  display: flex;
  margin: 0;
}


.estimate-radio__box {
  display: flex;
  align-items: flex-start;
  gap: 12px;
  width: 100%;
  padding: 14px 16px;
  border: 2px solid rgba(17, 17, 17, 0.1);
  border-radius: 12px;
  background: #fafaf8;
  transition: border-color 0.2s ease, background 0.2s ease;
  cursor: pointer;
}

.estimate-radio input:focus-visible + .estimate-radio__box {
  outline: 2px solid var(--text);
  outline-offset: 2px;
}

.estimate-radio input:checked + .estimate-radio__box {
  border-color: var(--text);
  background: #fff;
}

.estimate-radio__label {
  font-size: 13px;
  font-weight: 700;
  letter-spacing: 0.02em;
  line-height: 1.45;
}

.estimate-radio__sub {
  display: block;
  margin-top: 6px;
  font-size: 11px;
  font-weight: 500;
  color: var(--muted);
  letter-spacing: 0.03em;
}

/* オプション グリッド */
.estimate-opt-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 10px;
}

@media (min-width: 600px) {
  .estimate-opt-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

.estimate-check {
  display: flex;
  margin: 0;
}


.estimate-check__box {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  width: 100%;
  min-height: 52px;
  padding: 12px 14px;
  border: 2px solid rgba(17, 17, 17, 0.1);
  border-radius: 12px;
  background: #fafaf8;
  cursor: pointer;
  transition: border-color 0.2s ease, background 0.2s ease;
}

.estimate-check input:focus-visible + .estimate-check__box {
  outline: 2px solid var(--text);
  outline-offset: 2px;
}

.estimate-check input:checked + .estimate-check__box {
  border-color: var(--text);
  background: #fff;
}

.estimate-check__fake {
  flex: 0 0 20px;
  width: 20px;
  height: 20px;
  margin-top: 2px;
  border-radius: 6px;
  border: 2px solid rgba(17, 17, 17, 0.25);
  background: #fff;
  position: relative;
}

.estimate-check input:checked + .estimate-check__box .estimate-check__fake {
  background: var(--text);
  border-color: var(--text);
}

.estimate-check input:checked + .estimate-check__box .estimate-check__fake::after {
  content: "";
  position: absolute;
  left: 5px;
  top: 2px;
  width: 5px;
  height: 10px;
  border: solid #fff;
  border-width: 0 2px 2px 0;
  transform: rotate(45deg);
}

.estimate-check__text {
  font-size: 12px;
  font-weight: 700;
  line-height: 1.45;
}

.estimate-check__meta {
  display: block;
  margin-top: 4px;
  font-size: 10px;
  font-weight: 600;
  color: var(--muted);
  letter-spacing: 0.04em;
}

/* 結果カード */
.estimate-result {
  padding: clamp(22px, 3vw, 28px);
  border-radius: 16px;
  border: 1px solid rgba(196, 196, 192, 0.8);
  background: linear-gradient(165deg, #ffffff 0%, #f5f5f2 100%);
  box-shadow: 0 12px 40px rgba(17, 17, 17, 0.06);
}

.estimate-result__badge {
  display: inline-block;
  font-size: 10px;
  font-weight: 800;
  letter-spacing: 0.18em;
  color: var(--muted);
  margin-bottom: 12px;
}

.estimate-result__price-wrap {
  margin-bottom: clamp(18px, 3vw, 28px);
}

.estimate-result__price-label {
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.12em;
  color: var(--muted);
  margin-bottom: 6px;
}

.estimate-result__price {
  margin: 0;
  font-size: clamp(28px, 5vw, 40px);
  font-weight: 800;
  letter-spacing: -0.02em;
  font-variant-numeric: tabular-nums;
  line-height: 1.15;
}

.estimate-result__tax {
  margin: 8px 0 0;
  font-size: 11px;
  font-weight: 600;
  color: var(--muted);
  letter-spacing: 0.06em;
}

.estimate-result__grid {
  display: grid;
  gap: 14px;
  margin-bottom: 18px;
}

.estimate-result__metric {
  padding: 12px 14px;
  border-radius: 12px;
  background: rgba(255, 255, 255, 0.85);
  border: 1px solid rgba(17, 17, 17, 0.06);
}

.estimate-result__metric-label {
  font-size: 10px;
  font-weight: 800;
  letter-spacing: 0.14em;
  color: var(--muted);
  margin-bottom: 4px;
}

.estimate-result__metric-value {
  font-size: clamp(17px, 3vw, 22px);
  font-weight: 800;
  font-variant-numeric: tabular-nums;
}

.estimate-result__detail-list {
  margin: 0;
  padding: 0;
}

.estimate-result__pair {
  display: grid;
  grid-template-columns: minmax(0, 38%) minmax(0, 1fr);
  gap: 8px 12px;
  padding: 10px 0;
  border-bottom: 1px solid rgba(17, 17, 17, 0.06);
  font-size: 12px;
  line-height: 1.6;
}

.estimate-result__pair:last-of-type {
  border-bottom: 0;
}

.estimate-result__pair dt {
  margin: 0;
  font-weight: 700;
  color: var(--muted);
}

.estimate-result__pair dd {
  margin: 0;
  font-weight: 600;
  color: var(--text);
}

.estimate-result__opt-list {
  margin: 6px 0 0;
  padding-left: 1.1em;
  list-style: disc;
  color: var(--text);
}

.estimate-result__note {
  margin: 16px 0 0;
  padding: 12px 14px;
  font-size: 11px;
  line-height: 1.75;
  color: var(--muted);
  background: rgba(255, 255, 255, 0.65);
  border-radius: 10px;
}

.estimate-result__actions {
  display: flex;
  flex-direction: column;
  gap: 10px;
  margin-top: 18px;
}

.estimate-result__copy-wrap {
  position: relative;
}

.estimate-result__copy-feedback {
  margin: 8px 0 0;
  font-size: 11px;
  font-weight: 700;
  color: #2a6a3a;
}

/* ライブリージョン（視覚非表示） */
.estimate-sr-live {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

/* 注意・知識カード */
.estimate-notes {
  max-width: 1120px;
  margin: 0 auto;
  padding: 0 clamp(18px, 4vw, 32px) clamp(48px, 8vw, 88px);
}

.estimate-notes__title {
  margin: 0 0 16px;
  font-size: 14px;
  font-weight: 800;
  letter-spacing: 0.08em;
}

.estimate-notes__list {
  margin: 0;
  padding-left: 1.2em;
  font-size: 12px;
  line-height: 1.85;
  color: var(--muted);
}

.estimate-know {
  max-width: 1120px;
  margin: 0 auto;
  padding: 0 clamp(18px, 4vw, 32px) clamp(40px, 7vw, 72px);
}

.estimate-know__title {
  margin: 0 0 clamp(18px, 3vw, 28px);
  font-size: clamp(18px, 2.5vw, 22px);
  font-weight: 800;
  letter-spacing: 0.02em;
}

.estimate-know__grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 16px;
}

@media (min-width: 720px) {
  .estimate-know__grid {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }
}

.estimate-know-card {
  padding: clamp(20px, 3vw, 26px);
  border-radius: 14px;
  border: 1px solid rgba(196, 196, 192, 0.7);
  background: #fff;
  box-shadow: 0 6px 28px rgba(17, 17, 17, 0.04);
}

.estimate-know-card__title {
  margin: 0 0 10px;
  font-size: 14px;
  font-weight: 800;
  line-height: 1.5;
}

.estimate-know-card__body {
  margin: 0;
  font-size: 12px;
  line-height: 1.85;
  color: var(--muted);
}

/* 最終CTA */
.estimate-final {
  margin: 0 clamp(18px, 4vw, 32px) clamp(72px, 12vw, 120px);
  padding: clamp(36px, 6vw, 56px) clamp(24px, 4vw, 48px);
  max-width: 920px;
  margin-left: auto;
  margin-right: auto;
  border-radius: 18px;
  border: 1px solid rgba(196, 196, 192, 0.75);
  background: linear-gradient(180deg, #ffffff 0%, #f4f4f1 100%);
  text-align: center;
}

.estimate-final__title {
  margin: 0;
  font-size: clamp(18px, 2.6vw, 24px);
  font-weight: 800;
}

.estimate-final__body {
  margin: clamp(14px, 2.5vw, 20px) auto 0;
  max-width: 560px;
  font-size: 13px;
  line-height: 2;
  color: var(--muted);
}

.estimate-final__btn {
  margin-top: clamp(22px, 4vw, 32px);
}

@media (prefers-reduced-motion: reduce) {
  .estimate-btn--primary:hover {
    transform: none;
  }
}

/* 右下追従：結果パネルへ / お問い合わせ */
.estimate-fab-stack {
  position: fixed;
  right: clamp(14px, 3vw, 22px);
  bottom: clamp(14px, 3vw, 22px);
  z-index: 998;
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  gap: 10px;
}

body.is-nav-open .estimate-fab-stack {
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
}

.estimate-fab {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  text-decoration: none;
  -webkit-tap-highlight-color: transparent;
  transition: transform 0.2s ease, box-shadow 0.2s ease, background 0.2s ease,
    border-color 0.2s ease;
}

.estimate-fab--text {
  padding: 11px 18px;
  font-size: 11px;
  font-weight: 800;
  letter-spacing: 0.12em;
  color: var(--text);
  background: #fff;
  border: 1px solid rgba(17, 17, 17, 0.12);
  border-radius: 999px;
  box-shadow: 0 8px 28px rgba(17, 17, 17, 0.1);
}

.estimate-fab--text:hover {
  transform: translateY(-1px);
  border-color: rgba(17, 17, 17, 0.22);
}

.estimate-fab--icon {
  width: 50px;
  height: 50px;
  border-radius: 50%;
  background: var(--text);
  color: #fff;
  box-shadow: 0 8px 28px rgba(17, 17, 17, 0.22);
}

.estimate-fab--icon:hover {
  transform: translateY(-1px);
  box-shadow: 0 10px 32px rgba(17, 17, 17, 0.26);
}

@media (prefers-reduced-motion: reduce) {
  .estimate-fab--text:hover,
  .estimate-fab--icon:hover {
    transform: none;
  }
}
