:root {
  --bg: #fff6f1;
  --surface: #ffffff;
  --text: #2a1b2d;
  --muted: #7b6a7d;
  --border: #f1e1e8;
  --accent: #ff4f8b;
  --shadow: 0 10px 30px rgba(80, 30, 60, .10);
  --radius: 18px;
}
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --bg: #1a1320;
    --surface: #251b2d;
    --text: #f6eef8;
    --muted: #b7a6bb;
    --border: #3a2c44;
    --shadow: 0 10px 30px rgba(0, 0, 0, .4);
  }
}
:root[data-theme="dark"] {
  --bg: #1a1320; --surface: #251b2d; --text: #f6eef8; --muted: #b7a6bb; --border: #3a2c44;
  --shadow: 0 10px 30px rgba(0, 0, 0, .4);
}

* { box-sizing: border-box; }
[hidden] { display: none !important; } /* .btn etc. set display and would otherwise override [hidden] */
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  font-family: 'Nunito', system-ui, -apple-system, sans-serif;
  background: var(--bg);
  color: var(--text);
  line-height: 1.5;
}
a { color: inherit; }
.container { max-width: 1100px; margin: 0 auto; padding: 0 16px; }

/* Header */
header.site {
  position: sticky; top: 0; z-index: 10;
  background: color-mix(in srgb, var(--bg) 85%, transparent);
  backdrop-filter: blur(10px);
  border-bottom: 1px solid var(--border);
}
.nav { display: flex; align-items: center; justify-content: space-between; height: 64px; gap: 12px; }
.logo { font-weight: 900; font-size: 1.35rem; text-decoration: none; display: flex; align-items: center; gap: 6px; }
.logo span { color: var(--accent); }
.nav-right { display: flex; gap: 10px; align-items: center; }
.lang-switch { display: flex; border: 1px solid var(--border); border-radius: 999px; overflow: hidden; background: var(--surface); }
.lang-switch button { border: 0; background: transparent; color: var(--muted); padding: 6px 10px; font: inherit; font-weight: 800; font-size: .85rem; cursor: pointer; }
.lang-switch button.active { background: var(--accent); color: #fff; }

/* Buttons */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  border: 0; border-radius: 999px; padding: 12px 22px;
  font: inherit; font-weight: 800; cursor: pointer; text-decoration: none;
  background: var(--accent); color: #fff;
  box-shadow: 0 6px 18px color-mix(in srgb, var(--accent) 35%, transparent);
  transition: transform .15s, box-shadow .15s;
}
.btn:hover { transform: translateY(-2px); }
.btn:active { transform: translateY(0); }
.btn.ghost { background: var(--surface); color: var(--text); border: 1px solid var(--border); box-shadow: none; }
.btn.sm { padding: 8px 14px; font-size: .9rem; }
.btn.block { width: 100%; }
.btn.wa { background: #25d366; box-shadow: none; }
.btn.ig { background: linear-gradient(45deg, #f9ce34, #ee2a7b 45%, #6228d7); box-shadow: none; }
.btn.xbtn { background: #000; box-shadow: none; }

.toast {
  position: fixed; left: 50%; bottom: 24px; transform: translateX(-50%); z-index: 100;
  background: #2a1b2d; color: #fff; padding: 12px 18px; border-radius: 14px; font-weight: 700;
  width: max-content; max-width: calc(100vw - 32px); text-align: center; box-shadow: 0 10px 30px rgba(0,0,0,.25);
  animation: toastIn .3s ease both;
}
@keyframes toastIn { from { opacity: 0; } to { opacity: 1; } }

/* Home */
.hero { text-align: center; padding: 64px 0 32px; }
.hero .emoji-row { font-size: 2.4rem; margin-bottom: 12px; letter-spacing: 6px; }
.hero h1 { font-size: clamp(2rem, 6vw, 3.4rem); line-height: 1.1; margin: 0 auto 16px; font-weight: 900; max-width: 760px; }
.hero p { color: var(--muted); font-size: 1.15rem; max-width: 560px; margin: 0 auto 28px; }
.section-title { font-size: 1.5rem; font-weight: 900; margin: 48px 0 16px; }
.grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); gap: 16px; }
.card {
  background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius);
  padding: 14px; text-decoration: none; box-shadow: var(--shadow);
  transition: transform .2s; display: block;
}
.card:hover { transform: translateY(-4px) rotate(-.6deg); }
.card h3 { margin: 4px 4px 2px; font-size: 1.1rem; }
.card p { margin: 0 4px 4px; color: var(--muted); font-size: .95rem; }
.thumb { height: 150px; border-radius: 12px; display: grid; place-items: center; font-size: 4.2rem; margin-bottom: 10px; }
.thumb span { display: inline-block; transition: transform .3s; }
.card:hover .thumb span { transform: scale(1.15) rotate(-8deg); }
.thumb.box { background: linear-gradient(135deg, #ffd1e1, #ffe8c7); }
.thumb.letter { background: linear-gradient(135deg, #ffc9d6, #f6d5ff); }
.thumb.scratch { background: linear-gradient(135deg, #d9dcef, #fff3c4); }
.thumb.cake { background: linear-gradient(135deg, #c9f2e4, #ffe0ec); }
.thumb.ask { background: linear-gradient(135deg, #ffd6e7, #e0d4ff); }
.thumb.balloons { background: linear-gradient(135deg, #cfe9ff, #fff1c1); }
.thumb.egg { background: linear-gradient(135deg, #fff3c4, #d9f5e5); }
.thumb.coupon { background: linear-gradient(135deg, #ffe0cc, #ffd1e1); }

.steps { display: grid; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); gap: 16px; }
.step { background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); padding: 20px; }
.step b { display: grid; place-items: center; width: 36px; height: 36px; border-radius: 50%; background: var(--accent); color: #fff; margin-bottom: 10px; }
.step h3 { margin: 0 0 4px; }
.step p { margin: 0; color: var(--muted); }

.recent { display: flex; flex-direction: column; gap: 8px; }
.recent a { display: flex; align-items: center; gap: 12px; background: var(--surface); border: 1px solid var(--border); border-radius: 12px; padding: 10px 14px; text-decoration: none; }
.recent a small { color: var(--muted); margin-left: auto; white-space: nowrap; }

footer.site { text-align: center; color: var(--muted); padding: 48px 16px 32px; font-size: .95rem; display: flex; flex-direction: column; gap: 8px; align-items: center; }
.footer-links { display: flex; flex-wrap: wrap; gap: 10px; justify-content: center; font-size: .9rem; font-weight: 700; }
.footer-links a { text-decoration: none; color: var(--muted); transition: color .15s; }
.footer-links a:hover { color: var(--accent); }
.footer-links .dot { opacity: .5; }
.footer-cookie { border: 0; background: none; padding: 0; font: inherit; font-weight: 700; color: var(--muted); cursor: pointer; }
.footer-cookie:hover { color: var(--accent); }
.legal-updated { font-size: .85rem; color: var(--muted); margin: -10px 0 18px; }

/* FAQ & Legal */
.faq-list { display: flex; flex-direction: column; gap: 10px; }
.faq-item { background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); padding: 14px 18px; }
.faq-item summary { font-weight: 800; cursor: pointer; list-style: none; display: flex; align-items: center; justify-content: space-between; gap: 12px; }
.faq-item summary::-webkit-details-marker { display: none; }
.faq-item summary::after { content: '+'; font-weight: 900; font-size: 1.2rem; color: var(--accent); transition: transform .2s; }
.faq-item[open] summary::after { transform: rotate(45deg); }
.faq-item p { margin: 10px 0 2px; color: var(--muted); font-size: .95rem; }

.legal-page { max-width: 760px; padding: 28px 16px 32px; }
.legal-page h1 { font-size: 1.9rem; font-weight: 900; margin: 10px 0 20px; }
.legal-page .panel h2 { font-size: 1.2rem; color: var(--text); margin-bottom: 8px; }
.legal-page .panel p { margin: 0 0 10px; color: var(--muted); }
.legal-page .panel p:last-child { margin-bottom: 0; }
.back-link { display: inline-block; text-decoration: none; font-weight: 800; color: var(--accent); font-size: .92rem; }
.contact-mail { font-weight: 800; color: var(--accent); text-decoration: none; }

/* Ad units (hidden unless ADSENSE_CLIENT is set or ?ads=1 is in URL) */
.ad-unit { margin: 24px 0 0; text-align: center; }
.ad-unit[hidden] { display: none !important; }
.ad-unit.compact { max-width: 330px; margin: 16px auto 0; }
.ad-frame { border: 0; display: block; margin: 0 auto; max-width: 100%; }

/* Affiliate card ("add a real touch to your digital gift") */
.aff-card { margin-top: 16px; padding-top: 14px; border-top: 1px dashed var(--border); }
.aff-title { font-weight: 900; margin-bottom: 10px; }
.aff-row { display: flex; gap: 8px; justify-content: center; flex-wrap: wrap; }
.aff-item {
  display: inline-flex; align-items: center; gap: 6px; text-decoration: none; font-weight: 800; font-size: .92rem;
  border: 2px solid var(--border); border-radius: 999px; padding: 7px 14px; background: var(--bg); color: var(--text);
}
.aff-item:hover { border-color: var(--accent); }
.aff-emoji { font-size: 1.15rem; }
.aff-note { font-size: .75rem; color: var(--muted); margin: 10px 0 0; }
.ad-label { font-size: .7rem; font-weight: 800; text-transform: uppercase; letter-spacing: .08em; color: var(--muted); opacity: .75; margin-bottom: 4px; }
.ad-preview-box {
  background: color-mix(in srgb, var(--surface) 70%, var(--bg));
  border: 1px dashed var(--border); border-radius: 14px;
  padding: 22px 16px; color: var(--muted); font-size: .85rem; font-weight: 700;
}

/* Cookie consent bar */
.cookie-bar {
  position: fixed; left: 16px; right: 16px; bottom: 16px; z-index: 50;
  max-width: 780px; margin: 0 auto;
  background: color-mix(in srgb, var(--surface) 94%, transparent);
  backdrop-filter: blur(12px);
  border: 1px solid var(--border); border-radius: var(--radius);
  box-shadow: var(--shadow); padding: 14px 18px;
  display: flex; align-items: center; justify-content: space-between; gap: 14px; flex-wrap: wrap;
  animation: rise .35s ease both;
}
.cookie-text { margin: 0; font-size: .9rem; color: var(--text); flex: 1 1 260px; }
.cookie-more { color: var(--accent); font-weight: 800; text-decoration: underline; }
.cookie-actions { display: flex; gap: 8px; flex-wrap: wrap; }

/* Create page */
.create-layout { display: grid; grid-template-columns: minmax(0, 1fr) 360px; gap: 32px; padding: 28px 0 48px; align-items: start; }
@media (max-width: 880px) { .create-layout { grid-template-columns: minmax(0, 1fr); } }
.create-layout h1 { margin: 0 0 18px; font-size: 1.9rem; font-weight: 900; }
.panel { background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); padding: 18px; margin-bottom: 16px; }
.panel h2 { font-size: 1rem; margin: 0 0 12px; color: var(--muted); font-weight: 800; }
.type-picker { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; }
@media (max-width: 520px) { .type-picker { grid-template-columns: repeat(2, 1fr); } }
.type-picker button {
  border: 2px solid var(--border); background: var(--bg); color: var(--text); border-radius: 14px;
  padding: 12px 6px; font: inherit; font-weight: 800; font-size: .88rem; cursor: pointer;
  display: flex; flex-direction: column; align-items: center; gap: 4px; transition: border-color .15s, transform .15s;
}
.type-picker button span { font-size: 1.9rem; }
.type-picker button.selected { border-color: var(--accent); background: color-mix(in srgb, var(--accent) 10%, var(--surface)); }
.type-picker button:hover { transform: translateY(-2px); }

.field { margin-bottom: 12px; }
.field:last-child { margin-bottom: 0; }
.field label { display: block; font-weight: 800; font-size: .92rem; margin-bottom: 6px; }
.field input, .field textarea {
  width: 100%; font: inherit; color: var(--text); background: var(--bg);
  border: 2px solid var(--border); border-radius: 12px; padding: 10px 12px; outline: none; transition: border-color .15s;
}
.field input:focus, .field textarea:focus { border-color: var(--accent); }
.field textarea { min-height: 110px; resize: vertical; }
.row { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
@media (max-width: 520px) { .row { grid-template-columns: 1fr; } }
.counter { text-align: right; font-size: .8rem; color: var(--muted); margin-top: 4px; }

.chips { display: flex; flex-wrap: wrap; gap: 8px; }
.chip {
  border: 2px solid var(--border); background: var(--bg); color: var(--text); border-radius: 999px;
  padding: 7px 14px; font: inherit; font-weight: 800; font-size: .88rem; cursor: pointer;
  display: inline-flex; align-items: center; gap: 8px; transition: border-color .15s;
}
.chip.selected { border-color: var(--accent); background: color-mix(in srgb, var(--accent) 10%, var(--surface)); }
.chip .sw { width: 20px; height: 20px; border-radius: 50%; display: grid; place-items: center; font-size: .65rem; border: 1px solid rgba(0,0,0,.1); }
.chip.listen { margin-top: 10px; }
.chip.listen:disabled { opacity: .5; cursor: default; }
.note { font-size: .82rem; color: var(--muted); margin: 8px 0 0; }

.swatches { display: flex; gap: 10px; flex-wrap: wrap; }
.swatches button {
  width: 38px; height: 38px; border-radius: 50%; border: 3px solid var(--surface); cursor: pointer;
  box-shadow: 0 0 0 2px var(--border); transition: transform .15s;
}
.swatches button.selected { box-shadow: 0 0 0 3px var(--text); transform: scale(1.08); }

.preview-col { position: sticky; top: 84px; }
.preview-col h2 { text-align: center; font-size: 1rem; color: var(--muted); margin: 0 0 10px; }
.phone {
  width: 100%; max-width: 330px; aspect-ratio: 9 / 17; margin: 0 auto;
  border-radius: 38px; border: 10px solid #1d1420; overflow: hidden; background: #fff;
  box-shadow: var(--shadow);
}
.phone iframe { width: 100%; height: 100%; border: 0; display: block; }
@media (max-width: 880px) { .preview-col { position: static; } }

.result { display: none; text-align: center; }
.result.show { display: block; animation: rise .4s ease both; }
.result h2 { color: var(--text); font-size: 1.4rem; margin: 0 0 4px; }
.result p { color: var(--muted); margin: 0 0 14px; }
.link-row { display: flex; gap: 8px; }
.link-row input { flex: 1; min-width: 0; font: inherit; font-size: .9rem; border: 2px solid var(--border); border-radius: 12px; padding: 10px; background: var(--bg); color: var(--text); }
.share-row { display: flex; gap: 8px; justify-content: center; flex-wrap: wrap; margin: 12px 0; }
#qr { display: inline-block; padding: 10px; background: #fff; border-radius: 12px; margin-top: 6px; }
#qr:empty { display: none; }
#qr img, #qr canvas { display: block; }
.qr-note { font-size: .85rem; color: var(--muted); }

@keyframes rise { from { opacity: 0; transform: translateY(10px); } to { opacity: 1; transform: none; } }
