/* ============================================================================
   ReelEstate — app de recorridos y acceso. Va después de /assets/css/ui.css
   (tokens, botones, logo, tema). Oscuro por defecto, pensada primero para el
   celular. El editor 3D (properties.html) todavía usa styles.css.
   ========================================================================= */

.hidden { display: none !important; }
body { min-height: 100vh; }
a { cursor: pointer; }

/* ------------------------------------------------------------------ shell */
.shell { display: grid; grid-template-columns: 248px 1fr; min-height: 100vh; }
.side {
  position: sticky; top: 0; height: 100vh; display: flex; flex-direction: column; gap: 4px;
  padding: 18px 14px; border-right: 1px solid var(--line); background: var(--paper-2);
}
.side .logo { height: 20px; margin: 4px 10px 22px; }
.side .group { font-family: var(--mono); font-size: 10.5px; letter-spacing: .08em; text-transform: uppercase; color: var(--ink-3); margin: 14px 10px 6px; }
.nav-i { display: flex; align-items: center; gap: 11px; padding: 9px 10px; border-radius: 10px; color: var(--ink-2); font-weight: 500; font-size: 14.5px; }
.nav-i:hover { background: var(--paper-3); color: var(--ink); }
.nav-i.on { background: var(--card); color: var(--ink); box-shadow: 0 0 0 1px var(--line); }
.nav-i svg { width: 17px; height: 17px; flex: none; }
.nav-i .tag { margin-left: auto; }
.plan-box { margin-top: auto; padding: 14px; border: 1px solid var(--line); border-radius: 14px; background: var(--card); }
.plan-box b { display: block; font-size: 19px; letter-spacing: -.03em; margin: 3px 0 4px; }
.plan-box p { font-size: 12.5px; color: var(--ink-3); }
.plan-box a { display: inline-block; margin-top: 8px; font-size: 12.5px; font-weight: 600; color: var(--ink); text-decoration: underline; text-underline-offset: 3px; }
.account { display: flex; align-items: center; gap: 10px; padding: 10px; margin-top: 10px; }
.avatar { width: 32px; height: 32px; border-radius: 50%; background: var(--ink); color: var(--paper); display: grid; place-items: center; font-weight: 700; font-size: 12px; flex: none; text-transform: uppercase; }
.account .who { min-width: 0; }
.account b { font-size: 13px; display: block; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.account button.out { font-size: 12px; color: var(--ink-3); text-decoration: underline; text-underline-offset: 3px; }
.account .theme-btn { margin-left: auto; }

.main { min-width: 0; }
.topbar { display: none; }
.content { max-width: 1180px; margin: 0 auto; padding: 36px 40px 120px; }
.crumb { font-size: 13.5px; color: var(--ink-3); margin-bottom: 14px; }
.crumb a:hover { color: var(--ink); }
.crumb b { color: var(--ink); font-weight: 600; }
.page-head { display: flex; align-items: flex-end; justify-content: space-between; gap: 16px; margin-bottom: 26px; flex-wrap: wrap; }
.page-head h1 { font-size: clamp(28px, 3.4vw, 40px); letter-spacing: -.04em; line-height: 1.05; }
.page-head p { color: var(--ink-2); margin-top: 8px; max-width: 640px; }
.page-head .acts { display: flex; gap: 8px; flex-wrap: wrap; }
.card { border: 1px solid var(--line); border-radius: 16px; background: var(--card); }
.chip.amber i { background: var(--hold); } .chip.red i { background: var(--sold); } .chip.gray i { background: var(--ink-3); }
.chip.spin i { background: var(--ink); animation: pulse 1s infinite alternate; }
@keyframes pulse { to { opacity: .25; } }
.tag { font-size: 11px; font-weight: 700; padding: 3px 8px; border-radius: 999px; background: var(--paper-3); color: var(--ink-2); white-space: nowrap; }
.tag.im { background: transparent; border: 1px dashed var(--ink-3); }
.notice { font-size: 13.5px; color: var(--ink-2); padding: 12px 14px; border-radius: 12px; border: 1px solid var(--line); background: var(--paper-2); }
.notice.warn { border-color: color-mix(in srgb, var(--hold) 60%, transparent); background: color-mix(in srgb, var(--hold) 8%, var(--card)); }
.notice b { color: var(--ink); }
.sim-badge { position: fixed; top: 10px; right: 10px; z-index: 90; background: var(--hold); color: #111; font-size: 12px; font-weight: 700; padding: 5px 10px; border-radius: 999px; }
.btn[disabled] { opacity: .35; cursor: not-allowed; }
.screen { animation: fade .3s ease; }
@keyframes fade { from { opacity: 0; transform: translateY(6px); } to { opacity: 1; transform: none; } }

.tabbar { display: none; }
@media (max-width: 880px) {
  .shell { grid-template-columns: 1fr; }
  .side { display: none; }
  .topbar { display: flex; align-items: center; justify-content: space-between; gap: 10px; padding: 12px 16px; border-bottom: 1px solid var(--line);
            position: sticky; top: 0; z-index: 40; background: var(--nav-bg); -webkit-backdrop-filter: blur(14px); backdrop-filter: blur(14px); }
  .topbar .logo { height: 18px; }
  .topbar .right { display: flex; align-items: center; gap: 8px; }
  .content { padding: 22px 16px 150px; }
  .tabbar { display: grid; grid-template-columns: repeat(4, 1fr); position: fixed; left: 0; right: 0; bottom: 0; z-index: 45;
            background: var(--nav-bg); -webkit-backdrop-filter: blur(14px); backdrop-filter: blur(14px); border-top: 1px solid var(--line);
            padding: 6px 6px calc(6px + env(safe-area-inset-bottom)); }
  .tabbar a { display: flex; flex-direction: column; align-items: center; gap: 3px; padding: 6px 0; font-size: 11px; font-weight: 600; color: var(--ink-3); }
  .tabbar a.on { color: var(--ink); }
  .tabbar svg { width: 21px; height: 21px; }
  .tabbar .plus span { width: 40px; height: 30px; border-radius: 10px; background: var(--btn); color: var(--btn-ink); display: grid; place-items: center; font-size: 20px; font-weight: 500; }
}

/* ------------------------------------------------------------ recorridos */
.filters { display: flex; gap: 6px; margin-bottom: 20px; flex-wrap: wrap; }
.filters button { height: 34px; padding: 0 14px; border-radius: 999px; border: 1px solid var(--line); font-size: 13.5px; font-weight: 600; color: var(--ink-2); }
.filters button.on { background: var(--btn); color: var(--btn-ink); border-color: var(--btn); }
.grid-tours { display: grid; grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); gap: 16px; }
.tour { overflow: hidden; cursor: pointer; transition: transform .2s, border-color .2s; }
.tour:hover { transform: translateY(-2px); border-color: var(--line-2); }
.tour .thumb { position: relative; aspect-ratio: 16 / 10; background: var(--paper-3); }
.tour .thumb img { width: 100%; height: 100%; object-fit: cover; display: block; }
.tour .thumb .chip { position: absolute; left: 10px; top: 10px; background: rgba(12,12,13,.72); color: #fff; border: 0; -webkit-backdrop-filter: blur(6px); backdrop-filter: blur(6px); }
.tour .thumb .dur { position: absolute; right: 10px; bottom: 10px; background: rgba(12,12,13,.72); color: #fff; font-size: 11.5px; font-weight: 700; padding: 3px 8px; border-radius: 6px; }
.tour .meta { padding: 14px 16px 16px; }
.tour .meta b { display: block; font-size: 15.5px; letter-spacing: -.015em; }
.tour .meta span { font-size: 13px; color: var(--ink-3); }
.new-card { display: grid; place-items: center; text-align: center; border-style: dashed; min-height: 220px; color: var(--ink-2); }
.new-card b { display: block; font-size: 30px; font-weight: 400; margin-bottom: 6px; color: var(--ink); }
.empty { padding: 40px 24px; text-align: center; }
.empty h3 { font-size: 22px; letter-spacing: -.03em; }
.empty p { color: var(--ink-2); margin: 8px auto 20px; max-width: 440px; }

/* ---------------------------------------------------------------- nuevo */
.new-grid { display: grid; grid-template-columns: 1.6fr 1fr; gap: 20px; align-items: start; }
.drop { display: block; border: 1.5px dashed var(--line-2); border-radius: 16px; padding: 28px; text-align: center; background: var(--paper-2); cursor: pointer; transition: border-color .2s, background .2s; }
.drop.over { border-color: var(--ink); background: var(--paper-3); }
.drop b { display: block; font-size: 17px; margin-bottom: 4px; }
.drop span { color: var(--ink-3); font-size: 13.5px; }
.drop .btn { margin-top: 14px; pointer-events: none; }
.drop input { display: none; }
.photos { display: grid; grid-template-columns: repeat(4, 1fr); gap: 10px; margin: 16px 0 0; padding: 0; list-style: none; }
.p-tile { position: relative; aspect-ratio: 4 / 3; border-radius: 12px; overflow: hidden; border: 1px solid var(--line); cursor: grab; background: var(--paper-3); }
.p-tile.dragging { opacity: .4; }
.p-tile img { width: 100%; height: 100%; object-fit: cover; display: block; }
.p-tile em { position: absolute; left: 7px; top: 7px; min-width: 22px; height: 22px; padding: 0 6px; border-radius: 999px; background: #fff; color: #0b0b0c; font-style: normal; font-size: 11.5px; font-weight: 700; display: grid; place-items: center; }
.p-tile .x { position: absolute; right: 6px; top: 6px; width: 26px; height: 26px; border-radius: 50%; background: rgba(12,12,13,.72); color: #fff; display: grid; place-items: center; font-size: 15px; }
.p-tile .grip { position: absolute; right: 7px; bottom: 7px; width: 22px; height: 22px; border-radius: 6px; background: rgba(12,12,13,.6); color: #fff; display: grid; place-items: center; font-size: 12px; }
.tips { padding: 20px; }
.tips h3 { font-size: 16px; margin-bottom: 12px; }
.tips ol { margin: 0; padding-left: 18px; display: flex; flex-direction: column; gap: 10px; color: var(--ink-2); font-size: 14px; }
.tips ol b { color: var(--ink); }
.hint { font-size: 13px; color: var(--ink-3); }
.action-bar { display: flex; align-items: center; justify-content: space-between; gap: 14px; margin-top: 18px; padding: 14px 16px; }
.action-bar span { color: var(--ink-3); font-size: 13.5px; }
.action-bar span b { color: var(--ink); }
@media (max-width: 880px) {
  .new-grid { grid-template-columns: 1fr; }
  .photos { grid-template-columns: repeat(3, 1fr); gap: 8px; }
  .action-bar { position: fixed; left: 12px; right: 12px; bottom: 74px; z-index: 30; box-shadow: var(--shadow); }
}

/* ------------------------------------------------------------ analizando */
.an-wrap { max-width: 760px; margin: 40px auto 0; text-align: center; }
.an-wrap h1 { font-size: clamp(28px, 3.4vw, 40px); letter-spacing: -.04em; margin-top: 12px; }
.an-wrap > p { color: var(--ink-2); margin-top: 10px; }
.an-strip { display: grid; grid-template-columns: repeat(auto-fit, minmax(48px, 1fr)); gap: 6px; margin: 36px 0 26px; }
.an-strip img { width: 100%; aspect-ratio: 3 / 4; object-fit: cover; border-radius: 8px; opacity: .25; filter: grayscale(1); transition: opacity .5s, filter .5s, transform .5s; }
.an-strip img.seen { opacity: 1; filter: none; transform: translateY(-4px); }
.an-steps { display: flex; flex-direction: column; gap: 10px; align-items: center; color: var(--ink-3); font-size: 15px; }
.an-steps div.on { color: var(--ink); font-weight: 600; }
.an-steps div.done { color: var(--ink-2); }
.an-steps div.done::before { content: "✓ "; }
.an-note { margin-top: 26px; font-size: 13px; color: var(--ink-3); }

/* -------------------------------------------------------------- revisión */
.rv { display: grid; grid-template-columns: 1.55fr 1fr; gap: 24px; align-items: start; }
.timeline { display: flex; flex-direction: column; }
.ph-row { display: flex; gap: 14px; align-items: center; padding: 10px; border-radius: 14px; }
.ph-row:hover { background: var(--paper-2); }
.ph-row img { width: 132px; aspect-ratio: 4 / 3; object-fit: cover; border-radius: 10px; border: 1px solid var(--line); flex: none; cursor: zoom-in; }
.ph-row .n { font-family: var(--mono); font-size: 11.5px; color: var(--ink-3); }
.ph-row b { display: block; font-size: 15.5px; letter-spacing: -.015em; }
.ph-row span.d { font-size: 13px; color: var(--ink-3); display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.ph-row .rm { margin-left: auto; font-size: 12.5px; color: var(--ink-3); padding: 6px 10px; border-radius: 999px; opacity: 0; transition: opacity .2s; flex: none; }
.ph-row:hover .rm { opacity: 1; }
.ph-row .rm:hover { color: var(--sold); }
.tr-row { display: flex; gap: 14px; padding: 2px 10px; }
.tr-rail { width: 132px; flex: none; display: flex; justify-content: center; }
.tr-rail i { width: 2px; background: var(--line-2); border-radius: 2px; }
.tr-rail i.dash { background: repeating-linear-gradient(to bottom, var(--ink-2) 0 5px, transparent 5px 9px); }
.tr-card { flex: 1; min-width: 0; margin: 6px 0; padding: 12px 14px; border: 1px solid var(--line); border-radius: 14px; background: var(--card); }
.tr-card.continuous { border-color: var(--line-2); }
.tr-card.crossing { border-style: dashed; border-color: var(--ink-2); }
.tr-card.editorial, .tr-card.bridge_recommended, .tr-card.closing { background: var(--paper-2); }
.tr-card.warn { border-color: var(--hold); background: color-mix(in srgb, var(--hold) 8%, var(--card)); }
.tr-top { display: flex; align-items: center; gap: 8px 10px; flex-wrap: wrap; }
.tr-top b { font-size: 14.5px; }
.tr-top .cr { font-family: var(--mono); font-size: 12px; color: var(--ink-2); }
.tr-card p { font-size: 13.5px; color: var(--ink-2); margin-top: 6px; }
.tr-card .why { color: var(--ink-3); }
.tr-card .warn-t { color: color-mix(in srgb, var(--hold) 75%, var(--ink)); font-weight: 600; }
.tr-card video { width: 100%; margin-top: 10px; border-radius: 10px; background: #000; }
.tr-card .link-btn { display: inline-block; margin-top: 8px; font-size: 13px; }
.stepper { display: inline-flex; align-items: center; gap: 2px; border: 1px solid var(--line); border-radius: 999px; padding: 2px; }
.stepper button { width: 24px; height: 24px; border-radius: 50%; font-weight: 700; color: var(--ink-2); }
.stepper button:hover:not([disabled]) { background: var(--paper-3); color: var(--ink); }
.stepper button[disabled] { opacity: .3; }
.stepper span { font-family: var(--mono); font-size: 12px; min-width: 26px; text-align: center; }
.change { margin-left: auto; position: relative; }
.change > button { font-size: 12.5px; font-weight: 600; color: var(--ink-2); padding: 5px 10px; border-radius: 999px; border: 1px solid var(--line); }
.change > button:hover { color: var(--ink); border-color: var(--ink-3); }
.menu { position: absolute; right: 0; top: calc(100% + 6px); z-index: 20; width: 300px; padding: 6px; background: var(--card); border: 1px solid var(--line); border-radius: 14px; box-shadow: var(--shadow); display: none; }
.change.open .menu { display: block; }
.menu button { display: block; width: 100%; text-align: left; padding: 10px 12px; border-radius: 10px; }
.menu button:hover { background: var(--paper-2); }
.menu button b { display: block; font-size: 13.5px; } .menu button span { font-size: 12px; color: var(--ink-3); }
.menu button.cur b::after { content: "  ✓"; }
.menu hr { border: 0; border-top: 1px solid var(--line); margin: 4px 6px; }

.checkout { position: sticky; top: 24px; padding: 18px; display: flex; flex-direction: column; gap: 16px; }
.cover { position: relative; aspect-ratio: 16 / 9; border-radius: 12px; overflow: hidden; background: #000; }
.cover img { width: 100%; height: 100%; object-fit: cover; display: block; }
.cover span { position: absolute; left: 10px; bottom: 10px; font-size: 11.5px; font-weight: 700; color: #fff; background: rgba(0,0,0,.55); padding: 4px 9px; border-radius: 999px; }
.lbl { font-size: 12.5px; font-weight: 700; color: var(--ink-2); margin-bottom: 8px; display: block; }
.formats { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; }
.formats button { border: 1px solid var(--line); border-radius: 12px; padding: 10px 6px; display: flex; flex-direction: column; align-items: center; gap: 6px; font-size: 12.5px; font-weight: 600; color: var(--ink-2); position: relative; }
.formats button.on { border-color: var(--ink); color: var(--ink); box-shadow: 0 0 0 1px var(--ink); }
.formats i { border: 1.5px solid currentColor; border-radius: 3px; display: block; }
.formats small { font-size: 11px; font-weight: 500; color: var(--ink-3); }
.formats .done { position: absolute; top: 6px; right: 6px; font-size: 10px; color: var(--ok); }
.crop-note { font-size: 12px; color: var(--ink-3); margin-top: 8px; }
.switch { display: flex; gap: 12px; align-items: flex-start; padding: 12px; border: 1px solid var(--line); border-radius: 12px; cursor: pointer; text-align: left; width: 100%; }
.switch .t { width: 38px; height: 22px; border-radius: 999px; background: var(--paper-3); position: relative; flex: none; transition: background .2s; margin-top: 2px; }
.switch .t::after { content: ""; position: absolute; left: 3px; top: 3px; width: 16px; height: 16px; border-radius: 50%; background: var(--ink-3); transition: transform .2s, background .2s; }
.switch.on .t { background: var(--ink); } .switch.on .t::after { transform: translateX(16px); background: var(--paper); }
.switch b { font-size: 14px; display: block; } .switch span { font-size: 12.5px; color: var(--ink-3); }
.total { display: flex; align-items: baseline; justify-content: space-between; gap: 10px; }
.total b { font-size: 38px; letter-spacing: -.045em; line-height: 1; }
.total span { color: var(--ink-3); font-size: 14px; }
.break { display: flex; flex-direction: column; gap: 8px; font-size: 13.5px; color: var(--ink-2); border-top: 1px solid var(--line); padding-top: 12px; }
.break div { display: flex; justify-content: space-between; gap: 10px; }
.break b { color: var(--ink); font-weight: 600; white-space: nowrap; }
.confirm { display: flex; gap: 10px; align-items: flex-start; font-size: 13px; color: var(--ink-2); cursor: pointer; }
.confirm input { margin-top: 2px; accent-color: var(--ink); width: 16px; height: 16px; flex: none; }
.checkout .btn-primary { height: 50px; width: 100%; font-size: 15.5px; }
.fine { font-size: 12px; color: var(--ink-3); text-align: center; }
.mbar { display: none; }
@media (max-width: 880px) {
  .rv { grid-template-columns: 1fr; }
  .ph-row img { width: 72px; }
  .tr-rail { width: 72px; }
  .tr-row, .ph-row { padding-left: 4px; padding-right: 0; }
  .ph-row .rm { opacity: 1; }
  .tr-card { padding: 11px 12px; }
  .checkout { position: static; }
  .mbar { display: flex; position: fixed; left: 12px; right: 12px; bottom: 74px; z-index: 30; align-items: center; justify-content: space-between; gap: 12px;
          padding: 12px 12px 12px 16px; border-radius: 16px; background: var(--card); border: 1px solid var(--line); box-shadow: var(--shadow); }
  .mbar b { font-size: 18px; letter-spacing: -.03em; display: block; } .mbar span { font-size: 12px; color: var(--ink-3); }
  .menu { width: min(300px, 80vw); }
}

/* ------------------------------------------------------------- generando */
.gen { max-width: 860px; }
.gen-top { padding: 22px; display: flex; gap: 22px; align-items: center; }
.ring { width: 92px; height: 92px; flex: none; position: relative; }
.ring svg { width: 100%; height: 100%; transform: rotate(-90deg); }
.ring circle { fill: none; stroke-width: 7; }
.ring .bg { stroke: var(--paper-3); } .ring .fg { stroke: var(--ink); stroke-linecap: round; transition: stroke-dashoffset .6s; }
.ring b { position: absolute; inset: 0; display: grid; place-items: center; font-size: 19px; letter-spacing: -.03em; }
.gen-top h3 { font-size: 20px; letter-spacing: -.03em; }
.gen-top p { color: var(--ink-2); margin-top: 4px; font-size: 14.5px; }
.seg-list { margin-top: 16px; display: flex; flex-direction: column; gap: 8px; }
.seg { display: flex; align-items: center; gap: 12px; padding: 10px 12px; }
.seg .pair { display: flex; align-items: center; gap: 4px; flex: none; }
.seg .pair img { width: 54px; height: 40px; object-fit: cover; border-radius: 6px; }
.seg .pair .ar { color: var(--ink-3); font-size: 12px; }
.seg b { font-size: 14px; } .seg span.k { display: block; font-size: 12.5px; color: var(--ink-3); }
.seg .chip { margin-left: auto; flex: none; }
@media (max-width: 600px) { .gen-top { flex-direction: column; text-align: center; } .seg .pair img { width: 44px; height: 33px; } }

/* -------------------------------------------------------------- resultado */
.res { display: grid; grid-template-columns: 1.7fr 1fr; gap: 22px; align-items: start; }
.player { border-radius: 16px; overflow: hidden; background: #000; border: 1px solid var(--line); }
.player video { width: 100%; max-height: 72vh; display: block; background: #000; }
.share { padding: 18px; display: flex; flex-direction: column; gap: 10px; }
.share .btn { width: 100%; justify-content: flex-start; gap: 12px; height: 50px; }
.share .btn svg { width: 18px; height: 18px; flex: none; }
.share .btn small { margin-left: auto; font-weight: 500; color: var(--ink-3); font-size: 12px; }
.share .btn-primary small { color: inherit; opacity: .6; }
.panel { padding: 18px; margin-top: 14px; }
.panel h3 { font-size: 15px; margin-bottom: 10px; }
.fmt-row { display: flex; align-items: center; gap: 12px; padding: 10px 0; border-top: 1px solid var(--line); }
.fmt-row:first-of-type { border-top: 0; }
.fmt-row i { border: 1.5px solid var(--ink-2); border-radius: 3px; flex: none; }
.fmt-row b { font-size: 14px; } .fmt-row span { display: block; font-size: 12.5px; color: var(--ink-3); }
.fmt-row .btn { margin-left: auto; }
.used { margin-top: 22px; }
.used summary { cursor: pointer; font-weight: 600; padding: 14px 18px; list-style: none; display: flex; justify-content: space-between; gap: 10px; }
.used summary::-webkit-details-marker { display: none; }
.used summary::after { content: "+"; color: var(--ink-3); }
.used[open] summary::after { content: "−"; }
.used .mini { padding: 0 18px 18px; display: flex; flex-wrap: wrap; gap: 6px; align-items: center; font-size: 12px; color: var(--ink-3); }
.used .mini img { width: 64px; height: 48px; object-fit: cover; border-radius: 6px; }
.used .mini .j { padding: 2px 7px; border-radius: 999px; border: 1px solid var(--line); }
.used .mini .j.cross { border-style: dashed; border-color: var(--ink-3); }
@media (max-width: 880px) { .res { grid-template-columns: 1fr; } }

/* ------------------------------------------------------ créditos y plan */
.plans-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); gap: 14px; }
.plan-c { padding: 22px; display: flex; flex-direction: column; gap: 10px; }
.plan-c.cur { border-color: var(--ink); box-shadow: 0 0 0 1px var(--ink); }
.plan-c h3 { font-size: 18px; letter-spacing: -.02em; }
.plan-c .big { font-size: 34px; font-weight: 600; letter-spacing: -.045em; line-height: 1; }
.plan-c .big small { font-size: 14px; font-weight: 500; color: var(--ink-3); letter-spacing: 0; margin-left: 4px; }
.plan-c ul { margin: 4px 0 0; padding: 0; list-style: none; display: flex; flex-direction: column; gap: 7px; font-size: 14px; color: var(--ink-2); }
.plan-c li::before { content: "— "; color: var(--ink-3); }
.plan-c .btn, .plan-c > .tag { margin-top: auto; align-self: flex-start; }
.packs { display: grid; grid-template-columns: repeat(3, 1fr); gap: 10px; }
.pack { padding: 16px; text-align: center; }
.pack b { display: block; font-size: 24px; letter-spacing: -.04em; }
.pack span { font-size: 13px; color: var(--ink-3); }
.how { padding: 20px; margin-top: 18px; }
.how h3 { font-size: 16px; margin-bottom: 10px; }
.how ul { margin: 0; padding-left: 18px; display: flex; flex-direction: column; gap: 8px; color: var(--ink-2); font-size: 14px; }
@media (max-width: 600px) { .packs { grid-template-columns: 1fr; } }

/* ------------------------------------------------------------ showrooms */
.sr-hero { position: relative; border-radius: 20px; overflow: hidden; aspect-ratio: 21 / 9; background: #000; border: 1px solid var(--line); }
.sr-hero img { width: 100%; height: 100%; object-fit: cover; opacity: .85; }
.sr-hero .over { position: absolute; inset: 0; background: linear-gradient(90deg, rgba(0,0,0,.72), rgba(0,0,0,0) 65%); display: flex; flex-direction: column; justify-content: flex-end; padding: clamp(18px, 4vw, 40px); color: #fff; }
.sr-hero .over span { font-family: var(--mono); font-size: 11.5px; letter-spacing: .08em; text-transform: uppercase; opacity: .75; }
.sr-hero .over h2 { font-size: clamp(26px, 3.6vw, 44px); letter-spacing: -.04em; line-height: 1.04; margin: 10px 0 12px; max-width: 560px; }
.sr-hero .over p { max-width: 480px; opacity: .85; }
.benefits { display: grid; grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); gap: 12px; margin-top: 18px; }
.benefit { padding: 18px; }
.benefit b { display: block; font-size: 15.5px; letter-spacing: -.015em; margin-bottom: 4px; }
.benefit span { font-size: 13.5px; color: var(--ink-2); }
.sr-cta { display: flex; align-items: center; justify-content: space-between; gap: 14px; flex-wrap: wrap; padding: 20px; margin-top: 18px; }
@media (max-width: 600px) { .sr-hero { aspect-ratio: 4 / 5; } }

/* ------------------------------------------------------ errores y avisos */
.error-card { padding: 20px; margin-bottom: 18px; border-color: color-mix(in srgb, var(--sold) 55%, transparent); }
.error-card h2 { font-size: 18px; letter-spacing: -.02em; margin-bottom: 6px; }
.error-card p { color: var(--ink-2); }
.error-card details { margin-top: 10px; font-size: 12px; color: var(--ink-3); }
.error-card pre { white-space: pre-wrap; word-break: break-word; max-height: 240px; overflow: auto; background: var(--paper-2); padding: 10px; border-radius: 8px; }
.error-card .btn { margin-top: 14px; }
#toasts { position: fixed; left: 50%; transform: translateX(-50%); bottom: 24px; z-index: 120; display: flex; flex-direction: column; gap: 8px; align-items: center; pointer-events: none; }
.toast { background: var(--btn); color: var(--btn-ink); padding: 10px 16px; border-radius: 999px; font-size: 13.5px; font-weight: 600; box-shadow: var(--shadow); opacity: 0; transform: translateY(8px); transition: opacity .25s, transform .25s; }
.toast.in { opacity: 1; transform: none; }
.toast-warn { background: var(--hold); color: #111; }
@media (max-width: 880px) { #toasts { bottom: 150px; } }
.lightbox { position: fixed; inset: 0; z-index: 130; background: rgba(0,0,0,.88); display: grid; place-items: center; padding: 20px; }
.lightbox img { max-width: 100%; max-height: 90vh; border-radius: 10px; }
.lightbox button { position: absolute; top: 16px; right: 16px; width: 40px; height: 40px; border-radius: 50%; background: rgba(255,255,255,.15); color: #fff; font-size: 22px; }

/* ================================================================= acceso */
.login { display: grid; grid-template-columns: 1fr 1.1fr; min-height: 100vh; }
.login-form { display: flex; flex-direction: column; justify-content: center; padding: 48px clamp(24px, 6vw, 88px); max-width: 560px; width: 100%; margin: 0 auto; }
.login-form > a .logo { height: 24px; margin-bottom: 48px; }
.auth-view h1 { font-size: clamp(30px, 3.4vw, 42px); letter-spacing: -.045em; line-height: 1.02; }
.auth-view .subtitle { color: var(--ink-2); margin: 12px 0 24px; }
.auth-view .hint { margin: 10px 0; font-size: 14px; color: var(--ink-2); }
.oauth-btn { display: flex; align-items: center; justify-content: center; gap: 10px; height: 48px; border: 1px solid var(--line-2); border-radius: 999px; font-weight: 600; width: 100%; }
.oauth-btn:hover { border-color: var(--ink-3); }
.oauth-divider { display: flex; align-items: center; gap: 12px; color: var(--ink-3); font-size: 12.5px; margin: 20px 0; }
.oauth-divider::before, .oauth-divider::after { content: ""; height: 1px; flex: 1; background: var(--line); }
.field { display: flex; flex-direction: column; gap: 6px; margin-bottom: 14px; }
.field > span:first-child { font-size: 13px; font-weight: 600; color: var(--ink-2); }
.field input { height: 48px; border-radius: 12px; border: 1px solid var(--line-2); background: var(--paper-2); color: var(--ink); padding: 0 14px; font: inherit; font-size: 15px; outline: none; }
.field input:focus { border-color: var(--ink-3); }
.field .hint { margin: 0; font-size: 12.5px; color: var(--ink-3); }
.check-row { display: flex; gap: 10px; align-items: flex-start; font-size: 13.5px; color: var(--ink-2); margin: 4px 0 14px; }
.check-row input { margin-top: 2px; accent-color: var(--ink); width: 16px; height: 16px; flex: none; }
.check-row a, .legal-note a, .auth-footer a { text-decoration: underline; text-underline-offset: 3px; color: var(--ink); }
.captcha-slot:empty { display: none; }
.captcha-slot { margin: 6px 0 12px; }
.primary-btn { display: inline-flex; align-items: center; justify-content: center; width: 100%; height: 48px; border-radius: 999px; background: var(--btn); color: var(--btn-ink); font-weight: 600; font-size: 15px; margin-top: 4px; }
.primary-btn[disabled] { opacity: .4; cursor: not-allowed; }
.link-btn { font-size: 13.5px; color: var(--ink-2); text-decoration: underline; text-underline-offset: 3px; }
.link-btn.wide { display: block; width: 100%; text-align: center; padding: 10px 0 0; }
.error-text { color: var(--sold); font-size: 13.5px; margin-top: 10px; }
.legal-note { font-size: 12.5px; color: var(--ink-3); margin-top: 14px; }
.auth-footer { font-size: 12.5px; color: var(--ink-3); margin-top: 36px; }
.login-art { position: relative; margin: 16px; border-radius: 22px; overflow: hidden; background: #000; }
.login-art video { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; opacity: .9; }
.login-art::after { content: ""; position: absolute; inset: 55% 0 0; background: linear-gradient(transparent, rgba(0,0,0,.62)); pointer-events: none; }
.login-art .cap { z-index: 1; position: absolute; left: 24px; right: 24px; bottom: 24px; color: #fff; }
.login-art .cap b { font-size: 22px; letter-spacing: -.03em; display: block; }
.login-art .cap span { color: rgba(255,255,255,.75); font-size: 14px; }
@media (max-width: 880px) { .login { grid-template-columns: 1fr; } .login-art { display: none; } .login-form > a .logo { margin-bottom: 32px; } }

/* ------------------------------------------------- showrooms + consultas -- */
.tag.count { background: var(--ink); color: var(--paper); }
.sr-list { display: grid; grid-template-columns: repeat(auto-fill, minmax(320px, 1fr)); gap: 14px; margin-bottom: 34px; }
.sr-card { padding: 18px; display: flex; flex-direction: column; gap: 12px; }
.sr-card .top { display: flex; align-items: center; gap: 10px; }
.sr-card .top b { font-size: 17px; letter-spacing: -.02em; margin-right: auto; }
.sr-card .nums { display: flex; gap: 16px; font-size: 13px; color: var(--ink-2); flex-wrap: wrap; }
.sr-card .nums span b { color: var(--ink); font-size: 18px; letter-spacing: -.03em; margin-right: 4px; }
.sr-card .acts { display: flex; gap: 8px; flex-wrap: wrap; }
.sr-card .switch { padding: 10px 12px; }
.inbox-head { display: flex; align-items: center; gap: 12px; margin-bottom: 12px; flex-wrap: wrap; }
.inbox-head h2 { font-size: 22px; letter-spacing: -.03em; margin-right: auto; }
.select { height: 36px; border-radius: 999px; border: 1px solid var(--line-2); background: var(--paper-2); color: var(--ink); padding: 0 14px; font: inherit; font-size: 13.5px; }
.lead { padding: 16px 18px; display: grid; grid-template-columns: 1fr auto; gap: 6px 16px; margin-bottom: 10px; }
.lead.done { opacity: .62; }
.lead .who { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }
.lead .who b { font-size: 16px; }
.lead .when { font-size: 12.5px; color: var(--ink-3); }
.lead .meta { grid-column: 1; font-size: 13.5px; color: var(--ink-2); }
.lead .meta .u { color: var(--ink); font-weight: 600; }
.lead .msg { grid-column: 1; font-size: 14.5px; margin-top: 4px; white-space: pre-line; }
.lead .acts { grid-column: 2; grid-row: 1 / span 3; display: flex; flex-direction: column; gap: 6px; align-items: stretch; justify-content: center; }
.lead .acts .link-btn { font-size: 12.5px; padding: 2px 0; }
@media (max-width: 760px) {
  .lead { grid-template-columns: 1fr; }
  .lead .acts { grid-column: 1; grid-row: auto; flex-direction: row; flex-wrap: wrap; align-items: center; justify-content: flex-start; gap: 6px 14px; margin-top: 6px; }
  .sr-list { grid-template-columns: 1fr; }
}

/* ------------------------------------------------------------------ admin -- */
.admin .side .nav-i { padding-left: 14px; }
.stats { display: grid; grid-template-columns: repeat(auto-fill, minmax(210px, 1fr)); gap: 12px; margin-bottom: 30px; }
.stat { padding: 16px 18px; display: flex; flex-direction: column; gap: 4px; }
.stat > span { font-size: 12.5px; color: var(--ink-3); font-weight: 600; }
.stat b { font-size: 28px; letter-spacing: -.04em; line-height: 1.1; }
.stat b a { color: inherit; text-decoration: none; }
.stat small { font-size: 12.5px; color: var(--ink-2); }
.sec-t { font-size: 19px; letter-spacing: -.025em; margin: 30px 0 12px; }
.tools { display: flex; gap: 12px; align-items: center; flex-wrap: wrap; margin-bottom: 14px; }
.tools .filters { margin: 0; }
.search { height: 38px; min-width: 260px; border-radius: 999px; border: 1px solid var(--line-2); background: var(--paper-2); color: var(--ink); padding: 0 16px; font: inherit; font-size: 14px; outline: none; }
.tbl-wrap { overflow-x: auto; border: 1px solid var(--line); border-radius: 14px; margin-bottom: 14px; }
.tbl { width: 100%; border-collapse: collapse; font-size: 13.5px; }
.tbl th { text-align: left; font-size: 11.5px; font-weight: 700; color: var(--ink-3); text-transform: uppercase; letter-spacing: .04em; padding: 10px 14px; border-bottom: 1px solid var(--line); white-space: nowrap; background: var(--paper-2); }
.tbl td { padding: 10px 14px; border-bottom: 1px solid var(--line); vertical-align: middle; white-space: nowrap; }
.tbl tr:last-child td { border-bottom: 0; }
.tbl tr.link { cursor: pointer; } .tbl tr.link:hover td { background: var(--paper-2); }
.tbl .n { text-align: right; font-variant-numeric: tabular-nums; }
.tbl .neg { color: var(--sold); } .tbl .pos { color: var(--ok); }
.tbl .err { white-space: normal; min-width: 240px; color: var(--ink-2); font-size: 12.5px; }
.tbl .chip { font-size: 12px; }
.mono-s { font-family: var(--mono); font-size: 12px; }
.adm-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; margin-bottom: 8px; }
.adm-box { padding: 18px; display: flex; flex-direction: column; gap: 12px; }
.adm-box h3 { font-size: 16px; letter-spacing: -.02em; }
.adm-box .row { display: flex; gap: 8px; flex-wrap: wrap; }
.adm-box input { flex: 1; min-width: 140px; height: 40px; border-radius: 12px; border: 1px solid var(--line-2); background: var(--paper-2); color: var(--ink); padding: 0 12px; font: inherit; font-size: 14px; outline: none; }
.adm-box .quick { display: flex; gap: 6px; flex-wrap: wrap; }
.adm-box > .btn { align-self: flex-start; }
.err-g { padding: 0; margin-bottom: 8px; }
.err-g summary { display: flex; gap: 14px; align-items: flex-start; padding: 14px 16px; cursor: pointer; list-style: none; }
.err-g summary::-webkit-details-marker { display: none; }
.err-g summary b { display: block; font-size: 14px; word-break: break-word; }
.err-g summary span { font-size: 12.5px; color: var(--ink-3); }
.err-g .cnt { flex: none; min-width: 42px; text-align: center; font-weight: 700; font-size: 13px; padding: 3px 8px; border-radius: 999px; background: color-mix(in srgb, var(--sold) 18%, transparent); color: var(--sold); }
.err-g pre { margin: 0; padding: 14px 16px; border-top: 1px solid var(--line); font-family: var(--mono); font-size: 11.5px; line-height: 1.5; overflow-x: auto; color: var(--ink-2); max-height: 360px; }
.err-g > .hint { padding: 0 16px 10px; }
.bar { height: 10px; border-radius: 999px; background: var(--paper-3); overflow: hidden; }
.bar i { display: block; height: 100%; background: var(--ink); border-radius: 999px; }
.bar i.hot { background: var(--sold); }
.svc { display: flex; gap: 10px; align-items: center; font-size: 14px; }
@media (max-width: 880px) { .adm-grid { grid-template-columns: 1fr; } .search { min-width: 0; width: 100%; } }

/* saldo de créditos (Créditos y plan) */
.balance { padding: 20px 22px; margin-bottom: 18px; }
.bal-top { display: flex; justify-content: space-between; align-items: center; gap: 16px; flex-wrap: wrap; }
.bal-top > div { display: flex; flex-direction: column; gap: 4px; }
.bal-top b { font-size: 34px; letter-spacing: -.045em; line-height: 1.05; }
.moves { margin-top: 16px; border-top: 1px solid var(--line); }
.moves > div { display: grid; grid-template-columns: 1fr auto 64px; gap: 12px; padding: 9px 0; border-bottom: 1px solid var(--line); font-size: 14px; align-items: baseline; }
.moves > div:last-child { border-bottom: 0; }
.moves b { text-align: right; font-variant-numeric: tabular-nums; }
.moves .neg { color: var(--ink-2); } .moves .pos { color: var(--ok); }

/* idioma */
.lang-row { display: flex; align-items: center; gap: 8px; margin: 8px 10px 10px; color: var(--ink-3); }
.lang-row svg { width: 15px; height: 15px; flex: none; }
.lang-sel { background: transparent; border: 0; color: var(--ink-2); font: inherit; font-size: 13px; cursor: pointer; padding: 2px 0; }
.lang-sel:focus { outline: none; color: var(--ink); }
.lang-sel option { background: var(--paper-2); color: var(--ink); }
.card.prefs { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 14px 18px; margin: 18px 0; }
.card.prefs .select { border: 1px solid var(--line-2); }

/* ------------------------------------------------------------- pulido ---- */
/* Entrada de pantallas */
.screen.enter { animation: screen-in .28s cubic-bezier(.2, .7, .2, 1) both; }
@keyframes screen-in { from { opacity: 0; transform: translateY(8px); } }
/* Fotos y videos aparecen sin parpadeo */
.tour .thumb img { opacity: 0; transition: opacity .35s; }
.tour .thumb img.ok { opacity: 1; }
.tour .thumb video { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; opacity: 0; transition: opacity .3s; }
.tour .thumb video.ok { opacity: 1; }
.tour .thumb .chip, .tour .thumb .dur { z-index: 1; }
/* Esqueletos mientras carga */
.tour.sk { cursor: default; pointer-events: none; }
.tour.sk .thumb, .tour.sk .meta i { background: linear-gradient(90deg, var(--paper-3) 0%, var(--paper-2) 40%, var(--paper-3) 80%); background-size: 300% 100%; animation: shimmer 1.3s linear infinite; }
.tour.sk .meta i { display: block; height: 12px; border-radius: 6px; margin: 4px 0 10px; width: 70%; }
.tour.sk .meta i + i { width: 45%; margin-bottom: 4px; }
@keyframes shimmer { from { background-position: 100% 0; } to { background-position: -50% 0; } }
/* Generando: cada toma aparece en su fila y la última, grande */
.seg .pair video { width: 112px; height: 63px; object-fit: cover; border-radius: 8px; background: #000; display: block; }
.seg.just { animation: seg-just 1.4s ease; }
@keyframes seg-just { 0% { border-color: var(--ok); box-shadow: 0 0 0 3px color-mix(in srgb, var(--ok) 25%, transparent); } 100% { border-color: var(--line); box-shadow: none; } }
.gen-top .latest { margin: 0 0 0 auto; flex: none; width: 240px; position: relative; }
.gen-top .latest video { width: 100%; aspect-ratio: 16 / 9; object-fit: cover; border-radius: 12px; background: #000; display: block; }
.gen-top .latest figcaption { position: absolute; left: 10px; top: 10px; font-size: 11px; font-weight: 700; padding: 3px 8px; border-radius: 999px; background: rgba(12,12,13,.72); color: #fff; }
.gen-top .latest.pop { animation: pop .5s cubic-bezier(.2, .7, .2, 1); }
@keyframes pop { from { opacity: 0; transform: scale(.96); } }
@media (max-width: 600px) { .gen-top .latest { margin: 0; width: 100%; } .seg .pair video { width: 88px; height: 50px; } }
@media (prefers-reduced-motion: reduce) {
  .screen.enter, .seg.just, .gen-top .latest.pop, .tour.sk .thumb, .tour.sk .meta i { animation: none; }
}
