18fae835a5
Exercises (name + how-to note) are a new synced collection with the same LWW/tombstone contract as events, served by POST /api/exercises/sync. Training sessions are ordinary events (type "training") referencing an exercise by id, so they ride the existing event sync unchanged. The Training panel lists each exercise with last-trained / this-week / streak stats, expandable instructions, and a one-tap Log button with the usual undo/add-note snackbar. An exercise-by-day heatmap shows the last 14 days of consistency, and history and the daily overview count training sessions like any other event.
849 lines
19 KiB
CSS
849 lines
19 KiB
CSS
:root {
|
|
--bg: #f7f5ff;
|
|
--surface: #ffffff;
|
|
--text: #1c1b22;
|
|
--muted: #6b6b78;
|
|
--accent: #7c5cff;
|
|
--accent-soft: #ebe6ff;
|
|
--sleep: #6c8cff;
|
|
--eat: #ff9b3d;
|
|
--pee: #ffd23f;
|
|
--poo: #8a5a3b;
|
|
--weight: #2bb3a3;
|
|
--training: #b04ecf;
|
|
--danger: #d64545;
|
|
--gain: #2e9e5b;
|
|
--border: #e9e6f5;
|
|
--radius: 12px;
|
|
--shadow: 0 1px 2px rgba(20, 14, 60, 0.05), 0 4px 16px rgba(20, 14, 60, 0.05);
|
|
}
|
|
|
|
/* Dark palette. Two triggers, same values (CSS has no way to share them):
|
|
system prefers dark and the user hasn't forced light, OR the user picked
|
|
dark via the Settings toggle. The [data-theme] attribute (set from JS) beats
|
|
the media query on specificity, so an explicit choice always wins. */
|
|
@media (prefers-color-scheme: dark) {
|
|
:root:not([data-theme="light"]) {
|
|
--bg: #14131a;
|
|
--surface: #1f1e28;
|
|
--text: #ebeaf2;
|
|
--muted: #9c9bab;
|
|
--accent: #a690ff;
|
|
--accent-soft: #2a2640;
|
|
--border: #2c2a3a;
|
|
--shadow: 0 1px 2px rgba(0, 0, 0, 0.3), 0 4px 16px rgba(0, 0, 0, 0.3);
|
|
}
|
|
}
|
|
:root[data-theme="dark"] {
|
|
--bg: #14131a;
|
|
--surface: #1f1e28;
|
|
--text: #ebeaf2;
|
|
--muted: #9c9bab;
|
|
--accent: #a690ff;
|
|
--accent-soft: #2a2640;
|
|
--border: #2c2a3a;
|
|
--shadow: 0 1px 2px rgba(0, 0, 0, 0.3), 0 4px 16px rgba(0, 0, 0, 0.3);
|
|
}
|
|
|
|
* { box-sizing: border-box; }
|
|
|
|
html, body {
|
|
margin: 0;
|
|
padding: 0;
|
|
font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Oxygen, Ubuntu, Cantarell, sans-serif;
|
|
background: var(--bg);
|
|
color: var(--text);
|
|
line-height: 1.4;
|
|
}
|
|
|
|
body {
|
|
max-width: 720px;
|
|
margin: 0 auto;
|
|
padding: env(safe-area-inset-top, 0) 16px env(safe-area-inset-bottom, 0) 16px;
|
|
}
|
|
|
|
header {
|
|
display: flex;
|
|
align-items: center;
|
|
justify-content: space-between;
|
|
padding: 20px 4px 8px;
|
|
}
|
|
|
|
h1 {
|
|
font-size: 1.5rem;
|
|
margin: 0;
|
|
}
|
|
|
|
.title {
|
|
display: flex;
|
|
flex-direction: column;
|
|
gap: 2px;
|
|
min-width: 0;
|
|
}
|
|
|
|
.puppy-age {
|
|
font-size: 0.8rem;
|
|
color: var(--muted);
|
|
font-variant-numeric: tabular-nums;
|
|
}
|
|
|
|
.header-actions {
|
|
display: flex;
|
|
align-items: center;
|
|
gap: 8px;
|
|
flex-shrink: 0;
|
|
}
|
|
|
|
.icon-btn {
|
|
padding: 6px 10px;
|
|
font-size: 1.1rem;
|
|
line-height: 1;
|
|
}
|
|
|
|
h2 {
|
|
font-size: 1rem;
|
|
text-transform: uppercase;
|
|
letter-spacing: 0.06em;
|
|
color: var(--muted);
|
|
margin: 0 0 12px;
|
|
}
|
|
|
|
main {
|
|
display: flex;
|
|
flex-direction: column;
|
|
gap: 24px;
|
|
padding: 16px 0 32px;
|
|
}
|
|
|
|
section {
|
|
background: var(--surface);
|
|
border-radius: var(--radius);
|
|
box-shadow: var(--shadow);
|
|
padding: 16px;
|
|
}
|
|
|
|
.big-clock {
|
|
text-align: center;
|
|
padding: 24px 16px;
|
|
}
|
|
|
|
.day-bar {
|
|
display: flex;
|
|
gap: 8px;
|
|
align-items: center;
|
|
padding: 8px 10px;
|
|
}
|
|
.day-bar input[type="date"] {
|
|
flex: 1;
|
|
min-width: 0;
|
|
font-variant-numeric: tabular-nums;
|
|
}
|
|
.day-bar button {
|
|
padding: 8px 14px;
|
|
flex-shrink: 0;
|
|
}
|
|
.day-bar button:disabled {
|
|
opacity: 0.4;
|
|
cursor: not-allowed;
|
|
}
|
|
.big-clock .bc-label {
|
|
font-size: 0.8rem;
|
|
text-transform: uppercase;
|
|
letter-spacing: 0.08em;
|
|
color: var(--muted);
|
|
margin-bottom: 6px;
|
|
}
|
|
.big-clock .bc-time {
|
|
font-size: 3.25rem;
|
|
font-weight: 700;
|
|
font-variant-numeric: tabular-nums;
|
|
line-height: 1.05;
|
|
letter-spacing: -0.01em;
|
|
}
|
|
.big-clock .bc-since {
|
|
margin-top: 6px;
|
|
font-size: 0.8rem;
|
|
color: var(--muted);
|
|
font-variant-numeric: tabular-nums;
|
|
}
|
|
.big-clock.asleep { background: linear-gradient(180deg, var(--surface), color-mix(in srgb, var(--sleep) 10%, var(--surface))); }
|
|
.big-clock.asleep .bc-time { color: var(--sleep); }
|
|
.big-clock.awake { background: linear-gradient(180deg, var(--surface), color-mix(in srgb, var(--accent) 10%, var(--surface))); }
|
|
.big-clock.awake .bc-time { color: var(--accent); }
|
|
|
|
.grid {
|
|
display: grid;
|
|
grid-template-columns: repeat(auto-fit, minmax(140px, 1fr));
|
|
gap: 10px;
|
|
}
|
|
|
|
button {
|
|
font: inherit;
|
|
border: none;
|
|
border-radius: var(--radius);
|
|
padding: 14px 12px;
|
|
cursor: pointer;
|
|
background: var(--accent);
|
|
color: white;
|
|
font-weight: 600;
|
|
transition: transform 0.08s ease, filter 0.15s ease;
|
|
display: inline-flex;
|
|
align-items: center;
|
|
justify-content: center;
|
|
}
|
|
|
|
button:active { transform: scale(0.97); }
|
|
button:hover { filter: brightness(1.05); }
|
|
|
|
button.action.sleep { background: var(--sleep); }
|
|
button.action.eat { background: var(--eat); }
|
|
button.action.pee { background: var(--pee); color: #2b240a; }
|
|
button.action.poo { background: var(--poo); }
|
|
button.action.weight { background: var(--weight); }
|
|
|
|
button.ghost {
|
|
background: transparent;
|
|
color: var(--text);
|
|
border: 1px solid var(--border);
|
|
font-weight: 500;
|
|
padding: 10px 14px;
|
|
}
|
|
|
|
button.danger { background: var(--danger); }
|
|
|
|
.stats {
|
|
display: grid;
|
|
grid-template-columns: repeat(auto-fit, minmax(90px, 1fr));
|
|
gap: 10px;
|
|
margin-bottom: 16px;
|
|
}
|
|
|
|
.stat {
|
|
background: var(--accent-soft);
|
|
padding: 12px;
|
|
border-radius: var(--radius);
|
|
text-align: center;
|
|
}
|
|
|
|
.stat-label {
|
|
font-size: 0.75rem;
|
|
color: var(--muted);
|
|
text-transform: uppercase;
|
|
letter-spacing: 0.05em;
|
|
}
|
|
|
|
.stat-value {
|
|
font-size: 1.25rem;
|
|
font-weight: 700;
|
|
margin-top: 4px;
|
|
}
|
|
|
|
.lasts {
|
|
display: flex;
|
|
flex-direction: column;
|
|
gap: 6px;
|
|
}
|
|
|
|
.last-row {
|
|
display: flex;
|
|
justify-content: space-between;
|
|
padding: 6px 4px;
|
|
font-size: 0.95rem;
|
|
border-bottom: 1px dashed var(--border);
|
|
}
|
|
.last-row:last-child { border-bottom: none; }
|
|
.last-row span:first-child { color: var(--muted); }
|
|
|
|
.muted-note {
|
|
color: var(--muted);
|
|
font-size: 0.8rem;
|
|
font-weight: normal;
|
|
}
|
|
.timing-hint { margin: 10px 4px 0; line-height: 1.4; }
|
|
|
|
.history-controls {
|
|
display: flex;
|
|
align-items: center;
|
|
gap: 8px;
|
|
flex-wrap: wrap;
|
|
margin-bottom: 12px;
|
|
}
|
|
|
|
.history-controls label { color: var(--muted); font-size: 0.85rem; }
|
|
|
|
input[type="date"], input[type="datetime-local"], input[type="text"], input[type="number"], textarea {
|
|
font: inherit;
|
|
background: var(--bg);
|
|
color: var(--text);
|
|
border: 1px solid var(--border);
|
|
border-radius: 8px;
|
|
padding: 8px 10px;
|
|
width: 100%;
|
|
}
|
|
|
|
textarea { resize: vertical; }
|
|
|
|
.event-list {
|
|
list-style: none;
|
|
margin: 0;
|
|
padding: 0;
|
|
display: flex;
|
|
flex-direction: column;
|
|
gap: 6px;
|
|
}
|
|
|
|
.wake-list {
|
|
list-style: none;
|
|
margin: 0;
|
|
padding: 0;
|
|
display: flex;
|
|
flex-direction: column;
|
|
gap: 6px;
|
|
}
|
|
.ww {
|
|
display: flex;
|
|
align-items: center;
|
|
gap: 10px;
|
|
background: var(--bg);
|
|
border: 1px solid var(--border);
|
|
border-radius: var(--radius);
|
|
padding: 10px 12px;
|
|
}
|
|
.ww .ww-range {
|
|
font-variant-numeric: tabular-nums;
|
|
color: var(--muted);
|
|
min-width: 120px;
|
|
}
|
|
.ww .ww-dur {
|
|
font-weight: 600;
|
|
flex: 1;
|
|
}
|
|
.ww.ongoing {
|
|
border-color: var(--accent);
|
|
background: var(--accent-soft);
|
|
}
|
|
.ww.ongoing .ww-tag {
|
|
font-size: 0.75rem;
|
|
color: var(--accent);
|
|
font-weight: 600;
|
|
text-transform: uppercase;
|
|
letter-spacing: 0.05em;
|
|
}
|
|
.ww.sleep-ww.ongoing {
|
|
border-color: var(--sleep);
|
|
background: color-mix(in srgb, var(--sleep) 14%, var(--surface));
|
|
}
|
|
.ww.sleep-ww.ongoing .ww-tag { color: var(--sleep); }
|
|
|
|
.event {
|
|
display: flex;
|
|
align-items: center;
|
|
gap: 10px;
|
|
background: var(--bg);
|
|
border: 1px solid var(--border);
|
|
border-radius: var(--radius);
|
|
padding: 10px 12px;
|
|
cursor: pointer;
|
|
}
|
|
|
|
.event .dot {
|
|
width: 12px;
|
|
height: 12px;
|
|
border-radius: 50%;
|
|
flex-shrink: 0;
|
|
}
|
|
.event[data-type="sleep-start"] .dot,
|
|
.event[data-type="sleep-end"] .dot { background: var(--sleep); }
|
|
.event[data-type="eat"] .dot { background: var(--eat); }
|
|
.event[data-type="pee"] .dot { background: var(--pee); }
|
|
.event[data-type="poo"] .dot { background: var(--poo); }
|
|
.event[data-type="weight"] .dot { background: var(--weight); }
|
|
.event[data-type="training"] .dot { background: var(--training); }
|
|
|
|
.event .time { font-variant-numeric: tabular-nums; color: var(--muted); min-width: 60px; }
|
|
.event .label { font-weight: 600; min-width: 110px; }
|
|
.event .note { color: var(--muted); font-size: 0.9rem; flex: 1; }
|
|
|
|
.empty {
|
|
color: var(--muted);
|
|
text-align: center;
|
|
padding: 12px 0;
|
|
}
|
|
|
|
.status-pill {
|
|
font-size: 0.75rem;
|
|
padding: 4px 10px;
|
|
border-radius: 999px;
|
|
background: var(--accent-soft);
|
|
color: var(--accent);
|
|
font-weight: 600;
|
|
}
|
|
.status-pill.offline { background: #ffe0e0; color: #b03030; }
|
|
.status-pill.error { background: #ffe0e0; color: #b03030; }
|
|
.status-pill.syncing { background: #e0eaff; color: #2a4ab0; }
|
|
.status-pill.pending { background: #fff1d4; color: #8a5a00; }
|
|
@media (prefers-color-scheme: dark) {
|
|
.status-pill.offline { background: #4a1f1f; color: #ff9090; }
|
|
.status-pill.error { background: #4a1f1f; color: #ff9090; }
|
|
.status-pill.syncing { background: #1f2c4a; color: #9eb6ff; }
|
|
.status-pill.pending { background: #4a3a1f; color: #ffd28a; }
|
|
}
|
|
|
|
dialog {
|
|
border: none;
|
|
border-radius: var(--radius);
|
|
padding: 20px;
|
|
background: var(--surface);
|
|
color: var(--text);
|
|
box-shadow: var(--shadow);
|
|
max-width: 480px;
|
|
width: calc(100% - 32px);
|
|
}
|
|
|
|
dialog::backdrop { background: rgba(0,0,0,0.4); }
|
|
|
|
dialog h3 { margin: 0 0 12px; }
|
|
|
|
dialog label { display: block; font-size: 0.85rem; color: var(--muted); margin-bottom: 10px; }
|
|
dialog label input, dialog label textarea { margin-top: 4px; }
|
|
|
|
dialog menu {
|
|
display: flex;
|
|
justify-content: flex-end;
|
|
gap: 8px;
|
|
padding: 0;
|
|
margin: 14px 0 0;
|
|
}
|
|
|
|
.photo-field {
|
|
margin-top: 10px;
|
|
display: flex;
|
|
flex-wrap: wrap;
|
|
gap: 8px;
|
|
align-items: center;
|
|
}
|
|
.photo-field button { padding: 8px 12px; }
|
|
.photo-preview {
|
|
margin-top: 8px;
|
|
width: 100%;
|
|
}
|
|
.photo-preview img {
|
|
display: block;
|
|
max-width: 100%;
|
|
max-height: 240px;
|
|
border-radius: 8px;
|
|
border: 1px solid var(--border);
|
|
}
|
|
|
|
.event .thumb {
|
|
width: 40px;
|
|
height: 40px;
|
|
border-radius: 6px;
|
|
object-fit: cover;
|
|
border: 1px solid var(--border);
|
|
flex-shrink: 0;
|
|
cursor: zoom-in;
|
|
background: var(--accent-soft);
|
|
}
|
|
|
|
#lightbox {
|
|
background: #000;
|
|
padding: 0;
|
|
border: none;
|
|
max-width: 100vw;
|
|
max-height: 100vh;
|
|
width: auto;
|
|
height: auto;
|
|
}
|
|
#lightbox::backdrop { background: rgba(0,0,0,0.85); }
|
|
#lightbox img {
|
|
display: block;
|
|
max-width: 95vw;
|
|
max-height: 95vh;
|
|
object-fit: contain;
|
|
}
|
|
.lightbox-close {
|
|
position: absolute;
|
|
top: 8px;
|
|
right: 8px;
|
|
background: rgba(0,0,0,0.5);
|
|
color: #fff;
|
|
font-size: 1.5rem;
|
|
line-height: 1;
|
|
padding: 4px 12px 6px;
|
|
border-radius: 999px;
|
|
font-weight: 400;
|
|
}
|
|
|
|
.time-row {
|
|
display: flex;
|
|
gap: 8px;
|
|
align-items: center;
|
|
flex-wrap: wrap;
|
|
}
|
|
.time-row input { flex: 1 1 120px; min-width: 0; }
|
|
.time-row button { padding: 8px 12px; }
|
|
|
|
.chart { margin-bottom: 16px; }
|
|
.chart:last-child { margin-bottom: 0; }
|
|
.chart-title {
|
|
font-size: 0.8rem;
|
|
color: var(--muted);
|
|
margin-bottom: 6px;
|
|
text-transform: uppercase;
|
|
letter-spacing: 0.04em;
|
|
}
|
|
.chart-svg { display: block; width: 100%; height: auto; }
|
|
.chart-svg text { fill: var(--muted); font-size: 9px; }
|
|
.chart-svg .grid {
|
|
stroke: var(--border);
|
|
stroke-dasharray: 2 3;
|
|
}
|
|
.chart-svg .bar { cursor: pointer; }
|
|
.chart-svg .bar-faded { opacity: 0.7; }
|
|
.chart-svg .bar-sleep { fill: var(--sleep); }
|
|
.chart-svg .bar-pee { fill: var(--pee); }
|
|
.chart-svg .bar-poo { fill: var(--poo); }
|
|
.chart-svg .bar-eat { fill: var(--eat); }
|
|
.chart-svg .weight-line { stroke: var(--weight); stroke-width: 2; fill: none; }
|
|
.chart-svg .weight-dot { fill: var(--weight); }
|
|
.chart-svg .weight-hit { fill: transparent; cursor: pointer; }
|
|
.chart-svg .weight-hit.active {
|
|
fill: color-mix(in srgb, var(--weight) 22%, transparent);
|
|
stroke: var(--weight);
|
|
stroke-width: 1.5;
|
|
}
|
|
|
|
.weight-point-info {
|
|
margin: 6px 4px 0;
|
|
min-height: 1.2em;
|
|
text-align: center;
|
|
}
|
|
|
|
.weight-summary {
|
|
display: grid;
|
|
grid-template-columns: repeat(2, 1fr);
|
|
gap: 10px;
|
|
margin-bottom: 16px;
|
|
}
|
|
.weight-summary .stat-value.up { color: var(--gain); }
|
|
.weight-summary .stat-value.down { color: var(--danger); }
|
|
.ww.weight-ww { cursor: pointer; }
|
|
.ww.weight-ww .ww-dur { text-align: right; }
|
|
|
|
.legend {
|
|
display: flex;
|
|
gap: 14px;
|
|
font-size: 0.8rem;
|
|
color: var(--muted);
|
|
margin-top: 8px;
|
|
flex-wrap: wrap;
|
|
}
|
|
.lg { display: inline-flex; align-items: center; gap: 5px; }
|
|
.lg .sw {
|
|
width: 10px;
|
|
height: 10px;
|
|
border-radius: 2px;
|
|
display: inline-block;
|
|
}
|
|
.lg.pee .sw { background: var(--pee); }
|
|
.lg.poo .sw { background: var(--poo); }
|
|
.lg.eat .sw { background: var(--eat); }
|
|
|
|
/* ---------- auth (login / register) ---------- */
|
|
.auth-screen {
|
|
position: fixed;
|
|
inset: 0;
|
|
display: flex;
|
|
align-items: center;
|
|
justify-content: center;
|
|
padding: 20px;
|
|
background: var(--bg);
|
|
z-index: 50;
|
|
}
|
|
/* The display rule above beats the UA [hidden] rule, so hide explicitly. */
|
|
.auth-screen[hidden] { display: none; }
|
|
.auth-card {
|
|
width: 100%;
|
|
max-width: 360px;
|
|
background: var(--surface);
|
|
border: 1px solid var(--border);
|
|
border-radius: var(--radius);
|
|
box-shadow: var(--shadow);
|
|
padding: 28px 22px;
|
|
}
|
|
.auth-card h1 { margin: 0 0 4px; font-size: 1.5rem; text-align: center; }
|
|
.auth-sub { margin: 0 0 20px; text-align: center; color: var(--muted); font-size: 0.9rem; }
|
|
.auth-card label {
|
|
display: block;
|
|
font-size: 0.85rem;
|
|
color: var(--muted);
|
|
margin-bottom: 12px;
|
|
}
|
|
.auth-card input[type="email"],
|
|
.auth-card input[type="password"],
|
|
.auth-card input[type="text"] {
|
|
font: inherit;
|
|
background: var(--bg);
|
|
color: var(--text);
|
|
border: 1px solid var(--border);
|
|
border-radius: 8px;
|
|
padding: 10px 12px;
|
|
width: 100%;
|
|
margin-top: 4px;
|
|
}
|
|
.auth-card #auth-submit { width: 100%; margin-top: 6px; }
|
|
.auth-error {
|
|
color: var(--danger);
|
|
font-size: 0.85rem;
|
|
margin: 0 0 12px;
|
|
text-align: center;
|
|
}
|
|
.auth-toggle {
|
|
margin: 16px 0 0;
|
|
text-align: center;
|
|
font-size: 0.85rem;
|
|
color: var(--muted);
|
|
}
|
|
button.linklike {
|
|
background: none;
|
|
border: none;
|
|
color: var(--accent);
|
|
font-weight: 600;
|
|
padding: 0 0 0 4px;
|
|
display: inline;
|
|
cursor: pointer;
|
|
}
|
|
button.linklike:hover { text-decoration: underline; filter: none; }
|
|
|
|
/* ---------- delete account ---------- */
|
|
.settings-sep {
|
|
border: none;
|
|
border-top: 1px solid var(--border);
|
|
margin: 18px 0 12px;
|
|
}
|
|
.danger-block { width: 100%; }
|
|
.danger-text {
|
|
font-size: 0.9rem;
|
|
color: var(--muted);
|
|
margin: 0 0 14px;
|
|
line-height: 1.4;
|
|
}
|
|
.danger-text strong { color: var(--danger); }
|
|
|
|
/* ---------- settings toggle switch ---------- */
|
|
.toggle-row {
|
|
display: flex;
|
|
align-items: center;
|
|
justify-content: space-between;
|
|
gap: 12px;
|
|
}
|
|
.toggle-row > span { color: var(--text); font-size: 0.95rem; }
|
|
input.switch {
|
|
appearance: none;
|
|
-webkit-appearance: none;
|
|
width: 44px;
|
|
height: 26px;
|
|
margin: 0;
|
|
border-radius: 13px;
|
|
background: var(--border);
|
|
position: relative;
|
|
cursor: pointer;
|
|
flex-shrink: 0;
|
|
transition: background 0.15s ease;
|
|
}
|
|
input.switch::after {
|
|
content: "";
|
|
position: absolute;
|
|
top: 3px;
|
|
left: 3px;
|
|
width: 20px;
|
|
height: 20px;
|
|
border-radius: 50%;
|
|
background: #fff;
|
|
transition: transform 0.15s ease;
|
|
}
|
|
input.switch:checked { background: var(--accent); }
|
|
input.switch:checked::after { transform: translateX(18px); }
|
|
|
|
/* ---------- update banner ---------- */
|
|
.update-banner {
|
|
position: fixed;
|
|
top: 0;
|
|
left: 0;
|
|
right: 0;
|
|
z-index: 70;
|
|
display: flex;
|
|
align-items: center;
|
|
justify-content: center;
|
|
gap: 12px;
|
|
flex-wrap: wrap;
|
|
padding: calc(10px + env(safe-area-inset-top, 0)) 16px 10px;
|
|
background: var(--accent);
|
|
color: #fff;
|
|
box-shadow: var(--shadow);
|
|
}
|
|
.update-banner[hidden] { display: none; }
|
|
.update-banner-msg { font-size: 0.9rem; font-weight: 600; }
|
|
.update-banner-actions { display: flex; gap: 8px; }
|
|
.update-banner-btn {
|
|
background: #fff;
|
|
color: var(--accent);
|
|
font-weight: 700;
|
|
padding: 6px 14px;
|
|
}
|
|
.update-banner-btn.ghostish {
|
|
background: transparent;
|
|
color: #fff;
|
|
border: 1px solid rgba(255, 255, 255, 0.6);
|
|
}
|
|
.update-banner-btn:hover { filter: brightness(0.97); }
|
|
|
|
/* ---------- quick-log snackbar ---------- */
|
|
.snackbar {
|
|
position: fixed;
|
|
left: 50%;
|
|
bottom: calc(16px + env(safe-area-inset-bottom, 0));
|
|
transform: translate(-50%, 12px);
|
|
z-index: 60;
|
|
display: flex;
|
|
align-items: center;
|
|
gap: 8px;
|
|
max-width: calc(100% - 32px);
|
|
padding: 8px 8px 8px 16px;
|
|
background: var(--surface);
|
|
color: var(--text);
|
|
border: 1px solid var(--border);
|
|
border-radius: 999px;
|
|
box-shadow: var(--shadow);
|
|
opacity: 0;
|
|
pointer-events: none;
|
|
transition: opacity 0.18s ease, transform 0.18s ease;
|
|
}
|
|
.snackbar[hidden] { display: none; }
|
|
.snackbar.show {
|
|
opacity: 1;
|
|
transform: translate(-50%, 0);
|
|
pointer-events: auto;
|
|
}
|
|
.snackbar-msg {
|
|
font-size: 0.9rem;
|
|
font-weight: 500;
|
|
white-space: nowrap;
|
|
overflow: hidden;
|
|
text-overflow: ellipsis;
|
|
}
|
|
.snackbar-action {
|
|
background: transparent;
|
|
color: var(--accent);
|
|
font-weight: 700;
|
|
padding: 6px 10px;
|
|
flex-shrink: 0;
|
|
}
|
|
.snackbar-action:hover { filter: none; background: var(--accent-soft); }
|
|
|
|
/* ---------- pattern charts (sleep timeline + hour heatmap) ---------- */
|
|
.chart-svg .stl-track {
|
|
fill: var(--bg);
|
|
stroke: var(--border);
|
|
stroke-width: 0.5;
|
|
}
|
|
.chart-svg .stl-sleep { fill: var(--sleep); }
|
|
.chart-svg .stl-today { fill: var(--accent); font-weight: 600; }
|
|
.chart-svg .stl-hit { fill: transparent; cursor: pointer; }
|
|
.chart-svg .stl-hit:hover { fill: var(--accent); fill-opacity: 0.08; }
|
|
|
|
.chart-svg .hm-cell { stroke: none; }
|
|
.chart-svg .hm-pee { fill: var(--pee); }
|
|
.chart-svg .hm-poo { fill: var(--poo); }
|
|
.chart-svg .hm-eat { fill: var(--eat); }
|
|
.chart-svg .hm-training { fill: var(--training); }
|
|
|
|
/* ---------- training ---------- */
|
|
.training-list {
|
|
list-style: none;
|
|
margin: 0 0 10px;
|
|
padding: 0;
|
|
display: flex;
|
|
flex-direction: column;
|
|
gap: 8px;
|
|
}
|
|
.training-list:empty { margin: 0; }
|
|
|
|
.exercise {
|
|
background: var(--bg);
|
|
border: 1px solid var(--border);
|
|
border-radius: var(--radius);
|
|
padding: 10px 12px;
|
|
}
|
|
|
|
.ex-row {
|
|
display: flex;
|
|
align-items: center;
|
|
gap: 10px;
|
|
cursor: pointer;
|
|
}
|
|
|
|
.ex-main {
|
|
flex: 1;
|
|
min-width: 0;
|
|
display: flex;
|
|
flex-direction: column;
|
|
gap: 2px;
|
|
}
|
|
|
|
.ex-name { font-weight: 600; }
|
|
.ex-meta { color: var(--muted); font-size: 0.8rem; }
|
|
|
|
button.ex-log {
|
|
background: var(--training);
|
|
padding: 8px 14px;
|
|
flex-shrink: 0;
|
|
}
|
|
|
|
.ex-detail { display: none; }
|
|
.exercise.expanded .ex-detail {
|
|
display: flex;
|
|
align-items: flex-start;
|
|
gap: 10px;
|
|
margin-top: 10px;
|
|
padding-top: 10px;
|
|
border-top: 1px solid var(--border);
|
|
}
|
|
|
|
.ex-note {
|
|
flex: 1;
|
|
margin: 0;
|
|
color: var(--muted);
|
|
font-size: 0.9rem;
|
|
line-height: 1.4;
|
|
white-space: pre-wrap;
|
|
}
|
|
|
|
button.ex-edit { padding: 6px 12px; flex-shrink: 0; }
|
|
|
|
.training-add { width: 100%; }
|
|
.training-chart { margin-top: 16px; }
|
|
|
|
/* ---------- collapsible panels ---------- */
|
|
section.collapsible > h2 {
|
|
cursor: pointer;
|
|
position: relative;
|
|
padding-right: 20px;
|
|
-webkit-user-select: none;
|
|
user-select: none;
|
|
}
|
|
section.collapsible > h2::after {
|
|
content: "▾";
|
|
position: absolute;
|
|
right: 0;
|
|
top: 50%;
|
|
transform: translateY(-50%);
|
|
transition: transform 0.15s ease;
|
|
color: var(--muted);
|
|
font-size: 0.85em;
|
|
}
|
|
section.collapsed > h2::after { transform: translateY(-50%) rotate(-90deg); }
|
|
section.collapsed > h2 { margin-bottom: 0; }
|
|
section.collapsed > :not(h2) { display: none; }
|