html,body{margin:0;height:100%;overflow:hidden;background:#86c75a;touch-action:none;user-select:none;-webkit-user-select:none;
  font-family:"Lilita One",system-ui,-apple-system,sans-serif}
canvas{display:block;position:fixed;inset:0;width:100vw;height:100vh}
.hud{position:fixed;z-index:2;pointer-events:none}
#logo{top:12px;left:14px;color:#fff;font-size:26px;line-height:1;text-shadow:0 3px 0 #6b3d1c,0 0 6px rgba(0,0,0,.25);-webkit-text-stroke:1.5px #6b3d1c}
#logo small{display:block;font-size:15px;color:#ffe08a;-webkit-text-stroke:1px #6b3d1c}
#money{top:12px;right:14px;display:flex;align-items:center;background:rgba(30,40,30,.75);border-radius:30px;padding:4px 18px 4px 4px;
  color:#fff;font-size:28px;min-width:110px;box-shadow:0 3px 0 rgba(0,0,0,.25)}
#money .bill{width:50px;height:32px;border-radius:7px;background:#45b04f;border:3px solid #2d8236;margin-right:12px;position:relative}
#money .bill:after{content:"$";position:absolute;inset:0;display:flex;align-items:center;justify-content:center;color:#d9ffd9;font-size:20px}
#money span{margin-left:auto}
#traffic{top:58px;right:14px;background:rgba(30,40,30,.75);color:#fff;border-radius:16px;padding:4px 12px;font-size:15px;box-shadow:0 3px 0 rgba(0,0,0,.2)}
#rep{top:90px;right:14px;background:rgba(30,40,30,.75);color:#fff;border-radius:16px;padding:4px 12px;font-size:15px;box-shadow:0 3px 0 rgba(0,0,0,.2);display:flex;align-items:center;gap:6px}
#rep b{font-weight:normal;font-size:18px;color:#ffd54f}
#rep .stars{position:relative;display:inline-block;color:rgba(255,255,255,.3);letter-spacing:1px;font-size:15px}
#rep .stars span{position:absolute;left:0;top:0;overflow:hidden;white-space:nowrap;color:#ffc107}
#rep small{font-size:12px;opacity:.85}
#traffic b{font-weight:normal;color:#b6ff9e;font-size:18px}
#trafficTrend{font-size:13px;opacity:.85}
@media (max-width:900px){#hint{top:128px}}
#station{position:fixed;z-index:4;left:50%;bottom:86px;transform:translateX(-50%);background:#fff8e6;border-radius:18px;padding:12px 14px;
  box-shadow:0 6px 0 #c99a5b;color:#5a3a1a;display:none;width:min(360px,calc(100vw - 32px));box-sizing:border-box}
#station h3{margin:0 0 8px;font-weight:normal;font-size:20px;text-align:center;color:#e8632b}
#station .row{display:flex;align-items:center;gap:10px;margin:6px 0}
#station .info{flex:1;font-family:system-ui,-apple-system,sans-serif;font-size:13px;line-height:1.3}
#station .info b{font-family:"Lilita One",sans-serif;font-weight:normal;font-size:16px}
#station .pips{letter-spacing:2px;color:#4caf50}
#station button{font-family:inherit;font-size:16px;border:0;border-radius:12px;padding:8px 12px;min-width:92px;background:#4caf50;color:#fff;box-shadow:0 3px 0 #2e7d32;cursor:pointer}
#station button:disabled{background:#bbb;box-shadow:0 3px 0 #999;cursor:default}
#station .key{font-size:11px;opacity:.8}
#eventBanner{top:12px;left:50%;transform:translateX(-50%);background:linear-gradient(#7b5cff,#5235e0);color:#fff;border-radius:14px;padding:6px 14px;font-size:16px;display:none;white-space:nowrap;box-shadow:0 3px 0 rgba(0,0,0,.25)}
#truckPanel{top:66px;left:14px;background:rgba(30,40,30,.82);color:#fff;border-radius:14px;padding:6px 12px;font-size:15px;display:none;box-shadow:0 3px 0 rgba(0,0,0,.2)}
#truckPanel .t{color:#ffd54f} #truckPanel .r{color:#b6ff9e}
#toast{top:150px;left:50%;transform:translateX(-50%);background:#fff8e6;color:#5a3a1a;border-radius:14px;padding:8px 16px;font-size:17px;box-shadow:0 4px 0 #c99a5b;opacity:0;transition:opacity .35s;white-space:nowrap;z-index:6}
#goals{position:fixed;z-index:6;right:14px;top:130px;width:min(330px,calc(100vw - 28px));max-height:calc(100vh - 210px);overflow:auto;background:#fff8e6;border-radius:18px;padding:12px 14px;box-shadow:0 6px 0 #c99a5b;color:#5a3a1a;display:none;box-sizing:border-box}
#goals h3{margin:0 0 4px;font-weight:normal;font-size:22px;color:#e8632b;text-align:center} #goals h4{margin:10px 0 2px;font-weight:normal;font-size:16px}
#goals .g{margin:6px 0;font-family:system-ui,-apple-system,sans-serif;font-size:13px} #goals .g.done{opacity:.55}
#goals .bar{height:7px;background:#e8dcc0;border-radius:4px;overflow:hidden;margin-top:3px} #goals .bar i{display:block;height:100%;background:#4caf50}
#goals button,.modal button{font-family:inherit;font-size:16px;border:0;border-radius:12px;padding:8px 16px;background:#4caf50;color:#fff;box-shadow:0 3px 0 #2e7d32;cursor:pointer;margin-top:8px}
.modal button.ghost{background:#bbb;box-shadow:0 3px 0 #999}
.modal{position:fixed;inset:0;z-index:7;display:none;align-items:center;justify-content:center;background:rgba(40,60,30,.55)}
.modal .card{background:#fff8e6;border-radius:22px;padding:22px 24px;max-width:min(420px,calc(100vw - 32px));box-sizing:border-box;text-align:center;color:#5a3a1a;box-shadow:0 8px 0 #c99a5b}
.modal h1{margin:0 0 6px;font-size:30px;color:#e8632b;font-weight:normal} .modal p,.modal ol{font-family:system-ui,-apple-system,sans-serif;font-size:14px;line-height:1.45;text-align:left}
#hint{top:64px;left:50%;transform:translateX(-50%);background:rgba(255,255,255,.92);color:#5a3a1a;border-radius:20px;padding:7px 16px;
  font-size:17px;white-space:nowrap;box-shadow:0 3px 0 rgba(0,0,0,.18);transition:opacity .3s;max-width:calc(100vw - 32px);overflow:hidden;text-overflow:ellipsis}
#moveTip{bottom:40px;left:50%;transform:translateX(-50%);color:#fff;font-size:30px;-webkit-text-stroke:2px #222;text-shadow:0 3px 0 #222;transition:opacity .5s;white-space:nowrap}
.btns{position:fixed;left:12px;bottom:12px;z-index:3;display:flex;gap:8px}
.btns button{font-family:inherit;font-size:15px;border:0;border-radius:12px;padding:8px 12px;background:rgba(255,255,255,.85);color:#5a3a1a;
  box-shadow:0 3px 0 rgba(0,0,0,.2);cursor:pointer}
#intro{position:fixed;inset:0;z-index:5;display:flex;align-items:center;justify-content:center;background:rgba(40,60,30,.55)}
#intro .card{background:#fff8e6;border-radius:22px;padding:24px 26px;max-width:min(420px,calc(100vw - 32px));box-sizing:border-box;text-align:center;color:#5a3a1a;
  box-shadow:0 8px 0 #c99a5b}
#intro h1{margin:0 0 6px;font-size:34px;color:#e8632b;font-weight:normal}
#intro p{font-family:system-ui,-apple-system,sans-serif;font-size:15px;line-height:1.45;margin:8px 0}
#intro ol{font-family:system-ui,-apple-system,sans-serif;text-align:left;font-size:14px;line-height:1.5;padding-left:22px;margin:10px 0 16px}
#intro button{font-family:inherit;font-size:24px;border:0;border-radius:16px;padding:10px 40px;background:#4caf50;color:#fff;box-shadow:0 5px 0 #2e7d32;cursor:pointer}
#farms{position:fixed;z-index:6;right:14px;top:130px;width:min(360px,calc(100vw - 28px));max-height:calc(100vh - 210px);overflow:auto;background:#fff8e6;border-radius:18px;padding:12px 14px;box-shadow:0 6px 0 #c99a5b;color:#5a3a1a;display:none;box-sizing:border-box}
#farms h3{margin:0 0 6px;font-weight:normal;font-size:22px;color:#e8632b;text-align:center} #farms h4{margin:12px 0 4px;font-weight:normal;font-size:16px}
#farms .farm{display:flex;align-items:center;justify-content:space-between;gap:8px;background:#fff;border-radius:12px;padding:7px 10px;margin:6px 0;font-size:15px}
#farms .farm.here{outline:2px solid #4caf50} #farms .farm small{font-family:system-ui,-apple-system,sans-serif;font-size:12px;opacity:.8}
#farms .tag{font-size:11px;background:#ffe082;border-radius:6px;padding:1px 5px} #farms .here-tag{font-size:13px;color:#2e7d32;white-space:nowrap}
#farms .hint2,#farms .g{font-family:system-ui,-apple-system,sans-serif;font-size:13px;margin:4px 0}
#farms label{display:block;font-family:system-ui,-apple-system,sans-serif;font-size:13px;margin:5px 0} #farms select{font-size:14px;margin-left:6px;max-width:220px} #farms input[type=range]{width:100%}
#farms button{font-family:inherit;font-size:15px;border:0;border-radius:12px;padding:7px 12px;background:#4caf50;color:#fff;box-shadow:0 3px 0 #2e7d32;cursor:pointer;margin:3px 0}
#farms button:disabled{background:#bbb;box-shadow:0 3px 0 #999;cursor:default}
#mgrs{position:fixed;z-index:6;right:14px;top:130px;width:min(360px,calc(100vw - 28px));background:#fff8e6;border-radius:18px;padding:12px 14px;box-shadow:0 6px 0 #c99a5b;color:#5a3a1a;display:none;box-sizing:border-box}
#mgrs h3{margin:0 0 6px;font-weight:normal;font-size:22px;color:#e8632b;text-align:center}
#mgrs .farm{display:flex;align-items:center;justify-content:space-between;gap:8px;background:#fff;border-radius:12px;padding:8px 10px;margin:6px 0;font-size:15px}
#mgrs .farm small{font-family:system-ui,-apple-system,sans-serif;font-size:12px;opacity:.8} #mgrs .g{font-family:system-ui,-apple-system,sans-serif;font-size:13px}
#mgrs .here-tag{font-size:13px;color:#2e7d32;white-space:nowrap}
#mgrs button{font-family:inherit;font-size:15px;border:0;border-radius:12px;padding:7px 12px;background:#4caf50;color:#fff;box-shadow:0 3px 0 #2e7d32;cursor:pointer;margin:3px 0;white-space:nowrap}
#mgrs button:disabled{background:#bbb;box-shadow:0 3px 0 #999;cursor:default} #mgrs button.off{background:#9e9e9e;box-shadow:0 3px 0 #757575}
#offline .g{font-family:system-ui,-apple-system,sans-serif;font-size:15px;margin:6px 0;text-align:left}
#pnl{position:fixed;z-index:6;right:14px;top:130px;width:min(560px,calc(100vw - 28px));max-height:calc(100vh - 210px);overflow:auto;background:#fff8e6;border-radius:18px;padding:12px 14px;box-shadow:0 6px 0 #c99a5b;color:#5a3a1a;display:none;box-sizing:border-box}
#pnl h3{margin:0 0 6px;font-weight:normal;font-size:22px;color:#e8632b;text-align:center}
#pnl table{width:100%;border-collapse:collapse;font-family:system-ui,-apple-system,sans-serif;font-size:13px}
#pnl th{font-weight:600;text-align:right;padding:4px 5px;border-bottom:2px solid #e8dcc0;font-size:12px;vertical-align:bottom} #pnl th:first-child,#pnl td:first-child{text-align:left}
#pnl td{text-align:right;padding:5px;border-bottom:1px solid #efe4cb;white-space:nowrap;font-variant-numeric:tabular-nums}
#pnl tr.sum td{border-top:2px solid #c99a5b;font-weight:600} #pnl .pos{color:#2e7d32} #pnl .neg{color:#c62828}
#pnl .bar{height:4px;background:#efe4cb;border-radius:2px;margin-top:3px;width:110px} #pnl .bar i{display:block;height:100%;background:#4caf50;border-radius:2px}
#pnl .note{font-family:system-ui,-apple-system,sans-serif;font-size:11px;opacity:.75;margin-top:8px}
#pnl button{font-family:inherit;font-size:16px;border:0;border-radius:12px;padding:8px 16px;background:#4caf50;color:#fff;box-shadow:0 3px 0 #2e7d32;cursor:pointer;margin-top:8px}
#pnl .st{position:relative;display:inline-block;color:#e0d3b4;font-size:12px;letter-spacing:1px} #pnl .st span{position:absolute;left:0;top:0;overflow:hidden;white-space:nowrap;color:#ffb300}
#pnl small{opacity:.7}
#cashFeed{top:122px;right:14px;display:flex;flex-direction:column;align-items:flex-end;gap:4px}
#cashFeed div{background:rgba(46,125,50,.88);color:#fff;border-radius:12px;padding:3px 10px;font-size:14px;box-shadow:0 2px 0 rgba(0,0,0,.2);transition:opacity .5s;white-space:nowrap}
#research{position:fixed;z-index:6;right:14px;top:130px;width:min(400px,calc(100vw - 28px));max-height:calc(100vh - 210px);overflow:auto;background:#fff8e6;border-radius:18px;padding:12px 14px;box-shadow:0 6px 0 #c99a5b;color:#5a3a1a;display:none;box-sizing:border-box}
#research h3{margin:0 0 6px;font-weight:normal;font-size:22px;color:#e8632b;text-align:center}
#research .farm{display:flex;align-items:center;justify-content:space-between;gap:8px;background:#fff;border-radius:12px;padding:8px 10px;margin:6px 0;font-size:15px}
#research .farm small{font-family:system-ui,-apple-system,sans-serif;font-size:12px;opacity:.8} #research .pips{letter-spacing:1px;color:#4caf50;font-size:12px}
#research .g{font-family:system-ui,-apple-system,sans-serif;font-size:13px;margin:4px 0}
#research .bar{height:7px;background:#e8dcc0;border-radius:4px;overflow:hidden;margin-top:4px} #research .bar i{display:block;height:100%;background:#7e57c2}
#research button{font-family:inherit;font-size:15px;border:0;border-radius:12px;padding:7px 12px;background:#7e57c2;color:#fff;box-shadow:0 3px 0 #4527a0;cursor:pointer;white-space:nowrap}
#research button:disabled{background:#bbb;box-shadow:0 3px 0 #999;cursor:default}
#research > button{background:#4caf50;box-shadow:0 3px 0 #2e7d32;margin-top:8px}
#resPill{top:100px;left:14px;background:rgba(94,53,177,.85);color:#fff;border-radius:14px;padding:5px 12px;font-size:14px;display:none;box-shadow:0 3px 0 rgba(0,0,0,.2)}
#scoreboard{position:fixed;z-index:3;left:14px;top:136px;width:200px;background:rgba(30,40,30,.78);color:#fff;border-radius:14px;padding:6px 10px 8px;box-shadow:0 3px 0 rgba(0,0,0,.2);display:none;box-sizing:border-box}
#sbTitle{font-size:16px;color:#ffd54f;cursor:pointer;margin-bottom:3px} #sbTitle small{font-size:11px;color:#fff;opacity:.7}
.sbRow{display:flex;align-items:center;gap:6px;font-size:14px;padding:2px 0;transition:opacity .3s}
.sbRow .rk{width:22px;text-align:center;flex:none} .sbRow .nm{flex:1;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}
.sbRow b{font-weight:normal;color:#b6ff9e} .sbRow.me .nm{color:#ffd54f} .sbRow.away{opacity:.5}
#nameInput{font-family:system-ui,-apple-system,sans-serif;font-size:18px;padding:8px 12px;border:2px solid #c99a5b;border-radius:12px;width:100%;box-sizing:border-box;margin:4px 0 6px;user-select:text;-webkit-user-select:text;text-align:center}
@media (max-width:600px){#scoreboard{width:170px;top:132px}.sbRow{font-size:13px}}
