/* STELLAR EMPIRE 0.4.1 — original builder / colony tycoon visual language.
   Steel-blue strategy chrome, warm construction gold, vivid gameplay status. */
:root{--tycoon-ink:#081421;--tycoon-plate:#15273b;--tycoon-steel:#3e6074;--tycoon-metal:#83a1b2;--tycoon-gold:#f4c877;--tycoon-lime:#73ddb7;--tycoon-sky:#7fd8ea}
.game .panel{background:linear-gradient(158deg,#162a40,#101b30 64%,#151a32);border-color:#4f617d;box-shadow:0 14px 32px #03091366,inset 0 1px #c5e8ff16}
.game .panel-title{background:linear-gradient(90deg,#ffffff0a,#f4c87706,transparent);border-bottom-color:#54627c}
.game .panel-title h3{font-size:18px;letter-spacing:.035em}
.game .catalog-card{border-color:#4b6179;box-shadow:inset 0 1px #ffffff16,0 12px 25px #02081144;background:linear-gradient(145deg,#203248,#12243b 40%,#141a2e)}
.game .catalog-card:hover{border-color:#f2c984;box-shadow:0 10px 28px #ecac5620,inset 0 1px #ffddaa3a}
.game .catalog-card .card-icon{color:var(--tycoon-gold);filter:drop-shadow(0 0 9px #f0c85f66)}
.game .catalog-card .card-foot .btn{border-color:#a98752;background:linear-gradient(180deg,#72572f,#383322);color:#fff0c7}
.game .catalog-card .card-foot .btn:hover{background:#8a6432}
.game .sector{position:relative;border-color:#53647e;background:linear-gradient(155deg,#26354b,#122036);box-shadow:inset 0 1px #d5e5ff13}
.game .sector:before{content:"";position:absolute;left:9px;right:9px;bottom:0;height:2px;background:#d4a76a37}
.game .sector.active{background:linear-gradient(155deg,#53442d,#242a37);border-color:#ecbd72;box-shadow:inset 0 -3px #efbe78,0 0 16px #cfab5c27}
.game .sector.active .si{color:#f6ce80}
.game .building-card{position:relative;min-height:150px;gap:8px;border-color:#526a81;background:linear-gradient(148deg,#253a4d,#122237 64%,#191e30);overflow:hidden;box-shadow:0 7px 18px #040a1470,inset 0 1px #d5e6ff1c}
.game .building-card:before{content:"";position:absolute;right:-16px;top:8px;width:106px;height:106px;border:1px solid #c1cecd17;transform:rotate(45deg);pointer-events:none;box-shadow:inset 0 0 28px #f8c7750e}
.game .building-card:after{content:"";position:absolute;inset:auto 0 0;height:3px;background:linear-gradient(90deg,#6ecdd8,#eabf70,transparent);opacity:.54}
.game .building-card .bicon{color:#ffd48e;font-size:29px;filter:drop-shadow(0 3px 12px #ffba5d49)}
.game .building-card .bname{font-size:18px;font-weight:850}
.game .building-card small{line-height:1.5;font-size:10px;color:#b6c7d4}
.game .building-card .level{color:#f3cc8b;font-size:10px;letter-spacing:.08em;font-weight:850}
.game .building-card:hover{border-color:#f0cb81;box-shadow:0 12px 24px #050b14b3,0 0 18px #d8a94c2b}
.game .building-card.new{border-style:dashed;border-color:#a78956;background:linear-gradient(145deg,#38332e,#12263a)}
.game .building-card:disabled{opacity:.42;filter:grayscale(.35);cursor:not-allowed}
.game .btn,.game .soft-btn,.game .primary{font-weight:750}
.game .btn:hover,.game .soft-btn:hover{box-shadow:0 0 18px #92cff92c}
.game .dialog{border-color:#6b7898;background:linear-gradient(143deg,#1a2c43 0%,#101b2d 56%,#171b33 100%);box-shadow:0 32px 90px #000d,inset 0 1px #e8d6b532}
.game .dialog-header{background:linear-gradient(90deg,#2d2a3d,#1b2e45);border-bottom:1px solid #6b667e;position:relative}
.game .dialog-header:after{content:"";position:absolute;height:2px;left:0;bottom:0;width:100%;background:linear-gradient(90deg,#e4af69,#5cbcd5 70%,transparent)}
.game .dialog-header h2{font-size:clamp(21px,2.3vw,29px)}
.tycoon-construction{--tycoon-gold:#f2c778;display:flex;flex-direction:column;gap:15px;width:100%;max-width:100%;padding:2px}
.tycoon-project-header{display:flex;align-items:center;justify-content:space-between;gap:15px}
.tycoon-project-header h3{font-size:26px;font-weight:900;color:#e9f5ff;margin:2px 0 2px}
.tycoon-project-header p{font-size:11px;line-height:1.6;color:#aabed1;max-width:640px}
.tycoon-project-header .eyebrow{color:#f1c47d;font-size:10px}
.tycoon-capacity{text-align:center;border:1px solid #9e815c;border-radius:10px;padding:11px 16px;background:linear-gradient(135deg,#443624,#182f43);flex:none;box-shadow:inset 0 1px #fbd59441}
.tycoon-capacity small{display:block;font-size:9px;color:#d8c19e;letter-spacing:.06em}
.tycoon-capacity strong{font:900 23px Rajdhani,Inter,sans-serif;color:#ffdf9c;white-space:nowrap;font-variant-numeric:tabular-nums}
.tycoon-project{position:relative;border-radius:14px;overflow:hidden;padding:18px 18px 14px;border:1px solid #9f8a60;background:linear-gradient(112deg,#344055f7 0%,#1c2a3c 42%,#12233a 100%);box-shadow:0 15px 36px #0008,inset 0 1px #ffe9c13f}
.tycoon-project.tycoon-active:before{content:"";position:absolute;right:-5%;top:-110px;width:250px;height:250px;border-radius:50%;background:radial-gradient(circle,#daa55325,transparent 66%);pointer-events:none}
.tycoon-project.tycoon-active:after{content:"";position:absolute;left:0;top:0;bottom:0;width:4px;background:linear-gradient(#f4d18b,#b88936);box-shadow:0 0 17px #fbd28088}
.tycoon-project-head{display:flex;align-items:center;gap:13px;min-width:0}
.tycoon-project-emblem{display:grid;place-items:center;flex:none;width:61px;height:61px;border-radius:12px;border:1px solid #c29e64;background:linear-gradient(140deg,#795c34,#172f42 72%);font-size:32px;color:#ffe1a3;box-shadow:0 4px 15px #030c1788,inset 0 1px #fff4cf63;text-shadow:0 0 12px #ffcf7399}
.tycoon-project-name{flex:1;min-width:0}
.tycoon-project-name small{display:block;font-weight:800;letter-spacing:.11em;font-size:10px;color:#d5b785}
.tycoon-project-name strong{font:800 clamp(19px,2.4vw,26px) Rajdhani,Inter,sans-serif;line-height:1.15;display:block;letter-spacing:.03em;color:#f6fafc;overflow-wrap:anywhere}
.tycoon-project-name>span{display:block;font-size:11px;color:#a7bcd1;margin-top:5px}
.tycoon-project-badge{font-size:10px;font-weight:900;letter-spacing:.1em;color:#fff1c7;border:1px solid #c7a664;background:#59462b;border-radius:22px;padding:8px 10px;white-space:nowrap;flex:none}
.tycoon-project-progress{margin:20px 0 14px}
.tycoon-progress-line{display:flex;justify-content:space-between;align-items:center;gap:10px;margin-bottom:8px}
.tycoon-progress-line span{font-size:10px;letter-spacing:.18em;color:#beccdb;font-weight:800}
.tycoon-progress-line strong{font:800 21px Rajdhani,Inter,sans-serif;color:#ffdc9c;font-variant-numeric:tabular-nums}
.tycoon-progress-track{height:13px;border-radius:16px;overflow:hidden;padding:2px;border:1px solid #7693a0;background:repeating-linear-gradient(90deg,#0b1828 0 28px,#162538 28px 30px);box-shadow:inset 0 2px 9px #0008}
.tycoon-progress-fill{height:100%;max-width:100%;background:linear-gradient(90deg,#cca269,#f8da9d 55%,#f9e6bb);border-radius:14px;box-shadow:0 0 14px #f9be65a8;transition:width 1s linear}
.tycoon-project-timing{display:flex;justify-content:space-between;gap:8px;margin-top:9px;font-size:11px;color:#b4c6d6;flex-wrap:wrap}
.tycoon-project-timing b{color:#fff2d3;font-size:12px;font-variant-numeric:tabular-nums}
.tycoon-project-footer{border-top:1px solid #5b6e7d77;padding-top:13px;display:flex;align-items:center;gap:9px;justify-content:space-between;flex-wrap:wrap}
.tycoon-cost-bits{display:flex;flex-wrap:wrap;gap:5px}
.tycoon-cost-bits span{font-size:10px;color:#d6e2e6;padding:5px 8px;background:#14293db8;border:1px solid #466378;border-radius:5px}
.tycoon-cancel-btn{background:transparent;color:#ecb7b6;border:1px solid #965c67;padding:7px 11px;border-radius:7px;font-size:11px;font-weight:800;flex:none}
.tycoon-cancel-btn:hover{background:#693138;color:#fff;border-color:#fda5a8}
.tycoon-pending{background:linear-gradient(100deg,#1b3041,#152234);border-color:#546b7f;padding:13px 14px;box-shadow:inset 0 1px #ffffff16}
.tycoon-pending .tycoon-project-emblem{width:43px;height:43px;font-size:23px;background:linear-gradient(135deg,#304660,#152437);border-color:#6a8193}
.tycoon-pending .tycoon-project-name strong{font-size:17px}
.tycoon-pending .tycoon-project-name small{color:#91bcd5}
.tycoon-project-badge.is-pending{background:#233c54;border-color:#4a829c;color:#a8e5f7}
.tycoon-queue-note{font-size:11px;color:#a6bfd3;margin:11px 0 4px}
.tycoon-queued{border-radius:11px;border:1px solid #526f8a;background:#0c2136b0;padding:12px}
.tycoon-queued>summary{color:#bce4f5;font-weight:850;cursor:pointer;padding:4px 7px;letter-spacing:.03em}
.tycoon-queued-list{display:flex;flex-direction:column;gap:8px;margin-top:12px}
.tycoon-slot-legend{display:flex;align-items:center;justify-content:space-between;gap:8px;padding:2px 2px 0}
.tycoon-slot-legend strong{font-size:11px;letter-spacing:.12em;color:#f6cf90}
.tycoon-slot-legend small{color:#9ab0c5;font-size:10px}
.tycoon-slot-grid{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:8px}
.tycoon-slot{display:flex;gap:10px;align-items:center;border-radius:11px;border:1px solid #50617b;background:linear-gradient(145deg,#1b2c43,#0e1f31);padding:12px 13px;min-height:73px}
.tycoon-slot-icon{display:grid;place-items:center;flex:none;font-size:25px;color:#b8d3da;width:36px;height:36px;border-radius:8px;background:#254253}
.tycoon-slot b{display:block;color:#dfeaf3;font-size:10px;letter-spacing:.06em}
.tycoon-slot small{display:block;font-size:10px;color:#8cabbc;margin-top:4px}
.tycoon-slot.occupied{border-color:#bd9b5f;background:linear-gradient(135deg,#3a3936,#172b3d)}
.tycoon-slot.occupied .tycoon-slot-icon{color:#ffdc92;background:#54442b}
.tycoon-slot.unlocked{border-color:#75af91}
.tycoon-slot.unlocked .tycoon-slot-icon{color:#7feab5;background:#1c493c}
.tycoon-slot.locked{border-style:dashed;opacity:.60;filter:grayscale(.3)}
.tycoon-unlock-tip{font-size:11px;line-height:1.55;color:#e1c598;border:1px solid #7b6845;background:#2c2a28a8;border-radius:9px;padding:11px 12px}
.tycoon-construction-actions{display:flex;align-items:center;gap:12px;flex-wrap:wrap}
.tycoon-construction-actions>span:not(.pill){font-size:11px;color:#b3c5d8}
.tycoon-primary{display:inline-flex;align-items:center;justify-content:center;gap:8px;padding:11px 17px;border-radius:8px;border:1px solid #f7ce81;background:linear-gradient(180deg,#ba8d48,#745327);color:#fff9de;font-weight:900;font-size:12px;box-shadow:0 7px 20px #caa35c38,inset 0 1px #fff9d57c}
.tycoon-primary:hover{filter:brightness(1.13);box-shadow:0 7px 22px #e0ae514d}
.tycoon-empty-project{display:flex;align-items:center;gap:16px;flex-wrap:wrap;border:1px solid #649185;background:linear-gradient(100deg,#1a383b,#16283d);border-radius:12px;padding:23px}
.tycoon-empty-graphic{display:grid;place-items:center;font-size:39px;width:68px;height:68px;border-radius:13px;border:1px solid #739f91;color:#81f2ce;background:#24493f}
.tycoon-empty-project>div{flex:1;min-width:140px}
.tycoon-empty-project strong{font-size:21px;color:#dbfff2}
.tycoon-empty-project p{font-size:12px;color:#b6d3d0;line-height:1.5;margin-top:5px}
.tycoon-cancel-warning{display:flex;align-items:flex-start;gap:17px;border:1px solid #a66b65;background:#3c2635;padding:20px;border-radius:12px}
.tycoon-cancel-warning>span{font-size:31px;color:#ffd1a3}
.tycoon-cancel-warning strong{color:#ffe0ac;font-size:14px}
.tycoon-cancel-warning p{font-size:12px;color:#d6bfc6;margin:11px 0;line-height:1.6}
.tycoon-cost-summary{display:flex;justify-content:space-between;gap:12px;flex-wrap:wrap;padding:11px 13px;margin-top:12px;border:1px solid #947b4e;border-radius:8px;background:#2c2e30;color:#e6d1a5;font-size:12px;font-weight:700}
.operation-project-feature{display:flex;align-items:center;gap:14px;border:1px solid #a98f61;border-radius:12px;background:linear-gradient(125deg,#333645,#1b2e40);padding:16px;color:#f4f4f3;width:100%;text-align:left;cursor:pointer}
.operation-project-feature:hover{border-color:#fbd28e}
.operation-project-feature .operation-icon{font-size:26px;color:#f4d29a}
.operation-project-feature>span:nth-child(2){flex:1;min-width:0}
.operation-project-feature strong{font-size:17px;display:block}
.operation-project-feature small{display:block;margin:4px 0;color:#bdd0da}
.operation-overview-title{display:flex;justify-content:space-between;align-items:center;gap:8px;margin-bottom:7px;color:#b7c9d7;font-size:11px;letter-spacing:.07em;font-weight:850}
.operation-queue-details{border:1px solid #62758b;border-radius:9px;padding:11px;background:#112237}
.operation-queue-details summary{cursor:pointer;color:#bcdaeb;font-weight:750;font-size:12px}
.operation-overview-stack{display:flex;flex-direction:column;gap:9px}
@media(max-width:800px){
 .tycoon-project-header{align-items:flex-start}
 .tycoon-slot-grid{gap:6px}
 .tycoon-slot{padding:8px;gap:6px;min-height:66px}
 .tycoon-slot-icon{width:25px;height:25px;font-size:17px}
 .tycoon-slot b{font-size:8px}.tycoon-slot small{font-size:9px}
 .tycoon-project{padding:13px}
 .tycoon-project-head{gap:9px}
 .tycoon-project-emblem{width:47px;height:47px;font-size:24px}
 .tycoon-project-name strong{font-size:20px}
 .tycoon-project-badge{font-size:8px;padding:6px}
 .tycoon-construction-actions>button{width:100%}
 .tycoon-project-header h3{font-size:21px}
 .tycoon-capacity strong{font-size:20px}
}
@media(max-width:450px){
 .tycoon-slot{flex-direction:column;align-items:center;text-align:center}
 .tycoon-project-head{align-items:flex-start}
 .tycoon-project-timing{flex-direction:column}
 .tycoon-project-footer{align-items:flex-start}
}


/* Levelled queue: a home/colony administration adds one slot per level.
   Allow the UI to show all 11 slots without squeezing 11 into one row. */
.tycoon-slot-grid{
 display:grid;
 grid-template-columns:repeat(auto-fit,minmax(min(100%,165px),1fr));
 gap:8px;
}
.tycoon-slot{min-width:0}
@media(max-width:760px){
 .tycoon-slot-grid{grid-template-columns:repeat(2,minmax(0,1fr))}
}
