/* ==========================================================================
   home.css — v11 极简适老器物仪表盘界面
   布局（393 × 852）：
     - 顶栏：左上极简设置齿轮 + 居中出行方式图标胶囊（步行/公交/骑车）
     - 主体：三格 Bento 导航看板（左 8 向罗盘双折面箭头 / 右上需要步数 / 右下双行目的地：下一步 + 总目的地）
     - 中腰：左「地图」与右「呼唤」并排圆角方卡
     - 底部：居中水墨禅晕白瓷语音球（按住说话动态声浪，松手更新看板与语音播报）
     - 弹窗：年轻人 4 项紧凑设置卡 & 语言选择卡（已彻底移除历史消息面板）
   ========================================================================== */

.view-root {
    flex: 1;
    position: relative;
    overflow: hidden;
    background: var(--c-screen);
}

.home-screen {
    position: absolute;
    inset: 0;
    display: flex;
    flex-direction: column;
    background: var(--c-screen);
    touch-action: none;
    transition:
        transform 0.45s var(--ease-spring),
        opacity 0.35s ease;
}

.home-screen.is-backgrounded {
    transform: scale(0.96);
    opacity: 0.42;
    pointer-events: none;
}

/* ==========================================================================
   顶栏：左上精致齿轮 + 居中出行状态胶囊
   ========================================================================== */
.home-top-bar {
    height: 74px;
    padding: 6px 20px 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    position: relative;
    flex-shrink: 0;
}

.top-gear-btn {
    position: absolute;
    left: 16px;
    top: 8px;
    width: 32px;
    height: 32px;
    border-radius: 50%;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    z-index: 12;
    transition: transform 0.28s var(--ease-spring), opacity 0.2s ease;
}

.top-gear-btn::after {
    content: '';
    position: absolute;
    inset: -10px;
}

.top-gear-btn:active {
    transform: scale(0.88) rotate(28deg);
}

.top-gear-btn svg {
    width: 18px;
    height: 18px;
    display: block;
    stroke: #8E939E;
    transition: stroke 0.2s ease;
}

.top-gear-btn svg circle[fill] {
    fill: rgba(142, 147, 158, 0.16);
}

.top-gear-btn:hover svg,
.top-gear-btn:active svg {
    stroke: var(--c-accent);
}

.mode-capsule-card {
    width: 242px;
    height: 54px;
    border-radius: 18px;
    background: linear-gradient(180deg, #FAF9F7 0%, #F1F2F6 100%);
    border: 1px solid rgba(46, 49, 56, 0.11);
    box-shadow:
        0 10px 22px -12px rgba(18, 22, 33, 0.14),
        inset 0 1px 0 rgba(252, 251, 249, 0.96);
    display: flex;
    align-items: center;
    justify-content: center;
    pointer-events: none;
}

.mode-capsule-icon {
    display: inline-flex;
    align-items: center;
    justify-content: center;
}

.mode-capsule-icon svg {
    width: 30px;
    height: 30px;
    display: block;
}

/* 右上真机 GPS 定位状态芯片（轻触重定位 / 解锁语音） */
.top-gps-chip {
    position: absolute;
    right: 16px;
    top: 16px;
    height: 30px;
    padding: 0 10px;
    border-radius: 999px;
    background: rgba(46, 49, 56, 0.06);
    border: 1px solid rgba(46, 49, 56, 0.13);
    display: inline-flex;
    align-items: center;
    gap: 5px;
    font-size: 12px;
    font-weight: 660;
    color: var(--c-ink-2);
    z-index: 12;
}

.top-gps-chip:active {
    transform: scale(0.95);
}

.gps-dot {
    width: 7px;
    height: 7px;
    border-radius: 50%;
    background: #9BA0AA;
    flex-shrink: 0;
}

.top-gps-chip.is-locked .gps-dot {
    background: #24784B;
}

.top-gps-chip.is-searching .gps-dot {
    background: #C48A2A;
}

.top-gps-chip.is-error .gps-dot {
    background: #B33A2E;
}

/* ==========================================================================
   核心三格导航 Bento 看板
   ========================================================================== */
.bento-nav-card {
    margin: 2px 20px 0;
    height: 316px;
    border-radius: 24px;
    background: linear-gradient(180deg, #FBFBF9 0%, #F3F4F7 100%);
    border: 1px solid rgba(46, 49, 56, 0.11);
    box-shadow:
        0 14px 30px -14px rgba(18, 22, 33, 0.14),
        inset 0 1px 0 rgba(252, 251, 249, 0.96);
    display: grid;
    grid-template-columns: 1.04fr 0.96fr;
    grid-template-rows: 0.84fr 1.16fr;
    overflow: hidden;
    cursor: pointer;
    flex-shrink: 0;
    contain: layout style paint;
    transition: transform 0.28s var(--ease-spring), background 0.2s ease;
}

.bento-nav-card:active {
    transform: scale(0.986);
    background: #EFF1F5;
}

/* 左半格：8 向罗盘点阵 + 双折面立体箭头 + 极简相对方向文字 */
.bento-compass-cell {
    grid-column: 1;
    grid-row: 1 / 3;
    border-right: 1px solid rgba(46, 49, 56, 0.08);
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 12px 10px 10px;
}

.compass-dial-svg {
    width: 136px;
    height: 136px;
    display: block;
    overflow: visible;
}

.compass-dir-caption {
    font-size: 21px;
    font-weight: 700;
    color: var(--c-ink-1);
    letter-spacing: 0.08em;
    line-height: 1.15;
    padding: 4px 14px;
    border-radius: 999px;
    background: rgba(46, 49, 56, 0.06);
    border: 1px solid rgba(46, 49, 56, 0.09);
}

.compass-dir-caption.is-turn {
    background: rgba(43, 126, 82, 0.12);
    border-color: rgba(43, 126, 82, 0.34);
    color: #1F6840;
}

.compass-dir-caption.is-back {
    background: rgba(179, 58, 46, 0.12);
    border-color: rgba(179, 58, 46, 0.34);
    color: #9A2B20;
}

.compass-dot {
    fill: rgba(46, 49, 56, 0.22);
    transition: fill 0.35s ease, r 0.35s var(--ease-spring);
}

.compass-dot.is-active {
    fill: #2E3138;
}

.compass-arrow-group {
    transform-box: view-box;
    transform-origin: 70px 70px;
    transition: transform 0.52s var(--ease-spring);
}

/* 右上格：需要步数 */
.bento-steps-cell {
    grid-column: 2;
    grid-row: 1;
    border-bottom: 1px solid rgba(46, 49, 56, 0.08);
    padding: 12px 12px;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 5px;
    text-align: center;
    min-width: 0;
}

.bento-label {
    font-size: 15px;
    font-weight: 620;
    color: var(--c-ink-3);
    letter-spacing: 0.06em;
}

.bento-steps-val {
    display: flex;
    align-items: baseline;
    justify-content: center;
    gap: 5px;
    line-height: 1;
}

.bento-steps-num {
    font-family: var(--font-editorial);
    font-size: 40px;
    font-weight: 700;
    color: var(--c-ink-1);
    letter-spacing: 0.01em;
}

.bento-steps-unit {
    font-family: var(--font-editorial);
    font-size: 25px;
    font-weight: 700;
    color: var(--c-ink-1);
}

/* 右下格：第一行下一步地标 + 第二行总目的地 */
.bento-dest-cell {
    grid-column: 2;
    grid-row: 2;
    padding: 10px 12px;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 7px;
    text-align: center;
    min-width: 0;
    overflow: hidden;
}

.dest-tier {
    width: 100%;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 2px;
    min-width: 0;
}

.dest-micro-label {
    font-size: 13px;
    font-weight: 600;
    color: var(--c-ink-3);
    letter-spacing: 0.06em;
    line-height: 1.15;
}

.dest-next-title {
    width: 100%;
    font-size: 20.5px;
    font-weight: 700;
    line-height: 1.24;
    color: var(--c-ink-1);
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
    word-break: break-word;
}

.dest-tier-divider {
    width: 64%;
    height: 1px;
    background: rgba(46, 49, 56, 0.09);
    flex-shrink: 0;
}

.dest-total-title {
    width: 100%;
    font-size: 17.5px;
    font-weight: 640;
    line-height: 1.24;
    color: var(--c-ink-2);
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
    word-break: break-word;
}

/* ==========================================================================
   中部双并排圆角方卡：「地图」与「呼唤」
   ========================================================================== */
.dual-action-grid {
    margin: 14px 20px 0;
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 14px;
    flex-shrink: 0;
}

.square-action-card {
    height: 132px;
    border-radius: 22px;
    background: linear-gradient(180deg, #FBFBF9 0%, #F0F2F6 100%);
    border: 1px solid rgba(46, 49, 56, 0.11);
    box-shadow:
        0 12px 24px -12px rgba(18, 22, 33, 0.14),
        inset 0 1px 0 rgba(252, 251, 249, 0.96);
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 10px;
    position: relative;
    transition: transform 0.28s var(--ease-spring), background 0.2s ease;
}

.square-action-card::after {
    content: '';
    position: absolute;
    inset: -4px;
}

.square-action-card:active {
    transform: scale(0.965);
    background: #E8EBF1;
}

.square-card-icon {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    pointer-events: none;
}

.square-card-icon svg {
    width: 34px;
    height: 34px;
    display: block;
}

.square-card-label {
    font-size: 24px;
    font-weight: 700;
    color: var(--c-ink-1);
    letter-spacing: 0.08em;
    line-height: 1.1;
    pointer-events: none;
}

/* ==========================================================================
   底部居中：水墨禅晕白瓷语音球交互舞台
   ========================================================================== */
.orb-voice-stage {
    flex: 1;
    min-height: 0;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 2px;
    padding: 4px 0 14px;
    position: relative;
    cursor: pointer;
    touch-action: none;
    user-select: none;
    -webkit-user-select: none;
    -webkit-touch-callout: none;
}

.voice-orb-canvas {
    width: 232px;
    height: 232px;
    display: block;
    pointer-events: none;
    -webkit-touch-callout: none;
}

.orb-hold-caption {
    font-size: 16px;
    font-weight: 680;
    color: var(--c-ink-3);
    letter-spacing: 0.08em;
    pointer-events: none;
}

.orb-voice-stage.is-holding .orb-hold-caption {
    color: var(--c-ink-1);
}

/* 手机端地图子页内直搜栏 */
.phone-dest-search-row {
    margin-top: 8px;
    display: flex;
    gap: 8px;
}

.phone-dest-input {
    flex: 1;
    min-width: 0;
    padding: 9px 12px;
    border-radius: 12px;
    background: #FFFFFF;
    border: 1px solid rgba(46, 49, 56, 0.18);
    font-size: 16px;
    color: var(--c-ink-1);
    outline: none;
}

.phone-dest-input:focus {
    border-color: #262930;
}

.phone-dest-go-btn {
    padding: 0 16px;
    border-radius: 12px;
    background: #262930;
    color: #FAF9F7;
    font-size: 16px;
    font-weight: 700;
    flex-shrink: 0;
}

/* 真手机首次启动轻触解锁卡（解锁 GPS / 电子罗盘 / 晓晓语音自动播放 / 防息屏） */
.mobile-start-gate {
    position: absolute;
    inset: 0;
    z-index: 90;
    background: rgba(249, 249, 247, 0.96);
    display: none;
    align-items: center;
    justify-content: center;
    padding: 24px 20px;
}

.mobile-start-gate.is-open {
    display: flex;
}

.start-gate-card {
    width: 100%;
    max-width: 340px;
    padding: 28px 22px 24px;
    border-radius: 26px;
    background: #FCFBF9;
    border: 1px solid rgba(46, 49, 56, 0.14);
    box-shadow: 0 22px 44px -16px rgba(18, 22, 33, 0.22);
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
    gap: 14px;
}

.start-gate-icon {
    width: 82px;
    height: 82px;
    border-radius: 20px;
    box-shadow: 0 8px 20px -8px rgba(18, 22, 33, 0.22);
}

.start-gate-title {
    margin: 0;
    font-size: 26px;
    font-weight: 700;
    color: var(--c-ink-1);
    letter-spacing: 0.04em;
}

.start-gate-desc {
    margin: 0;
    font-size: 16.5px;
    line-height: 1.56;
    color: var(--c-ink-2);
}

.start-gate-primary {
    width: 100%;
    padding: 16px 14px;
    border-radius: 18px;
    background: linear-gradient(180deg, #3D414B 0%, #202329 100%);
    color: #FAF9F7;
    font-size: 19px;
    font-weight: 700;
    letter-spacing: 0.03em;
    box-shadow: 0 14px 26px -10px rgba(24, 26, 32, 0.36);
}

.start-gate-primary:active {
    transform: scale(0.97);
}

.start-gate-secondary {
    padding: 8px 14px;
    font-size: 15px;
    font-weight: 600;
    color: var(--c-ink-3);
}

/* ==========================================================================
   浮层弹框通用 + 年轻人紧凑设置/语言卡片
   ========================================================================== */
.overlay-backdrop {
    position: absolute;
    inset: 0;
    background: rgba(20, 22, 28, 0.28);
    z-index: 50;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 40px 14px 20px;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.26s var(--ease-spring);
}

.overlay-backdrop.is-open {
    opacity: 1;
    pointer-events: auto;
}

.frosted-modal-card {
    width: 100%;
    border-radius: 26px;
    padding: 18px 16px;
    background: #FAF9F7;
    border: 1px solid rgba(46, 49, 56, 0.14);
    box-shadow: var(--shadow-float-down);
    transform: translateY(18px) scale(0.95);
    transition: transform 0.38s var(--ease-spring);
    display: flex;
    flex-direction: column;
    max-height: 770px;
}

.overlay-backdrop.is-open .frosted-modal-card {
    transform: translateY(0) scale(1);
}

.modal-head-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 14px;
    flex-shrink: 0;
}

.modal-head-title {
    font-size: 21px;
    font-weight: 680;
    color: var(--c-ink-1);
    letter-spacing: 0.04em;
}

.circle-close-btn {
    width: 44px;
    height: 44px;
    border-radius: 50%;
    background: var(--c-btn-flat);
    border: 1px solid rgba(46, 49, 56, 0.16);
    box-shadow: 0 6px 14px -4px rgba(18, 22, 33, 0.16);
    display: inline-flex;
    align-items: center;
    justify-content: center;
    position: relative;
    transition: transform 0.32s var(--ease-spring), background 0.2s ease;
}

.circle-close-btn::after {
    content: '';
    position: absolute;
    inset: -8px;
}

.circle-close-btn:active {
    transform: scale(0.88);
    background: #E4E6EB;
}

.circle-close-btn svg {
    width: 22px;
    height: 22px;
}

/* 年轻人紧凑设置与语言卡片 */
.dialect-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 10px;
}

.dialect-item-btn {
    padding: 13px 12px;
    border-radius: 16px;
    background: #F2F3F6;
    border: 1px solid rgba(46, 49, 56, 0.12);
    box-shadow: 0 6px 14px -6px rgba(18, 22, 33, 0.10);
    display: flex;
    align-items: center;
    justify-content: space-between;
    transition: transform 0.3s var(--ease-spring), border-color 0.2s ease, background 0.2s ease;
}

.dialect-item-btn:active {
    transform: scale(0.95);
}

.dialect-item-btn.is-active {
    background: rgba(53, 56, 64, 0.09);
    border-color: var(--c-accent-solid);
}

.dialect-name {
    font-size: 18px;
    font-weight: 660;
    color: var(--c-ink-1);
}

.dialect-check-dot {
    width: 22px;
    height: 22px;
    border-radius: 50%;
    border: 1.5px solid rgba(46, 49, 56, 0.28);
    display: inline-flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}

.dialect-item-btn.is-active .dialect-check-dot {
    background: var(--c-accent-solid);
    border-color: var(--c-accent-solid);
}

.dialect-import-btn {
    margin-top: 12px;
    width: 100%;
    padding: 13px 16px;
    border-radius: 16px;
    background: linear-gradient(180deg, #40444E 0%, #262930 100%);
    color: #FAF9F7;
    font-size: 17px;
    font-weight: 660;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    box-shadow: 0 10px 20px -8px rgba(30, 32, 37, 0.3);
}

.dialect-import-btn svg {
    width: 19px;
    height: 19px;
}

.settings-option-list {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.settings-option-btn {
    width: 100%;
    padding: 13px 14px;
    border-radius: 16px;
    background: #F2F3F6;
    border: 1px solid rgba(46, 49, 56, 0.13);
    box-shadow: 0 8px 16px -8px rgba(18, 22, 33, 0.12);
    display: flex;
    align-items: center;
    gap: 12px;
    text-align: left;
    transition: transform 0.3s var(--ease-spring), background 0.2s ease;
}

.settings-option-btn:active {
    transform: scale(0.96);
    background: #E6E8EE;
}

.settings-icon-badge {
    width: 38px;
    height: 38px;
    border-radius: 50%;
    background: var(--c-screen);
    border: 1px solid rgba(46, 49, 56, 0.16);
    display: inline-flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}

.settings-icon-badge svg {
    width: 19px;
    height: 19px;
}

.settings-opt-title {
    flex: 1;
    font-size: 18px;
    font-weight: 660;
    color: var(--c-ink-1);
}

.settings-opt-meta {
    font-size: 14px;
    font-weight: 560;
    color: var(--c-ink-3);
}

.settings-arrow-tail {
    width: 18px;
    height: 18px;
    opacity: 0.72;
}
