* { box-sizing: border-box; }
body { margin: 0; min-height: 100vh; min-height: 100dvh; display: flex; flex-direction: column; background: #f4f7fc; color: #0b1a33; font-family: system-ui, -apple-system, 'Segoe UI', Roboto, 'Helvetica Neue', sans-serif; }
button, input { font: inherit; }
button { cursor: pointer; }
[hidden] { display: none !important; }
button:focus-visible, a:focus-visible { outline: 3px solid #8ec7ff; outline-offset: 4px; }
.tool-header { display: grid; grid-template-columns: minmax(0, 1fr) auto minmax(0, 1fr); align-items: center; gap: 16px; flex-shrink: 0; min-height: 66px; padding: 10px 28px; background: #fff; border-bottom: 1px solid #e7edf5; }
.tool-plan { justify-self: start; display: inline-flex; align-items: center; gap: 7px; padding: 6px 12px; border-radius: 8px; font-size: .8rem; font-weight: 500; }
.tool-plan strong { font-size: .85rem; font-style: italic; font-weight: 800; }
.tool-plan.is-free { color: #16803d; background: #eaf8ef; }
.tool-plan.is-paid { color: #9a6100; background: #fff4d9; }
.tool-plan img { width: 16px; height: 16px; object-fit: contain; }
.tool-title { display: flex; align-items: center; justify-content: center; gap: 10px; margin: 0; font-size: 1.325rem; font-weight: 700; line-height: 1.4; }
.tool-title-icon { display: grid; place-items: center; width: 36px; height: 36px; color: #006acd; font-size: 1.5rem; }
.tool-open-link { display: inline-flex; align-items: center; gap: 6px; justify-self: end; color: #69798d; font-size: .9rem; text-decoration: none; white-space: nowrap; }
.tool-open-link:hover { color: #006acd; }
.tool-main { flex: 1; display: flex; flex-direction: column; align-items: center; gap: 24px; width: 100%; padding: 32px 24px 16px; }
.mobile-wrapper { display: flex; flex: 1 0 auto; align-items: center; justify-content: center; width: 100%; }
.mobile-card { width: 100%; max-width: 760px; padding: 28px; border: 1px solid #e5ebf3; border-radius: 24px; background: #fff; box-shadow: 0 12px 40px rgba(18, 61, 107, .06); }
.search-heading h2 { margin: 0 0 8px; font-size: 1.25rem; font-weight: 700; line-height: 1.5; }
.search-heading p { margin: 0 0 24px; color: #69798d; font-size: .9rem; line-height: 1.8; }
.search-form { display: flex; gap: 12px; }
.search-input-wrap { display: flex; align-items: center; flex: 1; min-width: 0; gap: 12px; min-height: 52px; padding: 0 16px; border: 1px solid #dce5f0; border-radius: 12px; background: #f8faff; }
.search-input-wrap:focus-within { border-color: #006acd; box-shadow: 0 0 0 3px rgba(0, 106, 205, .1); }
.search-input-wrap > i { color: #8895a7; }
.search-input-wrap:has([aria-invalid="true"]) { border-color: #dc3545; }
.search-input-wrap input { width: 100%; min-width: 0; padding: 12px 0; border: 0; outline: 0; color: #0b1a33; background: transparent; font-size: 1.05rem; letter-spacing: .6px; }
.search-input-wrap input::placeholder { color: #8b98aa; font-size: .95rem; letter-spacing: 0; }
.input-clear { display: grid; place-items: center; flex-shrink: 0; width: 28px; height: 28px; padding: 0; border: 0; border-radius: 6px; background: transparent; color: #69798d; }
.input-clear:hover { background: #e7edf5; }
.search-button { display: inline-flex; align-items: center; justify-content: center; gap: 8px; min-height: 52px; padding: 12px 24px; border: 0; border-radius: 12px; background: #006acd; color: #fff; font-size: .95rem; font-weight: 600; white-space: nowrap; box-shadow: 0 4px 14px rgba(0, 106, 205, .15); }
.search-button:hover { background: #0059b3; }
.search-button:disabled { cursor: wait; opacity: .65; }
.input-hint { margin: 10px 0 0; color: #8895a7; font-size: .8rem; line-height: 1.8; }
.query-status { min-height: 1.8em; margin: 8px 0 0; color: #69798d; font-size: .875rem; line-height: 1.8; overflow-wrap: anywhere; }
.query-status.is-error { color: #c83243; }
.result-slot { display: grid; margin-top: 24px; border-top: 1px solid #eef2f8; }
.result-slot > * { grid-area: 1 / 1; min-width: 0; }
/* 两种状态共同撑开同一网格，未展示的内容保留尺寸，避免卡片跳动。 */
.empty-state[hidden] { display: flex !important; visibility: hidden; }
.mobile-result[hidden] { display: block !important; visibility: hidden; }
.empty-state { display: flex; flex-direction: column; align-items: center; justify-content: center; min-height: 290px; margin: 0; padding: 32px 12px; text-align: center; }
.empty-icon { display: grid; place-items: center; width: 66px; height: 66px; margin-bottom: 18px; border-radius: 20px; color: #006acd; background: #eef4fe; font-size: 1.8rem; }
.empty-state h3 { margin: 0 0 10px; color: #53677e; font-size: 1rem; font-weight: 600; }
.empty-state p { margin: 0; color: #8895a7; font-size: .875rem; }
.mobile-result { margin: 0; padding-top: 22px; }
.result-heading { display: flex; align-items: center; justify-content: space-between; flex-wrap: wrap; gap: 12px; min-height: 24px; margin-bottom: 18px; }
.result-heading h3 { margin: 0; font-size: 1rem; font-weight: 650; }
.result-mobile { color: #315d8d; font-size: 1rem; font-weight: 600; font-variant-numeric: tabular-nums; letter-spacing: 1px; }
.region-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 12px; }
.region-item { padding: 18px 16px; border: 1px solid #e5edf8; border-radius: 16px; background: #f8faff; overflow-wrap: anywhere; }
.region-item > span { display: flex; align-items: center; gap: 6px; margin-bottom: 10px; color: #69798d; font-size: .8rem; }
.region-item strong { color: #0b1a33; font-size: 1.25rem; font-weight: 650; line-height: 1.5; }
.result-details { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 0 24px; margin: 16px 0 0; }
.result-details > div { display: flex; justify-content: space-between; gap: 16px; padding: 13px 0; border-bottom: 1px solid #eef2f8; font-size: .875rem; line-height: 1.6; }
.result-details dt { flex-shrink: 0; color: #69798d; font-weight: 400; }
.result-details dd { margin: 0; color: #315d8d; text-align: right; overflow-wrap: anywhere; }
.result-note { display: flex; align-items: baseline; gap: 7px; margin: 18px 0 0; color: #8895a7; font-size: .8rem; line-height: 1.8; }
.tool-tips { flex-shrink: 0; width: 100%; max-width: 760px; margin-top: auto; padding: 18px 16px 0; border-top: 1px solid #eef2f8; color: #66758a; font-size: .875rem; line-height: 1.8; text-align: center; }
.tool-tips p { margin: 0 0 4px; }
@media (max-width: 767.98px) {
    .tool-header { padding: 12px 18px; gap: 10px; }
    .tool-title { gap: 5px; font-size: 1.1rem; }
    .tool-plan { padding: 5px 8px; font-size: .75rem; }
    .tool-main { padding: 24px 16px 16px; }
}
@media (max-width: 575.98px) {
    .tool-header { grid-template-columns: minmax(0, 1fr) auto; }
    .tool-title { grid-column: 1 / -1; grid-row: 1; }
    .tool-plan { grid-column: 1; grid-row: 2; }
    .tool-open-link { grid-column: 2; grid-row: 2; font-size: .8rem; }
    .mobile-card { padding: 22px 18px; border-radius: 20px; }
    .search-form { flex-direction: column; }
    .search-button { width: 100%; min-height: 48px; }
    .region-grid { gap: 8px; }
    .region-item { padding: 14px 10px; border-radius: 12px; }
    .region-item strong { font-size: 1.05rem; }
    .region-item > span { font-size: .75rem; gap: 4px; }
    .result-details { grid-template-columns: minmax(0, 1fr); }
    .empty-state { min-height: 240px; }
    .tool-tips { padding: 16px 0 0; font-size: .8rem; }
}
