.mobile-player-body.mp-host-connected #mp-page-note {
  display: none;
}

.mp-character-picker-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.65rem;
  margin-bottom: 0.35rem;
}

.mp-character-picker-head .mp-section-title {
  margin: 0;
  flex: 1 1 auto;
  min-width: 0;
}

.mp-mock-btn--create {
  flex: 0 0 auto;
  white-space: nowrap;
  min-height: 2.35rem;
  padding: 0.45rem 0.75rem;
  font-size: 0.78rem;
  font-weight: 700;
  touch-action: manipulation;
  -webkit-tap-highlight-color: rgba(255, 255, 255, 0.08);
}

.mp-empty-state .mp-mock-btn--create {
  margin-top: 0.75rem;
}

.mp-create-character-body {
  display: grid;
  gap: 0.75rem;
  padding: 0.15rem 0 0.85rem;
}

.mp-create-field {
  display: grid;
  gap: 0.35rem;
}

.mp-create-field-label {
  font-size: 0.76rem;
  font-weight: 700;
  color: rgba(148, 163, 184, 0.92);
}

.mp-create-field-input {
  width: 100%;
  min-height: 2.65rem;
}

.mp-lu-asi-select-wrap {
  display: grid;
  gap: 0.2rem;
  flex: 0 0 auto;
  min-width: 5.5rem;
}

.mp-lu-asi-select-label {
  font-size: 0.62rem;
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: rgba(148, 163, 184, 0.88);
}

.mp-lu-asi-select {
  min-height: 2.65rem;
  padding: 0.45rem 0.55rem;
  font-size: 0.88rem;
  font-weight: 700;
  touch-action: manipulation;
}

.mp-lu-asi-grid .ps-lu-asi-controls {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
}

.mp-lu-asi-grid .ps-lu-asi-btn {
  appearance: none;
  width: 34px;
  height: 34px;
  min-width: 34px;
  min-height: 34px;
  padding: 0;
  border: 1px solid rgba(148, 163, 184, 0.2);
  border-radius: 999px;
  background: linear-gradient(180deg, rgba(51, 65, 85, 0.95), rgba(15, 23, 42, 0.98));
  color: rgba(248, 250, 252, 0.96);
  font: inherit;
  font-size: 1rem;
  font-weight: 900;
  line-height: 1;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.35);
}

.mp-lu-asi-grid .ps-lu-asi-btn:disabled {
  opacity: 0.45;
}

.mp-header-hold-target {
  touch-action: manipulation;
}

.mp-header-hold-target.mp-header-hold--arming {
  outline: 2px solid rgba(251, 191, 36, 0.45);
  outline-offset: 2px;
}

.mp-header-hold-target.mp-header-hold--armed {
  outline: 2px solid rgba(251, 191, 36, 0.85);
  outline-offset: 2px;
}

.mp-sheet-name-input[readonly] {
  cursor: default;
  pointer-events: none;
}

.ps-avatar-preview-pane {
  display: flex;
  flex-direction: column;
  align-items: stretch;
  gap: 0.55rem;
}

.ps-avatar-preview-pane .ps-avatar-apply-btn {
  width: 100%;
}

.ps-avatar-preview-pane .ps-avatar-upload-btn {
  width: 100%;
}

.mp-sheet-overlay-root .mp-level-up-panel {
  position: relative;
  left: auto;
  top: auto;
  transform: none;
  z-index: 2;
}

.pb-mobile-turn-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.75rem;
  margin: 0 0 0.75rem;
  padding: 0.65rem 0.85rem;
  border-radius: 14px;
  border: 1px solid rgba(148, 163, 184, 0.18);
  background: linear-gradient(180deg, rgba(30, 41, 59, 0.92), rgba(15, 23, 42, 0.96));
  font-size: 0.82rem;
  color: rgba(203, 213, 225, 0.88);
}

.pb-mobile-turn-bar strong {
  color: rgba(248, 250, 252, 0.96);
  font-weight: 800;
}

.pb-mobile-turn-bar-round,
.pb-mobile-turn-bar-active {
  min-width: 0;
}

.pb-mobile-turn-bar-active {
  text-align: right;
}

.mobile-player-body .player-round-bar--compact {
  display: none;
}

.mobile-player-body .mp-character-builder-panel {
  width: min(100%, 520px);
  max-height: min(92vh, 780px);
  padding: 0;
  overflow: hidden;
  display: flex;
  flex-direction: column;
}

.mobile-player-body .mp-character-builder-root {
  flex: 1 1 auto;
  min-height: 0;
  overflow: auto;
  -webkit-overflow-scrolling: touch;
}

.mobile-player-body .mp-character-builder-root .ps-builder {
  min-height: 100%;
  display: flex;
  flex-direction: column;
  gap: 0.65rem;
  padding: 0.65rem 0.75rem 0.85rem;
}

.mobile-player-body .mp-character-builder-root .ps-builder-progress {
  display: flex;
  gap: 0.35rem;
  overflow-x: auto;
  padding-bottom: 0.15rem;
  -webkit-overflow-scrolling: touch;
  flex-wrap: nowrap;
}

.mobile-player-body .mp-character-builder-root .ps-builder-progress-item {
  flex: 0 0 auto;
  font-size: 0.62rem;
}

.mobile-player-body .mp-character-builder-root .ps-builder-header {
  padding: 0 0.15rem;
}

.mobile-player-body .mp-character-builder-root .ps-builder-title {
  font-size: 1.05rem;
}

.mobile-player-body .mp-character-builder-root .ps-builder-hint {
  font-size: 0.76rem;
  line-height: 1.4;
}

.mobile-player-body .mp-character-builder-root .ps-builder-step-body,
.mobile-player-body .mp-character-builder-root .ps-builder-form {
  display: grid;
  gap: 0.65rem;
}

.mobile-player-body .mp-character-builder-root .ps-builder-step-body {
  grid-template-columns: 1fr;
}

.mobile-player-body .mp-character-builder-root .ps-builder-form select,
.mobile-player-body .mp-character-builder-root .ps-builder-form input[type="text"],
.mobile-player-body .mp-character-builder-root .ps-builder-form input[type="number"] {
  min-height: 2.65rem;
  font-size: 0.88rem;
}

.mobile-player-body .mp-character-builder-root .ps-compendium-row.ps-compendium-row--lang {
  display: flex;
  flex-direction: column;
  width: 100%;
  grid-template-columns: none;
}

.mobile-player-body .mp-character-builder-root .ps-background-flavor-list {
  display: flex;
  flex-direction: column;
  gap: 0.65rem;
  width: 100%;
}

.mobile-player-body .mp-character-builder-root .ps-background-flavor-list .ps-field-group,
.mobile-player-body .mp-character-builder-root .ps-field-group.ps-field-wide {
  width: 100%;
  min-width: 0;
}

.mobile-player-body .mp-character-builder-root .ps-background-flavor-list .ps-field-group select,
.mobile-player-body .mp-character-builder-root .ps-field-group.ps-field-wide select,
.mobile-player-body .mp-character-builder-root .ps-compendium-row--lang .ps-select,
.mobile-player-body .mp-character-builder-root .ps-builder-standard-array-select {
  width: 100%;
  min-width: 0;
  min-height: 3rem;
  padding: 0.65rem 2.85rem 0.65rem 0.85rem;
  font-size: 0.9rem;
  line-height: 1.35;
  background-position: right 0.85rem center;
}

.mobile-player-body .mp-character-builder-root .ps-background-flavor-list .ps-field-group label {
  font-size: 0.82rem;
  line-height: 1.35;
}

.mobile-player-body .mp-character-builder-root .ps-builder-ability-toolbar .btn-secondary {
  min-height: 2.65rem;
  padding: 0.5rem 0.85rem;
  font-size: 0.84rem;
}

.mobile-player-body .mp-character-builder-root .ps-builder-ability-methods label {
  min-height: 2.65rem;
  padding: 0.45rem 0.75rem;
  font-size: 0.84rem;
}

.mobile-player-body .mp-character-builder-root .ps-builder-ability-stepper {
  display: grid;
  grid-template-columns: 32px minmax(3.25rem, 1fr) 32px;
  gap: 0.45rem;
  align-items: center;
  width: 100%;
  max-width: 12.5rem;
  min-width: 9.5rem;
  margin: 0 auto;
  padding: 4px 8px;
}

.mobile-player-body .mp-character-builder-root .ps-builder-ability-stepper .ps-stat-step-btn {
  appearance: none;
  width: 32px;
  height: 32px;
  min-width: 32px;
  min-height: 32px;
  padding: 0;
  border: 1px solid rgba(148, 163, 184, 0.2);
  border-radius: 999px;
  background: linear-gradient(180deg, rgba(51, 65, 85, 0.95), rgba(15, 23, 42, 0.98));
  color: rgba(248, 250, 252, 0.96);
  font: inherit;
  font-size: 1rem;
  font-weight: 900;
  line-height: 1;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.35);
}

.mobile-player-body .mp-character-builder-root .ps-builder-ability-stepper .ps-builder-ability-input {
  width: 100%;
  min-width: 3.25rem;
  max-width: none;
  min-height: 2.5rem;
  padding: 0.35rem 0.35rem;
  font-size: 1rem;
  font-weight: 800;
  text-align: center;
  box-sizing: border-box;
}

.mobile-player-body .mp-character-builder-root .ps-builder-ability-table th:nth-child(2),
.mobile-player-body .mp-character-builder-root .ps-builder-ability-table td:nth-child(2) {
  text-align: center;
  min-width: 9.5rem;
}

.mobile-player-body .mp-character-builder-root .ps-builder-ability-table {
  display: block;
  width: 100%;
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
}

.mobile-player-body .mp-character-builder-root .ps-language-chip {
  padding: 0.45rem 0.65rem;
  font-size: 0.88rem;
}

.mobile-player-body .mp-character-builder-root .ps-language-remove {
  min-width: 28px;
  min-height: 28px;
}

.mobile-player-body .mp-character-builder-root .ps-builder-preview {
  margin-top: 0.35rem;
}

.mobile-player-body .mp-character-builder-root .ps-builder-footer {
  position: sticky;
  bottom: 0;
  z-index: 3;
  margin-top: auto;
  padding: 0.65rem 0 0.15rem;
  background: linear-gradient(180deg, rgba(15, 23, 42, 0), rgba(15, 23, 42, 0.92) 24%, rgba(15, 23, 42, 0.98));
  border-top: 1px solid rgba(148, 163, 184, 0.12);
  flex-wrap: wrap;
  gap: 0.45rem;
}

.mobile-player-body .mp-character-builder-root .ps-builder-footer-right {
  display: flex;
  flex-wrap: wrap;
  gap: 0.45rem;
  justify-content: flex-end;
}

.mobile-player-body .mp-character-builder-root .ps-builder-footer .btn-primary,
.mobile-player-body .mp-character-builder-root .ps-builder-footer .btn-secondary {
  min-height: 2.65rem;
  padding: 0.55rem 0.85rem;
  font-size: 0.84rem;
}

.mobile-player-body .ps-human-variant-dialog {
  pointer-events: none;
}

.mobile-player-body .ps-human-variant-dialog .ps-human-variant-popover {
  pointer-events: auto;
  width: min(calc(100vw - 1.5rem), 480px);
  max-height: min(88vh, 680px);
}

.mobile-player-body .ps-builder-toast {
  position: fixed;
  left: 50%;
  bottom: calc(5.5rem + env(safe-area-inset-bottom, 0px));
  transform: translateX(-50%);
  z-index: 13000;
  max-width: min(calc(100vw - 1.5rem), 420px);
  padding: 0.65rem 0.85rem;
  border-radius: 12px;
  border: 1px solid rgba(248, 113, 113, 0.35);
  background: rgba(69, 10, 10, 0.94);
  color: rgba(254, 226, 226, 0.96);
  font-size: 0.82rem;
  line-height: 1.35;
  text-align: center;
  box-shadow: 0 12px 32px rgba(0, 0, 0, 0.35);
}

.mobile-player-body {
  margin: 0;
  height: 100vh;
  height: 100dvh;
  max-height: 100vh;
  max-height: 100dvh;
  overflow: hidden;
  display: flex;
  flex-direction: column;
  background:
    radial-gradient(ellipse at 50% 0%, rgba(99, 102, 241, 0.12), transparent 55%),
    #050508;
  color: var(--text-primary);
  font-family: 'Inter', var(--font-body);
}

.mp-boot-screen,
.mp-login-screen {
  flex: 1 1 auto;
  min-height: 0;
  width: 100%;
  overflow: auto;
  -webkit-overflow-scrolling: touch;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 1.25rem 1rem calc(1.25rem + env(safe-area-inset-bottom, 0px));
  box-sizing: border-box;
}

.mp-boot-screen {
  flex-direction: column;
  gap: 1rem;
}

.mp-boot-copy {
  margin: 0;
  color: var(--text-secondary);
  font-size: 0.92rem;
}

.mp-login-screen {
  background:
    radial-gradient(ellipse at 50% 0%, rgba(99, 102, 241, 0.12), transparent 55%),
    #050508;
}

.mp-login-card {
  position: relative;
  width: min(440px, 100%);
  padding: 1.5rem 1.25rem 1.35rem;
  border: 1px solid rgba(148, 163, 184, 0.14);
  border-radius: var(--radius-lg);
  background: linear-gradient(180deg, rgba(24, 26, 38, 0.98), rgba(10, 12, 20, 0.98));
  box-shadow: 0 24px 64px rgba(0, 0, 0, 0.55);
}

.mp-login-logo {
  display: block;
  width: min(240px, 88%);
  height: auto;
  margin: 0 auto 0.85rem;
}

.mp-login-title {
  margin: 0;
  text-align: center;
  font-family: var(--font-display);
  font-size: 1.28rem;
  letter-spacing: 0.04em;
}

.mp-login-subtitle {
  margin: 0.45rem 0 1.1rem;
  text-align: center;
  color: var(--text-secondary);
  font-size: 0.88rem;
  line-height: 1.45;
}

.mp-campaign-line,
.mp-session-line {
  margin: 0 0 1rem;
  text-align: center;
  color: var(--text-secondary);
  font-size: 0.9rem;
  line-height: 1.45;
}

.mp-campaign-line strong,
.mp-session-line strong {
  color: var(--text-primary);
}

.mp-login-pick-profile .mp-login-title {
  margin-bottom: 0.35rem;
}

.mp-login-signed-in .mp-login-title {
  display: none;
}

.mp-login-pick-profile .mp-login-connect,
.mp-login-pick-profile #mp-status-copy,
.mp-login-pick-profile #mp-connection-chip,
.mp-login-signed-in .mp-login-connect,
.mp-login-signed-in #mp-status-copy,
.mp-login-signed-in #mp-connection-chip,
.mp-login-signed-in #mp-profiles-panel,
.mp-login-signed-in .mp-login-title {
  display: none !important;
}

.mp-login-signed-in .mp-login-card {
  width: min(560px, 100%);
}

.mp-login-signed-in .mp-login-session {
  margin-top: 0;
  padding-top: 0;
  border-top: 0;
}

.mp-login-signed-in .mp-session-line {
  margin-top: 0;
}

.mp-login-signed-in .mp-session-actions {
  margin-top: 1rem;
  justify-content: center;
}

.mp-login-signed-in .mp-session-actions .btn-secondary {
  min-width: 8.5rem;
}

.mp-active-char-gate {
  margin-top: 0.85rem;
}

.mp-active-char-title {
  margin: 0 0 0.35rem;
  font-family: var(--font-display, Cinzel, Georgia, serif);
  font-size: 1.15rem;
  font-weight: 600;
}

.mp-active-char-subtitle {
  margin: 0 0 0.9rem;
  color: var(--text-secondary);
  font-size: 0.88rem;
  line-height: 1.45;
}

.mp-active-char-list {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
}

.mp-active-char-btn {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 0.15rem;
  width: 100%;
  padding: 0.85rem 0.95rem;
  border: 1px solid rgba(148, 163, 184, 0.18);
  border-radius: var(--radius-sm);
  background: rgba(8, 10, 18, 0.72);
  color: var(--text-primary);
  text-align: left;
  cursor: pointer;
  font: inherit;
  transition: border-color var(--transition-fast), background var(--transition-fast);
}

.mp-active-char-btn:hover,
.mp-active-char-btn:focus-visible {
  border-color: rgba(var(--accent-primary-rgb), 0.45);
  background: rgba(16, 18, 28, 0.88);
  outline: none;
}

.mp-active-char-btn strong {
  font-size: 0.98rem;
}

.mp-active-char-btn small {
  color: var(--text-secondary);
  font-size: 0.8rem;
}

.mp-active-char-empty {
  margin: 0;
  color: var(--text-secondary);
  font-size: 0.9rem;
  line-height: 1.45;
}

.mp-active-char-actions {
  margin-top: 0.85rem;
  display: flex;
  gap: 0.55rem;
  flex-wrap: wrap;
}

.mp-active-char-actions.hidden {
  display: none !important;
}

.mp-active-char-swap-row {
  display: flex;
  justify-content: flex-end;
  margin-bottom: 0.75rem;
}

.mp-login-offline:not(.mp-login-signed-in) .mp-campaign-line,
.mp-login-offline:not(.mp-login-signed-in) #mp-profiles-panel,
.mp-login-offline:not(.mp-login-signed-in) #mp-session-panel {
  display: none !important;
}

.mp-login-players {
  margin-top: 0.15rem;
}

.mp-login-profile-list {
  display: flex;
  flex-direction: column;
  gap: 0.45rem;
  margin-bottom: 0.85rem;
  max-height: min(34vh, 220px);
  overflow: auto;
}

.mp-login-profile-btn {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.65rem;
  width: 100%;
  padding: 0.65rem 0.75rem;
  border: 1px solid rgba(148, 163, 184, 0.16);
  border-radius: var(--radius-sm);
  background: rgba(8, 10, 18, 0.72);
  color: var(--text-primary);
  cursor: pointer;
  font: inherit;
  text-align: center;
  transition: border-color var(--transition-fast), background var(--transition-fast);
}

.mp-login-profile-btn:hover,
.mp-login-profile-btn:focus-visible {
  border-color: rgba(var(--accent-primary-rgb), 0.45);
  background: rgba(16, 18, 28, 0.88);
}

.mp-login-profile-dot {
  width: 10px;
  height: 10px;
  border-radius: 50%;
  flex-shrink: 0;
}

.mp-login-profile-empty {
  margin: 0 0 0.85rem;
  padding: 0.75rem;
  border: 1px dashed rgba(148, 163, 184, 0.2);
  border-radius: var(--radius-sm);
  color: var(--text-secondary);
  font-size: 0.85rem;
  text-align: center;
}

.mp-login-create-form {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
}

.mp-login-name-input {
  flex: 1 1 160px;
  min-width: 0;
}

.mp-login-pin-input {
  flex: 0 0 108px;
  min-width: 0;
  text-align: center;
  letter-spacing: 0.18em;
  font-variant-numeric: tabular-nums;
  caret-color: var(--text-primary);
  -webkit-text-security: disc;
  text-security: disc;
}

.mp-login-create-form .btn-primary {
  flex: 1 1 100%;
}

.mp-login-error {
  margin: 0.65rem 0 0;
  color: #f87171;
  font-size: 0.85rem;
}

.mp-home-section-head {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  margin: 0.35rem 0 0.75rem;
}

.mp-home-section-label {
  margin: 0;
  color: var(--text-secondary);
  font-size: 0.76rem;
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  white-space: nowrap;
}

.mp-home-section-rule {
  flex: 1;
  height: 1px;
  background: linear-gradient(90deg, rgba(148, 163, 184, 0.28), transparent);
}

.mp-tool-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 0.65rem;
}

.mp-tool-card {
  --card-rgb: var(--accent-primary-rgb);
  position: relative;
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
  min-height: 148px;
  border: 1px solid rgba(148, 163, 184, 0.12);
  border-radius: var(--radius-lg);
  background: rgba(10, 12, 20, 0.92);
  box-shadow:
    0 8px 28px rgba(0, 0, 0, 0.32),
    inset 0 1px 0 rgba(255, 255, 255, 0.04);
  color: inherit;
  text-decoration: none;
  overflow: hidden;
  isolation: isolate;
}

.mp-tool-card::after {
  content: '';
  position: absolute;
  inset: 0;
  background:
    radial-gradient(ellipse 85% 70% at 50% 35%, rgba(var(--card-rgb), 0.28), transparent 62%),
    linear-gradient(180deg, rgba(var(--card-rgb), 0.08) 0%, transparent 45%);
  opacity: 0.85;
  pointer-events: none;
  z-index: 1;
}

.mp-tool-card-bg {
  position: absolute;
  inset: 0;
  background-image: var(--card-art);
  background-repeat: no-repeat;
  background-size: cover;
  background-position: center;
  opacity: 0.5;
  pointer-events: none;
  z-index: 0;
}

.mp-tool-card-content {
  position: relative;
  z-index: 2;
  display: flex;
  flex-direction: column;
  gap: 0.35rem;
  padding: 0.95rem 1rem 1rem;
  background: linear-gradient(180deg, transparent 0%, rgba(8, 10, 18, 0.55) 30%, rgba(8, 10, 18, 0.94) 100%);
}

.mp-tool-card-name {
  margin: 0;
  font-family: var(--font-display);
  font-size: 0.98rem;
  line-height: 1.15;
  letter-spacing: 0.02em;
}

.mp-tool-card-tagline {
  margin: 0;
  color: rgba(226, 232, 240, 0.78);
  font-size: 0.74rem;
  line-height: 1.35;
}

.mp-tool-card--live {
  border-color: rgba(239, 68, 68, 0.55);
  box-shadow: 0 0 0 1px rgba(239, 68, 68, 0.22), 0 12px 32px rgba(127, 29, 29, 0.28);
  animation: mp-combat-card-pulse 2s ease-in-out infinite;
}

.mp-tool-card--live .mp-tool-card-name::after {
  content: ' • LIVE';
  color: #fca5a5;
  font-size: 0.72rem;
}

@keyframes mp-combat-card-pulse {
  0%, 100% { box-shadow: 0 0 0 1px rgba(239, 68, 68, 0.22), 0 12px 32px rgba(127, 29, 29, 0.28); }
  50% { box-shadow: 0 0 0 3px rgba(239, 68, 68, 0.18), 0 16px 36px rgba(127, 29, 29, 0.36); }
}

.mp-tool-frame-page {
  min-height: 100dvh;
  padding-bottom: calc(4.2rem + env(safe-area-inset-bottom, 0px));
}

.mp-tool-frame-page .mp-page-note {
  margin-bottom: 0.45rem;
  font-size: 0.82rem;
}

.mp-page-shell--frame {
  display: flex;
  flex-direction: column;
  min-height: calc(100dvh - 4.2rem - env(safe-area-inset-bottom, 0px));
  padding-bottom: 0.35rem;
}

.mp-tool-frame {
  flex: 1 1 auto;
  width: 100%;
  min-height: 0;
  height: calc(100dvh - 9.5rem - env(safe-area-inset-bottom, 0px));
  border: 1px solid var(--border-secondary);
  border-radius: 16px;
  background: #121218;
}

.mp-login-section-label {
  margin: 0 0 0.55rem;
  color: var(--text-secondary);
  font-size: 0.76rem;
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.mp-login-connect {
  margin-bottom: 1rem;
}

.mp-login-host-row {
  margin-bottom: 0.45rem;
}

.mp-login-players,
.mp-login-session {
  margin-top: 1rem;
  padding-top: 1rem;
  border-top: 1px solid rgba(148, 163, 184, 0.12);
}

.mp-login-status-chip {
  position: absolute;
  top: 0.85rem;
  right: 0.85rem;
  min-width: 0;
  padding: 0.35rem 0.65rem;
  border: 1px solid var(--border-secondary);
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.05);
  color: var(--text-secondary);
  font-size: 0.72rem;
  font-weight: 700;
  text-align: center;
}

.mp-login-status-chip.live {
  border-color: rgba(34, 197, 94, 0.4);
  background: rgba(34, 197, 94, 0.12);
  color: #bbf7d0;
}

.mp-login-status-chip.error {
  border-color: rgba(248, 113, 113, 0.35);
  background: rgba(239, 68, 68, 0.1);
  color: #fecaca;
}

.mp-login-card .mp-profile-list {
  max-height: min(52vh, 420px);
  overflow: auto;
  margin-bottom: 0;
  display: flex;
  flex-direction: column;
  gap: 0.55rem;
}

.mp-login-card .mp-app-grid {
  margin-top: 0.85rem;
}

.mobile-player-body a {
  color: inherit;
}

.mp-shell,
.mp-page-shell {
  width: min(100%, 860px);
  margin: 0 auto;
  padding: 1rem 1rem 0;
  box-sizing: border-box;
  flex: 1 1 auto;
  min-height: 0;
  display: flex;
  flex-direction: column;
  overflow: hidden;
}

.mp-topbar,
.mp-shellbar {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 0.9rem;
  margin-bottom: 1rem;
  flex-shrink: 0;
}

.mp-shellbar--centered {
  flex-direction: column;
  align-items: center;
  text-align: center;
  gap: 0;
  margin-bottom: 0.85rem;
}

.mobile-player-body.mp-character-detail-mode {
  --mp-shellbar-sticky-height: 3.35rem;
  padding-bottom: calc(4.35rem + env(safe-area-inset-bottom, 0px));
}

.mp-character-summary {
  padding-bottom: 0.35rem;
}

.mobile-player-body.mp-character-detail-mode .mp-shellbar--centered {
  position: sticky;
  top: 0;
  z-index: 45;
  margin-bottom: 0.35rem;
  padding-bottom: 0.45rem;
  background: rgba(10, 15, 28, 0.96);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
}

.mp-sheet-shell > .mp-page-nav {
  position: sticky;
  top: 0;
  z-index: 40;
}

/* Shellbar sits above .mp-page-main (the scrollport) — do not offset sticky menus by shellbar height. */
.mobile-player-body.mp-character-detail-mode .mp-sheet-shell > .mp-page-nav {
  top: 0;
}

.mp-shellbar--centered > div:first-child {
  display: none;
}

.mp-shellbar--centered > div:last-child {
  display: flex;
  flex-direction: column;
  align-items: center;
  width: 100%;
  gap: 0.65rem;
}

.mp-shellbar--centered .mp-shellbar-actions {
  justify-content: center;
  width: 100%;
}

.mp-kicker,
.mp-shell-kicker {
  margin: 0 0 0.2rem;
  color: var(--text-tertiary);
  font-size: 0.74rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.mp-topbar h1,
.mp-shellbar h1 {
  margin: 0;
  font-family: var(--font-display);
  font-size: clamp(1.7rem, 5vw, 2.25rem);
  line-height: 1.05;
}

.mp-shellbar h1 {
  font-size: clamp(1.45rem, 4.8vw, 1.95rem);
}

.mp-topbar p,
.mp-shellbar p {
  margin: 0.35rem 0 0;
  color: var(--text-secondary);
  line-height: 1.45;
}

.mp-status-chip {
  flex: 0 0 auto;
  min-width: 5.5rem;
  padding: 0.55rem 0.8rem;
  border: 1px solid var(--border-secondary);
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.05);
  color: var(--text-secondary);
  font-size: 0.82rem;
  font-weight: 700;
  text-align: center;
}

.mp-status-chip.live {
  border-color: rgba(34, 197, 94, 0.4);
  background: rgba(34, 197, 94, 0.12);
  color: #bbf7d0;
}

.mp-status-chip.error {
  border-color: rgba(248, 113, 113, 0.4);
  background: rgba(239, 68, 68, 0.12);
  color: #fecaca;
}

.mp-main,
.mp-page-main {
  display: flex;
  flex-direction: column;
  gap: 0.9rem;
  flex: 1 1 auto;
  min-height: 0;
  overflow: auto;
  -webkit-overflow-scrolling: touch;
  padding-bottom: calc(5.75rem + env(safe-area-inset-bottom, 0px));
}

.mobile-player-body.mp-character-detail-mode .mp-page-shell {
  padding-top: 0.7rem;
}

.mobile-player-body.mp-character-detail-mode .mp-shellbar {
  display: flex;
  justify-content: center;
  margin-bottom: 0.35rem;
}

.mobile-player-body.mp-character-detail-mode #mp-character-picker-card {
  display: none !important;
}

.mobile-player-body.mp-character-detail-mode .mp-shellbar > div:first-child {
  display: none;
}

.mobile-player-body.mp-character-detail-mode .mp-shellbar #mp-shell-chip {
  display: none;
}

.mobile-player-body.mp-character-detail-mode .mp-shellbar > div:last-child {
  gap: 0;
}

.mobile-player-body.mp-character-detail-mode .mp-page-main {
  gap: 0;
  overflow: auto;
  -webkit-overflow-scrolling: touch;
}

.mp-character-picker--select {
  display: grid;
  grid-template-columns: 1fr;
  gap: 0.85rem;
  overflow: visible;
  padding-bottom: 0;
}

.mp-character-picker.ps-grid {
  grid-template-columns: 1fr;
  gap: 0.85rem;
}

@media (min-width: 560px) {
  .mp-character-picker.ps-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

.mp-character-picker .ps-roster-card-wrap {
  min-width: 0;
}

.mp-character-picker .ps-roster-classline em {
  font-style: normal;
  color: #fbbf24;
}

.mp-character-picker-head .mp-section-title {
  font-family: var(--font-display);
  letter-spacing: 0.03em;
}

.mp-character-select-card {
  appearance: none;
  width: 100%;
  border: 1px solid rgba(var(--accent-primary-rgb), 0.28);
  border-radius: 16px;
  background: linear-gradient(160deg, rgba(15, 23, 42, 0.92), rgba(2, 6, 23, 0.88));
  padding: 1rem;
  text-align: left;
  color: inherit;
  font: inherit;
  cursor: pointer;
  touch-action: manipulation;
  -webkit-tap-highlight-color: rgba(255, 255, 255, 0.08);
}

.mp-character-select-card strong {
  display: block;
  font-size: 1.05rem;
}

.mp-character-select-card span {
  display: block;
  margin-top: 0.2rem;
  color: var(--text-secondary);
  font-size: 0.86rem;
}

.mp-character-select-card small {
  display: block;
  margin-top: 0.35rem;
  color: rgba(148, 163, 184, 0.88);
  font-size: 0.78rem;
}

.mp-page-nav-actions {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.5rem;
  width: 100%;
  margin-bottom: 0.45rem;
}

.mp-change-character-btn {
  flex: 0 0 auto;
  min-height: 2rem;
  max-width: 6.5rem;
  padding-inline: 0.55rem;
  font-size: 0.68rem;
  white-space: nowrap;
}

.mp-page-nav-actions .mp-nav-toggle {
  flex: 1 1 auto;
  width: auto;
  min-width: 0;
  max-width: none;
  min-height: 2.2rem;
  margin-bottom: 0;
  padding: 0.42rem 0.65rem;
  font-size: 0.72rem;
  white-space: nowrap;
}

.mp-panel,
.mp-card {
  border: 1px solid var(--border-secondary);
  border-radius: 18px;
  background: rgba(15, 23, 42, 0.84);
  padding: 1rem;
  backdrop-filter: blur(10px);
}

.mp-panel-title {
  margin: 0 0 0.25rem;
  font-size: 1rem;
}

.mp-panel-copy {
  margin: 0;
  color: var(--text-secondary);
  font-size: 0.9rem;
  line-height: 1.45;
}

.mp-field-grid,
.mp-create-grid,
.mp-inline-actions,
.mp-session-actions {
  display: flex;
  flex-direction: column;
  gap: 0.7rem;
}

.mp-create-grid {
  margin-top: 0.85rem;
}

.mp-connect-row {
  display: flex;
  gap: 0.65rem;
}

.mp-connect-row .field-input {
  flex: 1;
}

.mp-inline-actions,
.mp-session-actions {
  flex-direction: row;
  flex-wrap: wrap;
}

.mp-inline-actions .btn-secondary,
.mp-inline-actions .btn-primary,
.mp-session-actions .btn-secondary,
.mp-session-actions .btn-primary {
  flex: 1 1 0;
}

.mp-host-meta,
.mp-session-meta,
.mp-profile-copy,
.mp-empty-copy,
.mp-error-copy,
.mp-help-copy {
  margin: 0;
  color: var(--text-secondary);
  line-height: 1.45;
}

.mp-host-meta strong,
.mp-session-meta strong {
  color: var(--text-primary);
}

.mp-app-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 0.75rem;
  margin-top: 0.85rem;
}

.mp-app-link {
  display: block;
  border: 1px solid rgba(var(--accent-primary-rgb), 0.2);
  border-radius: 16px;
  background: rgba(255, 255, 255, 0.04);
  padding: 0.95rem 1rem;
  text-decoration: none;
}

.mp-app-link strong {
  display: block;
  margin-bottom: 0.18rem;
  font-size: 0.98rem;
}

.mp-app-link span {
  display: block;
  color: var(--text-secondary);
  font-size: 0.88rem;
  line-height: 1.4;
}

.mp-profile-list {
  display: flex;
  flex-direction: column;
  gap: 0.7rem;
  margin-top: 0.85rem;
}

.mp-profile-card {
  border: 1px solid var(--border-secondary);
  border-radius: 16px;
  background: rgba(255, 255, 255, 0.03);
  padding: 0.85rem 0.9rem;
}

.mp-profile-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.75rem;
}

.mp-profile-name-row {
  display: flex;
  align-items: center;
  gap: 0.65rem;
  min-width: 0;
}

.mp-profile-dot {
  width: 0.78rem;
  height: 0.78rem;
  border-radius: 999px;
  flex: 0 0 auto;
}

.mp-profile-name {
  font-size: 1rem;
  font-weight: 700;
}

.mp-profile-subtitle {
  margin: 0.35rem 0 0;
  color: var(--text-secondary);
  font-size: 0.84rem;
}

.mp-profile-actions {
  display: flex;
  gap: 0.55rem;
  margin-top: 0.85rem;
}

.mp-profile-actions button {
  flex: 1 1 0;
}

.mp-pin-sheet-backdrop {
  position: fixed;
  inset: 0;
  z-index: 40;
  display: flex;
  align-items: flex-end;
  justify-content: stretch;
  padding: 1rem;
  background: rgba(0, 0, 0, 0.56);
}

.mp-pin-sheet-backdrop.hidden {
  display: none !important;
  pointer-events: none !important;
}

.mp-pin-sheet-backdrop:not(.hidden) {
  pointer-events: auto;
}

.mp-pin-sheet .field-input:not(:disabled) {
  pointer-events: auto;
}

.mp-pin-sheet {
  width: min(100%, 860px);
  margin: 0 auto;
  border: 1px solid var(--border-secondary);
  border-radius: 18px 18px 0 0;
  background: #121621;
  padding: 1rem 1rem 1.1rem;
}

.mp-pin-sheet h2 {
  margin: 0;
  font-size: 1.05rem;
}

.mp-pin-sheet p {
  margin: 0.35rem 0 0.9rem;
  color: var(--text-secondary);
}

.mp-pin-sheet .field-input {
  margin-bottom: 0.75rem;
  text-align: center;
  letter-spacing: 0.3em;
  font-size: 1.05rem;
}

.mp-pin-field-label {
  display: block;
  margin: 0 0 0.35rem;
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: rgba(148, 163, 184, 0.9);
}

.mp-pin-change-extra {
  display: grid;
  gap: 0.15rem;
  margin: 0 0 0.55rem;
}

.mp-pin-change-extra.hidden {
  display: none;
}

.mp-error-copy {
  color: #fecaca;
}

.mp-page-actions {
  display: flex;
  gap: 0.6rem;
  flex-wrap: wrap;
  margin-top: 0.8rem;
}

.mp-page-actions .btn-secondary,
.mp-page-actions .btn-primary {
  flex: 1 1 0;
}

.mp-empty-state {
  border: 1px dashed var(--border-secondary);
  border-radius: 16px;
  padding: 1rem;
  text-align: center;
  background: rgba(255, 255, 255, 0.02);
}

.mp-bottom-nav {
  position: fixed;
  left: 0;
  right: 0;
  bottom: 0;
  z-index: 30;
  display: grid;
  grid-template-columns: repeat(8, minmax(0, 1fr));
  gap: 0.16rem;
  width: 100%;
  max-width: 100vw;
  box-sizing: border-box;
  padding: 0.45rem 0.28rem calc(0.45rem + env(safe-area-inset-bottom, 0px));
  background: rgba(10, 12, 18, 0.96);
  border-top: 1px solid rgba(255, 255, 255, 0.08);
  backdrop-filter: blur(16px);
}

.mobile-player-body.mp-battle-page {
  --mp-bottom-nav-offset: calc(4.65rem + env(safe-area-inset-bottom, 0px));
  /* Default padding when turn dock is hidden — just clear the bottom nav. */
  --mp-battle-turn-strip-offset: var(--mp-bottom-nav-offset);
  --mp-battle-turn-strip-max: min(38vh, 14rem);
}

/* When the action dock is open, reserve its max height above the nav. */
.mobile-player-body.mp-battle-page.mp-battle-strip-open {
  --mp-battle-turn-strip-offset: calc(
    var(--mp-bottom-nav-offset) + var(--mp-battle-turn-strip-max) + 0.75rem
  );
}

.mobile-player-body.mp-battle-page .mp-page-shell {
  padding-bottom: 0;
  /* Let the tool body own scrolling; avoid clipped/stacked siblings. */
  overflow: hidden;
}

.mobile-player-body.mp-battle-page .mp-page-main {
  padding-bottom: calc(var(--mp-bottom-nav-offset) + 0.5rem);
  overflow: hidden;
}

.mobile-player-body.mp-battle-page .pb-tool-shell {
  flex: 1 1 auto !important;
  min-height: 0 !important;
  height: auto !important;
  max-height: none !important;
  display: flex;
  flex-direction: column;
  overflow: hidden;
}

.mobile-player-body.mp-battle-page .pb-tool-header {
  display: none;
}

.mobile-player-body.mp-battle-page .pb-tool-body,
.mobile-player-body.mp-battle-page .tool-body {
  flex: 1 1 auto;
  min-height: 0;
  overflow: auto;
  -webkit-overflow-scrolling: touch;
  padding-bottom: calc(var(--mp-battle-turn-strip-offset) + 0.85rem);
}

.mobile-player-body.mp-battle-page .pb-mobile-turn-bar,
.mobile-player-body.mp-battle-page .pb-mobile-init-top,
.mobile-player-body.mp-battle-page .pb-handoff-banner--mobile {
  flex-shrink: 0;
  position: relative;
  z-index: 1;
}

.mobile-player-body.mp-battle-page .mp-bottom-nav {
  z-index: 40;
}

.mobile-player-body.mp-battle-page .mp-bottom-nav a {
  touch-action: manipulation;
}

.mp-bottom-nav a {
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 2.05rem;
  min-width: 0;
  padding: 0.16rem 0.06rem;
  border: 1px solid var(--border-secondary);
  border-radius: 10px;
  background: rgba(255, 255, 255, 0.04);
  text-decoration: none;
  font-size: 0.55rem;
  font-weight: 700;
  line-height: 1.05;
  text-align: center;
}

.mp-bottom-nav a.active {
  border-color: rgba(var(--accent-primary-rgb), 0.45);
  background: rgba(var(--accent-primary-rgb), 0.16);
  color: #fff;
}

.mp-character-picker:not(.ps-grid):not(.mp-character-picker--select) {
  display: flex;
  gap: 0.65rem;
  overflow-x: auto;
  padding-bottom: 0.15rem;
}

.mp-character-tab {
  min-width: 10rem;
  border: 1px solid var(--border-secondary);
  border-radius: 16px;
  background: rgba(255, 255, 255, 0.04);
  padding: 0.8rem 0.9rem;
  color: inherit;
  text-align: left;
}

.mp-character-tab.active {
  border-color: rgba(var(--accent-primary-rgb), 0.45);
  background: rgba(var(--accent-primary-rgb), 0.16);
}

.mp-character-tab strong,
.mp-character-stat strong,
.mp-ability-card strong,
.mp-detail-card strong,
.mp-list-item strong {
  display: block;
}

.mp-character-tab span,
.mp-character-stat span,
.mp-ability-card span,
.mp-detail-card span,
.mp-list-item span {
  display: block;
  color: var(--text-secondary);
  font-size: 0.82rem;
  line-height: 1.35;
}

.mp-character-summary {
  display: flex;
  flex-direction: column;
  gap: 0.9rem;
  overflow: visible;
}

.mp-sheet-error-panel {
  display: block;
  margin: 0.75rem 0;
  padding: 1rem 1.1rem;
  border: 1px solid rgba(248, 113, 113, 0.35);
  border-radius: 12px;
  background: rgba(24, 12, 16, 0.92);
  color: #fecaca;
}

.mp-sheet-error-panel .mp-page-note {
  margin: 0 0 0.85rem;
  color: #fecaca;
}

.mp-sheet-shell {
  overflow: visible;
}

.mp-character-eyebrow {
  margin: 0;
  color: var(--text-tertiary);
  font-size: 0.78rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.mp-character-title {
  margin: 0.18rem 0 0;
  font-size: 1.55rem;
  line-height: 1.05;
}

.mp-character-subtitle {
  margin: 0.4rem 0 0;
  color: var(--text-secondary);
}

.mp-sheet-shell {
  display: flex;
  flex-direction: column;
  gap: 0.95rem;
}

.mp-sheet-header {
  grid-template-columns: 1fr;
  grid-template-rows: auto;
  grid-template-areas:
    "hero"
    "actions"
    "vitals"
    "footer";
  gap: 0.7rem;
  padding: 0.75rem;
  justify-items: center;
}

.mp-sheet-header .ps-sheet-hero {
  --ps-hero-banner-h: 74px;
  display: flex;
  flex-direction: row;
  align-items: center;
  justify-content: center;
  gap: 0.45rem;
  width: auto;
  min-height: var(--ps-hero-banner-h);
  text-align: left;
}

.mp-sheet-header .ps-sheet-avatar-wrap {
  flex: 0 0 var(--ps-hero-banner-h);
  width: var(--ps-hero-banner-h);
  height: var(--ps-hero-banner-h);
  display: flex;
  align-items: stretch;
  align-self: center;
  overflow: hidden;
}

.mp-sheet-header .mp-sheet-avatar {
  cursor: pointer;
  padding: 0;
  border: none;
  background: transparent;
}
  width: 100%;
  height: 100%;
}

.mp-sheet-header .ps-sheet-avatar img {
  object-position: center;
}

.mp-sheet-header .ps-sheet-id {
  min-height: 0;
  padding: 0;
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: flex-start;
  flex: 1 1 auto;
  text-align: left;
}

.mp-sheet-header .ps-origin-lines,
.mp-sheet-header .ps-origin-row,
.mp-sheet-header .ps-origin-row--bg {
  justify-content: flex-start;
}

.mp-sheet-name {
  display: block;
  font-size: clamp(1.05rem, 4.2vw, 1.45rem);
  line-height: 1;
  margin-bottom: 0.22rem;
}

.mp-sheet-name-input {
  width: 100%;
  background: transparent;
  border: none;
  color: inherit;
  font: inherit;
  padding: 0;
}

.mp-sheet-name-input:focus {
  outline: none;
  box-shadow: 0 2px 0 rgba(99, 102, 241, 0.55);
}

.mp-sheet-actions {
  gap: 0.4rem;
  width: 100%;
}

.mp-sheet-actions .ps-level-dock,
.mp-level-dock {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 0.35rem;
  align-items: center;
  width: 100%;
}

.mp-level-dock .ps-level-dock-pill {
  min-width: 0;
  padding: 0.28rem 0.25rem 0.24rem;
}

.mp-level-dock .ps-level-dock-label,
.mp-level-dock .ps-level-dock-value {
  display: block;
  width: 100%;
  text-align: center;
}

.mp-level-dock .ps-level-dock-value {
  font-family: var(--font-display);
  font-size: 0.88rem;
  font-weight: 900;
  line-height: 1;
  color: rgba(255, 255, 255, 0.98);
  text-shadow: 0 1px 6px rgba(0, 0, 0, 0.55);
}

.mp-sheet-actions .ps-sheet-inspiration,
.mp-sheet-inspiration {
  min-width: 0;
  justify-content: center;
  border-radius: 14px;
  margin-left: auto;
}

.mp-sheet-inspiration.is-filled {
  border-color: rgba(250, 204, 21, 0.95);
  color: rgba(17, 12, 0, 0.98);
  background: linear-gradient(145deg, rgba(252, 211, 77, 1), rgba(245, 158, 11, 0.98));
  box-shadow:
    0 0 22px rgba(250, 204, 21, 0.65),
    0 0 6px rgba(253, 224, 71, 0.8),
    inset 0 1px 0 rgba(255, 255, 255, 0.45);
  animation: ps-inspiration-pulse 2.4s ease-in-out infinite;
}

.mp-sheet-inspiration-star {
  opacity: 0.95;
  font-size: 1.1rem;
  line-height: 1;
}

.mp-sheet-inspiration.is-filled .mp-sheet-inspiration-star {
  color: rgba(120, 53, 15, 0.95);
  text-shadow: 0 0 10px rgba(250, 204, 21, 0.85);
}

.mp-sheet-inspiration.is-filled .ps-sheet-inspiration-label {
  color: rgba(17, 12, 0, 0.96);
  font-weight: 900;
  letter-spacing: 0.06em;
}

.mp-mock-btn {
  appearance: none;
  border: 1px solid rgba(28, 124, 112, 0.45);
  border-radius: 12px;
  background: linear-gradient(180deg, rgba(10, 48, 53, 0.96), rgba(13, 34, 45, 0.98));
  color: rgba(243, 244, 246, 0.95);
  font: inherit;
  font-size: 0.78rem;
  font-weight: 700;
  line-height: 1.1;
  padding: 0.65rem 0.7rem;
  text-align: center;
}

.mp-sheet-wild-shape {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.7rem;
  width: 100%;
  padding: 0.45rem 0.8rem;
  border: 1px solid rgba(28, 124, 112, 0.3);
  border-radius: 12px;
  background: linear-gradient(180deg, rgba(8, 39, 45, 0.92), rgba(8, 22, 33, 0.94));
}

.mp-sheet-wild-shape.is-spent {
  opacity: 0.55;
  filter: grayscale(0.35);
  border-color: rgba(148, 163, 184, 0.35);
}

.mp-sheet-wild-shape-label,
.mp-sheet-wild-shape-uses {
  font-size: 0.72rem;
  font-weight: 800;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.mp-sheet-actions .ps-sheet-class-resources {
  display: flex;
  flex-direction: row;
  flex-wrap: nowrap;
  gap: 0.35rem;
  flex: 1 1 auto;
  width: auto;
  overflow-x: auto;
  padding-bottom: 0.05rem;
}

.mp-class-resource-chip {
  flex: 0 0 auto;
  min-width: max-content;
  display: inline-flex;
  align-items: center;
  gap: 0.32rem;
  padding: 0.34rem 0.55rem;
}

.mp-class-resource-chip .ps-class-resource-label,
.mp-class-resource-chip .ps-class-resource-uses {
  font-size: 0.62rem;
}

.mp-class-resource-chip .ps-class-resource-label {
  white-space: normal;
  overflow: visible;
  text-overflow: unset;
  line-height: 1.2;
}

.mp-class-resource-chip .ps-class-resource-uses {
  white-space: nowrap;
}

.mp-sheet-rest-row {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 0.5rem;
  width: 100%;
}

.mp-sheet-concentration {
  appearance: none;
  width: 100%;
  cursor: pointer;
}

.mp-sheet-concentration .ps-sheet-concentration-end-hint {
  opacity: 0.9;
}

.mp-resource-action-row {
  display: flex;
  align-items: center;
  flex-wrap: nowrap;
  gap: 0.35rem;
  width: 100%;
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
}

.mp-sheet-actions .ps-sheet-class-resources.mp-sheet-class-resources--stacked {
  display: grid;
  flex-direction: unset;
  flex-wrap: unset;
  width: 100%;
  overflow: visible;
  padding-bottom: 0;
}

.mp-sheet-class-resources--stacked {
  display: grid;
  gap: 0.35rem;
  width: 100%;
  overflow: visible;
}

.mp-sheet-actions .ps-sheet-class-resources.mp-sheet-class-resources--stacked .mp-class-resource-chip {
  width: 100%;
  box-sizing: border-box;
  justify-content: space-between;
  flex: 1 1 auto;
  min-width: 0;
}

.mp-sheet-concentration--header {
  margin-top: 0;
}

.mp-sheet-concentration--inline {
  min-height: 34px;
  padding: 0.32rem 0.55rem;
  gap: 0.45rem;
}

.mp-sheet-concentration--inline .ps-sheet-concentration-stack {
  flex-direction: row;
  align-items: center;
  text-align: left;
}

.mp-sheet-concentration--inline .ps-sheet-concentration-head {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  min-width: 0;
  flex: 1 1 auto;
}

.mp-sheet-concentration--inline .ps-sheet-concentration-ring {
  width: 1.15rem;
  height: 1.15rem;
  font-size: 0.68rem;
  flex-shrink: 0;
}

.mp-sheet-concentration--inline .ps-sheet-concentration-kicker {
  flex-shrink: 0;
  font-size: 0.5rem;
  white-space: nowrap;
}

.mp-sheet-concentration--inline .ps-sheet-concentration-kicker::after {
  content: '·';
  margin-left: 0.28rem;
  opacity: 0.55;
}

.mp-sheet-concentration--inline .ps-sheet-concentration-label {
  flex: 1 1 auto;
  min-width: 0;
  font-size: 0.72rem;
  font-weight: 800;
  text-align: left;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.mp-sheet-concentration--inline .ps-sheet-concentration-end-hint {
  padding: 0.12rem 0.38rem;
  font-size: 0.5rem;
}

[data-mp-patch-slot="header-concentration"]:empty {
  display: none;
}

.mp-inv-container-enc {
  margin: 0.35rem 0 0;
  padding: 0.38rem 0.55rem;
  border-radius: 10px;
  border: 1px solid rgba(129, 140, 248, 0.28);
  background: rgba(99, 102, 241, 0.1);
  color: rgba(199, 210, 254, 0.92);
  font-size: 0.68rem;
  line-height: 1.35;
}

.mp-inv-container-enc.is-extradimensional {
  border-color: rgba(167, 139, 250, 0.35);
  background: rgba(124, 58, 237, 0.12);
}

.mp-sheet-class-resources {
  display: flex;
  flex-direction: row;
  flex-wrap: nowrap;
  align-items: center;
  gap: 0.35rem;
  flex: 1 1 auto;
  min-width: 0;
  width: 100%;
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
  padding-bottom: 0.05rem;
}

.mp-sheet-actions .ps-sheet-inspiration.mp-sheet-inspiration--compact,
.mp-sheet-inspiration.mp-sheet-inspiration--compact {
  align-self: stretch;
  flex: 0 0 auto;
  width: 100%;
  min-width: 0;
  max-width: none;
  min-height: 26px;
  margin-left: 0;
  padding: 0.18rem 0.58rem;
  gap: 0.22rem;
}

.mp-sheet-actions .mp-sheet-inspiration--compact .ps-sheet-inspiration-label {
  font-size: 0.62rem;
  letter-spacing: 0.02em;
}

.mp-sheet-actions .mp-sheet-inspiration--compact .mp-sheet-inspiration-star {
  font-size: 0.82rem;
}

.mp-sheet-actions .mp-mock-btn--levelup {
  width: auto;
  min-width: 6.2rem;
  max-width: none;
  padding: 0.42rem 0.72rem;
  font-size: 0.68rem;
  letter-spacing: 0.03em;
  line-height: 1.1;
  align-self: center;
}

.mp-sheet-actions .mp-mock-btn--level-revert {
  width: auto;
  min-width: 5.2rem;
  max-width: none;
  padding: 0.42rem 0.72rem;
  font-size: 0.68rem;
  letter-spacing: 0.03em;
  line-height: 1.1;
  align-self: center;
  border-color: rgba(148, 163, 184, 0.4);
  background: rgba(0, 0, 0, 0.28);
  color: rgba(226, 232, 240, 0.92);
}

.mp-level-dock {
  display: flex;
  flex-wrap: wrap;
  gap: 0.35rem;
  align-items: center;
}

.mp-class-resource-chip .ps-class-resource-controls {
  display: inline-flex;
  align-items: center;
  gap: 0.2rem;
  flex-shrink: 0;
}

.mp-class-resource-chip .ps-class-resource-controls--manual {
  opacity: 0.75;
}

.mp-class-resource-chip .ps-resource-activate {
  appearance: none;
  flex-shrink: 0;
  font: inherit;
  font-size: 0.62rem;
  font-weight: 750;
  letter-spacing: 0.03em;
  text-transform: uppercase;
  color: rgba(255, 255, 255, 0.92);
  background: rgba(0, 0, 0, 0.28);
  border: 1px solid rgba(255, 255, 255, 0.16);
  border-radius: 999px;
  padding: 3px 8px;
  cursor: pointer;
}

.mp-class-resource-chip.is-spent {
  opacity: 0.55;
  border-color: rgba(148, 163, 184, 0.35);
  background: rgba(15, 23, 42, 0.35);
  filter: grayscale(0.35);
}

.mp-class-resource-chip .ps-resource-activate:disabled,
.mp-class-resource-chip .ps-resource-activate.is-spent,
.mp-class-resource-chip .ps-rage-toggle.is-spent {
  opacity: 0.9;
  color: rgba(226, 232, 240, 0.82);
  border-color: rgba(148, 163, 184, 0.35);
  background: rgba(30, 41, 59, 0.55);
  cursor: not-allowed;
  pointer-events: none;
}

.mp-class-resource-chip .ps-resource-pips {
  display: inline-flex;
  align-items: center;
  gap: 3px;
  flex-shrink: 0;
}

.mp-class-resource-chip .ps-resource-pip {
  appearance: none;
  width: 11px;
  height: 11px;
  border-radius: 999px;
  border: 1px solid rgba(255, 255, 255, 0.28);
  background: rgba(0, 0, 0, 0.35);
  padding: 0;
}

.mp-class-resource-chip .ps-resource-pip.is-filled {
  background: rgba(212, 168, 83, 0.9);
  border-color: rgba(255, 255, 255, 0.42);
}

.ps-feature-activate-popover .ps-feature-option-list {
  display: flex;
  flex-direction: column;
  gap: 10px;
  margin: 10px 0;
  max-height: 55vh;
  overflow: auto;
}

.ps-feature-activate-popover .ps-feature-option {
  display: flex;
  flex-direction: column;
  gap: 6px;
  padding: 10px 12px;
  border-radius: 12px;
  border: 1px solid rgba(148, 163, 184, 0.28);
  background: rgba(2, 6, 23, 0.45);
}

.ps-feature-activate-popover .ps-feature-ally-label {
  display: flex;
  flex-direction: column;
  gap: 4px;
  font-size: 0.75rem;
}

.ps-feature-activate-popover .ps-feature-ally-label select,
.ps-feature-activate-popover .ps-feature-ally-label input {
  font: inherit;
  font-size: 0.9rem;
  border-radius: 8px;
  border: 1px solid rgba(148, 163, 184, 0.4);
  background: rgba(15, 23, 42, 0.9);
  color: #f8fafc;
  padding: 8px;
}

.mp-sheet-chip-row {
  justify-content: flex-start;
}

.mp-sheet-hero-card {
  padding: 1rem;
  cursor: default;
}

.mp-sheet-hero-top {
  align-items: flex-start;
}

.mp-sheet-avatar {
  width: 64px;
  height: 64px;
  flex-shrink: 0;
}

.mp-sheet-avatar img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.mp-sheet-hero-meta {
  min-width: 0;
  flex: 1;
}

.mp-sheet-hero-name {
  font-size: clamp(1.35rem, 4vw, 1.85rem);
  line-height: 1.02;
  white-space: normal;
  overflow: visible;
  text-overflow: unset;
}

.mp-sheet-hero-level {
  margin-left: auto;
}

.mp-state-chip-row {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  margin: 0.25rem 0 0.9rem;
}

.mp-state-chip {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  padding: 0.4rem 0.7rem;
  border-radius: 999px;
  border: 1px solid rgba(var(--ps-class-rgb, 99, 102, 241), 0.28);
  background: rgba(var(--ps-class-rgb, 99, 102, 241), 0.14);
  color: rgba(255, 255, 255, 0.94);
  font-size: 0.76rem;
  line-height: 1.2;
}

.mp-state-chip strong,
.mp-state-chip span {
  display: inline;
  color: inherit;
}

.mp-state-chip--focus {
  border-color: rgba(96, 165, 250, 0.32);
  background: rgba(37, 99, 235, 0.16);
}

.mp-state-chip--warn {
  border-color: rgba(245, 158, 11, 0.36);
  background: rgba(245, 158, 11, 0.16);
}

.mp-state-chip--temp {
  border-color: rgba(251, 113, 133, 0.34);
  background: rgba(225, 29, 72, 0.14);
}

.mp-state-chip--condition {
  width: 100%;
  justify-content: space-between;
  align-items: flex-start;
  border-radius: 16px;
  padding: 0.75rem 0.85rem;
  background: rgba(255, 255, 255, 0.05);
}

.mp-state-chip--exhaustion {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 0.28rem;
  width: 100%;
  padding: 0.7rem 0.9rem;
  border-radius: 14px;
  border: 1px solid rgba(245, 158, 11, 0.58);
  background: linear-gradient(135deg, rgba(245, 158, 11, 0.3), rgba(180, 83, 9, 0.2));
  box-shadow: 0 0 18px rgba(245, 158, 11, 0.24);
  animation: mp-exhaustion-chip-pulse 2.4s ease-in-out infinite;
}

.mp-state-chip--exhaustion strong {
  font-size: 0.84rem;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}

.mp-state-chip--exhaustion span {
  font-size: 0.78rem;
  line-height: 1.35;
  color: rgba(255, 251, 235, 0.96);
}

.mp-state-chip--exhaustion-severe {
  border-color: rgba(249, 115, 22, 0.68);
  background: linear-gradient(135deg, rgba(249, 115, 22, 0.34), rgba(154, 52, 18, 0.24));
  box-shadow: 0 0 20px rgba(249, 115, 22, 0.28);
}

.mp-state-chip--exhaustion-lethal {
  border-color: rgba(239, 68, 68, 0.78);
  background: linear-gradient(135deg, rgba(239, 68, 68, 0.38), rgba(127, 29, 29, 0.3));
  box-shadow: 0 0 22px rgba(239, 68, 68, 0.32);
  animation: mp-exhaustion-chip-pulse-lethal 1.8s ease-in-out infinite;
}

@keyframes mp-exhaustion-chip-pulse {
  0%, 100% {
    box-shadow: 0 0 14px rgba(245, 158, 11, 0.2);
  }
  50% {
    box-shadow: 0 0 24px rgba(245, 158, 11, 0.42);
  }
}

@keyframes mp-exhaustion-chip-pulse-lethal {
  0%, 100% {
    box-shadow: 0 0 16px rgba(239, 68, 68, 0.28);
  }
  50% {
    box-shadow: 0 0 28px rgba(239, 68, 68, 0.52);
  }
}

.mp-sheet-overlay-root {
  position: fixed;
  inset: 0;
  z-index: 12000;
  pointer-events: none;
  display: flex;
  align-items: flex-end;
  justify-content: center;
}

.mp-sheet-overlay-root.is-open {
  pointer-events: auto;
}

.mp-sheet-modal-backdrop,
.mp-sheet-overlay-root .ps-rest-backdrop {
  position: absolute;
  inset: 0;
  z-index: 1;
  background: rgba(2, 6, 23, 0.62);
  backdrop-filter: blur(4px);
}

.mp-sheet-modal-panel,
.mp-sheet-overlay-root .ps-rest-popover,
.mp-sheet-overlay-root .ps-level-up-popover {
  position: relative;
  z-index: 2;
  left: auto;
  top: auto;
  transform: none;
  width: min(100%, 420px);
  max-height: min(88vh, 720px);
  margin: 0.75rem;
  overflow: auto;
  border: 1px solid rgba(148, 163, 184, 0.22);
  border-radius: 18px;
  padding: 0;
  background: linear-gradient(180deg, rgba(30, 41, 59, 0.98), rgba(15, 23, 42, 0.98));
  box-shadow: 0 18px 48px rgba(2, 6, 23, 0.55);
}

.mp-sheet-modal-panel--wide {
  width: min(100%, 480px);
}

.mp-sheet-modal-head,
.mp-sheet-overlay-root .ps-rest-pop-head {
  position: relative;
  display: grid;
  grid-template-columns: 1fr auto;
  grid-template-rows: auto auto;
  gap: 0.15rem 0.55rem;
  align-items: center;
  padding: 1rem 2.75rem 0.75rem 1.1rem;
  margin: 0;
  border-bottom: 1px solid rgba(148, 163, 184, 0.14);
  text-align: center;
}

.mp-sheet-modal-head strong,
.mp-sheet-overlay-root .ps-rest-pop-head strong {
  grid-column: 1 / -1;
  flex: none;
  font-size: 1rem;
  color: rgba(248, 250, 252, 0.96);
}

.mp-sheet-modal-head span,
.mp-sheet-overlay-root .ps-rest-pop-head span {
  grid-column: 1 / -1;
  font-size: 0.78rem;
  color: rgba(148, 163, 184, 0.92);
}

.mp-sheet-modal-close,
.mp-sheet-overlay-root .ps-rest-pop-close {
  position: absolute;
  top: 0.75rem;
  right: 0.75rem;
  appearance: none;
  width: 2rem;
  height: 2rem;
  border-radius: 10px;
  border: 1px solid rgba(148, 163, 184, 0.18);
  background: rgba(255, 255, 255, 0.04);
  color: rgba(226, 232, 240, 0.88);
  font-size: 0.82rem;
  cursor: pointer;
}

.mp-sheet-modal-panel > :not(.mp-sheet-modal-head):not(.mp-sheet-modal-actions) {
  margin-left: 0.85rem;
  margin-right: 0.85rem;
}

.mp-sheet-overlay-root .ps-rest-pop-meter {
  height: 5px;
  margin: 0.75rem 0.85rem 0.65rem;
  border-radius: 999px;
  background: rgba(15, 23, 42, 0.72);
  border: 1px solid rgba(148, 163, 184, 0.12);
}

.mp-sheet-overlay-root .ps-rest-pop-meter-fill {
  background: linear-gradient(90deg, rgba(var(--ps-class-rgb, 99, 102, 241), 0.55), rgba(var(--ps-class-rgb, 99, 102, 241), 0.92));
}

.mp-sheet-overlay-root .ps-rest-info,
.mp-sheet-overlay-root .ps-rest-hd,
.mp-sheet-overlay-root .ps-rest-preview,
.mp-sheet-overlay-root .ps-rest-heal-display {
  margin-bottom: 0.65rem;
  padding: 0.75rem 0.85rem;
  border-radius: 12px;
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid rgba(148, 163, 184, 0.12);
}

.mp-sheet-overlay-root .ps-rest-info h4,
.mp-sheet-overlay-root .ps-rest-preview h5 {
  margin: 0 0 0.35rem;
  font-size: 0.82rem;
  color: rgba(248, 250, 252, 0.94);
}

.mp-sheet-overlay-root .ps-rest-info p,
.mp-sheet-overlay-root .ps-lu-hint {
  margin: 0;
  font-size: 0.78rem;
  line-height: 1.45;
  color: rgba(148, 163, 184, 0.92);
}

.mp-sheet-overlay-root .ps-rest-hd-title,
.mp-sheet-overlay-root .ps-rest-hd-stats,
.mp-sheet-overlay-root .ps-rest-heal-label {
  font-size: 0.72rem;
  font-weight: 700;
  color: rgba(148, 163, 184, 0.92);
}

.mp-sheet-overlay-root .ps-rest-stepper,
.mp-sheet-overlay-root .ps-lu-asi-controls {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
}

.mp-sheet-overlay-root .ps-rest-stepper-btn,
.mp-sheet-overlay-root .ps-lu-asi-btn,
.mp-sheet-overlay-root .ps-rest-roll-btn {
  appearance: none;
  min-height: 2.5rem;
  padding: 0.55rem 0.85rem;
  border-radius: 12px;
  border: 1px solid rgba(148, 163, 184, 0.18);
  background: rgba(255, 255, 255, 0.04);
  color: rgba(248, 250, 252, 0.94);
  font-size: 0.82rem;
  font-weight: 700;
}

.mp-sheet-overlay-root .ps-rest-stepper-val,
.mp-sheet-overlay-root .ps-rest-heal-value,
.mp-sheet-overlay-root .ps-lu-hp-roll-input {
  min-width: 2.4rem;
  min-height: 2.5rem;
  padding: 0.45rem 0.55rem;
  border-radius: 10px;
  border: 1px solid rgba(148, 163, 184, 0.18);
  background: rgba(15, 23, 42, 0.72);
  color: rgba(248, 250, 252, 0.96);
  font-size: 0.88rem;
  font-weight: 800;
  text-align: center;
}

.mp-sheet-overlay-root .ps-rest-preview ul {
  margin: 0;
  padding: 0;
  list-style: none;
}

.mp-sheet-overlay-root .ps-rest-preview li {
  display: flex;
  justify-content: space-between;
  gap: 0.65rem;
  padding: 0.35rem 0;
  border-bottom: 1px solid rgba(148, 163, 184, 0.08);
  font-size: 0.78rem;
}

.mp-sheet-overlay-root .ps-rest-preview-key {
  color: rgba(148, 163, 184, 0.92);
}

.mp-sheet-overlay-root .ps-rest-preview-val strong {
  color: rgba(167, 243, 208, 0.95);
}

.mp-sheet-modal-actions,
.mp-sheet-overlay-root .ps-rest-actions {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(0, 1fr));
  gap: 0.45rem;
  padding: 0.65rem;
  margin: 0.35rem 0 0;
  border-top: 1px solid rgba(148, 163, 184, 0.12);
}

.mp-sheet-modal-btn,
.mp-sheet-overlay-root .ps-rest-action-cancel,
.mp-sheet-overlay-root .ps-rest-action-apply {
  min-height: 2.85rem;
  padding: 0.75rem 0.85rem;
  border-radius: 12px;
  font-size: 0.88rem;
  font-weight: 700;
  appearance: none;
  cursor: pointer;
}

.mp-sheet-modal-btn--ghost,
.mp-sheet-overlay-root .ps-rest-action-cancel {
  border: 1px solid rgba(148, 163, 184, 0.16);
  background: rgba(15, 23, 42, 0.82);
  color: rgba(226, 232, 240, 0.9);
}

.mp-sheet-modal-btn--primary,
.mp-sheet-overlay-root .ps-rest-action-apply {
  border: 1px solid rgba(var(--ps-class-rgb, 99, 102, 241), 0.42);
  background: rgba(var(--ps-class-rgb, 99, 102, 241), 0.22);
  color: rgba(248, 250, 252, 0.96);
}

.mp-sheet-modal-btn--primary:disabled,
.mp-sheet-overlay-root .ps-rest-action-apply:disabled {
  opacity: 0.42;
  cursor: not-allowed;
}

.mp-sheet-overlay-root .ps-lu-steps {
  display: flex;
  flex-wrap: wrap;
  gap: 0.35rem;
  padding: 0.65rem 0.85rem 0.15rem;
  margin: 0;
}

.mp-sheet-overlay-root .ps-lu-step {
  padding: 0.28rem 0.55rem;
  border-radius: 999px;
  border: 1px solid rgba(148, 163, 184, 0.16);
  background: rgba(255, 255, 255, 0.03);
  color: rgba(148, 163, 184, 0.88);
  font-size: 0.66rem;
  font-weight: 700;
  letter-spacing: 0.03em;
  text-transform: uppercase;
}

.mp-sheet-overlay-root .ps-lu-step.is-active {
  border-color: rgba(var(--ps-class-rgb, 99, 102, 241), 0.42);
  background: rgba(var(--ps-class-rgb, 99, 102, 241), 0.18);
  color: rgba(248, 250, 252, 0.96);
}

.mp-sheet-overlay-root .ps-lu-step.is-done {
  color: rgba(167, 243, 208, 0.92);
}

.mp-sheet-overlay-root .ps-lu-body {
  padding: 0.15rem 0 0.65rem;
}

.mp-sheet-overlay-root .ps-lu-feature,
.mp-sheet-overlay-root .ps-lu-subclass-opt,
.mp-sheet-overlay-root .ps-lu-hp-mode,
.mp-sheet-overlay-root .ps-lu-asi-row {
  padding: 0.75rem 0.85rem;
  border-radius: 12px;
  border: 1px solid rgba(148, 163, 184, 0.12);
  background: rgba(255, 255, 255, 0.03);
}

.mp-sheet-overlay-root .ps-lu-subclass-opt.is-selected,
.mp-sheet-overlay-root .ps-lu-hp-mode.is-selected {
  border-color: rgba(var(--ps-class-rgb, 99, 102, 241), 0.42);
  background: rgba(var(--ps-class-rgb, 99, 102, 241), 0.12);
}

.mp-sheet-overlay-root .ps-lu-feature-list,
.mp-sheet-overlay-root .ps-lu-subclass-list,
.mp-sheet-overlay-root .ps-lu-hp-modes,
.mp-sheet-overlay-root .ps-lu-asi-grid {
  display: grid;
  gap: 0.45rem;
}

.mp-sheet-overlay-root .ps-lu-feature h5,
.mp-sheet-overlay-root .ps-lu-subclass-name,
.mp-sheet-overlay-root .ps-lu-hp-mode-title,
.mp-sheet-overlay-root .ps-lu-asi-label {
  margin: 0;
  font-size: 0.84rem;
  color: rgba(248, 250, 252, 0.94);
}

.mp-sheet-overlay-root .ps-lu-feature p,
.mp-sheet-overlay-root .ps-lu-subclass-desc,
.mp-sheet-overlay-root .ps-lu-hp-mode-val {
  margin: 0.25rem 0 0;
  font-size: 0.76rem;
  color: rgba(148, 163, 184, 0.92);
}

.mp-sheet-overlay-root .ps-lu-asi-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.75rem;
}

.mp-sheet-overlay-root .ps-lu-asi-score {
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
}

.mp-sheet-overlay-root .ps-lu-hp-roll-btn {
  width: calc(100% - 1.7rem);
  margin: 0.45rem 0.85rem 0;
}

body.mp-sheet-modal-open {
  overflow: hidden;
}

.mp-sheet-hero-footer {
  display: flex;
  flex-direction: column;
  gap: 0.85rem;
}

.mp-sheet-hp-wrap {
  padding: 0.9rem 0.95rem;
  border: 1px solid rgba(148, 163, 184, 0.16);
  border-radius: 16px;
  background: linear-gradient(145deg, rgba(15, 23, 42, 0.92), rgba(3, 7, 18, 0.78));
}

.mp-sheet-hp-wrap.ps-hdr-hp--low {
  box-shadow: 0 0 0 1px rgba(245, 158, 11, 0.15), 0 0 14px rgba(245, 158, 11, 0.12);
}

.mp-sheet-hp-wrap.ps-hdr-hp--critical {
  box-shadow: 0 0 0 1px rgba(239, 68, 68, 0.18), 0 0 18px rgba(239, 68, 68, 0.16);
}

.mp-sheet-hp-copy {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 0.8rem;
  margin-bottom: 0.55rem;
}

.mp-sheet-hp-copy small,
.mp-vital-hint {
  color: rgba(148, 163, 184, 0.88);
  font-size: 0.72rem;
  line-height: 1.3;
}

.mp-sheet-hp-nums {
  display: flex;
  align-items: baseline;
  gap: 0.35rem;
}

.mp-sheet-hp-nums strong {
  font-size: 1.55rem;
  line-height: 1;
}

.mp-sheet-hp-nums span {
  color: rgba(226, 232, 240, 0.82);
  font-size: 0.95rem;
}

.mp-sheet-badges {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 0.6rem;
}

.mp-sheet-badge {
  padding: 0.72rem 0.78rem;
  border-radius: 14px;
  border: 1px solid rgba(148, 163, 184, 0.14);
  background: rgba(255, 255, 255, 0.04);
}

.mp-sheet-badge strong {
  display: block;
  margin-top: 0.2rem;
  font-size: 1.02rem;
}

.mp-sheet-badge-label {
  display: block;
  color: rgba(148, 163, 184, 0.9);
  font-size: 0.68rem;
  letter-spacing: 0.1em;
  text-transform: uppercase;
}

.mp-sheet-dashboard {
  padding: 0.75rem;
}

.mp-sheet-vitals {
  display: flex;
  flex-direction: column;
  gap: clamp(0.2rem, 1.2vw, 0.45rem);
  width: 100%;
  max-width: 100%;
  margin-top: 0.6rem;
  box-sizing: border-box;
}

.mp-sheet-vitals-row {
  display: grid;
  gap: clamp(0.2rem, 1.2vw, 0.45rem);
  width: 100%;
}

.mp-sheet-vitals-row--top {
  grid-template-columns: repeat(4, minmax(0, 1fr));
}

.mp-sheet-vitals-row--bottom {
  grid-template-columns: repeat(3, minmax(0, 1fr));
  max-width: 75%;
  margin-inline: auto;
}

.mp-active-effects {
  margin-top: 0.55rem;
  padding: 0.55rem 0.6rem;
  border-radius: 12px;
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid rgba(255, 255, 255, 0.08);
}

.mp-fx-head {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 0.5rem;
  margin-bottom: 0.35rem;
}

.mp-fx-ac-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.5rem;
  margin: 0 0 0.4rem;
  min-height: 2.5rem;
  padding: 6px 10px;
  border-radius: 10px;
  border: 1px solid rgba(255, 255, 255, 0.12);
  background: rgba(255, 255, 255, 0.04);
}

.mp-fx-ac-label {
  flex: 1 1 auto;
  min-width: 0;
  margin: 0;
  font-size: 0.68rem;
  opacity: 0.72;
  letter-spacing: 0.02em;
  text-align: left;
  color: inherit;
  white-space: nowrap;
}

.mp-fx-ac-input {
  width: auto;
  min-width: 2.5rem;
  max-width: 4.5rem;
  margin: 0;
  padding: 0;
  border: 0;
  background: transparent;
  font: inherit;
  font-size: 1.35rem;
  font-weight: 900;
  font-variant-numeric: tabular-nums;
  line-height: 1;
  text-align: right;
  color: inherit;
}

.mp-fx-title {
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}

.mp-fx-hint {
  font-size: 0.65rem;
  color: var(--text-secondary);
}

.mp-fx-list {
  list-style: none;
  margin: 0 0 0.4rem;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: 0.3rem;
}

.mp-fx-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.4rem;
  padding: 0.35rem 0.4rem;
  border-radius: 8px;
  background: rgba(0, 0, 0, 0.18);
}

.mp-fx-row--affinity .mp-fx-name {
  color: rgba(125, 211, 252, 0.95);
}

.mp-fx-row--affinity .mp-fx-copy {
  flex-direction: row;
  flex-wrap: nowrap;
  align-items: baseline;
  gap: 0.35rem;
}

.mp-fx-row--curse .mp-fx-name {
  color: rgba(251, 191, 36, 0.95);
}

.mp-fx-copy {
  display: flex;
  flex-direction: column;
  gap: 0.1rem;
  min-width: 0;
}

.mp-fx-name {
  font-size: 0.8rem;
  font-weight: 650;
}

.mp-fx-summary {
  font-size: 0.68rem;
  color: var(--text-secondary);
}

.mp-fx-empty {
  font-size: 0.72rem;
  color: var(--text-secondary);
  padding: 0.15rem 0;
}

.mp-fx-remove {
  flex: 0 0 auto;
  border: 0;
  background: transparent;
  color: var(--text-secondary);
  font-size: 1.1rem;
  line-height: 1;
  padding: 0 0.15rem;
}

.mp-fx-remove:hover,
.mp-fx-remove:active {
  color: #fca5a5;
}

.mp-fx-custom-row {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.3rem;
  margin-top: 0.35rem;
}

.mp-fx-custom-row .mp-fx-custom-kind,
.mp-fx-custom-row .mp-fx-custom-target,
.mp-fx-custom-row .mp-fx-custom-damage {
  -webkit-appearance: none;
  appearance: none;
  flex: 0 0 auto;
  width: auto;
  min-width: 0;
  field-sizing: content;
  font-size: 0.62rem;
  font-weight: 600;
  line-height: 1.1;
  height: 1.35rem;
  min-height: 1.35rem;
  padding: 0 0.9rem 0 0.28rem;
  border-radius: 4px;
  border: 1px solid rgba(255, 255, 255, 0.14);
  background-color: rgba(0, 0, 0, 0.25);
  background-image: linear-gradient(45deg, transparent 50%, currentColor 50%),
    linear-gradient(135deg, currentColor 50%, transparent 50%);
  background-position: calc(100% - 0.38rem) 50%, calc(100% - 0.2rem) 50%;
  background-size: 0.16rem 0.16rem, 0.16rem 0.16rem;
  background-repeat: no-repeat;
  color: inherit;
  white-space: nowrap;
  box-sizing: border-box;
}

.mp-fx-value-stepper {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 1px;
  padding: 0;
  border-radius: 999px;
  border: 1px solid rgba(255, 255, 255, 0.14);
  background: rgba(0, 0, 0, 0.28);
  flex: 0 0 auto;
  height: 1.35rem;
  box-sizing: border-box;
}

.mp-fx-value-stepper[hidden] {
  display: none !important;
}

.mp-fx-value-stepper .ps-stat-step-btn {
  width: 1.35rem;
  height: 1.35rem;
  min-width: 1.35rem;
  min-height: 1.35rem;
  font-size: 0.72rem;
}

.mp-fx-custom-row .mp-fx-custom-value {
  width: 1.7rem;
  min-width: 1.7rem;
  padding: 0;
  border: 0;
  background: transparent;
  color: inherit;
  font-size: 0.72rem;
  font-weight: 700;
  line-height: 1.35rem;
  height: 1.35rem;
  text-align: center;
}

.mp-fx-secondary-slot {
  flex: 0 0 auto;
  width: auto;
  min-width: 0;
}

.mp-fx-secondary-slot:not(:has(select:not([hidden]))) {
  display: none;
}

.mp-fx-custom-row .mp-fx-custom-target[hidden],
.mp-fx-custom-row .mp-fx-custom-damage[hidden] {
  display: none !important;
}

.mp-fx-custom-row.is-affinity .mp-fx-value-stepper {
  display: none !important;
}

.mp-fx-add-btn {
  flex: 0 0 auto;
  height: 1.35rem;
  min-height: 1.35rem;
  padding: 0 0.45rem;
  font-size: 0.62rem;
  font-weight: 700;
  line-height: 1;
}

.mp-fx-add-row {
  display: flex;
  gap: 0.4rem;
  align-items: center;
}

.mp-fx-catalog {
  flex: 1 1 auto;
  min-width: 0;
  font-size: 0.78rem;
  padding: 0.4rem 0.45rem;
  border-radius: 8px;
  border: 1px solid rgba(255, 255, 255, 0.12);
  background: rgba(0, 0, 0, 0.25);
  color: inherit;
}

.mp-vital-badge.mp-vital-exhaustion {
  outline: 2px solid rgba(245, 158, 11, 0.48);
  outline-offset: 1px;
  border-radius: 10px;
}

.mp-vital-badge.mp-vital-exhaustion--2 {
  outline-color: rgba(245, 158, 11, 0.52);
}

.mp-vital-badge {
  position: relative;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.1rem;
  min-width: 0;
  width: 100%;
}

.mp-vital-badge-label {
  color: rgba(226, 232, 240, 0.88);
  font-size: clamp(0.38rem, 2.2vw, 0.52rem);
  font-weight: 800;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  text-align: center;
  line-height: 1.1;
  width: 100%;
}

.mp-vital-badge-art {
  position: relative;
  width: 100%;
  aspect-ratio: 78 / 52;
}

.mp-vital-badge--ac { --mp-vital-color: #f3d18b; }
.mp-vital-badge--init { --mp-vital-color: #b9dcff; }
.mp-vital-badge--pass { --mp-vital-color: #baf5cb; }
.mp-vital-badge--prof { --mp-vital-color: #d5c2ff; }
.mp-vital-badge--temp { --mp-vital-color: #ffbfd4; }
.mp-vital-badge--hd { --mp-vital-color: #ffd59a; }
.mp-vital-badge--speed { --mp-vital-color: #a8f0ff; }

.mp-vital-badge.mp-vital-encumbrance {
  outline: 2px solid rgba(148, 163, 184, 0.92);
  outline-offset: 2px;
  border-radius: 10px;
  box-shadow:
    0 0 0 1px rgba(148, 163, 184, 0.18),
    0 0 14px rgba(148, 163, 184, 0.28);
}

.mp-vital-badge--speed.mp-vital-encumbrance .mp-vital-badge-art small {
  color: #cbd5e1;
  font-size: clamp(0.46rem, 2vw, 0.58rem);
  font-weight: 800;
}

.mp-vital-badge--speed.mp-vital-exhaustion .mp-vital-badge-art small {
  color: #fde68a;
  font-size: clamp(0.46rem, 2vw, 0.58rem);
  font-weight: 800;
}

.mp-exhaustion-vital-marker {
  position: absolute;
  top: -6px;
  right: -4px;
  z-index: 4;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 1.55rem;
  height: 1.2rem;
  padding: 0 5px;
  border-radius: 999px;
  border: 1px solid rgba(253, 230, 138, 0.95);
  background: linear-gradient(180deg, rgba(217, 119, 6, 0.98), rgba(146, 64, 14, 0.98));
  color: #fff7ed;
  font-size: clamp(0.5rem, 2.4vw, 0.62rem);
  font-weight: 800;
  letter-spacing: 0.02em;
  line-height: 1;
  box-shadow: 0 2px 10px rgba(0, 0, 0, 0.5);
}

.mp-vital-badge--speed .mp-exhaustion-vital-marker {
  min-width: 1.85rem;
}

.mp-encumbrance-vital-marker {
  position: absolute;
  top: -6px;
  right: -4px;
  z-index: 4;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 1.55rem;
  height: 1.2rem;
  padding: 0 5px;
  border-radius: 999px;
  border: 1px solid rgba(226, 232, 240, 0.95);
  background: linear-gradient(180deg, rgba(100, 116, 139, 0.98), rgba(51, 65, 85, 0.98));
  color: #f8fafc;
  font-size: clamp(0.5rem, 2.4vw, 0.62rem);
  font-weight: 800;
  letter-spacing: 0.02em;
  line-height: 1;
  box-shadow: 0 2px 10px rgba(0, 0, 0, 0.5);
}

.mp-vital-badge--speed .mp-encumbrance-vital-marker {
  min-width: 1.85rem;
}

.mp-vital-badge-art img {
  width: 100%;
  height: 100%;
  object-fit: contain;
  display: block;
  filter: drop-shadow(0 3px 10px rgba(0, 0, 0, 0.32));
  pointer-events: none;
  user-select: none;
}

.mp-sheet-shell .ps-ability.is-encumbrance-affected,
.mp-sheet-shell .ps-ability.mp-ability-encumbrance {
  outline: 2px solid rgba(148, 163, 184, 0.88);
  outline-offset: 2px;
}

.mp-sheet-shell .ps-ability .mp-encumbrance-vital-marker {
  top: -5px;
  right: -3px;
}

.mp-sheet-shell .ps-stat-row.mp-stat-encumbrance {
  outline: 2px solid rgba(148, 163, 184, 0.58);
  outline-offset: -1px;
  border-radius: 8px;
}

.mp-vital-badge-value,
.mp-vital-badge-art small {
  position: absolute;
  left: 50%;
  width: 100%;
  transform: translateX(-50%);
  color: var(--mp-vital-color, #fff);
  font-family: var(--font-display);
  font-weight: 800;
  line-height: 1;
  text-align: center;
  text-shadow: 0 1px 4px rgba(0, 0, 0, 0.9);
}

.mp-vital-badge-value {
  top: 50%;
  transform: translate(-50%, -50%);
  font-size: clamp(0.82rem, 3.4vw, 1.28rem);
}

.mp-vital-badge-input {
  position: absolute;
  top: 50%;
  left: 50%;
  width: 88%;
  transform: translate(-50%, -50%);
  border: 0;
  background: transparent;
  color: var(--mp-vital-color, #fff);
  font-family: var(--font-display);
  font-size: clamp(0.82rem, 3.4vw, 1.28rem);
  font-weight: 800;
  line-height: 1;
  text-align: center;
  text-shadow: 0 1px 4px rgba(0, 0, 0, 0.9);
  z-index: 3;
  pointer-events: auto;
}

.mp-vital-badge-input:focus {
  outline: none;
}

.mp-vital-badge-art small {
  bottom: 4px;
  font-size: clamp(0.32rem, 1.8vw, 0.42rem);
  letter-spacing: 0.06em;
  text-transform: uppercase;
}

.mp-hp-status-block {
  display: flex;
  flex-direction: column;
  gap: 0.35rem;
  width: 100%;
  flex-shrink: 0;
}

.mp-hp-status-strip {
  width: 100%;
  flex-shrink: 0;
}

.mp-hp-dock-wrap {
  width: 100%;
  padding-inline: 0;
  flex-shrink: 0;
}

.mp-hp-dock-wrap.is-live-locked {
  position: relative;
}

.mp-live-vitals-lock {
  display: block;
  width: 100%;
  margin: 0 0 0.45rem;
  padding: 0.4rem 0.55rem;
  border: 1px solid rgba(245, 158, 11, 0.45);
  border-radius: 0.5rem;
  background: rgba(245, 158, 11, 0.12);
  color: #fcd34d;
  font: inherit;
  font-size: 0.78rem;
  font-weight: 600;
  text-align: center;
  cursor: pointer;
}

.mp-hp-dock-wrap.is-live-locked .mp-hp-control-row,
.mp-death-save-track.is-live-locked {
  opacity: 0.72;
}

.mp-vital-badge.is-live-locked .mp-vital-badge-input {
  opacity: 0.72;
}

.mp-hp-control-row {
  display: grid;
  grid-template-columns: 34px minmax(0, 1fr) 34px;
  align-items: center;
  gap: 0.4rem;
}

.mp-hp-step-btn {
  appearance: none;
  width: 34px;
  height: 34px;
  border: 1px solid rgba(148, 163, 184, 0.2);
  border-radius: 999px;
  background: linear-gradient(180deg, rgba(51, 65, 85, 0.95), rgba(15, 23, 42, 0.98));
  color: rgba(248, 250, 252, 0.96);
  font: inherit;
  font-size: 1rem;
  font-weight: 900;
  line-height: 1;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.35);
}

.mp-sheet-shell :is(
  .ps-stat-step-btn,
  .ps-resource-btn,
  .ps-class-resource-step,
  .ps-condition-dur-btn
),
#mp-sheet-overlay-root :is(
  .ps-rest-stepper-btn,
  .ps-lu-asi-btn
) {
  appearance: none;
  width: 34px;
  height: 34px;
  min-width: 34px;
  min-height: 34px;
  padding: 0;
  border: 1px solid rgba(148, 163, 184, 0.2);
  border-radius: 999px;
  background: linear-gradient(180deg, rgba(51, 65, 85, 0.95), rgba(15, 23, 42, 0.98));
  color: rgba(248, 250, 252, 0.96);
  font: inherit;
  font-size: 1rem;
  font-weight: 900;
  line-height: 1;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.35);
}

.mp-sheet-shell :is(
  .ps-stat-step-btn,
  .ps-resource-btn,
  .ps-class-resource-step,
  .ps-condition-dur-btn
):disabled,
#mp-sheet-overlay-root :is(
  .ps-rest-stepper-btn,
  .ps-lu-asi-btn
):disabled {
  opacity: 0.45;
}

.mp-sheet-header .ps-sheet-header-foot {
  width: 100%;
  align-self: stretch;
}

.mp-status-strip {
  width: 100%;
  margin-top: 0.35rem;
}

.mp-hp-bar {
  position: relative;
  overflow: hidden;
  width: 100%;
  min-height: 2.2rem;
  border-radius: 999px;
  border: 1px solid rgba(148, 163, 184, 0.18);
  background: rgba(255, 255, 255, 0.08);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.05);
  touch-action: none;
}

.mp-hp-bar--arming {
  box-shadow: 0 0 0 2px rgba(245, 158, 11, 0.45);
}

.mp-hp-bar--armed {
  box-shadow: 0 0 0 2px rgba(34, 197, 94, 0.55);
}

.mp-hp-bar--armed .mp-hp-bar-fill {
  transition: none;
}

.mp-hp-bar-fill {
  position: absolute;
  inset: 0 auto 0 0;
  border-radius: inherit;
  transition: width 200ms ease, background 200ms ease;
}

.mp-hp-bar-label {
  position: relative;
  z-index: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 2.2rem;
  color: rgba(255, 248, 240, 0.98);
  font-size: 0.98rem;
  font-weight: 900;
  text-shadow: 0 1px 4px rgba(0, 0, 0, 0.72);
  white-space: nowrap;
}

.mp-hp-bar--zero {
  background: rgba(69, 10, 10, 0.72);
  border-color: rgba(239, 68, 68, 0.55);
  min-height: 2.5rem;
}

.mp-hp-bar--zero .mp-hp-bar-fill {
  width: 0 !important;
  min-width: 0;
  opacity: 0;
}

.mp-hp-bar--zero .mp-hp-bar-label {
  color: #fff;
  font-size: 1.05rem;
  font-weight: 900;
  letter-spacing: 0.02em;
  text-shadow:
    0 1px 6px rgba(0, 0, 0, 0.95),
    0 0 10px rgba(0, 0, 0, 0.65);
}

.mp-hp-dock-wrap--zero .mp-hp-control-row {
  filter: none;
}

.mp-death-save-strip {
  margin-bottom: 0;
  flex-shrink: 0;
}

.mp-death-save-strip--with-rest {
  display: flex;
  flex-direction: column;
  gap: 0.55rem;
}

.mp-death-save-strip--with-rest .mp-sheet-rest-row--with-death-saves {
  display: flex;
  justify-content: center;
  flex-wrap: wrap;
  gap: 0.45rem;
  width: 100%;
}

.mp-death-save-track {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 0.55rem;
  width: 100%;
}

.mp-death-save-half {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.45rem;
  padding: 0.65rem 0.45rem;
  border-radius: 14px;
  border: 1px solid rgba(148, 163, 184, 0.18);
  background: rgba(15, 23, 42, 0.72);
}

.mp-death-save-half--failures {
  border-color: rgba(239, 68, 68, 0.28);
  background: rgba(69, 10, 10, 0.22);
}

.mp-death-save-half--successes {
  border-color: rgba(34, 197, 94, 0.28);
  background: rgba(20, 83, 45, 0.18);
}

.mp-death-save-heading {
  font-size: 0.72rem;
  font-weight: 800;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: rgba(226, 232, 240, 0.92);
}

.mp-death-save-pips {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.55rem;
  width: 100%;
}

.mp-death-save-strip .ps-death-save-pip {
  width: 2.35rem;
  height: 2.35rem;
  min-width: 2.35rem;
  min-height: 2.35rem;
  border-width: 2px;
}

.mp-death-save-strip .ps-death-save-pip--failures.is-filled {
  border-color: rgba(239, 68, 68, 0.95);
  background: radial-gradient(circle at 35% 30%, #fca5a5, #dc2626 68%, #7f1d1d);
  box-shadow: 0 0 14px rgba(239, 68, 68, 0.55);
}

.mp-death-save-strip .ps-death-save-pip--successes.is-filled {
  border-color: rgba(34, 197, 94, 0.95);
  background: radial-gradient(circle at 35% 30%, #86efac, #16a34a 68%, #14532d);
  box-shadow: 0 0 14px rgba(34, 197, 94, 0.5);
}

.mp-status-banner {
  width: 100%;
  margin-top: 0.35rem;
}

.mp-status-banner .ps-death-banner-pane {
  --mp-death-banner-h: clamp(118px, 30vw, 156px);
  min-height: var(--mp-death-banner-h);
  width: 100%;
  border-radius: 18px;
  overflow: hidden;
  background-size: cover;
  background-position: left center;
  background-repeat: no-repeat;
  box-shadow:
    0 0 0 1px rgba(255, 255, 255, 0.04) inset,
    0 10px 28px rgba(0, 0, 0, 0.48);
}

.mp-status-banner .ps-death-banner-pane--damage {
  border-color: rgba(140, 70, 70, 0.34);
  background:
    linear-gradient(90deg, rgba(8, 8, 12, 0.12), rgba(8, 8, 12, 0.58)),
    url("/mobile-static/src/tools/characters/assets/ps-status-banner-death-damage.png?v=1") center / cover no-repeat,
    linear-gradient(168deg, #161014 0%, #120d10 42%, #09080b 100%);
}

.mp-status-banner .ps-death-banner-pane--exhaustion {
  border-color: rgba(168, 146, 92, 0.3);
  background:
    linear-gradient(90deg, rgba(10, 10, 10, 0.14), rgba(10, 10, 10, 0.56)),
    url("/mobile-static/src/tools/characters/assets/ps-status-banner-death-exhaustion.png?v=1") center / cover no-repeat,
    linear-gradient(168deg, #171412 0%, #110f0d 42%, #090807 100%);
}

.mp-status-banner .ps-death-banner-pane--unconscious {
  border-color: rgba(var(--accent-secondary-rgb, 139, 92, 246), 0.26);
  background:
    linear-gradient(90deg, rgba(6, 6, 10, 0.1), rgba(6, 6, 10, 0.54)),
    url("/mobile-static/src/tools/characters/assets/ps-status-banner-unconscious.png?v=1") center / cover no-repeat,
    linear-gradient(135deg, #14121d 0%, #13121b 38%, #0c0b12 100%);
}

.mp-status-banner .ps-death-banner-pane--stabilized {
  border-color: rgba(34, 197, 94, 0.28);
  background:
    linear-gradient(90deg, rgba(6, 10, 8, 0.1), rgba(6, 10, 8, 0.52)),
    url("/mobile-static/src/tools/characters/assets/ps-status-banner-stabilized.png?v=1") center / cover no-repeat,
    linear-gradient(135deg, #101814 0%, #0f1512 38%, #0a0d0b 100%);
}

.mp-status-banner .ps-death-banner {
  min-height: var(--mp-death-banner-h);
  display: flex;
  align-items: center;
  padding: 0.75rem 0.85rem;
}

.mp-status-banner .ps-death-banner-scrim {
  position: absolute;
  inset: 0;
  background: linear-gradient(90deg, rgba(8, 8, 12, 0.08) 0%, rgba(8, 8, 12, 0.72) 52%, rgba(8, 8, 12, 0.88) 100%);
  pointer-events: none;
}

.mp-status-banner .ps-death-banner {
  position: relative;
}

.mp-status-banner .ps-death-banner-body {
  position: relative;
  z-index: 1;
  max-width: min(100%, 18rem);
  margin-left: auto;
  padding-left: 0;
  text-align: left;
}

.mp-status-banner .ps-death-banner-eyebrow {
  font-size: 0.58rem;
  letter-spacing: 0.14em;
}

.mp-status-banner .ps-death-banner-title {
  font-size: clamp(1.05rem, 4.6vw, 1.45rem);
  line-height: 1.05;
}

.mp-status-banner .ps-death-banner-text {
  margin-top: 0.25rem;
  font-size: 0.72rem;
  line-height: 1.35;
  display: -webkit-box;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 3;
  overflow: hidden;
}

.mp-sheet-overlay-root .ps-lu-body {
  padding: 0.15rem 0 0.85rem;
}

.mp-lu-asi-block {
  display: grid;
  gap: 0.65rem;
}

.mp-lu-asi-grid {
  display: grid;
  gap: 0.5rem;
}

.mp-lu-asi-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.75rem;
  padding: 0.65rem 0.75rem;
  border-radius: 12px;
  border: 1px solid rgba(148, 163, 184, 0.14);
  background: rgba(255, 255, 255, 0.04);
}

.mp-lu-asi-row-meta {
  display: grid;
  gap: 0.15rem;
  min-width: 0;
  flex: 1 1 auto;
  pointer-events: none;
}

.mp-lu-asi-row-meta .ps-lu-asi-label {
  font-size: 0.82rem;
  font-weight: 800;
  letter-spacing: 0.08em;
  color: rgba(248, 250, 252, 0.94);
}

.mp-lu-asi-row-meta .ps-lu-asi-score {
  font-size: 0.76rem;
  color: rgba(148, 163, 184, 0.92);
}

.mp-sheet-overlay-root .ps-lu-asi-controls {
  position: relative;
  z-index: 2;
  flex: 0 0 auto;
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  touch-action: manipulation;
}

.mp-sheet-overlay-root .ps-lu-asi-btn {
  position: relative;
  z-index: 3;
  min-width: 44px;
  min-height: 44px;
  touch-action: manipulation;
}

.mp-status-strip .ps-death-save-track {
  width: 100%;
}

.mp-status-strip .ps-sheet-exhaustion-alert {
  width: 100%;
}

.mp-sheet-section {
  padding: 0;
  overflow: hidden;
}

.mp-sheet-section-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.75rem;
  padding: 0.9rem 1rem 0.7rem;
  border-bottom: 1px solid rgba(148, 163, 184, 0.12);
}

.mp-sheet-section-subtitle {
  color: rgba(148, 163, 184, 0.82);
  font-size: 0.72rem;
}

.mp-sheet-section-body {
  padding: 0.95rem 1rem 1rem;
}

.mp-ability-grid-mobile.ps-ability-grid {
  grid-template-columns: repeat(3, minmax(0, 1fr));
  margin-bottom: 0;
}

.mp-read-grid,
.mp-resource-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 0.7rem;
}

.mp-read-card,
.mp-resource-card {
  border: 1px solid rgba(148, 163, 184, 0.14);
  border-radius: 14px;
  background: rgba(255, 255, 255, 0.04);
  padding: 0.8rem 0.85rem;
}

.mp-read-card strong,
.mp-resource-card strong {
  display: block;
  font-size: 1rem;
}

.mp-read-card span,
.mp-resource-card span {
  display: block;
  margin-top: 0.18rem;
  color: rgba(148, 163, 184, 0.9);
  font-size: 0.76rem;
  line-height: 1.35;
}

.mp-read-card small {
  display: block;
  margin-top: 0.3rem;
  color: rgba(148, 163, 184, 0.76);
  font-size: 0.72rem;
}

.mp-resource-amount {
  margin-bottom: 0.35rem;
  color: rgba(var(--ps-class-rgb, 99, 102, 241), 1);
  font-size: 1.15rem;
  font-weight: 900;
}

.mp-score-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 0.65rem;
}

.mp-score-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.7rem;
  border: 1px solid rgba(148, 163, 184, 0.14);
  border-radius: 14px;
  background: rgba(255, 255, 255, 0.04);
  padding: 0.75rem 0.8rem;
}

.mp-score-row strong {
  display: block;
  font-size: 0.9rem;
}

.mp-score-row span {
  display: block;
  margin-top: 0.18rem;
  color: rgba(148, 163, 184, 0.88);
  font-size: 0.73rem;
}

.mp-score-row b {
  color: rgba(var(--ps-class-rgb, 99, 102, 241), 1);
  font-size: 1rem;
}

.mp-score-row.is-proficient {
  border-color: rgba(var(--ps-class-rgb, 99, 102, 241), 0.28);
  background: rgba(var(--ps-class-rgb, 99, 102, 241), 0.08);
}

.mp-chip-wrap,
.mp-sheet-story {
  display: flex;
  flex-direction: column;
  gap: 0.7rem;
}

.mp-list-item--sheet {
  padding: 0.9rem;
  border-radius: 14px;
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid rgba(148, 163, 184, 0.14);
}

.mp-reading-block {
  white-space: pre-wrap;
  color: rgba(226, 232, 240, 0.88);
  line-height: 1.55;
}

.mp-page-nav {
  margin-top: 0;
  margin-bottom: 0.45rem;
  padding: 0.22rem;
  border-radius: 14px;
  border: 1px solid rgba(var(--ps-class-rgb, 99, 102, 241), 0.22);
  background:
    radial-gradient(circle at top, rgba(var(--ps-class-rgb, 99, 102, 241), 0.14), transparent 58%),
    linear-gradient(180deg, rgba(8, 13, 26, 0.98), rgba(15, 23, 42, 0.94));
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.04), 0 10px 24px rgba(0, 0, 0, 0.22);
}

.mp-sheet-shell > .mp-page-nav {
  margin-top: 0;
}

.mp-nav-toggle {
  appearance: none;
  border: 1px solid rgba(148, 163, 184, 0.16);
  border-radius: 11px;
  background: rgba(255, 255, 255, 0.04);
  color: #fff;
  font: inherit;
  font-size: 0.72rem;
  font-weight: 800;
  padding: 0.38rem 0.5rem;
}

.mp-page-nav .ps-page-tabs {
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 0.22rem;
}

.mp-page-nav--inner .ps-page-tabs,
.mp-page-tabs-inner {
  grid-template-columns: repeat(3, minmax(0, 1fr));
}

.mp-page-nav:not(.mp-page-nav--inner) .ps-page-tabs {
  grid-template-columns: repeat(4, minmax(0, 1fr));
}

.mp-dashboard-layout,
.mp-bio-mobile {
  display: grid;
  grid-template-columns: 1fr;
  gap: 0.9rem;
}

.mp-dashboard-stats-row {
  display: grid;
  grid-template-columns: 1fr;
  gap: 0.9rem;
}

.mp-dashboard-saves-row {
  width: 100%;
}

.mp-sheet-shell #sec-saves .ps-stat-list {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 0.4rem;
}

.mp-sheet-shell #sec-saves .ps-stat-row {
  width: 100%;
}

.mp-sheet-shell .ps-page-tab {
  width: 100%;
  min-height: 0;
  padding: 0.42rem 0.35rem;
  border-radius: 11px;
  border-color: rgba(var(--ps-class-rgb, 99, 102, 241), 0.18);
  background: linear-gradient(180deg, rgba(15, 23, 42, 0.9), rgba(2, 6, 23, 0.86));
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.04);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
}

.mp-sheet-shell .ps-page-tab:hover {
  border-color: rgba(var(--ps-class-rgb, 99, 102, 241), 0.34);
  color: rgba(var(--ps-font-rgb), 0.94);
}

.mp-sheet-shell .ps-page-tab.is-active {
  border-color: rgba(var(--ps-class-rgb, 99, 102, 241), 0.58);
  background:
    radial-gradient(circle at top, rgba(var(--ps-class-rgb, 99, 102, 241), 0.22), transparent 56%),
    linear-gradient(145deg, rgba(var(--ps-class-rgb, 99, 102, 241), 0.22), rgba(15, 23, 42, 0.92));
  box-shadow: 0 0 0 1px rgba(var(--ps-class-rgb, 99, 102, 241), 0.1), 0 12px 24px rgba(0, 0, 0, 0.2);
}

.mp-sheet-shell .ps-page-tab-label {
  font-size: 0.72rem;
  line-height: 1.05;
  color: rgba(255, 255, 255, 0.98);
  width: 100%;
  text-align: center;
}

.mp-sheet-shell .ps-page-tab-sub {
  display: none;
}

.mp-abilities-row-shell {
  overflow: visible;
  padding-bottom: 0;
}

.mp-abilities-row {
  display: grid !important;
  grid-template-columns: repeat(3, minmax(0, 1fr)) !important;
  min-width: 0;
  gap: 0.35rem;
}

.mp-abilities-row .ps-ability {
  min-height: 96px;
  padding: 0.48rem 0.22rem 0.55rem;
  display: flex;
  flex-direction: column;
  align-items: stretch;
  gap: 0.2rem;
  min-width: 0;
}

.mp-abilities-row .ps-ability .ps-ability-label {
  width: 100%;
  font-size: 0.54rem;
  text-align: center;
}

.mp-abilities-row .ps-ability .ps-ability-mod {
  font-size: 1.15rem;
  text-align: center;
}

.mp-abilities-row .ps-ability-stepper {
  display: grid;
  grid-template-columns: 26px minmax(0, 1fr) 26px;
  align-items: center;
  justify-items: center;
  gap: 0;
  width: 100%;
  max-width: 100%;
  margin-top: auto;
  padding: 4px;
  border-radius: 14px;
  box-sizing: border-box;
}

.mp-abilities-row .ps-ability-stepper .ps-stat-step-btn {
  width: 26px;
  height: 26px;
  min-width: 26px;
  min-height: 26px;
  font-size: 0.88rem;
}

.mp-abilities-row .ps-ability-stepper .ps-ability-score {
  width: 100%;
  min-width: 0;
  max-width: none;
  padding: 2px 0;
  font-size: 0.78rem;
  font-weight: 800;
  text-align: center;
}

.mp-sheet-shell .ps-resource-pips {
  display: grid;
  grid-template-columns: 34px auto auto auto 34px;
  align-items: center;
  gap: 0.25rem;
}

.mp-sheet-shell .ps-condition-duration-track {
  display: grid;
  grid-template-columns: 34px minmax(2.75rem, 0.85fr) minmax(7rem, 1.35fr) 34px;
  align-items: center;
  gap: 0.25rem;
}

.mp-sheet-shell .ps-condition-dur-unit {
  min-width: 0;
  width: 100%;
  padding-left: 0.45rem;
  padding-right: 1.35rem;
  font-size: 0.78rem;
}

.mp-stat-step-btn-readonly {
  opacity: 1;
  pointer-events: none;
  cursor: default;
}

.mp-ability-score-readonly {
  pointer-events: none;
}

.mp-sheet-shell .ps-sheet-page {
  margin-top: 0.15rem;
}

.mp-exhaustion-section .mp-sheet-section-body {
  display: grid;
  gap: 0.75rem;
}

.mp-exhaustion-badge {
  padding: 0.3rem 0.75rem;
  border-radius: 999px;
  border: 1px solid rgba(28, 124, 112, 0.38);
  background: rgba(20, 83, 71, 0.22);
  color: rgba(241, 245, 249, 0.94);
  font-size: 0.72rem;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.08em;
}

.mp-exhaustion-track {
  display: grid;
  grid-template-columns: repeat(6, minmax(0, 1fr));
  gap: 0.45rem;
  width: 100%;
}

.mp-exhaustion-clear-row {
  display: flex;
  justify-content: center;
  margin-top: 0.35rem;
}

.mp-exhaustion-effect-lines {
  margin: 0.55rem 0 0;
  padding: 0;
  list-style: none;
  display: grid;
  gap: 0.28rem;
}

.mp-exhaustion-effect-lines li {
  font-size: 0.72rem;
  line-height: 1.35;
  color: rgba(226, 232, 240, 0.86);
}

.mp-exhaustion-effect-lines li.is-current {
  color: rgba(255, 251, 235, 0.96);
  font-weight: 700;
}

.mp-exhaustion-effect-lines .mp-exhaustion-stack-level {
  display: inline-block;
  min-width: 2rem;
  margin-right: 0.35rem;
  color: rgba(245, 158, 11, 0.92);
  font-weight: 800;
}

.mp-exhaustion-actions {
  display: none;
}

.mp-exhaustion-step {
  align-items: center;
  justify-content: center;
  min-height: 2.4rem;
  border-radius: 12px;
  border: 1px solid rgba(148, 163, 184, 0.2);
  background: rgba(15, 23, 42, 0.72);
  color: rgba(248, 250, 252, 0.92);
  font-weight: 800;
  appearance: none;
  cursor: pointer;
}

.mp-exhaustion-step.is-filled {
  border-color: rgba(245, 158, 11, 0.55);
  background: linear-gradient(180deg, rgba(245, 158, 11, 0.32), rgba(180, 83, 9, 0.22));
  color: #fffbeb;
}

.mp-exhaustion-step.is-active {
  border-color: rgba(251, 191, 36, 0.95);
  background: linear-gradient(180deg, rgba(251, 191, 36, 0.52), rgba(217, 119, 6, 0.42));
  color: #fff;
  box-shadow:
    0 0 0 2px rgba(251, 191, 36, 0.45),
    0 0 18px rgba(245, 158, 11, 0.38);
  transform: scale(1.08);
  z-index: 1;
}

.mp-combat-page {
  display: grid;
  gap: 0.85rem;
}

.mp-combat-page .mp-page-nav--inner {
  position: sticky;
  top: var(--mp-combat-nav-top, 3.15rem);
  z-index: 28;
  margin: -0.15rem 0 0;
  padding: 0.2rem 0 0.35rem;
  background: linear-gradient(180deg, rgba(15, 23, 42, 0.98) 72%, rgba(15, 23, 42, 0));
}

.mp-combat-panel-body {
  display: grid;
  gap: 0.85rem;
  min-width: 0;
}

.mp-spells-tab-stack {
  display: grid;
  gap: 0.85rem;
  min-width: 0;
}

.mp-spell-slots-card {
  margin: 0;
}

.mp-spell-slots-card .ps-spell-slots-head {
  flex-direction: column;
  align-items: stretch;
  gap: 0.55rem;
  margin-bottom: 0.65rem;
}

.mp-spell-slots-card .ps-spell-casting-meta {
  width: 100%;
  justify-content: center;
  box-sizing: border-box;
}

.mp-spell-slots-card .mp-spell-slot-grid,
.mp-spell-slots-card .ps-slot-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 0.65rem;
}

.mp-spell-slots-card .ps-spell-custom-tracks {
  margin-top: 0.85rem;
  padding-top: 0.75rem;
  border-top: 1px solid rgba(255, 255, 255, 0.08);
}

.mp-spell-slots-card .ps-spell-pip-roll-setup {
  margin: 0.35rem 0 0.5rem;
  text-align: left;
}

.mp-spell-slots-card .ps-spell-custom-meta {
  text-align: left;
  font-size: 0.72rem;
}

.mp-mock-btn.is-disabled,
.mp-mock-btn:disabled {
  opacity: 0.45;
  cursor: not-allowed;
}

.mp-spell-compendium-picker {
  display: grid;
  gap: 0.5rem;
}

.mp-spell-compendium-picker .mp-spell-picker-toolbar {
  display: grid;
  gap: 0.5rem;
}

.mp-spell-picker-school-wrap {
  display: grid;
  gap: 0.25rem;
}

.mp-spell-picker-school-wrap .ps-spell-picker-school-label {
  font-size: 0.68rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: rgba(148, 163, 184, 0.92);
}

.mp-spell-picker-school {
  width: 100%;
  min-height: 2.35rem;
  font-size: 0.84rem;
}

.mp-spell-any-level-toggle {
  display: inline-flex;
  align-items: center;
  gap: 0.45rem;
  padding: 0.45rem 0.65rem;
  border-radius: 999px;
  border: 1px solid rgba(148, 163, 184, 0.22);
  background: rgba(15, 23, 42, 0.55);
  color: rgba(226, 232, 240, 0.9);
  font-size: 0.76rem;
  font-weight: 700;
  width: fit-content;
}

.mp-spell-prepare-btn {
  min-width: 4.75rem;
}

.mp-spell-pick {
  width: 100%;
  min-height: 2.5rem;
  font-size: 0.88rem;
}

.mp-spell-picker-hint {
  margin: 0;
  font-size: 0.72rem;
  line-height: 1.35;
}

.mp-spell-picker-actions {
  display: grid;
  gap: 0.45rem;
  width: 100%;
}

.mp-spell-add-btn {
  width: 100%;
  min-height: 2.35rem;
}

.mp-spells-list-card .mp-sheet-section-body {
  display: grid;
  gap: 0.75rem;
}

.mp-combat-page .ps-spell-row {
  position: relative;
  min-width: 0;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: stretch;
  gap: 0.45rem;
  padding: 0.55rem 0.6rem;
  padding-top: 0.65rem;
}

.mp-combat-page .ps-spell-row-main {
  position: relative;
  min-width: 0;
  display: grid;
  gap: 0.22rem;
  padding-right: 0.15rem;
}

.mp-combat-page .ps-spell-prepared-marker {
  position: absolute;
  top: 0;
  right: 0;
  width: 0.42rem;
  height: 0.42rem;
  padding: 0;
  border-radius: 999px;
  border: 1px solid rgba(100, 116, 139, 0.45);
  background: transparent;
  box-shadow: none;
  pointer-events: auto;
  z-index: 1;
  appearance: none;
  cursor: pointer;
}

.mp-combat-page .ps-spell-prepared-marker.is-active {
  border-color: rgba(167, 139, 250, 0.75);
  background: #a78bfa;
  box-shadow: 0 0 0 2px rgba(124, 58, 237, 0.22);
}

.mp-combat-page span.ps-spell-prepared-marker {
  pointer-events: none;
}

.mp-combat-page .mp-spell-name-link,
.mp-combat-page .ps-spell-name-link.mp-spell-name-link {
  appearance: none;
  display: block;
  width: 100%;
  min-width: 0;
  padding: 0;
  border: 0;
  background: transparent;
  color: rgba(248, 250, 252, 0.96);
  font: inherit;
  font-size: 0.88rem;
  font-weight: 800;
  line-height: 1.25;
  text-align: left;
  white-space: normal;
  overflow: visible;
  overflow-wrap: anywhere;
  word-break: break-word;
  padding-right: 0.55rem;
  cursor: pointer;
}

.mp-combat-page .mp-spell-name-link.mp-spell-name--pressing {
  color: #e9d5ff;
}

.mp-combat-page .ps-spell-row-meta-levels {
  display: flex;
  align-items: center;
  flex-wrap: nowrap;
  gap: 0.22rem;
  min-width: 0;
  overflow-x: auto;
  scrollbar-width: none;
}

.mp-combat-page .ps-spell-lvl-badge {
  font-size: 0.88rem;
  font-weight: 800;
  line-height: 1.25;
  letter-spacing: 0.02em;
  padding: 0.08rem 0.35rem;
  text-transform: none;
}

.mp-combat-page .ps-spell-row-meta-levels::-webkit-scrollbar {
  display: none;
}

.mp-combat-page .ps-spell-row-meta-details {
  display: flex;
  align-items: center;
  flex-wrap: nowrap;
  gap: 0.28rem;
  min-width: 0;
  font-size: 0.68rem;
  line-height: 1.2;
  color: rgba(148, 163, 184, 0.92);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.mp-combat-page .ps-spell-meta-sep {
  color: rgba(100, 116, 139, 0.88);
  flex-shrink: 0;
}

.mp-combat-page .ps-spell-row-meta-details .ps-spell-school-pill {
  flex-shrink: 1;
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
}

.mp-combat-page .ps-spell-cast-time {
  white-space: nowrap;
  flex-shrink: 0;
}

.mp-combat-page .ps-spell-row-main strong,
.mp-combat-page .ps-spell-name-link {
  overflow-wrap: anywhere;
  font-size: 0.88rem;
}

.mp-combat-page .ps-spell-row-actions {
  display: flex;
  flex-direction: column;
  align-items: stretch;
  gap: 0.28rem;
  justify-content: center;
  min-width: 4.6rem;
}

.mp-combat-page .ps-spell-remove-btn--text {
  width: auto;
  min-height: 1.75rem;
  height: auto;
  padding: 0.2rem 0.45rem;
  font-size: 0.62rem;
  font-weight: 700;
  letter-spacing: 0.02em;
  color: rgba(148, 163, 184, 0.92);
}

.mp-combat-page .ps-spell-cast-btn {
  min-height: 2.05rem;
  padding: 0.28rem 0.62rem;
  font-size: 0.7rem;
}

.mp-combat-page .ps-spell-cast-btn--end {
  border-color: rgba(248, 113, 113, 0.45);
  background: rgba(127, 29, 29, 0.35);
  color: #fecaca;
}

.mp-combat-page .ps-spell-row.is-concentrating-active {
  border: 1px solid rgba(167, 139, 250, 0.55);
  box-shadow:
    0 0 0 1px rgba(124, 58, 237, 0.25),
    0 0 16px rgba(124, 58, 237, 0.18);
  background: rgba(91, 33, 182, 0.12);
}

.mp-combat-page .ps-spell-row.is-concentrating-active[data-school="abjuration"] {
  border-color: rgba(var(--school-abjuration), 0.55);
  box-shadow: 0 0 0 1px rgba(var(--school-abjuration), 0.25), 0 0 14px rgba(var(--school-abjuration), 0.2);
  background: rgba(var(--school-abjuration), 0.1);
}

.mp-combat-page .ps-spell-row.is-concentrating-active[data-school="conjuration"] {
  border-color: rgba(var(--school-conjuration), 0.55);
  box-shadow: 0 0 0 1px rgba(var(--school-conjuration), 0.25), 0 0 14px rgba(var(--school-conjuration), 0.2);
  background: rgba(var(--school-conjuration), 0.1);
}

.mp-combat-page .ps-spell-row.is-concentrating-active[data-school="divination"] {
  border-color: rgba(var(--school-divination), 0.55);
  box-shadow: 0 0 0 1px rgba(var(--school-divination), 0.25), 0 0 14px rgba(var(--school-divination), 0.2);
  background: rgba(var(--school-divination), 0.1);
}

.mp-combat-page .ps-spell-row.is-concentrating-active[data-school="enchantment"] {
  border-color: rgba(var(--school-enchantment), 0.55);
  box-shadow: 0 0 0 1px rgba(var(--school-enchantment), 0.25), 0 0 14px rgba(var(--school-enchantment), 0.2);
  background: rgba(var(--school-enchantment), 0.1);
}

.mp-combat-page .ps-spell-row.is-concentrating-active[data-school="evocation"] {
  border-color: rgba(var(--school-evocation), 0.55);
  box-shadow: 0 0 0 1px rgba(var(--school-evocation), 0.25), 0 0 14px rgba(var(--school-evocation), 0.2);
  background: rgba(var(--school-evocation), 0.1);
}

.mp-combat-page .ps-spell-row.is-concentrating-active[data-school="illusion"] {
  border-color: rgba(var(--school-illusion), 0.55);
  box-shadow: 0 0 0 1px rgba(var(--school-illusion), 0.25), 0 0 14px rgba(var(--school-illusion), 0.2);
  background: rgba(var(--school-illusion), 0.1);
}

.mp-combat-page .ps-spell-row.is-concentrating-active[data-school="necromancy"] {
  border-color: rgba(var(--school-necromancy), 0.55);
  box-shadow: 0 0 0 1px rgba(var(--school-necromancy), 0.25), 0 0 14px rgba(var(--school-necromancy), 0.2);
  background: rgba(var(--school-necromancy), 0.1);
}

.mp-combat-page .ps-spell-row.is-concentrating-active[data-school="transmutation"] {
  border-color: rgba(var(--school-transmutation), 0.55);
  box-shadow: 0 0 0 1px rgba(var(--school-transmutation), 0.25), 0 0 14px rgba(var(--school-transmutation), 0.2);
  background: rgba(var(--school-transmutation), 0.1);
}

.ps-spell-active-conc-badge {
  display: inline-flex;
  align-items: center;
  padding: 0.08rem 0.38rem;
  border-radius: 999px;
  border: 1px solid rgba(167, 139, 250, 0.55);
  background: rgba(124, 58, 237, 0.22);
  color: #ddd6fe;
  font-size: 0.56rem;
  font-weight: 800;
  letter-spacing: 0.05em;
  text-transform: uppercase;
}

.mp-combat-page .ps-spell-prepare-btn {
  min-height: 1.9rem;
  padding: 0.22rem 0.5rem;
  font-size: 0.62rem;
}

.mp-combat-page .ps-spell-row.is-prepared {
  border-color: rgba(167, 139, 250, 0.28);
}

.mp-concentration-tracker {
  margin: 0;
}

.mp-sheet-overlay-root .ps-spell-cast-popover {
  width: min(24rem, 92vw);
  max-height: min(80vh, 34rem);
  overflow: auto;
}

.mp-sheet-overlay-root .ps-spell-cast-options {
  display: grid;
  gap: 0.45rem;
}

.mp-sheet-overlay-root .ps-spell-cast-option {
  width: 100%;
  text-align: left;
}

.mp-sheet-overlay-root .ps-spell-conc-popover .ps-spell-conc-warning {
  margin: 0 0 0.65rem;
  font-size: 0.88rem;
  line-height: 1.45;
  color: rgba(226, 232, 240, 0.92);
}

.mp-sheet-overlay-root .ps-spell-conc-options {
  display: grid;
  gap: 0.45rem;
  margin: 0.65rem 0;
}

.mp-sheet-overlay-root .ps-spell-conc-option {
  appearance: none;
  width: 100%;
  display: grid;
  gap: 0.2rem;
  padding: 0.65rem 0.75rem;
  border-radius: 12px;
  border: 1px solid rgba(148, 163, 184, 0.2);
  background: rgba(15, 23, 42, 0.72);
  color: inherit;
  text-align: left;
  cursor: pointer;
}

.mp-sheet-overlay-root .ps-spell-conc-option-title {
  font-size: 0.68rem;
  font-weight: 800;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: rgba(148, 163, 184, 0.9);
}

.mp-sheet-overlay-root .ps-spell-conc-option-spell {
  font-size: 0.92rem;
  font-weight: 700;
  color: rgba(248, 250, 252, 0.96);
}

.mp-sheet-overlay-root .ps-spell-conc-switch {
  border-color: rgba(var(--accent-primary-rgb), 0.4);
  background: rgba(var(--accent-primary-rgb), 0.12);
}

.mp-sheet-overlay-root .mp-spell-detail-popover {
  width: min(24rem, 94vw);
  max-height: min(86vh, 36rem);
  overflow: auto;
  display: flex;
  flex-direction: column;
}

.mp-sheet-overlay-root .mp-spell-detail-popover .ps-spell-detail-content {
  flex: 1 1 auto;
  min-height: 0;
  overflow: auto;
  padding: 0.65rem 0.85rem;
}

.mp-sheet-overlay-root .mp-spell-detail-popover .ps-spell-detail-popover-foot {
  flex-shrink: 0;
  padding: 0.55rem 0.85rem 0.75rem;
}

.mp-combat-page .mp-sheet-section {
  margin: 0;
}

.mp-combat-page .ps-weapon-box {
  border-radius: 12px;
}

.mp-combat-page .ps-weapon-box-bar {
  align-items: center;
}

.mp-combat-page .ps-weapon-box-actions {
  margin-left: auto;
}

.mp-combat-page .ps-weapon-attack-btn {
  min-height: 2rem;
  padding: 0.35rem 0.95rem;
  font-size: 0.72rem;
}

.mp-combat-page .ps-weapon-attack-btn:disabled {
  opacity: 0.45;
  cursor: not-allowed;
}

.mp-combat-page .ps-weapon-box.is-ammo-blocked {
  border-color: rgba(248, 113, 113, 0.28);
}

.mp-combat-page .ps-weapon-box-actions {
  display: inline-flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 0.35rem;
}

.mp-combat-page .mp-weapon-ammo-block {
  flex: 0 0 auto;
}

.mp-inv-card--no-ammo {
  border-color: rgba(248, 113, 113, 0.32);
}

.mp-inv-card--no-ammo .mp-inv-card-main strong {
  color: #fca5a5;
}

.mp-inv-card-main strong .mp-weapon-ammo-block {
  margin-left: 0.35rem;
  vertical-align: middle;
}

.mp-structured-features {
  display: grid;
  gap: 0.65rem;
}

.mp-combat-custom-features {
  margin-top: 0.85rem;
}

.mp-sheet-shell .ps-avatar-picker-toolbar {
  justify-content: flex-end;
}

.mp-status-banners-below-hp {
  display: flex;
  flex-direction: row;
  flex-wrap: wrap;
  align-items: flex-start;
  gap: 0.35rem;
}

.mp-status-banners-below-hp .ps-status-chip-name {
  font-size: clamp(0.72rem, 3.2vw, 0.88rem);
}

.mp-status-banners-below-hp .ps-status-chip--has-art .ps-status-chip-inner {
  padding-left: clamp(42px, 11vw, 50px);
}

.mp-condition-add-custom {
  margin-top: 0.65rem;
}

.mp-condition-custom-fields {
  display: grid;
  gap: 0.55rem;
}

.mp-combat-add-btn {
  margin-top: 0.35rem;
}

.mp-attack-result-banner {
  top: auto;
  bottom: calc(5.5rem + env(safe-area-inset-bottom, 0px));
  pointer-events: none;
}

.mp-exhaustion-active-banner {
  display: flex;
  align-items: flex-start;
  gap: 0.75rem;
  padding: 0.9rem 1rem;
  border-radius: 16px;
  border: 2px solid rgba(245, 158, 11, 0.72);
  background: linear-gradient(135deg, rgba(180, 83, 9, 0.42), rgba(15, 23, 42, 0.94));
  box-shadow:
    0 0 0 1px rgba(245, 158, 11, 0.18) inset,
    0 10px 28px rgba(245, 158, 11, 0.18);
  animation: mp-exhaustion-banner-pulse 2.2s ease-in-out infinite;
}

@keyframes mp-exhaustion-banner-pulse {
  0%, 100% { border-color: rgba(245, 158, 11, 0.72); box-shadow: 0 0 0 1px rgba(245, 158, 11, 0.18) inset, 0 10px 28px rgba(245, 158, 11, 0.18); }
  50% { border-color: rgba(252, 211, 77, 0.95); box-shadow: 0 0 0 1px rgba(252, 211, 77, 0.24) inset, 0 12px 32px rgba(245, 158, 11, 0.28); }
}

.mp-exhaustion-active-banner.is-lethal {
  border-color: rgba(248, 113, 113, 0.82);
  background: linear-gradient(135deg, rgba(127, 29, 29, 0.58), rgba(15, 23, 42, 0.96));
  animation: mp-exhaustion-banner-pulse-lethal 1.6s ease-in-out infinite;
}

@keyframes mp-exhaustion-banner-pulse-lethal {
  0%, 100% { border-color: rgba(248, 113, 113, 0.82); }
  50% { border-color: rgba(252, 165, 165, 1); }
}

.mp-exhaustion-active-banner-badge {
  flex: 0 0 auto;
  width: 2rem;
  height: 2rem;
  display: grid;
  place-items: center;
  border-radius: 999px;
  background: rgba(245, 158, 11, 0.28);
  color: rgba(255, 251, 235, 0.98);
  font-weight: 900;
  font-size: 1.05rem;
  box-shadow: 0 0 0 1px rgba(245, 158, 11, 0.35) inset;
}

.mp-exhaustion-active-banner.is-lethal .mp-exhaustion-active-banner-badge {
  background: rgba(239, 68, 68, 0.32);
  color: rgba(254, 242, 242, 0.98);
  box-shadow: 0 0 0 1px rgba(248, 113, 113, 0.4) inset;
}

.mp-exhaustion-active-banner-body {
  min-width: 0;
  display: grid;
  gap: 0.35rem;
}

.mp-exhaustion-active-banner-label {
  display: block;
  font-size: 0.68rem;
  font-weight: 800;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: rgba(254, 243, 199, 0.92);
}

.mp-exhaustion-active-banner-title {
  display: block;
  font-size: 0.98rem;
  font-weight: 800;
  color: rgba(255, 251, 235, 0.98);
  line-height: 1.25;
}

.mp-exhaustion-active-banner.is-lethal .mp-exhaustion-active-banner-label {
  color: rgba(254, 202, 202, 0.94);
}

.mp-exhaustion-active-banner.is-lethal .mp-exhaustion-active-banner-title {
  color: rgba(254, 242, 242, 0.98);
}

.mp-exhaustion-active-banner-list {
  margin: 0;
  padding: 0;
  list-style: none;
  display: grid;
  gap: 0.28rem;
}

.mp-exhaustion-active-banner-list li {
  position: relative;
  padding-left: 0.85rem;
  color: rgba(248, 250, 252, 0.96);
  font-size: 0.86rem;
  line-height: 1.4;
  font-weight: 600;
}

.mp-exhaustion-active-banner-list li::before {
  content: '•';
  position: absolute;
  left: 0;
  color: rgba(251, 191, 36, 0.95);
}

.mp-exhaustion-active-banner.is-lethal .mp-exhaustion-active-banner-list li::before {
  color: rgba(248, 113, 113, 0.95);
}

.mp-exhaustion-active-banner-warning {
  font-size: 0.8rem;
  font-weight: 800;
  color: rgba(252, 211, 77, 0.98);
}

.mp-exhaustion-active-banner.is-lethal .mp-exhaustion-active-banner-warning {
  color: rgba(254, 202, 202, 0.98);
}

.mp-gm-edit-notice {
  position: fixed;
  inset: 0;
  z-index: 13200;
  display: flex;
  align-items: flex-end;
  justify-content: center;
  padding: 1rem 1rem calc(1rem + env(safe-area-inset-bottom, 0px));
}

.mp-gm-edit-notice.hidden {
  display: none !important;
}

.mp-gm-edit-notice-backdrop {
  position: absolute;
  inset: 0;
  /* Solid dim only — do not use .ps-rest-backdrop (playersheet.css blurs the sheet). */
  background: rgba(2, 6, 23, 0.55);
  backdrop-filter: none;
  -webkit-backdrop-filter: none;
}

.mp-gm-edit-notice-panel {
  position: relative;
  z-index: 1;
  width: min(100%, 420px);
  padding: 1.15rem 1.15rem 1.2rem;
  border-radius: 18px 18px 14px 14px;
  border: 2px solid rgba(251, 191, 36, 0.85);
  background: linear-gradient(180deg, rgba(120, 53, 15, 0.96), rgba(15, 23, 42, 0.98));
  box-shadow: 0 -12px 48px rgba(251, 191, 36, 0.22), 0 -8px 40px rgba(0, 0, 0, 0.45);
}

.mp-gm-edit-notice-head {
  display: flex;
  align-items: center;
  gap: 0.55rem;
  margin-bottom: 0.55rem;
}

.mp-gm-edit-notice-icon {
  font-size: 1.1rem;
}

.mp-gm-edit-notice-title {
  margin: 0;
  font-size: 1.08rem;
  color: rgba(255, 251, 235, 0.98);
}

.mp-gm-edit-notice-body {
  margin: 0 0 0.85rem;
  color: rgba(254, 243, 199, 0.88);
  font-size: 0.84rem;
  line-height: 1.45;
}

.mp-gm-edit-notice-dismiss {
  width: 100%;
  appearance: none;
  border: 0;
  border-radius: 12px;
  padding: 0.72rem 1rem;
  font: inherit;
  font-weight: 700;
  cursor: pointer;
  color: #111827;
  background: linear-gradient(180deg, #fbbf24, #f59e0b);
}

.mp-combat-list,
.mp-combat-spell-list {
  display: grid;
  gap: 0.45rem;
}

.mp-combat-row,
.mp-combat-spell-card {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.8rem;
  padding: 0.8rem 0.9rem;
  border-radius: 14px;
  border: 1px solid rgba(148, 163, 184, 0.16);
  background: rgba(255, 255, 255, 0.03);
}

.mp-combat-row-main,
.mp-combat-spell-card {
  min-width: 0;
}

.mp-combat-row-main strong,
.mp-combat-spell-card strong {
  display: block;
}

.mp-combat-row-main span,
.mp-combat-spell-card span {
  display: block;
  margin-top: 0.18rem;
  color: rgba(148, 163, 184, 0.84);
  font-size: 0.72rem;
  line-height: 1.35;
}

.mp-combat-row-action {
  flex: 0 0 auto;
  padding: 0.35rem 0.75rem;
  border-radius: 999px;
  border: 1px solid rgba(28, 124, 112, 0.38);
  background: rgba(20, 83, 71, 0.18);
  color: rgba(248, 250, 252, 0.94);
  font-size: 0.72rem;
  font-weight: 800;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}

.mp-class-summary {
  display: grid;
  gap: 0.15rem;
  margin-bottom: 0.75rem;
  padding: 0.75rem 0.85rem;
  border-radius: 14px;
  border: 1px solid rgba(28, 124, 112, 0.26);
  background: linear-gradient(145deg, rgba(10, 48, 53, 0.22), rgba(15, 23, 42, 0.6));
}

.mp-class-summary strong {
  font-size: 1rem;
}

.mp-class-summary span,
.mp-class-summary small {
  color: rgba(148, 163, 184, 0.84);
}

.mp-feature-panel {
  display: grid;
  gap: 0.65rem;
}

.mp-feature-list {
  margin: 0;
  padding-left: 1rem;
  display: grid;
  gap: 0.4rem;
  color: rgba(226, 232, 240, 0.92);
}

.mp-carry-card .mp-sheet-section-body {
  padding-top: 0.8rem;
}

.mp-carry-status {
  color: rgba(148, 163, 184, 0.9);
  font-size: 0.72rem;
  font-weight: 800;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.mp-carry-meter {
  position: relative;
  overflow: hidden;
  width: 100%;
  min-height: 2.1rem;
  border-radius: 999px;
  border: 1px solid rgba(148, 163, 184, 0.18);
  background: rgba(255, 255, 255, 0.08);
}

.mp-carry-meter-fill {
  position: absolute;
  inset: 0 auto 0 0;
  border-radius: inherit;
  transition: width 200ms ease, background 200ms ease;
}

.mp-carry-meter span {
  position: relative;
  z-index: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 2.1rem;
  font-weight: 800;
}

.mp-tag-group + .mp-tag-group {
  margin-top: 0.9rem;
}

.mp-tag-group h4 {
  margin: 0 0 0.45rem;
  color: rgba(20, 184, 166, 0.92);
  font-size: 0.78rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.mp-tag-list {
  display: flex;
  flex-wrap: wrap;
  gap: 0.45rem;
}

.mp-tag {
  display: inline-flex;
  align-items: center;
  min-height: 2rem;
  padding: 0 0.75rem;
  border-radius: 999px;
  border: 1px solid rgba(148, 163, 184, 0.22);
  background: rgba(15, 23, 42, 0.82);
  color: rgba(248, 250, 252, 0.92);
  font-size: 0.76rem;
  font-weight: 700;
}

.mp-reading-block--large {
  min-height: 9rem;
}

.mp-ability-score-readonly {
  display: inline-flex;
  align-items: center;
  justify-content: center;
}

.mp-identity-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 0.7rem;
}

.mp-bio-page {
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
  padding-bottom: 1.25rem;
}

.mp-bio-identity-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 0.65rem;
}

.mp-bio-text-stack {
  display: grid;
  gap: 0.75rem;
}

.mp-bio-tag-board {
  display: grid;
  gap: 0.85rem;
}

.mp-bio-tag-board .mp-tag-group h4 {
  color: rgba(var(--ps-class-rgb, 99, 102, 241), 0.88);
}

.mp-bio-field {
  display: flex;
  flex-direction: column;
  gap: 0.35rem;
  min-width: 0;
}

.mp-bio-field-label {
  font-size: 0.68rem;
  font-weight: 800;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: rgba(148, 163, 184, 0.92);
}

.mp-bio-page .ps-bio-input,
.mp-bio-page .ps-bio-textarea,
.mp-bio-page .ps-bio-select,
.mp-bio-page .mp-bio-textarea,
.mp-bio-page .mp-sheet-textarea {
  width: 100%;
  padding: 0.65rem 0.75rem !important;
  border-radius: 12px !important;
  border: 1px solid rgba(148, 163, 184, 0.18) !important;
  background: rgba(255, 255, 255, 0.04) !important;
  color: rgba(248, 250, 252, 0.94) !important;
  font-size: 0.88rem;
  line-height: 1.45;
  resize: vertical;
}

.mp-bio-page .ps-bio-input:focus,
.mp-bio-page .ps-bio-textarea:focus,
.mp-bio-page .ps-bio-select:focus,
.mp-bio-page .mp-bio-textarea:focus,
.mp-bio-page .mp-sheet-textarea:focus {
  outline: none;
  border-color: rgba(var(--ps-class-rgb, 99, 102, 241), 0.42) !important;
  background: rgba(var(--ps-class-rgb, 99, 102, 241), 0.08) !important;
}

.mp-bio-textarea--story {
  min-height: 9rem;
}

.mp-change-log {
  position: relative;
  margin-top: 0.75rem;
  margin-bottom: 0.75rem;
  border: 1px solid rgba(148, 163, 184, 0.16);
  border-radius: 16px;
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.04), rgba(15, 23, 42, 0.72));
  overflow: hidden;
}

.mp-change-log-panel {
  display: none;
  border-top: 1px solid rgba(148, 163, 184, 0.12);
  padding: 0.65rem 0.75rem 0.8rem;
}

.mp-change-log.is-open .mp-change-log-panel {
  display: block;
}

.mp-change-log-toggle {
  width: 100%;
  display: flex;
  align-items: center;
  gap: 0.45rem;
  padding: 0.9rem 1rem;
  border: 0;
  background: transparent;
  color: rgba(248, 250, 252, 0.94);
  font: inherit;
  font-size: 0.88rem;
  font-weight: 700;
  text-align: left;
  appearance: none;
  cursor: pointer;
}

.mp-change-log-title {
  flex: 1 1 auto;
}

.mp-change-log-count {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 1.35rem;
  min-height: 1.35rem;
  padding: 0 0.35rem;
  border-radius: 999px;
  background: rgba(var(--ps-class-rgb, 99, 102, 241), 0.2);
  color: rgba(248, 250, 252, 0.92);
  font-size: 0.68rem;
  font-weight: 800;
  font-variant-numeric: tabular-nums;
}

.mp-change-log-chevron {
  color: rgba(148, 163, 184, 0.88);
  font-size: 0.82rem;
}

.mp-change-log-list {
  list-style: none;
  margin: 0;
  padding: 0;
  max-height: calc(4 * 3.25rem);
  overflow-y: auto;
  display: grid;
  gap: 0.45rem;
  -webkit-overflow-scrolling: touch;
}

.mp-change-log-entry {
  display: grid;
  grid-template-columns: 4.75rem minmax(0, 1fr);
  gap: 0.55rem;
  align-items: start;
  padding: 0.55rem 0.65rem;
  border-radius: 10px;
  background: rgba(15, 23, 42, 0.55);
  border: 1px solid rgba(148, 163, 184, 0.1);
  font-size: 0.78rem;
  line-height: 1.35;
}

.mp-change-log-entry--gm {
  border-color: rgba(125, 211, 252, 0.28);
  background: rgba(8, 47, 73, 0.42);
}

.mp-change-log-entry-body {
  display: flex;
  align-items: flex-start;
  gap: 0.4rem;
  min-width: 0;
}

.mp-change-log-gm-badge {
  flex: 0 0 auto;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 1.5rem;
  padding: 0.1rem 0.35rem;
  border-radius: 999px;
  background: rgba(125, 211, 252, 0.18);
  border: 1px solid rgba(125, 211, 252, 0.35);
  color: #bae6fd;
  font-size: 0.62rem;
  font-weight: 800;
  letter-spacing: 0.04em;
  line-height: 1.2;
}

.mp-change-log-entry time {
  font-size: 0.66rem;
  font-weight: 700;
  color: rgba(148, 163, 184, 0.88);
  font-variant-numeric: tabular-nums;
  line-height: 1.3;
}

.mp-change-log-msg {
  color: rgba(226, 232, 240, 0.92);
  word-break: break-word;
}

.mp-change-log-empty {
  padding: 0.75rem 0.5rem;
  text-align: center;
  color: rgba(148, 163, 184, 0.82);
  font-size: 0.78rem;
  font-style: italic;
}

.mp-resource-max-readonly,
.mp-coin-value,
.mp-attack-hit,
.mp-attack-damage,
.mp-attack-range {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 32px;
  padding: 0 0.55rem;
  border-radius: 8px;
  border: 1px solid rgba(148, 163, 184, 0.14);
  background: rgba(2, 6, 23, 0.55);
  color: #fff;
  font-size: 0.82rem;
  font-weight: 700;
}

.mp-coin-input {
  text-align: center;
}

.mp-stat-prof-btn {
  appearance: none;
  border: 0;
  background: transparent;
  padding: 0;
}

.mp-stat-row-toggle {
  cursor: pointer;
  -webkit-tap-highlight-color: transparent;
  touch-action: pan-y;
  user-select: none;
  min-height: 44px;
  align-items: center;
}

.mp-stat-row-toggle:active {
  background: rgba(var(--ps-class-rgb, 99, 102, 241), 0.12);
}

.mp-stat-row-toggle .mp-stat-row-body {
  /* Match .ps-stat-announce — children participate in the row grid. */
  display: contents;
  pointer-events: none;
}

.mp-sheet-shell .ps-stat-row.mp-stat-row-toggle .ps-stat-bonus,
.mp-sheet-shell .ps-stat-row.mp-stat-row-toggle .ps-stat-name,
.mp-sheet-shell .ps-stat-row.mp-stat-row-toggle .ps-stat-ability {
  pointer-events: none;
}

.mp-stat-prof-display {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 28px;
  height: 28px;
  min-width: 28px;
  min-height: 28px;
  padding: 0;
  position: relative;
  z-index: 1;
  pointer-events: none;
  appearance: none;
  border: 0;
  background: transparent;
}

.mp-sheet-shell .ps-stat-prof.mp-stat-prof-display,
.mp-sheet-shell button.ps-stat-prof[data-mobile-save-prof],
.mp-sheet-shell button.ps-stat-prof[data-mobile-skill-prof] {
  pointer-events: none;
}

.mp-sheet-shell .ps-stat-prof .mp-stat-prof-mark,
.mp-sheet-shell .ps-stat-prof .ps-stat-prof-dot {
  pointer-events: none;
}

.mp-sheet-shell .ps-slot-pip,
.mp-sheet-shell .ps-slot-orb,
.mp-sheet-shell .ps-resource-pip,
.mp-sheet-shell .ps-death-save-pip,
.mp-sheet-shell button.ps-resource-btn,
.mp-sheet-shell button.ps-class-resource-step,
.mp-sheet-shell button.mp-exhaustion-step,
.mp-sheet-shell button.ps-stat-announce,
.mp-sheet-shell button[data-custom-spell-pip-toggle],
.mp-sheet-shell button[data-spell-pip-roll],
.mp-sheet-shell button[data-spell-pip-confirm] {
  pointer-events: auto !important;
  touch-action: manipulation;
  cursor: pointer;
}

.mp-sheet-shell .ps-slot-orb,
.mp-sheet-shell .ps-slot-pip,
.mp-sheet-shell .ps-resource-pip {
  min-width: 28px;
  min-height: 28px;
}

.mp-stat-prof-display:disabled {
  pointer-events: none !important;
  opacity: 0.55;
  cursor: default;
}

.mp-stat-prof-mark {
  display: block;
  width: 18px;
  height: 18px;
  border-radius: 50%;
  border: 2px solid rgba(148, 163, 184, 0.45);
  background: rgba(2, 6, 23, 0.55);
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.04);
  pointer-events: none;
}

.mp-stat-prof-mark.is-prof {
  border-color: rgba(var(--ps-class-rgb, 99, 102, 241), 1);
  background: rgba(var(--ps-class-rgb, 99, 102, 241), 0.95);
  box-shadow: 0 0 0 2px rgba(var(--ps-class-rgb, 99, 102, 241), 0.22), 0 0 10px rgba(var(--ps-class-rgb, 99, 102, 241), 0.45);
}

.mp-stat-prof-mark.is-expert {
  border-radius: 4px;
  transform: rotate(45deg) scale(1.05);
  border-color: rgba(255, 255, 255, 0.88);
  background: linear-gradient(135deg, rgba(var(--ps-class-rgb, 99, 102, 241), 1), rgba(99, 102, 241, 0.92));
  box-shadow:
    0 0 0 2px rgba(var(--ps-class-rgb, 99, 102, 241), 0.34),
    0 0 12px rgba(var(--ps-class-rgb, 99, 102, 241), 0.72);
}

.mp-sheet-shell .ps-stat-row.is-prof {
  background: rgba(var(--ps-class-rgb, 99, 102, 241), 0.08);
}

.mp-sheet-shell .ps-skill-row.is-expert {
  background: linear-gradient(90deg, rgba(var(--ps-class-rgb, 99, 102, 241), 0.14), transparent 52%);
  box-shadow: inset 3px 0 0 rgba(var(--ps-class-rgb, 99, 102, 241), 0.82);
}

.mp-sheet-shell .ps-stat-row.mp-stat-exhaustion {
  outline: 2px solid rgba(245, 158, 11, 0.38);
  outline-offset: -2px;
}

.mp-sheet-shell .ps-stat-row.mp-stat-exhaustion--1 { outline-color: rgba(245, 158, 11, 0.32); }
.mp-sheet-shell .ps-stat-row.mp-stat-exhaustion--2 { outline-color: rgba(245, 158, 11, 0.42); }
.mp-sheet-shell .ps-stat-row.mp-stat-exhaustion--3 { outline-color: rgba(249, 115, 22, 0.48); }
.mp-sheet-shell .ps-stat-row.mp-stat-exhaustion--4 { outline-color: rgba(234, 88, 12, 0.55); }
.mp-sheet-shell .ps-stat-row.mp-stat-exhaustion--5 { outline-color: rgba(220, 38, 38, 0.62); }
.mp-sheet-shell .ps-stat-row.mp-stat-exhaustion--6 { outline-color: rgba(185, 28, 28, 0.72); }

.mp-exhaustion-summary {
  margin-bottom: 0.65rem;
  padding: 0.65rem 0.75rem;
  border-radius: 12px;
  border: 1px solid rgba(245, 158, 11, 0.32);
  background: rgba(69, 26, 3, 0.18);
}

.mp-exhaustion-summary-title {
  margin: 0 0 0.35rem;
  font-size: 0.78rem;
  font-weight: 800;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: rgba(254, 243, 199, 0.95);
}

.mp-exhaustion-stack-list {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  gap: 0.28rem;
}

.mp-exhaustion-stack-line {
  display: grid;
  grid-template-columns: auto 1fr;
  gap: 0.45rem;
  align-items: baseline;
  font-size: 0.72rem;
  color: rgba(226, 232, 240, 0.82);
}

.mp-exhaustion-stack-line.is-current {
  color: rgba(255, 251, 235, 0.96);
  font-weight: 700;
}

.mp-exhaustion-stack-level {
  font-weight: 800;
  color: rgba(251, 191, 36, 0.92);
  font-size: 0.66rem;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}

.mp-inventory-hint {
  margin: 0 0 0.55rem;
  color: rgba(148, 163, 184, 0.88);
  font-size: 0.72rem;
  line-height: 1.35;
  text-align: center;
}

.mp-inv-qty-readonly {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 1.6rem;
  font-weight: 800;
  font-variant-numeric: tabular-nums;
}

.mp-inv-card--pressing {
  transform: scale(0.985);
  border-color: rgba(var(--ps-class-rgb, 99, 102, 241), 0.45);
}

.mp-inv-card--nested {
  touch-action: pan-y;
}

.mp-inv-context-menu {
  z-index: 12050;
}

.mp-inv-action-sheet {
  position: fixed;
  inset: 0;
  z-index: 12100;
  display: flex;
  align-items: flex-end;
  justify-content: center;
}

.mp-inv-action-backdrop {
  position: absolute;
  inset: 0;
  background: rgba(2, 6, 23, 0.62);
}

.mp-inv-action-panel {
  position: relative;
  z-index: 1;
  width: min(100%, 420px);
  margin: 0.75rem;
  border-radius: 18px;
  border: 1px solid rgba(148, 163, 184, 0.22);
  background: linear-gradient(180deg, rgba(30, 41, 59, 0.98), rgba(15, 23, 42, 0.98));
  box-shadow: 0 18px 48px rgba(2, 6, 23, 0.55);
  overflow: hidden;
}

.mp-inv-action-head {
  display: grid;
  gap: 0.2rem;
  padding: 1rem 1.1rem 0.65rem;
  border-bottom: 1px solid rgba(148, 163, 184, 0.14);
  text-align: center;
}

.mp-inv-action-head strong {
  font-size: 1rem;
  color: rgba(248, 250, 252, 0.96);
}

.mp-inv-action-head span {
  font-size: 0.78rem;
  color: rgba(148, 163, 184, 0.92);
}

.mp-inv-action-list {
  display: grid;
  gap: 0.35rem;
  padding: 0.65rem;
}

.mp-inv-action-btn {
  width: 100%;
  min-height: 3rem;
  padding: 0.75rem 1rem;
  border-radius: 12px;
  border: 1px solid rgba(148, 163, 184, 0.18);
  background: rgba(255, 255, 255, 0.04);
  color: rgba(248, 250, 252, 0.94);
  font-size: 0.92rem;
  font-weight: 700;
  text-align: center;
  appearance: none;
}

.mp-inv-action-btn:active:not(:disabled) {
  transform: scale(0.985);
  background: rgba(var(--ps-class-rgb, 99, 102, 241), 0.16);
}

.mp-inv-action-btn--danger {
  color: rgba(252, 165, 165, 0.96);
  border-color: rgba(248, 113, 113, 0.28);
}

.mp-inv-action-cancel {
  width: calc(100% - 1.3rem);
  min-height: 2.85rem;
  margin: 0 0.65rem 0.65rem;
  border-radius: 12px;
  border: 1px solid rgba(148, 163, 184, 0.16);
  background: rgba(15, 23, 42, 0.82);
  color: rgba(226, 232, 240, 0.9);
  font-size: 0.88rem;
  font-weight: 700;
  appearance: none;
}

.mp-inv-action-btn:disabled,
.mp-inv-action-btn.is-disabled {
  opacity: 0.42;
  cursor: not-allowed;
}

.mp-inv-container-option {
  display: grid;
  gap: 0.2rem;
  justify-items: center;
}

.mp-inv-container-option-name {
  font-size: 0.92rem;
  font-weight: 700;
  color: rgba(248, 250, 252, 0.94);
}

.mp-inv-container-option-meta {
  font-size: 0.74rem;
  font-weight: 600;
  color: rgba(148, 163, 184, 0.92);
}

.mp-inv-action-qty {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.55rem;
  padding: 0.55rem 0.85rem 0.15rem;
  border-bottom: 1px solid rgba(148, 163, 184, 0.1);
}

.mp-inv-action-qty-label,
.mp-inv-action-qty-max {
  font-size: 0.78rem;
  font-weight: 700;
  color: rgba(148, 163, 184, 0.92);
}

.mp-inv-action-qty .mp-inv-qty-stepper {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
}

.mp-sheet-shell .ps-coins-grid {
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr)) !important;
  gap: 0.45rem;
}

.mp-sheet-shell .ps-attunement-slots {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 0.5rem;
}

.mp-sheet-shell .ps-attune-slot {
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 2.35rem;
  padding: 0.45rem 0.55rem;
  text-align: center;
  line-height: 1.25;
  word-break: break-word;
}

.mp-sheet-shell .ps-coin-field {
  display: flex;
  flex-direction: column;
  gap: 0.25rem;
}

.mp-sheet-shell .ps-coin-field label {
  text-align: center;
  font-size: 0.68rem;
}

.mp-attack-list {
  display: grid;
  gap: 0.35rem;
}

.mp-attack-list--edit .ps-weapon-box {
  width: 100%;
}

.mp-sheet-textarea {
  min-height: 0;
}

.mp-sheet-shell .ps-resource-row,
.mp-sheet-shell .ps-condition-add-row {
  gap: 0.45rem;
}

.mp-sheet-shell .ps-resource-row .ps-resource-max,
.mp-sheet-shell .ps-resource-row .ps-resource-name,
.mp-sheet-shell .ps-condition-dur-input,
.mp-sheet-shell .ps-bio-select {
  min-width: 0;
}

.mp-sheet-shell .ps-condition-add-row {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
}

.mp-sheet-shell .ps-condition-add-btn {
  min-width: 3.5rem;
  padding: 0 0.85rem;
}

.mp-spell-slot-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 0.65rem;
}

.mp-spell-picker {
  margin-bottom: 0.8rem;
}

.mp-sheet-shell .ps-attack-head,
.mp-sheet-shell .ps-attack-row {
  grid-template-columns: minmax(0, 1.2fr) 68px minmax(0, 1fr) 64px;
}

.mp-inventory-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 0.6rem;
  justify-items: center;
}

.mp-compendium-dock {
  display: flex;
  flex-direction: column;
  gap: 0.55rem;
  min-height: 0;
  flex: 1 1 auto;
}

.mp-inventory-dock-slot {
  position: sticky;
  z-index: 35;
  top: var(--mp-inventory-dock-top, 3.1rem);
  margin-bottom: 0.45rem;
}

.mp-sheet-shell.mp-nav-expanded {
  --mp-inventory-dock-top: 5.35rem;
  --mp-combat-nav-top: 5.35rem;
}

.mp-sheet-shell.mp-nav-collapsed {
  --mp-inventory-dock-top: 3.15rem;
  --mp-combat-nav-top: 3.15rem;
}

.mp-inventory-dock {
  border-color: rgba(var(--ps-class-rgb, 99, 102, 241), 0.28);
  background: rgba(8, 13, 26, 0.97);
  box-shadow: 0 8px 18px rgba(0, 0, 0, 0.24);
  padding: 0.5rem 0.55rem;
  display: grid;
  gap: 0.45rem;
}

.mp-inventory-dock.is-picker-open {
  max-height: calc(100dvh - var(--mp-inventory-dock-top, 3.1rem) - 0.75rem);
  overflow: hidden;
  display: flex;
  flex-direction: column;
  min-height: 0;
}

.mp-inventory-dock.is-picker-open .mp-inv-category-dock,
.mp-inventory-dock.is-picker-open .mp-inventory-dock-bar {
  flex: 0 0 auto;
}

.mp-inv-category-dock {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 0.28rem;
  width: 100%;
}

.mp-inv-category-dock .mp-inv-subtab,
.mp-inv-category-dock .ps-inv-subtab {
  display: flex;
  align-items: center;
  justify-content: center;
  min-width: 0;
  width: 100%;
  padding: 0.38rem 0.2rem;
  border: 1px solid rgba(148, 163, 184, 0.18);
  border-radius: 10px;
  background: rgba(255, 255, 255, 0.04);
  color: rgba(226, 232, 240, 0.88);
  font: inherit;
  font-size: 0.68rem;
  font-weight: 700;
  line-height: 1.1;
  letter-spacing: 0.01em;
  text-align: center;
  white-space: nowrap;
  appearance: none;
  cursor: pointer;
}

.mp-inv-category-dock .mp-inv-subtab span,
.mp-inv-category-dock .ps-inv-subtab span {
  display: block;
  overflow: hidden;
  text-overflow: ellipsis;
}

.mp-inv-category-dock .mp-inv-subtab small,
.mp-inv-category-dock .ps-inv-subtab small {
  display: none;
}

.mp-inv-category-dock .mp-inv-subtab.is-active,
.mp-inv-category-dock .ps-inv-subtab.is-active {
  border-color: rgba(var(--ps-class-rgb, 99, 102, 241), 0.55);
  background: rgba(var(--ps-class-rgb, 99, 102, 241), 0.18);
  color: rgba(248, 250, 252, 0.98);
  box-shadow: inset 0 0 0 1px rgba(var(--ps-class-rgb, 99, 102, 241), 0.2);
}

.mp-inventory-dock-bar {
  display: flex;
  width: 100%;
}

.mp-inventory-dock-bar .mp-mock-btn--add {
  width: 100%;
  justify-content: center;
  min-height: 2.15rem;
  padding: 0.45rem 0.75rem;
  font-size: 0.82rem;
}

.mp-inventory-dock .mp-compendium-dock {
  margin-top: 0.15rem;
}

.mp-compendium-toolbar {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  gap: 0.45rem;
  flex: 0 0 auto;
}

.mp-compendium-filters {
  display: grid;
  gap: 0.35rem;
  flex: 0 0 auto;
}

.mp-compendium-filters-toggle {
  display: flex;
  align-items: center;
  justify-content: space-between;
  width: 100%;
  min-height: 2rem;
  padding: 0.35rem 0.55rem;
  border: 1px solid rgba(148, 163, 184, 0.22);
  border-radius: 10px;
  background: rgba(255, 255, 255, 0.04);
  color: rgba(226, 232, 240, 0.92);
  font: inherit;
  font-size: 0.78rem;
  font-weight: 700;
  cursor: pointer;
}

.mp-compendium-filters-toggle:hover,
.mp-compendium-filters-toggle:focus-visible {
  border-color: rgba(var(--ps-class-rgb, 99, 102, 241), 0.45);
  background: rgba(var(--ps-class-rgb, 99, 102, 241), 0.12);
}

.mp-compendium-filters-chevron {
  color: rgba(148, 163, 184, 0.9);
  font-size: 0.75rem;
}

.mp-compendium-filters-panel {
  display: grid;
  gap: 0.45rem;
  padding: 0.45rem 0.5rem;
  border: 1px solid rgba(148, 163, 184, 0.16);
  border-radius: 10px;
  background: rgba(8, 10, 16, 0.55);
}

.mp-compendium-filters-panel[hidden] {
  display: none;
}

.mp-compendium-filter-field {
  display: grid;
  gap: 0.25rem;
}

.mp-compendium-filter-label {
  font-size: 0.68rem;
  font-weight: 700;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: rgba(148, 163, 184, 0.9);
}

.mp-compendium-list {
  display: flex;
  flex-direction: column;
  gap: 0.4rem;
  min-height: 0;
  flex: 1 1 auto;
}

.mp-compendium-browse {
  display: flex;
  flex-direction: column;
  min-height: 0;
  flex: 1 1 auto;
  overflow: hidden;
}

.mp-compendium-jump {
  display: flex;
  flex-direction: row;
  flex-wrap: nowrap;
  gap: 0.2rem;
  width: 100%;
  max-width: 100%;
  overflow-x: auto;
  overflow-y: hidden;
  overscroll-behavior-x: contain;
  -webkit-overflow-scrolling: touch;
  padding: 0.15rem 0.05rem;
}

.mp-compendium-jump-btn {
  width: 1.7rem;
  min-width: 1.7rem;
  min-height: 1.55rem;
  padding: 0;
  border: 1px solid rgba(148, 163, 184, 0.18);
  border-radius: 7px;
  background: rgba(255, 255, 255, 0.04);
  color: rgba(203, 213, 225, 0.9);
  font: inherit;
  font-size: 0.68rem;
  font-weight: 700;
  line-height: 1;
  cursor: pointer;
  flex: 0 0 auto;
}

.mp-compendium-jump-btn:hover:not(:disabled),
.mp-compendium-jump-btn:focus-visible {
  background: rgba(var(--ps-class-rgb, 99, 102, 241), 0.22);
  border-color: rgba(var(--ps-class-rgb, 99, 102, 241), 0.4);
  color: #fff;
}

.mp-compendium-jump-btn.is-disabled,
.mp-compendium-jump-btn:disabled {
  opacity: 0.28;
  cursor: default;
}

.mp-compendium-rows {
  display: block;
  min-height: 0;
  flex: 1 1 auto;
  overflow-x: hidden;
  overflow-y: auto;
  overscroll-behavior: contain;
  -webkit-overflow-scrolling: touch;
  padding-right: 0.15rem;
}

.mp-compendium-rows > .mp-compendium-letter,
.mp-compendium-rows > .mp-compendium-row {
  display: block;
  width: 100%;
}

.mp-compendium-rows > .mp-compendium-row + .mp-compendium-row,
.mp-compendium-rows > .mp-compendium-letter + .mp-compendium-row,
.mp-compendium-rows > .mp-compendium-row + .mp-compendium-letter {
  margin-top: 0.35rem;
}

.mp-compendium-letter {
  position: sticky;
  top: 0;
  z-index: 1;
  padding: 0.28rem 0.45rem;
  border-radius: 8px;
  background: rgba(15, 23, 42, 0.94);
  color: rgba(148, 163, 184, 0.95);
  font-size: 0.68rem;
  font-weight: 800;
  letter-spacing: 0.08em;
}

.mp-compendium-count {
  margin: 0;
  flex: 0 0 auto;
  font-size: 0.7rem;
  color: rgba(148, 163, 184, 0.82);
}

.mp-compendium-row {
  appearance: none;
  width: 100%;
  border: 1px solid rgba(148, 163, 184, 0.16);
  border-radius: 12px;
  background: rgba(255, 255, 255, 0.04);
  color: inherit;
  padding: 0.65rem 0.75rem;
  text-align: left;
}

.mp-compendium-row.is-selected {
  border-color: rgba(var(--ps-class-rgb, 99, 102, 241), 0.5);
  background: rgba(var(--ps-class-rgb, 99, 102, 241), 0.12);
}

.mp-compendium-row strong,
.mp-compendium-row span {
  display: block;
}

.mp-compendium-row span {
  margin-top: 0.18rem;
  color: rgba(148, 163, 184, 0.84);
  font-size: 0.72rem;
}

.mp-compendium-actions {
  display: flex;
  justify-content: flex-end;
  align-items: center;
  gap: 0.65rem;
  flex-wrap: wrap;
  flex: 0 0 auto;
}

.mp-compendium-actions--split {
  justify-content: space-between;
  align-items: center;
  gap: 0.45rem;
}

.mp-compendium-actions--split .mp-mock-btn--alt {
  flex: 0 0 auto;
}

.mp-compendium-actions--split [data-mobile-compendium-add] {
  flex: 1 1 auto;
  min-width: 0;
}

.mp-mock-btn--add {
  min-width: 7.4rem;
  padding: 0.6rem 0.9rem;
  font-size: 0.82rem;
  font-weight: 800;
}

.mp-inv-card {
  display: grid;
  gap: 0.55rem;
  width: 100%;
  max-width: 260px;
  border: 1px solid rgba(148, 163, 184, 0.16);
  border-radius: 16px;
  background: rgba(255, 255, 255, 0.04);
  padding: 0.8rem;
  justify-items: center;
  text-align: center;
  -webkit-touch-callout: none;
  touch-action: manipulation;
}

.mp-inv-card-body {
  display: grid;
  gap: 0.45rem;
  width: 100%;
  justify-items: center;
  -webkit-user-select: none;
  user-select: none;
  touch-action: manipulation;
}

.mp-inv-card--pressing .mp-inv-card-body {
  outline: 2px solid rgba(var(--ps-class-rgb, 99, 102, 241), 0.45);
  outline-offset: 2px;
  border-radius: 12px;
}

.mp-inv-card--container {
  border-color: rgba(var(--ps-class-rgb, 99, 102, 241), 0.42);
  background: linear-gradient(180deg, rgba(var(--ps-class-rgb, 99, 102, 241), 0.12), rgba(15, 23, 42, 0.72));
  box-shadow: inset 0 0 0 1px rgba(var(--ps-class-rgb, 99, 102, 241), 0.08);
}

.mp-inv-card-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  width: 100%;
  gap: 0.35rem;
}

.mp-inv-card-tag {
  display: inline-flex;
  align-items: center;
  padding: 0.12rem 0.45rem;
  border-radius: 999px;
  border: 1px solid rgba(var(--ps-class-rgb, 99, 102, 241), 0.35);
  background: rgba(var(--ps-class-rgb, 99, 102, 241), 0.16);
  color: rgba(226, 232, 240, 0.94);
  font-size: 0.62rem;
  font-weight: 800;
  letter-spacing: 0.05em;
  text-transform: uppercase;
}

.mp-inv-collapse-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 1.65rem;
  min-height: 1.65rem;
  border-radius: 8px;
  border: 1px solid rgba(148, 163, 184, 0.24);
  background: rgba(15, 23, 42, 0.72);
  color: rgba(248, 250, 252, 0.92);
  font-size: 0.82rem;
  line-height: 1;
  appearance: none;
  cursor: pointer;
}

.mp-inv-card-children {
  display: grid;
  gap: 0.45rem;
  width: 100%;
  margin-top: 0.15rem;
  padding-top: 0.45rem;
  border-top: 1px dashed rgba(148, 163, 184, 0.18);
}

.mp-inv-card--nested {
  max-width: none;
  padding: 0.65rem;
  background: rgba(15, 23, 42, 0.5);
}

.mp-inv-card-main {
  min-width: 0;
}

.mp-inv-card-main strong,
.mp-inv-card-main span {
  display: block;
}

.mp-inv-card-main span {
  margin-top: 0.2rem;
  color: rgba(148, 163, 184, 0.86);
  font-size: 0.72rem;
  line-height: 1.35;
}

.mp-inv-card--depleted {
  border-color: rgba(248, 113, 113, 0.35);
  background: rgba(69, 10, 10, 0.22);
}

.mp-inv-card--depleted .mp-inv-card-main strong {
  color: #fecaca;
}

.mp-list-item--depleted {
  border-color: rgba(248, 113, 113, 0.28);
}

.mp-list-item--depleted strong {
  color: #fecaca;
}

.mp-inv-card-type,
.mp-inv-card-weight {
  color: rgba(148, 163, 184, 0.86);
  font-size: 0.72rem;
  text-align: center;
}

.mp-inv-qty-stepper {
  display: grid;
  grid-template-columns: 34px auto 34px;
  align-items: center;
  justify-content: center;
  gap: 0.35rem;
}

.mp-inv-qty-stepper .ps-resource-count {
  min-width: 1.4rem;
  text-align: center;
  font-weight: 800;
}

.mp-inv-card-actions {
  display: flex;
  justify-content: center;
  flex-wrap: wrap;
  gap: 0.45rem;
}

.mp-inv-card-meta {
  color: rgba(148, 163, 184, 0.84);
  font-size: 0.72rem;
}

.mp-mock-btn--tiny {
  padding: 0.35rem 0.55rem;
  font-size: 0.68rem;
}

.mp-mock-btn--alt {
  border-color: rgba(168, 85, 247, 0.36);
  background: linear-gradient(180deg, rgba(50, 22, 80, 0.94), rgba(27, 12, 48, 0.98));
}

.mp-inventory-list {
  display: grid;
  gap: 0.35rem;
}

.mp-bio-value {
  color: rgba(var(--ps-font-rgb), 0.9);
  font-size: 0.82rem;
  line-height: 1.5;
  white-space: pre-wrap;
}

.mp-stat-grid,
.mp-ability-grid,
.mp-detail-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 0.7rem;
}

.mp-character-stat,
.mp-ability-card,
.mp-detail-card,
.mp-list-item {
  border: 1px solid var(--border-secondary);
  border-radius: 16px;
  background: rgba(255, 255, 255, 0.03);
  padding: 0.8rem 0.85rem;
}

.mp-character-stat strong {
  font-size: 1.1rem;
}

.mp-ability-card strong {
  font-size: 1rem;
}

.mp-section-title {
  margin: 0 0 0.75rem;
  font-size: 1rem;
}

.mp-stack {
  display: flex;
  flex-direction: column;
  gap: 0.65rem;
}

.mp-list-item {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 0.8rem;
}

.mp-list-item-meta {
  text-align: right;
  color: var(--text-secondary);
  font-size: 0.82rem;
  white-space: nowrap;
}

.mp-shellbar-actions {
  display: flex;
  gap: 0.55rem;
  flex-wrap: wrap;
}

.mobile-player-body .mp-shellbar--centered .mp-shellbar-actions {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 0.32rem;
  flex-wrap: nowrap;
}

.mobile-player-body .mp-shellbar-actions .btn-secondary,
.mobile-player-body .mp-shellbar-actions .table-chat-btn,
.mobile-player-body .mp-shellbar-actions .qf-scene-cue-chip {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 0;
  width: 100%;
  padding: 0.38rem 0.25rem;
  font-size: 0.68rem;
  line-height: 1.1;
  text-align: center;
  white-space: nowrap;
  border-radius: var(--radius-sm, 8px);
}

.mobile-player-body .mp-shellbar-actions .qf-scene-cue-chip {
  border-color: rgba(99, 102, 241, 0.5);
  background: rgba(99, 102, 241, 0.2);
  color: rgba(244, 244, 245, 0.98);
}

.mobile-player-body .mp-session-actions .qf-scene-cue-chip {
  border-radius: var(--radius-sm, 8px);
  padding: 0.55rem 0.85rem;
  font-size: inherit;
  min-height: 0;
}

.mobile-player-body .mp-shellbar-actions .table-chat-btn {
  gap: 0.22rem;
}

.mp-shellbar-actions .btn-secondary {
  min-width: 5.4rem;
}

.mobile-player-body .mp-shellbar-actions .btn-secondary {
  min-width: 0;
}

.mp-page-note {
  margin: 0;
  color: var(--text-secondary);
  font-size: 0.84rem;
  line-height: 1.45;
}

.mp-gm-edit-banner {
  display: flex;
  align-items: flex-start;
  gap: 0.65rem;
  margin: 0 0 0.65rem;
  padding: 0.75rem 0.85rem;
  border-radius: 14px;
  border: 2px solid rgba(251, 191, 36, 0.72);
  background: linear-gradient(135deg, rgba(251, 191, 36, 0.28), rgba(180, 83, 9, 0.18));
  color: rgba(255, 251, 235, 0.98);
  font-size: 0.82rem;
  line-height: 1.4;
  box-shadow: 0 0 0 1px rgba(251, 191, 36, 0.2) inset, 0 8px 24px rgba(251, 191, 36, 0.16);
  animation: mp-gm-edit-pulse 2.4s ease-in-out infinite;
}

@keyframes mp-gm-edit-pulse {
  0%, 100% { border-color: rgba(251, 191, 36, 0.72); }
  50% { border-color: rgba(252, 211, 77, 1); }
}

.mp-gm-edit-banner-copy {
  display: grid;
  gap: 0.2rem;
}

.mp-gm-edit-banner-copy strong {
  font-size: 0.9rem;
  letter-spacing: 0.02em;
}

.mp-gm-edit-banner-copy span {
  color: rgba(254, 243, 199, 0.92);
}

.mp-sheet-header .mp-gm-edit-banner {
  margin: 0 0.85rem 0.65rem;
}

.mp-gm-edit-banner-icon {
  flex: 0 0 auto;
  line-height: 1.2;
}

.mp-inline-page-note {
  margin: 0 0 0.2rem;
  padding: 0.7rem 0.85rem;
  border: 1px solid rgba(148, 163, 184, 0.16);
  border-radius: 14px;
  background: rgba(15, 23, 42, 0.72);
  color: rgba(226, 232, 240, 0.9);
  font-size: 0.82rem;
  line-height: 1.35;
}

.mp-banner {
  border: 1px solid rgba(245, 158, 11, 0.32);
  border-radius: 14px;
  background: rgba(245, 158, 11, 0.12);
  padding: 0.8rem 0.9rem;
  color: #fef3c7;
}

.mp-banner.error {
  border-color: rgba(248, 113, 113, 0.4);
  background: rgba(239, 68, 68, 0.12);
  color: #fecaca;
}

@media (max-width: 640px) {
  .mp-shell,
  .mp-page-shell {
    padding-inline: 0.85rem;
  }

  .mp-topbar,
  .mp-shellbar,
  .mp-profile-head,
  .mp-connect-row {
    flex-direction: column;
  }

  .mp-connect-row .field-input,
  .mp-inline-actions .btn-secondary,
  .mp-inline-actions .btn-primary,
  .mp-session-actions .btn-secondary,
  .mp-session-actions .btn-primary,
  .mp-page-actions .btn-secondary,
  .mp-page-actions .btn-primary {
    width: 100%;
  }

  .mp-profile-actions {
    flex-direction: column;
  }

  .mp-sheet-hero-top {
    gap: 0.9rem;
  }

  .mp-sheet-hero-level {
    margin-left: 0;
  }

  .mp-read-grid,
  .mp-resource-grid,
  .mp-score-grid {
    grid-template-columns: 1fr;
  }

  .mp-sheet-header {
    padding: 0.65rem;
  }

  .mp-sheet-header .ps-sheet-hero {
    --ps-hero-banner-h: 72px;
  }

  .mp-sheet-header .ps-sheet-avatar-wrap {
    flex-basis: var(--ps-hero-banner-h);
    width: var(--ps-hero-banner-h);
    height: var(--ps-hero-banner-h);
  }

  .mp-sheet-actions .ps-level-dock,
  .mp-level-dock {
    grid-template-columns: minmax(0, 1fr) auto;
  }

  .mp-sheet-shell .ps-coins-grid {
    grid-template-columns: repeat(5, minmax(0, 1fr)) !important;
  }

  .mp-abilities-row {
    grid-template-columns: repeat(3, minmax(0, 1fr)) !important;
    min-width: 0;
  }

  .mp-sheet-shell .ps-page-tabs {
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 0.22rem;
  }

  .mp-page-nav--inner .ps-page-tabs,
  .mp-page-tabs-inner {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }

  .mp-sheet-shell .ps-page-tab {
    padding: 0.38rem 0.2rem;
    min-height: 0;
  }

  .mp-sheet-shell .ps-page-tab-label {
    font-size: 0.68rem;
  }

  .mp-sheet-shell .ps-coins-grid {
    grid-template-columns: repeat(5, minmax(0, 1fr)) !important;
  }

  .mp-sheet-shell .ps-inv-top,
  .mp-sheet-shell .ps-bio,
  .mp-sheet-shell .ps-bio-grid-3,
  .mp-sheet-shell .ps-bio-grid-2 {
    grid-template-columns: 1fr;
  }

  .mp-compendium-toolbar,
  .mp-inventory-grid {
    grid-template-columns: 1fr;
  }

  .mp-sheet-shell .ps-attack-head,
  .mp-sheet-shell .ps-attack-row {
    grid-template-columns: 1fr;
  }

  .mp-attack-hit,
  .mp-attack-damage,
  .mp-attack-range {
    justify-content: flex-start;
  }

  .mp-ability-grid-mobile.ps-ability-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .mp-stat-grid,
  .mp-ability-grid,
  .mp-detail-grid {
    grid-template-columns: 1fr;
  }

  .mp-list-item {
    flex-direction: column;
  }

  .mp-list-item-meta {
    text-align: left;
    white-space: normal;
  }

}

/* Mobile battle table */
.mobile-player-body .pb-tool-header {
  display: none;
}

.mobile-player-body .pn-tool .tool-header {
  display: none;
}

.mobile-player-body .vm-tool--mobile > .tool-header {
  display: none;
}

.mobile-player-body .mp-page-main--embedded-tool {
  min-width: 0;
  overflow-x: hidden;
}

.mobile-player-body .vm-tool--mobile {
  min-width: 0;
  max-width: 100%;
  overflow-x: hidden;
}

.mobile-player-body .vm-tool--mobile .ps-main,
.mobile-player-body .vm-tool--mobile .ps-view,
.mobile-player-body .vm-tool--mobile .vm-sheet-shell,
.mobile-player-body .vm-tool--mobile .vm-sheet-header,
.mobile-player-body .vm-tool--mobile #sheet-root {
  min-width: 0;
  max-width: 100%;
}

.mobile-player-body .vm-tool--mobile .ps-death-banner-pane--has-art,
.mobile-player-body .vm-tool--mobile .ps-status-banner-pane--has-art {
  background-image:
    linear-gradient(90deg, rgba(8, 8, 12, 0.18), rgba(8, 8, 12, 0.52)),
    var(--ps-status-banner-art),
    linear-gradient(135deg, #1b1215 0%, #181219 38%, #0d0d12 100%);
  background-size: auto, cover, auto;
  background-position: center;
  background-repeat: no-repeat;
}

.mobile-player-body .vm-tool--mobile .ps-death-banner-pane--damage:not(.ps-status-banner-pane--has-art) {
  background:
    linear-gradient(90deg, rgba(8, 8, 12, 0.12), rgba(8, 8, 12, 0.58)),
    url("/mobile-static/src/tools/characters/assets/ps-status-banner-death-damage.png?v=1") center / cover no-repeat,
    linear-gradient(168deg, #161014 0%, #120d10 42%, #09080b 100%);
}

.mobile-player-body .vm-tool--mobile .ps-death-banner-pane--exhaustion:not(.ps-status-banner-pane--has-art) {
  background:
    linear-gradient(90deg, rgba(10, 10, 10, 0.14), rgba(10, 10, 10, 0.56)),
    url("/mobile-static/src/tools/characters/assets/ps-status-banner-death-exhaustion.png?v=1") center / cover no-repeat,
    linear-gradient(168deg, #171412 0%, #110f0d 42%, #090807 100%);
}

.mobile-player-body .mp-page-shell--notes {
  display: flex;
  flex-direction: column;
  min-height: calc(100dvh - 4.5rem);
  --pn-nav-dock-top: 0;
  --pn-nav-dock-height: calc(100dvh - env(safe-area-inset-top, 0px) - env(safe-area-inset-bottom, 0px) - 11.75rem);
}

.mobile-player-body .pn-tool--mobile .pn-main {
  flex: 1 1 auto;
  min-height: 0;
  margin: 0;
  overflow: visible;
}

.mobile-player-body .pn-tool--mobile .pn-mobile-nav-dock {
  top: var(--pn-nav-dock-top, 0);
}

.mobile-player-body .pn-tool--mobile {
  display: flex;
  flex-direction: column;
  flex: 1 1 auto;
  min-height: 0;
  height: auto;
}

.mobile-player-body .pn-mobile-toolbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.65rem;
  margin: 0 0 0.55rem;
}

.mobile-player-body .pn-mobile-toolbar .pn-subtitle {
  margin: 0;
  flex: 1 1 auto;
  min-width: 0;
  font-size: 0.78rem;
}

.mobile-player-body .pn-tool--mobile .pn-textarea {
  min-height: 12rem;
}

.mobile-player-body .pn-nav-drag {
  width: 2.35rem;
  min-height: 2.75rem;
  font-size: 1.05rem;
  color: rgba(255, 255, 255, 0.55);
}

.mobile-player-body #pn-action-sheet,
.mobile-player-body #pn-context-menu {
  z-index: 20050;
}

.mobile-player-body .pn-action-sheet-panel {
  z-index: 1;
}

.mobile-player-body .pb-mobile-init-top {
  margin: 0 0 0.35rem;
  padding: 0.65rem 0.75rem;
}

.mobile-player-body .pb-play-layout {
  display: flex;
  flex-direction: column;
  gap: 0.65rem;
  position: relative;
  z-index: 0;
}

.mobile-player-body .pb-play-left,
.mobile-player-body .pb-play-right {
  position: static;
  width: 100%;
  min-width: 0;
  top: auto;
}

.mobile-player-body .pb-play-left.panel {
  /* Keep character vitals (Rage, etc.) in normal document flow — not sticky over the battlefield. */
  position: static;
  z-index: auto;
}

.mobile-player-body .pb-my-character-slot .pv-party-card--hero {
  padding: 0.75rem;
}

.mobile-player-body .pb-my-actions--mobile {
  margin-top: 0.65rem;
}

.mobile-player-body .pb-my-actions-list--mobile-quick {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0.5rem;
}

.mobile-player-body .pb-my-actions-list--mobile-quick .pb-action-btn {
  min-height: 2.75rem;
  font-size: 0.92rem;
  font-weight: 700;
}

.mobile-player-body .player-initiative-panel--compact .panel-heading {
  font-size: 0.78rem;
  margin-bottom: 0.35rem;
}

.mobile-player-body .player-initiative-band {
  display: flex;
  flex-wrap: nowrap;
  gap: 0.35rem;
  overflow-x: auto;
  padding-bottom: 0.15rem;
  -webkit-overflow-scrolling: touch;
}

.mobile-player-body .pv-init-chip--mobile-names {
  flex: 0 0 auto;
  min-width: 0;
  max-width: 8.5rem;
  padding: 0.4rem 0.55rem;
  border-radius: 999px;
}

.mobile-player-body .pv-init-chip--mobile-names .pv-init-name {
  font-size: 0.72rem;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.mobile-player-body .pv-init-chip--mobile-names.active {
  box-shadow: 0 0 0 2px rgba(96, 165, 250, 0.55);
}

.mobile-player-body .pv-init-chip--mobile-names.mine {
  font-weight: 700;
}

.mobile-player-body .pb-attack-pick-list {
  display: grid;
  gap: 0.4rem;
  max-height: min(52vh, 360px);
  overflow-y: auto;
}

.mobile-player-body .pb-action-pick-row {
  display: grid;
  gap: 0.15rem;
  width: 100%;
  text-align: left;
  padding: 0.65rem 0.75rem;
  border-radius: 12px;
  border: 1px solid rgba(148, 163, 184, 0.18);
  background: rgba(255, 255, 255, 0.04);
  color: inherit;
  font: inherit;
}

.mobile-player-body .pb-action-pick-row:disabled {
  opacity: 0.45;
}

.mobile-player-body .pb-action-pick-name {
  font-weight: 700;
  font-size: 0.88rem;
}

.mobile-player-body .pb-action-pick-detail {
  font-size: 0.74rem;
  color: rgba(148, 163, 184, 0.92);
}

.mobile-player-body .pb-attack-pick-foot {
  display: grid;
  gap: 0.4rem;
}

.mobile-player-body .pb-action-pick-row--generic {
  font-weight: 700;
  text-align: center;
}

.mobile-player-body .player-party-grid--compact {
  display: grid;
  gap: 0.35rem;
}

.mobile-player-body .player-enemy-grid {
  display: grid;
  gap: 0.35rem;
}

.mobile-player-body .pv-battlefield--streamlined {
  gap: 0.65rem;
}

.mobile-player-body .pv-battlefield-side {
  gap: 0.35rem;
}

.mobile-player-body .pv-battlefield-side .panel-heading {
  margin: 0 0 0.25rem;
  font-size: 0.78rem;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  opacity: 0.85;
}

.mobile-player-body .pv-roster-card--compact {
  position: relative;
  display: flex;
  flex-direction: column;
  gap: 0.28rem;
  padding: 0.55rem 0.65rem;
  min-height: 0;
  overflow: hidden;
}

.mobile-player-body .pv-roster-status-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.5rem;
  min-height: 1rem;
  position: relative;
  z-index: 2;
}

.mobile-player-body .pv-roster-status-spacer {
  flex: 1 1 auto;
}

.mobile-player-body .pv-roster-card--compact .pv-turn-badge,
.mobile-player-body .pv-roster-card--compact .pv-turn-badge--enemy,
.mobile-player-body .pv-roster-card--compact .pv-bloodied-flag {
  position: static;
  margin: 0;
  padding: 0.12rem 0.4rem;
  font-size: 0.66rem;
  line-height: 1.2;
}

.mobile-player-body .pv-roster-card--compact .pv-bloodied-flag {
  margin-left: auto;
}

.mobile-player-body .pv-roster-main {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 0.5rem;
  position: relative;
  z-index: 2;
}

.mobile-player-body .pv-roster-name {
  margin: 0;
  font-size: 0.98rem;
  font-weight: 750;
  line-height: 1.25;
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  color: var(--text-primary, #f1f5f9);
}

.mobile-player-body .pv-roster-hp-track {
  height: 0.4rem;
  margin-top: 0.2rem;
  position: relative;
  z-index: 2;
}

.mobile-player-body .pv-roster-hp-label {
  display: flex;
  justify-content: space-between;
  gap: 0.5rem;
  margin-top: 0.18rem;
  font-size: 0.76rem;
  font-weight: 700;
  font-variant-numeric: tabular-nums;
  color: var(--text-secondary, #cbd5e1);
  position: relative;
  z-index: 2;
}

.mobile-player-body .pv-roster-conditions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.28rem;
  position: relative;
  z-index: 2;
}

.mobile-player-body .pv-roster-condition {
  display: inline-block;
  padding: 0.1rem 0.4rem;
  border-radius: 999px;
  border: 1px solid rgba(255, 255, 255, 0.14);
  background: rgba(255, 255, 255, 0.07);
  color: var(--text-secondary, #d1d5db);
  font-size: 0.7rem;
  font-weight: 600;
  line-height: 1.25;
}

.mobile-player-body .pv-roster-card--compact.pv-combatant-zero {
  min-height: 2.6rem;
}

.mobile-player-body .pv-roster-card--compact .pv-combatant-overlay {
  border-radius: inherit;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  pointer-events: none;
  z-index: 1;
  background: rgba(8, 10, 16, 0.55);
}

.mobile-player-body .pv-roster-card--compact .pv-combatant-overlay-label {
  position: relative;
  z-index: 2;
  padding: 0.2rem 0.55rem;
  border-radius: 999px;
  font-size: 0.78rem;
  font-weight: 800;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}

.mobile-player-body .pb-vital-chips {
  display: grid;
  grid-template-columns: 1fr;
  gap: 0.4rem;
  margin: 0.45rem 0 0.55rem;
  width: 100%;
  position: relative;
  z-index: 2;
}

.mobile-player-body .pb-vital-chip,
.mobile-player-body .pb-vital-chip--controls {
  width: 100%;
  max-width: 100%;
  box-sizing: border-box;
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  white-space: normal;
  overflow: visible;
  text-overflow: unset;
  border-radius: 0.65rem;
  padding: 0.45rem 0.55rem;
  gap: 0.4rem;
  row-gap: 0.35rem;
  min-height: 2.75rem;
  pointer-events: auto;
}

.mobile-player-body .pb-resource-rage,
.mobile-player-body .pb-resource-activate,
.mobile-player-body .pb-resource-step {
  min-height: 2.35rem;
  min-width: 2.35rem;
  padding: 0.35rem 0.7rem;
  font-size: 0.88rem;
  font-weight: 700;
  touch-action: manipulation;
  -webkit-tap-highlight-color: rgba(255, 255, 255, 0.08);
}

.mobile-player-body .pb-resource-rage {
  flex: 1 1 auto;
  min-width: 4.5rem;
}

.mobile-player-body .pb-resource-label {
  max-width: none;
  flex: 1 1 auto;
  min-width: 0;
  font-weight: 700;
}

.mobile-player-body .pb-resource-help {
  flex: 0 0 auto;
  width: 1.55rem;
  height: 1.55rem;
  border-radius: 999px;
  border: 1px solid rgba(148, 163, 184, 0.4);
  background: rgba(30, 41, 59, 0.75);
  color: #e2e8f0;
  font-size: 0.72rem;
  font-weight: 800;
  line-height: 1;
  padding: 0;
  cursor: pointer;
}

.mobile-player-body .pb-resource-uses {
  min-width: 2.6rem;
}

.mobile-player-body .pb-my-character-slot .pv-party-card--hero .pv-party-name {
  font-size: 1.05rem;
  line-height: 1.25;
}

.mobile-player-body .pb-my-actions-list--mobile-quick {
  grid-template-columns: 1fr;
}

.mobile-player-body .player-round-meta {
  font-size: 0.78rem;
}
