diff --git a/src/vitals/web/app.py b/src/vitals/web/app.py index 90fe33a..65aa74f 100644 --- a/src/vitals/web/app.py +++ b/src/vitals/web/app.py @@ -6665,17 +6665,55 @@ def get_reading_page_html() -> str: /* 移动端适配 */ @media (max-width: 768px) { .nav { display: none !important; } - body { padding-bottom: 80px; } + body { padding-bottom: calc(80px + env(safe-area-inset-bottom, 0px)); } .container { padding: 12px; } header { padding: 20px 16px; margin-bottom: 20px; } header h1 { font-size: 1.5rem; } - .section { padding: 16px; } + .section { padding: 16px; margin-bottom: 20px; } + .section h2 { font-size: 1.25rem; margin-bottom: 16px; } .book-grid { grid-template-columns: repeat(2, 1fr); gap: 12px; } .book-cover { height: 140px; } - .modal-content { padding: 20px; } + .modal-content { padding: 20px; margin: 12px; max-height: calc(100vh - 24px); } + /* 表单输入框增大 - 防止 iOS 缩放 */ + .form-group input, .form-group select, .form-group textarea { + font-size: 16px !important; + min-height: 48px; + padding: 14px 16px; + } + .form-group textarea { min-height: 80px; } + /* 按钮触摸目标 44px */ + .btn { + min-height: 48px; + padding: 14px 20px; + font-size: 1rem; + } + .modal-footer { flex-direction: column; gap: 10px; } + .modal-footer .btn { width: 100%; } + /* 时长预设按钮 */ + .duration-presets { flex-wrap: wrap; } + .duration-preset { + min-height: 44px; + min-width: 60px; + display: flex; + align-items: center; + justify-content: center; + padding: 10px 14px; + } + /* 心情选择器 */ + .mood-option { + min-width: 48px; + min-height: 48px; + display: flex; + align-items: center; + justify-content: center; + } + /* 图表容器 */ + .chart-container { padding: 16px; min-height: 160px; } + .pie-chart { flex-direction: column; gap: 16px; align-items: center; } } @media (max-width: 400px) { .book-grid { grid-template-columns: 1fr; } + .form-row { grid-template-columns: 1fr; } } @@ -7175,15 +7213,15 @@ def get_reading_page_html() -> str: