@font-face { font-family: Mai; src: url('/title-subset.otf'); font-display: swap; }

:root { font-family: -apple-system, BlinkMacSystemFont, 'PingFang SC', 'Microsoft YaHei', sans-serif; color: #37383c; background: #f4f6f6; font-synthesis: none; }
* { box-sizing: border-box; }
body { margin: 0; }
button, input { font: inherit; }
button { cursor: pointer; }
button:focus-visible, input:focus-visible, summary:focus-visible, a:focus-visible { outline: 2px solid #0399b4; outline-offset: 3px; }
.icon { width: 18px; height: 18px; flex: none; }
.app-shell { max-width: 430px; min-height: 100dvh; margin: auto; background: #fff; box-shadow: 0 0 24px #14343b10; }
.app-shell main { padding: 0 18px calc(104px + env(safe-area-inset-bottom)); }
.topbar { min-height: 104px; padding: 12px 18px 6px; background: #fff; border-bottom: 1px solid #f1f1f1; display: flex; justify-content: space-between; align-items: center; gap: 8px; }
.topbar-brand { min-width: 0; display: flex; flex-direction: column; align-items: flex-start; }
.topbar img { width: 177px; height: 56px; object-fit: contain; object-position: left center; }
.topbar span { color: #777; font-size: 11px; line-height: 1; margin-left: 49px; margin-top: -2px; }
.topbar-analytics { flex: 0 0 auto; color: #008fa4; background: #edf8f9; border: 1px solid #c6e8eb; border-radius: 18px; padding: 8px 11px; font-size: 12px; line-height: 1; text-decoration: none; white-space: nowrap; }
.topbar-analytics:active { background: #dff2f4; }
.page-head { display: flex; justify-content: space-between; align-items: baseline; gap: 8px; padding-top: 15px; padding-bottom: 10px; }
.page-head h1, .hero h1, .detail-title-row h1 { font-family: Mai, sans-serif; font-size: 27px; line-height: 1.25; margin: 0; color: #24272b; }
.page-head span { color: #777; font-size: 11px; text-align: right; }
.search { display: flex; align-items: center; gap: 9px; height: 43px; padding: 0 12px; background: #f4f4f4; border-radius: 11px; color: #777; }
.search .icon { width: 17px; height: 17px; }
.search input { width: 100%; height: 100%; border: 0; outline: 0; background: transparent; color: #333; font-size: 13px; }
.search input::placeholder { color: #999; }
.sticky-controls { position: sticky; top: 0; z-index: 5; margin: 0 -18px; padding: 0 18px; background: #fff; border-bottom: 1px solid #edf0f1; box-shadow: 0 5px 12px #14343b0d; }
.library-controls { padding-top: 3px; }
.compare-controls .disease-list { padding-top: 10px; padding-bottom: 10px; }
.disease-list { display: flex; gap: 8px; overflow-x: auto; padding: 12px 0 10px; scrollbar-width: none; }
.disease-list::-webkit-scrollbar { display: none; }
.disease-chip { flex: 0 0 auto; min-width: 50px; height: 40px; border: 0; background: #f4f4f4; color: #666; padding: 0 14px; border-radius: 21px; text-align: center; font-size: 12px; }
.disease-chip small { display: none; }
.disease-chip.chosen { background: #0399b4; color: #fff; box-shadow: 0 2px 8px #0399b42b; }
.brand-list { margin-top: 2px; }
.brand-row { display: flex; align-items: center; min-height: 66px; border-bottom: 1px solid #ededed; }
.brand-row-main { flex: 1; min-width: 0; align-self: stretch; border: 0; background: transparent; text-align: left; color: inherit; padding: 10px 0; }
.brand-row-main > span { display: block; min-width: 0; }
.brand-row-main strong { font-family: Mai, sans-serif; font-size: 18px; font-weight: 500; color: #34383b; }
.brand-row-main .english { margin-left: 5px; font-size: 10px; color: #777; }
.brand-meta { display: block; margin-top: 4px; color: #767676; font-size: 11px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.favorite-toggle, .detail-favorite, .row-chevron { border: 0; background: transparent; display: grid; place-items: center; padding: 8px; }
.favorite-toggle, .detail-favorite { color: #b85508; }
.favorite-toggle, .row-chevron, .detail-favorite { min-width: 44px; min-height: 44px; }
.favorite-toggle .icon, .detail-favorite .icon { width: 19px; height: 19px; }
.row-chevron { color: #555; padding-right: 0; }
.row-chevron .icon { width: 17px; height: 17px; }
.bottom-nav { position: fixed; z-index: 10; bottom: 0; left: 50%; transform: translateX(-50%); width: min(100%, 430px); height: calc(68px + env(safe-area-inset-bottom)); padding: 8px 6px calc(5px + env(safe-area-inset-bottom)); border-top: 1px solid #ededed; background: #fff; display: grid; grid-template-columns: repeat(4, 1fr); box-shadow: 0 -7px 18px #ffffffd9; }
.bottom-nav button { border: 0; background: transparent; color: #777; font-size: 11px; display: flex; align-items: center; flex-direction: column; justify-content: center; gap: 3px; }
.bottom-nav button.active { color: #0399b4; }
.bottom-nav .icon { width: 22px; height: 22px; }
.footnote { color: #888; font-size: 10px; line-height: 1.65; margin: 17px 0; }
.inline-warning { color: #935110; background: #fff4e8; border-radius: 7px; padding: 9px 12px; font-size: 11px; margin: 8px 0; }
.analytics-notice { color: #5f6e72; background: #eef8f8; border: 1px solid #d9eeee; border-radius: 8px; padding: 9px 11px; margin: 9px 0 5px; font-size: 10px; line-height: 1.55; }
.empty { padding: 28px 12px; text-align: center; font-size: 12px; color: #888; }
.empty.compact { padding: 16px 0; }

.hero { padding: 15px 0 6px; background: #fff; }
.hero .eyebrow { display: none; }
.hero h1 { margin-bottom: 4px; }
.hero p:last-child { font-size: 11px; line-height: 1.5; color: #777; margin: 0; }
.section-head { display: flex; justify-content: space-between; align-items: center; gap: 10px; margin: 7px 0 10px; }
.section-head .eyebrow { color: #777; font-size: 10px; }
.section-head h2 { font-size: 15px; margin: 3px 0 0; }
.small-action { border: 1px solid #9bd6dc; background: #edf8fa; color: #087e90; padding: 8px 12px; border-radius: 10px; font-size: 12px; white-space: nowrap; min-height: 44px; }
.selector { border: 1px solid #e6eeee; border-radius: 9px; padding: 5px 12px; max-height: 285px; overflow-y: auto; }
.selector > p { color: #777; font-size: 11px; }
.select-row { display: flex; align-items: center; gap: 10px; padding: 10px 0; min-height: 44px; border-top: 1px solid #eee; }
.select-row input { accent-color: #0399b4; width: 18px; height: 18px; }
.select-row span { display: flex; flex-direction: column; gap: 1px; }
.select-row strong { font-size: 13px; }
.select-row small { font-size: 10px; color: #888; }
.compare-hint { font-size: 10px; color: #777; line-height: 1.5; margin: 7px 0; }
.compare-scroll { overflow-x: auto; border-top: 1px solid #eee; border-bottom: 1px solid #eee; scrollbar-width: thin; }
.compare-table { width: max-content; min-width: 100%; --col: 156px; }
.compare-head, .compare-row { width: max-content; min-width: 100%; }
.compare-head { background: #fff; }
.compare-head .row-title { font-size: 10px; color: #777; padding: 11px 8px; align-self: center; }
.compare-brand { padding: 10px 8px; text-align: center; background: #edf8fa; margin: 3px; border-radius: 7px; display: flex; flex-direction: column; gap: 2px; }
.compare-brand:nth-child(odd) { background: #f4f4f4; }
.compare-brand strong { font-family: Mai, sans-serif; font-size: 16px; color: #34383b; }
.compare-brand small { font-size: 10px; color: #777; }
.compare-brand button { border: 0; background: none; color: #a25e26; font-size: 10px; padding: 3px; }
.compare-section-title { color: #0399b4; background: #fff; border-bottom: 2px solid #0399b4; font-size: 11px; padding: 10px 8px 7px; }
.compare-row { border-bottom: 1px solid #eee; }
.compare-row .row-title { position: sticky; left: 0; z-index: 1; padding: 10px 6px; font-size: 10px; color: #555; background: #fff; line-height: 1.4; }
.compare-cell { font-size: 11px; line-height: 1.5; color: #444; background: #edf8fa; border-radius: 6px; padding: 8px 6px; margin: 4px 3px; overflow-wrap: anywhere; text-align: left; }
.compare-cell:nth-child(odd) { background: #f4f4f4; }
.compare-cell .caveat { display: block; margin-top: 4px; color: #8b683e; font-size: 9px; }
.compare-cell .flag { display: block; margin-top: 4px; color: #9c591e; font-size: 9px; }
.short-slogan { display: block; margin-bottom: 5px; color: #056d82; font-weight: 700; }
.muted { color: #999; }
.empty-state { text-align: center; padding: 45px 20px 36px; }
.empty-icon .icon { width: 33px; height: 33px; color: #0399b4; }
.empty-state h2, .empty-state h3 { font-size: 15px; margin: 15px 0 6px; font-weight: 500; }
.empty-state p { color: #777; font-size: 12px; line-height: 1.6; }
.empty-state button { border: 1px solid #ff9237; background: #fff; color: #a94800; border-radius: 22px; padding: 9px 16px; margin-top: 10px; font-size: 12px; }

.back { border: 0; background: transparent; color: #0399b4; display: flex; align-items: center; gap: 5px; padding: 14px 0; font-size: 12px; }
.back .icon { width: 15px; height: 15px; }
.detail-title-row { display: flex; justify-content: space-between; align-items: flex-start; gap: 8px; border-bottom: 1px solid #eee; padding: 3px 0 15px; }
.detail-title-row h1 { font-size: 30px; }
.detail-title-row p { color: #777; font-size: 12px; margin: 3px 0; }
.detail-title-row small { color: #777; font-size: 11px; }
.detail-favorite { margin-top: 4px; }
.detail-actions { margin: 15px 0 21px; }
.detail-actions button { border: 0; background: #0399b4; color: #fff; border-radius: 24px; width: 100%; padding: 12px; font-size: 14px; }
.panel { border-top: 1px solid #ededed; padding: 12px 0 16px; }
.panel-title { display: flex; align-items: baseline; justify-content: space-between; margin-bottom: 6px; }
.panel-title h2 { font-size: 18px; margin: 0; font-weight: 600; }
.panel-title span { color: #888; font-size: 11px; }
.info-row { border-bottom: 1px solid #eee; padding: 11px 0; }
.info-label { font-size: 11px; color: #777; margin-bottom: 6px; }
.info-value { font-size: 12px; line-height: 1.65; color: #333; overflow-wrap: anywhere; }
.flag { color: #99500c; background: #fff4e9; border-radius: 4px; font-size: 10px; padding: 2px 5px; margin-left: 4px; }
.caveat { display: block; margin-top: 4px; font-size: 10px; color: #8c6b47; }
.panel details { color: #666; font-size: 10px; line-height: 1.6; margin-top: 8px; }
.panel summary { color: #087f93; cursor: pointer; }
.panel details p { margin: 5px 0; overflow-wrap: anywhere; }
.panel details a { color: #00768c; }
.slogan { padding: 11px 0; border-bottom: 1px solid #eee; }
.slogan > p { color: #2b3538; font-size: 13px; font-weight: 700; line-height: 1.6; margin: 0; }
.study { padding: 14px 0; border-bottom: 1px solid #eee; }
.study-number { color: #0399b4; font-size: 12px; font-weight: 700; }
.study-summary { font-size: 12px; line-height: 1.7; margin: 7px 0 10px; }
.study dl { margin: 0; }
.study dl div { display: grid; grid-template-columns: 95px 1fr; gap: 9px; margin: 4px 0; }
.study dt, .study dd { font-size: 11px; line-height: 1.55; margin: 0; }
.study dt { color: #777; }

.coming-soon { min-height: 400px; padding: 55px 12px 20px; text-align: center; }
.coming-icon .icon { width: 39px; height: 39px; color: #0399b4; }
.coming-soon h2 { font-size: 17px; font-weight: 500; margin: 16px 0 8px; }
.coming-soon p { color: #777; font-size: 12px; line-height: 1.75; max-width: 270px; margin: 0 auto; }
.coming-note { margin: 26px auto 0; padding: 11px 12px; border-radius: 8px; background: #fff4e9; color: #99500c; font-size: 11px; max-width: 300px; }
.loading, .fatal { max-width: 430px; margin: 10vh auto; padding: 24px; text-align: center; color: #666; }

@media (max-width: 360px) { .compare-table { --col: 140px; } .topbar img { width: 155px; } .topbar { padding-left: 14px; padding-right: 14px; } .topbar-analytics { padding: 8px 9px; font-size: 11px; } }
@media (min-width: 700px) { .app-shell { margin: 20px auto; min-height: calc(100dvh - 40px); border-radius: 13px; overflow: clip; } .bottom-nav { bottom: 20px; border-radius: 0 0 13px 13px; } }
