/* Painel da guilda (guilda-ui.js: gdLado, abaVisao, gdDireita) e editor de estandarte (estandarte.js), 27/09/2026, no molde das
   telas do dono: janela larga, três colunas, moldura de bronze, título em versalete dourado. Camada: só pinta, não muda regra. */
#jan.jlarga { width: min(1600px, 97vw); height: min(920px, 93vh); max-height: 93vh; }
#jan.jlarga #janC { display: block; padding: 12px; overflow-y: auto; }
.gdp .win, .ed .win, .ed-rodape { box-shadow: 0 0 0 1px #000, 0 0 0 2px #5c4a2c, 0 0 0 3px #1a140c, inset 0 0 0 1px rgba(228,188,108,.14) !important; border-radius: 6px; }
.gdp-t { display: flex; align-items: center; gap: 8px; margin: 0 0 8px; padding: 0 0 6px; border-bottom: 1px solid rgba(92,74,44,.7); color: #ffd98a;
  font: 700 14px/1.2 var(--font-display); letter-spacing: .08em; text-transform: uppercase; }
.gdp-t img { width: 24px; height: 24px; image-rendering: pixelated; }
.gdp-t small { margin-left: auto; color: var(--ink-muted); font: 400 11px var(--font-serif); letter-spacing: 0; text-transform: none; }
.gdp-sec { margin-top: 14px; }

/* ---------- painel: três colunas ---------- */
.gdp { display: grid; grid-template-columns: 290px minmax(0, 1fr) 330px; gap: 12px; align-items: start; }
.gdp-lado, .gdp-meio, .gdp-dir { display: flex; flex-direction: column; gap: 12px; min-width: 0; }
.gdp-cartao { padding: 14px; text-align: center; }
.gdp-emb { width: 112px; height: 112px; margin: 28px auto 34px; display: grid; place-items: center; transform: rotate(45deg); border-radius: 8px;
  background: radial-gradient(circle, #2a2013, #0b0907 72%); box-shadow: 0 0 0 2px #000, 0 0 0 4px #c9a24a, 0 0 0 5px #000, 0 0 18px rgba(228,188,108,.3); }
.gdp-emb img { transform: rotate(-45deg); }
.gdp-cartao h3 { margin: 6px 0 8px; color: #ffd98a; font: 700 20px/1.15 var(--font-display); letter-spacing: .04em; text-shadow: 0 2px 2px #000; }
.gdp-cartao h3 small { display: block; color: var(--ink-muted); font: 600 12px var(--font-mono); letter-spacing: .1em; }
.gdp-niv { display: flex; justify-content: space-between; align-items: baseline; color: var(--ink-muted); font-size: 13px; }
.gdp-niv b { color: #ffd98a; font: 700 18px var(--font-display); }
.gdp-xp { height: 10px !important; } .gdp-cartao .nota { margin: 4px 0 0; }
.gdp-msg { padding: 12px 14px; color: var(--ink); font: italic 400 14px/1.45 var(--font-serif); }
.gdp-ficha { padding: 6px 12px; }
.gdp-info { display: grid; grid-template-columns: 26px 1fr auto; gap: 8px; align-items: center; padding: 7px 0; border-bottom: 1px solid rgba(92,74,44,.35); font-size: 13px; }
.gdp-info:last-child { border-bottom: 0; }
.gdp-info img { width: 24px; height: 24px; image-rendering: pixelated; }
.gdp-info span { color: var(--ink-muted); } .gdp-info b { color: var(--ink); text-align: right; } .gdp-info b small { color: var(--ink-muted); font-weight: 400; }
.gdp-info .bom { color: #4de37a; } .gdp-info .igual { color: var(--ink-muted); }
.gdp-bts { display: flex; flex-direction: column; gap: 8px; }
.gdp-bts .bt { display: flex; align-items: center; justify-content: center; gap: 10px; min-height: 42px; font: 700 13px var(--font-display); letter-spacing: .06em; text-transform: uppercase; }
.gdp-bts .bt img { width: 26px; height: 26px; image-rendering: pixelated; }
.gdp-selo { display: inline-grid; place-items: center; min-width: 20px; height: 20px; padding: 0 5px; border-radius: 10px; background: #c0392b; color: #fff; font: 700 11px var(--font-mono); }

.gdp-abas { display: flex; gap: 0; margin: 0 !important; padding: 0; border-radius: 6px; overflow: hidden; box-shadow: 0 0 0 1px #000, 0 0 0 2px #5c4a2c; }
.gdp-abas .bt { flex: 1; display: flex; align-items: center; justify-content: center; gap: 8px; min-height: 44px; border-radius: 0; font: 700 12px var(--font-display); letter-spacing: .06em; text-transform: uppercase; }
.gdp-abas .bt + .bt { border-left: 1px solid rgba(92,74,44,.6) !important; }
.gdp-abas .bt img { width: 22px; height: 22px; image-rendering: pixelated; }

.gdp-guerra { padding: 12px 14px; }
.gdp-fase { margin-left: auto; padding: 4px 10px; border-radius: 4px; background: #1d2a1a; color: #8fdc8a; font: 600 11px var(--font-mono); letter-spacing: .04em; text-transform: none; box-shadow: 0 0 0 1px #3f6a3a; }
.gdp-fase.on { background: #3a1512; color: #ff9d8a; box-shadow: 0 0 0 1px #8a3a2a; }
.gdp-gcorpo { display: grid; grid-template-columns: minmax(0, 1.6fr) minmax(210px, 1fr); gap: 12px; }
.gdp-gimg { position: relative; min-height: 220px; border-radius: 6px; overflow: hidden; box-shadow: inset 0 0 0 1px #000; }
.gdp-gimg > img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; object-position: 50% 40%; filter: saturate(.95); }
.gdp-placar { position: absolute; left: 50%; bottom: 12px; transform: translateX(-50%); display: flex; align-items: center; gap: 10px; padding: 6px 14px; border-radius: 6px;
  background: rgba(6,7,9,.82); box-shadow: 0 0 0 1px #000, 0 0 0 2px #8a6d3b; }
.gdp-placar b { color: #ffd98a; font: 700 26px var(--font-display); } .gdp-placar span { color: var(--ink-muted); }
.gdp-gdados { display: flex; flex-direction: column; gap: 10px; }
.gdp-rel { padding: 10px 12px; text-align: center; }
.gdp-rel p { margin: 0 0 4px; color: var(--ink-muted); font-size: 13px; }
.gdp-rel > b { color: #ffd98a; font: 700 26px var(--font-display); }
.gdp-part { height: 10px !important; } .gdp-part i { background: linear-gradient(#35e763, #0a9a31) !important; }
.gdp-conf { min-height: 50px; font: 700 14px var(--font-display) !important; letter-spacing: .06em; text-transform: uppercase; color: #fff !important;
  background: linear-gradient(#b3322a, #6e1511) !important; box-shadow: 0 0 0 1px #000, 0 0 0 2px #d9a441 !important; border: 0 !important; }
.gdp-conf:hover:not(:disabled) { filter: brightness(1.15); }
.gdp-obra { display: flex; gap: 12px; align-items: center; padding: 10px 14px; } .gdp-obra img { width: 40px; height: 40px; image-rendering: pixelated; }
.gdp-obra > div { flex: 1; } .gdp-obra h5 { margin: 0 0 4px; }
.gdp-bons { display: grid; grid-template-columns: repeat(auto-fill, minmax(190px, 1fr)); gap: 10px; }
.gdp-bon { display: flex; gap: 10px; align-items: center; padding: 10px 12px; opacity: .6; }
.gdp-bon.on { opacity: 1; }
.gdp-bon img { width: 36px; height: 36px; image-rendering: pixelated; }
.gdp-bon b { display: block; color: #4de37a; font: 700 18px var(--font-display); } .gdp-bon:not(.on) b { color: var(--ink-muted); }
.gdp-bon span { display: block; color: var(--ink); font-size: 13px; } .gdp-bon small { color: var(--ink-muted); font-size: 11px; }

.gdp-caixa { padding: 10px 12px; }
.gdp-m { display: grid; grid-template-columns: 22px minmax(0, 1fr) 70px 60px 14px; gap: 6px; align-items: center; padding: 6px 2px; border-bottom: 1px solid rgba(92,74,44,.3); font-size: 13px; }
.gdp-m.eu { background: rgba(228,188,108,.08); }
.gdp-mcab { color: var(--ink-muted); font-size: 11px; text-transform: uppercase; letter-spacing: .04em; }
.gdp-pos { color: var(--ink-muted); font-family: var(--font-mono); }
.gdp-nome { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; color: var(--ink); }
.gdp-m > b { text-align: right; font-family: var(--font-mono); font-weight: 600; color: var(--ink); }
.gdp-on { color: #5a5f63; font-size: 11px; text-align: center; } .gdp-on.sim { color: #3ddc6a; text-shadow: 0 0 6px rgba(61,220,106,.6); }
.gdp-todos { width: 100%; margin-top: 8px; }
.gdp-regs { max-height: 330px; overflow-y: auto; scrollbar-width: thin; display: flex; flex-direction: column; gap: 6px; }
.gdp-reg { display: grid; grid-template-columns: 42px 1fr; gap: 6px; font-size: 12.5px; line-height: 1.4; }
.gdp-reg small { color: var(--ink-muted); font-family: var(--font-mono); } .gdp-reg span { color: var(--ink); }

/* ---------- editor de estandarte ---------- */
.ed { display: grid; grid-template-columns: 270px minmax(0, 1fr) 320px; gap: 12px; align-items: start; }
.ed-base, .ed-editor, .ed-prev { padding: 12px; }
.ed-abas { display: flex; gap: 4px; margin-bottom: 8px; } .ed-abas .bt { flex: 1; }
.ed-icones { display: grid; grid-template-columns: repeat(auto-fill, minmax(50px, 1fr)); gap: 6px; max-height: 470px; overflow-y: auto; }
.ed-ico { padding: 4px; line-height: 0; } .ed-ico.on { box-shadow: 0 0 0 2px #e4bc6c !important; }
.ed-bts { display: flex; flex-direction: column; gap: 6px; margin-top: 10px; }
.ed-dica { display: flex; flex-direction: column; gap: 3px; padding: 8px; border-radius: 4px; background: rgba(0,0,0,.35); font-size: 12px; color: var(--ink-muted); }
.ed-dica b { color: var(--ink); }
.ed-barra { display: flex; gap: 4px; align-items: center; flex-wrap: wrap; margin-bottom: 10px; }
.ed-ferr { min-width: 44px; min-height: 40px; font-size: 18px; }
.ed-ferr.on { box-shadow: 0 0 0 1px #000, 0 0 0 2px #e4bc6c !important; color: #ffd98a; }
.ed-tam { margin-left: auto; color: var(--ink-muted); font: 600 12px var(--font-mono); }
.ed-tela { display: grid; place-items: center; padding: 10px; border-radius: 6px; background: #07080a; }
.ed-tela canvas { width: min(480px, 100%); aspect-ratio: 1; image-rendering: pixelated; cursor: crosshair; touch-action: none; box-shadow: 0 0 0 1px #000, 0 0 0 2px #3d3322; }
.ed-paleta { margin-top: 10px; }
.ed-cores { display: grid; grid-template-columns: repeat(16, minmax(0, 1fr)); gap: 4px; margin: 4px 0 10px; }
.ed-cor { aspect-ratio: 1; min-width: 0; padding: 0; border: 0; border-radius: 3px; cursor: pointer; box-shadow: inset 0 0 0 1px rgba(0,0,0,.6), 0 0 0 1px #3d3322; }
.ed-transp { background: repeating-conic-gradient(#555 0 25%, #bbb 0 50%) 0 / 10px 10px; }
.ed-cor.c1 { box-shadow: inset 0 0 0 1px #000, 0 0 0 2px #ffd98a; } .ed-cor.c2 { outline: 2px dashed #9fc2e8; outline-offset: 1px; }
.ed-prim { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; font-size: 12px; color: var(--ink-muted); }
.ed-prim label { display: inline-flex; align-items: center; gap: 6px; }
.ed-amostra { width: 26px; height: 26px; border-radius: 4px; box-shadow: 0 0 0 1px #000, 0 0 0 2px #5c4a2c; background-image: repeating-conic-gradient(#555 0 25%, #bbb 0 50%); background-size: 10px 10px; }
.ed-prim input[type=color] { width: 34px; height: 26px; padding: 0; border: 0; background: none; cursor: pointer; }
.ed-imp { cursor: pointer; }
.ed-castelo { position: relative; height: 210px; border-radius: 6px; overflow: hidden; box-shadow: inset 0 0 0 1px #000; }
.ed-castelo > img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; object-position: 50% 45%; filter: brightness(.7); }
.ed-bandeira { position: absolute; left: 50%; top: 18px; transform: translateX(-50%); width: 132px; height: 170px; display: grid; place-items: center; padding-bottom: 20px;
  background: linear-gradient(#8f1d1b, #5c0f0e); clip-path: polygon(0 0, 100% 0, 100% 86%, 50% 100%, 0 86%); box-shadow: inset 0 0 0 3px #d9a441; }
.ed-bandeira::before { content: ''; position: absolute; inset: 0; clip-path: inherit; box-shadow: inset 0 0 0 3px #d9a441; pointer-events: none; }
.ed-lista, .ed-cartao { display: flex; gap: 10px; align-items: center; padding: 10px; margin-top: 10px; border-radius: 6px; background: rgba(0,0,0,.35); }
.ed-lista div, .ed-cartao div { display: flex; flex-direction: column; } .ed-lista small, .ed-cartao small { color: var(--ink-muted); font-size: 11px; }
.ed-regras { display: flex; flex-direction: column; gap: 2px; margin-top: 10px; padding: 8px 10px; border-radius: 4px; background: rgba(0,0,0,.35); font-size: 12px; color: var(--ink-muted); }
.ed-regras b { color: var(--ink); }
.ed-rodape { display: flex; justify-content: flex-end; gap: 8px; margin-top: 12px; padding: 10px; }
.ed-rodape .bt { min-height: 42px; min-width: 150px; }
.ed-publica { font: 700 14px var(--font-display) !important; letter-spacing: .06em; text-transform: uppercase; color: #fff !important; background: linear-gradient(#b3322a, #6e1511) !important;
  box-shadow: 0 0 0 1px #000, 0 0 0 2px #d9a441 !important; border: 0 !important; }

@media (max-width: 1350px) {
  .gdp { grid-template-columns: 250px minmax(0, 1fr); } .gdp-dir { grid-column: 1 / -1; display: grid; grid-template-columns: 1fr 1fr; }
  .ed { grid-template-columns: 240px minmax(0, 1fr); } .ed-prev { grid-column: 1 / -1; }
}
@media (max-width: 900px) {
  .gdp, .ed { grid-template-columns: minmax(0, 1fr); } .gdp-dir { grid-template-columns: 1fr; } .gdp-gcorpo { grid-template-columns: 1fr; }
  .gdp-abas { flex-wrap: wrap; } .gdp-abas .bt { flex: 1 1 30%; }
  .ed-cores { grid-template-columns: repeat(8, minmax(0, 1fr)); } .ed-rodape { flex-wrap: wrap; } .ed-rodape .bt { flex: 1 1 45%; min-width: 0; }
}
