@import url('https://fonts.googleapis.com/css2?family=Hind+Siliguri:wght@400;500;600;700&display=swap');

*{box-sizing:border-box;margin:0;padding:0}
html,body{min-height:100%}
body{
  background:#e9e4df;
  font-family:'Hind Siliguri','Kalpurush','SolaimanLipi',sans-serif;
  }

/* ===== পোস্টার (১:১ স্কয়ার, সব সাইজ cqw দিয়ে স্কেল হয়) ===== */
.poster{
  container-type:inline-size;
  position:relative;overflow:hidden;
  width:100%;
  aspect-ratio:1/1;
  background:linear-gradient(160deg,#f5eee8 0%,#fbf8f5 55%,#f3e7e1 100%);
  color:#111;
}

/* লাল ঢেউ */
.wave{position:absolute;left:0;right:0;pointer-events:none}
.wave.w1{
  bottom:0;height:42cqw;
  background:linear-gradient(180deg,rgba(230,40,40,.0) 0%,#e53030 38%,#c4161c 100%);
  clip-path:polygon(0 38%,30% 52%,62% 30%,100% 10%,100% 100%,0 100%);
  opacity:.95;
}
.wave.w2{
  bottom:0;height:30cqw;
  background:linear-gradient(180deg,#d82027 0%,#b30f16 100%);
  clip-path:polygon(0 55%,35% 70%,70% 38%,100% 28%,100% 100%,0 100%);
}
.wave.w3{
  bottom:22cqw;height:30cqw;
  background:linear-gradient(120deg,rgba(255,255,255,0) 20%,rgba(255,120,120,.35) 60%,rgba(255,255,255,0) 100%);
  clip-path:polygon(0 60%,100% 0,100% 40%,0 100%);
}

/* লোগো */
.logo-left,.logo-right{position:absolute;z-index:3}
.logo-left{left:6cqw;top:5cqw;height:8cqw}
.logo-right{right:5cqw;top:3.5cqw;height:14cqw}
.logo-left img,.logo-right img{height:100%;width:auto;display:block}

/* ===== মাঝখানে গোল ছবি ===== */
.photo-wrap{
  position:absolute;z-index:2;
  left:15cqw;top:20cqw;
  width:38cqw;height:38cqw;
  
}
.photo{
  position:absolute;inset:0;
  border-radius:50%;overflow:hidden;
  border:.9cqw solid #d8b25a;
  background:#ddd;
  box-shadow:0 1.2cqw 3cqw rgba(0,0,0,.18);
}
.photo{touch-action:none;cursor:grab}
.photo img{position:absolute;inset:0;width:100%;height:100%;object-fit:cover;object-position:center top;display:block;transform-origin:center;user-select:none;-webkit-user-drag:none}
.photo .empty{
  width:100%;height:100%;display:flex;flex-direction:column;align-items:center;justify-content:center;
  color:#888;font-size:2.8cqw;text-align:center;padding:4cqw;cursor:pointer;line-height:1.4;
}
.photo .empty .plus{font-size:9cqw;line-height:1;color:#c4161c;margin-bottom:1cqw}
/* সোনালি রিং */
.ring{position:absolute;border-radius:50%;border:.35cqw solid #d8b25a;pointer-events:none}
.ring.r1{inset:-3.2cqw}
.ring.r2{inset:-5.8cqw;border-color:rgba(216,178,90,.65);clip-path:polygon(0 0,100% 0,100% 62%,0 62%)}
.ring.r3{inset:-4.5cqw;border-color:rgba(216,178,90,.6);clip-path:polygon(0 38%,100% 38%,100% 100%,0 100%)}

/* ===== নাম / পদবি / মেসেজ ===== */
.info{
  position:absolute;z-index:4;
  right:6cqw;top:65cqw;
  width:52cqw;text-align:right;
}
.info .name{font-size:3.7cqw;font-weight:700;line-height:1.15;color:#111}
.info .designation{font-size:3.7cqw;font-weight:700;line-height:1.15;color:#111}
.info .msg{margin-top:1.6cqw;font-size:3.5cqw;font-weight:500;line-height:1.2;color:#fff}
.info .big{
  margin-top:1.6cqw;font-size:6.6cqw;font-weight:600;color:#fff;
  line-height:1.2;white-space:nowrap;
}

/* ===== বাম পাশে স্লোগান ===== */
.slogan{
  position:absolute;z-index:4;left:6cqw;bottom:4.5cqw;
  font-size:3.5cqw;font-weight:600;line-height:1.5;color:#fff;
}

/* পেছনের হালকা টেক্সট প্যাটার্ন */
.pattern{
  position:absolute;left:0;bottom:0;width:62cqw;height:20cqw;z-index:1;
  font-size:1.5cqw;line-height:1.6;color:rgba(255,255,255,.22);overflow:hidden;
  padding:0 2cqw;word-spacing:.8cqw;pointer-events:none;
}

/* ===== অ্যাডমিন প্যানেল ===== */
.admin-body{display:block;height:auto;background:#f3f4f6;padding:20px}
.card{max-width:720px;margin:0 auto 20px;background:#fff;border-radius:12px;padding:24px;box-shadow:0 2px 10px rgba(0,0,0,.08)}
.card h1{font-size:22px;margin-bottom:16px;color:#c4161c}
.card label{display:block;margin:14px 0 6px;font-weight:600;font-size:15px}
.card input[type=text],.card input[type=password],.card textarea{
  width:100%;padding:10px 12px;border:1px solid #ccc;border-radius:8px;font:inherit;
}
.card textarea{min-height:80px;resize:vertical}
.card input[type=file]{width:100%;padding:8px;border:1px dashed #aaa;border-radius:8px;background:#fafafa}
.card .hint{font-size:13px;color:#777;margin-top:4px}
.card .thumb{margin-top:8px;max-height:90px;border-radius:8px;border:1px solid #ddd}
.btn{display:inline-block;margin-top:20px;padding:12px 26px;background:#c4161c;color:#fff;border:0;border-radius:8px;font:inherit;font-weight:600;cursor:pointer;text-decoration:none}
.btn.gray{background:#555}
.alert{padding:10px 14px;border-radius:8px;margin-bottom:14px;font-size:15px}
.alert.ok{background:#e6f7ea;color:#146c2e}
.alert.err{background:#fdeaea;color:#a11}
.topbar{max-width:720px;margin:0 auto 14px;display:flex;gap:10px;justify-content:space-between;align-items:center}

/* ================= পাবলিক পেজ (ফর্ম + প্রিভিউ) ================= */
:root{--red:#c4161c;--red2:#e53030;--gold:#d8b25a;--ink:#1d1d22;--muted:#6b6b76;--line:#e6e1dc}
.app-body{background:linear-gradient(180deg,#f6f1ec 0,#ece6e0 100%);color:var(--ink);min-height:100vh;padding-bottom:40px}
.topbar-app{max-width:1240px;margin:0 auto;padding:20px 20px 6px}
.brand{font-size:22px;font-weight:700;color:var(--red);display:flex;align-items:center;gap:10px}
.brand .dot{width:12px;height:12px;border-radius:50%;background:linear-gradient(135deg,var(--gold),var(--red))}
.topbar-app .sub{color:var(--muted);font-size:14px;margin-top:2px}

.app{max-width:1240px;margin:0 auto;padding:12px 20px;display:grid;gap:24px;
  grid-template-columns:minmax(340px,430px) 1fr;grid-template-areas:"panel stage";align-items:start}
.panel{grid-area:panel;display:flex;flex-direction:column;gap:16px}
.stage{grid-area:stage;position:sticky;top:16px;display:flex;flex-direction:column;align-items:center;gap:12px}
.poster-shell{width:100%;max-width:min(760px,calc(100vh - 150px));border-radius:14px;overflow:hidden;box-shadow:0 14px 40px rgba(60,20,20,.22)}
.poster-shell .poster{display:block}

.card{background:#fff;border-radius:16px;padding:18px;box-shadow:0 2px 12px rgba(40,20,20,.07);border:1px solid #f0ebe6}
.card h2{font-size:17px;margin-bottom:14px;display:flex;align-items:center;gap:10px}
.num{width:26px;height:26px;border-radius:50%;background:var(--red);color:#fff;font-size:14px;display:inline-flex;align-items:center;justify-content:center}

.drop{display:flex;align-items:center;gap:14px;padding:14px;border:2px dashed #d9c9a8;border-radius:14px;background:#fffaf0;cursor:pointer;transition:.15s}
.drop:hover{border-color:var(--gold);background:#fff6e2}
.drop img{width:64px;height:64px;border-radius:50%;object-fit:cover;border:3px solid var(--gold)}
.drop img[hidden]{display:none}
.drop-text{display:flex;flex-direction:column;gap:2px}
.drop-text b{font-size:16px;color:var(--red)}
.drop-text small{color:var(--muted);font-size:13px}
.drop::before{content:"📷";font-size:28px}
.drop:has(img:not([hidden]))::before{display:none}

.ctrl{margin-top:16px;display:flex;flex-direction:column;gap:8px}
.ctrl[hidden]{display:none}
.row-label{font-size:13px;font-weight:600;color:#444;margin-top:6px;display:flex;justify-content:space-between}
.seg{display:flex;background:#f1ece7;border-radius:12px;padding:4px;gap:4px}
.seg button{flex:1;border:0;background:transparent;padding:9px 6px;border-radius:9px;font:600 14px 'Hind Siliguri',sans-serif;color:#555;cursor:pointer;transition:.15s}
.seg button.on{background:#fff;color:var(--red);box-shadow:0 1px 5px rgba(0,0,0,.12)}
.seg.three button:hover{background:#fff}
input[type=range]{width:100%;accent-color:var(--red);height:28px}

.fld{display:block;font-size:14px;font-weight:600;margin-bottom:14px;color:#333}
.fld:last-child{margin-bottom:0}
.fld em{font-style:normal;font-weight:400;color:var(--muted);font-size:12px}
.fld input,.fld textarea{display:block;width:100%;margin-top:6px;padding:11px 13px;border:1.5px solid #ddd6cf;border-radius:11px;font:500 16px 'Hind Siliguri',sans-serif;background:#fcfbfa;transition:.15s;resize:vertical}
.fld input:focus,.fld textarea:focus{outline:none;border-color:var(--red);background:#fff;box-shadow:0 0 0 3px rgba(196,22,28,.12)}

.actions{display:flex;flex-direction:column;gap:10px}
.dl{border:0;border-radius:13px;padding:14px 20px;font:700 17px 'Hind Siliguri',sans-serif;cursor:pointer}
.dl.primary{background:linear-gradient(135deg,var(--red2),var(--red));color:#fff;box-shadow:0 6px 16px rgba(196,22,28,.35)}
.dl:disabled{opacity:.6;cursor:wait}
.ghost{border:1.5px solid #ddd6cf;background:#fff;color:#444;border-radius:11px;padding:10px 14px;font:600 14px 'Hind Siliguri',sans-serif;cursor:pointer}
.ghost:hover{border-color:var(--red);color:var(--red)}
.stage-dl{width:100%;max-width:420px}
.drag-hint{font-size:13px;color:var(--muted);text-align:center}
.poster.exporting .photo{box-shadow:none}

/* ট্যাবলেট ও মোবাইল: উপরে পোস্টার, নিচে ফর্ম */
@media (max-width:960px){
  .app{grid-template-columns:1fr;grid-template-areas:"stage" "panel";padding:8px 14px;gap:18px}
  .stage{position:static}
  .poster-shell{max-width:640px}
  .panel{max-width:640px;width:100%;margin:0 auto}
}
@media (max-width:520px){
  .topbar-app{padding:14px 14px 0}
  .brand{font-size:19px}
  .card{padding:14px;border-radius:14px}
  .stage-dl{max-width:none}
  .poster-shell{border-radius:10px}
}

/* অ্যাডমিন .card স্টাইলের সাথে সংঘাত ঠিক + লেখায় নতুন লাইন */
.panel .card{margin:0;max-width:none;width:100%}
.panel .card .fld{display:block;margin:0 0 14px;font-size:14px}
.panel .card .fld:last-child{margin-bottom:0}
.panel .card .drop{display:flex;margin:0;font-size:inherit;font-weight:inherit}
.panel .card .fld input,.panel .card .fld textarea{margin-top:6px;border:1.5px solid #ddd6cf;border-radius:11px;padding:11px 13px;font:500 16px 'Hind Siliguri',sans-serif}
.panel .card .fld textarea{min-height:0}
.info .name,.info .designation,.info .msg,.slogan{white-space:pre-line}
