a3e8911deb
- 新增作息报时器独立模块,包含完整的日程管理、语音播报和待机功能 - 短链接正式前缀由/l/改为/to/,解决手机小屏下与I、i、1字形混淆问题 - 保留旧前缀/l/、/L/、/I/、/i/兼容已分发的旧短链 - 新增短码大小写兜底匹配,仅唯一匹配时生效避免歧义 - 新增防爆紧急替换功能,可轮换首页鉴权并替换短链接 - 新增多个调试和集成测试脚本,保障数据安全和功能回归
610 lines
34 KiB
CSS
610 lines
34 KiB
CSS
/* ============================================================
|
||
框子 · 运动提醒宝 — order_box.css
|
||
深色主题 / 移动端优先 / 所有色值统一走 CSS 变量
|
||
============================================================ */
|
||
|
||
/* ---------- 主题变量 ---------- */
|
||
:root {
|
||
--bg: #080b12;
|
||
--surface: #121826;
|
||
--surface-soft: #1a2234;
|
||
--surface-strong: #202b42;
|
||
--primary: #f0b35f;
|
||
--primary-soft: rgba(240, 179, 95, 0.16);
|
||
--text: #f6f7fb;
|
||
--text-secondary: #9ba7bc;
|
||
--text-disabled: #5a6578;
|
||
--border: #2a3449;
|
||
--border-hover: #3b4866;
|
||
--success: #4ade80;
|
||
--warning: #fbbf24;
|
||
--error: #ef4444;
|
||
--radius-sm: 8px;
|
||
--radius-md: 12px;
|
||
--radius-lg: 18px;
|
||
--radius-xl: 24px;
|
||
}
|
||
|
||
/* ---------- Reset ---------- */
|
||
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
|
||
html { -webkit-text-size-adjust: 100%; }
|
||
body {
|
||
background-color: var(--bg);
|
||
background-image:
|
||
radial-gradient(1100px 560px at 88% -12%, rgba(240,179,95,0.07), transparent 60%),
|
||
radial-gradient(900px 520px at -12% 32%, rgba(72,104,180,0.10), transparent 55%);
|
||
background-attachment: fixed;
|
||
color: var(--text);
|
||
font-family: system-ui, -apple-system, sans-serif;
|
||
-webkit-user-select: none; user-select: none;
|
||
-webkit-tap-highlight-color: transparent;
|
||
overflow-x: hidden;
|
||
}
|
||
input, textarea { -webkit-user-select: text; user-select: text; font-family: inherit; }
|
||
button { border: none; background: none; cursor: pointer; font: inherit; color: inherit; -webkit-tap-highlight-color: transparent; }
|
||
button:disabled { cursor: not-allowed; }
|
||
svg { display: block; flex-shrink: 0; }
|
||
:focus-visible { outline: 2px solid var(--primary); outline-offset: 2px; }
|
||
input[type='number']::-webkit-outer-spin-button,
|
||
input[type='number']::-webkit-inner-spin-button { -webkit-appearance: none; margin: 0; }
|
||
input[type='number'] { -moz-appearance: textfield; appearance: textfield; }
|
||
|
||
/* ---------- 滚动条 ---------- */
|
||
::-webkit-scrollbar { width: 4px; height: 4px; }
|
||
::-webkit-scrollbar-thumb { background: var(--border); border-radius: 2px; }
|
||
::-webkit-scrollbar-track { background: transparent; }
|
||
|
||
/* ---------- 动画 ---------- */
|
||
@keyframes spin { to { transform: rotate(360deg); } }
|
||
@keyframes fadeIn { from { opacity: 0; } to { opacity: 1; } }
|
||
@keyframes slideUp { from { transform: translateY(100%); } to { transform: translateY(0); } }
|
||
@keyframes scaleIn { from { transform: scale(0.9); opacity: 0; } to { transform: scale(1); opacity: 1; } }
|
||
@keyframes fadeUp { from { opacity: 0; transform: translateY(10px); } to { opacity: 1; transform: translateY(0); } }
|
||
@keyframes pausedBlink { 0%,100% { opacity: 1; } 50% { opacity: 0.35; } }
|
||
|
||
/* ============================================================
|
||
视图骨架
|
||
============================================================ */
|
||
/* 老浏览器(如老版 iOS Safari)不支持 dvh / inset 简写,会整条丢弃该声明。
|
||
凡是用到这些新特性处,先写一份等效的传统写法兜底,再写新写法做渐进增强。 */
|
||
.view { min-height: 100vh; min-height: 100dvh; display: flex; flex-direction: column; }
|
||
.page { animation: fadeUp 0.25s ease both; }
|
||
|
||
/* ============================================================
|
||
Hub 首页
|
||
============================================================ */
|
||
#viewHub { justify-content: center; padding: 24px; }
|
||
.hub-header { margin-bottom: 28px; animation: fadeUp 0.35s ease both; }
|
||
.hub-title { font-size: 28px; font-weight: 700; letter-spacing: 1px; line-height: 1.2; }
|
||
.hub-subtitle { font-size: 16px; color: var(--text-secondary); line-height: 1.5; margin-top: 8px; }
|
||
.hub-kit-list { display: flex; flex-direction: column; gap: 12px; }
|
||
.kit-card {
|
||
display: flex; flex-direction: row; align-items: center; gap: 16px; width: 100%;
|
||
padding: 16px; background: var(--surface); border-radius: var(--radius-md);
|
||
border: 1px solid var(--border); text-align: left;
|
||
transition: border-color 0.2s, transform 0.2s, box-shadow 0.2s;
|
||
animation: fadeUp 0.4s 0.08s ease both;
|
||
}
|
||
.kit-card:not(:disabled):hover { border-color: var(--border-hover); transform: translateY(-2px); box-shadow: 0 8px 24px rgba(0,0,0,0.35); }
|
||
.kit-card:not(:disabled):active { transform: translateY(0) scale(0.98); }
|
||
.kit-card:disabled { opacity: 0.5; }
|
||
.kit-icon-wrap { width: 48px; height: 48px; border-radius: 50%; background: var(--primary-soft); display: flex; align-items: center; justify-content: center; }
|
||
.kit-icon { width: 28px; height: 28px; color: var(--primary); }
|
||
.kit-info { display: flex; flex-direction: column; flex: 1; gap: 2px; }
|
||
.kit-name { font-size: 20px; font-weight: 600; }
|
||
.kit-desc { font-size: 14px; color: var(--text-secondary); line-height: 1.45; }
|
||
.kit-arrow { width: 24px; height: 24px; color: var(--text-secondary); transition: transform 0.2s; }
|
||
.kit-card:not(:disabled):hover .kit-arrow { transform: translateX(3px); color: var(--primary); }
|
||
|
||
/* ============================================================
|
||
运动提醒宝 · 顶部栏 / 主体 / Tab
|
||
============================================================ */
|
||
.motion-header { padding: 12px 16px; padding-top: calc(12px + env(safe-area-inset-top)); }
|
||
.btn-back { display: flex; flex-direction: row; align-items: center; gap: 4px; color: var(--text-secondary); font-size: 14px; transition: color 0.2s, transform 0.15s; }
|
||
.btn-back svg { width: 18px; height: 18px; }
|
||
.btn-back:hover { color: var(--text); }
|
||
.btn-back:active { transform: scale(0.96); }
|
||
.motion-body { flex: 1; overflow-y: auto; padding: 0 16px 80px; }
|
||
.tab-bar { position: fixed; bottom: 0; left: 0; right: 0; background: var(--surface); border-top: 1px solid var(--border); display: flex; flex-direction: row; padding-bottom: env(safe-area-inset-bottom); z-index: 50; }
|
||
.tab-item { flex: 1; display: flex; flex-direction: column; align-items: center; gap: 4px; padding: 8px 0; color: var(--text-secondary); font-size: 12px; transition: color 0.2s; }
|
||
.tab-item svg { width: 22px; height: 22px; transition: transform 0.2s; }
|
||
.tab-item:hover { color: var(--text); }
|
||
.tab-item.active { color: var(--primary); }
|
||
.tab-item.active svg { transform: translateY(-1px); }
|
||
|
||
/* ============================================================
|
||
残留 session 警告
|
||
============================================================ */
|
||
.stale-warning { padding: 16px; border: 1px solid var(--warning); border-radius: var(--radius-md); margin-bottom: 16px; background: rgba(251,191,36,0.07); animation: fadeUp 0.3s ease both; }
|
||
.stale-title { font-size: 14px; font-weight: 600; color: var(--warning); }
|
||
.stale-desc { font-size: 13px; color: var(--text-secondary); margin-top: 4px; line-height: 1.5; }
|
||
.btn-stale-clean { margin-top: 12px; padding: 8px 16px; background: var(--warning); color: #000; border-radius: var(--radius-sm); font-weight: 600; font-size: 14px; transition: transform 0.15s, filter 0.2s; }
|
||
.btn-stale-clean:hover { filter: brightness(1.08); }
|
||
.btn-stale-clean:active { transform: scale(0.96); }
|
||
|
||
/* 语音不可用预警:沿用 stale-warning 结构,改用错误色以区别于残留 session 警告 */
|
||
.voice-warning { border-color: var(--error); background: rgba(239,68,68,0.07); }
|
||
.voice-warning .stale-title { color: var(--error); }
|
||
.voice-warning .btn-stale-clean { background: var(--error); color: #fff; }
|
||
.voice-probe-text { color: var(--primary); font-weight: 600; }
|
||
|
||
/* ============================================================
|
||
卡片页
|
||
============================================================ */
|
||
.cards-toolbar { padding: 8px 0; display: flex; justify-content: flex-end; }
|
||
.btn-primary {
|
||
display: flex; flex-direction: row; align-items: center; gap: 6px;
|
||
padding: 10px 20px; background: var(--primary); color: #081018;
|
||
border-radius: var(--radius-md); font-weight: 700; font-size: 14px;
|
||
box-shadow: 0 4px 16px rgba(240,179,95,0.25);
|
||
transition: transform 0.15s, filter 0.2s, box-shadow 0.2s;
|
||
}
|
||
.btn-primary svg { width: 18px; height: 18px; }
|
||
.btn-primary:hover:not(:disabled) { filter: brightness(1.06); box-shadow: 0 6px 20px rgba(240,179,95,0.35); }
|
||
.btn-primary:active:not(:disabled) { transform: scale(0.96); }
|
||
.btn-primary:disabled { opacity: 0.5; box-shadow: none; }
|
||
|
||
.cards-list { display: flex; flex-direction: column; }
|
||
.card-item {
|
||
background: var(--surface); border-radius: var(--radius-md); padding: 16px;
|
||
margin-bottom: 12px; border: 1px solid var(--border);
|
||
transition: border-color 0.2s, transform 0.2s, box-shadow 0.2s;
|
||
animation: fadeUp 0.3s ease both;
|
||
}
|
||
.card-item:hover { border-color: var(--border-hover); transform: translateY(-1px); box-shadow: 0 6px 20px rgba(0,0,0,0.3); }
|
||
.card-item-header { display: flex; flex-direction: row; justify-content: space-between; align-items: center; gap: 8px; }
|
||
.card-title { font-size: 20px; font-weight: 600; }
|
||
.card-meta { font-size: 14px; color: var(--text-secondary); margin-top: 4px; }
|
||
.card-sub { font-size: 13px; color: var(--text-disabled); margin-top: 2px; }
|
||
|
||
/* 步骤预览 — JS 用 .step-preview */
|
||
.step-preview { margin-top: 8px; }
|
||
.step-preview-line { font-size: 13px; color: var(--text-secondary); line-height: 1.6; }
|
||
.step-preview-more { font-size: 13px; color: var(--text-disabled); font-style: italic; line-height: 1.6; }
|
||
|
||
.card-actions { display: flex; flex-direction: row; flex-wrap: wrap; gap: 8px; margin-top: 12px; }
|
||
|
||
/* 卡片按钮 — JS 用 .btn-card-primary / .btn-card-ghost */
|
||
.btn-card-primary {
|
||
display: flex; flex-direction: row; align-items: center; gap: 4px;
|
||
padding: 8px 16px; background: var(--primary); color: #081018;
|
||
border-radius: var(--radius-sm); font-weight: 700; font-size: 13px;
|
||
transition: transform 0.15s, filter 0.2s;
|
||
}
|
||
.btn-card-primary svg { width: 16px; height: 16px; }
|
||
.btn-card-primary:hover { filter: brightness(1.08); }
|
||
.btn-card-primary:active { transform: scale(0.95); }
|
||
.btn-card-ghost {
|
||
padding: 8px 16px; border: 1px solid var(--border); border-radius: var(--radius-sm);
|
||
color: var(--text-secondary); font-size: 13px;
|
||
transition: border-color 0.2s, color 0.2s, transform 0.15s;
|
||
}
|
||
.btn-card-ghost:hover { border-color: var(--border-hover); color: var(--text); }
|
||
.btn-card-ghost:active { transform: scale(0.95); }
|
||
.btn-text-danger { color: var(--error); }
|
||
|
||
/* 通用 btn-text span */
|
||
.btn-text { display: inline; }
|
||
|
||
/* 对话框里用的实心危险按钮 */
|
||
.btn-danger { padding: 8px 16px; background: var(--error); color: #fff; border-radius: var(--radius-sm); font-size: 14px; font-weight: 600; transition: transform 0.15s, filter 0.2s; }
|
||
.btn-danger:hover { filter: brightness(1.1); }
|
||
.btn-danger:active { transform: scale(0.95); }
|
||
|
||
/* ============================================================
|
||
空状态 / 加载
|
||
============================================================ */
|
||
.empty-state { text-align: center; padding: 48px 24px; animation: fadeIn 0.3s ease both; }
|
||
.empty-title { font-size: 18px; font-weight: 600; color: var(--text-secondary); }
|
||
.empty-desc { font-size: 14px; color: var(--text-disabled); margin-top: 8px; line-height: 1.5; }
|
||
.loading-wrap { display: flex; align-items: center; justify-content: center; padding: 48px; }
|
||
.spinner { width: 32px; height: 32px; border: 3px solid var(--border); border-top-color: var(--primary); border-radius: 50%; animation: spin 0.8s linear infinite; }
|
||
|
||
/* ============================================================
|
||
历史页 — JS 用 .history-line / .history-badge
|
||
============================================================ */
|
||
.history-list { display: flex; flex-direction: column; padding-top: 8px; }
|
||
.history-item {
|
||
background: var(--surface); border-radius: var(--radius-md); padding: 16px;
|
||
margin-bottom: 12px; border: 1px solid var(--border);
|
||
transition: border-color 0.2s; animation: fadeUp 0.3s ease both;
|
||
}
|
||
.history-item:hover { border-color: var(--border-hover); }
|
||
.history-title { font-size: 18px; font-weight: 600; margin-bottom: 8px; }
|
||
.history-line { font-size: 14px; color: var(--text-secondary); line-height: 1.8; }
|
||
.history-badge { display: inline-block; padding: 1px 8px; border-radius: 999px; font-size: 12px; font-weight: 600; }
|
||
.history-badge.badge-warning { background: rgba(251,191,36,0.15); color: var(--warning); }
|
||
.history-badge.badge-success { background: rgba(74,222,128,0.15); color: var(--success); }
|
||
.history-badge.badge-muted { background: var(--surface-strong); color: var(--text-disabled); }
|
||
|
||
/* ============================================================
|
||
Modal(底部抽屉 / 全屏)
|
||
============================================================ */
|
||
/* 关键:inset: 0 在老 iOS(<14.1)不被支持,会被整条丢弃,
|
||
遮罩将失去定位而跑到文档静态位置(视口外)→ 全屏弹窗和按钮都看不见。
|
||
因此这里改写成四条独立定位,任何浏览器都认。 */
|
||
.modal-overlay { position: fixed; top: 0; right: 0; bottom: 0; left: 0; background: rgba(0,0,0,0.58); z-index: 100; display: flex; flex-direction: column; justify-content: flex-end; animation: fadeIn 0.2s ease both; }
|
||
.modal-fullscreen { justify-content: stretch; align-items: stretch; }
|
||
.modal-sheet { width: 100%; background: var(--bg); border-radius: var(--radius-xl) var(--radius-xl) 0 0; max-height: 92vh; max-height: 92dvh; display: flex; flex-direction: column; animation: slideUp 0.3s ease-out both; border-top: 1px solid var(--border); }
|
||
.sheet-header { display: flex; flex-direction: row; justify-content: space-between; align-items: center; padding: 16px 20px; border-bottom: 1px solid var(--border); }
|
||
.sheet-title { font-size: 18px; font-weight: 600; }
|
||
.sheet-body { flex: 1; overflow-y: auto; padding: 20px; }
|
||
.btn-icon { width: 32px; height: 32px; display: flex; align-items: center; justify-content: center; color: var(--text); border-radius: var(--radius-sm); transition: color 0.2s, background 0.2s, transform 0.15s; }
|
||
.btn-icon svg { width: 24px; height: 24px; }
|
||
.btn-icon:hover { background: var(--surface-soft); }
|
||
.btn-icon:active { transform: scale(0.9); }
|
||
|
||
/* ============================================================
|
||
通用弹窗 / 交互详情弹窗
|
||
============================================================ */
|
||
.dialog-overlay { position: fixed; top: 0; right: 0; bottom: 0; left: 0; background: rgba(0,0,0,0.6); z-index: 200; display: flex; align-items: center; justify-content: center; animation: fadeIn 0.15s ease both; }
|
||
.dialog-box { background: var(--surface); border-radius: var(--radius-lg); padding: 24px; max-width: 340px; width: calc(100% - 48px); animation: scaleIn 0.2s ease both; border: 1px solid var(--border); box-shadow: 0 16px 48px rgba(0,0,0,0.5); }
|
||
.dialog-title { font-size: 18px; font-weight: 600; margin-bottom: 12px; }
|
||
.dialog-body { font-size: 14px; color: var(--text-secondary); line-height: 1.6; margin-bottom: 20px; white-space: pre-wrap; word-break: break-word; }
|
||
.dialog-actions { display: flex; flex-direction: row; gap: 8px; justify-content: flex-end; }
|
||
.dialog-header-row { display: flex; flex-direction: row; justify-content: space-between; align-items: center; margin-bottom: 12px; }
|
||
.dialog-header-row .dialog-title { margin-bottom: 0; }
|
||
.dialog-interaction { max-width: 420px; max-height: 80vh; max-height: 80dvh; display: flex; flex-direction: column; }
|
||
.interaction-content { flex: 1; overflow-y: auto; background: var(--bg); border-radius: var(--radius-sm); border: 1px solid var(--border); padding: 12px; font-size: 12px; line-height: 1.5; color: var(--text-secondary); white-space: pre-wrap; word-break: break-all; margin-bottom: 16px; font-family: ui-monospace, 'Cascadia Mono', Consolas, monospace; }
|
||
.btn-copy { color: var(--text-secondary); }
|
||
.btn-copy:hover { color: var(--primary); }
|
||
|
||
/* ============================================================
|
||
Toast
|
||
============================================================ */
|
||
.toast { position: fixed; top: 60px; left: 50%; transform: translateX(-50%) translateY(-8px); padding: 10px 24px; border-radius: 999px; font-size: 14px; color: #fff; z-index: 300; opacity: 0; transition: opacity 0.3s, transform 0.3s; pointer-events: none; box-shadow: 0 8px 24px rgba(0,0,0,0.4); max-width: calc(100vw - 48px); text-align: center; }
|
||
.toast-show { opacity: 1; transform: translateX(-50%) translateY(0); }
|
||
.toast-info { background: #3b82f6; }
|
||
.toast-success { background: #16a34a; }
|
||
.toast-error { background: #ef4444; }
|
||
|
||
/* ============================================================
|
||
编辑器 — 匹配 JS 实际 class 名
|
||
============================================================ */
|
||
.editor-field { margin-bottom: 16px; }
|
||
.editor-label { display: block; font-size: 14px; color: var(--text-secondary); margin-bottom: 6px; }
|
||
.editor-input {
|
||
width: 100%; padding: 12px 16px; background: var(--surface);
|
||
border: 1px solid var(--border); border-radius: var(--radius-sm);
|
||
color: var(--text); font-size: 16px; outline: none;
|
||
transition: border-color 0.2s, box-shadow 0.2s;
|
||
}
|
||
.editor-input:focus { border-color: var(--primary); box-shadow: 0 0 0 3px rgba(240,179,95,0.12); }
|
||
.editor-input::placeholder { color: var(--text-disabled); }
|
||
|
||
/* 循环方式分段按钮 — JS 用 .segment-row / .segment-btn */
|
||
.segment-row { display: flex; flex-direction: row; gap: 8px; }
|
||
.segment-btn {
|
||
flex: 1; padding: 10px; text-align: center; background: var(--surface-strong);
|
||
border-radius: var(--radius-sm); color: var(--text-secondary); font-size: 14px;
|
||
transition: background 0.2s, color 0.2s, transform 0.15s;
|
||
}
|
||
.segment-btn:hover { color: var(--text); }
|
||
.segment-btn:active { transform: scale(0.96); }
|
||
.segment-btn.active { background: var(--primary); color: #081018; font-weight: 600; }
|
||
|
||
/* 编辑器步骤区头部 — JS 用 .editor-steps-header */
|
||
.editor-steps-header { display: flex; flex-direction: row; justify-content: space-between; align-items: center; margin: 20px 0 12px; }
|
||
.editor-section-title { font-size: 20px; font-weight: 600; margin: 0; }
|
||
.editor-steps-buttons { display: flex; flex-direction: row; gap: 8px; }
|
||
.btn-small { padding: 8px 14px; background: var(--surface-strong); border-radius: var(--radius-sm); color: var(--text); font-size: 13px; transition: filter 0.2s, transform 0.15s; }
|
||
.btn-small:hover { filter: brightness(1.2); }
|
||
.btn-small:active { transform: scale(0.95); }
|
||
|
||
/* 总时长预览 — JS 用 .editor-total-duration */
|
||
.editor-total-duration {
|
||
display: flex; flex-direction: row; align-items: center; gap: 8px;
|
||
padding: 12px 16px; background: var(--surface-soft); border-radius: var(--radius-sm);
|
||
margin-bottom: 16px; font-size: 14px; color: var(--text-secondary);
|
||
}
|
||
.editor-total-duration svg { width: 18px; height: 18px; color: var(--primary); }
|
||
|
||
/* 步骤列表容器 — JS 用 .editor-steps-list */
|
||
.editor-steps-list { display: flex; flex-direction: column; }
|
||
|
||
/* --- 步骤卡片 — JS 用 .step-editor --- */
|
||
.step-editor {
|
||
background: var(--surface); border: 1px solid var(--border);
|
||
border-radius: var(--radius-md); padding: 14px; margin-bottom: 10px;
|
||
position: relative;
|
||
transition: border-color 0.2s, opacity 0.2s, transform 0.2s;
|
||
animation: fadeUp 0.25s ease both;
|
||
}
|
||
.step-editor.step-action { border-color: var(--primary-soft); border-left: 3px solid var(--primary); }
|
||
.step-editor.step-rest { border-color: rgba(74,222,128,0.16); border-left: 3px solid var(--success); }
|
||
|
||
/* 步骤头部 — JS 用 .step-editor-header */
|
||
.step-editor-header { display: flex; flex-direction: row; align-items: center; justify-content: space-between; margin-bottom: 10px; }
|
||
.step-title-row { display: flex; flex-direction: row; align-items: center; gap: 8px; }
|
||
.step-badge { font-size: 12px; padding: 2px 8px; border-radius: 999px; font-weight: 600; }
|
||
.step-editor.step-action .step-badge { background: var(--primary); color: #081018; }
|
||
.step-editor.step-rest .step-badge { background: var(--success); color: #081018; }
|
||
.step-index { font-size: 14px; color: var(--text-secondary); }
|
||
|
||
/* 步骤操作按钮 — JS 用 .step-actions / .btn-step-icon */
|
||
.step-actions { display: flex; flex-direction: row; align-items: center; gap: 4px; }
|
||
.btn-step-icon {
|
||
width: 28px; height: 28px; display: flex; align-items: center; justify-content: center;
|
||
color: var(--text-secondary); border-radius: var(--radius-sm);
|
||
transition: color 0.2s, background 0.2s, transform 0.15s;
|
||
}
|
||
.btn-step-icon svg { width: 18px; height: 18px; }
|
||
.btn-step-icon:hover:not(:disabled) { background: var(--surface-soft); }
|
||
.btn-step-icon:active:not(:disabled) { transform: scale(0.9); }
|
||
.btn-step-icon:disabled, .btn-step-icon.disabled { color: var(--text-disabled); pointer-events: none; }
|
||
.btn-step-remove:not(:disabled):not(.disabled) { color: var(--error); }
|
||
|
||
/* 拖拽手柄 — JS 用 .step-drag-handle */
|
||
.step-drag-handle {
|
||
display: flex; align-items: center; justify-content: center;
|
||
color: var(--text-disabled); cursor: grab; padding: 4px;
|
||
-webkit-user-select: none; user-select: none; transition: color 0.2s;
|
||
}
|
||
.step-drag-handle svg { width: 18px; height: 18px; }
|
||
.step-drag-handle:hover { color: var(--text-secondary); }
|
||
.step-drag-handle:active { cursor: grabbing; }
|
||
.step-editor.dragging { opacity: 0.4; }
|
||
.step-editor.drag-over { border-top: 2px solid var(--primary); }
|
||
|
||
/* 步骤内输入框 — JS 用 .editor-input.step-name-input / .step-duration-input */
|
||
.step-name-input { margin-bottom: 8px; font-size: 14px; padding: 10px 12px; background: var(--bg); }
|
||
.step-duration-input { width: 100px; font-size: 14px; padding: 10px 12px; background: var(--bg); margin-bottom: 4px; }
|
||
.step-duration-hint { font-size: 13px; color: var(--text-secondary); white-space: nowrap; margin-top: 4px; }
|
||
|
||
/* 编辑器底部统计 — JS 用 .editor-duration-info / .duration-info-row */
|
||
.editor-duration-info { margin-top: 16px; padding: 14px 16px; background: var(--surface-soft); border-radius: var(--radius-sm); }
|
||
.duration-info-row { display: flex; flex-direction: row; align-items: center; justify-content: space-between; font-size: 14px; color: var(--text-secondary); line-height: 2; }
|
||
.duration-info-label { color: var(--text-secondary); }
|
||
.duration-info-value { color: var(--text); font-weight: 600; }
|
||
.duration-info-highlight { color: var(--primary); }
|
||
|
||
/* 编辑器保存栏 — JS 用 .editor-footer */
|
||
.editor-footer { padding: 16px 0; padding-bottom: calc(16px + env(safe-area-inset-bottom)); }
|
||
.editor-footer .btn-primary { width: 100%; justify-content: center; padding: 14px; font-size: 16px; }
|
||
|
||
/* ============================================================
|
||
执行器(全屏)— 匹配 JS 实际 class 名
|
||
============================================================ */
|
||
.runner-container {
|
||
width: 100%; height: 100vh; height: 100dvh; background: var(--bg);
|
||
display: flex; flex-direction: column; padding: 20px;
|
||
padding-top: calc(20px + env(safe-area-inset-top));
|
||
overflow-y: auto; animation: fadeIn 0.25s ease both;
|
||
}
|
||
|
||
/* 执行器头部 — JS 用 .runner-header */
|
||
.runner-header { text-align: center; margin-bottom: 16px; }
|
||
.runner-badge {
|
||
display: inline-block; padding: 4px 16px; border-radius: 999px;
|
||
font-size: 13px; font-weight: 600; margin-bottom: 8px;
|
||
background: transparent; transition: color 0.3s, border-color 0.3s;
|
||
}
|
||
.runner-badge.badge-action { border: 1px solid var(--primary); color: var(--primary); background: var(--primary-soft); }
|
||
.runner-badge.badge-rest { border: 1px solid var(--success); color: var(--success); background: rgba(74,222,128,0.12); }
|
||
|
||
/* 卡片标题 — JS 用 .runner-title */
|
||
.runner-title { font-size: 24px; font-weight: 700; margin-bottom: 4px; }
|
||
|
||
/* 轮次信息 — JS 用 .runner-loop-text */
|
||
.runner-loop-text { font-size: 14px; color: var(--text-secondary); margin-bottom: 16px; }
|
||
|
||
/* 步骤进度条 — JS 用 .runner-progress / .runner-progress-bar */
|
||
.runner-progress { height: 10px; background: var(--surface); border-radius: 5px; overflow: hidden; margin-bottom: 20px; }
|
||
.runner-progress-bar { height: 100%; background: var(--primary); border-radius: 5px; transition: width 0.3s; box-shadow: 0 0 12px rgba(240,179,95,0.4); }
|
||
|
||
/* 主体区 — JS 用 .runner-main */
|
||
.runner-main { flex: 1; display: flex; flex-direction: column; }
|
||
.runner-label { font-size: 16px; color: var(--text-secondary); margin-bottom: 4px; }
|
||
|
||
/* 横屏/大屏两栏容器 — JS 用 .runner-split-layout / .runner-col-left / .runner-col-right */
|
||
.runner-split-layout {
|
||
display: flex;
|
||
flex-direction: column;
|
||
gap: 16px;
|
||
flex: 1;
|
||
min-height: 0;
|
||
}
|
||
.runner-col-left, .runner-col-right {
|
||
display: flex;
|
||
flex-direction: column;
|
||
min-width: 0;
|
||
min-height: 0;
|
||
}
|
||
.runner-col-right {
|
||
justify-content: flex-end;
|
||
}
|
||
.runner-col-right .runner-footer {
|
||
margin-top: 0;
|
||
}
|
||
|
||
@media (orientation: landscape) and (min-height: 300px), (min-width: 900px) {
|
||
.runner-container { padding: 18px 28px; padding-top: calc(12px + env(safe-area-inset-top)); }
|
||
.runner-header { margin-bottom: 10px; }
|
||
.runner-progress { margin-bottom: 12px; }
|
||
.runner-split-layout {
|
||
flex-direction: row;
|
||
gap: 24px;
|
||
align-items: stretch;
|
||
}
|
||
.runner-col-left,
|
||
.runner-col-right {
|
||
flex: 1 1 0;
|
||
}
|
||
.runner-col-left {
|
||
justify-content: center;
|
||
align-items: stretch;
|
||
padding: 8px 12px;
|
||
}
|
||
.runner-col-right {
|
||
justify-content: space-between;
|
||
padding: 8px 12px;
|
||
overflow-y: auto;
|
||
border-left: 1px solid var(--border);
|
||
}
|
||
.runner-col-left .runner-next-card { margin-bottom: 0; }
|
||
.runner-timer {
|
||
font-size: 90px; /* 老浏览器兜底:不认识 clamp 时用这个 */
|
||
font-size: clamp(72px, 14vw, 128px);
|
||
margin: 8px 0 16px;
|
||
}
|
||
.runner-current { font-size: 34px; font-size: clamp(28px, 4.2vw, 46px); }
|
||
.runner-next { font-size: 26px; font-size: clamp(22px, 3vw, 34px); }
|
||
}
|
||
|
||
/* 当前动作名 — JS 用 .runner-current */
|
||
.runner-current { font-size: 34px; font-weight: 700; margin-bottom: 8px; line-height: 1.2; word-break: break-word; }
|
||
.runner-current.current-action { color: var(--primary); }
|
||
.runner-current.current-rest { color: var(--success); }
|
||
|
||
/* 倒计时 — JS 用 .runner-timer */
|
||
.runner-timer {
|
||
font-size: 90px; font-weight: 700; color: var(--primary);
|
||
text-align: center; margin: 16px 0;
|
||
font-variant-numeric: tabular-nums; line-height: 1; letter-spacing: 2px;
|
||
text-shadow: 0 0 36px rgba(240,179,95,0.35);
|
||
}
|
||
.runner-container.is-paused .runner-timer { animation: pausedBlink 1.2s ease-in-out infinite; }
|
||
|
||
/* 下一个动作卡片 */
|
||
.runner-next-card { padding: 16px; border: 1px solid var(--border); border-radius: var(--radius-xl); background: var(--surface); margin-bottom: 16px; transition: border-color 0.3s; }
|
||
/* 下一个动作名 — JS 用 .runner-next */
|
||
.runner-next { font-size: 26px; font-weight: 700; word-break: break-word; }
|
||
|
||
/* 底部区 — JS 用 .runner-footer */
|
||
.runner-footer { margin-top: auto; }
|
||
|
||
/* 执行信息卡片 */
|
||
.runner-info-card { padding: 14px 16px; background: var(--surface-soft); border-radius: var(--radius-sm); margin-bottom: 16px; }
|
||
.runner-info-row { display: flex; flex-direction: row; justify-content: space-between; font-size: 14px; color: var(--text-secondary); line-height: 2; font-variant-numeric: tabular-nums; }
|
||
.runner-info-label { color: var(--text-secondary); }
|
||
.runner-info-value { color: var(--text); }
|
||
.runner-info-highlight { color: var(--primary); font-weight: 600; }
|
||
|
||
/* 控制按钮 — JS 用 .runner-buttons / .runner-btn */
|
||
.runner-buttons { display: flex; flex-direction: row; gap: 10px; margin-bottom: 16px; }
|
||
.runner-btn {
|
||
flex: 1; padding: 14px; background: var(--surface-strong);
|
||
border-radius: var(--radius-md); color: var(--text);
|
||
font-size: 15px; font-weight: 600;
|
||
transition: filter 0.2s, transform 0.15s;
|
||
}
|
||
.runner-btn:hover { filter: brightness(1.25); }
|
||
.runner-btn:active { transform: scale(0.96); }
|
||
.runner-btn.runner-btn-danger { background: var(--error); color: #fff; }
|
||
.runner-btn.runner-btn-danger:hover { filter: brightness(1.1); }
|
||
|
||
/* 全局进度 — JS 用 .runner-global */
|
||
.runner-global { margin-top: 16px; }
|
||
.runner-global-header { display: flex; flex-direction: row; justify-content: space-between; align-items: center; margin-bottom: 8px; font-size: 18px; }
|
||
.runner-global-label { color: var(--text); }
|
||
.runner-global-percent { font-size: 22px; font-weight: 700; color: var(--primary); font-variant-numeric: tabular-nums; }
|
||
.runner-global-bar-wrap { height: 24px; background: var(--surface-soft); border-radius: 12px; overflow: hidden; margin-bottom: 8px; }
|
||
.runner-global-bar { height: 100%; background: var(--primary); border-radius: 12px; transition: width 0.3s; box-shadow: 0 0 14px rgba(240,179,95,0.35); }
|
||
.runner-global-stats { font-size: 13px; color: var(--text-secondary); text-align: center; font-variant-numeric: tabular-nums; display: flex; flex-direction: row; justify-content: center; gap: 4px; flex-wrap: wrap; }
|
||
.runner-global-divider { color: var(--text-disabled); }
|
||
.runner-global-remaining { color: var(--text-secondary); }
|
||
|
||
/* ============================================================
|
||
作息报时器 — 待机大屏
|
||
============================================================ */
|
||
.standby-panel {
|
||
margin-top: 8px; margin-bottom: 16px; padding: 24px 16px;
|
||
background: var(--surface); border: 1px solid var(--border);
|
||
border-radius: var(--radius-xl); text-align: center;
|
||
animation: fadeUp 0.3s ease both;
|
||
}
|
||
.standby-panel.is-live { border-color: rgba(74,222,128,0.35); }
|
||
.standby-clock {
|
||
/* 先给 vw 兜底(老浏览器不认识 clamp,会丢下一条,但认得 vw,取值一致);
|
||
再用 clamp 做上限控制,避免大屏上无限变大 */
|
||
font-size: 17vw; font-size: clamp(56px, 17vw, 104px);
|
||
font-weight: 700; color: var(--primary);
|
||
line-height: 1; letter-spacing: 2px; font-variant-numeric: tabular-nums;
|
||
text-shadow: 0 0 36px rgba(240,179,95,0.28);
|
||
}
|
||
.standby-date { font-size: 15px; color: var(--text-secondary); margin-top: 10px; }
|
||
.standby-next { font-size: 18px; font-weight: 600; margin-top: 16px; line-height: 1.4; word-break: break-word; }
|
||
.standby-status { font-size: 13px; color: var(--text-disabled); margin-top: 6px; }
|
||
.standby-panel.is-live .standby-status { color: var(--success); }
|
||
.standby-actions { margin-top: 18px; display: flex; justify-content: center; }
|
||
.standby-btn { padding: 12px 32px; font-size: 16px; }
|
||
|
||
/* 错过显示条:复用 stale-warning 结构,橙色警示 */
|
||
.missed-warning { background: rgba(251,191,36,0.05); }
|
||
.missed-line { font-size: 13px; color: var(--text-secondary); line-height: 1.7; }
|
||
|
||
/* ============================================================
|
||
作息报时器 — 日程卡片与时刻预览
|
||
============================================================ */
|
||
.sched-item-preview { margin-top: 8px; }
|
||
.sched-preview-line { font-size: 13px; color: var(--text-secondary); line-height: 1.6; font-variant-numeric: tabular-nums; }
|
||
.sched-preview-line .sched-preview-time { color: var(--primary); font-weight: 600; margin-right: 6px; }
|
||
.sched-preview-more { font-size: 13px; color: var(--text-disabled); font-style: italic; line-height: 1.6; }
|
||
.sched-active-tag {
|
||
display: inline-block; padding: 1px 8px; border-radius: 999px; font-size: 12px; font-weight: 600;
|
||
background: rgba(74,222,128,0.15); color: var(--success); margin-left: 8px;
|
||
}
|
||
|
||
/* ============================================================
|
||
作息报时器 — 编辑器
|
||
============================================================ */
|
||
.weekday-row { display: flex; flex-direction: row; gap: 6px; flex-wrap: wrap; }
|
||
.weekday-chip {
|
||
flex: 1; min-width: 0; padding: 10px 2px; text-align: center;
|
||
background: var(--surface-strong); border-radius: var(--radius-sm);
|
||
color: var(--text-secondary); font-size: 13px; white-space: nowrap;
|
||
transition: background 0.2s, color 0.2s, transform 0.15s;
|
||
}
|
||
.weekday-chip:hover { color: var(--text); }
|
||
.weekday-chip:active { transform: scale(0.94); }
|
||
.weekday-chip.active { background: var(--primary); color: #081018; font-weight: 600; }
|
||
|
||
.sched-item-editor {
|
||
background: var(--surface); border: 1px solid var(--border); border-left: 3px solid var(--primary);
|
||
border-radius: var(--radius-md); padding: 14px; margin-bottom: 10px;
|
||
animation: fadeUp 0.25s ease both;
|
||
}
|
||
.sched-time-input {
|
||
width: 130px; font-size: 16px; padding: 10px 12px; background: var(--bg);
|
||
font-variant-numeric: tabular-nums; color-scheme: dark; margin-bottom: 8px;
|
||
}
|
||
.sched-item-editor .step-badge { background: var(--primary); color: #081018; }
|
||
.sched-item-editor .step-index { font-variant-numeric: tabular-nums; }
|
||
.sched-item-row-2 { display: flex; flex-direction: row; gap: 10px; margin-top: 8px; }
|
||
.sched-item-row-2 .sched-field { flex: 1; min-width: 0; }
|
||
.sched-field-label { display: block; font-size: 12px; color: var(--text-disabled); margin-bottom: 4px; }
|
||
.sched-number-input { width: 100%; font-size: 14px; padding: 10px 12px; background: var(--bg); }
|
||
.sched-item-hint { font-size: 12px; color: var(--text-disabled); margin-top: 8px; line-height: 1.5; }
|
||
|
||
/* ============================================================
|
||
作息报时器 — 播报全屏
|
||
============================================================ */
|
||
.sched-alert-container {
|
||
width: 100%; height: 100vh; height: 100dvh; background: var(--bg);
|
||
display: flex; flex-direction: column; align-items: center; justify-content: center;
|
||
gap: 14px; padding: 24px; padding-top: calc(24px + env(safe-area-inset-top));
|
||
text-align: center; animation: fadeIn 0.25s ease both;
|
||
}
|
||
.sched-alert-badge {
|
||
padding: 4px 16px; border-radius: 999px; font-size: 13px; font-weight: 600;
|
||
border: 1px solid var(--primary); color: var(--primary); background: var(--primary-soft);
|
||
}
|
||
.sched-alert-time {
|
||
font-size: 20vw; font-size: clamp(64px, 20vw, 128px);
|
||
font-weight: 700; color: var(--primary);
|
||
line-height: 1; letter-spacing: 2px; font-variant-numeric: tabular-nums;
|
||
text-shadow: 0 0 48px rgba(240,179,95,0.4);
|
||
}
|
||
.sched-alert-name { font-size: 34px; font-weight: 700; line-height: 1.25; word-break: break-word; }
|
||
.sched-alert-repeat { font-size: 15px; color: var(--text-secondary); font-variant-numeric: tabular-nums; }
|
||
.sched-alert-ack {
|
||
margin-top: 24px; width: 100%; max-width: 360px; justify-content: center;
|
||
padding: 18px; font-size: 20px;
|
||
}
|
||
|
||
/* 记录页条目 */
|
||
.sched-log-badge { display: inline-block; padding: 1px 8px; border-radius: 999px; font-size: 12px; font-weight: 600; }
|
||
.sched-log-badge.badge-fired { background: rgba(240,179,95,0.15); color: var(--primary); }
|
||
.sched-log-badge.badge-acked { background: rgba(74,222,128,0.15); color: var(--success); }
|
||
.sched-log-badge.badge-missed { background: rgba(239,68,68,0.15); color: var(--error); }
|