/* ============================================================
   Base — 移动端优先
   ============================================================ */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

body {
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", "PingFang SC", "Microsoft YaHei", sans-serif;
    background: #F5F5F5;
    color: #333;
    -webkit-tap-highlight-color: transparent;
    user-select: none;
}

/* ============================================================
   顶部导航
   ============================================================ */
.top-nav {
    display: flex;
    justify-content: space-around;
    align-items: center;
    background: #fff;
    border-bottom: 1px solid #E0E0E0;
    position: sticky;
    top: 0;
    z-index: 100;
}
.nav-clock {
    font-size: 12px;
    color: #888;
    padding: 4px 8px;
    flex-shrink: 0;
    white-space: nowrap;
}
.nav-item {
    flex: 1;
    text-align: center;
    padding: 12px 0;
    font-size: 14px;
    color: #666;
    text-decoration: none;
    border-bottom: 2px solid transparent;
    transition: all .2s;
}
.nav-item.active {
    color: #4472C4;
    border-bottom-color: #4472C4;
    font-weight: 600;
}

/* ============================================================
   二级分类
   ============================================================ */
.page-title {
    text-align: center;
    font-size: 20px;
    color: #1F3864;
    margin-bottom: 20px;
}
.category-list {
    display: flex;
    flex-direction: column;
    gap: 10px;
}
.category-card {
    background: #fff;
    border-radius: 12px;
    padding: 16px;
    box-shadow: 0 1px 4px rgba(0,0,0,.06);
    cursor: pointer;
    transition: all .15s;
}
.category-card:active { transform: scale(.98); }
.category-card.avoid-card {
    border-left: 3px solid #E67E22;
}
.cat-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 4px;
}
.cat-name {
    font-size: 16px;
    font-weight: 600;
    color: #333;
}
.cat-time {
    font-size: 12px;
    color: #999;
}
.cat-progress-text {
    font-size: 12px;
    color: #999;
    margin-bottom: 6px;
}
.cat-bar-wrap {
    height: 5px;
    background: #EEE;
    border-radius: 3px;
    overflow: hidden;
}
.cat-bar {
    height: 100%;
    background: #4472C4;
    border-radius: 3px;
    transition: width .3s;
}

/* ============================================================
   逐步引导
   ============================================================ */
.guided-container {
    max-width: 480px;
    margin: 0 auto;
    padding: 20px 16px;
}

.back-btn {
    background: none;
    border: none;
    font-size: 15px;
    color: #4472C4;
    cursor: pointer;
    padding: 4px 0;
    margin-bottom: 12px;
}

.card-inputs {
    margin-top: 20px;
    text-align: left;
}
.input-qty {
    width: 100%;
    padding: 10px 12px;
    border: 1px solid #E0E0E0;
    border-radius: 8px;
    font-size: 14px;
    margin-bottom: 8px;
    font-family: inherit;
}
.input-notes {
    width: 100%;
    padding: 10px 12px;
    border: 1px solid #E0E0E0;
    border-radius: 8px;
    font-size: 14px;
    resize: none;
    font-family: inherit;
}

.progress-bar-wrap {
    height: 4px;
    background: #E0E0E0;
    border-radius: 2px;
    margin-bottom: 32px;
}
.progress-bar {
    height: 100%;
    background: #4472C4;
    border-radius: 2px;
    transition: width .3s ease;
    width: 0%;
}

.card-stage {
    min-height: 240px;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 24px;
}
.card {
    background: #fff;
    border-radius: 16px;
    padding: 40px 24px;
    width: 100%;
    text-align: center;
    box-shadow: 0 2px 12px rgba(0,0,0,.06);
    transition: transform .3s ease, opacity .3s ease;
}
.card.swipe-out-left {
    transform: translateX(-120%);
    opacity: 0;
}
.card.swipe-out-right {
    transform: translateX(120%);
    opacity: 0;
}
.card.swipe-in {
    transform: translateX(0);
    opacity: 1;
}

.card-section {
    font-size: 12px;
    color: #999;
    text-transform: uppercase;
    letter-spacing: 2px;
    margin-bottom: 8px;
}
.card-time {
    font-size: 32px;
    font-weight: 700;
    color: #4472C4;
    margin-bottom: 12px;
    min-height: 40px;
}
.card-action {
    font-size: 22px;
    font-weight: 600;
    color: #333;
    margin-bottom: 8px;
    line-height: 1.4;
}
.card-meaning {
    font-size: 14px;
    color: #999;
    min-height: 20px;
}

.btn-row {
    display: flex;
    gap: 12px;
    margin-bottom: 24px;
}
.btn {
    flex: 1;
    padding: 14px;
    border: none;
    border-radius: 12px;
    font-size: 16px;
    font-weight: 600;
    cursor: pointer;
    transition: all .15s ease;
}
.btn:active { transform: scale(.97); }
.btn-skip {
    background: #F0F0F0;
    color: #999;
}
.btn-done {
    background: #4472C4;
    color: #fff;
    flex: 2;
}

.section-dots {
    display: flex;
    justify-content: center;
    gap: 8px;
    flex-wrap: wrap;
}
.section-dot {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: #D0D0D0;
    transition: all .3s;
}
.section-dot.active { background: #4472C4; transform: scale(1.4); }
.section-dot.done { background: #C6EFCE; }

.done-message {
    text-align: center;
    padding: 60px 20px;
}
.done-message .big-check {
    font-size: 64px;
    color: #4CAF50;
}
.done-message h2 {
    font-size: 24px;
    margin: 16px 0;
    color: #333;
}

/* ============================================================
   运动页
   ============================================================ */
.sport-page {
    max-width: 520px;
    margin: 0 auto;
    padding: 16px 8px;
}
.sport-header {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-bottom: 20px;
}
.sport-avatar {
    width: 48px;
    height: 48px;
    border-radius: 50%;
    object-fit: cover;
    flex-shrink: 0;
}
.sport-clock {
    flex-shrink: 0;
    text-align: right;
    line-height: 1.3;
}
.sport-clock-time,
.sport-clock-date {
    font-size: 13px;
    font-weight: 400;
    color: #888;
    font-variant-numeric: tabular-nums;
}
.sport-title {
    font-size: 18px;
    margin: 0;
    color: #1F3864;
    flex: 1;
}
.sport-day-input {
    width: 32px;
    padding: 2px 4px;
    border: 1px solid transparent;
    border-radius: 4px;
    font-size: 18px;
    font-weight: 700;
    color: #4472C4;
    text-align: center;
    font-family: inherit;
    background: transparent;
    transition: border-color .15s;
}
.sport-day-input:focus {
    border-color: #4472C4;
    background: #fff;
    outline: none;
}
.sport-title-input {
    padding: 2px 4px;
    border: 1px solid transparent;
    border-radius: 4px;
    font-size: 18px;
    font-weight: 700;
    color: #4472C4;
    font-family: inherit;
    background: transparent;
    transition: border-color .15s;
}
.sport-title-input:focus {
    border-color: #4472C4;
    background: #fff;
    outline: none;
}
.sport-overall {
    margin-top: 16px;
    padding: 0 8px;
}
.sport-overall-input {
    width: 100%;
    padding: 8px 8px;
    border: 1px solid transparent;
    border-radius: 4px;
    font-size: 13px;
    font-family: inherit;
    background: transparent;
    transition: border-color .15s;
}
.sport-overall-input:focus {
    border-color: #4472C4;
    background: #fff;
    outline: none;
}
.sport-rows {
    display: flex;
    flex-direction: column;
    gap: 2px;
}
.sport-row {
    display: flex;
    align-items: center;
    gap: 4px;
    padding: 8px 8px;
    background: #fff;
    border-radius: 4px;
    font-size: 13px;
}
.sport-row.sport-done {
    background: #F0F9F0;
}
.sport-row.sport-done .sport-name {
    color: #999;
    text-decoration: line-through;
}
.sport-check {
    width: 22px;
    height: 22px;
    border: 2px solid #CCC;
    border-radius: 4px;
    flex-shrink: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 13px;
    color: transparent;
    cursor: pointer;
    transition: all .15s;
}
.sport-row.sport-done .sport-check {
    border-color: #4CAF50;
    background: #4CAF50;
    color: #fff;
}
.sport-name {
    flex-shrink: 0;
    min-width: 56px;
    max-width: 120px;
    font-weight: 500;
    color: #333;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}
.sport-qty {
    width: 64px;
    padding: 4px 4px;
    border: 1px solid transparent;
    border-radius: 4px;
    font-size: 12px;
    text-align: center;
    font-family: inherit;
    flex-shrink: 0;
    background: transparent;
    transition: border-color .15s;
}
.sport-qty:focus {
    border-color: #4472C4;
    background: #fff;
    outline: none;
}
.sport-notes {
    flex: 1;
    min-width: 48px;
    padding: 4px 4px;
    border: 1px solid transparent;
    border-radius: 4px;
    font-size: 12px;
    font-family: inherit;
    background: transparent;
    transition: border-color .15s;
}
.sport-notes:focus {
    border-color: #4472C4;
    background: #fff;
    outline: none;
}
.sport-summary {
    text-align: center;
    margin-top: 20px;
    font-size: 14px;
    color: #666;
}

/* ============================================================
   沙漏矩阵
   ============================================================ */
.sandglass-page {
    max-width: 480px;
    margin: 0 auto;
    padding: 16px;
}
.sg-tabs {
    display: flex;
    justify-content: center;
    gap: 0;
    margin-bottom: 16px;
}
.sg-tab {
    padding: 8px 20px;
    border: 1px solid #D0D0D0;
    background: #fff;
    font-size: 14px;
    cursor: pointer;
    color: #666;
    transition: all .15s;
}
.sg-tab:first-child { border-radius: 8px 0 0 8px; }
.sg-tab:last-child { border-radius: 0 8px 8px 0; }
.sg-tab.active {
    background: #4472C4;
    color: #fff;
    border-color: #4472C4;
}
.sg-nav {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 12px;
    margin-bottom: 16px;
}
.sg-arrow {
    width: 40px;
    height: 40px;
    border: none;
    border-radius: 8px;
    background: #4472C4;
    color: #fff;
    font-size: 18px;
    cursor: pointer;
}
.sg-arrow:active { transform: scale(.95); }
.sg-current {
    text-align: center;
}
.sg-label {
    font-size: 12px;
    color: #999;
    display: block;
}
.sg-num {
    font-size: 36px;
    font-weight: 700;
    color: #4472C4;
}
.sg-time-input {
    display: block;
    margin: 4px auto 0;
    text-align: center;
    border: 1px solid #E0E0E0;
    border-radius: 6px;
    padding: 4px 8px;
    font-size: 13px;
    width: 120px;
    font-family: inherit;
    transition: border-color .2s, box-shadow .2s;
}
.sg-time-input:focus {
    border-color: #4472C4;
    outline: none;
}
.sg-saved {
    border-color: #4CAF50 !important;
    box-shadow: 0 0 0 2px rgba(76,175,80,.2);
}
.sg-project-list { }
.sg-project-item {
    display: flex;
    align-items: center;
    padding: 14px 12px;
    background: #fff;
    margin-bottom: 4px;
    border-radius: 8px;
    cursor: pointer;
    transition: all .15s;
}
.sg-project-item.done {
    background: #C6EFCE;
}
.sg-project-item .sg-check {
    width: 28px;
    height: 28px;
    border: 2px solid #CCC;
    border-radius: 50%;
    margin-right: 12px;
    flex-shrink: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 16px;
    color: transparent;
    transition: all .15s;
}
.sg-project-item.done .sg-check {
    border-color: #4CAF50;
    background: #4CAF50;
    color: #fff;
}
.sg-project-item .sg-name {
    font-size: 15px;
    color: #333;
}

/* ============================================================
   统计页
   ============================================================ */
.stats-page {
    max-width: 600px;
    margin: 0 auto;
    padding: 16px;
}
.stats-title {
    font-size: 16px;
    color: #1F3864;
    margin: 20px 0 12px;
}
.section-cards {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(100px, 1fr));
    gap: 8px;
}
.section-card {
    background: #fff;
    border-radius: 10px;
    padding: 12px;
    text-align: center;
    box-shadow: 0 1px 4px rgba(0,0,0,.05);
}
.section-card .sc-name {
    font-size: 12px;
    color: #999;
}
.section-card .sc-rate {
    font-size: 24px;
    font-weight: 700;
    color: #4472C4;
    margin: 4px 0;
}
.section-card .sc-detail {
    font-size: 11px;
    color: #BBB;
}

.chart-wrap {
    background: #fff;
    border-radius: 10px;
    padding: 16px;
    box-shadow: 0 1px 4px rgba(0,0,0,.05);
    margin-bottom: 16px;
    height: 220px;
}

.habit-rank {
    background: #fff;
    border-radius: 10px;
    padding: 12px;
    box-shadow: 0 1px 4px rgba(0,0,0,.05);
}
.habit-row {
    display: flex;
    align-items: center;
    padding: 8px 0;
    border-bottom: 1px solid #F5F5F5;
}
.habit-row:last-child { border-bottom: none; }
.habit-row .hr-name {
    flex: 1;
    font-size: 14px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}
.habit-row .hr-bar-wrap {
    width: 80px;
    height: 6px;
    background: #EEE;
    border-radius: 3px;
    margin: 0 8px;
    overflow: hidden;
}
.habit-row .hr-bar {
    height: 100%;
    border-radius: 3px;
    background: #4472C4;
}
.habit-row .hr-rate {
    width: 40px;
    text-align: right;
    font-size: 13px;
    color: #666;
}
.hr-section {
    font-size: 11px;
    color: #999;
    margin-left: 6px;
}
.section-weak-row {
    display: flex;
    align-items: center;
    padding: 8px 12px;
    background: #fff;
    border-radius: 8px;
    margin-bottom: 6px;
    box-shadow: 0 1px 4px rgba(0,0,0,.05);
}
.sw-name {
    width: 80px;
    font-size: 14px;
    flex-shrink: 0;
}

/* ============================================================
   管理后台
   ============================================================ */
.admin-page {
    max-width: 600px;
    margin: 0 auto;
    padding: 16px;
}
.admin-title {
    font-size: 18px;
    color: #1F3864;
    margin-bottom: 16px;
}
.admin-tabs {
    display: flex;
    gap: 0;
    margin-bottom: 16px;
}
.admin-tab {
    padding: 8px 20px;
    border: 1px solid #D0D0D0;
    background: #fff;
    font-size: 14px;
    cursor: pointer;
    color: #666;
    transition: all .15s;
}
.admin-tab:first-child { border-radius: 8px 0 0 8px; }
.admin-tab:last-child { border-radius: 0 8px 8px 0; }
.admin-tab.active {
    background: #4472C4;
    color: #fff;
    border-color: #4472C4;
}
.admin-row {
    display: flex;
    align-items: center;
    gap: 6px;
    padding: 6px 8px;
    background: #fff;
    margin-bottom: 2px;
    border-radius: 4px;
    font-size: 13px;
    flex-wrap: wrap;
}
.admin-inline {
    padding: 4px 6px;
    border: 1px solid transparent;
    border-radius: 4px;
    font-size: 13px;
    font-family: inherit;
    background: transparent;
    transition: border-color .15s;
}
.admin-inline:focus {
    border-color: #4472C4;
    background: #fff;
    outline: none;
}
.ai-section { width: 80px; }
.ai-action { width: 120px; }
.ai-time { width: 60px; }
.ai-meaning { width: 100px; }
.ai-name { width: 140px; }
.ai-order { width: 50px; }
.admin-check {
    font-size: 12px;
    color: #666;
    display: flex;
    align-items: center;
    gap: 2px;
    flex-shrink: 0;
}
.admin-check input { margin: 0; }
.admin-drag-handle { cursor: grab; padding: 0 8px; color: #999; font-size: 16px; user-select: none; }
.admin-row.dragging { opacity: 0.4; }
.admin-del {
    margin-left: auto;
    background: none;
    border: none;
    color: #CCC;
    font-size: 14px;
    cursor: pointer;
    padding: 4px 8px;
    flex-shrink: 0;
}
.admin-del:hover { color: #E74C3C; }
.admin-add-btn {
    display: block;
    margin: 12px auto 0;
    padding: 10px 32px;
    background: #4472C4;
    color: #fff;
    border: none;
    border-radius: 8px;
    font-size: 15px;
    cursor: pointer;
}

/* ============================================================
   目标页
   ============================================================ */
.goals-page {
    max-width: 480px;
    margin: 0 auto;
    padding: 12px 16px;
}
.goals-toolbar {
    display: flex;
    justify-content: flex-end;
    margin-bottom: 12px;
}
.goal-card {
    background: #fff;
    border-radius: 12px;
    padding: 16px;
    margin-bottom: 10px;
    box-shadow: 0 1px 4px rgba(0,0,0,.06);
}
.goal-header {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-bottom: 8px;
}
.goal-name {
    flex: 1;
    font-size: 16px;
    font-weight: 600;
    color: #333;
}
.goal-name-input {
    flex: 1;
    padding: 4px 8px;
    border: 1px solid #4472C4;
    border-radius: 6px;
    font-size: 15px;
    font-family: inherit;
    outline: none;
}
.goal-rate {
    font-size: 22px;
    font-weight: 700;
    color: #4472C4;
    flex-shrink: 0;
}
.goal-del-btn {
    background: none;
    border: none;
    color: #CCC;
    font-size: 13px;
    cursor: pointer;
    flex-shrink: 0;
}
.goal-del-btn:hover { color: #E74C3C; }
.goal-bar-wrap {
    height: 6px;
    background: #EEE;
    border-radius: 3px;
    margin-bottom: 10px;
    overflow: hidden;
}
.goal-bar {
    height: 100%;
    background: #4472C4;
    border-radius: 3px;
    transition: width .3s;
}
.goal-links {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
}
.goal-tag {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    padding: 3px 8px;
    background: #F0F4FF;
    border-radius: 12px;
    font-size: 12px;
    color: #4472C4;
}
.goal-tag-rate {
    color: #999;
    font-size: 11px;
}
.tag-del {
    background: none;
    border: none;
    color: #AAA;
    cursor: pointer;
    font-size: 14px;
    padding: 0;
    line-height: 1;
}
.tag-del:hover { color: #E74C3C; }
.add-link-btn {
    padding: 3px 10px;
    border: 1px dashed #4472C4;
    border-radius: 12px;
    background: none;
    font-size: 12px;
    color: #4472C4;
    cursor: pointer;
}
.add-goal-btn {
    display: block;
    margin: 8px auto 0;
    padding: 10px 32px;
    background: #4472C4;
    color: #fff;
    border: none;
    border-radius: 8px;
    font-size: 15px;
    cursor: pointer;
}
   ============================================================ */
.cards-page {
    max-width: 480px;
    margin: 0 auto;
    padding: 12px 16px;
}
.cards-toolbar {
    display: flex;
    flex-direction: column;
    gap: 8px;
    margin-bottom: 16px;
}
.scene-tabs {
    display: flex;
    gap: 6px;
    flex-wrap: wrap;
}
.scene-tab {
    padding: 6px 14px;
    border: 1px solid #D0D0D0;
    border-radius: 20px;
    background: #fff;
    font-size: 13px;
    color: #666;
    cursor: pointer;
}
.scene-tab.active {
    background: #4472C4;
    color: #fff;
    border-color: #4472C4;
}
.cards-actions {
    display: flex;
    gap: 6px;
}
.mode-btn {
    padding: 6px 14px;
    border: 1px solid #D0D0D0;
    border-radius: 6px;
    background: #fff;
    font-size: 13px;
    color: #666;
    cursor: pointer;
}
.mode-btn.active {
    background: #4472C4;
    color: #fff;
    border-color: #4472C4;
}
.edit-toggle-btn {
    padding: 6px 14px;
    border: 1px solid #D0D0D0;
    border-radius: 6px;
    background: #fff;
    font-size: 13px;
    color: #666;
    cursor: pointer;
    margin-left: auto;
}
.edit-toggle-btn.active {
    background: #E67E22;
    color: #fff;
    border-color: #E67E22;
}
.kcard {
    background: #fff;
    border-radius: 12px;
    padding: 20px 16px;
    margin-bottom: 10px;
    box-shadow: 0 1px 4px rgba(0,0,0,.06);
    font-size: 16px;
    line-height: 1.6;
    color: #333;
    position: relative;
}
.kcard-edit {
    width: 100%;
    border: 1px solid #4472C4;
    border-radius: 6px;
    padding: 8px;
    font-size: 15px;
    font-family: inherit;
    resize: vertical;
    min-height: 60px;
    outline: none;
}
.kcard-del {
    margin-top: 8px;
    background: none;
    border: none;
    color: #CCC;
    font-size: 13px;
    cursor: pointer;
    padding: 0;
}
.kcard-del:hover { color: #E74C3C; }
.kcard-img { width: 100%; border-radius: 6px; margin-bottom: 8px; display: block; }
.kcard-img-actions { display: flex; gap: 8px; margin-top: 6px; }
.kcard-img-btn {
    padding: 4px 12px;
    background: #f0f0f0;
    border: 1px solid #ddd;
    border-radius: 6px;
    font-size: 13px;
    cursor: pointer;
    color: #555;
}
.kcard-img-btn:hover { background: #e0e0e0; }
.add-card-btn, .add-scene-btn {
    display: block;
    margin: 8px auto 0;
    padding: 10px 32px;
    background: #4472C4;
    color: #fff;
    border: none;
    border-radius: 8px;
    font-size: 15px;
    cursor: pointer;
}
.empty-tip {
    text-align: center;
    color: #BBB;
    padding: 40px 0;
    font-size: 14px;
}
/* 翻阅模式 */
.flip-stage {
    min-height: 260px;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 24px;
}
.flip-card {
    background: transparent;
    padding: 48px 28px;
    width: 100%;
    text-align: center;
    font-size: 20px;
    line-height: 1.7;
    color: #333;
    white-space: pre-wrap;
}
.flip-nav {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 24px;
}
.flip-arrow {
    width: 44px;
    height: 44px;
    border: none;
    border-radius: 50%;
    background: #4472C4;
    color: #fff;
    font-size: 20px;
    cursor: pointer;
}
.flip-arrow:active { transform: scale(.95); }
.flip-progress {
    font-size: 14px;
    color: #999;
    min-width: 48px;
    text-align: center;
}
/* 场景编辑面板 */
.scene-edit-list {
    margin-top: 16px;
}
.scene-edit-row {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 6px 0;
    border-bottom: 1px solid #F0F0F0;
}
.scene-name-input {
    flex: 1;
    padding: 6px 8px;
    border: 1px solid #E0E0E0;
    border-radius: 6px;
    font-size: 14px;
    font-family: inherit;
}
.scene-name-input:focus {
    border-color: #4472C4;
    outline: none;
}
.scene-del-btn {
    background: none;
    border: none;
    color: #CCC;
    font-size: 13px;
    cursor: pointer;
    flex-shrink: 0;
}
.scene-del-btn:hover { color: #E74C3C; }

/* 沙漏批量按钮 */
.sg-bulk {
    display: flex;
    gap: 8px;
    padding: 4px 16px 8px;
    justify-content: center;
}
.sg-bulk-btn {
    background: #fff;
    border: 1px solid #ddd;
    border-radius: 14px;
    padding: 4px 14px;
    font-size: 12px;
    color: #666;
    cursor: pointer;
}
.sg-bulk-btn:hover { border-color: #4472C4; color: #4472C4; }
.sg-bulk-btn:active { background: #E3F2FD; }

/* 沙漏编辑 */
.sg-edit-btn {
    margin-left: auto;
    background: none;
    border: 1px solid #ccc;
    border-radius: 6px;
    padding: 4px 10px;
    font-size: 13px;
    cursor: pointer;
    color: #666;
}
.sg-edit-btn.active { border-color: #4472C4; color: #4472C4; }
#sgEditPanel { padding: 8px 16px; }
.sg-edit-row {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-bottom: 8px;
    background: #fff;
    border-radius: 6px;
    padding: 4px;
    transition: opacity 0.15s, background 0.15s;
}
.sg-edit-row.dragging { opacity: 0.4; }
.sg-edit-row.sg-drop-over { background: #E3F2FD; border: 1px dashed #4472C4; padding: 3px; }
.sg-drag-handle {
    cursor: grab;
    color: #bbb;
    font-size: 14px;
    padding: 4px 6px;
    user-select: none;
    touch-action: none;
    letter-spacing: -3px;
}
.sg-drag-handle:active { cursor: grabbing; color: #4472C4; }
.sg-edit-input {
    flex: 1;
    padding: 6px 8px;
    border: 1px solid #E0E0E0;
    border-radius: 6px;
    font-size: 14px;
    font-family: inherit;
}
.sg-edit-input:focus { border-color: #4472C4; outline: none; }
.sg-del-btn {
    background: none;
    border: none;
    color: #ccc;
    font-size: 13px;
    cursor: pointer;
    flex-shrink: 0;
}
.sg-del-btn:hover { color: #E74C3C; }
.sg-add-btn {
    margin-top: 4px;
    background: none;
    border: 1px dashed #ccc;
    border-radius: 6px;
    padding: 6px 16px;
    font-size: 13px;
    color: #888;
    cursor: pointer;
    width: 100%;
}
.sg-add-btn:hover { border-color: #4472C4; color: #4472C4; }

/* 运动历史表格 */
.sport-hist-table { width: 100%; border-collapse: collapse; font-size: 12px; margin-top: 8px; }
.sport-hist-table th, .sport-hist-table td { border: 1px solid #E0E0E0; padding: 4px 6px; text-align: center; white-space: nowrap; }
.sport-hist-table th { background: #F5F5F5; font-weight: 600; }
.sh-done { background: #E8F5E9; color: #27ae60; }
.sh-miss { background: #fff; color: #ccc; }

/* ============================================================
   Claude 页
   ============================================================ */
.claude-page { max-width: 700px; margin: 0 auto; padding: 12px 16px; }
.cl-tabs { display: flex; gap: 0; margin-bottom: 16px; }
.cl-tab {
    padding: 8px 24px;
    border: 1px solid #D0D0D0;
    background: #fff;
    font-size: 14px;
    cursor: pointer;
    color: #666;
    transition: all .15s;
}
.cl-tab:first-child { border-radius: 8px 0 0 8px; }
.cl-tab:last-child { border-radius: 0 8px 8px 0; }
.cl-tab.active { background: #4472C4; color: #fff; border-color: #4472C4; }

/* 常用语句 */
.cl-phrase-list { display: flex; flex-direction: column; gap: 10px; }
.cl-phrase-card {
    background: #fff;
    border-radius: 10px;
    padding: 10px 12px;
    box-shadow: 0 1px 4px rgba(0,0,0,.06);
    display: flex;
    align-items: flex-start;
    gap: 8px;
    cursor: default;
}
.cl-phrase-card.dragging { opacity: .4; }
.cl-phrase-card.cl-drop-over { background: #E3F2FD; border: 1px dashed #4472C4; }
.cl-phrase-drag {
    cursor: grab;
    color: #bbb;
    font-size: 14px;
    padding: 4px 2px;
    user-select: none;
    letter-spacing: -3px;
    flex-shrink: 0;
    margin-top: 2px;
}
.cl-phrase-drag:active { cursor: grabbing; color: #4472C4; }
.cl-phrase-body { flex: 1; min-width: 0; }
.cl-phrase-label { font-size: 12px; color: #999; margin-bottom: 4px; }
.cl-phrase-text {
    font-size: 14px;
    color: #333;
    line-height: 1.6;
    word-break: break-all;
    user-select: text;
}
.cl-phrase-actions { display: flex; flex-direction: column; gap: 4px; flex-shrink: 0; }
.cl-copy-btn {
    padding: 5px 16px;
    background: #4472C4;
    color: #fff;
    border: none;
    border-radius: 6px;
    font-size: 13px;
    cursor: pointer;
}
.cl-copy-btn:active { opacity: .8; }
.cl-del-btn {
    padding: 5px 16px;
    background: none;
    border: 1px solid #ddd;
    border-radius: 6px;
    font-size: 13px;
    color: #aaa;
    cursor: pointer;
}
.cl-del-btn:hover { border-color: #E74C3C; color: #E74C3C; }
.cl-edit-btn {
    padding: 5px 16px;
    background: none;
    border: 1px solid #888;
    border-radius: 4px;
    color: #ccc;
    font-size: 13px;
    cursor: pointer;
}
.cl-edit-btn:hover { border-color: #4472C4; color: #4472C4; }
.cl-skill-actions { display: flex; gap: 8px; margin-top: 12px; }
.cl-add-btn {
    display: block;
    width: 100%;
    margin-top: 10px;
    padding: 10px;
    background: none;
    border: 1px dashed #ccc;
    border-radius: 8px;
    font-size: 14px;
    color: #888;
    cursor: pointer;
}
.cl-add-btn:hover { border-color: #4472C4; color: #4472C4; }

/* Skills */
.cl-skills-layout { display: flex; gap: 12px; min-height: 400px; }
.cl-skill-list {
    width: 140px;
    flex-shrink: 0;
    display: flex;
    flex-direction: column;
    gap: 4px;
}
.cl-skill-item {
    padding: 10px 12px;
    background: #fff;
    border-radius: 8px;
    font-size: 13px;
    color: #555;
    cursor: pointer;
    border: 1px solid transparent;
    transition: all .15s;
    line-height: 1.4;
}
.cl-skill-item:hover { border-color: #4472C4; color: #4472C4; }
.cl-skill-item.active { background: #4472C4; color: #fff; border-color: #4472C4; }
.cl-skill-detail {
    flex: 1;
    background: #fff;
    border-radius: 10px;
    padding: 16px;
    box-shadow: 0 1px 4px rgba(0,0,0,.06);
}
.cl-skill-title { font-size: 16px; font-weight: 600; color: #1F3864; margin-bottom: 12px; }
.cl-skill-meta { font-size: 13px; color: #555; margin-bottom: 8px; line-height: 1.5; }
.cl-meta-label {
    display: inline-block;
    width: 32px;
    font-size: 11px;
    color: #999;
    background: #F0F0F0;
    border-radius: 4px;
    text-align: center;
    padding: 1px 0;
    margin-right: 6px;
    flex-shrink: 0;
}
.cl-skill-code {
    background: #F8F8F8;
    border: 1px solid #E8E8E8;
    border-radius: 8px;
    padding: 12px;
    font-size: 12px;
    line-height: 1.6;
    overflow-x: auto;
    white-space: pre;
    color: #333;
    margin: 12px 0;
    user-select: text;
    font-family: "Consolas", "Monaco", monospace;
}

/* Toast */
.cl-toast {
    position: fixed;
    bottom: 80px;
    left: 50%;
    transform: translateX(-50%) translateY(10px);
    background: rgba(0,0,0,.7);
    color: #fff;
    padding: 8px 20px;
    border-radius: 20px;
    font-size: 14px;
    opacity: 0;
    transition: all .2s;
    pointer-events: none;
    z-index: 999;
}
.cl-toast.show { opacity: 1; transform: translateX(-50%) translateY(0); }
