:root {
  --bg: #f7f3ee;
  --surface: #fffdfa;
  --surface-2: #f0e9e1;
  --ink: #1f1a17;
  --ink-2: #5e5550;
  --muted: #736961;
  --line: #e4dbd1;
  --accent: #a65741;
  --accent-ink: #fff;
  --accent-soft: #f3e0d8;
  --gold: #b8935a;
  --ok: #4f7a5a;
  --danger: #b0413e;
  --shadow: 0 1px 2px rgba(40, 25, 15, .05), 0 8px 24px rgba(40, 25, 15, .06);
  --radius: 14px;
  --serif: "Cormorant Garamond", Georgia, serif;
  --sans: "Inter", system-ui, -apple-system, Segoe UI, sans-serif;
  color-scheme: light;
}
@media (prefers-color-scheme: dark) {
  :root {
    --bg: #161312; --surface: #1f1b19; --surface-2: #2a2421; --ink: #f3ece6; --ink-2: #cbbfb6;
    --muted: #978a81; --line: #3a322e; --accent: #d98a72; --accent-ink: #1a1210; --accent-soft: #3b2721;
    --shadow: 0 1px 2px rgba(0,0,0,.3), 0 8px 24px rgba(0,0,0,.25); color-scheme: dark;
  }
}
* { box-sizing: border-box; }
html, body { margin: 0; background: var(--bg); color: var(--ink); font-family: var(--sans); font-size: 15px; line-height: 1.5; }
h1, h2, h3 { font-family: var(--serif); font-weight: 600; letter-spacing: .01em; margin: 0 0 .4em; line-height: 1.1; }
h1 { font-size: 2.6rem; } h2 { font-size: 1.9rem; } h3 { font-size: 1.35rem; }
a { color: inherit; }
.hidden { display: none !important; }
.muted { color: var(--muted); } .tiny { font-size: .78rem; } .error { color: var(--danger); min-height: 1.2em; font-size: .9rem; margin: 0; }
.eyebrow { text-transform: uppercase; letter-spacing: .16em; font-size: .7rem; color: var(--muted); font-weight: 600; }

.check { flex-direction: row; align-items: center; gap: .5rem; font-weight: 400; margin-bottom: 1rem; cursor: pointer; }
.check input { width: auto; accent-color: var(--accent); }
/* Botones e inputs */
.btn { appearance: none; border: 1px solid var(--line); background: var(--surface); color: var(--ink); padding: .6rem 1.05rem;
  border-radius: 999px; font: 500 .9rem var(--sans); cursor: pointer; display: inline-flex; align-items: center; gap: .45rem;
  transition: transform .12s, background .2s, border-color .2s; white-space: nowrap; }
.btn:hover { border-color: var(--ink-2); } .btn:active { transform: scale(.97); }
.btn.primary { background: var(--ink); color: var(--bg); border-color: var(--ink); }
.btn.accent { background: var(--accent); color: var(--accent-ink); border-color: var(--accent); }
.btn.ghost { background: transparent; border-color: transparent; }
.btn.danger { color: var(--danger); }
.btn.small { padding: .35rem .7rem; font-size: .8rem; }
.btn.block { width: 100%; justify-content: center; padding: .8rem; }
.btn:disabled { opacity: .55; cursor: progress; }
.icon-btn { border: 0; background: transparent; cursor: pointer; font-size: 1.1rem; color: var(--ink-2); padding: .3rem .5rem; border-radius: 8px; }
.icon-btn:hover { background: var(--surface-2); }
label { display: flex; flex-direction: column; gap: .3rem; font-size: .82rem; font-weight: 500; color: var(--ink-2); }
input, select, textarea { font: 400 .95rem var(--sans); color: var(--ink); background: var(--surface); border: 1px solid var(--line);
  border-radius: 10px; padding: .6rem .75rem; outline: none; width: 100%; }
input:focus, select:focus, textarea:focus { border-color: var(--accent); box-shadow: 0 0 0 3px var(--accent-soft); }
textarea { resize: vertical; min-height: 70px; }

/* Acceso */
.auth { min-height: 100vh; display: grid; grid-template-columns: 1.1fr 1fr; }
.auth-art { background: radial-gradient(circle at 30% 20%, #e9c9b8, transparent 55%), radial-gradient(circle at 80% 80%, #c99a83, transparent 50%), #2a1f1b;
  color: #fbf3ec; display: flex; align-items: flex-end; padding: 3.5rem; }
.auth-art h1 { font-size: 4.5rem; margin: .2rem 0; font-style: italic; }
.auth-art p { font-size: 1.1rem; opacity: .85; }
.auth-art .brand-mark { font-size: 2rem; color: #f1c9a9; }
.auth-card { align-self: center; justify-self: center; width: min(380px, 90vw); display: flex; flex-direction: column; gap: 1rem; padding: 2rem 0; }
@media (max-width: 820px) { .auth { grid-template-columns: 1fr; } .auth-art { min-height: 34vh; padding: 2rem; } .auth-art h1 { font-size: 3rem; } }

/* Layout */
.app { display: grid; grid-template-columns: 232px 1fr; min-height: 100vh; }
.sidebar { position: sticky; top: 0; height: 100vh; border-right: 1px solid var(--line); padding: 1.6rem 1rem; display: flex; flex-direction: column; gap: .2rem; background: var(--surface); }
.brand { display: flex; align-items: center; gap: .5rem; font: italic 600 1.8rem var(--serif); padding: 0 .6rem 1.4rem; }
.brand-mark { color: var(--accent); font-style: normal; }
.nav { display: flex; align-items: center; gap: .8rem; padding: .62rem .8rem; border-radius: 10px; cursor: pointer; color: var(--ink-2); text-decoration: none; font-weight: 500; }

.nav:hover { background: var(--surface-2); } .nav.active { background: var(--ink); color: var(--bg); }
.view { padding: 2.2rem clamp(1rem, 3vw, 3rem) 6rem; max-width: 1320px; width: 100%; min-width: 0; }
.page-head { display: flex; justify-content: space-between; align-items: flex-end; gap: 1rem; flex-wrap: wrap; margin-bottom: 1.6rem; }
.page-head p { margin: 0; color: var(--muted); }
@media (max-width: 820px) {
  .app { grid-template-columns: 1fr; }
  .sidebar { position: fixed; bottom: 0; top: auto; height: auto; width: 100%; flex-direction: row; justify-content: space-around; z-index: 20;
    padding: .35rem .3rem calc(.35rem + env(safe-area-inset-bottom)); border-right: 0; border-top: 1px solid var(--line); }
  .brand { display: none; } .nav { flex-direction: column; gap: 0; font-size: .62rem; padding: .35rem .3rem; }
  .nav i { font-size: 1.1rem; } .view { padding: 1.2rem 1rem 6rem; } h1 { font-size: 2rem; }
}

/* Tarjetas */
.card { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: 1.3rem; box-shadow: var(--shadow); }
.grid-2 { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 1.2rem; }
.grid-3 { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 1.2rem; }
@media (max-width: 1000px) { .grid-3 { grid-template-columns: 1fr 1fr; } }
@media (max-width: 700px) { .grid-2, .grid-3 { grid-template-columns: 1fr; } }
.row { display: flex; gap: .6rem; align-items: center; flex-wrap: wrap; }
.stack { display: flex; flex-direction: column; gap: .9rem; }
.spacer { flex: 1; }

/* Hoy */
.hero { display: grid; grid-template-columns: 1.3fr 1fr; gap: 1.2rem; margin-bottom: 1.2rem; }
@media (max-width: 900px) { .hero { grid-template-columns: 1fr; } }
.weather { display: flex; gap: 1.2rem; align-items: center; }
.weather .temp { font: 600 3.4rem var(--serif); line-height: 1; }
.weather .icon { font-size: 2.6rem; }
.stat-row { display: flex; gap: 2rem; flex-wrap: wrap; }
.stat b { display: block; font: 600 2rem var(--serif); }

/* Armario */
.toolbar { display: flex; gap: .6rem; flex-wrap: wrap; align-items: center; margin-bottom: 1.2rem; }
.toolbar input[type=search] { max-width: 260px; }
.chips { display: flex; gap: .4rem; flex-wrap: wrap; }
.chip { border: 1px solid var(--line); background: var(--surface); border-radius: 999px; padding: .32rem .8rem; font-size: .8rem; cursor: pointer; color: var(--ink-2); user-select: none; }
.chip.on { background: var(--ink); color: var(--bg); border-color: var(--ink); }
.chip.static { cursor: default; }
.garment-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(170px, 1fr)); gap: 1rem; }
.garment { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); overflow: hidden; cursor: pointer; position: relative; transition: transform .15s, box-shadow .2s; }
.garment:hover { transform: translateY(-2px); box-shadow: var(--shadow); }
.garment .ph { aspect-ratio: 4/5; background: var(--surface-2); display: flex; align-items: center; justify-content: center; }
.garment img { width: 100%; height: 100%; object-fit: contain; }
.garment .meta { padding: .6rem .75rem .75rem; }
.garment .meta b { font-weight: 500; font-size: .88rem; display: block; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.garment .meta span { font-size: .74rem; color: var(--muted); }
.garment .fav { position: absolute; top: .45rem; right: .5rem; color: var(--accent); font-size: 1rem; }
.garment.selected { outline: 3px solid var(--accent); outline-offset: -3px; }
.dropzone { border: 1.5px dashed var(--line); border-radius: var(--radius); padding: 2.2rem 1rem; text-align: center; color: var(--muted); cursor: pointer; background: var(--surface); transition: border-color .2s, background .2s; }
.dropzone.over { border-color: var(--accent); background: var(--accent-soft); color: var(--ink); }
.empty { text-align: center; padding: 3rem 1rem; color: var(--muted); }
.empty h3 { color: var(--ink); }
.swatch { width: 14px; height: 14px; border-radius: 50%; display: inline-block; border: 1px solid rgba(0,0,0,.12); vertical-align: -2px; margin-right: .25rem; }

/* Look board */
.look { background: var(--surface); border: 1px solid var(--line); border-radius: 18px; overflow: hidden; box-shadow: var(--shadow); display: flex; flex-direction: column; }
.board { display: grid; grid-template-columns: 0.9fr 1.1fr; gap: 0; background: var(--surface-2); min-height: 320px; }
.board.no-model { grid-template-columns: 1fr; }
.board .model { position: relative; overflow: hidden; }
.board .model { background: #fff; display: flex; align-items: center; justify-content: center; }
.board .model img { width: 100%; height: 100%; object-fit: contain; display: block; cursor: zoom-in; }
.board .model .tryon-badge { position: absolute; top: .5rem; left: .5rem; z-index: 1; background: var(--accent); color: var(--accent-ink);
  font-size: .65rem; font-weight: 600; padding: .15rem .5rem; border-radius: 999px; }
.board .pieces { display: grid; grid-template-columns: 1fr 1fr; gap: 6px; padding: 6px; align-content: start; }
.board .piece { background: var(--surface); border-radius: 10px; aspect-ratio: 1; display: flex; align-items: center; justify-content: center; overflow: hidden; position: relative; }
.board .piece img { width: 92%; height: 92%; object-fit: contain; }
.board .piece small { position: absolute; bottom: 4px; left: 6px; right: 6px; font-size: .62rem; color: var(--muted); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.board .piece.big { grid-column: span 2; aspect-ratio: 2/1.2; }
.look .body { padding: 1.1rem 1.2rem 1.2rem; display: flex; flex-direction: column; gap: .6rem; flex: 1; }
.look .body h3 { margin: 0; }
.look .body p { margin: 0; color: var(--ink-2); font-size: .9rem; }
.look ul { margin: 0; padding-left: 1.1rem; color: var(--ink-2); font-size: .86rem; }
.look .missing { background: var(--accent-soft); border-radius: 10px; padding: .55rem .75rem; font-size: .82rem; }
.look .actions { display: flex; gap: .4rem; flex-wrap: wrap; margin-top: auto; padding-top: .4rem; }
.look-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(330px, 1fr)); gap: 1.2rem; }
@media (max-width: 420px) { .look-grid { grid-template-columns: 1fr; } }

/* Generador */
.gen { display: grid; grid-template-columns: 340px 1fr; gap: 1.4rem; align-items: start; }
@media (max-width: 1000px) { .gen { grid-template-columns: 1fr; } }
.gen-form { position: sticky; top: 1rem; }
.loading { display: flex; flex-direction: column; align-items: center; gap: 1rem; padding: 4rem 1rem; color: var(--muted); text-align: center; }
.spinner { width: 36px; height: 36px; border: 3px solid var(--line); border-top-color: var(--accent); border-radius: 50%; animation: spin 1s linear infinite; }
@keyframes spin { to { transform: rotate(360deg); } }

/* Chat */
.chat { display: flex; flex-direction: column; height: min(70vh, 640px); }
.chat-log { flex: 1; overflow-y: auto; display: flex; flex-direction: column; gap: .7rem; padding: .3rem .2rem 1rem; }
.msg { max-width: 85%; padding: .65rem .9rem; border-radius: 14px; font-size: .92rem; white-space: pre-wrap; }
.msg.user { align-self: flex-end; background: var(--ink); color: var(--bg); border-bottom-right-radius: 4px; }
.msg.assistant { align-self: flex-start; background: var(--surface-2); border-bottom-left-radius: 4px; }
.chat form { display: flex; gap: .5rem; }

/* Calendario */
.cal { display: grid; grid-template-columns: repeat(7, minmax(0, 1fr)); gap: 6px; }
.cal .dow { text-align: center; font-size: .72rem; text-transform: uppercase; letter-spacing: .1em; color: var(--muted); padding: .3rem 0; }
.cal .day { background: var(--surface); border: 1px solid var(--line); border-radius: 10px; min-height: 108px; padding: .4rem; cursor: pointer; display: flex; flex-direction: column; gap: .3rem; }
.cal .day:hover { border-color: var(--ink-2); }
.cal .day.other { opacity: .4; }
.cal .day.today { border-color: var(--accent); box-shadow: inset 0 0 0 1px var(--accent); }
.cal .day .n { font-size: .78rem; font-weight: 600; display: flex; justify-content: space-between; }
.cal .mini { display: grid; grid-template-columns: repeat(3, 1fr); gap: 2px; }
.cal .mini img { width: 100%; aspect-ratio: 1; object-fit: contain; background: var(--surface-2); border-radius: 4px; }
.cal .t { font-size: .68rem; color: var(--ink-2); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
@media (max-width: 700px) { .cal .day { min-height: 70px; } .cal .t { display: none; } }

/* Modelo */
.photo-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(130px, 1fr)); gap: .7rem; }
.photo { position: relative; border-radius: 12px; overflow: hidden; aspect-ratio: 3/4; background: var(--surface-2); }
.photo img { width: 100%; height: 100%; object-fit: cover; }
.photo .badge { position: absolute; top: .4rem; left: .4rem; background: var(--accent); color: var(--accent-ink); font-size: .65rem; padding: .15rem .45rem; border-radius: 999px; font-weight: 600; }
.photo .ops { position: absolute; bottom: .35rem; right: .35rem; display: flex; gap: .25rem; opacity: 0; transition: opacity .2s; }
.photo:hover .ops { opacity: 1; }
@media (hover: none) { .photo .ops { opacity: 1; } }
.photo .ops button { background: rgba(255,255,255,.92); color: #222; border: 0; border-radius: 8px; padding: .25rem .45rem; font-size: .72rem; cursor: pointer; }
.profile dl { display: grid; grid-template-columns: 160px 1fr; gap: .55rem 1rem; margin: 0; }
.profile dt { color: var(--muted); font-size: .82rem; } .profile dd { margin: 0; }
@media (max-width: 600px) { .profile dl { grid-template-columns: 1fr; } .profile dt { margin-top: .4rem; } }

/* Modal y toast */
.modal { position: fixed; inset: 0; z-index: 50; display: flex; align-items: center; justify-content: center; padding: 1rem; }
.modal-backdrop { position: absolute; inset: 0; background: rgba(20, 12, 8, .45); backdrop-filter: blur(3px); }
.modal-card { position: relative; background: var(--surface); border-radius: 18px; width: min(760px, 100%); max-height: 92vh; overflow-y: auto; padding: 1.6rem; box-shadow: 0 20px 60px rgba(0,0,0,.25); }
.modal-x { position: absolute; top: .8rem; right: .8rem; }
.edit-grid { display: grid; grid-template-columns: 240px 1fr; gap: 1.4rem; }
.edit-grid .ph { background: var(--surface-2); border-radius: 12px; aspect-ratio: 4/5; display: flex; align-items: center; justify-content: center; }
.edit-grid .ph img { max-width: 100%; max-height: 100%; object-fit: contain; }
@media (max-width: 640px) { .edit-grid { grid-template-columns: 1fr; } .edit-grid .ph { max-height: 260px; } }
.toast { position: fixed; bottom: 1.4rem; left: 50%; transform: translate(-50%, 150%); background: var(--ink); color: var(--bg); padding: .7rem 1.1rem;
  border-radius: 12px; font-size: .9rem; z-index: 60; transition: transform .3s; max-width: 90vw; }
.toast.show { transform: translate(-50%, 0); }
@media (max-width: 820px) { .toast { bottom: 5.5rem; } }
.studio { display: grid; grid-template-columns: 1.25fr 1fr; gap: 1.2rem; align-items: start; }
.studio-preview { position: sticky; top: 1rem; }
.studio-preview .board { min-height: 420px; }
@media (max-width: 900px) { .studio { grid-template-columns: 1fr; } .studio-preview { position: static; } }
.picker-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(110px, 1fr)); gap: .6rem; max-height: 50vh; overflow-y: auto; padding: .2rem; }
.picker-grid .garment .meta { padding: .35rem .5rem; }

/* ───────── Probador · modelo interactiva ───────── */
.atelier { display: grid; grid-template-columns: minmax(300px, 520px) minmax(0, 1fr); gap: 1.4rem; align-items: start; }
@media (max-width: 960px) { .atelier { grid-template-columns: minmax(0, 1fr); } }
.stage-col { position: sticky; top: 1rem; }
@media (max-width: 960px) { .stage-col { position: static; } }
.stage { position: relative; aspect-ratio: 3 / 4; background: #fff; border-radius: 20px; overflow: hidden; box-shadow: var(--shadow); border: 1px solid var(--line); }
.stage img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: contain; background: #fff; }
.stage img.fade { animation: stagefade .45s ease; }
@keyframes stagefade { from { opacity: 0; filter: blur(6px); } to { opacity: 1; filter: none; } }
.stage-busy { position: absolute; left: 50%; bottom: 1rem; transform: translateX(-50%); background: rgba(20,14,10,.78); color: #fff; padding: .55rem .9rem;
  border-radius: 999px; display: flex; gap: .55rem; align-items: center; font-size: .82rem; backdrop-filter: blur(4px); white-space: nowrap; max-width: 92%; }
.stage-busy .spinner { width: 16px; height: 16px; border-width: 2px; border-color: rgba(255,255,255,.3); border-top-color: #fff; }
.stage-split { position: absolute; inset: auto 0 0 0; padding: .6rem 1rem; z-index: 2; }
.stage-split input { width: 100%; accent-color: var(--accent); }
.stage-tags { position: absolute; top: .7rem; left: .7rem; right: .7rem; display: flex; flex-wrap: wrap; gap: .3rem; pointer-events: none; }
.stage-tags span { background: rgba(255,255,255,.88); color: #222; font-size: .68rem; padding: .15rem .5rem; border-radius: 999px; }
.stage-bar { display: flex; gap: .4rem; align-items: center; flex-wrap: wrap; margin-top: .8rem; }
.seg { display: inline-flex; border: 1px solid var(--line); border-radius: 999px; overflow: hidden; }
.seg button { border: 0; background: var(--surface); color: var(--ink-2); padding: .4rem .8rem; font: 500 .8rem var(--sans); cursor: pointer; }
.seg button.on { background: var(--ink); color: var(--bg); }
.seg button:disabled { opacity: .45; cursor: not-allowed; }
.history { display: flex; gap: .4rem; overflow-x: auto; padding: .7rem 0 .2rem; }
.hthumb { position: relative; flex: 0 0 auto; width: 58px; aspect-ratio: 3/4; border-radius: 8px; overflow: hidden; border: 1px solid var(--line); background: #fff; padding: 0; cursor: pointer; }
.hthumb img { width: 100%; height: 100%; object-fit: cover; }
.hthumb i { position: absolute; top: 2px; right: 3px; font-style: normal; font-size: .7rem; }
.rails { display: flex; flex-direction: column; gap: .9rem; min-width: 0; }
.rail { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: .7rem .8rem; }
.rail-h { display: flex; align-items: center; gap: .5rem; margin-bottom: .5rem; }
.rail-h [data-name] { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; max-width: 45%; }
.rail-items { display: flex; gap: .5rem; overflow-x: auto; scroll-snap-type: x proximity; padding-bottom: .3rem; }
.chipg { flex: 0 0 auto; width: 84px; aspect-ratio: 4/5; border-radius: 10px; background: #fff; border: 2px solid transparent; padding: 3px; cursor: pointer;
  scroll-snap-align: center; transition: transform .12s, border-color .15s; }
.chipg img { width: 100%; height: 100%; object-fit: contain; }
.chipg:hover { transform: translateY(-2px); }
.chipg.on { border-color: var(--accent); box-shadow: 0 0 0 3px var(--accent-soft); }

/* ═════════════ Mejoras UI/UX (pulido) ═════════════ */
:root { --focus: #a65741; --ease: cubic-bezier(.2, .7, .2, 1); --stage-bg: radial-gradient(120% 80% at 50% 0%, #fff 55%, #f6f1ea 100%); }
@media (prefers-color-scheme: dark) { :root { --focus: #e7a48e; --stage-bg: radial-gradient(120% 80% at 50% 0%, #fff 55%, #efe8e0 100%); } }

/* Accesibilidad: foco visible y movimiento reducido */
:focus { outline: none; }
:focus-visible { outline: 2px solid var(--focus); outline-offset: 2px; border-radius: 6px; }
.btn:focus-visible, .chip:focus-visible, .seg button:focus-visible { outline-offset: 3px; border-radius: 999px; }
.garment:focus-visible, .chipg:focus-visible, .hthumb:focus-visible { outline: 3px solid var(--focus); outline-offset: 2px; }
input:focus-visible, select:focus-visible, textarea:focus-visible { outline: none; }
::selection { background: var(--accent-soft); }
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: .01ms !important; animation-iteration-count: 1 !important; transition-duration: .01ms !important; scroll-behavior: auto !important; }
}
body.modal-open { overflow: hidden; }
.muted a, .card a:not(.btn) { color: var(--accent); text-underline-offset: 2px; }
kbd { font: 500 .72rem var(--sans); border: 1px solid var(--line); border-bottom-width: 2px; border-radius: 5px; padding: 0 .3rem; background: var(--surface); color: var(--ink-2); }
a.btn { text-decoration: none; }
.btn.accent:hover { filter: brightness(1.06); }
.btn.primary:hover { opacity: .9; }
.btn.on { background: var(--ink); color: var(--bg); border-color: var(--ink); }
.view-loading { display: flex; justify-content: center; padding: 5rem 0; opacity: 0; animation: fadein .3s .25s forwards; }
@keyframes fadein { to { opacity: 1; } }
.view > * { animation: viewin .35s var(--ease) backwards; }
@keyframes viewin { from { opacity: 0; translate: 0 6px; } }

/* Navegación con iconos SVG */
.ico { width: 20px; height: 20px; fill: none; stroke: currentColor; stroke-width: 1.6; stroke-linecap: round; stroke-linejoin: round; flex: 0 0 auto; }
.nav, .navmore { transition: background .2s, color .2s; }
.nav .ico { opacity: .85; }
.nav.active .ico { opacity: 1; }
.nav .lbl-short { display: none; }
.nav-extra { display: contents; }
.navmore { display: none; }
@media (min-width: 821px) {
  .sidebar .nav-extra .nav:first-child { position: relative; margin-top: .9rem; }
  .sidebar .nav-extra .nav:first-child::before { content: ""; position: absolute; left: .8rem; right: .8rem; top: -.5rem; border-top: 1px solid var(--line); }
}
@media (max-width: 820px) {
  .sidebar { justify-content: space-between; gap: 0; padding: .3rem .25rem calc(.3rem + env(safe-area-inset-bottom));
    background: color-mix(in srgb, var(--surface) 90%, transparent); backdrop-filter: saturate(1.4) blur(12px); -webkit-backdrop-filter: saturate(1.4) blur(12px); }
  .sidebar > .nav, .navmore { flex: 1 1 0; min-width: 0; flex-direction: column; gap: .15rem; font-size: .66rem; padding: .4rem .1rem; border-radius: 12px; }
  .sidebar > .nav span, .navmore span { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; max-width: 100%; }
  .nav .ico, .navmore .ico { width: 22px; height: 22px; }
  .nav .lbl-long { display: none; } .nav .lbl-short { display: inline; }
  .sidebar > .nav.active, .navmore.active { background: transparent; color: var(--accent); }
  .sidebar > .nav.active .ico, .navmore.active .ico { stroke-width: 2; }
  .navmore { display: flex; align-items: center; border: 0; background: transparent; color: var(--ink-2); font: 500 .66rem var(--sans); cursor: pointer; }
  .nav-extra { display: none; position: fixed; right: .6rem; bottom: calc(4.4rem + env(safe-area-inset-bottom)); z-index: 30; min-width: 200px;
    background: var(--surface); border: 1px solid var(--line); border-radius: 16px; box-shadow: 0 14px 40px rgba(20, 12, 8, .22); padding: .4rem; flex-direction: column; gap: .1rem; }
  .sidebar.more-open .nav-extra { display: flex; animation: menuin .18s var(--ease); }
  .sidebar.more-open .navmore { color: var(--ink); background: var(--surface-2); }
  .nav-extra .nav { flex-direction: row; gap: .7rem; font-size: .92rem; padding: .7rem .8rem; }
  .nav-extra .nav.active { background: var(--accent-soft); color: var(--ink); }
  .toast { bottom: calc(5.2rem + env(safe-area-inset-bottom)); }
}
@keyframes menuin { from { opacity: 0; transform: translateY(8px) scale(.98); } }

/* Hoy */
.hero > .card:first-child { background: linear-gradient(180deg, var(--surface) 0%, color-mix(in srgb, var(--accent-soft) 35%, var(--surface)) 100%); }
.hero .board { border-radius: 12px; overflow: hidden; }

/* Armario */
.dropzone { display: flex; flex-direction: column; align-items: center; gap: .35rem; padding: 2.2rem 1rem; margin-bottom: 1.2rem;
  border: 1.5px dashed color-mix(in srgb, var(--accent) 45%, var(--line)); background: color-mix(in srgb, var(--accent-soft) 30%, var(--surface)); }
.dropzone.hidden { display: none !important; }
.dropzone b { color: var(--ink); font-size: 1rem; }
.dropzone u { color: var(--accent); text-underline-offset: 3px; }
.dropzone:hover { border-color: var(--accent); }
.dz-icon { width: 52px; height: 52px; border-radius: 50%; display: grid; place-items: center; background: var(--surface); color: var(--accent); box-shadow: var(--shadow); margin-bottom: .3rem; transition: transform .25s var(--ease); }
.dz-icon .ico { width: 24px; height: 24px; }
.dropzone.over .dz-icon { transform: translateY(-4px) scale(1.06); }
.upload-prog { margin-bottom: 1rem; display: flex; flex-direction: column; gap: .7rem; }
.bar { height: 4px; border-radius: 99px; background: var(--surface-2); overflow: hidden; }
.bar i { display: block; height: 100%; background: var(--accent); border-radius: inherit; transition: width .4s var(--ease); min-width: 6%; }
.toolbar input[type=search] { flex: 1 1 220px; max-width: 320px; }
.toolbar select { width: auto; max-width: 190px; }
.chip { transition: background .15s, border-color .15s, color .15s; }
.chip:not(.static):not(.on):hover { border-color: var(--ink-2); color: var(--ink); }
.garment { transition: transform .2s var(--ease), box-shadow .2s, border-color .2s; }
.garment:hover { border-color: color-mix(in srgb, var(--ink-2) 40%, var(--line)); }
.garment .ph { background: #fff; overflow: hidden; }
.garment .ph img { transition: transform .35s var(--ease); }
.garment:hover .ph img { transform: scale(1.04); }
.garment .fav { z-index: 1; width: 26px; height: 26px; display: grid; place-items: center; border-radius: 50%; background: rgba(255,255,255,.9); font-size: .85rem; top: .5rem; right: .5rem; box-shadow: 0 1px 4px rgba(0,0,0,.08); }
.garment.selected { outline: 0; border-color: var(--accent); box-shadow: 0 0 0 3px var(--accent-soft); }
.garment.selected::after { content: "✓"; position: absolute; top: .5rem; left: .5rem; width: 24px; height: 24px; border-radius: 50%; background: var(--accent); color: var(--accent-ink);
  display: grid; place-items: center; font-size: .8rem; font-weight: 700; }
@media (max-width: 700px) {
  .chips.scroll-x, #tabs { flex-wrap: nowrap; overflow-x: auto; scrollbar-width: none; margin-inline: -1rem; padding-inline: 1rem; scroll-padding-inline: 1rem;
    -webkit-mask-image: linear-gradient(90deg, transparent 0, #000 1rem, #000 calc(100% - 1.5rem), transparent); mask-image: linear-gradient(90deg, transparent 0, #000 1rem, #000 calc(100% - 1.5rem), transparent); }
  .chips.scroll-x::-webkit-scrollbar, #tabs::-webkit-scrollbar { display: none; }
  .chips.scroll-x .chip, #tabs .chip { flex: 0 0 auto; white-space: nowrap; }
  #tabs { padding-bottom: 2px; width: calc(100% + 2rem); }
  .toolbar input[type=search] { max-width: none; flex-basis: 100%; }
  .toolbar select { flex: 1; max-width: none; }
  .garment-grid { grid-template-columns: repeat(auto-fill, minmax(140px, 1fr)); gap: .7rem; }
  .page-head { margin-bottom: 1.1rem; }
}

/* Estados vacíos */
.empty-cta { display: flex; flex-direction: column; align-items: center; gap: .3rem; }
.empty-cta p { max-width: 42ch; margin: 0 auto .8rem; }
.empty-ico { width: 56px; height: 56px; border-radius: 50%; display: grid; place-items: center; font-size: 1.5rem; color: var(--accent); background: var(--accent-soft); margin-bottom: .4rem; }

/* Looks */
.look { transition: transform .2s var(--ease), box-shadow .25s, border-color .2s; }
.look:hover { box-shadow: 0 2px 4px rgba(40, 25, 15, .06), 0 16px 40px rgba(40, 25, 15, .1); }
.look[data-pick]:hover { transform: translateY(-2px); border-color: var(--accent); }
.look .body h3 { font-size: 1.45rem; }
.look .actions { border-top: 1px solid var(--line); padding-top: .8rem; }
.board .piece { background: #fff; }
.board .piece small { background: linear-gradient(transparent, rgba(255,255,255,.95) 40%); color: #6b625c; padding: .6rem .2rem 0; bottom: 3px; }

/* ───────── Probador ───────── */
.stage { background: var(--stage-bg); border-radius: 22px; box-shadow: 0 2px 6px rgba(40,25,15,.05), 0 24px 60px -20px rgba(40,25,15,.25); isolation: isolate; }
.stage::after { content: ""; position: absolute; inset: 0; border-radius: inherit; box-shadow: inset 0 0 0 1px rgba(0,0,0,.04), inset 0 -60px 80px -60px rgba(60,40,25,.12); pointer-events: none; z-index: 3; }
.stage img { transition: filter .4s var(--ease); }
.stage img.fade { animation: stagefade .5s var(--ease); }
@keyframes stagefade { from { opacity: 0; filter: blur(8px) saturate(.8); transform: scale(1.01); } to { opacity: 1; filter: none; transform: none; } }
.stage.is-busy img { filter: saturate(.85) brightness(.98); }
.stage-shimmer { position: absolute; inset: 0; z-index: 2; pointer-events: none; opacity: 0; transition: opacity .3s;
  background: linear-gradient(105deg, transparent 35%, rgba(255,255,255,.55) 50%, transparent 65%); background-size: 250% 100%; }
.stage.is-busy .stage-shimmer { opacity: 1; animation: shimmer 1.8s linear infinite; }
@keyframes shimmer { from { background-position: 130% 0; } to { background-position: -30% 0; } }
.stage-busy { top: 1rem; bottom: auto; z-index: 6; box-shadow: 0 6px 20px rgba(0,0,0,.18); }
.stage-tags { top: auto; bottom: .8rem; z-index: 4; }
.stage-tags span { background: rgba(255,255,255,.92); box-shadow: 0 1px 3px rgba(0,0,0,.08); padding: .2rem .6rem; font-size: .7rem; max-width: 100%; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.stage.splitting .stage-tags { display: none; }
/* Antes / después */
.stage-split { z-index: 5; padding: 0; inset: 0; }
.stage-split input { position: absolute; inset: 0; width: 100%; height: 100%; opacity: 0; cursor: ew-resize; margin: 0; }
.split-line, .split-lbl { display: none; }
.stage.splitting .split-line { display: block; position: absolute; top: 0; bottom: 0; left: var(--split, 50%); width: 2px; margin-left: -1px; background: #fff; z-index: 4; box-shadow: 0 0 0 1px rgba(0,0,0,.08), 0 0 12px rgba(0,0,0,.15); pointer-events: none; }
.split-knob { position: absolute; top: 50%; left: 50%; transform: translate(-50%, -50%); width: 38px; height: 38px; border-radius: 50%; background: #fff; color: #333;
  display: grid; place-items: center; font-size: .8rem; font-weight: 600; letter-spacing: -.05em; box-shadow: 0 4px 14px rgba(0,0,0,.2); }
.stage.splitting:has(#splitr:focus-visible) .split-knob { outline: 3px solid var(--focus); outline-offset: 2px; }
.stage.splitting .split-lbl { display: block; position: absolute; top: .8rem; z-index: 4; pointer-events: none; font-size: .65rem; font-weight: 600; letter-spacing: .14em; text-transform: uppercase;
  background: rgba(20,14,10,.7); color: #fff; padding: .25rem .6rem; border-radius: 999px; }
.split-lbl-a { left: .8rem; } .split-lbl-b { right: .8rem; }
.stage.splitting .stage-busy { top: 3rem; }
/* Barra de controles */
.stage-bar { gap: .5rem; }
.stage-actions { display: flex; gap: .4rem; flex-wrap: wrap; justify-content: flex-end; }
.seg { background: var(--surface); padding: 2px; gap: 2px; }
.seg button { border-radius: 999px; transition: background .15s, color .15s; }
.seg button:not(.on):not(:disabled):hover { background: var(--surface-2); color: var(--ink); }
.switch { font-size: .8rem; color: var(--ink-2); user-select: none; }
.history-wrap { margin-top: 1rem; }
.history-wrap .eyebrow { margin-bottom: .1rem; }
.history-wrap:has(.history:empty) { display: none; }
.history { scrollbar-width: thin; }
.hthumb { width: 54px; border-radius: 10px; transition: transform .15s var(--ease), border-color .15s; }
.hthumb:hover { transform: translateY(-2px); border-color: var(--accent); }
.hthumb i { background: rgba(255,255,255,.9); border-radius: 50%; width: 16px; height: 16px; display: grid; place-items: center; top: 3px; right: 3px; font-size: .6rem; }
/* Rieles */
.rail { padding: .75rem .85rem .6rem; transition: border-color .2s, box-shadow .2s; }
.rail.has-sel { border-color: color-mix(in srgb, var(--accent) 40%, var(--line)); }
.rail-h b { font-family: var(--serif); font-size: 1.15rem; font-weight: 600; }
.rail-sel { max-width: 45%; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; color: var(--ink-2); }
.rail.has-sel .rail-sel { background: var(--accent-soft); color: var(--ink); padding: .1rem .55rem; border-radius: 999px; }
.rail-h .icon-btn { width: 32px; height: 32px; display: grid; place-items: center; padding: 0; border-radius: 50%; font-size: 1rem; }
.rail-h [data-clear] { font-size: .8rem; }
.rail:not(.has-sel) [data-clear] { visibility: hidden; }
.rail-items { padding: 6px 6px .45rem 2px; scrollbar-width: thin; scrollbar-color: var(--line) transparent; }
.chipg { position: relative; border: 1px solid var(--line); border-radius: 12px; transition: transform .18s var(--ease), border-color .15s, box-shadow .15s; }
.chipg:hover { transform: translateY(-2px); border-color: color-mix(in srgb, var(--ink-2) 50%, var(--line)); box-shadow: 0 6px 14px -6px rgba(40,25,15,.25); }
.chipg.on { border: 2px solid var(--accent); padding: 2px; box-shadow: 0 0 0 3px var(--accent-soft); }
.chipg.on::after { content: "✓"; position: absolute; top: -6px; right: -6px; width: 20px; height: 20px; border-radius: 50%; background: var(--accent); color: var(--accent-ink);
  font-size: .7rem; font-weight: 700; display: grid; place-items: center; box-shadow: 0 0 0 2px var(--surface); }
.kbd-hint { margin: 0; }
@media (hover: none) { .kbd-hint { display: none; } }
/* Resumen fijo (móvil) */
.stage-mini { display: none; }
@media (max-width: 960px) {
  .stage { aspect-ratio: auto; height: min(64vh, 620px); max-width: 520px; margin-inline: auto; }
  .stage-col { max-width: 560px; width: 100%; margin-inline: auto; }
  .stage-mini { display: flex; position: fixed; z-index: 25; top: calc(.5rem + env(safe-area-inset-top)); left: .75rem; right: .75rem; align-items: center; gap: .7rem;
    padding: .4rem .8rem .4rem .4rem; border: 1px solid var(--line); border-radius: 16px; text-align: left; cursor: pointer; color: var(--ink);
    background: color-mix(in srgb, var(--surface) 92%, transparent); backdrop-filter: blur(12px); -webkit-backdrop-filter: blur(12px); box-shadow: 0 10px 30px rgba(20,12,8,.18);
    transform: translateY(calc(-100% - 1.5rem)); opacity: 0; pointer-events: none; transition: transform .3s var(--ease), opacity .25s; font: inherit; }
  .stage-mini.show { transform: none; opacity: 1; pointer-events: auto; }
  .mini-ph { position: relative; width: 42px; height: 56px; border-radius: 9px; overflow: hidden; background: #fff; flex: 0 0 auto; }
  .mini-ph img { width: 100%; height: 100%; object-fit: cover; object-position: top; }
  .mini-ph .spinner { display: none; position: absolute; inset: 0; margin: auto; width: 20px; height: 20px; border-width: 2px; }
  .stage-mini.is-busy .mini-ph .spinner { display: block; }
  .stage-mini.is-busy .mini-ph img { opacity: .5; }
  .mini-txt { flex: 1; min-width: 0; display: flex; flex-direction: column; line-height: 1.3; }
  .mini-txt span { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
  .mini-go { width: 30px; height: 30px; border-radius: 50%; display: grid; place-items: center; background: var(--surface-2); color: var(--ink-2); flex: 0 0 auto; }
}
@media (max-width: 520px) {
  .stage { height: min(60vh, 560px); border-radius: 18px; }
  .stage-bar { row-gap: .6rem; }
  .stage-bar .spacer { display: none; }
  .stage-actions { width: 100%; }
  .stage-actions .btn { flex: 1 1 auto; justify-content: center; }
  .chipg { width: 76px; }
}
/* Guardar look (modal) */
.save-look { display: flex; gap: 1.2rem; align-items: flex-start; margin-top: .6rem; }
.save-look-ph { width: 130px; aspect-ratio: 3/4; object-fit: cover; object-position: top; border-radius: 12px; background: #fff; border: 1px solid var(--line); flex: 0 0 auto; }
@media (max-width: 520px) { .save-look-ph { width: 90px; } }
@media (max-width: 640px) {
  .modal { align-items: flex-end; padding: 0; }
  .modal-card { border-radius: 20px 20px 0 0; max-height: 90vh; padding: 1.4rem 1.1rem calc(1.4rem + env(safe-area-inset-bottom)); animation: sheetin .28s var(--ease); }
}
@keyframes sheetin { from { transform: translateY(30px); opacity: .4; } }
.modal-card > div > h3:first-child, .modal-card > div > h2:first-child { padding-right: 2.2rem; }

/* Fase 2 del probador: indicador de nitidez HD */
.hd-badge { position: absolute; right: .7rem; bottom: .7rem; z-index: 3; background: rgba(20,14,10,.72); color: #fff; font-size: .72rem;
  padding: .25rem .6rem; border-radius: 999px; backdrop-filter: blur(4px); pointer-events: none; transition: background .3s; }
.hd-badge.done { background: var(--accent); color: var(--accent-ink); font-weight: 600; letter-spacing: .04em; }

/* Vista previa instantánea: prendas recortadas sobre la modelo */
.doll { position: absolute; z-index: 1; pointer-events: none; animation: dollin .18s ease; }
.doll img { position: absolute; inset: auto; width: auto; height: auto; object-fit: fill; background: transparent !important; filter: drop-shadow(0 2px 4px rgba(0,0,0,.18)); }
.doll-tag { position: absolute; left: 50%; top: 1.5%; transform: translateX(-50%); background: rgba(20,14,10,.7); color: #fff; font-size: .68rem;
  padding: .2rem .6rem; border-radius: 999px; white-space: nowrap; }
@keyframes dollin { from { opacity: 0; transform: scale(.985); } to { opacity: 1; transform: none; } }

/* Diálogo de confirmación */
.confirm { position: fixed; inset: 0; z-index: 80; display: flex; align-items: center; justify-content: center; padding: 1rem;
  background: rgba(20, 12, 8, .5); backdrop-filter: blur(3px); animation: dollin .15s ease; }
.confirm-card { background: var(--surface); border-radius: 16px; padding: 1.3rem 1.4rem; width: min(420px, 100%); box-shadow: 0 20px 60px rgba(0,0,0,.3); }
.confirm-card p { margin: 0 0 1.1rem; font-size: 1rem; }
.btn.danger-solid { background: var(--danger); border-color: var(--danger); color: #fff; }

/* Selección múltiple en el armario */
.selbar { position: sticky; top: .5rem; z-index: 5; display: flex; flex-wrap: wrap; gap: .4rem; align-items: center; background: var(--surface);
  border: 1px solid var(--accent); border-radius: 14px; padding: .55rem .8rem; margin-bottom: 1rem; box-shadow: var(--shadow); }

/* Primeros pasos */
.onboarding { margin-bottom: 1.2rem; border-color: var(--accent); }
.onb-list { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); gap: .45rem .9rem; }
.onb-list li { display: flex; gap: .55rem; align-items: center; font-size: .9rem; }
.onb-list li span { flex: 0 0 auto; width: 1.35rem; height: 1.35rem; border-radius: 50%; border: 1.5px solid var(--line); display: grid; place-items: center; font-size: .75rem; }
.onb-list li.ok span { background: var(--ok); border-color: var(--ok); color: #fff; }
.onb-list li.ok a { color: var(--muted); text-decoration: line-through; }
.onb-list li.next span { border-color: var(--accent); box-shadow: 0 0 0 3px var(--accent-soft); }
.onb-list a { text-decoration: none; }

/* Preparación del probador (armario) */
.prepline { font-size: .82rem; color: var(--muted); display: flex; gap: .45rem; align-items: center; flex-wrap: wrap; margin: .15rem 0 0; min-height: 1.2em; }
.prepline a { color: var(--accent); }
.garment.pending .ph::after { content: "Looks pendientes"; position: absolute; left: .45rem; bottom: .45rem; font-size: .66rem; letter-spacing: .02em; padding: .18rem .5rem; border-radius: 999px; background: rgba(20,16,14,.72); color: #fff; }
.garment .ph { position: relative; }

/* ═════════ Tema "rosa suave" (sustituye a la paleta tierra) ═════════ */
:root {
  --bg: #fdf5f6; --surface: #fffbfb; --surface-2: #f9e9ec; --ink: #3b2a30; --ink-2: #6a555c; --muted: #7d676e; --line: #f1dde1;
  --accent: #c0527a; --accent-ink: #fff; --accent-soft: #fbe2ea; --gold: #c9a27a; --focus: #c0527a;
  --shadow: 0 1px 2px rgba(120, 50, 75, .05), 0 10px 30px rgba(120, 50, 75, .08); --radius: 22px;
  --stage-bg: radial-gradient(120% 80% at 50% 0%, #fff 55%, #fdeef2 100%);
}
@media (prefers-color-scheme: dark) {
  :root { --bg: #1b1417; --surface: #251c20; --surface-2: #32262b; --ink: #f7ecef; --ink-2: #d6c3c9; --muted: #a8949b; --line: #43343a;
    --accent: #ee93b1; --accent-ink: #2b1119; --accent-soft: #48262f; --focus: #ee93b1;
    --shadow: 0 1px 2px rgba(0,0,0,.3), 0 10px 30px rgba(0,0,0,.28);
    --stage-bg: radial-gradient(120% 80% at 50% 0%, #fff 55%, #fbeaf0 100%); }
}
h1 { font-style: italic; font-weight: 500; letter-spacing: 0; }
.eyebrow { color: var(--accent); letter-spacing: .14em; }
.btn.primary { background: var(--accent); border-color: var(--accent); color: var(--accent-ink); }
.btn:hover { border-color: var(--accent); }
input, select, textarea { border-radius: 14px; }
.card { border-color: transparent; }
.nav { border-radius: 999px; padding: .62rem 1rem; }
.nav.active { background: var(--accent-soft); color: var(--accent); }
.chip.on { background: var(--accent); border-color: var(--accent); color: var(--accent-ink); }
.garment, .look { border-radius: var(--radius); }
.auth-art { background: radial-gradient(circle at 25% 20%, #ffd9e4, transparent 55%), radial-gradient(circle at 80% 85%, #f3a9c0, transparent 55%), #b85c7f; color: #fff7f9; }
.auth-art .brand-mark { color: #ffe3ec; }
.hero > .card:first-child { background: linear-gradient(180deg, var(--surface) 0%, color-mix(in srgb, var(--accent-soft) 55%, var(--surface)) 100%); }
.quick { display: block; position: relative; text-decoration: none; color: inherit; transition: transform .15s var(--ease); }
.quick:hover { transform: translateY(-2px); }
.quick h3 { margin: .2rem 0 .1rem; } .quick p { margin: 0; padding-right: 2.5rem; }
.quick-go { position: absolute; right: 1.2rem; bottom: 1.1rem; width: 2.2rem; height: 2.2rem; border-radius: 50%; display: grid; place-items: center; background: var(--accent); color: var(--accent-ink); }

/* Menú de escritorio: lo esencial a la vista, lo demás plegado bajo "Más" */
@media (min-width: 821px) {
  .sidebar { border-right: 0; background: var(--bg); padding: 1.8rem 1rem; gap: .3rem; }
  .brand { padding-bottom: 1.6rem; }
  .navmore { display: flex; order: 1; align-items: center; gap: .8rem; margin-top: .9rem; padding: .62rem 1rem; border: 0; border-radius: 999px; background: transparent;
    color: var(--muted); font: 500 .95rem var(--sans); cursor: pointer; text-align: left; }
  .navmore:hover { background: var(--surface-2); color: var(--ink); }
  .navmore.active { color: var(--muted); }
  .nav-extra { display: none; order: 2; flex-direction: column; gap: .15rem; padding-left: .5rem; }
  .sidebar.more-open .nav-extra, .sidebar:has(.nav-extra .nav.active) .nav-extra { display: flex; }
  .nav-extra .nav { font-size: .9rem; padding: .5rem 1rem; }
  .sidebar .nav-extra .nav:first-child { margin-top: 0; }
  .sidebar .nav-extra .nav:first-child::before { content: none; }
}
@media (max-width: 820px) {
  .nav-extra .nav.active { background: var(--accent-soft); color: var(--accent); }
  .nav-extra { border-radius: 22px; }
}

/* ═════════ Probador: zona de juego (dado, planes) ═════════ */
.play { display: flex; gap: .7rem; align-items: center; flex-wrap: wrap; margin-top: .9rem; }
.dice { font-size: 1rem; padding: .75rem 1.3rem; box-shadow: 0 8px 22px color-mix(in srgb, var(--accent) 35%, transparent); }
.dice:hover { transform: translateY(-1px) rotate(-1deg); }
.dice-ico { display: inline-block; font-size: 1.25rem; line-height: 1; }
.dice.rolling .dice-ico, .mood.rolling span { animation: diceroll .55s linear infinite; }
@keyframes diceroll { 0% { transform: rotate(0) scale(1); } 50% { transform: rotate(180deg) scale(1.25); } 100% { transform: rotate(360deg) scale(1); } }
.moods { display: flex; gap: .45rem; flex-wrap: wrap; }
.mood { appearance: none; border: 1px solid var(--line); background: var(--surface); color: var(--ink-2); border-radius: 999px; padding: .5rem .9rem;
  font: 500 .86rem var(--sans); cursor: pointer; display: inline-flex; gap: .4rem; align-items: center; transition: transform .15s var(--ease), background .2s, border-color .2s, color .2s; }
.mood span { display: inline-block; }
.mood:hover { transform: translateY(-2px); border-color: var(--accent); color: var(--ink); }
.mood.on { background: var(--accent-soft); border-color: var(--accent); color: var(--accent); }
.mood:focus-visible { outline: 2px solid var(--focus); outline-offset: 3px; }
.stage.rolling { box-shadow: 0 0 0 3px var(--accent-soft), var(--shadow); }
.chipg.on { transition: transform .12s var(--ease); transform: scale(1.06); }
.hearts { position: relative; height: 0; pointer-events: none; }
.hearts i { position: absolute; left: var(--x); bottom: 0; font-style: normal; color: var(--accent); font-size: calc(1.1rem * var(--s)); opacity: 0;
  animation: heartup 1.6s var(--ease) var(--d) forwards; }
@keyframes heartup { 0% { opacity: 0; transform: translateY(0) scale(.6); } 20% { opacity: 1; } 100% { opacity: 0; transform: translateY(-260px) scale(1.2) rotate(12deg); } }
@media (max-width: 820px) {
  .play { gap: .55rem; } .dice { width: 100%; justify-content: center; }
  .moods { flex-wrap: nowrap; overflow-x: auto; padding-bottom: .2rem; scrollbar-width: none; width: 100%; } .moods::-webkit-scrollbar { display: none; }
  .mood { flex: 0 0 auto; }
}
@media (prefers-reduced-motion: reduce) { .dice.rolling .dice-ico, .mood.rolling span, .hearts i { animation: none; } }

/* Duelo de looks y pasarela */
.duel { display: grid; grid-template-columns: 1fr auto 1fr; gap: .8rem; align-items: center; margin-top: .6rem; }
.duel-card { appearance: none; border: 2px solid var(--line); background: var(--surface); border-radius: 20px; padding: .5rem; cursor: pointer; display: flex; flex-direction: column; gap: .4rem;
  align-items: center; font: 400 .78rem var(--sans); color: var(--ink-2); transition: transform .18s var(--ease), border-color .2s, box-shadow .2s; min-width: 0; }
.duel-card img { width: 100%; aspect-ratio: 2 / 3; object-fit: contain; background: #fff; border-radius: 14px; }
.duel-card span { display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; text-align: center; min-height: 2.3em; }
.duel-card b { color: var(--accent); font-size: .9rem; }
.duel-card:hover { transform: translateY(-4px); border-color: var(--accent); box-shadow: 0 12px 28px color-mix(in srgb, var(--accent) 25%, transparent); }
.duel-card.won { border-color: var(--accent); background: var(--accent-soft); transform: scale(1.03); }
.duel-vs { font: italic 600 1.4rem var(--serif); color: var(--accent); }
.duel-win { display: flex; gap: 1rem; align-items: center; flex-wrap: wrap; margin-top: .6rem; }
.duel-win img { width: min(220px, 45%); aspect-ratio: 2 / 3; object-fit: contain; background: #fff; border-radius: 16px; border: 2px solid var(--accent); }
.duel-win .stack { flex: 1 1 200px; }
.stage.runway { box-shadow: 0 0 0 3px var(--accent), var(--shadow); }
#runway.on { background: var(--accent); border-color: var(--accent); color: var(--accent-ink); }
@media (max-width: 520px) { .duel { gap: .4rem; } .duel-vs { font-size: 1rem; } }

/* Barra flotante de subida masiva */
.upbar { position: fixed; right: 1rem; bottom: 1rem; z-index: 40; width: min(420px, calc(100vw - 2rem)); background: var(--surface); border: 1px solid var(--line);
  border-radius: 18px; box-shadow: 0 14px 40px rgba(120, 50, 75, .22); padding: .8rem 1rem; display: flex; flex-direction: column; gap: .55rem; }
.upbar-row { display: flex; align-items: center; gap: .55rem; flex-wrap: wrap; font-size: .9rem; }
.upbar .bar { height: 6px; border-radius: 999px; background: var(--surface-2); overflow: hidden; }
.upbar .bar i { display: block; height: 100%; background: var(--accent); border-radius: 999px; transition: width .3s; }
#folder-btn { margin: .3rem 0 .1rem; }
@media (max-width: 820px) { .upbar { left: .6rem; right: .6rem; width: auto; bottom: calc(4.8rem + env(safe-area-inset-bottom)); } }
