/* ─── 寸法図ページ（size.html）───────────────────────────────
   図面（ミラー寸法図.pdf：アーチ正面・スクエア正面・両面側面・片面側面）の寸法を、
   暗い面に金の細線で描いた図と、大きな数字・表でまとめる。
   図はSVGをmm単位の座標で直接描いているので、比率は図面どおり。
   4面は viewBox の幅（--vw）を列の比にして並べ、どの図も同じ縮尺に揃える。 */

.size-hero {
    padding: clamp(128px, 14vw, 200px) var(--gutter) clamp(48px, 7vw, 88px);
}

.size-hero-inner {
    max-width: 760px;
}

.size-eyebrow {
    font-family: var(--font-display, var(--font-serif));
    font-size: 11px;
    letter-spacing: 0.32em;
    text-transform: uppercase;
    color: var(--accent-deep);
}

.size-hero-title {
    font-family: var(--font-serif);
    font-size: clamp(40px, 5.4vw, 68px);
    font-weight: 300;
    line-height: 1.15;
    letter-spacing: 0.01em;
    color: var(--dark);
    margin-top: 20px;
}

.size-hero-title em {
    font-style: normal;
    display: block;
    color: var(--accent-deep);
}

.size-hero-lead {
    margin-top: 28px;
    font-size: 15px;
    font-weight: 300;
    line-height: 1.9;
    letter-spacing: 0.03em;
    color: var(--silver);
    max-width: 520px;
}

/* ── 図面（暗い面に金の線） ── */
.size-drawing {
    background: #1c1813;
    color: #efe4d2;
    padding: clamp(56px, 8vw, 110px) var(--gutter);
}

.size-drawing-inner {
    max-width: 1180px;
    margin: 0 auto;
}

.size-drawing-head {
    display: flex;
    justify-content: space-between;
    align-items: baseline;
    gap: 24px;
    flex-wrap: wrap;
    padding-bottom: 20px;
    border-bottom: 1px solid rgba(214, 186, 140, 0.22);
}

.size-drawing-title {
    font-family: var(--font-serif);
    font-weight: 300;
    font-size: clamp(22px, 2.6vw, 30px);
    letter-spacing: 0.04em;
}

.size-drawing-meta {
    font-size: 11px;
    letter-spacing: 0.18em;
    color: rgba(239, 228, 210, 0.55);
}

.size-views {
    display: grid;
    grid-template-columns: 1120fr 1240fr 920fr 600fr;
    gap: clamp(16px, 2.4vw, 40px);
    margin-top: clamp(32px, 5vw, 56px);
    align-items: end;
}

.size-view {
    margin: 0;
    min-width: 0; /* SVG の既定幅で列が押し広げられ、スマホで横にはみ出すのを防ぐ */
}

.size-view svg {
    display: block;
    width: 100%;
    height: auto;
    max-height: 78vh;
}

.size-view figcaption {
    margin-top: 16px;
    text-align: center;
    font-size: 11px;
    letter-spacing: 0.28em;
    color: rgba(239, 228, 210, 0.6);
}

/* SVG の線と文字（座標はmm。線幅も mm 基準なので細く見える値にしている） */
.dw-body { fill: none; stroke: #efe4d2; stroke-width: 4; }
.dw-thin { fill: none; stroke: rgba(239, 228, 210, 0.55); stroke-width: 2.5; }
.dw-led  { fill: none; stroke: #d6ba8c; stroke-width: 3; stroke-dasharray: 18 10; }
.dw-fill { fill: rgba(239, 228, 210, 0.06); stroke: #efe4d2; stroke-width: 3; }
.dw-logo { fill: rgba(214, 186, 140, 0.12); stroke: #d6ba8c; stroke-width: 3; stroke-dasharray: 10 8; }
.dw-floor { stroke: rgba(239, 228, 210, 0.35); stroke-width: 3; }
.dw-dim  { stroke: #d6ba8c; stroke-width: 2.5; }
.dw-ext  { stroke: rgba(214, 186, 140, 0.45); stroke-width: 2; stroke-dasharray: 6 8; }
.dw-tick { stroke: #d6ba8c; stroke-width: 3; }
.dw-wall { fill: rgba(239, 228, 210, 0.08); stroke: rgba(239, 228, 210, 0.45); stroke-width: 2.5; }
.dw-outlet { fill: rgba(214, 186, 140, 0.18); stroke: #d6ba8c; stroke-width: 3; }
.dw-num  {
    fill: #f3e7d3;
    font-family: 'Inter', sans-serif;
    font-size: 46px;
    font-weight: 300;
    letter-spacing: 1px;
}
.dw-num.small { font-size: 40px; }
.dw-lbl  {
    fill: rgba(239, 228, 210, 0.62);
    font-family: 'Zen Kaku Gothic New', sans-serif;
    font-size: 36px;
    letter-spacing: 2px;
}

/* 線を描くように出す（動きを減らす設定では出さない） */
@media (prefers-reduced-motion: no-preference) {
    .size-view .dw-body,
    .size-view .dw-thin,
    .size-view .dw-fill {
        stroke-dasharray: 6000;
        stroke-dashoffset: 6000;
        animation: dwDraw 2.4s cubic-bezier(0.22, 0.61, 0.36, 1) 0.2s forwards;
    }
}

@keyframes dwDraw {
    to { stroke-dashoffset: 0; }
}

/* ── 大きな数字 ── */
.size-keys {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    margin-top: clamp(40px, 6vw, 72px);
    border-top: 1px solid rgba(214, 186, 140, 0.22);
}

.size-key {
    padding: 28px 20px 8px 0;
}

.size-key + .size-key {
    padding-left: 20px;
    border-left: 1px solid rgba(214, 186, 140, 0.22);
}

.size-key-label {
    font-size: 11px;
    letter-spacing: 0.22em;
    color: rgba(239, 228, 210, 0.6);
}

.size-key-num {
    margin-top: 10px;
    font-family: var(--font-display, var(--font-serif));
    font-weight: 300;
    font-size: clamp(34px, 4.6vw, 60px);
    line-height: 1;
    color: #f3e7d3;
}

.size-key-sub {
    font-size: 0.6em;
    color: rgba(243, 231, 211, 0.7);
}

.size-key-num small {
    font-size: 0.32em;
    margin-left: 4px;
    letter-spacing: 0.1em;
    color: #d6ba8c;
}

/* ── 寸法表 ── */
.size-table-section {
    padding: clamp(56px, 8vw, 110px) var(--gutter);
    background: var(--ivory);
}

.size-table-inner {
    max-width: 880px;
    margin: 0 auto;
}

.size-section-title {
    font-family: var(--font-serif);
    font-weight: 300;
    font-size: clamp(24px, 2.8vw, 34px);
    color: var(--dark);
    letter-spacing: 0.03em;
}

.size-table {
    width: 100%;
    margin-top: 28px;
    border-collapse: collapse;
    font-size: 15px;
}

.size-table th,
.size-table td {
    padding: 18px 8px;
    border-bottom: 1px solid var(--border, rgba(36, 31, 25, 0.12));
    text-align: left;
    vertical-align: top;
    font-weight: 400;
}

.size-table th {
    width: 38%;
    color: var(--silver);
    font-size: 13px;
    letter-spacing: 0.06em;
}

.size-table td {
    color: var(--dark);
}

.size-table td strong {
    font-family: var(--font-display, var(--font-serif));
    font-weight: 400;
    font-size: 20px;
    letter-spacing: 0.02em;
}

.size-table td > span {
    display: block;
    margin-top: 4px;
    font-size: 12.5px;
    color: var(--silver);
    line-height: 1.7;
}

.size-notes {
    margin-top: 36px;
    padding: 22px 24px;
    border-left: 2px solid var(--accent);
    background: rgba(176, 138, 78, 0.06);
    font-size: 13.5px;
    line-height: 1.95;
    color: var(--silver);
}

.size-notes li {
    list-style: none;
}

.size-cta {
    margin-top: 44px;
    display: flex;
    gap: 14px;
    flex-wrap: wrap;
}

.size-cta a {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    padding: 16px 28px;
    font-size: 14px;
    letter-spacing: 0.08em;
    text-decoration: none;
    transition: opacity 0.25s, background 0.25s;
}

.size-cta .is-primary {
    background: var(--dark);
    color: var(--ivory);
}

.size-cta .is-secondary {
    border: 1px solid var(--dark);
    color: var(--dark);
}

.size-cta a:hover {
    opacity: 0.85;
}

/* 4面を1列に並べると文字が小さくなりすぎる幅では、正面2つ・側面2つの2段にする */
@media (max-width: 1099.98px) {
    .size-views {
        grid-template-columns: 1120fr 1240fr;
        row-gap: clamp(40px, 6vw, 64px);
    }

    .size-view.is-side:nth-child(3) { grid-column: 1; }
    .size-view.is-side:nth-child(4) { grid-column: 2; }

    /* 側面図は上段の正面図と同じ縮尺になるよう、viewBox の幅の比で細くする */
    .size-view.is-side:nth-child(3) svg { width: 82.1%; margin: 0 auto; }  /* 920 / 1120 */
    .size-view.is-side:nth-child(4) svg { width: 48.4%; margin: 0 auto; }  /* 600 / 1240 */
}

/* ── スマホ・ラージフォン ── */
@media (max-width: 833.98px) {

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

    .size-key:nth-child(3) {
        padding-left: 0;
        border-left: none;
    }

    .size-key:nth-child(n + 3) {
        border-top: 1px solid rgba(214, 186, 140, 0.22);
    }

    .size-table th {
        width: 42%;
    }

    .size-table td strong {
        font-size: 18px;
    }
}

/* リード文・寸法表の補足・注記は文節ごとの塊（.ph）で書いている。Safari は
   word-break: auto-phrase に対応しておらず、1文字単位で折り返して「検／討」「フ／レーム」
   のように語の途中で切れていた。塊を inline-block にして、文節の切れ目でだけ折り返させる。 */
.ph {
    display: inline-block;
}

/* 小さい画面（iPhone SE など）では見出しの2行目「測れるように。」が1行に入らず、
   「測れるよ／うに。」と切れていたので一回り小さくする */
@media (max-width: 599.98px) {
    .size-hero-title {
        font-size: 34px;
    }

    /* 2段組みで図が縮むぶん、図中の数字と注記を大きくして読めるようにする */
    .dw-num { font-size: 72px; }
    .dw-num.small { font-size: 60px; }
    .dw-lbl { font-size: 54px; letter-spacing: 1px; }
    .size-view figcaption { font-size: 10px; letter-spacing: 0.16em; }
}
