.castle-iso-shell { min-height:650px; background:#263321; border-color:#79633a; }
.castle-iso-shell::before { content:""; position:absolute; inset:0; pointer-events:none; z-index:55; box-shadow:inset 0 0 70px #071008aa; }
.castle-world-viewport { cursor:grab; overscroll-behavior:contain; background:linear-gradient(#83a852,#5e873b); }
.castle-world-viewport.is-dragging { cursor:grabbing; user-select:none; }
.castle-iso-stage { position:relative; min-width:100%; min-height:100%; }
.isometric-castle-world { position:absolute; left:0; top:0; transform-origin:0 0; overflow:hidden; isolation:isolate; background:#78a64c; }
.castle-iso-land { position:absolute; inset:0; z-index:0; background:
  radial-gradient(circle at 12% 17%,#b6d47b 0 2px,transparent 3px), radial-gradient(circle at 68% 32%,#567e38 0 2px,transparent 3px),
  radial-gradient(circle at 45% 77%,#94bd5c 0 3px,transparent 4px),
  repeating-linear-gradient(23deg,#83ad52 0 70px,#7da64e 70px 140px,#76a049 140px 210px);
  background-size:61px 61px,83px 83px,107px 107px,auto; }
.castle-iso-land::after { content:""; position:absolute; inset:0; background:radial-gradient(ellipse at 50% 48%,transparent 24%,#28441e55 70%,#102010aa 100%); }
.castle-iso-stream { position:absolute; z-index:2; width:1250px; height:115px; border-radius:50%; background:linear-gradient(#68c5dd,#3798b2 50%,#21788f); border:9px solid #c9b66c77; box-shadow:inset 0 5px 10px #d7f7ff99,0 6px 8px #16352f66; opacity:.92; pointer-events:none; }
.stream-a { left:-240px; top:140px; transform:rotate(-18deg); }
.stream-b { right:-360px; bottom:90px; transform:rotate(15deg); }
.castle-iso-tile { width:78px; height:40px; clip-path:polygon(50% 0,100% 50%,50% 100%,0 50%); border:0; padding:0; position:absolute; z-index:var(--tile-z); background:#a6cf6a18; outline:1px solid #e6f6b017; color:transparent; cursor:pointer; transition:filter .12s,transform .12s,background .12s; }
.castle-iso-tile.unlocked:nth-of-type(4n) { background:#acd36e22; }
.castle-iso-tile.unlocked:nth-of-type(5n) { background:#6f9d4820; }
.castle-iso-tile.unlocked:hover { color:#fff; background:#ffe87a88; outline:2px solid #fff0a5; filter:brightness(1.17); transform:translateY(-3px); }
.castle-iso-tile span { display:none; font:900 22px/40px Segoe UI,Arial; text-shadow:0 2px 3px #000; }
.castle-iso-tile:hover span { display:block; }
.castle-iso-tile.locked { background:#1b311c68; outline-color:#10231155; cursor:not-allowed; filter:saturate(.35) brightness(.72); }
.castle-iso-tile.locked span { display:none; }
.castle-iso-road { position:absolute; width:78px; height:40px; clip-path:polygon(50% 0,100% 50%,50% 100%,0 50%); background:#c8ae70bb; border:0; pointer-events:none; box-shadow:inset 0 0 8px #806b3c88; }
.road-x::after,.road-y::after { content:""; position:absolute; inset:9px 10px; border-top:2px dashed #78603988; transform:rotate(27deg); }
.road-y::after { transform:rotate(-27deg); }
.castle-iso-wall-edge { position:static!important; display:contents!important; border:0!important; background:none!important; box-shadow:none!important; pointer-events:none; }
.castle-iso-wall-edge::before { display:none!important; }
.castle-iso-wall-segment { position:absolute; width:68px; height:36px; clip-path:polygon(50% 0,100% 43%,84% 100%,16% 100%,0 43%); background:linear-gradient(#b9b7a5 0 35%,#77796f 36% 73%,#53574f 74%); border-bottom:4px solid #3e413b; box-shadow:0 6px 6px #17201977,inset 0 3px #e2dfcc; pointer-events:none; }
.castle-iso-wall-segment::before { content:""; position:absolute; left:5px; right:5px; top:0; height:11px; background:repeating-linear-gradient(90deg,#d2d0bc 0 11px,transparent 11px 17px); }
.castle-iso-wall-segment.wall-y-back,.castle-iso-wall-segment.wall-x-front { transform:skewY(8deg); }
.castle-iso-wall-segment.wall-x-back,.castle-iso-wall-segment.wall-y-front { transform:skewY(-8deg); }
.castle-iso-wall-segment.fort-level-1 { filter:saturate(.8) brightness(.88); }
.castle-iso-wall-segment.fort-level-3,.castle-iso-wall-segment.fort-level-4,.castle-iso-wall-segment.fort-level-5 { height:43px; background:linear-gradient(#c7c6b4 0 30%,#85877e 31% 72%,#565a52 73%); }
.castle-iso-wall-segment.fort-level-5 { box-shadow:0 7px 7px #17201988,inset 0 3px #ece8d2,0 0 0 2px #c49a35; }
.castle-iso-tower { position:absolute; width:94px; height:124px; border:0; border-radius:0; background:none; box-shadow:none; pointer-events:none; }
.castle-iso-tower::before { display:none; }
.castle-iso-tower svg { width:100%; height:100%; filter:drop-shadow(0 7px 5px #17201977); }
.castle-gate { position:absolute; width:70px; height:58px; clip-path:polygon(50% 0,100% 38%,86% 100%,14% 100%,0 38%); border:0; border-bottom:5px solid #39281d; border-radius:0; background:linear-gradient(#9b9b91 0 31%,#595c57 32% 100%); box-shadow:0 8px 7px #17201988,inset 0 4px #d7d4c4; color:#f3cf62; cursor:pointer; font-size:20px; }
.castle-gate::before { content:""; position:absolute; left:19px; right:19px; bottom:0; height:34px; border-radius:13px 13px 0 0; background:repeating-linear-gradient(90deg,#6a4325 0 6px,#3e291a 6px 9px); box-shadow:inset 0 0 0 3px #302218; }
.castle-gate span { position:relative; z-index:2; top:4px; text-shadow:0 2px #2b2114; }
.castle-gate:hover { filter:brightness(1.18); }
.castle-iso-building { position:absolute; border:0; padding:0; background:transparent; color:#25190f; cursor:pointer; overflow:visible; transform-origin:50% 85%; transition:filter .15s,transform .15s; }
.castle-iso-building:hover { transform:translateY(-8px) scale(1.045); filter:brightness(1.08); z-index:2000!important; }
.castle-iso-building::before { content:""; position:absolute; left:50%; bottom:10px; width:var(--foot-w); height:var(--foot-h); transform:translateX(-50%); clip-path:polygon(50% 0,100% 50%,50% 100%,0 50%); background:#ffe47700; outline:2px solid transparent; pointer-events:none; transition:.14s; }
.castle-iso-building:hover::before { background:#ffe47725; outline-color:#ffe477aa; }
.castle-iso-building-shadow { position:absolute; left:18%; right:12%; bottom:5px; height:17%; border-radius:50%; background:#13201477; filter:blur(6px); }
.castle-iso-building-art { position:absolute; inset:0 0 14px; display:block; }
.castle-iso-building-art svg { width:100%; height:100%; overflow:visible; filter:drop-shadow(0 5px 3px #26311f77); }
.castle-building-label { position:absolute; left:50%; bottom:-4px; min-width:112px; max-width:170px; transform:translateX(-50%) translateY(5px); opacity:0; pointer-events:none; border:1px solid #5b4528; border-radius:5px; background:#efd8a6ee; box-shadow:0 3px 7px #0008; padding:4px 7px; display:flex; align-items:center; justify-content:center; gap:5px; font-size:10px; white-space:nowrap; transition:.14s; }
.castle-iso-building:hover .castle-building-label { opacity:1; transform:translateX(-50%) translateY(0); }
.castle-building-label em { font-style:normal; color:#fff0c2; background:#3d2c18; border-radius:8px; padding:2px 5px; }
.castle-building-level-badge { position:absolute; right:13%; bottom:15px; min-width:25px; height:25px; border-radius:50%; display:grid; place-items:center; background:#3b2918; color:#f5d371; border:2px solid #d7ac47; box-shadow:0 3px 5px #0008; font:bold 11px Segoe UI,Arial; }
.castle-building-timer { position:absolute; left:22%; right:22%; top:42%; z-index:5; background:#181511e8; color:#fff; border:1px solid #d5ab53; border-radius:5px; padding:5px; font-size:10px; }
.castle-iso-building.is-building .castle-iso-building-art { filter:grayscale(.45) brightness(.78); }
.castle-iso-building.is-building::after { content:"🚧"; position:absolute; z-index:8; right:18%; top:28%; font-size:27px; }
.castle-iso-building.is-burning::after { content:"🔥"; position:absolute; z-index:8; right:15%; top:20%; font-size:32px; animation:castle-fire .55s alternate infinite; }
.castle-iso-scenery { position:absolute; pointer-events:none; }
.castle-iso-scenery svg { width:100%; height:100%; filter:drop-shadow(0 4px 3px #17201955); }
.castle-iso-field { position:absolute; width:200px; height:84px; transform:rotate(25deg) skewX(-18deg); border:5px solid #b49655; border-radius:6px; background:#d1aa45; box-shadow:0 5px 7px #17201955,inset 0 0 15px #6f5a28aa; pointer-events:none; }
.castle-iso-field i { display:block; height:7px; margin:5px 8px; border-radius:50%; background:repeating-linear-gradient(90deg,#f0d866 0 9px,#b98e2e 9px 14px); }
.castle-stage-ribbon { position:absolute; left:14px; top:14px; z-index:70; display:flex; flex-direction:column; min-width:235px; border:1px solid #755d31; border-radius:8px; background:#1d291fdc; color:#f1d27e; padding:9px 12px; box-shadow:0 5px 16px #0008; backdrop-filter:blur(5px); pointer-events:none; }
.castle-stage-ribbon strong { font-size:14px; }
.castle-stage-ribbon span { color:#c6d0c3; font-size:10px; margin-top:2px; }
.castle-camera-controls { position:absolute; right:14px; top:14px; z-index:75; display:flex; align-items:center; gap:4px; border:1px solid #705d39; border-radius:8px; background:#1b231ddf; padding:5px; box-shadow:0 5px 16px #0008; }
.castle-camera-controls button { width:34px; height:31px; border:1px solid #74613d; border-radius:5px; background:#303932; color:#f3d27c; cursor:pointer; font:bold 18px Segoe UI; }
.castle-camera-controls button:hover { background:#465347; }
.castle-camera-controls output { min-width:45px; text-align:center; color:#e8e1c6; font-size:11px; }
.castle-inhabitant { position:absolute; font-size:21px; filter:drop-shadow(0 2px 1px #0007); animation:castle-walk 10s ease-in-out infinite alternate; pointer-events:none; }
.castle-bird { position:absolute; font-size:31px; color:#172219; animation:castle-bird 7s linear infinite; pointer-events:none; }
.bird-b { animation-delay:2.4s; }
.stage-1 .castle-iso-wall-segment { filter:saturate(.65) brightness(.78); }
.stage-4 .castle-iso-shell,.stage-5 .castle-iso-shell { border-color:#ad8530; }
.stage-5 .castle-stage-ribbon { border-color:#d3a637; box-shadow:0 0 0 2px #8d681e,0 5px 20px #0009; }
@keyframes castle-fire { from { transform:scale(.86) rotate(-5deg); } to { transform:scale(1.14) rotate(5deg); } }
@keyframes castle-walk { from { transform:translateX(-45px); } to { transform:translateX(55px); } }
@keyframes castle-bird { from { transform:translateX(-100px) translateY(0); } to { transform:translateX(150px) translateY(-24px); } }
@media (max-width:1280px) { .castle-iso-shell { min-height:580px; } .castle-world-viewport { height:580px; } }
@media (max-width:850px) { .castle-stage-ribbon { min-width:180px; max-width:45%; } .castle-camera-controls { top:72px; } }

/* v0.1.96 — Zona de clique mais precisa dos edifícios.
   Evita que a caixa transparente de um edifício próximo roube o clique de outro. */
.castle-iso-building { pointer-events:none; }
.castle-iso-building .castle-building-click-zone {
  position:absolute;
  left:24%;
  right:24%;
  top:26%;
  bottom:10%;
  z-index:30;
  display:block;
  border:0;
  border-radius:42% 42% 32% 32%;
  background:transparent;
  pointer-events:auto;
  cursor:pointer;
}
.castle-iso-building.castle-building-keep .castle-building-click-zone,
.castle-iso-building.castle-building-watchtower .castle-building-click-zone {
  left:17%;
  right:17%;
  top:12%;
  bottom:8%;
}
.castle-iso-building.castle-building-decoration .castle-building-click-zone {
  left:27%;
  right:27%;
  top:28%;
  bottom:13%;
  border-radius:50%;
}
.castle-iso-building .castle-iso-building-art,
.castle-iso-building .castle-iso-building-shadow,
.castle-iso-building .castle-building-level-badge,
.castle-iso-building .castle-building-label,
.castle-iso-building .castle-building-timer { pointer-events:none; }

