* { box-sizing: border-box; }
html { background: #f4f4f4; color: #111; scroll-padding-top: 8px; }
body { margin: 0; font: 14px "Microsoft YaHei", Arial, Helvetica, sans-serif; }
button, input, select { font: inherit; }
button, a { -webkit-tap-highlight-color: transparent; }
button { cursor: pointer; }
a { color: inherit; text-decoration: none; }
img { max-width: 100%; height: auto; }
p, h1, h2, figure { margin: 0; }
button:focus-visible, a:focus-visible { outline: 2px solid #007aff; outline-offset: 2px; }
[hidden] { display: none !important; }
.app-shell { max-width: 720px; min-height: 100dvh; margin: 0 auto; padding-bottom: calc(60px + env(safe-area-inset-bottom)); background: #f8f8f8; }
.page-heading { position: relative; min-height: 44px; padding: 11px 35px; text-align: center; font-size: 16px; font-weight: 700; background: #fff; }
.page-heading::before { content: ""; position: absolute; inset: 0 calc((720px - 100vw)/2); z-index: -1; background: #fff; }
.bottom-nav { position: fixed; z-index: 50; bottom: 0; left: 0; width: 100%; height: calc(50px + env(safe-area-inset-bottom)); padding-bottom: env(safe-area-inset-bottom); display: grid; grid-template-columns: repeat(4,1fr); background: #f8f8f8; border-top: 1px solid #ccc; }
.bottom-nav a { display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 2px; min-width: 0; color: #7a7e83; font-size: 10px; }
.bottom-nav img { width: 24px; height: 24px; object-fit: contain; }
.bottom-nav a[aria-current="page"] { color: #007aff; }
.empty-panel { padding: 20px 12px; text-align: center; color: #777; font-size: 14px; background: #fafafa; }
.panel-head { padding: 12px 5px; font-size: 16px; }
.panel-head span { float: right; font-size: 13px; color: #666; }
.load-more, .history-pagination a { display: block; margin: 12px auto; padding: 8px 20px; background: #fff; color: #555; border: 1px solid #ccc; border-radius: 4px; }
.back-top { position: fixed; bottom: 72px; right: max(12px, calc((100vw - 720px)/2 + 8px)); z-index: 20; width: 38px; height: 38px; border: 0; border-radius: 50%; color: #fff; background: #d32f2f; }
.visually-hidden { position: absolute; width: 1px; height: 1px; padding: 0; overflow: hidden; clip-path: inset(50%); white-space: nowrap; }
.content-html { overflow-x: auto; overflow-wrap: anywhere; font-family: "Times New Roman", SimSun, serif; font-size: 22px; line-height: 1.5; text-align: center; background: #fff; }
.content-html table { width: 100%; max-width: 100%; border-collapse: collapse; }
.content-html p { margin: 0; }
.content-html img { max-width: 100%; }
.prediction-hit { color: #d90000; background: #ffff00; font-weight: 700; }
.prediction-result-strong { color: #c00000; background: #ffff00; font-weight: 700; }
.doc-list, .gallery-directory { display: grid; grid-template-columns: repeat(3,minmax(0,1fr)); gap: 2px; }
.doc-item, .gallery-directory > a { display: flex; align-items: center; justify-content: center; min-height: 50px; padding: 8px 4px; text-align: center; border: 1px solid #ccc; border-radius: 5px; background: #fff; color: #444; font-size: 14px; overflow-wrap: anywhere; }
.doc-item strong { font-weight: 400; }
.doc-list .empty-panel, .gallery-directory .empty-panel { grid-column: 1 / -1; }
.pic-list { display: grid; grid-template-columns: repeat(2,minmax(0,1fr)); gap: 4px; }
.pic-card { border: 1px solid #ddd; background: #fff; padding: 0; color: #444; }
.pic-card img { display: block; width: 100%; }
.pic-card span { display: block; padding: 8px 4px; }
.pic-more-text { width: 100%; padding: 12px; border: 1px solid #ddd; background: #fff; }
.swiper-tabs { display: flex; overflow-x: auto; background: #fff; }
.swiper-tabs button { flex: 1 0 60px; padding: 8px; border: 1px solid #ddd; background: #fff; color: #555; }
.swiper-tabs [aria-selected="true"] { background: #fa473b; color: #fff; }
.swiper-frame { position: relative; background: #fff; text-align: center; }
.swiper-frame img { display: block; width: 100%; }
.swiper-arrow { position: absolute; z-index: 1; top: 45%; width: 30px; height: 42px; border: 0; background: #0005; color: #fff; font-size: 30px; }
.swiper-arrow.prev { left: 0; }
.swiper-arrow.next { right: 0; }
.home-modal { max-width: min(94vw,900px); max-height: 90dvh; padding: 10px; border: 0; border-radius: 5px; background: #fff; }
.home-modal::backdrop { background: #000b; }
.home-modal img { display: block; max-height: 78dvh; object-fit: contain; }
.home-modal button { display: block; margin: 8px auto 0; padding: 8px 24px; }
@media (max-width: 720px) { .page-heading::before { display: none; } }
@media (max-width: 480px) { .content-html { font-size: 18px; } .doc-item, .gallery-directory > a { font-size: 13px; } }
@media (prefers-reduced-motion: reduce) { *, *::before, *::after { animation: none !important; scroll-behavior: auto !important; } }
