/* 🚩 珍珠引擎：預設隱藏所有 PREMIUM 區塊 */
[data-tier="PREMIUM"] {
    display: none;
}
/* 🚩 珍珠引擎：職人級窄版滾動條 */


/* 標題與按鈕同行佈局 (Inline Layout) */
.alchemy-header-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 15px;
}

.ui-title {
    font-size: 18px;
    margin: 0;
    color: #fff;
    letter-spacing: 1px;
}

.ui-title small {
    font-size: 10px;
    color: #666;
    display: block;
}

/* 重整按鈕：轉圈動畫與圓角 */
.btn-alchemy-reload {
    background: none;
    border: none;
    color: #666;
    cursor: pointer;
    transition: color 0.3s;
    padding: 5px;
}

.btn-alchemy-reload:hover { color: #0077ff; }

/* 重整按鈕：轉圈動畫與圓角 */
.btn-reload {
    background: none;
    border: none;
    color: #666;
    cursor: pointer;
    transition: color 0.3s;
    padding: 5px;
	vertical-align:baseline;
}

.btn-reload:hover { color: #0077ff; }

/* 🚩 珍珠引擎：旋轉鈕物理動效 */
#btnResetpremium {
    cursor: pointer;
    transition: color 0.3s ease;
}

#btnResetpremium:hover {
    color: #ffd700; /* 珍珠金 */
}

/* 旋轉動畫協議 */
.fa-spin-active {
    animation: pearl-spin 1s infinite linear;
}

@keyframes pearl-spin {
    from { transform: rotate(0deg); }
    to { transform: rotate(360deg); }
}
.is-reloading svg {
    animation: rotate 0.6s linear infinite;
}

@keyframes rotate {
    from { transform: rotate(0deg); }
    to { transform: rotate(360deg); }
}

/* 影像投放區：高度拉升與圖示化 */
#assetDropzone {
	flex: 0.8;
	display: flex;
    border: 1.5px dashed #00d2ff !important; /* 藍色虛線強化 */
    border-radius: 12px !important;
    background: rgba(0, 210, 255, 0.03);
	min-height: 125px !important; /* 提升高度，確保主位 */
	padding:0px;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    margin-right: 12px;
	/*margin-bottom:12px;*/
    cursor: pointer;	
}
#assetDropzone:hover {
    border-color: #0077ff !important;
    background: rgba(0, 119, 255, 0.05);
}

.ui-main-text {
    font-size: 13px;
    color: #999;
}

/* 特徵輸入框：實線與方圓感 */
#featureInput {
    width: 100%;
    height: 100px;
    background: #1e1e1e;
    border: 1px solid #333 !important;
    border-radius: 8px !important;
    color: #fff;
    padding: 12px;
    margin-bottom: 15px;
    resize: none;
    box-sizing: border-box;
}
#featureInput::-webkit-scrollbar {
    width: 6px;
}
#featureInput::-webkit-scrollbar-thumb:hover {
    background: #00d4ff;
}
#featureInput::-webkit-scrollbar-thumb {
    background: #444;
    border-radius: 10px;
}
#featureInput::-webkit-scrollbar-track {
    background: transparent;
}

/* 藍色執行按鈕：職人圓角鎖定 */
.btn-trigger-analysis {
    width: 75%;
    background: #0077ff;
    color: white;
    border: none;
    padding: 12px;
    border-radius: 8px !important;
    font-weight: bold;
    cursor: pointer;
    transition: background 0.3s;
}

.btn-trigger-analysis:hover { background: #0066dd; }

/* 珍珠引擎：圖標容器置中協議 */
.ingestion-icon {
    display: flex;             /* 啟用彈性佈局 */
    justify-content: center;   /* 水平置中 (Horizontal Alignment) */
    align-items: center;       /* 垂直置中 (Vertical Alignment) */
    height: 40px;              /* 依據您的設計調整高度 */
    width: 100%;               /* 寬度撐滿父層 */
    margin-bottom: 4px;       /* 與下方文字保持間距 */
}

/* 確保內部 span 具備實體空間 */
.ui-icon {
    display: inline-block;
    font-size: 32px;           /* 相機圖示大小調校 */
    line-height: 1;            /* 排除行高干擾 */
    text-align: center;
}

.ui-main-text { font-size: 12px; color: #eee; margin: 0; font-weight: 500; }
.ui-sub-text { font-size: 10px; color: #666; margin-top:0px; }

/* 系統通訊浮動層：視覺權威對位 */
.ui-toast {
    display: none; 
    position: fixed;
    /* 位置對位：置於頁面下方，避開最底部按鈕上方約 20px */
    top: 20px; 
    left: 50%;
    transform: translateX(-50%);
    
    /* 色彩對位：與啟動按鈕一致 (#0077ff) */
    background: #0077ff; 
    color: #ffffff;
    
    padding: 10px 20px;
    border-radius: 10px; /* 圓潤方圓感 */
    font-size: 13px;
    font-weight: 500;
    letter-spacing: 0.5px;
    white-space: nowrap;
    z-index: 9999999;
    
    /* 質感強化：深邃陰影與細微邊框 */
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.4);
    border: 1px solid rgba(255, 255, 255, 0.1);
}



/* 讓裡面的圖標跳動 */
#assetDropzone.drag-over i, 
#assetDropzone.drag-over .ui-icon {
    animation: bounceUp 0.6s infinite ease-in-out !important;
    color: #00d2ff !important;
}


#assetDropzone * {
    pointer-events: none; /* 防止子元素干擾拖拉事件 */
}
/* 珍珠引擎：資產躍動動畫定義 */
@keyframes bounceUp {
    0%, 100% { transform: translateY(0); }
    50% { transform: translateY(-12px); } /* 向上躍動的幅度 */
}

/* 當 drag-over 激活時，鎖定內部的 ui-icon 執行演繹 */
#assetDropzone.drag-over .ui-icon {
    display: inline-block; /* 賦予物理實體，使其可受 transform 驅動 */
    animation: bounceUp 0.6s infinite ease-in-out !important;
    filter: drop-shadow(0 0 5px rgba(0, 210, 255, 0.5)); /* 增加光暈感 */
}

/* 強化外框的職人藍對位 */
#assetDropzone.drag-over {
    border: 2px dashed #00d2ff !important;
    background-color: rgba(0, 210, 255, 0.08) !important;
    transition: all 0.3s ease;
}


/* 懸停躍動動畫協議 */
@keyframes cloudBounce {
    0%, 100% { transform: translateY(0) scale(1); }
    50% { transform: translateY(-15px) scale(1.05); } /* 向上躍動並微幅放大 */
}

/* 當 drag-over 激活時的物理表現 */
#assetDropzone.drag-over .ui-icon-svg {
    color: #00d2ff !important; /* 轉為職人藍 */
    animation: cloudBounce 0.8s infinite ease-in-out !important;
    filter: drop-shadow(0 5px 15px rgba(0, 210, 255, 0.3));
}

/* 確保容器置中 */
.ingestion-icon {
    display: flex;
    justify-content: center;
    align-items: center;
    padding: 20px 0;
}

/* 雲朵圖標：大尺寸與輕盈線條 */
.ui-icon-svg {
    width: 80px;  /* 讓它更大氣一點 */
    height: 80px;
    color: #444;
    transition: all 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275);
}

/* 懸停躍動：垂直位移與比例縮放同步 */
@keyframes cloudFloat {
    0%, 100% { transform: translateY(0); }
    50% { transform: translateY(-12px); }
}

#assetDropzone.drag-over .ui-icon-svg {
    color: #00d2ff !important;
    animation: cloudFloat 0.8s infinite ease-in-out !important;
    filter: drop-shadow(0 8px 12px rgba(0, 210, 255, 0.25));
}

.asset-preview-container {
	margin:0px !important;
	
    display: flex;             /* 啟動彈性分流 */
    align-items: center;       /* 垂直居中對齊 */
    gap: 0px;                 /* 左右軌道間距 */
    border-radius: 8px;
}
.asset-thumbnail {
    width: 150px;
    height:150px;
    object-fit: cover; /* 確保不變形 */
    border-radius: 12px; /* 職人級方圓弧度 */
    border: 2px solid #00d2ff;
    box-shadow: 0 4px 15px rgba(0, 210, 255, 0.3);
    /*margin: 10px auto;*/
}
/* 🚩 珍珠引擎：資產物理感知解封 */
.asset-thumbnail {
    cursor: grab !important;
    user-drag: element !important; /* 針對 Webkit 核心解封 */
    -webkit-user-drag: element !important;
    pointer-events: auto !important; /* 確保滑鼠抓得到 */
    user-select: none; /* 防止拉圖變成選文字 */
}

.asset-thumbnail:active {
    cursor: grabbing !important;
}
.ui-status-tag {
    background: #00d2ff;
    color: #fff;
    font-size: 10px;
    padding: 2px 8px;
    border-radius: 4px;
    text-transform: uppercase;
}

.engine-controls {
  display: flex;
  align-items: flex-end; /* 讓開關底部與按鈕底部對齊 */
  gap: 20px;
  background: #1a1a1a;
  padding: 12px;
  border-radius: 8px;
}

.toggle-vertical-group {
  display: flex;
  flex-direction: column; /* 強制垂直排列 */
  align-items: center;    /* 置中對齊標籤與開關 */
  gap: 6px;               /* 標籤與開關的間距 */
}

.toggle-label {
  color: #d4af37; /* 珍珠金，增加辨識度 */
  font-size: 12px;
  font-weight: 600;
  letter-spacing: 0.5px;
  text-transform: uppercase;
}

/* 實體切換開關樣式維持不變 */
.switch {
  position: relative;
  display: inline-block;
  width: 40px;
  height: 20px;
}

.switch input { opacity: 0; width: 0; height: 0; }

.slider {
  position: absolute;
  cursor: pointer;
  top: 0; left: 0; right: 0; bottom: 0;
  background-color: #333;
  transition: .4s;
  border-radius: 20px;
}

.slider:before {
  position: absolute;
  content: "";
  height: 14px; width: 14px;
  left: 3px; bottom: 3px;
  background-color: white;
  transition: .4s;
  border-radius: 50%;
}

input:checked + .slider { background-color: #d4af37; }
input:checked + .slider:before { transform: translateX(20px); }

/* 啟動按鈕 */
.primary-btn {
  background: #d4af37;
  color: #000;
  border: none;
  height: 38px; /* 調整高度與開關組合視覺平衡 */
  padding: 0 20px;
  border-radius: 4px;
  font-weight: bold;
  cursor: pointer;
}


/* 標籤容器：實施彈性對位 */
.section-label {
    display: flex;
    align-items: baseline;      /* 確保中英文基線對齊，展現職人細節 */
    gap: 8px;                   /* 中英文字距之物理隔離 */
    font-family: "PingFang TC", "Microsoft JhengHei", sans-serif;
    font-size: 14px;            /* 中文標題之主導字型 */
    font-weight: 700;           /* 強調權威感 */
    color: #f5f7f9;             /* 深邃灰，避免純黑的沉重感 */
    margin-bottom: 10px;        /* 與入選池之垂直間距 */
    letter-spacing: 1px;        /* 增加字體呼吸感 */
}

/* 英文副標：實施專業名詞之弱化處理 */
.section-label small {
    font-family: 'JetBrains Mono', 'Segoe UI', sans-serif;
    font-size: 10px;            /* 縮小比例，建立視覺階級 */
    font-weight: 400;           /* 減輕權重 */
    color: #95a5a6;             /* 採用次級灰 */
    text-transform: uppercase;  /* 強制大寫，呈現工業級規範感 */
    letter-spacing: 0.5px;
}
/* 🚩 [珍珠引擎] 動作組件物理對位協議 */
.copy-group {
    display: flex;          /* 啟動彈性佈局 */
    justify-content: flex-end; /* 🎯 核心語法：將子元素推向容器末端（右側） */
    gap: 8px;               /* 按鈕之間的物理間距，不需再寫 margin-right */
    width: 100%;            /* 確保容器撐滿寬度，才有空間靠右 */
	box-sizing: border-box;  /* 確保 padding 不會撐破容器寬度 */
    margin-top: 0px;
	margin-bottom:4px;       /* 視需求調整與上方內容的距離 */
}

.copy-action-bar {
    display: flex;          /* 啟動彈性佈局 */
    justify-content: flex-end; /* 🎯 核心語法：將子元素推向容器末端（右側） */
    gap: 8px;               /* 按鈕之間的物理間距，不需再寫 margin-right */
    width: 100%;            /* 確保容器撐滿寬度，才有空間靠右 */
    margin-top: 0px;       /* 視需求調整與上方內容的距離 */
	box-sizing: border-box;  /* 確保 padding 不會撐破容器寬度 */
	margin-bottom:4px;       /* 視需求調整與上方內容的距離 */
	padding-right: 8px;
}
.result-section{
	 width: 100%;
    border: 1px solid #333;
    border-radius: 4px;
    padding: 6px 6px;
    transition: border-color 0.3s ease;
    box-sizing: border-box;
	}
	

.ui-sub-text {
    font-size: 11px;
    color: #999;
    font-weight: 500;
}

/* 強化方圓按鈕質感 */
.btn-copy-mini {
    background: #ffffff;
    border: 1px solid #dcdfe6;
    border-radius: 4px; /* 精確方圓半徑 */
    padding: 2px 10px;
    font-size: 11px;
    color: #606266;
    cursor: pointer;
    white-space: nowrap;
}

.btn-copy-mini:hover {
    color: #409eff;
    border-color: #c6e2ff;
    background-color: #ecf5ff;
}

.btn-alchemy-secondary {
    background-color: #F90;
    border: 1px solid #ff9800; /* 採用警示橘，代表重新熔煉 */
    color: #fff;
    border-radius: 6px; /* 方圓校準 */
    padding: 10px 20px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
}

.btn-alchemy-secondary:hover {
    background-color: #fffaf0;
    box-shadow: 0 2px 8px rgba(255,152,0,0.2);
	color: #F90;
}

.btn-alchemy-primary {
    background-color: #4caf50; /* 採用成功綠，代表確認完成 */
    border: none;
    color: white;
    border-radius: 6px;
    padding: 10px 20px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
}

.btn-alchemy-primary:hover {
    background-color: #43a047;
    box-shadow: 0 2px 8px rgba(76,175,80,0.3);
}

/* 珍珠引擎：複製動作按鈕核心樣式 (Action Button Core) */
.btn-copy-action {
    /* 物理形狀：職人方圓校準 */
    border-radius: 4px; 
    border: 1px solid #dcdfe6;
    background-color: #0077ff;
    
    /* 字體與間距：微型標籤對位 */
    color: #FFF;
    font-size: 11px;
    font-weight: 500;
    padding: 2px 4px;
    
    /* 交互性能：物理反饋 */
    cursor: pointer;
    transition: all 0.2s cubic-bezier(0.645, 0.045, 0.355, 1);
    display: inline-flex;
    align-items: center;
    justify-content: center;
    outline: none;
    margin: 2px;
}

/* 懸停狀態：提權高亮 */
.btn-copy-action:hover {
    color: #409eff;
    border-color: #c6e2ff;
    background-color: #ecf5ff;
}

/* 點擊狀態：物理縮放感 */
.btn-copy-action:active {
    transform: scale(0.95);
    background-color: #d9ecff;
}

/* 成功狀態：CSP 交互反饋 (由 JS 動態掛載) */
.btn-copy-success {
    background-color: #f0f9eb !important;
    border-color: #67c23a !important;
    color: #67c23a !important;
}

/* 調味建議區塊：網格佈局協議 */
#seasoningContainer {
    display: grid;
   /* grid-template-columns: repeat(auto-fill, minmax(160px, 1fr));*/
    gap: 6px;
    margin: 8px 0;
    width: 100%;
}

.flavor-card {
    border: 1px solid #e0e0e0;
    border-radius: 6px; /* 職人方圓 */
    padding: 12px;
    background:  #121212;
    cursor: pointer;
    transition: transform 0.2s, border-color 0.2s;
}

.flavor-card:hover {
    border-color: #007aff;
    transform: translateY(-2px);
}

.pearl-icon {
    width: 52px;
    height: 52px;
    background: radial-gradient(circle at 30% 30%, #ffffff, #e8e8e8);
    border: 1px solid #dcdcdc;
    border-radius: 14px; /* 方圓美學對位 [2026-01-04] */
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    font-weight: bold;
    color: #888;
    transition: all 0.25s cubic-bezier(0.4, 0, 0.2, 1);
    box-shadow: 2px 2px 5px rgba(0,0,0,0.05);
}

.pearl-icon:hover {
    transform: translateY(-3px);
    border-color: #c9a063;
    color: #c9a063;
    box-shadow: 0 5px 15px rgba(201, 160, 99, 0.3);
}

.pearl-icon.active {
    background: #c9a063;
    color: white;
    border-color: #c9a063;
    transform: scale(0.95);
}
.pearl-chamber{
	position:relative;display: inline-block;
}
.pearl-tooltip-box {
    position: absolute;
    top: 350px;         /* 鎖定在 Container 上方（視珍珠高度微調） */
    left: 10px;         /* 鎖定在左側第一顆珍珠的起點 */
    width: auto;
    max-width: 280px;
    background: rgba(18, 18, 18, 0.95);
    border: 1px solid rgba(255, 215, 0, 0.4); /* 職人金邊緣 [2026-01-26] */
    border-radius: 8px;
    padding: 10px 15px;
    color: #fff;
    font-size: 13px;
    line-height: 1.5;
    z-index: 9999;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.5);
    transition: opacity 0.3s ease, transform 0.3s ease;
    pointer-events: none; /* 防止滑鼠干擾 */
}
/* 讓關鍵字像珍珠一樣橫向排隊 */
.tip-tags {
    display: flex;
    flex-wrap: wrap; 
    gap: 6px;
    margin-top: 10px;
}

.tip-tags span {
    display: inline-block;
    background: #333;
    padding: 2px 8px;
    border-radius: 4px;
    font-size: 11px;
    border: 0.5px solid #555;
}

/* 1. 父容器：執行流式對位協議 */
.pearl-chamber {
    display: flex;
    flex-wrap: wrap;       /* 🚩 關鍵：自動換行，一列多個 */
    gap: 8px;             /* 珍珠間距：保持職人呼吸感 */
    justify-content: flex-start;
    padding: 8px 0;
}

/* 2. 珍珠位元：執行垂直空間壓縮 */
.pearl-pill {
    flex: 0 1 auto;        /* 寬度隨文字長度自動調整 */
    height: 20px;          /* 🚩 高度壓縮：由 36px 降至 30px */
    padding: 0 8px;       /* 縮減左右內距 */
    background: linear-gradient(145deg, #ffffff, #f0f0f0);
    border: 1px solid #dcdcdc;
    border-radius: 8px;    /* 完美對位方圓甲型 [2026-01-04] */
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    font-size: 12px;       /* 字體微調：更顯精緻 */
    font-weight: 600;
    color: #444;
    transition: all 0.2s ease;
    white-space: nowrap;   /* 嚴禁斷行 */
    box-shadow: 1px 1px 3px rgba(0,0,0,0.05);
}

/* 3. 狀態對位 */
.pearl-pill.active {
    background: #c9a063;
    color: white;
    border-color: #c9a063;
    transform: translateY(-1px); /* 輕微浮動感 */
}

/* 珍珠引擎：動力底座物理校準 */
.dynamic-action-cluster {
    position: fixed; /* 🚩 鎖定底部，不隨內容滾動 */
    bottom: 0;
    left: 0;
    right: 0;
    padding: 15px 20px 25px;
    background: linear-gradient(to top, rgba(255,255,255,1) 80%, rgba(255,255,255,0));
    display: flex;
    gap: 12px;
    z-index: 2000;
}

/* 緊湊型按鈕 */
.dynamic-action-cluster button {
    height: 48px;
    border-radius: 12px;
    font-weight: 700;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

/* 🚩 珍珠引擎：定錨底座實體規格書 */
.pearl-portal-box {
    width: 100%;
    min-height: 120px; /* 確保 10 個關鍵字有足夠垂直空間 */
    background: rgba(10, 10, 10, 0.6);
    border: 1px double rgba(255, 215, 0, 0.3); /* 珍珠金雙線邊框 */
    border-radius: 12px;
    padding: 15px;
    margin-top: 15px;
    transition: all 0.3s ease;
    text-align: left;
}

.pearl-portal-box.active-glow {
    border-color: #ffd700;
    box-shadow: inset 0 0 15px rgba(255, 215, 0, 0.1);
}

.portal-placeholder {
    color: rgba(255, 255, 255, 0.3);
    text-align: center;
    line-height: 90px;
    font-size: 13px;
    letter-spacing: 2px;
}
/* 🚩 珍珠引擎：UI 狀態演繹協議 */
.premium-zone {
    border-top: 1px solid #ffd700; /* 金色分割線，暗示專業版 */
    margin-top: 15px;
    padding-top: 10px;
}

/* 當權限熔斷時的禁用狀態 */
.btn-exhausted {
    background-color: #ccc !important;
    cursor: not-allowed;
    filter: grayscale(1);
}

#quota-display.warning {
    color: #ff4d4d;
    font-weight: bold;
    animation: pulse 1s infinite;
}

/* 🚩 珍珠引擎：計數器視覺對位協議 */
.section-label {
    display: flex;
    justify-content: space-between;
    align-items: baseline;
    font-weight: 700;
    color: #d1d1d1; /* 職人灰 */
}

.vault-counter {
    font-family: 'Courier New', monospace; /* 儀表板風格 */
    font-size: 10px;
    color: #666;
    background: #2a2a2a;
    padding: 2px 6px;
    border-radius: 4px;
}

/* 超標預警 (雖然有 maxlength，但這是為了提示 User) */
.vault-counter.limit-reached {
    color: #ff4d4d;
    box-shadow: 0 0 5px rgba(255, 77, 77, 0.5);
}

/* 軌道一：私房調味 (金) */
.js0-flavor-trigger.active-pearl {
    background:  rgba(255, 215, 0, 0.2) !important;
    border: 1px solid #ffd700 !important;
    box-shadow: 0 0 10px rgba(255, 215, 0, 0.5);
	color:#CCC;
}

/* 軌道二：風格建議 (藍) */
.js-flavor-trigger.active-pearl {
    background: rgba(0, 191, 255, 0.2) !important;
    border: 1px solid #00bfff !important;
    box-shadow: 0 0 10px rgba(0, 191, 255, 0.5);
	color:#CCC;
}

/* 🚩 珍珠金庫：Tooltip 實體物理定義 */
#pearl-tooltip-vault {
    position: fixed;
    z-index: 9999;
    width: 280px; /* 固定寬度，確保在側欄中央 */
    left: 50%;
    transform: translateX(-50%); /* 永遠保持水平中央 */
    padding: 12px;
    background: rgba(28, 28, 28, 0.95);
    border: 1px solid rgba(255, 215, 0, 0.3);
    border-radius: 8px;
    color: #fff;
    font-size: 13px;
    pointer-events: none; /* 防止滑鼠撞擊 */
    display: none; /* 預設隱藏 */
    box-shadow: 0 4px 15px rgba(0,0,0,0.5);
    backdrop-filter: blur(4px);
	transition: opacity 0.2s cubic-bezier(0.4, 0, 0.2, 1), transform 0.2s ease-out;
    opacity: 0;
    transform: translate(-50%, 10px); /* 初始位移，產生微微上浮感 */
}
#pearl-tooltip-vault.active {
    display: block; /* 需配合 JS 移除 display: none */
    opacity: 1;
    transform: translate(-50%, 0);
}
.tip-tags {
    color: #ffd700;
    margin-top: 5px;
    font-size: 11px;
}
/* 特徵入選池：著陸導引 */
.input-vault.vault-ready {
    border-color: #ffd700;
    box-shadow: 0 0 10px rgba(255, 215, 0, 0.3);
    background: rgba(255, 215, 0, 0.02);
}

/* 像素縮圖定錨 */
.vault-preview-area {
    display: flex;
    gap: 8px;
    padding: 8px 0;
}

.pixel-anchor {
    position: relative;
    width: 50px;
    height: 50px;
    border: 1px solid #444;
    border-radius: 4px;
    overflow: hidden;
}

.vault-thumb-img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}
.btn-restricted {
    opacity: 0.4 !important;
    cursor: not-allowed !important;
    filter: grayscale(100%);
    pointer-events: none; /* 物理阻斷：連點擊事件都觸發不了 */
}

/* 🚩 珍珠引擎：資產區塊流光路徑 [2026-01-31] */
#assetDropzone.ingestion-block.is-processing {
    position: relative;
    border: 1px solid transparent; /* 讓出邊框位置 */
    background-clip: padding-box;
    transition: all 0.3s ease;
}

/* 核心流光層 */
#assetDropzone.ingestion-block.is-processing::before {
    content: '';
    position: absolute;
    top: -2px; left: -2px; right: -2px; bottom: -2px;
    z-index: -1;
    /* 職人級綠色流光 $$360^\circ$$ 旋轉 */
    background: conic-gradient(
        from var(--angle), 
        transparent 70%, 
        #00ff00 80%, 
        #00ff00 100%
    );
    border-radius: 12px; /* 對齊您原本的區塊圓角 */
    animation: pearl-spin 2s linear infinite;
}

/* 為了讓 conic-gradient 動起來，定義 CSS 變數 */
@property --angle {
  syntax: '<angle>';
  initial-value: 0deg;
  inherits: false;
}

@keyframes pearl-spin {
  from { --angle: 0deg; }
  to { --angle: 360deg; }
}


/* 🚩 佈局控制：分域顯示協議 */
.dual-pane-layout {
    display: flex;
    max-height:150px !important;
   /* border: 1px dashed #444;
    border-radius: 8px;
    background: #1a1a1a; */
}

/* 左側：純淨圖框 */
.perception-pane {
    flex: 1.5; /* 圖框佔比稍大 */
    border-right: 1px solid #333;
    position: relative;
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
}

/* 🎯 職人級：物理隱藏圖檔名稱與多餘資訊 */
.asset-preview-shield img {
    max-width: 100%;
    max-height: 100%;
    object-fit: cover;
}
.asset-preview-shield .file-info, 
.asset-preview-shield .status-tag {
    display: none !important; /* 強制移除名稱與對位標籤 */
}

/* 右側：脈衝監測區 */
.status-pane {
	min-height: 125px;
    flex: 0.8;
    padding: 8px;
    background: #222;
    display: flex;
    flex-direction: column;
    justify-content: center;
	border: 1px dashed #444;
    border-radius: 8px;
    background: #1a1a1a;
	transition: height 0.3s ease; 
    overflow: hidden;
	/*margin-bottom:12px;*/
}
.pulse-meter-box {
    /* 確保內層也是撐滿的 */
    height: 100%;
}

/* 預設隱藏但佔位的技巧 */
#userTierDisplay:empty::before {
    content: "\00a0"; /* 不可見的空白符，確保即使沒資料也有一個基本高度 */
    display: block;
    height: 40px; /* 預留給 PRO 標籤與效期的高度 */
}
.hub-label { font-size: 0.9rem; color: #888; margin-bottom: 6px; }
.pulse-bar-bg { height: 8px; background: #333; border-radius: 4px; overflow: hidden; margin-top: 10px; }
.pulse-bar-fill { height: 100%; width: 0%; background: #00ffcc; transition: width 0.3s ease; }

/* 🚩 [2026-02-02] 珍珠引擎：左側圖框視覺純淨化 CSS */

/* 1. 隱藏影像原料投放區下方的所有元數據 (檔名、大小、標籤) */
.image-ingestion-meta, 
.file-info-bar,
.tag-container,
.size-badge {
    display: none !important;
}

/* 2. 強化圖框本體：讓焦點只留在影像本身 */
.image-drop-zone {
    border: 1px dashed rgba(255, 255, 255, 0.2);
    background: rgba(0, 0, 0, 0.3);
    border-radius: 8px;
    transition: all 0.3s ease;
}

/* 3. 懸停時才顯現微光，不干擾平時視線 */
.image-drop-zone:hover {
    border-color: #0088ff;
    background: rgba(0, 136, 255, 0.05);
}

/* 🚩 實體銷毀：動態懸停顯影協議 */
#assetDropzone{
    position: relative;
    
}

/* 初始狀態：物理隱匿 */
.delete-trigger {
    position: absolute;
    top: 15px;
    right: 15px;
    width: 25px;
    height: 25px;
    border: 1.2px solid rgba(255, 255, 255, 0.7);
    border-radius: 6px;
    background: rgba(0, 0, 0, 0.2); /* 微暗底色確保線條在淺色圖上清晰 */
    cursor: pointer;
    z-index: 999 !important;
     pointer-events: auto !important; /* 確保自己能被點擊 */
    /* 核心：隱匿定錨 */
    opacity: 0; 
    visibility: hidden;
    transform: translateY(-5px); /* 微量位移，增加彈出感 */
    transition: all 0.25s cubic-bezier(0.4, 0, 0.2, 1);
}


/* 🚩 關鍵補強：當滑鼠在叉叉上時，強行將父容器變為「不可感應」狀態 */
.ingestion-ui:has(.delete-trigger:hover),
.asset-preview-container:has(.delete-trigger:hover) {
    pointer-events: none !important;
}
/* 🚩 確保父容器是定位基準 */
.ingestion-ui {
   position: relative;
    display: inline-block;
    border-radius: 8px;
    overflow: hidden;
}
/* 繪製極簡線條叉叉 */
.delete-trigger::before, .delete-trigger::after {
    content: '';
    position: absolute;
    top: 50%; left: 50%;
    width: 14px; height: 1.2px;
    background-color: white;
}
.delete-trigger::before { transform: translate(-50%, -50%) rotate(45deg); }
.delete-trigger::after { transform: translate(-50%, -50%) rotate(-45deg); }

.ingestion-ui:hover .delete-trigger,
.asset-preview-container:hover .delete-trigger {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
}
/* 懸停於按鈕本身時的強化反應 */
.delete-trigger:hover {
    background: rgba(255, 77, 79, 0.9); /* 轉為職人紅 */
    border-color: transparent;
}

.pearl-asset-row {
    display: flex;
    align-items: center;
    padding: 10px;
    border-bottom: 1px solid #e0e0e0;
    gap: 12px;
}

/* 一區：固定寬度縮圖 */
.zone-media {
    flex: 0 0 50px;
    height: 50px;
    border-radius: 4px;
    overflow: hidden;
    background: #f5f5f5;
}

/* 二區：自適應內容區 */
.zone-content {
    flex: 1;
    min-width: 0; /* 防止標題過長撐開佈局 */
}
.asset-title {
	width:165px;
    font-size: 13px;
    font-weight: 600;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}
.asset-timestamp {
    font-size: 11px;
    color: #888;
}

/* 三區：狀態/標籤 */
.zone-sector {
    flex: 0 0 60px;
    text-align: center;
}
.sector-badge {
    font-size: 10px;
    background: #f0f0f0;
    padding: 2px 6px;
    border-radius: 10px;
}

/* 四區：操作區 */
.zone-actions {
    flex: 0 0 30px;
}
.btn-erase {
    background: transparent;
    border: none;
    cursor: pointer;
    color: #ff4d4f;
    transition: transform 0.2s;
}
.btn-erase:hover {
    transform: scale(1.1);
}
/* 🚩 執行「影像填充補償協議」 */
.zone-media {
    flex: 0 0 45px;      /* 固定物理寬度 */
    height: 45px;       /* 固定物理高度 */
    border-radius: 6px;  /* 職人圓角定錨 */
    overflow: hidden;
    background: #f0f0f0; /* 緩衝底色 */
    border: 1px solid rgba(0,0,0,0.05);
}

.zone-media img {
    width: 100%;
    height: 100%;
    /* 🎯 關鍵：執行「非變形填充 (Cover Fit)」 */
    object-fit: cover; 
    /* 確保影像中心點對齊 */
    object-position: center; 
}
.zone-content {
    flex: 1;
    min-width: 0; /* 🚀 這是防止 Flexbox 溢出的關鍵物理設定 */
    padding-left: 10px;
}

.asset-title {
	width:165px;
    font-size: 13px;
    font-weight: 600;
    color: #556677;
    /* 🎯 執行「單行語義截斷」 */
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    margin-bottom: 2px;
}

.asset-timestamp {
    font-size: 10px;
    color: #95a5a6;
}
/* 🚩 執行「操作區位物理定錨協議」 */
.zone-actions {
    flex: 0 0 32px;        /* 🎯 強行定錨寬度，不准被擠壓 */
    display: flex;
    justify-content: center;
    align-items: center;
}

.btn-erase-trigger {
    width: 28px;
    height: 28px;
    padding: 0;
    border: none;
    background: transparent;
    cursor: pointer;
    display: flex;
    justify-content: center;
    align-items: center;
    transition: all 0.2s ease;
    border-radius: 4px;
}

/* 🚩 執行「圖示物理縮放約束」 */
.btn-erase-trigger img, 
.btn-erase-trigger svg {
    width: 16px;          /* 🎯 限制垃圾桶圖示的絕對尺寸 */
    height: 16px;
    filter: grayscale(1);  /* 預設冷調，符合職人視覺 */
    opacity: 0.4;
}

/* 🚩 執行「破壞性操作視覺預警」 */
.btn-erase-trigger:hover {
    background: rgba(255, 77, 79, 0.1); /* 淡淡的警告紅 */
}

.btn-erase-trigger:hover img,
.btn-erase-trigger:hover svg {
    filter: none;
    opacity: 1;
}

/* 🏛️ 模態層級定錨協議 */
#pearl-modal-overlay {
    position: fixed;
    top: 0; left: 0; width: 100%; height: 100%;
    background: rgba(0, 0, 0, 0.85); /* 執行深度遮蔽 */
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 1000000; /* 確保置頂於所有資產之上 */
    backdrop-filter: blur(4px); /* 執行視覺模糊補償 */
}

.pearl-modal-box {
    background: #1e1e1e;
    border: 1px solid #333;
    padding: 24px;
    border-radius: 12px;
    width: 85%;
    max-width: 320px;
    text-align: center;
    box-shadow: 0 10px 30px rgba(0,0,0,0.5);
}

.modal-actions {
    display: flex;
    gap: 12px;
    margin-top: 20px;
}

.btn-danger { background: #ff4d4f; color: white; border: none; padding: 10px; flex: 1; border-radius: 6px; cursor: pointer; }
.btn-secondary { background: #434343; color: white; border: none; padding: 10px; flex: 1; border-radius: 6px; cursor: pointer; }

/* 🚩 [2026-02-04] 執行：私房資產容器之物理隔離協議 */
#pearl-history-list {
    max-height: 400px;    /* 🎯 必須設定最大高度，讓它產生內部滾動 */
    overflow-y: auto;     /* 🎯 強制顯示內部滾動條 */
    overflow-x: hidden;
    padding-right: 5px;   /* 預留滾動條空間 */
}

/* 🚩 [2026-02-04] 執行：滾動條美化協議 (讓它專業且不突兀) */
#pearl-history-list::-webkit-scrollbar {
    width: 6px; /* 極細化設計 */
}

#pearl-history-list::-webkit-scrollbar-track {
    background: transparent;
}

#pearl-history-list::-webkit-scrollbar-thumb {
    background: #444; /* 深色職人調 */
    border-radius: 10px;
}

#pearl-history-list::-webkit-scrollbar-thumb:hover {
    background: #00d4ff; /* 激活時顯示科技藍 */
}

/* 🚩 珍珠引擎：物理轉場動畫 */
.fade-in-vault {
    animation: vaultEntrance 0.8s cubic-bezier(0.4, 0, 0.2, 1);
}

@keyframes vaultEntrance {
    from { opacity: 0; transform: scale(0.95) translateY(10px); filter: blur(10px); }
    to { opacity: 1; transform: scale(1) translateY(0); filter: blur(0); }
}

.pearl-spinner {
    border-top-color: #D4AF37; /* 黃金配色，示專業 */
}

.pearl-unit { display: flex; align-items: center; gap: 5px; position: relative; }
    .btn-pearl-main { width: 45px; height: 45px; border-radius: 50%; border: none; cursor: pointer; transition: 0.3s; box-shadow: 0 2px 5px rgba(0,0,0,0.2); }
    .btn-pearl-main.active { background: radial-gradient(circle, #fff 0%, #e0e0e0 100%); border: 2px solid #f0f0f0; }
    .btn-pearl-main.disabled { background: #dcdcdc; cursor: not-allowed; opacity: 0.6; }
    
    .btn-pearl-ctrl { width: 20px; height: 20px; border-radius: 50%; border: none; font-size: 12px; display: flex; align-items: center; justify-content: center; cursor: pointer; color: white; }
    .btn-add { background-color: #999; } /* 灰色新增鈕 */
    .btn-edit { background-color: #4A90E2; } /* 珍珠藍編輯鈕 */
	
/* 🚩 [珍珠引擎] 專屬發射器節點樣式 */
.p_emitter_sphere {
    width: 32px;
    height: 32px;
    border-radius: 50%;
    /* 珍珠虹光演算法 */
    background: radial-gradient(circle at 35% 35%, 
                #ffffff 0%, 
                #f2f2f2 30%, 
                #cecece 100%);
    box-shadow: 
        inset -1px -1px 4px rgba(0,0,0,0.2), 
        1px 2px 4px rgba(0,0,0,0.15);
    display: inline-block;
    vertical-align: middle;
    transition: transform 0.2s ease-in-out;
}

/* 激活狀態下的光澤增強 (Lustre Enhancement) */
.p_emitter_sphere.active_lustre {
    background: radial-gradient(circle at 35% 35%, 
                #fffaf0 0%, /* 帶一點奶油白 */
                #fdf5e6 40%, 
                #dcdcdc 100%);
    box-shadow: 
        inset -1px -1px 4px rgba(0,0,0,0.1), 
        0px 0px 8px rgba(255,255,255,0.8); /* 增加自發光感 */
}

/* 灰階去飽和狀態 (De-saturation) */
.p_emitter_sphere.void_status {
    background: #e0e0e0;
    filter: grayscale(100%);
    opacity: 0.4;
    box-shadow: none;
}

/* 滑鼠懸停：執行「物理縮放協議」 */
.p_emitter_sphere:hover {
    transform: scale(1.1);
}

/* 🚩 珍珠交互動態協議 */
.p_main_trigger[data-active="true"]:hover {
    transform: scale(1.2); /* 物理縮放感 */
    cursor: pointer;
    filter: brightness(1.2);
}

/* 如果您想做更專業的 Tooltip，可以用 CSS 偽元素 */
.p_main_trigger[data-active="true"]::after {
    /* 這裡可以寫自定義的黑底白字浮動框邏輯 */
}

/* 🚩 [2026-02-06] 文案說明欄：職人標配樣式 */
#outputDescription {
	width:95%;
    min-height: 120px;
    background: rgba(255, 255, 255, 0.05); /* 微透明質感 */
    color: #e0e0e0;
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 4px;
    padding: 8px;
    font-size: 14px;
    line-height: 1.4;
    resize: vertical; /* 僅允許垂直拉伸 */
    transition: border-color 0.3s ease;
    outline: none;
	overflow-y: auto;          /* 🎯 自動喚醒垂直捲軸 */
    overflow-x: hidden;        /* 🎯 物理封鎖水平溢出，防止左右晃動 */
    word-wrap: break-word;     /* 🎯 強制斷句，確保語義不穿牆 */
    scrollbar-width: thin;     /* 🎯 捲軸瘦身，維持職人級視覺美感 */	
    scrollbar-color: #444 transparent; /* [滑塊顏色] [軌道顏色] */
}

#outputDescription:focus {
    border-color: #00d4ff; /* 珍珠虹光色定錨 */
    background: rgba(255, 255, 255, 0.08);
}
/* 🎨 捲軸美化 (Webkit 專屬) */
#outputDescription::-webkit-scrollbar {
    width: 6px;
}
#outputDescription::-webkit-scrollbar-thumb {
    background: #444; /* 深色職人調 */
    border-radius: 10px;
} 
#outputDescription::-webkit-scrollbar-track {
    background: transparent;
}

#outputDescription::-webkit-scrollbar-thumb:hover {
    background: #00d4ff; /* 激活時顯示科技藍 */
}



/* 🚩 [珍珠引擎] 核心注入器樣式協議 */

/* 1. 容器：執行「玻璃擬態 (Glass-morphism)」定錨 */
.glass-morphism {
    background: rgba(255, 255, 255, 0.05);
    backdrop-filter: blur(12px);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 12px;
    padding: 20px;
    box-shadow: 0 8px 32px 0 rgba(0, 0, 0, 0.37);
}

/* 2. 標籤與提示文字 */
#premium_semantic_engine label {
    display: block;
    color: #e0e0e0;
    font-size: 0.9rem;
    margin-bottom: 12px;
	margin-top: 12px;
    font-weight: 600;
    letter-spacing: 1px;
}

.helper-text {
    color: #888;
    font-size: 0.75rem;
    margin-top: 10px;
    line-height: 1.4;
}

/* 3. 輸入組件：執行「物理交互路徑」優化 */
.input-feedback-group {
    position: relative;
    display: flex;
    align-items: center;
}

#semantic_input {
    width: 100%;
    background: rgba(0, 0, 0, 0.2);
    border: 1px solid #444;
    border-radius: 8px;
    padding: 12px 100px 12px 15px; /* 為右側 Badge 留空間 */
    color: #fff;
    font-size: 0.95rem;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

#semantic_input:focus {
    border-color: #00d4ff; /* 💎 珍珠引擎標誌色 */
    box-shadow: 0 0 15px rgba(0, 212, 255, 0.2);
    outline: none;
}

/* 4. ENTER Badge：執行「操作暗示提權」 */
.enter-badge {
    position: absolute;
    right: 10px;
    background: linear-gradient(135deg, #00d4ff, #0056b3);
    color: #fff;
    font-size: 0.5rem;
    font-weight: 800;
    padding: 2px 4px;
    border-radius: 4px;
    letter-spacing: 0.5px;
    pointer-events: none; /* 防止干擾點擊 */
    opacity: 0.7;
    transition: opacity 0.3s;
}

#semantic_input:focus + .enter-badge {
    opacity: 1;
    animation: pulse 2s infinite;
}

/* 5. 動效：執行「神經脈衝」模擬 */
@keyframes pulse {
    0% { box-shadow: 0 0 0 0 rgba(0, 212, 255, 0.4); }
    70% { box-shadow: 0 0 0 6px rgba(0, 212, 255, 0); }
    100% { box-shadow: 0 0 0 0 rgba(0, 212, 255, 0); }
}	

/* 🚩 [珍珠引擎] 標籤物理沉澱動效 */
.pearl-tag {
    display: inline-flex;
    align-items: center;
    background: rgba(0, 212, 255, 0.1);
    border: 1px solid rgba(0, 212, 255, 0.3);
    color: #00d4ff;
    padding: 5px 12px;
    border-radius: 20px;
    margin: 5px;
    font-size: 0.85rem;
    animation: dropIn 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275) forwards;
}

@keyframes dropIn {
    0% { opacity: 0; transform: translateY(-20px) scale(0.8); }
    100% { opacity: 1; transform: translateY(0) scale(1); }
}

.tag-close {
    margin-left: 8px;
    cursor: pointer;
    opacity: 0.5;
}

.tag-close:hover {
    opacity: 1;
    color: #ff4d4d;
}

/* 🚩 [珍珠引擎] 模態層級定錨協議 - 修正版 */
#modal-overlay {
    position: fixed;
    top: 0; left: 0; width: 100%; height: 100%;
    background: rgba(0, 0, 0, 0.85);
    z-index: 9999;
    backdrop-filter: blur(4px);
    
    /* 🎯 移除原本的 display: flex，改由 JS 控制或使用輔助類 */
    display: none; 
    align-items: center;
    justify-content: center;
}

/* 🎯 增加一個啟動類，確保 flex 與顯示同步 */
#modal-overlay.active {
    display: flex !important;
}

/* 🚩 [珍珠引擎] 控制台專屬樣式 */
#pearl-console-overlay {
    position: fixed;
    top: 0; left: 0; width: 100%; height: 100%;
    background: rgba(0, 0, 0, 0.9); /* 更深邃的遮蔽 */
    display: none; /* 由 JS 控制 */
    align-items: center; justify-content: center;
    z-index: 10001; /* 權限最高，蓋過一般警示框 */
    backdrop-filter: blur(12px);
}

.pearl-modal-content.glass-morphism {
    width: 90%; max-width: 550px;
    background: #121212;
    border: 1px solid #00d4ff33; /* 珍珠藍邊框 */
    padding: 25px; border-radius: 20px;
    box-shadow: 0 0 40px rgba(0, 212, 255, 0.1);
}

.console-title { color: #00d4ff; margin-bottom: 20px; font-size: 1.2rem; }
.inventory-label { color: #666; font-size: 0.8rem; margin: 15px 0 10px; }

/* 🚩 [珍珠引擎] 原生模態視窗協議樣式 */

/* 1. 遮罩層：執行「環境遮斷」 */
.pearl-modal-overlay {
    position: fixed;
    top: 0; left: 0;
    width: 100%; height: 100%;
    background: rgba(0, 0, 0, 0.85);
    backdrop-filter: blur(10px); /* 🎯 讓主介面深度模糊 */
    display: none; /* 初始隱藏 */
    justify-content: center;
    align-items: center;
    z-index: 9999; /* 確保在最頂層 */
}

/* 2. 視窗本體：執行「玻璃擬態定錨」 */
.pearl-modal-content {
    width: 90%;
    max-width: 600px;
    background: #1a1a1a;
    border: 1px solid rgba(255, 255, 255, 0.15);
    border-radius: 16px;
    padding: 30px;
    box-shadow: 0 20px 50px rgba(0,0,0,0.5);
    position: relative;
    animation: modalSlideIn 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

@keyframes modalSlideIn {
    from { transform: translateY(30px); opacity: 0; }
    to { transform: translateY(0); opacity: 1; }
}

/* 3. 關閉按鈕：執行「物理銷毀行為」 */
.pearl-modal-close {
    position: absolute;
    top: 15px; right: 20px;
    color: #888;
    font-size: 24px;
    cursor: pointer;
    transition: color 0.2s;
}
.pearl-modal-close:hover { color: #fff; }

/* 藍色執行按鈕：職人圓角鎖定 */
.btn-insert {
    background: #0077ff;
    color: white;
    border: none;
    padding: 2px 6px;
    border-radius: 4px !important;
    cursor:  pointer;
    transition: background 0.3s;	
}

.btn-insert:hover { background: #0066dd; }

.pearl-label-mini{
	display: flex;
    justify-content: space-between;
    align-items: center;
	border-bottom: 1px solid #CCC;
	margin-top:10px;
}
.pearl-capsule{
	display: flex;
    justify-content: space-between;
    align-items: center;
	cursor: default;
	border-bottom:1px #999 solid;
}

.pearl-remove-btn {
    width: 28px;
    height: 28px;
    padding: 0;
    border: none;
    background: transparent;
    cursor: pointer;
    display: flex;
    justify-content: center;
    align-items: center;
    transition: all 0.2s ease;
    border-radius: 4px;
}

/* 🚩 執行「圖示物理縮放約束」 */
.pearl-remove-btn img, 
.pearl-remove-btn svg {
    width: 16px;          /* 🎯 限制垃圾桶圖示的絕對尺寸 */
    height: 16px;
    filter: grayscale(1);  /* 預設冷調，符合職人視覺 */
    opacity: 0.4;
}

/* 🚩 執行「破壞性操作視覺預警」 */
.pearl-remove-btn:hover {
    background: rgba(255, 77, 79, 0.1); /* 淡淡的警告紅 */
}

.pearl-remove-btn:hover img,
.pearl-remove-btn:hover svg {
    filter: none;
    opacity: 1;
}


.pearl-field-safe {
    width: 90%;
    background: rgba(0, 0, 0, 0.2);
    border: 1px solid #444;
    border-radius: 8px;
    padding: 8px 15px 8px 15px; /* 為右側 Badge 留空間 */
    color: #fff;
    font-size: 0.95rem;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.pearl-field-safe:focus {
    border-color: #00d4ff; /* 💎 珍珠引擎標誌色 */
    box-shadow: 0 0 15px rgba(0, 212, 255, 0.2);
    outline: none;
}

.btn-premium-upgrade {
    width: 100%;
    background: #0077ff;
    color: white;
    border: none;
    padding: 4px;
    border-radius: 4px !important;
    font-weight: 300;
    cursor: pointer;
    transition: background 0.3s;
}
/* --- 📂 珍珠引擎：資產協議彈窗物理樣式 --- */

/* 1. 遮罩層：負責鎖定全螢幕與模糊背景 */
.Amodal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.85); /* 深層遮蓋 */
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 99999; /* 絕對頂層，確保不被儀表板遮擋 */
    backdrop-filter: blur(6px); /* 珍珠質感毛玻璃 */
    animation: pearlFadeIn 0.3s ease-out;
}

/* 2. 視窗本體 */
.Amodal-window {
    background: #1a1a1a;
    width: 92%; /* 側邊欄空間有限，稍微撐寬一點點 */
    max-width: 480px;
    max-height: 85vh; /* 🚩 核心：高度限制在螢幕的 85%，預留上下間隙 */
    border-radius: 12px;
    border: 1px solid rgba(255, 215, 0, 0.3);
    box-shadow: 0 20px 50px rgba(0, 0, 0, 0.7);
    display: flex; /* 改用 flex 結構 */
    flex-direction: column;
    overflow: hidden; /* 隱藏外溢 */
}
/* 3. 標題與內容細節 */
.Amodal-header {
    padding: 16px 20px;
    background: #252525;
    display: flex;
    justify-content: space-between;
    align-items: center;
    border-bottom: 1px solid #333;
}

.Amodal-title { color: #FFD700; font-weight: 600; font-size: 15px; }

.Amodal-close-btn {
    position: absolute;
    top: 60px; right: 30px;
    color: #888;
    font-size: 24px;
    cursor: pointer;
    transition: color 0.2s;
}

.Amodal-close-btn { 
    cursor: pointer; font-size: 24px; color: #666; transition: 0.2s; 
}
.Amodal-close-btn:hover { color: #fff; }

.Amodal-body {
    padding: 20px;
    color: #d1d5db;
    font-size: 13px;
    line-height: 1.6;
    overflow-y: auto; /* 🚩 核心：當內容超過高度時，自動開啟垂直滾動 */
    flex: 1; /* 自動填滿剩餘高度 */
}
/* 職人級：客製化滾動條 (讓它跟整體質感一致) */
.Amodal-body::-webkit-scrollbar {
    width: 4px;
}
.Amodal-body::-webkit-scrollbar-track {
    background: #111;
}
.Amodal-body::-webkit-scrollbar-thumb {
    background: #FFD700; /* 珍珠金滾動條 */
    border-radius: 10px;
}
.protocol-section h4 { margin: 0 0 12px 0; font-size: 15px; }
.tier-pro-title { color: #FFD700; }
.tier-free-title { color: #9ca3af; }

.protocol-section ul { padding-left: 20px; margin: 0; }
.protocol-section li { margin-bottom: 10px; }

.protocol-divider { height: 1px; background: rgba(255,255,255,0.1); margin: 20px 0; }

.Amodal-footer { 
    padding: 12px; background: #111; font-size: 11px; color: #555; text-align: center; 
}

/* 4. 動態效果 */
@keyframes pearlFadeIn {
    from { opacity: 0; transform: scale(0.95); }
    to { opacity: 1; transform: scale(1); }
}

.fade-out {
    opacity: 0;
    transition: opacity 0.3s ease;
}

/* 🎯 專屬關閉按鈕樣式，不汙染其他 Modal */
.protocol-specific-close { 
    cursor: pointer; 
    font-size: 24px; 
    color: #666; 
    transition: 0.2s; 
    line-height: 1;
}

.protocol-specific-close:hover { 
    color: #FFD700; /* 懸停時變珍珠金，與整體色系對位 */
}

/* 確保這個特定 Overlay 的 ID 具備最高權限 */
#pearl-protocol-overlay {
    z-index: 100001; /* 設得比您原本的 Modal 更高，避免被疊在下面 */
}
#protocol-info-btn {
    display: inline-flex;
    align-items: center;
    cursor: pointer;
    transition: all 0.3s ease;
    color: rgba(255, 255, 255, 0.5); /* 平時低調 */
}

#protocol-info-btn:hover {
    color: #FFD700; /* 懸停變珍珠金 */
    filter: drop-shadow(0 0 5px rgba(255, 215, 0, 0.4));
    transform: scale(1.1); /* 輕微放大 */
}

/* 🚩 珍珠引擎：沙漏翻轉協議 (更具物理感) */
@keyframes hourglass-flip {
    0%, 90% { transform: rotate(0); }
    100% { transform: rotate(180deg); }
}

.spinner {
    display: inline-block;
    animation: hourglass-flip 1.5s ease-in-out infinite;
}

/* 🚩 珍珠引擎：層疊權限加固 */
#pearl-donate-modal {
    /* 確保覆蓋整個視窗 */
    display: none; 
    position: fixed; 
    top: 0; 
    left: 0; 
    width: 100%; 
    height: 100%;
    
    /* 物理頂層定錨 */
    z-index: 2147483647 !important; 
    
    /* 居中協議 */
    align-items: center;
    justify-content: center;
    background: rgba(0, 0, 0, 0.8);
    backdrop-filter: blur(4px); /* 職人級：背景模糊提升質感 */
}
/* 💎 珍珠引擎：AI 分析文案唯讀容器 */
.ai-analysis-viewer {
    /* 🎯 1. 物理尺寸與溢出控制 */
    height: 70px;
    max-height: 70px;
    overflow-y: auto;          /* 垂直溢出時啟用捲軸 */
    overflow-x: hidden;        /* 嚴禁水平晃動 */
    
    /* 🎯 2. 交互行為鎖定 */
    user-select: text;         /* 允許選取複製 (方便老爹取用文案) */
    pointer-events: auto;      /* 確保捲軸可滑動 */
    cursor: default;           /* 顯示為一般箭頭，暗示不可編輯 */
    
    /* 🎯 3. 視覺風格優化 */
    padding: 12px;
    background: rgba(255, 255, 255, 0.05); /* 輕微深色底襯托文案 */
    border-radius: 8px;
    border: 1px solid rgba(255, 255, 255, 0.1);
    
    /* 🎯 4. 字體與排版規範 */
    font-size: 14px;
    line-height: 1.2;
    color: #d1d1d1;
    white-space: pre-wrap;     /* 保持 AI 回傳的換行格式 */
    word-break: break-all;     /* 防止長網址破壞排版 */
}

/* 🎯 5. 職人級捲軸美化 (對齊暗色系 UI) */
.ai-analysis-viewer::-webkit-scrollbar {
    width: 6px;
}
.ai-analysis-viewer::-webkit-scrollbar-track {
    background: transparent;
}
.ai-analysis-viewer::-webkit-scrollbar-thumb {
    background: rgba(255, 255, 255, 0.2);
    border-radius: 10px;
}

/* 🎯 珍珠引擎：歷史紀錄容器物理封裝 */
#pearl-history-container {
    background: #1a1a1a;
    border: 1px solid #333;
    border-radius: 8px;
    padding: 15px;
    margin-top: 20px;
    color: #e0e0e0;
}

/* 🔍 搜尋定錨器樣式 */
.pearl-search-box {
    margin-bottom: 15px;
    position: relative;
}

#history-search-input {
    width: 100%;
    background: #000;
    border: 1px solid #444;
    border-radius: 4px;
    padding: 10px 12px;
    color: #00ffc3; /* 珍珠引擎招牌：電訊綠 */
    font-family: 'JetBrains Mono', monospace;
    font-size: 14px;
    transition: border-color 0.3s ease;
    box-sizing: border-box;
}

#history-search-input:focus {
    outline: none;
    border-color: #00ffc3;
    box-shadow: 0 0 8px rgba(0, 255, 195, 0.2);
}

/* 📜 歷史列表滾動協議 */
#pearl-history-list {
    max-height: 400px;
    overflow-y: auto;
	overflow-x: hidden;
    padding-right: 5px;
}

/* 每一筆「私房菜」紀錄的物理表現 */
.history-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 12px;
    border-bottom: 1px solid #2a2a2a;
    transition: background 0.2s;
    cursor: pointer;
}

.history-item:hover {
    background: #252525;
}

.history-item .asset-info {
    flex: 1;
}

.history-item .asset-title {
   
}

.history-item .asset-meta {
    font-size: 12px;
    color: #888;
}

/* 🛠️ 動作按鈕：下載或重現 */
.history-action-btn {
    background: transparent;
    border: 1px solid #00ffc3;
    color: #00ffc3;
    padding: 4px 10px;
    font-size: 12px;
    border-radius: 3px;
    margin-left: 10px;
}

.history-action-btn:hover {
    background: #00ffc3;
    color: #000;
}

/* 💡 客製化滾動條：職人黑 */
#pearl-history-list::-webkit-scrollbar {
    width: 6px;
}
#pearl-history-list::-webkit-scrollbar-track {
    background: #111;
}
#pearl-history-list::-webkit-scrollbar-thumb {
    background: #444;
    border-radius: 3px;
}

/* ⚡ 珍珠引擎：掃描動畫協議 */
.pearl-loading-state {
    padding: 30px;
    text-align: center;
    color: #00ffc3; /* 電訊綠 */
    font-family: 'JetBrains Mono', monospace;
    font-size: 14px;
    letter-spacing: 1px;
}

.scanner-dot {
    display: inline-block;
    animation: pearl-scan 0.8s infinite ease-in-out;
    margin-right: 8px;
}

@keyframes pearl-scan {
    0%, 100% { opacity: 1; transform: scale(1.2); filter: drop-shadow(0 0 5px #00ffc3); }
    50% { opacity: 0.3; transform: scale(0.8); }
}

/* 查無資料的物理表現 */
.pearl-empty-state {
    padding: 40px;
    text-align: center;
    color: #666;
    font-size: 13px;
}
#premium-upgrade-section{
	margin-top:15px;
}
.pearl-capsule .pearl-text{
	width:250px;
	overflow:hidden;
	text-overflow: ellipsis;
	white-space:nowrap;
}
.ui-divider{
	border: 0; border-top: 1px solid #000; margin: 6px 0;
	}
#latestPearlPulse{
	position:relative;
	
	}	
	