:root {
    --home-primary: #0d7cd7;
    --home-primary-dark: #075ea8;
    --home-accent: #ffe309;
    --home-action: #f2a900;
    --home-action-hover: #d99500;
    --home-success: #16845b;
    --home-bg: #ffffff;
    --home-surface: #ffffff;
    --home-text: #172033;
    --home-muted: #5a6475;
    --home-border: #d9dee5;
    --home-shadow: 0 12px 32px rgba(29, 57, 88, 0.08);
    --home-radius: 16px;
    --home-font-round: "Huninn", "Noto Sans TC", "Microsoft JhengHei", sans-serif;
    --home-sun: #fff1b8;
    --home-sky: #e3f1fd;
    --home-pink: #ffe4ea;
    --home-mint: #dcf5ea;
}

body.modern-home {
    margin: 0;
    background: var(--home-bg);
    color: var(--home-text);
    font-family: "Noto Sans TC", "Microsoft JhengHei", sans-serif;
    font-size: 15px;
    line-height: 1.6;
}

.modern-home *,
.modern-home *::before,
.modern-home *::after {
    box-sizing: border-box;
}

.modern-home a {
    color: var(--home-primary-dark);
    text-decoration: none;
    transition: color 160ms ease, background-color 160ms ease, border-color 160ms ease, transform 160ms ease;
}

.modern-home a:hover {
    color: var(--home-primary-dark);
    text-decoration: none;
}

.modern-home .site-utility > tbody > tr > td {
    height: 38px !important;
    background: #fff !important;
    border-bottom: 1px solid var(--home-border);
}

.modern-home .site-utility-inner {
    width: min(1440px, calc(100% - 48px)) !important;
    color: var(--home-muted);
}

.modern-home .site-utility-inner > tbody > tr {
    display: flex;
    width: 100%;
    align-items: center;
}

.modern-home .site-utility-inner .mode_top:first-child {
    width: auto !important;
    min-width: 0;
    flex: 1 1 auto;
}

.modern-home .site-utility-inner .mode_top:nth-child(2),
.modern-home .site-utility-inner .mode_top.info {
    width: auto !important;
    flex: 0 0 auto;
}

.modern-home .site-utility-inner .mode_top:nth-child(2) {
    margin-left: 18px;
}

.modern-home .site-utility-inner .mode_top.info {
    margin-left: 12px;
    background: none !important;
}

.modern-home .mode_top {
    font-size: 13px;
}

.modern-home .mode_top a {
    padding: 0 8px;
    border-radius: 6px;
    font-weight: 600;
}

.modern-home .mode_top.info a {
    display: inline-flex;
    min-height: 30px;
    gap: 6px;
    align-items: center;
    color: var(--home-primary);
}

.modern-home .mode_top.info a:hover {
    background: #eef6fc;
}

.modern-home .mode_top.info i {
    font-size: 15px;
}

.modern-home .utility-mail {
    display: inline-flex;
    min-height: 28px;
    margin-left: 8px;
    padding: 3px 9px !important;
    align-items: center;
    gap: 5px;
    border: 1px solid #e2a400;
    border-radius: 999px;
    background: #fff9d6;
    color: #5b4800 !important;
    font-weight: 700;
}

.modern-home .utility-mail:hover {
    border-color: #c58e00;
    background: #fff3ad;
    color: #443600 !important;
}

.modern-home .utility-mail i {
    font-size: 13px;
}

.modern-home #jsddm > li {
    padding-left: 0 !important;
    float: none;
}

.modern-home #jsddm > li > a {
    display: inline-flex;
    min-height: 30px;
    margin: 4px 0;
    padding: 0 13px;
    align-items: center;
    border-radius: 7px;
    background: var(--home-action);
    color: #2c2810 !important;
    font-weight: 700;
}

.modern-home #jsddm li ul {
    margin: 6px 0 0 -28px;
    width: 150px;
    padding: 8px;
    border: 1px solid var(--home-border);
    border-radius: 10px;
    background: #fff;
    box-shadow: var(--home-shadow);
}

.modern-home #jsddm li ul li {
    width: 100%;
    padding: 0;
    line-height: normal;
}

.modern-home #jsddm li ul li a {
    min-height: 38px;
    padding: 8px 10px;
    border-radius: 7px;
    text-align: left;
}

.modern-home .site-shell {
    width: min(1440px, calc(100% - 48px)) !important;
    background: transparent;
}

.modern-home .site-brand {
    display: flex;
    width: 100% !important;
    height: 68px !important;
    padding: 0;
    align-items: center;
    background-color: #fff !important;
    border-radius: 0;
}

/* 首頁：工具列併入 Logo 列 */
.modern-home .site-brand {
    height: auto !important;
    min-height: 84px;
    padding: 8px 0;
    justify-content: space-between;
    gap: 24px;
    background-image: none !important;
}

.modern-home .site-brand-utility {
    flex: 1 1 auto;
    min-width: 0;
}

.modern-home .site-brand-utility .site-utility-inner {
    width: 100% !important;
    height: auto;
}

.modern-home .site-brand-utility .mode_top:first-child {
    text-align: right;
}

.modern-home .site-logo {
    display: inline-flex;
    flex: 0 0 auto;
    align-items: center;
}

.modern-home .site-logo img {
    display: block;
    width: 302px;
    height: 68px;
}

.modern-home .site-nav {
    width: 100% !important;
    height: 52px !important;
    margin: 14px 0 20px !important;
    padding: 0 12px !important;
    border: 1px solid #0b67a5;
    background: #0b67a5 !important;
    border-radius: 12px;
    box-shadow: 0 8px 22px rgba(11, 103, 165, 0.16);
}

.modern-home #horiz-menu {
    height: 52px;
    margin: 0;
}

.modern-home #horiz-menu > ul.menutop {
    display: flex;
    width: 100%;
    height: 52px;
    margin: 0;
    align-items: center;
    justify-content: space-between;
}

.modern-home #horiz-menu li.root {
    height: 52px;
    flex: 0 1 auto;
}

.modern-home #horiz-menu li.root > .item {
    display: inline-flex;
    height: 52px;
    margin: 0;
    padding: 0 12px;
    align-items: center;
    border-radius: 8px;
    color: #fff !important;
    font-size: 16px;
    font-weight: 600;
    letter-spacing: 0;
    line-height: 1;
}

.modern-home #horiz-menu li.root > .item:hover,
.modern-home #horiz-menu li.root > .item:focus-visible {
    background: rgba(255, 255, 255, 0.14) !important;
    color: #fff !important;
}

.modern-home .menutop li.root.menu-open > .fusion-submenu-wrapper,
.modern-home .menutop li.root:hover > .fusion-submenu-wrapper {
    top: 48px;
}

.modern-home .menutop .fusion-submenu-wrapper {
    padding: 8px;
    border: 1px solid var(--home-border);
    border-radius: 12px;
    background: #fff;
    box-shadow: var(--home-shadow);
}

.modern-home .menutop .fusion-submenu-wrapper ul,
.modern-home .menutop .fusion-submenu-wrapper li {
    width: 220px;
    margin: 0;
    padding: 0;
    background: #fff !important;
}

.modern-home .menutop .fusion-submenu-wrapper .drop-top {
    display: none;
}

.modern-home .menutop .fusion-submenu-wrapper a.item {
    min-height: 40px;
    padding: 9px 12px;
    border-radius: 7px;
    background: #fff !important;
    color: var(--home-text) !important;
    font-size: 14px !important;
    line-height: 1.4;
}

.modern-home .menutop .fusion-submenu-wrapper a.item:hover {
    background: #eef6fc !important;
    color: var(--home-primary) !important;
}

.modern-home .site-sidebar {
    display: none;
}

.modern-home .site-content-row {
    display: block;
}

.modern-home .site-main {
    display: block;
    width: 100% !important;
    padding: 0 0 36px !important;
}

.modern-home .home-page {
    display: flex;
    width: 100%;
    flex-direction: column;
    gap: 22px;
}

/* 最新消息：單列公告條（淺色，避免與主選單混淆） */
.modern-home .home-notices {
    display: flex;
    min-height: 50px;
    padding: 6px 18px;
    align-items: center;
    gap: 18px;
    border: 1px solid #b9d8f1;
    border-radius: 12px;
    background: linear-gradient(90deg, #e6f2fd 0%, #f5faff 55%, #ffffff 100%);
}

.modern-home .home-notices h2 {
    display: flex;
    margin: 0;
    padding: 5px 14px 5px 11px;
    flex: 0 0 auto;
    align-items: center;
    gap: 6px;
    border-radius: 999px;
    background: var(--home-primary-dark);
    color: #fff;
    font-size: 16px;
    line-height: 1.4;
}

.modern-home .home-notices h2 .lucide {
    color: var(--home-accent);
}

.modern-home .home-notice-latest {
    display: flex;
    min-width: 0;
    flex: 1 1 auto;
    align-items: center;
    gap: 10px;
    color: var(--home-text);
    font-size: 15px;
    font-weight: 600;
}

.modern-home .home-notice-latest:hover {
    color: var(--home-primary);
}

.modern-home .home-notice-latest span {
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.modern-home .home-notice-links {
    display: flex;
    margin: 0;
    padding: 0 0 0 18px;
    flex: 0 1 auto;
    align-items: center;
    gap: 4px 18px;
    border-left: 1px solid #b9d8f1;
    list-style: none;
}

.modern-home .home-notice-links a {
    display: inline-flex;
    min-height: 32px;
    align-items: center;
    gap: 5px;
    color: #344054;
    font-size: 14px;
    white-space: nowrap;
}

.modern-home .home-notice-links a:hover {
    color: var(--home-primary);
    text-decoration: underline;
}

.modern-home .home-notice-links .lucide {
    width: 16px;
    height: 16px;
    color: var(--home-primary);
}

.modern-home .home-notice-links a.notice-admin .lucide {
    color: #b42318;
}

.modern-home .home-notice-links a.notice-admin {
    color: #b42318;
}

.modern-home .home-notice-more {
    display: inline-flex;
    flex: 0 0 auto;
    align-items: center;
    gap: 2px;
    color: var(--home-primary-dark);
    font-size: 14px;
    font-weight: 600;
}

.modern-home .home-notice-more .lucide {
    width: 16px;
    height: 16px;
}

.modern-home .home-hero,
.modern-home .home-section {
    border: 1px solid var(--home-border);
    border-radius: var(--home-radius);
    background: var(--home-surface);
    box-shadow: var(--home-shadow);
}

.modern-home .home-hero {
    position: relative;
    padding: 34px;
    overflow: hidden;
    background: linear-gradient(135deg, #ffffff 0%, #fffbe6 100%);
}

.modern-home .home-hero::after {
    position: absolute;
    right: -70px;
    top: -110px;
    width: 300px;
    height: 300px;
    border-radius: 50%;
    background: rgba(255, 227, 9, 0.18);
    content: "";
}

.modern-home .home-hero-copy,
.modern-home .home-search,
.modern-home .home-categories {
    position: relative;
    z-index: 1;
}

.modern-home .home-eyebrow,
.modern-home .home-section-kicker {
    color: var(--home-primary-dark);
    font-size: 13px;
    font-weight: 700;
    letter-spacing: 0.08em;
}

.modern-home .home-hero h2 {
    margin: 6px 0 8px;
    color: var(--home-text);
    font-size: 32px;
    font-weight: 700;
    line-height: 1.3;
}

.modern-home .home-hero p {
    margin: 0;
    color: var(--home-muted);
    font-size: 16px;
}

.modern-home .home-hero p strong {
    color: var(--home-primary-dark);
    font-size: 18px;
}

.modern-home .home-search {
    display: grid;
    margin-top: 26px;
    padding: 18px;
    grid-template-columns: repeat(3, minmax(0, 1fr)) 150px;
    gap: 12px;
    align-items: end;
    border: 1px solid #d9e6f0;
    border-radius: 12px;
    background: rgba(255, 255, 255, 0.92);
}

.modern-home .home-search-field {
    display: flex;
    flex-direction: column;
    gap: 6px;
}

.modern-home .home-search label {
    color: #475467;
    font-size: 14px;
    font-weight: 600;
}

.modern-home .home-search select,
.modern-home .home-search button {
    width: 100%;
    height: 50px;
    border-radius: 10px;
    font: inherit;
}

.modern-home .home-search select {
    padding: 0 52px 0 15px;
    border: 1px solid #aebfd0;
    appearance: none;
    background-color: #fff;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='16' height='16' viewBox='0 0 24 24' fill='none' stroke='%230D7CD7' stroke-width='2.5' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='m6 9 6 6 6-6'/%3E%3C/svg%3E"), linear-gradient(#eef7fd, #eef7fd);
    background-repeat: no-repeat, no-repeat;
    background-position: right 14px center, right top;
    background-size: 16px 16px, 44px 100%;
    color: var(--home-text);
    cursor: pointer;
    font-size: 16px;
    font-weight: 500;
    box-shadow: 0 2px 5px rgba(29, 57, 88, 0.06);
    transition: border-color 160ms ease, box-shadow 160ms ease, background-color 160ms ease;
}

.modern-home .home-search select:hover {
    border-color: #6f9fbe;
    background-color: #fbfdff;
}

.modern-home .home-search select:focus {
    border-color: var(--home-primary);
    outline: 0;
    box-shadow: 0 0 0 3px rgba(13, 124, 215, 0.16);
}

.modern-home .home-search button {
    border: 0;
    background: var(--home-action);
    color: #2c2810;
    cursor: pointer;
    font-weight: 700;
}

.modern-home .home-search button:hover {
    background: var(--home-action-hover);
}

.modern-home .home-section {
    padding: 26px;
}

.modern-home .home-section-header {
    display: flex;
    margin-bottom: 20px;
    align-items: flex-end;
    justify-content: space-between;
    gap: 20px;
}

.modern-home .home-section-header.compact {
    margin-bottom: 16px;
}

.modern-home .home-section-header h2 {
    margin: 3px 0 0;
    color: var(--home-text);
    font-size: 22px;
    font-weight: 700;
    line-height: 1.35;
}

.modern-home .home-text-link,
.modern-home .panel-more-link {
    display: inline-flex;
    min-height: 36px;
    padding: 7px 11px;
    align-items: center;
    border-radius: 7px;
    color: var(--home-primary-dark);
    font-weight: 600;
}

.modern-home .home-text-link:hover,
.modern-home .panel-more-link:hover {
    background: #eef6fc;
}

.modern-home .listing-grid {
    display: grid;
    margin: 0;
    padding: 0;
    gap: 18px;
    list-style: none;
}

.modern-home .listing-grid-four {
    grid-template-columns: repeat(4, minmax(0, 1fr));
}

.modern-home .listing-grid-five {
    grid-template-columns: repeat(5, minmax(0, 1fr));
}

.modern-home .listing-card {
    position: relative;
    min-width: 0;
    overflow: hidden;
    border: 1px solid var(--home-border);
    border-radius: 12px;
    background: #fff;
    transition: transform 180ms ease, border-color 180ms ease, box-shadow 180ms ease;
}

.modern-home .listing-card:hover {
    transform: translateY(-3px);
    border-color: #a9cce4;
    box-shadow: 0 12px 24px rgba(31, 72, 109, 0.12);
}

.modern-home .listing-card > a {
    display: block;
    height: 100%;
    color: inherit;
}

.modern-home .listing-card img {
    display: block;
    width: 100%;
    height: 180px;
    padding: 0;
    border: 0;
    border-radius: 0;
    object-fit: cover;
}

.modern-home .listing-card-body {
    padding: 14px;
}

.modern-home .listing-type {
    display: inline-flex;
    padding: 3px 8px;
    border-radius: 999px;
    background: #fff9cc;
    color: #514600;
    font-size: 12px;
    font-weight: 700;
}

.modern-home .listing-card h3 {
    min-height: 44px;
    margin: 9px 0 10px;
    overflow: hidden;
    color: var(--home-text);
    font-size: 16px;
    font-weight: 600;
    line-height: 1.4;
}

.modern-home .listing-meta {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
    color: var(--home-muted);
    font-size: 13px;
}

.modern-home .listing-meta strong {
    color: #b54708;
    font-size: 15px;
}

.modern-home .verified-badge {
    position: absolute;
    z-index: 2;
    top: 10px;
    left: 10px;
    padding: 5px 9px;
    border-radius: 999px;
    background: var(--home-success);
    color: #fff;
    font-size: 12px;
    font-weight: 700;
}

.modern-home .home-split-layout {
    display: grid;
    grid-template-columns: minmax(0, 2fr) minmax(300px, 1fr);
    gap: 22px;
    align-items: stretch;
}

.modern-home .home-safe-content {
    display: grid;
    grid-template-columns: minmax(340px, 1.35fr) minmax(220px, 0.65fr);
    gap: 22px;
    align-items: center;
}

.modern-home .home-safe-content > a,
.modern-home .home-safe-content img {
    display: block;
    width: 100%;
    height: auto;
    border-radius: 10px;
}

.modern-home .home-safe-content ul,
.modern-home .home-lost-list {
    margin: 0;
    padding: 0;
    list-style: none;
}

.modern-home .home-safe-content li {
    display: flex;
    padding: 11px 0;
    flex-direction: column;
    border-bottom: 1px solid var(--home-border);
}

.modern-home .home-safe-content li:last-child {
    border-bottom: 0;
}

.modern-home .home-safe-content strong {
    color: var(--home-text);
    font-size: 14px;
}

.modern-home .home-safe-content span {
    color: var(--home-muted);
    font-size: 13px;
}

.modern-home .home-lost-list li {
    border-bottom: 1px solid var(--home-border);
}

.modern-home .home-lost-list li:last-child {
    border-bottom: 0;
}

.modern-home .home-lost-list a {
    display: block;
    padding: 10px 8px;
    overflow: hidden;
    color: #344054;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.modern-home .home-lost-list a:hover {
    border-radius: 7px;
    background: #f3f7fa;
    color: var(--home-primary);
}

.modern-home .abgne_tab {
    width: 100%;
    margin: 0;
}

.modern-home ul.tabs {
    display: flex;
    width: 100% !important;
    height: auto !important;
    margin: 0;
    padding: 5px;
    gap: 4px;
    border: 0;
    border-radius: 10px;
    background: #eef3f7 !important;
    list-style: none;
}

.modern-home ul.tabs li {
    height: auto;
    margin: 0;
    flex: 1;
    overflow: visible;
    border: 0;
    line-height: 1;
}

.modern-home ul.tabs li a {
    display: flex;
    min-height: 42px;
    padding: 8px 12px;
    align-items: center;
    justify-content: center;
    border: 0;
    border-radius: 8px;
    background: transparent !important;
    color: #475467;
    font-weight: 600;
}

.modern-home ul.tabs li.active {
    border: 0;
    background: transparent !important;
}

.modern-home ul.tabs li.active a {
    background: #fff !important;
    color: var(--home-primary-dark);
    box-shadow: 0 2px 8px rgba(31, 72, 109, 0.1);
}

.modern-home div.tab_container {
    width: 100% !important;
    height: auto !important;
    min-height: 280px;
    border: 0;
    background: #fff;
}

.modern-home div.tab_container .tab_content {
    padding: 24px 0 0;
}

.modern-home .discussion-list {
    display: grid;
    margin: 0;
    padding: 0;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 0 28px;
    list-style: none;
}

.modern-home .discussion-list li {
    min-width: 0;
    padding: 0 !important;
    border-bottom: 1px solid var(--home-border);
    background: transparent !important;
    letter-spacing: 0;
    line-height: normal;
}

.modern-home .discussion-list li:hover {
    background: #f6f9fb !important;
}

.modern-home .discussion-list li a {
    display: block;
    min-height: 44px;
    padding: 11px 8px !important;
    overflow: hidden;
    background: none !important;
    color: #344054;
    text-overflow: ellipsis;
    white-space: nowrap;
}

/* 清單品種標籤（原 cvs_list.php 內嵌 style） */
.modern-home .discussion-list .list-tag {
    color: #6633ff;
    font-weight: bold;
}

.modern-home .discussion-list li a:hover {
    padding-left: 8px !important;
    color: var(--home-primary);
    text-decoration: none;
}

.modern-home .blog-columns {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 28px;
}

.modern-home .blog-columns h3 {
    margin: 0 0 10px;
    font-size: 17px;
}

.modern-home .blog-columns .discussion-list {
    grid-template-columns: 1fr;
}

/* 首頁不載入舊頁尾，版型最後一列僅剩灰色分隔線，會與頁尾卡片邊框形成雙線 */
.modern-home .site-shell > tbody > tr:last-child {
    display: none;
}

.modern-home .modern-site-footer {
    width: min(1440px, calc(100% - 48px));
    margin: 2px auto 28px;
    padding: 24px 28px;
    border: 1px solid var(--home-border);
    border-radius: 12px;
    background: #fff;
    color: var(--home-muted);
    box-shadow: var(--home-shadow);
}

.modern-home .modern-footer-top,
.modern-home .modern-footer-bottom,
.modern-home .modern-footer-brand,
.modern-home .modern-footer-links {
    display: flex;
    align-items: center;
}

.modern-home .modern-footer-top {
    justify-content: space-between;
    gap: 28px;
}

.modern-home .modern-footer-brand {
    flex: 0 0 auto;
    gap: 14px;
}

.modern-home .modern-footer-brand img {
    width: 90px;
    height: 60px;
    object-fit: contain;
}

.modern-home .modern-footer-brand div {
    display: flex;
    flex-direction: column;
}

.modern-home .modern-footer-brand strong {
    color: var(--home-text);
    font-size: 18px;
}

.modern-home .modern-footer-brand span {
    font-size: 13px;
}

.modern-home .modern-footer-links {
    flex-wrap: wrap;
    justify-content: flex-end;
    gap: 6px;
}

.modern-home .modern-footer-links a {
    display: inline-flex;
    min-height: 40px;
    padding: 8px 10px;
    align-items: center;
    border-radius: 7px;
    font-weight: 600;
}

.modern-home .modern-footer-links a:hover {
    background: #eef6fc;
}

/* 頁尾資訊區：單一分隔線、一致靠左，版權與聯絡資訊左右分列 */
.modern-home .modern-footer-meta {
    display: flex;
    margin-top: 18px;
    padding-top: 16px;
    flex-direction: column;
    gap: 10px;
    border-top: 1px solid var(--home-border);
    font-size: 14px;
}

.modern-home .modern-footer-notice {
    display: flex;
    margin: 0;
    align-items: flex-start;
    gap: 8px;
}

.modern-home .modern-footer-notice strong {
    color: var(--home-text);
}

.modern-home .modern-footer-meta .lucide {
    width: 16px;
    height: 16px;
    margin-top: 3px;
    color: var(--home-primary);
}

.modern-home .modern-footer-bottom {
    justify-content: space-between;
    flex-wrap: wrap;
    gap: 8px 24px;
}

.modern-home .modern-footer-contact {
    display: flex;
    margin: 0;
    padding: 0;
    flex-wrap: wrap;
    gap: 8px 24px;
    list-style: none;
}

.modern-home .modern-footer-contact li {
    display: inline-flex;
    align-items: center;
    gap: 6px;
}

.modern-home .modern-footer-contact .lucide {
    margin-top: 0;
}

.modern-home .modern-footer-contact a {
    font-weight: 600;
}

.modern-home .modern-footer-contact a:hover {
    text-decoration: underline;
}

@media (max-width: 1100px) {
    .modern-home .site-utility-inner,
    .modern-home .site-shell {
        width: calc(100% - 32px) !important;
    }

    .modern-home #horiz-menu li.root > .item {
        padding: 0 7px;
        font-size: 14px;
    }

    .modern-home .listing-grid-four,
    .modern-home .listing-grid-five {
        grid-template-columns: repeat(3, minmax(0, 1fr));
    }

    .modern-home .home-split-layout,
    .modern-home .home-safe-content {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 900px) {
    .modern-home .site-nav {
        height: auto !important;
    }

    .modern-home #horiz-menu,
    .modern-home #horiz-menu > ul.menutop {
        height: auto;
    }

    .modern-home #horiz-menu > ul.menutop {
        flex-wrap: wrap;
        float: none;
        justify-content: flex-start;
    }

    .modern-home #horiz-menu,
    .modern-home .site-nav {
        min-height: 176px;
    }

    .modern-home #horiz-menu li.root {
        height: 44px;
        flex: 1 0 30%;
    }

    .modern-home #horiz-menu li.root > .item {
        width: 100%;
        height: 44px;
        justify-content: center;
    }

    .modern-home .home-search {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    .modern-home .home-notices {
        padding: 10px 16px;
    }

    .modern-home .home-search button {
        grid-column: span 2;
    }

    .modern-home .listing-grid-four,
    .modern-home .listing-grid-five {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    .modern-home .discussion-list,
    .modern-home .blog-columns {
        grid-template-columns: 1fr;
    }

    .modern-home .home-hero,
    .modern-home .home-section {
        padding: 20px;
    }

    .modern-home .home-hero h2 {
        font-size: 26px;
    }

    .modern-home .modern-site-footer {
        width: calc(100% - 32px);
        padding: 20px;
    }

    .modern-home .modern-footer-top {
        align-items: flex-start;
        flex-direction: column;
    }

    .modern-home .modern-footer-links {
        justify-content: flex-start;
    }

    .modern-home .modern-footer-bottom {
        flex-direction: column;
        align-items: flex-start;
    }
}

@media (max-width: 600px) {
    .modern-home .home-search,
    .modern-home .listing-grid-four,
    .modern-home .listing-grid-five {
        grid-template-columns: 1fr;
    }

    .modern-home .home-search button {
        grid-column: auto;
    }
}

@media (prefers-reduced-motion: reduce) {
    .modern-home *,
    .modern-home *::before,
    .modern-home *::after {
        scroll-behavior: auto !important;
        transition-duration: 0.01ms !important;
    }
}

/* ===== 活潑風格：藍白品牌色、分級圓角、圓體標題、Lucide 圖示 ===== */
.modern-home .site-brand {
    background-color: transparent !important;
}

.modern-home .lucide {
    width: 18px;
    height: 18px;
    flex: 0 0 auto;
}

.modern-home .home-hero h2,
.modern-home .home-section-header h2,
.modern-home .home-notices h2,
.modern-home .blog-columns h3,
.modern-home ul.tabs li a,
.modern-home .home-categories a {
    font-family: var(--home-font-round);
    font-weight: 400;
}

/* 主選單維持品牌藍長條，加入圖示間距；hover 時圖示改為實心 */
.modern-home #horiz-menu li.root > a.item {
    gap: 6px;
}

/* 主選單與下拉統一使用網頁字型，避免舊樣式的微軟正黑體造成字面大小不一 */
.modern-home #horiz-menu,
.modern-home #horiz-menu a.item {
    font-family: "Noto Sans TC", "Microsoft JhengHei", sans-serif !important;
}

.modern-home #horiz-menu li.root > a.item .lucide {
    transition: fill 160ms ease-out;
}

.modern-home #horiz-menu li.root:hover > a.item .lucide,
.modern-home #horiz-menu li.root > a.item:focus-visible .lucide,
.modern-home #horiz-menu li.root.menu-open > a.item .lucide {
    fill: currentColor;
}

.modern-home #jsddm > li > a,
.modern-home .home-search button {
    border-radius: 999px;
}

/* 區塊與主視覺 */
.modern-home .home-hero h2 {
    font-size: 34px;
}

.modern-home .home-search button {
    box-shadow: 0 4px 0 var(--home-action-hover);
    transition: transform 200ms ease-out, box-shadow 200ms ease-out, background-color 200ms ease-out;
}

.modern-home .home-search button:active {
    transform: translateY(3px);
    box-shadow: 0 1px 0 var(--home-action-hover);
}

.modern-home .home-section-header h2 {
    display: flex;
    align-items: center;
    gap: 10px;
    font-size: 24px;
}

.modern-home .home-section-header h2 .lucide {
    width: 38px;
    height: 38px;
    padding: 8px;
    border-radius: 50%;
    background: var(--home-sky);
    color: var(--home-primary-dark);
}

.modern-home #latest-listings-title .lucide {
    background: var(--home-sun);
    color: #b87900;
}

.modern-home #safe-seller-title .lucide,
.modern-home #reptile-title .lucide {
    background: var(--home-mint);
    color: var(--home-success);
}

.modern-home #lost-pets-title .lucide {
    background: var(--home-pink);
    color: #c0395a;
}

/* 分類泡泡 */
.modern-home .home-categories {
    display: grid;
    margin-top: 22px;
    grid-template-columns: repeat(8, minmax(0, 1fr));
    gap: 12px;
}

.modern-home .home-categories a {
    display: flex;
    padding: 12px 6px;
    flex-direction: column;
    align-items: center;
    gap: 8px;
    border-radius: 14px;
    color: var(--home-text);
    font-size: 16px;
    transition: transform 200ms ease-out, background-color 200ms ease-out;
}

.modern-home .home-categories a:hover {
    background: #eef6fc;
    color: var(--home-text);
    transform: translateY(-3px);
}

.modern-home .home-category-icon {
    display: grid;
    width: 64px;
    height: 64px;
    place-items: center;
    border: 3px solid #fff;
    border-radius: 50%;
    background: var(--home-sky);
    color: var(--home-primary-dark);
    box-shadow: 0 4px 10px rgba(29, 57, 88, 0.1);
}

.modern-home .home-category-icon .lucide {
    width: 30px;
    height: 30px;
}

.modern-home .home-categories a:nth-child(4n+1) .home-category-icon {
    background: var(--home-sun);
    color: #b87900;
}

.modern-home .home-categories a:nth-child(4n+3) .home-category-icon {
    background: var(--home-pink);
    color: #c0395a;
}

.modern-home .home-categories a:nth-child(4n+4) .home-category-icon {
    background: var(--home-mint);
    color: var(--home-success);
}

/* 卡片 */
.modern-home .listing-card {
    border-radius: 14px;
}

/* 分頁 */
.modern-home ul.tabs li a {
    font-size: 16px;
}

.modern-home .modern-site-footer {
    border-radius: var(--home-radius);
}

/* 主視覺主標與即時數據 */
.modern-home .home-hero-copy h2 {
    margin: 0 0 6px;
    font-family: "Noto Sans TC", "Microsoft JhengHei", sans-serif;
    font-size: 30px;
    font-weight: 700;
}

.modern-home .home-hero-copy .home-hero-stats {
    font-size: 16px;
}

/* 熱門討論 */
.modern-home .topic-grid {
    display: grid;
    margin: 0;
    padding: 0;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 12px;
    list-style: none;
}

.modern-home .topic-card {
    min-width: 0;
}

.modern-home .topic-card a {
    display: flex;
    padding: 14px 16px;
    align-items: center;
    gap: 14px;
    border: 1px solid var(--home-border);
    border-radius: 14px;
    color: var(--home-text);
    transition: border-color 200ms ease-out, background-color 200ms ease-out;
}

.modern-home .topic-card a:hover {
    border-color: #a9cce4;
    background: #f5faff;
    color: var(--home-text);
}

.modern-home .topic-avatar {
    display: grid;
    width: 44px;
    height: 44px;
    flex: 0 0 44px;
    place-items: center;
    border-radius: 50%;
    background: var(--home-sky);
    color: var(--home-primary-dark);
    font-size: 18px;
    font-weight: 700;
    text-transform: uppercase;
}

.modern-home .topic-card:nth-child(4n+2) .topic-avatar {
    background: var(--home-sun);
    color: #7a5200;
}

.modern-home .topic-card:nth-child(4n+3) .topic-avatar {
    background: var(--home-pink);
    color: #a8304e;
}

.modern-home .topic-card:nth-child(4n+4) .topic-avatar {
    background: var(--home-mint);
    color: #10694a;
}

.modern-home .topic-body {
    display: flex;
    min-width: 0;
    flex-direction: column;
    gap: 6px;
}

.modern-home .topic-title {
    overflow: hidden;
    font-size: 16px;
    font-weight: 600;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.modern-home .topic-meta {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 4px 14px;
    color: var(--home-muted);
    font-size: 13px;
}

.modern-home .topic-meta > span {
    display: inline-flex;
    align-items: center;
    gap: 4px;
}

.modern-home .topic-meta .lucide {
    width: 14px;
    height: 14px;
}

.modern-home .topic-meta .topic-board {
    padding: 1px 8px;
    border-radius: 999px;
    background: #eef6fc;
    color: var(--home-primary-dark);
    font-weight: 600;
}

/* 安心賣家：品牌插畫（gpt-image 生成）＋保障說明 */
.modern-home .home-safe-content {
    grid-template-columns: minmax(0, 1.1fr) minmax(0, 0.9fr);
}

.modern-home .home-safe-content > .home-safe-visual {
    display: block;
    overflow: hidden;
    border-radius: 14px;
    transition: transform 200ms ease-out;
}

.modern-home .home-safe-content > .home-safe-visual:hover {
    transform: translateY(-3px);
}

.modern-home .home-safe-content > .home-safe-visual img {
    display: block;
    width: 100%;
    height: auto;
    border-radius: 14px;
}

.modern-home .home-safe-content li {
    flex-direction: row;
    align-items: flex-start;
    gap: 12px;
}

.modern-home .home-safe-content li > .lucide {
    width: 34px;
    height: 34px;
    padding: 7px;
    border-radius: 50%;
    background: var(--home-mint);
    color: var(--home-success);
}

.modern-home .home-safe-content li > span {
    display: flex;
    flex-direction: column;
    gap: 2px;
}

.modern-home .home-safe-content li strong {
    font-size: 15px;
}

.modern-home .home-safe-content li span span {
    font-size: 14px;
}

@media (max-width: 900px) {
    .modern-home .topic-grid {
        grid-template-columns: 1fr;
    }
}

/* 主選單下拉：加強浮層層次、淡入動畫與明確 hover 回饋 */
.modern-home .menutop li.root.menu-open > .fusion-submenu-wrapper,
.modern-home .menutop li.root:hover > .fusion-submenu-wrapper {
    top: 60px;
    animation: home-nav-drop 150ms ease-out;
}

.modern-home .menutop .fusion-submenu-wrapper {
    border-color: #cfdbe6;
    border-radius: 14px;
    box-shadow: 0 16px 40px rgba(16, 42, 67, 0.18), 0 2px 6px rgba(16, 42, 67, 0.08);
}

/* 選單與主選單之間的透明橋接，滑鼠經過間隙時不會關閉 */
.modern-home .menutop .fusion-submenu-wrapper::before {
    position: absolute;
    top: -12px;
    left: 0;
    right: 0;
    height: 12px;
    content: "";
}

.modern-home .menutop .fusion-submenu-wrapper a.item {
    font-size: 15px !important;
    transition: background-color 150ms ease-out, color 150ms ease-out, box-shadow 150ms ease-out;
}

.modern-home .menutop .fusion-submenu-wrapper a.item:hover,
.modern-home .menutop .fusion-submenu-wrapper a.item:focus-visible {
    background: #eef6fc !important;
    color: var(--home-primary-dark) !important;
    box-shadow: inset 3px 0 0 var(--home-primary);
    font-weight: 600;
}

@keyframes home-nav-drop {
    from {
        opacity: 0;
        transform: translateY(-6px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* 回到頂端按鈕為固定定位（右 30px、底 30px、60×60）；兩側留白不足時加大頁尾下外距，
   捲到最底時按鈕落在頁尾下方空白，不遮住頁尾文字 */
@media (max-width: 1619px) {
    .modern-home .modern-site-footer {
        margin-bottom: 100px;
    }
}

/* 最新消息：寬度不足時連結換到第二行 */
@media (max-width: 1280px) {
    .modern-home .home-notices {
        flex-wrap: wrap;
        row-gap: 2px;
    }

    .modern-home .home-notice-links {
        order: 3;
        width: 100%;
        padding-left: 0;
        flex-wrap: wrap;
        border-left: 0;
    }
}

/* 較窄螢幕：主選單隱藏圖示、分類改兩排 */
@media (max-width: 1360px) {
    .modern-home #horiz-menu li.root > a.item .lucide {
        display: none;
    }
}

@media (max-width: 900px) {
    .modern-home .home-categories {
        grid-template-columns: repeat(4, minmax(0, 1fr));
    }
}

@media (prefers-reduced-motion: reduce) {
    .modern-home .menutop li.root.menu-open > .fusion-submenu-wrapper,
    .modern-home .menutop li.root:hover > .fusion-submenu-wrapper {
        animation: none;
    }

    .modern-home .home-categories a:hover,
    .modern-home .home-safe-content > .home-safe-visual:hover,
    .modern-home .home-search button:active {
        transform: none;
    }
}
