/* 町の売却相談所：紺の海＋白い家並み。CTAだけ山吹色で目立たせる */
:root {
  --bg: #f7f9fb;
  --surface: #ffffff;
  --ink: #16263a;
  --muted: #55657a;
  --line: #d9e1ea;
  --sea: #1f4e79;
  --sea-soft: #e6eef6;
  --cta: #f2b632;
  --cta-ink: #2b1d00;
  --font-display: "Zen Maru Gothic", "Hiragino Maru Gothic ProN", "Hiragino Sans", "Yu Gothic", sans-serif;
  --font-body: "Zen Kaku Gothic New", "Hiragino Sans", "Yu Gothic", "Meiryo", sans-serif;
  --step--1: 0.875rem;
  --step-0: 1rem;
  --step-1: 1.25rem;
  --step-2: 1.6rem;
  --step-3: 2.2rem;
  --radius: 10px;
}
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --bg: #0f1823; --surface: #172333; --ink: #e8eef5; --muted: #a3b2c4; --line: #2a3a4f;
    --sea: #8cb9e6; --sea-soft: #1b2c40; --cta: #f2b632; --cta-ink: #2b1d00; color-scheme: dark;
  }
}
:root[data-theme="dark"] {
  --bg: #0f1823; --surface: #172333; --ink: #e8eef5; --muted: #a3b2c4; --line: #2a3a4f;
  --sea: #8cb9e6; --sea-soft: #1b2c40; --cta: #f2b632; --cta-ink: #2b1d00; color-scheme: dark;
}

* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0; background: var(--bg); color: var(--ink);
  font-family: var(--font-body); font-size: var(--step-0); line-height: 1.85;
  padding-bottom: calc(72px + env(safe-area-inset-bottom, 0px));
}
img { max-width: 100%; height: auto; }
a { color: var(--sea); }
a:focus-visible, button:focus-visible, input:focus-visible, select:focus-visible, textarea:focus-visible {
  outline: 3px solid var(--cta); outline-offset: 2px;
}
h1, h2, h3 { font-family: var(--font-display); line-height: 1.4; text-wrap: balance; word-break: auto-phrase; margin: 0; }
h1 { font-size: var(--step-3); }
h2 { font-size: var(--step-2); }
h3 { font-size: var(--step-1); }
p { margin: 0; }

.wrap {
  width: 100%; max-width: 1080px; margin: 0 auto;
  padding-left: max(16px, env(safe-area-inset-left, 0px));
  padding-right: max(16px, env(safe-area-inset-right, 0px));
}
.prose { max-width: 40em; display: grid; gap: 1em; }

/* header */
body::before { content: ""; position: fixed; inset: 0 0 auto; height: env(safe-area-inset-top, 0px); z-index: 10; background: var(--surface); }
.site-header { position: sticky; top: env(safe-area-inset-top, 0px); z-index: 5; background: var(--surface); border-bottom: 1px solid var(--line); }
.site-header .wrap { display: flex; align-items: center; justify-content: space-between; gap: 16px; padding-block: 10px; flex-wrap: wrap; }
.brand { display: flex; align-items: center; gap: 10px; text-decoration: none; color: var(--ink); }
.brand svg { width: 40px; height: 40px; flex: none; }
.brand-name { font-family: var(--font-display); font-weight: 700; font-size: 1.15rem; line-height: 1.2; }
.brand-sub { display: block; font-size: 0.75rem; color: var(--muted); font-weight: 400; letter-spacing: 0.04em; }
.nav { display: flex; gap: 4px 18px; flex-wrap: wrap; font-size: var(--step--1); }
.nav a { color: var(--ink); text-decoration: none; padding: 4px 0; border-bottom: 2px solid transparent; }
.nav a[aria-current="page"], .nav a:hover { border-bottom-color: var(--cta); }
.header-tel { text-align: right; line-height: 1.3; }
.header-tel strong { font-family: var(--font-display); font-size: 1.3rem; color: var(--sea); font-variant-numeric: tabular-nums; }
.header-tel small { display: block; color: var(--muted); font-size: 0.75rem; }
@media (max-width: 760px) {
  .header-tel { display: none; }
  .site-header { position: static; }
  .nav { width: 100%; flex-wrap: nowrap; overflow-x: auto; white-space: nowrap; gap: 16px; scrollbar-width: none; }
}

/* buttons */
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 8px; padding: 14px 24px; border-radius: 999px; font-weight: 700; text-decoration: none; border: 0; cursor: pointer; font-size: var(--step-0); font-family: var(--font-body); }
.btn-cta { background: var(--cta); color: var(--cta-ink); }
.btn-cta:hover { filter: brightness(1.05); }
.btn-ghost { background: transparent; color: var(--sea); border: 2px solid var(--sea); }

/* hero */
.hero { background: var(--sea-soft); }
.hero .wrap { display: grid; grid-template-columns: 1.2fr 1fr; gap: 32px; align-items: center; padding-block: 48px 40px; }
.hero h1 { font-size: clamp(1.6rem, 4.2vw, 2.6rem); }
.hero h1 em { font-style: normal; color: var(--sea); }
.hero-lead { margin-top: 16px; font-size: 1.05rem; color: var(--ink); }
.hero-actions { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 24px; }
.hero-note { margin-top: 12px; font-size: var(--step--1); color: var(--muted); }
.hero-art svg { width: 100%; height: auto; display: block; }
@media (max-width: 760px) { .hero .wrap { grid-template-columns: 1fr; padding-block: 32px; } .hero-art { max-width: 240px; justify-self: center; } }

/* sections */
.section { padding-block: 56px; }
.section + .section { border-top: 1px solid var(--line); }
.section-head { display: grid; gap: 8px; margin-bottom: 28px; max-width: 40em; }
.eyebrow { font-size: 0.8rem; letter-spacing: 0.12em; color: var(--sea); font-weight: 700; }
.section-head p { color: var(--muted); }

.grid { display: grid; gap: 16px; grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); }
.card { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: 22px; display: grid; gap: 8px; align-content: start; min-width: 0; }
.card h3 { font-size: 1.1rem; }
.card p { color: var(--muted); font-size: 0.95rem; }
.card a.more { font-size: var(--step--1); font-weight: 700; }

.points { display: grid; gap: 20px; grid-template-columns: repeat(auto-fit, minmax(260px, 1fr)); counter-reset: none; }
.point { display: grid; gap: 6px; }
.point .tag { font-family: var(--font-display); font-weight: 700; color: var(--sea); font-size: 1.05rem; }

.areas { display: flex; flex-wrap: wrap; gap: 8px; }
.areas span, .areas a { background: var(--surface); border: 1px solid var(--line); padding: 6px 14px; border-radius: 999px; font-size: 0.95rem; color: var(--ink); text-decoration: none; }
.areas .home { background: var(--sea); color: var(--surface); border-color: var(--sea); }

/* page header */
.page-title { background: var(--sea-soft); }
.page-title .wrap { padding-block: 36px; display: grid; gap: 8px; }
.page-title p { color: var(--muted); max-width: 40em; }

/* steps */
.steps { list-style: none; margin: 0; padding: 0; display: grid; gap: 14px; counter-reset: step; max-width: 46em; }
.steps li { counter-increment: step; background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: 18px 20px 18px 64px; position: relative; }
.steps li::before { content: counter(step); position: absolute; left: 18px; top: 18px; width: 32px; height: 32px; border-radius: 50%; background: var(--sea); color: var(--surface); display: grid; place-items: center; font-family: var(--font-display); font-weight: 700; }
.steps h3 { font-size: 1.05rem; }
.steps p { color: var(--muted); font-size: 0.95rem; }

/* table */
.table-wrap { overflow-x: auto; }
table { border-collapse: collapse; width: 100%; min-width: 480px; background: var(--surface); font-size: 0.95rem; }
th, td { border: 1px solid var(--line); padding: 10px 14px; text-align: left; vertical-align: top; }
th { background: var(--sea-soft); font-weight: 700; white-space: nowrap; }

/* case detail */
.case { display: grid; gap: 12px; padding-block: 28px; border-bottom: 1px solid var(--line); max-width: 46em; }
.case:last-child { border-bottom: 0; }
.case ul { margin: 0; padding-left: 1.2em; color: var(--muted); }

/* profile */
.profile { display: grid; grid-template-columns: 200px 1fr; gap: 28px; align-items: start; }
.profile-photo { aspect-ratio: 3 / 4; max-width: 100%; border-radius: var(--radius); background: var(--sea-soft); border: 1px dashed var(--line); display: grid; place-items: center; color: var(--muted); font-size: var(--step--1); text-align: center; padding: 12px; }
.profile-img { width: 100%; height: auto; border-radius: var(--radius); display: block; }
.store-head { display: flex; align-items: center; gap: 28px; margin-bottom: 28px; }
.store-img { width: 300px; max-width: 100%; height: auto; border-radius: var(--radius); display: block; }
@media (max-width: 640px) { .store-head { flex-direction: column; align-items: flex-start; gap: 16px; } }
@media (max-width: 640px) { .profile { grid-template-columns: 1fr; } .profile-photo, .profile-img { max-width: 200px; } }

/* form */
.form { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: 24px; display: grid; gap: 18px; max-width: 640px; }
.field { display: grid; gap: 6px; }
.field label, .field legend { font-weight: 700; font-size: 0.95rem; }
.req { background: var(--cta); color: var(--cta-ink); font-size: 0.7rem; padding: 1px 6px; border-radius: 4px; margin-left: 6px; vertical-align: middle; }
.opt { color: var(--muted); font-size: 0.75rem; margin-left: 6px; font-weight: 400; }
input[type="text"], input[type="tel"], input[type="email"], input[type="date"], select, textarea {
  width: 100%; padding: 12px; border: 1px solid var(--line); border-radius: 8px; font: inherit; background: var(--bg); color: var(--ink);
}
fieldset { border: 0; padding: 0; margin: 0; display: grid; gap: 6px; }
.choices { display: flex; flex-wrap: wrap; gap: 8px; }
.choices label { font-weight: 400; display: inline-flex; gap: 6px; align-items: center; border: 1px solid var(--line); border-radius: 999px; padding: 6px 14px; cursor: pointer; background: var(--bg); }
.form-note { font-size: var(--step--1); color: var(--muted); }
.form-done { background: var(--sea-soft); border-radius: var(--radius); padding: 16px; }
.promise { display: grid; gap: 6px; padding: 0; margin: 0; list-style: none; }
.promise li::before { content: "✓ "; color: var(--sea); font-weight: 700; }

.split { display: grid; grid-template-columns: 1fr 1fr; gap: 32px; align-items: start; }
@media (max-width: 860px) { .split { grid-template-columns: 1fr; } }

.cta-band { background: var(--sea); color: var(--surface); }
.cta-band .wrap { padding-block: 40px; display: flex; flex-wrap: wrap; gap: 20px; align-items: center; justify-content: space-between; }
.cta-band h2 { color: var(--surface); font-size: 1.4rem; }
.cta-band p { opacity: 0.9; }
.cta-band .tel { font-family: var(--font-display); font-size: 1.6rem; font-weight: 700; font-variant-numeric: tabular-nums; color: var(--surface); text-decoration: none; }

/* footer */
.site-footer { background: var(--surface); border-top: 1px solid var(--line); font-size: var(--step--1); color: var(--muted); }
.site-footer .wrap { padding-block: 32px; display: grid; gap: 16px; grid-template-columns: 1fr auto; }
.site-footer a { color: var(--muted); }
@media (max-width: 640px) { .site-footer .wrap { grid-template-columns: 1fr; } }

/* fixed bottom bar (phone) */
.bottom-bar { position: fixed; left: 0; right: 0; bottom: 0; z-index: 6; background: var(--surface); border-top: 1px solid var(--line);
  padding: 8px max(8px, env(safe-area-inset-right, 0px)) calc(8px + env(safe-area-inset-bottom, 0px)) max(8px, env(safe-area-inset-left, 0px));
  display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; }
.bottom-bar a { display: grid; place-items: center; text-align: center; padding: 8px 4px; border-radius: 8px; font-weight: 700; font-size: 0.85rem; line-height: 1.3; text-decoration: none; }
.bottom-bar .b-tel { background: var(--sea-soft); color: var(--sea); }
.bottom-bar .b-satei { background: var(--cta); color: var(--cta-ink); }
.bottom-bar .b-visit { background: var(--sea); color: var(--surface); }
@media (min-width: 761px) { .bottom-bar { display: none; } body { padding-bottom: 0; } }

.draft-flag { background: var(--cta); color: var(--cta-ink); text-align: center; font-size: 0.8rem; padding: 4px 16px; }

@media (prefers-reduced-motion: no-preference) {
  .hero-art .whale { animation: float 6s ease-in-out infinite; transform-origin: center; }
  @keyframes float { 50% { transform: translateY(-6px); } }
}

/* 赤ペンで「強調」と指示された語句：太字＋山吹色のマーカー */
.em { font-weight: 700; background: linear-gradient(transparent 60%, color-mix(in srgb, var(--cta) 55%, transparent) 60%); color: inherit; }

.form-error { background: var(--cta); color: var(--cta-ink); padding: 8px 12px; border-radius: 8px; font-weight: 700; }
