/**
 * LokoOwneD Rework - home (Layout Config = LokoOwneD Rework). Owner's pick "A - Selecao de Personagem", 2026-10-05.
 * The whole page is the Elan map; the panel's own navbar becomes a glass bar over it.
 * Everything here is scoped to pages that contain #rw-home, so Classic and every other page stay as they are.
 */
body:has(#rw-home) { overflow: hidden; }
body:has(#rw-home) main[role="main"] { margin: 0 !important; padding: 0 !important; }
body:has(#rw-home) #panel-container { padding: 0 !important; }
body:has(#rw-home) footer.footer { display: none; }
body:has(#rw-home) nav.navbar {
  position: fixed;
  top: 12px;
  left: 16px;
  right: 16px;
  z-index: 30;
  background: rgb(17 20 24 / 80%) !important;
  backdrop-filter: blur(8px);
  border: 1px solid rgb(255 255 255 / 9%);
  border-radius: 12px;
  box-shadow: none !important;
}
body:has(#rw-home) nav.navbar .navbar-nav.ml-auto { flex-wrap: nowrap; align-items: center; gap: 6px; }
body:has(#rw-home) nav.navbar .navbar-nav .nav-link { padding-left: .5rem; padding-right: .5rem; }
body:has(#rw-home) nav.navbar #logout { padding: 4px 10px; margin-right: 8px; }
body:has(#rw-home) nav.navbar .dropdown-menu {
  background: rgb(17 20 24 / 96%);
  border: 1px solid rgb(255 255 255 / 9%);
  border-radius: 10px;
}

.rw-home {
  --rw-panel: rgb(17 20 24 / 80%);
  --rw-panel-2: rgb(23 27 33 / 85%);
  --rw-line: rgb(255 255 255 / 9%);
  --rw-line-2: #33404f;
  --rw-muted: #9aa6b2;
  --rw-gold: #d9b45a;
  --rw-gold-2: #f1d38a;
  color: #f4f6f8;
}
.rw-home .glass { background: var(--rw-panel); backdrop-filter: blur(8px); border: 1px solid var(--rw-line); border-radius: 12px; }

/* the map, full page */
.rw-cena { position: fixed; inset: 0; z-index: 0; background: #0b1118; }
/* the canvas only shows once the scene is framed (rework.js adds .is-ready): no skeleton, no equipment popping in */
.rw-cena canvas { opacity: 0; transition: opacity .6s ease; }
.rw-cena.is-ready canvas { opacity: 1; }
@media (prefers-reduced-motion: reduce) { .rw-cena canvas { transition: none; } }
.rw-vignette { position: fixed; inset: 0; z-index: 1; pointer-events: none; background: radial-gradient(ellipse 55% 60% at 50% 55%, transparent 40%, rgb(0 0 0 / 55%) 100%); }
.rw-load { position: fixed; left: 0; right: 0; top: 0; height: 3px; z-index: 40; background: rgb(255 255 255 / 8%); }
.rw-load > i { display: block; width: 0; height: 100%; background: var(--rw-gold); transition: width .2s; }
.rw-load.is-done { display: none; }
/* no character: invitation over the lobby (owner, 2026-10-06) */
.rw-empty { position: fixed; z-index: 5; left: 50%; bottom: 9%; transform: translateX(-50%); width: min(640px, calc(100% - 32px)); padding: 20px 28px; text-align: center; }
.rw-empty p { margin: 0 0 14px; font-size: 18px; line-height: 1.45; color: #f4f6f8; }
.rw-empty b { color: var(--rw-gold-2); }
.rw-races { display: flex; justify-content: center; gap: 26px; }
.rw-races img, .rw-races svg { width: 44px; height: 44px; filter: drop-shadow(0 0 8px rgb(0 0 0 / 60%)); }
.rw-nick { position: fixed; left: 0; top: 0; z-index: 2; white-space: nowrap; font-weight: 600; font-size: 13px; color: #d7dde3; pointer-events: none; opacity: .75;
  text-shadow: -1px -1px 0 #000, 1px -1px 0 #000, -1px 1px 0 #000, 1px 1px 0 #000, 0 2px 3px #000, 0 0 8px rgb(0 0 0 / 95%); transition: opacity .2s, color .2s; }
.rw-nick.sel { color: #fff; opacity: 1; font-size: 15px; }
.rw-nick-guild { display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 2px; margin-bottom: 3px; font-size: 14px; font-weight: 700; color: var(--rw-gold-2);
  text-shadow: -1px -1px 0 #000, 1px -1px 0 #000, -1px 1px 0 #000, 1px 1px 0 #000, 0 2px 3px #000, 0 0 8px rgb(0 0 0 / 95%); }
.rw-nick-guild .guild-emblem { position: relative; width: 23px; height: 23px; filter: drop-shadow(0 1px 2px #000) drop-shadow(0 0 4px rgb(0 0 0 / 90%)); }

/* left column: "Account Infos" (login + coins, owner 2026-10-06) above the selected character */
.rw-leftcol { position: fixed; z-index: 6; left: 16px; top: var(--rw-top, 84px); width: 320px; display: flex; flex-direction: column; gap: 12px; }
.rw-account { position: relative; z-index: 3; padding: 12px 14px 14px; }
.rw-acc-toggle { display: flex; align-items: center; gap: 10px; width: 100%; padding: 6px; border: 1px solid transparent; border-radius: 8px; background: none; color: #f4f6f8; text-align: left; cursor: pointer; transition: border-color .15s, background-color .15s; }
.rw-acc-toggle:hover, .rw-acc-toggle[aria-expanded="true"] { border-color: var(--rw-line); background: rgb(255 255 255 / 4%); }
.rw-acc-toggle:focus-visible { outline: 2px solid var(--rw-gold); outline-offset: 2px; }
.rw-acc-toggle .fa { margin-left: auto; color: var(--rw-muted); transition: transform .15s; }
.rw-acc-toggle[aria-expanded="true"] .fa { transform: rotate(180deg); }
.rw-acc-who { min-width: 0; }
.rw-acc-who b { font-size: 15px; }
.rw-acc-who small { display: block; color: var(--rw-muted); font-size: 11px; }
.rw-acc-menu { position: absolute; z-index: 20; left: 14px; right: 14px; top: 92px; padding: 6px; background: #111418; border: 1px solid var(--rw-line); border-radius: 10px; box-shadow: 0 12px 30px rgb(0 0 0 / 50%); }
.rw-acc-menu[hidden] { display: none; }
.rw-acc-menu a { display: block; padding: 7px 10px; border-radius: 6px; color: #cfd6dd; font-size: 13px; text-decoration: none; }
.rw-acc-menu a:hover, .rw-acc-menu a:focus-visible { background: rgb(255 255 255 / 7%); color: #fff; outline: none; }
.rw-coins { display: grid; grid-template-columns: 1fr 1fr; gap: 6px; margin-top: 10px; }
.rw-coin { padding: 6px 10px; border-radius: 7px; background: var(--rw-panel-2); border: 1px solid var(--rw-line); min-width: 0; }
.rw-coin small { display: block; color: var(--rw-muted); font-size: 10px; text-transform: uppercase; letter-spacing: .05em; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.rw-coin strong { display: block; font-size: 14px; font-variant-numeric: tabular-nums; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.rw-role { font-size: 10px; font-weight: 700; padding: 1px 6px; border-radius: 4px; background: #d9363e; vertical-align: 2px; }
.rw-av { width: 34px; height: 34px; flex: none; border-radius: 50%; display: grid; place-items: center; background: #375a7f; font-weight: 700; font-size: 14px; }
/* on the home the card replaces the navbar's account icon */
body:has(#rw-home) .rw-nav-account { display: none; }

/* left: the selected character */
.rw-left { position: relative; z-index: 1; padding: 18px; display: flex; flex-direction: column; gap: 12px; }
.rw-tag { font-size: 12px; color: var(--rw-muted); text-transform: uppercase; letter-spacing: .08em; }
.rw-home .race-bellato { color: #6fb7ff; } .rw-home .race-cora { color: #c792ff; } .rw-home .race-accretia { color: #ff7a7a; }
.rw-guild { display: flex; align-items: center; gap: 8px; margin-top: -2px; font-size: 14px; font-weight: 700; color: var(--rw-gold-2); overflow-wrap: anywhere; }
.rw-guild[hidden] { display: none; }
.rw-guild .guild-emblem { position: relative; width: 22px; height: 22px; flex: none; }
.rw-guild .guild-emblem img { width: 22px; height: 22px; }
.rw-title { margin: -4px 0 0; font-size: 30px; line-height: 1.1; font-weight: 800; overflow-wrap: anywhere; color: #fff; }
.rw-sub { margin-top: -6px; color: var(--rw-muted); } .rw-sub strong { color: var(--rw-gold-2); }
.rw-bars { display: grid; gap: 7px; }
.rw-bar { display: grid; grid-template-columns: 24px 1fr auto; align-items: center; gap: 8px; font-size: 12px; }
.rw-bar b { color: var(--rw-muted); font-weight: 600; }
.rw-bar i { display: block; height: 7px; border-radius: 4px; background: var(--c); box-shadow: 0 0 8px var(--c); opacity: .9; }
.rw-bar span { font-weight: 600; font-variant-numeric: tabular-nums; }
.rw-bar.hp { --c: #e5484d; } .rw-bar.fp { --c: #3e8ef7; } .rw-bar.sp { --c: #f5c518; }

/* right: equipment, then the inventory */
.rw-right { position: fixed; z-index: 5; right: 16px; top: var(--rw-top, 84px); bottom: 112px; width: 330px; padding: 14px; display: flex; flex-direction: column; gap: 4px; overflow-y: auto; }
.rw-cap { margin: 0 0 6px; font-size: 11px; color: var(--rw-muted); text-transform: uppercase; letter-spacing: .08em; font-weight: 600; }
.rw-cap-bag { margin-top: 12px; padding-top: 12px; border-top: 1px solid var(--rw-line); }
.rw-row { display: flex; align-items: center; gap: 10px; min-width: 0; padding: 2px 4px; border-radius: 6px; }
.rw-row > div { min-width: 0; flex: 1; }
.rw-row small { display: block; color: var(--rw-muted); font-size: 10px; text-transform: uppercase; letter-spacing: .05em; line-height: 1.2; }
.rw-row .n { display: block; font-size: 13px; font-weight: 600; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.rw-row.off .n { color: #5d6875; font-weight: 400; }
.rw-row .up { color: var(--rw-gold-2); }
.rw-acc { display: flex; gap: 6px; flex-wrap: wrap; margin-top: 6px; }
.rw-acc:empty { display: none; }
/* inventory: 5 columns of 46x46 boxes (65 minus 30%), each bag button sits over its column (owner, 2026-10-06) */
.rw-bags, .rw-bag { display: grid; grid-template-columns: repeat(5, minmax(0, 46px)); gap: 4px; }
.rw-bags { justify-items: center; margin-bottom: 8px; }
.rw-bags button { width: 36px; height: 36px; padding: 0; border-radius: 6px; border: 1px solid var(--rw-line-2); background: #0c0e11; cursor: pointer; opacity: .65; transition: opacity .15s, border-color .15s; }
.rw-bags button img { width: 32px; height: 32px; display: block; margin: auto; }
.rw-bags button:hover { opacity: 1; }
.rw-bags button[aria-selected="true"] { opacity: 1; border-color: var(--rw-gold); box-shadow: 0 0 0 1px var(--rw-gold) inset; }
.rw-bags button:focus-visible { outline: 2px solid var(--rw-gold); outline-offset: 2px; }

/* item icons (the panel's sprite sheets) */
.rw-icon { position: relative; width: 36px; height: 36px; flex: none; border: 1px solid var(--rw-line-2); border-radius: 6px; background: #0c0e11; overflow: hidden; }
.rw-bag .rw-icon { width: 100%; height: auto; aspect-ratio: 1; }
.rw-icon > .sprite { display: block; transform: scale(.5625); transform-origin: 0 0; }
.rw-bag .rw-icon > .sprite { position: absolute; left: 50%; top: 50%; transform: translate(-50%, -50%) scale(.6125); transform-origin: center; }
.rw-icon.sm { width: 30px; height: 30px; border-radius: 5px; } .rw-icon.sm > .sprite { transform: scale(.46875); }
.rw-icon.empty::after { content: ""; position: absolute; inset: 22%; border: 1px dashed #2b333d; border-radius: 4px; }
.rw-icon:not(.empty) { cursor: pointer; transition: border-color .15s; }
.rw-icon:not(.empty):hover, .rw-icon:not(.empty):focus-visible { border-color: var(--rw-gold); outline: none; }
.rw-icon .amt, .rw-icon .lvl { position: absolute; right: 2px; bottom: 0; font-size: 10px; font-weight: 700; color: var(--rw-gold-2); text-shadow: 0 0 2px #000, 0 0 2px #000; }

/* tooltip (items and 3D parts) */
.rw-tip { position: fixed; z-index: 60; max-width: 280px; padding: 8px 12px; font-size: 13px; line-height: 1.4; text-align: center; color: #f4f6f8;
  background: rgb(23 26 28 / 96%); border: 1.5px solid #959595; border-radius: 4px; pointer-events: none; }
.rw-tip[hidden] { display: none; }
.rw-tip .t { display: flex; justify-content: center; gap: 2px; margin-top: 4px; }
.rw-tip .t img { width: 14px; height: 14px; }
.rw-tip .q { color: var(--rw-muted); font-size: 12px; }

/* bottom: status, always visible */
.rw-status { position: fixed; z-index: 5; left: 16px; right: 92px; bottom: 16px; display: grid; grid-template-columns: repeat(8, minmax(0, 1fr)); gap: 8px; padding: 10px; }
.rw-stat { padding: 6px 12px; border-radius: 8px; background: var(--rw-panel-2); border: 1px solid var(--rw-line); min-width: 0; }
.rw-stat small { display: block; color: var(--rw-muted); font-size: 10px; text-transform: uppercase; letter-spacing: .05em; }
.rw-stat strong { display: block; font-size: 15px; font-variant-numeric: tabular-nums; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }

/* small screens: the map on top, the panels below it (the page scrolls) */
@media (max-width: 991px) {
  body:has(#rw-home) { overflow: auto; }
  body:has(#rw-home) nav.navbar { position: sticky; top: 0; left: auto; right: auto; border-radius: 0; }
  .rw-cena { position: relative; height: 60vh; }
  .rw-vignette { display: none; }
  .rw-leftcol, .rw-right, .rw-status { position: static; width: auto; margin: 12px; }
  .rw-status { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (prefers-reduced-motion: reduce) { .rw-home * { transition: none !important; } }
