:root {
    color-scheme: dark;
    --neon: #4ff2c8;
    --amber: #ffcf4d;
    --ink: #03110c;
    --bg: #05080a;
}

* {
    box-sizing: border-box;
}

html,
body {
    margin: 0;
    height: 100%;
    overflow: hidden;
    background: var(--bg);
    /* Retro terminal feel; the in-game HUD is drawn on the canvas. */
    font-family: "Courier New", ui-monospace, monospace;
    /* Prevent touch scrolling / callouts on mobile so the map stays put. */
    touch-action: none;
    -webkit-user-select: none;
    user-select: none;
    overscroll-behavior: none;
    -webkit-tap-highlight-color: transparent;
}

#stage {
    position: fixed;
    inset: 0;
}

canvas {
    display: block;
    width: 100%;
    height: 100%;
}

/* ---- Retro menu / how-to screens (overlays above the canvas) ---- */
.screen {
    position: fixed;
    inset: 0;
    z-index: 10;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: clamp(14px, 3vh, 26px);
    padding: clamp(16px, 5vw, 40px);
    color: #cfeee6;
    text-align: center;
    overflow: auto;
    background:
        radial-gradient(130% 90% at 50% -10%, rgba(79, 242, 200, 0.10), transparent 60%),
        var(--bg);
}

/* subtle CRT scanlines */
.screen::before {
    content: "";
    position: absolute;
    inset: 0;
    pointer-events: none;
    background: repeating-linear-gradient(rgba(0, 0, 0, 0) 0 2px, rgba(0, 0, 0, 0.22) 2px 4px);
}

.hidden {
    display: none !important;
}

.logo {
    margin: 0;
    font-weight: 800;
    letter-spacing: 2px;
    font-size: clamp(34px, 11vw, 74px);
    line-height: 1;
    color: var(--neon);
    text-shadow: 0 0 12px rgba(79, 242, 200, 0.7), 0 0 30px rgba(79, 242, 200, 0.35);
}

.logo em {
    font-style: normal;
    color: var(--amber);
    text-shadow: 0 0 12px rgba(255, 207, 77, 0.7);
}

.tag {
    margin: -6px 0 0;
    color: #6f8f88;
    letter-spacing: 3px;
    font-size: clamp(10px, 2.6vw, 13px);
    text-transform: uppercase;
}

.panel {
    width: min(92vw, 440px);
    border: 2px solid var(--neon);
    border-radius: 12px;
    background: rgba(4, 14, 13, 0.6);
    box-shadow: 0 0 18px rgba(79, 242, 200, 0.25), inset 0 0 22px rgba(79, 242, 200, 0.06);
    padding: clamp(14px, 4vw, 22px);
    display: flex;
    flex-direction: column;
    gap: clamp(12px, 3vw, 18px);
}

.field {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 8px;
}

.lbl {
    color: #6f8f88;
    letter-spacing: 2px;
    font-size: clamp(10px, 2.6vw, 13px);
    text-transform: uppercase;
}

.stepper {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 12px;
    width: 100%;
}

.val {
    color: var(--neon);
    font-size: clamp(17px, 5vw, 24px);
    letter-spacing: 1px;
    min-width: 10ch;
}

.val.amber {
    color: var(--amber);
}

.hi .val {
    font-size: clamp(26px, 8vw, 40px);
    min-width: 0;
    text-shadow: 0 0 12px rgba(255, 207, 77, 0.5);
}

.arrow,
.mode,
.btn {
    font-family: inherit;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 1px;
    color: var(--neon);
    background: rgba(79, 242, 200, 0.06);
    border: 2px solid var(--neon);
    border-radius: 10px;
    cursor: pointer;
    transition: background .1s, color .1s, box-shadow .1s;
}

.arrow {
    width: 48px;
    height: 48px;
    font-size: 20px;
    display: grid;
    place-items: center;
    flex: none;
}

.arrow:active {
    background: var(--neon);
    color: var(--ink);
}

.modes {
    display: flex;
    gap: 8px;
    width: 100%;
}

.mode {
    flex: 1;
    padding: 12px 4px;
    font-size: clamp(12px, 3.2vw, 15px);
}

.mode.active {
    background: var(--neon);
    color: var(--ink);
    box-shadow: 0 0 14px rgba(79, 242, 200, 0.5);
}

.btn {
    width: min(92vw, 440px);
    padding: 16px;
    font-size: clamp(16px, 4.4vw, 20px);
}

/* Buttons inside a panel fill it rather than the full screen width. */
.panel .btn {
    width: 100%;
}

.btn.big {
    color: var(--ink);
    background: var(--neon);
    box-shadow: 0 0 18px rgba(79, 242, 200, 0.5);
}

.btn.big:active {
    box-shadow: 0 0 26px rgba(79, 242, 200, 0.85);
}

.btn.ghost {
    background: transparent;
}

.btn.ghost:active {
    background: rgba(79, 242, 200, 0.12);
}

/* ---- How to Play: a slideshow ---- */
#howto {
    gap: clamp(8px, 2vh, 16px);
    justify-content: flex-start;
    padding-top: clamp(12px, 3vh, 26px);
    padding-bottom: clamp(12px, 3vh, 26px);
}

.howtitle {
    margin: 0;
    color: var(--neon);
    letter-spacing: 2px;
    text-shadow: 0 0 10px rgba(79, 242, 200, 0.5);
    font-size: clamp(20px, 5vw, 28px);
}

.slidecount {
    margin-left: 8px;
    color: #7fb9ac;
    font-size: 0.6em;
    letter-spacing: 1px;
}

.slide {
    position: relative;
    z-index: 1;
    width: min(calc(100vw - 92px), 760px);
    flex: 1 1 auto;
    min-height: 0;
    overflow-y: auto;
    overflow-x: hidden;
    touch-action: pan-y;
    text-align: left;
    border: 2px solid var(--neon);
    border-radius: 12px;
    background: rgba(4, 14, 13, 0.7);
    box-shadow: 0 0 18px rgba(79, 242, 200, 0.2);
    padding: clamp(12px, 3vw, 20px);
    color: #cfeee6;
    -webkit-overflow-scrolling: touch;
}

.stitle {
    margin: 0 0 10px;
    color: var(--amber);
    letter-spacing: 1px;
    font-size: clamp(17px, 4.6vw, 24px);
    line-height: 1.3;
}

.shots {
    display: grid;
    gap: 10px;
    grid-template-columns: 1fr;
    margin-bottom: 12px;
}

@media (min-width: 700px) {
    .shots.n2 {
        grid-template-columns: 1fr 1fr;
    }
}

.shot {
    position: relative;
    margin: 0;
    aspect-ratio: 4 / 3;
    overflow: hidden;
    border: 2px solid rgba(79, 242, 200, 0.55);
    border-radius: 10px;
    background: #000;
    container-type: inline-size;
}

.shot img {
    display: block;
    width: 100%;
    height: 100%;
    pointer-events: none;
}

/* slowly blinking markers on top of a screenshot */
.mk {
    position: absolute;
    pointer-events: none;
    animation: mkblink 2.6s ease-in-out infinite;
}

.mk.box,
.mk.ring {
    border: 3px solid var(--amber);
    box-shadow: 0 0 10px rgba(255, 207, 77, 0.85), inset 0 0 8px rgba(255, 207, 77, 0.35);
}

.mk.box {
    border-radius: 8px;
}

.mk.ring {
    border-radius: 50%;
}

.mk.arrow {
    aspect-ratio: 1;
    filter: drop-shadow(0 0 4px rgba(255, 207, 77, 0.9));
}

.mk.arrow svg {
    display: block;
    width: 100%;
    height: 100%;
}

@keyframes mkblink {
    0%,
    100% {
        opacity: 0.15;
    }

    50% {
        opacity: 1;
    }
}

/* the banked amount that floats up and fades: SVG text in the picture's gem colour with one
   dark outline (an HTML text-shadow outline looked like several copies on phones) */
.floatamt {
    position: absolute;
    width: 22%;
    transform: translate(-50%, -50%);
    opacity: 0;
    pointer-events: none;
    overflow: visible;
}

.floatamt.go {
    animation: floatup 2.2s ease-out forwards;
}

@keyframes floatup {
    0% {
        opacity: 1;
        transform: translate(-50%, -50%);
    }

    45% {
        opacity: 1;
    }

    100% {
        opacity: 0;
        transform: translate(-50%, -50%) translateY(-12cqw);
    }
}

.slines {
    margin: 0;
    padding-left: 1.2em;
    line-height: 1.55;
    font-size: clamp(14px, 3.8vw, 17px);
}

.slines li {
    margin-bottom: 2px;
}

.slines b {
    color: var(--neon);
}

.slines.hint {
    padding-left: 0;
    margin-top: 12px;
    color: #7fb9ac;
}

/* slide navigation: an arrow on each side of the screen */
.slidenav {
    position: fixed;
    top: 50%;
    transform: translateY(-50%);
    z-index: 12;
    width: 40px;
    height: 76px;
    padding: 0;
    font-size: 20px;
    color: var(--neon);
    background: rgba(4, 14, 13, 0.85);
    border: 2px solid var(--neon);
    border-radius: 10px;
    cursor: pointer;
    box-shadow: 0 0 12px rgba(79, 242, 200, 0.4);
}

.slidenav.left {
    left: 6px;
}

.slidenav.right {
    right: 6px;
}

.slidenav:active {
    background: var(--neon);
    color: var(--ink);
}

.dots {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 6px;
    max-width: min(94vw, 460px);
}

.dot {
    width: 11px;
    height: 11px;
    padding: 0;
    border-radius: 50%;
    border: 1.5px solid var(--neon);
    background: transparent;
    cursor: pointer;
}

.dot.on {
    background: var(--neon);
    box-shadow: 0 0 8px rgba(79, 242, 200, 0.8);
}

/* steering slide: keys and a phone */
.steer {
    display: grid;
    gap: 14px;
}

@media (min-width: 700px) {
    .steer {
        grid-template-columns: 1fr 1fr;
    }
}

.steerbox h3 {
    margin: 0 0 8px;
    color: var(--neon);
    font-size: 1em;
    letter-spacing: 1px;
}

.keys {
    display: grid;
    grid-template-columns: repeat(3, 56px);
    gap: 6px;
    justify-content: center;
    margin-bottom: 12px;
}

.kbd {
    display: inline-grid;
    place-items: center;
    min-width: 40px;
    height: 40px;
    padding: 0 10px;
    border: 2px solid #7fb9ac;
    border-bottom-width: 5px;
    border-radius: 8px;
    background: #0b1b19;
    color: #e8fff8;
    font-weight: 800;
    line-height: 1;
}

.keys .kbd {
    width: 56px;
    height: 56px;
    font-size: 22px;
    padding: 0;
}

.kbd small {
    display: block;
    margin-top: 2px;
    font-size: 11px;
    color: #7fb9ac;
}

.kbd.hl {
    animation: kbdblink 2.6s ease-in-out infinite;
}

@keyframes kbdblink {
    0%,
    100% {
        border-color: #7fb9ac;
        box-shadow: none;
    }

    50% {
        border-color: var(--amber);
        box-shadow: 0 0 12px rgba(255, 207, 77, 0.9);
    }
}

.d1 {
    animation-delay: 0.8s !important;
}

.d2 {
    animation-delay: 1.6s !important;
}

.phone {
    position: relative;
    aspect-ratio: 2 / 1;
    margin: 0 auto 12px;
    width: min(100%, 300px);
    border: 3px solid #7fb9ac;
    border-radius: 18px;
    background: #0b1b19;
    overflow: hidden;
}

.phone .half,
.phone .both {
    position: absolute;
    display: grid;
    place-items: center;
    text-align: center;
    font-size: 12px;
    font-weight: 700;
    color: #cfeee6;
    animation: halfblink 2.6s ease-in-out infinite;
}

.phone .half {
    top: 0;
    bottom: 0;
    width: 50%;
}

.phone .half.left {
    left: 0;
    border-right: 1px dashed #7fb9ac;
}

.phone .half.right {
    right: 0;
}

.phone .both {
    left: 0;
    right: 0;
    top: 6px;
    height: 20px;
}

.phone .flip {
    position: absolute;
    left: 50%;
    bottom: 6px;
    transform: translateX(-50%);
    width: 34px;
    height: 34px;
    display: grid;
    place-items: center;
    border: 2px solid var(--neon);
    border-radius: 50%;
    color: var(--neon);
    font-size: 20px;
    animation: halfblink 2.6s ease-in-out infinite;
}

@keyframes halfblink {
    0%,
    100% {
        background-color: transparent;
    }

    50% {
        background-color: rgba(255, 207, 77, 0.3);
    }
}

.keylist {
    margin: 0;
    padding: 0;
    list-style: none;
    display: grid;
    gap: 8px;
    font-size: clamp(14px, 3.8vw, 17px);
}

.keylist li {
    display: flex;
    align-items: center;
    gap: 10px;
}

.keylist b {
    color: var(--neon);
}

/* "more below" hint on a slide that doesn't fit */
.slide.more::after {
    content: "\25BE  more below";
    position: sticky;
    bottom: 0;
    display: block;
    margin-top: 4px;
    padding: 14px 0 2px;
    text-align: center;
    font-size: 12px;
    font-weight: 700;
    letter-spacing: 1px;
    color: var(--amber);
    background: linear-gradient(rgba(4, 14, 13, 0), rgba(4, 14, 13, 0.97) 55%);
    pointer-events: none;
}

/* Phones held upright: narrower arrows, smaller type, two pictures side by side. */
@media (max-width: 560px) {
    #howto {
        gap: 8px;
        padding: 10px 6px;
    }

    .howtitle {
        font-size: 18px;
    }

    .slide {
        width: calc(100vw - 80px);
        padding: 10px 12px;
    }

    .stitle {
        font-size: 16px;
        margin-bottom: 8px;
    }

    .slines,
    .keylist {
        font-size: 14px;
        line-height: 1.42;
    }

    .keylist {
        gap: 5px;
    }

    .keylist .kbd {
        height: 32px;
        min-width: 34px;
        padding: 0 7px;
    }

    .shots {
        gap: 6px;
        margin-bottom: 8px;
    }

    .shots.n2 {
        grid-template-columns: 1fr 1fr;
    }

    .slidenav {
        width: 32px;
        height: 64px;
        font-size: 16px;
    }

    .slidenav.left {
        left: 4px;
    }

    .slidenav.right {
        right: 4px;
    }

    #howto .btn.big {
        padding: 10px;
        font-size: 16px;
    }

    .steer {
        gap: 10px;
    }

    .steerbox h3 {
        margin-bottom: 4px;
    }

    .steerbox .slines {
        font-size: 13px;
        line-height: 1.35;
    }

    .keys {
        grid-template-columns: repeat(3, 40px);
        gap: 4px;
        margin-bottom: 6px;
    }

    .keys .kbd {
        width: 40px;
        height: 40px;
        font-size: 17px;
    }

    .phone {
        width: min(100%, 220px);
        margin-bottom: 6px;
    }
}

/* Screens wider than tall: the picture on the left, the text on the right, the picture no
   taller than the screen allows (so a slide fits without scrolling). */
@media (min-aspect-ratio: 4/3) {
    .slide {
        width: min(calc(100vw - 92px), 1000px);
    }

    .sbody:not(.custom) {
        display: grid;
        gap: 16px;
        align-items: start;
    }

    /* the picture column is as wide as the screen height allows, the text takes the rest */
    .sbody.n1 {
        grid-template-columns: min(58%, calc((100vh - 290px) * 4 / 3)) minmax(0, 1fr);
        grid-template-columns: min(58%, calc((100dvh - 290px) * 4 / 3)) minmax(0, 1fr);
    }

    .sbody.n2 {
        grid-template-columns: min(62%, calc((100vh - 290px) * 8 / 3)) minmax(0, 1fr);
        grid-template-columns: min(62%, calc((100dvh - 290px) * 8 / 3)) minmax(0, 1fr);
    }

    .sbody .shots {
        margin-bottom: 0;
    }

    .shots.n2 {
        grid-template-columns: 1fr 1fr;
    }

    .keylist {
        grid-template-columns: 1fr 1fr;
        gap: 8px 18px;
    }
}

/* Phones on their side (wide but low): everything compact, no big title. */
@media (max-height: 560px) and (orientation: landscape) {
    #howto {
        gap: 5px;
        padding: 6px 6px 6px;
    }

    .howtitle {
        display: none;
    }

    .slide {
        width: calc(100vw - 84px);
        padding: 8px 12px;
    }

    .stitle {
        font-size: 15px;
        margin-bottom: 6px;
    }

    .sbody:not(.custom) {
        gap: 12px;
    }

    .sbody.n1 {
        grid-template-columns: min(58%, calc((100vh - 112px) * 4 / 3)) minmax(0, 1fr);
        grid-template-columns: min(58%, calc((100dvh - 112px) * 4 / 3)) minmax(0, 1fr);
    }

    /* A slide with a picture: the picture fills the slide height on the left, and the title
       sits above the text on the right (a long title then can't push the picture down). */
    .slide.pic {
        display: grid;
        grid-template-columns: min(58%, calc((100vh - 92px) * 4 / 3)) minmax(0, 1fr);
        grid-template-columns: min(58%, calc((100dvh - 92px) * 4 / 3)) minmax(0, 1fr);
        grid-template-rows: auto 1fr;
        column-gap: 12px;
        align-content: start;
    }

    .slide.pic .sbody {
        display: contents;
    }

    .slide.pic .shots {
        grid-column: 1;
        grid-row: 1 / 3;
    }

    .slide.pic .stitle {
        grid-column: 2;
        grid-row: 1;
    }

    .slide.pic .slines {
        grid-column: 2;
        grid-row: 2;
    }

    .slide.pic.more::after {
        grid-column: 1 / -1;
    }

    .sbody.n2 {
        grid-template-columns: min(62%, calc((100vh - 112px) * 8 / 3)) minmax(0, 1fr);
        grid-template-columns: min(62%, calc((100dvh - 112px) * 8 / 3)) minmax(0, 1fr);
    }

    .slines,
    .keylist {
        font-size: 13px;
        line-height: 1.36;
    }

    .keylist {
        grid-template-columns: 1fr 1fr;
        gap: 5px 14px;
    }

    .keylist .kbd {
        height: 28px;
        min-width: 32px;
        padding: 0 6px;
    }

    .slidenav {
        width: 34px;
        height: 60px;
        font-size: 16px;
    }

    .slidenav.left {
        left: 4px;
    }

    .slidenav.right {
        right: 4px;
    }

    .steer {
        grid-template-columns: 1fr 1fr;
        gap: 12px;
    }

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

    .steerbox h3 {
        grid-column: 1 / -1;
        margin: 0;
    }

    .steerbox .slines {
        font-size: 12px;
        line-height: 1.3;
    }

    .keys {
        grid-template-columns: repeat(3, 32px);
        gap: 3px;
        margin: 0;
    }

    .keys .kbd {
        width: 32px;
        height: 32px;
        font-size: 14px;
        border-bottom-width: 3px;
    }

    .kbd small {
        display: none;
    }

    .phone {
        width: 150px;
        margin: 0;
    }

    .phone .half,
    .phone .both {
        font-size: 9px;
    }

    .phone .flip {
        width: 24px;
        height: 24px;
        font-size: 14px;
    }

    .dots {
        gap: 4px;
    }

    .dot {
        width: 8px;
        height: 8px;
    }

    #howto .btn.big {
        padding: 5px;
        font-size: 14px;
        width: min(50vw, 300px);
    }
}

/* Very low screens (a small phone on its side): tighter still, a bit more room for the text. */
@media (max-height: 420px) and (orientation: landscape) {
    .stitle {
        font-size: 14px;
        margin-bottom: 4px;
    }

    .slines {
        font-size: 12px;
        line-height: 1.3;
    }

    .slines li {
        margin-bottom: 1px;
    }

    .sbody.n1 {
        grid-template-columns: min(50%, calc((100vh - 104px) * 4 / 3)) minmax(0, 1fr);
        grid-template-columns: min(50%, calc((100dvh - 104px) * 4 / 3)) minmax(0, 1fr);
    }

    .slide.pic {
        grid-template-columns: min(50%, calc((100vh - 92px) * 4 / 3)) minmax(0, 1fr);
        grid-template-columns: min(50%, calc((100dvh - 92px) * 4 / 3)) minmax(0, 1fr);
    }

    .sbody.n2 {
        grid-template-columns: min(52%, calc((100vh - 104px) * 8 / 3)) minmax(0, 1fr);
        grid-template-columns: min(52%, calc((100dvh - 104px) * 8 / 3)) minmax(0, 1fr);
    }
}

@media (prefers-reduced-motion: reduce) {
    .mk,
    .kbd.hl,
    .phone .half,
    .phone .both,
    .phone .flip {
        animation: none;
    }
}

/* ---- In-game pause overlay ---- */
.ptitle {
    margin: 0;
    font-weight: 800;
    letter-spacing: 4px;
    text-transform: uppercase;
    font-size: clamp(26px, 8vw, 46px);
    color: var(--neon);
    text-shadow: 0 0 12px rgba(79, 242, 200, 0.7);
}

.ptitle.amber {
    color: var(--amber);
    text-shadow: 0 0 12px rgba(255, 207, 77, 0.7);
}


/* ---- Multiplayer additions ---- */
.input {
    width: 100%;
    font: inherit;
    font-size: 16px;               /* >=16px keeps mobile browsers from zooming in */
    font-weight: 700;
    color: var(--neon);
    background: rgba(79, 242, 200, 0.06);
    border: 2px solid var(--neon);
    border-radius: 10px;
    padding: 12px 14px;
    text-align: center;
    outline: none;
    -webkit-user-select: text;
    user-select: text;
}

.input::placeholder {
    color: #4d6d66;
}

.input:focus {
    box-shadow: 0 0 14px rgba(79, 242, 200, 0.5);
}

.field.two {
    flex-direction: row;
    justify-content: space-around;
    width: 100%;
}

.field.two > div {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 6px;
}

.field.two .val {
    min-width: 0;
}

.board {
    list-style: none;
    margin: 0;
    padding: 0;
    width: 100%;
    color: #bfe8de;
    font-size: clamp(13px, 3.6vw, 16px);
    text-align: left;
}

.board li {
    display: flex;
    justify-content: space-between;
    gap: 12px;
    padding: 4px 6px;
    border-bottom: 1px dashed rgba(79, 242, 200, 0.18);
}

.board li span:last-child {
    color: var(--amber);
}

.noticetext {
    margin: 0;
    line-height: 1.5;
    color: #bfe8de;
}

.btn.small {
    width: auto;
    padding: 10px 14px;
    font-size: 14px;
}

.chatbar {
    position: fixed;
    left: 50%;
    bottom: max(12px, env(safe-area-inset-bottom));
    transform: translateX(-50%);
    z-index: 20;
    width: min(96vw, 560px);
    display: flex;
    gap: 8px;
    align-items: center;
    padding: 10px;
    border: 2px solid var(--neon);
    border-radius: 12px;
    background: rgba(4, 14, 13, 0.92);
    box-shadow: 0 0 18px rgba(79, 242, 200, 0.3);
}

.chatbar .input {
    text-align: left;
    flex: 1;
    min-width: 0;
}

.players {
    position: fixed;
    top: 12px;
    right: 12px;
    z-index: 15;
    width: min(92vw, 330px);
    max-height: calc(100% - 24px);
    overflow-y: auto;
    padding: 12px;
    border: 2px solid var(--neon);
    border-radius: 12px;
    background: rgba(4, 14, 13, 0.92);
    box-shadow: 0 0 18px rgba(79, 242, 200, 0.3);
    color: #cfeee6;
}

.players h4 {
    margin: 12px 0 6px;
    color: var(--amber);
    letter-spacing: 1px;
    font-size: 13px;
    text-transform: uppercase;
}

.phead {
    display: flex;
    justify-content: space-between;
    align-items: center;
    color: var(--neon);
    font-weight: 800;
    letter-spacing: 2px;
    text-transform: uppercase;
}

.prow {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 8px;
    padding: 6px 0;
    border-bottom: 1px dashed rgba(79, 242, 200, 0.18);
}

.pinfo {
    min-width: 0;
}

.pname {
    font-weight: 700;
    color: var(--neon);
    overflow-wrap: anywhere;
}

.pextra {
    margin-left: 8px;
    color: var(--amber);
}

.pchat {
    font-size: 13px;
    color: #9fc9bf;
    overflow-wrap: anywhere;
}

.pblock {
    flex: none;
    font: inherit;
    font-size: 12px;
    font-weight: 700;
    color: #ff8a80;
    background: transparent;
    border: 1.5px solid #ff8a80;
    border-radius: 8px;
    padding: 6px 10px;
    cursor: pointer;
}

.pblock.on {
    color: var(--ink);
    background: #ff8a80;
}

.phint {
    margin: 10px 0 0;
    font-size: 12px;
    color: #6f8f88;
}

/* ---- Player menu (tap another robot) ---- */
.pmenu {
    position: fixed;
    left: 50%;
    top: 50%;
    transform: translate(-50%, -50%);
    z-index: 15;
    width: min(88vw, 320px);
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 10px;
    padding: 14px;
    border: 2px solid var(--neon);
    border-radius: 12px;
    background: rgba(4, 14, 13, 0.94);
    box-shadow: 0 0 18px rgba(79, 242, 200, 0.3);
    color: #cfeee6;
    text-align: center;
}

.pmname {
    color: var(--neon);
    font-weight: 800;
    font-size: 20px;
    overflow-wrap: anywhere;
}

.pmchat {
    color: #9fc9bf;
    font-size: 14px;
    overflow-wrap: anywhere;
}

/* ---- Rail UI ---- */
.paytext {
    color: #bfe8de;
    font-size: 14px;
    line-height: 1.4;
    text-align: center;
}


.pickbar {
    flex-direction: column;
    align-items: stretch;
}

.picktitle {
    color: var(--amber);
    font-weight: 800;
    letter-spacing: 1px;
    font-size: 13px;
    text-transform: uppercase;
    text-align: center;
}



.hubtitle {
    color: var(--amber);
    font-weight: 800;
    letter-spacing: 1px;
    font-size: 13px;
    text-transform: uppercase;
}

.hubbtns {
    display: flex;
    gap: 8px;
}


.btn:disabled {
    opacity: 0.4;
    cursor: default;
    box-shadow: none;
}



.pblock:disabled {
    opacity: 0.45;
    cursor: default;
}

/* a slide picture opened full screen: pinch or scroll to zoom, drag to pan */
.shot {
    cursor: zoom-in;
}

.viewer {
    position: fixed;
    inset: 0;
    z-index: 30;
    background: rgba(2, 5, 6, 0.96);
    touch-action: none;
    overflow: hidden;
}

.viewer .vstage {
    position: absolute;
    left: 50%;
    top: 50%;
    width: min(100vw, calc(100vh * 4 / 3));
    width: min(100vw, calc(100dvh * 4 / 3));
    transform-origin: 0 0;
}

.viewer .shot {
    cursor: grab;
    border-radius: 0;
    border-width: 0;
}

.viewer .vclose {
    position: absolute;
    top: 10px;
    right: 10px;
    width: 46px;
    height: 46px;
    font-size: 26px;
    line-height: 1;
    color: var(--neon);
    background: rgba(4, 14, 13, 0.85);
    border: 2px solid var(--neon);
    border-radius: 10px;
    cursor: pointer;
}

.viewer .vhint {
    position: absolute;
    left: 0;
    right: 0;
    bottom: 10px;
    margin: 0;
    text-align: center;
    color: #7fb9ac;
    font-size: 13px;
    pointer-events: none;
}
