#colonyDialog{width:min(1140px,96vw);max-width:96vw;max-height:94dvh;height:fit-content;padding:0;border:1px solid #577784;border-radius:14px;color:#dcecf4;background:#0b1c2b;box-shadow:0 22px 90px #000b;font:12px/1.45 system-ui,sans-serif}
#colonyDialog::backdrop{background:#010c18b8;backdrop-filter:blur(5px)}
#colonyDialog *{box-sizing:border-box}#colonyDialog button{font:inherit;cursor:pointer;min-height:36px;padding:7px 10px;border:1px solid #49606f;border-radius:7px;color:#dcecf4;background:#142d3d;touch-action:manipulation}#colonyDialog button:disabled{cursor:default;opacity:.45}#colonyDialog button:focus-visible{outline:2px solid #efd18b;outline-offset:2px}#colonyDialog button:not(:disabled):hover{border-color:#79d4cc}#colonyDialog .primary{background:#76d3c7;color:#09292c;font-weight:750;border-color:#9cebe0}#colonyDialog .active{border-color:#84dbbe;background:#1c4a49;color:#c5ffdd}
#colonyDialog h2,#colonyDialog h3,#colonyDialog p{margin:0}#colonyDialog h2{font-size:20px}#colonyDialog h3{font-size:14px}#colonyDialog small{font-size:10px;color:#a6c1cd}#colonyDialog strong{font-weight:650}
.colony-shell{display:flex;flex-direction:column;max-height:92dvh}.colony-shell>header{display:flex;align-items:center;justify-content:space-between;padding:13px 18px;background:linear-gradient(105deg,#1c3b4a,#102332);border-bottom:1px solid #47616e;flex-shrink:0}.colony-shell>header small{color:#e9ca81!important;letter-spacing:2px}.colony-shell>header button{min-width:40px;font-size:24px!important;padding:0!important}.colony-wallet{display:grid;grid-template-columns:repeat(4,minmax(0,1fr));gap:1px;background:#314450;border-bottom:1px solid #455963;flex-shrink:0}.colony-wallet span{background:#102635;padding:7px 14px;display:flex;gap:6px;align-items:center;justify-content:space-between;font-size:10px}.colony-wallet b{font-size:13px;color:#eccc86}.colony-wallet span:nth-child(3) b{color:#8ef1c0}.colony-wallet span:last-child b{color:#e7b5ff}
.colony-tabs{display:flex;gap:6px;padding:8px 12px;border-bottom:1px solid #2e4c5b;flex-shrink:0}.colony-tabs button{flex:1}.colony-queues{display:grid;grid-template-columns:1fr 1fr;gap:8px;padding:8px 12px;flex-shrink:0}.colony-task{display:flex;gap:8px;justify-content:space-between;align-items:center;background:#132b38;border:1px solid #31515c;border-radius:8px;padding:7px 9px;min-width:0}.colony-task>div{flex:1;min-width:0;display:grid;grid-template-columns:1fr auto;gap:3px 6px}.colony-task strong{font-size:10px}.colony-task span{font-size:10px;color:#8fe1c0}.colony-task progress{width:100%;height:4px;grid-column:1/-1;accent-color:#82d8bc}.colony-task.idle{color:#809ba8;min-height:40px}.colony-task button{font-size:10px!important;white-space:nowrap}.colony-content{overflow:auto;min-height:0;padding:4px 12px 12px;overscroll-behavior:contain}.colony-layout{display:grid;grid-template-columns:minmax(0,1.65fr) minmax(270px,1fr);gap:12px;align-items:start}.colony-map{border:1px solid #3b6262;border-radius:10px;background:radial-gradient(ellipse at 40% 45%,#214a45,#0b202c 75%);overflow:hidden}.colony-map-caption{display:flex;justify-content:space-between;padding:8px 12px;font-size:10px;color:#aedbcc;background:#0c2533c0}.colony-field{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:0;padding:8px;background-image:linear-gradient(30deg,transparent 48%,#c7efbc09 49%,#c7efbc09 50%,transparent 51%),linear-gradient(150deg,transparent 48%,#c7efbc09 49%,#c7efbc09 50%,transparent 51%);background-size:60px 35px}.colony-field .colony-tile{position:relative;min-width:0;height:148px;border:1px solid transparent!important;border-radius:9px;background:transparent!important;padding:0 4px!important;isolation:isolate;overflow:hidden}.colony-tile.selected{border-color:#9bddb5!important;background:#81e4bb12!important}.colony-pad{position:absolute;inset:45% 5% 24%;transform:skewY(-12deg);border:1px solid #658e8544;background:linear-gradient(140deg,#294540,#13232a);box-shadow:0 5px 0 #061d23;z-index:-1}.colony-tile canvas{width:100%;height:110px;object-fit:contain;pointer-events:none;filter:drop-shadow(0 6px 5px #0008)}.colony-tile.building canvas{opacity:.4;filter:sepia(.7)}.colony-tile-label{position:absolute;bottom:5px;left:0;width:100%;display:block;text-align:center;font-size:10px;text-shadow:0 1px 3px #000}.colony-tile-label small{display:block;color:#8fe5bb!important;font-size:9px!important}.colony-empty{display:block;font-size:32px;font-style:normal;color:#7aaba680;margin:24px 0 35px}.colony-growing{position:absolute;right:3%;bottom:27%;width:52%;filter:drop-shadow(0 0 8px #82ffc044)}.colony-plant{width:68px;height:68px;fill:var(--plant);stroke:#316c4c;stroke-width:1}.colony-growing .colony-plant{width:100%;height:auto}.colony-detail{background:#102838;border:1px solid #365568;border-radius:9px;padding:12px;min-width:0}.colony-detail>h3{color:#f1d38c}.colony-detail em{font-size:11px;font-style:normal;color:#9decc5}.colony-note{font-size:10px;color:#93b5c1;margin:8px 0!important;line-height:1.5}.colony-map>.colony-note{padding:0 12px}.colony-build-list{display:grid;gap:6px;margin-top:8px}.colony-build-list article{border:1px solid #34545f;border-radius:7px;padding:8px;display:grid;gap:4px}.colony-build-list article>div{display:flex;justify-content:space-between;gap:4px}.colony-build-list article span{color:#a3b9c3;font-size:10px}.colony-build-list button{justify-self:end;min-width:90px}.colony-upgrade{display:grid;gap:6px;border-top:1px solid #365664;padding-top:10px;margin-top:10px}.colony-crops{display:grid;gap:7px}.colony-crops article{display:flex;gap:7px;align-items:center;border:1px solid #395958;border-radius:8px;padding:6px}.colony-crops article>div{display:grid;flex:1;gap:2px}.colony-crops button{justify-self:end}.colony-crop-hero{display:grid;justify-items:center;gap:4px;padding:10px;border-radius:8px;background:#102f2a}.colony-crop-hero .colony-plant{width:110px;height:100px}.colony-crop-hero button{width:100%}.colony-research-intro{padding:5px 2px 12px}.colony-research-intro p{font-size:11px;color:#9fbec8}.colony-research-grid{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:10px}.colony-research-grid article{display:flex;flex-direction:column;gap:6px;background:linear-gradient(145deg,#193849,#0e2332);border:1px solid #496372;border-radius:10px;padding:13px}.colony-tech-icon{font-size:25px;color:#a2e3db}.colony-tech-value{font-size:20px;color:#b0f4c7}.colony-ranks{display:flex;gap:4px}.colony-ranks i{height:4px;flex:1;background:#3b5260}.colony-ranks i.done{background:#87e6b5}.colony-research-grid button{margin-top:auto}.colony-exchange{display:grid;grid-template-columns:1.3fr 1fr;gap:14px}.colony-exchange>section>p{font-size:11px;color:#afc8cc;margin:8px 0!important}.colony-choice{display:flex;gap:6px;margin:10px 0}.colony-choice button{flex:1}.colony-gear-grid{display:grid;grid-template-columns:repeat(3,1fr);gap:7px}.colony-gear-grid small{display:block;color:#e4b1ff!important}.colony-set-preview{padding:14px;border:1px solid #4a946d;border-radius:10px;background:radial-gradient(ellipse at 50% 0,#245b47,#102c2a 60%);display:flex;flex-direction:column;gap:6px}.colony-gear-art{width:84px;height:84px;align-self:center;border:1px solid #a8e5ac;border-radius:9px;padding:5px;box-shadow:0 0 26px #97ffa21c}.colony-gear-art .item-art{width:100%;height:100%}.colony-set-preview h3{color:#afffbf}.colony-set-preview dl{display:grid;grid-template-columns:repeat(3,1fr);gap:8px;margin:5px 0}.colony-set-preview dl div{background:#001b1d70;padding:5px;border-radius:5px}.colony-set-preview dt{font-size:10px}.colony-set-preview dd{margin:0;color:#c0fbb9;font-weight:700}.colony-set-bonuses{font-size:10px;padding:6px 0;border-top:1px solid #42705b}.colony-set-bonuses p{padding:3px 0}.colony-set-bonuses b{color:#b4f1b0}.colony-notice{padding:7px 12px;background:#20513e;color:#d5f3e2;font-size:11px}.colony-shell>footer{padding:7px 12px;border-top:1px solid #294655;font-size:10px;color:#99b4c0;flex-shrink:0}.colony-intro{display:grid;justify-items:center;text-align:center;gap:12px;padding:18px;overflow:auto}.colony-intro canvas{width:min(300px,70vw);height:180px;object-fit:contain}.colony-intro p{max-width:520px;color:#acc8ce}.colony-intro button{min-width:220px}
@media(max-width:700px){#colonyDialog{width:98vw;max-width:98vw;max-height:97dvh;border-radius:10px}.colony-shell{max-height:96dvh}.colony-shell>header{padding:10px 12px}.colony-shell>header h2{font-size:16px}.colony-wallet{grid-template-columns:repeat(2,1fr)}.colony-wallet span{padding:5px 10px}.colony-queues{gap:4px;padding:5px 8px}.colony-task{padding:6px;flex-wrap:wrap}.colony-task>div{flex-basis:100%}.colony-task button{width:100%}.colony-layout,.colony-exchange{grid-template-columns:1fr}.colony-content{padding:3px 8px 8px}.colony-field{padding:4px}.colony-field .colony-tile{height:112px}.colony-tile canvas{height:79px}.colony-tile-label{font-size:9px}.colony-tile-label small{font-size:9px!important}.colony-tile .colony-empty{margin:10px 0 25px}.colony-tabs{padding:5px 8px;gap:4px}.colony-tabs button{font-size:11px!important;padding:6px!important}.colony-research-grid{grid-template-columns:repeat(2,minmax(0,1fr));gap:6px}.colony-research-grid article{padding:9px}.colony-tech-value{font-size:16px}.colony-research-grid h3{font-size:12px!important}.colony-shell>footer{font-size:9px}}
@media(pointer:coarse),(max-width:700px){#colonyDialog button{min-height:44px}.colony-shell>header button{min-width:44px}.colony-wallet span{font-size:10px}}
@media(max-height:480px) and (orientation:landscape){.colony-shell>header{padding:5px 12px}.colony-wallet span{padding:3px 8px}.colony-queues{padding:4px 8px}.colony-tabs{padding:4px 8px}.colony-layout{grid-template-columns:1.25fr 1fr}.colony-field .colony-tile{height:112px}.colony-tile canvas{height:80px}.colony-shell>footer{display:none}}

.colony-scene{display:block;width:100%;height:auto;aspect-ratio:900/710;touch-action:manipulation;cursor:crosshair}.colony-pad-picker{display:grid;grid-template-columns:repeat(9,1fr);gap:3px;padding:5px}.colony-pad-picker button{padding:3px!important;min-width:0}.colony-enter{display:flex;align-items:center;gap:10px;margin:4px 0 8px}.colony-theme-grid{display:grid;grid-template-columns:repeat(3,1fr);gap:8px;width:100%;margin:8px 0 12px}.colony-theme-grid button{display:flex;flex-direction:column;align-items:stretch;text-align:left;gap:4px;overflow:hidden}.colony-theme-grid canvas{width:100%;height:120px;object-fit:contain;border-radius:5px}.colony-theme-grid small{color:#b8dbde!important}.colony-intro{display:block;text-align:left}.colony-intro .colony-theme-grid button{min-width:0}.colony-intro .colony-theme-grid canvas{width:100%;height:120px}.colony-intro>.primary{display:block;margin:12px auto 0}.colony-layout{grid-template-columns:minmax(0,1.65fr) minmax(280px,1fr)}
@media(max-width:700px){.colony-layout{grid-template-columns:1fr}.colony-theme-grid{grid-template-columns:repeat(2,1fr)}.colony-theme-grid canvas,.colony-intro .colony-theme-grid canvas{height:100px}.colony-pad-picker{grid-template-columns:repeat(5,1fr)}.colony-tabs{display:grid;grid-template-columns:repeat(2,1fr)}.colony-enter{flex-wrap:wrap}.colony-intro{padding:12px}.colony-theme-grid button{font-size:11px!important}}

.colony-scene{height:auto;max-height:clamp(220px,calc(92dvh - 335px),540px);width:100%;object-fit:contain;background:#090f1a}.colony-map-caption{padding:5px 10px}.colony-enter{margin:2px 0 5px}.colony-queues:has(.idle:first-child):has(.idle:last-child){display:none}.colony-theme-grid~.primary{min-width:180px}.colony-shell>footer{font-size:9px}
@media(max-width:700px){.colony-tabs{display:flex}.colony-tabs button{font-size:10px!important}.colony-shell>header{padding:6px 10px}.colony-shell>header h2{font-size:14px}.colony-shell>header small{font-size:9px}.colony-wallet span{padding:4px 8px}.colony-queues{display:none}.colony-scene{height:auto;max-height:clamp(215px,calc(96dvh - 310px),450px)}.colony-shell>footer{display:none}.colony-map>.colony-note{margin:4px!important}.colony-map-caption{font-size:9px}.colony-detail{scroll-margin-top:8px}}
@media(max-height:480px) and (orientation:landscape){.colony-shell>header small{display:none}.colony-scene{height:230px}.colony-pad-picker{display:grid}}

@media(max-width:700px){.colony-queues{display:grid;grid-template-columns:repeat(auto-fit,minmax(120px,1fr))}.colony-task.idle{display:none}}

/* Painted colonies: keep the landscape large and controls outside the artwork. */
#colonyDialog{width:min(1280px,96vw)}
.colony-layout{grid-template-columns:minmax(0,2.3fr) minmax(250px,1fr);gap:10px}
.colony-map{background:#0a1521;border-color:#496473;box-shadow:0 8px 28px #0004}
.colony-scene{max-height:560px;background:#0b1421}
.colony-map-caption{background:#102431;color:#c8dfdf;letter-spacing:.3px}
.colony-pad-picker{background:#0b1e2a;padding:6px;gap:5px}
.colony-pad-picker button{border-radius:50%!important;width:32px;height:32px;min-height:32px!important;justify-self:center}
.colony-pad-picker button.active{box-shadow:0 0 12px #79d8c533}
.colony-theme-grid canvas,.colony-intro .colony-theme-grid canvas{height:auto;aspect-ratio:220/150;object-fit:cover;background:#0b1828!important}
.colony-detail{background:linear-gradient(145deg,#172f40,#0d2231);border-color:#3b5567}
@media(max-width:700px){.colony-layout{grid-template-columns:1fr}.colony-scene{max-height:none}.colony-pad-picker{grid-template-columns:repeat(5,1fr);gap:3px}.colony-pad-picker button{min-height:44px!important;width:44px;height:44px}.colony-enter small{font-size:9px!important}}
@media(max-height:480px) and (orientation:landscape){.colony-layout{grid-template-columns:1.4fr 1fr}.colony-scene{height:260px;max-height:260px}}

@media(min-width:701px) and (min-height:481px){.colony-scene{max-height:clamp(220px,calc(92dvh - 340px),560px)}}
.colony-crop-hero .colony-plant{width:50px;height:48px}

/* Compact painted colony launch icon; existing touch target is preserved. */
.topnav #colonyButton .colony-menu-icon{display:block;width:36px;height:36px;object-fit:contain;margin:0 auto 4px;filter:drop-shadow(0 1px 3px #0009);pointer-events:none}
.colony-theme-detail{white-space:normal;line-height:1.3;min-height:26px;display:block}
@media(max-width:1200px),(max-height:600px) and (max-width:1200px){.menu-open .topnav #colonyButton .colony-menu-icon{display:inline-block;width:30px;height:30px;margin:0 8px 0 0;vertical-align:middle}}

/* Image-led colony controls. Prices and timing stay visible before actions. */
#colonyDialog .colony-image-card{position:relative;display:flex;flex-direction:column;align-items:stretch;gap:5px;text-align:left;padding:10px;min-width:0;background:linear-gradient(155deg,#183445,#0a1c2b);border:1px solid #3b5969;border-radius:10px;overflow:hidden;transition:border-color .15s,box-shadow .15s}
#colonyDialog .colony-image-card:hover:not(:disabled){border-color:#7cddbe;box-shadow:inset 0 0 22px #65daba12}
#colonyDialog .colony-image-card:disabled{opacity:.65}
.colony-image-card>strong{font-size:12px;line-height:1.35}.colony-image-card>small{line-height:1.4}.colony-card-action{display:block;padding:7px 5px;border-radius:5px;background:#244a4d;color:#b4f5d9;font-weight:650;font-size:10px;text-align:center;margin-top:auto}
.colony-image-card:disabled .colony-card-action{background:#233441;color:#b7c4cc}
.colony-building-art{display:block;width:100%;height:100px;object-fit:contain;pointer-events:none}
.colony-building-heading{display:flex;align-items:center;gap:8px;padding-bottom:10px;border-bottom:1px solid #385261;margin-bottom:10px}
.colony-building-heading>.colony-building-art{flex:0 0 76px;width:76px;height:72px}.colony-building-heading>div{min-width:0}.colony-building-heading p{color:#aec7d1;font-size:10px;line-height:1.45}
.colony-building-heading h3{font-size:13px!important;margin:3px 0!important}.colony-building-heading em{font-size:10px;color:#e2c584;font-style:normal}
.colony-section-heading{display:flex;justify-content:space-between;align-items:center;gap:5px;margin-bottom:8px}.colony-section-heading h3{font-size:12px!important}
.colony-crops{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:6px}.colony-crops .colony-image-card{padding:6px!important;gap:4px}.colony-crops .colony-image-card>strong{font-size:11px}.colony-crops .colony-image-card>small{font-size:9px!important}
.colony-crop-picture{display:grid;place-items:center;width:100%;aspect-ratio:1;background:radial-gradient(ellipse at 50% 65%,color-mix(in srgb,var(--crop-color) 17%,transparent),transparent 72%);border-radius:6px}
.colony-plant{display:block;width:100%;height:100%;object-fit:contain;filter:drop-shadow(0 4px 8px #0006);pointer-events:none;fill:none}
.colony-seed-art{display:inline-block;object-fit:contain;vertical-align:middle;pointer-events:none;width:26px;height:26px;flex:0 0 auto}
.colony-seed-chance{display:flex;align-items:center;justify-content:center;gap:2px;color:#dab5f6!important}.colony-seed-chance .colony-seed-art{width:19px;height:19px}
.colony-wallet .colony-seed-art{width:22px;height:22px;margin:-5px 0}.colony-wallet span:last-child{justify-content:flex-start}.colony-wallet span:last-child b{margin-left:auto}
.colony-crop-hero{display:block;text-align:center;background:radial-gradient(ellipse at 50% 30%,#24523e88,#0a1d29);padding:10px;border-radius:10px;border:1px solid #436258}
.colony-kicker{color:#92cabc!important;font-size:9px!important;letter-spacing:1.5px}
#colonyDialog .colony-harvest-picture{display:flex;flex-direction:column;align-items:center;width:100%;gap:4px;background:transparent;border:0;padding:0!important;opacity:1;min-height:0}
.colony-crop-hero .colony-harvest-picture .colony-plant{width:150px;height:150px}.colony-harvest-picture>strong{font-size:14px}.colony-harvest-picture>span{padding:5px 15px;border-radius:6px;background:#234350;color:#a9c7d4;font-size:11px}
.colony-crop-hero[data-crop-state=ready]{border-color:#91cda0;box-shadow:inset 0 0 30px #9ecf7612}.colony-crop-hero[data-crop-state=ready] .colony-harvest-picture>span{background:#83d9b3;color:#0b2d25}.colony-crop-hero[data-crop-state=ready] .colony-plant{filter:drop-shadow(0 0 12px #a1e98e44)}
.colony-crop-progress{display:grid;grid-template-columns:1fr 1fr;align-items:center;gap:5px;margin:12px 0 7px;font-size:10px;color:#aeccca}.colony-crop-progress>strong{color:#b8e8bd}.colony-crop-progress progress{grid-column:1/-1;width:100%;height:5px;accent-color:#7adbb4}
.colony-upgrade{margin-top:12px;padding:8px;background:#0b1d2980;border-radius:7px}.colony-upgrade summary{cursor:pointer;min-height:32px;display:flex;align-items:center;gap:6px;color:#c4d6dc;font-size:11px}.colony-upgrade summary:before{content:'▸';color:#e2c584}.colony-upgrade[open] summary:before{content:'▾'}.colony-upgrade[open]>small,.colony-upgrade[open]>button{display:block;margin:7px 0 0}
.colony-build-list{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:7px}.colony-build-list .colony-building-art{height:85px}
#colonyDialog .colony-pad-picker{grid-template-columns:repeat(9,minmax(0,1fr));gap:4px;padding:6px}
#colonyDialog .colony-pad-picker .colony-pad-card{position:relative;border-radius:7px!important;width:100%;height:auto;min-width:0;min-height:74px!important;display:flex;flex-direction:column;gap:1px;align-items:center;padding:3px!important;background:#102633}
.colony-pad-card .colony-pad-picture{width:100%;height:45px;display:grid;place-items:center;pointer-events:none}.colony-pad-card .colony-building-art{width:100%;height:45px}.colony-pad-card .colony-plant{width:44px;height:44px}.colony-pad-card .colony-empty{font-size:27px;line-height:35px;color:#86b4bc}.colony-slot-no{position:absolute;left:3px;top:2px;font-size:8px;color:#b1d1d5;border-radius:3px;padding:0 3px;background:#09202bd9}.colony-pad-name{max-width:100%;overflow:hidden;text-overflow:ellipsis;white-space:nowrap;font-size:8px;line-height:1.3}.colony-pad-card>small,.colony-pad-card>small span{font-size:8px!important;color:#87d4b7!important}
#colonyDialog .colony-pad-card.active{border-color:#8ed5b7;background:#214841;box-shadow:inset 0 0 12px #6adaaa15}
.colony-research-grid{grid-template-columns:repeat(3,minmax(0,1fr));gap:8px}.colony-tech-picture{display:grid;place-items:center;flex:0 0 74px;align-self:center}.colony-tech-picture .skill-art{width:74px;height:64px;border-radius:9px;border:1px solid #7da2b34d;margin:0}
#colonyDialog .colony-research-card{flex-direction:row;gap:10px;padding:12px}.colony-research-copy{display:flex;flex-direction:column;gap:5px;min-width:0;flex:1}.colony-research-copy>strong{font-size:13px}.colony-research-copy .colony-tech-value{font-size:15px;color:#b5e8d3}.colony-research-copy .colony-card-action{font-size:10px}.colony-research-intro{margin-bottom:10px}.colony-research-intro p{font-size:11px;color:#a9c3ce}
.colony-research-link{display:flex;align-items:center;gap:8px;width:100%}.colony-research-link .skill-art{width:38px;height:33px;margin:0}
.colony-exchange>section>.colony-seed-art{float:left;width:45px;height:45px;margin:0 7px 0 0}.colony-gear-grid button{display:flex;flex-direction:column;align-items:center;justify-content:center;gap:3px;min-width:0}.colony-gear-grid button>.item-art{width:52px;height:52px}.colony-gear-grid button>small .colony-seed-art{width:18px;height:18px}
.colony-queues{grid-template-columns:repeat(auto-fit,minmax(200px,1fr))}.colony-task.idle{display:none}
@media(max-width:1000px){.colony-research-grid{grid-template-columns:repeat(2,minmax(0,1fr))}.colony-layout{grid-template-columns:minmax(0,1.6fr) minmax(300px,1fr)}}
@media(max-width:700px){.colony-layout{grid-template-columns:1fr}#colonyDialog .colony-pad-picker{grid-template-columns:repeat(3,minmax(0,1fr));gap:4px}#colonyDialog .colony-pad-picker .colony-pad-card{display:grid;grid-template-columns:40px 1fr;grid-template-rows:1fr 1fr;min-height:55px!important;text-align:left;padding:4px!important;column-gap:4px}.colony-pad-card .colony-pad-picture{grid-row:1/3;width:40px;height:43px}.colony-pad-card .colony-pad-name{font-size:9px;align-self:end}.colony-pad-card>small{align-self:start}.colony-slot-no{font-size:7px}.colony-building-heading>.colony-building-art{height:58px;width:60px;flex-basis:60px}.colony-building-heading{margin-bottom:8px;padding-bottom:6px}.colony-crops .colony-image-card{padding:5px!important}.colony-crop-hero .colony-harvest-picture .colony-plant{width:135px;height:135px}#colonyDialog .colony-harvest-picture{min-height:190px}.colony-upgrade summary{min-height:44px}.colony-research-grid{grid-template-columns:1fr}#colonyDialog .colony-research-card{padding:10px}.colony-tech-picture{flex-basis:82px}.colony-tech-picture .skill-art{width:82px;height:74px}.colony-queues{padding:5px 8px}.colony-task{flex-wrap:nowrap}.colony-task>div{flex-basis:auto}.colony-task button{width:auto}.colony-gear-grid{grid-template-columns:repeat(4,minmax(0,1fr))}}
@media(max-height:480px) and (orientation:landscape){.colony-layout{grid-template-columns:minmax(0,1.3fr) minmax(300px,1fr)}.colony-pad-picker{display:grid}.colony-research-grid{grid-template-columns:repeat(2,minmax(0,1fr))}.colony-scene{height:240px}.colony-crop-hero .colony-harvest-picture .colony-plant{width:110px;height:110px}}

@media(min-width:701px) and (min-height:481px){.colony-scene{max-height:clamp(210px,calc(92dvh - 435px),490px)}}

#colonyDialog .colony-back-map{display:none}
@media(max-width:700px){#colonyDialog[data-detail-open=false] .colony-detail{display:none}#colonyDialog[data-detail-open=true] .colony-map,#colonyDialog[data-detail-open=true] .colony-enter{display:none}#colonyDialog .colony-back-map{display:block;width:100%;text-align:left;margin-bottom:8px;background:#102634;color:#b8d7dd}#colonyDialog[data-detail-open=true] .colony-content{scroll-behavior:auto}}

#colonyDialog .colony-building-menu{grid-template-columns:repeat(6,minmax(0,1fr));gap:5px}#colonyDialog .colony-building-menu .colony-building-quick{width:100%;height:auto;min-height:96px!important;display:flex;flex-direction:column;align-items:center;gap:2px;padding:5px!important;border-radius:7px!important;min-width:0;text-align:center}.colony-building-quick .colony-building-art{height:55px}.colony-building-quick>strong{font-size:10px;line-height:1.2}.colony-building-quick>small{font-size:9px!important}.colony-farm-picker{display:flex;gap:5px;margin:0 0 8px;overflow-x:auto}.colony-farm-picker button{display:flex;flex-direction:column;align-items:center;min-width:54px;padding:3px!important;flex:0 0 auto}.colony-farm-picker .colony-plant,.colony-farm-picker .colony-building-art{width:48px;height:42px}.colony-farm-picker button span,.colony-farm-picker button small{font-size:9px!important}#colonyDialog .colony-reward-goal{margin:5px 6px 6px;padding:7px 10px;display:flex;align-items:center;gap:9px;width:calc(100% - 12px);text-align:left;border-color:#65885e;background:linear-gradient(100deg,#1c3e33,#102532)}.colony-reward-art .item-art{width:40px;height:40px}.colony-reward-goal>span:last-child{display:grid;gap:2px}.colony-reward-goal strong{font-size:11px}.colony-reward-goal small{font-size:9px!important}.colony-reward-goal .colony-seed-art{width:20px;height:20px;margin:-4px 0}
@media(min-width:701px) and (min-height:481px){.colony-scene{max-height:clamp(180px,calc(92dvh - 500px),430px)}}
@media(max-width:700px){#colonyDialog .colony-building-menu{grid-template-columns:repeat(3,minmax(0,1fr))}#colonyDialog .colony-building-menu .colony-building-quick{min-height:91px!important}.colony-building-quick .colony-building-art{height:51px}.colony-scene{max-height:300px}.colony-reward-goal strong{font-size:10px}.colony-reward-goal>span{min-width:0}}

@media(max-width:700px){.colony-map{display:flex;flex-direction:column}.colony-map-caption{order:0}.colony-building-menu{order:1}.colony-scene{order:2;max-height:240px}.colony-reward-goal{order:3}.colony-map>.colony-note{order:4}.colony-enter:has(>small:only-child){display:none}.colony-task{padding:6px}.colony-task button{min-height:44px}.colony-building-menu .colony-building-quick{min-height:86px!important}}

@media(pointer:coarse){#colonyDialog button{min-height:44px}}

@media(max-height:500px) and (max-width:1100px) and (orientation:landscape){
 #colonyDialog .colony-shell{display:block;overflow-y:auto;max-height:94dvh}
 #colonyDialog .colony-shell>header{padding:4px 10px}#colonyDialog h2{font-size:16px}.colony-wallet span{padding:4px 10px}.colony-tabs{padding:4px 10px}
 .colony-content{overflow:visible}.colony-layout{grid-template-columns:1fr}.colony-map{display:flex;flex-direction:column}.colony-map-caption{order:0}.colony-building-menu{order:1}.colony-scene{order:2;max-height:260px}.colony-reward-goal{order:3}.colony-map>.colony-note{order:4}
 #colonyDialog[data-detail-open=false] .colony-detail{display:none}#colonyDialog[data-detail-open=true] .colony-map,#colonyDialog[data-detail-open=true] .colony-enter{display:none}
 #colonyDialog .colony-back-map{display:block;margin-bottom:6px}.colony-enter:has(>small:only-child){display:none}.colony-crop-picture{height:100px;aspect-ratio:auto}.colony-crop-picture .colony-plant{max-height:100px}
 .colony-building-heading{padding:0;margin-bottom:5px}.colony-building-heading>.colony-building-art{height:44px}.colony-farm-picker button{flex-direction:row}.colony-farm-picker{margin-bottom:4px}
}

@media(max-height:500px) and (max-width:1100px) and (orientation:landscape){#colonyDialog .colony-shell>header{position:sticky;top:0;z-index:2}.colony-detail{scroll-margin-top:56px}}

/* Colony 106: allocate the viewport to the city, with a separate tool column. */
#colonyDialog{width:min(1440px,96vw,calc((94dvh - 138px)*1.2676 + 364px));height:94dvh;max-height:94dvh;font-size:12px}
#colonyDialog .colony-shell{height:100%;max-height:100%;display:flex;flex-direction:column;overflow:hidden}
.colony-topbar{position:relative;display:grid;grid-template-columns:minmax(150px,220px) minmax(0,1fr);gap:12px;align-items:center;padding:8px 56px 8px 12px;min-height:56px;background:linear-gradient(105deg,#1b3848,#0c202f);border-bottom:1px solid #3b5663;flex-shrink:0}
.colony-topbar header{padding:0;background:none;border:0}.colony-topbar header small{font-size:8px!important;letter-spacing:1.6px;color:#dbbc77!important}.colony-topbar header h2{font-size:17px!important;line-height:1.25}
#colonyDialog .colony-topbar header button{position:absolute;right:10px;top:9px;width:36px;height:36px;min-height:36px;padding:0;font-size:24px;line-height:1}
.colony-topbar .colony-wallet{border:0;background:none;gap:0}.colony-topbar .colony-wallet span{flex-direction:column;align-items:flex-start;gap:0;padding:2px 10px;background:none;border-left:1px solid #385362;font-size:9px;position:relative}.colony-topbar .colony-wallet b{font-size:13px;font-variant-numeric:tabular-nums}.colony-topbar .colony-wallet span:last-child b{margin-left:0}.colony-topbar .colony-seed-art{display:none}
#colonyDialog .colony-notice{padding:4px 12px;font-size:10px;flex:none}
.colony-toolbar{display:flex;align-items:stretch;gap:8px;padding:6px 10px;border-bottom:1px solid #294655;flex:none}
.colony-toolbar .colony-tabs{flex:1;min-width:0;border:0;padding:0;gap:4px}.colony-toolbar .colony-tabs button{padding:5px 8px;min-height:34px;font-size:11px}
.colony-toolbar .colony-queues{flex:1;max-width:52%;padding:0;gap:5px;grid-template-columns:repeat(auto-fit,minmax(150px,1fr))}.colony-toolbar .colony-task{padding:3px 6px;border-radius:6px;gap:5px}.colony-toolbar .colony-task strong{font-size:9px}.colony-toolbar .colony-task button{min-height:30px;padding:3px 6px}.colony-toolbar .colony-task progress{height:2px}
#colonyDialog[data-colony-tab=base] .colony-content{display:flex;flex-direction:column;overflow:hidden;flex:1;padding:8px 10px;gap:5px;min-height:0}
#colonyDialog .colony-enter{margin:0;flex:none;display:flex;align-items:center;gap:8px}.colony-enter:has(>small:only-child){display:none!important}
#colonyDialog .colony-layout{flex:1;min-height:0;display:grid;grid-template-columns:minmax(0,1fr) 320px;align-items:stretch;gap:9px}
#colonyDialog .colony-map{display:flex;flex-direction:column;min-width:0;min-height:0;overflow:hidden;border-radius:9px;background:#0c1722}
#colonyDialog .colony-map-caption{order:0;flex:none;padding:5px 10px;font-size:10px;border-bottom:1px solid #45606d}
#colonyDialog .colony-scene{order:1;flex:1 1 0%;min-height:0;width:100%;height:0;max-height:none;aspect-ratio:auto;object-fit:contain;background:radial-gradient(ellipse,#1b3341,#09131f)}
.colony-side{display:flex;flex-direction:column;gap:8px;min-width:0;min-height:0;overflow:auto;overscroll-behavior:contain;scrollbar-width:thin;padding-right:2px}
#colonyDialog .colony-side .colony-building-menu{flex:none;display:grid;grid-template-columns:repeat(3,minmax(0,1fr));padding:0;gap:5px;background:none}
#colonyDialog .colony-building-menu .colony-building-quick{min-height:80px!important;padding:4px!important;background:linear-gradient(155deg,#1a3545,#102332);border-color:#42616e}.colony-building-quick .colony-building-art{height:44px}.colony-building-quick>strong{font-size:9px}.colony-building-quick>small{font-size:8px!important}
#colonyDialog .colony-building-quick.active{background:linear-gradient(155deg,#235447,#143a37);border-color:#81dcc0;box-shadow:inset 0 0 14px #9ce7c015}
#colonyDialog .colony-detail{flex:none;padding:9px;border-radius:9px}.colony-side .colony-building-heading{padding-bottom:6px;margin-bottom:7px}.colony-side .colony-building-heading>.colony-building-art{height:52px;flex-basis:60px;width:60px}.colony-side .colony-farm-picker{margin-bottom:6px}
#colonyDialog .colony-side .colony-reward-goal{flex:none;order:0;width:100%;margin:0;padding:7px}.colony-side .colony-reward-goal .item-art{width:34px;height:34px}.colony-side .colony-reward-goal strong{font-size:10px}
.colony-side .colony-build-list .colony-building-art{height:62px}.colony-side .colony-build-list .colony-image-card{padding:6px!important;font-size:10px}.colony-side .colony-build-list small{font-size:9px!important}
#colonyDialog .colony-shell>footer{padding:3px 10px;font-size:9px;line-height:1.3}
#colonyDialog .colony-back-map{display:none}
@media(max-width:850px){
 #colonyDialog{width:98vw;max-width:98vw;height:96dvh;max-height:96dvh}.colony-topbar{display:block;padding:6px 8px;min-height:0}.colony-topbar header{min-height:43px;padding-right:45px}.colony-topbar header h2{font-size:15px!important}.colony-topbar .colony-wallet{grid-template-columns:repeat(4,minmax(0,1fr));padding-top:5px;border-top:1px solid #294653}.colony-topbar .colony-wallet span{padding:0 5px;font-size:8px}.colony-topbar .colony-wallet b{font-size:11px}.colony-topbar .colony-wallet span:first-child{border:0}
 #colonyDialog .colony-topbar header button{width:42px;height:42px;min-height:42px;top:6px;right:7px}.colony-toolbar{flex-direction:column;padding:5px 7px;gap:5px}.colony-toolbar .colony-tabs{display:flex}.colony-toolbar .colony-tabs button{min-height:44px;padding:4px;font-size:10px}.colony-toolbar .colony-queues{flex:auto;max-width:none;grid-template-columns:repeat(auto-fit,minmax(125px,1fr))}.colony-toolbar .colony-task button{min-height:44px}.colony-toolbar .colony-task strong{font-size:9px}
 #colonyDialog[data-colony-tab=base] .colony-content{display:block;overflow:auto;padding:6px 7px}#colonyDialog .colony-layout{display:flex;flex-direction:column;height:auto;gap:7px}.colony-side{display:contents}
 #colonyDialog .colony-side .colony-building-menu{order:0;grid-template-columns:repeat(3,minmax(0,1fr));margin-bottom:0}#colonyDialog .colony-map{order:1;display:flex;flex:none;height:auto}
 #colonyDialog .colony-scene{flex:none;height:auto;min-height:0;max-height:none;aspect-ratio:900/710}
 #colonyDialog .colony-side .colony-reward-goal{order:2}.colony-detail{order:0}
 #colonyDialog[data-detail-open=false] .colony-detail{display:none}#colonyDialog[data-detail-open=true] .colony-map,#colonyDialog[data-detail-open=true] .colony-building-menu,#colonyDialog[data-detail-open=true] .colony-reward-goal,#colonyDialog[data-detail-open=true] .colony-enter{display:none!important}
 #colonyDialog .colony-back-map{display:block;width:100%;margin-bottom:7px;min-height:44px;text-align:left}.colony-content .colony-enter{margin-bottom:5px!important}.colony-topbar .colony-wallet{font-size:9px}.colony-shell>footer{display:none}
}
@media(max-width:1100px) and (max-height:500px) and (orientation:landscape){
 #colonyDialog{width:98vw;height:96dvh}#colonyDialog .colony-shell{display:flex;overflow:hidden}.colony-topbar{display:grid;grid-template-columns:180px 1fr;padding:5px 50px 5px 9px;min-height:47px}.colony-topbar header{min-height:0}.colony-topbar header small{display:none}.colony-topbar .colony-wallet{border:0;padding:0}.colony-topbar .colony-wallet span{padding:0 8px}#colonyDialog .colony-topbar header button{top:3px;width:40px;height:40px}.colony-toolbar{padding:4px 7px}.colony-toolbar .colony-tabs button{min-height:40px}.colony-toolbar .colony-queues{grid-template-columns:1fr 1fr}
 #colonyDialog[data-colony-tab=base] .colony-content{display:block;overflow:auto;padding:5px 7px}#colonyDialog .colony-layout{display:flex;flex-direction:column;gap:6px}.colony-side{display:contents}#colonyDialog .colony-side .colony-building-menu{order:0;grid-template-columns:repeat(6,minmax(0,1fr))}#colonyDialog .colony-map{order:1;flex:none;height:auto}#colonyDialog .colony-scene{height:auto;aspect-ratio:900/710;max-height:none;flex:none}
 #colonyDialog .colony-side .colony-reward-goal{order:2}#colonyDialog[data-detail-open=false] .colony-detail{display:none}#colonyDialog[data-detail-open=true] .colony-map,#colonyDialog[data-detail-open=true] .colony-building-menu,#colonyDialog[data-detail-open=true] .colony-reward-goal,#colonyDialog[data-detail-open=true] .colony-enter{display:none!important}#colonyDialog .colony-back-map{display:block;width:auto;min-height:44px;margin-bottom:6px}#colonyDialog .colony-detail{scroll-margin-top:0}.colony-crop-picture{height:100px;aspect-ratio:auto}.colony-shell>footer{display:none}
}
@media(pointer:coarse){#colonyDialog .colony-toolbar .colony-tabs button,#colonyDialog .colony-toolbar .colony-task button{min-height:44px}}

@media(max-width:1100px) and (max-height:500px) and (orientation:landscape){
 .colony-toolbar{flex-direction:row;align-items:stretch}.colony-toolbar .colony-tabs{flex:1}.colony-toolbar .colony-queues{flex:1;max-width:48%;grid-template-columns:repeat(auto-fit,minmax(140px,1fr))}
 #colonyDialog[data-colony-tab=base] .colony-content{display:flex;overflow:hidden;min-height:0}
 #colonyDialog .colony-layout{display:grid;grid-template-columns:minmax(0,1.1fr) minmax(290px,1fr);height:auto;min-height:0;flex:1}
 #colonyDialog .colony-map{order:0;flex:auto;min-height:0}#colonyDialog .colony-scene{flex:1 1 0%;height:0;min-height:0;aspect-ratio:auto}
 .colony-side{display:flex;overflow:auto}.colony-side .colony-building-menu{order:0}#colonyDialog .colony-side .colony-building-menu{grid-template-columns:repeat(3,minmax(0,1fr))}
 #colonyDialog[data-detail-open=true] .colony-layout{display:block;overflow:auto}#colonyDialog[data-detail-open=true] .colony-side{display:block;overflow:visible}
}

/* Short utility tabs use their content height instead of an empty full-screen shell. */
#colonyDialog:not([data-colony-tab=base]){height:fit-content}
#colonyDialog:not([data-colony-tab=base]) .colony-shell{height:auto;max-height:calc(94dvh - 2px)}
#colonyDialog:not([data-colony-tab=base]) .colony-content{flex:0 1 auto;min-height:0}
@media(pointer:coarse),(max-width:850px){#colonyDialog .colony-topbar header button{width:44px;height:44px;min-height:44px}}

.colony-district-tabs{display:flex;gap:4px;margin-left:auto;flex:none}#colonyDialog .colony-district-tabs button{font-size:10px;min-height:30px;padding:3px 8px}#colonyDialog .colony-map-caption{display:flex;align-items:center;gap:7px;padding:4px 6px}.colony-map-caption>span{overflow:hidden;text-overflow:ellipsis;white-space:nowrap;min-width:0}
@media(pointer:coarse),(max-width:850px){#colonyDialog .colony-district-tabs button{min-height:44px}}

.colony-side .colony-farm-picker{display:grid;grid-template-columns:repeat(4,minmax(0,1fr));overflow:visible;gap:4px}.colony-side .colony-farm-picker button{min-width:0;flex-direction:column;padding:4px!important}.colony-side .colony-farm-picker .colony-plant,.colony-side .colony-farm-picker .colony-building-art{width:44px;height:38px}.colony-side .colony-farm-picker button>span{font-size:9px;line-height:1.25}

/* On touch layouts the independent jobs swipe sideways instead of shrinking the city. */
@media(max-width:850px),(max-width:1100px) and (max-height:500px) and (orientation:landscape){
 .colony-toolbar{align-items:stretch}.colony-toolbar .colony-queues{display:flex;max-width:none;overflow-x:auto;scrollbar-width:thin;scroll-snap-type:x proximity;padding-bottom:2px;min-width:0}.colony-toolbar .colony-task{flex:0 0 clamp(140px,44vw,180px);min-width:0;scroll-snap-align:start}.colony-toolbar .colony-task>div{min-width:0}.colony-toolbar .colony-task strong{display:block;overflow:hidden;white-space:nowrap;text-overflow:ellipsis}
}
@media(max-width:1100px) and (max-height:500px) and (orientation:landscape){.colony-toolbar{align-items:center}.colony-toolbar .colony-queues{max-width:48%}}

/* Colony 107: scene-first layout; queues never stretch navigation into tall cards. */
#colonyDialog{width:min(1560px,98vw,calc((98dvh - 134px)*1.2676 + 302px));max-width:98vw;height:98dvh;max-height:98dvh;font-size:11px;line-height:1.35}
#colonyDialog .colony-topbar{min-height:42px;padding:4px 48px 4px 10px;grid-template-columns:minmax(130px,185px) minmax(0,1fr);gap:8px}
#colonyDialog .colony-topbar header small{font-size:7px!important;letter-spacing:1.1px}
#colonyDialog .colony-topbar header h2{font-size:14px!important;line-height:1.2}
#colonyDialog .colony-topbar header button{right:6px;top:4px;width:34px;height:34px;min-height:34px;font-size:22px}
#colonyDialog .colony-topbar .colony-wallet span{font-size:8px;padding:0 8px}
#colonyDialog .colony-topbar .colony-wallet b{font-size:11px}
#colonyDialog .colony-notice{font-size:9px;padding:3px 10px;line-height:1.3}
#colonyDialog .colony-toolbar{display:flex;flex-direction:row;align-items:center;gap:6px;padding:4px 8px}
#colonyDialog .colony-toolbar .colony-tabs{display:flex;flex:0 0 auto;align-items:center;gap:3px}
#colonyDialog .colony-toolbar .colony-tabs button{flex:none;min-height:30px;height:30px;padding:4px 8px;font-size:10px;white-space:nowrap}
#colonyDialog .colony-toolbar .colony-queues{display:flex;flex:1;min-width:0;max-width:none;overflow-x:auto;gap:4px;padding:0;scrollbar-width:thin;scroll-snap-type:x proximity}
#colonyDialog .colony-toolbar .colony-task{flex:1 0 150px;min-width:0;min-height:30px;padding:2px 5px;gap:5px;flex-wrap:nowrap;scroll-snap-align:start}
#colonyDialog .colony-toolbar .colony-task>div{min-width:0;flex-basis:auto;gap:2px 4px}
#colonyDialog .colony-toolbar .colony-task strong{font-size:9px;line-height:1.2;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}
#colonyDialog .colony-toolbar .colony-task span{font-size:9px}
#colonyDialog .colony-task .colony-auto-finish{font-size:8px;color:#99bbae;white-space:nowrap}
#colonyDialog .colony-toolbar .colony-task button{min-height:26px;width:auto;padding:2px 5px;font-size:9px!important}
#colonyDialog .colony-toolbar .colony-task.idle{flex:1 0 145px}
#colonyDialog[data-colony-tab=base] .colony-content{padding:5px 7px;gap:4px}
#colonyDialog .colony-layout{grid-template-columns:minmax(0,1fr) 280px;gap:7px}
#colonyDialog .colony-map-caption{padding:2px 5px;font-size:9px;min-height:30px}
#colonyDialog .colony-district-tabs button{font-size:9px;min-height:26px;padding:3px 6px}
#colonyDialog .colony-side{gap:5px;padding-right:0}
#colonyDialog .colony-side .colony-building-menu{grid-template-columns:repeat(6,minmax(0,1fr));gap:3px}
#colonyDialog .colony-building-menu .colony-building-quick{min-height:59px!important;min-width:0;padding:2px!important;gap:1px}
#colonyDialog .colony-building-quick .colony-building-art{height:30px}
#colonyDialog .colony-building-quick>strong{width:100%;overflow:hidden;white-space:nowrap;text-overflow:ellipsis;font-size:8px}
#colonyDialog .colony-building-quick>small{font-size:8px!important;line-height:1.1}
#colonyDialog .colony-detail{padding:6px;font-size:10px}
#colonyDialog .colony-building-heading{gap:5px;padding-bottom:4px;margin-bottom:4px;min-height:0}
#colonyDialog .colony-building-heading>.colony-building-art{height:32px;width:40px;flex-basis:40px}
#colonyDialog .colony-building-heading h3{font-size:11px;line-height:1.2}
#colonyDialog .colony-building-heading p{font-size:9px;line-height:1.3}
#colonyDialog .colony-upgrade{display:grid;gap:2px;padding:0 0 4px;margin:0 0 4px;border-top:0;border-bottom:1px solid #355665}
#colonyDialog .colony-upgrade-action{width:100%;min-height:32px;padding:4px 6px;font-size:11px;font-weight:750;background:linear-gradient(110deg,#8bddd0,#63c6c6);box-shadow:0 2px 8px #0003}
#colonyDialog .colony-upgrade small{font-size:8px;line-height:1.2}
#colonyDialog .colony-upgrade-reason{color:#f0d38f}
#colonyDialog .colony-upgrade-max{font-size:9px;color:#8ac8b7;margin-bottom:5px}
#colonyDialog .colony-side .colony-farm-picker{gap:3px;margin-bottom:4px}
#colonyDialog .colony-farm-picker button{min-height:45px;padding:2px!important;gap:0}
#colonyDialog .colony-farm-picker .colony-plant,#colonyDialog .colony-farm-picker .colony-building-art{height:28px;width:34px}
#colonyDialog .colony-farm-picker button>span{font-size:8px!important}
#colonyDialog .colony-crop-hero{padding:4px;gap:2px}
#colonyDialog .colony-kicker{display:none}
#colonyDialog .colony-harvest-picture{min-height:86px;padding:2px!important;display:grid;grid-template-columns:76px minmax(0,1fr);grid-template-rows:1fr 1fr;align-items:center;column-gap:6px}
#colonyDialog .colony-crop-hero .colony-harvest-picture .colony-plant{grid-row:1/3;width:76px;height:76px;max-height:76px}
#colonyDialog .colony-harvest-picture strong{font-size:11px;align-self:end;text-align:left}
#colonyDialog .colony-harvest-picture>span{font-size:9px;padding:3px;align-self:start;text-align:left}
#colonyDialog .colony-crop-progress{width:100%;font-size:9px;gap:2px;padding:0 3px}
#colonyDialog .colony-crop-progress strong{font-size:9px}
#colonyDialog .colony-note{font-size:9px;line-height:1.25;margin:4px 0!important}
#colonyDialog .colony-section-heading{gap:3px;margin:3px 0}
#colonyDialog .colony-section-heading h3{font-size:10px}
#colonyDialog .colony-section-heading small{font-size:8px}
#colonyDialog .colony-crops{grid-template-columns:repeat(3,minmax(0,1fr));gap:4px}
#colonyDialog .colony-crops .colony-image-card{padding:3px!important;gap:2px;min-width:0}
#colonyDialog .colony-crop-picture{height:58px;aspect-ratio:auto}
#colonyDialog .colony-crop-picture .colony-plant{width:58px;height:58px;max-height:58px}
#colonyDialog .colony-crops .colony-image-card>strong{font-size:9px}
#colonyDialog .colony-crops .colony-image-card>small{font-size:8px;line-height:1.2}
#colonyDialog .colony-crops .colony-seed-chance{gap:2px}
#colonyDialog .colony-crops .colony-seed-art{width:16px;height:16px}
#colonyDialog .colony-card-action{padding:3px;font-size:9px;margin-top:2px;min-height:0}
#colonyDialog .colony-side .colony-reward-goal{padding:3px 5px;gap:5px;min-height:32px}
#colonyDialog .colony-reward-goal .item-art{width:26px;height:26px}
#colonyDialog .colony-reward-goal strong{font-size:9px}
#colonyDialog .colony-reward-goal small{font-size:8px!important}
#colonyDialog .colony-reward-goal>span:last-child>small:first-child{display:none}
#colonyDialog .colony-shell>footer{font-size:8px;padding:2px 7px}
@media(max-width:850px){
 #colonyDialog{width:98vw;height:98dvh;max-height:98dvh}
 #colonyDialog .colony-topbar{display:block;padding:4px 6px}
 #colonyDialog .colony-topbar header{min-height:42px}
 #colonyDialog .colony-topbar .colony-wallet{padding-top:3px}
 #colonyDialog .colony-topbar .colony-wallet span{padding:0 4px}
 #colonyDialog .colony-toolbar{flex-direction:column;align-items:stretch;gap:4px;padding:4px 6px}
 #colonyDialog .colony-toolbar .colony-tabs{flex:1}
 #colonyDialog .colony-toolbar .colony-tabs button{flex:1;height:44px;min-height:44px;padding:4px!important;font-size:10px!important}
 #colonyDialog .colony-toolbar .colony-task{flex:1 0 170px;min-height:44px}
 #colonyDialog .colony-toolbar .colony-task button{min-height:44px}
 #colonyDialog .colony-side .colony-building-menu{grid-template-columns:repeat(3,minmax(0,1fr))}
 #colonyDialog .colony-building-menu .colony-building-quick{min-height:68px!important}
 #colonyDialog .colony-building-quick .colony-building-art{height:36px}
 #colonyDialog .colony-building-quick>strong{font-size:10px}
 #colonyDialog .colony-building-heading h3{font-size:13px}
 #colonyDialog .colony-building-heading p,#colonyDialog .colony-upgrade small{font-size:10px}
 #colonyDialog .colony-upgrade-action{min-height:44px;font-size:13px}
 #colonyDialog .colony-farm-picker button{min-height:54px}
 #colonyDialog .colony-farm-picker button>span{font-size:10px!important}
 #colonyDialog .colony-crop-picture,#colonyDialog .colony-crop-picture .colony-plant{height:72px;max-height:72px}
 #colonyDialog .colony-crops .colony-image-card>strong{font-size:10px}
 #colonyDialog .colony-card-action{min-height:30px;font-size:11px;display:grid;place-items:center}
 #colonyDialog .colony-side .colony-reward-goal{min-height:44px}
 #colonyDialog .colony-district-tabs button{min-height:44px;font-size:10px}
}
@media(pointer:coarse){#colonyDialog .colony-topbar header button{width:44px;height:44px;min-height:44px}#colonyDialog .colony-upgrade-action,#colonyDialog .colony-toolbar .colony-tabs button,#colonyDialog .colony-toolbar .colony-task button,#colonyDialog .colony-district-tabs button{min-height:44px}}
@media(max-width:1100px) and (max-height:500px) and (orientation:landscape){
 #colonyDialog .colony-topbar{display:grid;grid-template-columns:130px minmax(0,1fr);min-height:50px;padding:3px 52px 3px 7px}
 #colonyDialog .colony-topbar header{min-height:0;padding:0}
 #colonyDialog .colony-topbar .colony-wallet{border:0;padding:0}
 #colonyDialog .colony-toolbar{flex-direction:row;align-items:center}
 #colonyDialog .colony-toolbar .colony-tabs{flex:0 0 auto}
 #colonyDialog .colony-toolbar .colony-tabs button{flex:none;padding:4px 6px!important}
 #colonyDialog .colony-layout{grid-template-columns:minmax(0,1fr) 280px}
 #colonyDialog .colony-side .colony-building-menu{grid-template-columns:repeat(3,minmax(0,1fr))}
}

/* Short portrait details stop at their contents; the city view keeps its height. */
@media(min-width:851px){#colonyDialog .colony-crops .colony-crop-picture,#colonyDialog .colony-crops .colony-crop-picture .colony-plant{height:44px;max-height:44px}#colonyDialog .colony-detail:has(.colony-crops)>.colony-note{display:none}}
@media(max-width:850px) and (orientation:portrait){#colonyDialog[data-colony-tab=base][data-detail-open=true]{height:fit-content}#colonyDialog[data-colony-tab=base][data-detail-open=true] .colony-shell{height:auto;max-height:calc(98dvh - 2px)}#colonyDialog[data-colony-tab=base][data-detail-open=true] .colony-content{flex:0 1 auto}}

/* Farm-wide actions stay available in both the city and farm detail views. */
#colonyDialog .colony-farm-actions{display:grid;grid-template-columns:minmax(110px,1fr) minmax(180px,1.2fr) minmax(110px,1fr);align-items:stretch;gap:4px 8px;margin:0 0 5px;padding:5px 7px;border:1px solid #41626c;border-radius:8px;background:#102a35}
#colonyDialog .colony-farm-actions>button{display:flex;flex-direction:column;justify-content:center;align-items:center;gap:2px;min-width:0;min-height:36px;padding:4px 6px;font-size:11px;line-height:1.3;white-space:normal;overflow-wrap:anywhere}
#colonyDialog .colony-farm-actions>button small{font-size:10px}
#colonyDialog .colony-batch-choice{display:flex;align-items:center;gap:5px;min-width:0;font-size:10px;line-height:1.2}
#colonyDialog .colony-batch-choice>.colony-plant{width:32px;height:32px;object-fit:contain}
#colonyDialog .colony-batch-choice>span{min-width:0;flex:1}
#colonyDialog .colony-batch-choice select{display:block;width:100%;min-width:0;max-width:100%;height:26px;padding:2px 20px 2px 5px;font:inherit;color:#e1f1f5;background:#152e3b;border:1px solid #466472;border-radius:5px}
#colonyDialog .colony-batch-hint{grid-column:1/-1;text-align:center;font-size:9px;line-height:1.3;color:#acc8cc}
@media(max-width:850px){#colonyDialog .colony-farm-actions{grid-template-columns:repeat(2,minmax(0,1fr));gap:4px;padding:5px}#colonyDialog .colony-batch-choice{grid-column:1/-1;grid-row:1;font-size:11px}#colonyDialog .colony-batch-choice select{height:44px;font-size:12px}#colonyDialog .colony-farm-actions>button{min-height:44px;font-size:12px}#colonyDialog .colony-batch-hint{font-size:10px}}
@media(pointer:coarse){#colonyDialog .colony-farm-actions>button,#colonyDialog .colony-batch-choice select{min-height:44px}}

#colonyDialog .colony-farm-actions{flex:0 0 auto}
#colonyDialog .colony-batch-plant small{color:inherit!important}
@media(max-height:500px) and (orientation:landscape){#colonyDialog .colony-farm-actions{grid-template-columns:minmax(120px,1fr) minmax(190px,1.2fr) minmax(120px,1fr);gap:3px 6px;padding:4px 6px}#colonyDialog .colony-batch-choice{grid-column:auto;grid-row:auto}#colonyDialog .colony-batch-choice select{height:44px}#colonyDialog .colony-batch-hint{font-size:9px}}
