Shows mm:ss since the last set was added for the current exercise. Purely client-side — no round trip to the server. Resets on new exercise, clears when no current exercise or 0 sets, and survives draft restore. The settings-toggle gate is still TBD (Profile/settings feature isn't built yet); the timer is small and muted enough to keep always-on in the meantime. Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
494 lines
12 KiB
CSS
494 lines
12 KiB
CSS
/* ── Reset & Telegram-native theming ─────────────────────────── */
|
|
|
|
* {
|
|
margin: 0;
|
|
padding: 0;
|
|
box-sizing: border-box;
|
|
}
|
|
|
|
body {
|
|
font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
|
|
background: var(--tg-theme-bg-color, #ffffff);
|
|
color: var(--tg-theme-text-color, #000000);
|
|
min-height: 100vh;
|
|
-webkit-font-smoothing: antialiased;
|
|
}
|
|
|
|
.hidden { display: none !important; }
|
|
|
|
/* ── Tabs ────────────────────────────────────────────────────── */
|
|
|
|
#tabs {
|
|
display: flex;
|
|
background: var(--tg-theme-secondary-bg-color, #f0f0f0);
|
|
position: sticky;
|
|
top: 0;
|
|
z-index: 100;
|
|
border-bottom: 1px solid var(--tg-theme-hint-color, #999)33;
|
|
}
|
|
|
|
.tab {
|
|
flex: 1;
|
|
padding: 12px 0;
|
|
border: none;
|
|
background: none;
|
|
color: var(--tg-theme-hint-color, #999);
|
|
font-size: 14px;
|
|
font-weight: 600;
|
|
cursor: pointer;
|
|
border-bottom: 2px solid transparent;
|
|
transition: color 0.2s;
|
|
}
|
|
|
|
.tab.active {
|
|
color: var(--tg-theme-button-color, #3390ec);
|
|
border-bottom-color: var(--tg-theme-button-color, #3390ec);
|
|
}
|
|
|
|
/* ── Views ───────────────────────────────────────────────────── */
|
|
|
|
.view { display: none; padding: 16px; padding-bottom: 32px; }
|
|
.view.active { display: block; }
|
|
|
|
/* ── Cards ───────────────────────────────────────────────────── */
|
|
|
|
.card {
|
|
background: var(--tg-theme-secondary-bg-color, #f0f0f0);
|
|
border-radius: 12px;
|
|
padding: 16px;
|
|
margin-bottom: 12px;
|
|
}
|
|
|
|
/* ── Buttons ─────────────────────────────────────────────────── */
|
|
|
|
.btn {
|
|
display: inline-flex;
|
|
align-items: center;
|
|
justify-content: center;
|
|
border: none;
|
|
border-radius: 10px;
|
|
font-size: 15px;
|
|
font-weight: 600;
|
|
cursor: pointer;
|
|
padding: 12px 20px;
|
|
width: 100%;
|
|
transition: opacity 0.15s;
|
|
}
|
|
|
|
.btn:active { opacity: 0.7; transform: scale(0.97); }
|
|
|
|
.btn-primary {
|
|
background: var(--tg-theme-button-color, #3390ec);
|
|
color: var(--tg-theme-button-text-color, #fff);
|
|
}
|
|
|
|
.btn-secondary {
|
|
background: var(--tg-theme-secondary-bg-color, #f0f0f0);
|
|
color: var(--tg-theme-button-color, #3390ec);
|
|
border: 1.5px solid var(--tg-theme-button-color, #3390ec);
|
|
}
|
|
|
|
.btn-icon {
|
|
width: 44px;
|
|
height: 44px;
|
|
border-radius: 10px;
|
|
border: none;
|
|
background: var(--tg-theme-button-color, #3390ec);
|
|
color: var(--tg-theme-button-text-color, #fff);
|
|
font-size: 22px;
|
|
font-weight: 600;
|
|
cursor: pointer;
|
|
flex-shrink: 0;
|
|
display: flex;
|
|
align-items: center;
|
|
justify-content: center;
|
|
transition: opacity 0.15s;
|
|
}
|
|
|
|
.btn-icon:active { opacity: 0.7; }
|
|
|
|
.btn-link {
|
|
background: none;
|
|
border: none;
|
|
color: var(--tg-theme-link-color, #3390ec);
|
|
font-size: 13px;
|
|
cursor: pointer;
|
|
padding: 8px 0;
|
|
}
|
|
|
|
.btn-remove {
|
|
background: none;
|
|
border: none;
|
|
color: var(--tg-theme-hint-color, #999);
|
|
font-size: 20px;
|
|
cursor: pointer;
|
|
padding: 0 4px;
|
|
line-height: 1;
|
|
}
|
|
|
|
.btn-remove:active { opacity: 0.5; }
|
|
|
|
/* ── Inputs ──────────────────────────────────────────────────── */
|
|
|
|
.input {
|
|
width: 100%;
|
|
padding: 10px 12px;
|
|
border-radius: 10px;
|
|
border: 1.5px solid var(--tg-theme-hint-color, #999)44;
|
|
background: var(--tg-theme-bg-color, #fff);
|
|
color: var(--tg-theme-text-color, #000);
|
|
font-size: 15px;
|
|
font-family: inherit;
|
|
outline: none;
|
|
resize: vertical;
|
|
-webkit-appearance: none;
|
|
}
|
|
|
|
.input:focus {
|
|
border-color: var(--tg-theme-button-color, #3390ec);
|
|
}
|
|
|
|
.input-small {
|
|
width: auto;
|
|
flex: 1;
|
|
min-width: 0;
|
|
}
|
|
|
|
.hint {
|
|
font-size: 12px;
|
|
color: var(--tg-theme-hint-color, #999);
|
|
margin: 8px 0 12px;
|
|
line-height: 1.4;
|
|
}
|
|
|
|
/* ── Structured log: exercise name row ──────────────────────── */
|
|
|
|
.exercise-name-row {
|
|
display: flex;
|
|
gap: 8px;
|
|
}
|
|
|
|
.exercise-name-row .input { flex: 1; }
|
|
|
|
/* ── Autocomplete ────────────────────────────────────────────── */
|
|
|
|
.autocomplete-list {
|
|
border-radius: 10px;
|
|
overflow: hidden;
|
|
max-height: 0;
|
|
opacity: 0;
|
|
transition: max-height 0.2s, opacity 0.2s;
|
|
}
|
|
|
|
.autocomplete-list.visible {
|
|
max-height: 280px;
|
|
opacity: 1;
|
|
margin-top: 4px;
|
|
border: 1px solid var(--tg-theme-hint-color, #999)33;
|
|
}
|
|
|
|
.autocomplete-item {
|
|
padding: 10px 12px;
|
|
font-size: 14px;
|
|
cursor: pointer;
|
|
background: var(--tg-theme-bg-color, #fff);
|
|
border-bottom: 1px solid var(--tg-theme-hint-color, #999)22;
|
|
}
|
|
|
|
.autocomplete-item:last-child { border-bottom: none; }
|
|
.autocomplete-item:active { background: var(--tg-theme-secondary-bg-color, #f0f0f0); }
|
|
|
|
/* ── Sets section ────────────────────────────────────────────── */
|
|
|
|
/* .sets-section inherits .card styling; no additional rules needed. */
|
|
|
|
.sets-header {
|
|
display: flex;
|
|
justify-content: space-between;
|
|
align-items: center;
|
|
}
|
|
|
|
.sets-header-left {
|
|
display: flex;
|
|
align-items: baseline;
|
|
gap: 10px;
|
|
}
|
|
|
|
.rest-timer {
|
|
font-family: ui-monospace, SFMono-Regular, Menlo, monospace;
|
|
font-size: 13px;
|
|
color: var(--tg-theme-hint-color, #999);
|
|
font-variant-numeric: tabular-nums;
|
|
}
|
|
|
|
.btn-danger {
|
|
color: #e53935 !important;
|
|
font-size: 12px !important;
|
|
}
|
|
|
|
.set-input-row {
|
|
display: flex;
|
|
gap: 8px;
|
|
align-items: center;
|
|
margin-top: 8px;
|
|
}
|
|
|
|
.set-separator {
|
|
color: var(--tg-theme-hint-color, #999);
|
|
font-weight: 600;
|
|
font-size: 16px;
|
|
}
|
|
|
|
.set-entry {
|
|
display: flex;
|
|
justify-content: space-between;
|
|
align-items: center;
|
|
padding: 8px 0;
|
|
border-bottom: 1px solid var(--tg-theme-hint-color, #999)15;
|
|
}
|
|
|
|
.set-text {
|
|
font-size: 14px;
|
|
font-weight: 500;
|
|
}
|
|
|
|
/* ── Exercise cards (workout preview) ────────────────────────── */
|
|
|
|
.exercise-card {
|
|
background: var(--tg-theme-secondary-bg-color, #f0f0f0);
|
|
border-radius: 12px;
|
|
padding: 12px 16px;
|
|
margin-bottom: 8px;
|
|
}
|
|
|
|
.exercise-card-header {
|
|
display: flex;
|
|
justify-content: space-between;
|
|
align-items: center;
|
|
}
|
|
|
|
.exercise-card-actions {
|
|
display: flex;
|
|
gap: 4px;
|
|
}
|
|
|
|
.btn-edit {
|
|
font-size: 14px !important;
|
|
}
|
|
|
|
.exercise-card-name {
|
|
font-weight: 600;
|
|
font-size: 15px;
|
|
}
|
|
|
|
.exercise-card-sets {
|
|
font-size: 13px;
|
|
color: var(--tg-theme-hint-color, #999);
|
|
margin-top: 4px;
|
|
}
|
|
|
|
/* ── Editing banner ──────────────────────────────────────────── */
|
|
|
|
.editing-banner {
|
|
display: flex;
|
|
justify-content: space-between;
|
|
align-items: center;
|
|
padding: 10px 16px;
|
|
margin-bottom: 12px;
|
|
border-radius: 10px;
|
|
background: var(--tg-theme-button-color, #3390ec)15;
|
|
border: 1px solid var(--tg-theme-button-color, #3390ec)40;
|
|
font-size: 14px;
|
|
font-weight: 600;
|
|
color: var(--tg-theme-button-color, #3390ec);
|
|
}
|
|
|
|
/* ── Notes ───────────────────────────────────────────────────── */
|
|
|
|
#notes-section {
|
|
margin-bottom: 12px;
|
|
}
|
|
|
|
#notes-section .input {
|
|
font-size: 14px;
|
|
resize: none;
|
|
}
|
|
|
|
/* ── Raw text collapsible ─────────────────────────────────────── */
|
|
|
|
.raw-section {
|
|
margin-top: 8px;
|
|
}
|
|
|
|
.raw-toggle {
|
|
font-size: 13px;
|
|
color: var(--tg-theme-link-color, #3390ec);
|
|
cursor: pointer;
|
|
padding: 8px 0;
|
|
list-style: none;
|
|
text-align: center;
|
|
}
|
|
|
|
.raw-toggle::-webkit-details-marker { display: none; }
|
|
|
|
.raw-toggle::before {
|
|
content: "\25B6 ";
|
|
font-size: 10px;
|
|
transition: transform 0.2s;
|
|
display: inline-block;
|
|
}
|
|
|
|
details[open] .raw-toggle::before {
|
|
transform: rotate(90deg);
|
|
}
|
|
|
|
.raw-card {
|
|
margin-top: 8px;
|
|
}
|
|
|
|
/* ── Section labels ──────────────────────────────────────────── */
|
|
|
|
.section-label {
|
|
font-size: 13px;
|
|
font-weight: 600;
|
|
color: var(--tg-theme-button-color, #3390ec);
|
|
margin-bottom: 8px;
|
|
}
|
|
|
|
/* ── History cards ───────────────────────────────────────────── */
|
|
|
|
.history-card {
|
|
background: var(--tg-theme-secondary-bg-color, #f0f0f0);
|
|
border-radius: 12px;
|
|
padding: 16px;
|
|
margin-bottom: 12px;
|
|
}
|
|
|
|
.history-header {
|
|
display: flex;
|
|
justify-content: space-between;
|
|
margin-bottom: 10px;
|
|
}
|
|
|
|
.history-date {
|
|
font-size: 13px;
|
|
color: var(--tg-theme-hint-color, #999);
|
|
font-weight: 600;
|
|
}
|
|
|
|
.history-header-right {
|
|
display: flex;
|
|
align-items: center;
|
|
gap: 8px;
|
|
}
|
|
|
|
.history-volume {
|
|
font-size: 13px;
|
|
font-weight: 600;
|
|
color: var(--tg-theme-button-color, #3390ec);
|
|
}
|
|
|
|
.btn-history-edit {
|
|
font-size: 14px !important;
|
|
}
|
|
|
|
.history-group {
|
|
margin-bottom: 8px;
|
|
}
|
|
|
|
.superset-label {
|
|
font-size: 11px;
|
|
font-weight: 700;
|
|
color: var(--tg-theme-button-color, #3390ec);
|
|
text-transform: uppercase;
|
|
letter-spacing: 0.5px;
|
|
margin-bottom: 4px;
|
|
}
|
|
|
|
.history-exercise {
|
|
font-size: 14px;
|
|
padding: 2px 0;
|
|
}
|
|
|
|
.history-exercise .ex-name {
|
|
font-weight: 600;
|
|
}
|
|
|
|
.history-exercise .ex-machine {
|
|
color: var(--tg-theme-hint-color, #999);
|
|
font-size: 12px;
|
|
}
|
|
|
|
.history-exercise .ex-detail {
|
|
color: var(--tg-theme-hint-color, #999);
|
|
}
|
|
|
|
/* ── Stats ───────────────────────────────────────────────────── */
|
|
|
|
.stats-grid {
|
|
display: grid;
|
|
grid-template-columns: 1fr 1fr;
|
|
gap: 12px;
|
|
}
|
|
|
|
.stat-card {
|
|
background: var(--tg-theme-secondary-bg-color, #f0f0f0);
|
|
border-radius: 12px;
|
|
padding: 16px;
|
|
text-align: center;
|
|
}
|
|
|
|
.stat-value {
|
|
font-size: 28px;
|
|
font-weight: 700;
|
|
color: var(--tg-theme-button-color, #3390ec);
|
|
}
|
|
|
|
.stat-label {
|
|
font-size: 12px;
|
|
color: var(--tg-theme-hint-color, #999);
|
|
text-transform: uppercase;
|
|
letter-spacing: 0.5px;
|
|
margin-top: 4px;
|
|
}
|
|
|
|
/* ── Empty state ─────────────────────────────────────────────── */
|
|
|
|
.empty-state { text-align: center; padding: 48px 16px; }
|
|
.empty-state p { color: var(--tg-theme-hint-color, #999); font-size: 16px; }
|
|
|
|
/* ── Toast ───────────────────────────────────────────────────── */
|
|
|
|
.toast {
|
|
position: fixed;
|
|
bottom: 24px;
|
|
left: 50%;
|
|
transform: translateX(-50%) translateY(80px);
|
|
background: var(--tg-theme-text-color, #000);
|
|
color: var(--tg-theme-bg-color, #fff);
|
|
padding: 10px 20px;
|
|
border-radius: 10px;
|
|
font-size: 14px;
|
|
font-weight: 600;
|
|
opacity: 0;
|
|
transition: transform 0.3s, opacity 0.3s;
|
|
z-index: 1000;
|
|
pointer-events: none;
|
|
}
|
|
|
|
.toast.show {
|
|
transform: translateX(-50%) translateY(0);
|
|
opacity: 1;
|
|
}
|
|
|
|
/* ── Footer / version badge ──────────────────────────────────── */
|
|
|
|
#app-footer {
|
|
margin-top: 24px;
|
|
padding: 12px 16px 20px;
|
|
text-align: center;
|
|
font-size: 11px;
|
|
color: var(--tg-theme-hint-color, #999);
|
|
opacity: 0.6;
|
|
font-family: ui-monospace, SFMono-Regular, Menlo, monospace;
|
|
}
|