.page {
    max-width: 760px;
    margin: 0 auto;
    padding-top: 24px;
    padding-bottom: 48px;
}

h1 a {
    color: inherit;
    text-decoration: none;
}

h2 {
    font-size: 1.35rem;
}

site-menu {
    display: block;
}

.site-menu {
    display: flex;
    flex-wrap: wrap;
    gap: 4px;
    margin: 20px 0 28px;
    padding: 6px;
    background: #f1f1f1;
    border-radius: 8px;
}

.site-menu a {
    padding: 9px 13px;
    color: #333;
    text-decoration: none;
    border-radius: 6px;
}

.site-menu a:hover,
.site-menu a:focus-visible {
    background: #fff;
}

.site-menu a[aria-current="page"] {
    color: #fff;
    background: #2196f3;
}

.task-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 20px;
    margin-top: 32px;
}

.task-card {
    display: flex;
    flex-direction: column;
    min-height: 190px;
    padding: 24px;
    border: 1px solid #ddd;
    border-radius: 8px;
}

.task-card h2 {
    margin-top: 0;
}

.task-record-link {
    align-self: flex-start;
    margin-top: auto;
}

.rules-link {
    margin-top: 32px;
}

.home-rules,
.not-found-card {
    margin-top: 40px;
    padding: 24px;
    border: 1px solid #ddd;
    border-radius: 8px;
}

.home-rules h2,
.not-found-card h2 {
    margin-top: 0;
}

.home-rules li {
    margin-bottom: 10px;
    line-height: 1.5;
}

.task-panel {
    margin-top: 32px;
    padding: 24px;
    border: 1px solid #ddd;
    border-radius: 8px;
}

.task-panel > h2 {
    margin-top: 0;
}

.child-task-panel {
    margin-top: 20px;
}

.child-task-panel > h1 {
    margin-top: 0;
}

.task-panel h3 {
    font-size: 1.15rem;
}

.status-section {
    margin-top: 24px;
}

[data-action="record"] {
    min-width: 190px;
    padding: 12px 20px;
}

.task-panel button:disabled {
    cursor: wait;
    opacity: 0.65;
}

.message {
    min-height: 24px;
    margin-top: 10px;
}

.message.error {
    color: #b00020;
}

.message.success {
    color: #16733f;
}

.status-card {
    padding: 16px;
    border-left: 5px solid #999;
    background: #f1f1f1;
}

.status-card.good {
    border-color: #2e9b59;
    background: #eef9f1;
}

.status-card.overdue {
    border-color: #d1493f;
    background: #fff1f0;
}

.status-card.empty,
.status-card.loading {
    color: #666;
}

.status-card strong,
.status-card span {
    display: block;
}

.status-card span {
    margin-top: 4px;
    color: #555;
}

.history-heading {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
    margin-top: 32px;
}

.history-heading h3 {
    margin: 0;
}

.timestamp-list {
    padding-left: 32px;
}

.timestamp-list li {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
    padding: 10px 4px;
    border-bottom: 1px solid #ddd;
}

.timestamp-list li > div {
    min-width: 0;
}

.delete-button {
    flex: 0 0 auto;
    color: #b00020;
}

.timestamp-list time {
    font-weight: 600;
}

.timestamp-list small {
    display: block;
    margin-top: 2px;
    color: #666;
}

.footer {
    margin-top: 48px;
}

.rules-page section {
    margin-top: 32px;
}

.rules-page li {
    margin-bottom: 10px;
    line-height: 1.5;
}

@media (max-width: 480px) {
    .task-grid {
        grid-template-columns: 1fr;
    }

    .task-card {
        min-height: 165px;
    }

    .task-panel {
        padding: 18px;
    }

    .timestamp-list li {
        align-items: flex-start;
    }
}
