/* Guild town: scoped to overview/upgrades, the existing game chrome stays intact. */
.cc-town [hidden],.ct-dialog [hidden]{display:none!important}
.cc-town-page .cc-town{color:#4b301d;font-family:"Roboto Condensed",Arial,sans-serif}
.ct-layout{display:grid;grid-template-columns:minmax(0,1fr) 398px;gap:12px;height:var(--ct-height,609px);min-width:0}
.ct-map-frame{position:relative;min-width:0;overflow:hidden;border:3px solid #fff0ce;border-radius:20px;box-shadow:inset 0 0 0 2px #9e764a,0 4px 7px #44270b55;background:#a2ae72}
.ct-map-scroll{width:100%;height:100%;overflow-x:auto;overflow-y:hidden;scrollbar-width:thin;scrollbar-color:#bd9557 #f7e6c9;scroll-behavior:smooth}
.ct-map{position:relative;width:100%;height:100%;isolation:isolate}
.ct-terrain{position:absolute;inset:0;width:100%;height:100%;max-width:none!important;object-fit:fill!important;user-select:none;pointer-events:none}
.ct-map-heading{position:absolute;top:10px;left:12px;right:12px;display:flex;align-items:center;justify-content:space-between;gap:10px;pointer-events:none}
.cc-town .ct-map-heading h2{margin:0;padding:7px 14px;background:linear-gradient(#a47746,#744721);color:#fff2ca;text-shadow:0 2px #50331b;border:2px solid #d7b67b;border-radius:9px;font-size:23px;box-shadow:0 3px 6px #38250b66}
.ct-bank-chip{display:flex;align-items:center;gap:5px;pointer-events:auto;background:linear-gradient(#fff4d8,#e4c898);border:2px solid #fff3cd;border-radius:12px;padding:3px 7px;box-shadow:0 3px #865d30;color:#4b301d;font-size:23px;font-weight:900;text-shadow:0 1px #fff5dc}
.ct-bank-chip img{width:28px;height:29px}.ct-plus{display:grid;place-items:center;border:1px solid #dfaa55;background:#f4b756;border-radius:6px;width:24px;height:26px;color:#fff9e6;font:bold 25px/1 Arial}
.ct-map-hint{position:absolute;top:52px;left:20px;margin:0;color:#fffce7;text-shadow:0 1px 3px #2b3510,0 1px 3px #2b3510;font-size:17px;pointer-events:none}
.ct-building{position:absolute;z-index:2;width:21%;transform:translate(-50%,-100%);display:flex;flex-direction:column;align-items:center;justify-content:flex-end;text-align:center;text-decoration:none;outline:none;-webkit-tap-highlight-color:transparent;isolation:isolate}
.ct-building img{width:100%;height:100%;max-height:208px;object-fit:contain;object-position:center bottom;filter:drop-shadow(0 10px 6px #17350966);transform-origin:50% 95%;transition:filter .18s,transform .18s;pointer-events:none;user-select:none}
.ct-building-hall{left:50%;top:25%;width:22%;height:23%;z-index:2}
.ct-building-vault{left:20%;top:31%;width:20%;height:23%;z-index:3}
.ct-building-mine{left:82%;top:30%;width:21%;height:22%;z-index:3}
.ct-building-tower{left:69%;top:52%;width:18%;height:29%;z-index:4}
.ct-building-forge{left:29%;top:70%;width:26%;height:30%;z-index:5}
.ct-building-tavern{left:78%;top:78%;width:25%;height:26%;z-index:5}
.ct-building-label{position:absolute;top:calc(100% - 7px);left:50%;transform:translateX(-50%);display:flex;align-items:center;flex-direction:column;gap:0;min-width:124px;max-width:220px;padding:4px 10px;background:linear-gradient(#fff3d6,#d7b881);border:2px solid #fff4cf;border-radius:9px;box-shadow:0 3px 0 #71522f,0 5px 10px #342b1466;color:#4a2b17;white-space:nowrap;pointer-events:none;line-height:1.1}
.ct-building-label b{font-size:19px;font-weight:900}.ct-building-label small{font-size:14px;color:#685134}
.ct-building:hover img,.ct-building:focus-visible img{transform:translateY(-4px);filter:drop-shadow(0 0 5px #ffe774) drop-shadow(0 8px 7px #40381999)}
.ct-building:focus-visible .ct-building-label{outline:3px solid #20773c;outline-offset:3px}
.ct-building.is-selected img{filter:drop-shadow(0 0 3px #fff8b5) drop-shadow(0 0 8px #fff79b) drop-shadow(0 8px 7px #40381999)}
.ct-building.is-selected .ct-building-label{background:linear-gradient(#bce281,#70ab42);border-color:#f9ed91;color:#244516;box-shadow:0 3px #41682a,0 0 10px #fff494}.ct-building.is-selected small{color:#315323}
.ct-building.is-unbuilt:not(.is-constructing) img{opacity:.59;filter:grayscale(.6) drop-shadow(0 8px 5px #16380955)}
.ct-building.is-unbuilt.is-selected img{opacity:.85;filter:drop-shadow(0 0 9px #fff3ac)}
.ct-building.is-locked .ct-building-label small{color:#8b462e}
.ct-building.is-constructing .ct-building-label{background:repeating-linear-gradient(130deg,#f2cf81 0 12px,#efc063 12px 24px);border-color:#fff0b4}.ct-building.is-constructing .ct-building-label small{color:#6d4316}
.ct-map-footer{position:absolute;bottom:0;left:0;right:0;background:linear-gradient(0deg,#f2dfbaf7 0,#f4e5c9f7 71%,#f7e9cd00 100%);padding:17px 10px 8px;display:grid;grid-template-columns:minmax(0,1fr);gap:5px;pointer-events:none;z-index:6}
.ct-map-footer a{pointer-events:auto}
.ct-notice{display:flex;align-items:center;justify-content:center;gap:9px;min-width:0;line-height:1.2;color:#432b17;padding:3px 12px;background:#fff6decc;border:1px solid #cfb37b;border-radius:7px}
.ct-notice span{font-size:12px;font-weight:900;white-space:nowrap;color:#8a6135}.ct-notice b{font-size:16px;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}
.ct-quick-links{display:grid;grid-template-columns:repeat(4,minmax(0,1fr));gap:5px}.ct-quick-links>a{display:flex;align-items:center;justify-content:center;gap:6px;min-width:0;border:2px solid #fff4d3;background:linear-gradient(#fff0d1,#e4c795);border-radius:9px;padding:2px 5px;box-shadow:0 2px #a78254;font-weight:900;font-size:17px;line-height:19px;transition:filter .15s}.ct-quick-links>a:hover{filter:brightness(1.06)}.ct-quick-links img{height:34px;width:39px;object-fit:contain}.ct-quick-links small{display:block;font:13px/15px "Roboto Condensed",Arial;color:#775530;white-space:nowrap}
.ct-panel{position:relative;display:flex;flex-direction:column;gap:9px;min-width:0;min-height:0;overflow:auto;scrollbar-width:thin;scrollbar-color:#b88d52 #f3e0ba;border:3px solid #fff1d2;border-radius:19px;background:linear-gradient(115deg,#fff4d8,#edd5a8);box-shadow:inset 0 0 0 1px #cfaa73,0 4px 7px #44270b55;padding:15px;outline:none}
.ct-panel-heading{display:flex;align-items:center;justify-content:space-between;gap:8px;border-bottom:1px solid #d7bc8f;padding-bottom:9px;flex:none}.ct-eyebrow{font-weight:700;letter-spacing:.06em;color:#94724b;font-size:12px}.cc-town .ct-panel-heading h2{font-size:28px;margin:3px 0 0;text-shadow:0 1px #fff8e5}.ct-level{border:2px solid #fdf2d0;border-radius:9px;background:#dccc9f;padding:6px 9px;font-weight:900;font-size:19px;white-space:nowrap}
.ct-panel-art{position:relative;height:151px;flex:none;display:flex;align-items:center;justify-content:center;border-radius:13px;background:radial-gradient(ellipse at 50% 72%,#b6c99780,transparent 69%),linear-gradient(#efd8ab70,#f7e8c8);overflow:hidden}.ct-panel-art img{height:148px;width:100%;object-fit:contain;filter:drop-shadow(0 7px 4px #715d393a)}.ct-state-label{position:absolute;right:6px;bottom:5px;font-size:13px;background:#fff9e6ed;border:1px solid #dbc49c;border-radius:7px;padding:3px 7px;color:#785d34}
.ct-effects{display:grid;gap:4px;flex:none}.ct-effects>div{display:flex;align-items:flex-start;justify-content:space-between;gap:10px;padding:7px 9px;border-radius:8px;background:#e6d4aff0;font-size:17px;line-height:1.25}.ct-effects>div:nth-child(2){background:#e2e9b8}.ct-effects span{color:#776143;white-space:nowrap;font-size:15px}.ct-effects strong{text-align:right;font-weight:800}.ct-effects>div:nth-child(2) strong{color:#477025}
.ct-requirements{font-size:15px;line-height:1.3;padding:0 2px;flex:none}.ct-requirements p{margin:2px 0;color:#8f452b}.ct-requirements .is-met{color:#4d722e}
.ct-price{display:flex;align-items:flex-start;justify-content:space-between;gap:8px;padding:7px 0 10px}.ct-price>div{min-width:0}.ct-price>div:last-child{text-align:right}.ct-price span{font-size:14px;color:#876642}.ct-price b{display:flex;align-items:center;gap:3px;font-size:22px;line-height:27px;color:#50301a}.ct-price b span{font:inherit;color:inherit}.ct-price img{width:22px;height:27px}.ct-price>div:last-child b{justify-content:flex-end;font-size:20px}
.ct-upgrade-form{margin-top:auto}.ct-build-button{width:100%;min-height:50px;font-size:20px!important;padding:8px!important;line-height:1.15;flex:none}.ct-build-button:disabled{filter:saturate(.45);opacity:.65}.ct-blocked{font-size:15px;line-height:1.25;color:#866342;margin:0;text-align:center}.ct-construction{background:#f9e4b4;border:1px solid #d7b271;border-radius:11px;padding:10px;flex:none}.ct-construction>div{display:flex;justify-content:space-between;gap:6px;margin-bottom:6px;font-size:18px}.ct-construction time{color:#985a1f;font-variant-numeric:tabular-nums;font-weight:900}.ct-construction small{display:block;font-size:14px;line-height:1.25;margin-top:5px}.ct-construction progress{height:17px}.ct-panel-bottom{display:flex;justify-content:space-between;gap:8px;font-size:13px;color:#917047;border-top:1px solid #d7bc8f;padding-top:8px;margin-top:auto}.ct-panel-bottom a{color:#6c4c27;text-decoration:underline;text-underline-offset:3px;font-weight:bold}.ct-active-jump{border:1px solid #d2b47b;border-radius:7px;padding:7px;background:#f9ebcd;color:#795525;font:700 15px "Roboto Condensed",Arial;cursor:pointer}.ct-server-status{margin:0;font-size:15px;line-height:1.25;color:#427029}.ct-server-status:empty{display:none}.ct-server-status.is-error{color:#a14025}
.ct-aux{padding:15px;margin-top:15px;background:#f5e4c4;border:2px solid #fff1d5;border-radius:15px}.ct-dialog{position:fixed;inset:0;width:min(630px,calc(100vw - 28px));height:auto;max-height:calc(var(--cc-viewport-height,100dvh) - 28px);margin:auto;padding:0;border:3px solid #fff3d5;border-radius:18px;background:linear-gradient(#fff1d5,#e6cba0);color:#4b301d;box-shadow:0 12px 80px #211708aa;overflow:auto;font:18px/1.4 "Roboto Condensed",Arial,sans-serif}.ct-dialog::backdrop{background:#302113b3}.ct-dialog>header{position:sticky;top:0;display:flex;align-items:center;justify-content:space-between;gap:10px;background:linear-gradient(#fff0d0,#e7cca0);padding:9px 12px;border-bottom:2px solid #cfac76;z-index:5}.ct-dialog>header h2{font-size:25px;margin:0}.ct-dialog-close{width:42px;height:42px;padding:0;font-size:25px}.ct-dialog .ct-aux{margin:0;padding:12px;border:0;border-radius:0;background:none}.ct-dialog .cc-bank{height:535px;max-width:540px;margin:auto}.ct-dialog .cc-chat{margin:0;height:min(570px,calc(var(--cc-viewport-height,100dvh) - 120px));display:flex;flex-direction:column;padding:12px}.ct-dialog .cc-chat h2{display:none}.ct-dialog .cc-chat-messages{flex:1;min-height:0;height:auto}.ct-dialog .cc-chat form{flex:none;display:flex;flex-wrap:nowrap}.ct-dialog .cc-chat form input{min-width:0}.ct-dialog .cc-chat form button{width:55px;flex:none}.ct-dialog .cc-chat form input{width:100%}.ct-dialog .cc-chat-status:empty{display:none}.ct-notice-full>img{display:block;width:100%;height:auto;max-height:230px;object-fit:cover;border-radius:10px}.ct-notice-full>p{white-space:pre-wrap;overflow-wrap:anywhere}.ct-notice-full dl{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:8px}.ct-notice-full dl>div{border:1px solid #d1b37d;background:#fff2d4;border-radius:9px;padding:8px;text-align:center}.ct-notice-full dt{font-size:14px;color:#8d6c41}.ct-notice-full dd{margin:5px 0 0;font-weight:900;font-size:24px}
.cc-town :is(a,button,input):focus-visible,.ct-dialog :is(a,button,input):focus-visible{outline:3px solid #317a39;outline-offset:3px}
@media(prefers-reduced-motion:reduce){.ct-map-scroll{scroll-behavior:auto}.ct-building img,.ct-quick-links>a{transition:none}}
@media(max-width:1000px){
 body.cc-town-body{font-size:17px}.cc-town-body .cc-viewport .cc-shell{width:100%;height:100%;max-height:100%;zoom:1!important;padding:0 8px;grid-template-rows:110px minmax(0,1fr) auto 88px;grid-template-areas:"hud" "content" "extra" "nav"}
 .cc-town-body .cc-viewport .cc-hud{position:relative;height:110px;margin:0;display:grid;grid-template-columns:1.15fr 1fr 1fr;gap:5px;padding-top:53px;min-height:0}
 .cc-town-body .cc-viewport .cc-logo{position:absolute;top:-4px;left:-5px;width:177px;height:59px}.cc-town-body .cc-viewport .cc-hud-stat{position:relative!important;inset:auto!important;width:auto!important;height:52px;padding:0;border-radius:14px;border-width:2px;min-width:0}.cc-town-body .cc-hud-stat>.cozy-aux-icon,.cc-town-body .cc-miner-icon{display:none}.cc-town-body .cc-viewport .cc-hud-stat>span:last-of-type{left:6px;top:4px}.cc-town-body .cc-viewport .cc-hud-stat small{font-size:10px;line-height:12px}.cc-town-body .cc-viewport .cc-hud-stat b,.cc-town-body .cc-viewport .cc-hud-stat:nth-child(4) b{font-size:23px;line-height:27px}.cc-town-body .cc-viewport .cc-hud-stat em{top:36px;left:0;font-size:9px;line-height:10px;width:88px}.cc-town-body .cc-viewport .cc-hud-stat i{right:3px;bottom:8px;width:21px;height:23px;font-size:25px;line-height:18px}.cc-town-body .cc-viewport .cc-hud-short{position:absolute;top:3px;left:auto;width:44px;height:46px;padding:1px;border-radius:11px}.cc-town-body .cc-viewport .cc-hud-short:nth-child(5){right:49px}.cc-town-body .cc-viewport .cc-hud-short:nth-child(6){right:0}.cc-town-body .cc-viewport .cc-hud-short .cozy-aux-icon{width:29px;height:29px}.cc-town-body .cc-viewport .cc-hud-short small{font-size:7px;line-height:9px}
 .cc-town-body .cc-viewport #ccContent{padding:0 1px 9px;border-radius:12px}.cc-town-body .cc-viewport .cc-clan-head{height:auto;min-height:95px;display:flex;flex-wrap:nowrap;gap:4px;padding:29px 0 3px;border:0;background:none;margin:0}.cc-town-body .cc-viewport .cc-back{position:absolute;left:0;top:0;min-width:0!important;width:135px;height:27px;min-height:27px;font-size:13px!important;padding:3px 8px}.cc-town-body .cc-viewport .cc-clan-badge{margin-left:0;width:56px;height:65px;flex-shrink:0}.cc-town-body .cc-viewport .cc-clan-title{min-height:61px;min-width:0;width:calc(100% - 55px);margin-left:-7px;padding:5px 7px 5px 12px;border:2px solid #fff2d4;background:#f8e8c9ef;border-radius:13px;color:#432b18;box-shadow:0 2px 3px #55411c57}.cc-town-body .cc-viewport .cc-clan-title h1{font-size:22px;line-height:25px;white-space:normal;text-shadow:none}.cc-town-body .cc-viewport .cc-clan-title>div{gap:5px;flex-wrap:wrap;margin-top:4px}.cc-town-body .cc-viewport .cc-clan-title b,.cc-town-body .cc-viewport .cc-clan-title>div>span{font-size:13px!important;color:#432b18!important}.cc-town-body .cc-viewport .cc-clan-title progress{width:70px;height:12px}.cc-town-body .cc-viewport .cc-clan-admin{right:3px;top:0;font-size:23px;width:30px;height:27px}
 .cc-town-body .cc-viewport .cc-clan-tabs{position:sticky;inset:auto;top:0;z-index:8;width:auto;height:42px!important;margin:4px 0 8px;gap:4px;background:#efdab9;overflow-x:auto;overscroll-behavior:contain;scrollbar-width:none}.cc-town-body .cc-viewport .cc-clan-tabs>a{flex:0 0 auto;font-size:15px;padding:7px 11px;border-radius:10px}.cc-town-body .cc-viewport .cc-tab-icon{display:none}
 .cc-town-body .cc-viewport .cc-game-nav{position:relative;inset:auto;display:grid;grid-template-columns:repeat(4,minmax(0,1fr));grid-template-rows:repeat(2,40px);gap:3px;width:calc(100% + 16px);height:88px;margin:0 -8px;padding:3px 6px;overflow:hidden;border-top:2px solid #fff4d7}.cc-town-body .cc-viewport .cc-game-nav>a{min-width:0;width:auto;height:40px;flex:none;display:flex;flex-direction:row;align-items:center;justify-content:center;gap:1px;padding:1px 2px;border-radius:10px;font-size:10px;line-height:12px}.cc-town-body .cc-viewport .cc-game-nav .cozy-nav-icon,.cc-town-body .cc-viewport .cc-game-nav .cozy-icon-mine{position:relative;inset:auto;transform:none;flex:none;width:30px;height:33px}.cc-town-body .cc-viewport .cc-extras-toggle{position:relative;inset:auto;grid-area:extra;align-self:center;justify-self:stretch;width:auto;min-height:32px;height:32px;margin:3px 1px 5px;padding:3px 10px;font-size:15px;border-width:2px;border-radius:9px}.cc-town-body .cc-footer{display:none}
 .ct-layout{grid-template-columns:minmax(0,1fr);height:auto;gap:10px}.ct-map-frame{height:466px;border-radius:15px}.ct-map{min-width:690px}.ct-map-heading{top:8px;left:8px;right:8px;gap:6px}.cc-town .ct-map-heading h2{font-size:19px;padding:6px 9px}.ct-bank-chip{font-size:19px}.ct-map-hint{font-size:14px;top:50px;left:15px}.ct-map-hint::after{content:" · ↔"}.ct-building-label b{font-size:16px}.ct-building-label small{font-size:13px}.ct-building-label{min-width:105px;padding:4px 7px;max-width:180px}.ct-map-footer{padding:17px 6px 7px}.ct-notice{padding:4px 6px;gap:5px}.ct-notice span{font-size:10px}.ct-notice b{font-size:14px}.ct-quick-links{gap:3px}.ct-quick-links>a{flex-direction:column;gap:0;padding:4px 2px;font-size:14px;line-height:16px;text-align:center}.ct-quick-links img{height:24px;width:30px}.ct-quick-links small{font-size:11px;line-height:14px}.ct-panel{padding:12px;gap:9px;min-height:0;max-height:none;overflow:visible;border-radius:15px;scroll-margin-top:48px}.ct-panel-heading h2{font-size:26px}.ct-effects>div{font-size:17px}.ct-panel-art{height:160px}.ct-panel-art img{height:157px}.ct-upgrade-form{margin-top:0}.ct-panel-bottom{margin-top:3px}.ct-price span{font-size:15px}.ct-price b{font-size:24px}.ct-blocked,.ct-server-status{font-size:16px}.ct-panel-bottom{font-size:14px}.ct-dialog{width:calc(100vw - 16px);max-height:calc(var(--cc-viewport-height,100dvh) - 16px);border-radius:14px}.ct-dialog .ct-aux{padding:8px}.ct-dialog .cc-bank{height:550px}.ct-notice-full dl{grid-template-columns:1fr}.ct-notice-full dl>div{display:flex;justify-content:space-between;align-items:center}.ct-notice-full dd{margin:0}
}
@media(min-width:700px) and (max-width:1000px){.ct-map-frame{height:515px}.ct-map{min-width:790px}.ct-panel{display:grid;grid-template-columns:190px minmax(0,1fr);gap:10px 15px}.ct-panel-heading{grid-column:1/-1}.ct-panel-art{grid-row:2/6;height:220px;align-self:start}.ct-panel-art img{height:218px}.ct-panel>*:not(.ct-panel-heading):not(.ct-panel-art){grid-column:2}.ct-panel-bottom{grid-column:1/-1!important}.ct-quick-links>a{flex-direction:row;gap:6px;font-size:17px}.ct-quick-links img{height:35px;width:40px}.ct-quick-links small{font-size:13px}.ct-map-footer{padding:17px 9px 7px}}

/* Keep the bottom buildings and their level badges above the compact-screen controls. */
@media(max-width:1000px){.ct-map-frame{height:auto;display:grid;grid-template-rows:392px auto}.ct-map-scroll{height:392px}.ct-map-footer{position:relative;inset:auto;padding:7px 6px;background:linear-gradient(#f5e5c6,#e8cfa6)}.ct-map{height:392px}.ct-notice{background:#fff4d9}.ct-building-tavern{top:79%}}
@media(min-width:700px) and (max-width:1000px){.ct-map-frame{grid-template-rows:460px auto}.ct-map-scroll,.ct-map{height:460px}}

@media(min-width:1001px){.ct-map-footer{padding:8px 8px 6px;gap:4px}.ct-notice{padding:3px 9px}.ct-quick-links img{height:31px;width:35px}.ct-quick-links>a{font-size:16px;line-height:18px}.ct-quick-links small{font-size:12px;line-height:14px}}

.ct-dialog .cc-amount-presets button{font-size:18px;padding:3px;white-space:nowrap}.ct-dialog .cc-amount-presets button:before{font-size:13px;margin-right:3px}
