:root {
    --bg-primary: #0a0a0f;
    --bg-secondary: #12121a;
    --bg-card: #1a1a25;
    --fg-primary: #e8e6e3;
    --fg-muted: #8a8a9a;
    --accent-gold: #c9a227;
    --accent-red: #9b2335;
    --accent-blue: #2d5a8a;
    --accent-green: #2d8a4a;
    --border-color: #2a2a3a
}

* {
    box-sizing: border-box
}

body {
    margin: 0;
    font-family: 'Source Sans 3', Arial, sans-serif;
    background: var(--bg-primary);
    color: var(--fg-primary);
    min-height: 100vh;
    overflow-x: hidden
}

.game-bg {
    position: fixed;
    inset: 0;
    z-index: -2;
    background: #0a0a0f;
    background: linear-gradient(180deg, #0a0a0f 0, #10101a 50%, #0a0a0f 100%);
}

.particles {
    position: fixed;
    inset: 0;
    z-index: -1;
    pointer-events: none;
    contain: strict;
}

.particle {
    position: absolute;
    width: 2px;
    height: 2px;
    background: var(--accent-gold);
    border-radius: 50%;
    opacity: 0;
    animation: float 8s infinite;
    will-change: transform, opacity;
}

@keyframes float {

    0%,
    100% {
        opacity: 0;
        transform: translateY(100vh) scale(0)
    }

    10% {
        opacity: .8
    }

    90% {
        opacity: .3
    }

    100% {
        transform: translateY(-10vh) scale(1)
    }
}

.wrap {
    width: min(1180px, 100% - 28px);
    margin-inline: auto
}

.main {
    padding: 28px 0 44px
}

.font-display,
h1,
h2,
h3,
.brand,
.btn {
    font-family: 'Cinzel', serif
}

.hero {
    min-height: 100vh;
    display: grid;
    place-items: center;
    padding: 24px
}

.hero-card {
    text-align: center;
    max-width: 760px
}

.logo-title {
    font-size: clamp(42px, 9vw, 88px);
    color: var(--accent-gold);
    line-height: 1;
    margin: 0 0 12px;
    text-shadow: 0 0 40px rgba(201, 162, 39, .25)
}

.subtitle {
    color: var(--fg-muted);
    font-size: 20px
}

.line {
    height: 2px;
    background: linear-gradient(90deg, transparent, var(--accent-gold), transparent);
    margin: 28px auto;
    width: min(320px, 80%)
}

.actions {
    display: flex;
    gap: 12px;
    justify-content: center;
    flex-wrap: wrap
}

.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    text-decoration: none;
    border: 0;
    border-radius: 6px;
    padding: 12px;
    cursor: pointer;
    font-weight: 800;
    text-transform: uppercase;
    letter-spacing: 1px;
    transition: .2s
}

.btn-primary {
    background: linear-gradient(135deg, var(--accent-gold), #a88520);
    color: #08080d
}

.btn-secondary {
    background: transparent;
    color: var(--accent-gold);
    border: 1px solid var(--accent-gold)
}

.btn-danger {
    background: linear-gradient(135deg, var(--accent-red), #741927);
    color: white
}

.btn:hover {
    transform: translateY(-2px);
    filter: brightness(1.08)
}

.btn.full {
    width: 100%
}

.topbar {
    position: sticky;
    top: 0;
    z-index: 10;
    background: rgba(10, 10, 15, .96);
    backdrop-filter: blur(10px);
    border-bottom: 1px solid var(--border-color)
}

.topbar-inner {
    display: grid;
    grid-template-columns: 1fr auto auto auto;
    gap: 14px;
    align-items: center;
    padding: 12px 0
}

.brand {
    color: var(--accent-gold);
    font-size: 20px;
    font-weight: 900;
    text-decoration: none;
    display: flex;
    gap: 10px;
    align-items: center
}

.brand-icon {
    font-size: 26px
}

.player-mini {
    display: flex;
    gap: 10px;
    align-items: center
}

.player-mini small {
    display: block;
    color: var(--fg-muted)
}

.avatar-sm {
    width: 44px;
    height: 44px;
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: 8px;
    display: grid;
    place-items: center;
    font-size: 24px
}

.resources {
    display: flex;
    gap: 14px;
    color: var(--fg-muted);
    font-weight: 700
}

.hamb {
    display: none;
    background: var(--bg-card);
    color: white;
    border: 1px solid var(--border-color);
    padding: 8px 11px;
    border-radius: 8px
}

.nav {
    display: flex;
    gap: 6px;
    overflow: auto;
    padding-bottom: 10px
}

.nav a {
    color: var(--fg-muted);
    text-decoration: none;
    padding: 10px 13px;
    border-radius: 6px;
    white-space: nowrap
}

.nav a:hover {
    color: var(--accent-gold);
    background: rgba(201, 162, 39, .08)
}

.bars {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 16px;
    padding: 0 0 12px
}

.bar-label {
    display: flex;
    justify-content: space-between;
    color: var(--fg-muted);
    font-size: 12px;
    margin-bottom: 4px
}

.bar {
    height: 14px;
    background: #08080d;
    border: 1px solid var(--border-color);
    border-radius: 999px;
    overflow: hidden
}

.bar i {
    display: block;
    height: 100%;
    transition: .3s
}

.bar .hp,
.hp {
    background: linear-gradient(90deg, #8b0000, #cc3333)
}

.bar .mp,
.mp {
    background: linear-gradient(90deg, #1a4a8a, #3388cc)
}

.bar .xp,
.xp {
    background: linear-gradient(90deg, #8a6a00, var(--accent-gold))
}

.grid {
    display: grid;
    gap: 18px
}

.grid-2 {
    grid-template-columns: repeat(2, minmax(0, 1fr))
}

.grid-3 {
    grid-template-columns: repeat(3, minmax(0, 1fr))
}

.grid-4 {
    grid-template-columns: repeat(4, minmax(0, 1fr))
}

.card {
    background: linear-gradient(145deg, var(--bg-card), var(--bg-secondary));
    border: 1px solid var(--border-color);
    border-radius: 12px;
    padding: 22px;
    position: relative;
    overflow: hidden
}

.card:before {
    content: "";
    position: absolute;
    inset: 0 0 auto;
    height: 2px;
    background: linear-gradient(90deg, transparent, var(--accent-gold), transparent);
    opacity: .6
}

.card-title {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    margin-bottom: 14px
}

.card h2,
.card h3 {
    margin-top: 0;
    margin-bottom: 3px;
    color: var(--accent-gold)
}

.muted {
    color: var(--fg-muted)
}

.stat {
    background: #09090f;
    border: 1px solid var(--border-color);
    padding: 12px;
    border-radius: 10px
}

.stat b {
    display: block;
    font-size: 22px;
    color: var(--accent-gold)
}

.location,
.shop-item,
.quest,
.inv-item,
.rank-row {
    background: #11111a;
    border: 1px solid var(--border-color);
    border-radius: 10px;
    padding: 16px
}

.location {
    display: flex;
    flex-direction: column;
    gap: 10px
}

.location:hover,
.shop-item:hover,
.inv-item:hover {
    border-color: var(--accent-gold)
}

.big-icon {
    font-size: 44px
}

.form {
    max-width: 420px;
    margin: auto
}

.input,
label {
    display: block;
    width: 100%
}

label {
    color: var(--fg-muted);
    font-size: 14px;
    margin: 0 0 7px
}

.input {
    background: #09090f;
    border: 1px solid var(--border-color);
    border-radius: 8px;
    color: var(--fg-primary);
    padding: 13px 14px;
    margin-bottom: 14px
}

.input:focus {
    outline: 1px solid var(--accent-gold)
}

.classes {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 16px
}

.class-card input {
    display: none
}

.class-card span {
    display: block;
    background: var(--bg-card);
    border: 2px solid var(--border-color);
    border-radius: 14px;
    padding: 24px;
    text-align: center;
    cursor: pointer;
    height: 100%
}

.class-card input:checked+span {
    border-color: var(--accent-gold);
    box-shadow: 0 0 30px rgba(201, 162, 39, .2)
}

.alert {
    padding: 13px 16px;
    border-radius: 8px;
    margin-bottom: 16px;
    border: 1px solid var(--border-color)
}

.alert.success {
    border-color: var(--accent-green);
    background: rgba(45, 138, 74, .12)
}

.alert.error {
    border-color: var(--accent-red);
    background: rgba(155, 35, 53, .15)
}

.alert.info {
    border-color: var(--accent-blue);
    background: rgba(45, 90, 138, .15)
}

.toast-stack {
    position: fixed;
    top: 86px;
    right: max(18px, calc((100vw - 1180px) / 2));
    z-index: 120;
    display: grid;
    gap: 10px;
    width: min(420px, calc(100vw - 28px));
    pointer-events: none
}

.toast-notification {
    position: relative;
    display: grid;
    grid-template-columns: 1fr auto;
    align-items: center;
    gap: 12px;
    min-height: 54px;
    padding: 12px 12px 12px 16px;
    border: 1px solid var(--border-color);
    border-left-width: 4px;
    border-radius: 8px;
    background:
        linear-gradient(145deg, rgba(26, 26, 37, .98), rgba(12, 12, 18, .98));
    box-shadow: 0 18px 42px rgba(0, 0, 0, .42), inset 0 0 0 1px rgba(255, 255, 255, .03);
    color: #f1eee7;
    pointer-events: auto;
    animation: toastIn .24s ease-out both
}

.toast-notification.success {
    border-color: var(--accent-green)
}

.toast-notification.error {
    border-color: var(--accent-red)
}

.toast-notification.info {
    border-color: var(--accent-blue)
}

.toast-notification span {
    line-height: 1.35
}

.toast-notification button {
    width: 30px;
    height: 30px;
    border: 1px solid rgba(255, 255, 255, .12);
    border-radius: 6px;
    background: rgba(0, 0, 0, .22);
    color: #f1eee7;
    cursor: pointer;
    font-size: 22px;
    line-height: 1
}

.toast-notification button:hover {
    border-color: var(--accent-gold);
    color: var(--accent-gold)
}

.toast-notification.is-hiding {
    animation: toastOut .2s ease-in forwards
}

@keyframes toastIn {
    from {
        opacity: 0;
        transform: translateY(-10px) translateX(18px)
    }
    to {
        opacity: 1;
        transform: translateY(0) translateX(0)
    }
}

@keyframes toastOut {
    to {
        opacity: 0;
        transform: translateY(-8px) translateX(18px)
    }
}

.combat-arena {
    display: grid;
    grid-template-columns: 1fr auto 1fr;
    align-items: center;
    gap: 18px;
    text-align: center
}

.sprite {
    width: 120px;
    height: 150px;
    margin: auto;
    background: linear-gradient(180deg, var(--bg-card), var(--bg-secondary));
    border: 2px solid var(--border-color);
    border-radius: 12px;
    display: grid;
    place-items: center;
    font-size: 66px
}

.enemy {
    width: 140px;
    height: 140px;
    border-radius: 50%;
    border: 3px solid var(--accent-red);
    box-shadow: 0 0 40px rgba(155, 35, 53, .25);
    display: grid;
    place-items: center;
    font-size: 60px;
    margin: auto
}

.vs {
    font-size: 30px;
    color: var(--accent-red);
    font-weight: 900
}

.log {
    max-height: 240px;
    overflow: auto;
    background: #08080d;
    border: 1px solid var(--border-color);
    border-radius: 8px;
    padding: 12px
}

.log p {
    margin: 0;
    padding: 6px 0;
    border-bottom: 1px solid rgba(255, 255, 255, .04)
}

.inventory-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(150px, 1fr));
    gap: 12px
}

.rarity-common {
    border-left: 4px solid #888
}

.rarity-uncommon {
    border-left: 4px solid #44aa44
}

.rarity-rare {
    border-left: 4px solid #4488ff
}

.rarity-epic {
    border-left: 4px solid #aa44ff
}

.rarity-legendary {
    border-left: 4px solid #ffaa00
}

.rarity-mythic {
    border-left: 4px solid #ff5c5c
}

.table {
    width: 100%;
    border-collapse: collapse
}

.table th,
.table td {
    padding: 12px;
    border-bottom: 1px solid var(--border-color);
    text-align: left
}

.table th {
    color: var(--accent-gold)
}

.footer {
    text-align: center;
    color: var(--fg-muted);
    padding: 10px
}

.mobile-stack {
    display: flex;
    gap: 6px;
    flex-wrap: wrap
}

.inventory-action-image-button {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: min(220px, 100%);
    min-height: 48px;
    padding: 0;
    border: 0;
    border-radius: 6px;
    background: transparent;
    cursor: pointer;
    transition: transform .18s ease, filter .18s ease
}

.inventory-action-image-button img {
    display: block;
    width: 100%;
    height: auto;
    max-height: 58px;
    object-fit: contain
}

.inventory-action-image-button:hover {
    transform: translateY(-1px);
    filter: brightness(1.08)
}

.inventory-action-image-button:disabled {
    cursor: default;
    opacity: .42;
    filter: grayscale(.55);
    transform: none
}


.item-detail-card .mobile-stack {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    align-items: center;
    width: 100%
}

.item-detail-card .mobile-stack form {
    display: flex;
    width: 100%
}

.item-detail-card .mobile-stack .btn {
    width: 100%
}

.item-detail-card .mobile-stack .inventory-action-image-button {
    width: 100%;
    height: 62px;
    min-height: 62px
}

.item-detail-card .mobile-stack .inventory-action-image-button img {
    width: auto;
    height: 100%;
    max-width: 100%;
    object-fit: contain
}

.admin-links a {
    display: block;
    color: var(--fg-primary);
    text-decoration: none;
    padding: 12px;
    border: 1px solid var(--border-color);
    border-radius: 8px;
    margin-bottom: 8px
}

.admin-links a:hover {
    border-color: var(--accent-gold)
}

@media(max-width:800px) {
    .wrap {
        width: min(100% - 18px, 1180px)
    }

    .topbar-inner {
        grid-template-columns: 1fr auto
    }

    .player-mini,
    .resources {
        grid-column: 1/-1
    }

    .hamb {
        display: block
    }

    .nav {
        display: none;
        flex-direction: column;
        padding: 8px 0 12px
    }

    .nav.open {
        display: flex
    }

    .bars {
        grid-template-columns: 1fr
    }

    .grid-2,
    .grid-3,
    .grid-4,
    .classes,
    .combat-arena {
        grid-template-columns: 1fr
    }

    .main {
        padding-top: 16px
    }

    .card {
        padding: 16px
    }

    .actions .btn,
    .mobile-stack .btn {
        width: 100%
    }

    .logo-title {
        font-size: 42px
    }

    .enemy,
    .sprite {
        transform: scale(.9)
    }
}

/* Inventário estilo RPG clássico */
.inventory-window {
    max-width: 980px;
    margin: 0 auto;
    background: #070707;
    border: 3px solid #241a16;
    box-shadow: 0 18px 50px rgba(0, 0, 0, .65), inset 0 0 0 2px #47352b;
    border-radius: 6px;
    overflow: hidden
}

.inventory-frame-top {
    height: 82px;
    background: radial-gradient(circle at center, #263037 0 9%, #0a0a0a 10% 14%, #451516 15% 38%, #0c0c0c 39% 42%, #271e1b 43% 100%);
    border-bottom: 4px solid #15100f;
    display: grid;
    place-items: end center;
    padding-bottom: 15px
}

.inventory-frame-top span {
    font-family: 'Cinzel', serif;
    color: #d2a338;
    letter-spacing: 10px;
    font-weight: 900
}

.paper-panel {
    margin: 18px;
    background: linear-gradient(90deg, #17120f 0 18%, #c5b38d 19% 100%);
    border: 2px solid #34251d;
    display: grid;
    grid-template-columns: 290px 1fr;
    min-height: 420px
}

.attribute-panel {
    background: #120f0d;
    color: #d2a338;
    padding: 24px;
    border-right: 2px solid #2e211b
}

.attribute-panel h3 {
    letter-spacing: 6px;
    font-size: 18px;
    color: #d2a338;
    margin: 0 0 22px
}

.attribute-panel p {
    display: flex;
    justify-content: space-between;
    gap: 12px;
    margin: 16px 0;
    font-size: 18px
}

.attribute-panel b {
    color: #eee;
    font-weight: 500
}

.attribute-panel hr {
    border: 0;
    border-top: 1px solid #39271e;
    margin: 30px 0
}

.detail-btn {
    display: block;
    text-align: center;
    text-decoration: none;
    color: #d2a338;
    border: 1px solid #4f372b;
    background: #1c120f;
    padding: 13px;
    margin: 22px 0;
    font-family: 'Cinzel', serif;
    letter-spacing: 4px
}

.gold-box {
    background: #050505;
    border: 1px solid #4d371e;
    text-align: right;
    padding: 12px 18px;
    color: white;
    font-size: 20px
}

.equipment-panel {
    position: relative;
    min-height: 420px;
    background: linear-gradient(rgba(199, 179, 139, .88), rgba(186, 166, 126, .92)), repeating-linear-gradient(90deg, rgba(80, 60, 40, .22) 0 1px, transparent 1px 92px), repeating-linear-gradient(0deg, rgba(80, 60, 40, .18) 0 1px, transparent 1px 80px);
    overflow: hidden
}

.level-badge {
    position: absolute;
    top: 510px;
    right: 28px;
    background: #5a3b1e;
    color: #f3d181;
    padding: 9px 18px;
    border: 1px solid #2b1a13;
    font-family: 'Cinzel', serif
}

.equip-box {
    position: absolute;
    width: 86px;
    height: 100px;
    display: grid;
    place-items: center
}

.equip-box .item-square {
    width: 74px;
    height: 84px
}

.equip-label-mini {
    position: absolute;
    top: -17px;
    font-size: 10px;
    color: #5a3b1e;
    letter-spacing: 2px
}

.equip-armor {
    top: 58px;
    left: 50%;
    transform: translateX(-50%)
}

.equip-weapon {
    left: 52px;
    top: 155px
}

.equip-accessory {
    right: 52px;
    top: 155px
}

.empty-equip {
    width: 74px;
    height: 84px;
    border: 2px solid rgba(44, 31, 24, .35);
    background: rgba(40, 30, 24, .16);
    display: grid;
    place-items: center;
    color: rgba(44, 31, 24, .45);
    font-size: 30px
}

.hero-mannequin {
    position: absolute;
    left: 50%;
    top: 78px;
    transform: translateX(-50%);
    width: 170px;
    height: 320px;
    filter: drop-shadow(0 8px 16px rgba(0, 0, 0, .45))
}

.hero-mannequin .hood {
    position: absolute;
    left: 58px;
    top: 0;
    width: 56px;
    height: 78px;
    border-radius: 40px 40px 12px 12px;
    background: linear-gradient(#2a2721, #111);
    opacity: .72
}

.hero-mannequin .torso {
    position: absolute;
    left: 42px;
    top: 68px;
    width: 90px;
    height: 88px;
    background: linear-gradient(90deg, #252119, #a7a087 48%, #2a241d);
    clip-path: polygon(12% 0, 88% 0, 100% 100%, 0 100%)
}

.hero-mannequin .torso:after {
    content: "";
    position: absolute;
    left: 0;
    right: 0;
    top: 0;
    height: 28px;
    background: #7d131b
}

.hero-mannequin .belt {
    position: absolute;
    left: 38px;
    top: 158px;
    width: 96px;
    height: 22px;
    background: #16100d;
    border: 3px solid #5a3b1e
}

.hero-mannequin .legs {
    position: absolute;
    left: 48px;
    top: 183px;
    width: 78px;
    height: 94px;
    background: linear-gradient(90deg, #151515, #2e3137, #121212)
}

.hero-mannequin .boots {
    position: absolute;
    left: 42px;
    top: 278px;
    width: 92px;
    height: 38px;
    background: #211d16
}

.backpack-grid {
    display: grid;
    grid-template-columns: repeat(10, 1fr);
    gap: 3px;
    background: #0a0807;
    border-top: 3px solid #241a16;
    padding: 14px
}

.item-square {
    position: relative;
    border: 1px solid #2d221a;
    background: #0b0a09;
    min-height: 78px;
    display: grid;
    place-items: center;
    cursor: pointer;
    overflow: hidden;
    transform: translateZ(0); /* Hardware acceleration */
}

.item-square img {
    width: 75%;
    height: 75%;
    object-fit: contain;
    display: block;
    transform: translateZ(0);
}

.item-square .item-emoji,
.item-square span {
    font-size: 32px
}

.item-square.empty {
    cursor: default;
    background: #080706
}

.item-square.big {
    width: 86px;
    height: 86px;
}

.item-square.mini {
    width: 54px;
    height: 54px;
    min-height: 54px
}

.shop-visual {
    width: 74px;
    height: 74px;
    min-height: 74px;
    flex: 0 0 auto
}

.qty {
    position: absolute;
    right: 4px;
    bottom: 2px;
    font-size: 11px;
    color: #fff;
    text-shadow: 0 1px 2px #000
}

.rarity-common.item-square,
.item-square.rarity-common {
    box-shadow: inset 0 -4px 0 #888;
    background: radial-gradient(circle, rgba(136, 136, 136, 0.15) 0%, #0b0a09 75%)
}

.rarity-uncommon.item-square,
.item-square.rarity-uncommon {
    box-shadow: inset 0 -4px 0 #44aa44, 0 0 12px rgba(68, 170, 68, 0.15);
    background: radial-gradient(circle, rgba(68, 170, 68, 0.25) 0%, #0b0a09 75%)
}

.rarity-rare.item-square,
.item-square.rarity-rare {
    box-shadow: inset 0 -4px 0 #4488ff, 0 0 12px rgba(68, 136, 255, 0.15);
    background: radial-gradient(circle, rgba(68, 136, 255, 0.25) 0%, #0b0a09 75%)
}

.rarity-epic.item-square,
.item-square.rarity-epic {
    box-shadow: inset 0 -4px 0 #aa44ff, 0 0 12px rgba(170, 68, 255, 0.15);
    background: radial-gradient(circle, rgba(170, 68, 255, 0.25) 0%, #0b0a09 75%)
}

.rarity-legendary.item-square,
.item-square.rarity-legendary {
    box-shadow: inset 0 -4px 0 #ffaa00, 0 0 15px rgba(255, 170, 0, 0.2);
    background: radial-gradient(circle, rgba(255, 170, 0, 0.25) 0%, #0b0a09 75%)
}

.rarity-mythic.item-square,
.item-square.rarity-mythic {
    box-shadow: inset 0 -4px 0 #ff5c5c, 0 0 15px rgba(255, 92, 92, 0.2);
    background: radial-gradient(circle, rgba(255, 92, 92, 0.25) 0%, #0b0a09 75%)
}

.item-modal {
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, .82);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 50;
    opacity: 0;
    visibility: hidden;
    transition: .2s
}

.item-modal.active {
    opacity: 1;
    visibility: visible
}

.modal-card {
    background: var(--bg-card);
    border: 2px solid var(--accent-gold);
    border-radius: 12px;
    padding: 22px;
    width: min(420px, 92vw);
    position: relative;
    box-shadow: 0 18px 60px rgba(0, 0, 0, .7)
}

.modal-close {
    position: absolute;
    right: 12px;
    top: 8px;
    background: transparent;
    border: 0;
    color: #fff;
    font-size: 30px;
    cursor: pointer
}

.sell-confirm-card {
    width: min(430px, 92vw);
    text-align: center
}

.sell-confirm-card h3 {
    margin: 0 0 12px;
    color: var(--accent-gold)
}

.sell-confirm-card p {
    margin: 0 0 20px;
    color: #e7e1d2
}

.rpg-confirm-card p {
    font-size: 17px
}

.sell-confirm-actions {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 10px
}

.sell-confirm-actions form,
.sell-confirm-actions .btn {
    width: 100%
}

.chest-info-box {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 8px;
    margin: 14px 0;
}

.chest-info-box span,
.chest-preview-button {
    border: 1px solid var(--border-color);
    border-radius: 8px;
    background: #09090f;
    padding: 9px;
}

.chest-info-box span {
    color: #efe7d5
}

.chest-preview-button {
    color: var(--accent-gold);
    cursor: pointer;
    font-family: Cinzel, serif;
    font-weight: 900;
    text-align: left
}

.chest-preview-card {
    width: min(720px, 94vw)
}

.chest-preview-card h3 {
    margin: 0 0 8px;
    color: var(--accent-gold)
}

.chest-preview-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(138px, 1fr));
    gap: 10px;
    max-height: 54vh;
    overflow: auto;
    padding-right: 4px
}

.chest-preview-item {
    display: grid;
    grid-template-columns: auto minmax(0, 1fr);
    align-items: center;
    gap: 8px;
    padding: 8px;
    border: 1px solid rgba(201, 162, 39, .18);
    border-radius: 8px;
    background: rgba(0, 0, 0, .22)
}

.chest-preview-item span,
.chest-preview-item small {
    min-width: 0;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap
}

.chest-preview-item small {
    grid-column: 2;
    color: var(--fg-muted)
}

.detail-head {
    display: flex;
    align-items: center;
    gap: 16px;
    margin-bottom: 16px
}

.item-stats {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 8px;
    margin: 18px 0
}

.item-stats span {
    background: #09090f;
    border: 1px solid var(--border-color);
    border-radius: 8px;
    padding: 9px
}

.rarity-text {
    font-family: 'Cinzel', serif;
    letter-spacing: 2px
}

.rarity-color-common {
    color: #aaa
}

.rarity-color-uncommon {
    color: #66cc66
}

.rarity-color-rare {
    color: #66a6ff
}

.rarity-color-epic {
    color: #c06cff
}

.rarity-color-legendary {
    color: #ffc247
}

.rarity-color-mythic {
    color: #ff6b6b
}

.admin-form-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 12px
}

.admin-wide {
    grid-column: 1/-1
}

.check-line {
    display: flex;
    gap: 8px;
    align-items: center;
    background: #09090f;
    border: 1px solid var(--border-color);
    border-radius: 8px;
    padding: 13px 14px;
    margin-top: 21px
}

.admin-items-list {
    display: grid;
    gap: 10px
}

.admin-item-groups {
    display: grid;
    gap: 14px
}

.admin-item-group {
    background: rgba(8, 8, 13, .46);
    border: 1px solid var(--border-color);
    border-radius: 10px;
    overflow: hidden
}

.admin-item-group summary {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    min-height: 52px;
    padding: 12px 14px;
    color: var(--accent-gold);
    cursor: pointer;
    font-family: 'Cinzel', serif;
    font-weight: 900;
    list-style: none;
    background: #11111a
}

.admin-item-group summary::-webkit-details-marker {
    display: none
}

.admin-item-group summary b {
    min-width: 34px;
    padding: 4px 8px;
    border: 1px solid rgba(201, 162, 39, .4);
    border-radius: 999px;
    color: var(--fg-primary);
    text-align: center;
    font-family: 'Source Sans 3', Arial, sans-serif;
    font-size: 13px
}

.admin-item-group .admin-items-list {
    padding: 10px
}

.admin-item-row {
    display: grid;
    grid-template-columns: auto 1fr auto;
    gap: 12px;
    align-items: center;
    background: #0e0e16;
    border: 1px solid var(--border-color);
    border-radius: 10px;
    padding: 10px
}

.admin-item-main {
    min-width: 0
}

.admin-item-meta {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
    margin-top: 7px
}

.admin-item-meta span {
    display: inline-flex;
    align-items: center;
    min-height: 24px;
    max-width: 100%;
    padding: 3px 8px;
    border: 1px solid rgba(255, 255, 255, .08);
    border-radius: 999px;
    color: var(--fg-muted);
    background: rgba(0, 0, 0, .22);
    font-size: 12px;
    line-height: 1.1;
    overflow-wrap: anywhere
}

.admin-item-meta .is-on {
    color: #8fd8a4;
    border-color: rgba(45, 138, 74, .45);
    background: rgba(45, 138, 74, .12)
}

.admin-item-meta .is-off {
    color: #d08b97;
    border-color: rgba(155, 35, 53, .42);
    background: rgba(155, 35, 53, .12)
}

.admin-item-row > .mobile-stack {
    justify-content: flex-end
}

.admin-item-row > .mobile-stack form {
    display: flex
}

@media(max-width:900px) {
    .paper-panel {
        grid-template-columns: 1fr;
        margin: 10px
    }

    .attribute-panel {
        border-right: 0;
        border-bottom: 2px solid #2e211b
    }

    .equipment-panel {
        min-height: 420px
    }

    .inventory-frame-top span {
        letter-spacing: 5px
    }

    .admin-form-grid {
        grid-template-columns: 1fr
    }

    .admin-item-group summary {
        padding: 11px 12px
    }

    .admin-item-group .admin-items-list {
        padding: 8px
    }

    .admin-item-row {
        grid-template-columns: auto minmax(0, 1fr)
    }

    .admin-item-main b {
        overflow-wrap: anywhere
    }

    .admin-item-row > .mobile-stack {
        grid-column: 1/-1;
        justify-content: stretch
    }

    .admin-item-row > .mobile-stack a,
    .admin-item-row > .mobile-stack form,
    .admin-item-row > .mobile-stack button {
        flex: 1 1 160px
    }

    .admin-item-row .btn {
        grid-column: 1/-1;
        width: 100%
    }

    .item-stats {
        grid-template-columns: 1fr
    }

    .item-square {
        min-height: 66px
    }

    .paper-panel {
        background: #c5b38d
    }

    .attribute-panel p {
        font-size: 16px
    }
}

@media(max-width:520px) {
    .equip-weapon {
        left: 14px
    }

    .equip-accessory {
        right: 14px
    }

    .hero-mannequin {
        transform: translateX(-50%) scale(.9)
    }

    .level-badge {
        right: 10px
    }

    .inventory-window {
        border-left: 0;
        border-right: 0;
        border-radius: 0
    }

    .backpack-grid {
        grid-template-columns: repeat(4, 1fr)
    }
}

/* ===== Inventory v3: RPG classic equipment screen ===== */
.inventory-v3 {
    max-width: 1040px
}

.rpg-paper-v3 {
    grid-template-columns: 280px 1fr;
    min-height: 560px
}

.equipment-v3 {
    min-height: 560px;
    position: relative;
    background: linear-gradient(rgba(208, 192, 154, .78), rgba(186, 168, 127, .9)), repeating-linear-gradient(90deg, rgba(74, 55, 33, .16) 0 1px, transparent 1px 96px), repeating-linear-gradient(0deg, rgba(74, 55, 33, .14) 0 1px, transparent 1px 92px)
}

.equipment-v3:before {
    content: "";
    position: absolute;
    inset: 18px;
    border: 2px solid rgba(88, 61, 38, .32);
    box-shadow: inset 0 0 0 1px rgba(255, 255, 255, .18)
}

.slot-lines {
    position: absolute;
    inset: 0;
    pointer-events: none;
    background: linear-gradient(90deg, transparent 0 19%, rgba(74, 55, 33, .35) 19% 19.4%, transparent 19.4% 38%, rgba(74, 55, 33, .22) 38% 38.3%, transparent 38.3% 61.7%, rgba(74, 55, 33, .22) 61.7% 62%, transparent 62% 80.6%, rgba(74, 55, 33, .35) 80.6% 81%, transparent 81%), linear-gradient(0deg, transparent 0 18%, rgba(74, 55, 33, .22) 18% 18.3%, transparent 18.3% 35%, rgba(74, 55, 33, .18) 35% 35.3%, transparent 35.3% 53%, rgba(74, 55, 33, .18) 53% 53.3%, transparent 53.3% 72%, rgba(74, 55, 33, .18) 72% 72.3%, transparent 72.3%)
}

.silhouette {
    position: absolute;
    left: 50%;
    top: 72px;
    width: 190px;
    height: 420px;
    transform: translateX(-50%);
    filter: drop-shadow(0 12px 10px rgba(0, 0, 0, .45));
    opacity: .9
}

.silhouette:before {
    content: "";
    position: absolute;
    left: 65px;
    top: 0;
    width: 60px;
    height: 72px;
    background: #1c1610;
    border-radius: 50% 50% 42% 42%;
    box-shadow: 0 66px 0 18px #1a140f
}

.silhouette:after {
    content: "";
    position: absolute;
    left: 42px;
    top: 75px;
    width: 106px;
    height: 300px;
    background: #16110d;
    clip-path: polygon(32% 0, 68% 0, 82% 18%, 74% 45%, 65% 100%, 52% 100%, 50% 50%, 48% 100%, 35% 100%, 26% 45%, 18% 18%);
    border-radius: 55px 55px 25px 25px
}

.equip-node {
    position: absolute;
    width: 92px;
    height: 92px;
    display: grid;
    place-items: center;
    z-index: 2
}

.equip-node .item-square,
.equip-node .empty-equip {
    width: 72px;
    height: 72px;
    min-height: 72px;
    border-radius: 4px
}

.equip-node .empty-equip {
    background: rgba(71, 53, 35, .12);
    border: 2px solid rgba(81, 58, 34, .28);
    color: rgba(81, 58, 34, .34);
    font-size: 28px
}

.equip-node.filled .item-square {
    border-color: #564029
}

.equip-node .equip-label-mini {
    top: -15px;
    color: #5b4125;
    padding: 1px 4px;
    border-radius: 3px;
    font-weight: 800
}

.equip-helmet {
    left: 50%;
    top: 40px;
    transform: translateX(-50%)
}

.equip-amulet {
    right: 84px;
    top: 48px
}

.equip-weapon {
    left: 54px;
    top: 156px
}

.equip-shield {
    right: 64px;
    top: 156px
}

.equip-armor {
    left: 50%;
    top: 156px;
    transform: translateX(-50%)
}

.equip-gloves {
    left: 70px;
    top: 268px
}

.equip-belt {
    left: 50%;
    top: 268px;
    transform: translateX(-50%)
}

.equip-ring_left {
    right: 78px;
    top: 268px
}

.equip-pants {
    left: 50%;
    top: 376px;
    transform: translateX(-50%)
}

.equip-ring_right {
    left: 74px;
    top: 382px
}

.equip-boots {
    right: 82px;
    top: 382px
}

.equip-cloak {
    left: 78px;
    top: 48px
}

.attribute-panel h3 {
    font-size: 16px
}

.attribute-panel p {
    font-size: 16px;
    margin: 13px 0
}

.backpack-grid {
    grid-template-columns: repeat(10, 1fr)
}

.backpack-grid .item-square {
    aspect-ratio: 1/1;
    min-height: 64px
}

.item-square img {
    width: 75%;
    height: 75%
}

.item-stats {
    grid-template-columns: repeat(2, 1fr)
}

@media(max-width:920px) {
    .rpg-paper-v3 {
        grid-template-columns: 1fr
    }

    .equipment-v3 {
        min-height: 570px
    }

    .attribute-panel {
        border-right: 0;
        border-bottom: 2px solid #2e211b
    }

    .item-stats {
        grid-template-columns: 1fr 1fr
    }

}

@media(max-width:560px) {
    .equipment-v3 {
        min-height: 520px
    }

    .silhouette {
        transform: translateX(-50%) scale(.82);
        top: 62px
    }

    .equip-node {
        width: 70px;
        height: 70px
    }

    .equip-node .item-square,
    .equip-node .empty-equip {
        width: 58px;
        height: 58px;
        min-height: 58px
    }

    .equip-node .equip-label-mini {
        font-size: 8px;
        letter-spacing: 1px
    }

    .equip-helmet {
        left: 8px;
        top: 52px
    }

    .equip-amulet {
        right: 8px;
        top: 52px
    }

    .equip-weapon {
        left: 8px;
        top: 145px
    }

    .equip-shield {
        right: 8px;
        top: 145px
    }

    .equip-armor {
        top: 145px
    }

    .equip-gloves {
        left: 8px;
        top: 238px
    }

    .equip-belt {
        top: 238px
    }

    .equip-ring_left {
        right: 8px;
        top: 238px
    }

    .equip-pants {
        top: 332px
    }

    .equip-ring_right {
        left: 8px;
        top: 332px
    }

    .equip-boots {
        right: 8px;
        top: 332px
    }

    .equip-cloak {
        right: 8px;
        top: 425px
    }

    .backpack-grid {
        grid-template-columns: repeat(4, 1fr)
    }

}

/* Vila: cards ilustrados */
.sr-only {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    white-space: nowrap;
    border: 0
}

.dashboard-hero-grid {
    align-items: stretch
}

.village-overview {
    display: flex;
    flex-direction: column;
    overflow: hidden;
    border: 1px solid rgba(201, 162, 39, .45);
    border-radius: 12px;
    background: #09090f;
    box-shadow: 0 18px 48px rgba(0, 0, 0, .35)
}

.village-overview-image {
    display: block;
    width: 100%;
    height: auto;
    object-fit: contain
}

.village-stats-overlay {
    padding: 12px;
    gap: 10px;
    margin-top: auto
}

.village-stats-overlay .stat {
    background: rgba(7, 7, 12, .92);
    border-color: rgba(201, 162, 39, .45);
    box-shadow: 0 10px 28px rgba(0, 0, 0, .28)
}

.character-card {
    display: flex;
    flex-direction: column;
    height: 100%;
    padding: 24px;
    background: radial-gradient(circle at 22% 55%, rgba(201, 162, 39, .08), transparent 34%), linear-gradient(145deg, var(--bg-card), var(--bg-secondary))
}

.character-card-head {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 12px
}

.character-card h2 {
    margin: 0 0 6px
}

.character-card-head .muted {
    margin: 0
}

.character-summary {
    display: grid;
    grid-template-columns: 184px 1fr;
    align-items: center;
    gap: 22px;
    flex: 1
}

.character-portrait-frame {
    width: 176px;
    height: auto;
    justify-self: center;
    border: 1px solid rgba(201, 162, 39, .38);
    border-radius: 10px;
    background: linear-gradient(180deg, rgba(255, 255, 255, .04), rgba(0, 0, 0, .28)), #050508;
    display: grid;
    place-items: end center;
    overflow: hidden;
    box-shadow: inset 0 0 0 1px rgba(255, 255, 255, .04), 0 16px 34px rgba(0, 0, 0, .32)
}

.character-portrait-frame img {
    display: block;
    width: 80%;
    height: auto;
    object-fit: contain;
    object-position: center bottom;
    filter: drop-shadow(0 12px 16px rgba(0, 0, 0, .55))
}

.character-portrait-frame span {
    font-size: 66px;
    place-self: center
}

.character-info {
    min-width: 0
}

.character-class-line {
    margin: 0 0 10px;
    color: var(--accent-gold);
    font-family: 'Cinzel', serif;
    font-weight: 800
}

.character-stats {
    margin: 0 0 18px;
    font-weight: 800;
    line-height: 1.45
}

.character-actions {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 10px;
    margin-top: 18px
}

.character-actions .btn {
    width: 100%;
    min-height: 46px;
    padding-inline: 12px
}

.character-image-button {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 100%;
    min-height: 48px;
    padding: 0;
    border: 0;
    border-radius: 6px;
    background: transparent;
    text-decoration: none;
    transition: transform .18s ease, filter .18s ease
}

.character-image-button img {
    display: block;
    width: 100%;
    height: 56px;
    object-fit: contain
}

.character-image-button:hover {
    transform: translateY(-1px);
    filter: brightness(1.08)
}

.action-banner-list {
    display: grid;
    gap: 14px;
    margin: 20px auto 0;
    max-width: 1030px
}

.image-action-card,
.explore-card {
    display: block;
    width: 100%;
    padding: 0;
    border: 1px solid rgba(201, 162, 39, .42);
    border-radius: 10px;
    background: #09090f;
    box-shadow: 0 16px 38px rgba(0, 0, 0, .34);
    overflow: hidden;
    text-decoration: none;
    cursor: pointer;
    transition: transform .18s ease, border-color .18s ease, box-shadow .18s ease, filter .18s ease
}

.image-action-card img,
.explore-card img {
    display: block;
    width: 100%;
    height: auto
}

.image-action-card:hover,
.image-action-card:focus-visible,
.explore-card:not(.is-locked):hover,
.explore-card:focus-within {
    transform: translateY(-2px);
    border-color: var(--accent-gold);
    box-shadow: 0 20px 48px rgba(0, 0, 0, .48), 0 0 0 1px rgba(201, 162, 39, .18);
    filter: brightness(1.06)
}

.image-action-card:focus-visible,
.explore-card:focus-within {
    outline: 2px solid var(--accent-gold);
    outline-offset: 3px
}

.image-action-form {
    margin: 0
}

.image-action-button {
    font: inherit;
    text-align: inherit
}

.explore-card {
    position: relative;
    cursor: default
}

.explore-card:not(.is-locked) {
    cursor: pointer
}

.explore-card.is-locked {
    border-color: rgba(138, 138, 154, .28);
    filter: saturate(.85)
}

.explore-card form {
    position: absolute;
    inset: 0;
    margin: 0
}

.explore-card-action {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    padding: 0;
    border: 0;
    background: transparent;
    cursor: pointer
}

.avatar-sm {
    overflow: hidden
}

.character-skill-line {
    margin: 0 0 12px;
    color: var(--fg-muted)
}

.combatant {
    min-width: 0
}

.combat-portrait {
    margin: 0 auto 10px;
    background: linear-gradient(180deg, rgba(255, 255, 255, .04), rgba(0, 0, 0, .3)), #050508;
    border: 1px solid var(--border-color);
    display: grid;
    place-items: center;
    overflow: hidden
}

.combat-portrait img {
    display: block;
    width: 100%;
    height: 100%;
    object-fit: contain;
    object-position: center bottom
}

.combat-portrait span {
    font-size: 56px
}

.player-portrait {
    width: 150px;
    height: 190px;
    border-color: rgba(201, 162, 39, .46);
    border-radius: 10px
}

.enemy-portrait {
    width: 150px;
    height: 190px;
    border: 1px solid rgba(155, 35, 53, .58);
    border-radius: 10px;
    box-shadow: 0 0 34px rgba(155, 35, 53, .18)
}

.admin-preview-grid {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 14px
}

.admin-preview-card,
.admin-enemy-preview {
    background: #0f0f17;
    border: 1px solid var(--border-color);
    border-radius: 10px;
    padding: 12px;
    text-align: center;
    display: grid;
    gap: 8px;
    align-content: start
}

.admin-character-preview {
    height: 170px;
    display: grid;
    place-items: end center;
    background: #050508;
    border: 1px solid rgba(201, 162, 39, .34);
    border-radius: 8px;
    overflow: hidden
}

.admin-character-preview img {
    width: 100%;
    height: 100%;
    object-fit: contain;
    object-position: center bottom
}

.admin-enemy-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(150px, 1fr));
    gap: 12px
}

.admin-enemy-visual {
    width: 82px;
    height: 82px;
    margin: auto;
    border-radius: 50%;
    border: 1px solid var(--border-color);
    display: grid;
    place-items: center;
    background: #050508;
    overflow: hidden
}

.admin-enemy-visual img {
    width: 100%;
    height: 100%;
    object-fit: contain
}

.admin-enemy-visual span {
    font-size: 38px
}

.admin-enemy-preview.missing-image {
    opacity: .72
}

.quest-board {
    max-width: 1020px;
    margin: 0 auto;
    color: #2b1a0d;
    background: url("../img/missoes.webp") center/100% 100% no-repeat;
    padding: 72px 78px 92px;
    min-height: 760px
}

.quest-board-head {
    text-align: center;
    margin-bottom: 22px
}

.quest-board h2,
.quest-board h3 {
    color: #3a210f;
    text-shadow: 0 1px 0 rgba(255, 245, 198, .65)
}

.quest-board h2 {
    margin: 0;
    font-size: 32px
}

.quest-board-head p {
    margin: 8px 0 0;
    color: #5b4224
}

.quest-list {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 14px
}

.quest-board .quest {
    background: rgba(255, 246, 214, .58);
    border: 1px solid rgba(93, 58, 21, .34);
    border-radius: 8px;
    padding: 16px;
    color: #2b1a0d;
    box-shadow: inset 0 0 18px rgba(93, 58, 21, .08)
}

.quest-board .quest h3 {
    margin: 0 0 12px;
    font-size: 18px
}

.crafting-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(360px, 1fr));
    gap: 16px
}

.craft-card {
    background: linear-gradient(145deg, var(--bg-card), var(--bg-secondary));
    border: 1px solid var(--border-color);
    border-radius: 10px;
    padding: 16px;
    display: flex;
    flex-direction: column;
    gap: 14px;
    min-height: 336px;
    box-shadow: 0 16px 34px rgba(0, 0, 0, .24)
}

.craft-card.rarity-uncommon {
    border-color: rgba(68, 170, 68, .55)
}

.craft-card.rarity-rare {
    border-color: rgba(68, 136, 255, .55)
}

.craft-card.rarity-epic {
    border-color: rgba(170, 68, 255, .55)
}

.craft-card.rarity-legendary {
    border-color: rgba(255, 170, 0, .65)
}

.craft-card.rarity-mythic {
    border-color: rgba(255, 92, 92, .65)
}

.craft-result {
    display: grid;
    grid-template-columns: auto minmax(0, 1fr);
    gap: 14px;
    align-items: flex-start
}

.craft-result-trigger {
    padding: 0;
    border: 0;
    background: transparent;
    cursor: pointer
}

.craft-result-trigger:hover {
    filter: brightness(1.08)
}

.craft-result h3 {
    margin: 0 0 6px;
    color: var(--accent-gold)
}

.craft-result p {
    margin: 0 0 6px;
    color: var(--fg-muted);
    line-height: 1.35
}

.craft-result small {
    color: #d2a338
}

.craft-ingredients {
    display: grid;
    gap: 8px
}

.craft-bottom {
    display: grid;
    gap: 10px;
    margin-top: auto
}

.craft-ingredient {
    display: grid;
    grid-template-columns: auto 1fr auto;
    align-items: center;
    gap: 8px;
    width: 100%;
    padding: 8px;
    border: 0;
    background: rgba(0, 0, 0, .2);
    border-radius: 6px;
    border-left: 3px solid rgba(201, 162, 39, .5);
    cursor: help;
    font: inherit;
    text-align: left;
    appearance: none;
    transition: all .2s ease;
}

.craft-ingredient:hover {
    background: rgba(255, 255, 255, 0.05);
    transform: translateX(4px);
}

.craft-ingredient.is-missing {
    opacity: 0.9;
    border-left-color: var(--accent-red);
    background: rgba(155, 35, 53, 0.1);
}

.craft-ingredient.is-missing b {
    color: var(--accent-red);
}

.craft-ingredient.has-enough {
    border-left-color: #2d8a4a;
    background: rgba(45, 138, 74, 0.1);
}

.craft-ingredient span {
    color: var(--fg-primary)
}

.craft-ingredient b {
    color: var(--accent-gold);
    font-family: 'Cinzel', serif
}

.craft-source-list {
    display: grid;
    grid-template-columns: 1fr;
    gap: 8px;
    margin: 18px 0;
    align-items: start
}

.craft-source-list strong {
    color: #f8ead0;
    font-size: 14px
}

.craft-source-list span {
    display: block;
    width: 100%;
    background: #09090f;
    border: 1px solid var(--border-color);
    border-radius: 8px;
    padding: 9px;
    line-height: 1.35
}

.craft-footer {
    display: grid;
    grid-template-columns: 1fr auto;
    align-items: center;
    gap: 12px;
    padding-top: 12px;
    border-top: 1px solid rgba(201, 162, 39, .2);
    margin-top: 0
}

.craft-footer span {
    color: var(--fg-muted);
    font-size: 13px
}

.craft-footer form {
    display: contents
}

.craft-footer .btn {
    min-width: 100px;
    padding: 8px 16px;
    font-size: 13px
}

.craft-missing {
    color: rgba(155, 35, 53, 1);
    font-size: 12px;
    margin: 0;
    padding: 6px;
    background: rgba(155, 35, 53, .1);
    border-radius: 4px;
    border-left: 3px solid rgba(155, 35, 53, .8);
    min-height: 30px
}

.craft-missing.is-empty {
    visibility: hidden
}

.quest-board .quest p {
    margin: 9px 0;
    color: #2f2114
}

.quest-board .quest.is-complete {
    border-left: 4px solid #2d8a4a
}

.quest-board .quest.is-locked {
    opacity: .78
}

.quest-board .muted,
.quest-board .quest-status {
    color: #6f5431
}

.quest-board .btn {
    min-height: 42px;
    background: rgba(48, 28, 13, .1);
    color: #3a210f;
    border-color: #7a4f1f
}

.quest-board .btn-primary {
    background: linear-gradient(135deg, #b37a28, #e1b85a);
    color: #1c1008;
    border: 0
}

.shop-nav {
    display: flex;
    justify-content: center;
    gap: 8px;
    margin: 8px 0 12px;
    flex-wrap: wrap;
    padding: 0 10px
}

.shop-nav a {
    background: rgba(0, 0, 0, .45);
    border: 1px solid var(--border-color);
    border-radius: 6px;
    padding: 6px 14px;
    color: var(--fg-muted);
    text-decoration: none;
    font-family: 'Cinzel', serif;
    font-size: 13px;
    transition: all .2s ease;
    border-bottom: 3px solid rgba(0, 0, 0, .3)
}

.shop-nav a:hover {
    border-color: var(--accent-gold);
    color: var(--accent-gold);
    background: rgba(201, 162, 39, .1)
}

.shop-nav a.active {
    background: linear-gradient(180deg, #d9ad2d, #9d6a18);
    border-color: #f0c85c;
    color: #160d06;
    font-weight: 700;
    box-shadow: 0 4px 12px rgba(0, 0, 0, .3);
    border-bottom: 3px solid #6b4a11
}

.shop-nav-mobile {
    text-align: center
}

.shop-nav-mobile select {
    width: 100%;
    max-width: none;
    background: #09090f;
    border: 2px solid var(--accent-gold);
    border-radius: 8px;
    color: #f1eee7;
    padding: 10px;
    font-family: 'Cinzel', serif;
    font-size: 14px;
    cursor: pointer;
    outline: 0;
    box-shadow: 0 4px 15px rgba(0, 0, 0, .5)
}

.shop-nav-mobile select option {
    background: #09090f;
    color: #f1eee7;
    padding: 10px
}

.mobile-only {
    display: none
}

@media(max-width:800px) {
    .desktop-only {
        display: none !important
    }

    .mobile-only {
        display: block !important
    }
}

.shop-board {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(360px, 1fr));
    gap: 14px;
    margin-top: 12px
}

.page-hero {
    overflow: hidden;
    border: 1px solid rgba(201, 162, 39, .42);
    border-radius: 10px;
    background: #09090f;
    box-shadow: 0 16px 38px rgba(0, 0, 0, .34);
    margin-bottom: 18px
}

.page-hero img {
    display: block;
    width: 100%;
    height: auto
}

.shop-rpg-card {
    position: relative;
    display: grid;
    grid-template-columns: 86px minmax(0, 1fr);
    align-items: stretch;
    gap: 12px;
    min-height: 112px;
    padding: 10px 12px;
    background: linear-gradient(180deg, #7a4a1f, #3c2110 45%, #23140d);
    border: 3px solid #b8792c;
    border-radius: 8px;
    box-shadow: inset 0 0 0 2px #2b180b, inset 0 0 0 4px rgba(255, 214, 111, .18), 0 14px 28px rgba(0, 0, 0, .38);
    overflow: hidden
}

.shop-rpg-card.rarity-uncommon {
    border-color: #66cc66;
    background: linear-gradient(180deg, #2d5a2d, #1a331a 45%, #0d1a0d);
}

.shop-rpg-card.rarity-rare {
    border-color: #66a6ff;
    background: linear-gradient(180deg, #2d4a7a, #1a2945 45%, #0d1423);
}

.shop-rpg-card.rarity-epic {
    border-color: #c06cff;
    background: linear-gradient(180deg, #5a2d7a, #331a45 45%, #1a0d23);
}

.shop-rpg-card.rarity-legendary {
    border-color: #ffc247;
    background: linear-gradient(180deg, #7a5a2d, #45331a 45%, #231a0d);
}

.shop-rpg-card.rarity-mythic {
    border-color: #ff5c5c;
    background: linear-gradient(180deg, #7a2d2d, #451a1a 45%, #230d0d);
}

.shop-stock-tag {
    position: absolute;
    top: 8px;
    right: 10px;
    z-index: 2;
    padding: 3px 8px;
    border: 1px solid #d59a40;
    border-radius: 4px;
    background: #2a170b;
    color: #f8d36c;
    font-size: 11px;
    font-weight: 800
}

.shop-rpg-card:before {
    content: "";
    position: absolute;
    inset: 5px;
    border: 1px solid rgba(255, 204, 92, .45);
    border-radius: 5px;
    pointer-events: none
}

.shop-rpg-icon {
    position: relative;
    width: 76px;
    min-height: 88px;
    height: 100%;
    display: grid;
    place-items: center;
    background: linear-gradient(135deg, #0c2b2e, #071012);
    border: 2px solid #d59a40;
    border-radius: 5px;
    box-shadow: inset 0 0 12px rgba(79, 220, 205, .25);
    z-index: 1
}

.shop-item-trigger {
    padding: 0;
    cursor: pointer;
    font: inherit;
    color: inherit;
    transition: transform .16s ease, filter .16s ease, box-shadow .16s ease
}

.shop-item-trigger:hover,
.shop-item-trigger:focus-visible {
    transform: translateY(-1px);
    filter: brightness(1.12);
    box-shadow: inset 0 0 14px rgba(79, 220, 205, .34), 0 0 0 2px rgba(248, 211, 108, .35);
    outline: 0
}

.shop-rpg-icon img {
    max-width: 92%;
    max-height: 92%;
    object-fit: contain;
    display: block
}

.shop-rpg-icon .item-emoji,
.shop-rpg-icon span.item-emoji {
    font-size: 42px
}

.shop-rpg-info {
    min-width: 0;
    display: flex;
    flex-direction: column;
    gap: 3px;
    padding-bottom: 40px;
    z-index: 1
}

.shop-rpg-info h3 {
    margin: 0;
    color: #f8ead0;
    font-family: 'Source Sans 3', Arial, sans-serif;
    font-size: 16px;
    line-height: 1.15;
    text-shadow: 0 2px 0 rgba(0, 0, 0, .65);
    white-space: normal;
    overflow: visible;
    text-overflow: clip
}

.shop-rpg-info p {
    margin: 0;
    color: #f1dcc0;
    font-size: 13px;
    line-height: 1.25;
    display: block;
    overflow: visible
}

.shop-rpg-info small {
    display: block;
    color: #d2a338;
    font-size: 11px;
    line-height: 1.2;
    white-space: normal;
    overflow: visible;
    text-overflow: clip
}

.shop-rpg-buy {
    position: absolute;
    bottom: 12px;
    right: 12px;
    display: grid;
    grid-template-columns: minmax(82px, 1fr) auto;
    align-items: center;
    width: auto;
    gap: 0;
    border: 2px solid #8a5b24;
    background: #f3c858;
    box-shadow: 0 3px 0 #6b3e16;
    z-index: 2
}

.shop-rpg-price {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 5px;
    min-width: 82px;
    height: 32px;
    padding: 0 9px;
    color: #2a1607;
    border-right: 2px solid #8a5b24;
    background: linear-gradient(180deg, #ffd969, #c88d2c)
}

.shop-rpg-price span {
    font-size: 17px
}

.shop-rpg-price b {
    font-family: 'Cinzel', serif;
    font-size: 14px
}

.shop-rpg-buy button {
    height: 32px;
    padding: 0 18px;
    border: 0;
    background: linear-gradient(180deg, #efe4d1, #a78967);
    color: #2b1a0d;
    font-family: 'Cinzel', serif;
    font-weight: 900;
    cursor: pointer
}

.shop-rpg-buy button:hover {
    filter: brightness(1.08)
}

.shop-detail-card {
    width: min(560px, 92vw)
}

.shop-detail-card h3 {
    color: #f8ead0
}

.shop-modal-buy {
    position: static;
    width: max-content;
    margin: 18px 0 0 auto
}

.shop-item-stats {
    grid-template-columns: repeat(3, minmax(0, 1fr))
}

@media(max-width:560px) {
    .shop-item-stats {
        grid-template-columns: 1fr 1fr
    }

    .shop-modal-buy {
        width: 100%;
        grid-template-columns: minmax(0, 1fr) auto
    }
}

.shop-rpg-card.rarity-rare {
    border-color: #5ba5ff
}

.shop-rpg-card.rarity-epic {
    border-color: #b56cff
}

.shop-rpg-card.rarity-legendary {
    border-color: #ffbd39
}

.shop-rpg-card.rarity-mythic {
    border-color: #ff5c5c
}

.premium-shop {
    margin: 18px 0 20px
}

.premium-shop-head {
    display: flex;
    align-items: flex-end;
    justify-content: space-between;
    gap: 14px;
    margin-bottom: 12px
}

.premium-shop-head h2 {
    margin: 0 0 4px;
    color: var(--accent-gold)
}

.premium-shop-head p {
    margin: 0
}

.bag-capacity-pill {
    flex: 0 0 auto;
    border: 1px solid rgba(201, 162, 39, .58);
    border-radius: 6px;
    background: #070605;
    color: #f1e2ac;
    font-family: Cinzel, serif;
    font-weight: 900;
    padding: 8px 12px;
    text-shadow: 0 2px 0 #000
}

.premium-offers {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 14px
}

.premium-offer {
    position: relative;
    display: grid;
    grid-template-columns: 76px minmax(0, 1fr);
    gap: 12px;
    min-height: 180px;
    padding: 16px;
    border: 1px solid rgba(201, 162, 39, .48);
    border-radius: 8px;
    background: linear-gradient(145deg, rgba(27, 22, 34, .96), rgba(12, 10, 16, .98));
    box-shadow: 0 16px 34px rgba(0, 0, 0, .28)
}

.premium-offer:before {
    content: "";
    position: absolute;
    inset: 5px;
    border: 1px solid rgba(255, 204, 92, .24);
    border-radius: 5px;
    pointer-events: none
}

.premium-offer-icon {
    position: relative;
    z-index: 1;
    display: grid;
    place-items: center;
    height: 76px;
    border: 1px solid rgba(201, 162, 39, .55);
    border-radius: 7px;
    background: radial-gradient(circle at center, #153c35, #06100e);
    font-size: 34px
}

.premium-offer-info {
    position: relative;
    z-index: 1;
    display: grid;
    grid-template-rows: auto auto 1fr auto;
    min-width: 0
}

.premium-offer-info h3 {
    margin: 0 0 5px;
    color: #f3cd4e;
    font-size: 17px
}

.premium-offer-info p {
    margin: 0 0 7px;
    color: #e4dcc9;
    line-height: 1.25
}

.premium-offer-info small {
    color: #c5b58e;
    font-size: 12px;
    line-height: 1.25
}

.premium-offer-buy {
    display: grid;
    grid-template-columns: minmax(88px, 120px) minmax(100px, 1fr);
    align-self: end;
    margin-top: 12px
}

.premium-offer-buy button {
    border: 0;
    background: linear-gradient(180deg, #efe4d1, #a78967);
    color: #160c04;
    cursor: pointer;
    font-family: Cinzel, serif;
    font-weight: 900;
    text-transform: uppercase
}

.premium-money-page {
    display: grid;
    gap: 22px
}

.premium-page-hero {
    position: relative;
    margin-bottom: 0
}

.premium-balance-strip {
    display: flex;
    justify-content: flex-end;
    margin-top: -8px
}

.premium-money-hero {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 18px;
    min-height: 210px;
    padding: 28px;
    border: 1px solid rgba(201, 162, 39, .32);
    border-radius: 8px;
    background:
        linear-gradient(90deg, rgba(9, 9, 15, .96), rgba(18, 14, 24, .86)),
        radial-gradient(circle at 80% 20%, rgba(201, 162, 39, .16), transparent 36%),
        #101018;
    box-shadow: 0 22px 50px rgba(0, 0, 0, .34), inset 0 0 0 1px rgba(255, 255, 255, .03)
}

.premium-money-hero .eyebrow {
    color: #dfb84a;
    font-family: Cinzel, serif;
    font-size: 12px;
    font-weight: 900;
    letter-spacing: 2px;
    text-transform: uppercase
}

.premium-money-hero h2 {
    margin: 4px 0 8px;
    color: var(--accent-gold);
    font-size: clamp(34px, 6vw, 58px);
    line-height: .95
}

.premium-money-hero p {
    max-width: 570px;
    margin: 0;
    color: #c9c2d0;
    font-size: 17px
}

.premium-money-wallet {
    flex: 0 0 auto;
    min-width: 190px;
    padding: 18px;
    border: 1px solid rgba(201, 162, 39, .42);
    border-radius: 6px;
    background: rgba(0, 0, 0, .38);
    text-align: center
}

.premium-money-wallet span {
    display: block;
    margin-bottom: 5px;
    color: var(--fg-muted);
    font-size: 13px
}

.premium-money-wallet b {
    color: #ffe7a3;
    font-size: 24px
}

.premium-money-warning {
    padding: 14px 16px;
    border: 1px solid rgba(201, 162, 39, .5);
    border-radius: 6px;
    background: rgba(201, 162, 39, .1);
    color: #f2dfae
}

.premium-package-section {
    display: grid;
    gap: 12px
}

.premium-package-section > h3 {
    display: inline-flex;
    align-items: center;
    gap: 9px;
    margin: 4px 0 0;
    color: var(--accent-gold);
    font-size: 24px;
    letter-spacing: 1px;
    text-shadow: 0 2px 0 #000
}

.premium-package-section > h3 span {
    display: inline-grid;
    width: 28px;
    height: 28px;
    place-items: center;
    border: 1px solid rgba(201, 162, 39, .45);
    border-radius: 5px;
    background: rgba(0, 0, 0, .34);
    font-family: "Source Sans 3", sans-serif;
    font-size: 16px;
    letter-spacing: 0
}

.premium-money-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
    gap: 16px
}

.premium-money-card {
    position: relative;
    display: flex;
    min-width: 0;
    min-height: 330px;
    flex-direction: column;
    gap: 12px;
    overflow: hidden;
    padding: 0 20px 20px;
    border: 1px solid rgba(201, 162, 39, .34);
    border-radius: 8px;
    background:
        radial-gradient(circle at 20% 0, rgba(201, 162, 39, .12), transparent 34%),
        linear-gradient(180deg, #1b1b27, #0f0f16);
    box-shadow: 0 18px 36px rgba(0, 0, 0, .28)
}

.premium-money-card:before {
    display: none
}

.premium-money-price {
    position: absolute;
    top: 0;
    right: 0;
    z-index: 2;
    display: inline-flex;
    align-items: baseline;
    gap: 5px;
    padding: 6px 9px;
    border: 1px solid rgba(255, 220, 111, .52);
    border-radius: 0 7px 0 6px;
    background: linear-gradient(180deg, #e1b84a, #936314);
    color: #160c04;
    font-family: Cinzel, serif;
    font-weight: 900
}

.premium-money-price span {
    font-size: 11px
}

.premium-money-price b {
    font-size: 18px
}

.premium-package-art {
    width: calc(100% + 40px);
    min-height: 128px;
    margin: 0 -20px 2px;
    display: grid;
    align-items: center;
    justify-items: center;
    overflow: hidden;
    border-bottom: 1px solid rgba(201, 162, 39, .18);
    background: radial-gradient(circle at 50% 45%, rgba(201, 162, 39, .14), transparent 48%), #101018
}

.premium-package-art img {
    display: block;
    width: 100%;
    height: 160px;
    max-width: none;
    max-height: none;
    object-fit: cover;
    object-position: center;
    filter: none
}

.premium-package-art h3 {
    width: 100%;
    min-height: 128px;
    margin: 0;
    padding: 42px 18px 18px;
    display: grid;
    align-items: end
}

.premium-money-card h3 {
    margin: 4px 0 0;
    color: var(--accent-gold);
    font-size: 21px
}

.premium-money-card p {
    margin: 0;
    color: #cfc8d4
}

.premium-money-card ul {
    margin: 0;
    padding-left: 18px;
    color: #f0e6c5;
    font-size: 14px
}

.premium-money-card form {
    margin-top: auto
}

.premium-card-actions {
    display: grid;
    grid-template-columns: minmax(0, 1fr) minmax(0, .72fr);
    gap: 10px;
    margin-top: auto
}

.premium-card-actions.chest {
    grid-template-columns: 1fr
}

.premium-card-actions.single {
    grid-template-columns: 1fr
}

.premium-card-actions form {
    margin: 0
}

.premium-money-card button {
    width: 100%;
    min-height: 44px;
    border: 1px solid #f0c85c;
    border-radius: 5px;
    background: linear-gradient(180deg, #d9ad2d, #9d6a18);
    color: #160d06;
    cursor: pointer;
    font-family: Cinzel, serif;
    font-weight: 900;
    text-transform: uppercase;
    text-shadow: 0 1px 0 rgba(255, 255, 255, .26)
}

.premium-money-card button:disabled {
    cursor: default;
    filter: grayscale(.7);
    opacity: .5
}

.premium-open-chest-button {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    background: linear-gradient(180deg, #5c3516, #25150c) !important;
    color: #f5d777 !important
}

.premium-open-chest-button .premium-key-icon {
    display: inline-grid;
    width: 18px;
    height: 18px;
    place-items: center
}

.premium-open-chest-button .premium-key-icon img {
    width: 18px;
    height: 18px;
    object-fit: contain
}

.premium-open-chest-button .premium-key-icon .item-emoji {
    font-family: "Source Sans 3", sans-serif;
    font-size: 16px
}

.premium-open-chest-button small {
    min-width: 18px;
    padding: 1px 5px;
    border-radius: 999px;
    background: rgba(0, 0, 0, .32);
    color: var(--accent-gold);
    font-family: "Source Sans 3", sans-serif;
    font-size: 12px;
    font-weight: 800
}

.premium-payment-history {
    padding: 18px;
    border: 1px solid rgba(201, 162, 39, .22);
    border-radius: 8px;
    background: rgba(17, 17, 26, .72)
}

.premium-payment-history h3 {
    margin: 0 0 12px;
    color: var(--accent-gold)
}

.premium-payment-list {
    display: grid;
    gap: 8px
}

.premium-payment-list div {
    display: flex;
    justify-content: space-between;
    gap: 12px;
    padding: 10px 0;
    border-bottom: 1px solid rgba(255, 255, 255, .06)
}

.premium-payment-list div:last-child {
    border-bottom: 0
}

.premium-payment-list span {
    color: var(--fg-muted)
}

.inventory-bag-title {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 16px;
    flex-wrap: wrap
}

.inventory-bag-title small {
    color: #c9b77a;
    font-family: Cinzel, serif;
    font-weight: 800;
    letter-spacing: 1px
}

.inventory-overflow-warning {
    background: rgba(155, 35, 53, .14);
    border-top: 1px solid rgba(155, 35, 53, .38);
    color: #ffd5d5;
    padding: 9px 14px;
    text-align: center
}

.shop-hero {
    overflow: hidden;
    border: 1px solid rgba(201, 162, 39, .42);
    border-radius: 10px;
    background: #09090f;
    box-shadow: 0 16px 38px rgba(0, 0, 0, .34)
}

.shop-hero img {
    display: block;
    width: 100%;
    height: auto
}

/* Pages: inventory, quests and ranking */
.info-card {
    max-width: 400px;
    padding: 24px;
    text-align: center
}

.info-card h3 {
    margin-bottom: 16px;
    color: var(--accent-gold);
    font-family: 'Cinzel', serif;
    font-size: 22px;
    border-bottom: 1px solid rgba(201, 162, 39, .3);
    padding-bottom: 12px
}

.info-content {
    color: var(--fg-muted);
    line-height: 1.6;
    margin-bottom: 24px;
    font-size: 16px
}

.info-actions {
    display: flex;
    justify-content: center
}

.info-actions .btn {
    min-width: 120px
}

.inventory-window.inventory-v3 {
    width: 100%;
    max-width: 1180px;
    margin-inline: auto
}

.inventory-window.inventory-v3 .rpg-paper-v3 {
    margin: 0;
    grid-template-columns: 360px minmax(0, 1fr)
}

.inventory-window.inventory-v3 .backpack-grid {
    border-top-width: 2px
}

.quest-board {
    width: 100%;
    max-width: 1180px;
    margin: 0 auto;
    color: #e8e6e3;
    background: transparent;
    padding: 0;
    min-height: 0
}

.quest-board-head {
    margin: 0 0 18px;
    text-align: left
}

.quest-board h2 {
    margin: 0;
    color: var(--accent-gold);
    font-size: 28px;
    text-shadow: none
}

.quest-board-head p {
    margin: 8px 0 0;
    color: var(--fg-muted)
}

.quest-list {
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 18px
}

.quest-board .quest {
    min-height: 390px;
    padding: 72px 40px 64px;
    background: url("../img/missoes.webp") center/100% 100% no-repeat;
    border: 0;
    border-radius: 0;
    box-shadow: none;
    color: #2b1a0d;
    display: flex;
    flex-direction: column;
    justify-content: center
}

.quest-board .quest h3 {
    margin: 0 0 14px;
    color: #3a210f;
    font-size: 20px;
    text-shadow: 0 1px 0 rgba(255, 245, 198, .65)
}

.quest-board .quest p {
    margin: 8px 0;
    color: #2f2114;
    line-height: 1.35
}

.quest-reward {
    display: grid;
    gap: 4px;
    margin: 10px 0;
    color: #2f2114;
    line-height: 1.25
}

.quest-reward b,
.quest-reward span {
    display: block
}

.quest-board .quest.is-complete {
    border-left: 0;
    filter: drop-shadow(0 0 12px rgba(45, 138, 74, .18))
}

.quest-board .quest.is-locked {
    opacity: .82;
    filter: saturate(.78)
}

.quest-board .quest-status {
    color: #6f5431
}

.quest-board .quest form {
    margin-top: 6px
}

.quest-board .quest .btn {
    align-self: flex-start;
    min-height: 42px;
    background: rgba(48, 28, 13, .1);
    color: #3a210f;
    border-color: #7a4f1f;
    width: 100%;
}

.quest-board .quest .btn-primary {
    background: linear-gradient(135deg, #b37a28, #e1b85a);
    color: #1c1008;
    border: 0;
    width: 100%;
    margin-top: 18px;
}

.class-avatar {
    width: 92px;
    height: 118px;
    margin: 0 auto 10px;
    display: grid;
    place-items: end center;
    overflow: hidden
}

.class-avatar img {
    display: block;
    width: 100%;
    height: 100%;
    object-fit: contain;
    object-position: center bottom
}

.class-avatar span {
    font-size: 42px
}

.form-footer-link {
    text-align: center
}

.form-footer-link a {
    color: var(--accent-gold)
}

.register-card.form {
    max-width: 450px;
    border-color: rgba(201, 162, 39, .28);
    background: radial-gradient(circle at 50% 0, rgba(201, 162, 39, .08), transparent 34%), linear-gradient(145deg, #191925, #101018);
    box-shadow: 0 24px 70px rgba(0, 0, 0, .42), inset 0 0 0 1px rgba(255, 255, 255, .03)
}

.register-card.form:before,
.register-card.form:after {
    display: none
}

.register-card form,
.register-card h2,
.register-card p {
    position: relative;
    z-index: 1
}

.register-class-scroll {
    overflow-x: auto;
    overflow-y: hidden;
    padding: 2px 4px 14px;
    margin-inline: -4px;
    scroll-snap-type: x mandatory;
    scrollbar-color: var(--accent-gold) rgba(255, 255, 255, .08);
    scrollbar-width: thin
}

.register-class-scroll::-webkit-scrollbar {
    height: 10px
}

.register-class-scroll::-webkit-scrollbar-track {
    background: rgba(255, 255, 255, .08);
    border-radius: 999px
}

.register-class-scroll::-webkit-scrollbar-thumb {
    background: linear-gradient(90deg, #7a5a17, var(--accent-gold));
    border-radius: 999px
}

.register-classes {
    display: flex;
    grid-template-columns: none;
    gap: 18px;
    width: max-content;
    min-width: 0
}

.register-class-card {
    flex: 0 0 190px;
    scroll-snap-align: center
}

.register-class-card span {
    min-height: 252px;
    padding: 16px 14px 18px;
    background: radial-gradient(circle at 50% 28%, rgba(201, 162, 39, .08), transparent 40%), linear-gradient(180deg, #1b1b27, #11111a);
    box-shadow: inset 0 0 0 1px rgba(255, 255, 255, .03), 0 14px 30px rgba(0, 0, 0, .22)
}

.register-avatar-frame {
    position: relative;
    width: 118px;
    height: 118px;
    margin: 0 auto 10px;
    display: grid;
    place-items: center
}

.register-avatar-frame:after {
    content: "";
    position: absolute;
    inset: -12px;
    z-index: 2;
    background: url("../img/frame.webp") center/100% 100% no-repeat;
    pointer-events: none;
    filter: drop-shadow(0 10px 12px rgba(0, 0, 0, .38))
}

.register-avatar-frame .class-avatar {
    width: 78px;
    height: 78px;
    margin: 0;
    display: grid;
    place-items: center;
    background: #050508;
    overflow: hidden
}

.register-avatar-frame .class-avatar img {
    width: 100%;
    height: 100%;
    object-fit: contain;
    object-position: center bottom
}

.brand-image {
    min-width: 0
}

.brand-logo {
    display: block;
    width: auto;
    max-width: 230px;
    height: 46px;
    object-fit: contain;
    object-position: left center
}

.avatar-sm img {
    display: block;
    width: 100%;
    height: 100%;
    object-fit: contain;
    object-position: center bottom
}

.hero-logo-title {
    margin: 0 0 18px
}

.hero-logo-title img {
    display: block;
    width: min(460px, 82vw);
    height: auto;
    margin: 0 auto;
    filter: drop-shadow(0 14px 28px rgba(0, 0, 0, .34))
}

.hero-image-actions {
    align-items: center;
    gap: 12px
}

.hero-image-button {
    display: block;
    text-decoration: none;
    transition: transform .18s ease, filter .18s ease
}

.hero-image-button img {
    display: block;
    width: auto;
    height: 58px;
    object-fit: contain
}

.hero-info-images {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 18px;
    margin-top: 38px;
    text-align: left
}

.hero-info-card {
    display: block;
    text-decoration: none;
    border: 1px solid rgba(201, 162, 39, .24);
    border-radius: 10px;
    overflow: hidden;
    background: #11111a;
    box-shadow: 0 14px 30px rgba(0, 0, 0, .24);
    transition: transform .18s ease, border-color .18s ease, filter .18s ease
}

.hero-info-card img {
    display: block;
    width: 100%;
    height: auto
}

.hero-image-button:hover,
.hero-info-card:hover {
    transform: translateY(-2px);
    filter: brightness(1.08)
}

.hero-info-card:hover {
    border-color: rgba(201, 162, 39, .55)
}

.equipment-v3 .inventory-character-bg {
    display: grid;
    position: absolute;
    left: 50%;
    top: 62px;
    width: 230px;
    height: 430px;
    transform: translateX(-50%);
    place-items: end center;
    z-index: 1;
    pointer-events: none;
    filter: drop-shadow(0 18px 18px rgba(0, 0, 0, .46))
}

.equipment-v3 .inventory-character-bg img {
    display: block;
    width: 100%;
    height: 100%;
    object-fit: contain;
    object-position: center bottom
}

.equipment-v3 .inventory-character-bg span {
    font-size: 84px
}

.equipment-v3 .silhouette {
    display: none
}

.equipment-v3.equipment-split {
    display: grid;
    grid-template-columns: 150px minmax(230px, 1fr) 150px;
    gap: 24px;
    align-items: stretch;
    min-height: 560px;
    padding: 28px 34px 40px;
    overflow: hidden
}

.equipment-split:before {
    inset: 18px
}

.equipment-side {
    display: grid;
    grid-template-rows: repeat(6, minmax(68px, 1fr));
    gap: 8px;
    min-width: 0;
    position: relative;
    z-index: 3
}

.equipment-character-column {
    position: relative;
    display: grid;
    grid-template-rows: 1fr auto;
    align-items: end;
    justify-items: center;
    min-width: 0;
    z-index: 2
}

.equipment-split .inventory-character-bg {
    display: grid;
    position: relative;
    inset: auto;
    left: auto;
    top: auto;
    width: min(260px, 100%);
    height: 440px;
    transform: none;
    place-items: end center;
    opacity: 1;
    pointer-events: none;
    filter: drop-shadow(0 18px 18px rgba(0, 0, 0, .46))
}

.equipment-split .level-badge {
    position: relative;
    top: auto;
    right: auto;
    left: auto;
    transform: none;
    margin-top: 10px;
    z-index: 4
}

.equipment-split .slot-lines,
.equipment-split .silhouette {
    display: none
}

.equipment-split .equip-node,
.equipment-split .equip-helmet,
.equipment-split .equip-amulet,
.equipment-split .equip-weapon,
.equipment-split .equip-shield,
.equipment-split .equip-armor,
.equipment-split .equip-gloves,
.equipment-split .equip-belt,
.equipment-split .equip-pants,
.equipment-split .equip-boots,
.equipment-split .equip-ring_left,
.equipment-split .equip-ring_right,
.equipment-split .equip-cloak {
    position: relative;
    left: auto;
    right: auto;
    top: auto;
    width: auto;
    height: auto;
    transform: none;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    z-index: 3
}

.equipment-split .equip-node .equip-label-mini {
    position: static;
    max-width: 100%;
    margin: 0 0 5px;
    padding: 1px 5px;
    line-height: 1.1;
    letter-spacing: 1px;
    white-space: normal;
    text-align: center
}

.equipment-split .equip-node .item-square,
.equipment-split .equip-node .empty-equip {
    width: 58px;
    height: 58px;
    min-height: 58px
}

.inventory-window.inventory-v3 .inventory-section-title {
    background: #070605;
    border-top: 2px solid #2d2216;
    border-bottom: 1px solid #1c1510;
    padding: 12px 16px 10px;
    text-align: center
}

.inventory-window.inventory-v3 .inventory-section-title span {
    color: var(--accent-gold);
    display: inline-block;
    font-family: Cinzel, serif;
    font-size: 18px;
    font-weight: 800;
    letter-spacing: 7px;
    text-transform: uppercase;
    text-shadow: 0 2px 0 #000
}

.inventory-window.inventory-v3 .backpack-grid .item-square,
.inventory-window.inventory-v3 .backpack-grid .item-square.empty {
    background-color: #070605;
    background-image: url("../img/slot_mochila.webp");
    background-position: center;
    background-repeat: no-repeat;
    background-size: 100% 100%;
    border: 0;
    box-shadow: none;
    padding: 4px;
    overflow: hidden;
    position: relative;
    z-index: 1;
}

.inventory-window.inventory-v3 .equipment-split .equip-node .item-square,
.inventory-window.inventory-v3 .equipment-split .equip-node .empty-equip {
    position: relative;
    background: rgba(7, 6, 5, .64);
    border: 0;
    box-shadow: none;
    color: rgba(88, 64, 36, .55);
    overflow: hidden;
    padding: 5px;
    z-index: 1;
}

.inventory-window.inventory-v3 .equipment-split .equip-node .item-square:after,
.inventory-window.inventory-v3 .equipment-split .equip-node .empty-equip:after {
    content: "";
    position: absolute;
    inset: -8px;
    z-index: 2;
    background: url("../img/slot_equipamento.webp") center/100% 100% no-repeat;
    pointer-events: none
}

.inventory-window.inventory-v3 .backpack-grid .item-square img {
    height: 72%;
    width: 72%;
    position: relative;
    z-index: 3;
}

.inventory-window.inventory-v3 .equipment-split .equip-node .item-square img {
    height: 75%;
    width: 75%;
    position: relative;
    z-index: 3;
}

/* Efeitos de raridade para Inventory V3 - Corrigido para ficar ATRÁS do item */
.inventory-window.inventory-v3 .item-square[class*="rarity-"]::before {
    content: "";
    position: absolute;
    inset: 4px;
    z-index: 0; /* Fica atrás da imagem do item (z-index 3) */
    border-radius: 6px;
    pointer-events: none;
}

.inventory-window.inventory-v3 .item-square.rarity-common::before {
    background: radial-gradient(circle, rgba(136, 136, 136, 0.3) 0%, transparent 100%);
}

.inventory-window.inventory-v3 .item-square.rarity-uncommon::before {
    background: radial-gradient(circle, rgba(68, 170, 68, 0.6) 0%, transparent 100%);
}

.inventory-window.inventory-v3 .item-square.rarity-rare::before {
    background: radial-gradient(circle, rgba(68, 136, 255, 0.6) 0%, transparent 100%);
}

.inventory-window.inventory-v3 .item-square.rarity-epic::before {
    background: radial-gradient(circle, rgba(170, 68, 255, 0.6) 0%, transparent 100%);
}

.inventory-window.inventory-v3 .item-square.rarity-legendary::before {
    background: radial-gradient(circle, rgba(255, 170, 0, 0.7) 0%, transparent 100%);
}

.inventory-window.inventory-v3 .item-square.rarity-mythic::before {
    background: radial-gradient(circle, rgba(255, 68, 68, 0.7) 0%, transparent 100%);
}

/* Ajuste para os slots equipados */
.inventory-window.inventory-v3 .equipment-split .equip-node .item-square[class*="rarity-"]::before {
    inset: 2px;
}

.inventory-window.inventory-v3 .backpack-grid .item-square .qty {
    bottom: 4px;
    right: 5px;
    z-index: 10; /* Garante que fique à frente de tudo */
    text-shadow: 1px 1px 2px #000, -1px -1px 2px #000;
}

.topbar .nav {
    gap: 8px;
    padding-bottom: 12px
}

.topbar .nav a {
    position: relative;
    min-width: 92px;
    padding: 9px 14px 8px;
    border: 1px solid #6b4a16;
    border-radius: 4px;
    background:
        linear-gradient(180deg, rgba(62, 42, 20, .94), rgba(19, 12, 9, .96)),
        #160f0c;
    box-shadow:
        inset 0 0 0 1px rgba(241, 193, 71, .22),
        inset 0 -3px 0 rgba(0, 0, 0, .46),
        0 8px 18px rgba(0, 0, 0, .24);
    color: #e8dbc2;
    font-family: Cinzel, serif;
    font-size: 13px;
    font-weight: 800;
    letter-spacing: .3px;
    text-align: center;
    text-shadow: 0 2px 0 #000;
    transition: color .18s ease, border-color .18s ease, transform .18s ease, background .18s ease
}

.topbar .nav a:hover,
.topbar .nav a.active {
    border-color: var(--accent-gold);
    background:
        linear-gradient(180deg, rgba(176, 125, 30, .98), rgba(73, 42, 15, .98)),
        #3a210f;
    color: #fff4c8;
    transform: translateY(-1px)
}

.topbar .nav a.active {
    box-shadow:
        inset 0 0 0 1px rgba(255, 229, 132, .55),
        inset 0 -3px 0 rgba(0, 0, 0, .38),
        0 0 16px rgba(201, 162, 39, .2)
}

.stat-distribution {
    display: flex;
    flex-direction: column
}

.attribute-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    margin-bottom: 16px
}

.attribute-head h3 {
    margin: 0
}

.stat-points-badge {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    padding: 6px 9px;
    border: 1px solid rgba(201, 162, 39, .55);
    border-radius: 4px;
    background: #050505;
    color: #efe4c8;
    font-family: Cinzel, serif;
    font-size: 13px;
    font-weight: 800;
    white-space: nowrap
}

.stat-points-badge b {
    color: var(--accent-gold);
    font-weight: 900
}

.attribute-grid,
.derived-grid {
    display: grid;
    gap: 11px
}

.attr-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    color: #d2a338;
    font-size: 16px
}

.attr-row b {
    color: #f4efe4;
    font-weight: 600
}

.attr-label {
    display: inline-flex;
    align-items: center;
    gap: 7px;
    min-width: 0
}

.attr-label i {
    display: inline-grid;
    width: 18px;
    place-items: center;
    font-style: normal;
    line-height: 1
}

.combat-page {
    transition: opacity .16s ease, filter .16s ease
}

.combat-page.is-loading {
    filter: saturate(.82);
    opacity: .72;
    pointer-events: none
}

.combat-page .combat-panels {
    align-items: start
}

.combat-page .combat-panels > .card:first-child {
    align-self: start;
    min-height: 0
}

.combat-page .combat-panels > .card:first-child .combat-actions {
    align-content: start
}

.combat-page .combat-panels > .card {
    height: 176px;
    min-height: 0
}

.combat-page .combat-panels > .card:nth-child(2) {
    display: flex;
    flex-direction: column
}

.combat-page .combat-panels > .card:nth-child(2) .log {
    flex: 1;
    max-height: none;
    min-height: 0
}

.attr-controls {
    display: inline-flex;
    align-items: center;
    justify-content: flex-end;
    gap: 7px;
    min-width: 108px
}

.attr-controls em {
    color: #63d982;
    font-style: normal;
    font-size: 12px;
    font-weight: 800;
    min-width: 20px
}

.attr-plus {
    width: 26px;
    height: 26px;
    border: 1px solid var(--accent-gold);
    border-radius: 4px;
    background: linear-gradient(180deg, #d7aa2b, #8d5c15);
    color: #120b04;
    cursor: pointer;
    font-family: Cinzel, serif;
    font-size: 18px;
    font-weight: 900;
    line-height: 1;
    box-shadow: inset 0 0 0 1px rgba(255, 238, 162, .35), 0 4px 10px rgba(0, 0, 0, .25)
}

.attr-plus:disabled {
    cursor: default;
    filter: grayscale(.7);
    opacity: .42
}

.stat-save {
    width: 100%;
    margin: 22px 0 14px;
    cursor: pointer
}

.stat-save:disabled {
    cursor: default;
    opacity: .45
}


/* Header full width + layout com ouro/xp à direita */
.topbar .wrap { width: calc(100% - 28px); max-width: none; }
.topbar-inner { grid-template-columns: auto minmax(240px, 1fr) minmax(380px, 50vw) auto; gap: 14px; align-items: center; }
.brand-image { align-self: center; }
.topbar-identity, .player-mini, .player-mini > div, .topbar-status { min-width: 0; }
.topbar-identity { display: grid; grid-template-columns: minmax(0, 1fr) auto; align-items: center; gap: 12px; }
.player-mini { padding-top: 2px; }
.player-mini b, .player-mini small { display: block; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.player-mini b { font-size: 17px; line-height: 1.1; }
.player-mini small { margin-top: 4px; }
.topbar-resources { justify-self: end; justify-content: flex-end; gap: 18px; }
.topbar-status { width: min(50vw, 680px); justify-self: end; display: flex; flex-direction: column; align-items: stretch; gap: 8px; }
.topbar-bars { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; padding: 0; }
.topbar-bars > div { min-width: 0; }
.topbar-bars .bar { height: 12px; }
.topbar-bars .bar-label { font-size: 11px; margin-bottom: 3px; }
@media (max-width: 800px) { .topbar .wrap { width: calc(100% - 18px); } }

.item-detail-card.is-class-incompatible {
    border-color: rgba(255, 78, 94, .75) !important;
    box-shadow: 0 0 0 1px rgba(255, 78, 94, .22), 0 18px 40px rgba(0, 0, 0, .55) !important;
}

.item-stats .item-requirement-row.is-invalid {
    border-color: rgba(255, 78, 94, .95) !important;
    background: linear-gradient(135deg, rgba(125, 18, 31, .82), rgba(42, 5, 12, .92)) !important;
    color: #ffd1d6 !important;
    box-shadow: inset 0 0 0 1px rgba(255, 78, 94, .22), 0 0 14px rgba(255, 78, 94, .16);
}

.item-stats .item-stat-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 8px;
}

.item-stats .item-stat-row.is-better {
    border-color: rgba(80, 220, 110, .65) !important;
}

.item-stats .item-stat-row.is-worse {
    border-color: rgba(255, 78, 94, .72) !important;
}

.item-stats .item-stat-row.is-better b {
    color: #baf7c4;
}

.item-stats .item-stat-row.is-worse b {
    color: #ffd1d6;
}

.item-stats .stat-diff {
    display: inline-flex;
    align-items: center;
    justify-content: end;
    border-radius: 999px;
    font-style: normal;
    font-size: .88em;
    font-weight: 900;
    line-height: 1;
    white-space: nowrap;
}

.item-stats .stat-diff.positive {
    color: #69f58a;
}

.item-stats .stat-diff.negative {
    color: #ff6b7b;
}
