/* Scoped discovery UI. Physical spatial relations never mirror in RTL. */
.discovery-shell{--d-ink:#35483d;--d-sage:#d7e5d5;--d-paper:#fffdf4;--d-line:#bdc8b5;--d-accent:#275c49;color:var(--d-ink);font-size:1rem}
.discovery-shell *{box-sizing:border-box}
.discovery-shell button,.discovery-versions button{min-height:44px;touch-action:manipulation;line-height:1.5}
.discovery-shell button:focus-visible,.discovery-shell select:focus-visible,.discovery-shell summary:focus-visible,.discovery-versions button:focus-visible{outline:3px solid #255eae;outline-offset:4px}
.discovery-versions{display:flex;flex-wrap:wrap;gap:.5rem;margin-block:1rem}
.discovery-versions [aria-pressed=true]{background:#315f4d;color:#fff}
.discovery-settings{display:grid;grid-template-columns:repeat(auto-fit,minmax(min(100%,175px),1fr));gap:.75rem}
.discovery-picker{display:flex;flex-direction:column;gap:.35rem;font-weight:650;min-width:0}
.discovery-picker select{width:100%;min-width:0;max-width:100%;min-height:46px;border:1px solid var(--d-line);border-radius:12px;padding:.55rem .65rem;background:var(--d-paper);color:inherit;font:inherit;font-weight:500}
.discovery-round-line{display:flex;justify-content:space-between;gap:1rem;margin-block:1rem}
.discovery-requests{background:#f0f3e8;border:1px solid var(--d-line);border-radius:18px;padding:.75rem;margin-block-end:1rem}
.discovery-shell h4{font-size:1rem;margin:0 0 .5rem}
.discovery-requests ul{list-style:none;display:flex;flex-wrap:wrap;gap:.6rem;padding:0;margin:0}
.discovery-requests li{display:flex;align-items:center;gap:.45rem;max-width:100%;background:var(--d-paper);border:2px solid transparent;border-radius:12px;padding:.3rem .6rem}
.discovery-requests li>img,.discovery-request img{width:48px;height:48px;object-fit:contain;flex:none}
.discovery-requests .is-complete{background:#d7e5d5;border-color:#6c9b7b}
.discovery-request{display:flex;align-items:center;gap:.5rem;background:none!important;border:0!important;padding:0!important;text-align:start;color:inherit;max-width:100%}
.discovery-request span{overflow-wrap:anywhere}
.discovery-scene{position:relative;isolation:isolate;overflow:hidden;min-height:360px;border-radius:22px;border:1px solid #b8b9a4;background:#f2e7cf;box-shadow:inset 0 0 20px #6f6a4214}
.discovery-backdrop{position:absolute;inset:0;width:100%;height:100%;object-fit:cover;z-index:-1;pointer-events:none}
.discovery-object-layers{position:relative;display:grid;grid-template-columns:repeat(4,minmax(0,1fr));gap:clamp(12px,2.5vw,28px);padding:clamp(20px,4vw,48px);align-items:center;min-height:360px}
.discovery-picture{position:relative;display:flex;flex-direction:column;align-items:center;justify-content:center;gap:.2rem;width:100%;min-width:0;background:#fffdf0ec!important;border:2px solid #c9c5ad!important;border-radius:18px!important;padding:.35rem!important;color:var(--d-ink)!important;box-shadow:0 5px 10px #56412720}
.discovery-picture img{width:min(100%,105px);height:95px;object-fit:contain;pointer-events:none;filter:drop-shadow(0 3px 2px #776d5b16)}
.discovery-name{font-size:.88rem;line-height:1.4;overflow-wrap:anywhere;max-width:100%;font-weight:600;text-align:center}
.discovery-picture.is-selected{border-color:#315f4d!important;background:#e7f0e2!important;box-shadow:0 0 0 3px #315f4d33}
.discovery-picture.is-collected{background:#e0ebdacc!important;border-color:#779985!important;box-shadow:none}
.discovery-picture.is-collected img{opacity:.6}
.discovery-check{position:absolute;inset-block-start:3px;inset-inline-end:3px;background:#315f4d;color:#fff;border-radius:50%;width:26px;height:26px;display:grid;place-items:center}
.discovery-shell .is-hinted{outline:4px dashed #b16b17;outline-offset:3px}
.discovery-list{margin-block:1rem}
.discovery-shell summary{padding:.7rem;cursor:pointer;font-weight:650}
.discovery-picture-grid{display:grid;grid-template-columns:repeat(6,minmax(0,1fr));gap:.65rem;margin-block:.7rem}
.discovery-list-picture img{height:80px}
.discovery-selection{display:flex;align-items:center;flex-wrap:wrap;gap:.5rem;padding:.6rem .8rem;border:1px solid var(--d-line);border-radius:14px;background:#fbf7ea;margin-block:1rem;min-height:66px}
.discovery-selection img{width:48px;height:48px;object-fit:contain}
.discovery-selection button{margin-inline-start:auto}
.discovery-status{min-height:3em;margin-block:1rem;color:#365e48;font-weight:600;line-height:1.6}
.discovery-actions,.discovery-ways{display:flex;flex-wrap:wrap;gap:.5rem}
.discovery-ways{border:0;padding:0;margin-block:1.2rem}
.discovery-ways legend{font-weight:650;margin-block-end:.5rem}
.discovery-ways [aria-pressed=true]{background:#e2eddf;border-color:#315f4d}
.discovery-shell #discovery-help{padding:.25rem .7rem;background:#f3f1e8;border-radius:14px;margin-block-start:1rem}
.discovery-shell #discovery-help p{line-height:1.7;margin:.5rem}
.discovery-spatial-board{display:grid;grid-template-columns:repeat(4,minmax(0,1fr));gap:.75rem}
.discovery-zone{border:1px solid var(--d-line);border-radius:18px;overflow:hidden;background:#f8f3e7;min-width:0}
.discovery-zone h4{padding:.65rem .4rem;min-height:3.6em;display:grid;place-items:center;text-align:center;margin:0;line-height:1.5}
.discovery-room{position:relative;aspect-ratio:1;direction:ltr;isolation:isolate;overflow:hidden}
.discovery-room>.room-zone-backdrop{position:absolute;inset:0;width:100%;height:100%;z-index:-1;pointer-events:none}
.discovery-room svg{pointer-events:none}
.discovery-furniture{position:absolute;inset:0;pointer-events:none}
.discovery-furniture>svg,.discovery-basket-front>svg{width:100%;height:100%}
.discovery-place{position:absolute;left:50%;top:40%;transform:translate(-50%,-50%);width:32%;aspect-ratio:1;min-height:44px;min-width:44px;padding:0!important;border:2px dashed #8f987e!important;border-radius:14px!important;background:#fffdf3d9!important;display:grid;place-items:center;font-size:1.5rem;z-index:2;color:#48664f!important}
.discovery-place img{width:100%;height:100%;object-fit:contain;pointer-events:none}
.discovery-place:hover,.discovery-place:active,.discovery-place:focus{transform:translate(-50%,-50%)}
.discovery-place.is-filled{background:transparent!important;border-color:transparent!important}
.discovery-room[data-relation=under] .discovery-place{top:72%}
.discovery-room[data-relation=beside] .discovery-place{left:75%;top:71%}
.discovery-room[data-relation=inside] .discovery-place{top:57%}
.discovery-basket-front{position:absolute;inset:0;pointer-events:none;z-index:3}
.discovery-placed-label{text-align:center;padding:.3rem;margin:0;font-weight:600}
.discovery-trays{display:grid;grid-template-columns:repeat(auto-fit,minmax(min(100%,230px),1fr));gap:1rem;margin-block:1rem}
.discovery-family-tray{background:#f4e8ce;border:2px solid #b9a481;border-radius:20px;padding:.65rem;min-height:155px;box-shadow:inset 0 -7px #d9c49b50}
.discovery-family-place{width:100%;display:flex;align-items:center;justify-content:space-between;gap:.5rem;border:0!important;background:#fffdf0!important;text-align:start;border-radius:12px!important;color:inherit!important}
.discovery-family-place strong{flex:1;min-width:0}
.discovery-family-place>span{font-size:1.3rem}
.discovery-tray-content{display:flex;flex-wrap:wrap;gap:.5rem;padding-block-start:.5rem}
.discovery-return{display:flex;flex-direction:column;align-items:center;gap:.2rem;background:#fffdf0!important;border:1px solid var(--d-line)!important;border-radius:12px!important;padding:.35rem!important;font-size:.8rem;max-width:100px;min-width:64px;color:inherit!important}
.discovery-return img{width:56px;height:56px;object-fit:contain}
@media(max-width:720px){.discovery-spatial-board{grid-template-columns:repeat(2,minmax(0,1fr))}.discovery-picture-grid{grid-template-columns:repeat(3,minmax(0,1fr))}.discovery-object-layers{grid-template-columns:repeat(3,minmax(0,1fr));gap:14px;padding:20px 12px}.discovery-picture img{height:78px}.discovery-scene,.discovery-object-layers{min-height:330px}}
@media(max-width:390px){.discovery-object-layers{gap:10px;padding:14px 8px}.discovery-picture img{height:65px}.discovery-name{font-size:.78rem}.discovery-picture-grid{gap:.45rem}.discovery-selection button{margin-inline-start:0}.discovery-actions button{flex:1 1 42%}.discovery-zone h4{font-size:.9rem}.discovery-place{width:34%}.discovery-requests li{padding:.25rem}.discovery-requests li>img,.discovery-request img{width:40px;height:40px}}
@media(prefers-reduced-motion:reduce){.discovery-shell *{animation:none!important;transition:none!important;scroll-behavior:auto!important}}
