/* Compact, responsive JhinOS contact dialog. No viewport-sized card. */
html.wechat-open { overflow: hidden; }
dialog.wechat-modal {
  --dialog-width: 360px;
  --qr-size: 184px;
  box-sizing: border-box;
  position: fixed;
  inset: 0;
  width: min(var(--dialog-width), calc(100vw - 28px));
  max-width: calc(100vw - 28px);
  max-height: calc(100vh - 28px);
  max-height: calc(100dvh - 28px);
  margin: auto;
  padding: 0;
  border: 1px solid rgba(142,181,213,.26);
  border-radius: 22px;
  color: #f5f8fb;
  background: #0b1929;
  box-shadow: 0 28px 85px rgba(0,0,0,.52), inset 0 1px rgba(255,255,255,.04);
  overflow: auto;
  overscroll-behavior: contain;
  scrollbar-width: thin;
  scrollbar-color: #365067 #0b1929;
}
dialog.wechat-modal:not([open]) { display: none; }
dialog.wechat-modal[open] { display: block; animation: contact-enter .22s cubic-bezier(.2,.7,.2,1); }
dialog.wechat-modal::backdrop {
  background: rgba(2,8,16,.68);
  -webkit-backdrop-filter: blur(9px);
  backdrop-filter: blur(9px);
}
.wechat-modal .wechat-modal-panel {
  box-sizing: border-box;
  position: relative;
  width: 100%;
  padding: clamp(18px, 4vw, 24px);
  background: radial-gradient(ellipse at 100% 0,rgba(75,219,255,.065),transparent 50%), #0b1929;
}
.wechat-modal .wechat-modal-top { display:flex; align-items:flex-start; justify-content:space-between; gap:12px; }
.wechat-modal .wechat-modal-kicker { color:#85deed; font-size:9px; font-weight:650; letter-spacing:.15em; line-height:1.6; }
.wechat-modal h3 { margin:8px 0 0; font-size:24px; font-weight:650; line-height:1.2; letter-spacing:-.035em; }
.wechat-modal .wechat-description { margin:12px 0 0; color:#9eb0c2; font-size:13px; line-height:1.7; }
.wechat-modal .wechat-close {
  flex:0 0 34px; width:34px; height:34px; min-height:34px; display:grid; place-items:center;
  padding:0; border:1px solid rgba(142,181,213,.18); border-radius:10px; background:rgba(255,255,255,.025);
  color:#b8cedf; cursor:pointer; transition:background .18s,border-color .18s;
}
.wechat-modal .wechat-close:hover { background:rgba(255,255,255,.07); border-color:rgba(142,181,213,.4); }
.wechat-modal .wechat-close svg { width:16px; height:16px; }
.wechat-modal .wechat-contact-content { display:grid; justify-items:center; gap:14px; margin-top:18px; }
.wechat-modal .wechat-qr-shell {
  box-sizing:content-box; width:min(var(--qr-size), 29vh, calc(100vw - 108px));
  width:min(var(--qr-size), 29dvh, calc(100vw - 108px));
  padding:8px; background:#fff; border:1px solid rgba(255,255,255,.7); border-radius:13px;
  line-height:0;
}
.wechat-modal .wechat-qr-shell img { display:block; width:100%; max-width:100%; height:auto; border-radius:0; object-fit:contain; }
.wechat-modal .wechat-meta { width:100%; display:grid; justify-items:center; gap:6px; text-align:center; }
.wechat-modal .wechat-name { color:#8ea5ba; font-size:12px; line-height:1.5; }
.wechat-modal .wechat-account { display:flex; align-items:center; justify-content:center; gap:9px; font-size:12px; color:#9eb0c2; }
.wechat-modal .wechat-id { color:#ffe78a; font:600 16px/1.6 ui-monospace,Consolas,monospace; letter-spacing:.015em; user-select:all; overflow-wrap:anywhere; }
.wechat-modal .wechat-copy {
  display:inline-flex; align-items:center; justify-content:center; gap:7px;
  margin:4px 0 0; min-height:36px; padding:7px 14px; border:1px solid rgba(239,193,76,.26); border-radius:9px;
  color:#ffe78a; font-family:inherit; font-weight:600; font-size:12px; line-height:1.6; background:rgba(239,193,76,.06); cursor:pointer;
}
.wechat-modal .wechat-copy:hover { border-color:rgba(239,193,76,.52); background:rgba(239,193,76,.1); }
.wechat-modal .wechat-copy svg { width:14px; height:14px; }
.wechat-modal .wechat-note { margin:14px 0 0; color:#7c93a9; font-size:11px; line-height:1.6; text-align:center; }
.wechat-modal .wechat-copy-status { margin:0; min-height:16px; font-size:10px; line-height:1.6; color:#8acfb9; text-align:center; }
.wechat-modal button:focus-visible { outline:2px solid #4bdbff; outline-offset:3px; }
@keyframes contact-enter { from { opacity:0; transform:translateY(7px) scale(.985); } to { opacity:1; transform:none; } }
@media (max-height:540px) and (min-width:480px) {
  dialog.wechat-modal { width:min(470px,calc(100vw - 28px)); }
  .wechat-modal .wechat-modal-panel { padding:18px 22px; }
  .wechat-modal .wechat-contact-content { grid-template-columns:auto minmax(0,1fr); align-items:center; gap:18px; margin-top:12px; }
  .wechat-modal .wechat-meta { gap:5px; }
  .wechat-modal .wechat-note { margin-top:10px; }
}
@media (prefers-reduced-motion:reduce) {
  dialog.wechat-modal[open] { animation:none; }
  .wechat-modal * { transition:none!important; }
}

.wechat-modal .wechat-copy-status:empty { display:none; }
