
:root{
  --bg:#f0f2f5;
  --card:#ffffff;
  --text:#111827;
  --muted:#6b7280;
  --accent:#0866ff; /* FB blue */
  --accent2:#e7f0ff;
  --danger:#ef4444;
  --shadow: 0 10px 30px rgba(0,0,0,.10);
  --radius: 18px;
  --radius2: 14px;
}

/* Non-blocking toast (replaces alert dialogs on iOS) */
.emw-toast{
  position: fixed;
  left: 50%;
  bottom: calc(18px + env(safe-area-inset-bottom));
  transform: translateX(-50%);
  max-width: min(520px, calc(100vw - 24px));
  background: rgba(20,20,20,.92);
  color: #fff;
  padding: 12px 14px;
  border-radius: 14px;
  font-size: 14px;
  line-height: 1.35;
  box-shadow: 0 14px 40px rgba(0,0,0,.35);
  opacity: 0;
  pointer-events: none;
  transition: opacity .18s ease, transform .18s ease;
  z-index: 999999;
}
.emw-toast.is-show{
  opacity: 1;
  transform: translateX(-50%) translateY(-2px);
}

.emw-bg{
  position:fixed; inset:0;
  background: radial-gradient(1200px 600px at 20% 10%, rgba(215,191,167,.35), transparent 60%),
              radial-gradient(900px 500px at 80% 30%, rgba(122,90,54,.20), transparent 60%),
              linear-gradient(180deg, rgba(246,241,232,1), rgba(246,241,232,1));
  z-index:-1;
}

.emw-wrap{ max-width: 1100px; margin: 0 auto; padding: 34px 16px 60px; color:var(--text); font-family: ui-sans-serif, system-ui, -apple-system, Segoe UI, Roboto, Arial, sans-serif; }
.emw-hero{ margin-bottom: 18px; }
.emw-badge{ display:inline-flex; padding:6px 12px; border-radius:999px; background:rgba(255,255,255,.65); border:1px solid rgba(122,90,54,.18); color:var(--accent); font-weight:700; letter-spacing:.4px; }
.emw-title{ font-size: clamp(28px, 4vw, 44px); margin: 10px 0 6px; line-height:1.06; }
.emw-sub{ margin:0; color:var(--muted); font-size: 16px; }

.emw-card{ background: rgba(255,250,242,.85); border: 1px solid rgba(122,90,54,.14); border-radius: var(--radius); box-shadow: var(--shadow); overflow:hidden; backdrop-filter: blur(8px); }
.emw-step{ padding: 18px; }
.emw-stepTitle{ font-weight: 800; font-size: 16px; margin-bottom: 6px; }
.emw-stepSub{ color:var(--muted); font-size: 14px; margin-bottom: 12px; }
.emw-sep{ height:1px; background: rgba(122,90,54,.12); }

.emw-actions{ display:flex; gap:10px; flex-wrap:wrap; align-items:center; }
.emw-btn{ appearance:none; border:none; cursor:pointer; text-decoration:none; display:inline-flex; align-items:center; justify-content:center; padding: 12px 14px; border-radius: 16px; background: rgba(255,255,255,.70); color:var(--text); border: 1px solid rgba(122,90,54,.16); transition: transform .08s ease, box-shadow .2s ease; font-weight:700; }
.emw-btn:hover{ transform: translateY(-1px); box-shadow: 0 10px 26px rgba(20,12,6,.10); }
.emw-btn:disabled{ opacity:.45; cursor:not-allowed; transform:none; box-shadow:none; }
.emw-primary{ background: linear-gradient(180deg, rgba(122,90,54,.95), rgba(104,76,43,.95)); color:#fff; border-color: rgba(122,90,54,.25); }

.emw-file{ position:absolute; left:-9999px; width:1px; height:1px; opacity:0; }
.emw-grid{ display:grid; grid-template-columns: repeat(auto-fill, minmax(120px, 1fr)); gap:10px; margin-top: 12px; }
.emw-preview{ border-radius: 18px; overflow:hidden; border:1px solid rgba(122,90,54,.12); background: rgba(255,255,255,.6); position:relative; }
.emw-preview img, .emw-preview video{ width:100%; height:140px; object-fit:cover; display:block; }
.emw-pill{ position:absolute; top:10px; left:10px; padding:6px 10px; border-radius:999px; background: rgba(0,0,0,.55); color:#fff; font-size:12px; font-weight:700; }

.emw-row{ display:grid; grid-template-columns: 1fr 1fr; gap: 12px; margin-top: 10px; }
@media(max-width:800px){ .emw-row{ grid-template-columns: 1fr; } }

.emw-label{ display:block; font-size: 13px; color:var(--muted); margin: 10px 0 6px; font-weight:700; }
.emw-input, .emw-textarea{ width:100%; padding: 12px 14px; border-radius: 16px; border: 1px solid rgba(122,90,54,.16); background: rgba(255,255,255,.75); outline:none; font-size: 14px; }
.emw-textarea{ min-height: 98px; resize: vertical; }
.emw-input:focus, .emw-textarea:focus{ border-color: rgba(122,90,54,.35); box-shadow: 0 0 0 4px rgba(215,191,167,.35); }

.emw-consent{ display:flex; gap:10px; align-items:flex-start; margin-top: 10px; color:var(--muted); font-size: 13px; }
.emw-consent input{ margin-top: 2px; }

.emw-progress{ margin-top: 14px; }
.emw-bar{ height: 10px; border-radius: 999px; background: rgba(122,90,54,.10); overflow:hidden; }
.emw-barFill{ height:100%; width:0%; background: linear-gradient(90deg, rgba(122,90,54,.95), rgba(215,191,167,.95)); transition: width .15s ease; }
.emw-progText{ margin-top: 8px; font-size: 13px; color:var(--muted); }

.emw-alert{ margin-top: 12px; padding: 12px 14px; border-radius: 16px; font-weight: 700; white-space: pre-line; }
.emw-ok{ background: rgba(80, 160, 120, .12); border: 1px solid rgba(80, 160, 120, .25); }
.emw-err{ background: rgba(210, 70, 70, .10); border: 1px solid rgba(210, 70, 70, .22); }

.emw-foot{ margin-top: 18px; color:var(--muted); font-size: 13px; }

/* WALL */
.emw-masonry{ column-count: 4; column-gap: 10px; }
@media(max-width:1000px){ .emw-masonry{ column-count: 2; } }
@media(max-width:560px){ .emw-masonry{ column-count: 1; } }
.emw-tile{ break-inside: avoid; margin-bottom: 10px; border-radius: 20px; overflow: visible; border: 1px solid rgba(122,90,54,.14); background: rgba(255,255,255,.55); box-shadow: 0 10px 26px rgba(20,12,6,.08); cursor:pointer; }
.emw-tile{ contain: layout paint; content-visibility: auto; contain-intrinsic-size: 320px 520px; }
/* iOS WebKit scroll flicker fix */
/* iPhone Chrome uses WebKit; content-visibility/contain + CSS columns can cause flicker during scroll.
   We disable those optimizations on iOS and force stable compositing for media tiles. */
@supports (-webkit-touch-callout: none) {
  .emw-tile{ content-visibility: visible; contain: none; -webkit-transform: translateZ(0); transform: translateZ(0); -webkit-backface-visibility: hidden; backface-visibility: hidden; }
  .emw-tileMedia{ -webkit-transform: translateZ(0); transform: translateZ(0); -webkit-backface-visibility: hidden; backface-visibility: hidden; }
  .emw-tile img, .emw-tile video{ -webkit-transform: translateZ(0); transform: translateZ(0); -webkit-backface-visibility: hidden; backface-visibility: hidden; }
}

.emw-tileMedia{ position:relative; overflow:hidden; border-top-left-radius:20px; border-top-right-radius:20px; }

.emw-thumbWrap{ display:flex; flex-direction:column; gap:8px; }
.emw-thumbItem{ width:100%; display:block; height:auto; border-radius: 0; cursor: zoom-in; }
.emw-tileMedia .emw-thumbItem:first-child{ border-top-left-radius: 20px; border-top-right-radius: 20px; }
.emw-tileMedia .emw-thumbItem:last-child{ }
.emw-tile img, .emw-tile video{ width:100%; display:block; height:auto; }
.emw-tile video{ background:#000; }
.emw-tileMeta{ padding: 10px 12px 12px; display:flex; flex-direction:column; gap:6px; }
.emw-miniRow{ display:flex; align-items:center; justify-content:space-between; gap:10px; }
.emw-name{ font-weight: 800; font-size: 13px; color: #2a2420; }
.emw-time{ font-size: 12px; color: var(--muted); }
.emw-msg{ font-size: 13px; color: #3a3230; line-height:1.35; }

.emw-likeMini{ display:inline-flex; gap:8px; align-items:center; padding:8px 10px; border-radius: 999px; background: rgba(255,255,255,.70); border:1px solid rgba(122,90,54,.14); font-weight:800; font-size: 13px; }
.emw-likeMini span{ display:inline-block; }
.emw-likeMini .emw-heart{ color:#c43a3a; font-size: 14px; }
.emw-likeMini .emw-react{ font-size: 22px; line-height: 1; transform: translateY(1px); }
.emw-likeMini .emw-likeNum{ font-variant-numeric: tabular-nums; }
.emw-likeMini.is-liked{ background: rgba(255,255,255,.92); border-color: rgba(122,90,54,.22); }

/* Reaction picker (Meta-like UX) */
.emw-reactWrap{ position:relative; display:inline-flex; }
.emw-reactPicker{
  position:absolute;
  left:50%;
  transform: translateX(-50%);
  bottom: calc(100% + 10px);
  background:#fff;
  border-radius: 999px;
  padding: 10px 12px;
  box-shadow: 0 12px 32px rgba(0,0,0,.22);
  border: 1px solid rgba(0,0,0,.08);
  display:flex;
  gap: 10px;
  align-items:center;
  z-index: 10;
  max-width: min(520px, calc(100vw - 24px));
  overflow-x: auto;
  overscroll-behavior: contain;
  -webkit-overflow-scrolling: touch;
  scrollbar-width: none;
  --emw-react-size: clamp(40px, 10vw, 52px);
  --emw-react-emoji: clamp(24px, 6vw, 32px);
}

/* Portal picker: rendered in <body> to avoid clipping by tile/lightbox containers */
.emw-reactPicker--portal{
  position: fixed;
  left: 0;
  top: 0;
  transform: none;
  bottom: auto;
  z-index: 999999;
  max-width: min(520px, calc(100vw - 20px));
  width: max-content;
}

/* Narrow screens: show 2 rows so all reactions fit without clipping */
@media (max-width: 420px){
  .emw-reactPicker--portal{
    flex-wrap: wrap;
    justify-content: space-between;
    border-radius: 18px;
    width: min(360px, calc(100vw - 20px));
    padding: 10px 10px;
  }
}

.emw-reactPicker::-webkit-scrollbar{ width:0; height:0; }

/* In lightbox show picker below (avoid clipping near top edge on iOS) */
.emw-lb .emw-reactPicker{
  bottom: auto;
  top: calc(100% + 10px);
}

/* Bigger reaction button in lightbox header */
.emw-lb .emw-likeMini{
  padding:10px 12px;
  font-size:14px;
}
.emw-lb .emw-likeMini .emw-react{ font-size:24px; }
.emw-reactPicker[hidden]{ display:none !important; }
.emw-reactOpt{
  width: var(--emw-react-size);
  height: var(--emw-react-size);
  border-radius: 999px;
  border: 0;
  background: transparent;
  cursor: pointer;
  font-size: var(--emw-react-emoji);
  line-height: var(--emw-react-size);
  transition: transform .12s ease;
}
.emw-reactOpt:hover,
.emw-reactOpt:focus{ transform: translateY(-2px) scale(1.06); outline:none; }
.emw-reactOpt:active{ transform: translateY(0) scale(.98); }
.emw-likeMini:active{ transform: translateY(1px); }

.emw-liveHint{ padding: 10px 12px; margin: 6px 0 10px; border-radius: 16px; background: rgba(215,191,167,.22); border: 1px solid rgba(122,90,54,.16); color: #3b2e22; font-weight: 800; }

/* LIGHTBOX removed in 4.1.1 */


/* Lightbox */
.emw-lightbox {
    position: fixed;
    inset: 0;
    background: rgba(0,0,0,0.9);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 9999;
}

.emw-lightbox img {
    max-width: 95%;
    max-height: 90%;
    object-fit: contain;
}


/* Lightbox (v4.3.1) */
.emw-lightbox{
  position:fixed; inset:0;
  background:rgba(0,0,0,.88);
  display:flex;
  align-items:center;
  justify-content:center;
  z-index:99999;
  padding:14px;
}
.emw-lb{
  position:relative;
  width:min(980px, 100%);
  background:#fff;
  border-radius:18px;
  overflow:hidden;
  box-shadow:0 20px 60px rgba(0,0,0,.35);
  max-height:92vh;
  display:flex;
  flex-direction:column;
}
.emw-lb-close{
  position:static;
  border:0;
  background:rgba(255,255,255,.96);
  width:44px; height:44px;
  border-radius:999px;
  font-size:0;
  line-height:0;
  cursor:pointer;
  box-shadow: 0 8px 18px rgba(0,0,0,.18);
  z-index: 2;
  display:flex;
  align-items:center;
  justify-content:center;
  -webkit-tap-highlight-color: transparent;
}
.emw-lb-close:hover{ background:#fff; }
.emw-lb-close svg{ width:22px; height:22px; display:block; }
.emw-lb-top{
  padding: calc(16px + env(safe-area-inset-top)) calc(16px + env(safe-area-inset-right)) 10px calc(16px + env(safe-area-inset-left));
  display:flex;
  justify-content:space-between;
  gap:12px;
  align-items:flex-start;
}
.emw-lb-name{ font-weight:700; font-size:18px; }
.emw-lb-time{ font-size:13px; opacity:.75; margin-top:2px; }
.emw-lb-actions{ display:flex; gap:10px; align-items:center; }
.emw-lb-open{
  width:40px; height:40px;
  border-radius:12px;
  border:1px solid rgba(0,0,0,.12);
  background:rgba(255,255,255,.9);
  cursor:pointer;
  font-size:0;
  line-height:0;
  display:flex;
  align-items:center;
  justify-content:center;
}
.emw-lb-open svg{ width:18px; height:18px; display:block; }
.emw-lb-likers{
  width:40px; height:40px;
  border-radius:12px;
  border:1px solid rgba(0,0,0,.12);
  background:rgba(255,255,255,.9);
  cursor:pointer;
  font-size:0;
  line-height:0;
  display:flex;
  align-items:center;
  justify-content:center;
}
.emw-lb-likers svg{ width:18px; height:18px; display:block; }
.emw-lb-counter{ font-size:13px; opacity:.7; }

/* Modal (FB-like) */
.emw-modal{
  position:absolute;
  inset:0;
  background: rgba(0,0,0,.45);
  display:flex;
  align-items:center;
  justify-content:center;
  padding:16px;
  z-index: 30;
}
.emw-modalCard{
  width:min(520px, 100%);
  background:#fff;
  border-radius:16px;
  box-shadow:0 20px 60px rgba(0,0,0,.35);
  overflow:hidden;
}
.emw-modalHead{
  display:flex;
  align-items:center;
  justify-content:space-between;
  padding:12px 14px;
  border-bottom:1px solid rgba(0,0,0,.08);
}
.emw-modalTitle{ font-weight:900; font-size:16px; }
.emw-modalClose{
  width:40px; height:40px;
  border-radius:999px;
  border:0;
  background:rgba(0,0,0,.06);
  cursor:pointer;
  font-size:22px;
  line-height:40px;
}
.emw-modalBody{ max-height: 60vh; overflow:auto; padding: 10px 14px; }
.emw-modalRow{ display:flex; align-items:center; gap:10px; padding:10px 0; border-bottom:1px solid rgba(0,0,0,.06); }
.emw-modalRow:last-child{ border-bottom:0; }
.emw-modalEmoji{ font-size:24px; width:32px; text-align:center; }
.emw-modalName{ font-weight:800; }
.emw-empty{ padding:18px 0; color:#555; }

.emw-lb-body{
  position:relative;
  padding:0 44px;
  display:flex;
  align-items:center;
  justify-content:center;
}
.emw-lb-frameWrap{
  width:100%;
  display:flex;
  align-items:center;
  justify-content:center;
  padding:10px 0 14px;
  touch-action:pan-y;
  cursor: grab;
}
.emw-lb-frameWrap:active{ cursor: grabbing; }
.emw-lb-frame img,
.emw-lb-frame video{
  max-width:100%;
  max-height:68vh;
  border-radius:14px;
  background:#000;
}
.emw-lb-nav{
  position:absolute;
  top:50%;
  transform:translateY(-50%);
  width:56px; height:56px;
  border:0;
  background: rgba(0,0,0,.35);
  border-radius: 999px;
  color:#fff;
  font-size:0;
  line-height:0;
  display:flex;
  align-items:center;
  justify-content:center;
  cursor:pointer;
  box-shadow: 0 10px 22px rgba(0,0,0,.22);
  backdrop-filter: blur(6px);
  -webkit-backdrop-filter: blur(6px);
  -webkit-tap-highlight-color: transparent;
}
.emw-lb-nav svg{ width:22px; height:22px; display:block; }
.emw-lb-nav:hover{ background: rgba(0,0,0,.45); }
.emw-lb-prev{ left:10px; }
.emw-lb-next{ right:10px; }

@media (max-width: 640px){
  .emw-lightbox{ padding:0; }
  .emw-lb-body{ padding:0; }
  .emw-lb-nav{ width:56px; height:56px; }
  .emw-lb{ width:100vw; height:100vh; max-height:100vh; border-radius:0; }
  .emw-lb-top{ padding: calc(12px + env(safe-area-inset-top)) calc(12px + env(safe-area-inset-right)) 8px calc(12px + env(safe-area-inset-left)); }
  .emw-lb-frame img,
  .emw-lb-frame video{ max-height:50vh; }
  .emw-lb-comments{ flex:1 1 auto; min-height:30vh; }
  .emw-reactPicker:not(.emw-reactPicker--portal){ left: 50%; transform: translateX(-50%); }
}

.emw-likeMini.is-liked{
  opacity:.75;
}

.emw-likeMini.is-liked .emw-heart{ filter:saturate(1.2); }

.emw-lb-comments{
  border-top:1px solid rgba(0,0,0,.08);
  padding:14px 16px 16px;
  overflow:auto;
  flex: 1 1 auto;
  scrollbar-width: none;
  -ms-overflow-style: none;
}
.emw-lb-comments::-webkit-scrollbar{ width:0; height:0; }
.emw-lb-msg{ margin-bottom:10px; font-size:14px; opacity:.9; }
.emw-cmts{ display:flex; flex-direction:column; gap:10px; margin-bottom:12px; }
.emw-cmt{
  background:#f7f5f2;
  border-radius:14px;
  padding:10px 12px;
}
.emw-cmtHead{
  display:flex;
  justify-content:space-between;
  gap:10px;
  font-size:13px;
  opacity:.85;
  margin-bottom:6px;
}
.emw-cmtBody{ font-size:14px; }

.emw-cmtForm input,
.emw-cmtForm textarea{
  width:100%;
  border:1px solid rgba(0,0,0,.14);
  border-radius:12px;
  padding:10px 12px;
  font:inherit;
}
.emw-cmtForm textarea{ min-height:76px; resize:vertical; margin-top:8px; }
.emw-cmtForm button{
  margin-top:10px;
  padding:10px 14px;
  border-radius:12px;
  border:0;
  cursor:pointer;
  background:#6d5338;
  color:#fff;
  font-weight:700;
}


/* Layout: avoid header overlap */
.emw-wrap[data-emw="upload"],
.emw-wrap[data-emw="wall"]{
  padding-top: 100px;
}
@media (max-width: 480px){
  .emw-wrap[data-emw="upload"],
  .emw-wrap[data-emw="wall"]{
    padding-top: 100px;
  }
}

/* Lightbox UX fixes */
.emw-lightbox-close{font-size:32px;width:48px;height:48px;}
.emw-lightbox-counter{margin-right:64px;}

.emw-lightbox-thumbs{display:flex;overflow-x:auto;gap:8px;padding:8px}
.emw-lightbox-thumbs img{width:64px;height:64px;object-fit:cover;cursor:pointer}


/* Mobile lightbox improvements (comments UX, safe-area) */
@media (max-width: 640px){
  .emw-lb{
    width: 100%;
    height: 100dvh;
    max-height: 100dvh;
    border-radius: 0;
  }
  .emw-lb-top{ position: sticky; top:0; z-index:2; background:rgba(255,255,255,.92); backdrop-filter: blur(8px); }
  .emw-lb-comments{
    padding-bottom: calc(16px + env(safe-area-inset-bottom));
  }
  .emw-cmtForm{
    position: sticky;
    bottom: 0;
    background: rgba(255,255,255,.94);
    backdrop-filter: blur(8px);
    padding-top: 10px;
    padding-bottom: calc(12px + env(safe-area-inset-bottom));
    border-top: 1px solid rgba(0,0,0,.08);
  }
  .emw-cmtForm button{
    width: 100%;
  }
}


/* 2026 Dodawanie zdjęć states */
.emw-card.emw-closed{border:1px solid rgba(0,0,0,.08); background:linear-gradient(180deg,#fff,#f7f9ff);}
.emw-card.emw-wait{border:1px solid rgba(0,0,0,.08); background:linear-gradient(180deg,#fff,#f9fafb);}
.emw-h2{font-size:20px; margin:0 0 8px; line-height:1.2;}
.emw-muted{color:var(--muted); margin:0 0 12px;}
.emw-btn{display:inline-flex; align-items:center; justify-content:center; gap:8px; padding:10px 14px; border-radius:12px; border:1px solid rgba(0,0,0,.12); background:#fff; color:var(--text); text-decoration:none; font-weight:600;}
.emw-btn-primary{background:var(--accent); border-color:var(--accent); color:#fff;}
.emw-leaderboard{margin:14px 0 0; padding:12px; border-radius:14px; border:1px solid rgba(0,0,0,.08); background:#fff;}
.emw-leaderboard h3{margin:0 0 8px; font-size:14px; color:var(--muted); letter-spacing:.02em; text-transform:uppercase;}
.emw-leaderboard ol{margin:0; padding-left:18px;}
.emw-leaderboard li{margin:6px 0; font-size:14px;}
.emw-pill{display:inline-flex; align-items:center; gap:6px; padding:6px 10px; border-radius:999px; background:rgba(0,0,0,.06); font-weight:700; font-size:12px;}

/* Security honeypot: keep it in DOM for bots, invisible and unreachable for humans. */
.emw-hp{
  position:absolute !important;
  left:-10000px !important;
  top:auto !important;
  width:1px !important;
  height:1px !important;
  overflow:hidden !important;
  opacity:0 !important;
  pointer-events:none !important;
}

/* v6.0.5 performance/progress/mobile UX */
.emw-wallProgress{ margin: 4px 0 14px; }
.emw-progText{ font-variant-numeric: tabular-nums; }
.emw-thumbItem{ background: linear-gradient(110deg, rgba(255,255,255,.35), rgba(122,90,54,.08), rgba(255,255,255,.35)); }
.emw-tile img.emw-thumbItem{ min-height: 140px; object-fit: cover; }
.emw-lb-frame img{ max-width:100%; max-height:78vh; object-fit:contain; }
.emw-hp{ position:absolute !important; left:-10000px !important; top:auto !important; width:1px !important; height:1px !important; overflow:hidden !important; opacity:0 !important; }
@media (max-width: 680px){
  .emw-wrap{ padding: 16px 10px 28px; }
  .emw-hero{ margin-bottom: 12px; }
  .emw-title{ font-size: clamp(30px, 10vw, 44px); line-height:1.04; }
  .emw-sub{ font-size: 15px; }
  .emw-card{ border-radius: 20px; }
  .emw-actions{ display:grid; grid-template-columns:1fr; gap:10px; }
  .emw-btn{ width:100%; min-height:48px; justify-content:center; }
  .emw-grid{ grid-template-columns: repeat(2, minmax(0,1fr)); }
  .emw-preview img, .emw-preview video{ height: 118px; }
  .emw-masonry{ column-count:1; column-gap:0; }
  .emw-tile{ margin-bottom:12px; border-radius:18px; }
  .emw-tileMeta{ padding: 12px; }
  .emw-likeMini{ min-height: 44px; padding:10px 12px; }
  .emw-lb{ width:100%; height:100%; max-height:100vh; border-radius:0; }
  .emw-lb-body{ min-height: 42vh; }
  .emw-lb-comments{ max-height: 38vh; overflow:auto; -webkit-overflow-scrolling:touch; }
  .emw-cmtForm{ position:sticky; bottom:0; background:#fff; padding-top:8px; }
}
@media (min-width: 681px) and (max-width: 1100px){
  .emw-masonry{ column-count:2; }
}


/* 7.1.8: mobile portrait lightbox - comments stay below media, never on top of photo/video */
@media (max-width: 640px){
  .emw-lightbox{
    align-items: stretch;
    justify-content: flex-start;
    overflow: hidden;
    background: #ffffff;
  }
  .emw-lb{
    width: 100vw;
    height: 100dvh;
    max-height: 100dvh;
    border-radius: 0;
    overflow-y: auto;
    overflow-x: hidden;
    display: block;
    -webkit-overflow-scrolling: touch;
  }
  .emw-lb-top{
    position: sticky;
    top: 0;
    z-index: 20;
    background: rgba(255,255,255,.96);
    border-bottom: 1px solid rgba(0,0,0,.06);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
  }
  .emw-lb-actions{ gap: 8px; }
  .emw-lb-name{
    font-size: clamp(18px, 5vw, 24px);
    line-height: 1.1;
    word-break: break-word;
  }
  .emw-lb-body{
    position: relative;
    display: block;
    padding: 0;
    overflow: visible;
    background: #111;
  }
  .emw-lb-frameWrap{
    display: flex;
    align-items: center;
    justify-content: center;
    width: 100%;
    min-height: 0;
    padding: 0;
    touch-action: pan-y;
  }
  .emw-lb-frame{
    width: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
  }
  .emw-lb-frame img,
  .emw-lb-frame video{
    display: block;
    width: auto;
    max-width: 100vw;
    height: auto;
    max-height: 46dvh;
    object-fit: contain;
    border-radius: 0;
    margin: 0 auto;
  }
  .emw-lb-nav{
    top: 50%;
    width: 52px;
    height: 52px;
    z-index: 12;
  }
  .emw-lb-prev{ left: 12px; }
  .emw-lb-next{ right: 12px; }
  .emw-lb-comments{
    position: relative;
    z-index: 5;
    display: block;
    flex: none;
    min-height: 0;
    max-height: none !important;
    overflow: visible;
    padding: 14px 16px calc(18px + env(safe-area-inset-bottom));
    background: #ffffff;
    border-top: 1px solid rgba(0,0,0,.08);
  }
  .emw-lb-msg{
    margin: 0 0 12px;
    padding: 12px 14px;
    border: 1px solid rgba(0,0,0,.12);
    border-radius: 16px;
    background: #fff;
  }
  .emw-cmtForm{
    position: relative !important;
    bottom: auto !important;
    background: #ffffff;
    padding-top: 8px;
    padding-bottom: 0;
    border-top: 0;
  }
  .emw-cmtForm textarea{ min-height: 92px; }
  .emw-cmtForm button{ min-height: 54px; }
}
@media (max-width: 390px){
  .emw-lb-frame img,
  .emw-lb-frame video{ max-height: 42dvh; }
  .emw-lb-open,
  .emw-lb-likers{ width: 38px; height: 38px; }
  .emw-lb-close{ width: 42px; height: 42px; }
}


/* 7.2.0: glossy wall UX, simple Instagram-like hearts, full-height preview when comments are disabled */
:root{
  --is-pink:#f529a9;
  --is-violet:#7c3aed;
  --is-blue:#129af2;
  --is-ink:#101828;
  --is-muted:#667085;
  --is-line:rgba(16,24,40,.10);
}
.emw-badge{background:linear-gradient(135deg,var(--is-pink),var(--is-violet));color:#fff;border:0;box-shadow:0 14px 36px rgba(124,58,237,.24);text-decoration:none;font-weight:950}
.emw-badge:hover{transform:translateY(-1px);filter:saturate(1.08)}
.emw-primary{background:linear-gradient(135deg,var(--is-pink),var(--is-violet),var(--is-blue));border:0;color:#fff;box-shadow:0 14px 32px rgba(124,58,237,.22)}
.emw-card{background:rgba(255,255,255,.78);border-color:rgba(16,24,40,.08);box-shadow:0 20px 60px rgba(16,24,40,.10);}
.emw-tile{border:1px solid rgba(16,24,40,.08);background:rgba(255,255,255,.82);box-shadow:0 14px 40px rgba(16,24,40,.10);transition:transform .18s ease, box-shadow .18s ease, border-color .18s ease;}
.emw-tile:hover{transform:translateY(-2px);box-shadow:0 22px 62px rgba(16,24,40,.16);border-color:rgba(124,58,237,.18)}
.emw-tileMedia{border-radius:20px 20px 0 0;background:#f8fafc;}
.emw-tileMeta{background:linear-gradient(180deg,rgba(255,255,255,.92),rgba(255,255,255,.78));border-radius:0 0 20px 20px;}
.emw-miniRow:last-child{justify-content:flex-start;}
.emw-likeMini{min-width:58px;min-height:38px;padding:8px 12px;border-radius:999px;border:1px solid rgba(245,41,169,.14);background:rgba(255,255,255,.88);color:#101828;box-shadow:0 8px 20px rgba(16,24,40,.08);transition:transform .14s ease, background .14s ease, box-shadow .14s ease;}
.emw-likeMini:hover{transform:translateY(-1px);background:#fff;box-shadow:0 12px 26px rgba(245,41,169,.14)}
.emw-likeMini.is-liked{opacity:1;background:linear-gradient(135deg,rgba(245,41,169,.12),rgba(124,58,237,.10));border-color:rgba(245,41,169,.32);box-shadow:0 12px 28px rgba(245,41,169,.14)}
.emw-likeMini .emw-react{font-size:21px;filter:drop-shadow(0 5px 10px rgba(245,41,169,.22));}
.emw-likeMini .emw-likeNum{font-weight:950;color:#db2777;}
.emw-lb-actions{gap:8px;align-items:center;}
.emw-lb-open,.emw-lb-close{border-radius:999px;background:rgba(255,255,255,.92);border:1px solid rgba(16,24,40,.08);box-shadow:0 12px 28px rgba(16,24,40,.14);color:#101828;}
.emw-lb-open:hover,.emw-lb-close:hover{background:#fff;transform:translateY(-1px)}
.emw-lb-open svg{width:20px;height:20px;}
.emw-lb-likers,.emw-modal{display:none!important;}
.emw-lb-no-comments .emw-lb{width:min(1180px,100%);height:min(94vh,980px);max-height:94vh;}
.emw-lb-no-comments .emw-lb-body{flex:1 1 auto;min-height:0;padding:0 54px 18px;}
.emw-lb-no-comments .emw-lb-frameWrap{height:100%;padding:0;}
.emw-lb-no-comments .emw-lb-frame{height:100%;width:100%;display:flex;align-items:center;justify-content:center;}
.emw-lb-no-comments .emw-lb-frame img,
.emw-lb-no-comments .emw-lb-frame video{max-height:calc(94vh - 116px);max-width:100%;object-fit:contain;}
.emw-lb-no-comments .emw-lb-comments{flex:0 0 auto;max-height:120px;overflow:auto;background:#fff;}
.emw-siteFooter{max-width:1100px;margin:32px auto 0;padding:22px 16px 34px;border-top:1px solid rgba(16,24,40,.08);display:grid;grid-template-columns:1fr auto 1fr;align-items:center;gap:18px;color:#667085;font-family:ui-sans-serif,system-ui,-apple-system,Segoe UI,Roboto,Arial,sans-serif;}
.emw-siteFooter a{text-decoration:none;color:#101828;font-weight:900}.emw-siteFooter__brand{display:flex;align-items:center;gap:10px}.emw-siteFooter__brand img{width:42px;height:42px;border-radius:12px;object-fit:cover;box-shadow:0 12px 28px rgba(124,58,237,.16)}.emw-siteFooter__brand strong{display:block;background:linear-gradient(135deg,var(--is-pink),var(--is-violet),var(--is-blue));-webkit-background-clip:text;background-clip:text;color:transparent;font-size:17px}.emw-siteFooter__brand span{display:block;font-size:13px}.emw-siteFooter__social{display:flex;justify-content:center;gap:16px;flex-wrap:wrap}.emw-siteFooter__creator{justify-self:end;display:flex;align-items:center;gap:10px}.emw-siteFooter__creator span{font-size:12px;text-transform:uppercase;letter-spacing:.08em;color:#667085}.emw-siteFooter__creator img{height:40px;width:auto;max-width:180px;object-fit:contain}
@media(max-width:640px){
  .emw-wrap[data-emw="wall"]{padding-top:76px;}
  .emw-tile:hover{transform:none;}
  .emw-tile{border-radius:22px;margin-bottom:14px;}
  .emw-likeMini{min-height:42px;min-width:64px;padding:9px 13px;}
  .emw-lb-no-comments .emw-lb{height:100dvh;max-height:100dvh;}
  .emw-lb-no-comments .emw-lb-body{min-height:0;height:calc(100dvh - 76px);padding:0;background:#050505;display:flex;align-items:center;justify-content:center;}
  .emw-lb-no-comments .emw-lb-frameWrap{height:100%;}
  .emw-lb-no-comments .emw-lb-frame img,
  .emw-lb-no-comments .emw-lb-frame video{max-height:calc(100dvh - 94px)!important;max-width:100vw;object-fit:contain;border-radius:0;}
  .emw-lb-no-comments .emw-lb-comments{display:none;}
  .emw-siteFooter{grid-template-columns:1fr;justify-items:center;text-align:center;margin-top:24px;padding:24px 14px calc(30px + env(safe-area-inset-bottom));}
  .emw-siteFooter__creator{justify-self:center;display:grid;justify-items:center;}
  .emw-siteFooter__social{gap:12px;}
}


/* 7.2.1: white/gray visual system aligned with neon ImprezoweSnapy logo; clearer download icon */
:root{
  --bg:#f5f7fb;
  --card:#ffffff;
  --text:#101828;
  --muted:#667085;
  --accent:#7c3aed;
  --accent2:#eef4ff;
  --is-soft:#f6f8fc;
  --is-line:rgba(16,24,40,.10);
  --is-shadow:0 22px 70px rgba(16,24,40,.10);
}
.emw-bg{
  background:
    radial-gradient(900px 520px at 10% 6%, rgba(245,41,169,.13), transparent 58%),
    radial-gradient(860px 500px at 90% 10%, rgba(18,154,242,.12), transparent 60%),
    radial-gradient(760px 460px at 50% 100%, rgba(124,58,237,.08), transparent 62%),
    linear-gradient(180deg,#ffffff 0%,#f7f9fc 46%,#eef2f7 100%) !important;
}
.emw-card,
.emw-preview,
.emw-tile,
.emw-leaderboard,
.emw-card.emw-closed,
.emw-card.emw-wait{
  background:rgba(255,255,255,.86) !important;
  border-color:rgba(16,24,40,.09) !important;
  box-shadow:0 22px 70px rgba(16,24,40,.10) !important;
}
.emw-sep{background:rgba(16,24,40,.08) !important;}
.emw-btn,
.emw-input,
.emw-textarea{
  border-color:rgba(16,24,40,.13) !important;
  background:rgba(255,255,255,.92) !important;
}
.emw-btn:hover{box-shadow:0 12px 28px rgba(16,24,40,.12) !important;}
.emw-primary,
.emw-barFill{
  background:linear-gradient(135deg,var(--is-pink),var(--is-violet),var(--is-blue)) !important;
  color:#fff !important;
  border-color:transparent !important;
}
.emw-bar{background:rgba(16,24,40,.08) !important;}
.emw-badge{border:0 !important;}
.emw-name{color:#101828 !important;}
.emw-msg{color:#344054 !important;}
.emw-thumbItem{background:linear-gradient(110deg,rgba(255,255,255,.35),rgba(124,58,237,.08),rgba(255,255,255,.35)) !important;}
.emw-lb-comments{background:#ffffff !important;}
.emw-cmtForm button{background:linear-gradient(135deg,var(--is-pink),var(--is-violet),var(--is-blue)) !important;color:#fff !important;}
.emw-lb-open.emw-lb-download svg{width:40px !important;height:40px !important;stroke-width:1.75;}
.emw-lb-open.emw-lb-download{color:#101828;}
@media(max-width:640px){
  .emw-lb-open.emw-lb-download svg{width:36px !important;height:36px !important;}
}

/* 7.2.2: event window + weak-network UX */
.emw-uploadGate .emw-card{border:1px solid rgba(124,58,237,.14);background:linear-gradient(180deg,#fff,#f8faff);box-shadow:0 24px 80px rgba(16,24,40,.08)}
.emw-disabled{opacity:.72;cursor:not-allowed;background:#eef2f7!important;color:#667085!important;border-color:#e4e7ec!important;box-shadow:none!important;text-decoration:none!important}
.emw-progress .emw-progText{color:#475467;font-weight:700;letter-spacing:-.01em}
@media (max-width: 520px){.emw-uploadGate .emw-card{margin:10px 0;padding:18px!important}.emw-uploadGate .emw-btn{width:100%;justify-content:center;margin-top:8px}}

/* 7.2.3: cache-safe gate screens and clean mobile information pages */
.emw-wrap,.emw-pro-main{box-sizing:border-box;overflow-x:hidden}
.emw-uploadGate{min-height:auto!important;padding:clamp(22px,6vw,56px) 16px 28px!important;display:block!important}
.emw-uploadGate .emw-card{max-width:760px;margin:0 auto!important;padding:clamp(22px,5vw,38px)!important;border-radius:28px!important;overflow:hidden!important;text-align:left}
.emw-uploadGate h2{font-size:clamp(34px,8vw,58px)!important;line-height:1.02!important;letter-spacing:-.06em;margin:0 0 16px!important;color:#101828!important}
.emw-uploadGate p{font-size:clamp(17px,4vw,22px)!important;line-height:1.45!important;color:#475467!important;margin:0 0 18px!important;max-width:680px}
.emw-uploadGate__actions{display:flex!important;gap:12px!important;flex-wrap:wrap!important;margin-top:18px!important}.emw-uploadGate__actions .emw-btn{margin:0!important;text-decoration:none!important}
.emw-siteFooter{background:#fff!important;border:1px solid rgba(16,24,40,.08)!important;border-radius:28px!important;box-shadow:0 20px 65px rgba(16,24,40,.08)!important;margin:28px auto!important;max-width:1100px!important}.emw-siteFooter__creator img{height:34px!important;max-width:150px!important}.emw-siteFooter__brand img{width:44px!important;height:44px!important}.emw-siteFooter__social a{padding:8px 12px;border-radius:999px;background:#f8fafc;border:1px solid rgba(16,24,40,.09)}
@media(max-width:640px){.emw-uploadGate{padding:20px 12px!important}.emw-uploadGate .emw-card{padding:24px 18px!important;border-radius:24px!important}.emw-uploadGate__actions{display:grid!important;grid-template-columns:1fr!important}.emw-uploadGate__actions .emw-btn{width:100%!important}.emw-siteFooter{margin:20px 12px!important;max-width:calc(100vw - 24px)!important;padding:22px 14px!important;border-radius:24px!important}.emw-siteFooter__social{gap:8px!important}.emw-siteFooter__social a{font-size:13px;padding:8px 10px}.emw-siteFooter__creator img{height:30px!important;max-width:130px!important}}


/* RAW files: accepted and downloadable, but most browsers cannot preview them. */
.emw-rawCard{display:flex;min-height:160px;flex-direction:column;align-items:flex-start;justify-content:center;gap:8px;padding:22px;color:#f8fafc;text-decoration:none;background:radial-gradient(circle at 20% 20%,rgba(255,62,166,.30),transparent 34%),linear-gradient(135deg,#111827,#1f2937 55%,#0f172a);border:1px solid rgba(255,255,255,.18);}
.emw-rawCard span,.emw-rawBadge{display:inline-flex;align-items:center;justify-content:center;border-radius:999px;padding:5px 10px;background:rgba(255,255,255,.12);border:1px solid rgba(255,255,255,.18);font-weight:900;letter-spacing:.08em;font-size:12px;color:#93c5fd;}
.emw-rawCard strong{font-size:16px;line-height:1.2;word-break:break-word;color:#fff;}
.emw-rawCard small{color:#cbd5e1;font-weight:700;}
.emw-rawLightbox{max-width:560px;margin:auto;padding:32px;border-radius:24px;background:linear-gradient(135deg,#111827,#1f2937);color:#fff;border:1px solid rgba(255,255,255,.18);text-align:left;box-shadow:0 30px 80px rgba(0,0,0,.45)}
.emw-rawLightbox h3{margin:14px 0 8px;color:#fff;font-size:24px;line-height:1.15;word-break:break-word}.emw-rawLightbox p{color:#cbd5e1;font-size:15px;line-height:1.55}.emw-rawLightbox .emw-btn{display:inline-flex;margin-top:12px}

.emw-fileSummary{margin:12px 0 0;padding:12px 14px;border-radius:16px;background:rgba(37,99,235,.08);border:1px solid rgba(37,99,235,.18);color:#334155;font-weight:800;line-height:1.45}
