
:root{
  --bg:#f7f5f8;--card:#fff;--ink:#1c1720;--muted:#706a75;--line:#ece6ee;
  --brand:#a400c8;--brand2:#d600a8;--brand3:#7b1cff;--soft:#f7e8fb;
  --ok:#15803d;--warn:#b45309;--bad:#b91c1c;--shadow:0 18px 50px rgba(55,18,67,.10);
}
*{box-sizing:border-box}html{scroll-behavior:smooth}body{margin:0;background:var(--bg);color:var(--ink);font-family:Inter,ui-sans-serif,system-ui,-apple-system,BlinkMacSystemFont,"Segoe UI",sans-serif;line-height:1.55}
a{color:inherit;text-decoration:none}button,input,select,textarea{font:inherit}.page-shell{max-width:1420px;margin:auto;padding:24px 24px 70px}
.topbar{position:sticky;top:0;z-index:100;background:rgba(255,255,255,.94);backdrop-filter:blur(18px);border-bottom:1px solid var(--line)}
.topbar-inner{max-width:1420px;margin:auto;padding:13px 24px;display:flex;gap:18px;align-items:center}.brand{display:flex;flex-direction:column;min-width:180px}.brand span{font-family:Georgia,serif;font-size:1.55rem;font-weight:800;letter-spacing:.06em}.brand small{font-size:.58rem;letter-spacing:.18em;color:var(--brand);font-weight:800}
.header-search{flex:1;max-width:720px;position:relative}.header-search span{position:absolute;left:18px;top:8px;font-size:1.4rem;color:#938b98}.header-search input{width:100%;border:1px solid transparent;background:#f3f0f5;border-radius:16px;padding:13px 18px 13px 48px;outline:0}.header-search input:focus{background:#fff;border-color:#d8b5df;box-shadow:0 0 0 4px #f1dcf6}
.top-actions{margin-left:auto;display:flex;gap:9px;align-items:center}.primary-btn,.soft-btn,.white-btn,.glass-btn,.mini-buy,.icon-btn{display:inline-flex;align-items:center;justify-content:center;border:0;border-radius:13px;padding:11px 17px;font-weight:800;cursor:pointer;transition:.2s}.primary-btn{background:linear-gradient(135deg,var(--brand),var(--brand2));color:#fff;box-shadow:0 9px 25px rgba(164,0,200,.22)}.primary-btn:hover{transform:translateY(-2px)}.soft-btn{background:#f2edf4;color:#312a34}.icon-btn{background:#f2edf4;padding:11px 13px}.large{padding:15px 23px}.huge{width:100%;padding:16px;font-size:1rem;margin-top:14px}
.market-hero{min-height:360px;border-radius:28px;padding:48px 54px;display:flex;align-items:center;justify-content:space-between;overflow:hidden;color:#fff;background:radial-gradient(circle at 80% 20%,#e43cff 0,transparent 24%),linear-gradient(125deg,#660f8f 0%,#a400c8 48%,#d600a8 100%);box-shadow:var(--shadow);position:relative}.market-hero:after{content:"";position:absolute;width:460px;height:460px;border:1px solid rgba(255,255,255,.15);border-radius:50%;right:-150px;bottom:-250px}.hero-copy{max-width:770px;position:relative;z-index:2}.hero-kicker,.section-kicker,.eyebrow{font-size:.72rem;letter-spacing:.18em;font-weight:900;text-transform:uppercase;color:var(--brand)}.hero-kicker{color:#f8c8ff}.market-hero h1{font-family:Georgia,serif;font-size:clamp(2.7rem,5vw,5.3rem);line-height:.98;margin:12px 0 18px}.market-hero p{font-size:1.08rem;max-width:700px;color:#f9eafe}.hero-actions{display:flex;gap:10px;margin-top:26px}.white-btn{background:#fff;color:#74128d}.glass-btn{background:rgba(255,255,255,.12);border:1px solid rgba(255,255,255,.35);color:#fff}.hero-orb{width:240px;height:240px;min-width:240px;border-radius:50%;background:rgba(255,255,255,.14);border:1px solid rgba(255,255,255,.28);display:flex;align-items:center;justify-content:center;transform:rotate(8deg);box-shadow:inset 0 0 50px rgba(255,255,255,.12)}.hero-orb span{font-family:Georgia,serif;font-size:3rem;line-height:.8;font-style:italic;text-align:center}
.trust-strip{display:grid;grid-template-columns:repeat(4,1fr);background:#fff;border-radius:22px;margin:-20px 28px 32px;position:relative;z-index:3;box-shadow:var(--shadow);overflow:hidden}.trust-strip>div{padding:19px 22px;display:flex;align-items:center;gap:13px;border-right:1px solid var(--line)}.trust-strip>div:last-child{border:0}.trust-strip b{font-size:1.35rem;color:var(--brand)}.trust-strip span{font-size:.9rem;font-weight:800}.trust-strip small{color:var(--muted);font-weight:500}
.filters{display:flex;justify-content:space-between;gap:20px;align-items:center;margin:24px 0}.chips{display:flex;gap:8px;overflow-x:auto;padding:2px}.chip{white-space:nowrap;background:#fff;border:1px solid var(--line);border-radius:999px;padding:9px 14px;font-size:.86rem;font-weight:800;color:#605765}.chip.active,.chip:hover{background:#241927;color:#fff;border-color:#241927}.chip small{opacity:.55;margin-left:4px}.filters select{border:1px solid var(--line);background:#fff;border-radius:12px;padding:10px 36px 10px 12px}
.section-head{display:flex;align-items:end;justify-content:space-between;margin:34px 0 18px}.section-head h2{font-family:Georgia,serif;font-size:2rem;margin:4px 0}.muted{color:var(--muted)}
.product-grid{display:grid;grid-template-columns:repeat(4,minmax(0,1fr));gap:18px}.product-card{background:#fff;border-radius:18px;overflow:hidden;border:1px solid #eee8f0;transition:.22s}.product-card:hover{transform:translateY(-4px);box-shadow:var(--shadow)}.product-image{display:block;position:relative;aspect-ratio:1/1.16;background:#eee;overflow:hidden}.product-image img{width:100%;height:100%;object-fit:cover;transition:.35s}.product-card:hover .product-image img{transform:scale(1.035)}.image-badges{position:absolute;top:12px;left:12px;display:flex;gap:6px}.badge{font-size:.64rem;font-weight:900;padding:6px 9px;border-radius:999px;color:#fff}.badge.hot{background:linear-gradient(135deg,#ee335f,#c70062)}.badge.demo{background:#111}.heart{position:absolute;top:10px;right:10px;width:38px;height:38px;border:0;border-radius:50%;background:rgba(255,255,255,.9);font-size:1.5rem;color:#9d2da5;cursor:pointer}.product-body{padding:14px 15px 15px}.seller-line{font-size:.77rem;color:var(--muted);display:flex;align-items:center;gap:5px;margin-bottom:6px}.verify{display:inline-flex;align-items:center;justify-content:center;width:17px;height:17px;background:#1887ff;color:#fff;border-radius:50%;font-size:.68rem;font-weight:900}.verify.big{width:26px;height:26px;font-size:.8rem;vertical-align:middle}.product-title{display:block;font-weight:800;line-height:1.28;min-height:2.55em}.rating-line{display:flex;gap:7px;align-items:center;margin:10px 0;color:#ef9500}.rating-line small{color:var(--muted)}.card-bottom{display:flex;align-items:center;justify-content:space-between;border-top:1px solid #f3eef4;padding-top:12px}.card-bottom strong{font-size:1.2rem}.mini-buy{background:#f4e4f8;color:#8e069f;padding:8px 12px;font-size:.82rem}.seller-cta{margin:64px 0 0;border-radius:26px;background:#211722;color:#fff;padding:36px 40px;display:flex;align-items:center;justify-content:space-between;gap:30px}.seller-cta h2{font-family:Georgia,serif;font-size:2.2rem;margin:4px 0 8px}.seller-cta p{margin:0;color:#cbbfce;max-width:800px}
.breadcrumbs{display:flex;gap:8px;align-items:center;color:var(--muted);font-size:.86rem;margin:8px 0 22px;overflow:hidden}.product-detail{display:grid;grid-template-columns:minmax(0,1.05fr) minmax(420px,.95fr);gap:42px}.detail-gallery{background:#fff;border-radius:24px;padding:14px;position:relative}.detail-gallery img{display:block;width:100%;aspect-ratio:1/1.05;object-fit:cover;border-radius:17px}.demo-banner{position:absolute;left:28px;right:28px;bottom:28px;background:#111;color:#fff;padding:10px;text-align:center;border-radius:10px;font-size:.74rem;font-weight:900}.detail-info{padding:16px 0}.detail-info h1{font-family:Georgia,serif;font-size:clamp(2rem,4vw,3.5rem);line-height:1.05;margin:9px 0 12px}.detail-rating{display:flex;gap:12px;align-items:center;color:var(--muted);font-size:.88rem}.detail-rating b{color:#ec9200}.detail-price{font-size:2rem;font-weight:900;margin:20px 0}.detail-desc{color:#554d58}.spec{display:flex;justify-content:space-between;padding:12px 0;border-top:1px solid var(--line)}.spec span{color:var(--muted)}.seller-card{display:flex;gap:12px;align-items:center;background:#fff;border:1px solid var(--line);border-radius:18px;padding:14px;margin:18px 0}.seller-card>div:nth-child(2){display:flex;flex:1;flex-direction:column}.seller-card small{color:var(--muted);font-size:.67rem;font-weight:900;letter-spacing:.12em}.seller-card strong{font-size:1rem}.seller-card span{font-size:.82rem;color:var(--muted)}.seller-avatar-lg,.seller-avatar-xl{display:flex;align-items:center;justify-content:center;border-radius:50%;background:linear-gradient(135deg,var(--brand),var(--brand2));color:#fff;font-family:Georgia,serif;font-weight:900}.seller-avatar-lg{width:48px;height:48px}.seller-avatar-xl{width:118px;height:118px;font-size:3rem}.buy-note{font-size:.78rem;color:var(--muted);text-align:center}
.content-grid{display:grid;grid-template-columns:minmax(0,1fr) 430px;gap:32px;margin-top:54px}.contact-card,.seller-about,.panel-section{background:#fff;border:1px solid var(--line);border-radius:22px;padding:25px}.contact-card{position:sticky;top:90px;height:max-content}.contact-card h2,.seller-about h2{font-family:Georgia,serif;font-size:1.8rem;margin:5px 0}.form-stack{display:flex;flex-direction:column;gap:15px;margin-top:18px}.form-stack label{font-size:.86rem;font-weight:800;display:flex;flex-direction:column;gap:6px}.form-stack input,.form-stack select,.form-stack textarea{border:1px solid #ddd4e0;border-radius:12px;padding:12px 13px;outline:0;background:#fff}.form-stack input:focus,.form-stack select:focus,.form-stack textarea:focus{border-color:#c16bd3;box-shadow:0 0 0 3px #f3def7}.form-stack small{font-weight:500;color:var(--muted)}.check{flex-direction:row!important;align-items:flex-start}.check input{width:auto;margin-top:4px}.check a{color:var(--brand);text-decoration:underline}.two-col,.three-col{display:grid;gap:14px}.two-col{grid-template-columns:1fr 1fr}.three-col{grid-template-columns:1.3fr 1fr 1fr}
.reviews-grid{display:grid;grid-template-columns:repeat(2,1fr);gap:14px}.review-card{background:#fff;border:1px solid var(--line);border-radius:16px;padding:17px}.review-stars{color:#e99a00}.review-card footer{font-size:.78rem;color:var(--muted)}.review-card footer span{color:var(--ok)}
.seller-hero{display:flex;gap:28px;align-items:center;background:linear-gradient(135deg,#fff,#f8edf9);border-radius:26px;padding:36px;margin-bottom:14px}.seller-hero-copy h1{font-family:Georgia,serif;font-size:3rem;margin:3px 0}.seller-hero-copy p{color:var(--muted)}.seller-metrics{display:flex;gap:10px;margin-top:16px}.seller-metrics b{background:#fff;border:1px solid var(--line);padding:10px 15px;border-radius:12px;min-width:130px}.seller-metrics small{display:block;color:var(--muted);font-weight:500}.badge-row{display:flex;gap:8px;flex-wrap:wrap;margin:12px 0 28px}.badge-row span{background:#eaf8ef;color:#166534;border-radius:999px;padding:7px 11px;font-size:.8rem;font-weight:800}.seller-about{margin-bottom:28px}
.auth-wrap{min-height:72vh;display:grid;place-items:center;padding:45px 18px}.auth-card{width:min(100%,480px);background:#fff;border-radius:24px;padding:32px;box-shadow:var(--shadow);border:1px solid var(--line)}.auth-card.wide{width:min(100%,820px)}.auth-card h1{font-family:Georgia,serif;font-size:2.3rem;margin:5px 0 8px}.auth-card>p{color:var(--muted)}.auth-foot{text-align:center;margin-top:18px!important}.auth-foot a{color:var(--brand);font-weight:800}.diag-grid,.stats-grid{display:grid;grid-template-columns:repeat(4,1fr);gap:12px;margin:22px 0}.diag-grid div,.stats-grid div{background:#fff;border:1px solid var(--line);border-radius:16px;padding:18px}.diag-grid span,.stats-grid span{display:block;color:var(--muted);font-size:.8rem}.stats-grid strong{font-size:1.7rem}.stack{display:flex;gap:10px;margin-top:20px}
.flash{border-radius:12px;padding:12px 14px;margin:12px 0;font-size:.88rem}.flash-success{background:#eaf8ef;color:#166534}.flash-error{background:#fdecec;color:#991b1b}.flash-info{background:#eef5ff;color:#1e4b8f}
.dashboard-head{display:flex;justify-content:space-between;align-items:center;margin:14px 0 24px}.dashboard-head h1{font-family:Georgia,serif;font-size:2.8rem;margin:3px 0}.dashboard-head p{color:var(--muted)}.panel-section{margin:22px 0}.table-wrap{overflow:auto}table{width:100%;border-collapse:collapse}th,td{text-align:left;padding:12px;border-bottom:1px solid var(--line);font-size:.88rem}.table-product{display:flex;align-items:center;gap:10px}.table-product img{width:44px;height:44px;border-radius:9px;object-fit:cover}.status{display:inline-block;border-radius:999px;padding:5px 9px;font-size:.68rem;font-weight:900;text-transform:uppercase}.status-approved,.status-completed,.status-published{background:#e8f7ec;color:#166534}.status-pending,.status-new{background:#fff4d8;color:#8a5600}.status-rejected{background:#fde8e8;color:#991b1b}.inquiry-list{display:grid;gap:12px}.inquiry-card{border:1px solid var(--line);border-radius:15px;padding:17px}.inquiry-card h3{margin:6px 0}.inquiry-card p{color:var(--muted);font-size:.85rem}.inquiry-card blockquote{margin:12px 0;padding-left:13px;border-left:3px solid #e5caeb}.review-link{margin-top:12px}.review-link input{width:100%;padding:9px;border:1px solid var(--line);border-radius:9px;margin-top:5px}.empty-inline,.empty-state{background:#fff;border:1px dashed #d9cfdd;border-radius:18px;padding:28px;text-align:center;color:var(--muted)}.empty-state{padding:70px}.empty-state>div{font-size:3rem}.admin-cards{display:grid;gap:10px}.admin-cards article{display:flex;gap:12px;align-items:center;border:1px solid var(--line);border-radius:14px;padding:12px}.admin-cards img{width:64px;height:64px;object-fit:cover;border-radius:10px}.admin-cards article>div:nth-child(2){flex:1}.admin-cards h3{margin:0}.admin-cards p{margin:3px 0;color:var(--muted);font-size:.82rem}.admin-cards form{display:flex;gap:6px}.admin-cards button{border:0;border-radius:9px;padding:8px 10px;cursor:pointer}
.site-footer{max-width:1420px;margin:0 auto 24px;background:#211722;color:#ded4df;border-radius:24px;padding:35px 38px;display:grid;grid-template-columns:2fr 1fr 1fr;gap:30px}.site-footer strong{font-family:Georgia,serif;font-size:1.4rem;color:#fff}.site-footer p{font-size:.85rem}.site-footer>div:nth-child(2){display:flex;flex-direction:column;gap:6px}
@media(max-width:1100px){.product-grid{grid-template-columns:repeat(3,1fr)}.trust-strip{grid-template-columns:repeat(2,1fr)}.content-grid{grid-template-columns:1fr}.contact-card{position:static}.hero-orb{display:none}}
@media(max-width:780px){.page-shell{padding:16px 14px 50px}.topbar-inner{padding:10px 14px;flex-wrap:wrap}.brand{min-width:auto}.brand small{display:none}.header-search{order:3;flex-basis:100%;max-width:none}.top-actions .soft-btn:first-child{display:none}.market-hero{padding:34px 24px;min-height:330px}.market-hero h1{font-size:3rem}.hero-actions{flex-direction:column}.trust-strip{margin:-14px 10px 24px;grid-template-columns:1fr 1fr}.trust-strip>div{padding:14px}.product-grid{grid-template-columns:repeat(2,1fr);gap:10px}.product-body{padding:11px}.product-title{font-size:.88rem}.rating-line{font-size:.75rem;align-items:flex-start;flex-direction:column;gap:0}.card-bottom strong{font-size:1rem}.filters{align-items:flex-start;flex-direction:column}.product-detail{grid-template-columns:1fr;gap:12px}.content-grid{margin-top:30px}.reviews-grid{grid-template-columns:1fr}.seller-hero{align-items:flex-start;flex-direction:column;padding:24px}.seller-hero-copy h1{font-size:2.2rem}.seller-metrics{flex-wrap:wrap}.seller-metrics b{min-width:110px}.two-col,.three-col{grid-template-columns:1fr}.diag-grid,.stats-grid{grid-template-columns:1fr 1fr}.dashboard-head{align-items:flex-start;flex-direction:column;gap:14px}.site-footer{margin:0 12px 12px;grid-template-columns:1fr;padding:28px}.seller-cta{align-items:flex-start;flex-direction:column;padding:28px}.section-head h2{font-size:1.65rem}}


/* ===== PRODUCT MULTI-MEDIA GALLERY — additive patch ===== */
.media-upload-section{margin:5px 0 2px;border:1px solid var(--line);border-radius:20px;padding:20px;background:linear-gradient(145deg,#fff,#faf5fb)}
.media-upload-head{display:flex;align-items:flex-start;justify-content:space-between;gap:20px;margin-bottom:15px}
.media-upload-head h2{font-family:Georgia,serif;font-size:1.6rem;margin:3px 0 4px}.media-upload-head p{margin:0;color:var(--muted);font-size:.83rem;max-width:560px}
.media-upload-badge{white-space:nowrap;background:var(--soft);color:var(--brand);border-radius:999px;padding:8px 11px;font-size:.7rem;font-weight:900}
.media-file-box{position:relative;display:grid!important;grid-template-columns:42px 1fr;align-items:center;gap:12px;border:1px dashed #cfbfd5;border-radius:15px;padding:15px 16px!important;background:#fff;cursor:pointer;transition:.2s}
.media-file-box:hover{border-color:var(--brand);box-shadow:0 0 0 3px #f5e5f8}
.media-file-box.video{background:linear-gradient(135deg,#fff,#f7f2ff)}
.media-file-box input[type=file]{grid-column:1/-1;width:100%;padding:9px!important;background:#f8f5f9}
.media-file-icon{width:42px;height:42px;border-radius:13px;background:linear-gradient(135deg,var(--brand),var(--brand2));color:#fff;display:grid;place-items:center;font-size:1.05rem}
.media-file-box strong{display:block}.media-file-box small{display:block;margin-top:2px}
.media-preview-grid{display:grid;grid-template-columns:repeat(4,1fr);gap:10px;margin-top:14px}
.media-preview-card{position:relative;background:#fff;border:1px solid var(--line);border-radius:13px;padding:7px;overflow:hidden}
.media-preview-card.primary{box-shadow:0 0 0 2px #e7b9ef}.media-preview-card img,.media-preview-card video{display:block;width:100%;aspect-ratio:1/1;object-fit:cover;border-radius:9px;background:#eee}
.media-preview-card small{display:block;white-space:nowrap;overflow:hidden;text-overflow:ellipsis;padding:6px 2px 1px;font-size:.65rem}
.media-preview-label{position:absolute;left:12px;top:12px;z-index:2;background:rgba(28,23,32,.82);color:#fff;border-radius:999px;padding:4px 7px;font-size:.52rem;font-weight:900}
.media-preview-info{margin-top:10px;font-size:.73rem;color:var(--muted)}

.product-media-gallery{padding:12px}
.media-stage{position:relative;overflow:hidden;border-radius:17px;background:#f0edf2;outline:none}
.media-stage>img,.media-stage>video{display:block;width:100%;aspect-ratio:1/1.05;object-fit:cover;border-radius:17px;background:#111}
.media-stage>video{object-fit:contain}
.media-stage-nav{position:absolute;top:50%;transform:translateY(-50%);z-index:6;width:42px;height:42px;border:0;border-radius:50%;background:rgba(255,255,255,.90);color:#261c29;font-size:2rem;line-height:1;cursor:pointer;box-shadow:0 8px 20px rgba(0,0,0,.14);opacity:.9}
.media-stage-nav:hover{opacity:1;transform:translateY(-50%) scale(1.04)}.media-stage-nav.prev{left:12px}.media-stage-nav.next{right:12px}
.media-stage-count{position:absolute;right:13px;bottom:13px;z-index:5;background:rgba(24,19,26,.76);color:#fff;border-radius:999px;padding:6px 9px;font-size:.67rem;font-weight:900;backdrop-filter:blur(6px)}
.media-thumbs{display:flex;gap:8px;overflow-x:auto;padding:10px 2px 2px;scrollbar-width:thin}
.media-thumb{position:relative;flex:0 0 76px;height:76px;border:2px solid transparent;border-radius:12px;padding:3px;background:#fff;cursor:pointer;overflow:hidden}
.media-thumb.active{border-color:var(--brand);box-shadow:0 0 0 2px #f1d9f5}.media-thumb img{width:100%;height:100%;object-fit:cover;border-radius:8px}
.media-thumb>span:not(.video-thumb-icon){position:absolute;right:6px;bottom:5px;background:rgba(0,0,0,.62);color:#fff;width:18px;height:18px;border-radius:50%;font-size:.58rem;display:grid;place-items:center}
.video-thumb{display:flex;flex-direction:column;align-items:center;justify-content:center;background:linear-gradient(135deg,#25182b,#712986);color:#fff}
.video-thumb-icon{width:30px;height:30px;border-radius:50%;display:grid;place-items:center;background:#fff;color:var(--brand);font-size:.75rem;padding-left:2px}
.video-thumb small{font-size:.52rem;font-weight:900;margin-top:5px;letter-spacing:.08em}

@media(max-width:780px){
  .media-upload-head{flex-direction:column}.media-upload-badge{white-space:normal}
  .media-preview-grid{grid-template-columns:repeat(2,1fr)}
  .media-stage-nav{width:36px;height:36px;font-size:1.65rem}.media-stage-nav.prev{left:8px}.media-stage-nav.next{right:8px}
  .media-thumb{flex-basis:64px;height:64px}
}


/* ===== MEDIA GALLERY FIX + PRODUCT EDIT V2 ===== */

/* Critical: [hidden] must win over the gallery's display:block rule. */
.media-stage>[hidden]{display:none!important}
.media-stage{aspect-ratio:1/1.05;min-height:0}
.media-stage>img,.media-stage>video{
  position:absolute;inset:0;width:100%;height:100%;aspect-ratio:auto;
  object-fit:cover;border-radius:17px;background:#111
}
.media-stage>video{object-fit:contain}
.media-stage:focus-visible{box-shadow:0 0 0 3px #e8b9ef}
.media-stage-nav[hidden]{display:none!important}

.owner-product-actions{display:flex;align-items:center;gap:10px;margin:14px 0}
.edit-product-btn{font-weight:900;color:var(--brand)}
.table-actions{display:flex;gap:7px;align-items:center;flex-wrap:wrap}
.table-action{display:inline-flex;align-items:center;border:1px solid var(--line);border-radius:9px;padding:6px 9px;font-size:.75rem;font-weight:800;background:#fff}
.table-action:hover{border-color:#c5a4cc}
.table-action.edit{background:var(--soft);color:var(--brand);border-color:#ead2ee}

.product-edit-wrap{place-items:start center}
.product-edit-card{width:min(100%,920px)!important}
.edit-page-head{display:flex;justify-content:space-between;align-items:flex-start;gap:20px;margin-bottom:12px}
.edit-page-head h1{margin-bottom:5px}
.edit-status-note{display:flex;align-items:center;gap:12px;padding:13px 15px;border:1px solid var(--line);background:#faf8fb;border-radius:14px;margin:16px 0 20px}
.edit-status-note strong{display:block;font-size:.82rem}.edit-status-note small{display:block;color:var(--muted);font-size:.7rem;margin-top:2px}

.media-edit-section{border:1px solid var(--line);border-radius:20px;padding:20px;background:linear-gradient(145deg,#fff,#faf5fb)}
.current-cover-card{display:grid;grid-template-columns:190px 1fr;gap:18px;align-items:start;padding:14px;border:1px solid var(--line);background:#fff;border-radius:16px;margin-bottom:14px}
.current-cover-image{position:relative}.current-cover-image img{display:block;width:100%;aspect-ratio:1/1;object-fit:cover;border-radius:12px}
.current-cover-image>span{position:absolute;left:9px;top:9px;background:rgba(27,21,29,.82);color:#fff;padding:5px 8px;border-radius:999px;font-size:.55rem;font-weight:900}
.current-cover-card>div:nth-child(2)>strong{display:block;font-size:.95rem;margin-bottom:4px}
.current-cover-card>div:nth-child(2)>p{color:var(--muted);font-size:.78rem;margin:0 0 10px}
.media-file-box.compact{margin:0!important;padding:11px 12px!important}
.media-file-box.compact .media-file-icon{width:36px;height:36px}

.existing-media-grid{display:grid;grid-template-columns:repeat(4,1fr);gap:10px;margin:14px 0}
.existing-media-card{position:relative!important;display:block!important;border:1px solid var(--line);background:#fff;border-radius:14px;padding:7px!important;overflow:hidden;cursor:pointer}
.existing-media-card>img,.existing-media-card>video{display:block;width:100%;aspect-ratio:1/1;object-fit:cover;border-radius:10px;background:#181419}
.existing-media-card.video>video{object-fit:contain}
.existing-media-type{position:absolute;left:12px;top:12px;background:rgba(28,22,30,.82);color:#fff;padding:4px 7px;border-radius:999px;font-size:.5rem;font-weight:900;z-index:2}
.existing-media-type.video{background:rgba(113,41,134,.9)}
.existing-media-remove{display:flex;align-items:center;gap:7px;padding:8px 3px 2px;font-size:.68rem;font-weight:800;color:#6f4d74}
.existing-media-remove input{width:16px!important;height:16px;accent-color:var(--brand);margin:0!important}
.existing-media-card:has(.existing-media-remove input:checked){opacity:.55;box-shadow:inset 0 0 0 2px #d85b76}
.existing-media-card:has(.existing-media-remove input:checked)::after{content:"DO USUNIĘCIA";position:absolute;inset:0 7px 31px;display:grid;place-items:center;background:rgba(91,24,43,.66);color:#fff;font-size:.65rem;font-weight:900;border-radius:10px;z-index:3}

.edit-media-add-grid{display:grid;grid-template-columns:1fr 1fr;gap:10px;margin-top:14px}
.edit-empty-media{margin:12px 0}
.edit-submit-row{display:flex;justify-content:flex-end;align-items:center;gap:10px;margin-top:7px}

@media(max-width:780px){
  .edit-page-head{flex-direction:column}
  .current-cover-card{grid-template-columns:1fr}
  .current-cover-image{max-width:240px}
  .existing-media-grid{grid-template-columns:repeat(2,1fr)}
  .edit-media-add-grid{grid-template-columns:1fr}
  .edit-submit-row{flex-direction:column-reverse;align-items:stretch}
  .edit-submit-row>*{width:100%;text-align:center}
}


/* ===== PRODUCT DELETE ACTION V3 ===== */
.delete-product-form{display:inline-flex;margin:0}
.table-action.delete{
  appearance:none;
  cursor:pointer;
  font:inherit;
  background:#fff5f6;
  color:#b4233f;
  border-color:#f0c4cd;
}
.table-action.delete:hover{
  background:#b4233f;
  border-color:#b4233f;
  color:#fff;
  box-shadow:0 5px 14px rgba(180,35,63,.17);
}
.table-action.delete:focus-visible{
  outline:3px solid rgba(180,35,63,.18);
  outline-offset:2px;
}

/* ============================================================
   TWORIVO — GLOBAL SITE NAVIGATION
   Marketplace -> whole tworivo.pl navigation
   ============================================================ */

.tw-site-nav{
    position:relative;
    z-index:850;

    width:100%;

    background:
        linear-gradient(
            90deg,
            rgba(255,255,255,.98),
            rgba(252,248,253,.98)
        );

    border-top:1px solid rgba(114,63,126,.08);
    border-bottom:1px solid rgba(114,63,126,.12);

    box-shadow:
        0 6px 24px rgba(28,22,32,.035);

    backdrop-filter:blur(16px);
    -webkit-backdrop-filter:blur(16px);
}


.tw-site-nav-inner{
    width:min(1440px,calc(100% - 36px));

    min-height:58px;

    margin:0 auto;

    display:flex;
    align-items:center;
    justify-content:space-between;

    gap:20px;
}


/* BRAND */

.tw-site-home{
    display:flex;

    align-items:center;

    gap:10px;

    flex:0 0 auto;

    text-decoration:none;

    color:#2b2430;
}


.tw-site-mark{
    width:36px;
    height:36px;

    display:grid;
    place-items:center;

    border-radius:11px;

    background:
        linear-gradient(
            135deg,
            #772a8e,
            #a842ba
        );

    color:#fff;

    font-family:Georgia,serif;

    font-size:1.1rem;
    font-weight:800;

    box-shadow:
        0 6px 18px rgba(119,42,142,.22);
}


.tw-site-brand{
    display:flex;
    flex-direction:column;

    line-height:1.05;
}


.tw-site-brand strong{
    font-family:Georgia,serif;

    font-size:.92rem;

    letter-spacing:.07em;

    color:#302735;
}


.tw-site-brand small{
    margin-top:3px;

    font-size:.54rem;

    text-transform:uppercase;

    letter-spacing:.07em;

    color:#887c8c;
}


/* DESKTOP LINKS */

.tw-site-links{
    display:flex;

    align-items:center;
    justify-content:flex-end;

    gap:5px;

    min-width:0;
}


.tw-site-links > a,
.tw-site-docs > summary{
    min-height:38px;

    display:flex;
    align-items:center;

    gap:6px;

    padding:0 11px;

    border-radius:10px;

    color:#554b59;

    font-size:.71rem;
    font-weight:800;

    white-space:nowrap;

    cursor:pointer;

    transition:
        background .18s ease,
        color .18s ease,
        transform .18s ease;
}


.tw-site-links > a:hover,
.tw-site-docs > summary:hover{
    background:#f6edf8;

    color:#76298a;
}


.tw-site-marketplace{
    color:#772a8e !important;

    background:#f6eafa;
}


.tw-site-marketplace span{
    color:#b143c1;
}


/* DOCUMENT DROPDOWN */

.tw-site-docs{
    position:relative;
}


.tw-site-docs summary{
    list-style:none;
}


.tw-site-docs summary::-webkit-details-marker{
    display:none;
}


.tw-chevron{
    margin-left:2px;

    font-size:.8rem;
}


.tw-site-docs[open] > summary{
    background:#f4e9f7;

    color:#772a8e;
}


.tw-site-docs-menu{
    position:absolute;

    right:0;
    top:calc(100% + 10px);

    width:225px;

    padding:8px;

    border-radius:14px;

    background:#fff;

    border:1px solid #eadfed;

    box-shadow:
        0 18px 45px rgba(40,27,44,.13);

    z-index:100;
}


.tw-site-docs-menu::before{
    content:"";

    position:absolute;

    right:22px;
    top:-6px;

    width:12px;
    height:12px;

    background:#fff;

    border-left:1px solid #eadfed;
    border-top:1px solid #eadfed;

    transform:rotate(45deg);
}


.tw-site-docs-menu a{
    display:block;

    padding:10px 11px;

    border-radius:9px;

    color:#5a4d5f;

    font-size:.74rem;
    font-weight:750;
}


.tw-site-docs-menu a:hover{
    background:#f8f1fa;

    color:#75268b;
}


/* MOBILE MENU — hidden desktop */

.tw-mobile-site-menu{
    display:none;
}


/* ============================================================
   TABLETS
   ============================================================ */

@media(max-width:1180px){

    .tw-site-nav-inner{
        width:min(100% - 24px,1200px);
    }


    .tw-site-brand small{
        display:none;
    }


    .tw-site-links > a,
    .tw-site-docs > summary{
        padding-inline:8px;

        font-size:.66rem;
    }

}


@media(max-width:980px){

    .tw-site-links{
        display:none;
    }


    .tw-site-brand small{
        display:block;
    }


    .tw-mobile-site-menu{
        display:block;

        position:relative;

        margin-left:auto;
    }


    .tw-mobile-site-menu > summary{
        min-height:42px;

        display:flex;
        align-items:center;

        gap:9px;

        list-style:none;

        padding:0 14px;

        border:1px solid #e4d5e8;

        border-radius:999px;

        background:#fff;

        color:#672477;

        cursor:pointer;

        font-size:.75rem;
        font-weight:850;

        box-shadow:
            0 4px 14px rgba(58,37,63,.05);
    }


    .tw-mobile-site-menu > summary::-webkit-details-marker{
        display:none;
    }


    .tw-mobile-menu-icon{
        width:18px;

        display:flex;
        flex-direction:column;

        gap:3px;
    }


    .tw-mobile-menu-icon i{
        width:18px;
        height:2px;

        display:block;

        border-radius:2px;

        background:#722887;
    }


    .tw-mobile-site-menu[open] > summary{
        color:#fff;

        border-color:#75298b;

        background:
            linear-gradient(
                135deg,
                #6e2782,
                #9c39af
            );
    }


    .tw-mobile-site-menu[open] .tw-mobile-menu-icon i{
        background:#fff;
    }


    .tw-mobile-site-panel{
        position:absolute;

        top:calc(100% + 10px);
        right:0;

        width:min(390px,calc(100vw - 24px));

        max-height:
            calc(100dvh - 145px);

        overflow-y:auto;

        overscroll-behavior:contain;

        padding:12px;

        border:1px solid #e7dae9;

        border-radius:20px;

        background:
            rgba(255,255,255,.985);

        box-shadow:
            0 24px 60px rgba(34,24,38,.17);

        z-index:1200;

        -webkit-overflow-scrolling:touch;
    }


    .tw-mobile-site-heading{
        padding:7px 8px 8px;

        color:#9b8c9f;

        font-size:.59rem;
        font-weight:900;

        letter-spacing:.12em;

        text-transform:uppercase;
    }


    .tw-mobile-site-panel > a{
        min-height:56px;

        display:grid;

        grid-template-columns:40px 1fr;

        align-items:center;

        gap:10px;

        padding:8px;

        border-radius:13px;

        color:#352c39;

        transition:
            background .17s ease,
            transform .17s ease;
    }


    .tw-mobile-site-panel > a:hover{
        background:#f8f2fa;
    }


    .tw-mobile-site-panel > a.featured{
        background:
            linear-gradient(
                135deg,
                #f6eafa,
                #fbf5fc
            );
    }


    .tw-mobile-link-icon{
        width:40px;
        height:40px;

        display:grid;
        place-items:center;

        border-radius:12px;

        background:#f3e8f6;

        color:#792b8e;

        font-size:.78rem;
        font-weight:900;
    }


    .tw-mobile-site-panel strong{
        display:block;

        color:#362b3a;

        font-size:.8rem;
    }


    .tw-mobile-site-panel small{
        display:block;

        margin-top:2px;

        color:#897d8c;

        font-size:.63rem;

        line-height:1.3;
    }


    .tw-mobile-separator{
        height:1px;

        margin:8px 5px;

        background:#eee5f0;
    }


    .tw-mobile-quick-actions{
        display:grid;

        grid-template-columns:1fr 1fr;

        gap:7px;

        padding-top:4px;
    }


    .tw-mobile-quick-actions a{
        min-height:42px;

        display:flex;
        align-items:center;
        justify-content:center;

        padding:7px 8px;

        border-radius:11px;

        text-align:center;

        font-size:.68rem;
        font-weight:850;
    }


    .tw-mobile-reserve{
        background:#f3e8f6;

        color:#722887;
    }


    .tw-mobile-market{
        color:#fff;

        background:
            linear-gradient(
                135deg,
                #702985,
                #a13ab4
            );
    }

}


/* ============================================================
   PHONES
   ============================================================ */

@media(max-width:620px){

    .tw-site-nav-inner{
        width:calc(100% - 20px);

        min-height:54px;
    }


    .tw-site-mark{
        width:32px;
        height:32px;

        border-radius:10px;
    }


    .tw-site-brand strong{
        font-size:.8rem;
    }


    .tw-site-brand small{
        font-size:.46rem;
    }


    .tw-mobile-site-menu > summary{
        min-height:38px;

        padding:0 10px;

        font-size:.67rem;
    }


    .tw-mobile-site-menu > summary > span:nth-child(2){
        display:none;
    }


    .tw-mobile-site-panel{
        position:fixed;

        top:auto;
        right:10px;
        left:10px;
        bottom:
            max(
                10px,
                env(safe-area-inset-bottom)
            );

        width:auto;

        max-height:
            min(
                74dvh,
                620px
            );

        border-radius:22px;

        padding:10px;
    }


    .tw-mobile-quick-actions{
        position:sticky;

        bottom:0;

        padding-top:9px;

        background:#fff;
    }

}


/* iPhone safe area */

@supports(
    padding:max(0px)
){

    .tw-site-nav{
        padding-left:
            max(
                0px,
                env(safe-area-inset-left)
            );

        padding-right:
            max(
                0px,
                env(safe-area-inset-right)
            );
    }

}


/* Short landscape phones */

@media(
    orientation:landscape
)
and
(max-height:520px){

    .tw-mobile-site-panel{
        max-height:72dvh;
    }

}


/* Reduced motion */

@media(
    prefers-reduced-motion:reduce
){

    .tw-site-nav *,
    .tw-site-nav *::before,
    .tw-site-nav *::after{
        transition:none !important;
        animation:none !important;
    }

}


/* ============================================================
   SELLER PROFILE EDITOR + PUBLIC TRUST PROFILE V4
   Additive only — existing Marketplace styles remain intact.
   ============================================================ */

.dashboard-main-actions{
  display:flex;
  align-items:center;
  justify-content:flex-end;
  gap:9px;
  flex-wrap:wrap;
}

.profile-completion-card{
  display:flex;
  align-items:center;
  justify-content:space-between;
  gap:24px;
  margin:0 0 22px;
  padding:22px 24px;
  border:1px solid #e9ddec;
  border-radius:22px;
  background:
    radial-gradient(circle at 8% 20%,rgba(164,0,200,.08),transparent 34%),
    linear-gradient(135deg,#fff,#faf5fb);
}

.profile-completion-main{
  display:flex;
  align-items:center;
  gap:18px;
}

.profile-completion-ring{
  --profile-progress:0%;
  width:76px;
  height:76px;
  flex:0 0 76px;
  display:grid;
  place-items:center;
  position:relative;
  border-radius:50%;
  background:
    conic-gradient(
      var(--brand) var(--profile-progress),
      #eee7f0 0
    );
}

.profile-completion-ring::after{
  content:"";
  position:absolute;
  inset:7px;
  border-radius:50%;
  background:#fff;
}

.profile-completion-ring strong{
  position:relative;
  z-index:2;
  font-size:.88rem;
}

.profile-completion-main h2{
  margin:3px 0 4px;
  font-family:Georgia,serif;
  font-size:1.5rem;
}

.profile-completion-main p{
  margin:0;
  max-width:660px;
  color:var(--muted);
  font-size:.82rem;
}

.profile-edit-wrap{
  width:min(1100px,100%);
  margin:0 auto;
}

.profile-editor-head{
  display:flex;
  justify-content:space-between;
  align-items:flex-start;
  gap:24px;
  margin:12px 0 24px;
}

.profile-editor-head h1{
  margin:4px 0 8px;
  font-family:Georgia,serif;
  font-size:clamp(2rem,4vw,3.25rem);
}

.profile-editor-head p{
  margin:0;
  max-width:720px;
  color:var(--muted);
}

.profile-editor-actions{
  display:flex;
  gap:9px;
  align-items:center;
  flex-wrap:wrap;
}

.profile-editor-form{
  display:grid;
  gap:18px;
}

.profile-edit-card{
  padding:26px;
  border:1px solid var(--line);
  border-radius:24px;
  background:#fff;
  box-shadow:0 10px 34px rgba(55,18,67,.045);
}

.profile-edit-card-head{
  display:flex;
  align-items:flex-start;
  justify-content:space-between;
  gap:20px;
  margin-bottom:20px;
}

.profile-edit-card-head h2{
  margin:4px 0 3px;
  font-family:Georgia,serif;
  font-size:1.65rem;
}

.profile-edit-card-head p{
  margin:4px 0 0;
  color:var(--muted);
  font-size:.82rem;
}

.profile-edit-card-head>small{
  color:var(--muted);
  font-size:.72rem;
  font-weight:700;
}

.profile-editor-form label{
  font-size:.84rem;
  font-weight:800;
}

.profile-editor-form input,
.profile-editor-form textarea,
.profile-editor-form select{
  width:100%;
  margin-top:6px;
  border:1px solid #ddd4e0;
  border-radius:12px;
  padding:12px 13px;
  outline:0;
  background:#fff;
}

.profile-editor-form input:focus,
.profile-editor-form textarea:focus,
.profile-editor-form select:focus{
  border-color:#c16bd3;
  box-shadow:0 0 0 3px #f3def7;
}

.profile-editor-form label>small{
  display:block;
  margin-top:5px;
  color:var(--muted);
  font-weight:500;
}

.profile-media-grid{
  display:grid;
  grid-template-columns:1fr 1fr;
  gap:14px;
}

.profile-media-box{
  display:grid;
  grid-template-columns:120px minmax(0,1fr);
  gap:16px;
  align-items:center;
  padding:14px;
  border:1px solid var(--line);
  border-radius:18px;
  background:#faf8fb;
}

.profile-media-preview{
  overflow:hidden;
  background:
    linear-gradient(135deg,var(--brand),var(--brand2));
  color:#fff;
}

.avatar-preview{
  width:112px;
  height:112px;
  display:grid;
  place-items:center;
  border-radius:50%;
  font-family:Georgia,serif;
  font-size:2.8rem;
  font-weight:900;
}

.avatar-preview img{
  width:100%;
  height:100%;
  object-fit:cover;
}

.cover-box{
  grid-template-columns:180px minmax(0,1fr);
}

.cover-preview{
  width:180px;
  height:112px;
  display:grid;
  place-items:center;
  border-radius:14px;
  text-align:center;
  font-family:Georgia,serif;
  font-size:1.15rem;
  font-weight:900;
  letter-spacing:.08em;
}

.cover-preview small{
  font-size:.55rem;
  letter-spacing:.14em;
}

.cover-preview img{
  width:100%;
  height:100%;
  object-fit:cover;
}

.profile-media-box strong{
  display:block;
  margin-bottom:3px;
}

.profile-media-box p{
  margin:0 0 10px;
  color:var(--muted);
  font-size:.75rem;
}

.profile-upload-control{
  display:flex!important;
  align-items:center;
  justify-content:center;
  min-height:40px;
  padding:8px 11px;
  border:1px solid #dccde0;
  border-radius:10px;
  background:#fff;
  color:var(--brand);
  cursor:pointer;
}

.profile-upload-control input{
  position:absolute;
  width:1px!important;
  height:1px;
  opacity:0;
  pointer-events:none;
}

.profile-remove-check{
  display:flex!important;
  flex-direction:row!important;
  align-items:center;
  gap:7px;
  margin-top:8px;
  color:#9b2440;
  font-size:.72rem!important;
}

.profile-remove-check input{
  width:16px!important;
  height:16px;
  margin:0;
  accent-color:#b4233f;
}

.profile-privacy-box{
  margin-top:18px;
  padding:16px;
  border:1px solid #e8dceb;
  border-radius:16px;
  background:#faf7fb;
}

.profile-privacy-box>strong{
  display:block;
  margin-bottom:3px;
}

.profile-privacy-box>p{
  margin:0 0 12px;
  color:var(--muted);
  font-size:.76rem;
}

.profile-privacy-grid{
  display:grid;
  grid-template-columns:repeat(3,minmax(0,1fr));
  gap:9px;
}

.profile-privacy-grid .check{
  padding:10px 11px;
  border:1px solid #ebe3ed;
  border-radius:12px;
  background:#fff;
}

.profile-save-bar{
  position:sticky;
  bottom:12px;
  z-index:20;
  display:flex;
  align-items:center;
  justify-content:space-between;
  gap:18px;
  padding:14px 16px;
  border:1px solid #e4d5e8;
  border-radius:18px;
  background:rgba(255,255,255,.94);
  box-shadow:0 18px 45px rgba(45,24,52,.13);
  backdrop-filter:blur(16px);
  -webkit-backdrop-filter:blur(16px);
}

.profile-save-bar strong{
  display:block;
  font-size:.84rem;
}

.profile-save-bar small{
  display:block;
  margin-top:2px;
  color:var(--muted);
  font-size:.68rem;
}

/* PUBLIC SELLER PROFILE */

.seller-profile-hero{
  position:relative;
  overflow:hidden;
  margin-bottom:14px;
  border:1px solid #eadfed;
  border-radius:28px;
  background:#fff;
  box-shadow:var(--shadow);
}

.seller-cover{
  position:relative;
  height:250px;
  overflow:hidden;
  background:
    radial-gradient(circle at 84% 18%,rgba(228,60,255,.5),transparent 26%),
    linear-gradient(125deg,#5b0d80,#a400c8 54%,#d600a8);
}

.seller-cover img{
  width:100%;
  height:100%;
  object-fit:cover;
}

.seller-cover-shade{
  position:absolute;
  inset:0;
  background:
    linear-gradient(180deg,rgba(20,11,24,.03),rgba(20,11,24,.34));
}

.seller-profile-main{
  position:relative;
  display:flex;
  align-items:flex-end;
  gap:22px;
  padding:0 32px 30px;
  margin-top:-62px;
  z-index:3;
}

.seller-profile-avatar{
  width:132px;
  height:132px;
  flex:0 0 132px;
  overflow:hidden;
  display:grid;
  place-items:center;
  border:6px solid #fff;
  border-radius:50%;
  background:
    linear-gradient(135deg,var(--brand),var(--brand2));
  color:#fff;
  box-shadow:0 12px 30px rgba(42,22,48,.18);
  font-family:Georgia,serif;
  font-size:3.2rem;
  font-weight:900;
}

.seller-profile-avatar img{
  width:100%;
  height:100%;
  object-fit:cover;
}

.seller-profile-copy{
  flex:1;
  padding-top:72px;
}

.seller-profile-copy h1{
  margin:3px 0 5px;
  font-family:Georgia,serif;
  font-size:clamp(2rem,4vw,3.5rem);
  line-height:1.04;
}

.seller-profile-meta{
  margin:0;
  color:var(--muted);
}

.seller-public-grid{
  display:grid;
  grid-template-columns:minmax(0,1.3fr) minmax(300px,.7fr);
  gap:20px;
  margin-bottom:32px;
}

.seller-about-expanded{
  margin:0;
}

.seller-about-expanded>p{
  color:#554d58;
  line-height:1.75;
}

.seller-public-detail{
  display:flex;
  justify-content:space-between;
  gap:20px;
  padding:12px 0;
  border-top:1px solid var(--line);
}

.seller-public-detail span{
  color:var(--muted);
  font-size:.78rem;
}

.seller-public-detail strong{
  text-align:right;
  font-size:.82rem;
}

.seller-trust-panel{
  padding:24px;
  border:1px solid var(--line);
  border-radius:22px;
  background:
    linear-gradient(145deg,#fff,#faf5fb);
}

.seller-trust-panel h2{
  margin:5px 0 7px;
  font-family:Georgia,serif;
  font-size:1.55rem;
}

.seller-trust-panel>p{
  margin:0 0 15px;
  color:var(--muted);
  font-size:.79rem;
}

.seller-socials{
  display:grid;
  gap:8px;
}

.seller-social{
  min-height:48px;
  display:grid;
  grid-template-columns:34px 1fr 22px;
  align-items:center;
  gap:9px;
  padding:8px 10px;
  border:1px solid #eadfed;
  border-radius:13px;
  background:#fff;
  transition:.18s;
}

.seller-social:hover{
  transform:translateY(-1px);
  border-color:#d8b7df;
  box-shadow:0 8px 20px rgba(55,18,67,.07);
}

.seller-social>span{
  width:34px;
  height:34px;
  display:grid;
  place-items:center;
  border-radius:10px;
  background:#f4e7f8;
  color:var(--brand);
  font-weight:900;
}

.seller-social>strong{
  font-size:.78rem;
}

.seller-social>b{
  color:#a58aa9;
  font-size:.8rem;
}

.seller-trust-note{
  display:flex;
  gap:9px;
  margin-top:14px;
  padding:12px;
  border-radius:13px;
  background:#eaf8ef;
  color:#166534;
}

.seller-trust-note>span{
  font-weight:900;
}

.seller-trust-note p{
  margin:0;
  font-size:.7rem;
}

.seller-no-socials{
  padding:17px;
  font-size:.75rem;
}

@media(max-width:900px){
  .profile-media-grid{
    grid-template-columns:1fr;
  }

  .seller-public-grid{
    grid-template-columns:1fr;
  }

  .profile-privacy-grid{
    grid-template-columns:1fr;
  }
}

@media(max-width:780px){
  .dashboard-main-actions{
    width:100%;
    justify-content:flex-start;
  }

  .dashboard-main-actions .large{
    flex:1 1 auto;
  }

  .profile-completion-card{
    flex-direction:column;
    align-items:flex-start;
  }

  .profile-editor-head{
    flex-direction:column;
  }

  .profile-editor-actions{
    width:100%;
  }

  .profile-editor-actions a{
    flex:1;
  }

  .profile-edit-card{
    padding:18px 14px;
    border-radius:19px;
  }

  .profile-edit-card-head{
    flex-direction:column;
    gap:7px;
  }

  .profile-media-box,
  .cover-box{
    grid-template-columns:1fr;
  }

  .avatar-preview,
  .cover-preview{
    margin:auto;
  }

  .profile-save-bar{
    bottom:max(8px,env(safe-area-inset-bottom));
    flex-direction:column;
    align-items:stretch;
  }

  .profile-save-bar .primary-btn{
    width:100%;
  }

  .seller-cover{
    height:180px;
  }

  .seller-profile-main{
    flex-direction:column;
    align-items:flex-start;
    padding:0 18px 22px;
    margin-top:-54px;
    gap:10px;
  }

  .seller-profile-avatar{
    width:108px;
    height:108px;
    flex-basis:108px;
    border-width:5px;
    font-size:2.6rem;
  }

  .seller-profile-copy{
    width:100%;
    padding-top:0;
  }

  .seller-metrics{
    width:100%;
  }

  .seller-metrics b{
    flex:1 1 100px;
    min-width:0;
  }

  .seller-public-detail{
    flex-direction:column;
    gap:4px;
  }

  .seller-public-detail strong{
    text-align:left;
  }
}

@media(max-width:480px){
  .profile-completion-main{
    align-items:flex-start;
  }

  .profile-completion-ring{
    width:64px;
    height:64px;
    flex-basis:64px;
  }

  .profile-editor-actions{
    flex-direction:column;
    align-items:stretch;
  }

  .seller-profile-main{
    text-align:left;
  }

  .seller-metrics{
    display:grid;
    grid-template-columns:1fr;
  }
}


/* ============================================================
   TWORIVO MARKETPLACE V5 — OFFLINE + PAYMENTS + LOCATIONS
   Additive extension. Existing V1–V4 styles remain untouched.
   ============================================================ */

.badge.store{background:#e6f6ed;color:#166534}
.badge.unique{background:#fff4d8;color:#9a5a00}
.badge.order{background:#eef0ff;color:#4b4c9c}

.seller-mini-avatar{
  width:22px;
  height:22px;
  flex:0 0 22px;
  object-fit:cover;
  border-radius:50%;
  border:1px solid #e3d8e6;
}

.availability-line{
  min-height:34px;
  margin:8px 0 4px;
  color:#706474;
  font-size:.68rem;
  line-height:1.35;
}
.availability-line a{
  color:#277153;
  font-weight:800;
}

.advanced-filter-row{
  display:flex;
  align-items:flex-end;
  gap:8px;
}
.advanced-filter-row label{
  display:grid;
  gap:4px;
  color:var(--muted);
  font-size:.62rem;
  font-weight:800;
}
.advanced-filter-row select{
  min-width:190px;
}
.price-filter-control{
  display:flex;
  gap:5px;
}
.price-filter-control input{
  width:100px;
  border:1px solid var(--line);
  border-radius:9px;
  padding:8px 9px;
}
.filter-apply-btn{
  border:0;
  border-radius:9px;
  padding:8px 10px;
  background:var(--ink);
  color:#fff;
  font-weight:900;
  cursor:pointer;
}

.catalog-smart-links{
  display:flex;
  align-items:center;
  gap:8px;
  flex-wrap:wrap;
  margin:-8px 0 26px;
  color:var(--muted);
  font-size:.7rem;
}
.catalog-smart-links>a{
  padding:7px 10px;
  border:1px solid var(--line);
  border-radius:999px;
  background:#fff;
  color:#5a4c5f;
  font-weight:800;
}
.catalog-smart-links>a:hover{
  border-color:#d7b8dd;
  color:var(--brand);
}

.catalog-b2b-card{
  min-height:100%;
  display:flex;
  flex-direction:column;
  justify-content:center;
  padding:24px;
  border-radius:18px;
  color:#fff;
  background:
    radial-gradient(circle at 80% 14%,rgba(255,214,103,.24),transparent 30%),
    linear-gradient(145deg,#4d0c68,#8a25a2 60%,#b13ebd);
  box-shadow:var(--shadow);
}
.catalog-b2b-card h3{
  margin:7px 0 7px;
  color:#fff;
  font-family:Georgia,serif;
  font-size:1.55rem;
}
.catalog-b2b-card p{
  color:rgba(255,255,255,.78);
  font-size:.8rem;
  line-height:1.55;
}
.catalog-b2b-card>div{
  display:flex;
  gap:7px;
  flex-wrap:wrap;
  margin-top:12px;
}
.catalog-b2b-card .white-btn,
.catalog-b2b-card .glass-btn{
  min-height:40px;
  padding:10px 12px;
  border-radius:10px;
  font-size:.72rem;
}

.detail-status-badges{
  display:flex;
  gap:7px;
  flex-wrap:wrap;
  margin-bottom:9px;
}
.detail-status{
  display:inline-flex;
  align-items:center;
  padding:6px 9px;
  border-radius:999px;
  font-size:.58rem;
  font-weight:900;
  letter-spacing:.06em;
}
.detail-status.store{background:#e9f7ef;color:#166534}
.detail-status.unique{background:#fff4dc;color:#9a5a00}
.detail-status.order{background:#eff1ff;color:#4d4f99}

.product-store-box{
  display:grid;
  grid-template-columns:42px minmax(0,1fr) auto;
  align-items:center;
  gap:11px;
  margin:14px 0;
  padding:13px;
  border:1px solid #cfe5d8;
  border-radius:15px;
  background:#f4fbf7;
}
.store-pin{
  width:42px;
  height:42px;
  display:grid;
  place-items:center;
  border-radius:12px;
  background:#daf0e3;
}
.product-store-box small{
  display:block;
  color:#34755a;
  font-size:.55rem;
  font-weight:900;
  letter-spacing:.08em;
}
.product-store-box strong{
  display:block;
  margin:2px 0;
  color:#173d2d;
}
.product-store-box span:not(.store-pin),
.product-store-box em{
  display:block;
  color:#5e7769;
  font-size:.68rem;
  font-style:normal;
}
.product-store-box>b{color:#2f7156}

.seller-avatar-lg img{
  width:100%;
  height:100%;
  object-fit:cover;
  border-radius:inherit;
}

.product-buy-panel{
  margin-top:16px;
}
.payment-live-head{
  display:flex;
  align-items:center;
  gap:10px;
  margin-bottom:10px;
  padding:11px 12px;
  border-radius:13px;
  background:#f7f5f8;
}
.payment-live-head>span{
  width:36px;
  height:36px;
  display:grid;
  place-items:center;
  border-radius:10px;
  background:#fff;
}
.payment-live-head strong,
.payment-live-head small{display:block}
.payment-live-head small{color:var(--muted);font-size:.64rem}

.payment-buttons{
  display:grid;
  grid-template-columns:1fr 1fr;
  gap:8px;
}
.payment-btn{
  min-height:48px;
  display:flex;
  align-items:center;
  justify-content:center;
  border-radius:12px;
  padding:10px 12px;
  text-align:center;
  font-size:.78rem;
  font-weight:900;
}
.payment-btn.blik{background:#e81562;color:#fff}
.payment-btn.p24{background:#083b67;color:#fff}
.payment-or{
  display:flex;
  align-items:center;
  gap:10px;
  margin:10px 0;
  color:#a092a4;
  font-size:.62rem;
}
.payment-or::before,.payment-or::after{
  content:"";
  height:1px;
  flex:1;
  background:var(--line);
}

.market-v5-product-options{
  padding:18px;
  border:1px solid var(--line);
  border-radius:18px;
  background:#fbf9fc;
}
.market-v5-product-options h2{
  margin:4px 0 13px;
  font-family:Georgia,serif;
  font-size:1.35rem;
}
.market-v5-unique-check{
  margin-top:10px!important;
  padding:11px!important;
  border:1px solid #ebe2ed;
  border-radius:12px;
  background:#fff;
}
.market-v5-unique-check strong,
.market-v5-unique-check small{display:block}
.market-v5-unique-check small{margin-top:2px;color:var(--muted);font-weight:500}
.store-assignment-note{
  margin-top:12px;
  padding:12px;
  border-radius:12px;
  background:#edf8f1;
  color:#1e633f;
}
.store-assignment-note strong,
.store-assignment-note span{display:block}
.store-assignment-note span{margin-top:3px;font-size:.72rem}

/* Locations */
.locations-hero{
  display:flex;
  align-items:flex-end;
  justify-content:space-between;
  gap:24px;
  margin:10px 0 26px;
  padding:40px;
  border-radius:28px;
  color:#fff;
  background:
    radial-gradient(circle at 85% 10%,rgba(255,255,255,.17),transparent 26%),
    linear-gradient(135deg,#214a3c,#34745a 60%,#4b8e70);
}
.locations-hero h1{
  margin:6px 0 9px;
  max-width:720px;
  color:#fff;
  font-family:Georgia,serif;
  font-size:clamp(2.2rem,4.8vw,4rem);
  line-height:1.04;
}
.locations-hero p{
  max-width:780px;
  color:rgba(255,255,255,.78);
}
.locations-empty{
  min-height:420px;
  display:grid;
  place-items:center;
  align-content:center;
  gap:9px;
  text-align:center;
  border:1px dashed #d9cadc;
  border-radius:24px;
  background:#fff;
}
.locations-empty-icon{
  width:70px;
  height:70px;
  display:grid;
  place-items:center;
  border-radius:50%;
  background:#eef7f2;
  color:#2f7557;
  font-size:2rem;
}
.locations-empty h2{margin:5px 0 0;font-family:Georgia,serif;font-size:2rem}
.locations-empty p{max-width:650px;color:var(--muted)}
.locations-empty>div:last-child{display:flex;gap:8px;flex-wrap:wrap;justify-content:center}

.locations-layout{
  display:grid;
  grid-template-columns:minmax(0,1.1fr) minmax(320px,.9fr);
  gap:20px;
  align-items:start;
}
.locations-map{
  height:min(72vh,720px);
  min-height:520px;
  position:sticky;
  top:90px;
  overflow:hidden;
  border:1px solid var(--line);
  border-radius:22px;
  box-shadow:var(--shadow);
}
.locations-list{display:grid;gap:12px}
.location-card{
  padding:20px;
  border:1px solid var(--line);
  border-radius:19px;
  background:#fff;
}
.location-card:target{
  box-shadow:0 0 0 3px #dff2e7,0 18px 35px rgba(29,83,58,.12);
}
.location-card-top{
  display:flex;
  align-items:center;
  gap:11px;
}
.location-pin{
  width:44px;
  height:44px;
  display:grid;
  place-items:center;
  border-radius:13px;
  background:#e8f7ee;
}
.location-card h2{margin:3px 0 0;font-family:Georgia,serif}
.location-address{color:#4c5e54;font-weight:800}
.location-detail{
  display:flex;
  justify-content:space-between;
  gap:18px;
  padding:10px 0;
  border-top:1px solid var(--line);
  font-size:.75rem;
}
.location-detail span{color:var(--muted)}
.location-description{color:#655a67;font-size:.78rem;line-height:1.6}
.location-actions{display:flex;gap:7px;flex-wrap:wrap;margin-top:13px}

/* Checkout */
.checkout-wrap{
  width:min(760px,100%);
  margin:22px auto 60px;
}
.checkout-card,
.payment-return-card{
  padding:26px;
  border:1px solid var(--line);
  border-radius:24px;
  background:#fff;
  box-shadow:var(--shadow);
}
.checkout-product{
  display:grid;
  grid-template-columns:110px minmax(0,1fr);
  gap:16px;
  align-items:center;
  margin-bottom:18px;
}
.checkout-product img{
  width:110px;
  height:110px;
  object-fit:cover;
  border-radius:15px;
}
.checkout-product h1{
  margin:4px 0;
  font-family:Georgia,serif;
  font-size:1.6rem;
}
.checkout-product>div>strong{
  color:var(--brand);
  font-size:1.2rem;
}
.checkout-method{
  display:flex;
  gap:12px;
  align-items:center;
  padding:13px;
  margin-bottom:16px;
  border-radius:14px;
  background:#f7f5f8;
}
.checkout-method>span{
  width:48px;
  height:48px;
  display:grid;
  place-items:center;
  border-radius:12px;
  color:#fff;
  font-weight:900;
}
.checkout-method.blik>span{background:#e81562}
.checkout-method.p24>span{background:#083b67}
.checkout-method strong,.checkout-method small{display:block}
.checkout-method small{margin-top:2px;color:var(--muted);font-size:.68rem}
.checkout-security{
  margin:14px 0 0;
  color:#6f6472;
  font-size:.7rem;
  text-align:center;
}
.payment-return-card{text-align:center}
.payment-status-icon{
  width:78px;
  height:78px;
  margin:0 auto 12px;
  display:grid;
  place-items:center;
  border-radius:50%;
  font-size:2rem;
  font-weight:900;
}
.payment-status-icon.success{background:#e7f7ed;color:#24734e}
.payment-status-icon.pending{background:#f2edf4;color:#7b5e80}
.payment-return-card h1{font-family:Georgia,serif;font-size:2.2rem}
.payment-return-card p{max-width:560px;margin:0 auto 18px;color:var(--muted)}
.payment-return-card .soft-btn{margin-left:7px}

/* Admin V5 */
.admin-jump-nav{
  position:sticky;
  top:76px;
  z-index:40;
  display:flex;
  gap:6px;
  flex-wrap:wrap;
  margin:0 0 18px;
  padding:8px;
  border:1px solid var(--line);
  border-radius:14px;
  background:rgba(255,255,255,.94);
  backdrop-filter:blur(12px);
}
.admin-jump-nav a{
  padding:8px 10px;
  border-radius:9px;
  font-size:.7rem;
  font-weight:900;
}
.admin-jump-nav a:hover{background:#f4e9f7;color:var(--brand)}

.admin-product-v5{
  grid-template-columns:90px minmax(180px,1fr) auto minmax(250px,.9fr)!important;
}
.admin-product-main{min-width:0}
.admin-store-state{
  display:inline-flex;
  margin-top:5px;
  padding:5px 7px;
  border-radius:999px;
  background:#e9f7ef;
  color:#17633f;
  font-size:.58rem;
  font-weight:900;
}
.admin-inline-actions{display:flex;gap:5px;flex-wrap:wrap}
.admin-location-assign{
  display:grid;
  grid-template-columns:1fr 100px;
  gap:6px;
  align-items:end;
}
.admin-location-assign label{display:grid;gap:3px;font-size:.58rem;color:var(--muted);font-weight:800}
.admin-location-assign select,
.admin-location-assign input{
  width:100%;
  padding:7px 8px;
  border:1px solid var(--line);
  border-radius:8px;
}
.admin-location-assign .compact-admin-check{
  grid-column:1/-1;
  align-items:center;
}
.admin-location-assign .soft-btn{grid-column:1/-1}

.admin-location-create{
  display:grid;
  grid-template-columns:minmax(0,1fr) minmax(330px,.85fr);
  gap:18px;
}
.admin-location-map{
  height:440px;
  overflow:hidden;
  border:1px solid var(--line);
  border-radius:18px;
}
.admin-location-create>div>small{
  display:block;
  margin-top:6px;
  color:var(--muted);
}
.admin-location-list{
  display:grid;
  grid-template-columns:repeat(2,minmax(0,1fr));
  gap:12px;
  margin-top:18px;
}
.admin-location-card{
  display:grid;
  gap:8px;
  padding:16px;
  border:1px solid var(--line);
  border-radius:16px;
  background:#fff;
}
.admin-location-card label{display:grid;gap:4px;font-size:.68rem;font-weight:800}
.admin-location-card input,
.admin-location-card textarea{
  width:100%;
  padding:8px 9px;
  border:1px solid var(--line);
  border-radius:8px;
}
.admin-location-card-actions{display:flex;gap:7px}

.payment-admin-shell{
  padding:20px;
  border:1px solid var(--line);
  border-radius:20px;
  background:#fff;
}
.payment-admin-warning{
  margin-bottom:15px;
  padding:14px;
  border-radius:13px;
  background:#fff7e8;
  color:#855008;
}
.payment-admin-warning p{margin:3px 0 0;font-size:.75rem}
.payment-toggle-grid{
  display:grid;
  grid-template-columns:repeat(4,minmax(0,1fr));
  gap:8px;
}
.payment-toggle{
  display:flex!important;
  flex-direction:row!important;
  align-items:flex-start;
  gap:8px;
  padding:12px!important;
  border:1px solid var(--line);
  border-radius:13px;
  background:#faf8fb;
}
.payment-toggle input{
  width:18px!important;
  height:18px;
  margin:1px 0 0!important;
}
.payment-toggle strong,.payment-toggle small{display:block}
.payment-toggle small{margin-top:2px;color:var(--muted);font-weight:500}
.payment-toggle.danger{background:#fff4f5;border-color:#efd3d8}
.payment-toggle.sandbox{background:#f1f7ff;border-color:#d8e6f7}
.payment-orders-table{margin-top:16px}

.seller-market-status-card{
  display:flex;
  align-items:center;
  justify-content:space-between;
  gap:20px;
  margin:0 0 22px;
  padding:20px 22px;
  border:1px solid #dbe8df;
  border-radius:20px;
  background:linear-gradient(135deg,#fff,#f4faf6);
}
.seller-market-status-card h2{
  margin:4px 0;
  font-family:Georgia,serif;
  font-size:1.45rem;
}
.seller-market-status-card p{max-width:720px;margin:0;color:var(--muted);font-size:.8rem}
.seller-market-status-actions{display:flex;gap:7px;flex-wrap:wrap}

@media(max-width:1100px){
  .admin-product-v5{
    grid-template-columns:80px minmax(0,1fr)!important;
  }
  .admin-product-v5>.admin-inline-actions,
  .admin-product-v5>.admin-location-assign{
    grid-column:1/-1;
  }
  .payment-toggle-grid{grid-template-columns:1fr 1fr}
}

@media(max-width:900px){
  .locations-layout{grid-template-columns:1fr}
  .locations-map{
    position:static;
    height:460px;
    min-height:0;
  }
  .admin-location-create{grid-template-columns:1fr}
  .admin-location-list{grid-template-columns:1fr}
}

@media(max-width:700px){
  .advanced-filter-row{
    width:100%;
    display:grid;
    grid-template-columns:1fr 1fr;
  }
  .advanced-filter-row select{min-width:0;width:100%}
  .price-filter-control input{width:100%}
  .payment-buttons{grid-template-columns:1fr}
  .locations-hero{
    align-items:flex-start;
    flex-direction:column;
    padding:26px 17px;
  }
  .locations-hero .primary-btn{width:100%}
  .checkout-card,.payment-return-card{padding:18px 14px}
  .checkout-product{grid-template-columns:82px minmax(0,1fr)}
  .checkout-product img{width:82px;height:82px}
  .payment-toggle-grid{grid-template-columns:1fr}
  .seller-market-status-card{align-items:flex-start;flex-direction:column}
  .seller-market-status-actions{width:100%}
  .seller-market-status-actions a{flex:1;text-align:center}
}

@media(max-width:480px){
  .advanced-filter-row{grid-template-columns:1fr}
  .catalog-smart-links{align-items:stretch;flex-direction:column}
  .catalog-smart-links>a{width:100%;text-align:center}
  .product-store-box{grid-template-columns:38px minmax(0,1fr)}
  .product-store-box>b{grid-column:2}
  .admin-jump-nav{top:62px}
}



/* V5 diagnostics */
.diag-ok{color:#177245!important;font-weight:900}
.diag-bad{color:#b4233f!important;font-weight:900}


/* ============================================================
   PROFILE PHOTO / COVER PREVIEW + PASSWORD AUTOFILL FIX V5.1
   Additive only — existing Marketplace styles remain intact.
   ============================================================ */

.profile-selected-file{
  display:block;
  min-height:1.3em;
  margin-top:7px;
  color:#6f5b74!important;
  font-size:.68rem!important;
  font-weight:700!important;
  line-height:1.35;
}

.profile-password-toggle{
  display:flex!important;
  flex-direction:row!important;
  align-items:flex-start!important;
  gap:10px!important;
  margin:0 0 14px!important;
  padding:14px!important;
  border:1px solid #e7dce9;
  border-radius:14px;
  background:#faf8fb;
}

.profile-password-toggle input{
  width:18px!important;
  height:18px;
  margin:2px 0 0!important;
  flex:0 0 18px;
  accent-color:var(--brand);
}

.profile-password-toggle strong,
.profile-password-toggle small{
  display:block;
}

.profile-password-toggle small{
  margin-top:3px;
  color:var(--muted);
  font-weight:500;
}

.profile-password-fields{
  opacity:.48;
  transition:opacity .18s ease;
}

.profile-password-fields.is-enabled{
  opacity:1;
}

.profile-password-fields[aria-disabled="true"] input{
  background:#f5f2f6;
  cursor:not-allowed;
}

.profile-media-preview img{
  display:block;
  width:100%;
  height:100%;
  object-fit:cover;
}

.avatar-preview img{
  border-radius:50%;
}

.cover-preview img{
  border-radius:14px;
}


/* ============================================================
   TWORIVO MARKETPLACE V6 — COMMUNITY / CONTACTS / PRIVATE CHAT
   Additive only. Existing Marketplace styles remain intact.
   ============================================================ */

/* Header identity + notifications */
.header-user-btn{
  display:flex!important;
  align-items:center;
  gap:7px;
  max-width:190px;
}
.header-user-btn img,
.header-user-avatar{
  width:28px;
  height:28px;
  flex:0 0 28px;
  display:grid;
  place-items:center;
  object-fit:cover;
  border-radius:50%;
  background:linear-gradient(135deg,var(--brand),var(--brand2));
  color:#fff;
  font-size:.72rem;
  font-weight:900;
}
.header-user-name{
  min-width:0;
  max-width:125px;
  overflow:hidden;
  text-overflow:ellipsis;
  white-space:nowrap;
}
.header-community-btn{
  position:relative;
  gap:7px;
}
.social-count-badge{
  min-width:20px;
  height:20px;
  display:inline-grid;
  place-items:center;
  padding:0 5px;
  border-radius:999px;
  background:#d60047;
  color:#fff;
  font-size:.62rem;
  font-weight:900;
}
.social-count-badge.is-empty{
  display:none;
}
.tw-site-user-avatar{
  width:36px;
  height:36px;
  flex:0 0 36px;
  object-fit:cover;
  border-radius:11px;
  box-shadow:0 6px 18px rgba(119,42,142,.16);
}
.tw-site-community{
  color:#6f2b7f!important;
}

/* Public seller contact controls */
.seller-community-actions{
  display:flex;
  align-items:center;
  gap:8px;
  flex-wrap:wrap;
  margin:0 0 20px;
}
.seller-community-actions form{
  margin:0;
}
.connection-state{
  display:inline-flex;
  align-items:center;
  min-height:40px;
  padding:9px 12px;
  border:1px solid #ddcae2;
  border-radius:12px;
  background:#f8f0fa;
  color:#70277f;
  font-size:.74rem;
  font-weight:850;
}
.connection-state.muted-state{
  background:#f4f1f5;
  border-color:#e5dee7;
  color:#77707a;
}

/* Community */
.community-hero{
  display:flex;
  align-items:flex-end;
  justify-content:space-between;
  gap:28px;
  margin:8px 0 18px;
  padding:38px 40px;
  overflow:hidden;
  border-radius:28px;
  color:#fff;
  background:
    radial-gradient(circle at 82% 5%,rgba(255,255,255,.18),transparent 25%),
    linear-gradient(135deg,#4b0f68,#8f13ad 58%,#d300bd);
  box-shadow:var(--shadow);
}
.community-hero h1{
  max-width:760px;
  margin:7px 0 9px;
  color:#fff;
  font-family:Georgia,serif;
  font-size:clamp(2.2rem,5vw,4.6rem);
  line-height:1.01;
}
.community-hero p{
  max-width:720px;
  margin:0;
  color:rgba(255,255,255,.8);
}
.community-hero-stats{
  display:grid;
  grid-template-columns:repeat(3,1fr);
  gap:7px;
  min-width:340px;
}
.community-hero-stats>div{
  min-width:0;
  padding:14px 10px;
  border:1px solid rgba(255,255,255,.22);
  border-radius:15px;
  background:rgba(255,255,255,.1);
  text-align:center;
  backdrop-filter:blur(10px);
}
.community-hero-stats strong{
  display:block;
  font-size:1.55rem;
}
.community-hero-stats span{
  display:block;
  margin-top:2px;
  color:rgba(255,255,255,.73);
  font-size:.62rem;
}

.community-search-card{
  margin:0 0 16px;
  padding:10px;
  border:1px solid var(--line);
  border-radius:18px;
  background:#fff;
}
.community-search-form{
  display:flex;
  align-items:center;
  gap:8px;
}
.community-search-form>span{
  padding-left:9px;
  color:#8f8492;
  font-size:1.2rem;
}
.community-search-form input{
  flex:1;
  min-width:0;
  border:0;
  outline:0;
  padding:11px 5px;
  background:transparent;
}

.community-section{
  margin:30px 0;
}
.community-grid{
  display:grid;
  grid-template-columns:repeat(3,minmax(0,1fr));
  gap:14px;
}
.community-grid.compact{
  grid-template-columns:repeat(2,minmax(0,1fr));
}
.community-person-card{
  display:grid;
  grid-template-columns:58px minmax(0,1fr) auto;
  align-items:center;
  gap:11px;
  padding:12px;
  border:1px solid var(--line);
  border-radius:17px;
  background:#fff;
}
.community-person-card.incoming{
  border-color:#e0c4e7;
  background:linear-gradient(135deg,#fff,#fcf7fd);
}
.community-person-avatar{
  width:58px;
  height:58px;
  position:relative;
  overflow:visible;
  display:grid;
  place-items:center;
  border-radius:50%;
  background:linear-gradient(135deg,var(--brand),var(--brand2));
  color:#fff;
  font-family:Georgia,serif;
  font-size:1.35rem;
  font-weight:900;
}
.community-person-avatar img{
  width:100%;
  height:100%;
  object-fit:cover;
  border-radius:50%;
}
.contact-unread{
  position:absolute;
  top:-3px;
  right:-3px;
  min-width:20px;
  height:20px;
  display:grid;
  place-items:center;
  padding:0 4px;
  border:2px solid #fff;
  border-radius:999px;
  background:#d60047;
  color:#fff;
  font-size:.58rem;
}
.community-person-copy{
  min-width:0;
}
.community-person-copy>a{
  display:flex;
  align-items:center;
  gap:5px;
}
.community-person-copy strong{
  overflow:hidden;
  text-overflow:ellipsis;
  white-space:nowrap;
}
.community-person-copy small{
  display:block;
  margin-top:3px;
  color:var(--muted);
}
.community-person-actions form{
  display:flex;
  gap:5px;
}
.community-person-actions .primary-btn,
.community-person-actions .soft-btn{
  padding:8px 10px;
  font-size:.68rem;
}

.community-profile-card{
  overflow:hidden;
  border:1px solid var(--line);
  border-radius:20px;
  background:#fff;
  transition:.2s;
}
.community-profile-card:hover{
  transform:translateY(-2px);
  box-shadow:var(--shadow);
}
.community-profile-cover{
  height:96px;
  position:relative;
  display:block;
  background:
    radial-gradient(circle at 78% 14%,rgba(255,255,255,.35),transparent 23%),
    linear-gradient(135deg,#6d178a,#c20cc5);
}
.community-profile-avatar{
  width:78px;
  height:78px;
  position:absolute;
  left:18px;
  bottom:-39px;
  display:grid;
  place-items:center;
  overflow:hidden;
  border:4px solid #fff;
  border-radius:50%;
  background:linear-gradient(135deg,var(--brand),var(--brand2));
  color:#fff;
  font-family:Georgia,serif;
  font-size:1.9rem;
  font-weight:900;
}
.community-profile-avatar img{
  width:100%;
  height:100%;
  object-fit:cover;
}
.community-profile-body{
  padding:50px 18px 17px;
}
.community-profile-name{
  display:flex;
  align-items:center;
  gap:6px;
  font-family:Georgia,serif;
  font-size:1.2rem;
  font-weight:900;
}
.community-profile-city{
  display:block;
  margin-top:3px;
  color:var(--muted);
  font-size:.7rem;
}
.community-profile-body p{
  min-height:3.9em;
  color:#635867;
  font-size:.76rem;
  line-height:1.5;
}
.community-profile-actions{
  min-height:42px;
  display:flex;
  align-items:center;
  gap:6px;
  flex-wrap:wrap;
  margin-top:12px;
}
.community-profile-actions form{
  margin:0;
}
.community-profile-actions .primary-btn,
.community-profile-actions .soft-btn{
  padding:9px 11px;
  font-size:.68rem;
}

.community-privacy-note{
  display:flex;
  gap:12px;
  margin:38px 0 10px;
  padding:17px;
  border:1px solid #d7e4dc;
  border-radius:16px;
  background:#f4faf6;
  color:#355442;
}
.community-privacy-note>span{
  font-size:1.35rem;
}
.community-privacy-note strong{
  display:block;
}
.community-privacy-note p{
  margin:3px 0 0;
  font-size:.72rem;
  line-height:1.55;
}

/* Private chat */
.chat-shell{
  width:min(100%,1040px);
  min-height:70vh;
  margin:10px auto 28px;
  overflow:hidden;
  border:1px solid var(--line);
  border-radius:24px;
  background:#fff;
  box-shadow:var(--shadow);
}
.chat-topbar{
  min-height:76px;
  display:flex;
  align-items:center;
  justify-content:space-between;
  gap:16px;
  padding:12px 15px;
  border-bottom:1px solid var(--line);
  background:rgba(255,255,255,.96);
}
.chat-person{
  display:flex;
  align-items:center;
  gap:10px;
  min-width:0;
}
.chat-person-avatar{
  width:48px;
  height:48px;
  flex:0 0 48px;
  display:grid;
  place-items:center;
  overflow:hidden;
  border-radius:50%;
  background:linear-gradient(135deg,var(--brand),var(--brand2));
  color:#fff;
  font-family:Georgia,serif;
  font-size:1.15rem;
  font-weight:900;
}
.chat-person-avatar img{
  width:100%;
  height:100%;
  object-fit:cover;
}
.chat-person>span:last-child{
  min-width:0;
}
.chat-person small,
.chat-person strong,
.chat-person em{
  display:block;
}
.chat-person small{
  color:#a400c8;
  font-size:.52rem;
  font-weight:900;
  letter-spacing:.09em;
}
.chat-person strong{
  overflow:hidden;
  text-overflow:ellipsis;
  white-space:nowrap;
}
.chat-person em{
  margin-top:2px;
  color:var(--muted);
  font-size:.65rem;
  font-style:normal;
}
.chat-top-actions{
  display:flex;
  gap:7px;
  align-items:center;
}
.chat-menu{
  position:relative;
}
.chat-menu>summary{
  list-style:none;
}
.chat-menu>summary::-webkit-details-marker{
  display:none;
}
.chat-menu>div{
  width:190px;
  position:absolute;
  top:calc(100% + 8px);
  right:0;
  z-index:20;
  overflow:hidden;
  border:1px solid var(--line);
  border-radius:13px;
  background:#fff;
  box-shadow:0 18px 40px rgba(35,22,39,.13);
}
.chat-menu a,
.chat-menu button{
  width:100%;
  display:block;
  border:0;
  padding:10px 12px;
  background:#fff;
  color:#433846;
  text-align:left;
  font-size:.72rem;
  cursor:pointer;
}
.chat-menu a:hover,
.chat-menu button:hover{
  background:#f7f2f8;
}
.chat-menu .danger-link{
  color:#a71938;
}

.chat-window{
  height:min(62vh,660px);
  min-height:420px;
  overflow-y:auto;
  display:flex;
  flex-direction:column;
  gap:7px;
  padding:18px;
  background:
    radial-gradient(circle at 10% 0%,rgba(164,0,200,.035),transparent 30%),
    #f7f5f8;
  overscroll-behavior:contain;
}
.chat-empty{
  margin:auto;
  text-align:center;
  color:var(--muted);
}
.chat-empty>span{
  width:62px;
  height:62px;
  display:grid;
  place-items:center;
  margin:0 auto 8px;
  border-radius:50%;
  background:#eee5f0;
  color:#8b4a94;
  font-size:1.5rem;
}
.chat-empty h2{
  margin:0;
  font-family:Georgia,serif;
}
.chat-empty p{
  margin:4px 0;
  font-size:.76rem;
}
.chat-message{
  display:flex;
  max-width:78%;
}
.chat-message.mine{
  align-self:flex-end;
}
.chat-message.theirs{
  align-self:flex-start;
}
.chat-bubble{
  min-width:90px;
  padding:9px 11px 7px;
  border-radius:16px;
  background:#fff;
  box-shadow:0 3px 12px rgba(42,24,47,.045);
}
.chat-message.mine .chat-bubble{
  color:#fff;
  background:linear-gradient(135deg,#8c11a8,#be00b0);
  border-bottom-right-radius:5px;
}
.chat-message.theirs .chat-bubble{
  border:1px solid #e9e2eb;
  border-bottom-left-radius:5px;
}
.chat-bubble p{
  margin:0;
  white-space:pre-wrap;
  overflow-wrap:anywhere;
  font-size:.82rem;
  line-height:1.48;
}
.chat-bubble time{
  display:block;
  margin-top:5px;
  text-align:right;
  color:#9b8e9f;
  font-size:.55rem;
}
.chat-message.mine .chat-bubble time{
  color:rgba(255,255,255,.65);
}
.chat-attachment{
  min-width:230px;
  max-width:360px;
  display:grid;
  grid-template-columns:42px minmax(0,1fr);
  align-items:center;
  gap:8px;
  margin-top:7px;
  padding:7px;
  border-radius:11px;
  background:rgba(255,255,255,.13);
}
.chat-message.theirs .chat-attachment{
  background:#f5f1f6;
}
.chat-attachment.image{
  display:block;
  padding:4px;
}
.chat-attachment img,
.chat-attachment video{
  display:block;
  width:100%;
  max-height:280px;
  object-fit:contain;
  border-radius:9px;
  background:#111;
}
.chat-attachment strong,
.chat-attachment small{
  display:block;
  overflow:hidden;
  text-overflow:ellipsis;
  white-space:nowrap;
}
.chat-attachment strong{
  font-size:.7rem;
}
.chat-attachment small{
  margin-top:2px;
  color:rgba(255,255,255,.65);
  font-size:.56rem;
}
.chat-message.theirs .chat-attachment small{
  color:var(--muted);
}
.chat-file-icon{
  width:42px;
  height:42px;
  display:grid;
  place-items:center;
  border-radius:9px;
  background:rgba(255,255,255,.15);
}
.chat-message.theirs .chat-file-icon{
  background:#e9e0eb;
}

.chat-composer{
  display:grid;
  grid-template-columns:46px minmax(0,1fr) 48px;
  gap:8px;
  align-items:end;
  padding:10px;
  border-top:1px solid var(--line);
  background:#fff;
}
.chat-file-button{
  width:46px;
  height:46px;
  display:grid!important;
  place-items:center;
  border-radius:14px;
  background:#f0ebf2;
  color:#7a3386;
  cursor:pointer;
  font-size:1.3rem;
}
.chat-file-button input{
  position:absolute;
  width:1px;
  height:1px;
  opacity:0;
  pointer-events:none;
}
.chat-input-wrap{
  min-width:0;
  display:grid;
}
.chat-input-wrap textarea{
  width:100%;
  max-height:140px;
  resize:none;
  border:1px solid #e1d8e4;
  border-radius:16px;
  padding:12px 13px;
  outline:0;
  background:#f8f6f9;
  line-height:1.35;
}
.chat-input-wrap textarea:focus{
  background:#fff;
  border-color:#c898d3;
  box-shadow:0 0 0 3px #f4e6f7;
}
.chat-input-wrap small{
  min-height:0;
  margin:3px 4px 0;
  overflow:hidden;
  color:var(--muted);
  font-size:.58rem;
  text-overflow:ellipsis;
  white-space:nowrap;
}
.chat-send-btn{
  width:48px;
  height:46px;
  border:0;
  border-radius:14px;
  background:linear-gradient(135deg,var(--brand),var(--brand2));
  color:#fff;
  cursor:pointer;
  font-size:1.05rem;
  font-weight:900;
  box-shadow:0 8px 20px rgba(164,0,200,.2);
}
.chat-security-note{
  margin:0;
  padding:7px 12px 10px;
  color:#8b818e;
  font-size:.57rem;
  text-align:center;
  background:#fff;
}

@media(max-width:1100px){
  .header-user-name{
    max-width:90px;
  }
  .header-community-btn>span{
    display:none;
  }
  .community-grid{
    grid-template-columns:repeat(2,minmax(0,1fr));
  }
}

@media(max-width:780px){
  .header-user-btn{
    max-width:50px;
    padding:7px!important;
  }
  .header-user-name{
    display:none;
  }
  .header-community-btn{
    min-width:42px;
    padding:9px!important;
  }
  .header-community-btn::before{
    content:"✉";
    font-size:1rem;
  }
  .header-community-btn>span{
    display:none;
  }
  .community-hero{
    align-items:flex-start;
    flex-direction:column;
    padding:28px 19px;
  }
  .community-hero-stats{
    width:100%;
    min-width:0;
  }
  .community-grid,
  .community-grid.compact{
    grid-template-columns:1fr;
  }
  .community-search-form{
    flex-wrap:wrap;
  }
  .community-search-form input{
    flex-basis:calc(100% - 42px);
  }
  .community-search-form .primary-btn,
  .community-search-form .soft-btn{
    flex:1;
  }
  .chat-shell{
    margin:0 auto;
    border-radius:18px;
  }
  .chat-window{
    height:58vh;
    min-height:360px;
    padding:12px 9px;
  }
  .chat-message{
    max-width:88%;
  }
  .chat-top-actions>.soft-btn{
    display:none;
  }
}

@media(max-width:520px){
  .community-hero-stats{
    grid-template-columns:1fr 1fr 1fr;
  }
  .community-person-card{
    grid-template-columns:50px minmax(0,1fr);
  }
  .community-person-avatar{
    width:50px;
    height:50px;
  }
  .community-person-actions{
    grid-column:1/-1;
  }
  .community-person-actions form,
  .community-person-actions .primary-btn{
    width:100%;
  }
  .chat-topbar{
    padding:9px;
  }
  .chat-person-avatar{
    width:42px;
    height:42px;
    flex-basis:42px;
  }
  .chat-message{
    max-width:94%;
  }
  .chat-attachment{
    min-width:190px;
    max-width:280px;
  }
  .chat-composer{
    grid-template-columns:42px minmax(0,1fr) 44px;
    padding:8px;
  }
  .chat-file-button,
  .chat-send-btn{
    width:42px;
    height:42px;
  }
}



/* ============================================================
   TWORIVO MARKETPLACE V7 — EDITABLE MEDIA + VIEWER + GROUPS
   Additive only.
   ============================================================ */

.chat-message{position:relative}
.chat-message-tools{position:absolute;top:5px;right:5px;z-index:8}
.chat-message-tools>summary{width:26px;height:26px;display:grid;place-items:center;list-style:none;border-radius:50%;background:rgba(255,255,255,.16);cursor:pointer;font-weight:900}
.chat-message-tools>summary::-webkit-details-marker{display:none}
.chat-message-tools>div{min-width:125px;position:absolute;right:0;top:32px;overflow:hidden;border:1px solid var(--line);border-radius:11px;background:#fff;box-shadow:0 14px 35px rgba(40,25,45,.15)}
.chat-message-tools button{width:100%;display:block;border:0;padding:9px 10px;background:#fff;color:#403543;text-align:left;font-size:.67rem;cursor:pointer}
.chat-message-tools button:hover{background:#f7f2f8}.chat-message-tools .danger-link{color:#aa1d3c}
.chat-message-deleted{color:#a397a7!important;font-style:italic}.chat-message.mine .chat-message-deleted{color:rgba(255,255,255,.65)!important}
.chat-inline-editor{width:min(520px,92vw);margin-top:5px;padding:10px;border:1px solid #dfd4e2;border-radius:14px;background:#fff;box-shadow:0 10px 30px rgba(44,25,50,.12)}
.chat-message.mine .chat-inline-editor{align-self:flex-end}
.chat-inline-editor textarea{width:100%;resize:vertical;border:1px solid #ded4e1;border-radius:10px;padding:10px}
.chat-edit-file{display:flex!important;align-items:center;justify-content:center;min-height:38px;margin-top:7px;border:1px dashed #d8c6dd;border-radius:10px;background:#faf7fb;color:#7d338a;cursor:pointer;font-size:.68rem!important}
.chat-edit-file input{position:absolute;width:1px;height:1px;opacity:0}.compact-edit-check{margin:7px 0!important;font-size:.65rem!important}
.chat-inline-editor>div:last-child{display:flex;gap:6px;margin-top:7px}.chat-inline-editor .primary-btn,.chat-inline-editor .soft-btn{padding:8px 10px;font-size:.67rem}

.chat-upload-preview{margin-bottom:6px}.chat-upload-preview-card{display:grid;grid-template-columns:68px minmax(0,1fr);gap:8px;align-items:center;max-width:360px;padding:7px;border:1px solid #e2d8e5;border-radius:12px;background:#fff}
.chat-upload-preview-card img,.chat-upload-preview-card video{width:68px;height:68px;object-fit:contain;border-radius:9px;background:#111}.chat-upload-file-icon{width:68px;height:68px;display:grid;place-items:center;border-radius:9px;background:#eee8f0;color:#6f4777;font-size:.65rem;font-weight:900}
.chat-upload-preview-card strong,.chat-upload-preview-card small{display:block;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.chat-upload-preview-card small{margin-top:3px;color:var(--muted);font-size:.6rem}

body.chat-viewer-open{overflow:hidden}.chat-media-viewer{position:fixed;inset:0;z-index:5000;display:grid;grid-template-columns:64px minmax(0,1fr) 64px;grid-template-rows:1fr auto;align-items:center;gap:10px;padding:18px;background:rgba(12,8,14,.94);backdrop-filter:blur(12px)}
.chat-media-viewer[hidden]{display:none!important}.chat-media-stage{width:100%;height:calc(100vh - 100px);display:grid;place-items:center;overflow:hidden;grid-column:2}
.chat-media-stage img,.chat-media-stage video{display:block;width:auto;height:auto;max-width:100%;max-height:100%;object-fit:contain;border-radius:12px;background:#000}
.chat-media-caption{grid-column:1/-1;min-height:24px;color:#fff;text-align:center;font-size:.75rem}
.chat-media-close,.chat-media-prev,.chat-media-next{border:0;color:#fff;background:rgba(255,255,255,.1);cursor:pointer}.chat-media-close{width:44px;height:44px;position:absolute;top:16px;right:16px;z-index:3;border-radius:50%;font-size:1.8rem}
.chat-media-prev,.chat-media-next{width:54px;height:54px;border-radius:50%;font-size:2rem}.chat-media-prev{grid-column:1}.chat-media-next{grid-column:3}

.community-crosslinks{display:flex;gap:8px;flex-wrap:wrap;margin:0 0 24px}
.groups-hero{display:flex;align-items:flex-end;justify-content:space-between;gap:24px;margin:8px 0 18px;padding:38px 40px;border-radius:28px;color:#fff;background:radial-gradient(circle at 82% 6%,rgba(255,255,255,.2),transparent 25%),linear-gradient(135deg,#153d55,#2b6682 58%,#4a9b8a);box-shadow:var(--shadow)}
.groups-hero h1{max-width:760px;margin:7px 0 9px;font-family:Georgia,serif;font-size:clamp(2.2rem,5vw,4.4rem);line-height:1.02}.groups-hero p{max-width:760px;margin:0;color:rgba(255,255,255,.8)}
.group-grid{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:14px}.group-card{overflow:hidden;border:1px solid var(--line);border-radius:20px;background:#fff;transition:.2s}.group-card:hover{transform:translateY(-2px);box-shadow:var(--shadow)}
.group-card-cover{height:150px;position:relative;display:grid;place-items:center;overflow:hidden;color:#fff;background:radial-gradient(circle at 75% 15%,rgba(255,255,255,.3),transparent 25%),linear-gradient(135deg,#376d7e,#5a2f84);text-align:center;font-family:Georgia,serif;font-size:1.15rem;font-weight:900}
.group-card-cover img{width:100%;height:100%;object-fit:cover}.group-card-cover small{font-size:.55rem;letter-spacing:.15em}.group-unread{min-width:26px;height:26px;position:absolute;top:10px;right:10px;display:grid;place-items:center;padding:0 6px;border:2px solid #fff;border-radius:999px;background:#d90047;color:#fff;font-size:.65rem}
.group-card-body{padding:15px}.group-visibility{display:inline-flex;padding:5px 7px;border-radius:999px;background:#eef4f6;color:#47717b;font-size:.55rem;font-weight:900;letter-spacing:.06em}.group-title{display:block;margin:8px 0 4px;font-family:Georgia,serif;font-size:1.25rem;font-weight:900}
.group-card-body p{min-height:3.5em;color:#675d69;font-size:.75rem}.group-meta{display:flex;justify-content:space-between;gap:10px;margin:10px 0;color:var(--muted);font-size:.62rem}

.group-chat-topbar{background:linear-gradient(135deg,#fff,#f5faf9)}.group-avatar{border-radius:14px;background:linear-gradient(135deg,#25586b,#5e3c8e)}
.group-members-strip{border-bottom:1px solid var(--line);background:#fff}.group-members-strip>summary{padding:8px 14px;color:#6c616e;font-size:.66rem;font-weight:850;cursor:pointer}.group-members-strip>div{display:flex;gap:7px;overflow-x:auto;padding:8px 12px 12px}
.group-members-strip a{min-width:120px;display:grid;grid-template-columns:34px minmax(0,1fr);gap:7px;align-items:center;padding:7px;border:1px solid var(--line);border-radius:11px;background:#faf9fb}.group-members-strip a>span{width:34px;height:34px;display:grid;place-items:center;overflow:hidden;border-radius:50%;background:#eee}
.group-members-strip img{width:100%;height:100%;object-fit:cover}.group-members-strip strong{overflow:hidden;text-overflow:ellipsis;white-space:nowrap;font-size:.66rem}.group-members-strip small{grid-column:2;margin-top:-5px;color:var(--muted);font-size:.5rem}
.group-message{flex-direction:column}.group-message-author{display:flex;align-items:center;gap:5px;margin:0 0 3px 4px;color:#6d6170;font-size:.58rem}.group-message-author img,.group-message-author span{width:22px;height:22px;display:grid;place-items:center;object-fit:cover;border-radius:50%;background:#e9e1eb}.group-message-author.dynamic-author{display:block;margin:0 0 3px 4px;font-weight:800}.group-message.mine .group-message-author{display:none}

.group-cover-editor{display:grid;gap:8px}.group-cover-editor>img{width:100%;max-height:260px;object-fit:cover;border-radius:14px}
.group-add-member-form{display:grid;grid-template-columns:minmax(0,1fr) auto;gap:8px;margin-bottom:15px}.group-add-member-form select{border:1px solid var(--line);border-radius:11px;padding:10px}
.group-member-list{display:grid;gap:8px}.group-member-list article{display:grid;grid-template-columns:46px minmax(0,1fr) auto;gap:9px;align-items:center;padding:10px;border:1px solid var(--line);border-radius:13px}
.group-member-avatar{width:46px;height:46px;display:grid;place-items:center;overflow:hidden;border-radius:50%;background:linear-gradient(135deg,var(--brand),var(--brand2));color:#fff;font-weight:900}.group-member-avatar img{width:100%;height:100%;object-fit:cover}
.group-member-list strong,.group-member-list small{display:block}.group-member-list small{color:var(--muted);font-size:.6rem}.group-member-list form{display:flex;gap:5px}.danger-zone-card{display:flex;justify-content:space-between;gap:20px;align-items:center;border-color:#efd2d8;background:#fff8f9}

@media(max-width:980px){.group-grid{grid-template-columns:repeat(2,minmax(0,1fr))}}
@media(max-width:700px){
 .chat-media-viewer{grid-template-columns:42px minmax(0,1fr) 42px;padding:8px}.chat-media-prev,.chat-media-next{width:38px;height:38px;font-size:1.4rem}.chat-media-stage{height:calc(100vh - 80px)}
 .groups-hero{flex-direction:column;align-items:flex-start;padding:26px 18px}.groups-hero .white-btn{width:100%}.group-grid{grid-template-columns:1fr}.group-add-member-form{grid-template-columns:1fr}.group-member-list article{grid-template-columns:42px minmax(0,1fr)}.group-member-list form{grid-column:1/-1}.danger-zone-card{align-items:flex-start;flex-direction:column}
}
@media(max-width:480px){.chat-inline-editor{width:calc(100vw - 38px)}.chat-media-caption{font-size:.62rem}}


/* ============================================================
   TWORIVO MARKETPLACE V8 — RESPONSIVE + PWA
   Additive only. Existing V1–V7 code and logic remain intact.
   ============================================================ */
html{-webkit-text-size-adjust:100%;text-size-adjust:100%;overflow-x:hidden;scroll-padding-top:120px}
body{min-width:0;overflow-x:hidden;padding-left:env(safe-area-inset-left);padding-right:env(safe-area-inset-right)}
*,*::before,*::after{min-width:0}img,video,svg,canvas,iframe{max-width:100%}input,select,textarea,button{font:inherit}
button,a,input,select,textarea{touch-action:manipulation}:focus-visible{outline:3px solid rgba(141,16,170,.28);outline-offset:2px}
.topbar{padding-top:env(safe-area-inset-top)}.topbar-inner,.tw-site-nav-inner{width:min(100% - 24px,1380px);margin-inline:auto}
.header-search{min-width:180px}.header-search input{min-width:0;width:100%}.top-actions{min-width:0;display:flex;align-items:center;justify-content:flex-end;gap:8px;flex-wrap:nowrap}
.page-shell,.market-hero,.trust-strip,.filters,.product-grid,.seller-cta,.profile-edit-wrap,.chat-shell{max-width:100%}
.product-grid{grid-template-columns:repeat(auto-fill,minmax(min(260px,100%),1fr))}
.product-card,.community-profile-card,.group-card,.profile-edit-card,.auth-card,.seller-public-card,.location-card{min-width:0;overflow-wrap:anywhere}
.filters .chips{min-width:0;overflow-x:auto;overscroll-behavior-inline:contain;-webkit-overflow-scrolling:touch}.filters .chips .chip{white-space:nowrap}
.chat-shell{width:min(100%,1100px)}.chat-window{-webkit-overflow-scrolling:touch;overscroll-behavior-y:contain}.chat-composer{padding-bottom:max(10px,env(safe-area-inset-bottom))}
.chat-input-wrap textarea{font-size:16px}.chat-media-stage img,.chat-media-stage video{object-fit:contain!important}
.pwa-install-btn{flex:0 0 44px;width:44px;height:44px;cursor:pointer}
.pwa-ios-hint{width:min(calc(100% - 24px),520px);position:fixed;left:50%;bottom:max(14px,env(safe-area-inset-bottom));transform:translateX(-50%);z-index:7000;display:grid;grid-template-columns:minmax(0,1fr) 36px;gap:4px 10px;padding:14px 14px 14px 16px;border:1px solid #dfd0e3;border-radius:17px;background:#fff;box-shadow:0 18px 50px rgba(44,25,50,.20)}
.pwa-ios-hint[hidden]{display:none!important}.pwa-ios-hint strong{grid-column:1;color:#4c2855}.pwa-ios-hint span{grid-column:1;color:#766b79;font-size:.74rem;line-height:1.45}.pwa-ios-hint button{grid-column:2;grid-row:1/3;width:36px;height:36px;border:0;border-radius:10px;background:#f2edf3;color:#56345d;font-size:1.3rem}
@media(max-width:1180px){.topbar-inner,.tw-site-nav-inner{width:min(100% - 20px,1120px)}.header-search{flex:1 1 360px}.market-hero{padding:42px 38px}.market-hero h1{font-size:clamp(3rem,7vw,5.8rem)}}
@media(max-width:980px){.topbar-inner{display:grid;grid-template-columns:auto minmax(0,1fr) auto}.brand{grid-column:1}.header-search{grid-column:2}.top-actions{grid-column:3}.tw-site-links{display:none!important}.tw-site-menu-toggle{display:inline-flex!important}.market-hero{min-height:auto;grid-template-columns:1fr;padding:36px 30px}.hero-orb{display:none}.trust-strip{grid-template-columns:repeat(2,minmax(0,1fr))}.seller-cta{grid-template-columns:1fr}.community-grid,.group-grid{grid-template-columns:repeat(2,minmax(0,1fr))}.seller-public-grid{grid-template-columns:1fr}}
@media(max-width:760px){
 .topbar-inner{width:calc(100% - 16px);grid-template-columns:minmax(0,1fr) auto;padding-block:7px}.brand{grid-column:1}.brand span{font-size:1.12rem}.brand small{font-size:.48rem}
 .header-search{grid-column:1/-1;grid-row:2;width:100%;min-width:0}.top-actions{grid-column:2;grid-row:1;gap:5px}.top-actions .soft-btn:not(.header-user-btn):not(.header-community-btn){display:none}.top-actions .primary-btn{min-height:42px;padding:9px 11px;font-size:.68rem}
 .header-user-btn{max-width:44px!important;padding:6px!important}.header-user-name{display:none}.header-community-btn{width:44px;min-width:44px!important;height:44px;padding:0!important;justify-content:center}
 .tw-site-nav-inner{width:calc(100% - 16px)}.tw-site-home{max-width:calc(100% - 56px)}.tw-site-brand strong{max-width:180px;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}
 .page-shell{width:calc(100% - 16px);margin-inline:auto}.market-hero{border-radius:22px;padding:28px 20px 31px}.market-hero h1{font-size:clamp(2.65rem,13vw,4.3rem);line-height:.98}.hero-actions{display:grid;grid-template-columns:1fr}.hero-actions a{width:100%;min-height:48px;justify-content:center}
 .trust-strip{grid-template-columns:1fr}.filters{align-items:stretch;flex-direction:column}.filters select{width:100%;min-height:46px;font-size:16px}.section-head{align-items:flex-start;flex-direction:column}
 .product-grid{grid-template-columns:repeat(2,minmax(0,1fr));gap:10px}.product-image{aspect-ratio:1/1}.product-body{padding:11px}.product-title{font-size:.92rem}
 .community-hero,.groups-hero{padding:27px 19px;border-radius:22px}.community-grid,.community-grid.compact,.group-grid{grid-template-columns:1fr}
 .chat-shell{border-radius:18px;margin:0 auto 14px}.chat-window{height:58vh;min-height:330px;padding:10px 8px}.chat-message{max-width:94%}.chat-composer{grid-template-columns:42px minmax(0,1fr) 44px;gap:6px;padding:8px;padding-bottom:max(8px,env(safe-area-inset-bottom))}.chat-file-button,.chat-send-btn{width:42px;height:42px}
 .chat-media-viewer{grid-template-columns:38px minmax(0,1fr) 38px;padding:6px}.chat-media-stage{height:calc(100vh - 84px)}.two-col,.three-col{grid-template-columns:1fr!important}input,select,textarea{max-width:100%}
}
@media(max-width:520px){.page-shell{width:calc(100% - 12px)}.market-hero{padding:24px 16px 28px}.market-hero h1{font-size:clamp(2.35rem,13.5vw,3.55rem)}.product-grid{grid-template-columns:1fr;gap:12px}.product-image{aspect-ratio:4/3}.product-body{padding:13px}.community-person-card{grid-template-columns:50px minmax(0,1fr)}.community-person-actions{grid-column:1/-1;width:100%}.chat-top-actions>.soft-btn{display:none}.chat-attachment{min-width:0;width:min(100%,280px)}.chat-inline-editor{width:calc(100vw - 28px)}}
@media(max-width:374px){.topbar-inner{width:calc(100% - 10px)}.top-actions{gap:3px}.top-actions .primary-btn{padding-inline:8px;font-size:.62rem}.header-user-btn,.header-community-btn,.pwa-install-btn,.icon-btn{width:40px!important;min-width:40px!important;height:40px!important}.page-shell{width:calc(100% - 8px)}.market-hero h1{font-size:2.25rem}}
@media(min-width:1440px){.topbar-inner,.tw-site-nav-inner,.page-shell{width:min(100% - 48px,1460px);margin-inline:auto}.product-grid{grid-template-columns:repeat(4,minmax(0,1fr))}}
@media(min-width:1920px){.topbar-inner,.tw-site-nav-inner,.page-shell{width:min(100% - 96px,1680px)}.product-grid{grid-template-columns:repeat(5,minmax(0,1fr))}}
@media(orientation:landscape) and (max-height:520px){.chat-window{height:48vh;min-height:230px}}
@media(hover:none) and (pointer:coarse){.primary-btn,.soft-btn,.white-btn,.glass-btn,.mini-buy,.icon-btn,.chip,.tw-site-menu-toggle,.chat-send-btn,.chat-file-button{min-height:44px}}
@media(prefers-reduced-motion:reduce){*,*::before,*::after{scroll-behavior:auto!important;animation-duration:.001ms!important;animation-iteration-count:1!important;transition-duration:.001ms!important}}


/* ============================================================
   TWORIVO MARKETPLACE V9 — SMART WITRYNY / INVENTORY / KIOSK
   Additive only. V1–V8 rules remain intact.
   ============================================================ */
.smart-map-hero,.showcase-hero{display:grid;grid-template-columns:minmax(0,1.35fr) minmax(280px,.65fr);gap:24px;padding:36px 38px;margin:8px 0 18px;border-radius:28px;background:linear-gradient(135deg,#42105b,#8c10aa 55%,#d400bd);color:#fff;box-shadow:var(--shadow)}
.smart-map-hero h1,.showcase-hero h1{margin:7px 0 10px;color:#fff;font:900 clamp(2.6rem,6vw,5.6rem)/.98 Georgia,serif}.smart-map-hero p,.showcase-hero p{color:rgba(255,255,255,.82)}
.smart-map-legend{display:flex;align-items:flex-end;justify-content:flex-end;gap:8px;flex-wrap:wrap}.smart-map-legend span{padding:8px 10px;border:1px solid rgba(255,255,255,.18);border-radius:999px;background:rgba(255,255,255,.1);font-size:.68rem}.dot{width:8px;height:8px;display:inline-block;border-radius:50%;margin-right:5px;background:#ddd}.dot.active{background:#4ade80}.dot.preparing{background:#facc15}.dot.full{background:#fb7185}
.smart-map-layout{display:grid;grid-template-columns:minmax(0,1.1fr) minmax(360px,.9fr);gap:16px}.smart-map-canvas{min-height:680px;position:sticky;top:125px;border:1px solid var(--line);border-radius:22px;overflow:hidden;background:#eee}.smart-location-list{display:grid;gap:12px}.smart-location-card{display:grid;grid-template-columns:170px minmax(0,1fr);overflow:hidden;border:1px solid var(--line);border-radius:20px;background:#fff}.smart-location-photo{position:relative;min-height:210px;display:grid;place-items:center;overflow:hidden;background:linear-gradient(135deg,#6f1787,#bc00aa);color:#fff;text-align:center;font:900 1rem Georgia,serif}.smart-location-photo img{width:100%;height:100%;object-fit:cover}.smart-location-photo small{font-size:.55rem}.smart-location-state{position:absolute;top:10px;left:10px;padding:5px 7px;border-radius:999px;background:rgba(0,0,0,.55);font-size:.55rem}.smart-location-body{padding:16px}.smart-location-body h2{margin:4px 0;font-family:Georgia,serif}.smart-stat-grid{display:grid;grid-template-columns:repeat(4,minmax(0,1fr));gap:6px;margin:12px 0}.smart-stat-grid>div{padding:9px 6px;border-radius:12px;background:#f7f3f8;text-align:center}.smart-stat-grid strong,.smart-stat-grid span{display:block}.smart-stat-grid strong{font-size:1.1rem}.smart-stat-grid span{font-size:.54rem;color:var(--muted)}.smart-stat-grid.big>div{background:rgba(255,255,255,.1);border:1px solid rgba(255,255,255,.16)}.smart-stat-grid.big span{color:rgba(255,255,255,.68)}.smart-location-actions{display:flex;gap:7px;flex-wrap:wrap}
.showcase-hero-photo{display:grid;place-items:center;min-height:280px;overflow:hidden;border:1px solid rgba(255,255,255,.2);border-radius:22px;background:rgba(255,255,255,.08);font:italic 2.6rem Georgia,serif;text-align:center}.showcase-hero-photo img{width:100%;height:100%;object-fit:cover}.back-link{display:inline-flex;margin-bottom:12px;color:#fff;text-decoration:underline}.shelf-grid{display:grid;grid-template-columns:repeat(4,minmax(0,1fr));gap:12px}.shelf-card{padding:13px;border:1px solid var(--line);border-radius:17px;background:#fff}.shelf-card.status-available{border-color:#cfe9d7}.shelf-card.status-maintenance,.shelf-card.status-disabled{opacity:.65}.shelf-card-head{display:flex;align-items:center;justify-content:space-between;gap:8px}.shelf-code{width:48px;height:48px;display:grid;place-items:center;border-radius:12px;background:linear-gradient(135deg,var(--brand),var(--brand2));color:#fff;font-weight:900}.shelf-status{font-size:.58rem;color:var(--muted);text-transform:uppercase}.shelf-maker{display:block;margin:10px 0;font-size:.7rem}.shelf-products{display:grid;gap:7px}.shelf-product{display:grid;grid-template-columns:58px minmax(0,1fr);gap:8px;padding:6px;border-radius:10px;background:#f8f5f9}.shelf-product img{width:58px;height:58px;object-fit:cover;border-radius:8px}.shelf-product strong,.shelf-product small,.stock-pill{display:block}.shelf-product small{margin:2px 0;color:var(--muted);font-size:.58rem}.stock-pill{width:max-content;padding:3px 5px;border-radius:999px;font-size:.53rem}.stock-pill.in{background:#dcfce7;color:#166534}.stock-pill.out{background:#fee2e2;color:#991b1b}.shelf-empty{color:var(--muted);font-size:.67rem}.showcase-qr-cta,.product-smart-availability{display:flex;justify-content:space-between;gap:20px;align-items:center;margin:28px 0;padding:22px;border:1px solid #e4d8e7;border-radius:18px;background:linear-gradient(135deg,#fff,#fbf6fc)}.product-smart-actions{display:flex;gap:7px;flex-wrap:wrap}.pickup-code{font-size:1.35rem;letter-spacing:.12em}
.smart-admin-warning{margin:0 0 15px;padding:14px;border:1px solid #f0d7a9;border-radius:13px;background:#fff9ed;color:#6f531e}.device-secret-box{margin:12px 0;padding:14px;border:2px solid #9f2eb8;border-radius:13px;background:#fff}.device-secret-box strong,.device-secret-box code{display:block}.device-secret-box code{margin-top:6px;padding:8px;overflow:auto;background:#f5eef6}.smart-admin-grid{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:12px}.smart-admin-card{padding:14px;border:1px solid var(--line);border-radius:16px;background:#fff}.smart-admin-card h3{margin:0 0 4px}.smart-admin-card .compact{gap:7px}.smart-admin-links{display:flex;gap:6px;flex-wrap:wrap;margin-top:9px}.smart-admin-links a{font-size:.62rem;text-decoration:underline}.smart-shelf-admin-grid{display:grid;grid-template-columns:repeat(4,minmax(0,1fr));gap:8px}.smart-shelf-admin-card{display:grid;gap:6px;padding:10px;border:1px solid var(--line);border-radius:13px;background:#fff}.smart-shelf-admin-card strong,.smart-shelf-admin-card small{display:block}.smart-shelf-admin-card strong{font-size:1rem}.smart-shelf-admin-card small{color:var(--muted);font-size:.58rem}.smart-shelf-admin-card select,.smart-shelf-admin-card input{width:100%;padding:8px;border:1px solid var(--line);border-radius:9px}.stock-admin-card{grid-template-columns:74px minmax(0,1fr);align-items:start}.stock-admin-card>img{width:74px;height:74px;object-fit:cover;border-radius:11px}.stock-admin-card .admin-location-assign{grid-column:1/-1}.stock-delta-actions{grid-column:1/-1;display:flex;gap:5px}.stock-delta-actions button{min-width:44px;padding:7px;border:1px solid var(--line);border-radius:8px;background:#fff}.smart-device-create{max-width:620px;margin-bottom:14px}.device-bind-form{display:grid;grid-template-columns:1fr 80px auto;gap:5px;margin-top:8px}.manual-unlock-grid{display:flex;gap:6px;flex-wrap:wrap;margin-bottom:14px}
.kiosk-shell{min-height:100vh;padding:24px;background:radial-gradient(circle at 90% 0%,#45105b,transparent 28%),#120b16}.kiosk-shell>header{display:flex;align-items:flex-end;justify-content:space-between;gap:20px;margin-bottom:18px}.kiosk-shell h1{margin:4px 0;color:#fff;font:900 clamp(2.2rem,5vw,4.6rem) Georgia,serif}.kiosk-shell header span,.kiosk-shell header p{color:#c8b6ce}.kiosk-clock{font-size:3rem;font-weight:900}.kiosk-grid{display:grid;grid-template-columns:repeat(4,minmax(0,1fr));gap:12px}.kiosk-product{overflow:hidden;border:1px solid rgba(255,255,255,.12);border-radius:18px;background:#fff;color:#231926}.kiosk-product>img{width:100%;aspect-ratio:1/1;object-fit:cover}.kiosk-product>div{padding:12px}.kiosk-product h2{margin:0 0 4px;font:800 1.1rem Georgia,serif}.kiosk-product p{margin:0 0 7px;color:#776d79;font-size:.7rem}.kiosk-product>div>div{display:flex;justify-content:space-between;gap:8px;align-items:center}.kiosk-product span.ok{color:#16723d}.kiosk-product span.out{color:#a72840}.kiosk-footer{margin-top:15px;color:#ad9bb2;text-align:center}
@media(max-width:1180px){.shelf-grid{grid-template-columns:repeat(3,minmax(0,1fr))}.smart-admin-grid{grid-template-columns:repeat(2,minmax(0,1fr))}.smart-shelf-admin-grid{grid-template-columns:repeat(3,minmax(0,1fr))}.kiosk-grid{grid-template-columns:repeat(3,minmax(0,1fr))}}
@media(max-width:900px){.smart-map-hero,.showcase-hero{grid-template-columns:1fr}.smart-map-layout{grid-template-columns:1fr}.smart-map-canvas{position:relative;top:auto;min-height:420px}.shelf-grid{grid-template-columns:repeat(2,minmax(0,1fr))}.smart-shelf-admin-grid{grid-template-columns:repeat(2,minmax(0,1fr))}.kiosk-grid{grid-template-columns:repeat(2,minmax(0,1fr))}}
@media(max-width:620px){.smart-location-card{grid-template-columns:1fr}.smart-location-photo{min-height:180px}.smart-stat-grid{grid-template-columns:repeat(2,1fr)}.shelf-grid,.smart-admin-grid,.smart-shelf-admin-grid,.kiosk-grid{grid-template-columns:1fr}.showcase-qr-cta,.product-smart-availability{align-items:flex-start;flex-direction:column}.device-bind-form{grid-template-columns:1fr}.kiosk-shell{padding:12px}.kiosk-shell>header{align-items:flex-start;flex-direction:column}.kiosk-clock{font-size:2rem}}


/* ============================================================
   TWORIVO V9.1 — SMART LOCATION CREATOR
   Additive Smart Admin UX. Existing Marketplace logic intact.
   ============================================================ */
.smart-location-head{
  align-items:center;
  gap:16px;
}
.smart-location-head>div p{
  margin:6px 0 0;
  color:var(--muted);
  line-height:1.55;
}
.smart-location-create-toggle{
  flex:0 0 auto;
  min-height:46px;
}
.smart-location-create-box{
  display:none;
  margin:0 0 18px;
  padding:18px;
  border:1px solid rgba(177,0,204,.18);
  border-radius:20px;
  background:linear-gradient(180deg,#fff,#fcf8fd);
}
.smart-location-create-box.is-open{
  display:block;
}
.smart-location-create-intro{
  display:flex;
  align-items:flex-start;
  justify-content:space-between;
  gap:16px;
  margin-bottom:16px;
}
.smart-location-create-intro h3{
  margin:4px 0 6px;
  font:800 clamp(1.35rem,3vw,1.85rem) Georgia,serif;
}
.smart-location-create-intro p{
  margin:0;
  color:var(--muted);
  line-height:1.55;
}
.smart-test-badge{
  flex:0 0 auto;
  padding:7px 10px;
  border-radius:999px;
  background:#f2e8f5;
  color:#7b148e;
  font-size:.62rem;
  font-weight:900;
  letter-spacing:.08em;
}
.smart-location-create-layout{
  align-items:start;
}
.smart-location-map-column{
  min-width:0;
}
.smart-location-map-column .admin-location-map{
  min-height:470px;
}
.smart-coordinate-actions{
  display:flex;
  align-items:center;
  gap:10px;
  flex-wrap:wrap;
}
.smart-coordinate-actions small{
  color:var(--muted);
}
.smart-create-options{
  display:grid;
  grid-template-columns:repeat(2,minmax(0,1fr));
  gap:8px;
}
.smart-create-options .check{
  align-items:flex-start;
  min-height:70px;
  padding:11px;
  border:1px solid var(--line);
  border-radius:14px;
  background:#fff;
}
.smart-create-options .check span{
  display:grid;
  gap:3px;
}
.smart-create-options .check small{
  color:var(--muted);
  font-size:.67rem;
  line-height:1.4;
}
.smart-create-options .smart-public-option{
  border-color:#e6d6ea;
  background:#fcf9fd;
}
.smart-create-submit{
  min-height:48px;
}
.smart-empty-state{
  display:grid;
  gap:4px;
  margin:0 0 16px;
  padding:14px 16px;
  border:1px dashed #d8bddf;
  border-radius:15px;
  background:#fcf9fd;
}
.smart-empty-state strong{
  color:#63236f;
}
.smart-empty-state span{
  color:var(--muted);
  font-size:.78rem;
}

@media(max-width:900px){
  .smart-location-head,
  .smart-location-create-intro{
    align-items:stretch;
    flex-direction:column;
  }
  .smart-location-create-toggle{
    width:100%;
  }
  .smart-create-options{
    grid-template-columns:1fr;
  }
  .smart-location-map-column .admin-location-map{
    min-height:360px;
  }
}
@media(max-width:620px){
  .smart-location-create-box{
    padding:12px;
    border-radius:16px;
  }
  .smart-coordinate-actions .soft-btn{
    width:100%;
  }
  .smart-location-map-column .admin-location-map{
    min-height:300px;
  }
}


/* ============================================================
   TWORIVO V9.2 — MULTI SHOWCASE / FLEXIBLE SHELVES
   ============================================================ */
.smart-placement-create{
  margin:0 0 18px;
  padding:16px;
  border:1px solid var(--line);
  border-radius:18px;
  background:#fcf9fd;
}
.public-showcase-block{
  margin:0 0 28px;
  padding:16px;
  border:1px solid var(--line);
  border-radius:22px;
  background:#fff;
}
.public-showcase-title{
  display:flex;
  align-items:flex-end;
  justify-content:space-between;
  gap:12px;
  margin-bottom:14px;
}
.public-showcase-title h3{
  margin:3px 0 0;
  font:800 clamp(1.4rem,3vw,2rem) Georgia,serif;
}
.public-showcase-title>span{
  color:var(--muted);
  font-size:.76rem;
}
.smart-admin-card .smart-test-badge{
  display:inline-flex;
  margin-bottom:7px;
}
@media(max-width:760px){
  .public-showcase-block{padding:10px;border-radius:17px}
  .public-showcase-title{align-items:flex-start;flex-direction:column}
  .smart-placement-create{padding:12px}
}

/* ============================================================
   TWORIVO V10 — MOBILE FIRST POLISH / TABLET / IPHONE FIX
   Final override layer. No legacy selector removed.
   ============================================================ */
.language-switcher{position:relative;flex:0 0 auto}
.language-switcher>summary{list-style:none;display:flex;align-items:center;gap:5px;min-height:42px;padding:0 11px;border:1px solid var(--line);border-radius:12px;background:#fff;font-size:.72rem;font-weight:900;cursor:pointer;white-space:nowrap}
.language-switcher>summary::-webkit-details-marker{display:none}
.language-menu{position:absolute;right:0;top:calc(100% + 8px);z-index:1800;min-width:160px;padding:7px;border:1px solid var(--line);border-radius:14px;background:#fff;box-shadow:0 18px 50px rgba(36,16,42,.16)}
.language-menu a{display:block;padding:9px 11px;border-radius:9px;font-size:.78rem;font-weight:750}
.language-menu a:hover,.language-menu a.active{background:var(--soft);color:var(--brand)}
.presence-dot{display:inline-block;width:8px;height:8px;border-radius:50%;margin-right:2px;vertical-align:middle;background:#aaa}
.presence-dot.online{background:#22c55e;box-shadow:0 0 0 3px rgba(34,197,94,.14)}
.presence-dot.offline{background:#a3a3a3}
.seller-quick-actions{display:grid;grid-template-columns:1fr 1fr;gap:9px;margin:-8px 0 14px}
.seller-quick-actions .soft-btn{min-height:44px;text-align:center}
.product-buy-panel{display:grid;gap:10px}
.product-chat-primary{display:flex;align-items:center;justify-content:center;min-height:48px;padding:12px 16px;border:1px solid #e4c7eb;border-radius:13px;background:#fff;color:#7f1694;font-weight:900;text-align:center}
.product-reviews-section{margin-top:48px}
.product-reviews-section>.section-head{margin-top:0}
body.modal-open{overflow:hidden}
.contact-modal[hidden]{display:none!important}
.contact-modal{position:fixed;inset:0;z-index:3000;display:grid;place-items:center;padding:20px}
.contact-modal-backdrop{position:absolute;inset:0;background:rgba(25,15,29,.58);backdrop-filter:blur(7px)}
.contact-modal-dialog{position:relative;z-index:1;width:min(100%,620px);max-height:min(90dvh,820px);overflow:auto;border-radius:24px;box-shadow:0 30px 90px rgba(21,8,27,.28);-webkit-overflow-scrolling:touch}
.contact-card-modal{position:static!important;top:auto!important;border:0;border-radius:24px;padding:28px;background:#fff}
.contact-modal-close{position:sticky;float:right;top:12px;margin:10px 10px -54px auto;z-index:3;width:40px;height:40px;border:0;border-radius:50%;background:#f3edf4;color:#352a38;font-size:1.45rem;cursor:pointer}
.contact-card-modal h2{padding-right:44px}
.seller-community-actions{display:flex;gap:9px;align-items:center;flex-wrap:wrap}
#seller-products{scroll-margin-top:135px}

@media(max-width:980px){
  .topbar{position:sticky;top:0;z-index:1600}
  .topbar-inner{width:100%;max-width:none;padding:10px 12px;display:grid!important;grid-template-columns:minmax(0,1fr) auto;grid-template-areas:"brand actions" "search search";gap:9px 10px}
  .brand{grid-area:brand;min-width:0;align-self:center}
  .brand span{font-size:1.25rem;line-height:1}
  .brand small{display:block!important;font-size:.47rem;letter-spacing:.13em;margin-top:4px}
  .header-search{grid-area:search!important;max-width:none!important;width:100%;order:initial!important}
  .header-search input{height:44px;padding:10px 14px 10px 42px;border-radius:13px;font-size:.88rem}
  .header-search span{left:15px;top:6px}
  .top-actions{grid-area:actions!important;margin:0!important;gap:6px;min-width:0}
  .top-actions .soft-btn,.top-actions .primary-btn,.top-actions .icon-btn{min-height:40px;height:40px;padding:0 10px;border-radius:11px;font-size:.7rem;white-space:nowrap}
  .header-user-btn{width:40px!important;min-width:40px!important;padding:0!important}
  .header-user-name{display:none!important}
  .header-community-btn>span:first-child{display:none}
  .header-community-btn{width:40px!important;min-width:40px!important;padding:0!important;position:relative}
  .header-community-btn:before{content:"✉";font-size:1rem}
  .header-community-btn .social-count-badge{position:absolute;right:-3px;top:-4px;min-width:17px;height:17px;font-size:.56rem}
  .top-actions>.primary-btn{max-width:104px;overflow:hidden;text-overflow:ellipsis}
  .language-switcher>summary{width:40px;min-height:40px;height:40px;padding:0;justify-content:center;font-size:0}
  .language-switcher>summary::first-letter{font-size:1rem}
  .language-switcher>summary span{display:none}
  .language-menu{right:0}

  .tw-site-nav{position:relative;z-index:1500;background:#fff;border-bottom:1px solid var(--line)}
  .tw-site-nav-inner{width:100%!important;min-height:48px!important;padding:5px 12px!important;display:flex!important;justify-content:flex-end!important}
  .tw-site-home{display:none!important}
  .tw-mobile-site-menu{display:block!important;width:100%;margin:0!important}
  .tw-mobile-site-menu>summary{width:100%;min-height:40px!important;justify-content:space-between!important;border-radius:12px!important;padding:0 12px!important;background:#faf7fb!important;border:1px solid #eee5f0!important;color:#5f2a68!important;box-shadow:none!important}
  .tw-mobile-site-menu>summary>span:nth-child(2){display:block!important;font-size:.72rem;font-weight:850}
  .tw-mobile-site-panel{position:fixed!important;left:10px!important;right:10px!important;top:118px!important;bottom:10px!important;width:auto!important;max-height:none!important;padding:10px!important;border-radius:20px!important;overflow:auto!important;overscroll-behavior:contain;background:#fff!important;box-shadow:0 24px 70px rgba(30,15,35,.22)!important}
  .tw-mobile-site-panel>a{min-height:50px!important;grid-template-columns:36px minmax(0,1fr)!important;gap:9px!important;padding:7px 8px!important}
  .tw-mobile-link-icon{width:36px!important;height:36px!important;border-radius:10px!important}
  .tw-mobile-site-panel strong{font-size:.78rem!important}
  .tw-mobile-site-panel small{font-size:.62rem!important;line-height:1.25!important}
  .tw-mobile-quick-actions{position:sticky!important;bottom:-10px!important;background:#fff!important;margin:8px -2px -10px!important;padding:10px 2px calc(10px + env(safe-area-inset-bottom))!important;z-index:2!important}

  .page-shell{width:100%!important;max-width:none!important;padding:14px 14px 52px!important}
  .breadcrumbs{margin:4px 0 14px;padding:0 2px;font-size:.73rem;white-space:nowrap;overflow-x:auto;scrollbar-width:none}
  .product-detail{grid-template-columns:1fr!important;gap:14px!important}
  .detail-gallery{padding:8px!important;border-radius:18px!important}
  .media-stage{border-radius:14px!important;aspect-ratio:1/1.04!important}
  .media-stage>img,.media-stage>video{border-radius:14px!important}
  .media-thumbs{gap:8px!important;padding-top:9px!important}
  .media-thumb{flex:0 0 64px!important;width:64px!important;height:64px!important;border-radius:11px!important}
  .detail-info{padding:4px 2px 0!important;min-width:0}
  .detail-info h1{font-size:clamp(1.9rem,7vw,2.75rem)!important;line-height:1.03!important;overflow-wrap:anywhere}
  .detail-rating{flex-wrap:wrap;gap:4px 10px!important;font-size:.78rem!important}
  .detail-price{font-size:1.55rem!important;margin:14px 0!important}
  .detail-desc{font-size:.94rem;line-height:1.65;overflow-wrap:anywhere}
  .spec{display:grid!important;grid-template-columns:minmax(95px,.38fr) minmax(0,1fr)!important;gap:12px!important;align-items:start!important}
  .spec strong{text-align:right;overflow-wrap:anywhere}
  .seller-card{margin:14px 0 10px!important;padding:12px!important;border-radius:15px!important;min-width:0}
  .seller-card>div:nth-child(2){min-width:0}
  .seller-card strong,.seller-card span{overflow-wrap:anywhere}
  .seller-quick-actions{grid-template-columns:1fr 1fr;margin:0 0 12px}
  .product-buy-panel{gap:9px}
  .huge{margin-top:4px!important;min-height:52px}
  .buy-note{font-size:.72rem!important;line-height:1.45!important;padding:0 4px}
  .product-reviews-section{margin-top:34px}
  .reviews-grid{grid-template-columns:1fr!important}

  .seller-profile-main{padding-inline:16px!important}
  .seller-profile-copy{min-width:0}
  .seller-profile-copy h1{overflow-wrap:anywhere}
  .seller-community-actions{padding-inline:2px}
  .seller-community-actions .primary-btn,.seller-community-actions .soft-btn{flex:1 1 220px}
}

@media(max-width:620px){
  .topbar-inner{padding:8px 9px;gap:7px}
  .brand span{font-size:1.08rem}
  .brand small{font-size:.42rem}
  .top-actions{gap:4px}
  .top-actions .primary-btn{max-width:86px;padding-inline:8px;font-size:.62rem}
  .top-actions .soft-btn,.top-actions .icon-btn,.language-switcher>summary{width:38px!important;min-width:38px!important;height:38px!important;min-height:38px!important}
  .header-search input{height:41px;font-size:.82rem}
  .tw-site-nav-inner{padding:4px 9px!important}
  .tw-mobile-site-panel{top:105px!important;left:7px!important;right:7px!important;bottom:7px!important;border-radius:16px!important}
  .page-shell{padding:10px 10px 44px!important}
  .detail-gallery{padding:6px!important}
  .detail-info h1{font-size:clamp(1.72rem,9vw,2.25rem)!important}
  .detail-status-badges{gap:5px!important;flex-wrap:wrap}
  .detail-status{font-size:.58rem!important;padding:5px 7px!important}
  .seller-avatar-lg{width:42px!important;height:42px!important;flex:0 0 42px}
  .seller-card small{font-size:.58rem!important}.seller-card strong{font-size:.9rem!important}.seller-card span{font-size:.7rem!important}
  .seller-quick-actions{grid-template-columns:1fr!important}
  .seller-quick-actions .soft-btn,.product-chat-primary{width:100%;min-height:46px}
  .spec{grid-template-columns:1fr!important;gap:4px!important}
  .spec strong{text-align:left!important}
  .contact-modal{padding:0!important;align-items:end!important}
  .contact-modal-dialog{width:100%!important;max-height:92dvh!important;border-radius:22px 22px 0 0!important}
  .contact-card-modal{padding:22px 16px calc(20px + env(safe-area-inset-bottom))!important;border-radius:22px 22px 0 0!important}
  .contact-card-modal h2{font-size:1.55rem!important}
  .contact-modal-close{top:8px;margin:8px 8px -48px auto}
  .form-stack{gap:12px!important}.form-stack input,.form-stack select,.form-stack textarea{font-size:16px!important}
  .seller-profile-hero{border-radius:18px!important}
  .seller-profile-main{margin-top:-42px!important;padding:0 12px 16px!important}
  .seller-profile-avatar{width:88px!important;height:88px!important}
  .seller-metrics{display:grid!important;grid-template-columns:repeat(3,1fr)!important;width:100%;gap:6px!important}
  .seller-metrics b{min-width:0!important;padding:9px 6px!important;font-size:.85rem!important}
  .seller-metrics small{font-size:.56rem!important}
}

@media(max-width:390px){
  .top-actions>.primary-btn{display:none!important}
  .detail-info h1{font-size:1.68rem!important}
  .seller-metrics{grid-template-columns:1fr 1fr!important}
}
@media(max-width:620px){
  body{overflow-x:hidden}
  .product-grid{grid-template-columns:repeat(2,minmax(0,1fr))!important;gap:9px!important}
  .product-card{border-radius:14px!important}
  .product-image{aspect-ratio:1/1.15!important}
  .product-body{padding:10px!important}
  .product-title{font-size:.8rem!important;min-height:2.5em!important}
  .seller-line{font-size:.66rem!important;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}
  .rating-line{font-size:.66rem!important;margin:7px 0!important}
  .rating-line small{display:none}
  .card-bottom{padding-top:8px!important;gap:5px}
  .card-bottom strong{font-size:.9rem!important}
  .mini-buy{padding:7px 8px!important;font-size:.68rem!important}
}
@media(max-width:340px){.product-grid{grid-template-columns:1fr!important}}


/* ============================================================
   TWORIVO V11 — INVENTORY & SELLER OPERATIONS
   ============================================================ */
.inventory-op-grid{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:18px;align-items:start}.inventory-op-card{margin:0}.inventory-placement-grid{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:12px}.inventory-placement-card{display:grid;grid-template-columns:minmax(0,1.4fr) minmax(140px,.8fr) auto;gap:16px;align-items:center;padding:16px;border:1px solid var(--line);border-radius:18px;background:#fff}.inventory-placement-card.is-low,.seller-inventory-card.is-low{border-color:#f0b44d;background:#fffaf0}.inventory-sku{display:inline-flex;font-size:.68rem;font-weight:900;letter-spacing:.08em;color:var(--purple);background:#f7ecfa;padding:5px 8px;border-radius:999px}.inventory-placement-card h3,.seller-inventory-card h3{margin:7px 0 3px}.inventory-location{font-size:.78rem;color:var(--muted);display:flex;flex-direction:column}.inventory-location strong{color:var(--ink);margin-top:3px}.inventory-count{text-align:right;display:flex;flex-direction:column}.inventory-count>strong{font-size:1.8rem;line-height:1}.inventory-count>span,.inventory-count>small{color:var(--muted);font-size:.72rem}.inventory-threshold-form{grid-column:1/-1;display:flex;justify-content:flex-end;align-items:center;gap:6px}.inventory-threshold-form label{font-size:.72rem;color:var(--muted)}.inventory-threshold-form input{width:64px;padding:7px}.inventory-threshold-form button{border:0;border-radius:8px;padding:7px 10px;font-weight:800}.inventory-delta.plus{color:#138a4b;font-weight:900}.inventory-delta.minus{color:#b52f3f;font-weight:900}.seller-inventory-summary-card{margin:18px 0;display:flex;align-items:center;justify-content:space-between;gap:20px;padding:22px;border-radius:22px;border:1px solid var(--line);background:linear-gradient(135deg,#fff,#fbf5fc)}.seller-inventory-summary-card h2{margin:4px 0}.seller-inventory-summary-actions{display:flex;align-items:center;gap:10px;flex-wrap:wrap}.low-stock-badge{display:inline-flex;padding:7px 10px;border-radius:999px;background:#fff0d5;color:#9a5a00;font-size:.72rem;font-weight:900}.warn-stat{background:#fff8e9!important}.seller-inventory-grid{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:14px}.seller-inventory-card{display:grid;grid-template-columns:90px minmax(0,1fr);gap:14px;padding:14px;border:1px solid var(--line);border-radius:18px;background:#fff}.seller-inventory-card>img{width:90px;height:90px;object-fit:cover;border-radius:14px}.seller-inventory-card p{margin:4px 0;color:var(--muted);font-size:.78rem}.seller-stock-row{display:flex;gap:10px;flex-wrap:wrap;margin:9px 0}.seller-stock-row span{padding:6px 8px;background:#f7f5f8;border-radius:8px;font-size:.72rem}.scanner-panel{max-width:720px;margin-left:auto;margin-right:auto}.scanner-box{position:relative;overflow:hidden;border-radius:24px;background:#18131b;aspect-ratio:4/3}.scanner-box video{width:100%;height:100%;object-fit:cover}.scanner-frame{position:absolute;inset:22% 10%;border:3px solid #d400ce;border-radius:18px;box-shadow:0 0 0 999px rgba(0,0,0,.25)}.scanner-actions,.scanner-search{display:flex;gap:10px;margin-top:12px}.scanner-search input{flex:1}.inventory-stats{margin-bottom:20px}
@media(max-width:980px){.inventory-op-grid{grid-template-columns:1fr}.inventory-placement-grid,.seller-inventory-grid{grid-template-columns:1fr}}
@media(max-width:620px){.inventory-placement-card{grid-template-columns:1fr}.inventory-count{text-align:left}.seller-inventory-summary-card{align-items:flex-start;flex-direction:column}.seller-inventory-card{grid-template-columns:72px minmax(0,1fr)}.seller-inventory-card>img{width:72px;height:72px}.scanner-actions,.scanner-search{flex-direction:column}.table-wrap{overflow:auto;-webkit-overflow-scrolling:touch}.table-wrap table{min-width:760px}}

/* ============================================================
   TWORIVO V11.1 — MOBILE BOTTOM NAV + MANUAL LANGUAGE
   Additive override. Desktop behavior and backend logic unchanged.
   ============================================================ */
.tw-mobile-bottom-nav{display:none}

@media(max-width:980px){
  /* The old expanding mobile menu stays in source for compatibility,
     but the active mobile UX is now the fixed bottom navigation. */
  .tw-mobile-site-menu{display:none!important}
  .tw-site-nav{display:none!important}

  .topbar-inner{
    grid-template-columns:1fr!important;
    grid-template-areas:"brand" "search"!important;
    gap:8px!important;
    padding:10px 12px!important;
  }
  .brand{grid-area:brand!important;justify-self:start!important}
  .top-actions{display:none!important}
  .header-search{grid-area:search!important;width:100%!important}

  body{padding-bottom:calc(74px + env(safe-area-inset-bottom))!important}
  .page-shell{padding-bottom:38px!important}
  .site-footer{margin-bottom:0!important}

  .market-hero{
    padding:28px 18px 26px!important;
    border-radius:22px!important;
  }
  .market-hero h1{
    font-size:clamp(2.25rem,10.7vw,3.35rem)!important;
    line-height:.98!important;
    letter-spacing:-.025em!important;
    overflow-wrap:normal!important;
    word-break:normal!important;
    hyphens:none!important;
  }
  .market-hero p{font-size:.96rem!important;line-height:1.55!important}
  .hero-actions{display:grid!important;grid-template-columns:1fr!important;gap:8px!important}
  .hero-actions>a{width:100%!important;min-height:44px!important}
  .trust-strip{margin:-10px 8px 24px!important;grid-template-columns:1fr!important;border-radius:18px!important}
  .trust-strip>div{padding:13px 15px!important;border-right:0!important;border-bottom:1px solid var(--line)}
  .trust-strip>div:last-child{border-bottom:0!important}

  .tw-mobile-bottom-nav{
    position:fixed;
    left:0;right:0;bottom:0;
    z-index:4200;
    display:grid;
    grid-template-columns:repeat(5,minmax(0,1fr));
    align-items:end;
    min-height:64px;
    padding:6px max(8px,env(safe-area-inset-right)) calc(6px + env(safe-area-inset-bottom)) max(8px,env(safe-area-inset-left));
    background:rgba(255,255,255,.97);
    border-top:1px solid #eadfeb;
    box-shadow:0 -14px 36px rgba(37,21,43,.10);
    backdrop-filter:blur(18px);
    -webkit-backdrop-filter:blur(18px);
  }
  .tw-bottom-item{
    position:relative;
    min-width:0;
    min-height:50px;
    display:flex;
    flex-direction:column;
    align-items:center;
    justify-content:center;
    gap:2px;
    padding:4px 2px;
    border:0;
    border-radius:13px;
    background:transparent;
    color:#746a77;
    list-style:none;
    text-align:center;
    cursor:pointer;
  }
  .tw-bottom-item::-webkit-details-marker{display:none}
  .tw-bottom-item.active,.tw-bottom-item:focus-visible{color:var(--brand);background:#f8ebfb}
  .tw-bottom-icon{font-size:1.1rem;line-height:1;font-weight:900}
  .tw-bottom-item small{display:block;max-width:100%;font-size:.58rem;line-height:1.1;font-weight:850;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}
  .tw-bottom-badge{position:absolute;top:2px;left:calc(50% + 8px);display:grid;place-items:center;min-width:17px;height:17px;padding:0 4px;border-radius:999px;background:#e300ad;color:#fff;font-size:.52rem;font-weight:900}

  .tw-bottom-more{position:static;min-width:0}
  .tw-bottom-more>summary{width:100%}
  .tw-bottom-sheet{
    position:fixed;
    left:10px;right:10px;
    bottom:calc(70px + env(safe-area-inset-bottom));
    z-index:4300;
    max-height:min(72dvh,640px);
    overflow:auto;
    padding:10px 12px 14px;
    border:1px solid #eadfeb;
    border-radius:24px;
    background:#fff;
    box-shadow:0 30px 90px rgba(31,15,37,.25);
    -webkit-overflow-scrolling:touch;
  }
  .tw-bottom-sheet-handle{width:42px;height:4px;margin:1px auto 10px;border-radius:999px;background:#ddd2df}
  .tw-bottom-sheet-head{display:flex;align-items:center;justify-content:space-between;gap:12px;padding:4px 4px 10px;border-bottom:1px solid var(--line)}
  .tw-bottom-sheet-head>div{display:flex;flex-direction:column}.tw-bottom-sheet-head strong{font-family:Georgia,serif;font-size:1.05rem}.tw-bottom-sheet-head small{font-size:.56rem;color:var(--brand);font-weight:850;letter-spacing:.1em}.tw-bottom-sheet-head>span{font-size:.67rem;color:var(--muted);font-weight:800}
  .tw-bottom-sheet>a{display:grid;grid-template-columns:34px 1fr;align-items:center;gap:9px;min-height:46px;padding:6px 7px;border-radius:12px;color:#352d38}
  .tw-bottom-sheet>a:hover,.tw-bottom-sheet>a:focus-visible{background:#faf3fb}
  .tw-bottom-sheet>a>span{width:34px;height:34px;display:grid;place-items:center;border-radius:10px;background:#f5e9f8;color:#79298e;font-weight:900}
  .tw-bottom-sheet>a>b{font-size:.76rem}
  .tw-bottom-language{margin-top:7px;padding:10px;border-top:1px solid var(--line)}
  .tw-bottom-language>strong{display:block;margin-bottom:8px;font-size:.7rem;color:#6e6471}
  .tw-bottom-language-grid{display:grid;grid-template-columns:repeat(4,1fr);gap:7px}
  .tw-bottom-language-grid a{display:flex;align-items:center;justify-content:center;min-height:38px;border:1px solid var(--line);border-radius:10px;background:#fff;font-size:.68rem;font-weight:900}
  .tw-bottom-language-grid a.active{color:#fff;border-color:var(--brand);background:linear-gradient(135deg,var(--brand),var(--brand2))}
  .tw-bottom-logout{margin-top:4px;color:#9d2744!important}

  /* Product/catalog typography protection on narrow screens */
  .product-title,.detail-info h1,.detail-desc,.seller-card,.section-head h2{word-break:normal!important;overflow-wrap:anywhere}
  .detail-info h1{font-size:clamp(1.85rem,8vw,2.55rem)!important}
  .spec{grid-template-columns:minmax(90px,.42fr) minmax(0,1fr)!important}
}

@media(max-width:430px){
  .page-shell{padding-left:10px!important;padding-right:10px!important}
  .market-hero{padding-left:15px!important;padding-right:15px!important}
  .market-hero h1{font-size:clamp(2.15rem,11.7vw,3rem)!important}
  .tw-bottom-item small{font-size:.54rem}
  .tw-bottom-sheet{left:7px;right:7px}
}


/* ==========================================================
   TWORIVO V11.4 — PROMOTIONS UI (additive)
   ========================================================== */
.badge.promotion{background:linear-gradient(135deg,#ff7a00,#d900b8);color:#fff;border:0;box-shadow:0 6px 18px rgba(217,0,184,.22)}
.promo-smart-link{border-color:rgba(217,0,184,.22)!important;background:#fff3fc!important;color:#a0008e!important;font-weight:800!important}
.catalog-price{display:flex;align-items:baseline;gap:8px;flex-wrap:wrap}.catalog-price .old-price,.detail-old-price,.checkout-old-price{text-decoration:line-through;color:#9c9198;font-weight:500;font-size:.78em}.catalog-price span{color:#bf00b5}.catalog-promo-note{margin-top:8px;font-size:.78rem;font-weight:800;color:#a3008f}.product-promotion-box{margin:16px 0;padding:18px;border:1px solid rgba(217,0,184,.18);border-radius:18px;background:linear-gradient(135deg,#fff7fd,#fff8ef);display:grid;gap:5px}.product-promotion-box>span{font-size:.72rem;letter-spacing:1.2px;font-weight:900;color:#b0009b}.product-promotion-box>strong{font-family:var(--serif,Georgia,serif);font-size:1.35rem;color:#8c007d}.product-promotion-box p,.product-promotion-box small{margin:0;color:#6d6068}.promotion-price-wrap strong{color:#c000b4}.promo-editor-wrap{max-width:980px;margin:36px auto 90px;padding:0 20px}.promo-editor-card{background:#fff;border:1px solid #eadfe7;border-radius:26px;padding:30px;box-shadow:0 20px 50px rgba(38,20,33,.08)}.promo-editor-head{display:flex;justify-content:space-between;gap:24px;align-items:flex-start;margin-bottom:22px}.promo-editor-head h1{margin:5px 0}.promo-editor-head p{color:#776a72;max-width:650px}.promo-product-mini{display:flex;align-items:center;gap:16px;background:#faf7fa;border-radius:18px;padding:14px;margin-bottom:22px}.promo-product-mini img{width:74px;height:74px;object-fit:cover;border-radius:14px}.promo-product-mini div{display:flex;flex-direction:column;gap:4px}.promo-live-badge{color:#a50090}.promo-form{display:grid;gap:16px}.promo-form label{display:grid;gap:7px;font-weight:700}.promo-form input,.promo-form select{width:100%;padding:13px 14px;border:1px solid #dfd2dc;border-radius:12px;font:inherit;background:#fff}.promo-date-grid{display:grid;grid-template-columns:1fr 1fr;gap:14px}.promo-delete-form{margin-top:12px}.soft-btn.danger{color:#b3261e;border-color:#f0c7c2}.checkout-promotion-preview{display:grid;gap:5px;padding:14px 16px;border-radius:15px;background:#fff4fb;border:1px solid #efd1e8}.checkout-promotion-preview b{color:#a40091}.table-action.promo{background:#fff0fb;color:#a00091;border-color:#efd0e9}
@media(max-width:700px){.promo-editor-card{padding:20px;border-radius:20px}.promo-editor-head{flex-direction:column}.promo-date-grid{grid-template-columns:1fr}.product-promotion-box{padding:15px}.catalog-price{gap:5px}}


/* ============================================================
   TWORIVO V12 — Commerce Bridge UI (additive)
   ============================================================ */
.v12-product-actions{display:flex;flex-wrap:wrap;gap:10px;margin:14px 0 4px;padding:14px;border:1px solid #eadfea;border-radius:16px;background:#fff}
.v12-inline-form{display:inline-flex;margin:0}.v12-product-actions .soft-btn.is-active,.v12-favorite-btn.is-active{background:#f7e7fb;color:#a100b6;border-color:#dca7e8}.v12-hold-btn{background:linear-gradient(135deg,#156b55,#24876f)}
.v12-hold-state{display:flex;flex-direction:column;gap:2px;padding:9px 13px;border-radius:13px;background:#edf9f4;color:#175d4b}.v12-hold-state span{font-size:12px;color:#56756c}
.seller-growth-summary-card{display:flex;justify-content:space-between;gap:20px;align-items:center;margin:20px 0;padding:22px;border:1px solid #eadfea;border-radius:20px;background:linear-gradient(135deg,#fff,#fbf6fc)}
.seller-growth-metrics{display:grid;grid-template-columns:repeat(4,minmax(90px,1fr));gap:8px}.seller-growth-metrics span{padding:12px;border-radius:14px;background:#fff;border:1px solid #eee3ef;text-align:center;font-size:12px}.seller-growth-metrics strong{display:block;font-size:22px;color:#a300c0}
.v12-personal-head{background:linear-gradient(135deg,#fff,#f9effb)}.v12-hold-grid,.v12-follow-grid{display:grid;grid-template-columns:repeat(auto-fit,minmax(260px,1fr));gap:12px}.v12-hold-card{display:grid;grid-template-columns:96px 1fr;gap:14px;padding:12px;border:1px solid #eadfea;border-radius:18px;background:#fff}.v12-hold-card img{width:96px;height:96px;object-fit:cover;border-radius:13px}.v12-hold-card h3{margin:0 0 4px}.v12-follow-card{display:flex;align-items:center;gap:12px;padding:14px;border:1px solid #eadfea;border-radius:16px;background:#fff;color:inherit;text-decoration:none}.v12-follow-card>div:nth-child(2){display:flex;flex-direction:column;flex:1}.v12-follow-card>div:nth-child(2) span{font-size:12px;color:#7f7180}.v12-watch-list{display:grid;gap:9px}.v12-watch-list article{display:flex;align-items:center;gap:12px;padding:10px;border:1px solid #eadfea;border-radius:15px;background:#fff}.v12-watch-list img{width:58px;height:58px;object-fit:cover;border-radius:10px}.v12-watch-list article>div{display:flex;flex:1;flex-direction:column}.v12-available{color:#197052;font-weight:800;font-size:12px}.v12-waiting{color:#8a7786;font-size:12px}
.gift-hero{display:flex;justify-content:space-between;align-items:center;gap:24px;padding:42px;border-radius:28px;background:linear-gradient(135deg,#4e126e,#d000c4);color:#fff;margin:22px 0}.gift-hero h1{font-size:clamp(2rem,5vw,4rem);max-width:760px;margin:.2em 0}.gift-hero p{max-width:650px}.gift-orb{display:grid;place-items:center;width:150px;height:150px;border-radius:50%;background:rgba(255,255,255,.14);font-size:60px;border:1px solid rgba(255,255,255,.22)}
.gift-finder-form{display:grid;grid-template-columns:1fr 1fr 1.4fr 1fr auto;gap:10px;align-items:end;padding:18px;margin:18px 0 30px;border:1px solid #eadfea;border-radius:18px;background:#fff}.gift-finder-form label{display:grid;gap:6px;font-weight:700;font-size:12px}.gift-finder-form input,.gift-finder-form select{min-height:44px;border:1px solid #ddd1de;border-radius:12px;padding:0 12px}.gift-check{display:flex!important;align-items:center!important;gap:8px!important;min-height:44px}.gift-check input{min-height:auto!important;width:18px;height:18px}.heart.is-server-favorite{background:#fff0fb;color:#bd00b9}
@media(max-width:900px){.seller-growth-summary-card{align-items:stretch;flex-direction:column}.seller-growth-metrics{grid-template-columns:repeat(2,1fr);width:100%}.gift-hero{padding:26px 20px}.gift-orb{display:none}.gift-finder-form{grid-template-columns:1fr 1fr}.gift-finder-form .primary-btn{grid-column:1/-1}.v12-product-actions>*{flex:1 1 100%}.v12-product-actions .soft-btn,.v12-product-actions .primary-btn{width:100%}.v12-hold-card{grid-template-columns:74px 1fr}.v12-hold-card img{width:74px;height:74px}}
@media(max-width:520px){.gift-finder-form{grid-template-columns:1fr}.gift-finder-form .primary-btn{grid-column:auto}.v12-hold-grid,.v12-follow-grid{grid-template-columns:1fr}.v12-watch-list article{align-items:flex-start;flex-wrap:wrap}.v12-watch-list article .soft-btn{width:100%}}


/* TWORIVO V12.1 — Google Identity Services */
.google-auth-block{margin-top:18px;text-align:center}.auth-divider{display:flex;align-items:center;gap:12px;color:var(--muted);font-size:.78rem;margin:18px 0}.auth-divider:before,.auth-divider:after{content:"";height:1px;background:var(--line);flex:1}.google-auth-block .g_id_signin{display:flex;justify-content:center;min-height:44px}.google-auth-note{display:block;margin-top:10px;color:var(--muted);line-height:1.45}.auth-status-grid{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:12px;margin-bottom:22px}.auth-status-grid>div{padding:16px;border:1px solid var(--line);border-radius:16px;background:#fff}.auth-status-grid span{display:block;color:var(--muted);font-size:.76rem;margin-bottom:6px}.auth-status-grid strong{overflow-wrap:anywhere}.info-box code{overflow-wrap:anywhere}@media(max-width:760px){.auth-status-grid{grid-template-columns:1fr}.google-auth-block .g_id_signin{overflow:hidden}}
