/* Community Suggestions UI R01-v4 (20261120): Botanical Jade Polish, 3-Row Breathable Cards, Balanced 2.3:1 Columns */
.ql-main-col,
.ql-sidebar {
    min-width: 0;
    max-width: 100%;
}

body.ql-suggestions-active .share-nav,
body:has(#suggestions-page:not([hidden])) .share-nav {
    max-width: 1380px;
    margin-top: 82px;
    padding: 0 32px;
}

#suggestions-page.ql-page-wrap {
    max-width: 1380px;
    width: 100%;
    padding: 18px 32px 64px;
    grid-template-columns: minmax(0, 1fr) 390px;
    gap: 32px;
    align-items: start;
}

@media (min-width: 961px) {
    #suggestions-page .ql-sidebar {
        position: sticky;
        top: 82px;
    }
}

#suggestions-page .ql-page-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
    flex-wrap: wrap;
    padding: 20px 24px;
    margin-bottom: 18px;
    border-radius: 18px;
    border: 1px solid #d9e7de;
    background: radial-gradient(ellipse at top right, rgba(225, 237, 203, 0.85), transparent 62%),
        linear-gradient(135deg, #eef6f1 0%, #f6faf7 100%);
}
#suggestions-page .ql-page-header-copy {
    min-width: 0;
}
#suggestions-page .ql-page-label {
    display: none;
}
#suggestions-page .ql-page-title {
    font-size: 1.5rem;
    font-weight: 800;
    color: #1b3d33;
    margin: 0 0 4px;
    line-height: 1.28;
    letter-spacing: -0.02em;
}
#suggestions-page .ql-page-sub {
    font-size: 0.88rem;
    color: #547066;
    margin: 0;
    line-height: 1.5;
}
.sug-jump-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 38px;
    padding: 9px 18px;
    border-radius: 999px;
    background: #1a6b5c;
    color: #ffffff;
    text-decoration: none;
    font-size: 0.85rem;
    font-weight: 600;
    white-space: nowrap;
    flex: none;
    transition: background-color 0.16s ease, box-shadow 0.16s ease, transform 0.16s ease;
}
.sug-jump-btn:hover {
    background: #145548;
    color: #ffffff;
    box-shadow: 0 4px 12px rgba(26, 107, 92, 0.22);
    transform: translateY(-1px);
}

.sug-tabs {
    display: flex;
    flex-wrap: nowrap;
    gap: 8px;
    max-width: 100%;
    min-width: 0;
    overflow-x: auto;
    scrollbar-width: none;
    border-bottom: 1px solid #e2ebe5;
    margin: 0 0 16px;
    padding: 0 2px;
}
.sug-tabs::-webkit-scrollbar {
    display: none;
}
.sug-tab {
    position: relative;
    flex: none;
    display: inline-flex;
    align-items: center;
    gap: 8px;
    min-height: 42px;
    padding: 9px 14px 11px;
    border: 0;
    border-bottom: 2.5px solid transparent;
    background: transparent;
    color: #526a62;
    font: inherit;
    font-size: 0.92rem;
    font-weight: 600;
    cursor: pointer;
    white-space: nowrap;
    transition: color 0.16s ease, border-color 0.16s ease, background-color 0.16s ease;
}
.sug-tab:hover {
    color: #145548;
    background: rgba(26, 107, 92, 0.05);
}
.sug-tab[aria-selected="true"] {
    color: #145548;
    font-weight: 700;
    border-bottom-color: #1a6b5c;
}
.sug-tab[aria-selected="true"]::after {
    content: "";
    position: absolute;
    left: 10px;
    right: 10px;
    bottom: -1px;
    height: 2.5px;
    background: currentColor;
    border-radius: 2px;
}
.sug-tab:focus-visible,
.sug-jump-btn:focus-visible,
.sug-action-btn:focus-visible,
.sug-page-btn:focus-visible,
.sug-comment-del:focus-visible,
.sug-comment-submit:focus-visible,
.sug-inline-login:focus-visible {
    outline: 3px solid #1a6b5c;
    outline-offset: 2px;
}
.sug-tab-count {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 22px;
    height: 20px;
    padding: 0 7px;
    border-radius: 999px;
    background: rgba(26, 107, 92, 0.09);
    color: #2c4a43;
    font-size: 0.74rem;
    font-weight: 700;
    font-variant-numeric: tabular-nums;
}
.sug-tab[aria-selected="true"] .sug-tab-count {
    background: #1a6b5c;
    color: #ffffff;
}

#taskList {
    gap: 12px;
    margin: 0 0 24px;
}

.sug-card {
    background: #ffffff;
    border: 1px solid #e2ebe5;
    border-radius: 16px;
    padding: 16px 20px 14px;
    box-shadow: 0 2px 10px rgba(26, 77, 61, 0.035);
    transition: border-color 0.16s ease, box-shadow 0.16s ease, transform 0.16s ease;
}
.sug-card:hover {
    border-color: #b7d2c4;
    box-shadow: 0 6px 20px rgba(26, 77, 61, 0.065);
    transform: translateY(-1px);
}
.sug-card[data-done="1"] {
    background: #fafdfb;
}
.sug-card[data-done="2"] {
    background: #fffdfb;
    border-color: #efe4d7;
}
.sug-card[data-done="2"]:hover {
    border-color: #dcc2a3;
}

/* Row 1: 编号 */
.sug-card-id-row {
    display: flex;
    align-items: center;
    margin-bottom: 8px;
}
.sug-id {
    display: inline-flex;
    align-items: center;
    padding: 2px 9px;
    border-radius: 6px;
    background: #f1f6f3;
    color: #546e64;
    font-size: 0.76rem;
    font-weight: 700;
    line-height: 1.45;
    font-variant-numeric: tabular-nums;
}
.sug-card[data-done="2"] .sug-id {
    background: #fbf2e6;
    color: #9a5b25;
}

/* Row 2: 正文内容 */
.sug-content {
    margin: 0;
    color: #1c332c;
    font-size: 0.96rem;
    line-height: 1.65;
    white-space: pre-wrap;
    overflow-wrap: anywhere;
}

/* Row 3 (不采纳): 直接原因正文 */
.sug-reject-box {
    margin-top: 10px;
    padding: 10px 14px;
    border-radius: 10px;
    border-left: 3px solid #c97a2b;
    background: #fdf7ef;
    color: #69411b;
}
.sug-reject-reason {
    margin: 0;
    font-size: 0.87rem;
    line-height: 1.6;
    white-space: pre-wrap;
    overflow-wrap: anywhere;
}

/* Row 3 (未解决 / 已解决): 无边框图标与数字 */
.sug-card-actions-row {
    margin-top: 12px;
    display: flex;
    align-items: center;
}
.sug-actions {
    display: inline-flex;
    align-items: center;
    gap: 16px;
    margin-left: -6px;
}
.sug-action-btn {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    min-height: 32px;
    padding: 5px 8px;
    border: 0;
    border-radius: 8px;
    background: transparent;
    color: #5c726a;
    font: inherit;
    font-size: 0.84rem;
    font-weight: 600;
    cursor: pointer;
    transition: background-color 0.14s ease, color 0.14s ease;
}
.sug-action-btn:hover:not(:disabled) {
    background: rgba(26, 107, 92, 0.08);
    color: #145548;
}
.sug-action-btn.is-up.is-active,
.sug-action-btn.is-up.is-active:disabled {
    background: transparent;
    border: 0;
    color: #145548;
    font-weight: 700;
    opacity: 1;
}
.sug-action-btn.is-up.is-active .sug-ico,
.sug-action-btn.is-up.is-active:disabled .sug-ico {
    fill: rgba(26, 107, 92, 0.18);
}
.sug-action-btn.is-down.is-active,
.sug-action-btn.is-down.is-active:disabled {
    background: transparent;
    border: 0;
    color: #be123c;
    font-weight: 700;
    opacity: 1;
}
.sug-action-btn.is-down.is-active .sug-ico,
.sug-action-btn.is-down.is-active:disabled .sug-ico {
    fill: rgba(190, 18, 60, 0.15);
}
.sug-action-btn:disabled {
    background: transparent;
    border: 0;
    color: #8b9b94;
    opacity: 0.85;
    cursor: not-allowed;
}
.sug-action-btn[aria-expanded="true"] {
    background: rgba(26, 107, 92, 0.09);
    border: 0;
    color: #145548;
}
.sug-ico {
    width: 17px;
    height: 17px;
    flex: none;
    pointer-events: none;
    display: block;
}
.sug-action-count {
    font-variant-numeric: tabular-nums;
}

/* 评论抽屉 */
.sug-comments-panel {
    margin-top: 12px;
    padding: 14px 16px;
    border-radius: 12px;
    background: #f6faf8;
    border: 1px solid #deebe3;
}
.sug-comments-panel[hidden] {
    display: none !important;
}
.sug-comment-form {
    display: grid;
    gap: 8px;
    margin-bottom: 12px;
}
.sug-comment-input {
    width: 100%;
    border: 1.5px solid rgba(26, 107, 92, 0.18);
    border-radius: 10px;
    padding: 10px 12px;
    background: #ffffff;
    color: #1c332c;
    font: inherit;
    font-size: max(1rem, 0.92rem);
    line-height: 1.55;
    resize: vertical;
    min-height: 64px;
}
.sug-comment-input:focus {
    outline: none;
    border-color: #1a6b5c;
    box-shadow: 0 0 0 3px rgba(26, 107, 92, 0.12);
}
.sug-comment-form-foot {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
    flex-wrap: wrap;
}
.sug-comment-meta {
    display: flex;
    align-items: center;
    gap: 10px;
    font-size: 0.78rem;
    color: #5b6b66;
}
.sug-comment-error {
    color: #b91c1c;
    font-weight: 600;
}
.sug-comment-submit {
    min-height: 36px;
    padding: 6px 16px;
    border: 0;
    border-radius: 999px;
    background: #1a6b5c;
    color: #ffffff;
    font: inherit;
    font-size: 0.84rem;
    font-weight: 600;
    cursor: pointer;
}
.sug-comment-submit:hover:not(:disabled) {
    background: #145548;
}
.sug-comment-submit:disabled {
    opacity: 0.6;
    cursor: not-allowed;
}
.sug-readonly-notice,
.sug-comment-login-tip {
    margin-bottom: 10px;
    padding: 9px 12px;
    border-radius: 8px;
    background: #ecf3ee;
    color: #355248;
    font-size: 0.82rem;
    line-height: 1.5;
}
.sug-inline-login {
    padding: 0 4px;
    border: 0;
    background: transparent;
    color: #145548;
    font: inherit;
    font-weight: 700;
    text-decoration: underline;
    cursor: pointer;
}

.sug-comment-list {
    list-style: none;
    margin: 0;
    padding: 0;
    display: flex;
    flex-direction: column;
    gap: 8px;
}
.sug-comment-item {
    background: #ffffff;
    border: 1px solid #e3ece6;
    border-radius: 10px;
    padding: 10px 12px;
}
.sug-comment-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
    margin-bottom: 4px;
    font-size: 0.77rem;
    color: #5b6b66;
}
.sug-comment-author {
    font-weight: 700;
    color: #1c4d41;
}
.sug-comment-right {
    display: flex;
    align-items: center;
    gap: 10px;
}
.sug-comment-del {
    border: 0;
    background: transparent;
    color: #b91c1c;
    font: inherit;
    font-size: 0.76rem;
    font-weight: 600;
    padding: 2px 6px;
    border-radius: 6px;
    cursor: pointer;
}
.sug-comment-del:hover {
    background: #fef2f2;
}
.sug-top-comment {
    margin-top: 10px;
    padding: 8px 12px;
    border-radius: 10px;
    border: 1px solid #e3eee8;
    background: #f5faf7;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
}
.sug-top-comment[hidden] {
    display: none !important;
}
.sug-top-comment-main {
    min-width: 0;
    flex: 1;
    display: flex;
    align-items: baseline;
    gap: 6px;
    font-size: 0.85rem;
    line-height: 1.5;
    cursor: pointer;
    border-radius: 6px;
}
.sug-top-comment-main:focus-visible,
.sug-comment-vote-btn:focus-visible {
    outline: 3px solid #1a6b5c;
    outline-offset: 2px;
}
.sug-top-comment-author {
    flex: none;
    font-weight: 700;
    color: #1c4d41;
}
.sug-top-comment-text {
    min-width: 0;
    color: #324a42;
    overflow-wrap: anywhere;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}
.sug-comment-main {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 12px;
}
.sug-comment-body {
    flex: 1;
    min-width: 0;
    margin: 0;
    font-size: 0.86rem;
    color: #1f2937;
    line-height: 1.55;
    white-space: pre-wrap;
    overflow-wrap: anywhere;
}
.sug-comment-votes {
    flex: none;
    display: inline-flex;
    align-items: center;
    gap: 8px;
}
.sug-comment-vote-btn {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    min-height: 28px;
    padding: 3px 6px;
    border: 0;
    border-radius: 6px;
    background: transparent;
    color: #5c726a;
    font: inherit;
    font-size: 0.78rem;
    font-weight: 600;
    cursor: pointer;
    transition: background-color 0.14s ease, color 0.14s ease;
}
.sug-comment-vote-btn .sug-ico {
    width: 14px;
    height: 14px;
}
.sug-comment-vote-btn:hover:not(:disabled) {
    background: rgba(26, 107, 92, 0.08);
    color: #145548;
}
.sug-comment-vote-btn.is-up.is-active,
.sug-comment-vote-btn.is-up.is-active:disabled {
    background: transparent;
    border: 0;
    color: #145548;
    font-weight: 700;
    opacity: 1;
}
.sug-comment-vote-btn.is-up.is-active .sug-ico,
.sug-comment-vote-btn.is-up.is-active:disabled .sug-ico {
    fill: rgba(26, 107, 92, 0.18);
}
.sug-comment-vote-btn.is-down.is-active,
.sug-comment-vote-btn.is-down.is-active:disabled {
    background: transparent;
    border: 0;
    color: #be123c;
    font-weight: 700;
    opacity: 1;
}
.sug-comment-vote-btn.is-down.is-active .sug-ico,
.sug-comment-vote-btn.is-down.is-active:disabled .sug-ico {
    fill: rgba(190, 18, 60, 0.15);
}
.sug-comment-vote-btn:disabled {
    background: transparent;
    border: 0;
    color: #8b9b94;
    opacity: 0.85;
    cursor: not-allowed;
}
.sug-comment-empty,
.sug-empty-card {
    padding: 16px;
    border-radius: 12px;
    background: #ffffff;
    border: 1px dashed #cdded4;
    text-align: center;
    color: #5b6b66;
    font-size: 0.87rem;
}
.sug-comment-empty {
    background: rgba(255, 255, 255, 0.75);
    padding: 12px;
    font-size: 0.82rem;
}

.sug-pagination {
    display: flex;
    align-items: center;
    justify-content: center;
    flex-wrap: wrap;
    gap: 6px;
    margin: 0 0 24px;
}
.sug-page-btn {
    min-width: 38px;
    min-height: 38px;
    padding: 0 12px;
    border-radius: 9px;
    border: 1px solid #d5e3db;
    background: #ffffff;
    color: #1f3b34;
    font: inherit;
    font-size: 0.83rem;
    font-weight: 600;
    cursor: pointer;
}
.sug-page-btn[aria-current="page"] {
    background: #1a6b5c;
    border-color: #1a6b5c;
    color: #ffffff;
}
.sug-page-btn:disabled {
    opacity: 0.45;
    cursor: not-allowed;
}
.sug-page-ellipsis {
    padding: 0 6px;
    color: #6b7280;
    font-size: 0.85rem;
}

/* 右侧边栏与提交区域美化 */
#suggestions-page .ql-sidebar-card {
    background: #ffffff;
    border: 1px solid #e2ebe5;
    border-radius: 16px;
    padding: 20px 22px;
    box-shadow: 0 2px 10px rgba(26, 77, 61, 0.035);
}
#suggestions-page .ql-sidebar-title {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 0.88rem;
    font-weight: 700;
    text-transform: none;
    letter-spacing: 0.01em;
    color: #1e3d33;
    margin-bottom: 14px;
}
#suggestions-page .ql-sidebar-title::before {
    content: "";
    width: 3.5px;
    height: 14px;
    border-radius: 99px;
    background: #1a6b5c;
    flex: none;
}
#suggestions-page .ql-submit-card {
    background: #ffffff;
    border: 1px solid #d9e7de;
    border-radius: 16px;
    padding: 22px 24px;
    box-shadow: 0 4px 16px rgba(26, 77, 61, 0.045);
}
#suggestions-page .ql-submit-label {
    font-size: 0.96rem;
    font-weight: 700;
    color: #1c332c;
    margin-bottom: 12px;
}
#suggestions-page .ql-textarea {
    border-radius: 12px;
    padding: 12px 14px;
    background: #f9fbfa;
    min-height: 92px;
    font-size: max(1rem, 0.9rem);
}

@media (max-width: 1200px) {
    body.ql-suggestions-active .share-nav,
    body:has(#suggestions-page:not([hidden])) .share-nav {
        padding: 0 24px;
    }
    #suggestions-page.ql-page-wrap {
        padding: 16px 24px 56px;
        grid-template-columns: minmax(0, 1fr) 340px;
        gap: 24px;
    }
}

@media (max-width: 960px) {
    #suggestions-page.ql-page-wrap {
        grid-template-columns: 1fr;
        gap: 24px;
    }
    #suggestions-page .ql-sidebar {
        order: 1;
    }
}

@media (max-width: 640px) {
    body.ql-suggestions-active .share-nav,
    body:has(#suggestions-page:not([hidden])) .share-nav {
        padding: 0 16px;
        margin-top: 72px;
    }
    #suggestions-page.ql-page-wrap {
        padding: 12px 16px 48px;
        gap: 18px;
    }
    #suggestions-page .ql-page-header {
        padding: 16px 18px;
        border-radius: 14px;
    }
    .sug-tabs {
        gap: 4px;
    }
    .sug-tab {
        padding: 8px 10px;
        font-size: 0.85rem;
        gap: 6px;
    }
    .sug-tab-count {
        min-width: 18px;
        height: 18px;
        padding: 0 5px;
        font-size: 0.7rem;
    }
    .sug-card {
        padding: 14px 16px 12px;
        border-radius: 14px;
    }
    .sug-actions {
        gap: 12px;
    }
    .sug-action-btn {
        min-height: 36px;
    }
    .sug-top-comment,
    .sug-comment-main {
        flex-wrap: wrap;
        gap: 8px;
    }
    .sug-top-comment-main {
        flex-basis: 100%;
    }
    .sug-comment-votes {
        margin-left: auto;
    }
    .sug-comment-vote-btn {
        min-height: 32px;
    }
}
