/* La habitación del bebé (carril F7): estilos propios sobre los tokens y componentes de base.css.
   Móvil primero; a partir de 560 px de ancho de la propia vista (container query: sirve igual dentro de Compras,
   en tableta y en escritorio con el asistente al lado) los estilos, las ideas y el espacio van a dos columnas. */

.hab { container: hab / inline-size; display: flex; flex-direction: column; }
.hab-sec { margin-top: 26px; scroll-margin-top: calc(var(--topbar-h) + var(--safe-t) + 12px); }
.hab > .hab-sec:first-child, .hab > .card:first-child { margin-top: 0; }
.hab-head { margin-top: 0; }
.hab-head .sec-title { outline-offset: 4px; }
.hab-mini-h { margin: 14px 4px 2px; font-size: 13px; font-weight: 800; letter-spacing: .04em; text-transform: uppercase; color: var(--ink-2); }
.hab-count { flex: none; margin-left: auto; font-size: 13px; font-weight: 800; font-variant-numeric: tabular-nums; border-radius: 999px; padding: 3px 10px; background: var(--surface); color: var(--ink-2); }

/* ---------- 1. Cabecera ---------- */
.hab-hero { padding: 16px; }
.hab-hero-prog { display: flex; align-items: center; gap: 14px; }
.hab-hero-prog .ring-center { color: var(--sage-ink); }
.hab-hero-txt { min-width: 0; }
.hab-hero-k { font-size: 14px; font-weight: 800; color: var(--sage-ink); letter-spacing: -.005em; }
.hab-hero-big { font-size: 22px; line-height: 1.2; font-weight: 800; letter-spacing: -.015em; color: var(--ink); font-variant-numeric: tabular-nums; }
.hab-hero-parts { display: flex; flex-wrap: wrap; gap: 2px 12px; margin-top: 4px; font-size: 14px; font-weight: 700; color: var(--ink-2); }
.hab-part b { color: var(--ink); font-weight: 800; font-variant-numeric: tabular-nums; }
.hab-next { display: flex; align-items: center; gap: 12px; width: 100%; min-height: 64px; margin-top: 14px; padding: 10px 10px 10px 12px; border-radius: var(--radius-sm); background: var(--sage-wash); color: var(--ink); text-align: left; transition: box-shadow .2s var(--ease), transform .12s; }
.hab-next:hover { box-shadow: inset 0 0 0 1.5px var(--sage); }
.hab-next:active { transform: scale(.99); }
.hab-next-ico { flex: none; width: 40px; height: 40px; border-radius: 12px; display: grid; place-items: center; background: var(--surface); color: var(--sage-ink); }
.hab-next-text { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 1px; }
.hab-next-k { font-size: 13px; font-weight: 800; letter-spacing: .04em; text-transform: uppercase; color: var(--sage-ink); }
.hab-next-t { font-size: 16px; line-height: 1.3; font-weight: 800; color: var(--ink); }
.hab-next-s { font-size: 14px; color: var(--ink-2); font-weight: 600; }
.hab-next-chev { flex: none; color: var(--ink-2); }
.hab-next.tone-late { background: var(--late-bg); }
.hab-next.tone-late .hab-next-ico, .hab-next.tone-late .hab-next-k { color: var(--late-ink); }

/* ---------- 2 y 6. Seguridad ---------- */
.hab-esc { padding: 12px 8px 6px; border-radius: var(--radius); background: var(--peach-wash); border: 1.5px solid var(--peach-soft); }
.hab-esc-head { display: flex; align-items: center; gap: 12px; padding: 0 6px 6px; }
.hab-esc-ico { flex: none; width: 40px; height: 40px; border-radius: 12px; display: grid; place-items: center; background: var(--surface); color: var(--peach-ink); }
.hab-esc-title { font-size: 17px; line-height: 1.25; font-weight: 800; letter-spacing: -.01em; color: var(--ink); outline-offset: 4px; }
.hab-esc .hab-count { color: var(--peach-ink); }
.hab-esc.is-done { background: var(--surface); border-color: var(--line); }
.hab-esc.is-done .hab-esc-ico { background: var(--sage-wash); color: var(--sage-ink); }
.hab-esc.is-done .hab-count { background: var(--sage-soft); color: var(--sage-ink); }

.hab-checks { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; }
.hab-check { position: relative; }
.hab-check + .hab-check { border-top: 1px solid var(--line); }
.hab-esc .hab-check + .hab-check { border-top-color: var(--peach-soft); }
.hab-esc.is-done .hab-check + .hab-check { border-top-color: var(--line); }
.hab-check-row { display: flex; align-items: flex-start; }
.hab-check-row > .check { margin-top: 4px; }
.hab-check-main { position: relative; flex: 1; min-width: 0; min-height: 56px; display: flex; flex-direction: column; align-items: flex-start; justify-content: center; gap: 2px; padding: 11px 38px 11px 4px; border-radius: 12px; text-align: left; }
.hab-check-main:hover { background: color-mix(in srgb, var(--sunk) 55%, transparent); }
.hab-esc .hab-check-main:hover { background: color-mix(in srgb, var(--peach-soft) 45%, transparent); }
.hab-check-t { font-size: 16px; line-height: 1.3; font-weight: 800; color: var(--ink); }
.hab-check-s { font-size: 14px; line-height: 1.45; font-weight: 600; color: var(--ink-2); display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.hab-check.is-esc .hab-check-s { display: block; -webkit-line-clamp: unset; }
.hab-check-main[aria-expanded="true"] .hab-check-s { display: block; -webkit-line-clamp: unset; }
.hab-check-chev { position: absolute; right: 8px; top: 16px; color: var(--ink-2); transition: transform .22s var(--ease); }
.hab-check-main[aria-expanded="true"] .hab-check-chev { transform: rotate(180deg); }
.hab-check.is-done .hab-check-t { color: var(--ink-2); font-weight: 700; }
.hab-check > .hab-meta { margin: -4px 12px 12px 52px; }
.hab-check-more { padding: 0 12px 14px 52px; font-size: 14px; line-height: 1.5; }
.hab-check-more[hidden] { display: none; }
.hab-kvs { display: flex; flex-direction: column; gap: 10px; margin: 0; }
.hab-kvs dt { font-size: 13px; font-weight: 800; letter-spacing: .03em; text-transform: uppercase; color: var(--ink-2); }
.hab-kvs dd { margin: 2px 0 0; color: var(--ink); font-weight: 600; }
.hab-meta { display: flex; flex-wrap: wrap; align-items: center; gap: 6px 10px; margin-top: 10px; font-size: 13px; font-weight: 700; color: var(--ink-2); }
.hab-src-a { display: inline-flex; align-items: center; min-height: 44px; font-weight: 800; color: var(--sage-ink); }
.hab-check > .hab-meta, .hab-check-more .hab-meta { row-gap: 0; }
.hab-rest { margin-top: 26px; }
.hab-rest .fold-body { padding: 0 6px 6px; }

/* ---------- 3 y 8. Estilo ---------- */
.hab-vote-status { display: flex; align-items: center; gap: 10px; margin: -2px 2px 12px; font-size: 15px; font-weight: 700; color: var(--ink); line-height: 1.4; }
.hab-vote-av { display: inline-flex; flex: none; }
.hab-vote-av .avatar + .avatar { margin-left: -6px; box-shadow: 0 0 0 2px var(--bg); }

/* position: relative: el carrusel es el bloque contenedor de los .sr-only (absolute) de sus tarjetas; sin ella,
   los de las tarjetas que quedan fuera a la derecha estiraban el documento (scroll horizontal a 390 y 360). */
.hab-styles { position: relative; list-style: none; display: flex; gap: 12px; margin: 0 calc(-1 * var(--gutter)); padding: 2px var(--gutter) 14px; overflow-x: auto; scroll-snap-type: x mandatory; scroll-padding-inline: var(--gutter); overscroll-behavior-x: contain; scrollbar-width: thin; }
.hab-styles > li { flex: 0 0 min(80%, 310px); display: flex; scroll-snap-align: start; }
.hab-style { flex: 1; min-width: 0; display: flex; flex-direction: column; overflow: hidden; background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); box-shadow: var(--shadow-1); transition: box-shadow .25s var(--ease), border-color .25s; }
.hab-style.is-chosen, .hab-style.is-match { border-color: var(--sage-strong); box-shadow: 0 0 0 1.5px var(--sage-strong), var(--shadow-1); }
.hab-style-art { position: relative; border-bottom: 1px solid var(--line); }
.hab-art { display: block; width: 100%; height: auto; aspect-ratio: 240 / 150; }
/* Noche: la habitación dibujada se apaga con el tema (pared, suelo, cristal y trazos); los muebles y textiles
   conservan la paleta de su estilo. CSS gana a los atributos fill/stroke del SVG. */
html[data-theme="noche"] .hab-art-wall { fill: var(--line); }
html[data-theme="noche"] .hab-art-floor { fill: var(--sunk); }
html[data-theme="noche"] .hab-art-glass { fill: var(--av-cielo-bg); }
html[data-theme="noche"] .hab-art-paint { opacity: .55; }
html[data-theme="noche"] .hab-art [stroke-opacity] { stroke: var(--ink-3); }
.hab-style-badge { position: absolute; top: 10px; left: 10px; display: inline-flex; align-items: center; gap: 4px; padding: 4px 10px 4px 8px; border-radius: 999px; background: var(--sage-ink); color: var(--on-sage); font-size: 13px; font-weight: 800; }
.hab-style-body { flex: 1; padding: 12px 14px 2px; }
.hab-style-name { font-size: 17px; line-height: 1.25; font-weight: 800; letter-spacing: -.01em; color: var(--ink); }
.hab-palette { display: flex; height: 10px; margin: 8px 0 10px; border-radius: 999px; overflow: hidden; box-shadow: inset 0 0 0 1px color-mix(in srgb, var(--ink) 10%, transparent); }
.hab-sw { flex: 1; }
.hab-style-frase { font-size: 14px; line-height: 1.45; font-weight: 600; color: var(--ink-2); }
.hab-style-mat { margin-top: 8px; font-size: 13px; line-height: 1.4; font-weight: 700; color: var(--ink-2); }
.hab-style-ideas { margin-top: 4px; }
.hab-style-ideas > summary { list-style: none; display: inline-flex; align-items: center; gap: 4px; min-height: 44px; font-size: 14px; font-weight: 800; color: var(--sage-ink); cursor: pointer; border-radius: 10px; }
.hab-style-ideas > summary::-webkit-details-marker { display: none; }
.hab-style-ideas > summary .ico { transition: transform .22s var(--ease); }
.hab-style-ideas[open] > summary .ico { transform: rotate(180deg); }
.hab-style-ideas ul { margin: 0 0 10px; padding-left: 18px; display: flex; flex-direction: column; gap: 6px; font-size: 14px; line-height: 1.45; color: var(--ink); }
.hab-style-foot { display: flex; align-items: center; justify-content: space-between; gap: 8px; min-height: 60px; padding: 8px 10px 8px 14px; border-top: 1px solid var(--line); }
.hab-voters { display: inline-flex; align-items: center; gap: 6px; min-width: 0; font-size: 13px; font-weight: 700; color: var(--ink-2); }
.hab-voters .avatar + .avatar { margin-left: -12px; box-shadow: 0 0 0 2px var(--surface); }
.hab-voters > span:last-child { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.hab-like { flex: none; display: inline-flex; align-items: center; gap: 6px; min-height: 44px; padding: 0 16px 0 12px; border-radius: 999px; background: var(--peach-wash); color: var(--peach-ink); box-shadow: inset 0 0 0 1.5px var(--peach-soft); font-size: 14px; font-weight: 800; transition: background .2s var(--ease), color .2s, box-shadow .2s, transform .12s; }
.hab-like:hover:not(:disabled) { box-shadow: inset 0 0 0 1.5px var(--peach-strong); }
.hab-like:active:not(:disabled) { transform: scale(.96); }
.hab-like[aria-pressed="true"] { background: var(--peach-ink); color: var(--surface); box-shadow: none; }
.hab-like[aria-pressed="true"] .ico path { fill: currentColor; }
.hab-like.pulse .ico { animation: hab-beat .5s var(--spring); }

.hab-chosen { display: flex; flex-direction: column; gap: 0; padding: 0; overflow: hidden; }
.hab-chosen-art { border-bottom: 1px solid var(--line); }
.hab-chosen-body { padding: 12px 16px 14px; }
.hab-chosen-k { display: inline-flex; align-items: center; gap: 4px; margin-bottom: 2px; font-size: 13px; font-weight: 800; letter-spacing: .04em; text-transform: uppercase; color: var(--sage-ink); }
.hab-otros { margin-top: 12px; }
.hab-otros .fold-body { padding: 4px 0 0; overflow: hidden; border-radius: 0 0 var(--radius) var(--radius); }
.hab-otros .hab-styles { margin: 0; padding: 2px 12px 14px; scroll-padding-inline: 12px; }

/* «¡Coincidís!» */
.hab-match { position: relative; display: flex; align-items: center; gap: 14px; margin: -2px 0 12px; padding: 12px 16px; border-radius: var(--radius); background: var(--peach-wash); border: 1.5px solid var(--peach-soft); }
.hab-match-art { position: relative; flex: none; width: 92px; height: 48px; }
.hab-match-a, .hab-match-b { position: absolute; top: 2px; display: inline-flex; border-radius: 50%; box-shadow: 0 0 0 3px var(--peach-wash); }
.hab-match-a { left: 0; }
.hab-match-b { right: 0; }
.hab-match-heart { position: absolute; left: 50%; top: 50%; z-index: 1; width: 30px; height: 30px; margin: -15px 0 0 -15px; display: grid; place-items: center; border-radius: 50%; background: var(--surface); color: var(--peach-ink); box-shadow: 0 2px 8px rgba(163, 82, 47, .18); }
.hab-match-heart .ico path { fill: currentColor; }
.hab-spark { position: absolute; width: 10px; height: 10px; fill: var(--peach-strong); opacity: 0; }
.hab-spark.s1 { left: 40px; top: -6px; }
.hab-spark.s2 { left: 58px; top: -2px; width: 7px; height: 7px; }
.hab-spark.s3 { left: 30px; bottom: -4px; width: 7px; height: 7px; }
.hab-match-title { font-size: 19px; line-height: 1.2; font-weight: 800; color: var(--peach-ink); }
.hab-match-text { margin-top: 2px; font-size: 14px; font-weight: 700; color: var(--ink); }
.hab-match.is-new .hab-match-a { animation: hab-in-l .55s var(--ease) both; }
.hab-match.is-new .hab-match-b { animation: hab-in-r .55s var(--ease) both; }
.hab-match.is-new .hab-match-heart { animation: hab-pop .5s var(--spring) .4s both; }
.hab-match.is-new .hab-spark { animation: hab-spark 1s var(--ease) .6s both; }
.hab-match.is-new .hab-spark.s2 { animation-delay: .72s; }
.hab-match.is-new .hab-spark.s3 { animation-delay: .82s; }
.hab-match.is-new .hab-match-title { animation: hab-rise .4s var(--ease) .35s both; }
@keyframes hab-in-l { from { transform: translateX(-16px); opacity: 0; } }
@keyframes hab-in-r { from { transform: translateX(16px); opacity: 0; } }
@keyframes hab-pop { from { transform: scale(0); } }
@keyframes hab-spark { 0% { opacity: 0; transform: scale(.3); } 35% { opacity: 1; } 100% { opacity: 0; transform: translateY(-8px) scale(1.2); } }
@keyframes hab-rise { from { transform: translateY(6px); opacity: 0; } }
@keyframes hab-beat { 0% { transform: scale(1); } 35% { transform: scale(1.35); } 100% { transform: scale(1); } }

/* Ideas y qué evitar */
.hab-ideas { margin-top: 12px; }
.hab-sec > .hab-ideas:nth-child(2) { margin-top: 0; }
.hab-card-t { display: flex; align-items: center; gap: 8px; margin-bottom: 6px; font-size: 16px; font-weight: 800; color: var(--ink); }
.hab-card-t .ico { color: var(--peach-ink); }
.hab-list { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 10px; }
.hab-list > li { display: flex; align-items: flex-start; gap: 10px; font-size: 15px; line-height: 1.45; }
.hab-list > li > div { min-width: 0; display: flex; flex-direction: column; align-items: flex-start; gap: 4px; }
.hab-li-ico { flex: none; width: 26px; height: 26px; margin-top: -1px; border-radius: 9px; display: grid; place-items: center; background: var(--sage-wash); color: var(--sage-ink); }
.hab-list-x .hab-li-ico { background: var(--late-bg); color: var(--late-ink); }
.hab-li-t { font-weight: 800; color: var(--ink); }
.hab-li-s { font-size: 14px; color: var(--ink-2); }
.hab-evitar { margin-top: 12px; }
.hab-evitar .fold-body { padding: 0 16px 14px; }

/* ---------- 4. Tareas ---------- */
.hab-ok { display: flex; align-items: center; gap: 8px; min-height: 48px; padding: 0 6px; font-weight: 800; color: var(--sage-ink); }
.hab-done { margin-top: 6px; }

/* ---------- 5. Zonas ---------- */
.hab-zonas { display: flex; flex-direction: column; gap: 10px; }
.hab-zonas > .fold + .fold { margin-top: 0; }
.hab-zona .fold-head { padding-left: 12px; min-height: 60px; }
.hab-zona .fold-title { display: inline-flex; align-items: center; gap: 12px; }
.hab-zona-ico { flex: none; width: 36px; height: 36px; border-radius: 12px; display: grid; place-items: center; background: var(--sage-wash); color: var(--sage-ink); }
.hab-zona.is-ready .hab-zona-ico { background: var(--sage-soft); }
.hab-zona .fold-sum .chip-s { vertical-align: middle; }
.hab-zona-text { margin: 0 8px 10px; font-size: 14px; line-height: 1.5; font-weight: 600; color: var(--ink-2); }
.hab-steps { list-style: none; margin: 0 8px 8px; padding: 12px; display: flex; flex-direction: column; gap: 14px; border-radius: var(--radius-sm); background: var(--sunk); }
.hab-steps > li { position: relative; display: flex; gap: 12px; }
.hab-steps > li + li::before { content: ""; position: absolute; left: 17px; top: -14px; height: 14px; border-left: 2px dotted var(--line-2); }
.hab-step-dot { flex: none; width: 36px; height: 36px; border-radius: 50%; display: grid; place-items: center; background: var(--surface); color: var(--sage-ink); }
.hab-steps > li > div { min-width: 0; }
.hab-step-k { font-size: 13px; font-weight: 800; color: var(--sage-ink); }
.hab-step-t { font-size: 15px; line-height: 1.3; font-weight: 800; color: var(--ink); }
.hab-step-s { margin-top: 3px; font-size: 14px; font-weight: 600; color: var(--ink-2); }
.hab-nota { display: flex; flex-direction: column; align-items: flex-start; gap: 2px; margin: 6px 8px 0; }
.hab-nota-text { width: 100%; margin-top: 4px; padding: 10px 12px; border-radius: 12px; background: var(--peach-wash); font-size: 14px; line-height: 1.5; color: var(--ink); white-space: pre-wrap; overflow-wrap: anywhere; }
.hab-nota .btn { margin-left: -8px; }

/* ---------- 7. El espacio ---------- */
.hab-medir { padding: 16px; }
.hab-medir-top { display: flex; align-items: center; gap: 12px; margin-bottom: 14px; }
.hab-medir-top > div { flex: 1; min-width: 0; }
.hab-medir-art { flex: none; width: 76px; height: 54px; }
.hab-medir-title { font-size: 19px; line-height: 1.25; font-weight: 800; color: var(--sage-ink); }
.hab-medir-text { margin-top: 2px; font-size: 14px; line-height: 1.45; font-weight: 600; color: var(--ink-2); }
.hab-cms { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 10px; }
.hab-cmf { margin-bottom: 14px; }
.hab-cm-err { margin: -6px 0 14px; }
.hab-cm-err[hidden] { display: none; }
.hab-cm { position: relative; }
.hab-cm .input { padding-right: 38px; font-variant-numeric: tabular-nums; }
.hab-cm .affix { position: absolute; right: 12px; top: 50%; transform: translateY(-50%); pointer-events: none; font-size: 14px; }
.hab-fs { min-width: 0; margin: 0 0 16px; padding: 0; border: 0; }
.hab-fs > legend { padding: 0; font-size: 14px; font-weight: 800; color: var(--ink); }
.hab-fs-hint { margin: 2px 0 8px; font-size: 14px; font-weight: 600; color: var(--ink-2); }
.hab-sheet-hint { margin: -4px 0 14px; }
.hab-fs > .input { margin-top: 8px; }
.seg.hab-sides { display: flex; flex-wrap: wrap; gap: 8px; width: 100%; padding: 0; overflow: visible; background: transparent; border-radius: 0; }
.hab-sides .seg-btn { flex: 0 1 auto; padding: 0 14px; border-radius: 999px; background: var(--sunk); color: var(--ink-2); box-shadow: none; }
.hab-sides .seg-btn:hover { color: var(--ink); box-shadow: inset 0 0 0 1.5px var(--line-2); }
.hab-sides .seg-btn.on, html[data-theme="noche"] .hab-sides .seg-btn.on { background: var(--sage-ink); color: var(--on-sage); box-shadow: none; }
.hab-markrow { display: flex; align-items: center; margin: -6px 0 6px -8px; font-size: 14px; font-weight: 700; color: var(--ink); line-height: 1.4; cursor: pointer; }
.hab-form-actions { display: flex; flex-wrap: wrap; align-items: center; gap: 6px 10px; }
.hab-form-actions .btn-primary { flex: 1 1 220px; }
.hab-guide { margin-top: 16px; padding-top: 4px; border-top: 1px solid var(--line); }
.hab-guide-list { margin: 6px 4px 0; padding-left: 18px; display: flex; flex-direction: column; gap: 6px; font-size: 14px; line-height: 1.45; font-weight: 600; color: var(--ink); }

.hab-espacio { display: grid; gap: 12px; padding: 14px 16px 10px; }
.hab-plan-fig { margin: 0; min-width: 0; }
.hab-plan { display: block; width: 100%; max-width: 420px; height: auto; margin: 0 auto; aspect-ratio: 300 / 236; }
.hab-plan-floor { fill: var(--sunk); stroke: var(--ink-2); stroke-width: 1.5; }
.hab-plan-grid { fill: none; stroke: var(--line-2); stroke-width: 1; stroke-dasharray: 2 4; }
.hab-plan-stair { fill: var(--late-bg); stroke: var(--late-ink); stroke-width: 1.2; }
.hab-plan-step { fill: none; stroke: var(--late-ink); stroke-width: 1; opacity: .5; }
.hab-plan-stair-tag { fill: var(--late-bg); }
.hab-plan-txt { font-family: var(--font); font-weight: 800; fill: var(--ink-2); }
.hab-plan-stair-txt { fill: var(--late-ink); }
.hab-plan-dim { fill: var(--ink); font-variant-numeric: tabular-nums; }
.hab-plan-win { fill: none; stroke: var(--av-cielo-ink); stroke-width: 5; stroke-linecap: round; }
.hab-plan-win-in { fill: none; stroke: var(--surface); stroke-width: 1.4; stroke-linecap: round; }
.hab-plan-rad { fill: var(--now-bg); stroke: var(--now-ink); stroke-width: 1.2; }
.hab-plan-fin { fill: none; stroke: var(--now-ink); stroke-width: .9; opacity: .6; }
.hab-plan-plug { fill: var(--surface); stroke: var(--sage-ink); stroke-width: 1.4; }
.hab-plan-plug-dot { fill: var(--sage-ink); }
.hab-plan-cuna { fill: var(--sage-wash); stroke: var(--sage-ink); stroke-width: 1.4; stroke-dasharray: 5 4; }
.hab-plan-cuna-txt { fill: var(--sage-ink); }
.hab-legend { list-style: none; margin: 10px 0 0; padding: 0; display: flex; flex-wrap: wrap; gap: 6px 14px; font-size: 13px; font-weight: 700; color: var(--ink-2); }
.hab-legend li { display: inline-flex; align-items: center; gap: 6px; }
.hab-key { flex: none; width: 18px; height: 10px; border-radius: 3px; }
.hab-key.k-esc { background: repeating-linear-gradient(90deg, var(--late-ink) 0 1px, var(--late-bg) 1px 4px); box-shadow: inset 0 0 0 1px var(--late-ink); }
.hab-key.k-win { height: 5px; border-radius: 3px; background: var(--av-cielo-ink); }
.hab-key.k-rad { background: var(--now-bg); box-shadow: inset 0 0 0 1.2px var(--now-ink); }
.hab-key.k-plug { width: 10px; height: 10px; border-radius: 50%; background: var(--surface); box-shadow: inset 0 0 0 1.4px var(--sage-ink); }
.hab-key.k-cuna { background: var(--sage-wash); border: 1.4px dashed var(--sage-ink); }
.hab-plan-cap { margin-top: 6px; font-size: 13px; font-weight: 600; color: var(--ink-2); }
.hab-plan-note { display: flex; align-items: flex-start; gap: 8px; margin-top: 8px; font-size: 14px; line-height: 1.45; font-weight: 700; color: var(--ink); }
.hab-plan-note.is-warn { padding: 10px 12px; border-radius: 12px; background: var(--late-bg); color: var(--late-ink); }
.hab-plan-note.is-warn .ico { margin-top: 1px; }
.hab-dl { display: flex; flex-direction: column; gap: 8px; margin: 0; padding-top: 12px; border-top: 1px solid var(--line); }
.hab-dl > div { display: grid; grid-template-columns: 92px minmax(0, 1fr); gap: 10px; }
.hab-dl dt { font-size: 14px; font-weight: 700; color: var(--ink-2); }
.hab-dl dd { margin: 0; font-size: 15px; font-weight: 700; color: var(--ink); overflow-wrap: anywhere; white-space: pre-wrap; }
.hab-espacio > .btn { justify-self: start; margin-left: -8px; }
.hab-fotos { margin-top: 6px; }
.hab-fotos .dc-empty { display: none; }

/* ---------- 9 y 10. Muebles y preguntar ---------- */
.hab-muebles .fold-body { padding: 0 16px 14px; }
.hab-muebles-list { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 14px; }
.hab-mueble + .hab-mueble { padding-top: 14px; border-top: 1px solid var(--line); }
.hab-mueble-t { font-size: 16px; font-weight: 800; color: var(--ink); }
.hab-kv { margin-top: 4px; font-size: 14px; line-height: 1.45; font-weight: 600; color: var(--ink-2); }
.hab-kv b { color: var(--ink); font-weight: 800; }
.hab-mueble-c { margin-top: 6px; font-size: 14px; line-height: 1.5; font-weight: 600; color: var(--ink); }
.hab-ask-t { display: flex; align-items: center; gap: 8px; margin: 0 2px 10px; font-size: 17px; font-weight: 800; color: var(--ink); }
.hab-ask-t .ico { color: var(--peach-ink); }
.hab-ask-sugg { display: flex; flex-wrap: wrap; gap: 8px; }
.hab-sugg { max-width: 100%; text-align: left; line-height: 1.3; padding-top: 8px; padding-bottom: 8px; border-radius: 22px; }
.hab-sugg.is-free { display: inline-flex; align-items: center; gap: 6px; background: transparent; box-shadow: inset 0 0 0 1.5px var(--line-2); }

/* ---------- Dos columnas cuando la vista es ancha (tableta, escritorio) ---------- */
@container hab (min-width: 560px) {
  .hab-styles { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 14px; margin: 0; padding: 2px 0 4px; overflow: visible; scroll-snap-type: none; }
  .hab-styles > li { flex: none; }
  .hab-otros .hab-styles { padding: 2px 12px 14px; }
  .hab-espacio.has-dl { grid-template-columns: minmax(0, 1.35fr) minmax(0, 1fr); align-items: start; column-gap: 20px; }
  .hab-dl { padding-top: 4px; border-top: 0; }
  .hab-dl > div { grid-template-columns: minmax(0, 1fr); gap: 0; }
  .hab-espacio.has-dl > .btn { grid-column: 2; }
  .hab-chosen { flex-direction: row; }
  .hab-chosen-art { flex: 0 0 46%; border-bottom: 0; border-right: 1px solid var(--line); }
  .hab-chosen-art .hab-art { height: 100%; }
  .hab-cms { gap: 14px; }
}

/* ---------- Pantallas muy estrechas ---------- */
@container hab (max-width: 340px) {
  .hab-cms { gap: 8px; }
  .hab-cm .input { padding-left: 10px; padding-right: 32px; }
  .hab-cm .affix { right: 9px; }
  .hab-hero-big { font-size: 20px; }
  .hab-style-foot { padding-left: 12px; }
}

/* ======================================================================================================
   Diseñad el rincón (carril F-rincón, views/rincon.js): foto + chat con la IA que la va editando.
   Móvil: imagen arriba y chat debajo. Desde 700 px de ancho de la propia vista: lado a lado, el chat con su
   propio desplazamiento. Las imágenes siempre «contain» dentro de un marco con el fondo del tema: dos versiones
   con proporciones distintas (1024×1366 y 1024×1536) encajan sin deformarse.
   ====================================================================================================== */

/* Entrada desde La habitación */
.rin-entry { display: flex; align-items: center; gap: 12px; min-height: 72px; margin-top: 12px; padding: 10px 10px 10px 10px; border-radius: var(--radius); background: var(--surface); border: 1px solid var(--line); box-shadow: var(--shadow-1); color: var(--ink); text-decoration: none; transition: box-shadow .2s var(--ease), transform .12s; }
.rin-entry:hover { box-shadow: inset 0 0 0 1.5px var(--sage), var(--shadow-1); }
.rin-entry:active { transform: scale(.99); }
.rin-entry-img { flex: none; width: 56px; height: 56px; border-radius: 14px; overflow: hidden; display: grid; place-items: center; background: var(--sage-wash); color: var(--sage-ink); }
.rin-entry-img img { width: 100%; height: 100%; object-fit: cover; display: block; }
.rin-entry-text { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 2px; }
.rin-entry-t { font-size: 16px; font-weight: 800; color: var(--ink); }
.rin-entry-s { font-size: 14px; font-weight: 600; color: var(--ink-2); line-height: 1.35; }
.rin-entry-chev { flex: none; color: var(--ink-2); }

/* Marco común */
.rin { container: rin / inline-size; display: flex; flex-direction: column; gap: 16px; }
.rin-h { margin: 8px 4px 0; font-size: 17px; font-weight: 800; color: var(--ink); letter-spacing: -.01em; }
.rin-mini-h { margin: 0 4px 8px; font-size: 13px; font-weight: 800; letter-spacing: .04em; text-transform: uppercase; color: var(--ink-2); }
.rin-lead { margin: -6px 4px 0; font-size: 15px; font-weight: 600; color: var(--ink-2); line-height: 1.45; }
.rin-progress { display: block; height: 4px; margin-top: 8px; border-radius: 999px; overflow: hidden; background: var(--sage-soft); }
.rin-progress > span { display: block; width: 40%; height: 100%; border-radius: inherit; background: var(--sage-strong); animation: rinSlide 1.6s var(--ease) infinite; }
@keyframes rinSlide { from { transform: translateX(-100%); } to { transform: translateX(260%); } }

/* Subir la foto */
.rin-intro { padding: 8px 16px 18px; }
.rin-intro .empty { padding-bottom: 8px; }
.rin-add { display: flex; flex-direction: column; gap: 10px; }
.rin-add-btns { display: flex; flex-wrap: wrap; gap: 10px; }
.rin-add-btns .btn { flex: 1 1 180px; }
.rin-add-hint { font-size: 14px; font-weight: 600; color: var(--ink-2); text-align: center; line-height: 1.4; }
.rin-up { display: flex; align-items: center; gap: 12px; padding: 14px 16px; }
.rin-up-ico { flex: none; width: 40px; height: 40px; border-radius: 12px; display: grid; place-items: center; background: var(--sage-wash); color: var(--sage-ink); }
.rin-up-text { flex: 1; min-width: 0; }
.rin-up-t { font-size: 15px; font-weight: 800; color: var(--ink); }
.rin-up-err { display: flex; flex-wrap: wrap; align-items: center; gap: 8px 12px; padding: 12px 14px; border-radius: var(--radius-sm); background: var(--late-bg); color: var(--late-ink); }
.rin-up-err p { flex: 1 1 220px; display: flex; gap: 8px; align-items: flex-start; font-size: 14px; font-weight: 700; line-height: 1.4; }
.rin-up-err .ico { flex: none; margin-top: 1px; }

/* Lista de diseños */
.rin-cards { display: grid; gap: 10px; }
.rin-card { display: flex; align-items: center; gap: 14px; min-height: 88px; padding: 10px 12px 10px 10px; border-radius: var(--radius); background: var(--surface); border: 1px solid var(--line); box-shadow: var(--shadow-1); color: var(--ink); text-decoration: none; transition: box-shadow .2s var(--ease), transform .12s; }
.rin-card:hover { box-shadow: inset 0 0 0 1.5px var(--sage), var(--shadow-1); }
.rin-card:active { transform: scale(.99); }
.rin-card-img { flex: none; width: 72px; height: 72px; border-radius: 14px; overflow: hidden; display: grid; place-items: center; background: var(--sunk); color: var(--ink-3); }
.rin-card-img .rin-img { width: 100%; height: 100%; object-fit: cover; display: block; }
.rin-card-img.is-broken .rin-img { visibility: hidden; }
.rin-card-text { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 3px; }
.rin-card-t { display: flex; align-items: center; gap: 6px; font-size: 16px; font-weight: 800; color: var(--ink); overflow-wrap: anywhere; }
.rin-card-m { font-size: 14px; font-weight: 600; color: var(--ink-2); }
.rin-card-chev { flex: none; color: var(--ink-2); }
.rin-fav-mark { display: inline-flex; color: var(--peach-ink); }
.rin-fav-mark .ico, .rin-thumb-fav .ico, .rin-star.is-on .ico { fill: currentColor; }

/* Escenario: imagen, versiones y herramientas */
.rin-work { display: flex; flex-direction: column; gap: 20px; }
.rin-stage { display: flex; flex-direction: column; gap: 12px; min-width: 0; }
/* La imagen: en móvil queda fija arriba (sticky) mientras se baja por el chat; al escribir, algo más baja. */
.rin-view { position: sticky; top: calc(var(--topbar-h) + var(--safe-t)); z-index: 3; display: flex; flex-direction: column; gap: 6px; margin: -8px 0 -12px; padding: 8px 0 8px; background: var(--bg); }
.rin-view::after { content: ""; position: absolute; left: 0; right: 0; top: 100%; height: 12px; background: linear-gradient(var(--bg), transparent); pointer-events: none; }
.rin-view .rin-cap { min-height: 48px; }
.rin-thumbs, .rin-log, .rin-cards, .rin-prop-list { list-style: none; }
.rin-view .rin-frame { max-height: min(40vh, 360px); transition: max-height .24s var(--ease); }
.rin-work:has(.rin-input:focus) .rin-view .rin-frame { max-height: min(28vh, 260px); }
.rin-frame { position: relative; width: 100%; aspect-ratio: var(--ar, 4 / 3); max-height: min(56vh, 620px); border-radius: var(--radius); overflow: hidden; background: var(--sunk); border: 1px solid var(--line); }
.rin-frame .rin-img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: contain; display: block; user-select: none; -webkit-user-select: none; }
.rin-broken { display: none; position: absolute; inset: 0; flex-direction: column; align-items: center; justify-content: center; gap: 6px; padding: 16px; text-align: center; font-size: 14px; font-weight: 700; color: var(--ink-2); }
.rin-frame.is-broken .rin-broken { display: flex; }
.rin-frame.is-broken .rin-img { visibility: hidden; }
.rin-cap { display: flex; align-items: center; gap: 8px; padding: 0 4px; }
.rin-cap-text { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 1px; }
.rin-cap-t { font-size: 15px; font-weight: 800; color: var(--ink); }
.rin-cap-fav { color: var(--peach-ink); }
.rin-cap-p { font-size: 14px; font-weight: 600; color: var(--ink-2); line-height: 1.35; overflow-wrap: anywhere; }
.rin-star { flex: none; width: 48px; height: 48px; color: var(--ink-2); }
.rin-star.is-on { color: var(--peach-ink); }
.rin-tools { display: flex; flex-wrap: wrap; gap: 8px; }
.rin-tools .btn { flex: 1 1 auto; }

.rin-gen { display: flex; align-items: flex-start; gap: 12px; padding: 12px 14px; border-radius: var(--radius-sm); background: var(--sage-wash); }
.rin-gen.is-queued { background: var(--now-bg); }
.rin-gen-ico { flex: none; width: 36px; height: 36px; border-radius: 10px; display: grid; place-items: center; background: var(--surface); color: var(--sage-ink); }
.rin-gen.is-queued .rin-gen-ico { color: var(--now-ink); }
.rin-gen-text { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 1px; }
.rin-gen-t { font-size: 15px; font-weight: 800; color: var(--ink); }
.rin-gen-s { font-size: 14px; font-weight: 600; color: var(--ink-2); font-variant-numeric: tabular-nums; }

.rin-strip { min-width: 0; }
.rin-thumbs { display: flex; gap: 8px; overflow-x: auto; padding: 4px 4px 8px; margin: -4px -4px 0; scroll-snap-type: x proximity; scrollbar-width: thin; }
.rin-thumbs > li { flex: none; scroll-snap-align: start; }
.rin-thumb { position: relative; display: grid; place-items: center; width: 64px; height: 64px; border-radius: 14px; overflow: hidden; background: var(--sunk); border: 2px solid transparent; color: var(--ink-2); }
.rin-thumb .rin-img { width: 100%; height: 100%; object-fit: cover; display: block; }
.rin-thumb.is-on { border-color: var(--sage-ink); box-shadow: 0 0 0 2px var(--surface) inset; }
.rin-thumb.is-broken .rin-img { visibility: hidden; }
.rin-thumb.is-gen { border: 2px dashed var(--line-2); background: linear-gradient(90deg, var(--sunk) 0%, var(--sage-wash) 50%, var(--sunk) 100%); background-size: 200% 100%; animation: shimmer 1.4s linear infinite; }
.rin-thumb-n { position: absolute; left: 4px; bottom: 4px; min-width: 20px; padding: 1px 6px; border-radius: 999px; background: rgba(0, 0, 0, .58); color: #fff; font-size: 13px; font-weight: 800; line-height: 1.3; text-align: center; font-variant-numeric: tabular-nums; }
.rin-thumb.is-idea { width: 104px; padding: 6px 8px; place-items: start; align-content: start; gap: 2px; background: var(--now-bg); border: 2px dashed var(--line-2); color: var(--now-ink); text-align: left; }
.rin-thumb.is-idea .rin-thumb-ph { display: flex; }
.rin-thumb-idea { display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; font-size: 13px; font-weight: 700; line-height: 1.25; color: var(--ink); }
.rin-thumb-fav { position: absolute; right: 4px; top: 4px; display: grid; place-items: center; width: 22px; height: 22px; border-radius: 999px; background: var(--surface); color: var(--peach-ink); }

/* Comparador antes/después */
.rin-cmp-wrap { display: flex; flex-direction: column; gap: 6px; }
.rin-cmp { touch-action: pan-y; cursor: ew-resize; }
.rin-cmp-after { position: absolute; inset: 0; clip-path: inset(0 0 0 var(--x, 50%)); }
.rin-cmp-line { position: absolute; top: 0; bottom: 0; left: var(--x, 50%); width: 3px; margin-left: -1.5px; background: #fff; box-shadow: 0 0 0 1px rgba(0, 0, 0, .25); pointer-events: none; }
.rin-cmp-knob { position: absolute; top: 50%; left: 50%; transform: translate(-50%, -50%); display: flex; align-items: center; justify-content: center; width: 40px; height: 40px; border-radius: 999px; background: #fff; color: #2E3833; box-shadow: 0 2px 10px rgba(0, 0, 0, .3); }
.rin-cmp-knob .ico { width: 14px; height: 14px; margin: 0 -2px; }
.rin-cmp-tag { position: absolute; top: 10px; padding: 3px 10px; border-radius: 999px; background: rgba(0, 0, 0, .58); color: #fff; font-size: 13px; font-weight: 800; pointer-events: none; }
.rin-cmp-tag.is-a { left: 10px; }
.rin-cmp-tag.is-b { right: 10px; }
.rin-cmp-ctl { display: flex; align-items: center; gap: 10px; min-height: 48px; padding: 0 4px; }
.rin-cmp-end { flex: none; font-size: 13px; font-weight: 800; color: var(--ink-2); }
.rin-range { flex: 1; min-width: 0; height: 44px; margin: 0; background: transparent; -webkit-appearance: none; appearance: none; cursor: pointer; }
.rin-range::-webkit-slider-runnable-track { height: 6px; border-radius: 999px; background: linear-gradient(90deg, var(--line-2) 0 var(--x, 50%), var(--sage-strong) var(--x, 50%) 100%); }
.rin-range::-moz-range-track { height: 6px; border-radius: 999px; background: linear-gradient(90deg, var(--line-2) 0 var(--x, 50%), var(--sage-strong) var(--x, 50%) 100%); }
.rin-range::-webkit-slider-thumb { -webkit-appearance: none; appearance: none; width: 28px; height: 28px; margin-top: -11px; border-radius: 999px; background: var(--surface); border: 2px solid var(--sage-ink); box-shadow: 0 1px 4px rgba(0, 0, 0, .2); }
.rin-range::-moz-range-thumb { width: 24px; height: 24px; border-radius: 999px; background: var(--surface); border: 2px solid var(--sage-ink); box-shadow: 0 1px 4px rgba(0, 0, 0, .2); }
.rin-range:focus-visible { outline: none; }
.rin-range:focus-visible::-webkit-slider-thumb { box-shadow: 0 0 0 3px var(--surface), 0 0 0 6px var(--focus); }
.rin-range:focus-visible::-moz-range-thumb { box-shadow: 0 0 0 3px var(--surface), 0 0 0 6px var(--focus); }

/* Chat */
.rin-chat { display: flex; flex-direction: column; gap: 10px; min-width: 0; padding: 14px 12px 12px; border-radius: var(--radius); background: var(--surface); border: 1px solid var(--line); box-shadow: var(--shadow-1); }
.rin-chat-t { display: flex; align-items: center; gap: 8px; padding: 0 4px; font-size: 17px; font-weight: 800; color: var(--ink); }
.rin-chat-t .ico { color: var(--sage-strong); }
.rin-log { display: flex; flex-direction: column; gap: 10px; min-height: 0; }
.rin-older { display: flex; justify-content: center; }
.rin-msg { display: flex; align-items: flex-end; gap: 8px; }
.rin-msg.is-user { justify-content: flex-end; }
.rin-msg.is-ia { flex-direction: column; align-items: flex-start; gap: 6px; }
.rin-bubble { max-width: min(88%, 520px); padding: 10px 14px; border-radius: 18px; font-size: 15px; font-weight: 600; line-height: 1.5; white-space: pre-line; overflow-wrap: anywhere; color: var(--ink); }
.rin-msg.is-user .rin-bubble { background: var(--sage-soft); border-bottom-right-radius: 6px; }
.rin-msg.is-ia .rin-bubble { background: var(--bg); border: 1px solid var(--line); border-top-left-radius: 6px; }
.rin-msg.is-ia.is-idea .rin-bubble { background: var(--now-bg); border: 1.5px dashed var(--line-2); }
.rin-idea-k { display: flex; align-items: center; gap: 6px; margin: 0 0 -2px 4px; font-size: 13px; font-weight: 800; color: var(--now-ink); }
.rin-msg:focus { outline: none; }
.rin-msg.is-flash .rin-bubble { box-shadow: 0 0 0 3px var(--focus); transition: box-shadow .3s; }
.rin-bubble.is-typing { display: inline-flex; align-items: center; gap: 10px; min-height: 44px; }
.rin-typing-t { font-size: 14px; color: var(--ink-2); }
.rin-dots { display: inline-flex; gap: 5px; }
.rin-dots > span { width: 7px; height: 7px; border-radius: 999px; background: var(--sage-strong); animation: rinBreathe 1.2s ease-in-out infinite; }
.rin-dots > span:nth-child(2) { animation-delay: .15s; }
.rin-dots > span:nth-child(3) { animation-delay: .3s; }
@keyframes rinBreathe { 0%, 100% { opacity: .28; transform: scale(.75); } 45% { opacity: 1; transform: scale(1); } }
.rin-vnote { display: flex; align-items: center; gap: 6px; margin: 0 0 0 6px; font-size: 14px; font-weight: 700; color: var(--sage-ink); }
.rin-vnote .btn { margin-left: -10px; }
.rin-vnote.is-gen { color: var(--ink-2); }
.rin-vnote.is-err { flex-direction: column; align-items: flex-start; gap: 8px; max-width: min(88%, 520px); margin: 0; padding: 10px 14px; border-radius: 18px; background: var(--late-bg); color: var(--late-ink); }
.rin-vnote.is-err p { display: flex; gap: 8px; align-items: flex-start; line-height: 1.4; }
.rin-vnote.is-err .ico { flex: none; margin-top: 1px; }
.rin-vnote.is-err .btn { margin-left: 0; }
.rin-spin { width: 16px; height: 16px; border-radius: 999px; border: 2.5px solid var(--sage-soft); border-top-color: var(--sage-strong); animation: rinSpin .9s linear infinite; }
@keyframes rinSpin { to { transform: rotate(360deg); } }
.rin-link { min-height: 32px; padding: 0 2px; font: inherit; font-weight: 800; color: var(--sage-ink); text-decoration: underline; text-underline-offset: 3px; }

/* Propuesta «Añadir a Compras» */
.rin-prop { width: 100%; max-width: 520px; }
.rin-prop .proposal-title { margin-bottom: 2px; }
.rin-prop-sub { font-size: 14px; font-weight: 600; color: var(--ink-2); }
.rin-prop-list { display: flex; flex-direction: column; margin-top: 6px; }
.rin-prop-row { display: flex; align-items: center; gap: 4px; min-height: 52px; border-top: 1px solid var(--line); }
.rin-prop-row:first-child { border-top: 0; }
.rin-prop-row .check { flex: none; margin-left: -10px; }
.rin-prop-text { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 1px; padding: 6px 0; cursor: pointer; }
.rin-prop-t { font-size: 15px; font-weight: 700; color: var(--ink); overflow-wrap: anywhere; }
.rin-prop-s { font-size: 13px; font-weight: 700; color: var(--ink-2); }
.rin-prop-row.is-ya .rin-prop-text { cursor: default; padding-left: 4px; }
.rin-prop-ico { flex: none; display: grid; place-items: center; width: 28px; height: 28px; margin: 0 6px 0 0; border-radius: 999px; background: var(--sage-soft); color: var(--sage-ink); }
.rin-prop-done { margin: 4px 0 0 26px; list-style: disc; font-size: 14px; font-weight: 600; color: var(--ink-2); }
.rin-prop-link { margin: 4px 0 -4px auto; width: max-content; }
.rin-prop.is-aplicada { display: flex; flex-direction: column; }

/* Campo y sugerencias */
.rin-composer { display: flex; flex-direction: column; gap: 8px; }
.rin-sugg { display: flex; gap: 8px; overflow-x: auto; padding: 2px 2px 4px; margin: 0 -2px; scrollbar-width: none; }
.rin-sugg::-webkit-scrollbar { display: none; }
.rin-sugg-b { flex: none; max-width: 80%; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.rin-compose { display: flex; align-items: flex-end; gap: 6px; padding: 4px 4px 4px 6px; border-radius: 22px; background: var(--sunk); border: 1px solid var(--line); }
.rin-compose:focus-within { box-shadow: 0 0 0 3px var(--focus); }
.rin-input { flex: 1; min-height: 44px; max-height: 160px; padding: 11px 8px; border: 0; background: transparent; resize: none; font-size: 16px; line-height: 1.4; box-shadow: none; }
.rin-input:focus, .rin-input:focus-visible { outline: none; box-shadow: none; }
.rin-input:disabled { opacity: .7; }
.rin-send { flex: none; width: 44px; height: 44px; border-radius: 999px; background: var(--sage-ink); color: var(--on-sage); }
.rin-send:disabled { background: var(--line-2); color: var(--ink-2); }
.rin-err { display: flex; gap: 8px; align-items: flex-start; padding: 0 6px; font-size: 14px; font-weight: 700; color: var(--late-ink); line-height: 1.4; }
.rin-err .ico, .rin-note .ico { flex: none; margin-top: 1px; }
.rin-note { display: flex; gap: 8px; align-items: flex-start; padding: 0 6px; font-size: 14px; font-weight: 600; color: var(--ink-2); line-height: 1.4; }

/* Escritorio y tableta (también 1280 con el panel del asistente abierto, ~660 px de vista): lado a lado; el chat
   cabe entero en la altura visible y desplaza solo sus mensajes. */
@container rin (min-width: 600px) {
  .rin-work { display: grid; grid-template-columns: minmax(0, 1.1fr) minmax(280px, 1fr); grid-template-rows: auto 1fr; grid-template-areas: "view chat" "rest chat"; align-items: start; column-gap: 18px; row-gap: 12px; }
  .rin-view { grid-area: view; position: static; margin: 0; padding: 0; background: none; }
  .rin-view::after { display: none; }
  .rin-view .rin-frame, .rin-work:has(.rin-input:focus) .rin-view .rin-frame { max-height: min(56vh, 620px); }
  .rin-stage { grid-area: rest; }
  .rin-chat { grid-area: chat; position: sticky; top: calc(var(--topbar-h) + var(--safe-t) + 12px); height: calc(100vh - var(--topbar-h) - var(--safe-t) - 100px); height: calc(100dvh - var(--topbar-h) - var(--safe-t) - 100px); min-height: 420px; max-height: 860px; }
  .rin-log { flex: 1; overflow-y: auto; overscroll-behavior: contain; padding: 2px 2px 6px; }
  .rin-cards { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}

/* En #rincon/<id> la vista tiene su propio chat: sin la barra global del asistente (ni su hueco). */
html[data-rincon-chat] { --bottom-clear: calc(var(--tabbar-h) + var(--safe-b) + 20px); --toast-bottom: calc(var(--tabbar-h) + var(--safe-b) + 12px); }
@media (min-width: 760px) { html[data-rincon-chat] { --bottom-clear: 32px; --toast-bottom: 24px; } }

@media (prefers-reduced-motion: reduce) {
  .rin-progress > span, .rin-thumb.is-gen, .rin-spin { animation: none; }
  .rin-progress > span { width: 100%; opacity: .5; }
  .rin-dots > span { animation: none; opacity: .7; }
}
