/* Tire Shop Simulator Tycoon - game shell: gate, title, new game, HUD, task panel, modals. */
#stage { position: absolute; inset: 0; }
#cv { position: absolute; inset: 0; width: 100%; height: 100%; display: block; touch-action: none; }
.scr { position: absolute; inset: 0; display: none; pointer-events: none; } .scr.show { display: block; } .scr > * { pointer-events: auto; }
.logo { display: inline-flex; flex-direction: column; align-items: center; font-family: var(--hd); line-height: .92; text-align: center; }
.logo i { font-style: normal; font-size: 48px; margin-bottom: 6px; filter: drop-shadow(0 4px 10px rgba(0,0,0,.5)); }
.logo b { font-size: 58px; font-weight: 800; letter-spacing: .04em; color: #fff; text-shadow: 0 4px 0 #0b0e12, 0 8px 24px rgba(0,0,0,.5); }
.logo span { font-size: 22px; font-weight: 700; letter-spacing: .38em; padding-left: .38em; color: var(--acc); margin-top: 6px; }
.logo.big i { font-size: 64px; } .logo.big b { font-size: 72px; }
.badge-admin { font-family: var(--hd); font-weight: 700; letter-spacing: .14em; font-size: 12px; background: #6b5420; color: #ffe08a; padding: 3px 10px; border-radius: 99px; }
#gate { background: radial-gradient(circle at 50% 30%, #2a3240, var(--bg)); pointer-events: auto; }
#gate .card { position: absolute; left: 50%; top: 50%; transform: translate(-50%, -50%); text-align: center; max-width: min(520px, calc(100vw - 32px)); }
.title-shade { position: absolute; inset: 0; background: linear-gradient(90deg, rgba(12,15,20,.92) 0%, rgba(12,15,20,.7) 40%, rgba(12,15,20,.05) 75%); pointer-events: none !important; }
.title-box { position: absolute; left: max(28px, 6vw); top: 50%; transform: translateY(-50%); width: min(440px, 88vw); display: flex; flex-direction: column; align-items: center; gap: 12px; }
.tagline { color: #cbd5df; font-size: 17px; margin: 0 0 4px; text-align: center; }
#newgame { background: rgba(10,13,18,.9); backdrop-filter: blur(4px); pointer-events: auto; overflow-y: auto; }
.ng { max-width: 980px; margin: 0 auto; padding: calc(14px + var(--safe-t)) 18px 30px; }
.ng-top { display: flex; align-items: center; gap: 14px; margin-bottom: 14px; } .ng-top h2 { font-size: 30px; }
.ng-modes { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 12px; margin-bottom: 16px; }
.ngm { display: flex; flex-direction: column; align-items: flex-start; gap: 4px; text-align: left; padding: 16px; border-radius: 14px; border: 2px solid var(--line); background: var(--panel); min-height: 150px; }
.ngm.on { border-color: var(--acc); background: #2a1c12; } .ngm i { font-style: normal; font-size: 30px; } .ngm b { font-family: var(--hd); font-size: 26px; } .ngm em { font-style: normal; font-family: var(--hd); letter-spacing: .2em; color: var(--acc); font-size: 13px; text-transform: uppercase; } .ngm small { color: var(--muted); font-size: 14px; line-height: 1.35; }
.ng-form { display: grid; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); gap: 12px; align-items: end; }
.field { display: flex; flex-direction: column; gap: 4px; } .field span { font-size: 13px; color: var(--muted); }
.field input, .field select { min-height: 44px; padding: 8px 12px; border-radius: 10px; border: 1px solid var(--line); background: var(--panel2); color: var(--text); font-size: 16px; }
/* HUD */
.tbar { position: absolute; left: calc(8px + var(--safe-l)); right: calc(8px + var(--safe-r)); top: calc(8px + var(--safe-t)); display: flex; gap: 6px; align-items: center; flex-wrap: wrap; pointer-events: none; }
.tbar > * { pointer-events: auto; }
.chip { display: inline-flex; align-items: center; gap: 6px; min-height: 40px; padding: 5px 12px; border-radius: 10px; background: rgba(18,21,26,.88); border: 1px solid var(--line); color: var(--text); font-size: 15px; }
.chip b { font-family: var(--hd); font-weight: 700; font-size: 18px; letter-spacing: .02em; white-space: nowrap; } .chip i { font-style: normal; }
.chip.co b { max-width: 220px; overflow: hidden; text-overflow: ellipsis; } .chip.date { flex-direction: column; gap: 0; line-height: 1.05; padding: 3px 12px; } .chip.date small { color: var(--muted); font-family: var(--mono); font-size: 12px; }
.chip.cash b { color: #7fe0a6; font-family: var(--mono); font-size: 15px; } .chip.cash.neg b { color: #ff9a9e; }
.chip.go { background: linear-gradient(var(--acc), var(--acc2)); border-color: #a83f06; color: #fff; } .chip.on { border-color: var(--go); background: #14472c; }
.speeds { display: inline-flex; border-radius: 10px; overflow: hidden; border: 1px solid var(--line); }
.speeds button { min-width: 40px; min-height: 40px; border: 0; background: rgba(18,21,26,.88); font-family: var(--hd); font-weight: 700; font-size: 15px; } .speeds button.on { background: var(--acc); color: #fff; }
.tasks { position: absolute; right: calc(8px + var(--safe-r)); top: calc(60px + var(--safe-t)); bottom: calc(10px + var(--safe-b)); width: min(310px, 38vw); overflow-y: auto; display: flex; flex-direction: column; gap: 6px; scrollbar-width: thin; }
.tasks h4 { font-size: 12px; letter-spacing: .18em; text-transform: uppercase; color: var(--acc); margin: 6px 4px 0; text-shadow: 0 1px 2px #000; }
.tcard { background: rgba(18,21,26,.92); border: 1px solid var(--line); border-radius: 12px; padding: 8px 10px; display: flex; flex-direction: column; gap: 4px; }
.tcard.mine { border-color: var(--acc); box-shadow: inset 3px 0 0 var(--acc); } .tcard.idle { opacity: .85; }
.tcard b { font-size: 14px; } .tcard small { color: var(--muted); font-size: 12.5px; line-height: 1.3; } .tcard em { font-style: normal; color: var(--warn); font-size: 13px; }
.tb { min-height: 38px; border-radius: 9px; border: 1px solid var(--line); background: var(--panel2); font-family: var(--hd); font-weight: 700; font-size: 15px; letter-spacing: .02em; padding: 4px 10px; text-align: left; }
.tb.go { background: linear-gradient(var(--go), var(--go2)); border-color: #167544; color: #fff; } .tb[disabled] { opacity: .4; }
.trow { display: flex; gap: 6px; } .trow .tb { flex: 1; font-size: 13px; text-align: center; }
.tagw { font-size: 11px; background: #55440c; color: #ffe08a; border-radius: 99px; padding: 1px 6px; font-weight: 600; }
.feed { position: absolute; left: calc(10px + var(--safe-l)); bottom: calc(10px + var(--safe-b)); width: min(520px, 54vw); pointer-events: none; display: flex; flex-direction: column; gap: 2px; }
.feed p { margin: 0; font-size: 13px; padding: 3px 8px; border-radius: 6px; background: rgba(18,21,26,.72); color: #dfe6ed; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.feed p span { font-family: var(--mono); color: var(--dim); font-size: 11px; } .feed p.bad { color: #ffb3b5; } .feed p.good { color: #9be7bd; } .feed p.warn { color: #ffe08a; }
.chapter { position: absolute; left: calc(10px + var(--safe-l)); top: calc(60px + var(--safe-t)); font-family: var(--hd); font-size: 16px; padding: 4px 10px; border-radius: 8px; background: rgba(18,21,26,.8); pointer-events: none; } .chapter:empty { display: none; } .chapter small { color: var(--acc); letter-spacing: .15em; }
.camctl { position: absolute; left: calc(10px + var(--safe-l)); bottom: calc(110px + var(--safe-b)); display: flex; flex-direction: column; gap: 4px; }
.camctl button { width: 42px; height: 42px; border-radius: 10px; border: 1px solid var(--line); background: rgba(18,21,26,.85); font-size: 18px; }
#hud.dim { display: none; }
/* modal */
.modal { position: absolute; inset: 0; z-index: 50; display: grid; place-items: center; background: rgba(8,10,14,.66); }
.mcard { width: min(640px, calc(100vw - 24px)); max-height: calc(100vh - 24px); overflow-y: auto; padding: 18px 20px; }
.mcard h2 { font-size: 26px; margin-bottom: 6px; } .mbtns { justify-content: flex-end; margin-top: 14px; } .mbtns .btn.big { min-width: 160px; }
.notes { padding-left: 18px; margin: 8px 0; line-height: 1.45; } .notes li { margin: 2px 0; }
.chap { margin-top: 10px; padding: 10px 12px; border-radius: 10px; background: #2a1c12; border-left: 4px solid var(--acc); } .chap small { color: var(--acc); letter-spacing: .18em; font-family: var(--hd); } .chap b { display: block; font-family: var(--hd); font-size: 20px; } .chap p { margin: 3px 0; font-size: 14px; }
table.rep { width: 100%; border-collapse: collapse; } table.rep th { text-align: left; font-weight: 500; color: var(--muted); padding: 4px 0; } table.rep td { text-align: right; font-family: var(--mono); padding: 4px 0; } table.rep tr { border-bottom: 1px solid var(--line); }
.revs p { margin: 6px 0; font-size: 14px; color: #ffd76a; } .revs span { color: #555; } 
.ci-car { display: flex; flex-wrap: wrap; align-items: baseline; gap: 8px; } .ci-car small { flex-basis: 100%; color: var(--muted); }
.plate { font-family: var(--mono); font-size: 13px; border: 2px solid #ccc; border-radius: 4px; padding: 0 6px; }
.concern { font-style: italic; font-size: 17px; margin: 8px 0; color: #ffe2c9; }
.svcs { display: flex; flex-direction: column; gap: 4px; max-height: 46vh; overflow-y: auto; margin: 8px 0; padding-right: 4px; }
.svc { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; padding: 6px 8px; border-radius: 8px; background: var(--panel2); font-size: 14.5px; } .svc input[type=checkbox] { width: 22px; height: 22px; accent-color: var(--acc); }
.svc span { flex: 1; min-width: 140px; } .svc em { font-style: normal; color: var(--muted); font-size: 13px; } .svc select { min-height: 32px; border-radius: 6px; background: var(--panel); color: var(--text); border: 1px solid var(--line); }
.u { font-family: var(--hd); font-size: 12px; padding: 1px 6px; border-radius: 4px; } .u.red { background: #5a1f22; color: #ffb3b5; } .u.yellow { background: #55440c; color: #ffe08a; }
.toast { position: absolute; left: 50%; top: calc(64px + var(--safe-t)); transform: translateX(-50%); z-index: 60; padding: 10px 18px; border-radius: 10px; background: rgba(27,32,39,.97); border: 1px solid var(--line); font-weight: 600; max-width: min(620px, 90vw); text-align: center; pointer-events: none; }
.toast.good { border-color: var(--go); color: #9be7bd; } .toast.bad { border-color: var(--bad); color: #ffb3b5; }
.story { position: absolute; left: 50%; bottom: calc(120px + var(--safe-b)); transform: translateX(-50%); z-index: 45; max-width: min(640px, 80vw); padding: 10px 20px; border-radius: 14px; background: rgba(12,15,20,.9); border: 1px solid var(--line); font-size: 17px; text-align: center; pointer-events: none; }
.story.inner { font-style: italic; color: #e8eef4; border-color: #4a5563; } .story.mentor { border-color: var(--acc); } .story.chapter { font-family: var(--hd); font-size: 22px; border-color: var(--acc); color: #ffd2b0; }
#workhost, #officehost { position: absolute; inset: 0; pointer-events: none; z-index: 30; } #workhost > *, #officehost > * { pointer-events: auto; }
#rotate { display: none; position: absolute; inset: 0; z-index: 99; background: var(--bg); place-items: center; text-align: center; }
#rotate div { display: flex; flex-direction: column; gap: 8px; align-items: center; } #rotate span { font-size: 48px; } #rotate b { font-family: var(--hd); font-size: 24px; }
@media (orientation: portrait) and (pointer: coarse) { #rotate { display: grid; } }
@media (max-height: 520px) {
  .chip { min-height: 34px; padding: 3px 8px; } .chip b { font-size: 15px; } .speeds button { min-width: 32px; min-height: 34px; }
  .tasks { top: calc(48px + var(--safe-t)); width: min(270px, 36vw); } .tcard { padding: 6px 8px; } .tb { min-height: 34px; font-size: 14px; }
  .feed { width: 46vw; } .feed p:nth-child(-n+2) { display: none; } .chapter { top: calc(48px + var(--safe-t)); font-size: 14px; }
  .camctl { bottom: calc(64px + var(--safe-b)); } .camctl button { width: 36px; height: 36px; }
  .logo b { font-size: 44px; } .logo.big b { font-size: 52px; } .logo i { font-size: 36px; } .title-box { gap: 8px; } .ng-modes .ngm { min-height: 110px; padding: 10px; }
  .mcard { padding: 12px 14px; } .mcard h2 { font-size: 21px; }
}
@media (max-width: 760px) { .chip.rep, .chip.co { display: none; } .ng-modes { grid-template-columns: 1fr; } }
@media (max-height: 520px) { .tbar { flex-wrap: nowrap; } .chip.rep, #bAuto b { display: none; } .chip.co b { max-width: 130px; } .chip.date small { font-size: 11px; } }
@media (max-height: 520px) and (max-width: 900px) { .chip.co b { display: none; } }
/* sandbox options */
.ngm.locked { opacity: .78; } .ngm.locked small { color: #c9a27a; }
.field.chk { flex-direction: row; align-items: center; gap: 10px; grid-column: 1 / -1; } .field.chk input { width: 22px; height: 22px; min-height: 0; }
.field.sbsys { grid-column: 1 / -1; background: var(--panel2); border: 1px solid var(--line); border-radius: 10px; padding: 8px 12px; }
.field.sbsys summary { cursor: pointer; min-height: 32px; line-height: 32px; font-weight: 600; }
.sbgrid { display: grid; grid-template-columns: repeat(auto-fill, minmax(180px, 1fr)); gap: 6px 14px; padding: 8px 0 4px; font-size: 14px; } .sbgrid label { display: flex; gap: 8px; align-items: center; min-height: 32px; }
.finale { text-align: center; padding: 18px 8px; } .finale .fin-k { font-family: var(--hd); letter-spacing: .3em; color: var(--acc); font-size: 15px; margin: 0; }
.finale h1 { font-family: var(--hd); font-size: 48px; margin: 8px 0 12px; } .finale p { color: var(--muted); }
