:root {
    --bg:          #fafaf7;
    --surface:     #ffffff;
    --text:        #1a1a1a;
    --text-2:      #555555;
    --text-3:      #888888;
    --border:      #d4d4d0;
    --border-l:    #eaea e6;
    --accent:      #2c2c2c;
    --accent-h:    #000000;
    --accent-soft: #f0f0eb;
    --danger:      #b5343a;
    --shadow-sm:   0 1px 2px rgba(0,0,0,.04);
    --shadow:      0 2px 8px rgba(0,0,0,.06);
    --shadow-md:   0 4px 16px rgba(0,0,0,.08);
    --radius:      8px;
    --radius-sm:   4px;
    --max-w:       1080px;
    --font-serif:  'Noto Serif SC', 'Source Han Serif SC', 'STSong', 'SimSun', 'Songti SC', serif;
    --font-sans:   -apple-system, 'PingFang SC', 'Microsoft YaHei', 'Hiragino Sans GB', sans-serif;
}

*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

html { font-size: 16px; -webkit-font-smoothing: antialiased; }

body {
    font-family: var(--font-sans);
    color: var(--text);
    background: var(--bg);
    line-height: 1.7;
    min-height: 100vh;
    display: flex;
    flex-direction: column;
}

a {
    color: var(--text);
    text-decoration: none;
    border-bottom: 1px solid transparent;
    transition: border-color .2s, color .2s;
}
a:hover { color: var(--accent-h); border-bottom-color: var(--accent); }

.site-nav {
    background: var(--surface);
    border-bottom: 1px solid var(--border);
    padding: 0 24px;
    display: flex;
    align-items: center;
    height: 56px;
    position: sticky;
    top: 0;
    z-index: 100;
}
.site-nav .nav-brand {
    font-family: var(--font-serif);
    font-size: 1.25rem;
    font-weight: 700;
    letter-spacing: .05em;
    border-bottom: none;
    display: flex;
    align-items: center;
    gap: 8px;
}
.nav-logo {
    height: 36px;
    width: auto;
    display: block;
}
.nav-brand-text {
    font-family: var(--font-serif);
    font-size: 1.15rem;
    font-weight: 700;
    letter-spacing: .05em;
    color: var(--text);
}
.site-nav .nav-links { display: flex; align-items: center; gap: 24px; margin-left: auto; }
.site-nav .nav-links a {
    font-size: .9rem;
    border-bottom: none;
    color: var(--text-2);
    padding: 4px 0;
    position: relative;
}
.site-nav .nav-links a:hover { color: var(--text); }
.site-nav .nav-links a::after {
    content: '';
    position: absolute;
    bottom: -2px; left: 0; right: 0;
    height: 2px;
    background: var(--accent);
    transform: scaleX(0);
    transition: transform .2s;
}
.site-nav .nav-links a:hover::after { transform: scaleX(1); }

.nav-user-dropdown { position: relative; margin-left: 20px; }
.nav-user-trigger {
    position: relative;
    display: flex;
    align-items: center;
    gap: 6px;
    background: var(--accent-soft);
    border: 1px solid var(--border);
    border-radius: 20px;
    padding: 5px 14px;
    cursor: pointer;
    font-family: var(--font-sans);
    font-size: .85rem;
    color: var(--text);
    transition: background .2s, border-color .2s, box-shadow .2s;
    white-space: nowrap;
}
.nav-user-trigger:hover {
    background: var(--border-l);
    border-color: var(--accent);
    box-shadow: var(--shadow-sm);
}
.nav-user-trigger:focus-visible {
    outline: 2px solid var(--accent);
    outline-offset: 2px;
}
.nav-user-name {
    font-weight: 600;
    max-width: 100px;
    overflow: hidden;
    text-overflow: ellipsis;
}
.nav-user-arrow {
    font-size: .7rem;
    color: var(--text-3);
    transition: transform .25s;
}
.nav-user-dropdown--open .nav-user-arrow {
    transform: rotate(180deg);
}
.nav-user-menu {
    display: none;
    position: absolute;
    top: calc(100% + 8px);
    right: 0;
    min-width: 160px;
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    box-shadow: var(--shadow-md);
    padding: 6px 0;
    z-index: 200;
    opacity: 0;
    transform: translateY(-6px);
    transition: opacity .2s, transform .2s;
}
.nav-user-dropdown--open .nav-user-menu {
    display: block;
    opacity: 1;
    transform: translateY(0);
}
.nav-user-menu-item {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 8px 18px;
    font-size: .88rem;
    color: var(--text);
    border-bottom: none !important;
    transition: background .15s;
    white-space: nowrap;
}
.nav-user-menu-item:hover {
    background: var(--accent-soft);
    color: var(--text);
}
.nav-user-menu-divider {
    height: 1px;
    background: var(--border-l);
    margin: 4px 0;
}
.nav-user-menu-item--logout {
    color: var(--text-3);
    font-size: .82rem;
}
.nav-user-menu-item--logout:hover {
    color: var(--danger);
}
.nav-user-dot {
    position: absolute;
    top: -3px;
    right: -3px;
    width: 10px;
    height: 10px;
    background: var(--danger);
    border: 2px solid var(--surface);
    border-radius: 50%;
}
.nav-badge-inline {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 20px;
    height: 20px;
    line-height: 20px;
    padding: 0 5px;
    font-size: .7rem;
    font-weight: 700;
    background: var(--danger);
    color: #fff;
    border-radius: 10px;
}

.timer-badge {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    font-size: .7rem;
    font-weight: 600;
    color: #fff;
    background: var(--accent);
    padding: 2px 8px;
    border-radius: 10px;
    vertical-align: middle;
    margin-left: 6px;
    white-space: nowrap;
}
.timer-badge--large {
    font-size: .82rem;
    padding: 4px 14px;
    border-radius: 12px;
}

.timer-status-dot {
    display: inline-block;
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: #2ecc71;
    margin-left: 6px;
    vertical-align: middle;
    box-shadow: 0 0 4px rgba(46, 204, 113, 0.5);
    animation: timer-dot-pulse 2s infinite;
}
.timer-status-dot.timer-paused {
    background: #f39c12;
    box-shadow: 0 0 4px rgba(243, 156, 18, 0.5);
    animation: none;
}
@keyframes timer-dot-pulse {
    0%, 100% { opacity: 1; }
    50% { opacity: 0.4; }
}

.timer-history-row {
    cursor: pointer;
    transition: background .15s;
}
.timer-history-row:hover {
    background: var(--accent-soft);
}

.nav-badge {
    position: absolute;
    top: -8px;
    right: -12px;
    background: var(--danger);
    color: #fff;
    font-size: .68rem;
    font-weight: 700;
    min-width: 18px;
    height: 18px;
    line-height: 18px;
    text-align: center;
    border-radius: 9px;
    padding: 0 5px;
}

.main-container {
    width: 50%;
    min-width: 720px;
    max-width: 1400px;
    margin: 0 auto;
    padding: 40px 32px 72px;
    flex: 1;
}

.main-container--wide {
    width: 92%;
    max-width: 1600px;
}

.page-title {
    font-family: var(--font-serif);
    font-size: 1.75rem;
    font-weight: 700;
    margin-bottom: 28px;
    color: var(--text);
    letter-spacing: .04em;
}
.page-title::after {
    content: '';
    display: block;
    width: 40px;
    height: 3px;
    background: var(--accent);
    margin-top: 10px;
}

.daily-quote {
    font-family: var(--font-serif);
    font-size: 1.05rem;
    color: var(--text-2);
    text-align: center;
    padding: 18px 24px;
    margin-bottom: 24px;
    background: var(--surface);
    border: 1px solid var(--border-l);
    border-left: 3px solid var(--accent);
    border-radius: var(--radius-sm);
    font-style: italic;
    letter-spacing: .03em;
}

.rank-refresh {
    font-size: 1rem;
    color: var(--text-3);
    text-decoration: none;
    margin-left: 10px;
    vertical-align: middle;
    transition: color .2s;
}
.rank-refresh:hover { color: var(--accent); }

.card {
    background: var(--surface);
    border: 1px solid var(--border-l);
    border-radius: var(--radius);
    padding: 28px;
    margin-bottom: 18px;
    box-shadow: var(--shadow-sm);
    transition: box-shadow .2s;
}
.card-centered {
    margin-left: auto;
    margin-right: auto;
}
.notification-unread { background: var(--accent-soft); border-left: 3px solid var(--accent); }
.notification-item:hover { box-shadow: var(--shadow); }
.card:hover { box-shadow: var(--shadow); }
.card-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 12px;
}
.card-title { font-weight: 600; font-size: 1.05rem; }
.card-meta { font-size: .85rem; color: var(--text-3); }
.card-body { color: var(--text-2); line-height: 1.8; }
.card-body-link {
    display: block;
    text-decoration: none;
    color: inherit;
    border-bottom: none;
}
.card-body-link:hover .card-body {
    color: var(--text);
}
.card-actions {
    display: flex;
    align-items: center;
    gap: 16px;
    margin-top: 12px;
    padding-top: 12px;
    border-top: 1px solid var(--border-l);
}

.period-tabs {
    display: flex;
    gap: 2px;
    margin-bottom: 24px;
    background: var(--accent-soft);
    border-radius: var(--radius);
    padding: 4px;
    width: fit-content;
}
.period-tabs a {
    padding: 6px 20px;
    border-radius: var(--radius-sm);
    font-size: .88rem;
    border-bottom: none;
    color: var(--text-2);
    transition: all .2s;
}
.period-tabs a:hover { color: var(--text); }
.period-tabs a.active {
    background: var(--surface);
    color: var(--text);
    font-weight: 600;
    box-shadow: var(--shadow-sm);
}

.table-wrap {
    overflow-x: auto;
    margin-bottom: 24px;
    border-radius: var(--radius);
    border: 1px solid var(--border-l);
    background: var(--surface);
}
.table-wrap table th,
.table-wrap table td {
    white-space: nowrap;
}
table {
    width: 100%;
    border-collapse: collapse;
    font-size: .92rem;
}
thead { background: var(--accent-soft); }
th {
    text-align: left;
    padding: 14px 20px;
    font-weight: 600;
    font-size: .82rem;
    text-transform: uppercase;
    letter-spacing: .05em;
    color: var(--text-2);
    border-bottom: 2px solid var(--border);
}
td {
    padding: 14px 20px;
    border-bottom: 1px solid var(--border-l);
    color: var(--text);
}
tr:last-child td { border-bottom: none; }
tbody tr:hover { background: var(--accent-soft); }
td a { font-weight: 500; border-bottom: none; }
td a:hover { text-decoration: underline; text-underline-offset: 2px; }

.rank-col { width: 56px; text-align: center; }
.rank-1, .rank-2, .rank-3 {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 28px; height: 28px;
    border-radius: 50%;
    font-weight: 700;
    font-size: .85rem;
}
.rank-1 { background: #1a1a1a; color: #fafaf7; }
.rank-2 { background: #555;    color: #fafaf7; }
.rank-3 { background: #999;    color: #fafaf7; }

.auth-page {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    flex: 1;
    padding: 48px 24px 64px;
}
.auth-card {
    background: var(--surface);
    border: 1px solid var(--border-l);
    border-radius: var(--radius);
    padding: 44px 40px;
    box-shadow: var(--shadow-sm);
    width: 100%;
}
.auth-card.login-card  { max-width: 480px; }
.auth-card.register-card { max-width: 600px; }
.auth-title {
    font-family: var(--font-serif);
    font-size: 1.75rem;
    font-weight: 700;
    text-align: center;
    margin-bottom: 32px;
    letter-spacing: .04em;
    color: var(--text);
}
.auth-title::after {
    content: '';
    display: block;
    width: 40px;
    height: 3px;
    background: var(--accent);
    margin: 10px auto 0;
}
.auth-link {
    text-align: center;
    margin-top: 24px;
    color: var(--text-3);
    font-size: .9rem;
}

.form-group { margin-bottom: 20px; }
.form-label {
    display: block;
    font-size: .88rem;
    font-weight: 600;
    margin-bottom: 6px;
    color: var(--text);
}
.form-input, .form-textarea, .form-file {
    width: 100%;
    padding: 12px 16px;
    font-size: .95rem;
    font-family: var(--font-sans);
    border: 1px solid var(--border);
    border-radius: var(--radius-sm);
    background: var(--surface);
    color: var(--text);
    transition: border-color .2s, box-shadow .2s;
    outline: none;
}
.form-input:focus, .form-textarea:focus {
    border-color: var(--accent);
    box-shadow: 0 0 0 3px rgba(0,0,0,.04);
}
.form-textarea { resize: vertical; min-height: 100px; }
.form-hint { font-size: .8rem; color: var(--text-3); margin-top: 4px; }

.code-input-row {
    display: flex;
    gap: 8px;
    align-items: center;
}
.code-input-row .form-input {

}
.code-send-btn {
    flex-shrink: 0;
    white-space: nowrap;
}
.code-send-btn:disabled {
    opacity: .55;
    cursor: not-allowed;
}
.form-checkbox { display: flex; align-items: center; gap: 8px; font-size: .9rem; }
.form-checkbox input[type="checkbox"] {
    width: 18px; height: 18px;
    accent-color: var(--accent);
}

.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    padding: 12px 28px;
    font-size: .92rem;
    font-weight: 600;
    font-family: var(--font-sans);
    border: 1px solid transparent;
    border-radius: var(--radius-sm);
    cursor: pointer;
    transition: all .2s;
    background: var(--accent);
    color: #fff;
}
.btn:hover { background: var(--accent-h); }
.btn-outline {
    background: transparent;
    color: var(--text);
    border-color: var(--border);
}
.btn-outline:hover {
    background: var(--accent-soft);
    border-color: var(--accent);
}
.btn-sm { padding: 5px 14px; font-size: .82rem; line-height: 1.4; }
a.btn { text-decoration: none; }

.btn-danger { background: var(--danger); }
.btn-danger:hover { background: #931c20; }

.password-section { margin-bottom: 4px; }
.password-summary {
    cursor: pointer;
    font-family: var(--font-serif);
    font-size: 1.1rem;
    padding: 8px 0;
    user-select: none;
    outline: none;
}
.password-summary:hover { color: var(--accent); }

.profile-actions { display: flex; gap: 6px; flex-wrap: nowrap; }
.pagination {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 6px;
    flex-wrap: wrap;
    margin-top: 20px;
}
.pagination .btn-sm {
    padding: 5px 12px;
    font-size: .82rem;
    line-height: 1.4;
    min-width: 0;
}
.pagination .ellipsis {
    color: var(--text-3);
    padding: 5px 2px;
    font-size: .82rem;
}
.pagination .page-count {
    font-size: .82rem;
    color: var(--text-3);
    padding: 5px 4px;
}
.pagination .prevnext-label { display: inline; }
.pagination .prevnext-icon { display: none; }

.table--profile { width: 100%; border-collapse: collapse; }
.table--profile th,
.table--profile td {
    padding: 10px 12px;
    text-align: left;
    font-size: .88rem;
    border-bottom: 1px solid var(--border-l);
    white-space: nowrap;
}
.table--profile th {
    font-weight: 600;
    color: var(--text-2);
    font-size: .8rem;
    text-transform: uppercase;
    letter-spacing: .03em;
}
.table--profile tbody tr { cursor: pointer; }
.table--profile tbody tr:hover { background: var(--accent-soft); }
.table--profile tbody tr:hover td { color: var(--text); }

.table--timer-history { width: 100%; border-collapse: collapse; }
.table--timer-history th,
.table--timer-history td {
    padding: 10px 12px;
    text-align: left;
    font-size: .88rem;
    border-bottom: 1px solid var(--border-l);
    white-space: nowrap;
}
.table--timer-history th {
    font-weight: 600;
    color: var(--text-2);
    background: var(--bg);
}

.btn-link {
    background: none; border: none; color: var(--text-2);
    padding: 4px 0; font-size: .85rem; cursor: pointer;
    font-family: var(--font-sans);
}
.btn-link:hover { color: var(--text); text-decoration: underline; }

.flash-list {
    list-style: none;
    margin-bottom: 20px;
}
.flash-list li {
    padding: 10px 18px;
    border-radius: var(--radius-sm);
    font-size: .9rem;
    margin-bottom: 6px;
    background: var(--accent-soft);
    border-left: 3px solid var(--accent);
    color: var(--text);
    animation: fadeIn .3s ease;
}
@keyframes fadeIn {
    from { opacity: 0; transform: translateY(-6px); }
    to { opacity: 1; transform: translateY(0); }
}

.divider {
    border: none;
    border-top: 1px solid var(--border-l);
    margin: 28px 0;
}

.image-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
    gap: 16px;
    margin: 16px 0;
}
.image-grid a {
    display: block;
    border-radius: var(--radius-sm);
    overflow: hidden;
    border: 1px solid var(--border-l);
    border-bottom: none;
    transition: box-shadow .2s;
}
.image-grid a:hover { box-shadow: var(--shadow-md); }
.image-grid img {
    width: 100%;
    aspect-ratio: 4/3;
    object-fit: cover;
    display: block;
}
.image-caption {
    font-size: .78rem;
    color: var(--text-3);
    text-align: center;
    margin-top: 4px;
}

.comment-item {
    padding: 14px 0;
    border-bottom: 1px solid var(--border-l);
}
.comment-item:last-child { border-bottom: none; }
.comment-header {
    display: flex;
    align-items: baseline;
    gap: 10px;
    margin-bottom: 6px;
}
.comment-author { font-weight: 600; font-size: .92rem; }
.comment-time { font-size: .78rem; color: var(--text-3); }
.comment-reply-to {
    color: var(--text-3);
    font-size: .75rem;
    margin-bottom: 6px;
    padding-left: 2px;
    line-height: 1.5;
    word-break: break-word;
}
.comment-body { color: var(--text-2); line-height: 1.7; font-size: .92rem; white-space: pre-wrap; word-break: break-word; }

.stats-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
    gap: 18px;
    margin-bottom: 28px;
}
.stat-card {
    background: var(--surface);
    border: 1px solid var(--border-l);
    border-radius: var(--radius);
    padding: 20px;
    text-align: center;
}
.stat-value {
    font-family: var(--font-serif);
    font-size: 1.8rem;
    font-weight: 700;
    color: var(--text);
    line-height: 1.2;
}
.stat-label {
    font-size: .8rem;
    color: var(--text-3);
    margin-top: 4px;
    letter-spacing: .04em;
}

.info-table {
    width: 100%;
    border-collapse: collapse;
    margin-bottom: 24px;
}
.info-table td {
    padding: 10px 0;
    border-bottom: 1px solid var(--border-l);
    font-size: .92rem;
}
.info-table td:first-child {
    width: 120px;
    font-weight: 600;
    color: var(--text-2);
}

.empty-state {
    text-align: center;
    padding: 48px 24px;
    color: var(--text-3);
}
.empty-state .empty-icon { font-size: 2.5rem; margin-bottom: 12px; }
.empty-state p { font-size: .95rem; }

.back-link {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    font-size: .88rem;
    color: var(--text-3);
    margin-top: 20px;
    border-bottom: none;
}
.back-link:hover { color: var(--text); }
.back-link::before { content: '←'; font-size: 1rem; }

.site-footer {
    text-align: center;
    padding: 32px 24px;
    font-size: .82rem;
    color: var(--text-3);
    border-top: 1px solid var(--border-l);
}
.footer-icp {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    align-items: center;
    gap: 4px 10px;
    margin-top: 8px;
    font-size: .75rem;
    line-height: 1.8;
}
.footer-icp a {
    color: var(--text-3);
    text-decoration: none;
}
.footer-icp a:hover { color: var(--text); }
.footer-icp-sep {
    color: var(--text-3);
    opacity: .55;
}
.footer-beian {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    white-space: nowrap;
}
.footer-beian img {
    width: auto;
    height: 1em;
    vertical-align: middle;
}
.footer-beian-group {
    display: inline-flex;
    align-items: center;
    gap: 4px 10px;
    white-space: nowrap;
}

.toast {
    position: fixed;
    bottom: 32px;
    left: 50%;
    transform: translateX(-50%) translateY(20px);
    background: var(--accent);
    color: #fff;
    padding: 12px 28px;
    border-radius: var(--radius);
    font-size: .9rem;
    font-weight: 600;
    z-index: 1000;
    opacity: 0;
    pointer-events: none;
    transition: opacity .25s, transform .25s;
    box-shadow: var(--shadow-md);
}
.toast--visible {
    opacity: 1;
    transform: translateX(-50%) translateY(0);
}

.install-banner {
    position: fixed;
    bottom: 20px;
    left: 50%;
    transform: translateX(-50%);
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    box-shadow: var(--shadow-md);
    padding: 14px 20px;
    display: flex;
    align-items: center;
    gap: 12px;
    z-index: 1000;
    max-width: 480px;
    width: calc(100% - 32px);
}
.install-banner-text {
    flex: 1;
    font-size: .88rem;
    color: var(--text);
    font-weight: 500;
}
.install-banner-btn {
    flex-shrink: 0;
}
.install-banner-close {
    background: none;
    border: none;
    font-size: 1.2rem;
    color: var(--text-3);
    cursor: pointer;
    padding: 0 4px;
    line-height: 1;
    flex-shrink: 0;
}
.install-banner-close:hover { color: var(--text); }

.lightbox {
    display: none;
    position: fixed;
    inset: 0;
    background: rgba(0,0,0,.88);
    z-index: 999;
    align-items: center;
    justify-content: center;
    cursor: pointer;
}
.lightbox--visible { display: flex; }
.lightbox img {
    max-width: 92vw;
    max-height: 90vh;
    object-fit: contain;
    border-radius: 4px;
    box-shadow: 0 8px 40px rgba(0,0,0,.5);
    cursor: default;
}
.lightbox__close {
    position: absolute;
    top: 20px;
    right: 28px;
    font-size: 2rem;
    color: #fff;
    opacity: .6;
    cursor: pointer;
    line-height: 1;
    user-select: none;
    transition: opacity .2s;
}
.lightbox__close:hover { opacity: 1; }

@media (max-width: 900px) {
    .main-container { width: 88%; min-width: 0; padding: 28px 24px 56px; }
    .stats-grid { grid-template-columns: repeat(2, 1fr); }
}

@media (max-width: 640px) {
    .site-nav {
        padding: 0 16px;
        height: 48px;
    }
    .site-nav .nav-brand { font-size: 1.05rem; }
    .site-nav .nav-links { gap: 12px; }
    .site-nav .nav-links a { font-size: .8rem; }
    .main-container { width: 100%; min-width: 0; max-width: none; padding: 20px 16px 48px; }
    .page-title { font-size: 1.4rem; }
    .stats-grid { grid-template-columns: repeat(2, 1fr); }
    .image-grid { grid-template-columns: repeat(2, 1fr); }
    .period-tabs a { padding: 6px 12px; font-size: .8rem; }
    .card { padding: 18px 16px; }
    .card-actions {
        flex-wrap: wrap;
        gap: 8px;
        font-size: .8rem;
    }
    .card-actions .btn-sm {
        padding: 4px 10px;
        font-size: .78rem;
    }
    .checkin-detail-actions {
        flex-wrap: wrap;
        gap: 8px;
    }
    .checkin-detail-actions .btn-sm {
        padding: 4px 10px;
        font-size: .78rem;
    }
    .table--profile thead { display: none; }
    .table--profile tbody td { white-space: normal; }
    .table--profile tbody tr {
        display: block;
        margin-bottom: 16px;
        border: 1px solid var(--border);
        border-radius: var(--radius);
        padding: 12px 14px;
        box-shadow: var(--shadow-sm);
    }
    .table--profile tbody td {
        display: flex;
        justify-content: space-between;
        align-items: center;
        padding: 4px 0;
        border-bottom: 1px solid var(--border-l);
        font-size: .82rem;
    }
    .table--profile tbody td:last-child { border-bottom: none; }
    .table--profile tbody td::before {
        content: attr(data-label);
        font-weight: 600;
        color: var(--text-2);
        flex-shrink: 0;
        margin-right: 12px;
    }
    .table--timer-history thead { display: none; }
    .table--timer-history tbody td { white-space: normal; }
    .table--timer-history tbody tr {
        display: block;
        margin-bottom: 12px;
        border: 1px solid var(--border);
        border-radius: var(--radius);
        padding: 10px 14px;
        box-shadow: var(--shadow-sm);
    }
    .table--timer-history tbody td {
        display: flex;
        justify-content: space-between;
        align-items: center;
        padding: 6px 0;
        border-bottom: 1px solid var(--border-l);
        font-size: .84rem;
    }
    .table--timer-history tbody td:last-child { border-bottom: none; justify-content: flex-end; }
    .table--timer-history tbody td::before {
        content: attr(data-label);
        font-weight: 600;
        color: var(--text-2);
        flex-shrink: 0;
        margin-right: 12px;
    }
    .profile-actions { display: flex; gap: 4px; flex-wrap: nowrap; }
    .profile-actions .btn-sm { padding: 3px 8px; font-size: .75rem; flex-shrink: 0; }
    .timer-actions { display: flex; gap: 4px; }
    .timer-actions .btn-sm { padding: 3px 8px; font-size: .73rem; flex-shrink: 0; }
    .pagination { gap: 4px; margin-top: 16px; }
    .pagination .btn-sm {
        padding: 4px 8px;
        font-size: .73rem;
        min-width: 0;
        border-radius: 4px;
    }
    .pagination .ellipsis {
        font-size: .73rem;
        padding: 4px 1px;
    }
    .pagination .page-count {
        font-size: .73rem;
        padding: 4px 2px;
    }
    .pagination .prevnext-label {
        display: none;
    }
    .pagination .prevnext-icon {
        display: inline;
    }
    .nav-user-trigger { padding: 4px 10px; font-size: .8rem; }

    .auth-page { padding: 32px 16px 48px; }
    .auth-card { padding: 24px 20px; }
    .auth-card.login-card,
    .auth-card.register-card { max-width: 100%; }
    .auth-title { font-size: 1.4rem; margin-bottom: 24px; }
    .form-input, .form-textarea { padding: 12px 14px; font-size: 1rem; }
    .btn { padding: 12px 24px; font-size: .95rem; }

    .comment-header { flex-wrap: wrap; gap: 6px; }
    .comment-header .comment-author { font-size: .88rem; }
    .comment-header .comment-time { font-size: .75rem; }
    .comment-reply-to { font-size: .72rem; }
}

.timer-tabs {
    justify-content: center;
}
.timer-tab-content {
    max-width: 520px;
    margin: 0 auto;
}

.plan-form { display: flex; gap: 8px; margin-bottom: 12px; }
.plan-list { list-style: none; }
.plan-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 8px 12px;
    border-radius: var(--radius-sm);
    cursor: pointer;
    transition: background .15s;
    font-size: .88rem;
}
.plan-item:hover { background: var(--accent-soft); }
.plan-name { flex: 1; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.plan-delete {
    background: none;
    border: none;
    color: var(--text-3);
    font-size: 1.1rem;
    cursor: pointer;
    padding: 0 4px;
    line-height: 1;
    flex-shrink: 0;
    opacity: 0;
    transition: opacity .15s, color .15s;
}
.plan-item:hover .plan-delete { opacity: 1; }
.plan-delete:hover { color: var(--danger); }

.timer-panel { text-align: center; }

.timer-ring-container {
    position: relative;
    width: 220px;
    height: 220px;
    margin: 0 auto 16px;
}
.timer-ring { width: 100%; height: 100%; transform: rotate(-90deg); }
.timer-ring-bg {
    fill: none;
    stroke: var(--border-l);
    stroke-width: 8;
}
.timer-ring-progress {
    fill: none;
    stroke: var(--accent);
    stroke-width: 8;
    stroke-linecap: round;
    transition: stroke-dashoffset .3s;
}
.timer-display {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    font-family: var(--font-serif);
    font-size: 2.4rem;
    font-weight: 700;
    color: var(--text);
    letter-spacing: .03em;
}
.timer-label {
    font-size: 1.1rem;
    font-weight: 600;
    color: var(--text);
    margin-bottom: 20px;
    text-align: center;
}

.time-presets {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    align-items: center;
    justify-content: center;
}
.time-preset-btn {
    flex: 0 0 auto;
    min-width: 60px;
    max-width: 80px;
    height: 56px;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 2px;
    background: transparent;
    border: 1.5px solid var(--border);
    border-radius: var(--radius);
    cursor: pointer;
    font-family: var(--font-sans);
    font-size: 1.05rem;
    font-weight: 700;
    color: var(--text);
    transition: all .2s;
}
.time-preset-btn span {
    font-size: .62rem;
    font-weight: 400;
    color: var(--text-3);
}
.time-preset-btn:hover {
    border-color: var(--accent);
    background: var(--accent-soft);
}
.time-preset-btn.active {
    background: var(--accent);
    color: #fff;
    border-color: var(--accent);
}
.time-preset-btn.active span {
    color: rgba(255,255,255,.7);
}
.time-preset-custom {
    min-width: 60px;
    max-width: 80px;
    flex: 0 0 auto;
}
.time-preset-custom input {
    width: 100%;
    height: 56px;
    border: 1.5px dashed var(--border);
    border-radius: var(--radius);
    text-align: center;
    font-size: .95rem;
    font-family: var(--font-sans);
    color: var(--text);
    background: transparent;
    outline: none;
    transition: border-color .2s;
    font-weight: 700;
}
.time-preset-custom input:focus {
    border-color: var(--accent);
    border-style: solid;
}
.time-preset-custom input::placeholder {
    color: var(--text-3);
    font-size: .82rem;
}

.modal-overlay {
    position: fixed;
    inset: 0;
    background: rgba(0,0,0,.35);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 999;
}
.modal-card {
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    box-shadow: var(--shadow-md);
    padding: 24px 28px;
    max-width: 360px;
    width: calc(100% - 40px);
    text-align: center;
}
.modal-text {
    font-size: .95rem;
    color: var(--text);
    margin-bottom: 20px;
    line-height: 1.7;
}
.modal-actions {
    display: flex;
    justify-content: center;
    gap: 10px;
}

.timer-controls-row {
    display: flex;
    justify-content: center;
    gap: 12px;
    margin-top: 12px;
}

.timer-mode-toggle {
    display: flex;
    background: var(--accent-soft);
    border-radius: var(--radius);
    padding: 3px;
    margin-bottom: 12px;
}
.timer-mode-btn {
    flex: 1;
    padding: 8px 16px;
    border: none;
    border-radius: calc(var(--radius) - 2px);
    background: transparent;
    cursor: pointer;
    font-family: var(--font-sans);
    font-size: .9rem;
    font-weight: 600;
    color: var(--text-2);
    transition: all .2s;
}
.timer-mode-btn.active {
    background: var(--surface);
    color: var(--text);
    box-shadow: var(--shadow-sm);
}

.timer-quote {
    text-align: center;
    font-family: var(--font-serif);
    font-size: .9rem;
    color: var(--text-3);
    margin-bottom: 20px;
    line-height: 1.8;
    font-style: italic;
}

.timer-cloud-hint {
    text-align: center;
    font-size: .78rem;
    color: var(--text-3);
    margin-top: 14px;
}

.timer-mode-indicator {
    text-align: center;
    font-size: .82rem;
    font-weight: 600;
    color: var(--accent);
    margin-bottom: 12px;
    letter-spacing: .03em;
}

.timer-pause-hint {
    text-align: center;
    font-size: .75rem;
    color: var(--danger);
    margin-top: 10px;
}

@media (max-width: 900px) {
    .timer-tab-content { max-width: none; }
}
@media (max-width: 640px) {
    .timer-display { font-size: 2rem; }
    .timer-ring-container { width: 180px; height: 180px; }
    .timer-tab-content { max-width: none; }
    .timer-label { font-size: .85rem; }
}

.float-btns {
    position: fixed;
    bottom: 28px;
    right: 28px;
    display: flex;
    flex-direction: column;
    gap: 12px;
    z-index: 500;
}
.float-btn {
    width: 56px;
    height: 56px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: .78rem;
    font-weight: 700;
    font-family: var(--font-sans);
    text-decoration: none;
    border: none;
    box-shadow: var(--shadow-md);
    transition: transform .2s, box-shadow .2s;
    color: #fff;
}
.float-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(0,0,0,.15);
}
.float-btn-checkin {
    background: var(--accent);
}
.float-btn-timer {
    background: var(--text-2);
}
.float-btn-timer-active {
    background: #1db954;
    font-size: .7rem;
    animation: timer-btn-breathe 1.6s ease-in-out infinite;
}
.float-btn-timer-paused {
    background: #e67e22;
    font-size: .7rem;
}
@keyframes timer-btn-breathe {
    0%, 100% { box-shadow: 0 0 12px rgba(29,185,84,.5), 0 0 0 0 rgba(29,185,84,.3); }
    50% { box-shadow: 0 0 24px rgba(29,185,84,.8), 0 0 0 8px rgba(29,185,84,.08); }
}

.follow-list { display: flex; flex-direction: column; gap: 4px; }
.follow-item {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 12px 16px;
    border-radius: var(--radius-sm);
    text-decoration: none;
    border-bottom: none;
    transition: background .15s;
}
.follow-item:hover { background: var(--accent-soft); }
.follow-name { font-weight: 600; color: var(--text); font-size: .95rem; }
.follow-username { color: var(--text-3); font-size: .85rem; }
