:root {
    --lancet-red: #8B1538;
    --bg-cream: #f9f7f2;
    --card-white: #ffffff;
    --text-serif: 'Times New Roman', Times, 'SimSun', '宋体', serif;
    --text-sans: Arial, sans-serif;
    --red-btn: #b71c1c;
    --green-btn: #2e7d32;
    --blue-btn: #1565c0;
    --dark-btn: #37474f;
    --soft-red: #f7eef2;
    --border-soft: #e8dbe1;
}

* { box-sizing: border-box; }
body {
    margin: 0;
    background: var(--bg-cream);
    color: #333;
    font-family: var(--text-serif);
    min-height: 100vh;
}

button, input, select, textarea {
    font: inherit;
}

.hidden { display: none !important; }
.top-banner {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    height: 40px;
    background: #fff;
    border-bottom: 2px solid var(--lancet-red);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 1200;
    font-size: 0.85rem;
    color: var(--lancet-red);
    font-weight: bold;
    letter-spacing: 1px;
}
.banner-title {
    color: var(--lancet-red);
    font-weight: bold;
    letter-spacing: 1px;
    text-align: center;
    padding: 0 120px;
}
.banner-actions {
    position: absolute;
    right: 6px;
    top: 50%;
    transform: translateY(-50%);
    display: flex;
    gap: 6px;
    align-items: center;
}
.menu-btn, .logout-btn, .primary-btn, .mini-btn, .auth-tab, .banner-mini-btn, .ghost-btn, .section-toggle, .back-close-btn {
    cursor: pointer;
}
.menu-btn {
    position: absolute;
    left: 0;
    top: 0;
    bottom: 0;
    width: 45px;
    border: none;
    background: transparent;
    color: var(--lancet-red);
    font-size: 1.2rem;
}
.logout-btn, .primary-btn, .mini-btn, .ghost-btn {
    border: none;
    border-radius: 8px;
    padding: 10px 14px;
    font-weight: bold;
}
.banner-mini-btn {
    border: 1px solid var(--lancet-red);
    background: #fff;
    color: var(--lancet-red);
    border-radius: 4px;
    padding: 4px 8px;
    font-size: 0.72rem;
    min-width: 42px;
}
.logout-btn {
    padding: 5px 10px;
    font-size: 0.72rem;
    background: var(--lancet-red);
    color: white;
}
.primary-btn, .mini-btn {
    background: var(--lancet-red);
    color: white;
}
.ghost-btn {
    background: white;
    color: var(--lancet-red);
    border: 1px solid var(--lancet-red);
}
.overlay {
    position: fixed;
    inset: 0;
    background: rgba(0,0,0,0.45);
    display: none;
    z-index: 1100;
}
.overlay.show { display: block; }
.sidebar {
    position: fixed;
    top: 0;
    left: 0;
    bottom: 0;
    width: 320px;
    background: #fff;
    border-right: 1px solid #ddd;
    transform: translateX(-100%);
    transition: transform 0.25s ease;
    z-index: 1150;
    display: flex;
    flex-direction: column;
    padding-top: 40px;
}
.sidebar.open { transform: translateX(0); }
.sidebar-header {
    padding: 16px;
    background: var(--lancet-red);
    color: white;
}
.pubmed-page {
    padding: 68px 20px 24px;
}
.pubmed-page-card {
    width: min(1180px, 100%);
    margin: 0 auto;
    background: #fff;
    border-radius: 18px;
    box-shadow: 0 10px 40px rgba(0,0,0,0.08);
    padding: 24px;
}
.pubmed-page-head h1 {
    margin: 0;
    color: var(--lancet-red);
}
.pubmed-page-head p {
    margin: 8px 0 0;
    color: #666;
}
.admin-specialty-search-bar {
    grid-template-columns: 1fr auto;
}
.admin-specialty-toolbar {
    grid-template-columns: 1fr 1fr auto;
}
.admin-specialty-result-card {
    cursor: default;
}
.admin-specialty-checkbox-line {
    display: block;
    margin-bottom: 10px;
}
.admin-direction-filter-btn.active {
    background: var(--lancet-red);
    color: #fff;
}
.admin-strategy-direction-list {
    display: grid;
    gap: 10px;
    margin-top: 10px;
}
.admin-strategy-direction-item {
    padding: 10px 12px;
    border: 1px solid var(--border-color);
    border-radius: 12px;
    background: #fff;
    display: grid;
    gap: 6px;
}
.pubmed-query-info {
    margin-top: 14px;
}
.pubmed-query-line {
    margin-top: 8px;
    padding: 10px 12px;
    border-radius: 10px;
    background: #f7f0f3;
    color: #5b4650;
    font-size: 0.88rem;
    line-height: 1.6;
}
.pubmed-pagination {
    margin-top: 18px;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 12px;
    flex-wrap: wrap;
}
.pubmed-page-info {
    color: #6f5862;
    font-size: 0.9rem;
}
.pubmed-external-link {
    display: inline-block;
    margin-top: 10px;
}
.pubmed-sentence-list {
    margin-top: 14px;
    display: flex;
    flex-direction: column;
    gap: 10px;
}
.pubmed-sentence-block,
.sentence-analysis-panel {
    background: #fff;
    border: 1px solid #eadde3;
    border-radius: 10px;
    padding: 10px 12px;
}
.pubmed-sentence-row {
    display: block;
}
.pubmed-sentence-main {
    flex: 1;
    min-width: 0;
}
.pubmed-sentence-label {
    font-size: 0.76rem;
    color: #8a6a77;
    margin-bottom: 4px;
}
.pubmed-sentence-text {
    line-height: 1.75;
    color: #333;
}
.pubmed-sentence-actions {
    display: flex;
    align-items: center;
    gap: 8px;
    flex-shrink: 0;
    margin-top: 8px;
    flex-wrap: wrap;
}
.sentence-analysis-panel {
    margin-top: 8px;
    color: #5c4a53;
    line-height: 1.8;
}
.abstract-analysis-toolbar {
    margin-top: 12px;
    display: flex;
    justify-content: flex-end;
    gap: 8px;
    flex-wrap: wrap;
}
.abstract-analysis-title-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
    margin-bottom: 6px;
}
.analysis-cache-badge {
    display: inline-flex;
    align-items: center;
    padding: 2px 8px;
    border-radius: 999px;
    font-size: 0.75rem;
    white-space: nowrap;
}
.analysis-cache-badge.cache-hit {
    background: #eef7ef;
    color: #2f7d32;
}
.analysis-cache-badge.cache-new {
    background: #fff3e8;
    color: #b35a00;
}
.abstract-analysis-summary {
    margin-bottom: 10px;
    padding: 8px 10px;
    border-radius: 10px;
    background: #f7f0f3;
    color: #5c4a53;
    font-size: 0.84rem;
}
.analysis-line {
    margin-top: 6px;
}
.abstract-analysis-item {
    padding: 12px 0;
    border-bottom: 1px solid #eadde3;
}
.abstract-analysis-item:last-child {
    border-bottom: none;
}
.paper-enhancement-card {
    padding: 12px 14px;
    border: 1px solid #eadde3;
    border-radius: 12px;
    background: #fcfbfb;
    margin-bottom: 10px;
}
.paper-enhancement-card:last-child {
    margin-bottom: 0;
}
.paper-enhancement-title {
    font-weight: bold;
    color: var(--lancet-red);
    margin-bottom: 8px;
}
.paper-enhancement-body {
    color: #4d3f46;
    line-height: 1.75;
    margin-top: 6px;
}
.paper-enhancement-toolbar {
    justify-content: flex-start;
}
.abstract-analysis-title {
    font-weight: bold;
    color: var(--lancet-red);
    margin-bottom: 6px;
}
.abstract-analysis-sentence {
    margin-bottom: 8px;
    color: #333;
    line-height: 1.7;
}
.pubmed-search-bar,
.pubmed-collection-bar {
    display: grid;
    grid-template-columns: 1fr auto;
    gap: 12px;
    margin-top: 16px;
}
.pubmed-collection-bar {
    grid-template-columns: 1fr 1fr;
}
.pubmed-page-results {
    display: flex;
    flex-direction: column;
    gap: 14px;
    margin-top: 18px;
}
.pubmed-page-item {
    border: 1px solid #eadde3;
    border-radius: 14px;
    background: transparent;
    padding: 0;
}
.pubmed-page-item.is-active {
    box-shadow: 0 12px 32px rgba(139, 21, 56, 0.12);
}
.pubmed-flip-card {
    perspective: 1200px;
}
.pubmed-flip-card.flipped .pubmed-flip-card-inner {
    transform: rotateY(180deg);
}
.pubmed-flip-card-inner {
    position: relative;
    width: 100%;
    min-height: 560px;
    transform-style: preserve-3d;
    transition: transform 0.55s cubic-bezier(0.4, 0, 0.2, 1);
}
.pubmed-flip-face {
    position: absolute;
    inset: 0;
    backface-visibility: hidden;
    background: #fcfbfb;
    border: 1px solid #eadde3;
    border-radius: 14px;
    overflow: hidden;
    padding: 16px;
}
.pubmed-flip-back {
    transform: rotateY(180deg);
    padding: 0;
    display: flex;
    flex-direction: column;
}
.pubmed-flip-front {
    display: flex;
    flex-direction: column;
    gap: 10px;
}
.pubmed-card-topline {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 12px;
    flex-wrap: wrap;
    margin-bottom: 10px;
}
.pubmed-card-topline-main {
    display: flex;
    align-items: center;
    gap: 8px;
    flex-wrap: wrap;
}
.pubmed-tap-hint {
    margin-top: auto;
}
.pubmed-card-toggle {
    cursor: pointer;
}
.pubmed-card-toggle button,
.pubmed-card-toggle a {
    cursor: pointer;
}
.pubmed-item-title-zh {
    margin-top: 8px;
    color: #666;
    font-size: 0.96rem;
    line-height: 1.6;
}
.pubmed-item-abstract-label {
    margin-top: 10px;
    color: var(--lancet-red);
    font-size: 0.82rem;
    font-weight: bold;
}
.pubmed-page-actions {
    justify-content: flex-start;
    gap: 10px;
    flex-wrap: wrap;
}
.pubmed-front-actions-row {
    margin-top: auto;
    padding-top: 12px;
    display: flex;
    flex-direction: column;
    gap: 10px;
    border-top: 1px solid #eee3e8;
}
.pubmed-abstract-zh {
    margin-top: 10px;
    padding: 12px;
    border-radius: 10px;
    background: #f7f0f3;
    color: #333;
    line-height: 1.8;
    position: relative;
    cursor: pointer;
    white-space: pre-wrap;
}
.pubmed-abstract-zh.is-masked {
    filter: blur(6px);
    user-select: none;
}
.pubmed-abstract-zh.is-masked::after {
    content: '点击蒙版查看/隐藏翻译';
    position: absolute;
    inset: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    background: rgba(255,255,255,0.45);
    color: var(--lancet-red);
    font-weight: bold;
    letter-spacing: 0.5px;
}
.pubmed-top-link {
    text-decoration: none;
    display: inline-flex;
    align-items: center;
    justify-content: center;
}
.sidebar-section-toggle {
    width: 100%;
    border: none;
    background: transparent;
    color: var(--lancet-red);
    font-weight: bold;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
    padding: 0 6px 0 2px;
    margin-bottom: 10px;
    font-size: 0.82rem;
    text-align: left;
}
.sidebar-section-panel {
    display: none;
}
.sidebar-section-panel.open {
    display: block;
}
#titlePanel .detail-title,
#titlePanel .detail-title-zh {
    display: block;
    -webkit-line-clamp: unset;
    -webkit-box-orient: initial;
    overflow: visible;
    white-space: normal;
}
.pubmed-search-box {
    display: flex;
    flex-direction: column;
    gap: 8px;
}
.pubmed-search-btn {
    width: 100%;
}
.pubmed-results {
    display: flex;
    flex-direction: column;
    gap: 8px;
    max-height: 260px;
    overflow-y: auto;
}
.pubmed-item {
    border: 1px solid #eee;
    border-radius: 10px;
    background: #fafafa;
    padding: 10px;
}
.pubmed-item-title {
    color: var(--lancet-red);
    font-weight: bold;
    line-height: 1.45;
}
.pubmed-item-meta {
    margin-top: 6px;
    color: #666;
    font-size: 0.82rem;
    line-height: 1.5;
}
.pubmed-item-abstract {
    margin-top: 8px;
    color: #555;
    font-size: 0.84rem;
    line-height: 1.6;
}
.pubmed-item-abstract-preview {
    display: -webkit-box;
    -webkit-line-clamp: 5;
    -webkit-box-orient: vertical;
    overflow: hidden;
    min-height: 6.8em;
}
.pubmed-mobile-actions-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
    margin-top: 10px;
    flex-wrap: wrap;
}
.pubmed-mobile-status {
    margin-bottom: 0;
}
.pubmed-item-actions {
    margin-top: 0;
    display: flex;
    justify-content: flex-start;
}
.sticky-actions {
    margin-top: auto;
    padding-top: 12px;
    border-top: 1px solid #eee3e8;
}
.admin-inline-category-row {
    margin-top: 10px;
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 8px;
}
.admin-inline-category-row-dual,
.admin-dual-category-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 12px;
}
.admin-category-slot-card {
    border: 1px solid #eadde3;
    border-radius: 12px;
    padding: 12px;
    background: #fcfbfb;
}
.admin-inline-field {
    position: relative;
}
.admin-inline-category-row .auth-input {
    margin-bottom: 0;
}
.admin-inline-suggestions {
    position: absolute;
    top: calc(100% + 4px);
    left: 0;
    right: 0;
    z-index: 20;
    background: #fff;
    border: 1px solid #eadde3;
    border-radius: 12px;
    box-shadow: 0 12px 28px rgba(0, 0, 0, 0.12);
    padding: 6px;
    max-height: 220px;
    overflow-y: auto;
}
.admin-inline-suggestion-btn {
    width: 100%;
    border: none;
    background: transparent;
    text-align: left;
    padding: 8px 10px;
    border-radius: 8px;
    color: #5c4a53;
    cursor: pointer;
}
.admin-inline-suggestion-btn:hover {
    background: #f7f0f3;
    color: var(--lancet-red);
}
.admin-inline-suggestion-empty {
    padding: 8px 10px;
    color: #8a6a77;
    font-size: 0.84rem;
}
.admin-paper-actions {
    justify-content: space-between;
    gap: 8px;
    flex-wrap: wrap;
}
.admin-paper-actions-compact {
    margin-top: 10px;
}
.admin-paper-card {
    cursor: default;
}
.admin-paper-card-head {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 12px;
}
.admin-inline-editor-host {
    margin-top: 12px;
}
.pubmed-add-btn {
    border: none;
    border-radius: 8px;
    background: var(--lancet-red);
    color: white;
    padding: 6px 10px;
    font-size: 0.8rem;
    font-weight: bold;
    cursor: pointer;
}
.pubmed-add-btn:disabled {
    background: #cbbbc2;
    cursor: default;
}
.search-input, .filter-select, .auth-input, .notes-box {
    width: 100%;
    border: 1px solid #ddd;
    border-radius: 10px;
    padding: 10px 12px;
    font-size: 0.95rem;
    background: #fff;
}
.search-input {
    border-radius: 20px;
    background: #f9f9f9;
}
.search-hint {
    margin-top: 8px;
    font-size: 0.78rem;
    color: #888;
    line-height: 1.4;
}
.filter-title {
    font-size: 0.82rem;
    color: var(--lancet-red);
    font-weight: bold;
    margin-bottom: 8px;
}
.filter-select { margin-bottom: 8px; }
.checkbox-line { font-size: 0.9rem; color: #555; }
.stats-box {
    margin: 12px 16px;
    padding: 12px;
    background: #f7f0f3;
    border-left: 4px solid var(--lancet-red);
    border-radius: 10px;
    font-size: 0.88rem;
    line-height: 1.8;
}
.paper-list {
    overflow-y: auto;
    padding: 8px 12px 20px;
}
.paper-group {
    margin-bottom: 10px;
    border: 1px solid #eee;
    border-radius: 12px;
    overflow: hidden;
    background: #fff;
}
.paper-group-title {
    list-style: none;
    padding: 10px 12px;
    font-weight: bold;
    color: var(--lancet-red);
    background: #faf6f8;
    cursor: pointer;
    display: flex;
    justify-content: space-between;
    align-items: center;
}
.paper-group-title::-webkit-details-marker {
    display: none;
}
.paper-group-count {
    font-size: 0.76rem;
    color: #8a6a77;
}
.paper-group-items {
    padding: 10px;
}
.paper-item {
    background: #fff;
    border: 1px solid #eee;
    border-radius: 12px;
    padding: 12px;
    margin-bottom: 10px;
    box-shadow: 0 6px 18px rgba(0,0,0,0.04);
    cursor: pointer;
    transition: transform 0.15s ease, border-color 0.15s ease, box-shadow 0.15s ease;
}
.paper-item:hover {
    transform: translateY(-1px);
    box-shadow: 0 10px 22px rgba(0,0,0,0.06);
}
.paper-item.active { border-color: var(--lancet-red); }
.paper-title { color: var(--lancet-red); font-weight: bold; line-height: 1.35; }
.paper-title-zh { color: #666; margin-top: 6px; font-size: 0.92rem; }
.paper-meta { color: #777; margin-top: 8px; font-size: 0.82rem; }
.paper-tags { margin-top: 8px; display: flex; flex-wrap: wrap; gap: 6px; }
.tag {
    display: inline-block;
    padding: 2px 8px;
    border-radius: 999px;
    font-size: 0.75rem;
    background: #f1f1f1;
    color: #555;
}
.main-content {
    padding-top: 40px;
    min-height: 100vh;
}
.empty-state {
    min-height: calc(100vh - 40px);
    display: flex;
    justify-content: center;
    align-items: flex-start;
    padding: 20px;
}
.flashcard-shell {
    min-height: calc(100vh - 40px);
    display: flex;
    justify-content: center;
    align-items: center;
    padding: 20px;
}
.flashcard-shell.back-mode {
    align-items: stretch;
    justify-content: stretch;
    padding: 0;
}
.empty-card, .auth-card {
    width: min(980px, 100%);
    background: var(--card-white);
    border-radius: 16px;
    padding: 28px;
    box-shadow: 0 10px 40px rgba(0,0,0,0.08);
}
.empty-card {
    margin-top: 40px;
    text-align: center;
}
.sample-mode-card {
    margin: 18px auto 0;
    max-width: 720px;
    text-align: left;
    background: #f7f0f3;
    border: 1px solid #eadde3;
    border-radius: 14px;
    padding: 16px 18px;
}
.sample-mode-title {
    color: var(--lancet-red);
    font-weight: bold;
    margin-bottom: 6px;
}
.sample-mode-text {
    color: #5c4a53;
    line-height: 1.7;
}
.sample-mode-actions {
    margin-top: 12px;
}
.sample-mode-link {
    display: inline-block;
}
.empty-badge, .status-badge {
    display: inline-block;
    padding: 3px 8px;
    border-radius: 999px;
    font-size: 0.7rem;
    background: #f2e7ec;
    color: var(--lancet-red);
    margin-bottom: 10px;
}
.empty-card h1, .auth-title {
    color: var(--lancet-red);
    margin-top: 0;
    text-align: center;
}
.empty-actions {
    display: flex;
    gap: 12px;
    justify-content: center;
    flex-wrap: wrap;
    margin-top: 20px;
}
.primary-link, .back-link {
    color: var(--lancet-red);
    text-decoration: none;
    font-weight: bold;
}
.paper-card {
    width: min(980px, 100%);
    min-height: 78vh;
    perspective: 1200px;
}
.flashcard-shell.back-mode .paper-card {
    width: 100%;
    max-width: none;
    min-height: calc(100vh - 40px);
}
.paper-card.flipped .paper-card-inner {
    transform: rotateY(180deg);
}
.paper-card-inner {
    position: relative;
    width: 100%;
    min-height: 78vh;
    transform-style: preserve-3d;
    transition: transform 0.55s cubic-bezier(0.4, 0, 0.2, 1);
}
.flashcard-shell.back-mode .paper-card-inner {
    min-height: calc(100vh - 40px);
}
.paper-face {
    position: absolute;
    inset: 0;
    backface-visibility: hidden;
    background: white;
    border-radius: 16px;
    box-shadow: 0 10px 40px rgba(0,0,0,0.08);
    overflow: hidden;
    border: 1px solid #eadde3;
}
.paper-front {
    padding: 20px 26px 16px;
    display: grid;
    grid-template-rows: auto auto auto auto auto 1fr auto;
    align-content: start;
    gap: 10px;
}
.paper-back {
    transform: rotateY(180deg);
    display: flex;
    flex-direction: column;
}
.flashcard-shell.back-mode .paper-back {
    border-radius: 0;
    box-shadow: none;
    border-left: none;
    border-right: none;
    border-bottom: none;
}
.front-top-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 12px;
    flex-wrap: wrap;
    margin-bottom: 10px;
}
.detail-category {
    font-size: 0.72rem;
    color: #7c6070;
}
.detail-title {
    font-size: 1.28rem;
    font-weight: bold;
    color: var(--lancet-red);
    line-height: 1.35;
    text-align: center;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
    min-height: calc(1.35em * 2);
    align-self: start;
}
.detail-title-zh {
    color: #666;
    margin-top: 0;
    font-size: 0.98rem;
    line-height: 1.7;
    text-align: center;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
    min-height: calc(1.7em * 2);
    align-self: start;
}
.detail-journal-metrics {
    margin-top: 0;
    display: flex;
    gap: 8px;
    flex-wrap: wrap;
    justify-content: center;
    align-content: flex-start;
    max-height: 72px;
    overflow: hidden;
}
.journal-metric-chip {
    display: inline-flex;
    align-items: center;
    padding: 4px 8px;
    border-radius: 999px;
    background: #f7f0f3;
    color: var(--lancet-red);
    font-size: 0.72rem;
    line-height: 1.3;
    border: 1px solid #eadde3;
}
.detail-meta {
    color: #666;
    margin-top: 14px;
    font-size: 0.92rem;
    line-height: 1.7;
    text-align: center;
}
.front-overview-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 12px;
    margin: 28px 0 22px;
}
.overview-card-wide {
    grid-column: 1 / -1;
}
.overview-card {
    background: #fcfbfb;
    border: 1px solid var(--border-soft);
    border-radius: 12px;
    padding: 14px;
}
.overview-label {
    font-size: 0.78rem;
    color: #8b6b78;
    margin-bottom: 8px;
}
.overview-value {
    color: #333;
    font-weight: bold;
    line-height: 1.5;
    word-break: break-word;
}
.front-actions {
    display: flex;
    justify-content: center;
    gap: 10px;
    flex-wrap: wrap;
}
.tap-hint {
    margin-top: auto;
    text-align: center;
    font-size: 0.78rem;
    color: #b3a2aa;
    letter-spacing: 1px;
}

.paper-card.swipe-next .paper-card-inner,
.paper-card.swipe-prev .paper-card-inner,
.paper-card.preview-next .paper-card-inner,
.paper-card.preview-prev .paper-card-inner {
    transition: transform 0.085s ease-out, opacity 0.085s ease-out;
}
.paper-card.swipe-next .paper-front,
.paper-card.preview-next .paper-front {
    transform: translateY(-18px) scale(0.996);
    opacity: 0.62;
}
.paper-card.swipe-prev .paper-front,
.paper-card.preview-prev .paper-front {
    transform: translateY(18px) scale(0.996);
    opacity: 0.62;
}
.back-nav {
    height: 48px;
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 0 14px;
    border-bottom: 1px solid #eee;
    color: #8a6a77;
    background: white;
    flex-shrink: 0;
    font-size: 0.9rem;
}
.back-close-btn {
    border: none;
    background: transparent;
    color: var(--lancet-red);
    font-size: 1.1rem;
    padding: 4px 6px;
}
.back-scroll-area {
    flex: 1;
    overflow-y: auto;
    padding: 18px 20px 28px;
}
.detail-section { margin-bottom: 18px; }
.section-toggle {
    width: 100%;
    border: none;
    background: #faf6f8;
    color: var(--lancet-red);
    font-weight: bold;
    font-size: 0.98rem;
    padding: 12px 14px;
    border-radius: 12px;
    display: flex;
    justify-content: space-between;
    align-items: center;
}
.toggle-mark {
    font-size: 1.1rem;
    color: #805060;
}
.section-panel {
    display: none;
    padding: 14px 6px 2px;
}
.section-panel.open {
    display: block;
}
.abstract-content {
    line-height: 1.85;
    font-size: 1rem;
    text-align: justify;
    white-space: pre-wrap;
    word-break: break-word;
}
.abstract-content.zh { color: #555; }
.highlight-term {
    background: #fff1a8;
    color: #7a2438;
    border-radius: 4px;
    padding: 0 2px;
    box-shadow: inset 0 -1px 0 rgba(139, 21, 56, 0.14);
}
.highlight-term-clickable {
    cursor: pointer;
}
.highlight-term-clickable:hover,
.highlight-term-clickable:focus-visible {
    background: #ffe27a;
    outline: none;
}
.zh-term-anchor {
    transition: background-color 0.25s ease, box-shadow 0.25s ease;
    border-radius: 4px;
}
.highlight-term-targeted {
    background: #ffd36b !important;
    box-shadow: 0 0 0 2px rgba(139, 21, 56, 0.22);
}
.vocab-summary {
    font-size: 0.88rem;
    color: #7a6a72;
    margin-bottom: 10px;
}
.sentence-pairs {
    display: flex;
    flex-direction: column;
    gap: 12px;
}
.sentence-pair {
    background: #f9f9f9;
    border-left: 3px solid var(--lancet-red);
    border-radius: 8px;
    padding: 12px;
}
.sentence-en-row {
    display: block;
    margin-bottom: 8px;
}
.sentence-tools-row {
    display: flex;
    align-items: center;
    gap: 8px;
    flex-wrap: wrap;
    margin-bottom: 10px;
}
.tts-btn {
    border: none;
    background: transparent;
    color: #8a6a77;
    cursor: pointer;
    font-size: 0.86rem;
    padding: 4px 6px;
    line-height: 1.2;
    flex-shrink: 0;
}
.tts-btn:hover {
    color: var(--lancet-red);
}
.sentence-en {
    flex: 1;
    font-size: 0.96rem;
    line-height: 1.8;
    color: #222;
    margin-bottom: 0;
}
.sentence-zh {
    font-size: 0.9rem;
    line-height: 1.75;
    color: #666;
}
.sentence-zh {
    font-size: 0.9rem;
    line-height: 1.75;
    color: #666;
    position: relative;
    cursor: pointer;
    padding: 8px 10px;
    border-radius: 8px;
    background: #f7f0f3;
}
.sentence-zh.is-masked {
    filter: blur(6px);
    user-select: none;
}
.sentence-zh.is-masked::after {
    content: '点击查看/隐藏中文';
    position: absolute;
    inset: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    background: rgba(255,255,255,0.45);
    color: var(--lancet-red);
    font-weight: bold;
}
.vocab-eng-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 8px;
}
.vocab-tts-btn {
    flex-shrink: 0;
}
.vocab-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
    gap: 10px;
}
.vocab-item {
    padding: 10px;
    background: #f9f9f9;
    border-radius: 8px;
    border-left: 3px solid var(--lancet-red);
    font-size: 0.92rem;
}
.vocab-eng { font-weight: bold; color: var(--lancet-red); }
.vocab-phonetic { color: #888; margin: 4px 0; font-size: 0.82rem; }
.vocab-chn { color: #333; }
.loading-block {
    color: #8a6a77;
    background: #faf6f8;
    border-style: dashed;
}
.notes-box {
    min-height: 120px;
    resize: vertical;
    margin-bottom: 10px;
    font-family: var(--text-serif);
    line-height: 1.7;
}
.category-edit-actions {
    display: flex;
    gap: 10px;
    flex-wrap: wrap;
    margin-top: 10px;
}
.personal-category-quick-actions {
    margin-top: 12px;
    margin-bottom: 8px;
}
.personal-category-quick-actions .ghost-btn {
    flex: 1 1 180px;
}
.personal-category-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
    flex-wrap: wrap;
}
.personal-category-row .category-edit-actions {
    margin-top: 0;
}
.category-search-results {
    max-height: 280px;
    overflow-y: auto;
    margin-bottom: 12px;
}
.auth-input {
    width: 100%;
    border: 1px solid #d8c5ce;
    border-radius: 10px;
    padding: 10px 12px;
    background: #fff;
    margin-bottom: 10px;
}
.auth-body {
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
}
.auth-wrapper {
    width: min(520px, calc(100% - 24px));
}
.auth-subtitle {
    text-align: center;
    color: #666;
    margin-top: -8px;
    margin-bottom: 24px;
}
.auth-tabs {
    display: flex;
    gap: 10px;
    margin-bottom: 14px;
}
.auth-tab {
    flex: 1;
    border: 1px solid var(--lancet-red);
    border-radius: 10px;
    padding: 10px 0;
    background: white;
    color: var(--lancet-red);
    font-weight: bold;
}
.auth-tab.active {
    background: var(--lancet-red);
    color: white;
}
.auth-message {
    min-height: 24px;
    margin-top: 12px;
    color: var(--lancet-red);
    text-align: center;
}
.auth-input { margin-bottom: 10px; }

@media (min-width: 900px) {
    .sidebar {
        transform: translateX(0);
    }
    .menu-btn, .overlay { display: none !important; }
    .main-content {
        margin-left: 320px;
    }
}

@media (max-width: 899px) {
    .banner-title {
        padding: 0 84px 0 52px;
        font-size: 0.76rem;
    }
    .paper-card,
    .paper-card-inner,
    .paper-face {
        min-height: calc(100vh - 80px);
    }
    .flashcard-shell.back-mode .paper-card,
    .flashcard-shell.back-mode .paper-card-inner,
    .flashcard-shell.back-mode .paper-face {
        min-height: calc(100vh - 40px);
    }
}

@media (max-width: 560px) {
    .top-banner {
        height: 44px;
        padding: 0 8px;
    }
    .menu-btn {
        width: 42px;
        font-size: 1rem;
    }
    .banner-title {
        padding: 0 72px 0 44px;
        font-size: 0.68rem;
        letter-spacing: 0.2px;
        line-height: 1.2;
    }
    .pubmed-page {
        padding: 56px 10px 16px;
    }
    .pubmed-page-card {
        padding: 14px;
        border-radius: 14px;
    }
    .pubmed-page-head h1 {
        font-size: 1.28rem;
    }
    .pubmed-page-head p {
        font-size: 0.88rem;
        line-height: 1.5;
    }
    .pubmed-search-bar,
    .pubmed-collection-bar,
    .admin-inline-category-row-dual,
    .admin-dual-category-grid {
        grid-template-columns: 1fr;
    }
    .empty-card, .auth-card {
        padding: 18px 14px;
        border-radius: 14px;
    }
    .empty-card {
        margin-top: 18px;
    }
    .empty-card h1, .auth-title {
        font-size: 1.55rem;
    }
    .empty-actions {
        gap: 10px;
    }
    .empty-actions .primary-link,
    .empty-actions .ghost-btn {
        width: 100%;
        text-align: center;
    }
    .front-overview-grid {
        grid-template-columns: 1fr;
        gap: 10px;
        margin: 18px 0 16px;
    }
    .paper-card,
    .paper-card-inner,
    .paper-face {
        min-height: calc(100vh - 88px);
    }
    .paper-front {
        padding: 14px 12px 16px;
        grid-template-rows: auto auto auto auto auto 1fr auto;
        gap: 8px;
    }
    .paper-back {
        border-radius: 14px;
    }
    .back-scroll-area {
        padding: 12px 12px 20px;
    }
    .banner-actions {
        gap: 4px;
        right: 4px;
        left: auto;
        justify-content: flex-end;
        max-width: calc(100% - 52px);
        flex-wrap: wrap;
    }
    .banner-mini-btn,
    .logout-btn {
        padding: 4px 6px;
        font-size: 0.64rem;
        min-width: 34px;
    }
    .primary-btn, .mini-btn, .ghost-btn {
        padding: 9px 12px;
        font-size: 0.86rem;
    }
    .detail-title {
        font-size: 1rem;
        line-height: 1.4;
        min-height: calc(1.4em * 2);
    }
    .detail-title-zh {
        font-size: 0.86rem;
        line-height: 1.5;
        min-height: calc(1.5em * 2);
    }
    .detail-meta {
        font-size: 0.84rem;
        line-height: 1.55;
        margin-top: 10px;
    }
    .journal-metric-chip,
    .empty-badge, .status-badge,
    .detail-category,
    .overview-label,
    .tap-hint {
        font-size: 0.66rem;
    }
    .overview-card {
        padding: 12px;
    }
    .overview-value {
        font-size: 0.88rem;
        line-height: 1.45;
    }
    .front-actions {
        gap: 8px;
    }
    .front-actions .mini-btn {
        flex: 1 1 calc(50% - 8px);
        min-width: 0;
        padding: 9px 8px;
        font-size: 0.8rem;
    }
    .section-toggle {
        padding: 10px 12px;
        font-size: 0.9rem;
    }
    .abstract-content {
        font-size: 0.92rem;
        line-height: 1.75;
    }
    .abstract-analysis-toolbar {
        display: grid;
        grid-template-columns: repeat(3, minmax(0, 1fr));
        gap: 8px;
    }
    .abstract-analysis-toolbar .ghost-btn {
        min-width: 0;
        overflow: hidden;
        text-overflow: ellipsis;
        white-space: nowrap;
        padding: 9px 8px;
        font-size: 0.8rem;
    }
    .sentence-tools-row {
        margin-bottom: 8px;
    }
    .sentence-tools-row .ghost-btn {
        width: 100%;
    }
    .sentence-en-row .tts-btn {
        margin-left: auto;
    }
    .pubmed-item-abstract-preview {
        -webkit-line-clamp: 4;
        min-height: 5.6em;
    }
    .pubmed-mobile-actions-row {
        align-items: stretch;
    }
    .pubmed-mobile-actions-row .pubmed-page-actions {
        width: 100%;
    }
    .pubmed-page-actions {
        gap: 8px;
    }
    .pubmed-page-actions .mini-btn,
    .pubmed-page-actions .pubmed-add-btn,
    .pubmed-page-actions .ghost-btn {
        flex: 1 1 100%;
    }
    .pubmed-sentence-actions .tts-btn,
    .pubmed-sentence-actions .ghost-btn {
        width: auto;
    }
    .back-footer-actions {
        gap: 6px;
        display: grid;
        grid-template-columns: repeat(4, minmax(0, 1fr));
    }
    .back-footer-actions .mini-btn {
        min-width: 0;
        padding: 8px 6px;
        font-size: 0.76rem;
        white-space: nowrap;
        overflow: hidden;
        text-overflow: ellipsis;
    }
    .sidebar {
        width: min(84vw, 300px);
    }
    .search-input, .filter-select, .auth-input, .notes-box {
        padding: 10px 12px;
        font-size: 0.92rem;
    }
}
