* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    -webkit-tap-highlight-color: transparent;
}

html, body {
    overscroll-behavior-x: none;
    overscroll-behavior-y: auto;
    -webkit-text-size-adjust: 100%;
    -webkit-user-select: none;
    user-select: none;
    touch-action: manipulation;
}

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', 'PingFang SC', 'Hiragino Sans GB', 'Microsoft YaHei', sans-serif;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    min-height: 100vh;
    min-height: 100dvh;
    color: #333;
    user-select: none;
    overflow-x: hidden;
}

.app {
    max-width: 500px;
    margin: 0 auto;
    padding: 12px;
    padding-top: max(12px, env(safe-area-inset-top));
    padding-bottom: max(12px, env(safe-area-inset-bottom));
    min-height: 100vh;
    min-height: 100dvh;
}

/* 头部 */
.header {
    display: flex;
    align-items: center;
    justify-content: center;
    position: relative;
    padding: 16px 0 12px;
    color: white;
}

.header h1 {
    font-size: 22px;
    font-weight: 600;
    margin-bottom: 8px;
    margin: 0;
}

.bill-btn {
    position: absolute;
    right: 0;
    background: rgba(255, 255, 255, 0.2);
    color: white;
    border: 1px solid rgba(255, 255, 255, 0.3);
}

.bill-btn:hover {
    background: rgba(255, 255, 255, 0.3);
}

.stats-bar {
    display: flex;
    justify-content: center;
    gap: 16px;
}

.stat-item {
    background: rgba(255, 255, 255, 0.2);
    backdrop-filter: blur(10px);
    padding: 6px 16px;
    border-radius: 20px;
    font-size: 14px;
}

.stat-item strong {
    font-size: 18px;
    font-weight: 700;
}

/* 操作按钮栏 */
.action-bar {
    display: flex;
    gap: 8px;
    margin-bottom: 12px;
}

.btn {
    flex: 1;
    padding: 12px 8px;
    border: none;
    border-radius: 12px;
    font-size: 14px;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.2s ease;
    backdrop-filter: blur(10px);
}

.btn:active {
    transform: scale(0.96);
}

.btn-primary {
    background: linear-gradient(135deg, #667eea, #764ba2);
    color: white;
    box-shadow: 0 4px 15px rgba(102, 126, 234, 0.4);
}

.btn-secondary {
    background: rgba(255, 255, 255, 0.9);
    color: #667eea;
}

.btn-danger {
    background: rgba(255, 107, 107, 0.9);
    color: white;
}

.btn-small {
    flex: none;
    padding: 6px 12px;
    font-size: 12px;
    border-radius: 8px;
}

/* 012路统计卡片 */
.road-stats {
    display: flex;
    gap: 8px;
    margin-bottom: 12px;
}

.road-card {
    flex: 1;
    padding: 12px;
    border-radius: 12px;
    text-align: center;
    backdrop-filter: blur(10px);
    background: rgba(255, 255, 255, 0.9);
}

.road-card.road-0 {
    border-top: 3px solid #4a90d9;
}

.road-card.road-1 {
    border-top: 3px solid #e74c3c;
}

.road-card.road-2 {
    border-top: 3px solid #27ae60;
}

.road-label {
    display: block;
    font-size: 12px;
    color: #888;
    margin-bottom: 4px;
}

.road-count {
    display: block;
    font-size: 24px;
    font-weight: 700;
}

.road-card.road-0 .road-count {
    color: #4a90d9;
}

.road-card.road-1 .road-count {
    color: #e74c3c;
}

.road-card.road-2 .road-count {
    color: #27ae60;
}

/* 选号面板 */
.number-panel {
    background: rgba(255, 255, 255, 0.85);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    border: 1px solid rgba(255, 255, 255, 0.4);
    border-radius: 16px;
    padding: 12px;
    display: grid;
    grid-template-columns: repeat(10, 1fr);
    gap: 6px;
    margin-bottom: 12px;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.1);
}

.number-ball {
    aspect-ratio: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    font-size: 13px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s ease;
    background: #f5f5f5;
    color: #666;
    border: 2px solid #ddd;
}

.number-ball:active {
    transform: scale(0.92);
}

.number-ball.selected {
    color: white;
    transform: scale(0.92);
    border-color: transparent;
    background: linear-gradient(135deg, #e74c3c, #c0392b);
    box-shadow: 0 4px 12px rgba(231, 76, 60, 0.4);
}

.number-ball:active {
    transform: scale(0.85);
}

/* 已选号码展示区 */
.selected-section {
    background: rgba(255, 255, 255, 0.65);
    backdrop-filter: blur(15px);
    -webkit-backdrop-filter: blur(15px);
    border: 1px solid rgba(255, 255, 255, 0.4);
    border-radius: 16px;
    padding: 12px;
    margin-bottom: 12px;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.12);
}

.section-header {
    margin-bottom: 10px;
    overflow: hidden;
    width: 100%;
}

.section-header h3 {
    font-size: 15px;
    color: #333;
    margin: 0;
    float: left;
    line-height: 28px;
}

.header-buttons {
    float: right;
    display: flex;
    gap: 6px;
}

.header-buttons .btn-small {
    padding: 6px 10px;
    font-size: 12px;
    width: auto;
    flex: none;
}

.header-buttons .btn.active {
    background: #e74c3c;
    border-color: #e74c3c;
    color: white;
}

#btnSelectAll,
#btnDeleteSelected {
    display: none;
}

.selected-count-badge {
    font-size: 13px;
    color: #666;
    display: flex;
    align-items: center;
    padding: 0 8px;
}

.selected-count-badge strong {
    color: #e74c3c;
    font-size: 15px;
    font-weight: 700;
    margin: 0 2px;
}

.btn-lock {
    background: rgba(255, 193, 7, 0.15);
    color: #f39c12;
    border: 1px solid rgba(243, 156, 18, 0.3);
}

.btn-lock.locked {
    background: rgba(231, 76, 60, 0.15);
    color: #e74c3c;
    border: 1px solid rgba(231, 76, 60, 0.3);
}

.road-ratio {
    font-size: 13px;
    font-weight: 500;
    margin-left: 6px;
    vertical-align: middle;
    color: #666;
}

.road-0-color { color: #666; }
.road-1-color { color: #666; }
.road-2-color { color: #666; }

.selected-numbers-all {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    padding: 10px;
    background: rgba(255, 255, 255, 0.5);
    border: 1px solid rgba(255, 255, 255, 0.3);
    border-radius: 10px;
    min-height: 44px;
    align-items: center;
}

.selected-numbers-all .empty-tip {
    color: #999;
    font-size: 13px;
}

.selected-numbers-all .selected-num {
    width: clamp(22px, 3.2vw, 32px);
    height: clamp(22px, 3.2vw, 32px);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: clamp(10px, 1.4vw, 13px);
    font-weight: 600;
    color: white;
    background: #e74c3c;
}

.selected-numbers-all .road-group {
    display: flex;
    align-items: center;
    gap: clamp(2px, 0.4vw, 4px);
}

.selected-numbers-all .road-brace {
    color: #666;
    font-size: clamp(14px, 2vw, 18px);
    font-weight: 600;
    display: flex;
    align-items: center;
    line-height: 1;
    transform: translateY(-3px);
}

.selected-numbers-all .road-label {
    color: #666;
    font-size: clamp(12px, 1.8vw, 15px);
    font-weight: 600;
    display: flex;
    align-items: center;
    margin-right: 2px;
    min-width: 36px;
    justify-content: flex-end;
    line-height: 1;
}

.selected-roads {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.selected-road {
    padding: 10px;
    border-radius: 10px;
    min-height: 44px;
}

.selected-road.road-0-bg {
    background: rgba(74, 144, 217, 0.1);
    border-left: 3px solid #4a90d9;
}

.selected-road.road-1-bg {
    background: rgba(231, 76, 60, 0.1);
    border-left: 3px solid #e74c3c;
}

.selected-road.road-2-bg {
    background: rgba(39, 174, 96, 0.1);
    border-left: 3px solid #27ae60;
}

.selected-road .road-title {
    font-size: 12px;
    color: #888;
    margin-bottom: 6px;
    display: flex !important;
    justify-content: space-between !important;
    align-items: center !important;
    width: 100% !important;
}

.road-count-badge {
    font-size: 13px;
    font-weight: 700;
    padding: 2px 10px;
    border-radius: 12px;
    min-width: 28px;
    text-align: center;
    line-height: 1.4;
}

.road-0-color {
    color: #666 !important;
}

.road-1-color {
    color: #666 !important;
}

.road-2-color {
    color: #666 !important;
}

.selected-numbers {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
}

.selected-num-tag {
    width: 32px;
    height: 32px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    font-size: 12px;
    font-weight: 600;
    color: white;
}

.selected-num-tag.road-0 {
    background: linear-gradient(135deg, #4a90d9, #357abd);
}

.selected-num-tag.road-1 {
    background: linear-gradient(135deg, #e74c3c, #c0392b);
}

.selected-num-tag.road-2 {
    background: linear-gradient(135deg, #27ae60, #229954);
}

.empty-road {
    font-size: 12px;
    color: #bbb;
    font-style: italic;
}

/* 历史记录 */
.history-section {
    background: rgba(255, 255, 255, 0.65);
    backdrop-filter: blur(15px);
    -webkit-backdrop-filter: blur(15px);
    border: 1px solid rgba(255, 255, 255, 0.4);
    border-radius: 16px;
    padding: 12px;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.12);
}

.history-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 10px;
}

.history-header h3 {
    font-size: 15px;
    color: #333;
}

.history-list {
    max-height: 300px;
    overflow-y: auto;
}

.history-item {
    padding: 10px;
    border-radius: 10px;
    background: rgba(255, 255, 255, 0.5);
    border: 1px solid rgba(255, 255, 255, 0.3);
    margin-bottom: 8px;
    cursor: pointer;
    transition: all 0.2s ease;
}

.history-item:active {
    transform: scale(0.98);
    background: rgba(255, 255, 255, 0.7);
}

.history-item.selected-record {
    border-color: #e74c3c;
    background: rgba(231, 76, 60, 0.1);
    box-shadow: 0 2px 8px rgba(231, 76, 60, 0.2);
}

/* 已复制记录样式 */
.history-item.copied-record {
    border-color: #27ae60;
    background: rgba(39, 174, 96, 0.08);
    box-shadow: 0 2px 8px rgba(39, 174, 96, 0.15);
    transition: all 0.3s ease;
}

.copied-badge {
    display: inline-block;
    background: #27ae60;
    color: white;
    font-size: 10px;
    padding: 1px 6px;
    border-radius: 8px;
    margin-left: 4px;
    font-weight: 500;
    vertical-align: middle;
}

.btn-copy.copied {
    background: #27ae60;
    color: white;
    border-color: #27ae60;
}

.history-date {
    font-size: 12px;
    color: #888;
    margin-bottom: 6px;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.history-numbers-row {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-bottom: 6px;
}

.copy-triangle {
    width: 0;
    height: 0;
    border-top: 6px solid transparent;
    border-bottom: 6px solid transparent;
    border-left: 8px solid #9b59b6;
    flex-shrink: 0;
    align-self: center;
}

.history-numbers {
    display: flex;
    flex-wrap: wrap;
    gap: 3px;
    flex: 1;
}

.history-numbers.clickable {
    cursor: pointer;
    padding: 4px;
    border-radius: 8px;
    transition: background 0.2s;
}

.history-numbers.clickable:hover {
    background: rgba(102, 126, 234, 0.08);
}

.btn-copy {
    flex: none;
    padding: 4px 8px;
    font-size: 11px;
    border-radius: 6px;
    background: rgba(102, 126, 234, 0.1);
    color: #667eea;
    border: 1px solid rgba(102, 126, 234, 0.3);
    cursor: pointer;
    transition: all 0.2s ease;
    white-space: nowrap;
    margin-top: -3px;
}

.btn-copy:active {
    transform: scale(0.95);
    background: rgba(102, 126, 234, 0.2);
}

.history-num {
    width: 24px;
    height: 24px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    font-size: 11px;
    font-weight: 600;
    color: #333;
    background: rgba(0, 0, 0, 0.06);
}

.history-summary {
    display: flex;
    gap: 12px;
    font-size: 11px;
    color: #888;
}

.history-actions {
    display: flex;
    gap: 8px;
    margin-top: 8px;
}

.history-actions .btn {
    flex: 1;
    padding: 6px;
    font-size: 11px;
    border-radius: 6px;
}

.empty-tip {
    text-align: center;
    color: #bbb;
    font-size: 14px;
    padding: 20px 0;
}

/* 底部间距 */
.bottom-space {
    height: 20px;
}

/* 弹窗 */
.modal {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.5);
    display: none;
    align-items: center;
    justify-content: center;
    z-index: 1000;
    padding: 20px;
}

.modal.show {
    display: flex;
}

.modal-content {
    background: white;
    border-radius: 16px;
    width: 100%;
    max-width: 320px;
    overflow: hidden;
    animation: modalIn 0.3s ease;
}

@keyframes modalIn {
    from {
        opacity: 0;
        transform: scale(0.9);
    }
    to {
        opacity: 1;
        transform: scale(1);
    }
}

.modal-content h3 {
    padding: 16px;
    font-size: 16px;
    border-bottom: 1px solid #eee;
}

.modal-body {
    padding: 16px;
}

.modal-body label {
    display: block;
    font-size: 14px;
    margin-bottom: 8px;
    color: #666;
}

.modal-body input[type="range"] {
    width: 100%;
    margin-bottom: 16px;
}

.modal-options {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.modal-options label {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 14px;
    color: #333;
    margin-bottom: 0;
}

.modal-footer {
    display: flex;
    gap: 8px;
    padding: 12px 16px;
    border-top: 1px solid #eee;
}

.modal-footer .btn {
    flex: 1;
}

/* Toast */
.toast {
    position: fixed;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    background: rgba(0, 0, 0, 0.8);
    color: white;
    padding: 12px 24px;
    border-radius: 8px;
    font-size: 14px;
    z-index: 2000;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.3s ease;
}

.toast.show {
    opacity: 1;
}

/* 响应式 - 更小屏幕 */
@media (max-width: 360px) {
    .number-panel {
        grid-template-columns: repeat(10, 1fr);
        gap: 4px;
    }
    
    .number-ball {
        font-size: 11px;
    }
    
    .header h1 {
        font-size: 18px;
    }
}

/* 安装提示 */
.install-prompt {
    position: fixed;
    bottom: 20px;
    left: 50%;
    transform: translateX(-50%);
    background: white;
    padding: 12px 20px;
    border-radius: 12px;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.2);
    display: none;
    align-items: center;
    gap: 12px;
    z-index: 500;
    max-width: 90%;
}

.install-prompt.show {
    display: flex;
}

.install-prompt p {
    font-size: 13px;
    color: #666;
    flex: 1;
}

.install-prompt .btn {
    flex: none;
    padding: 8px 16px;
    font-size: 13px;
}

/* 机选数量方块 */
.random-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 10px;
    margin: 10px 0;
}

.random-num-btn {
    padding: 15px 0;
    border: 2px solid #e0e0e0;
    border-radius: 10px;
    background: #fff;
    font-size: 18px;
    font-weight: 600;
    color: #666;
    cursor: pointer;
    transition: all 0.2s;
}

.random-num-btn:hover {
    border-color: #667eea;
    color: #667eea;
    background: rgba(102, 126, 234, 0.05);
}

.random-num-btn:active {
    transform: scale(0.95);
}

.history-date .history-count-red {
    color: #e74c3c !important;
    font-weight: 600;
}

/* 开奖信息 */
.draw-info {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    border-radius: 12px;
    padding: 12px 15px;
    margin-bottom: 15px;
    color: white;
}

.draw-info-header {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-bottom: 10px;
    font-size: 13px;
}

.draw-title {
    font-weight: 600;
    background: rgba(255,255,255,0.2);
    padding: 2px 8px;
    border-radius: 4px;
}

.draw-period {
    font-weight: 500;
}

.draw-date {
    margin-left: auto;
    opacity: 0.9;
    font-size: 12px;
}

.draw-numbers {
    display: flex;
    flex-wrap: wrap;
    gap: 5px;
}

/* ========== 账单功能 ========== */

.bill-modal {
    max-width: 420px;
    width: 90%;
}

.bill-add-form {
    display: flex;
    gap: 8px;
    margin-bottom: 8px;
    padding-bottom: 12px;
    border-bottom: 1px solid #eee;
}

.bill-merge-tip {
    font-size: 12px;
    color: #999;
    margin-bottom: 15px;
}

.bill-input {
    flex: 1;
    min-width: 0;
    padding: 8px 10px;
    border: 1px solid #ddd;
    border-radius: 8px;
    font-size: 13px;
    outline: none;
    transition: border-color 0.2s;
}

.bill-input:focus {
    border-color: #667eea;
}

.bill-add-form .btn {
    flex: none;
    padding: 8px 16px;
}

.bill-summary {
    display: flex;
    justify-content: space-around;
    padding: 12px;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    border-radius: 10px;
    margin-bottom: 15px;
    color: white;
}

.summary-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 4px;
}

.summary-label {
    font-size: 12px;
    opacity: 0.9;
}

.summary-expense {
    font-size: 15px;
    font-weight: 600;
    color: #ffcccc;
}

.summary-income {
    font-size: 15px;
    font-weight: 600;
    color: #ccffcc;
}

.summary-profit {
    font-size: 16px;
    font-weight: 700;
}

.summary-profit.positive {
    color: #4ade80;
}

.summary-profit.negative {
    color: #f87171;
}

.bill-list {
    max-height: 140px;
    overflow-y: auto;
}

.bill-item {
    background: #f9f9f9;
    border-radius: 10px;
    padding: 10px 12px;
    margin-bottom: 8px;
    border: 1px solid #eee;
}

.bill-item-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 6px;
}

.bill-date {
    font-size: 13px;
    font-weight: 600;
    color: #333;
}

.bill-delete-btn {
    background: none;
    border: none;
    color: #999;
    font-size: 18px;
    cursor: pointer;
    padding: 0 4px;
    line-height: 1;
    transition: color 0.2s;
}

.bill-delete-btn:hover {
    color: #e74c3c;
}

.bill-item-details {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    font-size: 12px;
}

.bill-expense {
    color: #e74c3c;
    font-weight: 500;
}

.bill-income {
    color: #27ae60;
    font-weight: 500;
}

.bill-note {
    color: #888;
    font-style: italic;
    width: 100%;
}

.draw-num {
    width: 28px;
    height: 28px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 12px;
    font-weight: 600;
    background: rgba(255,255,255,0.2);
    color: white;
}

/* 命中号码：红色填充 */
.history-num.matched {
    background: #e74c3c;
    color: white;
}

/* 命中数量 */
.match-count {
    margin-left: 8px;
    font-size: 12px;
    color: #555;
}

/* 开奖弹窗 */
.draw-modal-content {
    max-width: 450px;
}

.draw-modal-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 15px;
}

.draw-modal-header h3 {
    margin: 0;
    font-size: 18px;
}

.modal-close-btn {
    background: none;
    border: none;
    font-size: 18px;
    color: #999;
    cursor: pointer;
    padding: 4px 8px;
    border-radius: 4px;
    transition: all 0.2s;
}

.modal-close-btn:hover {
    background: #f0f0f0;
    color: #333;
}

.draw-cards {
    display: flex;
    flex-direction: column;
    gap: 15px;
}

.draw-card {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    border-radius: 12px;
    padding: 15px;
    color: white;
}

.draw-card-title {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 6px;
}

.draw-card-label {
    font-size: 13px;
    font-weight: 600;
    background: rgba(255,255,255,0.2);
    padding: 2px 8px;
    border-radius: 4px;
}

.draw-card-period {
    font-size: 13px;
    font-weight: 500;
}

.draw-card-date {
    font-size: 12px;
    opacity: 0.9;
    margin-bottom: 12px;
}

.draw-card-numbers {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
    justify-content: center;
}

.draw-card-num {
    width: 30px;
    height: 30px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 12px;
    font-weight: 600;
    background: rgba(255,255,255,0.2);
    color: white;
}

.draw-card-placeholder {
    font-size: 14px;
    opacity: 0.9;
    padding: 20px 0;
}

/* ========== 便签功能 ========== */

.btn-note {
    background: rgba(255, 193, 7, 0.15);
    color: #b8860b;
    border: 1px solid rgba(255, 193, 7, 0.35);
}

.btn-note:active {
    background: rgba(255, 193, 7, 0.3);
}

.note-modal {
    max-width: 420px;
    width: 90%;
}

/* ========== 便签弹窗（微信聊天窗口风格） ========== */

.note-chat-modal {
    display: flex;
    flex-direction: column;
    height: 78vh;
    max-height: 640px;
    overflow: hidden;
    padding: 0;
}

/* 顶部栏 */
.note-chat-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 12px 16px;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    flex-shrink: 0;
}

.note-chat-title {
    font-size: 16px;
    font-weight: 600;
}

.note-chat-date-label {
    font-size: 13px;
    font-weight: 400;
    opacity: 0.9;
    margin-left: 2px;
}

.note-chat-copy {
    padding: 5px 12px;
    font-size: 12px;
    border-radius: 15px;
    border: 1px solid rgba(255, 255, 255, 0.4);
    background: rgba(255, 255, 255, 0.18);
    color: white;
    cursor: pointer;
    transition: all 0.2s ease;
    white-space: nowrap;
}

.note-chat-copy:active {
    background: rgba(255, 255, 255, 0.35);
    transform: scale(0.95);
}

.note-chat-header-actions {
    display: flex;
    align-items: center;
    gap: 8px;
    flex-shrink: 0;
}

.note-chat-header-actions .note-chat-copy {
    min-width: 40px;
    text-align: center;
    font-size: 15px;
    padding: 4px 10px;
}

/* 可编辑框列表 */
.note-chat-list {
    flex: 1;
    overflow-y: auto;
    padding: 12px;
    background: #f5f5f7;
    -webkit-overflow-scrolling: touch;
}

.note-chat-list .empty-tip {
    color: #bbb;
    font-size: 13px;
    padding: 40px 0;
}

/* 单条可编辑框 */
.note-chat-item {
    display: flex;
    align-items: flex-start;
    gap: 8px;
    margin-bottom: 10px;
    animation: noteItemIn 0.2s ease;
}

@keyframes noteItemIn {
    from { opacity: 0; transform: translateY(6px); }
    to { opacity: 1; transform: translateY(0); }
}

/* 可编辑文本框（固定两行高度，内容多时可滚动，输入自动保存） */
.note-chat-box {
    flex: 1;
    min-width: 0;
    background: white;
    border: 1px solid #e0e0e5;
    border-radius: 10px;
    padding: 10px 12px;
    font-size: 14px;
    color: #333;
    line-height: 1.6;
    font-family: inherit;
    word-break: break-all;
    resize: none;
    height: 66px;
    overflow-y: auto;
    outline: none;
    box-shadow: 0 1px 2px rgba(0, 0, 0, 0.06);
    transition: border-color 0.2s;
}

.note-chat-box:focus {
    border-color: #667eea;
    box-shadow: 0 0 0 2px rgba(102, 126, 234, 0.15);
}

.note-chat-box::placeholder {
    color: #bbb;
    font-size: 13px;
}

.note-chat-box:focus {
    border-color: #667eea;
    box-shadow: 0 0 0 2px rgba(102, 126, 234, 0.15);
}

.note-chat-box::placeholder {
    color: #bbb;
    font-size: 13px;
}

/* 垃圾桶：单击清空内容，双击删除整框 */
.note-chat-del {
    flex: none;
    width: 32px;
    height: 32px;
    padding: 0;
    font-size: 14px;
    border-radius: 50%;
    border: 1px solid rgba(231, 76, 60, 0.25);
    background: rgba(231, 76, 60, 0.08);
    color: #e74c3c;
    cursor: pointer;
    transition: all 0.2s ease;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    margin-top: 6px;
    opacity: 0.85;
}

.note-chat-del:active {
    transform: scale(0.9);
    background: rgba(231, 76, 60, 0.2);
}