:root {
  --bg: #111214;
  --surface: #1a1c1f;
  --surface-2: #232529;
  --border: #2e3136;
  --text: #ececec;
  --muted: #9a9ea6;
  --accent: #e67e22;
  --ok: #2ecc71;
  --danger: #ef5350;
  --wa: #25d366;
  --radius: 12px;
  --font: system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
}

* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body { margin: 0; background: var(--bg); color: var(--text); font: 16px/1.5 var(--font); min-height: 100vh; display: flex; flex-direction: column; }
main { flex: 1; }
a { color: var(--accent); text-decoration: none; }
a:hover { text-decoration: underline; }
h1 { font-size: clamp(1.6rem, 4vw, 2.2rem); line-height: 1.15; margin: 0 0 .4em; letter-spacing: -.02em; }
h2 { font-size: 1.1rem; margin: 0 0 1em; }
h3 { margin: 0 0 .3em; }
img { max-width: 100%; display: block; }
[hidden] { display: none !important; }
.noscroll { overflow: hidden; }

.wrap { width: 100%; max-width: 1180px; margin: 0 auto; padding: 0 16px; }
.narrow { max-width: 480px; padding-top: 40px; padding-bottom: 40px; }
.center { text-align: center; }
.muted { color: var(--muted); }
.small { font-size: .875rem; }
.ok { color: var(--ok); }
.danger { color: var(--danger) !important; }
.accent { color: var(--accent); }
.break { word-break: break-all; }
.grow { flex: 1; min-width: 0; }
.inline { display: inline; }
.row-between { display: flex; justify-content: space-between; align-items: center; gap: 12px; }

/* Barra superior */
.topbar { border-bottom: 1px solid var(--border); background: rgba(17,18,20,.92); position: sticky; top: 0; z-index: 20; backdrop-filter: blur(8px); }
.topbar-in { display: flex; align-items: center; justify-content: space-between; height: 60px; gap: 12px; }
.brand { font-weight: 800; font-size: 1.25rem; color: var(--text); letter-spacing: -.03em; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.brand span { color: var(--accent); }
.brand:hover { text-decoration: none; }
.topnav { display: flex; gap: 16px; align-items: center; font-size: .95rem; }
.topnav a { color: var(--muted); }
.topnav a.on, .topnav a:hover { color: var(--text); text-decoration: none; }
.topnav .btn { color: #fff; }
@media (max-width: 560px) { .topnav { gap: 10px; font-size: .85rem; } .brand { font-size: 1.05rem; } }

/* Botones */
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 6px; background: var(--accent); color: #fff; border: 0; border-radius: 999px;
  padding: 11px 22px; font: 600 .95rem var(--font); cursor: pointer; transition: filter .15s, transform .15s; text-decoration: none !important; }
.btn:hover { filter: brightness(1.1); }
.btn:active { transform: translateY(1px); }
.btn:disabled { opacity: .5; cursor: not-allowed; }
.btn-sm { padding: 7px 14px; font-size: .85rem; }
.btn-lg { padding: 15px 30px; font-size: 1.05rem; }
.btn-block { width: 100%; }
.btn-ghost { background: transparent; color: var(--text); box-shadow: inset 0 0 0 1px var(--border); }
.btn-wa { background: var(--wa); }
.linklike { background: none; border: 0; color: var(--muted); font: inherit; cursor: pointer; padding: 4px; }
.linklike:hover { color: var(--text); }

/* Tarjetas y formularios */
.card { background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); padding: 22px; margin-bottom: 20px; }
.empty { text-align: center; padding: 40px 20px; }
.form label { display: block; margin-bottom: 16px; font-size: .9rem; font-weight: 600; color: #d0d2d6; }
.form label small { font-weight: 400; }
.form h2 { margin-top: 24px; padding-top: 18px; border-top: 1px solid var(--border); }
.form h2:first-child, .form h2:first-of-type { margin-top: 0; padding-top: 0; border-top: 0; }
input, select, textarea { width: 100%; margin-top: 6px; padding: 11px 13px; background: var(--bg); border: 1px solid var(--border); border-radius: 8px;
  color: var(--text); font: 16px var(--font); }
input:focus, select:focus, textarea:focus { outline: none; border-color: var(--accent); }
input[type=color] { padding: 2px; height: 42px; width: 80px; }
input[type=checkbox], input[type=radio] { width: auto; margin: 0; }
.field-error { display: block; color: var(--danger); margin-top: 4px; font-weight: 400; }
.prefix { display: flex; align-items: stretch; margin-top: 6px; }
.prefix span { display: flex; align-items: center; padding: 0 10px; background: var(--surface-2); border: 1px solid var(--border); border-right: 0; border-radius: 8px 0 0 8px; color: var(--muted); font-weight: 400; }
.prefix input { margin-top: 0; border-radius: 0 8px 8px 0; min-width: 0; }
.narrow-form { max-width: 560px; }
.compact { display: grid; gap: 10px; margin-top: 16px; }
.compact input { margin-top: 0; }

.flash { padding: 12px 16px; border-radius: 8px; margin: 16px 0; font-size: .95rem; }
.flash-ok { background: rgba(46,204,113,.1); border: 1px solid rgba(46,204,113,.4); color: #8ee6b3; }
.flash-error { background: rgba(239,83,80,.1); border: 1px solid rgba(239,83,80,.4); color: #ff9b98; }

.segmented { display: flex; background: var(--bg); border-radius: 10px; padding: 4px; margin-bottom: 10px; }
.segmented label { flex: 1; margin: 0; }
.segmented input { display: none; }
.segmented span { display: block; text-align: center; padding: 10px; border-radius: 8px; cursor: pointer; color: var(--muted); }
.segmented input:checked + span { background: var(--surface-2); color: var(--accent); box-shadow: inset 0 0 0 1px var(--accent); }

.tag { font-size: .72rem; font-weight: 700; text-transform: uppercase; letter-spacing: .04em; padding: 3px 8px; border-radius: 4px; }
.tag-public { background: rgba(52,152,219,.18); color: #6ab8ec; }
.tag-private { background: rgba(155,89,182,.2); color: #c49ad8; }
.pill { font-size: .8rem; background: var(--surface-2); padding: 4px 10px; border-radius: 999px; white-space: nowrap; }

/* Sitio */
.hero { padding: 80px 0 50px; text-align: center; }
.hero h1 { font-size: clamp(2rem, 6vw, 3.4rem); }
.lead { color: var(--muted); font-size: 1.1rem; max-width: 640px; margin: 0 auto 28px; }
.features { display: grid; grid-template-columns: repeat(auto-fit, minmax(230px, 1fr)); gap: 16px; padding-bottom: 50px; }
.feature { background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); padding: 22px; }
.feature p { color: var(--muted); margin: 0; font-size: .95rem; }
.plans { display: grid; grid-template-columns: repeat(auto-fit, minmax(260px, 1fr)); gap: 16px; padding-bottom: 60px; }
.plan { background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); padding: 26px; display: flex; flex-direction: column; }
.plan-hl { border-color: var(--accent); box-shadow: 0 0 0 1px var(--accent); }
.plan .price { font-size: 1.6rem; font-weight: 800; margin: 6px 0 14px; }
.plan .price small { font-size: .9rem; color: var(--muted); font-weight: 400; }
.plan .price + .price-ars { margin: -10px 0 14px; color: var(--muted); font-size: .95rem; }
.plan .price-ars small { font-size: .8rem; }
.fx-note { margin: -36px 0 60px; }
.plan ul { list-style: none; padding: 0; margin: 0 0 22px; flex: 1; }
.plan li { padding: 6px 0; border-bottom: 1px solid var(--border); font-size: .95rem; }
.foot { border-top: 1px solid var(--border); padding: 22px 0; color: var(--muted); font-size: .85rem; text-align: center; margin-top: 40px; }
.error-page .error-code { font-size: 4rem; font-weight: 800; color: var(--accent); }

/* Panel */
.planbar { display: flex; align-items: center; gap: 12px; padding-top: 14px; flex-wrap: wrap; }
.meter { flex: 1; min-width: 120px; max-width: 260px; height: 8px; background: var(--surface-2); border-radius: 4px; overflow: hidden; }
.meter-fill { height: 100%; background: var(--ok); }
.meter-fill.warn { background: #f1c40f; }
.meter-fill.danger { background: var(--danger); }
.page-head { display: flex; justify-content: space-between; align-items: flex-end; gap: 16px; margin: 26px 0 20px; flex-wrap: wrap; }
.page-head h1 { margin: 0; }
.page-head p { margin: 4px 0 0; }
.grid-2 { display: grid; grid-template-columns: 1fr 1fr; gap: 20px; }
.grid-2 > .card { margin-bottom: 0; }
.grid-2 + .card { margin-top: 20px; }
@media (max-width: 820px) { .grid-2 { grid-template-columns: 1fr; } }
.table-wrap { padding: 0; overflow-x: auto; }
.table { width: 100%; border-collapse: collapse; font-size: .95rem; }
.table th { text-align: left; color: var(--muted); font-weight: 600; font-size: .8rem; text-transform: uppercase; letter-spacing: .04em; padding: 12px 16px; border-bottom: 1px solid var(--border); }
.table td { padding: 12px 16px; border-bottom: 1px solid var(--border); white-space: nowrap; }
.table tr:last-child td { border-bottom: 0; }
.drop { display: flex; flex-direction: column; align-items: center; gap: 6px; text-align: center; border: 2px dashed var(--border); border-radius: var(--radius);
  padding: 34px 16px; cursor: pointer; transition: .15s; }
.drop:hover, .drop.over { border-color: var(--accent); background: rgba(230,126,34,.05); }
.progress { height: 6px; background: var(--surface-2); border-radius: 3px; overflow: hidden; margin-top: 14px; }
.progress-bar { height: 100%; width: 0; background: var(--accent); transition: width .3s; }
.thumbs { display: grid; grid-template-columns: repeat(auto-fill, minmax(140px, 1fr)); gap: 10px; }
.thumb { margin: 0; background: var(--bg); border-radius: 8px; overflow: hidden; }
.thumb img { width: 100%; aspect-ratio: 1; object-fit: cover; }
.thumb figcaption { display: flex; align-items: center; gap: 6px; padding: 6px 8px; font-size: .8rem; }
.price-input { margin: 0; padding: 4px 6px; font-size: .8rem; flex: 1; min-width: 0; }
.price-input.saved { border-color: var(--ok); }
.access-new { background: var(--bg); border: 1px solid var(--accent); border-radius: 10px; padding: 16px; margin-bottom: 16px; }
.pin-show { font-size: 2rem; font-weight: 800; letter-spacing: .3em; text-align: center; margin: 8px 0; }
.access-row { padding: 10px 0; border-bottom: 1px solid var(--border); font-size: .9rem; }
.danger-zone { text-align: right; margin-bottom: 40px; }

/* Tienda */
.store-hero { padding: 50px 16px 30px; text-align: center; }
.store-hero .lead { margin-bottom: 0; }
.albums { display: grid; grid-template-columns: repeat(auto-fill, minmax(280px, 1fr)); gap: 18px; }
.album-card { background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); overflow: hidden; color: var(--text); transition: transform .2s, border-color .2s; }
.album-card:hover { transform: translateY(-3px); border-color: var(--accent); text-decoration: none; }
.album-cover { aspect-ratio: 3 / 2; background: var(--surface-2); }
.album-cover img { width: 100%; height: 100%; object-fit: cover; }
.album-info { padding: 14px 16px; }
.album-info p { margin: 0; }
.album-head { padding-top: 28px; padding-bottom: 10px; }
.gallery { columns: 4 220px; column-gap: 10px; padding-bottom: 110px; }
.g-item { break-inside: avoid; margin: 0 0 10px; position: relative; border-radius: 8px; overflow: hidden; background: var(--surface); cursor: zoom-in; }
.g-item img { width: 100%; height: auto; background: var(--surface-2); }
.g-item figcaption { display: flex; justify-content: space-between; align-items: center; padding: 7px 10px; font-size: .82rem; }
.g-item.selected { box-shadow: 0 0 0 3px var(--accent); }
.g-item.in-cart { opacity: .55; }
.g-check { position: absolute; top: 8px; right: 8px; width: 30px; height: 30px; cursor: pointer; }
.g-check input { position: absolute; opacity: 0; inset: 0; width: 100%; height: 100%; cursor: pointer; margin: 0; }
.g-check span { display: block; width: 100%; height: 100%; border-radius: 50%; background: rgba(0,0,0,.45); border: 2px solid #fff; pointer-events: none; }
.g-check input:checked + span { background: var(--accent); border-color: var(--accent); }
.g-check input:checked + span::after { content: "✓"; color: #fff; display: flex; align-items: center; justify-content: center; height: 100%; font-weight: 800; }
.g-check input:disabled + span { opacity: .3; }
.g-dl { font-weight: 600; }
.selbar { position: fixed; left: 50%; transform: translateX(-50%); bottom: 16px; width: calc(100% - 32px); max-width: 720px; background: var(--surface-2);
  border: 1px solid var(--border); border-radius: 16px; padding: 12px 14px; display: flex; align-items: center; justify-content: space-between; gap: 10px;
  box-shadow: 0 10px 40px rgba(0,0,0,.5); z-index: 30; flex-wrap: wrap; }
.selbar-actions { display: flex; gap: 8px; flex-wrap: wrap; }
.lightbox { position: fixed; inset: 0; background: rgba(0,0,0,.94); z-index: 50; display: flex; align-items: center; justify-content: center; }
.lightbox img { max-width: calc(100vw - 32px); max-height: calc(100vh - 120px); object-fit: contain; user-select: none; -webkit-user-drag: none; }
.lightbox button.lb-close, .lightbox button.lb-prev, .lightbox button.lb-next { position: absolute; background: rgba(255,255,255,.08); color: #fff; border: 0;
  width: 46px; height: 46px; border-radius: 50%; font-size: 1.6rem; cursor: pointer; }
.lb-close { top: 14px; right: 14px; font-size: 1.1rem !important; }
.lb-prev { left: 12px; top: 50%; transform: translateY(-50%); }
.lb-next { right: 12px; top: 50%; transform: translateY(-50%); }
.lb-bar { position: absolute; bottom: 16px; left: 50%; transform: translateX(-50%); display: flex; gap: 14px; align-items: center; background: rgba(0,0,0,.6); padding: 8px 10px 8px 16px; border-radius: 999px; white-space: nowrap; }
@media (max-width: 560px) { .lb-prev, .lb-next { display: none; } }
.cart-row { display: flex; align-items: center; gap: 14px; padding: 10px 0; border-bottom: 1px solid var(--border); }
.cart-row img { width: 64px; height: 64px; object-fit: cover; border-radius: 6px; }
.cart-total { display: flex; justify-content: space-between; font-size: 1.15rem; padding: 16px 0; }
.pin-card { margin-top: 30px; }
.pin-input { font-size: 1.8rem; text-align: center; letter-spacing: .4em; margin: 10px 0 16px; }
