:root{
--brand:#E31837;--brand-dark:#B80F29;--brand-soft:#FFF0F2;--text:#1E1F23;
--muted:#85878D;--line:#E7E8EC;--surface:#FFFFFF;--bg:#F2F3F5;
--shadow:0 14px 36px rgba(31,32,35,.12);--bottom-nav-h:78px}
*{box-sizing:border-box}
html,body{margin:0;min-height:100%;font-family:'Be Vietnam Pro',system-ui,sans-serif;color:var(--text);background:var(--bg)}
body{overflow:hidden}
a{text-decoration:none;color:inherit}
button{font:inherit}
.app-shell{position:relative;width:100vw;height:100dvh;overflow:hidden;background:var(--bg)}
.map-stage{position:absolute;inset:0 0 calc(var(--bottom-nav-h) + 210px) 0;min-height:320px;background:#dfe4e1}
.map-canvas{position:absolute;inset:0;z-index:1}
.map-brand{position:absolute;left:18px;bottom:22px;z-index:500;display:flex;align-items:center;gap:8px;color:#59605d;font-size:12px;background:rgba(255,255,255,.78);backdrop-filter:blur(8px);padding:8px 10px;border-radius:999px}
.map-brand-dot{width:9px;height:9px;border-radius:50%;background:var(--brand)}
.map-tools{position:absolute;right:18px;bottom:76px;z-index:550;display:flex;flex-direction:column;gap:10px}
.map-tool{width:52px;height:52px;border:0;border-radius:50%;display:grid;place-items:center;background:#fff;box-shadow:var(--shadow);font-size:21px;cursor:pointer}
.activity-pill{position:absolute;z-index:550;left:50%;bottom:18px;transform:translateX(-50%);min-width:176px;height:52px;border-radius:999px;background:#18191d;color:#fff;display:flex;align-items:center;justify-content:center;gap:10px;font-weight:700;box-shadow:0 12px 26px rgba(0,0,0,.2)}
.activity-pulse{width:11px;height:11px;border-radius:50%;background:#19C37D;box-shadow:0 0 0 6px rgba(25,195,125,.14)}
.home-panel{position:absolute;z-index:600;left:0;right:0;bottom:var(--bottom-nav-h);padding:0 12px 12px}
.status-card{min-height:76px;background:#fff;border-radius:18px;box-shadow:var(--shadow);display:flex;align-items:center;gap:14px;padding:15px 18px;margin-bottom:12px}
.status-dot{width:16px;height:16px;border-radius:50%;background:var(--brand);flex:0 0 auto}.status-dot.is-active{background:#16A36A;box-shadow:0 0 0 6px rgba(22,163,106,.10)}
.status-card small{display:block;color:var(--muted);font-size:10px;margin-bottom:3px}
.status-card strong{display:block;font-size:17px}
.quick-panel{background:#fff;border-radius:20px;box-shadow:var(--shadow);display:grid;grid-template-columns:repeat(4,1fr);gap:6px;padding:16px 10px}
.quick-action{appearance:none;border:0;background:transparent;min-width:0;padding:0 4px;display:flex;flex-direction:column;align-items:center;gap:9px;cursor:pointer;color:var(--text)}
.quick-icon{width:56px;height:56px;border-radius:50%;display:grid;place-items:center;background:#F2FAF8;color:#0D6B4C;font-weight:800;font-size:20px}
.quick-action>span:last-child{font-size:11px;line-height:1.28;text-align:center;min-height:30px}
.bottom-nav{position:absolute;z-index:800;left:0;right:0;bottom:0;height:var(--bottom-nav-h);background:#fff;border-top:1px solid var(--line);display:grid;grid-template-columns:repeat(5,1fr);padding-bottom:env(safe-area-inset-bottom)}
.bottom-nav a{display:flex;flex-direction:column;align-items:center;justify-content:center;gap:4px;color:#2d2e33;font-size:10px;position:relative}
.bottom-nav a.active{color:var(--brand);font-weight:700}
.nav-icon{font-size:21px;line-height:1}
.sheet-backdrop{position:fixed;z-index:900;inset:0;background:rgba(0,0,0,.55)}
.bottom-sheet{position:fixed;z-index:950;left:0;right:0;bottom:0;background:#fff;border-radius:26px 26px 0 0;padding:14px 20px calc(24px + env(safe-area-inset-bottom));transform:translateY(110%);transition:transform .24s ease;max-height:84dvh;overflow:auto}
.bottom-sheet.is-open{transform:translateY(0)}
.sheet-handle{display:block;width:66px;height:6px;border:0;border-radius:99px;background:#ECEDEF;margin:0 auto 22px;padding:0;cursor:pointer}
.bottom-sheet h2{margin:0 0 6px;font-size:24px;letter-spacing:-.04em}
.sheet-subtitle{margin:0 0 20px;color:var(--muted);font-size:12px;line-height:1.6}
.status-options,.weather-options{display:grid;grid-template-columns:repeat(2,1fr);gap:12px}
.status-options button,.weather-options button{border:1px solid var(--line);background:#fff;border-radius:18px;min-height:110px;display:flex;flex-direction:column;align-items:center;justify-content:center;gap:8px;cursor:pointer}
.status-options span,.weather-options span{font-size:32px}
.status-options strong,.weather-options strong{font-size:13px}
.achievement-card{display:grid;grid-template-columns:repeat(3,1fr);gap:10px}
.achievement-card>div{background:var(--brand-soft);border-radius:16px;padding:16px}
.achievement-card small{display:block;color:var(--muted);font-size:9px;margin-bottom:6px}
.achievement-card strong{font-size:17px}
.post-preview{border:1px solid var(--line);border-radius:18px;padding:18px}
.post-preview strong{display:block;margin-bottom:6px}
.post-preview span{color:var(--muted);font-size:11px;line-height:1.6}
.more-grid{display:grid;grid-template-columns:repeat(2,1fr);gap:12px}
.more-grid a{min-height:126px;border:1px solid var(--line);border-radius:18px;display:flex;flex-direction:column;align-items:center;justify-content:center;gap:10px}
.more-grid span{font-size:34px}
.more-grid strong{font-size:13px}
.weather-options{grid-template-columns:repeat(4,1fr)}
.weather-options button{border:0;min-height:118px}
.weather-options button span{width:64px;height:64px;display:grid;place-items:center;border-radius:50%;background:#EEF8FB}
@media (min-width:641px) and (max-width:1024px){
:root{--bottom-nav-h:82px}
.map-stage{inset:0}
.home-panel{left:24px;right:auto;bottom:105px;width:min(540px,calc(100vw - 48px));padding:0}
.quick-panel{padding:18px}
.quick-icon{width:62px;height:62px}
.map-tools{right:24px;bottom:118px}
.activity-pill{bottom:28px}
.bottom-nav{left:50%;right:auto;transform:translateX(-50%);width:min(620px,calc(100vw - 36px));bottom:12px;border:1px solid var(--line);border-radius:22px;overflow:hidden;box-shadow:var(--shadow)}
.bottom-sheet{left:50%;right:auto;transform:translate(-50%,110%);width:min(620px,calc(100vw - 32px));border-radius:26px;bottom:18px}
.bottom-sheet.is-open{transform:translate(-50%,0)}
}
@media (min-width:1025px){
:root{--bottom-nav-h:0px}
.map-stage{inset:0 0 0 390px}
.home-panel{left:0;top:0;bottom:0;right:auto;width:390px;padding:24px;background:#F5F6F8;display:flex;flex-direction:column;justify-content:flex-start;border-right:1px solid var(--line);overflow:auto}
.quick-panel{grid-template-columns:repeat(2,1fr);padding:14px}
.quick-action{padding:8px 2px}
.quick-icon{width:62px;height:62px}
.quick-action>span:last-child{font-size:12px}
.bottom-nav{position:fixed;left:24px;right:auto;bottom:24px;width:342px;height:70px;border:1px solid var(--line);border-radius:22px;box-shadow:var(--shadow);overflow:hidden}
.map-tools{right:28px;bottom:94px}
.activity-pill{bottom:28px}
.bottom-sheet{left:24px;right:auto;width:342px;bottom:104px;border-radius:24px;transform:translateY(calc(100% + 130px))}
.bottom-sheet.is-open{transform:translateY(0)}
.sheet-backdrop{display:none!important}
}



/* ICON SAFETY — áp dụng mọi thiết bị */
.map-tool svg,
.quick-icon svg,
.nav-icon svg{
    display:block;
    flex:0 0 auto;
}

.map-tool svg{
    width:25px;
    height:25px;
    fill:none;
    stroke:currentColor;
    stroke-width:2.2;
    stroke-linecap:round;
    stroke-linejoin:round;
}

.quick-icon svg{
    width:24px;
    height:24px;
    fill:none;
    stroke:currentColor;
    stroke-width:1.9;
    stroke-linecap:round;
    stroke-linejoin:round;
}

.quick-icon-achievement svg{
    fill:currentColor;
    stroke:none;
}

.quick-icon-more svg{
    fill:currentColor;
    stroke:none;
}

.nav-icon{
    width:24px;
    height:24px;
    display:grid;
    place-items:center;
    flex:0 0 24px;
}

.nav-icon svg{
    width:22px;
    height:22px;
    fill:none;
    stroke:currentColor;
    stroke-width:1.9;
    stroke-linecap:round;
    stroke-linejoin:round;
}

/* =========================================================
   MOBILE PRECISION V1 — bám sát layout app mẫu ShipF1
   ========================================================= */

@media (max-width:640px){
    :root{
        --bottom-nav-h:74px;
        --mobile-side:10px;
        --mobile-panel-gap:10px;
    }

    html,body,.app-shell{
        width:100%;
        height:100dvh;
        min-height:100dvh;
    }

    body{
        overflow:hidden;
        background:#eef0f1;
    }

    /* Bản đồ là lớp chính, cao giống app tài xế thay vì bị thu ngắn. */
    .map-stage{
        inset:0 0 calc(var(--bottom-nav-h) + 158px) 0;
        min-height:0;
    }

    .map-canvas{
        background:#e6e8e5;
    }

    /* Ẩn attribution mặc định khỏi vùng thao tác chính trên mobile. */
    .leaflet-control-attribution{
        font-size:7px!important;
        padding:2px 4px!important;
        opacity:.72;
    }

    .map-brand{
        left:12px;
        bottom:10px;
        padding:5px 8px;
        gap:6px;
        font-size:9px;
        background:rgba(255,255,255,.88);
    }

    .map-brand-dot{
        width:7px;
        height:7px;
    }

    .map-tools{
        right:14px;
        bottom:66px;
        gap:9px;
    }

    .map-tool{
        width:52px;
        height:52px;
        border:0;
        background:#fff;
        color:#151619;
        box-shadow:0 8px 22px rgba(22,23,25,.16);
    }

    .map-tool svg{
        width:25px;
        height:25px;
        fill:none;
        stroke:currentColor;
        stroke-width:2.2;
        stroke-linecap:round;
        stroke-linejoin:round;
    }

    .map-tool:first-child svg{
        width:27px;
        height:27px;
    }

    .activity-pill{
        left:50%;
        bottom:14px;
        min-width:174px;
        height:50px;
        padding:0 20px;
        gap:9px;
        border-radius:999px;
        font-size:14px;
        letter-spacing:-.01em;
    }

    .activity-pulse{
        width:9px;
        height:9px;
        box-shadow:0 0 0 5px rgba(25,195,125,.13);
    }

    /* Panel trắng phía dưới — sát đúng tỷ lệ mẫu. */
    .home-panel{
        left:0;
        right:0;
        bottom:var(--bottom-nav-h);
        padding:0 var(--mobile-side) 8px;
    }

    .status-card{
        min-height:58px;
        margin:0 0 var(--mobile-panel-gap);
        padding:10px 15px;
        gap:12px;
        border-radius:14px;
        box-shadow:0 4px 14px rgba(31,32,35,.12);
    }

    .status-dot{
        width:12px;
        height:12px;
    }

    .status-dot.is-active{
        box-shadow:0 0 0 5px rgba(22,163,106,.10);
    }

    .status-card small{
        display:none;
    }

    .status-card strong{
        font-size:14px;
        line-height:1.35;
        letter-spacing:-.01em;
    }

    .quick-panel{
        min-height:92px;
        padding:11px 5px 8px;
        gap:0;
        grid-template-columns:repeat(4,minmax(0,1fr));
        border-radius:15px;
        box-shadow:0 4px 14px rgba(31,32,35,.11);
    }

    .quick-action{
        gap:7px;
        padding:0 2px;
        min-height:72px;
        justify-content:flex-start;
    }

    .quick-icon{
        width:48px;
        height:48px;
        flex:0 0 48px;
        background:#F0FAF8;
        color:#086747;
    }

    .quick-icon svg{
        width:24px;
        height:24px;
        fill:none;
        stroke:currentColor;
        stroke-width:1.9;
        stroke-linecap:round;
        stroke-linejoin:round;
    }

    .quick-icon-achievement svg{
        fill:currentColor;
        stroke:none;
        width:23px;
        height:23px;
    }

    .quick-icon-more svg{
        fill:currentColor;
        stroke:none;
        width:25px;
        height:25px;
    }

    .quick-label{
        display:block;
        width:100%;
        min-height:28px;
        padding:0 1px;
        color:#26272b;
        font-size:10px!important;
        line-height:1.22!important;
        font-weight:500;
        text-align:center;
    }

    /* Bottom navigation */
    .bottom-nav{
        height:var(--bottom-nav-h);
        background:rgba(255,255,255,.98);
        border-top:1px solid #E8E9EC;
        grid-template-columns:repeat(5,minmax(0,1fr));
        padding:2px 0 max(2px,env(safe-area-inset-bottom));
        box-shadow:0 -2px 10px rgba(30,31,34,.03);
    }

    .bottom-nav a{
        gap:3px;
        min-width:0;
        font-size:9px;
        font-weight:500;
        color:#2F3034;
    }

    .bottom-nav a.active{
        color:var(--brand);
        font-weight:700;
    }

    .nav-icon{
        width:24px;
        height:24px;
        display:grid;
        place-items:center;
        font-size:0;
        line-height:1;
    }

    .nav-icon svg{
        width:22px;
        height:22px;
        fill:none;
        stroke:currentColor;
        stroke-width:1.9;
        stroke-linecap:round;
        stroke-linejoin:round;
    }

    .bottom-nav a.active .nav-icon svg{
        fill:none;
        stroke:var(--brand);
    }

    .nav-dot{
        position:absolute;
        width:7px;
        height:7px;
        border-radius:50%;
        background:var(--brand);
        top:7px;
        left:calc(50% + 8px);
        border:1.5px solid #fff;
    }

    /* Bottom sheet giống mẫu: bo lớn, handle xám, không chiếm quá 84% màn hình. */
    .bottom-sheet{
        left:0;
        right:0;
        bottom:0;
        width:100%;
        max-height:82dvh;
        padding:11px 18px calc(22px + env(safe-area-inset-bottom));
        border-radius:24px 24px 0 0;
    }

    .sheet-handle{
        width:34px;
        height:5px;
        margin-bottom:20px;
    }

    .bottom-sheet h2{
        font-size:22px;
    }

    .weather-options{
        gap:5px;
    }

    .weather-options button{
        min-height:108px;
        padding:6px 2px;
    }

    .weather-options button span{
        width:55px;
        height:55px;
        font-size:28px;
    }

    .weather-options strong{
        font-size:11px;
        font-weight:500;
    }

    .status-options{
        gap:10px;
    }

    .status-options button{
        min-height:96px;
    }

    .more-grid{
        gap:10px;
    }

    .more-grid a{
        min-height:108px;
        border-radius:16px;
    }
}

/* Điện thoại thấp: ưu tiên giữ map đủ rộng, thu nhẹ card dưới. */
@media (max-width:640px) and (max-height:720px){
    :root{--bottom-nav-h:68px}

    .map-stage{
        bottom:calc(var(--bottom-nav-h) + 144px);
    }

    .status-card{
        min-height:52px;
        padding-top:8px;
        padding-bottom:8px;
    }

    .quick-panel{
        min-height:84px;
        padding-top:8px;
        padding-bottom:6px;
    }

    .quick-icon{
        width:44px;
        height:44px;
        flex-basis:44px;
    }

    .activity-pill{
        height:46px;
        min-width:164px;
    }
}

/* ACCOUNT + WALLET V1 */
.auth-screen,
.account-page,
.wallet-page{
    min-height:100dvh;
    background:#f5f7f8;
    color:#17191d;
}

.auth-screen{
    display:grid;
    place-items:center;
    padding:24px;
}

.auth-shell-v2{
    width:min(100%,520px);
    background:#fff;
    border:1px solid #edf0f2;
    border-radius:28px;
    padding:28px;
    box-shadow:0 20px 60px rgba(27,35,42,.09);
}

.auth-back{
    display:inline-grid;
    place-items:center;
    width:44px;
    height:44px;
    margin-bottom:24px;
    border-radius:14px;
    background:#f3f5f6;
    font-size:24px;
    line-height:1;
}

.auth-brand-v2{
    display:flex;
    align-items:center;
    gap:12px;
    margin-bottom:24px;
}

.auth-logo-v2{
    width:46px;
    height:46px;
    border-radius:15px;
    display:grid;
    place-items:center;
    background:var(--brand);
    color:#fff;
    font-size:14px;
    font-weight:800;
}

.auth-brand-v2 small{
    display:block;
    color:#9299a1;
    font-size:9px;
    font-weight:800;
    letter-spacing:.12em;
}

.auth-brand-v2 strong{
    display:block;
    margin-top:3px;
    font-size:14px;
}

.auth-copy h1{
    margin:0;
    font-size:27px;
    line-height:1.18;
    letter-spacing:-.045em;
}

.auth-copy p{
    margin:9px 0 0;
    color:#81878e;
    font-size:12px;
    line-height:1.65;
}

.driver-register-form{
    margin-top:24px;
}

.platform-grid{
    display:grid;
    grid-template-columns:1fr 1fr;
    gap:10px;
    margin-bottom:18px;
}

.platform-choice{
    position:relative;
    min-height:82px;
    padding:12px;
    border:1.5px solid #e6e9ec;
    border-radius:18px;
    display:flex;
    align-items:center;
    gap:10px;
    background:#fff;
    cursor:pointer;
    transition:.16s ease;
}

.platform-choice input{
    position:absolute;
    opacity:0;
    pointer-events:none;
}

.platform-choice.selected{
    border-color:#28a681;
    box-shadow:0 0 0 3px rgba(40,166,129,.08);
    background:#fbfffd;
}

.platform-choice>span:nth-of-type(2){
    font-size:12px;
    font-weight:700;
}

.platform-choice i{
    position:absolute;
    right:10px;
    top:10px;
    width:18px;
    height:18px;
    border-radius:50%;
    display:grid;
    place-items:center;
    background:#dfe5e7;
    color:#fff;
    font-size:10px;
    font-style:normal;
}

.platform-choice.selected i{
    background:#20a77d;
}

.platform-logo{
    width:38px;
    height:38px;
    flex:0 0 38px;
    border-radius:12px;
    display:grid;
    place-items:center;
    font-size:12px;
    font-weight:900;
}

.platform-logo.grab{background:#eaf9f3;color:#00a86b}
.platform-logo.be{background:#fff4d8;color:#f4a900}
.platform-logo.xanh{background:#e8f5ff;color:#0f9ad7}
.platform-logo.shoppe{background:#fff0eb;color:#ee4d2d}

.field-v2{
    display:block;
    margin-top:14px;
}

.field-v2>span{
    display:block;
    margin-bottom:7px;
    color:#52585f;
    font-size:10px;
    font-weight:700;
}

.field-v2 input{
    width:100%;
    height:50px;
    padding:0 14px;
    border:1px solid #e2e6e9;
    border-radius:14px;
    outline:none;
    background:#fff;
    color:#191b1f;
}

.field-v2 input:focus{
    border-color:#8fd5c0;
    box-shadow:0 0 0 3px rgba(32,167,125,.08);
}

.password-wrap{
    position:relative;
}

.password-wrap input{
    padding-right:66px;
}

.password-eye{
    position:absolute;
    top:50%;
    right:8px;
    transform:translateY(-50%);
    min-width:52px;
    height:34px;
    border:0;
    border-radius:10px;
    background:#f2f4f5;
    color:#565c62;
    font-size:9px;
    font-weight:700;
}

.auth-submit-v2,
.wallet-save-btn{
    width:100%;
    min-height:50px;
    margin-top:18px;
    border:0;
    border-radius:15px;
    display:flex;
    align-items:center;
    justify-content:center;
    background:var(--brand);
    color:#fff;
    font-weight:800;
    font-size:12px;
    text-decoration:none;
}

.auth-note-v2{
    margin:12px 4px 0;
    color:#8a9096;
    text-align:center;
    font-size:9px;
    line-height:1.6;
}

.auth-switch{
    margin-top:22px;
    padding-top:18px;
    border-top:1px solid #eef0f2;
    color:#80868d;
    text-align:center;
    font-size:10px;
}

.auth-switch a{
    color:var(--brand);
    font-weight:800;
}

.form-message{
    margin-top:16px;
    padding:11px 13px;
    border-radius:12px;
    font-size:10px;
    line-height:1.5;
}

.form-message.error{background:#fff0f2;color:#aa1029}
.form-message.success{background:#eaf8f2;color:#0d7a4b}

.pending-shell{
    text-align:center;
}

.pending-icon{
    width:62px;
    height:62px;
    margin:4px auto 18px;
    border-radius:50%;
    display:grid;
    place-items:center;
    background:#eaf8f2;
    color:#16a16d;
    font-size:24px;
    font-weight:900;
}

.auth-kicker-v2{
    color:#16a16d;
    font-size:9px;
    font-weight:900;
    letter-spacing:.1em;
}

.pending-shell h1{
    margin:8px 0 10px;
    font-size:25px;
}

.pending-shell p{
    margin:0;
    color:#787f86;
    font-size:11px;
    line-height:1.75;
}

.link-button{
    margin-top:24px;
}

.pending-home{
    display:inline-block;
    margin-top:16px;
    color:#747a80;
    font-size:10px;
    font-weight:700;
}

/* Profile */
.account-page,
.wallet-page{
    padding-bottom:calc(88px + env(safe-area-inset-bottom));
}

.account-page-head,
.wallet-head{
    position:sticky;
    top:0;
    z-index:20;
    min-height:68px;
    padding:10px 18px;
    display:grid;
    grid-template-columns:44px 1fr 44px;
    align-items:center;
    gap:10px;
    background:rgba(247,249,250,.94);
    backdrop-filter:blur(14px);
}

.account-page-head>span:nth-child(2){
    text-align:center;
    font-size:14px;
    font-weight:800;
}

.account-back{
    width:42px;
    height:42px;
    border-radius:14px;
    display:grid;
    place-items:center;
    background:#fff;
    border:1px solid #edf0f2;
}

.account-back svg{
    width:22px;
    height:22px;
    fill:none;
    stroke:#202328;
    stroke-width:2;
    stroke-linecap:round;
    stroke-linejoin:round;
}

.account-content,
.wallet-content{
    width:min(100%,720px);
    margin:0 auto;
    padding:12px 18px 28px;
}

.identity-card{
    display:grid;
    grid-template-columns:auto 1fr auto;
    align-items:center;
    gap:14px;
    padding:20px;
    border-radius:24px;
    background:#fff;
    border:1px solid #edf0f2;
    box-shadow:0 14px 36px rgba(31,40,48,.08);
}

.profile-avatar{
    width:72px;
    height:72px;
    border-radius:50%;
    display:grid;
    place-items:center;
    background:linear-gradient(145deg,#29aa9e,#129d7f);
    color:#fff;
    font-size:25px;
    font-weight:800;
    box-shadow:inset 0 0 0 4px rgba(255,255,255,.35);
}

.identity-main{
    min-width:0;
}

.identity-main small{
    display:block;
    color:#9aa0a6;
    font-size:9px;
}

.identity-main h1{
    margin:3px 0 8px;
    overflow:hidden;
    text-overflow:ellipsis;
    white-space:nowrap;
    font-size:21px;
    line-height:1.2;
    letter-spacing:-.035em;
}

.driver-platform-badge{
    display:inline-flex;
    align-items:center;
    gap:6px;
    max-width:100%;
    padding:6px 9px;
    border-radius:999px;
    background:#effaf6;
    color:#157b60;
    font-size:9px;
    font-weight:800;
}

.driver-platform-badge i{
    width:7px;
    height:7px;
    border-radius:50%;
    background:#1fa878;
}

.profile-chip{
    min-width:62px;
    height:38px;
    border-radius:14px;
    display:grid;
    place-items:center;
    background:#effbf9;
    color:#127d6f;
    font-size:10px;
    font-weight:800;
}

.account-wallet-preview{
    margin-top:14px;
    padding:16px;
    border-radius:20px;
    display:grid;
    grid-template-columns:auto 1fr auto;
    align-items:center;
    gap:12px;
    background:#fff;
    border:1px solid #edf0f2;
}

.wallet-preview-icon{
    width:44px;
    height:44px;
    border-radius:14px;
    display:grid;
    place-items:center;
    background:#fff1f3;
    color:var(--brand);
}

.wallet-preview-icon svg{
    width:22px;
    height:22px;
    fill:none;
    stroke:currentColor;
    stroke-width:1.8;
    stroke-linecap:round;
    stroke-linejoin:round;
}

.account-wallet-preview small{
    display:block;
    color:#9aa0a6;
    font-size:8px;
}

.account-wallet-preview strong{
    display:block;
    margin-top:2px;
    font-size:17px;
}

.account-wallet-preview span{
    display:block;
    margin-top:2px;
    color:#858c92;
    font-size:8px;
}

.account-wallet-preview>a{
    color:var(--brand);
    font-size:9px;
    font-weight:800;
}

.account-section{
    margin-top:26px;
}

.account-section h2{
    margin:0 0 10px;
    font-size:18px;
    letter-spacing:-.03em;
}

.account-list,
.account-menu-list{
    overflow:hidden;
    border-radius:20px;
    background:#fff;
    border:1px solid #edf0f2;
}

.account-row{
    min-height:54px;
    padding:12px 15px;
    border-bottom:1px solid #f0f2f3;
    display:flex;
    align-items:center;
    justify-content:space-between;
    gap:15px;
}

.account-row:last-child{
    border-bottom:0;
}

.account-row span{
    color:#6e757c;
    font-size:10px;
}

.account-row strong{
    text-align:right;
    font-size:10px;
}

.account-active-dot{
    color:#159468;
}

.account-active-dot::before{
    content:"";
    display:inline-block;
    width:7px;
    height:7px;
    margin-right:5px;
    border-radius:50%;
    background:#16a16d;
}

.account-menu-list>a{
    min-height:70px;
    padding:12px 14px;
    border-bottom:1px solid #f0f2f3;
    display:grid;
    grid-template-columns:auto 1fr auto;
    align-items:center;
    gap:11px;
}

.account-menu-list>a:last-child{
    border-bottom:0;
}

.menu-round-icon{
    width:40px;
    height:40px;
    border-radius:13px;
    display:grid;
    place-items:center;
    background:#f3f5f6;
}

.menu-round-icon svg{
    width:20px;
    height:20px;
    fill:none;
    stroke:#33383e;
    stroke-width:1.8;
    stroke-linecap:round;
    stroke-linejoin:round;
}

.account-menu-list strong{
    display:block;
    font-size:11px;
}

.account-menu-list small{
    display:block;
    margin-top:3px;
    color:#8e949a;
    font-size:8px;
}

.account-menu-list i{
    color:#93999f;
    font-size:20px;
    font-style:normal;
}

/* Wallet */
.wallet-head{
    grid-template-columns:44px 1fr 44px;
}

.wallet-head>div:nth-child(2){
    min-width:0;
}

.wallet-head small{
    display:block;
    color:#92989e;
    font-size:8px;
}

.wallet-head strong{
    display:block;
    margin-top:2px;
    font-size:16px;
}

.wallet-avatar{
    width:40px;
    height:40px;
    border-radius:50%;
    display:grid;
    place-items:center;
    background:#20a77d;
    color:#fff;
    font-size:13px;
    font-weight:800;
}

.wallet-balance-card{
    min-height:210px;
    padding:20px;
    border-radius:24px;
    background:
        radial-gradient(circle at 85% 15%,rgba(255,255,255,.25),transparent 24%),
        linear-gradient(145deg,#ea2845,#b80f2a);
    color:#fff;
    box-shadow:0 18px 38px rgba(184,15,42,.23);
}

.wallet-card-top{
    display:flex;
    align-items:center;
    justify-content:space-between;
    margin-bottom:30px;
    font-size:9px;
    font-weight:800;
    letter-spacing:.08em;
}

.wallet-chip-icon{
    width:38px;
    height:28px;
    border-radius:9px;
    display:grid;
    place-items:center;
    background:rgba(255,255,255,.18);
    border:1px solid rgba(255,255,255,.3);
    font-size:9px;
}

.wallet-balance-card>small{
    opacity:.75;
    font-size:9px;
}

.wallet-balance-card h1{
    margin:4px 0 27px;
    font-size:32px;
    letter-spacing:-.05em;
}

.wallet-card-bottom{
    display:grid;
    grid-template-columns:1fr 1fr;
    gap:15px;
}

.wallet-card-bottom small{
    display:block;
    opacity:.65;
    font-size:8px;
}

.wallet-card-bottom strong{
    display:block;
    margin-top:3px;
    font-size:10px;
}

.wallet-actions{
    margin-top:14px;
    padding:14px 8px;
    border-radius:20px;
    display:grid;
    grid-template-columns:repeat(4,1fr);
    gap:4px;
    background:#fff;
    border:1px solid #edf0f2;
}

.wallet-actions a,
.wallet-actions button{
    min-width:0;
    border:0;
    background:transparent;
    color:#30353a;
    text-align:center;
}

.wallet-actions button:disabled{
    opacity:.38;
}

.wallet-actions span{
    width:38px;
    height:38px;
    margin:0 auto 7px;
    border-radius:13px;
    display:grid;
    place-items:center;
    background:#f3f5f6;
    font-size:15px;
    font-weight:800;
}

.wallet-actions strong{
    display:block;
    font-size:8px;
}

.wallet-panel{
    margin-top:16px;
    padding:18px;
    border-radius:22px;
    background:#fff;
    border:1px solid #edf0f2;
}

.wallet-panel-head{
    display:flex;
    align-items:flex-start;
    justify-content:space-between;
    gap:10px;
}

.wallet-panel-head small{
    color:#949aa0;
    font-size:8px;
}

.wallet-panel-head h2{
    margin:3px 0 0;
    font-size:18px;
}

.bank-linked{
    padding:6px 9px;
    border-radius:999px;
    background:#eaf8f2;
    color:#0d7a4b;
    font-size:8px;
    font-weight:800;
}

.bank-form{
    margin-top:14px;
}

.bank-note{
    margin:11px 2px 0;
    color:#8a9095;
    font-size:8px;
    line-height:1.6;
}

/* Reuse fixed mobile bottom nav outside map homepage */
.account-page .bottom-nav,
.wallet-page .bottom-nav{
    position:fixed;
    left:50%;
    bottom:0;
    transform:translateX(-50%);
    width:min(100%,720px);
    z-index:40;
}

@media (max-width:640px){
    .auth-screen{
        padding:0;
        display:block;
        background:#fff;
    }

    .auth-shell-v2{
        min-height:100dvh;
        width:100%;
        border:0;
        border-radius:0;
        padding:22px 18px 36px;
        box-shadow:none;
    }

    .auth-back{
        margin-top:6px;
        margin-bottom:28px;
    }

    .auth-copy h1{
        font-size:25px;
    }

    .account-content,
    .wallet-content{
        padding-left:14px;
        padding-right:14px;
    }

    .identity-card{
        padding:16px;
        gap:11px;
        border-radius:22px;
    }

    .profile-avatar{
        width:62px;
        height:62px;
        font-size:22px;
    }

    .identity-main h1{
        font-size:18px;
    }

    .profile-chip{
        min-width:56px;
        height:36px;
    }

    .wallet-balance-card{
        min-height:198px;
    }
}

/* GOONG MAP V1 */
#shipf1-map.map-canvas{
    position:absolute;
    inset:0;
    width:100%;
    height:100%;
}

#shipf1-map .maplibregl-canvas{
    outline:none;
}

#shipf1-map .maplibregl-ctrl-top-right{
    top:10px;
    right:10px;
}

#shipf1-map .maplibregl-ctrl-group{
    overflow:hidden;
    border:1px solid rgba(30,35,40,.08);
    border-radius:12px;
    box-shadow:0 6px 20px rgba(20,30,38,.12);
}

#shipf1-map .maplibregl-ctrl-group button{
    width:38px;
    height:38px;
}

#shipf1-map .maplibregl-ctrl-attrib{
    font-size:9px;
    color:#63686d;
    background:rgba(255,255,255,.82);
    backdrop-filter:blur(6px);
}

.shipf1-user-location{
    position:relative;
    width:26px;
    height:26px;
    pointer-events:none;
}

.shipf1-user-location-halo{
    position:absolute;
    inset:0;
    border-radius:50%;
    background:rgba(47,128,237,.16);
    animation:shipf1-location-pulse 1.8s ease-out infinite;
}

.shipf1-user-location-dot{
    position:absolute;
    left:50%;
    top:50%;
    width:17px;
    height:17px;
    transform:translate(-50%,-50%);
    border-radius:50%;
    background:#2f80ed;
    border:4px solid #fff;
    box-shadow:
        0 2px 7px rgba(20,37,63,.24),
        0 0 0 1px rgba(47,128,237,.18);
}

@keyframes shipf1-location-pulse{
    0%{transform:scale(.72);opacity:.7}
    70%{transform:scale(1.55);opacity:0}
    100%{transform:scale(1.55);opacity:0}
}

.map-tool.is-locating{
    pointer-events:none;
}

.map-tool.is-locating svg{
    animation:shipf1-locate-spin .8s linear infinite;
}

@keyframes shipf1-locate-spin{
    to{transform:rotate(360deg)}
}

.map-load-error{
    position:absolute;
    inset:0;
    display:grid;
    place-items:center;
    padding:24px;
    background:#f5f6f7;
    color:#7b8187;
    font-size:12px;
    text-align:center;
}

@media(max-width:1024px){
    #shipf1-map .maplibregl-ctrl-top-right{
        display:none;
    }
}

@media(max-width:640px){
    #shipf1-map .maplibregl-ctrl-attrib{
        max-width:58vw;
        font-size:8px;
    }

    .shipf1-user-location{
        width:24px;
        height:24px;
    }

    .shipf1-user-location-dot{
        width:16px;
        height:16px;
    }
}

/* DRIVER STATUS SLIDERS V1 */
.driver-status-sheet{
    --level-1:#22C55E;
    --level-2:#EAB308;
    --level-3:#F97316;
    --level-4:#EF4444;
}

.driver-status-head{
    display:flex;
    align-items:flex-start;
    justify-content:space-between;
    gap:14px;
}

.status-kicker{
    display:block;
    margin-bottom:4px;
    color:#8d949b;
    font-size:8px;
    font-weight:900;
    letter-spacing:.11em;
}

.driver-status-head .sheet-subtitle{
    margin-bottom:0;
}

.gps-ready-badge{
    flex:0 0 auto;
    min-width:48px;
    height:29px;
    padding:0 9px;
    border-radius:999px;
    display:grid;
    place-items:center;
    background:#eef2f4;
    color:#6f767d;
    font-size:8px;
    font-weight:900;
}

.gps-ready-badge.is-loading{
    background:#fff7e7;
    color:#9c6a00;
}

.gps-ready-badge.is-ready{
    background:#eaf8f2;
    color:#0d7a4b;
}

.driver-status-sliders{
    display:grid;
    gap:11px;
    margin-top:18px;
}

.driver-status-control{
    padding:14px;
    border-radius:18px;
    border:1px solid #e8ebee;
    background:#fff;
}

.driver-status-control-head{
    display:grid;
    grid-template-columns:auto 1fr auto;
    align-items:center;
    gap:10px;
}

.service-status-icon{
    width:38px;
    height:38px;
    border-radius:13px;
    display:grid;
    place-items:center;
    background:#eff8f5;
    color:#118267;
}

.service-status-icon svg{
    width:20px;
    height:20px;
    fill:none;
    stroke:currentColor;
    stroke-width:1.8;
    stroke-linecap:round;
    stroke-linejoin:round;
}

.driver-status-control-head strong{
    display:block;
    font-size:12px;
}

.driver-status-control-head small{
    display:block;
    margin-top:2px;
    color:#969ca2;
    font-size:8px;
}

.level-badge{
    min-width:74px;
    height:28px;
    padding:0 9px;
    border-radius:999px;
    display:grid;
    place-items:center;
    font-size:8px;
    font-weight:900;
    white-space:nowrap;
}

.level-badge.level-1{background:#e9f9ef;color:#16884b}
.level-badge.level-2{background:#fff8d8;color:#987000}
.level-badge.level-3{background:#fff0e5;color:#bf5d0d}
.level-badge.level-4{background:#ffebeb;color:#c92d2d}

.driver-range-wrap{
    margin-top:14px;
}

.driver-range{
    --status-level-color:#EAB308;
    width:100%;
    height:20px;
    margin:0;
    appearance:none;
    -webkit-appearance:none;
    background:transparent;
    cursor:pointer;
}

.driver-range::-webkit-slider-runnable-track{
    height:8px;
    border-radius:999px;
    background:
        linear-gradient(
            90deg,
            #22C55E 0%,
            #22C55E 25%,
            #EAB308 25%,
            #EAB308 50%,
            #F97316 50%,
            #F97316 75%,
            #EF4444 75%,
            #EF4444 100%
        );
}

.driver-range::-moz-range-track{
    height:8px;
    border-radius:999px;
    background:
        linear-gradient(
            90deg,
            #22C55E 0%,
            #22C55E 25%,
            #EAB308 25%,
            #EAB308 50%,
            #F97316 50%,
            #F97316 75%,
            #EF4444 75%,
            #EF4444 100%
        );
}

.driver-range::-webkit-slider-thumb{
    width:24px;
    height:24px;
    margin-top:-8px;
    border-radius:50%;
    appearance:none;
    -webkit-appearance:none;
    border:4px solid #fff;
    background:var(--status-level-color);
    box-shadow:0 2px 8px rgba(25,31,36,.2),0 0 0 1px rgba(24,31,37,.08);
}

.driver-range::-moz-range-thumb{
    width:18px;
    height:18px;
    border-radius:50%;
    border:4px solid #fff;
    background:var(--status-level-color);
    box-shadow:0 2px 8px rgba(25,31,36,.2);
}

.driver-range-labels{
    display:grid;
    grid-template-columns:repeat(4,1fr);
    gap:3px;
    margin-top:4px;
    color:#979da3;
    font-size:7px;
    font-weight:700;
}

.driver-range-labels span:nth-child(1){text-align:left}
.driver-range-labels span:nth-child(2),
.driver-range-labels span:nth-child(3){text-align:center}
.driver-range-labels span:nth-child(4){text-align:right}

.status-location-note{
    margin-top:13px;
    padding:11px 12px;
    border-radius:14px;
    display:flex;
    align-items:flex-start;
    gap:9px;
    background:#f6f8f9;
    border:1px solid #edf0f2;
}

.status-location-dot{
    width:10px;
    height:10px;
    margin-top:3px;
    border-radius:50%;
    background:#2f80ed;
    border:2px solid #fff;
    box-shadow:0 0 0 3px rgba(47,128,237,.12);
}

.status-location-note strong{
    display:block;
    font-size:9px;
}

.status-location-note small{
    display:block;
    margin-top:3px;
    color:#858c92;
    font-size:8px;
    line-height:1.45;
}

.status-save-message{
    margin-top:11px;
    padding:10px 11px;
    border-radius:12px;
    font-size:9px;
    line-height:1.5;
}

.status-save-message.info{background:#eef6ff;color:#346a9e}
.status-save-message.success{background:#eaf8f2;color:#0d7a4b}
.status-save-message.error{background:#fff0f2;color:#a90c25}

.status-save-button{
    width:100%;
    min-height:48px;
    margin-top:12px;
    border:0;
    border-radius:14px;
    background:#17191d;
    color:#fff;
    font-size:10px;
    font-weight:900;
}

.status-save-button:disabled{
    opacity:.66;
}

@media(max-width:640px){
    .driver-status-sheet{
        padding-left:14px;
        padding-right:14px;
    }

    .driver-status-control{
        padding:12px;
        border-radius:16px;
    }

    .driver-status-control-head{
        grid-template-columns:auto minmax(0,1fr) auto;
        gap:8px;
    }

    .service-status-icon{
        width:36px;
        height:36px;
    }

    .level-badge{
        min-width:68px;
        padding:0 7px;
        font-size:7px;
    }
}

/* ACHIEVEMENTS V1 */
.achievement-page{
    min-height:100dvh;
    padding-bottom:calc(88px + env(safe-area-inset-bottom));
    background:#f5f7f8;
    color:#17191d;
}

.achievement-content{
    width:min(100%,760px);
    margin:0 auto;
    padding:12px 18px 30px;
}

.achievement-hero{
    padding:22px;
    border-radius:24px;
    background:
        radial-gradient(circle at 88% 12%,rgba(255,255,255,.24),transparent 25%),
        linear-gradient(145deg,#1b1d21,#2d3137);
    color:#fff;
}

.achievement-kicker{
    display:block;
    color:#ffccd3;
    font-size:8px;
    font-weight:900;
    letter-spacing:.12em;
}

.achievement-hero h1{
    margin:7px 0 8px;
    font-size:26px;
    letter-spacing:-.045em;
}

.achievement-hero p{
    max-width:560px;
    margin:0;
    color:rgba(255,255,255,.68);
    font-size:10px;
    line-height:1.65;
}

.achievement-grid{
    display:grid;
    grid-template-columns:repeat(3,1fr);
    gap:12px;
    margin-top:14px;
}

.achievement-card{
    min-width:0;
    padding:16px;
    border-radius:20px;
    background:#fff;
    border:1px solid #e9ecef;
    box-shadow:0 10px 28px rgba(31,40,48,.05);
}

.achievement-card.submitted{
    border-color:#dfe9e5;
}

.achievement-card-top{
    display:flex;
    align-items:center;
    justify-content:space-between;
    gap:8px;
}

.achievement-hour{
    width:43px;
    height:43px;
    border-radius:14px;
    display:grid;
    place-items:center;
    background:#17191d;
    color:#fff;
    font-size:14px;
    font-weight:900;
}

.achievement-status{
    padding:6px 8px;
    border-radius:999px;
    background:#eef0f2;
    color:#71777d;
    font-size:7px;
    font-weight:900;
}

.achievement-status.ready{background:#eef6ff;color:#3c73a5}
.achievement-status.pending{background:#fff7e7;color:#9b6900}
.achievement-status.approved{background:#eaf8f2;color:#0d7a4b}
.achievement-status.rejected{background:#fff0f2;color:#a90c25}

.achievement-card h2{
    margin:14px 0 5px;
    font-size:16px;
}

.achievement-card-note{
    min-height:50px;
    margin:0;
    color:#858c92;
    font-size:9px;
    line-height:1.6;
}

.achievement-upload-form{
    display:grid;
    gap:8px;
    margin-top:12px;
}

.achievement-file{
    min-height:44px;
    padding:0 11px;
    border:1px dashed #d6dbe0;
    border-radius:12px;
    display:flex;
    align-items:center;
    justify-content:center;
    background:#fafbfc;
    color:#687078;
    text-align:center;
    font-size:8px;
    font-weight:800;
    cursor:pointer;
}

.achievement-file.has-file{
    border-color:#9fd6c3;
    background:#f4fbf8;
    color:#147658;
}

.achievement-file input{
    display:none;
}

.achievement-upload-form button{
    min-height:42px;
    border:0;
    border-radius:12px;
    background:#e31837;
    color:#fff;
    font-size:9px;
    font-weight:900;
}

.achievement-proof-preview{
    margin-top:11px;
    border-radius:13px;
    overflow:hidden;
    aspect-ratio:9/12;
    background:#eff1f3;
}

.achievement-proof-preview img{
    width:100%;
    height:100%;
    object-fit:cover;
    display:block;
}

.verified-income{
    margin-top:11px;
    padding:10px;
    border-radius:12px;
    background:#f1faf6;
}

.verified-income small{
    display:block;
    color:#6c8b7f;
    font-size:7px;
}

.verified-income strong{
    display:block;
    margin-top:3px;
    color:#0d7a4b;
    font-size:16px;
}

.achievement-rule-card{
    margin-top:14px;
    padding:14px;
    border-radius:17px;
    display:flex;
    gap:10px;
    background:#fff;
    border:1px solid #e9ecef;
}

.achievement-rule-card>span{
    width:30px;
    height:30px;
    flex:0 0 30px;
    border-radius:50%;
    display:grid;
    place-items:center;
    background:#fff0f2;
    color:#e31837;
    font-size:11px;
    font-weight:900;
}

.achievement-rule-card strong{
    display:block;
    font-size:10px;
}

.achievement-rule-card p{
    margin:4px 0 0;
    color:#858c92;
    font-size:8px;
    line-height:1.55;
}

.achievement-page .bottom-nav{
    position:fixed;
    left:50%;
    bottom:0;
    transform:translateX(-50%);
    width:min(100%,720px);
    z-index:40;
}

.featured-driver-marker{
    position:relative;
    min-width:150px;
    min-height:48px;
    padding:5px 30px 5px 5px;
    border:0;
    border-radius:17px 17px 17px 5px;
    display:grid;
    grid-template-columns:auto 1fr;
    align-items:center;
    gap:8px;
    background:#17191d;
    color:#fff;
    box-shadow:0 8px 24px rgba(16,22,28,.25);
    cursor:pointer;
}

.featured-driver-logo{
    width:36px;
    height:36px;
    border-radius:12px;
    display:grid;
    place-items:center;
    background:#fff;
    color:#111;
    font-size:10px;
    font-weight:900;
}

.featured-driver-copy{
    min-width:0;
    text-align:left;
}

.featured-driver-copy strong{
    display:block;
    font-size:9px;
    white-space:nowrap;
}

.featured-driver-copy small{
    display:block;
    max-width:90px;
    overflow:hidden;
    margin-top:2px;
    color:rgba(255,255,255,.62);
    text-overflow:ellipsis;
    white-space:nowrap;
    font-size:7px;
}

.featured-driver-star{
    position:absolute;
    top:7px;
    right:8px;
    color:#ffd84c;
    font-size:13px;
}

.featured-driver-popup{
    min-width:180px;
    font-family:Arial,sans-serif;
}

.featured-driver-popup>span{
    display:block;
    color:#e31837;
    font-size:7px;
    font-weight:900;
    letter-spacing:.06em;
}

.featured-driver-popup>strong{
    display:block;
    margin-top:4px;
    font-size:12px;
}

.featured-driver-popup>div{
    margin-top:9px;
    padding-top:8px;
    border-top:1px solid #edf0f2;
    display:flex;
    justify-content:space-between;
    gap:10px;
    font-size:9px;
}

@media(max-width:760px){
    .achievement-grid{
        grid-template-columns:1fr;
    }

    .achievement-proof-preview{
        aspect-ratio:16/9;
    }
}

@media(max-width:640px){
    .achievement-content{
        padding-left:14px;
        padding-right:14px;
    }

    .achievement-hero{
        padding:18px;
        border-radius:20px;
    }

    .achievement-hero h1{
        font-size:23px;
    }

    .achievement-card{
        padding:14px;
        border-radius:17px;
    }

    .featured-driver-marker{
        min-width:136px;
        min-height:44px;
    }
}

/* CHATGPT-LIKE UI V1 */
:root{
    --ui-font:ui-sans-serif,-apple-system,BlinkMacSystemFont,"Segoe UI",Roboto,"Helvetica Neue",Arial,"Noto Sans",sans-serif;
    --ui-text:#202123;
    --ui-muted:#676767;
    --ui-subtle:#8e8e8e;
    --ui-line:#e5e5e5;
    --ui-soft:#f7f7f8;
    --ui-surface:#ffffff;
    --ui-black:#171717;
}

html,body{
    font-family:var(--ui-font);
    color:var(--ui-text);
    -webkit-font-smoothing:antialiased;
    text-rendering:optimizeLegibility;
}

button,input,select,textarea{
    font-family:inherit;
}

.account-page-head>span:nth-child(2),
.wallet-head strong{
    font-size:16px;
    font-weight:650;
    letter-spacing:-.01em;
}

.account-content,
.wallet-content{
    font-size:14px;
}

.identity-main h1{
    font-size:22px;
    font-weight:650;
    letter-spacing:-.03em;
}

.account-section h2,
.wallet-panel-head h2{
    font-size:18px;
    font-weight:650;
    letter-spacing:-.02em;
}

.account-row span,
.account-row strong,
.account-menu-list strong{
    font-size:13px;
}

.account-menu-list small,
.account-wallet-preview span,
.account-wallet-preview small{
    font-size:11px;
    line-height:1.45;
}

.field-v2>span{
    font-size:13px;
}

.field-v2 input{
    font-size:14px;
}

.auth-copy h1{
    font-size:30px;
    font-weight:650;
}

.auth-copy p{
    font-size:14px;
    line-height:1.55;
}

.auth-submit-v2,
.wallet-save-btn{
    font-size:14px;
}

/* Achievement V2 */
.achievement-page-v2{
    background:#fff;
}

.achievement-content-v2{
    width:min(100%,920px);
    padding:32px 24px 120px;
}

.achievement-intro-v2{
    display:grid;
    grid-template-columns:220px minmax(0,1fr);
    gap:34px;
    align-items:start;
    padding:18px 0 30px;
    border-bottom:1px solid var(--ui-line);
}

.achievement-user-line{
    display:flex;
    align-items:center;
    gap:12px;
    padding-top:5px;
}

.achievement-user-avatar{
    width:42px;
    height:42px;
    flex:0 0 42px;
    border-radius:50%;
    display:grid;
    place-items:center;
    background:#10a37f;
    color:#fff;
    font-size:15px;
    font-weight:700;
}

.achievement-user-line strong{
    display:block;
    font-size:14px;
    font-weight:650;
}

.achievement-user-line small{
    display:block;
    margin-top:3px;
    color:var(--ui-muted);
    font-size:12px;
}

.achievement-eyebrow{
    display:block;
    margin-bottom:8px;
    color:#10a37f;
    font-size:12px;
    font-weight:650;
}

.achievement-title-block h1{
    margin:0;
    color:var(--ui-black);
    font-size:32px;
    line-height:1.15;
    font-weight:650;
    letter-spacing:-.04em;
}

.achievement-title-block p{
    max-width:660px;
    margin:12px 0 0;
    color:var(--ui-muted);
    font-size:15px;
    line-height:1.65;
}

.achievement-message{
    margin:22px 0 0;
    padding:13px 15px;
    border-radius:10px;
    font-size:13px;
}

.achievement-list-v2{
    display:grid;
    gap:0;
    margin-top:10px;
}

.achievement-row-v2{
    display:grid;
    grid-template-columns:105px minmax(0,1fr);
    gap:24px;
    padding:28px 0;
    border-bottom:1px solid var(--ui-line);
}

.achievement-milestone-v2{
    width:82px;
    height:82px;
    border-radius:20px;
    display:flex;
    flex-direction:column;
    align-items:center;
    justify-content:center;
    background:var(--ui-soft);
    border:1px solid var(--ui-line);
}

.achievement-milestone-v2>span{
    color:var(--ui-black);
    font-size:24px;
    line-height:1;
    font-weight:700;
    letter-spacing:-.04em;
}

.achievement-milestone-v2 small{
    margin-top:7px;
    color:var(--ui-muted);
    font-size:10px;
}

.achievement-row-heading{
    display:flex;
    align-items:flex-start;
    justify-content:space-between;
    gap:18px;
}

.achievement-row-heading h2{
    margin:0;
    color:var(--ui-black);
    font-size:20px;
    line-height:1.3;
    font-weight:650;
    letter-spacing:-.02em;
}

.achievement-row-heading p{
    max-width:570px;
    margin:6px 0 0;
    color:var(--ui-muted);
    font-size:13px;
    line-height:1.55;
}

.achievement-status-v2{
    flex:0 0 auto;
    min-height:28px;
    padding:0 10px;
    border-radius:999px;
    display:inline-flex;
    align-items:center;
    font-size:11px;
    font-weight:600;
    white-space:nowrap;
}

.achievement-status-v2.ready{background:#f2f2f2;color:#555}
.achievement-status-v2.pending{background:#fff7df;color:#8a6600}
.achievement-status-v2.approved{background:#eaf7f2;color:#08785f}
.achievement-status-v2.rejected{background:#fff0f2;color:#b42336}

.achievement-upload-v2{
    display:flex;
    align-items:center;
    gap:10px;
    margin-top:18px;
}

.achievement-file-v2{
    flex:1;
    min-width:0;
    min-height:62px;
    padding:10px 14px;
    border:1px solid var(--ui-line);
    border-radius:12px;
    display:grid;
    grid-template-columns:auto minmax(0,1fr);
    align-items:center;
    gap:11px;
    background:#fff;
    cursor:pointer;
    transition:border-color .15s ease,background .15s ease;
}

.achievement-file-v2:hover{
    background:#fafafa;
    border-color:#cfcfcf;
}

.achievement-file-v2.has-file{
    border-color:#9fd7c7;
    background:#f6fcfa;
}

.achievement-file-v2 input{
    display:none;
}

.achievement-file-icon{
    width:36px;
    height:36px;
    border-radius:10px;
    display:grid;
    place-items:center;
    background:#f4f4f4;
    color:#404040;
}

.achievement-file-icon svg{
    width:18px;
    height:18px;
    fill:none;
    stroke:currentColor;
    stroke-width:1.8;
    stroke-linecap:round;
    stroke-linejoin:round;
}

.achievement-file-copy{
    min-width:0;
}

.achievement-file-copy strong{
    display:block;
    overflow:hidden;
    color:var(--ui-text);
    text-overflow:ellipsis;
    white-space:nowrap;
    font-size:13px;
    font-weight:600;
}

.achievement-file-copy small{
    display:block;
    margin-top:3px;
    color:var(--ui-subtle);
    font-size:11px;
}

.achievement-submit-v2{
    flex:0 0 auto;
    min-height:44px;
    padding:0 16px;
    border:0;
    border-radius:10px;
    background:var(--ui-black);
    color:#fff;
    font-size:13px;
    font-weight:600;
}

.achievement-submit-v2:hover{
    background:#2b2b2b;
}

.achievement-existing-proof{
    display:grid;
    grid-template-columns:150px minmax(0,1fr);
    gap:16px;
    margin-top:18px;
    padding:14px;
    border-radius:14px;
    background:var(--ui-soft);
}

.achievement-thumb-v2{
    position:relative;
    height:104px;
    overflow:hidden;
    border-radius:10px;
    background:#e9e9e9;
}

.achievement-thumb-v2 img{
    width:100%;
    height:100%;
    display:block;
    object-fit:cover;
}

.achievement-thumb-v2>span{
    position:absolute;
    right:7px;
    bottom:7px;
    padding:5px 7px;
    border-radius:7px;
    background:rgba(0,0,0,.72);
    color:#fff;
    font-size:10px;
    font-weight:600;
}

.achievement-proof-info{
    min-width:0;
    align-self:center;
}

.achievement-proof-info small{
    display:block;
    color:var(--ui-muted);
    font-size:11px;
}

.achievement-proof-info strong{
    display:block;
    margin-top:4px;
    color:var(--ui-black);
    font-size:19px;
    font-weight:650;
}

.achievement-proof-info p{
    margin:5px 0 0;
    color:var(--ui-muted);
    font-size:12px;
    line-height:1.5;
}

.achievement-help-v2{
    margin-top:26px;
    padding:16px 18px;
    border-radius:12px;
    display:grid;
    grid-template-columns:auto 1fr;
    gap:12px;
    background:var(--ui-soft);
    border:1px solid var(--ui-line);
}

.achievement-help-icon{
    width:28px;
    height:28px;
    border-radius:50%;
    display:grid;
    place-items:center;
    background:#fff;
    border:1px solid var(--ui-line);
    color:var(--ui-muted);
    font-size:12px;
    font-weight:650;
}

.achievement-help-v2 strong{
    display:block;
    font-size:13px;
    font-weight:650;
}

.achievement-help-v2 p{
    margin:5px 0 0;
    color:var(--ui-muted);
    font-size:12px;
    line-height:1.55;
}

@media(max-width:760px){
    .achievement-content-v2{
        padding:22px 16px 110px;
    }

    .achievement-intro-v2{
        grid-template-columns:1fr;
        gap:22px;
    }

    .achievement-title-block h1{
        font-size:28px;
    }

    .achievement-row-v2{
        grid-template-columns:72px minmax(0,1fr);
        gap:14px;
        padding:22px 0;
    }

    .achievement-milestone-v2{
        width:64px;
        height:64px;
        border-radius:16px;
    }

    .achievement-milestone-v2>span{
        font-size:20px;
    }

    .achievement-milestone-v2 small{
        display:none;
    }

    .achievement-row-heading{
        display:block;
    }

    .achievement-status-v2{
        margin-top:10px;
    }

    .achievement-upload-v2{
        display:grid;
    }

    .achievement-submit-v2{
        width:100%;
    }

    .achievement-existing-proof{
        grid-template-columns:104px minmax(0,1fr);
        gap:12px;
    }

    .achievement-thumb-v2{
        height:88px;
    }
}

@media(max-width:520px){
    .achievement-row-v2{
        grid-template-columns:1fr;
    }

    .achievement-milestone-v2{
        width:58px;
        height:58px;
    }

    .achievement-existing-proof{
        grid-template-columns:1fr;
    }

    .achievement-thumb-v2{
        height:180px;
    }
}

/* COMMUNITY V1 */
.community-page{
    min-height:100dvh;
    padding-bottom:calc(88px + env(safe-area-inset-bottom));
    background:#f4f5f6;
    color:#202123;
}

.community-page .bottom-nav{
    position:fixed;
    left:50%;
    bottom:0;
    transform:translateX(-50%);
    width:min(100%,720px);
    z-index:40;
}

.community-page-head{
    grid-template-columns:44px 1fr auto;
}

.community-compose-link{
    min-height:38px;
    padding:0 12px;
    border-radius:10px;
    display:inline-flex;
    align-items:center;
    justify-content:center;
    background:#fff;
    border:1px solid #e5e5e5;
    color:#202123;
    font-size:12px;
    font-weight:600;
}

.community-feed,
.post-create-content{
    width:min(100%,720px);
    margin:0 auto;
    padding:22px 16px 34px;
}

.community-feed-intro{
    padding:4px 2px 20px;
    display:flex;
    align-items:flex-end;
    justify-content:space-between;
    gap:18px;
}

.community-eyebrow{
    display:block;
    margin-bottom:5px;
    color:#10a37f;
    font-size:11px;
    font-weight:650;
}

.community-feed-intro h1,
.post-create-intro h1{
    margin:0;
    color:#171717;
    font-size:28px;
    font-weight:650;
    letter-spacing:-.035em;
}

.community-feed-intro p,
.post-create-intro p{
    margin:7px 0 0;
    color:#676767;
    font-size:13px;
    line-height:1.55;
}

.community-feed-intro>a{
    flex:0 0 auto;
    min-height:40px;
    padding:0 13px;
    border-radius:10px;
    display:inline-flex;
    align-items:center;
    background:#171717;
    color:#fff;
    font-size:12px;
    font-weight:600;
}

.community-message{
    margin:0 0 14px;
}

.community-empty{
    padding:56px 24px;
    border-radius:16px;
    text-align:center;
    background:#fff;
    border:1px solid #e5e5e5;
}

.community-empty>span{
    width:48px;
    height:48px;
    margin:0 auto 14px;
    border-radius:50%;
    display:grid;
    place-items:center;
    background:#f5f5f5;
    color:#777;
    font-size:24px;
}

.community-empty h2{
    margin:0;
    font-size:18px;
    font-weight:650;
}

.community-empty p{
    margin:7px 0 18px;
    color:#737373;
    font-size:13px;
}

.community-empty a{
    min-height:40px;
    padding:0 14px;
    border-radius:10px;
    display:inline-flex;
    align-items:center;
    background:#171717;
    color:#fff;
    font-size:12px;
    font-weight:600;
}

.community-feed-list{
    display:grid;
    gap:14px;
}

.community-post{
    overflow:hidden;
    border-radius:16px;
    background:#fff;
    border:1px solid #e3e5e7;
}

.community-post-head{
    padding:14px 15px 10px;
    display:flex;
    align-items:center;
    gap:10px;
}

.community-avatar{
    width:42px;
    height:42px;
    flex:0 0 42px;
    border-radius:50%;
    display:grid;
    place-items:center;
    background:#10a37f;
    color:#fff;
    font-size:14px;
    font-weight:700;
}

.community-author strong{
    display:block;
    font-size:14px;
    font-weight:650;
}

.community-author span{
    display:block;
    margin-top:2px;
    color:#7c7c7c;
    font-size:11px;
}

.community-caption{
    padding:0 15px 13px;
    color:#262626;
    font-size:14px;
    line-height:1.55;
    word-break:break-word;
}

.community-photo-grid{
    display:grid;
    gap:2px;
    overflow:hidden;
    background:#ddd;
}

.community-photo{
    position:relative;
    display:block;
    min-height:160px;
    overflow:hidden;
    background:#e9eaec;
}

.community-photo img{
    width:100%;
    height:100%;
    display:block;
    object-fit:cover;
}

.community-photo-grid.count-1{
    grid-template-columns:1fr;
}

.community-photo-grid.count-1 .community-photo{
    min-height:420px;
}

.community-photo-grid.count-2{
    grid-template-columns:1fr 1fr;
}

.community-photo-grid.count-2 .community-photo{
    min-height:330px;
}

.community-photo-grid.count-3{
    grid-template-columns:1.3fr .7fr;
    grid-template-rows:1fr 1fr;
}

.community-photo-grid.count-3 .community-photo:first-child{
    grid-row:1/3;
    min-height:420px;
}

.community-photo-grid.count-4{
    grid-template-columns:1fr 1fr;
    grid-template-rows:1fr 1fr;
}

.community-photo-grid.count-4 .community-photo{
    min-height:240px;
}

.community-photo-more{
    position:absolute;
    inset:0;
    display:grid;
    place-items:center;
    background:rgba(0,0,0,.5);
    color:#fff;
    font-size:34px;
    font-weight:650;
}

.community-post-stats{
    min-height:42px;
    padding:8px 14px;
    border-bottom:1px solid #eceeef;
    display:flex;
    align-items:center;
    justify-content:space-between;
    gap:12px;
    color:#737373;
    font-size:11px;
}

.community-reaction-summary{
    display:flex;
    align-items:center;
    gap:2px;
}

.community-reaction-summary>span{
    font-size:13px;
    line-height:1;
}

.community-reaction-summary strong{
    margin-left:4px;
    color:#666;
    font-size:11px;
    font-weight:500;
}

.community-reaction-bar{
    display:grid;
    grid-template-columns:repeat(4,1fr);
    padding:5px 8px;
    border-bottom:1px solid #eceeef;
}

.community-reaction-bar button{
    min-height:48px;
    border:0;
    border-radius:9px;
    background:transparent;
    color:#5f6368;
    display:flex;
    align-items:center;
    justify-content:center;
    gap:5px;
    font-size:12px;
}

.community-reaction-bar button:hover{
    background:#f5f5f5;
}

.community-reaction-bar button.active{
    background:#f1f7f5;
    color:#0a7f61;
}

.community-reaction-bar button.is-loading{
    opacity:.55;
}

.community-reaction-bar button>span{
    font-size:17px;
    line-height:1;
}

.community-reaction-bar button small{
    font-size:10px;
    font-weight:600;
}

.community-reaction-bar button b{
    min-width:17px;
    height:17px;
    padding:0 4px;
    border-radius:999px;
    display:grid;
    place-items:center;
    background:#f0f0f0;
    color:#717171;
    font-size:8px;
    font-weight:600;
}

.community-comments{
    padding:12px 14px 14px;
}

.community-approved-comments{
    display:grid;
    gap:9px;
    margin-bottom:10px;
}

.community-comment{
    display:grid;
    grid-template-columns:30px minmax(0,1fr);
    gap:8px;
    align-items:start;
}

.community-comment-avatar{
    width:30px;
    height:30px;
    border-radius:50%;
    display:grid;
    place-items:center;
    background:#e9ecef;
    color:#4c4f52;
    font-size:10px;
    font-weight:700;
}

.community-comment-avatar.mine{
    background:#def4ed;
    color:#08795f;
}

.community-comment>div:last-child{
    width:max-content;
    max-width:min(100%,560px);
    padding:8px 10px;
    border-radius:12px;
    background:#f3f4f5;
}

.community-comment strong{
    display:block;
    font-size:11px;
    font-weight:650;
}

.community-comment p{
    margin:3px 0 0;
    color:#333;
    font-size:12px;
    line-height:1.45;
}

.community-comment-form{
    display:grid;
    grid-template-columns:30px minmax(0,1fr);
    gap:8px;
    align-items:start;
}

.community-comment-input{
    min-height:40px;
    padding:4px 4px 4px 10px;
    border-radius:14px;
    display:flex;
    align-items:flex-end;
    gap:6px;
    background:#f3f4f5;
}

.community-comment-input textarea{
    flex:1;
    min-height:30px;
    max-height:110px;
    padding:7px 0;
    resize:vertical;
    border:0;
    outline:none;
    background:transparent;
    color:#202123;
    font-size:12px;
    line-height:1.4;
}

.community-comment-input button{
    flex:0 0 auto;
    min-height:32px;
    padding:0 10px;
    border:0;
    border-radius:10px;
    background:#171717;
    color:#fff;
    font-size:10px;
    font-weight:600;
}

.community-comment-note{
    margin:7px 0 0 38px;
    color:#929292;
    font-size:10px;
}

/* Create post */
.post-create-content{
    width:min(100%,680px);
}

.post-create-intro{
    padding:4px 2px 20px;
}

.post-create-card{
    padding:18px;
    border-radius:16px;
    background:#fff;
    border:1px solid #e3e5e7;
}

.post-create-user{
    display:flex;
    align-items:center;
    gap:10px;
    padding-bottom:15px;
    border-bottom:1px solid #eceeef;
}

.post-create-user strong{
    display:block;
    font-size:14px;
    font-weight:650;
}

.post-create-user small{
    display:block;
    margin-top:2px;
    color:#757575;
    font-size:11px;
}

.post-caption-field{
    position:relative;
    display:block;
    margin-top:16px;
}

.post-caption-field>span{
    display:block;
    margin-bottom:7px;
    color:#444;
    font-size:12px;
    font-weight:600;
}

.post-caption-field textarea{
    width:100%;
    min-height:132px;
    padding:13px 14px 28px;
    border:1px solid #dedfe1;
    border-radius:12px;
    outline:none;
    resize:vertical;
    color:#202123;
    font-size:14px;
    line-height:1.55;
}

.post-caption-field textarea:focus{
    border-color:#aaa;
}

.post-caption-field>small{
    position:absolute;
    right:10px;
    bottom:8px;
    color:#9a9a9a;
    font-size:10px;
}

.post-image-picker{
    min-height:82px;
    margin-top:14px;
    padding:13px;
    border:1px dashed #cfd2d5;
    border-radius:13px;
    display:grid;
    grid-template-columns:auto minmax(0,1fr);
    align-items:center;
    gap:12px;
    background:#fafafa;
    cursor:pointer;
}

.post-image-picker:hover{
    background:#f6f6f6;
}

.post-image-picker input{
    display:none;
}

.post-image-picker-icon{
    width:44px;
    height:44px;
    border-radius:12px;
    display:grid;
    place-items:center;
    background:#fff;
    border:1px solid #e4e4e4;
    color:#4c4f52;
}

.post-image-picker-icon svg{
    width:22px;
    height:22px;
    fill:none;
    stroke:currentColor;
    stroke-width:1.7;
    stroke-linecap:round;
    stroke-linejoin:round;
}

.post-image-picker strong{
    display:block;
    font-size:13px;
    font-weight:650;
}

.post-image-picker small{
    display:block;
    margin-top:3px;
    color:#858585;
    font-size:10px;
}

.post-image-preview{
    display:grid;
    grid-template-columns:repeat(4,1fr);
    gap:6px;
    margin-top:10px;
}

.post-preview-item{
    position:relative;
    overflow:hidden;
    aspect-ratio:1/1;
    border-radius:10px;
    background:#eee;
}

.post-preview-item img{
    width:100%;
    height:100%;
    display:block;
    object-fit:cover;
}

.post-preview-item span{
    position:absolute;
    top:5px;
    right:5px;
    min-width:22px;
    height:22px;
    padding:0 5px;
    border-radius:999px;
    display:grid;
    place-items:center;
    background:rgba(0,0,0,.65);
    color:#fff;
    font-size:9px;
}

.post-create-rules{
    margin-top:14px;
    padding:12px;
    border-radius:11px;
    display:grid;
    grid-template-columns:auto 1fr;
    gap:9px;
    background:#f7f7f8;
}

.post-create-rules>span{
    width:24px;
    height:24px;
    border-radius:50%;
    display:grid;
    place-items:center;
    background:#fff;
    border:1px solid #e2e2e2;
    color:#727272;
    font-size:10px;
    font-weight:650;
}

.post-create-rules p{
    margin:2px 0 0;
    color:#686868;
    font-size:11px;
    line-height:1.5;
}

.post-create-submit{
    width:100%;
    min-height:46px;
    margin-top:14px;
    border:0;
    border-radius:11px;
    background:#171717;
    color:#fff;
    font-size:13px;
    font-weight:650;
}

@media(max-width:640px){
    .community-feed,
    .post-create-content{
        padding:16px 12px 28px;
    }

    .community-feed-intro{
        display:block;
    }

    .community-feed-intro>a{
        margin-top:12px;
    }

    .community-feed-intro h1,
    .post-create-intro h1{
        font-size:24px;
    }

    .community-photo-grid.count-1 .community-photo{
        min-height:330px;
    }

    .community-photo-grid.count-2 .community-photo{
        min-height:220px;
    }

    .community-photo-grid.count-3 .community-photo:first-child{
        min-height:320px;
    }

    .community-photo-grid.count-4 .community-photo{
        min-height:170px;
    }

    .community-reaction-bar button{
        gap:3px;
    }

    .community-reaction-bar button small{
        display:none;
    }

    .post-image-preview{
        grid-template-columns:repeat(3,1fr);
    }
}

/* COMMUNITY MOBILE POLISH V2 */

/* Feed desktop/tablet: gọn và cân đối */
.community-feed{
    width:min(100%,680px);
    padding-top:18px;
}

.community-feed-intro{
    padding:2px 2px 14px;
    align-items:center;
}

.community-feed-intro h1{
    font-size:26px;
    line-height:1.2;
}

.community-feed-intro>a{
    min-height:38px;
    padding:0 12px;
}

.community-empty{
    min-height:260px;
    padding:40px 20px;
}

.community-empty h2{
    font-size:17px;
}

.community-empty a{
    margin-top:16px;
}

.community-post{
    border-radius:14px;
}

.community-post-head{
    padding:13px 14px 9px;
}

.community-caption{
    padding:0 14px 12px;
}

.community-comments{
    padding:10px 12px 12px;
}

.community-comment-input{
    min-height:42px;
}

/* Create post: gọn, không còn các box giải thích dư */
.post-create-content{
    padding-top:18px;
}

.post-create-intro{
    padding:2px 2px 14px;
}

.post-create-card{
    padding:16px;
}

.post-create-submit{
    margin-top:16px;
}

/* Mobile ưu tiên chính */
@media(max-width:640px){
    .community-page{
        padding-bottom:calc(78px + env(safe-area-inset-bottom));
        background:#fff;
    }

    .community-page-head{
        min-height:60px;
        padding:8px 10px;
        grid-template-columns:40px 1fr auto;
        background:rgba(255,255,255,.96);
        border-bottom:1px solid #eceeef;
    }

    .community-page-head .account-back{
        width:38px;
        height:38px;
        border-radius:12px;
        background:#fff;
    }

    .community-page-head>span:nth-child(2){
        font-size:15px;
        font-weight:650;
    }

    .community-compose-link{
        min-height:36px;
        padding:0 10px;
        border-radius:9px;
        font-size:11px;
    }

    .community-feed,
    .post-create-content{
        width:100%;
        padding:12px 0 22px;
    }

    .community-feed-intro,
    .post-create-intro{
        padding:8px 14px 12px;
    }

    .community-eyebrow{
        margin-bottom:3px;
        font-size:10px;
    }

    .community-feed-intro h1,
    .post-create-intro h1{
        font-size:22px;
        letter-spacing:-.025em;
    }

    .community-feed-intro>a{
        display:none;
    }

    .community-message{
        margin:0 12px 10px;
    }

    .community-empty{
        min-height:300px;
        margin:0 12px;
        border-radius:14px;
        display:flex;
        flex-direction:column;
        align-items:center;
        justify-content:center;
    }

    .community-feed-list{
        gap:10px;
    }

    .community-post{
        border-left:0;
        border-right:0;
        border-radius:0;
    }

    .community-post-head{
        padding:12px 13px 9px;
    }

    .community-avatar{
        width:38px;
        height:38px;
        flex-basis:38px;
        font-size:13px;
    }

    .community-author strong{
        font-size:13px;
    }

    .community-author span{
        font-size:10px;
    }

    .community-caption{
        padding:0 13px 11px;
        font-size:13px;
        line-height:1.5;
    }

    .community-photo-grid{
        gap:1px;
    }

    .community-photo-grid.count-1 .community-photo{
        min-height:320px;
        max-height:520px;
    }

    .community-photo-grid.count-2 .community-photo{
        min-height:210px;
    }

    .community-photo-grid.count-3 .community-photo:first-child{
        min-height:310px;
    }

    .community-photo-grid.count-4 .community-photo{
        min-height:165px;
    }

    .community-photo-more{
        font-size:30px;
    }

    .community-post-stats{
        min-height:38px;
        padding:7px 12px;
        font-size:10px;
    }

    .community-reaction-bar{
        padding:4px 6px;
    }

    .community-reaction-bar button{
        min-height:44px;
        border-radius:8px;
    }

    .community-reaction-bar button>span{
        font-size:16px;
    }

    .community-reaction-bar button b{
        min-width:16px;
        height:16px;
        font-size:8px;
    }

    .community-comments{
        padding:10px 12px 11px;
    }

    .community-approved-comments{
        gap:8px;
        margin-bottom:9px;
    }

    .community-comment-form{
        grid-template-columns:28px minmax(0,1fr);
        gap:7px;
    }

    .community-comment-avatar{
        width:28px;
        height:28px;
        font-size:9px;
    }

    .community-comment-input{
        min-height:40px;
        border-radius:13px;
    }

    .community-comment-input textarea{
        font-size:12px;
    }

    .community-comment-input button{
        min-height:30px;
        padding:0 9px;
        font-size:10px;
    }

    .community-page .bottom-nav{
        width:100%;
        border-radius:0;
    }

    /* Create post mobile */
    .create-post-page{
        background:#f5f6f7;
    }

    .post-create-card{
        margin:0 10px;
        padding:14px;
        border-radius:14px;
    }

    .post-create-user{
        padding-bottom:12px;
    }

    .post-caption-field{
        margin-top:13px;
    }

    .post-caption-field textarea{
        min-height:120px;
        border-radius:11px;
        font-size:14px;
    }

    .post-image-picker{
        min-height:76px;
        margin-top:12px;
        padding:11px;
        border-radius:12px;
    }

    .post-image-picker-icon{
        width:40px;
        height:40px;
    }

    .post-image-picker strong{
        font-size:12px;
    }

    .post-image-picker small{
        font-size:9px;
        line-height:1.4;
    }

    .post-image-preview{
        grid-template-columns:repeat(3,1fr);
        gap:5px;
    }

    .post-create-submit{
        min-height:46px;
        border-radius:10px;
        font-size:12px;
    }
}

@media(max-width:390px){
    .community-page-head{
        grid-template-columns:38px 1fr auto;
        padding-left:8px;
        padding-right:8px;
    }

    .community-compose-link{
        padding:0 8px;
        font-size:10px;
    }

    .community-feed-intro,
    .post-create-intro{
        padding-left:12px;
        padding-right:12px;
    }

    .community-photo-grid.count-2 .community-photo{
        min-height:185px;
    }

    .community-photo-grid.count-4 .community-photo{
        min-height:145px;
    }
}

/* SHIPF1 CAMERA V1 */
.shipf1-camera-page{
    min-height:100dvh;
    background:#050607;
    color:#fff;
}

.shipf1-camera-shell{
    position:fixed;
    inset:0;
    overflow:hidden;
    background:
        radial-gradient(circle at 50% 22%,rgba(16,163,127,.12),transparent 35%),
        #050607;
}

.shipf1-camera-canvas{
    position:absolute;
    inset:0;
    z-index:5;
    width:100%;
    height:100%;
    display:none;
    object-fit:contain;
    background:#050607;
}

.shipf1-camera-canvas.show{
    display:block;
}

.shipf1-camera-topbar{
    position:absolute;
    top:0;
    left:0;
    right:0;
    z-index:30;
    min-height:72px;
    padding:calc(10px + env(safe-area-inset-top)) 12px 10px;
    display:flex;
    align-items:center;
    justify-content:space-between;
    gap:10px;
    pointer-events:none;
}

.shipf1-camera-topbar>*{
    pointer-events:auto;
}

.shipf1-camera-round{
    width:46px;
    height:46px;
    flex:0 0 46px;
    border-radius:50%;
    display:grid;
    place-items:center;
    background:rgba(15,16,18,.62);
    border:1px solid rgba(255,255,255,.14);
    backdrop-filter:blur(16px);
}

.shipf1-camera-round svg{
    width:22px;
    height:22px;
    fill:none;
    stroke:#fff;
    stroke-width:2;
    stroke-linecap:round;
    stroke-linejoin:round;
}

.shipf1-camera-user{
    min-width:0;
    max-width:72vw;
    min-height:48px;
    padding:5px 11px 5px 5px;
    border-radius:999px;
    display:flex;
    align-items:center;
    gap:9px;
    background:rgba(15,16,18,.62);
    border:1px solid rgba(255,255,255,.14);
    backdrop-filter:blur(16px);
}

.shipf1-camera-avatar{
    width:38px;
    height:38px;
    flex:0 0 38px;
    border-radius:50%;
    display:grid;
    place-items:center;
    background:#10a37f;
    color:#fff;
    font-size:13px;
    font-weight:700;
}

.shipf1-camera-user>span:last-child{
    min-width:0;
}

.shipf1-camera-user strong{
    display:block;
    overflow:hidden;
    text-overflow:ellipsis;
    white-space:nowrap;
    font-size:12px;
    font-weight:650;
}

.shipf1-camera-user small{
    display:block;
    overflow:hidden;
    margin-top:2px;
    color:rgba(255,255,255,.62);
    text-overflow:ellipsis;
    white-space:nowrap;
    font-size:9px;
}

.shipf1-camera-start{
    position:absolute;
    inset:0;
    z-index:20;
    padding:96px 18px 34px;
    display:flex;
    align-items:center;
    justify-content:center;
}

.shipf1-camera-start-card{
    width:min(100%,410px);
    padding:24px 18px 18px;
    border-radius:26px;
    background:rgba(18,19,22,.78);
    border:1px solid rgba(255,255,255,.12);
    backdrop-filter:blur(18px);
    box-shadow:0 24px 70px rgba(0,0,0,.34);
}

.shipf1-camera-start-icon{
    width:62px;
    height:62px;
    margin:0 auto 14px;
    border-radius:20px;
    display:grid;
    place-items:center;
    background:#10a37f;
    color:#fff;
}

.shipf1-camera-start-icon svg{
    width:28px;
    height:28px;
    fill:none;
    stroke:currentColor;
    stroke-width:1.7;
    stroke-linecap:round;
    stroke-linejoin:round;
}

.shipf1-camera-start-card h1{
    margin:0;
    text-align:center;
    font-size:24px;
    font-weight:650;
    letter-spacing:-.035em;
}

.shipf1-camera-info-preview{
    margin-top:18px;
    overflow:hidden;
    border-radius:14px;
    border:1px solid rgba(255,255,255,.1);
}

.shipf1-camera-info-preview>div{
    min-height:52px;
    padding:10px 12px;
    display:grid;
    grid-template-columns:84px minmax(0,1fr);
    align-items:center;
    gap:8px;
    border-bottom:1px solid rgba(255,255,255,.08);
}

.shipf1-camera-info-preview>div:last-child{
    border-bottom:0;
}

.shipf1-camera-info-preview span{
    color:rgba(255,255,255,.48);
    font-size:10px;
}

.shipf1-camera-info-preview strong{
    overflow:hidden;
    color:#fff;
    text-overflow:ellipsis;
    white-space:nowrap;
    font-size:11px;
    font-weight:600;
    text-align:right;
}

.shipf1-camera-open{
    width:100%;
    min-height:52px;
    margin-top:16px;
    border:0;
    border-radius:14px;
    background:#fff;
    color:#111;
    font-size:13px;
    font-weight:650;
}

.shipf1-camera-open:disabled{
    opacity:.5;
}

.shipf1-camera-status{
    min-height:32px;
    margin:11px 4px 0;
    color:rgba(255,255,255,.55);
    text-align:center;
    font-size:10px;
    line-height:1.5;
}

.shipf1-camera-preview-info{
    position:absolute;
    left:12px;
    right:12px;
    bottom:calc(108px + env(safe-area-inset-bottom));
    z-index:21;
    padding:10px 12px;
    border-radius:14px;
    background:rgba(15,16,18,.68);
    border:1px solid rgba(255,255,255,.12);
    backdrop-filter:blur(16px);
}

.shipf1-camera-preview-info span{
    display:block;
    color:rgba(255,255,255,.55);
    font-size:9px;
}

.shipf1-camera-preview-info strong{
    display:block;
    margin-top:3px;
    overflow:hidden;
    text-overflow:ellipsis;
    white-space:nowrap;
    font-size:11px;
    font-weight:600;
}

.shipf1-camera-actions{
    position:absolute;
    left:0;
    right:0;
    bottom:0;
    z-index:30;
    padding:12px 14px calc(15px + env(safe-area-inset-bottom));
    display:grid;
    grid-template-columns:1fr 1.4fr;
    gap:10px;
    background:linear-gradient(to top,rgba(0,0,0,.86),rgba(0,0,0,.18),transparent);
}

.shipf1-camera-action{
    min-height:54px;
    border-radius:15px;
    display:flex;
    align-items:center;
    justify-content:center;
    gap:8px;
    font-size:12px;
    font-weight:650;
}

.shipf1-camera-action svg{
    width:19px;
    height:19px;
    fill:none;
    stroke:currentColor;
    stroke-width:1.8;
    stroke-linecap:round;
    stroke-linejoin:round;
}

.shipf1-camera-action.secondary{
    border:1px solid rgba(255,255,255,.16);
    background:rgba(20,21,24,.68);
    color:#fff;
    backdrop-filter:blur(14px);
}

.shipf1-camera-action.primary{
    border:0;
    background:#fff;
    color:#111;
}

.shipf1-camera-toast{
    position:absolute;
    left:50%;
    top:calc(76px + env(safe-area-inset-top));
    z-index:50;
    width:max-content;
    max-width:calc(100% - 28px);
    transform:translate(-50%,-8px);
    padding:10px 13px;
    border-radius:11px;
    background:rgba(22,23,25,.9);
    color:#fff;
    opacity:0;
    pointer-events:none;
    transition:.18s ease;
    font-size:11px;
    font-weight:600;
    text-align:center;
}

.shipf1-camera-toast.show{
    opacity:1;
    transform:translate(-50%,0);
}

.shipf1-camera-toast.success{
    background:rgba(10,116,86,.94);
}

.shipf1-camera-toast.error{
    background:rgba(145,30,43,.95);
}

@media(min-width:740px){
    .shipf1-camera-shell{
        left:50%;
        right:auto;
        width:min(760px,100%);
        transform:translateX(-50%);
        box-shadow:0 0 0 9999px #050607;
    }

    .shipf1-camera-start-card{
        width:420px;
    }
}

@media(max-height:700px){
    .shipf1-camera-start{
        padding-top:80px;
        padding-bottom:18px;
    }

    .shipf1-camera-start-card{
        padding-top:18px;
    }

    .shipf1-camera-start-icon{
        width:52px;
        height:52px;
        border-radius:17px;
        margin-bottom:10px;
    }

    .shipf1-camera-start-card h1{
        font-size:21px;
    }

    .shipf1-camera-info-preview{
        margin-top:12px;
    }

    .shipf1-camera-open{
        min-height:48px;
        margin-top:12px;
    }
}

/* MORE DEVELOPING V1 */
.more-grid-developing{
    gap:10px;
}

.more-developing-item{
    min-height:118px;
    padding:14px 10px;
    border:1px solid #e6e8ea;
    border-radius:17px;
    display:flex;
    flex-direction:column;
    align-items:center;
    justify-content:center;
    gap:6px;
    background:#fafafa;
    color:#202123;
    text-align:center;
    cursor:default;
    user-select:none;
}

.more-developing-icon{
    font-size:30px;
    line-height:1;
    filter:saturate(.75);
}

.more-developing-item strong{
    font-size:12px;
    font-weight:650;
}

.more-developing-item small{
    min-height:22px;
    padding:0 8px;
    border-radius:999px;
    display:inline-flex;
    align-items:center;
    justify-content:center;
    background:#efefef;
    color:#7a7a7a;
    font-size:9px;
    font-weight:600;
}

@media(max-width:640px){
    .more-grid-developing{
        grid-template-columns:1fr 1fr;
        gap:9px;
    }

    .more-developing-item{
        min-height:104px;
        padding:12px 8px;
        border-radius:15px;
    }

    .more-developing-icon{
        font-size:27px;
    }

    .more-developing-item strong{
        font-size:11px;
    }

    .more-developing-item small{
        min-height:20px;
        font-size:8px;
    }
}

/* PWA INSTALL PROMPT V1 */
.shipf1-install-prompt{
    position:fixed;
    left:50%;
    bottom:calc(88px + env(safe-area-inset-bottom));
    z-index:1200;
    width:min(calc(100% - 24px),420px);
    min-height:72px;
    padding:10px 42px 10px 10px;
    border:1px solid rgba(20,24,28,.1);
    border-radius:18px;
    display:grid;
    grid-template-columns:auto minmax(0,1fr) auto;
    align-items:center;
    gap:10px;
    background:rgba(255,255,255,.96);
    box-shadow:0 18px 48px rgba(25,31,36,.18);
    backdrop-filter:blur(18px);
    opacity:0;
    transform:translate(-50%,18px) scale(.98);
    transition:opacity .2s ease,transform .2s ease;
}

.shipf1-install-prompt.show{
    opacity:1;
    transform:translate(-50%,0) scale(1);
}

.shipf1-install-icon,
.shipf1-install-guide-icon{
    width:46px;
    height:46px;
    flex:0 0 46px;
    border-radius:14px;
    display:grid;
    place-items:center;
    background:#e31837;
    color:#fff;
    font-size:13px;
    font-weight:800;
    letter-spacing:-.03em;
}

.shipf1-install-copy{
    min-width:0;
}

.shipf1-install-copy strong{
    display:block;
    color:#171717;
    font-size:13px;
    font-weight:650;
}

.shipf1-install-copy span{
    display:block;
    margin-top:3px;
    overflow:hidden;
    color:#747474;
    text-overflow:ellipsis;
    white-space:nowrap;
    font-size:10px;
}

.shipf1-install-button{
    min-width:58px;
    height:38px;
    padding:0 12px;
    border:0;
    border-radius:11px;
    background:#171717;
    color:#fff;
    font-size:11px;
    font-weight:650;
}

.shipf1-install-close{
    position:absolute;
    top:6px;
    right:7px;
    width:28px;
    height:28px;
    border:0;
    border-radius:50%;
    display:grid;
    place-items:center;
    background:transparent;
    color:#8b8b8b;
    font-size:19px;
    line-height:1;
}

.shipf1-install-close:hover{
    background:#f2f2f2;
}

.shipf1-install-guide-backdrop{
    position:fixed;
    inset:0;
    z-index:1290;
    background:rgba(0,0,0,.34);
    opacity:0;
    transition:opacity .2s ease;
}

.shipf1-install-guide-backdrop.show{
    opacity:1;
}

.shipf1-install-guide{
    position:fixed;
    left:50%;
    bottom:0;
    z-index:1300;
    width:min(100%,520px);
    padding:12px 18px calc(18px + env(safe-area-inset-bottom));
    border-radius:24px 24px 0 0;
    background:#fff;
    box-shadow:0 -18px 55px rgba(20,24,28,.18);
    opacity:0;
    transform:translate(-50%,24px);
    transition:opacity .2s ease,transform .2s ease;
}

.shipf1-install-guide.show{
    opacity:1;
    transform:translate(-50%,0);
}

.shipf1-install-guide-handle{
    width:34px;
    height:5px;
    margin:0 auto 17px;
    border-radius:999px;
    display:block;
    background:#d7d7d7;
}

.shipf1-install-guide-icon{
    margin-bottom:13px;
}

.shipf1-install-guide-copy strong{
    display:block;
    color:#171717;
    font-size:18px;
    font-weight:650;
    letter-spacing:-.02em;
}

.shipf1-install-guide-copy p{
    margin:7px 0 0;
    color:#686868;
    font-size:13px;
    line-height:1.55;
}

.shipf1-install-guide-done{
    width:100%;
    min-height:46px;
    margin-top:17px;
    border:0;
    border-radius:11px;
    background:#171717;
    color:#fff;
    font-size:13px;
    font-weight:650;
}

@media(min-width:901px){
    .shipf1-install-prompt,
    .shipf1-install-guide,
    .shipf1-install-guide-backdrop{
        display:none !important;
    }
}

@media(max-width:640px){
    .shipf1-install-prompt{
        bottom:calc(82px + env(safe-area-inset-bottom));
        width:calc(100% - 20px);
        min-height:68px;
        padding:9px 38px 9px 9px;
        border-radius:16px;
    }

    .shipf1-install-icon{
        width:43px;
        height:43px;
        flex-basis:43px;
        border-radius:13px;
        font-size:12px;
    }

    .shipf1-install-copy strong{
        font-size:12px;
    }

    .shipf1-install-copy span{
        max-width:180px;
        font-size:9px;
    }

    .shipf1-install-button{
        min-width:54px;
        height:36px;
        padding:0 10px;
        border-radius:10px;
        font-size:10px;
    }
}

/* HOME MOBILE LAYOUT + CONNECTION V3 */

/* Bỏ nhãn ShipF1 tự đặt trên bản đồ. Attribution của Goong vẫn giữ. */
.map-brand{
    display:none!important;
}

/* Controls chung */
.map-tools{
    position:absolute;
    right:16px;
    bottom:90px;
    z-index:30;
    display:flex;
    flex-direction:column;
    gap:10px;
    pointer-events:none;
}

.map-tool{
    position:relative;
    width:52px;
    height:52px;
    border:1px solid rgba(25,30,35,.08);
    border-radius:50%;
    display:grid;
    place-items:center;
    background:rgba(255,255,255,.98);
    color:#17191d;
    box-shadow:0 9px 24px rgba(20,28,35,.14);
    pointer-events:auto;
    touch-action:manipulation;
    -webkit-tap-highlight-color:transparent;
    cursor:pointer;
}

.map-tool:active{
    transform:scale(.95);
}

.map-tool svg{
    width:25px;
    height:25px;
    fill:none;
    stroke:currentColor;
    stroke-width:1.9;
    stroke-linecap:round;
    stroke-linejoin:round;
}

.map-tool-locate svg{
    width:27px;
    height:27px;
}

.gps-quality-dot{
    position:absolute;
    right:5px;
    bottom:5px;
    width:8px;
    height:8px;
    border:2px solid #fff;
    border-radius:50%;
    background:#c2c6ca;
}

.gps-quality-dot.excellent{background:#17a66d}
.gps-quality-dot.good{background:#63b85d}
.gps-quality-dot.fair{background:#e5aa2a}
.gps-quality-dot.weak{background:#df5056}

/* Nút bật / tắt kết nối */
.activity-pill{
    display:none!important;
}

.connection-control{
    position:absolute;
    left:50%;
    bottom:22px;
    z-index:35;
    min-width:182px;
    height:50px;
    padding:0 20px;
    transform:translateX(-50%);
    border:0;
    border-radius:999px;
    display:flex;
    align-items:center;
    justify-content:center;
    gap:9px;
    background:#17181b;
    color:#fff;
    box-shadow:0 10px 25px rgba(0,0,0,.22);
    font-size:13px;
    font-weight:700;
    pointer-events:auto;
    touch-action:manipulation;
    -webkit-tap-highlight-color:transparent;
    cursor:pointer;
}

.connection-power{
    display:grid!important;
    place-items:center;
}

.connection-power svg{
    width:21px;
    height:21px;
    fill:none;
    stroke:currentColor;
    stroke-width:2.1;
    stroke-linecap:round;
    stroke-linejoin:round;
}

.connection-control.is-on{
    left:18px;
    width:54px;
    min-width:54px;
    height:54px;
    padding:0;
    transform:none;
    border-radius:50%;
    background:#13b85a;
    box-shadow:
        0 10px 26px rgba(19,184,90,.30),
        0 0 0 5px rgba(19,184,90,.10);
}

.connection-control.is-on .connection-label{
    display:none;
}

.status-dot.is-offline{
    background:#e54d43!important;
    box-shadow:0 0 0 4px rgba(229,77,67,.10)!important;
}

.status-dot.is-active{
    background:#17a66d!important;
    box-shadow:0 0 0 4px rgba(23,166,109,.10)!important;
}

/* Auth popup */
.connection-auth-modal{
    position:fixed;
    inset:0;
    z-index:1800;
    display:grid;
    place-items:center;
    padding:18px;
}

.connection-auth-backdrop{
    position:absolute;
    inset:0;
    border:0;
    background:rgba(20,22,25,.42);
}

.connection-auth-card{
    position:relative;
    z-index:1;
    width:min(100%,390px);
    padding:24px 20px 20px;
    border-radius:22px;
    background:#fff;
    box-shadow:0 24px 70px rgba(20,24,30,.24);
    text-align:center;
}

.connection-auth-close{
    position:absolute;
    top:9px;
    right:10px;
    width:34px;
    height:34px;
    border:0;
    border-radius:50%;
    display:grid;
    place-items:center;
    background:#f3f4f5;
    color:#666;
    font-size:20px;
}

.connection-auth-icon{
    width:54px;
    height:54px;
    margin:4px auto 13px;
    border-radius:50%;
    display:grid;
    place-items:center;
    background:#eef8f4;
    color:#0b8061;
}

.connection-auth-icon svg{
    width:25px;
    height:25px;
    fill:none;
    stroke:currentColor;
    stroke-width:2;
    stroke-linecap:round;
    stroke-linejoin:round;
}

.connection-auth-card h3{
    margin:0;
    color:#171717;
    font-size:20px;
    font-weight:650;
}

.connection-auth-card p{
    margin:7px auto 0;
    max-width:290px;
    color:#6d7175;
    font-size:12px;
    line-height:1.5;
}

.connection-auth-actions{
    display:grid;
    gap:9px;
    margin-top:18px;
}

.connection-auth-actions a{
    min-height:46px;
    border-radius:11px;
    display:flex;
    align-items:center;
    justify-content:center;
    font-size:13px;
    font-weight:650;
}

.connection-auth-primary{
    background:#171717;
    color:#fff;
}

.connection-auth-secondary{
    border:1px solid #dedfe1;
    background:#fff;
    color:#202123;
}

/*
 * MOBILE: không dùng absolute overlay cho 3 khối lớn nữa.
 * App được chia thành 3 hàng thật:
 * 1) Map
 * 2) Status + 4 chức năng
 * 3) Bottom nav
 * Vì vậy map luôn kéo/zoom được và các nút dưới luôn bấm được.
 */
@media(max-width:640px){
    :root{
        --bottom-nav-h:72px;
    }

    html,
    body{
        width:100%;
        height:100%;
        min-height:100%;
        overflow:hidden;
    }

    .app-shell{
        position:relative;
        width:100%;
        height:100dvh;
        min-height:100dvh;
        overflow:hidden;
        display:grid!important;
        grid-template-rows:minmax(260px,1fr) auto var(--bottom-nav-h);
        background:#f2f3f5;
    }

    .map-stage{
        position:relative!important;
        inset:auto!important;
        grid-row:1;
        width:100%;
        height:auto!important;
        min-height:0!important;
        overflow:hidden;
        z-index:1;
        background:#dfe4e1;
    }

    .map-canvas,
    #shipf1-map{
        position:absolute!important;
        inset:0!important;
        width:100%!important;
        height:100%!important;
        z-index:1;
        touch-action:none;
    }

    #shipf1-map .maplibregl-canvas-container,
    #shipf1-map .maplibregl-canvas{
        width:100%!important;
        height:100%!important;
        pointer-events:auto!important;
    }

    .map-tools{
        right:12px;
        bottom:86px;
        z-index:30;
        gap:9px;
    }

    .map-tool{
        width:50px;
        height:50px;
    }

    .connection-control{
        bottom:18px;
        z-index:35;
        height:48px;
        min-width:172px;
        padding:0 18px;
    }

    .connection-control.is-on{
        left:14px;
        bottom:16px;
        width:52px;
        min-width:52px;
        height:52px;
    }

    .home-panel{
        position:relative!important;
        inset:auto!important;
        grid-row:2;
        z-index:10;
        width:100%;
        height:auto!important;
        padding:7px 10px 8px!important;
        background:#f2f3f5;
        pointer-events:auto!important;
    }

    .status-card{
        width:100%;
        min-height:44px!important;
        height:44px!important;
        margin:0 0 7px!important;
        padding:7px 12px!important;
        border-radius:12px!important;
        gap:9px!important;
        box-shadow:0 3px 10px rgba(31,32,35,.08)!important;
        pointer-events:auto!important;
    }

    .status-card small{
        display:none!important;
    }

    .status-card strong{
        font-size:12px!important;
        line-height:1.2!important;
        font-weight:650!important;
    }

    .status-dot{
        width:9px!important;
        height:9px!important;
        flex:0 0 9px!important;
    }

    .quick-panel{
        width:100%;
        min-height:86px!important;
        height:86px!important;
        padding:8px 4px 5px!important;
        border-radius:14px!important;
        box-shadow:0 4px 12px rgba(31,32,35,.08)!important;
        pointer-events:auto!important;
    }

    .quick-action{
        min-height:70px!important;
        padding:0 2px!important;
        gap:6px!important;
        pointer-events:auto!important;
        touch-action:manipulation;
        -webkit-tap-highlight-color:transparent;
    }

    .quick-icon{
        width:44px!important;
        height:44px!important;
        flex:0 0 44px!important;
    }

    .quick-icon svg{
        width:22px!important;
        height:22px!important;
    }

    .quick-label,
    .quick-action>span:last-child{
        min-height:24px!important;
        font-size:10px!important;
        line-height:1.18!important;
    }

    .bottom-nav{
        position:relative!important;
        inset:auto!important;
        grid-row:3;
        z-index:20;
        width:100%;
        height:var(--bottom-nav-h)!important;
        min-height:var(--bottom-nav-h)!important;
        background:#fff;
        pointer-events:auto!important;
    }

    .bottom-nav a{
        pointer-events:auto!important;
        touch-action:manipulation;
        -webkit-tap-highlight-color:transparent;
    }

    /* Map attribution không đè nút kết nối */
    #shipf1-map .maplibregl-ctrl-bottom-right{
        bottom:0!important;
        right:0!important;
        transform:scale(.82);
        transform-origin:bottom right;
    }

    /* Sheet vẫn nổi trên toàn bộ app */
    .sheet-backdrop{
        z-index:900!important;
    }

    .bottom-sheet{
        z-index:950!important;
    }

    .connection-auth-modal{
        align-items:end;
        padding:0;
    }

    .connection-auth-card{
        width:100%;
        border-radius:24px 24px 0 0;
        padding:26px 18px calc(20px + env(safe-area-inset-bottom));
    }
}

/* Máy rất thấp: thu panel chứ không phủ lên map */
@media(max-width:640px) and (max-height:700px){
    .app-shell{
        grid-template-rows:minmax(220px,1fr) auto 68px;
    }

    .home-panel{
        padding-top:5px!important;
        padding-bottom:5px!important;
    }

    .status-card{
        height:40px!important;
        min-height:40px!important;
        margin-bottom:5px!important;
    }

    .quick-panel{
        height:80px!important;
        min-height:80px!important;
    }

    .quick-icon{
        width:40px!important;
        height:40px!important;
        flex-basis:40px!important;
    }

    .bottom-nav{
        height:68px!important;
        min-height:68px!important;
    }

    .map-tools{
        bottom:80px;
    }
}



/* CONNECTION AUTH VISIBILITY FIX V4 */
/* Popup đăng nhập/đăng ký PHẢI ẩn hoàn toàn khi chưa bấm "Bật kết nối". */
.connection-auth-modal[hidden]{
    display:none!important;
}

/* Chỉ khi JS bỏ thuộc tính hidden thì popup mới được phép hiển thị. */
.connection-auth-modal:not([hidden]){
    display:grid;
}

/* STATUS ACTION + LIVE GPS FIX V5 */
#shipf1StatusAction{
    position:relative;
    z-index:25;
    pointer-events:auto!important;
    touch-action:manipulation;
    -webkit-tap-highlight-color:transparent;
}

#shipf1StatusAction *{
    pointer-events:none;
}

.sheet-backdrop[hidden]{
    display:none!important;
}

.bottom-sheet{
    pointer-events:none;
}

.bottom-sheet.is-open{
    pointer-events:auto!important;
}

.driver-status-sheet.is-open{
    z-index:1200!important;
}

.sheet-backdrop:not([hidden]){
    z-index:1150!important;
    display:block;
}

/* Marker/map vẫn nhận thao tác bình thường trong vùng bản đồ. */
#shipf1-map,
#shipf1-map .maplibregl-canvas-container,
#shipf1-map .maplibregl-canvas{
    pointer-events:auto!important;
}

/* Mobile: vùng 4 chức năng nằm hẳn trên map nhưng không tạo lớp phủ vô hình. */
@media(max-width:640px){
    .home-panel{
        pointer-events:none!important;
    }

    .status-card,
    .quick-panel,
    .quick-action{
        pointer-events:auto!important;
    }

    #shipf1StatusAction{
        cursor:pointer;
    }
}

/* MOBILE FULLSCREEN SHEETS + TOUCH FIX V6 */

/* Quick actions: toàn bộ ô là vùng bấm thật, không chỉ icon/text. */
.quick-panel{
    position:relative;
    isolation:isolate;
}

.quick-action{
    position:relative!important;
    z-index:1;
    width:100%!important;
    height:100%!important;
    min-width:0!important;
    cursor:pointer;
    touch-action:manipulation;
    -webkit-tap-highlight-color:transparent;
}

.quick-action *{
    pointer-events:none!important;
}

.quick-action:active{
    transform:scale(.97);
}

/* Header dùng chung cho các màn chức năng */
.sheet-page-header{
    display:none;
}

.sheet-page-scroll{
    min-height:0;
}

.sheet-page-footer{
    display:none;
}

.sheet-page-spacer{
    width:40px;
    height:40px;
}

.sheet-page-back{
    border:0;
    background:transparent;
}

.sheet-page-back svg{
    fill:none;
    stroke:currentColor;
    stroke-width:2;
    stroke-linecap:round;
    stroke-linejoin:round;
}

.driver-status-intro{
    display:none;
}

.weather-question h2{
    margin:0 0 18px;
}

/* Mobile */
@media(max-width:640px){
    body.sheet-open{
        overflow:hidden!important;
        overscroll-behavior:none;
    }

    /*
      Tất cả popup chức năng thành một màn hình riêng hoàn chỉnh,
      không còn dạng sheet nửa màn hình dễ bị cắt/chồng.
    */
    .bottom-sheet{
        position:fixed!important;
        inset:0!important;
        z-index:1300!important;
        width:100%!important;
        height:100dvh!important;
        max-height:100dvh!important;
        padding:0!important;
        border-radius:0!important;
        display:flex!important;
        flex-direction:column;
        overflow:hidden!important;
        background:#f6f7f8!important;
        transform:translateY(100%)!important;
        transition:transform .22s cubic-bezier(.22,.8,.32,1)!important;
        pointer-events:none!important;
    }

    .bottom-sheet.is-open{
        transform:translateY(0)!important;
        pointer-events:auto!important;
    }

    .sheet-backdrop{
        display:none!important;
    }

    .sheet-handle{
        display:none!important;
    }

    .sheet-page-header{
        flex:0 0 auto;
        min-height:calc(64px + env(safe-area-inset-top));
        padding:calc(10px + env(safe-area-inset-top)) 12px 10px;
        display:grid;
        grid-template-columns:42px minmax(0,1fr) auto;
        align-items:center;
        gap:10px;
        background:#fff;
        border-bottom:1px solid #e9eaec;
        box-shadow:0 1px 0 rgba(0,0,0,.02);
        z-index:4;
    }

    .sheet-page-back{
        width:42px;
        height:42px;
        border-radius:12px;
        display:grid;
        place-items:center;
        color:#1f2225;
        background:#f5f6f7;
        touch-action:manipulation;
    }

    .sheet-page-back svg{
        width:22px;
        height:22px;
    }

    .sheet-page-title{
        min-width:0;
    }

    .sheet-page-title small{
        display:block;
        margin-bottom:2px;
        color:#93989e;
        font-size:9px;
        font-weight:700;
        letter-spacing:.08em;
    }

    .sheet-page-title strong{
        display:block;
        overflow:hidden;
        color:#17191d;
        text-overflow:ellipsis;
        white-space:nowrap;
        font-size:17px;
        line-height:1.2;
        font-weight:700;
        letter-spacing:-.02em;
    }

    .gps-ready-badge{
        min-width:52px!important;
        height:32px!important;
        padding:0 10px!important;
        border-radius:999px!important;
        font-size:10px!important;
    }

    .sheet-page-scroll{
        flex:1 1 auto;
        min-height:0;
        overflow-y:auto;
        overscroll-behavior:contain;
        -webkit-overflow-scrolling:touch;
        padding:16px 14px 24px;
    }

    .sheet-page-footer{
        flex:0 0 auto;
        display:block;
        padding:10px 14px calc(12px + env(safe-area-inset-bottom));
        background:#fff;
        border-top:1px solid #e8e9eb;
        z-index:5;
    }

    /* Cập nhật trạng thái */
    .driver-status-intro{
        display:block;
        margin:0 0 12px;
    }

    .driver-status-intro p{
        margin:0;
        color:#6d7278;
        font-size:13px;
        line-height:1.45;
    }

    .driver-status-sliders{
        gap:10px!important;
        margin-top:0!important;
    }

    .driver-status-control{
        padding:14px 13px 13px!important;
        border-radius:16px!important;
        border:1px solid #e5e7e9!important;
        background:#fff!important;
        box-shadow:0 3px 10px rgba(24,28,32,.035);
    }

    .driver-status-control-head{
        grid-template-columns:44px minmax(0,1fr) auto!important;
        gap:10px!important;
    }

    .service-status-icon{
        width:44px!important;
        height:44px!important;
        border-radius:14px!important;
    }

    .service-status-icon svg{
        width:22px!important;
        height:22px!important;
    }

    .driver-status-service-copy strong{
        font-size:15px!important;
        line-height:1.15;
        font-weight:700!important;
    }

    .driver-status-service-copy small{
        margin-top:3px!important;
        font-size:10px!important;
    }

    .level-badge{
        min-width:78px!important;
        height:32px!important;
        padding:0 10px!important;
        font-size:10px!important;
    }

    .driver-range-wrap{
        margin-top:15px!important;
    }

    .driver-range{
        height:28px!important;
    }

    .driver-range-labels{
        margin-top:4px!important;
    }

    .driver-range-labels span{
        font-size:10px!important;
    }

    .status-location-note{
        margin-top:12px!important;
        padding:12px!important;
        border-radius:14px!important;
        background:#fff!important;
        border:1px solid #e5e7e9!important;
    }

    .status-location-note strong{
        font-size:12px!important;
    }

    .status-location-note small{
        margin-top:2px!important;
        font-size:10px!important;
        line-height:1.35!important;
    }

    .status-save-button{
        width:100%!important;
        min-height:50px!important;
        margin:0!important;
        border-radius:13px!important;
        font-size:13px!important;
        font-weight:700!important;
    }

    /* Xem thêm */
    .more-grid-developing{
        grid-template-columns:1fr 1fr!important;
        gap:10px!important;
    }

    .more-developing-item{
        min-height:148px!important;
        padding:18px 10px!important;
        border-radius:17px!important;
        background:#fff!important;
        border:1px solid #e5e7e9!important;
    }

    .more-developing-icon{
        font-size:32px!important;
    }

    .more-developing-item strong{
        font-size:13px!important;
    }

    .more-developing-item small{
        margin-top:2px!important;
        min-height:24px!important;
        font-size:9px!important;
    }

    /* Thời tiết */
    .weather-question{
        padding:4px 2px 10px;
    }

    .weather-question h2{
        margin:0;
        color:#17191d;
        font-size:21px!important;
        line-height:1.25;
        letter-spacing:-.025em;
    }

    .weather-options{
        grid-template-columns:1fr 1fr!important;
        gap:10px!important;
    }

    .weather-options button{
        min-height:150px!important;
        border:1px solid #e4e6e8!important;
        border-radius:17px!important;
        background:#fff!important;
        gap:10px!important;
        touch-action:manipulation;
    }

    .weather-options button span{
        width:66px!important;
        height:66px!important;
        font-size:31px!important;
    }

    .weather-options button strong{
        font-size:13px!important;
    }

    /* Toàn bộ vùng 4 chức năng trên trang chủ có hit-box bằng đúng 1/4 khung */
    .quick-panel{
        grid-template-columns:repeat(4,minmax(0,1fr))!important;
        gap:2px!important;
        padding:7px 4px 5px!important;
    }

    .quick-action{
        min-height:74px!important;
        padding:4px 1px!important;
        border-radius:12px!important;
    }

    .quick-action:active{
        background:#f5f7f7!important;
    }

    .quick-icon{
        width:44px!important;
        height:44px!important;
        flex:0 0 44px!important;
    }

    .quick-label{
        width:100%;
        min-height:22px!important;
        padding:0 2px;
        font-size:10px!important;
        line-height:1.15!important;
    }
}

@media(max-width:380px){
    .sheet-page-scroll{
        padding-left:11px;
        padding-right:11px;
    }

    .driver-status-control{
        padding-left:11px!important;
        padding-right:11px!important;
    }

    .level-badge{
        min-width:70px!important;
        font-size:9px!important;
    }

    .more-developing-item{
        min-height:132px!important;
    }
}

/* TOUCH TARGET + INNER PAGE NAV FIX V7 */

/*
 * Trên mobile, quick-panel chính nó là vùng tương tác.
 * Mỗi 1/4 chiều ngang tương ứng đúng một chức năng.
 */
@media(max-width:640px){
    .home-panel .quick-panel{
        position:relative!important;
        z-index:60!important;
        display:grid!important;
        grid-template-columns:repeat(4,1fr)!important;
        grid-template-rows:1fr!important;
        width:100%!important;
        height:88px!important;
        min-height:88px!important;
        padding:5px 3px!important;
        gap:0!important;
        pointer-events:auto!important;
        touch-action:manipulation!important;
        overflow:visible!important;
    }

    .home-panel .quick-action{
        position:relative!important;
        inset:auto!important;
        z-index:2!important;
        box-sizing:border-box!important;
        width:100%!important;
        max-width:none!important;
        height:78px!important;
        min-height:78px!important;
        margin:0!important;
        padding:5px 1px 3px!important;
        display:flex!important;
        flex-direction:column!important;
        align-items:center!important;
        justify-content:flex-start!important;
        gap:6px!important;
        border:0!important;
        border-radius:11px!important;
        pointer-events:auto!important;
        touch-action:manipulation!important;
    }

    .home-panel .quick-action::after{
        content:"";
        position:absolute;
        inset:-4px 0;
        z-index:5;
        display:block;
    }

    .home-panel .quick-action .quick-icon,
    .home-panel .quick-action .quick-label{
        position:relative;
        z-index:1;
        pointer-events:none!important;
    }

    .home-panel .quick-action:active{
        background:#f3f7f6!important;
        transform:none!important;
    }

    /*
     * V3 từng ép .bottom-nav thành position:relative cho trang chủ.
     * Quy tắc đó làm hỏng Xem tin và các trang con.
     * Tất cả trang con có bottom-nav phải quay lại fixed full-width.
     */
    .community-page .bottom-nav,
    .create-post-page .bottom-nav,
    .achievement-page .bottom-nav,
    .account-page .bottom-nav,
    .wallet-page .bottom-nav{
        position:fixed!important;
        left:0!important;
        right:0!important;
        bottom:0!important;
        top:auto!important;
        transform:none!important;
        width:100%!important;
        max-width:none!important;
        height:72px!important;
        min-height:72px!important;
        margin:0!important;
        border-radius:0!important;
        border-left:0!important;
        border-right:0!important;
        border-bottom:0!important;
        overflow:visible!important;
        z-index:1000!important;
    }

    .community-page,
    .create-post-page,
    .achievement-page,
    .account-page,
    .wallet-page{
        width:100%!important;
        max-width:100%!important;
        min-height:100dvh!important;
        padding-bottom:calc(82px + env(safe-area-inset-bottom))!important;
        overflow-x:hidden!important;
    }

    /*
     * Xem tin: tránh bất kỳ rule cũ nào làm nội dung/nav lệch ngang.
     */
    .community-page{
        position:relative!important;
    }

    .community-page .community-page-head{
        width:100%!important;
        max-width:none!important;
        margin:0!important;
    }

    .community-page .community-feed{
        box-sizing:border-box!important;
        width:100%!important;
        max-width:680px!important;
        margin:0 auto!important;
    }

    .community-page .community-empty{
        box-sizing:border-box!important;
        width:auto!important;
        max-width:none!important;
        margin-left:12px!important;
        margin-right:12px!important;
    }

    .community-page .bottom-nav a{
        min-width:0!important;
        width:auto!important;
        transform:none!important;
    }
}

@media(max-width:390px){
    .home-panel .quick-panel{
        height:84px!important;
        min-height:84px!important;
    }

    .home-panel .quick-action{
        height:74px!important;
        min-height:74px!important;
    }
}

/* QUICK ACTION HITBOX RESET V8 */

/*
 * Nguyên nhân cũ:
 * - home-panel từng bị pointer-events:none khi nó còn phủ lên map.
 * - Về sau layout đã tách map và panel thành 2 vùng riêng nhưng rule này vẫn còn.
 * - Một số mobile WebView hit-test con bên trong parent pointer-events:none không ổn định.
 *
 * V8 trả toàn bộ khung chức năng về hit-test native.
 */
@media(max-width:640px){
    .home-panel{
        pointer-events:auto!important;
        touch-action:auto!important;
    }

    .home-panel .quick-panel{
        position:relative!important;
        z-index:80!important;
        display:grid!important;
        grid-template-columns:repeat(4,minmax(0,1fr))!important;
        grid-template-rows:92px!important;
        width:100%!important;
        height:92px!important;
        min-height:92px!important;
        padding:0!important;
        gap:0!important;
        overflow:hidden!important;
        pointer-events:auto!important;
        touch-action:auto!important;
        isolation:auto!important;
    }

    .home-panel .quick-action{
        position:relative!important;
        inset:auto!important;
        z-index:1!important;
        box-sizing:border-box!important;
        width:100%!important;
        height:92px!important;
        min-height:92px!important;
        max-width:none!important;
        margin:0!important;
        padding:8px 2px 6px!important;
        border:0!important;
        border-radius:0!important;
        display:flex!important;
        flex-direction:column!important;
        align-items:center!important;
        justify-content:center!important;
        gap:7px!important;
        background:transparent!important;
        color:var(--text)!important;
        pointer-events:auto!important;
        touch-action:manipulation!important;
        -webkit-tap-highlight-color:rgba(13,107,76,.08);
        -webkit-touch-callout:none;
        user-select:none;
        cursor:pointer;
    }

    /*
     * Xóa pseudo hit-layer cũ. Chính button là hit-box duy nhất.
     */
    .home-panel .quick-action::before,
    .home-panel .quick-action::after{
        content:none!important;
        display:none!important;
        pointer-events:none!important;
    }

    .home-panel .quick-action > *{
        pointer-events:none!important;
    }

    .home-panel .quick-action:active{
        background:#f0f7f5!important;
        transform:none!important;
    }

    .home-panel .quick-icon{
        width:46px!important;
        height:46px!important;
        flex:0 0 46px!important;
        margin:0!important;
    }

    .home-panel .quick-label,
    .home-panel .quick-action > span:last-child{
        width:100%!important;
        min-height:24px!important;
        margin:0!important;
        padding:0 2px!important;
        display:flex!important;
        align-items:flex-start!important;
        justify-content:center!important;
        color:#202123!important;
        text-align:center!important;
        font-size:10px!important;
        line-height:1.18!important;
    }

    /*
     * Bảo đảm status-card không vô tình kéo một lớp phủ xuống quick-panel.
     */
    .home-panel .status-card{
        position:relative!important;
        z-index:1!important;
        pointer-events:auto!important;
    }

    .home-panel .quick-panel{
        margin-top:0!important;
    }
}

@media(max-width:390px){
    .home-panel .quick-panel{
        grid-template-rows:88px!important;
        height:88px!important;
        min-height:88px!important;
    }

    .home-panel .quick-action{
        height:88px!important;
        min-height:88px!important;
    }

    .home-panel .quick-icon{
        width:43px!important;
        height:43px!important;
        flex-basis:43px!important;
    }
}

/* PWA INVISIBLE OVERLAY FIX V9 */

/*
 * ROOT CAUSE:
 * .shipf1-install-prompt có position:fixed + z-index:1200 + display:grid.
 * Khi opacity=0/hidden, nó vẫn có thể giữ một vùng hit-test ngay phía trên
 * bottom nav trên một số mobile browser/WebView.
 *
 * Vùng đó trùng đúng phần dưới của quick-panel, nên người dùng chỉ bấm
 * được sát phía trên của các ô chức năng.
 */

/* Khi ẩn: loại hoàn toàn khỏi layout/hit-test. */
.shipf1-install-prompt[hidden],
.shipf1-install-guide[hidden],
.shipf1-install-guide-backdrop[hidden]{
    display:none!important;
    visibility:hidden!important;
    pointer-events:none!important;
}

/* Trạng thái mặc định chưa show: không được chặn touch/click. */
.shipf1-install-prompt,
.shipf1-install-guide,
.shipf1-install-guide-backdrop{
    pointer-events:none!important;
}

/* Chỉ khi thật sự visible mới nhận thao tác. */
.shipf1-install-prompt.show,
.shipf1-install-guide.show,
.shipf1-install-guide-backdrop.show{
    visibility:visible!important;
    pointer-events:auto!important;
}

/*
 * Trên mobile đưa lời mời cài app lên phía trên.
 * Không còn nằm đè lên 4 chức năng chính ở đáy màn hình.
 */
@media(max-width:640px){
    .shipf1-install-prompt{
        top:calc(12px + env(safe-area-inset-top))!important;
        bottom:auto!important;
    }

    .shipf1-install-prompt:not(.show){
        pointer-events:none!important;
    }

    /*
     * Chốt lại layer cho khung chức năng.
     * Không có overlay vô hình nào được phép chặn nó.
     */
    .home-panel{
        position:relative!important;
        z-index:100!important;
        pointer-events:auto!important;
    }

    .home-panel .quick-panel{
        position:relative!important;
        z-index:101!important;
        pointer-events:auto!important;
    }

    .home-panel .quick-action{
        position:relative!important;
        z-index:102!important;
        pointer-events:auto!important;
    }
}

