* {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
    font-family: system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI",
        "Noto Sans TC", sans-serif;
}

body {
    background: #f2f2f7;
    display: flex;
    justify-content: center;
    align-items: flex-start;
    min-height: 100vh;
    padding: 16px;
}

/* 外層模擬手機 */
.phone-frame {
    width: 360px;
    max-width: 100%;
    height: 720px;
    background: #ffffff;
    border-radius: 24px;
    box-shadow: 0 12px 30px rgba(0, 0, 0, 0.15);
    overflow: scroll;
    display: flex;
    flex-direction: column;
}

/* App Bar */
.app-bar {
    height: 56px;
    padding: 0 16px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    border-bottom: 1px solid #e5e5ea;
    background-color: #ffffff;
}

.app-bar-left,
.app-bar-right {
    display: flex;
    align-items: center;
    gap: 8px;
}

.app-title {
    font-size: 16px;
    font-weight: 600;
}

.icon-btn {
    width: 32px;
    height: 32px;
    border-radius: 999px;
    border: none;
    background: transparent;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
}

.material-symbols-outlined {
    font-variation-settings: "FILL" 0, "wght" 400, "GRAD" 0, "opsz" 24;
    font-size: 20px;
}

/* 共用內容區 */
.page-content {
    padding: 12px;
    display: flex;
    flex-direction: column;
    gap: 12px;
    flex: 1;
    background: #f6f6f8;
}

.page-content.no-scroll {
    overflow: hidden;
    display: flex;
    flex-direction: column;
}

/* 手機底部小橫條 */
.bottom-bar {
    height: 4px;
    background: #d1d5db;
    border-radius: 999px;
    margin: 4px auto 8px;
    width: 90px;
}

/* ====== 首頁格子 ====== */
.feature-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 8px;
}

.feature-card {
    border-radius: 10px;
    padding: 14px 10px;
    border: 2px solid #222;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    box-shadow: 0 2px 4px rgba(15, 23, 42, 0.08);
    min-height: 140px;
}

.feature-card-icon {
    width: 32px;
    height: 32px;
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.7);
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 8px;
}

.feature-card-title {
    font-size: 18px;
    font-weight: 600;
}

.card-stop-bleeding {
    background: #ffd7d7;
}

.card-aed {
    background: #e1ffd0;
}

.card-cpr {
    background: #cdeaff;
}

.card-heimlich {
    background: #ffe9b8;
}

/* 模擬地圖容器 */
.map-wrapper {
    border-radius: 5px;
    overflow: hidden;
    border: 1px solid #d1d5db;
    height: 210px;
}

.map-wrapper iframe {
    width: 100%;
    height: 100%;
    border: 0;
}

/* 首頁底下兩個按鈕 */
.bottom-buttons {
    display: flex;
    flex-direction: column;
    gap: 8px;
    margin-bottom: 4px;
}

.primary-btn,
.secondary-btn {
    border-radius: 10px;
    border: 2px solid #222;
    padding: 14px 16px;
    font-size: 16px;
    font-weight: 600;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    cursor: pointer;
}

.primary-btn {
    background: #ffd7d7;
}

.secondary-btn {
    background: #cdeaff;
}

.hero-card {
    background: #e5e5ea;
    border-radius: 16px;
    padding: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    height: 260px;
}

.hero-inner {
    width: 100%;
    height: 100%;
    border-radius: 12px;
    overflow: hidden;
    background: #f4f4f6;
    display: flex;
    align-items: center;
    justify-content: center;
    position: relative;
}

.hero-inner img {
    width: 100%;
    height: 100%;
    object-fit: contain;
}

.hero-step-label {
    position: absolute;
    top: 12px;
    left: 12px;
    padding: 4px 8px;
    border-radius: 999px;
    background: rgba(0, 0, 0, 0.6);
    color: #fff;
    font-size: 13px;
}

.step-list {
    display: flex;
    flex-direction: column;
    width: 95%;
    gap: 8px;
}

.step-card {
    border-radius: 14px;
    padding: 10px 12px;
    background: #f5f5f7;
    display: flex;
    align-items: flex-start;
    gap: 10px;
    cursor: pointer;
    border: 1px solid transparent;
}

.step-card.active {
    background: #e6f2ff;
    border-color: #3b82f6;
    box-shadow: 0 0 0 1px rgba(59, 130, 246, 0.2);
}

.steps-container {
    flex: 1;
    /* 占滿剩餘空間 */
    overflow-y: auto;
    /* 只讓它滾動 */
    padding-bottom: 20px;
    display: flex;
    justify-content: center;
}

.step-number {
    width: 26px;
    height: 26px;
    border-radius: 999px;
    background: #d1d5db;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 14px;
    font-weight: 600;
    flex-shrink: 0;
}

.step-card.active .step-number {
    background: #3b82f6;
    color: #fff;
}

.step-text {
    flex: 1;
}

.step-title {
    font-size: 14px;
    font-weight: 600;
    margin-bottom: 4px;
}

.step-desc {
    font-size: 13px;
    line-height: 1.4;
    color: #374151;
}

.step-right {
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    margin-left: 4px;
}

.step-audio {
    width: 30px;
    height: 30px;
    border-radius: 999px;
    border: none;
    background: #3b82f6;
    color: #fff;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
}

.step-arrow {
    color: #9ca3af;
}