/* ==========================================================================
   Merlin Play Hub (merlinplayhub.com) — Bishopsgate Astrolabe & Codex Vault
   Prefix: mph- | 3 Switchable Atmospheric Scenes (observatory, vellum, crucible)
   ========================================================================== */

:root,
body[data-scene="observatory"] {
    --mph-bg: #0b1021;
    --mph-bg-alt: #0f162e;
    --mph-surface: #141d38;
    --mph-surface-2: #1b2648;
    --mph-surface-glass: rgba(20, 29, 56, 0.88);
    --mph-border: rgba(216, 169, 75, 0.22);
    --mph-border-strong: rgba(216, 169, 75, 0.52);
    --mph-text: #f3efe6;
    --mph-text-muted: #a6b1d0;
    --mph-accent: #d8a94b;
    --mph-accent-hover: #e7be68;
    --mph-accent-ink: #0b1021;
    --mph-secondary: #4cc9f0;
    --mph-seal: #e0533c;
    --mph-success: #2ec4b6;
    --mph-danger: #ef5d60;
    --mph-shadow: 0 18px 46px rgba(4, 7, 18, 0.55);
    --mph-radial: radial-gradient(circle at 18% 12%, rgba(216, 169, 75, 0.12), transparent 45%),
                  radial-gradient(circle at 82% 22%, rgba(76, 201, 240, 0.10), transparent 48%);
}

body[data-scene="vellum"] {
    --mph-bg: #f5f0e4;
    --mph-bg-alt: #ebe3d2;
    --mph-surface: #fffdf8;
    --mph-surface-2: #f0e9d8;
    --mph-surface-glass: rgba(255, 253, 248, 0.92);
    --mph-border: rgba(23, 28, 43, 0.16);
    --mph-border-strong: rgba(184, 74, 39, 0.48);
    --mph-text: #171c2b;
    --mph-text-muted: #4f566b;
    --mph-accent: #b84a27;
    --mph-accent-hover: #9d3b1c;
    --mph-accent-ink: #fffdf8;
    --mph-secondary: #1e6b5c;
    --mph-seal: #b84a27;
    --mph-success: #1b7a58;
    --mph-danger: #c02f2f;
    --mph-shadow: 0 16px 38px rgba(23, 28, 43, 0.10);
    --mph-radial: radial-gradient(circle at 15% 10%, rgba(184, 74, 39, 0.08), transparent 45%),
                  radial-gradient(circle at 85% 20%, rgba(30, 107, 92, 0.08), transparent 45%);
}

body[data-scene="crucible"] {
    --mph-bg: #081815;
    --mph-bg-alt: #0c221e;
    --mph-surface: #112b25;
    --mph-surface-2: #173830;
    --mph-surface-glass: rgba(17, 43, 37, 0.90);
    --mph-border: rgba(226, 184, 87, 0.24);
    --mph-border-strong: rgba(46, 196, 182, 0.55);
    --mph-text: #ecf6f2;
    --mph-text-muted: #9bc0b5;
    --mph-accent: #e2b857;
    --mph-accent-hover: #f0ca72;
    --mph-accent-ink: #081815;
    --mph-secondary: #2ec4b6;
    --mph-seal: #f48c06;
    --mph-success: #2ec4b6;
    --mph-danger: #f26464;
    --mph-shadow: 0 18px 46px rgba(2, 10, 8, 0.6);
    --mph-radial: radial-gradient(circle at 20% 14%, rgba(46, 196, 182, 0.14), transparent 46%),
                  radial-gradient(circle at 80% 18%, rgba(226, 184, 87, 0.12), transparent 46%);
}

*,
*::before,
*::after {
    box-sizing: border-box;
}

[hidden] {
    display: none !important;
}

html {
    scroll-behavior: smooth;
}

body.mph-body {
    margin: 0;
    font-family: 'Plus Jakarta Sans', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    background-color: var(--mph-bg);
    background-image: var(--mph-radial);
    background-attachment: fixed;
    color: var(--mph-text);
    line-height: 1.6;
    font-size: 16px;
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    transition: background-color 0.28s ease, color 0.28s ease;
}

h1, h2, h3, h4,
.mph-brand-name,
.mph-auth-title {
    font-family: 'Cinzel', Georgia, serif;
    letter-spacing: 0.02em;
    line-height: 1.22;
    margin-top: 0;
}

a {
    color: var(--mph-accent);
    text-decoration: none;
    transition: color 0.18s ease, opacity 0.18s ease;
}

a:hover {
    color: var(--mph-accent-hover);
}

img {
    max-width: 100%;
    display: block;
}

.mph-tabular,
.mph-mono {
    font-family: 'JetBrains Mono', monospace;
    font-variant-numeric: tabular-nums;
}

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

.mph-container {
    width: 100%;
    max-width: 1260px;
    margin: 0 auto;
    padding: 0 1.25rem;
}

.mph-main {
    flex: 1 0 auto;
}

/* Top Compliance Bar */
.mph-celestial-topbar {
    background: var(--mph-bg-alt);
    border-bottom: 1px solid var(--mph-border);
    font-size: 0.79rem;
    padding: 0.45rem 0;
    color: var(--mph-text-muted);
}

.mph-topbar-inner {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
    flex-wrap: wrap;
}

.mph-topbar-left,
.mph-topbar-right {
    display: flex;
    align-items: center;
    gap: 0.65rem;
    flex-wrap: wrap;
}

.mph-badge-18 {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    background: var(--mph-accent);
    color: var(--mph-accent-ink);
    font-weight: 800;
    font-size: 0.72rem;
    letter-spacing: 0.06em;
    padding: 0.15rem 0.5rem;
    border-radius: 4px;
}

/* Sticky Header */
.mph-header {
    position: sticky;
    top: 0;
    z-index: 90;
    background: var(--mph-surface-glass);
    backdrop-filter: blur(14px);
    border-bottom: 1px solid var(--mph-border);
}

.mph-header-inner {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
    min-height: 74px;
    padding-top: 0.5rem;
    padding-bottom: 0.5rem;
}

.mph-brand {
    display: inline-flex;
    align-items: center;
    gap: 0.75rem;
    color: var(--mph-text);
}

.mph-brand:hover {
    color: var(--mph-text);
}

.mph-brand-crest {
    color: var(--mph-accent);
    display: inline-flex;
    align-items: center;
    justify-content: center;
}

.mph-brand-text {
    display: flex;
    flex-direction: column;
}

.mph-brand-name {
    font-size: 1.16rem;
    font-weight: 700;
    letter-spacing: 0.04em;
}

.mph-brand-sub {
    font-size: 0.72rem;
    color: var(--mph-text-muted);
    letter-spacing: 0.06em;
    text-transform: uppercase;
}

.mph-nav {
    display: flex;
    align-items: center;
    gap: 0.35rem;
    flex-wrap: wrap;
}

.mph-nav-link {
    display: inline-flex;
    align-items: center;
    gap: 0.38rem;
    padding: 0.45rem 0.78rem;
    border-radius: 6px;
    font-size: 0.9rem;
    font-weight: 500;
    color: var(--mph-text-muted);
    background: transparent;
    border: 1px solid transparent;
    cursor: pointer;
    font-family: inherit;
    transition: all 0.18s ease;
}

.mph-nav-link:hover,
.mph-nav-link.is-active {
    color: var(--mph-text);
    background: var(--mph-surface-2);
    border-color: var(--mph-border);
}

.mph-nav-survey {
    color: var(--mph-accent);
    border-color: var(--mph-border);
}

.mph-header-actions {
    display: flex;
    align-items: center;
    gap: 0.6rem;
    flex-wrap: wrap;
}

.mph-sigil-counter {
    display: inline-flex;
    align-items: center;
    gap: 0.4rem;
    padding: 0.4rem 0.75rem;
    border-radius: 999px;
    background: var(--mph-surface-2);
    border: 1px solid var(--mph-border);
    color: var(--mph-text);
    font-size: 0.84rem;
    font-weight: 600;
}

.mph-count-pill {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 20px;
    height: 20px;
    padding: 0 0.35rem;
    border-radius: 999px;
    background: var(--mph-accent);
    color: var(--mph-accent-ink);
    font-size: 0.75rem;
    font-family: 'JetBrains Mono', monospace;
}

.mph-balance-chip {
    display: inline-flex;
    align-items: center;
    gap: 0.4rem;
    padding: 0.4rem 0.85rem;
    border-radius: 999px;
    background: var(--mph-surface-2);
    border: 1px solid var(--mph-border-strong);
    color: var(--mph-text);
    font-size: 0.85rem;
}

.mph-coin-glyph {
    color: var(--mph-accent);
    font-size: 1rem;
}

.mph-balance-unit {
    color: var(--mph-text-muted);
    font-size: 0.76rem;
}

.mph-profile-chip {
    display: inline-flex;
    align-items: center;
    gap: 0.45rem;
    padding: 0.35rem 0.7rem;
    border-radius: 999px;
    background: var(--mph-surface);
    border: 1px solid var(--mph-border);
    color: var(--mph-text);
    font-size: 0.85rem;
    font-weight: 600;
}

.mph-avatar-dot {
    width: 24px;
    height: 24px;
    border-radius: 50%;
    background: var(--mph-accent);
    color: var(--mph-accent-ink);
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-size: 0.75rem;
    font-weight: 800;
}

.mph-inline-form {
    display: inline;
    margin: 0;
}

/* Buttons */
.mph-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.45rem;
    padding: 0.65rem 1.2rem;
    border-radius: 8px;
    font-family: inherit;
    font-size: 0.92rem;
    font-weight: 600;
    cursor: pointer;
    border: 1px solid transparent;
    transition: all 0.18s ease;
    text-decoration: none;
    line-height: 1.2;
}

.mph-btn-sm {
    padding: 0.46rem 0.88rem;
    font-size: 0.83rem;
}

.mph-btn-lg {
    padding: 0.82rem 1.45rem;
    font-size: 0.98rem;
}

.mph-btn-block {
    width: 100%;
}

.mph-btn-primary {
    background: var(--mph-accent);
    color: var(--mph-accent-ink);
    border-color: var(--mph-accent);
    box-shadow: 0 4px 16px rgba(216, 169, 75, 0.22);
}

.mph-btn-primary:hover {
    background: var(--mph-accent-hover);
    border-color: var(--mph-accent-hover);
    color: var(--mph-accent-ink);
    transform: translateY(-1px);
}

.mph-btn-outline {
    background: var(--mph-surface);
    color: var(--mph-text);
    border-color: var(--mph-border-strong);
}

.mph-btn-outline:hover {
    background: var(--mph-surface-2);
    border-color: var(--mph-accent);
    color: var(--mph-text);
}

.mph-btn-ghost {
    background: transparent;
    color: var(--mph-text-muted);
    border-color: var(--mph-border);
}

.mph-btn-ghost:hover {
    color: var(--mph-text);
    background: var(--mph-surface-2);
}

/* Hero Section */
.mph-hero-section {
    padding: 3.5rem 0 3rem;
    border-bottom: 1px solid var(--mph-border);
}

.mph-hero-grid {
    display: grid;
    grid-template-columns: 1.15fr 0.85fr;
    gap: 2.5rem;
    align-items: center;
}

.mph-eyebrow-pill {
    display: inline-flex;
    align-items: center;
    gap: 0.55rem;
    padding: 0.35rem 0.85rem;
    border-radius: 999px;
    background: var(--mph-surface);
    border: 1px solid var(--mph-border);
    font-size: 0.78rem;
    font-weight: 600;
    letter-spacing: 0.05em;
    text-transform: uppercase;
    color: var(--mph-accent);
    margin-bottom: 1.1rem;
}

.mph-pulse-dot {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: var(--mph-secondary);
    box-shadow: 0 0 10px var(--mph-secondary);
}

.mph-hero-title {
    font-size: clamp(2.1rem, 4vw, 3.35rem);
    margin-bottom: 1.1rem;
}

.mph-text-gold {
    color: var(--mph-accent);
}

.mph-hero-lead {
    font-size: 1.08rem;
    color: var(--mph-text-muted);
    max-width: 62ch;
    margin-bottom: 1.65rem;
}

.mph-hero-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 0.75rem;
    margin-bottom: 2rem;
}

.mph-hero-metrics {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 1rem;
    margin: 0;
    padding-top: 1.4rem;
    border-top: 1px solid var(--mph-border);
}

.mph-metric-box dt {
    font-size: 0.76rem;
    text-transform: uppercase;
    letter-spacing: 0.06em;
    color: var(--mph-text-muted);
}

.mph-metric-box dd {
    margin: 0.25rem 0 0;
    font-size: 1.15rem;
    font-weight: 700;
    color: var(--mph-text);
}

.mph-orrery-frame {
    position: relative;
    background: var(--mph-surface);
    border: 1px solid var(--mph-border-strong);
    border-radius: 16px;
    padding: 1.75rem;
    box-shadow: var(--mph-shadow);
    display: flex;
    flex-direction: column;
    align-items: center;
}

.mph-hero-illustration {
    width: 100%;
    max-width: 380px;
    aspect-ratio: 1 / 1;
    object-fit: cover;
    border-radius: 12px;
    border: 1px solid var(--mph-border-strong);
}

.mph-theme-card-img-wrap {
    margin: -1.4rem -1.4rem 1rem -1.4rem;
    aspect-ratio: 16 / 10;
    overflow: hidden;
    border-radius: 13px 13px 0 0;
    border-bottom: 1px solid var(--mph-border);
}

.mph-theme-card-img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.35s ease;
}

.mph-theme-card:hover .mph-theme-card-img {
    transform: scale(1.05);
}

.mph-astrolabe-svg {
    width: 100%;
    max-width: 310px;
    height: auto;
    color: var(--mph-accent);
}

.mph-orrery-QuickCard {
    width: 100%;
    margin-top: 1rem;
    padding: 1.1rem;
    background: var(--mph-surface-2);
    border: 1px solid var(--mph-border);
    border-radius: 12px;
}

.mph-orrery-QuickCard h3 {
    margin: 0.25rem 0;
    font-size: 1.15rem;
}

.mph-orrery-QuickCard p {
    margin: 0 0 0.85rem;
    font-size: 0.85rem;
    color: var(--mph-text-muted);
}

.mph-orrery-card-btns {
    display: flex;
    gap: 0.55rem;
    flex-wrap: wrap;
}

/* Sections */
.mph-section {
    padding: 3.5rem 0;
    border-bottom: 1px solid var(--mph-border);
}

.mph-eyebrow {
    display: block;
    font-size: 0.76rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.09em;
    color: var(--mph-accent);
    margin-bottom: 0.4rem;
}

.mph-section-heading {
    font-size: clamp(1.65rem, 2.8vw, 2.3rem);
    margin-bottom: 0.65rem;
}

.mph-section-sub {
    color: var(--mph-text-muted);
    max-width: 66ch;
    margin: 0;
}

.mph-section-head-split {
    display: flex;
    align-items: flex-end;
    justify-content: space-between;
    gap: 1.5rem;
    margin-bottom: 2rem;
    flex-wrap: wrap;
}

.mph-section-header-center {
    text-align: center;
    max-width: 720px;
    margin: 0 auto 2.4rem;
}

.mph-section-header-center .mph-section-sub {
    margin: 0 auto;
}

/* Section 2: Interactive Matrix & Claim Ring */
.mph-matrix-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1.5rem;
    margin-bottom: 2rem;
    flex-wrap: wrap;
}

.mph-matrix-controls {
    display: flex;
    align-items: center;
    gap: 1rem;
    flex-wrap: wrap;
}

.mph-claim-ring {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    padding: 0.55rem 1rem;
    background: var(--mph-surface);
    border: 1px solid var(--mph-border);
    border-radius: 12px;
}

.mph-ring-svg {
    transform: rotate(-90deg);
}

.mph-ring-track {
    stroke: var(--mph-border);
}

.mph-ring-progress {
    stroke: var(--mph-accent);
    transition: stroke-dashoffset 0.4s ease;
}

.mph-ring-copy {
    display: flex;
    flex-direction: column;
}

.mph-ring-fraction {
    font-size: 0.9rem;
    font-family: 'JetBrains Mono', monospace;
}

.mph-ring-copy small {
    font-size: 0.74rem;
    color: var(--mph-text-muted);
}

.mph-artifact-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(340px, 1fr));
    gap: 1.25rem;
}

.mph-artifact-node {
    background: var(--mph-surface);
    border: 1px solid var(--mph-border);
    border-radius: 14px;
    padding: 1.15rem;
    display: flex;
    flex-direction: column;
    gap: 0.95rem;
    transition: transform 0.2s ease, border-color 0.2s ease, box-shadow 0.2s ease;
}

.mph-artifact-node:hover {
    border-color: var(--mph-border-strong);
    transform: translateY(-2px);
}

.mph-artifact-node.is-surveyed {
    border-color: var(--mph-secondary);
    box-shadow: 0 0 0 3px rgba(76, 201, 240, 0.35), var(--mph-shadow);
    animation: mphPulseNode 0.9s ease-in-out 2;
}

@keyframes mphPulseNode {
    0%, 100% { transform: scale(1); }
    50% { transform: scale(1.02); }
}

.mph-artifact-top {
    display: flex;
    align-items: center;
    justify-content: space-between;
    font-size: 0.75rem;
    font-family: 'JetBrains Mono', monospace;
    color: var(--mph-text-muted);
}

.mph-artifact-seal-indicator {
    display: none;
    padding: 0.12rem 0.5rem;
    border-radius: 999px;
    background: var(--mph-seal);
    color: #fff;
    font-weight: 700;
    font-size: 0.7rem;
}

.mph-artifact-node.is-claimed .mph-artifact-seal-indicator {
    display: inline-block;
    animation: stamp 0.32s cubic-bezier(0.22, 1, 0.36, 1);
}

.mph-artifact-main {
    display: flex;
    gap: 0.95rem;
    align-items: center;
}

.mph-artifact-thumb {
    width: 84px;
    height: 84px;
    object-fit: cover;
    border-radius: 10px;
    border: 1px solid var(--mph-border);
    flex-shrink: 0;
}

.mph-artifact-info h3 {
    font-size: 1.08rem;
    margin: 0.25rem 0;
}

.mph-artifact-info p {
    margin: 0;
    font-size: 0.83rem;
    color: var(--mph-text-muted);
}

.mph-artifact-footer {
    display: flex;
    gap: 0.5rem;
    flex-wrap: wrap;
    padding-top: 0.65rem;
    border-top: 1px solid var(--mph-border);
}

/* Dynamic Player Reading Shelf ([data-shelf]) */
.mph-shelf-box {
    background: var(--mph-surface);
    border: 1px solid var(--mph-border-strong);
    border-radius: 16px;
    padding: 1.5rem;
}

.mph-shelf-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
    margin-bottom: 1.25rem;
    flex-wrap: wrap;
}

.mph-shelf-title {
    margin: 0;
    font-size: 1.4rem;
}

.mph-shelf-tabs {
    display: flex;
    gap: 0.5rem;
}

.mph-shelf-tab {
    padding: 0.45rem 0.95rem;
    border-radius: 8px;
    border: 1px solid var(--mph-border);
    background: var(--mph-surface-2);
    color: var(--mph-text-muted);
    font-family: inherit;
    font-size: 0.85rem;
    font-weight: 600;
    cursor: pointer;
}

.mph-shelf-tab.is-active {
    background: var(--mph-accent);
    color: var(--mph-accent-ink);
    border-color: var(--mph-accent);
}

.mph-shelf-track {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(270px, 1fr));
    gap: 1rem;
}

.mph-shelf-mini-card {
    display: flex;
    align-items: center;
    gap: 0.85rem;
    padding: 0.75rem;
    border-radius: 10px;
    background: var(--mph-surface-2);
    border: 1px solid var(--mph-border);
}

.mph-shelf-mini-card img {
    width: 62px;
    height: 62px;
    border-radius: 8px;
    object-fit: cover;
    flex-shrink: 0;
}

.mph-shelf-mini-meta {
    flex: 1;
    min-width: 0;
}

.mph-shelf-mini-meta h4 {
    margin: 0 0 0.2rem;
    font-size: 0.96rem;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.mph-shelf-mini-meta h4 a {
    color: var(--mph-text);
}

.mph-shelf-mini-meta p {
    margin: 0;
    font-size: 0.78rem;
    color: var(--mph-text-muted);
}

/* Folio Game Cards & Wax Seal Stamp */
.mph-cards-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(340px, 1fr));
    gap: 1.5rem;
}

.mph-folio-card {
    background: var(--mph-surface);
    border: 1px solid var(--mph-border);
    border-radius: 14px;
    overflow: hidden;
    display: flex;
    flex-direction: column;
    box-shadow: var(--mph-shadow);
    transition: transform 0.22s ease, border-color 0.22s ease;
}

.mph-folio-card:hover {
    transform: translateY(-4px);
    border-color: var(--mph-border-strong);
}

.mph-card-media {
    position: relative;
    aspect-ratio: 16 / 10;
    background: var(--mph-bg-alt);
    overflow: hidden;
}

.mph-card-poster {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.35s ease;
}

.mph-folio-card:hover .mph-card-poster {
    transform: scale(1.04);
}

.mph-card-overlay {
    position: absolute;
    inset: 0;
    background: rgba(11, 16, 33, 0.58);
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    transition: opacity 0.22s ease;
}

.mph-card-poster-link:hover .mph-card-overlay {
    opacity: 1;
}

.mph-card-launch-pill {
    display: inline-flex;
    align-items: center;
    gap: 0.45rem;
    padding: 0.55rem 1.1rem;
    border-radius: 999px;
    background: var(--mph-accent);
    color: var(--mph-accent-ink);
    font-weight: 700;
    font-size: 0.88rem;
}

.mph-card-badges {
    position: absolute;
    top: 0.75rem;
    left: 0.75rem;
    display: flex;
    gap: 0.45rem;
    align-items: center;
    pointer-events: none;
}

.mph-folio-num {
    padding: 0.22rem 0.6rem;
    border-radius: 6px;
    background: rgba(11, 16, 33, 0.84);
    color: #f3efe6;
    font-family: 'JetBrains Mono', monospace;
    font-size: 0.74rem;
    border: 1px solid rgba(216, 169, 75, 0.35);
}

.mph-badge-new {
    padding: 0.22rem 0.55rem;
    border-radius: 6px;
    background: var(--mph-secondary);
    color: #08121e;
    font-size: 0.72rem;
    font-weight: 800;
    text-transform: uppercase;
}

.card-seal.mph-wax-seal {
    position: absolute;
    bottom: 0.75rem;
    left: 0.75rem;
    display: inline-flex;
    align-items: center;
    gap: 0.35rem;
    padding: 0.28rem 0.65rem;
    border-radius: 999px;
    background: var(--mph-seal);
    color: #fff;
    font-size: 0.74rem;
    font-weight: 700;
    letter-spacing: 0.04em;
    text-transform: uppercase;
    box-shadow: 0 6px 16px rgba(0, 0, 0, 0.4);
    opacity: 0;
    transform: scale(0.6) rotate(-12deg);
    pointer-events: none;
    transition: opacity 0.2s ease, transform 0.2s ease;
}

.is-claimed .card-seal.mph-wax-seal {
    opacity: 1;
    transform: scale(1) rotate(-3deg);
    animation: stamp 0.36s cubic-bezier(0.22, 1, 0.36, 1);
}

@keyframes stamp {
    0% {
        opacity: 0;
        transform: scale(1.65) rotate(-16deg);
    }
    70% {
        opacity: 1;
        transform: scale(0.92) rotate(-2deg);
    }
    100% {
        opacity: 1;
        transform: scale(1) rotate(-3deg);
    }
}

.mph-claim-trigger {
    position: absolute;
    top: 0.75rem;
    right: 0.75rem;
    display: inline-flex;
    align-items: center;
    gap: 0.32rem;
    padding: 0.32rem 0.68rem;
    border-radius: 999px;
    background: rgba(11, 16, 33, 0.85);
    color: #f3efe6;
    border: 1px solid rgba(255, 255, 255, 0.24);
    font-family: inherit;
    font-size: 0.76rem;
    font-weight: 600;
    cursor: pointer;
}

.is-claimed .mph-claim-trigger {
    background: var(--mph-accent);
    color: var(--mph-accent-ink);
    border-color: var(--mph-accent);
}

.mph-card-body {
    padding: 1.25rem;
    display: flex;
    flex-direction: column;
    flex: 1;
}

.mph-card-eyebrow {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 0.5rem;
    margin-bottom: 0.55rem;
    font-size: 0.78rem;
}

.mph-theme-pill {
    display: inline-flex;
    align-items: center;
    gap: 0.4rem;
    color: var(--mph-text-muted);
    font-weight: 600;
    font-size: 0.78rem;
}

.mph-theme-dot {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    display: inline-block;
}

.mph-mood-tag {
    font-size: 0.75rem;
    color: var(--mph-text-muted);
    padding: 0.12rem 0.5rem;
    border-radius: 4px;
    background: var(--mph-surface-2);
}

.mph-card-title {
    font-size: 1.25rem;
    margin: 0 0 0.45rem;
}

.mph-card-title a {
    color: var(--mph-text);
}

.mph-card-title a:hover {
    color: var(--mph-accent);
}

.mph-card-desc {
    margin: 0 0 1rem;
    font-size: 0.9rem;
    color: var(--mph-text-muted);
    flex: 1;
}

.mph-card-telemetry {
    display: grid;
    grid-template-columns: 1.2fr 0.8fr;
    gap: 0.75rem;
    padding: 0.75rem;
    border-radius: 10px;
    background: var(--mph-surface-2);
    border: 1px solid var(--mph-border);
    margin-bottom: 1rem;
}

.mph-telemetry-label {
    display: block;
    font-size: 0.71rem;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    color: var(--mph-text-muted);
    margin-bottom: 0.2rem;
}

.mph-telemetry-val {
    font-size: 0.84rem;
    color: var(--mph-text);
}

.mph-vol-meter {
    display: inline-flex;
    gap: 4px;
    align-items: center;
    margin-top: 0.25rem;
}

.mph-vol-bar {
    width: 14px;
    height: 7px;
    border-radius: 2px;
    background: var(--mph-border);
}

.mph-vol-bar.is-lit {
    background: var(--mph-accent);
}

.mph-card-actions {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 0.6rem;
}

/* Themes, Moods, Steps, Scenes on Index */
.mph-themes-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
    gap: 1.25rem;
}

.mph-theme-card {
    background: var(--mph-surface);
    border: 1px solid var(--mph-border);
    border-radius: 14px;
    padding: 1.4rem;
    color: var(--mph-text);
    display: flex;
    flex-direction: column;
    transition: transform 0.2s ease, border-color 0.2s ease;
}

.mph-theme-card:hover {
    transform: translateY(-3px);
    border-color: var(--mph-accent);
    color: var(--mph-text);
}

.mph-theme-card-top {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 0.75rem;
}

.mph-theme-ring-tag {
    font-family: 'JetBrains Mono', monospace;
    font-size: 0.74rem;
    color: var(--mph-text-muted);
}

.mph-theme-swatch {
    width: 14px;
    height: 14px;
    border-radius: 50%;
}

.mph-theme-card p {
    color: var(--mph-text-muted);
    font-size: 0.9rem;
    flex: 1;
}

.mph-theme-card-foot {
    display: flex;
    justify-content: space-between;
    font-size: 0.83rem;
    font-weight: 600;
    padding-top: 0.85rem;
    border-top: 1px solid var(--mph-border);
    color: var(--mph-accent);
}

.mph-moods-grid,
.mph-steps-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(290px, 1fr));
    gap: 1.35rem;
}

.mph-mood-card,
.mph-step-card {
    background: var(--mph-surface);
    border: 1px solid var(--mph-border);
    border-radius: 14px;
    padding: 1.5rem;
}

.mph-mood-meta {
    display: flex;
    justify-content: space-between;
    gap: 0.5rem;
    font-size: 0.76rem;
    color: var(--mph-accent);
    margin-bottom: 0.65rem;
    font-family: 'JetBrains Mono', monospace;
}

.mph-mood-card p,
.mph-step-card p {
    color: var(--mph-text-muted);
    font-size: 0.92rem;
}

.mph-step-num {
    display: inline-block;
    font-family: 'JetBrains Mono', monospace;
    font-size: 0.78rem;
    color: var(--mph-accent);
    padding: 0.2rem 0.55rem;
    border-radius: 6px;
    background: var(--mph-surface-2);
    margin-bottom: 0.75rem;
}

.mph-scenes-banner,
.mph-care-panel {
    background: var(--mph-surface);
    border: 1px solid var(--mph-border-strong);
    border-radius: 16px;
    padding: 2rem;
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 2rem;
    align-items: center;
}

.mph-scenes-QuickSwitch {
    display: grid;
    gap: 0.75rem;
}

.mph-scene-preview-btn {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    gap: 0.25rem;
    padding: 0.9rem 1.1rem;
    border-radius: 10px;
    background: var(--mph-surface-2);
    border: 1px solid var(--mph-border);
    color: var(--mph-text);
    font-family: inherit;
    text-align: left;
    cursor: pointer;
}

.mph-scene-preview-btn.is-active {
    border-color: var(--mph-accent);
    box-shadow: 0 0 0 2px var(--mph-accent);
}

.mph-scene-swatches {
    display: inline-flex;
    gap: 5px;
    margin-bottom: 0.25rem;
}

.mph-scene-swatches i {
    width: 16px;
    height: 16px;
    border-radius: 4px;
    display: inline-block;
    border: 1px solid rgba(255, 255, 255, 0.25);
}

.mph-scene-preview-btn small {
    color: var(--mph-text-muted);
    font-size: 0.8rem;
}

.mph-care-panel-actions {
    display: flex;
    gap: 0.85rem;
    justify-content: flex-end;
    flex-wrap: wrap;
}

/* 6 Feature Pills under 3 Moods */
.mph-feature-pills {
    display: flex;
    flex-wrap: wrap;
    gap: 0.65rem;
    justify-content: center;
    margin-top: 1.75rem;
    padding-top: 1.5rem;
    border-top: 1px solid var(--mph-border);
}

.mph-feature-pill {
    display: inline-flex;
    align-items: center;
    gap: 0.55rem;
    padding: 0.5rem 0.95rem;
    border-radius: 999px;
    background: var(--mph-surface);
    border: 1px solid var(--mph-border-strong);
    color: var(--mph-text);
    font-size: 0.85rem;
    font-weight: 600;
    transition: all 0.18s ease;
}

.mph-feature-pill:hover {
    background: var(--mph-accent);
    color: var(--mph-accent-ink);
    border-color: var(--mph-accent);
    transform: translateY(-2px);
}

.mph-feature-pill-count {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 22px;
    height: 22px;
    padding: 0 0.4rem;
    border-radius: 999px;
    background: var(--mph-surface-2);
    color: var(--mph-accent);
    font-size: 0.75rem;
    font-weight: 700;
}

.mph-feature-pill:hover .mph-feature-pill-count {
    background: var(--mph-accent-ink);
    color: var(--mph-accent);
}

/* Horizontal Scroll Rails ([data-rail]) */
.mph-rail-controls {
    display: flex;
    align-items: center;
    gap: 0.55rem;
    flex-wrap: wrap;
}

.mph-rail-btn {
    width: 38px;
    height: 38px;
    border-radius: 50%;
    background: var(--mph-surface);
    border: 1px solid var(--mph-border-strong);
    color: var(--mph-text);
    font-size: 1.35rem;
    line-height: 1;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all 0.18s ease;
}

.mph-rail-btn:hover {
    background: var(--mph-accent);
    color: var(--mph-accent-ink);
    border-color: var(--mph-accent);
}

.mph-rail-track {
    display: flex;
    gap: 1.35rem;
    overflow-x: auto;
    scroll-snap-type: x mandatory;
    padding-bottom: 0.85rem;
    scrollbar-width: thin;
    scrollbar-color: var(--mph-accent) var(--mph-surface-2);
}

.mph-rail-item {
    flex: 0 0 min(350px, 86vw);
    scroll-snap-align: start;
    display: flex;
}

.mph-rail-item > .mph-folio-card {
    width: 100%;
}

.mph-scenes-subblock {
    margin-top: 2.25rem;
}

/* Slide-Out Codex Plate Inspector (<aside data-deed>) */
.mph-artifact-main[data-deed-open] {
    cursor: pointer;
}

.mph-deed-backdrop {
    position: fixed;
    inset: 0;
    background: rgba(5, 8, 18, 0.65);
    backdrop-filter: blur(4px);
    z-index: 120;
}

.mph-deed-drawer[data-deed] {
    position: fixed;
    top: 0;
    right: 0;
    width: min(440px, 94vw);
    height: 100vh;
    background: var(--mph-surface);
    border-left: 1px solid var(--mph-border-strong);
    box-shadow: var(--mph-shadow);
    z-index: 130;
    display: flex;
    flex-direction: column;
    overflow-y: auto;
    animation: mphSlideInRight 0.24s cubic-bezier(0.22, 1, 0.36, 1);
}

.mph-deed-drawer[data-deed][hidden] {
    display: none !important;
}

@keyframes mphSlideInRight {
    from {
        transform: translateX(100%);
        opacity: 0.4;
    }
    to {
        transform: translateX(0);
        opacity: 1;
    }
}

.mph-deed-header {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 0.85rem;
    padding: 1.15rem 1.35rem;
    border-bottom: 1px solid var(--mph-border);
}

.mph-deed-meta {
    display: flex;
    flex-direction: column;
    gap: 0.28rem;
}

.mph-deed-order {
    font-family: 'JetBrains Mono', monospace;
    font-size: 0.74rem;
    color: var(--mph-accent);
}

.mph-deed-close {
    background: var(--mph-surface-2);
    border: 1px solid var(--mph-border);
    color: var(--mph-text);
    border-radius: 8px;
    width: 34px;
    height: 34px;
    font-size: 1.25rem;
    line-height: 1;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    flex-shrink: 0;
}

.mph-deed-close:hover {
    border-color: var(--mph-accent);
    color: var(--mph-accent);
}

.mph-deed-body {
    padding: 1.35rem;
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.mph-deed-poster-wrap {
    position: relative;
    border-radius: 12px;
    overflow: hidden;
    aspect-ratio: 16 / 10;
    border: 1px solid var(--mph-border);
}

.mph-deed-poster {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.mph-deed-new-badge {
    position: absolute;
    top: 0.75rem;
    right: 0.75rem;
}

.mph-deed-title {
    margin: 0;
    font-size: 1.45rem;
}

.mph-deed-desc {
    margin: 0;
    color: var(--mph-text-muted);
    font-size: 0.91rem;
}

.mph-deed-tags {
    display: grid;
    gap: 0.55rem;
    background: var(--mph-surface-2);
    padding: 0.95rem;
    border-radius: 10px;
    border: 1px solid var(--mph-border);
}

.mph-deed-tag {
    display: flex;
    justify-content: space-between;
    gap: 0.75rem;
    font-size: 0.83rem;
}

.mph-deed-tag span {
    color: var(--mph-text-muted);
}

.mph-deed-actions {
    display: grid;
    gap: 0.6rem;
    margin-top: 0.25rem;
}

/* Catalog & Live Filters (games.php) */
.mph-page-hero-compact {
    padding: 2.4rem 0 1.8rem;
    border-bottom: 1px solid var(--mph-border);
}

.mph-page-title {
    font-size: clamp(1.85rem, 3.2vw, 2.65rem);
    margin-bottom: 0.5rem;
}

.mph-page-lead {
    color: var(--mph-text-muted);
    max-width: 68ch;
    margin: 0;
}

.mph-kbd {
    display: inline-block;
    padding: 0.1rem 0.45rem;
    border-radius: 4px;
    background: var(--mph-surface-2);
    border: 1px solid var(--mph-border);
    font-family: 'JetBrains Mono', monospace;
    font-size: 0.78rem;
}

.mph-filter-panel {
    background: var(--mph-surface);
    border: 1px solid var(--mph-border-strong);
    border-radius: 14px;
    padding: 1.25rem;
    margin-bottom: 2rem;
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.mph-filter-top-row {
    display: grid;
    grid-template-columns: 1fr auto auto;
    gap: 0.85rem;
    align-items: center;
}

.mph-search-wrap {
    position: relative;
    display: flex;
    align-items: center;
}

.mph-search-icon {
    position: absolute;
    left: 0.85rem;
    color: var(--mph-text-muted);
    pointer-events: none;
}

.mph-search-input {
    width: 100%;
    padding: 0.68rem 2.4rem 0.68rem 2.5rem;
    border-radius: 8px;
    border: 1px solid var(--mph-border);
    background: var(--mph-surface-2);
    color: var(--mph-text);
    font-family: inherit;
    font-size: 0.92rem;
}

.mph-search-kbd {
    position: absolute;
    right: 0.75rem;
    pointer-events: none;
}

.mph-select-group {
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.mph-select-label {
    font-size: 0.8rem;
    color: var(--mph-text-muted);
    font-weight: 600;
}

.mph-select {
    padding: 0.62rem 0.9rem;
    border-radius: 8px;
    border: 1px solid var(--mph-border);
    background: var(--mph-surface-2);
    color: var(--mph-text);
    font-family: inherit;
    font-size: 0.88rem;
}

.mph-chip-fieldset {
    border: 0;
    margin: 0;
    padding: 0;
}

.mph-filter-legend {
    font-size: 0.75rem;
    text-transform: uppercase;
    letter-spacing: 0.06em;
    color: var(--mph-text-muted);
    margin-bottom: 0.45rem;
    font-weight: 700;
}

.mph-radio-chips,
.mph-mood-tabs {
    display: flex;
    flex-wrap: wrap;
    gap: 0.45rem;
}

.mph-radio-chip input,
.mph-mood-tab input {
    position: absolute;
    opacity: 0;
    pointer-events: none;
}

.mph-radio-chip span,
.mph-mood-tab span {
    display: inline-flex;
    align-items: center;
    gap: 0.4rem;
    padding: 0.4rem 0.8rem;
    border-radius: 999px;
    background: var(--mph-surface-2);
    border: 1px solid var(--mph-border);
    color: var(--mph-text-muted);
    font-size: 0.83rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.16s ease;
}

.mph-radio-chip input:checked + span,
.mph-mood-tab input:checked + span {
    background: var(--mph-accent);
    color: var(--mph-accent-ink);
    border-color: var(--mph-accent);
}

.mph-chip-dot {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    display: inline-block;
}

.mph-filter-bottom-row {
    display: flex;
    align-items: flex-end;
    justify-content: space-between;
    gap: 1rem;
    flex-wrap: wrap;
}

.mph-toggles-cluster {
    display: flex;
    gap: 1rem;
    align-items: center;
    flex-wrap: wrap;
}

.mph-toggle-switch {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    cursor: pointer;
    font-size: 0.86rem;
    font-weight: 600;
}

.mph-toggle-switch input {
    accent-color: var(--mph-accent);
    width: 17px;
    height: 17px;
}

.mph-filter-status-bar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding-top: 0.85rem;
    border-top: 1px solid var(--mph-border);
    font-size: 0.86rem;
    color: var(--mph-text-muted);
    flex-wrap: wrap;
    gap: 0.75rem;
}

.mph-filter-status-actions {
    display: flex;
    gap: 0.5rem;
}

.mph-empty-state {
    background: var(--mph-surface);
    border: 1px dashed var(--mph-border-strong);
    border-radius: 16px;
    padding: 3rem 1.5rem;
    text-align: center;
    max-width: 580px;
    margin: 2rem auto;
}

.mph-empty-icon {
    font-size: 2.2rem;
    margin-bottom: 0.5rem;
}

.mph-empty-actions {
    display: flex;
    justify-content: center;
    gap: 0.75rem;
    margin-top: 1.25rem;
    flex-wrap: wrap;
}

/* Detail Page (game-detail.php) */
.mph-breadcrumb {
    display: flex;
    gap: 0.5rem;
    align-items: center;
    font-size: 0.84rem;
    color: var(--mph-text-muted);
    margin-bottom: 1.5rem;
    flex-wrap: wrap;
}

.mph-detail-grid {
    display: grid;
    grid-template-columns: 0.9fr 1.1fr;
    gap: 2.25rem;
    align-items: start;
}

.mph-detail-poster-frame {
    position: relative;
    border-radius: 16px;
    overflow: hidden;
    border: 1px solid var(--mph-border-strong);
    box-shadow: var(--mph-shadow);
}

.mph-detail-poster-img {
    width: 100%;
    aspect-ratio: 16 / 11;
    object-fit: cover;
}

.mph-detail-folio-tag {
    position: absolute;
    top: 0.85rem;
    left: 0.85rem;
    padding: 0.28rem 0.65rem;
    border-radius: 6px;
    background: rgba(11, 16, 33, 0.88);
    color: #f3efe6;
    font-family: 'JetBrains Mono', monospace;
    font-size: 0.75rem;
}

.mph-detail-meta-row {
    display: flex;
    gap: 0.65rem;
    align-items: center;
    margin-bottom: 0.75rem;
    flex-wrap: wrap;
}

.mph-detail-title {
    font-size: clamp(1.9rem, 3.2vw, 2.75rem);
    margin-bottom: 0.65rem;
}

.mph-detail-lead {
    font-size: 1.06rem;
    color: var(--mph-text);
    margin-bottom: 0.65rem;
}

.mph-detail-synopsis {
    color: var(--mph-text-muted);
    margin-bottom: 1.5rem;
}

.mph-specs-2x2 {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 0.9rem;
    margin-bottom: 1.65rem;
}

.mph-spec-cell {
    background: var(--mph-surface);
    border: 1px solid var(--mph-border);
    border-radius: 12px;
    padding: 1rem;
    display: flex;
    flex-direction: column;
    gap: 0.25rem;
}

.mph-spec-label {
    font-family: 'JetBrains Mono', monospace;
    font-size: 0.72rem;
    text-transform: uppercase;
    color: var(--mph-accent);
}

.mph-spec-value {
    font-size: 1rem;
}

.mph-spec-cell small {
    color: var(--mph-text-muted);
    font-size: 0.79rem;
}

.mph-spec-vol-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 0.5rem;
}

.mph-detail-cta-row {
    display: flex;
    gap: 0.75rem;
    flex-wrap: wrap;
}

.mph-detail-rules-grid {
    display: grid;
    grid-template-columns: 1.2fr 0.8fr;
    gap: 1.5rem;
}

.mph-rules-card {
    background: var(--mph-surface);
    border: 1px solid var(--mph-border);
    border-radius: 14px;
    padding: 1.6rem;
}

.mph-rules-list {
    padding-left: 1.2rem;
    color: var(--mph-text-muted);
}

.mph-rules-list li {
    margin-bottom: 0.55rem;
}

/* Player Room & Gate (play.php) */
.mph-play-main {
    padding: 2rem 0 3.5rem;
}

.mph-play-gate-grid {
    display: grid;
    grid-template-columns: 0.9fr 1.1fr;
    gap: 2rem;
    align-items: start;
}

.mph-play-gate-preview,
.mph-play-gate-auth {
    background: var(--mph-surface);
    border: 1px solid var(--mph-border-strong);
    border-radius: 16px;
    padding: 1.75rem;
    box-shadow: var(--mph-shadow);
}

.mph-gate-poster-wrap {
    position: relative;
    border-radius: 12px;
    overflow: hidden;
    margin-bottom: 1.1rem;
    aspect-ratio: 16 / 10;
}

.mph-gate-poster {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.mph-gate-lock-badge {
    position: absolute;
    top: 0.75rem;
    left: 0.75rem;
    display: inline-flex;
    align-items: center;
    gap: 0.4rem;
    padding: 0.35rem 0.75rem;
    border-radius: 999px;
    background: rgba(11, 16, 33, 0.9);
    color: var(--mph-accent);
    font-size: 0.78rem;
    font-weight: 700;
    border: 1px solid var(--mph-border-strong);
}

.mph-gate-pills {
    display: flex;
    flex-wrap: wrap;
    gap: 0.6rem;
    margin: 1rem 0;
    font-size: 0.83rem;
    color: var(--mph-text-muted);
}

.mph-gate-pills span {
    background: var(--mph-surface-2);
    padding: 0.3rem 0.65rem;
    border-radius: 6px;
    border: 1px solid var(--mph-border);
}

.mph-player-topbar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
    padding: 0.85rem 1.15rem;
    background: var(--mph-surface);
    border: 1px solid var(--mph-border);
    border-radius: 12px 12px 0 0;
    flex-wrap: wrap;
}

.mph-player-back {
    font-weight: 600;
    font-size: 0.9rem;
}

.mph-player-compliance-strip {
    display: flex;
    gap: 0.5rem;
    align-items: center;
    font-size: 0.8rem;
    color: var(--mph-text-muted);
    flex-wrap: wrap;
}

.mph-player-controls {
    display: flex;
    gap: 0.5rem;
}

.mph-player-stage {
    position: relative;
    width: 100%;
    aspect-ratio: 16 / 9;
    background: #050811;
    border-left: 1px solid var(--mph-border-strong);
    border-right: 1px solid var(--mph-border-strong);
    border-bottom: 1px solid var(--mph-border-strong);
    overflow: hidden;
}

.mph-player-loader {
    position: absolute;
    inset: 0;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 0.75rem;
    color: #f3efe6;
    background: #080d1c;
    font-size: 0.9rem;
    z-index: 1;
    transition: opacity 0.3s ease;
}

.mph-player-loader.is-loaded {
    opacity: 0;
    pointer-events: none;
}

.mph-spinner {
    width: 34px;
    height: 34px;
    border-radius: 50%;
    border: 3px solid rgba(216, 169, 75, 0.25);
    border-top-color: #d8a94b;
    animation: mphSpin 0.85s linear infinite;
}

@keyframes mphSpin {
    to { transform: rotate(360deg); }
}

.mph-game-iframe {
    position: relative;
    z-index: 2;
    width: 100%;
    height: 100%;
    border: 0;
}

.mph-player-specs {
    margin-top: 1.25rem;
    background: var(--mph-surface);
    border: 1px solid var(--mph-border);
    border-radius: 12px;
    padding: 1.25rem;
}

.mph-player-specs-summary {
    display: flex;
    align-items: center;
    justify-content: space-between;
    cursor: pointer;
    list-style: none;
}

.mph-player-title {
    font-size: 1.3rem;
    margin: 0;
}

.mph-player-specs-body {
    display: grid;
    grid-template-columns: 1.2fr 0.8fr;
    gap: 1.5rem;
    padding-top: 1rem;
    margin-top: 1rem;
    border-top: 1px solid var(--mph-border);
}

.mph-player-specs-meta {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 0.75rem;
}

.mph-spec-mini {
    background: var(--mph-surface-2);
    padding: 0.75rem;
    border-radius: 8px;
    border: 1px solid var(--mph-border);
}

.mph-spec-mini span {
    display: block;
    font-size: 0.72rem;
    color: var(--mph-text-muted);
    text-transform: uppercase;
}

/* Profile & Credit Ledger (profile.php) */
.mph-profile-hero-split {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1.5rem;
    flex-wrap: wrap;
}

.mph-profile-hero-actions {
    display: flex;
    gap: 0.65rem;
    flex-wrap: wrap;
}

.mph-profile-grid {
    display: grid;
    grid-template-columns: 0.9fr 1.1fr;
    gap: 1.5rem;
    margin-bottom: 2rem;
}

.mph-profile-card,
.mph-ledger-card {
    background: var(--mph-surface);
    border: 1px solid var(--mph-border-strong);
    border-radius: 16px;
    padding: 1.75rem;
    box-shadow: var(--mph-shadow);
}

.mph-balance-panel {
    display: flex;
    flex-direction: column;
    justify-content: space-between;
}

.mph-token-medal {
    color: var(--mph-accent);
    margin-bottom: 1rem;
}

.mph-balance-figure {
    font-size: clamp(2rem, 3.5vw, 2.75rem);
    font-weight: 700;
    color: var(--mph-accent);
    margin-bottom: 0.5rem;
}

.mph-balance-figure span {
    font-size: 1rem;
    color: var(--mph-text-muted);
    font-weight: 500;
}

.mph-balance-note {
    color: var(--mph-text-muted);
    font-size: 0.88rem;
    margin-bottom: 1.25rem;
}

.mph-balance-btns {
    display: flex;
    gap: 0.6rem;
    flex-wrap: wrap;
}

.mph-scene-fieldset {
    border: 0;
    padding: 0;
    margin: 0 0 1.25rem;
}

.mph-field-legend {
    font-weight: 600;
    font-size: 0.9rem;
    margin-bottom: 0.65rem;
}

.mph-scene-options {
    display: grid;
    gap: 0.65rem;
}

.mph-scene-radio-card {
    display: flex;
    align-items: center;
    gap: 0.85rem;
    padding: 0.85rem 1rem;
    border-radius: 10px;
    background: var(--mph-surface-2);
    border: 1px solid var(--mph-border);
    cursor: pointer;
}

.mph-scene-radio-card.is-selected {
    border-color: var(--mph-accent);
    box-shadow: 0 0 0 2px var(--mph-accent);
}

.mph-scene-radio-meta {
    display: flex;
    flex-direction: column;
}

.mph-scene-radio-meta small {
    color: var(--mph-text-muted);
    font-size: 0.79rem;
}

.mph-ledger-header {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 1rem;
    margin-bottom: 1.25rem;
    flex-wrap: wrap;
}

.mph-ledger-table-wrap {
    overflow-x: auto;
}

.mph-ledger-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 0.88rem;
}

.mph-ledger-table th,
.mph-ledger-table td {
    padding: 0.8rem 0.9rem;
    text-align: left;
    border-bottom: 1px solid var(--mph-border);
}

.mph-ledger-table th {
    font-size: 0.75rem;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    color: var(--mph-text-muted);
}

.mph-num-col {
    text-align: right !important;
}

.mph-ledger-badge {
    display: inline-block;
    padding: 0.18rem 0.55rem;
    border-radius: 6px;
    background: var(--mph-surface-2);
    border: 1px solid var(--mph-border);
    font-size: 0.76rem;
    font-weight: 600;
}

/* Auth Pages, Forms & Dialog Modal */
.mph-auth-single-wrap {
    display: flex;
    justify-content: center;
}

.mph-auth-card {
    width: 100%;
    max-width: 540px;
    background: var(--mph-surface);
    border: 1px solid var(--mph-border-strong);
    border-radius: 16px;
    padding: 2rem;
    box-shadow: var(--mph-shadow);
}

.mph-auth-card-wide {
    max-width: 620px;
}

.mph-auth-subtitle,
.mph-card-sub {
    color: var(--mph-text-muted);
    font-size: 0.92rem;
    margin-bottom: 1.35rem;
}

.mph-form {
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.mph-form-columns {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 0.85rem;
}

.mph-field {
    display: flex;
    flex-direction: column;
    gap: 0.35rem;
}

.mph-field label {
    font-size: 0.86rem;
    font-weight: 600;
}

.mph-field-label-split {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.mph-subtle-link {
    font-size: 0.8rem;
}

.mph-field input,
.mph-field textarea {
    padding: 0.68rem 0.9rem;
    border-radius: 8px;
    border: 1px solid var(--mph-border);
    background: var(--mph-surface-2);
    color: var(--mph-text);
    font-family: inherit;
    font-size: 0.92rem;
}

.mph-field input:focus,
.mph-field textarea:focus,
.mph-search-input:focus,
.mph-select:focus {
    outline: 2px solid var(--mph-accent);
    outline-offset: 1px;
}

.mph-field-hint {
    font-size: 0.77rem;
    color: var(--mph-text-muted);
}

.mph-check-row {
    display: flex;
    align-items: flex-start;
    gap: 0.6rem;
    font-size: 0.85rem;
    color: var(--mph-text-muted);
    cursor: pointer;
}

.mph-check-row input {
    margin-top: 0.22rem;
    accent-color: var(--mph-accent);
    width: 16px;
    height: 16px;
    flex-shrink: 0;
}

.mph-auth-card-footer {
    margin-top: 1.35rem;
    padding-top: 1.1rem;
    border-top: 1px solid var(--mph-border);
    font-size: 0.88rem;
    text-align: center;
}

.mph-alert {
    padding: 0.9rem 1.1rem;
    border-radius: 10px;
    margin-bottom: 1.15rem;
    font-size: 0.9rem;
}

.mph-alert-error {
    background: rgba(239, 93, 96, 0.14);
    border: 1px solid var(--mph-danger);
    color: var(--mph-text);
}

.mph-alert-success {
    background: rgba(46, 196, 182, 0.14);
    border: 1px solid var(--mph-success);
    color: var(--mph-text);
}

/* Native Auth Dialog */
.mph-auth-dialog {
    width: min(560px, 94vw);
    background: var(--mph-surface);
    color: var(--mph-text);
    border: 1px solid var(--mph-border-strong);
    border-radius: 16px;
    padding: 0;
    box-shadow: var(--mph-shadow);
}

.mph-auth-dialog::backdrop {
    background: rgba(5, 8, 18, 0.74);
    backdrop-filter: blur(5px);
}

.mph-auth-dialog-inner {
    padding: 1.65rem;
}

.mph-auth-dialog-top {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 1rem;
}

.mph-auth-dialog-heading {
    font-size: 1.4rem;
    margin: 0;
}

.mph-dialog-close {
    background: var(--mph-surface-2);
    border: 1px solid var(--mph-border);
    color: var(--mph-text);
    border-radius: 8px;
    width: 34px;
    height: 34px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
}

.mph-auth-dialog-sub {
    font-size: 0.88rem;
    color: var(--mph-text-muted);
    margin: 0.5rem 0 1.1rem;
}

.mph-auth-tabs {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 0.5rem;
    margin-bottom: 1.2rem;
}

.mph-auth-tab {
    padding: 0.6rem 0.75rem;
    border-radius: 8px;
    border: 1px solid var(--mph-border);
    background: var(--mph-surface-2);
    color: var(--mph-text-muted);
    font-family: inherit;
    font-size: 0.82rem;
    font-weight: 700;
    cursor: pointer;
}

.mph-auth-tab.is-active {
    background: var(--mph-accent);
    color: var(--mph-accent-ink);
    border-color: var(--mph-accent);
}

/* Editorial Docs, Player Care & Support */
.mph-doc-layout {
    display: grid;
    grid-template-columns: 270px 1fr;
    gap: 2.25rem;
    align-items: start;
}

.mph-doc-toc {
    position: sticky;
    top: 94px;
}

.mph-toc-box {
    background: var(--mph-surface);
    border: 1px solid var(--mph-border);
    border-radius: 12px;
    padding: 1.25rem;
}

.mph-toc-heading {
    display: block;
    font-size: 0.78rem;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    color: var(--mph-accent);
    margin-bottom: 0.75rem;
}

.mph-toc-list {
    list-style: none;
    padding: 0;
    margin: 0;
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
    font-size: 0.86rem;
}

.mph-toc-list a {
    color: var(--mph-text-muted);
}

.mph-toc-list a:hover {
    color: var(--mph-accent);
}

.mph-doc-content {
    display: flex;
    flex-direction: column;
    gap: 1.75rem;
}

.mph-doc-section {
    background: var(--mph-surface);
    border: 1px solid var(--mph-border);
    border-radius: 14px;
    padding: 1.75rem;
}

.mph-sec-marker {
    display: inline-block;
    font-family: 'JetBrains Mono', monospace;
    font-size: 0.78rem;
    color: var(--mph-accent);
    background: var(--mph-surface-2);
    padding: 0.15rem 0.55rem;
    border-radius: 4px;
    margin-bottom: 0.5rem;
}

.mph-doc-bullets {
    padding-left: 1.2rem;
    color: var(--mph-text-muted);
}

.mph-doc-bullets li {
    margin-bottom: 0.5rem;
}

.mph-contact-spec-grid,
.mph-break-radios {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 0.85rem;
    margin: 1rem 0;
}

.mph-contact-spec,
.mph-break-option {
    background: var(--mph-surface-2);
    border: 1px solid var(--mph-border);
    border-radius: 10px;
    padding: 0.95rem;
    display: flex;
    flex-direction: column;
    gap: 0.2rem;
}

.mph-break-option {
    cursor: pointer;
}

.mph-break-box {
    margin-top: 1.25rem;
    padding: 1.5rem;
    border-radius: 12px;
    background: var(--mph-surface-2);
    border: 1px solid var(--mph-border-strong);
}

/* Support FAQ & Dispatch */
.mph-support-grid {
    display: grid;
    grid-template-columns: 1.1fr 0.9fr;
    gap: 2.25rem;
    align-items: start;
}

.mph-accordion-stack {
    display: flex;
    flex-direction: column;
    gap: 0.85rem;
    margin-bottom: 1.5rem;
}

.mph-faq-item {
    background: var(--mph-surface);
    border: 1px solid var(--mph-border);
    border-radius: 12px;
    padding: 1rem 1.25rem;
}

.mph-faq-item summary {
    font-weight: 700;
    cursor: pointer;
    font-size: 0.96rem;
}

.mph-faq-body {
    padding-top: 0.75rem;
    margin-top: 0.75rem;
    border-top: 1px solid var(--mph-border);
    color: var(--mph-text-muted);
    font-size: 0.9rem;
}

.mph-direct-contact-card,
.mph-consent-control-card {
    background: var(--mph-surface);
    border: 1px solid var(--mph-border-strong);
    border-radius: 12px;
    padding: 1.4rem;
}

.mph-ref-code {
    display: inline-block;
    padding: 0.15rem 0.5rem;
    background: var(--mph-surface-2);
    border: 1px solid var(--mph-accent);
    border-radius: 4px;
    font-family: 'JetBrains Mono', monospace;
    color: var(--mph-accent);
}

.mph-consent-live-status {
    font-size: 1.1rem;
    font-weight: 700;
    color: var(--mph-accent);
    margin: 0.25rem 0 1rem;
}

.mph-consent-btn-group {
    display: flex;
    gap: 0.75rem;
    margin-bottom: 1rem;
    flex-wrap: wrap;
}

/* Footer */
.mph-footer {
    background: var(--mph-bg-alt);
    border-top: 1px solid var(--mph-border-strong);
    padding: 3.5rem 0 2.5rem;
    margin-top: auto;
}

.mph-footer-grid {
    display: grid;
    grid-template-columns: 1.4fr 1fr 1fr 1fr;
    gap: 2rem;
    margin-bottom: 2.5rem;
}

.mph-footer-blurb {
    color: var(--mph-text-muted);
    font-size: 0.88rem;
    margin: 0.85rem 0;
}

.mph-footer-contact p {
    margin: 0.25rem 0;
    font-size: 0.84rem;
    color: var(--mph-text-muted);
}

.mph-footer-heading {
    font-size: 0.95rem;
    margin-bottom: 0.85rem;
    color: var(--mph-accent);
}

.mph-footer-links {
    list-style: none;
    padding: 0;
    margin: 0;
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
    font-size: 0.87rem;
}

.mph-footer-links a,
.mph-footer-link-btn {
    color: var(--mph-text-muted);
    background: none;
    border: 0;
    padding: 0;
    font: inherit;
    cursor: pointer;
    text-align: left;
}

.mph-footer-links a:hover,
.mph-footer-link-btn:hover {
    color: var(--mph-accent);
}

.mph-footer-compliance {
    padding-top: 1.75rem;
    border-top: 1px solid var(--mph-border);
}

.mph-compliance-pill-row {
    display: flex;
    gap: 0.75rem;
    align-items: center;
    flex-wrap: wrap;
    font-size: 0.8rem;
    font-weight: 600;
    margin-bottom: 0.75rem;
}

.mph-compliance-copy {
    font-size: 0.8rem;
    color: var(--mph-text-muted);
    margin: 0 0 1rem;
}

.mph-footer-bottom {
    display: flex;
    justify-content: space-between;
    font-size: 0.78rem;
    color: var(--mph-text-muted);
    flex-wrap: wrap;
    gap: 0.5rem;
}

/* Consent Banner, Reminder Card & Toast */
.mph-consent-banner {
    position: fixed;
    bottom: 1rem;
    left: 1rem;
    right: 1rem;
    z-index: 110;
    background: var(--mph-surface);
    border: 1px solid var(--mph-border-strong);
    border-radius: 14px;
    padding: 1.1rem 0;
    box-shadow: var(--mph-shadow);
}

.mph-consent-inner {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1.25rem;
    flex-wrap: wrap;
}

.mph-consent-copy p {
    margin: 0.25rem 0 0;
    font-size: 0.84rem;
    color: var(--mph-text-muted);
    max-width: 74ch;
}

.mph-consent-actions {
    display: flex;
    gap: 0.6rem;
    flex-shrink: 0;
}

.mph-reminder-card {
    position: fixed;
    bottom: 1.25rem;
    right: 1.25rem;
    width: min(390px, 92vw);
    background: var(--mph-surface);
    border: 2px solid var(--mph-accent);
    border-radius: 14px;
    padding: 1.15rem;
    box-shadow: var(--mph-shadow);
    z-index: 115;
    display: flex;
    gap: 0.85rem;
}

.mph-reminder-icon {
    font-size: 1.5rem;
}

.mph-reminder-content p {
    margin: 0.35rem 0 0.75rem;
    font-size: 0.84rem;
    color: var(--mph-text-muted);
}

.mph-reminder-actions {
    display: flex;
    gap: 0.5rem;
}

.mph-toast {
    position: fixed;
    bottom: 1.4rem;
    left: 50%;
    transform: translateX(-50%);
    background: var(--mph-accent);
    color: var(--mph-accent-ink);
    font-weight: 700;
    font-size: 0.88rem;
    padding: 0.65rem 1.25rem;
    border-radius: 999px;
    box-shadow: var(--mph-shadow);
    z-index: 150;
}

/* Mobile Tabbar */
.mph-mobile-tabbar {
    display: none;
}

@media (max-width: 960px) {
    .mph-hero-grid,
    .mph-detail-grid,
    .mph-detail-rules-grid,
    .mph-play-gate-grid,
    .mph-profile-grid,
    .mph-scenes-banner,
    .mph-care-panel,
    .mph-doc-layout,
    .mph-support-grid,
    .mph-player-specs-body {
        grid-template-columns: 1fr;
    }

    .mph-footer-grid {
        grid-template-columns: 1fr 1fr;
    }

    .mph-nav {
        display: none;
    }

    .mph-doc-toc {
        position: static;
    }

    body.mph-body {
        padding-bottom: 68px;
    }

    .mph-mobile-tabbar {
        position: fixed;
        bottom: 0;
        left: 0;
        right: 0;
        height: 62px;
        background: var(--mph-surface-glass);
        backdrop-filter: blur(14px);
        border-top: 1px solid var(--mph-border-strong);
        display: grid;
        grid-template-columns: repeat(5, 1fr);
        z-index: 100;
    }

    .mph-tabbar-item {
        display: flex;
        flex-direction: column;
        align-items: center;
        justify-content: center;
        gap: 3px;
        font-size: 0.7rem;
        font-weight: 600;
        color: var(--mph-text-muted);
        background: none;
        border: 0;
        cursor: pointer;
        font-family: inherit;
    }

    .mph-tabbar-item.is-active,
    .mph-tabbar-survey {
        color: var(--mph-accent);
    }
}

@media (max-width: 640px) {
    .mph-filter-top-row,
    .mph-form-columns,
    .mph-specs-2x2,
    .mph-contact-spec-grid,
    .mph-break-radios,
    .mph-footer-grid {
        grid-template-columns: 1fr;
    }
}
