/**
 * AI料金シミュレーター（/estimate/）専用CSS
 * ヘッダー・フッターは既存テーマのものを使用するため、
 * 本ページ独自のスタイルは .estimate-page 配下にスコープする。
 */
.estimate-page {
  --est-yellow: #FFC72C;
  --est-yellow-dark: #F0B400;
  --est-yellow-soft: #FBEFD0;
  --est-orange: #E89B4C;
  --est-orange-dark: #DA8836;
  --est-ink: #1f1d18;
  --est-ink-soft: #6b6657;
  --est-line: #ece8df;
  --est-bg: #faf8f2;
  --est-white: #fff;
  --est-radius: 22px;
  --est-shadow: 0 2px 4px rgba(31, 29, 24, .04), 0 14px 36px rgba(31, 29, 24, .07);
  --est-max: 720px;

  background: var(--est-bg);
  color: var(--est-ink);
  line-height: 1.8;
  font-feature-settings: "palt";
  -webkit-font-smoothing: antialiased;

  /* 固定ヘッダー分の余白（common.css の --header-height を使用） */
  padding-top: var(--header-height, 80px);
}

/* フッター直上の余白（main の margin-bottom）を打ち消す */
main:has(> .estimate-page) {
  margin-bottom: 0;
}

/* ログイン中（管理バー表示時）はバーの高さ分を加算 */
.admin-bar .estimate-page {
  padding-top: calc(var(--header-height, 80px) + 32px);
}
@media screen and (max-width: 782px) {
  .admin-bar .estimate-page {
    padding-top: calc(var(--header-height, 64px) + 46px);
  }
}

.estimate-page * {
  box-sizing: border-box;
}

.estimate-page .est-wrap {
  max-width: var(--est-max);
  margin: 0 auto;
  padding: 0 20px;
}

.estimate-page a {
  color: var(--est-ink);
  text-decoration: none;
}

/* hero */
.estimate-page .est-hero {
  text-align: center;
  padding: 60px 0 36px;
}
.estimate-page .est-hero h1 {
  font-size: 46px;
  line-height: 1.4;
  letter-spacing: -.02em;
  font-weight: 800;
}
.estimate-page .est-hero h1 .est-mark {
  background: linear-gradient(transparent 80%, rgba(255, 199, 44, .45) 80%);
  padding: 0 5px;
}
.estimate-page .est-hero p {
  margin-top: 22px;
  color: var(--est-ink-soft);
  font-size: 16px;
}
@media (max-width:560px) {
  .estimate-page .est-hero { padding: 40px 0 24px; }
  .estimate-page .est-hero h1 { font-size: 31px; }
}

/* tool card */
.estimate-page .est-tool { padding-bottom: 64px; }
.estimate-page .est-card {
  background: var(--est-white);
  border: 1px solid var(--est-line);
  border-radius: var(--est-radius);
  box-shadow: var(--est-shadow);
  overflow: hidden;
}

@keyframes est-rise {
  from { opacity: 0; transform: translateY(6px); }
  to { opacity: 1; transform: none; }
}
.estimate-page .est-intro {
  font-size: 17px;
  color: var(--est-ink);
  font-weight: 600;
  line-height: 1.8;
  margin-bottom: 14px;
}
.estimate-page .est-result {
  padding: 0 24px 24px;
  animation: est-rise .35s ease;
}
@media (max-width:560px) {
  .estimate-page .est-result { padding: 0 18px 20px; }
}
.estimate-page .est-result .est-loading {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  color: var(--est-ink-soft);
  font-size: 15.5px;
  padding: 28px 0;
}
.estimate-page .est-err {
  border: 2px solid #e7b3a3;
  background: #fdf3ef;
  border-radius: 16px;
  padding: 18px 20px;
  font-size: 16px;
  color: #9a3b22;
  line-height: 1.75;
  font-weight: 600;
}
.estimate-page .est-err span {
  display: block;
  margin-top: 6px;
  font-size: 14px;
  color: #b06a52;
  font-weight: 400;
}

/* typing */
.estimate-page .est-dots {
  display: inline-flex;
  gap: 5px;
  padding: 6px 2px;
}
.estimate-page .est-dots i {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--est-yellow);
  animation: est-blink 1.3s infinite both;
}
.estimate-page .est-dots i:nth-child(2) { animation-delay: .18s; }
.estimate-page .est-dots i:nth-child(3) { animation-delay: .36s; }
@keyframes est-blink {
  0%, 80%, 100% { opacity: .3; }
  40% { opacity: 1; }
}

/* result */
.estimate-page .est-quote {
  border: 2px solid var(--est-ink);
  border-radius: 18px;
  overflow: hidden;
  margin-top: 2px;
}
.estimate-page .est-quote .est-head {
  padding: 22px 24px 20px;
  background: var(--est-yellow-soft);
  border-bottom: 2px solid var(--est-ink);
}
.estimate-page .est-quote .est-label {
  font-size: 16px;
  letter-spacing: .08em;
  color: var(--est-ink);
  font-weight: 800;
}
.estimate-page .est-quote .est-price {
  font-size: 50px;
  font-weight: 800;
  letter-spacing: -.02em;
  line-height: 1.1;
  margin-top: 8px;
}
.estimate-page .est-quote .est-price small {
  font-size: 21px;
  font-weight: 800;
  margin: 0 3px;
}
.estimate-page .est-quote .est-range {
  font-size: 18.5px;
  color: var(--est-ink-soft);
  margin-top: 12px;
  font-weight: 700;
}
.estimate-page .est-quote .est-range b {
  color: var(--est-ink);
  font-weight: 800;
}
.estimate-page .est-quote .est-detail {
  padding: 20px 24px;
  font-size: 16.5px;
  line-height: 1.95;
  color: #34302a;
  white-space: pre-wrap;
}
.estimate-page .est-quote .est-foot {
  padding: 16px 24px 24px;
  text-align: center;
}
.estimate-page .est-copynote {
  font-size: 12.5px;
  color: var(--est-ink-soft);
  line-height: 1.7;
  margin-bottom: 14px;
}
.estimate-page .est-foot-btns {
  display: flex;
  gap: 10px;
  justify-content: center;
  flex-wrap: wrap;
}
.estimate-page .est-btn.est-ghost {
  background: #fff;
  color: var(--est-ink);
  border: 2px solid var(--est-ink);
  box-shadow: none;
}
.estimate-page .est-btn.est-ghost:hover { background: var(--est-yellow-soft); }
@keyframes est-ctaPulse {
  0%, 100% { transform: scale(1); box-shadow: 0 6px 18px rgba(232, 155, 76, .35); }
  50% { transform: scale(1.05); box-shadow: 0 12px 30px rgba(232, 155, 76, .55); }
}
.estimate-page .est-btn.est-pulse { animation: est-ctaPulse 1.5s ease-in-out infinite; }
.estimate-page .est-btn.est-pulse:hover { animation: none; transform: scale(1.06); }
@media (prefers-reduced-motion: reduce) {
  .estimate-page .est-btn.est-pulse { animation: none; }
}

/* composer */
.estimate-page .est-composer { padding: 24px 24px 18px; }
@media (max-width:560px) {
  .estimate-page .est-composer { padding: 20px 18px 16px; }
}
.estimate-page .est-composer textarea {
  width: 100%;
  border: 2px solid var(--est-line);
  border-radius: 16px;
  padding: 16px 18px;
  font-size: 17.5px;
  font-family: inherit;
  resize: none;
  min-height: 260px;
  max-height: 480px;
  line-height: 1.7;
  outline: none;
  transition: .15s;
  background: #fffefb;
  color: var(--est-ink);
}
.estimate-page .est-composer textarea::placeholder { color: #aaa494; }
.estimate-page .est-composer textarea:focus {
  border-color: var(--est-yellow);
  background: #fff;
  box-shadow: 0 0 0 4px rgba(255, 199, 44, .22);
}
/* 機密情報の注意書き */
.estimate-page .est-caution {
  margin-top: 12px;
  padding: 12px 16px;
  background: #fdf3ef;
  border: 1px solid #e7b3a3;
  border-radius: 12px;
  font-size: 13.5px;
  line-height: 1.7;
  color: #9a3b22;
  font-weight: 600;
}

/* プライバシーポリシー同意の案内（送信＝同意） */
.estimate-page .est-consent {
  margin-top: 14px;
  text-align: center;
  font-size: 13px;
  line-height: 1.7;
  color: var(--est-ink-soft);
}
.estimate-page .est-consent a {
  color: var(--est-orange-dark);
  text-decoration: underline;
  font-weight: 700;
}

.estimate-page .est-composer .est-row {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 14px;
  margin-top: 16px;
}
.estimate-page .est-btn {
  display: inline-flex;
  align-items: center;
  gap: 9px;
  background: var(--est-orange);
  color: #fff;
  font-weight: 800;
  padding: 16px 34px;
  border-radius: 999px;
  border: none;
  cursor: pointer;
  font-size: 18px;
  box-shadow: 0 6px 18px rgba(232, 155, 76, .35);
  transition: .15s;
  white-space: nowrap;
}
.estimate-page .est-btn:hover {
  background: var(--est-orange-dark);
  transform: translateY(-2px);
}
.estimate-page .est-btn:disabled {
  opacity: .45;
  cursor: not-allowed;
  transform: none;
  box-shadow: none;
}
@media (max-width:480px) {
  .estimate-page .est-composer .est-row { flex-direction: column; align-items: stretch; }
  .estimate-page .est-btn { justify-content: center; }
}

/* note */
.estimate-page .est-note {
  text-align: center;
  font-size: 15.5px;
  color: var(--est-ink-soft);
  margin-top: 16px;
}

/* post estimate */
.estimate-page #est-post { display: none; }
.estimate-page .est-section { padding: 52px 0; }
.estimate-page .est-section h2 {
  font-size: 26px;
  text-align: center;
  font-weight: 800;
  letter-spacing: -.01em;
}
.estimate-page .est-section h2 .est-mark {
  background: linear-gradient(transparent 60%, var(--est-yellow) 60%);
  padding: 0 3px;
}
.estimate-page .est-section .est-sub {
  text-align: center;
  color: var(--est-ink-soft);
  font-size: 16px;
  margin-top: 8px;
}
.estimate-page .est-examples {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 20px;
  margin-top: 30px;
}
@media (max-width:560px) {
  .estimate-page .est-examples { grid-template-columns: 1fr; gap: 16px; }
}
.estimate-page .est-ex {
  background: #fff;
  border: 1px solid var(--est-line);
  border-radius: 18px;
  overflow: hidden;
}
.estimate-page .est-ex img {
  width: 100%;
  height: 190px;
  object-fit: cover;
  display: block;
  background: #f3efe6;
}
.estimate-page .est-ex .est-in { padding: 18px 20px; }
.estimate-page .est-ex .est-tag {
  font-size: 13.5px;
  color: var(--est-ink);
  background: var(--est-yellow);
  padding: 4px 13px;
  border-radius: 999px;
  font-weight: 800;
}
.estimate-page .est-ex .est-nm {
  font-size: 19px;
  font-weight: 800;
  margin: 12px 0 7px;
  line-height: 1.5;
}
.estimate-page .est-ex .est-pr {
  font-size: 16px;
  color: var(--est-ink-soft);
}
.estimate-page .est-ex .est-pr b {
  color: var(--est-ink);
  font-size: 18px;
}
.estimate-page .est-final {
  text-align: center;
  padding: 52px 24px;
  border: 2px solid var(--est-ink);
  border-radius: var(--est-radius);
  background: var(--est-yellow-soft);
  margin-bottom: 52px;
}
.estimate-page .est-final h2 {
  font-size: 25px;
  letter-spacing: -.01em;
}
.estimate-page .est-final p {
  margin: 14px 0 26px;
  color: var(--est-ink);
  font-size: 17px;
  font-weight: 500;
  line-height: 1.85;
}

/* phone */
.estimate-page .est-phone {
  margin-top: 22px;
  text-align: center;
  border: 1px solid var(--est-line);
  background: #fff;
  border-radius: 18px;
  padding: 24px 20px;
}
.estimate-page .est-phone-label {
  font-size: 14.5px;
  font-weight: 700;
  color: var(--est-ink-soft);
}
.estimate-page .est-phone-num {
  display: inline-flex;
  align-items: center;
  gap: 9px;
  font-size: 34px;
  font-weight: 800;
  color: var(--est-ink);
  letter-spacing: .01em;
  margin: 8px 0 4px;
  line-height: 1.2;
}
.estimate-page .est-phone-num::before {
  content: "\260E";
  font-size: 26px;
}
.estimate-page .est-phone-hours {
  font-size: 14.5px;
  color: var(--est-ink-soft);
  font-weight: 600;
}
.estimate-page .est-phone-note {
  font-size: 13px;
  color: var(--est-ink-soft);
  line-height: 1.75;
  margin-top: 12px;
}
@media (max-width:480px) {
  .estimate-page .est-phone-num { font-size: 28px; }
}
