:root {
    --teal: #0f6c6c;
    --teal-dark: #0b4f4f;
    --cream: #f6efe4;
    --paper: #fffdf8;
    --ink: #1c1916;
    --muted: #5c564e;
    --amber: #e8a317;
    --line: #e4d8c6;
    --radius: 16px;
}

* { box-sizing: border-box; }

html, body {
    margin: 0;
    color: var(--ink);
    background: var(--cream);
    font-family: "Segoe UI", system-ui, sans-serif;
    line-height: 1.5;
}

a { color: var(--teal); }

.page {
    min-height: 100vh;
    display: flex;
    flex-direction: column;
}

.topbar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
    padding: 16px 28px;
    background: var(--paper);
    border-bottom: 1px solid var(--line);
}

.brand {
    display: flex;
    align-items: center;
    gap: 10px;
    color: var(--teal-dark);
    font-weight: 700;
    font-size: 1.15rem;
    text-decoration: none;
}

.brand img {
    width: 36px;
    height: 36px;
}

.topbar nav {
    display: flex;
    align-items: center;
    gap: 18px;
}

.topbar nav a {
    color: var(--ink);
    text-decoration: none;
    font-weight: 600;
}

.topbar nav a.cta {
    background: var(--teal);
    color: #fff;
    padding: 10px 16px;
    border-radius: 999px;
}

.topbar nav a.cta:hover { background: var(--teal-dark); }

main { flex: 1; }

.wrap {
    width: min(1080px, calc(100% - 40px));
    margin: 0 auto;
}

.hero {
    display: grid;
    grid-template-columns: 1.1fr 0.9fr;
    gap: 48px;
    align-items: center;
    padding: 64px 0 40px;
}

.hero h1 {
    margin: 0 0 16px;
    color: var(--teal-dark);
    font-size: clamp(2rem, 4vw, 3.1rem);
    line-height: 1.15;
}

.lead {
    font-size: 1.2rem;
    color: var(--muted);
    margin: 0 0 28px;
    max-width: 36rem;
}

.actions {
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
}

[hidden] {
    display: none !important;
}

.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border: 0;
    border-radius: 12px;
    padding: 14px 22px;
    font-size: 1.05rem;
    font-weight: 650;
    text-decoration: none;
    cursor: pointer;
}

.btn-primary { background: var(--teal); color: #fff; }
.btn-primary:hover { background: var(--teal-dark); }
.btn-ghost { background: transparent; color: var(--teal-dark); border: 1.5px solid var(--teal); }

.phones {
    position: relative;
    min-height: 280px;
}

.phone {
    position: absolute;
    width: 150px;
    height: 280px;
    border-radius: 28px;
    border: 8px solid var(--teal-dark);
    background: #143838;
}

.phone.a { left: 18%; top: 0; }
.phone.b { left: 48%; top: 36px; border-color: var(--amber); background: #3d2e10; }

.ring {
    position: absolute;
    left: 46%;
    top: 118px;
    width: 64px;
    height: 64px;
    margin-left: -32px;
    border: 7px solid var(--amber);
    border-radius: 50%;
    background: rgba(232, 163, 23, 0.2);
}

.section {
    padding: 28px 0 56px;
}

.section h2 {
    margin: 0 0 20px;
    font-size: 1.5rem;
}

.cards {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 16px;
}

.card {
    background: var(--paper);
    border: 1px solid var(--line);
    border-radius: var(--radius);
    padding: 20px;
}

.card .n {
    display: inline-flex;
    width: 32px;
    height: 32px;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    background: var(--teal);
    color: #fff;
    font-weight: 700;
    margin-bottom: 10px;
}

.trust {
    background: var(--teal-dark);
    color: #f6efe4;
    border-radius: var(--radius);
    padding: 28px;
}

.trust h2 { color: #fff; }
.trust ul { margin: 0; padding-left: 1.2rem; }

.site-footer {
    margin-top: auto;
    padding: 28px;
    background: #163333;
    color: #d9cfc0;
}

.site-footer .wrap {
    display: flex;
    justify-content: space-between;
    gap: 16px;
    flex-wrap: wrap;
}

.site-footer a { color: #fff; }

.install-hint {
    margin: 16px 0 0;
    color: var(--muted);
    font-size: 0.95rem;
}

.app-shell {
    height: 100vh;
    overflow: hidden;
}

.topbar-app {
    padding: 10px 20px;
}

.app-tag {
    font-size: 0.8rem;
    font-weight: 700;
    letter-spacing: 0.04em;
    text-transform: uppercase;
    color: var(--teal);
    background: #e7f3f3;
    padding: 6px 10px;
    border-radius: 999px;
}

.app-main {
    flex: 1;
    min-height: 0;
    display: flex;
}

.tool {
    width: min(560px, calc(100% - 40px));
    margin: 40px auto;
    background: var(--paper);
    border: 1px solid var(--line);
    border-radius: 20px;
    padding: 32px;
}

.tool h1 {
    margin: 0 0 8px;
    color: var(--teal-dark);
}

.tool .sub { color: var(--muted); margin: 0 0 24px; }

.tool label {
    display: block;
    font-weight: 700;
    margin-bottom: 8px;
}

.tool input {
    width: 100%;
    font-size: 2rem;
    letter-spacing: 0.12em;
    padding: 14px 16px;
    border: 2px solid var(--teal);
    border-radius: 12px;
}

.tool .account {
    margin-bottom: 24px;
    padding: 16px;
    border: 1px solid var(--line);
    border-radius: 12px;
    background: #fff;
}

.account-line { margin: 0 0 12px; color: var(--muted); }

#google-button {
    min-height: 44px;
    margin-top: 8px;
}

#google-signin,
#google-signout {
    margin-top: 8px;
}

.tool .actions { margin-top: 16px; }

.btn-stop { background: #b42318; color: #fff; }
.status { min-height: 1.4em; color: var(--muted); }

.desk {
    flex: 1;
    display: grid;
    grid-template-columns: minmax(280px, 380px) minmax(0, 1fr);
    gap: 20px;
    width: 100%;
    min-height: 0;
    padding: 16px 20px 20px;
    align-items: stretch;
}

.desk .tool {
    width: auto;
    margin: 0;
    align-self: start;
    max-height: 100%;
    overflow: auto;
}

.stage {
    position: relative;
    display: flex;
    align-items: center;
    justify-content: center;
    min-height: 0;
    background:
        radial-gradient(circle at 20% 20%, rgba(15, 108, 108, 0.18), transparent 42%),
        #163333;
    border-radius: 24px;
    padding: 20px;
}

.bezel {
    position: relative;
    height: min(100%, calc(100vh - 96px));
    aspect-ratio: 9 / 19.4;
    max-width: 100%;
    background: #111;
    border: 10px solid #1c1916;
    border-radius: 36px;
    overflow: hidden;
    box-shadow: 0 24px 60px rgba(0, 0, 0, 0.35);
}

.placeholder {
    margin: 0;
    position: absolute;
    inset: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 28px;
    color: #d9cfc0;
    text-align: center;
    font-size: 1.05rem;
}

.stage img {
    display: block;
    width: 100%;
    height: 100%;
    object-fit: contain;
    cursor: crosshair;
    background: #000;
}

body.helping .tool .sub,
body.helping .account {
    display: none;
}

@media (max-width: 800px) {
    .app-shell {
        height: auto;
        overflow: auto;
    }

    .desk {
        display: block;
        padding: 12px;
    }

    .desk .tool {
        margin: 0 auto 16px;
        width: min(420px, 100%);
    }

    .bezel {
        height: auto;
        width: min(280px, 100%);
        margin: 0 auto;
        min-height: 520px;
    }
}

.mark {
    position: absolute;
    width: 88px;
    height: 88px;
    margin: -44px 0 0 -44px;
    border: 8px solid var(--amber);
    border-radius: 50%;
    background: rgba(232, 163, 23, 0.28);
    pointer-events: none;
    display: none;
}

.legal {
    width: min(720px, calc(100% - 40px));
    margin: 40px auto 64px;
    background: var(--paper);
    border: 1px solid var(--line);
    border-radius: 20px;
    padding: 32px;
}

/* Primera publicación: .hero va suelto en main, sin .wrap */
main > section.hero {
    display: block;
    width: min(720px, calc(100% - 40px));
    margin: 48px auto 16px;
}

main > section.hero > h1 {
    margin: 0 0 16px;
    color: var(--teal-dark);
    font-size: clamp(2rem, 4vw, 3rem);
    line-height: 1.15;
}

main > section.hero > p {
    font-size: 1.2rem;
    color: var(--muted);
}

a.go {
    display: inline-flex;
    margin-top: 12px;
    background: var(--teal);
    color: #fff !important;
    padding: 14px 22px;
    border-radius: 12px;
    text-decoration: none;
    font-weight: 650;
}

main > section.steps {
    width: min(720px, calc(100% - 40px));
    margin: 0 auto 48px;
}

main > section.steps h2 { color: var(--teal-dark); }
main > section.steps ol { font-size: 1.1rem; line-height: 1.7; }

@media (max-width: 800px) {
    .hero, .cards { grid-template-columns: 1fr; }
    .phones { min-height: 220px; }
    .phone { width: 120px; height: 220px; }
    .phone.a { left: 12%; }
    .phone.b { left: 42%; }
}

#blazor-error-ui {
    display: none;
    background: #fff3cd;
    bottom: 0;
    left: 0;
    padding: 0.6rem 1.25rem;
    position: fixed;
    width: 100%;
    z-index: 1000;
}
