.tcgmf{
  --tcgmf-launch-size:60px;--tcgmf-launch-right:25px;
  --tcgmf-surface:#171a20;--tcgmf-text:#f6f7fa;--tcgmf-muted:#b0b8c5;
  --tcgmf-border:#39414d;--tcgmf-input:#101318;--tcgmf-red:#ce3029;
  --tcgmf-accent:#ff776b;--tcgmf-error:#ffaaa0;--tcgmf-success:#8eddb4;
  --tcgmf-close-ink:#ff776b;--tcgmf-close-surface:#342023;
  font-family:system-ui,-apple-system,"Noto Sans TC",sans-serif;
}
html[data-tcg-mi-theme=light] .tcgmf{
  --tcgmf-surface:#fff;--tcgmf-text:#192433;--tcgmf-muted:#526073;
  --tcgmf-border:#cbd3df;--tcgmf-input:#f5f7fb;--tcgmf-red:#bc2a23;
  --tcgmf-accent:#b72720;--tcgmf-error:#9e251c;--tcgmf-success:#206740;
  --tcgmf-close-ink:#c62a23;--tcgmf-close-surface:#fff1ef;
}
.tcgmf[hidden],body.tcg-mi-drawer-open .tcgmf-launch,
body.tcg-mi-compare-open .tcgmf-launch{display:none!important}
.tcgmf .tcgmf-launch,.tcgmf .tcgmf-close,.tcgmf .tcgmf-send{
  appearance:none;cursor:pointer;font:inherit;letter-spacing:normal;
  line-height:1.25;text-transform:none;margin:0;
}
.tcgmf .tcgmf-launch{
  position:fixed;right:var(--tcgmf-launch-right);right:max(var(--tcgmf-launch-right),env(safe-area-inset-right,0px));
  bottom:152px;bottom:max(calc(152px + env(safe-area-inset-bottom,0px)),var(--tcgmf-sales-clearance,0px));z-index:980;
  box-sizing:border-box;display:grid;place-items:center;width:var(--tcgmf-launch-size);height:var(--tcgmf-launch-size);aspect-ratio:1;
  padding:0;overflow:visible;border:3px solid #fff;border-radius:50%;
  background:#283344;color:#fff;font-size:13px;font-weight:700;
  box-shadow:0 3px 14px #0006;transition:box-shadow .16s,transform .16s;
}
.tcgmf .tcgmf-avatar-frame{
  position:absolute;inset:0;display:grid;place-items:center;overflow:hidden;border-radius:50%;
}
.tcgmf .tcgmf-avatar{
  position:absolute;inset:0;width:100%;height:100%;display:block;object-fit:cover;object-position:center;
}
.tcgmf .tcgmf-avatar[hidden]{display:none}
.tcgmf .tcgmf-mobile-label{
  position:absolute;left:50%;bottom:calc(100% + 5px);transform:translateX(-50%);
  display:block;white-space:nowrap;padding:6px 9px;border-radius:999px;
  color:var(--tcgmf-text);background:var(--tcgmf-surface);border:1px solid var(--tcgmf-border);
  box-shadow:0 2px 8px #0003;font:650 12px/1.25 system-ui,sans-serif;
}
@media(max-width:700px),(pointer:coarse){.tcgmf .tcgmf-launch{-webkit-tap-highlight-color:transparent}}
.tcgmf .tcgmf-launch:hover{transform:translateY(-2px);box-shadow:0 5px 18px #0008}
.tcgmf .tcgmf-dialog:not([open]){display:none}
.tcgmf-dialog-fallback.tcgmf-fallback-open::before{
  content:"";position:fixed;inset:0;background:#0a0e1780;z-index:2147483000;
  -webkit-backdrop-filter:blur(7px);backdrop-filter:blur(7px);
}
.tcgmf.tcgmf-dialog-fallback .tcgmf-dialog[open]{display:block;z-index:2147483001}
.tcgmf .tcgmf-dialog{
  position:fixed;inset:auto max(16px,env(safe-area-inset-right)) max(20px,env(safe-area-inset-bottom)) auto;
  margin:0;box-sizing:border-box;width:min(400px,calc(100% - 32px));max-height:calc(100vh - 40px);max-height:calc(100dvh - 40px);
  padding:22px;overflow:auto;border-radius:20px;border:1px solid var(--tcgmf-border);
  background:var(--tcgmf-surface);color:var(--tcgmf-text);box-shadow:0 16px 65px #0005;
  transform-origin:bottom right;
}
.tcgmf .tcgmf-dialog[open]{animation:tcgmf-in .26s cubic-bezier(.22,.71,.28,1) both}
.tcgmf .tcgmf-dialog[open]:not(.tcgmf-is-closing) .tcgmf-form{animation:tcgmf-fields .24s ease-out .045s both}
.tcgmf .tcgmf-dialog[open].tcgmf-is-closing{animation:tcgmf-out .17s ease-in both;pointer-events:none}
.tcgmf .tcgmf-dialog::backdrop{
  background:#0a0e1780;
  -webkit-backdrop-filter:blur(7px);backdrop-filter:blur(7px);
}
.tcgmf .tcgmf-dialog[open]::backdrop{animation:tcgmf-backdrop-in .21s ease-out both}
.tcgmf .tcgmf-dialog[open].tcgmf-is-closing::backdrop{animation:tcgmf-backdrop-out .17s ease-in both}
@keyframes tcgmf-in{from{opacity:0;transform:translateY(13px) scale(.97)}to{opacity:1;transform:none}}
@keyframes tcgmf-fields{from{opacity:0;transform:translateY(5px)}to{opacity:1;transform:none}}
@keyframes tcgmf-out{from{opacity:1;transform:none}to{opacity:0;transform:translateY(8px) scale(.98)}}
@keyframes tcgmf-backdrop-in{from{opacity:0}to{opacity:1}}
@keyframes tcgmf-backdrop-out{from{opacity:1}to{opacity:0}}
.tcgmf .tcgmf-top{display:flex;align-items:flex-start;justify-content:space-between;gap:12px;margin-bottom:18px}
.tcgmf .tcgmf-top h2{font:700 22px/1.3 system-ui,sans-serif;color:var(--tcgmf-text);margin:0 0 5px;padding:0}
.tcgmf .tcgmf-top h2:focus{outline:none}
.tcgmf .tcgmf-top p,.tcgmf .tcgmf-note{font:400 14px/1.5 system-ui,sans-serif;color:var(--tcgmf-muted);margin:0;padding:0}
.tcgmf .tcgmf-close{
  display:grid;place-items:center;flex:none;width:44px;height:44px;padding:0;border-radius:50%;
  color:var(--tcgmf-close-ink);background:var(--tcgmf-close-surface);border:1px solid var(--tcgmf-close-ink);
  transition:background-color .16s ease,border-color .16s ease,color .16s ease;
}
.tcgmf .tcgmf-close:is(:focus-visible,:active){
  color:#fff;background:#df221a;border-color:#df221a;
}
@media(hover:hover){
  .tcgmf .tcgmf-close:hover{color:#fff;background:#df221a;border-color:#df221a}
}
.tcgmf .tcgmf-form{display:grid;gap:9px;margin:0}
.tcgmf .tcgmf-form label{font-weight:650;font-size:14px;line-height:1.4;color:var(--tcgmf-text);margin:0}
.tcgmf .tcgmf-form :is(input,textarea){
  box-sizing:border-box;min-width:0;width:100%;max-width:100%;margin:0 0 5px;padding:11px 12px;
  min-height:44px;font:400 16px/1.45 system-ui,sans-serif;color:var(--tcgmf-text);
  border:1px solid var(--tcgmf-border);border-radius:10px;background:var(--tcgmf-input);
  transition:border-color .16s ease,box-shadow .16s ease;
}
.tcgmf .tcgmf-form :is(input,textarea):focus{border-color:var(--tcgmf-accent);box-shadow:0 0 0 1px var(--tcgmf-accent)}
.tcgmf .tcgmf-form textarea{min-height:98px;resize:vertical}
.tcgmf .tcgmf-send{
  justify-self:end;min-height:44px;min-width:100px;padding:9px 16px;border-radius:10px;
  border:1px solid transparent;background:var(--tcgmf-red);color:#fff;font-weight:700;
}
.tcgmf .tcgmf-send:disabled{opacity:.55;cursor:wait}
.tcgmf :is(button,input,textarea):focus-visible{outline:2px solid var(--tcgmf-accent);outline-offset:2px}
.tcgmf .tcgmf-status{font:500 14px/1.45 system-ui,sans-serif;color:var(--tcgmf-muted);margin:0;padding:0}
.tcgmf .tcgmf-status:not(:empty){margin-top:12px}
.tcgmf .tcgmf-status[data-state=success]{color:var(--tcgmf-success)}
.tcgmf .tcgmf-status[data-state=error]{color:var(--tcgmf-error)}
@media(max-width:700px){
  .tcgmf .tcgmf-dialog{right:max(12px,env(safe-area-inset-right));bottom:max(12px,env(safe-area-inset-bottom));width:calc(100% - 24px);padding:18px}
  .tcgmf{--tcgmf-launch-size:44px}
  /* Keep the 152px fallback, but follow the measured bubble when it moves.
     The extra 9px preserves the pinned layout's gap above the visible bubble. */
  .tcgmf .tcgmf-launch{border-width:2px;bottom:max(calc(24px + env(safe-area-inset-bottom,0px)),calc(var(--tcgmf-sales-clearance,calc(143px + env(safe-area-inset-bottom,0px))) + 9px))}
  .tcgmf .tcgmf-mobile-label{display:none}
}
@media(prefers-reduced-motion:reduce){
  .tcgmf .tcgmf-dialog[open],.tcgmf .tcgmf-dialog[open]::backdrop,
  .tcgmf .tcgmf-dialog[open]:not(.tcgmf-is-closing) .tcgmf-form{animation:none}
  .tcgmf .tcgmf-launch,.tcgmf .tcgmf-close,.tcgmf .tcgmf-form :is(input,textarea){transition:none}
}
