/* ============================================================
   Mandjie — mobile-first stylesheet
   ============================================================ */

:root {
    --accent: #16a34a;
    --bg: #f6f7f9;
    --card: #ffffff;
    --card-2: #f9fafb;
    --text: #1f2937;
    --muted: #6b7280;
    --border: #e7e9ee;
    --danger: #dc2626;
    --shadow: 0 1px 2px rgba(16, 24, 40, .06), 0 1px 3px rgba(16, 24, 40, .1);
    --shadow-lg: 0 10px 30px rgba(16, 24, 40, .18);
    --radius: 14px;
    --appbar-h: 56px;
    --safe-top: env(safe-area-inset-top, 0px);
    --safe-bottom: env(safe-area-inset-bottom, 0px);
    color-scheme: light dark;
}

@media (prefers-color-scheme: dark) {
    :root {
        --bg: #0f1115;
        --card: #181b21;
        --card-2: #1f232b;
        --text: #e8eaed;
        --muted: #9aa1ac;
        --border: #2a2f38;
        --shadow: 0 1px 2px rgba(0, 0, 0, .4);
        --shadow-lg: 0 12px 34px rgba(0, 0, 0, .55);
    }
}

* { box-sizing: border-box; }

html, body {
    margin: 0;
    padding: 0;
}

body {
    font: 16px/1.5 -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
    background: var(--bg);
    color: var(--text);
    -webkit-tap-highlight-color: transparent;
    overscroll-behavior-y: none;
    min-height: 100vh;
}

a { color: var(--accent); text-decoration: none; }
h1, h2, h3 { margin: 0; }
button { font: inherit; cursor: pointer; }
.ico { display: block; flex: none; }

/* ---- App bar ------------------------------------------------ */
.appbar {
    position: sticky;
    top: 0;
    z-index: 50;
    background: var(--accent);
    color: #fff;
    padding-top: var(--safe-top);
    box-shadow: 0 1px 0 rgba(0, 0, 0, .06);
}
.appbar-in {
    height: var(--appbar-h);
    display: flex;
    align-items: center;
    gap: 6px;
    padding: 0 8px;
    max-width: 720px;
    margin: 0 auto;
}
.appbar-title {
    font-size: 1.15rem;
    font-weight: 700;
    flex: 1;
    min-width: 0;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    padding: 0 4px;
}
.appbar-btn, .appbar-brand {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 42px;
    height: 42px;
    border-radius: 50%;
    color: #fff;
    background: transparent;
    border: 0;
    flex: none;
}
.appbar-btn:active { background: rgba(255, 255, 255, .18); }
.appbar-actions { display: flex; align-items: center; gap: 2px; }
.avatar-sm {
    width: 30px; height: 30px; border-radius: 50%;
    background: rgba(255, 255, 255, .25);
    display: inline-flex; align-items: center; justify-content: center;
    font-weight: 700; font-size: .9rem;
}

/* ---- Layout ------------------------------------------------- */
.wrap {
    max-width: 720px;
    margin: 0 auto;
    padding: 14px 14px calc(24px + var(--safe-bottom));
}

/* ---- Flash toasts ------------------------------------------- */
.flashes {
    position: fixed;
    top: calc(var(--appbar-h) + var(--safe-top) + 8px);
    left: 0; right: 0;
    z-index: 80;
    display: flex; flex-direction: column; align-items: center; gap: 8px;
    padding: 0 12px;
    pointer-events: none;
}
.flash {
    pointer-events: auto;
    max-width: 560px; width: 100%;
    background: var(--card);
    color: var(--text);
    border: 1px solid var(--border);
    border-left: 4px solid var(--muted);
    border-radius: 10px;
    padding: 11px 14px;
    box-shadow: var(--shadow-lg);
    font-size: .93rem;
    animation: flashIn .25s ease;
}
.flash-success { border-left-color: var(--accent); }
.flash-error { border-left-color: var(--danger); }
@keyframes flashIn { from { opacity: 0; transform: translateY(-8px); } to { opacity: 1; transform: none; } }
.flash.hide { opacity: 0; transform: translateY(-8px); transition: .3s; }

/* ---- Connectivity banner ------------------------------------ */
.net-banner {
    position: fixed;
    top: calc(var(--appbar-h) + var(--safe-top));
    left: 0; right: 0;
    z-index: 70;
    text-align: center;
    font-size: .82rem;
    font-weight: 600;
    padding: 6px 12px;
    color: #fff;
}
.net-banner[hidden] { display: none; }
.net-banner.offline { background: #64748b; }
.net-banner.syncing { background: var(--accent); opacity: .9; }

/* ---- Buttons ------------------------------------------------ */
.btn {
    display: inline-flex; align-items: center; justify-content: center; gap: 7px;
    background: var(--card-2);
    color: var(--text);
    border: 1px solid var(--border);
    border-radius: 11px;
    padding: 12px 16px;
    font-weight: 600;
    font-size: .95rem;
}
.btn:active { transform: scale(.98); }
.btn-primary { background: var(--accent); border-color: var(--accent); color: #fff; }
.btn-block { width: 100%; }
.btn-sm { padding: 8px 12px; font-size: .85rem; border-radius: 9px; }
.danger { color: var(--danger); }
.danger-outline { color: var(--danger); border-color: color-mix(in srgb, var(--danger) 40%, var(--border)); }
.link-btn { background: none; border: 0; color: var(--accent); font-weight: 600; padding: 6px; }
.icon-btn { background: none; border: 0; color: var(--muted); padding: 6px; display: inline-flex; }
.pill { background: var(--card-2); border: 1px solid var(--border); border-radius: 999px; padding: 1px 9px; font-size: .8rem; font-weight: 700; }

/* ---- Home / list cards -------------------------------------- */
.home { display: flex; flex-direction: column; gap: 12px; }
.list-cards { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 10px; }
.list-card {
    display: flex; align-items: center; gap: 13px;
    background: var(--card);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 14px;
    color: var(--text);
    box-shadow: var(--shadow);
    position: relative;
    overflow: hidden;
}
.list-card::before { content: ""; position: absolute; left: 0; top: 0; bottom: 0; width: 5px; background: var(--accent); }
.list-card:active { background: var(--card-2); }
.lc-emoji {
    font-size: 1.6rem; width: 46px; height: 46px; flex: none;
    display: inline-flex; align-items: center; justify-content: center;
    background: color-mix(in srgb, var(--accent) 14%, var(--card));
    border-radius: 12px;
}
.lc-body { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 5px; }
.lc-name { font-weight: 700; font-size: 1.02rem; display: flex; align-items: center; gap: 7px; }
.lc-sub { color: var(--muted); font-size: .85rem; display: flex; align-items: center; gap: 7px; }
.lc-bar { height: 5px; border-radius: 3px; background: var(--border); overflow: hidden; margin-top: 2px; }
.lc-bar-fill { display: block; height: 100%; background: var(--accent); border-radius: 3px; transition: width .3s; }
.list-card > .ico { color: var(--muted); }

.chip { font-size: .72rem; font-weight: 700; padding: 2px 8px; border-radius: 999px; background: var(--card-2); border: 1px solid var(--border); color: var(--muted); display: inline-flex; align-items: center; gap: 3px; }
.chip-share { color: var(--accent); border-color: color-mix(in srgb, var(--accent) 35%, var(--border)); }
.chip-shared { background: color-mix(in srgb, #0ea5e9 15%, var(--card)); color: #0ea5e9; border-color: transparent; }

/* Install nudge (home dashboard) */
.install-banner {
    display: flex; align-items: center; gap: 11px;
    background: color-mix(in srgb, var(--accent) 12%, var(--card));
    border: 1px solid color-mix(in srgb, var(--accent) 30%, var(--border));
    border-radius: var(--radius);
    padding: 12px 14px;
    box-shadow: var(--shadow);
}
.install-banner .ib-ico { font-size: 1.5rem; flex: none; }
.install-banner .ib-txt { flex: 1; min-width: 0; font-size: .9rem; font-weight: 500; }
.install-banner .ib-actions { display: flex; align-items: center; gap: 6px; flex: none; }
.install-banner .ib-install {
    background: var(--accent); color: #fff; border: 0; border-radius: 9px;
    padding: 9px 15px; font-weight: 700; font-size: .9rem;
}
.install-banner .ib-install:active { transform: scale(.97); }
.install-banner .ib-x { background: none; border: 0; color: var(--muted); font-size: 1rem; padding: 6px 8px; line-height: 1; }

.archived-link { display: inline-flex; align-items: center; gap: 8px; color: var(--muted); font-weight: 600; padding: 10px 4px; }
.arch-card { display: flex; align-items: center; gap: 10px; }
.arch-card .list-card { flex: 1; }

/* ---- FAB ---------------------------------------------------- */
.fab {
    position: fixed;
    right: 18px;
    bottom: calc(18px + var(--safe-bottom));
    z-index: 60;
    width: 60px; height: 60px; border-radius: 50%;
    background: var(--accent); color: #fff; border: 0;
    display: flex; align-items: center; justify-content: center;
    box-shadow: var(--shadow-lg);
}
.fab:active { transform: scale(.94); }

/* ---- List screen -------------------------------------------- */
.list-view { padding-bottom: 0; }
.list-screen { padding-bottom: calc(78px + var(--safe-bottom)); }
.viewer-note { background: var(--card); border: 1px solid var(--border); border-radius: 11px; padding: 10px 14px; color: var(--muted); font-size: .9rem; margin-bottom: 12px; }

/* Add bar fixed to the bottom of the viewport */
.add-bar {
    position: fixed;
    left: 0; right: 0;
    bottom: 0;
    z-index: 55;
    display: flex; gap: 8px;
    padding: 10px 12px calc(10px + var(--safe-bottom));
    background: color-mix(in srgb, var(--card) 92%, transparent);
    backdrop-filter: saturate(1.4) blur(10px);
    border-top: 1px solid var(--border);
}
.add-in-wrap { position: relative; flex: 1; }
.add-in {
    width: 100%;
    border: 1px solid var(--border);
    background: var(--card);
    color: var(--text);
    border-radius: 12px;
    padding: 13px 14px;
    font-size: 1rem;
}
.add-in:focus { outline: none; border-color: var(--accent); box-shadow: 0 0 0 3px color-mix(in srgb, var(--accent) 22%, transparent); }
.add-btn {
    flex: none; width: 50px; border-radius: 12px; border: 0;
    background: var(--accent); color: #fff;
    display: flex; align-items: center; justify-content: center;
}
.add-btn:active { transform: scale(.95); }

/* Suggestions dropdown (opens upward) */
.suggest {
    position: absolute;
    left: 0; right: 0;
    bottom: calc(100% + 8px);
    background: var(--card);
    border: 1px solid var(--border);
    border-radius: 12px;
    box-shadow: var(--shadow-lg);
    overflow: hidden;
    max-height: 46vh; overflow-y: auto;
}
.suggest-item {
    display: flex; align-items: center; gap: 10px;
    width: 100%; text-align: left;
    background: none; border: 0; border-bottom: 1px solid var(--border);
    padding: 12px 14px; color: var(--text); font-size: .97rem;
}
.suggest-item:last-child { border-bottom: 0; }
.suggest-item:active, .suggest-item.hi { background: var(--card-2); }
.suggest-emoji { font-size: 1.1rem; }
.suggest-cat { margin-left: auto; color: var(--muted); font-size: .78rem; }
.suggest-add { color: var(--accent); font-weight: 700; }

/* ---- Items -------------------------------------------------- */
.items { margin-top: 4px; }
.aisle { margin: 2px 0 4px; }
.aisle-h {
    display: flex; align-items: center; gap: 7px;
    font-size: .78rem; font-weight: 700; text-transform: uppercase; letter-spacing: .04em;
    color: var(--muted);
    padding: 14px 4px 6px;
}
.aisle-emoji { font-size: 1rem; }
.item-list { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 8px; }

.item {
    display: flex; align-items: center; gap: 12px;
    background: var(--card);
    border: 1px solid var(--border);
    border-radius: 12px;
    padding: 12px 12px;
    box-shadow: var(--shadow);
    touch-action: pan-y;
}
.item.done { opacity: .62; }
.item.dragging { opacity: .9; box-shadow: var(--shadow-lg); }
.item.drop-target { border-color: var(--accent); }

.chk {
    flex: none;
    width: 26px; height: 26px; border-radius: 50%;
    border: 2px solid var(--border);
    background: var(--card);
    color: #fff;
    display: flex; align-items: center; justify-content: center;
    padding: 0;
    transition: background .15s, border-color .15s;
}
.chk .ico { opacity: 0; transform: scale(.6); transition: .15s; }
.item.done .chk { background: var(--accent); border-color: var(--accent); }
.item.done .chk .ico { opacity: 1; transform: none; }

.item-main { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 2px; }
.item-name { font-weight: 500; word-break: break-word; }
.item.done .item-name { text-decoration: line-through; text-decoration-color: var(--muted); }
.item-meta { display: flex; flex-wrap: wrap; gap: 6px; align-items: center; }
.item-qty { font-size: .78rem; font-weight: 700; color: var(--accent); background: color-mix(in srgb, var(--accent) 12%, var(--card)); border-radius: 6px; padding: 1px 7px; }
.item-note { font-size: .82rem; color: var(--muted); }
.item-del { flex: none; background: none; border: 0; color: var(--muted); padding: 6px; display: flex; opacity: .7; }
.item-del:active { color: var(--danger); }
.drag { flex: none; color: var(--muted); touch-action: none; cursor: grab; padding: 2px; margin: -2px -4px -2px -2px; }

/* Done group */
.done-group { margin-top: 16px; border-top: 1px dashed var(--border); padding-top: 8px; }
.done-group > summary {
    list-style: none; cursor: pointer;
    display: flex; align-items: center; gap: 8px;
    font-size: .82rem; font-weight: 700; text-transform: uppercase; letter-spacing: .04em;
    color: var(--muted); padding: 8px 4px;
}
.done-group > summary::-webkit-details-marker { display: none; }
.done-n { background: var(--card-2); border: 1px solid var(--border); border-radius: 999px; padding: 0 8px; }
.done-group > summary .clear-done { margin-left: auto; text-transform: none; }
.done-group .item-list { margin-top: 6px; }

/* ---- Empty states ------------------------------------------- */
.empty { text-align: center; padding: 12vh 20px; color: var(--muted); }
.empty-emoji { font-size: 3.4rem; margin-bottom: 8px; }
.empty h2 { color: var(--text); font-size: 1.25rem; margin-bottom: 6px; }
.list-empty { padding: 8vh 20px; }

/* ---- Forms -------------------------------------------------- */
.stack { display: flex; flex-direction: column; gap: 14px; }
.field { display: flex; flex-direction: column; gap: 6px; }
.field > span { font-size: .85rem; font-weight: 600; color: var(--muted); }
.field em { font-style: normal; font-weight: 400; }
.field input, .field select, .link-row input {
    width: 100%;
    border: 1px solid var(--border);
    background: var(--card);
    color: var(--text);
    border-radius: 11px;
    padding: 13px 14px;
    font-size: 1rem;
}
.field input:focus, .field select:focus { outline: none; border-color: var(--accent); box-shadow: 0 0 0 3px color-mix(in srgb, var(--accent) 20%, transparent); }
.two-col { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }

/* Quantity + Unit + stepper row (edit sheet) */
.qty-row { display: flex; gap: 10px; align-items: flex-end; }
.qty-row .qty-f { flex: 1 1 40%; }
.qty-row .unit-f { flex: 1 1 32%; }
.qty-step { display: flex; gap: 8px; flex: none; }
.qty-step .qstep {
    width: 50px; height: 50px; border: 0; border-radius: 11px;
    background: var(--accent); color: #fff; font-size: 1.5rem; font-weight: 700;
    display: flex; align-items: center; justify-content: center;
}
.qty-step .qstep:active { transform: scale(.95); }

/* Snackbar (undo) */
.snackbar {
    position: fixed;
    left: 50%; transform: translateX(-50%);
    bottom: calc(18px + var(--safe-bottom));
    z-index: 95;
    display: flex; align-items: center; gap: 14px;
    background: #1f2530; color: #fff;
    border-radius: 12px; padding: 12px 14px 12px 18px;
    box-shadow: var(--shadow-lg);
    max-width: 92vw; width: 420px;
    animation: flashIn .2s ease;
}
.snackbar .sb-msg { flex: 1; font-size: .92rem; }
.snackbar .sb-undo { background: none; border: 0; color: #7dd3a0; font-weight: 800; font-size: .9rem; letter-spacing: .03em; padding: 4px 6px; }
.snackbar.hide { opacity: 0; transition: .3s; }
.hint { font-size: .82rem; color: var(--muted); margin: 0; }
.hint.tiny { font-size: .76rem; margin-top: 6px; }

.emoji-pick, .color-pick { display: flex; flex-wrap: wrap; gap: 8px; }
.emoji-opt {
    width: 44px; height: 44px; border-radius: 11px; font-size: 1.4rem;
    background: var(--card-2); border: 2px solid transparent;
    display: flex; align-items: center; justify-content: center;
}
.emoji-opt.on { border-color: var(--accent); background: color-mix(in srgb, var(--accent) 14%, var(--card)); }
.color-opt { width: 38px; height: 38px; border-radius: 50%; border: 3px solid transparent; }
.color-opt.on { border-color: var(--text); }

.radio-list { display: flex; flex-direction: column; gap: 2px; }
.radio-row { display: flex; align-items: center; gap: 12px; padding: 13px 6px; border-bottom: 1px solid var(--border); font-weight: 500; }
.radio-row:last-child { border-bottom: 0; }
.radio-row input { width: 20px; height: 20px; accent-color: var(--accent); }

/* ---- Bottom sheets ------------------------------------------ */
.sheet-backdrop {
    position: fixed; inset: 0; z-index: 90;
    background: rgba(15, 23, 42, .45);
    display: flex; align-items: flex-end; justify-content: center;
    animation: fadeIn .2s ease;
}
.sheet-backdrop[hidden] { display: none; }
.sheet {
    width: 100%; max-width: 560px;
    background: var(--card);
    border-radius: 20px 20px 0 0;
    padding: 8px 18px calc(20px + var(--safe-bottom));
    max-height: 88vh; overflow-y: auto;
    box-shadow: var(--shadow-lg);
    animation: sheetUp .24s cubic-bezier(.2, .8, .2, 1);
}
@keyframes fadeIn { from { opacity: 0; } to { opacity: 1; } }
@keyframes sheetUp { from { transform: translateY(100%); } to { transform: none; } }
.sheet-grip { width: 40px; height: 4px; border-radius: 3px; background: var(--border); margin: 6px auto 12px; }
.sheet-title { font-size: 1.15rem; font-weight: 700; margin-bottom: 14px; word-break: break-word; }
.sheet-actions { display: flex; gap: 10px; margin-top: 20px; }
.sheet-actions .btn { flex: 1; }
.sheet-actions .btn-del { flex: 0 0 auto; width: 52px; color: var(--danger); border-color: color-mix(in srgb, var(--danger) 35%, var(--border)); }
.sheet-actions .btn-del:active { background: color-mix(in srgb, var(--danger) 12%, var(--card)); }

.menu-list { display: flex; flex-direction: column; }
.menu-list form { margin: 0; }
.menu-item {
    display: flex; align-items: center; gap: 13px;
    width: 100%; text-align: left;
    background: none; border: 0; border-bottom: 1px solid var(--border);
    padding: 15px 4px; color: var(--text); font-size: 1rem; font-weight: 500;
}
.menu-item:last-child, .menu-list form:last-child .menu-item { border-bottom: 0; }
.menu-item:active { background: var(--card-2); }
.menu-item .ico { color: var(--muted); }
.menu-item.danger .ico { color: var(--danger); }
.menu-note { margin-left: auto; color: var(--muted); font-size: .85rem; font-weight: 400; }

/* ---- Share -------------------------------------------------- */
.share-add { display: flex; gap: 8px; margin-bottom: 16px; }
.share-add input { flex: 1; border: 1px solid var(--border); background: var(--card); color: var(--text); border-radius: 11px; padding: 12px 14px; font-size: 1rem; }
.members { display: flex; flex-direction: column; gap: 2px; }
.member-row { display: flex; align-items: center; gap: 11px; padding: 10px 2px; border-bottom: 1px solid var(--border); }
.member-row:last-child { border-bottom: 0; }
.member-row .avatar-sm { background: var(--accent); color: #fff; }
.m-name { flex: 1; min-width: 0; font-weight: 600; display: flex; flex-direction: column; }
.m-name em { font-style: normal; font-weight: 400; font-size: .8rem; color: var(--muted); }
.m-role { color: var(--muted); font-size: .8rem; }
.m-remove { margin: 0; }
.share-link-block { margin-top: 20px; border-top: 1px solid var(--border); padding-top: 16px; }
.share-h { font-size: .95rem; margin-bottom: 4px; }
.link-row { display: flex; gap: 8px; margin: 10px 0; }
.link-row input { flex: 1; font-size: .85rem; color: var(--muted); }
.copy-link { flex: none; width: 50px; padding: 0; }

/* ---- Auth --------------------------------------------------- */
.auth-body .wrap { max-width: 420px; padding-top: 8vh; }
.auth-card { }
.auth-logo { display: flex; flex-direction: column; align-items: center; gap: 8px; color: var(--accent); font-weight: 800; font-size: 1.5rem; margin-bottom: 6px; }
.auth-sub { text-align: center; color: var(--muted); margin: 0 0 22px; }
.auth-alt { text-align: center; color: var(--muted); margin-top: 20px; }
.auth-invite {
    background: color-mix(in srgb, var(--accent) 12%, var(--card));
    border: 1px solid color-mix(in srgb, var(--accent) 30%, var(--border));
    color: var(--text);
    border-radius: 11px; padding: 11px 14px; font-size: .9rem; margin-bottom: 18px; text-align: center;
}
.verify-emoji { text-align: center; font-size: 3rem; margin: 4px 0 6px; }
.avatar-sm.pending { background: var(--card-2); color: var(--muted); border: 1px dashed var(--border); }
.invite-row .m-name em { color: var(--accent); }

/* ---- Account ------------------------------------------------ */
.account { display: flex; flex-direction: column; gap: 18px; }
.account-head { display: flex; align-items: center; gap: 14px; }
.avatar-lg { width: 58px; height: 58px; border-radius: 50%; background: var(--accent); color: #fff; display: flex; align-items: center; justify-content: center; font-size: 1.6rem; font-weight: 800; }
.acc-name { font-size: 1.25rem; font-weight: 700; }
.acc-handle { color: var(--muted); }
.acc-field { display: flex; justify-content: space-between; padding: 12px 0; border-bottom: 1px solid var(--border); }
.acc-field span { color: var(--muted); }
.card-form { background: var(--card); border: 1px solid var(--border); border-radius: var(--radius); padding: 16px; box-shadow: var(--shadow); }
.card-form h3 { font-size: 1rem; display: flex; align-items: center; gap: 7px; }
.card-form h3 .ico { color: var(--accent); }
.partners-card .hint { margin: 6px 0 12px; }
.partners-card .share-add { margin-bottom: 10px; }
.check-row { display: flex; align-items: center; gap: 10px; font-size: .9rem; color: var(--text); }
.check-row input { width: 20px; height: 20px; accent-color: var(--accent); flex: none; }
.partner-group { margin-top: 14px; border-top: 1px solid var(--border); padding-top: 10px; }
.partner-group h4 { font-size: .8rem; text-transform: uppercase; letter-spacing: .04em; color: var(--muted); margin: 0 0 6px; }
.partner-group .member-row { gap: 9px; }
.partner-group .member-row form { margin: 0; }
.logout-form { margin-top: 4px; }

/* Larger screens: cap width, still phone-styled */
@media (min-width: 760px) {
    .add-bar { max-width: 720px; left: 50%; transform: translateX(-50%); border-radius: 16px 16px 0 0; }
}

/* ============================================================
   Logo
   ============================================================ */
.logo-mark { display: block; flex: none; }
.logo-lockup { display: inline-flex; align-items: center; gap: 9px; font-weight: 800; letter-spacing: -.01em; }
.logo-word { font-size: 1.25em; color: var(--text); }

/* ============================================================
   Marketing landing page
   ============================================================ */
body.landing { background: var(--bg); }

.lp-nav {
    position: sticky; top: 0; z-index: 40;
    background: color-mix(in srgb, var(--bg) 88%, transparent);
    backdrop-filter: saturate(1.4) blur(10px);
    border-bottom: 1px solid var(--border);
    padding-top: var(--safe-top);
}
.lp-nav-in { max-width: 1080px; margin: 0 auto; height: 62px; display: flex; align-items: center; justify-content: space-between; padding: 0 18px; }
.lp-brand { color: var(--text); }
.lp-brand .logo-word { font-size: 1.15rem; }
.lp-nav-links { display: flex; align-items: center; gap: 14px; }
.lp-link { color: var(--text); font-weight: 600; font-size: .95rem; }

.lp { max-width: 1080px; margin: 0 auto; padding: 0 18px; }

/* Hero */
.lp-hero { padding: clamp(32px, 7vw, 80px) 0 24px; }
.lp-hero-in { display: grid; grid-template-columns: 1fr; gap: 40px; align-items: center; }
.lp-eyebrow {
    display: inline-block; font-size: .82rem; font-weight: 700; color: var(--accent);
    background: color-mix(in srgb, var(--accent) 13%, var(--card)); border-radius: 999px; padding: 5px 12px; margin-bottom: 16px;
}
.lp-h1 { font-size: clamp(2rem, 6vw, 3.3rem); line-height: 1.08; letter-spacing: -.02em; font-weight: 850; margin: 0 0 16px; }
.lp-lead { font-size: clamp(1rem, 2.4vw, 1.2rem); color: var(--muted); max-width: 34ch; margin: 0 0 26px; }
.lp-cta-row { display: flex; flex-wrap: wrap; gap: 12px; }
.lp-trust { margin-top: 18px; font-size: .85rem; color: var(--muted); }

.btn-lg { padding: 15px 24px; font-size: 1.02rem; border-radius: 13px; }
.btn-ghost { background: transparent; }
.btn-primary.btn-lg { box-shadow: 0 8px 22px color-mix(in srgb, var(--accent) 40%, transparent); }

/* Phone mock */
.lp-hero-art { display: flex; justify-content: center; }
.phone {
    position: relative; width: 260px; max-width: 78vw;
    background: #0c0e12; border-radius: 34px; padding: 12px;
    box-shadow: var(--shadow-lg), 0 0 0 2px rgba(0,0,0,.06);
}
.phone-notch { position: absolute; top: 14px; left: 50%; transform: translateX(-50%); width: 90px; height: 18px; background: #0c0e12; border-radius: 0 0 12px 12px; z-index: 2; }
.phone-screen { background: var(--bg); border-radius: 24px; overflow: hidden; height: 480px; display: flex; flex-direction: column; }
.pm-bar { background: var(--accent); color: #fff; font-weight: 700; padding: 22px 16px 12px; font-size: .95rem; }
.pm-body { flex: 1; overflow: hidden; padding: 10px 12px; display: flex; flex-direction: column; gap: 7px; }
.pm-aisle { font-size: .62rem; font-weight: 800; letter-spacing: .05em; text-transform: uppercase; color: var(--muted); margin-top: 8px; }
.pm-item { display: flex; align-items: center; gap: 10px; background: var(--card); border: 1px solid var(--border); border-radius: 10px; padding: 9px 10px; font-size: .82rem; box-shadow: var(--shadow); }
.pm-chk { width: 17px; height: 17px; border-radius: 50%; border: 2px solid var(--border); display: inline-flex; align-items: center; justify-content: center; font-size: .6rem; color: #fff; flex: none; }
.pm-done { opacity: .55; }
.pm-done .pm-chk { background: var(--accent); border-color: var(--accent); }
.pm-done .pm-name { text-decoration: line-through; }
.pm-add { margin: 0 12px 14px; display: flex; align-items: center; justify-content: space-between; background: var(--card); border: 1px solid var(--border); border-radius: 11px; padding: 11px 12px; color: var(--muted); font-size: .82rem; }
.pm-plus { width: 22px; height: 22px; border-radius: 7px; background: var(--accent); color: #fff; display: inline-flex; align-items: center; justify-content: center; font-weight: 700; }

/* Sections */
.lp-section { padding: clamp(36px, 7vw, 68px) 0; }
.lp-h2 { font-size: clamp(1.5rem, 4vw, 2.1rem); letter-spacing: -.02em; text-align: center; margin: 0 0 36px; }
.lp-feature-grid { display: grid; grid-template-columns: 1fr; gap: 16px; }
.lp-feature { background: var(--card); border: 1px solid var(--border); border-radius: 16px; padding: 22px; box-shadow: var(--shadow); }
.lp-feat-ico { font-size: 1.8rem; margin-bottom: 10px; }
.lp-feature h3 { font-size: 1.08rem; margin-bottom: 6px; }
.lp-feature p { margin: 0; color: var(--muted); font-size: .93rem; }

.lp-how { }
.lp-steps { display: grid; grid-template-columns: 1fr; gap: 18px; max-width: 560px; margin: 0 auto; }
.lp-step { display: flex; gap: 16px; align-items: flex-start; }
.lp-step-n { flex: none; width: 38px; height: 38px; border-radius: 50%; background: var(--accent); color: #fff; font-weight: 800; display: flex; align-items: center; justify-content: center; }
.lp-step h3 { font-size: 1.05rem; margin-bottom: 3px; }
.lp-step p { margin: 0; color: var(--muted); font-size: .93rem; }

/* Final CTA */
.lp-final { margin: 20px 0 48px; }
.lp-final-in { background: linear-gradient(135deg, var(--accent), color-mix(in srgb, var(--accent) 55%, #0ea5e9)); color: #fff; border-radius: 22px; padding: clamp(32px, 6vw, 56px) 24px; text-align: center; }
.lp-final-in h2 { font-size: clamp(1.4rem, 4vw, 2rem); margin-bottom: 8px; }
.lp-final-in p { margin: 0 0 22px; opacity: .92; }
.lp-final-btn { background: #fff; color: var(--accent); border: 0; font-weight: 700; }

/* FAQ */
.lp-faq-list { max-width: 680px; margin: 0 auto; display: flex; flex-direction: column; gap: 10px; }
.lp-faq-item { background: var(--card); border: 1px solid var(--border); border-radius: 14px; box-shadow: var(--shadow); overflow: hidden; }
.lp-faq-item summary { list-style: none; cursor: pointer; padding: 16px 18px; font-weight: 700; font-size: 1rem; display: flex; align-items: center; justify-content: space-between; gap: 12px; }
.lp-faq-item summary::-webkit-details-marker { display: none; }
.lp-faq-item summary::after { content: "+"; color: var(--accent); font-size: 1.4rem; font-weight: 800; line-height: 1; transition: transform .2s; }
.lp-faq-item[open] summary::after { transform: rotate(45deg); }
.lp-faq-item p { margin: 0; padding: 0 18px 18px; color: var(--muted); font-size: .95rem; line-height: 1.6; }

/* Contact */
.lp-contact-head { text-align: center; padding-bottom: 12px; }
.lp-contact-h1 { font-size: clamp(1.8rem, 5vw, 2.6rem); margin-bottom: 12px; }
.lp-contact-head .lp-lead { margin: 0 auto; max-width: 46ch; }
.lp-contact-grid { display: grid; grid-template-columns: 1fr; gap: 22px; max-width: 720px; margin: 0 auto; padding-top: 12px; }
.lp-contact-cards { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.lp-contact-card { display: flex; flex-direction: column; gap: 3px; background: var(--card); border: 1px solid var(--border); border-radius: 14px; box-shadow: var(--shadow); padding: 16px; color: var(--text); }
.lp-contact-card:active { background: var(--card-2); }
.lp-contact-ico { font-size: 1.5rem; }
.lp-contact-k { font-size: .78rem; text-transform: uppercase; letter-spacing: .04em; color: var(--muted); font-weight: 700; }
.lp-contact-v { font-weight: 700; color: var(--accent); word-break: break-all; }
.lp-contact-form { background: var(--card); border: 1px solid var(--border); border-radius: 16px; box-shadow: var(--shadow); padding: 20px; }
.lp-contact-form textarea { width: 100%; background: var(--card-2); color: var(--text); border: 1px solid var(--border); border-radius: 11px; padding: 11px 13px; font: inherit; resize: vertical; }
.lp-contact-form textarea:focus { outline: none; border-color: var(--accent); box-shadow: 0 0 0 3px color-mix(in srgb, var(--accent) 22%, transparent); }
.lp-hp { position: absolute; left: -9999px; width: 1px; height: 1px; overflow: hidden; }
.lp-flash { max-width: 720px; margin: 0 auto 4px; padding: 12px 16px; border-radius: 12px; font-size: .93rem; background: var(--card); border: 1px solid var(--border); border-left: 4px solid var(--muted); color: var(--text); }
.lp-flash-success { border-left-color: var(--accent); }
.lp-flash-error { border-left-color: #dc2626; }

/* Legal (privacy) */
.lp-legal { max-width: 760px; }
.lp-legal-h1 { font-size: clamp(1.8rem, 5vw, 2.4rem); margin-bottom: 6px; }
.lp-updated { color: var(--muted); font-size: .85rem; margin: 0 0 24px; }
.lp-legal-block { margin-bottom: 22px; }
.lp-legal-block h2 { font-size: 1.15rem; margin: 0 0 8px; }
.lp-legal-block p, .lp-legal-block li { color: var(--muted); font-size: .95rem; line-height: 1.65; }
.lp-legal-block ul { margin: 0; padding-left: 1.1rem; }
.lp-legal-block li { margin-bottom: 6px; }
.lp-legal-block a { color: var(--accent); }

/* Footer */
.lp-foot { border-top: 1px solid var(--border); padding: 26px 18px calc(26px + var(--safe-bottom)); }
.lp-foot-in { max-width: 1080px; margin: 0 auto; display: flex; flex-wrap: wrap; gap: 12px 20px; align-items: center; justify-content: space-between; }
.lp-foot .logo-word { font-size: 1rem; }
.lp-foot-links { display: flex; flex-wrap: wrap; gap: 16px; }
.lp-foot-links a { color: var(--muted); font-weight: 600; font-size: .9rem; }
.lp-foot-links a:hover { color: var(--accent); }
.lp-foot-copy { color: var(--muted); font-size: .85rem; }

@media (min-width: 820px) {
    .lp-hero-in { grid-template-columns: 1.05fr .95fr; }
    .lp-feature-grid { grid-template-columns: repeat(4, 1fr); }
    .lp-steps { grid-template-columns: repeat(3, 1fr); max-width: none; }
    .lp-step { flex-direction: column; text-align: center; align-items: center; }
}
@media (min-width: 560px) and (max-width: 819px) {
    .lp-feature-grid { grid-template-columns: repeat(2, 1fr); }
}

/* ============================================================
   Admin dashboard
   ============================================================ */
.admin-link { display: flex; align-items: center; gap: 10px; background: var(--card); border: 1px solid var(--border); border-radius: 14px; padding: 14px; margin: 6px 0 18px; color: var(--text); font-weight: 700; box-shadow: var(--shadow); }
.admin-link svg:last-child { margin-left: auto; color: var(--muted); }
.admin-link:active { background: var(--card-2); }

.admin-sec { margin-bottom: 24px; }
.admin-h { font-size: 1.05rem; margin: 0 0 10px; }
.admin-note { color: var(--muted); font-size: .88rem; margin: 0 0 12px; }
.admin-empty { color: var(--muted); background: var(--card); border: 1px solid var(--border); border-radius: 14px; padding: 16px; }

.admin-stats { display: grid; grid-template-columns: repeat(2, 1fr); gap: 10px; }
.stat { background: var(--card); border: 1px solid var(--border); border-radius: 14px; padding: 14px; box-shadow: var(--shadow); }
.stat-n { font-size: 1.7rem; font-weight: 800; line-height: 1; }
.stat-l { font-weight: 600; font-size: .9rem; margin-top: 5px; }
.stat-sub { color: var(--muted); font-size: .78rem; margin-top: 2px; }
.stat-warn .stat-n { color: #d97706; }

.admin-card { background: var(--card); border: 1px solid var(--border); border-radius: 14px; padding: 16px; box-shadow: var(--shadow); }
.info-list .info-row:last-child { border-bottom: 0; padding-bottom: 0; }
.info-row { display: flex; justify-content: space-between; gap: 12px; padding: 8px 0; border-bottom: 1px solid var(--border); font-size: .92rem; }
.info-row span { color: var(--muted); }
.info-row strong { text-align: right; word-break: break-word; }

.u-list { display: flex; flex-direction: column; gap: 10px; }
.u-card { background: var(--card); border: 1px solid var(--border); border-radius: 14px; padding: 12px 14px; box-shadow: var(--shadow); display: flex; flex-wrap: wrap; gap: 10px; align-items: center; justify-content: space-between; }
.u-card.pending { border-left: 4px solid #d97706; }
.u-card.is-self { border-left: 4px solid var(--accent); }
.u-main { min-width: 0; flex: 1 1 60%; }
.u-name { font-weight: 700; }
.u-handle { color: var(--muted); font-weight: 500; font-size: .9rem; }
.u-you { font-size: .68rem; background: var(--card-2); color: var(--muted); border-radius: 999px; padding: 1px 7px; margin-left: 4px; }
.u-meta { color: var(--muted); font-size: .85rem; word-break: break-word; }
.u-dim { opacity: .85; font-size: .8rem; }
.u-badges { display: flex; gap: 5px; margin-top: 5px; flex-wrap: wrap; }
.b { font-size: .68rem; font-weight: 700; padding: 2px 7px; border-radius: 999px; text-transform: uppercase; letter-spacing: .03em; }
.b-ok { background: color-mix(in srgb, var(--accent) 15%, var(--card)); color: var(--accent); }
.b-warn { background: #fef3c7; color: #b45309; }
.b-admin { background: #e0e7ff; color: #4338ca; }
.b-off { background: var(--card-2); color: var(--muted); }
.u-actions { display: flex; gap: 6px; flex-wrap: wrap; }
.u-actions form { margin: 0; }

.log-head { display: flex; flex-wrap: wrap; gap: 10px; align-items: center; justify-content: space-between; margin-bottom: 10px; }
.log-actions { display: flex; gap: 8px; }
.log-actions form { margin: 0; }
.logbox { background: #0f1115; color: #e8eaed; border: 1px solid var(--border); border-radius: 12px; padding: 12px 14px; font: 12px/1.55 ui-monospace, SFMono-Regular, Menlo, Consolas, monospace; white-space: pre-wrap; word-break: break-word; overflow: auto; max-height: 68vh; }
