/* ============================================================
   petendingnote.com  スタイルシート
   ============================================================ */
:root {
  --cream: #fffaf3;
  --cream-2: #fdf1e2;
  --paper: #ffffff;
  --ink: #3f3630;
  --ink-soft: #6f635b;
  --line: #ecdcc8;
  --peach: #f2b880;
  --peach-dark: #d9915a;
  --peach-deep: #b8703b;
  --green: #7aa88a;
  --green-dark: #5d8b6d;
  --rose: #e88c7d;
  --danger: #c0554a;
  --shadow: 0 8px 24px rgba(120, 80, 40, 0.10);
  --radius: 16px;
  --font-body: "Noto Sans JP", "Hiragino Sans", "Hiragino Kaku Gothic ProN", "Yu Gothic", Meiryo, sans-serif;
  --font-head: "Zen Maru Gothic", "Hiragino Maru Gothic ProN", "Noto Sans JP", sans-serif;
}

* { box-sizing: border-box; }
[hidden] { display: none !important; }
html { scroll-behavior: smooth; scroll-padding-top: 80px; }
body {
  margin: 0;
  font-family: var(--font-body);
  color: var(--ink);
  background: var(--cream);
  line-height: 1.8;
  font-size: 16px;
  -webkit-font-smoothing: antialiased;
}
img { max-width: 100%; }
a { color: var(--peach-deep); }
h1, h2, h3, h4 { font-family: var(--font-head); line-height: 1.4; margin: 0; }
.container { width: min(1100px, 100% - 32px); margin-inline: auto; }
.pc-only { display: none; }
@media (min-width: 720px) { .pc-only { display: inline; } }

/* ---------- ボタン ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 6px;
  padding: 10px 20px; border-radius: 999px; border: 2px solid transparent;
  font-family: var(--font-head); font-weight: 700; font-size: 15px; cursor: pointer;
  text-decoration: none; transition: transform .12s ease, box-shadow .12s ease, background .12s ease;
  line-height: 1.3; white-space: nowrap;
}
.btn:hover { transform: translateY(-1px); }
.btn:active { transform: translateY(0); }
.btn-primary { background: var(--peach-dark); color: #fff; box-shadow: 0 4px 14px rgba(217,145,90,.35); }
.btn-primary:hover { background: var(--peach-deep); }
.btn-outline { background: #fff; color: var(--peach-deep); border-color: var(--peach); }
.btn-outline:hover { background: var(--cream-2); }
.btn-ghost { background: transparent; color: var(--ink-soft); }
.btn-ghost:hover { background: rgba(0,0,0,.04); }
.btn-lg { padding: 14px 28px; font-size: 17px; }
.btn-sm { padding: 8px 14px; font-size: 14px; }

/* ---------- ヘッダー ---------- */
.site-header { position: sticky; top: 0; z-index: 50; background: rgba(255,250,243,.92); backdrop-filter: blur(8px); border-bottom: 1px solid var(--line); }
.header-inner { display: flex; align-items: center; justify-content: space-between; gap: 16px; padding-block: 10px; }
.brand { display: flex; align-items: center; gap: 10px; text-decoration: none; color: var(--ink); }
.brand-text { font-family: var(--font-head); font-weight: 700; font-size: 17px; display: flex; flex-direction: column; line-height: 1.2; }
.brand-text small { font-size: 11px; color: var(--ink-soft); font-weight: 500; letter-spacing: .04em; }
.site-nav { display: flex; gap: 6px; align-items: center; }
.site-nav a { text-decoration: none; color: var(--ink-soft); font-size: 14px; padding: 8px 12px; border-radius: 999px; font-weight: 500; }
.site-nav a:hover { background: var(--cream-2); color: var(--ink); }
.site-nav .nav-cta { background: var(--peach-dark); color: #fff; font-weight: 700; }
.site-nav .nav-cta:hover { background: var(--peach-deep); color: #fff; }
@media (max-width: 640px) { .site-nav a:not(.nav-cta) { display: none; } }

/* ---------- ヒーロー ---------- */
.hero { background: linear-gradient(180deg, #fff6ea 0%, var(--cream) 100%); padding-block: 48px 40px; }
.hero-inner { display: grid; grid-template-columns: 1.2fr .8fr; gap: 40px; align-items: center; }
@media (max-width: 800px) { .hero-inner { grid-template-columns: 1fr; } .hero-art { max-width: 320px; margin: 0 auto; } }
.eyebrow { display: inline-block; background: #e9f3ec; color: var(--green-dark); font-weight: 700; font-size: 13px; padding: 4px 12px; border-radius: 999px; margin: 0 0 14px; }
.hero h1 { font-size: clamp(24px, 4vw, 38px); color: var(--ink); margin-bottom: 16px; }
.lead { font-size: 17px; color: var(--ink-soft); margin: 0 0 22px; }
.hero-actions { display: flex; flex-wrap: wrap; gap: 12px; margin-bottom: 20px; }
.hero-points { list-style: none; padding: 0; margin: 0; display: flex; flex-wrap: wrap; gap: 8px 20px; font-size: 14px; color: var(--ink-soft); }
.hero-points li::before { content: "✓ "; color: var(--green-dark); font-weight: 700; }

/* ---------- セクション ---------- */
.section { padding-block: 56px; }
.section-alt { background: var(--cream-2); }
.section-title { font-size: clamp(22px, 3vw, 30px); text-align: center; margin-bottom: 14px; position: relative; }
.section-title::after { content: ""; display: block; width: 48px; height: 4px; background: var(--peach); border-radius: 4px; margin: 12px auto 0; }
.section-lead { text-align: center; color: var(--ink-soft); max-width: 760px; margin: 0 auto 32px; }
.cards { display: grid; grid-template-columns: repeat(auto-fit, minmax(230px, 1fr)); gap: 18px; }
.card { background: var(--paper); border-radius: var(--radius); padding: 24px 22px; box-shadow: var(--shadow); border: 1px solid var(--line); }
.card-icon { font-size: 30px; margin-bottom: 8px; }
.card h3 { font-size: 17px; margin-bottom: 8px; }
.card p { margin: 0; font-size: 14.5px; color: var(--ink-soft); }

.steps { list-style: none; padding: 0; margin: 0; display: grid; grid-template-columns: repeat(auto-fit, minmax(260px, 1fr)); gap: 18px; }
.step { display: flex; gap: 14px; background: var(--paper); border-radius: var(--radius); padding: 22px; border: 1px solid var(--line); }
.step-num { flex: none; width: 40px; height: 40px; border-radius: 50%; background: var(--peach-dark); color: #fff; display: grid; place-items: center; font-family: var(--font-head); font-weight: 700; font-size: 18px; }
.step h3 { font-size: 17px; margin-bottom: 6px; }
.step p { margin: 0; font-size: 14.5px; color: var(--ink-soft); }

/* ---------- ツールバー ---------- */
.toolbar { position: sticky; top: 62px; z-index: 40; display: flex; flex-wrap: wrap; justify-content: space-between; align-items: center; gap: 10px; background: var(--paper); border: 1px solid var(--line); border-radius: 14px; padding: 10px 14px; box-shadow: var(--shadow); margin-bottom: 20px; }
.toolbar-right { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; }
.save-status { font-size: 13px; color: var(--ink-soft); }
.save-status.saved { color: var(--green-dark); }
.menu { position: relative; }
.menu-list { position: absolute; right: 0; top: calc(100% + 6px); background: #fff; border: 1px solid var(--line); border-radius: 12px; box-shadow: var(--shadow); min-width: 240px; padding: 6px; z-index: 60; display: flex; flex-direction: column; }
.menu-list button, .menu-list .menu-item-label { text-align: left; background: none; border: 0; padding: 10px 12px; border-radius: 8px; cursor: pointer; font: inherit; font-size: 14px; color: var(--ink); }
.menu-list button:hover, .menu-list .menu-item-label:hover { background: var(--cream-2); }
.menu-list .danger { color: var(--danger); }

/* ---------- フォーム ---------- */
.form-layout { display: grid; grid-template-columns: 220px 1fr; gap: 24px; align-items: start; }
@media (max-width: 860px) { .form-layout { grid-template-columns: 1fr; } .form-nav { position: static !important; } }
.form-nav { position: sticky; top: 130px; background: var(--paper); border: 1px solid var(--line); border-radius: var(--radius); padding: 14px; }
.form-nav ol { list-style: none; margin: 0 0 12px; padding: 0; }
.form-nav li a { display: block; padding: 7px 10px; border-radius: 8px; text-decoration: none; color: var(--ink-soft); font-size: 13.5px; }
.form-nav li a:hover, .form-nav li a.active { background: var(--cream-2); color: var(--ink); font-weight: 600; }
.progress { height: 8px; background: var(--cream-2); border-radius: 8px; overflow: hidden; }
.progress-bar { height: 100%; width: 0; background: linear-gradient(90deg, var(--peach), var(--green)); transition: width .3s; }
.progress-text { margin: 6px 0 0; font-size: 12.5px; color: var(--ink-soft); text-align: right; }

.note-form { min-width: 0; }
.sec { border: 1px solid var(--line); background: var(--paper); border-radius: var(--radius); padding: 22px; margin: 0 0 22px; box-shadow: var(--shadow); min-width: 0; }
.sec legend { font-family: var(--font-head); font-weight: 700; font-size: 19px; padding: 0 8px; display: flex; align-items: center; gap: 10px; }
.sec-no { width: 30px; height: 30px; border-radius: 50%; background: var(--peach-dark); color: #fff; display: inline-grid; place-items: center; font-size: 15px; }
.sec-help { font-size: 13.5px; color: var(--ink-soft); background: var(--cream-2); border-left: 4px solid var(--peach); padding: 10px 14px; border-radius: 8px; margin: 8px 0 16px; }
.sub { font-size: 15px; color: var(--peach-deep); margin: 18px 0 8px; padding-bottom: 4px; border-bottom: 1px dashed var(--line); }
.grid { display: grid; grid-template-columns: 1fr 1fr; gap: 14px 18px; }
.grid-3 { grid-template-columns: 1fr 1fr 1fr; }
@media (max-width: 640px) { .grid, .grid-3 { grid-template-columns: 1fr; } }
.f { display: flex; flex-direction: column; gap: 4px; min-width: 0; }
.f-wide { grid-column: 1 / -1; }
.f label { font-size: 13.5px; font-weight: 600; color: var(--ink-soft); }
.f input, .f select, .f textarea, .calc-out {
  width: 100%; font: inherit; font-size: 15px; padding: 10px 12px; border: 1.5px solid var(--line); border-radius: 10px; background: #fffdf9; color: var(--ink); transition: border-color .12s, box-shadow .12s;
}
.f input:focus, .f select:focus, .f textarea:focus { outline: none; border-color: var(--peach-dark); box-shadow: 0 0 0 3px rgba(242,184,128,.3); background: #fff; }
.f textarea { resize: vertical; min-height: 60px; }
.f input.filled, .f select.filled, .f textarea.filled { border-color: #cfe1d5; background: #fbfdfb; }
.calc-out { display: block; background: var(--cream-2); font-weight: 700; }
.calc-result { display: grid; gap: 10px; margin: 16px 0; background: var(--cream-2); border-radius: 12px; padding: 14px 18px; }
.calc-result div { display: flex; justify-content: space-between; align-items: baseline; gap: 12px; font-size: 14.5px; }
.calc-result strong { font-family: var(--font-head); font-size: 18px; }
.calc-result .total { border-top: 1px dashed var(--peach); padding-top: 10px; }
.calc-result .total strong { font-size: 24px; color: var(--peach-deep); }
.hint { font-size: 12.5px; color: var(--ink-soft); margin: 6px 0 0; }

.pet-tabs-wrap { display: flex; flex-wrap: wrap; align-items: center; gap: 10px; margin: 0 0 14px; }
.pet-tabs { display: flex; flex-wrap: wrap; gap: 8px; }
.pet-tab { display: inline-flex; align-items: center; gap: 8px; padding: 8px 14px; border-radius: 999px; border: 2px solid var(--line); background: #fff; font-family: var(--font-head); font-weight: 700; cursor: pointer; font-size: 14px; color: var(--ink-soft); }
.pet-tab[aria-selected="true"] { border-color: var(--green); background: #e9f3ec; color: var(--green-dark); }
.pet-tab .x { border: 0; background: none; color: inherit; cursor: pointer; opacity: .6; padding: 0 2px; font-size: 16px; line-height: 1; }
.pet-tab .x:hover { opacity: 1; color: var(--danger); }

.photo-row { display: flex; gap: 18px; align-items: center; flex-wrap: wrap; margin-bottom: 16px; }
.photo-box { width: 140px; height: 140px; border-radius: 14px; border: 2px dashed var(--line); background: var(--cream-2); display: grid; place-items: center; overflow: hidden; color: var(--ink-soft); font-size: 13px; }
.photo-box img { width: 100%; height: 100%; object-fit: cover; }
.photo-ctrl { display: flex; flex-direction: column; gap: 8px; align-items: flex-start; }

.form-footer { display: flex; flex-wrap: wrap; gap: 10px; justify-content: center; padding: 8px 0 20px; }

/* ---------- FAQ ---------- */
.faq { max-width: 800px; margin: 0 auto; display: grid; gap: 10px; }
.faq details { background: var(--paper); border: 1px solid var(--line); border-radius: 12px; padding: 4px 18px; }
.faq summary { cursor: pointer; font-weight: 700; font-family: var(--font-head); padding: 12px 0; list-style: none; position: relative; padding-right: 28px; }
.faq summary::after { content: "＋"; position: absolute; right: 0; top: 12px; color: var(--peach-deep); }
.faq details[open] summary::after { content: "－"; }
.faq p { margin: 0 0 14px; font-size: 14.5px; color: var(--ink-soft); }

/* ---------- フッター ---------- */
.site-footer { background: #3f3630; color: #d9cec4; padding-block: 28px; font-size: 13px; }
.disclaimer { margin: 0 0 12px; line-height: 1.7; }
.credit { margin: 0 0 8px; font-size: 14px; }
.credit a { color: #fff; text-decoration: underline; text-underline-offset: 3px; }
.credit a:hover { color: var(--peach); }
.copyright { margin: 0; opacity: .7; }

/* ---------- トースト ---------- */
.toast { position: fixed; left: 50%; bottom: 24px; transform: translateX(-50%); background: var(--ink); color: #fff; padding: 10px 18px; border-radius: 999px; font-size: 14px; z-index: 100; box-shadow: var(--shadow); }

/* ---------- プレビュー（画面） ---------- */
.preview-overlay { position: fixed; inset: 0; z-index: 90; background: #6b625b; overflow: auto; padding: 0 0 40px; }
.preview-bar { position: sticky; top: 0; background: var(--ink); color: #fff; display: flex; justify-content: space-between; align-items: center; padding: 10px 16px; gap: 10px; flex-wrap: wrap; z-index: 2; }
.preview-bar > div { display: flex; gap: 8px; flex-wrap: wrap; }
.preview-paper { background: #fff; color: #222; width: min(210mm, 100% - 24px); margin: 20px auto; padding: 18mm 16mm; box-shadow: 0 10px 40px rgba(0,0,0,.35); font-family: var(--font-body); font-size: 11pt; line-height: 1.6; }

/* プレビュー本文 */
.pv-title { text-align: center; font-family: var(--font-head); font-size: 22pt; margin: 0 0 4px; color: var(--peach-deep); }
.pv-sub { text-align: center; font-size: 10pt; color: #666; margin: 0 0 18px; }
.pv-h2 { font-family: var(--font-head); font-size: 14pt; background: var(--cream-2); border-left: 6px solid var(--peach-dark); padding: 5px 10px; margin: 18px 0 8px; break-after: avoid; overflow: hidden; }
.pv-h3 { font-size: 11.5pt; color: var(--peach-deep); margin: 12px 0 4px; border-bottom: 1px dashed var(--line); break-after: avoid; }
.pv-pet-title { font-family: var(--font-head); font-size: 16pt; margin: 22px 0 6px; color: var(--green-dark); border-bottom: 3px solid var(--green); padding-bottom: 4px; break-after: avoid; }
.pv-table { width: 100%; border-collapse: collapse; margin: 4px 0 8px; font-size: 10pt; }
.pv-table th, .pv-table td { border: 1px solid #d8cdbd; padding: 5px 8px; vertical-align: top; text-align: left; }
.pv-table th { width: 34%; background: #fbf5ec; font-weight: 600; color: #444; }
.pv-table td { white-space: pre-wrap; word-break: break-word; }
.pv-table td.empty { color: #bbb; }
.pv-photo { float: right; width: 38mm; height: 38mm; object-fit: cover; border-radius: 6px; margin: 0 0 8px 12px; border: 1px solid #ddd; }
.pv-msg { border: 1px solid #d8cdbd; border-radius: 8px; padding: 10px 12px; white-space: pre-wrap; margin: 4px 0 10px; background: #fffdf9; min-height: 40px; }
.pv-footer { margin-top: 24px; font-size: 8.5pt; color: #777; border-top: 1px solid #ddd; padding-top: 8px; }
.pv-cost-total { font-size: 13pt; font-weight: 700; color: var(--peach-deep); }
.pv-empty { color: #bbb; }
.clearfix::after { content: ""; display: block; clear: both; }

/* ---------- 印刷 ---------- */
@media print {
  @page { size: A4; margin: 14mm 12mm; }
  body { background: #fff; }
  body.printing > *:not(.preview-overlay) { display: none !important; }
  .preview-overlay { position: static; background: #fff; padding: 0; overflow: visible; display: block !important; }
  .preview-overlay[hidden] { display: none !important; }
  .no-print { display: none !important; }
  .preview-paper { width: auto; margin: 0; padding: 0; box-shadow: none; font-size: 10.5pt; }
  .pv-table, .pv-msg { break-inside: auto; }
  tr { break-inside: avoid; }
  .pv-pet-title { break-before: page; }
  .pv-pet-title.first { break-before: auto; }
}
