html, body {
    font-family: 'Helvetica Neue', Helvetica, Arial, sans-serif;
}

a, .btn-link {
    color: #006bb7;
}

.btn-primary {
    color: #fff;
    background-color: #1b6ec2;
    border-color: #1861ac;
}

.btn:focus, .btn:active:focus, .btn-link.nav-link:focus, .form-control:focus, .form-check-input:focus {
  box-shadow: 0 0 0 0.1rem white, 0 0 0 0.25rem #258cfb;
}

.content {
    padding-top: 1.1rem;
}

h1:focus {
    outline: none;
}

.valid.modified:not([type=checkbox]) {
    outline: 1px solid #26b050;
}

.invalid {
    outline: 1px solid #e50000;
}

.validation-message {
    color: #e50000;
}

.blazor-error-boundary {
    background: url(data:image/svg+xml;base64,PHN2ZyB3aWR0aD0iNTYiIGhlaWdodD0iNDkiIHhtbG5zPSJodHRwOi8vd3d3LnczLm9yZy8yMDAwL3N2ZyIgeG1sbnM6eGxpbms9Imh0dHA6Ly93d3cudzMub3JnLzE5OTkveGxpbmsiIG92ZXJmbG93PSJoaWRkZW4iPjxkZWZzPjxjbGlwUGF0aCBpZD0iY2xpcDAiPjxyZWN0IHg9IjIzNSIgeT0iNTEiIHdpZHRoPSI1NiIgaGVpZ2h0PSI0OSIvPjwvY2xpcFBhdGg+PC9kZWZzPjxnIGNsaXAtcGF0aD0idXJsKCNjbGlwMCkiIHRyYW5zZm9ybT0idHJhbnNsYXRlKC0yMzUgLTUxKSI+PHBhdGggZD0iTTI2My41MDYgNTFDMjY0LjcxNyA1MSAyNjUuODEzIDUxLjQ4MzcgMjY2LjYwNiA1Mi4yNjU4TDI2Ny4wNTIgNTIuNzk4NyAyNjcuNTM5IDUzLjYyODMgMjkwLjE4NSA5Mi4xODMxIDI5MC41NDUgOTIuNzk1IDI5MC42NTYgOTIuOTk2QzI5MC44NzcgOTMuNTEzIDI5MSA5NC4wODE1IDI5MSA5NC42NzgyIDI5MSA5Ny4wNjUxIDI4OS4wMzggOTkgMjg2LjYxNyA5OUwyNDAuMzgzIDk5QzIzNy45NjMgOTkgMjM2IDk3LjA2NTEgMjM2IDk0LjY3ODIgMjM2IDk0LjM3OTkgMjM2LjAzMSA5NC4wODg2IDIzNi4wODkgOTMuODA3MkwyMzYuMzM4IDkzLjAxNjIgMjM2Ljg1OCA5Mi4xMzE0IDI1OS40NzMgNTMuNjI5NCAyNTkuOTYxIDUyLjc5ODUgMjYwLjQwNyA1Mi4yNjU4QzI2MS4yIDUxLjQ4MzcgMjYyLjI5NiA1MSAyNjMuNTA2IDUxWk0yNjMuNTg2IDY2LjAxODNDMjYwLjczNyA2Ni4wMTgzIDI1OS4zMTMgNjcuMTI0NSAyNTkuMzEzIDY5LjMzNyAyNTkuMzEzIDY5LjYxMDIgMjU5LjMzMiA2OS44NjA4IDI1OS4zNzEgNzAuMDg4N0wyNjEuNzk1IDg0LjAxNjEgMjY1LjM4IDg0LjAxNjEgMjY3LjgyMSA2OS43NDc1QzI2Ny44NiA2OS43MzA5IDI2Ny44NzkgNjkuNTg3NyAyNjcuODc5IDY5LjMxNzkgMjY3Ljg3OSA2Ny4xMTgyIDI2Ni40NDggNjYuMDE4MyAyNjMuNTg2IDY2LjAxODNaTTI2My41NzYgODYuMDU0N0MyNjEuMDQ5IDg2LjA1NDcgMjU5Ljc4NiA4Ny4zMDA1IDI1OS43ODYgODkuNzkyMSAyNTkuNzg2IDkyLjI4MzcgMjYxLjA0OSA5My41Mjk1IDI2My41NzYgOTMuNTI5NSAyNjYuMTE2IDkzLjUyOTUgMjY3LjM4NyA5Mi4yODM3IDI2Ny4zODcgODkuNzkyMSAyNjcuMzg3IDg3LjMwMDUgMjY2LjExNiA4Ni4wNTQ3IDI2My41NzYgODYuMDU0N1oiIGZpbGw9IiNGRkU1MDAiIGZpbGwtcnVsZT0iZXZlbm9kZCIvPjwvZz48L3N2Zz4=) no-repeat 1rem/1.8rem, #b32121;
    padding: 1rem 1rem 1rem 3.7rem;
    color: white;
}

    .blazor-error-boundary::after {
        content: "An error has occurred."
    }

.darker-border-checkbox.form-check-input {
    border-color: #929292;
}

.form-floating > .form-control-plaintext::placeholder, .form-floating > .form-control::placeholder {
    color: var(--bs-secondary-color);
    text-align: end;
}

.form-floating > .form-control-plaintext:focus::placeholder, .form-floating > .form-control:focus::placeholder {
    text-align: start;
}

/* ---------- PointlessGames arcade styling ---------- */

.arcade-logo {
    font-family: 'Press Start 2P', monospace;
    font-size: 1rem;
    color: #a855f7 !important;
    letter-spacing: 1px;
    text-shadow: 0 0 12px rgba(168, 85, 247, 0.8);
}

/* Home-page hero wordmark: fluid so all 19 pixel-font glyphs fit a phone. */
.arcade-hero-logo {
    font-size: min(1.8rem, 4.6vw) !important;
}

.arcade-logo-accent {
    color: #22d3ee;
    text-shadow: 0 0 12px rgba(34, 211, 238, 0.8);
}

.arcade-logo-lol {
    color: #f472b6;
    text-shadow: 0 0 12px rgba(244, 114, 182, 0.8);
}

.arcade-main {
    background: radial-gradient(circle at 20% 0%, rgba(168, 85, 247, 0.12), transparent 45%),
                radial-gradient(circle at 85% 100%, rgba(34, 211, 238, 0.10), transparent 45%);
    min-height: 100vh;
    /* Column flex so the footer container (margin-top:auto) hugs the bottom on short pages. */
    display: flex;
    flex-direction: column;
}

.arcade-footer {
    margin-top: auto;
}

.nav-game-icon {
    margin-right: 8px;
}

/* The signed-in chip in the app bar: never let a long display name push
   the menu (or itself) off the right edge of a phone screen. */
.user-chip {
    max-width: 45vw;
    align-self: center;
}

.user-chip .mud-chip-content {
    overflow: hidden;
    display: flex;
    align-items: center;
}

/* The ellipsis has to live on the name span itself once the content is a flex row. */
.user-chip .player-name {
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

/* Arcade page sort dropdown: hugs the right edge on desktop, centered on phones. */
.home-sort {
    margin-left: auto;
}

@media (max-width: 599px) {
    .home-sort {
        flex-basis: 100%;
        display: flex;
        justify-content: center;
    }

    /* MudBlazor gives .mud-select flex: 1 1 auto, which would stretch it full-width. */
    .home-sort > .mud-select {
        flex: 0 0 auto;
        width: 180px;
    }
}

/* Visible only on small screens (mobile hints). */
.mobile-only {
    display: none;
}

@media (max-width: 959px) {
    .mobile-only {
        display: block;
    }
}

/* Phone-width app bar: shrink the pixel-font logo and tighten gutters so the
   menu button, logo, and user chip all fit without horizontal overflow. */
@media (max-width: 599px) {
    .arcade-appbar .mud-toolbar {
        padding-left: 4px;
        padding-right: 8px;
    }

    .arcade-logo {
        font-size: 0.62rem;
    }

    .user-chip {
        max-width: 38vw;
    }

    .arcade-appbar .mud-button-root {
        min-width: unset;
        padding: 4px 8px;
        white-space: nowrap;
    }
}

/* Narrowest phones: the app-bar wordmark drops its .LOL so the menu button,
   logo, and account controls all fit on one row. The hero keeps it. */
@media (max-width: 479px) {
    .arcade-appbar .arcade-logo-lol {
        display: none;
    }
}

.game-card {
    transition: transform 0.15s ease, box-shadow 0.15s ease;
    cursor: pointer;
    height: 100%;
    border: 1px solid #312a4d;
}

.game-card:hover {
    transform: translateY(-4px);
    box-shadow: 0 0 24px rgba(168, 85, 247, 0.45);
    border-color: #a855f7;
}

.home-feature {
    height: 100%;
    border: 1px solid #312a4d;
}

.featured-tank-preview {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    align-items: center;
    min-height: 44px;
}

/* Featured-games carousel on the arcade home page. Screenshots live at
   /images/games/{key}.png; a missing image hides itself (img onerror) and the
   slide falls back to icon + text only. */
.featured-carousel .featured-slide-shot {
    max-height: 200px;
    max-width: min(45%, 340px);
    border-radius: 8px;
    border: 1px solid #312a4d;
    object-fit: cover;
}

@media (max-width: 599px) {
    .featured-carousel .featured-slide-shot {
        display: none;
    }
}

.game-card-icon {
    font-size: 2.6rem;
    line-height: 1;
}

.game-title {
    font-family: 'Press Start 2P', monospace;
    font-size: 0.8rem;
    line-height: 1.6;
}

.big-timer {
    font-family: 'Press Start 2P', monospace;
    font-size: 2.2rem;
    color: #22d3ee;
    text-shadow: 0 0 16px rgba(34, 211, 238, 0.7);
}

.logout-button {
    background: none;
    border: none;
    color: inherit;
    cursor: pointer;
    padding: 0;
    font: inherit;
}

/* One Pixel Off grid — sized by width AND viewport height so the whole
   square grid stays on screen on phones (no zooming or panning mid-round). */
.pixel-grid {
    display: grid;
    gap: 4px;
    width: min(480px, 100%, calc(100vh - 310px));
    width: min(480px, 100%, calc(100dvh - 310px));
    min-width: min(100%, 220px);
    margin: 0 auto;
}

.pixel-cell {
    aspect-ratio: 1;
    border-radius: 4px;
    cursor: crosshair;
    border: none;
    /* Rapid taps must not trigger the browser's double-tap zoom. */
    touch-action: manipulation;
    -webkit-tap-highlight-color: transparent;
    user-select: none;
}

/* Longest Hold button */
.hold-button {
    width: 220px;
    height: 220px;
    border-radius: 50%;
    border: 6px solid #22d3ee;
    background: radial-gradient(circle at 35% 30%, #a855f7, #4c1d95);
    color: white;
    font-family: 'Press Start 2P', monospace;
    font-size: 0.9rem;
    cursor: pointer;
    box-shadow: 0 0 40px rgba(168, 85, 247, 0.6);
    user-select: none;
    -webkit-user-select: none;
    -webkit-touch-callout: none;
    touch-action: none;
}

/* Long-press games: stop mobile browsers from starting a text selection /
   "copy" callout on the button or the text around it. */
.no-select {
    user-select: none;
    -webkit-user-select: none;
    -webkit-touch-callout: none;
}

.hold-button:active {
    box-shadow: 0 0 70px rgba(34, 211, 238, 0.9);
}

/* Off By One stat rows */
.obo-stat {
    display: block;
    width: 100%;
    text-align: left;
    padding: 12px 16px;
    margin-bottom: 8px;
    border: 2px solid #a855f7;
    border-radius: 10px;
    background: #171029;
    color: #ede9fe;
    font-size: 1rem;
    cursor: pointer;
    transition: border-color 0.15s, box-shadow 0.15s;
}

/* Hover-capable devices only: on touch screens the last-tapped answer would
   keep a stuck highlight that reads as a hint. */
@media (hover: hover) {
    .obo-stat:hover:not(:disabled) {
        border-color: #22d3ee;
        box-shadow: 0 0 12px rgba(34, 211, 238, 0.4);
    }
}

.obo-stat:disabled {
    cursor: default;
}

.obo-stat.obo-fake {
    border-color: #f472b6;
    background: rgba(244, 114, 182, 0.12);
    box-shadow: 0 0 14px rgba(244, 114, 182, 0.5);
}

.obo-stat.obo-wrong {
    border-color: #ef4444;
    background: rgba(239, 68, 68, 0.12);
}

.obo-stat.obo-dim {
    opacity: 0.45;
}

/* Fermi Golf multiplier cards */
.fermi-cards {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    justify-content: center;
}

.fermi-card {
    min-width: 76px;
    padding: 14px 10px;
    border: 2px solid #22d3ee;
    border-radius: 10px;
    background: linear-gradient(160deg, #1e1038, #171029);
    color: #22d3ee;
    font-family: 'Press Start 2P', monospace;
    font-size: 0.8rem;
    cursor: pointer;
    box-shadow: 0 0 10px rgba(34, 211, 238, 0.25);
    transition: transform 0.1s, box-shadow 0.15s;
}

.fermi-card:hover {
    transform: translateY(-3px);
    box-shadow: 0 0 18px rgba(34, 211, 238, 0.6);
}

.fermi-card:active {
    transform: translateY(0);
}

/* Perfect Timing sweep meter */
.pt-meter {
    position: relative;
    height: 72px;
    border: 2px solid #a855f7;
    border-radius: 12px;
    background: repeating-linear-gradient(90deg, #171029, #171029 24px, #1a1230 24px, #1a1230 48px);
    overflow: hidden;
    cursor: pointer;
    touch-action: none;
    user-select: none;
}

.pt-zone {
    position: absolute;
    top: 0;
    bottom: 0;
    left: 40%;
    width: 20%;
    background: rgba(34, 211, 238, 0.16);
    border-left: 2px solid rgba(34, 211, 238, 0.55);
    border-right: 2px solid rgba(34, 211, 238, 0.55);
}

.pt-perfect {
    position: absolute;
    top: 0;
    bottom: 0;
    left: 50%;
    width: 2px;
    margin-left: -1px;
    background: #22d3ee;
    box-shadow: 0 0 10px #22d3ee;
}

.pt-marker {
    position: absolute;
    top: 0;
    bottom: 0;
    left: 0;
    width: 6px;
    margin-left: -3px;
    background: #f472b6;
    box-shadow: 0 0 14px #f472b6;
    pointer-events: none;
}

.pt-dots {
    display: flex;
    gap: 8px;
    justify-content: center;
}

.pt-dot {
    width: 14px;
    height: 14px;
    border-radius: 50%;
    border: 2px solid #a855f7;
}

.pt-dot.done {
    background: #22d3ee;
    border-color: #22d3ee;
    box-shadow: 0 0 8px rgba(34, 211, 238, 0.8);
}

/* Cursor duel arena */
.duel-arena {
    position: relative;
    width: 100%;
    height: 420px;
    border: 2px solid #a855f7;
    border-radius: 12px;
    background: repeating-linear-gradient(45deg, #171029, #171029 12px, #1a1230 12px, #1a1230 24px);
    overflow: hidden;
    cursor: crosshair;
    touch-action: none;
}

.duel-cursor {
    position: absolute;
    transform: translate(-50%, -50%);
    font-size: 1.6rem;
    pointer-events: none;
    transition: left 0.05s linear, top 0.05s linear;
}

/* Sword-swing flash: quick twist + glow when a player swings. */
.duel-cursor.duel-swing {
    animation: duel-swing 0.25s ease-out;
}

@keyframes duel-swing {
    0% { transform: translate(-50%, -50%) rotate(0deg) scale(1); text-shadow: none; }
    40% { transform: translate(-50%, -50%) rotate(-35deg) scale(1.35); text-shadow: 0 0 12px #fbbf24; }
    100% { transform: translate(-50%, -50%) rotate(0deg) scale(1); text-shadow: none; }
}

/* Word museum canvas. On phones the wall keeps its desktop size inside a
   horizontally pannable strip, so word layout is identical on every device. */
.museum-scroll {
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
}

.museum-canvas {
    position: relative;
    width: 100%;
    height: 520px;
    border: 2px solid #312a4d;
    border-radius: 12px;
    background: #0e0a1c;
    overflow: hidden;
    cursor: crosshair;
}

@media (max-width: 959px) {
    .museum-canvas {
        width: 900px;
    }
}

.museum-word {
    position: absolute;
    transform: translate(-50%, -50%);
    white-space: nowrap;
    font-size: 0.95rem;
    color: #c4b5fd;
    text-shadow: 0 0 8px rgba(168, 85, 247, 0.5);
    pointer-events: auto;
}

/* When the tooltip wrapper is the positioned element, the word itself stays in flow */
.museum-word-anchored {
    position: static;
    transform: none;
}

/* Plus-only museum word colors (effects reuse the name-* classes). */
.mw-cyan { color: #22d3ee; }
.mw-pink { color: #f472b6; }
.mw-gold { color: #facc15; }
.mw-green { color: #4ade80; }
.mw-crimson { color: #f87171; }
.mw-ivory { color: #f5f3ff; }
.mw-ember { color: #fb923c; }

/* Style picker shown to Plus members while placing their word */
.mw-style-picker {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
}

.mw-style-chip {
    border: 1px solid #312a4d;
    border-radius: 10px;
    background: #0e0a1c;
    padding: 4px 10px;
    cursor: pointer;
}

.mw-style-chip.selected {
    border-color: #a855f7;
    box-shadow: 0 0 10px rgba(168, 85, 247, 0.55);
}

/* The secret 3D wing. Low internal resolution scaled up for the retro-shooter look. */
.museum-3d {
    display: block;
    width: 100%;
    height: 520px;
    border: 2px solid #312a4d;
    border-radius: 12px;
    background: #000;
    image-rendering: pixelated;
    cursor: crosshair;
    outline: none;
    touch-action: none;
    user-select: none;
    -webkit-user-select: none;
    -webkit-touch-callout: none;
}

@media (max-width: 700px) {
    /* Keep roughly the 640x400 aspect instead of a squashed 520px strip. */
    .museum-3d {
        height: 62vw;
    }
}

/* Scroll olympics */
.scroll-track {
    height: 60vh;
    overflow-y: scroll;
    border: 2px solid #312a4d;
    border-radius: 12px;
    background: #0e0a1c;
    /* No scrollbar to drag: wheel and touch are the only legal events. */
    scrollbar-width: none;
}

.scroll-track::-webkit-scrollbar {
    display: none;
}

.scroll-milestone {
    padding: 6rem 2rem;
    text-align: center;
    color: #a5b4fc;
    font-size: 1.1rem;
}

/* Multiplayer room chat */
.game-chat-messages {
    /* column-reverse + newest-first markup keeps the list pinned to the latest message with no JS. */
    display: flex;
    flex-direction: column-reverse;
    height: 180px;
    overflow-y: auto;
    padding: 4px 8px;
    border: 1px solid #312a4d;
    border-radius: 8px;
    background: #0e0a1c;
}

.game-chat-msg {
    padding: 4px 0;
    font-size: 0.9rem;
    overflow-wrap: anywhere;
}

.game-chat-self {
    color: #a855f7;
}

.game-chat-other {
    color: #22d3ee;
}

.game-chat-time {
    color: #6b7280;
    font-size: 0.7rem;
    margin-left: 6px;
}

.game-chat-empty {
    color: #6b7280;
    font-style: italic;
    padding: 8px 0;
}

/* Draw canvas */
.draw-canvas {
    border: 2px solid #a855f7;
    border-radius: 12px;
    background: white;
    touch-action: none;
    cursor: crosshair;
    max-width: 100%;
    height: auto;
    user-select: none;
    -webkit-user-select: none;
    -webkit-touch-callout: none;
}

.paint-toolbar {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 6px;
}

.paint-swatches, .paint-tools {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    align-items: center;
    gap: 6px;
}

.paint-swatch {
    width: 28px;
    height: 28px;
    border-radius: 50%;
    border: 2px solid rgba(255, 255, 255, 0.35);
    cursor: pointer;
    padding: 0;
    font-size: 14px;
    line-height: 1;
    transition: transform 0.1s;
}

.paint-swatch:hover {
    transform: scale(1.15);
}

.paint-swatch.selected {
    border-color: #22d3ee;
    transform: scale(1.2);
    box-shadow: 0 0 6px #22d3ee;
}

.paint-eraser {
    background: #e2e8f0;
}

.paint-brush {
    width: 32px;
    height: 32px;
    border-radius: 8px;
    border: 2px solid transparent;
    background: rgba(255, 255, 255, 0.08);
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 0;
}

.paint-brush.selected {
    border-color: #22d3ee;
}

.paint-brush-dot {
    border-radius: 50%;
    display: inline-block;
}

.alphabet-input {
    font-family: 'Press Start 2P', monospace;
    font-size: 1.4rem;
    letter-spacing: 6px;
    text-transform: uppercase;
}

/* ---------- Identity / account pages (dark arcade theme) ---------- */

.identity-page {
    font-family: 'Roboto', 'Helvetica Neue', Helvetica, Arial, sans-serif;
    color: #ede9fe;
}

.identity-page h1 {
    font-family: 'Press Start 2P', monospace;
    font-size: 1.2rem;
    line-height: 1.8;
    color: #a855f7;
    text-shadow: 0 0 12px rgba(168, 85, 247, 0.6);
    margin-bottom: 1.5rem;
}

.identity-page h2 {
    font-size: 1.05rem;
    font-weight: 500;
    color: #a5b4fc;
    margin-bottom: 0.75rem;
}

.identity-page h3 {
    font-size: 1rem;
    font-weight: 500;
    color: #a5b4fc;
}

.identity-page hr {
    border-color: #312a4d;
    opacity: 1;
}

.identity-page p {
    color: #ede9fe;
}

.identity-page a:not(.btn) {
    color: #22d3ee;
    text-decoration: none;
}

.identity-page a:not(.btn):hover {
    color: #67e8f9;
    text-decoration: underline;
}

/* Card look for form sections, matching MudBlazor surfaces */
.identity-page section {
    background: #171029;
    border: 1px solid #312a4d;
    border-radius: 10px;
    padding: 1.5rem;
    margin-bottom: 1.5rem;
}

/* Inputs */
.identity-page .form-control,
.identity-page .form-select {
    background-color: #0e0a1c;
    border: 1px solid #312a4d;
    border-radius: 10px;
    color: #ede9fe;
}

.identity-page .form-control:focus,
.identity-page .form-select:focus {
    background-color: #0e0a1c;
    border-color: #a855f7;
    color: #ede9fe;
    box-shadow: 0 0 0 0.2rem rgba(168, 85, 247, 0.25);
}

.identity-page .form-control::placeholder {
    color: #6b6394;
}

.identity-page .form-control:disabled,
.identity-page .form-control[readonly] {
    background-color: #14102a;
    color: #a5b4fc;
}

.identity-page input:-webkit-autofill,
.identity-page input:-webkit-autofill:hover,
.identity-page input:-webkit-autofill:focus {
    -webkit-box-shadow: 0 0 0 1000px #0e0a1c inset;
    -webkit-text-fill-color: #ede9fe;
    caret-color: #ede9fe;
}

.identity-page .form-label,
.identity-page label {
    color: #a5b4fc;
}

.identity-page .form-floating > label {
    color: #a5b4fc;
}

.identity-page .form-floating > .form-control:focus ~ label,
.identity-page .form-floating > .form-control:not(:placeholder-shown) ~ label {
    color: #a5b4fc;
}

.identity-page .form-floating > .form-control:focus ~ label::after,
.identity-page .form-floating > .form-control:not(:placeholder-shown) ~ label::after {
    background-color: transparent;
}

/* Checkboxes */
.identity-page .form-check-input {
    background-color: #0e0a1c;
    border-color: #312a4d;
}

.identity-page .form-check-input:checked {
    background-color: #a855f7;
    border-color: #a855f7;
}

.identity-page .darker-border-checkbox.form-check-input {
    border-color: #4c4470;
}

/* Buttons */
.identity-page .btn-primary {
    background: linear-gradient(135deg, #a855f7, #7c3aed);
    border-color: #a855f7;
    border-radius: 10px;
    color: #fff;
}

.identity-page .btn-primary:hover,
.identity-page .btn-primary:focus {
    background: linear-gradient(135deg, #b975f9, #8b5cf6);
    border-color: #b975f9;
    box-shadow: 0 0 18px rgba(168, 85, 247, 0.5);
}

.identity-page .btn-danger {
    background-color: transparent;
    border-color: #f87171;
    color: #f87171;
    border-radius: 10px;
}

.identity-page .btn-danger:hover {
    background-color: #f87171;
    border-color: #f87171;
    color: #0b0716;
}

.identity-page .btn-link {
    color: #22d3ee;
}

.identity-page .btn:focus,
.identity-page .btn:active:focus {
    box-shadow: 0 0 0 0.2rem rgba(34, 211, 238, 0.35);
}

/* Alerts */
.identity-page .alert {
    border-radius: 10px;
}

.identity-page .alert-success {
    background-color: rgba(74, 222, 128, 0.12);
    border-color: rgba(74, 222, 128, 0.4);
    color: #4ade80;
}

.identity-page .alert-danger {
    background-color: rgba(248, 113, 113, 0.12);
    border-color: rgba(248, 113, 113, 0.4);
    color: #f87171;
}

.identity-page .alert-warning {
    background-color: rgba(250, 204, 21, 0.12);
    border-color: rgba(250, 204, 21, 0.4);
    color: #facc15;
}

/* Validation */
.identity-page .text-danger,
.identity-page .validation-message {
    color: #f87171 !important;
}

.identity-page .valid.modified:not([type=checkbox]) {
    outline: 1px solid #4ade80;
}

.identity-page .invalid {
    outline: 1px solid #f87171;
}

/* Manage-section nav pills */
.identity-page .nav-pills .nav-link {
    color: #a5b4fc;
    border-radius: 10px;
    margin-bottom: 0.25rem;
}

.identity-page .nav-pills .nav-link:hover {
    background-color: rgba(168, 85, 247, 0.12);
    color: #ede9fe;
}

.identity-page .nav-pills .nav-link.active {
    background-color: #a855f7;
    color: #fff;
    box-shadow: 0 0 14px rgba(168, 85, 247, 0.45);
}

/* ---- Player name styles (chosen on the Profile page) ---- */
.player-name {
    font-weight: 600;
}

.player-flair {
    -webkit-text-fill-color: initial;
    text-shadow: none;
}

/* Taunt message riding along on a challenge link (a Plus perk). */
.challenge-taunt {
    font-style: italic;
    opacity: 0.9;
    margin-top: 4px;
}

/* Pointless Plus supporter badge shown after the name. */
.player-badge {
    font-size: 0.72em;
    margin-left: 3px;
    vertical-align: middle;
    cursor: default;
}

.name-neon {
    color: #22d3ee;
    text-shadow: 0 0 6px rgba(34, 211, 238, 0.9), 0 0 14px rgba(34, 211, 238, 0.5);
}

.name-fire {
    background: linear-gradient(180deg, #fde047 0%, #f97316 55%, #dc2626 100%);
    -webkit-background-clip: text;
    background-clip: text;
    color: #f97316;
    -webkit-text-fill-color: transparent;
}

.name-rainbow {
    background: linear-gradient(90deg, #f87171, #facc15, #4ade80, #22d3ee, #a78bfa, #f472b6, #f87171);
    background-size: 200% 100%;
    -webkit-background-clip: text;
    background-clip: text;
    color: #a78bfa;
    -webkit-text-fill-color: transparent;
    animation: name-rainbow-slide 3s linear infinite;
}

@keyframes name-rainbow-slide {
    to { background-position: 200% 0; }
}

.name-gold {
    background: linear-gradient(180deg, #fef9c3 0%, #facc15 45%, #b45309 100%);
    -webkit-background-clip: text;
    background-clip: text;
    color: #facc15;
    -webkit-text-fill-color: transparent;
    text-shadow: 0 0 10px rgba(250, 204, 21, 0.35);
}

.name-ice {
    background: linear-gradient(180deg, #e0f2fe 0%, #7dd3fc 60%, #2563eb 100%);
    -webkit-background-clip: text;
    background-clip: text;
    color: #7dd3fc;
    -webkit-text-fill-color: transparent;
}

.name-toxic {
    color: #a3e635;
    text-shadow: 0 0 6px rgba(163, 230, 53, 0.9), 0 0 16px rgba(74, 222, 128, 0.5);
}

.name-bubblegum {
    background: linear-gradient(90deg, #f472b6, #c084fc);
    -webkit-background-clip: text;
    background-clip: text;
    color: #f472b6;
    -webkit-text-fill-color: transparent;
}

.name-matrix {
    color: #4ade80;
    font-family: "Courier New", monospace;
    letter-spacing: 0.05em;
    text-shadow: 0 0 8px rgba(74, 222, 128, 0.7);
}

.name-royal {
    background: linear-gradient(90deg, #c084fc, #facc15);
    -webkit-background-clip: text;
    background-clip: text;
    color: #c084fc;
    -webkit-text-fill-color: transparent;
}

.name-vaporwave {
    background: linear-gradient(90deg, #22d3ee, #f472b6);
    -webkit-background-clip: text;
    background-clip: text;
    color: #f472b6;
    -webkit-text-fill-color: transparent;
    font-style: italic;
    letter-spacing: 0.08em;
}

.name-glitch {
    color: #ede9fe;
    text-shadow: 2px 0 #f87171, -2px 0 #22d3ee;
    animation: name-glitch-jitter 2.4s steps(2, jump-none) infinite;
}

@keyframes name-glitch-jitter {
    0%, 88% { text-shadow: 2px 0 #f87171, -2px 0 #22d3ee; }
    90% { text-shadow: -2px 0 #f87171, 2px 0 #22d3ee; }
    94% { text-shadow: 2px 1px #f87171, -2px -1px #22d3ee; }
    98% { text-shadow: -1px 0 #f87171, 1px 0 #22d3ee; }
}

/* ---- Supporter-only styles (Pointless Plus) ---- */
.name-aurora {
    background: linear-gradient(90deg, #4ade80, #22d3ee, #a78bfa, #4ade80);
    background-size: 300% 100%;
    -webkit-background-clip: text;
    background-clip: text;
    color: #22d3ee;
    -webkit-text-fill-color: transparent;
    animation: name-aurora-drift 6s ease-in-out infinite;
}

@keyframes name-aurora-drift {
    0%, 100% { background-position: 0% 0; }
    50% { background-position: 100% 0; }
}

.name-midas {
    background: linear-gradient(90deg, #b45309, #fde047, #fffbeb, #fde047, #b45309);
    background-size: 250% 100%;
    -webkit-background-clip: text;
    background-clip: text;
    color: #fde047;
    -webkit-text-fill-color: transparent;
    animation: name-midas-shimmer 3.5s linear infinite;
    text-shadow: 0 0 12px rgba(250, 204, 21, 0.3);
}

@keyframes name-midas-shimmer {
    to { background-position: 250% 0; }
}

.name-cosmic {
    color: #c4b5fd;
    text-shadow: 0 0 5px rgba(196, 181, 253, 0.9), 0 0 18px rgba(129, 140, 248, 0.7), 0 0 34px rgba(59, 130, 246, 0.45);
    animation: name-cosmic-pulse 2.8s ease-in-out infinite;
}

@keyframes name-cosmic-pulse {
    0%, 100% { text-shadow: 0 0 5px rgba(196, 181, 253, 0.9), 0 0 18px rgba(129, 140, 248, 0.7), 0 0 34px rgba(59, 130, 246, 0.45); }
    50% { text-shadow: 0 0 7px rgba(196, 181, 253, 1), 0 0 26px rgba(129, 140, 248, 0.9), 0 0 48px rgba(59, 130, 246, 0.65); }
}

/* ---- Coin-store styles (bought with coins on /store) ---- */
.name-sunset {
    background: linear-gradient(90deg, #fbbf24, #fb7185, #a855f7);
    background-size: 200% 100%;
    -webkit-background-clip: text;
    background-clip: text;
    color: #fb7185;
    -webkit-text-fill-color: transparent;
    animation: name-sunset-fade 5s ease-in-out infinite;
}

@keyframes name-sunset-fade {
    0%, 100% { background-position: 0% 0; }
    50% { background-position: 100% 0; }
}

.name-ocean {
    background: linear-gradient(180deg, #67e8f9 0%, #0ea5e9 55%, #1e3a8a 100%);
    -webkit-background-clip: text;
    background-clip: text;
    color: #0ea5e9;
    -webkit-text-fill-color: transparent;
    text-shadow: 0 0 10px rgba(14, 165, 233, 0.3);
}

.name-starlight {
    color: #fefce8;
    text-shadow: 0 0 4px rgba(254, 252, 232, 0.9), 0 0 14px rgba(253, 224, 71, 0.6);
    animation: name-starlight-twinkle 3.2s ease-in-out infinite;
}

@keyframes name-starlight-twinkle {
    0%, 100% { text-shadow: 0 0 4px rgba(254, 252, 232, 0.9), 0 0 14px rgba(253, 224, 71, 0.6); }
    50% { text-shadow: 0 0 6px rgba(254, 252, 232, 1), 0 0 22px rgba(253, 224, 71, 0.85); }
}

.style-locked {
    opacity: 0.55;
}

/* ---- Style / flair pickers on the Profile page ---- */
.style-picker,
.flair-picker {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
}

.style-picker input[type="radio"],
.flair-picker input[type="radio"] {
    position: absolute;
    opacity: 0;
    pointer-events: none;
}

.style-picker label,
.flair-picker label {
    border: 1px solid #312a4d;
    border-radius: 10px;
    padding: 0.35rem 0.75rem;
    cursor: pointer;
    background-color: #0e0a1c;
    user-select: none;
}

.flair-picker label {
    font-size: 1.2rem;
    min-width: 2.6rem;
    text-align: center;
}

.style-picker input:checked + label,
.flair-picker input:checked + label {
    border-color: #a855f7;
    box-shadow: 0 0 12px rgba(168, 85, 247, 0.55);
}

/* ---- Hide & Sneak ---- */
.hs-arena {
    position: relative;
    border: 2px solid #a855f7;
    border-radius: 12px;
    background: repeating-linear-gradient(45deg, #171029, #171029 12px, #1a1230 12px, #1a1230 24px);
    padding: 10px;
    overflow: hidden;
}

.hs-grid {
    display: grid;
    grid-template-columns: repeat(14, 1fr);
    gap: 2px;
}

.hs-cell {
    aspect-ratio: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: clamp(0.9rem, 2.6vw, 1.5rem);
    border-radius: 6px;
    user-select: none;
    line-height: 1;
}

.hs-clickable {
    cursor: crosshair;
}

.hs-clickable:hover {
    background: rgba(168, 85, 247, 0.18);
    box-shadow: inset 0 0 0 1px rgba(168, 85, 247, 0.5);
}

/* Only you can see which crowd member you are. */
.hs-me {
    box-shadow: inset 0 0 0 2px #22d3ee, 0 0 10px rgba(34, 211, 238, 0.45);
    border-radius: 8px;
}

.hs-vibe {
    display: inline-block;
    animation: hs-vibe-dance 0.9s ease-in-out;
}

@keyframes hs-vibe-dance {
    0% { transform: rotate(0) scale(1); }
    25% { transform: rotate(-14deg) scale(1.18) translateY(-3px); }
    50% { transform: rotate(12deg) scale(1.1) translateY(-1px); }
    75% { transform: rotate(-8deg) scale(1.14) translateY(-3px); }
    100% { transform: rotate(0) scale(1); }
}

.hs-ghost {
    animation: hs-ghost-fade 1.2s ease-out forwards;
}

@keyframes hs-ghost-fade {
    0% { opacity: 1; transform: scale(1.3); }
    100% { opacity: 0; transform: scale(0.5) translateY(-12px); }
}

.hs-wave-banner {
    position: absolute;
    top: 8px;
    left: 50%;
    transform: translateX(-50%);
    font-family: 'Press Start 2P', monospace;
    font-size: 0.7rem;
    color: #22d3ee;
    background: rgba(11, 7, 22, 0.85);
    border: 1px solid #22d3ee;
    border-radius: 8px;
    padding: 6px 12px;
    text-shadow: 0 0 10px rgba(34, 211, 238, 0.8);
    animation: hs-banner-pulse 0.5s ease-in-out infinite alternate;
    pointer-events: none;
    white-space: nowrap;
}

@keyframes hs-banner-pulse {
    from { box-shadow: 0 0 6px rgba(34, 211, 238, 0.4); }
    to { box-shadow: 0 0 18px rgba(34, 211, 238, 0.9); }
}

.hs-overlay {
    position: absolute;
    inset: 0;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    background: rgba(11, 7, 22, 0.88);
    text-align: center;
    padding: 1rem;
}

.hs-act-button {
    font-family: 'Press Start 2P', monospace;
}

/* The solo seeker bot telegraphs the cell it's studying — the hider's cue to relocate. */
.hs-watched {
    box-shadow: inset 0 0 0 2px #f43f5e, 0 0 12px rgba(244, 63, 94, 0.6);
    border-radius: 8px;
    background: rgba(244, 63, 94, 0.15);
}

.hs-watch-eye {
    display: inline-block;
    animation: hs-watch-pulse 0.6s ease-in-out infinite alternate;
}

@keyframes hs-watch-pulse {
    from { transform: scale(0.9); }
    to { transform: scale(1.2); }
}

/* ---- Pointless Chess ---- */
.chess-board {
    display: grid;
    grid-template-columns: repeat(5, 1fr);
    gap: 0;
    max-width: 440px;
    margin: 0 auto;
    border: 3px solid #312a4d;
    border-radius: 10px;
    overflow: hidden;
    box-shadow: 0 0 24px rgba(168, 85, 247, 0.15);
}

.chess-sq {
    position: relative;
    aspect-ratio: 1;
    border: none;
    padding: 0;
    font-size: clamp(1.6rem, 8vw, 3rem);
    line-height: 1;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: background 0.1s;
}

.chess-light { background: #4c4370; }
.chess-dark { background: #2b2347; }
.chess-sq:hover { filter: brightness(1.2); }
.chess-selected { background: #7c3aed !important; }
.chess-last { box-shadow: inset 0 0 0 3px rgba(34, 211, 238, 0.55); }
.chess-target { box-shadow: inset 0 0 0 3px rgba(168, 85, 247, 0.8); }

.chess-dot {
    position: absolute;
    width: 22%;
    height: 22%;
    border-radius: 50%;
    background: rgba(168, 85, 247, 0.75);
    pointer-events: none;
}

.chess-white-piece { color: #f5f3ff; text-shadow: 0 2px 4px rgba(0, 0, 0, 0.7); }
.chess-black-piece { color: #171029; text-shadow: 0 0 3px rgba(196, 181, 253, 0.9); }
.chess-thinking { opacity: 0.85; }

/* ---- Watch It Grow.. Really... ---- */
.lawn-wrap {
    border: 3px solid #312a4d;
    border-radius: 10px;
    overflow: hidden;
    background: #1a1230;
    line-height: 0;
}

.lawn-canvas {
    width: 100%;
    height: auto;
    display: block;
    image-rendering: pixelated;
    touch-action: none;
}

.lawn-toolbar {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
}

/* ---- sound toggle (icon pair driven by html.pg-muted, set in sound.js) ---- */
.pg-sound-btn {
    background: none;
    border: none;
    cursor: pointer;
    font-size: 1.2rem;
    line-height: 1;
    padding: 6px 8px;
    border-radius: 8px;
}

.pg-sound-btn:hover {
    background: rgba(168, 85, 247, 0.18);
}

html.pg-muted .pg-sound-on { display: none; }

html:not(.pg-muted) .pg-sound-off { display: none; }

/* Sound toggle as a user-menu row: the button must span the whole item so the
   entire row is clickable, not just the label text. */
.pg-sound-menu-btn {
    display: block;
    /* Stretch left over MudBlazor's 36px icon gutter so the whole row toggles. */
    width: calc(100% + 36px);
    margin-left: -36px;
    padding-left: 36px;
    text-align: left;
}

.mud-menu-item:has(.pg-sound-menu-btn) .mud-menu-item-text {
    flex-grow: 1;
}

/* ---------- A Rock ---------- */

/* The stage is deliberately plain. A gallery lamp is the only thing that lights it. */
.rock-stage {
    background: linear-gradient(180deg, rgba(255,255,255,0.02), rgba(0,0,0,0.12));
}

.rock-stage.rock-lit {
    background: radial-gradient(120% 80% at 50% 0%, rgba(255, 236, 190, 0.16), rgba(0,0,0,0.18) 70%);
}

.rock-display {
    position: relative;
    display: flex;
    flex-direction: column;
    align-items: center;
}

.rock-svg {
    width: 100%;
    max-width: 320px;
    height: auto;
}

/* Sits on the rock, not above the card, so it reads as worn rather than floating. */
.rock-hat {
    position: absolute;
    top: 2px;
    font-size: 2.1rem;
    z-index: 1;
    pointer-events: none;
}

.rock-pedestal {
    width: 140px;
    height: 26px;
    margin-top: -6px;
    border-radius: 4px 4px 6px 6px;
    background: linear-gradient(180deg, #8a6a45, #5d452c);
    box-shadow: inset 0 2px 0 rgba(255,255,255,0.15);
}

.rock-plaque {
    margin: 14px auto 0;
    max-width: 320px;
    padding: 8px 12px;
    border-radius: 4px;
    background: linear-gradient(180deg, #c9a227, #9c7b16);
    color: #2b2200;
    text-align: center;
    font-family: Georgia, "Times New Roman", serif;
}

.rock-plaque-name {
    font-weight: 700;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    font-size: 0.85rem;
}

.rock-plaque-text {
    font-size: 0.8rem;
    font-style: italic;
    opacity: 0.85;
}

.rock-shop-row,
.drive-shop-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    padding: 8px 0;
    border-bottom: 1px solid rgba(255,255,255,0.07);
}

.rock-shop-row:last-child,
.drive-shop-row:last-child {
    border-bottom: none;
}

/* ---------- The Long Drive ---------- */

.drive-odo {
    display: flex;
    align-items: baseline;
    justify-content: center;
    gap: 8px;
}

.drive-odo-num {
    font-family: ui-monospace, SFMono-Regular, Menlo, monospace;
    font-size: 2.6rem;
    font-weight: 700;
    letter-spacing: 0.04em;
}

.drive-odo-unit {
    font-size: 0.9rem;
    opacity: 0.6;
}

/* A strip of road with a dashed centre line, moving to sell the idea it never stops. */
.drive-road {
    position: relative;
    height: 56px;
    border-radius: 6px;
    overflow: hidden;
    background: linear-gradient(180deg, #3a3a40, #2a2a2f);
}

.drive-road-line {
    position: absolute;
    top: 50%;
    left: 0;
    right: 0;
    height: 4px;
    margin-top: -2px;
    background: repeating-linear-gradient(90deg, #e8d44d 0 34px, transparent 34px 74px);
    animation: drive-scroll 1.1s linear infinite;
}

@keyframes drive-scroll {
    from { transform: translateX(0); }
    to { transform: translateX(-74px); }
}

@media (prefers-reduced-motion: reduce) {
    .drive-road-line { animation: none; }
}

.drive-scenery {
    font-style: italic;
    opacity: 0.9;
}

.drive-landmark {
    border: 1px dashed rgba(255,255,255,0.25);
    border-radius: 8px;
    background: rgba(255,255,255,0.03);
}

.drive-album {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}

.drive-photo {
    display: flex;
    flex-direction: column;
    align-items: center;
    min-width: 58px;
    padding: 6px 4px;
    border-radius: 6px;
    background: rgba(255,255,255,0.05);
}

.drive-photo-emoji { font-size: 1.4rem; }

.drive-photo-mile {
    font-size: 0.65rem;
    opacity: 0.6;
    font-family: ui-monospace, SFMono-Regular, Menlo, monospace;
}

/* ---- Aquarium fish sprites ---- */

/* Pixel-art fish drawn from the sprite sheet: keep the pixels crisp when scaled. */
.tank-sprite-img {
    background-repeat: no-repeat;
    image-rendering: pixelated;
}

/* A "Radiant" fish gently pulses its glow (respecting reduced-motion). */
.tank-radiant {
    animation: tank-radiant-pulse 2.4s ease-in-out infinite;
}

@keyframes tank-radiant-pulse {
    0%, 100% { opacity: 1; }
    50% { opacity: 0.82; }
}

@media (prefers-reduced-motion: reduce) {
    .tank-radiant { animation: none; }
}

/* A little sprite tile used in the fish shop and roster (not animated). */
.fish-chip {
    display: inline-block;
    background-image: url(/img/fish-sprites.png);
    background-repeat: no-repeat;
    image-rendering: pixelated;
    vertical-align: middle;
    flex: none;
}

/* ───────────────────────── Pointless Paper ───────────────────────── */
.paper-swatch { width: 34px; height: 34px; border-radius: 6px; cursor: pointer; border: 2px solid transparent; transition: transform .1s; }
.paper-swatch:hover { transform: scale(1.08); }
.paper-swatch.sel { border-color: #fff; box-shadow: 0 0 0 2px #2563eb; }

/* Character avatars cropped from the 320×320 atlas via a --row custom property */
.paper-avatar {
    background-image: url('/img/office/characters.png');
    image-rendering: pixelated; background-repeat: no-repeat; border-radius: 6px;
    background-color: rgba(255,255,255,.04);
    width: 64px; height: 64px; background-size: 640px 640px;
    background-position: 0 calc(var(--row) * -64px);
}
.paper-avatar.sm { width: 40px; height: 40px; background-size: 400px 400px; background-position: 0 calc(var(--row) * -40px); }
.paper-avatar.pick { cursor: pointer; border: 2px solid transparent; }
.paper-avatar.pick:hover { border-color: #64748b; }
.paper-avatar.pick.sel { border-color: #ffd54a; box-shadow: 0 0 0 2px #2563eb; }
.paper-crew { display: flex; flex-direction: column; align-items: center; gap: 4px; }
.paper-crew.me .paper-avatar { box-shadow: 0 0 0 2px #2563eb; }

/* In-game HUD */
.paper-hud { display: flex; align-items: center; justify-content: space-between; gap: 12px; flex-wrap: wrap;
    background: rgba(15,20,30,.6); border: 1px solid rgba(255,255,255,.08); border-radius: 10px; padding: 8px 14px; }
.paper-hud-left { display: flex; align-items: center; gap: 10px; }
.paper-logo { font-size: 1.8rem; }
.paper-co { font-weight: 700; font-size: 1.05rem; }
.paper-title { font-size: .72rem; color: #94a3b8; }
.paper-stats { display: flex; gap: 16px; flex-wrap: wrap; }
.paper-stat { display: flex; flex-direction: column; align-items: flex-end; }
.paper-stat .k { font-size: .62rem; color: #94a3b8; text-transform: uppercase; letter-spacing: .04em; }
.paper-stat .v { font-weight: 700; font-size: 1.05rem; font-variant-numeric: tabular-nums; }
.paper-stat .v.danger { color: #f87171; }

.paper-bars { display: flex; gap: 16px; flex-wrap: wrap; }
.paper-bar { flex: 1 1 220px; }
.paper-bar > span { font-size: .7rem; color: #cbd5e1; }
.paper-bar .track { height: 10px; border-radius: 6px; background: rgba(255,255,255,.08); overflow: hidden; margin-top: 3px; }
.paper-bar .fill { height: 100%; border-radius: 6px; transition: width .2s; }
.paper-bar .fill.quota { background: linear-gradient(90deg,#3b82f6,#22d3ee); }
.paper-bar .fill.morale { background: linear-gradient(90deg,#f59e0b,#4ade80); }
.paper-event .paper-ev-timer { font-weight: 700; margin-left: 8px; }

.paper-stage { position: relative; display: inline-block; max-width: 100%; }
.paper-canvas { display: block; max-width: 100%; height: auto; image-rendering: pixelated;
    border-radius: 10px; border: 2px solid rgba(0,0,0,.4); background: #0a0c10; box-shadow: 0 8px 30px rgba(0,0,0,.5); touch-action: none; }
.paper-overlay { position: absolute; inset: 0; display: flex; flex-direction: column; align-items: center; justify-content: center;
    text-align: center; padding: 24px; background: rgba(5,8,14,.82); border-radius: 10px; }

.paper-underbar { display: flex; align-items: center; justify-content: space-between; gap: 12px; flex-wrap: wrap; }
.paper-orders { display: flex; align-items: center; gap: 6px; flex-wrap: wrap; }
.paper-orders .lbl { font-size: .72rem; color: #94a3b8; text-transform: uppercase; }
.paper-order { font-size: .72rem; background: rgba(255,255,255,.06); border: 1px solid rgba(255,255,255,.1);
    border-radius: 999px; padding: 2px 8px; font-variant-numeric: tabular-nums; }
.paper-order.whale { border-color: #fbbf24; color: #fbbf24; }

.paper-crewbar { display: flex; gap: 10px; flex-wrap: wrap; }
.paper-crewchip { display: flex; align-items: center; gap: 8px; background: rgba(15,20,30,.5);
    border: 1px solid; border-radius: 10px; padding: 5px 10px; }
.paper-crewchip .nm { font-size: .72rem; font-weight: 600; }
.paper-crewchip .stam { width: 70px; height: 6px; background: rgba(255,255,255,.1); border-radius: 4px; overflow: hidden; margin-top: 3px; }
.paper-crewchip .stam > div { height: 100%; background: linear-gradient(90deg,#f59e0b,#4ade80); transition: width .2s; }

/* Editor */
.paper-toolbox { max-height: 78vh; overflow-y: auto; }
.paper-tools { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 4px; }
.paper-tool { display: inline-flex; align-items: center; gap: 6px; font-size: .72rem; color: #e2e8f0;
    background: rgba(255,255,255,.05); border: 1px solid rgba(255,255,255,.1); border-radius: 8px;
    padding: 4px 8px; cursor: pointer; transition: border-color .1s, background .1s; }
.paper-tool:hover { background: rgba(255,255,255,.1); }
.paper-tool.sel { border-color: #ffd54a; background: rgba(255,213,74,.12); }
.paper-tool .sw { width: 16px; height: 16px; border-radius: 4px; flex: none; border: 1px solid rgba(0,0,0,.3); }
.paper-tool .thumb { width: 30px; height: 30px; flex: none; image-rendering: pixelated; background-repeat: no-repeat;
    background-color: rgba(0,0,0,.2); border-radius: 4px; }
.paper-tool.obj { flex-direction: column; width: 74px; text-align: center; gap: 3px; }
.paper-tool-hint { font-size: .8rem; color: #cbd5e1; }
.paper-canvas-wrap { overflow: auto; max-width: 100%; }

/* ── Salt & Plunder (pirate) ─────────────────────────────────────────────── */
.pirate-hud { display: flex; align-items: center; justify-content: space-between; gap: 12px; flex-wrap: wrap;
    background: rgba(10,26,46,.65); border: 1px solid rgba(255,255,255,.08); border-radius: 10px; padding: 8px 14px; }
.pirate-hud-left { display: flex; align-items: center; gap: 10px; }
.pirate-logo { font-size: 1.8rem; }
.pirate-co { font-weight: 700; font-size: 1.05rem; }
.pirate-title { font-size: .72rem; color: #94a3b8; }
.pirate-stats { display: flex; gap: 16px; flex-wrap: wrap; }
.pirate-stat { display: flex; flex-direction: column; align-items: flex-end; }
.pirate-stat .k { font-size: .62rem; color: #94a3b8; text-transform: uppercase; letter-spacing: .04em; }
.pirate-stat .v { font-weight: 700; font-size: 1.05rem; font-variant-numeric: tabular-nums; }
.pirate-stat .v.danger { color: #f87171; }

.pirate-stage { position: relative; width: 100%; height: min(64vh, 620px); margin-top: 4px; }
.pirate-canvas { display: block; width: 100%; height: 100%; image-rendering: pixelated;
    border-radius: 10px; border: 2px solid rgba(0,0,0,.45); background: #0c2a4d;
    box-shadow: 0 8px 30px rgba(0,0,0,.5); touch-action: none; }

.pirate-underbar { display: flex; align-items: center; justify-content: space-between; gap: 12px; flex-wrap: wrap; }
