/* ============================================================
   WhatsApp Message Designer — styles.css
   Hard-coded LIGHT theme · Mobile-first · External stylesheet
   ============================================================ */

:root {
    --wa: #25d366;
    --wa-dark: #128c7e;
    --wa-deep: #075e54;
    --wa-bubble: #dcf8c6;
    --wa-bg: #ece5dd;
    --wa-tick: #34b7f1;

    --surface: #ffffff;
    --surface-2: #f8fafc;
    --surface-3: #eef2f7;
    --text: #0f172a;
    --text-soft: #334155;
    --muted: #64748b;
    --border: #e2e8f0;

    --success: #10b981;
    --danger: #ef4444;
    --warning: #f59e0b;

    --radius-sm: 8px;
    --radius: 12px;
    --radius-lg: 18px;
    --radius-xl: 24px;
    --shadow-sm: 0 1px 2px rgba(15,23,42,.06);
    --shadow: 0 4px 14px rgba(15,23,42,.08);
    --shadow-md: 0 12px 28px rgba(18,140,126,.12);
    --shadow-lg: 0 24px 48px rgba(15,23,42,.14);
    --ring: 0 0 0 4px rgba(37,211,102,.18);
    --tr: all .2s cubic-bezier(.4,0,.2,1);
    --font: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
}

* { margin: 0; padding: 0; box-sizing: border-box; }

html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; }

body {
    font-family: var(--font) !important;
    background-color: #f2f6f4;
    color: var(--text);
    line-height: 1.6;
    -webkit-font-smoothing: antialiased;
}

button { font-family: inherit; cursor: pointer; }
button:disabled { opacity: .45; cursor: not-allowed; }
.container { max-width: 1180px; margin: 0 auto; padding: 0 1.1rem; }

/* ================= HERO ================= */
.wa-hero { padding: 2.6rem 0 1.6rem; text-align: center; }

.hero-badge {
    display: inline-flex; align-items: center; gap: .5rem;
    background: #fff; border: 1px solid var(--border);
    color: var(--wa-deep); font-size: .78rem; font-weight: 700;
    padding: .45rem 1rem; border-radius: 999px;
    box-shadow: var(--shadow-sm); margin-bottom: 1rem;
}
.pulse-dot { width: 8px; height: 8px; border-radius: 50%; background: var(--wa); box-shadow: 0 0 0 4px rgba(37,211,102,.18); animation: pulse 2s infinite; }
.pulse-dot.green { background: var(--success); box-shadow: 0 0 0 4px rgba(16,185,129,.18); }
@keyframes pulse { 50% { box-shadow: 0 0 0 7px rgba(37,211,102,.05); } }

.wa-hero h1 {
    font-size: clamp(1.85rem, 5.2vw, 2.9rem);
    font-weight: 800; letter-spacing: -.02em; line-height: 1.15;
    margin-bottom: .9rem;
}
.grad {
    background: linear-gradient(115deg, var(--wa-deep), var(--wa-dark) 45%, var(--wa));
    -webkit-background-clip: text; background-clip: text;
    -webkit-text-fill-color: transparent; color: transparent;
}
.hero-sub { max-width: 640px; margin: 0 auto 1.3rem; color: var(--text-soft); font-size: clamp(.97rem, 2.4vw, 1.1rem); }
.hero-chips { display: flex; flex-wrap: wrap; gap: .5rem; justify-content: center; }
.chip {
    display: inline-flex; align-items: center; gap: .45rem;
    background: #fff; border: 1px solid var(--border);
    color: var(--text-soft); font-size: .8rem; font-weight: 600;
    padding: .42rem .9rem; border-radius: 999px; box-shadow: var(--shadow-sm);
    transition: var(--tr);
}
.chip:hover { transform: translateY(-2px); box-shadow: var(--shadow); border-color: var(--wa); color: var(--wa-deep); }
.chip i { color: var(--wa-dark); }

/* ================= LAYOUT ================= */
.tool-wrap { padding-bottom: 1rem; }
.tool-grid { display: grid; grid-template-columns: 1fr; gap: 1.3rem; margin-top: 1.2rem; }
@media (min-width: 961px) { .tool-grid { grid-template-columns: 1.15fr .85fr; gap: 1.6rem; align-items: start; } }

.library-grid { display: grid; grid-template-columns: 1fr; gap: 1.3rem; margin-top: 1.3rem; }
@media (min-width: 961px) { .library-grid { grid-template-columns: 1fr 1fr; gap: 1.6rem; } }

/* ================= CARDS ================= */
.wa-card {
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: var(--radius-xl);
    box-shadow: var(--shadow-md);
    padding: 1.25rem;
    position: relative; overflow: hidden;
}
.wa-card::before {
    content: ''; position: absolute; inset: 0 0 auto 0; height: 4px;
    background: linear-gradient(90deg, var(--wa-deep), var(--wa-dark), var(--wa));
}
@media (min-width: 641px) { .wa-card { padding: 1.7rem; } }

.wa-card-head {
    display: flex; align-items: center; justify-content: space-between;
    gap: .8rem; margin-bottom: 1.1rem; flex-wrap: wrap;
}
.wa-card-head h2 { font-size: 1.15rem; font-weight: 800; letter-spacing: -.01em; display: flex; align-items: center; gap: .55rem; }
.wa-card-head h2 i { color: var(--wa-dark); }

.head-tools { display: flex; gap: .4rem; }
.icon-btn {
    width: 36px; height: 36px; border-radius: 10px;
    border: 1.5px solid var(--border); background: var(--surface-2);
    color: var(--muted); font-size: .85rem;
    display: flex; align-items: center; justify-content: center;
    transition: var(--tr);
}
.icon-btn:hover:not(:disabled) { color: var(--wa-deep); border-color: var(--wa); transform: translateY(-1px); }

/* ================= FORMAT TOOLBAR ================= */
.fmt-toolbar {
    display: flex; gap: .45rem;
    overflow-x: auto; padding: .3rem .1rem .6rem;
    scrollbar-width: none;
    position: sticky; top: 64px; z-index: 30;
    background: var(--surface);
}
.fmt-toolbar::-webkit-scrollbar { display: none; }
@media (min-width: 961px) { .fmt-toolbar { position: static; flex-wrap: wrap; overflow: visible; } }

.fmt-btn {
    flex: 0 0 auto;
    display: inline-flex; align-items: center; gap: .4rem;
    padding: .5rem .85rem;
    background: var(--surface-2);
    border: 1.5px solid var(--border);
    border-radius: 10px;
    font-size: .82rem; font-weight: 700; color: var(--text-soft);
    transition: var(--tr); white-space: nowrap;
}
.fmt-btn:hover { border-color: var(--wa); color: var(--wa-deep); transform: translateY(-1px); box-shadow: var(--shadow-sm); }
.fmt-btn:active { transform: translateY(0) scale(.97); }
.fmt-btn.danger:hover { border-color: var(--danger); color: var(--danger); }

/* ================= EDITOR ================= */
.editor-body { position: relative; }
#messageInput {
    width: 100%; min-height: 190px; resize: vertical;
    padding: 1rem 1.1rem 2.2rem;
    font-family: inherit; font-size: 1rem; line-height: 1.65;
    color: var(--text);
    background: var(--surface-2);
    border: 1.5px solid var(--border);
    border-radius: var(--radius);
    transition: var(--tr);
}
@media (min-width: 641px) { #messageInput { min-height: 230px; } }
#messageInput:focus { outline: none; border-color: var(--wa); background: #fff; box-shadow: var(--ring); }

.editor-meta {
    position: absolute; left: 0; right: 0; bottom: .55rem;
    display: flex; justify-content: space-between; align-items: center;
    padding: 0 .9rem; pointer-events: none;
}
.editor-meta > * { pointer-events: auto; }
#limitHint { font-size: .72rem; color: var(--muted); font-variant-numeric: tabular-nums; }
.mini-link {
    background: none; border: none;
    color: var(--wa-dark); font-size: .75rem; font-weight: 700;
    display: inline-flex; align-items: center; gap: .3rem;
    padding: .2rem .35rem; border-radius: 6px;
}
.mini-link:hover { background: rgba(37,211,102,.1); }

/* ================= ADV TRANSFORMS ================= */
.adv-section { margin-top: 1.1rem; padding-top: 1.1rem; border-top: 1px dashed var(--border); }
.adv-section h3 { font-size: .9rem; font-weight: 800; color: var(--text); display: flex; align-items: center; gap: .5rem; margin-bottom: .7rem; }
.adv-section h3 i { color: var(--wa-dark); }
.adv-row { display: flex; flex-wrap: wrap; gap: .5rem; }
.adv-btn {
    padding: .45rem .9rem;
    background: #fff; border: 1.5px solid var(--border);
    border-radius: 999px;
    font-size: .78rem; font-weight: 700; color: var(--text-soft);
    transition: var(--tr);
}
.adv-btn:hover { border-color: var(--wa); color: var(--wa-deep); transform: translateY(-1px); box-shadow: var(--shadow-sm); }

/* ================= ACTIONS ================= */
.action-grid {
    display: grid; grid-template-columns: 1fr 1fr;
    gap: .6rem; margin-top: 1.2rem;
}
@media (min-width: 641px) { .action-grid { grid-template-columns: repeat(4, 1fr); } }

.act-btn {
    display: inline-flex; align-items: center; justify-content: center; gap: .5rem;
    padding: .8rem .6rem;
    border: none; border-radius: var(--radius);
    font-size: .85rem; font-weight: 700;
    background: var(--surface-2); color: var(--text-soft);
    border: 1.5px solid var(--border);
    transition: var(--tr);
}
.act-btn:hover { transform: translateY(-2px); box-shadow: var(--shadow); }
.act-btn.primary { background: var(--text); border-color: var(--text); color: #fff; }
.act-btn.primary:hover { background: #1e293b; }
.act-btn.wa {
    background: linear-gradient(135deg, var(--wa), var(--wa-dark));
    border-color: transparent; color: #fff;
    box-shadow: 0 6px 14px rgba(18,140,126,.3);
}
.act-btn.wa:hover { box-shadow: 0 10px 22px rgba(18,140,126,.42); }

/* ================= PREVIEW (phone) ================= */
.live-badge { display: inline-flex; align-items: center; gap: .45rem; font-size: .75rem; font-weight: 800; color: var(--success); text-transform: uppercase; letter-spacing: .05em; }

.phone-frame {
    border-radius: var(--radius-lg);
    overflow: hidden;
    border: 1px solid var(--border);
    box-shadow: var(--shadow);
    background: var(--wa-bg);
}
.phone-topbar {
    background: linear-gradient(135deg, var(--wa-deep), var(--wa-dark));
    color: #fff;
    display: flex; align-items: center; gap: .7rem;
    padding: .7rem .9rem;
}
.phone-avatar {
    width: 34px; height: 34px; border-radius: 50%;
    background: rgba(255,255,255,.2);
    display: flex; align-items: center; justify-content: center;
    font-size: 1rem; flex: 0 0 34px;
}
.phone-peer { flex: 1; min-width: 0; display: flex; flex-direction: column; line-height: 1.25; }
.phone-peer strong { font-size: .9rem; }
.phone-peer span { font-size: .7rem; opacity: .8; }
.phone-icons { display: flex; gap: .9rem; font-size: .85rem; opacity: .9; }

.chat-bg {
    min-height: 260px; max-height: 380px; overflow-y: auto;
    padding: 1.1rem .9rem;
    background-color: var(--wa-bg);
    background-image: url("data:image/svg+xml,%3Csvg width='100' height='100' viewBox='0 0 100 100' xmlns='http://www.w3.org/2000/svg'%3E%3Cpath d='M11 18c3.866 0 7-3.134 7-7s-3.134-7-7-7-7 3.134-7 7 3.134 7 7 7zm48 25c3.866 0 7-3.134 7-7s-3.134-7-7-7-7 3.134-7 7 3.134 7 7 7zm-43-7c1.657 0 3-1.343 3-3s-1.343-3-3-3-3 1.343-3 3 1.343 3 3 3zm63 31c1.657 0 3-1.343 3-3s-1.343-3-3-3-3 1.343-3 3 1.343 3 3 3zM34 90c1.657 0 3-1.343 3-3s-1.343-3-3-3-3 1.343-3 3 1.343 3 3 3zm56-76c1.657 0 3-1.343 3-3s-1.343-3-3-3-3 1.343-3 3 1.343 3 3 3zM12 86c2.21 0 4-1.79 4-4s-1.79-4-4-4-4 1.79-4 4 1.79 4 4 4zm28-65c2.21 0 4-1.79 4-4s-1.79-4-4-4-4 1.79-4 4 1.79 4 4 4zm23-11c2.76 0 5-2.24 5-5s-2.24-5-5-5-5 2.24-5 5 2.24 5 5 5zm-6 60c2.21 0 4-1.79 4-4s-1.79-4-4-4-4 1.79-4 4 1.79 4 4 4zm29 22c2.76 0 5-2.24 5-5s-2.24-5-5-5-5 2.24-5 5 2.24 5 5 5zM32 63c2.76 0 5-2.24 5-5s-2.24-5-5-5-5 2.24-5 5 2.24 5 5 5zm57-13c2.76 0 5-2.24 5-5s-2.24-5-5-5-5 2.24-5 5 2.24 5 5 5zm-9-21c1.105 0 2-.895 2-2s-.895-2-2-2-2 .895-2 2 .895 2 2 2zM60 91c1.105 0 2-.895 2-2s-.895-2-2-2-2 .895-2 2 .895 2 2 2zM35 41c1.105 0 2-.895 2-2s-.895-2-2-2-2 .895-2 2 .895 2 2 2zM12 60c1.105 0 2-.895 2-2s-.895-2-2-2-2 .895-2 2 .895 2 2 2z' fill='%23128c7e' fill-opacity='0.06' fill-rule='evenodd'/%3E%3C/svg%3E");
    display: flex; flex-direction: column; justify-content: flex-end;
}
@media (min-width: 641px) { .chat-bg { min-height: 320px; } }

.bubble-wrap { align-self: flex-end; max-width: 88%; margin-left: auto; }
.bubble {
    background: var(--wa-bubble);
    border-radius: 12px 2px 12px 12px;
    padding: .65rem .8rem .45rem;
    font-size: .92rem; line-height: 1.55;
    color: #111b21;
    box-shadow: 0 1px 1px rgba(0,0,0,.12);
    word-break: break-word;
    white-space: pre-wrap;
}
.bubble .placeholder { color: #8696a0; font-style: italic; }
.bubble strong { font-weight: 700; }
.bubble em { font-style: italic; }
.bubble del { color: #667781; }
.bubble code {
    font-family: 'SFMono-Regular', Consolas, monospace;
    background: rgba(15,23,42,.07);
    padding: .05rem .35rem; border-radius: 4px;
    font-size: .85em;
}
.bubble .quote {
    border-left: 3px solid var(--wa);
    padding-left: .6rem; margin: .2rem 0;
    display: block; color: #3b4a54;
}
.bubble-meta {
    display: flex; justify-content: flex-end; align-items: center; gap: .3rem;
    font-size: .66rem; color: #8696a0;
    padding: .15rem .3rem .3rem 0;
}
.bubble-meta .read { color: var(--wa-tick); }

.stats-grid {
    display: grid; grid-template-columns: repeat(5, 1fr);
    gap: .5rem; margin-top: 1rem;
}
.stat {
    background: var(--surface-2);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: .6rem .3rem;
    text-align: center;
}
.stat strong { display: block; font-size: 1.05rem; font-weight: 800; color: var(--wa-deep); font-variant-numeric: tabular-nums; }
.stat span { font-size: .64rem; font-weight: 600; color: var(--muted); text-transform: uppercase; letter-spacing: .04em; }

/* ================= EMOJI PICKER ================= */
.emoji-search { position: relative; margin-bottom: .8rem; }
.emoji-search i { position: absolute; left: .9rem; top: 50%; transform: translateY(-50%); color: var(--muted); font-size: .85rem; }
.emoji-search input {
    width: 100%; padding: .65rem 1rem .65rem 2.4rem;
    font-size: .9rem; font-family: inherit;
    background: var(--surface-2);
    border: 1.5px solid var(--border); border-radius: var(--radius);
    transition: var(--tr);
}
.emoji-search input:focus { outline: none; border-color: var(--wa); box-shadow: var(--ring); background: #fff; }

.emoji-cats { display: flex; gap: .4rem; overflow-x: auto; padding-bottom: .5rem; scrollbar-width: none; margin-bottom: .6rem; }
.emoji-cats::-webkit-scrollbar { display: none; }
.emoji-cat {
    flex: 0 0 auto;
    padding: .4rem .85rem;
    background: var(--surface-2); border: 1.5px solid var(--border);
    border-radius: 999px;
    font-size: .78rem; font-weight: 700; color: var(--text-soft);
    transition: var(--tr);
}
.emoji-cat.active { background: linear-gradient(135deg, var(--wa-dark), var(--wa-deep)); border-color: transparent; color: #fff; }
.emoji-cat:hover:not(.active) { border-color: var(--wa); color: var(--wa-deep); }

.emoji-grid {
    display: grid; grid-template-columns: repeat(auto-fill, minmax(44px, 1fr));
    gap: .35rem;
    max-height: 260px; overflow-y: auto;
    padding-right: .2rem;
    scrollbar-width: thin;
}
.emoji-btn {
    aspect-ratio: 1;
    border: none; border-radius: 10px;
    background: var(--surface-2);
    font-size: 1.35rem; line-height: 1;
    display: flex; align-items: center; justify-content: center;
    transition: var(--tr);
}
.emoji-btn:hover { background: rgba(37,211,102,.14); transform: scale(1.12); }
.emoji-grid::-webkit-scrollbar { width: 5px; }
.emoji-grid::-webkit-scrollbar-thumb { background: var(--wa); border-radius: 99px; }
.emoji-grid::-webkit-scrollbar-track { background: var(--surface-3); }

.load-more {
    width: 100%; margin-top: .7rem;
    padding: .6rem;
    background: var(--surface-2); border: 1.5px dashed var(--border);
    border-radius: var(--radius);
    font-size: .82rem; font-weight: 700; color: var(--muted);
    display: flex; align-items: center; justify-content: center; gap: .45rem;
    transition: var(--tr);
}
.load-more:hover { border-color: var(--wa); color: var(--wa-deep); }

/* ================= TEMPLATES ================= */
.tpl-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: .55rem;
}
.tpl-btn {
    display: flex; align-items: center; gap: .7rem;
    text-align: left;
    background: var(--surface-2);
    border: 1.5px solid var(--border);
    border-radius: var(--radius);
    padding: .7rem .8rem;
    transition: var(--tr);
    font-size: .85rem; color: var(--text-soft);
}
.tpl-btn:hover { border-color: var(--wa); transform: translateY(-2px); box-shadow: var(--shadow-sm); background: #fff; }
.tpl-emoji { font-size: 1.35rem; flex: 0 0 auto; }
.tpl-name { flex: 1; min-width: 0; font-weight: 700; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.tpl-del {
    flex: 0 0 auto; width: 26px; height: 26px;
    border: none; border-radius: 8px;
    background: transparent; color: var(--muted);
    font-size: .75rem; display: none; align-items: center; justify-content: center;
}
.tpl-btn:hover .tpl-del { display: flex; }
.tpl-del:hover { background: rgba(239,68,68,.12); color: var(--danger); }

.sub-head { font-size: .85rem; font-weight: 800; color: var(--text); margin: 1.1rem 0 .6rem; display: flex; align-items: center; gap: .45rem; }
.sub-head i { color: var(--wa-dark); }
.empty-note { font-size: .8rem; color: var(--muted); font-style: italic; padding: .4rem 0; }

/* ================= STICKER FAB ================= */
.sticker-fab { position: fixed; right: 1.1rem; bottom: 1.4rem; z-index: 200; }
.fab-btn {
    width: 54px; height: 54px; border-radius: 50%; border: none;
    background: linear-gradient(135deg, var(--wa), var(--wa-dark));
    color: #fff; font-size: 1.25rem;
    box-shadow: 0 8px 20px rgba(18,140,126,.4);
    transition: var(--tr);
    display: flex; align-items: center; justify-content: center;
}
.fab-btn:hover { transform: scale(1.1); }
.sticker-panel {
    position: absolute; right: 0; bottom: 66px;
    width: min(320px, calc(100vw - 2.2rem));
    background: #fff; border: 1px solid var(--border);
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-lg);
    padding: 1rem;
    display: none;
}
.sticker-panel.open { display: block; animation: pop .22s ease; }
@keyframes pop { from { opacity: 0; transform: translateY(10px) scale(.97); } }
.sticker-head { display: flex; align-items: center; justify-content: space-between; font-size: .88rem; font-weight: 800; color: var(--wa-deep); margin-bottom: .7rem; }
.sticker-head button { background: none; border: none; color: var(--muted); font-size: 1rem; }
.sticker-head button:hover { color: var(--danger); }
.sticker-grid {
    display: grid; grid-template-columns: repeat(6, 1fr); gap: .35rem;
    max-height: 230px; overflow-y: auto; scrollbar-width: thin;
}
.sticker-grid button {
    aspect-ratio: 1; border: none; border-radius: 8px;
    background: var(--surface-2); font-size: 1.2rem;
    display: flex; align-items: center; justify-content: center;
    transition: var(--tr);
}
.sticker-grid button:hover { background: rgba(37,211,102,.14); transform: scale(1.15); }

/* ================= TOAST ================= */
.toast {
    position: fixed; bottom: 1.4rem; left: 50%;
    transform: translate(-50%, 16px);
    background: var(--text); color: #fff;
    padding: .75rem 1.3rem; border-radius: var(--radius);
    display: flex; align-items: center; gap: .55rem;
    font-size: .86rem; font-weight: 600;
    box-shadow: var(--shadow-lg);
    opacity: 0; pointer-events: none;
    transition: var(--tr); z-index: 999;
    max-width: calc(100vw - 2rem);
}
.toast.show { opacity: 1; transform: translate(-50%, 0); }
.toast.error { background: var(--danger); }
.toast i { color: var(--wa); }
.toast.error i { color: #fecaca; }

/* ================= SEO ================= */
.seo-wrap { padding-bottom: .5rem; }
.seo-section {
    background: #fff; border: 1px solid var(--border);
    border-radius: var(--radius-xl); box-shadow: var(--shadow-sm);
    padding: 1.6rem 1.3rem; margin: 1.1rem 0;
}
@media (min-width: 641px) { .seo-section { padding: 2.2rem; } }
.seo-title {
    font-size: clamp(1.25rem, 3vw, 1.6rem); font-weight: 800; letter-spacing: -.01em;
    margin-bottom: 1.1rem; padding-bottom: .65rem; position: relative;
}
.seo-title::after { content: ''; position: absolute; left: 0; bottom: 0; width: 54px; height: 4px; border-radius: 99px; background: linear-gradient(90deg, var(--wa-deep), var(--wa)); }
.seo-text { color: var(--text-soft); line-height: 1.75; margin-bottom: .9rem; font-size: .98rem; }
.seo-text code, .seo-section code { background: var(--surface-3); padding: .12rem .45rem; border-radius: 6px; font-size: .87em; }

.steps { list-style: none; counter-reset: s; }
.steps li { counter-increment: s; position: relative; padding: .55rem 0 .4rem 2.7rem; color: var(--text-soft); line-height: 1.65; }
.steps li::before {
    content: counter(s); position: absolute; left: 0; top: .5rem;
    width: 28px; height: 28px; border-radius: 50%;
    background: linear-gradient(135deg, var(--wa-dark), var(--wa-deep)); color: #fff;
    font-weight: 800; font-size: .82rem;
    display: flex; align-items: center; justify-content: center;
    box-shadow: 0 4px 10px rgba(18,140,126,.3);
}
.steps strong { color: var(--text); }

.syntax-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: .7rem; }
@media (min-width: 720px) { .syntax-grid { grid-template-columns: repeat(4, 1fr); } }
.syntax-item {
    background: var(--surface-2); border: 1px solid var(--border);
    border-radius: var(--radius); padding: .9rem;
    display: flex; flex-direction: column; gap: .25rem; align-items: center;
    transition: var(--tr);
}
.syntax-item:hover { border-color: var(--wa); transform: translateY(-2px); box-shadow: var(--shadow-sm); }
.syntax-item code { font-weight: 700; color: var(--wa-deep); font-size: .95rem; }
.syntax-item span { font-size: .76rem; font-weight: 600; color: var(--muted); }

.feat-grid { display: grid; grid-template-columns: 1fr; gap: .9rem; }
@media (min-width: 720px) { .feat-grid { grid-template-columns: 1fr 1fr; } }
.feat {
    background: var(--surface-2); border: 1px solid var(--border);
    border-radius: var(--radius-lg); padding: 1.2rem;
    transition: var(--tr);
}
.feat:hover { transform: translateY(-3px); box-shadow: var(--shadow-md); border-color: var(--wa); }
.feat h3 { font-size: .98rem; font-weight: 800; color: var(--wa-deep); display: flex; align-items: center; gap: .5rem; margin-bottom: .4rem; }
.feat p { font-size: .88rem; color: var(--text-soft); line-height: 1.6; }

.faq-item { border-bottom: 1px solid var(--border); }
.faq-item:last-child { border-bottom: none; }
.faq-q {
    width: 100%; display: flex; align-items: center; justify-content: space-between; gap: 1rem;
    background: none; border: none; text-align: left;
    padding: 1rem .15rem;
    font-size: .96rem; font-weight: 700; color: var(--text);
    transition: var(--tr);
}
.faq-q:hover { color: var(--wa-deep); }
.faq-q i { color: var(--wa-dark); transition: transform .25s ease; flex: 0 0 auto; }
.faq-q[aria-expanded="true"] i { transform: rotate(180deg); }
.faq-a { max-height: 0; overflow: hidden; transition: max-height .3s ease; }
.faq-a p { padding: 0 .15rem 1rem; color: var(--text-soft); font-size: .92rem; line-height: 1.7; }
.faq-item.open .faq-a { max-height: 300px; }

.seo-cta {
    background: linear-gradient(135deg, var(--wa-deep), var(--wa-dark));
    color: #fff; text-align: center;
    padding: 2.4rem 1.4rem; border-radius: var(--radius-xl);
    margin: 1.6rem 0 2.6rem; box-shadow: var(--shadow-md);
}
.seo-cta h2 { font-size: clamp(1.3rem, 3vw, 1.7rem); font-weight: 800; margin-bottom: .5rem; }
.seo-cta p { opacity: .92; margin-bottom: 1.3rem; }
.cta-btn {
    display: inline-flex; align-items: center; gap: .5rem;
    background: #fff; color: var(--wa-deep);
    font-weight: 800; font-size: .93rem;
    padding: .8rem 1.7rem; border-radius: 999px;
    text-decoration: none; transition: var(--tr);
    box-shadow: var(--shadow);
}
.cta-btn:hover { transform: translateY(-3px); box-shadow: var(--shadow-lg); }

.adsbygoogle { margin: 1.4rem 0; }

@media (prefers-reduced-motion: reduce) {
    *, *::before, *::after { animation-duration: .01ms !important; transition-duration: .01ms !important; }
}

/* Small screens */
@media (max-width: 480px) {
    .action-grid { grid-template-columns: 1fr 1fr; }
    .stats-grid { grid-template-columns: repeat(3, 1fr); }
    .stat:nth-child(4), .stat:nth-child(5) { display: none; }
    .fmt-toolbar { top: 56px; }
}

@media (max-width: 640px) {

    .container {
        padding-left: .75rem;
        padding-right: .75rem;
    }

    .tool-grid,
    .library-grid {
        gap: .9rem;
    }

    .wa-card {
        border-radius: 16px;
        padding: 1rem;
    }

    .wa-card-head {
        margin-bottom: .85rem;
    }

    .wa-card-head h2 {
        font-size: 1.05rem;
    }

    /* Templates: ALWAYS 2 per row on phones */
    .tpl-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
        gap: .5rem;
    }

    .tpl-btn {
        min-width: 0;
        padding: .65rem .55rem;
        gap: .45rem;
    }

    .tpl-emoji {
        font-size: 1.15rem;
    }

    .tpl-name {
        font-size: .78rem;
    }

    /* Emoji picker gets more usable space */
    .emoji-grid {
        grid-template-columns: repeat(6, minmax(0, 1fr));
        gap: .3rem;
        max-height: 300px;
    }

    .emoji-btn {
        font-size: 1.3rem;
        border-radius: 8px;
    }

    /* Stats remain compact */
    .stats-grid {
        gap: .35rem;
    }

    .stat {
        padding: .5rem .2rem;
    }

    /* Don't let the formatting toolbar consume too much space */
    .fmt-toolbar {
        margin-left: -.25rem;
        margin-right: -.25rem;
        padding-left: .25rem;
        padding-right: .25rem;
    }
}