/* Door Shop Simulator - shop-floor industrial UI: steel navy panels, safety yellow, a clean ERP on the office computer */
:root {
  --bg: #121c28; --panel: #1a2736; --panel2: #223246; --steel: #2d4157; --line: #36506b;
  --text: #eef3f8; --muted: #9fb0c2; --yellow: #f5c518; --go: #27ae60; --go2: #1e8a4c; --red: #e74c3c; --amber: #f39c12; --blue: #3498db;
  --os-bg: #f3f5f8; --os-card: #ffffff; --os-text: #1d2a38; --os-muted: #5d6e80; --os-line: #dfe5ec; --os-side: #1f3a5f; --os-acc: #2471a3;
  --r: 12px; --hd: 'Barlow Condensed', 'Arial Narrow', sans-serif; --bd: 'Barlow', system-ui, sans-serif;
  --safe-l: env(safe-area-inset-left, 0px); --safe-r: env(safe-area-inset-right, 0px); --safe-b: env(safe-area-inset-bottom, 0px);
}
* { box-sizing: border-box; -webkit-tap-highlight-color: transparent; }
html, body { margin: 0; height: 100%; background: var(--bg); color: var(--text); font-family: var(--bd); overflow: hidden; overscroll-behavior: none; }
button { font: inherit; color: inherit; cursor: pointer; }
input, select { font: inherit; }
#app { position: fixed; inset: 0; }
#cv { position: absolute; inset: 0; width: 100%; height: 100%; display: block; touch-action: none; }
.screen { position: absolute; inset: 0; display: none; }
.screen.show { display: block; }
[hidden] { display: none !important; }
.muted { color: var(--muted); } .small { font-size: 13px; }
.row { display: flex; gap: 10px; flex-wrap: wrap; align-items: center; }
.row.center, .center { justify-content: center; text-align: center; }
.col { display: flex; flex-direction: column; gap: 10px; align-items: center; }

/* buttons */
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 6px; padding: 10px 18px; border-radius: 10px; border: 1px solid var(--line); background: var(--panel2); color: var(--text); font-family: var(--hd); font-weight: 700; font-size: 17px; letter-spacing: .03em; text-decoration: none; transition: transform .08s, background .15s; }
.btn:hover { background: var(--steel); }
.btn:active { transform: translateY(1px) scale(.98); }
.btn.go { background: linear-gradient(#2ecc71, var(--go2)); border-color: #1a7a43; color: #fff; text-shadow: 0 1px 0 rgba(0,0,0,.25); }
.btn.warn { background: linear-gradient(#f5c518, #d9a800); color: #1b1b1b; border-color: #b38b00; }
.btn.bad { background: linear-gradient(#e74c3c, #b8382b); border-color: #92281e; color: #fff; }
.btn.big { padding: 14px 34px; font-size: 22px; min-width: 240px; }
.btn.small { padding: 6px 12px; font-size: 14px; }
.btn[disabled] { opacity: .45; pointer-events: none; }
.x { width: 36px; height: 36px; border-radius: 50%; border: none; background: rgba(0,0,0,.25); color: inherit; font-size: 16px; flex: none; }

/* logo */
.logo { display: inline-flex; flex-direction: column; align-items: center; font-family: var(--hd); line-height: .9; text-align: center; }
.logo span { font-size: 64px; font-weight: 800; letter-spacing: .04em; color: #fff; text-shadow: 0 4px 0 #0b131d, 0 8px 24px rgba(0,0,0,.5); }
.logo b { font-size: 30px; font-weight: 700; letter-spacing: .26em; color: var(--yellow); margin-top: 6px; padding-left: .26em; white-space: nowrap; }
.logo.small span { font-size: 38px; } .logo.small b { font-size: 20px; }
.door-ico { width: 44px; height: 72px; border: 5px solid #eef3f8; border-radius: 3px; position: relative; margin-bottom: 10px; background: linear-gradient(#f7f5ef, #dedbd2); box-shadow: 0 0 0 5px var(--yellow); }
.door-ico.big { width: 64px; height: 104px; }
.door-ico::before, .door-ico::after { content: ''; position: absolute; left: 14%; right: 14%; border: 2px solid #c9c6bb; border-radius: 2px; }
.door-ico::before { top: 8%; height: 34%; } .door-ico::after { bottom: 8%; height: 42%; }

/* gate + title */
#gate { background: radial-gradient(circle at 50% 30%, #23384f, var(--bg)); }
#gate .card { position: absolute; left: 50%; top: 50%; transform: translate(-50%, -50%); }
.card { background: var(--panel); border: 1px solid var(--line); border-radius: 18px; padding: 24px 28px; box-shadow: 0 20px 60px rgba(0,0,0,.45); max-width: min(560px, calc(100vw - 32px)); }
#title { background: transparent; }
.title-bg { position: absolute; inset: 0; background: linear-gradient(90deg, rgba(12,20,30,.92) 0%, rgba(12,20,30,.72) 42%, rgba(12,20,30,.12) 75%); }
.title-wrap { position: absolute; left: max(32px, 6vw); top: 50%; transform: translateY(-50%); display: flex; flex-direction: column; align-items: center; gap: 14px; width: min(460px, 90vw); }
.tagline { color: #cbd7e3; font-size: 17px; text-align: center; margin: 0 0 6px; }
.badge-admin { font-family: var(--hd); font-weight: 700; letter-spacing: .12em; font-size: 12px; background: #6b5420; color: #ffe08a; padding: 3px 10px; border-radius: 99px; }

/* wizard */
#setup { background: rgba(10,16,24,.82); backdrop-filter: blur(4px); }
.wiz { position: absolute; inset: max(12px, 3vh) max(12px, 4vw); background: var(--panel); border: 1px solid var(--line); border-radius: 20px; display: flex; flex-direction: column; overflow: hidden; box-shadow: 0 30px 80px rgba(0,0,0,.5); }
.wiz-top { display: flex; align-items: center; justify-content: space-between; padding: 12px 16px; border-bottom: 1px solid var(--line); background: var(--panel2); }
.steps { display: flex; gap: 6px; font-family: var(--hd); font-weight: 700; letter-spacing: .04em; }
.steps span { padding: 6px 12px; border-radius: 99px; color: var(--muted); background: rgba(255,255,255,.04); }
.steps span.on { background: var(--yellow); color: #1b1b1b; }
.wiz-body { flex: 1; overflow: auto; padding: 18px 22px; }
.wiz-body h2 { font-family: var(--hd); font-size: 30px; margin: 0 0 4px; }
.wiz-foot { display: flex; justify-content: space-between; padding: 12px 16px; border-top: 1px solid var(--line); background: var(--panel2); }
.field { display: flex; flex-direction: column; gap: 6px; margin: 14px 0; max-width: 520px; }
.field > span { font-family: var(--hd); font-weight: 700; color: var(--muted); letter-spacing: .05em; text-transform: uppercase; font-size: 14px; }
.field input { background: #0f1823; border: 1px solid var(--line); color: var(--text); border-radius: 10px; padding: 12px 14px; font-size: 18px; }
.swatches, .logos { display: flex; flex-wrap: wrap; gap: 8px; }
.sw { width: 36px; height: 36px; border-radius: 50%; border: 3px solid transparent; }
.sw.on { border-color: #fff; box-shadow: 0 0 0 2px var(--yellow); }
.lg { width: 44px; height: 44px; border-radius: 10px; border: 2px solid var(--line); background: #0f1823; font-size: 22px; }
.lg.on { border-color: var(--yellow); background: var(--steel); }
.preview-sign { margin-top: 10px; display: inline-flex; align-items: center; gap: 10px; padding: 12px 22px; border-radius: 8px; font-family: var(--hd); font-weight: 800; font-size: 26px; color: #fff; border: 3px solid #fff; box-shadow: 0 6px 20px rgba(0,0,0,.4); }
.lab { display: grid; grid-template-columns: minmax(220px, 40%) 1fr; gap: 18px; height: 100%; min-height: 360px; }
.lab-view { position: relative; background: radial-gradient(circle at 50% 40%, #33506e, #142030); border-radius: 16px; min-height: 340px; height: 100%; overflow: hidden; }
.lab-view canvas { position: absolute; inset: 0; width: 100%; height: 100%; touch-action: none; }
.lab-hint { position: absolute; left: 12px; bottom: 10px; font-size: 12px; color: var(--muted); }
#labRand { position: absolute; right: 10px; bottom: 10px; }
.tabs { display: flex; gap: 6px; flex-wrap: wrap; margin: 8px 0 12px; }
.tabs button { border: 1px solid var(--line); background: #0f1823; padding: 7px 12px; border-radius: 99px; font-family: var(--hd); font-weight: 700; letter-spacing: .03em; }
.tabs button.on { background: var(--yellow); color: #1b1b1b; border-color: var(--yellow); }
.lab-opts { display: flex; flex-direction: column; gap: 12px; }
.opt { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }
.opt > span { width: 96px; font-family: var(--hd); font-weight: 700; color: var(--muted); text-transform: uppercase; font-size: 13px; letter-spacing: .05em; }
.stepper { display: inline-flex; align-items: center; background: #0f1823; border: 1px solid var(--line); border-radius: 10px; overflow: hidden; }
.stepper button { width: 38px; height: 38px; border: none; background: transparent; font-size: 18px; }
.stepper b { min-width: 130px; text-align: center; font-weight: 600; }
.cols { display: flex; flex-wrap: wrap; gap: 6px; }
.cols .sw { width: 28px; height: 28px; }
.letter { max-width: 720px; margin: 0 auto; background: #fbf8f0; color: #2a2a2a; border-radius: 6px; padding: 26px 30px; font-family: Georgia, serif; line-height: 1.55; box-shadow: 0 10px 30px rgba(0,0,0,.4); }
.letter h3 { font-family: var(--hd); font-size: 24px; margin: 0 0 8px; color: #1f3a5f; }
.letter ul { padding-left: 20px; } .letter .sig { font-style: italic; }

/* HUD */
#hud { pointer-events: none; }
#hud > * { pointer-events: auto; }
.tbar { position: absolute; left: calc(8px + var(--safe-l)); right: calc(8px + var(--safe-r)); top: 8px; display: flex; gap: 6px; align-items: stretch; pointer-events: none; flex-wrap: wrap; }
.tbar > * { pointer-events: auto; }
.chip { display: inline-flex; align-items: center; gap: 6px; padding: 6px 12px; border-radius: 12px; background: rgba(18,28,40,.88); border: 1px solid rgba(255,255,255,.12); font-family: var(--hd); font-weight: 700; font-size: 18px; box-shadow: 0 4px 14px rgba(0,0,0,.3); backdrop-filter: blur(6px); white-space: nowrap; }
.chip small { font-family: var(--bd); font-weight: 500; font-size: 12px; color: var(--muted); }
.chip.date { flex-direction: column; align-items: flex-start; gap: 0; line-height: 1.05; padding: 5px 12px; }
.chip.date b { font-size: 16px; } .chip.date small { font-family: 'JetBrains Mono', monospace; color: var(--yellow); font-size: 13px; }
.chip.co i { font-style: normal; font-size: 18px; } .chip.co b { max-width: 180px; overflow: hidden; text-overflow: ellipsis; }
.chip.cash b { color: #7ee2a0; } .chip.cash.neg b { color: #ff8a7d; }
.stars { color: var(--yellow); letter-spacing: 1px; font-size: 16px; }
.chip.mail { position: relative; font-size: 20px; }
.badge { position: absolute; top: -6px; right: -6px; min-width: 20px; height: 20px; padding: 0 5px; border-radius: 10px; background: var(--red); color: #fff; font-style: normal; font-size: 12px; font-family: var(--bd); font-weight: 700; display: flex; align-items: center; justify-content: center; }
.ticker { flex: 1; min-width: 160px; display: flex; align-items: center; padding: 0 12px; border-radius: 12px; background: rgba(18,28,40,.7); color: #d8e3ee; font-size: 14px; overflow: hidden; white-space: nowrap; text-overflow: ellipsis; }
.ticker span { overflow: hidden; text-overflow: ellipsis; }
.camctl { position: absolute; right: calc(10px + var(--safe-r)); top: 50%; transform: translateY(-50%); display: flex; flex-direction: column; gap: 6px; }
.camctl button { width: 44px; height: 44px; border-radius: 12px; border: 1px solid rgba(255,255,255,.14); background: rgba(18,28,40,.82); font-size: 20px; }
.daybar { position: absolute; left: 50%; transform: translateX(-50%); bottom: calc(96px + var(--safe-b)); width: min(640px, 70vw); background: rgba(18,28,40,.9); border-radius: 12px; padding: 8px 12px; border: 1px solid rgba(255,255,255,.12); }
.dprog { position: relative; height: 10px; border-radius: 6px; background: #0b131c; overflow: hidden; }
.dprog i { position: absolute; left: 0; top: 0; bottom: 0; width: 0; background: linear-gradient(90deg, var(--yellow), #ffdf6b); border-radius: 6px; }
.dmarks { position: absolute; inset: 0; }
.dmarks b { position: absolute; top: 0; bottom: 0; background: rgba(52,152,219,.55); }
.dstats { display: flex; justify-content: space-around; font-size: 14px; margin-top: 6px; color: #cfdbe6; }
.dstats b { color: #fff; font-family: var(--hd); font-size: 17px; }
.dock { position: absolute; left: calc(8px + var(--safe-l)); right: calc(8px + var(--safe-r)); bottom: calc(8px + var(--safe-b)); display: flex; gap: 6px; align-items: stretch; justify-content: center; }
.nb { position: relative; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 2px; min-width: 70px; padding: 8px 8px; border-radius: 14px; border: 1px solid rgba(255,255,255,.12); background: rgba(18,28,40,.9); box-shadow: 0 4px 14px rgba(0,0,0,.3); }
.nb span { font-size: 24px; line-height: 1; } .nb b { font-family: var(--hd); font-size: 14px; letter-spacing: .04em; }
.nb:hover { background: rgba(45,65,87,.95); }
.dot { position: absolute; top: 6px; right: 8px; width: 10px; height: 10px; border-radius: 50%; background: var(--red); box-shadow: 0 0 0 2px var(--bg); }
.startwrap { display: flex; gap: 6px; margin-left: 6px; }
.startbtn { display: flex; flex-direction: column; align-items: center; justify-content: center; min-width: 170px; padding: 6px 18px; border-radius: 14px; border: 2px solid #1a7a43; background: linear-gradient(#34d77a, #1e8a4c); color: #fff; box-shadow: 0 6px 18px rgba(30,138,76,.45); position: relative; }
.startbtn b { font-family: var(--hd); font-size: 24px; letter-spacing: .06em; line-height: 1; }
.startbtn small { font-size: 12px; opacity: .9; }
.startbtn .lamp { position: absolute; left: 10px; top: 10px; width: 9px; height: 9px; border-radius: 50%; background: #c7ffd9; box-shadow: 0 0 8px #c7ffd9; }
.startbtn.running { background: linear-gradient(#f5c518, #d39e00); border-color: #a88000; color: #1b1b1b; box-shadow: 0 6px 18px rgba(245,197,24,.35); }
.runctl { display: flex; gap: 6px; }
.runctl button { width: 52px; border-radius: 14px; border: 1px solid rgba(255,255,255,.14); background: rgba(18,28,40,.9); font-family: var(--hd); font-weight: 800; font-size: 20px; }
.officebar { position: absolute; left: 0; right: 0; bottom: calc(14px + var(--safe-b)); display: flex; justify-content: center; gap: 12px; }

/* computer */
#pc { background: rgba(6,10,16,.78); backdrop-filter: blur(3px); z-index: 20; }
.monitor { position: absolute; inset: max(10px, 2.5vh) max(10px, 3vw) max(26px, 5vh); display: flex; flex-direction: column; align-items: center; }
.bezel { flex: 1; width: 100%; background: linear-gradient(#262a2f, #15181b); border-radius: 18px; padding: 14px; box-shadow: 0 30px 80px rgba(0,0,0,.6), inset 0 1px 0 rgba(255,255,255,.08); min-height: 0; }
.stand { width: 120px; height: 18px; background: linear-gradient(#2a2d31, #15181b); border-radius: 0 0 10px 10px; }
.os { height: 100%; display: flex; background: var(--os-bg); color: var(--os-text); border-radius: 6px; overflow: hidden; }
.os-side { width: 190px; flex: none; background: var(--os-side); color: #dbe7f3; display: flex; flex-direction: column; padding: 10px 8px; gap: 2px; overflow-y: auto; }
.os-brand { font-family: var(--hd); font-weight: 800; font-size: 20px; padding: 6px 10px 12px; color: #fff; letter-spacing: .03em; }
.os-brand small { display: block; font-family: var(--bd); font-weight: 500; font-size: 11px; color: #9fc0e0; letter-spacing: 0; }
.app { display: flex; align-items: center; gap: 10px; padding: 9px 10px; border-radius: 8px; border: none; background: transparent; text-align: left; font-weight: 600; font-size: 15px; position: relative; color: inherit; }
.app:hover { background: rgba(255,255,255,.08); }
.app.on { background: rgba(255,255,255,.16); color: #fff; }
.app i { font-style: normal; font-size: 18px; width: 22px; text-align: center; }
.app em { margin-left: auto; font-style: normal; font-size: 11px; background: var(--red); color: #fff; border-radius: 9px; padding: 1px 6px; }
.os-main { flex: 1; display: flex; flex-direction: column; min-width: 0; }
.os-head { display: flex; align-items: center; gap: 12px; padding: 10px 16px; border-bottom: 1px solid var(--os-line); background: #fff; }
.os-head h2 { margin: 0; font-family: var(--hd); font-size: 26px; color: var(--os-side); }
.os-sub { flex: 1; color: var(--os-muted); font-size: 13px; }
.os-head .x { background: #e9eef3; color: #345; }
.os-body { flex: 1; overflow: auto; padding: 14px 16px 30px; }
.os-body h3 { font-family: var(--hd); font-size: 19px; margin: 18px 0 8px; color: var(--os-side); letter-spacing: .02em; }
.os-body h3:first-child { margin-top: 0; }
.kpis { display: grid; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: 10px; margin-bottom: 12px; }
.kpi { background: var(--os-card); border: 1px solid var(--os-line); border-radius: 10px; padding: 10px 12px; }
.kpi small { display: block; color: var(--os-muted); font-size: 12px; text-transform: uppercase; letter-spacing: .05em; font-weight: 600; }
.kpi b { font-family: var(--hd); font-size: 26px; }
.kpi .up { color: #1e8a4c; } .kpi .down { color: #c0392b; }
.ocard { background: var(--os-card); border: 1px solid var(--os-line); border-radius: 10px; padding: 12px 14px; margin-bottom: 10px; }
.ocard.warn { border-color: #f0c36b; background: #fffaf0; }
.ocard.bad { border-color: #f1a49b; background: #fff5f4; }
.ocard.good { border-color: #9fd9b5; background: #f3fbf6; }
.ocard header { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }
.ocard header b { font-size: 16px; }
.ocard p { margin: 6px 0; white-space: pre-line; color: #334; }
.tag { display: inline-block; font-size: 11px; font-weight: 700; padding: 2px 8px; border-radius: 99px; background: #e9eef3; color: #345; text-transform: uppercase; letter-spacing: .04em; }
.tag.red { background: #fde3df; color: #a5281b; } .tag.amber { background: #fff0cf; color: #8a5a00; } .tag.green { background: #dcf5e6; color: #1b6b3f; } .tag.blue { background: #dcebf9; color: #1f5f99; }
.bar { height: 8px; background: #e6ebf0; border-radius: 5px; overflow: hidden; }
.bar i { display: block; height: 100%; background: var(--os-acc); border-radius: 5px; }
.bar.g i { background: #27ae60; } .bar.y i { background: #f39c12; } .bar.r i { background: #e74c3c; }
table.t { width: 100%; border-collapse: collapse; background: #fff; border: 1px solid var(--os-line); border-radius: 10px; overflow: hidden; font-size: 14px; }
table.t th, table.t td { padding: 7px 9px; border-bottom: 1px solid var(--os-line); text-align: left; vertical-align: middle; }
table.t th { background: #f0f3f7; font-size: 12px; text-transform: uppercase; letter-spacing: .04em; color: var(--os-muted); }
table.t td.n, table.t th.n { text-align: right; font-variant-numeric: tabular-nums; }
table.t tr:last-child td { border-bottom: none; }
.grid5 { display: grid; grid-template-columns: 120px repeat(5, minmax(70px, 1fr)); gap: 4px; font-size: 13px; }
.grid5 > div { background: #fff; border: 1px solid var(--os-line); border-radius: 6px; padding: 6px; text-align: center; }
.grid5 > .gh { background: transparent; border: none; font-weight: 700; color: var(--os-muted); font-size: 12px; display: flex; align-items: center; justify-content: center; }
.grid5 > .gs { text-align: left; justify-content: flex-start; }
.cell b { font-family: var(--hd); font-size: 19px; display: block; }
.cell small { color: var(--os-muted); font-size: 11px; }
.cell.red { background: #fde3df; border-color: #f1a49b; } .cell.amber { background: #fff4dc; border-color: #f0c36b; } .cell.green { background: #effaf3; }
.qty { display: inline-flex; align-items: center; border: 1px solid var(--os-line); border-radius: 8px; overflow: hidden; background: #fff; }
.qty button { width: 28px; height: 28px; border: none; background: #eef2f6; font-weight: 700; color: #234; }
.qty b { min-width: 34px; text-align: center; font-size: 14px; }
.ob { display: inline-flex; align-items: center; justify-content: center; gap: 4px; padding: 7px 12px; border-radius: 8px; border: 1px solid #c8d3de; background: #fff; color: #1f3a5f; font-weight: 700; font-size: 14px; }
.ob:hover { background: #f0f5fa; }
.ob.pri { background: var(--os-acc); color: #fff; border-color: #1a5a85; }
.ob.go { background: #27ae60; color: #fff; border-color: #1e8a4c; }
.ob.bad { background: #fff; color: #b8382b; border-color: #f1a49b; }
.ob[disabled] { opacity: .45; pointer-events: none; }
.seg { display: inline-flex; border: 1px solid #c8d3de; border-radius: 9px; overflow: hidden; background: #fff; flex-wrap: wrap; }
.seg button { border: none; background: #fff; padding: 7px 12px; font-weight: 600; color: #345; font-size: 14px; border-right: 1px solid #e3e9ef; }
.seg button:last-child { border-right: none; }
.seg button.on { background: var(--os-side); color: #fff; }
.setrow { display: flex; align-items: center; gap: 12px; flex-wrap: wrap; padding: 10px 0; border-bottom: 1px solid var(--os-line); }
.setrow > label, .setrow > .lbl { min-width: 170px; font-weight: 700; }
.setrow small { color: var(--os-muted); flex-basis: 100%; }
.setrow input[type=range] { width: 220px; accent-color: var(--os-acc); }
.setrow select { padding: 6px 10px; border-radius: 8px; border: 1px solid #c8d3de; }
.mailrow { display: flex; gap: 10px; align-items: flex-start; padding: 10px 12px; border-bottom: 1px solid var(--os-line); background: #fff; cursor: pointer; }
.mailrow.unread b { color: var(--os-acc); }
.mailrow .mi { font-size: 22px; } .mailrow .mt { flex: 1; } .mailrow small { color: var(--os-muted); }
.mailrow.need { background: #fffaf0; }
.mailbody { padding: 10px 14px 14px 46px; background: #fbfcfd; border-bottom: 1px solid var(--os-line); white-space: pre-line; font-size: 14px; color: #2a3a4a; }
.choices { display: flex; gap: 8px; flex-wrap: wrap; margin-top: 10px; }
.eq { display: grid; grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); gap: 10px; }
.eqc { background: #fff; border: 1px solid var(--os-line); border-radius: 12px; padding: 12px; display: flex; flex-direction: column; gap: 6px; }
.eqc header { display: flex; gap: 8px; align-items: center; } .eqc header i { font-style: normal; font-size: 24px; }
.eqc .tiers { display: flex; gap: 3px; } .eqc .tiers span { flex: 1; height: 6px; border-radius: 3px; background: #e2e8ee; } .eqc .tiers span.on { background: #27ae60; }
.eqc .cur { font-weight: 700; } .eqc .nxt { color: var(--os-muted); font-size: 13px; }
.eqc p { margin: 0; font-size: 13px; color: #456; }
.chart { width: 100%; height: 170px; background: #fff; border: 1px solid var(--os-line); border-radius: 10px; }
.two { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.emp { display: grid; grid-template-columns: 1.6fr 1fr .9fr .9fr auto; gap: 8px; align-items: center; padding: 8px 10px; border-bottom: 1px solid var(--os-line); background: #fff; font-size: 14px; }
.emp .nm b { display: block; } .emp .nm small { color: var(--os-muted); }
.emp .act { display: flex; gap: 4px; flex-wrap: wrap; justify-content: flex-end; }
.emp.out { opacity: .55; }
.stack { border: 1px solid var(--os-line); border-radius: 10px; overflow: hidden; margin-bottom: 12px; }
.note { font-size: 13px; color: var(--os-muted); margin: 6px 0 12px; }
.pill { display: inline-flex; gap: 6px; align-items: center; background: #eef3f8; border-radius: 99px; padding: 4px 10px; font-size: 13px; font-weight: 600; }

/* modals */
.modal { position: absolute; inset: 0; background: rgba(6,10,16,.7); z-index: 30; display: flex; align-items: center; justify-content: center; padding: 14px; }
.pop { animation: pop .28s cubic-bezier(.2,1.4,.4,1); }
@keyframes pop { from { transform: scale(.88); } to { transform: scale(1); } }
.rep-card, .brief-card { width: min(760px, 96vw); max-height: 92vh; overflow: auto; }
.rep-head small { color: var(--yellow); font-family: var(--hd); font-weight: 700; letter-spacing: .08em; text-transform: uppercase; }
.rep-head h2 { font-family: var(--hd); font-size: 34px; margin: 0 0 10px; }
.rep-big { display: grid; grid-template-columns: repeat(4, 1fr); gap: 8px; margin-bottom: 14px; }
.rep-big div { background: var(--panel2); border-radius: 12px; padding: 10px; text-align: center; }
.rep-big small { display: block; color: var(--muted); font-size: 12px; text-transform: uppercase; letter-spacing: .05em; }
.rep-big b { font-family: var(--hd); font-size: 30px; }
.rep-big .pos { color: #7ee2a0; } .rep-big .neg { color: #ff8a7d; }
.rep-cols { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; margin-bottom: 14px; font-size: 14px; }
.rep-cols h4 { font-family: var(--hd); font-size: 17px; margin: 0 0 6px; color: var(--yellow); letter-spacing: .04em; }
.rep-cols ul { margin: 0; padding-left: 18px; color: #d4dee8; }
.rep-cols li { margin: 3px 0; }
.ledger { width: 100%; font-size: 14px; border-collapse: collapse; }
.ledger td { padding: 3px 0; } .ledger td:last-child { text-align: right; font-variant-numeric: tabular-nums; }
.ledger tr.tot td { border-top: 1px solid var(--line); font-weight: 700; padding-top: 6px; }

/* floor popover, coach, toast */
.pop-info { position: absolute; z-index: 15; width: 280px; background: rgba(18,28,40,.96); border: 1px solid var(--line); border-radius: 14px; padding: 12px 14px; box-shadow: 0 12px 40px rgba(0,0,0,.5); font-size: 14px; }
.pop-info h4 { margin: 0 0 4px; font-family: var(--hd); font-size: 20px; }
.pop-info p { margin: 4px 0; color: #cfdbe6; }
.pop-info .row { margin-top: 8px; }
.pop-info .bar { background: #0b131c; }
.tip { position: absolute; z-index: 14; pointer-events: none; background: rgba(18,28,40,.92); border-radius: 8px; padding: 4px 9px; font-size: 13px; border: 1px solid var(--line); }
.coach { position: absolute; z-index: 25; left: calc(12px + var(--safe-l)); top: 66px; width: min(420px, 80vw); display: flex; gap: 10px; background: #fbf8f0; color: #2a2a2a; border-radius: 16px; padding: 12px; box-shadow: 0 16px 40px rgba(0,0,0,.5); border: 3px solid var(--yellow); }
body.pcopen .coach { left: auto; top: auto; right: calc(26px + var(--safe-r)); bottom: 34px; width: min(330px, 60vw); }
body.pcopen .os-body { padding-bottom: 210px; }
.coach-face { font-size: 40px; line-height: 1; }
.coach-txt b { font-family: var(--hd); font-size: 18px; color: #1f3a5f; }
.coach-txt p { margin: 4px 0 8px; font-size: 14px; line-height: 1.4; }
.coach .btn { color: #1f3a5f; background: #fff; border-color: #c8d3de; }
.coach .btn.go { color: #fff; background: linear-gradient(#2ecc71, var(--go2)); }
.hl { outline: 3px solid var(--yellow) !important; outline-offset: 2px; animation: hl 1s infinite; }
@keyframes hl { 50% { outline-color: rgba(245,197,24,.2); } }
.toast { position: absolute; z-index: 40; left: 50%; top: 70px; transform: translateX(-50%); background: rgba(18,28,40,.96); border: 1px solid var(--line); padding: 10px 18px; border-radius: 12px; font-weight: 600; box-shadow: 0 10px 30px rgba(0,0,0,.4); max-width: 90vw; text-align: center; }
.toast.bad { border-color: var(--red); } .toast.good { border-color: var(--go); }

#rotate { display: none; position: fixed; inset: 0; z-index: 99; background: var(--bg); align-items: center; justify-content: center; text-align: center; }
#rotate div { display: flex; flex-direction: column; gap: 8px; align-items: center; } #rotate span { font-size: 54px; animation: rot 1.6s infinite; }
@keyframes rot { 50% { transform: rotate(90deg); } }
@media (orientation: portrait) and (pointer: coarse) and (max-width: 700px) { body.ingame #rotate { display: flex; } }

/* small landscape phones */
@media (max-height: 520px) {
  .chip { font-size: 15px; padding: 4px 9px; } .chip.date b { font-size: 14px; }
  .ticker { display: none; }
  .nb { min-width: 54px; padding: 5px; } .nb span { font-size: 19px; } .nb b { font-size: 12px; }
  .startbtn { min-width: 130px; } .startbtn b { font-size: 19px; }
  .camctl button { width: 38px; height: 38px; font-size: 17px; }
  .daybar { bottom: calc(70px + var(--safe-b)); }
  .os-side { width: 150px; } .app { padding: 6px 8px; font-size: 13px; }
  .logo span { font-size: 38px; } .logo b { font-size: 17px; letter-spacing: .16em; padding-left: .16em; }
  .rep-big b { font-size: 22px; }
}
@media (max-width: 760px) {
  .os-side { width: 56px; } .app span, .os-brand small, .os-brand span { display: none; } .app { justify-content: center; } .app em { position: absolute; top: 2px; right: 2px; }
  .lab { grid-template-columns: 1fr; } .two, .rep-cols { grid-template-columns: 1fr; }
  .emp { grid-template-columns: 1.4fr 1fr auto; } .emp .hide-s { display: none; }
  .title-wrap { left: 50%; transform: translate(-50%, -50%); }
}
/* keep the report / briefing buttons in reach on short screens */
.rep-card > .row.center, .brief-card > .row.center { position: sticky; bottom: -24px; background: var(--panel); padding: 10px 0 4px; margin-bottom: -6px; }
@media (max-height: 520px) {
  .rep-card, .brief-card { padding: 14px 18px; }
  .rep-head h2 { font-size: 24px; margin-bottom: 6px; }
  .rep-big { gap: 6px; margin-bottom: 8px; } .rep-big div { padding: 6px; }
  .rep-cols { font-size: 13px; gap: 10px; }
  .btn.big { padding: 10px 24px; font-size: 18px; min-width: 200px; }
}

.eqc .tiers { gap: 2px; } .eqc .tiers span.on.pro { background: #2e86de; } .eqc .tiers span.on.smart { background: #00b8d4; } .eqc .tiers span.on.future { background: linear-gradient(90deg, #ff4df0, #5ef3ff); }
.tag.era-shop { background: #eef1f4; color: #456; } .tag.era-pro { background: #dcebf9; color: #1f5f99; } .tag.era-smart { background: #d6f7fb; color: #00788a; } .tag.era-future { background: linear-gradient(90deg, #ffe0fb, #dcfbff); color: #7a1a8a; }

/* fixes from play-testing */
.startbtn .lamp { left: 8px; top: 8px; }
.startbtn b { padding: 0 6px; }
.lab-view { min-height: 260px; }
input[type=range] { accent-color: var(--yellow); }
.rep-card, .brief-card { display: flex; flex-direction: column; }
.rep-card .rep-cols, .brief-card #bBody { overflow: auto; min-height: 0; flex: 1 1 auto; }
.rep-card > .row.center, .brief-card > .row.center { position: static; margin: 0; padding-top: 8px; flex: none; }
@media (max-height: 520px) {
  .lab { grid-template-columns: 40% 1fr; min-height: 0; } .lab-view { min-height: 0; height: calc(100vh - 150px); }
  .ticker { display: flex; position: absolute; left: 0; right: 0; top: 44px; height: 22px; font-size: 12px; padding: 0 10px; background: rgba(18,28,40,.6); }
  .steps span { padding: 4px 8px; font-size: 13px; }
}
@media (max-width: 500px) { .steps span { font-size: 12px; padding: 4px 7px; white-space: nowrap; } }

/* purchasing grid: room for the − / + buttons (they were clipped on tablets) */
.gridwrap { overflow-x: auto; -webkit-overflow-scrolling: touch; padding-bottom: 4px; }
.grid5.buy { grid-template-columns: 88px repeat(5, minmax(106px, 1fr)); min-width: 630px; }
.grid5.buy .cell { display: flex; flex-direction: column; align-items: center; gap: 4px; padding: 6px 4px; }
.grid5.buy .cell.picked { background: #eaf4ff; border-color: #8bbbe8; }
.grid5.buy .qty button { width: 36px; height: 36px; font-size: 18px; touch-action: manipulation; }
.grid5.buy .qty b { min-width: 38px; font-size: 16px; }
.grid5.buy .gs { font-size: 11px; }
.qty button:active { background: #d6e2ee; }
.t .qty button { width: 34px; height: 32px; font-size: 16px; }

/* locations */
.locs { display: grid; grid-template-columns: repeat(auto-fill, minmax(320px, 1fr)); gap: 10px; margin-bottom: 8px; }
.loccard { display: flex; gap: 12px; background: #fff; border: 1px solid var(--os-line); border-radius: 12px; padding: 12px; }
.loccard.locked { background: #f7f9fb; }
.loccard.locked .locart { filter: grayscale(1); opacity: .6; }
.locart { flex: none; width: 64px; height: 64px; border-radius: 14px; display: flex; align-items: center; justify-content: center; font-size: 34px; background: linear-gradient(135deg, #e9f1f8, #d5e3f0); }
.loccard.yard .locart { background: linear-gradient(135deg, #f6e7d2, #e3c49c); }
.loccard.component .locart { background: linear-gradient(135deg, #e6efe0, #c3d9b2); }
.loccard.cabinet .locart { background: linear-gradient(135deg, #efe3f3, #d4bde0); }
.loccard.hq .locart { background: linear-gradient(135deg, #fff3c4, #f5c518); }
.locbody { flex: 1; min-width: 0; } .locbody header { display: flex; gap: 6px; flex-wrap: wrap; align-items: center; } .locbody p { margin: 6px 0; font-size: 14px; }
.reqs { list-style: none; padding: 0; margin: 6px 0 10px; font-size: 13px; } .reqs li { margin: 2px 0; color: #678; } .reqs li.ok { color: #1b6b3f; }
.spark { display: block; margin: 4px 0; }
.grid5.buy .gs { flex-direction: column; align-items: flex-start; justify-content: center; line-height: 1.2; }

/* ================================================================ ramp-up: goals, pops, calls, drama */
.goals { position: absolute; z-index: 6; left: calc(8px + var(--safe-l)); top: 66px; width: 250px; text-align: left; padding: 8px 10px; border-radius: 12px; background: rgba(18,28,40,.86); border: 1px solid rgba(255,255,255,.12); color: var(--text); font-family: var(--bd); box-shadow: 0 6px 18px rgba(0,0,0,.3); cursor: pointer; }
.goals h5 { margin: 0 0 4px; font-family: var(--hd); font-size: 14px; letter-spacing: .08em; color: var(--yellow); display: flex; justify-content: space-between; }
.goals h5 small { color: var(--muted); font-family: var(--bd); letter-spacing: 0; font-weight: 500; }
.goals .g { font-size: 12.5px; margin: 5px 0 0; line-height: 1.25; }
.goals .g i { display: block; height: 4px; border-radius: 3px; background: #0b131c; margin-top: 3px; overflow: hidden; }
.goals .g i em { display: block; height: 100%; background: linear-gradient(90deg, var(--yellow), #7ee2a0); border-radius: 3px; }
.goals .g.ct { border-top: 1px dashed rgba(255,255,255,.18); padding-top: 5px; }
.goals .g.ct i em { background: linear-gradient(90deg, #3498db, #9b59b6); }
.goals .g small { color: var(--muted); }
.goals.min { width: auto; } .goals.min .g { display: none; }
.goals.flash { animation: gflash 1.2s ease-out; }
@keyframes gflash { 0% { box-shadow: 0 0 0 0 rgba(245,197,24,.9); } 100% { box-shadow: 0 0 0 18px rgba(245,197,24,0); } }
body.pcopen .goals, body.pcopen .feed { display: none; }
.feed { position: absolute; z-index: 5; left: calc(8px + var(--safe-l)); bottom: calc(150px + var(--safe-b)); width: min(380px, 46vw); display: flex; flex-direction: column; gap: 3px; pointer-events: none; }
.feed div { background: rgba(18,28,40,.82); border-left: 3px solid var(--muted); padding: 3px 8px; border-radius: 6px; font-size: 12.5px; color: #dbe6f0; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; animation: feedin .35s ease-out; }
.feed div.cash, .feed div.fixed { border-color: #2ecc71; } .feed div.warn, .feed div.down { border-color: var(--red); } .feed div.ship, .feed div.call { border-color: var(--blue); } .feed div.bell, .feed div.break { border-color: var(--yellow); }
.feed div:nth-last-child(n+3) { opacity: .65; }
@keyframes feedin { from { transform: translateX(-16px); opacity: 0; } to { transform: none; opacity: 1; } }
#pops, #fixes { position: absolute; inset: 0; pointer-events: none; z-index: 7; overflow: hidden; }
.fpop { position: absolute; left: 0; top: 0; font-family: var(--hd); font-weight: 800; font-size: 22px; color: #fff; text-shadow: 0 2px 0 rgba(0,0,0,.5), 0 0 12px rgba(0,0,0,.4); white-space: nowrap; will-change: transform, opacity; }
.fpop.cash { color: #7ee2a0; font-size: 28px; } .fpop.inv { color: #ffd76b; font-size: 24px; } .fpop.bad { color: #ff8a7d; } .fpop.door { font-size: 16px; color: #fff7d6; } .fpop.big { font-size: 34px; color: var(--yellow); } .fpop.lvl { font-size: 26px; color: #8fe9ff; }
.fixbtn { position: absolute; pointer-events: auto; transform: translate(-50%, -100%); padding: 8px 12px; border-radius: 12px; border: 2px solid #fff; background: linear-gradient(#e74c3c, #b8382b); color: #fff; font-family: var(--hd); font-weight: 800; font-size: 15px; box-shadow: 0 6px 18px rgba(0,0,0,.45); animation: fixpulse .7s ease-in-out infinite alternate; white-space: nowrap; }
@keyframes fixpulse { from { transform: translate(-50%, -100%) scale(1); } to { transform: translate(-50%, -100%) scale(1.07); } }
.call { position: absolute; z-index: 26; right: calc(64px + var(--safe-r)); top: 70px; width: min(330px, 70vw); display: flex; gap: 10px; background: #fbf8f0; color: #222; border-radius: 16px; padding: 12px; border: 3px solid #2ecc71; box-shadow: 0 16px 40px rgba(0,0,0,.5); animation: ring .5s ease-in-out infinite alternate; }
.call-ico { font-size: 34px; animation: shake .25s linear infinite; }
.call small { color: #1e8a4c; font-weight: 800; letter-spacing: .1em; font-size: 11px; }
.call b { display: block; font-family: var(--hd); font-size: 19px; } .call p { margin: 4px 0 8px; font-size: 14px; }
.call .btn { padding: 8px 14px; font-size: 15px; } .call .btn:not(.go) { background: #e8e2d4; color: #333; border-color: #cfc6b2; }
@keyframes ring { from { box-shadow: 0 16px 40px rgba(0,0,0,.5), 0 0 0 0 rgba(46,204,113,.7); } to { box-shadow: 0 16px 40px rgba(0,0,0,.5), 0 0 0 10px rgba(46,204,113,0); } }
@keyframes shake { 0%,100% { transform: rotate(0); } 25% { transform: rotate(-14deg); } 75% { transform: rotate(14deg); } }
.slam { position: absolute; inset: 0; z-index: 28; display: flex; align-items: center; justify-content: center; pointer-events: none; background: radial-gradient(circle, rgba(0,0,0,.35), rgba(0,0,0,.6)); }
.slam b { font-family: var(--hd); font-size: clamp(48px, 10vw, 110px); letter-spacing: .12em; color: var(--yellow); text-shadow: 0 6px 0 #8a6d00, 0 12px 40px rgba(0,0,0,.6); animation: slam .45s cubic-bezier(.2,1.6,.4,1); }
@keyframes slam { from { transform: scale(2.6) rotate(-6deg); opacity: 0; } to { transform: scale(1) rotate(-3deg); opacity: 1; } }
.chip.cash.up { animation: cashup .6s ease-out; } @keyframes cashup { 0% { transform: scale(1.18); box-shadow: 0 0 0 0 rgba(126,226,160,.8); } 100% { transform: scale(1); box-shadow: 0 0 0 14px rgba(126,226,160,0); } }
.dprog.tense i { background: linear-gradient(90deg, #ff8a7d, var(--red)); }
.confetti { position: absolute; inset: 0; pointer-events: none; z-index: 35; overflow: hidden; }
.confetti i { position: absolute; top: -20px; width: 9px; height: 14px; border-radius: 2px; animation: fall linear forwards; }
@keyframes fall { to { transform: translate3d(var(--dx), 110vh, 0) rotate(var(--rot)); } }
.rep-head { position: relative; }
.grade { position: absolute; right: 0; top: -4px; width: 64px; height: 64px; border-radius: 50%; display: flex; align-items: center; justify-content: center; font-family: var(--hd); font-weight: 800; font-size: 38px; border: 4px solid currentColor; transform: rotate(-8deg); }
.grade.show { animation: stamp .4s cubic-bezier(.2,1.6,.4,1); }
.grade.A { color: #2ecc71; } .grade.B { color: #7ee2a0; } .grade.C { color: var(--yellow); } .grade.D { color: var(--amber); } .grade.F { color: var(--red); }
@keyframes stamp { from { transform: scale(3) rotate(-30deg); opacity: 0; } to { transform: scale(1) rotate(-8deg); opacity: 1; } }
.rep-strip { display: flex; flex-wrap: wrap; gap: 6px; margin: -4px 0 12px; }
.rep-strip span { background: var(--panel2); border-radius: 999px; padding: 4px 10px; font-size: 13px; font-weight: 600; }
.rep-strip span { animation: pillin .4s cubic-bezier(.2,1.6,.4,1) both; }
.rep-strip .rec { background: linear-gradient(#f5c518, #d9a800); color: #1b1b1b; }
.rep-strip .goal { background: linear-gradient(#2ecc71, #1e8a4c); color: #fff; }
@keyframes pillin { from { transform: scale(2); opacity: 0; } to { transform: scale(1); opacity: 1; } }
.rep-strip .bad { background: #5a2723; color: #ffc7c0; }
.rep-big .delta { display: block; font-size: 12px; font-weight: 600; color: var(--muted); }
.rep-big .delta.up { color: #7ee2a0; } .rep-big .delta.dn { color: #ff8a7d; }
.brief-call { background: #fbf8f0; color: #222; border-radius: 12px; padding: 10px 12px; margin: 8px 0; border-left: 5px solid #2ecc71; }
.brief-call b { font-family: var(--hd); font-size: 17px; } .brief-call p { margin: 4px 0 8px; font-size: 13.5px; white-space: pre-line; }
.brief-call .row { gap: 6px; flex-wrap: wrap; } .brief-call .btn { padding: 6px 12px; font-size: 14px; } .brief-call .btn:not(.go) { background: #e8e2d4; color: #333; border-color: #cfc6b2; }
.brief-call.urgent { border-left-color: var(--red); }
.earl { display: flex; gap: 10px; align-items: flex-start; background: rgba(245,197,24,.12); border: 1px solid rgba(245,197,24,.4); border-radius: 12px; padding: 8px 10px; margin: 6px 0 10px; font-size: 14px; }
.earl span { font-size: 26px; } .earl p { margin: 0; } .earl b { color: var(--yellow); }
.app.locked { opacity: .45; } .app.locked em { background: #445 !important; }
.rivals .rv { display: grid; grid-template-columns: 1.6fr 1fr 1fr 1.2fr; gap: 8px; align-items: center; padding: 8px 10px; border-bottom: 1px solid #e3e9ef; }
.rivals .rv.me { background: #fff8d8; border-radius: 8px; font-weight: 700; }
.goallist li { margin: 4px 0; } .goallist li.done { color: #6b7c8d; text-decoration: line-through; } .goallist li.now { font-weight: 700; }
@media (max-height: 520px) {
  .goals { top: 98px; width: 200px; padding: 5px 8px; } .goals h5 { font-size: 12px; margin: 0; } .goals .g { font-size: 11px; margin-top: 3px; } .goals .g small { display: none; }
  .feed { display: none !important; }
  .call { top: 56px; }
  .grade { width: 50px; height: 50px; font-size: 28px; }
}
@media (max-width: 760px) { .goals { width: 200px; } .feed { width: 52vw; } }

/* ---------- Web Browser app (a desktop browser window on the office computer) */
.ffx { margin: -14px -16px -30px; min-height: calc(100% + 44px); display: flex; flex-direction: column; background: #f9f9fb; font-family: system-ui, -apple-system, "Segoe UI", sans-serif; color: #15141a; }
.ffx-tabs { display: flex; align-items: center; gap: 4px; padding: 6px 8px 0; background: #f0f0f4; border-bottom: 1px solid #e0e0e6; overflow-x: auto; }
.ffx-tab { display: flex; align-items: center; gap: 8px; max-width: 220px; min-width: 120px; padding: 7px 10px; border: none; border-radius: 6px 6px 0 0; background: transparent; font-size: 12px; color: #15141a; cursor: pointer; }
.ffx-tab:hover { background: #e6e6eb; }
.ffx-tab.on { background: #fff; box-shadow: 0 0 4px rgba(0,0,0,.12); }
.ffx-tab i { width: 14px; height: 14px; border-radius: 3px; flex: none; }
.ffx-tab span { flex: 1; overflow: hidden; white-space: nowrap; text-overflow: ellipsis; text-align: left; }
.ffx-tab b { font-weight: 400; font-size: 14px; padding: 0 4px; border-radius: 4px; color: #5b5b66; } .ffx-tab b:hover { background: #d7d7db; }
.ffx-new { border: none; background: transparent; font-size: 18px; width: 28px; height: 28px; border-radius: 4px; color: #5b5b66; } .ffx-new:hover { background: #e0e0e6; }
.ffx-bar { display: flex; align-items: center; gap: 4px; padding: 5px 8px; background: #fff; border-bottom: 1px solid #e0e0e6; }
.ffx-bar > button { border: none; background: transparent; width: 30px; height: 30px; border-radius: 4px; font-size: 16px; color: #15141a; } .ffx-bar > button:hover:not([disabled]) { background: #e0e0e6; } .ffx-bar > button[disabled] { opacity: .35; }
.ffx-url { flex: 1; display: flex; align-items: center; gap: 8px; height: 32px; padding: 0 12px; border-radius: 4px; background: #f0f0f4; font-size: 13px; color: #15141a; overflow: hidden; white-space: nowrap; }
.ffx-url span { font-size: 12px; }
.ffx-books { display: flex; gap: 2px; padding: 3px 8px; background: #fff; border-bottom: 1px solid #e0e0e6; overflow-x: auto; }
.ffx-books button { display: flex; align-items: center; gap: 6px; border: none; background: transparent; font-size: 12px; padding: 4px 8px; border-radius: 4px; white-space: nowrap; color: #15141a; } .ffx-books button:hover { background: #e0e0e6; }
.ffx-books i { width: 12px; height: 12px; border-radius: 3px; }
.ffx-page { flex: 1; background: #fff; padding: 14px 16px 30px; }
.ffx-home { max-width: 760px; margin: 30px auto; text-align: center; }
.ffx-search { margin: 0 auto 26px; max-width: 520px; padding: 12px 16px; border-radius: 8px; background: #fff; box-shadow: 0 1px 6px rgba(0,0,0,.18); text-align: left; color: #5b5b66; }
.ffx-tiles { display: grid; grid-template-columns: repeat(auto-fill, minmax(110px, 1fr)); gap: 14px; margin-bottom: 18px; }
.ffx-tile { display: flex; flex-direction: column; align-items: center; gap: 8px; border: none; background: transparent; padding: 8px; border-radius: 8px; font-size: 12px; color: #15141a; } .ffx-tile:hover { background: #f0f0f4; }
.ffx-tile b { width: 64px; height: 64px; border-radius: 10px; color: #fff; display: grid; place-items: center; font-size: 18px; box-shadow: 0 1px 4px rgba(0,0,0,.2); }
.site-head { background: var(--mk); color: #fff; padding: 18px 20px; border-radius: 6px; margin-bottom: 10px; display: flex; flex-direction: column; gap: 2px; }
.site-head b { font-family: var(--hd); font-size: 28px; letter-spacing: .02em; } .site-head span { opacity: .85; font-size: 13px; }
.site h3 { font-family: var(--hd); font-size: 19px; margin: 16px 0 8px; color: var(--mk) !important; }
.eqc.prod { border-top: 4px solid var(--mk); }
.eqc.prod .ups { font-size: 12px; color: #5b5b66; }
.eqc.prod .price b { font-family: var(--hd); font-size: 22px; }
.eqc .tag.mk { color: #fff; margin-left: auto; font-size: 11px; }
@media (max-width: 700px) { .ffx-books { display: none; } .ffx-tab { min-width: 80px; } }

/* ---------------- game modes + campaign level select ---------------- */
#modes, #levels { background: rgba(10,16,24,.82); backdrop-filter: blur(3px); z-index: 12; overflow-y: auto; }
.mwrap, .lwrap { max-width: 1180px; margin: 0 auto; padding: calc(14px + env(safe-area-inset-top, 0px)) max(16px, var(--safe-r)) calc(18px + var(--safe-b)) max(16px, var(--safe-l)); }
.mhead { display: flex; align-items: center; gap: 12px; margin-bottom: 14px; flex-wrap: wrap; }
.mhead h2 { margin: 0; font-family: var(--hd); font-size: 28px; letter-spacing: .03em; flex: 1; min-width: 160px; }
.mhead .wallet, .mhead .lprog { color: var(--muted); font-weight: 600; }
.mcards { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 14px; }
.mcard { position: relative; display: flex; flex-direction: column; gap: 8px; padding: 18px; border-radius: 16px; background: linear-gradient(180deg, var(--panel2), var(--panel)); border: 1px solid var(--line); box-shadow: 0 12px 30px rgba(0,0,0,.35); }
.mcard .mi { font-size: 44px; line-height: 1; }
.mcard h3 { margin: 0; font-family: var(--hd); font-size: 30px; letter-spacing: .03em; }
.mcard p { margin: 0; color: var(--muted); line-height: 1.4; font-size: 14.5px; flex: 1; }
.mcard .mtag { position: absolute; top: 14px; right: 14px; padding: 3px 9px; border-radius: 999px; font-weight: 800; font-size: 12.5px; background: #0b131c; color: var(--muted); border: 1px solid var(--line); }
.mcard .mtag.free { color: #7ee2a0; border-color: #1e8a4c; } .mcard .mtag.own { color: var(--yellow); border-color: #b38b00; } .mcard .mtag.lock { color: #ff9a4d; border-color: #a45a1b; }
.mcard .mslot { font-size: 13px; color: var(--text); background: #0f1822; border-radius: 10px; padding: 7px 10px; }
.mcard .mbtns { display: flex; flex-direction: column; gap: 8px; }
.mcard.locked .mi { filter: grayscale(.6); opacity: .7; }
.btn.egg { background: linear-gradient(#ff9a3d, #d96b12); border-color: #9c4a0b; color: #241000; }
.lbody { display: grid; grid-template-columns: minmax(0, 1fr) 360px; gap: 14px; align-items: start; }
.lgrid { display: flex; flex-direction: column; gap: 12px; }
.lband h4 { margin: 0 0 6px; font-family: var(--hd); font-size: 16px; letter-spacing: .1em; text-transform: uppercase; }
.lband .row6 { display: grid; grid-template-columns: repeat(6, minmax(0, 1fr)); gap: 8px; }
.lvl { position: relative; text-align: left; padding: 8px 9px 9px; border-radius: 11px; background: var(--panel2); border: 2px solid var(--line); min-height: 74px; display: flex; flex-direction: column; gap: 2px; }
.lvl b { font-family: var(--hd); font-size: 16px; line-height: 1.05; } .lvl small { color: var(--muted); font-size: 11.5px; }
.lvl .num { font-family: var(--hd); font-weight: 800; font-size: 13px; color: var(--muted); }
.lvl.won { border-color: #1e8a4c; background: linear-gradient(180deg, #1d3b2c, var(--panel2)); }
.lvl.open { border-color: #b38b00; }
.lvl.locked { opacity: .45; } .lvl.locked b { filter: blur(.5px); }
.lvl.sel { box-shadow: 0 0 0 3px var(--yellow); }
.lvl .st { position: absolute; top: 6px; right: 8px; font-size: 14px; }
.ldetail { position: sticky; top: 10px; background: var(--panel); border: 1px solid var(--line); border-radius: 16px; padding: 16px; display: flex; flex-direction: column; gap: 10px; }
.ldetail h3 { margin: 0; font-family: var(--hd); font-size: 28px; } .ldetail .sub { color: var(--muted); font-size: 13.5px; }
.ldetail p { margin: 0; line-height: 1.45; font-size: 14.5px; }
.ldetail .learl { display: flex; gap: 8px; background: #0f1822; border-radius: 10px; padding: 9px 10px; font-size: 13.5px; color: #dfe8f0; }
.chl { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 6px; }
.chl li { background: #0f1822; border-radius: 9px; padding: 7px 10px 7px 32px; position: relative; font-size: 14px; }
.chl li::before { content: attr(data-n); position: absolute; left: 9px; top: 7px; font-family: var(--hd); font-weight: 800; color: var(--yellow); }
.chl li.hit { color: #7ee2a0; } .chl li.hit::before { content: '✓'; color: #7ee2a0; }
.chl li i { display: block; height: 4px; border-radius: 3px; background: #050a10; margin-top: 4px; overflow: hidden; } .chl li i em { display: block; height: 100%; background: linear-gradient(90deg, var(--yellow), #7ee2a0); }
.chl li small { color: var(--muted); }
.lvlend-card { max-width: min(620px, calc(100vw - 32px)); }
.lvlend-card .big { font-size: 64px; line-height: 1; } .lvlend-card h2 { font-family: var(--hd); font-size: 34px; margin: 6px 0; }
.lvlend-card .chl { text-align: left; margin: 12px 0; }
.goals .lv { display: flex; justify-content: space-between; font-size: 12px; color: var(--muted); margin-top: 2px; }
.goals .lv b { color: var(--text); } .goals .lv .late { color: #ff8a7d; }
.goals .g.hit { color: #7ee2a0; } .goals .g.hit i em { background: #2ecc71; }
.sbx { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; margin-top: 10px; }
.sbx label { display: flex; flex-direction: column; gap: 4px; font-family: var(--bd); font-size: 14px; }
.sbx select { padding: 6px; border-radius: 8px; }
@media (max-width: 900px) {
  .mcards { grid-template-columns: 1fr; } .lbody { grid-template-columns: 1fr; } .ldetail { position: static; }
  .lband .row6 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .mcard { padding: 14px; } .mcard .mi { font-size: 32px; } .mcard h3 { font-size: 24px; }
}
@media (max-height: 520px) and (min-width: 700px) { .mcards { grid-template-columns: repeat(3, minmax(0, 1fr)); } .mcard p { font-size: 13px; } .lbody { grid-template-columns: minmax(0, 1fr) 300px; } .ldetail { position: sticky; } .lband .row6 { grid-template-columns: repeat(6, minmax(0, 1fr)); } }

/* difficulty cards (new company wizard, above the day-one letter) */
.diffpick { max-width: 720px; margin: 0 auto 14px; }
.diffpick h4 { font-family: var(--hd); font-size: 18px; letter-spacing: .04em; margin: 0 0 8px; color: var(--yellow); }
.dcards { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 10px; }
.dcard { text-align: left; display: flex; flex-direction: column; gap: 3px; padding: 12px 14px; border-radius: 12px; border: 2px solid rgba(255,255,255,.14); background: rgba(255,255,255,.05); color: inherit; font: inherit; cursor: pointer; }
.dcard b { font-family: var(--hd); font-size: 19px; }
.dcard i { font-style: normal; font-weight: 700; color: var(--yellow); font-size: 13px; }
.dcard small { color: var(--muted); line-height: 1.35; }
.dcard.on { border-color: var(--yellow); background: rgba(255,200,0,.12); }
.dcard.on small { color: inherit; }
.diffpick p { margin: 8px 0 0; }
@media (max-width: 640px) { .dcards { grid-template-columns: 1fr; } .dcard { padding: 9px 12px; } }

/* breakdown decision (pauses the shift) */
.fixcard { max-width: 460px; text-align: center; }
.fix-ico { font-size: 44px; animation: shake .25s linear 6; }
.fixcard h2 { margin: 4px 0 6px; } .fixcard p { margin: 0 0 12px; color: var(--muted); }
.fix-opts { display: flex; flex-direction: column; gap: 8px; margin-bottom: 10px; }
.fixopt { display: grid; grid-template-columns: 44px 1fr; grid-template-rows: auto auto; column-gap: 10px; text-align: left; align-items: center; padding: 11px 14px; border-radius: 12px; border: 2px solid var(--line); background: var(--panel2); color: var(--text); font: inherit; cursor: pointer; }
.fixopt i { grid-row: 1 / 3; font-style: normal; font-size: 28px; text-align: center; }
.fixopt b { font-family: var(--hd); font-size: 18px; letter-spacing: .02em; } .fixopt small { color: var(--muted); }
.fixopt.go { border-color: var(--go); background: rgba(39,174,96,.16); } .fixopt.ad { border-color: var(--yellow); background: rgba(245,197,24,.12); }
.fixopt:hover { filter: brightness(1.15); }
.btn.sell { background: #5b4a1f; border-color: #a8873a; }
/* equipment catalog: round category buttons */
.cat-bubbles { display: flex; gap: 10px; overflow-x: auto; padding: 4px 2px 10px; margin-bottom: 4px; scrollbar-width: thin; }
.cbub { position: relative; flex: 0 0 auto; width: 86px; display: flex; flex-direction: column; align-items: center; gap: 5px; border: none; background: none; color: #345; font: inherit; font-size: 12.5px; font-weight: 700; line-height: 1.15; text-align: center; cursor: pointer; }
.cbub i { font-style: normal; width: 62px; height: 62px; border-radius: 50%; display: flex; align-items: center; justify-content: center; font-size: 28px; background: radial-gradient(circle at 32% 28%, #ffffff, #dbe6f0 70%); border: 3px solid #c3d2e0; box-shadow: 0 3px 8px rgba(20,40,70,.18); transition: transform .12s, border-color .12s; }
.cbub:hover i { transform: translateY(-2px); }
.cbub.on i { border-color: var(--os-acc); background: radial-gradient(circle at 32% 28%, #ffffff, #bfe0ff 75%); transform: scale(1.1); box-shadow: 0 5px 14px rgba(36,113,163,.4); }
.cbub.on { color: var(--os-side); }
.cflag { position: absolute; top: -2px; right: 8px; width: 20px; height: 20px; border-radius: 50%; background: #c0392b; color: #fff; font-size: 13px; line-height: 20px; }
.cat-head { display: flex; align-items: baseline; gap: 10px; flex-wrap: wrap; padding: 8px 12px; margin-bottom: 10px; border-radius: 10px; background: #e7eef5; }
.cat-head b { font-family: var(--hd); font-size: 21px; color: var(--os-side); } .cat-head span { color: var(--os-muted); }
.eqc.empty { border: 2px dashed #c0392b; background: #fff7f5; }
.eqc .tagrow { display: flex; gap: 6px; flex-wrap: wrap; }
.ob.sellb { background: #fff8e6; border-color: #d9b45a; color: #6b4d0c; }
.lnk { border: none; background: none; color: var(--os-acc); text-decoration: underline; font: inherit; cursor: pointer; padding: 0; }
@media (max-width: 700px) { .cbub { width: 72px; font-size: 11.5px; } .cbub i { width: 52px; height: 52px; font-size: 24px; } }

/* Google Play link on the title screen */
.store-btn { display: inline-flex; align-items: center; gap: 10px; background: #0f1620; border: 1px solid #3a4a5c; color: #fff; padding: 8px 18px 8px 14px; border-radius: 10px; text-decoration: none; }
.store-btn .ico { width: 26px; height: 26px; color: #4fd1a5; }
.store-btn .store-txt { display: flex; flex-direction: column; line-height: 1.05; text-align: left; }
.store-btn small { font-size: 10px; letter-spacing: .1em; opacity: .75; }
.store-btn b { font-size: 17px; }
