.battle-log-hover-underline {
    text-decoration: none;
    cursor: pointer;
}

.battle-log-hover-underline:hover {
    text-decoration: underline;
}

[x-cloak] {
    display: none !important
}

@font-face {
    font-family: 'Pixel-Font';
    src: url('https://jgouken.github.io/PRToolVersionCheck/RD%20Pixel%20Font/rhythm-doctor-pixel-font.otf.woff2') format('woff2');
}

* {
    scrollbar-width: auto;
    scrollbar-color: #5c5c5c #050101;
}

*::-webkit-scrollbar {
    width: 12px;
}

*::-webkit-scrollbar-track {
    background: #050101;
}

*::-webkit-scrollbar-thumb {
    background-color: #5c5c5c;
    border-radius: 10px;
    border: 3px solid #000000;
}

body,
html {
    position: fixed;
    height: 100%;
    margin: 0;
    padding: 0;
    background-color: black;
    color: white;
    z-index: 1;
    font-family: 'Pixel-Font', sans-serif;
}

div,
p,
h1,
h2,
h3,
h4,
h5,
h6,
span {
    position: fixed;
    position: relative;
    top: 0;
    margin: 0;
    padding: 0;
    color: white;
    z-index: 1;
}

#global-tooltip {
    position: fixed;
    pointer-events: none;
    background-color: rgba(0, 0, 0, 0.85);
    color: #fff;
    font-size: 20px;
    padding: 8px 8px;
    border-radius: 4px;
    opacity: 0;
    transition: opacity 0.2s cubic-bezier(0.49, -0.11, 0, 1.13);
    z-index: 9999;
    white-space: pre-line;
    max-width: 20%;
}

img {
    pointer-events: none;
}

[data-tooltip] {
    cursor: default;
    text-decoration: none;
    transition: text-decoration-color 2s cubic-bezier(0.49, -0.11, 0, 1.13);
    pointer-events: auto;
}

.battle-log [data-tooltip]:hover {
    text-decoration: underline;
    text-decoration-color: white;
}

.background-image {
    position: fixed;
    background: linear-gradient(rgba(0, 0, 0, 0.75), rgba(0, 0, 0, 0.99), rgba(0, 0, 0, 0.75)),
        url('assets/backgrounds/Warhamshire.jpg');
    background-color: rgba(0, 0, 0, 0.125);
    background-position: center;
    background-repeat: no-repeat;
    background-size: cover;

    height: 100%;
    width: 100%;
    top: 0;
    z-index: 1;
}

.overlay-transparency {
    position: fixed;
    height: 100%;
    width: 100%;
    top: 0;
    background-color: rgba(0, 0, 0, 1);
    z-index: 99;
    pointer-events: none;
}

.centered-inputs {
    position: fixed;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    text-align: center;
    border: 1px solid rgba(0, 0, 0, 0.04);
    box-shadow: 0 12px 12px rgba(0, 0, 0, 0.6);
    background: linear-gradient(135deg, rgba(255, 255, 255, 0.02), rgba(0, 0, 0, 0.18));
    gap: 20px;
    height: auto;
    left: 50%;
    top: 52%;
    transform: translate(-50%, -52%);
    transition: all 0.3s ease;
    padding: 28px 32px;
    backdrop-filter: blur(50px);
}

.centered-buttons {
    position: relative;
    display: flex;
    justify-content: center;
    margin-top: 400px;
    gap: 15px;
    box-sizing: border-box;
    flex-wrap: wrap;
}

.name-input {
    font-family: "Pixelify Sans", sans-serif;
    font-size: 20px;
    padding: 12px 16px;
    width: 90%;
    max-width: 720px;
    background: rgba(255, 255, 255, 0.02);
    border: 2px solid rgba(255, 255, 255, 0.10);
    color: white;
    text-align: center;
    box-shadow: inset 0 6px 16px rgba(0, 0, 0, 0.6);
    transition: border-color 160ms ease, transform 120ms ease, box-shadow 160ms ease;
}

.credits {
    font-family: "Pixelify Sans", sans-serif;
    position: fixed;
    top: 95%;
    bottom: 0;
    left: 0;
    width: 100%;
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-size: clamp(12px, 1vw, 1vw);
    padding: 8px 18px;
    box-sizing: border-box;
    z-index: 1000;
    background: linear-gradient(to top, rgba(0, 0, 0, 0.35), transparent);
    color: #fff;
    overflow: visible;
    backdrop-filter: blur(2px);
}

.regular-button {
    font-family: "Pixelify Sans", sans-serif;
    font-size: clamp(16px, 2.6vw, 28px);
    padding: 10px 18px;
    background-color: rgb(20, 5, 228);
    color: white;
    border: 4px solid rgb(1, 0, 88);
    cursor: pointer;
    opacity: 1;
    min-width: 120px;
    max-width: 90vw;
    box-sizing: border-box;
    transition: background-color 0.18s cubic-bezier(0.2, 1, 0.2, 1), transform 160ms ease, box-shadow 160ms ease;
    box-shadow: 0 12px 30px rgba(0, 0, 0, 0.55);
}

button,
input[type="button"],
input[type="submit"],
.regular-button,
.btn--primary,
.btn--success,
.btn--danger,
.btn--purple,
.btn--violet,
.btn--lime,
.btn--landing-primary,
.btn--landing-success,
.btn--landing-danger,
.battle-button,
.battle-button--small,
.travel-button,
.battle-consumable-button {
    will-change: transform;
    transform-origin: center;
    transition: transform 180ms cubic-bezier(0.2, 1, 0.2, 1);
}

button:hover,
input[type="button"]:hover,
input[type="submit"]:hover,
.regular-button:hover,
.btn--primary:hover,
.btn--success:hover,
.btn--danger:hover,
.btn--purple:hover,
.btn--violet:hover,
.btn--lime:hover,
.btn--landing-primary:hover,
.btn--landing-success:hover,
.btn--landing-danger:hover,
.battle-button:hover,
.battle-button--small:hover,
.travel-button:hover,
.battle-consumable-button:hover {
    transform: translateY(-6px) scale(1.02);
}

button:active,
input[type="button"]:active,
input[type="submit"]:active,
.regular-button:active,
.btn--primary:active,
.battle-button:active,
.travel-button:active {
    transform: translateY(-2px) scale(0.995);
}

.player {
    position: fixed;
    left: 0;
    bottom: 0;
    top: auto;
    z-index: 2;
    display: flex;
    flex-direction: row;
    align-items: center;
    gap: 20px;
    padding: 0 10px 10px;
    box-sizing: border-box;
    overflow: hidden;
    z-index: 9999;
    transition: all 2.5s ease-in-out;
}

.player-hud {
    position: relative;
    flex: 0 0 700px;
    height: auto;
    overflow: visible;
}

.player-title {
    font-size: 60px;
    font-family: 'Pixelify Sans', sans-serif;
    margin-left: 20px;
    width: fit-content;
    border: none;
    outline: none;
}

.welcome-sub {
    text-align: center;
    font-size: 18px;
    top: 22px;
    color: #e6e6e6;
}

.main-title {
    text-align: center;
    font-weight: bold;
    font-size: clamp(28px, 8vw, 64px);
    top: 40px;
    letter-spacing: 6px;
    text-transform: uppercase;
    text-shadow: 0 10px 30px rgba(0, 0, 0, 0.6), 0 6px 18px rgba(123, 92, 255, 0.06);
}

.centered-heading {
    text-align: center;
    font-family: 'Pixelify Sans', sans-serif;
    font-size: clamp(24px, 8vw, 60px);
    width: 90vw;
}

.returning-title {
    text-align: center;
    font-size: clamp(24px, 8vw, 60px);
    font-family: 'Pixelify Sans', sans-serif;
    width: 100%;
}

.credits-muted {
    color: grey;
}

.hidden {
    display: none;
}

.btn--primary {
    background-color: rgb(20, 5, 228);
    color: white;
    border: 5px solid rgb(1, 0, 88);
    font-size: inherit;
    cursor: pointer;
}

.btn--success {
    background-color: green;
    border: 5px solid rgb(0, 88, 34);
    color: white;
    font-size: inherit;
    cursor: pointer;
}

.btn--danger {
    background-color: red;
    color: white;
    border: 5px solid rgb(88, 0, 0);
    font-size: inherit;
}

.top-fixed-button-row {
    position: static;
    z-index: 1000;
    gap: 20px;
    width: 100%;
    display: flex;
    justify-content: center;
    padding: 8px 0;
    margin-top: 8px;
}

@media (max-width: 1100px) {
    .returning .centered-buttons {
        order: 2;
    }

    .returning .centered-buttons.top-fixed-button-row {
        order: 3;
    }

    .top-fixed-button-row button {
        min-width: 120px;
    }
}

.player img {
    width: 100%;
    height: auto;
    margin-top: -30px;
    position: relative;
    z-index: 2;
    filter: drop-shadow(0 6px 12px rgba(0, 0, 0, 0.6));
}

.centered-buttons--large-top {
    margin-top: 20vh;
}

.centered-buttons--small-top {
    margin-top: 20px;
}

.btn--purple {
    background-color: rgb(92, 80, 255);
    color: black;
    border: 5px solid rgb(6, 4, 122);
}

.btn--violet {
    background-color: rgb(184, 111, 218);
    border: 5px solid rgb(153, 9, 219);
    color: black;
}

.btn--lime {
    background-color: rgb(184, 255, 150);
    color: black;
    border: 5px solid rgb(15, 160, 1);
}

.btn--landing-primary {
    background-color: rgb(20, 5, 228);
    color: white;
    border: 5px solid rgb(1, 0, 88);
}

.btn--landing-success {
    background-color: rgb(42, 201, 42);
    color: black;
    border: 5px solid rgb(0, 88, 0);
}

.btn--landing-danger {
    background-color: red;
    color: white;
    border: 5px solid rgb(88, 0, 0);
}

.how-title {
    text-align: center;
    font-size: 44px;
    font-family: 'Pixelify Sans', sans-serif;
    margin-top: 24px;
}

.how-tabs {
    display: flex;
    justify-content: center;
    gap: 10px;
    flex-wrap: nowrap;
    overflow-x: auto;
    overflow-y: hidden;
    -webkit-overflow-scrolling: touch;
    box-sizing: border-box;
    padding: 0 8px;
}

.how-tabs .inventory-tab {
    flex: 0 1 auto;
    min-width: 48px;
    max-width: 42vw;
    white-space: nowrap;
    padding: 8px 14px;
    font-size: clamp(14px, 2.2vw, 18px);
    box-sizing: border-box;
    overflow: hidden;
    text-overflow: ellipsis;
    display: inline-block;
    text-align: center;
}

@media (max-width: 768px) {
    .how-tabs {
        gap: 8px;
    }

    .how-tabs .inventory-tab {
        padding: 7px 10px;
        font-size: 16px;
    }
}

@media (max-width: 480px) {
    .how-tabs {
        gap: 6px;
        padding: 0 6px;
    }

    .how-tabs .inventory-tab {
        padding: 6px 8px;
        font-size: 14px;
    }
}

@media (max-width: 360px) {
    .how-tabs {
        gap: 4px;
    }

    .how-tabs .inventory-tab {
        font-size: 13px;
        padding: 6px 6px;
        min-width: 44px;
    }
}

.how-content-box {
    max-width: 1200px;
    height: 73vh;
    width: 90%;
    margin: 18px auto 0;
    overflow-y: auto;
    padding: 16px 22px;
    border: 5px solid rgba(255, 255, 255, 0.25);
    background-color: rgba(0, 0, 0, 0.55);
    box-sizing: border-box;
}

.how-content-box .section-heading {
    font-size: 34px;
    font-family: 'Pixelify Sans', sans-serif;
}

.how-content-box .how-paragraph {
    font-family: 'Pixelify Sans', sans-serif;
    font-size: clamp(14px, 2.2vw, 24px);
    line-height: 1.6;
}

.how-lead {
    font-family: 'Pixelify Sans', sans-serif;
    font-size: clamp(14px, 2.2vw, 24px);
    line-height: 1.6;
    margin: 12px 0;
}

.how-point-warning {
    margin-top: 10px;
    border: 4px solid rgb(245, 17, 17);
    background-color: rgba(255, 0, 0, 0.15);
    padding: 12px;
}

.how-point-warning-title {
    font-family: 'Pixelify Sans', sans-serif;
    font-size: 22px;
    color: rgb(255, 159, 159);
    margin: 0 0 6px 0;
}

.how-point-warning-text {
    font-family: 'Pixelify Sans', sans-serif;
    font-size: clamp(14px, 2.2vw, 24px);
    line-height: 1.6;
    margin: 0;
}

.note-box {
    margin-top: 10px;
    border: 4px solid rgb(88, 0, 0);
    background-color: rgba(117, 0, 0, 0.2);
    padding: 12px;
}

.note-heading {
    font-family: 'Pixelify Sans', sans-serif;
    font-size: 22px;
    color: rgb(253, 113, 113);
}

.note-box--green {
    border-color: rgb(0, 88, 0);
    background-color: rgba(42, 201, 42, 0.2);
}

.note-heading--green {
    color: rgb(138, 233, 138);
}

.inventory-controls-row {
    padding: 10px;
    display: flex;
    gap: 10px;
    align-items: center;
    background-color: rgba(0, 0, 0, 0.3);
}

.inventory-controls-row--muted {
    padding: 10px;
    display: flex;
    gap: 10px;
    align-items: center;
    background-color: rgba(0, 0, 0, 0.25);
    border-top: 1px solid rgba(255, 255, 255, 0.1);
}

.inventory-tab--compact {
    padding: 5px 10px;
    font-size: 12px;
}

.inventory-search-input {
    font-family: 'Pixelify Sans', sans-serif;
    font-size: 14px;
    padding: 6px 10px;
    min-width: 260px;
    background-color: rgba(0, 0, 0, 0.5);
    border: 2px solid #333;
    color: white;
}

.inventory-item-row {
    display: flex;
    align-items: center;
    gap: 8px;
}

.chest-found {
    margin-top: -100px;
}

.chest-title {
    text-align: center;
    font-size: 54px;
    font-family: 'Pixelify Sans', sans-serif;
    margin-top: 130px;
}

.chest-img-wrap {
    display: flex;
    justify-content: center;
}

.chest-img {
    width: auto;
    height: 50vh;
    object-fit: contain;
    image-rendering: pixelated;
}

.chest-buttons {
    margin-top: 0px;
}

.note-box--blue {
    border-color: rgb(1, 0, 88);
    background-color: rgba(20, 5, 228, 0.2);
}

.note-heading--blue {
    color: rgb(147, 141, 255);
}

.note-box--violet {
    border-color: rgb(153, 9, 219);
    background-color: rgba(184, 111, 218, 0.2);
}

.note-heading--violet {
    color: rgb(228, 176, 249);
}

.centered-buttons--how-footer {
    margin-top: 16px;
    margin-bottom: 20px;
}

.battle-weaponry {
    position: relative;
    top: -35px;
    background-color: rgba(0, 0, 0, 0.25);
    padding: 0;
    font-family: 'Pixel-Font', sans-serif;
    font-size: 18px;
    color: white;
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    width: 100%;
    gap: 0;
    align-items: stretch;
    align-content: center;
    z-index: 20;
    transition: all 0.2s cubic-bezier(0.49, -0.11, 0, 1.13);
    margin: 0;
    box-sizing: border-box;
    border: 5px solid rgba(0, 0, 0, 0.5);
}

.battle-weaponry>span {
    display: flex;
    justify-content: center;
    align-items: center;
    text-align: center;
    min-width: 0;
}

.pstatus-effects {
    position: relative;
    flex: 1 1 auto;
    font-family: 'Pixel-Font', sans-serif;
    color: white;
    display: flex;
    flex-direction: row;
    flex-wrap: wrap;
    font-size: 50px;
    gap: 20px;
    margin-bottom: 45px;
}

.experience-bar-background {
    position: absolute;
    top: 80px;
    left: 121px;
    width: 455px;
    height: 31px;
    background-color: rgba(0, 140, 255, 0.37);
    z-index: 1;
}

.health-bar-background {
    position: absolute;
    top: 110px;
    left: 110px;
    width: 560px;
    height: 35px;
    background-color: rgba(255, 0, 0, 0.308);
    transform: skewX(-45deg);
    z-index: 1;
}

.stamina-bar-background {
    position: absolute;
    top: 145px;
    left: 100px;
    width: 310px;
    height: 25px;
    background-color: rgba(255, 238, 0, 0.164);
    z-index: 1;
}

.experience-bar {
    position: absolute;
    top: 80px;
    left: 121px;
    width: 0px;

    height: 31px;
    background-color: rgba(0, 140, 255, 1);
    transform: skewX(-45deg);
    border-right: 6px solid white;
    z-index: 1;
    transition: width 2s ease-out;
}

.health-bar {
    position: absolute;
    top: 110px;
    left: 110px;
    width: 0px;

    height: 35px;
    background-color: rgb(0, 255, 13);
    border-right: 6px solid white;
    transform: skewX(-45deg);
    z-index: 1;
    transition: width 2s ease-out;
}

.stamina-bar {
    position: absolute;
    top: 145px;
    left: 100px;
    width: 0px;

    height: 25px;
    background-color: rgb(251, 255, 0);
    border-right: 6px solid white;
    transform: skewX(-45deg);
    z-index: 1;
    transition: width 2s ease-out;
}

.experience-bar-stats {
    position: absolute;
    top: 87px;
    left: 260px;
    font-family: 'Pixel-Font', sans-serif;
    font-size: 20px;
    color: black;
    z-index: 2;
}

.health-bar-stats {
    position: absolute;
    top: 116px;
    left: 319px;
    font-family: 'Pixel-Font', sans-serif;
    font-size: 30px;
    color: black;
    z-index: 2;
}

.stamina-bar-stats {
    position: absolute;
    top: 153px;
    left: 227px;
    font-family: 'Pixel-Font', sans-serif;
    font-size: 20px;
    color: black;
    z-index: 2;
}

.mini-stats {
    position: absolute;
    top: 160px;
    left: 430px;
    width: auto;
    font-family: 'Pixel-Font', sans-serif;
    font-size: 16px;
    color: white;
    z-index: 2;
    display: flex;
    flex-direction: row;
    align-items: center;
    gap: 8px;
}

.mini-stats span {
    margin-right: 10px;
}

.encounter {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    z-index: 2;
}

.enemy {
    position: relative;
    z-index: 2;
    flex: 1 1 100%;
    object-fit: cover;
    transition: all 2.5s ease-in-out;
    overflow: hidden;
    pointer-events: none;
}

.enemy-heart {
    position: absolute;
    width: 100%;
    height: auto;
    margin-top: 30px;
    z-index: 2;
}

.enemy-thumbnail {
    position: absolute;
    float: right;
    top: 180px;
    height: 150px;
    right: calc(5px + 1%);
    margin-top: -160px;
    z-index: 2;
}

.enemy-health-bar-background {
    position: absolute;
    width: 80%;
    height: 30px;
    left: 50px;
    margin-top: 50px;
    background-color: rgb(41, 0, 0);
    border-radius: 20px;
    border: 5px solid black;
}

.enemy-health-bar {
    position: absolute;

    width: 0%;
    height: 30px;
    left: 50px;
    top: 55px;
    background-color: rgb(117, 0, 0);
    border-radius: 20px;
    z-index: 2;
    transition: all 2.0s ease-out;
}

/* Loading tips carousel (styles kept in CSS; font comes from existing Pixelify Sans) */
#audio-loading-overlay {
    font-family: "Pixelify Sans", sans-serif;
}

#loading-tips-carousel {
    position: fixed;
    left: 50%;
    top: 66vh;
    transform: translateX(-50%);
    width: 60%;
    max-width: 720px;
    height: 140px;
    display: flex;
    align-items: center;
    justify-content: center;
    pointer-events: none;
    z-index: 10001;
}

.carousel-shell {
    position: relative;
    width: 100%;
    height: 100%;
    overflow: hidden;
    display: flex;
    align-items: center;
    justify-content: center;
}

.tip-item {
    position: absolute;
    left: 50%;
    transform: translate(-50%, calc(-50% + 48px));
    color: #fff;
    font-family: "Pixelify Sans", sans-serif;
    font-size: 18px;
    text-align: center;
    padding: 8px 16px;
    background: linear-gradient(180deg, rgba(255, 255, 255, 0.02), rgba(0, 0, 0, 0.05));
    border-radius: 8px;
    backdrop-filter: blur(6px);
    box-shadow: 0 6px 18px rgba(0, 0, 0, 0.6);
    pointer-events: none;
}

.tip-text {
    display: inline-block;
}

.fade-mask.top,
.fade-mask.bottom {
    position: absolute;
    left: 0;
    width: 100%;
    height: 30%;
    pointer-events: none;
}

.fade-mask.top {
    top: 0;
    background: linear-gradient(to bottom, rgba(0, 0, 0, 0.85), rgba(0, 0, 0, 0));
}

.fade-mask.bottom {
    bottom: 0;
    background: linear-gradient(to top, rgba(0, 0, 0, 0.85), rgba(0, 0, 0, 0));
}

@keyframes spin {
    from {
        transform: rotate(0deg);
    }

    to {
        transform: rotate(360deg);
    }
}

.enemy-health-bar-stats {
    position: absolute;
    margin-top: 60px;
    left: 35%;
    font-family: 'Pixel-Font', sans-serif;
    font-size: 30px;
    color: white;
    z-index: 4;
}

.enemy-level {
    position: absolute;
    top: 20px;
    left: 5%;
    font-family: 'Pixel-Font', sans-serif;
    font-size: 20px;
    color: white;
    z-index: 4;
}

.enemy-name {
    position: absolute;
    top: 20%;
    left: 5%;
    font-family: 'Pixelify Sans', sans-serif;
    font-size: 50px;
    color: white;
    z-index: 4;
}

.estatus-effects {
    position: absolute;
    left: 26%;
    margin-top: 15px;
    transform: translateY(-50%);
    color: white;
    display: flex;
    flex-direction: row;
    flex-wrap: wrap;
    justify-content: flex-end;
    align-content: center;
    align-items: center;
    width: 58%;
    font-size: 30px;
    gap: 10px;
}

.battle-log {
    position: fixed;
    left: 50%;
    transform: translateX(-50%);
    display: block;
    flex-direction: column;
    justify-content: flex-end;
    width: 90%;
    background-color: rgba(0, 0, 0, 0.5);
    border: 10px solid black;
    padding: 10px;
    overflow-y: auto;
    font-family: 'Pixelify Sans', sans-serif;
    font-size: clamp(20px, 1.5vw, 1.5vw);
    color: white;
    line-height: 2;
    z-index: 2;
    white-space: pre-line;
}

.battle-station {
    position: fixed;
    display: flex;
    margin: 0 auto;
    gap: 10px;
    bottom: 0;
    top: 55%;
    left: 50%;
    transform: translateX(-50%);
    width: 90%;
    height: 20%;
    background-color: rgba(4, 0, 39, 0.37);
    z-index: 2;
}

.battle-buttons {
    flex: 7;
    display: flex;
    background-color: rgba(0, 0, 0, 0.5);
    margin: 10px;
    padding: 10px;
    font-family: 'Pixel-Font', sans-serif;
    font-size: 24px;
    color: white;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    gap: 20px;
}

.battle-actions {
    display: flex;
    flex-direction: row;
    gap: 20px;
}

.battle-skills {
    display: flex;
    flex-direction: row;
    justify-content: center;
    align-items: flex-start;
    gap: 20px;
}

.battle-consumables {
    width: 100%;
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    align-content: flex-start;
    gap: 10px;
    max-height: 160px;
    overflow-y: auto;
    padding: 4px 6px 4px 0;
}

.battle-consumables .battle-item,
.battle-consumables .battle-flee {
    font-size: 20px !important;
    padding: 6px 12px;
    line-height: 1.2;
}

.battle-consumable-button {
    background-color: rgba(22, 102, 22, 0.95);
    color: white;
    border: 3px solid rgb(0, 97, 21);
    font-family: 'Pixelify Sans', sans-serif;
    font-size: 24px;
    padding: 8px 12px;
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: 10px;
}

.battle-consumable-button:hover {
    filter: brightness(1.12);
}

.round-info {
    flex: 1;
    background-color: rgba(0, 0, 0, 0.5);
    border: 1px solid white;
    margin: 10px;
    padding: 10px;
    font-family: 'Pixel-Font', sans-serif;
    font-size: 24px;
    color: white;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
}

.debug {
    position: fixed;
    z-index: 100;
    top: 50%;
    right: 0;
    transform: translate(110%, -50%);
    transition: transform 0.35s cubic-bezier(0.49, -0.11, 0, 1.13);
    padding: 20px;
    color: white;
    font-family: 'Pixelify Sans', sans-serif;
    max-width: 50%;
    max-height: 70vh;
    overflow-y: auto;
    background: rgba(0, 0, 0, 0.9);
    border: 2px solid #444;
    backdrop-filter: blur(6px);
    box-shadow: -6px 0 20px rgba(0, 0, 0, 0.6);
}

.debug.open {
    transform: translate(0%, -50%);
}

.debug-grid {
    display: grid;
    gap: 12px;
}

.debug-grid input {
    padding: 10px;
    font-size: 20px;
    background: #111;
    color: white;
    border: 2px solid #555;
    font-family: 'Pixel-Font', sans-serif;
}

.travel-panel {
    position: fixed;
    z-index: 100;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    padding: 20px;
    color: white;
    font-family: 'Pixelify Sans', sans-serif;
    width: min(800px, 90%);
    max-height: 95vh;
    overflow: visible;
    text-align: center;
}

.travel-grid {
    display: flex;
    flex-direction: column;
    gap: 10px;
    max-height: calc(95vh - 99px);
    overflow-y: auto;
    padding-right: 8px;
    align-items: center;
}

.travel-button {
    width: 100%;
    max-width: 720px;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    text-align: center;
    padding: 12px 16px;
    background: #0f0f10;
    border: 2px solid #333;
    color: white;
    cursor: pointer;
    gap: 6px;
    box-sizing: border-box;
    background: linear-gradient(rgba(0, 0, 0, 0.75), rgba(0, 0, 0, 0.99), rgba(0, 0, 0, 0.75));
    transition: all 0.4s cubic-bezier(0.49, -0.11, 0, 1.13);
}

.travel-button:hover {
    border-color: #666;
    background: linear-gradient(rgba(0, 0, 0, 0.75), rgba(0, 0, 0, 0.99), rgba(0, 0, 0, 0.75)),
        var(--travel-bg) no-repeat center / cover;
    transform: scale(1.05);
}

.travel-name {
    font-size: 30px;
    font-family: 'Pixelify Sans', sans-serif;
    display: block;
}

.travel-subtext {
    font-size: 18px;
    font-family: 'Pixel-Font', sans-serif;
    color: #cfcfcf;
    display: block;
}

.travel-button.active {
    border-color: rgba(255, 0, 0, 0.9);
    background: linear-gradient(rgba(0, 0, 0, 0.55), rgba(0, 0, 0, 0.79), rgba(0, 0, 0, 0.55)),
        var(--travel-bg) no-repeat center / cover;
}

.travel-button.active .travel-subtext {
    color: red;
}

.travel-panel h1 {
    margin: 0 0 10px 0;
    font-size: 28px;
}

.travel-button--warhamshire {
    --travel-bg: url('assets/backgrounds/Warhamshire.jpg');
}

.travel-button--warham-castle {
    --travel-bg: url('assets/backgrounds/WarhamCastle.jpg');
}

.travel-button--hinterland {
    --travel-bg: url('assets/backgrounds/Hinterland.jpg');
}

.travel-button--uralan-mountains {
    --travel-bg: url('assets/backgrounds/UralanMountains.jpg');
}

.travel-button--vulpeston {
    --travel-bg: url('assets/backgrounds/Vulpeston.jpg');
}

.travel-button--vulpes-tower {
    --travel-bg: url('assets/backgrounds/VulpesTower.jpg');
}

.travel-button--vexadel {
    --travel-bg: url('assets/backgrounds/Vexadel.jpg');
}

.travel-button--vexadel-gaillard {
    --travel-bg: url('assets/backgrounds/VexadelGaillard.jpg');
}

.travel-button--sanguisuge {
    --travel-bg: url('assets/backgrounds/Sanguisuge.jpg');
}

.travel-button--sangston-mansion {
    --travel-bg: url('assets/backgrounds/SangstonMansion.jpg');
}

.travel-button--eternal-damnation {
    --travel-bg: url('assets/backgrounds/EternalDamnation.jpg');
}

.inventory-panel {
    position: fixed;
    z-index: 100;
    top: 39%;
    left: 50%;
    transform: translate(-50%, -50%);
    height: 70%;
    width: 90%;
    color: white;
    font-family: 'Pixelify Sans', sans-serif;
    max-height: 95vh;
    overflow-y: auto;
    text-align: left;
    background-color: rgba(20, 20, 20, 0.95);
    border: 2px solid #222;
    box-shadow: 0 12px 30px rgba(0, 0, 0, 0.6);
    font-size: 18px;
    pointer-events: auto;
}

.inventory-grid {
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
    justify-content: flex-start;
    align-content: flex-start;
    padding: 16px;
    box-sizing: border-box;
    height: 80%;
    overflow-y: auto;
}

.inventory-item {
    display: flex;
    align-items: center;
    width: 220px;
    min-height: 64px;
    background: linear-gradient(180deg, #111 0%, #222 100%);
    border: 2px solid #444;
    padding: 10px;
    box-sizing: border-box;
    cursor: grab;
    transition: all 0.12s cubic-bezier(0.49, -0.11, 0, 1.13);
}

.crafting-controls-row {
    padding: 8px 16px;
    display: flex;
    gap: 8px;
    align-items: center;
    background-color: rgba(0, 0, 0, 0.3);
}

.crafting-search-input {
    font-family: 'Pixelify Sans', sans-serif;
    font-size: 13px;
    padding: 5px 8px;
    min-width: 220px;
    background-color: rgba(0, 0, 0, 0.5);
    border: 2px solid #333;
    color: white;
}

.inventory-item-body--centered {
    width: 100%;
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
}

.journal-controls--compact {
    padding-top: 6px;
    padding-bottom: 6px;
    gap: 6px;
    overflow-x: auto;
    display: flex;
    align-items: center;
}

.journal-controls__label--small {
    font-size: 13px;
}

.inventory-item:hover {
    transform: translateY(-4px);
}

.inventory-item:active {
    cursor: grabbing;
}

body.inventory-shift-open-journal #inventory .inventory-item,
body.inventory-shift-open-journal #inventory .inventory-item:active,
body.inventory-shift-open-journal #crafting .inventory-item,
body.inventory-shift-open-journal #crafting .inventory-item:active,
body.inventory-shift-open-journal #crafting-panel .inventory-item,
body.inventory-shift-open-journal .crafting-panel .inventory-item,
body.inventory-shift-open-journal .crafting-grid .inventory-item,
body.inventory-shift-open-journal .crafting-inventory-grid .inventory-item {
    cursor: alias;
}

.inventory-item.dragging {
    opacity: 0.4;
}

.player.drop-target {
    background-color: rgba(0, 255, 102, 0.103);
}

.inventory-item-icon-wrap {
    width: 48px;
    height: 48px;
    flex: 0 0 48px;
    display: flex;
    position: relative;
    align-items: center;
    justify-content: center;
    overflow: hidden;
}

.inventory-item-amount {
    position: absolute;
    top: -10px;
    background: #b91c1c;
    color: white;
    font-size: 20px;
    border: 2px solid #000;
    line-height: 1;
    pointer-events: none;
}

.inventory-item-icon {
    width: 100%;
    height: 100%;
    object-fit: contain;
    display: block;
}

.inventory-item-body {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    gap: 4px;
    width: calc(100% - 58px);
}

.inventory-item--no-icon {
    justify-content: center;
}

.inventory-item--no-icon .inventory-item-body {
    width: 100%;
    align-items: center;
    text-align: center;
    pointer-events: none;
}

.inventory-item-amount--inline {
    background: #b91c1c;
    color: white;
    font-size: 18px;
    padding: 2px 6px;
    border: 2px solid #000;
    line-height: 1;
    pointer-events: none;
    display: inline-block;
}

.inventory-item-name {
    font-size: 18px;
    color: #fff;
    font-family: 'Pixelify Sans', sans-serif;
    align-items: flex-start;
    justify-self: flex-start;
    pointer-events: none;
}

.inventory-item-meta {
    font-size: 16px;
    color: #cfcfcf;
    align-items: flex-start;
    justify-self: flex-start;
    white-space: pre-line;
    pointer-events: none;
}

.inventory-item-level {
    color: #ffd166;
    font-weight: 700;
    pointer-events: none;
    align-items: flex-start;
    justify-self: flex-start;
}

.inventory-item-effect {
    color: #93c5fd;
    pointer-events: none;
}

.inventory-empty {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    color: #bbb;
    font-size: 18px;
    z-index: 10;
    pointer-events: none;
}

.inventory-tabs {
    display: flex;
    gap: 4px;
    padding: 0 16px;
    margin-bottom: -2px;
    position: relative;
    z-index: 1;
}

.inventory-tab {
    font-family: 'Pixelify Sans', sans-serif;
    font-size: 20px;
    padding: 10px 20px;
    background-color: rgba(40, 40, 40, 0.95);
    border: 2px solid #222;
    border-bottom: none;
    color: #888;
    cursor: pointer;
    transition: all 0.2s cubic-bezier(0.49, -0.11, 0, 1.13);
    position: relative;
    bottom: -2px;
}

.inventory-tab:hover {
    color: #aaa;
}

.inventory-tab--active {
    background-color: rgba(20, 20, 20, 0.95);
    border-color: #222;
    color: white;
    z-index: 2;
}

.journal-panel {
    position: fixed;
    z-index: 100;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    height: 90%;
    width: 90%;
    color: white;
    font-family: 'Pixelify Sans', sans-serif;
    max-height: 95vh;
    overflow: hidden;
    text-align: left;
    background-color: rgba(20, 20, 20, 0.95);
    border: 2px solid #222;
    box-shadow: 0 12px 30px rgba(0, 0, 0, 0.6);
    font-size: 18px;
    pointer-events: auto;
    display: flex;
    flex-direction: column;
}

.journal-controls {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 10px 16px;
    background-color: rgba(0, 0, 0, 0.3);
    border-bottom: 1px solid rgba(255, 255, 255, 0.08);
}

.journal-controls__label {
    color: #fff;
    font-size: 14px;
    white-space: nowrap;
}

.journal-controls__btn {
    padding: 5px 10px;
    font-size: 12px;
}

.journal-search-input,
.journal-level-input {
    font-family: 'Pixelify Sans', sans-serif;
    font-size: 14px;
    padding: 6px 10px;
    background-color: rgba(0, 0, 0, 0.5);
    border: 2px solid #333;
    color: white;
}

.journal-search-input {
    min-width: 280px;
}

.journal-level-group {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-left: auto;
}

.journal-level-input {
    width: 80px;
}

.journal-layout {
    display: grid;
    grid-template-columns: 320px 1fr;
    gap: 10px;
    flex: 1;
    min-height: 0;
    padding: 10px;
    box-sizing: border-box;
}

.journal-list,
.journal-detail {
    border: 2px solid #222;
    background-color: rgba(10, 10, 10, 0.6);
    overflow-y: auto;
    position: relative;
    min-height: 0;
}

.journal-entry {
    width: calc(100% - 16px);
    margin: 8px;
    padding: 10px;
    display: flex;
    flex-direction: column;
    gap: 4px;
    text-align: left;
    background: linear-gradient(180deg, #111 0%, #222 100%);
    border: 2px solid #444;
    color: white;
    cursor: pointer;
    font-family: 'Pixelify Sans', sans-serif;
}

.journal-entry:hover {
    transform: translateY(-2px);
}

.journal-entry--active {
    border-color: #888;
    background: linear-gradient(180deg, #1f1f1f 0%, #2f2f2f 100%);
}

.journal-entry__name {
    font-size: 18px;
}

.journal-entry__meta {
    font-size: 14px;
    color: #c6c6c6;
}

.journal-detail__inner {
    padding: 16px;
}

.journal-detail__header {
    position: relative;
    min-height: 0;
}

.journal-detail__heading {
    min-width: 0;
}

.journal-detail__media {
    width: 160px;
    height: 160px;
    object-fit: contain;
    image-rendering: pixelated;
    position: absolute;
    top: 0;
    right: 0;
    pointer-events: none;
}

.journal-detail__title {
    font-size: 34px;
    font-family: 'Pixelify Sans', sans-serif;
    margin-bottom: 4px;
}

.journal-detail__subtitle {
    font-size: 18px;
    color: #dadada;
    margin-bottom: 12px;
}

.journal-detail__description {
    font-size: 16px;
    color: #cfcfcf;
    margin-bottom: 8px;
    white-space: pre-line;
}

.journal-group {
    margin-top: 14px;
}

.journal-group__title {
    font-size: 22px;
    margin-bottom: 8px;
}

.journal-lines {
    margin: 0;
    padding-left: 22px;
    display: flex;
    flex-direction: column;
    gap: 6px;
    color: #ececec;
}

.journal-status-emoji {
    cursor: pointer;
}

.journal-drop-link {
    cursor: pointer;
}

.journal-area-enemy-link {
    cursor: pointer;
}

.journal-area-link {
    cursor: pointer;
}

.journal-chest-link {
    cursor: pointer;
}

.journal-subcards {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
    gap: 10px;
}

.journal-subcard {
    border: 2px solid #333;
    background-color: rgba(0, 0, 0, 0.35);
    padding: 10px;
}

.journal-subcard__title {
    font-size: 18px;
    margin-bottom: 8px;
}

.equipment-display {
    position: fixed !important;
    top: 76vh;
    right: 19%;
    height: fit-content;
    background-color: rgba(0, 0, 0, 0.9);
    padding: 12px;
    font-family: 'Pixel-Font', sans-serif;
    font-size: 18px;
    color: white;
    min-width: 220px;
    max-width: 250px;
    z-index: 20;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.8);
    transition: all 0.3s cubic-bezier(0.49, -0.11, 0, 1.13);
    pointer-events: none;
    justify-content: baseline;
}

.crafting-panel {
    position: fixed;
    z-index: 100;
    top: 39%;
    left: 50%;
    transform: translate(-50%, -50%);
    height: 70%;
    width: 90%;
    color: white;
    font-family: 'Pixelify Sans', sans-serif;
    max-height: 95vh;
    overflow: hidden;
    text-align: left;
    background-color: rgba(20, 20, 20, 0.95);
    border: 2px solid #222;
    box-shadow: 0 12px 30px rgba(0, 0, 0, 0.6);
    font-size: 20px;
    pointer-events: auto;
}

.crafting-columns {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 12px;
    height: 100%;
    padding: 10px;
    box-sizing: border-box;
}

.crafting-column {
    min-width: 0;
    border: 2px solid #222;
    background-color: rgba(10, 10, 10, 0.6);
    display: flex;
    flex-direction: column;
    overflow: hidden;
}

.crafting-column .inventory-tabs {
    padding-top: 8px;
}

.crafting-grid,
.crafting-inventory-grid {
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
    justify-content: flex-start;
    align-content: flex-start;
    padding: 16px;
    box-sizing: border-box;
    height: 100%;
    overflow-y: auto;
}

.crafting-item {
    width: 100%;
    min-height: 86px;
}

.crafting-column--right.crafting-drop-target {
    border: 2px dotted #ef4444 !important;
    box-shadow: 0 0 14px rgba(239, 68, 68, 0.45);
}

.player.crafting-drop-target-player {
    background-color: rgba(255, 140, 0, 0.16);
}

.drop-hint-label {
    position: absolute;
    left: 50%;
    top: 10px;
    transform: translateX(-50%) translateY(4px);
    background: rgba(0, 0, 0, 0.68);
    color: #d9ffd9;
    border: 1px solid rgba(120, 255, 165, 0.45);
    border-radius: 6px;
    padding: 8px 14px;
    font-size: 18px;
    font-family: 'Pixelify Sans', sans-serif;
    white-space: nowrap;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.15s ease, transform 0.15s cubic-bezier(0.49, -0.11, 0, 1.13);
    z-index: 30;
}

.drop-hint-label--visible {
    opacity: 1;
    transform: translateX(-50%) translateY(0);
}

.drop-hint-target--active {
    outline: 2px dotted rgba(120, 255, 165, 0.95);
    outline-offset: -2px;
}

.crafting-inventory-grid .inventory-item {
    width: calc(50% - 6px);
    min-height: 72px;
}

@media (max-width: 1200px) {
    .crafting-columns {
        grid-template-columns: 1fr;
    }

    .crafting-inventory-grid .inventory-item {
        width: 100%;
    }
}

@keyframes slideDown {
    from {
        transform: translateX(-50%) translateY(-100px);
        opacity: 0;
    }

    to {
        transform: translateX(-50%) translateY(0);
        opacity: 1;
    }
}

@keyframes slideUp {
    from {
        transform: translateX(-50%) translateY(0);
        opacity: 1;
    }

    to {
        transform: translateX(-50%) translateY(-100px);
        opacity: 0;
    }
}

.enemy-top-spacing--small {
    margin-top: 40px;
}

.enemy-top-spacing--large {
    margin-top: 70px;
}

.enemy-heart {
    width: 80px;
    position: absolute;
    top: 70%;
    left: 1%;
    z-index: 3;
}

.battle-actions {
    display: flex;
    gap: 20px;
}

.battle-consumables {
    display: flex;
    gap: 12px;
}

.battle-skills {
    display: flex;
    gap: 20px;
    justify-content: center;
    align-items: flex-start;
}

.battle-skill-group {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 5px;
}

.battle-button {
    font-family: 'Pixelify Sans', sans-serif;
    font-size: 40px;
}

.battle-button--small {
    font-family: 'Pixelify Sans', sans-serif;
    font-size: 20px;
}

.battle-continue {
    background-color: rgb(42, 201, 42);
    border: 5px solid rgb(0, 88, 0);
    cursor: pointer;
}

.battle-skill-cost {
    font-family: 'Pixel-Font', sans-serif;
    font-size: 24px;
    line-height: 1;
}

.inventory-item--draggable {
    cursor: grab;
}

.inventory-item-body--rowcenter {
    display: flex;
    align-items: center;
    gap: 8px;
}

.round-info {
    white-space: pre-line;
    text-align: center;
}

.debug-grid button,
.debug-save-btn {
    font-family: 'Pixel-Font', sans-serif;
    background-color: transparent;
    border: 2px solid rgb(109, 109, 109);
    cursor: pointer;
    padding: 5px;
    color: white;
}

.debug-grid input {
    background-color: rgba(0, 0, 0, 0.65);
    border: 1px solid #333;
    color: white;
    padding: 6px 8px;
    font-family: 'Pixel-Font', sans-serif;
}

.mini-stats .mini-stat-icon {
    top: 8px;
    width: 20px;
    height: 20px;
    display: inline-block;
    transform: translateY(4px);
    image-rendering: auto;
}

.controls-label {
    color: white;
    font-size: 14px;
    white-space: nowrap;
}

.inventory-item-row--inline {
    display: flex;
    align-items: center;
    gap: 8px;
}

@media (max-width: 768px) {
    .main-title {
        font-size: 34px;
    }

    .inventory-panel,
    .crafting-panel,
    .journal-panel {
        top: 50%;
        left: 50%;
        transform: translate(-50%, -50%);
        width: 94%;
        height: 86%;
        padding: 8px;
        font-size: 16px;
    }

    .inventory-grid,
    .crafting-grid {
        gap: 8px;
        padding: 10px;
    }

    .crafting-columns {
        grid-template-columns: 1fr;
    }

    .crafting-inventory-grid .inventory-item {
        width: 100%;
    }

    .journal-layout {
        display: flex;
        flex-direction: column;
        gap: 8px;
    }

    .journal-detail__media {
        display: none;
    }

    .equipment-display {
        display: none;
    }

    .chest-img {
        height: 36vh;
    }
}

@media (max-width: 480px) {
    .main-title {
        font-size: 28px;
    }

    .credits {
        font-size: 12px;
    }

    .inventory-item {
        width: 100%;
        min-height: 56px;
    }

    .inventory-item-icon-wrap {
        width: 40px;
        height: 40px;
        flex: 0 0 40px;
    }

    .inventory-item-name {
        font-size: 16px;
    }

    .journal-layout {
        padding: 6px;
    }

    .battle-consumables .battle-item,
    .battle-consumables .battle-flee {
        font-size: 16px !important;
    }

    .debug {
        width: 92%;
        right: 4%;
        top: auto;
        bottom: 6%;
    }

    .chest-img {
        height: 28vh;
    }
}

@media (max-width: 768px) {
    #global-tooltip {
        max-width: 60%;
        font-size: 16px;
    }
}

@media (max-width: 480px) {
    .travel-button {
        padding: 8px 10px;
    }

    .travel-name {
        font-size: 20px;
    }

    .travel-subtext {
        font-size: 14px;
    }
}

@media (max-width: 768px) {

    .inventory-panel,
    .crafting-panel,
    .journal-panel {
        border: 1px solid #333;
        box-shadow: 0 6px 14px rgba(0, 0, 0, 0.45);
        border-radius: 8px;
        max-height: calc(100vh - 48px);
    }

    .battle-buttons {
        min-height: 52px;
        padding: 12px;
    }

    .battle-button,
    .regular-button {
        min-height: 48px;
        padding: 10px 12px;
    }

    .player {
        padding-bottom: env(safe-area-inset-bottom, 8px);
    }
}

@media (max-width: 480px) {

    .inventory-panel,
    .crafting-panel,
    .journal-panel {
        width: 98%;
        height: 92%;
        border-radius: 6px;
        padding: 10px;
    }

    .inventory-item {
        min-height: 60px;
        padding: 8px;
    }

    .inventory-item-icon-wrap {
        width: 40px;
        height: 40px;
    }

    .inventory-item-name {
        font-size: 15px;
    }

    .regular-button,
    .btn--primary,
    .btn--landing-primary {
        border-width: 3px;
    }

    .debug {
        max-height: 38vh;
        padding: 12px;
    }

    #global-tooltip {
        font-size: 14px;
        max-width: 75%;
    }
}

@media (max-width: 480px) {
    .travel-button {
        padding: 10px 12px;
    }
}

.mute-button {
    position: fixed;
    top: 12px;
    left: 56px;
    z-index: 11000;
    background: rgba(0, 0, 0, 0.45);
    color: #fff;
    border: 2px solid rgba(255, 255, 255, 0.08);
    padding: 8px 10px;
    border-radius: 8px;
    cursor: pointer;
    font-size: 20px;
    display: flex;
    align-items: center;
    justify-content: center;
    backdrop-filter: blur(6px);
}

.music-button {
    position: fixed;
    top: 12px;
    left: 12px;
    z-index: 11000;
    background: rgba(0, 0, 0, 0.45);
    color: #fff;
    border: 2px solid rgba(255, 255, 255, 0.08);
    padding: 8px 10px;
    border-radius: 8px;
    cursor: pointer;
    font-size: 20px;
    display: flex;
    align-items: center;
    justify-content: center;
    backdrop-filter: blur(6px);
}

.music-button i {
    pointer-events: none;
}

.music-button:hover {
    transform: translateY(-3px) scale(1.02);
}

.mute-button i {
    pointer-events: none;
}

.mute-button:hover {
    transform: translateY(-3px) scale(1.02);
}