:root {
--paper: #faf8f2;
--ink: #292b24;
--line: #d8d3c6;
--bronze: #7e7059;
--surface: #ffffff;
}

* {
box-sizing: border-box;
}

body {
margin: 0;
background: var(--paper);
color: var(--ink);
font: 15px/1.5 Arial, sans-serif;
}

header {
padding: 12px 5%;
border-bottom: 1px solid var(--line);
}

.brand-link {
display: inline-block;
}

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

main {
max-width: 1560px;
margin: auto;
padding: 27px 5% 40px;
}

h1 {
font: clamp(42px, 5vw, 72px)/1.06 Georgia, serif;
margin: 0;
}

.intro {
font: italic clamp(18px, 2.2vw, 27px) Georgia, serif;
margin: 8px 0 24px;
}

.layout {
display: grid;
grid-template-columns: minmax(0, 2fr) minmax(290px, 1fr);
gap: 26px;
align-items: start;
}

figure.stage {
position: relative;
margin: 0;
background: #eee8dc;
overflow: hidden;
}

figure.stage img,
figure.stage canvas {
width: 100%;
height: auto;
display: block;
}

.scene-wrap {
position: relative;
width: 100%;
}

.kitchen-ratio {
aspect-ratio: 1376 / 768;
}

.detail-ratio {
aspect-ratio: 1920 / 1072;
}

figure.stage .island-layer {
position: absolute;
top: 0;
left: 0;
width: 100%;
height: 100%;
transform-origin: 0 0;
pointer-events: none;
transition: transform 0.12s ease-out;
}

[hidden] {
display: none !important;
}

figcaption {
font-size: 12px;
margin: 6px 0;
color: #5d584c;
}

.views {
display: flex;
gap: 6px;
align-items: center;
margin-bottom: 8px;
}

.views button {
min-width: 104px;
font: 16px Georgia, serif;
}

.views button:disabled {
opacity: 0.45;
cursor: not-allowed;
}

#view-note {
font-size: 12px;
color: #5d584c;
}

.presets,
.switch {
display: flex;
gap: 6px;
}

.presets {
border-top: 1px solid var(--line);
padding-top: 10px;
flex-wrap: wrap;
}

button,
select,
input {
font: inherit;
color: inherit;
}

button {
min-height: 42px;
cursor: pointer;
background: transparent;
border: 1px solid var(--line);
padding: 7px 10px;
}

button[aria-pressed="true"] {
background: #ebe5d9;
border-color: var(--bronze);
box-shadow: inset 0 0 0 1px var(--bronze);
}

button:focus-visible,
select:focus-visible,
input:focus-visible {
outline: 2px solid #705525;
outline-offset: 2px;
}

.panel {
border-left: 1px solid var(--line);
padding-left: 20px;
}

.switch button {
flex: 1;
font: 17px Georgia, serif;
padding-inline: 5px;
}

.swatches {
margin-top: 14px;
display: grid;
grid-template-columns: repeat(3, minmax(0, 1fr));
gap: 7px;
}

.swatches button {
background: var(--surface);
display: flex;
flex-direction: column;
align-items: center;
justify-content: space-between;
gap: 5px;
padding: 6px 4px;
font-size: 12px;
line-height: 1.2;
}

.swatches img {
height: clamp(55px, 8vw, 106px);
width: 100%;
object-fit: contain;
}

.profile-tag {
font-size: 11px;
color: #5d584c;
}

.hardware {
display: grid;
gap: 12px;
margin-top: 14px;
}

.hw-group-label {
font-size: 12px;
font-weight: bold;
text-transform: uppercase;
letter-spacing: 0.04em;
color: #5d584c;
margin-bottom: 5px;
display: block;
}

.hw-style-toggle {
display: grid;
grid-template-columns: 1fr 1fr;
gap: 6px;
}

.hw-style-toggle button {
background: var(--surface);
font-size: 13px;
line-height: 1.25;
}

.hw-grid {
display: grid;
grid-template-columns: repeat(3, minmax(0, 1fr));
gap: 6px;
}

.hw-grid button {
background: var(--surface);
display: flex;
flex-direction: column;
align-items: center;
justify-content: space-between;
gap: 4px;
padding: 6px 4px;
font-size: 11px;
line-height: 1.2;
}

.hw-grid img {
width: 100%;
height: 54px;
object-fit: contain;
}

.hardware p {
font-size: 12px;
margin: 0;
color: #5d584c;
}

dl {
border-block: 1px solid var(--line);
padding: 9px 0;
margin: 14px 0;
display: grid;
grid-template-columns: auto 1fr;
gap: 4px 12px;
font-size: 13px;
}

dt {
font-weight: bold;
}

dd {
margin: 0;
}

.match {
margin-top: 12px;
border-radius: 3px;
font-size: 14px;
width: 100%;
}

.match:disabled {
opacity: 0.6;
cursor: default;
}

@media (max-width: 740px) {
main {
padding: 18px 4% 28px;
}

header {
padding: 6px 4%;
}

header img {
width: 166px;
}

.layout {
display: block;
}

.panel {
border: 0;
padding: 0;
margin-top: 10px;
}

.preview {
position: sticky;
top: 0;
z-index: 1;
background: var(--paper);
padding-bottom: 6px;
}

figure.stage .kitchen-ratio {
max-width: calc(42vh * 1376 / 768);
margin: 0 auto;
}

figure.stage .detail-ratio {
max-width: calc(42vh * 1920 / 1072);
margin: 0 auto;
}

figcaption {
font-size: 10px;
}

.presets button {
font-size: 12px;
min-height: 36px;
}

.swatches img {
height: 75px;
}
}

@media (min-width: 741px) and (min-height: 650px) {
.preview {
position: sticky;
top: 12px;
}
}
