*{box-sizing:border-box}
html,body{margin:0;min-height:100%;font-family:system-ui,-apple-system,BlinkMacSystemFont,"Segoe UI",sans-serif;background:#080808;color:#fff}
body.drawer-open{overflow:hidden}
body.modal-open{overflow:hidden}
button,input,textarea,select{font:inherit}
button{cursor:pointer}
button:disabled{cursor:not-allowed;opacity:.45}
[hidden]{display:none!important}
.page{min-height:100vh;display:flex;flex-direction:column}
.top{height:64px;padding:0 22px;display:flex;align-items:center;justify-content:space-between;border-bottom:1px solid #242424;background:#0d0d0d}
.logo{font-size:27px;font-weight:900;letter-spacing:-1.5px}
.logo i{font-style:normal;color:#ff3030}
.tag{font-size:12px;color:#888}
.home{flex:1;display:grid;place-items:center;padding:30px}
.hero{text-align:center;width:min(650px,100%)}
.red{color:#ff3030;font-weight:800;font-size:14px;margin-bottom:12px}
.hero h1{font-size:clamp(48px,10vw,88px);line-height:.9;letter-spacing:-5px;margin:0 0 22px}
.hero p{color:#999;font-size:17px;line-height:1.6;margin:0 auto 30px}
.start{border:0;background:#ff3030;color:#fff;font-weight:900;font-size:21px;padding:18px 30px;border-radius:16px;cursor:pointer;box-shadow:0 14px 40px #ff303033}
.start:hover{background:#ff4545}
.start:disabled{background:#333;color:#777;box-shadow:none}
.note{color:#555;font-size:12px;margin-top:14px}
.home-trial{width:min(360px,100%);margin:0 auto 16px;padding:13px 16px;border:1px solid #303030;background:#111;border-radius:12px;display:flex;justify-content:space-between;align-items:center;font-size:13px;color:#aaa}
.home-trial b{color:#61df8b;font-size:15px}
.live{min-height:100vh;display:flex;flex-direction:column}
.livegrid{flex:1;display:grid;grid-template-columns:minmax(0,1fr) 320px;gap:14px;padding:14px}
.stage{position:relative;min-height:calc(100vh - 92px);border-radius:18px;background:#121212;overflow:hidden;display:flex;align-items:center;justify-content:center}
.stage video{display:block;width:100%;height:100%;object-fit:cover;background:#000}
.stage .remote-video{display:block;width:100%;height:100%;object-fit:cover;background:#000}
.fake{position:absolute;inset:0;display:grid;place-items:center;background:radial-gradient(circle,#292929,#0b0b0b 65%);z-index:1}
.face{width:100px;height:100px;border-radius:50%;display:grid;place-items:center;background:#252525;font-weight:900;font-size:38px}
.badge,.clock{position:absolute;top:16px;background:#000b;padding:7px 10px;border-radius:8px;font-size:12px;font-weight:900;z-index:5}
.badge{left:16px;background:#ff3030}
.clock{right:16px}
.clock.warning{background:#9b6500;color:#fff}
.clock.danger{background:#a91616;color:#fff;animation:pulse-clock 1s infinite}
@keyframes pulse-clock{0%,100%{opacity:1}50%{opacity:.65}}
.share{position:absolute;left:16px;right:16px;bottom:16px;background:#000c;border:1px solid #333;border-radius:14px;padding:14px;backdrop-filter:blur(10px);z-index:5}
.share small{display:block;color:#aaa;margin-bottom:7px}
.row{display:flex;gap:8px}
.row input{flex:1;min-width:0;background:#171717;color:#fff;border:1px solid #3a3a3a;border-radius:9px;padding:10px}
.copy{border:0;border-radius:9px;background:#fff;color:#111;font-weight:900;padding:0 14px;cursor:pointer}
.copy:hover{background:#ddd}
.share-live{width:100%;margin-top:9px;border:0;border-radius:9px;background:#ff3030;color:#fff;font-weight:900;padding:11px}
.share-live:hover{background:#ff4545}
.panel{background:#101010;border:1px solid #252525;border-radius:18px;padding:16px;display:flex;flex-direction:column;min-width:0}
.panel h2{margin:0 0 5px}
.panel p{margin:0 0 16px;color:#777;font-size:13px}
.item{display:flex;justify-content:space-between;gap:12px;padding:13px 0;border-bottom:1px solid #242424;font-size:14px}
.item span{color:#ddd}
.item b{max-width:150px;text-align:right;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}
.ok{color:#61df8b;font-weight:800}
.later{color:#ffc857;font-weight:800}
.trial-box{margin:0 0 8px;padding:13px;background:#171717;border:1px solid #333;border-radius:12px}
.trial-box>div{display:flex;justify-content:space-between;align-items:center;gap:10px}
.trial-box span{font-size:12px;color:#aaa}
.trial-box b{font-size:20px;color:#61df8b}
.trial-box small{display:block;margin-top:6px;color:#666;font-size:10px}
.mic-meter{margin:14px 0;padding:14px;background:#171717;border:1px solid #333;border-radius:12px}
.mic-meter-top{display:flex;justify-content:space-between;align-items:center;font-size:13px;margin-bottom:9px}
.mic-meter-top span{color:#ddd;font-weight:700}
.mic-meter-top b{font-size:14px;color:#61df8b}
.mic-bar{height:14px;background:#292929;border-radius:999px;overflow:hidden;border:1px solid #3a3a3a}
.mic-bar>div{height:100%;width:0%;background:#61df8b;border-radius:999px;transition:width .08s linear;box-shadow:0 0 10px #61df8b66}
#micLabel{font-size:11px;color:#888;margin-top:7px}
.product-controls{display:grid;grid-template-columns:1fr 1fr;gap:8px;margin-top:14px}
.product-controls button{border:1px solid #333;background:#181818;color:#fff;border-radius:10px;padding:11px 8px;font-size:12px;font-weight:800}
.product-controls button:hover{background:#242424;border-color:#444}
.product-controls span{color:#61df8b;margin-left:3px}
.end{margin-top:auto;border:1px solid #333;background:#181818;color:#fff;border-radius:10px;padding:12px;font-weight:800;cursor:pointer}
.end:hover{background:#242424}
.seller-live-product{margin-top:14px;padding:14px;background:#151515;border:1px solid #333;border-radius:14px}
.seller-live-product-head{display:flex;align-items:center;justify-content:space-between;gap:10px}
.seller-live-product-head strong{font-size:13px}
.seller-live-product-head span{font-size:10px;color:#61df8b;font-weight:800}
.seller-live-product-name{margin-top:8px;font-size:16px;font-weight:900;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}
.seller-live-product-meta{display:flex;gap:12px;flex-wrap:wrap;margin-top:6px;color:#888;font-size:11px}
.seller-live-product-meta b{color:#fff}
.live-quantity-box{margin-top:12px;padding:12px;background:#0e0e0e;border:1px solid #292929;border-radius:11px}
.live-quantity-row{display:flex;justify-content:space-between;align-items:center;gap:10px}
.live-quantity-row span{font-size:11px;color:#888}
.live-quantity-row strong{font-size:20px;color:#61df8b}
.live-quantity-progress{height:7px;background:#292929;border-radius:999px;overflow:hidden;margin-top:9px}
.live-quantity-progress>div{height:100%;width:0;background:#61df8b;border-radius:999px;transition:width .2s ease}
.seller-live-actions{display:grid;grid-template-columns:1fr 1fr;gap:7px;margin-top:10px}
.seller-live-actions button{border:1px solid #333;background:#1b1b1b;color:#fff;border-radius:9px;padding:10px 7px;font-size:11px;font-weight:900}
.seller-live-actions button:hover{background:#292929}
.seller-live-actions .danger{color:#ff7777}
.seller-live-orders{margin-top:12px}
.seller-live-orders button{width:100%;border:1px solid #333;background:#181818;color:#fff;border-radius:9px;padding:11px;font-size:12px;font-weight:900}
.viewer{min-height:100vh;display:grid;place-items:center;padding:20px}
.card{width:min(1100px,100%);background:#111;border:1px solid #292929;border-radius:20px;overflow:hidden}
.viewstage{position:relative;aspect-ratio:16/9;display:grid;place-items:center;background:#000;overflow:hidden}
.viewstage video{display:block;width:100%;height:100%;object-fit:cover;background:#000}
.viewstage .remote-video{display:block;width:100%;height:100%;object-fit:cover;background:#000}
.info{padding:20px}
.livepill{display:inline-block;background:#ff3030;padding:6px 9px;border-radius:7px;font-size:12px;font-weight:900}
.info h1{margin:10px 0 6px}
.info p{margin:0;color:#888}
.back{margin-top:18px;border:1px solid #333;background:#181818;color:#fff;border-radius:10px;padding:10px 14px;cursor:pointer}
.back:hover{background:#242424}
.audio-button{display:block;width:100%;margin-top:16px;border:0;border-radius:10px;background:#ff3030;color:#fff;padding:13px;font-weight:900;font-size:15px;cursor:pointer}
.audio-button:hover{background:#ff4545}
.viewer-product{margin-top:16px;padding:16px;background:#171717;border:1px solid #333;border-radius:14px}
.viewer-product-label{font-size:11px;color:#ff7070;font-weight:900;margin-bottom:9px}
.viewer-product-main{display:flex;justify-content:space-between;align-items:center;gap:12px}
.viewer-product-main>div{min-width:0}
.viewer-product-main b{display:block;font-size:16px;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}
.viewer-product-main span{display:block;margin-top:3px;color:#777;font-size:11px}
.viewer-product-main strong{font-size:18px;color:#61df8b;white-space:nowrap}
.viewer-product-stock{margin-top:9px;font-size:11px;color:#61df8b}
.viewer-product-stock.sold{color:#ff7777}
.viewer-product-empty{color:#666;font-size:12px;text-align:center;padding:8px}
.viewer-product-buy{width:100%;margin-top:12px;border:0;border-radius:11px;background:#ff3030;color:#fff;padding:13px;font-size:14px;font-weight:900}
.viewer-product-buy:hover{background:#ff4545}
.viewer-product-buy:disabled{background:#333;color:#777}
.viewer-product-history{width:100%;margin-top:8px;border:1px solid #333;border-radius:10px;background:#181818;color:#fff;padding:10px;font-size:12px;font-weight:800}
.viewer-product-quantity{display:grid;grid-template-columns:44px 1fr 44px;gap:7px;margin-top:12px}
.viewer-product-quantity button{border:1px solid #333;background:#1d1d1d;color:#fff;border-radius:9px;font-size:20px;font-weight:900}
.viewer-product-quantity span{display:grid;place-items:center;background:#0d0d0d;border:1px solid #333;border-radius:9px;font-weight:900}
.viewer-activity{margin-top:14px;background:#101010;border:1px solid #292929;border-radius:14px;overflow:hidden}
.viewer-activity-head{padding:11px 13px;border-bottom:1px solid #292929;display:flex;justify-content:space-between;align-items:center}
.viewer-activity-head strong{font-size:12px}
.viewer-activity-head span{font-size:10px;color:#666}
.viewer-activity-list{max-height:180px;overflow:auto}
.viewer-activity-item{padding:10px 13px;border-bottom:1px solid #202020;font-size:11px;color:#bbb}
.viewer-activity-item:last-child{border-bottom:0}
.viewer-activity-item b{color:#fff}
.viewer-activity-item time{display:block;color:#555;font-size:9px;margin-top:3px}
.debug-box{margin-top:18px;padding:12px;background:#050505;border:1px solid #333;border-radius:10px;text-align:left}
.debug-title{font-size:12px;font-weight:900;color:#fff;margin-bottom:8px}
.debug-status{padding:7px 9px;border-radius:7px;background:#292929;color:#ddd;font-size:11px;font-weight:800;margin-bottom:7px}
.debug-status.ok{background:#123d24;color:#61df8b}
.debug-status.error{background:#451919;color:#ff7777}
.audio-state{font-size:10px;color:#aaa;line-height:1.5;margin-bottom:7px;word-break:break-all}
.debug-log{height:180px;overflow:auto;margin:0;padding:8px;background:#000;color:#61df8b;font:10px/1.5 monospace;white-space:pre-wrap;word-break:break-word}
.drawer{position:fixed;inset:0;width:100%;height:100dvh;z-index:1000;overflow:hidden}
.drawer-backdrop{position:absolute;inset:0;background:#000b;backdrop-filter:blur(2px)}
.drawer-panel{position:absolute;top:0;right:0;width:min(480px,94vw);height:100dvh;background:#101010;border-left:1px solid #303030;box-shadow:-20px 0 60px #0008;display:flex;flex-direction:column;min-height:0;overflow:hidden;animation:drawer-in .18s ease-out}
@keyframes drawer-in{from{transform:translateX(100%)}to{transform:translateX(0)}}
.drawer-head{height:72px;min-height:72px;padding:0 18px;border-bottom:1px solid #292929;display:flex;align-items:center;justify-content:space-between;gap:15px;flex-shrink:0}
.drawer-head strong{display:block;font-size:17px}
.drawer-head span{display:block;margin-top:3px;color:#666;font-size:11px}
.drawer-close,.modal-close{border:1px solid #333;background:#181818;color:#fff;width:36px;height:36px;border-radius:9px;flex-shrink:0}
.drawer-close:hover,.modal-close:hover{background:#292929}
.drawer-body{flex:1;min-height:0;overflow-y:auto;overflow-x:hidden;padding:16px;-webkit-overflow-scrolling:touch}
.drawer-toolbar{display:flex;align-items:center;justify-content:space-between;gap:10px;margin-bottom:12px}
.drawer-toolbar b{display:block;font-size:13px}
.drawer-toolbar span{display:block;color:#666;font-size:10px;margin-top:3px}
.drawer-add{border:0;background:#ff3030;color:#fff;border-radius:9px;padding:10px 12px;font-size:12px;font-weight:900;white-space:nowrap}
.drawer-add:hover{background:#ff4545}
.drawer-history-button{border:1px solid #333;background:#181818;color:#fff;border-radius:9px;padding:10px 12px;font-size:11px;font-weight:900}
.pinned-box{padding:13px;background:#171717;border:1px solid #333;border-radius:12px;margin-bottom:14px}
.pinned-title{font-size:11px;color:#ff7070;font-weight:900;margin-bottom:9px}
.pinned-product{display:flex;justify-content:space-between;align-items:center;gap:12px}
.pinned-product>div{min-width:0}
.pinned-product b{display:block;font-size:14px;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}
.pinned-product span{display:block;color:#777;font-size:11px;margin-top:3px}
.unpin-btn{border:1px solid #444;background:#222;color:#fff;border-radius:8px;padding:8px;font-size:11px;font-weight:800;white-space:nowrap}
.pinned-empty{color:#666;font-size:12px}
.product-list{display:flex;flex-direction:column;gap:10px}
.product-card{padding:14px;background:#151515;border:1px solid #2d2d2d;border-radius:13px}
.product-card.is-pinned{border-color:#61df8b55;background:#162018}
.product-card-main{min-width:0}
.product-card-top{display:flex;justify-content:space-between;align-items:flex-start;gap:10px}
.product-code{display:inline-block;color:#ff7070;font-size:10px;font-weight:900;background:#2a1717;padding:4px 6px;border-radius:5px}
.product-status{font-size:9px;color:#61df8b;background:#17301f;border:1px solid #31553b;padding:4px 6px;border-radius:6px;font-weight:900}
.product-name{margin-top:7px;font-weight:800;font-size:15px;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}
.product-price{margin-top:5px;font-size:16px;color:#61df8b;font-weight:900}
.product-meta{display:flex;justify-content:space-between;gap:10px;margin-top:7px;font-size:12px}
.product-meta b{color:#61df8b}
.product-meta span{color:#888}
.product-live-quantity{margin-top:9px;padding:8px 9px;background:#0d0d0d;border-radius:8px;border:1px solid #282828;font-size:11px;color:#aaa}
.product-live-quantity b{color:#61df8b}
.product-actions{display:grid;grid-template-columns:42px 42px 1fr 1fr 1fr;gap:6px;margin-top:11px}
.product-actions button{border:1px solid #333;background:#1c1c1c;color:#fff;border-radius:7px;padding:8px 4px;font-size:10px;font-weight:800}
.product-actions button:hover{background:#292929}
.product-actions .stock-btn{font-size:16px}
.product-actions .product-pin.active{background:#263b2d;border-color:#386247;color:#61df8b}
.product-actions .product-delete{color:#ff7777}
.empty-products{text-align:center;padding:50px 20px;color:#666}
.empty-products div{font-size:42px;margin-bottom:12px}
.empty-products b{display:block;color:#aaa;font-size:14px}
.empty-products span{display:block;margin-top:5px;font-size:11px}
.order-list{display:flex;flex-direction:column;gap:9px}
.order-card{padding:13px;background:#151515;border:1px solid #2d2d2d;border-radius:12px}
.order-card-top{display:flex;justify-content:space-between;align-items:flex-start;gap:10px}
.order-id{font-size:10px;color:#777;font-family:monospace}
.order-status{font-size:9px;padding:4px 7px;border-radius:6px;background:#2b2415;color:#ffc857;font-weight:900}
.order-status.success{background:#17301f;color:#61df8b}
.order-product{margin-top:8px;font-size:14px;font-weight:900}
.order-meta{display:flex;flex-wrap:wrap;gap:8px;margin-top:6px;color:#888;font-size:10px}
.order-meta b{color:#ddd}
.order-total{margin-top:9px;display:flex;justify-content:space-between;align-items:center;font-size:12px}
.order-total strong{color:#61df8b;font-size:15px}
.order-private{margin-top:10px;padding:9px;background:#0d0d0d;border:1px solid #282828;border-radius:8px}
.order-private div{display:flex;justify-content:space-between;gap:10px;padding:4px 0;font-size:10px}
.order-private span{color:#777}
.order-private b{color:#ddd;text-align:right;max-width:65%;overflow-wrap:anywhere}
.order-location{margin-top:8px;color:#666;font-size:9px}
.history-tabs{display:grid;grid-template-columns:1fr 1fr;gap:6px;margin-bottom:12px}
.history-tabs button{border:1px solid #333;background:#181818;color:#aaa;border-radius:8px;padding:9px;font-size:11px;font-weight:800}
.history-tabs button.active{background:#2a1717;border-color:#ff3030;color:#fff}
.order-empty{text-align:center;padding:40px 20px;color:#666;font-size:12px}
.activity-list{display:flex;flex-direction:column;gap:7px}
.activity-item{padding:10px;background:#151515;border:1px solid #292929;border-radius:9px;font-size:11px;color:#bbb}
.activity-item b{color:#fff}
.activity-item strong{color:#61df8b}
.activity-item small{display:block;color:#555;margin-top:4px;font-size:9px}
.pin-quantity-info{padding:11px;background:#151515;border:1px solid #333;border-radius:10px;margin-bottom:12px}
.pin-quantity-info strong{display:block;font-size:14px}
.pin-quantity-info span{display:block;color:#777;font-size:10px;margin-top:4px}
.quantity-stepper{display:grid;grid-template-columns:48px 1fr 48px;gap:8px;margin:14px 0}
.quantity-stepper button{border:1px solid #333;background:#1c1c1c;color:#fff;border-radius:10px;font-size:22px;font-weight:900}
.quantity-stepper input{text-align:center;background:#0d0d0d;color:#fff;border:1px solid #333;border-radius:10px;font-size:20px;font-weight:900;min-width:0}
.quantity-hint{font-size:10px;color:#666;text-align:center;margin-bottom:12px}
.buy-summary{padding:12px;background:#151515;border:1px solid #333;border-radius:10px}
.buy-summary-row{display:flex;justify-content:space-between;gap:10px;padding:5px 0;font-size:11px}
.buy-summary-row span{color:#888}
.buy-summary-row strong{color:#fff;text-align:right}
.buy-summary-total{border-top:1px solid #292929;margin-top:6px;padding-top:9px}
.buy-summary-total strong{color:#61df8b;font-size:18px}
.buyer-note{font-size:10px;color:#666;line-height:1.5;margin:10px 0 0}
.location-button{width:100%;border:1px solid #333;background:#181818;color:#fff;border-radius:9px;padding:11px;font-size:11px;font-weight:800;margin-top:10px}
.location-button.active{border-color:#386247;background:#17301f;color:#61df8b}
.privacy-note{padding:9px;background:#101010;border:1px solid #282828;border-radius:8px;color:#666;font-size:9px;line-height:1.5;margin-top:10px}
.modal{position:fixed;inset:0;width:100%;height:100dvh;z-index:1100;display:flex;align-items:center;justify-content:center;padding:20px;overflow-y:auto}
.modal-backdrop{position:absolute;inset:0;background:#000c;backdrop-filter:blur(3px)}
.modal-card{position:relative;width:min(430px,100%);max-height:calc(100dvh - 40px);background:#111;border:1px solid #333;border-radius:16px;box-shadow:0 30px 80px #000;overflow:hidden;animation:modal-in .16s ease-out;display:flex;flex-direction:column;min-height:0;flex-shrink:0}
@keyframes modal-in{from{transform:scale(.97);opacity:0}to{transform:scale(1);opacity:1}}
.modal-head{min-height:60px;padding:0 16px;border-bottom:1px solid #292929;display:flex;align-items:center;justify-content:space-between;gap:12px;flex-shrink:0}
.modal-head strong{font-size:16px}
.modal-body{padding:16px;overflow:auto;min-height:0}
.modal-description{color:#888;font-size:11px;line-height:1.5;margin:0 0 14px}
#productForm{padding:16px;overflow:auto;min-height:0}
#productForm label,.modal-body label{display:block;color:#aaa;font-size:12px;font-weight:700;margin:0 0 6px}
#productForm input,.modal-body input,.modal-body textarea,.modal-body select{display:block;width:100%;background:#171717;color:#fff;border:1px solid #363636;border-radius:9px;padding:11px 12px;margin:0 0 13px;outline:none}
#productForm textarea,.modal-body textarea{resize:vertical;min-height:90px}
#productForm input:focus,.modal-body input:focus,.modal-body textarea:focus,.modal-body select:focus{border-color:#ff3030}
#productForm input:disabled{color:#777;background:#111}
.form-error{min-height:18px;color:#ff7777;font-size:11px;margin-bottom:5px}
.modal-actions{display:grid;grid-template-columns:1fr 1fr;gap:8px;margin-top:6px;padding:0 16px 16px;flex-shrink:0}
.modal-body .modal-actions{padding:0;margin-top:14px}
.modal-actions button{border-radius:9px;padding:11px;font-weight:900}
.modal-cancel{border:1px solid #333;background:#181818;color:#fff}
.modal-save{border:0;background:#ff3030;color:#fff}
.modal-save:hover{background:#ff4545}
.modal-primary{border:0;background:#ff3030;color:#fff}
.modal-primary:hover{background:#ff4545}
.modal-secondary{border:1px solid #333;background:#181818;color:#fff}
.modal-danger{border:1px solid #5a2929;background:#211414;color:#ff7777}
.confirm-icon{width:48px;height:48px;border-radius:50%;display:grid;place-items:center;background:#2a1717;color:#ff7070;font-size:22px;margin:0 auto 12px}
.confirm-title{text-align:center;font-size:18px;font-weight:900}
.confirm-text{text-align:center;color:#888;font-size:11px;line-height:1.5;margin:7px 0 14px}
.buyer-profile-box{padding:12px;background:#151515;border:1px solid #333;border-radius:10px;margin-bottom:12px}
.buyer-profile-box strong{display:block;font-size:12px}
.buyer-profile-box span{display:block;color:#777;font-size:10px;margin-top:4px}
.order-success{padding:18px;text-align:center}
.order-success-icon{width:58px;height:58px;border-radius:50%;display:grid;place-items:center;margin:0 auto 12px;background:#17301f;color:#61df8b;font-size:28px}
.order-success h3{margin:0;font-size:18px}
.order-success p{margin:7px 0;color:#888;font-size:11px;line-height:1.5}
.order-number{display:inline-block;margin:5px 0 10px;padding:8px 10px;border-radius:8px;background:#0d0d0d;border:1px solid #333;color:#61df8b;font:12px monospace;font-weight:900}
.toast{position:fixed;left:50%;bottom:24px;transform:translate(-50%,20px);background:#fff;color:#111;padding:11px 16px;border-radius:10px;font-size:12px;font-weight:900;z-index:2000;opacity:0;pointer-events:none;transition:.2s;max-width:calc(100vw - 30px);text-align:center}
.toast.show{opacity:1;transform:translate(-50%,0)}
@media(max-width:1000px){
.livegrid{grid-template-columns:minmax(0,1fr) 300px}
}
@media(max-width:800px){
.top{height:58px;padding:0 14px}
.logo{font-size:24px}
.livegrid{grid-template-columns:1fr;padding:10px}
.stage{min-height:60vh;border-radius:14px}
.panel{min-height:280px;border-radius:14px}
.hero h1{letter-spacing:-3px}
.share{left:10px;right:10px;bottom:10px}
.row input{font-size:13px}
.copy{padding:0 11px}
.mic-meter{margin:12px 0}
.debug-box{margin-top:14px}
.debug-log{height:220px}
.product-actions{grid-template-columns:40px 40px 1fr 1fr 1fr}
.drawer{height:100dvh}
.drawer-panel{width:100%;max-width:none;height:100dvh}
.drawer-body{min-height:0;overflow-y:auto;overflow-x:hidden;padding:14px;-webkit-overflow-scrolling:touch}
.viewer{padding:0}
.card{min-height:100vh;border-radius:0;border-left:0;border-right:0}
.viewstage{aspect-ratio:16/10}
.info{padding:16px}
.modal{height:100dvh;padding:10px;align-items:center;overflow-y:auto}
.modal-card{width:100%;max-height:calc(100dvh - 20px);border-radius:14px}
.modal-body{padding:14px;min-height:0;overflow:auto}
#productForm{padding:14px;min-height:0;overflow:auto}
.product-list{gap:8px}
.product-card{padding:12px}
.viewer-product{margin-top:12px}
.seller-live-product{margin-top:10px}
}
@media(max-width:480px){
.home{padding:20px}
.hero h1{font-size:54px}
.hero p{font-size:15px}
.start{width:100%;font-size:18px}
.home-trial{font-size:12px}
.product-controls{grid-template-columns:1fr}
.product-actions{grid-template-columns:38px 38px 1fr 1fr 1fr}
.product-actions button{font-size:9px}
.modal{height:100dvh;padding:7px;align-items:center;overflow-y:auto}
.modal-card{max-height:calc(100dvh - 14px);border-radius:12px}
.drawer-body{padding:12px;min-height:0;overflow-y:auto;overflow-x:hidden}
.share{padding:10px}
.share small{font-size:10px}
.row{gap:6px}
.copy{font-size:11px}
.viewer-product{padding:13px}
.viewer-product-main{align-items:flex-start}
.viewer-product-main strong{font-size:16px}
.viewer-product-buy{padding:14px}
.seller-live-actions{grid-template-columns:1fr}
.product-actions{grid-template-columns:36px 36px 1fr 1fr 1fr}
.quantity-stepper{grid-template-columns:46px 1fr 46px}
.modal-actions{gap:7px}
.order-card{padding:11px}
}
#buyerOrderModal{
    position:fixed;
    inset:0;
    z-index:9999;
}
#buyerOrderModal .modal-backdrop{
    position:absolute;
    inset:0;
    background:rgba(0,0,0,.72);
    backdrop-filter:blur(8px);
    -webkit-backdrop-filter:blur(8px);
}
#buyerOrderModal .modal-card{
    position:relative;
    width:min(92vw,460px);
    max-height:90vh;
    margin:5vh auto 0;
    padding:0;
    overflow:hidden;
    overflow-y:auto;
    border:1px solid rgba(255,255,255,.1);
    border-radius:24px;
    background:linear-gradient(180deg,#181818 0%,#101010 100%);
    box-shadow:0 24px 80px rgba(0,0,0,.65);
    color:#fff;
}
#buyerOrderModal .modal-head{
    display:flex;
    align-items:center;
    justify-content:space-between;
    gap:16px;
    padding:22px 22px 18px;
    border-bottom:1px solid rgba(255,255,255,.08);
}
#buyerOrderModal .modal-head>div{
    display:flex;
    flex-direction:column;
    gap:4px;
}
#buyerOrderModal .modal-eyebrow{
    font-size:11px;
    font-weight:700;
    letter-spacing:1.5px;
    color:#999;
}
#buyerOrderModal .modal-head strong{
    font-size:20px;
    font-weight:700;
    color:#fff;
}
#buyerOrderModal .modal-close{
    flex:0 0 auto;
    width:38px;
    height:38px;
    padding:0;
    border:1px solid rgba(255,255,255,.1);
    border-radius:50%;
    background:rgba(255,255,255,.06);
    color:#aaa;
    font-size:18px;
    cursor:pointer;
}
#buyerOrderModal .modal-close:hover{
    background:rgba(255,255,255,.1);
    color:#fff;
}
#buyerOrderModal .buyer-order-product{
    display:flex;
    align-items:center;
    justify-content:space-between;
    gap:16px;
    margin:18px 22px 4px;
    padding:15px 16px;
    border:1px solid rgba(255,255,255,.08);
    border-radius:14px;
    background:rgba(255,255,255,.045);
}
#buyerOrderModal .buyer-order-label{
    color:#999;
    font-size:12px;
}
#buyerOrderModal .buyer-order-product strong{
    max-width:60%;
    overflow:hidden;
    text-align:right;
    text-overflow:ellipsis;
    white-space:nowrap;
    color:#fff;
    font-size:14px;
}
#buyerOrderModal #buyerOrderForm{
    display:flex;
    flex-direction:column;
    gap:15px;
    padding:18px 22px 22px;
}
#buyerOrderModal .buyer-order-field{
    display:flex;
    flex-direction:column;
    gap:7px;
}
#buyerOrderModal .buyer-order-field label{
    color:#ddd;
    font-size:13px;
    font-weight:600;
}
#buyerOrderModal .buyer-order-field input,
#buyerOrderModal .buyer-order-field textarea{
    width:100%;
    box-sizing:border-box;
    border:1px solid rgba(255,255,255,.1);
    border-radius:12px;
    outline:none;
    background:#0b0b0b;
    color:#fff;
    font-family:inherit;
    font-size:14px;
    transition:border-color .2s,box-shadow .2s,background .2s;
}
#buyerOrderModal .buyer-order-field input{
    height:48px;
    padding:0 14px;
}
#buyerOrderModal .buyer-order-field textarea{
    min-height:105px;
    padding:13px 14px;
    resize:vertical;
}
#buyerOrderModal .buyer-order-field input::placeholder,
#buyerOrderModal .buyer-order-field textarea::placeholder{
    color:#666;
}
#buyerOrderModal .buyer-order-field input:focus,
#buyerOrderModal .buyer-order-field textarea:focus{
    border-color:rgba(255,255,255,.35);
    background:#0e0e0e;
    box-shadow:0 0 0 3px rgba(255,255,255,.05);
}
#buyerOrderModal .buyer-location-box{
    display:flex;
    align-items:center;
    justify-content:space-between;
    gap:14px;
    padding:14px;
    border:1px solid rgba(255,255,255,.08);
    border-radius:14px;
    background:rgba(255,255,255,.035);
}
#buyerOrderModal .buyer-location-info{
    display:flex;
    min-width:0;
    flex-direction:column;
    gap:4px;
}
#buyerOrderModal .buyer-location-info strong{
    color:#eee;
    font-size:13px;
}
#buyerOrderModal #buyerLocationStatus{
    overflow:hidden;
    color:#777;
    font-size:11px;
    text-overflow:ellipsis;
    white-space:nowrap;
}
#buyerOrderModal .buyer-location-button{
    flex:0 0 auto;
    min-height:38px;
    padding:0 13px;
    border:1px solid rgba(255,255,255,.12);
    border-radius:10px;
    background:#222;
    color:#fff;
    font-family:inherit;
    font-size:12px;
    font-weight:600;
    cursor:pointer;
}
#buyerOrderModal .buyer-location-button:hover{
    background:#2b2b2b;
}
#buyerOrderModal .form-error{
    min-height:18px;
    margin:0;
    color:#ff6b6b;
    font-size:12px;
    line-height:1.5;
}
#buyerOrderModal .buyer-order-note{
    padding:11px 13px;
    border-radius:10px;
    background:rgba(255,255,255,.035);
    color:#777;
    font-size:11px;
    line-height:1.5;
}
#buyerOrderModal .modal-actions{
    display:grid;
    grid-template-columns:1fr 1.5fr;
    gap:10px;
    margin-top:2px;
}
#buyerOrderModal .modal-actions button{
    height:48px;
    border-radius:12px;
    font-family:inherit;
    font-size:14px;
    font-weight:700;
    cursor:pointer;
}
#buyerOrderModal .modal-cancel{
    border:1px solid rgba(255,255,255,.1);
    background:#1b1b1b;
    color:#aaa;
}
#buyerOrderModal .modal-cancel:hover{
    background:#242424;
    color:#fff;
}
#buyerOrderModal .modal-save{
    border:1px solid rgba(255,255,255,.15);
    background:#fff;
    color:#080808;
    box-shadow:0 8px 24px rgba(0,0,0,.25);
}
#buyerOrderModal .modal-save:hover{
    background:#e9e9e9;
}
#buyerOrderModal .modal-save:active,
#buyerOrderModal .modal-cancel:active,
#buyerOrderModal .buyer-location-button:active{
    transform:translateY(1px);
}
@media(max-width:480px){
    #buyerOrderModal .modal-card{
        width:100%;
        max-height:94vh;
        margin:3vh auto 0;
        border-radius:22px 22px 0 0;
    }
    #buyerOrderModal .modal-head{
        padding:19px 18px 16px;
    }
    #buyerOrderModal .buyer-order-product{
        margin:15px 18px 2px;
    }
    #buyerOrderModal #buyerOrderForm{
        padding:16px 18px 20px;
    }
}
#liveDebug,
.live-debug,
.live-debug-panel,
#liveAudioDebug,
.live-audio-debug{
    display:none!important;
}

/* ========================================
   11RD LIVE — Fullscreen Background
   ======================================== */

/* ล็อกหน้าจอเฉพาะตอนแสดงหน้า LIVE */
html:has(.live),
body:has(.live) {
    width: 100%;
    height: 100%;
    margin: 0;
    padding: 0;
    overflow: hidden !important;
    overscroll-behavior: none;
}

body:has(.live) #app {
    position: fixed;
    inset: 0;
    width: 100%;
    height: 100%;
    min-height: 0;
    margin: 0;
    padding: 0;
    overflow: hidden;
}

.live {
    position: fixed !important;
    inset: 0 !important;
    width: 100% !important;
    height: 100vh !important;
    height: 100dvh !important;
    min-height: 0 !important;
    margin: 0 !important;
    padding: 0 !important;
    display: block !important;
    overflow: hidden !important;
    background: #000;
    isolation: isolate;
}

/* พื้นที่วิดีโอเต็มจอ */
.livegrid {
    position: absolute !important;
    inset: 0 !important;
    display: block !important;
    width: 100% !important;
    height: 100% !important;
    min-height: 0 !important;
    margin: 0 !important;
    padding: 0 !important;
    overflow: hidden !important;
}

.livegrid > .stage {
    position: absolute !important;
    inset: 0 !important;
    display: block !important;
    width: 100% !important;
    height: 100% !important;
    min-width: 0 !important;
    min-height: 0 !important;
    margin: 0 !important;
    padding: 0 !important;
    overflow: hidden !important;
    border: 0 !important;
    border-radius: 0 !important;
    background: #000;
}

/* วิดีโอจริงเต็มพื้นที่ */
.stage > video,
.stage > .remote-video {
    position: absolute !important;
    inset: 0 !important;
    display: block !important;
    width: 100% !important;
    height: 100% !important;
    max-width: none !important;
    max-height: none !important;
    margin: 0 !important;
    object-fit: cover !important;
    object-position: center;
    background: #000;
    z-index: 1;
}

/* ภาพสำรองระหว่างรอกล้อง */
.stage > .fake {
    position: absolute !important;
    inset: 0 !important;
    width: 100% !important;
    height: 100% !important;
    z-index: 2;
}

/* ส่วนหัวซ้อนบนภาพ */
.live > .top {
    position: absolute !important;
    top: 0 !important;
    left: 0 !important;
    right: 0 !important;
    z-index: 50 !important;
    height: 58px;
    padding: 0 14px;
    border: 0;
    background: linear-gradient(
        to bottom,
        rgba(0, 0, 0, .65),
        transparent
    );
    pointer-events: none;
}

.live > .top > * {
    pointer-events: auto;
}

/* ป้าย LIVE และเวลา */
.stage > #liveBadge,
.stage > .badge {
    position: absolute !important;
    top: 70px !important;
    left: 12px !important;
    right: auto !important;
    z-index: 40 !important;
}

.stage > #clock,
.stage > .clock {
    position: absolute !important;
    top: 70px !important;
    right: 72px !important;
    left: auto !important;
    z-index: 40 !important;
}

/* แถบเครื่องมือแนวตั้งด้านขวา */
.stage > .video-toolbar {
    position: absolute !important;
    top: 50% !important;
    right: 8px !important;
    bottom: auto !important;
    left: auto !important;
    transform: translateY(-50%);
    z-index: 45 !important;
    width: 52px;
    max-height: calc(100% - 130px);
    padding: 8px 0;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 14px;
    overflow-y: auto;
    overflow-x: visible;
    scrollbar-width: none;
    background: transparent;
    border: 0;
    pointer-events: none;
}

.stage > .video-toolbar::-webkit-scrollbar {
    display: none;
}

.video-toolbar button {
    position: relative;
    flex: 0 0 38px;
    width: 38px;
    height: 38px;
    padding: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    border: 1px solid rgba(255, 255, 255, .25);
    border-radius: 50%;
    background: rgba(15, 15, 15, .48);
    color: #fff;
    font-size: 17px;
    line-height: 1;
    pointer-events: auto;
    backdrop-filter: blur(7px);
    -webkit-backdrop-filter: blur(7px);
}

.video-toolbar button.active,
.video-toolbar button[aria-pressed="true"] {
    background: rgba(254, 44, 85, .9);
    border-color: #fe2c55;
    color: #fff;
}

/* ไอคอนสถานะกล้องและไมค์ */
.stage > .live-device-status {
    position: absolute !important;
    top: 112px !important;
    left: 12px !important;
    right: auto !important;
    z-index: 40 !important;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 9px;
    margin: 0;
    padding: 7px;
    border: 1px solid rgba(255, 255, 255, .18);
    border-radius: 12px;
    background: rgba(0, 0, 0, .4);
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
}

.live-device-status .device-status-icon {
    width: 36px;
    height: 36px;
    color: #eab308;
    background: rgba(0, 0, 0, .2);
    border: 1px solid rgba(255, 255, 255, .15);
}

.live-device-status .device-status-icon.active {
    color: #22c55e;
}

.live-device-status .device-status-icon.error {
    color: #ef4444;
}

/* สินค้าที่ปักด้านล่าง */
.stage > .pinned-product-overlay {
    position: absolute !important;
    left: 12px !important;
    right: 70px !important;
    bottom: 12px !important;
    z-index: 35 !important;
    min-height: 78px;
    padding: 10px;
    border: 1px solid rgba(255, 255, 255, .3);
    border-radius: 14px;
    background: rgba(255, 255, 255, .3);
    color: #222;
    box-shadow: 0 4px 18px rgba(0, 0, 0, .12);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
}

/* แผงข้อมูลลอยทับวิดีโอ ไม่ดันขนาดวิดีโอ */
.livegrid > .panel {
    position: absolute !important;
    top: 112px !important;
    left: 60px !important;
    z-index: 30 !important;
    width: min(300px, calc(100vw - 130px)) !important;
    max-height: calc(100dvh - 220px);
    min-height: 0;
    overflow-x: hidden;
    overflow-y: auto;
    background: rgba(12, 12, 12, .78);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    border: 1px solid rgba(255, 255, 255, .15);
    border-radius: 14px;
}

/* มือถือ */
@media (max-width: 600px) {
    .live > .top {
        height: 52px;
        padding: 0 10px;
    }

    .stage > #liveBadge,
    .stage > .badge {
        top: 60px !important;
        left: 8px !important;
    }

    .stage > #clock,
    .stage > .clock {
        top: 60px !important;
        right: 58px !important;
    }

    .stage > .live-device-status {
        top: 101px !important;
        left: 8px !important;
        gap: 7px;
        padding: 5px;
    }

    .live-device-status .device-status-icon {
        width: 32px;
        height: 32px;
    }

    .stage > .video-toolbar {
        right: 5px !important;
        width: 42px;
        max-height: calc(100% - 115px);
        gap: 12px;
    }

    .video-toolbar button {
        flex-basis: 34px;
        width: 34px;
        height: 34px;
        font-size: 15px;
    }

    .stage > .pinned-product-overlay {
        left: 8px !important;
        right: 50px !important;
        bottom: 8px !important;
        min-height: 72px;
        padding: 8px;
        border-radius: 12px;
    }

    .livegrid > .panel {
        top: 101px !important;
        left: 50px !important;
        width: min(250px, calc(100vw - 105px)) !important;
        max-height: calc(100dvh - 185px);
        padding: 10px;
    }
}

@media (max-height: 500px) {
    .stage > .video-toolbar {
        gap: 6px;
        max-height: calc(100% - 70px);
    }

    .video-toolbar button {
        flex-basis: 30px;
        width: 30px;
        height: 30px;
    }
}