﻿body[invalid]:has(.doc-header--files) :where(.header) {
    background: #FCEDEF;
}
body[invalid]:has(.doc-header--files) :where(.doc-header__title) {
    background: #CB0D62;
}
body[invalid] .doc-header--files {
    border-top: 5px solid #CB0D62;
}
body[filecabinet]:has(.doc-header--files) :where(.header) {
    background: #FFE2A3;
}
body[filecabinet]:has(.doc-header--files) :where(.doc-header__title) {
    background: #F4BF4D;
}
body[filecabinet] .doc-header--files {
    border-top: 5px solid #F4BF4D;
}
body[filecabinet] .is-save {
    background: #F4BF4D
}
body[trash]:has(.doc-header--files) :where(.header) {
    background: #ADB1B5;
}
body[trash]:has(.doc-header--files) :where(.doc-header__title) {
    background: #8B96A3;
}
body[trash]:has(.doc-header--files) :where(.inner_navbar) {
    color: #FFFFFF;
}
body[trash] .doc-header--files {
    border-top: 5px solid #8B96A3;
}
body[trash] .is-recover {
    background: #8B96A3
}
body[invalid]:has(.header_wrap) :where(.header) {
    background: #FA8586;
    color: #ffffff;
}
body[invalid]:has(.toolbar__controls[sign]) :where(.toolbar) {
    background: #FCEDEF;
}
body[invalid]:has(.toolbar__controls[sign]) .brand--logo {
    content: url("../img/fastsign_logo_white.svg");
}
body[verify]:has(.doc-header--files) :where(.header) {
    background: #AE4FD6;
}
body[verify]:has(.doc-header--files) :where(.doc-header__title) {
    background: #9519CA;
}
body[verify]:has(.doc-header--files) :where(.inner_navbar) {
    color: #FFFFFF;
}
body[verify] .doc-header--files {
    border-top: 5px solid #9519CA;
}

.header .inner_navbar__right button,
.header .inner_navbar__right button .btn__text {
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.btn-danger {
    color: #fff;
    background-color: #dc3545;
    border-color: #dc3545;

    padding: 6px 16px;
    border-radius: 8px;
    font-size: 14px;
    line-height: 1.4;
    font-weight: 500;

    display: inline-flex;
    align-items: center;
    justify-content: center;

    transition:
        background-color 0.2s ease,
        border-color 0.2s ease,
        box-shadow 0.2s ease,
        transform 0.15s ease;
}
.btn-danger:hover {
    color: #fefefe;
    background-color: #e75462;
    border-color: #e75462;
    box-shadow: 0 3px 8px rgba(220, 53, 69, 0.35);
    transform: translateY(-1px);
}
.btn-danger:active {
    background-color: #c82333;
    border-color: #c82333;
    transform: translateY(0);
    box-shadow: 0 1px 3px rgba(220, 53, 69, 0.25);
}
.btn-danger:disabled,
.btn-danger[disabled] {
    opacity: .6;
    cursor: not-allowed;
    box-shadow: none;
    transform: none;
}

.important {
    font-weight: bold;
    color: red;
    font-size: 110%;
}

div[data-dialog="signPanel"] .dialog__content {
    height: 100%;
    width: 100%;
    max-height: 1440px;
}
div[data-dialog="signPanel"] .dialog__content .dialog__body .sign-panel,
div[data-dialog="signPanel"] .dialog__content .dialog__body .sign-panel .cg-signature-board,
div[data-dialog="signPanel"] .dialog__content .dialog__body .sign-panel .cg-signature-board .content {
    height: 100%;
}

[required] {
    position: relative;
    padding-left: 0.8em; /* 給星號一點空間 */
}
[required]::before {
  content: "*";
  position: absolute;
  left: 0;              /* 控制水平位置 */
  top: 0;               /* 控制垂直位置 */
  color: red;
  font-weight: bold;
  font-size: 1em;       /* 可以依字體微調大小 */
  line-height: 1;       /* 防止偏移 */
}
[required-blue] {
    position: relative;
    padding-left: 0.9em; /* 給星號一點空間 */
}
[required-blue]::before {
  content: "•";
  position: absolute;
  left: 0;              /* 控制水平位置 */
  top: 14px;               /* 控制垂直位置 */
  color: blue;
  font-weight: bold;
  font-size: 1em;       /* 可以依字體微調大小 */
  line-height: 1;       /* 防止偏移 */
}

.toggle-switch__btn.is-button:hover {
    background-color: #1cb3ff;
    color: #fff;
    border-radius: 8px;
}

.main__content[edit],
.main__content[sign],
.main__content[trash] {
    padding: 4px 4px 7px 4px !important;
    background-color: #616161;
}
.main__content[edit] .page__content,
.main__content[sign] .page__content,
.main__content[trash] .page__content {
    padding-top: 0px;
}

input[isInvalid] {
    border-color: #FF0000 !important;
}

.inpBox[isInvalid] {
    border-color: #FF0000 !important;
}

.delete-info .comment__header .comment__title .comment__reply-tag,
.delete-info .comment__header .comment__title .comment__nickname {
    color: #C0C0C0 !important;
}
.delete-info .comment__header .comment__time,
.delete-info .comment__meta .comment__meta-item {
    color: #D5D6D8 !important;
}
.delete-info .comment__body {
    color: #FE7FB4 !important;
}

.option-item__col:hover {
    background-color: #ecedf0;
}

.text-decoration-hover:hover {
    text-decoration: underline;
    cursor: pointer;
}

:disabled {
    opacity: .6;
    cursor: not-allowed;
}

button[data-position]::before,
.btn[data-position]::before {
    color: currentColor !important;
}

.single-line-ellipsis {
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

[is-self] {
    color: #3E63A3
}

.slide-control {
    position: absolute !important;
    z-index: 2;
    margin-top: 2px;
}
.slide-control button:hover {
    border-color: #0094ff
}

.image-viewer-container {
    position: relative;
    z-index: 0;
    box-shadow: black 0px 0px 10px;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    height: 100%;
    width: 100%;
    flex-grow: 1;
    gap: 0px;
    padding: 0px;
}
.image-viewer-container img { display: none; }
.image-viewer-container .image-viewer-content {
    width: 100%;
    height: 100%;
    text-align: center;
    margin-left: auto;
    margin-right: auto;
    z-index: 1;
}

.cgimage-textarea {
    position: absolute;
    box-shadow: 4px 4px 4px rgba(51,51,102,0.4);
    border-radius: 12px;
    padding: 5px 10px 5px 10px;
    z-index: 2;
    border: 1px #00BFFF solid;
    background-color: #F4FBFF;
}
.cgimage-textarea img {
    height: 42px;
    width: 42px;
    cursor: pointer;
    margin: 5px;
    border-radius: 100%;
    float: left;
}
.cgimage-textarea img:hover {
    background-color: #3573EF;
    box-shadow: 0px 0px 15px rgba(60, 190, 255, 1);
}
.cgimage-tool .horizontal-edit img {
    height: 36px;
    width: 36px;
}
.cgimage-textarea-vertical {
    width: 62px;
    padding: 5px;
}
.cgimage-textarea-vertical img {
    width: 42px;
    height: 42px;
}
.cgimage-tool .vertical-edit {
    width: 56px!important;
}
.cgimage-tool .vertical-edit img {
    width: 36px !important;
    height: 36px !important;
}

.mwt_border_base {
    position: absolute;
    z-index: 999998;
}
.mwt_border_bottom {
    background-color: #132F63;
    position: relative;
    padding: 10px;
    color: #fff;
    border-radius: 5px;
    box-shadow: 1px 2px 2px rgba(20%,20%,40%,0.2);
    text-align: left;
}
.mwt_border_bottom:after {
    position: absolute;
    content: "";
    top: -14px;
    left: 0%;
    transform: translateX(50%);
    width: 0;
    height: 0;
    border-width: 7px;
    border-style: solid;
    border-bottom-color: #132F63;
    border-right-color: transparent;
    border-top-color: transparent;
    border-left-color: transparent;
}
.mwt_border_top {
    background-color: #132F63;
    position: relative;
    padding: 10px;
    color: #fff;
    border-radius: 5px;
    box-shadow: 1px 2px 2px rgba(20%,20%,40%,0.2);
    text-align: left;
}
.mwt_border_top:after {
    position: absolute;
    content: "";
    bottom: -14px;
    left: 0%;
    transform: translateX(50%);
    width: 0;
    height: 0;
    border-width: 7px;
    border-style: solid;
    border-bottom-color: transparent;
    border-right-color: transparent;
    border-top-color: #132F63;
    border-left-color: transparent;
}
.mwt_anew {
    background-color: #008800;
}
.mwt_reject {
    background-color: rgba(255, 0, 0, 1);
}
.mwt_delete {
    background-color: rgba(232, 49, 71, 1);
}
.mwt_keep {
    background-color: #871FB3;
}
.mwt_required {
    background-color: rgba(4, 58, 234, 0.9);
}

.cgprompt_base {
    position: absolute;
    z-index: 99999999;
}
.cgprompt_bottom_left {
    background-color: #132F63;
    position: relative;
    padding: 10px;
    color: #fff;
    border-radius: 5px;
    box-shadow: 1px 2px 2px rgba(20%,20%,40%,0.2);
    text-align: left;
}
.cgprompt_bottom_left:after {
    position: absolute;
    content: "";
    top: -14px;
    left: 0%;
    transform: translateX(50%);
    width: 0;
    height: 0;
    border-width: 7px;
    border-style: solid;
    border-bottom-color: #132F63;
    border-right-color: transparent;
    border-top-color: transparent;
    border-left-color: transparent;
}
.cgprompt_bottom_right {
    background-color: #132F63;
    position: relative;
    padding: 10px;
    color: #fff;
    border-radius: 5px;
    box-shadow: 1px 2px 2px rgba(20%,20%,40%,0.2);
    text-align: left;
}
.cgprompt_bottom_right:after {
    position: absolute;
    content: "";
    top: -14px;
    right: 10%;
    transform: translateX(50%);
    width: 0;
    height: 0;
    border-width: 7px;
    border-style: solid;
    border-bottom-color: #132F63;
    border-right-color: transparent;
    border-top-color: transparent;
    border-left-color: transparent;
}
.cgprompt_top_left {
    background-color: #132F63;
    position: relative;
    padding: 10px;
    color: #fff;
    border-radius: 5px;
    box-shadow: 1px 2px 2px rgba(20%,20%,40%,0.2);
    text-align: left;
}
.cgprompt_top_left:after {
    position: absolute;
    content: "";
    bottom: -14px;
    left: 0%;
    transform: translateX(50%);
    width: 0;
    height: 0;
    border-width: 7px;
    border-style: solid;
    border-bottom-color: transparent;
    border-right-color: transparent;
    border-top-color: #132F63;
    border-left-color: transparent;
}
.cgprompt_top_right {
    background-color: #132F63;
    position: relative;
    padding: 10px;
    color: #fff;
    border-radius: 5px;
    box-shadow: 1px 2px 2px rgba(20%,20%,40%,0.2);
    text-align: left;
}
.cgprompt_top_right:after {
    position: absolute;
    content: "";
    bottom: -14px;
    right: 10%;
    transform: translateX(50%);
    width: 0;
    height: 0;
    border-width: 7px;
    border-style: solid;
    border-bottom-color: transparent;
    border-right-color: transparent;
    border-top-color: #132F63;
    border-left-color: transparent;
}
.cgprompt_left_middle,
.cgprompt_left_top,
.cgprompt_left_bottom,
.cgprompt_right_middle,
.cgprompt_right_top,
.cgprompt_right_bottom {
    background-color: #132F63;
    position: relative;
    padding: 10px;
    color: #fff;
    border-radius: 5px;
    box-shadow: 1px 2px 2px rgba(20%,20%,40%,0.2);
    text-align: left;
}
.cgprompt_left_middle:after,
.cgprompt_left_top:after,
.cgprompt_left_bottom:after {
    position: absolute;
    content: "";
    top: 50%;
    right: -14px;
    transform: translateY(-50%);
    width: 0;
    height: 0;
    border-width: 7px;
    border-style: solid;
    border-top-color: transparent;
    border-right-color: transparent;
    border-bottom-color: transparent;
    border-left-color: #132F63;
}
.cgprompt_right_middle:after,
.cgprompt_right_top:after,
.cgprompt_right_bottom:after {
    position: absolute;
    content: "";
    top: 50%;
    left: -14px;
    transform: translateY(-50%);
    width: 0;
    height: 0;
    border-width: 7px;
    border-style: solid;
    border-top-color: transparent;
    border-right-color: #132F63;
    border-bottom-color: transparent;
    border-left-color: transparent;
}
.cgprompt_left_top:after,
.cgprompt_right_top:after {
    top: 25%;
    transform: translateY(-50%);
}
.cgprompt_left_bottom:after,
.cgprompt_right_bottom:after {
    top: 75%;
    transform: translateY(-50%);
}
.cgprompt_base .info {
    background-color: #132F63 !important;
    color: #fff !important;
}
.cgprompt_base .warning {
    background-color: #FFC107 !important;
    color: #212529 !important;
}
.cgprompt_base .warning_bottom:after {
    border-bottom-color: #FFC107 !important;
}
.cgprompt_base .warning_top:after {
    border-top-color: #FFC107 !important;
}
.cgprompt_base .danger {
    background-color: #DC3545 !important;
    color: #212529 !important;
}
.cgprompt_base .danger_bottom:after {
    border-bottom-color: #DC3545 !important;
}
.cgprompt_base .danger_top:after {
    border-top-color: #DC3545 !important;
}
.cgprompt_base .success {
    background-color: #28A745 !important;
    color: #fff !important;
}
.cgprompt_base .success_bottom:after {
    border-bottom-color: #28A745 !important;
}
.cgprompt_base .success_top:after {
    border-top-color: #28A745 !important;
}
.cgprompt_base .warning_left:after {
    border-left-color: #FFC107 !important;
}
.cgprompt_base .warning_right:after {
    border-right-color: #FFC107 !important;
}
.cgprompt_base .danger_left:after {
    border-left-color: #DC3545 !important;
}
.cgprompt_base .danger_right:after {
    border-right-color: #DC3545 !important;
}
.cgprompt_base .success_left:after {
    border-left-color: #28A745 !important;
}
.cgprompt_base .success_right:after {
    border-right-color: #28A745 !important;
}

.num {
    display: inline-grid;
    place-items: center;
    inline-size: 1.6em; /* ← 改小一點，控制圓的直徑 */
    aspect-ratio: 1; /* 保持正圓 */
    border-radius: 50%;
    background: #F2F7FF;
    color: #3E63A3;
    font-weight: 700;
    line-height: 1;
    font-variant-numeric: tabular-nums;
    font-size: 0.85em; /* ← 數字字體大小，也可以微調 */
    border: 1px #3E63A3 solid;
    padding-bottom: 2px;
}
.num:has( :is()){} /* 無需理會：只是佔位避免 IDE 抱怨 */
.num.twodigits{ font-size: .9em; } /* 兩位數可加這類 */

.toggle-switch[data-toggle-switch] {
    height: calc(1.5em + 1.5rem + var(--bs-border-width) * 0);
    background-color: #efefef;
}
.toggle-switch[cust-data-toggle-switch] {
    height: calc(1.5em + 1.5rem + var(--bs-border-width) * 0);
    background-color: #fff;
    width: 75px;
}
.toggle-switch[cust-data-toggle-switch] button {
    background-color: #1cb3ff;
    color: #fff;
}
.toggle-switch[cust-data-toggle-switch] button[data-target="panel-invalid"] {
    background-color: #CB0D62;
    color: #fff;
}

.template-library__body {
    border: 0px;
}

.inner_navbar button img {
    width: 32px;
}

.co-browse-tool button[coBrowsing] {
    background-color: aliceblue;
    min-width: 70px;
    display: none;
}

.toolbar__controls .toolbar__viewer .co-browse-mobile-content {
    display: flex;
    align-items: center;
    gap: 8px;
}

.dialog-overlay[data-dialog="mobileInputDialog"] .dialog {
    min-height: 100%;
    height: 100%;
    margin: 0;              /* 拿掉上下 1.75rem 空隙 */
    align-items: stretch;   /* 讓內容可以撐滿垂直方向 */
    justify-content: stretch;
    transform: translateY(0);  /* 一開始就以滿版位置為基準 */
}
.dialog-overlay[data-dialog="mobileInputDialog"] .dialog__content {
    width: 100%;
    max-width: 100%;
    height: 100%;
    max-height: 100%;
    border-radius: 0;           /* 滿版不用圓角 */
    padding: 48px 16px 16px 16px;  /* 你可以再自己微調 */
    box-shadow: none;           /* 若有陰影可關掉，比較像原生全畫面 */
}
.dialog-overlay[data-dialog="mobileInputDialog"] .dialog__body {
    flex: 1 1 auto;
    display: flex;
    flex-direction: column;
    margin: 0;              /* 拿掉右邊的負 margin + border-right */
    padding: 8px 0 8px 0;   /* 視覺上留一點上下間距即可 */
    border-right: 0;
}
.dialog-overlay[data-dialog="mobileInputDialog"] .dialog__body .col-md-12 {
    flex: 1 1 auto;
    display: flex;
    flex-direction: column;
}
.dialog-overlay[data-dialog="mobileInputDialog"] .dialog__body textarea {
    flex: 1 1 auto;
    width: 100%;
    min-height: 0;      /* 避免被 flex 撐到奇怪高度 */
    resize: none;       /* 如果不想讓使用者拉大小，可以加這行 */
    font-size: 14px;    /* 自己調整舒適字級 */
    line-height: 1.5;
}
.dialog-overlay[data-dialog="mobileInputDialog"] .dialog__footer {
    padding-top: 8px;
    padding-bottom: 8px;
    justify-content: center;
}

.form-group {
  margin-bottom: 1rem;
}
.form-group label {
  display: inline-block;
  margin-bottom: .5rem;
}
.form-group .form-control {
  display: block;
  width: 100%;
  padding: .375rem .75rem;
  font-size: 1rem;
  line-height: 1.5;
  color: #495057;
  background-color: #fff;
  border: 1px solid #ced4da;
  border-radius: .25rem;
}

.video {
    background-color: #000;
    position: absolute;
    z-index: 9999!important;
    display: none;
}
.video video {
    display: none;
}
.video canvas {
    position: absolute;
    z-index: 9997;
}
.video .video-mask {
    position: absolute;
    background-color: transparent;
    z-index: 9998;
    width: 100%;
    height: 100%;
}
.video .video-mask .video-toolbar {
    position: absolute;
    width: 100%;
    bottom: 15px;
    display: flex;
    justify-content: center;
    gap: 20px;
    padding-bottom: 40px;
    pointer-events: auto;
}
.video .video-mask .video-close {
    font-size: 150%;
    color: #fff!important;
}
.video .video-mask .video-close:hover {
    font-weight: 400;
    color: #CDEAFE!important;
}

/* 區塊之間留一點距離 */
.dialog__body [block] + [block] {
    margin-top: 24px;
}
/* 標題列容器 */
.inner__title {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 12px;
}
/* 主要標題文字 */
.inner__title .text-heading-1 {
    position: relative;
    padding-left: 12px;
    font-size: 18px;
    font-weight: 700;
    color: #1A1A1A;
    line-height: 1.4;
}
/* 左側色條，讓它更像「段落標題」 */
.inner__title .text-heading-1::before {
    content: "";
    position: absolute;
    left: 0;
    top: 4px;
    width: 4px;
    height: 18px;
    border-radius: 2px;
    background-color: #3D7AFE; /* FastSIGN 藍，可依需要調整 */
}

.description .badge--red {
    display: none;
}
/* 只有 haveDescription="Y" 才顯示 */
.description[haveDescription="Y"] .badge--red {
    display: inline-block;
}

.link-group-divider > a:not(:first-child) {
    position: relative;
    padding-left: 12px;
    margin-left: 12px;
}
.link-group-divider > a:not(:first-child)::before {
    content: "";
    position: absolute;
    left: 0;
    top: 50%;
    transform: translateY(-50%);
    width: 1px;
    height: 14px;        /* 分隔線高度，可自行微調 */
    background-color: #ccc;
}

button[badge] {
    position: relative;
}
button[badge] .badge {
    position: absolute;
    top: -4px; /* 往上微調 */
    right: -6px; /* 往右微調 */
    z-index: 2;
    min-width: 0.9rem; /* 原本 1.25rem → 縮小 */
    height: 0.9rem;
    padding: 0 0.25em; /* 內距縮小 */
    font-size: 0.65rem; /* 字體變小 */
    line-height: 1;
    border-radius: 0.9rem;
}

.inpBox[isAgent]:has(.switch__item input:checked) {
    border-color: #72DBFE;
    background-color: #F9FAFA;
}

.slide-panel__title {
    display: flex;
    align-items: center;
    gap: 6px; /* 文字與 icon 的間距，可自行調整 */
}

.assignee-card {
    position: relative;
}

.assignee-card .agents {
    position: absolute;
    top: 12px;        /* 你可以自行微調 */
    right: 12px;      /* 你可以自行微調 */
    z-index: 5;
    display: flex;
    align-items: center;
    gap: 4px;
}

.dataTables_length,
.dataTables_info,
.dataTables_paginate,
.dataTables_filter {
    display: none !important;
}

/* 全域浮動通知（錯誤 / 警示） */
.page__content.cgnoty {
    position: fixed;
    top: 16px;          /* 距離視窗頂部 */
    left: 50%;
    transform: translateX(-50%);
    z-index: 20000;     /* 一定要高於 poplist / dialog */
    width: auto;
    max-width: 90vw;
    pointer-events: none; /* 不擋後面操作 */
}
/* 讓通知本體可以點（關閉按鈕） */
.page__content.cgnoty .ntf {
    pointer-events: auto;
}

#detail.slide-panel--left {
    width: 320px;
    max-width: 45vw;
    z-index: 2000;
}

.alias {
    cursor: alias;
}
.all-scroll {cursor: all-scroll;}
.auto {cursor: auto;}
.cell {cursor: cell;}
.context-menu {cursor: context-menu;}
.col-resize {cursor: col-resize;}
.copy {cursor: copy;}
.crosshair {cursor: crosshair;}
.default {cursor: default;}
.e-resize {cursor: e-resize;}
.ew-resize {cursor: ew-resize;}
.grab {cursor: -webkit-grab; cursor: grab;}
.grabbing {cursor: -webkit-grabbing; cursor: grabbing;}
.help {cursor: help;}
.move {cursor: move;}
.n-resize {cursor: n-resize;}
.ne-resize {cursor: ne-resize;}
.nesw-resize {cursor: nesw-resize;}
.ns-resize {cursor: ns-resize;}
.nw-resize {cursor: nw-resize;}
.nwse-resize {cursor: nwse-resize;}
.no-drop {cursor: no-drop;}
.none {cursor: none;}
.not-allowed {cursor: not-allowed;}
.pointer {cursor: pointer;}
a { cursor: pointer; }
.progress {cursor: progress;}
.row-resize {cursor: row-resize;}
.s-resize {cursor: s-resize;}
.se-resize {cursor: se-resize;}
.sw-resize {cursor: sw-resize;}
.text {cursor: text;}
.url {cursor: url(myBall.cur),auto;}
.w-resize {cursor: w-resize;}
.wait {cursor: wait;}
.zoom-in {cursor: zoom-in;}
.zoom-out {cursor: zoom-out;}

/* ===== 共同樣式（桌機 + 手機） ===== */
.cb-palette {
    position: absolute;
    left: 50%;
    top: 12px;
    transform: translateX(-50%);
    z-index: 9999;

    /* 初始隱藏，JS 用 .show() / .hide() 控制 */
    display: none;

    padding: 8px 14px;
    border-radius: 14px;
    background: rgba(255, 255, 255, 0.96);
    box-shadow: 0 6px 18px rgba(15, 23, 42, 0.28);
    backdrop-filter: blur(6px);

    font-size: 13px;
    line-height: 1.4;
    white-space: nowrap; /* 避免桌機時太早換行 */
}
/* 讓 palette 內每個區塊都視為「一個小模組」排在同一行 */
.cb-palette > .tool-container,
.cb-palette > .color,
.cb-palette > .pen,
.cb-palette > .size,
.cb-palette > hr {
    display: inline-flex;
    align-items: center;
    vertical-align: middle;
}
/* —— 工具按鈕區（返回 / 清除） —— */
.cb-palette .tool-container {
    gap: 6px;
    margin-right: 10px;
}
.cb-palette .co-browse-return-previous,
.cb-palette .co-browse-clear {
    width: 28px;
    height: 28px;
    border-radius: 999px;

    display: inline-flex;
    align-items: center;
    justify-content: center;

    background: #f3f4f6;
    color: #4b5563;
    cursor: pointer;

    transition: background 0.16s ease, transform 0.12s ease, box-shadow 0.16s ease;
    box-shadow: 0 0 0 rgba(0, 0, 0, 0);
    font-size: 14px;
}
/* icon 本體（無論是 Font Awesome 或自己塞 svg 背景都可以） */
.cb-palette .co-browse-return-previous i,
.cb-palette .co-browse-clear i {
    pointer-events: none;
}
/* hover 狀態 */
.cb-palette .co-browse-return-previous:hover:not([disabled]),
.cb-palette .co-browse-clear:hover:not([disabled]) {
    background: #e5e7eb;
    transform: translateY(-1px);
    box-shadow: 0 2px 6px rgba(148, 163, 184, 0.5);
}
/* disabled 狀態 */
.cb-palette .co-browse-return-previous[disabled],
.cb-palette .co-browse-clear[disabled] {
    opacity: .4;
    cursor: default;
    box-shadow: none;
}
/* —— 顏色選擇區 —— */
.cb-palette .color {
    gap: 6px;
    margin: 0 10px;
}
.cb-palette .color > div {
    width: 18px;
    height: 18px;
    border-radius: 999px;
    border: 2px solid #ffffff;
    box-shadow: 0 0 0 1px rgba(148, 163, 184, 0.7);

    cursor: pointer;
    transition: transform 0.12s ease, box-shadow 0.16s ease;
}
/* hover 效果 */
.cb-palette .color > div:hover {
    transform: translateY(-1px) scale(1.05);
    box-shadow: 0 2px 6px rgba(148, 163, 184, 0.9);
}
/* 被 coPaletteBox 標記為 is-active 的顏色 */
.cb-palette .color > div.is-active {
    box-shadow:
        0 0 0 2px #3b82f6,
        0 0 0 1px rgba(255, 255, 255, 0.9),
        0 0 0 4px rgba(59, 130, 246, 0.25);
}
/* —— 中間分隔線 —— */
.cb-palette hr {
    margin: 0 10px;
    height: 18px;
    border: none;
    border-left: 1px solid #e5e7eb;
}
/* —— 筆型 / 粗細選擇 —— */
.cb-palette .pen,
.cb-palette .size {
    gap: 6px;
}
.cb-palette .cb-pen,
.cb-palette .cb-pen-size {
    min-width: 90px;
    max-width: 120px;
    height: 28px;

    padding: 2px 8px;
    border-radius: 999px;
    border: 1px solid #e5e7eb;
    background-color: #f9fafb;

    font-size: 13px;
    line-height: 1.3;
    cursor: pointer;

    -webkit-appearance: none;
       -moz-appearance: none;
            appearance: none;
}
.cb-palette .cb-pen:focus,
.cb-palette .cb-pen-size:focus {
    outline: none;
    border-color: #3b82f6;
    box-shadow: 0 0 0 1px rgba(59, 130, 246, 0.35);
}

/* 讓側邊 nav-menu 永遠壓在最上層（比 fs-poplist 的 12000 還高） */
.app-layout .nav-menu {
    position: relative;
    z-index: 1999; /* > 12000 */
}
.app-layout .main__content {
    position: relative;
    z-index: 1;
}
.nav-menu.nav-menu--profile {
    position: relative;
    z-index: 1999; /* 比 fs-poplist 的 12000 高就好 */
}
body:has(.nav-menu__list) > .fs-poplist__panel[data-poplist-panel] {
    left: 220px !important; /* 左側 nav 約 200px，再留 20px 安全距離 */
    top: calc(var(--header-height, 72px) + 12px) !important;
}
/* ===============================
   Layout 層級最終版：Nav / Poplist / Dialog
   =============================== */
/* 保證：只要不是 open，就一定不會遮住/吃掉點擊（防 SPA 殘留） */
.fs-poplist__panel:not(.fs-poplist__panel--open) {
    opacity: 0 !important;
    pointer-events: none !important;
    visibility: hidden !important;
}
/* open 才能互動 */
.fs-poplist__panel.fs-poplist__panel--open {
    visibility: visible !important;
}

button[cgnoty][data-toast] {
    display: none !important;
}

/* 只有在 dialog 裡的 custom-select 展開時，才放開裁切 */
.dialog-overlay.show:has(.custom-select.open) .dialog__content,
.dialog-overlay.show:has(.custom-select.open) .dialog__body {
    overflow: visible !important;
}
/* 確保下拉永遠蓋在 dialog 內容之上 */
.dialog-overlay.show:has(.custom-select.open) .custom-select .item-list {
    z-index: 9999;
}

/* 當任一 dialog 開啟時，讓 main__content 整個層級抬高，覆蓋左側 nav-menu */
body:has(.dialog-overlay.show) .app-layout:has(.nav-menu__list) .main__content {
    z-index: 3000 !important;
}
/* 保險：dialog 本身也再拉高一點（避免被其它浮層干擾） */
.dialog-overlay.show {
    z-index: 4000 !important;
}
.dialog-overlay[data-dialog="promptDialog"].show {
    z-index: 4001 !important;
}

#detail.data-table--native[data-rwd="card"] td .dt-value,
#detail .data-table--native[data-rwd="card"] td .dt-value {
    flex: 1 1 auto; /* 讓 value 吃剩餘寬度 */
    text-align: right; /* 多行時第二行也會右對齊 */
    min-width: 0; /* 避免 flex item 撐爆 */
}
#detail .dt-value--nowrap {
    white-space: nowrap; /* 時間不要換行 */
}

[data-tooltip].icon:before,
[data-tooltip] .icon:before,
[data-tooltip].btn.icon:before {
    color: currentColor;
}

table.multi__table td.dt-nowrap,
table.multi__table th.dt-nowrap {
    white-space: nowrap;
}

.doc-item__state .state--awaiting {
    background-color: #D4FFE4;
}
.doc-item__state .state--ended {
    background-color: #B1F7B8;
}

.doc-item__icons .btn[important="0"]::before {
    color: currentColor !important;
}
.doc-item__icons .btn[important="1"]::before {
    color: #F4E404 !important;
}
.doc-item__icons .btn[remark="0"]::before {
    color: #D7D8DA !important;
}
.doc-item__icons .btn[remark="1"]::before {
    color: currentColor !important;
}
.doc-item__meta time[is-self="true"]::before {
    color: #3b82f6 !important;
}

.doc-manager__toolbar--left .inpBox-wrap--dateType {
    flex: 0 0 160px !important;
    width: 160px !important;
    max-width: 160px !important;
    min-width: 160px !important;
}
.doc-manager__toolbar--left .inpBox-wrap--dateType .inpBox {
    width: 100% !important;
}
.doc-manager__toolbar--left .custom-select--dateType .selected-item {
    display:block;
    width:100%;
    white-space:nowrap;
    overflow:hidden;
    text-overflow:ellipsis;
}

.dialog-overlay[data-dialog="agents"].show {
    z-index: 3999 !important;
}

.display__title .title-h3 {
    display: inline-flex;
    align-items: center;
    gap: 6px;
}

.circle-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border-radius: 999px;
    width: 52px;
    height: 52px;
    border-radius: 999px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    background: rgba(62, 99, 163, .9);
    box-shadow: 0 8px 20px rgba(0,0,0,.18);
}
.circle-btn__icon {
    font-size: 34px;
    line-height: 1;
    color: #fff;
}
.circle-btn__label {
    position: absolute;
    right: calc(100% + 10px);
    top: 50%;
    transform: translateY(-50%) translateX(6px);
    padding: 8px 12px;
    border-radius: 999px;
    background: rgba(12, 14, 31, .86);
    color: #fff;
    white-space: nowrap;
    opacity: 0;
    pointer-events: none;
    transition: opacity .15s ease, transform .15s ease;
}
.circle-btn:hover .circle-btn__label {
    opacity: 1;
    transform: translateY(-50%) translateX(0);
}
.circle-btn__text {
    position: absolute;
    right: calc(100% + 10px);
    top: 50%;
    transform: translateY(-50%) translateX(6px);
    padding: 8px 12px;
    border-radius: 999px;
    background: rgba(12, 14, 31, .86);
    color: #fff;
    white-space: nowrap;
    opacity: 0;
    pointer-events: none;
    transition: opacity .15s ease, transform .15s ease;
}
.circle-btn:hover .circle-btn__text {
    opacity: 1;
    transform: translateY(-50%) translateX(0);
}

.main-nav .nav--item > a[data-submenu]{
    width: auto;
    justify-content: flex-start;
    gap: 6px;
}
.main-nav .nav--item > a[data-submenu]::after{
    content: "▾";
    font-size: 0.9em;
    line-height: 1;
    opacity: .7;
    transform: translateY(1px);
}
.main-nav .nav--item > a[data-submenu] .icon-chevron-down {
    display: none;
}

.action-nav .submenu-trigger[data-submenu]{
  display: inline-flex;
  align-items: center;
  gap: 4px;
}
.action-nav .submenu-trigger[data-submenu]::after{
  content: "▾";
  font-size: 10px;
  line-height: 1;
  opacity: .7;
  pointer-events: none;
}

/* Popup contact card */
.popup-contact {
    box-sizing: border-box;
    width: 100%;
    max-width: 520px;
    margin: 0 auto;
    padding: 22px 22px 18px;
    border-radius: 14px;
    background: #fff;
    color: #1f2937;
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Noto Sans TC", "Microsoft JhengHei", Arial, sans-serif;
}
.popup-contact * {
    box-sizing: border-box;
}
.popup-contact__title {
    margin: 0 0 10px;
    font-size: 22px;
    font-weight: 800;
    letter-spacing: .5px;
}
.popup-contact__line {
    margin: 0;
    font-size: 16px;
    line-height: 1.75;
    color: #374151;
    word-break: break-word;
}
.popup-contact__name {
    font-weight: 700;
    color: #111827;
}
.popup-contact__sep {
    display: inline-block;
    margin: 0 8px;
    color: #9ca3af;
}
.popup-contact__email {
    font-weight: 700;
    color: #2563eb;
    text-decoration: none;
    white-space: nowrap;
}
.popup-contact__email:hover {
    text-decoration: underline;
}
.popup-contact__hr {
    border: 0;
    height: 1px;
    background: #e5e7eb;
    margin: 16px 0;
}
.popup-contact__social {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 14px;
    padding: 4px 0;
}
.popup-contact__social a {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 46px;
    height: 46px;
    border-radius: 12px;
    background: #f3f4f6;
    text-decoration: none;
    transition: transform .12s ease, background .12s ease;
}
.popup-contact__social a:hover {
    transform: translateY(-1px);
    background: #e5e7eb;
}
.popup-contact__social img {
    width: 26px;
    height: 26px;
    display: block;
}
.popup-contact__note {
    margin: 0;
    text-align: center;
    font-size: 14px;
    font-weight: 800;
    color: #dc2626;
}
.popup-contact__nowrap {
    display: inline-flex;
    align-items: center;
    flex-wrap: nowrap;
    white-space: nowrap;
}

.submenu-panel .dropdown-menu a.is-disabled,
.submenu-panel .dropdown-menu li.is-disabled > a {
    color: #9ca3af !important;
    opacity: 0.6;
    cursor: not-allowed;
    pointer-events: none;
    text-decoration: none;
}
.submenu-panel .dropdown-menu a.is-disabled:hover,
.submenu-panel .dropdown-menu li.is-disabled > a:hover {
    background-color: transparent;
    color: #9ca3af !important;
}

/* =========================
   signInfo：完整相關 CSS（含美化 + 避免雙捲軸）
   放到 fastsign.css 或 main.css 最後面（確保覆蓋）
   ========================= */
.dialog-overlay[data-dialog="signInfo"] .dialog__content,
[data-dialog="signInfo"] .dialog__content {
    display: flex;
    flex-direction: column;
    max-height: min(80vh, 720px);
    overflow: hidden;
}
.dialog-overlay[data-dialog="signInfo"] .dialog__body,
[data-dialog="signInfo"] .dialog__body {
    flex: 1 1 auto;
    min-height: 0;
    overflow: hidden;
    padding: 16px 18px;
}
/* 若 header/footer 佔位需要固定 */
.dialog-overlay[data-dialog="signInfo"] .dialog__header,
[data-dialog="signInfo"] .dialog__header {
    flex: 0 0 auto;
}
.dialog-overlay[data-dialog="signInfo"] .dialog__footer,
[data-dialog="signInfo"] .dialog__footer {
    flex: 0 0 auto;
}
/* ---- 2) signinfo 外框 ---- */
.dialog-overlay[data-dialog="signInfo"] .signinfo,
[data-dialog="signInfo"] .signinfo {
    display: flex;
    flex-direction: column;
    height: 100%;
    min-height: 0;
    gap: 12px;
}
/* ---- 3) 工具列（搜尋） ---- */
.dialog-overlay[data-dialog="signInfo"] .signinfo__toolbar .inpBox,
[data-dialog="signInfo"] .signinfo__toolbar .inpBox {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 10px 12px;
    border-radius: 12px;
    background: #f6f8fc;
    border: 1px solid rgba(15, 23, 42, 0.08);
}
.dialog-overlay[data-dialog="signInfo"] .signinfo__toolbar .inpBox .icon,
[data-dialog="signInfo"] .signinfo__toolbar .inpBox .icon {
    opacity: 0.55;
}
.dialog-overlay[data-dialog="signInfo"] .signinfo__keyword,
[data-dialog="signInfo"] .signinfo__keyword {
    border: 0;
    background: transparent;
    outline: none;
    box-shadow: none;
    padding: 0;
    height: 24px;
    width: 100%;
}
.dialog-overlay[data-dialog="signInfo"] .signinfo__keyword.form-control,
[data-dialog="signInfo"] .signinfo__keyword.form-control {
    background: transparent;
}
/* ---- 4) 清單容器：唯一捲動區（解雙捲軸核心） ---- */
.dialog-overlay[data-dialog="signInfo"] .signinfo__list,
[data-dialog="signInfo"] .signinfo__list {
    flex: 1 1 auto;
    min-height: 0;
    overflow: auto;
    max-height: none !important;
    padding-right: 4px;
    display: flex;
    flex-direction: column;
    gap: 10px;
}
/* 可選：讓 scrollbar 比較細緻（不影響功能） */
.dialog-overlay[data-dialog="signInfo"] .signinfo__list::-webkit-scrollbar,
[data-dialog="signInfo"] .signinfo__list::-webkit-scrollbar {
    width: 10px;
}
.dialog-overlay[data-dialog="signInfo"] .signinfo__list::-webkit-scrollbar-thumb,
[data-dialog="signInfo"] .signinfo__list::-webkit-scrollbar-thumb {
    background: rgba(15, 23, 42, 0.15);
    border-radius: 10px;
    border: 2px solid transparent;
    background-clip: content-box;
}
.dialog-overlay[data-dialog="signInfo"] .signinfo__list::-webkit-scrollbar-track,
[data-dialog="signInfo"] .signinfo__list::-webkit-scrollbar-track {
    background: transparent;
}
/* ---- 5) 卡片 item 美化 ---- */
.dialog-overlay[data-dialog="signInfo"] .signinfo-item,
[data-dialog="signInfo"] .signinfo-item {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 14px;
    padding: 14px 14px;
    border-radius: 14px;
    text-decoration: none;
    background: #ffffff;
    border: 1px solid rgba(15, 23, 42, 0.08);
    box-shadow: 0 6px 16px rgba(15, 23, 42, 0.06);
    transition: transform .12s ease, box-shadow .12s ease, border-color .12s ease;
}
.dialog-overlay[data-dialog="signInfo"] .signinfo-item:hover,
[data-dialog="signInfo"] .signinfo-item:hover {
    transform: translateY(-1px);
    border-color: rgba(15, 23, 42, 0.14);
    box-shadow: 0 10px 22px rgba(15, 23, 42, 0.10);
}
/* 主資訊 */
.dialog-overlay[data-dialog="signInfo"] .signinfo-item__main,
[data-dialog="signInfo"] .signinfo-item__main {
    min-width: 0;
    flex: 1;
}
.dialog-overlay[data-dialog="signInfo"] .signinfo-item__title,
[data-dialog="signInfo"] .signinfo-item__title {
    display: flex;
    align-items: baseline;
    gap: 10px;
    min-width: 0;
}
.dialog-overlay[data-dialog="signInfo"] .signinfo-item__sn,
[data-dialog="signInfo"] .signinfo-item__sn {
    font-weight: 700;
    letter-spacing: 0.2px;
    color: #0f172a;
    white-space: nowrap;
}
[data-dialog="signInfo"] .signinfo-item__sn[isReject="Y"] {
    color: #dc3545;
}
.dialog-overlay[data-dialog="signInfo"] .signinfo-item__name,
[data-dialog="signInfo"] .signinfo-item__name {
    color: rgba(15, 23, 42, 0.72);
    font-weight: 700;
    min-width: 0;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}
.dialog-overlay[data-dialog="signInfo"] .signinfo-item__meta,
[data-dialog="signInfo"] .signinfo-item__meta {
    margin-top: 6px;
    font-size: 12px;
    color: rgba(15, 23, 42, 0.55);
}
/* 右側箭頭 */
.dialog-overlay[data-dialog="signInfo"] .signinfo-item__arrow,
[data-dialog="signInfo"] .signinfo-item__arrow {
    opacity: 0.55;
    flex: 0 0 auto;
}
/* 沒 URL 的 item */
.dialog-overlay[data-dialog="signInfo"] .signinfo-item[data-no-url="1"],
[data-dialog="signInfo"] .signinfo-item[data-no-url="1"] {
    cursor: default;
}
.dialog-overlay[data-dialog="signInfo"] .signinfo-item[data-no-url="1"]:hover,
[data-dialog="signInfo"] .signinfo-item[data-no-url="1"]:hover {
    transform: none;
    box-shadow: 0 6px 16px rgba(15, 23, 42, 0.06);
    border-color: rgba(15, 23, 42, 0.08);
}
/* ---- 6) Loading / Empty 狀態 ---- */
.dialog-overlay[data-dialog="signInfo"] .signinfo__state,
[data-dialog="signInfo"] .signinfo__state {
    display: grid;
    place-items: center;
    gap: 10px;
    padding: 30px 12px;
    color: rgba(15, 23, 42, 0.6);
}
.dialog-overlay[data-dialog="signInfo"] .signinfo__state-txt,
[data-dialog="signInfo"] .signinfo__state-txt {
    font-size: 13px;
}
/* ---- 7) 保底：如果 dialog__body/外層被其他全域 CSS 設了 overflow:auto，這裡再強制一次 ---- */
.dialog-overlay[data-dialog="signInfo"] .dialog,
[data-dialog="signInfo"] .dialog {
    overflow: hidden;
}

font[role="99"] {
    color: #28A745;
}
font[role="1"] {
    color: #0541D0;
}
font[role="2"] {
    color: #6205D0;
}
font[role="3"] {
    color: #C40000;
}
font[role="9"] {
    color: #C40000;
}

.range-slider__opbg {
    background-image: url(../img/opacity_bg.png) !important;
}
.range-slider__value {
    min-width: 90px !important;
}

.sigfile-manager__signature-box{
  width: 100%;
  height: 140px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: #fff;
}
.sigfile-manager__signature-img{
  max-width: 160px;
  max-height: 100%;
  width: auto;
  height: auto;
  object-fit: contain;
  display: block;
}
.signature-title-text-0 {
    color: gray
}
.signature-title-text-0 {
    color: gray;
}
.signature-title-text-1 {
    color: #CE2FCA;
}
.signature-title-text-2 {
    color: #FF0000;
    display: inline-flex;
    gap: 8px;
    align-items: center;
    padding-right: 4px;
}
.signature-title-text-3, .signature-title-text-98 {
    color: blue;
}
.signature-title-text-9, .signature-title-text-97 {
    color: #D4D4D4
}

/* =========================
   Sign Panel - Brush Picker Active Style
   ========================= */
/* option 基礎 */
[data-dialog=signPanel] .signature-toolbar .brush-picker__option {
    border: 1px solid #e5e7eb;
    background: #ffffff;
    border-radius: 8px;
    padding: 6px 12px;
    line-height: 1;
    cursor: pointer;
}
/* hover/focus */
[data-dialog=signPanel] .signature-toolbar .brush-picker__option:hover {
    background: #f3f4f6;
}
[data-dialog=signPanel] .signature-toolbar .brush-picker__option:focus-visible {
    outline: 0;
    box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.25);
}
/* ✅ Active：只看 aria-checked=true（避免 data-value 打架） */
[data-dialog=signPanel] .signature-toolbar .brush-picker__option[aria-checked="true"] {
    border-color: #00bfff;
    background: rgba(0, 191, 255, 0.10);
}
/* =========================
   Sign Panel - Tool Button Active Style
   (鋼筆 / 鉛筆按鈕 aria-checked)
   ========================= */
[data-dialog=signPanel] .signature-toolbar button[data-poplist-trigger][aria-checked] {
    position: relative;
    border-radius: 10px;
    transition: background-color .16s ease, box-shadow .16s ease, color .16s ease;
}
/* 未選中 */
[data-dialog=signPanel] .signature-toolbar button[data-poplist-trigger][aria-checked="false"] {
    background: transparent;
    color: inherit;
}
[data-dialog=signPanel] .signature-toolbar button[data-poplist-trigger][aria-checked="false"]:hover {
    background: rgba(15, 23, 42, 0.04);
}
/* 選中 */
[data-dialog=signPanel] .signature-toolbar button[data-poplist-trigger][aria-checked="true"] {
    background: rgba(0, 191, 255, 0.12);
    color: #0284c7;
    box-shadow: inset 0 0 0 1px rgba(0, 191, 255, 0.45), 0 1px 2px rgba(2, 132, 199, 0.15);
}
[data-dialog=signPanel] .signature-toolbar button[data-poplist-trigger][aria-checked="true"] .icon {
    color: #0284c7;
}
[data-dialog=signPanel] .signature-toolbar button[data-poplist-trigger][aria-checked="true"]:hover {
    background: rgba(0, 191, 255, 0.18);
}
[data-dialog=signPanel] .signature-toolbar button[data-poplist-trigger][aria-checked="true"]:focus-visible {
    outline: 0;
    box-shadow: inset 0 0 0 1px rgba(0, 191, 255, 0.6), 0 0 0 3px rgba(2, 132, 199, 0.25);
}

/* =========================================================
   SignPanel Toolbar Fix (確保會套用到你的 HTML)
   目標：div.dialog-overlay[data-dialog="signPanel"] 內部
   ========================================================= */
/* ---------- Toolbars: common ---------- */
div.dialog-overlay[data-dialog="signPanel"] .sign-panel .signature-toolbar {
    box-sizing: border-box;
}
/* 強制：工具列排成一行，不亂飄 */
div.dialog-overlay[data-dialog="signPanel"] .sign-panel .signature-toolbar[mode="2"] {
    display: flex;
    align-items: center !important;
    gap: 10px !important;
    flex-wrap: nowrap !important;
    width: 100% !important;
    padding: 10px 12px !important;
    border-bottom: 1px solid #e5e7eb !important;
    background: #fff !important;
}
/* mode=2 的分隔線（你有兩種：toolbar__divider / vertical-split） */
div.dialog-overlay[data-dialog="signPanel"] .sign-panel .signature-toolbar[mode="2"] .toolbar__divider,
div.dialog-overlay[data-dialog="signPanel"] .sign-panel .signature-toolbar[mode="2"] .vertical-split {
    width: 1px !important;
    height: 24px !important;
    background: #e5e7eb !important;
    flex: 0 0 1px !important;
    margin: 0 2px !important;
}
/* mode=2：圖片比例區 */
div.dialog-overlay[data-dialog="signPanel"] .sign-panel .signature-toolbar[mode="2"] .image-container {
    display: inline-flex !important;
    align-items: center !important;
    flex: 0 0 auto !important;
}
div.dialog-overlay[data-dialog="signPanel"] .sign-panel .signature-toolbar[mode="2"] .image-scale-info {
    height: 40px !important;
    min-width: 64px !important;
    padding: 0 10px !important;
    border-radius: 10px !important;
    border: 1px solid #e5e7eb !important;
    background: #f8fafc !important;
    display: inline-flex !important;
    align-items: center !important;
    justify-content: center !important;
    font-weight: 600 !important;
}
/* mode=2：角度控制區（0° + 左右旋轉） */
div.dialog-overlay[data-dialog="signPanel"] .sign-panel .signature-toolbar[mode="2"] .angle-container {
    display: inline-flex !important;
    align-items: center !important;
    gap: 8px !important;
    flex: 0 0 auto !important;
}
/* 角度顯示 badge */
div.dialog-overlay[data-dialog="signPanel"] .sign-panel .signature-toolbar[mode="2"] .angle-info {
    height: 40px !important;
    min-width: 64px !important;
    padding: 0 10px !important;
    border-radius: 10px !important;
    border: 1px solid #e5e7eb !important;
    background: #f8fafc !important;
    display: inline-flex !important;
    align-items: center !important;
    justify-content: center !important;
    font-weight: 700 !important;
}
/* 左右旋轉按鈕 */
div.dialog-overlay[data-dialog="signPanel"] .sign-panel .signature-toolbar[mode="2"] .clockwise,
div.dialog-overlay[data-dialog="signPanel"] .sign-panel .signature-toolbar[mode="2"] .counterclockwise {
    height: 40px !important;
    width: 40px !important;
    min-width: 40px !important;
    border-radius: 10px !important;
    border: 1px solid #e5e7eb !important;
    background: #ffffff !important;
    display: inline-flex !important;
    align-items: center !important;
    justify-content: center !important;
    cursor: pointer !important;
}
div.dialog-overlay[data-dialog="signPanel"] .sign-panel .signature-toolbar[mode="2"] .clockwise:hover,
div.dialog-overlay[data-dialog="signPanel"] .sign-panel .signature-toolbar[mode="2"] .counterclockwise:hover {
    background: #f3f4f6 !important;
}
/* icon fallback */
div.dialog-overlay[data-dialog="signPanel"] .sign-panel .signature-toolbar[mode="2"] .icon-rotate-left,
div.dialog-overlay[data-dialog="signPanel"] .sign-panel .signature-toolbar[mode="2"] .icon-rotate-right {
    display: inline-flex !important;
    width: 22px !important;
    height: 22px !important;
    align-items: center !important;
    justify-content: center !important;
}
div.dialog-overlay[data-dialog="signPanel"] .sign-panel .signature-toolbar[mode="2"] .icon-rotate-left {
    mask-image: url("../../images/seal-tool/counterclockwise1.png");
}
div.dialog-overlay[data-dialog="signPanel"] .sign-panel .signature-toolbar[mode="2"] .icon-rotate-right {
    mask-image: url("../../images/seal-tool/clockwise1.png");
}
div.dialog-overlay[data-dialog="signPanel"] .sign-panel .signature-toolbar[mode="2"] .icon-rotate-left,
div.dialog-overlay[data-dialog="signPanel"] .sign-panel .signature-toolbar[mode="2"] .icon-rotate-right {
    display: inline-block !important;
    width: 20px !important;
    height: 20px !important;
    /* mask 要有填色才會「看得到」 */
    background-color: currentColor !important;
    /* 關鍵：避免只顯示一角 / 被裁切 */
    -webkit-mask-repeat: no-repeat !important;
    mask-repeat: no-repeat !important;
    -webkit-mask-position: center !important;
    mask-position: center !important;
    -webkit-mask-size: contain !important; /* 或 100% 100% */
    mask-size: contain !important;
    /* 避免 icon font 的字元/盒模型干擾 */
    font-size: 0 !important;
    line-height: 0 !important;
}
/* mode=2：清除按鈕與輸入框區 */
div.dialog-overlay[data-dialog="signPanel"] .sign-panel .signature-toolbar[mode="2"] .eraser {
    height: 40px !important;
    border-radius: 10px !important;
    flex: 0 0 auto !important;
}
/* 輸入框吃剩餘寬度，靠右撐開 */
div.dialog-overlay[data-dialog="signPanel"] .sign-panel .signature-toolbar[mode="2"] .inpBox-wrap {
    flex: 1 1 auto !important;
    min-width: 240px !important;
    max-width: 520px !important;
}
div.dialog-overlay[data-dialog="signPanel"] .sign-panel .signature-toolbar[mode="2"] .inpBox {
    height: 40px !important;
    border-radius: 10px !important;
    display: flex !important;
    align-items: center !important;
}
div.dialog-overlay[data-dialog="signPanel"] .sign-panel .signature-toolbar[mode="2"] .inpBox .form-control {
    height: 40px !important;
    line-height: 40px !important;
}
/* ---------- mode=1 也整理（避免被 mode=2 規則干擾） ---------- */
div.dialog-overlay[data-dialog="signPanel"] .sign-panel .signature-toolbar[mode="1"] {
    display: flex;
    align-items: center !important;
    gap: 10px !important;
    flex-wrap: nowrap !important;
    width: 100% !important;
    padding: 10px 12px !important;
    border-bottom: 1px solid #e5e7eb !important;
    background: #fff !important;
}
/* mode=1：brush / color poplist panel 不要被擠壓 */
div.dialog-overlay[data-dialog="signPanel"] .sign-panel .signature-toolbar[mode="1"] .fs-poplist__panel {
    z-index: 9999 !important;
}

/* 讓 page__content 當作 sticky 的範圍容器 */
.page__content {
    position: relative;
}
/* 底部浮動列 */
.page__content .signature-actions-float {
    position: sticky;
    bottom: 16px;
    z-index: 20;
    display: flex;
    gap: 12px;
    justify-content: flex-start;
    align-items: center;
    padding: 12px;
    border-radius: 12px;
    /* 讓浮動列壓在內容上時不會看起來突兀 */
    background: rgba(255, 255, 255, 0.92);
    backdrop-filter: blur(6px);
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.12);
}

.limited-mode-info {
    bottom: 0;
    z-index: 5;
    /* 外觀 */
    display: flex;
    align-items: center;
    gap: 8px;
    margin: 12px 16px 14px;
    padding: 10px 12px;
    font-size: 13px;
    line-height: 1.25;
    letter-spacing: .2px;
    color: #1f3a66;
    background: #f3f7ff;
    border: 1px solid rgba(62, 99, 163, .25);
    border-radius: 12px;
    /* 微質感 */
    box-shadow: 0 6px 18px rgba(0,0,0,.06);
    backdrop-filter: blur(2px);
    text-align: center;
}

/* =========================
   Launch Bar (perfect, mobile-only)
   控制：isOpen="Y" 顯示
   ========================= */
.launch-warn {
    display: none;
}

.save-flow.is-attention {
    box-shadow: 0 0 0 3px rgba(255, 165, 0, .35);
    animation: fsPulse 1s ease-in-out infinite;
}

/* =========================================================
   Header / Toolbar Compact Mode (PC + Mobile)
   依 main.css：--header-height 控制 header + toolbar + viewer top offset
   ========================================================= */
:root {
    --header-height-compact: 48px; /* 建議 56，比 48 好看 */
    --header-btn-h-compact: 34px; /* header 右上角按鈕高度 */
    --header-btn-px-compact: 10px; /* header 右上角按鈕左右 padding */
    --header-btn-py-compact: 6px; /* header 右上角按鈕上下 padding */
    --toolbar-height-compact: 48px; /* toolbar 高度跟 header 一致 */
}

#detail.slide-panel.slide-panel--left {
    position: fixed !important;
    top: var(--app-top-offset, 0px) !important;
    bottom: 0 !important;
    left: 0 !important;
    width: 320px;
    max-width: 45vw;
    z-index: 2000;
    /* ✅ 讓整個面板可以捲 */
    overflow-y: auto !important;
    overflow-x: hidden !important;
    -webkit-overflow-scrolling: touch;
}
/* 標題固定在面板頂部 */
#detail.slide-panel.slide-panel--left .slide-panel__title {
    position: sticky !important;
    top: 0 !important;
    z-index: 5;
    background: #fff; /* 避免捲動時內容透出 */
}
/* 關閉鈕也固定 */
#detail.slide-panel.slide-panel--left .slide-panel__close {
    position: sticky !important;
    top: 0 !important;
    z-index: 6;
}
/* content 不要搞 overflow，避免雙捲軸/打架 */
#detail.slide-panel.slide-panel--left .slide-panel__content {
    overflow: visible !important;
    height: auto !important;
}

.inpBox .pwbox__toggle {
    background-color: #F5F5F5;
}

.header_wrap .brand__company .brand--logo {
    height: 21px !important;
}
.header_wrap .brand .brand--logo {
    height: 21px !important;
    max-width: 141px !important;
}

.tooltip-box {
    z-index: 9999;
}

:root {
    --fs-m-header-h: 48px;
    --fs-m-toolbar-h: 48px;
    --fs-m-top: calc(var(--fs-m-header-h) + var(--fs-m-toolbar-h));
}

.toolbar__viewer .draw-button.is-active,
.toolbar__viewer .signature-button.is-active,
.toolbar__viewer .image-box-button.is-active {
    background: #EAF4FF !important;
    border-radius: 10px;
}
.toolbar__viewer .draw-button.is-active .icon-brush,
.toolbar__viewer .signature-button.is-active .icon-signature,
.toolbar__viewer .image-box-button.is-active .icon-image-box {
    color: #1D4ED8 !important;
    transform: scale(1.08);
}
.toolbar__viewer .draw-button.is-active .btn__text,
.toolbar__viewer .signature-button.is-active .btn__text,
.toolbar__viewer .image-box-button.is-active .btn__text {
    color: #1D4ED8 !important;
    font-weight: 700;
}

.toolbar__pagination .inpBox {
    width: auto;
}
.toolbar__pagination .inpBox .form-control.page {
    width: 28px;
}

div[data-dialog="ESG"] .esg-value__number,
div[data-dialog="ESG"] .esg-value__unit {
    display: inline-block;
    vertical-align: baseline;
    white-space: nowrap;
}
div[data-dialog="ESG"] .esg-value__unit {
    font-size: 0.42em;
    font-weight: 600;
    margin-left: 0.18em;
    line-height: 1;
}

@media (max-width: 992px) {
    :root {
        --fs-m-header-h: 48px;
        --fs-m-toolbar-h: 48px;
        --fs-m-top: calc(var(--fs-m-header-h) + var(--fs-m-toolbar-h));
    }
    /* =========================
    1) Header（手機：只留右邊按鈕）
    ========================= */
    header.header {
        --header-height: var(--fs-m-header-h) !important;
        height: var(--fs-m-header-h) !important;
        min-height: var(--fs-m-header-h) !important;
        max-height: var(--fs-m-header-h) !important;
        padding: 6px 12px !important;
        overflow: hidden !important;
        display: flex !important;
        align-items: center !important;
        flex-wrap: nowrap !important;
    }
    header.header .header_wrap {
        display: none !important;
    }
    header.header .inner_navbar {
        height: var(--fs-m-header-h) !important;
        display: flex !important;
        align-items: center !important;
        justify-content: flex-end !important;
        flex-wrap: nowrap !important;
        width: 100% !important;
    }
    header.header .inner_navbar__right {
        margin-left: auto !important;
        display: flex !important;
        align-items: center !important;
        gap: 10px !important;
        flex-wrap: nowrap !important;
        white-space: nowrap !important;
    }
    header.header .inner_navbar__right .btn .btn__text {
        display: none !important;
    }
    /* =========================
    2) app-top-offset & main margin-top
    ========================= */
    html {
        --app-top-offset: var(--fs-m-top) !important;
    }
    main.app-layout {
        margin-top: var(--fs-m-top) !important;
    }
    /* =========================
    3) Toolbar：固定在 header 下方 + 不讓 col 掉行
    ========================= */
    header.header + .row.g-0.toolbar[data-role="toolbar"],
    header.header + .toolbar {
        position: fixed !important;
        left: 0 !important;
        right: 0 !important;
        top: var(--fs-m-header-h) !important;
        z-index: 1002 !important;
        display: flex !important;
        visibility: visible !important;
        opacity: 1 !important;
    }
    .row.g-0.toolbar[data-role="toolbar"],
    .row.toolbar[data-role="toolbar"] {
        height: var(--fs-m-toolbar-h) !important;
        min-height: var(--fs-m-toolbar-h) !important;
        max-height: var(--fs-m-toolbar-h) !important;
        padding: 0 12px !important;
        background: #fff !important;
        border-bottom: 1px solid rgba(0,0,0,.08) !important;
        box-shadow: none !important;
        display: flex !important;
        align-items: center !important;
        flex-wrap: nowrap !important;
        overflow: visible !important;
    }
    /* 關鍵：避免 <768 時 .row > * 被套 width:100% 導致 col 掉行 */
    .row.g-0.toolbar[data-role="toolbar"] > [class^="col-"],
    .row.g-0.toolbar[data-role="toolbar"] > [class*=" col-"] {
        flex: 0 0 auto !important;
        width: auto !important;
        max-width: none !important;
        min-width: 0 !important;
    }
    /* 左側 controls 撐滿，右側 actions 靠右 */
    .row.g-0.toolbar[data-role="toolbar"] .toolbar__controls {
        flex: 1 1 auto !important;
        min-width: 0 !important;
        display: flex !important;
        align-items: center !important;
        flex-wrap: nowrap !important;
        white-space: nowrap !important;
        gap: 8px !important;
    }
    .row.g-0.toolbar[data-role="toolbar"] .toolbar__actions {
        flex: 0 0 auto !important;
        margin-left: auto !important;
        display: flex !important;
        align-items: center !important;
        flex-wrap: nowrap !important;
        white-space: nowrap !important;
        gap: 8px !important;
        min-width: 0 !important;
    }
    /* 手機：按鈕尺寸小一點（含 header 右上 & toolbar） */
    header.header .inner_navbar__right .btn,
    .row.g-0.toolbar[data-role="toolbar"] .btn {
        padding: 5px 8px !important;
        min-height: 34px !important;
        height: 34px !important;
        border-radius: 10px !important;
        
        align-items: center !important;
        justify-content: center !important;
        line-height: 1 !important;
    }
    header.header .inner_navbar__right .icon,
    .row.g-0.toolbar[data-role="toolbar"] .icon {
        width: 18px !important;
        height: 18px !important;
        font-size: 18px !important;
    }
    /* =========================
    4) 必填按鈕：固定在 toolbar 右側（不漂移、不覆蓋文件）
    ========================= */
    .row.g-0.toolbar[data-role="toolbar"] .btn.btn-link.find-required {
        /* 做成真正的按鈕外觀，避免「看不出是按鈕」 */
        background: #fff !important;
        border: 1px solid rgba(37, 99, 235, .55) !important;
        box-shadow: 0 1px 2px rgba(0,0,0,.06) !important;
        color: #1d4ed8 !important;
        padding: 6px 10px !important;
        border-radius: 12px !important;
        
        align-items: center !important;
        gap: 8px !important;
        flex: 0 0 auto !important;
        white-space: nowrap !important;
    }
    /* icon & badge 可靠顯示 */
    .row.g-0.toolbar[data-role="toolbar"] .btn.btn-link.find-required .icon {
        flex: 0 0 auto !important;
    }
    .row.g-0.toolbar[data-role="toolbar"] .btn.btn-link.find-required .badge {
        flex: 0 0 auto !important;
        min-width: 18px !important;
        height: 18px !important;
        line-height: 18px !important;
        padding: 0 6px !important;
        border-radius: 999px !important;
        font-size: 12px !important;
    }
     /* =========================
     5) 換頁條 toolbar__pagination（浮在 header+toolbar 正下方）
     ========================= */
    .row.g-0.toolbar[data-role="toolbar"] .toolbar__pagination {
        display: flex !important; /* 蓋掉 d-none d-md-flex */
    }
    .row.g-0.toolbar[data-role="toolbar"] .toolbar__pagination[dragging] {
        position: fixed !important;
        top: calc(var(--fs-m-top) + 8px) !important;
        left: 50% !important;
        transform: translateX(-50%) translate(var(--drag-tx, 0px), var(--drag-ty, 0px)) !important;
        z-index: 2000 !important;
        display: flex !important;
        align-items: center !important;
        gap: 4px !important;
        padding: 4px 8px !important;
        border-radius: 999px !important;
        background: rgba(255,255,255,.55) !important;
        box-shadow: 0 2px 6px rgba(0,0,0,.15) !important;
        cursor: grab !important;
        -webkit-backdrop-filter: blur(8px);
        backdrop-filter: blur(8px);
    }
    .row.g-0.toolbar[data-role="toolbar"] .toolbar__pagination[dragging].is-dragging {
        cursor: grabbing !important;
    }
    .row.g-0.toolbar[data-role="toolbar"] .toolbar__pagination[dragging] .inpBox {
        width: 40px !important;
        min-height: 30px !important;
        padding: 2px !important;
    }
    .row.g-0.toolbar[data-role="toolbar"] .toolbar__pagination[dragging] .form-control {
        height: 28px !important;
        line-height: 28px !important;
        text-align: center !important;
        padding: 0 !important;
        background-color: rgba(255,255,255,.7) !important;
    }
    .row.g-0.toolbar[data-role="toolbar"] .toolbar__pagination[dragging] .btn {
        padding: 4px 6px !important;
        min-height: 28px !important;
        height: 28px !important;
        line-height: 1 !important;
    }

    /* 1) 下拉的容器要能建立疊層基準 */
    .row.g-0.toolbar[data-role="toolbar"] .toolbar__sort,
    .row.g-0.toolbar[data-role="toolbar"] .toolbar__sort .inpBox,
    .row.g-0.toolbar[data-role="toolbar"] .toolbar__sort .custom-select {
        position: relative !important;
        z-index: 2200 !important; /* 要大於 pagination 的 2000 */
    }
    /* 2) 展開清單本體再更高，確保一定壓過去 */
    .row.g-0.toolbar[data-role="toolbar"] .toolbar__sort .custom-select.open .item-list {
        position: absolute !important;
        z-index: 2210 !important;
    }
    /* 3) 保險：toolbar 本身不要把下拉裁掉 */
    .row.g-0.toolbar[data-role="toolbar"] {
        overflow: visible !important;
    }

    .toolbar__viewer button[cg-data-dialog-trigger="attachment-editor"] .icon-badge {
        width: 12px !important;
        height: 12px !important;
        min-width: 12px !important;
        font-size: 0 !important;
        line-height: 0 !important;
        display: inline-flex !important;
        align-items: center !important;
        justify-content: center !important;
        margin-left: -2px !important;
        transform: translateY(-1px);
        flex: 0 0 auto;
    }
    .toolbar__viewer button[cg-data-dialog-trigger="attachment-editor"] .icon-badge::before {
        width: 10px !important;
        height: 10px !important;
        min-width: 10px !important;
        min-height: 10px !important;
        border-radius: 50% !important;
        display: block !important;
    }

    .row.g-0.toolbar[data-role="toolbar"] .toolbar__viewer .btn .btn__text {
        display: none !important;
    }
    .row.g-0.toolbar[data-role="toolbar"] .toolbar__viewer .btn {
        min-width: 34px !important;
        width: 34px !important;
        padding: 5px !important;
        gap: 0 !important;
    }
    .row.g-0.toolbar[data-role="toolbar"] .toolbar__viewer {
        gap: 4px !important;
    }

    /* =========================
    6) 碰撞時 → 必填變 icon-only（避免擠到中間工具列）
    ========================= */
    @media (max-width: 420px) {
        .row.g-0.toolbar[data-role="toolbar"] .btn.btn-link.find-required .btn__text {
            display: none !important;
        }
        .row.g-0.toolbar[data-role="toolbar"] .btn.btn-link.find-required {
            padding: 6px 8px !important;
            min-width: 36px !important;
            height: 36px !important;
            border-radius: 12px !important;
            gap: 6px !important;
        }
    }
}

@media (max-width: 769px) {
    
    .launch-warn {
        display: none !important;
    }
    .launch-warn[isOpen="Y"] {
        display: block;
    }
    .launch-warn[isOpen="N"] {
        display: none;
    }
    .launch-warn {
        position: fixed;
        left: 12px;
        right: 12px;
        bottom: calc(12px + env(safe-area-inset-bottom, 0px));
        z-index: 1800;
        pointer-events: none;
    }
    .launch-warn__bar {
        pointer-events: auto;
        display: flex;
        align-items: center;
        gap: 10px;
        /* ✅ 一勞永逸：高度固定 + 自適應 */
        height: clamp(48px, 10vw, 56px);
        padding: 0 12px;
        background: rgba(255,255,255,.94);
        -webkit-backdrop-filter: blur(10px);
        backdrop-filter: blur(10px);
        border: 1px solid rgba(0,0,0,.10);
        border-radius: 18px;
        box-shadow: 0 10px 30px rgba(0,0,0,.14);
    }
    .launch-warn__close {
        width: clamp(34px, 8vw, 40px);
        height: clamp(34px, 8vw, 40px);
        border-radius: 12px;
        border: 0;
        background: rgba(0,0,0,.06);
        color: rgba(0,0,0,.70);
        display: grid;
        place-items: center;
        font-size: 20px;
        line-height: 1;
        flex: 0 0 auto;
        -webkit-tap-highlight-color: transparent;
    }
    .launch-warn__close:active {
        transform: scale(.98);
        background: rgba(0,0,0,.09);
    }
    .launch-warn__body {
        display: flex;
        align-items: center;
        gap: 10px;
        min-width: 0;
        flex: 1 1 auto;
    }
    .launch-warn__logo {
        width: clamp(28px, 7vw, 34px);
        height: clamp(28px, 7vw, 34px);
        border-radius: 10px;
        background: #2f6fed;
        display: grid;
        place-items: center;
        flex: 0 0 auto;
    }
    .launch-warn__logo img {
        width: 68%;
        height: 68%;
        object-fit: contain; /* ✅ 不變形 */
        display: block;
    }
    .launch-warn__text {
        font-size: clamp(13px, 3.4vw, 14px);
        font-weight: 800;
        color: rgba(0,0,0,.86);
        white-space: nowrap;
        overflow: hidden;
        text-overflow: ellipsis;
        min-width: 0;
        flex: 1 1 auto;
    }
    .launch-warn__open {
        height: clamp(34px, 8vw, 40px);
        min-width: 78px;
        padding: 0 14px;
        border-radius: 14px;
        border: 0;
        font-size: 14px;
        font-weight: 900;
        color: #fff;
        background: #2f6fed;
        flex: 0 0 auto;
        white-space: nowrap;
        -webkit-tap-highlight-color: transparent;
    }
    .launch-warn__open:active {
        transform: translateY(1px);
        filter: brightness(.95);
    }

    @media (max-width: 360px) {
        .launch-warn__text {
            display: none;
        }
        .launch-warn__bar {
            gap: 8px;
            padding: 0 10px;
        }
    }

    div[data-dialog="signPanel"] div.dialog,
    div[data-dialog="signPanel"] .dialog.dialog {
        max-width: none;
        width: 100%;
    }
}

@media (max-width: 420px) {
    .popup-contact {
        padding: 18px 16px 14px;
        border-radius: 12px;
    }
    .popup-contact__title {
        font-size: 20px;
    }
    .popup-contact__line {
        font-size: 15px;
    }
}

@media (max-width: 1280px) {
    .nav-menu.nav-menu--profile {
        z-index: 1;
    }
}

@media (max-width: 992px) {

    .toolbar__controls .btn__text {
        display: block;
    }
    .toolbar__controls .toolbar__viewer .co-browse-mobile-content {
        position: fixed;
        bottom: 10px;
        left: 50%;
        transform: translateX(-50%) translate(var(--drag-tx, 0px), var(--drag-ty, 0px));
        z-index: 2000;
        display: flex !important;
        align-items: center;
        gap: 4px;
        padding: 4px 8px;
        border-radius: 4px;
        background: rgba(255, 255, 255, .4);
        box-shadow: 0 2px 6px rgba(0, 0, 0, .15);
        cursor: grab;
    }

    .cb-palette {
        top: 48px;
        left: 50%;
        transform: translateX(-50%);
        width: calc(100% - 20px);

        padding: 12px 14px;
        border-radius: 16px;

        display: block;              /* 手機用 block 結構 */
        white-space: normal;
        text-align: left;
    }
    /* --- 1. 上方：工具 + 色盤 --- */
    .cb-palette .tool-container {
        display: inline-flex;
        align-items: center;
        gap: 12px;
        margin-bottom: 10px;
    }
    .cb-palette .co-browse-return-previous,
    .cb-palette .co-browse-clear {
        width: 28px;
        height: 28px;
    }
    .cb-palette .color {
        display: inline-flex;
        gap: 10px;
        margin-left: 16px;          /* 與工具保持間距 */
        vertical-align: middle;
    }
    .cb-palette hr {
        display: none;              /* 手機不需要分隔線 */
    }
    /* --- 2. 下方：筆型、粗細（堆疊兩行） --- */
    .cb-palette .pen,
    .cb-palette .size {
        display: flex;
        width: 100%;
        margin-top: 8px;
    }
    .cb-palette .cb-pen,
    .cb-palette .cb-pen-size {
        width: 60%;
        max-width: 220px;
        height: 34px;
        border-radius: 12px;
        font-size: 14px;
    }
    /* label-like 排版（比較像工具列設定） */
    .cb-palette .pen:before {
        content: "筆型";
        width: 56px;
        display: inline-flex;
        align-items: center;
        color: #475569;
        font-size: 13px;
    }
    .cb-palette .size:before {
        content: "粗細";
        width: 56px;
        display: inline-flex;
        align-items: center;
        color: #475569;
        font-size: 13px;
    }

    footer.footer {
        display: none;
    }
}