:root {
    --paper: #f5f5f4;
    --ink: #161616;
    --muted: #5e5e5e;
    --line: #e3e3e0;
    --card: #ffffff;
    --accent: #5c2d86;
    --on-accent: #ffffff;
    --wa-deep: #075e54;
    --wa-chat: #efeae2;
    --wa-bubble: #d9fdd3;
}

* { box-sizing: border-box; }

html { scroll-behavior: smooth; }

body {
    margin: 0;
    color: var(--ink);
    background: var(--paper);
    font-family: "Segoe UI", "Helvetica Neue", Arial, sans-serif;
    line-height: 1.5;
}

a { color: inherit; }

.bar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
    padding: 1rem 6vw;
    border-bottom: 1px solid var(--line);
    background: rgba(245, 245, 244, 0.92);
}

.brand {
    display: inline-flex;
    align-items: center;
    color: var(--wa-deep);
    text-decoration: none;
}

.brand-mark {
    display: block;
    height: 52px;
    width: auto;
}

.logo-entrada {
    display: block;
    width: min(180px, 60vw);
    height: auto;
    margin: 1.4rem 0 0.2rem;
}

.nav {
    display: flex;
    flex-wrap: wrap;
    gap: 0.75rem 1.15rem;
    align-items: center;
    margin-left: auto;
}

.nav a {
    color: var(--ink);
    text-decoration: none;
    font-size: 0.92rem;
}

.nav a.nav-here {
    color: var(--accent);
    font-weight: 700;
}

.nav-go, .btn, .install, .row button {
    font: inherit;
    text-decoration: none;
    border-radius: 6px;
    cursor: pointer;
}

.nav-go, .btn {
    display: inline-block;
    background: var(--accent);
    color: var(--on-accent) !important;
    padding: 0.55rem 0.85rem;
    font-size: 0.92rem;
    font-weight: 600;
}

.btn { padding: 0.75rem 1rem; border: 0; }

.btn.ghost {
    background: transparent;
    color: var(--ink) !important;
    border: 1px solid #c8c8c4;
}

.install {
    border: 1px solid #c8c8c4;
    background: transparent;
    color: var(--ink);
    padding: 0.5rem 0.8rem;
}

main { padding: 0 6vw 4.5rem; }

.hero {
    display: grid;
    grid-template-columns: minmax(0, 1.15fr) minmax(18rem, 0.85fr);
    gap: 4rem;
    align-items: center;
    padding: 3.2rem 0 3.6rem;
}

.hero-copy { min-width: 0; }

.kicker {
    margin: 0 0 0.75rem;
    color: var(--muted);
    font-size: 0.78rem;
    font-weight: 600;
    letter-spacing: 0.08em;
    text-transform: uppercase;
}

h1, h2 {
    font-weight: 600;
    letter-spacing: -0.03em;
    line-height: 1.15;
}

h1 { font-size: clamp(2.2rem, 4.4vw, 3.5rem); margin: 0 0 1rem; max-width: 16ch; }

h2 { font-size: clamp(1.45rem, 2.4vw, 2rem); margin: 0 0 0.75rem; }

.lead { font-size: 1.05rem; color: var(--muted); max-width: 38rem; }

.price {
    font-size: 1.35rem;
    font-weight: 600;
    margin: 0.2rem 0 1rem;
}

.form {
    display: grid;
    gap: 0.75rem;
    max-width: 28rem;
    margin-top: 1.2rem;
}

.form label {
    display: grid;
    gap: 0.25rem;
    font-size: 0.82rem;
    color: var(--muted);
}

.form input, .form textarea, .note-edit input, .note-edit textarea, .keep-row input, .search input, .share input {
    font: inherit;
    color: var(--ink);
    background: #fff;
    border: 1px solid var(--line);
    border-radius: 6px;
    padding: 0.65rem 0.7rem;
    width: 100%;
}

.form .btn, .admin form .btn { margin-top: 0.35rem; }
.admin form + form { margin-top: 0.6rem; }

.warn {
    background: var(--card);
    border: 1px solid var(--line);
    border-left: 3px solid var(--ink);
    padding: 0.75rem 0.9rem;
    max-width: 36rem;
}

.qr-live {
    width: 8.5rem;
    height: 8.5rem;
    object-fit: contain;
    background: #fff;
    display: block;
}

.qr-box.has-code { padding: 0; }
.qr-box.has-code:after { content: none; }

.actions { display: flex; flex-wrap: wrap; gap: 0.7rem 1.1rem; align-items: center; margin-top: 1.5rem; }

.actions .text-link { color: var(--accent); font-weight: 600; text-decoration: none; }

.phone {
    width: min(100%, 22.5rem);
    margin-left: auto;
    border: 1px solid #d7d1c8;
    border-radius: 16px;
    overflow: hidden;
    background: var(--wa-chat);
}

.wa-top {
    display: flex;
    align-items: center;
    gap: 0.7rem;
    padding: 0.75rem 0.9rem;
    background: var(--wa-deep);
    color: #fff;
}

.wa-avatar {
    width: 2.2rem;
    height: 2.2rem;
    border-radius: 50%;
    display: grid;
    place-items: center;
    background: #25d366;
    font-weight: 600;
}

.wa-top strong, .wa-top small { display: block; }
.wa-top small { opacity: 0.85; font-size: 0.75rem; }

.wa-chat {
    display: grid;
    gap: 0.45rem;
    padding: 0.8rem;
}

.bubble {
    justify-self: end;
    max-width: 94%;
    background: var(--wa-bubble);
    border-radius: 8px 8px 2px 8px;
    padding: 0.45rem 0.55rem;
    font-size: 0.88rem;
}

.bubble strong, .bubble > span:not(.voice) { display: block; }

.bubble.audio {
    display: flex;
    align-items: center;
    gap: 0.45rem;
    min-width: 8.5rem;
}

.bubble .voice { display: inline-flex; }

.bubble small, .preview small { color: #3d6b4f; }

.preview {
    display: grid;
    grid-template-columns: 4.4rem 1fr;
    gap: 0.45rem;
    align-items: center;
    color: inherit;
    text-decoration: none;
}

.preview img {
    width: 4.4rem;
    height: 3.3rem;
    object-fit: cover;
    border-radius: 4px;
    background: #111;
}

.preview strong { font-size: 0.82rem; line-height: 1.3; }

.voice {
    display: inline-flex;
    align-items: end;
    gap: 2px;
    height: 1.35rem;
}

.voice i {
    display: block;
    width: 3px;
    border-radius: 2px;
    background: var(--wa-deep);
}

.voice i:nth-child(1), .voice i:nth-child(5) { height: 0.4rem; }
.voice i:nth-child(2), .voice i:nth-child(6) { height: 0.8rem; }
.voice i:nth-child(3), .voice i:nth-child(7) { height: 1.15rem; }
.voice i:nth-child(4), .voice i:nth-child(8) { height: 0.65rem; }

.dur { margin-left: 0.35rem; }

.bubble.video {
    display: flex;
    align-items: center;
    gap: 0.55rem;
    min-width: 8.5rem;
    min-height: 3rem;
    background: #111;
    color: #fff;
}

.play {
    width: 0;
    height: 0;
    border-style: solid;
    border-width: 7px 0 7px 12px;
    border-color: transparent transparent transparent var(--wa-deep);
}

.bubble.video .play { border-left-color: #fff; }
.bubble.video small { color: #ddd; }

.dots { letter-spacing: 0.16em; font-weight: 600; }

.samples { border-top: 1px solid var(--line); padding: 2.6rem 0; }

.vault { margin-top: 1.8rem; }

.vault-list {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 0.75rem;
}

.vault article {
    background: var(--card);
    border: 1px solid var(--line);
    border-left: 3px solid var(--wa-deep);
    border-radius: 8px;
    padding: 0.9rem 1rem;
}

.vault article p { margin: 0.35rem 0 0; color: var(--muted); }

.card .src, .vault .src {
    margin: 0.75rem 0.9rem 0;
    font-size: 0.72rem;
    font-weight: 600;
    letter-spacing: 0.06em;
    text-transform: uppercase;
    color: var(--muted);
}

.card .src {
    display: flex;
    align-items: center;
    gap: 0.4rem;
}

.src .mark {
    width: 1rem;
    height: 1rem;
    flex: none;
    display: block;
}

.vault .src { margin: 0 0 0.2rem; }

.cover.marca {
    display: grid;
    place-items: center;
    color: #fff;
    text-decoration: none;
    font-weight: 600;
}

.tipo-link .cover.marca { background: #ececeb; }

.cover.marca .mark { width: 2.75rem; height: 2.75rem; }
.cover.audio { background: var(--wa-deep); }
.cover.video { background: #1a1a1a; }
.cover.nota { background: #3a332c; }
.cover .voice i, .cover .dur { background: transparent; color: #fff; }
.cover .voice i { background: #fff; }
.cover.audio, .cover.video {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.7rem;
}

img.cover {
    width: 100%;
    display: block;
    object-fit: cover;
}

.stage { min-width: 0; }

.hero-art {
    display: block;
    width: min(100%, 520px);
    height: auto;
    margin-left: auto;
}

.sheet {
    background: var(--card);
    border: 1px solid var(--line);
    border-radius: 10px;
    overflow: hidden;
}

.sheet-top {
    display: flex;
    justify-content: space-between;
    margin: 0;
    padding: 0.75rem 1rem;
    border-bottom: 1px solid var(--line);
    color: var(--muted);
    font-size: 0.75rem;
    letter-spacing: 0.06em;
    text-transform: uppercase;
}

.sheet article {
    display: grid;
    grid-template-columns: 4.5rem 1fr;
    gap: 0.85rem;
    align-items: center;
    padding: 0.85rem 1rem;
    border-top: 1px solid var(--line);
}

.sheet article:first-of-type { border-top: 0; }

.sheet strong { display: block; font-size: 0.98rem; }

.sheet article span, .quiet { color: var(--muted); }

.swatch, .cover, .thumb {
    background: #1e3a32;
}

.swatch { height: 3.2rem; border-radius: 4px; }

.swatch.b, .cover.b, .thumb.b { background: #3a332c; }

.swatch.c, .cover.c { background: #2a3344; }

.path, .tools, .close, .panel {
    border-top: 1px solid var(--line);
    padding: 2.6rem 0;
}

.path ol {
    list-style: none;
    counter-reset: step;
    margin: 1.5rem 0 0;
    padding: 0;
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 1rem;
}

.path li {
    margin: 0;
    counter-increment: step;
    background: #fff;
    border: 1px solid var(--line);
    border-radius: 14px;
    padding: 1.15rem 1.15rem 1.3rem;
}

.path li::before {
    content: counter(step);
    display: flex;
    align-items: center;
    justify-content: center;
    width: 2rem;
    height: 2rem;
    margin-bottom: 0.85rem;
    border-radius: 999px;
    background: var(--accent);
    color: #fff;
    font-size: 0.92rem;
    font-weight: 600;
    letter-spacing: 0;
}

.path strong { display: block; font-size: 1.05rem; }

.path span { display: block; margin-top: 0.3rem; color: var(--muted); }

.seguro {
    border-top: 1px solid var(--line);
    padding: 2.6rem 0;
}

.seguro .lead { max-width: 36rem; }

.seguro ul {
    list-style: none;
    margin: 1.5rem 0 0;
    padding: 0;
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 1rem;
}

.seguro li {
    margin: 0;
    background: #fff;
    border: 1px solid var(--line);
    border-radius: 14px;
    padding: 1.15rem 1.15rem 1.3rem;
}

.seguro strong { display: block; font-size: 1.05rem; }

.seguro span { display: block; margin-top: 0.3rem; color: var(--muted); }

.tools {
    display: grid;
    grid-template-columns: minmax(0, 0.9fr) minmax(0, 1.1fr);
    gap: 3rem;
    align-items: start;
}

.tool-list {
    margin: 0;
    padding: 0;
    list-style: none;
}

.tool-list li {
    padding: 0.8rem 0;
    border-bottom: 1px solid var(--line);
}

.admin h1 { font-size: clamp(2rem, 4vw, 3rem); max-width: none; }

.admin .panel { padding: 1.45rem 0 1.55rem; }

.admin .page-go {
    margin-top: 1.15rem;
    padding: 1.15rem 1.2rem 1.3rem;
    background: #fff;
    border: 1px solid var(--line);
    border-radius: 14px;
}

.admin .page-go h2 { margin: 0; }

.admin .page-go .url { margin: 0.35rem 0 0.95rem; }

.admin .page-go .btn { padding: 0.85rem 1.3rem; font-size: 1rem; }

.panel h2 { font-size: 1.35rem; }

.qr {
    display: grid;
    grid-template-columns: 8.5rem 1fr;
    gap: 1.25rem;
    align-items: center;
}

.qr-box {
    width: 8.5rem;
    height: 8.5rem;
    border: 1px solid var(--line);
    border-radius: 8px;
    background: var(--card);
    display: grid;
    place-items: center;
    color: var(--muted);
    font-size: 0.75rem;
    letter-spacing: 0.14em;
}

.qr-box:after { content: "QR"; }
.qr-box.is-on:after { content: "Ligado"; }

.url {
    font-size: 1.15rem;
    margin: 0.35rem 0 1rem;
    overflow-wrap: anywhere;
}

.rows { display: grid; gap: 0.75rem; }

.row {
    display: grid;
    grid-template-columns: 6.5rem 1fr;
    gap: 1rem;
    background: var(--card);
    border: 1px solid var(--line);
    border-radius: 8px;
    padding: 0.75rem;
}

.thumb { border-radius: 4px; min-height: 5.2rem; }

.row form { display: grid; gap: 0.45rem; }

.row label { display: grid; gap: 0.2rem; font-size: 0.78rem; color: var(--muted); }

.row input, .row button {
    width: 100%;
    min-width: 0;
    border-radius: 6px;
    border: 1px solid var(--line);
    padding: 0.45rem 0.6rem;
    background: #fff;
    color: var(--ink);
}

.row button {
    width: auto;
    justify-self: start;
    background: var(--accent);
    color: var(--on-accent);
    border-color: var(--accent);
}

.grid {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 1rem;
    margin-top: 1.6rem;
}

.card {
    background: var(--card);
    border: 1px solid var(--line);
    border-radius: 8px;
    overflow: hidden;
}

.cover { height: 8.5rem; }

.card h2, .card p, .card .open { margin-left: 0.9rem; margin-right: 0.9rem; }

.card h2 { font-size: 1.15rem; margin-top: 0.85rem; margin-bottom: 0.25rem; }

.meta { color: var(--muted); font-size: 0.82rem; margin: 0; }

.open {
    display: inline-block;
    margin-bottom: 1rem;
    font-weight: 600;
    font-size: 0.92rem;
}

.foot {
    padding: 1.1rem 6vw calc(1.6rem + env(safe-area-inset-bottom));
    border-top: 1px solid var(--line);
    color: var(--muted);
    font-size: 0.88rem;
}

.foot p { margin: 0.2rem 0; }

.ios-install { max-width: 36rem; }

[hidden] { display: none !important; }

.page h1 { max-width: none; font-size: clamp(1.45rem, 2vw, 1.9rem); margin: 0; }

.page-head { margin: 0.85rem 0 0.15rem; }

.page-head .kicker { margin: 0 0 0.1rem; }

.page-head .lead { margin: 0.3rem 0 0; }

.dono {
    margin: 1rem 0 1.4rem;
    padding: 1.1rem 1.15rem 1.2rem;
    background: #fff;
    border: 1px solid var(--line);
    border-radius: 14px;
}

.dono h2 { margin: 0 0 0.35rem; font-size: 1.15rem; }

.dono p { margin: 0.35rem 0 0; }

.dono ol { margin: 0.7rem 0 0.2rem; padding-left: 1.2rem; }

.dono li { margin: 0.25rem 0; }

.dono .btn { margin-top: 0.85rem; }

.espera-acoes { display: flex; flex-wrap: wrap; gap: 0.5rem; margin-top: 0.95rem; }

.espera-acoes .btn { margin-top: 0; }

.shelf {
    display: flex;
    flex-wrap: wrap;
    gap: 0.55rem;
    align-items: center;
    position: sticky;
    top: 0;
    z-index: 3;
    background: var(--paper);
    padding: 0.55rem 0;
}

.shelf .search { position: static; flex: 1 1 16rem; min-width: 0; margin: 0; padding: 0; background: transparent; }

.shelf-actions { display: flex; flex-wrap: wrap; gap: 0.45rem; align-items: center; }

.note-form { margin: 0.2rem 0 0.8rem; }

.note-fields {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 0.15rem 1rem;
}

.note-fields .wide { grid-column: 1 / -1; }

.note-form .btn { margin-top: 0.75rem; }

.note-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(240px, 1fr));
    gap: 0.85rem;
    margin-top: 0.35rem;
}

.note-one { grid-template-columns: minmax(0, 42rem); }

.note-card {
    display: flex;
    flex-direction: column;
    min-width: 0;
    position: relative;
    background: var(--card);
    border: 1px solid var(--line);
    border-radius: 12px;
    padding: 0.85rem;
}

.note-card.is-picked { border-color: #8c2f2f; }

.tick {
    position: absolute;
    top: 0.45rem;
    left: 0.45rem;
    z-index: 2;
    display: flex;
    align-items: center;
    gap: 0.28rem;
    margin: 0;
    padding: 0.18rem 0.5rem 0.18rem 0.28rem;
    border-radius: 999px;
    background: #fff;
    color: var(--ink);
    font-size: 0.78rem;
    font-weight: 700;
    box-shadow: 0 1px 4px rgba(0, 0, 0, 0.16);
}

.tick input { width: 1rem; height: 1rem; margin: 0; }

.section-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 0.75rem;
    margin: 1.5rem 0 0.2rem;
}

.section-head h2 { margin: 0; }

.section-head .btn { padding: 0.45rem 0.75rem; }

.purge-bar {
    position: fixed;
    left: 50%;
    bottom: max(0.85rem, env(safe-area-inset-bottom));
    transform: translateX(-50%);
    z-index: 25;
    display: flex;
    align-items: center;
    gap: 0.7rem;
    width: max-content;
    max-width: calc(100% - 1.4rem);
    padding: 0.45rem 0.5rem 0.45rem 0.9rem;
    border: 1px solid var(--line);
    border-radius: 999px;
    background: var(--card);
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.16);
}

.purge-bar span { font-weight: 700; font-size: 0.92rem; }

.purge-bar .btn { margin: 0; padding: 0.55rem 0.85rem; }

.note-card h3 {
    margin: 0 0 0.35rem;
    font-size: 1.05rem;
    line-height: 1.35;
    letter-spacing: 0;
    display: -webkit-box;
    -webkit-box-orient: vertical;
    -webkit-line-clamp: 3;
    overflow: hidden;
}

.note-card h3 a { color: inherit; text-decoration: none; }

.note-cover, .note-fallback { display: block; border-radius: 10px; overflow: hidden; margin: 0 0 0.7rem; }

.note-cover { background: var(--wa-deep); position: relative; }

.note-cover img { width: 100%; height: 180px; object-fit: cover; display: block; }

button.note-cover { width: 100%; border: 0; padding: 0; cursor: pointer; position: relative; font: inherit; color: inherit; }
.show-count { position: absolute; right: 0.55rem; bottom: 0.55rem; background: rgba(0,0,0,.62); color: #fff; border-radius: 999px; padding: 0.2rem 0.55rem; font-size: 0.82rem; }
.show { position: fixed; inset: 0; z-index: 40; background: rgba(12,18,17,.94); display: flex; flex-direction: column; align-items: center; justify-content: flex-end; gap: 0.75rem; padding: 0.75rem 0.75rem max(0.85rem, env(safe-area-inset-bottom)); overflow: hidden; }
.show[hidden] { display: none; }
.show img { order: 1; width: auto; max-width: min(100%, 960px); max-height: calc(100dvh - 5.75rem); flex: 1 1 auto; min-height: 0; object-fit: contain; border-radius: 8px; background: #111; cursor: pointer; }
.show-bar { order: 2; display: flex; flex-wrap: nowrap; gap: 0.35rem; align-items: center; justify-content: center; color: #fff; width: 100%; max-width: 640px; flex: 0 0 auto; background: #1c2422; border-radius: 12px; padding: 0.35rem; box-sizing: border-box; }
.show-bar .btn { flex: 1 1 0; min-width: 0; padding: 0.5rem 0.35rem; font-size: clamp(0.75rem, 2.8vw, 0.92rem); text-align: center; white-space: nowrap; }
.show-bar span { min-width: 3.2rem; flex: 0 0 auto; text-align: center; color: #fff; font-weight: 600; }
.show-bar .btn.ghost { color: #fff !important; background: #2c3633; border-color: rgba(255,255,255,.45); }

.album { display: flex; gap: 6px; overflow-x: auto; margin: 0 0 0.7rem; }
.album a { flex: 0 0 auto; }
.album img { width: 72px; height: 72px; object-fit: cover; border-radius: 8px; display: block; }
.note-card:not(.is-compact) .album { display: grid; grid-template-columns: repeat(auto-fill, minmax(140px, 1fr)); }
.note-card:not(.is-compact) .album img { width: 100%; height: 160px; }

.note-card.is-compact .note-cover img,
.note-card.is-compact .note-fallback { height: 132px; }

.note-card.is-compact .excerpt { -webkit-line-clamp: 2; }

.note-fallback {
    display: flex;
    align-items: flex-end;
    height: 180px;
    padding: 0.9rem;
    background: linear-gradient(145deg, #075e54, #128c7e 70%, #25d366);
    color: #fff;
    text-decoration: none;
    font-weight: 600;
}

.note-embed {
    position: relative;
    padding-top: 56.25%;
    margin: 0 0 0.7rem;
    background: #000;
    border-radius: 10px;
    overflow: hidden;
}

.note-embed iframe { position: absolute; inset: 0; width: 100%; height: 100%; border: 0; }

.note-card audio, .note-card video { width: 100%; border-radius: 10px; margin: 0.4rem 0; }
.note-card video.note-video { display: block; max-height: 280px; margin: 0 0 0.7rem; background: #111; object-fit: contain; }
.note-card.is-compact video.note-video { max-height: 220px; }

.note-card audio { height: 40px; }

.excerpt {
    margin: 0;
    font-size: 0.92rem;
    line-height: 1.45;
    display: -webkit-box;
    -webkit-box-orient: vertical;
    -webkit-line-clamp: 4;
    overflow: hidden;
}

.note-actions { display: flex; flex-wrap: wrap; gap: 0.45rem; align-items: center; margin-top: 0.7rem; }

.note-actions form { margin: 0; }

.note-card .btn { padding: 0.45rem 0.75rem; font-size: 0.86rem; }

.btn.danger { background: #8c2f2f; color: #fff !important; }

.owner-actions { margin-top: 0.7rem; padding-top: 0.7rem; border-top: 1px solid var(--line); }

.note-edit { margin-top: 0.7rem; }

.note-edit summary, .hint { color: var(--muted); }

.note-edit summary { cursor: pointer; color: var(--wa-deep); font-weight: 600; }

.note-edit label, .share label, .keep-row label, .note-form label {
    display: block;
    margin: 0.55rem 0 0.25rem;
    font-size: 0.82rem;
    color: var(--muted);
}

.note-edit textarea { min-height: 4.2rem; resize: vertical; }

.share { margin-top: 0.7rem; }

.share input { margin-bottom: 0.45rem; }

.search { position: sticky; top: 0; z-index: 2; background: var(--paper); padding: 0.4rem 0 0.8rem; }

.search-row { display: flex; gap: 0.5rem; align-items: center; }

.search-row input { flex: 1; min-width: 0; }

.keep-bar { display: flex; gap: 0.7rem; align-items: center; flex-wrap: wrap; }

.keep-list { display: grid; gap: 0.7rem; margin-top: 0.8rem; }

.keep-row {
    background: var(--card);
    border: 1px solid var(--line);
    border-radius: 12px;
    padding: 0.85rem;
    scroll-margin-top: 5rem;
}

.keep-row.is-auto { box-shadow: inset 4px 0 0 var(--accent); }

.keep-head { display: flex; gap: 0.75rem; align-items: center; margin-bottom: 0.45rem; }

.keep-thumb { width: 112px; height: 72px; object-fit: cover; border-radius: 8px; background: var(--wa-deep); flex: 0 0 auto; }

.keep-fallback { display: inline-block; background: linear-gradient(145deg, #075e54, #25d366); }

.badge {
    display: inline-block;
    margin-left: 0.35rem;
    border-radius: 999px;
    padding: 0.1rem 0.45rem;
    background: var(--wa-bubble);
    color: var(--wa-deep);
    font-size: 0.75rem;
}

.keep-url { margin: 0.55rem 0 0; font-size: 0.82rem; word-break: break-all; color: var(--muted); }

#note-sentinel { grid-column: 1 / -1; text-align: center; }

.note-form { margin: 0.2rem 0 0.8rem; }

body.composer-on { position: fixed; left: 0; right: 0; width: 100%; overflow: hidden; }

.composer {
    position: fixed;
    inset: 0;
    z-index: 30;
    display: flex;
    flex-direction: column;
    align-items: center;
    overflow: auto;
    padding: max(1rem, env(safe-area-inset-top)) 1rem max(1rem, env(safe-area-inset-bottom));
    background: rgba(17, 24, 20, 0.45);
}

.composer .note-form {
    width: min(40rem, 100%);
    margin: auto 0;
    flex: 0 0 auto;
    background: var(--card);
    border: 1px solid var(--line);
    border-radius: 14px;
    padding: 1rem 1.1rem 1.15rem;
    box-shadow: 0 18px 50px rgba(0, 0, 0, 0.22);
}

.composer-bar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 0.75rem;
    margin-bottom: 0.35rem;
}

.composer-bar strong { font-size: 1.05rem; }

.composer-bar .btn { margin-top: 0; padding: 0.45rem 0.8rem; }

.creds { display: grid; grid-template-columns: 8.5rem 1fr; gap: 0.35rem 0.8rem; margin: 0.6rem 0 0; }
.creds-fold { margin-top: 0.8rem; }
.creds-fold summary { cursor: pointer; color: var(--muted); }
.wa-acoes { display: flex; flex-wrap: wrap; gap: 0.5rem; align-items: center; margin-top: 0.85rem; }
.wa-acoes form { margin: 0; }
.wa-acoes .btn, .admin .wa-acoes .btn { margin-top: 0; }
.wa-fone { margin-top: 0.9rem; }
.wa-fone .btn { margin-top: 0.55rem; }
.wa-code { margin: 0.7rem 0 0; font-size: 1.55rem; font-weight: 700; letter-spacing: 0.08em; }
.creds dt { color: var(--muted); }
.creds dd { margin: 0; overflow-wrap: anywhere; }
.stock { display: grid; gap: 0.6rem; margin-top: 1rem; }
.stock article { background: var(--card); border: 1px solid var(--line); border-radius: 8px; padding: 0.75rem 0.9rem; }
.stock p { margin: 0.15rem 0; }

@media (max-width: 980px) {
    .path ol, .seguro ul { grid-template-columns: 1fr; }
    .grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}

@media (max-width: 820px) {
    .hero, .tools { grid-template-columns: 1fr; gap: 2rem; }
    .hero { padding-top: 2rem; }
    .hero-art { margin-right: auto; }
    h1 { max-width: none; }
}

@media (max-width: 700px) {
    .bar, main, .foot {
        padding-left: max(1.1rem, env(safe-area-inset-left));
        padding-right: max(1.1rem, env(safe-area-inset-right));
    }
    .bar {
        position: sticky;
        top: 0;
        z-index: 22;
        flex-wrap: nowrap;
        gap: 0.6rem;
        padding-top: max(0.4rem, env(safe-area-inset-top));
        padding-bottom: 0.4rem;
        background: #f5f5f4;
    }
    .brand-mark { height: 40px; }
    .nav {
        position: fixed;
        left: 0;
        right: 0;
        bottom: 0;
        z-index: 20;
        width: auto;
        margin: 0;
        display: grid;
        grid-auto-flow: column;
        grid-auto-columns: minmax(0, 1fr);
        gap: 0.15rem;
        padding: 0.35rem 0.4rem calc(0.35rem + env(safe-area-inset-bottom));
        background: var(--accent);
        border-top: 0;
        box-shadow: 0 -8px 24px rgba(92, 45, 134, 0.28);
    }
    .nav a,
    .nav a.nav-go,
    .nav a.nav-here {
        display: flex;
        align-items: center;
        justify-content: center;
        min-height: 2.75rem;
        margin: 0;
        padding: 0.3rem 0.2rem;
        border-radius: 12px;
        background: transparent !important;
        color: #fff !important;
        font-size: 0.68rem;
        font-weight: 600;
        line-height: 1.15;
        text-align: center;
    }
    .nav a.nav-here,
    .nav a[aria-current="page"],
    .nav a:active,
    .nav a.nav-go:active {
        color: var(--accent) !important;
        background: #fff !important;
        font-weight: 700;
    }
    .install { margin-left: auto; padding: 0.4rem 0.65rem; font-size: 0.82rem; }
    .foot { padding-bottom: calc(4.8rem + env(safe-area-inset-bottom)); }
    h1 { font-size: 2.15rem; }
    .page h1 { font-size: 1.55rem; }
    .page-head { margin-top: 0.35rem; }
    .shelf { top: 3.4rem; }
    .shelf-actions { width: 100%; }
    .shelf-actions .btn { flex: 1 1 0; text-align: center; padding: 0.65rem 0.35rem; }
    .note-fields { grid-template-columns: 1fr; }
    .shelf .search { flex-basis: 100%; }
    .path ol, .grid, .qr, .row, .vault-list { grid-template-columns: 1fr; }
    .phone { margin-right: auto; }
}
