@media screen and (max-width: 991.98px) {
  /*台新天地*/
  body {
    padding-top: 60px;
    font-size: 16px;
    line-height: 28px;
    word-break: break-all;
    overflow-wrap: anywhere;
  }
  .bg-header {
    width: 100%;
    height: 60px;
  }
  .navbar {
    margin-top: -60px;
  }
  .ts-logo {
    width: 220px;
    position: relative;
    top: -1px;
  }
  .bg-md-black {
    background-color: rgba(0, 0, 0, 0.7);
  }
  .pt-1 {}
  .navbar-nav {
  margin-top: 4px;
  }
  .nav-item {
  padding: 0px 0;
  border-bottom: 1px solid #666;
  }
  /*內容*/
  .navbar-nav {
  display: block;
  }
  .btn-side {
    width: 100%;
    height: 60px;
    text-align: center;
    border-radius: 0px;
    position: fixed;
    right: 0;
    top: auto;
    bottom: 0;
    z-index: 999;
    background-color: rgba(0, 0, 0, 0.7);
  }
  .btn-side span {
    line-height: 40px;
  }

  .container {
    max-width: 100%;
  }

  /*漢堡選單展開樣式*/
  .menu-bar.navbar {
    min-height: 0;
    height: 0;
    padding: 0;
    align-items: stretch;
  }
  .menu-bar .navbar-collapse {
    position: fixed;
    top: 60px;
    left: 0;
    right: 0;
    width: 100% !important;
    max-height: none;
    margin: 0;
    z-index: 1040;
    border-top: 0;
  }
  .menu-bar .menu {
    width: 100%;
    background-color: rgba(0, 0, 0, 0.7);
  }
  .menu-bar .menu .nav.nav-tabs {
    flex-direction: column;
    width: 100%;
  }
  .menu-bar .menu .nav-item {
    width: 100%;
    flex: 0 0 auto;
    border-bottom: 1px solid #666;
  }
  .menu-bar .menu .nav-link {
    width: 100%;
    color: #fff !important;
    border: 0 !important;
    border-radius: 0;
    text-align: center;
    font-size: 18px;
  }
  .menu-bar .menu .nav-link:visited {
    color: #fff !important;
  }
  .menu-bar .menu .nav-link:hover,
  .menu-bar .menu .nav-link:focus {
    color: #fff !important;
    background-color: rgba(255, 255, 255, 0.12);
  }
  .menu-bar .menu .nav-link:hover:visited,
  .menu-bar .menu .nav-link:focus:visited {
    color: #fff !important;
  }
  .menu-bar .menu .nav-link.active {
    color: #fff !important;
    background-color: rgba(255, 255, 255, 0.2);
  }

  /*客戶權益：有漢堡選單時改用常駐下拉選單*/
  .menu-link-with-icon .rights-main-caret {
    display: none;
  }
  .rights-panel-toggle {
    display: none;
  }
  #myTabContent,
  #rights,
  #rights .box,
  #rights .box-rights {
    overflow: visible;
  }
  .rights-select-wrap {
    display: block;
    position: sticky;
    top: 60px;
    z-index: 1020;
    width: 100%;
    margin-bottom: 24px;
    padding-top: 8px;
    padding-bottom: 8px;
    background-color: #fff;
    box-sizing: border-box;
  }
  .rights-select-wrap.is-stuck {
    background-color: transparent;
    border-bottom: 0;
    box-shadow: none;
  }
  .rights-select-wrap.is-stuck::before {
    content: '';
    position: fixed;
    top: 60px;
    left: 0;
    right: 0;
    height: var(--rights-select-h, 70px);
    background-color: rgba(0, 0, 0, 0.7);
    z-index: 0;
    pointer-events: none;
  }
  .rights-select-wrap.is-stuck.is-open::before {
    height: auto;
    bottom: 0;
    pointer-events: auto;
  }
  .rights-select {
    display: block;
    position: relative;
    width: 100%;
    max-width: 100%;
    margin-bottom: 0;
    z-index: 20;
    box-sizing: border-box;
  }
  .rights-select-toggle {
    display: flex;
    align-items: center;
    justify-content: space-between;
    width: 100%;
    max-width: 100%;
    box-sizing: border-box;
    padding: 12px 16px;
    background-color: #f0f0f0;
    border: 1px solid #e0e0e0;
    border-radius: 8px;
    color: #333;
    font-weight: bold;
    text-decoration: none;
    cursor: pointer;
  }
  .rights-select-toggle .bi-caret-down-fill,
  .rights-select-toggle .bi-caret-up-fill {
    font-size: 0.85em;
  }
  .rights-select-toggle .bi-caret-up-fill {
    display: none;
  }
  .rights-select-toggle.show .bi-caret-down-fill {
    display: none;
  }
  .rights-select-toggle.show .bi-caret-up-fill {
    display: inline-block;
  }
  .rights-select-menu {
    position: absolute !important;
    top: 100% !important;
    right: 0 !important;
    bottom: auto !important;
    left: 0 !important;
    transform: none !important;
    width: 100% !important;
    min-width: 100% !important;
    max-width: 100%;
    box-sizing: border-box;
    margin: 0;
    padding: 0;
    border: 1px solid #e0e0e0;
    border-radius: 8px;
    overflow: hidden;
    display: block !important;
    max-height: 0;
    opacity: 0;
    visibility: hidden;
    border-width: 0;
    z-index: 21;
    transition: max-height 0.35s ease, opacity 0.35s ease, visibility 0.35s, margin 0.35s ease, border-width 0.35s ease;
  }
  .rights-select-menu.show {
    max-height: calc(5.5 * (1.5em + 24px));
    opacity: 1;
    visibility: visible;
    margin-top: 8px;
    border-width: 1px;
  }
  .rights-select-scroll {
    list-style: none;
    margin: 0;
    padding: 0;
    max-height: calc(5.5 * (1.5em + 24px) - 2px);
    overflow-y: auto;
  }
  .rights-select-scroll::-webkit-scrollbar {
    -webkit-appearance: none;
    width: 8px;
  }
  .rights-select-scroll::-webkit-scrollbar-track {
    background-color: transparent;
  }
  .rights-select-scroll::-webkit-scrollbar-thumb {
    background-color: rgba(0, 0, 0, 0.3);
    border-radius: 4px;
  }
  .rights-select-menu::after {
    content: '';
    position: absolute;
    left: 0;
    right: 0;
    bottom: 0;
    height: 48px;
    background: linear-gradient(to bottom, rgba(255,255,255,0), rgba(255,255,255,0.95));
    pointer-events: none;
  }
  .rights-select-menu.at-bottom::after {
    display: none;
  }
  .rights-select-menu .dropdown-item {
    padding: 12px 16px;
    font-weight: bold;
  }
  .rights-select-menu .dropdown-item.active {
    background-color: var(--rightsBlue);
    color: #fff;
  }
  .rights-content-box {
    padding: 0;
    border: 0;
    border-radius: 0;
    background-color: transparent;
  }
  
  
  .box {
padding: 40px 20px;
}
  h4 {
    font-size: 20px;
  }
  .box-announcement p strong {
    font-size: 20px;
  }
  .txt-tile {
    font-size: 18px;
    scroll-margin-top: 140px;
  }
  .txt-tile-anchor-nav {
    gap: 6px 16px;
    margin-bottom: 16px;
  }
  h4 + .txt-tile-anchor-nav {
    margin-top: -12px;
  }
  .txt-tile-anchor-btn {
    font-size: 18px;
    white-space: normal;
  }
  .txt-tile-toggle {
    margin-top: 24px;
    padding-bottom: 10px;
  }
  .txt-tile-section:first-child .txt-tile-toggle {
    margin-top: 16px;
  }
  .txt-tile-section-body {
    padding-top: 12px;
    overflow: visible;
  }

  /* 原 18px 內文改為 16px（漢堡選單、.txt-tile 維持 18px） */
  .txt-18,
  h6,
  .box-qrcode p,
  .table-striped,
  .branch td,
  .txt-table td {
    font-size: 16px;
    line-height: 28px;
  }
  .warning strong {
    font-size: 16px !important;
  }
  .txt-table-2,
  .txt-table-2 td {
    font-size: 15px;
    line-height: 24px;
  }
  .id-code-map .id-code-letter,
  .id-code-map .id-code-num {
    line-height: 24px;
  }
  .txt-ps {
    font-size: 13px;
    line-height: 20px;
  }

  /* 基本公告事項：QR 改為「一、」列表文字，不顯示圖 */
  #rights-item1 .box-qrcode {
    counter-reset: qr-item;
    margin-top: 0;
    margin-left: 36px;
    padding-left: 0;
  }
  #rights-item1 .box-qrcode li {
    display: block;
    width: auto;
    margin-bottom: 0;
    text-align: left;
    vertical-align: baseline;
    font-size: 16px;
    line-height: 28px;
    counter-increment: qr-item;
  }
  #rights-item1 .box-qrcode li::before {
    content: counter(qr-item, cjk-ideographic) "、";
    display: inline-block;
    width: 36px;
    margin-left: -36px;
    white-space: nowrap;
  }
  #rights-item1 .box-qrcode img,
  #rights-item1 .box-qrcode br {
    display: none;
  }
  #rights-item1 .box-qrcode p {
    display: inline;
    text-align: left;
    margin: 0;
    font-size: 16px;
    line-height: 28px;
  }
  #rights-item1 .box-qrcode li a {
    position: static;
    display: inline;
    color: #d70c18;
    font-weight: normal;
  }
  #rights-item1 .box-qrcode li a:hover,
  #rights-item1 .box-qrcode li a:hover p {
    font-weight: normal;
    color: #d70c18;
  }
  #rights-item1:has(.box-qrcode li:hover) .box-qrcode li:not(:hover) a::after {
    content: none;
  }
  /* 十一、十二、比照其他頁改用較寬編號（.txt-list-fourth） */
  #rights-item1 .box-qrcode.txt-list-fourth {
    counter-reset: qr-item 10;
    margin-left: 45px;
  }
  #rights-item1 .box-qrcode.txt-list-fourth li::before {
    width: 60px;
    margin-left: -60px;
    text-align: right;
  }
  /* 線上服務改為 (一)、(二)，比照 .txt-list-second */
  #rights-item1 .box-qrcode.txt-list-second {
    counter-reset: qr-sub;
    margin-left: 72px;
  }
  #rights-item1 .box-qrcode.txt-list-second li {
    counter-increment: qr-sub;
  }
  #rights-item1 .box-qrcode.txt-list-second li::before {
    content: "(" counter(qr-sub, cjk-ideographic) ")";
    width: 36px;
    margin-left: -36px;
    text-align: left;
  }

  /* 客戶權益：合併前／合併後改為左右切換頁籤 */
  .rights-compare-tabs {
    display: flex;
    gap: 8px;
    margin: 0 0 12px;
  }
  .rights-compare-tab {
    flex: 1;
    padding: 10px 8px;
    border: 1px solid #e0e0e0;
    border-radius: 30px;
    background-color: #f0f0f0;
    color: #333;
    font-size: 16px;
    font-weight: bold;
    line-height: 1.3;
    cursor: pointer;
  }
  .rights-compare-tab.is-active {
    background-color: #fff;
    border-color: #F0989D;
    color: #d70c18;
  }
  .rights-compare-wrap.is-before .compare-col-after,
  .rights-compare-wrap.is-after .compare-col-before {
    display: none;
  }
  .rights-compare-wrap {
    max-width: 100%;
  }
  .rights-compare-wrap.has-item-col > table.txt-table > tbody {
    table-layout: fixed;
  }
  .rights-compare-wrap.has-item-col td.compare-col-keep {
    width: 15%;
    overflow: visible;
  }
  /* 左欄需容納 Mastercard、Facebook 等英文單字整詞 */
  .rights-compare-wrap.has-item-col:has(table.txt-table-en-col) > table.txt-table > tbody {
    table-layout: auto;
  }
  .rights-compare-wrap.has-item-col:has(table.txt-table-en-col) td.compare-col-keep,
  table.txt-table-en-col td.list-title-grey {
    width: 42%;
    min-width: 10em;
    overflow-wrap: anywhere;
    word-break: break-all;
  }
  .rights-compare-wrap.has-item-col:has(table.txt-table-en-col) td.compare-col-before,
  .rights-compare-wrap.has-item-col:has(table.txt-table-en-col) td.compare-col-after {
    width: 58%;
  }
  /* 服務項目欄（非灰底白字、非紅底白字）：置左上；不強制斷行，寬度不夠才自動換行 */
  .txt-table td.compare-col-keep:not(.list-title-grey):not(.list-title-red) {
    text-align: left !important;
    vertical-align: top !important;
    white-space: normal;
    overflow-wrap: anywhere;
    word-break: break-all;
  }
  .txt-table td.compare-col-keep:not(.list-title-grey):not(.list-title-red) br {
    display: none;
  }
  /* 深灰／紅／粉紅底與據點標題列：垂直置中 */
  .txt-table tr.list-title-red > td,
  .txt-table td.list-title-red,
  .txt-table-2 tr.list-title-red > td,
  .txt-table-2 td.list-title-red,
  .txt-table td.list-title-grey,
  .txt-table tr.list-title-grey > td,
  .txt-table-2 td.list-title-grey,
  .txt-table-2 tr.list-title-grey > td,
  .txt-table td.list-title-pink,
  .txt-table tr.list-title-pink > td,
  .txt-table-2 td.list-title-pink,
  .txt-table-2 tr.list-title-pink > td,
  .branch-title-g,
  .branch-title-r,
  .branch-subtitle-g,
  .branch-subtitle-r {
    text-align: center !important;
    vertical-align: middle !important;
  }
  /* 灰底白字欄：不使用 br 強制斷行，改依欄寬自動換行 */
  .txt-table td.list-title-grey,
  .txt-table tr.list-title-grey > td,
  .txt-table-2 td.list-title-grey,
  .txt-table-2 tr.list-title-grey > td {
    white-space: normal;
  }
  /* 全站表格內文一律置上；深灰／紅／粉紅底標題欄維持置中 */
  table td:not(.list-txt-vm):not(.list-title-red):not(.list-title-pink):not(.list-title-grey):not(.list-title-grey3):not(.list-title-grey2):not(.branch-title-g):not(.branch-title-r):not(.branch-subtitle-g):not(.branch-subtitle-r),
  table th:not(.list-txt-vm):not(.list-title-red):not(.list-title-pink):not(.list-title-grey):not(.list-title-grey3):not(.list-title-grey2):not(.branch-title-g):not(.branch-title-r):not(.branch-subtitle-g):not(.branch-subtitle-r) {
    vertical-align: top !important;
  }
  .txt-table td.list-title-grey br,
  .txt-table tr.list-title-grey > td br,
  .txt-table-2 td.list-title-grey br,
  .txt-table-2 tr.list-title-grey > td br {
    display: none;
  }
  .txt-table td.list-title-grey i,
  .txt-table tr.list-title-grey > td i,
  .txt-table-2 td.list-title-grey i,
  .txt-table-2 tr.list-title-grey > td i {
    font-size: 20px !important;
  }
  .txt-table td.list-title-grey img,
  .txt-table tr.list-title-grey > td img,
  .txt-table-2 td.list-title-grey img,
  .txt-table-2 tr.list-title-grey > td img {
    width: 20px !important;
    height: 20px !important;
  }
  .rights-compare-wrap.has-item-col td.compare-col-before,
  .rights-compare-wrap.has-item-col td.compare-col-after {
    width: 85%;
  }
  .rights-compare-wrap > table.txt-table > tbody > tr:first-child {
    display: none;
  }

  /* 所有表格超出視窗寬度時，顯示左右拉霸可滑動 */
  table.txt-table,
  table.txt-table-2:not(.id-code-map),
  table.branch,
  .branch-table-wrap {
    max-width: 100%;
    overflow-x: auto;
    overflow-y: hidden;
    -webkit-overflow-scrolling: touch;
    overscroll-behavior-x: contain;
    scrollbar-width: thin;
    scrollbar-color: #b3b3b3 #f0f0f0;
  }
  table.txt-table,
  table.txt-table-2:not(.id-code-map),
  table.branch {
    display: block;
    width: 100%;
    padding-bottom: 6px;
  }
  table.txt-table::-webkit-scrollbar,
  table.txt-table-2:not(.id-code-map)::-webkit-scrollbar,
  table.branch::-webkit-scrollbar,
  .branch-table-wrap::-webkit-scrollbar {
    -webkit-appearance: none;
    height: 8px;
  }
  table.txt-table::-webkit-scrollbar-track,
  table.txt-table-2:not(.id-code-map)::-webkit-scrollbar-track,
  table.branch::-webkit-scrollbar-track,
  .branch-table-wrap::-webkit-scrollbar-track {
    background-color: #f0f0f0;
    border-radius: 8px;
  }
  table.txt-table::-webkit-scrollbar-thumb,
  table.txt-table-2:not(.id-code-map)::-webkit-scrollbar-thumb,
  table.branch::-webkit-scrollbar-thumb,
  .branch-table-wrap::-webkit-scrollbar-thumb {
    background-color: #b3b3b3;
    border-radius: 8px;
  }
  table.txt-table > tbody,
  table.txt-table-2:not(.id-code-map) > tbody,
  table.branch > tbody {
    display: table;
    width: 100%;
    min-width: 680px;
  }
  /* 單一欄表格：不加左右拉霸，內容往下完整呈現 */
  table.txt-table:not(:has(> tbody > tr > td:nth-child(2))) > tbody,
  table.txt-table-2:not(.id-code-map):not(:has(> tbody > tr > td:nth-child(2))) > tbody,
  .rights-compare-wrap > table.txt-table > tbody {
    min-width: 100%;
  }
  /* 對照表切換後只剩單一內容欄：撐滿寬度並自動換行 */
  .rights-compare-wrap:not(.has-item-col) td.compare-col-before,
  .rights-compare-wrap:not(.has-item-col) td.compare-col-after {
    width: 100%;
  }
  /* 旅行平安險：取消 5%/10%/100% 固定欄寬，依內容調整 */
  .rights-compare-wrap.has-item-col > table.travel-ins-table > tbody,
  .rights-compare-wrap > table.travel-ins-table > tbody,
  table.travel-ins-table > tbody {
    table-layout: auto;
    min-width: 100%;
    width: 100%;
  }
  .rights-compare-wrap.has-item-col > table.travel-ins-table td.compare-col-keep,
  .rights-compare-wrap.has-item-col > table.travel-ins-table td.compare-col-before,
  .rights-compare-wrap.has-item-col > table.travel-ins-table td.compare-col-after,
  .rights-compare-wrap:not(.has-item-col) > table.travel-ins-table td.compare-col-before,
  .rights-compare-wrap:not(.has-item-col) > table.travel-ins-table td.compare-col-after,
  table.travel-ins-table td {
    width: auto !important;
  }
  /* 險種／金額欄：給足夠最小寬，避免被卡名欄擠成一窄條 */
  table.travel-ins-table td[width="5%"],
  table.travel-ins-table td[width="10%"] {
    min-width: 5.5em;
  }
  table.travel-ins-table td[width="15%"] {
    min-width: 5.5em;
  }
  table.travel-ins-table td[width="20%"] {
    min-width: 7em;
  }
  /* 淺灰卡名欄：兩欄時維持橫書，不因欄窄變成一字一行 */
  table.travel-ins-table td.list-title-grey3 {
    word-break: break-all;
    overflow-wrap: anywhere;
    min-width: 7em;
  }
  /* 巢狀表格：不強制最小寬，內容超出儲存格時才出現拉霸 */
  table table.txt-table > tbody,
  table table.txt-table-2:not(.id-code-map) > tbody {
    min-width: 100%;
  }
  /* 分行據點表：由外層容器負責橫向拉霸 */
  .branch-table-wrap > table.branch {
    display: table;
    overflow: visible;
    width: 100%;
    min-width: 720px;
    padding-bottom: 0;
  }
  .branch-table-wrap > table.branch > tbody {
    display: table-row-group;
    min-width: 0;
  }
  /* 身分證代碼對照維持自動折行，不改橫向滑動 */
  table.id-code-map {
    display: grid;
    overflow: visible;
    max-width: 100%;
    padding-bottom: 0;
  }
  table.id-code-map > tbody {
    display: contents;
    min-width: 0;
  }
  
  
  
  
  
  
  
  
  
  
  
  
  
  
}

@media screen and (max-width: 768px) {
  .container {
    max-width: 100%;
  }
  .footer-bg {
    height: 25px;
  }
  .footer-bg-box {
    height: 25px;
  }
  .footer-box {
    color: #fff;
    margin-top: -25px;
  }
  .copyright-box {
    height: 25px;
  }
  .floating-action-btn {
    right: 12px;
    bottom: 24px;
    width: 64px;
    height: 64px;
  }
  .floating-chat {
    bottom: 24px;
    padding: 0;
  }
  .floating-chat img {
    width: 64px;
    height: 64px;
  }
  .go-top {
    width: 48px;
    height: 48px;
    font-size: 1.25rem;
    right: 22px;
    bottom: 104px;
  }
}

@media screen and (max-width: 768px) {
  .branch-search-row {
    align-items: stretch;
  }
  .branch-search {
    max-width: none;
    flex: 1 1 auto;
  }
  .branch td {
    font-size: 16px;
    padding: 8px 10px;
  }
  table.txt-table > tbody,
  table.txt-table-2:not(.id-code-map) > tbody,
  table.branch > tbody {
    min-width: 640px;
  }
  table.txt-table:not(:has(> tbody > tr > td:nth-child(2))) > tbody,
  table.txt-table-2:not(.id-code-map):not(:has(> tbody > tr > td:nth-child(2))) > tbody,
  .rights-compare-wrap > table.txt-table > tbody,
  table.travel-ins-table > tbody {
    min-width: 100%;
  }
  table table.txt-table > tbody,
  table table.txt-table-2:not(.id-code-map) > tbody {
    min-width: 100%;
  }
  .branch-table-wrap > table.branch {
    min-width: 680px;
  }
}
