.market-shell{padding-top:10rem;padding-bottom:5rem;min-height:70vh}
.market-cover{width:100%;aspect-ratio:4/3;object-fit:cover}
[data-themes-market] .market-cover{object-position:center top}
.market-card{transition:transform .2s ease,box-shadow .2s ease}
.market-card:hover{transform:translateY(-4px);box-shadow:0 .75rem 2rem rgba(20,20,40,.08)}
.market-app-icon{width:64px;height:64px;display:grid;place-items:center;border-radius:16px;font-size:1.8rem}
.market-detail-cover{width:100%;border-radius:1rem}
.theme-detail-top{display:grid;grid-template-columns:minmax(0,7fr) minmax(0,5fr);gap:3rem;align-items:stretch}
.theme-gallery-column{position:relative;min-width:0;min-height:360px}
.theme-detail-gallery{position:absolute;inset:0;display:flex;gap:12px;min-width:0;min-height:0}
.theme-detail-preview{flex:1;min-width:0;height:100%;overflow:hidden;border-radius:1rem}
.theme-detail-preview .market-detail-cover{display:block;width:100%;height:100%;object-fit:cover;object-position:top;border-radius:0}
.theme-detail-gallery>.market-detail-cover{flex:1;min-width:0;height:100%}
.theme-detail-thumbs{order:-1;display:flex;flex-direction:column;gap:10px;width:80px;flex:0 0 80px;overflow-y:auto;min-height:0;padding:3px}
.theme-detail-thumbs a{display:block;flex-shrink:0;border-radius:8px}
.theme-detail-thumbs a:focus-visible{outline:2px solid var(--bs-primary);outline-offset:1px}
.theme-detail-thumb{display:block;width:100%;height:68px;object-fit:cover;object-position:top;border-radius:8px}
.theme-info-column{min-width:0}
.theme-info-column .market-detail-info{height:100%}
.theme-detail-description{border-radius:1rem}
.theme-description-body{display:flow-root}
.theme-description-body.is-collapsed{max-height:320px;overflow:hidden;mask-image:linear-gradient(to bottom,#000 calc(100% - 48px),transparent)}
.theme-description-toggle{border:0;background:none;color:var(--bs-primary);font:inherit;font-weight:600;padding:.5rem 1rem;text-decoration:underline;text-underline-offset:4px}
.theme-description-toggle:hover{opacity:.8}
.theme-description-toggle:focus-visible{outline:2px solid var(--bs-primary);outline-offset:3px;border-radius:4px}
.theme-detail-description{scroll-margin-top:100px}
.theme-rich-content img,.theme-rich-content video{max-width:100%;height:auto}
@media(max-width:991.98px){.theme-detail-top{grid-template-columns:minmax(0,1fr);gap:1.5rem}.theme-gallery-column{height:clamp(360px,65vh,560px)}.theme-detail-thumbs{width:64px;flex-basis:64px}.theme-detail-thumb{height:56px}.theme-detail-gallery{gap:8px}}
.theme-detail-preview[href]{cursor:zoom-in}
.theme-detail-preview[href]:focus-visible{outline:3px solid var(--bs-primary);outline-offset:4px}
.theme-image-viewer{padding:0;border:0;border-radius:12px;background:#151820;color:#fff;width:calc(100vw - 32px);max-width:none;height:calc(100dvh - 32px);max-height:none;overflow:hidden}
.theme-image-viewer::backdrop{background:rgba(0,0,0,.85)}
.theme-image-viewer[open]{display:flex;flex-direction:column}
.theme-image-viewer .theme-viewer-toolbar{display:flex;align-items:center;gap:8px;padding:6px 12px;flex:0 0 48px;box-sizing:border-box;background:#151820;color:#fff;border-bottom:1px solid #ffffff26}
.theme-viewer-toolbar>span:first-child{margin-right:auto;font-weight:600}
.theme-viewer-toolbar button{display:inline-flex;align-items:center;justify-content:center;flex:0 0 34px;width:34px;height:34px;padding:0;border:1px solid #ffffff40;border-radius:6px;background:#ffffff12;color:white}
.theme-viewer-toolbar button svg{display:block;width:18px;height:18px;fill:none;stroke:currentColor;stroke-width:2;stroke-linecap:round;stroke-linejoin:round}
.theme-viewer-toolbar button:disabled{opacity:.3;cursor:not-allowed}
.theme-viewer-toolbar button:focus-visible{outline:2px solid white;outline-offset:2px}
.theme-viewer-stage{position:relative;flex:1;min-height:0;display:flex}
.theme-viewer-scroll{flex:1;min-width:0;min-height:0;overflow:auto;overscroll-behavior:contain;padding:16px}
.theme-viewer-arrow{position:absolute;top:50%;transform:translateY(-50%);z-index:2;display:flex;align-items:center;justify-content:center;width:44px;height:44px;padding:0;border:1px solid #ffffff80;border-radius:50%;background:#151820d9;color:#fff;box-shadow:0 2px 12px #0005;cursor:pointer}
.theme-viewer-prev{left:max(24px,calc((100% - var(--viewer-image-width,100%))/2 + 12px))}
.theme-viewer-next{right:max(24px,calc((100% - var(--viewer-image-width,100%))/2 + 12px))}
.theme-viewer-arrow svg{width:22px;height:22px;fill:none;stroke:currentColor;stroke-width:2;stroke-linecap:round;stroke-linejoin:round}
.theme-viewer-arrow:hover:not(:disabled){background:#151820}
.theme-viewer-arrow:disabled{opacity:.3;cursor:not-allowed}
.theme-viewer-arrow:focus-visible{outline:2px solid white;outline-offset:3px}
.theme-viewer-scroll img{display:block;width:auto;height:auto;max-width:none;margin:0 auto}
.theme-viewer-scroll img[hidden]{display:none}
.theme-viewer-scroll [data-viewer-status]:empty{display:none}
@media(max-width:575px){.theme-image-viewer{width:100vw;height:100dvh;border-radius:0}.theme-viewer-toolbar{gap:8px;padding:8px}.theme-viewer-scroll{padding:8px}}
.market-detail-info{padding:2rem;border-radius:1rem}
.theme-rich-content{font-size:1rem;line-height:1.75;overflow-wrap:anywhere}
.theme-rich-content h1,.theme-rich-content h2,.theme-rich-content h3,.theme-rich-content h4,.theme-rich-content h5,.theme-rich-content h6{font-weight:600;line-height:1.4;letter-spacing:normal;margin:1.5rem 0 .75rem}
.theme-rich-content h1{font-size:1.625rem}
.theme-rich-content h2{font-size:1.375rem}
.theme-rich-content h3{font-size:1.1875rem}
.theme-rich-content h4,.theme-rich-content h5,.theme-rich-content h6{font-size:1.0625rem}
.theme-rich-content>:first-child{margin-top:.5rem}
.theme-rich-content p,.theme-rich-content ul,.theme-rich-content ol{margin-bottom:1rem}
.theme-rich-content li+li{margin-top:.375rem}
@media(max-width:767px){.theme-rich-content h1{font-size:1.375rem}.theme-rich-content h2{font-size:1.25rem}.theme-rich-content h3{font-size:1.125rem}}
@media(max-width:767px){.market-shell{padding-top:7rem}.market-detail-info{padding:1.25rem}}
