469 lines
8.9 KiB
CSS
469 lines
8.9 KiB
CSS
*, *::before, *::after {
|
|
box-sizing: border-box;
|
|
margin: 0;
|
|
padding: 0;
|
|
}
|
|
|
|
:root {
|
|
--bg: #f7f6f2;
|
|
--border: rgba(0, 0, 0, 0.07);
|
|
--text: #1a1a1a;
|
|
--text-muted: #aaa;
|
|
--text-secondary: #666;
|
|
--header-height: 52px;
|
|
--accent: #CD0A00;
|
|
}
|
|
|
|
html, body {
|
|
height: 100%;
|
|
background: var(--bg);
|
|
font-family: 'Inter', system-ui, sans-serif;
|
|
font-weight: 300;
|
|
color: var(--text);
|
|
}
|
|
|
|
/* ── Header ─────────────────────────────────────── */
|
|
header {
|
|
height: var(--header-height);
|
|
display: flex;
|
|
align-items: center;
|
|
justify-content: space-between;
|
|
padding: 0 32px;
|
|
border-bottom: 1px solid var(--border);
|
|
position: sticky;
|
|
top: 0;
|
|
background: var(--bg);
|
|
z-index: 10;
|
|
}
|
|
|
|
@media (max-width: 600px) {
|
|
header {
|
|
padding: 0 16px;
|
|
}
|
|
}
|
|
|
|
#week-number {
|
|
font-size: 12px;
|
|
letter-spacing: 0.04em;
|
|
color: var(--text-muted);
|
|
}
|
|
|
|
.toggles {
|
|
display: flex;
|
|
gap: 28px;
|
|
align-items: center;
|
|
}
|
|
|
|
@media (max-width: 600px) {
|
|
.toggles {
|
|
gap: 12px;
|
|
}
|
|
}
|
|
|
|
.toggle {
|
|
display: flex;
|
|
align-items: center;
|
|
gap: 10px;
|
|
cursor: pointer;
|
|
user-select: none;
|
|
}
|
|
|
|
.toggle input {
|
|
display: none;
|
|
}
|
|
|
|
.track {
|
|
position: relative;
|
|
width: 40px;
|
|
height: 22px;
|
|
background: #ddd;
|
|
border-radius: 11px;
|
|
transition: background 0.2s ease;
|
|
flex-shrink: 0;
|
|
}
|
|
|
|
.track::after {
|
|
content: '';
|
|
position: absolute;
|
|
width: 16px;
|
|
height: 16px;
|
|
background: white;
|
|
border-radius: 50%;
|
|
top: 3px;
|
|
left: 3px;
|
|
transition: left 0.2s ease;
|
|
box-shadow: 0 1px 3px rgba(0,0,0,0.15);
|
|
}
|
|
|
|
.toggle input:checked + .track {
|
|
background: #1a1a1a;
|
|
}
|
|
|
|
.toggle input:checked + .track::after {
|
|
left: 21px;
|
|
}
|
|
|
|
.toggle-label {
|
|
font-size: 12px;
|
|
letter-spacing: 0.04em;
|
|
color: var(--text-secondary);
|
|
display: flex;
|
|
align-items: center;
|
|
gap: 4px;
|
|
}
|
|
|
|
#workModeLabel .toggle-label::before { content: '⚒'; filter: grayscale(100%); opacity: 0.7; }
|
|
#bridgeDaysLabel .toggle-label::before { content: '🏖'; filter: grayscale(100%); opacity: 0.7; }
|
|
|
|
@media (max-width: 600px) {
|
|
.toggle-label span {
|
|
display: none;
|
|
}
|
|
}
|
|
|
|
#bridgeDaysLabel {
|
|
opacity: 0;
|
|
pointer-events: none;
|
|
transition: opacity 0.2s ease;
|
|
}
|
|
|
|
#bridgeDaysLabel.visible {
|
|
opacity: 1;
|
|
pointer-events: all;
|
|
}
|
|
|
|
/* ── Cards ───────────────────────────────────────── */
|
|
#cards {
|
|
min-height: calc(100vh - var(--header-height));
|
|
display: flex;
|
|
flex-direction: column;
|
|
}
|
|
|
|
.card {
|
|
position: relative;
|
|
flex: 1;
|
|
min-height: 80px;
|
|
border-bottom: 1px solid rgba(0, 0, 0, 0.12);
|
|
overflow: hidden;
|
|
}
|
|
|
|
.card:last-child {
|
|
border-bottom: none;
|
|
}
|
|
|
|
.card canvas {
|
|
position: absolute;
|
|
inset: 0;
|
|
width: 100%;
|
|
height: 100%;
|
|
}
|
|
|
|
.card-content {
|
|
position: absolute;
|
|
inset: 0;
|
|
display: flex;
|
|
align-items: flex-start;
|
|
justify-content: space-between;
|
|
padding: 10px 24px 0;
|
|
pointer-events: none;
|
|
}
|
|
|
|
@media (max-width: 600px) {
|
|
.card-content {
|
|
padding: 8px 12px 0;
|
|
}
|
|
}
|
|
|
|
.card-name {
|
|
font-size: 11px;
|
|
font-weight: 400;
|
|
letter-spacing: 0.12em;
|
|
text-transform: uppercase;
|
|
color: var(--text-muted);
|
|
transition: color 0.4s ease;
|
|
}
|
|
|
|
@media (max-width: 600px) {
|
|
.card-name, .card-ends, .card-remaining {
|
|
font-size: 10px;
|
|
}
|
|
}
|
|
|
|
.card-ends {
|
|
font-size: 11px;
|
|
font-weight: 300;
|
|
letter-spacing: 0.04em;
|
|
color: var(--text-muted);
|
|
transition: color 0.4s ease;
|
|
}
|
|
|
|
.card-remaining {
|
|
font-size: 13px;
|
|
font-weight: 300;
|
|
color: var(--text-secondary);
|
|
transition: color 0.4s ease;
|
|
}
|
|
|
|
/* State variants */
|
|
.card.state-not-work-time .card-name,
|
|
.card.state-not-work-time .card-remaining {
|
|
color: #ccc;
|
|
}
|
|
|
|
.card.state-summer .card-name {
|
|
color: #c4902a;
|
|
}
|
|
|
|
.card.state-summer .card-remaining {
|
|
color: #c4902a;
|
|
opacity: 0.8;
|
|
}
|
|
|
|
.card.state-off-season .card-name,
|
|
.card.state-off-season .card-remaining {
|
|
color: #b0b8c8;
|
|
}
|
|
|
|
/* Loading state */
|
|
#loading {
|
|
position: fixed;
|
|
inset: 0;
|
|
background: var(--bg);
|
|
display: flex;
|
|
align-items: center;
|
|
justify-content: center;
|
|
font-size: 12px;
|
|
letter-spacing: 0.08em;
|
|
color: var(--text-muted);
|
|
z-index: 100;
|
|
transition: opacity 0.5s ease;
|
|
}
|
|
|
|
#loading.hidden {
|
|
opacity: 0;
|
|
pointer-events: none;
|
|
}
|
|
|
|
/* ── Edit toggle button ──────────────────────────────── */
|
|
#editToggle {
|
|
background: none;
|
|
border: none;
|
|
cursor: pointer;
|
|
padding: 4px;
|
|
font-size: 16px;
|
|
line-height: 1;
|
|
color: var(--text-muted);
|
|
transition: color 0.2s ease;
|
|
display: flex;
|
|
align-items: center;
|
|
}
|
|
|
|
#editToggle:hover {
|
|
color: var(--text-secondary);
|
|
}
|
|
|
|
#editToggle.active {
|
|
color: var(--text);
|
|
}
|
|
|
|
/* ── Card edit-mode controls ─────────────────────────── */
|
|
.card-edit-btn {
|
|
background: none;
|
|
border: none;
|
|
cursor: pointer;
|
|
font-size: 18px;
|
|
line-height: 1;
|
|
padding: 0 2px;
|
|
pointer-events: all;
|
|
transition: opacity 0.15s ease;
|
|
opacity: 0.4;
|
|
}
|
|
|
|
.card-edit-btn:hover {
|
|
opacity: 1;
|
|
}
|
|
|
|
.card-remove {
|
|
color: var(--text-muted);
|
|
}
|
|
|
|
.card-restore {
|
|
color: var(--text-muted);
|
|
}
|
|
|
|
/* ── Ghost card (hidden built-in, shown in edit mode) ── */
|
|
.card-ghost {
|
|
opacity: 0.35;
|
|
}
|
|
|
|
.card-content-interactive {
|
|
position: absolute;
|
|
inset: 0;
|
|
display: flex;
|
|
align-items: flex-start;
|
|
justify-content: space-between;
|
|
padding: 10px 24px 0;
|
|
}
|
|
|
|
/* ── Add custom timer card ───────────────────────────── */
|
|
.card-add {
|
|
flex: 1;
|
|
display: flex;
|
|
align-items: center;
|
|
justify-content: center;
|
|
}
|
|
|
|
.add-timer-form {
|
|
display: flex;
|
|
align-items: center;
|
|
gap: 10px;
|
|
}
|
|
|
|
@media (max-width: 600px) {
|
|
.add-timer-form {
|
|
flex-direction: column;
|
|
padding: 20px 0;
|
|
gap: 12px;
|
|
}
|
|
|
|
.add-timer-form input[type="text"],
|
|
.add-timer-form input[type="date"] {
|
|
width: 200px !important;
|
|
}
|
|
}
|
|
|
|
.add-timer-form input[type="text"],
|
|
.add-timer-form input[type="date"] {
|
|
background: none;
|
|
border: none;
|
|
border-bottom: 1px solid var(--border);
|
|
color: var(--text);
|
|
font-family: inherit;
|
|
font-size: 12px;
|
|
font-weight: 300;
|
|
letter-spacing: 0.04em;
|
|
padding: 4px 2px;
|
|
outline: none;
|
|
transition: border-color 0.2s ease;
|
|
}
|
|
|
|
.add-timer-form input[type="text"] {
|
|
width: 120px;
|
|
}
|
|
|
|
.add-timer-form input[type="date"] {
|
|
width: 120px;
|
|
color-scheme: light dark;
|
|
}
|
|
|
|
.add-timer-form input:focus {
|
|
border-bottom-color: var(--text-secondary);
|
|
}
|
|
|
|
.add-timer-form button {
|
|
background: none;
|
|
border: 1px solid var(--border);
|
|
color: var(--text-secondary);
|
|
font-family: inherit;
|
|
font-size: 11px;
|
|
font-weight: 300;
|
|
letter-spacing: 0.06em;
|
|
padding: 4px 12px;
|
|
cursor: pointer;
|
|
transition: border-color 0.2s ease, color 0.2s ease;
|
|
}
|
|
|
|
.add-timer-form button:hover {
|
|
border-color: var(--text-secondary);
|
|
color: var(--text);
|
|
}
|
|
|
|
/* ── Theme toggle button ─────────────────────────────── */
|
|
#themeToggle {
|
|
background: none;
|
|
border: none;
|
|
cursor: pointer;
|
|
padding: 4px;
|
|
font-size: 16px;
|
|
line-height: 1;
|
|
color: var(--text-muted);
|
|
transition: color 0.2s ease;
|
|
display: flex;
|
|
align-items: center;
|
|
}
|
|
|
|
#themeToggle:hover {
|
|
color: var(--text-secondary);
|
|
}
|
|
|
|
/* ── Dark mode ───────────────────────────────────── */
|
|
@media (prefers-color-scheme: dark) {
|
|
:root:not([data-theme="light"]) {
|
|
--bg: #111114;
|
|
--border: rgba(255, 255, 255, 0.08);
|
|
--text: #e8e8e8;
|
|
--text-muted: #555;
|
|
--text-secondary: #888;
|
|
}
|
|
|
|
:root:not([data-theme="light"]) .track {
|
|
background: #3a3a3a;
|
|
}
|
|
|
|
:root:not([data-theme="light"]) .toggle input:checked + .track {
|
|
background: #d0d0d0;
|
|
}
|
|
|
|
:root:not([data-theme="light"]) .toggle input:checked + .track::after {
|
|
background: #1a1a1a;
|
|
}
|
|
|
|
:root:not([data-theme="light"]) .card {
|
|
border-bottom-color: rgba(255, 255, 255, 0.07);
|
|
}
|
|
|
|
:root:not([data-theme="light"]) .card.state-not-work-time .card-name,
|
|
:root:not([data-theme="light"]) .card.state-not-work-time .card-remaining {
|
|
color: #333;
|
|
}
|
|
|
|
:root:not([data-theme="light"]) .card.state-off-season .card-name,
|
|
:root:not([data-theme="light"]) .card.state-off-season .card-remaining {
|
|
color: #5a6070;
|
|
}
|
|
}
|
|
|
|
[data-theme="dark"] {
|
|
--bg: #111114;
|
|
--border: rgba(255, 255, 255, 0.08);
|
|
--text: #e8e8e8;
|
|
--text-muted: #555;
|
|
--text-secondary: #888;
|
|
}
|
|
|
|
[data-theme="dark"] .track {
|
|
background: #3a3a3a;
|
|
}
|
|
|
|
[data-theme="dark"] .toggle input:checked + .track {
|
|
background: #d0d0d0;
|
|
}
|
|
|
|
[data-theme="dark"] .toggle input:checked + .track::after {
|
|
background: #1a1a1a;
|
|
}
|
|
|
|
[data-theme="dark"] .card {
|
|
border-bottom-color: rgba(255, 255, 255, 0.07);
|
|
}
|
|
|
|
[data-theme="dark"] .card.state-not-work-time .card-name,
|
|
[data-theme="dark"] .card.state-not-work-time .card-remaining {
|
|
color: #333;
|
|
}
|
|
|
|
[data-theme="dark"] .card.state-off-season .card-name,
|
|
[data-theme="dark"] .card.state-off-season .card-remaining {
|
|
color: #5a6070;
|
|
}
|