* { box-sizing: border-box; margin: 0; padding: 0; }
body { font-family: "PingFang SC", "Microsoft YaHei", Arial, sans-serif; background: #f8fafc; color: #0f172a; line-height: 1.7; }
.container { width: min(980px, 92%); margin: 0 auto; }
.header { position: sticky; top: 0; z-index: 20; border-bottom: 1px solid #e2e8f0; background: rgba(255,255,255,.94); backdrop-filter: blur(8px); }
.header-inner { min-height: 66px; display: flex; align-items: center; justify-content: space-between; gap: 12px; }
.brand { display: flex; align-items: center; gap: 10px; text-decoration: none; }
.brand-badge {
    width: 36px;
    height: 36px;
    border-radius: 10px;
    display: grid;
    place-items: center;
    color: #fff;
    font-weight: 800;
    background: linear-gradient(135deg,#2563eb,#38bdf8);
}
.brand-text strong { display: block; color: #0f172a; font-size: 18px; }
.brand-text span { display: block; color: #64748b; font-size: 12px; }
.header-nav { display: flex; align-items: center; gap: 14px; }
.header-nav a { color: #334155; text-decoration: none; font-size: 14px; }
.main { padding: 24px 0 88px; }
.card { background: #fff; border: 1px solid #e2e8f0; border-radius: 16px; padding: 22px; }
.meta { display: flex; flex-wrap: wrap; gap: 10px; margin-bottom: 14px; }
.tag { padding: 5px 10px; border-radius: 999px; background: #eff6ff; color: #1d4ed8; font-size: 12px; font-weight: 700; }
h1 { font-size: 24px; line-height: 1.45; margin-bottom: 10px; color: #0f172a; }
.main-text { color: #334155; margin-bottom: 18px; }
.opt-title { font-size: 16px; margin-bottom: 8px; }
.opt-list { display: grid; gap: 8px; }
.opt-item { background: #f8fafc; border: 1px solid #e2e8f0; border-radius: 10px; padding: 10px 12px; color: #334155; }
h1 img,
.main-text img,
.opt-item img {
    max-width: 100%;
    height: auto;
    display: block;
    margin: 10px auto;
    padding: 6px;
    border: 1px solid #e2e8f0;
    border-radius: 10px;
    background: #fff;
}
.answer-guide {
    margin-top: 16px;
    display: flex;
    align-items: center;
    justify-content: flex-start;
}
.answer-guide .answer-toggle { display: inline-flex; align-items: center; justify-content: center; }
.answer-toggle {
    border: 1px solid #2563eb;
    cursor: pointer;
    min-width: 108px;
    height: 36px;
    padding: 0 14px;
    border-radius: 999px;
    background: #2563eb;
    color: #fff;
    font-size: 13px;
    font-weight: 700;
    line-height: 1;
    transition: .2s ease;
}
.answer-toggle:hover { background: #1d4ed8; border-color: #1d4ed8; }
.answer-modal {
    position: fixed;
    inset: 0;
    z-index: 120;
    display: none;
    align-items: center;
    justify-content: center;
    padding: 16px;
    background: rgba(15, 23, 42, 0.52);
}
.answer-modal.show { display: flex; }
.answer-modal-card {
    width: min(92vw, 360px);
    background: #fff;
    border-radius: 16px;
    border: 1px solid #e2e8f0;
    box-shadow: 0 24px 48px rgba(15, 23, 42, 0.24);
    padding: 18px;
    position: relative;
    text-align: center;
}
.answer-modal-close {
    position: absolute;
    top: 10px;
    right: 10px;
    width: 30px;
    height: 30px;
    border: 1px solid #dbe3ef;
    border-radius: 999px;
    background: #fff;
    color: #64748b;
    cursor: pointer;
    font-size: 16px;
    line-height: 1;
}
.answer-modal-title { font-size: 18px; margin-bottom: 6px; color: #0f172a; }
.answer-modal-desc { font-size: 13px; color: #64748b; margin-bottom: 12px; }
.answer-modal .qr-box {
    width: 100%;
    aspect-ratio: 1 / 1;
    border-radius: 14px;
    overflow: hidden;
    border: 1px solid #bfdbfe;
    background: #fff;
}
.answer-modal img { width: 100%; height: 100%; object-fit: cover; }
.answer-modal-tip { display: block; margin-top: 8px; color: #64748b; font-size: 12px; text-align: center; }
body.modal-open { overflow: hidden; }
.related { margin-top: 18px; padding-top: 16px; border-top: 1px solid #eef2f7; }
.related h2 { font-size: 18px; margin-bottom: 10px; }
.related-list { display: grid; gap: 8px; }
.related-item {
    display: grid;
    grid-template-columns: auto minmax(0, 1fr) 136px;
    gap: 10px;
    align-items: center;
    padding: 10px 12px;
    border: 1px solid #e2e8f0;
    border-radius: 10px;
    background: #fff;
}
.related-item > * { min-width: 0; }
.related-item .r-title {
    color: #334155;
    text-decoration: none;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
    line-height: 1.5;
    word-break: break-all;
}
.related-item .r-title:hover { color: #1d4ed8; text-decoration: none; }
.related-item .r-time { color: #94a3b8; font-size: 12px; text-align: right; white-space: nowrap; }
.footer {
    border-top: 1px solid rgba(226,232,240,.95);
    background: rgba(255,255,255,.86);
    padding: 28px 0 32px;
    color: #64748b;
    font-size: 14px;
    margin-top: 12px;
}
.footer-grid {
    display: grid;
    grid-template-columns: 1.2fr 1fr 1fr;
    gap: 20px;
    margin-bottom: 18px;
}
.footer-col h3 { color: #0f172a; font-size: 16px; margin-bottom: 8px; }
.footer-col p { color: #64748b; font-size: 13px; line-height: 1.7; }
.footer-links { display: flex; flex-wrap: wrap; gap: 8px; }
.footer-links a {
    padding: 6px 10px;
    border-radius: 999px;
    border: 1px solid #dbe3ef;
    color: #334155;
    font-size: 13px;
    text-decoration: none;
}
.footer-links a:hover { border-color: #2563eb; color: #2563eb; }
.footer-tags { display: flex; flex-wrap: wrap; gap: 8px; }
.footer-tags span {
    padding: 5px 10px;
    border-radius: 999px;
    background: #f1f5f9;
    color: #475569;
    font-size: 12px;
}
.footer-inner { display: flex; align-items: center; justify-content: space-between; gap: 14px; flex-wrap: wrap; border-top: 1px solid #e2e8f0; padding-top: 14px; }
.footer-record { width: 100%; text-align: center; color: #94a3b8; font-size: 13px; }
.footer-record a { color: inherit; text-decoration: none; }
.floating-entry { position: fixed; right: 24px; bottom: 24px; z-index: 60; }
.floating-panel {
    position: absolute;
    right: 0;
    bottom: 64px;
    width: 220px;
    background: rgba(255,255,255,0.98);
    border: 1px solid #e2e8f0;
    border-radius: 22px;
    padding: 18px;
    box-shadow: 0 20px 40px rgba(15,23,42,.14);
    opacity: 0;
    visibility: hidden;
    transform: translateY(8px);
    transition: .2s ease;
    pointer-events: none;
}
.floating-entry:hover .floating-panel,
.floating-entry:focus-within .floating-panel { opacity: 1; visibility: visible; transform: translateY(0); pointer-events: auto; }
.floating-panel h3 { font-size: 18px; margin-bottom: 8px; }
.floating-panel p { color: #475569; font-size: 13px; margin-bottom: 14px; }
.qr-placeholder { width: 100%; aspect-ratio: 1/1; border-radius: 18px; overflow: hidden; border: 1px solid #dbeafe; background: #f8fbff; }
.qr-placeholder img { width: 100%; height: 100%; object-fit: cover; }
.floating-button { min-width: 120px; height: 52px; padding: 0 20px; border-radius: 999px; background: linear-gradient(135deg,#2563eb,#38bdf8); color: #fff; font-size: 15px; font-weight: 800; box-shadow: 0 16px 30px rgba(37,99,235,.28); display: inline-flex; align-items: center; justify-content: center; }
@media (max-width: 860px) { .footer-grid { grid-template-columns: 1fr; } }
@media (max-width: 760px) {
    .related-item { grid-template-columns: 1fr; gap: 8px; }
    .related-item .r-time { text-align: left; }
}
