:root {
  color-scheme: dark;
  font-family: "Onest", "Microsoft YaHei UI", "PingFang SC", system-ui, sans-serif;
}

.player-summary-uid {
  margin: 0.35rem 0 0;
  color: var(--portal-muted);
  font-variant-numeric: tabular-nums;
}

.friend-search-form {
  display: grid;
  gap: 0.65rem;
  margin-bottom: 1rem;
}

.friend-search-form > label,
.friend-sections h3 {
  color: var(--portal-ink);
  font-size: 0.9rem;
  font-weight: 700;
}

.friend-search-row {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 0.65rem;
}

.friend-search-row input {
  min-width: 0;
  border: 1px solid var(--portal-line);
  border-radius: 0.7rem;
  background: var(--portal-bg);
  color: var(--portal-ink);
  padding: 0.75rem 0.85rem;
}

.friend-search-row input::placeholder {
  color: var(--portal-muted);
}

.friend-search-row input:focus-visible,
.friend-action:focus-visible {
  outline: 2px solid var(--portal-accent-soft);
  outline-offset: 2px;
}

.friend-search-result:not(:empty) {
  margin-bottom: 1.25rem;
}

.friend-sections {
  display: grid;
  gap: 1.35rem;
}

.friend-sections > section {
  min-width: 0;
}

.friend-request-list,
.friend-list,
.game-invite-list {
  display: grid;
  gap: 0.55rem;
  margin-top: 0.6rem;
}

.friend-row {
  display: flex;
  align-items: center;
  gap: 0.85rem;
  justify-content: space-between;
  min-width: 0;
  padding: 0.8rem;
  border: 1px solid var(--portal-line);
  border-radius: 0.75rem;
  background: var(--portal-surface);
}

.friend-player-copy {
  display: grid;
  min-width: 0;
  gap: 0.16rem;
}

.friend-player-copy strong,
.friend-player-copy small {
  overflow-wrap: anywhere;
}

.friend-player-copy small,
.friend-player-uid,
.friend-empty-state,
.friend-relationship-label {
  color: var(--portal-muted);
}

.friend-player-uid {
  font-size: 0.8rem;
  font-variant-numeric: tabular-nums;
}

.friend-status {
  flex: 0 0 auto;
  color: var(--portal-muted);
  font-size: 0.82rem;
}

.friend-status[data-online="true"] {
  color: oklch(0.78 0.16 150);
}

.friend-row-actions {
  display: flex;
  flex: 0 0 auto;
  flex-wrap: wrap;
  justify-content: flex-end;
  gap: 0.45rem;
}

.friend-action {
  min-height: 2.35rem;
  text-decoration: none;
}

.friend-empty-state {
  margin: 0;
  padding: 0.8rem 0;
}

@media (max-width: 759px) {
  .friend-search-form,
  .friend-search-row {
    grid-template-columns: 1fr;
  }

  .friend-row {
    align-items: flex-start;
    flex-direction: column;
  }

  .friend-row-actions {
    justify-content: flex-start;
    width: 100%;
  }
}

body[data-view="player"] {
  min-width: 320px;
  margin: 0;
  color: var(--portal-ink);
  background: var(--portal-bg);
}

.player-header-links {
  margin-left: auto;
  display: flex;
  align-items: center;
  gap: 22px;
}

.player-header-links a {
  color: var(--portal-muted);
  font-size: 0.82rem;
  font-weight: 650;
  text-decoration: none;
}

.player-header-links a:hover,
.player-header-links a:focus-visible {
  color: var(--portal-ink);
}

.player-shell {
  width: min(1160px, calc(100% - 40px));
  min-height: 100dvh;
  margin: 0 auto;
  padding: calc(var(--nav-height) + 44px) 0 72px;
}

.player-summary {
  padding: 0 0 30px;
  display: flex;
  align-items: end;
  justify-content: space-between;
  gap: 24px;
  border-bottom: 1px solid var(--portal-line);
}

.player-summary-copy p,
.player-summary-copy h1 {
  margin: 0;
}

.player-summary-copy p {
  color: var(--portal-muted);
  font-size: 0.84rem;
  font-weight: 650;
}

.player-summary-copy h1 {
  margin-top: 8px;
  font-size: 2.25rem;
  line-height: 1.15;
  letter-spacing: -0.025em;
  text-wrap: balance;
}

.player-summary-meta {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  justify-content: flex-end;
  gap: 10px;
}

.player-summary-meta span {
  min-height: 34px;
  padding: 0 12px;
  display: inline-flex;
  align-items: center;
  border: 1px solid var(--portal-line);
  color: var(--portal-muted);
  background: var(--portal-surface);
  font-size: 0.8rem;
  font-weight: 700;
}

#player-summary-balance {
  color: var(--portal-ink);
  border-color: var(--portal-accent);
}

.player-workspace {
  padding-top: 30px;
  display: grid;
  grid-template-columns: 220px minmax(0, 1fr);
  gap: clamp(28px, 5vw, 72px);
  align-items: start;
}

.player-tabs {
  display: grid;
  gap: 8px;
}

.player-tab {
  min-height: 48px;
  padding: 0 15px;
  display: flex;
  align-items: center;
  border: 1px solid transparent;
  color: var(--portal-muted);
  background: transparent;
  font: inherit;
  font-size: 0.9rem;
  font-weight: 700;
  text-align: left;
  cursor: pointer;
  transition: color 180ms ease, background-color 180ms ease, border-color 180ms ease;
}

.player-tab:hover {
  color: var(--portal-ink);
  background: var(--portal-surface);
}

.player-tab[aria-selected="true"] {
  color: var(--portal-ink);
  border-color: var(--portal-accent);
  background: var(--portal-surface-strong);
}

.player-tab:focus-visible,
.player-primary-action:focus-visible,
.player-header-links a:focus-visible {
  outline: 3px solid var(--portal-accent-soft);
  outline-offset: 3px;
}

.player-content {
  min-width: 0;
}

.player-panel {
  min-height: 0;
  padding: 4px 0 24px;
  outline: none;
}

.player-panel:focus-visible {
  outline: 1px solid var(--portal-accent-soft);
  outline-offset: 12px;
}

.player-panel-heading {
  max-width: 68ch;
  padding-bottom: 16px;
  border-bottom: 1px solid var(--portal-line);
}

.player-panel-heading h2 {
  margin: 0;
}

.player-panel-heading h2 {
  font-size: 1.55rem;
  line-height: 1.25;
  text-wrap: balance;
}

.player-placeholder,
.player-guest-state {
  margin-top: 18px;
  padding: 18px 0;
  border-bottom: 1px solid var(--portal-line);
}

.player-placeholder p,
.player-guest-state p {
  max-width: 64ch;
  margin: 0;
  color: var(--portal-muted);
  line-height: 1.7;
}

.player-primary-action {
  min-height: 44px;
  margin-top: 17px;
  padding: 0 16px;
  border: 1px solid var(--portal-accent);
  color: var(--portal-bg);
  background: var(--portal-accent-soft);
  font: inherit;
  font-size: 0.86rem;
  font-weight: 760;
  cursor: pointer;
}

.player-primary-action:hover {
  background: var(--portal-ink);
}

.player-secondary-action,
.player-secondary-link {
  min-height: 40px;
  padding: 0 14px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border: 1px solid var(--portal-line);
  color: var(--portal-ink);
  background: var(--portal-surface-strong);
  font: inherit;
  font-size: 0.78rem;
  font-weight: 750;
  line-height: 1.25;
  text-decoration: none;
  cursor: pointer;
  transition: border-color 180ms ease, background-color 180ms ease, color 180ms ease;
}

.player-secondary-action:hover,
.player-secondary-link:hover {
  border-color: var(--portal-accent-soft);
  background: var(--portal-bg);
}

.player-secondary-action:focus-visible,
.player-secondary-link:focus-visible {
  outline: 3px solid var(--portal-accent-soft);
  outline-offset: 2px;
}

.player-primary-action:disabled,
.player-secondary-action:disabled {
  opacity: 0.56;
  cursor: not-allowed;
}

.player-primary-action[aria-busy="true"],
.player-secondary-action[aria-busy="true"] {
  cursor: wait;
}

.player-state .player-secondary-action {
  margin-top: 16px;
}

.activity-list,
.notification-list {
  margin-top: 24px;
}

.activity-layout {
  display: grid;
  grid-template-columns: minmax(0, 1.18fr) minmax(280px, 0.82fr);
  gap: 24px;
  align-items: start;
}

.activity-cards {
  display: grid;
  border-top: 1px solid var(--portal-line);
}

.activity-card {
  min-width: 0;
  padding: 18px 0;
  display: grid;
  grid-template-columns: 136px minmax(0, 1fr);
  gap: 18px;
  border-bottom: 1px solid var(--portal-line);
  background: var(--portal-surface);
  transition: background-color 180ms ease, box-shadow 180ms ease;
}

.activity-card--selected {
  background: var(--portal-surface-strong);
  box-shadow: inset 3px 0 0 var(--portal-accent);
}

.activity-cover {
  min-height: 112px;
  display: grid;
  place-items: center;
  overflow: hidden;
  border: 1px solid var(--portal-line);
  background: var(--portal-bg);
}

.activity-cover-image {
  width: 100%;
  height: 100%;
  display: block;
  object-fit: cover;
}

.activity-cover-fallback {
  padding: 16px;
  color: var(--portal-muted);
  font-size: 0.76rem;
  font-weight: 700;
  text-align: center;
}

.activity-card-content {
  min-width: 0;
}

.activity-card h3,
.activity-detail h3 {
  margin: 0;
  color: var(--portal-ink);
  line-height: 1.35;
  overflow-wrap: anywhere;
}

.activity-card h3 {
  font-size: 1rem;
}

.activity-card-period,
.activity-card-reward,
.activity-detail-period,
.activity-detail-body {
  margin: 8px 0 0;
  color: var(--portal-muted);
  font-size: 0.8rem;
  line-height: 1.65;
  overflow-wrap: anywhere;
}

.activity-card-actions,
.activity-detail-actions,
.notification-actions {
  margin-top: 14px;
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.activity-card-actions .player-primary-action,
.activity-detail-actions .player-primary-action,
.notification-actions .player-primary-action {
  min-height: 40px;
  margin-top: 0;
}

.activity-detail {
  position: sticky;
  top: calc(var(--nav-height) + 24px);
  padding: 22px;
  border: 1px solid var(--portal-line);
  background: var(--portal-surface-strong);
}

.activity-detail-body {
  margin-top: 18px;
  padding-top: 18px;
  border-top: 1px solid var(--portal-line);
  color: var(--portal-ink);
  white-space: pre-wrap;
}

.notification-inbox {
  display: grid;
  border-top: 1px solid var(--portal-line);
}

.notification-item {
  padding: 20px 0;
  border-bottom: 1px solid var(--portal-line);
  background: transparent;
  transition: background-color 180ms ease, padding 180ms ease;
}

.notification-item--open {
  padding-right: 18px;
  padding-left: 18px;
  background: var(--portal-surface-strong);
}

.notification-heading {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr) auto;
  gap: 10px;
  align-items: center;
}

.notification-heading h3 {
  min-width: 0;
  margin: 0;
  font-size: 1rem;
  line-height: 1.4;
  overflow-wrap: anywhere;
}

.notification-time {
  color: var(--portal-muted);
  font-size: 0.72rem;
  white-space: nowrap;
}

.notification-unread-dot {
  width: 9px;
  height: 9px;
  border: 1px solid var(--portal-accent-soft);
  border-radius: 50%;
  background: var(--portal-accent);
  box-shadow: 0 0 0 4px color-mix(in oklch, var(--portal-accent) 15%, transparent);
}

.notification-body {
  max-width: 70ch;
  margin: 10px 0 0;
  color: var(--portal-muted);
  line-height: 1.7;
  overflow-wrap: anywhere;
  white-space: pre-wrap;
}

.notification-statuses {
  margin-top: 12px;
  display: flex;
  flex-wrap: wrap;
  gap: 7px;
}

.notification-statuses span {
  min-height: 28px;
  padding: 0 9px;
  display: inline-flex;
  align-items: center;
  border: 1px solid var(--portal-line);
  color: var(--portal-muted);
  font-size: 0.7rem;
  font-weight: 720;
}

.notification-expired-status {
  color: #ffb0a7 !important;
  border-color: #8a4039 !important;
}

.notification-toggle {
  margin-top: 14px;
}

.notification-detail {
  margin-top: 16px;
  padding-top: 16px;
  border-top: 1px solid var(--portal-line);
}

.notification-detail[hidden] {
  display: none;
}

.notification-detail .notification-body {
  margin-top: 0;
}

.checkin-calendar {
  margin-top: 24px;
  padding-bottom: 18px;
  overflow-x: auto;
  border-bottom: 1px solid var(--portal-line);
  scrollbar-width: thin;
}

.checkin-calendar-heading {
  min-width: 620px;
  margin-bottom: 18px;
  display: flex;
  align-items: end;
  justify-content: space-between;
  gap: 20px;
}

.checkin-calendar-heading h3 {
  margin: 0;
}

.checkin-calendar-heading h3 {
  font-size: 1.1rem;
  text-wrap: balance;
}

.checkin-weekdays,
.checkin-grid {
  min-width: 620px;
}

.checkin-weekdays,
.checkin-week {
  display: grid;
  grid-template-columns: repeat(7, minmax(0, 1fr));
}

.checkin-weekdays {
  border: 1px solid var(--portal-line);
  border-bottom: 0;
  color: var(--portal-muted);
  background: var(--portal-surface);
}

.checkin-weekdays span {
  min-height: 34px;
  display: grid;
  place-items: center;
  font-size: 0.76rem;
  font-weight: 700;
}

.checkin-grid {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  border-top: 1px solid var(--portal-line);
  border-left: 1px solid var(--portal-line);
}

.checkin-day {
  min-height: 118px;
  padding: 11px;
  display: flex;
  flex-direction: column;
  gap: 5px;
  border-right: 1px solid var(--portal-line);
  border-bottom: 1px solid var(--portal-line);
  background: var(--portal-surface);
}

.checkin-day--empty {
  min-height: 48px;
  background: color-mix(in oklch, var(--portal-bg) 76%, var(--portal-surface));
}

.checkin-day--today {
  background: var(--portal-surface-strong);
  box-shadow: inset 0 0 0 1px var(--portal-accent);
}

.checkin-day--checked,
.checkin-day--made-up {
  background: color-mix(in oklch, var(--portal-accent) 12%, var(--portal-surface));
}

.checkin-day--future {
  color: var(--portal-muted);
}

.checkin-day-number {
  color: var(--portal-ink);
  font-size: 1rem;
}

.checkin-day-reward,
.checkin-day-status {
  font-size: 0.72rem;
  line-height: 1.35;
}

.checkin-day-reward {
  color: var(--portal-muted);
}

.checkin-day-status {
  color: var(--portal-ink);
  font-weight: 700;
}

.checkin-day-action,
.checkin-secondary-action {
  min-height: 38px;
  border: 1px solid var(--portal-line);
  color: var(--portal-ink);
  background: var(--portal-surface-strong);
  font: inherit;
  font-size: 0.74rem;
  font-weight: 750;
  cursor: pointer;
}

.checkin-day-action {
  width: 100%;
  margin-top: auto;
  padding: 7px;
}

.checkin-day-action:hover,
.checkin-secondary-action:hover {
  border-color: var(--portal-accent-soft);
  background: var(--portal-bg);
}

.checkin-day-action:focus-visible,
.checkin-secondary-action:focus-visible,
.checkin-confirmation .player-primary-action:focus-visible {
  outline: 3px solid var(--portal-accent-soft);
  outline-offset: 2px;
}

.checkin-day-action:disabled,
.checkin-confirmation button:disabled {
  opacity: 0.55;
  cursor: wait;
}

.checkin-confirmation {
  width: min(430px, calc(100% - 32px));
  padding: 0;
  border: 1px solid var(--portal-line);
  color: var(--portal-ink);
  background: var(--portal-surface-strong);
  box-shadow: 0 24px 80px rgb(0 0 0 / 0.48);
}

.checkin-confirmation::backdrop {
  background: rgb(3 5 10 / 0.78);
}

.checkin-confirmation-shell {
  padding: 24px;
}

.checkin-confirmation h4 {
  margin: 0;
  font-size: 1.18rem;
  text-wrap: balance;
}

.checkin-confirmation-details {
  margin-top: 18px;
  border-top: 1px solid var(--portal-line);
}

.checkin-confirmation-details p {
  margin: 0;
  padding: 10px 0;
  display: flex;
  justify-content: space-between;
  border-bottom: 1px solid var(--portal-line);
  color: var(--portal-muted);
}

.checkin-confirmation-details .checkin-confirmation-net {
  color: var(--portal-ink);
  font-weight: 750;
}

.checkin-confirmation-actions {
  margin-top: 20px;
  display: flex;
  justify-content: flex-end;
  gap: 10px;
}

.checkin-confirmation-actions button {
  min-height: 42px;
  margin-top: 0;
  padding: 0 14px;
}

.makeup-payment-options {
  margin: 20px 0 0;
  padding: 0;
  display: grid;
  gap: 9px;
  border: 0;
}

.makeup-payment-options legend {
  margin-bottom: 4px;
  color: var(--portal-ink);
  font-weight: 740;
}

.makeup-payment-option {
  min-width: 0;
  padding: 11px 12px;
  display: flex;
  align-items: center;
  gap: 10px;
  border: 1px solid var(--portal-line);
  color: var(--portal-muted);
  cursor: pointer;
}

.makeup-payment-option:has(input:checked) {
  border-color: var(--portal-accent-soft);
  color: var(--portal-ink);
  background: var(--portal-bg);
}

.makeup-payment-option:has(input:disabled) {
  cursor: not-allowed;
  opacity: 0.58;
}

.makeup-payment-option input {
  accent-color: var(--portal-accent);
}

.checkin-shop-link {
  color: var(--portal-accent-soft);
  font-size: 0.84rem;
}

.checkin-shop-link:focus-visible {
  outline: 2px solid var(--portal-accent-soft);
  outline-offset: 3px;
}

.shop-product-list,
.inventory-list {
  min-width: 0;
  margin-top: 24px;
  border-top: 1px solid var(--portal-line);
}

.shop-product-row,
.inventory-row {
  min-width: 0;
  padding: 20px 0;
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 24px;
  align-items: center;
  border-bottom: 1px solid var(--portal-line);
}

.shop-product-copy,
.inventory-copy {
  min-width: 0;
  display: grid;
  gap: 6px;
}

.shop-product-copy strong,
.inventory-copy strong {
  font-size: 1rem;
}

.inventory-copy span {
  margin: 0;
  color: var(--portal-muted);
  line-height: 1.6;
  overflow-wrap: anywhere;
}

.shop-product-meta {
  display: grid;
  justify-items: end;
  gap: 6px;
  text-align: right;
}

.shop-product-price {
  color: var(--portal-ink);
  font-weight: 760;
  font-variant-numeric: tabular-nums;
}

.shop-product-limit {
  color: var(--portal-muted);
  font-size: 0.8rem;
}

.shop-buy-action {
  min-width: 112px;
  margin-top: 6px;
}

.shop-purchase-dialog {
  width: min(420px, calc(100% - 32px));
  padding: 0;
  border: 1px solid var(--portal-line);
  color: var(--portal-ink);
  background: var(--portal-surface-strong);
  box-shadow: 0 24px 80px rgb(0 0 0 / 0.48);
}

.shop-purchase-dialog::backdrop {
  background: rgb(3 5 10 / 0.78);
}

.shop-purchase-shell {
  padding: 24px;
}

.shop-purchase-shell h2,
.shop-purchase-shell p {
  margin: 0;
}

.shop-purchase-shell h2 {
  font-size: 1.18rem;
}

.shop-purchase-shell p {
  margin-top: 12px;
  color: var(--portal-muted);
}

.shop-purchase-actions {
  margin-top: 22px;
  display: flex;
  justify-content: flex-end;
  gap: 10px;
}

.shop-purchase-actions button {
  min-height: 42px;
  margin-top: 0;
}

.player-message {
  margin: 0;
  color: var(--portal-muted);
  font-size: 0.88rem;
}

.player-message:not(:empty) {
  margin-top: 18px;
}

.player-message[data-state="error"] {
  color: #ff9b8f;
}

.player-message[data-state="success"] {
  color: var(--portal-accent-soft);
}

@media (max-width: 899px) {
  .player-header-links {
    display: none;
  }

  .player-shell {
    width: min(100% - 28px, 720px);
  }

  .activity-layout {
    grid-template-columns: minmax(0, 1fr);
  }

  .activity-detail {
    position: static;
  }
}

@media (max-width: 759px) {
  .player-shell {
    padding-top: calc(var(--nav-height) + 28px);
  }

  .player-summary {
    align-items: flex-start;
    flex-direction: column;
  }

  .player-summary-copy h1 {
    font-size: 1.8rem;
  }

  .player-summary-meta {
    justify-content: flex-start;
  }

  .player-workspace {
    padding-top: 22px;
    display: block;
  }

  .player-tabs {
    margin: 0 -14px 28px;
    padding: 0 14px 8px;
    display: flex;
    gap: 8px;
    overflow-x: auto;
    scrollbar-width: thin;
  }

  .player-tab {
    min-width: max-content;
    flex: 0 0 auto;
  }

  .player-panel {
    min-height: 360px;
  }

  .checkin-calendar-heading,
  .checkin-weekdays,
  .checkin-grid {
    min-width: 560px;
  }

  .checkin-day {
    min-height: 108px;
    padding: 9px;
  }

  .shop-product-row,
  .inventory-row {
    grid-template-columns: 1fr;
    gap: 14px;
  }

  .shop-product-meta {
    justify-items: start;
    text-align: left;
  }

  .shop-buy-action,
  .inventory-row .player-secondary-link {
    width: 100%;
  }

  .shop-purchase-actions {
    align-items: stretch;
    flex-direction: column-reverse;
  }

  .activity-card {
    grid-template-columns: minmax(0, 1fr);
  }

  .activity-cover {
    min-height: 150px;
    aspect-ratio: 16 / 7;
  }

  .notification-heading {
    grid-template-columns: auto minmax(0, 1fr);
  }

  .notification-time {
    grid-column: 2;
  }

  .notification-actions > * {
    flex: 1 1 150px;
  }
}

@media (prefers-reduced-motion: reduce) {
  .player-tab,
  .player-primary-action,
  .player-secondary-action,
  .player-secondary-link,
  .activity-card,
  .notification-item,
  .checkin-day-action,
  .checkin-secondary-action {
    transition: none;
  }
}

/* Apple Dark Pro player-center refinement */
body[data-apple-page="player"] {
  --player-stage-base: #f5f5f7;
  --player-stage-activities: #eee9ff;
  --player-stage-notifications: #ffeaf2;
  --player-stage-friends: #eaf4ff;
  --player-stage-shop: #f2ecff;
  --player-stage-ink: #1d1d1f;
  --player-stage-muted: #5f5f64;
}

body[data-apple-page="player"] .player-shell {
  width: min(1180px, calc(100% - 40px));
  padding-top: calc(var(--nav-height) + 64px);
}

body[data-apple-page="player"] .player-summary {
  position: relative;
  min-height: 180px;
  padding: 38px 42px;
  overflow: hidden;
  align-items: flex-end;
  border: 0;
  border-radius: 28px;
  background:
    radial-gradient(circle at 84% 18%, rgb(100 210 255 / 0.24), transparent 30%),
    radial-gradient(circle at 18% 118%, rgb(191 90 242 / 0.2), transparent 38%),
    linear-gradient(135deg, #1b1b20 0%, #0d0d10 58%, #171122 100%);
  box-shadow: 0 28px 80px rgb(0 0 0 / 0.36);
}

body[data-apple-page="player"] .player-summary-copy p {
  color: #a1a1a6;
  font-size: 0.92rem;
}

body[data-apple-page="player"] .player-summary-copy h1 {
  max-width: 16ch;
  margin-top: 10px;
  color: #f5f5f7;
  font-size: 3.25rem;
  line-height: 1.02;
  letter-spacing: -0.04em;
}

body[data-apple-page="player"] .player-summary-meta span {
  min-height: 36px;
  padding: 0 14px;
  border: 0;
  border-radius: 999px;
  color: #f5f5f7;
  background: rgb(255 255 255 / 0.1);
}

body[data-apple-page="player"] #player-summary-balance {
  color: #0a0a0b;
  background: #f5f5f7;
}

body[data-apple-page="player"] .player-workspace {
  grid-template-columns: 220px minmax(0, 1fr);
  gap: 24px;
  padding-top: 24px;
}

body[data-apple-page="player"] .player-tabs {
  position: sticky;
  top: calc(var(--nav-height) + 20px);
  padding: 10px;
  gap: 4px;
  border: 1px solid rgb(255 255 255 / 0.08);
  border-radius: 22px;
  background: #151518;
  box-shadow: 0 20px 48px rgb(0 0 0 / 0.24);
}

body[data-apple-page="player"] .player-tab {
  min-height: 48px;
  padding: 0 16px;
  border: 0;
  border-radius: 14px;
  color: #a1a1a6;
  font-size: 0.92rem;
  transition: color 180ms ease, background-color 180ms ease, transform 180ms ease;
}

body[data-apple-page="player"] .player-tab:hover {
  color: #f5f5f7;
  background: rgb(255 255 255 / 0.07);
}

body[data-apple-page="player"] .player-tab[aria-selected="true"] {
  color: #1d1d1f;
  background: #f5f5f7;
  box-shadow: 0 8px 24px rgb(0 0 0 / 0.2);
}

body[data-apple-page="player"] .player-tab:active {
  transform: scale(0.98);
}

body[data-apple-page="player"] .player-content .player-panel {
  --portal-bg: #f5f5f7;
  --portal-ink: var(--player-stage-ink);
  --portal-muted: var(--player-stage-muted);
  --portal-line: rgb(29 29 31 / 0.1);
  --portal-surface: #fff;
  --portal-surface-strong: #fff;
  --portal-accent: #0071e3;
  --portal-accent-soft: #0071e3;
  min-height: 0;
  padding: 44px;
  color: var(--player-stage-ink);
  border-radius: 28px;
  background: var(--player-stage-base);
  box-shadow: 0 28px 80px rgb(0 0 0 / 0.24);
}

body[data-apple-page="player"] .player-panel[data-player-panel="activities"] {
  background: var(--player-stage-activities);
}

body[data-apple-page="player"] .player-panel[data-player-panel="notifications"] {
  background: var(--player-stage-notifications);
}

body[data-apple-page="player"] .player-panel[data-player-panel="friends"] {
  background: var(--player-stage-friends);
}

body[data-apple-page="player"] .player-panel[data-player-panel="shop"] {
  background: var(--player-stage-shop);
}

body[data-apple-page="player"] .player-panel-heading {
  max-width: 50ch;
  padding: 0;
  border: 0;
}

body[data-apple-page="player"] .player-panel-heading h2 {
  max-width: 17ch;
  color: var(--player-stage-ink);
  font-size: 2.45rem;
  line-height: 1.08;
  letter-spacing: -0.035em;
}

body[data-apple-page="player"] .player-placeholder,
body[data-apple-page="player"] .player-guest-state {
  margin-top: 22px;
  padding: 0;
  border: 0;
}

body[data-apple-page="player"] .player-guest-state,
body[data-apple-page="player"] .player-empty-state {
  min-height: 0;
  padding: 24px;
  display: grid;
  align-content: center;
  justify-items: start;
  border-radius: 22px;
  background: rgb(255 255 255 / 0.76);
  box-shadow: 0 14px 36px rgb(29 29 31 / 0.08);
}

body[data-apple-page="player"] .player-empty-state::before {
  width: 52px;
  height: 52px;
  margin-bottom: 24px;
  display: block;
  border-radius: 50%;
  background: linear-gradient(145deg, #0071e3, #64d2ff);
  box-shadow: 0 14px 32px rgb(0 113 227 / 0.24);
  content: "";
}

body[data-apple-page="player"] #activity-list .player-empty-state::before,
body[data-apple-page="player"] #shop-product-list .player-empty-state::before {
  background: linear-gradient(145deg, #6e5ae6, #bf5af2);
  box-shadow: 0 14px 32px rgb(110 90 230 / 0.24);
}

body[data-apple-page="player"] #notification-list .player-empty-state::before {
  background: linear-gradient(145deg, #ff375f, #ff9fcb);
  box-shadow: 0 14px 32px rgb(255 55 95 / 0.22);
}

body[data-apple-page="player"] .player-empty-state__title {
  margin: 0;
}

body[data-apple-page="player"] .player-empty-state__title {
  color: var(--player-stage-ink);
  font-size: 1.5rem;
  line-height: 1.2;
  letter-spacing: -0.02em;
}

body[data-apple-page="player"] .player-guest-state p {
  max-width: 48ch;
  margin-top: 10px;
  color: var(--player-stage-muted);
  line-height: 1.55;
}

body[data-apple-page="player"] .player-panel [data-apple-card],
body[data-apple-page="player"] .activity-card,
body[data-apple-page="player"] .activity-detail,
body[data-apple-page="player"] .notification-item,
body[data-apple-page="player"] .friend-row,
body[data-apple-page="player"] .shop-product-row,
body[data-apple-page="player"] .inventory-row {
  border: 0;
  border-radius: 20px;
  background: #fff;
  box-shadow: 0 12px 32px rgb(29 29 31 / 0.08);
}

body[data-apple-page="player"] .activity-cards,
body[data-apple-page="player"] .notification-inbox,
body[data-apple-page="player"] .shop-product-list,
body[data-apple-page="player"] .inventory-list {
  gap: 14px;
  border: 0;
}

body[data-apple-page="player"] .activity-card,
body[data-apple-page="player"] .notification-item,
body[data-apple-page="player"] .shop-product-row,
body[data-apple-page="player"] .inventory-row {
  padding: 20px;
}

body[data-apple-page="player"] .activity-card--selected,
body[data-apple-page="player"] .notification-item--open {
  box-shadow: 0 0 0 2px #0071e3, 0 18px 42px rgb(29 29 31 / 0.12);
}

body[data-apple-page="player"] .activity-cover {
  overflow: hidden;
  border: 0;
  border-radius: 14px;
  background: #f5f5f7;
}

body[data-apple-page="player"] .player-panel .player-primary-action,
body[data-apple-page="player"] .player-panel .player-secondary-action,
body[data-apple-page="player"] .player-panel .player-secondary-link,
body[data-apple-page="player"] .player-panel .friend-action {
  border-radius: 999px;
}

body[data-apple-page="player"] .player-panel .player-secondary-action,
body[data-apple-page="player"] .player-panel .player-secondary-link,
body[data-apple-page="player"] .player-panel .friend-action {
  border-color: transparent;
  color: #1d1d1f;
  background: #e8e8ed;
}

@media (max-width: 899px) {
  body[data-apple-page="player"] .player-workspace {
    grid-template-columns: 190px minmax(0, 1fr);
  }

  body[data-apple-page="player"] .player-panel {
    padding: 36px;
  }
}

@media (max-width: 759px) {
  body[data-apple-page="player"] .player-shell {
    width: min(100% - 24px, 720px);
    padding-top: calc(var(--nav-height) + 28px);
  }

  body[data-apple-page="player"] .player-summary {
    min-height: 170px;
    padding: 28px;
  }

  body[data-apple-page="player"] .player-summary-copy h1 {
    font-size: 2.25rem;
  }

  body[data-apple-page="player"] .player-workspace {
    display: block;
  }

  body[data-apple-page="player"] .player-tabs {
    position: static;
    margin: 0 0 14px;
    padding: 8px;
    display: flex;
    overflow-x: auto;
    border-radius: 18px;
  }

  body[data-apple-page="player"] .player-tab {
    min-height: 44px;
  }

  body[data-apple-page="player"] .player-panel {
    min-height: 0;
    padding: 28px 22px;
    border-radius: 24px;
  }

  body[data-apple-page="player"] .player-panel-heading h2 {
    font-size: 2rem;
  }

  body[data-apple-page="player"] .player-guest-state,
  body[data-apple-page="player"] .player-empty-state {
    padding: 24px;
  }
}

@media (prefers-reduced-motion: reduce) {
  body[data-apple-page="player"] .player-tab {
    transform: none;
  }
}
