/* Dirección visual «Holo», la misma que la app de iOS: las cartas mandan. Fondo casi negro (oscuro) o gris frío de
   funda (claro), tarjetas un punto más claras, amarillo eléctrico de marca (solo en rellenos, con tinta encima) y
   verde/rojo reservados para subir y bajar de valor. Los colores salen de Theme.swift. */
:root {
  --brand: #ffd23f;
  --on-brand: #101418;
  --bg: #0b0e11;
  --card: #171c21;
  --card-2: #1e242a;
  --track: #22282e;
  --selected: #33393f;
  --soft: #2a3037;
  --step: #2e353c;
  --trade-box: #22282e;
  --text: #f2f4f6;
  --muted: #a3a9b1;
  --hair: rgba(255, 255, 255, .08);
  --accent: #ffd23f;
  --brand-text: #ffd23f;
  --sel-chip: #3c3926;
  --gain: #3cc48d;
  --gain-text: #3cc48d;
  --loss: #ff6b70;
  --give: #f2a93b;
  --dup: #a08bff;
  --danger: #ff3b30;
  --stat-cards: #ffd23f;
  --stat-unique: #2fc6c9;
  --stat-albums: #f06bb8;
  --notice-bg: #3a3112;
  --notice-text: #ffe7a3;
  --nav-glass: rgba(30, 36, 42, .82);
  --shadow: 0 1px 2px rgba(0, 0, 0, .3), 0 8px 24px rgba(0, 0, 0, .25);
  --r: 22px;
  --display: "Archivo", system-ui, -apple-system, sans-serif;
  color-scheme: dark;
}
:root[data-theme="light"] {
  --on-brand: #101418;
  --bg: #e9ecf0;
  --card: #ffffff;
  --card-2: #f7f7f9;
  --track: #e4e7eb;
  --selected: #ffffff;
  --soft: #f2f2f7;
  --step: #ebebf0;
  --trade-box: #f7f7f9;
  --text: #101418;
  --muted: #5c5f66;
  --hair: rgba(16, 20, 24, .09);
  --accent: #101418;
  --brand-text: #9a7400;
  --sel-chip: #ffd23f;
  --gain: #1f9d6b;
  --gain-text: #17805a;
  --loss: #e5484d;
  --give: #b86e00;
  --dup: #6a4ce0;
  --stat-cards: #b58500;
  --stat-unique: #0a8a8f;
  --stat-albums: #d23f95;
  --notice-bg: #fff6d6;
  --notice-text: #5c4600;
  --nav-glass: rgba(255, 255, 255, .8);
  --shadow: 0 1px 2px rgba(16, 20, 24, .05), 0 6px 18px rgba(16, 20, 24, .06);
  color-scheme: light;
}
@media (prefers-color-scheme: light) {
  :root:not([data-theme]) {
    --on-brand: #101418; --bg: #e9ecf0; --card: #ffffff; --card-2: #f7f7f9; --track: #e4e7eb; --selected: #ffffff;
    --soft: #f2f2f7; --step: #ebebf0; --trade-box: #f7f7f9; --text: #101418; --muted: #5c5f66;
    --hair: rgba(16, 20, 24, .09); --accent: #101418; --brand-text: #9a7400; --sel-chip: #ffd23f;
    --gain: #1f9d6b; --gain-text: #17805a; --loss: #e5484d; --give: #b86e00; --dup: #6a4ce0;
    --stat-cards: #b58500; --stat-unique: #0a8a8f; --stat-albums: #d23f95;
    --notice-bg: #fff6d6; --notice-text: #5c4600; --nav-glass: rgba(255, 255, 255, .8);
    --shadow: 0 1px 2px rgba(16, 20, 24, .05), 0 6px 18px rgba(16, 20, 24, .06);
    color-scheme: light;
  }
}

* { box-sizing: border-box; }
html, body { margin: 0; }
body {
  background: var(--bg);
  color: var(--text);
  font: 16px/1.4 -apple-system, BlinkMacSystemFont, "SF Pro Text", system-ui, "Segoe UI", Roboto, sans-serif;
  -webkit-font-smoothing: antialiased;
  -webkit-tap-highlight-color: transparent;
}
button, input, textarea, select { font: inherit; color: inherit; }
button { cursor: pointer; }
a { color: var(--brand-text); }
code { background: var(--soft); padding: 1px 6px; border-radius: 6px; font-size: .9em; }
svg { width: 1em; height: 1em; flex: none; }
[hidden] { display: none !important; }
:focus-visible { outline: 2px solid var(--brand); outline-offset: 2px; }

.display, .large-title { font-family: var(--display); font-stretch: 125%; font-variation-settings: "wdth" 125; }

/* ---------- estructura: barra lateral (escritorio) o barra flotante abajo (móvil) ---------- */
.app { min-height: 100dvh; }
main { padding: 0 16px calc(120px + env(safe-area-inset-bottom)); max-width: 1180px; margin: 0 auto; }

.nav {
  position: fixed; z-index: 30; left: 10px; right: 10px; bottom: max(14px, env(safe-area-inset-bottom));
  display: flex; align-items: center; gap: 8px;
}
.nav-brand, .nav-me, .nav-tabs .tab-search-wide { display: none; }
.nav-tabs {
  flex: 1; display: flex; padding: 4px; border-radius: 999px; min-width: 0;
  background: var(--nav-glass); border: 1px solid var(--hair);
  backdrop-filter: blur(22px) saturate(1.6); -webkit-backdrop-filter: blur(22px) saturate(1.6);
  box-shadow: 0 10px 30px rgba(0, 0, 0, .35);
}
.nav-tabs a, .nav-search {
  position: relative; flex: 1; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 3px;
  min-width: 0; padding: 7px 1px 6px; border-radius: 999px; color: var(--text); text-decoration: none;
  font-size: 10px; font-weight: 600; letter-spacing: -.02em; transition: background .2s, color .2s;
}
.nav-tabs a svg { width: 23px; height: 23px; }
.nav-tabs a span { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; max-width: 100%; }
.nav-tabs a[aria-selected="true"] { background: var(--selected); color: var(--brand-text); }
:root[data-theme="light"] .nav-tabs a[aria-selected="true"] { background: var(--track); }
.nav-search {
  flex: none; width: 58px; height: 58px; border-radius: 50%;
  background: var(--nav-glass); border: 1px solid var(--hair);
  backdrop-filter: blur(22px) saturate(1.6); -webkit-backdrop-filter: blur(22px) saturate(1.6);
  box-shadow: 0 10px 30px rgba(0, 0, 0, .35);
}
.nav-search svg { width: 26px; height: 26px; }
.nav-search[aria-selected="true"] { color: var(--brand-text); }
.badge {
  position: absolute; top: 1px; left: calc(50% + 6px); min-width: 19px; height: 19px; padding: 0 5px;
  display: grid; place-items: center; border-radius: 99px; background: var(--danger); color: #fff;
  font-size: 11.5px; font-weight: 700; font-variant-numeric: tabular-nums;
}
.badge:empty { display: none; }

@media (min-width: 900px) {
  .app { display: grid; grid-template-columns: 248px minmax(0, 1fr); }
  main { padding: 0 36px 60px; width: 100%; }
  .nav {
    position: sticky; top: 0; left: auto; right: auto; bottom: auto; height: 100dvh;
    flex-direction: column; align-items: stretch; gap: 6px; padding: 26px 16px 20px;
    border-right: 1px solid var(--hair);
  }
  .nav-brand {
    display: flex; align-items: center; gap: 10px; padding: 0 10px 22px; color: var(--text); text-decoration: none;
  }
  .brand-mark {
    display: grid; place-items: center; width: 36px; height: 36px; border-radius: 11px;
    background: var(--brand); color: var(--on-brand);
  }
  .brand-mark svg { width: 22px; height: 22px; }
  .brand-word { font-family: var(--display); font-variation-settings: "wdth" 125; font-weight: 900; font-size: 21px; letter-spacing: -.02em; }
  .brand-word span { color: var(--brand-text); margin-left: 2px; }
  .nav-tabs {
    flex: none; flex-direction: column; gap: 2px; padding: 0; border: 0; border-radius: 0;
    background: none; backdrop-filter: none; -webkit-backdrop-filter: none; box-shadow: none;
  }
  .nav-tabs a {
    flex-direction: row; justify-content: flex-start; gap: 14px; padding: 11px 14px; border-radius: 14px;
    font-size: 16px; font-weight: 600; color: var(--muted);
  }
  .nav-tabs a:hover { background: var(--card); color: var(--text); }
  .nav-tabs a[aria-selected="true"], :root[data-theme="light"] .nav-tabs a[aria-selected="true"] { background: var(--card); color: var(--text); }
  .nav-tabs a[aria-selected="true"] svg { color: var(--brand-text); }
  .nav-tabs a svg { width: 22px; height: 22px; }
  .tab-search-wide { display: flex !important; }
  .nav-search { display: none; }
  .badge { position: static; margin-left: auto; }
  .nav-me {
    display: flex; align-items: center; gap: 10px; margin-top: auto; padding: 8px 10px; border-radius: 16px;
    border: 0; background: none; text-align: left; font-weight: 600;
  }
  .nav-me:hover { background: var(--card); }
  .nav-me .dot { width: 36px; height: 36px; font-size: 13px; }
  .nav-me-name { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
  .me-btn { display: none !important; }
}

/* ---------- cabeceras ---------- */
.page-head {
  display: flex; align-items: center; justify-content: space-between; gap: 12px;
  padding: max(22px, env(safe-area-inset-top)) 0 14px;
}
.large-title { margin: 0; font-size: clamp(32px, 6vw, 40px); font-weight: 900; letter-spacing: -.02em; line-height: 1.05; min-width: 0; }
.head-actions { display: flex; align-items: center; gap: 10px; flex: none; }
.circle-btn {
  display: grid; place-items: center; width: 46px; height: 46px; border-radius: 50%; padding: 0; flex: none;
  border: 1px solid var(--hair); background: var(--card); color: var(--text); box-shadow: var(--shadow);
}
.circle-btn svg { width: 22px; height: 22px; }
.circle-btn.brand { color: var(--brand-text); }
:root[data-theme="light"] .circle-btn.brand { background: var(--brand); color: var(--on-brand); border-color: transparent; }
.circle-btn:hover { filter: brightness(1.12); }
.me-btn { border: 0; padding: 0; background: none; border-radius: 50%; }
.me-btn .dot { width: 46px; height: 46px; font-size: 16px; box-shadow: 0 0 0 2px var(--brand); }
.nav-bar {
  position: sticky; top: 0; z-index: 12; display: grid; grid-template-columns: 46px 1fr 46px; align-items: center; gap: 12px;
  padding: max(14px, env(safe-area-inset-top)) 0 12px; margin: 0 -16px; padding-left: 16px; padding-right: 16px;
  background: linear-gradient(var(--bg) 60%, transparent);
}
.nav-bar h1 { margin: 0; text-align: center; font-size: 18px; font-weight: 700; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
@media (min-width: 900px) { .nav-bar { margin: 0 -36px; padding-left: 36px; padding-right: 36px; padding-top: 22px; } .nav-bar h1 { font-size: 22px; } }
.back-link {
  display: inline-flex; align-items: center; gap: 4px; border: 0; background: none; padding: 4px 0; color: var(--brand-text);
  font-weight: 600; font-size: 15px;
}
.back-link svg { width: 18px; height: 18px; }

.section-title {
  display: flex; align-items: center; gap: 8px; margin: 30px 0 12px; font-size: 22px; font-weight: 800; letter-spacing: -.01em;
}
.section-title a, .section-title button { margin-left: auto; font-size: 15px; font-weight: 600; color: var(--brand-text); text-decoration: none; border: 0; background: none; padding: 0; }

.banner {
  margin: 16px 0 0; padding: 10px 14px; border-radius: 14px; background: var(--notice-bg); color: var(--notice-text); font-size: 14px;
}

/* ---------- piezas comunes ---------- */
.panel { background: var(--card); border-radius: var(--r); box-shadow: var(--shadow); }
.muted { color: var(--muted); margin: 0; font-size: 14px; }
.empty { text-align: center; color: var(--muted); padding: 40px 12px; margin: 0; }
.loading { font-size: 14px; color: var(--muted); margin: 12px 0; }
.row { display: flex; gap: 8px; align-items: center; }
.row.between, .sheet-head { display: flex; justify-content: space-between; align-items: center; gap: 10px; }

.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  min-height: 50px; padding: 0 18px; border-radius: 16px; border: 0;
  background: var(--soft); color: var(--text); font-weight: 650; font-size: 16px; white-space: nowrap; text-decoration: none;
  transition: transform .15s, opacity .15s, filter .15s;
}
.btn:hover { filter: brightness(1.08); }
.btn:active { transform: scale(.98); }
.btn svg { width: 20px; height: 20px; }
.btn.primary { background: var(--brand); color: var(--on-brand); }
.btn.danger { background: color-mix(in srgb, var(--danger) 14%, transparent); color: var(--danger); }
.btn.soft { background: var(--soft); }
.btn.ghost { background: transparent; }
.btn.block { width: 100%; }
.btn.sm { min-height: 36px; padding: 0 14px; border-radius: 12px; font-size: 14px; }
.btn:disabled { opacity: .45; cursor: default; transform: none; filter: none; }

.dot {
  display: inline-grid; place-items: center; flex: none; overflow: hidden;
  width: 26px; height: 26px; border-radius: 50%;
  background: var(--muted); color: #fff; font-size: 10.5px; font-weight: 700; letter-spacing: -.02em;
}
.dot img { width: 100%; height: 100%; object-fit: cover; display: block; }
.dot.sm { width: 20px; height: 20px; font-size: 8.5px; }
.dot.xs { width: 18px; height: 18px; font-size: 7.5px; }
.dot.md { width: 44px; height: 44px; font-size: 15px; }
.dot.lg { width: 72px; height: 72px; font-size: 24px; }
.dot.xs.dup { box-shadow: 0 0 0 2px var(--card), 0 0 0 3.5px var(--gain); }

.bar { flex: 1; height: 8px; background: var(--track); border-radius: 99px; overflow: hidden; }
.bar-fill { height: 100%; width: 0; background: var(--brand); border-radius: 99px; transition: width .3s; }
.bar-fill.full { background: linear-gradient(90deg, #7fe7f2, #b7a6ff, #ffb3e6, #ffe08a, #9cf2c2, #7fe7f2); }

.search-field {
  display: flex; align-items: center; gap: 10px; padding: 0 14px; height: 46px; border-radius: 14px;
  background: var(--card); border: 1px solid var(--hair); color: var(--muted);
}
.search-field svg { width: 18px; height: 18px; }
.search-field input { flex: 1; min-width: 0; height: 100%; border: 0; background: none; outline: none; color: var(--text); font-size: 16px; }
.search-field.big { height: 54px; border-radius: 18px; margin-bottom: 18px; }
.search-field.big input { font-size: 17px; }
input[type="search"]::-webkit-search-cancel-button { filter: grayscale(1); }

.chips { display: flex; gap: 8px; overflow-x: auto; padding: 2px 0; scrollbar-width: none; }
.chips::-webkit-scrollbar { display: none; }
.chip {
  flex: none; display: inline-flex; align-items: center; gap: 6px; border: 1px solid var(--hair); background: var(--card);
  border-radius: 999px; padding: 8px 14px; font-size: 14px; font-weight: 650; color: var(--text);
}
.chip svg { width: 14px; height: 14px; }
.chip[aria-pressed="true"] { background: var(--sel-chip); border-color: color-mix(in srgb, var(--brand) 70%, transparent); color: var(--brand-text); }
:root[data-theme="light"] .chip[aria-pressed="true"] { color: var(--on-brand); }
.chip.get svg { color: var(--gain); }
.chip.give svg { color: var(--give); }
.chip .n {
  display: grid; place-items: center; min-width: 22px; height: 22px; padding: 0 6px; border-radius: 99px;
  background: var(--brand); color: var(--on-brand); font-size: 12.5px; font-weight: 800;
}

/* Pastillas de pestañas (Intercambios) y segmentado (idiomas) */
.pill-tabs { display: flex; gap: 10px; overflow-x: auto; padding: 2px 2px 4px; margin: 0 -2px 18px; scrollbar-width: none; }
.pill-tabs::-webkit-scrollbar { display: none; }
.pill-tabs button {
  flex: none; display: inline-flex; align-items: center; gap: 8px; height: 46px; padding: 0 18px; border-radius: 999px;
  border: 1.5px solid var(--hair); background: var(--card); font-weight: 700; font-size: 16px;
}
.pill-tabs button[aria-pressed="true"] { background: var(--sel-chip); border-color: var(--brand); color: var(--brand-text); }
:root[data-theme="light"] .pill-tabs button[aria-pressed="true"] { color: var(--on-brand); }
.pill-tabs .n {
  display: grid; place-items: center; min-width: 26px; height: 26px; padding: 0 7px; border-radius: 99px;
  background: var(--brand); color: var(--on-brand); font-size: 14px; font-weight: 800;
}
.seg {
  display: flex; gap: 2px; padding: 4px; margin: 14px 0 0; border-radius: 999px; background: var(--track); max-width: 560px;
}
.seg button {
  flex: 1; border: 0; background: none; padding: 9px 12px; border-radius: 999px;
  font-weight: 600; font-size: 15px; color: var(--text); white-space: nowrap;
}
.seg button[aria-pressed="true"] { background: var(--selected); box-shadow: 0 1px 4px rgba(0, 0, 0, .15); }
.lang-note { margin: 8px 0 0; }

/* Etiquetas de idioma (EN · ES) */
.lchips { display: inline-flex; flex-wrap: wrap; gap: 4px; }
.lchip {
  font-size: 12px; font-weight: 800; padding: 1px 6px; border-radius: 6px; letter-spacing: .02em;
  border: 1.5px solid color-mix(in srgb, var(--text) 45%, transparent); color: var(--muted);
}
.lchip i { font-style: normal; display: none; }

/* ---------- Resumen ---------- */
.hero { padding: 24px; }
.hero-label { font-size: 16px; font-weight: 600; color: var(--muted); }
.hero-value-big { margin: 6px 0 4px; font-size: clamp(38px, 8vw, 54px); font-weight: 900; letter-spacing: -.02em; line-height: 1.05; }
.delta { display: flex; align-items: center; gap: 10px; font-weight: 700; font-size: 20px; color: var(--muted); }
.delta.up { color: var(--gain); }
.delta.down { color: var(--loss); }
.delta svg { width: 20px; height: 20px; }
.delta .pctag { font-size: 15px; padding: 3px 9px; border-radius: 8px; background: color-mix(in srgb, currentColor 16%, transparent); }
.delta .est { font-size: 13px; font-weight: 500; color: var(--muted); }
.hero .seg { margin: 18px 0 8px; max-width: none; }
.chart {
  display: grid; grid-template-columns: 1fr auto; grid-template-rows: 220px auto; gap: 8px 12px; margin-top: 14px;
  color: var(--gain);
}
.chart.down { color: var(--loss); }
.chart .plot { position: relative; }
.chart svg { position: absolute; inset: 0; width: 100%; height: 100%; overflow: visible; }
.chart .grid-line { stroke: color-mix(in srgb, var(--brand) 22%, transparent); stroke-width: 1; }
.chart .area { fill: url(#chart-fill); }
.chart .line { fill: none; stroke: currentColor; stroke-width: 3.5; stroke-linecap: round; stroke-linejoin: round; }
.chart .end-dot {
  position: absolute; width: 14px; height: 14px; margin: -7px 0 0 -7px; border-radius: 50%; background: currentColor;
  box-shadow: 0 0 0 4px color-mix(in srgb, currentColor 25%, transparent);
}
.chart .y-axis { position: relative; min-width: 76px; }
.chart .y-axis span { position: absolute; right: 0; transform: translateY(-50%); }
.chart .y-axis span, .chart .x-axis span { color: var(--muted); font-size: 13px; font-variant-numeric: tabular-nums; white-space: nowrap; }
.chart .x-axis { display: flex; justify-content: space-around; }
.act-line { font-size: 17px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.act-line b { font-weight: 700; }
.chart-empty { margin: 16px 0 0; }

.stats { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 14px; margin-top: 16px; }
@media (min-width: 1240px) { .stats.four { grid-template-columns: repeat(4, minmax(0, 1fr)); } }
.stat { padding: 18px 20px; container-type: inline-size; min-width: 0; }
.stat-value.long { font-size: min(38px, 15.5cqi); }
@media (max-width: 520px) { .stat { padding: 16px; } .stat-head { font-size: 15px; gap: 10px; } .stat-icon { width: 34px; height: 34px; } }
.stat-head { display: flex; align-items: center; gap: 12px; color: var(--muted); font-weight: 600; font-size: 17px; }
.stat-icon {
  display: grid; place-items: center; width: 38px; height: 38px; border-radius: 11px;
  color: var(--c); background: color-mix(in srgb, var(--c) 18%, transparent);
}
.stat-icon svg { width: 22px; height: 22px; }
.stat-value { margin-top: 12px; font-size: min(38px, 27cqi); white-space: nowrap; font-weight: 900; letter-spacing: -.01em; line-height: 1; font-variant-numeric: tabular-nums; }

.list { overflow: hidden; }
.list-row {
  display: flex; align-items: center; gap: 14px; width: 100%; padding: 13px 18px; border: 0; background: none; text-align: left;
  color: inherit; text-decoration: none; position: relative;
}
.list-row + .list-row::before { content: ""; position: absolute; top: 0; right: 0; left: 74px; border-top: 1px solid var(--hair); }
.list.thumbs .list-row + .list-row::before { left: 68px; }
button.list-row:hover, a.list-row:hover, .list-row[data-friend]:hover { background: var(--card-2); }
.list-row[data-friend], .list-row[data-open] { cursor: pointer; }
.list-main { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 2px; }
.list-main b { font-size: 17px; font-weight: 650; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.list-main small { color: var(--muted); font-size: 14.5px; overflow: hidden; text-overflow: ellipsis; }
.list-main small.wrap { white-space: normal; }
.list-main small:not(.wrap) { white-space: nowrap; }
.list-end { display: flex; flex-direction: column; align-items: flex-end; gap: 2px; font-weight: 700; font-variant-numeric: tabular-nums; flex: none; }
.list-end small { font-size: 14px; }
.list-row > .chev { width: 18px; height: 18px; color: var(--muted); flex: none; }
.list-row .thumb { width: 40px; aspect-ratio: 63 / 88; border-radius: 4px; object-fit: cover; flex: none; display: block; }
.list-row .thumb.ph { padding: 0; }
.tag-brand {
  flex: none; padding: 5px 12px; border-radius: 99px; background: var(--brand); color: var(--on-brand); font-weight: 700; font-size: 15px;
}
.up-t { color: var(--gain); } .down-t { color: var(--loss); }
.gain-t { color: var(--gain-text); }

.top-cards { display: flex; gap: 14px; overflow-x: auto; padding: 2px 2px 8px; margin: 0 -2px; scrollbar-width: thin; }
.top-card { flex: none; width: 128px; border: 0; background: none; padding: 0; text-align: left; display: flex; flex-direction: column; gap: 4px; }
@media (min-width: 900px) { .top-card { width: 150px; } }
.top-card .art-img { width: 100%; aspect-ratio: 63 / 88; border-radius: 7px; overflow: hidden; box-shadow: 0 4px 12px rgba(0, 0, 0, .3); transition: transform .2s; }
.top-card:hover .art-img { transform: translateY(-3px); }
.top-card .art-img img, .top-card .art-img .ph { width: 100%; height: 100%; object-fit: cover; display: block; }
.top-card b { font-size: 15px; font-weight: 650; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.top-card span { font-weight: 800; color: var(--gain-text); font-variant-numeric: tabular-nums; }
.movers-title { display: flex; align-items: center; gap: 8px; margin: 4px 0 10px; font-weight: 800; font-size: 18px; }
.movers-title svg { width: 20px; height: 20px; }
.movers-title + .list { margin-bottom: 16px; }
.summary-cols { display: grid; grid-template-columns: minmax(0, 1fr); gap: 0 22px; }
@media (min-width: 1100px) { .summary-cols { grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); } .summary-cols > div > .section-title:first-child { margin-top: 30px; } }

.album-progress { padding: 6px 0; }
.ap-row { display: block; padding: 12px 22px; border: 0; background: none; width: 100%; text-align: left; color: inherit; }
.ap-row:hover { background: var(--card-2); }
.ap-top { display: flex; align-items: baseline; gap: 10px; margin-bottom: 8px; }
.ap-top b { font-size: 17px; font-weight: 650; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; min-width: 0; }
.ap-top .langs { font-size: 13px; font-weight: 800; color: var(--muted); letter-spacing: .02em; flex: none; }
.ap-top .ap-n { margin-left: auto; color: var(--muted); font-weight: 700; font-variant-numeric: tabular-nums; flex: none; }

.avatar-pair { position: relative; width: 44px; height: 44px; flex: none; }
.avatar-pair .dot { position: absolute; width: 32px; height: 32px; font-size: 11px; box-shadow: 0 0 0 2px var(--card); }
.avatar-pair .dot:first-child { left: 0; top: 6px; z-index: 1; }
.avatar-pair .dot:last-child { right: 0; top: 6px; }

/* ---------- Colecciones ---------- */
.albums { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 14px; }
@media (min-width: 700px) { .albums { grid-template-columns: repeat(auto-fill, minmax(240px, 1fr)); gap: 20px; } }
.album-tile {
  position: relative; display: flex; flex-direction: column; overflow: hidden; cursor: pointer; text-align: left; padding: 0;
  background: var(--card); border: 1px solid var(--hair); border-radius: var(--r); box-shadow: var(--shadow);
  color: inherit; transition: transform .18s, box-shadow .18s;
}
.album-tile:hover { transform: translateY(-3px); box-shadow: 0 14px 34px rgba(0, 0, 0, .3); }
.album-cover {
  position: relative; aspect-ratio: 4 / 3; overflow: hidden; display: grid; place-items: center;
  background:
    linear-gradient(135deg, rgba(255, 255, 255, .06), transparent 40%),
    radial-gradient(circle at 50% 35%, rgba(255, 210, 63, .16), transparent 60%),
    linear-gradient(#252c35, #101418);
}
:root[data-theme="light"] .album-cover {
  background:
    linear-gradient(135deg, rgba(255, 255, 255, .5), transparent 40%),
    radial-gradient(circle at 50% 35%, rgba(255, 210, 63, .32), transparent 60%),
    linear-gradient(#fffdf8, #ede6d8);
}
.fan { position: absolute; inset: 8% 0 -8%; display: flex; justify-content: center; align-items: flex-start; }
.fan img {
  width: 34%; aspect-ratio: 63 / 88; object-fit: cover; border-radius: 5px; box-shadow: 0 6px 16px rgba(0, 0, 0, .4);
  margin: 0 -7%;
}
.fan img:nth-child(1) { transform: rotate(-11deg) translateY(9%); }
.fan img:nth-child(2) { position: relative; z-index: 1; width: 39%; }
.fan img:nth-child(3) { transform: rotate(11deg) translateY(9%); }
.fan img.gray { filter: grayscale(1) brightness(.8); }
.album-cover .logo {
  position: absolute; left: 10%; right: 10%; bottom: 7%; max-height: 34%; width: 80%; object-fit: contain; z-index: 2;
  filter: drop-shadow(0 3px 8px rgba(0, 0, 0, .5));
}
.album-cover .cover-name { padding: 12px; font-weight: 800; text-align: center; color: var(--muted); }
.album-cover .cover-code {
  display: inline-flex; align-items: center; gap: 8px; padding: 6px 16px; border-radius: 99px; z-index: 2;
  background: #c8102e; color: #fff; font-family: var(--display); font-variation-settings: "wdth" 125; font-weight: 900; font-size: 22px;
  box-shadow: 0 4px 14px rgba(0, 0, 0, .4);
}
.album-info { padding: 14px 16px 16px; display: flex; flex-direction: column; gap: 8px; }
.album-tile-top { display: flex; align-items: flex-start; gap: 8px; }
.album-tile-name {
  flex: 1; min-width: 0; font-size: 17px; font-weight: 800; line-height: 1.2;
  display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden;
}
.album-info .bar { flex: none; height: 8px; }
.album-info .nums { font-size: 15px; color: var(--muted); }
.album-info .value { font-size: 15px; }
.album-info .value b { font-variant-numeric: tabular-nums; }
.tile-menu {
  position: absolute; top: 10px; right: 10px; z-index: 3; display: grid; place-items: center;
  width: 34px; height: 34px; border-radius: 50%; padding: 0; border: 0;
  background: rgba(0, 0, 0, .45); color: #fff; backdrop-filter: blur(6px); -webkit-backdrop-filter: blur(6px);
  opacity: 0; transition: opacity .15s;
}
.tile-menu svg { width: 18px; height: 18px; }
.album-tile:hover .tile-menu, .tile-menu:focus-visible { opacity: 1; }
@media (hover: none) { .tile-menu { opacity: 1; } }
.album-tile.add {
  align-items: center; justify-content: center; gap: 8px; min-height: 220px; padding: 20px; text-align: center;
  border: 2px dashed var(--hair); background: transparent; box-shadow: none; color: var(--muted); font-weight: 700;
}
.album-tile.add .plus {
  display: grid; place-items: center; width: 58px; height: 58px; border-radius: 50%;
  background: var(--brand); color: var(--on-brand);
}
.album-tile.add .plus svg { width: 28px; height: 28px; }
.album-tile.add b { color: var(--text); font-size: 18px; }

/* ---------- dentro de un álbum ---------- */
.owner-banner {
  display: flex; align-items: center; gap: 8px; margin: 0 0 12px; padding: 10px 14px; border-radius: 14px;
  background: var(--card); font-size: 15px;
}
.album-hero { background: var(--card); border-radius: var(--r); padding: 20px 22px; box-shadow: var(--shadow); }
.hero-row { display: flex; align-items: center; justify-content: space-between; gap: 12px; }
.group-pick { position: relative; display: flex; align-items: center; gap: 6px; font-weight: 650; font-size: 19px; min-width: 0; }
.group-pick select {
  appearance: none; -webkit-appearance: none; border: 0; background: none; font-weight: 650; font-size: 19px; padding: 0 26px 0 0;
  cursor: pointer; color: var(--text); max-width: 100%;
}
.group-pick select option { color: initial; }
.group-pick svg { position: absolute; right: 0; width: 18px; height: 18px; pointer-events: none; }
.hero-value { display: flex; align-items: center; gap: 10px; font-weight: 800; font-size: 22px; font-variant-numeric: tabular-nums; white-space: nowrap; }
.hero-value svg { width: 28px; height: 28px; color: var(--brand); }
.progress-row { display: flex; align-items: center; gap: 14px; margin: 16px 0 18px; }
.progress-row .bar { height: 10px; }
.progress-row .pct { color: var(--muted); font-weight: 600; font-size: 18px; font-variant-numeric: tabular-nums; min-width: 3.5ch; text-align: right; }
.seg-stats { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 4px; padding: 6px; border-radius: 22px; background: var(--track); }
.seg-stats button {
  display: flex; flex-direction: column; align-items: center; gap: 2px; padding: 10px 4px; border: 0; border-radius: 16px; background: none;
  color: var(--muted);
}
.seg-stats button b { font-size: 26px; font-weight: 800; color: var(--text); font-variant-numeric: tabular-nums; line-height: 1.1; }
.seg-stats button span { font-size: 15px; font-weight: 600; }
.seg-stats button[aria-pressed="true"] { background: var(--selected); color: var(--text); box-shadow: 0 1px 4px rgba(0, 0, 0, .15); }
.album-meta { margin-top: 10px; font-size: 13px; }
.album-meta:empty { display: none; }
.album-tools { display: flex; flex-wrap: wrap; gap: 10px 12px; align-items: center; margin: 16px 0 18px; }
.album-tools .search-field { flex: 1 1 260px; max-width: 420px; }
.album-tools .chips { flex: 1 1 auto; }

/* Rejilla de cartas */
.grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: 12px; }
@media (max-width: 520px) { .grid { grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 8px; } }
@media (min-width: 900px) { .grid { grid-template-columns: repeat(auto-fill, minmax(176px, 1fr)); gap: 16px; } }
.card {
  position: relative; display: flex; flex-direction: column; gap: 8px; padding: 9px;
  background: var(--card); border-radius: 18px; border: 2px solid transparent; box-shadow: var(--shadow);
}
.card.can-get { border: 2.5px dashed var(--gain); }
.card.can-give { border-color: color-mix(in srgb, var(--give) 75%, transparent); }
.art {
  position: relative; aspect-ratio: 63 / 88; border-radius: 9px; overflow: hidden;
  background: var(--track); border: 0; padding: 0; display: block; width: 100%;
}
.art img { width: 100%; height: 100%; object-fit: cover; display: block; transition: filter .2s, opacity .2s, transform .25s; }
.art:hover img { transform: scale(1.03); }
.card.missing .art img, .card.missing .art .ph { filter: grayscale(1) brightness(.8); opacity: .42; }
:root[data-theme="light"] .card.missing .art img { filter: grayscale(1); opacity: .5; }
.ph {
  width: 100%; height: 100%; display: flex; flex-direction: column; justify-content: space-between;
  padding: 8px; color: #fff; text-align: left;
  background: linear-gradient(160deg, var(--tc, #888), color-mix(in srgb, var(--tc, #888) 55%, #000));
}
.ph b { font-size: 13px; line-height: 1.15; text-shadow: 0 1px 2px rgba(0, 0, 0, .4); }
.ph small { font-size: 10px; opacity: .9; }
.ph .ph-num { font-size: 22px; font-weight: 800; opacity: .9; }

.badges { position: absolute; left: 6px; right: 6px; top: 6px; display: flex; flex-direction: column; gap: 4px; align-items: flex-start; pointer-events: none; }
.tb {
  display: inline-flex; align-items: center; gap: 2px; padding: 3px 3px 3px 8px; border-radius: 99px;
  color: #fff; box-shadow: 0 2px 8px rgba(0, 0, 0, .35); max-width: 100%; overflow: hidden;
}
.tb > svg { width: 15px; height: 15px; margin-right: 3px; }
.tb.get { background: var(--gain); }
.tb.give { background: var(--give); }
.tb .dot { width: 26px; height: 26px; font-size: 10px; border: 2px solid #fff; margin-left: -7px; }
.tb .dot:first-of-type { margin-left: 0; }
.tb .more { font-size: 11px; font-weight: 800; padding: 0 5px; }

.meta { display: flex; gap: 6px; align-items: baseline; min-width: 0; padding: 0 2px; }
.meta .num { font-size: 14px; color: var(--muted); font-variant-numeric: tabular-nums; flex: none; }
.meta .name { font-size: 15px; font-weight: 700; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.have { display: flex; flex-wrap: wrap; gap: 3px; padding: 0 2px; align-items: center; }
.have:empty { display: none; }
.soon-line { font-size: 12px; font-weight: 700; color: var(--give); padding: 0 2px; }

.ctrl { display: grid; grid-template-columns: 1fr auto 1fr; align-items: center; gap: 6px; }
.ctrl button {
  display: grid; place-items: center; height: 38px; border-radius: 13px; border: 0; padding: 0;
  background: var(--soft); color: var(--text); transition: transform .12s, filter .15s;
}
.ctrl button:hover { filter: brightness(1.15); }
.ctrl button:active { transform: scale(.94); }
.ctrl button svg { width: 18px; height: 18px; }
.ctrl .qty { display: grid; place-items: center; min-width: 30px; color: var(--brand); font-weight: 800; font-size: 17px; font-variant-numeric: tabular-nums; }
.ctrl .qty svg { width: 20px; height: 20px; }
:root[data-theme="light"] .ctrl .qty > * { background: var(--brand); color: var(--on-brand); border-radius: 99px; padding: 1px 6px; font-size: 13px; }
:root[data-theme="light"] .ctrl .qty svg { width: 22px; height: 18px; padding: 2px 5px; box-sizing: content-box; }
.ctrl .add-btn { grid-column: 1 / -1; color: var(--muted); font-weight: 650; font-size: 16px; }
.ctrl.locked button { opacity: .35; cursor: help; }
.qty-ro { grid-column: 1 / -1; display: grid; place-items: center; height: 38px; border-radius: 13px; background: var(--soft); font-size: 14px; font-weight: 700; color: var(--muted); }
.card.owned .qty-ro { color: var(--brand-text); }
.card.dup .qty-ro { color: var(--dup); }
@media (max-width: 520px) {
  .card { padding: 6px; gap: 6px; border-radius: 14px; }
  .art { border-radius: 7px; }
  .meta { gap: 4px; }
  .meta .num { font-size: 12px; }
  .meta .name { font-size: 13px; }
  .ctrl { gap: 4px; }
  .ctrl button, .qty-ro { height: 32px; border-radius: 10px; }
  .ctrl .add-btn { font-size: 14px; }
  .ctrl .qty { font-size: 15px; min-width: 22px; }
  .tb .dot { width: 22px; height: 22px; }
  .seg-stats button b { font-size: 22px; }
  .seg-stats button span { font-size: 13px; }
  .album-hero { padding: 16px; }
}
.qty.bump { animation: bump .35s; }
@keyframes bump { 40% { transform: scale(1.35); } }

/* ---------- Intercambios ---------- */
.trade { padding: 20px; margin-bottom: 16px; }
.trade-head { display: flex; align-items: center; gap: 14px; }
.trade-head .list-main b { font-size: 19px; }
.status {
  flex: none; padding: 5px 12px; border-radius: 99px; font-weight: 700; font-size: 14.5px;
  background: var(--soft); color: var(--muted);
}
.status.warn { background: color-mix(in srgb, var(--loss) 16%, transparent); color: var(--loss); }
.status.ok { background: color-mix(in srgb, var(--gain) 16%, transparent); color: var(--gain); }
.status.brand { background: var(--brand); color: var(--on-brand); }
.trade-note { margin: 12px 0 0; font-style: italic; color: var(--muted); }
.trade-info { margin: 12px 0 0; font-size: 14.5px; color: var(--muted); }
.trade-info b { color: var(--text); }
.trade-boxes { position: relative; display: grid; grid-template-columns: 1fr 1fr; gap: 14px; margin-top: 16px; }
.trade-box {
  display: flex; flex-direction: column; align-items: center; gap: 10px; padding: 14px 10px 16px; border-radius: 18px;
  background: var(--trade-box); min-width: 0;
}
.trade-box h4 { margin: 0; font-size: 15px; font-weight: 650; color: var(--muted); }
.trade-box .val { font-weight: 700; color: var(--muted); font-variant-numeric: tabular-nums; }
.trade-box .val .money { color: var(--gain-text); margin-left: 4px; }
.trade-swap {
  position: absolute; left: 50%; top: 50%; transform: translate(-50%, -50%); display: grid; place-items: center;
  width: 40px; height: 40px; border-radius: 50%; background: var(--card); color: var(--muted); box-shadow: 0 0 0 4px var(--card);
}
.trade-swap svg { width: 22px; height: 22px; }
.stack { position: relative; display: flex; justify-content: center; min-height: 112px; align-items: center; }
.stack button { border: 0; background: none; padding: 0; }
.stack .s-card { width: 76px; aspect-ratio: 63 / 88; border-radius: 6px; overflow: hidden; box-shadow: 0 4px 12px rgba(0, 0, 0, .35); background: var(--track); }
.stack .s-card img, .stack .s-card .ph { width: 100%; height: 100%; object-fit: cover; display: block; padding: 0; }
.stack .s-card + .s-card { margin-left: -46px; }
.stack .more-n {
  position: absolute; right: -6px; bottom: -6px; padding: 2px 8px; border-radius: 99px;
  background: var(--brand); color: var(--on-brand); font-weight: 800; font-size: 13px;
}
.stack .none { color: var(--muted); font-size: 14px; text-align: center; padding: 0 8px; }
.trade-actions { display: grid; grid-template-columns: repeat(auto-fit, minmax(140px, 1fr)); gap: 12px; margin-top: 18px; }
.trade-hint { display: flex; align-items: center; justify-content: center; gap: 8px; margin: 16px 0 0; color: var(--muted); font-weight: 600; text-align: center; }
.trade-hint svg { width: 18px; height: 18px; }
.trade-cards-list { margin-top: 14px; display: grid; gap: 12px; }
.trade-cards-list h4 { margin: 0 0 8px; font-size: 14px; display: flex; justify-content: space-between; gap: 8px; color: var(--muted); }
.trade-cards-list h4 .get { color: var(--gain-text); }
.trade-cards-list h4 .give { color: var(--give); }
details.more-cards { margin-top: 12px; }
details.more-cards summary { cursor: pointer; color: var(--brand-text); font-weight: 650; font-size: 15px; list-style: none; }
details.more-cards summary::-webkit-details-marker { display: none; }
.mini-list { display: flex; flex-wrap: wrap; gap: 6px; }
.mini {
  position: relative; display: flex; align-items: center; gap: 6px; border: 0; background: var(--trade-box);
  border-radius: 10px; padding: 4px 10px 4px 4px; font-size: 13px; max-width: 100%;
}
.mini img, .mini .ph { width: 26px; height: 36px; border-radius: 3px; object-fit: cover; padding: 0; flex: none; }
.mini .ph { display: block; }
.mini span { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.mini .n { color: var(--muted); font-variant-numeric: tabular-nums; }
.mini-lang {
  position: absolute; top: 2px; left: 2px; padding: 0 4px; border-radius: 99px;
  background: rgba(0, 0, 0, .65); color: #fff; font-size: 9px; font-weight: 800; line-height: 14px;
}
.none { font-size: 14px; color: var(--muted); }
.copy-row { display: flex; justify-content: flex-end; margin: -6px 0 12px; }

/* ---------- Amigos ---------- */
.friend-actions { display: grid; gap: 14px; margin-top: 22px; }
@media (min-width: 900px) { .friend-actions { grid-template-columns: 1fr 1fr; } }
.box { padding: 18px 20px; }
.box h3 { margin: 0 0 6px; font-size: 18px; }
.box .search-field { margin-top: 12px; background: var(--bg); }
.who-list { display: flex; flex-wrap: wrap; gap: 8px; }
.who-list button {
  display: flex; align-items: center; gap: 8px; border: 0; background: var(--soft);
  border-radius: 999px; padding: 5px 14px 5px 5px; font-weight: 650;
}
.who-list button[aria-current="true"] { box-shadow: 0 0 0 2px var(--brand); }
.friend-results { margin-top: 10px; }
.invite-link { display: flex; gap: 8px; align-items: center; margin-top: 12px; }
.invite-link code { flex: 1; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-size: 13px; padding: 8px 10px; border-radius: 10px; }
.album-chips { display: flex; flex-wrap: wrap; gap: 4px; margin-top: 6px; }
.achip { font-size: 12px; padding: 2px 8px; border-radius: 99px; background: var(--soft); color: var(--muted); }
.achip b { color: var(--text); }
.tag { display: inline-block; font-size: 12.5px; padding: 3px 10px; border-radius: 99px; background: var(--soft); color: var(--muted); font-weight: 650; }
.tag.soon { background: color-mix(in srgb, var(--give) 18%, transparent); color: var(--give); }

.profile-head { display: flex; align-items: center; gap: 18px; margin: 8px 0 6px; }
.profile-head h2 { margin: 0; font-size: clamp(30px, 6vw, 40px); font-weight: 900; letter-spacing: -.01em; line-height: 1.1; }
.profile-head p { margin: 4px 0 0; color: var(--muted); font-size: 16px; }
.profile-cta { margin-top: 16px; }

/* ---------- Buscar ---------- */
.search-results { display: flex; flex-direction: column; gap: 8px; }
.sr-title { font-size: 20px; font-weight: 800; margin: 14px 0 6px; }
.sr-list { background: var(--card); border-radius: var(--r); overflow: hidden; box-shadow: var(--shadow); }
.sr-row {
  display: grid; grid-template-columns: 46px 1fr auto; gap: 14px; align-items: center; width: 100%; position: relative;
  text-align: left; padding: 10px 18px; border: 0; background: none;
}
.sr-row + .sr-row::before { content: ""; position: absolute; top: 0; right: 0; left: 78px; border-top: 1px solid var(--hair); }
.sr-row:hover { background: var(--card-2); }
.sr-thumb img, .sr-thumb .ph { width: 46px; height: 64px; border-radius: 4px; object-fit: cover; display: block; padding: 0; }
.sr-main { display: flex; flex-direction: column; gap: 2px; min-width: 0; }
.sr-main b, .sr-main small { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.sr-main b { font-size: 16px; font-weight: 650; }
.sr-main small { color: var(--muted); font-size: 14px; }
.sr-meta { display: flex; align-items: center; gap: 3px; }
.sr-meta em { font-style: normal; font-size: 12.5px; color: var(--muted); margin-left: 4px; }
.sr-price { display: flex; flex-direction: column; align-items: flex-end; font-weight: 700; font-variant-numeric: tabular-nums; }
.sr-price small { font-size: 12.5px; color: var(--brand-text); }
.sr-noprice { font-size: 13px; font-weight: 500; color: var(--muted); }
.search-hint { padding: 30px 12px; text-align: center; color: var(--muted); }
.search-hint svg { width: 44px; height: 44px; display: block; margin: 0 auto 10px; opacity: .5; }

/* ---------- hojas (diálogos) ---------- */
dialog.sheet {
  border: 0; padding: 0; background: var(--card); color: var(--text);
  border-radius: 26px; width: min(480px, calc(100vw - 24px)); max-height: calc(100dvh - 24px);
  box-shadow: 0 30px 80px rgba(0, 0, 0, .5);
}
dialog.sheet.wide { width: min(800px, calc(100vw - 24px)); }
dialog::backdrop { background: rgba(5, 7, 9, .62); backdrop-filter: blur(3px); -webkit-backdrop-filter: blur(3px); }
@media (max-width: 600px) {
  dialog.sheet, dialog.sheet.wide {
    width: 100vw; max-width: 100vw; margin: auto 0 0; border-radius: 26px 26px 0 0; max-height: 92dvh;
    padding-bottom: env(safe-area-inset-bottom);
  }
}
.sheet-inner { padding: 22px; display: flex; flex-direction: column; gap: 14px; }
.sheet-inner h2 { margin: 0; font-size: 24px; font-weight: 800; }
.sheet-inner input:not([type="checkbox"]):not([type="search"]), .sheet-inner select, textarea {
  min-width: 0; padding: 0 14px; height: 48px; border-radius: 14px; border: 1px solid var(--hair); background: var(--bg);
}
.sheet-inner .row input { flex: 1; }
textarea { width: 100%; resize: vertical; height: auto; padding: 12px 14px; }
.account-head { display: flex; align-items: center; gap: 14px; }
.account-head h2 { font-size: 26px; }
.field-label { font-size: 14px; font-weight: 650; color: var(--muted); margin: 6px 0 -6px; }

/* Detalle de carta */
.detail { display: grid; grid-template-columns: minmax(0, 300px) 1fr; gap: 26px; }
@media (max-width: 640px) { .detail { grid-template-columns: 1fr; } .detail .holo-slot { max-width: 260px; width: 100%; margin: 0 auto; } }
.detail .info { display: flex; flex-direction: column; gap: 4px; min-width: 0; }
.detail h2 { margin: 0; font-size: 28px; font-weight: 800; }
.detail-price { margin: 8px 0 2px; font-size: 30px; font-weight: 900; font-variant-numeric: tabular-nums; }
.detail-price small { font-family: -apple-system, BlinkMacSystemFont, system-ui, sans-serif; font-size: 14px; font-weight: 600; color: var(--muted); margin-left: 6px; font-variation-settings: normal; }
.holo-slot { display: flex; flex-direction: column; align-items: center; gap: 10px; }
.holo {
  position: relative; width: 100%; aspect-ratio: 63 / 88; perspective: 900px;
  touch-action: none; cursor: grab; user-select: none; -webkit-user-select: none;
}
.holo.active { cursor: grabbing; }
.holo-inner {
  position: absolute; inset: 0; border-radius: 4.5% / 3.3%; overflow: hidden; isolation: isolate;
  background: var(--track);
  transform: rotateX(var(--rx, 0deg)) rotateY(var(--ry, 0deg)) scale(var(--sc, 1));
  transition: transform .6s cubic-bezier(.2, .8, .2, 1), box-shadow .6s;
  box-shadow: 0 14px 34px rgba(0, 0, 0, .45);
  will-change: transform;
}
.holo.active .holo-inner { --sc: 1.03; transition: transform .08s linear, box-shadow .3s; box-shadow: 0 24px 56px rgba(0, 0, 0, .55); }
.holo-inner img { width: 100%; height: 100%; object-fit: cover; display: block; -webkit-user-drag: none; pointer-events: none; }
.holo-inner .ph b, .big .ph b { font-size: 20px; } .holo-inner .ph .ph-num, .big .ph .ph-num { font-size: 40px; }
.holo-shine, .holo-glare { position: absolute; inset: 0; pointer-events: none; transition: opacity .5s; }
.holo-shine {
  mix-blend-mode: soft-light;
  opacity: calc(var(--o, 0) * .45);
  background-image: linear-gradient(115deg,
    transparent 38%,
    hsl(190 70% 75% / .7) 44%, hsl(280 60% 78% / .8) 48%, hsl(40 80% 75% / .8) 52%, hsl(140 55% 72% / .7) 56%,
    transparent 62%);
  background-size: 300% 300%;
  background-position: var(--px, 50%) var(--py, 50%);
}
.holo[data-holo="none"] .holo-shine { display: none; }
.holo[data-holo="strong"] .holo-shine {
  opacity: calc(var(--o, 0) * .6);
  background-image:
    radial-gradient(circle at 20% 30%, rgba(255, 255, 255, .6) 0 .6px, transparent 1.4px),
    radial-gradient(circle at 70% 60%, rgba(255, 255, 255, .5) 0 .6px, transparent 1.4px),
    linear-gradient(115deg,
      transparent 34%,
      hsl(190 70% 75% / .75) 42%, hsl(280 60% 78% / .85) 47%, hsl(40 80% 75% / .85) 52%, hsl(140 55% 72% / .75) 57%,
      transparent 65%);
  background-size: 29px 29px, 37px 37px, 300% 300%;
  background-position: var(--px, 50%) var(--py, 50%), var(--py, 50%) var(--px, 50%), var(--px, 50%) var(--py, 50%);
}
.holo-glare {
  mix-blend-mode: soft-light;
  opacity: calc(var(--o, 0) * .7);
  background: radial-gradient(farthest-corner circle at var(--mx, 50%) var(--my, 50%),
    rgba(255, 255, 255, .7) 0%, rgba(255, 255, 255, .15) 30%, rgba(0, 0, 0, .15) 90%);
}
.holo-hint { margin: 0; font-size: 13px; color: var(--muted); text-align: center; }
@media (prefers-reduced-motion: reduce) { .holo-inner, .holo.active .holo-inner { transition: none; } }
.kv { display: flex; flex-wrap: wrap; gap: 6px; margin: 8px 0 0; }
.stepper { display: flex; align-items: center; gap: 12px; margin: 14px 0 0; padding: 10px; border-radius: 18px; background: var(--trade-box); }
.stepper + .stepper { margin-top: 8px; }
.stepper button { display: grid; place-items: center; width: 48px; height: 44px; border-radius: 14px; border: 0; background: var(--soft); font-size: 24px; font-weight: 700; }
.stepper .qty { font-size: 24px; font-weight: 900; min-width: 2ch; text-align: center; font-variant-numeric: tabular-nums; }
.step-lang { font-weight: 800; font-size: 14px; min-width: 52px; }
.owners { list-style: none; margin: 8px 0 0; padding: 0; display: flex; flex-direction: column; gap: 8px; }
.owners li { display: flex; align-items: center; gap: 10px; font-size: 15px; }
.owners .st { margin-left: auto; font-size: 12.5px; font-weight: 700; padding: 3px 10px; border-radius: 99px; background: var(--soft); color: var(--muted); }
.owners .st.has { color: var(--text); }
.owners .st.dup { background: color-mix(in srgb, var(--gain) 16%, transparent); color: var(--gain); }
.owners .st.need { background: color-mix(in srgb, var(--give) 16%, transparent); color: var(--give); }
.detail h4 { margin: 18px 0 0; font-size: 16px; }
.cm-btn { margin-top: 18px; align-self: flex-start; }
.detail-nav { display: flex; justify-content: space-between; gap: 8px; margin-top: 6px; }
.add-banner {
  display: flex; align-items: center; justify-content: space-between; gap: 10px; margin-top: 12px;
  padding: 10px 14px; border-radius: 14px; background: var(--notice-bg); color: var(--notice-text); font-size: 14.5px;
}

/* Diálogo de añadir expansión */
.add-list { max-height: 62dvh; overflow: auto; margin: 0 -8px; padding: 0 8px; }
.serie { font-size: 13px; text-transform: uppercase; letter-spacing: .06em; color: var(--muted); margin: 18px 0 8px; font-weight: 700; }
.set-rows { display: flex; flex-direction: column; gap: 8px; }
.set-row {
  display: grid; grid-template-columns: 88px 1fr auto; align-items: center; gap: 12px; text-align: left;
  border: 1px solid var(--hair); background: var(--bg); border-radius: 16px; padding: 8px 12px;
}
.set-row:disabled { opacity: .55; cursor: default; }
.set-row[aria-expanded="true"] { border-color: var(--brand); }
.set-logo { height: 36px; display: grid; place-items: center; }
.set-logo img { max-width: 88px; max-height: 36px; object-fit: contain; }
.set-name { display: flex; flex-direction: column; font-weight: 650; font-size: 15px; }
.set-name small { color: var(--muted); font-weight: 500; font-size: 13px; }
.set-act { font-size: 14px; font-weight: 700; color: var(--brand-text); white-space: nowrap; }
.set-act em { font-style: normal; margin-left: 4px; }
.set-act.added, .set-row:disabled .set-act { color: var(--gain-text); }
.lang-pick { display: flex; flex-direction: column; gap: 10px; padding: 12px 14px; margin: -2px 0 4px; border-radius: 14px; background: var(--soft); }
.lang-btns { display: flex; flex-wrap: wrap; gap: 6px; }

/* Proponer cambio */
.pick-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(96px, 1fr)); gap: 10px; }
.pick { position: relative; display: flex; flex-direction: column; gap: 3px; padding: 5px; border: 2px solid transparent; border-radius: 12px; background: none; text-align: left; }
.pick img, .pick .ph { width: 100%; aspect-ratio: 63 / 88; border-radius: 6px; object-fit: cover; opacity: .45; filter: grayscale(.6); transition: .15s; }
.pick[aria-pressed="true"] { border-color: var(--brand); background: color-mix(in srgb, var(--brand) 10%, transparent); }
.pick[aria-pressed="true"] img, .pick[aria-pressed="true"] .ph { opacity: 1; filter: none; }
.pick .n { font-size: 12.5px; font-weight: 650; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.pick .p { font-size: 12px; color: var(--muted); }
.pick-head { display: flex; justify-content: space-between; align-items: center; margin-top: 8px; }
.pick-head h3 { margin: 0; font-size: 18px; }
.propose-sum { background: var(--trade-box); border-radius: 16px; padding: 12px 14px; font-size: 15px; }
.propose-money { display: flex; flex-wrap: wrap; gap: 10px; align-items: center; }
.propose-money input[type=number] { width: 120px; }

/* Menú de opciones */
.menu {
  position: absolute; z-index: 60; min-width: 220px; padding: 6px;
  background: var(--card-2); border: 1px solid var(--hair); border-radius: 16px;
  box-shadow: 0 16px 40px rgba(0, 0, 0, .4); display: flex; flex-direction: column;
}
.menu button { text-align: left; border: 0; background: none; padding: 11px 14px; border-radius: 10px; font-weight: 600; }
.menu button:hover { background: var(--soft); }
.menu button.danger { color: var(--danger); }
.menu-title { margin: 8px 14px 2px; font-size: 12px; font-weight: 700; text-transform: uppercase; letter-spacing: .05em; color: var(--muted); }

.auth-email { display: flex; flex-direction: column; gap: 10px; margin-top: 4px; }
.auth-email input { width: 100%; }
.auth-error { color: var(--loss); font-weight: 600; min-height: 1em; margin: 0; }
.who-body-actions { display: flex; flex-wrap: wrap; gap: 8px; }

.foot { padding: 40px 0 8px; font-size: 12px; color: var(--muted); max-width: 760px; }

.toast {
  position: fixed; left: 50%; top: max(16px, env(safe-area-inset-top)); transform: translate(-50%, -20px);
  background: var(--card-2); color: var(--text); padding: 12px 18px; border-radius: 16px; font-weight: 650;
  border: 1px solid var(--hair); box-shadow: 0 12px 30px rgba(0, 0, 0, .4);
  opacity: 0; pointer-events: none; transition: .25s; z-index: 80; max-width: calc(100vw - 32px);
}
.toast.show { opacity: 1; transform: translate(-50%, 0); }
.toast.error { background: #b42318; color: #fff; border-color: transparent; }
.bubble {
  position: absolute; z-index: 70; padding: 10px 14px; border-radius: 14px; text-align: center;
  background: var(--text); color: var(--bg); font-size: 14px; font-weight: 600; line-height: 1.35;
  box-shadow: 0 8px 24px rgba(0, 0, 0, .25); pointer-events: none;
}
.bubble::after {
  content: ''; position: absolute; top: 100%; left: var(--ax, 50%); margin-left: -7px;
  border: 7px solid transparent; border-top-color: var(--text);
}

/* Esqueleto mientras carga */
.skeleton { background: linear-gradient(90deg, var(--card) 25%, var(--card-2) 50%, var(--card) 75%); background-size: 200% 100%; animation: shimmer 1.4s infinite; border-radius: var(--r); }
@keyframes shimmer { to { background-position: -200% 0; } }
@media (prefers-reduced-motion: reduce) { .skeleton { animation: none; } }
