:root {
  --bg: #111318;
  --panel: #20252c;
  --panel2: #2b3139;
  --panel3: #343b45;
  --gold: #d6a94e;
  --gold2: #f0d18a;
  --wood: #9b6138;
  --stone: #9ca4ae;
  --food: #7eb05d;
  --coin: #f2c85b;
  --gem: #66d5dc;
  --danger: #c84e4e;
  --success: #5ba56e;
  --text: #f4efe4;
  --muted: #b8bdc6;
  --border: #4c5663;
}
* { box-sizing: border-box; }
html, body { margin:0; width:100%; height:100%; overflow:hidden; font-family: Inter, Segoe UI, Arial, sans-serif; background:var(--bg); color:var(--text); }
button, input, select { font:inherit; }
button { cursor:pointer; }
#app { width:100%; height:100%; }
.hidden { display:none !important; }

.auth-shell {
  height:100%; display:grid; place-items:center; position:relative; overflow:hidden;
  background:
    radial-gradient(circle at 50% 25%, rgba(214,169,78,.22), transparent 30%),
    linear-gradient(rgba(8,10,14,.35), rgba(8,10,14,.9)),
    repeating-linear-gradient(135deg, #202630 0 36px, #1b2028 36px 72px);
}
.auth-shell::before { content:""; position:absolute; inset:0; background:linear-gradient(90deg, transparent 49.7%, rgba(255,255,255,.025) 50%, transparent 50.3%); }
.auth-card { width:460px; padding:34px; border:1px solid #6f6040; border-radius:18px; background:linear-gradient(180deg, rgba(39,44,52,.98), rgba(24,28,34,.98)); box-shadow:0 28px 80px #000a; position:relative; }
.brand { text-align:center; margin-bottom:24px; }
.brand-emblem { width:88px; height:88px; margin:0 auto 12px; display:grid; place-items:center; font-size:50px; border:3px solid var(--gold); border-radius:50%; background:radial-gradient(circle, #4d291b, #1b1311); box-shadow:0 0 30px #d6a94e44; }
.brand h1 { margin:0; font-family: Georgia, serif; font-size:36px; color:var(--gold2); letter-spacing:.5px; }
.brand p { margin:6px 0 0; color:var(--muted); }
.auth-tabs { display:flex; gap:8px; margin-bottom:18px; }
.auth-tabs button { flex:1; border:1px solid var(--border); color:var(--muted); background:#171b21; padding:11px; border-radius:8px; }
.auth-tabs button.active { color:#17120a; background:var(--gold); border-color:var(--gold2); font-weight:700; }
.field { margin:12px 0; }
.field label { display:block; color:var(--muted); font-size:13px; margin-bottom:6px; }
.field input, .field select { width:100%; padding:12px 13px; border-radius:8px; border:1px solid var(--border); background:#15191f; color:var(--text); outline:none; }
.field input:focus { border-color:var(--gold); box-shadow:0 0 0 3px #d6a94e22; }
.primary-btn { width:100%; margin-top:10px; border:1px solid #f0d18a; color:#1b160c; background:linear-gradient(#edc76e, #c79333); padding:12px 16px; font-weight:800; border-radius:8px; box-shadow:inset 0 1px #fff8; }
.primary-btn:hover { filter:brightness(1.08); }
.auth-message { min-height:22px; margin-top:12px; color:#f09a91; text-align:center; font-size:13px; }

.game-shell { height:100%; display:grid; grid-template-rows:74px 1fr 36px; background:#15181d; }
.topbar { display:grid; grid-template-columns:270px auto 1fr auto; align-items:center; gap:12px; padding:8px 14px; background:linear-gradient(#323944,#252b33); border-bottom:2px solid #7a6334; box-shadow:0 4px 16px #0008; z-index:5; }
.mini-brand { display:flex; align-items:center; gap:10px; }
.mini-brand .crest { width:48px; height:48px; display:grid; place-items:center; border:2px solid var(--gold); border-radius:50%; background:#251a16; font-size:26px; }
.mini-brand strong { font-family:Georgia,serif; color:var(--gold2); font-size:19px; }
.mini-brand small { display:block; color:var(--muted); margin-top:2px; }
.resource-row { display:flex; justify-content:center; gap:8px; min-width:0; }
.resource { min-width:116px; padding:8px 10px; border-radius:8px; border:1px solid #505966; background:linear-gradient(#1d2229,#171b20); box-shadow:inset 0 1px #ffffff12; }
.resource .r-top { display:flex; justify-content:space-between; gap:8px; align-items:center; }
.resource .r-name { color:var(--muted); font-size:11px; text-transform:uppercase; letter-spacing:.5px; }
.resource .r-value { font-weight:800; }
.resource .r-rate { font-size:10px; color:#7fca91; margin-top:2px; text-align:right; }
.top-actions { display:flex; align-items:center; gap:8px; }
.icon-btn { width:42px; height:42px; border:1px solid var(--border); border-radius:8px; background:#181d23; color:var(--text); font-size:19px; }
.icon-btn:hover { border-color:var(--gold); }

.main-layout { min-height:0; display:grid; grid-template-columns:220px 1fr 300px; }
.sidebar { min-height:0; padding:10px; background:linear-gradient(90deg,#242a32,#1f242b); border-right:1px solid #4b535e; overflow:auto; }
.nav-btn { width:100%; display:flex; gap:11px; align-items:center; border:1px solid transparent; color:#d6d9df; background:transparent; padding:11px 12px; margin:3px 0; border-radius:8px; text-align:left; }
.nav-btn:hover { background:#ffffff0b; border-color:#ffffff13; }
.nav-btn.active { background:linear-gradient(90deg,#765626,#3e3424); border-color:#9b783c; color:#fff3d1; }
.nav-icon { width:24px; text-align:center; font-size:18px; }
.player-card { padding:12px; margin-bottom:12px; background:#161a20; border:1px solid var(--border); border-radius:10px; }
.player-name { font-weight:800; color:var(--gold2); }
.level-line { display:flex; justify-content:space-between; color:var(--muted); font-size:12px; margin-top:8px; }
.progress { height:8px; background:#0e1115; border:1px solid #3d4651; border-radius:10px; overflow:hidden; margin-top:5px; }
.progress > i { display:block; height:100%; background:linear-gradient(90deg,#b17f30,#f0d477); }

.content { min-width:0; min-height:0; overflow:auto; position:relative; background:radial-gradient(circle at center,#394636,#202824 72%); }
.view { padding:16px; min-height:100%; }
.view-title { display:flex; align-items:center; justify-content:space-between; gap:12px; margin-bottom:14px; }
.view-title h2 { margin:0; font-family:Georgia,serif; color:#f3d897; }
.view-title p { margin:4px 0 0; color:var(--muted); font-size:13px; }

.castle-scene { min-height:680px; border:2px solid #6f6044; border-radius:14px; padding:18px; position:relative; overflow:hidden; background:
  linear-gradient(#8fc7d8 0 24%, #7eaf6f 24% 100%);
  box-shadow:inset 0 0 80px #10210f66,0 14px 40px #0007;
}
.castle-scene::before { content:""; position:absolute; left:-5%; right:-5%; top:18%; height:120px; background:linear-gradient(155deg,transparent 49%,#667865 50% 62%,transparent 63%),linear-gradient(25deg,transparent 48%,#778a70 49% 63%,transparent 64%); opacity:.65; }
.castle-grid { position:relative; z-index:1; display:grid; grid-template-columns:repeat(6,minmax(105px,1fr)); gap:12px; max-width:950px; margin:82px auto 0; transform:perspective(1000px) rotateX(3deg); }
.castle-slot { aspect-ratio:1.25; min-height:95px; border:2px dashed #4f6549; border-radius:12px; background:#47604155; display:flex; align-items:center; justify-content:center; position:relative; transition:.15s; }
.castle-slot:hover { transform:translateY(-3px); border-color:#e8cf83; background:#6b7c5355; }
.castle-slot.empty { color:#e8e2cf99; font-size:30px; }
.building { width:92%; height:90%; border:2px solid #6a5637; border-radius:9px; background:linear-gradient(145deg,#d6c197,#8c744e); box-shadow:0 8px 14px #0007,inset 0 1px #fff7; display:flex; flex-direction:column; justify-content:center; align-items:center; text-align:center; padding:5px; color:#241c12; }
.building .b-icon { font-size:32px; filter:drop-shadow(0 2px 1px #fff6); }
.building .b-name { font-weight:900; font-size:12px; line-height:1.1; }
.building .b-level { font-size:10px; margin-top:3px; background:#261d14cc; color:#ffe6aa; padding:2px 7px; border-radius:9px; }
.timer-badge { position:absolute; left:5px; right:5px; bottom:5px; background:#111d; color:#fff; border-radius:5px; padding:3px 5px; font-size:10px; text-align:center; }

.rightbar { min-height:0; overflow:auto; background:linear-gradient(-90deg,#242a32,#1d2229); border-left:1px solid #4b535e; padding:10px; }
.panel { border:1px solid var(--border); background:#171c22; border-radius:10px; margin-bottom:10px; overflow:hidden; }
.panel h3 { margin:0; padding:10px 12px; font-size:14px; color:var(--gold2); background:#2a3038; border-bottom:1px solid #414a55; }
.panel-body { padding:10px; }
.queue-item, .mini-item { padding:8px; border:1px solid #3d4651; border-radius:7px; background:#20262d; margin-bottom:7px; }
.queue-item:last-child,.mini-item:last-child { margin-bottom:0; }
.queue-item strong,.mini-item strong { display:block; font-size:12px; }
.queue-item small,.mini-item small { color:var(--muted); }
.empty-state { color:#8f97a2; text-align:center; padding:16px 8px; font-size:12px; }

.card-grid { display:grid; grid-template-columns:repeat(auto-fill,minmax(210px,1fr)); gap:12px; }
.game-card { border:1px solid #56606c; background:linear-gradient(#2a3038,#1d2228); border-radius:10px; overflow:hidden; box-shadow:0 8px 20px #0005; }
.game-card-head { display:flex; align-items:center; gap:10px; padding:12px; background:#333b45; border-bottom:1px solid #4d5865; }
.game-card-icon { font-size:30px; width:42px; text-align:center; }
.game-card h3 { margin:0; font-size:15px; color:#f1da9b; }
.game-card small { color:var(--muted); }
.game-card-body { padding:12px; }
.stats-line { display:flex; justify-content:space-between; gap:8px; color:var(--muted); font-size:12px; margin:6px 0; }
.stats-line strong { color:var(--text); }
.action-btn { border:1px solid #b68a3a; background:linear-gradient(#d6a94e,#a67528); color:#211708; font-weight:800; padding:8px 12px; border-radius:7px; }
.action-btn:disabled { filter:grayscale(1); opacity:.5; cursor:not-allowed; }
.secondary-btn { border:1px solid #65717f; background:#2b333d; color:var(--text); padding:8px 12px; border-radius:7px; }
.danger-btn { border:1px solid #db6d6d; background:#873b3b; color:white; padding:8px 12px; border-radius:7px; }
.btn-row { display:flex; gap:8px; margin-top:10px; flex-wrap:wrap; }

.map-view { height:100%; min-height:0; display:flex; flex-direction:column; overflow:hidden; padding:12px; }
.map-view .view-title { flex:0 0 auto; margin-bottom:8px; }
.world-toolbar { flex:0 0 auto; min-height:48px; display:flex; align-items:center; justify-content:space-between; gap:10px; margin-bottom:8px; padding:7px 9px; border:1px solid #6f6044; border-radius:9px; background:linear-gradient(#343b42,#252b31); box-shadow:0 5px 16px #0005; }
.coordinate-search { display:flex; align-items:center; gap:7px; color:#e9d49b; font-size:12px; }
.coordinate-search strong { margin-right:3px; }
.coordinate-search label { display:flex; align-items:center; gap:4px; color:#d9dde1; }
.coordinate-search input { width:78px; padding:7px 8px; color:white; background:#151a1f; border:1px solid #65717f; border-radius:6px; }
.world-map-shell { position:relative; flex:1 1 auto; min-height:520px; overflow:hidden; border-radius:14px; }
.world-map { position:absolute; inset:0; border:2px solid #846d3f; border-radius:14px; overflow:auto; background:#334327; cursor:grab; overscroll-behavior:none; scrollbar-width:none; box-shadow:inset 0 0 70px #111a0f99,0 12px 30px #0008; outline:none; }
.world-map::-webkit-scrollbar { display:none; }
.world-map.dragging { cursor:grabbing; }
.world-map:focus-visible { box-shadow:inset 0 0 70px #111a0f99,0 0 0 2px #e2bd62,0 12px 30px #0008; }
.world-map-stage { position:relative; transform-origin:top left; }
.world-space { position:absolute; left:0; top:0; transform-origin:top left; will-change:transform; background-image:linear-gradient(#1a26101a,#1a26101a),url('../assets/mapa_mundial.jpg'); background-size:100% 100%; background-position:center; background-repeat:no-repeat; overflow:hidden; }
.world-space::before { content:""; position:absolute; inset:0; z-index:1; pointer-events:none; opacity:.13; background-image:linear-gradient(to right,#f4e1a3 1px,transparent 1px),linear-gradient(to bottom,#f4e1a3 1px,transparent 1px); background-size:600px 400px; mix-blend-mode:soft-light; }
.world-space::after { content:""; position:absolute; inset:0; z-index:2; pointer-events:none; box-shadow:inset 0 0 180px #12200ddd; }
.world-map-hint,.world-zoom-readout { position:absolute; z-index:20; bottom:12px; padding:7px 10px; color:#fff7db; background:#17180fd9; border:1px solid #b18a43; border-radius:7px; box-shadow:0 4px 12px #0008; pointer-events:none; font-size:11px; }
.world-map-hint { right:12px; color:#e0ded7; }
.world-zoom-readout { top:12px; right:12px; bottom:auto; font-weight:800; color:#ffe2a0; }
.map-node { position:absolute; transform:translate(-50%,-50%); z-index:6; width:156px; text-align:center; user-select:none; }
.map-node button { transition:transform .15s,filter .15s,border-color .15s; }
.map-node button:hover:not(:disabled) { transform:scale(1.08); }
.map-node span { display:block; width:max-content; max-width:180px; margin:2px auto 0; padding:4px 7px; color:white; background:#16170ee8; border:1px solid #a78342; border-radius:5px; box-shadow:0 3px 8px #0009; font-size:11px; font-weight:800; white-space:nowrap; text-shadow:0 1px 2px #000; pointer-events:none; }
.map-node span small { display:block; margin-top:2px; color:#d6c89d; font-size:9px; font-weight:600; }
.map-node.player .player-castle-btn { width:72px; height:72px; border-radius:50%; border:3px solid #ffe3a4; background:radial-gradient(circle,#e8ca80,#704519); box-shadow:0 8px 16px #0009; font-size:34px; }
.map-node.player-own { z-index:8; }
.map-node.player-own span { border-color:#ffe29b; background:#3e2b14ec; }
.map-node.player-other .player-castle-btn { border-color:#b9c8d6; background:radial-gradient(circle,#aab8c7,#495867); }
.map-node.player-other span { border-color:#8796a4; }

.table { width:100%; border-collapse:collapse; background:#1a1f25; border:1px solid var(--border); border-radius:10px; overflow:hidden; }
.table th,.table td { padding:10px; border-bottom:1px solid #343c45; text-align:left; font-size:13px; }
.table th { background:#303842; color:#e9d49b; }
.table tr:hover td { background:#ffffff05; }
.report-win { color:#72cb8a; font-weight:800; }
.report-loss { color:#e17979; font-weight:800; }

.alliance-layout { display:grid; grid-template-columns:1fr 360px; gap:14px; }
.chat-box { height:350px; overflow:auto; background:#11151a; border:1px solid var(--border); border-radius:8px; padding:10px; }
.chat-msg { margin-bottom:8px; padding:7px 9px; background:#222830; border-radius:7px; }
.chat-msg b { color:var(--gold2); }
.chat-msg small { color:#7e8792; float:right; }
.chat-input { display:flex; gap:8px; margin-top:8px; }
.chat-input input { flex:1; padding:10px; border:1px solid var(--border); border-radius:7px; background:#11161b; color:white; }

.footer { display:flex; align-items:center; justify-content:space-between; padding:0 12px; background:#101319; border-top:1px solid #343b45; color:#737d88; font-size:11px; }

.modal-backdrop { position:fixed; inset:0; z-index:100; display:grid; place-items:center; background:#05070aaa; backdrop-filter:blur(3px); }
.modal { width:min(620px,92vw); max-height:88vh; overflow:auto; border:1px solid #8c713d; border-radius:13px; background:linear-gradient(#303740,#1b2026); box-shadow:0 30px 100px #000; }
.modal-head { display:flex; justify-content:space-between; align-items:center; padding:14px 16px; background:#3a424c; border-bottom:1px solid #596471; }
.modal-head h3 { margin:0; color:var(--gold2); }
.modal-close { border:0; background:transparent; color:white; font-size:22px; }
.modal-body { padding:16px; }
.modal-actions { display:flex; justify-content:flex-end; gap:8px; padding:12px 16px; border-top:1px solid #414a55; }
.choice-grid { display:grid; grid-template-columns:repeat(2,1fr); gap:10px; }
.choice { border:1px solid #52606e; border-radius:8px; padding:10px; background:#20262e; }
.choice:hover { border-color:var(--gold); }
.choice .choice-title { font-weight:800; color:#f2d893; }
.costs { display:flex; flex-wrap:wrap; gap:5px; margin-top:7px; }
.cost { font-size:11px; background:#11161b; padding:4px 6px; border-radius:5px; color:#dfe3e7; }
.number-row { display:grid; grid-template-columns:1fr 110px; gap:10px; align-items:center; padding:8px 0; border-bottom:1px solid #333b45; }
.number-row input { width:100%; padding:8px; background:#11161b; color:white; border:1px solid #59636e; border-radius:6px; }

#toast-root { position:fixed; right:18px; top:88px; z-index:200; display:flex; flex-direction:column; gap:8px; }
.toast { min-width:280px; max-width:390px; padding:12px 14px; border:1px solid #607080; border-left:5px solid var(--gold); border-radius:8px; background:#1e252deF; box-shadow:0 12px 30px #0008; animation:toastin .22s ease; }
.toast.success { border-left-color:#61b77a; }
.toast.error { border-left-color:#d95858; }
@keyframes toastin { from { transform:translateX(30px); opacity:0; } }

@media (max-width:1250px) {
  .main-layout { grid-template-columns:190px 1fr 260px; }
  .resource { min-width:95px; }
  .castle-grid { grid-template-columns:repeat(5,minmax(95px,1fr)); }
}

/* Barões Falken no mapa mundial — escala compacta semelhante ao GGE */
.map-node.enemy { width:108px; }
.map-node.enemy .falken-node-btn {
  position:relative;
  width:56px;
  height:72px;
  padding:0;
  border:0;
  overflow:visible;
  background:transparent;
  box-shadow:none;
}
.map-node.enemy .falken-node-btn img {
  display:block;
  width:56px;
  height:72px;
  object-fit:contain;
  pointer-events:none;
  filter:drop-shadow(0 5px 4px #000b);
}
.map-node.enemy .falken-node-btn:hover:not(:disabled) {
  filter:brightness(1.12);
}
.map-node.enemy .falken-node-btn:disabled {
  cursor:not-allowed;
  filter:grayscale(.35) brightness(.72);
}
.map-cooldown-icon {
  position:absolute;
  inset:12px 5px 5px;
  display:grid;
  place-items:center;
  border-radius:50%;
  font-size:18px;
  color:white;
  background:#11182777;
  text-shadow:0 2px 5px #000;
  pointer-events:none;
}

@media (max-height:820px) {
  .world-map-shell { min-height:430px; }
  .world-map-hint { display:none; }
}

/* =========================================================
   Sistema modular: interação e espionagem dos Barões Falken
   Ficheiro lógico: src/falken-espionage.js
   ========================================================= */
.falken-action-card {
  display:flex;
  align-items:center;
  gap:18px;
  padding:14px;
  border:1px solid #7f693f;
  border-radius:10px;
  background:linear-gradient(135deg,#2a261d,#171a1d);
}
.falken-action-card img {
  width:116px;
  height:140px;
  object-fit:contain;
  filter:drop-shadow(0 10px 8px #0009);
}
.falken-action-info {
  display:flex;
  flex-direction:column;
  gap:7px;
  min-width:0;
}
.falken-action-info strong { color:#f0d492; font-size:20px; }
.falken-action-info span { color:#d7d9dd; line-height:1.35; }
.falken-action-help { margin:14px 2px 10px; color:#cfd3d7; }
.falken-action-options { display:grid; grid-template-columns:repeat(2,minmax(0,1fr)); gap:12px; }
.falken-choice {
  display:flex;
  flex-direction:column;
  align-items:center;
  justify-content:center;
  gap:4px;
  min-height:88px;
  padding:12px;
  border:2px solid #716044;
  border-radius:10px;
  color:#fff;
  cursor:pointer;
  box-shadow:inset 0 1px #ffffff26,0 7px 15px #0005;
}
.falken-choice b { font-size:18px; }
.falken-choice small { color:#f1ead8; }
.falken-choice.spy { background:linear-gradient(#3e7699,#224963); border-color:#73a9c8; }
.falken-choice.attack { background:linear-gradient(#a64633,#6d251d); border-color:#d08063; }
.falken-choice:hover:not(:disabled) { transform:translateY(-1px); filter:brightness(1.08); }
.falken-choice:disabled { cursor:not-allowed; filter:grayscale(.45) brightness(.65); }

.spy-modal { width:min(760px,94vw); background:#c9ad80; border-color:#6d4b28; }
.spy-modal .modal-head { display:none; }
.spy-modal .modal-body { padding:0; background:#d5b98b; }
.spy-modal .modal-actions {
  justify-content:center;
  flex-wrap:wrap;
  border-top:1px solid #8a6841;
  background:#b89968;
}
.spy-report-sheet {
  position:relative;
  padding:76px 34px 24px;
  color:#493720;
  background:
    radial-gradient(circle at 12% 15%,#ffffff24 0 4%,transparent 5%),
    radial-gradient(circle at 82% 74%,#6d4b2017 0 5%,transparent 6%),
    linear-gradient(#ead3aa,#d9bb8a);
  box-shadow:inset 0 0 32px #6d482b3d;
}
.spy-report-sheet::before,
.spy-report-sheet::after {
  content:"";
  position:absolute;
  left:14px;
  right:14px;
  height:14px;
  background:linear-gradient(90deg,transparent,#9e7d52 8%,#ebd1a2 20%,#9e7d52 92%,transparent);
  opacity:.75;
}
.spy-report-sheet::before { top:10px; }
.spy-report-sheet::after { bottom:8px; }
.spy-report-ribbon {
  position:absolute;
  top:0;
  left:50%;
  transform:translateX(-50%);
  width:min(420px,76%);
  padding:15px 18px 17px;
  text-align:center;
  color:#33430c;
  font-size:22px;
  font-weight:900;
  background:linear-gradient(#b4ce4e,#98b435);
  border:2px solid #819a29;
  border-top:0;
  box-shadow:0 5px 0 #80902666;
  clip-path:polygon(0 0,100% 0,100% 82%,94% 100%,54% 94%,50% 100%,46% 94%,6% 100%,0 82%);
}
.spy-intro { max-width:620px; margin:0 auto 16px; text-align:center; line-height:1.45; }
.spy-target-title {
  display:flex;
  flex-direction:column;
  align-items:center;
  width:min(350px,90%);
  margin:0 auto 12px;
  padding:8px 16px;
  color:#f3ead9;
  background:#8a6a48;
  border:3px solid #584328;
}
.spy-target-title span { opacity:.82; }
.spy-target-title strong { margin-top:3px; color:white; font-size:16px; }
.spy-versus {
  display:grid;
  grid-template-columns:1fr 110px 1fr;
  gap:12px;
  align-items:stretch;
  padding:14px;
  background:#8d6f4e;
  border:4px solid #4e3a24;
  box-shadow:inset 0 0 0 2px #b79769;
}
.spy-lord-card {
  display:flex;
  flex-direction:column;
  align-items:center;
  justify-content:center;
  min-height:122px;
  padding:10px;
  text-align:center;
  background:#dfc69e;
  border:1px solid #a68459;
}
.spy-lord-card.enemy { background:#c8b28f; }
.spy-avatar {
  display:grid;
  place-items:center;
  width:48px;
  height:48px;
  margin-bottom:6px;
  border-radius:50%;
  color:#f8e9bf;
  font-size:25px;
  background:#6e5a43;
  box-shadow:inset 0 0 0 4px #a98c65;
}
.spy-lord-card b { font-size:16px; }
.spy-lord-card span { margin-top:3px; font-weight:800; }
.spy-lord-card small { margin-top:4px; color:#6b573d; }
.spy-accuracy {
  display:flex;
  flex-direction:column;
  align-items:center;
  justify-content:center;
  gap:7px;
  color:#4b3922;
  background:#d7bd95;
  border:1px solid #9d7d55;
}
.spy-accuracy div {
  width:78px;
  padding:5px;
  text-align:center;
  background:#ead7b5;
  border:1px solid #b7976f;
}
.spy-accuracy small { text-align:center; color:#6a553b; }
.spy-summary-icons {
  display:grid;
  grid-template-columns:repeat(3,1fr);
  gap:14px;
  margin-top:18px;
  padding:16px;
  background:#876849;
  clip-path:polygon(2% 0,98% 0,100% 16%,98% 100%,2% 100%,0 84%);
}
.spy-summary-icons > div {
  display:grid;
  grid-template-columns:46px 1fr;
  align-items:center;
  min-height:58px;
  padding:7px 10px;
  background:#d7bd94;
  border:1px solid #a27f55;
}
.spy-summary-icons span { grid-row:1/3; font-size:30px; }
.spy-summary-icons b { font-size:18px; }
.spy-summary-icons small { color:#665037; }
.spy-loot {
  display:flex;
  align-items:center;
  justify-content:space-between;
  gap:12px;
  margin-top:14px;
  padding:11px 13px;
  background:#ead5af;
  border:1px solid #a58152;
}
.spy-loot span { font-weight:800; text-align:right; }
.spy-details-btn { border-color:#745622; }

.report-spy { color:#69b7d7; font-weight:800; }
.report-open-btn {
  display:inline-block;
  margin-top:6px;
  padding:5px 9px;
  border:1px solid #68869b;
  border-radius:6px;
  color:#e7f6ff;
  background:#294b61;
  cursor:pointer;
}
.report-open-btn:hover { filter:brightness(1.12); }

.defense-modal { width:min(900px,95vw); }
.defense-report-head {
  display:grid;
  grid-template-columns:2fr 1fr 1fr;
  gap:10px;
  margin-bottom:12px;
}
.defense-report-head > div,
.defense-fortifications {
  padding:10px;
  border:1px solid #5b6672;
  border-radius:7px;
  background:#20262e;
}
.defense-report-head > div { display:flex; flex-direction:column; gap:4px; }
.defense-report-head small { color:#9fa9b4; }
.defense-report-head b { color:#f2d791; }
.defense-fortifications {
  display:flex;
  flex-wrap:wrap;
  justify-content:center;
  gap:8px 20px;
  margin-bottom:12px;
  color:#e5e9ed;
}
.defense-formation-grid { display:grid; grid-template-columns:repeat(3,minmax(0,1fr)); gap:10px; }
.defense-sector {
  overflow:hidden;
  border:1px solid #596572;
  border-radius:9px;
  background:#1c2229;
}
.defense-sector h4 {
  margin:0;
  padding:10px;
  text-align:center;
  color:#f0d492;
  background:#343d47;
}
.defense-sector.center { border-color:#907441; }
.defense-bonuses {
  display:flex;
  flex-direction:column;
  gap:4px;
  padding:8px;
  color:#c8ced5;
  font-size:12px;
  background:#252c34;
}
.defense-units { padding:7px 10px 10px; }
.defense-unit {
  display:flex;
  justify-content:space-between;
  gap:8px;
  padding:7px 0;
  border-bottom:1px solid #353e48;
}
.defense-unit:last-child { border-bottom:0; }
.defense-unit b { color:#f1d894; }
.defense-unit.empty { color:#8e98a2; }

@media (max-width:760px) {
  .falken-action-options,
  .defense-formation-grid { grid-template-columns:1fr; }
  .spy-versus { grid-template-columns:1fr; }
  .spy-summary-icons { grid-template-columns:1fr; }
  .spy-summary-icons > div { grid-template-columns:46px 1fr; }
  .defense-report-head { grid-template-columns:1fr; }
  .spy-loot { align-items:flex-start; flex-direction:column; }
  .spy-loot span { text-align:left; }
}


/* A conta atual pode ser reconhecida visualmente sem revelar qualquer papel administrativo. */
.table tr.ranking-current-player td {
  background: rgba(229, 193, 92, 0.06);
}


.settings-password-box {
  margin-top:14px;
  padding:14px;
  border:1px solid #46515f;
  border-radius:10px;
  background:#12171dcc;
}
.settings-password-box h4 {
  margin:0 0 6px;
  color:var(--gold2);
}
.settings-password-box .field {
  margin-top:10px;
}

/* Mercado: envio de recursos entre jogadores */
.market-building-panel {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  margin: 14px 0;
  padding: 12px 14px;
  border: 1px solid rgba(218, 170, 70, .55);
  border-radius: 12px;
  background: rgba(230, 199, 124, .10);
}
.market-building-panel strong,
.market-building-panel small { display: block; }
.market-building-panel small { opacity: .85; margin-top: 3px; }
.market-send-modal { display: grid; gap: 14px; }
.market-capacity-card {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 12px 14px;
  border: 1px solid rgba(218, 170, 70, .55);
  border-radius: 12px;
  background: rgba(245, 218, 150, .14);
}
.market-capacity-card strong { color: #ffe28b; }
.market-capacity-card small.is-over { color: #ff8c8c; font-weight: 800; }
.market-resource-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
}
.market-resource-row {
  display: grid;
  grid-template-columns: 1fr 120px;
  align-items: center;
  gap: 8px;
  padding: 10px;
  border: 1px solid rgba(255, 224, 150, .22);
  border-radius: 10px;
  background: rgba(0, 0, 0, .18);
}
.market-resource-row span { font-weight: 800; color: #ffe28b; }
.market-resource-row input { text-align: right; }
.market-resource-row small { grid-column: 1 / -1; opacity: .78; }
.market-note { color: #d9c494; margin: 0; }
.market-selected-target small { color: #d9c494; }
.market-mission-card { display: grid; gap: 8px; }
.player-choice.market b { color: #ffe28b; }
@media (max-width: 760px) {
  .market-resource-grid { grid-template-columns: 1fr; }
  .market-capacity-card { align-items: flex-start; flex-direction: column; }
}
