/* RT3 CITY: the whole village setting moved into RT3. Additive theme only. */
:root{
  --rt3-ink:#071018;
  --rt3-deep:#0b1620;
  --rt3-steel:#3b4a58;
  --rt3-steel2:#5c7082;
  --rt3-cream:#f4ead2;
  --rt3-amber:#f0b83e;
  --rt3-cyan:#6fd6e8;
  --rt3-paver:#c9c3b3;
}

/* ---------- the city outside the frame ---------- */
body{background:#05090d!important}
.app{
  background:
    radial-gradient(ellipse 70% 55% at 50% 24%,rgba(64,104,128,.34) 0%,rgba(16,27,38,.14) 48%,transparent 72%),
    radial-gradient(ellipse 85% 40% at 50% 105%,rgba(240,184,62,.10) 0%,transparent 62%),
    linear-gradient(180deg,#111d29 0%,#080f16 58%,#04070a 100%)!important;
}

/* ---------- concrete city ground ---------- */
.world{background-color:#bdb7a7!important;background-image:none!important}
.ground-layer{
  background-color:#c9c3b3!important;
  background-image:
    radial-gradient(circle at 22% 26%,rgba(94,88,76,.28) 0 1.4px,transparent 2px),
    radial-gradient(circle at 68% 72%,rgba(94,88,76,.20) 0 1.4px,transparent 2px),
    radial-gradient(circle at 84% 18%,rgba(255,255,255,.30) 0 1.2px,transparent 1.9px),
    repeating-linear-gradient(0deg,rgba(108,100,86,.34) 0 1px,transparent 1px 52px),
    repeating-linear-gradient(90deg,rgba(108,100,86,.34) 0 1px,transparent 1px 52px),
    repeating-linear-gradient(0deg,rgba(255,255,255,.05) 0 26px,rgba(0,0,0,.035) 26px 52px),
    linear-gradient(180deg,#cec8b8 0%,#c4beae 100%);
  background-size:89px 83px,97px 91px,71px 77px,52px 52px,52px 52px,52px 52px,100% 100%;
  background-position:0 0,0 0,0 0,0 0,0 0,0 0,0 0;
  image-rendering:pixelated;
}
.ground-layer:before{
  content:"";position:absolute;inset:0;pointer-events:none;
  background:
    radial-gradient(circle at 240px 240px,#6f6a60 0 12px,#504d46 12px 14px,transparent 15px),
    radial-gradient(circle at 1240px 1010px,#6f6a60 0 12px,#504d46 12px 14px,transparent 15px),
    radial-gradient(circle at 1560px 430px,#6f6a60 0 10px,#504d46 10px 12px,transparent 13px),
    radial-gradient(circle at 520px 1180px,#6f6a60 0 10px,#504d46 10px 12px,transparent 13px),
    radial-gradient(circle at 1040px 220px,#6f6a60 0 10px,#504d46 10px 12px,transparent 13px);
  background-repeat:no-repeat;opacity:.8;
}
.ground-layer:after{
  content:"";position:absolute;inset:0;pointer-events:none;
  background:
    linear-gradient(90deg,transparent 0 62px,rgba(255,255,255,.22) 62px 64px,transparent 64px 100%) 0 0/400px 400px repeat,
    linear-gradient(0deg,transparent 0 62px,rgba(0,0,0,.05) 62px 64px,transparent 64px 100%) 0 0/400px 400px repeat;
  opacity:.25;
}

/* ---------- city streets ---------- */
.road{
  background-color:#464b54!important;
  border:0!important;
  box-shadow:none!important;
  image-rendering:pixelated;
}
.road:after{display:none!important}
.road-main{
  background-image:
    repeating-linear-gradient(90deg,#e7bf4a 0 24px,rgba(0,0,0,0) 24px 54px),
    radial-gradient(circle at 18% 30%,#5b616b 0 1px,transparent 1.7px),
    radial-gradient(circle at 73% 68%,#363a41 0 1px,transparent 1.7px),
    linear-gradient(180deg,#d8d2c4 0 3px,#8e897d 3px 5px,rgba(0,0,0,0) 5px calc(100% - 5px),#8e897d calc(100% - 5px) calc(100% - 3px),#d8d2c4 calc(100% - 3px) 100%);
  background-size:54px 3px,43px 37px,53px 47px,100% 100%;
  background-position:center center,0 0,0 0,0 0;
  background-repeat:repeat-x,repeat,repeat,no-repeat;
}
.road-cross,.road-west,.road-east{
  background-image:
    repeating-linear-gradient(180deg,#e7bf4a 0 24px,rgba(0,0,0,0) 24px 54px),
    radial-gradient(circle at 18% 30%,#5b616b 0 1px,transparent 1.7px),
    radial-gradient(circle at 73% 68%,#363a41 0 1px,transparent 1.7px),
    linear-gradient(90deg,#d8d2c4 0 3px,#8e897d 3px 5px,rgba(0,0,0,0) 5px calc(100% - 5px),#8e897d calc(100% - 5px) calc(100% - 3px),#d8d2c4 calc(100% - 3px) 100%);
  background-size:3px 54px,43px 37px,53px 47px,100% 100%;
  background-position:center center,0 0,0 0,0 0;
  background-repeat:repeat-y,repeat,repeat,no-repeat;
}
.road-main:before,.road-main:after{
  content:"";position:absolute;top:7px;bottom:7px;width:44px;
  background:repeating-linear-gradient(90deg,#ece6d7 0 7px,transparent 7px 14px);
  opacity:.9;z-index:1;pointer-events:none;
}
.road-main:before{left:812px}
.road-main:after{left:948px}
.road-cross:before,.road-cross:after{
  content:"";position:absolute;left:7px;right:7px;height:44px;
  background:repeating-linear-gradient(0deg,#ece6d7 0 7px,transparent 7px 14px);
  opacity:.9;z-index:1;pointer-events:none;
}
.road-cross:before{top:628px}
.road-cross:after{top:752px}
.road-west:before{
  content:"";position:absolute;left:7px;right:7px;top:628px;height:44px;
  background:repeating-linear-gradient(0deg,#ece6d7 0 7px,transparent 7px 14px);
  opacity:.9;z-index:1;pointer-events:none;
}
.road-east:before{
  content:"";position:absolute;left:7px;right:7px;top:14px;height:44px;
  background:repeating-linear-gradient(0deg,#ece6d7 0 7px,transparent 7px 14px);
  opacity:.9;z-index:1;pointer-events:none;
}

/* street paint added by rt3-city.js */
.rt3-street-name{
  position:absolute;z-index:2;pointer-events:none;color:rgba(236,224,168,.62);
  font:bold 12px/1 ui-monospace,monospace;letter-spacing:3px;white-space:nowrap;
  text-shadow:0 1px 0 rgba(0,0,0,.55);transform:translate(-50%,-50%);
}
.rt3-street-name.v{transform:translate(-50%,-50%) rotate(90deg)}
.rt3-seal{
  position:absolute;z-index:2;width:64px;height:64px;transform:translate(-50%,-50%);
  border-radius:50%;border:2px solid rgba(240,184,62,.55);
  display:flex;align-items:center;justify-content:center;
  color:rgba(240,184,62,.78);font:900 17px/1 ui-monospace,monospace;letter-spacing:1px;
  background:radial-gradient(circle,rgba(240,184,62,.10) 0%,transparent 72%);
  pointer-events:none;text-shadow:0 1px 0 rgba(0,0,0,.55);
}
.rt3-seal:after{
  content:"";position:absolute;inset:6px;border-radius:50%;
  border:1px dashed rgba(240,184,62,.40);
}
.rt3-bay{
  position:absolute;z-index:2;pointer-events:none;background:rgba(236,230,215,.55);
}

/* the border becomes a low city wall with railings and the RT3 gate */
.rt-fence-seg.h{
  height:24px!important;
  background:
    linear-gradient(180deg,#9a9486 0 3px,#c6c0b0 3px 15px,#6d685e 15px 19px,transparent 19px),
    repeating-linear-gradient(90deg,transparent 0 30px,#3b4650 30px 32px,transparent 32px 60px)!important;
  filter:none!important;
}
.rt-fence-seg.v{
  width:24px!important;
  background:
    linear-gradient(90deg,#9a9486 0 3px,#c6c0b0 3px 15px,#6d685e 15px 19px,transparent 19px),
    repeating-linear-gradient(0deg,transparent 0 30px,#3b4650 30px 32px,transparent 32px 60px)!important;
  filter:none!important;
}
#rtBorderFence:before{
  content:"RT3";position:absolute;left:824px;top:-2px;width:160px;height:46px;
  display:flex;align-items:center;justify-content:center;
  background:linear-gradient(180deg,#26303b 0 60%,#17202a 60% 100%);
  border:3px solid #e8b84a;border-top:0;border-radius:0 0 8px 8px;
  color:#ffe28a;font:900 20px/1 ui-monospace,monospace;letter-spacing:4px;
  box-shadow:0 3px 0 rgba(0,0,0,.5),inset 0 0 0 2px rgba(0,0,0,.35);
  z-index:40;pointer-events:none;text-shadow:0 2px 0 #000;
}
#rtBorderFence:after{
  content:"CITY LIMIT";position:absolute;left:840px;top:44px;width:128px;
  text-align:center;color:#9fd8ff;font:bold 8px/1 ui-monospace,monospace;letter-spacing:3px;
  z-index:40;pointer-events:none;text-shadow:0 1px 0 #000;
}

/* ---------- city houses ---------- */
.village-house:not(.rt-uploaded){
  background:var(--rt3-wall,#e4dbc7)!important;
  border:3px solid var(--rt3-line,#343a40)!important;
  box-shadow:inset 0 0 0 3px rgba(255,255,255,.30),0 7px 0 rgba(0,0,0,.22),0 0 0 2px rgba(0,0,0,.28)!important;
  border-radius:3px!important;
}
.village-house:not(.rt-uploaded):before{
  content:"";position:absolute;z-index:3;right:9%;top:-9%;width:17%;height:13%;
  background:linear-gradient(180deg,#d3dae0 0 68%,#8b939b 68% 100%);
  border:2px solid #4b5057;border-radius:2px;
  box-shadow:0 2px 0 rgba(0,0,0,.25),inset 0 1px 0 rgba(255,255,255,.55);
}
.village-house:not(.rt-uploaded):after{
  content:"";position:absolute;z-index:3;left:12%;top:-6%;width:12%;height:9%;
  background:linear-gradient(180deg,#b9c0c7 0 70%,#7d858d 70% 100%);
  border:2px solid #4b5057;border-radius:50%;
  box-shadow:0 2px 0 rgba(0,0,0,.22);
}
.village-house:not(.rt-uploaded) .roof{
  left:-4%!important;top:-16%!important;width:108%!important;height:25%!important;
  background:
    linear-gradient(180deg,rgba(255,255,255,.18) 0 10%,transparent 10% 100%),
    repeating-linear-gradient(90deg,rgba(0,0,0,.10) 0 2px,transparent 2px 26px),
    linear-gradient(180deg,var(--rt3-roof,#5b6068) 0 70%,#34383e 70% 100%)!important;
  border:3px solid #2a2c30!important;
  border-radius:0!important;
  box-shadow:inset 0 3px 0 rgba(255,255,255,.18),inset 0 -4px 0 rgba(0,0,0,.35),0 2px 0 rgba(0,0,0,.25)!important;
  transform:none!important;
}
.village-house:not(.rt-uploaded) .wall{
  background:
    linear-gradient(90deg,transparent 0 8%,var(--rt3-trim,#b45c3a) 8% 10%,transparent 10% 90%,var(--rt3-trim,#b45c3a) 90% 92%,transparent 92%),
    repeating-linear-gradient(0deg,rgba(255,255,255,.10) 0 1px,transparent 1px 14px),
    linear-gradient(180deg,var(--rt3-wall,#e8dfcc) 0 60%,var(--rt3-base,#cfc5ae) 60% 100%)!important;
  border:3px solid #4a463e!important;
  box-shadow:inset 0 0 0 2px rgba(255,255,255,.40),inset 0 -8px 0 rgba(0,0,0,.08)!important;
  border-radius:1px!important;
}
.village-house:not(.rt-uploaded) .win{
  background:
    linear-gradient(90deg,transparent 47%,#eaf5f8 47% 53%,transparent 53%),
    linear-gradient(0deg,transparent 47%,#eaf5f8 47% 53%,transparent 53%),
    linear-gradient(135deg,#b7dce6 0 45%,#73a9bc 45% 100%)!important;
  border:3px solid #3d454a!important;
  box-shadow:inset 0 0 0 2px #eaf5f8,0 2px 0 rgba(0,0,0,.18)!important;
  border-radius:2px!important;
}
.village-house:not(.rt-uploaded) .door{
  background:linear-gradient(90deg,#3d4145 0 10%,#a9c4cf 10% 90%,#3d4145 90% 100%)!important;
  border:3px solid #2c2f33!important;
  box-shadow:inset 0 0 0 2px #e7f3f7!important;
  border-radius:1px!important;
}
.village-house:not(.rt-uploaded) .door:before{
  content:"";position:absolute;left:-30%;right:-30%;top:-12px;height:10px;
  background:repeating-linear-gradient(90deg,var(--rt3-awning,#d86a4a) 0 8px,#f2e7cf 8px 16px);
  border:2px solid rgba(0,0,0,.35);border-radius:2px;
  box-shadow:0 2px 0 rgba(0,0,0,.20);
}
.village-house:not(.rt-uploaded) .door:after{
  content:"";position:absolute;right:18%;top:52%;width:4px;height:4px;
  border-radius:50%;background:#f0cf83;box-shadow:0 0 0 1px rgba(0,0,0,.35);
}

/* ten different RT3 facades */
.village-house[data-house="1"]{--rt3-wall:#efe2c4;--rt3-base:#d8c9a8;--rt3-roof:#56606c;--rt3-trim:#bf6a3f;--rt3-awning:#c95a3e}
.village-house[data-house="2"]{--rt3-wall:#cfe3dc;--rt3-base:#afcbc2;--rt3-roof:#4c5a63;--rt3-trim:#2f7f72;--rt3-awning:#2f8a76}
.village-house[data-house="3"]{--rt3-wall:#efd3c8;--rt3-base:#d9b5a7;--rt3-roof:#5d5460;--rt3-trim:#b4534a;--rt3-awning:#c75b4d}
.village-house[data-house="4"]{--rt3-wall:#efe4c0;--rt3-base:#d8c89c;--rt3-roof:#5a6150;--rt3-trim:#a3792f;--rt3-awning:#c08a2f}
.village-house[data-house="5"]{--rt3-wall:#ded7e9;--rt3-base:#c2b7d4;--rt3-roof:#535a6a;--rt3-trim:#7d6497;--rt3-awning:#8b6ca8}
.village-house[data-house="6"]{--rt3-wall:#d7ead8;--rt3-base:#b6d2b8;--rt3-roof:#4f6256;--rt3-trim:#4a8457;--rt3-awning:#4f9462}
.village-house[data-house="7"]{--rt3-wall:#cfe1ec;--rt3-base:#aec7d7;--rt3-roof:#4d5b68;--rt3-trim:#3f7495;--rt3-awning:#4383aa}
.village-house[data-house="8"]{--rt3-wall:#efd9d7;--rt3-base:#d8b9b6;--rt3-roof:#5b5259;--rt3-trim:#a95d62;--rt3-awning:#bd686d}
.village-house[data-house="9"]{--rt3-wall:#ece2cc;--rt3-base:#d2c3a5;--rt3-roof:#545a52;--rt3-trim:#8e7441;--rt3-awning:#a8853f}
.village-house[data-house="10"]{--rt3-wall:#e2e3e0;--rt3-base:#c5c7c3;--rt3-roof:#4a5059;--rt3-trim:#6b737b;--rt3-awning:#7b858e}

/* building signs read as dark city plates */
.building-name{
  background:#121e29!important;border:2px solid #e8b84a!important;color:#fff3c4!important;
  box-shadow:0 2px 0 rgba(0,0,0,.45),inset 0 0 0 1px rgba(255,255,255,.10)!important;
  border-radius:3px!important;
}

/* ---------- BARN becomes the RT3 public market hall ---------- */
#barn:not(.rt-uploaded){
  background:#b9b2a2!important;border:4px solid #35393d!important;
  box-shadow:inset 0 0 0 4px #d9d3c4,0 8px 0 rgba(0,0,0,.22)!important;border-radius:3px!important;
}
#barn:not(.rt-uploaded) .barnroof{
  left:-5%!important;top:-18%!important;width:110%!important;height:30%!important;
  background:
    linear-gradient(180deg,rgba(255,255,255,.20) 0 8%,transparent 8% 100%),
    repeating-linear-gradient(90deg,rgba(0,0,0,.12) 0 2px,transparent 2px 22px),
    linear-gradient(180deg,#7b828b 0 65%,#4a4f57 65% 100%)!important;
  border:4px solid #2f3237!important;clip-path:none!important;border-radius:0!important;
  box-shadow:inset 0 3px 0 rgba(255,255,255,.20),inset 0 -5px 0 rgba(0,0,0,.30)!important;
}
#barn:not(.rt-uploaded) .barnwall{
  background:
    linear-gradient(180deg,rgba(255,255,255,.12) 0 10%,transparent 10% 100%),
    repeating-linear-gradient(0deg,rgba(0,0,0,.05) 0 1px,transparent 1px 18px),
    linear-gradient(180deg,#d7d0c0 0 58%,#b9b2a2 58% 100%)!important;
  border:4px solid #4a463e!important;box-shadow:inset 0 0 0 2px rgba(255,255,255,.35)!important;
}
#barn:not(.rt-uploaded) .barnwall:before{
  content:"";position:absolute;left:0;right:0;top:7%;height:10%;
  background:repeating-linear-gradient(90deg,#c95a3e 0 16px,#f4e8cf 16px 32px);
  border-top:2px solid rgba(0,0,0,.35);border-bottom:2px solid rgba(0,0,0,.35);
  box-shadow:0 2px 0 rgba(0,0,0,.18);
}
#barn:not(.rt-uploaded) .barn-door{
  background:repeating-linear-gradient(0deg,#5d646d 0 4px,#3d434a 4px 8px)!important;
  border:4px solid #2c2f33!important;border-radius:2px!important;
  box-shadow:inset 0 0 0 2px rgba(255,255,255,.16)!important;
}
#barn:not(.rt-uploaded) .barn-x{border:0!important;background:none!important}
#barn:not(.rt-uploaded) .barn-x:before{
  content:"RT3 PUBLIC MARKET";position:absolute;left:50%;bottom:100%;transform:translateX(-50%);
  white-space:nowrap;background:#121e29;color:#ffe28a;border:2px solid #e8b84a;
  padding:3px 8px;font:bold 11px/1.1 ui-monospace,monospace;letter-spacing:1px;
  box-shadow:0 2px 0 rgba(0,0,0,.40);
}

/* ---------- MANAGER'S LODGE becomes the RT3 civic center ---------- */
#rtLodge:not(.rt-uploaded) .lg-roof{
  left:-6%!important;top:-20%!important;width:112%!important;height:32%!important;
  background:
    linear-gradient(180deg,rgba(255,255,255,.18) 0 10%,transparent 10% 100%),
    linear-gradient(180deg,#6e7681 0 70%,#3d4249 70% 100%)!important;
  border:3px solid #2a2d32!important;clip-path:none!important;border-radius:0!important;
  box-shadow:inset 0 3px 0 rgba(255,255,255,.20)!important;
}
#rtLodge:not(.rt-uploaded) .lg-wall{
  background:
    repeating-linear-gradient(90deg,transparent 0 18%,#f2ecdc 18% 24%,transparent 24% 76%,#f2ecdc 76% 82%,transparent 82% 100%),
    linear-gradient(180deg,#e7dfcc 0 63%,#cfc5ae 63% 100%)!important;
  border:3px solid #4a463e!important;
  box-shadow:inset 0 0 0 2px rgba(255,255,255,.40),inset 0 -8px 0 rgba(0,0,0,.08)!important;
}
#rtLodge:not(.rt-uploaded) .lg-wall:before{
  content:"RT3 CIVIC CENTER";position:absolute;left:50%;top:3%;transform:translateX(-50%);
  white-space:nowrap;background:#121e29;color:#ffe28a;border:2px solid #e8b84a;
  padding:2px 6px;font:bold 9px/1.1 ui-monospace,monospace;letter-spacing:1px;
  box-shadow:0 2px 0 rgba(0,0,0,.35);
}
#rtLodge:not(.rt-uploaded) .lg-win{
  background:
    linear-gradient(90deg,transparent 47%,#eaf5f8 47% 53%,transparent 53%),
    linear-gradient(0deg,transparent 47%,#eaf5f8 47% 53%,transparent 53%),
    linear-gradient(135deg,#b7dce6 0 45%,#73a9bc 45% 100%)!important;
  border:3px solid #3d454a!important;
  box-shadow:inset 0 0 0 2px #eaf5f8!important;
}
#rtLodge:not(.rt-uploaded) .lg-door{
  background:linear-gradient(90deg,#3d4145 0 10%,#a9c4cf 10% 90%,#3d4145 90% 100%)!important;
  border:3px solid #2c2f33!important;box-shadow:inset 0 0 0 2px #e7f3f7!important;
}
#rtLodge:not(.rt-uploaded) .lg-step{
  background:repeating-linear-gradient(90deg,#c6c0b0 0 12px,#a9a294 12px 24px)!important;
  border:2px solid #514d44!important;
}

/* ---------- street trees in tree pits ---------- */
.tree{filter:drop-shadow(2px 3px 0 rgba(18,28,20,.40))!important}
.tree:not(.fruit-tree):before{
  left:38%!important;top:70%!important;width:24%!important;height:29%!important;
  background:linear-gradient(180deg,#7d5a3c 0 46%,#b9b2a2 46% 100%)!important;
  border:2px solid #57534a!important;border-radius:1px!important;
  box-shadow:inset 0 -3px 0 rgba(0,0,0,.18)!important;
}
.tree:not(.fruit-tree):after{
  left:10%!important;top:0!important;width:78%!important;height:66%!important;
  border-radius:46%!important;
  background:
    radial-gradient(circle at 32% 28%,#79c173 0 7%,transparent 8%),
    radial-gradient(circle at 68% 42%,#3f8f52 0 10%,transparent 11%),
    linear-gradient(180deg,#3f8f55,#2d6c43)!important;
  border:3px solid #1f5334!important;
  box-shadow:inset 4px 3px #7fc47a,0 3px 0 #1b3a28!important;
}
.tree.fruit-tree:before{display:none!important}
.apple-tree:before{
  background:linear-gradient(180deg,#7d5a3c 0 55%,#b9b2a2 55% 100%)!important;
  border-color:#57534a!important;
}

/* ---------- farm and animal boards in city colours ---------- */
.farm-plot-zone-label{
  background:#1f3b2d!important;border-color:#8fc7a3!important;color:#eaffef!important;
  box-shadow:0 2px 0 rgba(0,0,0,.35)!important;
}
.farm-area-group .farm-plot-fence{
  box-shadow:inset 0 0 0 3px rgba(143,199,163,.45),0 3px 0 rgba(20,40,28,.45)!important;
}

/* ---------- HUD, frame and controls ---------- */
.gameframe{
  border:5px solid #3b4754!important;border-radius:6px!important;
  box-shadow:0 0 0 3px #0c1218,0 0 0 8px #596775,0 12px 40px rgba(0,0,0,.80),0 0 50px rgba(111,214,232,.12)!important;
  background:#3d424a!important;
}
.top{color:#dfeaf1!important}
.top>span:first-child{
  color:#ffe29a!important;font-weight:900!important;letter-spacing:2.5px!important;
  text-shadow:0 2px 0 #000,0 0 14px rgba(240,184,62,.35)!important;
}
.top>span:first-child .rt3-top-badge{
  display:inline-block;margin-left:6px;padding:1px 5px;border:1px solid #4b6a80;border-radius:3px;
  background:#10202c;color:#9fd8ff;font-size:.72em;letter-spacing:2px;vertical-align:1px;
  text-shadow:none;
}
#adminOpen{
  display:inline-flex!important;align-items:center;justify-content:center;
  background:#0f1c26!important;color:#ffe29a!important;border:2px solid #e8b84a!important;
  border-radius:5px!important;padding:6px 9px!important;margin-left:8px!important;
  font:800 10px/1 ui-monospace,monospace!important;letter-spacing:1.5px!important;
  box-shadow:0 2px 0 rgba(0,0,0,.5),inset 0 0 0 1px rgba(0,0,0,.35)!important;
  cursor:pointer!important;pointer-events:auto!important;position:relative;z-index:60!important;
}
#adminOpen:active{transform:translateY(2px);box-shadow:0 0 0 rgba(0,0,0,.5)!important}
.dpad button,.action{
  background:rgba(12,22,32,.84)!important;border:3px solid #5c7186!important;color:#e8f2f7!important;
  box-shadow:inset 0 0 0 2px rgba(111,214,232,.12),0 3px 0 rgba(0,0,0,.45)!important;
}
.action{background:rgba(20,44,58,.90)!important;border-color:#6fd6e8!important}
#btnA{border-color:#e8b84a!important;color:#ffe6a3!important}
.bottom button{
  background:#101d28!important;color:#d8e9f1!important;border:2px solid #4d6577!important;
  box-shadow:0 2px 0 rgba(0,0,0,.40)!important;
}
.zoom-control{
  background:rgba(9,17,25,.94)!important;border-color:#54708a!important;color:#dff1f8!important;
  box-shadow:0 3px 12px rgba(0,0,0,.55)!important;
}
.zoom-control input{accent-color:#6fd6e8!important}
.zoom-control .zoom-label{color:#ffe29a!important}

/* ---------- start card ---------- */
#rt-auth-gate{
  background:radial-gradient(ellipse at 50% 38%,rgba(28,46,60,.25) 0%,rgba(4,8,12,.72) 78%)!important;
  -webkit-backdrop-filter:blur(2px);backdrop-filter:blur(2px);
}
#rt-auth-gate .rt-auth-card{
  border-color:#3c4a56!important;background:linear-gradient(180deg,#f7f1df,#e8dfc9)!important;
  box-shadow:0 0 0 4px #101820,0 0 0 9px #4a5a68,0 24px 70px rgba(0,0,0,.80)!important;
}
#rt-auth-gate .rt-auth-title{
  color:#1f5b68!important;text-shadow:0 2px 0 rgba(255,255,255,.35),0 3px 0 #b9ac8f!important;letter-spacing:4px!important;
}
#rt-auth-gate .rt-auth-sub{
  margin-top:4px!important;font-size:12px!important;font-weight:900!important;letter-spacing:8px!important;
  color:#2f6f73!important;text-transform:uppercase;
}
#rt-auth-gate #rt-auth-check{
  background:linear-gradient(180deg,#3f8f9c 0%,#23606c 55%,#174a55 100%)!important;
  border-color:#0d333b!important;
  box-shadow:0 6px 0 #0d333b,0 12px 24px rgba(0,0,0,.25)!important;
}
#rt-auth-gate #rt-auth-check.is-success{background:linear-gradient(180deg,#5aa98e,#2f6f5e)!important}

/* ---------- RT3 ADMIN panel ---------- */
#rt3AdminGate{
  position:fixed;inset:0;z-index:2000000;display:flex;align-items:center;justify-content:center;
  padding:16px;background:rgba(4,9,14,.30);
  color:#eaf4f8;font-family:ui-monospace,monospace;
}
#rt3AdminGate[hidden]{display:none!important}
.rt3-admin-card{
  width:min(100%,450px);max-height:min(90dvh,760px);overflow:auto;overscroll-behavior:contain;
  border:4px solid #3f586b;border-radius:10px;background:linear-gradient(180deg,#111d28,#0a1219);
  box-shadow:0 0 0 4px #05090d,0 24px 70px rgba(0,0,0,.80),inset 0 0 0 2px #22313f;
  padding:16px 16px 18px;box-sizing:border-box;
}
.rt3-admin-head{display:flex;align-items:center;justify-content:space-between;gap:10px;margin-bottom:10px}
.rt3-admin-head strong{font-size:18px;letter-spacing:3px;color:#ffe29a;text-shadow:0 2px 0 #000}
.rt3-admin-head small{display:block;margin-top:3px;font-size:9px;letter-spacing:2px;color:#8fb6c8}
.rt3-admin-x{
  flex:none;width:36px;height:36px;border-radius:6px;border:2px solid #526b7d;
  background:#0b1620;color:#dceaf1;font:bold 15px ui-monospace,monospace;cursor:pointer;
}
.rt3-admin-x:active{transform:translateY(1px)}
.rt3-admin-lock p{margin:8px 0;font-size:12px;line-height:1.55;color:#c8dbe5}
.rt3-admin-lock label{display:block;margin:12px 0 6px;font-size:10px;letter-spacing:2px;color:#8fb6c8}
.rt3-admin-input{
  width:100%;box-sizing:border-box;padding:12px;border:2px solid #4b6a80;border-radius:6px;
  background:#07111a;color:#f2fbff;font:bold 18px ui-monospace,monospace;letter-spacing:6px;text-align:center;
}
.rt3-admin-btn{
  width:100%;margin-top:10px;padding:12px;border:2px solid #e8b84a;border-radius:6px;
  background:linear-gradient(180deg,#2b6b76,#174a55);color:#fff6d8;
  font:900 13px/1 ui-monospace,monospace;letter-spacing:2px;cursor:pointer;
  box-shadow:0 4px 0 #062a31;
}
.rt3-admin-btn:active{transform:translateY(2px);box-shadow:0 2px 0 #062a31}
.rt3-admin-btn.secondary{background:#0f1c26;color:#cfe6ef;border-color:#4b6a80;box-shadow:0 3px 0 #050b10}
.rt3-admin-btn.danger{background:#3a1d1d;color:#ffd9d4;border-color:#b05a4f;box-shadow:0 3px 0 #1e0b0b}
.rt3-admin-msg{min-height:16px;margin-top:9px;font-size:11px;line-height:1.5;color:#ffd07a}
.rt3-admin-msg.bad{color:#ff8f7f}
.rt3-admin-msg.good{color:#8fe3b0}
.rt3-owner-badge{
  display:flex;align-items:center;gap:8px;margin-bottom:12px;padding:9px 10px;
  border:2px solid #3f6b58;border-radius:7px;background:#0b1d17;color:#bdf0cd;
  font-size:10px;line-height:1.4;letter-spacing:.5px;overflow-wrap:anywhere;
}
.rt3-owner-badge b{color:#ffe29a;letter-spacing:1.5px}
.rt3-owner-badge .dot{flex:none;width:9px;height:9px;border-radius:50%;background:#59d68a;box-shadow:0 0 7px #59d68a}
.rt3-admin-section{margin-top:10px;padding:10px;border:2px solid #273947;border-radius:7px;background:#0c1721}
.rt3-admin-section h3{margin:0 0 8px;font-size:10px;letter-spacing:2px;color:#8fb6c8;font-weight:800}
.rt3-admin-row{display:flex;gap:7px;align-items:stretch}
.rt3-admin-row .rt3-admin-input{flex:1;min-width:0;padding:9px;font-size:15px;letter-spacing:1px;text-align:left}
.rt3-admin-row .rt3-admin-btn{width:auto;flex:none;margin-top:0;padding:9px 12px;font-size:10px;letter-spacing:1px}
.rt3-admin-hint{margin:6px 0 0;font-size:9px;line-height:1.5;color:#7f9cad}
.rt3-admin-grid{display:grid;grid-template-columns:1fr 1fr;gap:8px}
.rt3-admin-grid .rt3-admin-btn{margin-top:0}
@media(max-width:430px){
  #rt3AdminGate{padding:6px;align-items:flex-end}
  .rt3-admin-card{
    max-height:62dvh;padding:13px;border-width:3px;
    border-radius:10px 10px 0 0;box-shadow:0 -14px 44px rgba(0,0,0,.72),inset 0 0 0 2px #22313f;
  }
  .rt3-admin-grid{grid-template-columns:1fr}
}
#rt-auth-gate .rt3-auth-welcome{
  margin:7px 0 0;font:800 9px/1.4 ui-monospace,monospace;letter-spacing:2px;
  color:#5d7a72;text-transform:uppercase;
}

/* pavement sidewalks alongside every street */
.rt3-sidewalk{
  position:absolute;z-index:0;pointer-events:none;
  background-color:#d8d2c4;
  background-image:
    linear-gradient(90deg,transparent 0 32px,rgba(108,100,86,.25) 32px 33px,transparent 33px 64px),
    linear-gradient(0deg,transparent 0 32px,rgba(108,100,86,.25) 32px 33px,transparent 33px 64px),
    radial-gradient(circle at 20% 30%,rgba(90,84,72,.18) 0 1px,transparent 1.5px);
  background-size:64px 64px,64px 64px,47px 43px;
  box-shadow:inset 0 2px 0 #a8a292,inset 0 -2px 0 #a8a292,inset 2px 0 0 rgba(255,255,255,.30);
  image-rendering:pixelated;
}
.ground-layer:after{
  background:
    radial-gradient(ellipse at 22% 20%,rgba(255,247,226,.12) 0%,transparent 58%),
    radial-gradient(ellipse at 78% 72%,rgba(112,148,160,.10) 0%,transparent 60%),
    linear-gradient(90deg,transparent 0 62px,rgba(255,255,255,.22) 62px 64px,transparent 64px 100%) 0 0/400px 400px repeat,
    linear-gradient(0deg,transparent 0 62px,rgba(0,0,0,.05) 62px 64px,transparent 64px 100%) 0 0/400px 400px repeat!important;
}

/* wide 4:3 screens: keep the city frame inside the stage instead of letting it bleed out */
@media (min-width:920px) and (orientation:landscape) and (max-aspect-ratio: 4/3){
  body:not(.rt-tax-open) .gameframe{
    width:min(calc(100vw - 300px),calc(100dvh - 160px))!important;
    height:auto!important;max-width:none!important;margin:0!important;
    border:5px solid #3b4754!important;border-radius:6px!important;
    align-self:center!important;justify-self:center!important;
    box-shadow:0 0 0 3px #0c1218,0 0 0 8px #596775,0 12px 40px rgba(0,0,0,.80)!important;
  }
}

/* The platform rail already carries sign-in. The old full-screen gate is removed so the city is the page on load; cloud features still show their sign-in messages. */
#rt-auth-gate{display:none!important}

/* RT3 player: four directions, two walk frames each. */
.player .hat,.player .head,.player .body,.player .feet{display:none!important}
.player{
  width:36px!important;height:46px!important;
  background:url(player-rt3-directions.png) 0 0/72px 184px no-repeat!important;
  image-rendering:pixelated;
}
.player.rt3-face-down{background-position-y:0!important}
.player.rt3-face-right{background-position-y:-46px!important}
.player.rt3-face-left{background-position-y:-92px!important}
.player.rt3-face-up{background-position-y:-138px!important}
.player.walking{animation:rt3CityWalk .34s steps(2,end) infinite}
@keyframes rt3CityWalk{from{background-position-x:0}to{background-position-x:-36px}}

/* visible owner status, outside the admin modal */
#rt3OwnerBadge{
  display:inline-flex;align-items:center;gap:4px;margin-left:6px;padding:4px 7px;
  border:1px solid #e8b84a;border-radius:999px;background:#231a0a;color:#ffe6a3;
  font:800 9px/1 ui-monospace,monospace;letter-spacing:1px;white-space:nowrap;
  max-width:112px;overflow:hidden;text-overflow:ellipsis;vertical-align:middle;
  box-shadow:0 0 0 1px rgba(0,0,0,.4),0 0 10px rgba(232,184,74,.18);
}
#rt3OwnerBadge:before{content:"★";color:#ffd15c;font-size:9px;line-height:1}
#rt3OwnerBadge[hidden]{display:none!important}

/* Detailed RT3 facades: the drawn building is the solid footprint. */
.village-house:not(.rt-uploaded)>.roof,
.village-house:not(.rt-uploaded)>.wall,
.village-house:not(.rt-uploaded)>.door,
.village-house:not(.rt-uploaded)>.win{display:none!important}
.village-house:not(.rt-uploaded):before,
.village-house:not(.rt-uploaded):after{display:none!important}
.village-house:not(.rt-uploaded){
  background:var(--rt3-house) center bottom/100% 100% no-repeat!important;
  border:0!important;border-radius:0!important;
  box-shadow:0 7px 0 rgba(0,0,0,.20)!important;
}
.village-house[data-house="1"]{--rt3-house:url(house-1.png)}
.village-house[data-house="2"]{--rt3-house:url(house-2.png)}
.village-house[data-house="3"]{--rt3-house:url(house-3.png)}
.village-house[data-house="4"]{--rt3-house:url(house-4.png)}
.village-house[data-house="5"]{--rt3-house:url(house-5.png)}
.village-house[data-house="6"]{--rt3-house:url(house-6.png)}
.village-house[data-house="7"]{--rt3-house:url(house-7.png)}
.village-house[data-house="8"]{--rt3-house:url(house-8.png)}
.village-house[data-house="9"]{--rt3-house:url(house-9.png)}
.village-house[data-house="10"]{--rt3-house:url(house-10.png)}

#barn:not(.rt-uploaded)>.barnroof,
#barn:not(.rt-uploaded)>.barnwall,
#barn:not(.rt-uploaded)>.barn-door,
#barn:not(.rt-uploaded)>.barn-x{display:none!important}
#barn:not(.rt-uploaded):before,#barn:not(.rt-uploaded):after{display:none!important}
#barn:not(.rt-uploaded){
  background:url(barn-rt3.png) center bottom/100% 100% no-repeat!important;
  border:0!important;border-radius:0!important;
  box-shadow:0 8px 0 rgba(0,0,0,.22)!important;
}

#rtLodge:not(.rt-uploaded)>.lg-roof,
#rtLodge:not(.rt-uploaded)>.lg-wall,
#rtLodge:not(.rt-uploaded)>.lg-door,
#rtLodge:not(.rt-uploaded)>.lg-win,
#rtLodge:not(.rt-uploaded)>.lg-step{display:none!important}
#rtLodge:not(.rt-uploaded){background:url(lodge-rt3.png) center bottom/100% 100% no-repeat!important;border:0!important;border-radius:0!important;box-shadow:0 8px 0 rgba(0,0,0,.20)!important}


/* RT3 downtown: plaza paint under the barangay, church, covered court and terminal. */
.rt3-plaza{
  position:absolute;pointer-events:none;
  background:
    linear-gradient(90deg,transparent 0 44px,rgba(255,255,255,.18) 44px 46px,transparent 46px 100%) 0 0/88px 88px,
    linear-gradient(0deg,transparent 0 44px,rgba(0,0,0,.05) 44px 46px,transparent 46px 100%) 0 0/88px 88px,
    radial-gradient(circle at 50% 30%,rgba(255,236,190,.14) 0%,transparent 60%),
    #c6c0b0;
  border:2px solid rgba(108,100,86,.45);
  box-shadow:inset 0 0 0 4px rgba(255,255,255,.18);
  image-rendering:pixelated;
}
.rt3-landmark,.rt3-vehicle{filter:drop-shadow(2px 4px 0 rgba(0,0,0,.18))}

@media(max-width:430px){
  #rt3OwnerBadge{max-width:92px;font-size:8px;padding:3px 6px}
  #rt-village-sync-status{display:none!important}
}

/* The market garden is part of the city. */
.world .farm-area-group:not(.pig-area-group):not(.goat-area-group):not(.cow-area-group):not(.sheep-area-group):not(.chicken-area-group):not(.duck-area-group)>.farm-plot-fence:after{
  content:"RT3 URBAN FARM";position:absolute;left:50%;bottom:6px;transform:translateX(-50%);
  background:#1f3b2d;border:2px solid #8fc7a3;color:#eaffef;
  font:bold 9px/1.2 ui-monospace,monospace;letter-spacing:1px;white-space:nowrap;
  padding:2px 6px;box-shadow:0 2px 0 rgba(0,0,0,.35);
}
