/*
 * header.css — feature "header" (spec 01 §4–§7).
 * Top bar (.app-header), host list button + dropdown, marquee (.app-brand), account button,
 * version toggle, customer-service modal, and the STYLES of #copyToast and #roomLoading,
 * plus the desktop download area.
 *
 * Values are copied from the spec (minified 8-digit hex colours kept). Rule order follows
 * the original stylesheet: several computed-style quirks depend on it (e.g. the early
 * `.app-brand span` rule overriding the marquee glow, `.brand-contact-slide{font:inherit}`
 * resetting the second slide to the system font – spec 01 §4.4 / quirk Q1).
 */

/* ------------------------------------------------------------------ */
/* Top bar layout (spec 01 §4.1)                                      */
/* ------------------------------------------------------------------ */
.app-header {
  position: relative;
  min-height: 48px;
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 10px;
  margin-bottom: 8px;
  padding: 5px 8px;
  border: 1px solid rgba(245, 216, 142, .24);
  border-radius: 8px;
  background: linear-gradient(180deg, #1c304cf0, #0a1424f5), radial-gradient(circle at 0 0, rgba(245, 216, 142, .18), transparent 88px);
}

/* Early brand rules (still partly effective; the second .app-brand rule further down wins where both set a value). */
.app-brand {
  position: absolute;
  left: 50%;
  top: 50%;
  transform: translate(-50%, -50%);
  display: grid;
  justify-items: center;
  gap: 2px;
  min-width: 0;
  text-align: center;
  pointer-events: none;
}

.app-brand strong {
  color: #fff7df;
  font-size: 17px;
  line-height: 1.05;
  letter-spacing: 0;
  white-space: nowrap;
}

/* Quirk: this generic rule beats .brand-slide / .brand-prompt / .brand-copy colours and glows. */
.app-brand span {
  color: #f5d88edb;
  font-size: 9px;
  font-weight: 800;
  line-height: 1.05;
  white-space: nowrap;
  text-shadow: 0 1px 5px rgba(0, 0, 0, .45);
}

/* ------------------------------------------------------------------ */
/* Host list button + dropdown (spec 01 §4.2–§4.3)                    */
/* ------------------------------------------------------------------ */

/* Stacking context (z 4): the dropdown's z-index 70 only counts inside it (quirk Q4). */
.host-picker {
  position: absolute;
  left: 8px;
  top: 50%;
  z-index: 4;
  transform: translateY(-50%);
}

.host-list-button {
  min-height: 28px;
  padding: 0 10px;
  border-radius: 999px;
  border-color: #66c9ff6b;
  background: linear-gradient(180deg, #1f3e5cf2, #081220f5);
  color: #dff4ff;
  font-size: 12px;
  box-shadow: inset 0 1px #ffffff1a, 0 0 12px #66c9ff1f;
}

.host-list-button:after {
  content: "";
  display: inline-block;
  width: 6px;
  height: 6px;
  margin-left: 6px;
  border-right: 2px solid currentColor;
  border-bottom: 2px solid currentColor;
  transform: translateY(-2px) rotate(45deg);
  opacity: .82;
}

.host-dropdown {
  position: absolute;
  left: 0;
  top: calc(100% + 7px);
  z-index: 70;
  width: 218px;
  max-width: calc(100vw - 18px);
  max-height: min(340px, calc(100vh - 78px));
  overflow-y: auto;
  border: 1px solid rgba(245, 216, 142, .58);
  background: linear-gradient(180deg, #081220fc, #060e1afb);
  box-shadow: inset 0 1px #ffffff0d, 0 16px 38px #0000006b;
}

.host-dropdown[hidden] {
  display: none;
}

.host-option {
  position: relative;
  isolation: isolate;
  width: 100%;
  min-height: 46px;
  padding: 7px 10px;
  border: 0;
  border-radius: 0;
  display: grid;
  grid-template-columns: 32px minmax(0, 1fr);
  align-items: center;
  column-gap: 10px;
  background: transparent;
  color: #fff7df;
  text-align: left;
  box-shadow: none;
  overflow: hidden;
}

.host-option:hover {
  background: #f5d88e17;
}

.host-option-ranking {
  position: relative;
  background: radial-gradient(circle at 13% 50%, rgba(255, 210, 93, .26), transparent 26%), radial-gradient(circle at 75% 18%, rgba(255, 235, 163, .12), transparent 42%), linear-gradient(90deg, #4e3713b8, #1f1f1880 48%, #0a131fc7);
  box-shadow: inset 3px 0 #f1c75c, inset 0 1px #ffefb38f, inset 0 -1px #b880235c;
}

.host-option-ranking:after {
  position: absolute;
  top: 0;
  right: 0;
  left: 0;
  height: 1px;
  content: "";
  background: linear-gradient(90deg, rgba(255, 229, 143, .72), rgba(255, 243, 187, .2) 46%, transparent 76%);
  box-shadow: 0 0 9px #f8d37280;
}

.host-option-ranking:hover {
  background: radial-gradient(circle at 13% 50%, rgba(255, 224, 122, .38), transparent 28%), radial-gradient(circle at 75% 18%, rgba(255, 235, 163, .17), transparent 44%), linear-gradient(90deg, #644514d1, #2e26179e 48%, #0c1725e0);
}

/* Golden halo ring behind the avatar of a ranked row. */
.host-option-ranking:before {
  position: absolute;
  z-index: 0;
  top: 50%;
  left: 5px;
  width: 42px;
  height: 42px;
  border-radius: 50%;
  content: "";
  background: radial-gradient(circle at 31% 24%, rgba(255, 255, 236, .98) 0 4%, transparent 5%), conic-gradient(from 215deg, #9c6116, #f5ca63 20%, #fff5bd 34%, #bd7a1e 51%, #fff1a3 69%, #9f6115 85%, #efd078);
  -webkit-mask: radial-gradient(circle, transparent 57%, #000 59%);
  mask: radial-gradient(circle, transparent 57%, #000 59%);
  box-shadow: 0 0 0 1px #ffeeaab3, 0 0 8px #f7c13cad, 0 0 16px #e8a92947;
  transform: translateY(-50%);
  animation: rankingAvatarHalo 2.3s ease-in-out infinite;
}

.host-option-ranking img,
.host-option-ranking .host-option-avatar {
  position: relative;
  z-index: 1;
  box-sizing: border-box;
  border: 2px solid rgba(255, 250, 224, .98);
  box-shadow: 0 0 0 1px #b16e18f2, 0 0 0 3px #ffd96f26, 0 0 11px #e5b14157;
}

.host-option-ranking .host-option-name {
  position: relative;
  z-index: 1;
}

@keyframes rankingAvatarHalo {
  0%,
  to {
    opacity: .72;
  }
  50% {
    opacity: 1;
  }
}

.host-add-option {
  border-bottom: 1px solid rgba(245, 216, 142, .16);
}

.host-option img,
.host-option-avatar {
  flex: 0 0 auto;
  width: 32px;
  height: 32px;
  border-radius: 50%;
  object-fit: cover;
  background: radial-gradient(circle at 50% 36%, rgba(255, 255, 255, .12), transparent 58%), #ffffff14;
}

.host-add-icon {
  display: grid;
  place-items: center;
  border: 1px solid rgba(245, 216, 142, .46);
  background: linear-gradient(180deg, #f5d88e42, #78511e3d), #0a182aeb;
  color: #ffe8a8;
  font-size: 24px;
  font-weight: 700;
  line-height: 1;
}

.host-option strong {
  position: static;
  left: auto;
  top: auto;
  transform: none;
  display: block;
  min-width: 0;
  overflow: hidden;
  color: #fff7df;
  font-size: 14px;
  font-weight: 850;
  line-height: 1.2;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.host-option-name {
  display: flex;
  min-width: 0;
  align-items: center;
  gap: 5px;
}

.host-option-title {
  display: block;
  min-width: 0;
}

.host-option-title strong {
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.host-ranking-mark {
  display: inline-grid;
  width: 16px;
  height: 16px;
  flex: 0 0 16px;
  place-items: center;
  border: 1px solid rgba(255, 226, 137, .88);
  border-radius: 5px;
  background: linear-gradient(145deg, #fff0a2, #c88324 72%);
  color: #251508;
  font-size: 10px;
  font-weight: 950;
  line-height: 1;
  box-shadow: 0 0 9px #ecb94561;
}

/* ------------------------------------------------------------------ */
/* Account button (spec 01 §4.6)                                      */
/* ------------------------------------------------------------------ */

/* Stacking context (z 160): the member popover (z 170) lives inside it; above #roomLoading (quirk Q5). */
.auth-menu {
  position: relative;
  z-index: 160;
}

.auth-entry {
  min-height: 28px;
  max-width: 128px;
  padding: 0 12px;
  border-radius: 999px;
  font-size: 13px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

/* ------------------------------------------------------------------ */
/* Copy toast (spec 01 §5.3) – behaviour in core/ui.js                */
/* ------------------------------------------------------------------ */
.copy-toast {
  position: fixed;
  left: 50%;
  top: max(72px, calc(env(safe-area-inset-top) + 54px));
  z-index: 430;
  min-width: 150px;
  max-width: min(86vw, 320px);
  padding: 10px 16px;
  border: 1px solid rgba(245, 216, 142, .6);
  border-radius: 999px;
  background: linear-gradient(180deg, #182d48f5, #071220fa), radial-gradient(circle at 50% 0, rgba(97, 219, 255, .18), transparent 90%);
  color: #fff6d4;
  font-size: 14px;
  font-weight: 900;
  text-align: center;
  box-shadow: inset 0 1px #ffffff14, 0 18px 46px #00000075;
  pointer-events: none;
  transform: translate(-50%, 10px);
  opacity: 0;
}

.copy-toast[hidden] {
  display: none;
}

.copy-toast.is-show {
  animation: copyToastFloat 3s ease forwards;
}

@keyframes copyToastFloat {
  0% {
    opacity: 0;
    transform: translate(-50%, 16px);
  }
  12%,
  72% {
    opacity: 1;
    transform: translate(-50%);
  }
  to {
    opacity: 0;
    transform: translate(-50%, -30px);
  }
}

/* ------------------------------------------------------------------ */
/* Room switching overlay (spec 01 §6.2) – behaviour in core/ui.js    */
/* ------------------------------------------------------------------ */
.room-loading {
  position: fixed;
  top: 0;
  right: 0;
  bottom: 0;
  left: 0;
  z-index: 90;
  display: grid;
  place-items: center;
  padding: 16px;
  background: radial-gradient(circle at 50% 44%, rgba(96, 201, 255, .18), transparent 210px), #050a126b;
  -webkit-backdrop-filter: blur(2px);
  backdrop-filter: blur(2px);
}

.room-loading[hidden] {
  display: none;
}

.room-loading-card {
  width: min(76vw, 260px);
  min-height: 148px;
  border: 1px solid rgba(245, 216, 142, .48);
  border-radius: 14px;
  display: grid;
  justify-items: center;
  align-content: center;
  gap: 8px;
  background: linear-gradient(180deg, #15263ef5, #060f1cfa), radial-gradient(circle at 50% 0, rgba(245, 216, 142, .2), transparent 90px);
  box-shadow: inset 0 1px #ffffff17, 0 18px 48px #0000007a;
}

/* Radar: conic sweep + two rings + three orbiting satellites (roomLoadingSpin lives in base.css). */
.room-loading-orbit {
  position: relative;
  width: 66px;
  height: 66px;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(245, 216, 142, .8) 0 4px, transparent 5px), conic-gradient(from 0deg, #60c9ff00, #60c9ffd1, #f5d88ee6, #60c9ff00);
  animation: roomLoadingSpin 1.12s linear infinite;
  filter: drop-shadow(0 0 12px rgba(96, 201, 255, .36));
}

.room-loading-orbit:before,
.room-loading-orbit:after {
  content: "";
  position: absolute;
  top: 8px;
  right: 8px;
  bottom: 8px;
  left: 8px;
  border: 1px solid rgba(245, 216, 142, .38);
  border-radius: 50%;
}

.room-loading-orbit:after {
  top: 18px;
  right: 18px;
  bottom: 18px;
  left: 18px;
  border-color: #60c9ff80;
}

.room-loading-orbit span {
  position: absolute;
  left: 50%;
  top: 50%;
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: #fff4ce;
  box-shadow: 0 0 12px #f5d88ed1;
  transform-origin: 0 0;
}

.room-loading-orbit span:nth-child(1) {
  transform: rotate(0) translate(31px);
}

.room-loading-orbit span:nth-child(2) {
  transform: rotate(120deg) translate(31px);
}

.room-loading-orbit span:nth-child(3) {
  transform: rotate(240deg) translate(31px);
}

.room-loading-card strong {
  color: #fff7df;
  font-size: 17px;
  line-height: 1.2;
}

.room-loading-card p {
  max-width: 210px;
  color: #dff4ffd1;
  font-size: 12px;
  font-weight: 750;
  line-height: 1.35;
  text-align: center;
}

/* ------------------------------------------------------------------ */
/* Desktop download area (spec 01 §7)                                 */
/* ------------------------------------------------------------------ */
.desktop-download-actions,
.desktop-download-btn,
.announcer-download-btn {
  display: none;
}

.desktop-download-btn[hidden],
.announcer-download-btn[hidden] {
  display: none !important;
}

@media (min-width: 768px) {
  .desktop-download-actions {
    display: flex;
    align-items: center;
    gap: 10px;
    position: fixed;
    right: max(16px, env(safe-area-inset-right));
    bottom: max(16px, env(safe-area-inset-bottom));
    z-index: 680;
  }

  .desktop-download-btn,
  .announcer-download-btn {
    display: block;
  }

  /* The assistant button sits LEFT of "下载客户端". */
  .announcer-download-btn {
    order: -1;
  }

  .desktop-download-btn a,
  .announcer-download-btn a {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    min-width: 128px;
    min-height: 42px;
    padding: 0 16px;
    border: 1px solid rgba(231, 196, 110, .72);
    border-radius: 12px;
    background: linear-gradient(180deg, #7a571ffa, #3a2912fa);
    color: #fff8df;
    font-size: 14px;
    font-weight: 800;
    text-decoration: none;
    transition: border-color .15s, background .15s;
    animation: downloadBtnPulse 2s ease-in-out infinite;
    box-shadow: 0 12px 26px #00000061, inset 0 0 0 1px #ffffff14;
  }

  .desktop-download-btn a:hover,
  .announcer-download-btn a:hover {
    border-color: #ffe58feb;
    background: linear-gradient(180deg, #926723fa, #443014fa);
    animation: none;
    box-shadow: 0 14px 30px #0000006b, 0 0 18px #e7c46e42;
  }

  .announcer-download-btn a {
    gap: 9px;
    min-height: 54px;
    padding: 7px 13px 7px 8px;
    animation: none;
  }

  .announcer-download-icon {
    width: 36px;
    height: 36px;
    flex: 0 0 36px;
    border-radius: 8px;
    object-fit: contain;
  }

  .announcer-download-copy {
    display: flex;
    flex-direction: column;
    gap: 2px;
    line-height: 1.2;
  }

  .announcer-download-copy strong {
    font-size: 14px;
    font-weight: 800;
    white-space: nowrap;
  }

  .announcer-download-copy small {
    color: #fff1c5c2;
    font-size: 11px;
    font-weight: 500;
    letter-spacing: 1px;
  }

  .download-icon {
    font-size: 14px;
    animation: downloadIconBounce 1.5s ease-in-out infinite;
  }

  @keyframes downloadBtnPulse {
    0%,
    to {
      border-color: #e7c46e9e;
    }
    50% {
      border-color: #ffe58feb;
    }
  }

  @keyframes downloadIconBounce {
    0%,
    to {
      transform: translateY(0);
    }
    50% {
      transform: translateY(2px);
    }
  }
}

/* Manxiang Android shell: no download area (the PWA card half of this rule lives in pwa.css). */
body.is-manxiang-app .desktop-download-actions {
  display: none !important;
}

/* ------------------------------------------------------------------ */
/* Version toggle 高级版 / 经典版 (spec 01 §4.7)                       */
/* ------------------------------------------------------------------ */
.analytics-version-toggle {
  flex: 0 0 auto;
  min-height: 28px;
  padding: 0 10px;
  border-color: #60c9ff7a;
  border-radius: 999px;
  background: linear-gradient(180deg, #1d4a6ff5, #08192cfa);
  color: #dff4ff;
  font-size: 11px;
  box-shadow: inset 0 1px #ffffff1a, 0 0 14px #60c9ff1f;
}

.analytics-version-toggle[aria-pressed=true] {
  border-color: #f5d88e9e;
  background: linear-gradient(180deg, #6c4e20fa, #2b1f11fa);
  color: #fff4ce;
}

/* Phones never show the toggle (only the bottom tab bar can switch). */
@media (max-width: 767px) {
  .analytics-version-toggle {
    display: none;
  }
}

/* ------------------------------------------------------------------ */
/* Marquee (spec 01 §4.4) – later .app-brand rule, merged with the    */
/* early one above                                                    */
/* ------------------------------------------------------------------ */
.app-brand {
  position: absolute;
  left: 50%;
  top: 50%;
  z-index: 1;
  width: min(310px, calc(100% - 238px));
  height: 48px;
  display: flex;
  align-items: center;
  justify-content: center;
  transform: translate(-50%, -50%);
  overflow: visible;
  pointer-events: auto;
}

.brand-carousel {
  position: relative;
  width: 100%;
  height: 40px;
  overflow: hidden;
  border: 1px solid rgba(93, 222, 255, .34);
  border-radius: 7px;
  background: linear-gradient(90deg, #0714241f, #0c2a409e, #0714241f), #050e1bbd;
  box-shadow: inset 0 1px #c6f7ff1f, 0 0 18px #3eceff24;
  isolation: isolate;
}

.brand-carousel:before,
.brand-carousel:after {
  position: absolute;
  z-index: -1;
  content: "";
  pointer-events: none;
}

/* Vertical tick texture. */
.brand-carousel:before {
  top: 0;
  right: 0;
  bottom: 0;
  left: 0;
  opacity: .66;
  background: repeating-linear-gradient(90deg, transparent 0 13px, rgba(117, 229, 255, .1) 14px 15px, transparent 16px 30px);
  -webkit-mask-image: linear-gradient(90deg, transparent, #000 14%, #000 86%, transparent);
  mask-image: linear-gradient(90deg, transparent, #000 14%, #000 86%, transparent);
}

/* Light sweep (4.8 s, not in sync with the 4.2 s slide rotation). */
.brand-carousel:after {
  top: -1px;
  bottom: -1px;
  left: -42%;
  width: 34%;
  opacity: .72;
  background: linear-gradient(90deg, transparent, rgba(126, 248, 255, .07) 30%, rgba(190, 251, 255, .74) 50%, rgba(126, 248, 255, .07) 70%, transparent);
  filter: blur(.4px);
  animation: brand-signal-sweep 4.8s linear infinite;
}

.brand-slide {
  position: absolute;
  top: 0;
  right: 0;
  bottom: 0;
  left: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 5px;
  padding: 0 8px;
  color: #e8fbff;
  font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, Liberation Mono, monospace;
  font-size: 12px;
  font-weight: 800;
  letter-spacing: 0;
  line-height: 1;
  white-space: nowrap;
  opacity: 0;
  transform: translateY(12px);
  transition: opacity .42s ease, transform .42s cubic-bezier(.22, 1, .36, 1);
}

.brand-slide:not(.brand-contact-slide) {
  pointer-events: none;
}

.app-brand .brand-slide {
  font-size: 12px;
  line-height: 1;
}

/* Quirk Q1: `font: inherit` comes after .brand-slide → the second slide uses the system font at weight 400,
   and it stays clickable even while invisible (the whole marquee opens the contact modal). */
.brand-contact-slide {
  min-height: 0;
  margin: 0;
  border: 0;
  border-radius: 0;
  background: transparent;
  cursor: pointer;
  font: inherit;
  pointer-events: auto;
}

.brand-contact-slide:hover .brand-contact-action,
.brand-contact-slide:focus-visible .brand-contact-action {
  color: #fff5cb;
  text-shadow: 0 0 12px rgba(255, 217, 117, .76);
}

.brand-contact-slide:focus-visible {
  outline: 2px solid rgba(134, 238, 255, .92);
  outline-offset: -3px;
}

.brand-contact-action {
  flex: 0 0 auto;
  padding-left: 4px;
  border-left: 1px solid rgba(125, 234, 255, .38);
  color: #aaf2ff;
  font-size: .74em;
  font-weight: 900;
  line-height: 1;
  text-shadow: 0 0 9px rgba(88, 229, 255, .58);
  transition: color .16s ease, text-shadow .16s ease;
}

.brand-slide-active {
  opacity: 1;
  transform: translateY(0);
}

.brand-prompt {
  flex: 0 0 auto;
  color: #79efff;
  font-size: 12px;
  font-weight: 900;
  letter-spacing: 0;
  text-shadow: 0 0 10px rgba(85, 233, 255, .88);
  animation: brand-prompt-pulse 1.2s steps(2, end) infinite;
}

.brand-copy {
  display: inline-block;
  color: #ecfcff;
  text-shadow: 0 0 10px rgba(89, 226, 255, .28);
}

.app-brand .brand-copy {
  color: #ecfcff;
  font-size: 1em;
  font-weight: 800;
  line-height: 1;
}

.app-brand .brand-prompt {
  color: #79efff;
  font-size: .7em;
  font-weight: 900;
  line-height: 1;
}

.app-brand .brand-contact-action {
  color: #aaf2ff;
  font-size: .74em;
  font-weight: 900;
  line-height: 1;
}

.brand-slide-active .brand-copy {
  background: linear-gradient(100deg, #a7efff, #fff 38%, #5ce4ff 48%, #e8fbff 56%, #a7efff);
  background-size: 230% 100%;
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  animation: brand-text-shimmer 2.8s linear infinite;
}

@keyframes brand-signal-sweep {
  0% {
    transform: translate(0);
  }
  to {
    transform: translate(440%);
  }
}

@keyframes brand-text-shimmer {
  0% {
    background-position: 130% 50%;
  }
  to {
    background-position: -130% 50%;
  }
}

/* Only a 50% keyframe + steps(2,end): 1 → .64 → .28 → .64 → 1 every 300 ms. */
@keyframes brand-prompt-pulse {
  50% {
    opacity: .28;
  }
}

/* Phones: smaller marquee shifted 16px to the right. (.brand-prompt 13px loses to .app-brand .brand-prompt.) */
@media (max-width: 520px) {
  .app-brand {
    left: calc(50% + 16px);
    width: min(212px, calc(100% - 170px));
    height: 44px;
  }

  .brand-carousel {
    height: 38px;
  }

  .brand-slide {
    gap: 5px;
    padding: 0 6px;
    font-size: 12px;
    letter-spacing: 0;
  }

  .app-brand .brand-slide {
    font-size: 12px;
  }

  .brand-prompt {
    font-size: 13px;
  }
}

@media (prefers-reduced-motion: reduce) {
  .brand-carousel:after,
  .brand-prompt,
  .brand-slide-active .brand-copy {
    animation: none;
  }

  .brand-slide {
    transition: none;
  }
}

/* ------------------------------------------------------------------ */
/* Customer-service modal (spec 01 §4.5)                              */
/* ------------------------------------------------------------------ */

/* Keeps its backdrop blur on phones and in the PWA (not in the 4685/4715 lists). */
.customer-service-modal {
  position: fixed;
  top: 0;
  right: 0;
  bottom: 0;
  left: 0;
  z-index: 1100;
  display: grid;
  place-items: center;
  padding: 18px;
  background: #02070ec2;
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
}

.customer-service-modal[hidden] {
  display: none;
}

/* A <section>: also gets the global section{margin-top:12px} (quirk Q11). */
.customer-service-dialog {
  position: relative;
  width: min(100%, 390px);
  padding: 25px 22px 20px;
  overflow: hidden;
  border: 1px solid rgba(111, 211, 255, .52);
  border-radius: 16px;
  background: radial-gradient(circle at 82% 0, rgba(58, 215, 255, .16), transparent 42%), linear-gradient(158deg, #162943fa, #050e1bfc);
  box-shadow: inset 0 1px #e5fcff1f, 0 24px 72px #0000009e;
}

.customer-service-dialog:before {
  position: absolute;
  top: 0;
  left: 7%;
  width: 46%;
  height: 1px;
  content: "";
  background: linear-gradient(90deg, transparent, #8eebff, transparent);
  box-shadow: 0 0 14px #60e1ffc2;
}

.customer-service-close {
  position: absolute;
  top: 12px;
  right: 12px;
  width: 32px;
  min-height: 32px;
  padding: 0;
  border-radius: 8px;
  border-color: #7accff70;
  background: #071322bd;
  color: #f9f3de;
  font-size: 24px;
  line-height: 1;
}

.customer-service-kicker {
  display: block;
  color: #79e7ff;
  font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, monospace;
  font-size: 11px;
  font-weight: 800;
  letter-spacing: .08em;
}

.customer-service-dialog h2 {
  margin: 4px 42px 5px 0;
  color: #fff5d9;
  font-size: 24px;
  line-height: 1.2;
}

.customer-service-intro,
.customer-service-tip {
  margin: 0;
  color: #b9cbe1;
  font-size: 14px;
  line-height: 1.55;
}

.customer-service-content {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  justify-items: center;
  align-items: center;
  gap: 13px;
  margin: 16px 0 14px;
  padding: 14px;
  border: 1px solid rgba(114, 190, 236, .24);
  border-radius: 12px;
  background: #030c188a;
}

.customer-service-qr-shell {
  display: grid;
  place-items: center;
  width: min(100%, 208px);
  aspect-ratio: 1;
  padding: 8px;
  overflow: hidden;
  border-radius: 10px;
  background: #fff;
  box-shadow: 0 9px 24px #0000004d;
}

.customer-service-qr-shell canvas {
  display: block;
  width: 100% !important;
  height: 100% !important;
  max-width: 100%;
  max-height: 100%;
  image-rendering: pixelated;
}

.customer-service-meta {
  display: flex;
  min-width: 0;
  justify-content: center;
  text-align: center;
}

.customer-service-copy {
  width: auto;
  min-height: 38px;
  margin: 0;
  padding: 7px 13px;
  border-color: #74d2ff8a;
  border-radius: 6px;
  background: #295c9073;
  color: #e9fbff;
  font-size: 15px;
  font-weight: 800;
}

.customer-service-copy span {
  margin-left: 6px;
  color: #8feaff;
  font-size: 12px;
  font-weight: 700;
}

.customer-service-copy.is-copied {
  border-color: #6fe8aac7;
  background: #267c538a;
}

.customer-service-copy.is-copied span {
  color: #9df7c7;
}

.customer-service-copy.is-copy-error {
  border-color: #ff8a8ac7;
  background: #7e2d3985;
}

.customer-service-copy.is-copy-error span {
  color: #ffc0c0;
}

.customer-service-tip {
  text-align: center;
}

@media (max-width: 390px) {
  .customer-service-dialog {
    padding: 22px 16px 16px;
  }

  .customer-service-qr-shell {
    width: min(100%, 180px);
  }

  .customer-service-dialog h2 {
    font-size: 21px;
  }

  /* No matching element (kept from the original). */
  .customer-service-meta strong {
    font-size: 16px;
  }
}
