:root {
  --ink: #17211d;
  --muted: #69746f;
  --green: #1ecb7b;
  --green-dark: #0d9f5c;
  --green-soft: #eafaf2;
  --line: #dfe7e2;
  --paper: #fff;
  --background: #f8fbf9;
  --danger: #d94d5c;
  --shadow: 0 18px 55px rgba(34, 75, 55, .09);
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body { margin: 0; color: var(--ink); background: var(--background); font-family: "DM Sans", sans-serif; min-height: 100vh; overflow-x: hidden; }
button, input { font: inherit; }
button { cursor: pointer; }
.ambient { position: fixed; z-index: -1; width: 440px; height: 440px; border-radius: 50%; filter: blur(10px); opacity: .45; }
.ambient-one { top: 70px; left: -250px; background: radial-gradient(circle, #c9f7de, transparent 70%); }
.ambient-two { right: -220px; top: 420px; background: radial-gradient(circle, #d5f8e6, transparent 70%); }

.site-header { height: 76px; padding: 0 max(24px, calc((100vw - 1120px) / 2)); background: rgba(255,255,255,.82); border-bottom: 1px solid #e8eeea; backdrop-filter: blur(12px); display: flex; align-items: center; justify-content: space-between; position: relative; z-index: 5; }
.brand { color: var(--ink); text-decoration: none; font-family: Manrope, sans-serif; font-weight: 800; font-size: 18px; display: flex; align-items: center; gap: 10px; }
.brand-mark { width: 36px; height: 36px; border-radius: 11px; background: var(--green); display: grid; place-items: center; box-shadow: 0 7px 18px rgba(30,203,123,.25); }
.brand-mark svg { width: 23px; fill: none; stroke: white; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }
.local-badge { padding: 8px 13px; border: 1px solid #cfeadd; border-radius: 99px; color: #277555; background: #f2fcf7; font-size: 12px; font-weight: 600; display: flex; align-items: center; gap: 7px; }
.pulse-dot { width: 7px; height: 7px; border-radius: 50%; background: var(--green); box-shadow: 0 0 0 4px rgba(30,203,123,.12); }

main { width: min(920px, calc(100% - 32px)); margin: 0 auto; }
.hero { text-align: center; padding: 70px 0 42px; }
.eyebrow { display: inline-block; color: var(--green-dark); font-weight: 700; font-size: 11px; letter-spacing: .18em; margin-bottom: 18px; }
.hero h1 { font-family: Manrope, sans-serif; font-size: clamp(36px, 5.3vw, 58px); line-height: 1.08; letter-spacing: -.045em; margin: 0; }
.hero h1 span { color: var(--green-dark); }
.hero p { color: var(--muted); margin: 20px 0 0; line-height: 1.65; font-size: 16px; }

.workspace { padding: 28px; border: 1px solid #e0e9e3; border-radius: 22px; background: rgba(255,255,255,.92); box-shadow: var(--shadow); }
.field-group label { display: block; font-size: 13px; font-weight: 700; margin: 0 0 9px; }
.field-group input { width: 100%; border: 1px solid #dce5df; border-radius: 11px; padding: 13px 15px; outline: none; transition: .2s; color: var(--ink); background: #fff; }
.field-group input:focus { border-color: var(--green); box-shadow: 0 0 0 4px rgba(30,203,123,.1); }
.field-group input::placeholder { color: #a8b1ac; }
.drop-zone { margin-top: 20px; padding: 43px 20px; border: 1.5px dashed #b8d6c6; border-radius: 15px; text-align: center; background: #fbfefc; transition: .2s; outline: none; }
.drop-zone:hover, .drop-zone:focus-visible, .drop-zone.dragging { border-color: var(--green); background: var(--green-soft); transform: translateY(-1px); }
.upload-icon { margin: 0 auto 14px; width: 48px; height: 48px; display: grid; place-items: center; border-radius: 14px; color: var(--green-dark); background: var(--green-soft); }
.upload-icon svg { width: 25px; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }
.drop-zone h2 { margin: 0 0 7px; font-size: 16px; }
.drop-zone p { margin: 0 0 10px; color: var(--muted); font-size: 14px; }
.drop-zone p span { color: var(--green-dark); font-weight: 700; }
.drop-zone small { color: #9aa49f; font-size: 11px; }

.sticker-section { margin-top: 30px; }
.section-heading { display: flex; justify-content: space-between; gap: 20px; align-items: flex-end; padding-top: 25px; border-top: 1px solid #edf1ee; }
.section-heading h2 { font-family: Manrope, sans-serif; font-size: 18px; margin: 0 0 4px; }
.section-heading h2 span { font-family: "DM Sans"; margin-left: 7px; color: var(--green-dark); background: var(--green-soft); padding: 4px 8px; border-radius: 20px; font-size: 11px; vertical-align: 2px; }
.section-heading p { margin: 0; color: var(--muted); font-size: 12px; }
.top-actions { display: flex; gap: 8px; }
.button { border: 0; border-radius: 9px; padding: 10px 14px; font-size: 12px; font-weight: 700; transition: transform .15s, box-shadow .15s, background .15s; }
.button:hover { transform: translateY(-1px); }
.button:disabled { cursor: wait; opacity: .65; transform: none; }
.button-secondary { border: 1px solid #dce5df; background: white; color: var(--ink); }
.button-danger { color: var(--danger); background: #fff1f2; }
.button-primary { color: #fff; background: linear-gradient(135deg, #23d282, #14b86c); box-shadow: 0 9px 18px rgba(21,184,108,.22); }

.sticker-grid { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 14px; margin-top: 20px; }
.sticker-card { position: relative; border: 1px solid #e2e9e5; border-radius: 13px; background: #fff; padding: 9px; cursor: grab; transition: .2s; }
.sticker-card:hover { border-color: #bddcca; box-shadow: 0 8px 22px rgba(37,86,61,.09); transform: translateY(-2px); }
.sticker-card.dragging { opacity: .4; transform: scale(.96); }
.sticker-card.drag-over { border-color: var(--green); box-shadow: 0 0 0 3px rgba(30,203,123,.12); }
.sticker-preview { position: relative; aspect-ratio: 1; display: grid; place-items: center; overflow: hidden; border-radius: 9px; background-color: #eef2ef; background-image: linear-gradient(45deg,#e1e7e3 25%,transparent 25%),linear-gradient(-45deg,#e1e7e3 25%,transparent 25%),linear-gradient(45deg,transparent 75%,#e1e7e3 75%),linear-gradient(-45deg,transparent 75%,#e1e7e3 75%); background-size: 16px 16px; background-position: 0 0,0 8px,8px -8px,-8px 0; }
.sticker-preview img { width: 100%; height: 100%; object-fit: contain; }
.sticker-number { position: absolute; top: 15px; left: 15px; min-width: 25px; height: 25px; display: grid; place-items: center; padding: 0 6px; border-radius: 7px; color: white; background: rgba(20,31,26,.75); font-weight: 700; font-size: 10px; backdrop-filter: blur(5px); }
.remove-button { position: absolute; top: 15px; right: 15px; width: 27px; height: 27px; border: 0; border-radius: 8px; color: #fff; background: rgba(20,31,26,.72); font-size: 17px; line-height: 1; opacity: 0; transition: .15s; }
.sticker-card:hover .remove-button, .remove-button:focus { opacity: 1; }
.card-footer { display: flex; justify-content: space-between; align-items: center; padding: 9px 2px 0; min-width: 0; }
.file-name { font-size: 10px; color: var(--muted); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.card-actions { display: flex; gap: 3px; flex-shrink: 0; }
.icon-button { width: 25px; height: 25px; border: 0; border-radius: 6px; background: #f0f5f2; color: #4e6258; font-size: 11px; display: grid; place-items: center; padding: 0; }
.icon-button:hover { color: var(--green-dark); background: var(--green-soft); }
.processing { animation: pulse 1.2s infinite; }
@keyframes pulse { 50% { opacity: .45; } }

.download-bar { margin-top: 24px; border-radius: 13px; padding: 16px 18px; display: flex; justify-content: space-between; align-items: center; gap: 20px; color: white; background: #172a21; }
.download-copy { display: flex; gap: 12px; align-items: center; }
.download-copy .download-icon { width: 35px; height: 35px; border-radius: 9px; display: grid; place-items: center; background: rgba(255,255,255,.1); }
.download-copy strong, .download-copy small { display: block; }
.download-copy strong { font-size: 13px; }
.download-copy small { color: #aebdb5; font-size: 10px; margin-top: 2px; }

.empty-state { text-align: center; padding: 65px 20px 42px; color: var(--muted); }
.empty-stack { width: 60px; height: 57px; margin: auto; position: relative; }
.empty-stack span { position: absolute; inset: 4px 8px; border: 1px solid #cfd9d3; border-radius: 9px; background: #f8fbf9; transform: rotate(-8deg); }
.empty-stack span:nth-child(2) { transform: rotate(7deg); }
.empty-stack span:nth-child(3) { transform: none; display: grid; place-items: center; color: var(--green); background: white; font-size: 22px; }
.empty-state h2 { color: #65716a; font-size: 14px; margin: 13px 0 5px; }
.empty-state p { font-size: 12px; margin: 0; }
.privacy-note { margin: 8px auto 65px; max-width: 650px; padding: 16px 19px; display: flex; gap: 13px; border: 1px solid #d3eee0; border-radius: 12px; color: #226c4a; background: #effbf5; }
.privacy-note > span { font-size: 23px; line-height: 1; }
.privacy-note strong { font-size: 12px; }
.privacy-note p { color: #668275; font-size: 10px; line-height: 1.5; margin: 3px 0 0; }
footer { border-top: 1px solid #e7ede9; text-align: center; padding: 25px; color: #98a29d; background: rgba(255,255,255,.7); font-size: 10px; }
footer span { color: var(--green); }
.toast-container { position: fixed; right: 20px; bottom: 20px; z-index: 20; display: grid; gap: 9px; }
.toast { max-width: 340px; padding: 12px 16px; border-radius: 10px; color: white; background: #183027; box-shadow: 0 12px 30px rgba(0,0,0,.18); font-size: 12px; animation: toast-in .25s ease-out; }
.toast.error { background: #a83845; }
@keyframes toast-in { from { opacity: 0; transform: translateY(10px); } }

@media (max-width: 720px) {
  .site-header { height: 66px; padding: 0 16px; }
  .local-badge { font-size: 0; padding: 9px; }
  .brand { font-size: 16px; }
  .hero { padding: 52px 5px 32px; }
  .hero h1 { font-size: clamp(31px, 10vw, 42px); }
  .hero p { font-size: 14px; }
  .desktop-only { display: none; }
  .workspace { padding: 18px; border-radius: 17px; }
  .drop-zone { padding: 35px 14px; }
  .section-heading { align-items: flex-start; flex-direction: column; }
  .top-actions { width: 100%; }
  .top-actions .button { flex: 1; }
  .sticker-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; }
  .remove-button { opacity: 1; }
  .download-bar { align-items: stretch; flex-direction: column; }
  .download-bar .button { width: 100%; padding: 13px; display: flex; justify-content: space-between; }
  .privacy-note { margin-bottom: 45px; }
}

@media (max-width: 380px) { .sticker-grid { grid-template-columns: 1fr; } }
@media (prefers-reduced-motion: reduce) { *, *::before, *::after { scroll-behavior: auto !important; animation: none !important; transition: none !important; } }
