/* =========================================================
   PKBinder — estilos globais
   © 2026 TWB SISTEMAS LTDA
   ========================================================= */

:root {
    --bg: #0b1026;
    --bg-alt: #0e1430;
    --surface: #141a3d;
    --surface-2: #1c2452;
    --line: rgba(255, 255, 255, .09);
    --text: #eef1ff;
    --muted: #9aa3c7;
    --yellow: #ffcb05;
    --yellow-2: #ffd93d;
    --red: #ef3b4a;
    --blue: #3b6cff;
    --radius: 16px;
    --shadow: 0 20px 50px -20px rgba(0, 0, 0, .7);
    --font-head: 'Bricolage Grotesque', 'Arial Black', system-ui, sans-serif;
    --font-body: 'Inter', system-ui, -apple-system, 'Segoe UI', Roboto, sans-serif;
    --header-h: 72px;
}

*,
*::before,
*::after { box-sizing: border-box; }

html { scroll-behavior: smooth; scroll-padding-top: calc(var(--header-h) + 16px); }

body {
    margin: 0;
    background: var(--bg);
    color: var(--text);
    font-family: var(--font-body);
    font-size: 16px;
    line-height: 1.6;
    -webkit-font-smoothing: antialiased;
    overflow-x: hidden;
}

img { max-width: 100%; display: block; }
[hidden] { display: none !important; }
a { color: inherit; text-decoration: none; }
button { font: inherit; color: inherit; cursor: pointer; }
h1, h2, h3, h4 { font-family: var(--font-head); line-height: 1.12; margin: 0; letter-spacing: -.02em; }
p { margin: 0; }

.container { width: min(1200px, 100% - 32px); margin-inline: auto; }
.muted { color: var(--muted); }

/* ---------- Botões ---------- */
.btn {
    display: inline-flex; align-items: center; justify-content: center; gap: 8px;
    padding: 10px 18px; border-radius: 999px; border: 1px solid transparent;
    font-weight: 600; font-size: 15px; line-height: 1.2; white-space: nowrap;
    transition: transform .15s ease, background .2s ease, border-color .2s ease, box-shadow .2s ease;
}
.btn:hover { transform: translateY(-1px); }
.btn:active { transform: translateY(0); }
.btn svg { width: 18px; height: 18px; fill: currentColor; }
.btn-lg { padding: 14px 26px; font-size: 16px; }
.btn-block { width: 100%; }
.btn-primary { background: var(--yellow); color: #1a1400; box-shadow: 0 8px 24px -10px rgba(255, 203, 5, .7); }
.btn-primary:hover { background: var(--yellow-2); }
.btn-ghost { background: transparent; color: var(--text); }
.btn-ghost:hover { background: rgba(255, 255, 255, .07); }
.btn-outline { background: transparent; border-color: rgba(255, 255, 255, .25); color: var(--text); }
.btn-outline:hover { border-color: var(--yellow); color: var(--yellow); }
.btn-dark { background: #12183a; color: #fff; }
.btn-dark:hover { background: #0b1026; }
:focus-visible { outline: 3px solid var(--yellow); outline-offset: 3px; }

.eyebrow {
    display: inline-flex; align-items: center; gap: 8px;
    font-size: 13px; font-weight: 700; letter-spacing: .08em; text-transform: uppercase; color: var(--yellow);
}

/* ---------- Header ---------- */
.site-header {
    position: sticky; top: 0; z-index: 50;
    background: rgba(11, 16, 38, .78);
    backdrop-filter: saturate(160%) blur(14px);
    -webkit-backdrop-filter: saturate(160%) blur(14px);
    border-bottom: 1px solid var(--line);
}
.header-inner { height: var(--header-h); display: flex; align-items: center; gap: 32px; }

.brand { display: inline-flex; align-items: center; gap: 8px; flex-shrink: 0; }
.brand-mark { width: 44px; height: 44px; }
.brand-word {
    font-family: var(--font-head); font-weight: 800; font-style: italic;
    font-size: 26px; letter-spacing: -.04em; color: #fff;
}
.brand-word b { color: var(--yellow); font-weight: 800; }

.main-nav { display: flex; gap: 4px; }
.main-nav a {
    padding: 8px 14px; border-radius: 999px; font-size: 15px; font-weight: 500; color: var(--muted);
    transition: color .2s, background .2s;
}
.main-nav a:hover { color: var(--text); background: rgba(255, 255, 255, .05); }
.main-nav a.is-active { color: var(--text); }

.header-auth { margin-left: auto; display: flex; align-items: center; gap: 6px; }

.nav-toggle {
    display: none; width: 42px; height: 42px; border-radius: 12px; border: 1px solid var(--line);
    background: transparent; padding: 0; flex-direction: column; align-items: center; justify-content: center; gap: 4px;
}
.nav-toggle span { width: 18px; height: 2px; background: var(--text); border-radius: 2px; transition: transform .2s, opacity .2s; }
.nav-toggle[aria-expanded="true"] span:nth-child(1) { transform: translateY(6px) rotate(45deg); }
.nav-toggle[aria-expanded="true"] span:nth-child(2) { opacity: 0; }
.nav-toggle[aria-expanded="true"] span:nth-child(3) { transform: translateY(-6px) rotate(-45deg); }

/* Menu do usuário logado */
.user-menu { position: relative; }
.user-btn {
    display: inline-flex; align-items: center; gap: 8px; padding: 4px 10px 4px 4px; border-radius: 999px;
    border: 1px solid var(--line); background: rgba(255, 255, 255, .04); font-weight: 600; font-size: 15px;
    transition: background .2s, border-color .2s;
}
.user-btn:hover, .user-btn[aria-expanded="true"] { background: rgba(255, 255, 255, .08); border-color: rgba(255, 255, 255, .18); }
.avatar {
    width: 34px; height: 34px; border-radius: 50%; display: grid; place-items: center; flex-shrink: 0;
    background: linear-gradient(135deg, var(--yellow), #ff9f1c); color: #1a1400; font-family: var(--font-head); font-weight: 800; font-size: 16px;
}
.user-name { max-width: 140px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.caret { width: 18px; height: 18px; fill: var(--muted); transition: transform .2s; }
.user-btn[aria-expanded="true"] .caret { transform: rotate(180deg); }
.user-dropdown {
    position: absolute; right: 0; top: calc(100% + 10px); width: 230px; padding: 8px; border-radius: 16px; z-index: 60;
    background: var(--surface); border: 1px solid var(--line); box-shadow: 0 24px 50px -12px rgba(0, 0, 0, .8);
    animation: pop .18s ease;
}
.user-dropdown[hidden] { display: none; }
.user-dropdown-head { padding: 10px 12px 12px; border-bottom: 1px solid var(--line); margin-bottom: 6px; display: grid; gap: 2px; }
.user-dropdown-head strong { font-size: 15px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.user-dropdown-head span { font-size: 13px; color: var(--muted); overflow: hidden; text-overflow: ellipsis; }
.badge-admin {
    justify-self: start; margin-top: 6px; font-style: normal; font-size: 11px; font-weight: 700; letter-spacing: .04em; text-transform: uppercase;
    padding: 3px 8px; border-radius: 999px; color: #1a1400; background: var(--yellow);
}
.user-dropdown a, .user-dropdown button {
    display: block; width: 100%; text-align: left; padding: 10px 12px; border-radius: 10px; border: 0; background: none;
    font-size: 15px; font-weight: 500; color: var(--text);
}
.user-dropdown a:hover, .user-dropdown button:hover { background: rgba(255, 255, 255, .06); }
.user-dropdown form button { color: #ff8a94; }

/* ---------- Hero ---------- */
.hero { position: relative; overflow: hidden; padding: 72px 0 96px; }
.hero-glow {
    position: absolute; inset: -20% -10% auto auto; width: 900px; height: 900px; pointer-events: none;
    background:
        radial-gradient(closest-side, rgba(255, 203, 5, .22), transparent 70%) 60% 40% / 70% 70% no-repeat,
        radial-gradient(closest-side, rgba(59, 108, 255, .28), transparent 70%) 20% 70% / 80% 80% no-repeat,
        radial-gradient(closest-side, rgba(239, 59, 74, .2), transparent 70%) 90% 80% / 60% 60% no-repeat;
    filter: blur(10px);
}
.hero::after {
    content: ""; position: absolute; inset: 0; pointer-events: none; opacity: .5;
    background-image: radial-gradient(rgba(255, 255, 255, .08) 1px, transparent 1px);
    background-size: 26px 26px;
    mask-image: linear-gradient(to bottom, #000 30%, transparent 90%);
    -webkit-mask-image: linear-gradient(to bottom, #000 30%, transparent 90%);
}
.hero-inner { position: relative; z-index: 1; display: grid; grid-template-columns: 1.05fr .95fr; gap: 48px; align-items: center; }
.hero h1 { font-size: clamp(36px, 5.2vw, 62px); font-weight: 800; margin: 18px 0 20px; }
.hero h1 em {
    font-style: normal;
    background: linear-gradient(100deg, var(--yellow) 10%, #ff9f1c 55%, var(--red));
    -webkit-background-clip: text; background-clip: text; color: transparent;
}
.lead { color: var(--muted); font-size: 18px; max-width: 540px; }
.hero-actions { display: flex; flex-wrap: wrap; gap: 12px; margin: 32px 0 28px; }
.hero-points { list-style: none; padding: 0; margin: 0; display: flex; flex-wrap: wrap; gap: 10px 24px; color: var(--muted); font-size: 14px; }
.hero-points li { display: inline-flex; align-items: center; gap: 8px; }
.hero-points li::before {
    content: ""; width: 16px; height: 16px; border-radius: 50%;
    background: var(--yellow) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath d='m9.5 16.2-4.2-4.2-1.4 1.4 5.6 5.6L21 7.5l-1.4-1.4z' fill='%231a1400'/%3E%3C/svg%3E") center / 12px no-repeat;
}

.hero-fan { position: relative; height: 520px; perspective: 1400px; }
.fan-card { position: absolute; top: 50%; left: 50%; width: 260px; animation: float 6s ease-in-out infinite; }
.fan-0 { transform: translate(-112%, -46%) rotate(-12deg); animation-delay: -2s; z-index: 1; }
.fan-1 { transform: translate(-50%, -54%); z-index: 3; width: 290px; }
.fan-2 { transform: translate(12%, -46%) rotate(12deg); animation-delay: -4s; z-index: 2; }
.fan-0 .tcg, .fan-2 .tcg { filter: brightness(.92); }
@keyframes float {
    50% { translate: 0 -12px; }
}

/* ---------- Carta com efeito holográfico ---------- */
.tcg {
    --rx: 0deg; --ry: 0deg; --mx: 50%; --my: 50%; --o: 0;
    position: relative; border-radius: 4.5% / 3.3%; overflow: hidden;
    aspect-ratio: 245 / 342;
    background: var(--surface-2);
    box-shadow: var(--shadow);
    transform: rotateX(var(--rx)) rotateY(var(--ry));
    transform-style: preserve-3d;
    transition: transform .4s cubic-bezier(.2, .8, .2, 1), box-shadow .3s;
    will-change: transform;
}
.tcg.is-active { transition: transform .08s linear, box-shadow .3s; box-shadow: 0 30px 60px -20px rgba(0, 0, 0, .8), 0 0 40px -10px rgba(255, 203, 5, .35); }
.tcg img { width: 100%; height: 100%; object-fit: cover; }
.shine {
    position: absolute; inset: 0; pointer-events: none; opacity: var(--o); mix-blend-mode: color-dodge;
    transition: opacity .3s;
    background:
        radial-gradient(circle at var(--mx) var(--my), rgba(255, 255, 255, .55), transparent 45%),
        linear-gradient(115deg, transparent 20%, rgba(255, 0, 132, .35) 36%, rgba(0, 231, 255, .35) 50%, rgba(255, 238, 0, .35) 64%, transparent 80%);
    background-size: 100% 100%, 250% 250%;
    background-position: center, var(--mx) var(--my);
}

/* ---------- Seções ---------- */
.section { padding: 96px 0; }
.section-alt { background: var(--bg-alt); border-block: 1px solid var(--line); }
.section-head { margin-bottom: 48px; max-width: 640px; }
.section-head h2 { font-size: clamp(28px, 3.6vw, 42px); margin-top: 12px; }
.section-head-row { max-width: none; display: flex; align-items: flex-end; justify-content: space-between; gap: 24px; flex-wrap: wrap; }

/* Passos */
.steps { display: grid; grid-template-columns: repeat(3, 1fr); gap: 20px; }
.step {
    position: relative; padding: 32px 28px; border-radius: var(--radius);
    background: linear-gradient(180deg, var(--surface), rgba(20, 26, 61, .4));
    border: 1px solid var(--line);
    transition: border-color .2s, transform .2s;
}
.step:hover { border-color: rgba(255, 203, 5, .4); transform: translateY(-4px); }
.step-num { position: absolute; top: 24px; right: 28px; font-family: var(--font-head); font-size: 40px; font-weight: 800; color: rgba(255, 255, 255, .06); }
.step-icon { width: 52px; height: 52px; border-radius: 14px; display: grid; place-items: center; background: rgba(255, 203, 5, .12); margin-bottom: 22px; }
.step-icon svg { width: 26px; height: 26px; fill: var(--yellow); }
.step h3 { font-size: 22px; margin-bottom: 10px; }
.step p { color: var(--muted); }
.step strong { color: var(--text); }

/* Grade de cartas */
.card-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 32px 24px; perspective: 1200px; }
.card-meta { padding: 16px 4px 0; }
.card-meta h3 { font-size: 18px; }
.card-meta p { color: var(--muted); font-size: 14px; margin: 2px 0 10px; }
.rarity {
    display: inline-block; font-size: 12px; font-weight: 600; padding: 4px 10px; border-radius: 999px;
    color: var(--yellow); background: rgba(255, 203, 5, .1); border: 1px solid rgba(255, 203, 5, .25);
}

/* Binder */
.binder-wrap { display: grid; grid-template-columns: .95fr 1.05fr; gap: 64px; align-items: center; }
.binder-copy h2 { font-size: clamp(28px, 3.6vw, 42px); margin: 12px 0 18px; }
.check-list { list-style: none; padding: 0; margin: 28px 0 34px; display: grid; gap: 14px; }
.check-list li { display: flex; gap: 12px; align-items: flex-start; }
.check-list li::before {
    content: ""; flex-shrink: 0; margin-top: 3px; width: 20px; height: 20px; border-radius: 6px;
    background: rgba(255, 203, 5, .15) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath d='m9.5 16.2-4.2-4.2-1.4 1.4 5.6 5.6L21 7.5l-1.4-1.4z' fill='%23ffcb05'/%3E%3C/svg%3E") center / 14px no-repeat;
}

.binder {
    position: relative; padding: 22px 22px 22px 46px; border-radius: 22px;
    background: linear-gradient(145deg, #1b2250, #11163a);
    border: 1px solid var(--line);
    box-shadow: 0 40px 80px -30px rgba(0, 0, 0, .8), inset 0 1px 0 rgba(255, 255, 255, .06);
}
.binder-rings { position: absolute; left: 14px; top: 0; bottom: 0; display: flex; flex-direction: column; justify-content: space-around; padding: 60px 0; }
.binder-rings i { width: 18px; height: 18px; border-radius: 50%; background: radial-gradient(circle at 35% 35%, #e6e9f5, #8a91b3); box-shadow: inset 0 -2px 3px rgba(0, 0, 0, .35); }
.binder-top { display: flex; justify-content: space-between; align-items: center; gap: 16px; margin-bottom: 16px; }
.binder-top strong { display: block; font-family: var(--font-head); font-size: 20px; }
.binder-top span { font-size: 13px; color: var(--muted); }
.binder-progress { text-align: right; min-width: 150px; }
.bar { height: 6px; border-radius: 6px; background: rgba(255, 255, 255, .1); margin-top: 6px; overflow: hidden; }
.bar i { display: block; height: 100%; border-radius: inherit; background: linear-gradient(90deg, var(--yellow), #ff9f1c); }
.binder-page { display: grid; grid-template-columns: repeat(3, 1fr); gap: 12px; }
.pocket {
    aspect-ratio: 245 / 342; border-radius: 8px; overflow: hidden; position: relative;
    background: rgba(255, 255, 255, .04);
    box-shadow: 0 6px 14px -6px rgba(0, 0, 0, .6);
    transition: transform .2s;
}
.pocket::after { content: ""; position: absolute; inset: 0; background: linear-gradient(160deg, rgba(255, 255, 255, .14), transparent 40%); pointer-events: none; }
.pocket:hover { transform: scale(1.04); z-index: 1; }
.pocket img { width: 100%; height: 100%; object-fit: cover; }
.pocket-empty {
    display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 2px; text-align: center; padding: 8px;
    border: 2px dashed rgba(255, 255, 255, .18); box-shadow: none; color: var(--muted); font-size: 13px; font-weight: 600;
}
.pocket-empty::after { display: none; }
.pocket-empty small { font-weight: 400; font-size: 12px; }
.pocket-empty .plus {
    width: 34px; height: 34px; border-radius: 50%; display: grid; place-items: center; margin-bottom: 6px;
    background: rgba(255, 203, 5, .12); color: var(--yellow); font-size: 22px; line-height: 1;
}

/* Coleções */
.set-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 16px; }
.set-item {
    display: flex; align-items: center; gap: 20px; padding: 20px 24px; border-radius: var(--radius);
    background: var(--surface); border: 1px solid var(--line);
    transition: border-color .2s, transform .2s, background .2s;
}
.set-item:hover { border-color: rgba(255, 203, 5, .45); transform: translateY(-3px); background: var(--surface-2); }
.set-item img { width: 120px; height: 56px; object-fit: contain; flex-shrink: 0; }
.set-item strong { display: block; font-size: 16px; }
.set-item span { font-size: 13px; color: var(--muted); }

/* CTA */
.cta { padding: 96px 0; }
.cta-inner {
    position: relative; display: flex; align-items: center; gap: 28px;
    padding: 40px 48px 40px 230px; border-radius: 28px; overflow: visible;
    background: linear-gradient(110deg, var(--yellow), #ffb703 60%, #ff9f1c);
    color: #1a1400;
}
.cta-inner h2 { font-size: clamp(24px, 3vw, 34px); }
.cta-inner p { margin-top: 6px; font-weight: 500; opacity: .8; }
.cta-inner .btn { margin-left: auto; }
.cta-pika { position: absolute; left: 10px; bottom: -6px; width: 210px; height: auto; filter: drop-shadow(0 18px 20px rgba(0, 0, 0, .3)); }

/* ---------- Footer ---------- */
.site-footer { border-top: 1px solid var(--line); background: #080c1e; padding-top: 64px; }
.footer-grid { display: grid; grid-template-columns: 2fr 1fr 1fr; gap: 40px; padding-bottom: 48px; }
.footer-brand p { color: var(--muted); max-width: 360px; margin-top: 16px; font-size: 15px; }
.site-footer h4 { font-size: 14px; text-transform: uppercase; letter-spacing: .08em; color: var(--text); margin-bottom: 14px; font-family: var(--font-body); }
.footer-grid > div:not(.footer-brand) a { display: block; color: var(--muted); font-size: 15px; padding: 4px 0; }
.footer-grid a:hover { color: var(--yellow); }
.footer-bottom { border-top: 1px solid var(--line); padding: 24px 0 32px; display: grid; gap: 8px; font-size: 14px; color: var(--muted); }
.footer-bottom p:first-child { color: var(--text); font-weight: 500; }
.footer-legal { font-size: 12px; opacity: .75; }

/* ---------- Modal de login ---------- */
.auth-modal { position: fixed; inset: 0; z-index: 100; display: grid; place-items: center; padding: 16px; }
.auth-modal[hidden] { display: none; }
.auth-backdrop { position: absolute; inset: 0; background: rgba(4, 6, 18, .72); backdrop-filter: blur(6px); animation: fade .2s ease; }
.auth-panel {
    position: relative; width: min(440px, 100%); max-height: calc(100vh - 32px); overflow-y: auto;
    padding: 32px; border-radius: 22px;
    background: var(--surface); border: 1px solid var(--line); box-shadow: 0 40px 100px -20px rgba(0, 0, 0, .9);
    animation: pop .25s cubic-bezier(.2, .9, .3, 1.2);
}
@keyframes fade { from { opacity: 0; } }
@keyframes pop { from { opacity: 0; transform: translateY(12px) scale(.97); } }
.auth-close {
    position: absolute; top: 14px; right: 14px; width: 36px; height: 36px; border-radius: 50%;
    border: 0; background: rgba(255, 255, 255, .06); font-size: 22px; line-height: 1; color: var(--muted);
}
.auth-close:hover { color: var(--text); background: rgba(255, 255, 255, .12); }
.auth-head { display: flex; align-items: center; gap: 10px; margin-bottom: 22px; }
.auth-head .brand-mark { width: 40px; height: 40px; }
.auth-head h2 { font-size: 22px; }
.auth-tabs { display: grid; grid-template-columns: 1fr 1fr; padding: 4px; border-radius: 999px; background: var(--bg); margin-bottom: 24px; }
.auth-tabs button { border: 0; background: transparent; padding: 9px; border-radius: 999px; font-weight: 600; font-size: 14px; color: var(--muted); }
.auth-tabs button[aria-selected="true"] { background: var(--surface-2); color: var(--text); box-shadow: 0 2px 8px rgba(0, 0, 0, .3); }
.auth-form { display: grid; gap: 16px; }
.auth-form[hidden] { display: none; }
.auth-form label { display: grid; gap: 6px; font-size: 14px; font-weight: 600; }
.auth-form small { font-weight: 400; font-size: 12px; color: var(--muted); }
.auth-form input[type="text"],
.auth-form input[type="email"],
.auth-form input[type="password"] {
    width: 100%; padding: 12px 14px; border-radius: 12px; font: inherit; font-weight: 400; color: var(--text);
    background: var(--bg); border: 1px solid var(--line); transition: border-color .2s, box-shadow .2s;
}
.auth-form input:focus { outline: none; border-color: var(--yellow); box-shadow: 0 0 0 3px rgba(255, 203, 5, .2); }
.auth-form input.is-invalid { border-color: var(--red); }
.auth-split { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.auth-row { display: flex; justify-content: space-between; align-items: center; font-size: 14px; }
.auth-form .check { display: inline-flex; align-items: center; gap: 8px; font-weight: 500; color: var(--muted); }
.auth-form .check input { accent-color: var(--yellow); width: 16px; height: 16px; }
.link-muted { color: var(--muted); }
.link-muted:hover { color: var(--yellow); }
.auth-msg { font-size: 14px; min-height: 0; }
.auth-msg:empty { display: none; }
.auth-msg.is-error { color: #ff8a94; }
.auth-msg.is-ok { color: #7ee2a8; }
body.modal-open { overflow: hidden; }

/* ---------- Páginas internas ---------- */
.page { padding: 48px 0 96px; min-height: calc(100vh - var(--header-h) - 260px); }
.page-narrow .container { max-width: 480px; }

.flash {
    margin-bottom: 24px; padding: 14px 18px; border-radius: 14px; font-weight: 600;
    color: #7ee2a8; background: rgba(126, 226, 168, .1); border: 1px solid rgba(126, 226, 168, .3);
}

.form-card {
    padding: 36px 32px; border-radius: 22px; background: var(--surface); border: 1px solid var(--line);
    box-shadow: 0 30px 80px -30px rgba(0, 0, 0, .8);
}
.form-card h1 { font-size: 28px; margin-bottom: 8px; }
.form-card > .muted { margin-bottom: 26px; }
.form-card-icon { width: 56px; height: 56px; border-radius: 16px; display: grid; place-items: center; background: rgba(255, 203, 5, .12); margin-bottom: 20px; }
.form-card-icon svg { width: 28px; height: 28px; fill: var(--yellow); }

.stack-form { display: grid; gap: 16px; }
.stack-form label { display: grid; gap: 6px; font-size: 14px; font-weight: 600; }
.stack-form small { font-weight: 400; font-size: 12px; color: var(--muted); }
.stack-form input[type="password"], .stack-form input[type="text"], .stack-form input[type="email"] {
    width: 100%; padding: 12px 14px; border-radius: 12px; font: inherit; font-weight: 400; color: var(--text);
    background: var(--bg); border: 1px solid var(--line); transition: border-color .2s, box-shadow .2s;
}
.stack-form input:focus { outline: none; border-color: var(--yellow); box-shadow: 0 0 0 3px rgba(255, 203, 5, .2); }
.stack-form input.is-invalid { border-color: var(--red); }
.form-msg { font-size: 14px; }
.form-msg.is-error { color: #ff8a94; }
.form-msg.is-ok { color: #7ee2a8; }
.form-card .form-msg { margin-bottom: 18px; }
.text-strong { color: var(--text); overflow-wrap: anywhere; }
.text-center { text-align: center; }
.text-center .form-card-icon { margin-inline: auto; }
.form-card-icon.is-ok { background: rgba(126, 226, 168, .14); }
.form-card-icon.is-ok svg { fill: #7ee2a8; }
.form-card-icon.is-error { background: rgba(239, 59, 74, .14); }
.form-card-icon.is-error svg { fill: #ff8a94; }
.tips { margin: 0 0 24px; padding: 14px 16px 14px 34px; border-radius: 12px; background: var(--bg); color: var(--muted); font-size: 14px; display: grid; gap: 4px; }
.fix-email { margin-top: 18px; border-top: 1px solid var(--line); padding-top: 16px; }
.fix-email summary { cursor: pointer; color: var(--muted); font-size: 14px; font-weight: 600; list-style: none; text-align: center; }
.fix-email summary::-webkit-details-marker { display: none; }
.fix-email summary:hover { color: var(--yellow); }
.fix-email[open] summary { margin-bottom: 16px; color: var(--text); }
.logout-line { margin-top: 18px; text-align: center; }
.logout-line button { border: 0; background: none; font-size: 14px; padding: 4px; }

.dash-hero { display: flex; align-items: flex-end; justify-content: space-between; gap: 24px; flex-wrap: wrap; margin-bottom: 32px; }
.dash-hero h1 { font-size: clamp(30px, 4vw, 44px); margin: 10px 0 6px; }
.dash-stats, .admin-stats { display: flex; gap: 12px; }
.stat {
    min-width: 104px; padding: 14px 18px; border-radius: 14px; background: var(--surface); border: 1px solid var(--line);
    display: grid; gap: 2px;
}
.stat strong { font-family: var(--font-head); font-size: 26px; line-height: 1.1; }
.stat span { font-size: 13px; color: var(--muted); }

.dash-grid { display: grid; grid-template-columns: 1fr 340px; gap: 24px; align-items: start; }
.dash-side { display: grid; gap: 24px; }
.panel { padding: 24px; border-radius: 20px; background: var(--surface); border: 1px solid var(--line); }
.panel-head { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin-bottom: 18px; }
.panel-head h2 { font-size: 20px; }
.panel-head .badge-admin { margin: 0; }

.empty-state {
    display: grid; justify-items: center; text-align: center; gap: 10px; padding: 40px 24px; border-radius: 16px;
    border: 2px dashed rgba(255, 255, 255, .12);
}
.empty-state img { width: 120px; height: 120px; filter: drop-shadow(0 12px 18px rgba(0, 0, 0, .4)); }
.empty-state h3 { font-size: 20px; }
.empty-state p { max-width: 420px; margin-bottom: 10px; }
.btn:disabled { opacity: .55; cursor: not-allowed; transform: none; box-shadow: none; }
.soon { font-size: 11px; font-weight: 700; text-transform: uppercase; letter-spacing: .04em; padding: 2px 8px; border-radius: 999px; background: rgba(0, 0, 0, .2); }

.info-list { margin: 0 0 20px; display: grid; gap: 12px; }
.info-list div { display: flex; justify-content: space-between; gap: 12px; font-size: 14px; }
.info-list dt { color: var(--muted); }
.info-list dd { margin: 0; font-weight: 600; text-align: right; overflow-wrap: anywhere; }

.admin-stats { margin-bottom: 20px; }
.admin-stats .stat { flex: 1; background: var(--bg); }
.mini-title { font-family: var(--font-body); font-size: 13px; text-transform: uppercase; letter-spacing: .06em; color: var(--muted); margin-bottom: 10px; }
.user-list { list-style: none; padding: 0; margin: 0; display: grid; gap: 10px; }
.user-list li { display: flex; align-items: center; gap: 10px; }
.user-list strong { display: block; font-size: 14px; }
.user-list span:not(.avatar) { font-size: 12px; color: var(--muted); }
.avatar-sm { width: 30px; height: 30px; font-size: 13px; }

@media (max-width: 920px) {
    .dash-grid { grid-template-columns: 1fr; }
}
@media (max-width: 640px) {
    .page { padding: 28px 0 64px; }
    .form-card { padding: 28px 20px; }
    .dash-stats { width: 100%; }
    .dash-stats .stat { flex: 1; min-width: 0; padding: 12px; }
    .panel { padding: 20px 16px; }
    .empty-state { padding: 28px 16px; }
}

/* ---------- Binder: criação ---------- */
.back-link { display: inline-block; color: var(--muted); font-size: 14px; font-weight: 600; margin-bottom: 14px; }
.back-link:hover { color: var(--yellow); }
.page-title { font-size: clamp(28px, 4vw, 40px); margin-bottom: 28px; }
.form-card-msg { margin-bottom: 20px; }
.step-title { display: flex; align-items: center; gap: 12px; font-size: 20px; margin: 8px 0 18px; }
.step-title span { width: 30px; height: 30px; border-radius: 50%; display: grid; place-items: center; background: var(--yellow); color: #1a1400; font-size: 15px; }
.type-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 16px; margin-bottom: 40px; }
.create-name input.is-invalid { border-color: var(--red); }
.create-name small { font-weight: 400; color: var(--muted); font-size: 12px; }
.type-card {
    position: relative; display: grid; gap: 8px; padding: 22px; border-radius: 18px; cursor: pointer;
    background: var(--surface); border: 2px solid var(--line); transition: border-color .2s, background .2s;
}
.type-card input { position: absolute; opacity: 0; pointer-events: none; }
.type-card:has(input:checked) { border-color: var(--yellow); background: var(--surface-2); }
.type-card:has(input:focus-visible) { outline: 3px solid var(--yellow); outline-offset: 3px; }
.type-card strong { font-size: 18px; font-family: var(--font-head); }
.type-card > span:last-child { color: var(--muted); font-size: 14px; }
.type-icon { width: 44px; height: 44px; border-radius: 12px; display: grid; place-items: center; background: rgba(255, 203, 5, .12); }
.type-icon svg { width: 24px; height: 24px; fill: var(--yellow); }

.set-search { position: relative; margin-bottom: 24px; }
.set-search svg { position: absolute; left: 14px; top: 50%; translate: 0 -50%; width: 18px; height: 18px; fill: var(--muted); }
.set-search input {
    width: 100%; padding: 12px 14px 12px 42px; border-radius: 12px; font: inherit; color: var(--text);
    background: var(--surface); border: 1px solid var(--line);
}
.set-search input:focus { outline: none; border-color: var(--yellow); }
.serie-group { margin-bottom: 28px; }
.serie-group h3 { font-family: var(--font-body); font-size: 13px; letter-spacing: .06em; text-transform: uppercase; color: var(--muted); margin-bottom: 12px; }
.set-pick-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(170px, 1fr)); gap: 12px; }
.set-pick {
    position: relative; display: grid; gap: 4px; padding: 14px; border-radius: 14px; cursor: pointer; text-align: center;
    background: var(--surface); border: 2px solid var(--line); transition: border-color .2s, transform .15s;
}
.set-pick:hover { transform: translateY(-2px); border-color: rgba(255, 255, 255, .2); }
.set-pick input { position: absolute; opacity: 0; pointer-events: none; }
.set-pick:has(input:checked) { border-color: var(--yellow); background: var(--surface-2); }
.set-pick:has(input:focus-visible) { outline: 3px solid var(--yellow); outline-offset: 2px; }
.set-pick-logo { height: 56px; display: grid; place-items: center; margin-bottom: 6px; }
.set-pick-logo img { max-height: 56px; max-width: 100%; object-fit: contain; }
.set-pick-logo em { font-style: normal; font-family: var(--font-head); font-weight: 800; color: var(--yellow); font-size: 15px; line-height: 1.1; }
.set-pick strong { font-size: 14px; line-height: 1.3; }
.set-pick small { font-size: 12px; color: var(--muted); }
#setPicker[hidden] { display: none; }

.create-bar {
    position: sticky; bottom: 0; z-index: 20; display: flex; align-items: flex-end; gap: 16px;
    margin-top: 24px; padding: 16px 0 calc(16px + env(safe-area-inset-bottom));
    background: linear-gradient(to top, var(--bg) 70%, transparent);
}
.create-name { flex: 1; display: grid; gap: 6px; font-size: 14px; font-weight: 600; }
.create-name input, .field input, .field select {
    width: 100%; padding: 12px 14px; border-radius: 12px; font: inherit; font-weight: 400; color: var(--text);
    background: var(--bg); border: 1px solid var(--line);
}
.create-name input { background: var(--surface); }
.create-name input:focus, .field input:focus, .field select:focus { outline: none; border-color: var(--yellow); box-shadow: 0 0 0 3px rgba(255, 203, 5, .2); }

/* ---------- Binder: página ---------- */
.btn-sm { padding: 8px 14px; font-size: 14px; }
.btn-danger { color: #ff8a94; }
.btn-danger-solid { background: var(--red); color: #fff; box-shadow: none; }
.btn-danger-solid:hover { background: #d92f3e; }
.binder-header { display: flex; align-items: center; justify-content: space-between; gap: 16px; flex-wrap: wrap; margin-bottom: 18px; }
.binder-title { display: flex; align-items: center; gap: 16px; min-width: 0; }
.binder-title h1 { font-size: clamp(24px, 3.4vw, 36px); overflow-wrap: anywhere; }
.binder-set-logo { width: 110px; max-height: 60px; object-fit: contain; flex-shrink: 0; }
.binder-actions { display: flex; gap: 4px; }
.binder-progress-card { padding: 16px 20px; border-radius: 16px; background: var(--surface); border: 1px solid var(--line); margin-bottom: 18px; }
.binder-progress-card strong { font-family: var(--font-head); font-size: 22px; color: var(--yellow); }
.binder-progress-card .bar { height: 8px; margin-top: 10px; }
.binder-progress-card .bar i { transition: width .4s ease; }
.binder-toolbar { display: flex; gap: 12px; align-items: center; justify-content: space-between; flex-wrap: wrap; margin-bottom: 10px; }
.chips { display: flex; gap: 6px; flex-wrap: wrap; }
.chip {
    padding: 8px 14px; border-radius: 999px; border: 1px solid var(--line); background: var(--surface);
    font-size: 14px; font-weight: 600; color: var(--muted);
}
.chip.is-active { background: var(--yellow); border-color: var(--yellow); color: #1a1400; }
.binder-search { margin: 0; flex: 0 1 320px; }
.binder-hint { color: var(--muted); font-size: 14px; margin: 6px 0 20px; }

.sheets { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 28px 24px; }
.sheet {
    position: relative; padding: 18px 16px 16px; border-radius: 18px;
    background: linear-gradient(160deg, #1b2250, #11163a); border: 1px solid var(--line);
    box-shadow: 0 24px 50px -30px rgba(0, 0, 0, .9);
}
.sheet-num { position: absolute; top: -10px; left: 16px; font-size: 11px; font-weight: 700; letter-spacing: .06em; text-transform: uppercase; color: var(--muted); background: var(--bg); padding: 2px 8px; border-radius: 999px; border: 1px solid var(--line); }
.sheet-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 10px; }
.sheets.is-filtered { grid-template-columns: minmax(0, 1fr); }
.sheets.is-filtered .sheet { padding: 0; background: none; border: 0; box-shadow: none; }
.sheets.is-filtered .sheet-num { display: none; }
.sheets.is-filtered .sheet-grid { grid-template-columns: repeat(auto-fill, minmax(130px, 1fr)); }
.sheets.is-filtered { gap: 10px; }

.pocket-slot {
    position: relative; display: block; width: 100%; padding: 0; border: 0; background: none; text-align: left;
    border-radius: 8px; transition: transform .15s;
}
.pocket-slot:hover { transform: translateY(-2px); }
.pocket-art {
    display: grid; place-items: center; aspect-ratio: 245 / 342; border-radius: 8px; overflow: hidden;
    background: rgba(255, 255, 255, .05); box-shadow: inset 0 0 0 1px rgba(255, 255, 255, .06);
}
.pocket-art img { width: 100%; height: 100%; object-fit: cover; }
.pocket-art.is-dex img { object-fit: contain; padding: 14%; }
.pocket-art em { font-style: normal; font-size: 12px; font-weight: 600; color: var(--muted); text-align: center; padding: 8px; }
/* Carta que falta: preto e branco e apagada */
.pocket-slot:not(.is-owned) .pocket-art img { filter: grayscale(1) brightness(.85); opacity: .32; transition: opacity .2s, filter .2s; }
.pocket-slot:not(.is-owned):hover .pocket-art img { opacity: .55; }
.pocket-slot:not(.is-owned) .pocket-art::after {
    content: ""; position: absolute; width: 34px; height: 34px; border-radius: 50%; opacity: 0; transition: opacity .2s;
    background: var(--yellow) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath fill='%231a1400' d='M9 3 7.2 5H4a2 2 0 0 0-2 2v12a2 2 0 0 0 2 2h16a2 2 0 0 0 2-2V7a2 2 0 0 0-2-2h-3.2L15 3H9Zm3 5a5 5 0 1 1 0 10 5 5 0 0 1 0-10Zm0 2a3 3 0 1 0 0 6 3 3 0 0 0 0-6Z'/%3E%3C/svg%3E") center / 18px no-repeat;
}
.pocket-art { position: relative; }
.pocket-slot:not(.is-owned):hover .pocket-art::after, .pocket-slot:not(.is-owned):focus-visible .pocket-art::after { opacity: 1; }
.pocket-slot.is-owned .pocket-art { box-shadow: 0 8px 18px -8px rgba(0, 0, 0, .8), 0 0 0 2px rgba(255, 203, 5, .5); }
.pocket-badges { position: absolute; left: 5px; right: 5px; top: 5px; display: flex; justify-content: space-between; align-items: flex-start; gap: 4px; pointer-events: none; }
.flag { border-radius: 2px; box-shadow: 0 0 0 1px rgba(0, 0, 0, .3); display: inline-block; vertical-align: middle; }
.price-tag { font-size: 11px; font-weight: 800; padding: 2px 6px; border-radius: 6px; background: #22c55e; color: #052e12; white-space: nowrap; }
.pocket-label { display: block; margin-top: 6px; font-size: 11px; line-height: 1.3; color: var(--muted); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.pocket-slot.is-owned .pocket-label { color: var(--text); }

/* Binder livre: molduras */
.pocket-art.is-frame { background: rgba(255, 255, 255, .03); box-shadow: inset 0 0 0 2px rgba(255, 255, 255, .14); }
.pocket-slot:not(.is-owned) .pocket-art.is-frame { border: 2px dashed rgba(255, 255, 255, .22); box-shadow: none; }
.pocket-slot:not(.is-owned) .pocket-art.is-frame::after { display: none; }
.frame-empty { display: grid; justify-items: center; gap: 8px; font-size: 12px; font-weight: 700; color: var(--muted); text-align: center; padding: 6px; }
.frame-empty::before {
    content: ""; width: 40px; height: 40px; border-radius: 50%;
    background: rgba(255, 203, 5, .14) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath fill='%23ffcb05' d='M9 3 7.2 5H4a2 2 0 0 0-2 2v12a2 2 0 0 0 2 2h16a2 2 0 0 0 2-2V7a2 2 0 0 0-2-2h-3.2L15 3H9Zm3 5a5 5 0 1 1 0 10 5 5 0 0 1 0-10Zm0 2a3 3 0 1 0 0 6 3 3 0 0 0 0-6Z'/%3E%3C/svg%3E") center / 20px no-repeat;
}
.pocket-new .pocket-art.is-frame { border-color: rgba(255, 203, 5, .55) !important; background: rgba(255, 203, 5, .05); }
.pocket-new .frame-empty { color: var(--yellow); }
.pocket-new .frame-empty::before {
    background: var(--yellow) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath fill='%231a1400' d='M11 5h2v6h6v2h-6v6h-2v-6H5v-2h6z'/%3E%3C/svg%3E") center / 22px no-repeat;
}
.pocket-new:hover .pocket-art.is-frame { background: rgba(255, 203, 5, .1); }
.pocket-new .pocket-label { color: var(--yellow); font-weight: 600; }
.free-icon { width: 44px; height: 44px; border-radius: 12px; display: grid; place-items: center; background: rgba(255, 203, 5, .12); }
.free-icon svg { width: 26px; height: 26px; fill: var(--yellow); }
.binder-actions .btn-primary { margin-right: 4px; }

/* ---------- Modal da carta ---------- */
.card-modal { position: fixed; inset: 0; z-index: 100; display: grid; grid-template-columns: minmax(0, 1fr); place-items: center; padding: 16px; }
.card-modal[hidden] { display: none; }
.card-panel {
    position: relative; width: min(860px, 100%); max-height: calc(100vh - 32px); overflow-y: auto;
    display: grid; grid-template-columns: 300px minmax(0, 1fr); gap: 28px; padding: 28px; border-radius: 22px;
    background: var(--surface); border: 1px solid var(--line); box-shadow: 0 40px 100px -20px rgba(0, 0, 0, .9);
    animation: pop .25s cubic-bezier(.2, .9, .3, 1.2);
}
.card-panel-media { display: grid; gap: 12px; align-content: start; justify-items: center; }
.card-photo { position: relative; width: 100%; aspect-ratio: 3 / 4; border-radius: 14px; overflow: hidden; background: var(--bg); display: grid; place-items: center; border: 1px solid var(--line); }
.card-photo img { width: 100%; height: 100%; object-fit: contain; }
.card-photo-empty { color: var(--muted); font-size: 14px; }
.photo-actions { display: flex; gap: 8px; }
.card-ref { width: 90px; border-radius: 6px; opacity: .8; }
.card-num { color: var(--yellow); font-weight: 700; font-size: 13px; }
.card-panel-form { min-width: 0; }
.card-panel-form h2 { font-size: 26px; margin: 2px 0 18px; padding-right: 40px; }
.card-panel-form fieldset { border: 0; padding: 0; margin: 0 0 18px; }
.card-panel-form legend { font-size: 14px; font-weight: 600; margin-bottom: 8px; padding: 0; }
.field { display: grid; gap: 6px; font-size: 14px; font-weight: 600; margin-bottom: 18px; }
.field[hidden] { display: none; }
.field select { min-width: 0; text-overflow: ellipsis; appearance: none; background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath fill='%239aa3c7' d='m7 10 5 5 5-5z'/%3E%3C/svg%3E"); background-repeat: no-repeat; background-position: right 10px center; background-size: 20px; padding-right: 36px; }
.opt-chips { display: flex; flex-wrap: wrap; gap: 8px; }
.opt-chip { cursor: pointer; }
.opt-chip input { position: absolute; opacity: 0; pointer-events: none; }
.opt-chip span {
    display: inline-flex; align-items: center; gap: 6px; padding: 8px 12px; border-radius: 10px; font-size: 13px; font-weight: 500;
    background: var(--bg); border: 1px solid var(--line); color: var(--muted); transition: all .15s;
}
.opt-chip span b { color: var(--text); }
.opt-chip input:checked + span { border-color: var(--yellow); background: rgba(255, 203, 5, .12); color: var(--text); }
.opt-chip input:focus-visible + span { outline: 2px solid var(--yellow); outline-offset: 2px; }
.opt-hint { margin-top: 8px; font-size: 13px; color: var(--muted); min-height: 1.3em; }
.view-list abbr[title] { text-decoration: underline dotted rgba(255, 255, 255, .35); text-underline-offset: 3px; cursor: help; }
.switch { display: flex; align-items: center; gap: 12px; font-weight: 600; font-size: 15px; cursor: pointer; margin-bottom: 18px; }
.switch input { position: absolute; opacity: 0; }
.switch-track { width: 46px; height: 26px; border-radius: 999px; background: var(--bg); border: 1px solid var(--line); position: relative; transition: background .2s; flex-shrink: 0; }
.switch-track i { position: absolute; top: 3px; left: 3px; width: 18px; height: 18px; border-radius: 50%; background: var(--muted); transition: transform .2s, background .2s; }
.switch input:checked + .switch-track { background: #22c55e; border-color: #22c55e; }
.switch input:checked + .switch-track i { transform: translateX(20px); background: #fff; }
.switch input:focus-visible + .switch-track { outline: 2px solid var(--yellow); outline-offset: 2px; }
.money { display: flex; align-items: center; border-radius: 12px; background: var(--bg); border: 1px solid var(--line); }
.money:focus-within { border-color: var(--yellow); box-shadow: 0 0 0 3px rgba(255, 203, 5, .2); }
.money b { padding-left: 14px; color: var(--muted); }
.money input { border: 0 !important; box-shadow: none !important; background: transparent !important; font-size: 18px !important; font-weight: 700 !important; }
.card-panel-actions { display: grid; gap: 8px; margin-top: 8px; }
.card-panel-actions [hidden] { display: none; }

/* Diálogos simples */
.dc-dialog {
    width: min(420px, calc(100% - 32px)); padding: 26px; border-radius: 20px; color: var(--text);
    background: var(--surface); border: 1px solid var(--line); box-shadow: 0 40px 100px -20px rgba(0, 0, 0, .9);
}
.dc-dialog::backdrop { background: rgba(4, 6, 18, .72); backdrop-filter: blur(4px); }
.dc-dialog h2 { font-size: 22px; margin-bottom: 14px; }
.dc-dialog p { margin-bottom: 20px; }
.dialog-actions { display: flex; justify-content: flex-end; gap: 8px; }

/* Lista de binders no painel */
.binder-list { display: grid; grid-template-columns: repeat(auto-fill, minmax(240px, 1fr)); gap: 14px; }
.binder-card {
    display: grid; gap: 10px; padding: 18px; border-radius: 16px; background: var(--bg); border: 1px solid var(--line);
    transition: border-color .2s, transform .2s;
}
.binder-card:hover { border-color: rgba(255, 203, 5, .45); transform: translateY(-2px); }
.binder-card-logo { height: 48px; display: flex; align-items: center; }
.binder-card-logo img { max-height: 48px; max-width: 150px; object-fit: contain; }
.binder-card-logo .dex-icon { width: 44px; height: 44px; }
.binder-card strong { font-size: 16px; overflow-wrap: anywhere; }
.binder-card small { color: var(--muted); font-size: 13px; }
.binder-card .bar { height: 6px; }
.binder-card-new { place-items: center; text-align: center; border-style: dashed; color: var(--muted); font-weight: 600; min-height: 150px; }
.binder-card-new span { width: 40px; height: 40px; border-radius: 50%; display: grid; place-items: center; background: rgba(255, 203, 5, .12); color: var(--yellow); font-size: 24px; }

/* ---------- Perfis ---------- */
.avatar.has-photo { background: var(--surface-2); overflow: hidden; }
.avatar.has-photo img { width: 100%; height: 100%; object-fit: cover; }
.avatar-lg { width: 56px; height: 56px; font-size: 22px; }
.avatar-xl { width: 112px; height: 112px; font-size: 44px; border: 4px solid var(--bg); box-shadow: 0 10px 30px -10px rgba(0, 0, 0, .8); }
.visually-hidden { position: absolute !important; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }

.profile-head { position: relative; margin-bottom: 28px; }
.profile-cover {
    height: 150px; border-radius: 22px; margin-bottom: -56px;
    background:
        radial-gradient(closest-side, rgba(255, 203, 5, .45), transparent) 85% 20% / 60% 140% no-repeat,
        radial-gradient(closest-side, rgba(59, 108, 255, .55), transparent) 15% 80% / 70% 160% no-repeat,
        radial-gradient(closest-side, rgba(239, 59, 74, .35), transparent) 50% 0% / 50% 120% no-repeat,
        var(--surface);
    border: 1px solid var(--line);
}
.profile-main { position: relative; display: flex; align-items: flex-start; gap: 18px; padding: 0 20px; flex-wrap: wrap; }
.profile-id { flex: 1; min-width: 200px; padding-top: 64px; }
.profile-id h1 { font-size: clamp(26px, 3.6vw, 36px); overflow-wrap: anywhere; }
.profile-user { color: var(--muted); font-weight: 600; display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }
.pill-private { font-size: 12px; font-weight: 700; padding: 3px 10px; border-radius: 999px; background: var(--surface-2); color: var(--text); border: 1px solid var(--line); }
.profile-cta { display: flex; gap: 6px; padding-top: 70px; }
.icon { width: 1em; height: 1em; fill: currentColor; vertical-align: -0.125em; flex-shrink: 0; }
.profile-meta span, .pill-private, .privacy-opt strong, .info-list dd, .person-info small { display: inline-flex; align-items: center; gap: 5px; }
.profile-bio { margin: 18px 20px 0; max-width: 640px; overflow-wrap: anywhere; }
.profile-meta { margin: 10px 20px 0; display: flex; gap: 6px 18px; flex-wrap: wrap; color: var(--muted); font-size: 14px; }
.profile-stats { display: flex; gap: 12px; margin: 20px 20px 0; }

.tabs { display: flex; gap: 4px; border-bottom: 1px solid var(--line); margin-bottom: 22px; }
.tabs a { padding: 12px 16px; font-weight: 600; color: var(--muted); border-bottom: 3px solid transparent; margin-bottom: -1px; }
.tabs a span { font-size: 12px; padding: 1px 8px; border-radius: 999px; background: var(--surface); margin-left: 4px; }
.tabs a.is-active { color: var(--text); border-color: var(--yellow); }

.private-box { text-align: center; padding: 48px 24px; }
.private-icon { display: inline-grid; place-items: center; width: 64px; height: 64px; border-radius: 50%; background: var(--surface-2); font-size: 28px; color: var(--yellow); margin-bottom: 12px; }
.private-box h2 { font-size: 22px; margin-bottom: 6px; }

.sale-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(200px, 1fr)); gap: 16px; }
.sale-card { display: grid; border-radius: 16px; overflow: hidden; background: var(--surface); border: 1px solid var(--line); transition: transform .2s, border-color .2s; }
.sale-card:hover { transform: translateY(-3px); border-color: rgba(34, 197, 94, .5); }
.sale-photo { position: relative; aspect-ratio: 3 / 4; background: var(--bg); }
.sale-photo > img:first-child { width: 100%; height: 100%; object-fit: cover; }
.sale-photo .flag { position: absolute; top: 10px; left: 10px; }
.sale-info { display: grid; gap: 4px; padding: 12px 14px 14px; }
.sale-info strong { font-size: 15px; }
.sale-info small { color: var(--muted); font-size: 12px; }
.sale-tags { display: flex; gap: 6px; margin-top: 2px; }
.sale-tags em { font-style: normal; font-size: 11px; font-weight: 700; padding: 2px 8px; border-radius: 6px; background: var(--bg); color: var(--muted); border: 1px solid var(--line); }
.sale-price { font-family: var(--font-head); font-size: 20px; color: #4ade80; margin-top: 4px; }

.binder-owner { display: inline-flex; align-items: center; gap: 10px; margin-bottom: 14px; color: var(--muted); font-size: 14px; }
.binder-owner strong { color: var(--text); }
.binder-owner:hover strong { color: var(--yellow); }
.sheets.is-readonly .pocket-slot:not(.is-owned) { cursor: default; }
.sheets.is-readonly .pocket-slot:not(.is-owned) .pocket-art::after { display: none; }
.sheets.is-readonly .pocket-slot:not(.is-owned):hover { transform: none; }
.view-price { display: inline-block; font-family: var(--font-head); font-size: 22px; color: #052e12; background: #4ade80; padding: 6px 14px; border-radius: 12px; margin-bottom: 18px; }
.view-list { margin-bottom: 16px; }
.view-list dd { display: flex; align-items: center; justify-content: flex-end; gap: 6px; }
.view-note { font-size: 13px; }

.page-wide-form .container { max-width: 560px; }
.avatar-edit { display: flex; align-items: center; gap: 18px; flex-wrap: wrap; }
.avatar-edit .avatar-xl { border-color: var(--surface-2); }
.avatar-edit-actions { display: flex; gap: 8px; flex-wrap: wrap; align-items: center; }
.avatar-edit-actions label.btn { cursor: pointer; }
.small-check { display: inline-flex; align-items: center; gap: 6px; font-size: 13px; color: var(--muted); font-weight: 500; }
.stack-form textarea, .stack-form .select {
    width: 100%; padding: 12px 14px; border-radius: 12px; font: inherit; font-weight: 400; color: var(--text);
    background: var(--bg); border: 1px solid var(--line); resize: vertical;
}
.stack-form textarea:focus, .stack-form .select:focus { outline: none; border-color: var(--yellow); box-shadow: 0 0 0 3px rgba(255, 203, 5, .2); }
.privacy { border: 0; padding: 0; margin: 0; display: grid; gap: 10px; }
.privacy legend { font-size: 14px; font-weight: 600; margin-bottom: 8px; padding: 0; }
.privacy-opt { display: flex !important; gap: 12px; align-items: flex-start; padding: 14px; border-radius: 14px; border: 2px solid var(--line); cursor: pointer; font-weight: 400 !important; }
.privacy-opt:has(input:checked) { border-color: var(--yellow); background: rgba(255, 203, 5, .06); }
.privacy-opt input { margin-top: 3px; accent-color: var(--yellow); width: 18px; height: 18px; flex-shrink: 0; }
.privacy-opt span { color: var(--muted); font-size: 14px; }
.privacy-opt strong { display: block; color: var(--text); font-size: 15px; margin-bottom: 2px; }
.account-links { display: grid; gap: 8px; }

.people-search { max-width: 560px; }
.results-line { margin: -8px 0 18px; font-size: 14px; }
.people-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(320px, 1fr)); gap: 12px; }
.person { display: flex; align-items: center; gap: 14px; padding: 14px; border-radius: 16px; background: var(--surface); border: 1px solid var(--line); transition: border-color .2s, transform .2s; min-width: 0; }
.person:hover { border-color: rgba(255, 203, 5, .45); transform: translateY(-2px); }
.person-info { display: grid; gap: 1px; min-width: 0; }
.person-info strong, .person-info small { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.person-info small { color: var(--muted); font-size: 13px; }
.pager { display: flex; align-items: center; justify-content: center; gap: 12px; margin-top: 28px; }

/* ---------- Configurações (admin) ---------- */
.flash-error { color: #ff8a94; background: rgba(239, 59, 74, .1); border-color: rgba(239, 59, 74, .35); }
.dropdown-admin { color: var(--yellow) !important; }
.admin-summary { display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); gap: 12px; margin-bottom: 22px; }
.admin-filters { display: flex; gap: 12px; flex-wrap: wrap; align-items: center; margin-bottom: 14px; }
.admin-filters .set-search { flex: 1 1 280px; margin: 0; }
.user-table { display: grid; gap: 10px; margin-bottom: 24px; }
.user-row {
    display: grid; grid-template-columns: minmax(0, 1fr) 240px 380px; gap: 20px; align-items: center;
    padding: 14px 16px; border-radius: 16px; background: var(--surface); border: 1px solid var(--line);
}
.user-row.is-blocked { opacity: .75; border-color: rgba(239, 59, 74, .35); }
.user-row-main { display: flex; align-items: center; gap: 12px; min-width: 0; }
.user-row-id { display: grid; gap: 2px; min-width: 0; }
.user-row-id > span { font-size: 13px; color: var(--muted); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.user-row-id em { font-style: normal; opacity: .7; }
.badges { display: flex !important; gap: 6px; flex-wrap: wrap; margin-top: 4px; white-space: normal !important; }
.badge { display: inline-flex; align-items: center; gap: 4px; font-size: 11px; font-weight: 700; padding: 2px 8px; border-radius: 999px; background: var(--bg); color: var(--muted); border: 1px solid var(--line); }
.b-admin { background: var(--yellow); color: #1a1400; border-color: var(--yellow); }
.b-blocked { background: rgba(239, 59, 74, .15); color: #ff8a94; border-color: rgba(239, 59, 74, .4); }
.b-pending { background: rgba(255, 159, 28, .14); color: #ffb35c; border-color: rgba(255, 159, 28, .4); }
.b-ok { background: rgba(34, 197, 94, .12); color: #4ade80; border-color: rgba(34, 197, 94, .35); }
.user-row-info { margin: 0; display: grid; gap: 4px; font-size: 13px; }
.user-row-info div { display: flex; justify-content: space-between; gap: 10px; }
.user-row-info dt { color: var(--muted); }
.user-row-info dd { margin: 0; font-weight: 600; }
.user-row-actions { display: flex; gap: 4px; flex-wrap: wrap; justify-content: flex-end; }
.user-row-actions form { display: contents; }
.admin-log h2 { font-size: 18px; margin-bottom: 12px; }
.admin-log ul { list-style: none; padding: 0; margin: 0; display: grid; gap: 8px; font-size: 14px; }
.admin-log li { display: flex; gap: 12px; flex-wrap: wrap; }
.admin-email { display: grid; grid-template-columns: minmax(0, 1.5fr) minmax(0, 1fr); gap: 24px; align-items: start; }
.admin-email h2 { font-size: 20px; margin-bottom: 4px; }
.admin-email .muted { margin-bottom: 18px; }
.split-3 { grid-template-columns: minmax(0, 1.6fr) minmax(0, .7fr) minmax(0, 1fr) !important; }
.status-line { display: flex; align-items: center; gap: 8px; margin-top: 18px; font-size: 14px; color: var(--muted); }
.dot { width: 10px; height: 10px; border-radius: 50%; background: var(--red); }
.dot.is-on { background: #22c55e; }

/* ---------- Comunidades ---------- */
.community-avatar {
    display: grid; place-items: center; flex-shrink: 0; border-radius: 22%; overflow: hidden;
    background: linear-gradient(135deg, #3b6cff, #8b5cf6 55%, #ef3b4a); color: #fff;
    font-family: var(--font-head); font-weight: 800; width: 44px; height: 44px; font-size: 16px;
}
.community-avatar.has-photo { background: var(--surface-2); }
.community-avatar.has-photo img { width: 100%; height: 100%; object-fit: cover; }
.community-avatar-sm { width: 32px; height: 32px; font-size: 12px; }
.community-avatar-lg { width: 60px; height: 60px; font-size: 22px; }
.community-avatar-xl { width: 112px; height: 112px; font-size: 40px; border: 4px solid var(--bg); box-shadow: 0 10px 30px -10px rgba(0, 0, 0, .8); }
.community-cover {
    background:
        radial-gradient(closest-side, rgba(139, 92, 246, .55), transparent) 80% 30% / 60% 150% no-repeat,
        radial-gradient(closest-side, rgba(59, 108, 255, .5), transparent) 20% 70% / 70% 160% no-repeat,
        radial-gradient(closest-side, rgba(255, 203, 5, .3), transparent) 50% 0% / 50% 120% no-repeat,
        var(--surface);
}
.page-head-row { display: flex; align-items: flex-end; justify-content: space-between; gap: 16px; flex-wrap: wrap; margin-bottom: 8px; }
.page-head-row .page-title { margin-bottom: 0; }
.community-section { margin-top: 28px; }
.section-mini { font-family: var(--font-body); font-size: 13px; letter-spacing: .06em; text-transform: uppercase; color: var(--muted); margin-bottom: 14px; }
.community-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(300px, 1fr)); gap: 12px; }
.community-card {
    display: flex; gap: 14px; align-items: flex-start; padding: 16px; border-radius: 16px; min-width: 0;
    background: var(--surface); border: 1px solid var(--line); transition: border-color .2s, transform .2s;
}
.community-card:hover { border-color: rgba(255, 203, 5, .45); transform: translateY(-2px); }
.community-card-info { display: grid; gap: 3px; min-width: 0; }
.community-card-info strong { font-size: 16px; overflow-wrap: anywhere; }
.community-card-info small { display: inline-flex; align-items: center; gap: 5px; color: var(--muted); font-size: 13px; }
.community-card-desc { color: var(--muted); font-size: 13px; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.person-row { justify-content: space-between; }
.person-row:hover { transform: none; }
.person-link { display: flex; align-items: center; gap: 14px; min-width: 0; flex: 1; }
.person-link:hover strong { color: var(--yellow); }
.request-actions { display: flex; gap: 6px; flex-shrink: 0; }
.tab-alert { background: var(--red) !important; color: #fff; }
.empty-line { margin: 18px 0; }
.section-note { margin: -8px 0 16px; font-size: 14px; }
.danger-zone { margin-top: 18px; padding-top: 16px; border-top: 1px solid var(--line); }
.profile-meta a.text-strong:hover { color: var(--yellow); }
.user-btn { position: relative; }
.notif-dot { position: absolute; top: 2px; left: 30px; width: 11px; height: 11px; border-radius: 50%; background: var(--red); border: 2px solid var(--bg); }
.count-pill { display: inline-grid; place-items: center; min-width: 20px; height: 20px; padding: 0 6px; border-radius: 999px; background: var(--red); color: #fff; font-size: 11px; font-weight: 800; margin-left: 4px; }
.alert-line { padding: 10px 12px; border-radius: 12px; background: rgba(239, 59, 74, .1); border: 1px solid rgba(239, 59, 74, .3); color: #ff8a94; font-size: 14px; font-weight: 600; margin-bottom: 12px; }
.mini-communities { list-style: none; padding: 0; margin: 0 0 16px; display: grid; gap: 6px; }
.mini-communities a { display: flex; align-items: center; gap: 10px; padding: 6px; border-radius: 10px; font-size: 14px; font-weight: 600; }
.mini-communities a:hover { background: rgba(255, 255, 255, .05); }
.mini-communities a span { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }

/* ---------- Responsivo ---------- */
@media (max-width: 1080px) {
    .user-row { grid-template-columns: minmax(0, 1fr) 220px; }
    .user-row-actions { grid-column: 1 / -1; justify-content: flex-start; }
    .header-inner { gap: 16px; }
    .main-nav a { padding: 8px 10px; }
    .card-grid { grid-template-columns: repeat(3, 1fr); }
}

@media (max-width: 920px) {
    .nav-toggle { display: inline-flex; }
    .main-nav {
        position: absolute; top: var(--header-h); left: 0; right: 0; flex-direction: column; gap: 0;
        padding: 8px 16px 16px; background: #0b1026; border-bottom: 1px solid var(--line); box-shadow: 0 24px 40px -12px rgba(0, 0, 0, .7);
        transform: translateY(-8px); opacity: 0; visibility: hidden; transition: all .2s ease;
    }
    .main-nav.is-open { transform: none; opacity: 1; visibility: visible; }
    .main-nav a { padding: 12px 8px; border-radius: 10px; }

    .hero { padding: 48px 0 16px; }
    .hero-inner, .binder-wrap { grid-template-columns: 1fr; }
    .hero-copy { text-align: center; }
    .hero-copy .lead { margin-inline: auto; }
    .hero-actions, .hero-points { justify-content: center; }
    .hero-fan { height: 420px; }
    .fan-card { width: 210px; }
    .fan-1 { width: 235px; }

    .steps { grid-template-columns: 1fr; }
    .set-grid { grid-template-columns: repeat(2, 1fr); }
    .binder { max-width: 560px; margin-inline: auto; width: 100%; }

    .cta-inner { flex-direction: column; text-align: center; padding: 160px 28px 36px; }
    .cta-inner .btn { margin-left: 0; }
    .cta-pika { left: 50%; top: -60px; bottom: auto; width: 190px; transform: translateX(-50%); }
    .cta { padding-top: 120px; }
}

@media (max-width: 640px) {
    :root { --header-h: 64px; }
    .brand-mark { width: 38px; height: 38px; }
    .brand-word { font-size: 22px; }
    .header-auth .btn-ghost span { display: none; }
    .header-auth .btn-ghost { padding: 10px; }
    .user-name { display: none; }
    .user-btn { padding: 3px 6px 3px 3px; gap: 4px; }
    .btn-register { padding: 9px 14px; font-size: 14px; }
    .section { padding: 72px 0; }
    .card-grid { grid-template-columns: repeat(2, 1fr); gap: 24px 14px; }
    .card-meta h3 { font-size: 16px; }
    .hero { padding: 36px 0 0; }
    .hero h1 { margin: 14px 0 16px; }
    .lead { font-size: 16px; }
    .hero-actions { flex-direction: column; align-items: stretch; max-width: 340px; margin: 28px auto 24px; }
    .hero-points { gap: 8px 16px; font-size: 13px; }
    .hero-fan { height: 74vw; margin-top: 8px; }
    .fan-card { width: 36vw; }
    .fan-1 { width: 44vw; }
    .fan-0 { transform: translate(-108%, -46%) rotate(-10deg); }
    .fan-2 { transform: translate(8%, -46%) rotate(10deg); }
    .section-head { margin-bottom: 32px; }
    .binder-wrap { gap: 40px; }
    .binder-copy .btn { width: 100%; }
    .set-grid { grid-template-columns: 1fr 1fr; gap: 12px; }
    .set-item { flex-direction: column; text-align: center; gap: 10px; padding: 18px 12px; }
    .set-item img { width: 100%; max-width: 130px; height: 50px; }
    .set-item strong { font-size: 14px; }
    .cta { padding: 96px 0 64px; }
    .cta-inner { padding: 120px 20px 28px; border-radius: 22px; }
    .cta-pika { width: 160px; top: -56px; }
    .cta-inner .btn { width: 100%; }
    .binder { padding: 16px 14px 16px 34px; }
    .binder-rings { left: 9px; }
    .binder-rings i { width: 14px; height: 14px; }
    .binder-page { gap: 8px; }
    .pocket-empty { font-size: 11px; }
    .pocket-empty small { display: none; }
    .footer-grid { grid-template-columns: 1fr 1fr; }
    .footer-brand { grid-column: 1 / -1; }
    .auth-panel { padding: 26px 20px; }
    .auth-split { grid-template-columns: 1fr; }
}

@media (max-width: 380px) {
    .container { width: calc(100% - 24px); }
    .header-inner { gap: 8px; }
    .header-auth { gap: 4px; }
    .brand { gap: 5px; }
    .brand-mark { width: 32px; height: 32px; }
    .brand-word { font-size: 19px; }
    .btn-register { padding: 8px 12px; font-size: 13px; }
    .header-auth .btn-ghost { padding: 8px; }
    .nav-toggle { width: 38px; height: 38px; }
    .user-name { display: none; }
    .user-btn { padding-right: 6px; }
    .rarity { font-size: 11px; padding: 3px 8px; }
}

/* Dica de "passe o mouse" só faz sentido em quem tem mouse */
@media (hover: none) {
    .hover-hint { display: none; }
}

@media (max-width: 920px) {
    .sheets { grid-template-columns: minmax(0, 1fr); }
    .type-grid { grid-template-columns: minmax(0, 1fr); }
    .card-panel { grid-template-columns: minmax(0, 1fr); gap: 18px; }
    .card-panel-media { grid-template-columns: minmax(0, 1fr); justify-items: stretch; }
    .photo-actions { grid-column: 1 / -1; justify-content: center; }
}
@media (max-width: 640px) {
    .type-grid { grid-template-columns: 1fr; }
    .set-pick-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; }
    .create-bar { flex-direction: column; align-items: stretch; }
    .binder-set-logo { width: 72px; }
    .binder-search { flex: 1 1 100%; }
    .sheet { padding: 16px 10px 10px; }
    .sheet-grid { gap: 7px; }
    .pocket-label { font-size: 10px; }
    .price-tag { font-size: 10px; padding: 1px 4px; }
    .sheets.is-filtered .sheet-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); }
    /* Modal da carta vira painel de baixo para cima no celular */
    .card-modal { padding: 0; place-items: end stretch; }
    .card-panel { width: 100%; max-height: 92vh; border-radius: 22px 22px 0 0; padding: 22px 18px calc(22px + env(safe-area-inset-bottom)); animation: sheet-up .25s ease; }
    .card-panel-form h2 { font-size: 22px; }
    .binder-list { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (max-width: 640px) {
    .profile-cover { height: 110px; margin-bottom: -48px; border-radius: 18px; }
    .profile-main { padding: 0 6px; gap: 12px; }
    .avatar-xl { width: 92px; height: 92px; font-size: 36px; }
    .profile-id { padding-top: 52px; min-width: 0; }
    .profile-cta { width: 100%; padding-top: 0; }
    .profile-cta .btn { flex: 1; }
    .profile-bio, .profile-meta { margin-left: 6px; margin-right: 6px; }
    .profile-stats { margin: 18px 0 0; }
    .profile-stats .stat { flex: 1; min-width: 0; padding: 12px; }
    .sale-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; }
    .sale-info { padding: 10px; }
    .sale-price { font-size: 17px; }
    .people-grid { grid-template-columns: minmax(0, 1fr); }
}
@media (max-width: 920px) {
    .admin-summary { grid-template-columns: repeat(3, minmax(0, 1fr)); }
    .user-row { grid-template-columns: minmax(0, 1fr); }
    .user-row-actions { justify-content: flex-start; }
    .admin-email { grid-template-columns: minmax(0, 1fr); }
}
@media (max-width: 640px) {
    .admin-summary { grid-template-columns: repeat(2, minmax(0, 1fr)); }
    .admin-summary .stat { min-width: 0; }
    .split-3 { grid-template-columns: minmax(0, 1fr) !important; }
}
@media (max-width: 640px) {
    .community-grid { grid-template-columns: minmax(0, 1fr); }
    .community-avatar-xl { width: 92px; height: 92px; font-size: 32px; }
    .person-row { flex-wrap: wrap; }
    .request-actions { width: 100%; }
    .request-actions .btn { flex: 1; }
    .page-head-row .btn { width: 100%; }
}
@keyframes sheet-up { from { transform: translateY(40px); opacity: 0; } }

@media (prefers-reduced-motion: reduce) {
    *, *::before, *::after { animation: none !important; transition: none !important; scroll-behavior: auto !important; }
}

/* ---------- Binder livre: busca de cartas no catálogo ---------- */
.card-panel.search-panel { width: min(760px, 100%); display: block; }
.search-panel h2 { font-size: 24px; margin-bottom: 6px; padding-right: 40px; }
.search-panel > .muted { font-size: 14px; margin-bottom: 18px; }
.search-fields { display: grid; grid-template-columns: minmax(0, 1.3fr) minmax(0, 1fr); gap: 12px; }
.search-fields .field { margin-bottom: 8px; }
.search-panel .auth-msg:empty { display: none; }
.search-results {
    display: grid; grid-template-columns: repeat(auto-fill, minmax(112px, 1fr)); gap: 12px;
    margin-top: 8px; transition: opacity .2s;
}
.search-results.is-loading { opacity: .5; }
.search-card { display: grid; gap: 3px; padding: 0; border: 0; background: none; color: inherit; text-align: left; font: inherit; cursor: pointer; }
.search-card-art {
    position: relative; display: grid; place-items: center; aspect-ratio: 245 / 342; border-radius: 8px; overflow: hidden;
    background: rgba(255, 255, 255, .05); box-shadow: inset 0 0 0 1px rgba(255, 255, 255, .06); transition: transform .15s, box-shadow .15s;
}
.search-card-art img { width: 100%; height: 100%; object-fit: cover; }
.search-card-art em { font-style: normal; font-size: 12px; font-weight: 600; color: var(--muted); text-align: center; padding: 8px; }
.search-card:hover .search-card-art, .search-card:focus-visible .search-card-art { transform: translateY(-2px); box-shadow: 0 0 0 2px var(--yellow); }
.search-card:focus-visible { outline: none; }
.search-card:disabled { cursor: progress; opacity: .6; }
.search-card strong { font-size: 12px; line-height: 1.3; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.search-card small { font-size: 11px; color: var(--muted); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.search-card-tag {
    position: absolute; left: 5px; bottom: 5px; font-size: 10px; font-weight: 800; padding: 2px 6px; border-radius: 6px;
    background: var(--yellow); color: #1a1400;
}
.search-card.is-added .search-card-art { box-shadow: 0 0 0 2px #22c55e; }
.search-foot {
    display: flex; flex-wrap: wrap; align-items: center; justify-content: flex-end; gap: 10px;
    margin: 4px 0 16px; padding-bottom: 16px; border-bottom: 1px solid var(--line); font-size: 14px;
}
@media (max-width: 640px) {
    .search-fields { grid-template-columns: minmax(0, 1fr); gap: 0; }
    .search-results { grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 10px; }
    .search-foot { justify-content: space-between; }
}

/* ---------- Pedidos de compra ---------- */
.container-mid { width: min(880px, 100% - 32px); }
.buy-box { display: grid; gap: 8px; margin: 4px 0 16px; }
.buy-box small { text-align: center; font-size: 13px; }
.buy-sent { display: grid; gap: 4px; padding: 12px 14px; border-radius: 12px; background: rgba(34, 197, 94, .1); border: 1px solid rgba(34, 197, 94, .35); font-size: 14px; }
.buy-sent span { font-weight: 700; color: #4ade80; }
.buy-sent a { color: var(--yellow); font-weight: 600; }
.buy-form { margin: 4px 0 16px; padding-top: 16px; border-top: 1px solid var(--line); }
.buy-form h3 { font-size: 18px; margin-bottom: 14px; }
.buy-form .field small { font-weight: 400; }
.buy-form textarea, .order-reply textarea {
    width: 100%; padding: 12px 14px; border-radius: 12px; border: 1px solid var(--line); background: var(--bg); color: var(--text);
    font: inherit; font-weight: 400; resize: vertical; min-height: 64px;
}
.buy-form textarea:focus, .order-reply textarea:focus { outline: none; border-color: var(--yellow); box-shadow: 0 0 0 3px rgba(255, 203, 5, .2); }
.buy-form > small { display: block; font-size: 12px; margin-top: 10px; }
.buy-actions { display: grid; gap: 8px; }

.order-banner {
    display: flex; align-items: center; gap: 12px; padding: 14px 18px; margin-bottom: 20px; border-radius: 14px;
    background: rgba(255, 203, 5, .08); border: 1px solid rgba(255, 203, 5, .35); transition: background .2s;
}
.order-banner:hover { background: rgba(255, 203, 5, .14); }
.order-banner .count-pill { margin: 0; flex-shrink: 0; }
.order-banner strong { color: var(--yellow); white-space: nowrap; }

.order-list { display: grid; gap: 14px; }
.order {
    display: grid; grid-template-columns: 120px minmax(0, 1fr); gap: 20px; padding: 18px; border-radius: 18px;
    background: var(--surface); border: 1px solid var(--line);
}
.order.is-pendente { border-color: rgba(255, 203, 5, .35); }
.order.is-recusado, .order.is-cancelado { opacity: .7; }
.order-photo {
    display: grid; place-items: center; aspect-ratio: 3 / 4; border-radius: 10px; overflow: hidden; background: var(--bg); border: 1px solid var(--line);
    align-self: start;
}
.order-photo img { width: 100%; height: 100%; object-fit: cover; }
.order-photo em { font-style: normal; font-size: 12px; color: var(--muted); text-align: center; padding: 8px; }
.order-top { display: flex; align-items: flex-start; justify-content: space-between; gap: 10px; margin-bottom: 10px; }
.order-top h2 { font-size: 20px; overflow-wrap: anywhere; }
.order-status { flex-shrink: 0; font-size: 12px; font-weight: 700; padding: 4px 10px; border-radius: 999px; background: var(--surface-2); color: var(--muted); }
.is-pendente .order-status { background: rgba(255, 203, 5, .14); color: var(--yellow); }
.is-aceito .order-status { background: rgba(34, 197, 94, .15); color: #4ade80; }
.is-recusado .order-status { background: rgba(239, 59, 74, .14); color: #ff8a94; }
.order-person { display: inline-flex; align-items: center; gap: 8px; font-size: 14px; color: var(--muted); margin-bottom: 12px; }
.order-person strong { color: var(--text); }
.order-person:hover strong { color: var(--yellow); }
.order-values { display: flex; flex-wrap: wrap; gap: 8px 28px; margin-bottom: 12px; }
.order-values dt { font-size: 12px; color: var(--muted); }
.order-values dd { font-weight: 600; margin: 0; }
.order-values dd b { color: #4ade80; }
.order-msg { padding: 10px 14px; border-radius: 12px; background: var(--bg); border: 1px solid var(--line); font-size: 14px; margin-bottom: 10px; overflow-wrap: anywhere; }
.order-msg span { display: block; font-size: 12px; color: var(--muted); margin-bottom: 2px; }
.order-msg.is-answer { border-color: rgba(255, 203, 5, .25); }
.order-contact { padding: 10px 14px; border-radius: 12px; background: rgba(34, 197, 94, .1); border: 1px solid rgba(34, 197, 94, .35); font-size: 14px; margin-bottom: 10px; overflow-wrap: anywhere; }
.order-contact a { color: #4ade80; font-weight: 700; }
.order-reply { margin: 6px 0 10px; }
.order-actions { display: flex; flex-wrap: wrap; gap: 8px; }
.order-note { font-size: 12px; margin-top: 8px; }
@media (max-width: 640px) {
    .order { grid-template-columns: 84px minmax(0, 1fr); gap: 14px; padding: 14px; }
    .order-top { flex-direction: column; gap: 6px; }
    .order-top h2 { font-size: 17px; }
    .order-banner { align-items: flex-start; }
    .order-banner strong { white-space: normal; }
}

/* ---------- Carta: imagem oficial com lupa, fotos frente e verso, "Procuro" ---------- */
/* Carta que falta fica colorida ao passar o mouse */
.pocket-slot:not(.is-owned):hover .pocket-art img { filter: none; opacity: 1; }

.want-tag { font-size: 11px; font-weight: 800; padding: 2px 7px; border-radius: 6px; background: #60a5fa; color: #06203f; white-space: nowrap; margin-left: auto; }
.pocket-slot.is-want .pocket-art { box-shadow: 0 0 0 2px rgba(96, 165, 250, .7); }
.pocket-slot.is-want .pocket-art img { opacity: .5; }
.pocket-slot.is-want .pocket-label { color: #93c5fd; }
.sheets.is-readonly .pocket-slot.is-want { cursor: pointer; }
.sheets.is-readonly .pocket-slot.is-want:hover { transform: translateY(-2px); }

.card-view {
    position: relative; width: 100%; aspect-ratio: 245 / 342; border-radius: 14px; overflow: hidden;
    background: var(--bg); border: 1px solid var(--line); display: grid; place-items: center;
}
.card-view img { width: 100%; height: 100%; object-fit: contain; cursor: zoom-in; }
.zoom-btn {
    position: absolute; right: 10px; bottom: 10px; width: 42px; height: 42px; border-radius: 50%; border: 0;
    display: grid; place-items: center; background: rgba(11, 16, 38, .82); backdrop-filter: blur(4px);
    box-shadow: 0 0 0 1px rgba(255, 255, 255, .15); cursor: zoom-in; transition: background .15s;
}
.zoom-btn svg { width: 22px; height: 22px; fill: var(--yellow); }
.zoom-btn:hover { background: var(--yellow); }
.zoom-btn:hover svg { fill: #1a1400; }
.card-view img[hidden] + .card-photo-empty { display: block; }

.photo-pair { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; width: 100%; }
.photo-tile { display: grid; gap: 6px; }
.photo-thumb {
    position: relative; aspect-ratio: 4 / 3; border-radius: 10px; overflow: hidden; padding: 0; cursor: pointer;
    background: var(--bg); border: 1px dashed rgba(255, 255, 255, .22); color: var(--muted); font: inherit;
}
.photo-thumb img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.photo-thumb span { display: grid; justify-items: center; gap: 4px; font-size: 12px; font-weight: 700; }
.photo-thumb svg { width: 20px; height: 20px; fill: currentColor; }
.photo-thumb:hover { border-color: var(--yellow); color: var(--yellow); }
.photo-tile.has-photo .photo-thumb { border-style: solid; border-color: rgba(255, 203, 5, .45); cursor: zoom-in; }
.photo-tile.has-photo .photo-thumb span {
    position: absolute; left: 6px; bottom: 6px; padding: 2px 8px; border-radius: 6px; background: rgba(11, 16, 38, .8); color: var(--text);
}
.photo-tile.has-photo .photo-thumb span svg { display: none; }
.photo-tile-actions { display: flex; justify-content: center; gap: 4px; }
.photo-tile-actions button {
    border: 0; background: none; color: var(--muted); font: inherit; font-size: 12px; font-weight: 600; padding: 4px 8px; border-radius: 8px; cursor: pointer;
}
.photo-tile-actions button:hover { color: var(--yellow); background: rgba(255, 203, 5, .08); }
.photo-note { font-size: 12px; color: var(--muted); text-align: center; }

.want-btn.is-on { border-color: #60a5fa; color: #93c5fd; background: rgba(96, 165, 250, .1); }
.want-btn[hidden] { display: none; }
.view-want { display: flex; align-items: center; gap: 8px; margin-bottom: 18px; font-size: 15px; }
.view-want .want-tag { margin: 0; font-size: 12px; }
.photos-btn { display: inline-flex; align-items: center; gap: 8px; }
.photos-btn svg { width: 18px; height: 18px; fill: currentColor; }
.photos-btn[hidden] { display: none; }

/* Tela cheia (lupa) */
.lightbox {
    position: fixed; inset: 0; z-index: 200; display: grid; grid-template-rows: auto minmax(0, 1fr) auto;
    background: rgba(4, 6, 18, .94); padding: calc(14px + env(safe-area-inset-top, 0px)) 14px calc(14px + env(safe-area-inset-bottom, 0px));
}
.lightbox[hidden] { display: none; }
.lightbox-tabs { display: flex; justify-content: center; gap: 6px; min-height: 40px; padding-right: 48px; padding-left: 48px; }
.lightbox-tabs button {
    padding: 8px 16px; border-radius: 999px; border: 1px solid var(--line); background: var(--surface); color: var(--muted); font: inherit; font-weight: 600; cursor: pointer;
}
.lightbox-tabs button.is-active { background: var(--yellow); border-color: var(--yellow); color: #1a1400; }
.lightbox-close { position: absolute; top: calc(12px + env(safe-area-inset-top, 0px)); right: 12px; z-index: 2; }
.lightbox-stage { overflow: auto; display: grid; place-items: center; margin-top: 10px; }
.lightbox-stage img { max-width: 100%; max-height: 100%; object-fit: contain; border-radius: 12px; cursor: zoom-in; }
.lightbox.is-zoomed .lightbox-stage { place-items: start; }
.lightbox.is-zoomed .lightbox-stage img { max-width: none; max-height: none; width: 220%; cursor: zoom-out; border-radius: 0; }
.lightbox-hint { text-align: center; font-size: 12px; color: var(--muted); margin-top: 8px; }
@media (min-width: 921px) {
    .lightbox.is-zoomed .lightbox-stage img { width: auto; height: 200vh; }
}
@media (max-width: 920px) {
    .card-view { max-width: 260px; justify-self: center; }
}

/* Criar binder: coleções por país */
.country-chips { margin-bottom: 14px; }
.country-chips .chip { display: inline-flex; align-items: center; gap: 6px; }
.country-chips .chip small { font-size: 11px; opacity: .7; }
.country-chips .chip:disabled { opacity: .4; cursor: not-allowed; }
@media (max-width: 640px) {
    .photo-thumb { aspect-ratio: 16 / 9; }
}

/* Pokédex: carta escolhida para o Pokémon */
.dex-choice { margin: -8px 0 18px; padding: 12px 14px; border-radius: 12px; background: var(--bg); border: 1px solid var(--line); }
.dex-choice p { font-size: 13px; margin-bottom: 10px; }
.dex-choice-actions { display: flex; flex-wrap: wrap; gap: 8px; }
.dex-choice-actions [hidden] { display: none; }

/* ---------- Encontrar pessoas e comunidades: @ e QR code ---------- */
.find-intro { margin: -16px 0 22px; }
.find-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 16px; margin-bottom: 16px; }
.find-box h2 { font-size: 19px; margin-bottom: 12px; }
.find-box > .muted { font-size: 14px; margin-bottom: 14px; }
.at-search {
    display: flex; align-items: center; gap: 8px; padding: 6px 6px 6px 14px; border-radius: 14px;
    background: var(--bg); border: 1px solid var(--line);
}
.at-search:focus-within { border-color: var(--yellow); box-shadow: 0 0 0 3px rgba(255, 203, 5, .2); }
.at-sign { font-size: 20px; font-weight: 800; color: var(--yellow); }
.at-search input { flex: 1; min-width: 0; border: 0; background: none; color: var(--text); font: inherit; font-size: 17px; font-weight: 600; padding: 8px 0; }
.at-search input:focus { outline: none; }
.at-search .btn { flex-shrink: 0; padding: 10px 18px; }
.find-msg { font-size: 13px; margin-top: 10px; }
.find-actions { display: flex; flex-wrap: wrap; gap: 8px; }
.find-actions .btn svg { width: 20px; height: 20px; fill: currentColor; }
.find-actions .btn { display: inline-flex; align-items: center; gap: 8px; }
.find-box .auth-msg { margin-top: 10px; }

.my-qr { display: flex; align-items: center; gap: 24px; }
.my-qr-code canvas { display: block; border-radius: 14px; }
.my-qr-info h2 { font-size: 20px; margin-bottom: 8px; }
.my-qr-info p { margin-bottom: 14px; }

.btn-qr { display: inline-flex; align-items: center; gap: 8px; }
.btn-qr svg { width: 18px; height: 18px; fill: currentColor; }
.community-at { font-weight: 600; color: var(--muted); }

.qr-dialog { text-align: center; width: min(360px, calc(100% - 32px)); position: relative; }
.qr-dialog .auth-close { position: absolute; top: 12px; right: 12px; }
.qr-holder { display: flex; justify-content: center; margin: 10px 0 14px; }
.qr-holder canvas { border-radius: 14px; max-width: 100%; height: auto !important; }
.qr-user { display: block; font-size: 20px; }
.qr-dialog > .muted { display: block; font-size: 14px; }
.qr-dialog p { margin: 10px 0 18px; }
.qr-dialog .dialog-actions { justify-content: center; }

/* Câmera do leitor */
.scanner { position: fixed; inset: 0; z-index: 210; background: #000; display: grid; place-items: center; }
.scanner[hidden] { display: none; }
.scanner video { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.scanner-frame {
    position: relative; width: min(70vw, 300px); aspect-ratio: 1; border-radius: 22px;
    box-shadow: 0 0 0 100vmax rgba(0, 0, 0, .55); border: 3px solid var(--yellow);
}
.scanner-hint {
    position: absolute; left: 0; right: 0; bottom: calc(40px + env(safe-area-inset-bottom, 0px));
    text-align: center; color: #fff; font-weight: 600; text-shadow: 0 1px 4px rgba(0, 0, 0, .8);
}
.scanner-close { position: absolute; top: calc(14px + env(safe-area-inset-top, 0px)); right: 14px; z-index: 2; }

@media (max-width: 760px) {
    .find-grid { grid-template-columns: minmax(0, 1fr); }
    .my-qr { flex-direction: column; text-align: center; }
    .my-qr .find-actions { justify-content: center; }
}

/* Painel: meu QR code (abaixo de editar perfil / trocar senha) */
.panel-qr { display: grid; justify-items: center; gap: 6px; margin-top: 20px; padding-top: 20px; border-top: 1px solid var(--line); text-align: center; }
.panel-qr .qr-holder { margin: 0 0 6px; }
.panel-qr p { font-size: 13px; }
.find-mine { font-size: 14px; }
.find-mine a { color: var(--yellow); font-weight: 600; }

/* ---------- Seguir, avisos e foto do perfil ---------- */
.bell { position: relative; display: grid; place-items: center; width: 42px; height: 42px; border-radius: 50%; color: var(--muted); transition: background .15s, color .15s; flex-shrink: 0; }
.bell svg { width: 22px; height: 22px; fill: currentColor; }
.bell:hover, .bell.is-active { background: var(--surface); color: var(--yellow); }
.bell-count {
    position: absolute; top: 2px; right: 0; min-width: 18px; height: 18px; padding: 0 5px; border-radius: 999px;
    display: grid; place-items: center; background: var(--red); color: #fff; font-size: 10px; font-weight: 800; border: 2px solid var(--bg);
}
.header-auth { gap: 6px; }

.notice-list { display: grid; gap: 10px; }
.notice { display: flex; gap: 14px; align-items: flex-start; padding: 14px 16px; border-radius: 16px; background: var(--surface); border: 1px solid var(--line); }
.notice.is-new { border-color: rgba(255, 203, 5, .45); background: linear-gradient(0deg, rgba(255, 203, 5, .05), rgba(255, 203, 5, .05)), var(--surface); }
.notice-body { display: grid; gap: 4px; min-width: 0; }
.notice-body p { overflow-wrap: anywhere; }
.notice-body p a:hover strong { color: var(--yellow); }
.notice-body small { font-size: 12px; }
.notice-actions { margin-top: 6px; }
.notice-state { color: #4ade80; font-weight: 600; }
.notice-state.muted { color: var(--muted); }

a.stat { transition: border-color .15s; }
a.stat:hover { border-color: rgba(255, 203, 5, .45); }
a.stat:hover strong { color: var(--yellow); }
.follow-banner { margin: 16px 20px 0; }

.avatar-change { position: relative; padding: 0; border: 0; background: none; border-radius: 50%; cursor: pointer; flex-shrink: 0; }
.avatar-cam {
    position: absolute; right: 2px; bottom: 2px; width: 34px; height: 34px; border-radius: 50%; display: grid; place-items: center;
    background: var(--yellow); border: 3px solid var(--bg); transition: transform .15s;
}
.avatar-cam svg { width: 16px; height: 16px; fill: #1a1400; }
.avatar-change:hover .avatar-cam { transform: scale(1.1); }
.avatar-change.is-loading { opacity: .5; pointer-events: none; }
/* Perfil com 5 números (seguidores, seguindo, binders, cartas, à venda) */
.profile-stats { flex-wrap: wrap; }
@media (max-width: 640px) {
    .profile-stats { display: grid; grid-template-columns: repeat(auto-fit, minmax(88px, 1fr)); gap: 8px; }
    .profile-stats .stat { padding: 10px; }
    .profile-stats .stat strong { font-size: 22px; }
    .profile-stats .stat span { font-size: 12px; }
    .follow-banner { margin: 14px 0 0; }
}
.profile-cta { flex-wrap: wrap; }
@media (max-width: 640px) {
    .profile-cta .btn { padding-inline: 14px; }
}
.tabs { overflow-x: auto; scrollbar-width: none; }
.tabs a { white-space: nowrap; flex-shrink: 0; }
@media (max-width: 640px) { .tabs a { padding: 12px 12px; } }

/* ---------- Ajustar foto (círculo, arrastar e zoom) ---------- */
.cropper { position: fixed; inset: 0; z-index: 220; display: grid; place-items: center; padding: 16px; background: rgba(4, 6, 18, .82); backdrop-filter: blur(4px); }
.cropper[hidden] { display: none; }
.cropper-panel {
    width: min(400px, 100%); padding: 22px; border-radius: 22px; text-align: center;
    background: var(--surface); border: 1px solid var(--line); box-shadow: 0 40px 100px -20px rgba(0, 0, 0, .9);
}
.cropper-panel h2 { font-size: 22px; margin-bottom: 6px; }
.cropper-panel > .muted { font-size: 14px; margin-bottom: 16px; }
.cropper-stage {
    position: relative; width: min(100%, 320px); aspect-ratio: 1; margin: 0 auto; border-radius: 16px; overflow: hidden;
    background: var(--bg); touch-action: none; cursor: grab; user-select: none;
}
.cropper-stage:active { cursor: grabbing; }
.cropper-stage canvas { display: block; width: 100%; height: 100%; }
.cropper-ring { position: absolute; inset: 0; border-radius: 50%; border: 2px solid rgba(255, 255, 255, .9); box-shadow: 0 0 0 999px rgba(11, 16, 38, .62); pointer-events: none; }
.cropper-zoom { display: flex; align-items: center; gap: 12px; margin: 18px auto 4px; width: min(100%, 320px); font-size: 22px; font-weight: 700; color: var(--muted); }
.cropper-zoom input { flex: 1; accent-color: var(--yellow); height: 28px; }
.cropper-actions { display: flex; gap: 8px; justify-content: center; margin-top: 14px; }
.cropper-actions .btn { flex: 1; }
/* Menu com "Meu perfil": entre 921 e 1180px esconde o @ ao lado da foto e aperta os links para caber numa linha */
@media (min-width: 921px) and (max-width: 1180px) {
    .user-btn .user-name { display: none; }
    .main-nav { gap: 0; }
    .main-nav a { padding: 8px 8px; }
}

/* ---------- Mensagens ---------- */
.chat-new { margin-bottom: 8px; }
.chat-list { display: grid; gap: 8px; margin-top: 18px; }
.chat-item {
    display: flex; align-items: center; gap: 14px; padding: 12px 16px; border-radius: 16px;
    background: var(--surface); border: 1px solid var(--line); transition: border-color .15s;
}
.chat-item:hover { border-color: rgba(255, 203, 5, .45); }
.chat-item.is-unread { border-color: rgba(255, 203, 5, .45); }
.chat-item-info { display: grid; gap: 2px; min-width: 0; flex: 1; }
.chat-item-top { display: flex; justify-content: space-between; gap: 10px; }
.chat-item-top strong { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.chat-item-top small { color: var(--muted); font-size: 12px; flex-shrink: 0; }
.chat-item-last { color: var(--muted); font-size: 14px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.chat-item.is-unread .chat-item-last { color: var(--text); font-weight: 600; }
.chat-item .count-pill { margin: 0; flex-shrink: 0; }

.chat-page { padding-bottom: 24px; }
.chat {
    display: flex; flex-direction: column; height: calc(100dvh - var(--header-h) - 64px); min-height: 420px;
    border-radius: 20px; background: var(--surface); border: 1px solid var(--line); overflow: hidden;
}
.chat-head { display: flex; align-items: center; gap: 10px; padding: 12px 16px; border-bottom: 1px solid var(--line); }
.chat-back { font-size: 22px; color: var(--muted); padding: 0 6px; }
.chat-back:hover { color: var(--yellow); }
.chat-who { display: flex; align-items: center; gap: 10px; min-width: 0; }
.chat-who span { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.chat-who small { color: var(--muted); }
.chat-who:hover strong { color: var(--yellow); }
.chat-msgs { flex: 1; overflow-y: auto; padding: 18px 16px; display: flex; flex-direction: column; gap: 8px; overscroll-behavior: contain; }
.chat-empty { margin: auto; text-align: center; }
.msg { align-self: flex-start; max-width: min(78%, 520px); padding: 9px 13px 6px; border-radius: 16px 16px 16px 4px; background: var(--surface-2); }
.msg.is-mine { align-self: flex-end; border-radius: 16px 16px 4px 16px; background: var(--yellow); color: #1a1400; }
.msg p { white-space: pre-wrap; overflow-wrap: anywhere; font-size: 15px; line-height: 1.4; }
.msg-meta { display: block; text-align: right; font-size: 11px; opacity: .65; margin-top: 2px; }
.msg-read { display: block; text-align: right; font-size: 11px; font-weight: 700; color: #1d4ed8; }
.msg-card {
    display: flex; align-items: center; gap: 10px; margin-bottom: 7px; padding: 6px; border-radius: 10px;
    background: rgba(0, 0, 0, .18); color: inherit;
}
.msg.is-mine .msg-card { background: rgba(0, 0, 0, .1); }
.msg-card img { width: 42px; aspect-ratio: 245 / 342; object-fit: cover; border-radius: 5px; }
.msg-card span { display: grid; min-width: 0; }
.msg-card small { font-size: 11px; opacity: .7; }
.msg-card strong { font-size: 13px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.msg-card:hover strong { text-decoration: underline; }

.chat-form { border-top: 1px solid var(--line); padding: 10px 12px calc(10px + env(safe-area-inset-bottom, 0px)); }
.chat-attach { display: flex; align-items: center; gap: 10px; padding: 6px 8px; margin-bottom: 8px; border-radius: 12px; background: var(--bg); border: 1px solid rgba(255, 203, 5, .35); }
.chat-attach img { width: 34px; aspect-ratio: 245 / 342; object-fit: cover; border-radius: 4px; }
.chat-attach span { display: grid; min-width: 0; flex: 1; }
.chat-attach small { font-size: 11px; color: var(--muted); }
.chat-attach strong { font-size: 13px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.chat-attach-x { border: 0; background: none; color: var(--muted); font-size: 22px; cursor: pointer; padding: 0 6px; }
.chat-compose { display: flex; align-items: flex-end; gap: 8px; }
.chat-compose textarea {
    flex: 1; min-width: 0; resize: none; max-height: 160px; padding: 11px 14px; border-radius: 20px;
    border: 1px solid var(--line); background: var(--bg); color: var(--text); font: inherit; font-size: 15px; line-height: 1.35;
}
.chat-compose textarea:focus { outline: none; border-color: var(--yellow); }
.chat-send { width: 46px; height: 46px; padding: 0; border-radius: 50%; flex-shrink: 0; display: grid; place-items: center; }
.chat-send svg { width: 20px; height: 20px; fill: currentColor; }
.chat-form .auth-msg { margin-top: 6px; }
.chat-locked { padding: 14px 16px; border-top: 1px solid var(--line); font-size: 14px; }
.chat-locked a { color: var(--yellow); font-weight: 600; }
.order-chat { display: inline-block; font-size: 14px; font-weight: 600; color: var(--yellow); margin: -4px 0 12px; }
.view-msg { margin-top: 4px; }
@media (max-width: 640px) {
    .chat-page { padding-top: 12px; }
    .chat-page .container-mid { width: 100%; }
    .chat { height: calc(100dvh - var(--header-h) - 12px); border-radius: 0; border-inline: 0; }
    .msg { max-width: 86%; }
}
.binder-actions { flex-wrap: wrap; }

/* ---------- Celular: nada pode passar da tela ---------- */
.dash-grid > *, .dash-side > * { min-width: 0; }
.binder-list { grid-template-columns: repeat(auto-fill, minmax(min(240px, 100%), 1fr)); }
.community-grid { grid-template-columns: repeat(auto-fill, minmax(min(300px, 100%), 1fr)); }
.people-grid { grid-template-columns: repeat(auto-fill, minmax(min(320px, 100%), 1fr)); }
.mini-communities li a span { min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.mini-communities li, .mini-communities li a { min-width: 0; }

/* Celulares bem estreitos (320–360px): ícones do topo menores para caber */
@media (max-width: 360px) {
    .header-inner { gap: 8px; }
    .header-auth { gap: 2px; }
    .bell { width: 34px; height: 34px; }
    .bell svg { width: 20px; height: 20px; }
    .user-btn .caret { display: none; }
    .user-btn { padding-right: 4px !important; }
    .brand-mark { width: 30px; height: 30px; }
    .brand-word { font-size: 19px; }
}
