.c {
    text-align: center;
    vertical-align: middle !important;
}

.m {
    vertical-align: middle !important;
}

.n {
    white-space: nowrap;
}

h1.my,
h2.my,
h1>span.my,
h2>span.my {
    padding: 6px;
    /* 離標題邊框距離 */
    text-align: left;
    /* 文字靠左 */
    font-weight: normal;
    /* 不要粗體 */
    font-family: HanWangMingBlack, JfOpenhuninn, 'Noto Sans TC', Mamelon;
    /* 字型 */
    background: -webkit-linear-gradient(rgb(89, 112, 134), rgb(33, 51, 51));
    /* 漸層顏色 */
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;

}

h3.my,
h4.my,
h5.my,
h3>span.my,
h4>span.my,
h5>span.my {
    padding: 6px;
    /* 離標題邊框距離 */
    text-align: left;
    /* 文字靠左 */
    font-weight: normal;
    /* 不要粗體 */
    font-family: JfOpenhuninn, 'Noto Sans TC', Mamelon;
    /* 字型 */
    background: -webkit-linear-gradient(rgb(126, 92, 64), rgb(92, 41, 56));
    /* 漸層顏色 */
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
}

.my-title {
    padding: 6px;
    /* 離標題邊框距離 */
    text-align: left;
    /* 文字靠左 */
    font-weight: normal;
    /* 不要粗體 */
    font-family: JfOpenhuninn, 'Noto Sans TC', Mamelon;
    color: #3a322e;
}

.my-border {
    padding: 12px 20px;
    border: 1px solid rgb(225, 225, 225);
    border-radius: 8px;
    background: rgb(245, 245, 245);
    /* box-shadow: 0px 0px 6px 1px rgba(37, 37, 37, 0.2); */
    margin: 10px auto;
}

.my-sm-border {
    padding: 6px 10px 8px 10px;
    border: 1px solid rgb(225, 225, 225);
    border-radius: 4px;
    background: rgb(245, 245, 245);
    margin: 10px auto;
}

ol {
    list-style-type: decimal;
    list-style-position: outside;
    padding-left: 20px;
}

ul {
    list-style-type: disc;
    list-style-position: outside;
    padding-left: 20px;
}

.tooltip-inner {
    max-width: 600px;
    font-size: 0.95em;
    background-color: #830d48;
    box-shadow: 2px 2px 5px 0px rgba(0, 0, 0, 0.5);
    line-height: 1.8;
}

.tooltip.bs-tooltip-right .arrow:before {
    border-right-color: #830d48 !important;
}

.tooltip.bs-tooltip-left .arrow:before {
    border-left-color: #830d48 !important;
}

.tooltip.bs-tooltip-bottom .arrow:before {
    border-bottom-color: #830d48 !important;
}

.tooltip.bs-tooltip-top .arrow:before {
    border-top-color: #830d48 !important;
}

.bar {
    text-align: center;
    margin: 3em auto;
}

.color-picker {
    width: 80%;
    display: inline-block;
}
/* ===== tad_link v4.0.4 front display polish / 分頁修正與新增標題調整 ===== */
.tad-link-wrap {
    max-width: 1180px;
    margin: 0 auto 32px auto;
    color: #24352f;
}

.tad-link-hero {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 18px;
    padding: 22px 26px;
    margin: 12px auto 20px auto;
    border: 1px solid rgba(55, 91, 74, .14);
    border-radius: 22px;
    background: linear-gradient(135deg, #f7fbf5 0%, #edf5ee 55%, #f9f4ea 100%);
    box-shadow: 0 12px 28px rgba(26, 53, 39, .08);
}

.tad-link-hero-admin {
    background: linear-gradient(135deg, #f8f6ef 0%, #eef6f2 100%);
}

.tad-link-eyebrow {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    margin-bottom: 6px;
    font-size: .82rem;
    letter-spacing: .12em;
    color: #67836f;
    font-weight: 700;
}

.tad-link-hero h2,
.tad-link-admin-add-head h3 {
    margin: 0;
    color: #17382c;
    font-weight: 800;
    line-height: 1.35;
}

.tad-link-hero p,
.tad-link-admin-add-head p {
    margin: 8px 0 0 0;
    color: #5f7169;
    line-height: 1.75;
}

.tad-link-hero-actions {
    flex: 0 0 auto;
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}

.tad-link-layout {
    display: grid;
    grid-template-columns: 280px minmax(0, 1fr);
    gap: 20px;
    align-items: start;
}

.tad-link-side-card,
.tad-link-admin-panel,
.tad-link-form-card,
.tad-link-admin-add-wrap {
    border: 1px solid rgba(55, 91, 74, .12);
    border-radius: 20px;
    background: #fff;
    box-shadow: 0 10px 26px rgba(31, 54, 42, .07);
}

.tad-link-side-card {
    padding: 18px;
    position: sticky;
    top: 12px;
}

.tad-link-side-title {
    margin-bottom: 12px;
    padding-bottom: 10px;
    border-bottom: 1px solid rgba(55, 91, 74, .1);
    color: #17382c;
    font-weight: 800;
}

.tad-link-side-card .ztree {
    padding: 0;
    font-size: .95rem;
    line-height: 1.8;
}

.tad-link-side-card .ztree li a {
    padding: 2px 4px;
    border-radius: 8px;
    color: #33483f;
}

.tad-link-side-card .ztree li a:hover {
    background: #edf5ee;
    text-decoration: none;
}

.tad-link-grid {
    display: grid;
    grid-template-columns: 1fr;
    gap: 16px;
}

.tad-link-card {
    display: grid;
    grid-template-columns: 170px minmax(0, 1fr);
    gap: 18px;
    padding: 16px;
    border: 1px solid rgba(55, 91, 74, .12);
    border-radius: 20px;
    background: #fff;
    box-shadow: 0 10px 26px rgba(31, 54, 42, .06);
    transition: transform .18s ease, box-shadow .18s ease, border-color .18s ease;
}

.tad-link-card:hover {
    transform: translateY(-2px);
    border-color: rgba(71, 112, 88, .28);
    box-shadow: 0 15px 32px rgba(31, 54, 42, .1);
}

.tad-link-thumb {
    display: block;
    overflow: hidden;
    min-height: 112px;
    border-radius: 16px;
    background: #eef2ed;
}

.tad-link-thumb img {
    width: 100%;
    height: 100%;
    min-height: 112px;
    object-fit: cover;
    display: block;
}

.tad-link-card-body {
    min-width: 0;
}

.tad-link-card-top {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
    margin-bottom: 8px;
}

.tad-link-pill {
    display: inline-flex;
    align-items: center;
    max-width: 100%;
    padding: 4px 10px;
    border-radius: 999px;
    background: #edf5ee;
    color: #416d53;
    font-size: .82rem;
    font-weight: 700;
    text-decoration: none;
}

.tad-link-pill:hover {
    background: #dfeee4;
    color: #234231;
    text-decoration: none;
}

.tad-link-pill-muted {
    background: #f3eeee;
    color: #875d5d;
}

.tad-link-counter {
    color: #7d8e85;
    font-size: .82rem;
    white-space: nowrap;
}

.tad-link-title {
    margin: 0 0 8px 0;
    font-size: 1.35rem;
    line-height: 1.45;
    font-weight: 800;
}

.tad-link-title a,
.tad-link-detail-title a {
    color: #17382c;
    text-decoration: none;
}

.tad-link-title a:hover,
.tad-link-detail-title a:hover {
    color: #2d7051;
    text-decoration: none;
}

.tad-link-url {
    margin: 4px 0 10px 0;
    font-size: .84rem;
    word-break: break-all;
}

.tad-link-url a,
.tad-link-detail-url a {
    color: #5b7168;
}

.tad-link-desc {
    color: #4d5f56;
    font-size: .94rem;
    line-height: 1.8;
}

.tad-link-actions,
.tad-link-detail-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-top: 14px;
}

.tad-link-admin-actions {
    display: inline-flex;
    flex-wrap: wrap;
    gap: 8px;
}

.tad-link-pagebar {
    margin: 24px auto;
    text-align: center;
}



/* tad_link v4.0.4：修正 TadTools PageBar 在前台變成直向 bullet 清單的問題 */
.tad-link-pagebar,
.tad-link-pagebar .bar {
    margin: 26px auto 10px auto !important;
    padding: 0 !important;
    text-align: center !important;
    width: 100%;
}

.tad-link-pagebar ul,
.tad-link-pagebar ol,
.tad-link-pagebar .pagination,
.tad-link-pagebar .pager,
.tad-link-pagebar .pagination-sm,
.tad-link-pagebar .pagination-lg {
    list-style: none !important;
    margin: 0 auto !important;
    padding: 0 !important;
    display: inline-flex !important;
    flex-direction: row !important;
    flex-wrap: wrap !important;
    align-items: center !important;
    justify-content: center !important;
    gap: 8px !important;
    width: auto !important;
}

.tad-link-pagebar li,
.tad-link-pagebar .page-item {
    list-style: none !important;
    display: inline-flex !important;
    align-items: center !important;
    justify-content: center !important;
    margin: 0 !important;
    padding: 0 !important;
    width: auto !important;
    float: none !important;
}

.tad-link-pagebar li::marker,
.tad-link-pagebar li::before,
.tad-link-pagebar .page-item::before {
    content: '' !important;
    display: none !important;
}

.tad-link-pagebar a,
.tad-link-pagebar span,
.tad-link-pagebar strong,
.tad-link-pagebar em,
.tad-link-pagebar .page-link,
.tad-link-pagebar .current,
.tad-link-pagebar .thispage,
.tad-link-pagebar .active a,
.tad-link-pagebar .active span {
    min-width: 36px !important;
    min-height: 36px !important;
    padding: 8px 12px !important;
    border: 1px solid rgba(55, 91, 74, .18) !important;
    border-radius: 999px !important;
    background: #fff !important;
    color: #2e4a3d !important;
    line-height: 1.2 !important;
    text-decoration: none !important;
    box-shadow: 0 6px 18px rgba(26, 53, 39, .06) !important;
}

.tad-link-pagebar a:hover,
.tad-link-pagebar .page-link:hover {
    background: #edf7ee !important;
    color: #1f3d30 !important;
    border-color: rgba(55, 91, 74, .28) !important;
}

.tad-link-pagebar .active a,
.tad-link-pagebar .active span,
.tad-link-pagebar strong,
.tad-link-pagebar .current,
.tad-link-pagebar .thispage {
    background: #375b4a !important;
    color: #fff !important;
    border-color: #375b4a !important;
}

.tad-link-empty {
    padding: 28px;
    border: 1px dashed rgba(55, 91, 74, .25);
    border-radius: 18px;
    background: #fbfdfb;
    color: #65766d;
    text-align: center;
}

.tad-link-admin-add-wrap {
    margin-top: 24px;
    overflow: hidden;
}

.tad-link-admin-add-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
    padding: 18px 22px;
    border-bottom: 1px solid rgba(55, 91, 74, .1);
    background: #f7fbf5;
}

.tad-link-form-card {
    padding: 20px;
    border: none;
    border-radius: 0;
    box-shadow: none;
}

.tad-link-form-section {
    margin-bottom: 16px;
}

.tad-link-form-label {
    display: block;
    margin-bottom: 6px;
    color: #365243;
    font-size: .9rem;
    font-weight: 800;
}

.tad-link-url-row {
    display: flex;
    gap: 10px;
}

.tad-link-input-lg {
    min-height: 46px;
    font-size: 1.05rem !important;
}

.tad-link-auto-btn {
    flex: 0 0 auto;
    min-width: 120px;
}

.tad-link-form-thumb {
    width: 100%;
    max-width: 120px;
    border-radius: 14px;
    border: 1px solid rgba(55, 91, 74, .15);
    background: #f4f7f4;
}

.tad-link-file-input {
    display: block;
    width: 100%;
    padding: 8px;
    border: 1px solid #d8e3dc;
    border-radius: 10px;
    background: #fff;
}

.tad-link-form-actions {
    display: flex;
    justify-content: center;
    margin-top: 10px;
    padding-top: 16px;
    border-top: 1px solid rgba(55, 91, 74, .1);
}

.tad-link-check-msg {
    margin: 12px auto;
    padding: 10px 14px;
    border-radius: 12px;
    background: #fff8e8;
}

.tad-link-admin-panel {
    padding: 18px;
    margin-bottom: 18px;
}

.tad-link-admin-toolbar,
.tad-link-admin-foot {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    margin-bottom: 12px;
}

.tad-link-check-all {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 8px 12px;
    border-radius: 999px;
    background: #edf5ee;
    color: #365243;
    font-weight: 700;
}

.tad-link-sort-list {
    display: grid;
    gap: 10px;
}

.tad-link-sort-item {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
    padding: 12px 14px;
    border: 1px solid rgba(55, 91, 74, .12);
    border-radius: 16px;
    background: #fff;
}

.tad-link-sort-main {
    display: flex;
    align-items: flex-start;
    gap: 10px;
    margin: 0;
    min-width: 0;
}

.tad-link-sort-main strong,
.tad-link-sort-main small {
    display: block;
}

.tad-link-sort-main strong {
    color: #17382c;
}

.tad-link-sort-main small {
    margin-top: 2px;
    color: #6f8078;
    word-break: break-all;
}

.tad-link-sort-actions {
    display: flex;
    flex-wrap: wrap;
    justify-content: flex-end;
    gap: 8px;
}

.tad-link-detail-card {
    display: grid;
    grid-template-columns: minmax(260px, 38%) minmax(0, 1fr);
    gap: 24px;
    padding: 22px;
    border: 1px solid rgba(55, 91, 74, .12);
    border-radius: 24px;
    background: #fff;
    box-shadow: 0 14px 34px rgba(31, 54, 42, .08);
}

.tad-link-detail-media img {
    width: 100%;
    border-radius: 18px;
    background: #eef2ed;
}

.tad-link-detail-title {
    margin: 10px 0;
    line-height: 1.45;
    font-weight: 850;
}

.tad-link-detail-url {
    padding: 10px 0;
    border-top: 1px solid rgba(55, 91, 74, .1);
    border-bottom: 1px solid rgba(55, 91, 74, .1);
    word-break: break-all;
}

.tad-link-detail-desc {
    margin-top: 16px;
    color: #40554b;
    line-height: 1.9;
}

.tad-link-social-tools {
    margin-top: 12px;
    text-align: right;
}

@media (max-width: 900px) {
    .tad-link-layout,
    .tad-link-detail-card {
        grid-template-columns: 1fr;
    }

    .tad-link-side-card {
        position: static;
    }

    .tad-link-card {
        grid-template-columns: 140px minmax(0, 1fr);
    }
}

@media (max-width: 640px) {
    .tad-link-hero,
    .tad-link-admin-add-head,
    .tad-link-admin-toolbar,
    .tad-link-admin-foot,
    .tad-link-sort-item {
        flex-direction: column;
        align-items: stretch;
    }

    .tad-link-card {
        grid-template-columns: 1fr;
    }

    .tad-link-thumb img,
    .tad-link-thumb {
        min-height: 180px;
    }

    .tad-link-url-row {
        flex-direction: column;
    }

    .tad-link-auto-btn {
        width: 100%;
    }
}


/* tad_link v4.0.5：分頁清理與換頁不跳分類 */
.tad-link-pagebar,
.tad-link-pagebar * {
    box-sizing: border-box;
}

.tad-link-pagebar ul,
.tad-link-pagebar ol,
.tad-link-pagebar li,
.tad-link-pagebar .pagination,
.tad-link-pagebar .pager,
.tad-link-pagebar .page-item,
.tad-link-pagebar .tad-link-clean-pager-list,
.tad-link-pagebar .tad-link-clean-pager-item {
    list-style-type: none !important;
    list-style-image: none !important;
}

.tad-link-pagebar ul::before,
.tad-link-pagebar ul::after,
.tad-link-pagebar ol::before,
.tad-link-pagebar ol::after,
.tad-link-pagebar li::before,
.tad-link-pagebar li::after,
.tad-link-pagebar li::marker,
.tad-link-pagebar .page-item::before,
.tad-link-pagebar .page-item::after,
.tad-link-pagebar .page-item::marker {
    content: none !important;
    display: none !important;
}

.tad-link-pagebar .tad-link-clean-pager-list,
.tad-link-pagebar ul,
.tad-link-pagebar ol {
    display: inline-flex !important;
    flex-direction: row !important;
    flex-wrap: wrap !important;
    gap: 8px !important;
    align-items: center !important;
    justify-content: center !important;
    vertical-align: middle !important;
}

.tad-link-pagebar .tad-link-clean-pager-item,
.tad-link-pagebar li {
    display: inline-flex !important;
    float: none !important;
    clear: none !important;
    vertical-align: middle !important;
}

html {
    scroll-padding-top: 16px;
}

/* ===== tad_link v4.0.6 分類導覽整理 / 自動收合 ===== */
.tad-link-side-head {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 12px;
    padding-bottom: 12px;
    margin-bottom: 12px;
    border-bottom: 1px solid rgba(55, 91, 74, .1);
}

.tad-link-side-card .tad-link-side-title {
    margin-bottom: 4px;
    padding-bottom: 0;
    border-bottom: 0;
}

.tad-link-cate-current {
    color: #73847c;
    font-size: .84rem;
    line-height: 1.5;
}

.tad-link-cate-panel-toggle,
.tad-link-cate-more {
    appearance: none;
    border: 1px solid rgba(55, 91, 74, .16);
    border-radius: 999px;
    background: #f6fbf7;
    color: #315342;
    cursor: pointer;
    font-size: .82rem;
    font-weight: 800;
    line-height: 1;
    padding: 8px 12px;
    white-space: nowrap;
}

.tad-link-cate-panel-toggle:hover,
.tad-link-cate-more:hover {
    background: #eaf5ed;
    color: #17382c;
}

.tad-link-cate-select-source {
    display: none !important;
}

.tad-link-cate-clean {
    display: grid;
    gap: 8px;
}

.tad-link-cate-item {
    display: flex;
    align-items: center;
    justify-content: space-between;
    min-height: 40px;
    padding: 9px 12px;
    border: 1px solid rgba(55, 91, 74, .12);
    border-radius: 14px;
    background: #fbfdfb;
    color: #31483e;
    font-size: .94rem;
    font-weight: 700;
    line-height: 1.45;
    text-decoration: none !important;
    transition: background .16s ease, border-color .16s ease, color .16s ease, transform .16s ease;
}

.tad-link-cate-item:hover {
    background: #edf7ee;
    border-color: rgba(55, 91, 74, .26);
    color: #183a2e;
    transform: translateX(2px);
}

.tad-link-cate-item.is-active {
    background: #375b4a;
    border-color: #375b4a;
    color: #fff;
    box-shadow: 0 8px 20px rgba(55, 91, 74, .18);
}

.tad-link-cate-clean.is-collapsed .tad-link-cate-item.is-extra {
    display: none;
}

.tad-link-cate-more {
    display: block;
    width: 100%;
    margin-top: 10px;
}

.tad-link-cate-legacy-source.is-hidden-by-clean-nav {
    display: none !important;
}

.tad-link-cate-legacy-source.is-visible-fallback {
    display: block;
}

/* fallback：若舊 zTree 必須顯示，也先把圖示/樹線壓簡化 */
.tad-link-cate-legacy-source .ztree {
    margin: 0 !important;
    padding: 0 !important;
    list-style: none !important;
}

.tad-link-cate-legacy-source .ztree li {
    list-style: none !important;
    margin: 0 0 6px 0 !important;
    padding: 0 !important;
}

.tad-link-cate-legacy-source .ztree li span.button,
.tad-link-cate-legacy-source .ztree li span.ico_open,
.tad-link-cate-legacy-source .ztree li span.ico_close,
.tad-link-cate-legacy-source .ztree li span.ico_docu {
    opacity: .45;
}

.tad-link-cate-legacy-source .ztree li a {
    display: inline-flex !important;
    align-items: center;
    min-height: 34px;
    padding: 6px 8px !important;
    border-radius: 12px;
    color: #31483e !important;
    line-height: 1.45 !important;
}

.tad-link-cate-legacy-source .ztree li a:hover {
    background: #edf7ee !important;
    color: #17382c !important;
}

@media (max-width: 900px) {
    .tad-link-side-card {
        position: static;
    }

    .tad-link-cate-panel-toggle {
        display: inline-flex;
    }
}

@media (max-width: 768px) {
    .tad-link-side-head {
        align-items: center;
    }

    .tad-link-cate-item {
        min-height: 38px;
        font-size: .92rem;
    }
}
