/* =========================================================
   MUK · capa de UI (Estilo MUK: morado = UI, cada creador conserva su paleta)
   Tipos: Bricolage Grotesque (display) + Nunito (texto)
   ========================================================= */
:root {
    --bg: #0d0914;
    --surface: #171020;          /* hojas y modales */
    --surface-2: #211733;        /* filas / tarjetas dentro de una hoja */
    --ink: #f6f1fd;
    --muted: rgba(246, 241, 253, .66);
    --faint: rgba(246, 241, 253, .1);
    --line: rgba(194, 155, 220, .18);
    --glass: rgba(24, 14, 38, .52);
    --glass-strong: rgba(22, 13, 35, .86);
    --brand: #af80ea;
    --brand-deep: #4c2274;
    --lavender: #c29bdc;
    --accent: #a78bfa;           /* lo pisa la paleta de cada creador */
    --on-accent: #1a0d2b;
    --heart: #f43f5e;
    --top: max(12px, env(safe-area-inset-top));
    --bottom: env(safe-area-inset-bottom, 0px);
    --f-display: "Bricolage Grotesque", "Nunito", system-ui, sans-serif;
    --f-text: "Nunito", system-ui, -apple-system, "Segoe UI", sans-serif;
    --shadow: 0 10px 30px rgba(8, 3, 16, .45);
    --ease: cubic-bezier(.2, .8, .2, 1);
    color-scheme: dark;
}

* { box-sizing: border-box; -webkit-tap-highlight-color: transparent; }
html, body { height: 100%; margin: 0; overflow: hidden; background: var(--bg); color: var(--ink); font-family: var(--f-text); font-weight: 600; -webkit-font-smoothing: antialiased; }
button, input, select { font: inherit; }
[hidden] { display: none !important; }
button { cursor: pointer; }
:focus-visible { outline: 2px solid var(--lavender); outline-offset: 2px; }

/* Íconos del sprite: heredan color, tamaño por contexto */
.i { width: 20px; height: 20px; flex: none; fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; vertical-align: middle; }

/* Botón de vidrio redondo, base de todos los controles flotantes */
.room-nav button, .btn-exit, .zoom-ctl button, .modal-close, .grid-up {
    display: grid; place-items: center; padding: 0; border: 1px solid var(--line); color: var(--ink);
    background: var(--glass); backdrop-filter: blur(14px) saturate(1.3); -webkit-backdrop-filter: blur(14px) saturate(1.3);
    transition: transform .15s var(--ease), background .15s;
}
.room-nav button:active, .btn-exit:active, .zoom-ctl button:active { transform: scale(.92); }

/* Feed vertical con snap */
.feed { height: 100dvh; overflow-y: auto; scroll-snap-type: y mandatory; scrollbar-width: none; }
.feed::-webkit-scrollbar { display: none; }
.feed.locked { overflow: hidden; }
.room-item { height: 100dvh; scroll-snap-align: start; scroll-snap-stop: always; display: flex; align-items: center; justify-content: center; }

/* Host del mapa: overlay por encima del feed */
.map-host { position: fixed; inset: 0; z-index: 10; background: var(--bg); display: none; }
body.map-mode .map-host { display: flex; align-items: center; justify-content: center; }
.map-host .ui-preview, .map-host .room-nav, .map-host .room-poster { display: none; }
.map-host.is-hub .btn-exit { display: none; }

/* Marco de teléfono en desktop, pantalla completa en móvil */
.phone { position: relative; width: 100%; height: 100%; overflow: hidden; background: var(--room-bg, #120c1a); }
@media (min-width: 560px) {
    body { background: radial-gradient(120% 90% at 50% 0%, #2a1a40 0%, var(--bg) 60%); }
    .phone { width: 400px; height: min(840px, 94dvh); border-radius: 36px; border: 1px solid rgba(194,155,220,.25); box-shadow: 0 0 0 8px #150e1f, 0 30px 90px rgba(0,0,0,.6), 0 0 120px color-mix(in srgb, var(--accent) 22%, transparent); }
}

.room-stage { position: absolute; inset: 0; touch-action: pan-y; isolation: isolate; }
.room-stage canvas { display: block; width: 100%; height: 100%; }
.room-poster { position: absolute; inset: 0; background-size: cover; background-position: center; pointer-events: none; transition: opacity .3s; }
.room-item.active .room-poster { opacity: 0; }

/* ---------- Barra superior: Feed/Mapa + herramientas ---------- */
.view-toggle { position: absolute; z-index: 5; top: var(--top); left: 50%; transform: translateX(-50%); display: flex; align-items: center; gap: 2px; padding: 4px; border-radius: 999px; background: var(--glass); border: 1px solid var(--line); backdrop-filter: blur(16px) saturate(1.4); -webkit-backdrop-filter: blur(16px) saturate(1.4); box-shadow: 0 6px 20px rgba(8,3,16,.25); }
.view-toggle button { display: grid; place-items: center; height: 34px; min-width: 34px; border: 0; background: transparent; color: var(--muted); padding: 0 14px; border-radius: 999px; font-family: var(--f-display); font-size: 13.5px; font-weight: 700; letter-spacing: .01em; transition: background .2s, color .2s; }
.view-toggle button:has(.i) { padding: 0; }
.view-toggle button .i { width: 18px; height: 18px; }
.view-toggle button:hover { color: var(--ink); }
.view-toggle [data-view="grid"] { margin-left: 6px; position: relative; }
.view-toggle [data-view="grid"]::before { content: ""; position: absolute; left: -5px; top: 9px; bottom: 9px; width: 1px; background: var(--line); }
.view-toggle [data-view="theme"].on { color: var(--lavender); }
.view-toggle [data-view="subfeeds"] { color: var(--lavender); opacity: .75; }
body:not(.map-mode) .view-toggle [data-view="feed"], body.map-mode .view-toggle [data-view="map"] { background: var(--ink); color: var(--brand-deep); }

/* Navegación entre cuartos del feed */
.room-nav { position: absolute; z-index: 4; right: 12px; top: 50%; transform: translateY(-50%); display: flex; flex-direction: column; gap: 8px; }
.room-nav button { width: 36px; height: 36px; border-radius: 50%; }
.room-nav .i { width: 18px; height: 18px; }
.room-nav button[hidden] { display: none; }

/* ---------- Preview ---------- */
.ui-preview { position: absolute; inset: 0; pointer-events: none; display: flex; flex-direction: column; justify-content: space-between; transition: opacity .3s; }
.ui-preview::before { content: ""; position: absolute; inset: 0; background: linear-gradient(180deg, rgba(13,9,20,.72) 0%, rgba(13,9,20,.25) 22%, transparent 34%, transparent 52%, rgba(13,9,20,.55) 70%, rgba(13,9,20,.92) 100%); }
.room-header, .room-footer { position: relative; padding: 18px; }
.room-header { display: flex; gap: 12px; align-items: center; padding-top: calc(var(--top) + 102px); text-shadow: 0 1px 8px rgba(0,0,0,.45); }
.avatar { width: 44px; height: 44px; border-radius: 50%; background: var(--accent); display: grid; place-items: center; font-family: var(--f-display); font-weight: 800; font-size: 18px; color: var(--on-accent); flex: none; box-shadow: 0 0 0 2px rgba(255,255,255,.9), 0 4px 14px rgba(0,0,0,.35); text-shadow: none; }
.creator { font-family: var(--f-display); font-size: 17px; font-weight: 800; letter-spacing: -.01em; }
.room-name { font-size: 13px; color: var(--muted); margin-top: 1px; }
.bio { font-size: 15.5px; line-height: 1.4; margin-bottom: 6px; text-wrap: pretty; text-shadow: 0 1px 6px rgba(0,0,0,.4); }
.room-meta { font-size: 12.5px; color: var(--muted); margin-bottom: 16px; }
.btn-enter { pointer-events: auto; width: 100%; height: 52px; border: 0; border-radius: 16px; background: var(--accent); color: var(--on-accent); font-family: var(--f-display); font-size: 16px; font-weight: 800; letter-spacing: .01em; box-shadow: 0 8px 24px color-mix(in srgb, var(--accent) 40%, transparent); transition: transform .15s var(--ease); }
.btn-enter:active, .btn-dive:active { transform: scale(.98); }
.btn-dive { pointer-events: auto; width: 100%; height: 44px; margin-top: 8px; padding: 0 12px; border: 1px solid rgba(255,255,255,.18); border-radius: 14px; background: rgba(255,255,255,.08); color: var(--ink); font-size: 14px; font-weight: 700; backdrop-filter: blur(10px); -webkit-backdrop-filter: blur(10px); transition: transform .15s var(--ease); }
.swipe-hint { text-align: center; font-size: 11.5px; color: var(--muted); margin-top: 12px; padding-bottom: var(--bottom); letter-spacing: .02em; }

/* ---------- Exploración ---------- */
.ui-explore { position: absolute; inset: 0; pointer-events: none; opacity: 0; transition: opacity .3s; }
.room-item.exploring .ui-preview { opacity: 0; }
.room-item.exploring .ui-explore { opacity: 1; }
.room-item.exploring .room-stage { touch-action: none; cursor: grab; }
.room-item.exploring .room-stage:active { cursor: grabbing; }
.room-item:not(.exploring) .ui-explore * { pointer-events: none !important; }
/* Sombra superior para que la barra y las migas se lean sobre escenas claras */
.ui-explore::before { content: ""; position: absolute; left: 0; right: 0; top: 0; height: 190px; background: linear-gradient(180deg, rgba(13,9,20,.5), transparent); pointer-events: none; }

.btn-exit { pointer-events: auto; position: absolute; top: calc(var(--top) + 2px); left: 12px; width: 40px; height: 40px; border-radius: 50%; }
.btn-exit .i { width: 18px; height: 18px; }

/* Chips de la fila de herramientas del mundo: Senda (izq) y descubiertos (der) */
.found-chip, .btn-senda, .btn-senda-rate { position: absolute; top: calc(var(--top) + 90px); height: 32px; display: inline-flex; align-items: center; gap: 6px; padding: 0 12px; border-radius: 999px; font-size: 12.5px; font-weight: 800; background: var(--glass); border: 1px solid var(--line); color: var(--ink); backdrop-filter: blur(14px); -webkit-backdrop-filter: blur(14px); }
.found-chip { right: 12px; max-width: calc(100% - 150px); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; display: block; line-height: 30px; font-weight: 700; color: var(--muted); }
.found-chip:empty { display: none; }
.btn-senda { pointer-events: auto; left: 12px; border-color: color-mix(in srgb, var(--accent) 55%, transparent); }
.btn-senda .i { width: 14px; height: 14px; }
.btn-senda small { font-size: 11.5px; font-weight: 700; opacity: .8; font-variant-numeric: tabular-nums; }
.room-item.senda .btn-senda { background: var(--accent); border-color: var(--accent); color: var(--on-accent); box-shadow: 0 4px 16px color-mix(in srgb, var(--accent) 40%, transparent); }
.room-item.senda.senda-paused .btn-senda { background: var(--glass); color: var(--ink); box-shadow: none; }
.room-item.is-map .btn-senda { display: none; }
.room-item.is-hub .btn-senda { display: inline-flex; }
.room-item.is-hub.auto-on .btn-senda { background: var(--accent); border-color: var(--accent); color: var(--on-accent); box-shadow: 0 4px 16px color-mix(in srgb, var(--accent) 40%, transparent); }
.btn-senda-rate { display: none; pointer-events: auto; left: 150px; min-width: 42px; justify-content: center; padding: 0 10px; font-variant-numeric: tabular-nums; }
.room-item.senda .btn-senda-rate { display: inline-flex; }
.senda-bar { display: none; height: 3px; margin: 0 0 12px; border-radius: 2px; background: var(--faint); overflow: hidden; }
.senda-bar i { display: block; height: 100%; width: 0; background: var(--accent); }
.room-item.senda .senda-bar { display: block; }
.room-item.senda .joystick { opacity: .45; }
.explore-hint { position: absolute; left: 16px; right: 16px; top: calc(var(--top) + 134px); text-align: center; font-size: 12.5px; font-weight: 700; color: var(--ink); text-shadow: 0 1px 6px rgba(0,0,0,.7); transition: opacity .6s; }
.explore-hint.gone { opacity: 0; }

.zoom-ctl { pointer-events: auto; position: absolute; right: 12px; bottom: calc(24px + var(--bottom)); display: flex; flex-direction: column; overflow: hidden; border-radius: 14px; border: 1px solid var(--line); background: var(--glass); backdrop-filter: blur(14px); -webkit-backdrop-filter: blur(14px); }
.zoom-ctl button { width: 44px; height: 44px; border: 0; border-radius: 0; background: none; backdrop-filter: none; }
.zoom-ctl button + button { border-top: 1px solid var(--line); }
.zoom-ctl .i { width: 18px; height: 18px; }
.btn-shape { pointer-events: auto; position: absolute; right: 12px; bottom: calc(24px + 88px + 10px + var(--bottom)); width: 46px; height: 46px; display: grid; place-items: center; border-radius: 14px; border: 1px solid var(--line); background: var(--glass); color: var(--ink); backdrop-filter: blur(14px); -webkit-backdrop-filter: blur(14px); }
.btn-shape .i { width: 20px; height: 20px; }
.btn-shape.on { background: var(--accent); border-color: var(--accent); color: var(--on-accent); }
.room-item.is-hub .btn-shape, .room-item.focused .btn-shape, .room-item.big .btn-shape { display: none; }
/* Recorrido ciudad/avenida: arriba del botón de forma, solo en plazas en modo cuarto */
.btn-route { pointer-events: auto; position: absolute; right: 12px; bottom: calc(24px + 88px + 10px + 46px + 8px + var(--bottom)); width: 46px; height: 46px; display: none; place-items: center; border-radius: 14px; border: 1px solid var(--line); background: var(--glass); color: var(--ink); backdrop-filter: blur(14px); -webkit-backdrop-filter: blur(14px); }
.btn-route .i { width: 20px; height: 20px; }
.btn-route.on { background: var(--accent); border-color: var(--accent); color: var(--on-accent); }
.room-item.is-map:not(.is-sphere):not(.focused):not(.big) .btn-route { display: grid; }
/* En la Gran Plaza no hay botón de esfera: el de recorrido baja a su lugar */
.room-item.is-hub .btn-route { bottom: calc(24px + 88px + 10px + var(--bottom)); }
.btn-aerial { pointer-events: auto; position: absolute; right: 12px; bottom: calc(24px + 88px + 10px + 46px + 8px + 54px + var(--bottom)); width: 46px; height: 46px; display: none; place-items: center; border-radius: 14px; border: 1px solid var(--line); background: var(--glass); color: var(--ink); backdrop-filter: blur(14px); -webkit-backdrop-filter: blur(14px); }
.btn-aerial .i { width: 20px; height: 20px; }
.room-item.is-map:not(.is-sphere):not(.focused):not(.big) .btn-aerial { display: grid; }
.room-item.is-hub .btn-aerial { bottom: calc(24px + 88px + 10px + 54px + var(--bottom)); }
.room-item.aerial .btn-aerial { background: var(--accent); border-color: var(--accent); color: var(--on-accent); }

.joystick { pointer-events: auto; position: absolute; left: 20px; bottom: calc(24px + var(--bottom)); width: 116px; height: 116px; border-radius: 50%; background: radial-gradient(circle, rgba(24,14,38,.15) 0 40%, rgba(24,14,38,.45) 100%); border: 1.5px solid rgba(246,241,253,.3); backdrop-filter: blur(6px); -webkit-backdrop-filter: blur(6px); touch-action: none; display: none; }
body.touch .joystick { display: block; }
.joy-knob { position: absolute; left: 50%; top: 50%; width: 50px; height: 50px; margin: -25px 0 0 -25px; border-radius: 50%; background: rgba(246,241,253,.88); box-shadow: 0 4px 14px rgba(0,0,0,.35), inset 0 -3px 0 rgba(76,34,116,.18); }

/* ---------- Tarjeta de foco: hoja inferior ---------- */
.focus-card { pointer-events: auto; position: absolute; left: 10px; right: 10px; bottom: calc(10px + var(--bottom)); max-height: 62%; overflow-y: auto; scrollbar-width: none; padding: 14px 16px 12px; border-radius: 22px; background: var(--glass-strong); backdrop-filter: blur(20px) saturate(1.4); -webkit-backdrop-filter: blur(20px) saturate(1.4); border: 1px solid var(--line); box-shadow: 0 -8px 40px rgba(8,3,16,.4); transform: translateY(calc(100% + 20px)); transition: transform .38s var(--ease); }
.focus-card::-webkit-scrollbar { display: none; }
.fc-grab { display: block; width: 100%; height: 22px; margin: -14px 0 4px; padding: 0; border: 0; background: none; cursor: pointer; touch-action: none; }
.fc-grab::before { content: ""; display: block; width: 36px; height: 4px; margin: 0 auto; border-radius: 2px; background: rgba(246,241,253,.3); transition: background .15s; }
.fc-grab:hover::before { background: rgba(246,241,253,.55); }
/* Minimizada (estilo TikTok): solo el título en una línea; tocarla o deslizar hacia arriba la abre */
.focus-card.min { padding: 14px 18px 12px; cursor: pointer; overflow: hidden; }
.focus-card.min > :not(.fc-grab, .focus-title, .senda-bar) { display: none !important; }
.focus-card.min .focus-title { margin: 0; font-size: 16px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.focus-card.min::after { content: "tocá para ver más"; display: block; margin-top: 2px; font-size: 11.5px; color: var(--muted, rgba(246,241,253,.6)); }
.room-item.focused .focus-card { transform: none; }
/* Vista grande (doble toque sobre la obra enfocada) */
.room-item.big .view-toggle, .room-item.big .crumbs, .room-item.big .btn-exit, .room-item.big .found-chip,
.room-item.big .btn-senda, .room-item.big .btn-senda-rate, .room-item.big .muki, .room-item.big .live-chat { opacity: 0; pointer-events: none !important; }
.room-item.big .focus-card { background: rgba(13,9,20,.55); }
.big-media { position: absolute; inset: 0; display: grid; place-items: center; background: #0d0914; overflow: hidden; animation: bigIn .28s var(--ease); touch-action: pan-y; }
.big-media::before { content: ""; position: absolute; inset: -40px; background: var(--bg, none) center / cover; filter: blur(28px) brightness(.55) saturate(1.2); }
.big-media > img, .big-media > video { position: relative; width: 100%; height: 100%; object-fit: contain; }
@keyframes bigIn { from { opacity: 0; transform: scale(.96); } }
.focus-creator { display: flex; align-items: center; gap: 10px; width: 100%; margin: 0 0 8px; padding: 6px 10px; border: 1px solid var(--line); border-radius: 14px; background: rgba(255,255,255,.04); color: var(--ink); text-align: left; font: inherit; transition: background .15s; }
.focus-creator:hover { background: rgba(255,255,255,.09); }
.focus-creator .avatar { width: 28px; height: 28px; font-size: 14px; box-shadow: none; }
.fc-text { display: flex; flex-direction: column; min-width: 0; flex: 1; line-height: 1.25; }
.fc-text b { font-size: 14px; font-weight: 800; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.fc-text span { font-size: 12px; color: var(--muted); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.fc-go { font-size: 12px; font-weight: 800; color: var(--accent); white-space: nowrap; }
.reel-creator { cursor: pointer; }
.room-item.focused .joystick, .room-item.focused .explore-hint, .room-item.focused .zoom-ctl { display: none; }
.focus-type { display: inline-block; font-size: 10.5px; text-transform: uppercase; letter-spacing: .1em; color: var(--accent); font-weight: 800; }
.focus-title { font-family: var(--f-display); font-size: 18px; font-weight: 800; line-height: 1.15; letter-spacing: -.01em; margin: 2px 0 4px; text-wrap: balance; display: -webkit-box; -webkit-box-orient: vertical; -webkit-line-clamp: 2; overflow: hidden; }
.focus-body { font-size: 13px; line-height: 1.35; color: var(--muted); white-space: pre-line; font-weight: 600; display: -webkit-box; -webkit-box-orient: vertical; -webkit-line-clamp: 3; overflow: hidden; cursor: pointer; }
.focus-body.open { -webkit-line-clamp: unset; }
.focus-body:empty { display: none; }
.focus-actions { display: flex; gap: 8px; margin-top: 10px; flex-wrap: wrap; }
.focus-actions > * { display: inline-flex; align-items: center; gap: 6px; height: 36px; padding: 0 14px; border-radius: 12px; border: 0; font-size: 13.5px; font-weight: 800; text-decoration: none; transition: transform .15s var(--ease); }
.focus-actions > *:active { transform: scale(.96); }
.focus-actions .i { width: 16px; height: 16px; }
.btn-go, .btn-sound, .btn-link { background: var(--accent); color: var(--on-accent); }
.btn-sound { background: var(--faint); color: var(--ink); }
.btn-back { background: var(--faint); color: var(--ink); margin-left: auto; }
.focus-actions [hidden] { display: none; }

/* ---------- Modales ---------- */
.modal { position: fixed; inset: 0; z-index: 50; display: grid; place-items: center; padding: 16px; background: rgba(8,4,14,.62); backdrop-filter: blur(6px); -webkit-backdrop-filter: blur(6px); animation: fade-in .2s ease; }
.modal[hidden] { display: none; }
@keyframes fade-in { from { opacity: 0; } }
.modal-card { width: min(440px, 100%); max-height: 88dvh; overflow: auto; padding: 22px; border-radius: 26px; background: var(--surface); border: 1px solid var(--line); box-shadow: 0 30px 80px rgba(0,0,0,.55); scrollbar-width: thin; scrollbar-color: var(--line) transparent; animation: pop-in .25s var(--ease); }
@keyframes pop-in { from { opacity: 0; transform: translateY(12px) scale(.98); } }
@media (max-width: 559px) {
    /* En el teléfono los modales son hojas que suben desde abajo */
    .modal:not(.search-modal) { place-items: end stretch; padding: 0; }
    .modal:not(.search-modal) .modal-card { width: 100%; max-height: 86dvh; border-radius: 26px 26px 0 0; padding-bottom: calc(22px + var(--bottom)); animation: sheet-up .3s var(--ease); }
}
.modal-head { display: flex; gap: 12px; align-items: flex-start; justify-content: space-between; margin-bottom: 18px; }
.modal-title { font-family: var(--f-display); font-size: 22px; font-weight: 800; letter-spacing: -.015em; }
.modal-sub { font-size: 13.5px; color: var(--muted); margin-top: 4px; line-height: 1.45; }
.modal-close { width: 36px; height: 36px; border-radius: 50%; flex: none; background: var(--faint); border: 0; backdrop-filter: none; }
.modal-close .i { width: 16px; height: 16px; }
.import-list { display: flex; flex-direction: column; gap: 8px; margin-top: 10px; }
.import-row { display: flex; align-items: center; gap: 12px; padding: 12px; border-radius: 16px; background: var(--surface-2); border: 1px solid transparent; transition: border-color .15s; }
.import-row:hover { border-color: var(--line); }
.platform { flex: none; width: 42px; height: 42px; border-radius: 13px; display: grid; place-items: center; font-weight: 800; font-size: 13px; color: #fff; }
.platform.tiktok { background: linear-gradient(135deg, #25f4ee, #fe2c55); }
.platform.instagram { background: linear-gradient(135deg, #feda75, #d62976 55%, #4f5bd5); }
.import-info { flex: 1; min-width: 0; }
.import-handle { font-weight: 800; }
.import-meta { font-size: 12px; color: var(--muted); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.import-row button { flex: none; border: 0; border-radius: 999px; height: 36px; padding: 0 16px; font-weight: 800; font-size: 13px; background: var(--faint); color: var(--ink); border: 1px solid var(--line); }
.import-row button:disabled { opacity: .5; cursor: wait; }
.nft-form { display: flex; flex-direction: column; gap: 10px; margin-bottom: 22px; padding: 16px; border-radius: 18px; background: linear-gradient(160deg, rgba(175,128,234,.2), rgba(76,34,116,.22)); border: 1px solid rgba(175,128,234,.35); }
.nft-title { font-size: 11px; font-weight: 800; letter-spacing: .1em; text-transform: uppercase; color: var(--lavender); }
.nft-form .modal-sub { margin: 0; }
.nft-row { display: flex; gap: 8px; }
.nft-row input, .nft-row select { min-width: 0; height: 44px; border: 1px solid var(--line); border-radius: 12px; background: rgba(8,4,14,.45); color: var(--ink); font-size: 14px; font-weight: 600; padding: 0 12px; outline: none; transition: border-color .15s; }
.nft-row input:focus, .nft-row select:focus { border-color: var(--brand); }
.nft-row input { flex: 1; }
.nft-form button { align-self: stretch; height: 44px; border: 0; border-radius: 12px; font-family: var(--f-display); font-weight: 800; font-size: 14.5px; background: var(--brand); color: var(--on-accent); }
.nft-form button:disabled { opacity: .5; cursor: wait; }
.import-status { margin-top: 14px; font-size: 13px; color: var(--muted); min-height: 1.2em; }
.import-status:empty { display: none; }

/* Tarjeta de puerta (se puede seguir caminando) y fundido al cruzar */
.room-item.carded .focus-card { transform: none; }
.room-item.carded .explore-hint { display: none; }
.fade { position: absolute; inset: 0; background: #0d0914; opacity: 0; pointer-events: none; z-index: 3; }
.fade.on { animation: fadeout .5s ease-out; }
@keyframes fadeout { from { opacity: 1; } to { opacity: 0; } }

/* ---------- Migas / pestañas de plaza ---------- */
.crumbs { position: absolute; z-index: 5; top: calc(var(--top) + 52px); left: 12px; right: 12px; display: flex; gap: 6px; overflow-x: auto; scrollbar-width: none; justify-content: safe center; padding: 2px 0; }
.crumbs.tabs { justify-content: flex-start; mask-image: linear-gradient(90deg, #000 86%, transparent); -webkit-mask-image: linear-gradient(90deg, #000 86%, transparent); }
.crumbs::-webkit-scrollbar { display: none; }
.crumbs button { flex: none; height: 28px; border: 1px solid var(--line); padding: 0 12px; border-radius: 999px; background: var(--glass); color: var(--ink); opacity: .82; font-size: 12px; font-weight: 700; backdrop-filter: blur(12px); -webkit-backdrop-filter: blur(12px); white-space: nowrap; transition: opacity .15s, background .15s; }
.crumbs button:hover { opacity: 1; }
.crumbs:not(.tabs) button + button::before { content: "›"; margin-right: 6px; opacity: .55; }
.crumbs button.on { background: var(--ink); color: var(--brand-deep); border-color: var(--ink); opacity: 1; }
.crumbs button:disabled { cursor: default; }
.map-host .crumbs { display: flex; }

/* ---------- Reel 2D ---------- */
.reel-item .phone { background: #0d0914; }
.reel-media { position: absolute; inset: 0; display: grid; place-items: center; overflow: hidden; }
.reel-media video { width: 100%; height: 100%; object-fit: cover; }
.reel-media.is-image::before { content: ""; position: absolute; inset: -30px; background: var(--img) center/cover; filter: blur(28px) brightness(.5) saturate(1.2); }
.reel-media img { position: relative; max-width: 100%; max-height: 100%; object-fit: contain; }
.reel-card { width: 84%; min-height: 46%; padding: 28px 24px; border-radius: 24px; display: flex; flex-direction: column; justify-content: center; gap: 12px; box-shadow: 0 24px 60px rgba(0,0,0,.5); }
.reel-card-title { font-family: var(--f-display); font-size: 26px; font-weight: 800; line-height: 1.12; letter-spacing: -.015em; text-wrap: balance; }
.reel-card-body { font-size: 16px; line-height: 1.5; white-space: pre-line; overflow-wrap: anywhere; }
/* Collage de un mundo (feed de una plaza): la fachada de la avenida, en 2D y sin bordes.
   A todo el ancho entre la barra de arriba y el pie; el rail social cae sobre la columna de imágenes */
.collage-item .reel-media { display: block; }
.collage { position: absolute; left: 0; right: 0; top: calc(var(--top) + 104px); bottom: calc(var(--bottom) + 150px); z-index: 1; display: grid; gap: 2px;
    grid-template-columns: 1fr 1.1fr 1fr; grid-template-rows: 1.25fr 1fr 1fr;
    grid-template-areas: "hero hero hero" "note door i1" "note door i2";
    background: #111116; cursor: pointer; }
.cg { position: relative; overflow: hidden; min-width: 0; min-height: 0; }
.cg > img, .cg > video, .cg > canvas { position: absolute; inset: 0; width: 100%; height: 100%; max-width: none; max-height: none; object-fit: cover; }
.cg-hero { grid-area: hero; } .cg-i1 { grid-area: i1; } .cg-i2 { grid-area: i2; } .cg-door { grid-area: door; } .cg-note { grid-area: note; }
.cg-note { position: absolute; inset: 0; display: flex; flex-direction: column; gap: 6px; padding: 14px 12px; overflow: hidden; }
.cg-note small { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; font-size: 9px; font-weight: 800; letter-spacing: .06em; text-transform: uppercase; opacity: .75; }
.cg-note b { font-family: var(--f-display); font-size: 17px; line-height: 1.15; }
.cg-note p { margin: 0; font-size: 15px; line-height: 1.38; overflow: hidden; display: -webkit-box; -webkit-line-clamp: 12; -webkit-box-orient: vertical; }
.cg-note em { margin-top: auto; font-size: 10px; font-style: normal; opacity: .7; }
.cg-hero .cg-note b { font-size: 20px; } .cg-hero .cg-note p { -webkit-line-clamp: 5; font-size: 14px; }
.cg-i1 .cg-note p, .cg-i2 .cg-note p { -webkit-line-clamp: 3; }
.collage-item .reel-title, .collage-item .reel-body { display: none; }
.reel-shade { position: absolute; inset: 0; pointer-events: none; background: linear-gradient(180deg, rgba(13,9,20,.6) 0%, transparent 22%, transparent 52%, rgba(13,9,20,.9) 100%); }
.reel-footer { position: absolute; left: 0; right: 0; bottom: 0; padding: 18px 18px calc(18px + var(--bottom)); }
.reel-creator { display: flex; gap: 10px; align-items: center; margin-bottom: 10px; }
.reel-creator b { font-weight: 800; }
.reel-creator .avatar { width: 36px; height: 36px; font-size: 15px; }
.reel-room { font-size: 12px; color: var(--muted); }
.reel-title { font-family: var(--f-display); font-size: 18px; font-weight: 800; line-height: 1.2; margin-bottom: 4px; text-wrap: balance; }
.reel-body { font-size: 14px; line-height: 1.45; color: var(--muted); margin-bottom: 14px; display: -webkit-box; -webkit-line-clamp: 3; -webkit-box-orient: vertical; overflow: hidden; }
.reel-actions { display: flex; gap: 8px; }
.reel-actions > * { display: inline-flex; align-items: center; justify-content: center; gap: 6px; height: 44px; padding: 0 14px; border-radius: 14px; border: 1px solid rgba(255,255,255,.14); font-size: 13.5px; font-weight: 800; text-decoration: none; background: rgba(255,255,255,.1); color: var(--ink); backdrop-filter: blur(10px); -webkit-backdrop-filter: blur(10px); }
.reel-actions .btn-3d { flex: 1; background: var(--accent); border-color: var(--accent); color: var(--on-accent); font-family: var(--f-display); }
.reel-actions .btn-reel-sound { width: 44px; padding: 0; }
.reel-actions [hidden] { display: none; }

/* ---------- Live chat sobrepuesto ---------- */
.live-chat { position: absolute; z-index: 4; left: 12px; width: min(270px, 72%); bottom: 168px; display: flex; flex-direction: column; gap: 6px; transition: opacity .25s; }
.room-item.exploring .live-chat { bottom: 20px; }
body.touch .room-item.exploring .live-chat { bottom: calc(158px + var(--bottom)); }
.room-item.focused .live-chat, .room-item.carded .live-chat { opacity: 0; pointer-events: none; }
.chat-head { align-self: flex-start; display: flex; align-items: center; gap: 7px; height: 28px; border: 1px solid var(--line); padding: 0 11px; border-radius: 999px; background: var(--glass); color: var(--ink); font-size: 12px; font-weight: 800; backdrop-filter: blur(12px); -webkit-backdrop-filter: blur(12px); max-width: 100%; }
.chat-title { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.chat-count { color: var(--muted); font-weight: 700; font-variant-numeric: tabular-nums; }
.live-dot { width: 7px; height: 7px; border-radius: 50%; background: var(--heart); box-shadow: 0 0 0 3px rgba(244,63,94,.25); animation: pulse 1.4s infinite; flex: none; }
@keyframes pulse { 50% { opacity: .4; } }
.chat-list { max-height: 150px; overflow-y: auto; display: flex; flex-direction: column; gap: 4px; scrollbar-width: none; mask-image: linear-gradient(180deg, transparent, #000 30%); -webkit-mask-image: linear-gradient(180deg, transparent, #000 30%); }
.chat-list::-webkit-scrollbar { display: none; }
.chat-msg { font-size: 12.5px; line-height: 1.35; text-shadow: 0 1px 3px rgba(0,0,0,.9); overflow-wrap: anywhere; }
.chat-msg b { font-weight: 800; }
.chat-msg.me { background: rgba(175,128,234,.22); border-radius: 4px 10px 10px 10px; padding: 3px 8px; }
.chat-form { display: flex; gap: 6px; }
.chat-form input { flex: 1; min-width: 0; height: 36px; border: 1px solid var(--line); background: rgba(13,9,20,.55); color: var(--ink); border-radius: 999px; padding: 0 14px; font-size: 13px; font-weight: 600; outline: none; backdrop-filter: blur(12px); -webkit-backdrop-filter: blur(12px); }
.chat-form input::placeholder { color: var(--muted); }
.chat-form input:focus { border-color: var(--brand); }
.chat-form button { display: grid; place-items: center; width: 36px; height: 36px; flex: none; padding: 0; border: 0; border-radius: 50%; background: var(--brand); color: var(--on-accent); }
.chat-form button .i { width: 17px; height: 17px; stroke-width: 2.4; }
.live-chat.collapsed .chat-list, .live-chat.collapsed .chat-form { display: none; }
.phone > .live-chat .chat-list { background: rgba(13,9,20,.3); border-radius: 12px; padding: 6px 10px; mask-image: none; -webkit-mask-image: none; }

.chat-av, .chat-close, .chat-bubble-icon, .chat-badge[hidden] { display: none; }
.chat-body { display: inline; }
.chat-badge { position: absolute; top: -3px; right: -3px; min-width: 18px; height: 18px; padding: 0 5px; border-radius: 999px; background: var(--heart); color: #fff; font-size: 10px; font-weight: 800; display: grid; place-items: center; box-shadow: 0 0 0 2px rgba(13,9,20,.6); }
.live-chat.open .chat-badge { display: none; }

/* Feed: chat estilo reels. Cerrado = ícono en la columna derecha; abierto = hoja inferior */
.live-chat.tt:not(.open) { left: auto; right: 10px; width: auto; bottom: 34%; z-index: 6; }
.live-chat.tt:not(.open) .chat-list, .live-chat.tt:not(.open) .chat-form,
.live-chat.tt:not(.open) .chat-title, .live-chat.tt:not(.open) .live-dot { display: none; }
.live-chat.tt:not(.open) .chat-head { position: relative; flex-direction: column; gap: 3px; height: auto; padding: 0; border: 0; background: none; backdrop-filter: none; -webkit-backdrop-filter: none; align-items: center; }
.live-chat.tt:not(.open) .chat-bubble-icon { display: grid; place-items: center; width: 46px; height: 46px; border-radius: 50%; background: var(--glass); border: 1px solid var(--line); backdrop-filter: blur(12px); -webkit-backdrop-filter: blur(12px); }
.live-chat.tt:not(.open) .chat-bubble-icon .i { width: 22px; height: 22px; }
.live-chat.tt:not(.open) .chat-count { color: #fff; font-size: 11.5px; text-shadow: 0 1px 3px rgba(0,0,0,.7); }

.live-chat.tt.open { left: 0; right: 0; width: auto; bottom: 0; height: 64%; z-index: 30; gap: 0; padding: 0 0 calc(10px + var(--bottom)); background: var(--surface); border-radius: 24px 24px 0 0; border-top: 1px solid var(--line); box-shadow: 0 0 0 100vmax rgba(8,4,14,.45); animation: sheet-up .3s var(--ease); }
@keyframes sheet-up { from { transform: translateY(100%); } }
.live-chat.tt.open .chat-head { align-self: stretch; justify-content: center; height: auto; background: none; backdrop-filter: none; border: 0; border-bottom: 1px solid var(--line); border-radius: 0; padding: 18px 48px 14px; font-family: var(--f-display); font-size: 15px; cursor: default; }
.live-chat.tt.open .chat-close { display: grid; place-items: center; position: absolute; top: 10px; right: 10px; width: 34px; height: 34px; padding: 0; border: 0; border-radius: 50%; background: var(--faint); color: var(--ink); }
.live-chat.tt.open .chat-close .i { width: 16px; height: 16px; }
.live-chat.tt.open .chat-list { flex: 1; max-height: none; padding: 14px 18px; gap: 16px; mask-image: none; -webkit-mask-image: none; background: none; border-radius: 0; }
.live-chat.tt.open .chat-msg { display: flex; gap: 10px; align-items: flex-start; font-size: 14px; line-height: 1.4; text-shadow: none; background: none; padding: 0; }
.live-chat.tt.open .chat-av { display: grid; place-items: center; flex: none; width: 34px; height: 34px; border-radius: 50%; color: var(--on-accent); font-size: 13px; font-weight: 800; }
.live-chat.tt.open .chat-body { display: flex; flex-direction: column; gap: 2px; min-width: 0; }
.live-chat.tt.open .chat-body b { color: var(--muted) !important; font-size: 12px; font-weight: 700; }
.live-chat.tt.open .chat-body span { color: var(--ink); }
.live-chat.tt.open .chat-msg.me .chat-body b::after { content: " · vos"; color: var(--brand); }
.live-chat.tt.open .chat-form { padding: 12px 14px 0; border-top: 1px solid var(--line); gap: 8px; }
.live-chat.tt.open .chat-form input { height: 44px; background: var(--surface-2); border: 1px solid transparent; padding: 0 16px; font-size: 14px; }
.live-chat.tt.open .chat-form input:focus { border-color: var(--brand); }
.live-chat.tt.open .chat-form button { width: 44px; height: 44px; }

/* ---------- Buscador ---------- */
.search-modal { align-items: start; padding-top: max(8dvh, calc(var(--top) + 12px)); }
.search-input { flex: 1; min-width: 0; height: 46px; border: 1px solid var(--line); background: var(--surface-2); color: var(--ink); border-radius: 14px; padding: 0 16px; font-size: 15px; font-weight: 600; outline: none; transition: border-color .15s; }
.search-input::placeholder { color: var(--muted); }
.search-input:focus { border-color: var(--brand); }
.search-modal .modal-head { align-items: center; margin-bottom: 14px; }
.search-chips { display: flex; flex-wrap: wrap; gap: 6px; }
.search-chips[hidden] { display: none; }
.search-chips button { height: 32px; border: 1px solid var(--line); padding: 0 13px; border-radius: 999px; background: transparent; color: var(--ink); font-size: 12.5px; font-weight: 700; transition: background .15s; }
.search-chips button:hover { background: var(--faint); }
.search-results { display: flex; flex-direction: column; gap: 4px; }
.search-head { font-size: 10.5px; text-transform: uppercase; letter-spacing: .1em; color: var(--muted); font-weight: 800; margin: 14px 0 4px; }
.search-row { display: flex; gap: 12px; align-items: center; text-align: left; border: 0; padding: 10px 12px; border-radius: 14px; background: transparent; color: var(--ink); position: relative; transition: background .15s; }
.search-row::before { content: ""; flex: none; width: 4px; align-self: stretch; border-radius: 2px; background: var(--dot); }
.search-row:hover { background: var(--surface-2); }
.search-icon { font-size: 18px; flex: none; }
.search-text { min-width: 0; display: flex; flex-direction: column; }
.search-label { font-weight: 800; font-size: 14px; }
.search-sub { font-size: 12px; color: var(--muted); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.search-empty { color: var(--muted); font-size: 13px; padding: 10px 0; }
/* Crear plaza con la búsqueda */
.search-create { display: grid; grid-template-columns: 1fr auto; gap: 2px 10px; align-items: center; text-align: left; border: 1px solid rgba(175,128,234,.5); background: linear-gradient(160deg, rgba(175,128,234,.22), rgba(76,34,116,.25)); color: var(--ink); border-radius: 14px; padding: 12px 14px; margin-top: 6px; transition: background .15s; }
.search-create b { font-size: 14px; font-weight: 800; }
.search-create span { grid-column: 1; font-size: 12px; color: var(--muted); }
.search-create kbd { grid-row: 1 / span 2; grid-column: 2; font: 800 11px var(--f-text); padding: 5px 9px; border-radius: 8px; background: rgba(255,255,255,.12); }
.search-create:hover { background: linear-gradient(160deg, rgba(175,128,234,.32), rgba(76,34,116,.35)); }

/* ---------- Grilla del nivel actual ---------- */
.grid-modal .modal-card { width: min(760px, 100%); }
.grid-modal .modal-head > div { flex: 1; min-width: 0; }
.grid-up-row { display: flex; gap: 10px; align-items: center; }
.grid-up { width: 34px; height: 34px; border-radius: 50%; background: var(--faint); border: 0; backdrop-filter: none; flex: none; }
.grid-up .i { width: 16px; height: 16px; }
.grid-up[hidden] { display: none; }
.grid-up-row .modal-title { min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.grid-cards { display: grid; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: 12px; }
.g-card { position: relative; display: flex; flex-direction: column; text-align: left; border: 1px solid var(--line); padding: 0; border-radius: 18px; overflow: hidden; background: var(--surface-2); color: var(--ink); transition: transform .18s var(--ease), border-color .18s; }
.g-card:hover { transform: translateY(-2px); border-color: color-mix(in srgb, var(--acc) 60%, transparent); }
.g-cover { aspect-ratio: 16/10; background: linear-gradient(135deg, var(--acc), #2a1a40) center/cover; position: relative; }
.g-cover .g-av { position: absolute; left: 10px; bottom: -14px; width: 32px; height: 32px; border-radius: 50%; display: grid; place-items: center; font-weight: 800; font-size: 14px; background: var(--acc); color: #fff; border: 2px solid var(--surface-2); }
.g-body { padding: 20px 12px 12px; display: flex; flex-direction: column; gap: 3px; }
.g-kind { font-size: 10px; font-weight: 800; letter-spacing: .08em; text-transform: uppercase; color: var(--acc); }
.g-title { font-family: var(--f-display); font-size: 15px; font-weight: 800; line-height: 1.2; }
.g-sub { font-size: 12px; color: var(--muted); }
.g-bio { font-size: 12px; color: var(--muted); line-height: 1.4; display: -webkit-box; -webkit-line-clamp: 3; -webkit-box-orient: vertical; overflow: hidden; }
.g-tags { font-size: 11px; font-weight: 700; color: var(--acc); overflow: hidden; white-space: nowrap; text-overflow: ellipsis; }
.g-stat { margin-top: 4px; font-size: 11px; font-weight: 800; color: var(--muted); }
.grid-saved { display: inline-flex; align-items: center; gap: 6px; margin-left: auto; flex: none; height: 32px; border: 1px solid var(--line); background: transparent; color: var(--ink); padding: 0 12px; border-radius: 999px; font-size: 12.5px; font-weight: 800; }
.grid-saved .i { width: 15px; height: 15px; }
.grid-saved.on { background: var(--brand); border-color: var(--brand); color: var(--on-accent); }

/* ---------- Reacciones: Latido / Colgar / Mochila / Invitar ---------- */
.social { display: flex; gap: 6px; margin-top: 8px; }
.social[hidden] { display: none; }
.social button { display: inline-flex; align-items: center; gap: 6px; height: 32px; padding: 0 11px; border-radius: 999px; border: 1px solid var(--line); background: transparent; color: var(--ink); font-size: 12.5px; font-weight: 800; font-variant-numeric: tabular-nums; transition: background .15s, border-color .15s, color .15s, transform .15s; }
.social button:active { transform: scale(.92); }
.social .n:empty { display: none; }
.social .ic { display: grid; place-items: center; line-height: 1; }
.social .ic .i { width: 17px; height: 17px; }
.social [data-act="share"] { margin-left: auto; }
.social [data-act="like"].on { background: rgba(244,63,94,.16); border-color: rgba(244,63,94,.45); color: #fda4af; }
.social [data-act="like"].on .i { fill: var(--heart); stroke: var(--heart); }
.social [data-act="rt"].on { background: rgba(52,211,153,.14); border-color: rgba(52,211,153,.45); color: #6ee7b7; }
.social [data-act="save"].on { background: color-mix(in srgb, var(--brand) 22%, transparent); border-color: color-mix(in srgb, var(--brand) 55%, transparent); color: var(--lavender); }
.social [data-act="save"].on .i { fill: color-mix(in srgb, var(--brand) 45%, transparent); }
.social button.pop .ic { animation: social-pop .35s ease; }
@keyframes social-pop { 40% { transform: scale(1.4); } }
/* Columna vertical de los reels */
.social.vertical { position: absolute; z-index: 4; right: 10px; bottom: calc(170px + var(--bottom)); flex-direction: column; gap: 14px; margin: 0; }
.social.vertical button { flex-direction: column; gap: 4px; height: auto; padding: 0; border: 0; background: none; color: #fff; font-size: 11.5px; text-shadow: 0 1px 3px rgba(0,0,0,.7); }
.social.vertical [data-act="share"] { margin-left: 0; }
.social.vertical .ic { width: 46px; height: 46px; border-radius: 50%; background: var(--glass); border: 1px solid var(--line); backdrop-filter: blur(12px); -webkit-backdrop-filter: blur(12px); }
.social.vertical .ic .i { width: 22px; height: 22px; }
.social.vertical [data-act].on { background: none; border: 0; color: #fff; }
.social.vertical [data-act="like"].on .ic { background: rgba(244,63,94,.25); border-color: rgba(244,63,94,.5); }
.social.vertical [data-act="rt"].on .ic { background: rgba(52,211,153,.25); border-color: rgba(52,211,153,.5); }
.social.vertical [data-act="save"].on .ic { background: color-mix(in srgb, var(--brand) 35%, transparent); border-color: var(--brand); }
.reel-item .live-chat.tt:not(.open) { bottom: calc(492px + var(--bottom)); }   /* encima de la columna de reacciones */
.reel-item .room-nav { top: 26%; }
.reel-item .reel-footer { padding-right: 72px; }

.toast { position: fixed; left: 50%; bottom: calc(96px + var(--bottom)); transform: translateX(-50%); z-index: 60; max-width: calc(100% - 32px); background: var(--ink); color: var(--brand-deep); padding: 10px 18px; border-radius: 999px; font-size: 13px; font-weight: 800; box-shadow: var(--shadow); pointer-events: none; animation: toast-in .25s var(--ease); }
@keyframes toast-in { from { opacity: 0; transform: translate(-50%, 10px); } }

/* ---------- Muki, el companion ---------- */
.muki { position: absolute; z-index: 7; left: 12px; top: calc(var(--top) + 132px); width: calc(100% - 24px); pointer-events: none; }
.muki > * { pointer-events: auto; }
.room-item:not(.exploring):not(.reel-item) .muki { top: calc(var(--top) + 172px); }
.muki-av { position: relative; display: block; width: 46px; height: 46px; padding: 0; border: 2px solid rgba(246,241,253,.9); border-radius: 15px; background: #f3edfb; box-shadow: 0 6px 18px rgba(76,34,116,.45); animation: muki-bob 3.2s ease-in-out infinite; }
.muki-av img { width: 100%; height: 100%; border-radius: 13px; display: block; }
.muki.talking .muki-av { animation: muki-talk .5s ease-in-out 3, muki-bob 3.2s ease-in-out 1.5s infinite; }
.muki-dot { position: absolute; top: -4px; right: -4px; width: 12px; height: 12px; border-radius: 50%; background: var(--heart); border: 2px solid #fff; }
.muki-dot[hidden] { display: none; }
@keyframes muki-bob { 50% { transform: translateY(-3px) rotate(-2deg); } }
@keyframes muki-talk { 50% { transform: scale(1.08) rotate(4deg); } }
.muki-bubble { position: relative; margin-top: 10px; max-width: 310px; padding: 14px 16px; border-radius: 4px 18px 18px 18px; background: var(--glass-strong); border: 1px solid rgba(175,128,234,.4); color: var(--ink); box-shadow: var(--shadow); backdrop-filter: blur(18px); -webkit-backdrop-filter: blur(18px); animation: muki-in .25s var(--ease); }
.muki-bubble[hidden] { display: none; }
@keyframes muki-in { from { opacity: 0; transform: translateY(-6px) scale(.97); } }
.muki-x { position: absolute; top: 8px; right: 8px; width: 26px; height: 26px; border: 0; border-radius: 50%; background: var(--faint); color: var(--lavender); font-size: 11px; display: grid; place-items: center; }
.muki-text { padding-right: 24px; font-size: 14px; line-height: 1.45; font-weight: 700; }
.muki-card { display: flex; gap: 10px; align-items: center; margin-top: 12px; padding: 6px; border-radius: 14px; background: rgba(255,255,255,.06); border: 1px solid var(--line); }
.muki-card[hidden] { display: none; }
.muki-cover { flex: none; width: 76px; aspect-ratio: 16 / 9; border-radius: 9px; background: var(--brand) center / cover no-repeat; }
.muki-card b { display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; font-size: 13px; font-weight: 800; line-height: 1.25; }
.muki-card span { display: block; margin-top: 2px; font-size: 11.5px; color: var(--lavender); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; max-width: 190px; }
.muki-acts { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 12px; }
.muki-acts:empty { display: none; }
.muki-acts button { height: 34px; padding: 0 13px; border-radius: 999px; border: 1px solid rgba(175,128,234,.4); background: transparent; color: var(--ink); font-size: 12.5px; font-weight: 800; }
.muki-acts button.primary { background: var(--brand); border-color: var(--brand); color: var(--on-accent); }
.muki-ask { display: flex; gap: 6px; margin-top: 12px; }
.muki-ask[hidden] { display: none; }
.muki-ask input { flex: 1; min-width: 0; height: 38px; padding: 0 14px; border-radius: 999px; border: 1px solid rgba(175,128,234,.4); background: rgba(8,4,14,.4); color: var(--ink); font-size: 13px; font-weight: 600; outline: none; }
.muki-ask input:focus { border-color: var(--brand); }
.muki-ask button { width: 38px; height: 38px; border: 0; border-radius: 50%; background: var(--brand); color: var(--on-accent); font-weight: 800; }

@media (prefers-reduced-motion: reduce) {
    *, *::before, *::after { animation-duration: .01ms !important; animation-iteration-count: 1 !important; transition-duration: .01ms !important; }
}
/* Vista aérea: la ciudad entera a la vista, sin chat encima */
.room-item.aerial .live-chat { opacity: 0; pointer-events: none; transition: opacity .3s; }

/* Sin WebGL: aviso a pantalla completa en lugar de negro */
.nogl { position: fixed; inset: 0; z-index: 9999; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 10px; padding: calc(24px + var(--top, 0px)) 24px calc(24px + var(--bottom, 0px)); background: #f3edfb; color: #2a0d3d; font-family: Nunito, system-ui, sans-serif; text-align: center; overflow: auto; }
.nogl img { width: 96px; height: 96px; border-radius: 24px; }
.nogl h2 { margin: 0; font: 700 22px 'Bricolage Grotesque', system-ui, sans-serif; color: #4c2274; }
.nogl p { margin: 0; max-width: 420px; }
.nogl ul { margin: 4px 0; padding-left: 20px; max-width: 460px; text-align: left; line-height: 1.45; }
.nogl button { margin-top: 6px; padding: 10px 22px; border: 0; border-radius: 999px; background: #4c2274; color: #fff; font: 700 15px Nunito, system-ui, sans-serif; cursor: pointer; }

/* ---------- Lugares con vida: latido al mundo, Ver juntos, misiones, eventos ---------- */
.btn-place-like { pointer-events: auto; position: absolute; right: 12px; bottom: calc(24px + 88px + 10px + 46px + 8px + var(--bottom)); width: 46px; height: 46px; display: none; flex-direction: column; align-items: center; justify-content: center; gap: 1px; border-radius: 14px; border: 1px solid var(--line); background: var(--glass); color: var(--ink); backdrop-filter: blur(14px); -webkit-backdrop-filter: blur(14px); }
.btn-place-like .i { width: 19px; height: 19px; }
.btn-place-like .n { font-size: 9.5px; font-weight: 800; line-height: 1; }
.btn-place-like .n:empty { display: none; }
.btn-place-like.on { color: var(--heart); border-color: color-mix(in srgb, var(--heart) 50%, transparent); }
.btn-place-like.on .i { fill: currentColor; }
.btn-place-like.pop .i { animation: social-pop .35s ease; }
.room-item.exploring:not(.is-map):not(.focused):not(.big) .btn-place-like { display: flex; }

.btn-watch { background: var(--faint); color: var(--ink); }
.btn-watch.on { background: var(--heart); color: #fff; }

.found-chip.live { color: #fff; background: rgba(229,33,61,.85); border-color: transparent; }

.watch-pill { position: absolute; z-index: 8; left: 50%; transform: translateX(-50%); top: calc(var(--top) + 172px); max-width: calc(100% - 32px); display: flex; align-items: center; gap: 8px; padding: 8px 8px 8px 12px; border-radius: 999px; border: 1px solid var(--line); background: var(--glass); color: var(--ink); backdrop-filter: blur(14px); -webkit-backdrop-filter: blur(14px); font-size: 12.5px; font-weight: 700; box-shadow: var(--shadow); animation: pop-in .25s var(--ease); }
.watch-pill .wp-text { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; min-width: 0; }
.watch-pill b { flex: none; padding: 5px 11px; border-radius: 999px; background: var(--accent); color: var(--on-accent); font-weight: 800; }

.mission-chip { position: absolute; z-index: 6; right: 12px; top: calc(var(--top) + 128px); max-width: calc(100% - 90px); height: 28px; padding: 0 11px; border-radius: 999px; border: 1px solid var(--line); background: var(--glass); color: var(--ink); backdrop-filter: blur(14px); -webkit-backdrop-filter: blur(14px); font-size: 11.5px; font-weight: 800; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.room-item.focused .mission-chip, .room-item.big .mission-chip { display: none; }

.live-badge { position: absolute; z-index: 2; left: 10px; top: 10px; max-width: calc(100% - 20px); padding: 5px 10px; border-radius: 999px; background: #e5213d; color: #fff; font-size: 11px; font-weight: 900; letter-spacing: .03em; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; box-shadow: 0 4px 14px rgba(0,0,0,.35); }

.modal.peek { background: transparent; backdrop-filter: none; -webkit-backdrop-filter: none; align-items: end; }
.modal.peek .modal-card { box-shadow: 0 -10px 40px rgba(0,0,0,.45); }
.modal.peek .modal-card { padding: 16px 16px calc(var(--bottom) + 14px); }
.modal.peek .modal-head { margin-bottom: 12px; }
.modal.peek .modal-title { font-size: 18px; }
.modal.peek .modal-sub { font-size: 12.5px; }
.theme-grid { display: grid; grid-auto-flow: column; grid-auto-columns: 104px; gap: 8px; overflow-x: auto; scroll-snap-type: x proximity; padding-bottom: 4px; scrollbar-width: none; }
.theme-opt { scroll-snap-align: start; display: flex; flex-direction: column; align-items: flex-start; gap: 2px; padding: 6px 6px 8px; border-radius: 14px; border: 2px solid var(--line); background: var(--faint); color: var(--ink); text-align: left; cursor: pointer; }
.theme-opt.on { border-color: var(--brand); background: color-mix(in srgb, var(--brand) 18%, transparent); }
.theme-opt b { font-family: var(--f-display); font-size: 14px; font-weight: 800; margin-top: 4px; }
.theme-opt small { font-size: 10.5px; color: var(--muted); line-height: 1.25; }
.theme-sw { position: relative; width: 100%; aspect-ratio: 4 / 3; border-radius: 9px; overflow: hidden; }
.theme-sw i { position: absolute; left: 30%; bottom: 20%; width: 40%; height: 44%; border: 2px solid; border-radius: 3px; background: rgba(255,255,255,.35); }
.sheet-body { display: flex; flex-direction: column; gap: 10px; }
.sheet-form { display: flex; flex-direction: column; gap: 10px; margin-top: 6px; }
.sheet-form textarea, .sheet-form > input { width: 100%; border: 1px solid var(--line); border-radius: 12px; background: rgba(8,4,14,.45); color: var(--ink); font: 600 15px var(--f-text, inherit); padding: 12px; outline: none; resize: vertical; }
.sheet-form > input { height: 44px; padding: 0 12px; }
.sheet-form textarea:focus, .sheet-form > input:focus { border-color: var(--brand); }
.sheet-form button[type=submit] { height: 44px; border: 0; border-radius: 12px; font-family: var(--f-display); font-weight: 800; font-size: 14.5px; background: var(--brand); color: var(--on-accent); }
.sheet-form button:disabled { opacity: .5; cursor: wait; }
.sheet-err { font-size: 12.5px; font-weight: 700; color: var(--heart); }
.sheet-err:empty { display: none; }
.ev-row { display: flex; align-items: center; gap: 10px; padding: 10px; border-radius: 14px; background: var(--faint); }
.ev-row .avatar { width: 36px; height: 36px; flex: none; display: grid; place-items: center; border-radius: 50%; background: var(--accent); color: #fff; font-weight: 900; }
.ev-row.live .avatar { box-shadow: 0 0 0 3px #e5213d; }
.ev-text { display: flex; flex-direction: column; min-width: 0; flex: 1; }
.ev-text b, .ev-text span { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.ev-text b { font-size: 14px; }
.ev-text span { font-size: 12px; color: var(--muted); font-weight: 700; }
.ev-row.live .ev-text span { color: #ff6b81; }
.ev-row button { flex: none; height: 32px; padding: 0 14px; border: 0; border-radius: 10px; background: var(--brand); color: var(--on-accent); font-weight: 800; }

/* Tema visual (themes.js): botón debajo de Muki */
