/* =====================================================================
   To Do · 业务界面样式
   页面头部 / 任务行 / 完成区 / 建议 / 已计划 / 详情面板 / 搜索 / 设置 / 登录
   ===================================================================== */

/* ------------------------------ 页面骨架 ------------------------------ */
.page {
    min-height: 100%;
    display: flex;
    flex-direction: column;
}

.page-header {
    --header-text: var(--text);
    --header-muted: var(--text-tertiary);
    --header-chip: var(--bg-hover);
    position: relative;
    flex: none;
    height: 136px;
    overflow: hidden;
    background: var(--bg-main);
    background: linear-gradient(180deg,
        color-mix(in srgb, var(--page-color) 14%, var(--bg-main)) 0%,
        color-mix(in srgb, var(--page-color) 4%, var(--bg-main)) 46%,
        var(--bg-main) 100%);
    border-bottom: 1px solid var(--border-soft);
}

html[data-theme="dark"] .page-header {
    background: linear-gradient(180deg,
        color-mix(in srgb, var(--page-color) 18%, var(--bg-main)) 0%,
        var(--bg-main) 76%);
}

.page-header--sun {
    height: 178px;
    border-bottom: 0;
    background: linear-gradient(118deg, #0a3f56 0%, #0e5a70 38%, #2b8396 72%, #58a6ae 100%);
    --header-text: #ffffff;
    --header-muted: rgba(255, 255, 255, .72);
    --header-chip: rgba(255, 255, 255, .14);
}

.page-header--calendar {
    background: linear-gradient(180deg, #e4f3f1 0%, #f4fbfa 48%, var(--bg-main) 100%);
}

html[data-theme="dark"] .page-header--calendar {
    background: linear-gradient(180deg, #16302f 0%, #1c2c2b 45%, var(--bg-main) 100%);
}

.page-header--star {
    background: linear-gradient(180deg, #fbf1e5 0%, #fef9f3 48%, var(--bg-main) 100%);
}

html[data-theme="dark"] .page-header--star {
    background: linear-gradient(180deg, #36281c 0%, #2b241d 45%, var(--bg-main) 100%);
}

.page-header--check {
    background: linear-gradient(180deg, #e9f4e6 0%, #f7fcf5 48%, var(--bg-main) 100%);
}

html[data-theme="dark"] .page-header--check {
    background: linear-gradient(180deg, #1e2e1c 0%, #212a20 45%, var(--bg-main) 100%);
}

.page-header-glow {
    position: absolute;
    inset: 0;
    pointer-events: none;
    background:
        radial-gradient(circle at 82% 8%, rgba(255, 255, 255, .18), transparent 38%),
        radial-gradient(circle at 94% 92%, rgba(0, 0, 0, .12), transparent 42%);
    opacity: .9;
}

.page-header-inner {
    position: relative;
    z-index: 1;
    height: 100%;
    max-width: var(--content-max);
    margin: 0 auto;
    padding: 26px 36px 20px;
    display: flex;
    align-items: flex-end;
    justify-content: space-between;
    gap: 24px;
}

.page-heading {
    display: flex;
    align-items: center;
    gap: 16px;
    min-width: 0;
}

.page-emoji {
    width: 48px;
    height: 48px;
    border-radius: 13px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    flex: none;
    background: var(--header-chip);
    color: var(--header-text);
    font-size: 25px;
    box-shadow: inset 0 0 0 1px rgba(255, 255, 255, .06);
}

.page-header--sun .page-emoji {
    background: rgba(255, 255, 255, .16);
    color: #ffe0a3;
}

.page-emoji .icon {
    width: 25px;
    height: 25px;
}

.page-emoji-glyph {
    line-height: 1;
    transform: translateY(-1px);
}

.page-heading-text {
    min-width: 0;
}

.page-title {
    font-size: 30px;
    line-height: 1.14;
    font-weight: 600;
    letter-spacing: -.4px;
    color: var(--header-text);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.page-sub {
    margin-top: 6px;
    font-size: 12.5px;
    color: var(--header-muted);
    letter-spacing: .1px;
}

.page-date {
    font-variant-numeric: tabular-nums;
}

.page-actions {
    display: flex;
    align-items: center;
    gap: 2px;
    flex: none;
    padding-bottom: 2px;
}

.page-actions .icon-btn {
    color: var(--header-muted);
}

.page-actions .icon-btn:hover {
    background: var(--header-chip);
    color: var(--header-text);
}

.page-task-count {
    font-size: 12px;
    color: var(--header-muted);
    margin-right: 8px;
    white-space: nowrap;
    font-variant-numeric: tabular-nums;
}

.page-body {
    flex: 1;
    width: 100%;
    max-width: var(--content-max);
    margin: 0 auto;
    padding: 10px 36px 90px;
}

/* ------------------------------ 添加任务 ------------------------------ */
.add-task-wrap {
    padding-top: 6px;
}

.add-task-row {
    display: flex;
    align-items: center;
    gap: 12px;
    height: 54px;
    padding: 0 6px 0 4px;
    border-bottom: 1px solid var(--border);
    cursor: text;
    transition: background .15s;
    border-radius: var(--radius-md) var(--radius-md) 0 0;
}

.add-task-row:focus-within {
    background: var(--bg-subtle);
}

.add-task-plus {
    width: 27px;
    height: 27px;
    border-radius: 50%;
    border: 1px solid var(--text-tertiary);
    display: inline-flex;
    align-items: center;
    justify-content: center;
    color: var(--text-secondary);
    flex: none;
    transition: all .18s;
}

.add-task-plus .icon {
    width: 15px;
    height: 15px;
}

.add-task-row:focus-within .add-task-plus {
    background: var(--accent);
    border-color: var(--accent);
    color: #fff;
    transform: rotate(90deg);
}

.add-task-input {
    flex: 1;
    min-width: 0;
    height: 100%;
    border: 0;
    outline: none;
    background: transparent;
    font-size: 15px;
    letter-spacing: .1px;
}

.add-task-input::placeholder {
    color: var(--text-tertiary);
}

.add-task-hint {
    font-size: 11px;
    color: var(--text-tertiary);
    opacity: 0;
    transition: opacity .15s;
    white-space: nowrap;
}

.add-task-row:focus-within .add-task-hint {
    opacity: 1;
}

/* ------------------------------ 任务行 ------------------------------ */
.task-sections {
    min-height: 1px;
}

.task-items {
    padding-top: 2px;
}

.task-row {
    display: flex;
    align-items: center;
    gap: 10px;
    min-height: 56px;
    padding: 8px 4px 8px 2px;
    border-bottom: 1px solid var(--border-soft);
    border-radius: var(--radius-md);
    position: relative;
    cursor: pointer;
    transition: background .12s, box-shadow .12s;
}

.task-row:hover {
    background: var(--bg-hover);
}

.task-row:focus-visible {
    outline: 2px solid var(--accent);
    outline-offset: -2px;
}

.task-row.is-completed {
    opacity: .82;
}

.task-row.is-completed .task-title {
    color: var(--text-tertiary);
    text-decoration: line-through;
    text-decoration-thickness: 1px;
    text-decoration-color: var(--text-tertiary);
}

.task-check {
    width: 32px;
    height: 32px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    flex: none;
    border-radius: 50%;
}

.check-circle {
    width: 19px;
    height: 19px;
    border-radius: 50%;
    border: 1.4px solid #9d9b99;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    transition: border-color .15s, background .15s, transform .15s;
    background: transparent;
    flex: none;
}

html[data-theme="dark"] .check-circle {
    border-color: #a19f9d;
}

.check-circle .icon {
    width: 12px;
    height: 12px;
    opacity: 0;
    color: #fff;
    transform: scale(.7);
    transition: opacity .12s, transform .12s;
}

.task-check:hover .check-circle {
    border-color: var(--accent);
    background: var(--accent-soft);
}

.task-row.is-completed .check-circle {
    background: var(--accent);
    border-color: var(--accent);
}

.task-row.is-completed .check-circle .icon {
    opacity: 1;
    transform: scale(1);
}

.task-main {
    flex: 1;
    min-width: 0;
    padding: 1px 0;
}

.task-title {
    font-size: 15px;
    font-weight: 400;
    line-height: 1.42;
    color: var(--text);
    letter-spacing: .1px;
    overflow-wrap: anywhere;
}

.task-row.is-important .task-title {
    font-weight: 500;
}

.task-meta {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 4px 11px;
    margin-top: 4px;
    font-size: 11.5px;
    color: var(--text-tertiary);
    line-height: 1.5;
}

.task-meta > span {
    display: inline-flex;
    align-items: center;
    gap: 4px;
}

.task-meta .icon {
    width: 13px;
    height: 13px;
    opacity: .85;
}

.meta-list {
    color: var(--text-tertiary);
    max-width: 220px;
    overflow: hidden;
}

.meta-list > span:last-child {
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.list-dot {
    width: 7px;
    height: 7px;
    border-radius: 50%;
    background: var(--c, var(--accent));
    flex: none;
    display: inline-block;
}

.meta-due {
    font-variant-numeric: tabular-nums;
}

.meta-due.is-today {
    color: var(--green);
}

.meta-due.is-overdue {
    color: var(--danger);
}

.meta-due.is-future {
    color: var(--text-secondary);
}

.meta-due.is-done {
    color: var(--text-tertiary);
}

.meta-myday {
    color: #e9a33c;
}

.task-star {
    width: 30px;
    height: 30px;
    border-radius: var(--radius-sm);
    display: inline-flex;
    align-items: center;
    justify-content: center;
    flex: none;
    color: var(--text-tertiary);
    opacity: .55;
    transition: opacity .13s, color .13s, background .13s;
}

.task-star .icon {
    width: 18px;
    height: 18px;
}

.task-star:hover {
    opacity: 1;
    background: var(--bg-active);
    color: var(--star);
}

.task-star.is-on {
    opacity: 1;
    color: var(--star);
}

.task-row-more {
    width: 28px;
    height: 28px;
    border-radius: var(--radius-sm);
    display: inline-flex;
    align-items: center;
    justify-content: center;
    flex: none;
    color: var(--text-tertiary);
    opacity: 0;
    transition: opacity .13s, background .13s;
}

.task-row-more .icon {
    width: 16px;
    height: 16px;
}

.task-row:hover .task-row-more,
.task-row:focus-within .task-row-more {
    opacity: 1;
}

.task-row-more:hover {
    background: var(--bg-active);
    color: var(--text);
}

/* 拖拽排序 */
.task-row[draggable="true"] {
    cursor: grab;
}

.task-row.dragging {
    opacity: .35;
}

.task-row.drag-over {
    box-shadow: inset 0 2px 0 var(--accent);
}

/* ------------------------------ 已完成区 ------------------------------ */
.completed-section {
    margin-top: 26px;
    border-top: 1px solid var(--border-soft);
    padding-top: 6px;
}

.completed-toggle {
    display: flex;
    align-items: center;
    gap: 7px;
    height: 38px;
    padding: 0 6px;
    border-radius: var(--radius-sm);
    color: var(--text-secondary);
    font-size: 13px;
    width: 100%;
    text-align: left;
}

.completed-toggle:hover {
    background: var(--bg-hover);
}

.completed-chevron {
    width: 14px;
    height: 14px;
    transition: transform .15s;
}

.completed-section[data-expanded="1"] .completed-chevron {
    transform: rotate(90deg);
}

.completed-label {
    font-weight: 500;
}

.completed-count {
    font-size: 11px;
    color: var(--text-tertiary);
    background: var(--bg-hover);
    border-radius: 10px;
    padding: 1px 7px;
    font-variant-numeric: tabular-nums;
}

.completed-items .task-row {
    opacity: .8;
}

.completed-page-head {
    padding: 12px 4px 4px;
    color: var(--text-tertiary);
    font-size: 12px;
}

/* ------------------------------ 空状态 ------------------------------ */
.empty-state {
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
    padding: 46px 20px 40px;
    max-width: 560px;
    margin: 0 auto;
}

.empty-icon {
    width: 76px;
    height: 76px;
    border-radius: 50%;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    color: var(--empty-color, var(--accent));
    background: color-mix(in srgb, var(--empty-color, var(--accent)) 12%, var(--bg-main));
    margin-bottom: 20px;
}

.empty-icon .icon {
    width: 34px;
    height: 34px;
    opacity: .8;
}

.empty-emoji {
    font-size: 34px;
}

.empty-title {
    font-size: 21px;
    font-weight: 600;
    letter-spacing: -.2px;
    margin-bottom: 8px;
}

.empty-text {
    font-size: 13px;
    color: var(--text-secondary);
    line-height: 1.7;
    max-width: 360px;
    margin-bottom: 22px;
}

.empty-action {
    height: 38px;
    padding: 0 18px;
    border-radius: var(--radius-md);
    background: var(--accent);
    color: #fff;
    display: inline-flex;
    align-items: center;
    font-size: 13px;
    transition: background .15s, transform .15s;
}

.empty-action:hover {
    background: var(--accent-strong);
}

/* My Day 空状态 */
.empty-state--sun {
    padding-top: 26px;
}

.myday-empty-art {
    width: min(100%, 360px);
    margin-bottom: 26px;
}

.myday-svg {
    width: 100%;
    height: auto;
    display: block;
    --empty-card: var(--bg-subtle);
    filter: drop-shadow(0 8px 18px rgba(0, 0, 0, .06));
}

.empty-state--sun .empty-title {
    font-size: 24px;
}

.empty-state--sun .empty-text {
    max-width: 400px;
}

.empty-state--sun .empty-action {
    border-radius: 4px;
    background: var(--accent);
}

/* ------------------------------ 建议 ------------------------------ */
.suggestions {
    margin-top: 42px;
    padding-top: 18px;
    border-top: 1px solid var(--border-soft);
}

.suggestions-head {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 12px;
    margin-bottom: 12px;
    padding: 0 4px;
}

.suggestions-title {
    font-size: 16px;
    font-weight: 600;
    letter-spacing: -.1px;
}

.suggestions-sub {
    margin-top: 3px;
    font-size: 12px;
    color: var(--text-tertiary);
}

.suggestion-list {
    display: flex;
    flex-direction: column;
    gap: 2px;
}

.suggestion-row {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 8px 6px;
    border-radius: var(--radius-md);
    border: 1px solid var(--border-soft);
    background: var(--bg-subtle);
    transition: background .13s, border-color .13s;
}

.suggestion-row:hover {
    background: var(--bg-elev);
    border-color: var(--border);
}

.suggestion-add {
    width: 26px;
    height: 26px;
    border-radius: 50%;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    color: var(--accent);
    border: 1px solid var(--border-strong);
    flex: none;
    transition: all .15s;
}

.suggestion-add .icon {
    width: 14px;
    height: 14px;
}

.suggestion-add:hover {
    background: var(--accent);
    border-color: var(--accent);
    color: #fff;
}

.suggestion-body {
    flex: 1;
    min-width: 0;
    text-align: left;
    display: flex;
    flex-direction: column;
    gap: 3px;
}

.suggestion-title {
    font-size: 13.5px;
    color: var(--text);
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.suggestion-meta {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 11px;
    color: var(--text-tertiary);
}

.suggestion-due.is-today { color: var(--green); }
.suggestion-due.is-overdue { color: var(--danger); }

/* ------------------------------ 已计划 ------------------------------ */
.planned-items {
    padding-top: 10px;
}

.planned-group {
    margin-bottom: 30px;
}

.planned-head {
    display: flex;
    align-items: baseline;
    gap: 10px;
    padding: 0 4px 8px;
    border-bottom: 1px solid var(--border-soft);
}

.planned-label {
    font-size: 17px;
    font-weight: 600;
    letter-spacing: -.2px;
}

.planned-date {
    font-size: 11.5px;
    color: var(--text-tertiary);
    font-variant-numeric: tabular-nums;
}

.planned-count {
    margin-left: auto;
    font-size: 11px;
    color: var(--text-tertiary);
}

.planned-list .task-row {
    border-bottom-color: transparent;
}

.planned-list .task-row:hover {
    border-bottom-color: var(--border-soft);
}

/* ------------------------------ 详情面板 ------------------------------ */
.detail-host {
    position: fixed;
    inset: 0;
    z-index: 70;
    pointer-events: none;
}

.detail-host.is-open {
    pointer-events: none;
}

.detail-scrim {
    position: absolute;
    inset: 0;
    background: transparent;
    opacity: 0;
    transition: opacity .2s;
    pointer-events: none;
}

.detail-host.is-open .detail-scrim {
    opacity: 1;
}

.detail-panel {
    pointer-events: auto;
    position: absolute;
    top: 0;
    right: 0;
    bottom: 0;
    width: 420px;
    max-width: 100%;
    background: var(--bg-elev);
    border-left: 1px solid var(--border);
    box-shadow: -18px 0 44px rgba(0, 0, 0, .16);
    display: flex;
    flex-direction: column;
    transform: translateX(102%);
    transition: transform .24s cubic-bezier(.2, .7, .2, 1);
}

.detail-host.is-open .detail-panel {
    transform: translateX(0);
}

.detail-header {
    flex: none;
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 12px 12px 10px 14px;
    border-bottom: 1px solid var(--border-soft);
}

.detail-check {
    width: 34px;
    height: 34px;
}

.detail-check .check-circle {
    width: 22px;
    height: 22px;
}

.detail-check .check-circle .icon {
    width: 14px;
    height: 14px;
}

.detail-check.is-checked .check-circle {
    background: var(--accent);
    border-color: var(--accent);
}

.detail-check.is-checked .check-circle .icon {
    opacity: 1;
    transform: scale(1);
}

.detail-title {
    flex: 1;
    min-width: 0;
    height: 38px;
    border: 0;
    outline: none;
    background: transparent;
    font-size: 18px;
    font-weight: 600;
    letter-spacing: -.1px;
    padding: 0 4px;
    border-bottom: 1px solid transparent;
    transition: border-color .15s;
}

.detail-title:focus {
    border-bottom-color: var(--border-strong);
}

.detail-star {
    width: 32px;
    height: 32px;
    border-radius: var(--radius-sm);
    display: inline-flex;
    align-items: center;
    justify-content: center;
    color: var(--text-tertiary);
    flex: none;
}

.detail-star .icon {
    width: 19px;
    height: 19px;
}

.detail-star:hover {
    background: var(--bg-hover);
    color: var(--star);
}

.detail-star.is-on {
    color: var(--star);
}

.detail-close {
    width: 32px;
    height: 32px;
}

.detail-close .icon {
    width: 17px;
    height: 17px;
}

.detail-scroll {
    flex: 1;
    min-height: 0;
    overflow-y: auto;
    padding: 14px 20px 20px;
}

.detail-section-head {
    display: flex;
    align-items: center;
    gap: 7px;
    font-size: 12px;
    font-weight: 600;
    color: var(--text-secondary);
    margin-bottom: 6px;
    letter-spacing: .2px;
}

.detail-section-head .icon {
    width: 15px;
    height: 15px;
    color: var(--text-tertiary);
}

.detail-steps {
    margin-bottom: 22px;
}

.steps-progress {
    color: var(--accent);
    font-size: 11px;
    font-variant-numeric: tabular-nums;
}

.steps-list {
    display: flex;
    flex-direction: column;
}

.step-row {
    display: flex;
    align-items: center;
    gap: 8px;
    min-height: 38px;
    padding: 2px 2px;
    border-radius: var(--radius-sm);
    position: relative;
}

.step-row:hover {
    background: var(--bg-hover);
}

.step-check {
    width: 26px;
    height: 26px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    flex: none;
}

.check-circle--sm {
    width: 16px;
    height: 16px;
}

.check-circle--sm .icon {
    width: 10px;
    height: 10px;
}

.step-check.is-checked .check-circle {
    background: var(--accent);
    border-color: var(--accent);
}

.step-check.is-checked .check-circle .icon {
    opacity: 1;
    transform: scale(1);
}

.step-input {
    flex: 1;
    min-width: 0;
    height: 30px;
    border: 0;
    border-bottom: 1px solid transparent;
    background: transparent;
    outline: none;
    font-size: 13px;
    padding: 0 4px;
}

.step-input:focus {
    border-bottom-color: var(--border-strong);
}

.step-input.is-done {
    color: var(--text-tertiary);
    text-decoration: line-through;
}

.step-delete {
    width: 24px;
    height: 24px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    color: var(--text-tertiary);
    opacity: 0;
    border-radius: var(--radius-sm);
    flex: none;
}

.step-delete .icon {
    width: 13px;
    height: 13px;
}

.step-row:hover .step-delete {
    opacity: 1;
}

.step-delete:hover {
    background: var(--danger-soft);
    color: var(--danger);
}

.step-add-row {
    display: flex;
    align-items: center;
    gap: 8px;
    height: 36px;
    padding: 0 6px;
    border-radius: var(--radius-sm);
    color: var(--text-tertiary);
}

.step-add-row:hover {
    background: var(--bg-hover);
}

.step-add-row .icon {
    width: 15px;
    height: 15px;
}

.step-add-row input {
    flex: 1;
    min-width: 0;
    height: 100%;
    border: 0;
    outline: none;
    background: transparent;
    font-size: 13px;
}

.detail-note-section {
    margin-bottom: 22px;
}

.detail-note {
    width: 100%;
    min-height: 58px;
    resize: none;
    border: 1px solid var(--border);
    border-radius: var(--radius-md);
    background: var(--bg-subtle);
    padding: 9px 11px;
    outline: none;
    font-size: 13px;
    line-height: 1.6;
    transition: border-color .15s, background .15s;
    overflow: hidden;
}

.detail-note:focus {
    border-color: var(--accent);
    background: var(--bg-main);
}

.detail-note::placeholder {
    color: var(--text-tertiary);
}

.detail-attachments {
    margin-bottom: 18px;
}

.attach-count {
    font-size: 11px;
    color: var(--text-tertiary);
}

.attachment-row {
    display: flex;
    align-items: center;
    gap: 8px;
    height: 38px;
    padding: 0 6px;
    border-radius: var(--radius-sm);
    font-size: 12.5px;
}

.attachment-row:hover {
    background: var(--bg-hover);
}

.attach-file {
    width: 16px;
    height: 16px;
    color: var(--text-tertiary);
    flex: none;
}

.attachment-name {
    flex: 1;
    min-width: 0;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    color: var(--text-secondary);
}

.attachment-name:hover {
    color: var(--accent);
    text-decoration: underline;
}

.attachment-size {
    font-size: 11px;
    color: var(--text-tertiary);
    flex: none;
}

.attachment-delete {
    width: 23px;
    height: 23px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    color: var(--text-tertiary);
    border-radius: var(--radius-sm);
    opacity: 0;
    flex: none;
}

.attachment-delete .icon {
    width: 12px;
    height: 12px;
}

.attachment-row:hover .attachment-delete {
    opacity: 1;
}

.attachment-delete:hover {
    background: var(--danger-soft);
    color: var(--danger);
}

.attachment-add {
    display: inline-flex;
    align-items: center;
    gap: 7px;
    height: 34px;
    padding: 0 8px;
    margin-top: 2px;
    border-radius: var(--radius-sm);
    color: var(--accent);
    font-size: 12.5px;
    cursor: pointer;
}

.attachment-add:hover {
    background: var(--accent-soft);
}

.attachment-add .icon {
    width: 15px;
    height: 15px;
}

.detail-created {
    font-size: 11.5px;
    color: var(--text-tertiary);
    padding-top: 30px;
}

.detail-footer {
    flex: none;
    border-top: 1px solid var(--border-soft);
    background: var(--bg-elev);
    padding: 10px 16px 14px;
}

.detail-meta-buttons {
    display: flex;
    flex-wrap: wrap;
    gap: 4px;
    margin-bottom: 8px;
}

.meta-chip {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    height: 32px;
    padding: 0 9px;
    border-radius: var(--radius-sm);
    font-size: 12px;
    color: var(--text-secondary);
    max-width: 100%;
}

.meta-chip .icon {
    width: 15px;
    height: 15px;
    color: var(--text-tertiary);
}

.meta-chip:hover {
    background: var(--bg-hover);
}

.meta-chip.has-value {
    color: var(--accent);
}

.meta-chip.has-value .icon {
    color: var(--accent);
}

.meta-chip span {
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    max-width: 200px;
}

.detail-bottom-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 8px;
    margin-top: 4px;
}

.detail-list-select {
    position: relative;
    display: flex;
    align-items: center;
    gap: 6px;
    height: 32px;
    padding: 0 8px;
    border-radius: var(--radius-sm);
    background: var(--bg-subtle);
    border: 1px solid var(--border-soft);
    min-width: 0;
}

.detail-list-select select {
    border: 0;
    outline: none;
    background: transparent;
    appearance: none;
    font-size: 12px;
    color: var(--text-secondary);
    padding-right: 16px;
    max-width: 200px;
    cursor: pointer;
}

.select-chevron {
    width: 13px;
    height: 13px;
    color: var(--text-tertiary);
    position: absolute;
    right: 7px;
    pointer-events: none;
}

.detail-delete {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    height: 30px;
    padding: 0 7px;
    border-radius: var(--radius-sm);
    color: var(--text-tertiary);
    font-size: 12px;
    flex: none;
}

.detail-delete .icon {
    width: 14px;
    height: 14px;
}

.detail-delete:hover {
    background: var(--danger-soft);
    color: var(--danger);
}

.detail-myday {
    display: flex;
    align-items: center;
    gap: 8px;
    width: 100%;
    height: 36px;
    margin-top: 10px;
    padding: 0 10px;
    border-radius: var(--radius-sm);
    color: var(--text-secondary);
    font-size: 12.5px;
    border: 1px solid var(--border-soft);
    background: var(--bg-subtle);
    text-align: left;
}

.detail-myday:hover {
    background: var(--bg-hover);
}

.detail-myday.is-on {
    color: var(--accent);
    background: var(--accent-soft);
    border-color: transparent;
}

.detail-myday-icon {
    display: inline-flex;
    color: #e9a33c;
}

html[data-theme="dark"] .detail-myday-icon {
    color: #ffcf6d;
}

/* ------------------------------ 弹出菜单 / 模态框 ------------------------------ */
.popmenu {
    position: fixed;
    z-index: 1100;
    min-width: 190px;
    background: var(--bg-elev);
    border: 1px solid var(--border);
    border-radius: var(--radius-md);
    box-shadow: var(--shadow-md);
    padding: 4px;
    animation: pop-in .12s ease-out;
}

@keyframes pop-in {
    from { opacity: 0; transform: translateY(-4px) scale(.98); }
    to { opacity: 1; transform: translateY(0) scale(1); }
}

.popmenu-item {
    display: flex;
    align-items: center;
    gap: 9px;
    width: 100%;
    height: 36px;
    padding: 0 10px;
    border-radius: var(--radius-sm);
    font-size: 12.5px;
    color: var(--text);
    text-align: left;
    white-space: nowrap;
}

.popmenu-item .icon {
    width: 15px;
    height: 15px;
    color: var(--text-tertiary);
}

.popmenu-item:hover {
    background: var(--bg-hover);
}

.popmenu-item.is-danger {
    color: var(--danger);
}

.popmenu-item.is-danger .icon {
    color: var(--danger);
}

.popmenu-item.is-selected {
    color: var(--accent);
}

.popmenu-item.is-selected::after {
    content: "✓";
    margin-left: auto;
    color: var(--accent);
}

.popmenu-sep {
    height: 1px;
    background: var(--border-soft);
    margin: 4px 2px;
}

.popmenu-label {
    padding: 6px 10px 4px;
    font-size: 10.5px;
    letter-spacing: .4px;
    color: var(--text-tertiary);
    text-transform: uppercase;
}

.popover {
    position: fixed;
    z-index: 1100;
    width: 280px;
    background: var(--bg-elev);
    border: 1px solid var(--border);
    border-radius: var(--radius-md);
    box-shadow: var(--shadow-md);
    padding: 12px;
    animation: pop-in .12s ease-out;
}

.popover-title {
    font-size: 13px;
    font-weight: 600;
    margin-bottom: 10px;
}

.popover-field {
    display: flex;
    flex-direction: column;
    gap: 5px;
    margin-bottom: 10px;
}

.popover-field span {
    font-size: 11px;
    color: var(--text-tertiary);
}

.popover-field input,
.popover-field select {
    height: 34px;
    border: 1px solid var(--border-strong);
    border-radius: var(--radius-sm);
    background: var(--bg-input);
    outline: none;
    padding: 0 9px;
    font-size: 12.5px;
}

.popover-field input:focus,
.popover-field select:focus {
    border-color: var(--accent);
}

.popover-quick {
    display: flex;
    flex-wrap: wrap;
    gap: 5px;
    margin-bottom: 10px;
}

.quick-chip {
    height: 27px;
    padding: 0 9px;
    border-radius: 13px;
    border: 1px solid var(--border);
    font-size: 11.5px;
    color: var(--text-secondary);
    background: var(--bg-subtle);
}

.quick-chip:hover {
    border-color: var(--accent);
    color: var(--accent);
}

.popover-actions {
    display: flex;
    justify-content: flex-end;
    gap: 6px;
    margin-top: 4px;
}

.popover-actions .btn-primary {
    height: 32px;
    padding: 0 14px;
    font-size: 12px;
}

.popover-actions .btn-quiet {
    height: 32px;
    font-size: 12px;
}

.modal-root {
    position: fixed;
    inset: 0;
    z-index: 1200;
    display: none;
}

.modal-root.is-open {
    display: block;
}

.modal-backdrop {
    position: absolute;
    inset: 0;
    background: rgba(0, 0, 0, .38);
    backdrop-filter: blur(2px);
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 20px;
}

.modal-card {
    width: 440px;
    max-width: 100%;
    max-height: 90vh;
    overflow-y: auto;
    background: var(--bg-elev);
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-lg);
    padding: 20px;
    animation: modal-in .18s ease-out;
}

@keyframes modal-in {
    from { opacity: 0; transform: translateY(10px) scale(.98); }
    to { opacity: 1; transform: translateY(0) scale(1); }
}

.modal-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 16px;
}

.modal-title {
    font-size: 17px;
    font-weight: 600;
}

.modal-close {
    width: 30px;
    height: 30px;
    border-radius: var(--radius-sm);
    display: inline-flex;
    align-items: center;
    justify-content: center;
    color: var(--text-tertiary);
}

.modal-close:hover {
    background: var(--bg-hover);
    color: var(--text);
}

.modal-field {
    margin-bottom: 16px;
}

.modal-label {
    display: block;
    font-size: 12px;
    color: var(--text-secondary);
    margin-bottom: 7px;
    font-weight: 500;
}

.modal-input {
    width: 100%;
    height: 40px;
    border: 1px solid var(--border-strong);
    border-radius: var(--radius-sm);
    background: var(--bg-input);
    outline: none;
    padding: 0 11px;
    font-size: 14px;
}

.modal-input:focus {
    border-color: var(--accent);
    box-shadow: 0 0 0 3px var(--accent-soft);
}

.icon-grid {
    display: grid;
    grid-template-columns: repeat(8, 1fr);
    gap: 5px;
}

.icon-choice {
    aspect-ratio: 1;
    border-radius: var(--radius-sm);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 18px;
    border: 1px solid transparent;
    background: var(--bg-subtle);
}

.icon-choice:hover {
    background: var(--bg-hover);
}

.icon-choice.selected {
    border-color: var(--accent);
    background: var(--accent-soft);
}

.color-grid {
    display: flex;
    gap: 9px;
    flex-wrap: wrap;
}

.color-choice {
    width: 24px;
    height: 24px;
    border-radius: 50%;
    border: 2px solid transparent;
    box-shadow: inset 0 0 0 1px rgba(0, 0, 0, .12);
    position: relative;
}

.color-choice.selected {
    border-color: var(--text);
    box-shadow: 0 0 0 2px var(--bg-elev) inset;
}

.group-select {
    width: 100%;
    height: 40px;
    border: 1px solid var(--border-strong);
    border-radius: var(--radius-sm);
    background: var(--bg-input);
    padding: 0 10px;
    outline: none;
    font-size: 13px;
}

.modal-actions {
    display: flex;
    justify-content: flex-end;
    gap: 8px;
    margin-top: 22px;
}

.modal-actions .btn-primary,
.modal-actions .btn-quiet {
    height: 36px;
    padding: 0 18px;
    font-size: 13px;
}

.btn-danger {
    height: 36px;
    padding: 0 16px;
    border-radius: var(--radius-sm);
    background: var(--danger);
    color: #fff;
    font-size: 13px;
}

.btn-danger:hover {
    filter: brightness(.95);
}

.preview-list {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-top: 4px;
}

.preview-list-icon {
    width: 34px;
    height: 34px;
    border-radius: 8px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-size: 18px;
    background: var(--bg-subtle);
}

.preview-list-name {
    font-size: 13px;
    color: var(--text-secondary);
}

/* ------------------------------ 搜索页 ------------------------------ */
.search-page {
    min-height: 100%;
    display: flex;
    flex-direction: column;
}

.search-header {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 14px 20px;
    border-bottom: 1px solid var(--border-soft);
    position: sticky;
    top: 0;
    background: var(--bg-main);
    z-index: 10;
}

.search-field {
    flex: 1;
    max-width: 760px;
    margin: 0 auto;
    position: relative;
    display: flex;
    align-items: center;
}

.search-field-icon {
    position: absolute;
    left: 12px;
    width: 17px;
    height: 17px;
    color: var(--text-tertiary);
}

.search-field input {
    width: 100%;
    height: 42px;
    border: 1px solid var(--border);
    border-radius: 21px;
    background: var(--bg-subtle);
    padding: 0 40px;
    outline: none;
    font-size: 14px;
    transition: border-color .15s, background .15s, box-shadow .15s;
}

.search-field input:focus {
    border-color: var(--accent);
    background: var(--bg-main);
    box-shadow: 0 0 0 3px var(--accent-soft);
}

.search-clear {
    position: absolute;
    right: 6px;
    width: 30px;
    height: 30px;
    border-radius: 50%;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    color: var(--text-tertiary);
}

.search-clear:hover {
    background: var(--bg-hover);
}

.search-clear .icon {
    width: 14px;
    height: 14px;
}

.search-shortcut {
    font-size: 10.5px;
    color: var(--text-tertiary);
    border: 1px solid var(--border);
    border-radius: 4px;
    padding: 2px 6px;
    flex: none;
}

.search-body {
    width: 100%;
    max-width: 900px;
    margin: 0 auto;
    padding: 18px 24px 60px;
}

.search-summary {
    font-size: 12px;
    color: var(--text-tertiary);
    padding: 4px 6px 10px;
}

.search-total {
    color: var(--accent);
}

.search-items .task-row {
    border-bottom-color: var(--border-soft);
}

.search-empty {
    text-align: center;
    padding: 70px 20px;
    color: var(--text-secondary);
}

.search-empty-icon {
    width: 66px;
    height: 66px;
    margin: 0 auto 18px;
    border-radius: 50%;
    background: var(--bg-subtle);
    color: var(--text-tertiary);
    display: flex;
    align-items: center;
    justify-content: center;
}

.search-empty-icon .icon {
    width: 28px;
    height: 28px;
}

.search-empty h2 {
    font-size: 17px;
    color: var(--text);
    margin-bottom: 7px;
    font-weight: 600;
}

.search-empty p {
    font-size: 12.5px;
    color: var(--text-tertiary);
}

/* ------------------------------ 设置页 ------------------------------ */
.settings-page {
    min-height: 100%;
    display: flex;
    flex-direction: column;
}

.settings-header {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 16px 24px;
    border-bottom: 1px solid var(--border-soft);
    background: var(--bg-main);
}

.settings-header h1 {
    font-size: 22px;
    font-weight: 600;
    letter-spacing: -.2px;
}

.settings-body {
    width: 100%;
    max-width: 760px;
    margin: 0 auto;
    padding: 24px 24px 80px;
    display: flex;
    flex-direction: column;
    gap: 18px;
}

.settings-card {
    border: 1px solid var(--border);
    border-radius: var(--radius-lg);
    background: var(--bg-elev);
    padding: 20px 22px;
    box-shadow: var(--shadow-sm);
}

.settings-card-head {
    display: flex;
    justify-content: space-between;
    gap: 12px;
    margin-bottom: 16px;
}

.settings-card-head h2 {
    font-size: 15px;
    font-weight: 600;
    letter-spacing: -.1px;
}

.settings-card-head p {
    margin-top: 4px;
    font-size: 11.5px;
    color: var(--text-tertiary);
}

.account-profile {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 12px 0 16px;
    border-bottom: 1px solid var(--border-soft);
}

.avatar-lg {
    width: 46px;
    height: 46px;
    font-size: 18px;
}

.account-profile-text {
    flex: 1;
    min-width: 0;
}

.account-profile-name {
    font-size: 14px;
    font-weight: 600;
}

.account-profile-sub {
    margin-top: 3px;
    font-size: 11.5px;
    color: var(--text-tertiary);
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.logout-form {
    margin: 0;
}

.account-stats {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 8px;
    padding-top: 16px;
}

.stat {
    display: flex;
    flex-direction: column;
    gap: 2px;
}

.stat-value {
    font-size: 20px;
    font-weight: 600;
    font-variant-numeric: tabular-nums;
    color: var(--text);
}

.stat-label {
    font-size: 11px;
    color: var(--text-tertiary);
}

.theme-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 10px;
}

.theme-card {
    display: flex;
    flex-direction: column;
    gap: 9px;
    padding: 8px;
    border: 1px solid var(--border);
    border-radius: var(--radius-md);
    background: var(--bg-subtle);
    transition: border-color .15s, box-shadow .15s;
}

.theme-card:hover {
    border-color: var(--border-strong);
}

.theme-card.selected {
    border-color: var(--accent);
    box-shadow: 0 0 0 2px var(--accent-soft);
}

.theme-preview {
    height: 74px;
    border-radius: var(--radius-sm);
    display: flex;
    overflow: hidden;
    border: 1px solid var(--border);
}

.preview-sidebar {
    width: 30%;
    background: #f3f2f1;
}

.preview-main {
    flex: 1;
    background: #ffffff;
    padding: 14px 10px;
    display: flex;
    flex-direction: column;
    gap: 7px;
}

.preview-line {
    height: 7px;
    width: 88%;
    border-radius: 4px;
    background: #e1dfdd;
}

.preview-line.short {
    width: 60%;
    background: #2564cf;
    opacity: .45;
}

.theme-preview--dark .preview-sidebar { background: #252423; }
.theme-preview--dark .preview-main { background: #1f1e1d; }
.theme-preview--dark .preview-line { background: #3b3a39; }
.theme-preview--dark .preview-line.short { background: #5b93f5; opacity: .55; }

.theme-preview--system {
    background: linear-gradient(90deg, #f3f2f1 0 30%, #fff 30% 100%);
}

.theme-preview--system .preview-sidebar {
    background: linear-gradient(180deg, #f3f2f1 50%, #252423 50%);
}

.theme-preview--system .preview-main {
    background: linear-gradient(180deg, #fff 50%, #1f1e1d 50%);
}

.theme-name {
    display: flex;
    align-items: center;
    gap: 6px;
    font-size: 12px;
    color: var(--text-secondary);
    padding-left: 2px;
}

.theme-name .icon {
    width: 15px;
    height: 15px;
}

.settings-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 20px;
    padding: 14px 0;
    border-top: 1px solid var(--border-soft);
}

.settings-card .settings-row:first-of-type {
    border-top: 0;
    padding-top: 2px;
}

.settings-row-title {
    font-size: 13px;
    font-weight: 500;
}

.settings-row-sub {
    margin-top: 3px;
    font-size: 11.5px;
    color: var(--text-tertiary);
    max-width: 440px;
}

.switch {
    width: 42px;
    height: 22px;
    border-radius: 11px;
    background: var(--border-strong);
    position: relative;
    flex: none;
    transition: background .18s;
}

.switch-knob {
    position: absolute;
    top: 3px;
    left: 3px;
    width: 16px;
    height: 16px;
    border-radius: 50%;
    background: #fff;
    box-shadow: 0 1px 2px rgba(0, 0, 0, .25);
    transition: transform .18s;
}

.switch.is-on {
    background: var(--accent);
}

.switch.is-on .switch-knob {
    transform: translateX(20px);
}

.settings-links {
    display: flex;
    flex-direction: column;
    gap: 2px;
}

.settings-link {
    display: flex;
    align-items: center;
    gap: 10px;
    height: 40px;
    padding: 0 6px;
    border-radius: var(--radius-sm);
    font-size: 13px;
    color: var(--text-secondary);
}

.settings-link .icon {
    width: 16px;
    height: 16px;
    color: var(--text-tertiary);
}

.settings-link:hover {
    background: var(--bg-hover);
    color: var(--text);
}

.link-arrow {
    margin-left: auto;
}

.settings-about {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 16px 22px;
}

.about-mark {
    width: 38px;
    height: 38px;
    border-radius: 9px;
    background: var(--accent);
    color: #fff;
    display: flex;
    align-items: center;
    justify-content: center;
}

.about-title {
    font-size: 14px;
    font-weight: 600;
}

.about-sub {
    margin-top: 2px;
    font-size: 11.5px;
    color: var(--text-tertiary);
}

/* ------------------------------ 登录 / 注册 ------------------------------ */
.auth-page {
    height: 100vh;
    overflow-y: auto;
    background: #f5f7fb;
}

html[data-theme="dark"] .auth-page {
    background: #171614;
}

.auth-bg {
    position: fixed;
    inset: 0;
    overflow: hidden;
    pointer-events: none;
}

.auth-grid {
    position: absolute;
    inset: 0;
    background-image: linear-gradient(rgba(37, 100, 207, .035) 1px, transparent 1px),
                      linear-gradient(90deg, rgba(37, 100, 207, .035) 1px, transparent 1px);
    background-size: 48px 48px;
    mask-image: radial-gradient(circle at 30% 20%, #000 0%, transparent 70%);
}

.auth-orb {
    position: absolute;
    border-radius: 50%;
    filter: blur(2px);
    opacity: .55;
}

.orb-one {
    width: 460px;
    height: 460px;
    right: -120px;
    top: -140px;
    background: radial-gradient(circle at 30% 30%, #bcd9ff, #2564cf 72%);
    opacity: .16;
}

.orb-two {
    width: 380px;
    height: 380px;
    left: -140px;
    bottom: -160px;
    background: radial-gradient(circle at 60% 40%, #ffdba8, #e9a33c 70%);
    opacity: .14;
}

.orb-three {
    width: 240px;
    height: 240px;
    left: 42%;
    top: 58%;
    background: radial-gradient(circle at 50% 50%, #c9efe4, #4fa3a0 75%);
    opacity: .12;
}

.auth-shell {
    position: relative;
    z-index: 1;
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0;
    padding: 30px 24px;
    max-width: 1000px;
    margin: 0 auto;
}

.auth-shell--single {
    max-width: 520px;
}

.auth-panel {
    background: var(--bg-elev);
    border-radius: 14px;
    box-shadow: 0 24px 70px rgba(24, 50, 90, .14);
    border: 1px solid rgba(255, 255, 255, .6);
}

html[data-theme="dark"] .auth-panel {
    box-shadow: 0 24px 70px rgba(0, 0, 0, .5);
    border-color: var(--border);
}

.auth-form-panel {
    width: 420px;
    flex: none;
    padding: 38px 38px 30px;
    position: relative;
    z-index: 2;
}

.auth-art-panel {
    flex: 1;
    max-width: 440px;
    min-height: 520px;
    margin-left: -14px;
    padding: 40px 34px;
    background: linear-gradient(150deg, #0e4f6b 0%, #1a7188 45%, #4b9aa4 100%);
    color: #fff;
    display: flex;
    align-items: center;
    border-top-left-radius: 14px;
    border-bottom-left-radius: 14px;
    border-top-right-radius: 14px;
    border-bottom-right-radius: 14px;
}

.auth-art-inner {
    width: 100%;
}

.auth-art-svg {
    width: 100%;
    max-width: 340px;
    display: block;
    margin: 0 auto 16px;
}

.auth-art-title {
    font-size: 24px;
    font-weight: 600;
    letter-spacing: -.4px;
    margin-bottom: 10px;
}

.auth-art-text {
    font-size: 13px;
    line-height: 1.75;
    color: rgba(255, 255, 255, .78);
    max-width: 340px;
    margin-bottom: 22px;
}

.auth-art-list {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.auth-art-list li {
    display: flex;
    align-items: center;
    gap: 9px;
    font-size: 12.5px;
    color: rgba(255, 255, 255, .82);
}

.auth-art-list .icon {
    width: 16px;
    height: 16px;
    color: rgba(255, 255, 255, .6);
}

.auth-brand {
    display: inline-flex;
    align-items: center;
    gap: 9px;
    margin-bottom: 28px;
    color: var(--text);
}

.auth-brand .brand-mark {
    width: 32px;
    height: 32px;
    border-radius: 8px;
}

.auth-brand .brand-text {
    font-size: 19px;
}

.auth-title {
    font-size: 26px;
    font-weight: 600;
    letter-spacing: -.4px;
}

.auth-sub {
    margin-top: 7px;
    margin-bottom: 24px;
    font-size: 12.5px;
    color: var(--text-tertiary);
}

.auth-form {
    display: flex;
    flex-direction: column;
    gap: 15px;
}

.auth-submit {
    width: 100%;
    margin-top: 4px;
}

.auth-error {
    padding: 9px 12px;
    border-radius: var(--radius-sm);
    background: var(--danger-soft);
    color: var(--danger);
    font-size: 12px;
    margin-bottom: 14px;
}

.auth-demo {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    margin-top: 18px;
    padding: 9px;
    border-radius: var(--radius-sm);
    background: var(--bg-subtle);
    font-size: 11.5px;
    color: var(--text-tertiary);
}

.auth-foot {
    margin-top: 22px;
    padding-top: 16px;
    border-top: 1px solid var(--border-soft);
    font-size: 12px;
    color: var(--text-tertiary);
    text-align: center;
}

.auth-foot a {
    color: var(--accent);
    margin-left: 4px;
    font-weight: 500;
}

.auth-setup-note {
    margin-top: 16px;
    font-size: 11px;
    color: var(--text-tertiary);
    text-align: center;
}

/* ------------------------------ 响应式 ------------------------------ */
@media (max-width: 1180px) {
    .page-header-inner,
    .page-body {
        padding-left: 26px;
        padding-right: 26px;
    }
}

@media (max-width: 980px) {
    .detail-panel { width: 380px; }
    .auth-art-panel { display: none; }
    .auth-shell { max-width: 520px; }
}

@media (max-width: 860px) {
    .page-header { height: 118px; }
    .page-header--sun { height: 150px; }
    .page-header-inner {
        padding: 18px 18px 14px;
    }
    .page-title { font-size: 24px; }
    .page-emoji { width: 40px; height: 40px; font-size: 21px; border-radius: 10px; }
    .page-emoji .icon { width: 21px; height: 21px; }
    .page-heading { gap: 11px; }
    .page-body { padding: 6px 18px 60px; }
    .page-sub { font-size: 11.5px; }
    .task-row { min-height: 52px; }
    .task-title { font-size: 14.5px; }
    .task-row-more { opacity: .6; }
    .detail-panel { width: 100%; border-left: 0; }
    .detail-host.is-open { pointer-events: auto; }
    .detail-host.is-open .detail-scrim { pointer-events: auto; background: rgba(0, 0, 0, .38); }
    .search-header { padding: 10px 12px; }
    .search-body { padding: 14px 14px 50px; }
    .settings-body { padding: 16px 14px 60px; }
    .settings-card { padding: 16px; }
    .account-stats { grid-template-columns: repeat(2, 1fr); row-gap: 14px; }
    .theme-grid { grid-template-columns: repeat(3, 1fr); gap: 6px; }
    .theme-preview { height: 58px; }
    .account-profile { flex-wrap: wrap; }
    .logout-form { width: 100%; }
    .logout-form .btn-quiet { width: 100%; justify-content: center; }
}

@media (max-width: 560px) {
    .page-task-count { display: none; }
    .page-header--sun { height: 140px; }
    .add-task-hint { display: none; }
    .add-task-row { height: 50px; }
    .task-meta { gap: 4px 8px; }
    .meta-list { max-width: 150px; }
    .suggestions { margin-top: 30px; }
    .icon-grid { grid-template-columns: repeat(6, 1fr); }
    .auth-form-panel { padding: 28px 22px 24px; width: 100%; }
    .auth-shell { padding: 16px 12px; }
    .modal-card { padding: 16px; }
    .detail-header { padding: 10px; }
    .detail-title { font-size: 16px; }
    .detail-scroll { padding: 12px 14px 16px; }
    .detail-footer { padding: 8px 12px 12px; }
    .detail-meta-buttons { gap: 2px; }
    .meta-chip { height: 30px; padding: 0 7px; }
    .settings-body { gap: 12px; }
    .theme-grid { grid-template-columns: 1fr; }
    .theme-card { flex-direction: row; align-items: center; }
    .theme-preview { width: 96px; height: 54px; flex: none; }
    .theme-name { font-size: 13px; }
}
