:root {
    --primary: #F5BC00;
    --bg: #fde4c7;
    --ink: #212529;
    --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); }
.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: var(--ink); }

.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) }

@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;
    }
}

#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;
}

.logo {
    padding: 5px 10px;
    display: flex;
    justify-content: center;
    align-items: center;
}
.logo img {
    max-width: 160px;
}