:root{
    --bg:#eef1f3;
    --card:#fff;
    --green:#08c978;
    --green-dark:#06b96d;
    --text:#111;
    --muted:#8d959c;
    --border:#e1e4e6;
    --soft:#f5f6f7;
}

*{box-sizing:border-box}

html,body{
    margin:0;
    width:100%;
    min-height:100%;
    font-family:Arial,Helvetica,sans-serif;
    color:var(--text);
    background:var(--bg);
}

body{overflow-x:hidden}

button,input{font:inherit}

.page{
    width:100%;
    min-height:100vh;
    padding:18px 20px 40px;
}

.top-progress{
    position:relative;
    width:100%;
    max-width:1180px;
    height:32px;
    margin:0 auto 4px;
}

.progress-track{
    position:absolute;
    left:0;
    right:0;
    top:7px;
    height:10px;
    border-radius:999px;
    background:#fff;
    overflow:hidden;
}

.progress-fill{
    width:66%;
    height:100%;
    border-radius:999px;
    background:var(--green);
}

.progress-badge{
    position:absolute;
    left:calc(66% - 18px);
    top:-12px;
    width:36px;
    height:36px;
    border-radius:50%;
    display:grid;
    place-items:center;
    background:#8087f5;
    color:#fff;
    font-size:13px;
    font-weight:700;
}

.layout{
    width:100%;
    max-width:1180px;
    margin:0 auto;
    display:grid;
    grid-template-columns:minmax(0,1fr) 280px;
    gap:34px;
    align-items:start;
}

.builder-card{
    width:100%;
    min-width:0;
    min-height:650px;
    padding:28px 34px;
    background:var(--card);
    border-radius:20px;
}

.step{
    margin-bottom:7px;
    color:var(--muted);
    font-size:10px;
    font-weight:700;
    letter-spacing:.08em;
}

h1{
    margin:0;
    font-size:28px;
    line-height:1.2;
}

.subtitle{
    margin:8px 0 24px;
    color:var(--muted);
    font-size:14px;
}

.summary{
    width:100%;
    border:1px solid var(--border);
    border-radius:12px;
    overflow:hidden;
}

.summary-row{
    min-height:48px;
    display:flex;
    align-items:center;
    justify-content:space-between;
    gap:20px;
    padding:10px 14px;
    border-bottom:1px solid var(--border);
}

.summary-row:last-child{border-bottom:0}

.summary-row span{
    flex:0 0 145px;
    color:var(--muted);
    font-size:12px;
}

.summary-row strong{
    min-width:0;
    max-width:65%;
    text-align:right;
    font-size:12px;
    overflow-wrap:anywhere;
}

.description-row{
    align-items:flex-start;
}

.platform-box{
    display:flex;
    align-items:center;
    justify-content:space-between;
    margin-top:16px;
    padding:14px;
    border-radius:10px;
    background:var(--soft);
}

.platform-box span{
    color:var(--muted);
    font-size:12px;
}

.platform-box strong{
    font-size:12px;
}

.build-info{
    display:flex;
    flex-direction:column;
    gap:5px;
    margin-top:16px;
    padding:14px;
    border:1px solid rgba(8,201,120,.25);
    border-radius:10px;
    background:rgba(8,201,120,.06);
}

.build-info strong{font-size:13px}
.build-info span{font-size:11px;color:var(--muted)}

.build-status{
    margin-top:16px;
    padding:14px;
    border-radius:10px;
    background:var(--soft);
}

.status-title{
    font-size:11px;
    font-weight:700;
}

.status-text{
    margin-top:5px;
    color:var(--muted);
    font-size:11px;
}

.status-track{
    width:100%;
    height:7px;
    margin-top:10px;
    overflow:hidden;
    border-radius:999px;
    background:#fff;
}

.status-fill{
    width:0;
    height:100%;
    border-radius:999px;
    background:var(--green);
    transition:width .4s ease;
}

.actions{
    display:flex;
    justify-content:space-between;
    gap:16px;
    margin-top:28px;
}

.btn{
    min-width:145px;
    height:42px;
    padding:0 24px;
    border-radius:24px;
    cursor:pointer;
    font-size:13px;
    font-weight:700;
}

.back{
    color:#111;
    background:#fff;
    border:1px solid #111;
}

.build{
    color:#fff;
    background:var(--green);
    border:1px solid var(--green);
}

.build:hover{background:var(--green-dark)}

.build:disabled{
    cursor:not-allowed;
    opacity:.6;
}

.download-box{
    display:none;
    flex-direction:column;
    gap:8px;
    margin-top:16px;
    padding:16px;
    border-radius:12px;
    background:#111;
    color:#fff;
}

.download-box.show{display:flex}

.download-box strong{font-size:14px}
.download-box span{font-size:11px;color:#cfd3d6}

.download-box button{
    align-self:flex-start;
    height:36px;
    padding:0 18px;
    border:0;
    border-radius:20px;
    background:var(--green);
    color:#fff;
    cursor:pointer;
    font-size:12px;
    font-weight:700;
}

.preview-panel{
    width:100%;
    display:flex;
    flex-direction:column;
    align-items:center;
}

.platform-switch{
    width:176px;
    height:28px;
    display:grid;
    grid-template-columns:1fr 1fr;
    border-radius:20px;
    overflow:hidden;
    background:#cbd3d8;
}

.platform-switch button{
    border:0;
    background:transparent;
    font-size:9px;
}

.platform-switch .active{
    background:#fff;
    border-radius:20px;
}

.preview-note{
    margin:18px 0 8px;
    text-align:center;
    color:#969da4;
    font-size:11px;
}

.preview-note span{display:block}
.preview-note small{font-size:11px}

.phone{
    position:relative;
    width:224px;
    height:475px;
    padding:9px;
    border-radius:30px 30px 0 0;
    background:#111;
    box-shadow:0 4px 15px rgba(0,0,0,.15);
}

.camera{
    position:absolute;
    z-index:2;
    top:4px;
    left:50%;
    width:7px;
    height:7px;
    margin-left:-3px;
    border-radius:50%;
    background:#252525;
}

.screen{
    width:100%;
    height:100%;
    overflow:hidden;
    background:#f7f8fa;
}

.status{
    height:20px;
    padding:3px 9px;
    display:flex;
    justify-content:space-between;
    background:#6667ea;
    color:#fff;
    font-size:7px;
}

.phone-content{
    padding:30px 12px;
    text-align:center;
}

.phone-icon{
    width:52px;
    height:52px;
    margin:0 auto 12px;
    display:grid;
    place-items:center;
    overflow:hidden;
    border-radius:12px;
    background:linear-gradient(135deg,#1677ff,#08c978);
    color:#fff;
    font-size:11px;
    font-weight:700;
}

.phone-icon img{
    width:100%;
    height:100%;
    object-fit:cover;
}

.phone-content strong{
    display:block;
    font-size:14px;
    word-break:break-word;
}

.phone-content small{
    display:block;
    margin-top:7px;
    color:var(--muted);
    font-size:8px;
    word-break:break-all;
}

@media(max-width:900px){
    .page{padding:14px 16px 32px}

    .layout{
        grid-template-columns:minmax(0,1fr) 220px;
        gap:20px;
    }

    .builder-card{padding:24px}

    .phone{
        width:190px;
        height:405px;
    }
}

@media(max-width:680px){
    .page{padding:10px 10px 24px}

    .layout{
        display:flex;
        flex-direction:column;
        gap:16px;
    }

    .builder-card{
        min-height:0;
        padding:20px 16px;
        border-radius:16px;
    }

    h1{font-size:24px}

    .summary-row{
        align-items:flex-start;
        flex-direction:column;
        gap:5px;
    }

    .summary-row span{
        flex:auto;
    }

    .summary-row strong{
        max-width:100%;
        text-align:left;
    }

    .actions{
        flex-direction:column-reverse;
        margin-top:24px;
    }

    .btn{
        width:100%;
        min-width:0;
    }

    .preview-panel{
        order:2;
    }

    .phone{
        width:210px;
        height:445px;
    }
}

@media(max-width:390px){
    .page{padding:8px 8px 20px}

    .builder-card{
        padding:18px 13px;
        border-radius:14px;
    }

    h1{font-size:22px}

    .summary-row{
        padding:10px 11px;
    }

    .phone{
        width:190px;
        height:405px;
    }
}
