.pc-support-root {
  position: fixed;
  right: max(18px, env(safe-area-inset-right));
  bottom: max(18px, env(safe-area-inset-bottom));
  z-index: 1200;
  color: #13222c;
  font-family: inherit;
  letter-spacing: 0;
}

.pc-support-launcher {
  height: 52px;
  display: inline-flex;
  align-items: center;
  gap: 9px;
  padding: 0 17px;
  border: 1px solid rgba(255, 255, 255, .42);
  border-radius: 8px;
  background: #08ad83;
  box-shadow: 0 12px 30px rgba(5, 80, 63, .24);
  color: #fff;
  font: inherit;
  font-weight: 700;
  cursor: pointer;
  transition: transform .2s ease, background .2s ease, box-shadow .2s ease;
}

.pc-support-launcher:hover {
  transform: translateY(-2px);
  background: #079873;
  box-shadow: 0 15px 34px rgba(5, 80, 63, .3);
}

.pc-support-launcher svg { width: 22px; height: 22px; flex: 0 0 auto; }

.pc-support-badge {
  position: absolute;
  top: -6px;
  right: -6px;
  min-width: 20px;
  height: 20px;
  display: none;
  place-items: center;
  padding: 0 5px;
  border: 2px solid #fff;
  border-radius: 999px;
  background: #f3aa2b;
  color: #10202a;
  font-size: 11px;
  font-weight: 800;
}

.pc-support-badge.visible { display: grid; }

.pc-support-panel {
  position: absolute;
  right: 0;
  bottom: 64px;
  width: min(380px, calc(100vw - 28px));
  height: min(620px, calc(100vh - 105px));
  display: grid;
  grid-template-rows: auto minmax(0, 1fr) auto;
  overflow: hidden;
  border: 1px solid #c9ddd8;
  border-radius: 8px;
  background: #f2f8f6;
  box-shadow: 0 26px 64px rgba(10, 33, 40, .3), 0 0 0 1px rgba(255, 255, 255, .7) inset;
  transform: translateY(12px) scale(.98);
  transform-origin: right bottom;
  opacity: 0;
  pointer-events: none;
  transition: opacity .2s ease, transform .2s ease;
}

.pc-support-panel.open {
  transform: translateY(0) scale(1);
  opacity: 1;
  pointer-events: auto;
}

.pc-support-head {
  min-height: 70px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 12px 14px;
  background: linear-gradient(120deg, #0d2028 0%, #123b3a 100%);
  color: #fff;
}

.pc-support-agent { display: flex; align-items: center; gap: 10px; min-width: 0; }
.pc-support-agent img { width: 42px; height: 42px; flex: 0 0 auto; border-radius: 8px; object-fit: cover; }
.pc-support-agent div { display: grid; gap: 3px; min-width: 0; }
.pc-support-agent strong { font-size: 15px; }
.pc-support-agent span { color: #aad9cd; font-size: 11px; }
.pc-support-agent span::before { content: ""; display: inline-block; width: 6px; height: 6px; margin-right: 6px; border-radius: 50%; background: #2ed8a9; box-shadow: 0 0 0 4px rgba(46, 216, 169, .12); vertical-align: 1px; }

.pc-support-close {
  width: 36px;
  height: 36px;
  display: grid;
  place-items: center;
  border: 0;
  border-radius: 50%;
  background: rgba(255, 255, 255, .08);
  color: #fff;
  cursor: pointer;
}
.pc-support-close svg { width: 18px; height: 18px; }

.pc-support-body {
  min-height: 0;
  padding: 14px;
  overflow-y: auto;
  scrollbar-color: #a9cdc4 transparent;
}

.pc-support-welcome { display: grid; gap: 12px; }
.pc-support-welcome h3 { margin: 0; font-size: 20px; line-height: 1.25; }
.pc-support-welcome > p { margin: 0; color: #60707b; font-size: 13px; line-height: 1.65; }

.pc-support-topics { display: flex; flex-wrap: wrap; gap: 7px; }
.pc-support-topic {
  padding: 7px 10px;
  border: 1px solid #c6ddd7;
  border-radius: 999px;
  background: #fff;
  color: #1c5a4d;
  font: inherit;
  font-size: 12px;
  cursor: pointer;
}

.pc-support-form { display: grid; gap: 9px; }
.pc-support-form input,
.pc-support-form textarea,
.pc-support-composer textarea {
  width: 100%;
  box-sizing: border-box;
  border: 1px solid #cbdcd8;
  border-radius: 6px;
  background: #fff;
  color: #13222c;
  font: inherit;
  font-size: 13px;
  outline: 0;
}
.pc-support-form input { height: 42px; padding: 0 11px; }
.pc-support-form textarea { min-height: 94px; padding: 10px 11px; resize: vertical; }
.pc-support-form input:focus,
.pc-support-form textarea:focus,
.pc-support-composer textarea:focus { border-color: #08ad83; box-shadow: 0 0 0 3px rgba(8, 173, 131, .12); }

.pc-support-submit {
  min-height: 43px;
  border: 0;
  border-radius: 6px;
  background: #08ad83;
  color: #fff;
  font: inherit;
  font-weight: 700;
  cursor: pointer;
}
.pc-support-submit:disabled { opacity: .6; cursor: wait; }

.pc-support-notice { min-height: 18px; margin: 0; color: #b34a3c; font-size: 12px; }
.pc-support-privacy { margin: 0; color: #7a8891; font-size: 10px; line-height: 1.5; }

.pc-support-session {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  margin: -2px 0 12px;
  padding: 9px 10px;
  border: 1px solid #d5e6e1;
  border-radius: 7px;
  background: rgba(255, 255, 255, .78);
}
.pc-support-session span { color: #16594b; font-size: 11px; font-weight: 700; }
.pc-support-session i { display: inline-block; width: 7px; height: 7px; margin-right: 7px; border-radius: 50%; background: #17bd91; box-shadow: 0 0 0 4px rgba(23, 189, 145, .12); }
.pc-support-session small { color: #73848a; font-size: 9px; text-align: right; }
.pc-support-date { display: flex; align-items: center; gap: 9px; margin: 4px 0 14px; color: #8a989c; font-size: 9px; text-align: center; }
.pc-support-date::before, .pc-support-date::after { content: ""; height: 1px; flex: 1; background: #dbe7e4; }

.pc-support-thread { display: flex; flex-direction: column; gap: 14px; }
.pc-support-message { max-width: 88%; display: flex; align-items: flex-end; gap: 7px; align-self: flex-start; }
.pc-support-message.visitor { flex-direction: row-reverse; align-self: flex-end; }
.pc-support-avatar {
  width: 26px;
  height: 26px;
  flex: 0 0 26px;
  display: grid;
  place-items: center;
  border: 1px solid #c4dcd6;
  border-radius: 50%;
  background: #fff;
  color: #137660;
  font-size: 10px;
  font-weight: 800;
  box-shadow: 0 3px 9px rgba(20, 70, 62, .08);
}
.pc-support-message.visitor .pc-support-avatar { border-color: #9bd8c8; background: #17b78d; color: #fff; }
.pc-support-message > div { min-width: 0; }
.pc-support-message > div > small { display: block; margin: 0 0 4px 2px; color: #6e7d82; font-size: 9px; }
.pc-support-message.visitor > div > small { margin-right: 2px; text-align: right; }
.pc-support-message p {
  margin: 0;
  padding: 9px 11px;
  border: 1px solid #ccddd8;
  border-radius: 8px 8px 8px 3px;
  background: #fff;
  font-size: 13px;
  line-height: 1.55;
  white-space: pre-wrap;
  overflow-wrap: anywhere;
  box-shadow: 0 5px 14px rgba(20, 62, 55, .06);
}
.pc-support-message.visitor p { border-color: #8dd4c2; border-radius: 8px 8px 3px 8px; background: linear-gradient(135deg, #d9f5ed, #c9eee4); }
.pc-support-message time { display: block; margin-top: 3px; color: #93a0a4; font-size: 8px; }
.pc-support-message.visitor time { text-align: right; }

.pc-support-empty { padding: 24px 12px; color: #71808a; text-align: center; font-size: 13px; }

.pc-support-composer {
  display: none;
  grid-template-columns: minmax(0, 1fr) 42px;
  gap: 8px;
  padding: 10px;
  border-top: 1px solid #d5e4e0;
  background: rgba(255, 255, 255, .96);
  box-shadow: 0 -8px 22px rgba(16, 54, 47, .04);
}
.pc-support-composer.visible { display: grid; }
.pc-support-composer textarea { min-height: 42px; max-height: 100px; padding: 10px 12px; border-radius: 8px; resize: none; }
.pc-support-composer button { width: 42px; height: 42px; padding: 0; }
.pc-support-composer svg { width: 19px; height: 19px; }

@media (max-width: 620px) {
  .pc-support-root { right: 12px; bottom: max(12px, env(safe-area-inset-bottom)); }
  .pc-support-launcher { width: 52px; padding: 0; justify-content: center; border-radius: 50%; }
  .pc-support-launcher span { display: none; }
  .pc-support-panel { position: fixed; right: 8px; bottom: 76px; width: calc(100vw - 16px); height: min(640px, calc(100dvh - 92px)); }
}

@media (prefers-reduced-motion: reduce) {
  .pc-support-panel, .pc-support-launcher { transition: none; }
}

@media print { .pc-support-root { display: none !important; } }
