:root {
    color-scheme: light;
    --color-navy: #1b2a4a;
    --color-navy-dark: #142038;
    --color-charcoal: #2e2e2e;
    --color-text-sub: #666666;
    --color-bg: #ffffff;
    --color-bg-soft: #f4f5f7;
    --color-navy-soft: #eef1f6;
    --color-border: #e2e2e2;
    --max-width: 1100px;
}

* {
    box-sizing: border-box;
}

body {
    margin: 0;
    padding: 0;
    font-family: "Hiragino Kaku Gothic ProN", "Hiragino Sans", "Yu Gothic Medium", "Yu Gothic", "Meiryo", sans-serif;
    line-height: 1.8;
    color: var(--color-charcoal);
    background: var(--color-bg);
}

img {
    max-width: 100%;
    height: auto;
    display: block;
}

a {
    color: var(--color-navy);
}

.container {
    max-width: var(--max-width);
    margin: 0 auto;
    padding: 0 1.5rem;
}

/* ヘッダー */
.page-header {
    background: var(--color-bg);
    border-bottom: 1px solid var(--color-border);
}

.header-inner {
    padding: 1.5rem;
}

.site-brand {
    margin: 0;
    display: flex;
    align-items: baseline;
    gap: 0.75rem;
}

.site-brand-name {
    font-size: 2rem;
    font-weight: 700;
    letter-spacing: 0.05em;
    color: var(--color-navy);
}

.site-brand-tagline {
    font-size: 1.25rem;
    font-weight: 500;
    letter-spacing: 0.05em;
    color: var(--color-text-sub);
}

.site-brand-sub {
    font-size: 0.8rem;
    color: var(--color-text-sub);
    display: none;
}

/* タイトル帯 */
.title-band {
    background: var(--color-navy);
    padding: 1.25rem 1.5rem;
}

.title-band-text {
    margin: 0;
    text-align: center;
    color: #ffffff;
    font-size: 1.1rem;
    letter-spacing: 0.4em;
    font-weight: 500;
}

/* ファーストビュー */
.hero {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 2.5rem;
    align-items: center;
    padding: 3rem 0;
}

.hero--no-photo {
    grid-template-columns: 1fr;
}

.hero-eyebrow {
    margin: 0 0 0.5rem;
    font-size: 0.75rem;
    letter-spacing: 0.15em;
    color: var(--color-text-sub);
}

.hero-title {
    margin: 0 0 0.75rem;
    font-size: 1.9rem;
    line-height: 1.5;
    font-weight: 700;
    color: var(--color-charcoal);
}

.hero-category {
    display: inline-block;
    margin: 0 0 1rem;
    padding: 0.3rem 0.9rem;
    font-size: 0.8rem;
    color: var(--color-navy);
    border: 1px solid var(--color-navy);
    border-radius: 3px;
}

.hero-address {
    margin: 0 0 1.5rem;
    font-size: 0.95rem;
}

.hero-price {
    padding-top: 1.25rem;
    border-top: 1px solid var(--color-border);
}

.hero-price-label {
    display: block;
    font-size: 0.8rem;
    color: var(--color-text-sub);
    margin-bottom: 0.35rem;
}

.hero-price-value {
    display: block;
    font-size: 2rem;
    font-weight: 700;
    color: var(--color-navy);
}

.hero-price-underline {
    display: block;
    width: 3rem;
    height: 2px;
    margin-top: 0.6rem;
    background: var(--color-navy);
}

.hero-photo {
    aspect-ratio: 4 / 3;
    overflow: hidden;
    border: 1px solid var(--color-border);
}

.hero-photo img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

/* セクション共通 */
.section {
    margin-top: 3rem;
    break-inside: avoid;
}

.section-title {
    margin: 0 0 1rem;
    padding-bottom: 0.6rem;
    border-bottom: 2px solid var(--color-navy);
    display: flex;
    align-items: baseline;
    justify-content: space-between;
}

.section-title-ja {
    font-size: 1.05rem;
    font-weight: 700;
    letter-spacing: 0.05em;
}

.section-title-en {
    font-size: 0.7rem;
    letter-spacing: 0.1em;
    color: var(--color-text-sub);
}

/* 情報テーブル */
.info-table {
    width: 100%;
    border-collapse: collapse;
}

.info-table th,
.info-table td {
    text-align: left;
    padding: 0.85rem 1rem;
    border-bottom: 1px solid var(--color-border);
    vertical-align: top;
    font-weight: normal;
    font-size: 0.92rem;
}

.info-table th {
    width: 9.5rem;
    background: var(--color-bg-soft);
    color: var(--color-text-sub);
    white-space: nowrap;
}

.info-table td {
    background: var(--color-bg);
}

/* 2カラム構成 */
.section-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 0 3rem;
}

/* 周辺図・位置図・現地写真 */
.media-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 1.5rem;
}

.media-grid--single {
    grid-template-columns: 1fr;
}

.media-grid--photos {
    grid-template-columns: repeat(3, 1fr);
}

.media-item {
    margin: 0;
}

.media-item a {
    display: block;
    aspect-ratio: 4 / 3;
    overflow: hidden;
    border: 1px solid var(--color-border);
}

.media-item a img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.media-noimage {
    aspect-ratio: 4 / 3;
    display: flex;
    align-items: center;
    justify-content: center;
    background: var(--color-bg-soft);
    border: 1px dashed var(--color-border);
    color: var(--color-text-sub);
    font-size: 0.85rem;
    letter-spacing: 0.05em;
}

.media-caption {
    margin-top: 0.5rem;
    font-size: 0.85rem;
    color: var(--color-text-sub);
}

/* 問い合わせ帯 */
.contact-band {
    margin-top: 4rem;
    padding: 2.5rem 2rem;
    background: var(--color-navy-soft);
    border: 1px solid var(--color-navy);
    border-radius: 8px;
}

.contact-inner {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: center;
    gap: 1.75rem 3rem;
}

.contact-heading {
    margin: 0;
    font-size: 1.1rem;
    font-weight: 700;
    color: var(--color-navy);
    flex: 0 0 auto;
}

.contact-body {
    flex: 0 1 auto;
    text-align: left;
}

.contact-text {
    margin: 0 0 0.5rem;
    font-size: 0.9rem;
}

.contact-phone a,
.contact-email a {
    color: var(--color-navy);
    font-weight: 700;
    text-decoration: none;
}

.contact-phone {
    margin: 0.25rem 0 0;
    font-size: 1.3rem;
}

.contact-phone-icon {
    margin-right: 0.4rem;
    color: var(--color-navy);
}

.contact-hours {
    margin: 0.35rem 0 0;
    font-size: 0.8rem;
    color: var(--color-text-sub);
}

.contact-company {
    margin: 0.5rem 0 0;
    font-size: 0.8rem;
    color: var(--color-text-sub);
}

.contact-address {
    margin: 0.15rem 0 0;
    font-size: 0.8rem;
    color: var(--color-text-sub);
}

.contact-email {
    margin: 0.25rem 0 0;
    font-size: 0.9rem;
}

.contact-actions {
    flex: 0 0 auto;
}

.contact-button {
    display: inline-block;
    padding: 0.9rem 2rem;
    background: var(--color-navy);
    color: #ffffff;
    text-decoration: none;
    font-size: 0.9rem;
    letter-spacing: 0.05em;
}

.contact-button:hover {
    background: var(--color-navy-dark);
}

/* エラー表示 */
.error-box {
    margin-top: 2rem;
    padding: 1.5rem;
    background: #fdecea;
    border: 1px solid #e2a29a;
}

.error-title {
    margin: 0 0 0.5rem;
    font-weight: 700;
    color: #a33;
}

/* フッター */
.site-footer {
    margin-top: 4rem;
    background: var(--color-navy);
    color: #ffffff;
    padding: 2.5rem 0 1.5rem;
}

.footer-inner {
    display: flex;
    flex-wrap: wrap;
    justify-content: space-between;
    align-items: flex-start;
    gap: 1.5rem;
}

.footer-brand-name {
    margin: 0;
    font-size: 1.1rem;
    font-weight: 700;
    letter-spacing: 0.05em;
}

.footer-brand-sub {
    margin: 0.25rem 0 0;
    font-size: 0.75rem;
    color: #c7cede;

}

.footer-links {
    display: flex;
    gap: 1.5rem;
    font-size: 0.8rem;
    color: #c7cede;
}

.footer-copyright {
    margin: 2rem 0 0;
    text-align: center;
    font-size: 0.7rem;
    color: #8f9ab3;
}

/* ページ上部へ戻る */
.back-to-top {
    position: fixed;
    right: 1.25rem;
    bottom: 1.25rem;
    width: 2.6rem;
    height: 2.6rem;
    display: flex;
    align-items: center;
    justify-content: center;
    background: var(--color-navy);
    color: #ffffff;
    text-decoration: none;
    font-size: 1rem;
    border-radius: 50%;
}

.back-to-top:hover {
    background: var(--color-navy-dark);
}

/* デバッグ表示 */
.debug-section {
    margin-top: 3rem;
    padding-bottom: 3rem;
}

.debug-title {
    font-size: 0.85rem;
    color: var(--color-text-sub);
}

.debug-json {
    background: #1e1e1e;
    color: #d4d4d4;
    padding: 1rem;
    overflow-x: auto;
    font-size: 0.8rem;
    border-radius: 4px;
}

/* レスポンシブ（スマートフォン） */
@media (max-width: 768px) {
    .header-inner {
        padding: 1rem 1.25rem;
    }

    .title-band {
        padding: 1rem 1.25rem;
    }

    .title-band-text {
        font-size: 0.95rem;
        letter-spacing: 0.25em;
    }

    .container {
        padding: 0 1.25rem;
    }

    .hero {
        grid-template-columns: 1fr;
        padding: 2rem 0;
        gap: 1.5rem;
    }

    .hero-photo {
        order: -1;
    }

    .hero-title {
        font-size: 1.5rem;
    }

    .hero-price-value {
        font-size: 1.6rem;
    }

    .section-grid {
        grid-template-columns: 1fr;
        gap: 0;
    }

    .info-table th {
        width: 7.5rem;
        font-size: 0.85rem;
    }

    .info-table td {
        font-size: 0.85rem;
    }

    .media-grid,
    .media-grid--photos {
        grid-template-columns: 1fr;
    }

    .contact-band {
        padding: 1.5rem;
    }

    .contact-inner {
        flex-direction: column;
        align-items: center;
        text-align: center;
    }

    .contact-body {
        text-align: center;
    }

    .contact-actions {
        width: 100%;
    }

    .contact-button {
        display: block;
        text-align: center;
    }

    .footer-inner {
        flex-direction: column;
    }
}

/* 印刷対応 */
@media print {
    body {
        background: #ffffff;
        color: #000000;
    }

    .back-to-top,
    .contact-actions,
    .debug-section {
        display: none !important;
    }

    .title-band {
        background: #222222 !important;
        -webkit-print-color-adjust: exact;
        print-color-adjust: exact;
    }

    .info-table th {
        background: #eeeeee !important;
        -webkit-print-color-adjust: exact;
        print-color-adjust: exact;
    }

    .section-grid {
        display: block;
    }

    .section {
        break-inside: avoid;
    }

    .info-table tr,
    .media-item {
        break-inside: avoid;
    }

    .media-grid {
        grid-template-columns: repeat(2, 1fr);
    }

    .media-grid--photos {
        grid-template-columns: repeat(3, 1fr);
    }

    .site-footer {
        background: #ffffff !important;
        color: #000000;
        border-top: 1px solid #000000;
    }

    .footer-links {
        color: #000000;
    }

    .footer-copyright {
        color: #000000;
    }

    a {
        color: inherit;
        text-decoration: none;
    }
}