/* ==========================================================================
   shell.css — 9:19.5 手机等比测试壳 + 深灰圆形按钮弹簧动效 + 顶部成功失败提示栏
   ========================================================================== */

.desktop-stage {
    width: 100vw;
    height: 100dvh;
    background:
        radial-gradient(circle at 22% 18%, rgba(255, 255, 255, 0.88), transparent 55%),
        radial-gradient(circle at 80% 82%, rgba(210, 214, 222, 0.36), transparent 60%),
        var(--c-stage-outer);
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 24px;
    padding: 16px 24px;
    position: relative;
    overflow: hidden;
}

.phone-scale-anchor {
    width: 413px;
    height: 872px;
    display: flex;
    align-items: center;
    justify-content: center;
    transform-origin: center center;
    will-change: transform;
}

.phone-shell {
    width: 413px;
    height: 872px;
    padding: 10px;
    border-radius: 50px;
    background: linear-gradient(145deg, #2D2E34 0%, #17181C 52%, #26272D 100%);
    box-shadow:
        0 34px 72px -18px rgba(18, 20, 28, 0.38),
        0 14px 32px -10px rgba(18, 20, 28, 0.22),
        inset 0 1px 1px rgba(255, 255, 255, 0.22);
    position: relative;
}

.phone-shell::before {
    content: '';
    position: absolute;
    right: -3px;
    top: 196px;
    width: 3px;
    height: 76px;
    border-radius: 0 3px 3px 0;
    background: #3A3B42;
}

.phone-viewport {
    width: 393px;
    height: 852px;
    border-radius: 40px;
    background: var(--c-screen);
    position: relative;
    overflow: hidden;
    display: flex;
    flex-direction: column;
    contain: layout style;
}

/* 手机顶部状态栏 */
.status-bar {
    height: 34px;
    padding: 8px 24px 0;
    display: flex;
    align-items: center;
    justify-content: space-between;
    flex-shrink: 0;
    position: relative;
    z-index: 25;
    pointer-events: none;
}

.status-time {
    font-family: var(--font-editorial);
    font-size: 15px;
    font-weight: 650;
    color: var(--c-ink-1);
}

.status-notch-pill {
    width: 78px;
    height: 20px;
    border-radius: 999px;
    background: #141519;
    position: relative;
}

.status-notch-pill::after {
    content: '';
    position: absolute;
    right: 12px;
    top: 50%;
    transform: translateY(-50%);
    width: 7px;
    height: 7px;
    border-radius: 50%;
    background: radial-gradient(circle at 35% 35%, #3E4D6B, #0E121B);
}

.status-icons {
    display: flex;
    align-items: center;
    gap: 6px;
    color: var(--c-ink-1);
}

.stage-spec-badge {
    position: fixed;
    right: 20px;
    bottom: 16px;
    padding: 6px 14px;
    border-radius: 999px;
    background: rgba(249, 249, 247, 0.94);
    border: 1px solid rgba(46, 49, 56, 0.12);
    box-shadow: 0 8px 20px -8px rgba(18, 22, 33, 0.16);
    font-size: 13.5px;
    font-weight: 560;
    color: var(--c-ink-2);
    pointer-events: none;
}

@media (max-width: 900px), (hover: none) and (pointer: coarse) {
    .desktop-stage {
        background: var(--c-screen);
        padding: 0;
        gap: 0;
    }

    .desktop-walk-workbench {
        display: none !important;
    }

    .phone-scale-anchor {
        width: 100vw !important;
        height: 100dvh !important;
        transform: none !important;
    }

    .phone-shell {
        width: 100% !important;
        height: 100% !important;
        padding: 0 !important;
        border-radius: 0 !important;
        background: var(--c-screen) !important;
        box-shadow: none !important;
        transform: none !important;
    }

    .phone-shell::before,
    .stage-spec-badge,
    .status-bar,
    .status-notch-pill {
        display: none !important;
    }

    .phone-viewport {
        width: 100% !important;
        height: 100% !important;
        border-radius: 0 !important;
        padding-top: env(safe-area-inset-top);
        padding-bottom: env(safe-area-inset-bottom);
    }
}

/* ==========================================================================
   浅灰底 + 深灰定制图案圆形按钮（苹果毛玻璃按压光晕 + 弹簧阻尼）
   ========================================================================== */
.orb-circle-btn {
    width: 60px;
    height: 60px;
    border-radius: 50%;
    background: linear-gradient(180deg, var(--c-btn-top) 0%, var(--c-btn-bottom) 100%);
    border: 1px solid rgba(46, 49, 56, 0.16);
    box-shadow: var(--shadow-circle-btn);
    display: inline-flex;
    align-items: center;
    justify-content: center;
    position: relative;
    transition:
        transform 0.42s var(--ease-spring),
        box-shadow 0.35s var(--ease-spring),
        background 0.25s ease;
}

.orb-circle-btn::before {
    content: '';
    position: absolute;
    inset: -5px;
    border-radius: 50%;
    background: radial-gradient(circle, rgba(46, 49, 56, 0.14) 0%, rgba(255, 255, 255, 0) 70%);
    opacity: 0;
    transform: scale(0.84);
    transition:
        opacity 0.28s var(--ease-spring),
        transform 0.38s var(--ease-spring);
    pointer-events: none;
}

.orb-circle-btn::after {
    content: '';
    position: absolute;
    inset: 3px;
    border-radius: 50%;
    border: 1px solid rgba(255, 255, 255, 0.85);
    pointer-events: none;
}

.orb-circle-btn:active {
    transform: scale(0.90);
    background: #EAECF0;
}

.orb-circle-btn:active::before {
    opacity: 1;
    transform: scale(1.06);
}

.orb-circle-btn svg {
    width: 28px;
    height: 28px;
    display: block;
    transition: transform 0.38s var(--ease-bounce), opacity 0.22s ease;
}

.orb-circle-btn.is-morphing svg {
    transform: scale(0.72) rotate(-14deg);
    opacity: 0.35;
}

/* ==========================================================================
   顶部滑落通知横幅（用于登录成功/失败、转发成功/失败与轻量状态提示）
   ========================================================================== */
.top-notice-banner {
    position: absolute;
    left: 50%;
    top: 44px;
    transform: translate(-50%, -26px) scale(0.92);
    min-width: 176px;
    max-width: 320px;
    padding: 12px 24px;
    border-radius: 999px;
    background: #FAF9F7;
    border: 1px solid rgba(46, 49, 56, 0.18);
    box-shadow:
        0 20px 38px -10px rgba(18, 22, 33, 0.25),
        0 6px 14px -4px rgba(46, 49, 56, 0.12);
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    font-size: 19px;
    font-weight: 680;
    color: var(--c-ink-1);
    white-space: nowrap;
    opacity: 0;
    pointer-events: none;
    z-index: 120;
    transition:
        opacity 0.28s var(--ease-spring),
        transform 0.4s var(--ease-spring);
}

.top-notice-banner.is-visible {
    opacity: 1;
    transform: translate(-50%, 0) scale(1);
}

.top-notice-banner:empty {
    display: none;
}

.top-notice-dot {
    width: 10px;
    height: 10px;
    border-radius: 50%;
    background: var(--c-accent-solid);
    flex-shrink: 0;
}

.top-notice-banner.is-success .top-notice-dot {
    background: var(--c-success);
}

.top-notice-banner.is-error .top-notice-dot {
    background: var(--c-danger);
}


/* ==========================================================================
   桌面宽屏专属：左图右机 · 第一人称真步走实测工作台（窄屏/手机自动完全隐藏）
   ========================================================================== */
.desktop-walk-workbench {
    flex: 1 1 auto;
    min-width: 520px;
    max-width: 880px;
    height: min(872px, calc(100dvh - 32px));
    padding: 14px 16px;
    border-radius: 22px;
    background: #FCFBF9;
    border: 1px solid rgba(46, 49, 56, 0.14);
    box-shadow: 0 24px 52px -20px rgba(18, 22, 33, 0.2);
    display: flex;
    flex-direction: column;
    gap: 10px;
    min-height: 0;
    z-index: 20;
}

.wb-header-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
    flex-shrink: 0;
}

.wb-title-group {
    display: flex;
    align-items: center;
    gap: 10px;
    min-width: 0;
}

.wb-title {
    font-size: 17px;
    font-weight: 700;
    color: var(--c-ink-1);
    letter-spacing: 0.03em;
    white-space: nowrap;
}

.wb-header-actions {
    display: flex;
    align-items: center;
    gap: 8px;
}

.wb-toolbar-row {
    display: flex;
    align-items: center;
    gap: 8px;
    flex-wrap: wrap;
    flex-shrink: 0;
}

.sim-search-row {
    display: flex;
    gap: 6px;
    flex: 1 1 220px;
    min-width: 190px;
}

.sim-search-input {
    flex: 1;
    min-width: 0;
    padding: 7px 11px;
    border-radius: 8px;
    background: #FFFFFF;
    border: 1px solid rgba(46, 49, 56, 0.2);
    font-size: 13px;
    color: var(--c-ink-1);
    outline: none;
}

.sim-search-input:focus {
    border-color: #262930;
}

.sim-dest-strip {
    display: flex;
    align-items: center;
    gap: 6px;
    flex-wrap: wrap;
}

.sim-stage-btn {
    padding: 6px 10px;
    border-radius: 8px;
    background: #F2F3F6;
    border: 1px solid rgba(46, 49, 56, 0.14);
    text-align: center;
    font-size: 12.5px;
    font-weight: 650;
    color: var(--c-ink-1);
    white-space: nowrap;
    transition: background 0.16s ease, transform 0.16s ease, border-color 0.16s ease;
}

.sim-stage-btn:hover {
    background: #E6E9EF;
}

.sim-stage-btn:active {
    transform: scale(0.97);
}

.sim-stage-btn.is-active {
    background: #262930;
    border-color: #262930;
    color: #FAF9F7;
}

.sim-stage-btn.is-green {
    background: rgba(43, 126, 82, 0.12);
    border-color: rgba(43, 126, 82, 0.42);
    color: #1F6840;
}

.sim-stage-btn.is-green.is-active {
    background: #2B7E52;
    border-color: #2B7E52;
    color: #FAF9F7;
}

.wb-map-stage {
    flex: 1 1 auto;
    min-height: 280px;
    border-radius: 16px;
    border: 1px solid rgba(46, 49, 56, 0.16);
    overflow: hidden;
    position: relative;
    background: #F4F5F7;
}

.wb-map-stage .real-map-container {
    width: 100%;
    height: 100%;
    cursor: grab;
}

.wb-map-stage.is-map-pick .real-map-container,
.wb-map-stage.is-map-pick .leaflet-container {
    cursor: crosshair !important;
}

.wb-map-float-right {
    position: absolute;
    right: 10px;
    top: 10px;
    z-index: 420;
    display: flex;
    flex-direction: column;
    gap: 6px;
}

.wb-map-tool-btn {
    width: 34px;
    height: 34px;
    border-radius: 10px;
    background: rgba(252, 251, 249, 0.95);
    border: 1px solid rgba(46, 49, 56, 0.18);
    box-shadow: 0 4px 10px rgba(18, 22, 33, 0.12);
    font-size: 16px;
    font-weight: 700;
    color: var(--c-ink-1);
    display: inline-flex;
    align-items: center;
    justify-content: center;
}

.wb-map-tool-btn.is-active {
    background: #262930;
    color: #FAF9F7;
    border-color: #262930;
}

.wb-bottom-deck {
    display: grid;
    grid-template-columns: 278px 1fr;
    gap: 12px;
    flex-shrink: 0;
    align-items: stretch;
}

.wb-walk-pad-card {
    padding: 10px 12px;
    border-radius: 14px;
    background: #F4F5F7;
    border: 1px solid rgba(46, 49, 56, 0.12);
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.wb-wasd-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 6px;
}

.wb-key-btn {
    padding: 8px 6px;
    border-radius: 10px;
    background: #FFFFFF;
    border: 1px solid rgba(46, 49, 56, 0.2);
    box-shadow: 0 2px 0 rgba(46, 49, 56, 0.14);
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 1px;
    user-select: none;
    transition: transform 0.08s ease, background 0.1s ease, color 0.1s ease;
}

.wb-key-btn .k-cap {
    font-size: 14px;
    font-weight: 760;
    color: var(--c-ink-1);
    line-height: 1.1;
}

.wb-key-btn .k-sub {
    font-size: 11px;
    font-weight: 600;
    color: var(--c-ink-3);
    line-height: 1.1;
}

.wb-key-btn.is-pressed,
.wb-key-btn:active {
    transform: translateY(1.5px);
    background: #262930;
    border-color: #262930;
    box-shadow: none;
}

.wb-key-btn.is-pressed .k-cap,
.wb-key-btn.is-pressed .k-sub,
.wb-key-btn:active .k-cap,
.wb-key-btn:active .k-sub {
    color: #FAF9F7;
}

.wb-key-spacer {
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 11px;
    font-weight: 650;
    color: var(--c-ink-3);
    text-align: center;
    line-height: 1.25;
}

.wb-speed-row {
    display: flex;
    align-items: center;
    gap: 5px;
}

.wb-speed-row .sim-stage-btn {
    flex: 1;
    padding: 5px 4px;
    font-size: 11.5px;
}

.wb-action-row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 6px;
}

.wb-telemetry-card {
    padding: 10px 12px;
    border-radius: 14px;
    background: #F4F5F7;
    border: 1px solid rgba(46, 49, 56, 0.12);
    display: flex;
    flex-direction: column;
    gap: 7px;
    min-width: 0;
}

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

.wb-progress-line {
    font-size: 12px;
    font-weight: 680;
    color: var(--c-ink-2);
}

.sim-dock-log {
    flex: 1;
    padding: 8px 10px;
    border-radius: 9px;
    background: #FFFFFF;
    border: 1px solid rgba(46, 49, 56, 0.11);
    font-size: 12.5px;
    color: var(--c-ink-2);
    line-height: 1.56;
    white-space: pre-line;
    max-height: 152px;
    overflow-y: auto;
}

.sim-dock-outline-link {
    padding: 6px 11px;
    border-radius: 8px;
    background: #F4F5F7;
    border: 1px solid rgba(46, 49, 56, 0.22);
    color: var(--c-ink-1);
    text-align: center;
    font-size: 12.5px;
    font-weight: 660;
    text-decoration: none;
    white-space: nowrap;
}

.sim-dock-outline-link:hover {
    background: #E6E9EF;
}

/* 桌面端公网手机扫码浮层卡片 */
.wb-qr-popover {
    position: absolute;
    right: 12px;
    top: 12px;
    width: 340px;
    padding: 14px 14px;
    border-radius: 16px;
    background: rgba(252, 251, 249, 0.98);
    border: 1px solid rgba(46, 49, 56, 0.2);
    box-shadow: 0 18px 40px -12px rgba(18, 22, 33, 0.28);
    z-index: 460;
    display: none;
    flex-direction: column;
    gap: 10px;
}

.wb-qr-popover.is-open {
    display: flex;
}

.wb-qr-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 8px;
}

.wb-qr-title {
    font-size: 13.5px;
    font-weight: 700;
    color: var(--c-ink-1);
}

.wb-qr-body {
    display: flex;
    align-items: flex-start;
    gap: 12px;
}

.wb-qr-img {
    width: 126px;
    height: 126px;
    border-radius: 10px;
    border: 1px solid rgba(46, 49, 56, 0.14);
    background: #F9F9F7;
    flex-shrink: 0;
    object-fit: contain;
}

.wb-qr-info {
    flex: 1;
    min-width: 0;
    display: flex;
    flex-direction: column;
    gap: 6px;
}

.wb-qr-status {
    font-size: 12px;
    font-weight: 700;
    color: #1F6840;
}

.wb-qr-link {
    font-size: 12.5px;
    font-weight: 700;
    color: #1E2025;
    word-break: break-all;
    text-decoration: underline;
}

.wb-qr-tip {
    font-size: 11.5px;
    color: var(--c-ink-3);
    line-height: 1.48;
}

@media (max-width: 1020px) {
    .desktop-stage {
        padding: 0;
        gap: 0;
    }

    .desktop-walk-workbench {
        display: none;
    }
}
