*,
*::before,
*::after {
    box-sizing: border-box;
}

:root {
    --navy: #000b2a;
    --blue: #006cff;
    --blue-dark: #0052cc;
    --sky: #e8f1ff;
    --white: #ffffff;
    --text: #1a2b42;
    --muted: #5a6b82;
    --border: #e2e8f0;
    --green: #25d366;
    --radius: 20px;
    --radius-sm: 12px;
    --font: 'Plus Jakarta Sans', Arial, sans-serif;
}

html {
    -webkit-text-size-adjust: 100%;
    height: 100%;
}

body {
    margin: 0;
    font-family: var(--font);
    color: var(--text);
    line-height: 1.45;
    background: linear-gradient(180deg, #f0f4fb 0%, #e4ebf5 100%);
    min-height: 100%;
    min-height: 100dvh;
    overflow-x: hidden;
}

body.page-home-body {
    background:
        radial-gradient(ellipse 80% 55% at 10% 15%, rgba(126, 176, 240, 0.18), transparent 58%),
        radial-gradient(ellipse 70% 50% at 95% 20%, rgba(0, 108, 255, 0.08), transparent 55%),
        radial-gradient(ellipse 60% 40% at 50% 70%, rgba(126, 176, 240, 0.1), transparent 60%),
        linear-gradient(180deg, #eef4fb 0%, #e6eef8 45%, #dde7f3 100%);
}

.home-backdrop {
    position: fixed;
    inset: 0;
    z-index: 0;
    pointer-events: none;
    overflow: hidden;
}

.home-backdrop__art {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    min-height: 100dvh;
}

@media (min-width: 768px) {
    .home-backdrop__art {
        left: 50%;
        width: min(920px, 100%);
        transform: translateX(-50%);
    }
}

img {
    max-width: 100%;
    height: auto;
    display: block;
}

.site {
    display: flex;
    flex-direction: column;
    min-height: 100%;
    min-height: 100dvh;
    position: relative;
    z-index: 1;
}

.site.page-home {
    height: 100dvh;
    max-height: 100dvh;
    overflow: hidden;
}

.site-main {
    flex: 1 1 auto;
    width: 100%;
    max-width: 420px;
    margin: 0 auto;
    padding: max(10px, env(safe-area-inset-top)) clamp(12px, 4vw, 20px) 10px;
    min-height: 0;
    overflow-x: hidden;
    overflow-y: auto;
    -webkit-overflow-scrolling: touch;
    scrollbar-width: thin;
    scrollbar-color: #c5d0e0 transparent;
}

.site-main::-webkit-scrollbar {
    width: 6px;
}

.site-main::-webkit-scrollbar-track {
    background: transparent;
}

.site-main::-webkit-scrollbar-thumb {
    background: #c5d0e0;
    border-radius: 999px;
}

/* Centrado sin recortar: margin auto en lugar de justify-content:center */
.site.page-home .site-main {
    display: flex;
    flex-direction: column;
    justify-content: flex-start;
    overflow-y: auto;
}

.site.page-home .home-stack {
    width: 100%;
    margin-block: auto;
    flex-shrink: 0;
}

/* Resultado: scroll de página (sin caja interna) */
body.has-tracking-result {
    height: auto;
    min-height: 100%;
    overflow-x: hidden;
    overflow-y: auto;
}

body.has-tracking-result .site,
body.has-tracking-result .site.page-home {
    height: auto;
    max-height: none;
    min-height: 100dvh;
    overflow: visible;
}

body.has-tracking-result .site-main,
body.has-tracking-result .site.page-home .site-main {
    overflow: visible;
    justify-content: flex-start;
    padding-top: max(8px, env(safe-area-inset-top));
}

body.has-tracking-result .home-stack {
    margin-block: 0;
}

body.has-tracking-result .card-lead,
body.has-tracking-result .card-route,
body.has-tracking-result .trust-row {
    display: none;
}

body.has-tracking-result .card-badge {
    width: 56px;
    height: 56px;
    margin-bottom: 10px;
}

body.has-tracking-result .card-badge__icon {
    width: 28px;
    height: 28px;
}

body.has-tracking-result .track-card {
    margin-bottom: 8px;
}

/* Card */
.track-card,
.container {
    background: var(--white);
    border: 1px solid rgba(226, 232, 240, 0.9);
    border-radius: var(--radius);
    box-shadow:
        0 4px 6px rgba(12, 30, 58, 0.03),
        0 16px 48px rgba(12, 30, 58, 0.1);
    padding: clamp(22px, 3.2vh, 32px) clamp(18px, 4vw, 26px);
}

.card-badge {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 72px;
    height: 72px;
    margin: 0 auto 16px;
    border-radius: 50%;
    background: linear-gradient(160deg, #e8f1ff 0%, #d6e6ff 100%);
    color: var(--blue);
    text-decoration: none;
    cursor: pointer;
    transition: transform 0.15s ease, box-shadow 0.15s ease;
}

a.card-badge:hover {
    transform: scale(1.04);
    box-shadow: 0 4px 14px rgba(0, 108, 255, 0.18);
    color: var(--blue-dark);
}

a.card-badge:focus-visible {
    outline: 2px solid var(--blue);
    outline-offset: 3px;
}

.card-badge__icon {
    width: 36px;
    height: 36px;
}

.card-head {
    text-align: center;
    margin-bottom: 0;
}

.card-title {
    margin: 0 0 8px;
    font-size: clamp(1.2rem, 2.4vh + 0.5rem, 1.45rem);
    font-weight: 700;
    color: var(--navy);
    letter-spacing: 0.04em;
    text-transform: uppercase;
}

.card-lead {
    margin: 0;
    font-size: clamp(0.88rem, 1.5vh + 0.4rem, 0.98rem);
    color: var(--muted);
    line-height: 1.4;
}

.card-route {
    margin: 12px 0 0;
    font-size: clamp(0.95rem, 1.6vh + 0.45rem, 1.05rem);
    font-weight: 700;
    color: var(--blue);
    letter-spacing: 0.01em;
}

.card-route__arrow {
    display: inline-block;
    margin: 0 0.2em;
    font-weight: 700;
}

/* Form — vertical stack, always */
.track-form {
    display: flex;
    flex-direction: column;
    gap: 10px;
    margin-top: 20px;
}

.field-label {
    display: block;
    font-size: 14px;
    font-weight: 600;
    color: var(--navy);
    margin: 0;
}

.field-input,
input[type="text"],
input[type="email"],
input[type="tel"],
input[type="password"],
select.field-input {
    display: block;
    width: 100%;
    padding: 13px 14px;
    border: 1.5px solid #d8e0ec;
    border-radius: var(--radius-sm);
    font-family: var(--font);
    font-size: 16px;
    color: var(--text);
    background: var(--white);
    min-height: 50px;
    margin: 0;
    -webkit-appearance: none;
    appearance: none;
}

.field-input:focus,
input[type="text"]:focus,
input[type="email"]:focus,
input[type="tel"]:focus,
input[type="password"]:focus,
select.field-input:focus {
    outline: none;
    border-color: var(--blue);
    box-shadow: 0 0 0 3px rgba(0, 108, 255, 0.15);
    background: var(--white);
}

.btn-track,
.btn {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    width: 100%;
    padding: 14px 18px;
    border: none;
    border-radius: var(--radius-sm);
    font-family: var(--font);
    font-size: 16px;
    font-weight: 600;
    color: var(--white);
    background: var(--blue);
    cursor: pointer;
    min-height: 50px;
    margin: 0;
    -webkit-tap-highlight-color: transparent;
    transition: background 0.15s ease, transform 0.12s ease;
}

.btn-track__icon {
    width: 20px;
    height: 20px;
    flex-shrink: 0;
}

.btn-track:hover:not(:disabled),
.btn:hover:not(:disabled):not(.btn-secondary) {
    background: var(--blue-dark);
}

.btn-track:active:not(:disabled),
.btn:active:not(:disabled):not(.btn-secondary) {
    transform: translateY(1px);
}

.btn-track:disabled,
.btn:disabled,
button:disabled {
    opacity: 0.65;
    cursor: not-allowed;
}

/* Status */
.status {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    margin-top: 14px;
    padding: 12px 14px;
    border-radius: var(--radius-sm);
    font-size: 14px;
    font-weight: 500;
    text-align: center;
    word-break: break-word;
}

.status[hidden] {
    display: none !important;
}

.status--success { background: #e8f8f0; color: #0d7a52; }
.status--error { background: #fef3f2; color: #b42318; }
.status--warning { background: #fffaeb; color: #b54708; }
.status--loading,
.status--info { background: #eef5ff; color: #0052cc; }

.status--loading::before {
    content: '';
    width: 16px;
    height: 16px;
    flex-shrink: 0;
    border: 2px solid currentColor;
    border-right-color: transparent;
    border-radius: 50%;
    animation: status-spin 0.75s linear infinite;
}

@keyframes status-spin {
    to { transform: rotate(360deg); }
}

/* Tracking result (MiLocker) */
.track-result {
    margin-top: 14px;
    text-align: left;
}

.track-result[hidden] {
    display: none !important;
}

.track-result__current {
    padding: 12px;
    border-radius: var(--radius-sm);
    background: #e8f8f0;
    color: #0d7a52;
}

.track-result__label {
    display: block;
    font-size: 12px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.03em;
    opacity: 0.85;
    margin-bottom: 4px;
}

.track-result__status {
    display: block;
    font-size: 15px;
    font-weight: 700;
    line-height: 1.35;
}

.track-result__meta {
    margin: 12px 0 0;
    padding: 0;
}

.track-result__meta-row {
    display: flex;
    gap: 10px;
    justify-content: space-between;
    padding: 8px 0;
    border-bottom: 1px solid var(--border);
    font-size: 13px;
}

.track-result__meta-row:last-child {
    border-bottom: none;
}

.track-result__meta-row dt {
    margin: 0;
    color: var(--muted);
    font-weight: 500;
    flex-shrink: 0;
}

.track-result__meta-row dd {
    margin: 0;
    color: var(--text);
    font-weight: 600;
    text-align: right;
}

.track-timeline {
    list-style: none;
    margin: 14px 0 0;
    padding: 4px 0 0 4px;
    max-height: none;
}

.track-timeline__item {
    position: relative;
    display: flex;
    gap: 12px;
    padding: 0 0 14px 0;
}

.track-timeline__item:last-child {
    padding-bottom: 0;
}

.track-timeline__item--tail {
    padding-bottom: 0;
}

.track-timeline__item--tail::before {
    display: none;
}

.track-timeline__item[hidden] {
    display: none !important;
}

.track-timeline__toggle {
    display: block;
    width: 100%;
    margin-top: 10px;
    padding: 10px 12px;
    border: 1px solid #d8e0ec;
    border-radius: var(--radius-sm);
    background: #f7f9fc;
    color: var(--blue-dark);
    font-family: var(--font);
    font-size: 13px;
    font-weight: 600;
    cursor: pointer;
}

.track-timeline__toggle:hover:not(:disabled) {
    background: #eef4ff;
    border-color: #c8daf8;
    color: var(--blue-dark);
}

.track-timeline__item:not(:last-child)::before {
    content: '';
    position: absolute;
    left: 5px;
    top: 12px;
    bottom: 0;
    width: 2px;
    background: #d8e0ec;
}

.track-timeline__dot {
    width: 12px;
    height: 12px;
    margin-top: 4px;
    border-radius: 50%;
    background: var(--blue);
    flex-shrink: 0;
    position: relative;
    z-index: 1;
}

.track-timeline__item:first-child .track-timeline__dot {
    background: #0d7a52;
}

.track-timeline__detail {
    margin: 0 0 2px;
    font-size: 14px;
    font-weight: 600;
    color: var(--navy);
    line-height: 1.35;
}

.track-timeline__meta {
    margin: 0;
    font-size: 12px;
    color: var(--muted);
}

.track-result__empty {
    margin: 12px 0 0;
    padding: 10px 12px;
    border-radius: var(--radius-sm);
    background: #eff6ff;
    color: #0052cc;
    font-size: 13px;
    font-weight: 500;
    text-align: center;
}

/* Trust pills */
.trust-row {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 8px;
    margin-top: 18px;
    padding-top: 16px;
    border-top: 1px solid var(--border);
}

.trust-pill {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 7px 12px;
    background: #f4f7fb;
    color: var(--muted);
    border-radius: 999px;
    font-size: 12px;
    font-weight: 500;
}

.trust-pill__icon {
    width: 14px;
    height: 14px;
    color: var(--blue);
    flex-shrink: 0;
}

/* Footer */
.site-footer,
footer {
    flex-shrink: 0;
    background: var(--navy);
    color: rgba(255, 255, 255, 0.7);
    padding: clamp(18px, 2.8vh, 28px) clamp(16px, 4vw, 24px) calc(clamp(14px, 2vh, 20px) + env(safe-area-inset-bottom));
    text-align: center;
}

.footer-badge {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 72px;
    height: 72px;
    margin: 0 auto 14px;
    background: transparent;
}

.footer-badge__img {
    width: 72px;
    height: 72px;
    object-fit: contain;
    display: block;
    border-radius: 12px;
}

.footer-badge__icon {
    width: 52px;
    height: 52px;
}

.footer-name {
    margin: 0 0 14px;
    font-size: clamp(15px, 1.8vh + 0.45rem, 17px);
    font-weight: 700;
    color: var(--white);
    line-height: 1.35;
    max-width: 22ch;
    margin-left: auto;
    margin-right: auto;
}

.footer-tagline {
    margin: 0 0 clamp(14px, 2vh, 18px);
    font-size: clamp(12px, 1.4vh + 0.3rem, 13px);
    color: rgba(255, 255, 255, 0.55);
    line-height: 1.4;
}

.footer-route {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0;
    margin: 0 auto 16px;
    width: min(160px, 48vw);
}

.footer-route__pin {
    width: 18px;
    height: 18px;
    flex-shrink: 0;
}

.footer-route__line {
    flex: 1;
    height: 0;
    border-top: 2px dashed rgba(0, 108, 255, 0.85);
    margin: 0 4px;
    transform: translateY(-3px);
}

.footer-copy {
    margin: 0;
    padding-top: 14px;
    border-top: 1px solid rgba(255, 255, 255, 0.12);
    font-size: 11px;
    color: rgba(255, 255, 255, 0.35);
}

footer p {
    margin: 0;
}

/* Shared logo helper (métricas / prototipo) */
.page-logo-link {
    display: inline-block;
    line-height: 0;
    text-decoration: none;
    cursor: pointer;
}

.page-logo {
    width: clamp(72px, 18vh, 110px);
    max-width: min(110px, 28vw);
    height: auto;
    margin: 0 auto;
}

.page-logo-link .page-logo {
    margin: 0;
}

.route-tag {
    display: inline-block;
    margin-bottom: 8px;
    padding: 4px 11px;
    background: #eef4ff;
    color: var(--blue-dark);
    border-radius: 999px;
    font-size: 11px;
    font-weight: 600;
}

/* Metricas */
.container h1,
.container h2 {
    margin: 0 0 8px;
    font-size: 22px;
    font-weight: 700;
    color: var(--navy);
    text-align: center;
}

.container .subtitle {
    margin: 0 0 20px;
    font-size: 14px;
    color: var(--muted);
    text-align: center;
}

/* Login de métricas: box centrado en viewport */
body.page-metrics-login-body {
    height: 100%;
    overflow: hidden;
}

.site.page-metrics-login {
    min-height: 100dvh;
    height: 100dvh;
    max-height: 100dvh;
    display: flex;
    flex-direction: column;
}

.site.page-metrics-login .site-main {
    flex: 1 1 auto;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: stretch;
    max-width: 420px;
    width: 100%;
    margin: 0 auto;
    overflow: visible;
}

.metrics-login-box {
    width: 100%;
}

.input-group {
    margin-bottom: 12px;
}

.input-group input {
    text-align: center;
}

.metrics-wrap {
    max-width: none;
    width: 100%;
    margin: 0;
    text-align: left;
}

.site.page-metrics {
    height: auto;
    max-height: none;
    min-height: 100dvh;
}

body:has(.page-metrics),
body.page-metrics-body {
    height: auto;
    min-height: 100%;
    overflow-y: auto;
}

.site.page-metrics .site-main {
    max-width: none;
    width: 100%;
    padding: 20px 24px 28px;
    overflow: visible;
}

.site-footer--compact {
    padding: 14px 16px;
}

.site-footer--compact .footer-copy {
    margin: 0;
    padding-top: 0;
    border-top: none;
    font-size: 12px;
    color: rgba(255, 255, 255, 0.7);
}

.metrics-top {
    display: flex;
    flex-wrap: wrap;
    justify-content: space-between;
    align-items: center;
    gap: 12px;
    margin-bottom: 20px;
}

.metrics-top h1 {
    margin: 0;
    font-size: 22px;
    font-weight: 700;
    color: var(--navy);
}

.metrics-top p {
    margin: 4px 0 0;
    color: var(--muted);
    font-size: 14px;
}

.metrics-storage-note {
    font-size: 12px !important;
}

.metrics-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(160px, 1fr));
    gap: 12px;
    margin-bottom: 20px;
}

.metrics-panels {
    display: grid;
    grid-template-columns: 1fr;
    gap: 14px;
    margin-bottom: 14px;
}

@media (min-width: 960px) {
    .metrics-panels {
        grid-template-columns: 1.4fr 1fr;
        align-items: start;
    }

    .metrics-panels--secondary {
        grid-template-columns: 1fr 1fr;
    }
}

@media (min-width: 1280px) {
    .site.page-metrics .site-main {
        padding: 24px 32px 36px;
    }

    .metrics-panels {
        grid-template-columns: 1.5fr 1fr;
    }
}

.stat-box {
    background: var(--white);
    border: 1px solid var(--border);
    border-radius: var(--radius-sm);
    padding: 14px;
}

.stat-box .label {
    font-size: 11px;
    color: var(--muted);
    text-transform: uppercase;
    font-weight: 600;
    margin-bottom: 4px;
}

.stat-box .value {
    font-size: 24px;
    font-weight: 700;
    color: var(--blue);
}

.stat-box .sub {
    font-size: 12px;
    color: var(--muted);
    margin-top: 4px;
}

.stat-box.error .value {
    color: #b42318;
}

.panel {
    background: var(--white);
    border: 1px solid var(--border);
    border-radius: var(--radius-sm);
    padding: 16px;
    margin-bottom: 14px;
}

.panel h2 {
    margin: 0 0 10px;
    font-size: 15px;
    font-weight: 600;
}

.metrics-table-wrap {
    overflow-x: auto;
}

.metrics-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 13px;
    table-layout: auto;
}

.metrics-table th,
.metrics-table td {
    padding: 10px 12px;
    border-bottom: 1px solid var(--border);
    text-align: left;
    vertical-align: top;
}

.metrics-table th {
    white-space: nowrap;
    color: var(--muted);
    font-size: 12px;
    text-transform: uppercase;
    letter-spacing: 0.02em;
}

.metrics-table td:first-child,
.metrics-table .col-date {
    white-space: nowrap;
}

.tracking-code {
    font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
    font-size: 12px;
    font-weight: 600;
    color: var(--navy);
    word-break: normal;
    white-space: nowrap;
}

.badge {
    display: inline-block;
    padding: 2px 8px;
    border-radius: 999px;
    font-size: 11px;
    font-weight: 700;
    letter-spacing: 0.02em;
}

.badge--ok {
    background: #e8f8f0;
    color: #0d7a52;
}

.badge--err {
    background: #fef3f2;
    color: #b42318;
}

.bar-row {
    display: grid;
    grid-template-columns: 80px 1fr 28px;
    gap: 8px;
    margin-bottom: 6px;
    font-size: 12px;
}

.bar-track {
    height: 8px;
    background: #eef4ff;
    border-radius: 999px;
    overflow: hidden;
}

.bar-fill {
    height: 100%;
    background: var(--blue);
    border-radius: 999px;
}

.metrics-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    align-items: center;
}

.btn-small {
    width: auto;
    max-width: none;
    padding: 10px 16px;
    font-size: 14px;
    text-decoration: none;
    text-align: center;
    display: inline-block;
}

a.btn-small {
    color: #fff;
}

.btn-secondary,
a.btn-secondary {
    background: #fff;
    color: var(--blue-dark);
    border: 1px solid #c8daf8;
}

.btn-secondary:hover:not(:disabled),
a.btn-secondary:hover {
    background: #eef4ff;
    color: var(--blue-dark);
}

.btn-icon,
a.btn-icon {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 40px;
    height: 40px;
    padding: 0;
    flex-shrink: 0;
}

.btn-icon__svg {
    width: 18px;
    height: 18px;
    display: block;
}

a.btn-icon:hover .btn-icon__svg {
    transform: rotate(-45deg);
    transition: transform 0.2s ease;
}

.btn-icon__svg {
    transition: transform 0.2s ease;
}

.empty-msg {
    color: var(--muted);
    text-align: center;
    padding: 16px;
    font-size: 14px;
}

/* Shop / next-purchase modal */
body.modal-open {
    overflow: hidden;
}

.shop-modal {
    position: fixed;
    inset: 0;
    z-index: 1000;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: max(12px, env(safe-area-inset-top)) 12px max(12px, env(safe-area-inset-bottom));
    background: rgba(12, 30, 58, 0.72);
    backdrop-filter: blur(4px);
    -webkit-backdrop-filter: blur(4px);
}

.shop-modal[hidden] {
    display: none !important;
}

.shop-modal__box {
    position: relative;
    width: min(100%, 520px);
    max-width: 520px;
    max-height: min(90dvh, 680px);
    overflow-x: hidden;
    overflow-y: auto;
    background: var(--white);
    border: 1px solid rgba(226, 232, 240, 0.9);
    border-radius: var(--radius);
    padding: 24px 20px 18px;
    box-shadow:
        0 4px 6px rgba(12, 30, 58, 0.03),
        0 20px 50px rgba(12, 30, 58, 0.28);
    -webkit-overflow-scrolling: touch;
}

.shop-modal__close {
    position: absolute;
    top: 8px;
    right: 8px;
    z-index: 2;
    display: flex;
    align-items: center;
    justify-content: center;
    width: 40px;
    min-height: 40px;
    padding: 0;
    border: none;
    border-radius: 10px;
    background: transparent;
    color: var(--muted);
    cursor: pointer;
}

.shop-modal__close svg {
    width: 18px;
    height: 18px;
}

.shop-modal__close:hover:not(:disabled) {
    background: var(--sky);
    color: var(--navy);
}

.shop-modal__hero {
    display: flex;
    align-items: center;
    gap: 14px;
    padding-right: 28px;
    margin-bottom: 18px;
}

.shop-modal__art {
    flex-shrink: 0;
    width: 96px;
    height: 96px;
}

.shop-modal__illustration {
    width: 100%;
    height: 100%;
    display: block;
}

.shop-modal__copy {
    min-width: 0;
    flex: 1;
}

.shop-modal__title {
    margin: 0 0 6px;
    font-size: clamp(1.05rem, 2.2vw + 0.6rem, 1.28rem);
    font-weight: 700;
    line-height: 1.25;
    color: var(--navy);
}

.shop-modal__lead {
    margin: 0;
    font-size: 14px;
    font-weight: 500;
    line-height: 1.4;
    color: var(--muted);
}

.shop-modal__stores {
    display: grid;
    grid-template-columns: repeat(6, minmax(0, 1fr));
    gap: 8px;
    margin: 0 0 16px;
    padding: 0;
    list-style: none;
}

.shop-modal__store {
    display: flex;
    align-items: center;
    justify-content: center;
    aspect-ratio: 1 / 1;
    min-width: 0;
    padding: 10px 6px;
    border: 1px solid var(--border);
    border-radius: 12px;
    background: var(--white);
    box-shadow: 0 2px 8px rgba(12, 30, 58, 0.06);
}

.shop-modal__logo {
    display: block;
    width: auto;
    height: auto;
    max-width: 90%;
    max-height: 34px;
    object-fit: contain;
    object-position: center;
}

.shop-modal__store--more {
    border-color: #c8daf8;
    background: #eef5ff;
    box-shadow: none;
}

.shop-modal__more-text {
    display: block;
    font-size: clamp(9px, 1.8vw, 11px);
    font-weight: 600;
    line-height: 1.2;
    text-align: center;
    color: var(--blue);
}

.shop-modal__footer {
    padding-top: 14px;
    border-top: 1px solid var(--border);
}

.shop-modal__btn {
    margin: 0;
    gap: 6px;
    padding: 12px 14px;
    font-size: 15px;
    min-height: 48px;
    white-space: normal;
}

.shop-modal__btn .btn-track__label {
    text-align: center;
    line-height: 1.25;
    white-space: normal;
}

@media (max-width: 520px) {
    .shop-modal__box {
        padding: 20px 14px 14px;
    }

    .shop-modal__hero {
        gap: 10px;
        margin-bottom: 14px;
    }

    .shop-modal__art {
        width: 72px;
        height: 72px;
    }

    .shop-modal__stores {
        gap: 6px;
    }

    .shop-modal__store {
        padding: 8px 4px;
        border-radius: 10px;
    }

    .shop-modal__logo {
        max-height: 24px;
        max-width: 92%;
    }

    .shop-modal__btn {
        font-size: 14px;
        min-height: 46px;
    }
}

@media (max-width: 380px) {
    .shop-modal__hero {
        flex-direction: column;
        align-items: flex-start;
        padding-right: 28px;
    }

    .shop-modal__art {
        width: 64px;
        height: 64px;
    }

    .shop-modal__lead {
        font-size: 13px;
    }

    .shop-modal__logo {
        max-height: 18px;
    }
}

@media (max-height: 740px) {
    .track-form {
        margin-top: 14px;
        gap: 8px;
    }

    .card-badge {
        width: 60px;
        height: 60px;
        margin-bottom: 12px;
    }

    .card-badge__icon {
        width: 30px;
        height: 30px;
    }

    .field-input,
    input[type="text"],
    .btn-track,
    .btn {
        min-height: 46px;
        padding: 11px 14px;
    }

    .trust-row {
        margin-top: 12px;
        padding-top: 12px;
    }

    .footer-badge {
        width: 56px;
        height: 56px;
        margin-bottom: 10px;
    }

    .footer-badge__img {
        width: 56px;
        height: 56px;
    }

    .footer-badge__icon {
        width: 44px;
        height: 44px;
    }

    .footer-route {
        margin-bottom: 12px;
        width: min(130px, 42vw);
    }
}

@media (max-height: 640px) {
    .card-lead {
        display: none;
    }

    .trust-row {
        gap: 6px;
        margin-top: 10px;
        padding-top: 10px;
    }

    .trust-pill {
        padding: 5px 10px;
        font-size: 11px;
    }

    .footer-route {
        display: none;
    }
}

@media (max-height: 560px) {
    .trust-row {
        display: none;
    }

    .site.page-home .site-main {
        padding-top: 6px;
        padding-bottom: 6px;
    }
}

@media (max-width: 480px) {
    .trust-row {
        flex-direction: row;
        flex-wrap: wrap;
        justify-content: center;
    }

    .metrics-grid {
        grid-template-columns: 1fr 1fr;
    }
}

@media (min-width: 768px) {
    .site.page-home .site-main {
        max-width: 440px;
        padding-left: 24px;
        padding-right: 24px;
    }

    .track-card,
    .container {
        padding: 28px 28px;
    }
}

@media (min-width: 1024px) {
    .site.page-home .site-main {
        max-width: 460px;
    }
}

/* ——— Prototipo POC (/prototipo) ——— */
body.page-proto-body {
    background: linear-gradient(180deg, #e8eef8 0%, #dfe7f3 100%);
}

.site.page-proto {
    height: auto;
    max-height: none;
    min-height: 100dvh;
    overflow: visible;
    width: 100%;
}

.site.page-proto .site-main {
    max-width: none;
    width: 100%;
    margin: 0;
    padding: 0;
    overflow: visible;
}

.site.page-proto .site-footer {
    width: 100%;
    margin-top: auto;
    padding-left: clamp(16px, 4vw, 48px);
    padding-right: clamp(16px, 4vw, 48px);
}

.proto-top {
    position: sticky;
    top: 0;
    z-index: 30;
    background: rgba(255, 255, 255, 0.92);
    backdrop-filter: blur(10px);
    border-bottom: 1px solid var(--border);
}

.proto-top__inner {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
    width: 100%;
    max-width: 1200px;
    margin: 0 auto;
    padding: 10px clamp(16px, 4vw, 48px);
}

.proto-brand {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    text-decoration: none;
    color: var(--navy);
    font-weight: 700;
    font-size: 16px;
    flex-shrink: 0;
}

.proto-brand img {
    width: 40px;
    height: 40px;
    border-radius: 10px;
}

.proto-brand em {
    font-style: normal;
    color: var(--blue);
}

.proto-nav-desktop {
    display: none;
    align-items: center;
    gap: 4px;
    flex-wrap: wrap;
    justify-content: flex-end;
}

.proto-nav-desktop__link {
    padding: 8px 12px;
    border-radius: 999px;
    text-decoration: none;
    color: var(--muted);
    font-size: 14px;
    font-weight: 600;
    white-space: nowrap;
}

.proto-nav-desktop__link:hover {
    color: var(--navy);
    background: #eef4ff;
}

.proto-nav-desktop__link.is-active {
    color: var(--blue-dark);
    background: #eef4ff;
}

.proto-menu-btn {
    width: 44px;
    min-height: 44px;
    padding: 0;
    display: inline-flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    gap: 5px;
    background: var(--white);
    border: 1px solid var(--border);
    border-radius: 10px;
    color: var(--navy);
    flex-shrink: 0;
}

.proto-menu-btn span {
    display: block;
    width: 18px;
    height: 2px;
    background: currentColor;
    border-radius: 2px;
}

.proto-menu-btn:hover:not(:disabled) {
    background: #eef4ff;
}

.proto-drawer {
    position: fixed;
    inset: 0;
    z-index: 40;
    background: rgba(12, 30, 58, 0.78);
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 24px;
}

.proto-drawer[hidden] {
    display: none !important;
}

.proto-drawer__close {
    position: absolute;
    top: max(12px, env(safe-area-inset-top));
    right: 16px;
    width: 44px;
    min-height: 44px;
    padding: 0;
    font-size: 28px;
    line-height: 1;
    background: transparent;
    color: #ffd666;
}

.proto-drawer__close:hover:not(:disabled) {
    background: transparent;
    color: #fff;
}

.proto-drawer__nav {
    display: flex;
    flex-direction: column;
    gap: 10px;
    width: min(280px, 100%);
    text-align: center;
}

.proto-drawer__link {
    display: block;
    padding: 12px 16px;
    border-radius: 12px;
    color: #ffd666;
    text-decoration: none;
    font-weight: 700;
    font-size: 18px;
}

.proto-drawer__link.is-active,
.proto-drawer__link:hover {
    background: rgba(255, 255, 255, 0.12);
    color: #fff;
}

.proto-drawer__note {
    margin: 18px 0 0;
    color: rgba(255, 255, 255, 0.65);
    font-size: 12px;
}

.proto-banner {
    margin: 0 0 16px;
    padding: 10px 14px;
    border-radius: 999px;
    background: #fff7e6;
    color: #8a5a00;
    font-size: 12px;
    font-weight: 600;
    text-align: center;
}

.site.page-proto > .proto-banner,
.site.page-proto .site-main > .proto-banner {
    margin: 12px clamp(16px, 4vw, 48px) 0;
}

.proto-banner--bar {
    margin: 0 !important;
    border-radius: 0;
    padding: 10px clamp(16px, 4vw, 48px);
}

.proto-section {
    width: 100%;
    max-width: 1200px;
    margin: 0 auto;
    padding: 16px clamp(16px, 4vw, 48px) 8px;
}

.proto-section--narrow {
    max-width: 640px;
}

.proto-section--track {
    max-width: 760px;
}

.proto-grid {
    display: grid;
    gap: 14px;
}

.proto-grid--2 {
    grid-template-columns: 1fr;
}

.proto-hero {
    width: 100%;
    background:
        radial-gradient(ellipse 80% 60% at 80% 20%, rgba(0, 108, 255, 0.35), transparent 55%),
        linear-gradient(160deg, #0c1e3a 0%, #123a6b 55%, #0c1e3a 100%);
    color: #fff;
    margin: 0 0 8px;
    padding: clamp(28px, 6vw, 64px) clamp(16px, 4vw, 48px);
}

.proto-hero__inner {
    width: 100%;
    max-width: 1200px;
    margin: 0 auto;
}

.proto-hero__eyebrow {
    margin: 0 0 12px;
    font-size: 12px;
    font-weight: 600;
    letter-spacing: 0.04em;
    text-transform: uppercase;
    color: #9ec1ff;
}

.proto-hero__title {
    margin: 0 0 12px;
    max-width: 18ch;
    font-size: clamp(1.6rem, 3.5vw + 0.8rem, 2.75rem);
    line-height: 1.15;
    letter-spacing: -0.03em;
}

.proto-hero__lead {
    margin: 0 0 22px;
    max-width: 42ch;
    color: rgba(255, 255, 255, 0.85);
    font-size: clamp(0.95rem, 1vw + 0.7rem, 1.15rem);
}

.proto-hero__actions {
    display: flex;
    flex-direction: column;
    gap: 10px;
    max-width: 420px;
}

.proto-btn {
    text-align: center;
    text-decoration: none;
    width: 100%;
}

a.btn.proto-btn {
    color: #fff;
}

a.btn-secondary.proto-btn {
    color: var(--blue-dark);
}

.proto-panel {
    background: var(--white);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: clamp(16px, 2.5vw, 24px);
    height: 100%;
}

.proto-panel--accent {
    background: linear-gradient(160deg, #eef4ff 0%, #fff 70%);
}

.proto-panel__title {
    margin: 0 0 8px;
    font-size: clamp(1.1rem, 1vw + 0.9rem, 1.35rem);
    color: var(--navy);
}

.proto-panel__lead {
    margin: 0 0 12px;
    color: var(--muted);
    font-size: 0.95rem;
    line-height: 1.45;
}

.proto-panel__cta {
    font-weight: 700;
    color: var(--blue);
    text-decoration: none;
}

.proto-services {
    background: var(--white);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: clamp(16px, 2.5vw, 24px);
    height: 100%;
}

.proto-services__title {
    margin: 0 0 14px;
    font-size: clamp(1.1rem, 1vw + 0.9rem, 1.35rem);
    color: var(--navy);
}

.proto-steps {
    margin: 0;
    padding: 0;
    list-style: none;
    display: flex;
    flex-direction: column;
    gap: 14px;
    counter-reset: step;
}

.proto-steps li {
    display: grid;
    grid-template-columns: 32px 1fr;
    gap: 12px;
    align-items: start;
    counter-increment: step;
}

.proto-steps li::before {
    content: counter(step);
    width: 32px;
    height: 32px;
    border-radius: 50%;
    background: #eef4ff;
    color: var(--blue-dark);
    font-size: 14px;
    font-weight: 700;
    display: flex;
    align-items: center;
    justify-content: center;
}

.proto-steps strong {
    display: block;
    color: var(--navy);
    font-size: 1rem;
}

.proto-steps span {
    display: block;
    color: var(--muted);
    font-size: 0.9rem;
    margin-top: 2px;
}

.proto-feature-list {
    margin: 0;
    padding: 0;
    list-style: none;
    display: grid;
    grid-template-columns: 1fr;
    gap: 0;
}

.proto-feature-list li {
    padding: 12px 0;
    border-bottom: 1px solid var(--border);
    font-size: 0.98rem;
    color: var(--text);
}

.proto-feature-list li:last-child {
    border-bottom: none;
}

.proto-card {
    background: var(--white);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    box-shadow: 0 10px 40px rgba(12, 30, 58, 0.08);
    padding: clamp(16px, 3vw, 28px);
    margin-bottom: 8px;
    width: 100%;
}

.proto-form {
    display: flex;
    flex-direction: column;
    gap: 10px;
    margin-top: 14px;
}

.proto-form .field-label {
    margin-top: 2px;
}

.proto-form select.field-input {
    cursor: pointer;
}

.proto-switch {
    margin: 14px 0 0;
    text-align: center;
    font-size: 14px;
    color: var(--muted);
}

.proto-switch a {
    color: var(--blue);
    font-weight: 600;
    text-decoration: none;
}

.proto-demo-hint {
    margin-top: 14px;
    padding: 10px 12px;
    background: #eef4ff;
    border-radius: var(--radius-sm);
    font-size: 13px;
    color: var(--text);
}

.proto-demo-hint code {
    font-size: 12px;
    background: #fff;
    padding: 1px 6px;
    border-radius: 6px;
}

.proto-locker {
    margin-top: 8px;
    padding: 14px;
    border-radius: var(--radius-sm);
    background: #f3f7ff;
    border: 1px dashed #b7c9eb;
}

.proto-locker__label {
    margin: 0 0 8px;
    font-size: 12px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.04em;
    color: var(--blue-dark);
}

.proto-locker__address {
    margin: 0 0 12px;
    font-style: normal;
    white-space: pre-line;
    font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
    font-size: 13px;
    line-height: 1.55;
    color: var(--navy);
}

.proto-locker__hint {
    margin: 8px 0 0;
    font-size: 12px;
    color: #0d7a52;
    font-weight: 600;
}

body.proto-menu-open {
    overflow: hidden;
}

@media (min-width: 640px) {
    .proto-hero__actions {
        flex-direction: row;
        max-width: none;
    }

    .proto-btn {
        width: auto;
        min-width: 200px;
    }

    .proto-feature-list {
        grid-template-columns: 1fr 1fr;
        gap: 0 18px;
    }

    .proto-feature-list li {
        border-bottom: 1px solid var(--border);
    }
}

@media (min-width: 768px) {
    .proto-menu-btn {
        display: none;
    }

    .proto-nav-desktop {
        display: flex;
    }

    .proto-grid--2 {
        grid-template-columns: 1fr 1fr;
        gap: 18px;
    }

    .proto-hero {
        min-height: min(52vh, 420px);
        display: flex;
        align-items: center;
    }
}

@media (min-width: 1024px) {
    .proto-hero__title {
        max-width: 16ch;
    }

    .proto-section {
        padding-top: 24px;
        padding-bottom: 16px;
    }

    .proto-grid--2 {
        gap: 22px;
    }
}

@media (max-width: 380px) {
    .proto-brand span {
        font-size: 14px;
    }

    .proto-hero__title {
        max-width: none;
    }
}
