/* =========================================================
   Layout geral estilo GGE — v0.1.62
   Apenas reorganiza a interface principal. Não altera sistemas.
   ========================================================= */
body.gge-layout-active {
  --gge-paper:#d8c08f;
  --gge-paper-dark:#947249;
  --gge-frame:#4a331d;
  --gge-blue:#2f78b8;
  --gge-red:#a51f1b;
  --gge-gold:#f5d069;
  background:#648f36;
}

.gge-layout-active .game-shell {
  position:relative;
  display:block;
  width:100%;
  height:100%;
  overflow:hidden;
  background:#6f9a3e;
}

/* Barra superior fina, como no GGE */
.gge-layout-active .topbar {
  position:fixed;
  z-index:160;
  top:0;
  left:0;
  right:0;
  height:38px;
  display:grid;
  grid-template-columns:260px minmax(450px,1fr) 128px;
  gap:8px;
  padding:3px 8px 3px 118px;
  background:
    linear-gradient(180deg,rgba(76,42,22,.88),rgba(46,27,15,.88)),
    linear-gradient(90deg,#6f4527,#2d1b12);
  border:0;
  border-bottom:2px solid #d9b25f;
  box-shadow:0 3px 12px #0008;
}

.gge-layout-active .mini-brand {
  min-width:0;
  height:30px;
  padding:0 9px;
  gap:7px;
  align-self:center;
  border:1px solid #b9974e;
  border-radius:2px;
  background:linear-gradient(#f1deaa,#b99355);
  color:#2d1b0c;
  box-shadow:inset 0 1px #fff9,0 2px 3px #0006;
}
.gge-layout-active .mini-brand .crest {
  width:24px;
  height:24px;
  border:1px solid #5b3518;
  border-radius:2px;
  background:#a8211d;
  font-size:15px;
  color:#f5e6b8;
}
.gge-layout-active .mini-brand strong {
  display:none;
}
.gge-layout-active .mini-brand small {
  display:block;
  margin:0;
  max-width:205px;
  overflow:hidden;
  text-overflow:ellipsis;
  white-space:nowrap;
  color:#2e1b0c;
  font-size:12px;
  font-weight:900;
}

.gge-layout-active .resource-row {
  height:31px;
  justify-content:center;
  align-items:center;
  gap:4px;
  overflow:hidden;
}
.gge-layout-active .resource {
  min-width:122px;
  height:30px;
  padding:3px 7px;
  border:1px solid #6b4b25;
  border-radius:2px;
  background:linear-gradient(#efe1bd,#b99866 52%,#8a653c);
  color:#2b1a0d;
  box-shadow:inset 0 1px #fff9,0 2px 3px #0006;
}
.gge-layout-active .resource .r-top {
  height:16px;
  gap:4px;
}
.gge-layout-active .resource .r-name {
  display:none;
}
.gge-layout-active .resource .r-value {
  color:#2d1c0e;
  font-size:12px;
  font-weight:900;
  text-shadow:0 1px #fff6;
}
.gge-layout-active .resource .r-rate {
  margin-top:0;
  font-size:9px;
  line-height:10px;
  color:#2e6f22;
}
.gge-layout-active .resource .r-rate.is-negative { color:#9b1d18; }

.gge-layout-active .top-actions {
  justify-content:flex-end;
  gap:4px;
}
.gge-layout-active .top-actions .icon-btn {
  width:30px;
  height:30px;
  border:1px solid #caa85b;
  border-radius:50%;
  background:linear-gradient(#e4d0a0,#8c6b41);
  color:#321d0d;
  font-size:15px;
  box-shadow:inset 0 1px #fff9,0 2px 4px #0008;
}

/* Painel do jogador no canto superior esquerdo */
.gge-layout-active .main-layout {
  position:absolute;
  inset:0;
  display:block;
  overflow:hidden;
  background:#6f9a3e;
}
.gge-layout-active .sidebar {
  position:static;
  min-height:0;
  padding:0;
  background:none;
}
.gge-layout-active .player-card {
  position:fixed;
  z-index:175;
  left:4px;
  top:4px;
  width:112px;
  min-height:156px;
  padding:54px 7px 7px;
  border:0;
  border-radius:0;
  color:#2c1b0d;
  background:
    radial-gradient(circle at 37px 27px,#f7e5a5 0 24px,transparent 25px),
    linear-gradient(180deg,#d9c592,#ac8854 60%,#795332);
  clip-path:polygon(0 0,100% 0,100% 88%,50% 100%,0 88%);
  box-shadow:0 5px 12px #0009;
}
.gge-layout-active .player-card::before {
  content:"";
  position:absolute;
  left:9px;
  top:8px;
  width:57px;
  height:57px;
  border:2px solid #f2d378;
  border-radius:8px 8px 42px 42px;
  background:
    linear-gradient(135deg,transparent 46%,#f7f2dc 47% 56%,transparent 57%),
    linear-gradient(45deg,transparent 46%,#f7f2dc 47% 56%,transparent 57%),
    linear-gradient(#be241c,#7c100e);
  box-shadow:inset 0 0 0 2px #8f1a14,0 2px 5px #0008;
}
.gge-layout-active .player-card::after {
  content:attr(data-gge-level);
  position:absolute;
  left:60px;
  top:8px;
  min-width:38px;
  height:35px;
  display:grid;
  place-items:center;
  border:2px solid #6b3d20;
  border-radius:50%;
  color:#fff2c5;
  background:#5b3920;
  font-size:15px;
  font-weight:900;
  box-shadow:inset 0 1px #fff4,0 2px 5px #0008;
}
.gge-layout-active .player-name {
  max-width:96px;
  margin-top:0;
  color:#2a1a0c;
  font-size:11px;
  font-weight:900;
  text-align:center;
  overflow:hidden;
  text-overflow:ellipsis;
  white-space:nowrap;
}
.gge-layout-active .level-line {
  gap:2px;
  margin:5px 0 0;
  color:#35220f;
  font-size:10px;
}
.gge-layout-active .level-line b,
.gge-layout-active #xp-label,
.gge-layout-active #honor-label,
.gge-layout-active #power-label {
  color:#201106;
  font-weight:900;
}
.gge-layout-active .player-card .progress {
  height:8px;
  margin:4px 0;
  border:1px solid #67411f;
  border-radius:2px;
  background:#47311b;
}
.gge-layout-active .player-card .progress i {
  background:linear-gradient(#ffd65e,#de9e1d);
}

/* Área principal ocupa o ecrã todo */
.gge-layout-active .content {
  position:absolute;
  inset:38px 0 0 0;
  min-width:0;
  overflow:hidden;
  padding:0;
  background:#6f9a3e;
}
.gge-layout-active .view {
  width:100%;
  height:100%;
  padding:0;
  overflow:hidden;
}
.gge-layout-active .view-title {
  position:absolute;
  z-index:90;
  top:8px;
  left:124px;
  right:330px;
  min-height:0;
  margin:0;
  padding:0;
  pointer-events:none;
}
.gge-layout-active .view-title h2,
.gge-layout-active .view-title p {
  display:none;
}
.gge-layout-active .view-title > div:first-child {
  display:none;
}
.gge-layout-active .view-title .castle-header-actions,
.gge-layout-active .view-title > :not(div:first-child) {
  pointer-events:auto;
}
.gge-layout-active .castle-header-actions {
  display:flex;
  justify-content:flex-end;
  gap:5px;
}
.gge-layout-active .castle-header-actions .secondary-btn,
.gge-layout-active .castle-header-actions .action-btn {
  min-height:28px;
  padding:5px 9px;
  border:1px solid #6f4b21;
  border-radius:3px;
  background:linear-gradient(#f2d28a,#ba812d);
  color:#2b1808;
  font-size:11px;
  font-weight:900;
  box-shadow:inset 0 1px #fff9,0 2px 5px #0007;
}

.gge-layout-active .castle-iso-shell,
.gge-layout-active .castle-view-shell {
  height:100%;
  min-height:0;
  border:0;
  border-radius:0;
  box-shadow:none;
}
.gge-layout-active .castle-world-viewport {
  height:100% !important;
  min-height:0;
  border-radius:0;
}
.gge-layout-active .castle-stage-ribbon {
  left:8px;
  top:8px;
  min-width:230px;
  transform:scale(.82);
  transform-origin:top left;
}
.gge-layout-active .castle-camera-controls {
  right:70px;
  top:9px;
  transform:scale(.86);
  transform-origin:top right;
}
.gge-layout-active .castle-legend {
  display:none;
}

/* Mapa mundial em tela cheia */
.gge-layout-active .map-view {
  height:100%;
  padding:0;
}
.gge-layout-active .world-toolbar {
  position:absolute;
  z-index:95;
  left:50%;
  top:9px;
  transform:translateX(-50%);
  width:max-content;
  max-width:calc(100vw - 360px);
  min-height:34px;
  margin:0;
  padding:4px 6px;
  border-radius:4px;
  background:linear-gradient(#e9d2a1,#a67e4d);
  color:#271708;
}
.gge-layout-active .world-toolbar .coordinate-search {
  white-space:nowrap;
}
.gge-layout-active .world-map-shell {
  height:100%;
  min-height:0;
  border-radius:0;
}
.gge-layout-active .world-map {
  border:0;
  border-radius:0;
  box-shadow:inset 0 0 90px #0d160a55;
}
.gge-layout-active .world-zoom-readout { top:50px; right:76px; }
.gge-layout-active .world-map-hint { display:none; }
/* Menu principal inferior */
.gge-layout-active .sidebar nav {
  position:fixed;
  z-index:180;
  left:50%;
  bottom:9px;
  transform:translateX(-50%);
  display:flex;
  gap:4px;
  padding:6px 8px;
  border:2px solid #5a3e22;
  border-radius:7px;
  background:linear-gradient(#d8c08f,#876138);
  box-shadow:0 6px 18px #0009,inset 0 1px #fff8;
}
.gge-layout-active .nav-btn {
  position:relative;
  display:grid;
  place-items:center;
  width:48px;
  height:48px;
  padding:0;
  border:1px solid #6a4a29;
  border-radius:4px;
  background:linear-gradient(#f0e2be,#ab824f);
  color:#2a1708;
  box-shadow:inset 0 1px #fff9,0 2px 4px #0006;
}
.gge-layout-active .nav-btn:hover {
  filter:brightness(1.08);
  transform:translateY(-2px);
}
.gge-layout-active .nav-btn.active {
  border-color:#ffe190;
  background:linear-gradient(#d43023,#861611);
  color:#fff7c6;
  box-shadow:0 0 0 2px #f2c45b,0 4px 10px #0008;
}
.gge-layout-active .nav-btn .nav-icon {
  margin:0;
  font-size:25px;
}
.gge-layout-active .nav-btn span:not(.nav-icon) {
  position:absolute;
  left:50%;
  bottom:56px;
  transform:translateX(-50%) translateY(4px);
  min-width:max-content;
  opacity:0;
  pointer-events:none;
  padding:4px 7px;
  border:1px solid #5b3e1f;
  border-radius:3px;
  color:#2b1b0d;
  background:#f1dba9;
  font-size:10px;
  font-weight:900;
  box-shadow:0 3px 8px #0007;
  transition:.12s ease;
}
.gge-layout-active .nav-btn:hover span:not(.nav-icon) {
  opacity:1;
  transform:translateX(-50%) translateY(0);
}

.gge-layout-active .nav-btn.castle-nav-action {
  background: linear-gradient(#f4dd9f,#bc842e);
}
.gge-layout-active .nav-btn.castle-nav-action::before {
  content: "";
  position: absolute;
  inset: 3px;
  border-radius: 3px;
  border: 1px solid rgba(255,255,255,.22);
  pointer-events: none;
}
.gge-layout-active .nav-btn.castle-nav-action[disabled] {
  cursor: not-allowed;
  filter: grayscale(.5) brightness(.75);
  opacity: .65;
}
.gge-layout-active .nav-btn.castle-nav-action[disabled]:hover {
  transform: none;
  filter: grayscale(.5) brightness(.75);
}
.gge-layout-active .nav-btn.castle-nav-action + .nav-btn.active {
  margin-left: 8px;
}

/* Painel direito como gaveta compacta */
.gge-layout-active .rightbar {
  position:fixed;
  z-index:170;
  top:72px;
  right:6px;
  bottom:96px;
  width:58px;
  padding:5px;
  overflow:hidden auto;
  border:2px solid #5c4228;
  border-radius:7px;
  background:linear-gradient(#d9c28f,#8a673e);
  box-shadow:0 5px 16px #0008,inset 0 1px #fff8;
  transition:width .18s ease;
  scrollbar-width:thin;
}
.gge-layout-active .rightbar:hover,
.gge-layout-active .rightbar:focus-within {
  width:292px;
}
.gge-layout-active .rightbar .panel {
  margin:0 0 6px;
  border:1px solid #6a4a29;
  border-radius:4px;
  background:#f0dfba;
  overflow:hidden;
}
.gge-layout-active .rightbar .panel h3 {
  min-height:44px;
  display:flex;
  align-items:center;
  justify-content:center;
  padding:7px 5px;
  border-bottom:1px solid #806037;
  color:#2b1a0b;
  background:linear-gradient(#f5e6bf,#ba8c4f);
  font-size:0;
  white-space:nowrap;
}
.gge-layout-active .rightbar .panel h3::first-letter {
  font-size:22px;
}
.gge-layout-active .rightbar:hover .panel h3,
.gge-layout-active .rightbar:focus-within .panel h3 {
  justify-content:flex-start;
  padding-left:10px;
  font-size:13px;
}
.gge-layout-active .rightbar .panel-body {
  width:270px;
  max-height:205px;
  overflow:auto;
  padding:8px;
  color:#2d1c0f;
  opacity:0;
  pointer-events:none;
  transform:translateX(12px);
  transition:.14s ease;
}
.gge-layout-active .rightbar:hover .panel-body,
.gge-layout-active .rightbar:focus-within .panel-body {
  opacity:1;
  pointer-events:auto;
  transform:translateX(0);
}
.gge-layout-active .rightbar .queue-item,
.gge-layout-active .rightbar .mini-item,
.gge-layout-active .rightbar .empty-state {
  border-color:#9d7a4a;
  background:#fff0c8;
  color:#2d1b0c;
}
.gge-layout-active .rightbar .queue-item small,
.gge-layout-active .rightbar .mini-item small {
  color:#5e4a35;
}

/* Ícones/eventos laterais e localização, inspirados na moldura do GGE */
.gge-events-dock {
  position:fixed;
  z-index:176;
  left:8px;
  bottom:84px;
  display:flex;
  flex-direction:column;
  gap:6px;
}
.gge-daily-reward-dock {
  position:fixed;
  z-index:176;
  right:76px;
  bottom:84px;
  display:flex;
  flex-direction:column;
  gap:6px;
}
.gge-events-dock button,
.gge-daily-reward-dock button,
.gge-location-pill,
.gge-tax-button {
  border:2px solid #5a3a1e;
  background:linear-gradient(#f2ddb0,#a87943);
  color:#2a1809;
  box-shadow:0 4px 10px #0008,inset 0 1px #fff9;
}
.gge-events-dock button,
.gge-daily-reward-dock button {
  position:relative;
  width:48px;
  height:48px;
  border-radius:4px;
  font-size:25px;
}
.gge-events-dock button[data-alert]::after,
.gge-daily-reward-dock button[data-alert]::after {
  content:attr(data-alert);
  position:absolute;
  right:-7px;
  top:-8px;
  min-width:19px;
  height:19px;
  display:grid;
  place-items:center;
  border:1px solid #fff6;
  border-radius:50%;
  color:#fff;
  background:#c8201b;
  font-size:10px;
  font-weight:900;
}
.gge-events-dock button:hover,
.gge-daily-reward-dock button:hover,
.gge-tax-button:hover { filter:brightness(1.08); transform:translateY(-1px); }
.gge-tax-button {
  position:fixed;
  z-index:176;
  right:12px;
  bottom:76px;
  height:38px;
  padding:0 13px;
  border-radius:3px;
  font-size:12px;
  font-weight:900;
}
.gge-location-pill {
  position:fixed;
  z-index:176;
  right:14px;
  bottom:12px;
  min-width:174px;
  max-width:260px;
  height:32px;
  display:flex;
  align-items:center;
  justify-content:space-between;
  gap:8px;
  padding:0 9px;
  border-radius:3px;
  font-size:12px;
  font-weight:900;
}
.gge-location-pill span {
  min-width:0;
  overflow:hidden;
  text-overflow:ellipsis;
  white-space:nowrap;
}
.gge-location-pill button {
  width:22px;
  height:22px;
  border:1px solid #5a3a1e;
  border-radius:3px;
  background:#efe0b7;
  color:#3a2310;
  font-weight:900;
}

.gge-layout-active .footer {
  position:fixed;
  z-index:150;
  left:0;
  right:0;
  bottom:0;
  height:0;
  padding:0;
  overflow:visible;
  border:0;
  background:transparent;
  color:#2f3d23;
  pointer-events:none;
}
.gge-layout-active .footer span:first-child {
  position:fixed;
  left:6px;
  bottom:4px;
  font-size:9px;
  color:#2d3b23aa;
}
.gge-layout-active .footer span:last-child {
  display:none;
}

.gge-layout-active #toast-root {
  top:44px;
  right:72px;
}
.gge-layout-active .toast {
  border-color:#6b4b25;
  border-left-color:#b21e1b;
  background:#f0dfb8ef;
  color:#2d1b0e;
}

@media (max-width:1220px) {
  .gge-layout-active .topbar { grid-template-columns:220px 1fr 110px; padding-left:116px; }
  .gge-layout-active .resource { min-width:96px; }
  .gge-layout-active .nav-btn { width:43px; height:43px; }
  .gge-layout-active .rightbar:hover { width:260px; }
}

@media (max-height:760px) {
  .gge-layout-active .rightbar { top:56px; bottom:74px; }
  .gge-layout-active .sidebar nav { bottom:6px; }
  .gge-layout-active .nav-btn { width:42px; height:42px; }
  .gge-events-dock,
  .gge-daily-reward-dock { bottom:62px; }
  .gge-tax-button { bottom:58px; }
}

/* Páginas de gestão continuam utilizáveis, com scroll e cabeçalho normal */
.gge-layout-active .content > .view:not(.castle-view):not(.map-view) {
  overflow:auto;
  padding:72px 330px 102px 132px;
  background:linear-gradient(180deg,#314027cc,#202819ee);
}
.gge-layout-active .content > .view:not(.castle-view):not(.map-view) .view-title {
  position:relative;
  z-index:1;
  top:auto;
  left:auto;
  right:auto;
  display:flex;
  align-items:flex-end;
  justify-content:space-between;
  gap:12px;
  margin:0 0 14px;
  padding:12px 14px;
  border:1px solid #806037;
  border-radius:8px;
  background:linear-gradient(#ead8af,#ab8350);
  color:#281707;
  pointer-events:auto;
  box-shadow:0 4px 12px #0006;
}
.gge-layout-active .content > .view:not(.castle-view):not(.map-view) .view-title > div:first-child,
.gge-layout-active .content > .view:not(.castle-view):not(.map-view) .view-title h2,
.gge-layout-active .content > .view:not(.castle-view):not(.map-view) .view-title p {
  display:block;
}
.gge-layout-active .content > .view:not(.castle-view):not(.map-view) .view-title h2 {
  margin:0;
  color:#2a1808;
  font:900 21px Georgia,serif;
}
.gge-layout-active .content > .view:not(.castle-view):not(.map-view) .view-title p {
  margin:2px 0 0;
  color:#5d4124;
  font-size:12px;
}
.gge-layout-active .content > .view:not(.castle-view):not(.map-view) .card-grid,
.gge-layout-active .content > .view:not(.castle-view):not(.map-view) .alliance-layout,
.gge-layout-active .content > .view:not(.castle-view):not(.map-view) .table {
  position:relative;
  z-index:1;
}


/* v0.1.64 — Painel do jogador corrigido e sem etiqueta extra */
.gge-layout-active .player-card {
  width:136px;
  min-height:178px;
  padding:75px 10px 12px;
  left:6px;
  top:6px;
  overflow:hidden;
}
.gge-layout-active .player-card::before {
  left:12px;
  top:10px;
  width:58px;
  height:58px;
}
.gge-layout-active .player-card::after {
  left:auto;
  right:10px;
  top:15px;
  min-width:40px;
  height:40px;
  font-size:15px;
}
.gge-layout-active .player-name {
  max-width:116px;
  margin:0 auto 4px;
  font-size:12px;
  line-height:1.15;
}
.gge-layout-active .level-line {
  display:flex;
  justify-content:space-between;
  align-items:center;
  gap:6px;
  margin-top:5px;
  font-size:10px;
  line-height:1.1;
  white-space:nowrap;
}
.gge-layout-active #xp-label {
  font-size:10px;
  max-width:74px;
  overflow:hidden;
  text-overflow:ellipsis;
}
.gge-layout-active .player-card .progress {
  height:7px;
  margin:4px 0 5px;
}
.gge-layout-active .player-card .admin-badge {
  display:none!important;
}

/* v0.1.75 — esconder menu inferior enquanto um modal/relatório está aberto */
body.gge-layout-active.modal-open-ui .sidebar nav {
  display: none !important;
  pointer-events: none !important;
}

/* v0.1.77 — topo reorganizado estilo GGE */
body.gge-layout-active {
  --gge-topbar-height: 36px;
  --gge-left-panel-width: 134px;
}

/* Barra superior mais limpa: jogador à esquerda, recursos ao centro, ações à direita */
.gge-layout-active .topbar {
  height: var(--gge-topbar-height);
  grid-template-columns: 210px minmax(620px, 1fr) 112px;
  gap: 6px;
  padding: 3px 8px 3px calc(var(--gge-left-panel-width) + 10px);
  align-items: center;
  overflow: visible;
  background:
    linear-gradient(180deg, rgba(84,48,26,.95), rgba(49,28,15,.96)),
    linear-gradient(90deg,#7b4c2b,#2d1b12);
  border-bottom: 2px solid #ddb660;
}

.gge-layout-active .mini-brand {
  height: 29px;
  min-width: 0;
  padding: 0 9px;
  justify-content: flex-start;
}
.gge-layout-active .mini-brand small {
  max-width: 176px;
  font-size: 12px;
}

.gge-layout-active .resource-row {
  height: 30px;
  justify-content: center;
  gap: 3px;
}
.gge-layout-active .resource {
  min-width: 106px;
  height: 29px;
  padding: 2px 6px;
}
.gge-layout-active .resource .r-icon {
  transform: scale(.86);
  transform-origin: center;
}
.gge-layout-active .resource .r-value {
  font-size: 11px;
}
.gge-layout-active .resource .r-rate {
  font-size: 8px;
  line-height: 9px;
}
.gge-layout-active .top-actions .icon-btn {
  width: 28px;
  height: 28px;
  font-size: 14px;
}

/* Painel de jogador compacto, sem sobreposições */
.gge-layout-active .player-card {
  left: 4px;
  top: 3px;
  width: 126px;
  min-height: 132px;
  padding: 70px 8px 8px;
  clip-path: polygon(0 0,100% 0,100% 89%,50% 100%,0 89%);
  background:
    radial-gradient(circle at 39px 28px,#f7e5a5 0 25px,transparent 26px),
    linear-gradient(180deg,#dec895,#b38e58 62%,#795332);
}
.gge-layout-active .player-card::before {
  left: 11px;
  top: 9px;
  width: 56px;
  height: 56px;
}
.gge-layout-active .player-card::after {
  right: 8px;
  top: 12px;
  min-width: 35px;
  height: 35px;
  font-size: 14px;
}
.gge-layout-active .player-name {
  max-width: 108px;
  font-size: 11px;
  line-height: 1.1;
}
.gge-layout-active .level-line {
  margin-top: 4px;
  font-size: 9px;
  line-height: 1.05;
}
.gge-layout-active #xp-label,
.gge-layout-active #honor-label,
.gge-layout-active #power-label {
  font-size: 9px;
}
.gge-layout-active .player-card .progress {
  height: 6px;
  margin: 3px 0 4px;
}

/* O conteúdo começa logo depois da barra superior */
.gge-layout-active .content {
  inset: var(--gge-topbar-height) 0 0 0;
}

/* Botões do castelo em bloco pequeno, estilo atalhos do GGE */
.gge-layout-active .castle-view .view-title {
  position: fixed;
  z-index: 178;
  top: calc(var(--gge-topbar-height) + 4px);
  left: calc(var(--gge-left-panel-width) + 10px);
  right: auto;
  width: auto;
  min-height: 0;
  padding: 0;
}
.gge-layout-active .castle-view .castle-header-actions {
  display: flex;
  gap: 5px;
  padding: 4px 5px;
  border: 2px solid #5a3e22;
  border-radius: 5px;
  background: linear-gradient(#d8c08f,#876138);
  box-shadow: 0 4px 12px #0008, inset 0 1px #fff8;
}
.gge-layout-active .castle-view .castle-header-actions .secondary-btn,
.gge-layout-active .castle-view .castle-header-actions .action-btn {
  min-height: 28px;
  padding: 5px 9px;
  border-color: #6d4c25;
  background: linear-gradient(#f1da9f,#bf862e);
  color: #2a1708;
  font-size: 11px;
  white-space: nowrap;
}

/* Estatísticas do castelo passam a ser pequenos indicadores, não caixas gigantes */
.gge-layout-active .castle-view .castle-stat-strip {
  position: fixed;
  z-index: 166;
  top: calc(var(--gge-topbar-height) + 4px);
  left: 50%;
  right: auto;
  transform: translateX(-50%);
  width: min(760px, calc(100vw - 620px));
  min-width: 420px;
  height: 35px;
  display: flex;
  justify-content: center;
  gap: 6px;
  margin: 0;
  pointer-events: auto;
}
.gge-layout-active .castle-view .castle-stat-strip > div {
  min-width: 112px;
  height: 33px;
  display: grid;
  grid-template-columns: auto auto;
  grid-template-rows: 13px 16px;
  align-items: center;
  column-gap: 5px;
  padding: 3px 8px;
  border: 1px solid #b9964e;
  border-radius: 4px;
  background: linear-gradient(180deg,#2d3c2a,#172115);
  box-shadow: 0 3px 8px #0008, inset 0 1px #ffffff1a;
}
.gge-layout-active .castle-view .castle-stat-strip > div:first-child {
  display: none;
}
.gge-layout-active .castle-view .castle-stat-strip span {
  grid-column: 1 / -1;
  display: block;
  color: #e8d7a4;
  font-size: 10px;
  line-height: 1;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.gge-layout-active .castle-view .castle-stat-strip strong {
  grid-column: 1 / -1;
  margin: 0;
  color: #ffd766;
  font-size: 15px;
  line-height: 1;
}

/* Deixa o castelo livre no topo para não ficar tapado pelos indicadores */
.gge-layout-active .castle-view .castle-iso-shell,
.gge-layout-active .castle-view .castle-view-shell {
  padding-top: 0;
}
.gge-layout-active .castle-view .castle-world-viewport {
  padding-top: 36px;
  box-sizing: border-box;
}

/* Esconde elementos laterais redundantes no topo do castelo */
.gge-layout-active .castle-stage-ribbon {
  top: 48px;
  transform: scale(.74);
}
.gge-layout-active .castle-camera-controls {
  top: 45px;
}

@media (max-width: 1380px) {
  .gge-layout-active .topbar {
    grid-template-columns: 190px minmax(520px, 1fr) 100px;
  }
  .gge-layout-active .resource { min-width: 92px; }
  .gge-layout-active .castle-view .castle-stat-strip {
    width: min(620px, calc(100vw - 520px));
    min-width: 360px;
  }
  .gge-layout-active .castle-view .castle-stat-strip > div {
    min-width: 96px;
  }
}

@media (max-width: 1080px), (max-height: 720px) {
  .gge-layout-active .castle-view .castle-stat-strip {
    display: none;
  }
  .gge-layout-active .castle-view .castle-world-viewport {
    padding-top: 0;
  }
}

/* v0.1.80 — painel do jogador mais alto para não cortar Honra/Poder */
.gge-layout-active .player-card {
  min-height: 166px;
  padding: 72px 9px 17px;
  overflow: hidden;
}

.gge-layout-active .player-card .level-line {
  min-height: 13px;
  align-items: center;
  gap: 4px;
  font-size: 9.5px;
  line-height: 1.1;
}

.gge-layout-active #xp-label,
.gge-layout-active #honor-label,
.gge-layout-active #power-label {
  max-width: 66px;
  display: inline-block;
  overflow: visible;
  text-align: right;
  white-space: nowrap;
}

.gge-layout-active #power-label {
  padding-bottom: 1px;
}


/* v0.1.91 — seletor de local único */
.gge-location-pill {
  cursor: pointer;
}
.gge-location-pill:active {
  transform: translateY(1px);
}

/* v0.1.94 — fila lateral compacta tipo GGE */
.gge-layout-active .rightbar {
  position:fixed !important;
  z-index:170;
  top:76px !important;
  right:6px !important;
  bottom:auto !important;
  width:74px !important;
  max-height:calc(100vh - 168px);
  padding:0 !important;
  overflow:visible !important;
  border:0 !important;
  border-radius:0 !important;
  background:transparent !important;
  box-shadow:none !important;
  transition:none !important;
  scrollbar-width:none;
}
.gge-layout-active .rightbar:hover,
.gge-layout-active .rightbar:focus-within {
  width:74px !important;
}
.gge-layout-active .rightbar::-webkit-scrollbar { display:none; }
.gge-layout-active .gge-queue-rail {
  width:74px;
  display:flex;
  flex-direction:column;
  gap:7px;
  align-items:center;
  pointer-events:auto;
}
.gge-layout-active .gge-queue-section {
  width:74px;
  padding:4px 3px 6px;
  border:2px solid #684523;
  border-radius:7px;
  background:linear-gradient(#d9c28f,#ad8250 52%,#7b5634);
  box-shadow:0 5px 12px #0008,inset 0 1px #fff9;
}
.gge-layout-active .gge-queue-title {
  height:20px;
  display:flex;
  align-items:center;
  justify-content:center;
  gap:0;
  margin-bottom:4px;
  border:1px solid #8e6336;
  border-radius:4px;
  background:linear-gradient(#f5e6bf,#ba8c4f);
  color:#2b1809;
  box-shadow:inset 0 1px #fff9;
}
.gge-layout-active .gge-queue-title span {
  font-size:14px;
  line-height:1;
}
.gge-layout-active .gge-queue-title strong {
  position:absolute;
  right:76px;
  min-width:122px;
  padding:5px 8px;
  border:1px solid #684523;
  border-radius:5px;
  background:#201309e8;
  color:#ffe2a0;
  font-size:12px;
  text-align:center;
  opacity:0;
  transform:translateX(8px);
  pointer-events:none;
  box-shadow:0 4px 12px #0008;
  transition:.12s ease;
}
.gge-layout-active .gge-queue-section:hover .gge-queue-title strong,
.gge-layout-active .gge-queue-section:focus-within .gge-queue-title strong {
  opacity:1;
  transform:translateX(0);
}
.gge-layout-active .gge-queue-slots {
  display:flex;
  flex-direction:column;
  gap:5px;
  align-items:center;
}
.gge-layout-active .gge-queue-slot {
  position:relative;
  width:58px;
  height:58px;
  padding:3px 2px 4px;
  display:grid;
  place-items:center;
  grid-template-rows:1fr 13px;
  border:2px solid #7b552e;
  border-radius:5px;
  background:linear-gradient(#f0ddaa,#b8854a 58%,#8a5f35);
  color:#2b1809;
  box-shadow:inset 0 1px #fff9,0 3px 5px #0007;
  cursor:pointer;
}
.gge-layout-active .gge-queue-slot:hover:not(.is-empty) {
  transform:translateY(-1px);
  filter:brightness(1.08);
}
.gge-layout-active .gge-queue-slot.is-empty {
  cursor:default;
  filter:saturate(.72);
  opacity:.78;
  background:linear-gradient(#d6c08f,#a1784b);
}
.gge-layout-active .gge-queue-main-icon {
  display:grid;
  place-items:center;
  width:34px;
  height:30px;
  font-size:23px;
  line-height:1;
  text-shadow:0 1px #fff5;
}
.gge-layout-active .gge-queue-slot.construction .gge-queue-main-icon { font-size:24px; }
.gge-layout-active .gge-queue-slot.recruitment .gge-queue-main-icon { font-size:23px; }
.gge-layout-active .gge-queue-slot.movement .gge-queue-main-icon { font-size:22px; }
.gge-layout-active .gge-queue-slot.more .gge-queue-main-icon {
  font-size:18px;
  font-weight:900;
  color:#ffedbd;
  text-shadow:0 2px 2px #2a160c;
}
.gge-layout-active .gge-queue-slot small {
  min-width:46px;
  padding:1px 3px;
  border-radius:4px;
  background:#1a120bdc;
  color:#fff0bd;
  font-size:10px;
  font-weight:800;
  line-height:12px;
  text-align:center;
  white-space:nowrap;
  overflow:hidden;
  text-overflow:ellipsis;
}
.gge-layout-active .gge-queue-slot.is-empty small {
  background:#f7e7bd;
  color:#684523;
  font-size:9px;
}
.gge-layout-active .gge-queue-badge {
  position:absolute;
  right:-7px;
  top:-8px;
  min-width:20px;
  height:20px;
  padding:0 4px;
  display:grid;
  place-items:center;
  border:2px solid #fff3a8;
  border-radius:50%;
  background:#bf1f1a;
  color:white;
  font-size:10px;
  line-height:1;
  box-shadow:0 2px 5px #0008;
  z-index:2;
}
.gge-layout-active .gge-queue-slot::after {
  content:attr(title);
  position:absolute;
  top:50%;
  right:68px;
  width:max-content;
  max-width:250px;
  padding:6px 8px;
  border:1px solid #b99650;
  border-radius:5px;
  background:#201309f2;
  color:#ffe6a8;
  font-size:12px;
  font-weight:800;
  line-height:1.2;
  transform:translate(8px,-50%);
  opacity:0;
  pointer-events:none;
  box-shadow:0 5px 14px #0009;
  white-space:normal;
}
.gge-layout-active .gge-queue-slot:hover::after,
.gge-layout-active .gge-queue-slot:focus-visible::after {
  opacity:1;
  transform:translate(0,-50%);
}
.gge-layout-active.modal-open-ui .rightbar { display:none; }

@media (max-height:760px) {
  .gge-layout-active .rightbar { top:60px !important; max-height:calc(100vh - 142px); transform:scale(.9); transform-origin:top right; }
}
.gge-layout-active .gge-queue-title { position:relative; }

/* v0.1.98 — Produção/hora dos recursos mais legível.
   A linha de produção passa a ter mais contraste e espaço próprio, sem mexer no resto da HUD. */
body.gge-layout-active {
  --gge-topbar-height: 46px;
}
.gge-layout-active .topbar {
  height: var(--gge-topbar-height);
  padding-top: 4px;
  padding-bottom: 5px;
  overflow: visible;
}
.gge-layout-active .resource-row {
  height: 38px;
  align-items: center;
  overflow: visible;
  gap: 5px;
}
.gge-layout-active .resource {
  min-width: 118px;
  height: 38px;
  padding: 3px 7px 5px;
  overflow: visible;
}
.gge-layout-active .resource .r-top {
  height: 18px;
  align-items: center;
}
.gge-layout-active .resource .r-value {
  font-size: 12px;
  line-height: 14px;
}
.gge-layout-active .resource .r-rate {
  display: block;
  margin-top: 1px;
  min-height: 14px;
  font-size: 11px;
  line-height: 13px;
  font-weight: 950;
  letter-spacing: .15px;
  text-align: right;
  color: #0b4f13;
  text-shadow:
    0 1px rgba(255,255,255,.75),
    1px 0 rgba(255,255,255,.35),
    -1px 0 rgba(255,255,255,.35);
}
.gge-layout-active .resource .r-rate.is-positive,
.gge-layout-active .resource .r-rate.is-negative {
  width: max-content;
  min-width: 46px;
  margin-left: auto;
  padding: 0 5px;
  border-radius: 7px;
  background: rgba(255, 244, 204, .72);
  border: 1px solid rgba(82, 101, 35, .48);
  box-shadow: inset 0 1px rgba(255,255,255,.45), 0 1px 1px rgba(0,0,0,.18);
  text-align: center;
}
.gge-layout-active .resource .r-rate.is-negative {
  color: #8b120d;
  border-color: rgba(125, 28, 20, .48);
}


/* v0.1.102 — HUDs centradas no centro real do ecrã.
   Centra a barra de recursos e a barra de estatísticas do castelo,
   sem alterar valores, produção/hora ou funcionamento dos botões. */
.gge-layout-active .topbar .resource-row {
  position: absolute;
  left: 50%;
  top: 4px;
  transform: translateX(-50%);
  width: max-content;
  max-width: calc(100vw - 150px);
  justify-content: center;
}

.gge-layout-active .castle-view .castle-stat-strip {
  left: 50% !important;
  right: auto !important;
  transform: translateX(-50%) !important;
  width: max-content !important;
  min-width: 0 !important;
  max-width: calc(100vw - 24px);
  justify-content: center !important;
}

.gge-layout-active .castle-view .castle-stat-strip > div {
  flex: 0 0 auto;
}

@media (max-width: 760px) {
  .gge-layout-active .topbar .resource-row {
    max-width: calc(100vw - 24px);
  }
}

/* v0.1.113 — Menus centrados com as HUDs.
   As páginas de gestão (Relatórios, Classificação, Missões, etc.) deixam de ficar puxadas para a esquerda
   e passam a alinhar pelo centro real do ecrã, como a HUD de recursos e a barra inferior. */
.gge-layout-active .content > .view:not(.castle-view):not(.map-view) {
  width: min(1180px, calc(100vw - 48px));
  max-width: min(1180px, calc(100vw - 48px));
  height: calc(100vh - var(--gge-topbar-height));
  margin: 0 auto;
  padding: 72px 0 102px !important;
  overflow: auto;
}

.gge-layout-active .content > .view.reports-view,
.gge-layout-active .content > .view:not(.castle-view):not(.map-view) > .reports-view {
  width: 100%;
  max-width: 1180px;
  margin-left: auto;
  margin-right: auto;
}

.gge-layout-active .content > .view:not(.castle-view):not(.map-view) .view-title,
.gge-layout-active .content > .view:not(.castle-view):not(.map-view) .card-grid,
.gge-layout-active .content > .view:not(.castle-view):not(.map-view) .alliance-layout,
.gge-layout-active .content > .view:not(.castle-view):not(.map-view) .table,
.gge-layout-active .content > .view:not(.castle-view):not(.map-view) .report-folder-grid,
.gge-layout-active .content > .view:not(.castle-view):not(.map-view) .report-folder-section,
.gge-layout-active .content > .view:not(.castle-view):not(.map-view) .report-folder-summary,
.gge-layout-active .content > .view:not(.castle-view):not(.map-view) .report-folder-empty {
  width: 100%;
  max-width: 100%;
}

@media (max-width: 760px) {
  .gge-layout-active .content > .view:not(.castle-view):not(.map-view) {
    width: calc(100vw - 24px);
    max-width: calc(100vw - 24px);
    padding-top: 64px !important;
    padding-bottom: 96px !important;
  }
}

/* v0.1.114 — filas extra temporárias de construção */
.gge-layout-active .gge-queue-slot.is-free {
  background:linear-gradient(#f6e4b5,#c99756 58%,#96683b);
}
.gge-layout-active .gge-queue-slot.is-free .gge-queue-main-icon {
  opacity:.85;
}
.gge-layout-active .gge-queue-slot.is-locked {
  background:linear-gradient(#c8b082,#8c6d43 58%,#654827);
  border-color:#d7af4d;
  filter:none;
}
.gge-layout-active .gge-queue-slot.is-locked .gge-queue-main-icon {
  font-size:22px;
  color:#fff3c1;
  text-shadow:0 2px 2px #23150a;
}
.gge-layout-active .gge-queue-slot.is-locked small {
  background:#2a160cf0;
  color:#ffe298;
}
.gge-layout-active .construction-extra-modal .modal-body {
  display:grid;
  gap:12px;
}
.gge-layout-active .construction-extra-note {
  border:1px solid #6b552f;
  border-radius:8px;
  background:#151d22;
  color:#ffe0a0;
  padding:10px 12px;
  line-height:1.35;
}
.gge-layout-active .construction-extra-options {
  display:grid;
  gap:10px;
}
.gge-layout-active .construction-extra-option {
  display:flex;
  align-items:center;
  justify-content:space-between;
  gap:14px;
  border:1px solid #6c5838;
  border-radius:9px;
  background:#2a2117;
  padding:12px;
}
.gge-layout-active .construction-extra-option strong {
  display:block;
  color:#ffe28e;
  font-size:16px;
}
.gge-layout-active .construction-extra-option small {
  display:block;
  color:#d9c7a4;
  margin-top:3px;
}

/* v0.1.130 — controlos de zoom junto ao seletor de reino/local */
.gge-layout-active .castle-camera-controls {
  position: fixed;
  z-index: 178;
  right: 202px;
  bottom: 12px;
  top: auto;
  display: flex;
  align-items: center;
  gap: 6px;
  height: 32px;
  padding: 3px 6px;
  border: 2px solid #5a3a1e;
  border-radius: 3px;
  background: linear-gradient(#f2ddb0,#a87943);
  box-shadow: 0 4px 10px #0008,inset 0 1px #fff9;
  transform: none;
  transform-origin: center;
}
.gge-layout-active .castle-camera-controls button {
  width: 28px;
  height: 24px;
  display: grid;
  place-items: center;
  padding: 0;
  border: 1px solid #5a3a1e;
  border-radius: 3px;
  background: #efe0b7;
  color: #3a2310;
  font: 900 16px/1 Segoe UI,Arial,sans-serif;
  box-shadow: inset 0 1px #fff8;
}
.gge-layout-active .castle-camera-controls button:hover {
  background: #fff1c8;
  filter: brightness(1.04);
}
.gge-layout-active .castle-camera-controls output {
  min-width: 44px;
  text-align: center;
  color: #2a1809;
  font: 900 11px/1 Segoe UI,Arial,sans-serif;
}
@media (max-width: 720px) {
  .gge-layout-active .castle-camera-controls {
    right: 14px;
    bottom: 52px;
  }
}


/* v0.1.131 — Comandantes/Governadores ajustados ao ecrã sem scroll da página */
.gge-layout-active .content > .equipment-view.equipment-commanders,
.gge-layout-active .content > .equipment-view.equipment-governors {
  width:min(1164px, calc(100vw - 40px));
  max-width:min(1164px, calc(100vw - 40px));
  height:calc(100vh - var(--gge-topbar-height));
  margin:0 auto;
  padding:8px 0 74px !important;
  overflow:hidden !important;
  display:flex;
  flex-direction:column;
  gap:8px;
  background:linear-gradient(180deg,#314027cc,#202819ee);
}
.gge-layout-active .content > .equipment-view.equipment-commanders .view-title,
.gge-layout-active .content > .equipment-view.equipment-governors .view-title {
  flex:0 0 auto;
  position:relative;
  inset:auto;
  z-index:1;
  display:flex;
  align-items:center;
  justify-content:space-between;
  min-height:0;
  margin:0;
  padding:8px 12px;
  border:1px solid #806037;
  border-radius:8px;
  background:linear-gradient(#ead8af,#ab8350);
  color:#281707;
  pointer-events:auto;
  box-shadow:0 4px 12px #0006;
}
.gge-layout-active .content > .equipment-view.equipment-commanders .view-title > div:first-child,
.gge-layout-active .content > .equipment-view.equipment-governors .view-title > div:first-child,
.gge-layout-active .content > .equipment-view.equipment-commanders .view-title h2,
.gge-layout-active .content > .equipment-view.equipment-governors .view-title h2,
.gge-layout-active .content > .equipment-view.equipment-commanders .view-title p,
.gge-layout-active .content > .equipment-view.equipment-governors .view-title p {
  display:block;
}
.gge-layout-active .content > .equipment-view.equipment-commanders .view-title h2,
.gge-layout-active .content > .equipment-view.equipment-governors .view-title h2 {
  margin:0;
  color:#2a1808;
  font:900 21px Georgia,serif;
}
.gge-layout-active .content > .equipment-view.equipment-commanders .view-title p,
.gge-layout-active .content > .equipment-view.equipment-governors .view-title p {
  margin:2px 0 0;
  color:#5d4124;
  font-size:11px;
  line-height:1.15;
}
.gge-layout-active .equipment-view.equipment-commanders .equipment-shell,
.gge-layout-active .equipment-view.equipment-governors .equipment-shell {
  flex:1 1 auto;
  min-height:0 !important;
  height:auto !important;
  overflow:hidden;
  display:grid;
  grid-template-columns:230px minmax(440px, 1fr) 360px;
  gap:10px;
}
.gge-layout-active .equipment-view.equipment-commanders .equipment-character-list,
.gge-layout-active .equipment-view.equipment-governors .equipment-character-list,
.gge-layout-active .equipment-view.equipment-commanders .equipment-paperdoll,
.gge-layout-active .equipment-view.equipment-governors .equipment-paperdoll,
.gge-layout-active .equipment-view.equipment-commanders .equipment-summary,
.gge-layout-active .equipment-view.equipment-governors .equipment-summary {
  min-height:0;
  padding:10px;
  overflow:hidden;
}
.gge-layout-active .equipment-view.equipment-commanders .equipment-character-list,
.gge-layout-active .equipment-view.equipment-governors .equipment-character-list {
  display:flex;
  flex-direction:column;
}
.gge-layout-active .equipment-view.equipment-commanders .equipment-character-list h3,
.gge-layout-active .equipment-view.equipment-governors .equipment-character-list h3,
.gge-layout-active .equipment-view.equipment-commanders .equipment-summary h3,
.gge-layout-active .equipment-view.equipment-governors .equipment-summary h3 {
  margin:0 0 8px;
  font-size:18px;
  line-height:1.05;
}
.gge-layout-active .equipment-view.equipment-commanders .equipment-character-btn,
.gge-layout-active .equipment-view.equipment-governors .equipment-character-btn {
  min-height:66px;
  margin-bottom:8px;
  padding:8px;
}
.gge-layout-active .equipment-view.equipment-commanders .equipment-paperdoll,
.gge-layout-active .equipment-view.equipment-governors .equipment-paperdoll {
  display:flex;
  flex-direction:column;
}
.gge-layout-active .equipment-view.equipment-commanders .equipment-hero-card,
.gge-layout-active .equipment-view.equipment-governors .equipment-hero-card {
  flex:0 0 auto;
  grid-template-columns:86px 1fr;
  gap:10px;
  margin-bottom:10px;
  padding:10px;
}
.gge-layout-active .equipment-view.equipment-commanders .equipment-hero-portrait,
.gge-layout-active .equipment-view.equipment-governors .equipment-hero-portrait {
  width:78px;
  height:92px;
  font-size:42px;
}
.gge-layout-active .equipment-view.equipment-commanders .equipment-hero-card h2,
.gge-layout-active .equipment-view.equipment-governors .equipment-hero-card h2 {
  margin:1px 0 2px;
  font-size:25px;
}
.gge-layout-active .equipment-view.equipment-commanders .equipment-hero-card p,
.gge-layout-active .equipment-view.equipment-governors .equipment-hero-card p {
  font-size:12px;
}
.gge-layout-active .equipment-view.equipment-commanders .equipment-slots,
.gge-layout-active .equipment-view.equipment-governors .equipment-slots {
  flex:1 1 auto;
  min-height:0;
  grid-template-columns:repeat(2, minmax(0,1fr));
  grid-auto-rows:minmax(90px, 1fr);
  gap:8px;
}
.gge-layout-active .equipment-view.equipment-commanders .equipment-slot,
.gge-layout-active .equipment-view.equipment-governors .equipment-slot {
  min-height:0;
  padding:8px;
}
.gge-layout-active .equipment-view.equipment-commanders .equipment-empty-slot,
.gge-layout-active .equipment-view.equipment-governors .equipment-empty-slot {
  height:52px;
}
.gge-layout-active .equipment-view.equipment-commanders .equipment-summary,
.gge-layout-active .equipment-view.equipment-governors .equipment-summary {
  display:flex;
  flex-direction:column;
}
.gge-layout-active .equipment-view.equipment-commanders .equipment-summary-list,
.gge-layout-active .equipment-view.equipment-governors .equipment-summary-list {
  flex:0 0 auto;
  gap:5px;
  margin-bottom:8px;
}
.gge-layout-active .equipment-view.equipment-commanders .equipment-summary-row,
.gge-layout-active .equipment-view.equipment-governors .equipment-summary-row {
  padding:5px 8px;
  font-size:12px;
}
.gge-layout-active .equipment-view.equipment-commanders .equipment-set-summary,
.gge-layout-active .equipment-view.equipment-governors .equipment-set-summary {
  flex:0 0 auto;
  margin:6px 0 8px;
}
.gge-layout-active .equipment-view.equipment-commanders .equipment-set-summary h3,
.gge-layout-active .equipment-view.equipment-governors .equipment-set-summary h3 {
  margin:0 0 7px;
}
.gge-layout-active .equipment-view.equipment-commanders .equipment-set-card,
.gge-layout-active .equipment-view.equipment-governors .equipment-set-card {
  margin-bottom:5px;
  padding:6px 8px;
  border-radius:8px;
}
.gge-layout-active .equipment-view.equipment-commanders .equipment-set-card strong,
.gge-layout-active .equipment-view.equipment-governors .equipment-set-card strong {
  font-size:11px;
  line-height:1.1;
}
.gge-layout-active .equipment-view.equipment-commanders .equipment-set-card small,
.gge-layout-active .equipment-view.equipment-governors .equipment-set-card small {
  margin-top:1px;
  font-size:9px;
  line-height:1.18;
}
.gge-layout-active .equipment-view.equipment-commanders .equipment-inventory,
.gge-layout-active .equipment-view.equipment-governors .equipment-inventory {
  flex:1 1 auto;
  min-height:88px;
  max-height:none;
  overflow:auto;
  overscroll-behavior:contain;
  padding-right:4px;
}
.gge-layout-active .equipment-view.equipment-commanders .equipment-empty-inventory,
.gge-layout-active .equipment-view.equipment-governors .equipment-empty-inventory {
  min-height:88px;
  padding:10px;
  font-size:12px;
}
@media (max-height:840px) {
  .gge-layout-active .content > .equipment-view.equipment-commanders,
  .gge-layout-active .content > .equipment-view.equipment-governors {
    padding:6px 0 66px !important;
    gap:6px;
  }
  .gge-layout-active .content > .equipment-view.equipment-commanders .view-title,
  .gge-layout-active .content > .equipment-view.equipment-governors .view-title {
    padding:6px 10px;
  }
  .gge-layout-active .content > .equipment-view.equipment-commanders .view-title h2,
  .gge-layout-active .content > .equipment-view.equipment-governors .view-title h2 {
    font-size:19px;
  }
  .gge-layout-active .equipment-view.equipment-commanders .equipment-shell,
  .gge-layout-active .equipment-view.equipment-governors .equipment-shell { gap:8px; }
  .gge-layout-active .equipment-view.equipment-commanders .equipment-character-list,
  .gge-layout-active .equipment-view.equipment-governors .equipment-character-list,
  .gge-layout-active .equipment-view.equipment-commanders .equipment-paperdoll,
  .gge-layout-active .equipment-view.equipment-governors .equipment-paperdoll,
  .gge-layout-active .equipment-view.equipment-commanders .equipment-summary,
  .gge-layout-active .equipment-view.equipment-governors .equipment-summary { padding:8px; }
  .gge-layout-active .equipment-view.equipment-commanders .equipment-hero-card,
  .gge-layout-active .equipment-view.equipment-governors .equipment-hero-card {
    grid-template-columns:74px 1fr;
    margin-bottom:8px;
    padding:8px;
  }
  .gge-layout-active .equipment-view.equipment-commanders .equipment-hero-portrait,
  .gge-layout-active .equipment-view.equipment-governors .equipment-hero-portrait {
    width:66px;
    height:76px;
    font-size:36px;
  }
  .gge-layout-active .equipment-view.equipment-commanders .equipment-hero-card h2,
  .gge-layout-active .equipment-view.equipment-governors .equipment-hero-card h2 { font-size:21px; }
  .gge-layout-active .equipment-view.equipment-commanders .equipment-slots,
  .gge-layout-active .equipment-view.equipment-governors .equipment-slots { grid-auto-rows:minmax(76px, 1fr); }
  .gge-layout-active .equipment-view.equipment-commanders .equipment-empty-slot,
  .gge-layout-active .equipment-view.equipment-governors .equipment-empty-slot { height:42px; }
  .gge-layout-active .equipment-view.equipment-commanders .equipment-set-card,
  .gge-layout-active .equipment-view.equipment-governors .equipment-set-card { padding:5px 7px; margin-bottom:4px; }
}
@media (max-width:1080px) {
  .gge-layout-active .equipment-view.equipment-commanders .equipment-shell,
  .gge-layout-active .equipment-view.equipment-governors .equipment-shell {
    grid-template-columns:190px minmax(360px,1fr) 320px;
  }
}

/* v0.1.131 — reforço de prioridade sobre as regras gerais das páginas de gestão */
.gge-layout-active .content > .view.equipment-view.equipment-commanders,
.gge-layout-active .content > .view.equipment-view.equipment-governors {
  padding:8px 0 74px !important;
  overflow:hidden !important;
  display:flex !important;
  flex-direction:column !important;
}
.gge-layout-active .content > .view.equipment-view.equipment-commanders .view-title,
.gge-layout-active .content > .view.equipment-view.equipment-governors .view-title {
  position:relative !important;
  top:auto !important;
  left:auto !important;
  right:auto !important;
  margin:0 !important;
  padding:8px 12px !important;
}
.gge-layout-active .content > .view.equipment-view.equipment-commanders .view-title > div:first-child,
.gge-layout-active .content > .view.equipment-view.equipment-governors .view-title > div:first-child,
.gge-layout-active .content > .view.equipment-view.equipment-commanders .view-title h2,
.gge-layout-active .content > .view.equipment-view.equipment-governors .view-title h2,
.gge-layout-active .content > .view.equipment-view.equipment-commanders .view-title p,
.gge-layout-active .content > .view.equipment-view.equipment-governors .view-title p {
  display:block !important;
}
@media (max-height:840px) {
  .gge-layout-active .content > .view.equipment-view.equipment-commanders,
  .gge-layout-active .content > .view.equipment-view.equipment-governors {
    padding:6px 0 66px !important;
  }
}


/* v0.1.136 — baixa o painel do jogador para ficar uns milímetros abaixo da linha amarela superior. */
body.gge-layout-active .player-card {
  top: calc(var(--gge-topbar-height, 36px) + 6px) !important;
}

/* v0.1.137 — centra a placa "Reino de ..." com o painel do jogador, sem alterar a altura vertical. */
body.gge-layout-active .topbar .mini-brand {
  position: fixed !important;
  z-index: 181 !important;
  left: 4px !important;
  top: 3px !important;
  width: 126px !important;
  min-width: 126px !important;
  max-width: 126px !important;
  height: 29px !important;
  padding: 0 6px !important;
  gap: 5px !important;
}
body.gge-layout-active .topbar .mini-brand .crest {
  width: 22px !important;
  height: 22px !important;
  min-width: 22px !important;
  font-size: 13px !important;
}
body.gge-layout-active .topbar .mini-brand small {
  max-width: 84px !important;
  font-size: 10.5px !important;
  line-height: 1 !important;
}

/* v0.1.138 — placa do reino mais larga sem cortar texto e painel do jogador centrado por baixo. */
body.gge-layout-active {
  --gge-left-panel-width: 170px;
}
body.gge-layout-active .player-card {
  left: 29px !important;
}
body.gge-layout-active .topbar .mini-brand {
  left: 4px !important;
  width: 176px !important;
  min-width: 176px !important;
  max-width: 176px !important;
  padding: 0 7px !important;
  gap: 6px !important;
}
body.gge-layout-active .topbar .mini-brand .crest {
  width: 23px !important;
  height: 23px !important;
  min-width: 23px !important;
}
body.gge-layout-active .topbar .mini-brand small {
  max-width: 132px !important;
  font-size: 11px !important;
  line-height: 1 !important;
}

/* v0.1.139 — desce a placa "Reino de ..." para ficar abaixo da linha amarela com a mesma margem visual.
   O painel do jogador baixa apenas o necessário para não ficar tapado pela placa. */
body.gge-layout-active .topbar .mini-brand {
  top: calc(var(--gge-topbar-height, 36px) + 6px) !important;
}
body.gge-layout-active .player-card {
  top: calc(var(--gge-topbar-height, 36px) + 43px) !important;
}

/* v0.1.140 — reposiciona corretamente: a placa do reino fica acima da linha amarela e o painel do jogador fica abaixo. */
body.gge-layout-active .topbar .mini-brand {
  top: 3px !important;
}
body.gge-layout-active .player-card {
  top: calc(var(--gge-topbar-height, 36px) + 6px) !important;
}

/* v0.1.141 — centra verticalmente a placa "Reino de ..." dentro da faixa castanha superior.
   O painel do jogador continua abaixo da linha amarela. */
body.gge-layout-active .topbar .mini-brand {
  top: 8px !important;
}
body.gge-layout-active .player-card {
  top: calc(var(--gge-topbar-height, 46px) + 6px) !important;
}


/* v0.1.142 — remove o presente do topo e encosta definições/sair ao lado direito,
   centrados verticalmente na faixa castanha superior. */
body.gge-layout-active .topbar .top-actions {
  position: fixed !important;
  z-index: 182 !important;
  right: 8px !important;
  top: 0 !important;
  height: var(--gge-topbar-height, 46px) !important;
  display: flex !important;
  align-items: center !important;
  justify-content: flex-end !important;
  gap: 6px !important;
  padding: 0 !important;
  margin: 0 !important;
}
body.gge-layout-active .topbar .top-actions .icon-btn[data-action="claim-daily"],
body.gge-layout-active .gge-daily-reward-dock {
  display: none !important;
}
body.gge-layout-active .topbar .top-actions .icon-btn {
  width: 29px !important;
  height: 29px !important;
  display: inline-grid !important;
  place-items: center !important;
  margin: 0 !important;
  line-height: 1 !important;
}

/* v0.1.144 — mantém o nome do reino sempre centrado dentro da placa,
   mesmo quando o texto é curto ou longo. */
body.gge-layout-active .topbar .mini-brand {
  display: flex !important;
  align-items: center !important;
}
body.gge-layout-active .topbar .mini-brand > div:not(.crest) {
  flex: 1 1 auto !important;
  min-width: 0 !important;
  height: 100% !important;
  display: flex !important;
  align-items: center !important;
  justify-content: center !important;
}
body.gge-layout-active .topbar .mini-brand small#kingdom-label,
body.gge-layout-active .topbar .mini-brand small {
  width: 100% !important;
  max-width: 100% !important;
  text-align: center !important;
  display: block !important;
  padding: 0 2px !important;
  box-sizing: border-box !important;
}
