:root {
    --ink: #17211d;
    --muted: #637069;
    --line: #d9ddd7;
    --paper: #fbfaf7;
    --surface: #ffffff;
    --accent: #0f5b46;
    --accent-soft: #e2f0ea;
    --warm: #c8945d;
    --tile-border: rgba(33, 35, 28, 0.36);
}

* {
    box-sizing: border-box;
}

body {
    margin: 0;
    color: var(--ink);
    background: var(--paper);
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}

button,
input,
select {
    font: inherit;
}

button {
    cursor: pointer;
}

.visualizer-app {
    min-height: 100vh;
    padding: 14px 24px 28px;
}

.studio {
    display: grid;
    grid-template-columns: minmax(0, 1fr) 360px;
    gap: 18px;
    align-items: start;
}

.preview-column {
    display: grid;
    gap: 8px;
    min-width: 0;
}

.stage-shell {
    display: flex;
    align-items: flex-start;
    justify-content: center;
    min-width: 0;
}

.share-panel {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    align-items: center;
}

.share-image-button {
    min-height: 44px;
    padding: 0 22px;
    color: #fff;
    background: var(--accent);
    border: 1px solid var(--accent);
    border-radius: 6px;
    font-weight: 800;
    box-shadow: 0 10px 22px rgba(15, 91, 70, 0.22);
}

.share-image-button:hover {
    background: #0b4938;
}

.social-share-buttons {
    display: flex;
    gap: 8px;
}

.social-share-buttons button {
    display: inline-grid;
    place-items: center;
    width: 44px;
    height: 44px;
    color: #fff;
    background: #171717;
    border: 1px solid #171717;
    border-radius: 50%;
    font-size: 0.82rem;
    font-weight: 900;
}

.social-share-buttons button[data-social="instagram"] {
    background: #c13584;
    border-color: #c13584;
}

.social-share-buttons button[data-social="tiktok"] {
    background: #101010;
    border-color: #101010;
}

.social-share-buttons button[data-social="x"] {
    background: #000;
    border-color: #000;
}

#shareStatus {
    color: var(--muted);
    font-size: 0.88rem;
}

.room-reference {
    display: grid;
    gap: 6px;
    width: min(100%, 760px);
    margin: 0;
}

.room-reference[hidden] {
    display: none;
}

.room-reference img {
    display: block;
    width: 100%;
    max-height: 360px;
    object-fit: cover;
    border: 1px solid rgba(18, 27, 24, 0.12);
    border-radius: 8px;
    background: #eef0ec;
}

.room-reference figcaption {
    color: var(--muted);
    font-size: 0.86rem;
}

.room-stage {
    position: relative;
    width: 70%;
    aspect-ratio: 1000 / 545;
    overflow: hidden;
    background-image: var(--room-image);
    background-position: center;
    background-size: cover;
    border: 1px solid rgba(18, 27, 24, 0.12);
    box-shadow: 0 24px 55px rgba(30, 35, 32, 0.18);
}

.floor-shadow,
.tatami-floor {
    position: absolute;
    left: 26%;
    top: 20%;
    width: 50%;
    height: 62%;
    clip-path: none;
}

.floor-shadow {
    background: rgba(0, 0, 0, 0.16);
    filter: blur(12px);
    transform: translateY(8px);
    opacity: 0.65;
}

.tatami-floor {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    grid-template-rows: repeat(6, minmax(0, 1fr));
    gap: 0;
    padding: 0;
    overflow: hidden;
    filter: none;
    transform-origin: bottom center;
}

.tatami-floor::after {
    content: "";
    position: absolute;
    inset: 0;
    background:
        linear-gradient(105deg, rgba(255, 255, 255, 0.28) 0%, transparent 31%, rgba(0, 0, 0, 0.28) 100%),
        radial-gradient(90% 75% at 8% 14%, rgba(255, 255, 255, 0.22), transparent 58%);
    mix-blend-mode: soft-light;
    pointer-events: none;
    z-index: 5;
    display: none;
}

.tatami-floor[data-layout="bed"] {
    left: 25%;
    top: 22%;
    width: 50%;
    height: 62%;
    display: grid;
    gap: 0;
    padding: 0;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    grid-template-rows: 1fr;
    clip-path: none;
}

.tatami-floor[data-layout="bed"] .tatami-tile {
    aspect-ratio: 1 / 2;
}

.tatami-floor[data-layout="six"] {
    grid-template-columns: repeat(4, minmax(0, 1fr));
    grid-template-rows: repeat(6, minmax(0, 1fr));
}

.tatami-floor[data-layout="six"] .room-six-top-left {
    grid-column: 1 / 3;
    grid-row: 1 / 3;
}

.tatami-floor[data-layout="six"] .room-six-top-right {
    grid-column: 3 / 5;
    grid-row: 1 / 3;
}

.tatami-floor[data-layout="six"] .room-six-left {
    grid-column: 1 / 2;
    grid-row: 3 / 7;
}

.tatami-floor[data-layout="six"] .room-six-center-top {
    grid-column: 2 / 4;
    grid-row: 3 / 5;
}

.tatami-floor[data-layout="six"] .room-six-center-bottom {
    grid-column: 2 / 4;
    grid-row: 5 / 7;
}

.tatami-floor[data-layout="six"] .room-six-right {
    grid-column: 4 / 5;
    grid-row: 3 / 7;
}

.room-stage[data-target="bed"] .floor-shadow {
    left: 25%;
    top: 22%;
    width: 50%;
    height: 62%;
}

.tatami-tile {
    position: relative;
    z-index: 1;
    min-width: 0;
    min-height: 0;
    overflow: hidden;
    background-color: #c7cdc6;
    border: 0;
    border-radius: 1px;
    box-shadow:
        0 2px 0 rgba(16, 42, 36, 0.28),
        0 8px 14px rgba(0, 0, 0, 0.12),
        inset 0 0 0 1px rgba(18, 24, 21, 0.08),
        inset -1px -2px 4px rgba(0, 0, 0, 0.12),
        inset 0 8px 16px rgba(255, 255, 255, 0.08),
        inset 0 -8px 14px rgba(0, 0, 0, 0.08);
}

.tatami-surface {
    position: absolute;
    inset: -6px;
    z-index: 0;
    background-image: var(--tatami-image);
    background-position: center;
    background-size: auto 42%;
    background-repeat: repeat;
}

.tatami-tile.is-horizontal .tatami-surface {
    inset: calc(-40% - 6px);
    transform: rotate(90deg) scale(1.18);
}

.tatami-tile.is-vertical .tatami-surface {
    background-size: auto 42%;
}

.tatami-floor[data-layout="bed"][data-material="Natural"] .tatami-surface {
    inset: -6px;
    background-repeat: no-repeat;
    background-size: cover;
    transform: none;
}

.tatami-floor[data-product="Ichimatsu_Deep_Green"] .tatami-surface,
.tatami-floor[data-product="Ichimatsu_Latte_Brown"] .tatami-surface,
.tatami-floor[data-product="Ichimatsu_Indigo"] .tatami-surface,
.tatami-floor[data-product="Ichimatsu_Camelia"] .tatami-surface,
.tatami-floor[data-product="Ichimatsu_01"] .tatami-surface,
.tatami-floor[data-product="Ichimatsu_02"] .tatami-surface,
.tatami-floor[data-product="Ichimatsu_03"] .tatami-surface {
    background-size: auto 26%;
}

.tatami-floor[data-product="Ichimatsu_Deep_Green"] .tatami-tile.is-horizontal .tatami-surface,
.tatami-floor[data-product="Ichimatsu_Latte_Brown"] .tatami-tile.is-horizontal .tatami-surface,
.tatami-floor[data-product="Ichimatsu_Indigo"] .tatami-tile.is-horizontal .tatami-surface,
.tatami-floor[data-product="Ichimatsu_Camelia"] .tatami-tile.is-horizontal .tatami-surface,
.tatami-floor[data-product="Ichimatsu_01"] .tatami-tile.is-horizontal .tatami-surface,
.tatami-floor[data-product="Ichimatsu_02"] .tatami-tile.is-horizontal .tatami-surface,
.tatami-floor[data-product="Ichimatsu_03"] .tatami-tile.is-horizontal .tatami-surface {
    transform: rotate(90deg) scale(1.04);
}

.tatami-tile.is-half {
    grid-column: 2;
}

.tatami-tile::before,
.tatami-tile::after {
    content: "";
    position: absolute;
    inset: 0;
    pointer-events: none;
    z-index: 2;
}

.tatami-tile::before {
    background:
        repeating-linear-gradient(
            90deg,
            rgba(255, 255, 255, 0.1) 0,
            rgba(255, 255, 255, 0.1) 1px,
            rgba(0, 0, 0, 0.045) 2px,
            transparent 5px
        ),
        repeating-linear-gradient(
            0deg,
            rgba(255, 255, 255, 0.035) 0,
            rgba(255, 255, 255, 0.035) 1px,
            transparent 11px,
            rgba(0, 0, 0, 0.045) 14px
        );
    mix-blend-mode: soft-light;
    opacity: 0.58;
}

.tatami-tile.is-horizontal::before {
    background:
        repeating-linear-gradient(
            0deg,
            rgba(255, 255, 255, 0.12) 0,
            rgba(255, 255, 255, 0.12) 1px,
            rgba(0, 0, 0, 0.045) 2px,
            transparent 5px
        ),
        repeating-linear-gradient(
            90deg,
            rgba(255, 255, 255, 0.035) 0,
            rgba(255, 255, 255, 0.035) 1px,
            transparent 11px,
            rgba(0, 0, 0, 0.045) 14px
        );
}

.tatami-tile::after {
    background:
        radial-gradient(85% 60% at 45% 42%, rgba(255,255,255,0.2), transparent 58%),
        linear-gradient(105deg, rgba(255,255,255,0.18), transparent 30%, rgba(0,0,0,0.12) 82%),
        linear-gradient(180deg, rgba(255,255,255,0.12), transparent 45%, rgba(0,0,0,0.12));
    mix-blend-mode: screen;
    opacity: 0.62;
    z-index: 3;
}

.tatami-floor[data-layout="six"] .tatami-tile::after {
    box-shadow: inset 0 0 0 1px rgba(5, 5, 5, 0.18);
}

.tatami-tile.shade-1 {
    --tile-brightness: 1.08;
    --tile-saturation: 0.96;
    --tile-contrast: 0.92;
}

.tatami-tile.shade-2 {
    --tile-brightness: 0.94;
    --tile-saturation: 1.02;
    --tile-contrast: 0.98;
}

.tatami-tile.shade-3 {
    --tile-brightness: 1.18;
    --tile-saturation: 0.88;
    --tile-contrast: 0.9;
}

.tatami-floor.has-border .tatami-tile {
    box-shadow:
        0 2px 0 rgba(23, 33, 29, 0.42),
        0 8px 14px rgba(0, 0, 0, 0.13),
        inset 0 0 0 1px rgba(18, 24, 21, 0.12),
        inset 0 8px 14px rgba(255, 255, 255, 0.07),
        inset 0 -9px 16px rgba(0, 0, 0, 0.09);
}

.tatami-floor.has-border .tatami-tile::before {
    inset: 0;
}

.tatami-floor.has-border .tatami-tile::after {
    inset: 0;
}

.tatami-floor.is-borderless .tatami-tile {
    border: 0;
}

.tatami-floor.has-border .tatami-tile .tatami-heri {
    position: absolute;
    pointer-events: none;
    z-index: 4;
    background:
        linear-gradient(90deg, rgba(255,255,255,0.1), transparent 40%, rgba(0,0,0,0.32)),
        repeating-linear-gradient(90deg, #111 0, #111 4px, #242424 4px, #242424 8px);
    box-shadow: inset 1px 0 0 rgba(255,255,255,0.12), inset -1px 0 0 rgba(0,0,0,0.38);
}

.tatami-floor.has-border .tatami-tile .tatami-heri {
    width: 5px;
    height: auto;
}

.tatami-floor[data-layout="bed"].has-border .tatami-tile .tatami-heri {
    width: 4px;
}

.tatami-floor.has-border .tatami-tile.is-vertical .tatami-heri {
    top: 0;
    bottom: 0;
}

.tatami-floor.has-border .tatami-tile.is-vertical .tatami-heri.start {
    left: 0;
}

.tatami-floor.has-border .tatami-tile.is-vertical .tatami-heri.end {
    right: 0;
}

.tatami-floor.has-border .tatami-tile.is-horizontal .tatami-heri {
    left: 0;
    right: 0;
    width: auto;
    height: 5px;
}

.tatami-floor.has-border .tatami-tile.is-horizontal .tatami-heri.start {
    top: 0;
}

.tatami-floor.has-border .tatami-tile.is-horizontal .tatami-heri.end {
    bottom: 0;
}

.selection-panel,
.catalog-tools {
    background: var(--surface);
    border: 1px solid var(--line);
    border-radius: 8px;
}

.selection-panel {
    display: flex;
    flex-direction: column;
    gap: 22px;
    padding: 24px;
}

.selection-sticky-summary {
    display: grid;
    gap: 14px;
}

.panel-kicker,
#selectedMaterial {
    margin: 0;
    color: var(--accent);
    font-size: 0.78rem;
    font-weight: 700;
    letter-spacing: 0;
    text-transform: uppercase;
}

.selection-panel h1 {
    margin: 0;
    font-size: clamp(1.7rem, 3vw, 2.5rem);
    line-height: 1.16;
    letter-spacing: 0;
}

.selected-product {
    display: grid;
    grid-template-columns: 96px 1fr;
    gap: 14px;
    align-items: center;
    min-width: 0;
    padding: 12px;
    background: #f5f7f4;
    border-radius: 8px;
}

.selected-product img {
    width: 96px;
    height: 76px;
    object-fit: cover;
    border-radius: 6px;
}

.selected-product h2 {
    margin: 4px 0 6px;
    font-size: 1.05rem;
    line-height: 1.25;
}

#selectedPrice {
    margin: 0;
    color: var(--muted);
    font-size: 0.92rem;
    white-space: pre-line;
}

.control-group {
    display: grid;
    gap: 9px;
}

.wizard-steps {
    display: grid;
    gap: 14px;
}

.recommended-styles {
    display: grid;
    gap: 8px;
}

.recommended-style-grid {
    display: grid;
    gap: 8px;
}

.recommended-style-grid button {
    display: grid;
    gap: 4px;
    min-height: 64px;
    padding: 11px 12px;
    text-align: left;
    color: var(--ink);
    background: #fffdf7;
    border: 1px solid #e3d8bf;
    border-radius: 8px;
}

.recommended-style-grid button.is-active,
.recommended-style-grid button:hover {
    color: #6d4b22;
    background: #fff4df;
    border-color: #c8945d;
}

.recommended-style-grid strong {
    font-size: 0.92rem;
}

.recommended-style-grid span {
    color: var(--muted);
    font-size: 0.78rem;
    line-height: 1.35;
}

.step-block {
    display: grid;
    gap: 9px;
    padding: 13px;
    background: #f7f7f3;
    border: 1px solid var(--line);
    border-radius: 8px;
}

.step-block strong {
    font-size: 0.95rem;
}

.step-label {
    color: var(--accent);
    font-size: 0.74rem;
    font-weight: 800;
}

.choice-row,
.choice-grid {
    display: grid;
    gap: 8px;
}

.choice-row {
    grid-template-columns: repeat(2, minmax(0, 1fr));
}

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

.choice-row button,
.choice-grid button,
.reset-button {
    min-height: 40px;
    padding: 8px 10px;
    color: var(--ink);
    background: #fff;
    border: 1px solid var(--line);
    border-radius: 6px;
}

.choice-row button.is-active,
.choice-grid button.is-active {
    color: var(--accent);
    background: var(--accent-soft);
    border-color: var(--accent);
    font-weight: 700;
}

.control-label,
.field span,
.search-field span {
    display: block;
    margin-bottom: 5px;
    color: var(--muted);
    font-size: 0.78rem;
    font-weight: 700;
}

.segmented-control {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 8px;
}

.segmented-control button {
    min-height: 42px;
    color: var(--ink);
    background: #f7f6f1;
    border: 1px solid var(--line);
    border-radius: 6px;
}

.segmented-control button.is-active,
.tatami-card.is-selected {
    color: var(--accent);
    background: var(--accent-soft);
    border-color: var(--accent);
}

.control-grid,
.catalog-tools {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 14px;
}

.core-choice-block {
    display: grid;
    gap: 8px;
}

.core-button-grid {
    display: grid;
    gap: 8px;
}

.core-button-grid button {
    display: grid;
    gap: 4px;
    min-height: 68px;
    padding: 10px;
    text-align: left;
    color: var(--ink);
    background: #fff;
    border: 1px solid var(--line);
    border-radius: 6px;
}

.core-button-grid button.is-active {
    color: var(--accent);
    background: var(--accent-soft);
    border-color: var(--accent);
}

.core-button-grid strong {
    font-size: 0.92rem;
}

.core-button-grid span {
    color: var(--muted);
    font-size: 0.78rem;
}

.core-button-grid button.is-active span {
    color: #355d50;
}

.field select,
.search-field input {
    width: 100%;
    min-height: 38px;
    color: var(--ink);
    background: #fff;
    border: 1px solid var(--line);
    border-radius: 6px;
    padding: 0 10px;
}

.catalog-tools {
    grid-template-columns: minmax(170px, 300px) 118px;
    gap: 10px;
    width: min(100%, 440px);
    margin-top: 0;
    padding: 9px;
    align-items: end;
}

.contact-cta {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: min(100%, 440px);
    min-height: 60px;
    padding: 0 24px;
    color: #fff;
    background: var(--warm);
    border: 1px solid var(--warm);
    border-radius: 8px;
    font-size: 1.08rem;
    font-weight: 800;
    text-decoration: none;
    box-shadow: 0 10px 22px rgba(200, 148, 93, 0.22);
}

.contact-cta:hover {
    background: #b5814c;
}

.back-to-visualizer {
    display: inline-flex;
    min-height: 44px;
    align-items: center;
    justify-content: center;
    margin: 0 0 18px;
    padding: 0 18px;
    color: #fff;
    background: var(--accent);
    border: 1px solid var(--accent);
    border-radius: 6px;
    font-weight: 800;
    text-decoration: none;
}

.back-to-visualizer:hover {
    background: #0b4938;
}

.mobile-sticky-quote {
    display: none;
}

#image-preview {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(170px, 220px));
    gap: 12px;
    align-items: start;
    margin-bottom: 20px;
}

#image-preview > div {
    display: grid;
    gap: 6px;
    min-width: 0;
    padding: 10px;
    text-align: center;
    background: #fff;
    border: 1px solid var(--line);
    border-radius: 8px;
}

#image-preview a {
    display: block;
}

#image-preview img {
    display: block;
    width: 100%;
    height: 120px;
    object-fit: cover;
    border-radius: 6px;
    background: #eef0ec;
}

.label-text {
    display: block;
    color: var(--muted);
    font-size: 0.82rem;
    font-weight: 700;
    line-height: 1.3;
}

.selected-highlight {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 12px;
    margin-bottom: 12px;
}

.selected-highlight div {
    padding: 12px;
    background: #fff;
    border: 1px solid var(--line);
    border-radius: 8px;
}

.selected-highlight span {
    display: block;
    margin-bottom: 5px;
    color: var(--muted);
    font-size: 0.76rem;
    font-weight: 800;
    text-transform: uppercase;
}

.selected-highlight strong {
    display: block;
    color: var(--accent);
    font-size: 1.22rem;
    line-height: 1.2;
}

.borderless-note {
    margin-bottom: 20px;
    padding: 14px;
    color: var(--accent);
    background: var(--accent-soft);
    border: 1px solid var(--accent);
    border-radius: 8px;
    font-weight: 800;
}

.estimate-form {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 14px;
}

.form-field {
    display: grid;
    gap: 6px;
}

.form-field-wide,
.submit-btn {
    grid-column: 1 / -1;
}

.form-field span {
    color: var(--muted);
    font-size: 0.82rem;
    font-weight: 800;
}

.input-field {
    width: 100%;
    min-height: 42px;
    padding: 9px 11px;
    color: var(--ink);
    background: #fff;
    border: 1px solid var(--line);
    border-radius: 6px;
}

.file-upload-control {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    align-items: center;
    min-height: 42px;
}

.file-upload-control input[type="file"] {
    position: absolute;
    width: 1px;
    height: 1px;
    overflow: hidden;
    clip: rect(0 0 0 0);
}

.file-upload-button {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 40px;
    padding: 0 14px;
    color: #fff;
    background: var(--accent);
    border-radius: 6px;
    font-size: 0.9rem;
    font-weight: 800;
    cursor: pointer;
}

.file-upload-name {
    color: var(--muted);
    font-size: 0.88rem;
}

textarea.input-field {
    min-height: 110px;
    resize: vertical;
}

.submit-btn {
    min-height: 46px;
    color: #fff;
    background: var(--accent);
    border: 1px solid var(--accent);
    border-radius: 6px;
    font-weight: 800;
}

.heri-picker {
    display: grid;
    grid-template-columns: 130px minmax(0, 1fr);
    gap: 14px;
    align-items: start;
    padding: 14px;
    background: #fff;
    border: 1px solid var(--line);
    border-radius: 8px;
}

.heri-preview-panel {
    display: grid;
    gap: 8px;
    text-align: center;
}

.heri-preview-strip {
    width: 76px;
    height: 190px;
    margin: 0 auto;
    background-color: #eee;
    background-position: center;
    background-size: cover;
    border: 3px solid #17211d;
    border-radius: 4px;
}

.heri-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(74px, 1fr));
    gap: 8px;
    max-height: 260px;
    overflow: auto;
    padding: 8px;
    background: #f7f7f3;
    border: 1px solid var(--line);
    border-radius: 6px;
}

.heri-thumb {
    display: grid;
    gap: 4px;
    min-width: 0;
    padding: 4px;
    color: var(--ink);
    background: #fff;
    border: 2px solid transparent;
    border-radius: 6px;
}

.heri-thumb.is-active {
    border-color: var(--accent);
}

.heri-thumb img {
    width: 100%;
    aspect-ratio: 1 / 1;
    object-fit: cover;
    border-radius: 4px;
}

.heri-thumb span {
    overflow: hidden;
    color: var(--muted);
    font-size: 0.68rem;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.reset-button {
    min-height: 34px;
    padding: 6px 9px;
    font-size: 0.88rem;
    background: #f7f6f1;
}

.catalog-section {
    margin-top: 2px;
}

.catalog-heading {
    display: flex;
    align-items: end;
    justify-content: space-between;
    gap: 16px;
}

.catalog-heading h2 {
    margin: 0;
    font-size: 1.28rem;
}

#resultCount {
    margin: 0;
    color: var(--muted);
}

.tatami-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(160px, 1fr));
    gap: 12px;
    margin-top: 8px;
}

.tatami-grid.is-natural-list {
    grid-template-columns: 1fr;
}

.core-preview {
    display: grid;
    grid-template-columns: 128px 1fr;
    gap: 12px;
    align-items: center;
    width: min(100%, 420px);
    margin-top: 12px;
    padding: 10px;
    background: var(--surface);
    border: 1px solid var(--line);
    border-radius: 8px;
}

.core-preview img {
    width: 128px;
    aspect-ratio: 4 / 3;
    object-fit: cover;
    border-radius: 6px;
    background: #eef0ec;
}

.core-preview p {
    margin: 0;
    color: var(--ink);
    font-size: 0.95rem;
    font-weight: 700;
}

#corePriceInfo {
    margin-top: 4px;
    color: var(--muted);
    font-size: 0.82rem;
    font-weight: 600;
    line-height: 1.35;
}

.size-note {
    width: min(100%, 520px);
    margin-top: 12px;
    padding: 14px 16px;
    color: var(--ink);
    background: #fff8ec;
    border: 1px solid #dec39c;
    border-radius: 8px;
    box-shadow: 0 10px 22px rgba(121, 88, 46, 0.08);
}

.size-note strong {
    display: block;
    margin-bottom: 8px;
    font-size: 1rem;
    color: #6d4b22;
}

.size-note p {
    margin: 5px 0 0;
    color: #4f4638;
    font-size: 0.86rem;
    line-height: 1.55;
}

.tatami-card {
    display: grid;
    gap: 8px;
    min-width: 0;
    padding: 10px;
    text-align: left;
    color: var(--ink);
    background: var(--surface);
    border: 1px solid var(--line);
    border-radius: 8px;
    transition: transform 0.18s ease, box-shadow 0.18s ease, border-color 0.18s ease;
}

.tatami-card:hover {
    transform: translateY(-2px);
    box-shadow: 0 12px 24px rgba(31, 41, 36, 0.12);
}

.tatami-card img {
    width: 100%;
    aspect-ratio: 4 / 3;
    object-fit: cover;
    border-radius: 6px;
    background: #eef0ec;
}

.tatami-card h3,
.tatami-card p {
    margin: 0;
}

.tatami-card h3 {
    font-size: 0.98rem;
    line-height: 1.28;
}

.tatami-card p {
    color: var(--muted);
    font-size: 0.82rem;
}

.tatami-card.is-natural {
    grid-column: span 1;
    grid-template-columns: minmax(220px, 280px) minmax(0, 1fr);
    align-items: stretch;
    gap: 18px;
    padding: 16px;
    background: #fbfaf5;
}

.tatami-card.is-natural img {
    height: 100%;
    min-height: 180px;
    max-height: 240px;
    aspect-ratio: 4 / 3;
}

.tatami-card.is-natural h3 {
    font-size: 1.08rem;
}

.tatami-card.is-natural .natural-description {
    margin-top: 8px;
    color: #3f463f;
    font-size: 0.84rem;
    line-height: 1.55;
}

.tatami-card.is-natural .natural-spec {
    margin-top: 7px;
    color: #1f362d;
    font-size: 0.82rem;
    font-weight: 700;
    line-height: 1.35;
}

.empty-state {
    padding: 28px;
    color: var(--muted);
    background: #fff;
    border: 1px dashed var(--line);
    border-radius: 8px;
}

@media (max-width: 980px) {
    .visualizer-app {
        padding: 18px 18px 92px;
    }

    .room-stage {
        width: 90%;
    }

    .studio {
        grid-template-columns: 1fr;
    }

    .selection-panel {
        order: 0;
        padding: 18px;
    }

    .selection-sticky-summary {
        position: static;
        margin: 0;
        padding: 0;
        background: transparent;
        border: 0;
        border-radius: 0;
        box-shadow: none;
    }

    #detailButtons {
        grid-template-columns: repeat(2, minmax(0, 1fr)) !important;
    }

    .catalog-tools {
        grid-template-columns: 1fr;
    }

    .step-block {
        padding: 10px;
        gap: 7px;
    }

    .mobile-sticky-quote {
        position: fixed;
        left: 14px;
        right: 14px;
        bottom: 14px;
        z-index: 10000;
        display: flex;
        align-items: center;
        justify-content: center;
        min-height: 56px;
        color: #fff;
        background: var(--warm);
        border: 1px solid var(--warm);
        border-radius: 999px;
        font-size: 1.02rem;
        font-weight: 900;
        text-decoration: none;
        box-shadow: 0 14px 30px rgba(97, 64, 32, 0.28);
    }

    .heri-picker {
        grid-template-columns: 82px minmax(0, 1fr);
        gap: 10px;
    }

    .heri-preview-strip {
        width: 62px;
        height: 150px;
        background-size: cover;
        background-repeat: no-repeat;
    }

    .selected-highlight {
        grid-template-columns: 1fr;
    }

    .estimate-form {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 560px) {
    .visualizer-app {
        padding: 12px 12px 90px;
    }

    .share-panel,
    .social-share-buttons {
        width: 100%;
    }

    .share-image-button,
    .contact-cta {
        width: 100%;
    }

    .social-share-buttons {
        justify-content: center;
    }

    #image-preview {
        grid-template-columns: 1fr;
    }

    .core-preview {
        grid-template-columns: 92px 1fr;
        width: 100%;
    }

    .core-preview img {
        width: 92px;
    }

    .size-note {
        width: 100%;
    }

    .tatami-card.is-natural {
        grid-column: span 1;
        grid-template-columns: 1fr;
    }

    .tatami-card.is-natural img {
        min-height: 0;
        aspect-ratio: 4 / 3;
    }

    .core-button-grid button {
        min-height: 0;
    }

    .selection-panel {
        padding: 18px;
    }

    .selection-sticky-summary {
        padding: 14px;
    }

    .control-grid {
        grid-template-columns: 1fr;
    }

    .choice-row,
    .choice-grid {
        grid-template-columns: 1fr;
    }

    #detailButtons {
        grid-template-columns: repeat(2, minmax(0, 1fr)) !important;
    }

    .selected-product {
        grid-template-columns: 78px 1fr;
    }

    .selected-product img {
        width: 78px;
        height: 64px;
    }
}
