.psp-shell,
.psp-gate {
  --psp-bg: #f2f4f5;
  --psp-surface: #fff;
  --psp-text: #172337;
  --psp-muted: #687587;
  --psp-line: #d9e0e5;
  --psp-shell: #10233f;
  --psp-shell-glow: #28577e;
  --psp-hero: #152943;
  --psp-court-a: #4d8994;
  --psp-court-b: #215b68;
  --psp-accent: #f0a24a;
  --psp-accent-ink: #17253a;
  color: var(--psp-text);
  font-family: "Avenir Next", Avenir, Montserrat, Arial, sans-serif;
}

.psp-shell[data-theme="clay"] {
  --psp-bg: #f1ece5;
  --psp-surface: #fffaf3;
  --psp-text: #292724;
  --psp-muted: #746d66;
  --psp-line: #ddd2c6;
  --psp-shell: #2d2a27;
  --psp-shell-glow: #70564b;
  --psp-hero: #3a302a;
  --psp-court-a: #7d8064;
  --psp-court-b: #505646;
  --psp-accent: #df704f;
  --psp-accent-ink: #2b211d;
}

.psp-shell[data-theme="royal"] {
  --psp-bg: #f1f4fa;
  --psp-surface: #fff;
  --psp-text: #172246;
  --psp-muted: #68718d;
  --psp-line: #d7deec;
  --psp-shell: #182653;
  --psp-shell-glow: #34539a;
  --psp-hero: #1c2c61;
  --psp-court-a: #5175bd;
  --psp-court-b: #2f4b88;
  --psp-accent: #66cbe8;
  --psp-accent-ink: #152142;
}

.psp-shell *,
.psp-gate * {
  box-sizing: border-box;
}

.psp-shell a,
.psp-gate a {
  text-decoration: none;
}

.psp-shell {
  display: grid;
  grid-template-columns: 228px minmax(0, 1fr);
  width: min(1480px, calc(100vw - 32px));
  min-height: 900px;
  margin: 16px auto;
  overflow: hidden;
  background: var(--psp-bg);
  box-shadow: 0 24px 70px rgba(15, 31, 52, 0.16);
}

.psp-sidebar {
  display: flex;
  min-height: 100%;
  flex-direction: column;
  padding: 32px 19px 24px;
  color: #f7f8f5;
  background:
    radial-gradient(circle at 10% 88%, color-mix(in srgb, var(--psp-shell-glow) 55%, transparent), transparent 25%),
    var(--psp-shell);
}

.psp-brand {
  display: flex;
  align-items: center;
  gap: 12px;
  color: inherit;
}

.psp-brand__mark,
.psp-avatar {
  display: grid;
  width: 44px;
  height: 44px;
  flex: 0 0 auto;
  place-items: center;
  border-radius: 50%;
  color: var(--psp-accent-ink);
  background: var(--psp-accent);
  box-shadow: 0 0 0 5px color-mix(in srgb, var(--psp-accent) 12%, transparent);
  font-size: 11px;
  font-weight: 800;
}

.psp-brand strong,
.psp-brand small,
.psp-account strong,
.psp-account a {
  display: block;
}

.psp-brand strong {
  font-size: 15px;
  font-weight: 800;
  letter-spacing: 0.055em;
}

.psp-brand small {
  margin-top: 4px;
  color: rgba(247, 250, 239, 0.55);
  font-size: 8px;
  font-weight: 700;
  letter-spacing: 0.1em;
  text-transform: uppercase;
}

.psp-nav {
  display: flex;
  flex-direction: column;
  gap: 7px;
  margin-top: 42px;
}

.psp-nav a {
  position: relative;
  display: flex;
  min-height: 46px;
  align-items: center;
  gap: 11px;
  padding: 0 13px;
  border-radius: 8px;
  color: rgba(244, 249, 241, 0.65);
  font-size: 13px;
  font-weight: 700;
}

.psp-nav a:hover,
.psp-nav a:focus-visible {
  color: #fff;
  background: rgba(255, 255, 255, 0.08);
}

.psp-nav a[aria-current="page"] {
  color: var(--psp-accent-ink);
  background: var(--psp-accent);
}

.psp-nav a[aria-current="page"]::after {
  position: absolute;
  right: -19px;
  width: 4px;
  height: 25px;
  border-radius: 4px 0 0 4px;
  background: var(--psp-accent);
  content: "";
}

.psp-nav a span {
  width: 18px;
  text-align: center;
  font-size: 16px;
}

.psp-account {
  display: flex;
  align-items: center;
  gap: 11px;
  margin-top: auto;
  padding-top: 22px;
  border-top: 1px solid rgba(255, 255, 255, 0.13);
}

.psp-account strong {
  max-width: 128px;
  overflow: hidden;
  color: rgba(255, 255, 255, 0.82);
  font-size: 12px;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.psp-account a {
  margin-top: 3px;
  color: rgba(255, 255, 255, 0.48);
  font-size: 10px;
}

.psp-workspace {
  min-width: 0;
}

.psp-mobile-header,
.psp-mobile-nav {
  display: none;
}

.psp-content {
  width: 100%;
  max-width: 1230px;
  margin: 0 auto;
  padding: 50px clamp(28px, 4vw, 62px) 36px;
}

.psp-intro-row {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 32px;
  margin-bottom: 30px;
}

.psp-kicker {
  display: flex;
  align-items: center;
  gap: 9px;
  margin: 0;
  color: var(--psp-accent);
  font-size: 10px;
  font-weight: 800;
  letter-spacing: 0.18em;
  line-height: 1.4;
}

.psp-kicker::before {
  width: 24px;
  height: 3px;
  flex: 0 0 auto;
  background: currentColor;
  content: "";
}

.psp-intro-row h1 {
  margin: 11px 0 0;
  max-width: 100%;
  overflow-wrap: anywhere;
  font-size: clamp(42px, 5vw, 66px);
  font-weight: 800;
  letter-spacing: -0.065em;
  line-height: 0.98;
}

.psp-lead {
  max-width: 640px;
  margin: 16px 0 0;
  color: var(--psp-muted);
  font-size: 14px;
  line-height: 1.65;
}

.psp-theme-picker {
  display: flex;
  flex-wrap: wrap;
  justify-content: flex-end;
  gap: 7px;
  max-width: 360px;
}

.psp-theme-picker button {
  display: flex;
  min-height: 40px;
  align-items: center;
  gap: 7px;
  padding: 0 10px;
  border: 1px solid var(--psp-line);
  border-radius: 8px;
  color: var(--psp-muted);
  background: var(--psp-surface);
  box-shadow: none;
  font: inherit;
  font-size: 11px;
  font-weight: 700;
  cursor: pointer;
}

.psp-theme-picker button[aria-pressed="true"] {
  color: var(--psp-text);
  border-color: var(--psp-accent);
  box-shadow: 0 0 0 2px color-mix(in srgb, var(--psp-accent) 20%, transparent);
}

.psp-theme-picker i {
  display: flex;
}

.psp-theme-picker b {
  width: 10px;
  height: 18px;
  border: 1px solid rgba(0, 0, 0, 0.09);
}

.psp-theme-picker button:nth-child(1) b:first-child { background: #10233f; }
.psp-theme-picker button:nth-child(1) b:last-child { background: #f0a24a; }
.psp-theme-picker button:nth-child(2) b:first-child { background: #2d2a27; }
.psp-theme-picker button:nth-child(2) b:last-child { background: #df704f; }
.psp-theme-picker button:nth-child(3) b:first-child { background: #182653; }
.psp-theme-picker button:nth-child(3) b:last-child { background: #66cbe8; }

.psp-hero {
  display: grid;
  grid-template-columns: minmax(300px, 0.92fr) minmax(350px, 1.08fr);
  min-height: 340px;
  overflow: hidden;
  color: #f7faef;
  background: var(--psp-hero);
}

.psp-hero__copy {
  display: flex;
  flex-direction: column;
  justify-content: center;
  padding: 42px;
}

.psp-hero h2 {
  max-width: 440px;
  margin: 17px 0 0;
  color: inherit;
  font-size: clamp(31px, 3.3vw, 48px);
  font-weight: 800;
  letter-spacing: -0.055em;
  line-height: 1.02;
}

.psp-hero__copy > p:not(.psp-kicker) {
  max-width: 500px;
  margin: 17px 0 0;
  color: rgba(255, 255, 255, 0.68);
  font-size: 13px;
  line-height: 1.65;
}

.psp-state {
  align-self: flex-start;
  margin-top: 22px;
  padding: 8px 11px;
  border: 1px solid rgba(255, 255, 255, 0.18);
  border-radius: 6px;
  color: rgba(255, 255, 255, 0.78);
  background: rgba(255, 255, 255, 0.07);
  font-size: 10px;
  font-weight: 800;
  letter-spacing: 0.06em;
  text-transform: uppercase;
}

.psp-court {
  position: relative;
  min-width: 0;
  overflow: hidden;
  clip-path: polygon(9% 0, 100% 0, 100% 100%, 0 100%);
  background:
    radial-gradient(circle at 25% 14%, color-mix(in srgb, var(--psp-accent) 24%, transparent), transparent 25%),
    linear-gradient(135deg, var(--psp-court-a), var(--psp-court-b));
}

.psp-court__line {
  position: absolute;
  inset: 26% 8% 11% 13%;
  border: 1px solid rgba(255, 255, 255, 0.62);
  transform: perspective(540px) rotateX(58deg);
}

.psp-court__line::before,
.psp-court__line::after {
  position: absolute;
  background: rgba(255, 255, 255, 0.55);
  content: "";
}

.psp-court__line::before { top: 50%; right: 0; left: 0; height: 1px; }
.psp-court__line::after { top: 0; bottom: 0; left: 50%; width: 1px; }

.psp-court__ball {
  position: absolute;
  bottom: 26%;
  left: 25%;
  width: 29px;
  height: 29px;
  border: 4px solid rgba(0, 0, 0, 0.13);
  border-radius: 50%;
  background: #dfe354;
}

.psp-court__racket {
  position: absolute;
  top: 23%;
  right: 18%;
  width: 70px;
  height: 88px;
  border: 7px solid #d9a46d;
  border-radius: 48%;
  transform: rotate(24deg);
}

.psp-court__racket::after {
  position: absolute;
  bottom: -43px;
  left: 50%;
  width: 15px;
  height: 47px;
  border-radius: 0 0 8px 8px;
  background: #d9a46d;
  content: "";
  transform: translateX(-50%);
}

.psp-section {
  margin-top: 40px;
}

.psp-section__heading {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 20px;
}

.psp-section__heading h2,
.psp-panel h2 {
  margin: 8px 0 0;
  color: var(--psp-text);
  font-size: 25px;
  font-weight: 800;
  letter-spacing: -0.04em;
  line-height: 1.15;
}

.psp-section__heading > span {
  color: var(--psp-muted);
  font-size: 11px;
  font-weight: 700;
}

.psp-path {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 12px;
  margin: 18px 0 0;
  padding: 0;
  list-style: none;
}

.psp-path li {
  display: grid;
  grid-template-columns: 43px minmax(0, 1fr);
  min-height: 168px;
  gap: 13px;
  padding: 20px 17px;
  border-top: 3px solid var(--psp-accent);
  background: var(--psp-surface);
  box-shadow: 0 1px 0 var(--psp-line);
}

.psp-path li > span {
  display: grid;
  width: 39px;
  height: 39px;
  place-items: center;
  color: var(--psp-accent-ink);
  background: var(--psp-accent);
  font-size: 10px;
  font-weight: 800;
}

.psp-path small {
  color: var(--psp-accent);
  font-size: 9px;
  font-weight: 800;
  letter-spacing: 0.1em;
}

.psp-path h3 {
  margin: 7px 0 0;
  color: var(--psp-text);
  font-size: 16px;
  font-weight: 800;
  letter-spacing: -0.02em;
  line-height: 1.2;
}

.psp-path p,
.psp-muted,
.psp-match-empty p {
  margin: 10px 0 0;
  color: var(--psp-muted);
  font-size: 11px;
  line-height: 1.55;
}

.psp-dashboard-grid {
  display: grid;
  grid-template-columns: 1.25fr 0.75fr;
  gap: 12px;
  margin-top: 34px;
}

.psp-panel {
  min-width: 0;
  padding: 25px;
  background: var(--psp-surface);
  box-shadow: 0 1px 0 var(--psp-line);
}

.psp-empty-graph {
  position: relative;
  display: flex;
  height: 92px;
  align-items: flex-end;
  justify-content: space-between;
  margin-top: 22px;
  padding: 0 12px 10px;
  border-bottom: 1px solid var(--psp-line);
}

.psp-empty-graph i {
  width: 13%;
  border: 1px dashed var(--psp-line);
  border-bottom: 0;
  background: color-mix(in srgb, var(--psp-accent) 8%, transparent);
}

.psp-empty-graph i:nth-child(1) { height: 25%; }
.psp-empty-graph i:nth-child(2) { height: 35%; }
.psp-empty-graph i:nth-child(3) { height: 48%; }
.psp-empty-graph i:nth-child(4) { height: 63%; }
.psp-empty-graph i:nth-child(5) { height: 78%; }

.psp-empty-graph span {
  position: absolute;
  right: 12px;
  bottom: 32px;
  left: 12px;
  border-top: 2px dashed var(--psp-accent);
  opacity: 0.5;
  transform: rotate(-9deg);
}

.psp-match-empty {
  display: grid;
  grid-template-columns: 76px 1fr;
  align-items: center;
  gap: 17px;
  margin-top: 25px;
}

.psp-match-empty > span {
  display: grid;
  width: 76px;
  height: 76px;
  place-items: center;
  border: 1px dashed var(--psp-line);
  border-radius: 50%;
  color: var(--psp-accent);
  font-size: 20px;
  font-weight: 800;
}

.psp-match-empty p {
  margin: 0;
}

.psp-footer {
  display: flex;
  justify-content: flex-end;
  gap: 18px;
  margin-top: 28px;
}

.psp-footer a {
  color: var(--psp-muted);
  font-size: 11px;
  font-weight: 700;
}

.psp-gate {
  width: min(760px, calc(100vw - 32px));
  margin: 42px auto;
  padding: clamp(36px, 7vw, 72px);
  text-align: center;
  background: var(--psp-surface);
  box-shadow: 0 24px 70px rgba(15, 31, 52, 0.14);
}

.psp-gate__mark {
  display: grid;
  width: 62px;
  height: 62px;
  margin: 0 auto 26px;
  place-items: center;
  border-radius: 50%;
  color: var(--psp-accent-ink);
  background: var(--psp-accent);
  font-size: 14px;
  font-weight: 800;
}

.psp-gate .psp-kicker {
  justify-content: center;
}

.psp-gate h1 {
  margin: 14px 0 0;
  color: var(--psp-text);
  font-size: clamp(34px, 6vw, 54px);
  font-weight: 800;
  letter-spacing: -0.055em;
  line-height: 1;
}

.psp-gate > p:not(.psp-kicker) {
  max-width: 540px;
  margin: 19px auto 0;
  color: var(--psp-muted);
  font-size: 14px;
  line-height: 1.65;
}

.psp-gate__actions {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 10px;
  margin-top: 28px;
}

.psp-button {
  display: inline-flex;
  min-height: 48px;
  align-items: center;
  justify-content: center;
  padding: 0 18px;
  border-radius: 6px;
  font-size: 13px;
  font-weight: 800;
}

.psp-button--primary {
  color: var(--psp-accent-ink);
  background: var(--psp-accent);
  box-shadow: 7px 7px 0 rgba(0, 0, 0, 0.12);
}

.psp-button--quiet {
  color: var(--psp-text);
  border: 1px solid var(--psp-line);
  background: var(--psp-surface);
}

@media (max-width: 1000px) {
  .psp-shell { grid-template-columns: 196px minmax(0, 1fr); }
  .psp-sidebar { padding-inline: 14px; }
  .psp-nav a[aria-current="page"]::after { right: -14px; }
  .psp-brand small { display: none; }
  .psp-intro-row { display: block; }
  .psp-theme-picker { justify-content: flex-start; max-width: none; margin-top: 20px; }
  .psp-hero { grid-template-columns: minmax(270px, 0.95fr) minmax(300px, 1.05fr); }
  .psp-hero__copy { padding: 34px 28px; }
  .psp-path { grid-template-columns: 1fr; }
  .psp-path li { min-height: 0; }
}

@media (max-width: 760px) {
  .psp-shell {
    display: block;
    width: 100%;
    min-height: 100vh;
    margin: 0;
    padding-bottom: 70px;
    box-shadow: none;
  }

  .psp-sidebar { display: none; }

  .psp-mobile-header {
    display: flex;
    min-height: 68px;
    align-items: center;
    justify-content: space-between;
    padding: 0 18px;
    color: #f7f8f5;
    background: var(--psp-shell);
    font-size: 14px;
    letter-spacing: 0.06em;
  }

  .psp-mobile-header .psp-avatar { width: 36px; height: 36px; }
  .psp-content { padding: 29px 16px 34px; }
  .psp-intro-row h1 { font-size: 40px; }
  .psp-theme-picker { display: grid; grid-template-columns: repeat(3, 1fr); }
  .psp-theme-picker button { justify-content: center; min-width: 0; padding-inline: 5px; }
  .psp-theme-picker button { font-size: 0; }
  .psp-theme-picker i { font-size: initial; }

  .psp-hero { display: flex; min-height: 0; flex-direction: column; }
  .psp-court { order: 1; min-height: 220px; clip-path: none; }
  .psp-hero__copy { order: 2; padding: 29px 21px 32px; }
  .psp-hero h2 { font-size: 32px; }
  .psp-section__heading { align-items: flex-start; flex-direction: column; }
  .psp-dashboard-grid { grid-template-columns: 1fr; }

  .psp-mobile-nav {
    position: fixed;
    z-index: 999;
    right: 0;
    bottom: 0;
    left: 0;
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    min-height: 64px;
    border-top: 1px solid rgba(255, 255, 255, 0.11);
    background: var(--psp-shell);
  }

  .psp-mobile-nav a {
    display: grid;
    place-items: center;
    color: rgba(255, 255, 255, 0.58);
    font-size: 10px;
    font-weight: 700;
  }

  .psp-mobile-nav a[aria-current="page"] { color: var(--psp-accent); }
  .psp-footer { justify-content: center; }
}

@media (prefers-reduced-motion: reduce) {
  .psp-shell *, .psp-gate * { scroll-behavior: auto !important; }
}
