.dhm-ikea-choice {
    --ikea-accent: #9b4119;
    --ikea-line: #dfc5b4;
    color: #322218;
    background: #fffaf6;
    border: 1px solid var(--ikea-line);
    border-radius: 18px;
    padding: clamp(16px, 3.3vw, 36px);
    margin: 32px 0;
    scroll-margin-top: 124px;
}
.dhm-ikea-choice h2 { margin: 0 0 .35em; }
.dhm-ikea-choice__layout {
    display: grid;
    grid-template-columns: minmax(0, 1.1fr) minmax(0, 1fr);
    gap: clamp(18px, 3vw, 36px);
    align-items: start;
}
.dhm-ikea-choice figure { margin: 0 0 14px; }
.dhm-ikea-choice figure > img,
.dhm-ikea-choice figure > canvas {
    display: block;
    width: 100%;
    aspect-ratio: 6 / 5;
    object-fit: contain;
    background: #f4ece2;
    border-radius: 12px;
}
.dhm-ikea-choice figcaption { margin: 8px 0 0; font-size: .82rem; line-height: 1.35; }
.dhm-ikea-material { background: #f5ece2; padding: 16px; border-radius: 12px; }
.dhm-ikea-board {
    --front-shape: polygon(0 0, 100% 0, 100% 100%, 0 100%);
    position: relative;
    width: min(93%, 420px);
    height: 68px;
    margin: 6px auto 8px;
}
.dhm-ikea-board img {
    display: block;
    width: 100%;
    height: 56px;
    object-fit: cover;
    clip-path: polygon(10% 2%, 90% 2%, 100% 100%, 0 100%);
}
.dhm-ikea-board::after {
    content: '';
    position: absolute;
    inset: 55px 0 0;
    background: linear-gradient(#0002, #0004), var(--ikea-grain, #a66e3c) center / 100% auto;
    clip-path: var(--front-shape);
}
.dhm-ikea-material[data-thickness="40_45mm"] .dhm-ikea-board { height: 76px; }
.dhm-ikea-material[data-edge="baumkante"] .dhm-ikea-board {
    --front-shape: polygon(0 8%, 9% 1%, 15% 16%, 23% 24%, 31% 10%, 43% 0, 51% 13%, 62% 15%, 72% 6%, 81% 2%, 91% 18%, 100% 12%, 100% 85%, 91% 96%, 81% 81%, 72% 86%, 62% 100%, 51% 96%, 43% 84%, 31% 89%, 23% 100%, 15% 95%, 9% 81%, 0 88%);
}
.dhm-ikea-choice fieldset { border: 0; padding: 0; min-width: 0; margin: 0 0 14px; }
.dhm-ikea-choice legend { font-size: .91rem; font-weight: 700; }
.dhm-ikea-swatches { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 7px; }
.dhm-ikea-swatches label { position: relative; display: flex; margin: 0; cursor: pointer; }
.dhm-ikea-swatches input { position: absolute; opacity: 0; width: 1px; height: 1px; }
.dhm-ikea-swatches label > span {
    display: block;
    width: 100%;
    background: #fff;
    border: 1px solid var(--ikea-line);
    border-radius: 9px;
    overflow: hidden;
}
.dhm-ikea-swatches img { display: block; width: 100%; height: auto; aspect-ratio: 1.75; object-fit: cover; }
.dhm-ikea-swatches label span span { display: block; padding: 4px 6px; font-size: .7rem; line-height: 1.24; overflow-wrap: anywhere; }
.dhm-ikea-swatches input:checked + span { border-color: var(--ikea-accent); box-shadow: inset 0 0 0 1px var(--ikea-accent); }
.dhm-ikea-swatches input:checked + span::after {
    content: '✓';
    position: absolute;
    top: 5px;
    right: 5px;
    width: 21px;
    height: 21px;
    line-height: 21px;
    text-align: center;
    color: white;
    background: var(--ikea-accent);
    border-radius: 50%;
}
.dhm-ikea-swatches input:focus-visible + span { outline: 2px solid var(--ikea-accent); outline-offset: 2px; }
.dhm-ikea-selects { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px; }
.dhm-ikea-field { min-width: 0; }
.dhm-ikea-field select { appearance: auto; background-image: none; display: block; width: 100%; margin: 4px 0 10px; }
.dhm-ikea-size { margin-bottom: 12px; }
.dhm-ikea-price strong { font-size: 1.65rem; }
.dhm-ikea-price small, .dhm-ikea-note { display: block; font-size: .83rem; }
.dhm-ikea-choice nav { border-top: 1px solid var(--ikea-line); margin-top: 20px; padding-top: 14px; }
.dhm-ikea-choice nav ul { display: flex; flex-wrap: wrap; gap: 7px 12px; list-style: none; padding: 0; margin: 5px 0 0; }
.dhm-ikea-choice nav li { margin: 0; }
.dhm-ikea-choice nav a { text-decoration: underline; text-underline-offset: 2px; }
@media (max-width: 720px) {
    .dhm-ikea-choice__layout { grid-template-columns: minmax(0, 1fr); }
    .dhm-ikea-choice__visual { display: grid; gap: 4px; }
}
@media (max-width: 405px) {
    .dhm-ikea-swatches { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}

.dhm-ikea-choice [hidden] { display: none !important; }

/* The chosen-wood preview lives in the large product gallery; the small copy only returns without a gallery. */
.dhm-ikea-choice:not(.dhm-ikea-choice--inline-visual) .dhm-ikea-choice__visual { display: none; }
.dhm-ikea-choice:not(.dhm-ikea-choice--inline-visual) .dhm-ikea-choice__layout { grid-template-columns: minmax(0, 1fr); }
.dhm-ikea-gallery-note { margin: 8px 0 0; font-size: .82rem; line-height: 1.35; color: #4a3424; }
.dhm-ikea-gallery-note[hidden] { display: none; }
.dhm-ikea-price [data-ikea-price-label] { display: block; font-size: .82rem; font-weight: 600; }
