.rg {
  --rg-bg: #212121;
  --rg-bg-alt: #1a1a1a;
  --rg-card: #282828;
  --rg-card-hi: #323232;
  --rg-line: rgba(255, 255, 255, .08);
  --rg-line-hi: rgba(255, 255, 255, .15);
  --rg-text: #f5f5f7;
  --rg-muted: #9ca3af;
  --rg-faint: #6b7280;
  --rg-blue: #2563eb;
  --rg-blue-hi: #3b82f6;
  --rg-ease: cubic-bezier(.22, 1, .36, 1);
  --rg-d: 400px;
  position: relative;
  isolation: isolate;
  overflow: hidden;
  overflow: clip;
  background: #212121;
  border-bottom: 1px solid var(--rg-line);
  color: var(--rg-text);
  font-family: Inter, ui-sans-serif, system-ui, sans-serif;
  -webkit-font-smoothing: antialiased;
}

.rg-bg {
  position: absolute;
  inset: 0;
  z-index: 0;
  pointer-events: none;
  background-color: #212121;
  background-image: none;
}

.rg-shell {
  position: relative;
  z-index: 1;
  display: grid;
  grid-template-columns: minmax(0, 460px) minmax(0, 1fr);
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  max-width: 1160px;
  margin: 0 auto;
  padding: 12px 24px 8px;
}

.rg-copy {
  position: relative;
  z-index: 3;
  max-width: 440px;
  opacity: 0;
  transform: translate3d(0, 8px, 0);
  transition: opacity .6s var(--rg-ease), transform .6s var(--rg-ease);
}
.rg.is-in .rg-copy { opacity: 1; transform: none; }

.rg-title {
  margin: 0;
  color: var(--rg-text);
  font-size: clamp(1.5rem, 2.3vw, 2rem);
  font-weight: 650;
  line-height: 1.2;
  letter-spacing: -.025em;
}
.rg-title span { color: inherit; }

.rg-search {
  position: relative;
  margin: 0;
  max-width: 380px;
}
.rg-search-icon {
  position: absolute;
  z-index: 1;
  left: 12px;
  top: 50%;
  width: 14px;
  height: 14px;
  transform: translateY(-50%);
  color: var(--rg-faint);
  pointer-events: none;
  transition: color .2s ease;
}
.rg-search:focus-within .rg-search-icon { color: var(--rg-blue-hi); }
.rg-search input {
  box-sizing: border-box;
  width: 100%;
  height: 38px;
  padding: 0 12px 0 34px;
  border: 1px solid var(--rg-line);
  border-radius: 9px;
  outline: none;
  background: rgba(255, 255, 255, .04);
  color: var(--rg-text);
  font: inherit;
  font-size: .84rem;
  transition: border-color .2s ease, box-shadow .2s ease, background-color .2s ease;
}
.rg-search input::placeholder { color: var(--rg-faint); font-size: .82rem; }
.rg-search input:hover { border-color: var(--rg-line-hi); }
.rg-search input:focus {
  border-color: rgba(59, 130, 246, .6);
  background: rgba(255, 255, 255, .06);
  box-shadow: 0 0 0 3px rgba(59, 130, 246, .12);
}
.rg-search input::-webkit-search-cancel-button { filter: invert(.55); }
.rg-suggest {
  position: absolute;
  left: 0; right: 0;
  top: calc(100% + 5px);
  z-index: 20;
  max-height: 280px;
  margin: 0;
  padding: 5px;
  overflow-y: auto;
  list-style: none;
  border: 1px solid var(--rg-line-hi);
  border-radius: 10px;
  background: var(--rg-card);
  box-shadow: 0 14px 36px rgba(0, 0, 0, .55);
  animation: rg-pop .2s var(--rg-ease);
}
.rg-suggest[hidden] { display: none; }
.rg-suggest li {
  display: flex;
  align-items: center;
  gap: 9px;
  padding: 7px 10px;
  border-radius: 7px;
  color: var(--rg-text);
  font-size: .84rem;
  cursor: pointer;
  transition: background-color .15s ease;
}
.rg-suggest li[aria-selected="true"],
.rg-suggest li:hover { background: rgba(255, 255, 255, .05); }
.rg-suggest li small {
  margin-left: auto;
  color: var(--rg-faint);
  font-size: .72rem;
  white-space: nowrap;
}
.rg-suggest .rg-suggest-empty { color: var(--rg-muted); cursor: default; }
.rg-suggest .rg-suggest-empty:hover { background: none; }
.rg-sug-ico {
  display: grid;
  place-items: center;
  flex: 0 0 20px;
  width: 20px;
  height: 15px;
  color: var(--rg-muted);
}
.rg-sug-ico svg { width: 13px; height: 13px; }
@keyframes rg-pop {
  from { opacity: 0; transform: translate3d(0, -4px, 0); }
  to { opacity: 1; transform: none; }
}

.rg-visual {
  position: relative;
  min-width: 0;
  display: flex;
  align-items: center;
  justify-content: center;
}
.rg-stage {
  position: relative;
  width: 100%;
  max-width: 440px;
  height: 380px;
  margin: 0 auto;
  touch-action: pan-y;
}

.rg-globe {
  position: absolute;
  inset: 0;
  opacity: 0;
  transform: scale(.97);
  transition: opacity 1.1s var(--rg-ease), transform 1.4s var(--rg-ease);
}
.rg-stage.is-ready .rg-globe { opacity: 1; transform: none; }
.rg-globe canvas { display: block; outline: none; cursor: grab; }
.rg-globe canvas:active { cursor: grabbing; }
.rg-globe.is-hovering canvas { cursor: pointer; }

.rg-skeleton {
  position: absolute;
  inset: 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 18px;
  color: var(--rg-faint);
  font-size: .78rem;
  letter-spacing: .02em;
  transition: opacity .5s var(--rg-ease);
}
.rg-skeleton[hidden] { display: none; }
.rg-stage.is-ready .rg-skeleton { opacity: 0; pointer-events: none; }
.rg-skeleton-orb {
  position: relative;
  width: min(var(--rg-d), 380px);
  aspect-ratio: 1;
  border-radius: 50%;
  overflow: hidden;
  background: #13161c;
  box-shadow: inset 0 0 0 1px var(--rg-line);
}
.rg-skeleton-orb::after {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(100deg, transparent 30%, rgba(255, 255, 255, .03) 50%, transparent 70%);
  transform: translateX(-100%);
  animation: rg-shimmer 1.8s ease-in-out infinite;
}
@keyframes rg-shimmer { to { transform: translateX(100%); } }

.rg-tip {
  position: absolute;
  left: 0;
  top: 0;
  z-index: 6;
  min-width: 170px;
  max-width: 240px;
  padding: 10px 12px;
  border: 1px solid var(--rg-line-hi);
  border-radius: 10px;
  background: rgba(20, 23, 29, .98);
  box-shadow: 0 10px 28px rgba(0, 0, 0, .45);
  pointer-events: none;
  opacity: 0;
  transform: translate3d(var(--x, 0), calc(var(--y, 0) + 4px), 0);
  transition: opacity .2s ease, transform .2s var(--rg-ease);
  will-change: transform, opacity;
}
.rg-tip.is-on { opacity: 1; transform: translate3d(var(--x, 0), var(--y, 0), 0); }
.rg-tip[hidden] { display: none; }
.rg-tip-head {
  display: flex;
  align-items: center;
  gap: 8px;
  color: var(--rg-text);
  font-size: .86rem;
  font-weight: 600;
}
.rg-tip-body {
  margin-top: 6px;
  color: var(--rg-muted);
  font-size: .78rem;
}
.rg-tip-body b { color: var(--rg-text); font-weight: 600; font-variant-numeric: tabular-nums; }
.rg-tip-cta {
  margin-top: 7px;
  padding-top: 7px;
  border-top: 1px solid var(--rg-line);
  color: var(--rg-blue-hi);
  font-size: .76rem;
  font-weight: 600;
}

.rg-flag {
  display: inline-block;
  flex: 0 0 auto;
  width: 20px;
  height: 14px;
  border-radius: 2px;
  object-fit: cover;
  box-shadow: 0 0 0 1px rgba(255, 255, 255, .1);
  background: rgba(255, 255, 255, .06);
}
.rg-flag-code {
  display: inline-grid;
  place-items: center;
  flex: 0 0 auto;
  min-width: 20px;
  height: 14px;
  padding: 0 3px;
  border-radius: 2px;
  background: rgba(255, 255, 255, .08);
  color: var(--rg-muted);
  font-size: .56rem;
  font-weight: 700;
  letter-spacing: .04em;
}

.rg-tools {
  position: absolute;
  right: 10px;
  bottom: 10px;
  z-index: 5;
  display: flex;
  gap: 2px;
  padding: 3px;
  border: 1px solid var(--rg-line);
  border-radius: 9px;
  background: rgba(33, 33, 33, .85);
  backdrop-filter: blur(8px);
  box-shadow: 0 4px 12px rgba(0, 0, 0, .3);
  transition: right .5s var(--rg-ease), opacity .3s ease;
}
.rg-tools[hidden] { display: none; }
  .rg-tools:empty { display: none; }
.rg-tools button {
  display: grid;
  place-items: center;
  width: 28px;
  height: 28px;
  padding: 0;
  border: 0;
  border-radius: 6px;
  background: transparent;
  color: var(--rg-muted);
  cursor: pointer;
  transition: background-color .2s ease, color .2s ease;
}
.rg-tools button:hover { background: rgba(255, 255, 255, .08); color: var(--rg-text); }
.rg-tools button:active { background: rgba(255, 255, 255, .14); }
.rg-tools button:focus-visible { outline: 2px solid var(--rg-blue); outline-offset: 1px; }
.rg-tools svg { width: 14px; height: 14px; }

.rg-state,
.rg-fallback {
  position: absolute;
  inset: 0;
  z-index: 4;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 12px;
  padding: 24px;
  text-align: center;
  color: var(--rg-muted);
}
.rg-state[hidden],
.rg-fallback[hidden] { display: none; }
.rg-state h3 { margin: 0; color: var(--rg-text); font-size: 1rem; font-weight: 600; }
.rg-state p { margin: 0; max-width: 36ch; font-size: .86rem; line-height: 1.55; }
.rg-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  height: 36px;
  padding: 0 14px;
  border: 1px solid transparent;
  border-radius: 8px;
  background: var(--rg-blue);
  color: #fff;
  font: inherit;
  font-size: .82rem;
  font-weight: 600;
  text-decoration: none;
  cursor: pointer;
  transition: background-color .2s ease, border-color .2s ease, color .2s ease;
}
.rg-btn:hover { background: #1d4ed8; color: #fff; }
.rg-btn:focus-visible { outline: 2px solid var(--rg-blue-hi); outline-offset: 2px; }
.rg-btn svg { width: 14px; height: 14px; }

.rg-fallback { justify-content: flex-start; overflow-y: auto; }
.rg-fallback-title { margin: 0 0 4px; color: var(--rg-text); font-size: .92rem; font-weight: 600; }
.rg-fallback-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(170px, 1fr));
  gap: 8px;
  width: 100%;
  max-width: 620px;
}
.rg-fallback-grid button {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px 12px;
  border: 1px solid var(--rg-line);
  border-radius: 9px;
  background: var(--rg-card);
  color: var(--rg-text);
  font: inherit;
  font-size: .84rem;
  text-align: left;
  cursor: pointer;
  transition: border-color .2s ease, background-color .2s ease;
}
.rg-fallback-grid button:hover { border-color: var(--rg-line-hi); background: var(--rg-card-hi); }
.rg-fallback-grid small { margin-left: auto; color: var(--rg-blue-hi); font-weight: 600; }

.rg-panel {
  position: absolute;
  top: 50%;
  right: 0;
  z-index: 8;
  display: flex;
  flex-direction: column;
  width: 344px;
  max-height: min(560px, calc(100vh - 32px));
  max-height: min(560px, calc(100dvh - 32px));
  overflow: hidden;
  border: 1px solid rgba(255, 255, 255, .08);
  border-radius: 12px;
  background: #242424;
  box-shadow: 0 12px 30px rgba(0, 0, 0, .28);
  opacity: 0;
  transform: translate3d(16px, -50%, 0);
  pointer-events: none;
  transition: opacity .22s ease, transform .22s ease;
}
.rg-panel[hidden] { display: none; }
.rg-panel.is-open { opacity: 1; transform: translate3d(0, -50%, 0); pointer-events: auto; }
.rg-panel.is-viewport-pinned {
  position: fixed;
  z-index: 10020;
  right: auto;
  transform: translate3d(16px, 0, 0);
}
.rg-panel.is-viewport-pinned.is-open { transform: none; }
.rg-panel-head {
  position: relative;
  padding: 11px 44px 9px 13px;
  border-bottom: 1px solid rgba(255, 255, 255, .08);
}
.rg-panel-country {
  display: flex;
  align-items: center;
  gap: 8px;
  margin: 0;
  color: #f5f5f5;
  font-size: .96rem;
  font-weight: 650;
}
.rg-panel-country .rg-flag { width: 20px; height: 14px; }
.rg-panel-count {
  margin: 3px 0 0 28px;
  color: #a3a3a3;
  font-size: .72rem;
}
.rg-panel-count b { color: #d7d7d7; font-weight: 600; font-variant-numeric: tabular-nums; }
.rg-panel-close {
  position: absolute;
  top: 8px;
  right: 9px;
  display: grid;
  place-items: center;
  width: 28px;
  height: 28px;
  padding: 0;
  border: 1px solid transparent;
  border-radius: 7px;
  background: transparent;
  color: #a3a3a3;
  cursor: pointer;
  transition: background-color .16s ease, color .16s ease;
}
.rg-panel-close:hover { background: rgba(255, 255, 255, .06); color: #f5f5f5; }
.rg-panel-close:focus-visible { outline: 2px solid rgba(245, 166, 35, .65); outline-offset: 1px; }
.rg-panel-close svg { width: 12px; height: 12px; }
.rg-panel-body {
  flex: 1 1 auto;
  min-height: 0;
  padding: 9px;
  overflow-y: auto;
  overscroll-behavior: contain;
  scrollbar-width: thin;
  scrollbar-color: rgba(255, 255, 255, .16) transparent;
}
.rg-panel-label {
  margin: 5px 3px 7px;
  color: #a3a3a3;
  font-size: .72rem;
  font-weight: 600;
  letter-spacing: .01em;
}
.rg-panel-label:not(:first-child) { margin-top: 12px; }
.rg-panel-empty {
  padding: 14px 12px;
  border: 1px solid rgba(255, 255, 255, .08);
  border-radius: 8px;
  background: #2b2b2b;
  color: #a3a3a3;
  font-size: .82rem;
  line-height: 1.5;
  text-align: center;
}
.rg-panel-empty strong { display: block; margin-bottom: 4px; color: #f5f5f5; font-size: .88rem; font-weight: 600; }
.rg-panel-empty .rg-btn { margin-top: 10px; }
.rg-panel-foot {
  display: flex;
  flex: 0 0 auto;
  gap: 7px;
  padding: 8px 10px;
  border-top: 1px solid rgba(255, 255, 255, .08);
}
.rg-panel .rg-btn {
  height: 33px;
  padding: 0 11px;
  border: 1px solid rgba(245, 166, 35, .28);
  border-radius: 7px;
  background: rgba(245, 166, 35, .1);
  color: #edb45b;
  box-shadow: none;
  font-size: .76rem;
  font-weight: 600;
  transition: border-color .16s ease, background-color .16s ease, color .16s ease;
}
.rg-panel .rg-btn:hover { border-color: rgba(245, 166, 35, .45); background: rgba(245, 166, 35, .16); color: #ffd18a; }
.rg-panel .rg-btn:focus-visible { outline: 2px solid rgba(245, 166, 35, .55); outline-offset: 2px; }
.rg-panel .rg-btn svg { width: 13px; height: 13px; }
.rg-panel-foot .rg-btn { flex: 1 1 auto; }
.rg-panel-foot .rg-btn.is-ghost {
  flex: 0 0 68px;
  border-color: rgba(255, 255, 255, .1);
  background: transparent;
  color: #a3a3a3;
}
.rg-panel-foot .rg-btn.is-ghost:hover { border-color: rgba(255, 255, 255, .16); background: rgba(255,255,255,.04); color: #f5f5f5; }

.rg-cards { display: grid; gap: 8px; margin: 0; padding: 0; list-style: none; }
.rg-card {
  min-width: 0;
  padding: 10px 11px;
  border: 1px solid rgba(255, 255, 255, .08);
  border-radius: 8px;
  background: #2b2b2b;
  opacity: 0;
  transform: translate3d(0, 3px, 0);
  animation: rg-card-in .2s ease-out forwards;
  transition: border-color .16s ease, background-color .16s ease;
}
.rg-card:hover { border-color: rgba(255, 255, 255, .14); background: #303030; }
.rg-card.is-flash { border-color: rgba(245, 166, 35, .5); background: #30302d; }
@keyframes rg-card-in { to { opacity: 1; transform: none; } }
.rg-card-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 9px;
}
.rg-card-name {
  min-width: 0;
  margin: 0;
  color: #f5f5f5;
  font-size: .9rem;
  font-weight: 650;
  line-height: 1.3;
  overflow-wrap: anywhere;
}
.rg-card-badge {
  flex: 0 1 auto;
  height: 18px;
  max-width: 116px;
  padding: 0 6px;
  overflow: hidden;
  border: 1px solid rgba(255, 255, 255, .1);
  border-radius: 5px;
  color: #a3a3a3;
  font-size: .58rem;
  font-weight: 600;
  letter-spacing: .035em;
  line-height: 16px;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.rg-card-badge.is-distributer,
.rg-card-badge.is-exclusive { border-color: rgba(245, 166, 35, .22); color: #d8aa61; }
.rg-card-meta {
  margin: 5px 0 0;
  color: #a3a3a3;
  font-size: .74rem;
  line-height: 1.45;
  overflow-wrap: anywhere;
}
.rg-card-actions {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 6px;
  min-width: 0;
  margin-top: 9px;
}
.rg-card-link {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 5px;
  box-sizing: border-box;
  min-width: 0;
  height: 30px;
  padding: 0 9px;
  border: 1px solid rgba(255, 255, 255, .1);
  border-radius: 7px;
  background: transparent;
  color: #c5c5c5;
  font: inherit;
  font-size: .72rem;
  font-weight: 550;
  text-decoration: none;
  cursor: pointer;
  transition: border-color .16s ease, background-color .16s ease, color .16s ease;
}
.rg-card-link:hover { border-color: rgba(255, 255, 255, .15); background: rgba(255, 255, 255, .045); color: #f5f5f5; }
.rg-card-link:focus-visible { outline: 2px solid rgba(245, 166, 35, .55); outline-offset: 2px; }
.rg-card-link svg { width: 12px; height: 12px; }
.rg-card-link.is-primary { border-color: rgba(245, 166, 35, .24); background: rgba(245, 166, 35, .1); color: #edb45b; }
.rg-card-link.is-primary:hover { border-color: rgba(245, 166, 35, .42); background: rgba(245, 166, 35, .16); color: #ffd18a; }
.rg-card-link.is-icon { flex: 0 0 30px; width: 30px; padding: 0; }

.rg-marker {
  position: relative;
  width: 0;
  height: 0;
  pointer-events: none;
}
.rg-marker i,
.rg-marker b {
  position: absolute;
  left: 0;
  top: 0;
  border-radius: 50%;
  transform: translate(-50%, -50%);
}
.rg-marker b {
  width: 5px;
  height: 5px;
  background: #60a5fa;
  border: 1.5px solid #1d4ed8;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.45);
}
.rg-marker i {
  width: 14px;
  height: 14px;
  border: 1px solid rgba(59, 130, 246, .35);
  animation: rg-ripple 3.6s var(--rg-ease) infinite;
}
.rg-marker.is-group b { width: 7px; height: 7px; }
.rg-marker span {
  position: absolute;
  left: 6px;
  top: -15px;
  padding: 0 4px;
  border-radius: 4px;
  background: var(--rg-card);
  color: var(--rg-text);
  font-size: 9px;
  font-weight: 600;
  line-height: 14px;
  font-variant-numeric: tabular-nums;
  box-shadow: inset 0 0 0 1px var(--rg-line-hi);
}
@keyframes rg-ripple {
  0% { transform: translate(-50%, -50%) scale(.3); opacity: .7; }
  70%, 100% { transform: translate(-50%, -50%) scale(1); opacity: 0; }
}

@media (min-width: 1024px) {
  .rg-stage.is-ready .rg-globe { transition: opacity 1.1s var(--rg-ease), transform .7s var(--rg-ease); }
  .rg-visual.has-panel .rg-stage.is-ready .rg-globe { transform: translate3d(-24%, 0, 0); }
  .rg-visual.has-panel .rg-tools { right: 334px; }
}

.rg-visual.is-flat .rg-stage {
  height: auto;
  min-height: 260px;
}
.rg-visual.is-flat .rg-fallback { position: relative; inset: auto; padding: 16px 0; }
.rg-visual.is-flat .rg-tools { display: none; }
.rg-visual.is-flat .rg-panel {
  position: relative;
  top: auto;
  right: auto;
  width: auto;
  max-height: none;
  margin-top: 8px;
  transform: translate3d(0, 10px, 0);
}
.rg-visual.is-flat .rg-panel.is-open { transform: none; }

@media (max-width: 1180px) {
  .rg-shell { gap: 32px; }
  .rg-panel { width: 310px; }
  .rg-visual.has-panel .rg-tools { right: 320px; }
}

@media (max-width: 1023.98px) {
  .rg-shell {
    grid-template-columns: minmax(0, 1fr);
    gap: 8px;
    padding: 18px 18px 12px;
  }
  .rg-copy { max-width: 100%; text-align: center; }
  .rg-search { max-width: 100%; }
  .rg-stage { height: clamp(280px, 68vw, 360px); max-width: 100%; }
  .rg-tools { right: 8px; bottom: 8px; }
  .rg-visual.has-panel .rg-tools { right: 8px; }
  .rg-panel {
    position: relative;
    top: auto;
    right: auto;
    width: 100%;
    max-height: min(74vh, 640px);
    max-height: min(74dvh, 640px);
    margin-top: 10px;
    transform: translate3d(0, 8px, 0);
  }
  .rg-panel.is-open { transform: none; }
  .rg-panel-body { max-height: min(52vh, 440px); max-height: min(52dvh, 440px); }
}

@media (max-width: 560px) {
  .rg-shell { padding: 14px 14px 10px; gap: 6px; }
  .rg-title { font-size: 1.35rem; }
  .rg-stage { height: clamp(250px, 76vw, 310px); }
  .rg-panel-head { padding-right: 42px; }
  .rg-panel-foot { gap: 6px; padding: 8px; }
  .rg-panel-foot .rg-btn.is-ghost { flex-basis: 62px; }
  .rg-card { padding: 10px; }
}

@media (prefers-reduced-motion: reduce) {
  .rg-skeleton-orb::after,
  .rg-marker i,
  .rg-suggest { animation: none; }
  .rg-marker i { opacity: 0; }
  .rg-copy,
  .rg-globe,
  .rg-panel,
  .rg-tip,
  .rg-tools,
  .rg-card { transition: none; }
  .rg-panel .rg-btn,
  .rg-card-link { transition: none; }
  .rg-copy { opacity: 1; transform: none; }
  .rg-globe { transform: none; }
  .rg-card { animation: none; opacity: 1; transform: none; }
}
