
/* Martillo, edición casa de subastas: sobria, legible y con mucho contraste.
   Tipografías: Fraunces para titulares y Atkinson Hyperlegible para texto (diseñada para leerse bien con baja visión). */
:root {
  --bg: #F6F3EC; --surface: #FFFFFF; --surface-2: #EEE9DF; --line: #DDD5C6;
  --text: #1C2230; --muted: #565D6B; --primary: #1F3A5F; --on-primary: #FFFFFF;
  --gold: #B8913A; --gold-soft: #F3E8CC; --money: #7A5A12; --live: #B3261E; --ok: #22704A;
  --display: "Fraunces", Georgia, "Times New Roman", serif;
  --body: "Atkinson Hyperlegible", "Segoe UI", system-ui, -apple-system, sans-serif;
  --nav-h: 70px;
  color-scheme: light;
  box-sizing: border-box;
  padding-top: env(safe-area-inset-top, 0px);
  padding-bottom: env(safe-area-inset-bottom, 0px);
}
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --bg: #11151C; --surface: #191F29; --surface-2: #222A36; --line: #2F3846;
    --text: #EFEBE3; --muted: #AEB4BF; --primary: #8FB0DA; --on-primary: #0E1622;
    --gold: #D4B062; --gold-soft: #2E2716; --money: #E2C27A; --live: #E5534B; --ok: #5CC28C;
    color-scheme: dark;
  }
}
:root[data-theme="dark"] {
  --bg: #11151C; --surface: #191F29; --surface-2: #222A36; --line: #2F3846;
  --text: #EFEBE3; --muted: #AEB4BF; --primary: #8FB0DA; --on-primary: #0E1622;
  --gold: #D4B062; --gold-soft: #2E2716; --money: #E2C27A; --live: #E5534B; --ok: #5CC28C;
  color-scheme: dark;
}
*, *::before, *::after { box-sizing: border-box; }
html { height: 100%; scroll-padding-top: env(safe-area-inset-top, 0px); }
body { height: 100%; margin: 0; background: var(--bg); color: var(--text); font: 400 16px/1.5 var(--body); -webkit-tap-highlight-color: transparent; overflow: hidden; }
button, input, select, textarea { font: inherit; color: inherit; }
button { cursor: pointer; }
a { color: inherit; }
[hidden] { display: none !important; }
:focus-visible { outline: 3px solid var(--gold); outline-offset: 2px; }
h1, h2, h3 { font-family: var(--display); font-weight: 600; letter-spacing: -0.01em; line-height: 1.15; margin: 0; }
h1 { font-size: 27px; }
h2 { font-size: 20px; }
h3 { font-size: 18px; }
.muted { color: var(--muted); }
.money { color: var(--money); font-weight: 700; font-variant-numeric: tabular-nums; }

/* Estructura */
.app { height: 100%; display: grid; grid-template-rows: minmax(0, 1fr) auto; grid-template-columns: minmax(0, 1fr); }
.view { overflow-y: auto; overflow-x: hidden; min-height: 0; -webkit-overflow-scrolling: touch; }
.view.feed-view { overflow: hidden; background: #0D1118; }
.page { padding: 18px 18px 32px; display: grid; gap: 30px; max-width: 980px; margin: 0 auto; width: 100%; }
.page-head { position: sticky; top: 0; z-index: 5; background: var(--bg); padding: 16px 18px 12px; display: flex; align-items: center; gap: 12px; border-bottom: 1px solid var(--line); }
.page-head h1 { flex: 1; }

/* Navegación */
.tabbar { display: grid; grid-template-columns: repeat(5, 1fr); align-items: center; height: var(--nav-h); background: var(--surface); border-top: 1px solid var(--line); position: relative; z-index: 20; }
.tab { display: grid; justify-items: center; gap: 3px; border: 0; background: none; color: var(--muted); font-size: 13px; font-weight: 700; padding: 6px 0; }
.tab svg { width: 26px; height: 26px; }
.tab[aria-current="page"] { color: var(--primary); }
.tab-create { justify-self: center; width: 56px; height: 44px; border-radius: 12px; border: 0; display: grid; place-items: center; color: var(--on-primary); background: var(--primary); }
.tab-create svg { width: 26px; height: 26px; }
.app.immersive .tabbar { background: #0D1118; border-top-color: #242B37; }
.app.immersive .tab { color: #9AA1AD; }
.app.immersive .tab[aria-current="page"] { color: #F3E3B8; }
.app.immersive .tab-create { background: #F3E3B8; color: #1C2230; }
.tabbar .side-logo { display: none; }

.logo { display: inline-flex; align-items: center; gap: 10px; font-family: var(--display); font-weight: 600; font-size: 24px; letter-spacing: -0.01em; text-decoration: none; }
.logo svg { width: 32px; height: 32px; }

/* Botones */
.btn { min-height: 48px; padding: 0 18px; border-radius: 10px; border: 0; font-weight: 700; font-size: 16px; display: inline-flex; align-items: center; justify-content: center; gap: 8px; text-decoration: none; white-space: nowrap; }
.btn svg { width: 20px; height: 20px; flex: none; }
.btn:active { opacity: .85; }
.btn:disabled { opacity: .45; cursor: default; }
.btn-primary, .btn-hot { background: var(--primary); color: var(--on-primary); }
.btn-gold { background: var(--gold); color: #1C1608; }
.btn-ghost { background: var(--surface-2); color: var(--text); }
.btn-line { background: transparent; color: var(--text); box-shadow: inset 0 0 0 1.5px var(--text); }
.btn-sm { min-height: 42px; padding: 0 16px; border-radius: 9px; font-size: 15px; }
.btn-block { width: 100%; }
.icon-btn { width: 46px; height: 46px; border-radius: 50%; border: 0; display: grid; place-items: center; background: var(--surface-2); color: var(--text); flex: none; }
.icon-btn svg { width: 22px; height: 22px; }

.avatar { flex: none; width: 44px; height: 44px; border-radius: 50%; display: grid; place-items: center; font-family: var(--display); font-weight: 600; color: #fff; font-size: 19px; }
.avatar.lg { width: 88px; height: 88px; font-size: 36px; border: 4px solid var(--bg); }
.avatar.sm { width: 30px; height: 30px; font-size: 14px; }

.chips { display: flex; gap: 8px; overflow-x: auto; scrollbar-width: none; padding: 2px 0; }
.chips::-webkit-scrollbar { display: none; }
.chip { flex: none; height: 42px; padding: 0 16px; border-radius: 21px; border: 1.5px solid var(--line); background: var(--surface); color: var(--text); font-weight: 700; font-size: 15px; display: inline-flex; align-items: center; gap: 8px; }
.chip[aria-pressed="true"] { background: var(--primary); border-color: var(--primary); color: var(--on-primary); }
.dot { width: 9px; height: 9px; border-radius: 50%; flex: none; }

.rail { display: grid; grid-auto-flow: column; grid-auto-columns: minmax(160px, 58%); gap: 14px; overflow-x: auto; scroll-snap-type: x mandatory; scrollbar-width: none; margin: 0 -18px; padding: 0 18px 4px; }
.rail::-webkit-scrollbar { display: none; }
.rail > * { scroll-snap-align: start; }
.section-head { display: flex; align-items: baseline; justify-content: space-between; gap: 12px; margin-bottom: 14px; padding-bottom: 8px; border-bottom: 1px solid var(--line); }
.section-head a, .section-head button { border: 0; background: none; color: var(--primary); font-weight: 700; font-size: 16px; text-decoration: underline; text-underline-offset: 3px; padding: 0; }

.live-card { position: relative; aspect-ratio: 3 / 4; border-radius: 12px; overflow: hidden; border: 0; padding: 0; text-align: left; color: #fff; background: #1C2230; }
.live-card .art { position: absolute; inset: 0; }
.live-card .art svg { width: 100%; height: 100%; display: block; }
.live-card::after { content: ""; position: absolute; inset: 0; background: linear-gradient(180deg, rgba(13,17,24,.35) 0%, transparent 28%, transparent 46%, rgba(13,17,24,.94) 100%); }
.live-card .lc-top { position: absolute; top: 10px; left: 10px; right: 10px; display: flex; gap: 6px; align-items: center; z-index: 1; }
.live-card .lc-bottom { position: absolute; left: 12px; right: 12px; bottom: 12px; z-index: 1; display: grid; gap: 6px; }
.live-card .lc-title { font-family: var(--display); font-weight: 600; font-size: 17px; line-height: 1.2; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.live-card .lc-seller { display: flex; align-items: center; gap: 8px; font-size: 14px; font-weight: 700; }
.tag-live { background: var(--live); color: #fff; font-size: 13px; font-weight: 700; padding: 3px 9px; border-radius: 5px; }
.tag-dark { background: rgba(13,17,24,.75); color: #fff; font-size: 13px; font-weight: 700; padding: 3px 9px; border-radius: 5px; display: inline-flex; gap: 5px; align-items: center; }
.tag-dark svg { width: 14px; height: 14px; }

.promo-card { position: relative; border-radius: 12px; overflow: hidden; padding: 20px; min-height: 160px; display: grid; align-content: end; gap: 6px; color: #F5EFE2; border: 0; text-align: left; background: #1F2A3D !important; }
.promo-card::before { content: ""; position: absolute; left: 0; top: 0; bottom: 0; width: 5px; background: var(--gold); }
.promo-card .promo-kicker { font-weight: 700; font-size: 14px; color: #E2C27A; }
.promo-card .promo-big { font-family: var(--display); font-weight: 600; font-size: 27px; line-height: 1.1; position: relative; max-width: 72%; }
.promo-card .promo-meta { font-size: 15px; position: relative; max-width: 72%; color: #D9D3C6; }
.promo-card .promo-art { position: absolute; right: 14px; top: 16px; width: 92px; height: 92px; opacity: 1; transform: none !important; border-radius: 10px !important; }

.event-row { display: grid; grid-template-columns: 72px minmax(0, 1fr); grid-template-areas: "date info" "date btn"; gap: 6px 14px; align-items: center; padding: 14px; border-radius: 12px; background: var(--surface); border: 1px solid var(--line); }
.event-row > .btn { grid-area: btn; justify-self: start; }
.event-date { grid-area: date; align-self: stretch; min-height: 76px; border-radius: 10px; display: grid; place-items: center; align-content: center; background: var(--surface-2) !important; color: var(--text); line-height: 1.1; text-align: center; border: 1px solid var(--line); }
.event-date b { font-family: var(--display); font-weight: 600; font-size: 28px; }
.event-date span { font-size: 13px; font-weight: 700; color: var(--muted); }
.event-info { grid-area: info; min-width: 0; display: grid; gap: 2px; }
.event-info strong { font-size: 17px; line-height: 1.3; }
.event-info .muted { font-size: 15px; }
.countdown { font-variant-numeric: tabular-nums; font-weight: 700; color: var(--live); font-size: 15px; }

.shop-card { display: grid; gap: 8px; border: 0; background: none; padding: 0; text-align: left; }
.shop-card .thumb { aspect-ratio: 1; border-radius: 10px; overflow: hidden; position: relative; border: 1px solid var(--line); }
.shop-card .thumb svg { width: 100%; height: 100%; display: block; }
.shop-card .thumb .tag-dark { position: absolute; left: 8px; top: 8px; }
.shop-card .name { font-weight: 700; font-size: 16px; line-height: 1.3; }
.shop-card .row { display: flex; align-items: baseline; gap: 8px; }
.shop-card .money { font-size: 18px; }
.strike { text-decoration: line-through; color: var(--muted); font-size: 15px; }

.grid-2 { display: grid; grid-template-columns: repeat(2, 1fr); gap: 18px 14px; }
.store-card { display: grid; grid-template-columns: auto 1fr auto; gap: 14px; align-items: center; padding: 14px; border-radius: 12px; background: var(--surface); border: 1px solid var(--line); text-decoration: none; }
.store-card > svg { width: 22px; height: 22px; color: var(--muted); }
.store-card .meta { min-width: 0; }
.store-card .meta strong { display: block; font-size: 17px; }
.store-card .meta span { font-size: 15px; }

.search { display: flex; align-items: center; gap: 10px; height: 52px; padding: 0 16px; border-radius: 10px; background: var(--surface); border: 1.5px solid var(--line); flex: 1; }
.search:focus-within { border-color: var(--primary); }
.search svg { width: 22px; height: 22px; color: var(--muted); flex: none; }
.search input { border: 0; background: none; outline: 0; flex: 1; min-width: 0; font-size: 17px; }
.empty { text-align: center; color: var(--muted); padding: 36px 16px; font-size: 17px; }

/* Feed */
.feed { height: 100%; overflow-y: auto; scroll-snap-type: y mandatory; scrollbar-width: none; overscroll-behavior: contain; }
.feed::-webkit-scrollbar { display: none; }
.feed-top { position: absolute; top: 0; left: 0; right: 0; z-index: 6; display: flex; justify-content: center; gap: 26px; padding: 12px 16px; pointer-events: none; }
.feed-top button { pointer-events: auto; border: 0; background: none; color: rgba(255,255,255,.7); font-weight: 700; font-size: 17px; padding: 4px 0; text-shadow: 0 1px 4px rgba(0,0,0,.6); position: relative; }
.feed-top button[aria-pressed="true"] { color: #fff; }
.feed-top button[aria-pressed="true"]::after { content: ""; position: absolute; left: 0; right: 0; bottom: -3px; height: 2px; background: #E2C27A; }
.feed-wrap { position: relative; height: 100%; }

/* Directo */
.live { position: relative; height: 100%; scroll-snap-align: start; scroll-snap-stop: always; overflow: hidden; color: #fff; background: #0D1118; }
.live .stage { position: absolute; inset: 0; overflow: hidden; }
.live .stage svg { width: 100%; height: 100%; display: block; }
.live .stage .cam { height: 100%; animation: drift 24s ease-in-out infinite alternate; }
@keyframes drift { from { transform: scale(1.04); } to { transform: scale(1.08); } }
.live .stage video { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; transform: scaleX(-1); }
.live .grain { position: absolute; inset: 0; pointer-events: none; background: linear-gradient(180deg, rgba(10,13,19,.7) 0%, rgba(10,13,19,0) 20%, rgba(10,13,19,0) 36%, rgba(10,13,19,.7) 56%, rgba(10,13,19,.97) 100%); }
.live-head { position: absolute; top: 48px; left: 12px; right: 12px; z-index: 3; display: flex; align-items: center; gap: 10px; }
.live-head .who { flex: 1; min-width: 0; line-height: 1.2; text-shadow: 0 1px 4px rgba(0,0,0,.7); color: #fff; }
.live-head .who strong { display: block; font-size: 17px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.live-head .who span { display: block; font-size: 14px; color: #E9D9AE; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.av-wrap { position: relative; flex: none; display: block; }
.av-wrap a { text-decoration: none; }
.live-head .avatar { box-shadow: 0 0 0 2px #E2C27A; }
.follow { position: absolute; left: 50%; bottom: -9px; transform: translateX(-50%); width: 24px; height: 24px; border-radius: 50%; border: 2px solid #0D1118; background: #E2C27A; color: #1C2230; display: grid; place-items: center; padding: 0; }
.follow svg { width: 14px; height: 14px; }
.viewers { display: inline-flex; align-items: center; gap: 6px; height: 36px; padding: 0 12px; border-radius: 6px; background: rgba(13,17,24,.75); font-weight: 700; font-size: 15px; font-variant-numeric: tabular-nums; }
.viewers i { width: 8px; height: 8px; border-radius: 50%; background: #E5534B; }

.side-rail { position: absolute; right: 10px; bottom: 270px; z-index: 3; display: grid; gap: 16px; justify-items: center; }
.rail-btn { text-decoration: none; display: grid; justify-items: center; gap: 3px; border: 0; background: none; color: #fff; font-size: 13px; font-weight: 700; text-shadow: 0 1px 3px rgba(0,0,0,.7); padding: 0; position: relative; }
.rail-btn .bubble { width: 48px; height: 48px; border-radius: 50%; display: grid; place-items: center; background: rgba(13,17,24,.7); border: 1px solid rgba(255,255,255,.18); }
.rail-btn svg { width: 24px; height: 24px; }
.rail-btn[aria-pressed="true"] .bubble { color: #E5534B; }
.rail-btn .count { position: absolute; top: -3px; right: -5px; min-width: 20px; height: 20px; padding: 0 5px; border-radius: 10px; background: #E2C27A; color: #1C2230; font-size: 12px; display: grid; place-items: center; text-shadow: none; }
.heart-pop { position: absolute; pointer-events: none; color: #E5534B; animation: float 1.2s ease-out forwards; z-index: 4; }
.heart-pop svg { width: 26px; height: 26px; }
@keyframes float { to { transform: translate(var(--dx, -10px), -140px); opacity: 0; } }

.live-bottom { position: absolute; left: 0; right: 0; bottom: 0; z-index: 3; padding: 0 12px 12px; display: grid; gap: 10px; }
.chat-feed { max-height: 128px; overflow: hidden; display: flex; flex-direction: column; justify-content: flex-end; gap: 4px; margin-right: 68px;
  -webkit-mask-image: linear-gradient(transparent, #000 30px); mask-image: linear-gradient(transparent, #000 30px); }
.cmsg { font-size: 15px; line-height: 1.35; text-shadow: 0 1px 3px rgba(0,0,0,.9); }
.cmsg b { color: #C9CED8; margin-right: 5px; }
.cmsg.sys { font-weight: 700; }
.cmsg.bid { color: #E9D9AE; }
.cmsg.win { color: #8FE0B4; }
.cmsg.join { color: #C9CED8; font-size: 14px; }
.composer { display: flex; gap: 8px; align-items: center; }
.say { flex: 1; min-width: 0; height: 48px; border-radius: 8px; padding: 0 14px; border: 1px solid rgba(255,255,255,.35); background: rgba(13,17,24,.7); color: #fff; font-size: 17px; outline: 0; }
.say::placeholder { color: rgba(255,255,255,.75); }
.say:focus { border-color: #E2C27A; }
.composer .rail-btn .bubble { width: 48px; height: 48px; border-radius: 8px; }

.lot { display: grid; grid-template-columns: 58px 1fr auto; gap: 12px; align-items: center; padding: 12px; border-radius: 10px; background: rgba(13,17,24,.82); border: 1px solid rgba(255,255,255,.12); }
.lot .lot-thumb { width: 58px; height: 58px; border-radius: 8px; overflow: hidden; }
.lot .lot-thumb svg { width: 100%; height: 100%; display: block; }
.lot .lot-info { min-width: 0; }
.lot .lot-status { font-size: 14px; font-weight: 700; color: #C9CED8; }
.lot .lot-status.win { color: #8FE0B4; }
.lot .lot-status.sold { color: #E9D9AE; }
.lot .lot-title { font-family: var(--display); font-weight: 600; font-size: 18px; line-height: 1.2; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.lot .lot-meta { font-size: 14px; color: #C9CED8; }
.lot .lot-price { text-align: right; display: grid; gap: 2px; }
.lot .lot-price b { font-family: var(--display); font-size: 30px; font-weight: 600; color: #E9D9AE; line-height: 1; font-variant-numeric: tabular-nums; display: inline-block; }
.lot .lot-price b.hit { animation: hit .5s ease-out; }
@keyframes hit { from { color: #fff; } }
.lot .lot-price span { font-weight: 700; font-size: 16px; font-variant-numeric: tabular-nums; }
.lot .lot-price span.urgent, .lot .lot-price span.done { color: #FF8A82; }
.timebar { height: 6px; border-radius: 3px; background: rgba(255,255,255,.2); overflow: hidden; }
.timebar i { display: block; height: 100%; background: #E2C27A; transform-origin: left; }
.timebar i.urgent { background: #E5534B; }

.bid-row { display: grid; grid-template-columns: 1fr auto; gap: 8px; }
.custom { width: 92px; border-radius: 10px; border: 1.5px solid rgba(255,255,255,.55); background: rgba(13,17,24,.8); color: #fff; font-weight: 700; font-size: 14px; line-height: 1.2; }
.slide { --p: 0; position: relative; height: 68px; border-radius: 10px; overflow: hidden; user-select: none; -webkit-user-select: none; touch-action: none; cursor: grab; background: #F3E3B8; color: #1C2230; }
.slide-fill { position: absolute; inset: 0; background: #E2C27A; transform: scaleX(var(--p)); transform-origin: left; }
.slide-label { position: absolute; inset: 0; display: grid; place-items: center; padding-left: 62px; font-weight: 700; font-size: 18px; text-align: center; line-height: 1.2; opacity: calc(1 - var(--p) * 1.3); font-variant-numeric: tabular-nums; }
.slide-label small { display: block; font-size: 14px; font-weight: 400; }
.slide-thumb { position: absolute; top: 6px; left: 6px; width: 56px; height: 56px; border-radius: 8px; background: #1F3A5F; color: #fff; display: grid; place-items: center; transition: transform .25s ease; }
.slide-thumb svg { width: 28px; height: 28px; }
.slide.dragging { cursor: grabbing; }
.slide.dragging .slide-thumb { transition: none; }
.slide.busy .slide-thumb { opacity: .6; }
.slide.off { background: rgba(255,255,255,.14); color: #fff; cursor: default; }
.slide.off .slide-thumb, .slide.off .slide-fill { display: none; }
.slide.off .slide-label { padding-left: 0; opacity: 1; }
.slide.win { background: #22704A; color: #fff; }
.won-banner { display: flex; align-items: center; gap: 10px; padding: 14px; border-radius: 10px; background: #22704A; color: #fff; font-weight: 700; font-size: 17px; }
.won-banner span { flex: 1; }
.won-banner .btn { background: #fff !important; color: #22704A !important; }

.confetti { position: absolute; inset: 0; pointer-events: none; z-index: 8; overflow: hidden; }
.confetti i { position: absolute; top: -12px; width: 7px; height: 11px; border-radius: 1px; animation: fall linear forwards; }
@keyframes fall { to { transform: translateY(110vh) rotate(540deg); } }

.toast { position: fixed; left: 50%; top: calc(16% + env(safe-area-inset-top, 0px)); transform: translateX(-50%); z-index: 60; background: #1C2230; color: #fff; padding: 14px 20px; border-radius: 10px; font-weight: 700; font-size: 17px; box-shadow: 0 12px 30px -10px rgba(0,0,0,.5); max-width: 88vw; text-align: center; }

/* Hojas */
.scrim { position: fixed; inset: 0; z-index: 40; background: rgba(10,13,19,.6); }
.sheet { position: fixed; left: 0; right: 0; bottom: 0; z-index: 41; max-height: 90%; overflow-y: auto; background: var(--surface); color: var(--text); border-radius: 16px 16px 0 0;
  padding: 10px 20px calc(24px + env(safe-area-inset-bottom, 0px)); animation: up .25s ease-out; display: grid; gap: 18px; align-content: start; }
@keyframes up { from { transform: translateY(40px); opacity: 0; } }
@keyframes fade { from { opacity: 0; } }
.sheet::before { content: ""; justify-self: center; width: 44px; height: 5px; border-radius: 3px; background: var(--line); }
.sheet-head { display: flex; align-items: center; gap: 12px; }
.sheet-head h2 { flex: 1; }
.list-row { display: grid; grid-template-columns: 60px 1fr auto; gap: 14px; align-items: center; padding: 10px 0; border-bottom: 1px solid var(--line); }
.list-row:last-child { border-bottom: 0; }
.list-row .thumb { width: 60px; height: 60px; border-radius: 8px; overflow: hidden; }
.list-row .thumb svg { width: 100%; height: 100%; display: block; }
.list-row .info { min-width: 0; }
.list-row .info strong { display: block; font-size: 17px; line-height: 1.3; }
.list-row .info span { font-size: 15px; }
.state { font-weight: 700; font-size: 15px; }
.state.live { color: var(--live); }
.state.sold { color: var(--money); }

.field { display: grid; gap: 6px; }
.field > span { font-size: 15px; font-weight: 700; color: var(--text); }
.input { height: 52px; border-radius: 8px; border: 1.5px solid var(--line); background: var(--surface); padding: 0 14px; font-size: 17px; outline: 0; width: 100%; }
.input:focus { border-color: var(--primary); }
textarea.input { height: 96px; padding: 12px 14px; resize: none; }
.form-row { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.segmented { display: grid; grid-auto-flow: column; grid-auto-columns: 1fr; gap: 4px; padding: 4px; border-radius: 10px; background: var(--surface-2); }
.segmented button { height: 44px; border: 0; border-radius: 8px; background: none; font-weight: 700; font-size: 16px; color: var(--muted); }
.segmented button[aria-pressed="true"] { background: var(--surface); color: var(--text); box-shadow: 0 1px 3px rgba(0,0,0,.12); }
.error { color: var(--live); font-weight: 700; font-size: 16px; margin: 0; }
.confirm-amount { font-family: var(--display); font-size: 46px; font-weight: 600; color: var(--money); text-align: center; margin: 4px 0; font-variant-numeric: tabular-nums; }

/* Escaparate */
.store-hero { position: relative; height: 160px; overflow: hidden; }
.store-hero svg { width: 100%; height: 100%; display: block; }
.store-back { position: absolute; top: 12px; left: 12px; background: rgba(13,17,24,.7); color: #fff; }
.store-id { padding: 0 18px; margin-top: -46px; position: relative; display: grid; gap: 12px; }
.store-id .row { display: flex; align-items: flex-end; gap: 12px; }
.store-id .row .actions { margin-left: auto; display: flex; gap: 8px; padding-bottom: 6px; }
.stats { display: flex; gap: 28px; font-size: 15px; color: var(--muted); }
.stats b { font-family: var(--display); font-weight: 600; font-size: 20px; display: block; color: var(--text); }
.tabs { display: flex; gap: 24px; border-bottom: 1px solid var(--line); padding: 0 18px; position: sticky; top: 0; background: var(--bg); z-index: 4; overflow-x: auto; scrollbar-width: none; }
.tabs button { border: 0; background: none; padding: 14px 0; font-weight: 700; font-size: 17px; color: var(--muted); position: relative; flex: none; }
.tabs button[aria-pressed="true"] { color: var(--text); }
.tabs button[aria-pressed="true"]::after { content: ""; position: absolute; left: 0; right: 0; bottom: -1px; height: 3px; background: var(--gold); }
.review { display: grid; gap: 4px; padding: 14px 0; border-bottom: 1px solid var(--line); }
.stars { color: var(--gold); letter-spacing: 2px; font-size: 18px; }

/* Perfil y estudio */
.me-head { display: flex; align-items: center; gap: 16px; }
.kpis { display: grid; grid-template-columns: repeat(2, 1fr); gap: 1px; background: var(--line); border-radius: 12px; overflow: hidden; border: 1px solid var(--line); }
.kpi { background: var(--surface); padding: 16px; display: grid; gap: 4px; }
.kpi b { font-family: var(--display); font-weight: 600; font-size: 26px; }
.kpi span { font-size: 15px; color: var(--muted); }
.go-live { position: relative; overflow: hidden; border: 0; border-radius: 12px; padding: 22px; color: #F5EFE2; text-align: left; display: grid; gap: 6px; background: #1F2A3D; }
.go-live::before { content: ""; position: absolute; left: 0; top: 0; bottom: 0; width: 5px; background: var(--gold); }
.go-live strong { font-family: var(--display); font-weight: 600; font-size: 25px; }
.go-live span { font-size: 16px; color: #D9D3C6; max-width: 72%; }
.go-live svg.deco { position: absolute; right: 18px; top: 50%; transform: translateY(-50%); width: 64px; height: 64px; opacity: 1; }
.actions-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 10px; }
.action { border: 1px solid var(--line); border-radius: 12px; background: var(--surface); padding: 16px 8px; display: grid; justify-items: center; gap: 8px; font-weight: 700; font-size: 15px; text-align: center; }
.action svg { width: 28px; height: 28px; color: var(--primary); }
.lot-edit { display: grid; grid-template-columns: 1fr 72px 64px 44px; gap: 6px; align-items: center; }
.lot-edit .input { height: 48px; padding: 0 10px; font-size: 16px; }
.lot-edit button { height: 44px; width: 44px; border-radius: 8px; border: 0; background: var(--surface-2); display: grid; place-items: center; }
.lot-edit button svg { width: 20px; height: 20px; }

/* Consola del vendedor */
.console-panel { display: grid; gap: 10px; padding: 12px; border-radius: 10px; background: rgba(13,17,24,.86); border: 1px solid rgba(255,255,255,.12); }
.console-queue { display: grid; grid-auto-flow: column; grid-auto-columns: 160px; gap: 8px; overflow-x: auto; scrollbar-width: none; }
.console-queue::-webkit-scrollbar { display: none; }
.q-item { border-radius: 8px; background: rgba(255,255,255,.08); padding: 10px; display: grid; gap: 6px; }
.q-item strong { font-size: 15px; line-height: 1.25; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; min-height: 38px; }
.q-item .btn { min-height: 40px; font-size: 15px; }
.dark-chips .chip { background: transparent; border-color: rgba(255,255,255,.3); color: #fff; height: 38px; font-size: 14px; }
.dark-chips .chip[aria-pressed="true"] { background: #F3E3B8; border-color: #F3E3B8; color: #1C2230; }
.end-live { height: 36px; padding: 0 14px; border-radius: 6px; border: 1px solid rgba(255,255,255,.4); background: rgba(13,17,24,.75); color: #fff; font-weight: 700; font-size: 15px; }
.fullscreen { position: fixed; inset: 0; z-index: 30; background: #0D1118; padding-top: env(safe-area-inset-top, 0px); padding-bottom: env(safe-area-inset-bottom, 0px); }
.fullscreen .live-head { top: 12px; }

@media (min-width: 900px) {
  .app { grid-template-columns: 250px minmax(0, 1fr); grid-template-rows: minmax(0, 1fr); }
  .tabbar { grid-row: 1; grid-column: 1; height: 100%; grid-template-columns: 1fr; grid-auto-rows: min-content; align-content: start; gap: 4px; padding: 22px 14px; border-top: 0; border-right: 1px solid var(--line); }
  .app.immersive .tabbar { border-right-color: #242B37; }
  .tabbar .side-logo { display: inline-flex; margin: 0 10px 22px; }
  .app.immersive .side-logo { color: #fff; }
  .tab { grid-auto-flow: column; justify-content: start; gap: 14px; font-size: 17px; padding: 12px; border-radius: 8px; }
  .tab:hover { background: var(--surface-2); }
  .app.immersive .tab:hover { background: #1A202B; }
  .tab-create { width: 100%; height: 50px; justify-self: stretch; margin: 6px 0; display: flex; gap: 10px; font-weight: 700; font-size: 17px; border-radius: 8px; }
  .tab-create::after { content: "Crear"; }
  .view { grid-column: 2; grid-row: 1; }
  .feed .live { width: min(100%, calc((100vh - 32px) * 9 / 16)); margin: 0 auto; }
  .rail { grid-auto-columns: minmax(200px, 230px); }
  .grid-2 { grid-template-columns: repeat(auto-fill, minmax(190px, 1fr)); }
  .sheet { left: 50%; right: auto; width: 540px; transform: translateX(-50%); bottom: 50%; translate: 0 50%; border-radius: 14px; max-height: 86vh; animation: fade .2s; }
  .sheet::before { display: none; }
}
@media (prefers-reduced-motion: reduce) {
  .live .stage .cam, .heart-pop, .sheet { animation: none; }
  .confetti { display: none; }
}
/* Directo compacto: el vídeo manda */
.live { touch-action: manipulation; }
.live-head { top: 44px; gap: 8px; }
.live-head .avatar { width: 38px; height: 38px; font-size: 16px; }
.live-head .who strong { font-size: 15px; }
.live-head .who span { font-size: 13px; }
.viewers { height: 30px; padding: 0 9px; font-size: 13px; }
.live-head .rail-btn .bubble { width: 38px; height: 38px; }
.side-rail { bottom: 226px; gap: 12px; right: 8px; }
.rail-btn { font-size: 12px; }
.rail-btn .bubble { width: 42px; height: 42px; }
.rail-btn svg { width: 21px; height: 21px; }
.live-bottom { gap: 8px; padding: 0 10px 10px; }
.chat-feed { max-height: 92px; margin-right: 60px; }
.cmsg { font-size: 14px; line-height: 1.3; }
.say { height: 42px; font-size: 16px; }
.composer .rail-btn .bubble { width: 42px; height: 42px; }
.lot { grid-template-columns: 46px 1fr auto; gap: 10px; padding: 8px 10px; }
.lot .lot-thumb { width: 46px; height: 46px; }
.lot .lot-status { font-size: 13px; }
.lot .lot-title { font-size: 16px; }
.lot .lot-meta { font-size: 12px; }
.lot .lot-price b { font-size: 25px; }
.lot .lot-price span { font-size: 14px; }
.timebar { height: 5px; }
.slide { height: 58px; }
.slide-thumb { width: 46px; height: 46px; }
.slide-thumb svg { width: 24px; height: 24px; }
.slide-label { padding-left: 52px; font-size: 16px; }
.slide-label small { font-size: 12px; }
.custom { width: 78px; font-size: 13px; }
.won-banner { padding: 10px 12px; font-size: 15px; }

/* Me gusta con doble toque */
.heart-big { position: absolute; width: 104px; height: 104px; margin: -52px 0 0 -52px; color: #E5534B; pointer-events: none; z-index: 5; animation: bigheart .9s ease-out forwards; filter: drop-shadow(0 4px 12px rgba(0,0,0,.35)); }
.heart-big svg { width: 100%; height: 100%; }
@keyframes bigheart { 0% { transform: scale(.3); opacity: 0; } 25% { transform: scale(1.1); opacity: 1; } 60% { transform: scale(1); opacity: 1; } 100% { transform: translateY(-50px) scale(.9); opacity: 0; } }

/* Pantalla limpia: solo el lote, la puja y el doble toque */
.clean-exit { display: none; align-items: center; gap: 6px; height: 34px; padding: 0 12px; border-radius: 6px; border: 1px solid rgba(255,255,255,.35); background: rgba(13,17,24,.7); color: #fff; font-weight: 700; font-size: 13px; }
.clean-exit svg { width: 16px; height: 16px; }
.app.clean .tabbar, .app.clean .feed-top { display: none; }
.app.clean .live .chat-feed, .app.clean .live .composer, .app.clean .live .side-rail,
.app.clean .live-head .follow, .app.clean .live-head .viewers, .app.clean .live-head .rail-btn { display: none; }
.app.clean .live-head { top: 12px; }
.app.clean .clean-exit { display: inline-flex; }
.app.clean .live .grain { background: linear-gradient(180deg, rgba(10,13,19,.55) 0%, rgba(10,13,19,0) 14%, rgba(10,13,19,0) 62%, rgba(10,13,19,.9) 100%); }
@media (min-width: 900px) {
  .app.clean { grid-template-columns: minmax(0, 1fr); }
  .app.clean .view { grid-column: 1; }
}
@media (prefers-reduced-motion: reduce) { .heart-big { animation-duration: .01s; } }

/* Web real: añadidos */
.sound-btn { position: absolute; top: 96px; left: 12px; z-index: 4; display: inline-flex; align-items: center; gap: 6px; height: 36px; padding: 0 12px; border-radius: 6px; border: 1px solid rgba(255,255,255,.4); background: rgba(13,17,24,.8); color: #fff; font-weight: 700; font-size: 14px; }
.app.clean .sound-btn { top: 56px; }
.ended-note { position: absolute; inset: auto 12px 12px; z-index: 4; padding: 16px; border-radius: 10px; background: rgba(13,17,24,.92); text-align: center; font-weight: 700; }
.mine-note { display: grid; gap: 8px; }
.login-cta { display: grid; gap: 14px; justify-items: center; text-align: center; padding: 40px 20px; }
.offer-row { display: grid; grid-template-columns: 60px 1fr; gap: 12px; align-items: center; padding: 12px 0; border-bottom: 1px solid var(--line); }
.offer-row .thumb { width: 60px; height: 60px; border-radius: 8px; overflow: hidden; }
.offer-row .thumb svg { width: 100%; height: 100%; display: block; }
.offer-row .actions { grid-column: 2; display: flex; gap: 8px; }
.pill { display: inline-block; padding: 2px 8px; border-radius: 5px; font-size: 13px; font-weight: 700; background: var(--surface-2); color: var(--muted); }
.pill.ok { background: color-mix(in srgb, var(--ok) 15%, transparent); color: var(--ok); }
.pill.no { background: color-mix(in srgb, var(--live) 12%, transparent); color: var(--live); }
.loading { padding: 40px; text-align: center; color: var(--muted); }
.feed-empty { height: 100%; display: grid; place-items: center; padding: 24px; text-align: center; color: #fff; background: #0D1118; }
.feed-empty > div { display: grid; gap: 14px; justify-items: center; max-width: 340px; }
.feed-empty p { color: #C9CED8; margin: 0; }
