/* Camada visual do Reino Scripta. Não altera IDs nem comportamento do jogo. */
:root {
    --reino-bg: #06100f;
    --reino-panel: #0b1715;
    --reino-panel-light: #10221e;
    --reino-ink: #d9d0bc;
    --reino-muted: #aaa18f;
    --reino-gold: #b9904d;
    --reino-gold-light: #f0d48e;
    --reino-line: rgba(185, 144, 77, .42);
}

body {
    color: var(--reino-ink);
    font-family: Inter, Georgia, serif;
    background:
        radial-gradient(ellipse at 50% 0%, rgba(60, 85, 65, .18), transparent 44%),
        linear-gradient(180deg, #0a1513, var(--reino-bg));
}

body::before { opacity: .3; }

/* Desativa o zoom por toque duplo sem bloquear rolagem ou zoom por pinça. */
html, body, body * { touch-action: manipulation; }

.container { width: min(1580px, calc(100vw - 24px)); }
.app-shell { padding: 10px 0 28px; }

.topbar {
    display: grid;
    grid-template-columns: auto minmax(0, 1fr) auto;
    align-items: center;
    column-gap: 12px;
    min-height: 33px;
    padding: 7px 18px;
    margin: 0 0 8px;
    color: #c6b99f;
    background: #070d0c;
    border-bottom: 1px solid var(--reino-line);
    font-family: Cinzel, Georgia, serif;
    font-size: 10px;
}
.topbar > .account-links,
.topbar > .account-actions { display: none !important; }
.topbar > .realm-nav { grid-column: 2; justify-self: center; }
.topbar-links { gap: 16px; }
.topbar-links a, .topbar-links a:visited { color: var(--reino-gold-light) !important; }

.app-layout { gap: 10px; }
.content-column { gap: 10px; }

.box {
    border: 1px solid var(--reino-line);
    border-radius: 3px;
    background:
        linear-gradient(145deg, rgba(17, 34, 29, .97), rgba(6, 15, 13, .98));
    box-shadow: inset 0 0 0 3px rgba(0, 0, 0, .32), inset 0 0 0 4px rgba(229, 192, 109, .06), 0 8px 22px rgba(0, 0, 0, .3);
}

.hero-card {
    position: relative;
    padding: 5px 14px 7px;
    overflow: visible;
    border-top: 2px solid var(--reino-gold);
    background:
        linear-gradient(90deg, rgba(5, 13, 12, .98), rgba(12, 28, 25, .96)),
        repeating-linear-gradient(90deg, transparent 0 150px, rgba(240, 212, 142, .06) 151px 152px);
}
.hero-copy { gap: 0; }
.hero-topline { min-height: 56px; }
.site-logo { width: 195px; filter: sepia(.25) saturate(.85) drop-shadow(0 2px 2px #000); }
.game-announcement {
    flex: 1 1 320px;
    min-width: 0;
    min-height: 44px;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 8px 16px;
    border: 1px solid rgba(185, 144, 77, .55);
    border-left: 4px solid var(--announcement-accent, #f0d48e);
    background: linear-gradient(100deg, rgba(4, 12, 9, .96), rgba(31, 27, 16, .9), rgba(4, 12, 9, .96));
    box-shadow: inset 0 0 14px rgba(0, 0, 0, .42), 0 0 14px rgba(0, 0, 0, .28);
    color: #fff0c1;
    font-family: Cinzel, Georgia, serif;
    font-size: clamp(13px, 1.25vw, 18px);
    font-weight: 700;
    letter-spacing: .035em;
    line-height: 1.35;
    text-align: center;
    text-transform: uppercase;
    text-shadow: 0 1px 3px #000, 0 0 12px var(--announcement-accent, #f0d48e);
    overflow-wrap: anywhere;
}
.game-announcement[hidden] { display: none; }
.game-announcement.is-visible { animation: aviso-jogo-entrada .48s cubic-bezier(.2, .9, .25, 1.2) both; }
.game-announcement.is-hiding { animation: aviso-jogo-saida .35s ease-in both; }
@keyframes aviso-jogo-entrada {
    0% { opacity: 0; transform: translateY(-12px) scale(.94); filter: brightness(.55); }
    68% { opacity: 1; transform: translateY(2px) scale(1.02); filter: brightness(1.35); }
    100% { opacity: 1; transform: none; filter: none; }
}
@keyframes aviso-jogo-saida {
    to { opacity: 0; transform: translateY(-8px) scale(.98); }
}
@media (prefers-reduced-motion: reduce) {
    .game-announcement.is-visible,
    .game-announcement.is-hiding { animation-duration: .01ms; }
}
.hero-account { color: #c9c0ad; font-size: 11px; }
.treasury-crown-card {
    display: flex;
    align-items: center;
    gap: 10px;
    min-width: 210px;
    padding: 8px 12px;
    border: 1px solid rgba(222, 184, 91, .72);
    border-radius: 3px;
    background: linear-gradient(145deg, rgba(45, 37, 19, .96), rgba(12, 18, 14, .98));
    box-shadow: inset 0 0 0 2px rgba(222, 184, 91, .12), 0 3px 10px rgba(0, 0, 0, .34);
}
.treasury-crown-symbol { color: #f0ce73; font-size: 19px; filter: drop-shadow(0 0 5px rgba(240, 206, 115, .32)); }
.treasury-crown-copy { display: grid; gap: 2px; min-width: 0; }
.treasury-crown-copy small { color: #d9c17f; font-family: Cinzel, Georgia, serif; font-size: 9px; font-weight: 700; letter-spacing: .08em; text-transform: uppercase; }
.treasury-crown-copy strong { color: #fff0c1; font-size: 13px; font-variant-numeric: tabular-nums; line-height: 1.2; }
.treasury-crown-card.is-negative { border-color: rgba(213, 105, 89, .78); box-shadow: inset 0 0 0 2px rgba(213, 105, 89, .12), 0 3px 10px rgba(0, 0, 0, .34); }
.treasury-crown-card.is-negative .treasury-crown-symbol,
.treasury-crown-card.is-negative .treasury-crown-copy strong { color: #ff9e8d; }
.hero-title, .section-title, h1, h2, h3 { font-family: Cinzel, Georgia, serif; }
.title-help-row { display: none; }
.version-pill, .panel-tag {
    border: 1px solid var(--reino-line);
    border-radius: 2px;
    background: rgba(128, 94, 40, .18);
    color: var(--reino-gold-light);
    font-family: Cinzel, Georgia, serif;
    font-size: 9px;
}

.realm-nav {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0;
    width: auto;
    min-width: 0;
    position: static;
    transform: none;
}
.realm-nav .nav-btn {
    display: flex;
    flex: 0 0 auto;
    min-width: max-content;
    min-height: 30px;
    flex-direction: row;
    align-items: center;
    justify-content: center;
    gap: 6px;
    padding: 4px 9px;
    border: 0;
    border-radius: 0;
    color: #d8ceb9;
    background: transparent;
    font-family: Cinzel, Georgia, serif;
    font-size: 10px;
    letter-spacing: .01em;
    text-transform: uppercase;
    transform: none;
}
.realm-nav .nav-btn + .nav-btn {
    border-left: 1px solid rgba(185, 144, 77, .62);
    padding-left: 11px;
}
.realm-nav .nav-btn i { color: var(--reino-gold-light); font-size: 11px; }
.realm-nav .nav-btn:hover,
.realm-nav .nav-btn.active {
    color: #ffedb6;
    background: rgba(185, 144, 77, .12);
    box-shadow: none;
    transform: none;
}

.game-shell {
    grid-template-columns: minmax(225px, .75fr) minmax(520px, 2.2fr) minmax(225px, .75fr);
    gap: 10px;
}
.game-sidebar, .game-rightbar { gap: 10px; }
.game-sidebar > .box, .game-rightbar > .box { padding: 13px; }

.adventurer-card {
    display: grid;
    grid-template-columns: 78px minmax(0, 1fr);
    gap: 10px;
    padding-bottom: 11px;
    border-bottom: 1px solid var(--reino-line);
}
.adventurer-portrait {
    display: grid;
    min-height: 105px;
    place-items: center;
    color: #c8a25d;
    background: radial-gradient(circle at 50% 24%, rgba(194, 156, 86, .28), transparent 26%), linear-gradient(145deg, #293c34, #07100e 77%);
    border: 1px solid #a17b42;
    box-shadow: inset 0 0 0 3px #09110f, inset 0 0 18px #000;
}
.adventurer-portrait i { font-size: 45px; filter: drop-shadow(0 4px 3px #000); }
.adventurer-card strong { display: block; margin-top: 8px; color: #f1dfbb; font-family: Cinzel, Georgia, serif; font-size: 17px; }
.adventurer-card span { display: block; margin-top: 3px; color: #d3c7ad; font-size: 11px; }
.adventurer-xp { position: relative; height: 17px; margin-top: 14px; overflow: hidden; border: 1px solid #796541; border-radius: 10px; background: #06100d; }
.adventurer-xp-fill { width: 0; height: 100%; border-radius: inherit; background: linear-gradient(90deg, #326c61, #91a867); box-shadow: 0 0 8px rgba(145, 168, 103, .35); transition: width .35s ease; }
.adventurer-xp small { position: absolute; z-index: 1; inset: 0; margin: 0; display: grid; place-items: center; color: #fff1cf; font-size: 8px; text-shadow: 0 1px 3px #000; }

.status-topline .section-title, .status-section-title { color: var(--reino-gold-light); font-family: Cinzel, Georgia, serif; font-size: 11px; }
.status-highlight-grid { gap: 6px; }
.highlight-card { padding: 8px; border-color: rgba(185, 144, 77, .18); border-radius: 2px; background: rgba(255,255,255,.018); }
.highlight-label, .metric-label { color: var(--reino-muted); font-size: 9px; }
.highlight-value { color: #e7d8b6; font-family: Cinzel, Georgia, serif; font-size: 14px; }
.status-section { gap: 6px; padding-top: 8px; border-color: rgba(185, 144, 77, .18); }
.metric-row { color: var(--reino-muted); font-size: 12px; }
.metric-value, .metric-row strong, .metric-row span:last-child { color: #ede2ca; }
.status-note { color: #d2c8b6; font-size: 11px; }
.hp-container { border-color: #806537; border-radius: 2px; background: #050907; }
#hp-bar { background: linear-gradient(90deg, #8f2d2b, #e35a4f); }

.region-hero {
    position: relative;
    min-height: 160px;
    display: flex;
    align-items: center;
    margin-bottom: 8px;
    padding: 22px 28px 22px 82px;
    overflow: hidden;
    border: 1px solid #846538;
    box-shadow: inset 0 0 0 3px rgba(0,0,0,.36), 0 8px 18px rgba(0,0,0,.28);
    background: linear-gradient(90deg, rgba(4, 14, 12, .94) 0%, rgba(8, 20, 16, .62) 48%, rgba(5, 14, 11, .06) 100%), url('../assets/img/Regi%C3%A3o/floresta.jpg') center 47% / cover;
}
.region-hero-copy > span { color: var(--reino-gold-light); font-family: Cinzel, Georgia, serif; font-size: 11px; letter-spacing: .08em; }
.region-hero-copy h2 { margin: 2px 0 5px; color: #f1e3c1; font-size: clamp(28px, 3vw, 42px); line-height: 1; text-shadow: 0 2px 3px #000; }
.region-hero-copy p { margin: 0; color: #e6e0d1; font-size: 12px; }
.region-hero-copy::before { content: '♠'; position: absolute; left: 25px; top: 52px; display: grid; width: 42px; height: 42px; place-items: center; color: #e7cf8d; border: 1px solid #c5a25f; border-radius: 50%; box-shadow: 0 0 0 4px rgba(8,33,25,.78); }

.world-nav { padding: 4px; margin-bottom: 9px; border-color: #755a33; border-radius: 2px; background: #081310; }
.top-world-nav { gap: 4px; }
.world-nav .nav-btn { min-height: 53px; border-color: rgba(185, 144, 77, .3); border-radius: 2px; color: #d8cdb4; background: linear-gradient(180deg, #172822, #0a1411); font-family: Cinzel, Georgia, serif; font-size: 11px; transform: none; }
.world-nav .nav-btn.active { color: #fff0c1; border-color: #d8b262; background: linear-gradient(180deg, #69512c, #292116); }

/* Artes das localidades: o primeiro plano escurece a imagem para manter os
   nomes legíveis. As URLs de Mercado, Academia e Forja já ficam prontas para
   quando seus arquivos forem adicionados em assets/img. */
.world-nav .nav-btn {
    position: relative;
    overflow: hidden;
    isolation: isolate;
    text-shadow: 0 1px 2px #000;
}
.world-nav .nav-btn::before {
    content: '';
    position: absolute;
    z-index: -1;
    inset: 0;
    opacity: .74;
    background-position: center;
    background-size: cover;
    transition: opacity .2s ease, transform .25s ease;
}
.world-nav .nav-btn:hover::before,
.world-nav .nav-btn.active::before { opacity: 1; transform: scale(1.06); }
.world-nav .nav-btn[data-page="floresta"]::before { background-image: linear-gradient(180deg, transparent 20%, rgba(3, 10, 7, .85)), url('../assets/img/Regi%C3%A3o/floresta.jpg'); }
.world-nav .nav-btn[data-page="taberna"]::before { background-image: linear-gradient(180deg, transparent 20%, rgba(17, 8, 3, .88)), url('../assets/img/Regi%C3%A3o/taberna.jpg'); }
.world-nav .nav-btn[data-page="mercado"]::before { background-image: linear-gradient(180deg, transparent 20%, rgba(8, 11, 8, .88)), url('../assets/img/Regi%C3%A3o/mercado.jpg'); }
.world-nav .nav-btn[data-page="academia"]::before { background-image: linear-gradient(180deg, transparent 20%, rgba(6, 12, 15, .88)), url('../assets/img/Regi%C3%A3o/academia.jpg'); }
.world-nav .nav-btn[data-page="forja"]::before { background-image: linear-gradient(180deg, transparent 20%, rgba(18, 7, 3, .88)), url('../assets/img/Regi%C3%A3o/forja.jpg'); }
.world-nav .nav-btn[data-page="praca"]::before { background-image: linear-gradient(180deg, transparent 20%, rgba(7, 12, 9, .88)), url('../assets/img/Regi%C3%A3o/praca.jpg'); }
.world-nav .nav-btn[data-page="contratos"]::before { background-image: linear-gradient(180deg, transparent 20%, rgba(17, 10, 5, .9)), url('../assets/img/Regi%C3%A3o/contratos.jpg'); }

body[data-page-theme="floresta"] .region-hero { background-image: linear-gradient(90deg, rgba(4, 14, 12, .94) 0%, rgba(8, 20, 16, .62) 48%, rgba(5, 14, 11, .06) 100%), url('../assets/img/Regi%C3%A3o/floresta.jpg'); }
body[data-page-theme="taberna"] .region-hero { background-image: linear-gradient(90deg, rgba(19, 9, 4, .94) 0%, rgba(31, 14, 6, .58) 48%, rgba(15, 7, 3, .08) 100%), url('../assets/img/Regi%C3%A3o/taberna.jpg'); }
body[data-page-theme="mercado"] .region-hero { background-image: linear-gradient(90deg, rgba(5, 13, 12, .94) 0%, rgba(9, 20, 16, .62) 48%, rgba(5, 14, 11, .06) 100%), url('../assets/img/Regi%C3%A3o/mercado.jpg'); }
body[data-page-theme="academia"] .region-hero { background-image: linear-gradient(90deg, rgba(5, 12, 15, .94) 0%, rgba(10, 22, 27, .62) 48%, rgba(5, 14, 11, .06) 100%), url('../assets/img/Regi%C3%A3o/academia.jpg'); }
body[data-page-theme="forja"] .region-hero { background-image: linear-gradient(90deg, rgba(18, 7, 3, .94) 0%, rgba(38, 13, 5, .58) 48%, rgba(16, 6, 3, .08) 100%), url('../assets/img/Regi%C3%A3o/forja.jpg'); }

.game-main > .page > .box, .game-main > .box { border-radius: 3px; }
#page-floresta > .box {
    color: #2c2115;
    background: linear-gradient(90deg, rgba(234, 218, 183, .98) 0%, rgba(226, 205, 167, .95) 55%, rgba(34, 25, 16, .18) 100%), url('../assets/img/floresta.png') right center / auto 100% no-repeat;
    border-color: #9c7138;
}
#page-floresta .section-title, #page-floresta .mural-label, #page-floresta .metric-label, #page-floresta .muted, #page-floresta strong { color: #2c2115; }
#page-floresta .panel-tag { color: #422e13; border-color: rgba(98,68,30,.45); background: rgba(128,94,40,.16); }
#page-floresta .mural-container { padding: 12px; border-color: rgba(98,68,30,.32); background: rgba(111,77,37,.10); }
#page-floresta .mural-selecao, #page-floresta .mural-detalhes { border-color: rgba(98,68,30,.25); background: rgba(255,247,220,.28); }
#page-floresta .detalhe-linha { border-color: rgba(98,68,30,.18); }
#page-floresta .mural-detalhes strong { color: #15583a; }

/* Cartão de missão: navegação lateral, detalhes em pergaminho e arte à direita. */
#page-floresta .mural-container {
    display: grid;
    grid-template-columns: 38px minmax(0, 1fr) 38px;
    align-items: stretch;
    gap: 8px;
    padding: 4px;
    background: #513a20;
    border-color: #806037;
    box-shadow: inset 0 0 0 1px rgba(255, 232, 177, .25);
}
.mission-card {
    position: relative;
    display: block;
    overflow: hidden;
    min-height: 178px;
    border: 1px solid rgba(91, 60, 24, .4);
    background: #24170d;
}
#page-floresta .mural-selecao {
    position: relative;
    z-index: 2;
    width: min(63%, 540px);
    align-content: start;
    padding: 14px 20px;
    border: 0;
    background: transparent;
}
.mission-title {
    margin: 2px 0 5px;
    color: #2a1b0e !important;
    font-family: Cinzel, Georgia, serif;
    font-size: clamp(17px, 1.75vw, 24px);
}
.mission-description { max-width: 430px; margin: 0; color: #342416; font-size: 11px; line-height: 1.42; }
#page-floresta .mural-select { display: none; }
.mission-facts { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 4px; margin-top: 9px; }
.mission-facts > div { display: grid; grid-template-columns: 14px minmax(0, 1fr); column-gap: 4px; align-items: center; min-width: 0; padding-right: 5px; border-right: 1px solid rgba(94, 61, 25, .22); }
.mission-facts > div:last-child { border-right: 0; }
.mission-facts i { grid-row: span 2; color: #6b4920; font-size: 11px; }
.mission-facts span { color: #594127; font-size: 8px; line-height: 1.1; text-transform: uppercase; }
.mission-facts strong { color: #204c35 !important; font-size: 11px; line-height: 1.15; white-space: nowrap; }
#page-floresta .mural-selecao .btn-explorar { width: min(260px, 100%); min-height: 34px; margin-top: 10px; padding: 7px 12px; }
.mission-art { position: absolute; z-index: 0; inset: 0; overflow: hidden; background: #1d160f; }
.mission-art::after { content: ''; position: absolute; inset: 0; background: linear-gradient(90deg, rgba(239, 222, 184, .98) 0%, rgba(231, 208, 168, .93) 46%, rgba(116, 78, 39, .22) 72%, rgba(20, 11, 5, .18) 100%); box-shadow: inset 0 0 26px rgba(0, 0, 0, .35); pointer-events: none; }
.mission-art img { width: 100%; height: 100%; min-height: 178px; object-fit: cover; object-position: center; display: block; filter: saturate(.88) contrast(1.08); }
.mission-nav {
    align-self: center;
    width: 36px;
    height: 52px;
    padding: 0;
    border: 1px solid #8a6230;
    border-radius: 2px;
    color: #ffe2a0;
    background: linear-gradient(180deg, #5e4322, #2b1c0d);
    box-shadow: inset 0 1px rgba(255, 235, 179, .22);
    cursor: pointer;
}
.mission-nav:hover { filter: brightness(1.15); }

@media (max-width: 700px) {
    #page-floresta .mural-container { position: relative; grid-template-columns: minmax(0, 1fr); gap: 0; padding: 0; }
    #page-floresta .mural-selecao { width: 100%; padding: 13px 42px; }
    .mission-facts { grid-template-columns: repeat(2, minmax(0, 1fr)); row-gap: 7px; }
    .mission-art img { min-height: 190px; }
    #page-floresta .mission-nav {
        position: absolute;
        top: 50%;
        z-index: 4;
        width: 30px;
        height: 48px;
        margin: 0;
        transform: translateY(-50%);
        border-color: rgba(138, 98, 48, .9);
        background: linear-gradient(180deg, rgba(94, 67, 34, .94), rgba(43, 28, 13, .96));
    }
    #page-floresta .mission-nav-prev { left: 5px; }
    #page-floresta .mission-nav-next { right: 5px; }
}

/* A missão é a superfície principal: remove as molduras externas redundantes. */
#page-floresta > .box {
    padding: 0;
    overflow: visible;
    border: 0;
    background: transparent;
    box-shadow: none;
}
#page-floresta > .box > .page-header { display: none; }
#page-floresta .mural-container {
    margin: 0;
    padding: 0;
    gap: 0;
    border: 0;
    background: transparent;
    box-shadow: none;
}
.mission-card {
    border: 1px solid #aa8143;
    border-radius: 10px;
    box-shadow: 0 8px 18px rgba(0, 0, 0, .26), inset 0 0 0 2px rgba(74, 43, 14, .12);
}
.mission-nav {
    position: relative;
    z-index: 3;
    justify-self: center;
    margin: 0 -13px;
}

.btn-explorar { border: 1px solid #e2bf70; border-radius: 2px; color: #261a0b; background: linear-gradient(180deg, #d8b664, #946f32); box-shadow: inset 0 1px rgba(255,255,255,.3); font-family: Cinzel, Georgia, serif; font-size: 12px; }
.contracts-box { border-top-color: rgba(98,68,30,.32); }
.contract-card, .taberna-card, .card-treino, .item-loja-card { border-color: var(--reino-line); border-radius: 3px; background: rgba(8,19,16,.76); }

.game-rightbar h3 { color: #f0dfba; font-family: Cinzel, Georgia, serif; font-size: 17px; }
.equipment-copy { text-align: center; }
.slot-equipado-destaque { border-color: #a98042; border-radius: 2px; background: radial-gradient(circle, rgba(173,127,56,.18), #09120f 70%); }
.eq-badge { border: 1px solid var(--reino-line); border-radius: 12px; background: rgba(255,255,255,.04); color: #e8ddc6; }
.grid-bolsa { grid-template-columns: repeat(3, minmax(0,1fr)); gap: 7px; }
.item-slot-bolsa { min-height: 68px; border: 1px solid #85673a; border-radius: 2px; background: linear-gradient(145deg,#17251f,#08120f); }

@media (max-width: 1200px) {
    .game-shell { grid-template-columns: minmax(190px, .8fr) minmax(380px, 1.8fr) minmax(190px, .8fr); gap: 8px; }
    .topbar { grid-template-columns: minmax(0, 1fr); }
    .topbar > .topbar-links:last-child { grid-column: 2; grid-row: 1; justify-self: end; }
    .topbar > .realm-nav { grid-column: 1; grid-row: 1; justify-self: center; width: 100%; overflow-x: auto; }
}
@media (max-width: 820px) {
    .topbar { grid-template-columns: minmax(0, 1fr); }
    .topbar > .topbar-links:last-child { grid-column: 2; grid-row: 1; justify-self: end; }
    .topbar > .realm-nav { grid-column: 1; grid-row: 1; justify-self: center; width: 100%; overflow-x: auto; margin-top: 0; }
    .realm-nav .nav-btn { min-width: max-content; min-height: 34px; }
    .region-hero { padding-left: 68px; }
    .region-hero-copy::before { left: 17px; }
}
@media (max-width: 720px) {
    .topbar { grid-template-columns: minmax(0, 1fr); row-gap: 7px; }
    .topbar > .topbar-links:first-child { grid-column: 1; grid-row: 1; }
    .topbar > .realm-nav { grid-column: 1; grid-row: 2; justify-content: flex-start; }
    .topbar > .topbar-links:last-child { grid-column: 1; grid-row: 3; justify-self: stretch; }
    .hero-topline .game-announcement { flex: 0 1 auto; width: 100%; }
}

/* Acabamento da tela principal: couro, metal, pergaminho e tinta. */
.game-main { gap: 10px; }
.game-sidebar > .status-stack {
    border-color: #887047;
    border-radius: 3px;
    background:
        repeating-linear-gradient(0deg, rgba(226, 205, 158, .018) 0 1px, transparent 1px 5px),
        radial-gradient(ellipse at 20% 0%, rgba(95, 119, 73, .16), transparent 55%),
        linear-gradient(145deg, #14211a, #09110e 72%);
    box-shadow: inset 0 0 0 3px rgba(0, 0, 0, .38), inset 0 0 0 4px rgba(221, 184, 105, .07), 0 10px 24px rgba(0, 0, 0, .32);
}
.game-sidebar .adventurer-card {
    padding: 9px;
    border: 1px solid rgba(185, 144, 77, .28);
    background: linear-gradient(100deg, rgba(91, 67, 35, .25), rgba(5, 12, 9, .12));
}
.game-sidebar .adventurer-portrait {
    border-color: #b18a4b;
    box-shadow: inset 0 0 0 3px #09110f, inset 0 0 18px #000, 0 0 0 2px rgba(211, 174, 97, .12);
}
.game-sidebar .status-topline {
    padding: 8px 0;
    border-bottom: 1px solid rgba(185, 144, 77, .3);
}
.game-sidebar .status-topline .section-title { color: #f0dfba; }
.game-sidebar .help-trigger { border-color: rgba(205, 169, 93, .48); color: #efd18a; background: #111913; }
.game-sidebar .highlight-card {
    border-color: rgba(185, 144, 77, .24);
    border-left: 2px solid #8b7548;
    border-radius: 2px;
    background: linear-gradient(145deg, rgba(25, 37, 29, .9), rgba(7, 14, 11, .94));
    box-shadow: inset 0 1px rgba(255, 236, 187, .04);
}
.game-sidebar .highlight-card:nth-child(1) { border-left-color: #739461; }
.game-sidebar .highlight-card:nth-child(2) { border-left-color: #9d7c45; }
.game-sidebar .highlight-card:nth-child(3) { border-left-color: #c39a4d; }
.game-sidebar .highlight-card:nth-child(4) { border-left-color: #777fa2; }
.game-sidebar .status-section {
    padding: 8px 9px 8px 11px;
    border: 0;
    border-left: 2px solid rgba(185, 144, 77, .42);
    background: linear-gradient(90deg, rgba(185, 144, 77, .075), rgba(185, 144, 77, .012) 70%, transparent);
}
.game-sidebar .status-section-title { color: #d8bd7d; letter-spacing: .09em; }
.game-sidebar .status-note { border-color: rgba(185, 144, 77, .2); border-radius: 2px; background: rgba(4, 10, 8, .62); }

.game-main .region-hero {
    border-color: #b08a4e;
    box-shadow: inset 0 0 0 3px rgba(0, 0, 0, .46), inset 0 0 0 4px rgba(232, 197, 118, .14), 0 9px 21px rgba(0, 0, 0, .34);
}
.game-main .region-hero::after {
    content: '';
    position: absolute;
    inset: 6px;
    border: 1px solid rgba(241, 212, 151, .2);
    pointer-events: none;
}
.game-main .world-nav.box {
    border: 1px solid #80643a;
    background:
        repeating-linear-gradient(90deg, rgba(223, 188, 113, .025) 0 1px, transparent 1px 8px),
        linear-gradient(180deg, #17241d, #080f0c);
    box-shadow: inset 0 0 0 3px rgba(0, 0, 0, .34), inset 0 0 0 4px rgba(226, 188, 106, .06), 0 7px 18px rgba(0, 0, 0, .28);
}
.game-main .world-nav .nav-btn {
    border-bottom: 2px solid rgba(185, 144, 77, .18);
    box-shadow: inset 0 1px rgba(255, 239, 196, .08);
}
.game-main .world-nav .nav-btn.active {
    border-bottom-color: #edcc7c;
    box-shadow: inset 0 0 0 1px rgba(255, 231, 174, .16), 0 0 12px rgba(197, 157, 76, .12);
}

#page-floresta .mission-card {
    border-color: #c09a59;
    box-shadow: inset 0 0 0 3px rgba(72, 47, 20, .22), inset 0 0 0 5px rgba(255, 232, 176, .2), 0 12px 23px rgba(0, 0, 0, .32);
}
#page-floresta .mission-card::before {
    content: '';
    position: absolute;
    z-index: 3;
    inset: 6px;
    border: 1px solid rgba(255, 235, 185, .35);
    border-radius: 6px;
    pointer-events: none;
}
#page-floresta .mission-art::after {
    background:
        repeating-linear-gradient(0deg, rgba(109, 78, 39, .025) 0 1px, transparent 1px 5px),
        linear-gradient(90deg, rgba(239, 222, 184, .98) 0%, rgba(231, 208, 168, .93) 46%, rgba(116, 78, 39, .22) 72%, rgba(20, 11, 5, .18) 100%);
}
#page-floresta .mission-title {
    padding-bottom: 6px;
    border-bottom: 1px solid rgba(94, 61, 25, .3);
    text-shadow: 0 1px rgba(255, 249, 224, .45);
}
#page-floresta .mission-facts > div {
    padding: 5px 4px;
    border: 1px solid rgba(94, 61, 25, .17);
    background: rgba(255, 248, 226, .23);
}
#page-floresta .mural-selecao .btn-explorar {
    border-color: #7a5627;
    box-shadow: inset 0 1px rgba(255, 255, 255, .3), 0 3px 7px rgba(61, 38, 14, .22);
}

.game-main > .box:last-child {
    padding: 14px;
    border-color: #6e6949;
    background:
        repeating-linear-gradient(0deg, rgba(210, 197, 158, .025) 0 1px, transparent 1px 6px),
        linear-gradient(145deg, #101a16, #070d0b);
    box-shadow: inset 0 0 0 3px rgba(0, 0, 0, .36), inset 0 0 0 4px rgba(194, 171, 111, .045), 0 8px 20px rgba(0, 0, 0, .25);
}
.game-main > .box:last-child > .page-header {
    margin-bottom: 10px;
    padding-bottom: 8px;
    border-bottom: 1px solid rgba(185, 144, 77, .24);
}
#log {
    border: 1px solid rgba(185, 144, 77, .28);
    border-left: 3px solid #8e7648;
    border-radius: 2px;
    background:
        repeating-linear-gradient(0deg, rgba(216, 204, 169, .035) 0 1px, transparent 1px 25px),
        linear-gradient(180deg, rgba(4, 10, 8, .96), rgba(10, 17, 13, .96));
    color: #d5cfbd;
    line-height: 1.75;
    scrollbar-color: #7b673f #09100d;
    scrollbar-width: thin;
}

.game-rightbar > .equipment-copy {
    border-color: #987646;
    background:
        repeating-linear-gradient(135deg, rgba(226, 187, 106, .022) 0 2px, transparent 2px 8px),
        radial-gradient(ellipse at 50% 30%, rgba(142, 91, 42, .2), transparent 64%),
        linear-gradient(150deg, #211b13, #0b120f 76%);
    box-shadow: inset 0 0 0 3px rgba(0, 0, 0, .4), inset 0 0 0 4px rgba(221, 181, 102, .07), 0 9px 22px rgba(0, 0, 0, .31);
}
.game-rightbar > .box:last-child {
    border-color: #61744e;
    background:
        repeating-linear-gradient(0deg, rgba(201, 221, 168, .018) 0 1px, transparent 1px 6px),
        linear-gradient(145deg, #142018, #080f0c 74%);
    box-shadow: inset 0 0 0 3px rgba(0, 0, 0, .36), inset 0 0 0 4px rgba(160, 188, 120, .06), 0 9px 22px rgba(0, 0, 0, .29);
}
.game-rightbar .page-header { padding-bottom: 8px; border-bottom: 1px solid rgba(185, 144, 77, .25); }
.slot-equipado-destaque {
    border: 2px solid #a98042;
    box-shadow: inset 0 0 0 3px rgba(0, 0, 0, .5), inset 0 0 22px rgba(0, 0, 0, .65), 0 0 0 3px rgba(185, 144, 77, .12);
}
.game-rightbar .eq-badge { box-shadow: inset 0 1px rgba(255, 255, 255, .05); }
.game-rightbar #eq-atk { border-color: rgba(211, 93, 71, .55); color: #ffc09d; background: rgba(88, 34, 24, .36); }
.game-rightbar #eq-dur { border-color: rgba(130, 166, 108, .45); color: #c8dda9; background: rgba(31, 59, 37, .36); }
.game-rightbar #eq-efeito { padding: 7px 9px; border: 1px solid rgba(185, 144, 77, .2); background: rgba(4, 10, 8, .5); text-align: left; }
.game-rightbar .item-slot-bolsa {
    border-radius: 2px;
    box-shadow: inset 0 0 0 2px rgba(0, 0, 0, .32), inset 0 0 12px rgba(0, 0, 0, .3);
    transition: transform .16s ease, filter .16s ease, box-shadow .16s ease;
}
.game-rightbar .item-slot-bolsa:nth-child(even) { background: linear-gradient(145deg, #1d281e, #09120e); }
.game-rightbar .item-slot-bolsa:hover { transform: translateY(-2px); box-shadow: inset 0 0 0 2px rgba(226, 188, 106, .14), 0 5px 10px rgba(0, 0, 0, .28); }
.game-rightbar .item-slot-bolsa .badge-atk { border: 1px solid #f0d48e; color: #2a1d0b; background: linear-gradient(180deg, #f2d98d, #ae8138); }
.game-rightbar .dur-fill-mini { background: linear-gradient(90deg, #4d8b5b, #c6b263); }

@media (max-width: 900px) {
    .game-sidebar,
    .game-rightbar {
        background:
            repeating-linear-gradient(0deg, rgba(219, 192, 127, .018) 0 1px, transparent 1px 6px),
            linear-gradient(180deg, #0d1813, #070e0b 72%);
        border-color: rgba(185, 144, 77, .48);
        box-shadow: inset 0 0 0 3px rgba(0, 0, 0, .28), 0 24px 50px rgba(0, 0, 0, .48);
    }
}

.game-shell[hidden],
.inventory-screen[hidden] { display: none !important; }

.inventory-screen {
    display: grid;
    gap: 14px;
    margin-top: 2px;
    padding: 18px;
    border: 1px solid rgba(185, 144, 77, .56);
    background: linear-gradient(145deg, rgba(8, 17, 14, .98), rgba(16, 22, 17, .97));
    box-shadow: inset 0 0 0 3px rgba(0, 0, 0, .35), 0 12px 28px rgba(0, 0, 0, .34);
}
.inventory-screen-header {
    display: flex;
    justify-content: space-between;
    align-items: end;
    gap: 18px;
    padding: 2px 2px 14px;
    border-bottom: 1px solid rgba(185, 144, 77, .35);
}
.inventory-eyebrow,
.inventory-panel-kicker {
    color: #d1b775;
    font-family: Cinzel, Georgia, serif;
    font-size: 10px;
    letter-spacing: .08em;
    text-transform: uppercase;
}
.inventory-screen-header h2 {
    margin: 5px 0;
    color: #f2e4c4;
    font-family: Cinzel, Georgia, serif;
    font-size: clamp(24px, 3vw, 34px);
}
.inventory-screen-header p,
.merchant-heading p { margin: 0; color: #b7ad99; font-size: 12px; }
.inventory-heading-actions { display: flex; flex-wrap: wrap; gap: 8px; }
.inventory-heading-actions .btn-explorar,
.inventory-heading-actions .btn-forja {
    width: auto;
    min-width: 145px;
    min-height: 40px;
    padding: 9px 13px;
    border-radius: 3px;
    font-family: Cinzel, Georgia, serif;
    font-size: 11px;
}
.inventory-forge-link { background: linear-gradient(180deg, #8b5c2e, #57371d); }
.inventory-return { border: 1px solid rgba(218, 183, 105, .62); }

.inventory-summary {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 9px;
}
.inventory-summary-card {
    display: flex;
    align-items: center;
    gap: 11px;
    min-width: 0;
    min-height: 68px;
    padding: 11px 13px;
    border: 1px solid rgba(185, 144, 77, .24);
    background: linear-gradient(145deg, rgba(22, 31, 24, .94), rgba(7, 14, 12, .96));
}
.inventory-summary-card > i { color: #d6b566; font-size: 17px; }
.inventory-summary-card div { display: grid; gap: 4px; min-width: 0; }
.inventory-summary-card span { color: #b7ad99; font-size: 10px; }
.inventory-summary-card strong { color: #f3e4bf; font-family: Cinzel, Georgia, serif; font-size: 14px; }
.inventory-gold-card strong, .merchant-purse { color: #f2cb69; }
.inventory-gold-card #inventory-gold-balance { color: #f2cb69; }
.inventory-summary-card .is-hospitalized { color: #ff8989; }

.inventory-columns {
    display: grid;
    grid-template-columns: minmax(0, 1.02fr) minmax(0, .98fr);
    align-items: start;
    gap: 14px;
}
.inventory-columns-solo { grid-template-columns: minmax(0, 1fr); }
.backpack-panel,
.merchant-panel {
    min-width: 0;
    padding: 15px;
    border: 1px solid rgba(185, 144, 77, .48);
    box-shadow: inset 0 0 0 2px rgba(0, 0, 0, .3), 0 8px 20px rgba(0, 0, 0, .23);
}
.backpack-panel {
    background:
        repeating-linear-gradient(135deg, rgba(218, 183, 105, .025) 0 3px, transparent 3px 9px),
        linear-gradient(145deg, #241a10, #12140f 72%);
    border-color: #927044;
}
.merchant-panel { background: linear-gradient(145deg, rgba(20, 28, 22, .98), rgba(8, 15, 12, .98)); }
.inventory-panel-heading {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 12px;
    margin-bottom: 12px;
}
.inventory-panel-heading h3 {
    margin: 4px 0 0;
    color: #f0dfba;
    font-family: Cinzel, Georgia, serif;
    font-size: 17px;
}
.inventory-panel-heading h3 i { margin-right: 5px; color: #d6b566; }
.merchant-heading h2 { margin: 4px 0 0; color: #f0dfba; font-family: Cinzel, Georgia, serif; font-size: 17px; }
.merchant-heading h2 i { margin-right: 5px; color: #d6b566; }
.capacity-badge,
.merchant-purse {
    padding: 7px 10px;
    border: 1px solid rgba(213, 176, 95, .48);
    background: rgba(6, 11, 8, .75);
    color: #f2cb69;
    font-family: Cinzel, Georgia, serif;
    font-size: 11px;
    white-space: nowrap;
}
.merchant-purse { display: flex; align-items: center; gap: 7px; }
.merchant-purse strong { color: #f2cb69; }
.equipped-item-wrap { margin-bottom: 12px; }
.equipped-item-wrap > .inventory-panel-kicker { display: block; margin-bottom: 6px; }
.equipped-inventory-card {
    display: flex;
    align-items: center;
    gap: 12px;
    min-height: 70px;
    padding: 9px 12px;
    border: 1px solid var(--item-rarity-color, #9fb3c8);
    background: linear-gradient(90deg, rgba(5, 10, 8, .94), rgba(54, 40, 20, .42));
}
.equipped-inventory-card > img { width: 50px; height: 50px; object-fit: contain; }
.equipped-inventory-card.is-empty { color: #aaa08c; font-size: 12px; }
.equipped-inventory-copy { display: grid; gap: 4px; min-width: 0; }
.equipped-inventory-name { color: #ead9b4; font-family: Cinzel, Georgia, serif; font-size: 13px; }
.equipped-inventory-stats { color: #c8bea8; font-size: 11px; }
.equipped-inventory-effect { color: #d6b566; font-size: 10px; }
.item-rarity-label { color: #b9ad96; font-size: 9px; letter-spacing: .06em; text-transform: uppercase; }

.backpack-slot-grid {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 7px;
}
.backpack-slot {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 4px;
    min-width: 0;
    min-height: 116px;
    padding: 8px 6px;
    border: 1px solid var(--item-rarity-color, rgba(185, 144, 77, .25));
    border-radius: 2px;
    background: linear-gradient(145deg, rgba(10, 16, 12, .95), rgba(34, 26, 16, .86));
    color: #e8ddc6;
    cursor: pointer;
    text-align: center;
    transition: transform .16s ease, background .16s ease, box-shadow .16s ease;
}
button.backpack-slot:hover { transform: translateY(-2px); filter: brightness(1.08); }
.backpack-slot.is-selected { box-shadow: inset 0 0 0 1px #e0bd69, 0 0 11px rgba(224, 189, 105, .2); background: linear-gradient(145deg, #342718, #111610); }
.backpack-slot img { width: 100%; height: 48px; object-fit: contain; }
.backpack-slot-name { display: -webkit-box; max-width: 100%; overflow: hidden; color: #e9dec9; font-size: 10px; line-height: 1.2; -webkit-box-orient: vertical; -webkit-line-clamp: 2; }
.backpack-slot-attack { color: #f0cb70; font-size: 10px; font-weight: 700; }
.backpack-slot-durability { color: #b7ad99; font-size: 9px; }
.backpack-slot-value { color: #d6b566; font-size: 9px; }
.backpack-slot.is-empty { border-style: dashed; border-color: rgba(185, 144, 77, .22); color: rgba(210, 192, 154, .45); font-size: 9px; }
.backpack-slot.is-empty i { color: rgba(210, 192, 154, .42); font-size: 17px; }

.inventory-item-details {
    display: grid;
    gap: 9px;
    min-height: 154px;
    margin-top: 12px;
    padding: 13px;
    border: 1px solid rgba(213, 176, 95, .36);
    border-left: 3px solid #c9a457;
    background: rgba(5, 11, 8, .8);
}
.inventory-detail-empty { align-self: center; margin: 0; color: #b7ad99; font-size: 12px; text-align: center; }
.inventory-detail-heading h4 { margin: 0 0 3px; color: #f0dfba; font-family: Cinzel, Georgia, serif; font-size: 15px; }
.inventory-detail-stats { display: flex; flex-wrap: wrap; gap: 6px; }
.inventory-detail-stats span { padding: 4px 7px; border: 1px solid rgba(185, 144, 77, .23); color: #d3c8b0; background: rgba(255, 255, 255, .025); font-size: 10px; }
.inventory-durability-bar { height: 6px; overflow: hidden; background: rgba(255, 255, 255, .09); }
.inventory-durability-bar div { height: 100%; background: linear-gradient(90deg, #53a66e, #d2bb62); }
.inventory-item-effect { margin: 0; color: #b7ad99; font-size: 11px; line-height: 1.4; }
.inventory-detail-actions { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 6px; }
.inventory-detail-actions .btn-explorar,
.inventory-detail-actions .btn-forja { width: auto; min-height: 36px; padding: 7px 6px; border-radius: 2px; font-size: 10px; }

.market-grid-expanded { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 9px; }
.market-page .market-grid-expanded { grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); }
.market-item-card {
    min-height: 0;
    padding: 11px;
    gap: 9px;
    border-color: rgba(185, 144, 77, .36);
    border-radius: 2px;
    background: linear-gradient(145deg, rgba(10, 17, 13, .96), rgba(28, 25, 17, .96));
}
.market-item-top { display: flex; align-items: center; gap: 9px; min-width: 0; }
.market-item-art { display: grid; flex: 0 0 52px; width: 52px; height: 52px; place-items: center; border: 1px solid rgba(185, 144, 77, .3); background: radial-gradient(circle, rgba(213, 176, 95, .15), rgba(5, 11, 8, .9)); }
.market-item-art img { max-width: 90%; max-height: 90%; object-fit: contain; }
.market-item-copy { display: grid; gap: 3px; min-width: 0; }
.market-item-name { overflow-wrap: anywhere; color: #e9dec9; font-family: Cinzel, Georgia, serif; font-size: 12px; }
.market-item-stats { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 4px; color: #b7ad99; font-size: 9px; }
.market-item-stats strong { display: block; margin-top: 2px; color: #e4c783; font-size: 11px; }
.market-item-effect { min-height: 25px; margin: 0; color: #b7ad99; font-size: 9px; line-height: 1.35; }
.market-item-price { display: flex; justify-content: space-between; gap: 8px; padding-top: 7px; border-top: 1px solid rgba(185, 144, 77, .2); color: #b7ad99; font-size: 10px; }
.market-item-price strong { color: #f2cb69; white-space: nowrap; }
.market-buy-actions { display: grid; grid-template-columns: minmax(0, 7fr) minmax(40px, 3fr); gap: 6px; margin-top: auto; }
.market-buy-actions .market-buy-button { width: 100%; min-width: 0; min-height: 38px; margin-top: 0; padding: 7px 5px; border-radius: 2px; font-size: 10px; }
.market-buy-quantity-button { min-width: 0; min-height: 38px; padding: 3px; border: 1px solid rgba(213, 176, 95, .58); border-radius: 2px; background: linear-gradient(180deg, #514225, #292116); color: #f4d17d; font-family: Georgia, serif; font-size: 23px; font-weight: 700; line-height: 1; cursor: pointer; }
.market-buy-quantity-button:hover:not(:disabled) { border-color: #f4d17d; background: linear-gradient(180deg, #68552f, #382c19); box-shadow: 0 0 10px rgba(213, 176, 95, .18); }
.market-buy-quantity-button:disabled { opacity: .38; cursor: not-allowed; }
.market-buy-button:disabled { filter: saturate(.45); }
button.item-slot-bolsa { color: inherit; font: inherit; cursor: pointer; text-align: center; }
.item-slot-pocao {
    justify-content: center;
    gap: 4px;
    border-color: rgba(112, 190, 139, .66) !important;
    background: linear-gradient(145deg, rgba(17, 48, 34, .96), rgba(8, 19, 14, .98));
}
.item-slot-pocao-vida { min-height: 94px; gap: 2px; padding: 5px 4px; }
.item-slot-pocao-vida .potion-item-image { width: 100%; max-width: 62px; height: 70px; flex: 0 0 70px; }
.item-slot-pocao-vida .bag-potion-heal { color: #b7e5ba; font-size: 9px; font-weight: 700; line-height: 1.1; }
.bag-potion-icon { color: #8fe0a6; font-size: 20px; }
.bag-potion-name { color: #dff1d8; font-size: 9px; line-height: 1.2; }
.bag-potion-heal { color: #9fd7a9; font-size: 8px; }
.backpack-slot-potion { border-color: rgba(112, 190, 139, .66) !important; background: linear-gradient(145deg, #163522, #0a1710); }
.backpack-slot-potion-icon { color: #8fe0a6; font-size: 25px; }
.backpack-slot-potion .backpack-slot-name { color: #dff1d8; }
.backpack-slot-potion-heal { color: #9fd7a9; font-size: 10px; font-weight: 700; line-height: 1.2; }
.backpack-slot-potion-use { color: #f0d48e; font-family: Cinzel, Georgia, serif; font-size: 9px; }
.market-item-art-potion { border-color: rgba(112, 190, 139, .5); background: radial-gradient(circle, rgba(73, 157, 99, .23), rgba(5, 11, 8, .9)); }
.market-item-art-potion i { color: #8fe0a6; font-size: 24px; filter: drop-shadow(0 2px 4px rgba(96, 213, 131, .3)); }
.potion-item-image { display: block; width: 26px; height: 32px; flex: 0 0 auto; object-fit: contain; filter: drop-shadow(0 2px 4px rgba(96, 213, 131, .22)); }
.item-slot-pocao .potion-item-image { width: 22px; height: 27px; }
.backpack-slot-potion .potion-item-image { width: 100%; max-width: 72px; height: 76px; flex: 0 0 76px; }
.market-item-art-potion .potion-item-image { width: 38px; height: 44px; }
.marketplace-card-art .potion-item-image { width: 30px; height: 36px; }
.inventory-detail-actions .inventory-action-use-potion { grid-column: 1 / -1; }
.merchant-header-actions { display: flex; align-items: center; justify-content: flex-end; flex-wrap: wrap; gap: 8px; }
.market-view-toggle, .marketplace-refresh { min-height: 36px; padding: 7px 11px; border: 1px solid rgba(213, 176, 95, .55); border-radius: 2px; background: linear-gradient(180deg, #4d4026, #272116); color: #f0d89c; font-family: Cinzel, Georgia, serif; font-size: 10px; cursor: pointer; }
.market-view-toggle:hover, .marketplace-refresh:hover { border-color: #f4d17d; filter: brightness(1.12); }
.market-view-toggle i, .marketplace-refresh i { margin-right: 5px; }
.market-player-view[hidden] { display: none !important; }
.merchant-heading #merchant-kicker[hidden], .merchant-heading #merchant-subtitle[hidden] { display: none !important; }
.marketplace-status { min-height: 0; margin: 0; color: #cdbb98; font-size: 10px; }
.marketplace-status:empty { display: none; }
.marketplace-section { margin-top: 12px; padding: 11px; border: 1px solid rgba(185, 144, 77, .24); background: rgba(3, 9, 7, .4); }
.marketplace-section-heading { display: flex; align-items: end; justify-content: space-between; gap: 10px; margin-bottom: 9px; }
.marketplace-section-heading h4 { margin: 3px 0 0; color: #eaddbf; font-family: Cinzel, Georgia, serif; font-size: 13px; }
.marketplace-section-heading > span { color: #a99b80; font-size: 9px; text-align: right; }
.marketplace-item-grid, .marketplace-listing-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(185px, 1fr)); gap: 8px; }
.marketplace-backpack-card, .marketplace-listing-card { min-width: 0; padding: 9px; border: 1px solid rgba(185, 144, 77, .32); background: linear-gradient(145deg, rgba(16, 23, 17, .97), rgba(34, 28, 18, .92)); }
.marketplace-backpack-card { display: grid; grid-template-columns: 44px minmax(0, 1fr); align-items: center; gap: 8px; color: #e9dec9; text-align: left; cursor: pointer; }
.marketplace-backpack-card:hover { border-color: #dfbd70; box-shadow: 0 0 12px rgba(213, 176, 95, .16); }
.marketplace-backpack-card img, .marketplace-card-art { display: grid; width: 44px; height: 44px; place-items: center; object-fit: contain; border: 1px solid rgba(185, 144, 77, .25); background: rgba(0, 0, 0, .25); }
.marketplace-card-art i { color: #8fe0a6; font-size: 21px; }
.marketplace-backpack-copy { display: grid; min-width: 0; gap: 3px; }
.marketplace-backpack-copy strong, .marketplace-listing-name { overflow-wrap: anywhere; color: #ead9b4; font-family: Cinzel, Georgia, serif; font-size: 10px; }
.marketplace-backpack-copy small, .marketplace-listing-meta { color: #b7ad99; font-size: 9px; }
.marketplace-listing-card { display: grid; align-content: start; gap: 7px; }
.marketplace-listing-head { display: flex; align-items: center; gap: 8px; min-width: 0; }
.marketplace-listing-head > img { flex: 0 0 44px; width: 44px; height: 44px; object-fit: contain; border: 1px solid rgba(185, 144, 77, .25); background: rgba(0, 0, 0, .25); }
.marketplace-listing-head .marketplace-listing-copy { display: grid; gap: 3px; min-width: 0; }
.marketplace-listing-price { display: flex; align-items: center; justify-content: space-between; gap: 7px; padding-top: 6px; border-top: 1px solid rgba(185, 144, 77, .2); color: #b7ad99; font-size: 9px; }
.marketplace-listing-price strong { color: #f2cb69; font-size: 11px; }
.marketplace-listing-seller { color: #c3b697; font-size: 9px; }
.marketplace-buy-row { display: grid; grid-template-columns: minmax(65px, .7fr) minmax(0, 1.3fr); gap: 6px; }
.marketplace-buy-quantity, .marketplace-stepper input { width: 100%; min-width: 0; border: 1px solid rgba(185, 144, 77, .4); background: #09100c; color: #f0e3c5; text-align: center; }
.marketplace-buy-button, .marketplace-cancel-listing { min-height: 34px; padding: 6px 8px; border: 1px solid rgba(213, 176, 95, .48); border-radius: 2px; background: linear-gradient(180deg, #65502c, #352817); color: #f7e6b9; font-family: Cinzel, Georgia, serif; font-size: 9px; cursor: pointer; }
.marketplace-buy-button:disabled { opacity: .45; cursor: not-allowed; }
.marketplace-cancel-listing { border-color: rgba(203, 104, 81, .48); background: linear-gradient(180deg, #5d3027, #301b17); color: #efc0ae; }
.marketplace-empty { grid-column: 1 / -1; margin: 0; padding: 14px; border: 1px dashed rgba(185, 144, 77, .25); color: #aaa08c; font-size: 10px; text-align: center; }
.marketplace-listing-modal[hidden] { display: none !important; }
.marketplace-listing-modal { position: fixed; z-index: 1400; inset: 0; display: grid; place-items: center; padding: 16px; }
.marketplace-modal-backdrop { position: absolute; inset: 0; border: 0; background: rgba(0, 0, 0, .78); cursor: pointer; }
.marketplace-modal-card { position: relative; z-index: 1; display: grid; gap: 9px; width: min(100%, 420px); max-height: min(90vh, 720px); overflow-y: auto; padding: 18px; border: 1px solid rgba(213, 176, 95, .68); background: linear-gradient(145deg, #1a1a12, #090f0c); box-shadow: inset 0 0 0 3px rgba(0, 0, 0, .4), 0 16px 60px rgba(0, 0, 0, .65); }
.marketplace-modal-header { display: flex; align-items: start; justify-content: space-between; gap: 10px; padding-bottom: 9px; border-bottom: 1px solid rgba(185, 144, 77, .28); }
.marketplace-modal-header h3 { margin: 4px 0 0; color: #f0dfba; font-family: Cinzel, Georgia, serif; font-size: 17px; }
.marketplace-modal-close { width: 32px; height: 32px; border: 1px solid rgba(185, 144, 77, .35); background: rgba(0, 0, 0, .25); color: #e8d6ae; font-size: 20px; cursor: pointer; }
.marketplace-modal-help { margin: 0; color: #d8c8a6; font-size: 11px; }
.marketplace-price-suggestion { display: flex; align-items: center; gap: 8px; padding: 9px; border: 1px solid rgba(120, 166, 109, .34); background: rgba(36, 65, 39, .18); color: #bfd5ab; font-size: 10px; }
.marketplace-price-suggestion i { color: #d6b566; }
.marketplace-price-suggestion strong { color: #f0d48e; }
.marketplace-field-label { margin-top: 2px; color: #d3c8b0; font-size: 10px; }
.marketplace-stepper { display: grid; grid-template-columns: 42px minmax(0, 1fr) 42px; gap: 6px; }
.marketplace-stepper button { border: 1px solid rgba(213, 176, 95, .48); background: linear-gradient(180deg, #554326, #302516); color: #f0d48e; font-size: 17px; cursor: pointer; }
.marketplace-stepper input { min-height: 38px; padding: 6px; font-size: 14px; }
.marketplace-listing-total { margin: 0; color: #f0d48e; font-size: 11px; text-align: right; }
.marketplace-modal-actions { display: grid; grid-template-columns: minmax(0, .8fr) minmax(0, 1.2fr); gap: 7px; margin-top: 3px; }
.marketplace-cancel-button, .marketplace-submit-button { min-height: 38px; padding: 8px; border: 1px solid rgba(185, 144, 77, .42); border-radius: 2px; background: rgba(0, 0, 0, .25); color: #d3c8b0; font-family: Cinzel, Georgia, serif; font-size: 10px; cursor: pointer; }
.marketplace-submit-button { border-color: #92713a; background: linear-gradient(180deg, #8c682e, #55401f); color: #fff0c4; }
.marketplace-submit-button:disabled { opacity: .5; cursor: wait; }
.store-bulk-buy-modal .marketplace-modal-card { max-width: 390px; }
.store-bulk-buy-modal .marketplace-modal-help { color: #d5c39c; }

@media (max-width: 1100px) {
    .inventory-columns { grid-template-columns: minmax(0, 1fr); }
    .market-grid-expanded { grid-template-columns: repeat(3, minmax(0, 1fr)); }
}
@media (max-width: 720px) {
    .inventory-screen { gap: 11px; padding: 12px; padding-bottom: 92px; }
    .inventory-screen-header { align-items: stretch; flex-direction: column; }
    .inventory-heading-actions { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); }
    .inventory-heading-actions .btn-explorar,
    .inventory-heading-actions .btn-forja { min-width: 0; }
    .inventory-summary { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 7px; }
    .inventory-summary-card { min-height: 62px; padding: 9px; gap: 8px; }
    .inventory-summary-card strong { font-size: 12px; }
    .backpack-panel, .merchant-panel { padding: 11px; }
    .backpack-slot-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); }
    .market-grid-expanded { grid-template-columns: repeat(2, minmax(0, 1fr)); }
    .merchant-heading { align-items: stretch; flex-direction: column; }
    .merchant-header-actions { justify-content: flex-start; }
    .marketplace-item-grid, .marketplace-listing-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (max-width: 440px) {
    .inventory-heading-actions { grid-template-columns: 1fr; }
    .backpack-slot-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
    .market-grid-expanded { grid-template-columns: 1fr; }
    .inventory-detail-actions { grid-template-columns: 1fr; }
    .merchant-heading { align-items: stretch; flex-direction: column; }
    .merchant-header-actions { width: 100%; justify-content: space-between; }
    .merchant-header-actions .market-view-toggle { flex: 1; }
    .marketplace-section-heading { align-items: flex-start; flex-direction: column; }
    .marketplace-section-heading > span { text-align: left; }
    .marketplace-item-grid, .marketplace-listing-grid { grid-template-columns: 1fr; }
    .marketplace-modal-card { padding: 14px; }
}

.chat-praca-mensagens {
    height: 300px;
    overflow-y: auto;
    padding: 12px;
    margin-bottom: 12px;
    border: 1px solid var(--reino-line, #665333);
    background: rgba(4, 12, 9, 0.78);
}

.chat-praca-mensagem {
    padding: 8px 0;
    border-bottom: 1px solid rgba(180, 150, 95, 0.15);
    overflow-wrap: anywhere;
}

.chat-praca-autor {
    display: flex;
    justify-content: space-between;
    gap: 12px;
    color: #e4c783;
    font-size: 13px;
}

.chat-praca-autor small {
    color: #a9a18e;
    white-space: nowrap;
}

.chat-praca-mensagem p {
    margin: 5px 0 0;
    color: #eee7d7;
    font-size: 14px;
    white-space: pre-wrap;
}

.chat-praca-form {
    display: flex;
    gap: 8px;
}

.chat-praca-form button {
    flex: 0 0 auto;
    width: auto;
    min-width: 82px;
    white-space: nowrap;
}

.chat-praca-form input {
    flex: 1;
    min-width: 0;
    padding: 11px;
    color: #eee7d7;
    background: #0b1510;
    border: 1px solid var(--reino-line, #665333);
}

.chat-praca-form button:disabled {
    opacity: 0.5;
    cursor: wait;
}

#chat-praca-status {
    display: block;
    margin-top: 8px;
    font-size: 12px;
}

@media (max-width: 600px) {
    .chat-praca-mensagens {
        height: 260px;
    }

    .chat-praca-form {
        gap: 5px;
    }

    .chat-praca-form button {
        padding: 8px;
        min-width: 70px;
    }
}


/* Forja exclusiva: ferro escurecido, cobre quente e luz de brasa. */
.forge-screen[hidden] { display: none !important; }
.forge-screen {
    --forge-copper: #dc7944;
    --forge-glow: #ffb16d;
    display: grid;
    gap: 14px;
    margin-top: 2px;
    padding: 18px;
    border: 1px solid rgba(205, 111, 61, .72);
    background:
        radial-gradient(ellipse at 15% 0%, rgba(177, 65, 27, .22), transparent 38%),
        repeating-linear-gradient(135deg, rgba(213, 125, 67, .025) 0 2px, transparent 2px 9px),
        linear-gradient(145deg, #17100d, #0b100d 56%, #160d09);
    box-shadow: inset 0 0 0 3px rgba(0, 0, 0, .45), inset 0 0 0 4px rgba(239, 137, 79, .08), 0 14px 34px rgba(0, 0, 0, .4);
}
.forge-screen-header {
    display: flex;
    justify-content: space-between;
    align-items: end;
    gap: 18px;
    padding: 2px 2px 14px;
    border-bottom: 1px solid rgba(220, 121, 68, .4);
}
.forge-eyebrow, .forge-panel-kicker {
    color: #e89a63;
    font-family: Cinzel, Georgia, serif;
    font-size: 10px;
    letter-spacing: .1em;
    text-transform: uppercase;
}
.forge-screen-header h2 {
    margin: 5px 0;
    color: #ffe0c3;
    font-family: Cinzel, Georgia, serif;
    font-size: clamp(25px, 3.2vw, 36px);
}
.forge-screen-header p { max-width: 720px; margin: 0; color: #b9a696; font-size: 12px; }
.forge-heading-actions { display: flex; flex-wrap: wrap; gap: 8px; }
.forge-heading-actions .btn-explorar {
    width: auto;
    min-width: 142px;
    min-height: 40px;
    padding: 9px 13px;
    border: 1px solid rgba(225, 132, 77, .6);
    border-radius: 2px;
    background: linear-gradient(180deg, #754329, #482718);
    color: #ffe1c4;
    font-family: Cinzel, Georgia, serif;
    font-size: 10px;
}
.forge-heading-actions .forge-return { background: linear-gradient(180deg, #25231d, #15140f); }
.forge-summary { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 9px; }
.forge-summary-card {
    display: grid;
    grid-template-columns: 22px minmax(0, 1fr);
    column-gap: 8px;
    align-items: center;
    min-height: 66px;
    padding: 10px 12px;
    border: 1px solid rgba(205, 111, 61, .27);
    background: linear-gradient(145deg, rgba(39, 25, 18, .92), rgba(12, 14, 11, .96));
}
.forge-summary-card > i { grid-row: span 2; color: var(--forge-glow); text-align: center; }
.forge-summary-card span { color: #b9a696; font-size: 9px; }
.forge-summary-card strong { color: #f3d0ad; font-family: Cinzel, Georgia, serif; font-size: 13px; }
.forge-summary-card:first-child strong { color: #f4c96f; }
.forge-success-card strong { color: #f09a58; }
.forge-layout { display: grid; grid-template-columns: minmax(310px, .84fr) minmax(0, 1.16fr); align-items: start; gap: 14px; }
.forge-workbench, .forge-inventory-panel {
    min-width: 0;
    padding: 15px;
    border: 1px solid rgba(205, 111, 61, .5);
    box-shadow: inset 0 0 0 2px rgba(0, 0, 0, .34), 0 9px 22px rgba(0, 0, 0, .28);
}
.forge-workbench {
    position: relative;
    overflow: hidden;
    background:
        radial-gradient(ellipse at 50% 65%, rgba(181, 62, 24, .17), transparent 48%),
        repeating-linear-gradient(0deg, rgba(221, 120, 62, .025) 0 1px, transparent 1px 7px),
        linear-gradient(145deg, #21140f, #100e0c 72%);
}
.forge-inventory-panel { background: linear-gradient(145deg, rgba(27, 24, 19, .98), rgba(9, 13, 11, .98)); }
.forge-section-heading { margin-bottom: 12px; }
.forge-section-heading h3 { margin: 4px 0 5px; color: #f4d5b8; font-family: Cinzel, Georgia, serif; font-size: 17px; }
.forge-section-heading h3 i { margin-right: 5px; color: var(--forge-glow); }
.forge-section-heading p { margin: 0; color: #b6a493; font-size: 10px; line-height: 1.5; }
.forge-recipe-strip { display: grid; gap: 5px; margin: 12px 0; }
.forge-recipe-strip span { padding: 5px 8px; border-left: 2px solid rgba(220, 121, 68, .7); background: rgba(255, 255, 255, .025); color: #cdb9a5; font-size: 9px; }
.forge-crucible { display: grid; grid-template-columns: minmax(0, 1fr) 30px minmax(0, 1fr); align-items: center; gap: 7px; }
.forge-material-slot {
    min-height: 142px;
    display: grid;
    place-items: center;
    padding: 10px;
    border: 1px dashed rgba(223, 126, 72, .54);
    border-radius: 2px;
    background:
        radial-gradient(circle at 50% 80%, rgba(175, 58, 19, .18), transparent 42%),
        linear-gradient(145deg, rgba(22, 16, 12, .96), rgba(7, 11, 9, .97));
    color: #ae9c89;
    font-size: 9px;
    text-align: center;
    transition: border-color .18s ease, box-shadow .18s ease, background .18s ease;
}
.forge-material-slot.is-over { border-color: #ffc17d; box-shadow: 0 0 20px rgba(236, 111, 48, .32), inset 0 0 20px rgba(227, 91, 34, .12); }
.forge-slot-card { display: grid; justify-items: center; gap: 6px; width: 100%; }
.forge-slot-card img { width: 48px; height: 48px; object-fit: contain; filter: drop-shadow(0 0 9px rgba(240, 127, 67, .28)); }
.forge-slot-card strong { font-family: Cinzel, Georgia, serif; font-size: 10px; }
.forge-slot-card small { color: #aa9987; font-size: 8px; }
.forge-plus { display: grid; place-items: center; width: 28px; height: 28px; border: 1px solid rgba(232, 143, 84, .55); border-radius: 50%; color: #ffad69; background: #26150f; box-shadow: 0 0 14px rgba(203, 78, 36, .18); }
.forge-selection-summary { min-height: 33px; display: grid; place-items: center; margin-top: 9px; padding: 6px 8px; border: 1px solid rgba(205, 111, 61, .2); background: rgba(0, 0, 0, .23); color: #e1b998; font-size: 9px; text-align: center; }
.forge-fuse-button { min-height: 42px; margin-top: 9px; border: 1px solid #bd6135; border-radius: 2px; background: linear-gradient(180deg, #c85d2e, #792d19); color: #fff0df; font-family: Cinzel, Georgia, serif; letter-spacing: .025em; }
.forge-fuse-button:disabled { opacity: .45; filter: saturate(.45); cursor: not-allowed; }
.forge-fuse-all-button {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 100%;
    min-height: 39px;
    margin-top: 6px;
    padding: 8px 10px;
    border: 1px solid rgba(229, 174, 92, .48);
    border-radius: 2px;
    background: linear-gradient(180deg, #54402a, #302316);
    color: #e7c99d;
    font-family: Cinzel, Georgia, serif;
    font-size: 10px;
    letter-spacing: .025em;
    cursor: pointer;
    transition: border-color .18s ease, box-shadow .18s ease, background .18s ease, color .18s ease, opacity .18s ease;
}
.forge-fuse-all-button i { margin-right: 6px; }
.forge-fuse-all-button.is-ready { border-color: #ffd27c; background: linear-gradient(180deg, #97632b, #613915); color: #fff1cc; box-shadow: 0 0 16px rgba(248, 170, 73, .32), inset 0 0 8px rgba(255, 211, 124, .12); }
.forge-fuse-all-button:disabled { opacity: .4; filter: saturate(.45); cursor: not-allowed; box-shadow: none; }
.forge-fuse-all-button.is-ready:disabled { opacity: .72; filter: saturate(.7); border-color: #c99b54; color: #ead2a2; box-shadow: inset 0 0 9px rgba(255, 211, 124, .12); }
.forge-rule-note { margin: 10px 0 0; padding: 8px; border-left: 2px solid #a84e2d; background: rgba(0, 0, 0, .24); color: #b7a391; font-size: 9px; line-height: 1.5; }
.forge-rule-note i { margin-right: 4px; color: #e69a62; }
.forge-filter-empty { margin: 0 0 8px; padding: 7px 9px; border: 1px solid rgba(224, 151, 89, .3); background: rgba(107, 57, 27, .16); color: #efc18f; font-size: 9px; line-height: 1.4; }
.forge-filter-empty[hidden] { display: none; }
.forge-inventory-heading { display: flex; align-items: end; justify-content: space-between; gap: 10px; }
.forge-select-hint { color: #a99784; font-size: 8px; text-align: right; }
.forge-item-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 9px; }
.forge-item-grid .forja-item-card {
    position: relative;
    gap: 8px;
    padding: 10px;
    border-width: 1px;
    border-radius: 2px;
    background: linear-gradient(145deg, rgba(25, 25, 20, .98), rgba(10, 13, 11, .98));
    cursor: grab;
}
.forge-item-grid .forja-item-card:hover { box-shadow: 0 0 15px rgba(213, 104, 53, .13); }
.forge-item-grid .forja-item-card.is-selected-for-fusion { outline: 1px solid rgba(255, 191, 120, .72); box-shadow: 0 0 12px rgba(220, 121, 68, .2); }
.forge-item-grid .forja-item-visual { min-height: 82px; padding: 5px; border-radius: 2px; background: radial-gradient(circle, rgba(192, 91, 42, .14), rgba(7, 11, 9, .96)); }
.forge-item-grid .forja-item-visual img { width: 54px; height: 54px; }
.forge-item-grid .forja-item-copy { gap: 3px; }
.forge-item-grid .forja-item-copy strong { font-family: Cinzel, Georgia, serif; font-size: 10px; }
.forge-item-grid .forja-item-subcopy { color: #b5a896; font-size: 8px; }
.forge-stack-count { color: #e8b886; font-size: 9px; }
.forge-item-grid .forja-item-actions { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 5px; }
.forge-item-grid .forja-item-actions .btn-forja { min-width: 0; padding: 6px 4px; border-radius: 2px; font-size: 8px; }
.forge-item-grid .forja-item-actions .btn-forja:disabled { opacity: .4; cursor: not-allowed; }
.forge-item-grid .forja-item-actions .btn-vender { grid-column: 1 / -1; }
.forge-item-grid .forja-item-card.is-forja-locked {
    border: 2px dashed #c4cbc8 !important;
    border-left: 5px solid #aab3af !important;
    background: linear-gradient(145deg, #343a38, #1b201f 72%) !important;
    box-shadow: inset 0 0 0 2px rgba(230, 237, 234, .14), 0 0 12px rgba(205, 217, 212, .14);
    cursor: default;
}
.forge-item-grid .forja-item-card.is-forja-locked::after {
    content: 'BLOQUEADO';
    position: absolute;
    z-index: 3;
    top: 6px;
    left: 6px;
    padding: 3px 5px;
    border: 1px solid #c4cbc8;
    background: rgba(23, 28, 27, .96);
    color: #f2f5f3;
    font-family: Cinzel, Georgia, serif;
    font-size: 7px;
    font-weight: 700;
    letter-spacing: .07em;
    pointer-events: none;
}
.forge-item-grid .is-forja-locked .forja-item-visual { background: radial-gradient(circle, rgba(145, 155, 151, .2), #121615 76%); }
.forge-item-grid .is-forja-locked .forja-item-visual img { filter: grayscale(1) brightness(.58) contrast(.9); }
.forge-item-grid .is-forja-locked .forja-item-copy strong { color: #d2d8d5 !important; }
.forge-item-grid .is-forja-locked .forja-item-subcopy { color: #b8c0bc; }
.forge-item-grid .is-forja-locked .forge-stack-count {
    display: block;
    width: 100%;
    padding: 4px 5px;
    border: 1px solid rgba(196, 203, 200, .72);
    background: rgba(20, 25, 24, .9);
    color: #f2f5f3;
    font-size: 8px;
    font-weight: 700;
    letter-spacing: .025em;
    text-align: center;
    text-transform: uppercase;
}
.forge-item-grid .forja-item-actions .btn-bloquear-forja { grid-column: 1 / -1; border-color: rgba(240, 212, 142, .65); background: linear-gradient(180deg, #514326, #302716); color: #f6e5b3; }
.backpack-slot { position: relative; }
.backpack-stack-count, .bag-stack-count {
    display: grid;
    place-items: center;
    min-width: 22px;
    height: 20px;
    padding: 0 5px;
    border: 1px solid #f0c56e;
    background: linear-gradient(180deg, #8c5c20, #533210);
    color: #fff0c1;
    font-family: Cinzel, Georgia, serif;
    font-size: 9px;
    font-weight: 700;
    line-height: 1;
}
.backpack-stack-count { position: absolute; z-index: 2; top: 5px; right: 5px; }
.bag-stack-count { position: absolute; top: 2px; left: 2px; border-radius: 2px; }
.inventory-detail-actions { grid-template-columns: repeat(auto-fit, minmax(105px, 1fr)); }

@media (max-width: 1100px) {
    .forge-layout { grid-template-columns: minmax(0, 1fr); }
    .forge-workbench { order: 0; }
    .forge-inventory-panel { order: 1; }
}
@media (max-width: 720px) {
    .forge-screen { gap: 11px; padding: 12px; padding-bottom: 92px; }
    .forge-screen-header { align-items: stretch; flex-direction: column; }
    .forge-heading-actions { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); }
    .forge-heading-actions .btn-explorar { min-width: 0; }
    .forge-summary { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 7px; }
    .forge-summary-card { min-height: 58px; padding: 8px; }
    .forge-workbench, .forge-inventory-panel { padding: 11px; }
    .forge-item-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (max-width: 440px) {
    .forge-heading-actions { grid-template-columns: 1fr; }
    .forge-crucible { grid-template-columns: minmax(0, 1fr) 22px minmax(0, 1fr); gap: 4px; }
    .forge-material-slot { min-height: 118px; padding: 6px; }
    .forge-plus { width: 22px; height: 22px; font-size: 9px; }
    .forge-item-grid { grid-template-columns: 1fr; }
    .forge-inventory-heading { align-items: flex-start; flex-direction: column; }
    .forge-select-hint { text-align: left; }
}

.backpack-capacity-stack { display: grid; justify-items: end; gap: 3px; }
.backpack-capacity-stack > small { color: #bfaf94; font-size: 8px; }
.item-slot-bolsa { position: relative; }


/* Compactação da Forja e diálogo reutilizável de confirmação. */
.forge-summary { display: flex; justify-content: flex-end; gap: 0; margin-top: -7px; }
.forge-summary-card {
    display: grid;
    grid-template-columns: 18px auto auto;
    grid-template-rows: 1fr;
    column-gap: 7px;
    width: max-content;
    min-height: 36px;
    padding: 6px 10px;
}
.forge-summary-card > i { grid-row: auto; font-size: 11px; }
.forge-summary-card span { font-size: 8px; }
.forge-summary-card strong { font-size: 11px; }
.forge-section-heading { margin-bottom: 8px; }
.forge-recipe-strip { display: flex; flex-wrap: wrap; gap: 5px; margin: 7px 0; }
.forge-recipe-strip span { padding: 4px 7px; font-size: 8px; }
.forge-workbench, .forge-inventory-panel { padding: 11px; }
.forge-section-heading h3 { font-size: 15px; }
.forge-crucible { gap: 5px; }
.forge-material-slot { min-height: 108px; padding: 7px; }
.forge-slot-card { gap: 4px; }
.forge-slot-card img { width: 40px; height: 40px; }
.forge-slot-card strong { font-size: 9px; }
.forge-slot-card small { font-size: 7px; }
.forge-selection-row { display: flex; align-items: center; gap: 6px; margin-top: 7px; }
.forge-selection-summary {
    flex: 1;
    min-width: 0;
    min-height: 30px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 7px;
    margin: 0;
    padding: 5px 7px;
    text-align: left;
}
.forge-selection-summary > span { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.forge-selection-summary > strong { flex: none; color: #ffbf78; font-family: Cinzel, Georgia, serif; font-size: 9px; white-space: nowrap; }
.forge-clear-selection { min-height: 30px; padding: 4px 8px; border: 1px solid rgba(220, 121, 68, .42); border-radius: 2px; background: #211710; color: #d5b59a; font-size: 8px; }
.forge-clear-selection:disabled { opacity: .35; cursor: not-allowed; }
.forge-fuse-button { min-height: 34px; margin-top: 7px; padding: 7px 10px; font-size: 10px; }
.forge-rule-note { margin-top: 7px; padding: 6px 7px; font-size: 8px; }
.forge-select-hint { font-size: 7px; }
.forge-item-grid { grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 7px; }
.forge-item-grid .forja-item-card { gap: 5px; padding: 7px; }
.forge-item-grid .forja-item-visual { min-height: 58px; padding: 3px; }
.forge-item-grid .forja-item-visual img { width: 42px; height: 42px; }
.forge-item-grid .forja-item-copy strong { font-size: 9px; }
.forge-item-grid .forja-item-subcopy { font-size: 7px; }
.forge-stack-count { font-size: 8px; }
.forge-item-grid .forja-item-actions { grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 3px; }
.forge-item-grid .forja-item-actions .btn-forja { min-height: 25px; padding: 4px 2px; font-size: 7px; line-height: 1.1; }
.forge-item-grid .forja-item-actions .btn-vender { grid-column: auto; }
.forge-item-grid .forja-item-card[hidden] { display: none !important; }
.forge-filter-empty { margin: 0 0 7px; padding: 6px 8px; border-left: 2px solid #d88b55; background: rgba(0, 0, 0, .22); color: #c8ad96; font-size: 8px; }

.forge-confirm-modal[hidden] { display: none !important; }
.forge-confirm-modal {
    position: fixed;
    z-index: 10000;
    inset: 0;
    display: grid;
    place-items: center;
    padding: 14px;
}
.forge-confirm-backdrop { position: absolute; inset: 0; width: 100%; height: 100%; border: 0; background: rgba(3, 5, 5, .78); backdrop-filter: blur(3px); }
.forge-confirm-card {
    position: relative;
    z-index: 1;
    width: min(350px, calc(100vw - 28px));
    padding: 16px;
    border: 1px solid rgba(225, 132, 77, .7);
    background: radial-gradient(ellipse at 50% 0, rgba(178, 69, 28, .2), transparent 46%), linear-gradient(145deg, #211710, #0d100e);
    box-shadow: 0 18px 48px rgba(0, 0, 0, .62), inset 0 0 0 2px rgba(0, 0, 0, .42);
}
.forge-confirm-kicker { color: #e89a63; font-family: Cinzel, Georgia, serif; font-size: 8px; letter-spacing: .1em; text-transform: uppercase; }
.forge-confirm-card h3 { margin: 4px 0 6px; color: #ffe0c3; font-family: Cinzel, Georgia, serif; font-size: 17px; }
.forge-confirm-card > p { margin: 0 0 9px; color: #c8b6a4; font-size: 10px; line-height: 1.45; }
.forge-confirm-details { display: grid; gap: 4px; margin-bottom: 12px; }
.forge-confirm-detail { display: flex; justify-content: space-between; gap: 12px; padding: 5px 7px; border: 1px solid rgba(205, 111, 61, .2); background: rgba(0, 0, 0, .22); color: #aa9987; font-size: 9px; }
.forge-confirm-detail strong { color: #f0c58e; font-size: 9px; text-align: right; }
.forge-confirm-actions { display: grid; grid-template-columns: 1fr 1fr; gap: 7px; }
.forge-confirm-actions button { min-height: 32px; border: 1px solid rgba(220, 121, 68, .48); border-radius: 2px; color: #f5dfc8; font-size: 9px; font-weight: 700; }
.forge-confirm-cancel { background: #201c17; }
.forge-confirm-accept { background: linear-gradient(180deg, #b9572f, #742d1b); }

@media (max-width: 850px) {
    .forge-item-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); }
}
@media (max-width: 620px) {
    .forge-summary { margin-top: -4px; }
    .forge-item-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
    .forge-item-grid .forja-item-visual { min-height: 54px; }
    .forge-item-grid .forja-item-actions .btn-forja { font-size: 7px; }
    .forge-selection-summary { font-size: 8px; }
}
@media (max-width: 360px) {
    .forge-item-grid { grid-template-columns: 1fr; }
    .forge-item-grid .forja-item-actions .btn-forja { font-size: 8px; }
    .forge-selection-summary > span { white-space: normal; }
}


/* Perfil do personagem e seletor de retratos. */
.adventurer-portrait img { width: 100%; height: 105px; object-fit: cover; }
.character-profile-panel {
    --profile-gold: #d6b566;
    min-height: 320px;
    padding: clamp(14px, 3vw, 24px);
    border: 1px solid rgba(185, 144, 77, .62);
    background: radial-gradient(ellipse at 8% 0, rgba(185, 144, 77, .12), transparent 42%), linear-gradient(145deg, #111a15, #090f0d);
}
.character-profile-layout { display: grid; grid-template-columns: minmax(150px, 210px) minmax(0, 1fr); align-items: center; gap: clamp(18px, 4vw, 38px); margin-top: 18px; }
.character-profile-portrait {
    display: grid;
    width: min(100%, 210px);
    aspect-ratio: 4 / 5;
    place-items: center;
    overflow: hidden;
    margin: 0 auto;
    border: 1px solid #a17b42;
    background: radial-gradient(circle at 50% 25%, rgba(194, 156, 86, .3), transparent 36%), linear-gradient(145deg, #293c34, #07100e 77%);
    box-shadow: inset 0 0 0 4px #09110f, inset 0 0 22px #000, 0 12px 28px rgba(0, 0, 0, .3);
    color: #d6b566;
}
.character-profile-portrait img { width: 100%; height: 100%; object-fit: cover; }
.adventurer-portrait > img,
.adventurer-portrait > i,
.character-profile-portrait > img,
.character-profile-portrait > i { grid-area: 1 / 1; }
.adventurer-portrait > img[hidden],
.adventurer-portrait > i[hidden],
.character-profile-portrait > img[hidden],
.character-profile-portrait > i[hidden] { display: none !important; }
.adventurer-portrait > img:not([hidden]),
.character-profile-portrait > img:not([hidden]) { display: block; }
.adventurer-portrait > i:not([hidden]),
.character-profile-portrait > i:not([hidden]) { display: block; }
.character-profile-portrait i { font-size: 64px; filter: drop-shadow(0 4px 3px #000); }
.character-profile-form { display: grid; gap: 10px; max-width: 520px; }
.character-profile-form label { color: #e8d6ac; font-family: Cinzel, Georgia, serif; font-size: 12px; }
.character-profile-form input { width: 100%; min-height: 42px; padding: 10px 12px; border: 1px solid rgba(185, 144, 77, .45); border-radius: 2px; outline: none; background: rgba(4, 10, 8, .9); color: #f1e5cd; }
.character-profile-form input:focus { border-color: #d6b566; box-shadow: 0 0 0 2px rgba(214, 181, 102, .15); }
.character-photo-open, .character-profile-save { width: fit-content; min-width: 170px; min-height: 38px; padding: 8px 12px; border-radius: 2px; font-family: Cinzel, Georgia, serif; font-size: 10px; }
.character-photo-open { margin-top: 5px; border: 1px solid rgba(185, 144, 77, .65); background: linear-gradient(180deg, #604a27, #382b19); color: #f3e4bf; }
.character-profile-save { border: 1px solid rgba(89, 150, 111, .7); background: linear-gradient(180deg, #286647, #17442f); color: #e2f6e6; }
.character-profile-save:disabled { opacity: .55; cursor: wait; }
.character-profile-feedback { min-height: 18px; color: #bdb29d; font-size: 11px; }
.character-profile-feedback.is-error { color: #ff9d9d; }
.character-profile-feedback.is-success { color: #91e4b2; }

.photo-picker-modal[hidden] { display: none !important; }
.photo-picker-modal { position: fixed; z-index: 10001; inset: 0; display: grid; place-items: center; overflow-y: auto; padding: 16px; }
.photo-picker-backdrop { position: fixed; inset: 0; border: 0; background: rgba(2, 6, 5, .82); backdrop-filter: blur(4px); }
.photo-picker-dialog { position: relative; z-index: 1; display: grid; gap: 12px; width: min(760px, calc(100vw - 28px)); max-height: min(88vh, 850px); overflow-y: auto; padding: clamp(14px, 3vw, 22px); border: 1px solid rgba(185, 144, 77, .76); background: radial-gradient(ellipse at 50% 0, rgba(185, 144, 77, .15), transparent 42%), linear-gradient(145deg, #152019, #090e0c); box-shadow: 0 24px 70px rgba(0, 0, 0, .65), inset 0 0 0 3px rgba(0, 0, 0, .38); }
.photo-picker-header { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding-bottom: 10px; border-bottom: 1px solid rgba(185, 144, 77, .35); }
.photo-picker-kicker { color: #d6b566; font-family: Cinzel, Georgia, serif; font-size: 9px; letter-spacing: .12em; text-transform: uppercase; }
.photo-picker-header h2 { margin: 3px 0 0; color: #f0dfba; font-family: Cinzel, Georgia, serif; font-size: 20px; }
.photo-picker-close { width: 32px; height: 32px; border: 1px solid rgba(185, 144, 77, .4); background: rgba(0, 0, 0, .25); color: #f0dfba; font-size: 22px; cursor: pointer; }
.photo-picker-help { margin: 0; color: #bdb29d; font-size: 11px; line-height: 1.5; }
.photo-picker-grid { display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); gap: 9px; min-height: 60px; }
.photo-picker-item { display: grid; grid-template-rows: minmax(80px, 1fr) auto; gap: 6px; min-width: 0; padding: 6px; border: 1px solid rgba(185, 144, 77, .25); background: rgba(0, 0, 0, .24); color: #d8ceb9; text-align: center; cursor: pointer; }
.photo-picker-item:hover, .photo-picker-item.is-selected { border-color: #e0bd69; box-shadow: inset 0 0 0 1px rgba(224, 189, 105, .55), 0 0 12px rgba(224, 189, 105, .13); }
.photo-picker-item img { width: 100%; height: 108px; object-fit: cover; background: #070d0b; }
.photo-picker-item span { overflow: hidden; font-size: 9px; text-overflow: ellipsis; white-space: nowrap; }
.photo-upload-area { display: grid; justify-items: start; gap: 6px; padding-top: 10px; border-top: 1px solid rgba(185, 144, 77, .22); }
.photo-upload-button { display: inline-flex; align-items: center; gap: 7px; min-height: 34px; padding: 8px 11px; border: 1px solid rgba(185, 144, 77, .5); background: #211b12; color: #e9d5a4; font-family: Cinzel, Georgia, serif; font-size: 9px; cursor: pointer; }
.photo-upload-input { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0, 0, 0, 0); clip-path: inset(50%); white-space: nowrap; }
.photo-upload-input:focus-visible + .muted { outline: 2px solid #e0bd69; }
.photo-upload-preview { display: flex; align-items: center; gap: 9px; color: #e2d3b1; font-size: 10px; }
.photo-upload-preview img { width: 48px; height: 56px; object-fit: cover; border: 1px solid rgba(185, 144, 77, .5); }
.photo-picker-actions { display: flex; justify-content: flex-end; gap: 8px; padding-top: 5px; }
.photo-picker-actions button { min-height: 34px; padding: 7px 12px; border: 1px solid rgba(185, 144, 77, .42); color: #ecdfc4; font-family: Cinzel, Georgia, serif; font-size: 9px; cursor: pointer; }
.photo-picker-cancel { background: #211f19; }
.photo-picker-accept { background: linear-gradient(180deg, #82602e, #4d371a); }
.photo-picker-accept:disabled { opacity: .45; cursor: not-allowed; }

#page-praca .ranking-cabecalho {
    display: flex;
    align-items: center;
    justify-content: space-between;
    flex-wrap: wrap;
    gap: 10px;
    margin: 18px 0 10px;
    padding: 10px 12px;
    border-bottom: 1px solid var(--reino-line);
    background: linear-gradient(90deg, rgba(185, 144, 77, .1), transparent);
}
#page-praca .ranking-cabecalho h3 {
    margin: 0;
    color: #f0d48e;
    font-family: Cinzel, Georgia, serif;
    font-size: 15px;
}
#page-praca .ranking-cabecalho .btn-explorar {
    width: auto;
    min-height: 34px;
    padding: 7px 12px;
    font-size: 10px;
}
#page-praca .ranking-praca {
    display: grid;
    gap: 7px;
    min-width: 0;
}
#page-praca .ranking-praca-item {
    display: grid;
    grid-template-columns: 40px 44px minmax(0, 1fr) minmax(110px, auto);
    align-items: center;
    gap: 10px;
    min-width: 0;
    padding: 9px 11px;
    border: 1px solid rgba(185, 144, 77, .3);
    background: linear-gradient(100deg, rgba(25, 35, 27, .88), rgba(5, 12, 9, .9));
}
#page-praca .ranking-praca-item:nth-child(-n+3) {
    border-left: 3px solid #c7a35d;
}
#page-praca .ranking-posicao {
    display: grid;
    place-items: center;
    min-height: 32px;
    color: #f0d48e;
    font-family: Cinzel, Georgia, serif;
    font-size: 15px;
    font-weight: 700;
}
#page-praca .ranking-avatar {
    display: grid;
    place-items: center;
    width: 44px;
    height: 44px;
    overflow: hidden;
    border: 1px solid rgba(185, 144, 77, .55);
    background: radial-gradient(circle, rgba(194, 156, 86, .2), #07100d 75%);
    color: #d6b566;
}
#page-praca .ranking-avatar img {
    display: block;
    width: 100%;
    height: 100%;
    object-fit: cover;
}
#page-praca .ranking-avatar i { font-size: 18px; }
#page-praca .ranking-detalhes {
    display: grid;
    gap: 2px;
    min-width: 0;
}
#page-praca .ranking-nome {
    color: #f1dfbb;
    overflow-wrap: anywhere;
}
#page-praca .ranking-detalhes small {
    color: #bdb29d;
    overflow-wrap: anywhere;
}
#page-praca .ranking-poder {
    justify-self: end;
    color: #e8c879;
    font-size: 11px;
    text-align: right;
    white-space: nowrap;
}
#page-praca .ranking-erro {
    margin: 0;
    padding: 10px 12px;
    border-left: 3px solid #b9574f;
    background: rgba(95, 25, 22, .2);
    color: #ffb0a8;
    overflow-wrap: anywhere;
}
@media (max-width: 520px) {
    #page-praca .ranking-praca-item {
        grid-template-columns: 30px 38px minmax(0, 1fr);
        gap: 7px;
        padding: 8px;
    }
    #page-praca .ranking-avatar {
        width: 38px;
        height: 38px;
    }
    #page-praca .ranking-poder {
        grid-column: 3;
        justify-self: start;
        text-align: left;
        white-space: normal;
    }
}

@media (max-width: 900px) {
    .mobile-bottom-nav { grid-template-columns: repeat(6, minmax(0, 1fr)); }
    .mobile-nav-btn { font-size: 10px; }
}
@media (max-width: 620px) {
    .character-profile-layout { grid-template-columns: 1fr; }
    .character-profile-portrait { width: min(52vw, 190px); }
    .character-profile-form { width: 100%; max-width: none; }
    .character-photo-open, .character-profile-save { width: 100%; }
    .photo-picker-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 6px; }
    .photo-picker-item img { height: 90px; }
}
@media (max-width: 380px) {
    .photo-picker-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
    .mobile-nav-btn { padding: 7px 3px; font-size: 9px; }
}

.photo-picker-status { min-height: 0; margin: -5px 0 0; color: #bdb29d; font-size: 10px; }
.photo-picker-status.is-error { color: #ff9d9d; }
.photo-picker-status.is-success { color: #91e4b2; }

/* Mobile: navegação estável, status essencial e conteúdo sem gavetas flutuantes. */
.mobile-brand { display: none; }
.mobile-header-character,
.mobile-announcement-target { display: none; }
@media (max-width: 900px) {
    body {
        padding-bottom: calc(132px + env(safe-area-inset-bottom, 0px));
        font-size: 14px;
    }
    .topbar {
        position: sticky;
        top: 0;
        z-index: 50;
        display: grid;
        grid-template-columns: 76px minmax(0, 1fr) auto;
        align-items: center;
        gap: 8px;
        min-height: 52px;
        padding: 5px 8px;
        margin: 0;
        background: rgba(7, 13, 11, .97);
        backdrop-filter: blur(14px);
    }
    .mobile-brand {
        display: flex;
        grid-column: 1;
        grid-row: 1;
        align-items: center;
        width: 76px;
        min-width: 0;
    }
    .mobile-brand img { display: block; width: 76px; height: auto; }
    .topbar > .realm-nav { display: none !important; }
    .account-links {
        grid-column: 2;
        grid-row: 1;
        justify-self: start;
        width: auto;
        min-width: 0;
        overflow: hidden;
        gap: 0;
        font-size: 9px;
    }
    .account-links span {
        display: block;
        min-width: 0;
        overflow: hidden;
        text-overflow: ellipsis;
        white-space: nowrap;
    }
    .account-actions {
        grid-column: 3;
        grid-row: 1;
        justify-self: end;
        width: auto;
        flex-wrap: nowrap;
        gap: 7px;
        font-size: 9px;
        white-space: nowrap;
    }
    .account-actions a { font-size: 9px; }

    .app-shell { width: 100%; padding: 6px 8px 18px; margin: 0; }
    .app-layout,
    .content-column { display: grid; grid-template-columns: minmax(0, 1fr); gap: 8px; }
    .hero-card {
        gap: 0;
        margin: 0;
        padding: 0;
        border: 0;
        background: transparent;
        box-shadow: none;
    }
    .hero-copy,
    .hero-topline { display: flex; min-height: 0; gap: 0; flex-wrap: wrap; }
    .hero-topline .site-logo,
    .title-help-row { display: none !important; }
    .hero-account { display: flex !important; flex: 0 0 100%; justify-content: center; width: 100%; margin-top: 5px; }
    .treasury-crown-card { width: min(100%, 320px); min-width: 0; min-height: 42px; padding: 6px 10px; }
    .hero-topline .game-announcement { flex: 1 1 100%; width: 100%; min-height: 36px; padding: 6px 10px; font-size: 10px; }

    .game-shell {
        display: flex;
        flex-direction: column;
        gap: 8px;
        width: 100%;
        min-height: 0;
        padding: 0;
    }
    .game-shell[hidden],
    #inventory-screen[hidden],
    #forge-screen[hidden] { display: none !important; }
    .game-sidebar {
        position: static;
        order: 0;
        top: auto;
        right: auto;
        bottom: auto;
        left: auto;
        width: 100%;
        max-height: none;
        overflow: visible;
        z-index: auto;
        margin: 0;
        padding: 0;
        transform: none;
        transition: none;
        border: 0;
        border-radius: 0;
        background: transparent;
        box-shadow: none;
    }
    body.mobile-drawer-left-open .game-sidebar { transform: none; }
    .game-sidebar > .status-stack {
        display: grid;
        grid-template-columns: minmax(0, 1fr);
        gap: 7px;
        margin: 0;
        padding: 9px;
        border: 1px solid rgba(185, 144, 77, .42);
        border-radius: 3px;
        background: linear-gradient(135deg, rgba(17, 34, 29, .96), rgba(6, 15, 13, .97));
        box-shadow: inset 0 0 0 2px rgba(0, 0, 0, .22);
    }
    .adventurer-card {
        grid-column: 1 / -1;
        grid-template-columns: 46px minmax(0, 1fr);
        align-items: center;
        gap: 9px;
        padding: 0 0 7px;
    }
    .adventurer-portrait { width: 46px; height: 56px; min-height: 56px; }
    .adventurer-portrait img { width: 100%; height: 100%; object-fit: cover; }
    .adventurer-portrait i { font-size: 25px; }
    .adventurer-card strong { margin: 0; font-size: 12px; }
    .adventurer-card span { margin-top: 1px; font-size: 9px; }
    .adventurer-xp { height: 12px; margin-top: 5px; }
    .status-topline,
    .status-section { display: none !important; }
    .hp-container { grid-column: 1 / -1; min-height: 14px; }
    .status-highlight-grid {
        grid-column: 1 / -1;
        grid-template-columns: repeat(4, minmax(0, 1fr));
        gap: 4px;
    }
    .highlight-card { min-width: 0; padding: 5px 3px; text-align: center; }
    .highlight-label { font-size: 7px; }
    .highlight-value { font-size: 10px; line-height: 1.15; overflow-wrap: anywhere; }

    .game-rightbar { display: none !important; }
    .game-main { position: static; order: 1; z-index: auto; display: grid; gap: 8px; }
    .game-main .box { margin-bottom: 8px; }
    .world-nav { display: none !important; }
    .region-hero {
        min-height: 112px;
        margin: 0 0 8px;
        padding: 14px 12px 14px 56px;
    }
    .region-hero-copy > span { font-size: 8px; }
    .region-hero-copy h2 { font-size: clamp(21px, 6vw, 29px); }
    .region-hero-copy p { font-size: 10px; line-height: 1.3; }
    .region-hero-copy::before {
        top: 50%;
        left: 12px;
        width: 32px;
        height: 32px;
        transform: translateY(-50%);
    }
    .game-main > .page > .box { padding: 11px; }
    .mobile-drawer-handle,
    .mobile-screen-overlay { display: none !important; }

    .mobile-bottom-nav {
        display: grid;
        grid-template-columns: repeat(5, minmax(0, 1fr));
        grid-auto-rows: minmax(39px, auto);
        gap: 4px;
        position: fixed;
        right: 8px;
        bottom: calc(8px + env(safe-area-inset-bottom, 0px));
        left: 8px;
        z-index: 70;
        padding: 6px;
        border: 1px solid rgba(185, 144, 77, .55);
        border-radius: 13px;
        background: rgba(7, 14, 12, .97);
        box-shadow: 0 8px 28px rgba(0, 0, 0, .58), inset 0 0 0 1px rgba(255, 255, 255, .025);
        backdrop-filter: blur(16px);
    }
    .mobile-nav-btn {
        display: grid;
        grid-template-rows: 15px auto;
        place-items: center;
        align-content: center;
        gap: 2px;
        min-width: 0;
        min-height: 39px;
        padding: 3px 2px;
        border: 1px solid transparent;
        border-radius: 7px;
        color: #cfc4ad;
        background: transparent;
        font-family: Inter, Arial, sans-serif;
        font-size: 8px;
        font-weight: 600;
        line-height: 1;
        letter-spacing: 0;
        text-align: center;
        white-space: normal;
        transform: none;
    }
    .mobile-nav-btn i { color: #d6b566; font-size: 12px; line-height: 14px; }
    .mobile-nav-btn span {
        display: block;
        max-width: 100%;
        overflow: hidden;
        font-size: 8px;
        line-height: 1;
        text-overflow: ellipsis;
        white-space: nowrap;
    }
    .mobile-nav-btn.active {
        border-color: rgba(214, 181, 102, .62);
        color: #fff0c1;
        background: linear-gradient(180deg, rgba(111, 82, 40, .55), rgba(48, 36, 20, .52));
        box-shadow: inset 0 0 10px rgba(214, 181, 102, .08);
        transform: none;
    }
    .mobile-nav-btn:hover { transform: none; }
    .mobile-bottom-nav .mobile-nav-btn[hidden] { display: none !important; }
}

@media (max-width: 380px) {
    .topbar { grid-template-columns: 66px minmax(0, 1fr); gap: 6px; padding-inline: 6px; }
    .mobile-brand,
    .mobile-brand img { width: 66px; }
    .account-actions { gap: 5px; }
    .account-actions a { font-size: 8px; }
    .mobile-bottom-nav { right: 6px; left: 6px; gap: 3px; padding: 5px; }
    .mobile-nav-btn span { font-size: 7px; }
}

.mobile-status-toggle { display: none; }
@media (max-width: 900px) {
    .mobile-status-toggle {
        display: flex;
        align-items: center;
        justify-content: center;
        gap: 7px;
        width: 100%;
        min-height: 30px;
        padding: 5px 8px;
        border: 1px solid rgba(185, 144, 77, .28);
        border-radius: 2px;
        color: #dfc98e;
        background: rgba(0, 0, 0, .16);
        font-size: 9px;
        cursor: pointer;
    }
    .mobile-status-toggle i { font-size: 9px; }
    .game-sidebar .status-stack.mobile-stats-expanded .status-section { display: grid !important; }
}


/* Rodapé da conta em todas as larguras; a navegação inferior continua exclusiva do mobile. */
.mobile-game-footer {
    display: block;
    width: min(1580px, calc(100vw - 24px));
    margin: 12px auto 24px;
    padding: 10px 16px;
    border: 1px solid rgba(185, 144, 77, .48);
    border-radius: 3px;
    background: linear-gradient(145deg, rgba(17, 34, 29, .97), rgba(6, 15, 13, .98));
    box-shadow: inset 0 0 0 2px rgba(0, 0, 0, .22);
}
.mobile-secondary-meta,
.mobile-bottom-nav { display: none; }
.mobile-account-footer { display: flex; align-items: center; justify-content: space-between; gap: 14px; min-width: 0; }
.mobile-account-summary { display: flex; align-items: center; gap: 12px; min-width: 0; }
.mobile-account-summary #mobile-footer-account { min-width: 0; }
.mobile-account-summary .mobile-footer-version { flex: 0 0 auto; }
.mobile-account-summary .version-pill { margin: 0; }
.mobile-account-info { display: block; min-width: 0; overflow: hidden; color: #d7ceb9; font-size: 10px; text-overflow: ellipsis; white-space: nowrap; }
.mobile-account-actions { display: flex; align-items: center; gap: 8px; }
.mobile-account-actions a {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    min-height: 32px;
    padding: 6px 11px;
    border: 1px solid rgba(185, 144, 77, .36);
    border-radius: 2px;
    background: rgba(0, 0, 0, .16);
    color: #dfc98e !important;
    font-family: Cinzel, Georgia, serif;
    font-size: 10px;
    text-decoration: none !important;
    white-space: nowrap;
}
.mobile-account-actions a:hover { border-color: #e0bd69; background: rgba(185, 144, 77, .12); }
.mobile-account-actions #mobile-logout { color: #e3a69a !important; }
.mobile-account-actions #mobile-logout:hover { border-color: rgba(227, 166, 154, .65); }
@media (max-width: 900px) {
    body { padding-bottom: calc(16px + env(safe-area-inset-bottom, 0px)); }
    .app-shell { padding-bottom: 8px; }
    .mobile-game-footer {
        display: grid;
        gap: 7px;
        margin: 12px 8px calc(12px + env(safe-area-inset-bottom, 0px));
        padding: 8px;
        border: 1px solid rgba(185, 144, 77, .48);
        border-radius: 3px;
        background: linear-gradient(145deg, rgba(17, 34, 29, .97), rgba(6, 15, 13, .98));
        box-shadow: inset 0 0 0 2px rgba(0, 0, 0, .22);
    }
    .mobile-bottom-nav {
        display: grid;
        grid-template-columns: repeat(5, minmax(0, 1fr));
        grid-auto-rows: minmax(39px, auto);
        gap: 4px;
        position: static;
        inset: auto;
        z-index: auto;
        width: 100%;
        padding: 0;
        border: 0;
        border-radius: 0;
        background: transparent;
        box-shadow: none;
        backdrop-filter: none;
    }
    .mobile-footer-meta {
        display: grid;
        grid-template-columns: minmax(0, 1fr) auto;
        align-items: center;
        gap: 8px;
        padding-top: 7px;
        border-top: 1px solid rgba(185, 144, 77, .3);
    }
    .mobile-footer-account {
        display: grid;
        gap: 1px;
        min-width: 0;
        color: #d7ceb9;
        font-size: 8px;
        line-height: 1.25;
    }
    .mobile-footer-account > span {
        display: block;
        min-width: 0;
        overflow: hidden;
        text-overflow: ellipsis;
        white-space: nowrap;
    }
    .mobile-footer-account small { color: #a79b82; font-size: 8px; }
    .mobile-footer-actions { display: flex; align-items: center; gap: 5px; }
    .mobile-footer-actions a {
        display: inline-flex;
        align-items: center;
        justify-content: center;
        gap: 4px;
        min-height: 28px;
        padding: 4px 6px;
        border: 1px solid rgba(185, 144, 77, .32);
        border-radius: 2px;
        color: #dfc98e;
        background: rgba(0, 0, 0, .16);
        font-size: 8px;
        line-height: 1;
        text-decoration: none;
        white-space: nowrap;
    }
    .mobile-footer-actions a:last-child { color: #e3a69a; }
    .mobile-footer-actions i { font-size: 9px; }
}

/* Mobile: cabeçalho sticky e navegação fixa permanecem; só os metadados secundários vão ao rodapé. */
@media (max-width: 900px) {
    body { padding-bottom: calc(128px + env(safe-area-inset-bottom, 0px)); }
    .topbar {
        display: grid !important;
        grid-template-columns: clamp(76px, 28vw, 112px) minmax(0, 1fr);
        align-items: center;
        min-height: 72px;
        position: sticky;
        top: 0;
        z-index: 50;
    }
    .mobile-brand { width: 100%; }
    .mobile-brand img { width: 100%; max-width: 112px; height: auto; }
    .topbar > .account-links,
    .topbar > .account-actions { display: none !important; }
    .mobile-status-toggle { order: -1; }
    .game-sidebar .status-stack .status-highlight-grid { display: none !important; }
    .game-sidebar .status-stack.mobile-stats-expanded .status-highlight-grid { display: grid !important; }
    .mobile-header-character {
        display: flex;
        align-items: center;
        justify-content: flex-end;
        min-width: 0;
    }
    .mobile-header-character .adventurer-card {
        display: grid;
        grid-template-columns: minmax(0, 1fr) 48px;
        align-items: center;
        gap: 8px;
        width: 100%;
        max-width: 205px;
        min-width: 0;
        padding: 0;
        border: 0;
    }
    .mobile-header-character .adventurer-portrait {
        grid-column: 2;
        grid-row: 1;
        width: 48px;
        height: 52px;
        min-height: 52px;
    }
    .mobile-header-character .adventurer-portrait i { font-size: 23px; }
    .mobile-header-character .adventurer-details {
        display: grid;
        grid-column: 1;
        grid-row: 1;
        grid-template-columns: minmax(0, 1fr) auto;
        grid-template-rows: auto auto auto;
        align-items: center;
        column-gap: 6px;
        row-gap: 2px;
        width: 100%;
        max-width: 145px;
        justify-self: end;
        min-width: 0;
    }
    .mobile-header-character .adventurer-card strong {
        grid-column: 1;
        grid-row: 1;
        min-width: 0;
        margin: 0;
        overflow: hidden;
        font-size: 10px;
        line-height: 1.1;
        text-align: right;
        text-overflow: ellipsis;
        white-space: nowrap;
    }
    .mobile-header-character .adventurer-details > span {
        grid-column: 2;
        grid-row: 1;
        padding-left: 6px;
        border-left: 1px solid rgba(185, 144, 77, .65);
        margin: 0;
        font-size: 8px;
        line-height: 1.1;
        text-align: right;
        white-space: nowrap;
    }
    .mobile-header-character #ui-personagem-nome::before,
    .mobile-header-character #ui-personagem-nivel::before {
        font-family: "Font Awesome 6 Free";
        font-weight: 900;
        color: #d8b56f;
    }
    .mobile-header-character #ui-personagem-nome::before { content: "\f007"; margin-right: 4px; font-size: 8px; }
    .mobile-header-character #ui-personagem-nivel::before { content: "\f005"; margin-right: 4px; font-size: 7px; }
    .mobile-header-character .adventurer-xp {
        grid-column: 1 / -1;
        grid-row: 2;
        width: 100%;
        max-width: 150px;
        height: 10px;
        margin-top: 0;
    }
    .mobile-header-character .adventurer-xp small { font-size: 7px; }
    .mobile-header-character .adventurer-details .hp-container {
        grid-column: 1 / -1;
        grid-row: 3;
        width: 100%;
        max-width: 150px;
        min-height: 10px;
        height: 10px;
        margin: 0;
    }
    .mobile-header-character #hp-text { font-size: 7px; }
    .mobile-announcement-target { display: contents; }
    #mobile-announcement-target > .game-announcement {
        flex: 0 1 auto;
        width: 100%;
        min-height: 36px;
        margin: 0 0 8px;
        padding: 6px 10px;
        font-size: 10px;
    }
    .mobile-game-footer {
        display: block;
        margin: 12px 8px 0;
        padding: 0;
        border: 0;
        background: transparent;
        box-shadow: none;
    }
    .mobile-secondary-meta {
        display: grid;
        grid-template-columns: 58px minmax(0, 1fr);
        align-items: center;
        gap: 7px;
        min-width: 0;
        margin: 0 0 12px;
        padding: 7px;
        border: 1px solid rgba(185, 144, 77, .42);
        background: linear-gradient(145deg, rgba(17, 34, 29, .97), rgba(6, 15, 13, .98));
        box-shadow: inset 0 0 0 2px rgba(0, 0, 0, .22);
    }
    .mobile-footer-brand { display: flex; align-items: center; min-width: 0; }
    .mobile-footer-brand .site-logo { display: block; width: 58px; height: auto; margin: 0; }
    .mobile-footer-character { min-width: 0; }
    .mobile-footer-character .adventurer-card {
        grid-template-columns: 32px minmax(0, 1fr);
        align-items: center;
        gap: 6px;
        min-width: 0;
        padding: 0;
        border-bottom: 0;
    }
    .mobile-footer-character .adventurer-portrait { width: 32px; height: 40px; min-height: 40px; }
    .mobile-footer-character .adventurer-portrait i { font-size: 19px; }
    .mobile-footer-character .adventurer-card strong { margin: 0; font-size: 10px; }
    .mobile-footer-character .adventurer-card span { margin-top: 1px; font-size: 8px; }
    .mobile-footer-character .adventurer-xp { height: 8px; margin-top: 3px; }
    .mobile-footer-character .adventurer-xp small { font-size: 6px; }
    .mobile-account-summary { display: grid; justify-items: start; gap: 4px; }
    .mobile-account-summary #mobile-footer-account { width: 100%; }
    .mobile-footer-version { justify-self: start; }
    .mobile-footer-version .version-pill { padding: 5px 6px; font-size: 8px; white-space: nowrap; }
    .mobile-account-footer {
        display: grid;
        grid-template-columns: minmax(0, 1fr) auto;
        align-items: center;
        gap: 8px;
        min-width: 0;
        margin: -4px 0 12px;
        padding: 7px 2px;
        border-top: 1px solid rgba(185, 144, 77, .3);
    }
    .mobile-account-actions { display: flex; align-items: center; gap: 5px; }
    .mobile-account-info {
        display: block;
        min-width: 0;
        overflow: hidden;
        color: #d7ceb9;
        font-size: 9px;
        line-height: 1.25;
        text-overflow: ellipsis;
        white-space: nowrap;
    }
    .mobile-account-footer #mobile-switch-character,
    .mobile-account-footer #mobile-logout {
        display: inline-flex;
        align-items: center;
        justify-content: center;
        min-height: 28px;
        padding: 4px 8px;
        border: 1px solid rgba(185, 144, 77, .32);
        background: rgba(0, 0, 0, .16);
        color: #dfc98e !important;
        font-size: 8px;
        line-height: 1;
        text-decoration: none !important;
        white-space: nowrap;
    }
    .mobile-account-footer #mobile-logout { color: #e3a69a !important; }
    .mobile-bottom-nav {
        position: fixed;
        right: 8px;
        bottom: calc(8px + env(safe-area-inset-bottom, 0px));
        left: 8px;
        z-index: 70;
        width: auto;
        padding: 6px;
        border: 1px solid rgba(185, 144, 77, .55);
        border-radius: 13px;
        background: rgba(7, 14, 12, .97);
        box-shadow: 0 8px 28px rgba(0, 0, 0, .58), inset 0 0 0 1px rgba(255, 255, 255, .025);
        backdrop-filter: blur(16px);
    }
}

@media (max-width: 380px) {
    .mobile-game-footer { margin-right: 6px; margin-left: 6px; padding: 0; }
    .mobile-footer-meta { gap: 5px; }
    .mobile-footer-actions { gap: 3px; }
    .mobile-footer-actions a { gap: 3px; padding-right: 4px; padding-left: 4px; font-size: 7px; }
}


/* Instalação como app: chamada discreta no rodapé e instruções acessíveis. */
.pwa-install-footer[hidden] { display: none !important; }
.pwa-install-footer {
    position: fixed;
    z-index: 39;
    right: 18px;
    bottom: 18px;
}
.pwa-install-button {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 9px;
    min-height: 44px;
    padding: 10px 15px;
    border: 1px solid #e2bf70;
    border-radius: 3px;
    background: linear-gradient(180deg, #473820, #211a10);
    box-shadow: inset 0 1px rgba(255,255,255,.16), 0 8px 24px rgba(0,0,0,.45);
    color: #f5dfaa;
    font-family: Cinzel, Georgia, serif;
    font-size: 12px;
    font-weight: 700;
    cursor: pointer;
}
.pwa-install-button i { color: #f0d48e; font-size: 14px; }
.pwa-install-button:hover, .pwa-install-button:focus-visible { filter: brightness(1.18); outline: 2px solid #f0d48e; outline-offset: 2px; }
.pwa-install-help[hidden] { display: none !important; }
.pwa-install-help {
    position: fixed;
    z-index: 1600;
    inset: 0;
    display: grid;
    place-items: center;
    padding: 18px;
}
.pwa-install-backdrop {
    position: absolute;
    inset: 0;
    width: 100%;
    border: 0;
    background: rgba(0,0,0,.78);
    cursor: pointer;
}
.pwa-install-dialog {
    position: relative;
    z-index: 1;
    display: grid;
    gap: 14px;
    width: min(100%, 430px);
    padding: 20px;
    border: 1px solid rgba(226,191,112,.8);
    background: linear-gradient(145deg, #17211a, #080d0b);
    box-shadow: inset 0 0 0 3px rgba(0,0,0,.42), 0 18px 60px rgba(0,0,0,.72);
}
.pwa-install-dialog-header { display: flex; align-items: start; justify-content: space-between; gap: 12px; padding-bottom: 11px; border-bottom: 1px solid rgba(185,144,77,.34); }
.pwa-install-kicker { color: #d4b66c; font-family: Cinzel, Georgia, serif; font-size: 10px; letter-spacing: .1em; text-transform: uppercase; }
.pwa-install-dialog h2 { margin: 5px 0 0; color: #f1e3c1; font-family: Cinzel, Georgia, serif; font-size: 21px; }
.pwa-install-close { width: 32px; height: 32px; border: 1px solid rgba(185,144,77,.4); background: rgba(0,0,0,.25); color: #f0d48e; font-size: 22px; cursor: pointer; }
.pwa-install-message { margin: 0; color: #d9d0bc; font-size: 13px; line-height: 1.65; }
.pwa-install-confirm { min-height: 40px; border: 1px solid #b9904d; background: linear-gradient(180deg, #70562d, #392a17); color: #fff0c1; font-family: Cinzel, Georgia, serif; cursor: pointer; }
@media (max-width: 900px) {
    .pwa-install-footer { right: 12px; bottom: calc(82px + env(safe-area-inset-bottom, 0px)); }
    .pwa-install-button { min-height: 42px; padding: 9px 12px; font-size: 11px; }
}
@media (prefers-reduced-motion: reduce) {
    .pwa-install-button { scroll-behavior: auto; }
}


/* Administração e quadro de contratos dinâmicos. */
.admin-game-link{display:inline-flex;align-items:center;gap:5px;color:#e2c477!important;text-decoration:none!important;font-size:10px;font-weight:700;white-space:nowrap}.admin-game-link:hover{color:#fff0c1!important}.contracts-box .contracts-grid{display:grid;grid-template-columns:repeat(auto-fit,minmax(min(100%,250px),1fr));gap:10px;align-items:stretch}.contracts-box .contract-card{display:flex;flex-direction:column;gap:10px;min-width:0;padding:14px;border:1px solid rgba(185,144,77,.38);border-radius:2px;background:linear-gradient(145deg,rgba(29,43,35,.94),rgba(7,14,11,.98));box-shadow:inset 0 0 0 2px rgba(0,0,0,.22)}.contracts-box .contract-card>strong{color:#f0dfb9;font-family:Cinzel,Georgia,serif;font-size:14px}.contracts-box .contract-card>p{margin:0;color:#bcb29e;font-size:11px;line-height:1.5}.contracts-box .contract-metrics{display:grid;gap:5px;margin-top:auto;padding-top:6px;border-top:1px solid rgba(185,144,77,.2)}.contracts-box .contract-metrics .metric-row{display:flex;align-items:center;justify-content:space-between;gap:10px}.contracts-box .contract-metrics .metric-value{color:#e4d1a0;font-size:10px;text-align:right}.contracts-box .contract-card .btn-explorar{width:100%;min-height:36px}.contracts-box .contract-card .btn-explorar:disabled{opacity:.48;cursor:not-allowed}.contracts-box .contract-feed{margin-top:12px}.contract-empty{grid-column:1/-1;margin:0;padding:18px;border:1px dashed rgba(185,144,77,.3);color:#b7ac96;text-align:center;font-size:12px}
@media(max-width:900px){.admin-game-link{font-size:9px}.contracts-box .contracts-grid{grid-template-columns:1fr}.contracts-box .contract-card{padding:12px}}


/* Painéis recolhíveis da Bolsa, do Ranking e da Mochila. */
.collapsible-section-summary {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
    cursor: pointer;
    list-style: none;
    user-select: none;
}
.collapsible-section-summary::-webkit-details-marker { display: none; }
.collapsible-section-summary::marker { content: ''; }
.collapsible-section-summary-copy { display: grid; gap: 4px; min-width: 0; }
.collapsible-section-arrow {
    flex: 0 0 auto;
    margin-left: auto;
    color: var(--reino-gold-light);
    font-size: 13px;
    transition: transform .2s ease, color .2s ease;
}
.collapsible-section-summary:hover .collapsible-section-arrow { color: #fff0c1; }
.collapsible-section[open] > .collapsible-section-summary .collapsible-section-arrow,
.inventory-backpack-collapse[open] > .collapsible-section-summary .collapsible-section-arrow { transform: rotate(180deg); }
.home-bag-collapse,
.home-ranking-collapse { min-width: 0; padding: 13px; }
.home-bag-collapse > .collapsible-section-summary,
.home-ranking-collapse > .collapsible-section-summary {
    margin-bottom: 10px;
    padding-bottom: 9px;
    border-bottom: 1px solid rgba(185, 144, 77, .3);
}
.home-bag-collapse .collapsible-section-summary h3,
.home-ranking-collapse .collapsible-section-summary h3 {
    margin: 0;
    color: #f0dfba;
    font-family: Cinzel, Georgia, serif;
    font-size: 15px;
}
.home-bag-collapse .panel-tag,
.home-ranking-collapse .panel-tag { width: fit-content; }
.home-ranking-collapse .collapsible-section-summary h3 i { margin-right: 5px; color: #d6b566; }
.home-ranking-collapse .ranking-cabecalho {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 8px;
    margin-bottom: 8px;
}
.home-ranking-collapse .ranking-cabecalho > span { min-width: 0; font-size: 10px; }
.home-ranking-collapse .ranking-cabecalho .btn-explorar {
    width: auto;
    min-width: 68px;
    margin: 0;
    padding: 6px 9px;
    font-size: 9px;
}
.inventory-backpack-collapse { min-width: 0; }
.inventory-backpack-collapse > .inventory-panel-heading {
    margin-bottom: 0;
    padding-bottom: 10px;
    border-bottom: 1px solid rgba(185, 144, 77, .3);
    list-style: none;
    cursor: pointer;
}
.inventory-backpack-collapse > .inventory-panel-heading::-webkit-details-marker { display: none; }
.inventory-backpack-collapse > .inventory-panel-heading::marker { content: ''; }
.inventory-backpack-collapse[open] > .inventory-panel-heading { margin-bottom: 12px; }
.inventory-backpack-collapse .collapsible-section-summary-copy h3 { margin: 4px 0 0; }
.inventory-backpack-content { min-width: 0; }

@media (max-width: 600px) {
    .home-bag-collapse,
    .home-ranking-collapse { padding: 11px; }
    .home-ranking-collapse .ranking-cabecalho > span { font-size: 9px; }
    .inventory-backpack-collapse > .inventory-panel-heading { gap: 7px; }
    .inventory-backpack-collapse .backpack-capacity-stack { margin-left: auto; }
}

.game-rightbar > .home-bag-collapse {
    border-color: #61744e;
    background:
        repeating-linear-gradient(0deg, rgba(201, 221, 168, .018) 0 1px, transparent 1px 6px),
        linear-gradient(145deg, #142018, #080f0c 74%);
    box-shadow: inset 0 0 0 3px rgba(0, 0, 0, .36), inset 0 0 0 4px rgba(160, 188, 120, .06), 0 9px 22px rgba(0, 0, 0, .29);
}

.home-ranking-mobile-slot { display: none; }
@media (max-width: 900px) {
    .home-ranking-mobile-slot { display: block; width: 100%; min-width: 0; }
    .home-ranking-mobile-slot > .home-ranking-collapse { width: 100%; margin: 0; }
}

.home-ranking-collapse .ranking-cabecalho { margin-top: 0; padding: 0 0 7px; border-bottom: 0; background: transparent; }
.home-ranking-collapse .ranking-praca { display: grid; gap: 6px; min-width: 0; }
.home-ranking-collapse .ranking-praca-item {
    display: grid;
    grid-template-columns: 28px 36px minmax(0, 1fr);
    grid-template-areas: "pos avatar details" "pos avatar power";
    align-items: center;
    gap: 3px 7px;
    min-width: 0;
    padding: 7px;
    border: 1px solid rgba(185, 144, 77, .3);
    background: linear-gradient(100deg, rgba(25, 35, 27, .88), rgba(5, 12, 9, .9));
}
.home-ranking-collapse .ranking-praca-item:nth-child(-n+3) { border-left: 3px solid #c7a35d; }
.home-ranking-collapse .ranking-posicao { grid-area: pos; display: grid; place-items: center; color: #f0d48e; font-family: Cinzel, Georgia, serif; font-size: 12px; font-weight: 700; }
.home-ranking-collapse .ranking-avatar { grid-area: avatar; display: grid; place-items: center; width: 36px; height: 36px; overflow: hidden; border: 1px solid rgba(185, 144, 77, .55); background: radial-gradient(circle, rgba(194, 156, 86, .2), #07100d 75%); color: #d6b566; }
.home-ranking-collapse .ranking-avatar img { display: block; width: 100%; height: 100%; object-fit: cover; }
.home-ranking-collapse .ranking-avatar i { font-size: 15px; }
.home-ranking-collapse .ranking-detalhes { grid-area: details; display: grid; gap: 2px; min-width: 0; }
.home-ranking-collapse .ranking-nome { overflow-wrap: anywhere; color: #f1dfbb; font-size: 10px; }
.home-ranking-collapse .ranking-detalhes small { overflow-wrap: anywhere; color: #bdb29d; font-size: 8px; }
.home-ranking-collapse .ranking-poder { grid-area: power; justify-self: start; color: #e8c879; font-size: 9px; text-align: left; white-space: normal; }
.home-ranking-collapse .ranking-erro { margin: 0; padding: 8px; border-left: 3px solid #b9574f; background: rgba(95, 25, 22, .2); color: #ffb0a8; overflow-wrap: anywhere; font-size: 10px; }

.inventory-backpack-title { display: flex; align-items: center; gap: 8px; min-width: 0; }
.inventory-backpack-title h3 { min-width: 0; margin: 0 !important; }
.inventory-backpack-title .collapsible-section-arrow { margin-left: 0; }

.forge-item-grid .forge-inventory-divider {
    grid-column: 1 / -1;
    display: grid;
    grid-template-columns: auto auto minmax(12px, 1fr);
    align-items: center;
    gap: 8px;
    min-width: 0;
    margin: 3px 0 1px;
    padding: 7px 9px;
    border: 1px solid rgba(220, 121, 68, .34);
    border-left: 3px solid #d7834d;
    background: linear-gradient(90deg, rgba(79, 47, 28, .48), rgba(12, 14, 12, .76));
    color: #edbd8a;
    font-family: Cinzel, Georgia, serif;
    font-size: 9px;
    font-weight: 700;
    letter-spacing: .045em;
    text-transform: uppercase;
}
.forge-inventory-divider-title { display: inline-flex; align-items: center; gap: 6px; min-width: 0; }
.forge-inventory-divider-title i { font-size: 9px; }
.forge-inventory-divider > small { color: #d8c4ac; font-family: Inter, Arial, sans-serif; font-size: 8px; font-weight: 600; letter-spacing: 0; text-transform: none; white-space: nowrap; }
.forge-item-grid .forge-inventory-divider::after { content: ''; display: block; width: 100%; height: 1px; background: currentColor; opacity: .28; }
.forge-item-grid .forge-inventory-divider.is-forge-locked {
    border-color: rgba(196, 203, 200, .44);
    border-left-color: #abb4b1;
    background: linear-gradient(90deg, rgba(76, 84, 81, .62), rgba(17, 21, 20, .9));
    color: #e0e6e3;
}
.forge-inventory-divider.is-forge-locked > small { color: #cbd2cf; }


/* Ouro e Poder Total recebem destaque sem variar o tamanho de cada algarismo. */
.game-sidebar .highlight-card.highlight-card-gold,
.game-sidebar .highlight-card.highlight-card-power {
    min-width: 0;
    overflow: hidden;
}
.game-sidebar .highlight-card.highlight-card-gold {
    border-color: rgba(230, 187, 82, .46);
    border-left: 3px solid #e5bb58;
    background: radial-gradient(ellipse at 15% 0, rgba(210, 165, 56, .16), transparent 65%), linear-gradient(145deg, rgba(38, 34, 21, .96), rgba(12, 15, 11, .98));
}
.game-sidebar .highlight-card.highlight-card-power {
    border-color: rgba(153, 179, 212, .42);
    border-left: 3px solid #98b1d3;
    background: radial-gradient(ellipse at 15% 0, rgba(113, 145, 186, .15), transparent 65%), linear-gradient(145deg, rgba(24, 31, 39, .96), rgba(10, 14, 17, .98));
}
.game-sidebar .highlight-card.highlight-card-gold .highlight-label { color: #e5c66f; font-weight: 700; letter-spacing: .07em; }
.game-sidebar .highlight-card.highlight-card-power .highlight-label { color: #bacbe1; font-weight: 700; letter-spacing: .07em; }
.game-sidebar .highlight-value-number {
    display: block;
    min-width: 0;
    color: #f1e5c9;
    font-family: Inter, Arial, sans-serif;
    font-size: 16px;
    font-weight: 800;
    font-variant-numeric: tabular-nums lining-nums;
    line-height: 1.1;
    letter-spacing: .015em;
    white-space: nowrap;
    text-shadow: 0 1px 3px rgba(0, 0, 0, .8);
}
.game-sidebar .highlight-card-gold .highlight-value-number { color: #ffd875; text-shadow: 0 0 12px rgba(230, 187, 82, .25), 0 1px 3px #000; }
.game-sidebar .highlight-card-power .highlight-value-number { color: #d6e6fb; text-shadow: 0 0 12px rgba(153, 179, 212, .23), 0 1px 3px #000; }
.game-sidebar .highlight-value-number.is-long-number { font-size: 13px; letter-spacing: -.025em; }
.game-sidebar .highlight-value-number.is-very-long-number { font-size: 11px; letter-spacing: -.04em; }

@media (max-width: 900px) {
    .game-sidebar .highlight-value-number { font-size: clamp(10px, 3vw, 13px); }
    .game-sidebar .highlight-value-number.is-long-number { font-size: clamp(9px, 2.5vw, 11px); }
    .game-sidebar .highlight-value-number.is-very-long-number { font-size: clamp(8px, 2.15vw, 9.5px); }
}


/* A etiqueta de poder encolhe com o valor para preservar espaço sobre o sprite. */
.badge-atk.badge-atk-long {
    min-width: 22px;
    padding-right: 4px;
    padding-left: 4px;
    font-size: 8px;
    letter-spacing: -.025em;
    font-variant-numeric: tabular-nums;
}
.badge-atk.badge-atk-very-long {
    min-width: 24px;
    padding-right: 3px;
    padding-left: 3px;
    font-size: 7px;
    letter-spacing: -.045em;
    font-variant-numeric: tabular-nums;
}


/* Contratos do reino em tempo real */
.timed-contracts-box {
    display: grid;
    gap: 14px;
    margin-bottom: 18px;
}

.timed-contracts-header {
    align-items: flex-start;
    margin-bottom: 0;
}

.timed-contracts-intro {
    max-width: 680px;
    margin: 8px 0 0;
}

.timed-contracts-refresh {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    min-height: 40px;
    padding: 8px 12px;
    color: var(--text);
    background: rgba(8, 17, 29, 0.72);
    border: 1px solid var(--theme-border-soft);
    border-radius: 11px;
    cursor: pointer;
    white-space: nowrap;
}

.timed-contracts-refresh:hover:not(:disabled) {
    border-color: var(--accent);
    color: #ffe0a0;
}

.timed-contracts-refresh:disabled {
    opacity: 0.55;
    cursor: wait;
}

.timed-contracts-status {
    min-height: 22px;
    margin: 0;
    color: #b9c9d8;
    font-size: 13px;
}

.timed-contracts-status.is-error {
    color: #ff9b8f;
}

.timed-contracts-status.is-success {
    color: #93f7c7;
}

.timed-contracts-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(min(230px, 100%), 1fr));
    gap: 12px;
}

.timed-contract-card {
    display: flex;
    min-width: 0;
    flex-direction: column;
    gap: 12px;
    padding: 15px;
    background: linear-gradient(160deg, rgba(7, 18, 29, 0.82), var(--theme-card));
    border: 1px solid var(--theme-border-soft);
    border-radius: 15px;
}

.timed-contract-card.is-active {
    grid-column: 1 / -1;
    border-color: rgba(243, 181, 68, 0.72);
    box-shadow: inset 0 0 0 1px rgba(243, 181, 68, 0.12), 0 10px 25px rgba(0, 0, 0, 0.18);
}

.timed-contract-topline,
.timed-contract-reward-row,
.timed-contract-actions {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
}

.timed-contract-duration {
    display: inline-flex;
    align-items: center;
    gap: 7px;
    padding: 5px 9px;
    color: #c7e2d1;
    background: rgba(71, 153, 104, 0.15);
    border: 1px solid rgba(102, 194, 135, 0.25);
    border-radius: 999px;
    font-size: 12px;
    font-weight: 800;
}

.timed-contract-state {
    color: #f2cf82;
    font-size: 12px;
    font-weight: 800;
    text-align: right;
}

.timed-contract-name {
    margin: 0;
    color: #f4ead6;
    font-size: 17px;
    line-height: 1.25;
}

.timed-contract-description {
    margin: -5px 0 0;
    color: var(--muted);
    font-size: 13px;
}

.timed-contract-reward-row {
    padding-top: 9px;
    border-top: 1px solid rgba(255, 255, 255, 0.08);
    color: var(--muted);
    font-size: 13px;
}

.timed-contract-reward-row strong {
    color: #ffd477;
    font-size: 15px;
    white-space: nowrap;
}

.timed-contract-progress-wrap {
    display: grid;
    gap: 7px;
}

.timed-contract-progress-track {
    width: 100%;
    height: 9px;
    overflow: hidden;
    background: rgba(0, 0, 0, 0.42);
    border: 1px solid rgba(255, 255, 255, 0.08);
    border-radius: 999px;
}

.timed-contract-progress-fill {
    width: 0;
    height: 100%;
    background: linear-gradient(90deg, #4dbb83, #e8bf61);
    border-radius: inherit;
    transition: width 0.35s linear;
}

.timed-contract-clock {
    color: #f8e9c3;
    font-variant-numeric: tabular-nums;
    font-size: clamp(22px, 4vw, 30px);
    font-weight: 800;
    letter-spacing: 0.06em;
    line-height: 1;
}

.timed-contract-cancel-note {
    margin: -2px 0 0;
    color: #aab8c7;
    font-size: 12px;
}

.timed-contract-actions {
    flex-wrap: wrap;
    justify-content: flex-start;
}

.timed-contract-actions .btn-explorar,
.timed-contract-actions .btn-forja {
    min-height: 40px;
    padding: 9px 13px;
}

.timed-contract-actions button:disabled {
    opacity: 0.52;
    cursor: not-allowed;
    filter: saturate(0.55);
}

.timed-contract-empty {
    grid-column: 1 / -1;
    margin: 0;
    padding: 16px;
    color: var(--muted);
    background: rgba(0, 0, 0, 0.18);
    border: 1px dashed var(--theme-border-soft);
    border-radius: 13px;
}

@media (max-width: 640px) {
    .timed-contracts-header {
        flex-direction: column;
        gap: 12px;
    }

    .timed-contracts-refresh {
        width: 100%;
    }

    .timed-contracts-grid {
        grid-template-columns: minmax(0, 1fr);
    }

    .timed-contract-card.is-active {
        grid-column: auto;
    }
}


/* Nova moeda: Scripta prateada */
.highlight-card-scripta {
    grid-column: 1 / -1;
    grid-template-columns: minmax(0, 1fr) auto;
    align-items: center;
    border-color: rgba(195, 211, 224, 0.46);
    background: linear-gradient(115deg, rgba(159, 177, 194, 0.14), rgba(255, 255, 255, 0.025) 64%, rgba(5, 12, 15, 0.62));
    box-shadow: inset 0 0 14px rgba(204, 220, 232, 0.045), 0 0 12px rgba(168, 192, 211, 0.06);
}

.highlight-card-scripta .highlight-label {
    color: #c6d2dc;
}

.highlight-card-scripta .highlight-label i {
    margin-right: 5px;
    color: #d5e0ea;
}

.highlight-card-scripta .highlight-value {
    color: #edf3f8;
    text-shadow: 0 0 12px rgba(197, 216, 232, 0.28);
}

.timed-contract-reward-values {
    display: inline-flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: flex-end;
    gap: 6px 12px;
}

.timed-contract-reward-row .timed-contract-reward-scripta {
    color: #dce6ee;
    text-shadow: 0 0 10px rgba(194, 213, 228, 0.2);
}

@media (max-width: 640px) {
    .timed-contract-reward-row {
        align-items: flex-start;
    }

    .timed-contract-reward-values {
        justify-content: flex-end;
    }
}


/* Oficina Real de Elixires — metal, vidro alquímico e prata do reino. */
.workshop-screen {
    display: grid;
    gap: 12px;
    margin-bottom: 18px;
    color: #e8dfcc;
}
.workshop-screen[hidden] { display: none !important; }
.workshop-screen-header,
.workshop-vessel-panel,
.workshop-upgrade-panel,
.workshop-recipes-panel {
    border: 1px solid rgba(185, 144, 77, .48);
    border-radius: 4px;
    background: linear-gradient(145deg, rgba(18, 34, 29, .98), rgba(6, 14, 12, .98));
    box-shadow: inset 0 0 0 3px rgba(0, 0, 0, .28), 0 9px 25px rgba(0, 0, 0, .22);
}
.workshop-screen-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 18px;
    padding: 18px 20px;
    border-top: 2px solid #b9904d;
    background: radial-gradient(ellipse at 8% 50%, rgba(86, 119, 78, .24), transparent 38%), linear-gradient(110deg, #111e19, #080f0d 75%);
}
.workshop-eyebrow,
.workshop-panel-kicker {
    color: #e0c178;
    font-family: Cinzel, Georgia, serif;
    font-size: 10px;
    font-weight: 700;
    letter-spacing: .09em;
    text-transform: uppercase;
}
.workshop-eyebrow { display: inline-flex; align-items: center; gap: 7px; }
.workshop-eyebrow i { color: #b6d6c4; font-size: 13px; }
.workshop-screen-header h2 {
    margin: 5px 0 4px;
    color: #f0e2c2;
    font-family: Cinzel, Georgia, serif;
    font-size: clamp(21px, 2.4vw, 31px);
}
.workshop-screen-header p { max-width: 780px; margin: 0; color: #c2b9a6; font-size: 12px; line-height: 1.5; }
.workshop-heading-actions { display: flex; flex: 0 0 auto; flex-wrap: wrap; justify-content: flex-end; gap: 8px; }
.workshop-heading-actions button { min-height: 38px; padding: 8px 12px; }
.workshop-feedback {
    min-height: 18px;
    margin: 0;
    padding: 0 3px;
    color: #d5c8ae;
    font-size: 11px;
}
.workshop-feedback.is-error { color: #ff9b8f; }
.workshop-feedback.is-success { color: #a7dbb0; }
.workshop-summary { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 8px; }
.workshop-summary-card {
    display: flex;
    min-width: 0;
    align-items: center;
    gap: 10px;
    padding: 11px 13px;
    border: 1px solid rgba(185, 144, 77, .27);
    border-left: 3px solid #a78349;
    background: linear-gradient(135deg, rgba(30, 43, 35, .94), rgba(9, 16, 13, .97));
}
.workshop-summary-card > i { color: #d5b76f; font-size: 16px; }
.workshop-summary-card > div { display: grid; min-width: 0; gap: 3px; }
.workshop-summary-card span { color: #b4aa95; font-size: 9px; letter-spacing: .06em; text-transform: uppercase; }
.workshop-summary-card strong { overflow: hidden; color: #efe3ca; font-family: Cinzel, Georgia, serif; font-size: 13px; text-overflow: ellipsis; white-space: nowrap; }
.workshop-summary-silver { border-color: rgba(194, 211, 224, .35); border-left-color: #c4d0dc; background: linear-gradient(120deg, rgba(87, 107, 123, .2), rgba(9, 16, 18, .97)); }
.workshop-summary-silver > i, .workshop-summary-silver strong { color: #dce7ef; }
.workshop-layout { display: grid; grid-template-columns: minmax(0, 1.45fr) minmax(250px, .75fr); align-items: stretch; gap: 12px; }
.workshop-vessel-panel, .workshop-upgrade-panel, .workshop-recipes-panel { padding: 16px; }
.workshop-section-heading { display: flex; align-items: flex-start; justify-content: space-between; gap: 12px; margin-bottom: 13px; }
.workshop-section-heading h3,
.workshop-upgrade-panel h3 {
    display: flex;
    align-items: center;
    gap: 8px;
    margin: 5px 0 0;
    color: #eadbb8;
    font-family: Cinzel, Georgia, serif;
    font-size: 16px;
}
.workshop-section-heading h3 i,
.workshop-upgrade-panel h3 i { color: #d7b564; font-size: 14px; }
.workshop-current-batch {
    display: grid;
    grid-template-columns: 54px minmax(0, 1fr) auto;
    align-items: center;
    gap: 12px;
    padding: 12px;
    border: 1px solid rgba(170, 199, 182, .22);
    background: radial-gradient(ellipse at 12% 50%, rgba(74, 133, 110, .18), transparent 55%), rgba(0, 0, 0, .23);
}
.workshop-flask-mark {
    display: grid;
    width: 50px;
    height: 50px;
    place-items: center;
    border: 1px solid rgba(165, 203, 182, .54);
    border-radius: 50%;
    background: radial-gradient(circle at 50% 62%, rgba(70, 163, 124, .36), rgba(13, 35, 27, .88) 68%);
    box-shadow: inset 0 0 14px rgba(81, 184, 140, .15), 0 0 15px rgba(75, 156, 121, .11);
    color: #b5dfc8;
    font-size: 21px;
}
.workshop-batch-copy { display: grid; min-width: 0; gap: 4px; }
.workshop-batch-copy > strong { overflow: hidden; color: #f0e6ce; font-family: Cinzel, Georgia, serif; font-size: 15px; text-overflow: ellipsis; }
.workshop-batch-copy > span:last-child { color: #b7c7b9; font-size: 10px; }
.workshop-batch-copy > span.is-paused { color: #f0c888; }
.workshop-batch-clock { display: grid; justify-items: end; gap: 4px; }
.workshop-batch-clock span { color: #aa9e87; font-size: 9px; text-transform: uppercase; }
.workshop-batch-clock strong { color: #f0d48e; font-family: Inter, Arial, sans-serif; font-size: clamp(17px, 2vw, 23px); font-variant-numeric: tabular-nums; letter-spacing: .05em; white-space: nowrap; }
.workshop-progress-wrap, .workshop-storage-wrap { display: grid; gap: 6px; margin-top: 14px; }
.workshop-progress-label { display: flex; align-items: center; justify-content: space-between; gap: 10px; color: #b9b09b; font-size: 10px; }
.workshop-progress-label strong { color: #e6d7b8; font-size: 10px; text-align: right; }
.workshop-progress-track, .workshop-storage-track { height: 10px; overflow: hidden; border: 1px solid rgba(210, 187, 131, .25); background: rgba(0, 0, 0, .45); }
.workshop-progress-fill { width: 0; height: 100%; background: linear-gradient(90deg, #397b64, #86b889, #d0bb71); box-shadow: 0 0 10px rgba(104, 184, 137, .25); transition: width .45s linear; }
.workshop-storage-track { height: 7px; border-color: rgba(185, 144, 77, .22); }
.workshop-storage-fill { width: 0; height: 100%; background: linear-gradient(90deg, #8d6936, #d3b465); transition: width .3s ease; }
.workshop-rule-note { display: flex; align-items: flex-start; gap: 7px; margin: 12px 0 0; color: #aaa28f; font-size: 10px; line-height: 1.45; }
.workshop-rule-note i { margin-top: 2px; color: #d1b56d; }
.workshop-upgrade-panel { display: flex; flex-direction: column; align-items: flex-start; background: radial-gradient(ellipse at 90% 5%, rgba(112, 129, 142, .16), transparent 48%), linear-gradient(145deg, rgba(21, 32, 34, .97), rgba(8, 14, 13, .99)); }
.workshop-upgrade-copy { min-height: 54px; margin: 10px 0 14px; color: #c1b9a7; font-size: 11px; line-height: 1.55; }
.workshop-upgrade-button {
    width: 100%;
    min-height: 42px;
    margin-top: auto;
    padding: 9px 12px;
    border: 1px solid rgba(206, 221, 233, .56);
    background: linear-gradient(180deg, #667985, #34434a 58%, #202b30);
    box-shadow: inset 0 1px rgba(255, 255, 255, .13), 0 4px 10px rgba(0, 0, 0, .3);
    color: #eef4f7;
    font-family: Cinzel, Georgia, serif;
    font-size: 11px;
    font-weight: 700;
    cursor: pointer;
}
.workshop-upgrade-button:hover:not(:disabled) { filter: brightness(1.15); }
.workshop-upgrade-button:disabled { opacity: .52; cursor: not-allowed; }
.workshop-recipes-note { padding-top: 8px; color: #b4a990; font-size: 10px; }
.workshop-recipe-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; }
.workshop-recipe-card {
    display: grid;
    min-width: 0;
    gap: 10px;
    padding: 12px;
    border: 1px solid rgba(185, 144, 77, .28);
    border-left: 3px solid #8e764a;
    background: linear-gradient(145deg, rgba(23, 34, 28, .86), rgba(7, 13, 11, .95));
}
.workshop-recipe-card.is-active { border-color: rgba(125, 184, 145, .58); border-left-color: #77b78e; box-shadow: inset 0 0 16px rgba(68, 133, 97, .08); }
.workshop-recipe-card.is-locked { filter: saturate(.55); }
.workshop-recipe-topline { display: flex; align-items: center; gap: 10px; min-width: 0; }
.workshop-recipe-topline > i { display: grid; width: 38px; height: 38px; flex: 0 0 auto; place-items: center; border: 1px solid rgba(160, 199, 177, .36); border-radius: 50%; background: rgba(53, 110, 82, .19); color: #afd5bf; font-size: 16px; }
.workshop-recipe-identity { display: grid; min-width: 0; gap: 3px; }
.workshop-recipe-identity h4 { margin: 0; color: #eddfc2; font-family: Cinzel, Georgia, serif; font-size: 12px; }
.workshop-recipe-heal { color: #a8d5b7; font-size: 10px; }
.workshop-recipe-stock { display: flex; align-items: center; justify-content: space-between; gap: 8px; padding-top: 8px; border-top: 1px solid rgba(255, 255, 255, .08); color: #b0a78f; font-size: 10px; }
.workshop-recipe-stock strong { color: #e6d8bb; font-size: 11px; }
.workshop-recipe-actions { display: flex; flex-wrap: wrap; gap: 7px; }
.workshop-recipe-actions button { flex: 1 1 130px; min-height: 35px; padding: 7px 9px; border: 1px solid rgba(185, 144, 77, .44); background: linear-gradient(180deg, #384a3f, #18251f); color: #e8dfcb; font-size: 10px; cursor: pointer; }
.workshop-recipe-actions .workshop-recipe-collect { border-color: rgba(196, 213, 226, .44); background: linear-gradient(180deg, #52616a, #252e33); color: #e4edf2; }
.workshop-recipe-actions button:hover:not(:disabled) { filter: brightness(1.2); }
.workshop-recipe-actions button:disabled { opacity: .48; cursor: not-allowed; }
body[data-page-theme="oficina"] .mobile-nav-btn[data-page="oficina"] { border-color: #c8b06d; color: #fff0c1; }

@media (max-width: 900px) {
    .workshop-summary { grid-template-columns: repeat(2, minmax(0, 1fr)); }
    .workshop-layout { grid-template-columns: minmax(0, 1fr); }
}
@media (max-width: 640px) {
    .workshop-screen { gap: 9px; }
    .workshop-screen-header { align-items: stretch; flex-direction: column; gap: 12px; padding: 14px; }
    .workshop-screen-header p { font-size: 11px; }
    .workshop-heading-actions { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); }
    .workshop-heading-actions button { width: 100%; min-width: 0; padding: 8px 5px; font-size: 10px; }
    .workshop-summary { gap: 6px; }
    .workshop-summary-card { gap: 7px; padding: 9px 8px; }
    .workshop-summary-card > i { font-size: 13px; }
    .workshop-summary-card span { font-size: 8px; }
    .workshop-summary-card strong { font-size: 10px; }
    .workshop-vessel-panel, .workshop-upgrade-panel, .workshop-recipes-panel { padding: 12px; }
    .workshop-current-batch { grid-template-columns: 42px minmax(0, 1fr); gap: 8px; padding: 9px; }
    .workshop-flask-mark { width: 40px; height: 40px; font-size: 17px; }
    .workshop-batch-copy > strong { font-size: 12px; }
    .workshop-batch-clock { grid-column: 1 / -1; display: flex; align-items: center; justify-content: space-between; padding-top: 7px; border-top: 1px solid rgba(255, 255, 255, .08); }
    .workshop-batch-clock strong { font-size: 18px; }
    .workshop-section-heading h3, .workshop-upgrade-panel h3 { font-size: 14px; }
    .workshop-recipe-grid { grid-template-columns: minmax(0, 1fr); }
    .workshop-recipes-note { max-width: 105px; text-align: right; }
    .workshop-feedback { font-size: 10px; }
}


/* Oficina reorganizada: Fábrica Real à esquerda, Caldeirão/depósito à direita. */
.workshop-screen-header,
.workshop-factory-panel,
.workshop-depot-panel {
    border: 1px solid rgba(185, 144, 77, .48);
    border-radius: 4px;
    background: linear-gradient(145deg, rgba(18, 34, 29, .98), rgba(6, 14, 12, .98));
    box-shadow: inset 0 0 0 3px rgba(0, 0, 0, .28), 0 9px 25px rgba(0, 0, 0, .22);
}
.workshop-wallet-summary { display: flex; flex-wrap: wrap; justify-content: flex-end; gap: 8px; }
.workshop-wallet-card {
    display: grid;
    grid-template-columns: 20px auto auto;
    align-items: center;
    gap: 8px;
    min-width: 136px;
    padding: 8px 11px;
    border: 1px solid rgba(222, 178, 82, .37);
    background: linear-gradient(125deg, rgba(91, 62, 22, .34), rgba(9, 16, 13, .93));
}
.workshop-wallet-card > i { color: #e3bb65; }
.workshop-wallet-card > span { color: #c4b79e; font-size: 10px; text-transform: uppercase; letter-spacing: .06em; }
.workshop-wallet-card > strong { color: #f2d58f; font-size: 12px; font-variant-numeric: tabular-nums; }
.workshop-wallet-silver { border-color: rgba(194, 211, 224, .38); background: linear-gradient(125deg, rgba(87, 107, 123, .23), rgba(9, 16, 18, .96)); }
.workshop-wallet-silver > i, .workshop-wallet-silver > strong { color: #dce7ef; }
.workshop-layout { grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); align-items: stretch; }
.workshop-factory-panel, .workshop-depot-panel { display: flex; min-width: 0; flex-direction: column; gap: 12px; padding: 16px; }
.workshop-section-heading { align-items: center; margin-bottom: 0; }
.workshop-section-heading h3 { font-size: 17px; }
.workshop-section-heading h4 { margin: 4px 0 0; color: #eadbb8; font-family: Cinzel, Georgia, serif; font-size: 14px; }
.workshop-factory-metrics { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px; }
.workshop-factory-metrics > div { display: grid; gap: 5px; padding: 9px 11px; border: 1px solid rgba(185, 144, 77, .25); background: rgba(0, 0, 0, .2); }
.workshop-factory-metrics span { color: #b4aa95; font-size: 9px; letter-spacing: .07em; text-transform: uppercase; }
.workshop-factory-metrics strong { color: #f0d48e; font-family: Cinzel, Georgia, serif; font-size: 14px; }
.workshop-current-batch { margin-top: 0; }
.workshop-recipe-picker { display: grid; gap: 9px; padding: 11px; border: 1px solid rgba(185, 144, 77, .24); background: rgba(0, 0, 0, .19); }
.workshop-recipe-picker .workshop-section-heading { align-items: flex-end; }
.workshop-recipe-picker .workshop-recipes-note { padding: 0 0 2px; }
.workshop-recipe-buttons { display: grid; gap: 7px; }
.workshop-recipe-choice {
    display: grid;
    grid-template-columns: 34px minmax(0, 1fr) auto;
    align-items: center;
    gap: 9px;
    min-width: 0;
    padding: 9px 10px;
    border: 1px solid rgba(184, 146, 76, .31);
    background: linear-gradient(100deg, rgba(15, 29, 22, .94), rgba(7, 13, 11, .98));
    color: #e7dec9;
    text-align: left;
    cursor: pointer;
}
.workshop-recipe-choice > i { display: grid; width: 32px; height: 32px; place-items: center; border: 1px solid rgba(160, 199, 177, .36); border-radius: 50%; background: rgba(53, 110, 82, .19); color: #afd5bf; }
.workshop-recipe-choice-copy { display: grid; min-width: 0; gap: 3px; }
.workshop-recipe-choice-copy strong { color: #eddfc2; font-family: Cinzel, Georgia, serif; font-size: 11px; }
.workshop-recipe-choice-copy small { color: #aeb9ac; font-size: 9px; }
.workshop-recipe-choice-state { padding: 4px 6px; border: 1px solid rgba(184, 146, 76, .24); color: #c6b58e; font-size: 8px; text-transform: uppercase; letter-spacing: .04em; white-space: nowrap; }
.workshop-recipe-choice.is-active { border-color: rgba(125, 184, 145, .58); box-shadow: inset 3px 0 #77b78e; }
.workshop-recipe-choice.is-active .workshop-recipe-choice-state { border-color: rgba(125, 184, 145, .35); color: #a9d5b6; }
.workshop-recipe-choice.is-locked { filter: saturate(.55); opacity: .67; }
.workshop-recipe-choice:hover:not(:disabled) { border-color: #c2a45f; filter: brightness(1.14); }
.workshop-recipe-choice:disabled { cursor: default; }
.workshop-upgrade-block { display: grid; gap: 8px; margin-top: auto; padding-top: 12px; border-top: 1px solid rgba(255, 255, 255, .08); }
.workshop-upgrade-block .workshop-upgrade-copy { min-height: 0; margin: 0; }
.workshop-depot-intro { margin: -5px 0 0; color: #b4aa95; font-size: 10px; line-height: 1.5; }
.workshop-capacity-badge { flex: 0 0 auto; padding: 6px 8px; border: 1px solid rgba(207, 175, 101, .38); color: #f0d48e; font-size: 10px; white-space: nowrap; }
.workshop-storage-wrap { margin-top: 0; }
.workshop-storage-slots { display: grid; grid-template-columns: repeat(auto-fill, minmax(84px, 1fr)); gap: 8px; min-height: 112px; padding: 10px; border: 1px solid rgba(142, 112, 61, .31); background: repeating-linear-gradient(135deg, rgba(34, 27, 15, .34), rgba(34, 27, 15, .34) 8px, rgba(9, 14, 12, .58) 8px, rgba(9, 14, 12, .58) 16px); }
.workshop-storage-slot { position: relative; display: grid; min-width: 0; min-height: 104px; align-content: center; justify-items: center; gap: 6px; padding: 8px 5px; border: 1px solid rgba(181, 154, 103, .25); background: linear-gradient(160deg, rgba(18, 28, 24, .95), rgba(7, 12, 10, .98)); color: #e6ddca; }
button.workshop-storage-slot { cursor: pointer; }
button.workshop-storage-slot:hover { border-color: rgba(221, 190, 116, .78); transform: translateY(-1px); }
.workshop-storage-slot.is-selected { border: 1px solid #e1c276; box-shadow: inset 0 0 0 1px rgba(225, 194, 118, .25), 0 0 12px rgba(225, 194, 118, .14); }
.workshop-storage-slot.is-over-capacity { border-color: rgba(225, 130, 101, .72); }
.workshop-storage-slot.is-empty { border-style: dashed; background: rgba(0, 0, 0, .18); color: rgba(191, 177, 148, .42); font-size: 10px; }
.workshop-slot-vial { color: #8ed5af; font-size: 29px; filter: drop-shadow(0 0 7px rgba(84, 195, 134, .35)); }
.workshop-storage-slot.is-over-capacity .workshop-slot-vial { color: #e6a07f; }
.workshop-slot-name { max-width: 100%; overflow: hidden; color: #ebdfc4; font-size: 9px; text-overflow: ellipsis; white-space: nowrap; }
.workshop-slot-number { color: #a59b85; font-size: 8px; }
.workshop-storage-overflow { margin: -4px 0 0; padding: 8px 9px; border-left: 2px solid #dc8e6e; background: rgba(102, 45, 31, .18); color: #f0b8a1; font-size: 10px; line-height: 1.45; }
.workshop-selected-item { display: grid; gap: 5px; padding: 10px 11px; border: 1px solid rgba(185, 144, 77, .25); background: rgba(0, 0, 0, .2); }
.workshop-selected-item > strong { color: #f0e2c2; font-family: Cinzel, Georgia, serif; font-size: 12px; }
.workshop-selected-item > span:not(.workshop-panel-kicker) { color: #d0c4a8; font-size: 10px; line-height: 1.4; }
.workshop-selected-item > small { color: #aeb9c2; font-size: 9px; }
.workshop-depot-actions { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px; }
.workshop-depot-button { min-height: 40px; padding: 8px 9px; border: 1px solid rgba(197, 216, 231, .38); background: linear-gradient(180deg, #536771, #263238); color: #f0f5f7; font-size: 10px; font-weight: 700; cursor: pointer; }
.workshop-depot-button i { margin-right: 5px; }
.workshop-sell-button { border-color: rgba(220, 180, 89, .52); background: linear-gradient(180deg, #785a2e, #382818); color: #ffe4a7; }
.workshop-depot-button:hover:not(:disabled) { filter: brightness(1.17); }
.workshop-depot-button:disabled { opacity: .48; cursor: not-allowed; }
.workshop-storage-upgrade-block { margin-top: 0; }
.workshop-heading-actions .btn-forja { border-color: rgba(185, 144, 77, .55); background: linear-gradient(180deg, #3a4b3e, #19251e); color: #f0e2c2; }
.market-item-stock { margin: -3px 0 9px; color: #93cba9; font-size: 10px; font-weight: 700; }
.market-item-stock-import { color: #f0b95f; }
.market-buy-actions .market-buy-button-import:not(:disabled) { border-color: rgba(240, 185, 95, .82); background: linear-gradient(180deg, #67451f, #382719); color: #ffe0a1; }
.market-buy-actions .market-buy-button-import:hover:not(:disabled) { border-color: #ffe0a1; background: linear-gradient(180deg, #805729, #48321d); box-shadow: 0 0 10px rgba(240, 185, 95, .22); }
.market-buy-button:disabled { opacity: .5; cursor: not-allowed; }

@media (max-width: 900px) {
    .workshop-layout { grid-template-columns: minmax(0, 1fr); }
}
@media (max-width: 640px) {
    .workshop-wallet-summary { justify-content: stretch; }
    .workshop-wallet-card { flex: 1 1 140px; grid-template-columns: 18px 1fr auto; min-width: 0; padding: 8px; }
    .workshop-factory-panel, .workshop-depot-panel { gap: 10px; padding: 12px; }
    .workshop-factory-metrics strong { font-size: 12px; }
    .workshop-current-batch { grid-template-columns: 42px minmax(0, 1fr); }
    .workshop-recipe-choice { grid-template-columns: 30px minmax(0, 1fr) auto; gap: 7px; padding: 8px; }
    .workshop-recipe-choice > i { width: 29px; height: 29px; }
    .workshop-recipe-choice-copy strong { font-size: 10px; }
    .workshop-recipe-choice-state { padding: 4px; font-size: 7px; }
    .workshop-storage-slots { grid-template-columns: repeat(auto-fill, minmax(74px, 1fr)); gap: 6px; padding: 8px; }
    .workshop-storage-slot { min-height: 93px; }
    .workshop-depot-actions { grid-template-columns: minmax(0, 1fr); }
    .workshop-depot-button { width: 100%; }
}

/* Banco do Reino: câmbio de moedas e transparência da reserva. */
.bank-page { grid-template-columns: minmax(0, 1fr); align-content: start; gap: 11px; }
.bank-main-panel, .bank-history-panel { display: grid; gap: 14px; padding: 18px; border: 1px solid rgba(185, 144, 77, .36); background: radial-gradient(ellipse at 92% 0%, rgba(125, 98, 48, .15), transparent 42%), linear-gradient(145deg, rgba(19, 27, 21, .98), rgba(7, 13, 11, .98)); }
.bank-page-header { display: flex; align-items: center; justify-content: space-between; gap: 16px; padding-bottom: 12px; border-bottom: 1px solid rgba(185, 144, 77, .24); }
.bank-page-header > div { min-width: 0; }
.bank-eyebrow, .bank-card-kicker { color: #c5a85f; font-size: 9px; font-weight: 700; letter-spacing: .13em; text-transform: uppercase; }
.bank-eyebrow i { margin-right: 5px; }
.bank-page-header h2 { margin: 5px 0 4px; color: #f0dfba; font-family: Cinzel, Georgia, serif; font-size: clamp(20px, 3vw, 27px); }
.bank-page-header p { max-width: 650px; margin: 0; color: #b8ae98; font-size: 11px; line-height: 1.5; }
.bank-refresh { flex: 0 0 auto; min-height: 36px; padding: 7px 10px; border: 1px solid rgba(185, 144, 77, .5); background: linear-gradient(180deg, #34453a, #18241c); color: #e5d5b1; font-size: 10px; cursor: pointer; }
.bank-refresh i { margin-right: 5px; color: #d6b566; }
.bank-asset-summary { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 8px; }
.bank-asset-card { display: grid; grid-template-columns: 20px minmax(0, 1fr); align-items: center; column-gap: 8px; row-gap: 3px; min-width: 0; padding: 10px 11px; border: 1px solid rgba(185, 144, 77, .28); background: rgba(0, 0, 0, .24); }
.bank-asset-card > i { grid-row: span 2; color: #d6b566; font-size: 15px; }
.bank-asset-card > span { color: #aaa18f; font-size: 9px; }
.bank-asset-card > strong { overflow-wrap: anywhere; color: #f1e4c8; font-size: 13px; font-variant-numeric: tabular-nums; }
.bank-asset-scripta > i { color: #c7c9ce; }
.bank-asset-reserve > i { color: #8fc1a0; }
.bank-feedback { min-height: 0; margin: 0; color: #b9c8b5; font-size: 10px; line-height: 1.45; }
.bank-feedback:empty { display: none; }
.bank-feedback.is-error { color: #ffaaa0; }
.bank-feedback.is-success { color: #9de0ae; }
.bank-exchange-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; }
.bank-exchange-card { display: grid; align-content: start; gap: 8px; min-width: 0; padding: 14px; border: 1px solid rgba(185, 144, 77, .34); background: linear-gradient(150deg, rgba(25, 34, 27, .92), rgba(8, 14, 11, .97)); }
.bank-buy-card { border-top: 2px solid #8bb89a; }
.bank-sell-card { border-top: 2px solid #c6a75e; }
.bank-exchange-card h3 { margin: 0; color: #ecdfc2; font-family: Cinzel, Georgia, serif; font-size: 15px; }
.bank-exchange-card h3 i { margin-right: 5px; color: #d6b566; font-size: 12px; }
.bank-rate-line { margin: 0; color: #cfc5ae; font-size: 11px; }
.bank-rate-line strong { color: #f0d48e; font-size: 13px; }
.bank-fee-line { margin: -5px 0 2px; color: #a99f8b; font-size: 9px; line-height: 1.4; }
.bank-exchange-card label { margin-top: 2px; color: #d7c9a9; font-size: 10px; }
.bank-exchange-card input { width: 100%; min-height: 39px; padding: 8px 10px; border: 1px solid rgba(185, 144, 77, .46); background: #07100c; color: #f3e6c9; font-size: 14px; font-variant-numeric: tabular-nums; }
.bank-conversion-preview { min-height: 30px; margin: 0; padding: 8px; border-left: 2px solid #c9a457; background: rgba(0, 0, 0, .2); color: #f1d88f; font-size: 10px; line-height: 1.45; }
.bank-conversion-preview.is-muted { color: #a99f8b; }
.bank-convert-button { min-height: 40px; padding: 8px 10px; border: 1px solid rgba(213, 176, 95, .58); background: linear-gradient(180deg, #72572d, #382a18); color: #fff0c1; font-family: Cinzel, Georgia, serif; font-size: 10px; font-weight: 700; cursor: pointer; }
.bank-convert-button:hover:not(:disabled) { filter: brightness(1.15); }
.bank-convert-button:disabled, .bank-refresh:disabled { opacity: .45; cursor: not-allowed; }
.bank-exchange-card > small { color: #aaa18f; font-size: 9px; line-height: 1.45; }
.bank-reserve-note { display: flex; align-items: flex-start; gap: 8px; padding: 10px; border: 1px solid rgba(143, 193, 160, .22); background: rgba(41, 78, 55, .13); color: #b9c9b3; font-size: 10px; line-height: 1.5; }
.bank-reserve-note i { margin-top: 2px; color: #cbb36f; }
.bank-history-heading { display: flex; align-items: center; justify-content: space-between; gap: 10px; }
.bank-history-heading h3 { margin: 4px 0 0; color: #e9ddc3; font-family: Cinzel, Georgia, serif; font-size: 15px; }
.bank-history-list { display: grid; gap: 6px; }
.bank-history-row { display: grid; grid-template-columns: minmax(0, 1fr) auto; align-items: center; gap: 8px; padding: 9px 10px; border: 1px solid rgba(185, 144, 77, .18); background: rgba(0, 0, 0, .2); }
.bank-history-copy { display: grid; gap: 3px; min-width: 0; }
.bank-history-copy strong { color: #e8ddc5; font-size: 10px; }
.bank-history-copy small { color: #a89e88; font-size: 9px; }
.bank-history-delta { color: #cfdac7; font-size: 10px; text-align: right; }
.bank-history-empty { margin: 0; padding: 12px; border: 1px dashed rgba(185, 144, 77, .25); color: #a99f8b; font-size: 10px; text-align: center; }
body[data-page-theme="banco"] .mobile-nav-btn[data-page="banco"] { border-color: #c8b06d; color: #fff0c1; }
@media (max-width: 640px) {
    .bank-main-panel, .bank-history-panel { gap: 11px; padding: 12px; }
    .bank-page-header { align-items: stretch; flex-direction: column; }
    .bank-refresh { width: 100%; }
    .bank-asset-card { grid-template-columns: 16px minmax(0, 1fr); column-gap: 5px; padding: 8px 6px; }
    .bank-asset-card > i { font-size: 12px; }
    .bank-asset-card > span { font-size: 8px; }
    .bank-asset-card > strong { font-size: 10px; }
    .bank-exchange-grid { grid-template-columns: minmax(0, 1fr); }
    .bank-exchange-card { padding: 11px; }
}
@media (max-width: 380px) {
    .bank-asset-summary { grid-template-columns: minmax(0, 1fr); }
    .bank-asset-card { grid-template-columns: 20px minmax(0, 1fr); }
    .bank-asset-card > i { font-size: 15px; }
    .bank-asset-card > span, .bank-asset-card > strong { font-size: 10px; }
}

/* Seleção de personagens: mesma atmosfera do Reino, sem alterar a lógica da conta. */
.selection-page { min-height: 100vh; padding: 0 14px 28px; background: radial-gradient(ellipse at 50% 0%, rgba(61, 91, 68, .24), transparent 48%), linear-gradient(180deg, #0a1513, #06100f 72%); }
.selection-page .selection-topbar { display: flex; align-items: center; justify-content: space-between; gap: 18px; width: min(980px, 100%); min-height: 74px; margin: 0 auto; padding: 8px 4px 7px; border-bottom: 1px solid var(--reino-line); }
.selection-page .selection-brand { display: inline-flex; align-items: center; }
.selection-page .selection-brand .site-logo { width: 178px; height: auto; }
.selection-page .selection-account { display: flex; align-items: center; gap: 8px; color: var(--reino-muted); font-family: Cinzel, Georgia, serif; font-size: 10px; letter-spacing: .04em; text-transform: uppercase; }
.selection-page .selection-account strong { color: var(--reino-gold-light); font-weight: 700; }
.selection-page .selection-account a, .selection-page .selection-account a:visited { color: #c9a55d; text-decoration: none; }
.selection-page .selection-account a:hover { color: #fff0c1; }
.selection-page .selection-container { width: min(820px, 100%); margin: 24px auto 0; padding: 22px; text-align: center; }
.selection-page .selection-top { gap: 8px; margin-bottom: 16px; }
.selection-page .selection-top h1 { margin: 0; color: #f1e3c1; font-family: Cinzel, Georgia, serif; font-size: clamp(25px, 4vw, 38px); letter-spacing: .12em !important; text-shadow: 0 2px 3px #000; }
.selection-page .selection-top p { color: var(--reino-muted) !important; margin: 0; }
.selection-page .char-list-scroll { max-height: 420px; margin: 20px 0; padding: 3px 10px 3px 3px; }
.selection-page .char-list-scroll::-webkit-scrollbar-track { background: #081310; }
.selection-page .char-list-scroll::-webkit-scrollbar-thumb { background: #806037; }
.selection-page .char-list-scroll::-webkit-scrollbar-thumb:hover { background: #d8b262; }
.selection-page .char-card { margin: 10px 0; padding: 16px 18px; border: 1px solid rgba(185, 144, 77, .35); border-radius: 2px; background: linear-gradient(100deg, rgba(16, 34, 29, .96), rgba(7, 17, 15, .96)); box-shadow: inset 0 0 0 1px rgba(229, 192, 109, .04); }
.selection-page .char-card:hover { border-color: #d8b262; background: linear-gradient(100deg, rgba(37, 57, 42, .98), rgba(10, 22, 18, .98)); }
.selection-page .char-name { color: #f0d48e; font-family: Cinzel, Georgia, serif; font-size: 1.15rem; }
.selection-page .char-stats { color: #c7c0af; font-size: .78rem; }
.selection-page .char-actions { gap: 8px; }
.selection-page .char-actions .btn-explorar { min-width: 92px; border: 1px solid #c49a50; border-radius: 2px; background: linear-gradient(180deg, #745a30, #332717); color: #ffe9ad; font-family: Cinzel, Georgia, serif; letter-spacing: .05em; }
.selection-page .char-actions .btn-explorar:hover { filter: brightness(1.2); transform: translateY(-1px); }
.selection-page .btn-delete { border: 1px solid rgba(180, 81, 68, .7); border-radius: 2px; background: linear-gradient(180deg, #74382f, #351816); color: #ffd0c6; font-family: Cinzel, Georgia, serif; font-size: 11px; }
.selection-page .btn-delete:hover { background: linear-gradient(180deg, #9b493d, #4b1d18); }
.selection-page .new-char-box { margin-top: 20px; padding: 20px; border: 1px dashed rgba(185, 144, 77, .4); border-radius: 2px; background: rgba(12, 29, 24, .62); }
.selection-page .new-char-box h3 { color: #f0d48e; font-family: Cinzel, Georgia, serif; }
.selection-page .new-char-box input { max-width: 420px; margin-bottom: 10px; border: 1px solid rgba(185, 144, 77, .5); border-radius: 2px; background: #06100e; color: #f2e7cc; }
.selection-page .new-char-box .btn-explorar { border: 1px solid #c49a50; border-radius: 2px; background: linear-gradient(180deg, #745a30, #332717); color: #ffe9ad; font-family: Cinzel, Georgia, serif; }
.selection-page > .selection-container > a:last-child, .selection-page > .selection-container > a:last-child:visited { color: #c77b6f !important; }
.selection-page .feedback { border-radius: 2px; }
.selection-page .char-list-scroll { display: grid; grid-template-columns: repeat(auto-fit, minmax(205px, 1fr)); gap: 14px; max-height: none; overflow: visible; }
.selection-page .char-card { position: relative; display: grid; grid-template-rows: auto 178px auto auto; align-items: start; gap: 10px; min-width: 0; margin: 0; padding: 14px; text-align: center; }
.selection-page .char-name { min-height: 26px; overflow-wrap: anywhere; }
.selection-page .char-portrait { display: grid; place-items: center; width: 100%; height: 178px; overflow: hidden; border: 1px solid rgba(185, 144, 77, .52); background: radial-gradient(circle at 50% 25%, rgba(195, 161, 88, .3), transparent 32%), linear-gradient(145deg, #294035, #07100e 78%); box-shadow: inset 0 0 0 3px #09110f, inset 0 0 18px #000; }
.selection-page .char-portrait img { width: 100%; height: 100%; object-fit: cover; transform: scale(1.14); }
.selection-page .char-portrait i { color: #c8a25d; font-size: 72px; filter: drop-shadow(0 4px 3px #000); }
.selection-page .char-actions { display: grid; grid-template-columns: 1fr 1fr; gap: 6px; width: 100%; }
.selection-page .char-actions .char-edit-button, .selection-page .char-actions .btn-explorar, .selection-page .char-actions .btn-delete { display: inline-flex; align-items: center; justify-content: center; min-width: 0; width: 100%; min-height: 34px; padding: 7px 5px; }
.selection-page .char-actions .btn-explorar { grid-column: 1 / -1; order: -1; min-height: 44px; font-size: 13px; font-weight: 700; }
.selection-page .char-actions .char-edit-button { border: 1px solid rgba(185, 144, 77, .58); background: linear-gradient(180deg, #3d5141, #1a2920); color: #e6d5ad; font-family: Cinzel, Georgia, serif; font-size: 10px; text-decoration: none; }
.selection-page .char-actions .char-edit-button:hover { filter: brightness(1.2); }
.selection-page .char-actions .delete-form { grid-column: auto; width: 100%; }
.selection-page .char-actions .btn-delete { min-height: 28px; padding: 5px 4px; font-size: 9px; }
.selection-page .char-details { position: absolute; top: 10px; right: 10px; z-index: 2; text-align: left; }
.selection-page .char-details summary { display: grid; place-items: center; width: 25px; height: 25px; cursor: pointer; border: 1px solid rgba(240, 212, 142, .62); border-radius: 50%; background: #17251d; color: #f0d48e; font-family: Georgia, serif; font-weight: 700; list-style: none; }
.selection-page .char-details summary::-webkit-details-marker { display: none; }
.selection-page .char-details[open] summary { background: #69512c; }
.selection-page .char-details .char-stats { display: grid; gap: 5px; min-width: 145px; margin-top: 6px; padding: 9px; border: 1px solid rgba(185, 144, 77, .55); background: rgba(5, 13, 11, .97); box-shadow: 0 7px 16px rgba(0, 0, 0, .45); font-size: 10px; }
.selection-page .char-details .char-stats span { display: flex; justify-content: space-between; gap: 12px; color: #aaa18f; }
.selection-page .char-details .char-stats strong { color: #f0d48e; }
.selection-page .edit-character-card { width: min(520px, 100%); }
.selection-page .edit-character-portrait { width: min(230px, 100%); height: 230px; margin: 0 auto 18px; }
.selection-page .edit-character-form { display: grid; gap: 8px; max-width: 420px; margin: 0 auto; text-align: left; }
.selection-page .edit-character-form label { color: #d7c7a6; font-family: Cinzel, Georgia, serif; font-size: 11px; }
.selection-page .edit-character-form input { width: 100%; max-width: none; margin: 0; }
.selection-page .edit-character-actions { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; margin-top: 8px; }
.selection-page .edit-character-actions > * { display: inline-flex; align-items: center; justify-content: center; min-height: 38px; }
.selection-page .edit-character-actions .char-edit-button { border: 1px solid rgba(185, 144, 77, .58); background: linear-gradient(180deg, #3d5141, #1a2920); color: #e6d5ad; font-family: Cinzel, Georgia, serif; font-size: 10px; text-decoration: none; }
@media (max-width: 640px) {
    .selection-page { padding: 0 8px 20px; }
    .selection-page .selection-topbar { min-height: 62px; }
    .selection-page .selection-brand .site-logo { width: 140px; }
    .selection-page .selection-account { flex-wrap: wrap; justify-content: flex-end; font-size: 8px; }
    .selection-page .selection-container { margin-top: 14px; padding: 14px 10px; }
    .selection-page .char-list-scroll { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px; }
    .selection-page .char-card { align-items: stretch; padding: 10px; }
    .selection-page .char-portrait { height: 145px; }
    .selection-page .char-portrait i { font-size: 54px; }
    .selection-page .char-actions { justify-content: stretch; }
    .selection-page .char-actions .char-edit-button, .selection-page .char-actions .btn-explorar, .selection-page .char-actions .btn-delete { font-size: 9px; }
}
