.community-home{margin:2rem 0}.community-home-grid,.product-grid,.event-grid{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:1.1rem}.community-feature{position:relative;overflow:hidden;padding:1.6rem;min-height:190px}.community-feature .feature-icon{font-size:2.2rem;display:block;margin-bottom:.8rem}.community-feature h2{margin:.1rem 0 .5rem}.community-feature p{max-width:620px}.product-grid{grid-template-columns:repeat(3,minmax(0,1fr))}.product-card,.event-card{overflow:hidden;padding:0}.product-card .product-media,.event-card .event-media{aspect-ratio:16/10;background:#edf2f8;display:flex;align-items:center;justify-content:center;overflow:hidden}.product-card .product-media img,.event-card .event-media img{width:100%;height:100%;object-fit:cover}.media-placeholder{font-size:3rem;opacity:.55}.product-body,.event-body{padding:1rem}.product-price{font-size:1.25rem;font-weight:900;margin:.45rem 0}.product-meta,.event-meta{font-size:.88rem;color:#64748b}.store-detail{display:grid;grid-template-columns:minmax(0,1fr) minmax(0,1.1fr);gap:1.4rem}.store-detail .detail-image{aspect-ratio:1/1;background:#edf2f8;border-radius:18px;overflow:hidden;display:flex;align-items:center;justify-content:center}.store-detail .detail-image img{width:100%;height:100%;object-fit:cover}.order-summary{background:#f8fafc;border:1px solid #e2e8f0;border-radius:14px;padding:1rem}.community-admin-grid{display:grid;grid-template-columns:360px minmax(0,1fr);gap:1.2rem}.community-admin-grid .card{margin:0}.video-frame{width:100%;aspect-ratio:16/9;border:0;border-radius:16px;background:#000}.direct-video{width:100%;border-radius:16px;background:#000}.event-detail{max-width:980px;margin:auto}.status-select{min-width:140px}.compact-form{display:flex;gap:.5rem;align-items:center;flex-wrap:wrap}.order-items{margin:.4rem 0 0;padding-left:1.1rem}.shop-badge{display:inline-block;padding:.22rem .55rem;border-radius:999px;background:#eef4ff;color:#1d4ed8;font-size:.78rem;font-weight:800}.community-empty{padding:2rem;text-align:center}.stock-low{color:#b45309;font-weight:700}.stock-out{color:#b91c1c;font-weight:700}@media(max-width:900px){.product-grid{grid-template-columns:repeat(2,minmax(0,1fr))}.community-admin-grid,.store-detail{grid-template-columns:1fr}}@media(max-width:640px){.community-home-grid,.product-grid,.event-grid{grid-template-columns:1fr}}
.link-button{border:0;background:none;padding:0;color:#0755d5;font:inherit;cursor:pointer;text-decoration:underline}

/* Event detail / editor media fix */
.event-detail-card{padding:0!important;overflow:hidden;display:block;position:relative}
.event-detail-media{width:100%;background:#f3f6fa;border-bottom:1px solid var(--line);display:flex;align-items:center;justify-content:center;position:relative;overflow:hidden}
.event-detail-poster{padding:18px;min-height:220px;max-height:520px}
.event-detail-poster img{display:block;width:100%;height:auto;max-height:480px;object-fit:contain;border-radius:12px}
.event-detail-video{padding:18px}
.event-detail-video .direct-video,.event-detail-video .video-frame{display:block;width:100%;max-width:900px;margin:0 auto;aspect-ratio:16/9;object-fit:contain;border-radius:14px;background:#000}
.event-detail-body{padding:28px!important;background:#fff;position:relative;z-index:1}
.event-detail-body h1{margin:.45rem 0 .3rem}
.event-video-editor{border:1px solid var(--line);border-radius:14px;padding:16px;background:#fbfcfe}
.current-media-box{border:1px solid #dbe3ef;border-radius:12px;padding:14px;background:#fff;margin:12px 0 16px}
.current-event-video{display:block;width:100%;max-width:720px;aspect-ratio:16/9;object-fit:contain;background:#000;border-radius:12px}
.current-event-video-frame{display:block;width:100%;max-width:720px;aspect-ratio:16/9;border:0;background:#000;border-radius:12px}
.current-thumb{margin-top:10px;background:#f3f6fa;border-radius:10px;padding:10px;display:flex;justify-content:flex-start}
.current-thumb img{display:block;max-width:320px;width:100%;max-height:220px;object-fit:contain;border-radius:8px}
@media(max-width:640px){.event-detail-poster,.event-detail-video{padding:10px}.event-detail-body{padding:20px!important}.current-thumb img{max-width:100%}}


/* Management event details: small media preview on the left */
.admin-event-summary{display:grid;grid-template-columns:300px minmax(0,1fr);gap:24px;align-items:start;margin-top:16px}
.admin-event-preview{position:relative;background:#f5f7fb;border:1px solid #dde5ef;border-radius:16px;padding:12px;min-height:190px;display:flex;flex-direction:column;justify-content:center;overflow:hidden}
.admin-event-preview-video,.admin-event-preview-frame{display:block;width:100%;aspect-ratio:16/9;background:#000;border:0;border-radius:11px;object-fit:contain}
.admin-event-preview-image{display:block;width:100%;max-height:220px;object-fit:contain;border-radius:11px;background:#fff}
.admin-event-preview-empty{padding:42px 14px;text-align:center;color:#64748b;font-size:.92rem}
.admin-event-media-label{margin-top:8px;text-align:center;color:#64748b;font-size:.78rem;font-weight:700}
.admin-event-info{min-width:0;padding-top:2px}
.admin-event-info p:first-child{margin-top:0}
@media(max-width:760px){.admin-event-summary{grid-template-columns:1fr}.admin-event-preview{max-width:420px}.admin-event-info{padding-top:0}}


/* Final event media sizing + poster-only support */
.admin-event-summary{grid-template-columns:minmax(280px,460px) minmax(0,1fr)!important}
.admin-event-preview{width:100%!important;max-width:460px!important;min-height:0!important}
.admin-event-preview-video,.admin-event-preview-frame{width:100%!important;max-width:460px!important;aspect-ratio:16/9!important;max-height:260px!important;height:auto!important;object-fit:contain!important}
.event-poster-editor{border:1px solid var(--line);border-radius:14px;padding:16px;background:#fbfcfe}
@media(max-width:760px){.admin-event-summary{grid-template-columns:1fr!important}.admin-event-preview{max-width:460px!important}}

/* Public Event Details: controlled YouTube-style media area */
.event-detail-card .event-detail-media{
    width:100%;
    padding:20px;
    box-sizing:border-box;
    background:#f8fafc;
    border-bottom:1px solid var(--line);
}
.event-detail-card .event-detail-video .direct-video,
.event-detail-card .event-detail-video .video-frame{
    display:block;
    width:100% !important;
    max-width:720px !important;
    height:auto;
    aspect-ratio:16 / 9;
    max-height:405px;
    margin:0 auto !important;
    object-fit:contain;
    border:0;
    border-radius:12px;
    background:#000;
}
.event-detail-card .event-detail-poster img{
    display:block;
    width:auto;
    max-width:720px;
    max-height:520px;
    height:auto;
    object-fit:contain;
    margin:0 auto;
    border-radius:12px;
}
@media(max-width:760px){
    .event-detail-card .event-detail-media{padding:10px;}
    .event-detail-card .event-detail-video .direct-video,
    .event-detail-card .event-detail-video .video-frame{max-width:100% !important;max-height:none;}
    .event-detail-card .event-detail-poster img{max-width:100%;max-height:none;}
}


/* Compact media sizes: public event + edit previews */
.event-detail-card .event-detail-media{
    padding:16px !important;
    min-height:0 !important;
    max-height:none !important;
}
.event-detail-card .event-detail-video .direct-video,
.event-detail-card .event-detail-video .video-frame{
    width:100% !important;
    max-width:640px !important;
    aspect-ratio:16/9 !important;
    max-height:360px !important;
    height:auto !important;
    margin:0 auto !important;
    object-fit:contain !important;
}
.event-detail-card .event-detail-poster{
    min-height:0 !important;
    max-height:none !important;
}
.event-detail-card .event-detail-poster img{
    width:auto !important;
    max-width:640px !important;
    max-height:420px !important;
    height:auto !important;
    margin:0 auto !important;
    object-fit:contain !important;
}
/* Edit Event: keep existing poster/video previews intentionally small. */
.event-video-editor .current-media-box,
.event-poster-editor .current-media-box{
    max-width:560px !important;
}
.event-video-editor .current-event-video,
.event-video-editor .current-event-video-frame{
    width:100% !important;
    max-width:460px !important;
    aspect-ratio:16/9 !important;
    max-height:260px !important;
    height:auto !important;
    object-fit:contain !important;
}
.event-poster-editor .current-thumb{
    max-width:460px !important;
}
.event-poster-editor .current-thumb img{
    width:auto !important;
    max-width:300px !important;
    max-height:200px !important;
    height:auto !important;
    object-fit:contain !important;
}
@media(max-width:700px){
    .event-detail-card .event-detail-video .direct-video,
    .event-detail-card .event-detail-video .video-frame,
    .event-detail-card .event-detail-poster img,
    .event-video-editor .current-event-video,
    .event-video-editor .current-event-video-frame{max-width:100% !important;}
}
