/**
 * 龍記水電潔具工程 — 智能客服與預約系統（/AI/）
 * 對話界面樣式
 * Copyright © 2024–2026 龍記水電潔具工程。版權所有。詳見 ../COPYRIGHT.txt
 */
/* 龍記 AI 聊天 — 米拓簡介模塊適配（全繁體） */
.lungkee-ai-chat {
 /* 官網深藍 + 金點綴（float_touch 母版 · 與 05-21 參考版一致） */
 --lj-primary: #0f2d4a;
 --lj-primary-light: #1a4a72;
 --lj-primary-dark: #0b1f3a;
 --lj-accent-gold: #c9a227;
 --lj-accent-gold-light: #e8c55a;
 --lj-bg: #f6f7f9;
 --lj-surface: #ffffff;
 --lj-border: #dde3ea;
 --lj-text: #1e293b;
 --lj-muted: #64748b;
 --lj-user-bubble: #123a5c;
 --lj-bot-bubble: #ffffff;
 --lj-radius: 14px;
 --lj-shadow: 0 4px 24px rgba(11, 31, 58, 0.1);
 --lj-composer-bg: #ffffff;
 --lj-composer-border: rgba(15, 45, 74, 0.22);
 --lj-composer-focus: rgba(201, 162, 39, 0.2);
 --lj-send-gradient: linear-gradient(145deg, #0b1f3a 0%, #123a5c 52%, #1a4a72 100%);
 --lj-send-gradient-hover: linear-gradient(145deg, #123a5c 0%, #1a4a72 48%, #245a88 100%);
 --lj-send-shadow: 0 4px 16px rgba(11, 31, 58, 0.38);

 font-family: "Microsoft JhengHei", "PingFang TC", "Noto Sans TC", sans-serif;
 font-size: 15px;
 color: var(--lj-text);
 max-width: 720px;
 margin: 0 auto;
 border-radius: calc(var(--lj-radius) + 4px);
 overflow: visible;
 box-shadow: var(--lj-shadow);
 border: 1px solid var(--lj-border);
 background: var(--lj-surface);
}

.lungkee-ai-chat__header {
 display: flex;
 align-items: center;
 gap: 14px;
 padding: 16px 18px;
 background: linear-gradient(
 160deg,
 var(--lj-primary-dark) 0%,
 var(--lj-primary) 46%,
 var(--lj-primary-light) 100%
 );
 color: var(--lj-header-text, #fff);
 border-bottom: 1px solid rgba(201, 162, 39, 0.38);
 border-radius: calc(var(--lj-radius) + 4px) calc(var(--lj-radius) + 4px) 0 0;
 overflow: visible;
 position: relative;
 z-index: 2;
}

.lungkee-ai-chat__brand-slot {
 flex-shrink: 0;
}

/* AI 粒子頭像 — 全站同款（header / launcher / msg 僅尺寸不同） */
.longji-ai-orb {
 --lj-orb-px: 38px;
 --lj-orb-label: 10px;
 --lj-orb-perspective: 72px;
 --lj-orb-glow-inset: -2px;
 --lj-orb-core-border: 1.5px;

 position: relative;
 flex-shrink: 0;
 width: var(--lj-orb-px);
 height: var(--lj-orb-px);
 display: flex;
 align-items: center;
 justify-content: center;
}

.longji-ai-orb--header {
 --lj-orb-px: 52px;
 --lj-orb-label: 14px;
 --lj-orb-perspective: 96px;
 --lj-orb-glow-inset: -3px;
 --lj-orb-core-border: 2px;
}

.longji-ai-orb--launcher {
 --lj-orb-px: 64px;
 --lj-orb-label: 18px;
 --lj-orb-perspective: 96px;
 --lj-orb-glow-inset: -3px;
 --lj-orb-core-border: 2px;
}

.longji-ai-orb--login {
 --lj-orb-px: 100px;
 --lj-orb-label: 22px;
 --lj-orb-perspective: 120px;
 --lj-orb-glow-inset: -5px;
 --lj-orb-core-border: 2.5px;
}

.longji-ai-orb--planet-lg {
 --lj-orb-px: 86px;
 --lj-orb-label: 18px;
 --lj-orb-perspective: 100px;
 --lj-orb-glow-inset: -4px;
 --lj-orb-core-border: 2px;
}

.longji-ai-orb--planet-md {
 --lj-orb-px: 62px;
 --lj-orb-label: 13px;
 --lj-orb-perspective: 80px;
 --lj-orb-glow-inset: -3px;
 --lj-orb-core-border: 1.5px;
}

.longji-ai-orb--planet-sm {
 --lj-orb-px: 42px;
 --lj-orb-label: 10px;
 --lj-orb-perspective: 64px;
 --lj-orb-glow-inset: -2px;
 --lj-orb-core-border: 1.5px;
}

.longji-ai-orb--msg {
 --lj-orb-px: 38px;
 --lj-orb-label: 10px;
 --lj-orb-perspective: 72px;
}

/* 對話 header／訊息旁：靜態 AI 球（DOM 無 canvas／glow，無粒子迴圈） */
.longji-ai-orb--header .longji-ai-orb__globe,
.longji-ai-orb--header .longji-ai-orb__globe-base,
.longji-ai-orb--header .longji-ai-orb__globe-ball,
.longji-ai-orb--header .longji-ai-orb__globe-grid,
.longji-ai-orb--dialog .longji-ai-orb__globe,
.longji-ai-orb--dialog .longji-ai-orb__globe-base,
.longji-ai-orb--dialog .longji-ai-orb__globe-ball,
.longji-ai-orb--dialog .longji-ai-orb__globe-grid {
 animation: none !important;
 transform: none !important;
}

.longji-ai-orb--header .longji-ai-orb__globe-scene,
.longji-ai-orb--dialog .longji-ai-orb__globe-scene {
 perspective: none;
}

.longji-ai-orb--header .longji-ai-orb__globe-ball,
.longji-ai-orb--dialog .longji-ai-orb__globe-ball {
 display: flex;
 align-items: center;
 justify-content: center;
 transform: none !important;
 transform-style: flat;
}

.longji-ai-orb--header .longji-ai-orb__globe-base,
.longji-ai-orb--dialog .longji-ai-orb__globe-base {
 background: radial-gradient(circle at 35% 28%, #3a7aaa 0%, #0a2848 52%, #050810 100%);
}

.longji-ai-orb--header .longji-ai-orb__core-label,
.longji-ai-orb--dialog .longji-ai-orb__core-label {
 position: static;
 inset: auto;
 transform: none;
 z-index: 4;
 font-weight: 800;
 letter-spacing: 0.06em;
 line-height: 1;
 animation: none !important;
 -webkit-text-fill-color: #ffffff;
 color: #ffffff;
}

.longji-ai-orb--header .longji-ai-orb__core {
 width: 88%;
 height: 88%;
 border-color: rgba(0, 242, 254, 0.55);
 box-shadow:
 0 0 8px rgba(0, 242, 254, 0.28),
 inset 0 0 10px rgba(8, 4, 24, 0.55);
}

/* 對話框訊息旁（--dialog 覆寫 msg 尺寸） */
.longji-ai-orb--dialog .longji-ai-orb__canvas,
.longji-ai-orb--dialog .longji-ai-orb__glow {
 display: none !important;
}

.longji-ai-orb--dialog {
 --lj-orb-px: 36px;
}

.longji-ai-orb--dialog .longji-ai-orb__core {
 width: 88%;
 height: 88%;
}

.longji-ai-orb__canvas {
 position: absolute;
 inset: 0;
 width: 100%;
 height: 100%;
 border-radius: 50%;
 pointer-events: none !important;
 z-index: 1;
}

/* 外圈霓虹：launcher／login／planet 粒子球；header／msg 已改靜態 DOM */
.longji-ai-orb--login .longji-ai-orb__glow,
.longji-ai-orb--planet-lg .longji-ai-orb__glow,
.longji-ai-orb--planet-md .longji-ai-orb__glow,
.longji-ai-orb--planet-sm .longji-ai-orb__glow {
 position: absolute;
 inset: var(--lj-orb-glow-inset);
 border-radius: 50%;
 border: 2.5px solid #00f2fe;
 background: transparent;
 box-shadow:
 0 0 10px rgba(0, 242, 254, 0.55),
 0 0 22px rgba(0, 180, 255, 0.28),
 inset 0 0 14px rgba(120, 60, 200, 0.12);
 animation: lj-neon-ring-pulse 3.2s ease-in-out infinite;
 z-index: 2;
 pointer-events: none;
}

@keyframes lj-neon-ring-pulse {
 0%,
 100% {
 border-color: #00f2fe;
 transform: scale(1);
 box-shadow:
 0 0 12px rgba(0, 242, 254, 0.75),
 0 0 24px rgba(0, 242, 254, 0.35),
 inset 0 0 12px rgba(0, 120, 180, 0.1);
 }
 50% {
 border-color: #e879f9;
 transform: scale(1.04);
 box-shadow:
 0 0 14px rgba(232, 121, 249, 0.8),
 0 0 26px rgba(167, 139, 250, 0.4),
 inset 0 0 14px rgba(140, 60, 200, 0.14);
 }
}

.longji-ai-orb__core {
 position: relative;
 z-index: 3;
 width: 62%;
 height: 62%;
 border-radius: 50%;
 display: flex;
 align-items: center;
 justify-content: center;
 overflow: hidden;
 border: var(--lj-orb-core-border) solid rgba(186, 230, 255, 0.75);
 box-shadow:
 0 0 10px rgba(0, 242, 254, 0.35),
 0 0 16px rgba(232, 121, 249, 0.2),
 inset 0 0 12px rgba(8, 4, 24, 0.65);
 background: radial-gradient(circle at 42% 38%, #1a1040 0%, #0c0820 42%, #050810 100%);
}

/* 中間 AI 球 — 3D 地球旋轉 */
.longji-ai-orb__globe {
 position: absolute;
 inset: 0;
 border-radius: 50%;
 overflow: hidden;
 transform-origin: 50% 50%;
 animation: lj-globe-shell-spin 10s linear infinite;
 will-change: transform;
}

.longji-ai-orb__globe-base {
 position: absolute;
 inset: 0;
 border-radius: 50%;
 background:
 radial-gradient(circle at 28% 24%, rgba(140, 235, 255, 0.65) 0%, transparent 42%),
 radial-gradient(circle at 72% 78%, rgba(0, 25, 55, 0.95) 0%, transparent 48%),
 linear-gradient(145deg, #0c5a88 0%, #083a62 38%, #0a2848 72%, #1a7aaa 100%);
 animation: lj-globe-base-spin 7s linear infinite;
}

.longji-ai-orb__globe-scene {
 position: absolute;
 inset: 0;
 display: flex;
 align-items: center;
 justify-content: center;
 perspective: var(--lj-orb-perspective);
 perspective-origin: 50% 50%;
}

.longji-ai-orb__globe-ball {
 position: relative;
 width: 100%;
 height: 100%;
 transform-style: preserve-3d;
 transform: rotateZ(16deg);
 animation: lj-globe-wire-spin 5.2s linear infinite;
}

.longji-ai-orb__ring {
 position: absolute;
 inset: 2%;
 border-radius: 50%;
 border: 1px solid rgba(90, 225, 255, 0.5);
 box-shadow:
 0 0 4px rgba(56, 210, 255, 0.35),
 inset 0 0 3px rgba(56, 210, 255, 0.12);
 box-sizing: border-box;
 transform-style: preserve-3d;
}

.longji-ai-orb__ring:nth-child(1) {
 transform: rotateY(0deg);
}

.longji-ai-orb__ring:nth-child(2) {
 transform: rotateY(60deg);
 border-color: rgba(120, 235, 255, 0.38);
}

.longji-ai-orb__ring:nth-child(3) {
 transform: rotateY(120deg);
 border-color: rgba(64, 200, 255, 0.42);
}

.longji-ai-orb__ring--eq {
 transform: rotateX(90deg);
 border-color: rgba(160, 245, 255, 0.55);
 box-shadow: 0 0 6px rgba(100, 230, 255, 0.45);
}

.longji-ai-orb__globe-grid {
 position: absolute;
 inset: -8%;
 border-radius: 50%;
 opacity: 0.55;
 background:
 repeating-linear-gradient(
 0deg,
 transparent 0,
 transparent 3px,
 rgba(64, 220, 255, 0.14) 3px,
 rgba(64, 220, 255, 0.14) 4px
 ),
 repeating-linear-gradient(
 90deg,
 transparent 0,
 transparent 5px,
 rgba(64, 220, 255, 0.1) 5px,
 rgba(64, 220, 255, 0.1) 6px
 );
 mask: radial-gradient(circle, #000 58%, transparent 62%);
 -webkit-mask: radial-gradient(circle, #000 58%, transparent 62%);
 mix-blend-mode: screen;
 animation: lj-globe-grid-spin 9s linear infinite reverse;
 pointer-events: none;
}

@keyframes lj-globe-wire-spin {
 from {
 transform: rotateZ(16deg) rotateY(0deg);
 }
 to {
 transform: rotateZ(16deg) rotateY(360deg);
 }
}

@keyframes lj-globe-base-spin {
 from {
 transform: rotate(0deg);
 }
 to {
 transform: rotate(360deg);
 }
}

@keyframes lj-globe-grid-spin {
 from {
 transform: rotate(0deg);
 }
 to {
 transform: rotate(360deg);
 }
}

@keyframes lj-globe-shell-spin {
 from {
 transform: rotate(0deg);
 }
 to {
 transform: rotate(360deg);
 }
}

/* 中間 AI 字：置於 globe-ball 內，隨 3D 線框球一齊轉 */
.longji-ai-orb__core-label {
 position: absolute;
 inset: 0;
 z-index: 5;
 display: flex;
 align-items: center;
 justify-content: center;
 margin: 0;
 font-weight: 800;
 font-size: var(--lj-orb-label);
 line-height: 1;
 letter-spacing: 0.02em;
 pointer-events: none;
 color: #ffffff;
 -webkit-text-fill-color: #ffffff;
 background: none;
 text-shadow:
 0 0 2px rgba(255, 255, 255, 1),
 0 0 10px rgba(0, 242, 254, 0.85),
 0 0 18px rgba(167, 139, 250, 0.55);
 animation: lj-ai-label-neon 2.8s ease-in-out infinite;
 transform-style: flat;
 backface-visibility: hidden;
}

@keyframes lj-ai-label-neon {
 0%,
 100% {
 text-shadow:
 0 0 2px rgba(255, 255, 255, 1),
 0 0 12px rgba(0, 242, 254, 0.95),
 0 0 20px rgba(0, 242, 254, 0.45);
 }
 50% {
 text-shadow:
 0 0 2px rgba(255, 255, 255, 1),
 0 0 12px rgba(232, 121, 249, 0.9),
 0 0 22px rgba(167, 139, 250, 0.5);
 }
}

/* 備選：金白流光 data-ai-label-theme="gold" */
.lungkee-ai-chat-float-host[data-ai-label-theme='gold'] .longji-ai-orb__core-label,
.lungkee-ai-chat[data-ai-label-theme='gold'] .longji-ai-orb__core-label,
#lungkee-ai-chat-root[data-ai-label-theme='gold'] .longji-ai-orb__core-label {
 background: linear-gradient(
 115deg,
 #ffffff 0%,
 #ffe566 35%,
 #ffffff 55%,
 #ffd84d 75%,
 #ffffff 100%
 );
 background-size: 280% 100%;
 -webkit-background-clip: text;
 background-clip: text;
 -webkit-text-fill-color: transparent;
 color: transparent;
 animation: lj-ai-label-flow 3.8s ease-in-out infinite;
 text-shadow: none;
 filter:
 drop-shadow(0 0 2px #fff)
 drop-shadow(0 0 10px rgba(255, 220, 100, 0.85));
}

/* 備選：霓虹薄荷（data-ai-label-theme="mint"） */
.lungkee-ai-chat-float-host[data-ai-label-theme='mint'] .longji-ai-orb__core-label,
.lungkee-ai-chat[data-ai-label-theme='mint'] .longji-ai-orb__core-label,
#lungkee-ai-chat-root[data-ai-label-theme='mint'] .longji-ai-orb__core-label {
 --lj-ai-label-gradient: linear-gradient(
 115deg,
 #ffffff 0%,
 #b9ffe8 22%,
 #ffffff 40%,
 #5dffc8 55%,
 #ffffff 72%,
 #9dffd9 88%,
 #ffffff 100%
 );
 --lj-ai-label-glow:
 drop-shadow(0 0 2px #fff)
 drop-shadow(0 0 10px rgba(93, 255, 200, 0.9))
 drop-shadow(0 0 14px rgba(45, 220, 160, 0.45));
}

/* 備選：龍記品牌綠白（data-ai-label-theme="brand"） */
.lungkee-ai-chat-float-host[data-ai-label-theme='brand'] .longji-ai-orb__core-label,
.lungkee-ai-chat[data-ai-label-theme='brand'] .longji-ai-orb__core-label,
#lungkee-ai-chat-root[data-ai-label-theme='brand'] .longji-ai-orb__core-label {
 --lj-ai-label-gradient: linear-gradient(
 115deg,
 #ffffff 0%,
 #b8f5d4 22%,
 #ffffff 42%,
 #5fe0a8 58%,
 #ffffff 76%,
 #9ef0c8 90%,
 #ffffff 100%
 );
 --lj-ai-label-glow:
 drop-shadow(0 0 2px #fff)
 drop-shadow(0 0 10px rgba(120, 240, 180, 0.9))
 drop-shadow(0 0 14px rgba(45, 143, 111, 0.45));
}

@keyframes lj-ai-label-flow {
 0% {
 background-position: 0% 50%;
 }
 50% {
 background-position: 100% 50%;
 }
 100% {
 background-position: 0% 50%;
 }
}

.longji-ai-orb--msg .longji-ai-orb__core-label,
.longji-ai-orb--dialog .longji-ai-orb__core-label {
 font-size: max(9px, calc(var(--lj-orb-px) * 0.3));
 letter-spacing: -0.04em;
 z-index: 6;
}

.lungkee-ai-chat__msg-avatar {
 margin-bottom: 2px;
}

@media (prefers-reduced-motion: reduce) {
 .longji-ai-orb__core-label {
 animation: none;
 color: #ffffff;
 -webkit-text-fill-color: #ffffff;
 text-shadow:
 0 0 2px #fff,
 0 0 8px rgba(0, 242, 254, 0.7);
 }

.longji-ai-orb--login .longji-ai-orb__glow,
.longji-ai-orb--planet-lg .longji-ai-orb__glow,
.longji-ai-orb--planet-md .longji-ai-orb__glow,
.longji-ai-orb--planet-sm .longji-ai-orb__glow {
 animation: none;
 border-color: #67e8f9;
 opacity: 0.92;
 }

 .longji-ai-orb__globe,
 .longji-ai-orb__globe,
 .longji-ai-orb__globe-base,
 .longji-ai-orb__globe-ball,
 .longji-ai-orb__globe-grid {
 animation: none;
 }
}

.lungkee-ai-chat__header-main {
 flex: 1;
 min-width: 0;
}

.lungkee-ai-chat__status {
 display: inline-block;
 width: 7px;
 height: 7px;
 border-radius: 50%;
 background: #22c55e;
 box-shadow: 0 0 0 2px rgba(34, 197, 94, 0.3);
 margin-right: 4px;
 vertical-align: middle;
 flex-shrink: 0;
}

.lungkee-ai-chat__status--online {
 background: #22c55e;
 box-shadow: 0 0 0 2px rgba(34, 197, 94, 0.35);
}

.lungkee-ai-chat__status--busy {
 background: #fbbf24;
 box-shadow: 0 0 0 2px rgba(251, 191, 36, 0.4);
 animation: lj-api-pulse 1.2s ease-in-out infinite;
}

.lungkee-ai-chat__status--away {
 background: #ef4444;
 box-shadow:
 0 0 0 3px rgba(239, 68, 68, 0.55),
 0 0 14px rgba(239, 68, 68, 0.85);
 animation: lj-api-pulse-red 0.7s ease-in-out infinite;
}

.lungkee-ai-chat__status--error {
 background: #ef4444;
 box-shadow: 0 0 0 2px rgba(239, 68, 68, 0.45);
 animation: lj-api-pulse 0.85s ease-in-out infinite;
}

.lungkee-ai-chat__status--off {
 background: #64748b;
 box-shadow: none;
 opacity: 0.35;
 animation: none;
}

.lungkee-ai-chat[data-operator-group='booking'] .lungkee-ai-chat__status-text,
.lungkee-ai-chat[data-operator-group='appointment'] .lungkee-ai-chat__status-text {
  color: #94a3b8;
  font-weight: 500;
}

.lungkee-ai-chat__mgmt-strip {
 display: flex;
 align-items: center;
 gap: 8px;
 padding: 0.5rem 0.85rem;
 font-size: 0.8rem;
 line-height: 1.35;
 color: #e0f2fe;
 background: linear-gradient(90deg, rgba(14, 116, 144, 0.55), rgba(30, 64, 175, 0.45));
 border-bottom: 2px solid rgba(56, 189, 248, 0.65);
 box-shadow: 0 4px 14px rgba(14, 165, 233, 0.2);
}

.lungkee-ai-chat__mgmt-strip[hidden] {
 display: none !important;
}

.lungkee-ai-chat__mgmt-strip.is-processing {
 background: linear-gradient(90deg, rgba(180, 83, 9, 0.45), rgba(14, 116, 144, 0.5));
 border-bottom-color: rgba(251, 191, 36, 0.7);
}

.lungkee-ai-chat__mgmt-pulse {
 width: 9px;
 height: 9px;
 border-radius: 50%;
 background: #38bdf8;
 box-shadow: 0 0 0 3px rgba(56, 189, 248, 0.35);
 animation: lj-mgmt-pulse 1.1s ease-in-out infinite;
 flex-shrink: 0;
}

.lungkee-ai-chat__mgmt-strip.is-processing .lungkee-ai-chat__mgmt-pulse {
 background: #fbbf24;
 box-shadow: 0 0 0 3px rgba(251, 191, 36, 0.4);
}

@keyframes lj-mgmt-pulse {
 0%,
 100% {
 opacity: 1;
 transform: scale(1);
 }
 50% {
 opacity: 0.55;
 transform: scale(1.2);
 }
}

.lungkee-ai-chat__mgmt-title {
 font-weight: 800;
 letter-spacing: 0.02em;
}

.lungkee-ai-chat__mgmt-sub {
 font-weight: 600;
 color: #bae6fd;
}

.lungkee-ai-chat[data-operator-group='booking'] .lungkee-ai-chat__header,
.lungkee-ai-chat[data-operator-group='appointment'] .lungkee-ai-chat__header {
  box-shadow:
    inset 0 -3px 0 rgba(56, 189, 248, 0.75),
    0 0 18px rgba(14, 165, 233, 0.22);
}

/* PICS 聲明卡（全端基礎；漂浮／現代主題另有覆寫） */
.lungkee-ai-chat__bubble--pics {
 padding: 0;
 overflow: hidden;
}

.lungkee-ai-chat__pics-statement {
 display: block;
 max-height: min(52vh, 420px);
 overflow-y: auto;
 padding: 12px 14px;
 font-size: 13px;
 line-height: 1.55;
 white-space: pre-wrap;
 word-break: break-word;
 color: var(--lj-text, #2c2419);
 -webkit-overflow-scrolling: touch;
}

.lungkee-ai-chat__pics-footer-hint {
 margin: 0;
 padding: 10px 12px;
 font-size: 13px;
 font-weight: 600;
 line-height: 1.45;
 text-align: center;
 color: #fff;
 background: var(--lj-pics-footer-bg, var(--lj-operator-accent, #c62828));
}

.lungkee-ai-chat__msg--bot[data-operator-group='booking']:not([data-booking-pics-statement='1'])
 .lungkee-ai-chat__bubble:not(.lungkee-ai-chat__bubble--pics):not(.lungkee-ai-chat__bubble--typing),
.lungkee-ai-chat__msg--bot[data-operator-group='appointment']:not([data-booking-pics-statement='1'])
 .lungkee-ai-chat__bubble:not(.lungkee-ai-chat__bubble--pics):not(.lungkee-ai-chat__bubble--typing) {
 color: var(--lj-message-bot-text, var(--lj-operator-bot-text, #c62828));
}

.lungkee-ai-chat__msg--bot[data-operator-group='booking'] .lungkee-ai-chat__bubble--stream,
.lungkee-ai-chat__msg--bot[data-operator-group='appointment'] .lungkee-ai-chat__bubble--stream {
  color: var(--lj-operator-bot-text, #c62828);
}

.lungkee-ai-chat__msg--bot[data-operator-group='booking'] .lungkee-ai-chat__bubble--stream::after,
.lungkee-ai-chat__msg--bot[data-operator-group='appointment'] .lungkee-ai-chat__bubble--stream::after {
  color: var(--lj-operator-bot-text, #c62828);
}

.lungkee-ai-chat__msg--bot[data-operator-group='booking'] .lungkee-ai-chat__typing-label,
.lungkee-ai-chat__msg--bot[data-operator-group='appointment'] .lungkee-ai-chat__typing-label {
  color: var(--lj-operator-bot-text, #c62828);
  font-weight: 600;
}

.lungkee-ai-chat__msg--bot[data-operator-group='booking'] .lungkee-ai-chat__typing-dots span,
.lungkee-ai-chat__msg--bot[data-operator-group='appointment'] .lungkee-ai-chat__typing-dots span {
  background: var(--lj-operator-bot-text, #c62828);
}

.lungkee-ai-chat__input-stack {
 display: flex;
 flex-direction: column;
 gap: 10px;
 margin-bottom: 10px;
}

.lungkee-ai-chat__service-dock {
 display: flex;
 flex-direction: column;
 gap: 8px;
}

.lungkee-ai-chat__service-frame {
 display: grid;
 grid-template-columns: 1fr 1fr;
 gap: 8px;
 padding: 6px;
 border-radius: 16px;
 border: 1px solid rgba(26, 95, 74, 0.28);
 background: linear-gradient(168deg, rgba(255, 255, 255, 0.99), rgba(240, 253, 250, 0.94));
 box-shadow:
 0 2px 12px rgba(26, 95, 74, 0.08),
 inset 0 1px 0 rgba(255, 255, 255, 0.95);
}

.lungkee-ai-chat__service-btn {
 display: flex;
 flex-direction: column;
 align-items: center;
 justify-content: center;
 gap: 2px;
 min-height: 52px;
 padding: 8px 6px;
 border-radius: 12px;
 border: 1.5px solid rgba(15, 118, 110, 0.45);
 cursor: pointer;
 touch-action: manipulation;
 color: #fff;
 background: linear-gradient(155deg, #0f766e, #1a5f4a 58%, #14532d);
 box-shadow: 0 3px 12px rgba(26, 95, 74, 0.28);
 transition:
 transform 0.15s,
 box-shadow 0.15s,
 background 0.15s,
 border-color 0.15s;
}

.lungkee-ai-chat__service-btn-label {
 font-size: 14px;
 font-weight: 800;
 letter-spacing: 0.04em;
 line-height: 1.2;
}

.lungkee-ai-chat__service-btn-sub {
 font-size: 11px;
 font-weight: 600;
 letter-spacing: 0.02em;
 line-height: 1.25;
 color: rgba(236, 253, 245, 0.92);
}

.lungkee-ai-chat__mgmt-exit-row {
 display: flex;
 flex-direction: column;
 align-items: stretch;
 gap: 6px;
 justify-content: center;
 margin: 0;
 width: 100%;
}

.lungkee-ai-chat__mgmt-exit-row[hidden] {
 display: none !important;
}

.lungkee-ai-chat__wizard-progress-row {
 display: block;
 width: 100%;
 flex-shrink: 0;
 min-height: 0;
 box-sizing: border-box;
}

.lungkee-ai-chat__wizard-progress-caption {
 margin: 0 0 4px;
 padding: 0 2px;
 font-size: 12px;
 line-height: 1.35;
 font-weight: 600;
 letter-spacing: 0.02em;
 text-align: center;
 color: #14532d;
}

.lungkee-ai-chat__wizard-progress-caption[hidden] {
 display: none !important;
}

.lungkee-ai-chat--maint-suite .lungkee-ai-chat__wizard-progress-caption {
 color: rgba(226, 232, 240, 0.92);
 text-shadow: 0 1px 2px rgba(0, 0, 0, 0.35);
}

.lungkee-ai-chat__wizard-progress-row[hidden] {
 display: none !important;
}

.lungkee-ai-chat__wizard-progress--dock {
 width: 100%;
 padding: 2px 0 6px;
 box-sizing: border-box;
 flex-shrink: 0;
}

.lungkee-ai-chat__wizard-progress--dock .lungkee-ai-chat__wizard-progress-track {
 width: 100%;
 height: 8px;
 min-height: 8px;
 flex-shrink: 0;
 border-radius: 999px;
 background: rgba(15, 23, 42, 0.12);
 border: 1px solid rgba(26, 95, 74, 0.22);
 overflow: hidden;
 box-shadow: inset 0 1px 2px rgba(15, 23, 42, 0.08);
}

.lungkee-ai-chat__wizard-progress--dock .lungkee-ai-chat__wizard-progress-fill {
 display: block;
 height: 100%;
 min-height: 8px;
 width: 0;
 min-width: 0;
 border-radius: inherit;
 background: linear-gradient(90deg, #1a5f4a 0%, #2d8f6f 55%, #5eead4 100%);
 box-shadow: 0 0 8px rgba(45, 143, 111, 0.45);
 transition: width 0.4s ease;
}

.lungkee-ai-chat--maint-suite .lungkee-ai-chat__wizard-progress--dock .lungkee-ai-chat__wizard-progress-track {
 background: rgba(148, 163, 184, 0.28);
 border-color: rgba(125, 211, 252, 0.35);
 box-shadow: inset 0 1px 3px rgba(0, 0, 0, 0.35);
}

.lungkee-ai-chat--maint-suite .lungkee-ai-chat__wizard-progress--dock .lungkee-ai-chat__wizard-progress-fill:not([class*='is-wizard-progress--']) {
 background: linear-gradient(90deg, #0284c7 0%, #38bdf8 50%, #7dd3fc 100%);
 box-shadow: 0 0 10px rgba(56, 189, 248, 0.55);
}

.lungkee-ai-chat__wizard-progress-fill.is-wizard-progress--gradient {
 background: linear-gradient(
  90deg,
  var(--lj-wizard-progress-primary, #1a5f4a) 0%,
  #2d8f6f 55%,
  #5eead4 100%
 );
}

.lungkee-ai-chat__wizard-progress-fill.is-wizard-progress--breathe {
 animation: lj-wizard-progress-breathe 2.4s ease-in-out infinite;
}

.lungkee-ai-chat__wizard-progress-fill.is-wizard-progress--spark::after {
 content: '';
 position: absolute;
 top: 50%;
 right: 0;
 width: 10px;
 height: 10px;
 margin-top: -5px;
 border-radius: 50%;
 background: rgba(255, 255, 255, 0.95);
 box-shadow: 0 0 8px rgba(255, 255, 255, 0.85);
 animation: lj-wizard-progress-spark 1.2s ease-in-out infinite;
}

.lungkee-ai-chat__wizard-progress-fill.is-wizard-progress--shimmer {
 position: relative;
 overflow: hidden;
}

.lungkee-ai-chat__wizard-progress-fill.is-wizard-progress--shimmer::before {
 content: '';
 position: absolute;
 inset: 0;
 border-radius: inherit;
 pointer-events: none;
 background: linear-gradient(
  105deg,
  transparent 0%,
  transparent 38%,
  var(--lj-wizard-progress-shimmer-highlight, rgba(255, 255, 255, 0.92)) 50%,
  transparent 62%,
  transparent 100%
 );
 background-size: 220% 100%;
 background-position: 200% 0;
 opacity: var(--lj-wizard-progress-shimmer-intensity, 0.65);
 animation: lj-wizard-progress-shimmer 2s linear infinite;
 mix-blend-mode: screen;
}

.lungkee-ai-chat__wizard-progress-row.is-wizard-progress-style-pulse_shimmer
 .lungkee-ai-chat__wizard-progress-fill.is-wizard-progress--shimmer.is-wizard-progress--breathe {
 animation: lj-wizard-progress-breathe 2.4s ease-in-out infinite;
}

.lungkee-ai-chat__wizard-progress-row.is-wizard-progress--no-anim
 .lungkee-ai-chat__wizard-progress-fill.is-wizard-progress--shimmer::before,
.lungkee-ai-chat__wizard-progress-fill.is-wizard-progress--shimmer.is-wizard-progress--no-anim::before {
 animation: none !important;
 opacity: 0 !important;
}

.lungkee-ai-chat__wizard-progress-row.is-wizard-progress--dim-pending
 .lungkee-ai-chat__wizard-progress-track {
 opacity: 0.55;
}

.lungkee-ai-chat__wizard-progress--no-anim .lungkee-ai-chat__wizard-progress-fill,
.lungkee-ai-chat__wizard-progress-fill.is-wizard-progress--no-anim {
 animation: none !important;
 transition: width 0.15s linear !important;
}

.lungkee-ai-chat__wizard-progress--dock .lungkee-ai-chat__wizard-progress-fill {
 position: relative;
}

@keyframes lj-wizard-progress-breathe {
 0%,
 100% {
  opacity: 1;
  filter: brightness(1);
 }
 50% {
  opacity: 0.82;
  filter: brightness(1.08);
 }
}

@keyframes lj-wizard-progress-spark {
 0%,
 100% {
  opacity: 0.35;
  transform: scale(0.85);
 }
 50% {
  opacity: 1;
  transform: scale(1.15);
 }
}

@keyframes lj-wizard-progress-shimmer {
 0% {
  background-position: 200% 0;
 }
 100% {
  background-position: -200% 0;
 }
}

.lungkee-ai-chat__wizard-progress-row.is-wizard-progress-style-minimal_flat
 .lungkee-ai-chat__wizard-progress--dock
 .lungkee-ai-chat__wizard-progress-track {
 height: 6px;
 min-height: 6px;
}

.lungkee-ai-chat__wizard-progress-row.is-wizard-progress-style-minimal_flat
 .lungkee-ai-chat__wizard-progress-fill {
 box-shadow: none;
}

.lungkee-ai-chat__wizard-progress-row.is-wizard-progress-style-minimal_flat
 .lungkee-ai-chat__wizard-progress-fill:not(.is-wizard-progress--gradient) {
 background: var(--lj-wizard-progress-primary, #0d6efd);
}

.lungkee-ai-chat__wizard-progress-row.is-wizard-progress-style-pulse_shimmer
 .lungkee-ai-chat__wizard-progress-fill.is-wizard-progress--gradient {
 filter: saturate(1.12);
}

.lungkee-ai-chat__wizard-progress-row.is-wizard-progress-style-bright_star_finish
 .lungkee-ai-chat__wizard-progress--dock
 .lungkee-ai-chat__wizard-progress-track {
 position: relative;
 overflow: visible;
 height: 10px;
 min-height: 10px;
}

.lungkee-ai-chat__wizard-progress-row.is-wizard-progress-style-bright_star_finish
 .lungkee-ai-chat__wizard-progress--dock
 .lungkee-ai-chat__wizard-progress-fill {
 position: relative;
 min-height: 10px;
 box-shadow: 0 0 8px rgba(94, 234, 212, 0.28);
}

.lungkee-ai-chat__wizard-progress-row.is-wizard-progress-style-bright_star_finish
 .lungkee-ai-chat__wizard-progress-fill.is-wizard-progress--gradient {
 filter: saturate(1.15) brightness(1.05);
}

.lungkee-ai-chat__wizard-progress-row.is-wizard-progress-style-bright_star_finish
 .lungkee-ai-chat__wizard-progress-fill.is-wizard-progress--shimmer {
 overflow: visible;
}

/* 順滑流光（全程） */
.lungkee-ai-chat__wizard-progress-row.is-wizard-progress-style-bright_star_finish
 .lungkee-ai-chat__wizard-progress-fill.is-wizard-progress--shimmer::before {
 content: '';
 position: absolute;
 top: 0;
 left: 0;
 width: 42%;
 height: 100%;
 border-radius: inherit;
 pointer-events: none;
 background: linear-gradient(
  90deg,
  transparent 0%,
  rgba(255, 255, 255, 0.28) 38%,
  rgba(255, 255, 255, 0.88) 50%,
  rgba(255, 255, 255, 0.28) 62%,
  transparent 100%
 );
 opacity: 0.9;
 will-change: transform;
 transform: translate3d(-130%, 0, 0);
 animation: lj-wizard-progress-shimmer-slide 2.1s linear infinite;
}

/* 尾端光點（貼 bar 右端，唔用星形字）— 每步 pulse 到位閃一下 */
.lungkee-ai-chat__wizard-progress-row.is-wizard-progress-style-bright_star_finish
 .lungkee-ai-chat__wizard-progress-fill.is-wizard-progress--shimmer::after {
 content: '';
 position: absolute;
 top: 50%;
 right: 0;
 width: 12px;
 height: 12px;
 margin: 0;
 border-radius: 50%;
 pointer-events: none;
 transform: translate3d(50%, -50%, 0) scale(0.4);
 opacity: 0;
 background: radial-gradient(
  circle,
  rgba(255, 255, 255, 1) 0%,
  rgba(255, 255, 255, 0.92) 42%,
  rgba(186, 230, 253, 0.55) 68%,
  transparent 78%
 );
 box-shadow:
  0 0 6px rgba(255, 255, 255, 0.95),
  0 0 14px rgba(125, 211, 252, 0.75);
}

.lungkee-ai-chat__wizard-progress-row.is-wizard-progress-style-bright_star_finish
 .lungkee-ai-chat__wizard-progress-fill.is-wizard-progress--shimmer.is-wizard-progress--tail-spark::after {
 animation: lj-wizard-progress-tail-hit 0.44s ease-out 1 forwards;
}

.lungkee-ai-chat--maint-suite
 .lungkee-ai-chat__wizard-progress-row.is-wizard-progress-style-bright_star_finish
 .lungkee-ai-chat__wizard-progress-fill.is-wizard-progress--shimmer::after {
 box-shadow:
  0 0 8px rgba(255, 255, 255, 1),
  0 0 18px rgba(56, 189, 248, 0.85);
}

@keyframes lj-wizard-progress-shimmer-slide {
 0% {
  transform: translate3d(-130%, 0, 0);
 }
 100% {
  transform: translate3d(320%, 0, 0);
 }
}

@keyframes lj-wizard-progress-tail-hit {
 0% {
  opacity: 0.15;
  transform: translate3d(50%, -50%, 0) scale(0.35);
  filter: brightness(1);
 }
 28% {
  opacity: 1;
  transform: translate3d(50%, -50%, 0) scale(1.35);
  filter: brightness(2.1);
 }
 100% {
  opacity: 0;
  transform: translate3d(50%, -50%, 0) scale(0.55);
  filter: brightness(1);
 }
}

.lungkee-ai-chat__wizard-progress-row.is-wizard-progress-style-calm_static
 .lungkee-ai-chat__wizard-progress-fill {
 box-shadow: none;
}

.lungkee-ai-chat-float-layer .lungkee-ai-chat__wizard-progress-row,
#longji-ai-float-layer .lungkee-ai-chat__wizard-progress-row,
.lungkee-ai-chat-float-layer .lungkee-ai-chat__wizard-progress--dock,
#longji-ai-float-layer .lungkee-ai-chat__wizard-progress--dock {
 width: 100% !important;
 max-width: 100% !important;
 flex-shrink: 0 !important;
 box-sizing: border-box !important;
}

#longji-ai-float-layer .lungkee-ai-chat--maint-suite .lungkee-ai-chat__wizard-progress--dock .lungkee-ai-chat__wizard-progress-track,
.lungkee-ai-chat-float-layer .lungkee-ai-chat--maint-suite .lungkee-ai-chat__wizard-progress--dock .lungkee-ai-chat__wizard-progress-track {
 background: rgba(148, 163, 184, 0.38);
 border-color: rgba(125, 211, 252, 0.45);
}

#longji-ai-float-layer
 .lungkee-ai-chat--maint-suite
 .lungkee-ai-chat__wizard-progress--dock
 .lungkee-ai-chat__wizard-progress-fill:not([class*='is-wizard-progress--']),
.lungkee-ai-chat-float-layer
 .lungkee-ai-chat--maint-suite
 .lungkee-ai-chat__wizard-progress--dock
 .lungkee-ai-chat__wizard-progress-fill:not([class*='is-wizard-progress--']) {
 background: linear-gradient(90deg, #0284c7 0%, #38bdf8 50%, #7dd3fc 100%);
 box-shadow: 0 0 12px rgba(56, 189, 248, 0.65);
}

.lungkee-ai-chat--maint-suite .lungkee-ai-chat__wizard-progress--dock .lungkee-ai-chat__wizard-progress-fill.is-wizard-progress--gradient,
#longji-ai-float-layer
 .lungkee-ai-chat--maint-suite
 .lungkee-ai-chat__wizard-progress--dock
 .lungkee-ai-chat__wizard-progress-fill.is-wizard-progress--gradient,
.lungkee-ai-chat-float-layer
 .lungkee-ai-chat--maint-suite
 .lungkee-ai-chat__wizard-progress--dock
 .lungkee-ai-chat__wizard-progress-fill.is-wizard-progress--gradient {
 background: linear-gradient(
  90deg,
  var(--lj-wizard-progress-primary, #0284c7) 0%,
  #38bdf8 55%,
  #7dd3fc 100%
 );
}

.lungkee-ai-chat--maint-suite
 .lungkee-ai-chat__wizard-progress-row[class*='is-wizard-progress-style-']
 .lungkee-ai-chat__wizard-progress-fill.is-wizard-progress--shimmer,
#longji-ai-float-layer
 .lungkee-ai-chat--maint-suite
 .lungkee-ai-chat__wizard-progress-row[class*='is-wizard-progress-style-']
 .lungkee-ai-chat__wizard-progress-fill.is-wizard-progress--shimmer::before,
.lungkee-ai-chat-float-layer
 .lungkee-ai-chat--maint-suite
 .lungkee-ai-chat__wizard-progress-row[class*='is-wizard-progress-style-']
 .lungkee-ai-chat__wizard-progress-fill.is-wizard-progress--shimmer::before {
 mix-blend-mode: screen;
}

#longji-ai-float-layer
 .lungkee-ai-chat__wizard-progress-row.is-wizard-progress-style-minimal_flat
 .lungkee-ai-chat__wizard-progress--dock
 .lungkee-ai-chat__wizard-progress-track,
.lungkee-ai-chat-float-layer
 .lungkee-ai-chat__wizard-progress-row.is-wizard-progress-style-minimal_flat
 .lungkee-ai-chat__wizard-progress--dock
 .lungkee-ai-chat__wizard-progress-track {
 height: 6px !important;
 min-height: 6px !important;
}

.lungkee-ai-chat__mgmt-exit-btn {
 width: 100%;
 min-height: 44px;
 padding: 10px 16px;
 border-radius: 12px;
 border: 1.5px solid rgba(26, 95, 74, 0.45);
 background: #fff;
 color: #14532d;
 font-size: 14px;
 font-weight: 700;
 letter-spacing: 0.04em;
 cursor: pointer;
 touch-action: manipulation;
 transition:
 background 0.15s,
 border-color 0.15s,
 transform 0.15s;
}

.lungkee-ai-chat__mgmt-exit-btn:hover {
 background: rgba(236, 253, 245, 0.95);
 transform: translateY(-1px);
}

.lungkee-ai-chat__service-btn:hover {
 transform: translateY(-1px);
}

.lungkee-ai-chat__service-btn:active {
 transform: translateY(0);
}

.lungkee-ai-chat__service-dock[hidden] {
 display: none !important;
}

.lungkee-ai-chat__input-stack .lungkee-ai-chat__composer {
 margin: 0;
}

@keyframes lj-api-pulse {
 0%,
 100% {
 opacity: 1;
 transform: scale(1);
 }
 50% {
 opacity: 0.65;
 transform: scale(1.15);
 }
}

.lungkee-ai-chat__status-text {
 font-weight: 600;
 margin-right: 0.15rem;
}

.lungkee-ai-chat.is-api-away .lungkee-ai-chat__status-text {
 color: #fca5a5;
 font-weight: 700;
 text-shadow: 0 0 12px rgba(239, 68, 68, 0.45);
}

.lungkee-ai-chat.is-api-error .lungkee-ai-chat__status-text {
 color: #fecaca;
}

.lungkee-ai-chat.is-api-busy .lungkee-ai-chat__status-text {
 color: #fde68a;
 font-weight: 600;
}

.lungkee-ai-chat.is-api-away .lungkee-ai-chat__header {
 box-shadow:
 inset 0 -3px 0 #ef4444,
 0 0 20px rgba(239, 68, 68, 0.25);
}

.lungkee-ai-chat.is-api-error .lungkee-ai-chat__header {
 box-shadow: inset 0 -2px 0 rgba(239, 68, 68, 0.55);
}

@keyframes lj-api-pulse-red {
 0%,
 100% {
 opacity: 1;
 transform: scale(1);
 }
 50% {
 opacity: 1;
 transform: scale(1.35);
 }
}

.lungkee-ai-chat__api-banner {
 padding: 0.55rem 0.85rem;
 font-size: 0.75rem;
 line-height: 1.45;
 color: #fecaca;
 background: linear-gradient(90deg, rgba(127, 29, 29, 0.55), rgba(69, 10, 10, 0.35));
 border-bottom: 1px solid rgba(239, 68, 68, 0.45);
}

.lungkee-ai-chat__api-banner[hidden] {
 display: none !important;
}

.lungkee-ai-chat.is-api-away .lungkee-ai-chat__typing-label {
 color: #f87171;
 font-weight: 600;
}

.lungkee-ai-chat__quick-toolbar {
 margin-bottom: 10px;
}

.lungkee-ai-chat__quick-row {
 display: flex;
 align-items: center;
 gap: 8px;
}

.lungkee-ai-chat__quick-row .lungkee-ai-chat__quick {
 flex: 1 1 auto;
 min-width: 0;
 margin-bottom: 0;
}

.lungkee-ai-chat__wa-link {
 flex-shrink: 0;
 margin-left: auto;
 display: inline-flex;
 align-items: center;
 gap: 4px;
 padding: 4px 9px;
 border-radius: 999px;
 background: var(--lj-whatsapp-cta-bg, #25d366);
 color: #fff !important;
 font-size: 11px;
 font-weight: 600;
 line-height: 1.2;
 text-decoration: none !important;
 white-space: nowrap;
 transition: background 0.2s;
}

.lungkee-ai-chat__wa-link:hover {
 background: #1da851;
 color: #fff !important;
}

.lungkee-ai-chat__wa-link .lungkee-ai-chat__wa-icon {
 width: 14px;
 height: 14px;
}

.lungkee-ai-chat__wa-icon {
 width: 18px;
 height: 18px;
 flex-shrink: 0;
 background: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='white'%3E%3Cpath d='M17.472 14.382c-.297-.149-1.758-.867-2.03-.967-.273-.099-.471-.148-.67.15-.197.297-.767.966-.94 1.164-.173.199-.347.223-.644.075-.297-.15-1.255-.463-2.39-1.475-.883-.788-1.48-1.761-1.653-2.059-.173-.297-.018-.458.13-.606.134-.133.298-.347.446-.52.149-.174.198-.298.298-.497.099-.198.05-.371-.025-.52-.075-.149-.669-1.612-.916-2.207-.242-.579-.487-.5-.669-.51-.173-.008-.371-.01-.57-.01-.198 0-.52.074-.792.372-.272.297-1.04 1.016-1.04 2.479 0 1.462 1.065 2.875 1.213 3.074.149.198 2.096 3.2 5.077 4.487.709.306 1.262.489 1.694.625.712.227 1.36.195 1.871.118.571-.085 1.758-.719 2.006-1.413.248-.694.248-1.289.173-1.413-.074-.124-.272-.198-.57-.347m-5.421 7.403h-.004a9.87 9.87 0 01-5.031-1.378l-.361-.214-3.741.982.998-3.648-.235-.374a9.86 9.86 0 01-1.51-5.26c.001-5.45 4.436-9.884 9.888-9.884 2.64 0 5.122 1.03 6.988 2.898a9.825 9.825 0 012.893 6.994c-.003 5.45-4.435 9.884-9.885 9.884m8.413-18.297A11.815 11.815 0 0012.05 0C5.495 0 .16 5.335.157 11.892c0 2.096.547 4.142 1.588 5.945L.057 24l6.305-1.654a11.882 11.882 0 005.683 1.448h.005c6.554 0 11.89-5.335 11.893-11.893a11.821 11.821 0 00-3.48-8.413z'/%3E%3C/svg%3E")
 center / contain no-repeat;
}

.lungkee-ai-chat__msg {
 align-items: flex-end;
 gap: 8px;
}

.lungkee-ai-chat__msg-body {
 max-width: min(88%, 420px);
}

.lungkee-ai-chat__composer {
 display: flex;
 align-items: center;
 gap: 6px;
 padding: 4px 4px 4px 16px;
 background: var(--lj-composer-bg);
 border: 1px solid var(--lj-composer-border);
 border-radius: 999px;
 box-shadow: 0 1px 8px rgba(15, 23, 42, 0.06);
 transition:
 border-color 0.2s ease,
 box-shadow 0.2s ease;
}

.lungkee-ai-chat__composer:focus-within {
 border-color: rgba(56, 210, 255, 0.55);
 box-shadow:
 0 0 0 3px var(--lj-composer-focus),
 0 4px 18px rgba(13, 61, 92, 0.1);
}

.lungkee-ai-chat__header .lungkee-ai-chat__title {
 font-size: 17px;
 font-weight: 700;
 margin: 0;
 letter-spacing: 0.02em;
 color: #ffffff;
 text-shadow: 0 1px 3px rgba(0, 0, 0, 0.35);
}

.lungkee-ai-chat__header .lungkee-ai-chat__subtitle {
 font-size: 12px;
 margin: 2px 0 0;
 color: rgba(230, 248, 255, 0.95);
 opacity: 1;
}

.lungkee-ai-chat__messages {
 height: 380px;
 overflow-y: auto;
 padding: 16px;
 background: var(--lj-bg);
 scroll-behavior: smooth;
 overflow-anchor: auto;
}

/* AI 打字機輸出時改即時滾動，避免 smooth 逐字拖慢 */
.lungkee-ai-chat__messages--streaming {
 scroll-behavior: auto;
}

.lungkee-ai-chat__messages::-webkit-scrollbar {
 width: 6px;
}
.lungkee-ai-chat__messages::-webkit-scrollbar-thumb {
 background: #cbd5e1;
 border-radius: 3px;
}

.lungkee-ai-chat__msg {
 display: flex;
 margin-bottom: 14px;
 animation: lj-fade-in 0.25s ease;
}

@keyframes lj-fade-in {
 from { opacity: 0; transform: translateY(6px); }
 to { opacity: 1; transform: translateY(0); }
}

.lungkee-ai-chat__msg--user {
 justify-content: flex-end;
}

.lungkee-ai-chat__bubble {
 max-width: 85%;
 padding: 10px 14px;
 border-radius: var(--lj-radius);
 line-height: 1.55;
 word-break: break-word;
 white-space: pre-wrap;
}

.lungkee-ai-chat__msg--user .lungkee-ai-chat__bubble {
 background: var(--lj-user-bubble);
 color: #fff;
 border-bottom-right-radius: 4px;
}

.lungkee-ai-chat__msg--bot .lungkee-ai-chat__bubble:not(.lungkee-ai-chat__bubble--pics):not(.lungkee-ai-chat__bubble--typing) {
 background: var(--lj-bot-bubble);
 border: 1px solid var(--lj-border);
 border-bottom-left-radius: 4px;
 box-shadow: 0 1px 3px rgba(0, 0, 0, 0.04);
}

.lungkee-ai-chat__bubble--stream::after {
 content: '▋';
 display: inline-block;
 margin-left: 2px;
 color: var(--lj-primary);
 animation: lj-cursor-blink 0.75s step-end infinite;
 vertical-align: baseline;
}

@keyframes lj-cursor-blink {
 50% {
 opacity: 0;
 }
}

/* 思考中：橫向佔滿訊息區（唔再縮成細氣泡） */
.lungkee-ai-chat__msg[data-typing='1'] {
 width: 100%;
 box-sizing: border-box;
}

.lungkee-ai-chat__msg[data-typing='1'] .lungkee-ai-chat__msg-body {
 flex: 1;
 min-width: 0;
 max-width: none;
 width: auto;
}

.lungkee-ai-chat__bubble--typing {
 max-width: none !important;
 width: 100%;
 box-sizing: border-box;
 display: flex;
 align-items: center;
 min-height: 44px;
 padding: 12px 16px;
}

.lungkee-ai-chat__typing-wrap {
 display: flex;
 align-items: center;
 justify-content: flex-start;
 gap: 8px;
 width: 100%;
}

.lungkee-ai-chat__typing-label {
 font-size: 0.92rem;
 color: var(--lj-muted);
 letter-spacing: 0.02em;
 flex-shrink: 0;
}

.lungkee-ai-chat__typing-dots {
 display: inline-flex;
 align-items: center;
 gap: 4px;
}

.lungkee-ai-chat__typing-dots span {
 width: 7px;
 height: 7px;
 background: var(--lj-muted);
 border-radius: 50%;
 animation: lj-bounce 1.2s infinite ease-in-out;
}

.lungkee-ai-chat__typing-dots span:nth-child(2) {
 animation-delay: 0.15s;
}

.lungkee-ai-chat__typing-dots span:nth-child(3) {
 animation-delay: 0.3s;
}

@keyframes lj-bounce {
 0%, 80%, 100% { transform: scale(0.6); opacity: 0.5; }
 40% { transform: scale(1); opacity: 1; }
}

.lungkee-ai-chat__footer {
 padding: 12px 16px 16px;
 border-top: 1px solid var(--lj-border);
 background: var(--lj-surface);
 border-radius: 0 0 calc(var(--lj-radius) + 4px) calc(var(--lj-radius) + 4px);
}

.lungkee-ai-chat__quick {
 display: flex;
 flex-wrap: wrap;
 align-items: center;
 gap: 6px;
}

.lungkee-ai-chat__quick-label {
 display: block;
 font-size: 12px;
 color: var(--lj-muted);
 margin-bottom: 6px;
}

.lungkee-ai-chat__quick-btn {
 font-size: 12px;
 padding: 5px 10px;
 border-radius: 999px;
 border: 1px solid var(--lj-border);
 background: var(--lj-bg);
 color: var(--lj-primary);
 cursor: pointer;
 transition: background 0.2s, border-color 0.2s;
 touch-action: manipulation;
}

.lungkee-ai-chat__quick-btn:hover {
 background: rgba(26, 95, 74, 0.08);
 border-color: var(--lj-primary-light);
}

.lungkee-ai-chat__lookup-row {
 padding: 0 12px 8px;
}

.lungkee-ai-chat__lookup-btn {
 width: 100%;
 max-width: 100%;
 border-color: var(--lj-primary);
 font-weight: 600;
}

.lungkee-ai-chat__appt-actions {
 display: grid;
 grid-template-columns: 1fr 1fr;
 gap: 8px;
 margin-top: 12px;
 width: 100%;
 max-width: 100%;
}

.lungkee-ai-chat__appt-btn {
 min-height: 44px;
 font-size: 13px;
 font-weight: 700;
 padding: 10px 10px;
 border-radius: 12px;
 border: 1.5px solid var(--lj-primary);
 cursor: pointer;
 touch-action: manipulation;
 transition:
 background 0.2s,
 color 0.2s,
 transform 0.15s;
}

.lungkee-ai-chat__appt-btn:hover {
 transform: translateY(-1px);
}

.lungkee-ai-chat__appt-btn--edit {
 background: var(--lj-primary);
 color: #fff;
}

.lungkee-ai-chat__appt-btn--edit:hover {
 background: var(--lj-primary-light);
}

.lungkee-ai-chat__appt-btn--exit {
 background: var(--lj-bg);
 color: var(--lj-primary);
}

.lungkee-ai-chat__appt-btn--exit:hover {
 background: rgba(26, 95, 74, 0.08);
}

.lungkee-ai-chat__appt-btn--agree {
 background: var(--lj-primary);
 color: #fff;
 border-color: var(--lj-primary);
}

.lungkee-ai-chat__appt-btn--agree:hover {
 background: var(--lj-primary-dark, #154a3a);
}

.lungkee-ai-chat__appt-btn--disagree {
 background: #fff;
 color: #5c4033;
 border: 1px solid rgba(92, 64, 51, 0.35);
}

.lungkee-ai-chat__appt-btn--disagree:hover {
 background: rgba(92, 64, 51, 0.06);
}

.lungkee-ai-chat__wizard-actions {
 flex-wrap: wrap;
 max-width: 100%;
}

.lungkee-ai-chat__wizard-actions .lungkee-ai-chat__appt-btn {
 flex: 1 1 auto;
 min-width: 4.5rem;
}

.lungkee-ai-chat__wizard-actions .lungkee-ai-chat__appt-btn--back {
 flex: 1 1 100%;
 margin-top: 6px;
}

.lungkee-ai-chat__pics-actions {
 flex-wrap: wrap;
}

.lungkee-ai-chat__toolbar {
 display: flex;
 gap: 8px;
 margin-bottom: 8px;
 flex-wrap: wrap;
}

.lungkee-ai-chat__img-btn {
 font-size: 13px;
 color: var(--lj-primary);
 background: transparent;
 border: 1px dashed var(--lj-primary-light);
 border-radius: 8px;
 padding: 6px 12px;
 cursor: pointer;
 transition: background 0.2s;
}
.lungkee-ai-chat__img-btn:hover {
 background: rgba(26, 95, 74, 0.06);
}

.lungkee-ai-chat__wa-btn,
.lungkee-ai-chat__wa-cta {
 display: inline-flex;
 align-items: center;
 justify-content: center;
 font-size: 13px;
 font-weight: 600;
 text-decoration: none;
 color: #fff;
 background: var(--lj-whatsapp-cta-bg, #25d366);
 border-radius: 8px;
 padding: 6px 14px;
 transition: background 0.2s, transform 0.1s;
}

.lungkee-ai-chat__wa-btn:hover,
.lungkee-ai-chat__wa-cta:hover {
 background: var(--lj-whatsapp-cta-bg-hover, #1ebe57);
 color: #fff;
}

.lungkee-ai-chat__wa-cta .lungkee-ai-chat__wa-icon {
 width: 18px;
 height: 18px;
 margin-right: 2px;
}

.lungkee-ai-chat__msg--action {
 justify-content: flex-start;
}

.lungkee-ai-chat__bubble a {
 color: inherit;
 text-decoration: underline;
 word-break: break-all;
}

.lungkee-ai-chat__msg--user .lungkee-ai-chat__bubble a {
 color: #e8fff5;
}

.lungkee-ai-chat__img-preview {
 font-size: 12px;
 color: var(--lj-muted);
 margin-bottom: 8px;
 display: none;
}
.lungkee-ai-chat__img-preview.is-visible {
 display: flex;
 align-items: center;
 gap: 10px;
 flex-wrap: wrap;
}

.lungkee-ai-chat__thumb {
 width: 56px;
 height: 56px;
 object-fit: cover;
 border-radius: 8px;
 border: 1px solid var(--lj-border);
}

.lungkee-ai-chat__img-preview span {
 font-size: 12px;
 color: var(--lj-muted);
 word-break: break-all;
}

.lungkee-ai-chat__form {
 display: flex;
 gap: 10px;
 align-items: flex-end;
}

.lungkee-ai-chat__input {
 flex: 1;
 min-height: 44px;
 max-height: 120px;
 padding: 10px 4px 10px 0;
 border: none;
 border-radius: 0;
 background: transparent;
 resize: none;
 font: inherit;
 line-height: 1.45;
 color: #0f172a;
 outline: none;
 box-shadow: none;
}
.lungkee-ai-chat__input::placeholder {
 color: #94a3b8;
}
.lungkee-ai-chat__input:focus {
 outline: none;
 box-shadow: none;
}

.lungkee-ai-chat__send {
 flex-shrink: 0;
 display: inline-flex;
 align-items: center;
 justify-content: center;
 width: 48px;
 height: 48px;
 min-width: 48px;
 padding: 0;
 border: none;
 border-radius: 50%;
 background: var(--lj-send-gradient);
 color: transparent;
 font-size: 0;
 line-height: 0;
 cursor: pointer;
 box-shadow: var(--lj-send-shadow);
 transition:
 background 0.25s ease,
 transform 0.15s ease,
 box-shadow 0.25s ease;
}

.lungkee-ai-chat__send::before {
 content: '';
 display: block;
 width: 30px;
 height: 30px;
 flex-shrink: 0;
 background: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none'%3E%3Cpath d='M12 4v13' stroke='%23ffffff' stroke-width='3.25' stroke-linecap='round'/%3E%3Cpath d='M7 9l5-5 5 5' stroke='%23ffffff' stroke-width='3.25' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E")
 center / contain no-repeat;
}
.lungkee-ai-chat__send:hover:not(:disabled) {
 background: var(--lj-send-gradient-hover);
 transform: translateY(-1px);
 box-shadow: 0 6px 20px rgba(56, 200, 255, 0.45);
}
.lungkee-ai-chat__send:active:not(:disabled) {
 transform: translateY(0);
}
.lungkee-ai-chat__send:disabled {
 opacity: 0.5;
 cursor: not-allowed;
 box-shadow: none;
}

.lungkee-ai-chat__hint {
 font-size: 11px;
 line-height: 1.45;
 color: var(--lj-muted);
 margin: 10px 4px 0;
 text-align: center;
}

.lungkee-ai-chat__hint a {
 color: var(--lj-primary);
 text-decoration: underline;
 word-break: break-word;
}

.lungkee-ai-chat__hint a:hover {
 color: var(--lj-primary-light);
}

/* 米拓編輯器內嵌時避免撐破版面 */
.met-editor .lungkee-ai-chat,
.editor-content .lungkee-ai-chat,
#ueditor_0 .lungkee-ai-chat {
 max-width: 100%;
}

/* 米拓全站樣式常覆蓋 h3 顏色，標題區強制淺色字 */
.met-editor .lungkee-ai-chat__header .lungkee-ai-chat__title,
.editor-content .lungkee-ai-chat__header .lungkee-ai-chat__title,
#ueditor_0 .lungkee-ai-chat__header .lungkee-ai-chat__title {
 color: #ffffff !important;
}

/* 客服專頁：簡介內置於對話框下方的說明文字 */
.longji-ai-page-tagline,
.met-editor .longji-ai-page-tagline {
 margin: 1rem 0 0;
 padding: 0.85rem 1rem;
 max-width: 52rem;
 margin-left: auto;
 margin-right: auto;
 text-align: center;
 font-size: 0.95rem;
 line-height: 1.55;
 color: var(--lj-muted, #64748b);
 border-top: 1px solid var(--lj-border, #e2e8f0);
}

.longji-ai-page-tagline strong {
 color: var(--lj-primary, #1a5f4a);
 font-weight: 700;
}

.met-editor .lungkee-ai-chat__header .lungkee-ai-chat__subtitle,
.editor-content .lungkee-ai-chat__header .lungkee-ai-chat__subtitle,
#ueditor_0 .lungkee-ai-chat__header .lungkee-ai-chat__subtitle {
 color: rgba(230, 248, 255, 0.95) !important;
 opacity: 1 !important;
}

/* 觸控端（≤1024px）：手機 + 平板 */
/* 客服專頁靜態說明（方案 A：內嵌聊天被隱藏時仍留文字俾訪客同搜尋引擎） */
.longji-ai-seo-static {
 --lj-primary: #1a5f4a;
 --lj-text: #1e293b;
 --lj-muted: #64748b;
 --lj-border: #e2e8e6;
 --lj-radius: 14px;

 font-family: "Microsoft JhengHei", "PingFang TC", "Noto Sans TC", sans-serif;
 font-size: 15px;
 line-height: 1.65;
 color: var(--lj-text);
 max-width: 720px;
 margin: 0 auto 1.25rem;
 padding: 1.25rem 1.35rem;
 border: 1px solid var(--lj-border);
 border-radius: calc(var(--lj-radius) + 2px);
 background: #fff;
 box-shadow: 0 2px 16px rgba(26, 95, 74, 0.06);
}

.longji-ai-seo-static h2 {
 margin: 0 0 0.65rem;
 font-size: 1.35rem;
 font-weight: 700;
 color: var(--lj-primary);
 line-height: 1.35;
}

.longji-ai-seo-static h3 {
 margin: 1.1rem 0 0.45rem;
 font-size: 1.05rem;
 font-weight: 700;
 color: var(--lj-text);
}

.longji-ai-seo-static p {
 margin: 0 0 0.65rem;
}

.longji-ai-seo-static ul {
 margin: 0 0 0.75rem;
 padding-left: 1.25rem;
}

.longji-ai-seo-static li {
 margin-bottom: 0.35rem;
}

.longji-ai-seo-static a {
 color: var(--lj-primary);
 text-decoration: underline;
 text-underline-offset: 2px;
}

.longji-ai-seo-static a:hover {
 color: #2d8f6f;
}

.longji-ai-seo-static__lead {
 color: var(--lj-muted);
 font-size: 0.95rem;
}

.longji-ai-seo-static__note {
 margin-top: 1rem !important;
 padding-top: 0.85rem;
 border-top: 1px dashed var(--lj-border);
 font-size: 0.9rem;
 color: var(--lj-muted);
}

.longji-ai-seo-faq__title {
 margin: 1.15rem 0 0.75rem;
 padding-top: 1rem;
 border-top: 1px solid var(--lj-border);
 font-size: 1.05rem;
 font-weight: 700;
 color: var(--lj-primary, #1a5f4a);
}

.longji-ai-seo-faq {
 margin: 0;
}

.longji-ai-seo-faq__item {
 margin: 0 0 0.5rem;
}

.longji-ai-seo-faq__q {
 margin: 0.85rem 0 0.25rem;
 font-weight: 700;
 color: var(--lj-text, #1e293b);
}

.longji-ai-seo-faq__item:first-of-type .longji-ai-seo-faq__q {
 margin-top: 0;
}

.longji-ai-seo-faq__a {
 margin: 0;
}

.longji-ai-seo-faq__a p {
 margin: 0 0 0.35rem;
 color: var(--lj-muted, #64748b);
 font-size: 0.95rem;
}

#lungkee-ai-chat-root[data-inline-suppressed='1'],
#lungkee-ai-chat-root[data-inline-desktop-seo='1'] {
 display: none !important;
}

/* 電腦端：內嵌聊天隱藏時，上方 longji-ai-seo-static 仍顯示供訪客／搜尋引擎 */
@media (min-width: 1025px) {
 .longji-ai-seo-static {
 display: block;
 }
}

@media (max-width: 1024px) {
 .lungkee-ai-chat__header {
 padding: 12px 14px;
 }

 .lungkee-ai-chat__header .lungkee-ai-chat__title {
 font-size: 16px;
 }

 .lungkee-ai-chat__messages {
 min-height: 280px;
 height: 360px;
 height: clamp(300px, 52dvh, 400px);
 padding: 12px;
 scroll-behavior: auto;
 -webkit-overflow-scrolling: touch;
 }

 .lungkee-ai-chat__bubble {
 max-width: 92%;
 }

 .lungkee-ai-chat__footer {
 padding: 10px 12px max(14px, calc(10px + env(safe-area-inset-bottom, 0px)));
 }

 .lungkee-ai-chat__quick-toolbar {
 margin-bottom: 8px;
 }

 .lungkee-ai-chat__quick-label {
 font-size: 13px;
 margin-bottom: 8px;
 }

 .lungkee-ai-chat__quick-row {
 flex-direction: column;
 align-items: stretch;
 gap: 10px;
 }

 .lungkee-ai-chat__quick-row .lungkee-ai-chat__quick {
 flex: none;
 width: 100%;
 min-width: 0;
 }

 .lungkee-ai-chat__quick {
 gap: 8px;
 }

 .lungkee-ai-chat__quick-btn {
 font-size: 13px;
 padding: 10px 14px;
 min-height: 44px;
 line-height: 1.25;
 -webkit-tap-highlight-color: transparent;
 }

 .lungkee-ai-chat__wa-link {
 margin-left: 0;
 width: 100%;
 justify-content: center;
 min-height: 44px;
 padding: 10px 16px;
 font-size: 13px;
 box-sizing: border-box;
 }

 .lungkee-ai-chat__input-stack {
 gap: 8px;
 margin-bottom: 8px;
 }

 .lungkee-ai-chat__service-frame {
 gap: 6px;
 padding: 5px;
 border-radius: 14px;
 }

 .lungkee-ai-chat__service-btn {
 min-height: 48px;
 padding: 8px 4px;
 }

 .lungkee-ai-chat__service-btn-label {
 font-size: 13px;
 }

 .lungkee-ai-chat__service-btn-sub {
 font-size: 10px;
 }

 .lungkee-ai-chat__appt-actions {
 gap: 6px;
 }

 .lungkee-ai-chat__composer {
 padding: 4px 4px 4px 14px;
 gap: 8px;
 }

 .lungkee-ai-chat__input {
 padding: 12px 2px 12px 0;
 min-height: 48px;
 }

 .lungkee-ai-chat__send {
 width: 52px;
 height: 52px;
 min-width: 52px;
 }

 .lungkee-ai-chat__send::before {
 width: 34px;
 height: 34px;
 }

 .lungkee-ai-chat__hint {
 font-size: 10px;
 margin-left: 0;
 margin-right: 0;
 padding-bottom: env(safe-area-inset-bottom, 0px);
 }

 .lungkee-ai-chat__bubble--stream::after {
 animation: lj-cursor-blink 0.75s step-end infinite;
 }

 .lungkee-ai-chat-float-host .longji-ai-orb--launcher {
 --lj-orb-px: 64px;
 --lj-orb-label: 18px;
 }

 /* 手機懸浮：外圈 64px，中間地球略大（粒子留邊） */
 .lungkee-ai-chat-float-host .longji-ai-orb--launcher .longji-ai-orb__core {
 width: 66%;
 height: 66%;
 }

 .lungkee-ai-chat-float-layer.is-open .lungkee-ai-chat__float-backdrop {
 z-index: 1;
 background: rgba(15, 23, 42, 0.5);
 }
}

/* —— 懸浮客服（第三方全站嵌入：data-display="float"）—— */
/* 對話層掛在 body（#longji-ai-float-layer），宿主只放右下角圖標 */
.lungkee-ai-chat-float-layer {
 position: fixed;
 inset: 0;
 z-index: 2147483000;
 margin: 0;
 padding: 0;
 border: 0;
 overflow: visible;
 pointer-events: none;
}

.lungkee-ai-chat-float-layer:not(.is-open) .lungkee-ai-chat__float-panel,
.lungkee-ai-chat-float-layer:not(.is-open) .lungkee-ai-chat__float-backdrop {
 display: none !important;
 visibility: hidden !important;
 pointer-events: none !important;
}

.lungkee-ai-chat-float-layer.is-open .lungkee-ai-chat__float-panel,
.lungkee-ai-chat-float-layer.is-open .lungkee-ai-chat__float-backdrop {
 pointer-events: auto;
}

.lungkee-ai-chat-float-host,
#lungkee-ai-chat-root[data-display='float'].lungkee-ai-chat-float-host {
 position: fixed;
 right: 0;
 bottom: 0;
 width: auto;
 height: auto;
 margin: 0;
 padding: 0;
 border: 0;
 overflow: visible;
 z-index: 2147483001;
 pointer-events: none;
}

#lungkee-ai-chat-root[data-display='float']:not(.lungkee-ai-chat-float-host) {
 position: fixed;
 width: 0;
 height: 0;
 overflow: hidden;
 visibility: hidden;
 pointer-events: none;
}

.lungkee-ai-chat-float-host .lungkee-ai-chat__float-launcher {
 pointer-events: auto;
}

.lungkee-ai-chat__float-backdrop {
 position: fixed;
 inset: 0;
 z-index: 1;
 margin: 0;
 padding: 0;
 border: none;
 background: rgba(15, 23, 42, 0.52);
 cursor: pointer;
 -webkit-tap-highlight-color: transparent;
}

.lungkee-ai-chat-float-layer.is-open .lungkee-ai-chat__float-backdrop {
 z-index: 1;
}

.lungkee-ai-chat-float-layer.is-open .lungkee-ai-chat__float-panel {
 z-index: 10;
 isolation: isolate;
 transform: translateZ(0);
}

.lungkee-ai-chat__float-launcher {
 position: fixed;
 z-index: 2147482000;
 right: max(12px, env(safe-area-inset-right, 0px));
 bottom: max(62px, calc(14px + 48px + env(safe-area-inset-bottom, 0px)));
 display: inline-flex;
 align-items: center;
 justify-content: center;
 gap: 0;
 min-height: 64px;
 min-width: 64px;
 padding: 0;
 border: none;
 border-radius: 0;
 background: transparent;
 color: #fff;
 font: inherit;
 box-shadow: none;
 cursor: pointer;
 touch-action: manipulation;
 -webkit-tap-highlight-color: transparent;
}

.lungkee-ai-chat__float-launcher:hover {
 transform: none;
 box-shadow: none;
}

.lungkee-ai-chat__float-launcher-orb {
 flex-shrink: 0;
 display: inline-flex;
 align-items: center;
 justify-content: center;
 line-height: 0;
 pointer-events: none;
}

.lungkee-ai-chat__float-launcher-orb .longji-ai-orb,
.lungkee-ai-chat__float-launcher-orb .longji-ai-orb * {
 pointer-events: none;
}

/* 漂浮入口只顯示 LOGO 球，唔顯示「AI客服」字樣（無障礙用 aria-label） */
.lungkee-ai-chat__float-launcher .lungkee-ai-chat__float-launcher-text {
 position: absolute !important;
 width: 1px !important;
 height: 1px !important;
 padding: 0 !important;
 margin: -1px !important;
 overflow: hidden !important;
 clip: rect(0, 0, 0, 0) !important;
 clip-path: inset(50%) !important;
 white-space: nowrap !important;
 border: 0 !important;
 opacity: 0 !important;
 pointer-events: none !important;
}

.lungkee-ai-chat-float-layer.is-open .lungkee-ai-chat__float-panel {
 display: flex !important;
 visibility: visible !important;
 opacity: 1 !important;
}

.lungkee-ai-chat-float-layer.is-open .lungkee-ai-chat__float-backdrop {
 display: block !important;
 visibility: visible !important;
 opacity: 1 !important;
}

.lungkee-ai-chat-float-layer .lungkee-ai-chat__float-panel,
.lungkee-ai-chat__float-panel {
 position: fixed;
 z-index: 10;
 left: 0;
 right: 0;
 bottom: 0;
 width: 100vw;
 max-width: 100vw;
 box-sizing: border-box;
 display: flex;
 flex-direction: column;
 overflow: hidden;
 background: var(--lj-surface);
 transform: translateZ(0);
}

@media (min-width: 1025px) {
 .lungkee-ai-chat-float-layer .lungkee-ai-chat__float-panel,
 .lungkee-ai-chat__float-panel {
 max-height: min(92dvh, 720px);
 border-radius: 16px 16px 0 0;
 box-shadow: 0 -12px 48px rgba(15, 23, 42, 0.28);
 }
}

.lungkee-ai-chat__float-close {
 position: absolute;
 z-index: 5;
 top: 8px;
 right: 10px;
 width: 40px;
 height: 40px;
 border: none;
 border-radius: 50%;
 background: rgba(255, 255, 255, 0.92);
 color: #334155;
 font-size: 26px;
 line-height: 1;
 cursor: pointer;
 box-shadow: 0 2px 8px rgba(0, 0, 0, 0.12);
 touch-action: manipulation;
}

.lungkee-ai-chat__float-inner {
 flex: 1;
 min-height: 0;
 width: 100%;
 min-width: 0;
 display: flex;
 flex-direction: column;
}

.lungkee-ai-chat-float-layer .lungkee-ai-chat,
.lungkee-ai-chat-float-host .lungkee-ai-chat {
 flex: 1;
 min-height: 0;
 max-width: none;
 width: 100%;
 margin: 0;
 border: none;
 border-radius: 0;
 box-shadow: none;
 display: flex;
 flex-direction: column;
 overflow: hidden;
}

.lungkee-ai-chat-float-layer .lungkee-ai-chat__msg-avatar,
.lungkee-ai-chat-float-layer .longji-ai-orb--msg {
 flex-shrink: 0;
 overflow: visible;
}

.lungkee-ai-chat-float-layer.is-open .lungkee-ai-chat__float-inner,
.lungkee-ai-chat-float-layer.is-open .lungkee-ai-chat {
 flex: 1;
 min-height: 0;
 height: 100%;
}

.lungkee-ai-chat-float-layer .lungkee-ai-chat__header,
.lungkee-ai-chat-float-host .lungkee-ai-chat__header {
 border-radius: 0;
 flex-shrink: 0;
}

.lungkee-ai-chat-float-layer.is-open .lungkee-ai-chat__messages {
 flex: 1 1 auto;
 min-height: 160px;
 height: auto !important;
 max-height: none !important;
 overflow-y: auto;
 -webkit-overflow-scrolling: touch;
}

.lungkee-ai-chat-float-layer .lungkee-ai-chat__footer {
 flex-shrink: 0;
}

/*
 * 懸浮窗隔離：米拓全站常見 flex-direction:row / writing-mode 會把
 * 對話區壓成極窄直排（嵌入端因區塊較寬較不明顯）
 */
.lungkee-ai-chat-float-layer,
.lungkee-ai-chat-float-layer .lungkee-ai-chat__float-panel,
.lungkee-ai-chat-float-layer .lungkee-ai-chat.lungkee-ai-chat__float-inner,
.lungkee-ai-chat-float-layer .lungkee-ai-chat {
 writing-mode: horizontal-tb !important;
 text-orientation: mixed !important;
 direction: ltr;
}

.lungkee-ai-chat-float-layer .lungkee-ai-chat.lungkee-ai-chat__float-inner,
.lungkee-ai-chat-float-layer .lungkee-ai-chat {
 display: flex !important;
 flex-direction: column !important;
 align-items: stretch !important;
 width: 100% !important;
 max-width: 100% !important;
 min-width: 0;
 box-sizing: border-box;
}

.lungkee-ai-chat-float-layer .lungkee-ai-chat__header,
.lungkee-ai-chat-float-layer .lungkee-ai-chat__messages,
.lungkee-ai-chat-float-layer .lungkee-ai-chat__footer,
.lungkee-ai-chat-float-layer .lungkee-ai-chat__input-stack,
.lungkee-ai-chat-float-layer .lungkee-ai-chat__composer {
 writing-mode: horizontal-tb !important;
 width: 100%;
 max-width: 100%;
 min-width: 0;
 box-sizing: border-box;
}

.lungkee-ai-chat-float-layer .lungkee-ai-chat__msg {
 display: flex !important;
 flex-direction: row !important;
 align-items: flex-end;
 width: 100%;
 max-width: 100%;
 box-sizing: border-box;
}

.lungkee-ai-chat-float-layer .lungkee-ai-chat__msg--user {
 flex-direction: row !important;
 justify-content: flex-end;
}

.lungkee-ai-chat-float-layer .lungkee-ai-chat__msg-body {
 flex: 1 1 auto;
 min-width: 0;
 max-width: min(88%, 420px);
}

.lungkee-ai-chat-float-layer .lungkee-ai-chat__msg--user .lungkee-ai-chat__msg-body {
 flex: 0 1 auto;
}

.lungkee-ai-chat-float-layer .lungkee-ai-chat__bubble {
 writing-mode: horizontal-tb !important;
 max-width: 100%;
 word-break: break-word;
 overflow-wrap: break-word;
}

.lungkee-ai-chat-float-layer .lungkee-ai-chat__composer {
 display: flex !important;
 flex-direction: row !important;
 align-items: center;
}

.lungkee-ai-chat-float-layer .lungkee-ai-chat__input {
 writing-mode: horizontal-tb !important;
 flex: 1 1 auto;
 min-width: 0;
 width: auto;
 display: block;
}

/* 觸控漂浮：以鍵盤「發送」為主，隱藏旁邊大按鈕，避免點掣後焦點留喺按鈕、鍵盤等到回覆才收 */
@media (max-width: 1024px) {
 .lungkee-ai-chat-float-layer .lungkee-ai-chat__send {
 display: none !important;
 width: 0 !important;
 min-width: 0 !important;
 margin: 0 !important;
 padding: 0 !important;
 overflow: hidden;
 pointer-events: none !important;
 }

 .lungkee-ai-chat-float-layer .lungkee-ai-chat__composer {
 padding-right: 14px;
 }
}

.lungkee-ai-chat-float-host.is-open .lungkee-ai-chat__float-launcher {
 visibility: hidden;
 pointer-events: none;
}

html.lungkee-ai-chat-float-open,
body.lungkee-ai-chat-float-open {
 overflow: hidden;
 overscroll-behavior: none;
}

body.lj-float-body-scroll-lock {
 overscroll-behavior: none;
 touch-action: none;
}

.lungkee-ai-chat-float-layer.is-open .lungkee-ai-chat__float-panel,
.lungkee-ai-chat-float-layer.is-open .lungkee-ai-chat__messages {
 overscroll-behavior: contain;
 -webkit-overflow-scrolling: touch;
}

.lungkee-ai-chat-float-layer.is-open {
 touch-action: none;
}

.lungkee-ai-chat-float-layer.is-open .lungkee-ai-chat__messages,
.lungkee-ai-chat-float-layer.is-open .lungkee-ai-chat__float-inner {
 touch-action: pan-y;
}

.lungkee-ai-chat-float-layer.is-open .lungkee-ai-chat__messages {
 touch-action: pan-y;
 overflow-y: scroll;
}

@media (min-width: 1025px) {
 /* 電腦（>1024px）：懸浮圖標與手機同款粒子球，位置在右上 */
 .lungkee-ai-chat-float-host .lungkee-ai-chat__float-launcher {
 top: max(16px, env(safe-area-inset-top, 0px));
 right: max(16px, env(safe-area-inset-right, 0px));
 bottom: auto;
 left: auto;
 gap: 0;
 min-height: 80px;
 min-width: 80px;
 padding: 0;
 background: transparent;
 box-shadow: none;
 border: none;
 -webkit-tap-highlight-color: transparent;
 }

 .lungkee-ai-chat-float-host .longji-ai-orb--launcher {
 --lj-orb-px: 80px;
 --lj-orb-perspective: 128px;
 --lj-orb-label: 22px;
 }

 .lungkee-ai-chat-float-host .longji-ai-orb--launcher .longji-ai-orb__core {
 width: 74%;
 height: 74%;
 }

 .lungkee-ai-chat-float-host .longji-ai-orb--launcher .longji-ai-orb__canvas {
 display: block !important;
 opacity: 1;
 z-index: 1;
 }

 .lungkee-ai-chat-float-host .lungkee-ai-chat__float-launcher:hover {
 transform: none;
 box-shadow: none;
 }

 .lungkee-ai-chat-float-host .lungkee-ai-chat__float-launcher-text {
 position: absolute;
 width: 1px;
 height: 1px;
 padding: 0;
 margin: -1px;
 overflow: hidden;
 clip: rect(0, 0, 0, 0);
 white-space: nowrap;
 border: 0;
 }

 .lungkee-ai-chat-float-layer .lungkee-ai-chat__float-panel,
 .lungkee-ai-chat-float-layer.is-open .lungkee-ai-chat__float-panel {
 top: max(96px, calc(12px + env(safe-area-inset-top, 0px) + 80px));
 right: max(16px, env(safe-area-inset-right, 0px));
 bottom: auto;
 left: auto;
 width: min(800px, calc(100vw - 32px));
 max-width: min(800px, calc(100vw - 32px));
 height: min(1100px, calc(100vh - 100px));
 max-height: min(1100px, calc(100vh - 100px));
 border-radius: var(--lj-radius);
 }

 .lungkee-ai-chat-float-host--bottom-right .lungkee-ai-chat__float-launcher {
 top: auto;
 bottom: max(88px, calc(16px + env(safe-area-inset-bottom, 0px)));
 }

 .lungkee-ai-chat-float-layer--bottom-right.is-open .lungkee-ai-chat__float-panel {
 top: auto;
 bottom: max(88px, calc(16px + env(safe-area-inset-bottom, 0px)));
 }

 /* 電腦端：標題等頭像略放大（懸浮球尺寸見上方 float-host 專用規則） */
 .longji-ai-orb--header {
 --lj-orb-px: 56px;
 --lj-orb-perspective: 110px;
 }

 .longji-ai-orb--msg {
 --lj-orb-px: 40px;
 --lj-orb-perspective: 88px;
 }

 .longji-ai-orb--header .longji-ai-orb__core,
 .longji-ai-orb--msg .longji-ai-orb__core {
 width: 66%;
 height: 66%;
 }
}

/* 漂浮 B：關閉後強制隱藏層，避免 resize/scroll 觸發動畫重播 */
.lungkee-ai-chat-float-layer.is-float-enforced-hidden {
 visibility: hidden !important;
 pointer-events: none !important;
}

.lungkee-ai-chat-float-layer.is-float-enforced-hidden .lungkee-ai-chat__float-panel,
.lungkee-ai-chat-float-layer.is-float-enforced-hidden .lungkee-ai-chat__float-backdrop {
 transform: none !important;
 animation: none !important;
}

.lungkee-ai-chat-float-host.is-float-dismissed:not(.is-open) .lungkee-ai-chat__float-panel {
 visibility: hidden;
}

/* 子樣式 @import 已移至本檔開頭；loader 亦會再掛 float-mobile / modern / brand 以確保覆蓋順序 */

/* 觸控漂浮全屏（須在 float-panel 基底規則之後，≤1024px） */
@media (max-width: 1024px) {
 #longji-ai-float-layer .lungkee-ai-chat__float-panel,
 #longji-ai-float-layer.is-open .lungkee-ai-chat__float-panel,
 .lungkee-ai-chat-float-layer .lungkee-ai-chat__float-panel,
 .lungkee-ai-chat-float-layer.is-open .lungkee-ai-chat__float-panel {
 top: env(safe-area-inset-top, 0px) !important;
 right: 0 !important;
 bottom: 0 !important;
 left: 0 !important;
 width: 100% !important;
 max-width: 100% !important;
 height: calc(
 100dvh - env(safe-area-inset-top, 0px) - env(safe-area-inset-bottom, 0px)
 ) !important;
 min-height: 0 !important;
 max-height: none !important;
 border-radius: 0 !important;
 box-shadow: none !important;
 }

 #longji-ai-float-layer .lungkee-ai-chat,
 .lungkee-ai-chat-float-layer .lungkee-ai-chat,
 .lungkee-ai-chat-float-layer .lungkee-ai-chat.lungkee-ai-chat__float-inner {
 max-width: none !important;
 width: 100% !important;
 margin: 0 !important;
 border-radius: 0 !important;
 box-shadow: none !important;
 border: none !important;
 }

 .lungkee-ai-chat-float-layer.is-open .lungkee-ai-chat__messages {
 flex: 1 1 auto !important;
 min-height: 0 !important;
 height: auto !important;
 max-height: none !important;
 }
}

/* V2 組別維護彈窗（bundle maintenance_popup） */
.lungkee-ai-chat__group-maint-overlay {
 position: absolute;
 inset: 0;
 z-index: 40;
 display: flex;
 align-items: center;
 justify-content: center;
 padding: 16px;
 background: rgba(15, 23, 42, 0.55);
 box-sizing: border-box;
 pointer-events: auto;
}

.lungkee-ai-chat__group-maint-card {
 width: 100%;
 padding: 20px 16px 16px;
 border-radius: 14px;
 background: var(--lj-maint-bg, #fff);
 color: var(--lj-maint-text, #212529);
 box-shadow: 0 12px 40px rgba(0, 0, 0, 0.22);
 border: 2px solid var(--lj-maint-primary, #0d6efd);
 box-sizing: border-box;
 text-align: center;
}

.lungkee-ai-chat__group-maint-head {
 position: relative;
 width: 100%;
 display: flex;
 align-items: center;
 justify-content: center;
 min-height: 36px;
 margin-bottom: 12px;
}

.lungkee-ai-chat__group-maint-title {
 margin: 0;
 width: 100%;
 padding: 0 44px;
 box-sizing: border-box;
 font-size: 1.08rem;
 font-weight: 700;
 color: var(--lj-maint-primary, #0d6efd);
 text-align: center;
 line-height: 1.35;
}

.lungkee-ai-chat__group-maint-close {
 position: absolute;
 top: 0;
 right: 0;
 width: 36px;
 height: 36px;
 margin: 0;
 padding: 0;
 border: none;
 border-radius: 999px;
 background: rgba(15, 23, 42, 0.08);
 color: var(--lj-maint-text, #212529);
 font-size: 1.35rem;
 line-height: 1;
 cursor: pointer;
 touch-action: manipulation;
}

.lungkee-ai-chat__group-maint-close:hover {
 background: rgba(15, 23, 42, 0.14);
}

.lungkee-ai-chat__group-maint-body {
 width: 100%;
 margin: 0 0 14px;
 line-height: 1.6;
 white-space: pre-wrap;
 word-break: break-word;
 text-align: center;
}

.lungkee-ai-chat__group-maint-countdown {
 width: 100%;
 margin: 0 0 14px;
 box-sizing: border-box;
}

.lungkee-ai-chat__group-maint-countdown.is-hint {
 padding: 10px 12px;
 border-radius: 10px;
 font-size: 0.92rem;
 line-height: 1.5;
 text-align: center;
 background: rgba(15, 23, 42, 0.05);
 color: var(--lj-maint-text, #212529);
 opacity: 0.9;
}

.lungkee-ai-chat__group-maint-chrono {
 display: flex;
 flex-direction: column;
 align-items: center;
 gap: 8px;
 width: 100%;
 padding: 12px 10px;
 border-radius: 12px;
 background: linear-gradient(
  145deg,
  color-mix(in srgb, var(--lj-maint-primary, #0d6efd) 14%, var(--lj-maint-bg, #fff)) 0%,
  color-mix(in srgb, var(--lj-maint-primary, #0d6efd) 5%, var(--lj-maint-bg, #fff)) 100%
 );
 border: 1px solid color-mix(in srgb, var(--lj-maint-primary, #0d6efd) 22%, transparent);
 box-sizing: border-box;
}

.lungkee-ai-chat__group-maint-chrono-label {
 font-size: 12px;
 font-weight: 700;
 letter-spacing: 0.08em;
 color: var(--lj-maint-primary, #0d6efd);
 opacity: 0.88;
}

.lungkee-ai-chat__group-maint-chrono-row {
 display: flex;
 align-items: center;
 justify-content: center;
 gap: 6px;
 width: 100%;
}

.lungkee-ai-chat__group-maint-chrono-unit {
 flex: 0 0 auto;
 min-width: 54px;
 padding: 8px 8px 6px;
 border-radius: 10px;
 background: var(--lj-maint-bg, #fff);
 box-shadow: 0 2px 10px rgba(15, 23, 42, 0.08);
 box-sizing: border-box;
}

.lungkee-ai-chat__group-maint-chrono-digit {
 display: block;
 font-size: 1.4rem;
 font-weight: 800;
 font-variant-numeric: tabular-nums;
 line-height: 1.1;
 color: var(--lj-maint-primary, #0d6efd);
}

.lungkee-ai-chat__group-maint-chrono-suffix {
 display: block;
 margin-top: 3px;
 font-size: 11px;
 font-weight: 600;
 line-height: 1.2;
 color: var(--lj-maint-text, #212529);
 opacity: 0.72;
}

.lungkee-ai-chat__group-maint-chrono-sep {
 flex: 0 0 auto;
 margin: 0 1px;
 font-size: 1.15rem;
 font-weight: 700;
 line-height: 1;
 color: var(--lj-maint-primary, #0d6efd);
 opacity: 0.55;
 transform: translateY(-6px);
}

.lungkee-ai-chat__group-maint-actions {
 display: flex;
 flex-wrap: wrap;
 gap: 10px;
 justify-content: center;
 width: 100%;
 margin-bottom: 12px;
}

.lungkee-ai-chat__group-maint-cta {
 flex: 1 1 calc(50% - 5px);
 min-width: 120px;
 min-height: 44px;
 display: inline-flex;
 align-items: center;
 justify-content: center;
 gap: 8px;
 padding: 10px 12px;
 border-radius: 12px;
 font-size: 14px;
 font-weight: 700;
 text-decoration: none !important;
 color: #fff !important;
 box-sizing: border-box;
 touch-action: manipulation;
 transition: background 0.2s, transform 0.1s;
}

.lungkee-ai-chat__group-maint-cta:hover {
 transform: translateY(-1px);
 color: #fff !important;
}

.lungkee-ai-chat__group-maint-cta.lungkee-ai-chat__phone-cta {
 background: var(--lj-maint-phone-bg, var(--lj-maint-primary, #0d6efd));
}

.lungkee-ai-chat__group-maint-cta.lungkee-ai-chat__phone-cta:hover {
 filter: brightness(1.06);
}

.lungkee-ai-chat__group-maint-cta.lungkee-ai-chat__wa-cta {
 background: var(--lj-maint-wa-bg, var(--lj-maint-primary, #0d6efd));
}

.lungkee-ai-chat__group-maint-cta.lungkee-ai-chat__wa-cta:hover {
 filter: brightness(1.06);
}

.lungkee-ai-chat__phone-icon {
 width: 20px;
 height: 20px;
 flex-shrink: 0;
 background: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='white'%3E%3Cpath d='M6.62 10.79a15.05 15.05 0 006.59 6.59l2.2-2.2a1 1 0 011-.24 11.36 11.36 0 003.56.57 1 1 0 011 1V20a1 1 0 01-1 1A17 17 0 013 4a1 1 0 011-1h3.5a1 1 0 011 1 11.36 11.36 0 00.57 3.56 1 1 0 01-.24 1l-2.21 2.23z'/%3E%3C/svg%3E")
 center / contain no-repeat;
}

.lungkee-ai-chat__group-maint-dismiss {
 width: 100%;
 max-width: 280px;
 margin: 4px auto 0;
 border: 1.5px solid var(--lj-maint-primary, #0d6efd);
 background: transparent;
 color: var(--lj-maint-primary, #0d6efd) !important;
 text-decoration: none !important;
}

.lungkee-ai-chat__group-maint-overlay.is-group-maint-style-modal_bottom {
 align-items: flex-end;
 padding-bottom: calc(16px + env(safe-area-inset-bottom, 0px));
}

.lungkee-ai-chat__group-maint-overlay.is-group-maint-style-banner_top {
 align-items: flex-start;
 padding-top: calc(12px + env(safe-area-inset-top, 0px));
 background: rgba(15, 23, 42, 0.35);
}

.lungkee-ai-chat__group-maint-overlay.is-group-maint-style-toast {
 align-items: flex-end;
 justify-content: flex-end;
 background: transparent;
 pointer-events: none;
}

.lungkee-ai-chat__group-maint-overlay.is-group-maint-style-toast .lungkee-ai-chat__group-maint-card {
 pointer-events: auto;
 max-width: min(360px, 92vw);
}

.lungkee-ai-chat__group-maint-overlay.is-group-maint-style-fullscreen_dim {
 background: rgba(15, 23, 42, 0.72);
}

/* 倒計時 UID：bar_slim */
.lungkee-ai-chat__group-maint-countdown.is-group-maint-countdown-bar_slim .lungkee-ai-chat__group-maint-bar {
 width: 100%;
 display: flex;
 flex-direction: column;
 align-items: stretch;
 gap: 8px;
 padding: 10px 12px;
 border-radius: 10px;
 background: rgba(15, 23, 42, 0.05);
 box-sizing: border-box;
}

.lungkee-ai-chat__group-maint-bar-label {
 font-size: 0.92rem;
 font-weight: 600;
 color: var(--lj-maint-primary, #0d6efd);
 text-align: center;
}

.lungkee-ai-chat__group-maint-bar-track {
 width: 100%;
 height: 8px;
 border-radius: 999px;
 background: rgba(15, 23, 42, 0.12);
 overflow: hidden;
}

.lungkee-ai-chat__group-maint-bar-fill {
 height: 100%;
 border-radius: inherit;
 background: var(--lj-maint-primary, #0d6efd);
 transition: width 0.35s ease;
}

.lungkee-ai-chat__group-maint-bar-remain {
 font-size: 0.88rem;
 text-align: center;
 opacity: 0.85;
}

/* 倒計時 UID：text_inline */
.lungkee-ai-chat__group-maint-countdown.is-group-maint-countdown-text_inline .lungkee-ai-chat__group-maint-countdown-inline {
 margin: 0;
 padding: 10px 12px;
 border-radius: 10px;
 font-size: 0.95rem;
 line-height: 1.5;
 text-align: center;
 background: rgba(15, 23, 42, 0.05);
 color: var(--lj-maint-text, #212529);
}
