:root {
  color-scheme: light;
  --ink: #172033;
  --muted: #66758c;
  --line: #172033;
  --green: #22b96f;
  --blue: #2f83d7;
  --amber: #e5a11f;
  --red: #d94b45;
  --gray: #7b8795;
}

* { box-sizing: border-box; }
body {
  margin: 0;
  min-height: 100vh;
  color: var(--ink);
  background: #202b3b;
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, Segoe UI, sans-serif;
}

.shell { min-height: 100vh; padding: 18px; }
.topbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 16px 20px;
  background: #f8fafc;
  border: 4px solid var(--line);
  box-shadow: 8px 8px 0 var(--line);
}
.eyebrow { font-size: 12px; font-weight: 900; color: var(--blue); letter-spacing: 1px; }
h1 { margin: 2px 0 0; font-size: 32px; line-height: 1; }
.top-actions { display: flex; gap: 10px; align-items: center; flex-wrap: wrap; }
select, button, .ghost, .primary {
  min-height: 38px;
  border: 3px solid var(--line);
  background: #fff;
  color: var(--ink);
  padding: 8px 12px;
  font-weight: 900;
  text-decoration: none;
  box-shadow: 4px 4px 0 var(--line);
}
button, .ghost, .primary { cursor: pointer; }
.primary { display: inline-flex; align-items: center; background: var(--line); color: #fff; }
.hidden { display: none !important; }

.layout {
  display: grid;
  grid-template-columns: minmax(980px, 1fr) 350px;
  gap: 20px;
  margin-top: 20px;
}
.office {
  position: relative;
  min-height: calc(100vh - 138px);
  background: #111827;
  border: 4px solid var(--line);
  box-shadow: 8px 8px 0 var(--line);
  overflow: hidden;
}
.game-toolbar {
  position: absolute;
  left: 18px;
  top: 18px;
  z-index: 4;
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
}
.game-toolbar span {
  display: inline-flex;
  align-items: center;
  min-height: 30px;
  padding: 5px 9px;
  background: rgba(248, 250, 252, .94);
  border: 3px solid var(--line);
  box-shadow: 4px 4px 0 rgba(23, 32, 51, .9);
  font: 900 12px ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
}
.game-viewport {
  position: absolute;
  inset: 0;
  overflow: hidden;
  background: #cfdce6;
}
#officeCanvas {
  display: block;
  width: 100%;
  height: 100%;
  image-rendering: pixelated;
  cursor: crosshair;
}
.legend {
  position: absolute;
  left: 18px;
  bottom: 18px;
  z-index: 4;
  display: inline-flex;
  gap: 14px;
  padding: 10px 12px;
  background: rgba(255,255,255,.95);
  border: 4px solid var(--line);
  box-shadow: 5px 5px 0 var(--line);
  font-size: 12px;
  font-weight: 900;
}
.legend span { display: inline-flex; align-items: center; gap: 6px; }

.panel { display: grid; gap: 14px; align-content: start; }
.card {
  background: #f8fafc;
  border: 4px solid var(--line);
  box-shadow: 7px 7px 0 var(--line);
  padding: 15px;
}
.card-title { font-weight: 950; margin-bottom: 10px; }
.auth-state, .selected, .list, .signal { font-size: 14px; color: #334155; }
.list { display: grid; gap: 8px; max-height: 280px; overflow: auto; }
.task-row {
  border: 3px solid var(--line);
  background: #fff;
  padding: 9px;
  color: var(--ink);
  text-decoration: none;
}
.task-row b { display: block; color: var(--ink); }
.task-row span { display: block; margin-top: 3px; font-size: 12px; color: var(--muted); }
.signal { display: flex; gap: 8px; align-items: center; margin-top: 8px; }
.dot { width: 12px; height: 12px; border: 2px solid var(--line); display: inline-block; }
.green { background: var(--green); }
.amber { background: var(--amber); }
.blue { background: var(--blue); }
.red { background: var(--red); }
.gray { background: var(--gray); }

@media (max-width: 1280px) {
  .layout { grid-template-columns: 1fr; }
  .office { min-height: 760px; }
  .panel { grid-template-columns: repeat(2, minmax(260px, 1fr)); }
}

@media (max-width: 760px) {
  .shell { padding: 10px; }
  .topbar { align-items: flex-start; flex-direction: column; }
  .panel { grid-template-columns: 1fr; }
  .office { min-height: 620px; }
}
