:root {
    --bg: #000;
    --surface: #111418;
    --surface-2: #1a1f25;
    --border: #2a2f36;
    --text: #e8eaed;
    --muted: #9aa3ad;
    --accent: #4ea1ff;
    --accent-hover: #6db3ff;
    --danger: #ff6464;
    --success: #30d158;
}

* { box-sizing: border-box; }

html, body {
    margin: 0;
    padding: 0;
    background: var(--bg);
    color: var(--text);
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", sans-serif;
    -webkit-text-size-adjust: 100%;
}

main {
    max-width: 900px;
    margin: 0 auto;
    padding: 16px;
}

a { color: var(--accent); text-decoration: none; }
a:hover { color: var(--accent-hover); }

input, button, select, textarea {
    font-family: inherit;
    font-size: 1.25rem;
    background: var(--surface-2);
    color: var(--text);
    border: 1px solid var(--border);
    border-radius: 8px;
    padding: 12px 14px;
    width: 100%;
    max-width: 100%;
}

input:focus, button:focus, select:focus, textarea:focus {
    outline: none;
    border-color: var(--accent);
    box-shadow: 0 0 0 3px rgba(78, 161, 255, 0.25);
}

button {
    background: var(--accent);
    color: #00111f;
    border-color: var(--accent);
    font-weight: 600;
    cursor: pointer;
    transition: background 0.15s, transform 0.05s;
    width: auto;
}
button:hover { background: var(--accent-hover); border-color: var(--accent-hover); }
button:active { transform: translateY(1px); }

button.ghost {
    background: var(--surface-2);
    color: var(--text);
    border-color: var(--border);
}
button.ghost:hover { background: var(--surface); }

.row { display: flex; flex-wrap: wrap; gap: 10px; margin: 10px 0; }
.row > * { flex: 1 1 auto; }
.row.tight { gap: 6px; }

.field { margin: 12px 0; }
.field label {
    display: block;
    font-size: 0.85rem;
    color: var(--muted);
    margin-bottom: 6px;
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

.card {
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: 12px;
    padding: 14px 16px;
    margin: 16px 0;
    overflow-x: auto;
}

.card h2 {
    margin: 0 0 10px 0;
    font-size: 1.1rem;
    color: var(--muted);
    font-weight: 500;
    display: flex;
    justify-content: space-between;
    align-items: baseline;
}
.card h2 .weight {
    font-size: 0.9rem;
    color: var(--accent);
}

table {
    width: 100%;
    border-collapse: collapse;
    font-size: 0.95rem;
}

th, td {
    padding: 8px 10px;
    text-align: left;
    border-bottom: 1px solid var(--border);
    white-space: nowrap;
}

th {
    color: var(--muted);
    font-weight: 500;
    font-size: 0.8rem;
    text-transform: uppercase;
    letter-spacing: 0.04em;
}

tbody tr:hover { background: var(--surface-2); }

.actions { text-align: right; }
.actions a { margin-left: 10px; }
.actions a.delete { color: var(--danger); }

.hint {
    color: var(--muted);
    font-size: 0.9rem;
    margin: 8px 0;
}

.timer {
    font-size: 5rem;
    font-weight: 700;
    text-align: center;
    color: var(--accent);
    padding: 20px 0;
    letter-spacing: 0.05em;
}

.timer.done { color: var(--muted); }

.stamp {
    color: var(--muted);
    font-size: 0.85rem;
    text-align: center;
    margin: 8px 0 0 0;
}

@media (max-width: 600px) {
    main { padding: 12px; }
    input, button, select, textarea { font-size: 1.15rem; padding: 14px; }
    table { font-size: 0.85rem; }
    th, td { padding: 6px 6px; }
    .timer { font-size: 4rem; }
}
