[v-cloak] {
    display: none !important;
}

:root {
    --q-primary: #1266f1;
}

html {
    font-size: 15px;
}

.h1,
.h2,
.h3,
.h4,
body,
h1,
h2,
h3,
h4,
h5,
h6,
button,
html,
input,
select,
textarea {
    font-family: '-apple-system',BlinkMacSystemFont,'Segoe UI',Roboto,'Helvetica Neue','PingFang SC','Noto Sans','Noto Sans CJK SC','Microsoft YaHei','微软雅黑',sans-serif;
    -webkit-font-smoothing: antialiased;
}

a {
    text-decoration: none;
    color: var(--q-primary);
}

#navbar_logo {
    color: white;
    text-decoration: none;
    display: flex;
    align-items: center;
    font-size: 19px;
    margin-right: 20px;
    min-height: 50px;
}

#navbar_logo > img {
    height: 30px;
    margin-right: 10px;
}

.root-container {
    max-width: 1140px;
    flex: 1;
    display: flex;
    justify-content: start;
    align-items: center;
    flex-wrap: wrap;
    margin: 0 auto;
    padding: 0 15px;
}

.root-container > .container {
    width: 100%;
}

.root-container.items-stretch {
    align-items: stretch !important;
}

.q-btn-dropdown--simple *+.q-btn-dropdown__arrow {
    margin-left: 3px;
}

#top-toolbar {
    margin-bottom: 20px;
}

#top-toolbar .root-container {
    flex-wrap: nowrap;
    max-width: 1320px;
}

#top-toolbar .menus {
    flex-wrap: nowrap;
    white-space: nowrap;
}

#top-toolbar .menus .q-btn,
#top-toolbar .menus .q-btn-dropdown {
    padding-left: 8px;
    padding-right: 8px;
}

#top-toolbar .menus .mh-10 {
    margin-left: 4px !important;
    margin-right: 4px !important;
}

#top-toolbar .root-container > .q-btn, #top-toolbar .root-container > .flex > .q-btn {
    min-height: 50px;
    white-space: nowrap;
}

#top-toolbar .btn-menu {
    display: none;
}

/* 三级菜单挂到 body，长标题换行，避免窄屏被裁切 */
.header-nested-menu .q-item__label {
    white-space: normal;
    text-align: left;
}

/* 主题下拉：桌面端位于右侧菜单内；移动端单独常驻在汉堡按钮左侧（见 partial/theme-dropdown-quasar） */
#top-toolbar .theme-mode-mobile {
    display: none;
}

/* 手机顶栏搜索：桌面隐藏；窄屏显示在汉堡按钮左侧（见 layouts/root-quasar） */
#top-toolbar .tools-search-mobile {
    display: none;
}

.q-btn {
    font-weight: normal;
}

/* Flex and spacing utilities for tool card toolbars */
.d-flex {
    display: flex !important;
}

.d-inline-flex {
    display: inline-flex !important;
}

.d-flex.justify-between,
.row.justify-between {
    gap: 12px;
}

.text-caption + .q-btn,
.text-subtitle2 + .q-btn,
.text-subtitle1 + .q-btn,
span + .q-btn {
    margin-left: 10px;
}

.ads-box {
    background-color: #f6f6f6;
    border-radius: 15px;
    width: 100%;
    min-height: 80px;
    margin-bottom: 15px;
}

.ads-box-banner {
    min-height: 180px;
}

.ads-box-tall {
    min-height: 600px;
}

.ads-container {
    min-height: 90px;
    display: block;
    width: 100%;
    text-align: center;
    margin-bottom: 15px;
    background: rgba(0, 0, 0, 0.02);
    border-radius: 8px;
    box-sizing: border-box;
}

/* 尺寸交由 AdSense 自适应，不强制覆盖（不使用 !important、不设最小宽度、不裁剪） */
.ads-container ins.adsbygoogle {
    display: block;
    margin: 0 auto;
}

.ads-container-banner {
    min-height: 90px;
}

.ads-container-tall {
    min-height: 280px;
}

.table-responsive {
    width: 100%;
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
}

@media (max-width: 600px) {
    .container-article {
        padding-left: 12px;
        padding-right: 12px;
    }
}

h3 {
    font-size: 2.25rem;
    line-height: 2.25rem;
}

h4 {
    font-size: 2rem;
    line-height: 2rem;
}

h5 {
    font-size: 1.75rem;
    line-height: 1.75rem;
}

h6 {
    font-size: 1.5rem;
    line-height: 1.5rem;
}

.text-muted {
    color: #555;
}

fieldset.classic {
    border: 1px solid #ddd;
    border-radius: 6px;
    margin: 30px 0 15px;
    padding: 25px 15px 12px;
    position: relative;
}

fieldset.classic legend {
    font-size: 13px;
    position: absolute;
    top: -11px;
    padding: 0 12px;
    background: #f3f3f3;
    width: auto;
    border-radius: 5px;
}

.q-btn .q-icon.on-left {
    margin-right: 6px;
}

/*
 * 按钮尺寸：Quasar 的 size="xs" / size="sm" 会渲染成内联 font-size: 8px / 10px，
 * 而按钮高度按 em 计算，于是工具页里的次级按钮只有 20px 上下，文字和点击区域都过小。
 * 这里统一抬高这两档字号（内联样式需 !important 覆盖），并与默认档（14px）保持层级关系。
 */
.q-btn[style*="font-size: 8px"],
.q-btn[style*="font-size:8px"] {
    font-size: 12px !important;
}

.q-btn[style*="font-size: 10px"],
.q-btn[style*="font-size:10px"] {
    font-size: 13px !important;
}

.q-field--float .q-field__label {
    margin-top: -1px;
}

.q-field__control-container > .q-option-group {
    margin-top: 15px;
    margin-bottom: 15px;
}

.q-field__control-container > .q-option-group .q-checkbox__label {
    color: #333;
}

.q-field__messages, .q-field__counter {
    line-height: 1.3;
}

.q-select.q-field--float.hide-input-on-value .q-field__input {
    width: 0 !important;
    min-width: 0 !important;
    flex-grow: 0 !important;
    flex-shrink: 1 !important;
    flex-basis: 0 !important;
}

.result-card {
    font-size: 1rem;
}

.result-card .q-item__section--side .text-caption {
    font-size: 0.85rem;
}

@media (min-width: 1400px) {
    .root-container {
        max-width: 1320px;
    }
}

@media (min-width: 841px) and (max-width: 1200px) {
    #top-toolbar .menus .q-btn,
    #top-toolbar .menus .q-btn-dropdown {
        padding-left: 6px;
        padding-right: 6px;
        font-size: 13px;
    }
    #top-toolbar .mh-10 {
        margin-left: 3px !important;
        margin-right: 3px !important;
    }
}

@media (max-width: 1140px) {
    #top-toolbar .q-toolbar .root-container {
        padding: 0;
    }
}

@media (max-width: 940px) {
    #top-toolbar .btn-register {
        display: none;
    }
}

@media (max-width: 899px) {
    #top-toolbar .btn_account > .q-btn__content > .q-icon {
        margin-right: 0;
    }

    #top-toolbar .btn_account > .q-btn__content > .block {
        display: none !important;
    }
}

@media (max-width: 840px) {
    #top-toolbar .btn-menu {
        display: flex;
        margin-left: auto;
    }

    #top-toolbar .menus {
        display: none;
    }

    #top-toolbar .menus.visible {
        display: flex;
        margin-left: -10px;
    }

    /* 窄屏展开菜单：导航菜单换到工具栏下方纵向排列，避免整行溢出、首个分类被挤出屏幕无法点击 */
    #top-toolbar .root-container:has(> .menus.visible) {
        flex-wrap: wrap;
        width: 100%;
    }

    #top-toolbar .menus.visible:not(.flex-1) {
        order: 10;
        flex: 0 0 100%;
        flex-direction: column;
        align-items: stretch;
        margin-left: 0;
        padding-bottom: 8px;
    }

    #top-toolbar .menus.visible:not(.flex-1) > .q-btn,
    #top-toolbar .menus.visible:not(.flex-1) > .q-btn-dropdown {
        margin: 0 !important;
        min-height: 44px;
    }

    /* 纵向菜单项左对齐。q-btn 默认 justify-center / text-center，整行居中后不好点、箭头也不在行尾 */
    /* helper.css 的 .justify-center / .text-center 带 !important，这里必须覆盖 */
    #top-toolbar .menus.visible:not(.flex-1) .q-btn__content {
        justify-content: flex-start !important;
        text-align: left !important;
        padding-left: 6px;
        padding-right: 6px;
    }

    #top-toolbar .menus.visible:not(.flex-1) .q-btn-dropdown__arrow {
        margin-left: auto;
    }

    #top-toolbar .menus.visible.flex-1 {
        order: 9;
        flex: 0 0 100%;
        justify-content: flex-end;
    }

    #top-toolbar .theme-mode-mobile {
        display: inline-flex;
        margin-left: auto;
        min-width: 44px;
    }

    #top-toolbar .tools-search-mobile {
        display: inline-flex;
        min-width: 44px;
        margin-left: 0;
    }

    /* 搜索紧挨汉堡按钮左侧；菜单按钮不再单独被 margin-left:auto 推开 */
    #top-toolbar .theme-mode-mobile + .btn-menu,
    #top-toolbar .tools-search-mobile + .btn-menu {
        margin-left: 0;
    }

    #top-toolbar .menus .tools-search-trigger {
        display: none !important;
    }

    #top-toolbar .menus .theme-mode-desktop {
        display: none;
    }

    #top-toolbar .btn-register {
        display: flex;
    }
}
