:root {
  --yl-blue: #1a4f9c;
  --yl-orange: #e34120;
  --yl-white: #fff;
  --yl-support-ink: #576b95;
}

.yl-support-wrap {
  position: relative;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}
.yl-support-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 34px;
  height: 34px;
  padding: 0;
  border: 0;
  border-radius: 4px;
  background: transparent;
  color: var(--yl-white);
  cursor: pointer;
  line-height: 0;
  opacity: .95;
}
.yl-support-btn:hover { opacity: 1; background: rgba(255,255,255,.12); }
.ribbon-account .yl-support-btn,
.ribbon-account-lang .yl-support-btn {
  width: 28px;
  height: 28px;
  color: #2d8cf0;
  opacity: 1;
}
.ribbon-account .yl-support-btn:hover,
.ribbon-account-lang .yl-support-btn:hover {
  background: #eef4fb;
  color: #2d8cf0;
}
.yl-support-badge {
  display: none;
  position: absolute;
  top: 2px;
  right: 2px;
  min-width: 14px;
  height: 14px;
  padding: 0 3px;
  border-radius: 999px;
  background: var(--yl-orange);
  color: #fff;
  font-size: 9px;
  font-weight: 700;
  line-height: 14px;
  text-align: center;
  pointer-events: none;
}
.yl-support-panel {
  display: none;
  position: fixed;
  right: 20px;
  bottom: 20px;
  width: 420px;
  height: 540px;
  max-width: calc(100vw - 24px);
  max-height: calc(100vh - 24px);
  z-index: 10050;
  background: #fff;
  border-radius: 12px;
  box-shadow: 0 16px 48px rgba(0,30,80,.22);
  border: 1px solid rgba(0,0,0,.08);
  flex-direction: column;
  overflow: hidden;
}
.yl-support-panel.is-open,
.yl-support-panel.is-min { display: flex; }
.yl-support-panel.is-min {
  width: 240px;
  height: 44px;
  cursor: pointer;
}
.yl-support-panel.is-min .yl-support-body,
.yl-support-panel.is-min .yl-support-resize { display: none; }
.yl-support-panel.is-max {
  width: min(760px, calc(100vw - 24px));
  height: min(85vh, 900px);
  right: 12px;
  bottom: 12px;
}
.yl-support-head {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 10px 12px;
  background: linear-gradient(180deg, #1a4f9c, #143d7a);
  color: #fff;
  cursor: move;
  user-select: none;
}
.yl-support-title { font-weight: 600; font-size: 14px; flex: 1; }
.yl-support-winbtns { display: flex; gap: 4px; }
.yl-support-winbtns button {
  width: 24px;
  height: 24px;
  border: 0;
  border-radius: 4px;
  background: rgba(255,255,255,.12);
  color: #fff;
  cursor: pointer;
  line-height: 1;
  font-size: 14px;
}
.yl-support-winbtns button:hover { background: rgba(255,255,255,.22); }
.yl-support-body {
  display: flex;
  flex-direction: column;
  flex: 1;
  min-height: 0;
  background: #ededed;
}
.yl-support-msgs {
  flex: 1;
  overflow: auto;
  padding: 12px;
}
.yl-support-empty {
  color: #667085;
  font-size: 13px;
  text-align: center;
  padding: 24px 12px;
}
.yl-support-msg {
  max-width: 88%;
  margin-bottom: 10px;
  padding: 8px 10px;
  border-radius: 10px;
  font-size: 13px;
  line-height: 1.45;
}
.yl-support-msg.is-customer {
  margin-left: auto;
  background: #95ec69;
  color: #1a1a1a;
  border-bottom-right-radius: 2px;
}
.yl-support-msg.is-staff {
  margin-right: auto;
  background: #fff;
  border: 1px solid #e4e7ec;
  border-bottom-left-radius: 2px;
}
.yl-support-msg-meta {
  font-size: 10px;
  color: #667085;
  margin-bottom: 4px;
}
.yl-support-msg-img img {
  display: block;
  max-width: 100%;
  border-radius: 6px;
  margin-top: 4px;
  cursor: zoom-in;
}
.yl-support-lightbox {
  display: none;
  position: fixed;
  inset: 0;
  z-index: 10070;
  background: rgba(0, 0, 0, .86);
  align-items: center;
  justify-content: center;
  padding: 32px;
}
.yl-support-lightbox.is-on { display: flex; }
.yl-support-lightbox img {
  max-width: min(96vw, 1400px);
  max-height: 92vh;
  object-fit: contain;
  border-radius: 4px;
  box-shadow: 0 12px 40px rgba(0, 0, 0, .45);
}
.yl-support-lightbox-close {
  position: absolute;
  top: 14px;
  right: 18px;
  width: 40px;
  height: 40px;
  border: 0;
  border-radius: 50%;
  background: rgba(255, 255, 255, .14);
  color: #fff;
  font-size: 26px;
  line-height: 1;
  cursor: pointer;
}
.yl-support-lightbox-close:hover { background: rgba(255, 255, 255, .24); }
.yl-support-panel--admin {
  left: auto;
  right: 24px;
  bottom: 24px;
}
.yl-support-panel--admin.is-open { display: flex; }
.yl-support-head-extra {
  display: flex;
  align-items: center;
  gap: 6px;
  margin-right: 4px;
}
.yl-support-admin-dd { position: relative; }
.yl-support-admin-dd-btn {
  height: 24px;
  min-width: 28px;
  padding: 0 8px;
  border: 0;
  border-radius: 4px;
  background: rgba(255, 255, 255, .12);
  color: #fff;
  font-size: 12px;
  cursor: pointer;
}
.yl-support-admin-dd-btn:hover { background: rgba(255, 255, 255, .22); }
.yl-support-admin-dd-menu {
  display: none;
  position: absolute;
  top: calc(100% + 6px);
  right: 0;
  min-width: 132px;
  background: #fff;
  border: 1px solid rgba(0, 0, 0, .08);
  border-radius: 8px;
  box-shadow: 0 8px 24px rgba(0, 30, 80, .18);
  overflow: hidden;
  z-index: 2;
}
.yl-support-admin-dd.open .yl-support-admin-dd-menu { display: block; }
.yl-support-admin-dd-menu button {
  display: block;
  width: 100%;
  border: 0;
  background: #fff;
  color: #1a2440;
  text-align: left;
  padding: 10px 14px;
  font-size: 13px;
  cursor: pointer;
}
.yl-support-admin-dd-menu button:hover { background: #f4f7fb; }
.yl-support-admin-dd-menu button + button { border-top: 1px solid #eef2f6; }
.yl-support-msg-file {
  display: inline-block;
  margin-top: 4px;
  color: var(--yl-blue);
  font-size: 12px;
  word-break: break-all;
}
.yl-support-pending {
  display: none;
  gap: 8px;
  flex-wrap: wrap;
  padding: 8px 12px 0;
  align-items: center;
}
.yl-support-pending-inner {
  position: relative;
  display: inline-block;
  max-width: 88px;
}
.yl-support-pending-inner img {
  display: block;
  width: 100%;
  border-radius: 6px;
  border: 1px solid #dce4ee;
}
.yl-support-pending-file {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  max-width: 100%;
  padding: 6px 10px;
  border-radius: 8px;
  background: #fff;
  border: 1px solid #dce4ee;
  font-size: 12px;
}
.yl-support-pending-file-name {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  max-width: 220px;
}
.yl-support-pending-x {
  width: 18px;
  height: 18px;
  border: 0;
  border-radius: 999px;
  background: #333;
  color: #fff;
  cursor: pointer;
  line-height: 16px;
  font-size: 12px;
  flex-shrink: 0;
}
.yl-support-msg.is-upload-failed .yl-support-upload-meta { color: #e34120; }
.yl-support-upload-card {
  display: flex;
  align-items: center;
  gap: 12px;
  min-width: 220px;
  max-width: 280px;
  padding: 10px 12px;
  background: #fff;
  border: 1px solid #e4e7ec;
  border-radius: 8px;
}
.yl-support-msg.is-customer .yl-support-upload-card { background: #f7f7f7; }
.yl-support-upload-info { flex: 1; min-width: 0; }
.yl-support-upload-name {
  font-size: 14px;
  font-weight: 500;
  color: #1a1a1a;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  margin-bottom: 4px;
}
.yl-support-upload-meta {
  font-size: 12px;
  color: #888;
  line-height: 1.3;
}
.yl-support-upload-icon-wrap {
  position: relative;
  width: 48px;
  height: 48px;
  flex-shrink: 0;
}
.yl-support-upload-icon {
  width: 48px;
  height: 48px;
  border-radius: 6px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 11px;
  font-weight: 700;
  color: #fff;
  letter-spacing: .02em;
}
.yl-support-upload-icon.is-pdf { background: #e74c3c; }
.yl-support-upload-icon.is-doc { background: #2b579a; }
.yl-support-upload-icon.is-xls { background: #217346; }
.yl-support-upload-icon.is-ppt { background: #d24726; }
.yl-support-upload-icon.is-img { background: #6b7280; }
.yl-support-upload-icon.is-txt { background: #8b8b8b; }
.yl-support-upload-icon.is-file { background: #667085; }
.yl-support-upload-ring {
  position: absolute;
  inset: -4px;
  width: 56px;
  height: 56px;
  pointer-events: none;
}
.yl-support-upload-ring-bg { stroke: rgba(0, 0, 0, .08); }
.yl-support-upload-ring-fg {
  stroke: #07c160;
  stroke-linecap: round;
  transition: stroke-dashoffset .15s linear;
}
.yl-support-captcha-modal {
  display: none;
  position: fixed;
  inset: 0;
  z-index: 10080;
  background: rgba(10, 20, 40, .55);
  align-items: center;
  justify-content: center;
  padding: 20px;
}
.yl-support-captcha-modal.is-on { display: flex; }
.yl-support-captcha-box {
  width: min(360px, 100%);
  background: #fff;
  border-radius: 12px;
  box-shadow: 0 16px 48px rgba(0, 30, 80, .28);
  padding: 20px 20px 16px;
}
.yl-support-captcha-title {
  font-size: 16px;
  font-weight: 600;
  color: #1a2440;
  margin-bottom: 6px;
}
.yl-support-captcha-desc {
  font-size: 12px;
  color: #667085;
  margin-bottom: 14px;
  line-height: 1.4;
}
.yl-support-captcha-q {
  font-size: 22px;
  font-weight: 700;
  color: #1a4f9c;
  text-align: center;
  letter-spacing: .04em;
  padding: 12px;
  margin-bottom: 12px;
  background: #f4f7fb;
  border-radius: 8px;
}
.yl-support-captcha-input {
  width: 100%;
  height: 40px;
  border: 1px solid #d0d7e2;
  border-radius: 8px;
  padding: 0 12px;
  font-size: 15px;
  outline: none;
  box-sizing: border-box;
}
.yl-support-captcha-input:focus {
  border-color: #1a4f9c;
  box-shadow: 0 0 0 3px rgba(26, 79, 156, .12);
}
.yl-support-captcha-err {
  margin-top: 8px;
  font-size: 12px;
  color: #e34120;
}
.yl-support-captcha-actions {
  display: flex;
  justify-content: flex-end;
  gap: 8px;
  margin-top: 16px;
}
.yl-support-captcha-cancel,
.yl-support-captcha-ok {
  min-width: 72px;
  height: 34px;
  border-radius: 6px;
  border: 1px solid #d0d7e2;
  background: #fff;
  cursor: pointer;
  font-size: 13px;
}
.yl-support-captcha-ok {
  background: var(--yl-orange, #e34120);
  border-color: var(--yl-orange, #e34120);
  color: #fff;
}
.yl-support-captcha-cancel:hover { background: #f4f7fb; }
.yl-support-captcha-ok:hover { filter: brightness(1.05); }
.yl-support-retention-hint {
  padding: 4px 12px 8px;
  font-size: 11px;
  line-height: 1.35;
  color: #98a2b3;
  text-align: center;
}
.yl-support-compose-box {
  margin: 8px 10px 10px;
  background: #fff;
  border: 1px solid #d9d9d9;
  border-radius: 8px;
  overflow: visible;
}
.yl-support-compose-box textarea {
  display: block;
  width: 100%;
  min-height: 88px;
  max-height: 160px;
  border: 0;
  outline: none;
  resize: none;
  padding: 10px 12px;
  font: inherit;
  font-size: 14px;
  line-height: 1.45;
  background: transparent;
  box-sizing: border-box;
}
.yl-support-toolbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  padding: 6px 8px 8px;
  border-top: 1px solid #ececec;
}
.yl-support-toolbar-left {
  display: flex;
  align-items: center;
  gap: 2px;
  min-width: 0;
}
.yl-support-ico-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 32px;
  height: 32px;
  padding: 0;
  border: 0;
  border-radius: 4px;
  background: transparent;
  color: var(--yl-support-ink);
  cursor: pointer;
  line-height: 0;
}
.yl-support-ico-btn:hover { background: #f3f3f3; }
.yl-support-capture-wrap {
  position: relative;
  display: inline-flex;
  align-items: center;
}
.yl-support-ico-btn--cap { width: 30px; }
.yl-support-ico-btn--chev {
  width: 18px;
  margin-left: -4px;
  color: #8a8a8a;
}
.yl-support-tool-wrap { position: relative; }
.yl-support-emoji-pop {
  display: none;
  position: absolute;
  left: 0;
  bottom: calc(100% + 6px);
  width: 240px;
  padding: 8px;
  background: #fff;
  border: 1px solid #ddd;
  border-radius: 8px;
  box-shadow: 0 8px 24px rgba(0,0,0,.12);
  z-index: 5;
  grid-template-columns: repeat(6, 1fr);
  gap: 2px;
}
.yl-support-emoji-pop.open { display: grid; }
.yl-support-emoji-pop button {
  border: 0;
  background: transparent;
  font-size: 20px;
  line-height: 1.2;
  padding: 4px;
  border-radius: 4px;
  cursor: pointer;
}
.yl-support-emoji-pop button:hover { background: #f3f3f3; }
.yl-support-capture-menu {
  display: none;
  position: absolute;
  left: 0;
  bottom: calc(100% + 6px);
  min-width: 140px;
  background: #fff;
  border: 1px solid #ddd;
  border-radius: 8px;
  box-shadow: 0 8px 24px rgba(0,0,0,.12);
  z-index: 5;
  overflow: hidden;
}
.yl-support-capture-menu.open { display: block; }
.yl-support-capture-menu button {
  display: block;
  width: 100%;
  border: 0;
  background: #fff;
  text-align: left;
  padding: 8px 12px;
  font: inherit;
  font-size: 13px;
  color: #333;
  cursor: pointer;
}
.yl-support-capture-menu button:hover { background: #f5f5f5; }
.yl-support-send {
  border: 0;
  border-radius: 6px;
  background: #c8c8c8;
  color: #fff;
  padding: 6px 16px;
  font-weight: 600;
  font-size: 13px;
  cursor: default;
  flex-shrink: 0;
}
.yl-support-send.is-ready {
  background: #07c160;
  cursor: pointer;
}
.yl-support-send.is-ready:hover { filter: brightness(1.03); }
.yl-support-send:disabled { opacity: 1; }
.yl-support-resize {
  position: absolute;
  right: 0;
  bottom: 0;
  width: 16px;
  height: 16px;
  cursor: nwse-resize;
  background: linear-gradient(135deg, transparent 50%, #c5ced9 50%);
}
.yl-support-annotate {
  position: fixed;
  inset: 0;
  z-index: 10060;
  background: rgba(10,20,40,.72);
  display: flex;
  flex-direction: column;
}
.yl-support-annotate-bar--center {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 14px;
  padding: 12px 16px;
  background: rgba(26,36,51,.92);
  flex-wrap: wrap;
}
.yl-support-annotate-tools {
  display: flex;
  align-items: center;
  gap: 6px;
}
.yl-support-annotate-tools button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 36px;
  height: 36px;
  border: 1px solid transparent;
  background: transparent;
  border-radius: 8px;
  cursor: pointer;
  padding: 0;
}
.yl-support-annotate-tools button:hover { background: rgba(255,255,255,.08); }
.yl-support-annotate-tools button.is-on {
  background: rgba(227,65,32,.16);
  border-color: rgba(227,65,32,.45);
}
.yl-support-annotate-divider {
  width: 1px;
  height: 28px;
  background: rgba(255,255,255,.22);
  flex-shrink: 0;
}
.yl-support-annotate-actions {
  display: flex;
  align-items: center;
  gap: 8px;
}
.yl-support-annotate-actions button {
  border: 1px solid rgba(255,255,255,.28);
  background: transparent;
  color: #fff;
  border-radius: 6px;
  padding: 7px 16px;
  font-size: 13px;
  cursor: pointer;
}
.yl-support-annotate-actions button.primary {
  background: var(--yl-orange);
  border-color: var(--yl-orange);
}
.yl-support-annotate-opts {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 16px;
  padding: 8px 16px 10px;
  background: rgba(20,28,40,.88);
  border-top: 1px solid rgba(255,255,255,.06);
}
.yl-support-annotate-opt-group {
  display: inline-flex;
  align-items: center;
  gap: 8px;
}
.yl-support-annotate-opt-group.is-hidden { display: none; }
.yl-support-annotate-opt-label {
  font-size: 12px;
  color: rgba(255,255,255,.55);
  margin-right: 2px;
  user-select: none;
}
.yl-support-stroke-opt,
.yl-support-font-opt {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 32px;
  height: 32px;
  border: 1px solid transparent;
  background: transparent;
  border-radius: 8px;
  cursor: pointer;
  padding: 0;
  color: #e34120;
}
.yl-support-stroke-opt:hover,
.yl-support-font-opt:hover { background: rgba(255,255,255,.06); }
.yl-support-stroke-opt.is-on,
.yl-support-font-opt.is-on {
  background: rgba(227,65,32,.14);
  border-color: rgba(227,65,32,.4);
}
.yl-support-stroke-dot {
  display: block;
  border-radius: 50%;
  background: #e34120;
}
.yl-support-font-opt span {
  font-weight: 700;
  line-height: 1;
}
.yl-support-annotate-stage {
  flex: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: auto;
  padding: 16px;
}
.yl-support-annotate-stage canvas {
  max-width: 100%;
  max-height: 100%;
  box-shadow: 0 8px 32px rgba(0,0,0,.35);
  cursor: crosshair;
  touch-action: none;
}
.ribbon-account-actions {
  display: inline-flex;
  align-items: center;
  gap: 4px;
}

@media (max-width: 640px) {
  .yl-support-panel {
    right: 0;
    left: 0;
    bottom: 0;
    width: 100%;
    height: 100%;
    max-width: 100vw;
    max-height: 100vh;
    border-radius: 0;
  }
  .yl-support-panel.is-min {
    width: 100%;
    left: 0;
    right: 0;
  }
}
