.ps-app-body {
  min-height: 100vh;
}

.ps-app-header {
  position: sticky;
  top: 0;
  z-index: 100;
  display: flex;
  flex-direction: row;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
  min-height: 66px;
  padding: 12px clamp(18px, 4vw, 48px);
}

.ps-brand-cluster {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  min-width: 0;
  white-space: nowrap;
}

.ps-release-badge {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 20px;
  border: 1px solid #d6d0f5;
  border-radius: 999px;
  background: #f0edff;
  color: #5142a4;
  padding: 3px 7px;
  font-size: 0.62rem;
  font-weight: 900;
  line-height: 1;
  letter-spacing: 0;
}

.ps-release-badge[hidden] {
  display: none;
}

.ps-account-role-badge {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 20px;
  margin-left: 5px;
  border: 1px solid #d6d0f5;
  border-radius: 999px;
  background: #f0edff;
  padding: 3px 7px;
  color: #5142a4;
  font-size: 0.6rem;
  font-weight: 900;
  line-height: 1;
}

.ps-account-role-badge[hidden],
[data-admin-navigation][hidden] {
  display: none !important;
}

.ps-shell-nav {
  display: flex;
  align-items: center;
  flex-wrap: nowrap;
  min-width: 0;
}

.ps-shell-nav > a,
.ps-auth-link {
  flex: 0 0 auto;
  white-space: nowrap;
}

.ps-nav-toggle {
  display: none;
  align-items: center;
  justify-content: center;
  gap: 8px;
  min-width: 44px;
  min-height: 44px;
  border: 1px solid var(--shell-line);
  border-radius: 8px;
  background: var(--shell-surface);
  color: var(--shell-ink);
  font: inherit;
  font-weight: 850;
  cursor: pointer;
}

.ps-nav-toggle-icon,
.ps-nav-toggle-icon::before,
.ps-nav-toggle-icon::after {
  display: block;
  width: 18px;
  height: 2px;
  border-radius: 999px;
  background: currentColor;
  content: "";
}

.ps-nav-toggle-icon {
  position: relative;
}

.ps-nav-toggle-icon::before {
  position: absolute;
  top: -6px;
}

.ps-nav-toggle-icon::after {
  position: absolute;
  top: 6px;
}

.ps-app-view {
  min-height: calc(100vh - 190px);
  outline: none;
}

.ps-app-view[aria-busy="true"] {
  cursor: progress;
}

.ps-route-progress {
  position: fixed;
  top: 65px;
  left: 0;
  z-index: 120;
  width: 100%;
  height: 3px;
  overflow: hidden;
  background: rgba(70, 104, 255, 0.12);
}

.ps-route-progress::after {
  display: block;
  width: 38%;
  height: 100%;
  background: var(--shell-blue);
  animation: ps-route-loading 0.75s ease-in-out infinite alternate;
  content: "";
}

@keyframes ps-route-loading {
  from { transform: translateX(-105%); }
  to { transform: translateX(265%); }
}

.ps-route-skeleton {
  display: grid;
  gap: 14px;
  width: min(1120px, calc(100% - 36px));
  margin: 0 auto;
  padding: 52px 0;
}

.ps-route-skeleton span {
  display: block;
  height: 22px;
  border-radius: 8px;
  background: linear-gradient(90deg, #e7eae5, #f5f6f3, #e7eae5);
  background-size: 200% 100%;
  animation: ps-skeleton 1.2s linear infinite;
}

.ps-route-skeleton span:first-child { width: min(360px, 70%); height: 48px; }
.ps-route-skeleton span:nth-child(2) { width: min(740px, 92%); }
.ps-route-skeleton span:last-child { width: min(560px, 78%); }

@keyframes ps-skeleton {
  to { background-position: -200% 0; }
}

.ps-auth-link.is-loading {
  display: inline-flex;
  align-items: center;
  min-width: 70px;
  min-height: 32px;
  pointer-events: none;
}

.ps-auth-placeholder {
  width: 64px;
  height: 12px;
  border-radius: 999px;
  background: #dde1dc;
  animation: ps-pulse 1.1s ease-in-out infinite alternate;
}

@keyframes ps-pulse {
  to { opacity: 0.48; }
}

.sr-only {
  position: absolute !important;
  width: 1px !important;
  height: 1px !important;
  padding: 0 !important;
  margin: -1px !important;
  overflow: hidden !important;
  clip: rect(0, 0, 0, 0) !important;
  white-space: nowrap !important;
  border: 0 !important;
}

.ps-shell-popover {
  position: fixed;
  top: 72px;
  right: clamp(18px, 4vw, 48px);
  z-index: 130;
}

.ps-app-footer {
  border-top: 1px solid var(--shell-line);
  background: rgba(255, 255, 255, 0.88);
  color: var(--shell-muted);
  padding: 24px clamp(18px, 4vw, 48px);
}

.ps-app-footer-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
  width: min(1120px, 100%);
  margin: 0 auto;
  font-size: 0.88rem;
  line-height: 1.55;
}

.ps-app-footer-inner > span:first-child {
  max-width: 720px;
}

.ps-footer-links {
  display: flex;
  gap: 14px;
  flex-wrap: wrap;
  white-space: nowrap;
}

.ps-footer-links a {
  color: var(--shell-ink);
  font-weight: 800;
  text-decoration: none;
}

.ps-route-error,
.ps-route-not-found {
  width: min(720px, calc(100% - 36px));
  margin: 60px auto;
  border: 1px solid var(--shell-line);
  border-radius: 12px;
  background: white;
  padding: clamp(24px, 5vw, 42px);
  box-shadow: var(--shell-shadow);
}

.ps-route-error h1,
.ps-route-not-found h1 {
  margin: 0 0 12px;
  font-size: clamp(2rem, 6vw, 3.5rem);
  line-height: 1;
}

.ps-route-error p,
.ps-route-not-found p {
  color: var(--shell-muted);
}

.ps-route-error-actions {
  display: flex;
  gap: 10px;
  margin-top: 22px;
  flex-wrap: wrap;
}

.ps-route-error button,
.ps-route-error a,
.ps-route-not-found a {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 44px;
  border: 1px solid var(--shell-line);
  border-radius: 8px;
  background: white;
  color: var(--shell-ink);
  padding: 10px 16px;
  font: inherit;
  font-weight: 850;
  text-decoration: none;
  cursor: pointer;
}

.ps-route-error button {
  border-color: var(--shell-ink);
  background: var(--shell-ink);
  color: white;
}

.ps-noscript {
  margin: 0;
  padding: 16px;
  background: #fff3cc;
  text-align: center;
}

.ps-app-header a:focus-visible,
.ps-app-header button:focus-visible,
.ps-app-footer a:focus-visible,
.ps-route-error a:focus-visible,
.ps-route-error button:focus-visible {
  outline: 3px solid rgba(70, 104, 255, 0.36);
  outline-offset: 3px;
}

@media (max-width: 1300px) {
  .ps-app-header {
    flex-direction: row;
    align-items: center;
  }

  .ps-nav-toggle {
    display: inline-flex;
  }

  .ps-shell-nav {
    position: absolute;
    top: calc(100% + 1px);
    right: 14px;
    left: 14px;
    display: none;
    align-items: stretch;
    flex-direction: column;
    gap: 4px;
    max-height: calc(100vh - 92px);
    overflow: auto;
    border: 1px solid var(--shell-line);
    border-radius: 10px;
    background: white;
    padding: 10px;
    box-shadow: var(--shell-shadow);
  }

  .ps-app-header.is-nav-open .ps-shell-nav {
    display: flex;
  }

  .ps-shell-nav > a {
    display: flex;
    align-items: center;
    min-height: 44px;
    border-radius: 7px;
    padding: 9px 12px;
  }

  .ps-shell-nav > a[aria-current="page"] {
    background: #eef0eb;
    text-decoration: none;
  }

  .ps-shell-nav .header-rewards {
    min-width: 0;
    padding: 6px 8px;
  }

  .ps-shell-popover {
    top: 72px;
    right: 14px;
  }
}

@media (max-width: 700px) {
  .ps-brand-cluster {
    gap: 6px;
  }

  .ps-release-badge {
    min-height: 18px;
    padding: 2px 6px;
    font-size: 0.56rem;
  }

  .ps-account-role-badge {
    min-height: 18px;
    padding: 2px 6px;
    font-size: 0.56rem;
  }

  .ps-app-footer-inner {
    align-items: flex-start;
    flex-direction: column;
  }

  .ps-footer-links {
    white-space: normal;
  }
}

.ps-suggestion-toggle {
  position: fixed;
  right: 22px;
  bottom: 22px;
  z-index: 70;
  display: inline-flex;
  min-width: 48px;
  min-height: 48px;
  align-items: center;
  justify-content: center;
  gap: 9px;
  border: 1px solid #5943d1;
  border-radius: 999px;
  background: #6750e8;
  color: #fff;
  padding: 11px 17px;
  box-shadow: 0 10px 26px rgba(57, 42, 145, 0.24);
  font-weight: 850;
  cursor: pointer;
  transition: transform 150ms ease, background 150ms ease, box-shadow 150ms ease;
}

.ps-suggestion-toggle svg,
.ps-suggestion-close svg {
  width: 21px;
  height: 21px;
  fill: none;
  stroke: currentColor;
  stroke-linecap: round;
  stroke-linejoin: round;
  stroke-width: 1.9;
}

.ps-suggestion-toggle:hover {
  background: #5943d1;
  box-shadow: 0 13px 30px rgba(57, 42, 145, 0.3);
  transform: translateY(-2px);
}

.ps-suggestion-toggle:active {
  transform: translateY(0);
}

.ps-suggestion-toggle:focus-visible,
.ps-suggestion-panel button:focus-visible,
.ps-suggestion-panel a:focus-visible,
.ps-suggestion-panel select:focus-visible,
.ps-suggestion-panel textarea:focus-visible {
  outline: 3px solid rgba(103, 80, 232, 0.28);
  outline-offset: 3px;
}

.ps-suggestion-panel {
  position: fixed;
  right: 22px;
  bottom: 82px;
  z-index: 71;
  width: min(390px, calc(100vw - 28px));
  max-height: calc(100vh - 106px);
  overflow: auto;
  border: 1px solid #dddfe7;
  border-radius: 8px;
  background: #fff;
  color: #1b1b25;
  padding: 20px;
  box-shadow: 0 20px 46px rgba(29, 24, 59, 0.2);
}

.ps-suggestion-panel[hidden],
.ps-suggestion-signed-out[hidden],
.ps-suggestion-form[hidden] {
  display: none;
}

.ps-suggestion-panel header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 16px;
}

.ps-suggestion-panel header > div {
  display: grid;
  gap: 4px;
}

.ps-suggestion-panel header span,
.ps-suggestion-form label > span,
.ps-suggestion-context span {
  color: #6b7280;
  font-size: 0.72rem;
  font-weight: 850;
  text-transform: uppercase;
}

.ps-suggestion-panel h2 {
  margin: 0;
  font-size: 1.22rem;
  letter-spacing: 0;
  line-height: 1.2;
}

.ps-suggestion-close {
  display: grid;
  width: 44px;
  height: 44px;
  flex: 0 0 44px;
  place-items: center;
  border: 1px solid #e0e2e8;
  border-radius: 7px;
  background: #fff;
  color: #4b5260;
  cursor: pointer;
}

.ps-suggestion-intro {
  margin: 14px 0;
  color: #606978;
  font-size: 0.9rem;
  line-height: 1.5;
}

.ps-suggestion-context {
  display: grid;
  gap: 3px;
  margin: 0 0 16px;
  border-block: 1px solid #ececf1;
  padding: 12px 0;
}

.ps-suggestion-context strong {
  overflow: hidden;
  color: #2b2935;
  font-size: 0.88rem;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.ps-suggestion-loading,
.ps-suggestion-signed-out p {
  margin: 0;
  color: #606978;
  font-size: 0.9rem;
}

.ps-suggestion-signed-out,
.ps-suggestion-form {
  display: grid;
  gap: 14px;
}

.ps-suggestion-signed-out a,
.ps-suggestion-form button[type="submit"] {
  display: inline-flex;
  min-height: 44px;
  align-items: center;
  justify-content: center;
  border: 1px solid #5943d1;
  border-radius: 7px;
  background: #6750e8;
  color: #fff;
  padding: 10px 15px;
  font-weight: 850;
  text-decoration: none;
}

.ps-suggestion-form label {
  display: grid;
  gap: 7px;
}

.ps-suggestion-form select,
.ps-suggestion-form textarea {
  width: 100%;
  border: 1px solid #d9dce5;
  border-radius: 7px;
  background: #fff;
  color: #1b1b25;
  font: inherit;
}

.ps-suggestion-form select {
  min-height: 44px;
  padding: 9px 11px;
}

.ps-suggestion-form textarea {
  min-height: 116px;
  resize: vertical;
  padding: 11px;
  line-height: 1.45;
}

.ps-suggestion-form-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.ps-suggestion-form-footer small {
  color: #737b88;
  font-size: 0.76rem;
}

.ps-suggestion-form button[type="submit"] {
  cursor: pointer;
}

.ps-suggestion-form button[type="submit"]:disabled {
  cursor: wait;
  opacity: 0.62;
}

.ps-suggestion-message {
  margin: 0;
  border-left: 3px solid #16865c;
  background: #eef9f4;
  color: #116847;
  padding: 9px 11px;
  font-size: 0.84rem;
  line-height: 1.4;
}

.ps-suggestion-message.is-error {
  border-left-color: #c23c32;
  background: #fff2f0;
  color: #9d2f28;
}

@media (max-width: 560px) {
  .ps-suggestion-toggle {
    right: 14px;
    bottom: 14px;
    width: 50px;
    height: 50px;
    padding: 0;
  }

  .ps-suggestion-toggle > span {
    position: absolute;
    width: 1px;
    height: 1px;
    overflow: hidden;
    clip: rect(0 0 0 0);
    clip-path: inset(50%);
    white-space: nowrap;
  }

  .ps-suggestion-panel {
    left: 14px;
    right: 14px;
    bottom: 74px;
    width: auto;
    max-height: calc(100vh - 94px);
    padding: 18px;
  }
}

@media (prefers-reduced-motion: reduce) {
  .ps-suggestion-toggle {
    transition: none;
  }

  .ps-route-progress::after,
  .ps-route-skeleton span,
  .ps-auth-placeholder {
    animation: none;
  }
}
