.pf {
    --pf-cyan: #74e5df;
    --pf-pink: #ff6281;
    --pf-cream: #f3efdb;
    background: #10172b;
    color: var(--pf-cream);
    padding: 65px 20px 60px;
    font-family: "DM Sans", "Microsoft JhengHei", sans-serif;
    line-height: 1.6;
    margin-top: -40px;
}

.pf * {
    box-sizing: border-box
}

.pf-wrap {
    max-width: 1080px;
    margin: auto
}

.pf p,
.pf h1,
.pf h2 {
    margin: 0
}

.pf a {
    color: var(--pf-cyan)
}

.pf button {
    font: inherit;
    cursor: pointer
}

.pf button:focus-visible,
.pf a:focus-visible,
.pf summary:focus-visible,
.pf canvas:focus-visible {
    outline: 3px solid #ffd588;
    outline-offset: 4px
}

.pf [hidden] {
    display: none !important
}

.pf-intro {
    display: flex;
    justify-content: space-between;
    align-items: end;
    gap: 24px;
    margin-bottom: 28px
}

.pf-eyebrow {
    font-size: 10px;
    font-weight: 800;
    letter-spacing: 2px;
    color: #a9b7ce;
    margin-bottom: 13px !important
}

.pf-eyebrow span,
.pf-live-dot {
    display: inline-block;
    width: 6px;
    height: 6px;
    background: var(--pf-pink);
    box-shadow: 0 0 10px #ff628188;
    border-radius: 50%;
    margin-right: 6px
}

.pf-eyebrow b {
    margin-left: 12px;
    font-size: 9px;
    color: #64748f
}

.pf h1 {
    font-family: Impact, "Arial Black", sans-serif;
    font-size: clamp(38px, 5vw, 66px);
    line-height: .97;
    letter-spacing: -1px;
    font-weight: 900;
    font-style: italic;
    text-shadow: 3px 3px 0 #253851
}

.pf h1 em {
    color: var(--pf-pink);
    font-style: inherit
}

.pf h1 small {
    display: block;
    color: var(--pf-cream);
    font: 700 16px "Microsoft JhengHei", sans-serif;
    letter-spacing: 8px;
    margin-top: 13px
}

.pf-tagline {
    color: #6f8da7;
    font-size: 9px;
    font-weight: 800;
    letter-spacing: 3px;
    margin-top: 14px !important
}

.pf-brief>span {
    color: var(--pf-cyan);
    font-size: 9px;
    letter-spacing: 2px;
    font-weight: 800
}

.pf-brief p {
    font-size: 13px;
    line-height: 1.9;
    color: #c2ccdc;
    margin: 8px 0 12px
}

.pf-brief a {
    font-size: 11px;
    text-underline-offset: 4px;
    text-decoration: underline
}

.pf-cabinet {
    border: 1px solid #35445e;
    border-radius: 13px;
    overflow: hidden;
    background: #11192b;
    box-shadow: 0 18px 55px #0005
}

.pf-topbar {
    padding: 12px 18px;
    background: #1b253b;
    border-bottom: 1px solid #36435d;
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 12px
}

.pf-topbar>div {
    display: flex;
    align-items: center;
    gap: 11px
}

.pf-topbar strong {
    font-size: 11px;
    letter-spacing: 1.5px
}

.pf-live-dot {
    background: var(--pf-cyan);
    box-shadow: 0 0 10px #74e5df77;
    width: 5px;
    height: 5px;
    margin: 0
}

.pf-edition {
    color: #7788a3;
    font-size: 8px;
    letter-spacing: 1px
}

.pf-topbar button {
    font-size: 11px;
    color: #b7c4d6;
    background: transparent;
    border: 0;
    border-left: 1px solid #35445a;
    padding: 3px 0 3px 12px;
    min-height: 30px
}

.pf-topbar button:hover {
    color: #fff
}

.pf-hud {
    display: grid;
    grid-template-columns: 1fr 1fr auto;
    gap: 28px;
    padding: 15px 22px;
    background: #111b31
}

.pf-health>span {
    display: flex;
    justify-content: space-between;
    font-size: 9px;
    letter-spacing: 1px;
    font-weight: 800;
    color: #b7c7dc;
    margin-bottom: 6px
}

.pf-health b {
    color: #f3efd9
}

.pf-health>div {
    height: 9px;
    background: #34364b;
    border: 1px solid #58616a;
    transform: skewX(-12deg);
    padding: 1px
}

.pf-health i {
    display: block;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, #e9797c, #ffc28e);
    transition: width .1s
}

.pf-cargo-health i {
    background: linear-gradient(90deg, #278d9e, #83ede2)
}

.pf-score {
    min-width: 100px;
    text-align: right;
    line-height: 1.2
}

.pf-score span {
    display: block;
    font-size: 9px;
    color: #a8b6cb;
    letter-spacing: 2px
}

.pf-score strong {
    font: 700 22px monospace;
    color: #ffe2a0
}

.pf-viewport {
    position: relative;
    background: #10172b;
    isolation: isolate
}

.pf canvas {
    display: block;
    width: 100%;
    height: auto;
    aspect-ratio: 2/1;
    image-rendering: pixelated
}

.pf-stage-caption {
    position: absolute;
    bottom: 11px;
    left: 20px;
    right: 20px;
    display: flex;
    justify-content: space-between;
    gap: 12px;
    color: #c9d4df;
    font-size: 9px;
    font-weight: 800;
    letter-spacing: 1px;
    pointer-events: none;
    text-shadow: 1px 1px #000
}

.pf-stage-caption span:first-child {
    color: var(--pf-cyan)
}

.pf-overlay {
    position: absolute;
    inset: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 20px;
    background: linear-gradient(90deg, #0c132b5c, #0c132b9e 40%, #0c132b5c);
    z-index: 2
}

.pf-panel {
    text-align: center;
    padding: 25px 32px;
    background: #111a30ed;
    border: 1px solid #67849966;
    max-width: 480px;
    box-shadow: 8px 8px 0 #08102455;
    position: relative
}

.pf-panel::before {
    content: '';
    position: absolute;
    top: -1px;
    left: 32%;
    width: 36%;
    height: 3px;
    background: var(--pf-pink)
}

.pf-panel-kicker {
    font-size: 9px;
    letter-spacing: 2px;
    color: var(--pf-cyan);
    font-weight: 800;
    margin-bottom: 13px !important
}

.pf-panel h2 {
    font: 800 29px "Microsoft JhengHei", sans-serif;
    line-height: 1.5;
    color: var(--pf-cream);
    margin-bottom: 10px
}

.pf-panel h2 em {
    font-style: normal;
    color: #ff9cab
}

.pf-panel>p:not(.pf-panel-kicker) {
    font-size: 11px;
    line-height: 1.8;
    color: #a8bad1;
    max-width: 360px;
    margin: 0 auto 16px
}

.pf-primary,
.pf-secondary {
    border: 0;
    padding: 12px 22px;
    min-height: 44px;
    font-size: 12px !important;
    font-weight: 800 !important;
    letter-spacing: 1px;
    background: var(--pf-pink);
    color: #151c30;
    box-shadow: 0 3px 0 #b23c62
}

.pf-primary:hover {
    background: #ff8c9f
}

.pf-primary span {
    display: block;
    font-size: 10px;
    letter-spacing: 0;
    font-weight: 500;
    margin-top: 3px
}

.pf-secondary {
    background: #2b3b52;
    color: #e4e8df;
    box-shadow: none
}

.pf-service {
    display: block;
    font-size: 10px;
    margin-top: 12px;
    text-decoration: underline;
    text-underline-offset: 4px
}

.pf-panel-stats {
    display: flex;
    gap: 20px;
    justify-content: center;
    color: #ffe19b;
    font: 700 16px monospace;
    margin-bottom: 17px
}

.pf-game-status {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 15px;
    padding: 11px 20px;
    background: #202a40;
    border-top: 1px solid #3a4560
}

.pf-game-status p {
    font-size: 11px;
    color: #b9c7da
}

.pf-game-status>span {
    font-size: 9px;
    white-space: nowrap;
    font-weight: 700;
    letter-spacing: .5px;
    color: var(--pf-cyan)
}

.pf-controls {
    display: flex;
    justify-content: space-between;
    gap: 20px;
    padding: 16px 20px;
    background: #172036;
    touch-action: none;
    user-select: none
}

.pf-dpad,
.pf-attacks {
    display: flex;
    gap: 9px
}

.pf-controls button {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    min-width: 56px;
    height: 54px;
    padding: 6px 14px;
    border: 1px solid #44536c;
    border-radius: 7px;
    background: linear-gradient(#2d3c54, #1c2b43);
    color: #e1e6e1;
    font-weight: 800;
    box-shadow: 0 4px 0 #0b1326;
    touch-action: none;
    -webkit-user-select: none;
    user-select: none;
    -webkit-touch-callout: none
}

.pf-controls button small {
    font-size: 8px;
    color: #8399b5;
    font-weight: 500;
    margin-top: 2px
}

.pf-controls button.is-held,
.pf-controls button:active {
    transform: translateY(3px);
    box-shadow: 0 1px 0 #0b1326;
    background: #45647a
}

.pf-controls .pf-punch {
    color: #ffc480;
    border-color: #896654
}

.pf-controls .pf-kick {
    color: #ff91aa;
    border-color: #8e536e
}

.pf-controls .pf-special {
    color: #80efdf;
    border-color: #488e98;
    min-width: 124px;
    font-size: 12px
}

.pf-footerline {
    display: flex;
    justify-content: space-between;
    gap: 12px;
    padding: 11px 20px;
    border-top: 1px solid #293650;
    font-size: 9px;
    color: #657b97
}

.pf-footerline strong {
    color: #cbd7d8;
    font: 700 10px monospace;
    letter-spacing: 1px;
    margin-left: 7px
}

.pf-route {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    list-style: none;
    padding: 0;
    margin: 25px 0 0;
    border: 1px solid #303d53;
    border-radius: 9px;
    overflow: hidden
}

.pf-route li {
    padding: 18px 20px;
    border-right: 1px solid #303d53;
    position: relative;
    background: #151e32
}

.pf-route li:last-child {
    border-right: 0
}

.pf-route span {
    font-size: 8px;
    letter-spacing: 1px;
    color: #6f829d;
    display: block
}

.pf-route strong {
    font-size: 13px;
    color: #c8d3dd;
    display: block;
    margin: 7px 0
}

.pf-route small {
    font-size: 10px;
    color: #748aa1
}

.pf-route .is-current {
    background: #203145;
    box-shadow: inset 0 3px 0 var(--pf-cyan)
}

.pf-route .is-current strong {
    color: #85e4df
}

.pf-route .is-complete span::after {
    content: ' ✓';
    color: #8be4bf
}

.pf-help {
    border-top: 1px solid #2d3b50;
    padding-top: 18px;
    margin-top: 25px
}

.pf-help summary {
    display: flex;
    justify-content: space-between;
    cursor: pointer;
    font-size: 12px;
    color: #bacbda;
    list-style: none
}

.pf-help summary::-webkit-details-marker {
    display: none
}

.pf-help>div {
    columns: 2;
    column-gap: 30px;
    margin-top: 20px
}

.pf-help p {
    font-size: 11px;
    line-height: 1.9;
    color: #91a4bc;
    margin-bottom: 15px;
    break-inside: avoid
}

.pf-help strong {
    color: #d1d9df
}

.pf-dialog {
    border: 1px solid #4e657e;
    background: #19243b;
    color: #e9eddc;
    border-radius: 10px;
    padding: 25px;
    max-width: min(420px, 90vw)
}

.pf-dialog::backdrop {
    background: #091127ba
}

.pf-dialog h2 {
    font-size: 21px;
    margin-bottom: 14px
}

.pf-dialog p {
    font-size: 13px;
    margin-bottom: 22px;
    color: #aabbce
}

.pf-dialog form>div {
    display: flex;
    gap: 10px;
    justify-content: end
}

.pf-noscript {
    padding: 20px;
    color: #ffc480
}

.pf-controls button:disabled {
    opacity: .5;
    cursor: default
}

.pf canvas:focus:not(:focus-visible) {
    outline: none
}

@media(max-width:800px) {
    .pf {
        padding: 48px 12px 40px;
        margin-top: -40px;
    }

    .pf-intro {
        display: block
    }

    .pf h1 {
        font-size: clamp(35px, 7vw, 53px)
    }

    .pf-brief {
        margin-top: 21px
    }

    .pf-brief p {
        font-size: 12px
    }

    .pf-topbar {
        padding: 10px 12px
    }

    .pf-topbar strong {
        font-size: 9px;
        letter-spacing: .8px
    }

    .pf-topbar>div {
        gap: 7px
    }

    .pf-edition {
        display: none
    }

    .pf-topbar button {
        font-size: 10px;
        padding-left: 8px
    }

    .pf-hud {
        padding: 12px;
        gap: 12px;
        grid-template-columns: 1fr 1fr 68px
    }

    .pf-score {
        min-width: 0
    }

    .pf-score strong {
        font-size: 18px
    }

    .pf-health>span {
        font-size: 8px;
        letter-spacing: 0
    }

    .pf-stage-caption {
        font-size: 7px;
        left: 10px;
        right: 10px;
        letter-spacing: 0;
        bottom: 5px
    }

    .pf-panel {
        padding: 16px 20px;
        max-width: 370px
    }

    .pf-panel h2 {
        font-size: 22px;
        margin-bottom: 7px
    }

    .pf-panel-kicker {
        font-size: 8px;
        margin-bottom: 8px !important
    }

    .pf-panel>p:not(.pf-panel-kicker) {
        font-size: 10px;
        margin-bottom: 12px
    }

    .pf-primary {
        padding: 9px 18px
    }

    .pf-panel-stats {
        font-size: 13px;
        margin-bottom: 12px
    }

    .pf-service {
        font-size: 10px;
        margin-top: 8px
    }

    .pf-game-status {
        padding: 10px 12px;
        display: block
    }

    .pf-game-status p {
        font-size: 10px
    }

    .pf-game-status>span {
        display: block;
        font-size: 8px;
        margin-top: 4px
    }

    .pf-controls {
        padding: 12px;
        gap: 10px
    }

    .pf-dpad,
    .pf-attacks {
        gap: 5px
    }

    .pf-controls button {
        min-width: 40px;
        height: 50px;
        padding: 5px 9px;
        font-size: 14px
    }

    .pf-controls button small {
        font-size: 6px
    }

    .pf-controls .pf-special {
        min-width: 78px;
        font-size: 10px
    }

    .pf-footerline {
        padding: 10px 12px;
        font-size: 8px
    }

    .pf-footerline span:last-child {
        display: none
    }

    .pf-route {
        grid-template-columns: 1fr 1fr
    }

    .pf-route li {
        padding: 14px
    }

    .pf-route li:nth-child(2) {
        border-right: 0
    }

    .pf-route li:nth-child(-n+2) {
        border-bottom: 1px solid #303d53
    }

    .pf-route strong {
        font-size: 12px
    }

    .pf-route small {
        font-size: 9px
    }

    .pf-help>div {
        columns: 1
    }
}

@media(max-width:560px) {
    .pf-viewport {
        min-height: 300px
    }

    .pf canvas {
        height: 300px;
        object-fit: contain;
        background: #0c1529
    }

    .pf-overlay {
        padding: 12px
    }

    .pf-panel {
        padding: 17px 18px;
        width: 100%;
        max-width: 340px
    }

    .pf-panel h2 {
        font-size: 21px
    }

    .pf-panel>p:not(.pf-panel-kicker) {
        font-size: 10px
    }

    .pf-controls {
        flex-wrap: wrap;
        justify-content: center
    }

    .pf-dpad,
    .pf-attacks {
        flex: 1;
        justify-content: center
    }

    .pf-controls button {
        min-width: 43px;
        height: 49px
    }

    .pf-dpad {
        flex-basis: 100%
    }

    .pf-attacks button {
        min-width: 62px
    }

    .pf-attacks .pf-special {
        min-width: 122px
    }

    .pf h1 em {
        display: block
    }

    .pf-stage-caption {
        bottom: 8px
    }

    .pf-intro {
        margin-bottom: 20px
    }
}

@media(prefers-reduced-motion:reduce) {
    .pf-health i {
        transition: none
    }
}

.pf h1 {
    color: var(--pf-cream)
}

@media(max-width:560px) {
    .pf-viewport {
        display: grid;
        grid-template-columns: minmax(0, 1fr)
    }

    .pf canvas {
        grid-area: 1/1;
        min-width: 0;
        align-self: center
    }

    .pf-overlay {
        position: relative;
        inset: auto;
        grid-area: 1/1;
        min-height: 300px
    }
}

@media(max-width:350px) {
    .pf-attacks button {
        min-width: 50px
    }

    .pf-attacks .pf-special {
        min-width: 108px
    }
}