@import url('/fonts/zen-kaku-gothic-new/400.css');
@import url('/fonts/zen-kaku-gothic-new/700.css');
@import url('/fonts/biz-udpgothic/700.css');

@font-face {
  font-family: 'Property Price';
  src: url('/fonts/biz-udpgothic/files/biz-udpgothic-latin-700-normal.woff2') format('woff2');
  font-style: normal;
  font-weight: 700;
  font-display: swap;
  unicode-range: U+002C, U+002E, U+0030-0039;
  size-adjust: 175%;
}
@font-face {
  font-family: 'Property Detail Price';
  src: url('/fonts/biz-udpgothic/files/biz-udpgothic-latin-700-normal.woff2') format('woff2');
  font-style: normal;
  font-weight: 700;
  font-display: swap;
  unicode-range: U+002C, U+002E, U+0030-0039;
  size-adjust: 225%;
}
@font-face { font-family: 'Property Figures'; src: url('/fonts/biz-udpgothic/files/biz-udpgothic-latin-700-normal.woff2') format('woff2'); font-style: normal; font-weight: 400 700; font-display: swap; unicode-range: U+002C, U+002E, U+0030-0039; }

:root {
  color-scheme: light;
  --brand: #1F3A5F;
  --cta: #B4441F;
  --ink: #1A1A1A;
  --muted: #555B63;
  --canvas: #F4F5F7;
  --paper: #FFFFFF;
  --line: #E3E6EA;
  --soft-brand: #EEF1F5;
  --accent-line: #E3E6EA;
  --footer-bg: #EBEDF1;
  --danger: #A12D34;
  --banner: #9E2935;
  --on-solid: #FFFFFF;
  --input-line: #7C817F;
  --heading-font: 'Zen Kaku Gothic New', sans-serif;
  --heading-weight: 700;
  --numeric-font: 'Property Figures', 'Zen Kaku Gothic New', sans-serif;
  --strong: 700;
  --price-weight: 700;
  --radius: 8px;
  --button-radius: 8px;
  --badge-radius: 4px;
  --input-radius: 6px;
  --mark-radius: 1px;
  --gutter: 16px;
  --card-gap: 16px;
  --card-padding: 20px;
  --photo-ratio: 4 / 3;
  --card-shadow: 0 2px 2px rgb(0 0 0 / 6%);
  font-family: 'Zen Kaku Gothic New', sans-serif;
  font-size: 16px;
  line-height: 1.8;
  color: var(--ink);
  background: var(--canvas);
  -webkit-text-size-adjust: 100%;
}

*, *::before, *::after { box-sizing: border-box; }
[hidden] { display: none !important; }
body { margin: 0; min-width: 0; }
img { display: block; max-width: 100%; }
button, input, select, textarea { font: inherit; color: inherit; }
button, a, input, select, textarea { -webkit-tap-highlight-color: transparent; }
button, a { touch-action: manipulation; }
button { cursor: pointer; }
button:disabled { cursor: wait; opacity: .65; }
a { color: var(--brand); text-underline-offset: .25em; }
a:hover { text-decoration-thickness: 2px; }
:focus-visible { outline: 3px solid var(--brand); outline-offset: 4px; }
h1, h2, h3, p, dl, ul { margin-top: 0; }
h1, h2, h3 { font-family: var(--heading-font); font-weight: var(--heading-weight); line-height: 1.5; overflow-wrap: anywhere; word-break: keep-all; text-wrap: balance; }
h1 { margin-bottom: 16px; font-size: clamp(28px, 3.5vw, 40px); }
h2 { margin-bottom: 20px; font-size: 22px; }
h3 { font-size: 18px; }
p { margin-bottom: 16px; overflow-wrap: anywhere; }
fieldset { min-width: 0; margin: 0 0 24px; padding: 0; border: 0; }
legend { max-width: 100%; margin-bottom: 12px; padding: 0; font-weight: var(--strong); }
#env-banner { position: sticky; top: 0; z-index: 50; padding: 8px var(--gutter); background: var(--banner); color: var(--on-solid); text-align: center; font-size: 16px; font-weight: var(--strong); line-height: 1.6; }
.skip-link { position: fixed; top: 8px; left: 8px; z-index: 100; padding: 12px 18px; transform: translateY(-160%); background: var(--paper); color: var(--ink); }
.skip-link:focus { transform: translateY(0); }
.site-header { display: flex; align-items: center; justify-content: space-between; gap: 24px; min-height: 88px; padding: 16px max(var(--gutter), calc((100% - 1120px) / 2)); border-bottom: 1px solid var(--line); background: var(--paper); }
.brand { display: inline-flex; align-items: center; gap: 12px; min-width: 0; min-height: 44px; font-family: var(--heading-font); font-weight: var(--heading-weight); font-size: 24px; line-height: 1.5; text-decoration: none; }
.brand-mark { position: relative; flex: 0 0 28px; width: 28px; height: 32px; border: 1.5px solid var(--brand); border-radius: var(--mark-radius); }
.brand-mark::before { content: ''; position: absolute; left: 5px; top: 6px; width: 5px; height: 5px; background: var(--brand); box-shadow: 10px 0 var(--brand), 0 10px var(--brand), 10px 10px var(--brand); }
.brand-mark::after { content: ''; position: absolute; left: 10px; bottom: 0; width: 5px; height: 6px; background: var(--brand); }
.site-header nav { flex-shrink: 0; }
.site-header nav a { display: inline-flex; align-items: center; min-height: 44px; padding: 8px 0 8px 12px; font-size: 16px; font-weight: var(--strong); text-decoration: none; }
.page-shell { width: min(1120px, calc(100% - var(--gutter) * 2)); min-height: 55vh; margin: 0 auto; padding: 48px 0 72px; }
.narrow-shell { max-width: 780px; }
.page-intro { margin-bottom: 40px; padding: 8px 0 32px; border-bottom: 1px solid var(--accent-line); }
.page-intro h1 { margin-bottom: 14px; font-size: clamp(32px, 4vw, 48px); letter-spacing: .05em; }
.page-intro p:last-child { margin: 0; color: var(--muted); }
.eyebrow { margin-bottom: 12px; color: var(--brand); font-size: 16px; font-weight: var(--strong); letter-spacing: .1em; }
.mobile-break { display: none; }
.page-heading { margin: 16px 0 28px; }
.list-toolbar { display: flex; align-items: center; justify-content: space-between; gap: 24px; margin-bottom: 24px; }
.list-toolbar h2 { margin: 0; color: var(--brand); font-size: 24px; }
.deal-tabs { display: inline-flex; gap: 4px; padding: 4px; border: 1px solid var(--line); border-radius: var(--button-radius); background: var(--paper); }
.deal-tabs button { min-width: 112px; min-height: 48px; padding: 8px 20px; border: 0; border-radius: var(--button-radius); background: transparent; color: var(--muted); font-weight: 400; }
.deal-tabs button[aria-pressed='true'] { color: var(--on-solid); background: var(--brand); font-weight: var(--strong); text-decoration: underline; text-decoration-thickness: 2px; text-underline-offset: .3em; }
.deal-tabs button:hover { box-shadow: inset 0 0 0 1px var(--brand); }
#bukken-list { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); align-items: stretch; gap: var(--card-gap); }
.property-card { display: flex; flex-direction: column; min-width: 0; overflow: hidden; border: 1px solid var(--line); border-radius: var(--radius); background: var(--paper); color: var(--ink); text-decoration: none; box-shadow: var(--card-shadow); transition: border-color .2s; }
.property-card:hover { border-color: var(--brand); }
.card-media { position: relative; aspect-ratio: var(--photo-ratio); background: var(--soft-brand); }
.card-media [data-slot='photo'] { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.card-media [data-slot='madori'] { display: none; }
.card-content { display: flex; flex: 1; flex-direction: column; align-items: flex-start; min-width: 0; padding: var(--card-padding); }
.card-badges { display: flex; flex-wrap: wrap; align-items: center; gap: 8px 12px; max-width: 100%; }
.kind-badge { display: inline-block; max-width: 100%; padding: 3px 10px; border: 1px solid var(--line); border-radius: var(--badge-radius); background: var(--soft-brand); color: var(--brand); font-size: 16px; font-weight: var(--strong); overflow-wrap: anywhere; }
.kind-badge:empty, [data-slot='torihiki']:empty { display: none; }
[data-slot='torihiki'] { color: var(--muted); font-size: 16px; }
.card-content h2 { margin: 12px 0 8px; font-size: 21px; letter-spacing: .015em; }
/* 既存JSは価格を1本の文字列として挿入する。数字専用の字体で単位と大きさを分ける。 */
.card-price, .detail-price { color: var(--ink); font-family: 'Property Price', 'Zen Kaku Gothic New', sans-serif; font-size: 16px; font-weight: var(--price-weight); line-height: 3; font-variant-numeric: lining-nums tabular-nums; overflow-wrap: anywhere; }
.card-price { margin: 0 0 10px; }
.card-facts { width: 100%; margin-bottom: 12px; }
.card-station { margin-bottom: 8px; font-size: 16px; }
.card-spec { margin-bottom: 0; color: var(--muted); font-family: var(--numeric-font); font-size: 16px; line-height: 1.8; }
.card-more { display: inline-flex; align-items: center; justify-content: space-between; gap: 12px; width: 100%; min-height: 44px; margin-top: auto; padding-top: 10px; border-top: 1px solid var(--line); color: var(--brand); font-weight: var(--strong); text-decoration: underline; text-underline-offset: .25em; }
.card-more > span { font-family: sans-serif; font-size: 24px; line-height: 1; text-decoration: none; }
.state-message { padding: 32px 24px; border: 1px solid var(--line); border-radius: var(--radius); background: var(--paper); text-align: center; }
#bukken-empty { padding: 40px 0; border: 0; border-radius: 0; color: var(--muted); background: transparent; }
.loading-message { display: flex; align-items: center; justify-content: center; gap: 12px; min-height: 160px; color: var(--muted); }
.loading-message::before { content: ''; flex: 0 0 24px; width: 24px; height: 24px; border: 2px solid var(--line); border-top-color: var(--brand); border-radius: 50%; animation: spin 1s linear infinite; }
@keyframes spin { to { transform: rotate(360deg); } }
.error-message, [data-error-for] { color: var(--danger); }
.error-message { padding: 16px; border: 1px solid var(--danger); border-radius: var(--radius); background: var(--paper); }
.back-link { display: inline-flex; align-items: center; min-height: 44px; margin-bottom: 24px; font-weight: var(--strong); text-decoration: none; }
.detail-heading { margin-bottom: 28px; }
.detail-heading h1 { max-width: 30em; margin: 12px 0 4px; }
.detail-price { margin-bottom: 0; font-family: 'Property Detail Price', 'Zen Kaku Gothic New', sans-serif; line-height: 3.5; }
#summary { margin: 8px 0 0; color: var(--muted); font-family: var(--numeric-font); text-wrap: pretty; }
#summary:empty, #gallery-caption:empty { display: none; }
.gallery-wrap { position: relative; overflow: hidden; border: 1px solid var(--line); border-radius: var(--radius); background: var(--soft-brand); }
#gallery { display: flex; width: 100%; height: clamp(260px, 46vw, 520px); overflow-x: auto; overscroll-behavior-x: contain; scroll-snap-type: x mandatory; scrollbar-width: thin; scrollbar-color: var(--brand) var(--soft-brand); }
#gallery > img { flex: 0 0 100%; width: 100%; height: 100%; object-fit: contain; scroll-snap-align: center; scroll-snap-stop: always; }
#gallery-count { position: absolute; right: 16px; bottom: 20px; padding: 4px 12px; border-radius: var(--button-radius); background: var(--brand); color: var(--on-solid); font-variant-numeric: tabular-nums; pointer-events: none; }
#gallery-count:empty { display: none; }
#gallery-caption { margin: 10px 0 0; color: var(--muted); }
.gallery-guide { display: none; margin: 10px 0 0; color: var(--muted); font-size: 16px; }
.detail-page:has(#gallery > img + img) .gallery-guide { display: block; }
.detail-action { display: flex; align-items: center; justify-content: space-between; gap: 24px; margin: 28px 0 40px; padding: 24px; border: 1px solid var(--line); border-radius: var(--radius); background: var(--paper); }
.detail-action p { margin: 0; color: var(--muted); }
.detail-action .button { min-width: 260px; }
.button { display: inline-flex; align-items: center; justify-content: center; gap: 16px; min-height: 52px; padding: 12px 24px; border: 1px solid transparent; border-radius: var(--button-radius); font-size: 16px; font-weight: var(--strong); line-height: 1.5; text-align: center; text-decoration: none; }
.button:hover, #sticky-cta a:hover { filter: brightness(.92); }
.button-brand { background: var(--brand); color: var(--on-solid); }
.button-cta { background: var(--cta); color: var(--on-solid); }
.button-secondary { border-color: var(--brand); background: var(--paper); color: var(--brand); }
.detail-columns { display: grid; grid-template-columns: minmax(0, 1.25fr) minmax(0, 1fr); align-items: start; gap: 28px; }
.detail-sections { min-width: 0; }
.panel { min-width: 0; margin-bottom: 24px; padding: 28px; border: 1px solid var(--line); border-radius: var(--radius); background: var(--paper); }
.panel > :last-child { margin-bottom: 0; }
.panel h2 { padding-bottom: 16px; border-bottom: 1px solid var(--accent-line); color: var(--brand); }
.info-table { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1.4fr); margin-bottom: 0; }
.info-table dt, .info-table dd { min-width: 0; margin: 0; padding: 16px 12px; border-bottom: 1px solid var(--line); overflow-wrap: anywhere; }
.info-table dt { background: var(--soft-brand); color: var(--muted); font-weight: var(--strong); }
.info-table dd { font-family: var(--numeric-font); }
#spec { grid-template-columns: minmax(0, 1fr); }
#spec dt { padding-bottom: 6px; border-bottom: 0; overflow-wrap: normal; }
#spec dd { padding-top: 8px; padding-bottom: 20px; }
#stations { padding-left: 1.3em; }
#stations li + li { margin-top: 8px; }
#map { display: block; width: 100%; height: 280px; border: 0; border-radius: var(--radius); background: var(--canvas); }
.preserve-lines { white-space: pre-wrap; overflow-wrap: anywhere; }
.muted, .field-help, .optional-mark, .form-guide { color: var(--muted); }
.inquiry-panel { border-top: 3px solid var(--brand); }
#inquiry { scroll-margin-top: 104px; }
.field { min-width: 0; margin-bottom: 24px; }
.field > label { display: block; margin-bottom: 10px; font-weight: var(--strong); }
.required-mark, .optional-mark { display: inline-block; margin-left: 6px; font-size: 16px; font-weight: var(--strong); }
.required-mark { padding: 0 6px; border: 1px solid var(--brand); border-radius: var(--badge-radius); color: var(--brand); background: var(--soft-brand); }
input:not([type='radio']):not([type='checkbox']):not([type='hidden']), select, textarea { display: block; width: 100%; max-width: 100%; min-width: 0; min-height: 48px; padding: 10px 12px; border: 1px solid var(--input-line); border-radius: var(--input-radius); background: var(--paper); font-size: 16px; }
textarea { resize: vertical; min-height: 140px; }
input[type='radio'], input[type='checkbox'] { flex: 0 0 20px; width: 20px; height: 20px; margin: 0; accent-color: var(--brand); }
input[aria-invalid='true'], select[aria-invalid='true'], textarea[aria-invalid='true'] { border: 2px solid var(--danger); }
.field-help, [data-error-for] { margin: 8px 0 0; font-size: 16px; }
.choice-stack { display: grid; gap: 10px; }
.choice { display: flex; align-items: center; gap: 12px; min-height: 48px; padding: 10px 14px; border: 1px solid var(--input-line); border-radius: var(--input-radius); cursor: pointer; }
.choice:has(input:checked) { border-color: var(--brand); background: var(--soft-brand); outline: 1px solid var(--brand); }
.consent { margin: 20px 0; }
.consent a { display: inline-flex; align-items: center; min-height: 44px; }
#inquiry-submit { width: 100%; }
#sticky-cta { position: fixed; inset: auto 0 0; z-index: 30; display: flex; justify-content: center; gap: 16px; padding: 12px var(--gutter) calc(12px + env(safe-area-inset-bottom)); border-top: 1px solid var(--line); background: var(--paper); }
#sticky-cta a { display: inline-flex; align-items: center; justify-content: center; width: 240px; min-height: 48px; padding: 10px 20px; border: 1px solid var(--cta); border-radius: var(--button-radius); background: var(--cta); color: var(--on-solid); font-weight: var(--strong); text-align: center; text-decoration: none; }
#sticky-cta [data-cta="tel"] { border-color: var(--brand); background: var(--paper); color: var(--brand); }
body:has(#bukken:not([hidden])) { padding-bottom: calc(100px + env(safe-area-inset-bottom)); }
.result-panel { margin-top: 32px; padding: 48px 32px; text-align: center; }
.result-panel .button { margin-top: 16px; }
.prose { overflow-wrap: anywhere; }
.prose h2 { margin-top: 32px; }
.prose li { margin-bottom: 12px; }
#site-footer { display: flex; flex-wrap: wrap; align-items: center; gap: 8px 24px; margin-top: 24px; padding: 32px max(var(--gutter), calc((100% - 1120px) / 2)); border-top: 1px solid var(--line); background: var(--footer-bg); color: var(--muted); font-size: 16px; overflow-wrap: anywhere; }
#site-footer [data-company]:empty { display: none; }
#site-footer [data-company='name'] { flex-basis: 100%; color: var(--brand); font-family: var(--heading-font); font-weight: var(--heading-weight); font-size: 20px; }
#site-footer a { display: inline-flex; align-items: center; min-height: 44px; }

@media (max-width: 1050px) {
  #bukken-list { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .detail-columns { grid-template-columns: minmax(0, 1fr); }
}
@media (max-width: 600px) {
  .site-header { gap: 8px; min-height: 72px; padding: 10px var(--gutter); }
  .brand { gap: 8px; font-size: 18px; }
  .brand-mark { flex-basis: 23px; width: 23px; height: 28px; }
  .brand-mark::before { left: 4px; width: 4px; height: 4px; box-shadow: 8px 0 var(--brand), 0 8px var(--brand), 8px 8px var(--brand); }
  .brand-mark::after { left: 8px; }
  .site-header nav a { padding-left: 4px; }
  .page-shell { padding: 20px 0 48px; }
  .listing-page { padding-top: 18px; }
  .listing-page .page-intro { position: absolute; width: 1px; height: 1px; margin: -1px; padding: 0; overflow: hidden; clip-path: inset(50%); border: 0; }
  .list-toolbar { align-items: stretch; flex-direction: column; gap: 14px; margin-bottom: 20px; }
  .list-toolbar h2 { font-size: 22px; }
  .deal-tabs { width: 100%; }
  .deal-tabs button { flex: 1; min-width: 0; }
  #bukken-list { grid-template-columns: minmax(0, 1fr); }
  .card-content h2 { font-size: 20px; }
  .back-link { margin-bottom: 16px; }
  .detail-heading { margin-bottom: 20px; }
  .detail-heading h1 { font-size: 28px; }
  #gallery { height: auto; aspect-ratio: 4 / 3; }
  .panel { padding: 20px; }
  .detail-action { align-items: stretch; flex-direction: column; gap: 16px; margin: 24px 0; padding: 20px; }
  .detail-action .button { min-width: 0; width: 100%; }
  .detail-columns { gap: 8px; }
  .info-table { grid-template-columns: minmax(0, 1fr); }
  .info-table dt { padding-bottom: 6px; border-bottom: 0; }
  .info-table dd { padding-top: 8px; }
  #sticky-cta { gap: 12px; }
  #sticky-cta a { flex: 1; min-width: 0; width: auto; padding: 10px 8px; }
  .result-panel { margin-top: 16px; padding: 32px 20px; }
  .result-panel .button { width: 100%; }
  #site-footer { flex-direction: column; align-items: flex-start; gap: 4px; }
}
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation: none !important; transition: none !important; scroll-behavior: auto !important; }
}

/* B：情報の順序と数字の判読性を優先。 */
.page-intro { display: grid; grid-template-columns: 1fr auto; column-gap: 32px; align-items: end; }
.page-intro .eyebrow { grid-column: 1 / -1; }
.page-intro h1 { margin-bottom: 0; font-size: 38px; }
.page-intro > p:last-child { max-width: 22em; text-wrap: balance; }
.kind-badge { border-color: var(--brand); }
.deal-tabs { border: 0; border-bottom: 1px solid var(--line); border-radius: 0; background: transparent; padding: 0; gap: 8px; }
.deal-tabs button { border-radius: 8px 8px 0 0; border-bottom: 3px solid transparent; }
.deal-tabs button[aria-pressed='true'] { border-bottom-color: var(--brand); background: var(--soft-brand); color: var(--brand); text-decoration: none; }
.card-content { padding: 16px; }
.card-station { color: var(--ink); }
.card-facts { padding-bottom: 4px; }
@media (max-width: 600px) { .listing-page .page-intro { display: block; } }

/* 現行サイトのロゴ・電話／LINE導線に合わせる。 */
.brand-logo { flex: 0 1 auto; width: auto; height: 32px; object-fit: contain; }
.sr-only { position: absolute; width: 1px; height: 1px; margin: -1px; padding: 0; overflow: hidden; clip-path: inset(50%); white-space: nowrap; border: 0; }
.site-header nav { display: flex; flex-wrap: wrap; align-items: center; gap: 4px 12px; }
.site-header nav a { padding: 8px 0; }
.card-spec { margin-bottom: 16px; }
.card-cta { display: flex; align-items: center; justify-content: center; width: 100%; min-height: 48px; margin-top: 12px; padding: 10px 16px; border-radius: var(--button-radius); background: var(--cta); color: var(--on-solid); font-weight: var(--strong); text-align: center; }
#hitokoto { margin: 20px 0 0; padding: 14px 18px; border-left: 3px solid var(--cta); border-radius: 0 var(--badge-radius) var(--badge-radius) 0; background: var(--soft-brand); color: var(--brand); font-size: 18px; font-weight: var(--strong); line-height: 1.9; }
.contact-panel { display: grid; grid-template-columns: minmax(0, 1fr); gap: 16px; border-top: 3px solid var(--brand); }
.contact-panel > p, .contact-panel > h2 { margin-bottom: 0; }
.contact-panel [data-cta] { width: 100%; min-height: 56px; }
.contact-panel [data-cta='tel'] { border-color: var(--brand); background: var(--paper); color: var(--brand); }
#contact { scroll-margin-top: 24px; }
#site-footer > * { min-width: 0; max-width: 100%; }
#site-footer [data-company='license'], #site-footer [data-company='address'], #site-footer [data-company='tel'], #site-footer [data-company='dantai'] { color: var(--muted); }
@media (min-width: 601px) and (max-width: 1050px) {
  .contact-panel { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .contact-panel > p, .contact-panel > h2 { grid-column: 1 / -1; }
}
@media (max-width: 600px) {
  .site-header { flex-wrap: wrap; }
  .brand-logo { height: 28px; }
  .site-header nav { margin-left: auto; }
  #hitokoto { margin-top: 16px; padding: 12px 14px; }
  #sticky-cta a { min-height: 52px; }
}
