.sn {
  --sn-night: #0a1533;
  --sn-line: rgba(255, 255, 255, .15);
  --sn-gap: 8px;
  top: max(16px, env(safe-area-inset-top));
  gap: var(--sn-gap);
  align-items: center;
}

.sn-actions, .sn-desktop { display: flex; align-items: center; gap: var(--sn-gap); }
.sn .sn-desktop { display: none; gap: 2px; padding: 3px; }
.sn-group { position: relative; }
.sn summary { cursor: pointer; list-style: none; }
.sn summary::-webkit-details-marker { display: none; }
.sn-group > summary, .sn-desktop > a {
  display: flex;
  align-items: center;
  gap: .45rem;
  min-height: 36px;
  padding: 0 .75rem;
  border-radius: 100px;
  color: #e3e8fb;
  font-size: .875rem;
  white-space: nowrap;
}
.sn-group > summary:hover, .sn-group > summary[data-current],
.sn-group[open] > summary, .sn-desktop > a[aria-current], .sn-desktop > a:hover {
  background: rgba(151, 177, 255, .17);
  color: #fff;
}
.sn-group summary svg { width: 14px; fill: none; stroke: currentColor; stroke-width: 1.6; transition: transform .2s; }
.sn-group[open] summary svg { transform: rotate(180deg); }
.sn-pop, .sn-mobile-panel {
  border: 1px solid var(--sn-line);
  border-radius: 1.4rem;
  background: radial-gradient(100% 120% at 100% 0%, #162a6c, transparent 70%), var(--sn-night);
  box-shadow: 0 24px 54px -16px #070f2a85;
  padding: .5rem;
}
.sn-desktop .sn-pop { position: absolute; top: calc(100% + 14px); left: -4px; width: 20rem; }
.sn .sn-pop a, .sn .sn-mobile-panel > a {
  display: flex;
  align-items: center;
  gap: .75rem;
  min-height: 46px;
  padding: .55rem .65rem;
  border-radius: .95rem;
  color: #fff;
  font-size: .9rem;
  line-height: 1.35;
}
.sn-pop a:hover, .sn-pop a[aria-current], .sn-mobile-panel > a:hover,
.sn-mobile-panel > a[aria-current] { background: #a7bcff24; }
.sn-pop a small { display: block; margin-top: .2rem; color: #bdc9e9; font-size: .78rem; }
.sn-icon {
  display: grid;
  place-items: center;
  flex: 0 0 36px;
  width: 36px;
  height: 36px;
  border-radius: 12px;
  color: #becdff;
  background: #a8bfff20;
}
.sn-icon svg, .sn-actions svg { width: 18px; fill: none; stroke: currentColor; stroke-width: 1.6; stroke-linecap: round; stroke-linejoin: round; }
.sn :focus-visible, .sn-dialog :focus-visible { outline: 2px solid #99b5ff; outline-offset: 2px; }

.sn .sn-plan {
  gap: .5rem;
  padding: 0 .75rem;
  color: white;
  font-size: .85rem;
  font-weight: 600;
  white-space: nowrap;
}
.sn .sn-plan[hidden], .sn-plan b[hidden] { display: none; }
.sn-plan b { min-width: 1.4rem; border-radius: 20px; padding: .12rem .35rem; background: #c5d1ff; color: #0a1533; font-size: .75rem; text-align: center; }
.sn .sn-mobile > summary { width: 44px; justify-content: center; }
.sn-mobile-panel {
  position: absolute;
  inset: calc(100% + 10px) 0 auto auto;
  width: min(100%, 370px);
  max-height: calc(100dvh - 96px - env(safe-area-inset-top) - env(safe-area-inset-bottom));
  overflow: auto;
  overscroll-behavior: contain;
}
.sn-mobile-panel .sn-group > summary { min-height: 46px; justify-content: space-between; }
.sn-mobile-panel .sn-pop { border: 0; box-shadow: none; background: #ffffff08; margin: 0 0 .3rem; }
.sn-mobile-panel .sn-pop a { padding-inline: .45rem; }
@media (min-width: 960px) {
  .sn { top: max(24px, env(safe-area-inset-top)); }
  .sn .sn-desktop { display: flex; }
  .sn .sn-mobile { display: none; }
}
@media (max-width: 959px) {
  .sn .nav-cta { padding-inline: .75rem; font-size: .8rem; white-space: nowrap; }
  .sn .sn-plan { position: fixed; right: max(16px, env(safe-area-inset-right)); bottom: calc(16px + env(safe-area-inset-bottom)); z-index: 61; background: #14265d; }
  .sn[data-activity-dock] .sn-plan { bottom: calc(84px + env(safe-area-inset-bottom)); }
  body.has-tray .sn .sn-plan { position: static; padding-inline: .55rem; }
  body.has-tray .sn-plan > span { display: none; }
}
@media (max-width: 390px) {
  .sn { left: 10px; right: 10px; --sn-gap: 5px; }
  .sn .nav-brand { padding-inline: .65rem; }
  .sn .nav-brand .logo { width: 91px; }
  .sn .nav-cta { padding-inline: .6rem; max-width: 130px; white-space: normal; text-align: center; line-height: 1.1; }
  body.has-tray .sn-plan svg { display: none; }
}

.sn-dialog {
  box-sizing: border-box;
  width: min(34rem, calc(100% - 24px));
  max-height: min(85dvh, 46rem);
  margin: auto;
  padding: 0;
  border: 1px solid #cad5f5;
  border-radius: 1.65rem;
  color: #101b3b;
  background: #f4f7ff;
  box-shadow: 0 35px 100px #040d3c60;
  overflow: auto;
  overscroll-behavior: contain;
}
.sn-dialog::backdrop { background: #060d28a8; }
.sn-dialog[open] { animation: sn-enter .24s ease-out; }
@keyframes sn-enter { from { opacity: 0; transform: translateY(8px); } to { opacity: 1; transform: none; } }
.sn-dialog-head {
  display: flex;
  align-items: center;
  gap: .8rem;
  padding: 1.1rem 1.25rem;
  background: radial-gradient(90% 130% at 100% 0%, #2544af, transparent 72%), #0a1533;
  color: #fff;
}
.sn-dialog-head h2 { margin: 0; font-size: 1.4rem; font-weight: 600; }
.sn-dialog-head form { margin-left: auto; }
.sn-dialog-head button {
  display: grid;
  place-items: center;
  width: 44px;
  height: 44px;
  border: 1px solid #d1dcff40;
  border-radius: 50%;
  background: #ffffff12;
  color: #fff;
  font-size: 1.45rem;
  cursor: pointer;
}
.sn-items { margin: 0; padding: .75rem 1.25rem; list-style: none; }
.sn-items li {
  display: grid;
  gap: .28rem;
  padding: .9rem 0;
  border-bottom: 1px solid #d8e0f4;
  overflow-wrap: anywhere;
}
.sn-items li b { font-size: .97rem; }
.sn-items li small, .sn-dialog-foot p { color: #475676; font-size: .86rem; line-height: 1.5; }
.sn-dialog-foot { padding: 0 1.25rem 1.25rem; }
.sn-dialog-foot p { margin: 0 0 .8rem; }
.sn-dialog-foot a {
  display: flex;
  align-items: center;
  justify-content: space-between;
  min-height: 46px;
  gap: .5rem;
  padding: .5rem 1rem;
  border-radius: 100px;
  color: #fff;
  background: #1c3ee6;
  font-size: .9rem;
  font-weight: 700;
}
.sn-dialog-foot a:hover { background: #1432be; }
@media (max-width: 639px) {
  .sn-dialog { margin: auto auto calc(8px + env(safe-area-inset-bottom)); max-height: 82dvh; }
}
@media (prefers-reduced-motion: reduce) {
  .sn-dialog[open] { animation: none; }
  .sn-group summary svg { transition: none; }
}
