/* Bienvenida, historias, pasos del perfil, pantalla de entrada y capa de movimiento */
:root { --ob-grad: linear-gradient(165deg, #4B4BE8 0%, #7C5CF6 55%, #B06AF0 100%); --spring: cubic-bezier(.2, .9, .3, 1.3); }
.ob { min-height: 100dvh; display: flex; flex-direction: column; padding: calc(env(safe-area-inset-top) + 22px) 24px calc(env(safe-area-inset-bottom) + 26px); position: relative; color: var(--ink); background: var(--bg); animation: fade .25s ease both; }
.ob h1 { margin: 0; font-size: 32px; line-height: 1.14; font-weight: 800; letter-spacing: -.6px; }
.ob .sub { margin: 12px 0 0; font-size: 15px; line-height: 1.5; color: var(--muted); }
@media (min-width: 700px) { .ob { min-height: min(720px, 100dvh); margin: 20px auto; border-radius: 32px; overflow: hidden; box-shadow: var(--shadow-lg); } }

.ob-btn { width: 100%; min-height: 56px; border-radius: 999px; font-size: 16px; font-weight: 700; display: grid; place-items: center; transition: transform .2s var(--spring), box-shadow .2s, background-color .2s, filter .2s; }
.ob-btn:active { transform: scale(.97); }
.ob-btn.primary { background: var(--grad); color: #fff; box-shadow: 0 10px 24px color-mix(in srgb, var(--primary) 35%, transparent); }
.ob-btn.light { background: #fff; color: #3B3BC9; }
.ob-btn.ghost { background: rgba(255, 255, 255, .18); color: #fff; min-height: 52px; font-weight: 600; font-size: 15px; margin-top: 10px; }
.ob-link { display: block; margin: 8px auto 0; padding: 10px 14px; min-height: 44px; font-size: 14px; font-weight: 600; color: var(--muted); transition: color .15s; }
.ob-foot { margin-top: auto; padding-top: 18px; }
.ob-bar { display: flex; align-items: center; gap: 10px; margin-bottom: 30px; }
.ob-back { width: 36px; height: 36px; flex: none; border-radius: 50%; display: grid; place-items: center; transition: background-color .15s, transform .2s var(--spring); }
.ob-back svg, .ob-arr svg { width: 20px; height: 20px; fill: none; stroke: currentColor; stroke-width: 2.4; stroke-linecap: round; stroke-linejoin: round; }
.ob-back.ph { visibility: hidden; }
.ob-seg { flex: 1; display: flex; gap: 6px; }
.ob-seg i { flex: 1; height: 4px; border-radius: 2px; background: color-mix(in srgb, currentColor 22%, transparent); transition: background-color .3s; }
.ob-seg i.on { background: var(--primary); }

/* ---------- bienvenida ---------- */
.ob-hero { background: var(--ob-grad); color: #fff; overflow: hidden; }
.ob-top { display: flex; align-items: center; justify-content: space-between; gap: 12px; position: relative; z-index: 3; }
.ob-brand { display: flex; align-items: center; gap: 10px; font-size: 20px; font-weight: 800; letter-spacing: -.3px; }
.ob-brand img { width: 40px; height: 40px; border-radius: 12px; }
.ob-lang { width: 132px; }
.ob-lang .dd-btn { min-height: 40px; padding: 0 12px 0 16px; font-size: 13px; font-weight: 700; border-radius: 999px; background: rgba(255, 255, 255, .94); color: #3B3BC9; border: 0; }
.ob-lang .dd-chev { stroke: #3B3BC9; }
.ob-lang .dd-list { right: 0; left: auto; min-width: 232px; }
.ob-copy { padding-top: 18px; position: relative; z-index: 2; }
.ob-copy h1 { font-size: 30px; line-height: 1.15; letter-spacing: -.8px; }
.ob-copy h1 .sl { font-weight: 400; opacity: .94; }
.ob-copy h1 .hl { font-weight: 800; font-size: 1.12em; }
.hl { color: #FFD66B; }
.ob-copy p { margin: 14px 0 26px; font-size: 15px; line-height: 1.5; color: rgba(255, 255, 255, .88); max-width: 34ch; }

/* tarjetas flotantes (medidas en em para que todo escale junto) */
.ob-collage { position: relative; flex: 1; min-height: 330px; margin-top: 8px; font-size: 14px; }
.oc { position: absolute; background: #fff; color: var(--ink); border-radius: 1.6em; padding: 1em; box-shadow: 0 18px 40px rgba(20, 21, 43, .28); display: flex; flex-direction: column; gap: .45em; rotate: var(--r, 0deg);
  animation: oc-in .7s var(--spring) backwards, bob 6s ease-in-out var(--w, 0s) infinite; transition: scale .25s var(--spring), box-shadow .25s; }
.oc small { font-size: .86em; font-weight: 600; color: #6B6F8A; }
.oc b { font-size: .86em; font-weight: 700; border-radius: .8em; padding: .55em .7em; }
.oc .c1 { background: #ECECFF; color: #3B3BC9; } .oc .c2 { background: #FFF3D6; color: #8A5A00; } .oc .c3 { background: #FDECEC; color: #B4262B; } .oc .c4 { background: #DDF6EE; color: #0B7A5C; }
.oc-a { left: 0; top: 31%; width: 11.5em; }
.oc-c { right: 0; top: 50%; width: 11.5em; }
.oc-b { left: 22%; top: 2%; width: 16em; background: #14152B; color: #fff; border-radius: 1.8em; padding: 1.1em; z-index: 2; gap: .6em; }
.oc-b small { color: #A9ACC8; } .oc-b strong { font-size: 1.2em; line-height: 1.25; }
.oc-resp { display: flex; gap: .4em; flex-wrap: wrap; }
.oc-resp span { background: #2A2C4A; border-radius: 999px; padding: .35em .8em; font-size: .86em; font-weight: 600; }
.oc-resp span.y { background: #12A66B; }
.oc-resp span.m { background: rgba(240, 140, 0, .24); color: #FFB347; }
.oc-resp span.n { background: rgba(229, 72, 77, .24); color: #FF8A8E; }
.oc-d { left: 4%; bottom: 1%; flex-direction: row; align-items: center; gap: .8em; padding: .8em 1.1em; border-radius: 1.4em; }
.oc-d b { display: block; padding: 0; font-size: 1em; } .oc-d small { display: block; margin-top: .15em; color: #E5484D; font-size: .95em; font-weight: 800; }
.oc-ic { font-size: 1.6em; width: 1.9em; height: 1.9em; display: grid; place-items: center; background: #FFF3D6; border-radius: .7em; }
.oc-q { right: 8%; bottom: 4%; width: 2.1em; height: 2.1em; padding: 0; border-radius: .34em; display: grid; place-items: center; font-size: 2.2em; line-height: 1; font-weight: 800; background: linear-gradient(135deg, #FFD66B, #FFA24D); color: #fff; z-index: 3; text-shadow: 0 2px 6px rgba(120, 60, 0, .3); }
@keyframes oc-in { from { opacity: 0; scale: .8; translate: 0 24px; } }
@keyframes bob { 50% { translate: 0 -9px; } }
@media (hover: hover) { .oc:hover { scale: 1.05; box-shadow: 0 26px 52px rgba(20, 21, 43, .36); } }

/* bienvenida en pantallas grandes: a todo el ancho, dos columnas */
#app[data-view="hero"], #app[data-view="auth"] { max-width: 520px; }
@media (min-width: 900px) {
  #app[data-view="hero"], #app[data-view="auth"] { max-width: none; }
  .ob-hero { margin: 0; border-radius: 0; box-shadow: none; min-height: 100dvh; padding: 36px max(40px, calc((100vw - 1240px) / 2)); display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); grid-template-rows: auto 1fr; gap: 0 48px; }
  .ob-hero .ob-top { grid-column: 1 / -1; }
  .ob-hero .ob-copy { grid-column: 1; grid-row: 2; align-self: center; padding: 0; }
  .ob-hero .ob-collage { grid-column: 2; grid-row: 2; align-self: center; width: 100%; max-width: 620px; justify-self: center; height: clamp(500px, 68vh, 620px); min-height: 0; margin: 0; font-size: clamp(15px, 1.2vw, 20px); }
  .ob-hero .ob-copy h1 { font-size: clamp(34px, 3.4vw, 52px); letter-spacing: -1px; }
  .ob-hero .ob-copy p { font-size: 19px; margin: 20px 0 34px; max-width: 30ch; }
  .ob-hero .ob-cta { max-width: 400px; }
  .ob-hero .ob-brand { font-size: 24px; } .ob-hero .ob-brand img { width: 46px; height: 46px; }
}

/* ---------- historias ---------- */
.ob-story.dark { background: #14152B; color: #fff; }
.ob-story.dark .sub { color: #A9ACC8; }
.ob-story.soft { background: var(--primary-soft); }
.ob-story.grad { background: var(--ob-grad); color: #fff; }
.ob-story.grad .sub { color: rgba(255, 255, 255, .86); }
.ob-story.grad .ob-seg i.on, .ob-story.dark .ob-seg i.on { background: #fff; }
.ob-visual { margin-top: 24px; display: flex; flex-direction: column; gap: 14px; }
.os-card { background: #fff; color: var(--ink); border-radius: 26px; padding: 20px; box-shadow: 0 18px 44px rgba(20, 21, 43, .16); display: flex; flex-direction: column; gap: 6px; animation: oc-in .55s var(--spring) backwards; }
.ob-story.grad .os-card { box-shadow: 0 22px 48px rgba(20, 21, 43, .3); }
.os-card small { font-size: 13px; color: #6B6F8A; }

/* paso 1: el mismo calendario de la app */
.os-cal { padding: 16px 14px 14px; gap: 2px; }
.os-cal .osc-head { display: flex; flex-direction: column; gap: 8px; margin-bottom: 8px; padding: 0 4px; }
.os-cal .osc-head > b { font-size: 18px; }
.osc-leg { display: flex; flex-wrap: wrap; gap: 4px 12px; font-size: 12px; font-weight: 600; color: #6B6F8A; }
.osc-leg span { display: inline-flex; align-items: center; gap: 5px; }
.osc-leg i { width: 8px; height: 8px; border-radius: 50%; background: var(--mc); }
.os-cal .d { animation: dot-in .4s var(--spring) backwards; animation-delay: calc(.4s + var(--i, 0) * 70ms); }
@keyframes dot-in { from { scale: 0; } }
.osc-free { margin-top: 10px; text-align: center; font-size: 13px; font-weight: 700; color: var(--primary); background: var(--primary-soft); border-radius: 12px; padding: 9px 10px; }
.os-abs { background: rgba(255, 255, 255, .07); border-radius: 22px; padding: 12px 14px; display: flex; flex-direction: column; gap: 8px; animation: oc-in .55s var(--spring) .1s backwards; }
.osc-sec { font-size: 13px; font-weight: 700; color: #C9B4FF; }
.osc-abs { display: flex; align-items: center; gap: 10px; font-size: 14px; }
.osc-abs small { margin-left: auto; color: #A9ACC8; font-size: 13px; }

/* paso 2: idea con fecha y respuestas tocables */
.osc-by { display: flex; align-items: center; gap: 10px; margin-bottom: 4px; }
.osc-t { font-size: 20px; line-height: 1.25; font-weight: 700; }
.osc-date { display: inline-flex; align-items: center; gap: 8px; width: fit-content; margin-top: 4px; padding: 8px 12px; border-radius: 12px; background: var(--primary-soft); color: var(--primary); font-size: 14px; font-weight: 700; }
.osc-date svg { width: 18px; height: 18px; fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }
.osc-resp { display: flex; gap: 8px; margin-top: 12px; }
.osc-resp button { flex: 1; min-height: 44px; border-radius: 14px; display: grid; place-items: center; background: color-mix(in srgb, var(--rc) 13%, #fff); color: var(--rc); font-size: 14px; font-weight: 700; transition: transform .2s var(--spring), background-color .2s, color .2s, box-shadow .2s; }
.osc-resp button[data-k=in] { --rc: #12A66B; } .osc-resp button[data-k=maybe] { --rc: #F08C00; } .osc-resp button[data-k=out] { --rc: #E5484D; }
.osc-resp button.on { background: var(--rc); color: #fff; box-shadow: 0 8px 18px color-mix(in srgb, var(--rc) 32%, transparent); }

.osc-resp button:active { transform: scale(.95); }
.osc-bar { height: 8px; border-radius: 4px; background: #EEF0F8; margin-top: 14px; } .osc-bar i { display: block; height: 100%; border-radius: 4px; background: var(--grad); transition: width .4s var(--spring); }
.osc-n { display: flex; justify-content: space-between; }
.os-chips { display: flex; gap: 8px; flex-wrap: wrap; }
.os-chips button { background: #fff; border-radius: 999px; padding: 9px 15px; font-size: 13px; font-weight: 600; transition: transform .2s var(--spring), background-color .2s, color .2s, box-shadow .2s; }
.os-chips button.on { background: var(--grad); color: #fff; box-shadow: 0 8px 18px color-mix(in srgb, var(--primary) 32%, transparent); }
.os-chips button:active { transform: scale(.94); }

/* paso 3: gastos */
.osc-row { display: flex; justify-content: space-between; gap: 12px; align-items: flex-start; } .osc-row > div { display: flex; flex-direction: column; gap: 4px; }
.osc-amt { font-size: 20px; font-weight: 800; }
.os-card hr { border: 0; height: 1px; background: #E6E8F3; margin: 12px 0; width: 100%; }
.osc-debt { display: flex; justify-content: space-between; font-size: 14px; font-weight: 600; padding: 4px 0; } .osc-debt b { color: #E5484D; transition: color .3s; }
.osc-pay { margin-top: 14px; min-height: 46px; border-radius: 14px; display: grid; place-items: center; background: #ECECFF; color: #3B3BC9; font-size: 14px; font-weight: 600; transition: transform .2s var(--spring), background-color .25s, color .25s; }
.osc-pay:active { transform: scale(.96); }
.osc-pay .p-on, .os-pay.paid .osc-pay .p-off { display: none; }
.os-pay.paid .osc-pay .p-on { display: inline; }
.os-pay.paid .osc-pay { background: #DDF6EE; color: #0B7A5C; }
.os-pay.paid .osc-debt b { color: #12A66B; text-decoration: line-through; }

/* ---------- pasos del perfil ---------- */
.ob-body { flex: 1; display: flex; flex-direction: column; }
.ob-input { margin-top: 30px; width: 100%; min-height: 58px; padding: 0 18px; border-radius: 18px; border: 2px solid var(--primary); background: var(--surface); font-size: 18px; font-weight: 600; color: var(--ink); outline: 0; transition: box-shadow .2s; }
.ob-input:focus { box-shadow: 0 0 0 5px color-mix(in srgb, var(--primary) 16%, transparent); }
.ob-bd { display: grid; grid-template-columns: 1fr 1.6fr; gap: 12px; margin-top: 30px; }
.ob-bd .dd-btn { min-height: 58px; font-size: 17px; font-weight: 700; }

/* foto o avatar */
.ob-avwrap { margin: 34px auto 0; width: min(200px, 52vw); aspect-ratio: 1; display: block; border-radius: 28%; }
.ob-avhero { width: 100%; height: 100%; border-radius: 28%; display: grid; place-items: center; background: var(--c, transparent); font-size: clamp(64px, 18vw, 96px); box-shadow: 0 22px 44px color-mix(in srgb, var(--primary) 32%, transparent); overflow: hidden; animation: av-pop .45s var(--spring); transition: transform .3s var(--spring); }
.ob-avhero.empty { background: var(--grad); }
.ob-avhero svg { width: 34%; height: 34%; fill: none; stroke: #fff; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }
.ob-avhero img { width: 100%; height: 100%; object-fit: cover; }
@keyframes av-pop { from { scale: .88; opacity: .6; } }
.ob-avstep .ob-go { display: none; }
.ob-avstep.picked .ob-go { display: grid; }
.ob-photo { background: var(--grad); color: #fff; box-shadow: 0 10px 24px color-mix(in srgb, var(--primary) 35%, transparent); }
.ob-avstep.picked .ob-photo { background: var(--primary-soft); color: var(--primary); box-shadow: none; min-height: 50px; margin-top: 10px; font-size: 15px; }
.ob-avstep.picked .ob-skipav { display: none; }
.ob-or { margin-top: 22px; text-align: center; font-size: 13px; font-weight: 600; color: var(--muted); }
.ob-avrow { display: flex; align-items: center; gap: 4px; margin-top: 10px; }
.ob-arr { width: 30px; height: 30px; flex: none; border-radius: 50%; display: grid; place-items: center; color: var(--muted); transition: background-color .15s, color .15s, opacity .2s, transform .2s var(--spring); }
.ob-arr svg { width: 16px; height: 16px; stroke-width: 2.2; }
.ob-arr.r svg { transform: rotate(180deg); }
.ob-arr:disabled { opacity: .22; cursor: default; }
.ob-avstrip { flex: 1; min-width: 0; display: flex; gap: 10px; overflow-x: auto; padding: 8px 8px; scrollbar-width: none; scroll-snap-type: x proximity;
  -webkit-mask-image: linear-gradient(90deg, transparent, #000 12px, #000 calc(100% - 12px), transparent); mask-image: linear-gradient(90deg, transparent, #000 12px, #000 calc(100% - 12px), transparent); }
.ob-avstrip::-webkit-scrollbar { display: none; }
.ob-av { width: 44px; height: 44px; flex: none; border-radius: 50%; background: var(--c); display: grid; place-items: center; font-size: 22px; scroll-snap-align: start; transition: transform .2s var(--spring), box-shadow .2s; }
.ob-av:active { transform: scale(.9); }
.ob-av.on { box-shadow: 0 0 0 2px var(--bg), 0 0 0 4px var(--primary); }

/* ---------- pantalla de entrada ---------- */
.login-lang { width: 132px; position: relative; z-index: 3; }
.login-lang .dd-btn { min-height: 40px; padding: 0 12px 0 16px; font-size: 13px; font-weight: 700; border-radius: 999px; background: rgba(255, 255, 255, .94); color: #3B3BC9; border: 0; }
.login-lang .dd-chev { stroke: #3B3BC9; }
.login-lang .dd-list { right: 0; left: auto; min-width: 232px; }
.login.auth { display: block; max-width: none; min-height: 100dvh; padding: 0; margin: 0; text-align: left; }
.auth-hero { background: var(--ob-grad); color: #fff; padding: calc(env(safe-area-inset-top) + 22px) 24px 72px; border-radius: 0 0 34px 34px; position: relative; overflow: hidden; }
.auth-hero::after { content: ''; position: absolute; right: -60px; top: -40px; width: 220px; height: 220px; border-radius: 50%; background: radial-gradient(circle, rgba(255, 214, 107, .35), transparent 70%); pointer-events: none; }
.auth-copy { position: relative; z-index: 2; }
.auth-copy h2 { margin-top: 22px; font-size: 27px; line-height: 1.15; font-weight: 800; letter-spacing: -.5px; }

.auth-copy p { margin-top: 8px; font-size: 14px; color: rgba(255, 255, 255, .86); }
.auth-collage { display: none; }
.auth-main { position: relative; z-index: 2; max-width: 460px; margin: -40px auto 0; padding: 0 20px 40px; display: flex; flex-direction: column; gap: 14px; }
.auth-card { background: var(--surface); border: 1px solid var(--line); border-radius: 28px; padding: 20px; box-shadow: var(--shadow-lg); display: flex; flex-direction: column; gap: 18px; animation: oc-in .5s var(--spring) backwards; }
.auth-card form { display: flex; flex-direction: column; gap: 14px; }
.auth-invite { background: var(--surface); border: 1px solid var(--line); border-radius: 20px; padding: 14px 16px; box-shadow: var(--shadow); display: flex; flex-direction: column; gap: 2px; } .auth-invite span { color: var(--muted); font-size: 14px; }
.inp { position: relative; display: flex; align-items: center; }
.inp > svg.i { position: absolute; left: 14px; width: 20px; height: 20px; fill: none; stroke: var(--muted); stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; pointer-events: none; transition: stroke .15s; }
.inp:focus-within > svg.i { stroke: var(--primary); }
.field .inp input { padding-left: 44px; padding-right: 44px; }
.inp-eye { position: absolute; right: 6px; width: 36px; height: 36px; border-radius: 12px; display: grid; place-items: center; color: var(--muted); transition: background-color .15s, color .15s; }
.inp-eye svg.i { width: 20px; height: 20px; fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }
.inp-eye.on { color: var(--primary); }
@media (min-width: 900px) {
  .login.auth { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); }
  .auth-hero { border-radius: 0; padding: 36px clamp(32px, 4vw, 64px); display: flex; flex-direction: column; min-height: 100dvh; }
  .auth-copy h2 { font-size: clamp(38px, 3.8vw, 58px); letter-spacing: -1.5px; } .auth-copy h2 br { display: inline; }
  .auth-copy p { font-size: 17px; }
  .auth-collage { display: block; flex: 1; position: relative; min-height: 360px; }
  .auth-collage .ob-collage { position: absolute; left: 50%; top: 50%; translate: -50% -50%; width: 100%; max-width: 560px; height: min(100%, 560px); min-height: 0; font-size: 17px; margin: 0; }
  .auth-main { max-width: none; margin: 0; padding: 48px; justify-content: center; align-items: center; }
  .auth-main > * { width: min(100%, 500px); }
  .auth-card { padding: 40px; border-radius: 34px; gap: 26px; }
  .auth-head h1 { font-size: 34px; }
  .auth-head p { font-size: 16px; }
  .auth-card .seg button { padding: 13px; font-size: 16px; }
  .auth-card .field > label { font-size: 14px; }
  .auth-card .field input { min-height: 58px; font-size: 17px; border-radius: 16px; }
  .auth-card .btn { min-height: 60px; font-size: 17px; border-radius: 18px; }
}

.q { color: #FF6B9D; }
.ob-hero .q, .auth-hero .q { color: #FFD66B; }

/* ---------- capa de movimiento (solo con puntero; todo respeta reduced-motion) ---------- */
button, .btn, .chip { transition: transform .2s var(--spring), background-color .18s, box-shadow .2s, color .18s, border-color .18s, filter .18s; }
:focus-visible { outline: 2px solid var(--primary); outline-offset: 2px; }
.dd-btn:focus-visible, .field input:focus-visible { outline: 0; }

/* calendario de la app: más suave, redondeado y con respuesta al tocar */
.cf-cal { border-radius: 28px; }
.cf-cell { border-radius: 18px; transition: transform .22s var(--spring), box-shadow .2s, background-color .2s; isolation: isolate; }
.cf-cell::before { content: ''; position: absolute; inset: 0; border-radius: inherit; z-index: -1; background: radial-gradient(circle at 50% 40%, color-mix(in srgb, var(--primary) 13%, transparent), transparent 75%); opacity: 0; scale: .5; transition: opacity .25s, scale .35s var(--spring); }
.cf-cell .n { transition: background-color .2s, color .2s, transform .22s var(--spring); }
.cf-cell .d { transition: scale .2s var(--spring); }
.cf-cell:active { transform: scale(.93); background: transparent; }
.cf-cell:active::before { opacity: 1; scale: 1.1; }
.cf-cell.today .n { box-shadow: 0 6px 14px color-mix(in srgb, var(--primary) 38%, transparent); animation: today 3s ease-out infinite; }
@keyframes today { 0% { box-shadow: 0 0 0 0 color-mix(in srgb, var(--primary) 45%, transparent); } 70%, 100% { box-shadow: 0 0 0 11px transparent; } }
.cf-cal-head .icon-btn { border-radius: 50%; transition: background-color .15s, transform .22s var(--spring), color .15s; }
.cf-cell .chips b { transition: transform .18s var(--spring), filter .18s; }
@media (hover: hover) {
  .cf-cell:not(.out):hover { transform: translateY(-2px) scale(1.05); z-index: 2; box-shadow: 0 10px 22px color-mix(in srgb, var(--primary) 16%, transparent); background: color-mix(in srgb, var(--primary-soft) 55%, transparent); }
  .cf-cell:not(.out):hover::before { opacity: 1; scale: 1; }
  .cf-cell:not(.out):hover .n { color: var(--primary); transform: scale(1.12); }
  .cf-cell.today:hover .n { color: #fff; }
  .cf-cell:hover .d { scale: 1.45; }
  .cf-cell:hover .chips b { filter: brightness(1.08); transform: translateX(2px); }
  .cf-cal-head .icon-btn:hover { background: var(--primary-soft); color: var(--primary); transform: scale(1.12); }
  .cf-legend span, .abs-list .row { transition: transform .2s var(--spring), background-color .18s; }
  .abs-list .row:hover { transform: translateX(3px); }
  .chip:hover, .dp-chip:hover, .pick-chip:hover { transform: translateY(-2px); }
  .stack .avatar { transition: transform .22s var(--spring); } .stack .avatar:hover { transform: translateY(-4px) scale(1.12); z-index: 2; }
  .fab:hover { transform: scale(1.08) rotate(6deg); }
  .seg button:hover:not(.on) { background: color-mix(in srgb, var(--surface) 60%, transparent); }
  .dd-btn:hover { border-color: var(--primary); }
  .ob-btn:hover { transform: translateY(-2px); }
  .ob-btn.primary:hover, .ob-photo:hover { box-shadow: 0 16px 32px color-mix(in srgb, var(--primary) 45%, transparent); filter: brightness(1.05); }
  .ob-btn.light:hover { box-shadow: 0 14px 30px rgba(20, 21, 43, .22); }
  .ob-btn.ghost:hover { background: rgba(255, 255, 255, .3); }
  .ob-link:hover { color: var(--primary); }
  .ob-back:hover { background: color-mix(in srgb, currentColor 12%, transparent); transform: translateX(-2px); }
  .ob-arr:hover:not(:disabled) { background: var(--surface); color: var(--primary); box-shadow: var(--shadow); transform: scale(1.12); }
  .ob-av:hover { transform: translateY(-3px) scale(1.1); }
  .ob-avwrap:hover .ob-avhero { transform: scale(1.04) rotate(-1.5deg); }
  .osc-resp button:hover:not(.on) { transform: translateY(-2px); background: color-mix(in srgb, var(--rc) 22%, #fff); }
  .osc-pay:hover { transform: translateY(-2px); }
  .os-card:hover { transform: translateY(-2px); }
  .auth-card .btn:hover { box-shadow: 0 14px 28px color-mix(in srgb, var(--primary) 40%, transparent); }
  .inp-eye:hover { background: var(--surface-2); color: var(--ink); }
}
@media (prefers-reduced-motion: reduce) {
  .oc, .cf-cell.today .n, .os-cal .d, .ob-avhero, .os-card, .os-abs, .auth-card { animation: none !important; }
}

.avatar img { width: 100%; height: 100%; object-fit: cover; display: block; }

/* ---------- colores de respuesta (toda la app) ---------- */
:root { --maybe: #E8890C; }
html[data-theme="dark"] { --maybe: #FFA94D; }
.chip.maybe { background: color-mix(in srgb, var(--maybe) 17%, transparent); color: var(--maybe); }
.seg.resp button[data-s], .quick .btn[data-s] { background: color-mix(in srgb, var(--rc) 13%, transparent); color: var(--rc); font-weight: 800; box-shadow: none; }
[data-s=accepted] { --rc: var(--ok); } [data-s=maybe] { --rc: var(--maybe); } [data-s=declined] { --rc: var(--bad); }
.seg.resp button.on[data-s] { background: var(--rc); color: #fff; box-shadow: 0 8px 18px color-mix(in srgb, var(--rc) 30%, transparent); }
@media (hover: hover) { .seg.resp button[data-s]:not(.on):hover, .quick .btn[data-s]:hover { background: color-mix(in srgb, var(--rc) 24%, transparent); filter: none; } }

/* ---------- calendario por semanas con barras continuas ---------- */
.cf-grid { display: flex; flex-direction: column; gap: var(--rg, 2px); }
.cf-week { position: relative; --bt: 36px; --lh: 16px; }
.cf-cells { display: grid; grid-template-columns: repeat(7, minmax(0, 1fr)); column-gap: var(--cg, 0px); }
.cf-week .cf-cell { aspect-ratio: auto; min-height: max(46px, calc(var(--bt) + var(--lanes, 0) * (var(--lh) + 2px) + 6px)); border: 0; }
.cf-bars { position: absolute; left: 0; right: 0; top: var(--bt); display: grid; grid-template-columns: repeat(7, minmax(0, 1fr)); column-gap: var(--cg, 0px); grid-auto-rows: var(--lh); row-gap: 2px; pointer-events: none; z-index: 1; }
.cf-bar { grid-column: var(--c) / span var(--n); grid-row: var(--l); margin: 0 2px; padding: 0 6px; font-size: 10px; font-weight: 800; line-height: var(--lh); border-radius: 6px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; text-align: left; transform-origin: left center; animation: bar-in .5s var(--spring) backwards; animation-delay: calc(var(--i) * 35ms); }
@keyframes bar-in { from { scale: 0 1; opacity: 0; } }
.cf-bar.away { background: color-mix(in srgb, var(--mc) 20%, transparent); color: color-mix(in srgb, var(--mc) 72%, var(--ink)); box-shadow: inset 3px 0 0 var(--mc); }
.cf-bar.plan { background: var(--grad); color: #fff; }
.cf-bar.cl { margin-left: 0; border-top-left-radius: 0; border-bottom-left-radius: 0; box-shadow: none; }
.cf-bar.cl::before { content: '‹ '; }
.cf-bar.cr { margin-right: 0; border-top-right-radius: 0; border-bottom-right-radius: 0; }
.cf-cell .more { position: absolute; right: 5px; bottom: 3px; font-size: 10px; font-weight: 800; font-style: normal; color: var(--muted); }
@media (min-width: 760px) {
  .cf-grid { --cg: 4px; --rg: 4px; }
  .cf-week { --bt: 38px; --lh: 20px; }
  .cf-week .cf-cell { min-height: max(96px, calc(var(--bt) + var(--lanes, 0) * (var(--lh) + 2px) + 8px)); border: 1px solid var(--line); }
  .cf-bar { font-size: 12px; padding: 0 8px; border-radius: 7px; }
}
.os-cal .cf-grid { --cg: 0px; --rg: 2px; }
.os-cal .cf-week { --bt: 28px; --lh: 15px; }
.os-cal .cf-week .cf-cell { border: 0; min-height: max(40px, calc(var(--bt) + var(--lanes, 0) * 17px + 4px)); pointer-events: none; font-size: 13px; padding-top: 3px; }
.os-cal .cf-bar { font-size: 9.5px; padding: 0 5px; border-radius: 5px; }
.os-cal .cf-bar.cl { border-radius: 0 5px 5px 0; }

/* ---------- foto o avatar: grupo centrado y proporcionado ---------- */
.ob-avgroup { margin-block: auto; display: flex; flex-direction: column; gap: clamp(22px, 4.5vh, 40px); padding-block: 20px; }
.ob-avgroup .ob-avwrap { margin: 0 auto; }
.ob-avgroup .ob-foot { margin-top: 0; padding-top: 0; }

/* ---------- crear o unirse a un grupo ---------- */
.gate-grid { display: flex; flex-direction: column; gap: 14px; margin-top: 26px; }
.gate-card { display: flex; flex-direction: column; gap: 12px; text-align: left; padding: 18px; border-radius: 24px; background: var(--surface); border: 1px solid var(--line); box-shadow: var(--shadow); transition: transform .22s var(--spring), box-shadow .2s, border-color .2s; }
button.gate-card { flex-direction: row; align-items: center; gap: 14px; width: 100%; }
.gate-card.join { display: grid; grid-template-columns: 48px 1fr; gap: 12px 14px; align-items: center; }
.gate-card.join > .field, .gate-card.join > .err, .gate-card.join > .btn { grid-column: 1 / -1; }
.gate-ic { width: 48px; height: 48px; flex: none; border-radius: 16px; display: grid; place-items: center; background: var(--primary-soft); font-size: 22px; }
.gate-card b { display: block; font-size: 17px; } .gate-card small { display: block; margin-top: 2px; color: var(--muted); font-size: 13px; line-height: 1.4; }
.ob-gate .ob-link { margin-top: 22px; }
.auth-head h1 { font-size: 26px; line-height: 1.15; font-weight: 800; letter-spacing: -.5px; }
.auth-head p { margin-top: 4px; color: var(--muted); font-size: 15px; }
@media (hover: hover) { button.gate-card:hover, .gate-card.join:hover { transform: translateY(-3px); border-color: var(--primary); box-shadow: var(--shadow-lg); } }

/* legal, ranking, perfil de miembro, celebración */
.auth-legal { margin: 14px 0 0; text-align: center; font-size: 13px; color: var(--muted); }
.auth-legal button { background: none; border: 0; padding: 4px; color: inherit; font: inherit; text-decoration: underline; text-underline-offset: 3px; cursor: pointer; }
@media (hover:hover) { .auth-legal button:hover { color: var(--primary); } }
.legal h3 { margin: 18px 0 4px; font-size: 15px; }
.legal p { margin: 0; line-height: 1.5; color: var(--muted); font-size: 14px; }
.legal .seg { margin-bottom: 4px; }
.rank-tabs { margin-bottom: 8px; }
.rank-row { display: flex; align-items: center; gap: 12px; padding: 10px 0; border-bottom: 1px solid var(--line, rgba(128,128,128,.18)); }
.rank-row:last-child { border-bottom: 0; }
.rank-pos { width: 26px; text-align: center; font-weight: 800; }
.rank-n { font-weight: 900; font-size: 20px; }
.att-row { display: flex; align-items: center; gap: 10px; padding: 8px 0; }
.att-row .seg { margin-left: auto; width: auto; }
.mem-head { display: flex; align-items: center; gap: 14px; margin-bottom: 8px; }
.mem-head b { font-size: 20px; }
.mem-sec { margin: 16px 0 6px; font-size: 13px; font-weight: 800; text-transform: uppercase; letter-spacing: .04em; color: var(--muted); }
.mem-it { display: flex; gap: 10px; align-items: center; padding: 8px 0; }
.rec-code { font: 800 26px/1.3 ui-monospace, Menlo, monospace; letter-spacing: .08em; text-align: center; padding: 18px; border-radius: 16px; background: var(--card, rgba(128,128,128,.1)); user-select: all; word-break: break-all; }
.sw-row { display: flex; align-items: center; gap: 12px; }
.sw-row > div { flex: 1; }
.bd-main .avatar { border: 1.1cqw solid #fff; box-shadow: 0 2cqw 6cqw rgba(0,0,0,.35); font-size: 52px; }
.person-row[data-act] { cursor: pointer; border-radius: 12px; }
@media (hover:hover) { .person-row[data-act]:hover { background: color-mix(in srgb, var(--primary) 8%, transparent); } }
.sc-default .bd-main { top: 15cqw; } .bd-main .avatar { font-size: 68px; }
.att-row .seg { flex: none; } .att-row .seg button { white-space: nowrap; padding-left: 14px; padding-right: 14px; }
.att-row > span { flex: 1; min-width: 0; }
.rank-row .grow { flex: 1; min-width: 0; }
.att-row .avatar, .rank-row .avatar, .mem-head .avatar { flex: none; }
.legal h3 { margin: 14px 0 0 !important; } .legal h3 + p { margin: 2px 0 0 !important; }

/* calendario: semana, swipe y sin zoom */
.cf-cal { touch-action: pan-y; }
.slide-next .cf-grid, .slide-next .wk-list { animation: slide-next .32s var(--spring, ease-out) both; }
.slide-prev .cf-grid, .slide-prev .wk-list { animation: slide-prev .32s var(--spring, ease-out) both; }
@keyframes slide-next { from { opacity: 0; transform: translateX(28px); } }
@keyframes slide-prev { from { opacity: 0; transform: translateX(-28px); } }
.cal-mode { width: auto; flex: none; } .cal-mode button { padding: 6px 12px; font-size: 13px; }
.cf-legend { flex-wrap: wrap; align-items: center; row-gap: 8px; }
.wk-list { display: flex; flex-direction: column; gap: 6px; margin: 4px 0 10px; }
.wk-day { display: flex; gap: 12px; align-items: stretch; text-align: left; width: 100%; padding: 10px 12px; border: 0; border-radius: 16px; background: color-mix(in srgb, var(--primary) 5%, transparent); color: inherit; font: inherit; cursor: pointer; transition: transform .2s var(--spring, ease), background .2s; }
.wk-day.today { background: color-mix(in srgb, var(--primary) 14%, transparent); box-shadow: inset 0 0 0 2px color-mix(in srgb, var(--primary) 45%, transparent); }
.wk-d { flex: none; width: 38px; display: flex; flex-direction: column; align-items: center; justify-content: center; }
.wk-d small { font-size: 11px; font-weight: 800; text-transform: uppercase; color: var(--muted); } .wk-d b { font-size: 20px; line-height: 1.1; }
.wk-items { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 4px; justify-content: center; }
.wk-it { display: flex; flex-wrap: wrap; align-items: baseline; gap: 2px 8px; padding: 5px 9px; border-radius: 10px; font-size: 13px; font-weight: 700; }
.wk-it.plan { background: var(--grad); color: #fff; } .wk-it.plan small { opacity: .85; font-weight: 600; } .wk-it .tt { font-weight: 800; }
.wk-it.away { background: color-mix(in srgb, var(--mc) 18%, transparent); color: color-mix(in srgb, var(--mc) 72%, var(--ink)); box-shadow: inset 3px 0 0 var(--mc); }
.wk-it.bd { background: color-mix(in srgb, #F472B6 18%, transparent); }
.wk-empty { color: var(--muted); opacity: .5; padding-left: 4px; }
@media (hover:hover) { .wk-day:hover { transform: translateY(-1px); background: color-mix(in srgb, var(--primary) 10%, transparent); } }
.wk-day:has(.wk-empty) { padding-top: 6px; padding-bottom: 6px; } .wk-day:has(.wk-empty) .wk-d { flex-direction: row; gap: 6px; width: 70px; } .wk-day:has(.wk-empty) .wk-d b { font-size: 16px; }

/* ---------- asistente ---------- */
.asst { display: flex; flex-direction: column; min-height: calc(100dvh - 250px); }
.asst-scroll { flex: 1; display: flex; flex-direction: column; gap: 14px; padding-bottom: 18px; }
.asst-hero { margin: auto; text-align: center; display: flex; flex-direction: column; align-items: center; gap: 10px; padding: 18px 6px; max-width: 460px; }
.asst-orb { width: 68px; height: 68px; border-radius: 50%; display: grid; place-items: center; background: var(--grad); color: #fff; box-shadow: 0 14px 34px color-mix(in srgb, var(--primary) 40%, transparent); animation: bob 3.2s ease-in-out infinite; }
.asst-orb .i, .asst-av .i { width: 60%; height: 60%; stroke: currentColor; fill: none; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }
.asst-hero h2 { margin: 6px 0 0; font-size: 26px; letter-spacing: -.02em; } .asst-hero p { margin: 0; color: var(--muted); line-height: 1.5; }
.asst-sugs { display: flex; flex-wrap: wrap; gap: 8px; justify-content: center; margin-top: 8px; }
.asst-sug { border: 1px solid var(--line); background: var(--surface); color: var(--ink); border-radius: 99px; padding: 10px 14px; font: 700 14px/1.2 inherit; cursor: pointer; transition: transform .2s var(--spring, ease), box-shadow .2s, border-color .2s; }
@media (hover:hover) { .asst-sug:hover { transform: translateY(-2px); border-color: var(--primary); box-shadow: 0 8px 20px color-mix(in srgb, var(--primary) 18%, transparent); } }
.asst-msg { display: flex; gap: 10px; align-items: flex-start; animation: rise .35s cubic-bezier(.2, .7, .2, 1) both; }
.asst-msg.me { justify-content: flex-end; }
.asst-av { flex: none; width: 30px; height: 30px; border-radius: 50%; display: grid; place-items: center; background: var(--grad); color: #fff; margin-top: 2px; }
.asst-col { display: flex; flex-direction: column; gap: 8px; min-width: 0; max-width: min(86%, 560px); }
.asst-b { padding: 11px 15px; border-radius: 20px; line-height: 1.5; font-size: 15.5px; overflow-wrap: anywhere; background: var(--surface); border: 1px solid var(--line); border-top-left-radius: 6px; }
.asst-msg.me .asst-b { background: var(--grad); color: #fff; border: 0; border-radius: 20px 20px 6px 20px; max-width: min(86%, 560px); }
.asst-b.err { background: color-mix(in srgb, var(--bad) 10%, var(--surface)); }
.asst-b.typing { display: flex; gap: 5px; padding: 15px 16px; } .asst-b.typing i { width: 7px; height: 7px; border-radius: 50%; background: var(--muted); animation: typing 1.1s ease-in-out infinite; } .asst-b.typing i:nth-child(2) { animation-delay: .15s; } .asst-b.typing i:nth-child(3) { animation-delay: .3s; }
@keyframes typing { 0%, 60%, 100% { transform: translateY(0); opacity: .4; } 30% { transform: translateY(-5px); opacity: 1; } }
.asst-card { display: flex; gap: 10px; align-items: center; text-align: left; padding: 10px 12px; border-radius: 16px; border: 1px solid color-mix(in srgb, var(--ok) 35%, var(--line)); background: color-mix(in srgb, var(--ok) 8%, var(--surface)); color: inherit; font: inherit; }
button.asst-card { cursor: pointer; transition: transform .2s var(--spring, ease); } @media (hover:hover) { button.asst-card:hover { transform: translateY(-1px); } }
.ac-ic { font-size: 20px; } .ac-t { display: flex; flex-direction: column; min-width: 0; } .ac-t small { color: var(--muted); font-weight: 600; }
.asst-confirm { display: flex; flex-direction: column; gap: 10px; padding: 12px; border-radius: 16px; border: 1px solid color-mix(in srgb, var(--bad) 40%, var(--line)); background: color-mix(in srgb, var(--bad) 7%, var(--surface)); }
.asst-confirm small { display: block; color: var(--muted); font-weight: 600; } .asst-confirm .btn-row { margin: 0; }
.asst-composer { position: sticky; bottom: calc(var(--nav-h) + env(safe-area-inset-bottom) + 18px); display: flex; gap: 8px; padding: 8px; border-radius: 26px; background: color-mix(in srgb, var(--surface) 92%, transparent); backdrop-filter: blur(14px); border: 1px solid var(--line); box-shadow: var(--shadow-lg); }
.asst-composer input { flex: 1; min-width: 0; border: 0; background: transparent; padding: 0 12px; font-size: 16px; color: inherit; outline: none; height: 46px; }
.asst-send { flex: none; width: 46px; height: 46px; border-radius: 50%; border: 0; background: var(--grad); color: #fff; display: grid; place-items: center; cursor: pointer; transition: transform .2s var(--spring, ease), opacity .2s; }
.asst-send .i { width: 22px; height: 22px; stroke: currentColor; fill: none; stroke-width: 2.2; stroke-linecap: round; stroke-linejoin: round; } .asst-send:disabled { opacity: .5; } @media (hover:hover) { .asst-send:not(:disabled):hover { transform: scale(1.08); } }
.asst-note { text-align: center; margin: 10px 0 0; font-size: 12px; color: var(--muted); } .linklike { background: none; border: 0; padding: 0; color: var(--primary); font: inherit; font-weight: 700; cursor: pointer; text-decoration: underline; text-underline-offset: 3px; }
@media (min-width: 1024px) { .asst-composer { bottom: 16px; } .asst { min-height: calc(100dvh - 190px); } .asst-scroll { max-width: 760px; width: 100%; margin: 0 auto; } .asst-composer, .asst-note { max-width: 760px; width: 100%; margin-left: auto; margin-right: auto; } }

/* ---- ajustes al estilo Friends: tarjetas con filas e íconos de línea ---- */
.st-body { display: flex; flex-direction: column; gap: 14px; }
.st-hero { display: flex; align-items: center; gap: 14px; width: 100%; text-align: left; padding: 16px; background: var(--surface); border: 1px solid var(--line); border-radius: 22px; box-shadow: var(--shadow); }
.st-hero .grow { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 2px; align-items: flex-start; }
.st-hero b { font-size: 20px; font-weight: 800; letter-spacing: -.02em; }
.st-badge { margin-top: 6px; padding: 5px 12px; border-radius: 999px; background: var(--grad); color: var(--primary-ink); font-size: 12.5px; font-weight: 800; }
.st-card { background: var(--surface); border: 1px solid var(--line); border-radius: 22px; padding: 6px 6px 8px; box-shadow: var(--shadow); }
.st-card h3 { font-size: 12px; font-weight: 800; letter-spacing: .08em; text-transform: uppercase; color: var(--muted); padding: 12px 12px 6px; }
.st-row { display: flex; align-items: center; gap: 14px; width: 100%; padding: 10px 10px; border-radius: 16px; text-align: left; transition: background-color .15s; }
.st-row:active { background: var(--primary-soft); }
.st-tx { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 1px; }
.st-tx b { font-size: 16px; font-weight: 800; letter-spacing: -.01em; }
.st-tx span { font-size: 13.5px; color: var(--muted); font-weight: 500; }
.st-val { font-size: 13.5px; font-weight: 700; color: var(--muted); white-space: nowrap; }
.st-ic { width: 42px; height: 42px; border-radius: 14px; background: var(--primary-soft); color: var(--primary); display: grid; place-items: center; flex: none; }
.st-ic svg.i, .st-go svg.i { fill: none; stroke: currentColor; stroke-width: 1.9; stroke-linecap: round; stroke-linejoin: round; width: 22px; height: 22px; }
.st-go { color: var(--muted); display: grid; place-items: center; flex: none; }
.st-go svg.i { width: 18px; height: 18px; }
.st-row.bad .st-tx b { color: var(--bad); } .st-row.bad .st-ic { background: color-mix(in srgb, var(--bad) 12%, transparent); color: var(--bad); }
.st-logout { display: flex; align-items: center; justify-content: center; gap: 10px; width: 100%; padding: 16px; border-radius: 18px; background: color-mix(in srgb, var(--bad) 11%, transparent); color: var(--bad); font-weight: 800; font-size: 16px; }
.st-logout svg.i { fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; width: 20px; height: 20px; }
.seg button svg.i { width: 16px; height: 16px; vertical-align: -3px; fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }

/* ---- botón + flotante ---- */
.fab { position: fixed; z-index: 19; right: 18px; bottom: calc(var(--nav-h) + env(safe-area-inset-bottom) + 28px); width: 58px; height: 58px; border-radius: 50%; display: grid; place-items: center; background: var(--grad); color: var(--primary-ink); box-shadow: 0 12px 28px color-mix(in srgb, var(--primary) 45%, transparent); transition: transform .2s var(--spring); }
.fab:active { transform: scale(.92); }
.fab svg.i { width: 26px; height: 26px; fill: none; stroke: currentColor; stroke-width: 2.4; stroke-linecap: round; }
@media (min-width: 1024px) { .fab { right: 36px; bottom: 32px; } }
html.chat-lock .fab { display: none; }

/* ---- iconos de la barra superior ---- */
.icon-btn svg.i { width: 22px; height: 22px; fill: none; stroke: currentColor; stroke-width: 1.9; stroke-linecap: round; stroke-linejoin: round; }
.side-toggle svg.i { fill: none; stroke: currentColor; stroke-width: 1.9; stroke-linecap: round; stroke-linejoin: round; }

/* ---- clima ---- */
.wx-chip { height: 44px; padding: 0 13px 0 11px; border-radius: 15px; display: inline-flex; align-items: center; gap: 6px; background: var(--surface); border: 1px solid var(--line); box-shadow: var(--shadow); color: var(--ink); font-weight: 800; font-size: 15px; }
.wx-chip svg.i { width: 22px; height: 22px; fill: none; stroke: var(--primary); stroke-width: 1.9; stroke-linecap: round; stroke-linejoin: round; }
.wx-now { display: flex; align-items: center; gap: 16px; }
.wx-now svg.i { width: 56px; height: 56px; fill: none; stroke: var(--primary); stroke-width: 1.6; stroke-linecap: round; stroke-linejoin: round; }
.wx-now b { display: block; font-size: 44px; line-height: 1; font-weight: 800; letter-spacing: -.03em; }
.wx-days { display: grid; grid-template-columns: repeat(5, 1fr); gap: 8px; }
.wx-day { display: flex; flex-direction: column; align-items: center; gap: 6px; padding: 12px 4px; border-radius: 16px; background: var(--surface-2); font-size: 13px; font-weight: 700; text-transform: capitalize; }
.wx-day svg.i { width: 24px; height: 24px; fill: none; stroke: var(--primary); stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }

/* ---- instalar ---- */
.inst-card { display: flex; align-items: center; gap: 14px; text-align: left; width: 100%; }
.inst-card .grow { flex: 1; min-width: 0; }
.inst-card > svg.i { width: 18px; height: 18px; fill: none; stroke: var(--muted); stroke-width: 2; stroke-linecap: round; }
.inst-steps { list-style: none; display: flex; flex-direction: column; gap: 12px; padding: 0; }
.inst-steps li { display: flex; align-items: center; gap: 14px; padding: 14px; border-radius: 16px; background: var(--surface); border: 1px solid var(--line); font-weight: 600; }
.inst-steps .n { width: 30px; height: 30px; flex: none; border-radius: 50%; background: var(--grad); color: var(--primary-ink); display: grid; place-items: center; font-weight: 800; }

/* ---- volver atrás en hojas y pantallas ---- */
.sheet-back { display: inline-flex; align-items: center; gap: 2px; margin: 0 0 10px; padding: 7px 14px 7px 8px; border-radius: 999px; background: var(--surface-2); color: var(--ink); font-weight: 700; font-size: 14px; transition: background-color .15s, transform .2s var(--spring); }
.sheet-back svg { width: 18px; height: 18px; fill: none; stroke: currentColor; stroke-width: 2.2; stroke-linecap: round; stroke-linejoin: round; transition: transform .2s var(--spring); }
.sheet-back:active { transform: scale(.95); }
@media (hover: hover) { .sheet-back:hover { background: var(--primary-soft); color: var(--primary); } .sheet-back:hover svg { transform: translateX(-3px); } }

/* ---- ajustes: hero con "Editar" ---- */
.st-edit { font-size: 13.5px; font-weight: 800; color: var(--primary); }

/* ---- instalar junto al clima ---- */
.inst-chip { display: inline-flex; align-items: center; height: 44px; border-radius: 15px; background: var(--primary-soft); border: 1px solid color-mix(in srgb, var(--primary) 25%, transparent); color: var(--primary); animation: chip-in .5s var(--spring) backwards; overflow: hidden; }
.inst-go { display: inline-flex; align-items: center; gap: 6px; height: 100%; padding: 0 6px 0 12px; font-weight: 800; font-size: 14px; color: inherit; }
.inst-go svg.i { width: 19px; height: 19px; fill: none; stroke: currentColor; stroke-width: 2.1; stroke-linecap: round; stroke-linejoin: round; }
.inst-x { width: 30px; height: 100%; display: grid; place-items: center; font-size: 12px; color: color-mix(in srgb, var(--primary) 70%, var(--muted)); }
@keyframes chip-in { from { opacity: 0; transform: translateY(-6px) scale(.9); } }


/* ---- clima con vida ---- */
@keyframes wx-spin { to { transform: rotate(360deg); } }
@keyframes wx-float { 0%, 100% { transform: translate(0, 0); } 50% { transform: translate(2px, -2px); } }
@keyframes wx-rain { 0%, 100% { transform: translateY(-1px); } 50% { transform: translateY(2px); } }
@keyframes wx-flash { 0%, 86%, 100% { opacity: 1; } 90% { opacity: .35; } 94% { opacity: 1; } 97% { opacity: .5; } }
[data-k="sun"] > svg.i { animation: wx-spin 22s linear infinite; }
[data-k="partly"] > svg.i, [data-k="cloud"] > svg.i, [data-k="fog"] > svg.i, [data-k="snow"] > svg.i { animation: wx-float 4.5s ease-in-out infinite; }
[data-k="rain"] > svg.i { animation: wx-rain 1.4s ease-in-out infinite; }
[data-k="storm"] > svg.i { animation: wx-flash 3.5s ease-in-out infinite; }
.wx-chip { animation: chip-in .5s var(--spring) backwards; transition: transform .2s var(--spring), box-shadow .2s; }
.wx-day { transition: transform .2s var(--spring), background-color .15s; }
@media (hover: hover) {
  .wx-chip:hover { transform: translateY(-2px); box-shadow: var(--shadow-lg); }
  .wx-chip:hover svg.i { animation-duration: 1.2s; }
  .wx-day:hover { transform: translateY(-4px); background: var(--primary-soft); }
  .inst-chip:hover { transform: translateY(-2px); box-shadow: var(--shadow-lg); } .inst-chip { transition: transform .2s var(--spring), box-shadow .2s; }
  .inst-x:hover { color: var(--bad); }
  .st-row:hover { background: var(--primary-soft); }
  .st-row:hover .st-ic { transform: scale(1.1) rotate(-5deg); }
  .st-row:hover .st-go { transform: translateX(3px); color: var(--primary); }
  .st-hero:hover { transform: translateY(-2px); box-shadow: var(--shadow-lg); }
  .st-hero:hover .st-go { transform: translateX(3px); color: var(--primary); }
  .st-logout:hover { background: color-mix(in srgb, var(--bad) 20%, transparent); transform: translateY(-1px); }
  .fab:hover { transform: translateY(-3px) rotate(90deg) scale(1.05); }
  .icon-btn:hover svg.i { transform: rotate(18deg); }
}
.st-ic, .st-go, .st-hero, .st-logout { transition: transform .22s var(--spring), background-color .15s, box-shadow .2s, color .15s; }
.icon-btn svg.i { transition: transform .3s var(--spring); }
@media (prefers-reduced-motion: reduce) { [data-k] > svg.i, .inst-chip, .wx-chip { animation: none !important; } }

/* ---- asistente: acciones rápidas ---- */
.asst-acts { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; width: 100%; margin-top: 10px; }
.asst-tile { display: flex; align-items: center; gap: 12px; padding: 14px; text-align: left; border-radius: 18px; background: var(--surface); border: 1px solid var(--line); box-shadow: var(--shadow); font-weight: 800; font-size: 14.5px; line-height: 1.2; letter-spacing: -.01em; animation: tile-in .5s var(--spring) backwards; animation-delay: calc(var(--i) * 70ms); transition: transform .22s var(--spring), box-shadow .2s, border-color .15s; }
.asst-tile-ic { width: 42px; height: 42px; flex: none; border-radius: 14px; display: grid; place-items: center; background: color-mix(in srgb, var(--c) 14%, transparent); color: var(--c); transition: transform .25s var(--spring); }
.asst-tile-ic svg { width: 22px; height: 22px; fill: none; stroke: currentColor; stroke-width: 1.9; stroke-linecap: round; stroke-linejoin: round; }
.asst-tile:active { transform: scale(.96); }
@keyframes tile-in { from { opacity: 0; transform: translateY(12px) scale(.94); } }
@media (hover: hover) { .asst-tile:hover { transform: translateY(-3px); border-color: var(--c); box-shadow: 0 12px 26px color-mix(in srgb, var(--c) 22%, transparent); } .asst-tile:hover .asst-tile-ic { transform: scale(1.12) rotate(-6deg); } }
@media (max-width: 380px) { .asst-acts { grid-template-columns: 1fr; } }
.asst-sugs { margin-top: 4px; }

/* ---- hojas de tamaño fijo (Ajustes y sus pantallas) ---- */
.sheet.tall { height: auto; min-height: min(60dvh, 420px); }
@media (min-width: 560px) { .sheet.tall { height: auto; min-height: 380px; max-height: min(86vh, 760px); } }

/* ---- interruptor ---- */
.sw { width: 50px; height: 30px; border-radius: 999px; background: var(--line); position: relative; flex: none; transition: background-color .25s; }
.sw i { position: absolute; top: 3px; left: 3px; width: 24px; height: 24px; border-radius: 50%; background: #fff; box-shadow: 0 2px 6px rgba(0, 0, 0, .25); transition: transform .3s var(--spring); }
.sw.on { background: var(--primary); } .sw.on i { transform: translateX(20px); }

/* ---- lista de opciones (idioma) ---- */
.lang-list { padding: 6px; display: flex; flex-direction: column; gap: 2px; }
.pick-row { display: flex; align-items: center; justify-content: space-between; gap: 12px; width: 100%; padding: 15px 14px; border-radius: 16px; text-align: left; font-size: 16px; transition: background-color .15s, transform .2s var(--spring); }
.pick-row b { font-weight: 700; }
.pick-row.on { background: var(--primary-soft); color: var(--primary); } .pick-row.on b { font-weight: 800; }
.pick-ck { width: 26px; height: 26px; border-radius: 50%; display: grid; place-items: center; background: var(--primary); color: #fff; opacity: 0; transform: scale(.4); transition: opacity .2s, transform .3s var(--spring); }
.pick-row.on .pick-ck { opacity: 1; transform: none; }
.pick-ck svg.i { width: 16px; height: 16px; fill: none; stroke: currentColor; stroke-width: 2.8; stroke-linecap: round; stroke-linejoin: round; }
@media (hover: hover) { .pick-row:hover { background: var(--primary-soft); transform: translateX(3px); } }

/* ---- perfil: avatar clicable y selector ---- */
.av-edit-wrap { display: flex; flex-direction: column; align-items: center; gap: 8px; }
.av-edit { position: relative; border-radius: 50%; transition: transform .25s var(--spring); }
.av-edit:active { transform: scale(.95); }
.av-badge { position: absolute; right: -2px; bottom: -2px; width: 34px; height: 34px; border-radius: 50%; display: grid; place-items: center; background: var(--grad); color: var(--primary-ink); border: 3px solid var(--surface); box-shadow: 0 4px 10px color-mix(in srgb, var(--primary) 35%, transparent); }
.av-badge svg.i { width: 17px; height: 17px; fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }
@media (hover: hover) { .av-edit:hover { transform: scale(1.05); } .av-edit:hover .av-badge { transform: rotate(-12deg) scale(1.1); } .av-badge { transition: transform .25s var(--spring); } }
.av-upload { display: flex; align-items: center; gap: 14px; width: 100%; padding: 14px; text-align: left; border-radius: 20px; background: var(--surface); border: 1.5px dashed color-mix(in srgb, var(--primary) 55%, transparent); transition: transform .2s var(--spring), background-color .15s; }
.av-upload:hover { background: var(--primary-soft); transform: translateY(-2px); }
.av-or { text-align: center; font-size: 13px; font-weight: 700; color: var(--muted); }
.av-grid2 { display: grid; grid-template-columns: repeat(auto-fill, minmax(58px, 1fr)); gap: 10px; }
.av2 { aspect-ratio: 1; border-radius: 50%; display: grid; place-items: center; font-size: 28px; background: color-mix(in srgb, var(--c) 16%, var(--surface)); border: 2.5px solid transparent; transition: transform .2s var(--spring), border-color .15s; }
.av2:active { transform: scale(.9); }
.av2.on { border-color: var(--primary); box-shadow: 0 0 0 3px color-mix(in srgb, var(--primary) 22%, transparent); }
@media (hover: hover) { .av2:hover { transform: translateY(-3px) scale(1.08); } .av2 span { display: block; transition: transform .25s var(--spring); } .av2:hover span { transform: rotate(-8deg) scale(1.1); } }

/* ---- Inicio: carteles y próximos cumpleaños ---- */
.alerts { display: flex; flex-direction: column; gap: 8px; }
.alerts:empty { display: none; }
.cartel { --c: var(--primary); display: flex; align-items: center; gap: 12px; padding: 11px 8px 11px 12px; border-radius: 18px; background: color-mix(in srgb, var(--c) 11%, var(--surface)); border: 1px solid color-mix(in srgb, var(--c) 28%, transparent); animation: tile-in .5s var(--spring) backwards; animation-delay: calc(var(--i) * 80ms); }
.cartel.k-storm { --c: #7C5CFF; } .cartel.k-frost, .cartel.k-snow { --c: #2F9BE8; } .cartel.k-heat { --c: #F08A24; } .cartel.k-rain { --c: #3B82F6; } .cartel.k-wind { --c: #14A39A; }
.cartel-ic { width: 36px; height: 36px; flex: none; border-radius: 12px; display: grid; place-items: center; background: color-mix(in srgb, var(--c) 18%, transparent); color: var(--c); }
.cartel-ic svg.i { width: 21px; height: 21px; fill: none; stroke: currentColor; stroke-width: 1.9; stroke-linecap: round; stroke-linejoin: round; animation: wx-float 3.5s ease-in-out infinite; }
.cartel.k-storm .cartel-ic svg.i { animation: wx-flash 3s ease-in-out infinite; }
.cartel-tx { flex: 1; min-width: 0; font-weight: 700; font-size: 14.5px; line-height: 1.25; }
.cartel-x { width: 30px; height: 30px; border-radius: 50%; flex: none; color: var(--muted); font-size: 12px; display: grid; place-items: center; }
.cartel-x:hover { background: color-mix(in srgb, var(--c) 16%, transparent); color: var(--ink); }
.bd-list { display: flex; flex-direction: column; gap: 4px; padding: 8px; }
.bd-row { display: flex; align-items: center; gap: 12px; padding: 8px; border-radius: 14px; transition: background-color .15s, transform .2s var(--spring); }
.bd-row .grow { flex: 1; display: flex; flex-direction: column; min-width: 0; } .bd-row .grow b { font-weight: 800; } .bd-row .grow .muted { font-size: 13px; }
.bd-left { font-size: 12.5px; font-weight: 800; color: var(--primary); background: var(--primary-soft); padding: 6px 11px; border-radius: 999px; white-space: nowrap; }
@media (hover: hover) { .bd-row:hover { background: var(--surface-2); transform: translateX(3px); } }

/* ---- encuestas, mensajes, Tu grupo ---- */
.notes { display: flex; flex-direction: column; gap: 8px; margin-bottom: 4px; }
.note { display: flex; align-items: center; gap: 6px; background: var(--grad); color: #fff; border-radius: 18px; padding: 4px 6px 4px 4px; animation: rise .35s ease both; transition: transform .15s; }
.note:hover { transform: translateY(-1px); }
.note-b { flex: 1; display: flex; align-items: center; gap: 10px; background: none; border: 0; color: inherit; text-align: left; padding: 6px; cursor: pointer; font: inherit; }
.note-t { font-size: 14px; line-height: 1.3; word-break: break-word; }
.note-x { background: none; border: 0; color: #fff; opacity: .8; cursor: pointer; padding: 6px; }
.note-more { align-self: flex-start; }
.link { background: none; border: 0; color: var(--accent, #7c5cff); font-weight: 700; font-size: 13px; cursor: pointer; padding: 4px 6px; }
.link.danger { color: #e5484d; }
.poll-card { display: flex; flex-direction: column; gap: 8px; animation: rise .35s ease both; }
.poll-h, .poll-f { display: flex; justify-content: space-between; align-items: center; font-size: 12px; }
.poll-k { font-weight: 800; letter-spacing: .06em; text-transform: uppercase; color: var(--muted); }
.poll-q { font-size: 17px; font-weight: 800; letter-spacing: -.01em; }
.poll-opt { position: relative; overflow: hidden; text-align: left; border: 1.5px solid var(--line); background: var(--surface); border-radius: 14px; padding: 0; cursor: pointer; font: inherit; color: inherit; transition: transform .15s, border-color .15s; }
.poll-opt:not([disabled]):hover { transform: translateY(-1px); border-color: var(--accent, #7c5cff); }
.poll-opt.mine { border-color: var(--accent, #7c5cff); }
.poll-opt.winner { border-color: #2fb36d; }
.poll-bar { position: absolute; inset: 0 auto 0 0; background: color-mix(in srgb, var(--accent, #7c5cff) 18%, transparent); transition: width .6s cubic-bezier(.2,.8,.2,1); }
.poll-row { position: relative; display: flex; align-items: center; gap: 8px; padding: 11px 14px; }
.poll-t { flex: 1; font-weight: 600; }
.poll-av { display: inline-flex; }
.poll-av > * { margin-left: -6px; }
.pl-optrow { display: flex; gap: 6px; margin-bottom: 8px; align-items: center; }
.pl-optrow input { flex: 1; }
.check-row { display: flex; align-items: center; gap: 10px; margin: 6px 0 14px; font-weight: 600; cursor: pointer; }
.check-row input { width: 20px; height: 20px; accent-color: var(--accent, #7c5cff); }
.grp-fold summary { cursor: pointer; font-weight: 800; list-style: none; padding: 2px 0 8px; }
.grp-fold summary::-webkit-details-marker { display: none; }
.grp-fold summary::after { content: '▾'; float: right; transition: transform .2s; }
.grp-fold[open] summary::after { transform: rotate(180deg); }
@keyframes rise { from { opacity: 0; transform: translateY(6px) scale(.98); } to { opacity: 1; transform: none; } }
.asst-mic { flex: none; width: 46px; height: 46px; border-radius: 50%; border: 1.5px solid var(--line); background: var(--surface); color: var(--text, inherit); display: grid; place-items: center; cursor: pointer; transition: transform .15s, background .2s; }
.asst-mic .i { width: 21px; height: 21px; stroke: currentColor; fill: none; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }
.asst-mic:hover { transform: scale(1.06); }
.asst-mic.busy { opacity: .6; pointer-events: none; }
.asst-mic.on { background: #e5484d; border-color: #e5484d; color: #fff; animation: micpulse 1.1s ease-in-out infinite; }
@keyframes micpulse { 0%,100% { box-shadow: 0 0 0 0 rgba(229,72,77,.5); } 50% { box-shadow: 0 0 0 10px rgba(229,72,77,0); } }
/* semana = misma grilla que el mes, una fila más alta */
.cf-wk .cf-week { --lh: 30px; --bt: 38px; }
.cf-wk .cf-week .cf-cell { min-height: max(260px, calc(var(--bt) + var(--lanes, 0) * 32px + 10px)); border: 1px solid var(--line); border-radius: 12px; }
.cf-wk .cf-bar { white-space: normal; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; line-height: 13px; padding-top: 2px; padding-bottom: 2px; font-size: 10.5px; }
@media (min-width: 560px) { .cf-wk .cf-week { --lh: 34px; } .cf-wk .cf-bar { font-size: 12px; line-height: 15px; } }
.ob-brand, .side-brand { cursor: pointer; }
.ob-brand img, .side-brand img { transition: transform .2s; }
.ob-brand:hover img, .side-brand:hover img { transform: rotate(-8deg) scale(1.08); }
.boing { animation: boing .7s cubic-bezier(.3,1.6,.5,1); }
@keyframes boing { 0% { transform: scale(1); } 25% { transform: scale(.78) rotate(-12deg); } 55% { transform: scale(1.22) rotate(10deg); } 80% { transform: scale(.95) rotate(-3deg); } 100% { transform: none; } }

/* Inicio en dos columnas (como Friends) */
.hm-cols, .hm-col { display: contents; }
@media (min-width: 900px) {
  .hm-cols { display: grid; grid-template-columns: minmax(0, 1.15fr) minmax(0, 1fr); gap: 28px; align-items: start; }
  .hm-col { display: flex; flex-direction: column; gap: 12px; }
  .hm-col > * { flex-shrink: 0; }
}
.wx-card { display: none; align-items: center; gap: 14px; padding: 16px 20px; text-align: left; }
.wx-card .wx-big svg.i { width: 40px; height: 40px; fill: none; stroke: var(--primary); stroke-width: 1.7; stroke-linecap: round; stroke-linejoin: round; }
.wx-card .wx-t { font-size: 34px; font-weight: 800; letter-spacing: -.03em; }
.wx-card .wx-c { font-size: 20px; font-weight: 700; }
@media (min-width: 900px) { .wx-card { display: flex; } }
.mini-h { font-size: 12px; font-weight: 800; letter-spacing: .06em; text-transform: uppercase; color: var(--muted); padding: 4px 0 6px; }
.mini-h:not(:first-child) { margin-top: 12px; }
/* nota del grupo: no heredar el .note de las animaciones de cumpleaños */
.notes .note { position: relative; font-size: 14px; z-index: auto; }
.notes .note-x svg, .notes .note-x .i { width: 18px; height: 18px; }

/* bienvenida: plan de ejemplo y motivo de ausencia */
.osc-line { display: flex; align-items: center; gap: 10px; font-size: 15px; }
.osc-line span { width: 22px; text-align: center; }
.osc-who-row { display: flex; align-items: center; margin-top: 10px; }
.osc-who-row .avatar { margin-right: -8px; border: 2px solid #fff; }
.osc-who-row .avatar.me { font-size: 11px; }
.osc-who-row small { margin-left: 18px; font-weight: 600; }
.os-plan.went .osc-join .p-off { display: none; }
.os-plan.went .osc-join .p-on { display: inline; }
.os-plan.went .osc-join { background: #DDF6EE; color: #0B7A5C; }
.osc-who { display: flex; flex-direction: column; line-height: 1.2; min-width: 0; }
.osc-who em { font-style: normal; font-size: 12px; color: #A9ACC8; }
.inst-link { display: flex; align-items: center; gap: 10px; margin: 4px 0 14px; padding: 8px 8px 8px 14px; border: 1px solid var(--line); border-radius: 16px; background: var(--surface); }
.inst-link span { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-weight: 600; font-size: 14px; }

.actions-col { display: flex; flex-direction: column; align-items: flex-end; gap: 8px; flex-shrink: 0; }
.actions-col .inst-chip { height: 38px; }

/* bienvenida tranquila: una tarjeta protagonista y otra de apoyo */
.ob-hero .ob-copy p { opacity: .8; }

/* sin franja blanca arriba en la bienvenida, historias y entrada */
body:has(.ob-hero, .ob-story, .auth-hero) .status-fill { display: none; }
/* «Ya tengo cuenta» como texto tranquilo */
.ob-hero .ob-btn.ghost { background: none; min-height: 40px; margin-top: 6px; font-size: 15px; font-weight: 600; color: rgba(255, 255, 255, .78); box-shadow: none; }
.ob-hero .ob-btn.ghost:hover { background: none; color: #fff; text-decoration: underline; }
/* asistente */
.os-asst { gap: 14px; padding: 18px; }
.oa-me { align-self: flex-end; max-width: 82%; background: #ECECFF; color: #3B3BC9; border-radius: 18px 18px 6px 18px; padding: 11px 14px; font-weight: 600; font-size: 15px; animation: oc-in .5s var(--spring) backwards; }
.oa-bot { display: flex; gap: 10px; align-items: flex-start; animation: oc-in .5s var(--spring) .35s backwards; }
.oa-av { flex: none; width: 34px; height: 34px; border-radius: 50%; display: grid; place-items: center; background: var(--grad, linear-gradient(135deg, #5B5BF5, #9B5BF5)); color: #fff; }
.oa-av svg.i { width: 18px; height: 18px; fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }
.oa-bot p { background: #F4F5FB; border-radius: 6px 18px 18px 18px; padding: 11px 14px; font-size: 15px; line-height: 1.4; margin: 0; }
.oa-go { margin-top: 10px; width: 100%; }
.os-asst.done .oa-go .p-off { display: none; } .os-asst.done .oa-go .p-on { display: inline; } .os-asst.done .oa-go { background: #DDF6EE; color: #0B7A5C; }

/* ---------- calma: texto más chico, centrado y con aire ---------- */
.ob { padding: calc(env(safe-area-inset-top) + 26px) 30px calc(env(safe-area-inset-bottom) + 34px); }
.ob h1 { font-size: 26px; line-height: 1.2; letter-spacing: -.5px; text-align: center; }
.ob .sub { margin: 14px auto 0; font-size: 15px; max-width: 30ch; text-align: center; }
.ob-bar { margin-bottom: 18px; }
/* historias: título + visual centrados en el espacio libre */
.ob-story > h1 { margin-top: auto; }
.ob-story .ob-visual { margin: 34px 0 0; }
.ob-story .ob-foot { margin-top: auto; padding-top: 34px; }
/* bienvenida */
.ob-copy { padding-top: 26px; text-align: center; }
.ob-copy h1 { font-size: 25px; line-height: 1.22; letter-spacing: -.5px; }
.ob-copy h1 .hl { font-size: 1.14em; }
.ob-copy p { margin: 12px auto 0; max-width: 30ch; }
.ob-cta { margin-top: 32px; }
.ob-collage { margin-top: 14px; }
.ob-hero .ob-top { justify-content: space-between; }
/* pasos del perfil */
.ob-body > h1 { margin-top: 8vh; }
.ob-input { margin-top: 36px; text-align: center; }
.ob-bd { margin-top: 36px; }
.ob-avwrap { margin-top: 40px; }
@media (min-width: 900px) {
  .ob-hero .ob-copy { text-align: left; }
  .ob-hero .ob-copy h1 { font-size: clamp(30px, 3vw, 44px); text-align: left; }
  .ob-hero .ob-copy p { margin: 18px 0 0; text-align: left; }
  .ob-hero .ob-cta { margin-top: 36px; }
}

/* tarjetas de la bienvenida en escritorio (posiciones editadas a mano con ?edit) */
@media (min-width: 900px) {
  .ob-hero .oc-d { left: 13.2%; top: 62.3%; right: auto; bottom: auto; width: 13.9em; --r: -4deg !important; }
  .ob-hero .oc-c { left: 57.6%; top: 36.4%; right: auto; bottom: auto; width: 11.5em; --r: 7deg !important; }
  .ob-hero .oc-a { left: -19%; top: 26.5%; right: auto; bottom: auto; width: 11.5em; --r: -8deg !important; }
  .ob-hero .oc-b { left: 15.2%; top: 4.3%; right: auto; bottom: auto; width: 15em; --r: 2deg !important; }
  .ob-hero .oc-q { left: 61.9%; top: 76.6%; right: auto; bottom: auto; width: 4.6em; --r: 12deg !important; }
}

/* tarjetas de la bienvenida en móvil: solapadas pero legibles, entran volando una a una */
@media (max-width: 899px) {
  .ob-hero .oc-c { left: 11%; top: 59%; right: auto; bottom: auto; width: 10em; --r: 5deg !important; }
  .ob-hero .oc-b { left: 43%; top: 24%; right: auto; bottom: auto; width: 14.5em; --r: -6deg !important; }
  .ob-hero .oc-d { left: 52%; top: 67%; right: auto; bottom: auto; width: 11em; --r: -5deg !important; }
  .ob-hero .oc-q { left: 66%; top: 84%; right: auto; bottom: auto; width: 2em; --r: 12deg !important; }
  .ob-hero .oc-a { left: -1%; top: 32%; right: auto; bottom: auto; width: 11.5em; --r: -8deg !important; }
}
/* eslogan más pequeño */
.ob-copy h1 { font-size: 21px; }
@media (min-width: 900px) { .ob-hero .ob-copy h1 { font-size: clamp(24px, 2.4vw, 34px); } }

/* Al estirar la pantalla (arriba y abajo) se ve el color de la pantalla, nunca blanco.
   Safari de iPhone usa el background-color del html (ignora los degradados), por eso va color sólido + sin rebote. */
html:has(.ob-hero), html:has(.ob-story.grad) { background-color: #7C5CF6; background-image: linear-gradient(#4B4BE8 50%, #B06AF0 50%); overscroll-behavior: none; }
html:has(.ob-story.dark) { background-color: #14152B; overscroll-behavior: none; }
html:has(.ob-story.soft) { background-color: #ECECFF; background-image: linear-gradient(var(--primary-soft), var(--primary-soft)); overscroll-behavior: none; }
html:has(.auth-hero) { background-color: #4B4BE8; background-image: linear-gradient(#4B4BE8 50%, var(--bg) 50%); overscroll-behavior: none; }
html:has(.ob-hero) body, html:has(.ob-story) body, html:has(.auth-hero) body { overscroll-behavior: none; }

html:has(.ob-hero) body, html:has(.ob-story) body, html:has(.auth-hero) body { background: transparent; }

/* Móvil: el onboarding queda fijo, no se estira ni arriba ni abajo (si algo no cabe, scrollea por dentro sin rebote) */
@media (max-width: 699px) {
  html:has(.ob), html:has(.ob) body { position: fixed; inset: 0; width: 100%; height: 100%; overflow: hidden; overscroll-behavior: none; }
  html:has(.ob) #app { height: 100%; min-height: 0; overflow: hidden; }
  html:has(.ob) .ob { height: 100dvh; min-height: 0; overflow-x: hidden; overflow-y: auto; overscroll-behavior: none; -webkit-overflow-scrolling: touch; }
}
@media (max-width: 699px) { .ob-story .ob-visual { margin-top: 24px; } .ob-story .ob-foot { padding-top: 16px; } .ob-bar { margin-bottom: 8px; } }

/* Móvil y tablet: toda la app queda fija (sin estirar arriba/abajo); la pantalla scrollea por dentro, sin rebote */
@media (max-width: 899px) {
  html, body { position: fixed; inset: 0; width: 100%; height: 100%; overflow: hidden; overscroll-behavior: none; }
  #app { height: 100%; min-height: 0; overflow-x: hidden; overflow-y: auto; overscroll-behavior: none; -webkit-overflow-scrolling: touch; }
}

/* ---------- alternativas de portada ---------- */
.oh { position: relative; flex: 1; margin-top: 14px; display: flex; flex-direction: column; justify-content: center; font-size: 15px; }
/* A: un plan grande y dos etiquetas */
.oh-a { align-items: center; padding: 0 4px; }
.oh-main { width: 100%; background: #fff; color: var(--ink); border-radius: 1.8em; padding: 1.3em 1.4em; box-shadow: 0 24px 56px rgba(20, 21, 43, .32); display: flex; flex-direction: column; gap: .35em; rotate: -2deg; animation: oc-in .7s var(--spring) backwards; position: relative; z-index: 2; }
.oh-main::before, .oh-main::after { content: ''; position: absolute; inset: 0; border-radius: inherit; background: rgba(255, 255, 255, .55); z-index: -1; translate: 0 .55em; scale: .93; }
.oh-main::after { background: rgba(255, 255, 255, .3); translate: 0 1.1em; scale: .86; }
.oh-main small { font-size: .86em; font-weight: 600; color: #6B6F8A; }
.oh-main strong { font-size: 1.55em; line-height: 1.2; font-weight: 800; letter-spacing: -.3px; }
.oh-when { align-self: flex-start; margin-top: .2em; padding: .4em .8em; border-radius: .8em; background: var(--primary-soft); color: var(--primary); font-weight: 700; font-size: .9em; }
.oh-who { display: flex; align-items: center; margin-top: .7em; }
.oh-who i { width: 2.2em; height: 2.2em; border-radius: 50%; background: var(--c); color: #fff; display: grid; place-items: center; font: 700 .85em/1 inherit; font-style: normal; margin-right: -.55em; box-shadow: 0 0 0 .18em #fff; }
.oh-who em { margin-left: 1.1em; font-style: normal; font-weight: 700; font-size: .9em; color: #6B6F8A; }
.oh-pill { position: absolute; z-index: 3; display: inline-flex; align-items: center; gap: .55em; padding: .65em 1em; border-radius: 999px; background: #14152B; color: #fff; font-weight: 700; font-size: .9em; box-shadow: 0 14px 30px rgba(20, 21, 43, .35); animation: oc-in .7s var(--spring) backwards, bob 6s ease-in-out infinite; white-space: nowrap; }
.oh-pill i { font-style: normal; }
.oh-p1 { top: 22%; left: -1%; rotate: -4deg; animation-delay: .25s, 0s; }
.oh-p2 { bottom: 22%; right: -1%; rotate: 3deg; background: #fff; color: var(--ink); animation-delay: .4s, 1s; }
/* B: tres filas, una por cosa */
.oh-b { gap: 14px; padding: 0 2px; }
.oh-row { display: flex; align-items: center; gap: 16px; padding: 14px 18px; border-radius: 22px; background: rgba(255, 255, 255, .14); border: 1px solid rgba(255, 255, 255, .22); backdrop-filter: blur(6px); animation: oc-in .6s var(--spring) var(--d) backwards; }
.oh-row span { width: 52px; height: 52px; flex: none; border-radius: 16px; display: grid; place-items: center; font-size: 26px; box-shadow: 0 8px 18px rgba(20, 21, 43, .2); }
.oh-row b { font-size: 19px; font-weight: 700; letter-spacing: -.2px; }

/* ---------- portada: eventos que van apareciendo ---------- */
.of { position: relative; flex: 1; margin-top: 14px; display: flex; flex-direction: column; justify-content: center; gap: 16px; font-size: 15px; padding: 10px 0 8px; }
.of-card { display: flex; align-items: center; gap: 14px; width: 86%; padding: 14px 18px 14px 14px; border-radius: 20px; background: #fff; color: var(--ink); box-shadow: 0 16px 36px rgba(20, 21, 43, .26); animation: of-in .65s var(--spring) var(--d) backwards; }
.of-card.l { align-self: flex-start; } .of-card.r { align-self: flex-end; }
.of-card span { width: 48px; height: 48px; flex: none; border-radius: 15px; display: grid; place-items: center; font-size: 25px; }
.of-card div { display: flex; flex-direction: column; min-width: 0; }
.of-card b { font-size: 16px; font-weight: 700; line-height: 1.25; }
.of-card small { font-size: 12.5px; font-weight: 600; color: #6B6F8A; margin-top: 1px; }
@keyframes of-in { from { opacity: 0; translate: 0 28px; scale: .92; } }
@media (prefers-reduced-motion: reduce) { .of-card { animation: none; } }
@media (min-width: 900px) { .ob-hero .of { grid-column: 2; grid-row: 2; align-self: center; width: 100%; max-width: 460px; justify-self: center; margin: 0; font-size: 17px; } }

/* ---------- portada alternativa: la app real asomando ---------- */
.oa { flex: 1; width: 88%; max-width: 340px; margin: 18px auto 0; border: 6px solid #14152B; border-bottom: 0; border-radius: 40px 40px 0 0; background: var(--bg); overflow: hidden; padding: 18px 14px 0; display: flex; flex-direction: column; gap: 12px; font-size: 14px; box-shadow: 0 -10px 50px rgba(20, 21, 43, .3); -webkit-mask-image: linear-gradient(#000 78%, transparent 100%); mask-image: linear-gradient(#000 78%, transparent 100%); animation: oa-rise .8s var(--spring) backwards; }
@keyframes oa-rise { from { translate: 0 60px; opacity: 0; } }
.oa > * { animation: of-in .6s var(--spring) var(--d) backwards; }
.oa-head { display: flex; justify-content: space-between; align-items: center; padding: 0 4px; } .oa-head b { font-size: 20px; font-weight: 800; letter-spacing: -.3px; color: var(--ink); }
.oa-plan { background: var(--surface); color: var(--ink); border-radius: 22px; padding: 14px 16px; display: flex; flex-direction: column; gap: 4px; box-shadow: 0 8px 22px rgba(20, 21, 43, .1); border: 1px solid var(--line); }
.oa-plan small { font-size: 12px; font-weight: 600; color: var(--muted); } .oa-plan strong { font-size: 18px; font-weight: 800; line-height: 1.2; }
.oa-when { align-self: flex-start; padding: 4px 10px; border-radius: 10px; background: var(--primary-soft); color: var(--primary); font-weight: 700; font-size: 12.5px; }
.oa-row { display: flex; align-items: center; justify-content: space-between; margin-top: 8px; }
.oa-who { display: flex; } .oa-who i { width: 28px; height: 28px; border-radius: 50%; background: var(--c); color: #fff; display: grid; place-items: center; font: 700 12px/1 inherit; font-style: normal; margin-right: -8px; box-shadow: 0 0 0 2px var(--surface); }
.oa-btn { position: relative; display: grid; place-items: center; min-width: 104px; height: 36px; border-radius: 12px; background: var(--primary-soft); color: var(--primary); font-weight: 700; font-size: 13px; animation: oa-ok .01s linear 2.6s forwards; }
.oa-btn em { font-style: normal; grid-area: 1 / 1; }
.oa-btn .y { opacity: 0; animation: oa-y .3s ease 2.6s forwards; } .oa-btn .j { animation: oa-j .3s ease 2.6s forwards; }
@keyframes oa-ok { to { background: #12A66B; color: #fff; box-shadow: 0 6px 14px rgba(18, 166, 107, .35); } }
@keyframes oa-y { to { opacity: 1; } } @keyframes oa-j { to { opacity: 0; } }
.oa-cal { display: contents; } .oa-cal .os-card { background: var(--surface); box-shadow: 0 8px 22px rgba(20, 21, 43, .1); border: 1px solid var(--line); border-radius: 22px; padding: 12px 10px; animation: of-in .6s var(--spring) 1s backwards; }
@media (prefers-reduced-motion: reduce) { .oa, .oa > *, .oa-cal .os-card { animation: none; } .oa-btn { background: #12A66B; color: #fff; } .oa-btn .j { opacity: 0; } .oa-btn .y { opacity: 1; } }
@media (min-width: 900px) { .ob-hero .oa { grid-column: 2; grid-row: 2; align-self: end; justify-self: center; width: 100%; max-width: 420px; margin: 0; height: min(78vh, 640px); flex: none; font-size: 15px; } }

/* entrada de las tarjetas de la portada: cada una vuela desde su lado y después flota */
@keyframes oc-fly { from { opacity: 0; translate: var(--fx, 0) var(--fy, 40px); scale: .6; } 60% { opacity: 1; } }
@keyframes oc-float { 50% { transform: translateY(-9px); } }
.ob-hero .oc { animation: oc-fly .95s var(--spring) var(--i, 0s) backwards, oc-float 6s ease-in-out calc(var(--i, 0s) + var(--w, 0s) + .9s) infinite; }
.ob-hero .oc-b { --i: .15s; --fy: -130px; } .ob-hero .oc-a { --i: .5s; --fx: -140px; --fy: 20px; } .ob-hero .oc-c { --i: .85s; --fx: 40px; --fy: 130px; }
.ob-hero .oc-d { --i: 1.2s; --fx: 120px; --fy: 90px; } .ob-hero .oc-q { --i: 1.6s; --fx: 0px; --fy: 90px; }
@media (prefers-reduced-motion: reduce) { .ob-hero .oc { animation: none; } }

/* tarjeta del plan en el collage */
.oc-a { gap: .3em; padding: .9em 1em; }
.oc-a strong { font-size: 1.12em; line-height: 1.2; font-weight: 800; letter-spacing: -.2px; }
.oc-when { align-self: flex-start; margin-top: .15em; padding: .3em .7em; border-radius: .7em; background: var(--primary-soft); color: var(--primary); font-weight: 700; font-size: .84em; }
.oc-who { display: flex; align-items: center; margin-top: .5em; }
.oc-who i { width: 1.9em; height: 1.9em; border-radius: 50%; background: var(--c); color: #fff; display: grid; place-items: center; font: 700 .78em/1 inherit; font-style: normal; margin-right: -.45em; box-shadow: 0 0 0 .16em #fff; }
.oc-who em { margin-left: .9em; font-style: normal; font-weight: 700; font-size: .84em; color: #6B6F8A; }
.oc-d { z-index: 4; }
@media (max-width: 899px) { .ob-hero .oc-a { width: 12.5em; top: 29%; } }
.oc-q { z-index: 5; }

/* asistente: efecto escribiendo */
.os-asst .oa-me, .os-asst .oa-bot, .os-asst .oa-go { opacity: 0; translate: 0 10px; animation: none; transition: opacity .3s ease, translate .45s var(--spring), background-color .25s, color .25s, transform .2s var(--spring); }
.os-asst .in { opacity: 1; translate: 0 0; }
.os-asst .oa-go:not(.in) { pointer-events: none; }
.oa-me.caret::after { content: ''; display: inline-block; width: 2px; height: 1.05em; margin-left: 2px; vertical-align: -.15em; background: currentColor; animation: oa-caret .7s steps(1) infinite; }
.oa-bot > div { position: relative; flex: 1; min-width: 0; }
.oa-dots { position: absolute; top: 0; left: 0; display: flex; gap: 5px; padding: 15px 16px; background: #F4F5FB; border-radius: 6px 18px 18px 18px; }
.oa-dots i { width: 7px; height: 7px; border-radius: 50%; background: #9AA0BC; animation: oa-dot 1s ease-in-out infinite; }
.oa-dots i:nth-child(2) { animation-delay: .15s; } .oa-dots i:nth-child(3) { animation-delay: .3s; }
@keyframes oa-caret { 50% { opacity: 0; } }
@keyframes oa-dot { 0%, 60%, 100% { translate: 0 0; opacity: .5; } 30% { translate: 0 -5px; opacity: 1; } }

/* cartelitos de Inicio, X de encuestas/mensajes y organizador */
.aviso { display: flex; align-items: center; gap: 6px; background: var(--card, #fff); border: 1px solid var(--line, rgba(0,0,0,.08)); border-radius: 16px; padding: 4px 4px 4px 14px; margin: 0 0 10px; animation: avIn .35s ease both; }
.aviso-b { flex: 1; text-align: left; background: none; border: 0; font: inherit; font-size: 14px; color: inherit; padding: 8px 0; cursor: pointer; }
.aviso-x, .x-btn, .notes .note-x { background: none; border: 0; color: inherit; opacity: .55; cursor: pointer; padding: 8px 10px; font-size: 14px; transition: opacity .2s, transform .2s; }
.aviso-x:hover, .x-btn:hover, .notes .note-x:hover { opacity: 1; transform: scale(1.15); }
.notes .note-b { display: flex; align-items: center; gap: 10px; flex: 1; }
.note-all { display: block; font-size: 12px; opacity: .8; margin-top: 2px; color: inherit; text-decoration: underline; }
.poll-h { align-items: center; }
.ev-org { font-size: 12.5px; opacity: .7; margin: 1px 0 2px; }
@keyframes avIn { from { opacity: 0; transform: translateY(-6px); } to { opacity: 1; transform: none; } }
.bal-pill { display: inline-flex; gap: 6px; align-items: baseline; font: inherit; font-size: 13px; background: none; border: 1px solid var(--line, rgba(0,0,0,.1)); border-radius: 999px; padding: 4px 12px; margin: 0 0 10px; color: var(--muted, #667); cursor: pointer; transition: transform .2s; }
.bal-pill:hover { transform: translateY(-1px); }
.bal-pill b { color: var(--text, inherit); }
.bal-pill.pos b { color: #1f9d6b; } .bal-pill.neg b { color: #d4574a; }
.cf-ev.unanswered { border-left: 4px solid #f5a524; background-image: linear-gradient(90deg, rgba(245,165,36,.10), transparent 40%); }
.bal-card { display: flex; justify-content: space-between; align-items: center; width: 100%; font: inherit; font-size: 14px; text-align: left; background: none; border: 1px solid var(--line, rgba(0,0,0,.1)); border-radius: 16px; padding: 12px 14px; margin: 0 0 12px; color: inherit; cursor: pointer; transition: transform .2s; }
.bal-card:hover { transform: translateY(-1px); }
.bal-card.pos b { color: #1f9d6b; } .bal-card.neg b { color: #d4574a; }
.bal-card .go { color: var(--muted, #667); font-size: 13px; }
/* onboarding: tras apuntarse, el plan se añade solo al calendario */
.os-plan .osc-cal { display: grid; margin-top: 8px; height: 54px; border-radius: 14px; overflow: hidden; background: rgba(91,91,245,.1); color: #4b4bd8; font-size: 13px; font-weight: 700; opacity: 0; transition: opacity .4s, background .4s; }
.os-plan .osc-cal > span { grid-area: 1 / 1; display: flex; align-items: center; justify-content: center; gap: 8px; transition: opacity .35s, transform .35s; }
.os-plan .osc-cal .oc-ev { opacity: 0; transform: translateY(14px); justify-content: flex-start; padding: 0 12px; gap: 10px; text-align: left; color: #1b1b2f; }
.os-plan .osc-cal .oc-ev i { width: 4px; align-self: stretch; margin: 9px 0; border-radius: 4px; background: #5B5BF5; }
.os-plan .osc-cal .oc-ev span { display: grid; flex: 1; min-width: 0; } .os-plan .osc-cal .oc-ev small { font-weight: 600; opacity: .65; }
.os-plan .osc-cal .oc-ev b { font-size: 13px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.os-plan .osc-cal .oc-ev em { font-style: normal; font-size: 12px; color: #0e8a58; white-space: nowrap; }
.os-plan.cal-add .osc-cal { opacity: 1; }
.os-plan.cal-add .osc-cal .oc-add { animation: oc-press .6s .5s both; }
.os-plan.cal-ev .osc-cal { background: #fff; box-shadow: 0 0 0 1.5px rgba(91,91,245,.25) inset; }
.os-plan.cal-ev .osc-cal .oc-add { opacity: 0; transform: translateY(-14px); animation: none; }
.os-plan.cal-ev .osc-cal .oc-ev { opacity: 1; transform: none; }
@keyframes oc-press { 40% { transform: scale(.94); background: rgba(91,91,245,.0); } 100% { transform: none; } }
.ob-story .ob-visual button, .ob-story .ob-visual input, .ob-story .ob-visual .dp-btn { pointer-events: none; }
/* eslogan: «Tus planes.» y debajo la palabra que va cambiando */
.ob-copy h1 .hl.rot { display: inline-grid; }
.ob-copy h1 .hl.rot > span { grid-area: 1 / 1; opacity: 0; animation: wordcycle 16s calc(1.2s + var(--i) * 3.2s) infinite backwards; }
@keyframes wordcycle { 0% { opacity: 0; transform: translateY(8px); } 4% { opacity: 1; transform: none; } 17% { opacity: 1; transform: none; } 20%, 100% { opacity: 0; transform: translateY(-8px); } }
@media (prefers-reduced-motion: reduce) { .ob-copy h1 .hl.rot > span { animation: none; } .ob-copy h1 .hl.rot > span:first-child { opacity: 1; } }
/* invitados: se ve claro quién está elegido */
.pick-chip.on::before { content: '✓'; font-weight: 800; margin-right: 2px; }
.inv-n { display: inline-block; min-width: 20px; padding: 0 6px; border-radius: 999px; background: var(--primary, #5B5BF5); color: #fff; font-size: 12px; text-align: center; margin: 0 4px; }
.asst-card-acts { display: flex; gap: 8px; margin: -2px 0 8px; flex-wrap: wrap; }
.asst-card-acts button { font: inherit; font-size: 13px; font-weight: 600; background: none; border: 1px solid var(--line, rgba(0,0,0,.12)); color: var(--primary, #5B5BF5); border-radius: 999px; padding: 7px 12px; cursor: pointer; transition: transform .2s, background .2s; }
.asst-card-acts button:hover { transform: translateY(-1px); background: rgba(91,91,245,.08); }

/* Onboarding: idea de pádel con pelota que rebota */
.osc-ball { display: inline-block; width: 1.05em; height: 1.05em; vertical-align: -.14em; margin-right: 6px; transform-origin: 50% 90%; animation: ball-bounce 1.6s cubic-bezier(.3,.1,.3,1) infinite; }
@keyframes ball-bounce { 0%,100% { transform: translateY(0) rotate(0); } 40% { transform: translateY(-6px) rotate(40deg); } 60% { transform: translateY(0) rotate(60deg) scale(1.06,.94); } }
@media (prefers-reduced-motion: reduce) { .osc-ball { animation: none; } }

/* Entrar / Crear cuenta: el color de arriba y la tarjeta cambian para notar el paso */
.auth-hero { transition: filter .4s ease; }
.login.auth.signup .auth-hero { background: linear-gradient(165deg, #5B3FE0 0%, #A24BE6 55%, #F0709A 100%); }
.login.auth[data-anim] .auth-hero { animation: auth-hue .55s ease both; }
.login.auth[data-anim=r] .auth-card { animation: auth-in-r .38s var(--spring) both; }
.login.auth[data-anim=l] .auth-card { animation: auth-in-l .38s var(--spring) both; }
@keyframes auth-hue { from { filter: hue-rotate(var(--hue-from, -35deg)) saturate(1.2); } to { filter: none; } }
@keyframes auth-in-r { from { opacity: 0; transform: translateX(26px); } to { opacity: 1; transform: none; } }
@keyframes auth-in-l { from { opacity: 0; transform: translateX(-26px); } to { opacity: 1; transform: none; } }
.login.auth[data-anim=l] { --hue-from: 35deg; }
@media (prefers-reduced-motion: reduce) { .login.auth[data-anim] .auth-hero, .login.auth[data-anim] .auth-card { animation: none; } }

/* el eslogan de la pantalla de entrar también rota */
.auth-copy h2 .hl.rot { display: inline-grid; }
.auth-copy h2 .hl.rot > span { grid-area: 1 / 1; opacity: 0; animation: wordcycle 16s calc(.4s + var(--i) * 3.2s) infinite backwards; }
@media (prefers-reduced-motion: reduce) { .auth-copy h2 .hl.rot > span { animation: none; } .auth-copy h2 .hl.rot > span:first-child { opacity: 1; } }
html:has(.login.auth.signup) { background-color: #5B3FE0; background-image: linear-gradient(#5B3FE0 50%, var(--bg) 50%); }

/* historias en pantallas grandes: el color llena toda la pantalla, sin franjas ni tarjeta flotante */
@media (min-width: 900px) {
  html:has(.ob-story.grad) { background: var(--ob-grad) fixed; }
  html:has(.ob-story.soft) { background: var(--primary-soft); }
  .ob-story { background: transparent !important; box-shadow: none; border-radius: 0; min-height: 100dvh; }
}

/* ---------- instalar: pasos con dibujos de Safari ---------- */
.ig-wrap { display: flex; flex-direction: column; gap: 18px; }
.ig-step { animation: ig-in .5s var(--spring) both; animation-delay: calc(var(--i) * .12s + .1s); }
@keyframes ig-in { from { opacity: 0; transform: translateY(12px); } to { opacity: 1; transform: none; } }
.ig-cap { display: flex; align-items: center; gap: 10px; font-weight: 800; font-size: 15px; margin: 0 0 8px; }
.ig-cap .n { width: 26px; height: 26px; flex: none; border-radius: 50%; display: grid; place-items: center; background: var(--grad); color: #fff; font-size: 13px; }
.ig-hint { display: block; margin-top: 6px; color: var(--muted); font-size: 12.5px; }
.ig { position: relative; border-radius: 18px; background: var(--surface-2); border: 1px solid var(--line); overflow: hidden; }
.ig svg { width: 22px; height: 22px; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }
.ig .hit { position: relative; color: var(--primary); }
.ig-tap { position: absolute; left: 50%; top: 50%; width: 38px; height: 38px; margin: -19px 0 0 -19px; border-radius: 50%; border: 2px solid var(--primary); animation: ig-pulse 1.5s ease-out infinite; pointer-events: none; }
.ig-tap::after { content: ''; position: absolute; inset: 11px; border-radius: 50%; background: var(--primary); opacity: .35; }
@keyframes ig-pulse { 0% { transform: scale(.55); opacity: 1; } 80%, 100% { transform: scale(1.5); opacity: 0; } }
.ig-1 .ig-page { height: 84px; padding: 16px; display: flex; flex-direction: column; gap: 9px; }
.ig-1 .ig-page i { display: block; height: 9px; border-radius: 5px; background: var(--line); } .ig-1 .ig-page i:nth-child(2) { width: 70%; } .ig-1 .ig-page i:nth-child(3) { width: 45%; }
.ig-1 .ig-bar { display: flex; justify-content: space-around; align-items: center; padding: 12px 8px; background: var(--surface); border-top: 1px solid var(--line); color: var(--muted); }
.ig-1 .ig-bar > span { position: relative; width: 38px; height: 30px; display: grid; place-items: center; }
.ig-1 .ig-bar .hit { color: var(--primary); }
.ig-2 { padding: 4px 0; background: var(--surface); }
.ig-row { position: relative; display: flex; align-items: center; justify-content: space-between; gap: 10px; padding: 13px 16px; font-size: 14.5px; border-bottom: 1px solid var(--line); }
.ig-row:last-child { border-bottom: 0; } .ig-row.dim { color: var(--muted); }
.ig-row.hit { background: color-mix(in srgb, var(--primary) 10%, transparent); font-weight: 800; color: var(--ink); }
.ig-row.hit svg { color: var(--primary); } .ig-row.hit .ig-tap { left: auto; right: 22px; margin-left: 0; }
.ig-3 { background: var(--surface); } .ig-head { display: flex; align-items: center; justify-content: space-between; gap: 8px; padding: 12px 14px; border-bottom: 1px solid var(--line); font-size: 13.5px; color: var(--muted); }
.ig-head b { color: var(--ink); font-size: 13px; text-align: center; flex: 1; } .ig-head .hit { font-weight: 800; padding: 6px 10px; }
.ig-head .hit .ig-tap { width: 44px; height: 44px; margin: -22px 0 0 -22px; }
.ig-app { display: flex; align-items: center; gap: 12px; padding: 16px; } .ig-app img { width: 52px; height: 52px; border-radius: 13px; } .ig-app b { display: block; } .ig-app small { color: var(--muted); }
.ig-top { display: flex; align-items: center; justify-content: space-between; gap: 10px; padding: 10px 12px; background: var(--surface); }
.ig-url { flex: 1; text-align: center; padding: 8px; border-radius: 10px; background: var(--surface-2); color: var(--muted); font-size: 13px; }
.ig-top .hit { width: 40px; height: 34px; display: grid; place-items: center; }
/* aviso para navegadores internos */
#inapp-bar { position: fixed; top: 0; left: 0; right: 0; z-index: 90; padding-top: env(safe-area-inset-top); background: #14152B; color: #fff; }
.inapp-bar { display: flex; align-items: center; min-height: 44px; }
.inapp-go { flex: 1; display: flex; align-items: center; justify-content: space-between; gap: 10px; padding: 8px 14px; color: inherit; text-align: left; font-size: 13px; }
.inapp-go b { flex: none; padding: 5px 12px; border-radius: 999px; background: #fff; color: #3B3BC9; font-size: 12.5px; }
.inapp-x { width: 40px; align-self: stretch; color: rgba(255, 255, 255, .7); font-size: 13px; }
body.has-inapp #app { padding-top: calc(48px + env(safe-area-inset-top)); }
/* tarjeta de instalar en Inicio */
.inst-promo { display: flex; align-items: center; gap: 12px; padding: 12px 8px 12px 14px; border-radius: 20px; background: linear-gradient(135deg, #5B5BF5, #9A5CF0); color: #fff; box-shadow: 0 14px 30px rgba(91, 91, 245, .28); animation: ig-in .5s var(--spring) both; }
.inst-promo .grow { flex: 1; min-width: 0; } .inst-promo b { display: block; font-size: 15px; } .inst-promo small { display: block; opacity: .88; font-size: 12.5px; margin-top: 1px; }
.ip-ic { width: 38px; height: 38px; flex: none; border-radius: 12px; display: grid; place-items: center; background: rgba(255, 255, 255, .2); }
.ip-ic svg.i { width: 20px; height: 20px; fill: none; stroke: #fff; stroke-width: 2; }
.inst-promo .btn { background: #fff; color: #3B3BC9; box-shadow: none; }
.ip-x { width: 28px; align-self: flex-start; color: rgba(255, 255, 255, .7); font-size: 12px; padding: 2px; }
@media (prefers-reduced-motion: reduce) { .ig-tap, .ig-step, .inst-promo { animation: none; } }
/* instalar iPhone: Safari real (iOS 26) */
.ig-bar26 { display: flex; align-items: center; gap: 10px; padding: 14px 12px; background: var(--surface-2); }
.ig-bar26 .rb { position: relative; width: 44px; height: 44px; flex: none; border-radius: 50%; display: grid; place-items: center; background: var(--surface); box-shadow: 0 2px 8px rgba(20, 21, 43, .1); color: var(--ink); }
.ig-bar26 .rb.hit { color: var(--primary); }
.ig-bar26 .pill { flex: 1; height: 44px; border-radius: 22px; display: grid; place-items: center; background: var(--surface); box-shadow: 0 2px 8px rgba(20, 21, 43, .1); font-weight: 700; font-size: 14px; }
.ig-row .l { display: flex; align-items: center; gap: 12px; }
.ig-row.hit .ig-tap { right: 18px; }
.ig-acts { display: grid; grid-template-columns: repeat(4, 1fr); gap: 6px; padding: 16px 8px; background: #3B3C43; color: #fff; border-color: transparent; }
.ig-acts .ia { display: flex; flex-direction: column; align-items: center; gap: 6px; text-align: center; }
.ig-acts .ia b { position: relative; width: 48px; height: 48px; border-radius: 50%; display: grid; place-items: center; background: rgba(255, 255, 255, .16); }
.ig-acts .ia small { font-size: 10.5px; line-height: 1.15; }
.ig-acts .ia.hit b { background: color-mix(in srgb, var(--primary) 60%, #3B3C43); }
.ig-acts .ia.hit { color: #fff; } .ig-acts .ig-tap { border-color: #fff; } .ig-acts .ig-tap::after { background: #fff; }
.ig-head span:first-child svg { width: 18px; height: 18px; }
/* saludo de Vale y modo exploración */
.vale { display: grid; align-items: center; min-height: 100dvh; }
.vale-in { text-align: center; display: grid; gap: 22px; justify-items: center; animation: ig-in .6s var(--spring) both; }
.vale-in h1 { font-size: 26px; line-height: 1.2; max-width: 14em; }
.vale-h { font-size: 64px; animation: vale-beat 1.4s ease-in-out infinite; }
@keyframes vale-beat { 0%, 100% { transform: scale(1); } 15% { transform: scale(1.2); } 30% { transform: scale(1); } 45% { transform: scale(1.14); } }
a.inapp-bar { text-decoration: none; color: #fff; }
@media (prefers-reduced-motion: reduce) { .vale-h { animation: none; } }
