/* =========================================================
   Orbit Drops · visual limpo (claro/escuro)
   ========================================================= */
:root {
  --bg: #faf8f4;
  --surface: #ffffff;
  --surface-2: #f3f1ec;
  --text: #141413;
  --text-2: #3f3f3b;
  --muted: #77776f;
  --line: rgba(20, 20, 19, 0.1);
  --line-strong: rgba(20, 20, 19, 0.22);
  --accent: #c9ff3f;          /* limão */
  --accent-ink: #141413;      /* texto sobre o limão */
  --accent-soft: rgba(201, 255, 63, 0.35);
  --ok: #1f8a4c;
  --err: #c9372c;
  --warn: #a86a00;
  --warn-bg: #fff6e0;
  --shadow: 0 1px 0 rgba(255, 255, 255, 0.9) inset, 0 10px 30px -18px rgba(40, 40, 30, 0.25);
  --radius: 16px;
  --font: "DM Sans", ui-sans-serif, system-ui, -apple-system, "Segoe UI", sans-serif;
  --mono: "Geist Mono", ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  color-scheme: light;
}
:root[data-theme="dark"] {
  --bg: #0f0f0e;
  --surface: #181816;
  --surface-2: #211f1c;
  --text: #f1efe9;
  --text-2: #cfccc4;
  --muted: #9a988f;
  --line: rgba(255, 255, 255, 0.09);
  --line-strong: rgba(255, 255, 255, 0.2);
  --accent: #c9ff3f;
  --accent-ink: #141413;
  --accent-soft: rgba(201, 255, 63, 0.16);
  --ok: #5bd18a;
  --err: #ff7a70;
  --warn: #f2c14e;
  --warn-bg: rgba(242, 193, 78, 0.1);
  --shadow: none;
  color-scheme: dark;
}

* { box-sizing: border-box; }
html, body { margin: 0; }
body { font-family: var(--font); color: var(--text); background: var(--bg); min-height: 100vh; line-height: 1.5;
  -webkit-font-smoothing: antialiased; transition: background .2s, color .2s; }
a { color: var(--text); text-decoration: underline; text-decoration-color: var(--line-strong); text-underline-offset: 3px; }
a:hover { text-decoration-color: var(--text); }
.wrap { max-width: 1120px; margin: 0 auto; padding: 18px 16px 56px; }
h1 { font-size: 40px; line-height: 1.08; letter-spacing: -0.035em; margin: 0 0 8px; font-weight: 700; }
h2 { font-size: 17px; margin: 0 0 14px; font-weight: 600; letter-spacing: -0.01em; }
mark { background: var(--accent); color: var(--accent-ink); padding: 0 .12em; border-radius: 6px; }
code { font-family: var(--mono); font-size: 12.5px; background: var(--surface-2); padding: 2px 6px; border-radius: 6px; word-break: break-all; }
.muted { color: var(--muted); }
.small { font-size: 13px; }
.mono { font-family: var(--mono); }
.eyebrow { font-family: var(--mono); font-size: 12px; letter-spacing: .02em; color: var(--muted); text-transform: uppercase; }

/* ---------- Topo ---------- */
#topbar { display: flex; align-items: center; gap: 20px; padding: 6px 0 14px; margin-bottom: 28px; border-bottom: 1px solid var(--line); flex-wrap: wrap; }
.brand { display: flex; align-items: center; gap: 9px; font-weight: 700; font-size: 17px; letter-spacing: -0.02em; text-decoration: none; color: var(--text); }
.brand svg { flex: 0 0 auto; }
#topbar nav { display: flex; gap: 2px; flex: 1; flex-wrap: wrap; }
#topbar nav a { color: var(--muted); text-decoration: none; padding: 6px 10px; border-radius: 8px; font-size: 14px; font-weight: 500; }
#topbar nav a:hover { color: var(--text); }
#topbar nav a.active { color: var(--text); box-shadow: inset 0 -2px 0 var(--accent); border-radius: 0; }
.topright { display: flex; align-items: center; gap: 8px; margin-left: auto; }
@media (max-width: 700px) { #topbar nav { order: 3; width: 100%; } .topright { order: 2; } }

/* ---------- Botões e campos ---------- */
button, .btn {
  font: inherit; font-size: 14px; font-weight: 500; cursor: pointer; color: var(--text); background: var(--surface);
  border: 1px solid var(--line-strong); border-radius: 10px; padding: 9px 14px; transition: border-color .15s, background .15s, opacity .15s;
  text-decoration: none; display: inline-flex; align-items: center; justify-content: center; gap: 6px;
}
button:hover:not(:disabled), .btn:hover { border-color: var(--text); }
button:disabled { opacity: .45; cursor: not-allowed; }
.primary { width: 100%; padding: 13px; font-weight: 600; font-size: 15px; border: none; background: var(--accent); color: var(--accent-ink); border-radius: 12px; }
.primary:hover:not(:disabled) { filter: brightness(.96); }
a.primary { width: auto; padding: 12px 22px; }
.ghost { background: transparent; }
.iconbtn { width: 38px; height: 38px; padding: 0; }
input, select, textarea {
  font: inherit; font-size: 15px; color: var(--text); background: var(--surface); border: 1px solid var(--line-strong);
  border-radius: 10px; padding: 10px 12px; width: 100%; outline: none; transition: border-color .15s, box-shadow .15s;
}
input:focus, select:focus, textarea:focus { border-color: var(--text); box-shadow: 0 0 0 3px var(--accent-soft); }
input[type=checkbox] { width: 16px; height: 16px; accent-color: #8bc400; padding: 0; }
input[type=datetime-local] { color-scheme: inherit; }
label { display: block; font-size: 13px; color: var(--muted); margin: 12px 0 5px; font-weight: 500; }
.row { display: flex; gap: 10px; align-items: flex-end; }
.row > * { flex: 1; min-width: 0; }
.help { font-size: 13px; color: var(--muted); margin-top: 6px; }
textarea.big { font-family: var(--mono); font-size: 13px; line-height: 1.5; }
details { margin-top: 14px; }
summary { cursor: pointer; color: var(--text-2); font-size: 14px; font-weight: 500; }

/* ---------- Estrutura ---------- */
.card { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: 22px; box-shadow: var(--shadow); min-width: 0; }
.stack > * + * { margin-top: 18px; }
.grid { display: grid; grid-template-columns: 1fr 1fr; gap: 24px; align-items: start; }
@media (max-width: 820px) { .grid { grid-template-columns: 1fr; } }
footer { margin-top: 48px; padding-top: 18px; border-top: 1px solid var(--line); text-align: center; color: var(--muted); font-size: 13px; }

/* ---------- Mensagens ---------- */
.msg { margin-top: 14px; padding: 11px 14px; border-radius: 10px; font-size: 14px; display: none; word-break: break-word; border: 1px solid var(--line); }
.msg.show { display: block; }
.msg.ok { border-color: color-mix(in srgb, var(--ok) 40%, transparent); background: color-mix(in srgb, var(--ok) 8%, var(--surface)); }
.msg.err { border-color: color-mix(in srgb, var(--err) 40%, transparent); background: color-mix(in srgb, var(--err) 7%, var(--surface)); }
.msg.info { background: var(--surface-2); }
.warn { border: 1px solid color-mix(in srgb, var(--warn) 35%, transparent); background: var(--warn-bg); border-radius: 10px; padding: 11px 14px; font-size: 14px; color: var(--text-2); }
#toast { position: fixed; left: 50%; bottom: 20px; transform: translateX(-50%); z-index: 50; max-width: min(560px, calc(100% - 32px)); box-shadow: 0 10px 30px rgba(0,0,0,.15); }

/* ---------- Selos ---------- */
.pill, .badge, .state { display: inline-flex; align-items: center; gap: 5px; font-size: 12px; font-weight: 500; padding: 2px 9px;
  border-radius: 99px; border: 1px solid var(--line-strong); color: var(--muted); white-space: nowrap; }
.pill.on, .badge.live, .state.live { color: var(--ok); border-color: color-mix(in srgb, var(--ok) 45%, transparent); }
.pill.off, .badge.hid { color: var(--err); border-color: color-mix(in srgb, var(--err) 40%, transparent); }
.badge.ver { background: var(--accent); color: var(--accent-ink); border-color: transparent; font-weight: 600; }
.badge.feat { color: var(--text-2); }
.state.upcoming { color: var(--text); border-color: var(--line-strong); }

/* ---------- Vitrine ---------- */
.hero { padding: 36px 0 34px; }
.hero h1 { font-size: clamp(40px, 7vw, 68px); letter-spacing: -0.045em; margin: 14px 0 16px; }
.hero p.sub { font-size: 17px; color: var(--text-2); max-width: 560px; margin: 0; }
.hero .ctas { display: flex; gap: 10px; flex-wrap: wrap; margin-top: 26px; }
.hero .ctas .btn { padding: 12px 18px; }
.hstats { display: flex; gap: 42px; flex-wrap: wrap; margin-top: 34px; }
.hstats b { display: block; font-family: var(--mono); font-size: 30px; font-weight: 500; letter-spacing: -0.04em; }
.hstats span { font-size: 13px; color: var(--muted); }
.features { display: grid; grid-template-columns: repeat(3, 1fr); gap: 12px; margin: 8px 0 40px; }
.features .f { border: 1px solid var(--line); border-radius: 14px; padding: 14px 16px; background: var(--surface); }
.features .f b { font-size: 14px; display: flex; gap: 8px; align-items: center; }
.features .f b::before { content: ""; width: 7px; height: 7px; border-radius: 50%; background: var(--accent); box-shadow: 0 0 0 1px rgba(0,0,0,.15); }
.features .f p { margin: 6px 0 0; font-size: 13px; color: var(--muted); }
@media (max-width: 760px) { .features { grid-template-columns: 1fr; } .hstats { gap: 26px; } }
.section-title { display: flex; align-items: baseline; justify-content: space-between; margin: 36px 0 14px; gap: 10px; }
.section-title h2 { margin: 0; font-size: 22px; letter-spacing: -0.02em; }
.tabs { display: flex; gap: 6px; margin: 0 0 18px; flex-wrap: wrap; }
.tabs button { padding: 6px 12px; font-size: 13px; border-radius: 99px; }
.tabs button.on { background: var(--text); color: var(--bg); border-color: var(--text); }
.cards { display: grid; grid-template-columns: repeat(auto-fill, minmax(230px, 1fr)); gap: 16px; }
.ccard { display: block; text-decoration: none; color: var(--text); background: var(--surface); border: 1px solid var(--line);
  border-radius: var(--radius); overflow: hidden; transition: border-color .15s, transform .15s; }
.ccard:hover { border-color: var(--line-strong); transform: translateY(-2px); }
.ccard .img { aspect-ratio: 1; background: var(--surface-2); display: grid; place-items: center; color: var(--muted); font-size: 13px; }
.ccard .img img { width: 100%; height: 100%; object-fit: cover; display: block; }
.ccard .body { padding: 13px 14px 14px; }
.ccard .name { font-weight: 600; font-size: 15px; display: flex; gap: 6px; align-items: center; overflow: hidden; }
.ccard .name span { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.ccard .meta { display: flex; justify-content: space-between; align-items: center; gap: 6px; font-size: 13px; color: var(--muted); margin-top: 8px; }
.ccard .meta > span:first-child { font-family: var(--mono); color: var(--text-2); }
.empty { text-align: center; padding: 40px 16px; color: var(--muted); border: 1px dashed var(--line-strong); border-radius: var(--radius); }

/* ---------- Progresso ---------- */
.bar { height: 6px; border-radius: 99px; background: var(--surface-2); overflow: hidden; margin: 8px 0 16px; }
.ccard .bar { margin: 10px 0 0; height: 4px; }
.bar > div { height: 100%; width: 0; background: var(--text); border-radius: 99px; transition: width .5s; }

/* ---------- Página da coleção ---------- */
.banner { width: 100%; aspect-ratio: 4 / 1; border-radius: var(--radius); background: var(--surface-2) center / cover no-repeat; border: 1px solid var(--line); margin-bottom: 20px; }
.art { aspect-ratio: 1; width: 100%; border-radius: 12px; background: var(--surface-2); display: grid; place-items: center; overflow: hidden; }
.art img { width: 100%; height: 100%; object-fit: cover; }
.art .ph { color: var(--muted); font-size: 14px; }
.stats { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; margin: 18px 0 6px; }
.stat { border: 1px solid var(--line); border-radius: 12px; padding: 10px 12px; }
.stat b { display: block; font-family: var(--mono); font-size: 18px; font-weight: 500; margin-top: 2px; letter-spacing: -0.02em; }
.stat .muted { font-size: 12px; }
.qty { display: flex; align-items: center; gap: 8px; margin: 14px 0; }
.qty button { width: 40px; height: 40px; font-size: 18px; padding: 0; }
.qty input { width: 64px; text-align: center; font-family: var(--mono); }
.phases { display: grid; gap: 8px; margin: 12px 0 16px; }
.phase { border: 1px solid var(--line); border-radius: 12px; padding: 11px 13px; }
.phase.live { border-color: color-mix(in srgb, var(--ok) 45%, transparent); }
.phase.ended { opacity: .6; }
.phase.sel { box-shadow: 0 0 0 2px var(--accent); border-color: transparent; }
.phase.live.clickable { cursor: pointer; }
.phase .top { display: flex; justify-content: space-between; gap: 8px; align-items: center; flex-wrap: wrap; }
.phase .top b { font-size: 14px; }
.phase .info { display: flex; gap: 12px; flex-wrap: wrap; font-size: 13px; color: var(--muted); margin-top: 4px; }
.phase .info b { font-family: var(--mono); font-weight: 500; color: var(--text-2); }
.phase .you { font-size: 13px; margin-top: 5px; }
.phase .you.ok { color: var(--ok); } .phase .you.no { color: var(--err); }

/* ---------- Painéis ---------- */
.kv { display: grid; grid-template-columns: 180px minmax(0, 1fr); gap: 8px 14px; font-size: 14px; }
.kv > div { overflow-wrap: anywhere; min-width: 0; }
.kv > div:nth-child(odd) { color: var(--muted); }
table { width: 100%; border-collapse: collapse; font-size: 14px; }
th, td { text-align: left; padding: 10px 8px; border-bottom: 1px solid var(--line); vertical-align: middle; }
th { color: var(--muted); font-weight: 500; font-size: 13px; }
.tablewrap { overflow-x: auto; }
.stats4 { display: grid; grid-template-columns: repeat(auto-fit, minmax(140px, 1fr)); gap: 8px; }
.bulkbar { display: flex; gap: 6px; flex-wrap: wrap; align-items: center; padding: 12px 0 4px; }
.bulkbar button { padding: 6px 10px; font-size: 13px; }
.presets { display: flex; gap: 6px; flex-wrap: wrap; align-items: center; margin-bottom: 14px; }
.presets button { padding: 5px 10px; font-size: 13px; border-radius: 99px; }
.phase-edit { border: 1px solid var(--line); border-radius: 12px; padding: 14px; margin-bottom: 10px; }
.phase-edit-head { display: flex; justify-content: space-between; align-items: center; }
.linkbtn { background: none; border: none; color: var(--err); padding: 4px; font-size: 13px; }
.listtabs { display: flex; gap: 6px; flex-wrap: wrap; margin-bottom: 10px; }
.listtabs button { padding: 6px 11px; font-size: 13px; border-radius: 99px; }
.listtabs button.on { background: var(--text); color: var(--bg); border-color: var(--text); }
.listtabs .cnt { font-family: var(--mono); font-size: 12px; opacity: .7; margin-left: 4px; }
.listbar { display: flex; gap: 10px; flex-wrap: wrap; align-items: center; margin: 14px 0 10px; }
.listbar input[type=text] { flex: 1; min-width: 200px; }
.listtable { max-height: 420px; overflow: auto; border: 1px solid var(--line); border-radius: 10px; }
.listtable td, .listtable th { padding: 8px 10px; }
.listtable code { background: none; padding: 0; }
.preview { display: flex; gap: 14px; align-items: center; margin-top: 10px; }
.preview .thumb { width: 72px; height: 72px; border-radius: 10px; background: var(--surface-2); border: 1px solid var(--line); overflow: hidden; flex: 0 0 auto; display: grid; place-items: center; font-size: 11px; color: var(--muted); }
.preview .thumb img { width: 100%; height: 100%; object-fit: cover; }
.steps { counter-reset: s; padding: 0; margin: 0; list-style: none; }
.steps li { counter-increment: s; padding-left: 34px; position: relative; margin: 10px 0; }
.steps li::before { content: counter(s); position: absolute; left: 0; top: 0; width: 22px; height: 22px; border-radius: 50%;
  background: var(--accent); color: var(--accent-ink); display: grid; place-items: center; font-size: 12px; font-family: var(--mono); }

/* ---------- Idioma e tema ---------- */
.langsel { position: relative; }
.langbtn { gap: 7px; padding: 8px 10px; }
.langbtn svg:first-child, .langmenu svg { border-radius: 3px; flex: 0 0 auto; box-shadow: 0 0 0 1px var(--line-strong); }
.langbtn .caret { opacity: .6; transition: transform .15s; }
.langsel.open .langbtn .caret { transform: rotate(180deg); }
.langmenu { position: absolute; right: 0; top: calc(100% + 6px); z-index: 40; list-style: none; margin: 0; padding: 5px; min-width: 170px;
  background: var(--surface); border: 1px solid var(--line-strong); border-radius: 12px; box-shadow: 0 12px 30px rgba(0,0,0,.14); display: none; }
.langsel.open .langmenu { display: block; }
.langmenu li { display: flex; align-items: center; gap: 10px; padding: 8px 10px; border-radius: 8px; cursor: pointer; font-size: 14px; }
.langmenu li:hover { background: var(--surface-2); }
.langmenu li.on { background: var(--accent-soft); }
.themebtn .sun { display: none; }
:root[data-theme="dark"] .themebtn .sun { display: block; }
:root[data-theme="dark"] .themebtn .moon { display: none; }

/* ---------- Celular ---------- */
@media (max-width: 560px) {
  h1 { font-size: 32px; }
  .kv { grid-template-columns: 1fr; gap: 2px; }
  .kv > div:nth-child(even) { margin-bottom: 10px; }
  .row { flex-wrap: wrap; }
  .row > * { flex: 1 1 100%; }
  .row > button { width: 100%; }
  .stat { padding: 9px 8px; }
  .stat b { font-size: 15px; }
  .card { padding: 18px; }
}

/* ---------- Carteira ---------- */
.walletsel { position: relative; }
#walletBtn.connected { gap: 8px; }
#walletBtn .wdot { width: 8px; height: 8px; border-radius: 50%; background: var(--ok); box-shadow: 0 0 0 3px color-mix(in srgb, var(--ok) 20%, transparent); }
#walletBtn .caret { opacity: .6; transition: transform .15s; }
.walletsel.open #walletBtn .caret { transform: rotate(180deg); }
.walletmenu { position: absolute; right: 0; top: calc(100% + 6px); z-index: 40; min-width: 220px; padding: 6px; display: none;
  background: var(--surface); border: 1px solid var(--line-strong); border-radius: 12px; box-shadow: 0 12px 30px rgba(0,0,0,.14); }
.walletsel.open .walletmenu { display: block; }
.walletmenu .wm-head { padding: 8px 10px 10px; border-bottom: 1px solid var(--line); margin-bottom: 4px; display: grid; gap: 4px; }
.walletmenu .wm-head code { background: none; padding: 0; font-size: 13px; }
.walletmenu button, .walletmenu a { display: flex; width: 100%; justify-content: flex-start; border: none; background: none; padding: 9px 10px;
  border-radius: 8px; font-size: 14px; color: var(--text); text-decoration: none; cursor: pointer; }
.walletmenu button:hover, .walletmenu a:hover { background: var(--surface-2); }
.walletmenu .danger { color: var(--err); }

/* ---------- Divisão da receita ---------- */
.split-row { margin-top: 2px; }
.split-row .linkbtn { height: 42px; font-size: 15px; color: var(--muted); }
.split-row .linkbtn:hover { color: var(--err); }
.split-total { margin-top: 12px; font-size: 13px; font-weight: 600; font-family: var(--mono); }
.split-total.ok { color: var(--ok); }
.split-total.bad { color: var(--err); }
.burninfo { margin: 12px 0 0; font-size: 13px; color: var(--text-2); border: 1px dashed var(--line-strong); border-radius: 10px; padding: 8px 12px; }
.badge.burn { color: #c2410c; border-color: rgba(194, 65, 12, .35); }
:root[data-theme="dark"] .badge.burn { color: #ff9a5c; border-color: rgba(255, 154, 92, .35); }
label.inline { display: flex; gap: 8px; align-items: center; color: var(--text-2); font-size: 14px; margin-top: 12px; cursor: pointer; }

/* ---------- Modal ---------- */
.modal { position: fixed; inset: 0; z-index: 60; background: rgba(10, 10, 9, .45); display: grid; place-items: center; padding: 16px; }
.modal-card { position: relative; width: min(420px, 100%); max-height: calc(100vh - 32px); overflow: auto; background: var(--surface); color: var(--text);
  border: 1px solid var(--line-strong); border-radius: 18px; padding: 22px; box-shadow: 0 30px 60px -20px rgba(0,0,0,.35); }
.modal-card h2 { margin: 0 0 14px; font-size: 18px; }
.modal-x { position: absolute; top: 12px; right: 12px; width: 32px; height: 32px; padding: 0; border: none; background: none; color: var(--muted); }
.wlist { display: grid; gap: 8px; margin: 10px 0; }
.wlist button, .wlist .btn { justify-content: flex-start; gap: 10px; padding: 11px 14px; width: 100%; }
.wlist img, .wph { width: 24px; height: 24px; border-radius: 6px; background: var(--surface-2); flex: 0 0 auto; }
.copyrow { display: flex; gap: 8px; align-items: center; margin-top: 10px; }
.copyrow code { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.gaswarn { color: var(--doing, #a86a00); font-size: 13px; margin-top: 6px; }
.minted { display: grid; grid-template-columns: repeat(auto-fill, minmax(96px, 1fr)); gap: 10px; margin-top: 12px; }
.minted a { display: block; text-decoration: none; color: var(--text); font-size: 12px; font-family: var(--mono); }
.minted img, .minted .ph2 { width: 100%; aspect-ratio: 1; object-fit: cover; border-radius: 10px; background: var(--surface-2); border: 1px solid var(--line); display: block; margin-bottom: 4px; }
.uplwrap { display: flex; gap: 8px; align-items: stretch; }
.uplwrap input { flex: 1; min-width: 0; }
.uplbtn { flex: 0 0 auto; }
pre.code { font-family: var(--mono); font-size: 12.5px; background: var(--surface-2); border-radius: 10px; padding: 12px; overflow-x: auto; color: var(--text-2); }
textarea:not(.big) { font: inherit; }
.searchrow { display: flex; gap: 10px; flex-wrap: wrap; align-items: center; margin-bottom: 14px; }
.searchrow input { flex: 1; min-width: 200px; }
.searchrow .tabs { margin: 0; }
.activity { list-style: none; margin: 0; padding: 0; }
.activity li { display: flex; gap: 10px; justify-content: space-between; padding: 9px 0; border-bottom: 1px solid var(--line); font-size: 14px; flex-wrap: wrap; }
.activity li span:last-child { color: var(--muted); font-size: 13px; font-family: var(--mono); }
.actions-row { display: flex; gap: 8px; flex-wrap: wrap; margin-top: 14px; }
.actions-row .btn, .actions-row button { font-size: 13px; padding: 7px 12px; }
.badge.agent { color: var(--text-2); }
.doc { max-width: 720px; }
.doc h2 { font-size: 20px; margin: 28px 0 8px; }
.doc h3 { font-size: 16px; margin: 20px 0 6px; }
.doc p, .doc li { color: var(--text-2); }
.doc details { border-bottom: 1px solid var(--line); padding: 10px 0; margin: 0; }
.doc details summary { font-weight: 600; color: var(--text); font-size: 15px; }
.doc details p { margin: 8px 0 0; }
footer .flinks { display: flex; gap: 14px; justify-content: center; flex-wrap: wrap; margin-bottom: 8px; }
footer .flinks a { color: var(--muted); text-decoration: none; }
footer .flinks a:hover { color: var(--text); }

/* Tempo relativo das fases */
.help.rel { color: var(--text); font-weight: 500; }
.help.rel.bad { color: var(--err); }
.linkbtn.now { color: var(--text); font-weight: 600; padding: 0 4px; text-decoration: underline; }

/* ---------- Explorador da coleção (items.html) ---------- */
.xhead { display: flex; gap: 18px; align-items: center; flex-wrap: wrap; }
.xhead-img { width: 88px; height: 88px; border-radius: 14px; overflow: hidden; background: var(--surface-2); flex: none; }
.xhead-img img { width: 100%; height: 100%; object-fit: cover; display: block; }
.xhead-main { flex: 1; min-width: 200px; }
.xhead h1 { font-size: 30px; margin: 4px 0 2px; }
.xhead p { margin: 0; }
.xmint { width: auto; padding: 12px 20px; text-decoration: none; }
.xstats { margin: 14px 0; }
.xtabs { margin: 8px 0 16px; }
.xlayout { display: grid; grid-template-columns: 230px 1fr; gap: 20px; align-items: start; }
.xfilters { position: sticky; top: 12px; max-height: calc(100vh - 24px); overflow: auto; padding-right: 4px; }
.xfilters details { margin: 0 0 6px; border-bottom: 1px solid var(--line); padding-bottom: 6px; }
.xfilters summary { display: flex; justify-content: space-between; padding: 6px 0; }
.xf { display: flex !important; align-items: center; gap: 8px; padding: 3px 0; font-size: 13px; }
.xf span:nth-child(2) { flex: 1; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.xtool { display: flex; gap: 8px; align-items: center; flex-wrap: wrap; margin-bottom: 10px; }
.xtool input { flex: 1; min-width: 140px; }
.xtool select { width: auto; }
.chips { display: flex; gap: 6px; flex-wrap: wrap; margin-bottom: 10px; }
.chip { font-size: 12px; padding: 3px 10px; border-radius: 99px; }
.xgrid { display: grid; grid-template-columns: repeat(auto-fill, minmax(160px, 1fr)); gap: 12px; }
.xcard { display: block; padding: 0; text-align: left; overflow: hidden; border-radius: 14px; background: var(--surface); width: 100%; }
.xcard .img { aspect-ratio: 1; background: var(--surface-2); }
.xcard .img img { width: 100%; height: 100%; object-fit: cover; display: block; }
.xcard .body { display: flex; flex-direction: column; gap: 2px; padding: 9px 11px 11px; }
.xcard .body b { font-size: 14px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.xtraits { display: grid; grid-template-columns: repeat(auto-fill, minmax(190px, 1fr)); gap: 8px; }
.xtrait { display: grid; grid-template-columns: 1fr auto; gap: 4px 8px; text-align: left; padding: 9px 11px; border-radius: 12px; }
.xtbar { grid-column: 1 / -1; height: 4px; background: var(--surface-2); border-radius: 4px; overflow: hidden; }
.xtbar i { display: block; height: 100%; background: var(--text); }
.xtable td, .xtable th { white-space: nowrap; }
.xbar { display: flex; gap: 10px; align-items: center; margin-bottom: 12px; }
.xbar .bar { flex: 1; margin: 0; }
.xitem { display: grid; gap: 14px; }
.xitem .img { aspect-ratio: 1; border-radius: 12px; overflow: hidden; background: var(--surface-2); }
.xitem .img img { width: 100%; height: 100%; object-fit: cover; display: block; }
.xattrs { display: grid; grid-template-columns: repeat(2, 1fr); gap: 6px; margin: 10px 0; }
.xattr { border: 1px solid var(--line); border-radius: 10px; padding: 6px 9px; display: flex; flex-direction: column; min-width: 0; }
.xattr b { font-size: 14px; overflow: hidden; text-overflow: ellipsis; }
.linkbtn.retry { color: inherit; text-decoration: underline; font-weight: 600; }
.xlink { display: inline-block; margin-top: 12px; font-weight: 500; }
@media (max-width: 760px) {
  .xlayout { grid-template-columns: 1fr; }
  .xfilters { position: static; max-height: none; }
  .xgrid { grid-template-columns: repeat(2, 1fr); }
  .xhead h1 { font-size: 24px; }
  .xmint { width: 100%; text-align: center; }
}
[hidden] { display: none !important; }

/* ---------- Marketplace ---------- */
.xcard { border: 1px solid var(--line); cursor: pointer; position: relative; transition: border-color .15s, transform .15s; }
.xcard:hover, .xcard:focus-visible { border-color: var(--line-strong); transform: translateY(-2px); outline: none; }
.xcard .img { position: relative; }
.xcard.incart { border-color: var(--text); box-shadow: 0 0 0 1px var(--text); }
.xadd { position: absolute; right: 8px; bottom: 8px; width: 34px; height: 34px; padding: 0; border-radius: 99px; font-size: 18px;
  background: var(--accent); color: var(--accent-ink); border: 1px solid rgba(0,0,0,.15); }
.xcard.incart .xadd { background: var(--text); color: var(--bg); }
.xprice { font-family: var(--mono); font-size: 13px; font-weight: 500; }
.cartbar { position: fixed; left: 50%; bottom: 16px; transform: translateX(-50%); z-index: 50; display: flex; gap: 10px; align-items: center;
  background: var(--surface); border: 1px solid var(--line-strong); border-radius: 16px; padding: 10px 12px 10px 18px; box-shadow: 0 12px 40px -12px rgba(0,0,0,.35);
  width: min(620px, calc(100% - 32px)); }
.cartbar #cartTxt { flex: 1; font-size: 14px; }
.cartbar .primary { width: auto; padding: 10px 18px; }
.mbox { border-top: 1px solid var(--line); margin-top: 10px; padding-top: 10px; }
.mprice { display: flex; flex-direction: column; margin-bottom: 8px; }
.mprice b { font-family: var(--mono); font-size: 22px; font-weight: 500; letter-spacing: -.02em; }
.mbox .actions-row { margin-top: 8px; }
.mbox .actions-row .primary { width: auto; padding: 10px 18px; }
.mform { border: 1px solid var(--line); border-radius: 12px; padding: 12px; margin-top: 10px; }
.mform .primary { margin-top: 8px; }
.mh { font-size: 14px; margin: 16px 0 6px; font-weight: 600; }
.mpick { display: grid; grid-template-columns: repeat(auto-fill, minmax(90px, 1fr)); gap: 4px; max-height: 220px; overflow: auto; margin: 8px 0; }
.warnline { color: var(--warn); }
.modal-card:has(.xitem) { width: min(520px, 100%); }
@media (max-width: 760px) { .cartbar { bottom: 8px; padding: 8px 8px 8px 12px; } }
body:has(.cartbar:not([hidden])) .wrap { padding-bottom: 110px; }

/* ---------- Docs ---------- */
.wrap.wide { max-width: 1240px; }
.docs { display: grid; grid-template-columns: 240px minmax(0, 1fr); gap: 44px; align-items: start; margin-top: 8px; }
.docs-side { position: sticky; top: 16px; max-height: calc(100vh - 32px); overflow: auto; padding: 4px 6px 24px 0; }
.docs-side input { margin-bottom: 14px; font-size: 14px; }
.docs-toggle { display: none; }
#docsNav { display: flex; flex-direction: column; gap: 1px; border-left: 1px solid var(--line); }
#docsNav a { text-decoration: none; color: var(--muted); font-size: 14px; padding: 5px 12px; margin-left: -1px; border-left: 2px solid transparent; line-height: 1.35; }
#docsNav a.l2 { color: var(--text-2); font-weight: 600; margin-top: 8px; }
#docsNav a.l2:first-child { margin-top: 0; }
#docsNav a.l3 { padding-left: 22px; font-size: 13.5px; }
#docsNav a:hover { color: var(--text); }
#docsNav a.on { color: var(--text); }
#docsNav a.l3.on, #docsNav a.l2.on:not(:has(~ a.l3.on)) { border-left-color: var(--text); }
.docs-body.doc { max-width: 780px; }
.docs-body h2 { font-size: 26px; letter-spacing: -.02em; margin: 56px 0 10px; padding-top: 18px; border-top: 1px solid var(--line); scroll-margin-top: 16px; }
.docs-body h3 { font-size: 17px; margin: 28px 0 6px; scroll-margin-top: 16px; }
.docs-body h2 + p, .docs-body h3 + p { margin-top: 4px; }
.docs-body li { margin: 4px 0; }
.docs-body ol, .docs-body ul { padding-left: 22px; }
.docs-hero { padding: 12px 0 8px; }
.docs-hero h1 { font-size: 46px; margin: 6px 0 10px; }
.docs-hero .lead { font-size: 18px; color: var(--text-2); max-width: 640px; margin: 0 0 22px; }
.docs-cards { display: grid; grid-template-columns: repeat(4, 1fr); gap: 10px; margin: 8px 0 6px; }
.docs-cards.three { grid-template-columns: repeat(3, 1fr); margin: 14px 0; }
.docs-card { display: flex; flex-direction: column; gap: 4px; padding: 14px 16px; border: 1px solid var(--line); border-radius: 14px; background: var(--surface);
  text-decoration: none; color: var(--text); transition: border-color .15s, transform .15s; }
a.docs-card:hover { border-color: var(--text); transform: translateY(-2px); }
.docs-card b { font-size: 15px; }
.docs-card span { font-size: 13px; color: var(--muted); line-height: 1.4; }
.docs-card code { font-size: 11.5px; }
.docs-facts { display: grid; grid-template-columns: repeat(4, 1fr); gap: 8px; margin: 18px 0; }
.docs-facts div { border: 1px solid var(--line); border-radius: 12px; padding: 12px 14px; display: flex; flex-direction: column; }
.docs-facts span { font-size: 12px; color: var(--muted); }
.docs-facts b { font-family: var(--mono); font-weight: 500; font-size: 18px; letter-spacing: -.02em; margin: 2px 0; }
.docs-facts small { font-size: 12px; color: var(--muted); }
.callout { border: 1px solid var(--line); border-left: 3px solid var(--text); background: var(--surface); border-radius: 10px; padding: 12px 14px; margin: 16px 0; font-size: 14.5px; color: var(--text-2); }
.callout.tip { border-left-color: var(--ok); }
.callout.warn { border-left-color: var(--warn); background: var(--warn-bg); }
.docs-table { margin: 12px 0 18px; font-size: 14px; }
.docs-table td, .docs-table th { padding: 8px 10px; border-bottom: 1px solid var(--line); vertical-align: top; text-align: left; }
.docs-table th { font-size: 12.5px; color: var(--muted); font-weight: 500; }
.docs-table td:last-child { color: var(--text-2); }
.docs-table code { white-space: nowrap; }
.docs-table td code { display: inline-block; margin: 1px 0; }
.codewrap { position: relative; margin: 10px 0 16px; }
.codewrap pre.code { margin: 0; padding-right: 70px; white-space: pre; line-height: 1.55; }
.copybtn { position: absolute; top: 8px; right: 8px; font-size: 12px; padding: 3px 9px; border-radius: 8px; background: var(--surface); }
.docs-dl { width: auto; display: inline-block; padding: 10px 16px; text-decoration: none; margin-right: 6px; }
@media (max-width: 900px) {
  .docs { grid-template-columns: minmax(0, 1fr); gap: 0; }
  .docs-table { display: block; overflow-x: auto; }
  .docs-table code { white-space: normal; word-break: break-word; }
  .docs-side { position: sticky; top: 0; z-index: 20; background: var(--bg); max-height: none; overflow: visible; padding: 8px 0; border-bottom: 1px solid var(--line); }
  .docs-side input { margin: 0 0 8px; }
  .docs-toggle { display: block; width: 100%; text-align: left; font-size: 14px; }
  #docsNav { display: none; max-height: 60vh; overflow: auto; margin-top: 8px; background: var(--bg); }
  .docs-side.open #docsNav { display: flex; }
  .docs-hero h1 { font-size: 34px; }
  .docs-cards, .docs-facts { grid-template-columns: 1fr 1fr; }
  .docs-cards.three { grid-template-columns: 1fr; }
  .docs-body h2 { font-size: 22px; margin-top: 40px; }
}
.searchrow #sortBy { width: auto; }
.ccard .mline { margin-top: 6px; font-family: var(--mono); font-size: 12px; }

/* título da coleção leva à página de itens */
h1 a.titlelink { color: inherit; text-decoration: none; }
h1 a.titlelink:hover { text-decoration: underline; text-decoration-thickness: 2px; text-underline-offset: 6px; }

/* ---------- Perfil ---------- */
#walletBtn .wav { width: 20px; height: 20px; border-radius: 50%; object-fit: cover; margin-left: -4px; }
.phead { display: flex; gap: 22px; align-items: center; flex-wrap: wrap; }
.pav { position: relative; width: 112px; height: 112px; flex: none; }
.pav img { width: 100%; height: 100%; border-radius: 50%; object-fit: cover; border: 1px solid var(--line); background: var(--surface-2); }
.pav-edit { position: absolute; left: 50%; bottom: -6px; transform: translateX(-50%); font-size: 12px; padding: 3px 10px; border-radius: 99px; white-space: nowrap; background: var(--surface); }
.pinfo { flex: 1; min-width: 220px; }
.pinfo h1 { font-size: 30px; margin: 2px 0 8px; font-weight: 500; letter-spacing: -.02em; }
.pactions { display: flex; gap: 8px; align-items: center; flex-wrap: wrap; }
.pactions button, .pactions .btn { font-size: 13px; padding: 5px 12px; }
.pactions code { font-size: 12px; }
#photoBox { margin-top: 14px; }
.pphoto-row { display: flex; gap: 10px; align-items: center; flex-wrap: wrap; margin-top: 12px; }
.pphoto-row img { width: 56px; height: 56px; border-radius: 50%; object-fit: cover; border: 1px solid var(--line); }
.pphoto-row .primary { width: auto; padding: 10px 18px; }
.pconnect { text-align: center; padding: 48px 22px; }
a.xcard { color: var(--text); text-decoration: none; }
#colFilter { width: auto; }
@media (max-width: 560px) { .pav { width: 84px; height: 84px; } .pinfo h1 { font-size: 22px; } .pactions code { display: none; } }
.walletmenu .wm-addr { display: flex; align-items: center; gap: 6px; }
.walletmenu .wm-copy { display: inline-flex; width: auto; padding: 4px; border-radius: 6px; color: var(--muted); }
.walletmenu .wm-copy:hover { color: var(--text); background: var(--surface-2); }
.walletmenu .wm-copy.done { color: var(--ok); }
.xoffer { font-size: 12px; color: var(--ok); font-weight: 500; min-height: 0; }
.xoffer:empty { display: none; }
.xcard.hl { border-color: var(--accent); box-shadow: 0 0 0 3px var(--accent-soft); }
/* seleção e venda em lote no perfil */
.xsel { position: absolute; top: 8px; left: 8px; z-index: 2; width: 28px; height: 28px; padding: 0; border-radius: 8px; font-size: 15px; font-weight: 700;
  background: color-mix(in srgb, var(--surface) 85%, transparent); border: 1.5px solid var(--line-strong); color: var(--text); }
.xcard:hover .xsel { border-color: var(--text); }
.xcard.incart .xsel { background: var(--accent); color: var(--accent-ink); border-color: var(--accent-ink); }
.modal-card:has(.bulk) { width: min(620px, 100%); }
.bulk-presets { display: flex; gap: 6px; align-items: center; flex-wrap: wrap; margin-bottom: 10px; }
.bulk-presets button { font-size: 13px; padding: 5px 12px; border-radius: 99px; }
.bulk-rows { max-height: 46vh; overflow: auto; border: 1px solid var(--line); border-radius: 12px; }
.bulk-row { display: grid; grid-template-columns: 44px 1fr 130px; gap: 10px; align-items: center; padding: 8px 10px; border-bottom: 1px solid var(--line); }
.bulk-row:last-child { border-bottom: none; }
.bulk-img { width: 44px; height: 44px; border-radius: 8px; overflow: hidden; background: var(--surface-2); }
.bulk-img img { width: 100%; height: 100%; object-fit: cover; }
.bulk-name { display: flex; flex-direction: column; min-width: 0; }
.bulk-name b { font-size: 14px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.bulk-row input { text-align: right; font-family: var(--mono); }
.bulk .primary { margin-top: 10px; }
@media (max-width: 520px) { .bulk-row { grid-template-columns: 36px 1fr 100px; } }

/* ---------- Burn to mint ---------- */
.burnbox { border: 1px dashed color-mix(in srgb, var(--warn) 55%, transparent); border-radius: 12px; padding: 10px 12px; margin: 8px 0 4px; }
.burnbox .help.bad { color: var(--err); }
.burnreq { color: var(--warn); font-weight: 500; }
.burnpick { border: 1px solid color-mix(in srgb, var(--warn) 45%, transparent); background: var(--warn-bg); border-radius: 12px; padding: 10px 12px; margin: -2px 0 12px; font-size: 14px; }
.burnpick input { margin-top: 8px; }
.bchips { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 8px; max-height: 150px; overflow: auto; }
.bchips .chip { font-family: var(--mono); }
.bchips .chip.on { background: var(--text); color: var(--bg); border-color: var(--text); }
.v3steps { display: flex; gap: 8px; flex-wrap: wrap; margin: 10px 0; }
