#rp-root { --v: #7C5CFF; --t: #19D3B5; --g: #2ECC71; --r: #FF4D5E; --a: #FFB020; --bg: #fff; --fg: #1f2937; --mut: #6b7280; --line: #eceef3; --soft: #f5f5fc;
  position: fixed; left: 18px; bottom: 18px; z-index: 2147483000; font-family: inherit; color: var(--fg); direction: rtl; }
.dark #rp-root, html.dark #rp-root { --bg: #171829; --fg: #EDEEFF; --mut: #A7A9C8; --line: #26283f; --soft: #212238; }
#rp-root * { box-sizing: border-box; }
#rp-root button { font: inherit; cursor: pointer; border: 0; }
#rp-fab { width: 56px; height: 56px; border-radius: 28px; background: linear-gradient(135deg, var(--v), #3A2BA8 60%, var(--t)); color: #fff;
  display: flex; align-items: center; justify-content: center; gap: 6px; box-shadow: 0 8px 24px rgba(60, 40, 160, .35); position: relative; padding: 0 14px; min-width: 56px; }
#rp-fab .rp-dot { position: absolute; top: 6px; right: 6px; width: 12px; height: 12px; border: 2px solid #fff; }
#rp-fab.rp-incall { background: var(--g); width: auto; }
#rp-fab.rp-ringing { background: var(--g); animation: rp-shake 1s infinite; }
.rp-fabtime { font-weight: 700; font-variant-numeric: tabular-nums; direction: ltr; }
@keyframes rp-shake { 0%, 100% { transform: rotate(0) } 10%, 30% { transform: rotate(-10deg) } 20%, 40% { transform: rotate(10deg) } 50% { transform: rotate(0) } }
.rp-dot { display: inline-block; width: 9px; height: 9px; border-radius: 50%; }

#rp-panel { position: absolute; left: 0; bottom: 70px; width: 330px; max-height: calc(100vh - 110px); overflow-y: auto; background: var(--bg);
  border-radius: 20px; box-shadow: 0 16px 48px rgba(20, 20, 50, .25); border: 1px solid var(--line); }
#rp-panel[hidden] { display: none; }
.rp-head { display: flex; justify-content: space-between; align-items: flex-start; padding: 14px 16px 10px; border-bottom: 1px solid var(--line); }
.rp-head b { font-size: 15px; }
.rp-ext { font-size: 12px; color: var(--v); background: rgba(124, 92, 255, .12); padding: 2px 8px; border-radius: 10px; margin-right: 6px; }
.rp-status { font-size: 12px; color: var(--mut); display: flex; align-items: center; gap: 6px; margin-top: 4px; }
.rp-x { background: none; color: var(--mut); padding: 4px; border-radius: 8px; }
.rp-x:hover { background: var(--soft); }

.rp-dialer { padding: 12px 16px 16px; }
.rp-dialrow { display: flex; gap: 8px; }
#rp-num, #rp-xin { flex: 1; min-width: 0; border: 1px solid var(--line); background: var(--soft); color: var(--fg); border-radius: 12px; padding: 10px 12px; font-size: 18px; outline: none; font-family: inherit; }
#rp-xin { font-size: 15px; direction: rtl; }
#rp-num:focus, #rp-xin:focus { border-color: var(--v); }
.rp-pad { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; margin: 12px 0 6px; direction: ltr; }
.rp-pad button { height: 44px; border-radius: 12px; background: var(--soft); color: var(--fg); font-size: 20px; }
.rp-pad button:hover { background: rgba(124, 92, 255, .14); }
.rp-hint { font-size: 11px; color: var(--mut); margin: 6px 2px 10px; line-height: 1.6; }
.rp-rtitle { font-size: 12px; color: var(--mut); margin: 6px 2px; font-weight: 600; }
.rp-ritem { display: flex; align-items: center; gap: 10px; padding: 8px 6px; border-radius: 10px; cursor: pointer; }
.rp-ritem:hover { background: var(--soft); }
.rp-rdot { width: 8px; height: 8px; border-radius: 50%; flex: none; }
.rp-rmain { flex: 1; min-width: 0; font-size: 13px; }
.rp-rmain small, .rp-rtime { color: var(--mut); font-size: 11px; }
.rp-empty { color: var(--mut); font-size: 12px; padding: 8px 2px; }

.rp-call { display: flex; flex-direction: column; align-items: center; padding: 16px 16px 20px; background: linear-gradient(180deg, rgba(124, 92, 255, .10), transparent 60%); }
.rp-ctitle { color: var(--t); font-weight: 700; font-size: 14px; font-variant-numeric: tabular-nums; }
.rp-call.ended .rp-ctitle { color: var(--mut); }
.rp-avatar { width: 72px; height: 72px; border-radius: 50%; margin: 12px 0 8px; background: linear-gradient(135deg, var(--v), var(--t)); color: #fff;
  display: flex; align-items: center; justify-content: center; font-size: 30px; font-weight: 700; }
.rp-avatar.pulse { box-shadow: 0 0 0 0 rgba(25, 211, 181, .5); animation: rp-pulse 1.4s infinite; }
@keyframes rp-pulse { to { box-shadow: 0 0 0 22px rgba(25, 211, 181, 0); } }
.rp-name { font-size: 17px; font-weight: 700; text-align: center; }
.rp-num { direction: ltr; color: var(--mut); font-size: 15px; margin-top: 2px; }
.rp-meta { font-size: 13px; color: var(--mut); margin-top: 6px; text-align: center; }
.rp-note { font-size: 13px; background: rgba(255, 176, 32, .14); border-radius: 12px; padding: 8px 12px; margin-top: 8px; white-space: pre-wrap; max-width: 100%; }
.rp-link { margin-top: 10px; background: rgba(124, 92, 255, .12); color: var(--v); border-radius: 10px; padding: 6px 12px; font-size: 12px; display: flex; align-items: center; gap: 6px; }
.rp-row { display: flex; justify-content: center; gap: 28px; margin-top: 16px; width: 100%; }
.rp-row.small { gap: 6px; justify-content: space-between; }
.rp-btn { display: flex; flex-direction: column; align-items: center; gap: 4px; color: #fff; border-radius: 30px; width: 60px; height: 60px; justify-content: center; font-size: 11px; }
.rp-btn span { position: absolute; margin-top: 82px; color: var(--mut); }
.rp-btn { position: relative; }
.rp-btn.big { width: 64px; height: 64px; animation: rp-nudge 1.6s ease-in-out infinite; }
.rp-btn.small { width: 44px; height: auto; border-radius: 12px; flex-direction: row; padding: 0 12px; font-size: 13px; }
.rp-btn.small span { position: static; margin: 0; color: #fff; }
.rp-btn.green { background: var(--g); } .rp-btn.red { background: var(--r); }
.rp-btn[disabled] { opacity: .45; cursor: not-allowed; }
@keyframes rp-nudge { 0%, 70%, 100% { transform: translateY(0) } 80% { transform: translateY(-5px) } }
.rp-row:has(.rp-btn span) { margin-bottom: 18px; }
.rp-tg { flex: 1; display: flex; flex-direction: column; align-items: center; gap: 4px; padding: 8px 2px; border-radius: 12px; background: var(--soft); color: var(--fg); font-size: 11px; }
.rp-tg.on { background: var(--v); color: #fff; }
.rp-xfer { display: flex; gap: 8px; width: 100%; margin-top: 12px; }
#rp-toast { position: absolute; left: 0; bottom: 70px; background: #2F3047; color: #fff; padding: 8px 14px; border-radius: 10px; font-size: 13px; white-space: nowrap; transform: translateY(-8px); }
#rp-toast[hidden] { display: none; }

.rp-mutebadge { position: absolute; left: 64px; bottom: 10px; white-space: nowrap; background: #FFB020; color: #1f2937; font-size: 12px; padding: 6px 10px; border-radius: 10px; box-shadow: 0 4px 12px rgba(0,0,0,.15); }
.rp-warn { background: rgba(255, 176, 32, .16); color: var(--fg); font-size: 12px; line-height: 1.8; padding: 8px 14px; border-radius: 20px 20px 0 0; }
.rp-warn a { color: var(--v); font-weight: 600; }
