:root {
    --primary: #3f69ff;
    --bg: #f6f7ff;
    --ink: #0f172a;
    --muted: #6b7280;
    --me: #e9efff;
    --him: #ffffff;
    --ring: #e5e7eb;
    --success: #22c55e;
}
* { box-sizing: border-box; }
html, body { height: 100%; margin: 0; font-family: system-ui, sans-serif; color: var(--ink); background: var(--bg); }
.wrap { display: flex; align-items: center; justify-content: center; height: 100%; padding: 12px; }
.phone { width: min(420px, 96vw); border-radius: 24px; background: #fff; box-shadow: 0 10px 40px #0001; overflow: hidden; border: 1px solid #eee; position: relative; }

.header { padding: 10px 5px; text-align: center; background: var(--primary); border-bottom: 1px solid var(--primary); color: white; }
.header h2 { margin: 0; font-size: 16px; font-weight: 800; }
.header p { margin: 4px 0 0; font-size: 12px; }

.topinfo { display: flex; justify-content: space-between; align-items: center; padding: 6px 14px; background: #f9f9ff; font-size: 12px; color: #374151; border-bottom: 1px solid var(--ring); }
.badge { display: flex; align-items: center; gap: 6px; }

.top { display: flex; align-items: center; gap: 10px; padding: 16px 12px 12px; background: #f1f3ff; border-bottom: 1px solid var(--ring); }
.avatar { width: 40px; height: 40px; border-radius: 50%; background: center/cover no-repeat; border: 1px solid #fff; }
.meta { display: flex; flex-direction: column; }
.name { font-weight: bold; }
.sub { font-size: 12px; color: var(--muted); display: flex; align-items: center; gap: 5px; }
.dot { width: 8px; height: 8px; border-radius: 50%; background: var(--success); box-shadow: 0 0 0 6px #22c55e33; }

.chat { height: 60vh; overflow-y: auto; padding: 16px; background: #f9f9ff; }
.row { display: flex; margin: 8px 0; }
.m { max-width: 75%; padding: 10px 14px; border-radius: 14px; line-height: 1.35; box-shadow: 0 3px 10px #0000000f; }
.him { background: var(--him); border-top-left-radius: 6px; }
.me { margin-left: auto; background: var(--me); border-top-right-radius: 6px; }
.time { font-size: 10px; color: #9ca3af; margin-top: 4px; }

.typing { display:inline-flex; gap:6px; align-items:center; }
.typing i{ width:6px; height:6px; border-radius:50%; background:#cbd5e1; animation: ty 1.4s infinite; }
.typing i:nth-child(2){ animation-delay:.18s }
.typing i:nth-child(3){ animation-delay:.36s }
@keyframes ty { 0%,100%{ transform:translateY(0); opacity:.5 } 50%{ transform:translateY(-4px); opacity:1 } }

.actions { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; padding: 10px; background: #fff; border-top: 1px solid var(--ring); }
.btn { 
    border: 1px solid var(--ring); 
    border-radius: 12px; 
    padding: 12px; 
    cursor: pointer; 
    font-weight: bold; 
    font-size: 16px;
}
.btn.primary { background: var(--primary); color: #fff; }

.modal { position: fixed; inset: 0; background: #00000066; display: none; align-items: center; justify-content: center; }
.modal.active { display: flex; }
.card { background: #fff; border-radius: 16px; padding: 20px; text-align: center; max-width: 340px; box-shadow: 0 10px 30px #0003; }
.card h3 { margin: 6px 0 8px }
.card p { margin: 0 0 12px; color: var(--muted) }

.faq{max-width:420px;margin:24px auto;padding:0; padding-bottom: 24px;}
.faq h3{margin:0 0 12px;text-align:center;color:var(--primary);font-size:18px}
.faq details{background:#fff;border:1px solid var(--ring);border-radius:14px;padding:12px 14px;margin-bottom:10px;box-shadow:0 6px 18px #0000000a;transition:box-shadow .2s ease,border-color .2s ease}
.faq details:hover{box-shadow:0 8px 22px #00000014;border-color:#dfe3f0}
.faq summary{list-style:none;cursor:pointer;font-weight:700;color:#111;display:flex;align-items:center;justify-content:space-between;gap:10px}
.faq summary::-webkit-details-marker{display:none}
.faq .chev{width:18px; min-width: 18px;height:18px; border-radius:50%; border:1px solid var(--ring); display: flex; justify-content: center; align-items: center; font-size:12px;color:#64748b;transition:transform .25s ease,background .25s ease}
.faq details[open] .chev{transform:rotate(180deg);background:#f3f6ff}
.faq .q{display:flex;align-items:center;gap:8px}
.faq .content{margin-top:8px;color:#444;font-size:14px;line-height:1.45}
.faq .pill{background:#f6f7ff;border:1px solid var(--ring);padding:2px 8px;border-radius:999px;font-size:12px;color:#374151}

@media screen and (max-width: 767px) {
    .wrap {
        padding: 0;
    }
    .phone {
        width: min(420px, 100vw);
        display: flex;
        flex-direction: column;
        height: 100%;
        border-radius: 0;
        border: 0px solid #eee;
    }
    .faq {
        padding-left: 14px;
        padding-right: 14px;
    }

}

#goQuiz{
    text-decoration: none;
    display: inline-block;
    width: 100%;
}

footer {
    margin-top: 50px;
    display: flex;
    justify-content: center;
    align-items: center;
    padding: 10px 10px;
    background: #fff;
    font-size: 12px;
    border-top: 1px solid #ccc;
}

.footer a {
    color: #777 !important;
    text-decoration: none;
    padding: 0 10px;
}