/* «Guárdala en tu pantalla de inicio» en iPhone/iPad (Views/Shared/_HomeGuide.cshtml + js/home-guide.js). */
.hg { position: fixed; inset: 0; z-index: 1090; display: flex; align-items: flex-end; justify-content: center; }
.hg[hidden], .hg [hidden] { display: none !important; }
.hg-backdrop { position: absolute; inset: 0; background: rgba(28, 16, 9, .55); opacity: 0; transition: opacity .3s; backdrop-filter: blur(3px); -webkit-backdrop-filter: blur(3px); }
.hg.open .hg-backdrop { opacity: 1; }
.hg-panel {
    position: relative; width: min(560px, 100%); max-height: calc(100dvh - 20px); overflow-y: auto; overscroll-behavior: contain;
    background: var(--paper, #fffdf9); color: var(--espresso, #2a1b12); font-family: var(--font-body, system-ui, sans-serif);
    border-radius: 26px 26px 0 0; padding: 20px 16px calc(14px + env(safe-area-inset-bottom));
    box-shadow: 0 -24px 60px -24px rgba(0, 0, 0, .5); transform: translateY(100%); transition: transform .42s cubic-bezier(.16, 1, .3, 1);
}
.hg.open .hg-panel { transform: none; }
@media (min-width: 700px) {
    .hg { align-items: center; padding: 16px; }
    .hg-panel { border-radius: 26px; padding-bottom: 18px; }
}
html.hg-lock, html.hg-lock body { overflow: hidden; }

.hg-close {
    position: absolute; top: 12px; right: 12px; width: 38px; height: 38px; border-radius: 50%; border: 1px solid var(--line, #ece2d3);
    background: #fff; color: var(--espresso, #2a1b12); display: grid; place-items: center; font-size: .95rem;
}
.hg-head { display: flex; gap: 12px; align-items: flex-start; padding-right: 42px; }
.hg-head img { flex: none; border-radius: 12px; box-shadow: 0 4px 12px -4px rgba(42, 27, 18, .35); }
.hg-head h2 { font-family: var(--font-display, Georgia, serif); font-size: 1.32rem; line-height: 1.1; margin: 2px 0 5px; text-wrap: balance; }
.hg-head p { margin: 0; color: var(--cocoa, #5d4737); font-size: .88rem; line-height: 1.35; text-wrap: pretty; }

/* ---------- Mini animación ---------- */
.hg-demo {
    position: relative; height: 150px; margin: 14px 0 10px; border-radius: 18px; overflow: hidden;
    background: linear-gradient(180deg, #f6f4f1, #e8e4de); border: 1px solid var(--line, #ece2d3);
    font-family: -apple-system, system-ui, "Segoe UI", sans-serif; color: #1c1c1e;
}
.hg-f { position: absolute; inset: 0; opacity: 0; transition: opacity .35s; }
.hg-demo[data-f="1"] .f1, .hg-demo[data-f="2"] .f2, .hg-demo[data-f="3"] .f3, .hg-demo[data-f="4"] .f4 { opacity: 1; }
.hg-page { position: absolute; top: 16px; left: 18px; right: 18px; display: grid; gap: 9px; }
.hg-page i { display: block; height: 11px; border-radius: 6px; background: #d8d2c9; }
.hg-page i.s { width: 58%; }
.hg-page.dim { opacity: .45; }

.hg-tap { position: relative; color: var(--brand, #d76112) !important; }
.hg-tap::after {
    content: ""; position: absolute; inset: -5px; border-radius: 999px; border: 2.5px solid var(--brand, #d76112);
    animation: hg-ring 1.3s ease-out infinite; pointer-events: none;
}
.hg-row.hg-tap::after, .hg-blue.hg-tap::after { border-radius: 12px; inset: -4px; }
@keyframes hg-ring { 0% { opacity: .95; transform: scale(.92); } 70% { opacity: 0; transform: scale(1.18); } 100% { opacity: 0; } }

.hg-bar26 { position: absolute; left: 10px; right: 10px; bottom: 12px; display: flex; align-items: center; gap: 8px; }
.hg-btn {
    flex: none; width: 36px; height: 36px; border-radius: 50%; display: grid; place-items: center; font-size: 1.15rem;
    background: rgba(255, 255, 255, .92); box-shadow: 0 2px 10px -2px rgba(0, 0, 0, .25);
}
.hg-url {
    flex: 1; min-width: 0; height: 36px; border-radius: 999px; display: flex; align-items: center; justify-content: center; gap: 8px;
    background: rgba(255, 255, 255, .92); box-shadow: 0 2px 10px -2px rgba(0, 0, 0, .25); font-size: .78rem; font-weight: 600;
    white-space: nowrap; overflow: hidden;
}
.hg-url i { font-size: .85rem; color: #555; }
.hg-bar18 { position: absolute; left: 0; right: 0; bottom: 0; background: rgba(255, 255, 255, .95); padding: 7px 12px 6px; display: grid; gap: 6px; }
.hg-bar18 .hg-url { height: 28px; background: #ebe8e3; box-shadow: none; }
.hg-tools { display: flex; justify-content: space-around; align-items: center; font-size: 1.05rem; color: #0a7aff; }
.hg-tools .hg-tap { display: grid; place-items: center; width: 30px; height: 30px; }
.hg-bartop { position: absolute; left: 10px; right: 10px; top: 10px; }
.hg-bartop .hg-url { justify-content: space-between; padding: 0 6px 0 16px; }
.hg-bartop .hg-tap { display: grid; place-items: center; width: 28px; height: 28px; font-size: 1rem; }

.hg-menu {
    position: absolute; right: 10px; bottom: 10px; width: 178px; background: #fff; border-radius: 16px; padding: 5px;
    box-shadow: 0 10px 30px -8px rgba(0, 0, 0, .35); display: grid; gap: 2px;
}
.hg-row { display: flex; align-items: center; gap: 8px; padding: 6px 10px; font-size: .78rem; font-weight: 600; border-radius: 10px; }
.hg-row i { font-size: .95rem; width: 16px; text-align: center; }
.hg-row.ghost { color: #9b948b; }
.hg-row.ghost b { flex: 1; height: 8px; border-radius: 4px; background: #e6e1da; }
.hg-row.hg-tap { background: color-mix(in srgb, var(--brand, #d76112) 12%, #fff); }
.hg-share {
    position: absolute; left: 8px; right: 8px; bottom: 0; background: #fff; border-radius: 16px 16px 0 0;
    padding: 6px 8px 8px; display: grid; align-content: start; gap: 3px; box-shadow: 0 -8px 26px -10px rgba(0, 0, 0, .3);
}
.hg-grab { justify-self: center; width: 34px; height: 4px; border-radius: 4px; background: #d5d0c9; }
.hg-people { display: flex; gap: 10px; padding: 2px 4px 4px; }
.hg-people i { width: 22px; height: 22px; border-radius: 50%; background: #e6e1da; }
.hg-share .hg-row { padding: 4px 10px; }
.hg-share .hg-row.hg-tap { justify-content: space-between; }
.hg-add {
    position: absolute; left: 8px; right: 8px; top: 10px; bottom: 0; background: #fff; border-radius: 16px 16px 0 0;
    padding: 9px 12px; display: grid; align-content: start; gap: 9px; box-shadow: 0 -8px 26px -10px rgba(0, 0, 0, .3);
}
.hg-add-top { display: flex; align-items: center; justify-content: space-between; gap: 8px; font-size: .74rem; }
.hg-add-top small { color: #0a7aff; font-size: .74rem; }
.hg-add-top b { font-size: .76rem; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.hg-blue { font-weight: 800; padding: 2px 6px; }
.hg-add-app { display: flex; align-items: center; gap: 10px; font-size: .82rem; font-weight: 700; }
.hg-add-app img { border-radius: 9px; }
.hg-add-app small { display: block; font-weight: 400; color: #8a847c; font-size: .7rem; }
.hg-add-tg { display: flex; align-items: center; justify-content: space-between; font-size: .76rem; border-top: 1px solid #eee9e2; padding-top: 7px; }
.hg-switch { width: 34px; height: 20px; border-radius: 20px; background: #34c759; position: relative; }
.hg-switch::after { content: ""; position: absolute; top: 2px; right: 2px; width: 16px; height: 16px; border-radius: 50%; background: #fff; }

/* ---------- Pasos ---------- */
.hg-steps { list-style: none; counter-reset: hg; padding: 0; margin: 0 0 6px; display: grid; gap: 4px; }
.hg-steps li {
    counter-increment: hg; display: grid; grid-template-columns: 28px 1fr auto; gap: 10px; align-items: center; cursor: pointer;
    padding: 8px 10px; border-radius: 14px; border: 1px solid transparent; transition: background .3s, border-color .3s;
}
.hg-steps li::before {
    content: counter(hg); width: 28px; height: 28px; border-radius: 50%; display: grid; place-items: center; font-weight: 800;
    font-size: .85rem; background: var(--cream-2, #f5ede1); color: var(--cocoa, #5d4737); transition: background .3s, color .3s;
}
.hg-steps li.on { background: var(--brand-soft, #fbeee2); border-color: color-mix(in srgb, var(--brand, #d76112) 35%, transparent); }
.hg-steps li.on::before { background: var(--brand, #d76112); color: #fff; }
.hg-steps li > span { font-size: .95rem; line-height: 1.3; }
.hg-steps small { display: block; color: var(--muted, #736252); font-size: .8rem; margin-top: 2px; }
.hg-chip {
    font-style: normal; display: inline-flex; align-items: center; gap: 5px; padding: 6px 9px; border-radius: 10px; white-space: nowrap;
    background: #fff; border: 1px solid var(--line-2, #e0d3c0); font-size: .78rem; font-weight: 600; color: #1c1c1e;
    font-family: -apple-system, system-ui, "Segoe UI", sans-serif; box-shadow: 0 1px 3px rgba(42, 27, 18, .08);
}
.hg-chip i { font-size: 1rem; }
.hg-chip.round { width: 36px; height: 36px; padding: 0; justify-content: center; border-radius: 50%; }
.hg-chip.blue { color: #0a7aff; font-weight: 800; }

.hg-done { display: flex; gap: 8px; align-items: flex-start; font-size: .85rem; color: var(--basil, #256a40); margin: 8px 4px 2px; }
.hg-alt { font-size: .82rem; color: var(--muted, #736252); margin: 6px 4px 0; }
.hg-alt button { border: 0; background: none; padding: 0; color: var(--brand-deep, #a94c0f); font-weight: 700; text-decoration: underline; }
.hg-other { margin-top: 14px; }
.hg-other p { margin: 0 0 12px; font-size: .95rem; }
.hg-other-btns { display: flex; gap: 8px; flex-wrap: wrap; }
.hg-other-btns .btn { flex: 1 1 160px; border-radius: 14px; padding: 11px 14px; font-weight: 700; }
.hg-status { min-height: 1.2em; margin: 10px 0 0 !important; font-size: .86rem !important; color: var(--basil, #256a40); }

/* Flecha hacia el botón real del navegador */
/* Pegada abajo del panel: siempre a la vista aunque el panel tenga que desplazarse en un iPhone chico. */
.hg-pointer {
    display: none; align-items: center; gap: 6px; font-size: .9rem; font-weight: 700; color: var(--brand-deep, #a94c0f);
    position: sticky; bottom: calc(-14px - env(safe-area-inset-bottom)); margin: 6px -16px calc(-14px - env(safe-area-inset-bottom));
    padding: 10px 20px calc(10px + env(safe-area-inset-bottom)); background: linear-gradient(180deg, rgba(255, 253, 249, 0), var(--paper, #fffdf9) 40%);
}
.hg[data-variant="safari26"] .hg-pointer { display: flex; justify-content: flex-end; }
.hg[data-variant="safari"] .hg-pointer { display: flex; justify-content: center; flex-direction: column; gap: 0; }
.hg-pointer i { font-size: 1.6rem; line-height: 1; animation: hg-bob 1s ease-in-out infinite; }
@keyframes hg-bob { 0%, 100% { transform: translateY(0); } 50% { transform: translateY(6px); } }

@media (prefers-reduced-motion: reduce) {
    .hg-panel, .hg-backdrop, .hg-f { transition: none; }
    .hg-tap::after, .hg-pointer i { animation: none; }
}
